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.
|
||||
//
|
||||
|
||||
@objcMembers public class BaseDropdownEntryFieldModel: TextEntryFieldModel {
|
||||
@objcMembers open class BaseDropdownEntryFieldModel: TextEntryFieldModel {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
@objcMembers public class DateDropdownEntryFieldModel: BaseDropdownEntryFieldModel {
|
||||
@objcMembers open class DateDropdownEntryFieldModel: BaseDropdownEntryFieldModel {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
|
||||
@objcMembers public class DigitEntryFieldModel: TextEntryFieldModel {
|
||||
@objcMembers open class DigitEntryFieldModel: TextEntryFieldModel {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
@objcMembers public class EntryFieldModel: MoleculeModelProtocol, FormFieldProtocol, FormRuleWatcherFieldProtocol, EnableableModelProtocol {
|
||||
@objcMembers open class EntryFieldModel: MoleculeModelProtocol, FormFieldProtocol, FormRuleWatcherFieldProtocol, EnableableModelProtocol {
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
@objcMembers public class ItemDropdownEntryFieldModel: BaseDropdownEntryFieldModel {
|
||||
@objcMembers open class ItemDropdownEntryFieldModel: BaseDropdownEntryFieldModel {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
// Copyright © 2020 Verizon Wireless. All rights reserved.
|
||||
//
|
||||
|
||||
@objcMembers public class MdnEntryFieldModel: TextEntryFieldModel {
|
||||
@objcMembers open class MdnEntryFieldModel: TextEntryFieldModel {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
//
|
||||
|
||||
|
||||
@objcMembers public class TextEntryFieldModel: EntryFieldModel {
|
||||
@objcMembers open class TextEntryFieldModel: EntryFieldModel {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Types
|
||||
//--------------------------------------------------
|
||||
|
||||
@ -9,15 +9,16 @@
|
||||
import Foundation
|
||||
|
||||
|
||||
open class TextViewModel: MoleculeModelProtocol {
|
||||
open class TextViewModel: TextEntryFieldModel {
|
||||
//--------------------------------------------------
|
||||
// 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 text: String = ""
|
||||
public var textColor: Color = Color(uiColor: .mvmBlack)
|
||||
public var fontStyle: Styler.Font = Styler.Font.RegularBodySmall
|
||||
public var textAlignment: NSTextAlignment = .left
|
||||
@ -48,7 +49,8 @@ open class TextViewModel: MoleculeModelProtocol {
|
||||
case borderWidth
|
||||
case placeholder
|
||||
case placeholderFontStyle
|
||||
case isEditable
|
||||
case isEditable = "editable"
|
||||
case hideBlinkingCaret
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
@ -98,17 +100,15 @@ open class TextViewModel: MoleculeModelProtocol {
|
||||
if let fontStyle = try typeContainer.decodeIfPresent(Styler.Font.self, forKey: .fontStyle) {
|
||||
self.fontStyle = fontStyle
|
||||
}
|
||||
|
||||
|
||||
borderColor = try typeContainer.decodeIfPresent(Color.self, forKey: .borderColor)
|
||||
accessibilityText = try typeContainer.decodeIfPresent(String.self, forKey: .accessibilityText)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
height = try typeContainer.decode(CGFloat.self, forKey: .height)
|
||||
}
|
||||
|
||||
public func encode(to encoder: Encoder) throws {
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encodeIfPresent(moleculeName, forKey: .moleculeName)
|
||||
try container.encodeIfPresent(backgroundColor, forKey: .backgroundColor)
|
||||
try container.encodeIfPresent(accessibilityText, forKey: .accessibilityText)
|
||||
try container.encodeIfPresent(textColor, forKey: .textColor)
|
||||
try container.encodeIfPresent(fontStyle, forKey: .fontStyle)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user