This commit is contained in:
Kevin G Christiano 2020-05-28 10:55:45 -04:00
parent 20b42ce91c
commit e7b6028321
18 changed files with 336 additions and 62 deletions

View File

@ -7,16 +7,21 @@
// //
import Foundation import Foundation
@objcMembers open class ListOneColumnFullWidthTextDividerSubsection: TableViewCell { @objcMembers open class ListOneColumnFullWidthTextDividerSubsection: TableViewCell {
//----------------------------------------------------- //-----------------------------------------------------
// MARK: - Outlets // MARK: - Outlets
//----------------------------------------------------- //-----------------------------------------------------
public var stack: Stack<StackModel> public var stack: Stack<StackModel>
public let headline = Label.createLabelBoldBodySmall(true) public let headline = Label.createLabelBoldBodySmall(true)
public let body = Label.createLabelRegularBodySmall(true) public let body = Label.createLabelRegularBodySmall(true)
//--------------------------------------------------
// MARK: - Initializers // MARK: - Initializers
//--------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: headline, model: StackItemModel(horizontalAlignment: .leading)), stack = Stack<StackModel>.createStack(with: [(view: headline, model: StackItemModel(horizontalAlignment: .leading)),
(view: body, model: StackItemModel(spacing: 0, horizontalAlignment: .leading))], (view: body, model: StackItemModel(spacing: 0, horizontalAlignment: .leading))],
@ -29,17 +34,24 @@ import Foundation
} }
//----------------------------------------------------- //-----------------------------------------------------
// MARK: - View Lifecycle // MARK: - Lifecycle
//----------------------------------------------------- //-----------------------------------------------------
override open func setupView() { override open func setupView() {
super.setupView() super.setupView()
addMolecule(stack) addMolecule(stack)
stack.restack() stack.restack()
} }
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { //--------------------------------------------------
// MARK: - MoleculeViewProtocol
//--------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListOneColumnFullWidthTextDividerSubsectionModel else { return } guard let model = model as? ListOneColumnFullWidthTextDividerSubsectionModel else { return }
headline.set(with: model.headline, delegateObject, additionalData) headline.set(with: model.headline, delegateObject, additionalData)
body.set(with: model.body, delegateObject, additionalData) body.set(with: model.body, delegateObject, additionalData)
} }

View File

@ -8,29 +8,49 @@
import Foundation import Foundation
public class ListOneColumnFullWidthTextDividerSubsectionModel: ListItemModel, MoleculeModelProtocol { public class ListOneColumnFullWidthTextDividerSubsectionModel: ListItemModel, MoleculeModelProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
public static var identifier: String = "list1CTxtDiv3" public static var identifier: String = "list1CTxtDiv3"
public var headline: LabelModel public var headline: LabelModel
public var body: LabelModel public var body: LabelModel
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(headline: LabelModel, body: LabelModel) { public init(headline: LabelModel, body: LabelModel) {
self.headline = headline self.headline = headline
self.body = body self.body = body
super.init() super.init()
} }
/// Defaults to set //--------------------------------------------------
// MARK: - Method
//--------------------------------------------------
override public func setDefaults() { override public func setDefaults() {
super.setDefaults() super.setDefaults()
style = "tallDivider" style = "tallDivider"
} }
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case headline case headline
case body case body
} }
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------
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)
headline = try typeContainer.decode(LabelModel.self, forKey: .headline) headline = try typeContainer.decode(LabelModel.self, forKey: .headline)

View File

@ -7,16 +7,21 @@
// //
import Foundation import Foundation
@objcMembers open class ListOneColumnTextWithWhitespaceDividerShort: TableViewCell { @objcMembers open class ListOneColumnTextWithWhitespaceDividerShort: TableViewCell {
//----------------------------------------------------- //-----------------------------------------------------
// MARK: - Outlets // MARK: - Outlets
//----------------------------------------------------- //-----------------------------------------------------
public var stack: Stack<StackModel> public var stack: Stack<StackModel>
public let headline = Label.createLabelBoldTitleMedium(true) public let headline = Label.createLabelBoldTitleMedium(true)
public let body = Label.createLabelRegularBodySmall(true) public let body = Label.createLabelRegularBodySmall(true)
//--------------------------------------------------
// MARK: - Initializers // MARK: - Initializers
//--------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: headline, model: StackItemModel(horizontalAlignment: .leading)), stack = Stack<StackModel>.createStack(with: [(view: headline, model: StackItemModel(horizontalAlignment: .leading)),
(view: body, model: StackItemModel(spacing: 0, horizontalAlignment: .leading))], (view: body, model: StackItemModel(spacing: 0, horizontalAlignment: .leading))],
@ -29,17 +34,24 @@ import Foundation
} }
//----------------------------------------------------- //-----------------------------------------------------
// MARK: - View Lifecycle // MARK: - Lifecycle
//----------------------------------------------------- //-----------------------------------------------------
override open func setupView() { override open func setupView() {
super.setupView() super.setupView()
addMolecule(stack) addMolecule(stack)
stack.restack() stack.restack()
} }
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { //--------------------------------------------------
// MARK: - MoleculeViewProtocol
//--------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListOneColumnTextWithWhitespaceDividerShortModel else { return } guard let model = model as? ListOneColumnTextWithWhitespaceDividerShortModel else { return }
headline.set(with: model.headline, delegateObject, additionalData) headline.set(with: model.headline, delegateObject, additionalData)
body.set(with: model.body, delegateObject, additionalData) body.set(with: model.body, delegateObject, additionalData)
} }

View File

@ -8,29 +8,49 @@
import Foundation import Foundation
public class ListOneColumnTextWithWhitespaceDividerShortModel: ListItemModel, MoleculeModelProtocol { public class ListOneColumnTextWithWhitespaceDividerShortModel: ListItemModel, MoleculeModelProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
public static var identifier: String = "list1CTxtDiv1" public static var identifier: String = "list1CTxtDiv1"
public var headline: LabelModel public var headline: LabelModel
public var body: LabelModel public var body: LabelModel
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(headline: LabelModel, body: LabelModel) { public init(headline: LabelModel, body: LabelModel) {
self.headline = headline self.headline = headline
self.body = body self.body = body
super.init() super.init()
} }
/// Defaults to set //--------------------------------------------------
// MARK: - Method
//--------------------------------------------------
override public func setDefaults() { override public func setDefaults() {
super.setDefaults() super.setDefaults()
style = "shortDivider" style = "shortDivider"
} }
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case headline case headline
case body case body
} }
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------
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)
headline = try typeContainer.decode(LabelModel.self, forKey: .headline) headline = try typeContainer.decode(LabelModel.self, forKey: .headline)

View File

@ -7,16 +7,21 @@
// //
import Foundation import Foundation
@objcMembers open class ListOneColumnTextWithWhitespaceDividerTall: TableViewCell { @objcMembers open class ListOneColumnTextWithWhitespaceDividerTall: TableViewCell {
//----------------------------------------------------- //-----------------------------------------------------
// MARK: - Outlets // MARK: - Outlets
//----------------------------------------------------- //-----------------------------------------------------
public var stack: Stack<StackModel> public var stack: Stack<StackModel>
public let headline = Label.createLabelBoldTitleMedium(true) public let headline = Label.createLabelBoldTitleMedium(true)
public let body = Label.createLabelRegularBodySmall(true) public let body = Label.createLabelRegularBodySmall(true)
//--------------------------------------------------
// MARK: - Initializers // MARK: - Initializers
//--------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: headline, model: StackItemModel(horizontalAlignment: .leading)), stack = Stack<StackModel>.createStack(with: [(view: headline, model: StackItemModel(horizontalAlignment: .leading)),
(view: body, model: StackItemModel(spacing: 0, horizontalAlignment: .leading))], (view: body, model: StackItemModel(spacing: 0, horizontalAlignment: .leading))],
@ -37,9 +42,15 @@ import Foundation
stack.restack() stack.restack()
} }
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { //--------------------------------------------------
// MARK: - MoleculeViewProtocol
//--------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListOneColumnTextWithWhitespaceDividerTallModel else { return } guard let model = model as? ListOneColumnTextWithWhitespaceDividerTallModel else { return }
headline.set(with: model.headline, delegateObject, additionalData) headline.set(with: model.headline, delegateObject, additionalData)
body.set(with: model.body, delegateObject, additionalData) body.set(with: model.body, delegateObject, additionalData)
} }

View File

@ -8,29 +8,49 @@
import Foundation import Foundation
public class ListOneColumnTextWithWhitespaceDividerTallModel: ListItemModel, MoleculeModelProtocol { public class ListOneColumnTextWithWhitespaceDividerTallModel: ListItemModel, MoleculeModelProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
public static var identifier: String = "list1CTxtDiv2" public static var identifier: String = "list1CTxtDiv2"
public var headline: LabelModel public var headline: LabelModel
public var body: LabelModel public var body: LabelModel
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(headline: LabelModel, body: LabelModel) { public init(headline: LabelModel, body: LabelModel) {
self.headline = headline self.headline = headline
self.body = body self.body = body
super.init() super.init()
} }
/// Defaults to set //--------------------------------------------------
// MARK: - Method
//--------------------------------------------------
override public func setDefaults() { override public func setDefaults() {
super.setDefaults() super.setDefaults()
style = "tallDivider" style = "tallDivider"
} }
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case headline case headline
case body case body
} }
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------
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)
headline = try typeContainer.decode(LabelModel.self, forKey: .headline) headline = try typeContainer.decode(LabelModel.self, forKey: .headline)

View File

@ -7,16 +7,24 @@
// //
import Foundation import Foundation
@objcMembers open class ListThreeColumnBillChangesDivider: TableViewCell { @objcMembers open class ListThreeColumnBillChangesDivider: TableViewCell {
//-----------------------------------------------------
// MARK: - Outlets
//-----------------------------------------------------
public let leftLabel = Label.createLabelBoldBodySmall(true) public let leftLabel = Label.createLabelBoldBodySmall(true)
public let centerLabel = Label.createLabelBoldBodySmall(true) public let centerLabel = Label.createLabelBoldBodySmall(true)
public let rightLabel = Label.createLabelBoldBodySmall(true) public let rightLabel = Label.createLabelBoldBodySmall(true)
var stack: Stack<StackModel> var stack: Stack<StackModel>
//-----------------------------------------------------
// MARK: - Initializers // MARK: - Initializers
//-----------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 44, horizontalAlignment: .leading)), stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 44, horizontalAlignment: .leading)),
(view: centerLabel, model: StackItemModel(percent: 33, horizontalAlignment: .leading)), (view: centerLabel, model: StackItemModel(percent: 33, horizontalAlignment: .leading)),
(view: rightLabel, model: StackItemModel(percent: 23, horizontalAlignment: .leading))], (view: rightLabel, model: StackItemModel(percent: 23, horizontalAlignment: .leading))],
axis: .horizontal) axis: .horizontal)
@ -27,17 +35,25 @@ import Foundation
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
//-----------------------------------------------------
// MARK: - MFViewProtocol // MARK: - MFViewProtocol
//-----------------------------------------------------
open override func setupView() { open override func setupView() {
super.setupView() super.setupView()
addMolecule(stack) addMolecule(stack)
stack.restack() stack.restack()
} }
//-----------------------------------------------------
// MARK: - ModelMoleculeViewProtocol // MARK: - ModelMoleculeViewProtocol
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { //-----------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListThreeColumnBillChangesDividerModel else { return } guard let model = model as? ListThreeColumnBillChangesDividerModel else { return }
leftLabel.set(with: model.leftLabel, delegateObject, additionalData) leftLabel.set(with: model.leftLabel, delegateObject, additionalData)
centerLabel.set(with: model.centerLabel, delegateObject, additionalData) centerLabel.set(with: model.centerLabel, delegateObject, additionalData)
rightLabel.set(with: model.rightLabel, delegateObject, additionalData) rightLabel.set(with: model.rightLabel, delegateObject, additionalData)

View File

@ -7,12 +7,22 @@
// //
import Foundation import Foundation
public class ListThreeColumnBillChangesDividerModel: ListItemModel, MoleculeModelProtocol { public class ListThreeColumnBillChangesDividerModel: ListItemModel, MoleculeModelProtocol {
//-----------------------------------------------------
// MARK: - Properties
//-----------------------------------------------------
public static var identifier: String = "list3CBillChgDiv" public static var identifier: String = "list3CBillChgDiv"
public var leftLabel: LabelModel public var leftLabel: LabelModel
public var centerLabel: LabelModel public var centerLabel: LabelModel
public var rightLabel: LabelModel public var rightLabel: LabelModel
//-----------------------------------------------------
// MARK: - Initialzier
//-----------------------------------------------------
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
@ -20,12 +30,19 @@ public class ListThreeColumnBillChangesDividerModel: ListItemModel, MoleculeMode
super.init() super.init()
} }
/// Defaults to set //-----------------------------------------------------
// MARK: - Method
//-----------------------------------------------------
override public func setDefaults() { override public func setDefaults() {
super.setDefaults() super.setDefaults()
style = "tallDivider" style = "tallDivider"
} }
//-----------------------------------------------------
// MARK: - Keys
//-----------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case leftLabel case leftLabel
@ -33,6 +50,10 @@ public class ListThreeColumnBillChangesDividerModel: ListItemModel, MoleculeMode
case rightLabel case rightLabel
} }
//-----------------------------------------------------
// MARK: - Codec
//-----------------------------------------------------
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)
leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel) leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel)

View File

@ -8,11 +8,12 @@
import Foundation import Foundation
@objcMembers open class ListThreeColumnDataUsageDivider: TableViewCell { @objcMembers open class ListThreeColumnDataUsageDivider: TableViewCell {
//----------------------------------------------------- //-----------------------------------------------------
// MARK: - Outlets // MARK: - Outlets
//------------------------------------------------------- //-----------------------------------------------------
public let leftLabel = Label.createLabelBoldBodySmall(true) public let leftLabel = Label.createLabelBoldBodySmall(true)
public let centerLabel = Label.createLabelBoldBodySmall(true) public let centerLabel = Label.createLabelBoldBodySmall(true)
public let rightLabel = Label.createLabelBoldBodySmall(true) public let rightLabel = Label.createLabelBoldBodySmall(true)
@ -21,6 +22,7 @@ import Foundation
//------------------------------------------------------ //------------------------------------------------------
// MARK: - Initializers // MARK: - Initializers
//------------------------------------------------------ //------------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 40, horizontalAlignment: .leading)), stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 40, horizontalAlignment: .leading)),
(view: centerLabel, model: StackItemModel(percent: 37, horizontalAlignment: .leading)), (view: centerLabel, model: StackItemModel(percent: 37, horizontalAlignment: .leading)),
@ -33,24 +35,33 @@ import Foundation
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
//-----------------------------------------------------
// MARK: - Lifecycle
//-----------------------------------------------------
open override func setupView() { open override func setupView() {
super.setupView() super.setupView()
addMolecule(stack) addMolecule(stack)
stack.restack() stack.restack()
} }
// MARK: - ModelMoleculeViewProtocol //-----------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { // MARK: - ModelMoleculeViewProtocol
super.set(with: model, delegateObject, additionalData) //-----------------------------------------------------
guard let model = model as? ListThreeColumnDataUsageDividerModel else { return }
leftLabel.set(with: model.leftLabel, delegateObject, additionalData) open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
centerLabel.set(with: model.centerLabel, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
rightLabel.set(with: model.rightLabel, delegateObject, additionalData)
} guard let model = model as? ListThreeColumnDataUsageDividerModel else { return }
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat { leftLabel.set(with: model.leftLabel, delegateObject, additionalData)
return 121 centerLabel.set(with: model.centerLabel, delegateObject, additionalData)
} rightLabel.set(with: model.rightLabel, delegateObject, additionalData)
}
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
return 121
}
open override func reset() { open override func reset() {
super.reset() super.reset()

View File

@ -8,12 +8,21 @@
import Foundation import Foundation
public class ListThreeColumnDataUsageDividerModel: ListItemModel, MoleculeModelProtocol { public class ListThreeColumnDataUsageDividerModel: ListItemModel, MoleculeModelProtocol {
//-----------------------------------------------------
// MARK: - Properties
//-----------------------------------------------------
public static var identifier: String = "list3CDataUsgDiv" public static var identifier: String = "list3CDataUsgDiv"
public let leftLabel: LabelModel public let leftLabel: LabelModel
public let centerLabel: LabelModel public let centerLabel: LabelModel
public let rightLabel: LabelModel public let rightLabel: LabelModel
//-----------------------------------------------------
// MARK: - Initializer
//-----------------------------------------------------
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
@ -21,11 +30,19 @@ public class ListThreeColumnDataUsageDividerModel: ListItemModel, MoleculeModelP
super.init() super.init()
} }
//-----------------------------------------------------
// MARK: - Method
//-----------------------------------------------------
override public func setDefaults() { override public func setDefaults() {
super.setDefaults() super.setDefaults()
style = "tallDivider" style = "tallDivider"
} }
//-----------------------------------------------------
// MARK: - Keys
//-----------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case leftLabel case leftLabel
@ -33,7 +50,11 @@ public class ListThreeColumnDataUsageDividerModel: ListItemModel, MoleculeModelP
case rightLabel case rightLabel
} }
required init(from decoder: Decoder) throws { //-----------------------------------------------------
// MARK: - Codec
//-----------------------------------------------------
required init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self) let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel) leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel)
centerLabel = try typeContainer.decode(LabelModel.self, forKey: .centerLabel) centerLabel = try typeContainer.decode(LabelModel.self, forKey: .centerLabel)

View File

@ -8,16 +8,21 @@
import Foundation import Foundation
@objcMembers open class ListThreeColumnInternationalDataDivider: TableViewCell { @objcMembers open class ListThreeColumnInternationalDataDivider: TableViewCell {
//----------------------------------------------------- //-----------------------------------------------------
// MARK: - Outlets // MARK: - Outlets
//----------------------------------------------------- //-----------------------------------------------------
let leftLabel = Label.createLabelBoldBodySmall(true) let leftLabel = Label.createLabelBoldBodySmall(true)
let centerLabel = Label.createLabelBoldBodySmall(true) let centerLabel = Label.createLabelBoldBodySmall(true)
let rightLabel = Label.createLabelBoldBodySmall(true) let rightLabel = Label.createLabelBoldBodySmall(true)
var stack: Stack<StackModel> var stack: Stack<StackModel>
//------------------------------------------------------
// MARK: - Initializers
//------------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 30, horizontalAlignment: .leading)), stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 30, horizontalAlignment: .leading)),
(view: centerLabel, model: StackItemModel(percent: 50, horizontalAlignment: .leading)), (view: centerLabel, model: StackItemModel(percent: 50, horizontalAlignment: .leading)),
@ -33,6 +38,7 @@ import Foundation
//----------------------------------------------------- //-----------------------------------------------------
// MARK: - MFViewProtocol // MARK: - MFViewProtocol
//----------------------------------------------------- //-----------------------------------------------------
open override func setupView() { open override func setupView() {
super.setupView() super.setupView()
addMolecule(stack) addMolecule(stack)
@ -42,9 +48,11 @@ import Foundation
//----------------------------------------------------- //-----------------------------------------------------
// MARK: - ModelMoleculeViewProtocol // MARK: - ModelMoleculeViewProtocol
//----------------------------------------------------- //-----------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListThreeColumnInternationalDataDividerModel else { return } guard let model = model as? ListThreeColumnInternationalDataDividerModel else { return }
leftLabel.set(with: model.leftLabel, delegateObject, additionalData) leftLabel.set(with: model.leftLabel, delegateObject, additionalData)
centerLabel.set(with: model.centerLabel, delegateObject, additionalData) centerLabel.set(with: model.centerLabel, delegateObject, additionalData)
rightLabel.set(with: model.rightLabel, delegateObject, additionalData) rightLabel.set(with: model.rightLabel, delegateObject, additionalData)
@ -54,9 +62,6 @@ import Foundation
return 121 return 121
} }
//-----------------------------------------------------
// MARK: - MVMCoreUIMoleculeViewProtocol
//-----------------------------------------------------
override open func reset() { override open func reset() {
super.reset() super.reset()
leftLabel.styleBoldBodySmall(true) leftLabel.styleBoldBodySmall(true)

View File

@ -8,12 +8,21 @@
import Foundation import Foundation
public class ListThreeColumnInternationalDataDividerModel: ListItemModel, MoleculeModelProtocol { public class ListThreeColumnInternationalDataDividerModel: ListItemModel, MoleculeModelProtocol {
//------------------------------------------------------
// MARK: - Properties
//------------------------------------------------------
public static var identifier: String = "list3CIntDataDiv" public static var identifier: String = "list3CIntDataDiv"
public var leftLabel: LabelModel public var leftLabel: LabelModel
public var centerLabel: LabelModel public var centerLabel: LabelModel
public var rightLabel: LabelModel public var rightLabel: LabelModel
//------------------------------------------------------
// 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
@ -21,11 +30,19 @@ public class ListThreeColumnInternationalDataDividerModel: ListItemModel, Molecu
super.init() super.init()
} }
//------------------------------------------------------
// MARK: - Method
//------------------------------------------------------
override public func setDefaults() { override public func setDefaults() {
super.setDefaults() super.setDefaults()
style = "tallDivider" style = "tallDivider"
} }
//------------------------------------------------------
// MARK: - Keys
//------------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case leftLabel case leftLabel
@ -33,6 +50,10 @@ public class ListThreeColumnInternationalDataDividerModel: ListItemModel, Molecu
case rightLabel case rightLabel
} }
//------------------------------------------------------
// MARK: - Codec
//------------------------------------------------------
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)
leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel) leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel)

View File

@ -8,14 +8,21 @@
import Foundation import Foundation
@objcMembers open class ListThreeColumnPlanDataDivider: TableViewCell { @objcMembers open class ListThreeColumnPlanDataDivider: TableViewCell {
//-----------------------------------------------------
// MARK: - Properties
//-----------------------------------------------------
let leftHeadlineBody = HeadlineBody(frame: .zero) let leftHeadlineBody = HeadlineBody()
let centerHeadLineBody = HeadlineBody(frame: .zero) let centerHeadLineBody = HeadlineBody()
let rightHeadLineBody = HeadlineBody(frame: .zero) let rightHeadLineBody = HeadlineBody()
var stack: Stack<StackModel> var stack: Stack<StackModel>
//-----------------------------------------------------
// MARK: - Initializers // MARK: - Initializers
//-----------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: leftHeadlineBody, model: StackItemModel(percent: 33, horizontalAlignment: .leading)), stack = Stack<StackModel>.createStack(with: [(view: leftHeadlineBody, model: StackItemModel(percent: 33, horizontalAlignment: .leading)),
(view: centerHeadLineBody, model: StackItemModel(percent: 34, horizontalAlignment: .center)), (view: centerHeadLineBody, model: StackItemModel(percent: 34, horizontalAlignment: .center)),
@ -28,17 +35,25 @@ import Foundation
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
//-----------------------------------------------------
// MARK: - MFViewProtocol // MARK: - MFViewProtocol
//-----------------------------------------------------
open override func setupView() { open override func setupView() {
super.setupView() super.setupView()
addMolecule(stack) addMolecule(stack)
stack.restack() stack.restack()
} }
//-----------------------------------------------------
// MARK: - MoleculeViewProtocol // MARK: - MoleculeViewProtocol
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { //-----------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListThreeColumnPlanDataDividerModel else { return } guard let model = model as? ListThreeColumnPlanDataDividerModel else { return }
leftHeadlineBody.set(with: model.leftHeadlineBody, delegateObject, additionalData) leftHeadlineBody.set(with: model.leftHeadlineBody, delegateObject, additionalData)
centerHeadLineBody.set(with: model.centerHeadlineBody, delegateObject, additionalData) centerHeadLineBody.set(with: model.centerHeadlineBody, delegateObject, additionalData)
rightHeadLineBody.set(with: model.rightHeadlineBody, delegateObject, additionalData) rightHeadLineBody.set(with: model.rightHeadlineBody, delegateObject, additionalData)
@ -48,4 +63,3 @@ import Foundation
return 121 return 121
} }
} }

View File

@ -8,12 +8,21 @@
import UIKit import UIKit
public class ListThreeColumnPlanDataDividerModel: ListItemModel, MoleculeModelProtocol { public class ListThreeColumnPlanDataDividerModel: ListItemModel, MoleculeModelProtocol {
//-----------------------------------------------------
// MARK: - Properties
//-----------------------------------------------------
public static var identifier: String = "list3CHBDiv" public static var identifier: String = "list3CHBDiv"
public var leftHeadlineBody: HeadlineBodyModel public var leftHeadlineBody: HeadlineBodyModel
public var centerHeadlineBody: HeadlineBodyModel public var centerHeadlineBody: HeadlineBodyModel
public var rightHeadlineBody: HeadlineBodyModel public var rightHeadlineBody: HeadlineBodyModel
//-----------------------------------------------------
// MARK: - Initializer
//-----------------------------------------------------
public init(leftHeadlineBody: HeadlineBodyModel, centerHeadlineBody:HeadlineBodyModel, rightHeadlineBody: HeadlineBodyModel) { public init(leftHeadlineBody: HeadlineBodyModel, centerHeadlineBody:HeadlineBodyModel, rightHeadlineBody: HeadlineBodyModel) {
self.leftHeadlineBody = leftHeadlineBody self.leftHeadlineBody = leftHeadlineBody
self.centerHeadlineBody = centerHeadlineBody self.centerHeadlineBody = centerHeadlineBody
@ -21,7 +30,10 @@ public class ListThreeColumnPlanDataDividerModel: ListItemModel, MoleculeModelPr
super.init() super.init()
} }
/// Defaults to set //-----------------------------------------------------
// MARK: - Method
//-----------------------------------------------------
override public func setDefaults() { override public func setDefaults() {
super.setDefaults() super.setDefaults()
style = "tallDivider" style = "tallDivider"
@ -30,6 +42,10 @@ public class ListThreeColumnPlanDataDividerModel: ListItemModel, MoleculeModelPr
rightHeadlineBody.style = .itemHeader rightHeadlineBody.style = .itemHeader
} }
//-----------------------------------------------------
// MARK: - Keys
//-----------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case leftHeadlineBody case leftHeadlineBody
@ -37,6 +53,10 @@ public class ListThreeColumnPlanDataDividerModel: ListItemModel, MoleculeModelPr
case rightHeadlineBody case rightHeadlineBody
} }
//-----------------------------------------------------
// MARK: - Codec
//-----------------------------------------------------
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)
leftHeadlineBody = try typeContainer.decode(HeadlineBodyModel.self, forKey: .leftHeadlineBody) leftHeadlineBody = try typeContainer.decode(HeadlineBodyModel.self, forKey: .leftHeadlineBody)

View File

@ -8,11 +8,12 @@
import Foundation import Foundation
@objcMembers open class ListThreeColumnSpeedTestDivider: TableViewCell { @objcMembers open class ListThreeColumnSpeedTestDivider: TableViewCell {
//------------------------------------------------------- //-------------------------------------------------------
// MARK: - Outlets // MARK: - Outlets
//------------------------------------------------------- //-------------------------------------------------------
let leftLabel = Label.createLabelBoldBodySmall(true) let leftLabel = Label.createLabelBoldBodySmall(true)
let centerLabel = Label.createLabelBoldBodySmall(true) let centerLabel = Label.createLabelBoldBodySmall(true)
let rightLabel = Label.createLabelBoldBodySmall(true) let rightLabel = Label.createLabelBoldBodySmall(true)
@ -21,6 +22,7 @@ import Foundation
//------------------------------------------------------- //-------------------------------------------------------
// MARK: - Initializers // MARK: - Initializers
//------------------------------------------------------- //-------------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 37, horizontalAlignment: .leading)), (view: centerLabel, model: StackItemModel(percent: 33, horizontalAlignment: .leading)), (view: rightLabel, model: StackItemModel(percent: 30, horizontalAlignment: .leading))], axis: .horizontal) stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 37, horizontalAlignment: .leading)), (view: centerLabel, model: StackItemModel(percent: 33, horizontalAlignment: .leading)), (view: rightLabel, model: StackItemModel(percent: 30, horizontalAlignment: .leading))], axis: .horizontal)
super.init(style: style, reuseIdentifier: reuseIdentifier) super.init(style: style, reuseIdentifier: reuseIdentifier)
@ -33,16 +35,18 @@ import Foundation
//------------------------------------------------------- //-------------------------------------------------------
// MARK: - View Lifecycle // MARK: - View Lifecycle
//------------------------------------------------------- //-------------------------------------------------------
open override func setupView() { open override func setupView() {
super.setupView() super.setupView()
addMolecule(stack) addMolecule(stack)
stack.restack() stack.restack()
} }
//------------------------------------------------------
// MARK: - Molecule
//------------------------------------------------------ //------------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) { // MARK: - MoleculeViewProtocol
//------------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListThreeColumnSpeedTestDividerModel else { return } guard let model = model as? ListThreeColumnSpeedTestDividerModel else { return }
leftLabel.set(with: model.leftLabel, delegateObject, additionalData) leftLabel.set(with: model.leftLabel, delegateObject, additionalData)

View File

@ -8,12 +8,21 @@
import Foundation import Foundation
public class ListThreeColumnSpeedTestDividerModel: ListItemModel, MoleculeModelProtocol { public class ListThreeColumnSpeedTestDividerModel: ListItemModel, MoleculeModelProtocol {
//-----------------------------------------------------
// MARK: - Properties
//-----------------------------------------------------
public static var identifier: String = "list3CSpdTstDiv" public static var identifier: String = "list3CSpdTstDiv"
public var leftLabel: LabelModel public var leftLabel: LabelModel
public var centerLabel: LabelModel public var centerLabel: LabelModel
public var rightLabel: LabelModel public var rightLabel: LabelModel
//-----------------------------------------------------
// MARK: - Initializer
//-----------------------------------------------------
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
@ -21,12 +30,19 @@ public class ListThreeColumnSpeedTestDividerModel: ListItemModel, MoleculeModelP
super.init() super.init()
} }
/// Defaults to set //-----------------------------------------------------
// MARK: - Method
//-----------------------------------------------------
override public func setDefaults() { override public func setDefaults() {
super.setDefaults() super.setDefaults()
style = "tallDivider" style = "tallDivider"
} }
//-----------------------------------------------------
// MARK: - Keys
//-----------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case leftLabel case leftLabel
@ -34,6 +50,10 @@ public class ListThreeColumnSpeedTestDividerModel: ListItemModel, MoleculeModelP
case rightLabel case rightLabel
} }
//-----------------------------------------------------
// MARK: - Codec
//-----------------------------------------------------
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)
leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel) leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel)

View File

@ -8,18 +8,20 @@
import Foundation import Foundation
@objcMembers open class ListTwoColumnSubsectionDivider: TableViewCell { @objcMembers open class ListTwoColumnSubsectionDivider: TableViewCell {
//--------------------------------------------------
//--------------------------------------------------
// MARK: - Outlets // MARK: - Outlets
//-------------------------------------------------- //--------------------------------------------------
let leftLabel = Label.createLabelBoldBodySmall(true) let leftLabel = Label.createLabelBoldBodySmall(true)
let rightLabel = Label.createLabelBoldBodySmall(true) let rightLabel = Label.createLabelBoldBodySmall(true)
var stack: Stack<StackModel> var stack: Stack<StackModel>
//------------------------------------------------------- //--------------------------------------------------
// MARK: - Initializers // MARK: - Initializers
//------------------------------------------------------- //--------------------------------------------------
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 75, horizontalAlignment: .leading)), stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 75, horizontalAlignment: .leading)),
(view: rightLabel, model: StackItemModel(percent: 25, horizontalAlignment: .leading))], (view: rightLabel, model: StackItemModel(percent: 25, horizontalAlignment: .leading))],
@ -31,21 +33,25 @@ import Foundation
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
//------------------------------------------------------- //--------------------------------------------------
// MARK: - View Lifecycle // MARK: - Lifecycle
//------------------------------------------------------- //--------------------------------------------------
open override func setupView() { open override func setupView() {
super.setupView() super.setupView()
addMolecule(stack) addMolecule(stack)
stack.restack() stack.restack()
} }
//---------------------------------------------------- //--------------------------------------------------
// MARK: - Molecule // MARK: - MoleculeViewProtocol
//------------------------------------------------------ //--------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData) super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListTwoColumnSubsectionDividerModel else { return } guard let model = model as? ListTwoColumnSubsectionDividerModel else { return }
leftLabel.set(with: model.leftLabel, delegateObject, additionalData) leftLabel.set(with: model.leftLabel, delegateObject, additionalData)
rightLabel.set(with: model.rightLabel, delegateObject, additionalData) rightLabel.set(with: model.rightLabel, delegateObject, additionalData)
} }

View File

@ -8,29 +8,49 @@
import Foundation import Foundation
public class ListTwoColumnSubsectionDividerModel: ListItemModel, MoleculeModelProtocol { public class ListTwoColumnSubsectionDividerModel: ListItemModel, MoleculeModelProtocol {
//------------------------------------------------------
// MARK: - Properties
//------------------------------------------------------
public static var identifier: String = "list2CSbscDiv" public static var identifier: String = "list2CSbscDiv"
public var leftLabel: LabelModel public var leftLabel: LabelModel
public var rightLabel: LabelModel public var rightLabel: LabelModel
//------------------------------------------------------
// MARK: - Initializer
//------------------------------------------------------
public init(leftLabel: LabelModel, rightLabel: LabelModel) { public init(leftLabel: LabelModel, rightLabel: LabelModel) {
self.leftLabel = leftLabel self.leftLabel = leftLabel
self.rightLabel = rightLabel self.rightLabel = rightLabel
super.init() super.init()
} }
/// Defaults to set //------------------------------------------------------
// MARK: - Method
//------------------------------------------------------
override public func setDefaults() { override public func setDefaults() {
super.setDefaults() super.setDefaults()
style = "tallDivider" style = "tallDivider"
} }
//------------------------------------------------------
// MARK: - Keys
//------------------------------------------------------
private enum CodingKeys: String, CodingKey { private enum CodingKeys: String, CodingKey {
case moleculeName case moleculeName
case leftLabel case leftLabel
case rightLabel case rightLabel
} }
//------------------------------------------------------
// MARK: - Codec
//------------------------------------------------------
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)
leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel) leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel)