Merge remote-tracking branch 'origin/develop' into feature/ONEAPP-7249

This commit is contained in:
Hedden, Kyle Matthew 2024-05-23 17:06:57 -04:00
commit 0a3186ad2e
3 changed files with 40 additions and 11 deletions

View File

@ -12,6 +12,7 @@ stages:
# - xcode_12_2
download_artifacts:
when: manual
stage: download
script:
- ./Scripts/download_dependencies.sh
@ -27,6 +28,7 @@ download_artifacts:
ARTIFACTORY_URL: https://oneartifactoryci.verizon.com/artifactory
build_project:
when: manual
stage: build
script:
- ./Scripts/build_aggregate.sh
@ -37,6 +39,7 @@ build_project:
- xcode_12_2
deploy_snapshot:
when: manual
stage: deploy
script:
- cd Scripts && ./upload_core_ui_frameworks.sh

View File

@ -35,41 +35,67 @@ extension Tilelet.BadgeModel: Codable {
extension Tilelet.DescriptiveIcon: Codable {
private enum CodingKeys: String, CodingKey {
case name, size, surface
case name, size, color, accessibleText
}
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
let name = try container.decode(Icon.Name.self, forKey: .name)
let size = try container.decodeIfPresent(Icon.Size.self, forKey: .size) ?? .medium
let surface = try container.decodeIfPresent(Surface.self, forKey: .surface) ?? .dark
self.init(name: name, size: size, surface: surface)
let color = try container.decodeIfPresent(Color.self, forKey: .color)
let accessibleText = try container.decodeIfPresent(String.self, forKey: .accessibleText)
if let uiColor = color?.uiColor {
self.init(name: name,
colorConfiguration: .init(uiColor, uiColor),
size: size,
accessibleText: accessibleText)
} else {
self.init(name: name,
size: size,
accessibleText: accessibleText)
}
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(name, forKey: .name)
try container.encode(size, forKey: .size)
try container.encode(surface, forKey: .surface)
try container.encodeIfPresent(accessibleText, forKey: .accessibleText)
try container.encodeIfPresent(colorConfiguration.lightColor.hexString, forKey: .color)
}
}
extension Tilelet.DirectionalIcon.IconType : Codable {}
extension Tilelet.DirectionalIcon.IconSize : Codable {}
extension Tilelet.DirectionalIcon: Codable {
private enum CodingKeys: String, CodingKey {
case size, surface
case name, size, color, accessibleText
}
public init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: CodingKeys.self)
let size = try container.decodeIfPresent(Icon.Size.self, forKey: .size) ?? .medium
let surface = try container.decodeIfPresent(Surface.self, forKey: .surface) ?? .dark
self.init(size: size, surface: surface)
let iconType = try container.decodeIfPresent(IconType.self, forKey: .name) ?? .rightArrow
let size = try container.decodeIfPresent(IconSize.self, forKey: .size) ?? .medium
let color = try container.decodeIfPresent(Color.self, forKey: .color)
let accessibleText = try container.decodeIfPresent(String.self, forKey: .accessibleText)
if let uiColor = color?.uiColor {
self.init(iconType: iconType,
colorConfiguration: .init(uiColor, uiColor),
size: size,
accessibleText: accessibleText)
} else {
self.init(iconType: iconType,
size: size,
accessibleText: accessibleText)
}
}
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encode(iconType, forKey: .name)
try container.encode(size, forKey: .size)
try container.encode(surface, forKey: .surface)
try container.encodeIfPresent(accessibleText, forKey: .accessibleText)
try container.encodeIfPresent(colorConfiguration.lightColor.hexString, forKey: .color)
}
}

View File

@ -16,7 +16,7 @@
let actionObject = ActionDelegate()
let button = self.init(title: title, style: .plain, target: actionObject, action: #selector(actionObject.callActionBlock(_:)))
button.actionDelegate = actionObject
button.setTitleTextAttributes([NSAttributedString.Key.font: Styler.Font.RegularBodySmall.getFont()], for: .normal)
button.setTitleTextAttributes([NSAttributedString.Key.font: Styler.Font.BoldBodySmall.getFont()], for: .normal)
return button
}