19036 - List - Two Column - Price - Details initial commit.
Added molecule and model class.
This commit is contained in:
parent
377b26e40d
commit
7702b24d4a
@ -128,6 +128,8 @@
|
|||||||
94F217B723E0BF6100A47C06 /* PrimaryButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 94F217B523E0BF6100A47C06 /* PrimaryButtonView.m */; };
|
94F217B723E0BF6100A47C06 /* PrimaryButtonView.m in Sources */ = {isa = PBXBuildFile; fileRef = 94F217B523E0BF6100A47C06 /* PrimaryButtonView.m */; };
|
||||||
94FB966223D797DA003D482B /* MFTextButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 94FB966023D797DA003D482B /* MFTextButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
94FB966223D797DA003D482B /* MFTextButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 94FB966023D797DA003D482B /* MFTextButton.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
94FB966323D797DA003D482B /* MFTextButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 94FB966123D797DA003D482B /* MFTextButton.m */; };
|
94FB966323D797DA003D482B /* MFTextButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 94FB966123D797DA003D482B /* MFTextButton.m */; };
|
||||||
|
AAB04E4E23FCE7ED007C79B0 /* ListTwoColumnPriceDetails.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAB04E4D23FCE7ED007C79B0 /* ListTwoColumnPriceDetails.swift */; };
|
||||||
|
AAB04E5023FCE7FB007C79B0 /* ListTwoColumnPriceDetailsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAB04E4F23FCE7FB007C79B0 /* ListTwoColumnPriceDetailsModel.swift */; };
|
||||||
C003506123AA94CD00B6AC29 /* Button.swift in Sources */ = {isa = PBXBuildFile; fileRef = C003506023AA94CD00B6AC29 /* Button.swift */; };
|
C003506123AA94CD00B6AC29 /* Button.swift in Sources */ = {isa = PBXBuildFile; fileRef = C003506023AA94CD00B6AC29 /* Button.swift */; };
|
||||||
C07065C42395677300FBF997 /* Link.swift in Sources */ = {isa = PBXBuildFile; fileRef = C07065C32395677300FBF997 /* Link.swift */; };
|
C07065C42395677300FBF997 /* Link.swift in Sources */ = {isa = PBXBuildFile; fileRef = C07065C32395677300FBF997 /* Link.swift */; };
|
||||||
C695A67F23C9830600BFB94E /* UnOrderedListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C695A67E23C9830600BFB94E /* UnOrderedListModel.swift */; };
|
C695A67F23C9830600BFB94E /* UnOrderedListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C695A67E23C9830600BFB94E /* UnOrderedListModel.swift */; };
|
||||||
@ -451,6 +453,8 @@
|
|||||||
94F217B523E0BF6100A47C06 /* PrimaryButtonView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PrimaryButtonView.m; sourceTree = "<group>"; };
|
94F217B523E0BF6100A47C06 /* PrimaryButtonView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PrimaryButtonView.m; sourceTree = "<group>"; };
|
||||||
94FB966023D797DA003D482B /* MFTextButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFTextButton.h; sourceTree = "<group>"; };
|
94FB966023D797DA003D482B /* MFTextButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFTextButton.h; sourceTree = "<group>"; };
|
||||||
94FB966123D797DA003D482B /* MFTextButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFTextButton.m; sourceTree = "<group>"; };
|
94FB966123D797DA003D482B /* MFTextButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFTextButton.m; sourceTree = "<group>"; };
|
||||||
|
AAB04E4D23FCE7ED007C79B0 /* ListTwoColumnPriceDetails.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListTwoColumnPriceDetails.swift; sourceTree = "<group>"; };
|
||||||
|
AAB04E4F23FCE7FB007C79B0 /* ListTwoColumnPriceDetailsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListTwoColumnPriceDetailsModel.swift; sourceTree = "<group>"; };
|
||||||
C003506023AA94CD00B6AC29 /* Button.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Button.swift; sourceTree = "<group>"; };
|
C003506023AA94CD00B6AC29 /* Button.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Button.swift; sourceTree = "<group>"; };
|
||||||
C07065C32395677300FBF997 /* Link.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Link.swift; sourceTree = "<group>"; };
|
C07065C32395677300FBF997 /* Link.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Link.swift; sourceTree = "<group>"; };
|
||||||
C695A67E23C9830600BFB94E /* UnOrderedListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnOrderedListModel.swift; sourceTree = "<group>"; };
|
C695A67E23C9830600BFB94E /* UnOrderedListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnOrderedListModel.swift; sourceTree = "<group>"; };
|
||||||
@ -782,6 +786,15 @@
|
|||||||
name = "Recovered References";
|
name = "Recovered References";
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
};
|
};
|
||||||
|
AAB04E4C23FCE7AC007C79B0 /* TwoColumn */ = {
|
||||||
|
isa = PBXGroup;
|
||||||
|
children = (
|
||||||
|
AAB04E4D23FCE7ED007C79B0 /* ListTwoColumnPriceDetails.swift */,
|
||||||
|
AAB04E4F23FCE7FB007C79B0 /* ListTwoColumnPriceDetailsModel.swift */,
|
||||||
|
);
|
||||||
|
path = TwoColumn;
|
||||||
|
sourceTree = "<group>";
|
||||||
|
};
|
||||||
D213347423842FE3008E41B3 /* Controllers */ = {
|
D213347423842FE3008E41B3 /* Controllers */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
@ -980,6 +993,7 @@
|
|||||||
D22B38EC23F4E10700490EF6 /* SectionDividers */ = {
|
D22B38EC23F4E10700490EF6 /* SectionDividers */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
AAB04E4C23FCE7AC007C79B0 /* TwoColumn */,
|
||||||
D22B38ED23F4E11100490EF6 /* ThreeColumn */,
|
D22B38ED23F4E11100490EF6 /* ThreeColumn */,
|
||||||
);
|
);
|
||||||
path = SectionDividers;
|
path = SectionDividers;
|
||||||
@ -1625,6 +1639,7 @@
|
|||||||
D22D1F1F220343560077CEC0 /* MVMCoreUICheckMarkView.m in Sources */,
|
D22D1F1F220343560077CEC0 /* MVMCoreUICheckMarkView.m in Sources */,
|
||||||
D2E2A99423D8CCBC000B42E6 /* HeadlineBodyLinkModel.swift in Sources */,
|
D2E2A99423D8CCBC000B42E6 /* HeadlineBodyLinkModel.swift in Sources */,
|
||||||
01004F3022721C3800991ECC /* RadioButton.swift in Sources */,
|
01004F3022721C3800991ECC /* RadioButton.swift in Sources */,
|
||||||
|
AAB04E5023FCE7FB007C79B0 /* ListTwoColumnPriceDetailsModel.swift in Sources */,
|
||||||
D268C70E238C22D7007F2C1C /* DropDownFilterTableViewCell.swift in Sources */,
|
D268C70E238C22D7007F2C1C /* DropDownFilterTableViewCell.swift in Sources */,
|
||||||
017BEB3C2361EA1D0024EF95 /* MFViewController+Model.swift in Sources */,
|
017BEB3C2361EA1D0024EF95 /* MFViewController+Model.swift in Sources */,
|
||||||
D282AAB4223FDDAE00C46919 /* MFLoadImageView.swift in Sources */,
|
D282AAB4223FDDAE00C46919 /* MFLoadImageView.swift in Sources */,
|
||||||
@ -1678,6 +1693,7 @@
|
|||||||
0A21DB85235E06EF00C160A2 /* MFTextField.m in Sources */,
|
0A21DB85235E06EF00C160A2 /* MFTextField.m in Sources */,
|
||||||
014AA72623C501E2006F3E93 /* ContainerModelProtocol.swift in Sources */,
|
014AA72623C501E2006F3E93 /* ContainerModelProtocol.swift in Sources */,
|
||||||
01EB369223609801006832FA /* MoleculeStackModel.swift in Sources */,
|
01EB369223609801006832FA /* MoleculeStackModel.swift in Sources */,
|
||||||
|
AAB04E4E23FCE7ED007C79B0 /* ListTwoColumnPriceDetails.swift in Sources */,
|
||||||
012CA99E2385A2D3003F810F /* MFView+ModelExtension.swift in Sources */,
|
012CA99E2385A2D3003F810F /* MFView+ModelExtension.swift in Sources */,
|
||||||
D282AABA224131D100C46919 /* MFTransparentGIFView.swift in Sources */,
|
D282AABA224131D100C46919 /* MFTransparentGIFView.swift in Sources */,
|
||||||
944589232385DA9600DE9FD4 /* ImageViewModel.swift in Sources */,
|
944589232385DA9600DE9FD4 /* ImageViewModel.swift in Sources */,
|
||||||
|
|||||||
@ -0,0 +1,71 @@
|
|||||||
|
//
|
||||||
|
// ListTwoColumnPriceDetails.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Lekshmi S on 19/02/20.
|
||||||
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
@objcMembers open class ListTwoColumnPriceDetails: TableViewCell {
|
||||||
|
|
||||||
|
let leftLabel = Label.commonLabelB2(true)
|
||||||
|
let rightLabel = Label.commonLabelB2(true)
|
||||||
|
let rightSubLabel = Label.commonLabelB2(true)
|
||||||
|
let containerView = View()
|
||||||
|
|
||||||
|
// MARK: - MFViewProtocol
|
||||||
|
open override func updateView(_ size: CGFloat) {
|
||||||
|
super.updateView(size)
|
||||||
|
containerView.updateView(size)
|
||||||
|
leftLabel.updateView(size)
|
||||||
|
rightLabel.updateView(size)
|
||||||
|
rightSubLabel.updateView(size)
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func setupView() {
|
||||||
|
super.setupView()
|
||||||
|
|
||||||
|
guard leftLabel.superview == nil else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
containerView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
contentView.addSubview(containerView)
|
||||||
|
containerView.addSubview(leftLabel)
|
||||||
|
containerView.addSubview(rightLabel)
|
||||||
|
containerView.addSubview(rightSubLabel)
|
||||||
|
|
||||||
|
//containerView constraints
|
||||||
|
containerHelper.constrainView(containerView)
|
||||||
|
//leftLabel constraints
|
||||||
|
leftLabel.leadingAnchor.constraint(equalTo: containerView.leadingAnchor).isActive = true
|
||||||
|
leftLabel.centerYAnchor.constraint(equalTo: rightLabel.centerYAnchor).isActive = true
|
||||||
|
//rightLabel constraints
|
||||||
|
rightLabel.topAnchor.constraint(equalTo: containerView.topAnchor).isActive = true
|
||||||
|
rightLabel.trailingAnchor.constraint(equalTo: containerView.trailingAnchor).isActive = true
|
||||||
|
//rightSubLabel constraints
|
||||||
|
rightSubLabel.topAnchor.constraint(equalTo: rightLabel.bottomAnchor).isActive = true
|
||||||
|
rightSubLabel.trailingAnchor.constraint(equalTo: containerView.trailingAnchor).isActive = true
|
||||||
|
containerView.bottomAnchor.constraint(equalTo: rightSubLabel.bottomAnchor).isActive = true
|
||||||
|
}
|
||||||
|
|
||||||
|
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||||
|
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||||
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
|
guard let model = model as? ListTwoColumnPriceDetailsModel else { return }
|
||||||
|
leftLabel.setWithModel(model.leftLabel, delegateObject, additionalData)
|
||||||
|
rightLabel.setWithModel(model.rightLabel, delegateObject, additionalData)
|
||||||
|
rightSubLabel.setWithModel(model.rightSubLabel, delegateObject, additionalData)
|
||||||
|
}
|
||||||
|
|
||||||
|
open override func reset() {
|
||||||
|
super.reset()
|
||||||
|
leftLabel.reset()
|
||||||
|
rightLabel.reset()
|
||||||
|
rightSubLabel.reset()
|
||||||
|
}
|
||||||
|
|
||||||
|
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||||
|
return 60
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
//
|
||||||
|
// ListTwoColumnPriceDetailsModel.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Lekshmi S on 19/02/20.
|
||||||
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
public class ListTwoColumnPriceDetailsModel: ListItemModel, MoleculeModelProtocol {
|
||||||
|
public static var identifier: String = "list2CTxtPrc2"
|
||||||
|
public var leftLabel: LabelModel
|
||||||
|
public var rightLabel: LabelModel
|
||||||
|
public var rightSubLabel: LabelModel
|
||||||
|
|
||||||
|
public init(leftLabel: LabelModel, rightLabel:LabelModel, rightSubLabel: LabelModel) {
|
||||||
|
self.leftLabel = leftLabel
|
||||||
|
self.rightLabel = rightLabel
|
||||||
|
self.rightSubLabel = rightSubLabel
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case moleculeName
|
||||||
|
case leftLabel
|
||||||
|
case rightLabel
|
||||||
|
case rightSubLabel
|
||||||
|
}
|
||||||
|
|
||||||
|
required public init(from decoder: Decoder) throws {
|
||||||
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
leftLabel = try typeContainer.decode(LabelModel.self, forKey: .leftLabel)
|
||||||
|
rightLabel = try typeContainer.decode(LabelModel.self, forKey: .rightLabel)
|
||||||
|
rightSubLabel = try typeContainer.decode(LabelModel.self, forKey: .rightSubLabel)
|
||||||
|
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(rightLabel, forKey: .rightLabel)
|
||||||
|
try container.encode(rightSubLabel, forKey: .rightSubLabel)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -55,6 +55,7 @@ import Foundation
|
|||||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: StringAndMoleculeView.self, viewModelClass: StringAndMoleculeModel.self)
|
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: StringAndMoleculeView.self, viewModelClass: StringAndMoleculeModel.self)
|
||||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ImageHeadlineBody.self, viewModelClass: ImageHeadlineBodyModel.self)
|
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ImageHeadlineBody.self, viewModelClass: ImageHeadlineBodyModel.self)
|
||||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListThreeColumnPlanDataDivider.self, viewModelClass: ListThreeColumnPlanDataDividerModel.self)
|
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListThreeColumnPlanDataDivider.self, viewModelClass: ListThreeColumnPlanDataDividerModel.self)
|
||||||
|
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: ListTwoColumnPriceDetails.self, viewModelClass: ListTwoColumnPriceDetailsModel.self)
|
||||||
|
|
||||||
|
|
||||||
// Vertical Combination Molecules
|
// Vertical Combination Molecules
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user