move files

This commit is contained in:
Pfeil, Scott Robert 2020-04-01 10:42:12 -04:00
parent 5a3ff449df
commit bcf09b6fb8
3 changed files with 92 additions and 0 deletions

View File

@ -131,6 +131,7 @@ import Foundation
MoleculeObjectMapping.shared()?.register(viewClass: ListRVWheel.self, viewModelClass: ListRVWheelModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListRightVariablePayments.self, viewModelClass: ListRightVariablePaymentsModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListRightVariableTotalData.self, viewModelClass: ListRightVariableTotalDataModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListRightVariableTextLinkAllTextAndLinks.self, viewModelClass: ListRightVariableTextLinkAllTextAndLinksModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListOneColumnFullWidthTextAllTextAndLinks.self, viewModelClass: ListOneColumnFullWidthTextAllTextAndLinksModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListOneColumnFullWidthTextBodyText.self, viewModelClass: ListOneColumnFullWidthTextBodyTextModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListTwoColumnCompareChanges.self, viewModelClass: ListTwoColumnCompareChangesModel.self)

View File

@ -0,0 +1,50 @@
//
// ListRightVariableTextLinkAllTextAndLinks.swift
// MVMCoreUI
//
// Created by Dhamodaram Nandi on 19/03/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
@objcMembers open class ListRightVariableTextLinkAllTextAndLinks: TableViewCell {
//-----------------------------------------------------
// MARK: - Outlets
//-----------------------------------------------------
public var stack: Stack<StackModel>
public let link = Link(frame: .zero)
public let eyebrowHeadlineBodyLink = EyebrowHeadlineBodyLink(frame: .zero)
// MARK: - Initializers
public override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
stack = Stack<StackModel>.createStack(with: [(view: eyebrowHeadlineBodyLink, model: StackItemModel(horizontalAlignment: .leading, verticalAlignment: .top)),
(view: link, model: StackItemModel(horizontalAlignment:.fill, verticalAlignment: .top))],
axis: .horizontal)
super.init(style: style, reuseIdentifier: reuseIdentifier)
}
public required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
//-----------------------------------------------------
// MARK: - View Lifecycle
//-----------------------------------------------------
override open func setupView() {
super.setupView()
addMolecule(stack)
stack.restack()
}
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
super.set(with: model, delegateObject, additionalData)
guard let model = model as? ListRightVariableTextLinkAllTextAndLinksModel else { return }
link.set(with: model.link, delegateObject, additionalData)
eyebrowHeadlineBodyLink.set(with: model.eyebrowHeadlineBodyLink, delegateObject, additionalData)
}
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
return 90
}
}

View File

@ -0,0 +1,41 @@
//
// ListRightVariableTextLinkAllTextAndLinksModel.swift
// MVMCoreUI
//
// Created by Dhamodaram Nandi on 19/03/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
public class ListRightVariableTextLinkAllTextAndLinksModel: ListItemModel, MoleculeModelProtocol {
public static var identifier: String = "listRVLink"
public var link: LinkModel
public var eyebrowHeadlineBodyLink: EyebrowHeadlineBodyLinkModel
public init(link: LinkModel, eyebrowHeadlineBodyLink: EyebrowHeadlineBodyLinkModel) {
self.link = link
self.eyebrowHeadlineBodyLink = eyebrowHeadlineBodyLink
super.init()
}
private enum CodingKeys: String, CodingKey {
case moleculeName
case link
case eyebrowHeadlineBodyLink
}
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
link = try typeContainer.decode(LinkModel.self, forKey: .link)
eyebrowHeadlineBodyLink = try typeContainer.decode(EyebrowHeadlineBodyLinkModel.self, forKey: .eyebrowHeadlineBodyLink)
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(link, forKey: .link)
try container.encode(eyebrowHeadlineBodyLink, forKey: .eyebrowHeadlineBodyLink)
}
}