Merge remote-tracking branch 'origin/develop' into feature/ONEAPP-7249
This commit is contained in:
commit
0a3186ad2e
@ -12,6 +12,7 @@ stages:
|
|||||||
# - xcode_12_2
|
# - xcode_12_2
|
||||||
|
|
||||||
download_artifacts:
|
download_artifacts:
|
||||||
|
when: manual
|
||||||
stage: download
|
stage: download
|
||||||
script:
|
script:
|
||||||
- ./Scripts/download_dependencies.sh
|
- ./Scripts/download_dependencies.sh
|
||||||
@ -27,6 +28,7 @@ download_artifacts:
|
|||||||
ARTIFACTORY_URL: https://oneartifactoryci.verizon.com/artifactory
|
ARTIFACTORY_URL: https://oneartifactoryci.verizon.com/artifactory
|
||||||
|
|
||||||
build_project:
|
build_project:
|
||||||
|
when: manual
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- ./Scripts/build_aggregate.sh
|
- ./Scripts/build_aggregate.sh
|
||||||
@ -37,6 +39,7 @@ build_project:
|
|||||||
- xcode_12_2
|
- xcode_12_2
|
||||||
|
|
||||||
deploy_snapshot:
|
deploy_snapshot:
|
||||||
|
when: manual
|
||||||
stage: deploy
|
stage: deploy
|
||||||
script:
|
script:
|
||||||
- cd Scripts && ./upload_core_ui_frameworks.sh
|
- cd Scripts && ./upload_core_ui_frameworks.sh
|
||||||
|
|||||||
@ -35,41 +35,67 @@ extension Tilelet.BadgeModel: Codable {
|
|||||||
|
|
||||||
extension Tilelet.DescriptiveIcon: Codable {
|
extension Tilelet.DescriptiveIcon: Codable {
|
||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
case name, size, surface
|
case name, size, color, accessibleText
|
||||||
}
|
}
|
||||||
|
|
||||||
public init(from decoder: Decoder) throws {
|
public init(from decoder: Decoder) throws {
|
||||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
let name = try container.decode(Icon.Name.self, forKey: .name)
|
let name = try container.decode(Icon.Name.self, forKey: .name)
|
||||||
let size = try container.decodeIfPresent(Icon.Size.self, forKey: .size) ?? .medium
|
let size = try container.decodeIfPresent(Icon.Size.self, forKey: .size) ?? .medium
|
||||||
let surface = try container.decodeIfPresent(Surface.self, forKey: .surface) ?? .dark
|
let color = try container.decodeIfPresent(Color.self, forKey: .color)
|
||||||
self.init(name: name, size: size, surface: surface)
|
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 {
|
public func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
try container.encode(name, forKey: .name)
|
try container.encode(name, forKey: .name)
|
||||||
try container.encode(size, forKey: .size)
|
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 {
|
extension Tilelet.DirectionalIcon: Codable {
|
||||||
private enum CodingKeys: String, CodingKey {
|
private enum CodingKeys: String, CodingKey {
|
||||||
case size, surface
|
case name, size, color, accessibleText
|
||||||
}
|
}
|
||||||
|
|
||||||
public init(from decoder: Decoder) throws {
|
public init(from decoder: Decoder) throws {
|
||||||
let container = try decoder.container(keyedBy: CodingKeys.self)
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
||||||
let size = try container.decodeIfPresent(Icon.Size.self, forKey: .size) ?? .medium
|
let iconType = try container.decodeIfPresent(IconType.self, forKey: .name) ?? .rightArrow
|
||||||
let surface = try container.decodeIfPresent(Surface.self, forKey: .surface) ?? .dark
|
let size = try container.decodeIfPresent(IconSize.self, forKey: .size) ?? .medium
|
||||||
self.init(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(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 {
|
public func encode(to encoder: Encoder) throws {
|
||||||
var container = encoder.container(keyedBy: CodingKeys.self)
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
||||||
|
try container.encode(iconType, forKey: .name)
|
||||||
try container.encode(size, forKey: .size)
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
let actionObject = ActionDelegate()
|
let actionObject = ActionDelegate()
|
||||||
let button = self.init(title: title, style: .plain, target: actionObject, action: #selector(actionObject.callActionBlock(_:)))
|
let button = self.init(title: title, style: .plain, target: actionObject, action: #selector(actionObject.callActionBlock(_:)))
|
||||||
button.actionDelegate = actionObject
|
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
|
return button
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user