Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/vds_ios into vasavk/listUnordered
# Conflicts: # VDS/SupportingFiles/ReleaseNotes.txt
This commit is contained in:
commit
e256dfd209
@ -112,6 +112,12 @@ open class FootnoteGroup: View {
|
|||||||
footnoteItems = []
|
footnoteItems = []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Used to make changes to the View based off a change events or from local properties.
|
||||||
|
open override func updateView() {
|
||||||
|
super.updateView()
|
||||||
|
updateFootnoteItems()
|
||||||
|
}
|
||||||
|
|
||||||
internal func updateFootnoteItems() {
|
internal func updateFootnoteItems() {
|
||||||
// symbol containers are as wide as the widest symbol container in the group.
|
// symbol containers are as wide as the widest symbol container in the group.
|
||||||
var symbolMaxWidth = 0.0
|
var symbolMaxWidth = 0.0
|
||||||
|
|||||||
@ -39,6 +39,27 @@ public extension String {
|
|||||||
func isValid(range: NSRange) -> Bool {
|
func isValid(range: NSRange) -> Bool {
|
||||||
range.location >= 0 && range.length > 0 && range.location + range.length <= count
|
range.location >= 0 && range.length > 0 && range.location + range.length <= count
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func index(from: Int) -> Index {
|
||||||
|
return self.index(startIndex, offsetBy: from)
|
||||||
|
}
|
||||||
|
|
||||||
|
func substring(from: Int) -> String {
|
||||||
|
let fromIndex = index(from: from)
|
||||||
|
return String(self[fromIndex...])
|
||||||
|
}
|
||||||
|
|
||||||
|
func substring(to: Int) -> String {
|
||||||
|
let toIndex = index(from: to)
|
||||||
|
return String(self[..<toIndex])
|
||||||
|
}
|
||||||
|
|
||||||
|
func substring(with r: Range<Int>) -> String {
|
||||||
|
let startIndex = index(from: r.lowerBound)
|
||||||
|
let endIndex = index(from: r.upperBound)
|
||||||
|
return String(self[startIndex..<endIndex])
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public extension NSAttributedString {
|
public extension NSAttributedString {
|
||||||
|
|||||||
@ -140,6 +140,7 @@ open class PriceLockup: View, ParentViewProtocol {
|
|||||||
internal var delimiterIndex = 0
|
internal var delimiterIndex = 0
|
||||||
internal var strikethroughLocation = 0
|
internal var strikethroughLocation = 0
|
||||||
internal var strikethroughLength = 0
|
internal var strikethroughLength = 0
|
||||||
|
internal var strikethroughAccessibilityText: String = "price not offering anymore"
|
||||||
|
|
||||||
internal var textPosition:TextPosition = .preDelimiter
|
internal var textPosition:TextPosition = .preDelimiter
|
||||||
enum TextPosition: String, CaseIterable {
|
enum TextPosition: String, CaseIterable {
|
||||||
@ -217,6 +218,24 @@ open class PriceLockup: View, ParentViewProtocol {
|
|||||||
|
|
||||||
open override func setDefaults() {
|
open override func setDefaults() {
|
||||||
super.setDefaults()
|
super.setDefaults()
|
||||||
|
|
||||||
|
priceLockupLabel.bridge_accessibilityLabelBlock = { [weak self] in
|
||||||
|
guard let self else { return "" }
|
||||||
|
var accessibilityLabels = [String]()
|
||||||
|
if let text = priceLockupLabel.text, !text.isEmpty {
|
||||||
|
if strikethrough, strikethroughLength > 0 {
|
||||||
|
let preText = text.substring(to: strikethroughLocation)
|
||||||
|
let postText = text.substring(from: strikethroughLocation)
|
||||||
|
accessibilityLabels.append(preText)
|
||||||
|
accessibilityLabels.append(strikethroughAccessibilityText)
|
||||||
|
accessibilityLabels.append(postText)
|
||||||
|
} else {
|
||||||
|
accessibilityLabels.append(text)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return accessibilityLabels.joined(separator: " ")
|
||||||
|
}
|
||||||
|
|
||||||
bold = false
|
bold = false
|
||||||
hideCurrency = false
|
hideCurrency = false
|
||||||
leadingText = nil
|
leadingText = nil
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
1.0.76
|
1.0.76
|
||||||
----------------
|
----------------
|
||||||
- ONEAPP-11355 - ListUnordered - Finished Development
|
- ONEAPP-11355 - ListUnordered - Finished Development
|
||||||
|
- CXTDT-630735 - PriceLockup - Accessibility
|
||||||
|
- CXTDT-626164 - FootnoteGroup - Dark mode
|
||||||
|
|
||||||
1.0.75
|
1.0.75
|
||||||
----------------
|
----------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user