190780 - List- Three Column - International Data Divider - Initial commit
This commit is contained in:
parent
b1dedb93cf
commit
2226d9beed
@ -134,6 +134,8 @@
|
||||
8D24041123E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D24041023E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift */; };
|
||||
8D24041523E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D24041423E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift */; };
|
||||
8D448E5524050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D448E5424050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift */; };
|
||||
8DFBDE1D24288958007F3433 /* ListThreeColumnInternationalDataDividerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DFBDE1C24288958007F3433 /* ListThreeColumnInternationalDataDividerModel.swift */; };
|
||||
8DFBDE1F24288965007F3433 /* ListThreeColumnInternationalDataDivider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DFBDE1E24288965007F3433 /* ListThreeColumnInternationalDataDivider.swift */; };
|
||||
942C372E241149170066E45E /* NHaasGroteskDSStd-75Bd.otf in Resources */ = {isa = PBXBuildFile; fileRef = 942C372C241149170066E45E /* NHaasGroteskDSStd-75Bd.otf */; };
|
||||
942C372F241149170066E45E /* NHaasGroteskDSStd-55Rg.otf in Resources */ = {isa = PBXBuildFile; fileRef = 942C372D241149170066E45E /* NHaasGroteskDSStd-55Rg.otf */; };
|
||||
942C378C2412F4FA0066E45E /* ModalMoleculeListTemplate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 942C378B2412F4FA0066E45E /* ModalMoleculeListTemplate.swift */; };
|
||||
@ -519,6 +521,8 @@
|
||||
8D24041023E7FB9E009E23BE /* ListLeftVariableIconWithRightCaret.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListLeftVariableIconWithRightCaret.swift; sourceTree = "<group>"; };
|
||||
8D24041423E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListLeftVariableIconWithRightCaretModel.swift; sourceTree = "<group>"; };
|
||||
8D448E5424050A46006211BB /* ListOneColumnFullWidthTextAllTextAndLinksModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListOneColumnFullWidthTextAllTextAndLinksModel.swift; sourceTree = "<group>"; };
|
||||
8DFBDE1C24288958007F3433 /* ListThreeColumnInternationalDataDividerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnInternationalDataDividerModel.swift; sourceTree = "<group>"; };
|
||||
8DFBDE1E24288965007F3433 /* ListThreeColumnInternationalDataDivider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnInternationalDataDivider.swift; sourceTree = "<group>"; };
|
||||
9402C34F23A2CEA3004B974C /* LeftRightLabelModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftRightLabelModel.swift; sourceTree = "<group>"; };
|
||||
942C372C241149170066E45E /* NHaasGroteskDSStd-75Bd.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NHaasGroteskDSStd-75Bd.otf"; sourceTree = "<group>"; };
|
||||
942C372D241149170066E45E /* NHaasGroteskDSStd-55Rg.otf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "NHaasGroteskDSStd-55Rg.otf"; sourceTree = "<group>"; };
|
||||
@ -1227,6 +1231,8 @@
|
||||
children = (
|
||||
5248BFEB23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift */,
|
||||
5248BFEA23F12E350059236A /* ListThreeColumnPlanDataDivider.swift */,
|
||||
8DFBDE1C24288958007F3433 /* ListThreeColumnInternationalDataDividerModel.swift */,
|
||||
8DFBDE1E24288965007F3433 /* ListThreeColumnInternationalDataDivider.swift */,
|
||||
);
|
||||
path = ThreeColumn;
|
||||
sourceTree = "<group>";
|
||||
@ -1909,6 +1915,7 @@
|
||||
BB47A588241615FA002BB23C /* ListOneColumnFullWidthTextDividerSubsection.swift in Sources */,
|
||||
012A88C8238DB02000FE3DA1 /* ModelMoleculeDelegateProtocol.swift in Sources */,
|
||||
0A7EF86123D8AC2500B2AAD1 /* DigitEntryFieldModel.swift in Sources */,
|
||||
8DFBDE1D24288958007F3433 /* ListThreeColumnInternationalDataDividerModel.swift in Sources */,
|
||||
DBC4392122491730001AB423 /* LabelWithInternalButton.swift in Sources */,
|
||||
D224798C231450C8003FCCF9 /* HeadlineBodyToggle.swift in Sources */,
|
||||
017BEB442362192F0024EF95 /* MVMCoreUIMoleculeMappingObject+ModelExtension.swift in Sources */,
|
||||
@ -2123,6 +2130,7 @@
|
||||
948DB67E2326DCD90011F916 /* MultiProgress.swift in Sources */,
|
||||
013F801923FB4A8E00AD8013 /* UIContentMode+Extension.swift in Sources */,
|
||||
525239C22407BD1000454969 /* ListTwoColumnPriceDetails.swift in Sources */,
|
||||
8DFBDE1F24288965007F3433 /* ListThreeColumnInternationalDataDivider.swift in Sources */,
|
||||
D2A5146122121FBF00345BFB /* MoleculeStackTemplate.swift in Sources */,
|
||||
D2E2A9A323E096B1000B42E6 /* DisableableModelProtocol.swift in Sources */,
|
||||
D29DF11821E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.m in Sources */,
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
//
|
||||
// ListThreeColumnInternationalDataDivider.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Kruthika KP on 23/03/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers open class ListThreeColumnInternationalDataDivider: TableViewCell {
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - Outlets
|
||||
//-----------------------------------------------------
|
||||
let leftLabel = Label.createLabelBoldBodySmall(true)
|
||||
let centerLabel = Label.createLabelBoldBodySmall(true)
|
||||
let rightLabel = Label.createLabelBoldBodySmall(true)
|
||||
var stack: Stack<StackModel>
|
||||
|
||||
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||
stack = Stack<StackModel>.createStack(with: [(view: leftLabel, model: StackItemModel(percent: 33, horizontalAlignment: .leading)),
|
||||
(view: centerLabel, model: StackItemModel(percent: 34, horizontalAlignment: .leading)),
|
||||
(view: rightLabel, model: StackItemModel(percent: 33, horizontalAlignment: .center))],
|
||||
axis: .horizontal)
|
||||
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||
}
|
||||
|
||||
public required init?(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - MFViewProtocol
|
||||
//-----------------------------------------------------
|
||||
open override func setupView() {
|
||||
super.setupView()
|
||||
addMolecule(stack)
|
||||
stack.restack()
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - ModelMoleculeViewProtocol
|
||||
//-----------------------------------------------------
|
||||
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.set(with: model, delegateObject, additionalData)
|
||||
guard let model = model as? ListThreeColumnInternationalDataDividerModel else { return }
|
||||
leftLabel.set(with: model.leftLabel, delegateObject, additionalData)
|
||||
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
|
||||
}
|
||||
|
||||
//-----------------------------------------------------
|
||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||
//-----------------------------------------------------
|
||||
override open func reset() {
|
||||
super.reset()
|
||||
leftLabel.styleBoldBodySmall(true)
|
||||
centerLabel.styleBoldBodySmall(true)
|
||||
rightLabel.styleBoldBodySmall(true)
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,52 @@
|
||||
//
|
||||
// ListThreeColumnInternationalDataDividerModel.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Kruthika KP on 23/03/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public class ListThreeColumnInternationalDataDividerModel : ListItemModel, MoleculeModelProtocol {
|
||||
public static var identifier: String = "list3CIntDataDiv"
|
||||
public var leftLabel: LabelModel
|
||||
public var centerLabel: LabelModel
|
||||
public var rightLabel: LabelModel
|
||||
|
||||
public init (leftLabel:LabelModel, centerLabel:LabelModel, rightLabel:LabelModel) {
|
||||
self.leftLabel = leftLabel
|
||||
self.centerLabel = centerLabel
|
||||
self.rightLabel = rightLabel
|
||||
super.init()
|
||||
}
|
||||
|
||||
override public func setDefaults() {
|
||||
super.setDefaults()
|
||||
style = "tallDivider"
|
||||
}
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case leftLabel
|
||||
case centerLabel
|
||||
case rightLabel
|
||||
}
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel)
|
||||
centerLabel = try typeContainer.decode(LabelModel.self, forKey: .centerLabel)
|
||||
rightLabel = try typeContainer.decode(LabelModel.self, forKey: .rightLabel)
|
||||
try super.init(from: decoder)
|
||||
}
|
||||
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
try super.encode(to: encoder)
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
try container.encode(leftLabel, forKey: .leftLabel)
|
||||
try container.encode(centerLabel, forKey: .centerLabel)
|
||||
try container.encode(rightLabel, forKey: .rightLabel)
|
||||
}
|
||||
}
|
||||
@ -117,6 +117,7 @@ import Foundation
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListOneColumnTextWithWhitespaceDividerShort.self, viewModelClass: ListOneColumnTextWithWhitespaceDividerShortModel.self)
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListOneColumnTextWithWhitespaceDividerTall.self, viewModelClass: ListOneColumnTextWithWhitespaceDividerTallModel.self)
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListOneColumnFullWidthTextDividerSubsection.self, viewModelClass: ListOneColumnFullWidthTextDividerSubsectionModel.self)
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListThreeColumnInternationalDataDivider.self, viewModelClass: ListThreeColumnInternationalDataDividerModel.self)
|
||||
|
||||
// Designed Headers
|
||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: HeadersH2NoButtonsBodyText.self, viewModelClass: HeadersH2NoButtonsBodyTextModel.self)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user