Molecule-ThreeColumnPlanDataDividerList
This commit is contained in:
parent
6fa74c11cf
commit
593bae7820
@ -95,6 +95,8 @@
|
|||||||
0AE14F64238315D2005417F8 /* TextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE14F63238315D2005417F8 /* TextField.swift */; };
|
0AE14F64238315D2005417F8 /* TextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE14F63238315D2005417F8 /* TextField.swift */; };
|
||||||
31BE15CB23D8924D00452370 /* CheckboxLabelModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31BE15C923D8924C00452370 /* CheckboxLabelModel.swift */; };
|
31BE15CB23D8924D00452370 /* CheckboxLabelModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31BE15C923D8924C00452370 /* CheckboxLabelModel.swift */; };
|
||||||
31BE15CC23D8924D00452370 /* CheckboxModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31BE15CA23D8924C00452370 /* CheckboxModel.swift */; };
|
31BE15CC23D8924D00452370 /* CheckboxModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31BE15CA23D8924C00452370 /* CheckboxModel.swift */; };
|
||||||
|
52DD6C6B23E97B040011ECB2 /* ThreeColumnPlanDataDividerListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52DD6C6A23E97B040011ECB2 /* ThreeColumnPlanDataDividerListModel.swift */; };
|
||||||
|
52DD6C6D23E97B5E0011ECB2 /* ThreeColumnPlanDataDividerList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52DD6C6C23E97B5E0011ECB2 /* ThreeColumnPlanDataDividerList.swift */; };
|
||||||
9432A79F23DB47BA00719041 /* EntryFieldContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9432A79E23DB47BA00719041 /* EntryFieldContainer.swift */; };
|
9432A79F23DB47BA00719041 /* EntryFieldContainer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9432A79E23DB47BA00719041 /* EntryFieldContainer.swift */; };
|
||||||
943784F5236B77BB006A1E82 /* GraphView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F3236B77BB006A1E82 /* GraphView.swift */; };
|
943784F5236B77BB006A1E82 /* GraphView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F3236B77BB006A1E82 /* GraphView.swift */; };
|
||||||
943784F6236B77BB006A1E82 /* GraphViewAnimationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F4236B77BB006A1E82 /* GraphViewAnimationHandler.swift */; };
|
943784F6236B77BB006A1E82 /* GraphViewAnimationHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 943784F4236B77BB006A1E82 /* GraphViewAnimationHandler.swift */; };
|
||||||
@ -408,6 +410,8 @@
|
|||||||
0AE14F63238315D2005417F8 /* TextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = "<group>"; };
|
0AE14F63238315D2005417F8 /* TextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = "<group>"; };
|
||||||
31BE15C923D8924C00452370 /* CheckboxLabelModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckboxLabelModel.swift; sourceTree = "<group>"; };
|
31BE15C923D8924C00452370 /* CheckboxLabelModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckboxLabelModel.swift; sourceTree = "<group>"; };
|
||||||
31BE15CA23D8924C00452370 /* CheckboxModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckboxModel.swift; sourceTree = "<group>"; };
|
31BE15CA23D8924C00452370 /* CheckboxModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckboxModel.swift; sourceTree = "<group>"; };
|
||||||
|
52DD6C6A23E97B040011ECB2 /* ThreeColumnPlanDataDividerListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThreeColumnPlanDataDividerListModel.swift; sourceTree = "<group>"; };
|
||||||
|
52DD6C6C23E97B5E0011ECB2 /* ThreeColumnPlanDataDividerList.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThreeColumnPlanDataDividerList.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>"; };
|
||||||
9432A79E23DB47BA00719041 /* EntryFieldContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EntryFieldContainer.swift; sourceTree = "<group>"; };
|
9432A79E23DB47BA00719041 /* EntryFieldContainer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = EntryFieldContainer.swift; sourceTree = "<group>"; };
|
||||||
943784F3236B77BB006A1E82 /* GraphView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphView.swift; sourceTree = "<group>"; };
|
943784F3236B77BB006A1E82 /* GraphView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GraphView.swift; sourceTree = "<group>"; };
|
||||||
@ -873,6 +877,8 @@
|
|||||||
D28A837E23CCA96400DFE4FC /* TabsModel.swift */,
|
D28A837E23CCA96400DFE4FC /* TabsModel.swift */,
|
||||||
94F217B423E0BF6100A47C06 /* PrimaryButtonView.h */,
|
94F217B423E0BF6100A47C06 /* PrimaryButtonView.h */,
|
||||||
94F217B523E0BF6100A47C06 /* PrimaryButtonView.m */,
|
94F217B523E0BF6100A47C06 /* PrimaryButtonView.m */,
|
||||||
|
52DD6C6A23E97B040011ECB2 /* ThreeColumnPlanDataDividerListModel.swift */,
|
||||||
|
52DD6C6C23E97B5E0011ECB2 /* ThreeColumnPlanDataDividerList.swift */,
|
||||||
);
|
);
|
||||||
path = HorizontalCombinationViews;
|
path = HorizontalCombinationViews;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -1636,6 +1642,7 @@
|
|||||||
0A7EF86723D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift in Sources */,
|
0A7EF86723D8B0AE00B2AAD1 /* DateDropdownEntryFieldModel.swift in Sources */,
|
||||||
94FB966323D797DA003D482B /* MFTextButton.m in Sources */,
|
94FB966323D797DA003D482B /* MFTextButton.m in Sources */,
|
||||||
D260105323CEA61600764D80 /* ToggleModel.swift in Sources */,
|
D260105323CEA61600764D80 /* ToggleModel.swift in Sources */,
|
||||||
|
52DD6C6B23E97B040011ECB2 /* ThreeColumnPlanDataDividerListModel.swift in Sources */,
|
||||||
014AA72523C501E2006F3E93 /* ContainerModel.swift in Sources */,
|
014AA72523C501E2006F3E93 /* ContainerModel.swift in Sources */,
|
||||||
0A7EF86523D8AFFF00B2AAD1 /* ItemDropdownEntryFieldModel.swift in Sources */,
|
0A7EF86523D8AFFF00B2AAD1 /* ItemDropdownEntryFieldModel.swift in Sources */,
|
||||||
D29DF2EF21ECEAE1003B2FB9 /* MFFonts.m in Sources */,
|
D29DF2EF21ECEAE1003B2FB9 /* MFFonts.m in Sources */,
|
||||||
@ -1714,6 +1721,7 @@
|
|||||||
D2E1FADF2268B8E700AEFD8C /* ThreeLayerTableViewController.swift in Sources */,
|
D2E1FADF2268B8E700AEFD8C /* ThreeLayerTableViewController.swift in Sources */,
|
||||||
0A21DB83235DFBC500C160A2 /* MdnEntryField.swift in Sources */,
|
0A21DB83235DFBC500C160A2 /* MdnEntryField.swift in Sources */,
|
||||||
D28A837D23CCA86A00DFE4FC /* TabsListItemModel.swift in Sources */,
|
D28A837D23CCA86A00DFE4FC /* TabsListItemModel.swift in Sources */,
|
||||||
|
52DD6C6D23E97B5E0011ECB2 /* ThreeColumnPlanDataDividerList.swift in Sources */,
|
||||||
012A88C6238DA34000FE3DA1 /* ModuleMoleculeModel.swift in Sources */,
|
012A88C6238DA34000FE3DA1 /* ModuleMoleculeModel.swift in Sources */,
|
||||||
94C2D9A123872BCC0006CF46 /* LabelAttributeUnderlineModel.swift in Sources */,
|
94C2D9A123872BCC0006CF46 /* LabelAttributeUnderlineModel.swift in Sources */,
|
||||||
D20A9A5E2243D3E300ADE781 /* TwoButtonView.swift in Sources */,
|
D20A9A5E2243D3E300ADE781 /* TwoButtonView.swift in Sources */,
|
||||||
|
|||||||
@ -0,0 +1,91 @@
|
|||||||
|
//
|
||||||
|
// ThreeColumnPlanDataDividerList.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Acharya, Subhankar on 04/02/20.
|
||||||
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
@objcMembers open class ThreeColumnPlanDataDividerList: TableViewCell {
|
||||||
|
|
||||||
|
let leftHeadlineBody = HeadlineBody(frame: .zero)
|
||||||
|
let centerHeadLineBody = HeadlineBody(frame: .zero)
|
||||||
|
let rightHeadLineBody = HeadlineBody(frame: .zero)
|
||||||
|
let containerView = ViewConstrainingView()
|
||||||
|
let betweenHeadlineBodyPaddingConstant: CGFloat = 18.0
|
||||||
|
let headlineBodyTopPaddingConstant: CGFloat = 48.0
|
||||||
|
let containerViewPaddingConstant: CGFloat = 30.0
|
||||||
|
|
||||||
|
// MARK: - Initialization
|
||||||
|
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
|
||||||
|
super.init(style: style, reuseIdentifier: reuseIdentifier)
|
||||||
|
setupView()
|
||||||
|
}
|
||||||
|
required public init?(coder aDecoder: NSCoder) {
|
||||||
|
super.init(coder: aDecoder)
|
||||||
|
}
|
||||||
|
// MARK: - MFViewProtocol
|
||||||
|
open override func updateView(_ size: CGFloat) {
|
||||||
|
super.updateView(size)
|
||||||
|
containerView.updateView(size)
|
||||||
|
leftHeadlineBody.updateView(size)
|
||||||
|
centerHeadLineBody.updateView(size)
|
||||||
|
rightHeadLineBody.updateView(size)
|
||||||
|
}
|
||||||
|
open override func setupView() {
|
||||||
|
super.setupView()
|
||||||
|
selectionStyle = .default
|
||||||
|
guard leftHeadlineBody.superview == nil else {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
containerView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
contentView.addSubview(containerView)
|
||||||
|
contentView.heightAnchor.constraint(greaterThanOrEqualToConstant: 103.0).isActive = true
|
||||||
|
containerView.pinView(toSuperView: contentView)
|
||||||
|
containerView.addSubview(leftHeadlineBody)
|
||||||
|
containerView.addSubview(centerHeadLineBody)
|
||||||
|
containerView.addSubview(rightHeadLineBody)
|
||||||
|
//width calculation of headlinebody
|
||||||
|
let constraint = rightHeadLineBody.widthAnchor.constraint(equalTo: containerView.widthAnchor, multiplier: 0.25)
|
||||||
|
constraint.isActive = true
|
||||||
|
rightHeadLineBody.setContentHuggingPriority(UILayoutPriority(rawValue: 900), for: .horizontal)
|
||||||
|
centerHeadLineBody.widthAnchor.constraint(equalTo: rightHeadLineBody.widthAnchor).isActive = true
|
||||||
|
leftHeadlineBody.widthAnchor.constraint(equalTo: rightHeadLineBody.widthAnchor).isActive = true
|
||||||
|
//Constraints of headlinebody to superview
|
||||||
|
leftHeadlineBody.topAnchor.constraint(equalTo: containerView.topAnchor, constant: headlineBodyTopPaddingConstant).isActive = true
|
||||||
|
centerHeadLineBody.topAnchor.constraint(equalTo: containerView.topAnchor, constant: headlineBodyTopPaddingConstant).isActive = true
|
||||||
|
rightHeadLineBody.topAnchor.constraint(equalTo: containerView.topAnchor, constant: headlineBodyTopPaddingConstant).isActive = true
|
||||||
|
|
||||||
|
containerView.bottomAnchor.constraint(equalTo: leftHeadlineBody.bottomAnchor).isActive = true
|
||||||
|
containerView.bottomAnchor.constraint(equalTo: centerHeadLineBody.bottomAnchor).isActive = true
|
||||||
|
containerView.bottomAnchor.constraint(equalTo: rightHeadLineBody.bottomAnchor).isActive = true
|
||||||
|
|
||||||
|
leftHeadlineBody.leadingAnchor.constraint(equalTo: containerView.leadingAnchor, constant: containerViewPaddingConstant).isActive = true
|
||||||
|
centerHeadLineBody.leadingAnchor.constraint(equalTo: leftHeadlineBody.trailingAnchor, constant: betweenHeadlineBodyPaddingConstant).isActive = true
|
||||||
|
rightHeadLineBody.leadingAnchor.constraint(equalTo: centerHeadLineBody.trailingAnchor, constant: betweenHeadlineBodyPaddingConstant).isActive = true
|
||||||
|
rightHeadLineBody.trailingAnchor.constraint(equalTo: containerView.trailingAnchor, constant: -containerViewPaddingConstant).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? ThreeColumnPlanDataDividerListModel else { return }
|
||||||
|
leftHeadlineBody.setWithModel(model.leftHeadlineBody, delegateObject, additionalData)
|
||||||
|
centerHeadLineBody.setWithModel(model.centerHeadlineBody, delegateObject, additionalData)
|
||||||
|
centerHeadLineBody.isHidden = model.centerHeadlineBody == nil
|
||||||
|
rightHeadLineBody.setWithModel(model.rightHeadlineBody, delegateObject, additionalData)
|
||||||
|
}
|
||||||
|
open override func reset() {
|
||||||
|
super.reset()
|
||||||
|
containerView.reset()
|
||||||
|
leftHeadlineBody.reset()
|
||||||
|
centerHeadLineBody.reset()
|
||||||
|
rightHeadLineBody.reset()
|
||||||
|
}
|
||||||
|
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||||
|
return 103
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
//
|
||||||
|
// ThreeColumnPlanDataDividerListModel.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Acharya, Subhankar on 04/02/20.
|
||||||
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
public class ThreeColumnPlanDataDividerListModel: ContainerModel, ListItemModelProtocol {
|
||||||
|
public var hideArrow: Bool?
|
||||||
|
public var style: String?
|
||||||
|
public var line: LineModel?
|
||||||
|
public var backgroundColor: Color?
|
||||||
|
public static var identifier: String = "list3CHBDiv"
|
||||||
|
public var leftHeadlineBody: HeadlineBodyModel
|
||||||
|
public var centerHeadlineBody: HeadlineBodyModel?
|
||||||
|
public var rightHeadlineBody: HeadlineBodyModel
|
||||||
|
|
||||||
|
init(leftheadlineBody: HeadlineBodyModel, rightHeadLineBody: HeadlineBodyModel) {
|
||||||
|
self.leftHeadlineBody = leftheadlineBody
|
||||||
|
self.rightHeadlineBody = rightHeadLineBody
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
|
private enum CodingKeys: String, CodingKey {
|
||||||
|
case style
|
||||||
|
case moleculeName
|
||||||
|
case leftHeadlineBody
|
||||||
|
case centerHeadlineBody
|
||||||
|
case rightHeadlineBody
|
||||||
|
}
|
||||||
|
required public init(from decoder: Decoder) throws {
|
||||||
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
|
style = try typeContainer.decodeIfPresent(String.self, forKey: .style)
|
||||||
|
leftHeadlineBody = try typeContainer.decode(HeadlineBodyModel.self, forKey: .leftHeadlineBody)
|
||||||
|
centerHeadlineBody = try typeContainer.decodeIfPresent(HeadlineBodyModel.self, forKey: .centerHeadlineBody)
|
||||||
|
rightHeadlineBody = try typeContainer.decode(HeadlineBodyModel.self, forKey: .rightHeadlineBody)
|
||||||
|
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.encodeIfPresent(style, forKey: .style)
|
||||||
|
try container.encode(ThreeColumnPlanDataDividerListModel.identifier, forKey: .moleculeName)
|
||||||
|
try container.encode(leftHeadlineBody, forKey: .leftHeadlineBody)
|
||||||
|
try container.encodeIfPresent(centerHeadlineBody, forKey: .centerHeadlineBody)
|
||||||
|
try container.encode(rightHeadlineBody, forKey: .rightHeadlineBody)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@ -55,6 +55,8 @@ import Foundation
|
|||||||
// Horizontal Combination Molecules
|
// Horizontal Combination Molecules
|
||||||
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: ThreeColumnPlanDataDividerList.self, viewModelClass: ThreeColumnPlanDataDividerListModel.self)
|
||||||
|
|
||||||
|
|
||||||
// Vertical Combination Molecules
|
// Vertical Combination Molecules
|
||||||
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: HeadlineBody.self, viewModelClass: HeadlineBodyModel.self)
|
MVMCoreUIMoleculeMappingObject.shared()?.register(viewClass: HeadlineBody.self, viewModelClass: HeadlineBodyModel.self)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user