updating to align with android. changing super.
This commit is contained in:
parent
75c47d0692
commit
bc477d9da6
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
@objcMembers public class BaseDropdownEntryFieldModel: TextEntryFieldModel {
|
@objcMembers open class BaseDropdownEntryFieldModel: TextEntryFieldModel {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
@objcMembers public class DateDropdownEntryFieldModel: BaseDropdownEntryFieldModel {
|
@objcMembers open class DateDropdownEntryFieldModel: BaseDropdownEntryFieldModel {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@objcMembers public class DigitEntryFieldModel: TextEntryFieldModel {
|
@objcMembers open class DigitEntryFieldModel: TextEntryFieldModel {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
@objcMembers public class EntryFieldModel: MoleculeModelProtocol, FormFieldProtocol, FormRuleWatcherFieldProtocol, EnableableModelProtocol {
|
@objcMembers open class EntryFieldModel: MoleculeModelProtocol, FormFieldProtocol, FormRuleWatcherFieldProtocol, EnableableModelProtocol {
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
@objcMembers public class ItemDropdownEntryFieldModel: BaseDropdownEntryFieldModel {
|
@objcMembers open class ItemDropdownEntryFieldModel: BaseDropdownEntryFieldModel {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
@objcMembers public class MdnEntryFieldModel: TextEntryFieldModel {
|
@objcMembers open class MdnEntryFieldModel: TextEntryFieldModel {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@objcMembers public class TextEntryFieldModel: EntryFieldModel {
|
@objcMembers open class TextEntryFieldModel: EntryFieldModel {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Types
|
// MARK: - Types
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|||||||
@ -9,15 +9,16 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
|
||||||
|
|
||||||
open class TextViewModel: MoleculeModelProtocol {
|
open class TextViewModel: TextEntryFieldModel {
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
|
|
||||||
public static var identifier: String = "textView"
|
|
||||||
public var backgroundColor: Color?
|
public override class var identifier: String {
|
||||||
|
return "textView"
|
||||||
|
}
|
||||||
public var accessibilityText: String?
|
public var accessibilityText: String?
|
||||||
public var text: String = ""
|
|
||||||
public var textColor: Color = Color(uiColor: .mvmBlack)
|
public var textColor: Color = Color(uiColor: .mvmBlack)
|
||||||
public var fontStyle: Styler.Font = Styler.Font.RegularBodySmall
|
public var fontStyle: Styler.Font = Styler.Font.RegularBodySmall
|
||||||
public var textAlignment: NSTextAlignment = .left
|
public var textAlignment: NSTextAlignment = .left
|
||||||
@ -48,7 +49,8 @@ open class TextViewModel: MoleculeModelProtocol {
|
|||||||
case borderWidth
|
case borderWidth
|
||||||
case placeholder
|
case placeholder
|
||||||
case placeholderFontStyle
|
case placeholderFontStyle
|
||||||
case isEditable
|
case isEditable = "editable"
|
||||||
|
case hideBlinkingCaret
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
@ -101,14 +103,12 @@ open class TextViewModel: MoleculeModelProtocol {
|
|||||||
|
|
||||||
borderColor = try typeContainer.decodeIfPresent(Color.self, forKey: .borderColor)
|
borderColor = try typeContainer.decodeIfPresent(Color.self, forKey: .borderColor)
|
||||||
accessibilityText = try typeContainer.decodeIfPresent(String.self, forKey: .accessibilityText)
|
accessibilityText = try typeContainer.decodeIfPresent(String.self, forKey: .accessibilityText)
|
||||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
|
||||||
height = try typeContainer.decode(CGFloat.self, forKey: .height)
|
height = try typeContainer.decode(CGFloat.self, forKey: .height)
|
||||||
}
|
}
|
||||||
|
|
||||||
public func encode(to encoder: Encoder) throws {
|
public func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
try container.encodeIfPresent(moleculeName, forKey: .moleculeName)
|
try container.encodeIfPresent(moleculeName, forKey: .moleculeName)
|
||||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
|
||||||
try container.encodeIfPresent(accessibilityText, forKey: .accessibilityText)
|
try container.encodeIfPresent(accessibilityText, forKey: .accessibilityText)
|
||||||
try container.encodeIfPresent(textColor, forKey: .textColor)
|
try container.encodeIfPresent(textColor, forKey: .textColor)
|
||||||
try container.encodeIfPresent(fontStyle, forKey: .fontStyle)
|
try container.encodeIfPresent(fontStyle, forKey: .fontStyle)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user