Merge branch 'develop' into feature/accessibilityHandler
This commit is contained in:
commit
76b0810905
@ -287,6 +287,7 @@
|
|||||||
AF1C33732885D481006B1001 /* MVMCoreUIActionOpenPageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF1C33722885D481006B1001 /* MVMCoreUIActionOpenPageHandler.swift */; };
|
AF1C33732885D481006B1001 /* MVMCoreUIActionOpenPageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF1C33722885D481006B1001 /* MVMCoreUIActionOpenPageHandler.swift */; };
|
||||||
AF60A7F62892D2E300919EEB /* ActionDismissNotificationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF60A7F52892D2E300919EEB /* ActionDismissNotificationModel.swift */; };
|
AF60A7F62892D2E300919EEB /* ActionDismissNotificationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF60A7F52892D2E300919EEB /* ActionDismissNotificationModel.swift */; };
|
||||||
AF60A7F82892D34D00919EEB /* ActionDismissNotificationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF60A7F72892D34D00919EEB /* ActionDismissNotificationHandler.swift */; };
|
AF60A7F82892D34D00919EEB /* ActionDismissNotificationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF60A7F72892D34D00919EEB /* ActionDismissNotificationHandler.swift */; };
|
||||||
|
AF766D262A3CD4C600749099 /* UIAccessibilityTraits+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF766D252A3CD4C600749099 /* UIAccessibilityTraits+Codable.swift */; };
|
||||||
AF7E509829E477C1009DC2AD /* AlertHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF7E509629E477C0009DC2AD /* AlertHandler.swift */; };
|
AF7E509829E477C1009DC2AD /* AlertHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF7E509629E477C0009DC2AD /* AlertHandler.swift */; };
|
||||||
AF7E509929E477C1009DC2AD /* AlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF7E509729E477C0009DC2AD /* AlertController.swift */; };
|
AF7E509929E477C1009DC2AD /* AlertController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF7E509729E477C0009DC2AD /* AlertController.swift */; };
|
||||||
AFA4932029E5CA73001A9663 /* AlertOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA4931F29E5CA73001A9663 /* AlertOperation.swift */; };
|
AFA4932029E5CA73001A9663 /* AlertOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = AFA4931F29E5CA73001A9663 /* AlertOperation.swift */; };
|
||||||
@ -873,6 +874,7 @@
|
|||||||
AF1C33722885D481006B1001 /* MVMCoreUIActionOpenPageHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVMCoreUIActionOpenPageHandler.swift; sourceTree = "<group>"; };
|
AF1C33722885D481006B1001 /* MVMCoreUIActionOpenPageHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVMCoreUIActionOpenPageHandler.swift; sourceTree = "<group>"; };
|
||||||
AF60A7F52892D2E300919EEB /* ActionDismissNotificationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionDismissNotificationModel.swift; sourceTree = "<group>"; };
|
AF60A7F52892D2E300919EEB /* ActionDismissNotificationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionDismissNotificationModel.swift; sourceTree = "<group>"; };
|
||||||
AF60A7F72892D34D00919EEB /* ActionDismissNotificationHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionDismissNotificationHandler.swift; sourceTree = "<group>"; };
|
AF60A7F72892D34D00919EEB /* ActionDismissNotificationHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionDismissNotificationHandler.swift; sourceTree = "<group>"; };
|
||||||
|
AF766D252A3CD4C600749099 /* UIAccessibilityTraits+Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIAccessibilityTraits+Codable.swift"; sourceTree = "<group>"; };
|
||||||
AF7E509629E477C0009DC2AD /* AlertHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertHandler.swift; sourceTree = "<group>"; };
|
AF7E509629E477C0009DC2AD /* AlertHandler.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertHandler.swift; sourceTree = "<group>"; };
|
||||||
AF7E509729E477C0009DC2AD /* AlertController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertController.swift; sourceTree = "<group>"; };
|
AF7E509729E477C0009DC2AD /* AlertController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AlertController.swift; sourceTree = "<group>"; };
|
||||||
AFA4931F29E5CA73001A9663 /* AlertOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertOperation.swift; sourceTree = "<group>"; };
|
AFA4931F29E5CA73001A9663 /* AlertOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertOperation.swift; sourceTree = "<group>"; };
|
||||||
@ -1587,6 +1589,7 @@
|
|||||||
EA985C862981AB0F00F2FF2E /* VDS-Tilelet+Codable.swift */,
|
EA985C862981AB0F00F2FF2E /* VDS-Tilelet+Codable.swift */,
|
||||||
EA985C882981AB7100F2FF2E /* VDS-TextStyle.swift */,
|
EA985C882981AB7100F2FF2E /* VDS-TextStyle.swift */,
|
||||||
EA985C8A2983259900F2FF2E /* VDS-LabelAttributeModel.swift */,
|
EA985C8A2983259900F2FF2E /* VDS-LabelAttributeModel.swift */,
|
||||||
|
AF766D252A3CD4C600749099 /* UIAccessibilityTraits+Codable.swift */,
|
||||||
);
|
);
|
||||||
path = Extensions;
|
path = Extensions;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -2845,6 +2848,7 @@
|
|||||||
0A7EF86723D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift in Sources */,
|
0A7EF86723D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift in Sources */,
|
||||||
444FB7C32821B76B00DFE692 /* TitleLockupModel.swift in Sources */,
|
444FB7C32821B76B00DFE692 /* TitleLockupModel.swift in Sources */,
|
||||||
D29C94D5242901C9003813BA /* MVMCoreUICommonViewsUtility+Extension.swift in Sources */,
|
D29C94D5242901C9003813BA /* MVMCoreUICommonViewsUtility+Extension.swift in Sources */,
|
||||||
|
AF766D262A3CD4C600749099 /* UIAccessibilityTraits+Codable.swift in Sources */,
|
||||||
D260105323CEA61600764D80 /* ToggleModel.swift in Sources */,
|
D260105323CEA61600764D80 /* ToggleModel.swift in Sources */,
|
||||||
014AA72523C501E2006F3E93 /* ContainerModel.swift in Sources */,
|
014AA72523C501E2006F3E93 /* ContainerModel.swift in Sources */,
|
||||||
0A7EF86523D8AFFF00B2AAD1 /* ItemDropdownEntryFieldModel.swift in Sources */,
|
0A7EF86523D8AFFF00B2AAD1 /* ItemDropdownEntryFieldModel.swift in Sources */,
|
||||||
|
|||||||
@ -276,6 +276,9 @@ public typealias ActionBlock = () -> ()
|
|||||||
guard let labelModel = model as? LabelModel else { return }
|
guard let labelModel = model as? LabelModel else { return }
|
||||||
|
|
||||||
text = labelModel.text
|
text = labelModel.text
|
||||||
|
if let accessibilityTraits = labelModel.accessibilityTraits {
|
||||||
|
self.accessibilityTraits = accessibilityTraits
|
||||||
|
}
|
||||||
|
|
||||||
resetAttributeStyle()
|
resetAttributeStyle()
|
||||||
|
|
||||||
|
|||||||
@ -28,6 +28,7 @@
|
|||||||
public var makeWholeViewClickable: Bool?
|
public var makeWholeViewClickable: Bool?
|
||||||
public var numberOfLines: Int?
|
public var numberOfLines: Int?
|
||||||
public var shouldMaskRecordedView: Bool? = false
|
public var shouldMaskRecordedView: Bool? = false
|
||||||
|
public var accessibilityTraits: UIAccessibilityTraits?
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
@ -50,6 +51,7 @@
|
|||||||
case makeWholeViewClickable
|
case makeWholeViewClickable
|
||||||
case numberOfLines
|
case numberOfLines
|
||||||
case shouldMaskRecordedView
|
case shouldMaskRecordedView
|
||||||
|
case accessibilityTraits
|
||||||
}
|
}
|
||||||
|
|
||||||
enum AttributeTypeKey: String, CodingKey {
|
enum AttributeTypeKey: String, CodingKey {
|
||||||
@ -97,6 +99,7 @@
|
|||||||
makeWholeViewClickable = try typeContainer.decodeIfPresent(Bool.self, forKey: .makeWholeViewClickable)
|
makeWholeViewClickable = try typeContainer.decodeIfPresent(Bool.self, forKey: .makeWholeViewClickable)
|
||||||
numberOfLines = try typeContainer.decodeIfPresent(Int.self, forKey: .numberOfLines)
|
numberOfLines = try typeContainer.decodeIfPresent(Int.self, forKey: .numberOfLines)
|
||||||
shouldMaskRecordedView = try typeContainer.decodeIfPresent(Bool.self, forKey: .shouldMaskRecordedView) ?? false
|
shouldMaskRecordedView = try typeContainer.decodeIfPresent(Bool.self, forKey: .shouldMaskRecordedView) ?? false
|
||||||
|
accessibilityTraits = try typeContainer.decodeIfPresent(UIAccessibilityTraits.self, forKey: .accessibilityTraits)
|
||||||
|
|
||||||
// Later make protocol based validate outside of decoding?
|
// Later make protocol based validate outside of decoding?
|
||||||
if let attributes = attributes {
|
if let attributes = attributes {
|
||||||
@ -122,5 +125,6 @@
|
|||||||
try container.encodeIfPresent(makeWholeViewClickable, forKey: .makeWholeViewClickable)
|
try container.encodeIfPresent(makeWholeViewClickable, forKey: .makeWholeViewClickable)
|
||||||
try container.encodeIfPresent(numberOfLines, forKey: .numberOfLines)
|
try container.encodeIfPresent(numberOfLines, forKey: .numberOfLines)
|
||||||
try container.encodeIfPresent(shouldMaskRecordedView, forKey: .shouldMaskRecordedView)
|
try container.encodeIfPresent(shouldMaskRecordedView, forKey: .shouldMaskRecordedView)
|
||||||
|
try container.encodeIfPresent(accessibilityTraits, forKey: .accessibilityTraits)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
125
MVMCoreUI/Atomic/Extensions/UIAccessibilityTraits+Codable.swift
Normal file
125
MVMCoreUI/Atomic/Extensions/UIAccessibilityTraits+Codable.swift
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
//
|
||||||
|
// UIAccessibilityTraits+Codable.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Scott Pfeil on 6/16/23.
|
||||||
|
// Copyright © 2023 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
extension UIAccessibilityTraits: Codable {
|
||||||
|
private static func trait(from string: String) throws -> UIAccessibilityTraits {
|
||||||
|
switch string {
|
||||||
|
case "none":
|
||||||
|
return .none
|
||||||
|
case "button":
|
||||||
|
return .button
|
||||||
|
case "link":
|
||||||
|
return .link
|
||||||
|
case "image":
|
||||||
|
return .image
|
||||||
|
case "searchField":
|
||||||
|
return .searchField
|
||||||
|
case "keyboardKey":
|
||||||
|
return .keyboardKey
|
||||||
|
case "staticText":
|
||||||
|
return .staticText
|
||||||
|
case "header":
|
||||||
|
return .header
|
||||||
|
case "tabBar":
|
||||||
|
return .tabBar
|
||||||
|
case "summaryElement":
|
||||||
|
return .summaryElement
|
||||||
|
case "selected":
|
||||||
|
return .selected
|
||||||
|
case "notEnabled":
|
||||||
|
return .notEnabled
|
||||||
|
case "adjustable":
|
||||||
|
return .adjustable
|
||||||
|
case "allowsDirectInteraction":
|
||||||
|
return .allowsDirectInteraction
|
||||||
|
case "updatesFrequently":
|
||||||
|
return .updatesFrequently
|
||||||
|
case "causesPageTurn":
|
||||||
|
return .causesPageTurn
|
||||||
|
case "playsSound":
|
||||||
|
return .playsSound
|
||||||
|
case "startsMediaSession":
|
||||||
|
return .startsMediaSession
|
||||||
|
default:
|
||||||
|
throw ModelRegistry.Error.decoderOther(message: "Unsupported accessibility trait: \(string)")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(from decoder: Decoder) throws {
|
||||||
|
var container = try decoder.unkeyedContainer()
|
||||||
|
|
||||||
|
// Iterate and decode each.
|
||||||
|
var accessibilityTrait: UIAccessibilityTraits = []
|
||||||
|
while !container.isAtEnd {
|
||||||
|
let traitString = try container.decode(String.self)
|
||||||
|
let trait = try UIAccessibilityTraits.trait(from: traitString)
|
||||||
|
accessibilityTrait.insert(trait)
|
||||||
|
}
|
||||||
|
self = accessibilityTrait
|
||||||
|
}
|
||||||
|
|
||||||
|
public func encode(to encoder: Encoder) throws {
|
||||||
|
var container = encoder.unkeyedContainer()
|
||||||
|
if self.contains(.none) {
|
||||||
|
try container.encode("none")
|
||||||
|
}
|
||||||
|
if self.contains(.button) {
|
||||||
|
try container.encode("button")
|
||||||
|
}
|
||||||
|
if self.contains(.link) {
|
||||||
|
try container.encode("link")
|
||||||
|
}
|
||||||
|
if self.contains(.image) {
|
||||||
|
try container.encode("image")
|
||||||
|
}
|
||||||
|
if self.contains(.searchField) {
|
||||||
|
try container.encode("searchField")
|
||||||
|
}
|
||||||
|
if self.contains(.keyboardKey) {
|
||||||
|
try container.encode("keyboardKey")
|
||||||
|
}
|
||||||
|
if self.contains(.staticText) {
|
||||||
|
try container.encode("staticText")
|
||||||
|
}
|
||||||
|
if self.contains(.header) {
|
||||||
|
try container.encode("header")
|
||||||
|
}
|
||||||
|
if self.contains(.tabBar) {
|
||||||
|
try container.encode("tabBar")
|
||||||
|
}
|
||||||
|
if self.contains(.summaryElement) {
|
||||||
|
try container.encode("summaryElement")
|
||||||
|
}
|
||||||
|
if self.contains(.selected) {
|
||||||
|
try container.encode("selected")
|
||||||
|
}
|
||||||
|
if self.contains(.notEnabled) {
|
||||||
|
try container.encode("notEnabled")
|
||||||
|
}
|
||||||
|
if self.contains(.adjustable) {
|
||||||
|
try container.encode("adjustable")
|
||||||
|
}
|
||||||
|
if self.contains(.allowsDirectInteraction) {
|
||||||
|
try container.encode("allowsDirectInteraction")
|
||||||
|
}
|
||||||
|
if self.contains(.updatesFrequently) {
|
||||||
|
try container.encode("updatesFrequently")
|
||||||
|
}
|
||||||
|
if self.contains(.causesPageTurn) {
|
||||||
|
try container.encode("causesPageTurn")
|
||||||
|
}
|
||||||
|
if self.contains(.playsSound) {
|
||||||
|
try container.encode("playsSound")
|
||||||
|
}
|
||||||
|
if self.contains(.startsMediaSession) {
|
||||||
|
try container.encode("startsMediaSession")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -7,7 +7,8 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
public class HeadersH1ButtonModel: HeaderModel, MoleculeModelProtocol {
|
public class HeadersH1ButtonModel: HeaderModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -15,6 +16,10 @@ public class HeadersH1ButtonModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
public var headlineBody: HeadlineBodyModel
|
public var headlineBody: HeadlineBodyModel
|
||||||
public var buttons: TwoButtonViewModel
|
public var buttons: TwoButtonViewModel
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headlineBody, buttons]
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -25,6 +30,17 @@ public class HeadersH1ButtonModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Subclass
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public override func setDefaults() {
|
||||||
|
if headlineBody.headline?.accessibilityTraits == nil {
|
||||||
|
headlineBody.headline?.accessibilityTraits = .header
|
||||||
|
}
|
||||||
|
super.setDefaults()
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public class HeadersH1LandingPageHeaderModel: HeaderModel, MoleculeModelProtocol {
|
public class HeadersH1LandingPageHeaderModel: HeaderModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -20,6 +20,10 @@ public class HeadersH1LandingPageHeaderModel: HeaderModel, MoleculeModelProtocol
|
|||||||
public var link: LinkModel
|
public var link: LinkModel
|
||||||
public var buttons: TwoButtonViewModel
|
public var buttons: TwoButtonViewModel
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headline, headline2, subHeadline, body, link, buttons]
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -32,6 +36,17 @@ public class HeadersH1LandingPageHeaderModel: HeaderModel, MoleculeModelProtocol
|
|||||||
self.buttons = buttons
|
self.buttons = buttons
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Subclass
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public override func setDefaults() {
|
||||||
|
if headline.accessibilityTraits == nil {
|
||||||
|
headline.accessibilityTraits = .header
|
||||||
|
}
|
||||||
|
super.setDefaults()
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class HeadersH1NoButtonsBodyTextModel: HeaderModel, MoleculeModelProtocol {
|
public class HeadersH1NoButtonsBodyTextModel: HeaderModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -16,6 +16,10 @@ public class HeadersH1NoButtonsBodyTextModel: HeaderModel, MoleculeModelProtocol
|
|||||||
public static var identifier: String = "headerH1"
|
public static var identifier: String = "headerH1"
|
||||||
public var headlineBody: HeadlineBodyModel
|
public var headlineBody: HeadlineBodyModel
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headlineBody]
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -25,6 +29,17 @@ public class HeadersH1NoButtonsBodyTextModel: HeaderModel, MoleculeModelProtocol
|
|||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Subclass
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public override func setDefaults() {
|
||||||
|
if headlineBody.headline?.accessibilityTraits == nil {
|
||||||
|
headlineBody.headline?.accessibilityTraits = .header
|
||||||
|
}
|
||||||
|
super.setDefaults()
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
public class HeadersH2ButtonsModel: HeaderModel, MoleculeModelProtocol {
|
public class HeadersH2ButtonsModel: HeaderModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -18,6 +18,10 @@ public class HeadersH2ButtonsModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
public var headlineBody: HeadlineBodyModel
|
public var headlineBody: HeadlineBodyModel
|
||||||
public var buttons: TwoButtonViewModel
|
public var buttons: TwoButtonViewModel
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headlineBody, buttons]
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -39,6 +43,9 @@ public class HeadersH2ButtonsModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
if bottomPadding == nil {
|
if bottomPadding == nil {
|
||||||
bottomPadding = Padding.Component.VerticalMarginSpacing
|
bottomPadding = Padding.Component.VerticalMarginSpacing
|
||||||
}
|
}
|
||||||
|
if headlineBody.headline?.accessibilityTraits == nil {
|
||||||
|
headlineBody.headline?.accessibilityTraits = .header
|
||||||
|
}
|
||||||
super.setDefaults()
|
super.setDefaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
public class HeadersH2CaretLinkModel: HeaderModel, MoleculeModelProtocol {
|
public class HeadersH2CaretLinkModel: HeaderModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -15,6 +15,10 @@ public class HeadersH2CaretLinkModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
public var headlineBody: HeadlineBodyModel
|
public var headlineBody: HeadlineBodyModel
|
||||||
public var caretLink: CaretLinkModel
|
public var caretLink: CaretLinkModel
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headlineBody, caretLink]
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -34,6 +38,9 @@ public class HeadersH2CaretLinkModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
if bottomPadding == nil {
|
if bottomPadding == nil {
|
||||||
bottomPadding = Padding.Component.VerticalMarginSpacing
|
bottomPadding = Padding.Component.VerticalMarginSpacing
|
||||||
}
|
}
|
||||||
|
if headlineBody.headline?.accessibilityTraits == nil {
|
||||||
|
headlineBody.headline?.accessibilityTraits = .header
|
||||||
|
}
|
||||||
super.setDefaults()
|
super.setDefaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public class HeadersH2LinkModel: HeaderModel, MoleculeModelProtocol {
|
public class HeadersH2LinkModel: HeaderModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -17,6 +17,10 @@ public class HeadersH2LinkModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
public var headlineBody: HeadlineBodyModel
|
public var headlineBody: HeadlineBodyModel
|
||||||
public var link: LinkModel
|
public var link: LinkModel
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headlineBody, link]
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -38,6 +42,9 @@ public class HeadersH2LinkModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
if bottomPadding == nil {
|
if bottomPadding == nil {
|
||||||
bottomPadding = Padding.Component.VerticalMarginSpacing
|
bottomPadding = Padding.Component.VerticalMarginSpacing
|
||||||
}
|
}
|
||||||
|
if headlineBody.headline?.accessibilityTraits == nil {
|
||||||
|
headlineBody.headline?.accessibilityTraits = .header
|
||||||
|
}
|
||||||
super.setDefaults()
|
super.setDefaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
public class HeadersH2NoButtonsBodyTextModel: HeaderModel, MoleculeModelProtocol {
|
public class HeadersH2NoButtonsBodyTextModel: HeaderModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -17,6 +17,10 @@ public class HeadersH2NoButtonsBodyTextModel: HeaderModel, MoleculeModelProtocol
|
|||||||
public static var identifier: String = "headerH2"
|
public static var identifier: String = "headerH2"
|
||||||
public var headlineBody: HeadlineBodyModel
|
public var headlineBody: HeadlineBodyModel
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headlineBody]
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -33,6 +37,9 @@ public class HeadersH2NoButtonsBodyTextModel: HeaderModel, MoleculeModelProtocol
|
|||||||
if bottomPadding == nil {
|
if bottomPadding == nil {
|
||||||
bottomPadding = Padding.Component.VerticalMarginSpacing
|
bottomPadding = Padding.Component.VerticalMarginSpacing
|
||||||
}
|
}
|
||||||
|
if headlineBody.headline?.accessibilityTraits == nil {
|
||||||
|
headlineBody.headline?.accessibilityTraits = .header
|
||||||
|
}
|
||||||
super.setDefaults()
|
super.setDefaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public class HeadersH2PricingTwoRowsModel: HeaderModel, MoleculeModelProtocol {
|
public class HeadersH2PricingTwoRowsModel: HeaderModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -21,6 +21,10 @@ public class HeadersH2PricingTwoRowsModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
public var body3: LabelModel
|
public var body3: LabelModel
|
||||||
public var subBody3: LabelModel?
|
public var subBody3: LabelModel?
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headline, body, subBody, body2, subBody2, body3, subBody3].compactMap({$0})
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -45,6 +49,9 @@ public class HeadersH2PricingTwoRowsModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
if bottomPadding == nil {
|
if bottomPadding == nil {
|
||||||
bottomPadding = Padding.Component.VerticalMarginSpacing
|
bottomPadding = Padding.Component.VerticalMarginSpacing
|
||||||
}
|
}
|
||||||
|
if headline.accessibilityTraits == nil {
|
||||||
|
headline.accessibilityTraits = .header
|
||||||
|
}
|
||||||
super.setDefaults()
|
super.setDefaults()
|
||||||
subBody?.attributes = [LabelAttributeStrikeThroughModel(0, subBody?.text.count ?? 0)]
|
subBody?.attributes = [LabelAttributeStrikeThroughModel(0, subBody?.text.count ?? 0)]
|
||||||
subBody2?.attributes = [LabelAttributeStrikeThroughModel(0, subBody2?.text.count ?? 0)]
|
subBody2?.attributes = [LabelAttributeStrikeThroughModel(0, subBody2?.text.count ?? 0)]
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
public class HeadersH2TinyButtonModel: HeaderModel, MoleculeModelProtocol {
|
public class HeadersH2TinyButtonModel: HeaderModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -18,6 +18,10 @@ public class HeadersH2TinyButtonModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
public var headlineBody: HeadlineBodyModel
|
public var headlineBody: HeadlineBodyModel
|
||||||
public var button: ButtonModel
|
public var button: ButtonModel
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headlineBody, button]
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -39,6 +43,9 @@ public class HeadersH2TinyButtonModel: HeaderModel, MoleculeModelProtocol {
|
|||||||
if bottomPadding == nil {
|
if bottomPadding == nil {
|
||||||
bottomPadding = Padding.Component.VerticalMarginSpacing
|
bottomPadding = Padding.Component.VerticalMarginSpacing
|
||||||
}
|
}
|
||||||
|
if headlineBody.headline?.accessibilityTraits == nil {
|
||||||
|
headlineBody.headline?.accessibilityTraits = .header
|
||||||
|
}
|
||||||
super.setDefaults()
|
super.setDefaults()
|
||||||
button.style = .secondary
|
button.style = .secondary
|
||||||
button.size = .small
|
button.size = .small
|
||||||
|
|||||||
@ -84,5 +84,6 @@ import Foundation
|
|||||||
}
|
}
|
||||||
|
|
||||||
accessibilityLabel = message
|
accessibilityLabel = message
|
||||||
|
accessibilityTraits.update(with: .header)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
public class ListOneColumnFullWidthTextDividerSubsectionModel: ListItemModel, MoleculeModelProtocol {
|
public class ListOneColumnFullWidthTextDividerSubsectionModel: ListItemModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -18,6 +18,10 @@ public class ListOneColumnFullWidthTextDividerSubsectionModel: ListItemModel, Mo
|
|||||||
public var headline: LabelModel
|
public var headline: LabelModel
|
||||||
public var body: LabelModel?
|
public var body: LabelModel?
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headline, body].compactMap({$0})
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -84,5 +84,6 @@ import Foundation
|
|||||||
}
|
}
|
||||||
|
|
||||||
accessibilityLabel = message
|
accessibilityLabel = message
|
||||||
|
accessibilityTraits.update(with: .header)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
public class ListOneColumnTextWithWhitespaceDividerShortModel: ListItemModel, MoleculeModelProtocol {
|
public class ListOneColumnTextWithWhitespaceDividerShortModel: ListItemModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -18,6 +18,10 @@ public class ListOneColumnTextWithWhitespaceDividerShortModel: ListItemModel, Mo
|
|||||||
public var headline: LabelModel
|
public var headline: LabelModel
|
||||||
public var body: LabelModel?
|
public var body: LabelModel?
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headline, body].compactMap({$0})
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -84,5 +84,6 @@ import Foundation
|
|||||||
}
|
}
|
||||||
|
|
||||||
accessibilityLabel = message
|
accessibilityLabel = message
|
||||||
|
accessibilityTraits.update(with: .header)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
public class ListOneColumnTextWithWhitespaceDividerTallModel: ListItemModel, MoleculeModelProtocol {
|
public class ListOneColumnTextWithWhitespaceDividerTallModel: ListItemModel, MoleculeModelProtocol, ParentMoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -18,6 +18,10 @@ public class ListOneColumnTextWithWhitespaceDividerTallModel: ListItemModel, Mol
|
|||||||
public var headline: LabelModel
|
public var headline: LabelModel
|
||||||
public var body: LabelModel?
|
public var body: LabelModel?
|
||||||
|
|
||||||
|
public var children: [MoleculeModelProtocol] {
|
||||||
|
[headline, body].compactMap({$0})
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Initializer
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -22,6 +22,6 @@ fi
|
|||||||
|
|
||||||
./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/VDS.xcframework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/VDS/1.0/VDS-1.0-Debug-SNAPSHOT.zip
|
./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/VDS.xcframework" BPHV_MobileFirst_IOS/com/vzw/hss/myverizon/VDS/1.0/VDS-1.0-Debug-SNAPSHOT.zip
|
||||||
|
|
||||||
./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/VDSColorTokens.xcframework" GVJV_VDS_Maven/@vds-tokens/ios/VDSColorTokens.1.0.6.xcframework.zip
|
./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/VDSColorTokens.xcframework" GVJV_VDS_Maven/@vds-tokens/ios/VDSColorTokens.2.0.0.xcframework.zip
|
||||||
|
|
||||||
./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/VDSFormControlsTokens.xcframework" GVJV_VDS_Maven/@vds-tokens/ios/VDSFormControlsTokens.1.0.7.xcframework.zip
|
./Scripts/download_framework.sh $ARTIFACTORY_URL "$FRAMEWORKS_DIR/VDSFormControlsTokens.xcframework" GVJV_VDS_Maven/@vds-tokens/ios/VDSFormControlsTokens.1.0.7.xcframework.zip
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user