Merge branch 'develop' of https://gitlab.verizon.com/BPHV_MIPS/mvm_core_ui into feature/monarch

This commit is contained in:
Scott Pfeil 2024-06-10 14:58:18 -04:00
commit 1637682cae
5 changed files with 26 additions and 34 deletions

View File

@ -743,7 +743,6 @@
0AE98BB423FF18D2004C5109 /* Arrow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Arrow.swift; sourceTree = "<group>"; };
0AE98BB623FF18E9004C5109 /* ArrowModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ArrowModel.swift; sourceTree = "<group>"; };
0AF60F0826B3316E00AC3DB4 /* MVMCoreUIUtility+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MVMCoreUIUtility+Extension.swift"; sourceTree = "<group>"; };
187FEB292844D2A600BF29C2 /* VDSFormControlsTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSFormControlsTokens.xcframework; path = ../SharedFrameworks/VDSFormControlsTokens.xcframework; sourceTree = "<group>"; };
1D6D258626899B0B00DEBB08 /* ImageButtonModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageButtonModel.swift; path = MVMCoreUI/Atomic/Atoms/Buttons/ImageButtonModel.swift; sourceTree = SOURCE_ROOT; };
1D6D258726899B0B00DEBB08 /* ImageButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = ImageButton.swift; path = MVMCoreUI/Atomic/Atoms/Buttons/ImageButton.swift; sourceTree = SOURCE_ROOT; };
22B678F829E7944E00CF4196 /* GetNotificationAuthStatusBehavior.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GetNotificationAuthStatusBehavior.swift; sourceTree = "<group>"; };
@ -923,7 +922,6 @@
AFA4932129E5EF2E001A9663 /* NotificationHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationHandler.swift; sourceTree = "<group>"; };
AFA4933E29E874F0001A9663 /* MVMCoreUILoggingDelegateProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MVMCoreUILoggingDelegateProtocol.swift; sourceTree = "<group>"; };
AFA4935629EE3DCC001A9663 /* AlertDelegateProtocol.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertDelegateProtocol.swift; sourceTree = "<group>"; };
AFE4A1D027DFB5EE00C458D0 /* VDSColorTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSColorTokens.xcframework; path = ../SharedFrameworks/VDSColorTokens.xcframework; sourceTree = "<group>"; };
AFE4A1D527DFBB6F00C458D0 /* UINavigationController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UINavigationController+Extension.swift"; sourceTree = "<group>"; };
B4CC8FBC29DF34680005D28B /* Badge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Badge.swift; sourceTree = "<group>"; };
B4CC8FBE29DF34730005D28B /* BadgeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BadgeModel.swift; sourceTree = "<group>"; };
@ -1216,7 +1214,6 @@
EA985C3D2970938F00F2FF2E /* Tilelet.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tilelet.swift; sourceTree = "<group>"; };
EA985C3F2970939A00F2FF2E /* TileletModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TileletModel.swift; sourceTree = "<group>"; };
EA985C5F2970A3F000F2FF2E /* VDS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = VDS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
EA985C632970A40E00F2FF2E /* VDSTypographyTokens.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = VDSTypographyTokens.xcframework; path = ../SharedFrameworks/VDSTypographyTokens.xcframework; sourceTree = "<group>"; };
EA985C842981AA9C00F2FF2E /* VDS-Enums+Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "VDS-Enums+Codable.swift"; sourceTree = "<group>"; };
EA985C862981AB0F00F2FF2E /* VDS-Tilelet+Codable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "VDS-Tilelet+Codable.swift"; sourceTree = "<group>"; };
EA985C882981AB7100F2FF2E /* VDS-TextStyle.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "VDS-TextStyle.swift"; sourceTree = "<group>"; };
@ -2144,10 +2141,7 @@
children = (
AF1CEFE72BEA73890001F9A5 /* VDSCoreTokens.xcframework */,
EAD715A92BBC8FAF00DEDA6A /* VDSTokens.xcframework */,
EA985C632970A40E00F2FF2E /* VDSTypographyTokens.xcframework */,
EA985C5F2970A3F000F2FF2E /* VDS.framework */,
187FEB292844D2A600BF29C2 /* VDSFormControlsTokens.xcframework */,
AFE4A1D027DFB5EE00C458D0 /* VDSColorTokens.xcframework */,
D29DF0E521E4F3C7003B2FB9 /* MVMCore.framework */,
);
name = Frameworks;

View File

@ -58,7 +58,7 @@ open class TileletModel: TileContainerBaseModel<Tilelet.Padding, Tilelet>, Molec
textPercentage = try container.decodeIfPresent(CGFloat.self, forKey: .textPercentage)
if let color = eyebrow?.textColor?.uiColor {
self.eyebrowColor = .custom(color, color)
self.eyebrowColor = .custom(color)
} else if let eyebrowColor = try? container.decodeIfPresent(TitleLockup.TextColor.self, forKey: .eyebrowColor) {
self.eyebrowColor = eyebrowColor
@ -68,7 +68,7 @@ open class TileletModel: TileContainerBaseModel<Tilelet.Padding, Tilelet>, Molec
}
if let color = title?.textColor?.uiColor {
self.titleColor = .custom(color, color)
self.titleColor = .custom(color)
} else if let titleColor = try? container.decodeIfPresent(TitleLockup.TitleTextColor.self, forKey: .titleColor) {
self.titleColor = titleColor
@ -78,7 +78,7 @@ open class TileletModel: TileContainerBaseModel<Tilelet.Padding, Tilelet>, Molec
}
if let color = subTitle?.textColor?.uiColor {
self.subTitleColor = .custom(color, color)
self.subTitleColor = .custom(color)
} else if let subTitleColor = try? container.decodeIfPresent(TitleLockup.TextColor.self, forKey: .subTitleColor) {
self.subTitleColor = subTitleColor

View File

@ -197,8 +197,7 @@ extension VDS.TitleLockup.TextColor: Codable {
enum CodingKeys: String, CodingKey {
case type
case lightColor
case darkColor
case color
}
enum CustomColorType: String, Codable {
@ -217,9 +216,8 @@ extension VDS.TitleLockup.TextColor: Codable {
case .secondary:
self = .secondary
case .custom:
let lightColor = try container.decode(Color.self, forKey: .lightColor)
let darkColor = try container.decode(Color.self, forKey: .darkColor)
self = .custom(lightColor.uiColor, darkColor.uiColor)
let color = try container.decode(Color.self, forKey: .color)
self = .custom(color.uiColor)
}
}
@ -230,11 +228,10 @@ extension VDS.TitleLockup.TextColor: Codable {
try container.encode(CustomColorType.primary.rawValue, forKey: .type)
case .secondary:
try container.encode(CustomColorType.secondary.rawValue, forKey: .type)
case .custom(let lightColor, let darkColor):
case .custom(let color):
try container.encode(CustomColorType.custom.rawValue, forKey: .type)
try container.encode(Color(uiColor: lightColor), forKey: .lightColor)
try container.encode(Color(uiColor: darkColor), forKey: .darkColor)
@unknown default:
try container.encode(Color(uiColor: color), forKey: .color)
default:
break
}
}
@ -244,8 +241,7 @@ extension VDS.TitleLockup.TitleTextColor: Codable {
enum CodingKeys: String, CodingKey {
case type
case lightColor
case darkColor
case color
}
enum CustomColorType: String, Codable {
@ -261,9 +257,8 @@ extension VDS.TitleLockup.TitleTextColor: Codable {
case .primary:
self = .primary
case .custom:
let lightColor = try container.decode(Color.self, forKey: .lightColor)
let darkColor = try container.decode(Color.self, forKey: .darkColor)
self = .custom(lightColor.uiColor, darkColor.uiColor)
let color = try container.decode(Color.self, forKey: .color)
self = .custom(color.uiColor)
}
}
@ -272,11 +267,10 @@ extension VDS.TitleLockup.TitleTextColor: Codable {
switch self {
case .primary:
try container.encode(CustomColorType.primary.rawValue, forKey: .type)
case .custom(let lightColor, let darkColor):
case .custom(let color):
try container.encode(CustomColorType.custom.rawValue, forKey: .type)
try container.encode(Color(uiColor: lightColor), forKey: .lightColor)
try container.encode(Color(uiColor: darkColor), forKey: .darkColor)
@unknown default:
try container.encode(Color(uiColor: color), forKey: .color)
default:
break
}
}

View File

@ -46,7 +46,7 @@ extension Tilelet.DescriptiveIcon: Codable {
let accessibleText = try container.decodeIfPresent(String.self, forKey: .accessibleText)
if let uiColor = color?.uiColor {
self.init(name: name,
colorConfiguration: .init(uiColor, uiColor),
iconColor: .custom(uiColor),
size: size,
accessibleText: accessibleText)
} else {
@ -61,7 +61,9 @@ extension Tilelet.DescriptiveIcon: Codable {
try container.encode(name, forKey: .name)
try container.encode(size, forKey: .size)
try container.encodeIfPresent(accessibleText, forKey: .accessibleText)
try container.encodeIfPresent(colorConfiguration.lightColor.hexString, forKey: .color)
if let color = iconColor?.uiColor {
try container.encode(Color(uiColor: color), forKey: .color)
}
}
}
@ -81,7 +83,7 @@ extension Tilelet.DirectionalIcon: Codable {
let accessibleText = try container.decodeIfPresent(String.self, forKey: .accessibleText)
if let uiColor = color?.uiColor {
self.init(iconType: iconType,
colorConfiguration: .init(uiColor, uiColor),
iconColor: .custom(uiColor),
size: size,
accessibleText: accessibleText)
} else {
@ -96,6 +98,8 @@ extension Tilelet.DirectionalIcon: Codable {
try container.encode(iconType, forKey: .name)
try container.encode(size, forKey: .size)
try container.encodeIfPresent(accessibleText, forKey: .accessibleText)
try container.encodeIfPresent(colorConfiguration.lightColor.hexString, forKey: .color)
if let color = iconColor?.uiColor {
try container.encode(Color(uiColor: color), forKey: .color)
}
}
}

View File

@ -99,7 +99,7 @@ public class TitleLockupModel: ParentMoleculeModelProtocol {
subTitle = try typeContainer.decodeMoleculeIfPresent(codingKey: .subTitle)
if let color = eyebrow?.textColor?.uiColor {
self.eyebrowColor = .custom(color, color)
self.eyebrowColor = .custom(color)
} else if let eyebrowColor = try? typeContainer.decodeIfPresent(TitleLockup.TextColor.self, forKey: .eyebrowColor) {
self.eyebrowColor = eyebrowColor
@ -109,7 +109,7 @@ public class TitleLockupModel: ParentMoleculeModelProtocol {
}
if let color = title.textColor?.uiColor {
self.titleColor = .custom(color, color)
self.titleColor = .custom(color)
} else if let titleColor = try? typeContainer.decodeIfPresent(TitleLockup.TitleTextColor.self, forKey: .titleColor) {
self.titleColor = titleColor
@ -119,7 +119,7 @@ public class TitleLockupModel: ParentMoleculeModelProtocol {
}
if let color = subTitle?.textColor?.uiColor {
self.subTitleColor = .custom(color, color)
self.subTitleColor = .custom(color)
} else if let subTitleColor = try? typeContainer.decodeIfPresent(TitleLockup.TextColor.self, forKey: .subTitleColor) {
self.subTitleColor = subTitleColor