diff --git a/MVMCoreUI/Atoms/Buttons/ButtonModel.swift b/MVMCoreUI/Atoms/Buttons/ButtonModel.swift index 5640996f..2f5e0042 100644 --- a/MVMCoreUI/Atoms/Buttons/ButtonModel.swift +++ b/MVMCoreUI/Atoms/Buttons/ButtonModel.swift @@ -20,7 +20,6 @@ public enum ButtonSize: String, Codable { public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol { public static var identifier: String = "button" - public var moleculeName: String? public var backgroundColor: Color? public var title: String public var action: ActionModelProtocol @@ -39,14 +38,14 @@ public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol { init(with title: String, action: ActionModelProtocol) { self.title = title self.action = action - moleculeName = Self.identifier + //moleculeName = Self.identifier } init(secondaryButtonWith title: String, action: ActionModelProtocol) { self.title = title self.action = action style = .secondary - moleculeName = Self.identifier + //moleculeName = Self.identifier } init(primaryButtonWith title: String, action: ActionModelProtocol) { @@ -75,7 +74,6 @@ public class ButtonModel: ButtonModelProtocol, MoleculeModelProtocol { required public init(from decoder: Decoder) throws { let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - moleculeName = try typeContainer.decodeIfPresent(String.self, forKey: .moleculeName) backgroundColor = try typeContainer.decodeIfPresent(Color.self, forKey: .backgroundColor) title = try typeContainer.decode(String.self, forKey: .title) diff --git a/MVMCoreUI/Atoms/Views/ImageViewModel.swift b/MVMCoreUI/Atoms/Views/ImageViewModel.swift index f8443da5..497b0c86 100644 --- a/MVMCoreUI/Atoms/Views/ImageViewModel.swift +++ b/MVMCoreUI/Atoms/Views/ImageViewModel.swift @@ -11,7 +11,6 @@ import Foundation @objcMembers public class ImageViewModel: MoleculeModelProtocol { public static var identifier: String = "image" public var backgroundColor: Color? - public var moleculeName: String? public var image: String public var accessibilityText: String? public var fallbackImage: String? @@ -38,6 +37,5 @@ import Foundation public init(image: String) { self.image = image - moleculeName = Self.identifier } } diff --git a/MVMCoreUI/Atoms/Views/Label/LabelModel.swift b/MVMCoreUI/Atoms/Views/Label/LabelModel.swift index 76597b44..d7fb4fa3 100644 --- a/MVMCoreUI/Atoms/Views/Label/LabelModel.swift +++ b/MVMCoreUI/Atoms/Views/Label/LabelModel.swift @@ -11,9 +11,7 @@ import Foundation @objcMembers public class LabelModel: MoleculeModelProtocol { public static var identifier: String = "label" - public var moleculeName: String? public var backgroundColor: Color? - public var text: String public var accessibilityText: String? public var textColor: String? @@ -48,12 +46,10 @@ import Foundation public init(text: String) { self.text = text - moleculeName = Self.identifier } required public init(from decoder: Decoder) throws { let typeContainer = try decoder.container(keyedBy: CodingKeys.self) - moleculeName = try typeContainer.decodeIfPresent(String.self, forKey: .moleculeName) text = try typeContainer.decode(String.self, forKey: .text) accessibilityText = try typeContainer.decodeIfPresent(String.self, forKey: .accessibilityText) textColor = try typeContainer.decodeIfPresent(String.self, forKey: .textColor) diff --git a/MVMCoreUI/Molecules/FooterModel.swift b/MVMCoreUI/Molecules/FooterModel.swift index 57a81f8b..d61d1194 100644 --- a/MVMCoreUI/Molecules/FooterModel.swift +++ b/MVMCoreUI/Molecules/FooterModel.swift @@ -12,7 +12,6 @@ import Foundation @objcMembers public class FooterModel: MoleculeContainerModel, MoleculeModelProtocol { public static var identifier: String = "footer" public var backgroundColor: Color? - public var moleculeName: String? private enum CodingKeys: String, CodingKey { case moleculeName @@ -38,7 +37,6 @@ import Foundation public override init(with moleculeModel: MoleculeModelProtocol) { super.init(with: moleculeModel) setDefaults() - moleculeName = Self.identifier } required public init(from decoder: Decoder) throws { diff --git a/MVMCoreUI/Molecules/HorizontalCombinationViews/TwoButtonViewModel.swift b/MVMCoreUI/Molecules/HorizontalCombinationViews/TwoButtonViewModel.swift index 70d3f743..4ddb1575 100644 --- a/MVMCoreUI/Molecules/HorizontalCombinationViews/TwoButtonViewModel.swift +++ b/MVMCoreUI/Molecules/HorizontalCombinationViews/TwoButtonViewModel.swift @@ -10,7 +10,6 @@ import UIKit public class TwoButtonViewModel: MoleculeModelProtocol { public static var identifier: String = "twoButtonView" - public var moleculeName: String? public var backgroundColor: Color? public var primaryButton: ButtonModel? public var secondaryButton: ButtonModel? @@ -22,9 +21,7 @@ public class TwoButtonViewModel: MoleculeModelProtocol { case secondaryButton } - init() { - moleculeName = Self.identifier - } + init() { } required public init(from decoder: Decoder) throws { let typeContainer = try decoder.container(keyedBy: CodingKeys.self) diff --git a/MVMCoreUI/Molecules/Items/MoleculeStackItemModel.swift b/MVMCoreUI/Molecules/Items/MoleculeStackItemModel.swift index 2b23f405..dc01fd11 100644 --- a/MVMCoreUI/Molecules/Items/MoleculeStackItemModel.swift +++ b/MVMCoreUI/Molecules/Items/MoleculeStackItemModel.swift @@ -13,7 +13,6 @@ import Foundation public var backgroundColor: Color? public var spacing: CGFloat? public var percent: Int? - public var moleculeName: String? public var gone: Bool = false private enum CodingKeys: String, CodingKey { @@ -25,9 +24,8 @@ import Foundation public override init(with moleculeModel: MoleculeModelProtocol) { super.init(with: moleculeModel) - moleculeName = Self.identifier } - + required public init(from decoder: Decoder) throws { let typeContainer = try decoder.container(keyedBy: CodingKeys.self) spacing = try typeContainer.decodeIfPresent(CGFloat.self, forKey: .spacing) diff --git a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadlineBodyModel.swift b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadlineBodyModel.swift index 8d649995..fd5be23a 100644 --- a/MVMCoreUI/Molecules/VerticalCombinationViews/HeadlineBodyModel.swift +++ b/MVMCoreUI/Molecules/VerticalCombinationViews/HeadlineBodyModel.swift @@ -10,7 +10,6 @@ import Foundation @objcMembers public class HeadlineBodyModel: MoleculeModelProtocol { public static var identifier: String = "headlineBody" - public var moleculeName: String? public var headline: LabelModel? public var body: LabelModel? public var style: String? @@ -18,6 +17,5 @@ import Foundation public init(headline: LabelModel) { self.headline = headline - moleculeName = Self.identifier } }