Merge branch 'feature/access_fix' into 'develop'
Opening access to prevent error See merge request BPHV_MIPS/mvm_core_ui!287
This commit is contained in:
commit
b4a5ec2ded
@ -9,32 +9,48 @@
|
||||
import Foundation
|
||||
|
||||
open class ListLeftVariableCheckboxAllTextAndLinksModel: ListItemModel, MoleculeModelProtocol {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
open class var identifier: String {
|
||||
return "listLVCB"
|
||||
}
|
||||
public var checkbox: CheckboxModel
|
||||
public var eyebrowHeadlineBodyLink: EyebrowHeadlineBodyLinkModel
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Initializer
|
||||
//--------------------------------------------------
|
||||
|
||||
public init(checkbox: CheckboxModel, eyebrowHeadlineBodyLink: EyebrowHeadlineBodyLinkModel) {
|
||||
self.checkbox = checkbox
|
||||
self.eyebrowHeadlineBodyLink = eyebrowHeadlineBodyLink
|
||||
super.init()
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Keys
|
||||
//--------------------------------------------------
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case moleculeName
|
||||
case eyebrowHeadlineBodyLink
|
||||
case checkbox
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Codec
|
||||
//--------------------------------------------------
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
eyebrowHeadlineBodyLink = try typeContainer.decode(EyebrowHeadlineBodyLinkModel.self, forKey: .eyebrowHeadlineBodyLink)
|
||||
checkbox = try typeContainer.decodeIfPresent(CheckboxModel.self, forKey: .checkbox) ?? CheckboxModel()
|
||||
try super.init(from: decoder)
|
||||
}
|
||||
|
||||
public override func encode(to encoder: Encoder) throws {
|
||||
|
||||
open override func encode(to encoder: Encoder) throws {
|
||||
try super.encode(to: encoder)
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
try container.encode(moleculeName, forKey: .moleculeName)
|
||||
|
||||
@ -10,12 +10,20 @@
|
||||
import Foundation
|
||||
|
||||
@objcMembers open class ListItemModel: ContainerModel, ListItemModelProtocol {
|
||||
//--------------------------------------------------
|
||||
// MARK: - Properties
|
||||
//--------------------------------------------------
|
||||
|
||||
public var backgroundColor: Color?
|
||||
public var action: ActionModelProtocol?
|
||||
public var hideArrow: Bool?
|
||||
public var line: LineModel?
|
||||
public var style: String?
|
||||
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Keys
|
||||
//--------------------------------------------------
|
||||
|
||||
private enum CodingKeys: String, CodingKey {
|
||||
case backgroundColor
|
||||
case action
|
||||
@ -24,6 +32,10 @@ import Foundation
|
||||
case style
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Methods
|
||||
//--------------------------------------------------
|
||||
|
||||
/// Defaults to set
|
||||
open func setDefaults() {
|
||||
if useHorizontalMargins == nil {
|
||||
@ -37,11 +49,19 @@ import Foundation
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Initializer
|
||||
//--------------------------------------------------
|
||||
|
||||
public override init() {
|
||||
super.init()
|
||||
setDefaults()
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------
|
||||
// MARK: - Codec
|
||||
//--------------------------------------------------
|
||||
|
||||
required public init(from decoder: Decoder) throws {
|
||||
let typeContainer = try decoder.container(keyedBy: CodingKeys.self)
|
||||
backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor)
|
||||
@ -52,7 +72,7 @@ import Foundation
|
||||
try super.init(from: decoder)
|
||||
setDefaults()
|
||||
}
|
||||
|
||||
|
||||
open override func encode(to encoder: Encoder) throws {
|
||||
try super.encode(to: encoder)
|
||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||
@ -63,4 +83,3 @@ import Foundation
|
||||
try container.encodeIfPresent(style, forKey: .style)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user