renaming
This commit is contained in:
parent
42b57dcd5d
commit
f5ed509a39
@ -17,9 +17,9 @@
|
||||
011B58F423A2CCC80085F53C /* DropDownModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 011B58F323A2CCC80085F53C /* DropDownModel.swift */; };
|
||||
012A889C23889E8400FE3DA1 /* TemplateModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A889B23889E8400FE3DA1 /* TemplateModelProtocol.swift */; };
|
||||
012A88AD238C418100FE3DA1 /* TemplateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A88AC238C418100FE3DA1 /* TemplateProtocol.swift */; };
|
||||
012A88B1238C880100FE3DA1 /* PagingMoleculeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A88B0238C880100FE3DA1 /* PagingMoleculeProtocol.swift */; };
|
||||
012A88B1238C880100FE3DA1 /* CarouselPagingModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A88B0238C880100FE3DA1 /* CarouselPagingModelProtocol.swift */; };
|
||||
012A88C2238D7BCA00FE3DA1 /* CarouselItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A88C1238D7BCA00FE3DA1 /* CarouselItemModel.swift */; };
|
||||
012A88C4238D86E600FE3DA1 /* CollectionCellMoleculeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A88C3238D86E600FE3DA1 /* CollectionCellMoleculeProtocol.swift */; };
|
||||
012A88C4238D86E600FE3DA1 /* CarouselItemModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A88C3238D86E600FE3DA1 /* CarouselItemModelProtocol.swift */; };
|
||||
012A88C6238DA34000FE3DA1 /* ModuleMoleculeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A88C5238DA34000FE3DA1 /* ModuleMoleculeModel.swift */; };
|
||||
012A88C8238DB02000FE3DA1 /* ModelMoleculeDelegateProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A88C7238DB02000FE3DA1 /* ModelMoleculeDelegateProtocol.swift */; };
|
||||
012A88DB238ED45900FE3DA1 /* CarouselModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012A88AE238C626E00FE3DA1 /* CarouselModel.swift */; };
|
||||
@ -52,7 +52,7 @@
|
||||
0198F7A82256A80B0066C936 /* MFRadioButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 0198F7A22256A80A0066C936 /* MFRadioButton.m */; };
|
||||
01C851D323CF9E740021F976 /* LabelToggleModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01C851D223CF9E740021F976 /* LabelToggleModel.swift */; };
|
||||
01E569D3223FFFA500327251 /* ThreeLayerViewController.swift in Headers */ = {isa = PBXBuildFile; fileRef = D2A5146A2214905000345BFB /* ThreeLayerViewController.swift */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
01EB3684236097C0006832FA /* MoleculeProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB3683236097C0006832FA /* MoleculeProtocol.swift */; };
|
||||
01EB3684236097C0006832FA /* MoleculeModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB3683236097C0006832FA /* MoleculeModelProtocol.swift */; };
|
||||
01EB368F23609801006832FA /* LabelModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368823609801006832FA /* LabelModel.swift */; };
|
||||
01EB369023609801006832FA /* ListItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368923609801006832FA /* ListItemModel.swift */; };
|
||||
01EB369223609801006832FA /* MoleculeStackModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368B23609801006832FA /* MoleculeStackModel.swift */; };
|
||||
@ -320,9 +320,9 @@
|
||||
012A889B23889E8400FE3DA1 /* TemplateModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateModelProtocol.swift; sourceTree = "<group>"; };
|
||||
012A88AC238C418100FE3DA1 /* TemplateProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TemplateProtocol.swift; sourceTree = "<group>"; };
|
||||
012A88AE238C626E00FE3DA1 /* CarouselModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselModel.swift; sourceTree = "<group>"; };
|
||||
012A88B0238C880100FE3DA1 /* PagingMoleculeProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PagingMoleculeProtocol.swift; sourceTree = "<group>"; };
|
||||
012A88B0238C880100FE3DA1 /* CarouselPagingModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselPagingModelProtocol.swift; sourceTree = "<group>"; };
|
||||
012A88C1238D7BCA00FE3DA1 /* CarouselItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselItemModel.swift; sourceTree = "<group>"; };
|
||||
012A88C3238D86E600FE3DA1 /* CollectionCellMoleculeProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionCellMoleculeProtocol.swift; sourceTree = "<group>"; };
|
||||
012A88C3238D86E600FE3DA1 /* CarouselItemModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CarouselItemModelProtocol.swift; sourceTree = "<group>"; };
|
||||
012A88C5238DA34000FE3DA1 /* ModuleMoleculeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModuleMoleculeModel.swift; sourceTree = "<group>"; };
|
||||
012A88C7238DB02000FE3DA1 /* ModelMoleculeDelegateProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModelMoleculeDelegateProtocol.swift; sourceTree = "<group>"; };
|
||||
012A88EB238F084D00FE3DA1 /* FooterModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FooterModel.swift; sourceTree = "<group>"; };
|
||||
@ -353,7 +353,7 @@
|
||||
0198F7A02256A80A0066C936 /* MFRadioButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MFRadioButton.h; sourceTree = "<group>"; };
|
||||
0198F7A22256A80A0066C936 /* MFRadioButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MFRadioButton.m; sourceTree = "<group>"; };
|
||||
01C851D223CF9E740021F976 /* LabelToggleModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelToggleModel.swift; sourceTree = "<group>"; };
|
||||
01EB3683236097C0006832FA /* MoleculeProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoleculeProtocol.swift; sourceTree = "<group>"; };
|
||||
01EB3683236097C0006832FA /* MoleculeModelProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoleculeModelProtocol.swift; sourceTree = "<group>"; };
|
||||
01EB368823609801006832FA /* LabelModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LabelModel.swift; sourceTree = "<group>"; };
|
||||
01EB368923609801006832FA /* ListItemModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListItemModel.swift; sourceTree = "<group>"; };
|
||||
01EB368A23609801006832FA /* MoleculeStackItemModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoleculeStackItemModel.swift; sourceTree = "<group>"; };
|
||||
@ -633,10 +633,9 @@
|
||||
children = (
|
||||
014AA72323C501E2006F3E93 /* ContainerModelProtocol.swift */,
|
||||
017BEB4123620AD20024EF95 /* FormModelProtocol.swift */,
|
||||
012A88C3238D86E600FE3DA1 /* CollectionCellMoleculeProtocol.swift */,
|
||||
012A88B0238C880100FE3DA1 /* PagingMoleculeProtocol.swift */,
|
||||
01EB3683236097C0006832FA /* MoleculeProtocol.swift */,
|
||||
012A88AC238C418100FE3DA1 /* TemplateProtocol.swift */,
|
||||
012A88C3238D86E600FE3DA1 /* CarouselItemModelProtocol.swift */,
|
||||
012A88B0238C880100FE3DA1 /* CarouselPagingModelProtocol.swift */,
|
||||
01EB3683236097C0006832FA /* MoleculeModelProtocol.swift */,
|
||||
012A889B23889E8400FE3DA1 /* TemplateModelProtocol.swift */,
|
||||
D28A837823C7D5BC00DFE4FC /* PageModelProtocol.swift */,
|
||||
011B58EF23A2AA980085F53C /* ListItemModelProtocol.swift */,
|
||||
@ -950,6 +949,7 @@
|
||||
D29DF0DF21E418B2003B2FB9 /* Templates */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
012A88AC238C418100FE3DA1 /* TemplateProtocol.swift */,
|
||||
014AA72823C5059B006F3E93 /* StackPageTemplateModel.swift */,
|
||||
D2A5146022121FBF00345BFB /* MoleculeStackTemplate.swift */,
|
||||
014AA72923C5059B006F3E93 /* StackCenteredPageTemplateModel.swift */,
|
||||
@ -1533,7 +1533,7 @@
|
||||
C695A69623C990BC00BFB94E /* DoughnutChart.swift in Sources */,
|
||||
014AA72D23C5059B006F3E93 /* StackPageTemplateModel.swift in Sources */,
|
||||
D260106123D0C02A00764D80 /* StackItemModelProtocol.swift in Sources */,
|
||||
012A88C4238D86E600FE3DA1 /* CollectionCellMoleculeProtocol.swift in Sources */,
|
||||
012A88C4238D86E600FE3DA1 /* CarouselItemModelProtocol.swift in Sources */,
|
||||
94C2D9AB23872EB50006CF46 /* LabelAttributeActionModel.swift in Sources */,
|
||||
014AA73123C5059B006F3E93 /* ListPageTemplateModel.swift in Sources */,
|
||||
017BEB4023620A230024EF95 /* TextFieldModel.swift in Sources */,
|
||||
@ -1604,7 +1604,7 @@
|
||||
D29DF27A21E7A533003B2FB9 /* MVMCoreUISession.m in Sources */,
|
||||
D2A5146B2214905000345BFB /* ThreeLayerViewController.swift in Sources */,
|
||||
D28A838F23CCDEDE00DFE4FC /* TwoButtonViewModel.swift in Sources */,
|
||||
012A88B1238C880100FE3DA1 /* PagingMoleculeProtocol.swift in Sources */,
|
||||
012A88B1238C880100FE3DA1 /* CarouselPagingModelProtocol.swift in Sources */,
|
||||
D29DF2C921E7BFC6003B2FB9 /* MFSizeObject.m in Sources */,
|
||||
9445890E2385C3F800DE9FD4 /* MultiProgressModel.swift in Sources */,
|
||||
D2A6390522CBCE160052ED1F /* MoleculeCollectionViewCell.swift in Sources */,
|
||||
@ -1629,7 +1629,7 @@
|
||||
017BEB4A236235BA0024EF95 /* ModelMoleculeViewProtocol.swift in Sources */,
|
||||
C695A68123C9830D00BFB94E /* NumberedListModel.swift in Sources */,
|
||||
012CA99A2384A687003F810F /* MFTextField+ModelExtension.swift in Sources */,
|
||||
01EB3684236097C0006832FA /* MoleculeProtocol.swift in Sources */,
|
||||
01EB3684236097C0006832FA /* MoleculeModelProtocol.swift in Sources */,
|
||||
D27CD4102339057800C1DC07 /* EyebrowHeadlineBodyLink.swift in Sources */,
|
||||
D29DF11D21E684A9003B2FB9 /* MVMCoreUISplitViewController.m in Sources */,
|
||||
0198F79F225679880066C936 /* FormValidationProtocol.swift in Sources */,
|
||||
|
||||
@ -18,7 +18,7 @@ public enum ButtonSize: String, Codable {
|
||||
case tiny
|
||||
}
|
||||
|
||||
public class ButtonModel: MoleculeProtocol {
|
||||
public class ButtonModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "button"
|
||||
public var backgroundColor: Color?
|
||||
public var title: String
|
||||
|
||||
@ -141,7 +141,7 @@ open class CaretButton: MFCustomButton, MVMCoreUIMoleculeViewProtocol, MVMCoreUI
|
||||
}
|
||||
}
|
||||
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
guard let caretLinkModel = model as? CaretLinkModel else { return }
|
||||
if let color = caretLinkModel.backgroundColor {
|
||||
backgroundColor = color.uiColor
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
import Foundation
|
||||
import MVMCore
|
||||
|
||||
public class CaretLinkModel: MoleculeProtocol {
|
||||
public class CaretLinkModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "caretLink"
|
||||
public var backgroundColor: Color?
|
||||
public var title: String
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public class LinkModel: MoleculeProtocol {
|
||||
public class LinkModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "link"
|
||||
public var backgroundColor: Color?
|
||||
public var title: String
|
||||
|
||||
@ -10,7 +10,7 @@ import UIKit
|
||||
|
||||
// temporary until link is finished
|
||||
extension MFTextButton: ModelMoleculeViewProtocol {
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
guard let model = model as? LinkModel else { return }
|
||||
setTitle(model.title, for: .normal)
|
||||
setTitleColor(model.textColor.uiColor, for: .normal)
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
// temporary until link is finished
|
||||
extension PrimaryButton: ModelMoleculeViewProtocol {
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
guard let model = model as? ButtonModel else { return }
|
||||
setTitle(model.title, for: .normal)
|
||||
backgroundColor = model.backgroundColor?.uiColor
|
||||
|
||||
@ -16,7 +16,7 @@ enum TextType: String {
|
||||
}
|
||||
extension MFTextField: ModelMoleculeViewProtocol {
|
||||
//
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
//TODO: Need to create setWithModel in ViewConstraining View
|
||||
#warning("This below call should be repaced with super.setWithModel once we get rid of ViewConstrainingView.")
|
||||
//TODO: This below call should be repaced with super.setWithModel once we get rid of ViewConstrainingView.
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
@objcMembers public class TextFieldModel: MoleculeProtocol, FormModelProtocol {
|
||||
@objcMembers public class TextFieldModel: MoleculeModelProtocol, FormModelProtocol {
|
||||
|
||||
public static var identifier: String = "textField"
|
||||
public var backgroundColor: Color?
|
||||
|
||||
@ -188,7 +188,7 @@ open class CaretView: View {
|
||||
}
|
||||
|
||||
//MARK: - MVMCoreMoleculeViewProtocol
|
||||
override public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
override public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let caretModel = model as? CaretViewModel else {
|
||||
return
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class CaretViewModel: MoleculeProtocol {
|
||||
@objcMembers public class CaretViewModel: MoleculeModelProtocol {
|
||||
|
||||
public static var identifier: String = "caretView"
|
||||
public var backgroundColor: Color?
|
||||
|
||||
@ -16,7 +16,7 @@ public enum GraphStyle: String, Codable {
|
||||
case unlimited, safetyMode
|
||||
}
|
||||
|
||||
public class CircleProgressModel: MoleculeProtocol {
|
||||
public class CircleProgressModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "circleProgress"
|
||||
public var style: GraphStyle = .unlimited {
|
||||
didSet {
|
||||
|
||||
@ -92,7 +92,7 @@ open class DashLine: View {
|
||||
}
|
||||
|
||||
//MARK: - MVMCoreMoleculeViewProtocol
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let dashLineModel = dashModel else {
|
||||
return
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class DashLineModel: MoleculeProtocol {
|
||||
@objcMembers public class DashLineModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "dashLine"
|
||||
public var backgroundColor: Color?
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
@objcMembers public class DropDownModel: MoleculeProtocol {
|
||||
@objcMembers public class DropDownModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "dropDownModel"
|
||||
public var backgroundColor: Color?
|
||||
public var label: String
|
||||
|
||||
@ -26,7 +26,7 @@ import UIKit
|
||||
widthAnchor.constraint(equalTo: heightAnchor).isActive = true
|
||||
}
|
||||
|
||||
override open func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
override open func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let model = model as? CircleProgressModel else { return }
|
||||
createGraphCircle(model)
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class ImageViewModel: MoleculeProtocol {
|
||||
@objcMembers public class ImageViewModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "image"
|
||||
public var backgroundColor: Color?
|
||||
|
||||
|
||||
@ -219,7 +219,7 @@ public typealias ActionBlock = () -> ()
|
||||
case left
|
||||
}
|
||||
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
clauses = []
|
||||
guard let labelModel = model as? LabelModel else { return }
|
||||
attributedText = nil
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class LabelModel: MoleculeProtocol {
|
||||
@objcMembers public class LabelModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "label"
|
||||
public var moleculeName: String?
|
||||
public var backgroundColor: Color?
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
@objcMembers public class LeftRightLabelModel: MoleculeProtocol {
|
||||
@objcMembers public class LeftRightLabelModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "leftRightLabelView"
|
||||
public var backgroundColor: Color?
|
||||
public var leftText: LabelModel
|
||||
|
||||
@ -179,7 +179,7 @@ import Foundation
|
||||
|
||||
//MARK: - MVMCoreMoleculeViewProtocol
|
||||
|
||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
open override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let leftRightLabelModel = model as? LeftRightLabelModel else {
|
||||
return
|
||||
|
||||
@ -67,7 +67,7 @@ import UIKit
|
||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||
}
|
||||
|
||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
open override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
if let lineModel = model as? LineModel {
|
||||
setStyle(lineModel.type ?? .standard)
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
@objcMembers public class LineModel: MoleculeProtocol {
|
||||
@objcMembers public class LineModel: MoleculeModelProtocol {
|
||||
|
||||
/*
|
||||
The frequency of the line in a moleculeList.
|
||||
|
||||
@ -209,7 +209,7 @@ import UIKit
|
||||
}
|
||||
}
|
||||
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
guard let imageModel = model as? ImageViewModel else {
|
||||
return
|
||||
}
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
import Foundation
|
||||
|
||||
extension MFView {
|
||||
public func setUpDefaultWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setUpDefaultWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
self.model = model
|
||||
if let backgroundColor = model?.backgroundColor {
|
||||
self.backgroundColor = backgroundColor.uiColor
|
||||
@ -18,7 +18,7 @@ extension MFView {
|
||||
}
|
||||
|
||||
extension ModelMoleculeViewProtocol where Self: MFView {
|
||||
func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
setUpDefaultWithModel(model, delegateObject, additionalData)
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
// temporary until link is finished
|
||||
extension MVMCoreUISwitch: ModelMoleculeViewProtocol {
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
guard let model = model as? ToggleModel else { return }
|
||||
|
||||
if let castSelf = self as? FormValidationProtocol {
|
||||
|
||||
@ -64,7 +64,7 @@ import UIKit
|
||||
}
|
||||
|
||||
//MARK: - MVMCoreMoleculeViewProtocol
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let multiProgressModel = multiProgressModel else {
|
||||
return
|
||||
|
||||
@ -18,7 +18,7 @@ import Foundation
|
||||
}
|
||||
}
|
||||
|
||||
@objcMembers public class MultiProgressBarModel: MoleculeProtocol {
|
||||
@objcMembers public class MultiProgressBarModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "multiProgressBar"
|
||||
public var progressList: [SingleProgressBarModel]
|
||||
public var backgroundColor: Color?
|
||||
|
||||
@ -51,7 +51,7 @@ import Foundation
|
||||
}
|
||||
|
||||
//MARK: - MVMCoreMoleculeViewProtocol
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
guard let progressBarModel = model as? ProgressBarModel else {
|
||||
return
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class ProgressBarModel: MoleculeProtocol {
|
||||
@objcMembers public class ProgressBarModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "progressbar"
|
||||
@Percent public var percent: CGFloat
|
||||
public var progressColor: Color = Color(uiColor: .mfCerulean())
|
||||
|
||||
@ -333,7 +333,7 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
||||
}
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
guard let toggleModel = model as? ToggleModel else {
|
||||
return
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public class ToggleModel: MoleculeProtocol {
|
||||
public class ToggleModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "toggle"
|
||||
public var moleculeName: String?
|
||||
public var backgroundColor: Color?
|
||||
|
||||
@ -14,7 +14,7 @@ import UIKit
|
||||
//--------------------------------------------------
|
||||
|
||||
public var json: [AnyHashable: Any]?
|
||||
public var model: MoleculeProtocol?
|
||||
public var model: MoleculeModelProtocol?
|
||||
|
||||
private var initialSetupPerformed = false
|
||||
|
||||
@ -49,7 +49,7 @@ import UIKit
|
||||
}
|
||||
}
|
||||
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
self.model = model
|
||||
if let backgroundColor = model?.backgroundColor {
|
||||
self.backgroundColor = backgroundColor.uiColor
|
||||
|
||||
@ -10,7 +10,7 @@ import UIKit
|
||||
|
||||
@objcMembers open class View: UIView, ModelMoleculeViewProtocol {
|
||||
open var json: [AnyHashable: Any]?
|
||||
open var model: MoleculeProtocol?
|
||||
open var model: MoleculeModelProtocol?
|
||||
|
||||
private var initialSetupPerformed = false
|
||||
|
||||
@ -40,22 +40,22 @@ import UIKit
|
||||
}
|
||||
}
|
||||
|
||||
open func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
open func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
self.model = model
|
||||
if let backgroundColor = model?.backgroundColor {
|
||||
self.backgroundColor = backgroundColor.uiColor
|
||||
}
|
||||
}
|
||||
|
||||
public class func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
public class func nameForReuse(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
return model?.moleculeName
|
||||
}
|
||||
|
||||
public class func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
public class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return nil
|
||||
}
|
||||
|
||||
public class func requiredModules(_ molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
public class func requiredModules(_ molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
@ -16,10 +16,10 @@ extension MFViewController: MoleculeDelegateProtocol {
|
||||
return loadObject?.modulesJSON?.optionalDictionaryForKey(name)
|
||||
}
|
||||
|
||||
public func getModuleWithName(_ moduleName: String) -> MoleculeProtocol? {
|
||||
public func getModuleWithName(_ moduleName: String) -> MoleculeModelProtocol? {
|
||||
guard let moduleJSON = loadObject?.modulesJSON?.optionalDictionaryForKey(moduleName),
|
||||
let moleculeName = moduleJSON.optionalStringForKey("moleculeName"),
|
||||
let modelType = ModelRegistry.getType(for: moleculeName) as? MoleculeProtocol.Type else {
|
||||
let modelType = ModelRegistry.getType(for: moleculeName) as? MoleculeModelProtocol.Type else {
|
||||
return nil
|
||||
}
|
||||
do {
|
||||
|
||||
@ -16,7 +16,7 @@ open class Container: View, ContainerProtocol {
|
||||
}
|
||||
|
||||
// MARK:- ModelMoleculeViewProtocol
|
||||
override open func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
override open func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let containerModel = model as? ContainerModelProtocol else { return }
|
||||
containerHelper.set(with: containerModel, for: view as? MVMCoreUIViewConstrainingProtocol)
|
||||
|
||||
@ -30,7 +30,7 @@ open class MoleculeContainer: Container {
|
||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
if let casteModel = model as? MoleculeContainerModel {
|
||||
if view != nil {
|
||||
(view as? ModelMoleculeViewProtocol)?.setWithModel(casteModel.molecule, delegateObject, additionalData)
|
||||
@ -43,7 +43,7 @@ open class MoleculeContainer: Container {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
}
|
||||
|
||||
public override static func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
public override static func nameForReuse(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
guard let containerModel = model as? MoleculeContainerModel,
|
||||
let moleculeClass = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(containerModel.molecule) as? ModelMoleculeViewProtocol.Type,
|
||||
let moleculeName = moleculeClass.nameForReuse(containerModel.molecule, delegateObject) else {
|
||||
@ -52,7 +52,7 @@ open class MoleculeContainer: Container {
|
||||
return "\(model?.moleculeName ?? "moleculeContainer")<\(moleculeName)>"
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
guard let containerModel = molecule as? MoleculeContainerModel else { return 0 }
|
||||
guard let moleculeClass = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(containerModel.molecule) as? ModelMoleculeViewProtocol.Type,
|
||||
let moleculeHeight = moleculeClass.estimatedHeight(forRow: containerModel.molecule, delegateObject: delegateObject) else {
|
||||
@ -61,7 +61,7 @@ open class MoleculeContainer: Container {
|
||||
return moleculeHeight + (containerModel.topMarginPadding ?? 0) + (containerModel.bottomMarginPadding ?? 0)
|
||||
}
|
||||
|
||||
public override class func requiredModules(_ molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
public override class func requiredModules(_ molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
guard let containerModel = molecule as? MoleculeContainerModel,
|
||||
let moleculeClass = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(containerModel.molecule) as? ModelMoleculeViewProtocol.Type else { return nil }
|
||||
return moleculeClass.requiredModules(containerModel.molecule, delegateObject: delegateObject, error: error)
|
||||
|
||||
@ -9,13 +9,13 @@
|
||||
import Foundation
|
||||
|
||||
public class MoleculeContainerModel: ContainerModel {
|
||||
public var molecule: MoleculeProtocol
|
||||
public var molecule: MoleculeModelProtocol
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case molecule
|
||||
}
|
||||
|
||||
public init(with moleculeModel: MoleculeProtocol) {
|
||||
public init(with moleculeModel: MoleculeModelProtocol) {
|
||||
molecule = moleculeModel
|
||||
super.init()
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
@import MVMCore.MVMCoreViewProtocol;
|
||||
@class MVMCoreUIDelegateObject;
|
||||
@class MVMCoreErrorObject;
|
||||
@class MoleculeProtocol;
|
||||
@class MoleculeModelProtocol;
|
||||
|
||||
@protocol MVMCoreUIMoleculeViewProtocol <NSObject, MVMCoreViewProtocol>
|
||||
|
||||
|
||||
@ -14,36 +14,36 @@ extension KeyedDecodingContainer where Key : CodingKey {
|
||||
}
|
||||
|
||||
/// Decodes the molecule model with the given coding key based on moleculeName
|
||||
public func decodeMolecule(codingKey: KeyedDecodingContainer<K>.Key) throws -> MoleculeProtocol {
|
||||
public func decodeMolecule(codingKey: KeyedDecodingContainer<K>.Key) throws -> MoleculeModelProtocol {
|
||||
return try decodeModel(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName)
|
||||
}
|
||||
|
||||
/// Decodes the molecule model with the given coding key based on moleculeName, optional
|
||||
public func decodeMoleculeIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> MoleculeProtocol? {
|
||||
public func decodeMoleculeIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> MoleculeModelProtocol? {
|
||||
return try decodeModelIfPresent(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName)
|
||||
}
|
||||
|
||||
/// Decodes the list of molecule models with the given coding key based on moleculeName
|
||||
public func decodeMolecules(codingKey: KeyedDecodingContainer<K>.Key) throws -> [MoleculeProtocol] {
|
||||
guard let models = try decodeModels(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [MoleculeProtocol] else {
|
||||
public func decodeMolecules(codingKey: KeyedDecodingContainer<K>.Key) throws -> [MoleculeModelProtocol] {
|
||||
guard let models = try decodeModels(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [MoleculeModelProtocol] else {
|
||||
throw ModelRegistry.Error.decoderError
|
||||
}
|
||||
return models
|
||||
}
|
||||
|
||||
/// Decodes the list of molecule models with the given coding key based on moleculeName, optional
|
||||
public func decodeMoleculesIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> [MoleculeProtocol]? {
|
||||
return try decodeModelsIfPresent(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [MoleculeProtocol]
|
||||
public func decodeMoleculesIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> [MoleculeModelProtocol]? {
|
||||
return try decodeModelsIfPresent(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [MoleculeModelProtocol]
|
||||
}
|
||||
|
||||
/// Decodes an array with arrays of molecules based on the identifiers, optional.
|
||||
public func decodeMolecules2DIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> [[MoleculeProtocol]]? {
|
||||
return try decodeModels2DIfPresent(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [[MoleculeProtocol]]
|
||||
public func decodeMolecules2DIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> [[MoleculeModelProtocol]]? {
|
||||
return try decodeModels2DIfPresent(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [[MoleculeModelProtocol]]
|
||||
}
|
||||
|
||||
/// Decodes an array with arrays of models based on the identifiers.
|
||||
public func decodeMolecules2D(codingKey: KeyedDecodingContainer<K>.Key) throws -> [[MoleculeProtocol]] {
|
||||
guard let models = try decodeModels2D(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [[MoleculeProtocol]] else {
|
||||
public func decodeMolecules2D(codingKey: KeyedDecodingContainer<K>.Key) throws -> [[MoleculeModelProtocol]] {
|
||||
guard let models = try decodeModels2D(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [[MoleculeModelProtocol]] else {
|
||||
throw ModelRegistry.Error.decoderError
|
||||
}
|
||||
return models
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
//
|
||||
// CollectionCellMoleculeProtocol.swift
|
||||
// CarouselItemModelProtocol.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Suresh, Kamlesh on 11/26/19.
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol CollectionCellMoleculeProtocol: ContainerModelProtocol, MoleculeProtocol {
|
||||
public protocol CarouselItemModelProtocol: ContainerModelProtocol, MoleculeModelProtocol {
|
||||
var peakingUI: Bool? {get}
|
||||
var peakingArrowColor: Color? {get}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
//
|
||||
// PagingMoleculeProtocol.swift
|
||||
// CarouselPagingModelProtocol.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Suresh, Kamlesh on 11/25/19.
|
||||
@ -8,6 +8,6 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol PagingMoleculeProtocol: MoleculeProtocol {
|
||||
public protocol CarouselPagingModelProtocol: MoleculeModelProtocol {
|
||||
var position: Float? {get}
|
||||
}
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol ListItemModelProtocol: ContainerModelProtocol, MoleculeProtocol {
|
||||
public protocol ListItemModelProtocol: ContainerModelProtocol, MoleculeModelProtocol {
|
||||
var line: LineModel? { get set }
|
||||
var action: ActionProtocol? { get set }
|
||||
var hideArrow: Bool? { get set }
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
import Foundation
|
||||
|
||||
public protocol MoleculeProtocol: Model {
|
||||
public protocol MoleculeModelProtocol: Model {
|
||||
var moleculeName: String? { get }
|
||||
var backgroundColor: Color? { get set}
|
||||
}
|
||||
|
||||
extension MoleculeProtocol {
|
||||
extension MoleculeModelProtocol {
|
||||
public var moleculeName: String? {
|
||||
get { return Self.identifier }
|
||||
}
|
||||
@ -9,7 +9,7 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
@objcMembers public class CarouselItemModel: MoleculeContainerModel, CollectionCellMoleculeProtocol {
|
||||
@objcMembers public class CarouselItemModel: MoleculeContainerModel, CarouselItemModelProtocol {
|
||||
public static var identifier: String = "carouselItem"
|
||||
public var backgroundColor: Color?
|
||||
public var peakingUI: Bool?
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
@objcMembers public class CarouselModel: MoleculeProtocol {
|
||||
@objcMembers public class CarouselModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "carousel"
|
||||
public var backgroundColor: Color?
|
||||
public var molecules: [CarouselItemModel]
|
||||
@ -19,7 +19,7 @@ import UIKit
|
||||
public var height: Float?
|
||||
public var itemWidthPercent: Float?
|
||||
public var itemAlignment: String?
|
||||
public var pagingMolecule: PagingMoleculeProtocol?
|
||||
public var pagingMolecule: CarouselPagingModelProtocol?
|
||||
|
||||
public init(molecules: [CarouselItemModel]){
|
||||
self.molecules = molecules
|
||||
@ -48,7 +48,7 @@ import UIKit
|
||||
self.height = try typeContainer.decode(Float.self, forKey: .height)
|
||||
self.itemWidthPercent = try typeContainer.decode(Float.self, forKey: .itemWidthPercent)
|
||||
self.itemAlignment = try typeContainer.decode(String.self, forKey: .itemAlignment)
|
||||
self.pagingMolecule = try typeContainer.decodeMoleculeIfPresent(codingKey: .pagingMolecule) as? PagingMoleculeProtocol
|
||||
self.pagingMolecule = try typeContainer.decodeMoleculeIfPresent(codingKey: .pagingMolecule) as? CarouselPagingModelProtocol
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
open class ModuleMoleculeModel: MoleculeProtocol {
|
||||
open class ModuleMoleculeModel: MoleculeModelProtocol {
|
||||
public var backgroundColor: Color?
|
||||
public static var identifier: String = "moduleMolecule"
|
||||
public var moduleName: String
|
||||
|
||||
@ -94,7 +94,7 @@ open class DoughnutChart: View {
|
||||
doughnutLayer.transform = CATransform3DMakeRotation(1 * .pi, 0.0, 0.0, 1.0)
|
||||
}
|
||||
|
||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
open override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
clearLayers()
|
||||
guard let doughnutChartModel = doughnutChartModel else {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class DoughnutChartModel: MoleculeProtocol {
|
||||
@objcMembers public class DoughnutChartModel: MoleculeModelProtocol {
|
||||
public var backgroundColor: Color?
|
||||
public static var identifier: String = "doughnutChart"
|
||||
public var title: LabelModel?
|
||||
@ -21,7 +21,7 @@ import Foundation
|
||||
}
|
||||
}
|
||||
|
||||
@objcMembers public class DoughnutChartItemModel: MoleculeProtocol {
|
||||
@objcMembers public class DoughnutChartItemModel: MoleculeModelProtocol {
|
||||
public var backgroundColor: Color?
|
||||
public static var identifier: String = "doughnutChartItem"
|
||||
public var label: LabelModel
|
||||
|
||||
@ -65,7 +65,7 @@ import Foundation
|
||||
colorLablesStack.reset()
|
||||
}
|
||||
|
||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
open override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
|
||||
guard let model = doughnutChartModel else { return }
|
||||
@ -94,7 +94,7 @@ extension DoughnutChartView: MVMCoreUIViewConstrainingProtocol {
|
||||
}
|
||||
|
||||
class ColorViewLabelsStack: MoleculeStackView {
|
||||
override func createStackItemsFromModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
override func createStackItemsFromModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
guard let stackItemModels = stackModel?.molecules else { return }
|
||||
for model in stackItemModels {
|
||||
let view = ColorViewWithLabel()
|
||||
@ -149,7 +149,7 @@ class ColorViewWithLabel: View {
|
||||
label.setAsMolecule()
|
||||
}
|
||||
|
||||
override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let chartItemModel = model as? DoughnutChartItemModel else {
|
||||
return
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
@objcMembers public class FooterModel: MoleculeContainerModel, MoleculeProtocol {
|
||||
@objcMembers public class FooterModel: MoleculeContainerModel, MoleculeModelProtocol {
|
||||
public static var identifier: String = "footer"
|
||||
public var backgroundColor: Color?
|
||||
|
||||
@ -33,7 +33,7 @@ import Foundation
|
||||
}
|
||||
}
|
||||
|
||||
public override init(with moleculeModel: MoleculeProtocol) {
|
||||
public override init(with moleculeModel: MoleculeModelProtocol) {
|
||||
super.init(with: moleculeModel)
|
||||
setDefaults()
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class HeaderModel: MoleculeContainerModel, MoleculeProtocol {
|
||||
@objcMembers public class HeaderModel: MoleculeContainerModel, MoleculeModelProtocol {
|
||||
public static var identifier: String = "header"
|
||||
public var backgroundColor: Color?
|
||||
public var line: LineModel?
|
||||
@ -36,7 +36,7 @@ import Foundation
|
||||
line?.type = .heavy
|
||||
}
|
||||
|
||||
public override init(with moleculeModel: MoleculeProtocol) {
|
||||
public override init(with moleculeModel: MoleculeModelProtocol) {
|
||||
super.init(with: moleculeModel)
|
||||
setDefaults()
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ public class HeaderView: MoleculeContainer {
|
||||
}
|
||||
}
|
||||
|
||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
open override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
|
||||
guard let headerModel = model as? HeaderModel else {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public class TabsModel: MoleculeProtocol {
|
||||
public class TabsModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "tabs"
|
||||
public var backgroundColor: Color?
|
||||
public var tabs: [LabelModel]
|
||||
|
||||
@ -303,7 +303,7 @@ extension TwoButtonView {
|
||||
}
|
||||
|
||||
extension TwoButtonView: ModelMoleculeViewProtocol {
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
guard let model = model as? TwoButtonViewModel else { return }
|
||||
setupUI(primaryButtonShowing: model.primaryButton != nil, secondaryButtonShowing: model.secondaryButton != nil)
|
||||
setDefaultCustom()
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public class TwoButtonViewModel: MoleculeProtocol {
|
||||
public class TwoButtonViewModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "twoButtonView"
|
||||
public var backgroundColor: Color?
|
||||
public var primaryButton: ButtonModel?
|
||||
|
||||
@ -50,7 +50,7 @@ import UIKit
|
||||
dropDown?.updateView(size)
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
dropDownListItemModel = model as? DropDownListItemModel
|
||||
self.delegateObject = delegateObject
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
|
||||
@ -16,7 +16,7 @@ import Foundation
|
||||
public var line: LineModel? = LineModel(type: .none)
|
||||
public var hideArrow: Bool? = true
|
||||
|
||||
public init(molecule: MoleculeProtocol, molecules: [[ListItemModelProtocol]], dropDown: DropDownModel) {
|
||||
public init(molecule: MoleculeModelProtocol, molecules: [[ListItemModelProtocol]], dropDown: DropDownModel) {
|
||||
self.molecules = molecules
|
||||
self.dropDown = dropDown
|
||||
super.init(with: molecule)
|
||||
|
||||
@ -41,7 +41,7 @@ import MVMCore
|
||||
}
|
||||
}
|
||||
|
||||
public override init(with moleculeModel: MoleculeProtocol) {
|
||||
public override init(with moleculeModel: MoleculeModelProtocol) {
|
||||
super.init(with: moleculeModel)
|
||||
setDefaults()
|
||||
}
|
||||
|
||||
@ -68,7 +68,7 @@ open class MoleculeCollectionViewCell: UICollectionViewCell, MVMCoreUIMoleculeVi
|
||||
}
|
||||
|
||||
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
guard let collectionModel = model as? CarouselItemModel else {
|
||||
return
|
||||
}
|
||||
@ -114,7 +114,7 @@ open class MoleculeCollectionViewCell: UICollectionViewCell, MVMCoreUIMoleculeVi
|
||||
backgroundColor = .white
|
||||
}
|
||||
|
||||
public class func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
public class func nameForReuse(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
guard let molecule = (model as? CarouselItemModel)?.molecule,
|
||||
let moleculeClass = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(molecule) as? ModelMoleculeViewProtocol.Type,
|
||||
let name = moleculeClass.nameForReuse(molecule, delegateObject) ?? molecule.moleculeName else {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class MoleculeStackItemModel: MoleculeContainerModel, MoleculeProtocol, StackItemModelProtocol {
|
||||
@objcMembers public class MoleculeStackItemModel: MoleculeContainerModel, MoleculeModelProtocol, StackItemModelProtocol {
|
||||
public static var identifier: String = "stackItem"
|
||||
public var backgroundColor: Color?
|
||||
public var spacing: CGFloat?
|
||||
@ -21,7 +21,7 @@ import Foundation
|
||||
case gone
|
||||
}
|
||||
|
||||
public override init(with moleculeModel: MoleculeProtocol) {
|
||||
public override init(with moleculeModel: MoleculeModelProtocol) {
|
||||
super.init(with: moleculeModel)
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ import UIKit
|
||||
@objcMembers open class MoleculeTableViewCell: TableViewCell {
|
||||
|
||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let moleculeModel = (model as? ListItemModel)?.molecule else { return }
|
||||
if molecule != nil {
|
||||
@ -21,7 +21,7 @@ import UIKit
|
||||
}
|
||||
}
|
||||
|
||||
public override class func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
public override class func nameForReuse(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
guard let moleculeModel = (model as? ListItemModel)?.molecule else {
|
||||
return "\(self)<>"
|
||||
}
|
||||
@ -38,7 +38,7 @@ import UIKit
|
||||
return theClass.requiredModules?(moleculeJSON, delegateObject: delegateObject, error: error)
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||
guard let moleculeModel = (molecule as? MoleculeContainerModel)?.molecule,
|
||||
let classType = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(moleculeModel) as? ModelMoleculeViewProtocol.Type,
|
||||
let height = classType.estimatedHeight(forRow: moleculeModel, delegateObject: delegateObject) else {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class StackItemModel: StackItemModelProtocol, MoleculeProtocol {
|
||||
@objcMembers public class StackItemModel: StackItemModelProtocol, MoleculeModelProtocol {
|
||||
public static var identifier: String = "simpleStackItem"
|
||||
public var backgroundColor: Color?
|
||||
public var spacing: CGFloat?
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol StackItemModelProtocol: MoleculeProtocol {
|
||||
public protocol StackItemModelProtocol: MoleculeModelProtocol {
|
||||
var spacing: CGFloat? { get set }
|
||||
var percent: Int? { get set }
|
||||
var gone: Bool { get set }
|
||||
|
||||
@ -142,7 +142,7 @@ import UIKit
|
||||
}
|
||||
|
||||
//TODO: Model, Change to model
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
guard let model = model as? ListItemModelProtocol else {
|
||||
return
|
||||
}
|
||||
@ -179,11 +179,11 @@ import UIKit
|
||||
backgroundColor = .white
|
||||
}
|
||||
|
||||
public class func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
public class func nameForReuse(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
return model?.moleculeName
|
||||
}
|
||||
|
||||
public class func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
public class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ import UIKit
|
||||
|
||||
// MARK: - MoleculeDelegateProtocol
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
self.delegateObject = delegateObject
|
||||
tabs.reloadData()
|
||||
|
||||
@ -166,7 +166,7 @@ import UIKit
|
||||
return 34
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let model = model as? CornerLabelsModel else { return }
|
||||
if middleView != nil {
|
||||
|
||||
@ -8,16 +8,16 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public class CornerLabelsModel: MoleculeProtocol {
|
||||
public class CornerLabelsModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "cornerLabels"
|
||||
public var backgroundColor: Color?
|
||||
public var topLeftLabel: LabelModel?
|
||||
public var topRightLabel: LabelModel?
|
||||
public var bottomLeftLabel: LabelModel?
|
||||
public var bottomRightLabel: LabelModel?
|
||||
public var molecule: MoleculeProtocol
|
||||
public var molecule: MoleculeModelProtocol
|
||||
|
||||
init(with molecule: MoleculeProtocol) {
|
||||
init(with molecule: MoleculeModelProtocol) {
|
||||
self.molecule = molecule
|
||||
}
|
||||
|
||||
|
||||
@ -37,11 +37,11 @@ import UIKit
|
||||
|
||||
//MARK: - MVMCoreMoleculeViewProtocol
|
||||
|
||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
open override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
}
|
||||
|
||||
public class override func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
public class override func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return 30
|
||||
}
|
||||
|
||||
|
||||
@ -41,7 +41,7 @@ import UIKit
|
||||
mvmSwitch.setWithJSON(json?.optionalDictionaryForKey("toggle"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
}
|
||||
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
guard let labelToggleModel = model as? LabelToggleModel else {
|
||||
return
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public class LabelToggleModel: MoleculeProtocol {
|
||||
public class LabelToggleModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "labelToggle"
|
||||
public var backgroundColor: Color?
|
||||
public var label: LabelModel
|
||||
|
||||
@ -9,20 +9,20 @@
|
||||
import Foundation
|
||||
|
||||
public protocol ModelMoleculeViewProtocol {
|
||||
func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?)
|
||||
static func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String?
|
||||
static func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat?
|
||||
static func requiredModules(_ molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]?
|
||||
func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?)
|
||||
static func nameForReuse(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String?
|
||||
static func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat?
|
||||
static func requiredModules(_ molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]?
|
||||
}
|
||||
|
||||
extension ModelMoleculeViewProtocol {
|
||||
public static func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
public static func nameForReuse(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
return model?.moleculeName
|
||||
}
|
||||
public static func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
public static func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return nil
|
||||
}
|
||||
public static func requiredModules(_ molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
public static func requiredModules(_ molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
return nil
|
||||
}
|
||||
// Temporary
|
||||
|
||||
@ -19,7 +19,7 @@ open class ModuleMolecule: Container {
|
||||
super.setupView()
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
|
||||
guard let moduleMoleculeModel = model as? ModuleMoleculeModel,
|
||||
@ -46,7 +46,7 @@ open class ModuleMolecule: Container {
|
||||
}
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
|
||||
guard let moduleMolecule = molecule as? ModuleMoleculeModel,
|
||||
let moduleModel = delegateObject?.moleculeDelegate?.getModuleWithName(moduleMolecule.moduleName),
|
||||
@ -58,7 +58,7 @@ open class ModuleMolecule: Container {
|
||||
return height
|
||||
}
|
||||
|
||||
public override class func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
public override class func nameForReuse(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
guard let moduleMolecule = model as? ModuleMoleculeModel,
|
||||
let moduleModel = delegateObject?.moleculeDelegate?.getModuleWithName(moduleMolecule.moduleName),
|
||||
let classType = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(moduleModel) as? ModelMoleculeViewProtocol.Type,
|
||||
@ -69,7 +69,7 @@ open class ModuleMolecule: Container {
|
||||
return name
|
||||
}
|
||||
|
||||
public override class func requiredModules(_ molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
public override class func requiredModules(_ molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
|
||||
guard let moduleName = (molecule as? ModuleMoleculeModel)?.moduleName,
|
||||
let _ = delegateObject?.moleculeDelegate?.getModuleWithName(moduleName) else {
|
||||
|
||||
@ -29,7 +29,7 @@ import UIKit
|
||||
constraint.isActive = true
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
if let casteModel = model as? ScrollerModel {
|
||||
if view != nil {
|
||||
(view as? ModelMoleculeViewProtocol)?.setWithModel(casteModel.molecule, delegateObject, additionalData)
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public class ScrollerModel: MoleculeContainerModel, MoleculeProtocol {
|
||||
public class ScrollerModel: MoleculeContainerModel, MoleculeModelProtocol {
|
||||
public static var identifier: String = "scroller"
|
||||
public var backgroundColor: Color?
|
||||
}
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
struct EyebrowHeadlineBodyLinkModel: MoleculeProtocol {
|
||||
struct EyebrowHeadlineBodyLinkModel: MoleculeModelProtocol {
|
||||
static var identifier: String = "eyebrowHeadlineBodyLink"
|
||||
var backgroundColor: Color?
|
||||
|
||||
@ -46,7 +46,7 @@ struct EyebrowHeadlineBodyLinkModel: MoleculeProtocol {
|
||||
|
||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||
|
||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
open override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
eyebrow.setWithModel(casteModel?.eyeBrow, delegateObject, additionalData)
|
||||
headline.setWithModel(casteModel?.headline, delegateObject, additionalData)
|
||||
@ -74,7 +74,7 @@ struct EyebrowHeadlineBodyLinkModel: MoleculeProtocol {
|
||||
body.styleB2(true)
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return 65
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,11 +78,11 @@ import Foundation
|
||||
backgroundImageView.reset()
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
return 320
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let model = model as? HeadlineBodyCaretLinkImageModel else { return }
|
||||
headlineBody.setWithModel(model.headlineBody, delegateObject, additionalData)
|
||||
|
||||
@ -119,7 +119,7 @@ open class HeadlineBody: View {
|
||||
}
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let headlineBodyModel = model as? HeadlineBodyModel else {
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import UIKit
|
||||
|
||||
public class HeadlineBodyCaretLinkImageModel: MoleculeProtocol {
|
||||
public class HeadlineBodyCaretLinkImageModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "headlineBodyCaretLinkImage"
|
||||
public var backgroundColor: Color?
|
||||
public var caretLink: CaretLinkModel?
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class HeadlineBodyModel: MoleculeProtocol {
|
||||
@objcMembers public class HeadlineBodyModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "headlineBody"
|
||||
public var headline: LabelModel?
|
||||
public var body: LabelModel?
|
||||
|
||||
@ -19,7 +19,7 @@ import Foundation
|
||||
case list
|
||||
}
|
||||
|
||||
// Numbered list model comes in the from of list = [MoleculeProtocol]
|
||||
// Numbered list model comes in the from of list = [MoleculeModelProtocol]
|
||||
public required init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
|
||||
@ -36,7 +36,7 @@ import Foundation
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
|
||||
var models: [MoleculeProtocol] = []
|
||||
var models: [MoleculeModelProtocol] = []
|
||||
for molecule in molecules {
|
||||
models.append(molecule.molecule)
|
||||
}
|
||||
|
||||
@ -8,13 +8,13 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public class StringAndMoleculeModel: MoleculeProtocol {
|
||||
public class StringAndMoleculeModel: MoleculeModelProtocol {
|
||||
public static var identifier: String = "stringAndMoleculeModel"
|
||||
public var backgroundColor: Color?
|
||||
public var string: String
|
||||
public var molecule: MoleculeProtocol
|
||||
public var molecule: MoleculeModelProtocol
|
||||
|
||||
public init(string: String, molecule: MoleculeProtocol) {
|
||||
public init(string: String, molecule: MoleculeModelProtocol) {
|
||||
self.string = string
|
||||
self.molecule = molecule
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ import UIKit
|
||||
|
||||
// This class is only temporarily necessary. Eventually we will have initWithModel instad of just init for moleculeviews, which will remove this need.
|
||||
open class StringAndMoleculeStack: MoleculeStackView {
|
||||
override func createStackItemsFromModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
override func createStackItemsFromModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
guard let model = stackModel else { return }
|
||||
for stackItemModel in model.molecules {
|
||||
guard let stringAndMoleculeModel = stackItemModel.molecule as? StringAndMoleculeModel,
|
||||
|
||||
@ -76,7 +76,7 @@ open class StringAndMoleculeView: View {
|
||||
(molecule as? MoleculeViewProtocol)?.reset?()
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let model = model as? StringAndMoleculeModel else { return }
|
||||
label.text = model.string
|
||||
|
||||
@ -21,7 +21,7 @@ import Foundation
|
||||
case bulletChar
|
||||
}
|
||||
|
||||
// Numbered list model comes in the from of list = [MoleculeProtocol]
|
||||
// Numbered list model comes in the from of list = [MoleculeModelProtocol]
|
||||
public required init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
if let bulletChar = try typeContainer.decodeIfPresent(String.self, forKey: .bulletChar) {
|
||||
@ -42,7 +42,7 @@ import Foundation
|
||||
try container.encode(bulletChar, forKey: .bulletChar)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
|
||||
var models: [MoleculeProtocol] = []
|
||||
var models: [MoleculeModelProtocol] = []
|
||||
for molecule in molecules {
|
||||
models.append(molecule.molecule)
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ open class Carousel: ViewConstrainingView, ModelMoleculeViewProtocol {
|
||||
var numberOfPages = 0
|
||||
|
||||
/// The json for the molecules.
|
||||
var molecules: [MoleculeProtocol]?
|
||||
var molecules: [MoleculeModelProtocol]?
|
||||
|
||||
/// The horizontal alignment of the cell in the collection view. Only noticeable if the itemWidthPercent is less than 100%.
|
||||
var itemAlignment = UICollectionView.ScrollPosition.left
|
||||
@ -81,7 +81,7 @@ open class Carousel: ViewConstrainingView, ModelMoleculeViewProtocol {
|
||||
|
||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||
//TODO: Model, Change to model
|
||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
public func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
guard let caroselModel = model as? CarouselModel else {
|
||||
return
|
||||
}
|
||||
@ -148,7 +148,7 @@ open class Carousel: ViewConstrainingView, ModelMoleculeViewProtocol {
|
||||
}
|
||||
|
||||
/// Sets up the paging molecule
|
||||
open func setupPagingMolecule(_ molecule: PagingMoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) {
|
||||
open func setupPagingMolecule(_ molecule: CarouselPagingModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) {
|
||||
var pagingView: (UIView & MVMCoreUIPagingProtocol)? = nil
|
||||
if let molecule = molecule {
|
||||
pagingView = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(molecule, delegateObject, false) as? (UIView & MVMCoreUIPagingProtocol)
|
||||
@ -167,7 +167,7 @@ open class Carousel: ViewConstrainingView, ModelMoleculeViewProtocol {
|
||||
|
||||
// MARK: - Convenience
|
||||
/// Returns the (identifier, class) of the molecule for the given map.
|
||||
func getMoleculeInfo(with molecule: MoleculeProtocol, delegateObject: MVMCoreUIDelegateObject?) -> (identifier: String, class: AnyClass, molecule: MoleculeProtocol)? {
|
||||
func getMoleculeInfo(with molecule: MoleculeModelProtocol, delegateObject: MVMCoreUIDelegateObject?) -> (identifier: String, class: AnyClass, molecule: MoleculeModelProtocol)? {
|
||||
guard let className = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(molecule) ,
|
||||
let moleculeName = (className as? ModelMoleculeViewProtocol.Type)?.nameForReuse(molecule, delegateObject) ?? molecule.moleculeName else {
|
||||
return nil
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class MoleculeStackModel: ContainerModel, MoleculeProtocol, StackModelProtocol {
|
||||
@objcMembers public class MoleculeStackModel: ContainerModel, MoleculeModelProtocol, StackModelProtocol {
|
||||
public class var identifier: String {
|
||||
return "stack"
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ open class MoleculeStackView: Stack<MoleculeStackModel> {
|
||||
|
||||
// MARK: - Adding to stack
|
||||
/// Creates all of the stackItems for the stackItemModels
|
||||
override func createStackItemsFromModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
override func createStackItemsFromModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
guard let stackItemModels = stackModel?.molecules else { return }
|
||||
for model in stackItemModels {
|
||||
if let stackItem = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(model, delegateObject) as? MoleculeStackItem {
|
||||
|
||||
@ -88,7 +88,7 @@ open class Stack<T>: Container where T: StackModelProtocol {
|
||||
}
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
public override func setWithModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
let previousModel = self.model
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
removeAllItemViews()
|
||||
@ -104,7 +104,7 @@ open class Stack<T>: Container where T: StackModelProtocol {
|
||||
restack()
|
||||
}
|
||||
|
||||
public override class func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
public override class func nameForReuse(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
// This will aggregate names of molecules to make an id.
|
||||
guard let model = model as? T else {
|
||||
return "stack<>"
|
||||
@ -125,7 +125,7 @@ open class Stack<T>: Container where T: StackModelProtocol {
|
||||
}
|
||||
|
||||
// Need to update to take into account first spacing flag
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
guard let model = molecule as? T else { return 0 }
|
||||
let horizontal = model.axis == .horizontal
|
||||
var estimatedHeight: CGFloat = 0
|
||||
@ -144,7 +144,7 @@ open class Stack<T>: Container where T: StackModelProtocol {
|
||||
return estimatedHeight
|
||||
}
|
||||
|
||||
public override class func requiredModules(_ molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
public override class func requiredModules(_ molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
guard let model = molecule as? T else { return nil }
|
||||
var modules: [String] = []
|
||||
for case let item in model.molecules {
|
||||
@ -158,11 +158,11 @@ open class Stack<T>: Container where T: StackModelProtocol {
|
||||
// MARK: - Subclassables
|
||||
|
||||
/// Can be subclassed to create views when we get stack item models and have no views yet
|
||||
func createStackItemsFromModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
func createStackItemsFromModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
}
|
||||
|
||||
/// Can be subclassed to set stack items with model when we already have views
|
||||
func setStackItemsFromModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
func setStackItemsFromModel(_ model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
guard let models = stackModel?.molecules else { return }
|
||||
for (index, element) in models.enumerated() {
|
||||
(stackItems[index] as? ModelMoleculeViewProtocol)?.setWithModel(element, delegateObject, additionalData)
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class StackModel: StackModelProtocol, MoleculeProtocol {
|
||||
@objcMembers public class StackModel: StackModelProtocol, MoleculeModelProtocol {
|
||||
public static var identifier: String = "simpleStack"
|
||||
public var backgroundColor: Color?
|
||||
public var molecules: [StackItemModel]
|
||||
|
||||
@ -10,18 +10,18 @@ import Foundation
|
||||
|
||||
public extension MVMCoreUIMoleculeMappingObject {
|
||||
|
||||
func getMoleculeClass(_ model: MoleculeProtocol) -> AnyClass? {
|
||||
func getMoleculeClass(_ model: MoleculeModelProtocol) -> AnyClass? {
|
||||
if let moleculeName = model.moleculeName {
|
||||
return moleculeMapping.object(forKey: moleculeName) as? AnyClass
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func createMolecule(_ model: MoleculeProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> (UIView & MVMCoreUIMoleculeViewProtocol)? {
|
||||
func createMolecule(_ model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> (UIView & MVMCoreUIMoleculeViewProtocol)? {
|
||||
return createMolecule(model, delegateObject, false)
|
||||
}
|
||||
|
||||
func createMolecule(_ model: MoleculeProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ constrainIfNeeded: Bool) -> (UIView & MVMCoreUIMoleculeViewProtocol)? {
|
||||
func createMolecule(_ model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ constrainIfNeeded: Bool) -> (UIView & MVMCoreUIMoleculeViewProtocol)? {
|
||||
guard let moleculeName = model.moleculeName,
|
||||
let molecule = createMolecule(forName: moleculeName) else {
|
||||
return nil
|
||||
|
||||
@ -12,7 +12,7 @@ public protocol MoleculeDelegateProtocol {
|
||||
|
||||
/// returns a module for the corresponding module name.
|
||||
func getModuleWithName(_ name: String?) -> [AnyHashable : Any]?
|
||||
func getModuleWithName(_ moleculeName: String) -> MoleculeProtocol?
|
||||
func getModuleWithName(_ moleculeName: String) -> MoleculeModelProtocol?
|
||||
|
||||
/// Notifies the delegate that the molecule layout update. Should be called when the layout may change due to an async method.
|
||||
func moleculeLayoutUpdated(_ molecule: UIView & MVMCoreUIMoleculeViewProtocol) //optional
|
||||
|
||||
@ -16,9 +16,9 @@ import Foundation
|
||||
public var screenHeading: String?
|
||||
public var isAtomicTabs: Bool?
|
||||
|
||||
public var header: MoleculeProtocol?
|
||||
public var header: MoleculeModelProtocol?
|
||||
public var molecules: [ListItemModelProtocol]
|
||||
public var footer: MoleculeProtocol?
|
||||
public var footer: MoleculeModelProtocol?
|
||||
public var line: LineModel?
|
||||
|
||||
public init(pageType: String, screenHeading: String?, molecules: [ListItemModelProtocol]) {
|
||||
|
||||
@ -16,9 +16,9 @@ import Foundation
|
||||
public var screenHeading: String?
|
||||
public var isAtomicTabs: Bool?
|
||||
|
||||
public var header: MoleculeProtocol?
|
||||
public var header: MoleculeModelProtocol?
|
||||
public var moleculeStack: MoleculeStackModel
|
||||
public var footer: MoleculeProtocol?
|
||||
public var footer: MoleculeModelProtocol?
|
||||
|
||||
public init(pageType: String, moleculeStack: MoleculeStackModel) {
|
||||
self.pageType = pageType
|
||||
|
||||
@ -15,11 +15,11 @@ import Foundation
|
||||
public var screenHeading: String?
|
||||
public var isAtomicTabs: Bool?
|
||||
|
||||
public var header: MoleculeProtocol?
|
||||
public var middle: MoleculeProtocol?
|
||||
public var footer: MoleculeProtocol?
|
||||
public var header: MoleculeModelProtocol?
|
||||
public var middle: MoleculeModelProtocol?
|
||||
public var footer: MoleculeModelProtocol?
|
||||
|
||||
public init(pageType: String, header: MoleculeProtocol?, middle: MoleculeProtocol?, footer: MoleculeProtocol?) {
|
||||
public init(pageType: String, header: MoleculeModelProtocol?, middle: MoleculeModelProtocol?, footer: MoleculeModelProtocol?) {
|
||||
self.pageType = pageType
|
||||
self.header = header
|
||||
self.middle = middle
|
||||
|
||||
Loading…
Reference in New Issue
Block a user