diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d475e062..8dc2e960 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,9 +22,9 @@ download_artifacts: - bash_shell environment: name: oneartifactory - url: https://oneartifactoryprod.verizon.com/artifactory + url: https://oneartifactoryci.verizon.com/artifactory variables: - ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory + ARTIFACTORY_URL: https://oneartifactoryci.verizon.com/artifactory build_project: stage: build @@ -47,9 +47,9 @@ deploy_snapshot: - bash_shell environment: name: oneartifactory - url: https://oneartifactoryprod.verizon.com/artifactory + url: https://oneartifactoryci.verizon.com/artifactory variables: - ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory + ARTIFACTORY_URL: https://oneartifactoryci.verizon.com/artifactory #promote_snapshot: # stage: go live @@ -65,9 +65,9 @@ deploy_snapshot: # - bash_shell # environment: # name: oneartifactory -# url: https://oneartifactoryprod.verizon.com/artifactory +# url: https://oneartifactoryci.verizon.com/artifactory # variables: -# ARTIFACTORY_URL: https://oneartifactoryprod.verizon.com/artifactory +# ARTIFACTORY_URL: https://oneartifactoryci.verizon.com/artifactory # #create_version_tag: # stage: tag diff --git a/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabelModel.swift b/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabelModel.swift index 858984b0..58f398b6 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabelModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/CheckboxLabelModel.swift @@ -15,8 +15,8 @@ public enum CheckboxPosition: String, Codable { case bottom } -@objcMembers public class CheckboxLabelModel: MoleculeModelProtocol { - public static var identifier: String = "checkboxLabel" +@objcMembers open class CheckboxLabelModel: MoleculeModelProtocol { + open class var identifier: String { "checkboxLabel" } public var moleculeName: String = CheckboxLabelModel.identifier public var backgroundColor: Color? public var checkboxAlignment: CheckboxPosition? diff --git a/MVMCoreUI/Atomic/Atoms/Views/Label/LabelModel.swift b/MVMCoreUI/Atomic/Atoms/Views/Label/LabelModel.swift index 10e6a4e5..d1995d19 100644 --- a/MVMCoreUI/Atomic/Atoms/Views/Label/LabelModel.swift +++ b/MVMCoreUI/Atomic/Atoms/Views/Label/LabelModel.swift @@ -7,12 +7,13 @@ // -@objcMembers open class LabelModel: MoleculeModelProtocol { +@objcMembers open class LabelModel: MoleculeModelProtocol, Identifiable { //-------------------------------------------------- // MARK: - Properties //-------------------------------------------------- open class var identifier: String { "label" } + public var id: String public var backgroundColor: Color? public var text: String public var accessibilityText: String? @@ -34,6 +35,7 @@ private enum CodingKeys: String, CodingKey { case moleculeName + case id case text case accessibilityText case textColor @@ -58,7 +60,8 @@ // MARK: - Initializer //-------------------------------------------------- - public init(text: String) { + public init(id: String = UUID().uuidString, text: String) { + self.id = id self.text = text } @@ -78,6 +81,7 @@ required public init(from decoder: Decoder) throws { let typeContainer = try decoder.container(keyedBy: CodingKeys.self) + id = try typeContainer.decodeIfPresent(String.self, forKey: .id) ?? UUID().uuidString text = try typeContainer.decode(String.self, forKey: .text) accessibilityText = try typeContainer.decodeIfPresent(String.self, forKey: .accessibilityText) textColor = try typeContainer.decodeIfPresent(Color.self, forKey: .textColor) @@ -102,6 +106,7 @@ open func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encodeIfPresent(moleculeName, forKey: .moleculeName) + try container.encodeIfPresent(id, forKey: .id) try container.encode(text, forKey: .text) try container.encodeIfPresent(accessibilityText, forKey: .accessibilityText) try container.encodeIfPresent(textColor, forKey: .textColor) diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyTextModel.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyTextModel.swift index 288b0591..94be5a53 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyTextModel.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/OneColumn/ListOneColumnFullWidthTextBodyTextModel.swift @@ -9,7 +9,7 @@ import Foundation -public class ListOneColumnFullWidthTextBodyTextModel: ListItemModel, MoleculeModelProtocol { +public class ListOneColumnFullWidthTextBodyTextModel: ListItemModel, MoleculeModelProtocol, ParentMoleculeModelProtocol { //-------------------------------------------------- // MARK: - Properties //-------------------------------------------------- @@ -35,6 +35,10 @@ public class ListOneColumnFullWidthTextBodyTextModel: ListItemModel, MoleculeMod headlineBody.style = .item } + public var children: [MoleculeModelProtocol] { + return [headlineBody] + } + //-------------------------------------------------- // MARK: - Keys //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableButtonAllTextAndLinksModel.swift b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableButtonAllTextAndLinksModel.swift index db093a9a..21a4b08c 100644 --- a/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableButtonAllTextAndLinksModel.swift +++ b/MVMCoreUI/Atomic/Molecules/DesignedComponents/List/RightVariable/ListRightVariableButtonAllTextAndLinksModel.swift @@ -7,7 +7,7 @@ // -public class ListRightVariableButtonAllTextAndLinksModel: ListItemModel, MoleculeModelProtocol { +public class ListRightVariableButtonAllTextAndLinksModel: ListItemModel, MoleculeModelProtocol, ParentMoleculeModelProtocol { //-------------------------------------------------- // MARK: - Properties //-------------------------------------------------- @@ -36,6 +36,10 @@ public class ListRightVariableButtonAllTextAndLinksModel: ListItemModel, Molecul self.button.style = .secondary } + public var children: [MoleculeModelProtocol] { + return [button, eyebrowHeadlineBodyLink] + } + //-------------------------------------------------- // MARK: - Keys //-------------------------------------------------- diff --git a/MVMCoreUI/Atomic/Molecules/VerticalCombinationViews/HeadlineBodyModel.swift b/MVMCoreUI/Atomic/Molecules/VerticalCombinationViews/HeadlineBodyModel.swift index a3452e7b..20df223a 100644 --- a/MVMCoreUI/Atomic/Molecules/VerticalCombinationViews/HeadlineBodyModel.swift +++ b/MVMCoreUI/Atomic/Molecules/VerticalCombinationViews/HeadlineBodyModel.swift @@ -47,6 +47,11 @@ self.body = body } + public init(headline: LabelModel, body: LabelModel) { + self.headline = headline + self.body = body + } + //----------------------------------------------------- // MARK: - Codec //----------------------------------------------------- diff --git a/MVMCoreUI/BaseClasses/Control.swift b/MVMCoreUI/BaseClasses/Control.swift index 865e3a8e..91cee30f 100644 --- a/MVMCoreUI/BaseClasses/Control.swift +++ b/MVMCoreUI/BaseClasses/Control.swift @@ -9,7 +9,7 @@ import UIKit -@objcMembers open class Control: UIControl, MoleculeViewProtocol { +open class Control: UIControl, MoleculeViewProtocol { //-------------------------------------------------- // MARK: - Properties //-------------------------------------------------- diff --git a/Scripts/download_dependencies.sh b/Scripts/download_dependencies.sh index 2288409c..ec05cfd8 100755 --- a/Scripts/download_dependencies.sh +++ b/Scripts/download_dependencies.sh @@ -8,7 +8,7 @@ # Create new aggregate builds if [ -z $ARTIFACTORY_URL ]; then - ARTIFACTORY_URL="https://oneartifactoryprod.verizon.com/artifactory" + ARTIFACTORY_URL="https://oneartifactoryci.verizon.com/artifactory" fi BUILD_DIR=$(xcodebuild -showBuildSettings -project ./MVMCoreUI.xcodeproj | grep -w -o 'BUILD_DIR = .*' | cut -d\ -f3-) diff --git a/Scripts/upload_core_ui_frameworks.sh b/Scripts/upload_core_ui_frameworks.sh index a8cf475b..b6092993 100755 --- a/Scripts/upload_core_ui_frameworks.sh +++ b/Scripts/upload_core_ui_frameworks.sh @@ -17,7 +17,7 @@ fi # Create new aggregate builds if [ -z $ARTIFACTORY_URL ]; then - ARTIFACTORY_URL="https://oneartifactoryprod.verizon.com/artifactory" + ARTIFACTORY_URL="https://oneartifactoryci.verizon.com/artifactory" fi # Upload