name change
This commit is contained in:
parent
03a907a39b
commit
74b09fa51d
@ -22,13 +22,13 @@ public class ButtonModel: MoleculeModelProtocol {
|
|||||||
public static var identifier: String = "button"
|
public static var identifier: String = "button"
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var title: String
|
public var title: String
|
||||||
public var action: ActionProtocol
|
public var action: ActionModelProtocol
|
||||||
public var style: ButtonStyle?
|
public var style: ButtonStyle?
|
||||||
public var size: ButtonSize? = .standard
|
public var size: ButtonSize? = .standard
|
||||||
public var required: Bool?
|
public var required: Bool?
|
||||||
public var requiredGroups: [String]?
|
public var requiredGroups: [String]?
|
||||||
|
|
||||||
init(with title: String, action: ActionProtocol) {
|
init(with title: String, action: ActionModelProtocol) {
|
||||||
self.title = title
|
self.title = title
|
||||||
self.action = action
|
self.action = action
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,12 +13,12 @@ public class CaretLinkModel: MoleculeModelProtocol {
|
|||||||
public static var identifier: String = "caretLink"
|
public static var identifier: String = "caretLink"
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var title: String
|
public var title: String
|
||||||
public var action: ActionProtocol
|
public var action: ActionModelProtocol
|
||||||
public var enabledColor: Color = Color(uiColor: .black)
|
public var enabledColor: Color = Color(uiColor: .black)
|
||||||
public var disabledColor: Color? = Color(uiColor: .mfSilver())
|
public var disabledColor: Color? = Color(uiColor: .mfSilver())
|
||||||
public var enabled: Bool = true
|
public var enabled: Bool = true
|
||||||
|
|
||||||
public init(title: String, action: ActionProtocol) {
|
public init(title: String, action: ActionModelProtocol) {
|
||||||
self.title = title
|
self.title = title
|
||||||
self.action = action
|
self.action = action
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,11 +12,11 @@ public class LinkModel: MoleculeModelProtocol {
|
|||||||
public static var identifier: String = "link"
|
public static var identifier: String = "link"
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var title: String
|
public var title: String
|
||||||
public var action: ActionProtocol
|
public var action: ActionModelProtocol
|
||||||
public var enabled = true
|
public var enabled = true
|
||||||
public var textColor = Color(uiColor: .mfTextButton())
|
public var textColor = Color(uiColor: .mfTextButton())
|
||||||
|
|
||||||
public init(title: String, action: ActionProtocol) {
|
public init(title: String, action: ActionModelProtocol) {
|
||||||
self.title = title
|
self.title = title
|
||||||
self.action = action
|
self.action = action
|
||||||
}
|
}
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
public extension MFCustomButton {
|
public extension MFCustomButton {
|
||||||
func set(with action: ActionProtocol, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
func set(with action: ActionModelProtocol, delegateObject: MVMCoreUIDelegateObject?, additionalData: [AnyHashable: Any]?) {
|
||||||
buttonDelegate = delegateObject?.buttonDelegate
|
buttonDelegate = delegateObject?.buttonDelegate
|
||||||
add({ [weak self] sender in
|
add({ [weak self] sender in
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class LabelAttributeActionModel: LabelAttributeModel {
|
|||||||
override public class var identifier: String {
|
override public class var identifier: String {
|
||||||
return "action"
|
return "action"
|
||||||
}
|
}
|
||||||
var action: ActionProtocol
|
var action: ActionModelProtocol
|
||||||
|
|
||||||
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)
|
||||||
|
|||||||
@ -13,7 +13,7 @@ public class ToggleModel: MoleculeModelProtocol {
|
|||||||
public var moleculeName: String?
|
public var moleculeName: String?
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var state: Bool = true
|
public var state: Bool = true
|
||||||
public var action: ActionProtocol?
|
public var action: ActionModelProtocol?
|
||||||
public var required: Bool?
|
public var required: Bool?
|
||||||
public var fieldKey: String?
|
public var fieldKey: String?
|
||||||
|
|
||||||
|
|||||||
@ -10,14 +10,14 @@ import Foundation
|
|||||||
|
|
||||||
public protocol ListItemModelProtocol: ContainerModelProtocol, MoleculeModelProtocol {
|
public protocol ListItemModelProtocol: ContainerModelProtocol, MoleculeModelProtocol {
|
||||||
var line: LineModel? { get set }
|
var line: LineModel? { get set }
|
||||||
var action: ActionProtocol? { get set }
|
var action: ActionModelProtocol? { get set }
|
||||||
var hideArrow: Bool? { get set }
|
var hideArrow: Bool? { get set }
|
||||||
var style: String? { get set }
|
var style: String? { get set }
|
||||||
}
|
}
|
||||||
|
|
||||||
// Not a strict requirement.
|
// Not a strict requirement.
|
||||||
extension ListItemModelProtocol {
|
extension ListItemModelProtocol {
|
||||||
public var action: ActionProtocol? {
|
public var action: ActionModelProtocol? {
|
||||||
get {
|
get {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import MVMCore
|
|||||||
@objcMembers public class ListItemModel: MoleculeContainerModel, ListItemModelProtocol {
|
@objcMembers public class ListItemModel: MoleculeContainerModel, ListItemModelProtocol {
|
||||||
public static var identifier: String = "listItem"
|
public static var identifier: String = "listItem"
|
||||||
public var backgroundColor: Color?
|
public var backgroundColor: Color?
|
||||||
public var action: ActionProtocol?
|
public var action: ActionModelProtocol?
|
||||||
public var hideArrow: Bool?
|
public var hideArrow: Bool?
|
||||||
public var line: LineModel?
|
public var line: LineModel?
|
||||||
public var style: String? = "standard"
|
public var style: String? = "standard"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user