Change keys
This commit is contained in:
parent
788145332f
commit
57753f6697
@ -454,7 +454,7 @@ import MVMCore
|
||||
isEnabled(enabled)
|
||||
}
|
||||
|
||||
if let actionMap = dictionary.optionalDictionaryForKey("actionMap") {
|
||||
if let actionMap = dictionary.optionalDictionaryForKey("action") {
|
||||
actionBlock = { MVMCoreActionHandler.shared()?.handleAction(with: actionMap, additionalData: additionalData, delegateObject: delegateObject) }
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ const CGFloat SwitchShakeIntensity = 2;
|
||||
|
||||
[self setState:[json boolForKey:@"state"] animated:false];
|
||||
|
||||
NSDictionary *actionMap = [json dict:@"actionMap"];
|
||||
NSDictionary *actionMap = [json dict:@"action"];
|
||||
if (actionMap) {
|
||||
[self addTarget:self action:@selector(addCustomAction) forControlEvents:UIControlEventTouchUpInside];
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ import Foundation
|
||||
|
||||
|
||||
@objcMembers public class StackPageTemplateModel: TemplateModelProtocol {
|
||||
public static var identifier: String = "moleculeStack"
|
||||
public static var identifier: String = "stack"
|
||||
|
||||
public var pageType: String
|
||||
|
||||
|
||||
@ -39,8 +39,6 @@ import UIKit
|
||||
|
||||
open override func setWithModel(_ model: MoleculeProtocol?, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithModel(model, delegateObject, additionalData)
|
||||
// guard let headlineModel = model as? headlinebodyswitch
|
||||
// headlineBody.setWithModel(mode, <#T##delegateObject: MVMCoreUIDelegateObject?##MVMCoreUIDelegateObject?#>, <#T##additionalData: [String : AnyHashable]?##[String : AnyHashable]?#>)
|
||||
}
|
||||
|
||||
public static func estimatedHeight(forRow molecule: MoleculeProtocol?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat? {
|
||||
@ -52,7 +50,7 @@ import UIKit
|
||||
open override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||
headlineBody.setWithJSON(json?.optionalDictionaryForKey("headlineBody"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
mvmSwitch.setWithJSON(json?.optionalDictionaryForKey("switch"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
mvmSwitch.setWithJSON(json?.optionalDictionaryForKey("toggle"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
}
|
||||
|
||||
open class func estimatedHeight(forRow json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||
|
||||
@ -37,8 +37,8 @@ import UIKit
|
||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||
public override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||
headlineBodyTextButton.setWithJSON(json?.optionalDictionaryForKey("headlineBodyTextButton"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
mvmSwitch.setWithJSON(json?.optionalDictionaryForKey("switch"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
headlineBodyTextButton.setWithJSON(json?.optionalDictionaryForKey("headlineBodyLink"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
mvmSwitch.setWithJSON(json?.optionalDictionaryForKey("toggle"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(forRow json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||
|
||||
@ -38,7 +38,7 @@ import UIKit
|
||||
public override func setWithJSON(_ json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable : Any]?) {
|
||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||
label.setWithJSON(json?.optionalDictionaryForKey("label"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
mvmSwitch.setWithJSON(json?.optionalDictionaryForKey("switch"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
mvmSwitch.setWithJSON(json?.optionalDictionaryForKey("toggle"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
}
|
||||
|
||||
public override class func estimatedHeight(forRow json: [AnyHashable : Any]?, delegateObject: MVMCoreUIDelegateObject?) -> CGFloat {
|
||||
|
||||
@ -37,7 +37,7 @@ public class StandardHeaderView: MoleculeContainer {
|
||||
// MARK: - MVMCoreUIMoleculeViewProtocol
|
||||
open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||
if let separatorJSON = json?.optionalDictionaryForKey("separator") {
|
||||
if let separatorJSON = json?.optionalDictionaryForKey("line") {
|
||||
line?.setWithJSON(separatorJSON, delegateObject: delegateObject, additionalData: additionalData)
|
||||
}
|
||||
}
|
||||
|
||||
@ -66,7 +66,7 @@ import UIKit
|
||||
open override func setWithJSON(_ json: [AnyHashable: Any]?, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||
super.setWithJSON(json, delegateObject: delegateObject, additionalData: additionalData)
|
||||
headlineBody.setWithJSON(json?.optionalDictionaryForKey("headlineBody"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
textButton.setWithJSON(json?.optionalDictionaryForKey("textButton"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
textButton.setWithJSON(json?.optionalDictionaryForKey("link"), delegateObject: delegateObject, additionalData: additionalData)
|
||||
}
|
||||
|
||||
open override func reset() {
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
import Foundation
|
||||
|
||||
@objcMembers public class MoleculeStackModel: ContainerModel, MoleculeProtocol {
|
||||
public static var identifier: String = "moleculeStack"
|
||||
public static var identifier: String = "stack"
|
||||
public var backgroundColor: Color?
|
||||
public var molecules: [StackItemModel]
|
||||
public var axis: NSLayoutConstraint.Axis = .vertical
|
||||
|
||||
@ -29,9 +29,9 @@
|
||||
@"label": Label.class,
|
||||
@"line": Line.class,
|
||||
@"button": PrimaryButton.class,
|
||||
@"textButton": MFTextButton.class,
|
||||
@"link": MFTextButton.class,
|
||||
@"header": StandardHeaderView.class,
|
||||
@"moleculeStack": MoleculeStackView.class,
|
||||
@"stack": MoleculeStackView.class,
|
||||
@"twoButtonView": TwoButtonView.class,
|
||||
@"footer": StandardFooterView.class,
|
||||
@"caretView": CaretView.class,
|
||||
@ -40,7 +40,7 @@
|
||||
@"dropDown": DropDown.class,
|
||||
@"digitTextField": MFDigitTextField.class,
|
||||
@"checkbox": Checkbox.class,
|
||||
@"checkboxWithLabel": CheckboxWithLabelView.class,
|
||||
@"checkboxLabel": CheckboxWithLabelView.class,
|
||||
@"cornerLabels" : CornerLabels.class,
|
||||
@"progressbar": ProgressBar.class,
|
||||
@"circleProgress": GraphView.class,
|
||||
@ -49,7 +49,7 @@
|
||||
@"radioButtonLabel": RadioButtonLabel.class,
|
||||
@"listItem": MoleculeTableViewCell.class,
|
||||
@"accordionListItem": AccordionMoleculeTableViewCell.class,
|
||||
@"switch": MVMCoreUISwitch.class,
|
||||
@"toggle": MVMCoreUISwitch.class,
|
||||
@"leftRightLabelView": LeftRightLabelView.class,
|
||||
@"actionDetailWithImage": ActionDetailWithImage.class,
|
||||
@"image": MFLoadImageView.class,
|
||||
@ -60,10 +60,10 @@
|
||||
@"barsPager": MVMCoreUIPageControl.class,
|
||||
@"scroller": Scroller.class,
|
||||
@"imageHeadlineBody": ImageHeadlineBody.class,
|
||||
@"labelSwitch": LabelSwitch.class,
|
||||
@"headlineBodySwitch": HeadlineBodySwitch.class,
|
||||
@"headlineBodyTextButton": HeadlineBodyTextButton.class,
|
||||
@"headlineBodyTextButtonSwitch": HeadlineBodyTextButtonSwitch.class,
|
||||
@"labelToggle": LabelSwitch.class,
|
||||
@"headlineBodyToggle": HeadlineBodySwitch.class,
|
||||
@"headlineBodyLink": HeadlineBodyTextButton.class,
|
||||
@"headlineBodyLinkToggle": HeadlineBodyTextButtonSwitch.class,
|
||||
@"tabsListItem": TabsTableViewCell.class,
|
||||
@"dropDownListItem": DropDownFilterTableViewCell.class,
|
||||
@"headlineBodyButton": HeadlineBodyButton.class,
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
static NSMutableDictionary *viewControllerMapping;
|
||||
dispatch_once(&onceToken, ^{
|
||||
viewControllerMapping = [@{
|
||||
@"moleculeStack" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeStackTemplate class]],
|
||||
@"stack" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeStackTemplate class]],
|
||||
@"centerMoleculeStack" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeStackCenteredTemplate class]],
|
||||
@"moleculeList" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeListTemplate class]],
|
||||
@"list" : [[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[MoleculeListTemplate class]],
|
||||
@"threeLayer" :
|
||||
[[MVMCoreViewControllerProgrammaticMappingObject alloc] initWithClass:[ThreeLayerTemplate class]]
|
||||
} mutableCopy];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user