Revert
This commit is contained in:
parent
6853274a67
commit
558eb9bfd0
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import UIKit
|
import UIKit
|
||||||
|
import MVMCore
|
||||||
/**
|
/**
|
||||||
This class is intended to be subclassed.
|
This class is intended to be subclassed.
|
||||||
See ItemDropdownEntryField and DateDropdownEntryField.
|
See ItemDropdownEntryField and DateDropdownEntryField.
|
||||||
@ -100,6 +100,6 @@ import UIKit
|
|||||||
else { return }
|
else { return }
|
||||||
|
|
||||||
let additionalDataWithSource = additionalData.dictionaryAdding(key: KeySourceModel, value: baseDropdownEntryFieldModel)
|
let additionalDataWithSource = additionalData.dictionaryAdding(key: KeySourceModel, value: baseDropdownEntryFieldModel)
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionModel, additionalData: additionalDataWithSource, delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionModel, additionalData: additionalDataWithSource, delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -391,7 +391,7 @@ import MVMCore
|
|||||||
private func performCheckboxAction(with actionModel: ActionModelProtocol, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
private func performCheckboxAction(with actionModel: ActionModelProtocol, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
var additionalDataToUpdate = additionalData ?? [:]
|
var additionalDataToUpdate = additionalData ?? [:]
|
||||||
additionalDataToUpdate[KeySourceModel] = checkboxModel
|
additionalDataToUpdate[KeySourceModel] = checkboxModel
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionModel, additionalData: additionalDataToUpdate, delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionModel, additionalData: additionalDataToUpdate, delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
|
|
||||||
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
public override func set(with model: MoleculeModelProtocol, _ delegateObject: MVMCoreUIDelegateObject?, _ additionalData: [AnyHashable: Any]?) {
|
||||||
|
|||||||
@ -396,11 +396,11 @@ public typealias ActionBlockConfirmation = () -> (Bool)
|
|||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
if self.isOn {
|
if self.isOn {
|
||||||
if let action = model.action {
|
if let action = model.action {
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: additionalDataWithSource, delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: additionalDataWithSource, delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if let action = model.alternateAction ?? model.action {
|
if let action = model.alternateAction ?? model.action {
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: additionalDataWithSource, delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: additionalDataWithSource, delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -387,7 +387,7 @@ public typealias ActionBlock = () -> ()
|
|||||||
}
|
}
|
||||||
case let actionAtt as LabelAttributeActionModel:
|
case let actionAtt as LabelAttributeActionModel:
|
||||||
addTappableLinkAttribute(range: NSRange(location: range.location, length: range.length)) {
|
addTappableLinkAttribute(range: NSRange(location: range.location, length: range.length)) {
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionAtt.action, additionalData: additionalData, delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionAtt.action, additionalData: additionalData, delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
addActionAttributes(range: range, string: attributedString)
|
addActionAttributes(range: range, string: attributedString)
|
||||||
|
|
||||||
|
|||||||
@ -256,7 +256,7 @@ extension Tabs: UICollectionViewDelegateFlowLayout {
|
|||||||
if let delegate = delegate {
|
if let delegate = delegate {
|
||||||
delegate.didSelectItem(indexPath, tabs: self)
|
delegate.didSelectItem(indexPath, tabs: self)
|
||||||
} else if let action = tabsModel.tabs[selectedIndex].action {
|
} else if let action = tabsModel.tabs[selectedIndex].action {
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: tabsModel], delegateObject:delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: tabsModel], delegateObject:delegateObject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -46,9 +46,9 @@
|
|||||||
model.selected = accordionButton.isSelected
|
model.selected = accordionButton.isSelected
|
||||||
|
|
||||||
if accordionButton.isSelected {
|
if accordionButton.isSelected {
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: AddMoleculesActionModel(.automatic), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: AddMoleculesActionModel(.automatic), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
||||||
} else {
|
} else {
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: RemoveMoleculesActionModel(.automatic), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: RemoveMoleculesActionModel(.automatic), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (accordionListItemModel?.hideLineWhenExpanded ?? false) && (self.bottomSeparatorView?.shouldBeVisible() ?? false) {
|
if (accordionListItemModel?.hideLineWhenExpanded ?? false) && (self.bottomSeparatorView?.shouldBeVisible() ?? false) {
|
||||||
@ -56,7 +56,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let actionModel = accordionButton.isSelected ? accordionListItemModel?.expandAction : accordionListItemModel?.collapseAction {
|
if let actionModel = accordionButton.isSelected ? accordionListItemModel?.expandAction : accordionListItemModel?.collapseAction {
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionModel, additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionModel, additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -37,7 +37,7 @@ import UIKit
|
|||||||
actions.append(AddMoleculesActionModel(.fade))
|
actions.append(AddMoleculesActionModel(.fade))
|
||||||
let actionsModel = ActionActionsModel(actions: actions)
|
let actionsModel = ActionActionsModel(actions: actions)
|
||||||
actionsModel.concurrent = false
|
actionsModel.concurrent = false
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionsModel, additionalData: additionData, delegateObject: self.delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: actionsModel, additionalData: additionData, delegateObject: self.delegateObject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -57,7 +57,7 @@ extension TabsTableViewCell: TabsDelegate {
|
|||||||
public func shouldSelectItem(_ indexPath: IndexPath, tabs: Tabs) -> Bool {
|
public func shouldSelectItem(_ indexPath: IndexPath, tabs: Tabs) -> Bool {
|
||||||
guard indexPath.row != tabs.selectedIndex else { return false }
|
guard indexPath.row != tabs.selectedIndex else { return false }
|
||||||
if let model = tabsListItemModel {
|
if let model = tabsListItemModel {
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: RemoveMoleculesActionModel(indexPath.row < tabs.selectedIndex ? .right : .left), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: RemoveMoleculesActionModel(indexPath.row < tabs.selectedIndex ? .right : .left), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
previousTabIndex = tabs.selectedIndex
|
previousTabIndex = tabs.selectedIndex
|
||||||
return true
|
return true
|
||||||
@ -68,9 +68,9 @@ extension TabsTableViewCell: TabsDelegate {
|
|||||||
guard let model = tabsListItemModel,
|
guard let model = tabsListItemModel,
|
||||||
index < model.molecules.count else { return }
|
index < model.molecules.count else { return }
|
||||||
if let action = model.tabs.tabs[index].action {
|
if let action = model.tabs.tabs[index].action {
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: model.tabs], delegateObject:delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: [KeySourceModel: model.tabs], delegateObject:delegateObject)
|
||||||
}
|
}
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: AddMoleculesActionModel(index < previousTabIndex ? .left : .right), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: AddMoleculesActionModel(index < previousTabIndex ? .left : .right), additionalData: [KeySourceModel: model], delegateObject: delegateObject)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import MVMCore
|
|||||||
@objcMembers open class NotificationXButton: Button {
|
@objcMembers open class NotificationXButton: Button {
|
||||||
|
|
||||||
open func closeTopAlert() {
|
open func closeTopAlert() {
|
||||||
_ = MVMCoreUIActionHandler.shared()?.asyncHandleAction(with: ActionDismissNotificationModel(), additionalData: nil, delegateObject: nil)
|
MVMCoreUIActionHandler.shared()?.asyncHandleAction(with: ActionDismissNotificationModel(), additionalData: nil, delegateObject: nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
open override func setupView() {
|
open override func setupView() {
|
||||||
|
|||||||
@ -32,7 +32,7 @@ open class ModalMoleculeListTemplate: MoleculeListTemplate {
|
|||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
let closeAction = (self.templateModel as? ModalListPageTemplateModel)?.closeAction ??
|
let closeAction = (self.templateModel as? ModalListPageTemplateModel)?.closeAction ??
|
||||||
ActionBackModel()
|
ActionBackModel()
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: closeAction, additionalData: nil, delegateObject: self.delegateObjectIVar)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: closeAction, additionalData: nil, delegateObject: self.delegateObjectIVar)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ open class ModalMoleculeStackTemplate: MoleculeStackTemplate {
|
|||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
let closeAction = (self.templateModel as? ModalStackPageTemplateModel)?.closeAction ??
|
let closeAction = (self.templateModel as? ModalStackPageTemplateModel)?.closeAction ??
|
||||||
ActionBackModel()
|
ActionBackModel()
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: closeAction, additionalData: nil, delegateObject: self.delegateObjectIVar)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: closeAction, additionalData: nil, delegateObject: self.delegateObjectIVar)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -27,7 +27,7 @@ open class ModalSectionListTemplate: SectionListTemplate {
|
|||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
let closeAction = (self.templateModel as? ModalSectionListTemplateModel)?.closeAction ??
|
let closeAction = (self.templateModel as? ModalSectionListTemplateModel)?.closeAction ??
|
||||||
ActionBackModel()
|
ActionBackModel()
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: closeAction, additionalData: nil, delegateObject: self.delegateObjectIVar)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: closeAction, additionalData: nil, delegateObject: self.delegateObjectIVar)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -277,7 +277,7 @@ open class SubNavManagerController: ViewController, MVMCoreViewManagerProtocol,
|
|||||||
} else if let tabsModel = tabs.tabsModel,
|
} else if let tabsModel = tabs.tabsModel,
|
||||||
let action = tabsModel.tabs[indexPath.row].action {
|
let action = tabsModel.tabs[indexPath.row].action {
|
||||||
// Perform the tab action
|
// Perform the tab action
|
||||||
_ = MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: getAdditionalDataForNewTabLoad(indexPath: indexPath), delegateObject: delegateObjectIVar)
|
MVMCoreActionHandler.shared()?.asyncHandleAction(with: action, additionalData: getAdditionalDataForNewTabLoad(indexPath: indexPath), delegateObject: delegateObjectIVar)
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user