Line items update
This commit is contained in:
parent
90d7b188d1
commit
5bb6b9bc75
@ -108,7 +108,7 @@
|
|||||||
D260D7B122D65BDD007E7233 /* MVMCoreUIPageControl.h in Headers */ = {isa = PBXBuildFile; fileRef = D260D7AF22D65BDD007E7233 /* MVMCoreUIPageControl.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
D260D7B122D65BDD007E7233 /* MVMCoreUIPageControl.h in Headers */ = {isa = PBXBuildFile; fileRef = D260D7AF22D65BDD007E7233 /* MVMCoreUIPageControl.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
D260D7B222D65BDD007E7233 /* MVMCoreUIPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = D260D7B022D65BDD007E7233 /* MVMCoreUIPageControl.m */; };
|
D260D7B222D65BDD007E7233 /* MVMCoreUIPageControl.m in Sources */ = {isa = PBXBuildFile; fileRef = D260D7B022D65BDD007E7233 /* MVMCoreUIPageControl.m */; };
|
||||||
D260D7B622D68514007E7233 /* MVMCoreUIPagingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D260D7B522D68509007E7233 /* MVMCoreUIPagingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
D260D7B622D68514007E7233 /* MVMCoreUIPagingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D260D7B522D68509007E7233 /* MVMCoreUIPagingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
D268C70C2386DFFD007F2C1C /* MoleculeStackItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368A23609801006832FA /* MoleculeStackItemModel.swift */; };
|
D268C70C2386DFFD007F2C1C /* StackItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01EB368A23609801006832FA /* StackItemModel.swift */; };
|
||||||
D268C70E238C22D7007F2C1C /* DropDownFilterTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D268C70D238C22D7007F2C1C /* DropDownFilterTableViewCell.swift */; };
|
D268C70E238C22D7007F2C1C /* DropDownFilterTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = D268C70D238C22D7007F2C1C /* DropDownFilterTableViewCell.swift */; };
|
||||||
D268C712238D6699007F2C1C /* DropDown.swift in Sources */ = {isa = PBXBuildFile; fileRef = D268C711238D6699007F2C1C /* DropDown.swift */; };
|
D268C712238D6699007F2C1C /* DropDown.swift in Sources */ = {isa = PBXBuildFile; fileRef = D268C711238D6699007F2C1C /* DropDown.swift */; };
|
||||||
D274CA332236A78900B01B62 /* StandardFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D274CA322236A78900B01B62 /* StandardFooterView.swift */; };
|
D274CA332236A78900B01B62 /* StandardFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D274CA322236A78900B01B62 /* StandardFooterView.swift */; };
|
||||||
@ -120,7 +120,10 @@
|
|||||||
D282AACB2243C61700C46919 /* ButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D282AACA2243C61700C46919 /* ButtonView.swift */; };
|
D282AACB2243C61700C46919 /* ButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D282AACA2243C61700C46919 /* ButtonView.swift */; };
|
||||||
D28A837723C79FC600DFE4FC /* MFCustomButton+ActionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28A837623C79FC600DFE4FC /* MFCustomButton+ActionModel.swift */; };
|
D28A837723C79FC600DFE4FC /* MFCustomButton+ActionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28A837623C79FC600DFE4FC /* MFCustomButton+ActionModel.swift */; };
|
||||||
D28A837923C7D5BC00DFE4FC /* PageModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28A837823C7D5BC00DFE4FC /* PageModelProtocol.swift */; };
|
D28A837923C7D5BC00DFE4FC /* PageModelProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28A837823C7D5BC00DFE4FC /* PageModelProtocol.swift */; };
|
||||||
D296E13C229598BF0051EBE7 /* MoleculeListCellProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D296E13B2295969C0051EBE7 /* MoleculeListCellProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
D28A837B23C928DA00DFE4FC /* MoleculeListCellProtocol.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28A837A23C928DA00DFE4FC /* MoleculeListCellProtocol.swift */; };
|
||||||
|
D28A837D23CCA86A00DFE4FC /* TabsListItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28A837C23CCA86A00DFE4FC /* TabsListItemModel.swift */; };
|
||||||
|
D28A837F23CCA96400DFE4FC /* TabsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28A837E23CCA96400DFE4FC /* TabsModel.swift */; };
|
||||||
|
D28A838123CCB0D800DFE4FC /* AccordionListItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D28A838023CCB0D800DFE4FC /* AccordionListItemModel.swift */; };
|
||||||
D296E14722A5984C0051EBE7 /* MVMCoreUIViewConstrainingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D296E14622A597490051EBE7 /* MVMCoreUIViewConstrainingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
D296E14722A5984C0051EBE7 /* MVMCoreUIViewConstrainingProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D296E14622A597490051EBE7 /* MVMCoreUIViewConstrainingProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
D29770C821F7C4AE00B2F0D0 /* TopLabelsView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29770C621F7C4AE00B2F0D0 /* TopLabelsView.m */; };
|
D29770C821F7C4AE00B2F0D0 /* TopLabelsView.m in Sources */ = {isa = PBXBuildFile; fileRef = D29770C621F7C4AE00B2F0D0 /* TopLabelsView.m */; };
|
||||||
D29770C921F7C4AE00B2F0D0 /* TopLabelsView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29770C721F7C4AE00B2F0D0 /* TopLabelsView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
D29770C921F7C4AE00B2F0D0 /* TopLabelsView.h in Headers */ = {isa = PBXBuildFile; fileRef = D29770C721F7C4AE00B2F0D0 /* TopLabelsView.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
@ -314,7 +317,7 @@
|
|||||||
01EB3683236097C0006832FA /* MoleculeProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoleculeProtocol.swift; sourceTree = "<group>"; };
|
01EB3683236097C0006832FA /* MoleculeProtocol.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoleculeProtocol.swift; sourceTree = "<group>"; };
|
||||||
01EB368823609801006832FA /* LabelModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LabelModel.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>"; };
|
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>"; };
|
01EB368A23609801006832FA /* StackItemModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StackItemModel.swift; sourceTree = "<group>"; };
|
||||||
01EB368B23609801006832FA /* MoleculeStackModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoleculeStackModel.swift; sourceTree = "<group>"; };
|
01EB368B23609801006832FA /* MoleculeStackModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MoleculeStackModel.swift; sourceTree = "<group>"; };
|
||||||
01EB368C23609801006832FA /* HeaderModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeaderModel.swift; sourceTree = "<group>"; };
|
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>"; };
|
01EB368D23609801006832FA /* HeadlineBodyModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HeadlineBodyModel.swift; sourceTree = "<group>"; };
|
||||||
@ -376,7 +379,10 @@
|
|||||||
D282AACA2243C61700C46919 /* ButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonView.swift; sourceTree = "<group>"; };
|
D282AACA2243C61700C46919 /* ButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonView.swift; sourceTree = "<group>"; };
|
||||||
D28A837623C79FC600DFE4FC /* MFCustomButton+ActionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MFCustomButton+ActionModel.swift"; sourceTree = "<group>"; };
|
D28A837623C79FC600DFE4FC /* MFCustomButton+ActionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MFCustomButton+ActionModel.swift"; sourceTree = "<group>"; };
|
||||||
D28A837823C7D5BC00DFE4FC /* PageModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PageModelProtocol.swift; sourceTree = "<group>"; };
|
D28A837823C7D5BC00DFE4FC /* PageModelProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PageModelProtocol.swift; sourceTree = "<group>"; };
|
||||||
D296E13B2295969C0051EBE7 /* MoleculeListCellProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MoleculeListCellProtocol.h; sourceTree = "<group>"; };
|
D28A837A23C928DA00DFE4FC /* MoleculeListCellProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoleculeListCellProtocol.swift; sourceTree = "<group>"; };
|
||||||
|
D28A837C23CCA86A00DFE4FC /* TabsListItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabsListItemModel.swift; sourceTree = "<group>"; };
|
||||||
|
D28A837E23CCA96400DFE4FC /* TabsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabsModel.swift; sourceTree = "<group>"; };
|
||||||
|
D28A838023CCB0D800DFE4FC /* AccordionListItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccordionListItemModel.swift; sourceTree = "<group>"; };
|
||||||
D296E14622A597490051EBE7 /* MVMCoreUIViewConstrainingProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIViewConstrainingProtocol.h; sourceTree = "<group>"; };
|
D296E14622A597490051EBE7 /* MVMCoreUIViewConstrainingProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MVMCoreUIViewConstrainingProtocol.h; sourceTree = "<group>"; };
|
||||||
D29770C621F7C4AE00B2F0D0 /* TopLabelsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopLabelsView.m; sourceTree = "<group>"; };
|
D29770C621F7C4AE00B2F0D0 /* TopLabelsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TopLabelsView.m; sourceTree = "<group>"; };
|
||||||
D29770C721F7C4AE00B2F0D0 /* TopLabelsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TopLabelsView.h; sourceTree = "<group>"; };
|
D29770C721F7C4AE00B2F0D0 /* TopLabelsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TopLabelsView.h; sourceTree = "<group>"; };
|
||||||
@ -613,9 +619,6 @@
|
|||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
011B58F323A2CCC80085F53C /* DropDownModel.swift */,
|
011B58F323A2CCC80085F53C /* DropDownModel.swift */,
|
||||||
011B58F123A2AE2C0085F53C /* DropDownListItemModel.swift */,
|
|
||||||
01EB368A23609801006832FA /* MoleculeStackItemModel.swift */,
|
|
||||||
01EB368B23609801006832FA /* MoleculeStackModel.swift */,
|
|
||||||
01EB368C23609801006832FA /* HeaderModel.swift */,
|
01EB368C23609801006832FA /* HeaderModel.swift */,
|
||||||
012A88EB238F084D00FE3DA1 /* FooterModel.swift */,
|
012A88EB238F084D00FE3DA1 /* FooterModel.swift */,
|
||||||
017BEB3F23620A230024EF95 /* TextFieldModel.swift */,
|
017BEB3F23620A230024EF95 /* TextFieldModel.swift */,
|
||||||
@ -723,6 +726,7 @@
|
|||||||
children = (
|
children = (
|
||||||
D2B1E3E422F37D6A0065F95C /* ImageHeadlineBody.swift */,
|
D2B1E3E422F37D6A0065F95C /* ImageHeadlineBody.swift */,
|
||||||
D20A9A5D2243D3E300ADE781 /* TwoButtonView.swift */,
|
D20A9A5D2243D3E300ADE781 /* TwoButtonView.swift */,
|
||||||
|
D28A837E23CCA96400DFE4FC /* TabsModel.swift */,
|
||||||
);
|
);
|
||||||
path = HorizontalCombinationViews;
|
path = HorizontalCombinationViews;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
@ -739,6 +743,7 @@
|
|||||||
D22479902316A9CB003FCCF9 /* Organisms */ = {
|
D22479902316A9CB003FCCF9 /* Organisms */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
01EB368B23609801006832FA /* MoleculeStackModel.swift */,
|
||||||
D2A5145E2211DDC100345BFB /* MoleculeStackView.swift */,
|
D2A5145E2211DDC100345BFB /* MoleculeStackView.swift */,
|
||||||
D2A6390022CBB1820052ED1F /* Carousel.swift */,
|
D2A6390022CBB1820052ED1F /* Carousel.swift */,
|
||||||
);
|
);
|
||||||
@ -752,9 +757,13 @@
|
|||||||
01509D8E2327EC6F00EF99AA /* MoleculeTableViewCell.swift */,
|
01509D8E2327EC6F00EF99AA /* MoleculeTableViewCell.swift */,
|
||||||
01EB368923609801006832FA /* ListItemModel.swift */,
|
01EB368923609801006832FA /* ListItemModel.swift */,
|
||||||
D2A6390422CBCE160052ED1F /* MoleculeCollectionViewCell.swift */,
|
D2A6390422CBCE160052ED1F /* MoleculeCollectionViewCell.swift */,
|
||||||
|
D28A838023CCB0D800DFE4FC /* AccordionListItemModel.swift */,
|
||||||
D224799A231965AD003FCCF9 /* AccordionMoleculeTableViewCell.swift */,
|
D224799A231965AD003FCCF9 /* AccordionMoleculeTableViewCell.swift */,
|
||||||
|
D28A837C23CCA86A00DFE4FC /* TabsListItemModel.swift */,
|
||||||
D27CD40D2322EEAF00C1DC07 /* TabsTableViewCell.swift */,
|
D27CD40D2322EEAF00C1DC07 /* TabsTableViewCell.swift */,
|
||||||
|
011B58F123A2AE2C0085F53C /* DropDownListItemModel.swift */,
|
||||||
D268C70D238C22D7007F2C1C /* DropDownFilterTableViewCell.swift */,
|
D268C70D238C22D7007F2C1C /* DropDownFilterTableViewCell.swift */,
|
||||||
|
01EB368A23609801006832FA /* StackItemModel.swift */,
|
||||||
D2FB151C23A40F1500C20E10 /* StackItem.swift */,
|
D2FB151C23A40F1500C20E10 /* StackItem.swift */,
|
||||||
);
|
);
|
||||||
path = Items;
|
path = Items;
|
||||||
@ -790,7 +799,6 @@
|
|||||||
D29DF0CE21E404D4003B2FB9 /* MVMCoreUI */ = {
|
D29DF0CE21E404D4003B2FB9 /* MVMCoreUI */ = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
D29DF10D21E67A70003B2FB9 /* Atoms */,
|
|
||||||
01509D96232803B200EF99AA /* Models */,
|
01509D96232803B200EF99AA /* Models */,
|
||||||
D2B18B7D236090D500A9AEDC /* BaseClasses */,
|
D2B18B7D236090D500A9AEDC /* BaseClasses */,
|
||||||
01C74D87224298E2009C25A3 /* FormUIHelpers */,
|
01C74D87224298E2009C25A3 /* FormUIHelpers */,
|
||||||
@ -803,6 +811,7 @@
|
|||||||
D22D1F582204D2590077CEC0 /* Legacy */,
|
D22D1F582204D2590077CEC0 /* Legacy */,
|
||||||
D29DF10F21E67A7D003B2FB9 /* BaseControllers */,
|
D29DF10F21E67A7D003B2FB9 /* BaseControllers */,
|
||||||
D29DF11E21E6851E003B2FB9 /* TopAlert */,
|
D29DF11E21E6851E003B2FB9 /* TopAlert */,
|
||||||
|
D29DF10D21E67A70003B2FB9 /* Atoms */,
|
||||||
D29DF10E21E67A77003B2FB9 /* Molecules */,
|
D29DF10E21E67A77003B2FB9 /* Molecules */,
|
||||||
D22479902316A9CB003FCCF9 /* Organisms */,
|
D22479902316A9CB003FCCF9 /* Organisms */,
|
||||||
D29DF0DF21E418B2003B2FB9 /* Templates */,
|
D29DF0DF21E418B2003B2FB9 /* Templates */,
|
||||||
@ -817,7 +826,7 @@
|
|||||||
children = (
|
children = (
|
||||||
D2A5146022121FBF00345BFB /* MoleculeStackTemplate.swift */,
|
D2A5146022121FBF00345BFB /* MoleculeStackTemplate.swift */,
|
||||||
D2A514622213643100345BFB /* MoleculeStackCenteredTemplate.swift */,
|
D2A514622213643100345BFB /* MoleculeStackCenteredTemplate.swift */,
|
||||||
D296E13B2295969C0051EBE7 /* MoleculeListCellProtocol.h */,
|
D28A837A23C928DA00DFE4FC /* MoleculeListCellProtocol.swift */,
|
||||||
D2E1FAE02268E81D00AEFD8C /* MoleculeListTemplate.swift */,
|
D2E1FAE02268E81D00AEFD8C /* MoleculeListTemplate.swift */,
|
||||||
D2D6CD4122E78FAB00D701B8 /* ThreeLayerTemplate.swift */,
|
D2D6CD4122E78FAB00D701B8 /* ThreeLayerTemplate.swift */,
|
||||||
);
|
);
|
||||||
@ -1231,7 +1240,6 @@
|
|||||||
D29DF2A121E7AF4E003B2FB9 /* MVMCoreUIUtility.h in Headers */,
|
D29DF2A121E7AF4E003B2FB9 /* MVMCoreUIUtility.h in Headers */,
|
||||||
D29DF17621E69E1F003B2FB9 /* PrimaryButton.h in Headers */,
|
D29DF17621E69E1F003B2FB9 /* PrimaryButton.h in Headers */,
|
||||||
D29DF2C821E7BFC1003B2FB9 /* MFSizeObject.h in Headers */,
|
D29DF2C821E7BFC1003B2FB9 /* MFSizeObject.h in Headers */,
|
||||||
D296E13C229598BF0051EBE7 /* MoleculeListCellProtocol.h in Headers */,
|
|
||||||
D29DF32021ED0CBA003B2FB9 /* LabelView.h in Headers */,
|
D29DF32021ED0CBA003B2FB9 /* LabelView.h in Headers */,
|
||||||
D29770C921F7C4AE00B2F0D0 /* TopLabelsView.h in Headers */,
|
D29770C921F7C4AE00B2F0D0 /* TopLabelsView.h in Headers */,
|
||||||
D29DF2E121E9240B003B2FB9 /* MVMCoreUIPanelProtocol.h in Headers */,
|
D29DF2E121E9240B003B2FB9 /* MVMCoreUIPanelProtocol.h in Headers */,
|
||||||
@ -1325,6 +1333,7 @@
|
|||||||
012CA9E423888B1B003F810F /* (null) in Sources */,
|
012CA9E423888B1B003F810F /* (null) in Sources */,
|
||||||
9402C35023A2CEA3004B974C /* LeftRightLabelModel.swift in Sources */,
|
9402C35023A2CEA3004B974C /* LeftRightLabelModel.swift in Sources */,
|
||||||
D29DF32121ED0CBA003B2FB9 /* LabelView.m in Sources */,
|
D29DF32121ED0CBA003B2FB9 /* LabelView.m in Sources */,
|
||||||
|
D28A838123CCB0D800DFE4FC /* AccordionListItemModel.swift in Sources */,
|
||||||
DBC4391822442197001AB423 /* CaretView.swift in Sources */,
|
DBC4391822442197001AB423 /* CaretView.swift in Sources */,
|
||||||
D29770F221F7C6D600B2F0D0 /* TopLabelsAndBottomButtonsTableViewController.m in Sources */,
|
D29770F221F7C6D600B2F0D0 /* TopLabelsAndBottomButtonsTableViewController.m in Sources */,
|
||||||
D29B771022C281F400D6ACE0 /* ModuleMolecule.swift in Sources */,
|
D29B771022C281F400D6ACE0 /* ModuleMolecule.swift in Sources */,
|
||||||
@ -1363,6 +1372,7 @@
|
|||||||
D2C5001921F8ECDD001DA659 /* MVMCoreUIViewControllerMappingObject.m in Sources */,
|
D2C5001921F8ECDD001DA659 /* MVMCoreUIViewControllerMappingObject.m in Sources */,
|
||||||
D29DF12E21E6851E003B2FB9 /* MVMCoreUITopAlertView.m in Sources */,
|
D29DF12E21E6851E003B2FB9 /* MVMCoreUITopAlertView.m in Sources */,
|
||||||
D29DF2CF21E7C104003B2FB9 /* MFLoadingViewController.m in Sources */,
|
D29DF2CF21E7C104003B2FB9 /* MFLoadingViewController.m in Sources */,
|
||||||
|
D28A837B23C928DA00DFE4FC /* MoleculeListCellProtocol.swift in Sources */,
|
||||||
014AA72F23C5059B006F3E93 /* ThreeLayerPageTemplateModel.swift in Sources */,
|
014AA72F23C5059B006F3E93 /* ThreeLayerPageTemplateModel.swift in Sources */,
|
||||||
D22D1F572204CE5D0077CEC0 /* MVMCoreUIStackableViewController.m in Sources */,
|
D22D1F572204CE5D0077CEC0 /* MVMCoreUIStackableViewController.m in Sources */,
|
||||||
D2A5145F2211DDC100345BFB /* MoleculeStackView.swift in Sources */,
|
D2A5145F2211DDC100345BFB /* MoleculeStackView.swift in Sources */,
|
||||||
@ -1385,10 +1395,11 @@
|
|||||||
944589232385DA9600DE9FD4 /* ImageViewModel.swift in Sources */,
|
944589232385DA9600DE9FD4 /* ImageViewModel.swift in Sources */,
|
||||||
D213347723843825008E41B3 /* Line.swift in Sources */,
|
D213347723843825008E41B3 /* Line.swift in Sources */,
|
||||||
D28A837723C79FC600DFE4FC /* MFCustomButton+ActionModel.swift in Sources */,
|
D28A837723C79FC600DFE4FC /* MFCustomButton+ActionModel.swift in Sources */,
|
||||||
|
D28A837F23CCA96400DFE4FC /* TabsModel.swift in Sources */,
|
||||||
012A88EC238F084D00FE3DA1 /* FooterModel.swift in Sources */,
|
012A88EC238F084D00FE3DA1 /* FooterModel.swift in Sources */,
|
||||||
D2A514672213885800345BFB /* StandardHeaderView.swift in Sources */,
|
D2A514672213885800345BFB /* StandardHeaderView.swift in Sources */,
|
||||||
01EB369023609801006832FA /* ListItemModel.swift in Sources */,
|
01EB369023609801006832FA /* ListItemModel.swift in Sources */,
|
||||||
D268C70C2386DFFD007F2C1C /* MoleculeStackItemModel.swift in Sources */,
|
D268C70C2386DFFD007F2C1C /* StackItemModel.swift in Sources */,
|
||||||
DBEFFA04225A829700230692 /* Label.swift in Sources */,
|
DBEFFA04225A829700230692 /* Label.swift in Sources */,
|
||||||
D2D6CD4022E78C1A00D701B8 /* Scroller.swift in Sources */,
|
D2D6CD4022E78C1A00D701B8 /* Scroller.swift in Sources */,
|
||||||
01509D952327ED1900EF99AA /* HeadlineBodyTextButtonSwitch.swift in Sources */,
|
01509D952327ED1900EF99AA /* HeadlineBodyTextButtonSwitch.swift in Sources */,
|
||||||
@ -1459,6 +1470,7 @@
|
|||||||
D29770C821F7C4AE00B2F0D0 /* TopLabelsView.m in Sources */,
|
D29770C821F7C4AE00B2F0D0 /* TopLabelsView.m in Sources */,
|
||||||
01EB369323609801006832FA /* HeaderModel.swift in Sources */,
|
01EB369323609801006832FA /* HeaderModel.swift in Sources */,
|
||||||
D2E1FADF2268B8E700AEFD8C /* ThreeLayerTableViewController.swift in Sources */,
|
D2E1FADF2268B8E700AEFD8C /* ThreeLayerTableViewController.swift in Sources */,
|
||||||
|
D28A837D23CCA86A00DFE4FC /* TabsListItemModel.swift in Sources */,
|
||||||
012A88C6238DA34000FE3DA1 /* ModuleMoleculeModel.swift in Sources */,
|
012A88C6238DA34000FE3DA1 /* ModuleMoleculeModel.swift in Sources */,
|
||||||
94C2D9A123872BCC0006CF46 /* LabelAttributeUnderlineModel.swift in Sources */,
|
94C2D9A123872BCC0006CF46 /* LabelAttributeUnderlineModel.swift in Sources */,
|
||||||
D20A9A5E2243D3E300ADE781 /* TwoButtonView.swift in Sources */,
|
D20A9A5E2243D3E300ADE781 /* TwoButtonView.swift in Sources */,
|
||||||
|
|||||||
@ -132,7 +132,7 @@ open class CaretButton: MFCustomButton, MVMCoreUIMoleculeViewProtocol, MVMCoreUI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
guard let caretLinkModel = model as? CaretLinkModel else { return }
|
guard let caretLinkModel = model as? CaretLinkModel else { return }
|
||||||
if let color = caretLinkModel.backgroundColor {
|
if let color = caretLinkModel.backgroundColor {
|
||||||
backgroundColor = color.uiColor
|
backgroundColor = color.uiColor
|
||||||
|
|||||||
@ -16,7 +16,7 @@ enum TextType: String {
|
|||||||
}
|
}
|
||||||
extension MFTextField: ModelMoleculeViewProtocol {
|
extension MFTextField: ModelMoleculeViewProtocol {
|
||||||
//
|
//
|
||||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
//TODO: Need to create setWithModel in ViewConstraining View
|
//TODO: Need to create setWithModel in ViewConstraining View
|
||||||
#warning("This below call should be repaced with super.setWithModel once we get rid of ViewConstrainingView.")
|
#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.
|
//TODO: This below call should be repaced with super.setWithModel once we get rid of ViewConstrainingView.
|
||||||
|
|||||||
@ -103,13 +103,13 @@ open class CaretView: View {
|
|||||||
defaultState()
|
defaultState()
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
public override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
guard let json = json, let model = try? Self.decodeJSONToModel(json: json, type: CaretViewModel.self) else { return }
|
guard let json = json, let model = try? Self.decodeJSONToModel(json: json, type: CaretViewModel.self) else { return }
|
||||||
setWithModel(model, delegateObject, additionalData as? [String : AnyHashable])
|
setWithModel(model, delegateObject, additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
//MARK: - MVMCoreMoleculeViewProtocol
|
//MARK: - MVMCoreMoleculeViewProtocol
|
||||||
override public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
override public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
guard let caretModel = model as? CaretViewModel else {
|
guard let caretModel = model as? CaretViewModel else {
|
||||||
return
|
return
|
||||||
|
|||||||
@ -74,11 +74,11 @@ open class DashLine: View {
|
|||||||
|
|
||||||
open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
guard let json = json, let model = try? Self.decodeJSONToModel(json: json, type: DashLineModel.self) else { return }
|
guard let json = json, let model = try? Self.decodeJSONToModel(json: json, type: DashLineModel.self) else { return }
|
||||||
setWithModel(model, delegateObject, additionalData as? [String : AnyHashable])
|
setWithModel(model, delegateObject, additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
//MARK: - MVMCoreMoleculeViewProtocol
|
//MARK: - MVMCoreMoleculeViewProtocol
|
||||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
guard let dashLineModel = dashModel else {
|
guard let dashLineModel = dashModel else {
|
||||||
return
|
return
|
||||||
|
|||||||
@ -126,11 +126,11 @@ public struct GraphObject {
|
|||||||
widthAnchor.constraint(equalTo: heightAnchor).isActive = true
|
widthAnchor.constraint(equalTo: heightAnchor).isActive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
override open func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
override open func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
override open func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
override open func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||||
let object = GraphObject(json)
|
let object = GraphObject(json)
|
||||||
graphObject = object
|
graphObject = object
|
||||||
|
|||||||
@ -218,7 +218,7 @@ public typealias ActionBlock = () -> ()
|
|||||||
case left
|
case left
|
||||||
}
|
}
|
||||||
|
|
||||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
clauses = []
|
clauses = []
|
||||||
guard let labelModel = model as? LabelModel else { return }
|
guard let labelModel = model as? LabelModel else { return }
|
||||||
attributedText = nil
|
attributedText = nil
|
||||||
|
|||||||
@ -179,7 +179,7 @@ import Foundation
|
|||||||
|
|
||||||
//MARK: - MVMCoreMoleculeViewProtocol
|
//MARK: - MVMCoreMoleculeViewProtocol
|
||||||
|
|
||||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
guard let leftRightLabelModel = model as? LeftRightLabelModel else {
|
guard let leftRightLabelModel = model as? LeftRightLabelModel else {
|
||||||
return
|
return
|
||||||
|
|||||||
@ -67,7 +67,7 @@ import UIKit
|
|||||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
if let lineModel = model as? LineModel {
|
if let lineModel = model as? LineModel {
|
||||||
setStyle(lineModel.type ?? .standard)
|
setStyle(lineModel.type ?? .standard)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -209,7 +209,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
guard let imageModel = model as? ImageViewModel else {
|
guard let imageModel = model as? ImageViewModel else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
extension MFView {
|
extension MFView {
|
||||||
public func setUpDefaultWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String: AnyHashable]?) {
|
public func setUpDefaultWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
self.model = model
|
self.model = model
|
||||||
if let backgroundColor = model?.backgroundColor {
|
if let backgroundColor = model?.backgroundColor {
|
||||||
self.backgroundColor = backgroundColor.uiColor
|
self.backgroundColor = backgroundColor.uiColor
|
||||||
@ -18,7 +18,7 @@ extension MFView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
extension ModelMoleculeViewProtocol where Self: MFView {
|
extension ModelMoleculeViewProtocol where Self: MFView {
|
||||||
func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String: AnyHashable]?) {
|
func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
setUpDefaultWithModel(model, delegateObject, additionalData)
|
setUpDefaultWithModel(model, delegateObject, additionalData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -64,7 +64,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
//MARK: - MVMCoreMoleculeViewProtocol
|
//MARK: - MVMCoreMoleculeViewProtocol
|
||||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
guard let multiProgressModel = multiProgressModel else {
|
guard let multiProgressModel = multiProgressModel else {
|
||||||
return
|
return
|
||||||
@ -83,6 +83,6 @@ import UIKit
|
|||||||
|
|
||||||
public override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
public override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
||||||
guard let json = json, let model = try? Self.decodeJSONToModel(json: json, type: MultiProgressBarModel.self) else { return }
|
guard let json = json, let model = try? Self.decodeJSONToModel(json: json, type: MultiProgressBarModel.self) else { return }
|
||||||
setWithModel(model, delegateObject, additionalData as? [String : AnyHashable])
|
setWithModel(model, delegateObject, additionalData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,7 +51,7 @@ import Foundation
|
|||||||
}
|
}
|
||||||
|
|
||||||
//MARK: - MVMCoreMoleculeViewProtocol
|
//MARK: - MVMCoreMoleculeViewProtocol
|
||||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String: AnyHashable]?) {
|
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
guard let progressBarModel = model as? ProgressBarModel else {
|
guard let progressBarModel = model as? ProgressBarModel else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -64,9 +64,9 @@ import Foundation
|
|||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||||
public func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
public func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
guard let json = json, let model = try? Self.decodeJSONToModel(json: json, type: ProgressBarModel.self) else { return }
|
guard let json = json, let model = try? Self.decodeJSONToModel(json: json, type: ProgressBarModel.self) else { return }
|
||||||
setWithModel(model, delegateObject, additionalData as? [String : AnyHashable])
|
setWithModel(model, delegateObject, additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func reset() {
|
public func reset() {
|
||||||
|
|||||||
@ -49,7 +49,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
self.model = model
|
self.model = model
|
||||||
if let backgroundColor = model?.backgroundColor {
|
if let backgroundColor = model?.backgroundColor {
|
||||||
self.backgroundColor = backgroundColor.uiColor
|
self.backgroundColor = backgroundColor.uiColor
|
||||||
|
|||||||
@ -40,7 +40,7 @@ import UIKit
|
|||||||
return model?.moleculeName
|
return model?.moleculeName
|
||||||
}
|
}
|
||||||
|
|
||||||
open func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
open func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
self.model = model
|
self.model = model
|
||||||
if let backgroundColor = model?.backgroundColor {
|
if let backgroundColor = model?.backgroundColor {
|
||||||
self.backgroundColor = backgroundColor.uiColor
|
self.backgroundColor = backgroundColor.uiColor
|
||||||
|
|||||||
@ -16,10 +16,10 @@ extension MFViewController: MoleculeDelegateProtocol {
|
|||||||
return loadObject?.modulesJSON?.optionalDictionaryForKey(name)
|
return loadObject?.modulesJSON?.optionalDictionaryForKey(name)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func getModuleWithName(_ moduleName: String) -> Model? {
|
public func getModuleWithName(_ moduleName: String) -> MoleculeProtocol? {
|
||||||
guard let moduleJSON = loadObject?.modulesJSON?.optionalDictionaryForKey(moduleName),
|
guard let moduleJSON = loadObject?.modulesJSON?.optionalDictionaryForKey(moduleName),
|
||||||
let moleculeName = moduleJSON.optionalStringForKey("moleculeName"),
|
let moleculeName = moduleJSON.optionalStringForKey("moleculeName"),
|
||||||
let modelType = ModelRegistry.getType(for: moleculeName) else {
|
let modelType = ModelRegistry.getType(for: moleculeName) as? MoleculeProtocol.Type else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
|
|||||||
@ -172,11 +172,11 @@ public class ContainerHelper: NSObject {
|
|||||||
MFStyler.setMarginsFor(view, size: size, defaultHorizontal: model?.useHorizontalMargins ?? false, top: (model?.useVerticalMargins ?? false) ? (model?.topMarginPadding ?? 0) : 0, bottom: (model?.useVerticalMargins ?? false) ? (model?.bottomMarginPadding ?? 0) : 0)
|
MFStyler.setMarginsFor(view, size: size, defaultHorizontal: model?.useHorizontalMargins ?? false, top: (model?.useVerticalMargins ?? false) ? (model?.topMarginPadding ?? 0) : 0, bottom: (model?.useVerticalMargins ?? false) ? (model?.bottomMarginPadding ?? 0) : 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
func set(with model: ContainerModelProtocol) {
|
func set(with model: ContainerModelProtocol, for contained: MVMCoreUIViewConstrainingProtocol?) {
|
||||||
if let horizontalAlignment = model.horizontalAlignment {
|
if let horizontalAlignment = model.horizontalAlignment ?? contained?.horizontalAlignment?() {
|
||||||
alignHorizontal(horizontalAlignment)
|
alignHorizontal(horizontalAlignment)
|
||||||
}
|
}
|
||||||
if let verticalAlignment = model.verticalAlignment {
|
if let verticalAlignment = model.verticalAlignment ?? contained?.verticalAlignment?() {
|
||||||
alignVertical(verticalAlignment)
|
alignVertical(verticalAlignment)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -203,10 +203,10 @@ open class Container: View {
|
|||||||
get { return model as? ContainerModelProtocol }
|
get { return model as? ContainerModelProtocol }
|
||||||
}
|
}
|
||||||
|
|
||||||
override open func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
override open func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
guard let containerModel = model as? ContainerModelProtocol else { return }
|
guard let containerModel = model as? ContainerModelProtocol else { return }
|
||||||
containerHelper.set(with: containerModel)
|
containerHelper.set(with: containerModel, for: view as? MVMCoreUIViewConstrainingProtocol)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -20,7 +20,6 @@ FOUNDATION_EXPORT const unsigned char MVMCoreUIVersionString[];
|
|||||||
#import <MVMCoreUI/MVMCoreUILoggingHandler.h>
|
#import <MVMCoreUI/MVMCoreUILoggingHandler.h>
|
||||||
#import <MVMCoreUI/MVMCoreUIViewControllerMappingObject.h>
|
#import <MVMCoreUI/MVMCoreUIViewControllerMappingObject.h>
|
||||||
#import <MVMCoreUI/MVMCoreUIViewConstrainingProtocol.h>
|
#import <MVMCoreUI/MVMCoreUIViewConstrainingProtocol.h>
|
||||||
#import <MVMCoreUI/MoleculeListCellProtocol.h>
|
|
||||||
#import <MVMCoreUI/MVMCoreUIMoleculeMappingObject.h>
|
#import <MVMCoreUI/MVMCoreUIMoleculeMappingObject.h>
|
||||||
|
|
||||||
#pragma mark - TopAlert
|
#pragma mark - TopAlert
|
||||||
|
|||||||
@ -35,4 +35,17 @@ extension KeyedDecodingContainer where Key : CodingKey {
|
|||||||
public func decodeMoleculesIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> [MoleculeProtocol]? {
|
public func decodeMoleculesIfPresent(codingKey: KeyedDecodingContainer<K>.Key) throws -> [MoleculeProtocol]? {
|
||||||
return try decodeModelsIfPresent(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [MoleculeProtocol]
|
return try decodeModelsIfPresent(codingKey: codingKey, typeCodingKey: TypeCodingKey.moleculeName) as? [MoleculeProtocol]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 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]]
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 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 {
|
||||||
|
throw ModelRegistry.Error.decoderError
|
||||||
|
}
|
||||||
|
return models
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,27 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public protocol ListItemModelProtocol: ContainerModelProtocol, MoleculeProtocol {
|
public protocol ListItemModelProtocol: ContainerModelProtocol, MoleculeProtocol {
|
||||||
var molecule: MoleculeProtocol { get }
|
|
||||||
var line: LineModel? { get set }
|
var line: LineModel? { get set }
|
||||||
|
var action: ActionProtocol? { get set }
|
||||||
|
var hideArrow: Bool? { get set }
|
||||||
|
var style: String? { get set }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Not a strict requirement.
|
||||||
|
extension ListItemModelProtocol {
|
||||||
|
public var action: ActionProtocol? {
|
||||||
|
get {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public var style: String? {
|
||||||
|
get {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,7 +15,7 @@ public protocol TemplateProtocol: class {
|
|||||||
|
|
||||||
public extension TemplateProtocol where Self: MFViewController {
|
public extension TemplateProtocol where Self: MFViewController {
|
||||||
func parseTemplateJSON() {
|
func parseTemplateJSON() {
|
||||||
guard let pageJSON = self.loadObject?.pageJSON as? [String: AnyHashable] else { return }
|
guard let pageJSON = self.loadObject?.pageJSON else { return }
|
||||||
do {
|
do {
|
||||||
let data = try JSONSerialization.data(withJSONObject: pageJSON)
|
let data = try JSONSerialization.data(withJSONObject: pageJSON)
|
||||||
let decoder = JSONDecoder()
|
let decoder = JSONDecoder()
|
||||||
|
|||||||
@ -19,6 +19,7 @@ import Foundation
|
|||||||
public var header: HeaderModel?
|
public var header: HeaderModel?
|
||||||
public var molecules: [ListItemModelProtocol]
|
public var molecules: [ListItemModelProtocol]
|
||||||
public var footer: MoleculeStackModel?
|
public var footer: MoleculeStackModel?
|
||||||
|
public var line: LineModel?
|
||||||
|
|
||||||
public init(pageType: String, screenHeading: String, molecules: [ListItemModelProtocol]) {
|
public init(pageType: String, screenHeading: String, molecules: [ListItemModelProtocol]) {
|
||||||
self.pageType = pageType
|
self.pageType = pageType
|
||||||
@ -26,39 +27,41 @@ import Foundation
|
|||||||
self.molecules = molecules
|
self.molecules = molecules
|
||||||
}
|
}
|
||||||
|
|
||||||
enum CodingKeys: String, CodingKey {
|
enum CodingKeys: String, CodingKey {
|
||||||
case moleculeName
|
case moleculeName
|
||||||
case pageType
|
case pageType
|
||||||
case screenHeading
|
case screenHeading
|
||||||
case molecules
|
case molecules
|
||||||
case header
|
case header
|
||||||
case footer
|
case footer
|
||||||
case isAtomicTabs
|
case line
|
||||||
}
|
case isAtomicTabs
|
||||||
|
}
|
||||||
|
|
||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
self.pageType = try typeContainer.decode(String.self, forKey: .pageType)
|
pageType = try typeContainer.decode(String.self, forKey: .pageType)
|
||||||
self.screenHeading = try typeContainer.decode(String.self, forKey: .screenHeading)
|
screenHeading = try typeContainer.decodeIfPresent(String.self, forKey: .screenHeading)
|
||||||
|
|
||||||
|
guard let molecules = try typeContainer.decodeMolecules(codingKey: .molecules) as? [ListItemModelProtocol] else {
|
||||||
|
throw JSONError.pathNotFound
|
||||||
|
}
|
||||||
|
self.molecules = molecules
|
||||||
|
isAtomicTabs = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAtomicTabs)
|
||||||
|
header = try typeContainer.decodeIfPresent(HeaderModel.self, forKey: .header)
|
||||||
|
footer = try typeContainer.decodeIfPresent(MoleculeStackModel.self, forKey: .footer)
|
||||||
|
line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line)
|
||||||
|
}
|
||||||
|
|
||||||
guard let molecules = try typeContainer.decodeMolecules(codingKey: .molecules) as? [ListItemModelProtocol] else {
|
public func encode(to encoder: Encoder) throws {
|
||||||
throw JSONError.pathNotFound
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
}
|
try container.encode(pageType, forKey: .pageType)
|
||||||
self.molecules = molecules
|
try container.encodeIfPresent(screenHeading, forKey: .screenHeading)
|
||||||
self.isAtomicTabs = try typeContainer.decodeIfPresent(Bool.self, forKey: .isAtomicTabs)
|
try container.encodeModels(molecules, forKey: .molecules)
|
||||||
self.header = try typeContainer.decodeIfPresent(HeaderModel.self, forKey: .header)
|
try container.encodeIfPresent(isAtomicTabs, forKey: .isAtomicTabs)
|
||||||
self.footer = try typeContainer.decodeIfPresent(MoleculeStackModel.self, forKey: .footer)
|
try container.encodeIfPresent(header, forKey: .header)
|
||||||
}
|
try container.encodeIfPresent(footer, forKey: .footer)
|
||||||
|
try container.encode(line, forKey: .line)
|
||||||
public func encode(to encoder: Encoder) throws {
|
}
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
||||||
try container.encode(pageType, forKey: .pageType)
|
|
||||||
try container.encode(screenHeading, forKey: .screenHeading)
|
|
||||||
|
|
||||||
try container.encodeModels(molecules, forKey: .molecules)
|
|
||||||
try container.encodeIfPresent(isAtomicTabs, forKey: .isAtomicTabs)
|
|
||||||
try container.encodeIfPresent(header, forKey: .header)
|
|
||||||
try container.encodeIfPresent(footer, forKey: .footer)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,50 @@
|
|||||||
|
//
|
||||||
|
// TabsModel.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Scott Pfeil on 1/13/20.
|
||||||
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
public class TabsModel: MoleculeProtocol {
|
||||||
|
public static var identifier: String = "tabs"
|
||||||
|
public var backgroundColor: Color?
|
||||||
|
public var tabs: [LabelModel]
|
||||||
|
public var selectedColor = Color(uiColor: .mfTomatoRed())
|
||||||
|
|
||||||
|
// Must be capped to 0...(tabs.count - 1)
|
||||||
|
public var selectedIndex: Int = 0
|
||||||
|
|
||||||
|
enum TabsCodingKeys: String, CodingKey {
|
||||||
|
case tabs
|
||||||
|
case backgroundColor
|
||||||
|
case selectedColor
|
||||||
|
case selectedIndex
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(with tabs: [LabelModel]) {
|
||||||
|
self.tabs = tabs
|
||||||
|
}
|
||||||
|
|
||||||
|
required public init(from decoder: Decoder) throws {
|
||||||
|
let typeContainer = try decoder.container(keyedBy: TabsCodingKeys.self)
|
||||||
|
tabs = try typeContainer.decode([LabelModel].self, forKey: .tabs)
|
||||||
|
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||||
|
if let color = try typeContainer.decodeIfPresent(Color.self, forKey: .selectedColor) {
|
||||||
|
selectedColor = color
|
||||||
|
}
|
||||||
|
if let index = try typeContainer.decodeIfPresent(Int.self, forKey: .selectedIndex) {
|
||||||
|
selectedIndex = index
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public func encode(to encoder: Encoder) throws {
|
||||||
|
var container = encoder.container(keyedBy: TabsCodingKeys.self)
|
||||||
|
try container.encode(tabs, forKey: .tabs)
|
||||||
|
try container.encode(backgroundColor, forKey: .backgroundColor)
|
||||||
|
try container.encode(selectedColor, forKey: .selectedColor)
|
||||||
|
try container.encode(selectedIndex, forKey: .selectedIndex)
|
||||||
|
}
|
||||||
|
}
|
||||||
46
MVMCoreUI/Molecules/Items/AccordionListItemModel.swift
Normal file
46
MVMCoreUI/Molecules/Items/AccordionListItemModel.swift
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
//
|
||||||
|
// AccordionListItemModel.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Scott Pfeil on 1/13/20.
|
||||||
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
class AccordionListItemModel: MoleculeContainerModel, ListItemModelProtocol {
|
||||||
|
public static var identifier: String = "accordionListItem"
|
||||||
|
public var molecules: [ListItemModelProtocol]
|
||||||
|
public var backgroundColor: Color?
|
||||||
|
public var hideLineWhenExpanded: Bool = false
|
||||||
|
public var hideArrow: Bool? = true
|
||||||
|
public var line: LineModel?
|
||||||
|
|
||||||
|
enum AccordionListItemCodingKeys: String, CodingKey {
|
||||||
|
case molecules
|
||||||
|
case backgroundColor
|
||||||
|
case hideLineWhenExpanded
|
||||||
|
case hideArrow
|
||||||
|
case line
|
||||||
|
}
|
||||||
|
|
||||||
|
required public init(from decoder: Decoder) throws {
|
||||||
|
let typeContainer = try decoder.container(keyedBy: AccordionListItemCodingKeys.self)
|
||||||
|
molecules = try typeContainer.decodeMolecules(codingKey: .molecules) as! [ListItemModelProtocol]
|
||||||
|
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||||
|
line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line)
|
||||||
|
if let hideLine = try typeContainer.decodeIfPresent(Bool.self, forKey: .hideLineWhenExpanded) {
|
||||||
|
hideLineWhenExpanded = hideLine
|
||||||
|
}
|
||||||
|
try super.init(from: decoder)
|
||||||
|
}
|
||||||
|
|
||||||
|
public override func encode(to encoder: Encoder) throws {
|
||||||
|
try super.encode(to: encoder)
|
||||||
|
var container = encoder.container(keyedBy: AccordionListItemCodingKeys.self)
|
||||||
|
try container.encodeModels(molecules, forKey: .molecules)
|
||||||
|
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||||
|
try container.encodeIfPresent(hideLineWhenExpanded, forKey: .hideLineWhenExpanded)
|
||||||
|
try container.encodeIfPresent(line, forKey: .line)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,6 +9,7 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
@objcMembers public class AccordionMoleculeTableViewCell: MoleculeTableViewCell {
|
@objcMembers public class AccordionMoleculeTableViewCell: MoleculeTableViewCell {
|
||||||
|
var accordionListItemModel: AccordionListItemModel?
|
||||||
let accordionButton = createAccordionButton()
|
let accordionButton = createAccordionButton()
|
||||||
|
|
||||||
static func createAccordionButton() -> MFCustomButton {
|
static func createAccordionButton() -> MFCustomButton {
|
||||||
@ -26,10 +27,10 @@ import UIKit
|
|||||||
accessoryView = accordionButton
|
accessoryView = accordionButton
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func didSelectCell(atIndex indexPath: IndexPath, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
override public func didSelectCell(at index: IndexPath, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
||||||
accordionButton.isSelected = !accordionButton.isSelected
|
accordionButton.isSelected = !accordionButton.isSelected
|
||||||
accordionButton.setTitle(accordionButton.isSelected ? "-" : "+", for: .normal)
|
accordionButton.setTitle(accordionButton.isSelected ? "-" : "+", for: .normal)
|
||||||
guard let molecules = json?.optionalArrayForKey(KeyMolecules) as? [[AnyHashable: Any]] else {
|
guard let molecules = accordionListItemModel?.molecules else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +40,7 @@ import UIKit
|
|||||||
delegateObject?.moleculeDelegate?.removeMolecules(molecules, sender: self, animation: .automatic)
|
delegateObject?.moleculeDelegate?.removeMolecules(molecules, sender: self, animation: .automatic)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (json?.boolForKey("hideSeparatorWhenExpanded") ?? false) && (self.bottomSeparatorView?.shouldBeVisible() ?? false) {
|
if (accordionListItemModel?.hideLineWhenExpanded ?? false) && (self.bottomSeparatorView?.shouldBeVisible() ?? false) {
|
||||||
bottomSeparatorView?.isHidden = accordionButton.isSelected
|
bottomSeparatorView?.isHidden = accordionButton.isSelected
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
@objcMembers public class DropDownFilterTableViewCell: TableViewCell {
|
@objcMembers public class DropDownFilterTableViewCell: TableViewCell {
|
||||||
|
var dropDownListItemModel: DropDownListItemModel?
|
||||||
let dropDown = DropDown(forDropDownWithBothDelegates: nil)
|
let dropDown = DropDown(forDropDownWithBothDelegates: nil)
|
||||||
var delegateObject: MVMCoreUIDelegateObject?
|
var delegateObject: MVMCoreUIDelegateObject?
|
||||||
var previousIndex = NSNotFound
|
var previousIndex = NSNotFound
|
||||||
@ -20,7 +21,6 @@ import UIKit
|
|||||||
guard let dropDown = dropDown, dropDown.superview == nil else {
|
guard let dropDown = dropDown, dropDown.superview == nil else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
bottomMarginPadding = 0
|
|
||||||
|
|
||||||
dropDown.translatesAutoresizingMaskIntoConstraints = false
|
dropDown.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentView.addSubview(dropDown)
|
contentView.addSubview(dropDown)
|
||||||
@ -35,14 +35,12 @@ import UIKit
|
|||||||
guard change.newValue != change.oldValue, let self = self,
|
guard change.newValue != change.oldValue, let self = self,
|
||||||
let options = self.dropDown?.json?.optionalArrayForKey("options") as? [NSString],
|
let options = self.dropDown?.json?.optionalArrayForKey("options") as? [NSString],
|
||||||
let index = options.firstIndex(of: change.newValue!! as NSString),
|
let index = options.firstIndex(of: change.newValue!! as NSString),
|
||||||
let moleculesArrays = self.json?.arrayForKey(KeyMolecules) as? [[[AnyHashable: Any]]] else { return }
|
let molecules = self.dropDownListItemModel?.molecules else { return }
|
||||||
|
|
||||||
if self.previousIndex != NSNotFound {
|
if self.previousIndex != NSNotFound {
|
||||||
let previousMolecules = moleculesArrays[self.previousIndex]
|
self.delegateObject?.moleculeDelegate?.removeMolecules(molecules[self.previousIndex], sender: self, animation: .fade)
|
||||||
self.delegateObject?.moleculeDelegate?.removeMolecules(previousMolecules, sender: self, animation: .fade)
|
|
||||||
}
|
}
|
||||||
let molecules = moleculesArrays[index]
|
self.delegateObject?.moleculeDelegate?.addMolecules(molecules[index], sender: self, animation: .fade)
|
||||||
self.delegateObject?.moleculeDelegate?.addMolecules(molecules, sender: self, animation: .fade)
|
|
||||||
self.previousIndex = index
|
self.previousIndex = index
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -52,19 +50,18 @@ import UIKit
|
|||||||
dropDown?.updateView(size)
|
dropDown?.updateView(size)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
bottomSeparatorView?.setStyle(.none)
|
dropDownListItemModel = model as? DropDownListItemModel
|
||||||
self.delegateObject = delegateObject
|
self.delegateObject = delegateObject
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
|
|
||||||
dropDown?.mfTextFieldDelegate = delegateObject?.uiTextFieldDelegate as? MFTextFieldDelegate
|
dropDown?.mfTextFieldDelegate = delegateObject?.uiTextFieldDelegate as? MFTextFieldDelegate
|
||||||
dropDown?.uiTextFieldDelegate = delegateObject?.uiTextFieldDelegate
|
dropDown?.uiTextFieldDelegate = delegateObject?.uiTextFieldDelegate
|
||||||
dropDown?.setWithJSON(json?.optionalDictionaryForKey("dropDown"), delegateObject: delegateObject, additionalData: additionalData)
|
dropDown?.setWithModel(dropDownListItemModel, delegateObject, additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func reset() {
|
public override func reset() {
|
||||||
super.reset()
|
super.reset()
|
||||||
bottomMarginPadding = 0
|
|
||||||
bottomSeparatorView?.setStyle(.none)
|
bottomSeparatorView?.setStyle(.none)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -10,12 +10,13 @@ import Foundation
|
|||||||
|
|
||||||
@objcMembers public class DropDownListItemModel: MoleculeContainerModel, ListItemModelProtocol {
|
@objcMembers public class DropDownListItemModel: MoleculeContainerModel, ListItemModelProtocol {
|
||||||
public static var identifier: String = "dropDownListItem"
|
public static var identifier: String = "dropDownListItem"
|
||||||
public var molecules: [[ListItemModel]]
|
public var molecules: [[ListItemModelProtocol]]
|
||||||
public var backgroundColor: Color?
|
|
||||||
public var line: LineModel?
|
|
||||||
public var dropDown: DropDownModel
|
public var dropDown: DropDownModel
|
||||||
|
public var backgroundColor: Color?
|
||||||
|
public var line: LineModel? = LineModel(type: .none)
|
||||||
|
public var hideArrow: Bool? = true
|
||||||
|
|
||||||
public init(molecule: MoleculeProtocol, molecules: [[ListItemModel]], dropDown: DropDownModel) {
|
public init(molecule: MoleculeProtocol, molecules: [[ListItemModelProtocol]], dropDown: DropDownModel) {
|
||||||
self.molecules = molecules
|
self.molecules = molecules
|
||||||
self.dropDown = dropDown
|
self.dropDown = dropDown
|
||||||
super.init(with: molecule)
|
super.init(with: molecule)
|
||||||
@ -23,25 +24,28 @@ import Foundation
|
|||||||
|
|
||||||
enum DropDownCodingKeys: String, CodingKey {
|
enum DropDownCodingKeys: String, CodingKey {
|
||||||
case molecules
|
case molecules
|
||||||
|
case dropDown
|
||||||
case line
|
case line
|
||||||
case backgroundColor
|
case backgroundColor
|
||||||
case dropDown
|
|
||||||
}
|
}
|
||||||
|
|
||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: DropDownCodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: DropDownCodingKeys.self)
|
||||||
self.molecules = try typeContainer.decode([[ListItemModel]].self, forKey: .molecules)
|
molecules = try typeContainer.decodeMolecules2D(codingKey: .molecules) as! [[ListItemModelProtocol]]
|
||||||
self.line = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line)
|
dropDown = try typeContainer.decode(DropDownModel.self, forKey: .dropDown)
|
||||||
self.backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
if let lineModel = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line) {
|
||||||
self.dropDown = try typeContainer.decode(DropDownModel.self, forKey: .dropDown)
|
line = lineModel
|
||||||
|
}
|
||||||
|
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||||
try super.init(from: decoder)
|
try super.init(from: decoder)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func encode(to encoder: Encoder) throws {
|
public override func encode(to encoder: Encoder) throws {
|
||||||
try super.encode(to: encoder)
|
try super.encode(to: encoder)
|
||||||
var container = encoder.container(keyedBy: DropDownCodingKeys.self)
|
var container = encoder.container(keyedBy: DropDownCodingKeys.self)
|
||||||
try container.encode(molecules, forKey: .molecules)
|
try container.encodeModels2D(molecules, forKey: .molecules)
|
||||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
|
||||||
try container.encode(dropDown, forKey: .dropDown)
|
try container.encode(dropDown, forKey: .dropDown)
|
||||||
|
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||||
|
try container.encodeIfPresent(line, forKey: .line)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
open class MoleculeCollectionViewCell: UICollectionViewCell, MVMCoreUIMoleculeViewProtocol, MoleculeListCellProtocol, ModelMoleculeViewProtocol {
|
open class MoleculeCollectionViewCell: UICollectionViewCell, MVMCoreUIMoleculeViewProtocol, ModelMoleculeViewProtocol {
|
||||||
|
|
||||||
open var molecule: (UIView & MVMCoreUIMoleculeViewProtocol)?
|
open var molecule: (UIView & MVMCoreUIMoleculeViewProtocol)?
|
||||||
open var json: [AnyHashable: Any]?
|
open var json: [AnyHashable: Any]?
|
||||||
@ -68,7 +68,7 @@ open class MoleculeCollectionViewCell: UICollectionViewCell, MVMCoreUIMoleculeVi
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
guard let collectionModel = model as? CarouselItemModel else {
|
guard let collectionModel = model as? CarouselItemModel else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,11 +11,11 @@ import UIKit
|
|||||||
@objcMembers open class MoleculeTableViewCell: TableViewCell {
|
@objcMembers open class MoleculeTableViewCell: TableViewCell {
|
||||||
|
|
||||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
|
|
||||||
guard let model = model,
|
guard let model = model,
|
||||||
let moleculeModel = (model as? ListItemModelProtocol)?.molecule,
|
let moleculeModel = (model as? ListItemModel)?.molecule,
|
||||||
let moleculeView = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(moleculeModel, delegateObject, true) else {
|
let moleculeView = MVMCoreUIMoleculeMappingObject.shared()?.createMolecule(moleculeModel, delegateObject, true) else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@ -23,7 +23,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
public override class func name(forReuse molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
public override class func name(forReuse molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> String? {
|
||||||
guard let moleculeModel = (molecule as? ListItemModelProtocol)?.molecule else {
|
guard let moleculeModel = (molecule as? ListItemModel)?.molecule else {
|
||||||
return "\(self)<>"
|
return "\(self)<>"
|
||||||
}
|
}
|
||||||
let className = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(moleculeModel) as? ModelMoleculeViewProtocol
|
let className = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(moleculeModel) as? ModelMoleculeViewProtocol
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
open class StackItem: MoleculeContainer {
|
open class StackItem: MoleculeContainer {
|
||||||
var stackItemModel: MoleculeStackItemModel? {
|
var stackItemModel: StackItemModel? {
|
||||||
get { return model as? MoleculeStackItemModel }
|
get { return model as? StackItemModel }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
@objcMembers public class MoleculeStackItemModel: MoleculeContainerModel, MoleculeProtocol {
|
@objcMembers public class StackItemModel: MoleculeContainerModel, MoleculeProtocol {
|
||||||
public static var identifier: String = "stackItem"
|
public static var identifier: String = "stackItem"
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var spacing: CGFloat?
|
public var spacing: CGFloat?
|
||||||
@ -11,12 +11,8 @@ import UIKit
|
|||||||
@objcMembers open class TableViewCell: UITableViewCell, MVMCoreUIMoleculeViewProtocol, MoleculeListCellProtocol, ModelMoleculeViewProtocol {
|
@objcMembers open class TableViewCell: UITableViewCell, MVMCoreUIMoleculeViewProtocol, MoleculeListCellProtocol, ModelMoleculeViewProtocol {
|
||||||
|
|
||||||
open var molecule: (UIView & MVMCoreUIMoleculeViewProtocol)?
|
open var molecule: (UIView & MVMCoreUIMoleculeViewProtocol)?
|
||||||
open var json: [AnyHashable: Any]?
|
open var listItemModel: ListItemModelProtocol?
|
||||||
open var listItemModel: ListItemModel?
|
|
||||||
public let containerHelper = ContainerHelper()
|
public let containerHelper = ContainerHelper()
|
||||||
|
|
||||||
// In updateView, will set padding to default.
|
|
||||||
open var updateViewHorizontalDefaults = true
|
|
||||||
|
|
||||||
// For the accessory view convenience.
|
// For the accessory view convenience.
|
||||||
private var caretView: CaretView?
|
private var caretView: CaretView?
|
||||||
@ -26,19 +22,10 @@ import UIKit
|
|||||||
// For separation between cells.
|
// For separation between cells.
|
||||||
public var topSeparatorView: Line?
|
public var topSeparatorView: Line?
|
||||||
public var bottomSeparatorView: Line?
|
public var bottomSeparatorView: Line?
|
||||||
public enum SeparatorFrequency: String {
|
|
||||||
case all
|
|
||||||
case allExceptTop
|
|
||||||
case allExceptBottom
|
|
||||||
case between
|
|
||||||
}
|
|
||||||
|
|
||||||
/// For subclasses that want to use a custom accessory view.
|
/// For subclasses that want to use a custom accessory view.
|
||||||
open var customAccessoryView = false
|
open var customAccessoryView = false
|
||||||
|
|
||||||
open var topMarginPadding: CGFloat = 24
|
|
||||||
open var bottomMarginPadding: CGFloat = 24
|
|
||||||
|
|
||||||
private var heroAccessoryCenter: CGPoint?
|
private var heroAccessoryCenter: CGPoint?
|
||||||
|
|
||||||
// MARK: - Styling
|
// MARK: - Styling
|
||||||
@ -62,36 +49,36 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
open func styleStandard() {
|
open func styleStandard() {
|
||||||
topMarginPadding = 24
|
listItemModel?.topMarginPadding = 24
|
||||||
bottomMarginPadding = 24
|
listItemModel?.bottomMarginPadding = 24
|
||||||
topSeparatorView?.setStyle(.none)
|
topSeparatorView?.setStyle(.none)
|
||||||
bottomSeparatorView?.setStyle(.standard)
|
bottomSeparatorView?.setStyle(.standard)
|
||||||
}
|
}
|
||||||
|
|
||||||
open func styleTallDivider() {
|
open func styleTallDivider() {
|
||||||
topMarginPadding = 48
|
listItemModel?.topMarginPadding = 48
|
||||||
bottomMarginPadding = 16
|
listItemModel?.bottomMarginPadding = 16
|
||||||
topSeparatorView?.setStyle(.none)
|
topSeparatorView?.setStyle(.none)
|
||||||
bottomSeparatorView?.setStyle(.thin)
|
bottomSeparatorView?.setStyle(.thin)
|
||||||
}
|
}
|
||||||
|
|
||||||
open func styleShortDivider() {
|
open func styleShortDivider() {
|
||||||
topMarginPadding = 32
|
listItemModel?.topMarginPadding = 32
|
||||||
bottomMarginPadding = 16
|
listItemModel?.bottomMarginPadding = 16
|
||||||
topSeparatorView?.setStyle(.none)
|
topSeparatorView?.setStyle(.none)
|
||||||
bottomSeparatorView?.setStyle(.thin)
|
bottomSeparatorView?.setStyle(.thin)
|
||||||
}
|
}
|
||||||
|
|
||||||
open func styleFooter() {
|
open func styleFooter() {
|
||||||
topMarginPadding = 24
|
listItemModel?.topMarginPadding = 24
|
||||||
bottomMarginPadding = 0
|
listItemModel?.bottomMarginPadding = 0
|
||||||
topSeparatorView?.setStyle(.none)
|
topSeparatorView?.setStyle(.none)
|
||||||
bottomSeparatorView?.setStyle(.none)
|
bottomSeparatorView?.setStyle(.none)
|
||||||
}
|
}
|
||||||
|
|
||||||
open func styleNone() {
|
open func styleNone() {
|
||||||
topMarginPadding = 0
|
listItemModel?.topMarginPadding = 0
|
||||||
bottomMarginPadding = 0
|
listItemModel?.bottomMarginPadding = 0
|
||||||
topSeparatorView?.setStyle(.none)
|
topSeparatorView?.setStyle(.none)
|
||||||
bottomSeparatorView?.setStyle(.none)
|
bottomSeparatorView?.setStyle(.none)
|
||||||
}
|
}
|
||||||
@ -125,7 +112,7 @@ import UIKit
|
|||||||
|
|
||||||
// MARK: - MFViewProtocol
|
// MARK: - MFViewProtocol
|
||||||
public func updateView(_ size: CGFloat) {
|
public func updateView(_ size: CGFloat) {
|
||||||
MFStyler.setMarginsFor(self, size: size, defaultHorizontal: updateViewHorizontalDefaults, top: topMarginPadding, bottom: bottomMarginPadding)
|
containerHelper.updateViewMargins(self, model: listItemModel, size: size)
|
||||||
|
|
||||||
if accessoryView != nil {
|
if accessoryView != nil {
|
||||||
// Smaller left margin if accessory view.
|
// Smaller left margin if accessory view.
|
||||||
@ -155,23 +142,14 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Model, Change to model
|
//TODO: Model, Change to model
|
||||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
guard let model = model as? ListItemModel else {
|
guard let model = model as? ListItemModelProtocol else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
self.listItemModel = model
|
self.listItemModel = model
|
||||||
style(with: model.style)
|
style(with: model.style)
|
||||||
|
|
||||||
if let useHorizontalMargins = model.useHorizontalMargins {
|
|
||||||
updateViewHorizontalDefaults = useHorizontalMargins
|
|
||||||
}
|
|
||||||
|
|
||||||
if (model.useVerticalMargins ?? true) == false {
|
|
||||||
topMarginPadding = 0
|
|
||||||
bottomMarginPadding = 0
|
|
||||||
}
|
|
||||||
|
|
||||||
if let backgroundColor = model.backgroundColor {
|
if let backgroundColor = model.backgroundColor {
|
||||||
self.backgroundColor = backgroundColor.uiColor
|
self.backgroundColor = backgroundColor.uiColor
|
||||||
}
|
}
|
||||||
@ -192,12 +170,11 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
guard let molecule = molecule else { return }
|
guard let molecule = molecule else { return }
|
||||||
containerHelper.set(with: json, for: molecule)
|
containerHelper.set(with: model, for: molecule as? MVMCoreUIViewConstrainingProtocol)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func reset() {
|
public func reset() {
|
||||||
molecule?.reset?()
|
molecule?.reset?()
|
||||||
updateViewHorizontalDefaults = true
|
|
||||||
styleStandard()
|
styleStandard()
|
||||||
backgroundColor = .white
|
backgroundColor = .white
|
||||||
}
|
}
|
||||||
@ -254,23 +231,19 @@ import UIKit
|
|||||||
|
|
||||||
// MARK: - MoleculeListCellProtocol
|
// MARK: - MoleculeListCellProtocol
|
||||||
/// For when the separator between cells shows using json and frequency. Default is type: standard, frequency: allExceptTop.
|
/// For when the separator between cells shows using json and frequency. Default is type: standard, frequency: allExceptTop.
|
||||||
//TODO: Change to model
|
public func setLines(with model: LineModel?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?, indexPath: IndexPath) {
|
||||||
public func setSeparatorWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?, indexPath: IndexPath) {
|
|
||||||
addSeparatorsIfNeeded()
|
addSeparatorsIfNeeded()
|
||||||
if let json = json {
|
if let model = model {
|
||||||
topSeparatorView?.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
topSeparatorView?.setWithModel(model, delegateObject, additionalData)
|
||||||
bottomSeparatorView?.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
bottomSeparatorView?.setWithModel(model, delegateObject, additionalData)
|
||||||
if let separatorFrequencyString = json.optionalStringForKey("frequency"), let separatorFrequency = SeparatorFrequency(rawValue: separatorFrequencyString) {
|
|
||||||
setSeparatorFrequency(separatorFrequency, indexPath: indexPath)
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
topSeparatorView?.setStyle(.standard)
|
topSeparatorView?.setStyle(.standard)
|
||||||
bottomSeparatorView?.setStyle(.standard)
|
bottomSeparatorView?.setStyle(.standard)
|
||||||
setSeparatorFrequency(TableViewCell.SeparatorFrequency.allExceptTop, indexPath: indexPath)
|
|
||||||
}
|
}
|
||||||
|
setSeparatorFrequency(model?.frequency ?? .allExceptTop, indexPath: indexPath)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func didSelectCell(atIndex indexPath: IndexPath, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
public func didSelectCell(at index: IndexPath, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
||||||
//TODO: Use object when handleAction is rewrote to handle action model
|
//TODO: Use object when handleAction is rewrote to handle action model
|
||||||
if let actionMap = self.listItemModel?.action?.toJSON() {
|
if let actionMap = self.listItemModel?.action?.toJSON() {
|
||||||
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject)
|
||||||
@ -304,7 +277,7 @@ import UIKit
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// For when the separator between cells shows.
|
/// For when the separator between cells shows.
|
||||||
public func setSeparatorFrequency(_ separatorFrequency: SeparatorFrequency, indexPath: IndexPath) {
|
public func setSeparatorFrequency(_ separatorFrequency: LineModel.Frequency, indexPath: IndexPath) {
|
||||||
switch separatorFrequency {
|
switch separatorFrequency {
|
||||||
case .all:
|
case .all:
|
||||||
if indexPath.row == 0 {
|
if indexPath.row == 0 {
|
||||||
|
|||||||
54
MVMCoreUI/Molecules/Items/TabsListItemModel.swift
Normal file
54
MVMCoreUI/Molecules/Items/TabsListItemModel.swift
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
//
|
||||||
|
// TabsListItemModel.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Scott Pfeil on 1/13/20.
|
||||||
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import UIKit
|
||||||
|
|
||||||
|
public class TabsListItemModel: ContainerModel, ListItemModelProtocol {
|
||||||
|
public static var identifier: String = "tabsListItem"
|
||||||
|
var tabs: TabsModel
|
||||||
|
var molecules: [[ListItemModelProtocol]]
|
||||||
|
|
||||||
|
public var backgroundColor: Color?
|
||||||
|
public var hideArrow: Bool? = true
|
||||||
|
public var line: LineModel? = LineModel(type: .standard)
|
||||||
|
|
||||||
|
enum TabsListItemCodingKeys: String, CodingKey {
|
||||||
|
case tabs
|
||||||
|
case molecules
|
||||||
|
case backgroundColor
|
||||||
|
case line
|
||||||
|
}
|
||||||
|
|
||||||
|
public init(with tabs: TabsModel, molecules: [[ListItemModelProtocol]]) {
|
||||||
|
self.tabs = tabs
|
||||||
|
self.molecules = molecules
|
||||||
|
super.init()
|
||||||
|
self.topMarginPadding = 8
|
||||||
|
self.bottomMarginPadding = 0
|
||||||
|
}
|
||||||
|
|
||||||
|
required public init(from decoder: Decoder) throws {
|
||||||
|
let typeContainer = try decoder.container(keyedBy: TabsListItemCodingKeys.self)
|
||||||
|
tabs = try typeContainer.decode(TabsModel.self, forKey: .tabs)
|
||||||
|
molecules = try typeContainer.decodeMolecules2D(codingKey: .molecules) as! [[ListItemModelProtocol]]
|
||||||
|
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||||
|
if let lineModel = try typeContainer.decodeIfPresent(LineModel.self, forKey: .line) {
|
||||||
|
line = lineModel
|
||||||
|
}
|
||||||
|
try super.init(from: decoder)
|
||||||
|
}
|
||||||
|
|
||||||
|
public override func encode(to encoder: Encoder) throws {
|
||||||
|
try super.encode(to: encoder)
|
||||||
|
var container = encoder.container(keyedBy: TabsListItemCodingKeys.self)
|
||||||
|
try container.encode(tabs, forKey: .tabs)
|
||||||
|
try container.encodeModels2D(molecules, forKey: .molecules)
|
||||||
|
try container.encode(backgroundColor, forKey: .backgroundColor)
|
||||||
|
try container.encodeIfPresent(line, forKey: .line)
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -9,6 +9,7 @@
|
|||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
@objcMembers public class TabsTableViewCell: TableViewCell {
|
@objcMembers public class TabsTableViewCell: TableViewCell {
|
||||||
|
var tabsListItemModel: TabsListItemModel?
|
||||||
let tabs = TopTabbar(frame: .zero)
|
let tabs = TopTabbar(frame: .zero)
|
||||||
var delegateObject: MVMCoreUIDelegateObject?
|
var delegateObject: MVMCoreUIDelegateObject?
|
||||||
var previousTabIndex = 0
|
var previousTabIndex = 0
|
||||||
@ -20,8 +21,6 @@ import UIKit
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
tabs.paddingBeforeFirstTab = false
|
tabs.paddingBeforeFirstTab = false
|
||||||
topMarginPadding = 8
|
|
||||||
bottomMarginPadding = 0
|
|
||||||
|
|
||||||
tabs.translatesAutoresizingMaskIntoConstraints = false
|
tabs.translatesAutoresizingMaskIntoConstraints = false
|
||||||
tabs.delegate = self
|
tabs.delegate = self
|
||||||
@ -39,7 +38,7 @@ import UIKit
|
|||||||
|
|
||||||
// MARK: - MoleculeDelegateProtocol
|
// MARK: - MoleculeDelegateProtocol
|
||||||
|
|
||||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
self.delegateObject = delegateObject
|
self.delegateObject = delegateObject
|
||||||
tabs.reloadData()
|
tabs.reloadData()
|
||||||
@ -47,17 +46,13 @@ import UIKit
|
|||||||
|
|
||||||
public override func reset() {
|
public override func reset() {
|
||||||
super.reset()
|
super.reset()
|
||||||
topMarginPadding = 8
|
tabs.reset()
|
||||||
bottomMarginPadding = 0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: Models changes
|
|
||||||
|
|
||||||
extension TabsTableViewCell: TopTabbarDelegate {
|
extension TabsTableViewCell: TopTabbarDelegate {
|
||||||
public func shouldSelectItem(at index: Int, topTabbar: TopTabbar) -> Bool {
|
public func shouldSelectItem(at index: Int, topTabbar: TopTabbar) -> Bool {
|
||||||
if let moleculesArrays = json?.arrayForKey(KeyMolecules),
|
if let molecules = tabsListItemModel?.molecules[topTabbar.selectedIndex] {
|
||||||
let molecules = moleculesArrays[topTabbar.selectedIndex] as? [[AnyHashable: Any]] {
|
|
||||||
delegateObject?.moleculeDelegate?.removeMolecules(molecules, sender: self, animation: index < tabs.selectedIndex ? .right : .left)
|
delegateObject?.moleculeDelegate?.removeMolecules(molecules, sender: self, animation: index < tabs.selectedIndex ? .right : .left)
|
||||||
}
|
}
|
||||||
previousTabIndex = tabs.selectedIndex
|
previousTabIndex = tabs.selectedIndex
|
||||||
@ -65,8 +60,7 @@ extension TabsTableViewCell: TopTabbarDelegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public func topTabbar(_ topTabbar: TopTabbar, didSelectItemAt index: Int) {
|
public func topTabbar(_ topTabbar: TopTabbar, didSelectItemAt index: Int) {
|
||||||
if let moleculesArrays = json?.arrayForKey(KeyMolecules),
|
if let molecules = tabsListItemModel?.molecules[index] {
|
||||||
let molecules = moleculesArrays[index] as? [[AnyHashable: Any]] {
|
|
||||||
delegateObject?.moleculeDelegate?.addMolecules(molecules, sender: self, animation: index < previousTabIndex ? .left : .right)
|
delegateObject?.moleculeDelegate?.addMolecules(molecules, sender: self, animation: index < previousTabIndex ? .left : .right)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -74,11 +68,11 @@ extension TabsTableViewCell: TopTabbarDelegate {
|
|||||||
|
|
||||||
extension TabsTableViewCell: TopTabbarDataSource {
|
extension TabsTableViewCell: TopTabbarDataSource {
|
||||||
public func number(ofTopTabbarItems topTabbar: TopTabbar) -> Int {
|
public func number(ofTopTabbarItems topTabbar: TopTabbar) -> Int {
|
||||||
return json?.optionalDictionaryForKey("tabs")?.optionalArrayForKey("tabs")?.count ?? 0
|
return tabsListItemModel?.tabs.tabs.count ?? 0
|
||||||
}
|
}
|
||||||
|
|
||||||
public func topTabbar(_ topTabbar: TopTabbar, titleForItemAt index: Int) -> String? {
|
public func topTabbar(_ topTabbar: TopTabbar, titleForItemAt index: Int) -> String? {
|
||||||
guard let tabs = json?.optionalDictionaryForKey("tabs")?.arrayForKey("tabs"), let label = tabs[index] as? [AnyHashable: Any], let title = label.optionalStringForKey(KeyText) else {
|
guard let title = tabsListItemModel?.tabs.tabs[index].text else {
|
||||||
return "Select"
|
return "Select"
|
||||||
}
|
}
|
||||||
return title
|
return title
|
||||||
|
|||||||
@ -37,7 +37,7 @@ import UIKit
|
|||||||
|
|
||||||
//MARK: - MVMCoreMoleculeViewProtocol
|
//MARK: - MVMCoreMoleculeViewProtocol
|
||||||
|
|
||||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
// guard let headlineModel = model as? headlinebodyswitch
|
// guard let headlineModel = model as? headlinebodyswitch
|
||||||
// headlineBody.setWithModel(mode, <#T##delegateObject: MVMCoreUIDelegateObject?##MVMCoreUIDelegateObject?#>, <#T##additionalData: [String : AnyHashable]?##[String : AnyHashable]?#>)
|
// headlineBody.setWithModel(mode, <#T##delegateObject: MVMCoreUIDelegateObject?##MVMCoreUIDelegateObject?#>, <#T##additionalData: [String : AnyHashable]?##[String : AnyHashable]?#>)
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public protocol ModelMoleculeViewProtocol {
|
public protocol ModelMoleculeViewProtocol {
|
||||||
func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String: AnyHashable]?)
|
func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?)
|
||||||
func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String?
|
func nameForReuse(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?) -> String?
|
||||||
static func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat?
|
static func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat?
|
||||||
static func requiredModules(_ molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]?
|
static func requiredModules(_ molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?, error: AutoreleasingUnsafeMutablePointer<MVMCoreErrorObject?>?) -> [String]?
|
||||||
|
|||||||
@ -19,7 +19,7 @@ open class ModuleMolecule: Container {
|
|||||||
super.setupView()
|
super.setupView()
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String: AnyHashable]?) {
|
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
|
|
||||||
guard let moduleMoleculeModel = model as? ModuleMoleculeModel,
|
guard let moduleMoleculeModel = model as? ModuleMoleculeModel,
|
||||||
|
|||||||
@ -25,7 +25,7 @@ open class MoleculeContainer: Container {
|
|||||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
if let casteModel = model as? MoleculeContainerModel {
|
if let casteModel = model as? MoleculeContainerModel {
|
||||||
if view != nil {
|
if view != nil {
|
||||||
(view as? ModelMoleculeViewProtocol)?.setWithModel(casteModel.molecule, delegateObject, additionalData)
|
(view as? ModelMoleculeViewProtocol)?.setWithModel(casteModel.molecule, delegateObject, additionalData)
|
||||||
|
|||||||
@ -28,7 +28,7 @@ import UIKit
|
|||||||
constraint.isActive = true
|
constraint.isActive = true
|
||||||
}
|
}
|
||||||
|
|
||||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
#warning("This below call should be repaced with super.setWithModel once we get rid of ViewConstrainingView.")
|
#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.
|
//TODO: This below call should be repaced with super.setWithModel once we get rid of ViewConstrainingView.
|
||||||
setUpDefaultWithModel(model, delegateObject, additionalData)
|
setUpDefaultWithModel(model, delegateObject, additionalData)
|
||||||
|
|||||||
@ -42,7 +42,7 @@ public class StandardHeaderView: MoleculeContainer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
|
|
||||||
guard let headerModel = model as? HeaderModel else {
|
guard let headerModel = model as? HeaderModel else {
|
||||||
|
|||||||
@ -34,10 +34,10 @@ struct EyebrowHeadlineBodyLinkModel: MoleculeProtocol {
|
|||||||
guard stack.superview == nil else {
|
guard stack.superview == nil else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let eyebrowStackItem = MoleculeStackItemModel(with: casteModel!.eyeBrow!)
|
let eyebrowStackItem = StackItemModel(with: casteModel!.eyeBrow!)
|
||||||
let headlineStackItem = MoleculeStackItemModel(with: casteModel!.headline!)
|
let headlineStackItem = StackItemModel(with: casteModel!.headline!)
|
||||||
let bodyStackItem = MoleculeStackItemModel(with: casteModel!.body!)
|
let bodyStackItem = StackItemModel(with: casteModel!.body!)
|
||||||
let linkStackItem = MoleculeStackItemModel(with: casteModel!.link!)
|
let linkStackItem = StackItemModel(with: casteModel!.link!)
|
||||||
|
|
||||||
// To visually take into account the extra padding in the intrinsic content of a button.
|
// To visually take into account the extra padding in the intrinsic content of a button.
|
||||||
linkStackItem.spacing = -6
|
linkStackItem.spacing = -6
|
||||||
|
|||||||
@ -119,7 +119,7 @@ open class HeadlineBody: View {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
|
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
guard let headlineBodyModel = model as? HeadlineBodyModel else {
|
guard let headlineBodyModel = model as? HeadlineBodyModel else {
|
||||||
|
|||||||
@ -81,7 +81,7 @@ open class Carousel: ViewConstrainingView, ModelMoleculeViewProtocol {
|
|||||||
|
|
||||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||||
//TODO: Model, Change to model
|
//TODO: Model, Change to model
|
||||||
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
guard let caroselModel = model as? CarouselModel else {
|
guard let caroselModel = model as? CarouselModel else {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,11 +11,11 @@ import Foundation
|
|||||||
@objcMembers public class MoleculeStackModel: ContainerModel, MoleculeProtocol {
|
@objcMembers public class MoleculeStackModel: ContainerModel, MoleculeProtocol {
|
||||||
public static var identifier: String = "moleculeStack"
|
public static var identifier: String = "moleculeStack"
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var molecules: [MoleculeStackItemModel]
|
public var molecules: [StackItemModel]
|
||||||
public var axis: NSLayoutConstraint.Axis = .vertical
|
public var axis: NSLayoutConstraint.Axis = .vertical
|
||||||
public var spacing: CGFloat = 16.0
|
public var spacing: CGFloat = 16.0
|
||||||
|
|
||||||
public init(molecules: [MoleculeStackItemModel]) {
|
public init(molecules: [StackItemModel]) {
|
||||||
self.molecules = molecules
|
self.molecules = molecules
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
@ -29,7 +29,7 @@ import Foundation
|
|||||||
|
|
||||||
required public init(from decoder: Decoder) throws {
|
required public init(from decoder: Decoder) throws {
|
||||||
let typeContainer = try decoder.container(keyedBy: StackCodingKeys.self)
|
let typeContainer = try decoder.container(keyedBy: StackCodingKeys.self)
|
||||||
molecules = try typeContainer.decodeMolecules(codingKey: .molecules) as! [MoleculeStackItemModel]
|
molecules = try typeContainer.decodeMolecules(codingKey: .molecules) as! [StackItemModel]
|
||||||
if let axisString = try typeContainer.decodeIfPresent(String.self, forKey: .axis), let optionalAxis = NSLayoutConstraint.Axis(rawValue: axisString) {
|
if let axisString = try typeContainer.decodeIfPresent(String.self, forKey: .axis), let optionalAxis = NSLayoutConstraint.Axis(rawValue: axisString) {
|
||||||
axis = optionalAxis
|
axis = optionalAxis
|
||||||
}
|
}
|
||||||
@ -95,7 +95,7 @@ open class MoleculeStackView: Container {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [String : AnyHashable]?) {
|
public override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable : Any]?) {
|
||||||
let previousModel = stackModel
|
let previousModel = stackModel
|
||||||
super.setWithModel(model, delegateObject, additionalData)
|
super.setWithModel(model, delegateObject, additionalData)
|
||||||
removeAllItemViews()
|
removeAllItemViews()
|
||||||
@ -139,9 +139,9 @@ open class MoleculeStackView: Container {
|
|||||||
let data = try! JSONSerialization.data(withJSONObject: json!)
|
let data = try! JSONSerialization.data(withJSONObject: json!)
|
||||||
let decoder = JSONDecoder()
|
let decoder = JSONDecoder()
|
||||||
let model = try! decoder.decode(MoleculeStackModel.self, from: data)
|
let model = try! decoder.decode(MoleculeStackModel.self, from: data)
|
||||||
setWithModel(model, delegateObject, additionalData as? [String : AnyHashable])
|
setWithModel(model, delegateObject, additionalData)
|
||||||
} else {
|
} else {
|
||||||
setWithModel(model, delegateObject, additionalData as? [String : AnyHashable])
|
setWithModel(model, delegateObject, additionalData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ open class MoleculeStackView: Container {
|
|||||||
func addView(_ view: View, lastItem: Bool) {
|
func addView(_ view: View, lastItem: Bool) {
|
||||||
guard let model = view.model else { return }
|
guard let model = view.model else { return }
|
||||||
let stackItem = StackItem(andContain: view)
|
let stackItem = StackItem(andContain: view)
|
||||||
stackItem.model = MoleculeStackItemModel(with: model)
|
stackItem.model = StackItemModel(with: model)
|
||||||
addStackItem(stackItem, lastItem: lastItem)
|
addStackItem(stackItem, lastItem: lastItem)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ public protocol MoleculeDelegateProtocol {
|
|||||||
|
|
||||||
/// returns a module for the corresponding module name.
|
/// returns a module for the corresponding module name.
|
||||||
func getModuleWithName(_ name: String?) -> [AnyHashable : Any]?
|
func getModuleWithName(_ name: String?) -> [AnyHashable : Any]?
|
||||||
func getModuleWithName(_ moleculeName: String) -> Model?
|
func getModuleWithName(_ moleculeName: String) -> MoleculeProtocol?
|
||||||
|
|
||||||
/// Notifies the delegate that the molecule layout update. Should be called when the layout may change due to an async method.
|
/// 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
|
func moleculeLayoutUpdated(_ molecule: UIView & MVMCoreUIMoleculeViewProtocol) //optional
|
||||||
|
|||||||
@ -14,7 +14,7 @@ import Foundation
|
|||||||
ModelRegistry.register(HeaderModel.self)
|
ModelRegistry.register(HeaderModel.self)
|
||||||
ModelRegistry.register(HeadlineBodyModel.self)
|
ModelRegistry.register(HeadlineBodyModel.self)
|
||||||
ModelRegistry.register(MoleculeStackModel.self)
|
ModelRegistry.register(MoleculeStackModel.self)
|
||||||
ModelRegistry.register(MoleculeStackItemModel.self)
|
ModelRegistry.register(StackItemModel.self)
|
||||||
ModelRegistry.register(ListItemModel.self)
|
ModelRegistry.register(ListItemModel.self)
|
||||||
ModelRegistry.register(TextFieldModel.self)
|
ModelRegistry.register(TextFieldModel.self)
|
||||||
ModelRegistry.register(LineModel.self)
|
ModelRegistry.register(LineModel.self)
|
||||||
|
|||||||
@ -1,22 +0,0 @@
|
|||||||
//
|
|
||||||
// MoleculeListCellProtocol.h
|
|
||||||
// MVMCoreUI
|
|
||||||
//
|
|
||||||
// Created by Scott Pfeil on 5/22/19.
|
|
||||||
// Copyright © 2019 Verizon Wireless. All rights reserved.
|
|
||||||
//
|
|
||||||
#import <UIKit/UIKit.h>
|
|
||||||
@class MVMCoreUIDelegateObject;
|
|
||||||
|
|
||||||
@protocol MoleculeListCellProtocol <NSObject>
|
|
||||||
@optional
|
|
||||||
|
|
||||||
/// Can set the separator according to what the moleculeList commands.
|
|
||||||
- (void)setSeparatorWithJSON:(nullable NSDictionary *)json delegateObject:(nullable MVMCoreUIDelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData indexPath:(nonnull NSIndexPath *)indexPath;
|
|
||||||
|
|
||||||
/// Handle action
|
|
||||||
- (void)didSelectCellAtIndex:(nonnull NSIndexPath *)indexPath delegateObject:(nullable MVMCoreUIDelegateObject *)delegateObject additionalData:(nullable NSDictionary *)additionalData;
|
|
||||||
|
|
||||||
- (void)willDisplay;
|
|
||||||
|
|
||||||
@end
|
|
||||||
32
MVMCoreUI/Templates/MoleculeListCellProtocol.swift
Normal file
32
MVMCoreUI/Templates/MoleculeListCellProtocol.swift
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
//
|
||||||
|
// MoleculeListCellProtocol.swift
|
||||||
|
// MVMCoreUI
|
||||||
|
//
|
||||||
|
// Created by Scott Pfeil on 1/10/20.
|
||||||
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
|
//
|
||||||
|
|
||||||
|
import Foundation
|
||||||
|
|
||||||
|
public protocol MoleculeListCellProtocol {
|
||||||
|
/// Can set the separator according to what the moleculeList commands.
|
||||||
|
func setLines(with model: LineModel?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?, indexPath: IndexPath)
|
||||||
|
|
||||||
|
/// Handle action when cell is pressed
|
||||||
|
func didSelectCell(at index: IndexPath, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?)
|
||||||
|
|
||||||
|
/// Called by the list when the cell will display.
|
||||||
|
func willDisplay()
|
||||||
|
}
|
||||||
|
|
||||||
|
// Default implementation does nothing
|
||||||
|
extension MoleculeListCellProtocol {
|
||||||
|
public func setLines(with model: LineModel?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?, indexPath: IndexPath) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public func didSelectCell(at index: IndexPath, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
|
}
|
||||||
|
|
||||||
|
func willDisplay() {
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -85,7 +85,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
let moleculeCell = cell as? MVMCoreUIMoleculeViewProtocol
|
let moleculeCell = cell as? MVMCoreUIMoleculeViewProtocol
|
||||||
moleculeCell?.reset?()
|
moleculeCell?.reset?()
|
||||||
if let protocolCell = cell as? MoleculeListCellProtocol {
|
if let protocolCell = cell as? MoleculeListCellProtocol {
|
||||||
protocolCell.setSeparatorWithJSON?(loadObject?.pageJSON?.optionalDictionaryForKey("separator"), delegateObject: delegate, additionalData: nil, indexPath: indexPath)
|
protocolCell.setLines(with: templateModel?.line, delegateObject: delegate, additionalData: nil, indexPath: indexPath)
|
||||||
}
|
}
|
||||||
(moleculeCell as? ModelMoleculeViewProtocol)?.setWithModel(moleculeInfo.molecule, delegate, nil)
|
(moleculeCell as? ModelMoleculeViewProtocol)?.setWithModel(moleculeInfo.molecule, delegate, nil)
|
||||||
moleculeCell?.updateView(tableView.bounds.width)
|
moleculeCell?.updateView(tableView.bounds.width)
|
||||||
@ -95,13 +95,13 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
open override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
|
open override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
|
||||||
|
|
||||||
if let protocolCell = cell as? MoleculeListCellProtocol {
|
if let protocolCell = cell as? MoleculeListCellProtocol {
|
||||||
protocolCell.willDisplay?()
|
protocolCell.willDisplay()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
open override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
|
||||||
if let cell = tableView.cellForRow(at: indexPath) as? MoleculeListCellProtocol {
|
if let cell = tableView.cellForRow(at: indexPath) as? MoleculeListCellProtocol {
|
||||||
cell.didSelectCell?(atIndex: indexPath, delegateObject: delegateObject() as? MVMCoreUIDelegateObject, additionalData: nil)
|
cell.didSelectCell(at: indexPath, delegateObject: delegateObject() as? MVMCoreUIDelegateObject, additionalData: nil)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +167,7 @@ open class MoleculeListTemplate: ThreeLayerTableViewController, TemplateProtocol
|
|||||||
func getMoleculeInfo(with listItem: ListItemModelProtocol?) -> (identifier: String, class: AnyClass, molecule: ListItemModelProtocol)? {
|
func getMoleculeInfo(with listItem: ListItemModelProtocol?) -> (identifier: String, class: AnyClass, molecule: ListItemModelProtocol)? {
|
||||||
guard let listItem = listItem,
|
guard let listItem = listItem,
|
||||||
let moleculeClass = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(listItem),
|
let moleculeClass = MVMCoreUIMoleculeMappingObject.shared()?.getMoleculeClass(listItem),
|
||||||
let moleculeName = (moleculeClass as? ModelMoleculeViewProtocol)?.nameForReuse(listItem, delegateObject() as? MVMCoreUIDelegateObject) ?? listItem.molecule.moleculeName else {
|
let moleculeName = (moleculeClass as? ModelMoleculeViewProtocol)?.nameForReuse(listItem, delegateObject() as? MVMCoreUIDelegateObject) else {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return (moleculeName, moleculeClass, listItem)
|
return (moleculeName, moleculeClass, listItem)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user