Merge branch 'develop' into feature/lockups_plan_names

# Conflicts:
#	MVMCoreUI/Atomic/MoleculeObjectMapping.swift
This commit is contained in:
Lekshmi S 2020-07-20 17:57:02 +05:30
commit 7b358e2fba
26 changed files with 230 additions and 493 deletions

View File

@ -62,8 +62,6 @@
01EB369323609801006832FA /* HeaderModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368C23609801006832FA /* HeaderModel.swift */; };
01EB369423609801006832FA /* HeadlineBodyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368D23609801006832FA /* HeadlineBodyModel.swift */; };
01F2A03223A4498200D954D8 /* CaretLinkModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01F2A03123A4498200D954D8 /* CaretLinkModel.swift */; };
0A0B147924ACFD8300BADD56 /* OrderTracker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A0B147824ACFD8200BADD56 /* OrderTracker.swift */; };
0A0B147B24ACFDAD00BADD56 /* OrderTrackerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A0B147A24ACFDAD00BADD56 /* OrderTrackerModel.swift */; };
0A1214A022C11A18007C7030 /* ActionDetailWithImage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A12149F22C11A17007C7030 /* ActionDetailWithImage.swift */; };
0A1B4A96233BB18F005B3FB4 /* CheckboxLabel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7BAFA2232BE63400FB8E22 /* CheckboxLabel.swift */; };
0A21DB7F235DECC500C160A2 /* EntryField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A21DB7E235DECC500C160A2 /* EntryField.swift */; };
@ -107,13 +105,13 @@
0A9D09212433796500D2E6C0 /* CarouselIndicatorModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A9D091B2433796500D2E6C0 /* CarouselIndicatorModel.swift */; };
0A9D09222433796500D2E6C0 /* CarouselIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A9D091C2433796500D2E6C0 /* CarouselIndicator.swift */; };
0AA33B3A2398524F0067DD0F /* Toggle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AA33B392398524F0067DD0F /* Toggle.swift */; };
0AB000BA24BF63490090C5E7 /* ModalListPageTemplateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AB000B924BF63490090C5E7 /* ModalListPageTemplateModel.swift */; };
0AB000BC24BF64A50090C5E7 /* ModalStackPageTemplateModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AB000BB24BF64A50090C5E7 /* ModalStackPageTemplateModel.swift */; };
0AB764D124460F6300E7FE72 /* UIDatePicker+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AB764D024460F6300E7FE72 /* UIDatePicker+Extension.swift */; };
0AB764D324460FA400E7FE72 /* UIPickerView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AB764D224460FA400E7FE72 /* UIPickerView+Extension.swift */; };
0ABD136D237CAD1E0081388D /* DateDropdownEntryField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ABD136C237CAD1E0081388D /* DateDropdownEntryField.swift */; };
0ABD1371237DB0450081388D /* ItemDropdownEntryField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0ABD1370237DB0450081388D /* ItemDropdownEntryField.swift */; };
0AC16CEB24B3A1080085EF34 /* Step.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC16CEA24B3A1080085EF34 /* Step.swift */; };
0AC16CED24B3A11C0085EF34 /* StepModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AC16CEC24B3A11C0085EF34 /* StepModel.swift */; };
0AC16CEE24B3A39C0085EF34 /* ImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7918F423F5E7EA00772FF4 /* ImageView.swift */; };
0AD93A9F24C0AA5100E56A97 /* ImageView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A7918F423F5E7EA00772FF4 /* ImageView.swift */; };
0AE14F64238315D2005417F8 /* TextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE14F63238315D2005417F8 /* TextField.swift */; };
0AE98BAF23FEF956004C5109 /* ExternalLink.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE98BAE23FEF956004C5109 /* ExternalLink.swift */; };
0AE98BB323FF0934004C5109 /* ExternalLinkModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AE98BB223FF0934004C5109 /* ExternalLinkModel.swift */; };
@ -126,6 +124,8 @@
31BE15CC23D8924D00452370 /* CheckboxModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31BE15CA23D8924C00452370 /* CheckboxModel.swift */; };
324FB6AA249366F3002552C7 /* ListLeftVariableNumberedListBodyTextModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 324FB6A9249366F3002552C7 /* ListLeftVariableNumberedListBodyTextModel.swift */; };
324FB6AC24936717002552C7 /* ListLeftVariableNumberedListBodyText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 324FB6AB24936717002552C7 /* ListLeftVariableNumberedListBodyText.swift */; };
3265B30224BCA737000D154B /* HeadersH1NoButtonsBodyTextModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3265B30124BCA737000D154B /* HeadersH1NoButtonsBodyTextModel.swift */; };
3265B30424BCA749000D154B /* HeadersH1NoButtonsBodyText.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3265B30324BCA749000D154B /* HeadersH1NoButtonsBodyText.swift */; };
32F8804624765C6E00C2ACB3 /* ListLeftVariableNumberedListAllTextAndLinksModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32F8804524765C6E00C2ACB3 /* ListLeftVariableNumberedListAllTextAndLinksModel.swift */; };
32F8804824765C8400C2ACB3 /* ListLeftVariableNumberedListAllTextAndLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32F8804724765C8400C2ACB3 /* ListLeftVariableNumberedListAllTextAndLinks.swift */; };
522679C123FE886900906CBA /* ListLeftVariableCheckboxAllTextAndLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522679BF23FE886900906CBA /* ListLeftVariableCheckboxAllTextAndLinks.swift */; };
@ -529,8 +529,6 @@
01EB368C23609801006832FA /* HeaderModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderModel.swift; sourceTree = "<group>"; };
01EB368D23609801006832FA /* HeadlineBodyModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeadlineBodyModel.swift; sourceTree = "<group>"; };
01F2A03123A4498200D954D8 /* CaretLinkModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CaretLinkModel.swift; sourceTree = "<group>"; };
0A0B147824ACFD8200BADD56 /* OrderTracker.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderTracker.swift; sourceTree = "<group>"; };
0A0B147A24ACFDAD00BADD56 /* OrderTrackerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderTrackerModel.swift; sourceTree = "<group>"; };
0A12149F22C11A17007C7030 /* ActionDetailWithImage.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActionDetailWithImage.swift; sourceTree = "<group>"; };
0A209CD223A7E2810068F8B0 /* UIStackViewAlignment+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIStackViewAlignment+Extension.swift"; sourceTree = "<group>"; };
0A21DB7E235DECC500C160A2 /* EntryField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EntryField.swift; sourceTree = "<group>"; };
@ -577,12 +575,12 @@
0A9D091C2433796500D2E6C0 /* CarouselIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CarouselIndicator.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>"; };
0AB000B924BF63490090C5E7 /* ModalListPageTemplateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalListPageTemplateModel.swift; sourceTree = "<group>"; };
0AB000BB24BF64A50090C5E7 /* ModalStackPageTemplateModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ModalStackPageTemplateModel.swift; sourceTree = "<group>"; };
0AB764D024460F6300E7FE72 /* UIDatePicker+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIDatePicker+Extension.swift"; sourceTree = "<group>"; };
0AB764D224460FA400E7FE72 /* UIPickerView+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UIPickerView+Extension.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>"; };
0AC16CEA24B3A1080085EF34 /* Step.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Step.swift; sourceTree = "<group>"; };
0AC16CEC24B3A11C0085EF34 /* StepModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StepModel.swift; sourceTree = "<group>"; };
0AE14F63238315D2005417F8 /* TextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextField.swift; sourceTree = "<group>"; };
0AE98BAE23FEF956004C5109 /* ExternalLink.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalLink.swift; sourceTree = "<group>"; };
0AE98BB223FF0934004C5109 /* ExternalLinkModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalLinkModel.swift; sourceTree = "<group>"; };
@ -595,6 +593,8 @@
31BE15CA23D8924C00452370 /* CheckboxModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CheckboxModel.swift; sourceTree = "<group>"; };
324FB6A9249366F3002552C7 /* ListLeftVariableNumberedListBodyTextModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListLeftVariableNumberedListBodyTextModel.swift; sourceTree = "<group>"; };
324FB6AB24936717002552C7 /* ListLeftVariableNumberedListBodyText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListLeftVariableNumberedListBodyText.swift; sourceTree = "<group>"; };
3265B30124BCA737000D154B /* HeadersH1NoButtonsBodyTextModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadersH1NoButtonsBodyTextModel.swift; sourceTree = "<group>"; };
3265B30324BCA749000D154B /* HeadersH1NoButtonsBodyText.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadersH1NoButtonsBodyText.swift; sourceTree = "<group>"; };
32F8804524765C6E00C2ACB3 /* ListLeftVariableNumberedListAllTextAndLinksModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListLeftVariableNumberedListAllTextAndLinksModel.swift; sourceTree = "<group>"; };
32F8804724765C8400C2ACB3 /* ListLeftVariableNumberedListAllTextAndLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ListLeftVariableNumberedListAllTextAndLinks.swift; sourceTree = "<group>"; };
522679BF23FE886900906CBA /* ListLeftVariableCheckboxAllTextAndLinks.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ListLeftVariableCheckboxAllTextAndLinks.swift; sourceTree = "<group>"; };
@ -1050,17 +1050,6 @@
path = Views;
sourceTree = "<group>";
};
0AC16CE924B3A0ED0085EF34 /* Order Tracker */ = {
isa = PBXGroup;
children = (
0A0B147A24ACFDAD00BADD56 /* OrderTrackerModel.swift */,
0A0B147824ACFD8200BADD56 /* OrderTracker.swift */,
0AC16CEC24B3A11C0085EF34 /* StepModel.swift */,
0AC16CEA24B3A1080085EF34 /* Step.swift */,
);
path = "Order Tracker";
sourceTree = "<group>";
};
0AE98BAD23FEF92B004C5109 /* Link */ = {
isa = PBXGroup;
children = (
@ -1289,11 +1278,10 @@
C7192E7C23C301750050C2A0 /* HeadLineBodyCaretLinkImage.swift */,
D2E2A99923D8D6B4000B42E6 /* HeadlineBodyButtonModel.swift */,
0A7BAD73232A8DC700FB8E22 /* HeadlineBodyButton.swift */,
EA5124FC243601600051A3A4 /* BGImageHeadlineBodyButton.swift */,
EA5124FE2436018E0051A3A4 /* BGImageHeadlineBodyButtonModel.swift */,
0A775F2724893937009EFB58 /* ThreeHeadlineBodyLinkModel.swift */,
EA5124FC243601600051A3A4 /* BGImageHeadlineBodyButton.swift */,
0A775F2524893916009EFB58 /* ThreeHeadlineBodyLink.swift */,
0AC16CE924B3A0ED0085EF34 /* Order Tracker */,
0A775F2724893937009EFB58 /* ThreeHeadlineBodyLinkModel.swift */,
);
path = VerticalCombinationViews;
sourceTree = "<group>";
@ -1551,6 +1539,8 @@
AA104AC624472DB0004D2810 /* HeadersH1Button.swift */,
AA104ADB244734EA004D2810 /* HeadersH1LandingPageHeaderModel.swift */,
AA104AD9244734DB004D2810 /* HeadersH1LandingPageHeader.swift */,
3265B30124BCA737000D154B /* HeadersH1NoButtonsBodyTextModel.swift */,
3265B30324BCA749000D154B /* HeadersH1NoButtonsBodyText.swift */,
);
path = H1;
sourceTree = "<group>";
@ -1622,12 +1612,14 @@
D2092356244FA1EF0044AD09 /* ThreeLayerModelBase.swift */,
014AA72823C5059B006F3E93 /* StackPageTemplateModel.swift */,
D2A5146022121FBF00345BFB /* MoleculeStackTemplate.swift */,
0AB000BB24BF64A50090C5E7 /* ModalStackPageTemplateModel.swift */,
942C378D2412F5B60066E45E /* ModalMoleculeStackTemplate.swift */,
014AA72923C5059B006F3E93 /* StackCenteredPageTemplateModel.swift */,
D2A514622213643100345BFB /* MoleculeStackCenteredTemplate.swift */,
D28A837A23C928DA00DFE4FC /* MoleculeListCellProtocol.swift */,
014AA72C23C5059B006F3E93 /* ListPageTemplateModel.swift */,
D2E1FAE02268E81D00AEFD8C /* MoleculeListTemplate.swift */,
0AB000B924BF63490090C5E7 /* ModalListPageTemplateModel.swift */,
942C378B2412F4FA0066E45E /* ModalMoleculeListTemplate.swift */,
014AA72A23C5059B006F3E93 /* ThreeLayerPageTemplateModel.swift */,
D2D6CD4122E78FAB00D701B8 /* ThreeLayerTemplate.swift */,
@ -2154,7 +2146,6 @@
324FB6AA249366F3002552C7 /* ListLeftVariableNumberedListBodyTextModel.swift in Sources */,
5248BFED23F12E350059236A /* ListThreeColumnPlanDataDividerModel.swift in Sources */,
AA0A257824766C8A00862F64 /* ListLeftVariableIconWithRightCaretBodyTextModel.swift in Sources */,
0A0B147924ACFD8300BADD56 /* OrderTracker.swift in Sources */,
0A5D59C223AD2F5700EFD9E9 /* AppleGuidelinesProtocol.swift in Sources */,
8D070BB0241B56530099AC56 /* ListRightVariableTotalDataModel.swift in Sources */,
943784F5236B77BB006A1E82 /* Wheel.swift in Sources */,
@ -2176,6 +2167,7 @@
D264FAAA2440F97600D98315 /* CollectionView.swift in Sources */,
BBC0C4FF24811DCA0087C44F /* TagModel.swift in Sources */,
0A7BAD74232A8DC700FB8E22 /* HeadlineBodyButton.swift in Sources */,
3265B30424BCA749000D154B /* HeadersH1NoButtonsBodyText.swift in Sources */,
D2FB151D23A40F1500C20E10 /* MoleculeStackItem.swift in Sources */,
D28BA7452481652D00B75CB8 /* TabBarProtocol.swift in Sources */,
AA11A41F23F15D3100D7962F /* ListRightVariablePayments.swift in Sources */,
@ -2221,7 +2213,6 @@
9445891F2385D2E900DE9FD4 /* CaretViewModel.swift in Sources */,
01C851D323CF9E740021F976 /* LabelToggleModel.swift in Sources */,
011D95A3240453F8000E3791 /* RuleRegexModel.swift in Sources */,
0A0B147B24ACFDAD00BADD56 /* OrderTrackerModel.swift in Sources */,
D2E2A98323D8B32D000B42E6 /* EyebrowHeadlineBodyLinkModel.swift in Sources */,
012A88AD238C418100FE3DA1 /* TemplateProtocol.swift in Sources */,
BB6C6AC1242232DF005F7224 /* ListOneColumnTextWithWhitespaceDividerTall.swift in Sources */,
@ -2391,7 +2382,6 @@
32F8804624765C6E00C2ACB3 /* ListLeftVariableNumberedListAllTextAndLinksModel.swift in Sources */,
011D958524042432000E3791 /* RulesProtocol.swift in Sources */,
AA9972502475309F00FC7472 /* ListLeftVariableIconAllTextLinksModel.swift in Sources */,
0AC16CED24B3A11C0085EF34 /* StepModel.swift in Sources */,
AA69AAF62445BF5700AF3D3B /* ListLeftVariableCheckboxBodyText.swift in Sources */,
D264FAA3243E632F00D98315 /* ProgrammaticCollectionViewController.swift in Sources */,
D29DF27A21E7A533003B2FB9 /* MVMCoreUISession.m in Sources */,
@ -2399,6 +2389,7 @@
D2A5146B2214905000345BFB /* ThreeLayerViewController.swift in Sources */,
526A265E240D200500B0D828 /* ListTwoColumnCompareChanges.swift in Sources */,
8D24041523E7FC0B009E23BE /* ListLeftVariableIconWithRightCaretModel.swift in Sources */,
3265B30224BCA737000D154B /* HeadersH1NoButtonsBodyTextModel.swift in Sources */,
D28A838F23CCDEDE00DFE4FC /* TwoButtonViewModel.swift in Sources */,
D264FAAC2441009400D98315 /* RadioBoxCollectionViewCell.swift in Sources */,
BB2C969224330F73006FF80C /* ListRightVariableTextLinkAllTextAndLinks.swift in Sources */,
@ -2410,15 +2401,14 @@
011D95A5240455DC000E3791 /* FormGroupRule.swift in Sources */,
D2A6390522CBCE160052ED1F /* MoleculeCollectionViewCell.swift in Sources */,
D2A6390122CBB1820052ED1F /* Carousel.swift in Sources */,
0AC16CEB24B3A1080085EF34 /* Step.swift in Sources */,
C7F8012123E8303200396FBD /* ListRVWheel.swift in Sources */,
BB2C968F24330EA7006FF80C /* ListRightVariableTextLinkAllTextAndLinksModel.swift in Sources */,
D2FB151B23A2B65B00C20E10 /* MoleculeContainer.swift in Sources */,
0AC16CEE24B3A39C0085EF34 /* ImageView.swift in Sources */,
279B1569242BBC2F00921D6C /* ActionModelAdapter.swift in Sources */,
BB6C6AC0242232DF005F7224 /* ListOneColumnTextWithWhitespaceDividerTallModel.swift in Sources */,
8DEFA95E243DAC2F000D27E5 /* ListThreeColumnDataUsageDivider.swift in Sources */,
AAE7270E24AC8B9300A3ED0E /* HeadersH2CaretLink.swift in Sources */,
0AD93A9F24C0AA5100E56A97 /* ImageView.swift in Sources */,
D2A638FD22CA98280052ED1F /* HeadlineBody.swift in Sources */,
324FB6AC24936717002552C7 /* ListLeftVariableNumberedListBodyText.swift in Sources */,
AAA74A172410C04600080241 /* HeadersH2NoButtonsBodyText.swift in Sources */,
@ -2508,6 +2498,7 @@
D23EA7FB2475F09800D60C34 /* CarouselItemProtocol.swift in Sources */,
D2E2A9A323E096B1000B42E6 /* DisableableModelProtocol.swift in Sources */,
D29DF11821E6805F003B2FB9 /* NSLayoutConstraint+MFConvenience.m in Sources */,
0AB000BC24BF64A50090C5E7 /* ModalStackPageTemplateModel.swift in Sources */,
27F973532466074500CAB5C5 /* PageBehavior.swift in Sources */,
94C2D9A323872C110006CF46 /* LabelAttributeStrikeThroughModel.swift in Sources */,
D28A838523CCCA8900DFE4FC /* ScrollerModel.swift in Sources */,
@ -2536,6 +2527,7 @@
D236E5B5241FEB1000C38625 /* ListTwoColumnPriceDescriptionModel.swift in Sources */,
D2B18B922361E65A00A9AEDC /* CoreUIObject.swift in Sources */,
014AA72E23C5059B006F3E93 /* StackCenteredPageTemplateModel.swift in Sources */,
0AB000BA24BF63490090C5E7 /* ModalListPageTemplateModel.swift in Sources */,
D2A514632213643100345BFB /* MoleculeStackCenteredTemplate.swift in Sources */,
011D959D2404536F000E3791 /* RuleAnyValueChangedModel.swift in Sources */,
D260105923D0A92900764D80 /* ContainerProtocol.swift in Sources */,

View File

@ -11,7 +11,7 @@ import Foundation
@objcMembers public class MoleculeObjectMapping: NSObject {
public var moleculeMapping: [String: MoleculeViewProtocol.Type] = [:]
/// Returns the mapping object stored in the singleton
public static func shared() -> Self? {
return MVMCoreActionUtility.initializerClassCheck(CoreUIObject.sharedInstance()?.moleculeMap, classToVerify: self) as? Self
@ -22,12 +22,12 @@ import Foundation
try? ModelRegistry.register(viewModelClass)
moleculeMapping.updateValue(viewClass, forKey: viewModelClass.identifier)
}
/// Returns the type of molecule view for the given model
public func getMoleculeClass(_ model: MoleculeModelProtocol) -> MoleculeViewProtocol.Type? {
return moleculeMapping[model.moleculeName]
}
/// Creates a molecule with the given model.
public func createMolecule(_ model: MoleculeModelProtocol, delegateObject: MVMCoreUIDelegateObject? = nil, additionalData: [AnyHashable: Any]? = nil) -> MoleculeViewProtocol? {
guard let type = moleculeMapping[model.moleculeName] else { return nil }
@ -38,7 +38,7 @@ import Foundation
public func getMoleculeModelForJSON(_ json: [String: Any]) throws -> MoleculeModelProtocol? {
guard let moleculeName = json.optionalStringForKey(KeyMoleculeName),
let type = ModelRegistry.getType(for: moleculeName, with: MoleculeModelProtocol.self) else {
throw ModelRegistry.Error.decoderErrorModelNotMapped()
throw ModelRegistry.Error.decoderErrorModelNotMapped()
}
guard let model = try type.decode(jsonDict: json) as? MoleculeModelProtocol else {
throw ModelRegistry.Error.decoderError
@ -87,7 +87,9 @@ import Foundation
MoleculeObjectMapping.shared()?.register(viewClass: RadioSwatches.self, viewModelClass: RadioSwatchesModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: Tags.self, viewModelClass: TagsModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: Tag.self, viewModelClass: TagModel.self)
// MARK:- Other Atoms
MoleculeObjectMapping.shared()?.register(viewClass: ProgressBar.self, viewModelClass: ProgressBarModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: MultiProgress.self, viewModelClass: MultiProgressBarModel.self)
@ -117,9 +119,7 @@ import Foundation
MoleculeObjectMapping.shared()?.register(viewClass: HeadlineBodyButton.self, viewModelClass: HeadlineBodyButtonModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: BGImageHeadlineBodyButton.self, viewModelClass: BGImageHeadlineBodyButtonModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ThreeHeadlineBodyLink.self, viewModelClass: ThreeHeadlineBodyLinkModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: OrderTracker.self, viewModelClass: OrderTrackerModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: Step.self, viewModelClass: StepModel.self)
// MARK:- Left Right Molecules
MoleculeObjectMapping.shared()?.register(viewClass: CornerLabels.self, viewModelClass: CornerLabelsModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: LeftRightLabelView.self, viewModelClass: LeftRightLabelModel.self)
@ -127,7 +127,7 @@ import Foundation
MoleculeObjectMapping.shared()?.register(viewClass: HeadlineBodyToggle.self, viewModelClass: HeadlineBodyToggleModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: HeadlineBodyLinkToggle.self, viewModelClass: HeadlineBodyLinkToggleModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ActionDetailWithImage.self, viewModelClass: ActionDetailWithImageModel.self)
// MARK:- List items
MoleculeObjectMapping.shared()?.register(viewClass: MoleculeTableViewCell.self, viewModelClass: MoleculeListItemModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: DropDownFilterTableViewCell.self, viewModelClass: DropDownListItemModel.self)
@ -140,8 +140,8 @@ import Foundation
MoleculeObjectMapping.shared()?.register(viewClass: StackItem.self, viewModelClass: StackItemModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: MoleculeCollectionViewCell.self, viewModelClass: MoleculeCollectionItemModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: CarouselItem.self, viewModelClass: CarouselItemModel.self)
// MARK:- Other Container Molecules
MoleculeObjectMapping.shared()?.register(viewClass: MoleculeContainer.self, viewModelClass: MoleculeContainerModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: MoleculeHeaderView.self, viewModelClass: MoleculeHeaderModel.self)
@ -149,7 +149,7 @@ import Foundation
MoleculeObjectMapping.shared()?.register(viewClass: Scroller.self, viewModelClass: ScrollerModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ModuleMolecule.self, viewModelClass: ModuleMoleculeModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: BGImageMolecule.self, viewModelClass: BGImageMoleculeModel.self)
// MARK:- Other Molecules
MoleculeObjectMapping.shared()?.register(viewClass: DoughnutChartView.self, viewModelClass: DoughnutChartModel.self)
@ -157,7 +157,7 @@ import Foundation
try? ModelRegistry.register(NavigationItemModel.self)
try? ModelRegistry.register(NavigationImageButtonModel.self)
try? ModelRegistry.register(NavigationLabelButtonModel.self)
// MARK:- Other Organisms
MoleculeObjectMapping.shared()?.register(viewClass: Carousel.self, viewModelClass: CarouselModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: BarsIndicatorView.self, viewModelClass: BarsCarouselIndicatorModel.self)
@ -204,10 +204,11 @@ import Foundation
MoleculeObjectMapping.shared()?.register(viewClass: ListThreeColumnSpeedTestDivider.self, viewModelClass: ListThreeColumnSpeedTestDividerModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListThreeColumnBillChangesDivider.self, viewModelClass: ListThreeColumnBillChangesDividerModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListThreeColumnDataUsageDivider.self, viewModelClass: ListThreeColumnDataUsageDividerModel.self)
// MARK:- Designed Headers
MoleculeObjectMapping.shared()?.register(viewClass: HeadersH1Button.self, viewModelClass: HeadersH1ButtonModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: HeadersH1LandingPageHeader.self, viewModelClass: HeadersH1LandingPageHeaderModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: HeadersH1NoButtonsBodyText.self, viewModelClass: HeadersH1NoButtonsBodyTextModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: HeadersH2NoButtonsBodyText.self, viewModelClass: HeadersH2NoButtonsBodyTextModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: HeadersH2TinyButton.self, viewModelClass: HeadersH2TinyButtonModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: HeadersH2Buttons.self, viewModelClass: HeadersH2ButtonsModel.self)
@ -218,7 +219,7 @@ import Foundation
// MARK:- Device Items
MoleculeObjectMapping.shared()?.register(viewClass: ListDeviceComplexButtonMedium.self, viewModelClass: ListDeviceComplexButtonMediumModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListDeviceComplexButtonSmall.self, viewModelClass: ListDeviceComplexButtonSmallModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListDeviceComplexLinkSmall.self, viewModelClass: ListDeviceComplexLinkSmallModel.self)
MoleculeObjectMapping.shared()?.register(viewClass: ListDeviceComplexLinkMedium.self, viewModelClass: ListDeviceComplexLinkMediumModel.self)
@ -248,7 +249,7 @@ import Foundation
guard let model = model else { return nil }
return MoleculeObjectMapping.shared()?.getMoleculeClass(model)?.requiredModules(with: model, delegateObject, error: error)
}
/// Convenience function to add require modules for the given model to the passed in array.
public static func addRequiredModules(for model: MoleculeModelProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, moduleList: inout [String]?, errorList: inout [MVMCoreErrorObject]?) {
guard let model = model else { return }

View File

@ -0,0 +1,43 @@
//
// HeadersH1NoButtonsBodyText.swift
// MVMCoreUI
//
// Created by Subhankar Acharya on 13/07/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
@objcMembers open class HeadersH1NoButtonsBodyText: HeaderView {
//--------------------------------------------------
// MARK: - Outlets
//--------------------------------------------------
public let headlineBody = HeadlineBody(frame: .zero)
//-------------------------------------------------------
// MARK: - View Lifecycle
//-------------------------------------------------------
open override func setupView() {
super.setupView()
headlineBody.styleLandingPageHeader()
addMolecule(headlineBody)
}
//----------------------------------------------------
// MARK: - Molecule
//------------------------------------------------------
open override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
super.set(with: model, delegateObject, additionalData)
guard let model = model as? HeadersH1NoButtonsBodyTextModel else { return }
headlineBody.set(with: model.headlineBody, delegateObject, additionalData)
}
open override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
return 121
}
open override func reset() {
super.reset()
headlineBody.styleLandingPageHeader()
}
}

View File

@ -1,48 +1,49 @@
//
// OrderTrackerModel.swift
// HeadersH1NoButtonsBodyTextModel.swift
// MVMCoreUI
//
// Created by Kevin Christiano on 7/1/20.
// Created by Subhankar Acharya on 13/07/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import UIKit
import Foundation
open class OrderTrackerModel: MoleculeModelProtocol {
public class HeadersH1NoButtonsBodyTextModel: HeaderModel, MoleculeModelProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
public static var identifier: String = "headerH1"
public var headlineBody: HeadlineBodyModel
public var backgroundColor: Color?
public static var identifier: String = "orderTracker"
public var steps: [StepModel]
//--------------------------------------------------
// MARK: - Initializer
//--------------------------------------------------
public init(headlineBody: HeadlineBodyModel) {
self.headlineBody = headlineBody
super.init()
}
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------
private enum CodingKeys: String, CodingKey {
case moleculeName
case backgroundColor
case steps
case headlineBody
}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
steps = try typeContainer.decode([StepModel].self, forKey: .steps)
headlineBody = try typeContainer.decode(HeadlineBodyModel.self, forKey: .headlineBody)
try super.init(from: decoder)
}
public func encode(to encoder: Encoder) throws {
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(moleculeName, forKey: .moleculeName)
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
try container.encode(steps, forKey: .steps)
try container.encode(headlineBody, forKey: .headlineBody)
}
}

View File

@ -14,7 +14,7 @@ import Foundation
// MARK: - Outlets
//--------------------------------------------------
public let leftImage = LoadImageView()
public let leftImage = LoadImageView(pinnedEdges: .all)
public let eyebrowHeadlineBodyLink = EyebrowHeadlineBodyLink()
public var stack: Stack<StackModel>

View File

@ -1,133 +0,0 @@
//
// OrderTracker.swift
// MVMCoreUI
//
// Created by Kevin Christiano on 7/1/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import UIKit
open class OrderTracker: View {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
var steps = [Step]()
//--------------------------------------------------
// MARK: - Life Cycle
//--------------------------------------------------
open override func setupView() {
super.setupView()
isOpaque = false
}
open override func reset() {
super.reset()
resetSteps()
}
//--------------------------------------------------
// MARK: - Methods
//--------------------------------------------------
func constrain(stepModels: [StepModel]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
resetSteps()
guard let stepModels = stepModels else { return }
var anchor = topAnchor
for stepModel in stepModels {
let step = Step()
step.set(with: stepModel, delegateObject, additionalData)
addSubview(step)
steps.append(step)
step.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
trailingAnchor.constraint(equalTo: step.trailingAnchor).isActive = true
step.topAnchor.constraint(equalTo: anchor).isActive = true
anchor = step.bottomAnchor
}
bottomAnchor.constraint(equalTo: anchor).isActive = true
(subviews.last as? Step)?.heightConstraint?.isActive = false
}
func resetSteps() {
steps.forEach {
$0.reset()
$0.removeFromSuperview()
}
steps = []
}
//--------------------------------------------------
// MARK: - Draw
//--------------------------------------------------
open override func draw(_ rect: CGRect) {
guard let context = UIGraphicsGetCurrentContext(),
let firstStep = steps.first
else { return }
context.setLineWidth(1)
let imageDimension = firstStep.stateImage.bounds.height
let halfDimension = imageDimension / 2
let startPoint = CGPoint(x: halfDimension, y: halfDimension)
let defaultGrey: UIColor = .mvmCoolGray3
context.move(to: startPoint)
var lineColor = (firstStep.state?.color() ?? defaultGrey).cgColor
for (i, step) in steps.dropFirst().enumerated() {
if let state = step.state, state == .incomplete {
lineColor = defaultGrey.cgColor
}
context.setStrokeColor(lineColor)
let relativeRect = convert(step.stateImage.frame, from: step.stateImage)
let point = CGPoint(x: halfDimension, y: relativeRect.midY)
context.addLine(to: point)
context.strokePath()
// Break out of loop since we're on the last step.
if i == steps.count - 2 {
break
}
lineColor = (step.state?.color() ?? defaultGrey).cgColor
context.move(to: point)
}
}
//------------------------------------------------------
// MARK: - MoleculeViewProtocol
//------------------------------------------------------
public override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
return 196
}
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData)
guard let model = model as? OrderTrackerModel else { return }
constrain(stepModels: model.steps, delegateObject: delegateObject, additionalData: additionalData)
setNeedsLayout()
setNeedsDisplay()
}
}

View File

@ -1,114 +0,0 @@
//
// Step.swift
// MVMCoreUI
//
// Created by Kevin Christiano on 7/6/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import UIKit
open class Step: View {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
public var headline = Label(fontStyle: .BoldMicro)
public var bodyTop = Label(fontStyle: .RegularMicro)
public var bodyBottom = Label(fontStyle: .RegularMicro)
public var stateImage = ImageView()
//--------------------------------------------------
// MARK: - Constraints
//--------------------------------------------------
public var heightConstraint: NSLayoutConstraint?
//--------------------------------------------------
// MARK: - Computed Properties
//--------------------------------------------------
public var stepModel: StepModel? {
return model as? StepModel
}
public var state: StepModel.State? {
return stepModel?.state
}
//--------------------------------------------------
// MARK: - Life Cycle
//--------------------------------------------------
open override func setupView() {
super.setupView()
addSubview(stateImage)
addSubview(headline)
addSubview(bodyTop)
addSubview(bodyBottom)
stateImage.contentMode = .scaleAspectFit
stateImage.layer.backgroundColor = UIColor.white.cgColor
stateImage.topAnchor.constraint(equalTo: topAnchor).isActive = true
stateImage.leadingAnchor.constraint(equalTo: leadingAnchor).isActive = true
stateImage.heightAnchor.constraint(equalToConstant: 18).isActive = true
stateImage.widthAnchor.constraint(equalToConstant: 18).isActive = true
headline.topAnchor.constraint(equalTo: topAnchor, constant: 2).isActive = true
headline.leadingAnchor.constraint(equalTo: stateImage.trailingAnchor, constant: Padding.Four).isActive = true
trailingAnchor.constraint(equalTo: headline.trailingAnchor).isActive = true
bodyTop.topAnchor.constraint(equalTo: headline.bottomAnchor).isActive = true
bodyTop.leadingAnchor.constraint(equalTo: stateImage.trailingAnchor, constant: Padding.Four).isActive = true
trailingAnchor.constraint(equalTo: bodyTop.trailingAnchor).isActive = true
bodyBottom.topAnchor.constraint(equalTo: bodyTop.bottomAnchor).isActive = true
bodyBottom.leadingAnchor.constraint(equalTo: stateImage.trailingAnchor, constant: Padding.Four).isActive = true
trailingAnchor.constraint(equalTo: bodyBottom.trailingAnchor).isActive = true
let bodyBottomConstraint = bottomAnchor.constraint(greaterThanOrEqualTo: bodyBottom.bottomAnchor)
bodyBottomConstraint.priority = .defaultHigh
bodyBottomConstraint.isActive = true
heightConstraint = heightAnchor.constraint(equalToConstant: 58)
heightConstraint?.priority = .defaultLow
heightConstraint?.isActive = true
}
public override func reset() {
super.reset()
headline.reset()
bodyTop.reset()
bodyBottom.reset()
stateImage.reset()
heightConstraint?.isActive = true
}
//------------------------------------------------------
// MARK: - MoleculeViewProtocol
//------------------------------------------------------
public override class func estimatedHeight(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
return 64
}
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
super.set(with: model, delegateObject, additionalData)
guard let model = model as? StepModel else { return }
headline.set(with: model.headline, delegateObject, additionalData)
if let bodyTopModel = model.bodyTop {
bodyTop.set(with: bodyTopModel, delegateObject, additionalData)
}
if let bodyBottomModel = model.bodyBottom {
bodyBottom.set(with: bodyBottomModel, delegateObject, additionalData)
}
stateImage.image = model.state?.image()
}
}

View File

@ -1,94 +0,0 @@
//
// StepModel.swift
// MVMCoreUI
//
// Created by Kevin Christiano on 7/6/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import UIKit
open class StepModel: MoleculeModelProtocol {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
public var backgroundColor: Color?
public static var identifier: String = "step"
public var state: State?
public var headline: LabelModel
public var bodyTop: LabelModel?
public var bodyBottom: LabelModel?
//--------------------------------------------------
// MARK: - Enum
//--------------------------------------------------
public enum State: String, Codable {
case complete
case incomplete
case invalid
func image() -> UIImage? {
switch self {
case .complete:
return MVMCoreUIUtility.imageNamed("icon_tracker_complete")
case .incomplete:
return MVMCoreUIUtility.imageNamed("icon_tracker_incomplete")
case .invalid:
return MVMCoreUIUtility.imageNamed("icon_tracker_invalid")
}
}
func color() -> UIColor {
switch self {
case .complete:
return .mvmGreen
case .incomplete, .invalid:
return .mvmCoolGray3
}
}
}
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------
private enum CodingKeys: String, CodingKey {
case moleculeName
case backgroundColor
case state
case headline
case bodyTop
case bodyBottom
}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
state = try typeContainer.decodeIfPresent(State.self, forKey: .state)
headline = try typeContainer.decode(LabelModel.self, forKey: .headline)
bodyTop = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .bodyTop)
bodyBottom = try typeContainer.decodeIfPresent(LabelModel.self, forKey: .bodyBottom)
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(moleculeName, forKey: .moleculeName)
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
try container.encode(headline, forKey: .headline)
try container.encodeIfPresent(bodyTop, forKey: .bodyTop)
try container.encodeIfPresent(bodyBottom, forKey: .bodyBottom)
}
}

View File

@ -0,0 +1,46 @@
//
// ModalListPageTemplateModel.swift
// MVMCoreUI
//
// Created by Subramaniam, Ramya on 15/07/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
@objcMembers open class ModalListPageTemplateModel: ListPageTemplateModel {
//--------------------------------------------------
// MARK: - Properties
//--------------------------------------------------
open override class var identifier: String {
return "modalList"
}
public var closeAction: ActionModelProtocol?
//--------------------------------------------------
// MARK: - Keys
//--------------------------------------------------
private enum CodingKeys: String, CodingKey {
case closeAction
}
//--------------------------------------------------
// MARK: - Codec
//--------------------------------------------------
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
closeAction = try typeContainer.decodeModelIfPresent(codingKey: .closeAction)
try super.init(from: decoder)
}
open override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeModelIfPresent(closeAction, forKey: .closeAction)
}
}

View File

@ -15,16 +15,28 @@ open class ModalMoleculeListTemplate: MoleculeListTemplate {
//--------------------------------------------------
public var closeButton: Button?
//--------------------------------------------------
// MARK: - Lifecycle
//--------------------------------------------------
// For subclassing the model.
open override func decodeTemplate(using decoder: JSONDecoder, from data: Data) throws -> ModalListPageTemplateModel {
return try decoder.decode(ModalListPageTemplateModel.self, from: data)
}
override open func handleNewData() {
super.handleNewData()
closeButton = MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: { _ in
MVMCoreNavigationHandler.shared()?.removeCurrentViewController()
closeButton = MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: { [weak self] _ in
guard let self = self else {
return
}
guard let model = self.templateModel as? ModalListPageTemplateModel, let actionMap = model.closeAction else {
MVMCoreActionHandler.shared()?.handleAction(with: ActionBackModel().toJSON(), additionalData: nil, delegateObject: self.delegateObjectIVar)
return
}
MVMCoreActionHandler.shared()?.handleAction(with: actionMap.toJSON(), additionalData: nil, delegateObject: self.delegateObjectIVar)
})
}

View File

@ -10,13 +10,23 @@ import UIKit
open class ModalMoleculeStackTemplate: MoleculeStackTemplate {
// For subclassing the model.
open override func decodeTemplate(using decoder: JSONDecoder, from data: Data) throws -> ModalStackPageTemplateModel {
return try decoder.decode(ModalStackPageTemplateModel.self, from: data)
}
override open func handleNewData() {
super.handleNewData()
_ = MVMCoreUICommonViewsUtility.addCloseButton(to: view, action: {[weak self] _ in
if let _ = self {
MVMCoreNavigationHandler.shared()?.removeCurrentViewController()
guard let self = self else {
return
}
guard let model = self.templateModel as? ModalStackPageTemplateModel, let actionMap = model.closeAction else {
MVMCoreActionHandler.shared()?.handleAction(with: ActionBackModel().toJSON(), additionalData: nil, delegateObject: self.delegateObjectIVar)
return
}
MVMCoreActionHandler.shared()?.handleAction(with: actionMap.toJSON(), additionalData: nil, delegateObject: self.delegateObjectIVar)
})
}
}

View File

@ -0,0 +1,32 @@
//
// ModalStackPageTemplateModel.swift
// MVMCoreUI
//
// Created by Subramaniam, Ramya on 15/07/20.
// Copyright © 2020 Verizon Wireless. All rights reserved.
//
import Foundation
@objcMembers public class ModalStackPageTemplateModel: StackPageTemplateModel {
public override class var identifier: String {
return "modalStack"
}
public var closeAction: ActionModelProtocol?
private enum CodingKeys: String, CodingKey {
case closeAction
}
required public init(from decoder: Decoder) throws {
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
closeAction = try typeContainer.decodeModelIfPresent(codingKey: .closeAction)
try super.init(from: decoder)
}
public override func encode(to encoder: Encoder) throws {
try super.encode(to: encoder)
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeModelIfPresent(closeAction, forKey: .closeAction)
}
}

View File

@ -17,6 +17,11 @@ open class MoleculeStackTemplate: ThreeLayerViewController, TemplateProtocol {
bottomViewOutsideOfScroll = templateModel?.anchorFooter ?? false
super.handleNewData()
}
// For subclassing the model.
open func decodeTemplate(using decoder: JSONDecoder, from data: Data) throws -> StackPageTemplateModel {
return try decoder.decode(StackPageTemplateModel.self, from: data)
}
open override func parsePageJSON() throws {
try parseTemplate(json: loadObject?.pageJSON)

View File

@ -8,6 +8,7 @@
import UIKit
open class ImageView: UIImageView, MoleculeViewProtocol {
//--------------------------------------------------
// MARK: - Properties
@ -51,23 +52,17 @@ open class ImageView: UIImageView, MoleculeViewProtocol {
}
}
/// Will be called only once.
open func setupView() {
translatesAutoresizingMaskIntoConstraints = false
insetsLayoutMarginsFromSafeArea = false
MVMCoreUIUtility.setMarginsFor(self, leading: 0, top: 0, trailing: 0, bottom: 0)
}
open func reset() {
image = nil
backgroundColor = .clear
}
public func reset() {
backgroundColor = .clear
}
public func setAsMolecule() { }
//--------------------------------------------------
// MARK: - MoleculeViewProtocol
// MARK: - ModelMoleculeViewProtocol
//--------------------------------------------------
public func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
public func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
self.model = model
if let backgroundColor = model.backgroundColor {
self.backgroundColor = backgroundColor.uiColor
@ -85,8 +80,18 @@ open class ImageView: UIImageView, MoleculeViewProtocol {
open class func requiredModules(_ molecule: MoleculeModelProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]? {
return nil
}
}
// MARK:- MVMCoreViewProtocol
extension ImageView: MVMCoreViewProtocol {
open func updateView(_ size: CGFloat) { }
open func setAsMolecule() { }
/// Will be called only once.
open func setupView() {
translatesAutoresizingMaskIntoConstraints = false
insetsLayoutMarginsFromSafeArea = false
MVMCoreUIUtility.setMarginsFor(self, leading: 0, top: 0, trailing: 0, bottom: 0)
}
}

View File

@ -1,23 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Green.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Green@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Green@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 613 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,23 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Empty state icon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Empty state icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Empty state icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 462 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -1,23 +0,0 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Alert icon.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Alert icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Alert icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}