Merge branch 'feature/list_twocolumn_dropdownselectors' into 'develop'
Feature/list twocolumn dropdownselectors See merge request BPHV_MIPS/mvm_core_ui!416
This commit is contained in:
commit
7bb30f0566
@ -136,6 +136,8 @@
|
|||||||
8DD1E370243B3D0500D8F2DF /* ListThreeColumnInternationalData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD1E36F243B3D0500D8F2DF /* ListThreeColumnInternationalData.swift */; };
|
8DD1E370243B3D0500D8F2DF /* ListThreeColumnInternationalData.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DD1E36F243B3D0500D8F2DF /* ListThreeColumnInternationalData.swift */; };
|
||||||
8DDD6C1D244D90B8006A2232 /* ListThreeColumnDataUsage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DDD6C1C244D90B8006A2232 /* ListThreeColumnDataUsage.swift */; };
|
8DDD6C1D244D90B8006A2232 /* ListThreeColumnDataUsage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DDD6C1C244D90B8006A2232 /* ListThreeColumnDataUsage.swift */; };
|
||||||
8DDD6C1F244D90E1006A2232 /* ListThreeColumnDataUsageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DDD6C1E244D90E1006A2232 /* ListThreeColumnDataUsageModel.swift */; };
|
8DDD6C1F244D90E1006A2232 /* ListThreeColumnDataUsageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DDD6C1E244D90E1006A2232 /* ListThreeColumnDataUsageModel.swift */; };
|
||||||
|
8DE5BECD2456F7A200772E76 /* ListTwoColumnDropdownSelectorsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DE5BECC2456F7A200772E76 /* ListTwoColumnDropdownSelectorsModel.swift */; };
|
||||||
|
8DE5BECF2456F7B100772E76 /* ListTwoColumnDropdownSelectors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DE5BECE2456F7B100772E76 /* ListTwoColumnDropdownSelectors.swift */; };
|
||||||
8DEFA95C243DAC20000D27E5 /* ListThreeColumnDataUsageDividerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEFA95B243DAC20000D27E5 /* ListThreeColumnDataUsageDividerModel.swift */; };
|
8DEFA95C243DAC20000D27E5 /* ListThreeColumnDataUsageDividerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEFA95B243DAC20000D27E5 /* ListThreeColumnDataUsageDividerModel.swift */; };
|
||||||
8DEFA95E243DAC2F000D27E5 /* ListThreeColumnDataUsageDivider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEFA95D243DAC2F000D27E5 /* ListThreeColumnDataUsageDivider.swift */; };
|
8DEFA95E243DAC2F000D27E5 /* ListThreeColumnDataUsageDivider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8DEFA95D243DAC2F000D27E5 /* ListThreeColumnDataUsageDivider.swift */; };
|
||||||
942C372E241149170066E45E /* NHaasGroteskDSStd-75Bd.otf in Resources */ = {isa = PBXBuildFile; fileRef = 942C372C241149170066E45E /* NHaasGroteskDSStd-75Bd.otf */; };
|
942C372E241149170066E45E /* NHaasGroteskDSStd-75Bd.otf in Resources */ = {isa = PBXBuildFile; fileRef = 942C372C241149170066E45E /* NHaasGroteskDSStd-75Bd.otf */; };
|
||||||
@ -538,6 +540,8 @@
|
|||||||
8DD1E36F243B3D0500D8F2DF /* ListThreeColumnInternationalData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnInternationalData.swift; sourceTree = "<group>"; };
|
8DD1E36F243B3D0500D8F2DF /* ListThreeColumnInternationalData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnInternationalData.swift; sourceTree = "<group>"; };
|
||||||
8DDD6C1C244D90B8006A2232 /* ListThreeColumnDataUsage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnDataUsage.swift; sourceTree = "<group>"; };
|
8DDD6C1C244D90B8006A2232 /* ListThreeColumnDataUsage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnDataUsage.swift; sourceTree = "<group>"; };
|
||||||
8DDD6C1E244D90E1006A2232 /* ListThreeColumnDataUsageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnDataUsageModel.swift; sourceTree = "<group>"; };
|
8DDD6C1E244D90E1006A2232 /* ListThreeColumnDataUsageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnDataUsageModel.swift; sourceTree = "<group>"; };
|
||||||
|
8DE5BECC2456F7A200772E76 /* ListTwoColumnDropdownSelectorsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListTwoColumnDropdownSelectorsModel.swift; sourceTree = "<group>"; };
|
||||||
|
8DE5BECE2456F7B100772E76 /* ListTwoColumnDropdownSelectors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListTwoColumnDropdownSelectors.swift; sourceTree = "<group>"; };
|
||||||
8DEFA95B243DAC20000D27E5 /* ListThreeColumnDataUsageDividerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnDataUsageDividerModel.swift; sourceTree = "<group>"; };
|
8DEFA95B243DAC20000D27E5 /* ListThreeColumnDataUsageDividerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnDataUsageDividerModel.swift; sourceTree = "<group>"; };
|
||||||
8DEFA95D243DAC2F000D27E5 /* ListThreeColumnDataUsageDivider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnDataUsageDivider.swift; sourceTree = "<group>"; };
|
8DEFA95D243DAC2F000D27E5 /* ListThreeColumnDataUsageDivider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListThreeColumnDataUsageDivider.swift; sourceTree = "<group>"; };
|
||||||
9402C34F23A2CEA3004B974C /* LeftRightLabelModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftRightLabelModel.swift; sourceTree = "<group>"; };
|
9402C34F23A2CEA3004B974C /* LeftRightLabelModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LeftRightLabelModel.swift; sourceTree = "<group>"; };
|
||||||
@ -1284,6 +1288,8 @@
|
|||||||
526A265D240D200500B0D828 /* ListTwoColumnCompareChanges.swift */,
|
526A265D240D200500B0D828 /* ListTwoColumnCompareChanges.swift */,
|
||||||
525239BF2407BCFF00454969 /* ListTwoColumnPriceDetailsModel.swift */,
|
525239BF2407BCFF00454969 /* ListTwoColumnPriceDetailsModel.swift */,
|
||||||
525239C12407BD1000454969 /* ListTwoColumnPriceDetails.swift */,
|
525239C12407BD1000454969 /* ListTwoColumnPriceDetails.swift */,
|
||||||
|
8DE5BECC2456F7A200772E76 /* ListTwoColumnDropdownSelectorsModel.swift */,
|
||||||
|
8DE5BECE2456F7B100772E76 /* ListTwoColumnDropdownSelectors.swift */,
|
||||||
);
|
);
|
||||||
path = TwoColumn;
|
path = TwoColumn;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -2072,6 +2078,7 @@
|
|||||||
0A7BAFA1232BE61800FB8E22 /* Checkbox.swift in Sources */,
|
0A7BAFA1232BE61800FB8E22 /* Checkbox.swift in Sources */,
|
||||||
011B58F023A2AA980085F53C /* ListItemModelProtocol.swift in Sources */,
|
011B58F023A2AA980085F53C /* ListItemModelProtocol.swift in Sources */,
|
||||||
D22479962316AF6E003FCCF9 /* HeadlineBodyLink.swift in Sources */,
|
D22479962316AF6E003FCCF9 /* HeadlineBodyLink.swift in Sources */,
|
||||||
|
8DE5BECD2456F7A200772E76 /* ListTwoColumnDropdownSelectorsModel.swift in Sources */,
|
||||||
0A41BA7F23453A6400D4C0BC /* TextEntryField.swift in Sources */,
|
0A41BA7F23453A6400D4C0BC /* TextEntryField.swift in Sources */,
|
||||||
BB55B51D244482C1002001AD /* ListRightVariablePriceChangeBodyText.swift in Sources */,
|
BB55B51D244482C1002001AD /* ListRightVariablePriceChangeBodyText.swift in Sources */,
|
||||||
017BEB382360C6AC0024EF95 /* RadioButtonLabel.swift in Sources */,
|
017BEB382360C6AC0024EF95 /* RadioButtonLabel.swift in Sources */,
|
||||||
@ -2160,6 +2167,7 @@
|
|||||||
D260105F23D0BFFC00764D80 /* StackItem.swift in Sources */,
|
D260105F23D0BFFC00764D80 /* StackItem.swift in Sources */,
|
||||||
9432A79F23DB47BA00719041 /* EntryFieldContainer.swift in Sources */,
|
9432A79F23DB47BA00719041 /* EntryFieldContainer.swift in Sources */,
|
||||||
01EB369323609801006832FA /* HeaderModel.swift in Sources */,
|
01EB369323609801006832FA /* HeaderModel.swift in Sources */,
|
||||||
|
8DE5BECF2456F7B100772E76 /* ListTwoColumnDropdownSelectors.swift in Sources */,
|
||||||
D2E1FADF2268B8E700AEFD8C /* ThreeLayerTableViewController.swift in Sources */,
|
D2E1FADF2268B8E700AEFD8C /* ThreeLayerTableViewController.swift in Sources */,
|
||||||
0A21DB83235DFBC500C160A2 /* MdnEntryField.swift in Sources */,
|
0A21DB83235DFBC500C160A2 /* MdnEntryField.swift in Sources */,
|
||||||
0AE98BB723FF18E9004C5109 /* ArrowModel.swift in Sources */,
|
0AE98BB723FF18E9004C5109 /* ArrowModel.swift in Sources */,
|
||||||
|
|||||||
@ -156,6 +156,7 @@ import Foundation
|
|||||||
MoleculeObjectMapping.shared()?.register(viewClass: ListTwoColumnCompareChanges.self, viewModelClass: ListTwoColumnCompareChangesModel.self)
|
MoleculeObjectMapping.shared()?.register(viewClass: ListTwoColumnCompareChanges.self, viewModelClass: ListTwoColumnCompareChangesModel.self)
|
||||||
MoleculeObjectMapping.shared()?.register(viewClass: ListTwoColumnPriceDetails.self, viewModelClass: ListTwoColumnPriceDetailsModel.self)
|
MoleculeObjectMapping.shared()?.register(viewClass: ListTwoColumnPriceDetails.self, viewModelClass: ListTwoColumnPriceDetailsModel.self)
|
||||||
MoleculeObjectMapping.shared()?.register(viewClass: ListTwoColumnPriceDescription.self, viewModelClass: ListTwoColumnPriceDescriptionModel.self)
|
MoleculeObjectMapping.shared()?.register(viewClass: ListTwoColumnPriceDescription.self, viewModelClass: ListTwoColumnPriceDescriptionModel.self)
|
||||||
|
MoleculeObjectMapping.shared()?.register(viewClass: ListTwoColumnDropdownSelectors.self, viewModelClass: ListTwoColumnDropdownSelectorsModel.self)
|
||||||
MoleculeObjectMapping.shared()?.register(viewClass: ListThreeColumnInternationalData.self, viewModelClass: ListThreeColumnInternationalDataModel.self)
|
MoleculeObjectMapping.shared()?.register(viewClass: ListThreeColumnInternationalData.self, viewModelClass: ListThreeColumnInternationalDataModel.self)
|
||||||
MoleculeObjectMapping.shared()?.register(viewClass: ListThreeColumnDataUsage.self, viewModelClass: ListThreeColumnDataUsageModel.self)
|
MoleculeObjectMapping.shared()?.register(viewClass: ListThreeColumnDataUsage.self, viewModelClass: ListThreeColumnDataUsageModel.self)
|
||||||
MoleculeObjectMapping.shared()?.register(viewClass: ListFourColumnDataUsageListItem.self, viewModelClass: ListFourColumnDataUsageListItemModel.self)
|
MoleculeObjectMapping.shared()?.register(viewClass: ListFourColumnDataUsageListItem.self, viewModelClass: ListFourColumnDataUsageListItemModel.self)
|
||||||
|
|||||||
@ -0,0 +1,61 @@
|
|||||||
|
//
|
||||||
|
// ListTwoColumnDropdownSelectors.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Kruthika KP on 27/04/20.
|
||||||
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
@objcMembers public class ListTwoColumnDropdownSelectors: TableViewCell {
|
||||||
|
|
||||||
|
//-------------------------------------------------------
|
||||||
|
// MARK: - Outlets
|
||||||
|
//-------------------------------------------------------
|
||||||
|
|
||||||
|
public let leftDropDown = ItemDropdownEntryField()
|
||||||
|
public let rightDropDown = ItemDropdownEntryField()
|
||||||
|
var stack: Stack<StackModel>
|
||||||
|
|
||||||
|
//-------------------------------------------------------
|
||||||
|
// MARK: - Initializers
|
||||||
|
//-------------------------------------------------------
|
||||||
|
|
||||||
|
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||||
|
stack = Stack<StackModel>.createStack(with: [(view: leftDropDown, model: StackItemModel(percent: 50, horizontalAlignment: .fill)),
|
||||||
|
(view: rightDropDown, model: StackItemModel(percent: 50, horizontalAlignment: .fill))],
|
||||||
|
axis: .horizontal, spacing: 9)
|
||||||
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||||
|
}
|
||||||
|
|
||||||
|
public required init?(coder aDecoder: NSCoder) {
|
||||||
|
fatalError("init(coder:) has not been implemented")
|
||||||
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------
|
||||||
|
// MARK: - View Lifecycle
|
||||||
|
//-------------------------------------------------------
|
||||||
|
|
||||||
|
open override func setupView() {
|
||||||
|
super.setupView()
|
||||||
|
addMolecule(stack)
|
||||||
|
stack.restack()
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------
|
||||||
|
// MARK: - Molecule
|
||||||
|
//------------------------------------------------------
|
||||||
|
|
||||||
|
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||||
|
super.set(with: model, delegateObject, additionalData)
|
||||||
|
guard let model = model as? ListTwoColumnDropdownSelectorsModel else { return }
|
||||||
|
leftDropDown.set(with:model.leftDropDown, delegateObject, additionalData)
|
||||||
|
rightDropDown.set(with:model.rightDropDown, delegateObject, additionalData)
|
||||||
|
}
|
||||||
|
|
||||||
|
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||||
|
return 121
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
//
|
||||||
|
// ListTwoColumnDropdownSelectorsModel.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Kruthika KP on 27/04/20.
|
||||||
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
public class ListTwoColumnDropdownSelectorsModel: ListItemModel, MoleculeModelProtocol {
|
||||||
|
|
||||||
|
public static var identifier: String = "list2CDrpDrp1"
|
||||||
|
public var leftDropDown: ItemDropdownEntryFieldModel
|
||||||
|
public var rightDropDown: ItemDropdownEntryFieldModel
|
||||||
|
|
||||||
|
// Defaults to set
|
||||||
|
override public func setDefaults() {
|
||||||
|
if useHorizontalMargins == nil {
|
||||||
|
useHorizontalMargins = true
|
||||||
|
}
|
||||||
|
if useVerticalMargins == nil {
|
||||||
|
useVerticalMargins = true
|
||||||
|
}
|
||||||
|
if topPadding == nil {
|
||||||
|
topPadding = 20
|
||||||
|
}
|
||||||
|
if bottomPadding == nil {
|
||||||
|
bottomPadding = 0
|
||||||
|
}
|
||||||
|
if line == nil {
|
||||||
|
line = LineModel(type: .none)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(leftDropDown: ItemDropdownEntryFieldModel, rightDropDown: ItemDropdownEntryFieldModel) {
|
||||||
|
self.leftDropDown = leftDropDown
|
||||||
|
self.rightDropDown = rightDropDown
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case moleculeName
|
||||||
|
case leftDropDown
|
||||||
|
case rightDropDown
|
||||||
|
}
|
||||||
|
|
||||||
|
required public init(from decoder: Decoder) throws {
|
||||||
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
leftDropDown = try typeContainer.decode(ItemDropdownEntryFieldModel.self, forKey: .leftDropDown)
|
||||||
|
rightDropDown = try typeContainer.decode(ItemDropdownEntryFieldModel.self, forKey: .rightDropDown)
|
||||||
|
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(leftDropDown, forKey: .leftDropDown)
|
||||||
|
try container.encode(rightDropDown, forKey: .rightDropDown)
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user