Merge branch 'feature/unordered_numbered_list_from_coding' into 'feature/coding'
unordered list added See merge request BPHV_MIPS/mvm_core_ui!216
This commit is contained in:
commit
48dded3549
@ -107,9 +107,14 @@
|
||||
94C661D923CCF4B400D9FE5B /* LeftRightLabelModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9402C34F23A2CEA3004B974C /* LeftRightLabelModel.swift */; };
|
||||
94C661DA23CCF4FB00D9FE5B /* UIColor+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AA33B33239813C50067DD0F /* UIColor+Extension.swift */; };
|
||||
C003506123AA94CD00B6AC29 /* Button.swift in Sources */ = {isa = PBXBuildFile; fileRef = C003506023AA94CD00B6AC29 /* Button.swift */; };
|
||||
C695A67F23C9830600BFB94E /* UnOrderedListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C695A67E23C9830600BFB94E /* UnOrderedListModel.swift */; };
|
||||
C695A68123C9830D00BFB94E /* NumberedListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C695A68023C9830D00BFB94E /* NumberedListModel.swift */; };
|
||||
C695A69423C9909000BFB94E /* DoughnutChartModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C695A69323C9909000BFB94E /* DoughnutChartModel.swift */; };
|
||||
C695A69623C990BC00BFB94E /* DoughnutChart.swift in Sources */ = {isa = PBXBuildFile; fileRef = C695A69523C990BC00BFB94E /* DoughnutChart.swift */; };
|
||||
C695A69823C990C200BFB94E /* DoughnutChartView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C695A69723C990C200BFB94E /* DoughnutChartView.swift */; };
|
||||
C6FA7D5223C77A4A00A3614A /* UnOrderedList.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6FA7D4F23C77A4700A3614A /* UnOrderedList.swift */; };
|
||||
C6FA7D5323C77A4A00A3614A /* StringAndMoleculeStack.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6FA7D5023C77A4800A3614A /* StringAndMoleculeStack.swift */; };
|
||||
C6FA7D5423C77A4A00A3614A /* NumberedList.swift in Sources */ = {isa = PBXBuildFile; fileRef = C6FA7D5123C77A4900A3614A /* NumberedList.swift */; };
|
||||
C7192E7D23C301750050C2A0 /* HeadLineBodyCaretLinkImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7192E7C23C301750050C2A0 /* HeadLineBodyCaretLinkImage.swift */; };
|
||||
D20A9A5E2243D3E300ADE781 /* TwoButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D20A9A5D2243D3E300ADE781 /* TwoButtonView.swift */; };
|
||||
D213347723843825008E41B3 /* Line.swift in Sources */ = {isa = PBXBuildFile; fileRef = D213347623843825008E41B3 /* Line.swift */; };
|
||||
@ -267,6 +272,8 @@
|
||||
D29DF32521ED0DA2003B2FB9 /* TextButtonView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29DF32321ED0DA2003B2FB9 /* TextButtonView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D29DF32C21EE8736003B2FB9 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D29DF32821EE8736003B2FB9 /* Localizable.strings */; };
|
||||
D29DF32E21EE8C3D003B2FB9 /* Media.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D29DF32D21EE8C3D003B2FB9 /* Media.xcassets */; };
|
||||
D29E28D823D21AB800ACEA85 /* StringAndMoleculeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D29E28D723D21AB800ACEA85 /* StringAndMoleculeView.swift */; };
|
||||
D29E28DA23D21AFA00ACEA85 /* StringAndMoleculeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D29E28D923D21AFA00ACEA85 /* StringAndMoleculeModel.swift */; };
|
||||
D2A514582211C53C00345BFB /* MVMCoreUIMoleculeMappingObject.h in Headers */ = {isa = PBXBuildFile; fileRef = D2A514562211C53C00345BFB /* MVMCoreUIMoleculeMappingObject.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
D2A514592211C53C00345BFB /* MVMCoreUIMoleculeMappingObject.m in Sources */ = {isa = PBXBuildFile; fileRef = D2A514572211C53C00345BFB /* MVMCoreUIMoleculeMappingObject.m */; };
|
||||
D2A5145D2211D22A00345BFB /* MVMCoreUIMoleculeViewProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D2A5145C2211D22A00345BFB /* MVMCoreUIMoleculeViewProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||
@ -365,9 +372,9 @@
|
||||
0A7BAD73232A8DC700FB8E22 /* HeadlineBodyButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadlineBodyButton.swift; sourceTree = "<group>"; };
|
||||
0A7BAFA0232BE61800FB8E22 /* Checkbox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Checkbox.swift; sourceTree = "<group>"; };
|
||||
0A7BAFA2232BE63400FB8E22 /* CheckboxWithLabelView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CheckboxWithLabelView.swift; sourceTree = "<group>"; };
|
||||
0AA33B392398524F0067DD0F /* Toggle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Toggle.swift; sourceTree = "<group>"; };
|
||||
0A8321AE2355FE9500CB7F00 /* DigitBox.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DigitBox.swift; sourceTree = "<group>"; };
|
||||
0AA33B33239813C50067DD0F /* UIColor+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIColor+Extension.swift"; sourceTree = "<group>"; };
|
||||
0AA33B392398524F0067DD0F /* Toggle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Toggle.swift; sourceTree = "<group>"; };
|
||||
0ABD136A237B193A0081388D /* EntryFieldContainer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryFieldContainer.swift; sourceTree = "<group>"; };
|
||||
0ABD136C237CAD1E0081388D /* DateDropdownEntryField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DateDropdownEntryField.swift; sourceTree = "<group>"; };
|
||||
0ABD1370237DB0450081388D /* ItemDropdownEntryField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ItemDropdownEntryField.swift; sourceTree = "<group>"; };
|
||||
@ -391,9 +398,14 @@
|
||||
94C2D9A823872E5E0006CF46 /* LabelAttributeImageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelAttributeImageModel.swift; sourceTree = "<group>"; };
|
||||
94C2D9AA23872EB50006CF46 /* LabelAttributeActionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelAttributeActionModel.swift; sourceTree = "<group>"; };
|
||||
C003506023AA94CD00B6AC29 /* Button.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Button.swift; sourceTree = "<group>"; };
|
||||
C695A67E23C9830600BFB94E /* UnOrderedListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnOrderedListModel.swift; sourceTree = "<group>"; };
|
||||
C695A68023C9830D00BFB94E /* NumberedListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NumberedListModel.swift; sourceTree = "<group>"; };
|
||||
C695A69323C9909000BFB94E /* DoughnutChartModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DoughnutChartModel.swift; sourceTree = "<group>"; };
|
||||
C695A69523C990BC00BFB94E /* DoughnutChart.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DoughnutChart.swift; sourceTree = "<group>"; };
|
||||
C695A69723C990C200BFB94E /* DoughnutChartView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DoughnutChartView.swift; sourceTree = "<group>"; };
|
||||
C6FA7D4F23C77A4700A3614A /* UnOrderedList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnOrderedList.swift; sourceTree = "<group>"; };
|
||||
C6FA7D5023C77A4800A3614A /* StringAndMoleculeStack.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StringAndMoleculeStack.swift; sourceTree = "<group>"; };
|
||||
C6FA7D5123C77A4900A3614A /* NumberedList.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NumberedList.swift; sourceTree = "<group>"; };
|
||||
C7192E7C23C301750050C2A0 /* HeadLineBodyCaretLinkImage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadLineBodyCaretLinkImage.swift; sourceTree = "<group>"; };
|
||||
D20A9A5D2243D3E300ADE781 /* TwoButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TwoButtonView.swift; sourceTree = "<group>"; };
|
||||
D213347623843825008E41B3 /* Line.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Line.swift; sourceTree = "<group>"; };
|
||||
@ -565,6 +577,8 @@
|
||||
D29DF32A21EE8736003B2FB9 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
|
||||
D29DF32B21EE8736003B2FB9 /* es-MX */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = "es-MX"; path = "es-MX.lproj/Localizable.strings"; sourceTree = "<group>"; };
|
||||
D29DF32D21EE8C3D003B2FB9 /* Media.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Media.xcassets; sourceTree = "<group>"; };
|
||||
D29E28D723D21AB800ACEA85 /* StringAndMoleculeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringAndMoleculeView.swift; sourceTree = "<group>"; };
|
||||
D29E28D923D21AFA00ACEA85 /* StringAndMoleculeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringAndMoleculeModel.swift; sourceTree = "<group>"; };
|
||||
D2A514562211C53C00345BFB /* MVMCoreUIMoleculeMappingObject.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIMoleculeMappingObject.h; sourceTree = "<group>"; };
|
||||
D2A514572211C53C00345BFB /* MVMCoreUIMoleculeMappingObject.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MVMCoreUIMoleculeMappingObject.m; sourceTree = "<group>"; };
|
||||
D2A5145C2211D22A00345BFB /* MVMCoreUIMoleculeViewProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIMoleculeViewProtocol.h; sourceTree = "<group>"; };
|
||||
@ -787,6 +801,7 @@
|
||||
D224798D2316A988003FCCF9 /* VerticalCombinationViews */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D29E28D423D1FFFA00ACEA85 /* Lists */,
|
||||
D2A638FC22CA98280052ED1F /* HeadlineBody.swift */,
|
||||
01EB368D23609801006832FA /* HeadlineBodyModel.swift */,
|
||||
D22479952316AF6D003FCCF9 /* HeadlineBodyTextButton.swift */,
|
||||
@ -1276,6 +1291,28 @@
|
||||
path = Strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D29E28D423D1FFFA00ACEA85 /* Lists */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D29E28DB23D21B0A00ACEA85 /* StringAndMoleculeStack */,
|
||||
C695A68023C9830D00BFB94E /* NumberedListModel.swift */,
|
||||
C6FA7D5123C77A4900A3614A /* NumberedList.swift */,
|
||||
C695A67E23C9830600BFB94E /* UnOrderedListModel.swift */,
|
||||
C6FA7D4F23C77A4700A3614A /* UnOrderedList.swift */,
|
||||
);
|
||||
path = Lists;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D29E28DB23D21B0A00ACEA85 /* StringAndMoleculeStack */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
D29E28D923D21AFA00ACEA85 /* StringAndMoleculeModel.swift */,
|
||||
D29E28D723D21AB800ACEA85 /* StringAndMoleculeView.swift */,
|
||||
C6FA7D5023C77A4800A3614A /* StringAndMoleculeStack.swift */,
|
||||
);
|
||||
path = StringAndMoleculeStack;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
D2B18B7D236090D500A9AEDC /* BaseClasses */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@ -1520,6 +1557,7 @@
|
||||
D28A837F23CCA96400DFE4FC /* TabsModel.swift in Sources */,
|
||||
012A88EC238F084D00FE3DA1 /* FooterModel.swift in Sources */,
|
||||
D2A514672213885800345BFB /* StandardHeaderView.swift in Sources */,
|
||||
D29E28D823D21AB800ACEA85 /* StringAndMoleculeView.swift in Sources */,
|
||||
01EB369023609801006832FA /* ListItemModel.swift in Sources */,
|
||||
D28A838323CCBD3F00DFE4FC /* CircleProgressModel.swift in Sources */,
|
||||
D268C70C2386DFFD007F2C1C /* MoleculeStackItemModel.swift in Sources */,
|
||||
@ -1533,12 +1571,14 @@
|
||||
0A21DB8B235E06EF00C160A2 /* MFDigitTextBox.m in Sources */,
|
||||
D260D7B222D65BDD007E7233 /* MVMCoreUIPageControl.m in Sources */,
|
||||
D2B18B812360945C00A9AEDC /* View.swift in Sources */,
|
||||
C6FA7D5423C77A4A00A3614A /* NumberedList.swift in Sources */,
|
||||
D29DF26D21E6AA0B003B2FB9 /* FLAnimatedImageView.m in Sources */,
|
||||
D260105323CEA61600764D80 /* ToggleModel.swift in Sources */,
|
||||
014AA72523C501E2006F3E93 /* ContainerModel.swift in Sources */,
|
||||
D29DF2EF21ECEAE1003B2FB9 /* MFFonts.m in Sources */,
|
||||
D22479942316AE5E003FCCF9 /* NSLayoutConstraintExtension.swift in Sources */,
|
||||
D2B18B94236214AD00A9AEDC /* NavigationController.swift in Sources */,
|
||||
D29E28DA23D21AFA00ACEA85 /* StringAndMoleculeModel.swift in Sources */,
|
||||
D282AACB2243C61700C46919 /* ButtonView.swift in Sources */,
|
||||
D260105D23D0BCD400764D80 /* Stack.swift in Sources */,
|
||||
D2D6CD4222E78FAB00D701B8 /* ThreeLayerTemplate.swift in Sources */,
|
||||
@ -1565,6 +1605,7 @@
|
||||
011B58F223A2AE2C0085F53C /* DropDownListItemModel.swift in Sources */,
|
||||
94C2D9842386F3F80006CF46 /* LabelAttributeModel.swift in Sources */,
|
||||
944589212385D6E900DE9FD4 /* DashLineModel.swift in Sources */,
|
||||
C6FA7D5323C77A4A00A3614A /* StringAndMoleculeStack.swift in Sources */,
|
||||
D29DF27A21E7A533003B2FB9 /* MVMCoreUISession.m in Sources */,
|
||||
D2A5146B2214905000345BFB /* ThreeLayerViewController.swift in Sources */,
|
||||
D28A838F23CCDEDE00DFE4FC /* TwoButtonViewModel.swift in Sources */,
|
||||
@ -1584,12 +1625,14 @@
|
||||
0A21DB89235E06EF00C160A2 /* MFMdnTextField.m in Sources */,
|
||||
D224798A2314445E003FCCF9 /* LabelSwitch.swift in Sources */,
|
||||
D22D1F47220496A30077CEC0 /* MVMCoreUISwitch.m in Sources */,
|
||||
C695A67F23C9830600BFB94E /* UnOrderedListModel.swift in Sources */,
|
||||
017BEB4223620AD20024EF95 /* FormModelProtocol.swift in Sources */,
|
||||
012A88DB238ED45900FE3DA1 /* CarouselModel.swift in Sources */,
|
||||
D29DF28C21E7AC2B003B2FB9 /* ViewConstrainingView.m in Sources */,
|
||||
0AE14F64238315D2005417F8 /* TextField.swift in Sources */,
|
||||
D29DF17B21E69E1F003B2FB9 /* PrimaryButton.m in Sources */,
|
||||
017BEB4A236235BA0024EF95 /* ModelMoleculeViewProtocol.swift in Sources */,
|
||||
C695A68123C9830D00BFB94E /* NumberedListModel.swift in Sources */,
|
||||
012CA99A2384A687003F810F /* MFTextField+ModelExtension.swift in Sources */,
|
||||
01EB3684236097C0006832FA /* MoleculeProtocol.swift in Sources */,
|
||||
D27CD4102339057800C1DC07 /* EyebrowHeadlineBodyLink.swift in Sources */,
|
||||
@ -1648,6 +1691,7 @@
|
||||
D2A514592211C53C00345BFB /* MVMCoreUIMoleculeMappingObject.m in Sources */,
|
||||
94C661D923CCF4B400D9FE5B /* LeftRightLabelModel.swift in Sources */,
|
||||
D21EE53C23AD3AD4003D1A30 /* NSLayoutConstraintAxis+Extension.swift in Sources */,
|
||||
C6FA7D5223C77A4A00A3614A /* UnOrderedList.swift in Sources */,
|
||||
01509D8F2327EC6F00EF99AA /* MoleculeTableViewCell.swift in Sources */,
|
||||
0105618D224BBE7700E1557D /* FormValidator.swift in Sources */,
|
||||
01509D912327ECE600EF99AA /* CornerLabels.swift in Sources */,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -263,13 +263,13 @@ public typealias ActionBlock = () -> ()
|
||||
}
|
||||
|
||||
if let attributes = labelModel.attributes, let labelText = text {
|
||||
let attributedString = NSMutableAttributedString(string: labelText, attributes: [NSAttributedString.Key.font: font as UIFont, NSAttributedString.Key.foregroundColor: textColor as UIColor])
|
||||
let attributedString = NSMutableAttributedString(string: labelText, attributes: [NSAttributedString.Key.font: font.withSize(standardFontSize), NSAttributedString.Key.foregroundColor: textColor as UIColor])
|
||||
for attribute in attributes {
|
||||
let range = NSRange(location: attribute.location, length: attribute.length)
|
||||
switch attribute {
|
||||
case let _ as LabelAttributeUnderlineModel:
|
||||
case _ as LabelAttributeUnderlineModel:
|
||||
attributedString.addAttribute(.underlineStyle, value: NSUnderlineStyle.single.rawValue, range: range)
|
||||
case let _ as LabelAttributeStrikeThroughModel:
|
||||
case _ as LabelAttributeStrikeThroughModel:
|
||||
attributedString.addAttribute(.strikethroughStyle, value: NSUnderlineStyle.thick.rawValue, range: range)
|
||||
attributedString.addAttribute(.baselineOffset, value: 0, range: range)
|
||||
case let colorAtt as LabelAttributeColorModel:
|
||||
|
||||
@ -197,12 +197,13 @@ public class ContainerHelper: NSObject {
|
||||
}
|
||||
|
||||
open class Container: View, ContainerProtocol {
|
||||
var view: UIView?
|
||||
public var view: UIView?
|
||||
let containerHelper = ContainerHelper()
|
||||
var containerModel: ContainerModelProtocol? {
|
||||
get { return model as? ContainerModelProtocol }
|
||||
}
|
||||
|
||||
// MARK:- ModelMoleculeViewProtocol
|
||||
override open func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let containerModel = model as? ContainerModelProtocol else { return }
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
import Foundation
|
||||
|
||||
public protocol ContainerProtocol {
|
||||
var view: UIView? { get set }
|
||||
func alignHorizontal(_ alignment: UIStackView.Alignment)
|
||||
func alignVertical(_ alignment: UIStackView.Alignment)
|
||||
func constrainView(_ view: UIView)
|
||||
|
||||
@ -94,12 +94,12 @@ extension DoughnutChartView: MVMCoreUIViewConstrainingProtocol {
|
||||
}
|
||||
|
||||
class ColorViewLabelsStack: MoleculeStackView {
|
||||
override func createStackItemsFromModel(with delegate: MVMCoreUIDelegateObject?) {
|
||||
override func createStackItemsFromModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
guard let stackItemModels = stackModel?.molecules else { return }
|
||||
for model in stackItemModels {
|
||||
let view = ColorViewWithLabel()
|
||||
let stackItem = MoleculeStackItem(andContain: view)
|
||||
stackItem.setWithModel(model, delegate, nil)
|
||||
stackItem.setWithModel(model, delegateObject, additionalData)
|
||||
stackItems.append(stackItem)
|
||||
}
|
||||
}
|
||||
|
||||
@ -8,7 +8,9 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class StackItemModel: StackItemModelProtocol, Codable {
|
||||
@objcMembers public class StackItemModel: StackItemModelProtocol, MoleculeProtocol {
|
||||
public static var identifier: String = "simpleStackItem"
|
||||
public var backgroundColor: Color?
|
||||
public var spacing: CGFloat?
|
||||
public var percent: Int?
|
||||
public var gone: Bool = false
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
|
||||
public protocol StackItemModelProtocol {
|
||||
public protocol StackItemModelProtocol: MoleculeProtocol {
|
||||
var spacing: CGFloat? { get set }
|
||||
var percent: Int? { get set }
|
||||
var gone: Bool { get set }
|
||||
|
||||
@ -42,4 +42,28 @@ open class MoleculeContainer: Container {
|
||||
}
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
}
|
||||
|
||||
public override static func nameForReuse(_ model: MoleculeProtocol?, _ 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 {
|
||||
return "\(model?.moleculeName ?? "moleculeContainer")<>"
|
||||
}
|
||||
return "\(model?.moleculeName ?? "moleculeContainer")<\(moleculeName)>"
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(forRow molecule: MoleculeProtocol?, 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 {
|
||||
return (containerModel.topMarginPadding ?? 0) + (containerModel.bottomMarginPadding ?? 0)
|
||||
}
|
||||
return moleculeHeight + (containerModel.topMarginPadding ?? 0) + (containerModel.bottomMarginPadding ?? 0)
|
||||
}
|
||||
|
||||
public override class func requiredModules(_ molecule: MoleculeProtocol?, 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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
//
|
||||
// NumberedList.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Murugan, Vimal on 03/01/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class NumberedList: StringAndMoleculeStack {
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
//
|
||||
// NumberedListModel.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Murugan, Vimal on 10/01/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class NumberedListModel: MoleculeStackModel {
|
||||
public override class var identifier: String {
|
||||
return "numberedList"
|
||||
}
|
||||
|
||||
private enum NumberedListCodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case backgroundColor
|
||||
case list
|
||||
}
|
||||
|
||||
// Numbered list model comes in the from of list = [MoleculeProtocol]
|
||||
public required init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: NumberedListCodingKeys.self)
|
||||
|
||||
let list = try typeContainer.decodeMolecules(codingKey: .list)
|
||||
var models: [MoleculeStackItemModel] = []
|
||||
for (index, molecule) in list.enumerated() {
|
||||
models.append(MoleculeStackItemModel(with: StringAndMoleculeModel(string: "\(index).", molecule: molecule)))
|
||||
}
|
||||
super.init(molecules: models)
|
||||
spacing = 0
|
||||
}
|
||||
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: NumberedListCodingKeys.self)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
|
||||
var models: [MoleculeProtocol] = []
|
||||
for molecule in molecules {
|
||||
models.append(molecule.molecule)
|
||||
}
|
||||
try container.encodeModels(models, forKey: .list)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -0,0 +1,42 @@
|
||||
//
|
||||
// StringAndMoleculeModel.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Scott Pfeil on 1/17/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
public class StringAndMoleculeModel: MoleculeProtocol {
|
||||
public static var identifier: String = "stringAndMoleculeModel"
|
||||
public var backgroundColor: Color?
|
||||
public var string: String
|
||||
public var molecule: MoleculeProtocol
|
||||
|
||||
public init(string: String, molecule: MoleculeProtocol) {
|
||||
self.string = string
|
||||
self.molecule = molecule
|
||||
}
|
||||
|
||||
enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case backgroundColor
|
||||
case string
|
||||
case molecule
|
||||
}
|
||||
|
||||
public required init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
string = try typeContainer.decode(String.self, forKey: .string)
|
||||
molecule = try typeContainer.decodeMolecule(codingKey: .molecule)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encode(string, forKey: .string)
|
||||
try container.encodeModel(molecule, forKey: .molecule)
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
//
|
||||
// ListMoleculeContainer.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Murugan, Vimal on 03/01/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
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]?) {
|
||||
guard let model = stackModel else { return }
|
||||
for stackItemModel in model.molecules {
|
||||
guard let stringAndMoleculeModel = stackItemModel.molecule as? StringAndMoleculeModel,
|
||||
let moleculeName = stringAndMoleculeModel.molecule.moleculeName,
|
||||
let molecule = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(forName: moleculeName) as? (UIView & ModelMoleculeViewProtocol) else {
|
||||
// Throw error
|
||||
return
|
||||
}
|
||||
let view = StringAndMoleculeView(string: stringAndMoleculeModel.string, molecule: molecule)
|
||||
let stackItem = MoleculeStackItem(andContain: view)
|
||||
stackItem.setWithModel(stackItemModel, delegateObject, nil)
|
||||
stackItems.append(stackItem)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,92 @@
|
||||
//
|
||||
// StringAndMoleculeView.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Scott Pfeil on 1/17/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
open class StringAndMoleculeView: View {
|
||||
var label = Label.commonLabelB2(true)
|
||||
var string: String
|
||||
var molecule: UIView & ModelMoleculeViewProtocol
|
||||
|
||||
var leftWidthConstraint: NSLayoutConstraint?
|
||||
@Percent var percentage: CGFloat = 5
|
||||
|
||||
var constraintBetweenViews: NSLayoutConstraint?
|
||||
var spaceBetweenViews: CGFloat = 0 {
|
||||
didSet {
|
||||
if spaceBetweenViews != oldValue {
|
||||
constraintBetweenViews?.constant = spaceBetweenViews
|
||||
setNeedsDisplay()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Inits
|
||||
public init(string: String, molecule: UIView & ModelMoleculeViewProtocol) {
|
||||
self.string = string
|
||||
self.molecule = molecule
|
||||
super.init(frame: .zero)
|
||||
}
|
||||
|
||||
public required init?(coder aDecoder: NSCoder) {
|
||||
fatalError("init(coder:) has not been implemented")
|
||||
}
|
||||
|
||||
override public func setupView() {
|
||||
super.setupView()
|
||||
guard subviews.count == 0 else {
|
||||
return
|
||||
}
|
||||
|
||||
translatesAutoresizingMaskIntoConstraints = false
|
||||
addSubview(label)
|
||||
addSubview(molecule)
|
||||
|
||||
NSLayoutConstraint.constraintPinSubview(label, pinTop: true, pinBottom: false, pinLeft: true, pinRight: false)
|
||||
bottomAnchor.constraint(greaterThanOrEqualTo: label.bottomAnchor).isActive = true
|
||||
|
||||
let lowBottomConstraint = bottomAnchor.constraint(equalTo: label.bottomAnchor)
|
||||
lowBottomConstraint.priority = UILayoutPriority(rawValue: 200)
|
||||
lowBottomConstraint.isActive = true
|
||||
|
||||
NSLayoutConstraint.constraintPinSubview(molecule, pinTop: true, pinBottom: true, pinLeft: false, pinRight: true)
|
||||
constraintBetweenViews = molecule.leftAnchor.constraint(equalTo: label.rightAnchor, constant: spaceBetweenViews)
|
||||
constraintBetweenViews?.priority = .required
|
||||
constraintBetweenViews?.isActive = true
|
||||
|
||||
setContentHuggingPriority(.defaultHigh, for: .vertical)
|
||||
setContentHuggingPriority(.defaultHigh, for: .horizontal)
|
||||
updateLeftViewWidthConstraint(percentage)
|
||||
}
|
||||
|
||||
override open func updateView(_ size: CGFloat) {
|
||||
super.updateView(size)
|
||||
(molecule as? MVMCoreViewProtocol)?.updateView(size)
|
||||
label.updateView(size)
|
||||
}
|
||||
|
||||
override open func reset() {
|
||||
super.reset()
|
||||
label.reset()
|
||||
(molecule as? MoleculeViewProtocol)?.reset?()
|
||||
}
|
||||
|
||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
guard let model = model as? StringAndMoleculeModel else { return }
|
||||
label.text = model.string
|
||||
molecule.setWithModel(model.molecule, delegateObject, additionalData)
|
||||
}
|
||||
|
||||
func updateLeftViewWidthConstraint(_ percent: CGFloat) {
|
||||
percentage = percent
|
||||
leftWidthConstraint?.isActive = false
|
||||
leftWidthConstraint = label.widthAnchor.constraint(equalTo: widthAnchor, multiplier: CGFloat(percent/100), constant: 0)
|
||||
leftWidthConstraint?.isActive = true
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,12 @@
|
||||
//
|
||||
// UnOrderedList.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Murugan, Vimal on 03/01/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
open class UnOrderedList: StringAndMoleculeStack {
|
||||
}
|
||||
@ -0,0 +1,51 @@
|
||||
//
|
||||
// UnOrderedListModel.swift
|
||||
// MVMCoreUI
|
||||
//
|
||||
// Created by Murugan, Vimal on 10/01/20.
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class UnOrderedListModel: MoleculeStackModel {
|
||||
public override class var identifier: String {
|
||||
return "unOrderedList"
|
||||
}
|
||||
public var bulletChar = "•"
|
||||
|
||||
private enum NumberedListCodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case backgroundColor
|
||||
case list
|
||||
case bulletChar
|
||||
}
|
||||
|
||||
// Numbered list model comes in the from of list = [MoleculeProtocol]
|
||||
public required init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: NumberedListCodingKeys.self)
|
||||
if let bulletChar = try typeContainer.decodeIfPresent(String.self, forKey: .bulletChar) {
|
||||
self.bulletChar = bulletChar
|
||||
}
|
||||
|
||||
let list = try typeContainer.decodeMolecules(codingKey: .list)
|
||||
var models: [MoleculeStackItemModel] = []
|
||||
for molecule in list {
|
||||
models.append(MoleculeStackItemModel(with: StringAndMoleculeModel(string: bulletChar, molecule: molecule)))
|
||||
}
|
||||
super.init(molecules: models)
|
||||
spacing = 0
|
||||
}
|
||||
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: NumberedListCodingKeys.self)
|
||||
try container.encode(bulletChar, forKey: .bulletChar)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
|
||||
var models: [MoleculeProtocol] = []
|
||||
for molecule in molecules {
|
||||
models.append(molecule.molecule)
|
||||
}
|
||||
try container.encodeModels(models, forKey: .list)
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,9 @@
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class MoleculeStackModel: ContainerModel, MoleculeProtocol, StackModelProtocol {
|
||||
public static var identifier: String = "stack"
|
||||
public class var identifier: String {
|
||||
return "stack"
|
||||
}
|
||||
public var backgroundColor: Color?
|
||||
public var molecules: [MoleculeStackItemModel]
|
||||
public var axis: NSLayoutConstraint.Axis = .vertical
|
||||
|
||||
@ -23,10 +23,10 @@ open class MoleculeStackView: Stack<MoleculeStackModel> {
|
||||
|
||||
// MARK: - Adding to stack
|
||||
/// Creates all of the stackItems for the stackItemModels
|
||||
override func createStackItemsFromModel(with delegate: MVMCoreUIDelegateObject?) {
|
||||
override func createStackItemsFromModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||
guard let stackItemModels = stackModel?.molecules else { return }
|
||||
for model in stackItemModels {
|
||||
if let stackItem = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(model, delegate) as? MoleculeStackItem {
|
||||
if let stackItem = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(model, delegateObject) as? MoleculeStackItem {
|
||||
stackItems.append(stackItem)
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,38 +94,26 @@ open class Stack<T>: Container where T: StackModelProtocol {
|
||||
removeAllItemViews()
|
||||
|
||||
// If the items in the stack are different, clear them, create new ones.
|
||||
if (previousModel == nil) || MoleculeStackView.nameForReuse(previousModel, delegateObject) != MoleculeStackView.nameForReuse(model, delegateObject) {
|
||||
if (previousModel == nil) || Self.nameForReuse(previousModel, delegateObject) != Self.nameForReuse(model, delegateObject) {
|
||||
stackItems = []
|
||||
createStackItemsFromModel(with: delegateObject)
|
||||
} else if let models = stackModel?.molecules {
|
||||
for (index, element) in models.enumerated() {
|
||||
(stackItems[index] as? ModelMoleculeViewProtocol)?.setWithModel(element as? MoleculeProtocol, delegateObject, additionalData)
|
||||
}
|
||||
createStackItemsFromModel(model, delegateObject, additionalData)
|
||||
} else {
|
||||
setStackItemsFromModel(model, delegateObject, additionalData)
|
||||
}
|
||||
|
||||
restack()
|
||||
}
|
||||
|
||||
open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||
if let model = model {
|
||||
setWithModel(model, delegateObject, additionalData)
|
||||
} else if let json = json,
|
||||
let data = try? JSONSerialization.data(withJSONObject: json),
|
||||
let model = try? JSONDecoder().decode(MoleculeStackModel.self, from: data) {
|
||||
setWithModel(model, delegateObject, additionalData)
|
||||
}
|
||||
}
|
||||
|
||||
public override class func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||
// This will aggregate names of molecules to make an id.
|
||||
guard let model = model as? MoleculeStackModel else {
|
||||
guard let model = model as? T else {
|
||||
return "stack<>"
|
||||
}
|
||||
var name = "stack<"
|
||||
for case let item in model.molecules {
|
||||
if let moleculeName = item.molecule.moleculeName {
|
||||
if let moleculeName = item.moleculeName {
|
||||
if let moleculeClass = MVMCoreUIMoleculeMappingObject.shared()?.moleculeMapping[moleculeName] as? ModelMoleculeViewProtocol.Type,
|
||||
let nameForReuse = moleculeClass.nameForReuse(item.molecule, delegateObject) {
|
||||
let nameForReuse = moleculeClass.nameForReuse(item, delegateObject) {
|
||||
name.append(nameForReuse + ",")
|
||||
} else {
|
||||
name.append(moleculeName + ",")
|
||||
@ -138,7 +126,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? {
|
||||
guard let model = molecule as? MoleculeStackModel else { return 0 }
|
||||
guard let model = molecule as? T else { return 0 }
|
||||
let horizontal = model.axis == .horizontal
|
||||
var estimatedHeight: CGFloat = 0
|
||||
for case let item in model.molecules {
|
||||
@ -157,7 +145,7 @@ open class Stack<T>: Container where T: StackModelProtocol {
|
||||
}
|
||||
|
||||
public override class func requiredModules(_ molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
|
||||
guard let model = molecule as? MoleculeStackModel else { return nil }
|
||||
guard let model = molecule as? T else { return nil }
|
||||
var modules: [String] = []
|
||||
for case let item in model.molecules {
|
||||
if let modulesForMolecule = (MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(item) as? ModelMoleculeViewProtocol.Type)?.requiredModules(item, delegateObject: delegateObject, error: error) {
|
||||
@ -167,11 +155,21 @@ open class Stack<T>: Container where T: StackModelProtocol {
|
||||
return modules.count > 0 ? modules : nil
|
||||
}
|
||||
|
||||
// MARK: - Adding to stack
|
||||
// MARK: - Subclassables
|
||||
|
||||
/// Can be subclassed to create views when we get stack item models and have no views yet
|
||||
func createStackItemsFromModel(with delegate: MVMCoreUIDelegateObject?) {
|
||||
func createStackItemsFromModel(_ model: MoleculeProtocol?, _ 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]?) {
|
||||
guard let models = stackModel?.molecules else { return }
|
||||
for (index, element) in models.enumerated() {
|
||||
(stackItems[index] as? ModelMoleculeViewProtocol)?.setWithModel(element, delegateObject, additionalData)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Adding to stack
|
||||
/// Convenience function, adds a view to a StackItem to the Stack
|
||||
func addViewToItemToStack(_ view: UIView, lastItem: Bool) {
|
||||
let stackItemModel = StackItemModel()
|
||||
@ -192,8 +190,8 @@ open class Stack<T>: Container where T: StackModelProtocol {
|
||||
|
||||
let spacing = model.spacing ?? stackModel.spacing
|
||||
if let container = view as? ContainerProtocol {
|
||||
let verticalAlignment = (model as? ContainerModelProtocol)?.verticalAlignment ?? (view as? MVMCoreUIViewConstrainingProtocol)?.verticalAlignment?() ?? (model.percent == nil && stackModel.axis == .vertical ? .fill : (stackModel.axis == .vertical ? .leading : .center))
|
||||
let horizontalAlignment = (model as? ContainerModelProtocol)?.horizontalAlignment ?? (view as? MVMCoreUIViewConstrainingProtocol)?.horizontalAlignment?() ?? (stackModel.axis == .vertical || model.percent == nil ? .fill : .leading)
|
||||
let verticalAlignment = (model as? ContainerModelProtocol)?.verticalAlignment ?? (container.view as? MVMCoreUIViewConstrainingProtocol)?.verticalAlignment?() ?? (model.percent == nil && stackModel.axis == .vertical ? .fill : (stackModel.axis == .vertical ? .leading : .center))
|
||||
let horizontalAlignment = (model as? ContainerModelProtocol)?.horizontalAlignment ?? (container.view as? MVMCoreUIViewConstrainingProtocol)?.horizontalAlignment?() ?? (stackModel.axis == .vertical || model.percent == nil ? .fill : .leading)
|
||||
container.alignHorizontal(horizontalAlignment)
|
||||
container.alignVertical(verticalAlignment)
|
||||
}
|
||||
|
||||
@ -11,13 +11,23 @@ import Foundation
|
||||
@objcMembers public class MoleculeObjectMapping: NSObject {
|
||||
public static func registerObjects() {
|
||||
let mapping = MVMCoreUIMoleculeMappingObject.shared()?.moleculeMapping
|
||||
mapping?.setObject(MoleculeStackView.self, forKey: "stack" as NSString)
|
||||
|
||||
ModelRegistry.register(MoleculeStackModel.self)
|
||||
mapping?.setObject(MoleculeStackView.self, forKey: MoleculeStackModel.identifier as NSString)
|
||||
ModelRegistry.register(StackModel.self)
|
||||
mapping?.setObject(Stack<StackModel>.self, forKey: StackModel.identifier as NSString)
|
||||
ModelRegistry.register(StackItemModel.self)
|
||||
mapping?.setObject(StackItem.self, forKey: StackItemModel.identifier as NSString)
|
||||
ModelRegistry.register(StringAndMoleculeModel.self)
|
||||
mapping?.setObject(StringAndMoleculeView.self, forKey: StringAndMoleculeModel.identifier as NSString)
|
||||
ModelRegistry.register(UnOrderedListModel.self)
|
||||
mapping?.setObject(UnOrderedList.self, forKey: UnOrderedListModel.identifier as NSString)
|
||||
ModelRegistry.register(NumberedListModel.self)
|
||||
mapping?.setObject(NumberedList.self, forKey: NumberedListModel.identifier as NSString)
|
||||
|
||||
ModelRegistry.register(LabelModel.self)
|
||||
ModelRegistry.register(HeaderModel.self)
|
||||
ModelRegistry.register(FooterModel.self)
|
||||
ModelRegistry.register(HeadlineBodyModel.self)
|
||||
ModelRegistry.register(MoleculeStackModel.self)
|
||||
ModelRegistry.register(MoleculeStackItemModel.self)
|
||||
ModelRegistry.register(TextFieldModel.self)
|
||||
ModelRegistry.register(ProgressBarModel.self)
|
||||
@ -58,5 +68,7 @@ import Foundation
|
||||
ModelRegistry.register(CaretLinkModel.self)
|
||||
ModelRegistry.register(LabelToggleModel.self)
|
||||
ModelRegistry.register(DoughnutChartModel.self)
|
||||
ModelRegistry.register(NumberedListModel.self)
|
||||
ModelRegistry.register(UnOrderedListModel.self)
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user