Merge branch 'mbruce/bugfix' into 'develop'
SetDefaults() updates See merge request BPHV_MIPS/vds_ios!288
This commit is contained in:
commit
352affeddd
@ -1589,7 +1589,7 @@
|
|||||||
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
CODE_SIGN_IDENTITY = "";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 71;
|
CURRENT_PROJECT_VERSION = 72;
|
||||||
DEFINES_MODULE = YES;
|
DEFINES_MODULE = YES;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
@ -1627,7 +1627,7 @@
|
|||||||
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
|
||||||
CODE_SIGN_IDENTITY = "";
|
CODE_SIGN_IDENTITY = "";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 71;
|
CURRENT_PROJECT_VERSION = 72;
|
||||||
DEFINES_MODULE = YES;
|
DEFINES_MODULE = YES;
|
||||||
DEVELOPMENT_TEAM = "";
|
DEVELOPMENT_TEAM = "";
|
||||||
DYLIB_COMPATIBILITY_VERSION = 1;
|
DYLIB_COMPATIBILITY_VERSION = 1;
|
||||||
|
|||||||
@ -293,16 +293,6 @@ open class BadgeIndicator: View {
|
|||||||
label.centerYAnchor.constraint(equalTo: badgeView.centerYAnchor).isActive = true
|
label.centerYAnchor.constraint(equalTo: badgeView.centerYAnchor).isActive = true
|
||||||
labelContraints.isActive = true
|
labelContraints.isActive = true
|
||||||
|
|
||||||
bridge_accessibilityLabelBlock = { [weak self] in
|
|
||||||
guard let self else { return "" }
|
|
||||||
if let accessibilityText {
|
|
||||||
return kind == .numbered ? label.text + " " + accessibilityText : accessibilityText
|
|
||||||
} else if kind == .numbered {
|
|
||||||
return label.text
|
|
||||||
} else {
|
|
||||||
return "Simple"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func setDefaults() {
|
open override func setDefaults() {
|
||||||
@ -324,6 +314,17 @@ open class BadgeIndicator: View {
|
|||||||
height = nil
|
height = nil
|
||||||
accessibilityText = nil
|
accessibilityText = nil
|
||||||
maximumDigits = .two
|
maximumDigits = .two
|
||||||
|
|
||||||
|
bridge_accessibilityLabelBlock = { [weak self] in
|
||||||
|
guard let self else { return "" }
|
||||||
|
if let accessibilityText {
|
||||||
|
return kind == .numbered ? label.text + " " + accessibilityText : accessibilityText
|
||||||
|
} else if kind == .numbered {
|
||||||
|
return label.text
|
||||||
|
} else {
|
||||||
|
return "Simple"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resets to default settings.
|
/// Resets to default settings.
|
||||||
|
|||||||
@ -49,13 +49,6 @@ open class CheckboxItem: SelectorItemBase<Checkbox> {
|
|||||||
sendActions(for: .valueChanged)
|
sendActions(for: .valueChanged)
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func setup() {
|
|
||||||
super.setup()
|
|
||||||
let foo = ConcreteClass(customView: Checkbox())
|
|
||||||
|
|
||||||
print(foo.customView.isAnimated)
|
|
||||||
}
|
|
||||||
|
|
||||||
open override func setDefaults() {
|
open override func setDefaults() {
|
||||||
super.setDefaults()
|
super.setDefaults()
|
||||||
isAnimated = false
|
isAnimated = false
|
||||||
@ -67,24 +60,3 @@ open class CheckboxItem: SelectorItemBase<Checkbox> {
|
|||||||
super.updateView()
|
super.updateView()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@objcMembers
|
|
||||||
open class GenericClass<T: UIView>: NSObject {
|
|
||||||
public var customView: T
|
|
||||||
|
|
||||||
public init(customView: T = T()) {
|
|
||||||
self.customView = customView
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@objcMembers
|
|
||||||
@objc(VDSConcreteClass)
|
|
||||||
open class ConcreteClass: GenericClass<Checkbox> {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@objcMembers
|
|
||||||
@objc(VDSConcreteCheckboxClass)
|
|
||||||
open class ConcreteCheckboxClass: ConcreteClass {}
|
|
||||||
|
|
||||||
|
|||||||
@ -152,15 +152,7 @@ open class DatePicker: EntryFieldBase<String> {
|
|||||||
|
|
||||||
// setting color config
|
// setting color config
|
||||||
selectedDateLabel.textColorConfiguration = primaryColorConfiguration.eraseToAnyColorable()
|
selectedDateLabel.textColorConfiguration = primaryColorConfiguration.eraseToAnyColorable()
|
||||||
|
|
||||||
// tap gesture
|
|
||||||
containerView.onClick = { [weak self] _ in
|
|
||||||
guard let self else { return }
|
|
||||||
if isEnabled && !isReadOnly {
|
|
||||||
showPopover()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NotificationCenter.default
|
NotificationCenter.default
|
||||||
.publisher(for: UIDevice.orientationDidChangeNotification).sink { [weak self] _ in
|
.publisher(for: UIDevice.orientationDidChangeNotification).sink { [weak self] _ in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
@ -177,6 +169,14 @@ open class DatePicker: EntryFieldBase<String> {
|
|||||||
calendarModel = .init()
|
calendarModel = .init()
|
||||||
dateFormat = .shortNumeric
|
dateFormat = .shortNumeric
|
||||||
selectedDateLabel.textStyle = .bodyLarge
|
selectedDateLabel.textStyle = .bodyLarge
|
||||||
|
|
||||||
|
// tap gesture
|
||||||
|
containerView.onClick = { [weak self] _ in
|
||||||
|
guard let self else { return }
|
||||||
|
if isEnabled && !isReadOnly {
|
||||||
|
showPopover()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func getFieldContainer() -> UIView {
|
open override func getFieldContainer() -> UIView {
|
||||||
|
|||||||
@ -268,10 +268,6 @@ open class Notification: View {
|
|||||||
closeButton.accessibilityTraits = [.button]
|
closeButton.accessibilityTraits = [.button]
|
||||||
closeButton.accessibilityLabel = "Close Notification"
|
closeButton.accessibilityLabel = "Close Notification"
|
||||||
|
|
||||||
typeIcon.bridge_accessibilityLabelBlock = { [weak self] in
|
|
||||||
guard let self else { return "" }
|
|
||||||
return style.accessibleText
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func setDefaults() {
|
open override func setDefaults() {
|
||||||
@ -296,6 +292,10 @@ open class Notification: View {
|
|||||||
|
|
||||||
hideCloseButton = false
|
hideCloseButton = false
|
||||||
|
|
||||||
|
typeIcon.bridge_accessibilityLabelBlock = { [weak self] in
|
||||||
|
guard let self else { return "" }
|
||||||
|
return style.accessibleText
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Resets to default settings.
|
/// Resets to default settings.
|
||||||
|
|||||||
@ -145,6 +145,10 @@ open class Pagination: View {
|
|||||||
.sink { [weak self] value in
|
.sink { [weak self] value in
|
||||||
self?.collectionViewWidthAnchor?.constant = value //As cell width is dynamic i.e cell may contain 2 or 3 or 4 charcters. Make sure that all the visible cells are displayed.
|
self?.collectionViewWidthAnchor?.constant = value //As cell width is dynamic i.e cell may contain 2 or 3 or 4 charcters. Make sure that all the visible cells are displayed.
|
||||||
}.store(in: &subscribers)
|
}.store(in: &subscribers)
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func setDefaults() {
|
||||||
|
super.setDefaults()
|
||||||
collectionContainerView.onAccessibilityIncrement = { [weak self] in
|
collectionContainerView.onAccessibilityIncrement = { [weak self] in
|
||||||
guard let self else { return }
|
guard let self else { return }
|
||||||
self.selectedPage = max(0, self.selectedPage + 1)
|
self.selectedPage = max(0, self.selectedPage + 1)
|
||||||
|
|||||||
@ -150,6 +150,10 @@ extension Tabs {
|
|||||||
labelLeadingConstraint = label.pinLeading(anchor: layoutGuide.leadingAnchor)
|
labelLeadingConstraint = label.pinLeading(anchor: layoutGuide.leadingAnchor)
|
||||||
labelBottomConstraint = label.pinBottom(anchor: layoutGuide.bottomAnchor, priority: .defaultHigh)
|
labelBottomConstraint = label.pinBottom(anchor: layoutGuide.bottomAnchor, priority: .defaultHigh)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func setDefaults() {
|
||||||
|
super.setDefaults()
|
||||||
bridge_accessibilityLabelBlock = { [weak self] in
|
bridge_accessibilityLabelBlock = { [weak self] in
|
||||||
guard let self else { return "" }
|
guard let self else { return "" }
|
||||||
return text
|
return text
|
||||||
|
|||||||
@ -379,15 +379,6 @@ open class Tilelet: TileContainerBase<Tilelet.Padding> {
|
|||||||
titleLockupSubTitleLabelHeightGreaterThanConstraint?.priority = .defaultHigh
|
titleLockupSubTitleLabelHeightGreaterThanConstraint?.priority = .defaultHigh
|
||||||
titleLockupSubTitleLabelHeightGreaterThanConstraint?.activate()
|
titleLockupSubTitleLabelHeightGreaterThanConstraint?.activate()
|
||||||
|
|
||||||
directionalIcon.bridge_accessibilityLabelBlock = { [weak self] in
|
|
||||||
guard let self, let directionalIconModel else { return nil }
|
|
||||||
return directionalIconModel.accessibleText
|
|
||||||
}
|
|
||||||
|
|
||||||
descriptiveIcon.bridge_accessibilityLabelBlock = { [weak self] in
|
|
||||||
guard let self, let descriptiveIconModel else { return nil }
|
|
||||||
return descriptiveIconModel.accessibleText
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func setDefaults() {
|
open override func setDefaults() {
|
||||||
@ -403,6 +394,16 @@ open class Tilelet: TileContainerBase<Tilelet.Padding> {
|
|||||||
subTitleModel = nil
|
subTitleModel = nil
|
||||||
descriptiveIconModel = nil
|
descriptiveIconModel = nil
|
||||||
directionalIconModel = nil
|
directionalIconModel = nil
|
||||||
|
|
||||||
|
directionalIcon.bridge_accessibilityLabelBlock = { [weak self] in
|
||||||
|
guard let self, let directionalIconModel else { return nil }
|
||||||
|
return directionalIconModel.accessibleText
|
||||||
|
}
|
||||||
|
|
||||||
|
descriptiveIcon.bridge_accessibilityLabelBlock = { [weak self] in
|
||||||
|
guard let self, let descriptiveIconModel else { return nil }
|
||||||
|
return descriptiveIconModel.accessibleText
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Used to make changes to the View based off a change events or from local properties.
|
/// Used to make changes to the View based off a change events or from local properties.
|
||||||
|
|||||||
@ -129,6 +129,16 @@ open class Tooltip: Control, TooltipLaunchable {
|
|||||||
|
|
||||||
isAccessibilityElement = true
|
isAccessibilityElement = true
|
||||||
accessibilityTraits = .button
|
accessibilityTraits = .button
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func setDefaults() {
|
||||||
|
super.setDefaults()
|
||||||
|
closeButtonText = "Close"
|
||||||
|
fillColor = .primary
|
||||||
|
size = .medium
|
||||||
|
title = nil
|
||||||
|
content = nil
|
||||||
|
contentView = nil
|
||||||
|
|
||||||
onClick = { [weak self] tooltip in
|
onClick = { [weak self] tooltip in
|
||||||
guard let self else { return}
|
guard let self else { return}
|
||||||
@ -158,16 +168,6 @@ open class Tooltip: Control, TooltipLaunchable {
|
|||||||
return isEnabled ? "Double tap to open." : ""
|
return isEnabled ? "Double tap to open." : ""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func setDefaults() {
|
|
||||||
super.setDefaults()
|
|
||||||
closeButtonText = "Close"
|
|
||||||
fillColor = .primary
|
|
||||||
size = .medium
|
|
||||||
title = nil
|
|
||||||
content = nil
|
|
||||||
contentView = nil
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// Used to make changes to the View based off a change events or from local properties.
|
/// Used to make changes to the View based off a change events or from local properties.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user