added a public initializer
Signed-off-by: Matt Bruce <matt.bruce@verizon.com>
This commit is contained in:
parent
b03af42d39
commit
305372fe04
@ -5,7 +5,7 @@
|
|||||||
// Created by Suresh, Kamlesh on 7/9/20.
|
// Created by Suresh, Kamlesh on 7/9/20.
|
||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class ActionAlertModel: ActionModelProtocol {
|
@objcMembers public class ActionAlertModel: ActionModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -17,4 +17,12 @@
|
|||||||
public var alert: AlertModel
|
public var alert: AlertModel
|
||||||
public var extraParameters: JSONValueDictionary?
|
public var extraParameters: JSONValueDictionary?
|
||||||
public var analyticsData: JSONValueDictionary?
|
public var analyticsData: JSONValueDictionary?
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(alert: AlertModel) {
|
||||||
|
self.alert = alert
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class TagModel: MoleculeModelProtocol {
|
@objcMembers public class TagModel: MoleculeModelProtocol {
|
||||||
public static var identifier: String = "tag"
|
public static var identifier: String = "tag"
|
||||||
@ -27,6 +28,14 @@ import Foundation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(label: LabelModel) {
|
||||||
|
self.label = label
|
||||||
|
}
|
||||||
|
|
||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
label = try typeContainer.decode(LabelModel.self, forKey: .label)
|
label = try typeContainer.decode(LabelModel.self, forKey: .label)
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class TagsModel: MoleculeModelProtocol {
|
@objcMembers public class TagsModel: MoleculeModelProtocol {
|
||||||
public static var identifier: String = "tags"
|
public static var identifier: String = "tags"
|
||||||
@ -19,6 +20,14 @@ import Foundation
|
|||||||
case tags
|
case tags
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(with tags: [TagModel]) {
|
||||||
|
self.tags = tags
|
||||||
|
}
|
||||||
|
|
||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
tags = try typeContainer.decode([TagModel].self, forKey: .tags)
|
tags = try typeContainer.decode([TagModel].self, forKey: .tags)
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
// Created by Lekshmi S on 07/09/20.
|
// Created by Lekshmi S on 07/09/20.
|
||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
open class HeartModel: MoleculeModelProtocol, EnableableModelProtocol {
|
open class HeartModel: MoleculeModelProtocol, EnableableModelProtocol {
|
||||||
|
|
||||||
@ -38,6 +38,11 @@ open class HeartModel: MoleculeModelProtocol, EnableableModelProtocol {
|
|||||||
case readOnly
|
case readOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
public init() { }
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Codec
|
// MARK: - Codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
// Created by Dhamodaram Nandi on 31/03/20.
|
// Created by Dhamodaram Nandi on 31/03/20.
|
||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class RadioBoxModel: MoleculeModelProtocol, EnableableModelProtocol {
|
@objcMembers public class RadioBoxModel: MoleculeModelProtocol, EnableableModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -43,6 +44,14 @@
|
|||||||
case readOnly
|
case readOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(text: String) {
|
||||||
|
self.text = text
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Codec
|
// MARK: - Codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
// Created by Dhamodaram Nandi on 31/03/20.
|
// Created by Dhamodaram Nandi on 31/03/20.
|
||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class RadioBoxesModel: MoleculeModelProtocol, FormFieldProtocol {
|
@objcMembers public class RadioBoxesModel: MoleculeModelProtocol, FormFieldProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -52,6 +53,14 @@
|
|||||||
case groupName
|
case groupName
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(with boxes: [RadioBoxModel]){
|
||||||
|
self.boxes = boxes
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Codec
|
// MARK: - Codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
// Created by Scott Pfeil on 4/17/20.
|
// Created by Scott Pfeil on 4/17/20.
|
||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class RadioSwatchModel: MoleculeModelProtocol, EnableableModelProtocol {
|
@objcMembers public class RadioSwatchModel: MoleculeModelProtocol, EnableableModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -42,6 +42,12 @@
|
|||||||
case readOnly
|
case readOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init() {}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Codec
|
// MARK: - Codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
// Created by Lekshmi S on 31/03/20.
|
// Created by Lekshmi S on 31/03/20.
|
||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class RadioSwatchesModel: MoleculeModelProtocol, FormFieldProtocol {
|
@objcMembers public class RadioSwatchesModel: MoleculeModelProtocol, FormFieldProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -50,6 +50,14 @@
|
|||||||
case readOnly
|
case readOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(with swatches: [RadioSwatchModel]){
|
||||||
|
self.swatches = swatches
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Codec
|
// MARK: - Codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class CaretViewModel: MoleculeModelProtocol {
|
@objcMembers public class CaretViewModel: MoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -38,6 +38,12 @@ import Foundation
|
|||||||
case inverted
|
case inverted
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init() {}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Codec
|
// MARK: - Codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
public enum CheckboxPosition: String, Codable {
|
public enum CheckboxPosition: String, Codable {
|
||||||
case center
|
case center
|
||||||
@ -16,9 +17,18 @@ public enum CheckboxPosition: String, Codable {
|
|||||||
|
|
||||||
@objcMembers public class CheckboxLabelModel: MoleculeModelProtocol {
|
@objcMembers public class CheckboxLabelModel: MoleculeModelProtocol {
|
||||||
public static var identifier: String = "checkboxLabel"
|
public static var identifier: String = "checkboxLabel"
|
||||||
public var moleculeName: String
|
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var checkboxAlignment: CheckboxPosition?
|
public var checkboxAlignment: CheckboxPosition?
|
||||||
public var checkbox: CheckboxModel
|
public var checkbox: CheckboxModel
|
||||||
public var label: LabelModel
|
public var label: LabelModel
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(checkbox: CheckboxModel, label: LabelModel) {
|
||||||
|
self.checkbox = checkbox
|
||||||
|
self.label = label
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class DashLineModel: MoleculeModelProtocol {
|
@objcMembers public class DashLineModel: MoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -43,6 +43,12 @@ import Foundation
|
|||||||
case isHidden
|
case isHidden
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init() {}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - codec
|
// MARK: - codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
open class LoadingSpinnerModel: MoleculeModelProtocol {
|
open class LoadingSpinnerModel: MoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -32,6 +32,12 @@ open class LoadingSpinnerModel: MoleculeModelProtocol {
|
|||||||
case diameter
|
case diameter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init() {}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Codec
|
// MARK: - Codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
// Created by Lekshmi S on 15/09/20.
|
// Created by Lekshmi S on 15/09/20.
|
||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
open class StarModel: MoleculeModelProtocol {
|
open class StarModel: MoleculeModelProtocol {
|
||||||
|
|
||||||
@ -30,6 +31,12 @@ open class StarModel: MoleculeModelProtocol {
|
|||||||
case size
|
case size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init() {}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Codec
|
// MARK: - Codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
// Created by Lekshmi S on 21/09/20.
|
// Created by Lekshmi S on 21/09/20.
|
||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class StarsModel: MoleculeModelProtocol {
|
@objcMembers public class StarsModel: MoleculeModelProtocol {
|
||||||
|
|
||||||
@ -34,6 +35,14 @@
|
|||||||
case size
|
case size
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(with stars: [StarModel]) {
|
||||||
|
self.stars = stars
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Codec
|
// MARK: - Codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -7,10 +7,10 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class WebViewModel: MoleculeModelProtocol {
|
@objcMembers public class WebViewModel: MoleculeModelProtocol {
|
||||||
public static var identifier: String = "webview"
|
public static var identifier: String = "webview"
|
||||||
public var moleculeName: String = WebViewModel.identifier
|
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var url: URL?
|
public var url: URL?
|
||||||
public var htmlString: String?
|
public var htmlString: String?
|
||||||
@ -30,6 +30,12 @@ import Foundation
|
|||||||
case borderColor
|
case borderColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init() {}
|
||||||
|
|
||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||||
|
|||||||
@ -23,7 +23,7 @@ public class ListThreeColumnInternationalDataDividerModel: ListItemModel, Molecu
|
|||||||
// MARK: - Initializers
|
// MARK: - Initializers
|
||||||
//------------------------------------------------------
|
//------------------------------------------------------
|
||||||
|
|
||||||
public init (leftLabel: LabelModel, centerLabel: LabelModel, rightLabel: LabelModel) {
|
public init(leftLabel: LabelModel, centerLabel: LabelModel, rightLabel: LabelModel) {
|
||||||
self.leftLabel = leftLabel
|
self.leftLabel = leftLabel
|
||||||
self.centerLabel = centerLabel
|
self.centerLabel = centerLabel
|
||||||
self.rightLabel = rightLabel
|
self.rightLabel = rightLabel
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class RadioButtonLabelModel: MoleculeModelProtocol {
|
@objcMembers public class RadioButtonLabelModel: MoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -16,7 +16,16 @@ import Foundation
|
|||||||
|
|
||||||
public static var identifier: String = "radioButtonLabel"
|
public static var identifier: String = "radioButtonLabel"
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var moleculeName: String
|
|
||||||
public var radioButton: RadioButtonModel
|
public var radioButton: RadioButtonModel
|
||||||
public var label: LabelModel
|
public var label: LabelModel
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(radioButton: RadioButtonModel, label: LabelModel) {
|
||||||
|
self.radioButton = radioButton
|
||||||
|
self.label = label
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,6 +42,15 @@ class AccordionListItemModel: MoleculeListItemModel {
|
|||||||
hideArrow = true
|
hideArrow = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(with moleculeModel: MoleculeModelProtocol, molecules:[ListItemModelProtocol & MoleculeModelProtocol]) {
|
||||||
|
self.molecules = molecules
|
||||||
|
super.init(with: moleculeModel)
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Codec
|
// MARK: - Codec
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -14,4 +14,14 @@ public class ActionDetailWithImageModel: MoleculeModelProtocol {
|
|||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var headlineBodyButton: HeadlineBodyButtonModel
|
public var headlineBodyButton: HeadlineBodyButtonModel
|
||||||
public var image: ImageViewModel
|
public var image: ImageViewModel
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(headlineBodyButton: HeadlineBodyButtonModel, image: ImageViewModel) {
|
||||||
|
self.headlineBodyButton = headlineBodyButton
|
||||||
|
self.image = image
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
// Created by Scott Pfeil on 1/22/20.
|
// Created by Scott Pfeil on 1/22/20.
|
||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
public class HeadlineBodyButtonModel: MoleculeModelProtocol {
|
public class HeadlineBodyButtonModel: MoleculeModelProtocol {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -20,6 +20,16 @@ public class HeadlineBodyButtonModel: MoleculeModelProtocol {
|
|||||||
public var button: ButtonModel
|
public var button: ButtonModel
|
||||||
public var buttonHeadlinePadding: CGFloat
|
public var buttonHeadlinePadding: CGFloat
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(headlineBody: HeadlineBodyModel, button: ButtonModel, buttonHeadlinePadding: CGFloat) {
|
||||||
|
self.headlineBody = headlineBody
|
||||||
|
self.button = button
|
||||||
|
self.buttonHeadlinePadding = buttonHeadlinePadding
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Method
|
// MARK: - Method
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -20,6 +20,15 @@ import Foundation
|
|||||||
case list
|
case list
|
||||||
case numberColor
|
case numberColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(numberColor: Color, molecules: [StackItemModelProtocol & MoleculeModelProtocol], axis: NSLayoutConstraint.Axis? = nil, spacing: CGFloat? = nil) {
|
||||||
|
self.numberColor = numberColor
|
||||||
|
super.init(molecules: molecules, axis: axis, spacing: spacing)
|
||||||
|
}
|
||||||
|
|
||||||
// Numbered list model comes in the from of list = [MoleculeModelProtocol]
|
// Numbered list model comes in the from of list = [MoleculeModelProtocol]
|
||||||
public required init(from decoder: Decoder) throws {
|
public required init(from decoder: Decoder) throws {
|
||||||
|
|||||||
@ -22,7 +22,17 @@ import Foundation
|
|||||||
case bulletChar
|
case bulletChar
|
||||||
case bulletColor
|
case bulletColor
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(bulletChar: String, bulletColor: Color, molecules: [StackItemModelProtocol & MoleculeModelProtocol], axis: NSLayoutConstraint.Axis? = nil, spacing: CGFloat? = nil) {
|
||||||
|
self.bulletChar = bulletChar
|
||||||
|
self.bulletColor = bulletColor
|
||||||
|
super.init(molecules: molecules, axis: axis, spacing: spacing)
|
||||||
|
}
|
||||||
|
|
||||||
// Numbered list model comes in the from of list = [MoleculeModelProtocol]
|
// Numbered list model comes in the from of list = [MoleculeModelProtocol]
|
||||||
public required init(from decoder: Decoder) throws {
|
public required init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
// Created by Scott Pfeil on 10/8/20.
|
// Created by Scott Pfeil on 10/8/20.
|
||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
import MVMCore
|
||||||
|
|
||||||
@objcMembers public class ModalSectionListTemplateModel: SectionListTemplateModel {
|
@objcMembers public class ModalSectionListTemplateModel: SectionListTemplateModel {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -15,6 +15,14 @@
|
|||||||
public override class var identifier: String { "modalSectionList" }
|
public override class var identifier: String { "modalSectionList" }
|
||||||
public var closeAction: ActionModelProtocol?
|
public var closeAction: ActionModelProtocol?
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public override init(with sections: [SectionModel], pageType: String, screenHeading: String?, molecules: [ListItemModelProtocol & MoleculeModelProtocol]) {
|
||||||
|
super.init(with: sections, pageType: pageType, screenHeading: screenHeading, molecules: molecules)
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -15,6 +15,14 @@
|
|||||||
public override class var identifier: String { "modalStack" }
|
public override class var identifier: String { "modalStack" }
|
||||||
public var closeAction: ActionModelProtocol?
|
public var closeAction: ActionModelProtocol?
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public override init(pageType: String, moleculeStack: StackModel) {
|
||||||
|
super.init(pageType: pageType, moleculeStack: moleculeStack)
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -24,7 +32,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Init
|
// MARK: - Initializer
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
|
|||||||
@ -19,6 +19,14 @@ public protocol SectionListHeaderFooterModel { }
|
|||||||
public var footer: (SectionListHeaderFooterModel & MoleculeModelProtocol)?
|
public var footer: (SectionListHeaderFooterModel & MoleculeModelProtocol)?
|
||||||
public var rows: [ListItemModelProtocol & MoleculeModelProtocol]
|
public var rows: [ListItemModelProtocol & MoleculeModelProtocol]
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(with rows: [ListItemModelProtocol & MoleculeModelProtocol]) {
|
||||||
|
self.rows = rows
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -65,6 +73,15 @@ public protocol SectionListHeaderFooterModel { }
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(with sections: [SectionModel], pageType: String, screenHeading: String?, molecules: [ListItemModelProtocol & MoleculeModelProtocol]) {
|
||||||
|
self.sections = sections
|
||||||
|
super.init(pageType: pageType, screenHeading: screenHeading, molecules: molecules)
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Keys
|
// MARK: - Keys
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -19,6 +19,14 @@ public class RuleAllValueChangedModel: RulesProtocol {
|
|||||||
public var errorMessage: [String: String]?
|
public var errorMessage: [String: String]?
|
||||||
public var fields: [String]
|
public var fields: [String]
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(with fields: [String]) {
|
||||||
|
self.fields = fields
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Validation
|
// MARK: - Validation
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -19,6 +19,14 @@ public class RuleAnyRequiredModel: RuleAnyModelProtocol {
|
|||||||
public var fields: [String]
|
public var fields: [String]
|
||||||
public var errorMessage: [String: String]?
|
public var errorMessage: [String: String]?
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(fields: [String]) {
|
||||||
|
self.fields = fields
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Methods
|
// MARK: - Methods
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -19,6 +19,14 @@ public class RuleAnyValueChangedModel: RuleAnyModelProtocol {
|
|||||||
public var errorMessage: [String: String]?
|
public var errorMessage: [String: String]?
|
||||||
public var fields: [String]
|
public var fields: [String]
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(fields: [String]) {
|
||||||
|
self.fields = fields
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Validation
|
// MARK: - Validation
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -20,6 +20,14 @@ public class RuleEqualsIgnoreCaseModel: RuleCompareModelProtocol {
|
|||||||
public var fields: [String]
|
public var fields: [String]
|
||||||
public var errorMessage: [String: String]?
|
public var errorMessage: [String: String]?
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(fields: [String]) {
|
||||||
|
self.fields = fields
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Validation
|
// MARK: - Validation
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -19,6 +19,14 @@ public class RuleEqualsModel: RuleCompareModelProtocol {
|
|||||||
public var fields: [String]
|
public var fields: [String]
|
||||||
public var errorMessage: [String: String]?
|
public var errorMessage: [String: String]?
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(fields: [String]) {
|
||||||
|
self.fields = fields
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Validation
|
// MARK: - Validation
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -18,6 +18,15 @@ public class RuleRegexModel: RulesProtocol {
|
|||||||
public var regex: String
|
public var regex: String
|
||||||
public var errorMessage: [String: String]?
|
public var errorMessage: [String: String]?
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(fields: [String], regex: String) {
|
||||||
|
self.fields = fields
|
||||||
|
self.regex = regex
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -20,6 +20,14 @@ public class RuleRequiredModel: RulesProtocol {
|
|||||||
public var errorMessage: [String: String]?
|
public var errorMessage: [String: String]?
|
||||||
public var fields: [String]
|
public var fields: [String]
|
||||||
|
|
||||||
|
//--------------------------------------------------
|
||||||
|
// MARK: - Initializer
|
||||||
|
//--------------------------------------------------
|
||||||
|
|
||||||
|
public init(fields: [String]) {
|
||||||
|
self.fields = fields
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Validation
|
// MARK: - Validation
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user