diff --git a/Notification Agent Alert Tests/NAATriggersTests.swift b/Notification Agent Alert Tests/NAATriggersTests.swift
index 027876b..6f6c0bf 100644
--- a/Notification Agent Alert Tests/NAATriggersTests.swift
+++ b/Notification Agent Alert Tests/NAATriggersTests.swift
@@ -3,7 +3,7 @@
// Notification Agent Alert Tests
//
// Created by Simone Martorelli on 01/06/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Alerts/AppDelegate.swift b/Notification Agent Alerts/AppDelegate.swift
index 294b4e3..464b4f2 100644
--- a/Notification Agent Alerts/AppDelegate.swift
+++ b/Notification Agent Alerts/AppDelegate.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 18/06/2021.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Alerts/Extensions/NotificationDispatch-Extension.swift b/Notification Agent Alerts/Extensions/NotificationDispatch-Extension.swift
index ed96abd..266657d 100644
--- a/Notification Agent Alerts/Extensions/NotificationDispatch-Extension.swift
+++ b/Notification Agent Alerts/Extensions/NotificationDispatch-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 5/27/21.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Alerts/Info.plist b/Notification Agent Alerts/Info.plist
index 411d179..accb4b9 100644
--- a/Notification Agent Alerts/Info.plist
+++ b/Notification Agent Alerts/Info.plist
@@ -32,7 +32,7 @@
NSHumanReadableCopyright
- Copyright © 2021 IBM. All rights reserved.
+ © Copyright IBM Corp. 2021, 2024
NSMainStoryboardFile
Main
NSPrincipalClass
diff --git a/Notification Agent Banner Tests/NABTriggersTests.swift b/Notification Agent Banner Tests/NABTriggersTests.swift
index 1201421..e67cfc6 100644
--- a/Notification Agent Banner Tests/NABTriggersTests.swift
+++ b/Notification Agent Banner Tests/NABTriggersTests.swift
@@ -3,7 +3,7 @@
// Notification Agent Alert Tests
//
// Created by Simone Martorelli on 01/06/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Banners/AppDelegate.swift b/Notification Agent Banners/AppDelegate.swift
index f3b238a..81bb070 100644
--- a/Notification Agent Banners/AppDelegate.swift
+++ b/Notification Agent Banners/AppDelegate.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Jan Valentik on 18/06/2021.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Banners/Extensions/NotificationDispatch-Extension.swift b/Notification Agent Banners/Extensions/NotificationDispatch-Extension.swift
index ed96abd..266657d 100644
--- a/Notification Agent Banners/Extensions/NotificationDispatch-Extension.swift
+++ b/Notification Agent Banners/Extensions/NotificationDispatch-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 5/27/21.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Banners/Info.plist b/Notification Agent Banners/Info.plist
index 411d179..accb4b9 100644
--- a/Notification Agent Banners/Info.plist
+++ b/Notification Agent Banners/Info.plist
@@ -32,7 +32,7 @@
NSHumanReadableCopyright
- Copyright © 2021 IBM. All rights reserved.
+ © Copyright IBM Corp. 2021, 2024
NSMainStoryboardFile
Main
NSPrincipalClass
diff --git a/Notification Agent Core Tests/NACInteractiveEFCLControllerTests.swift b/Notification Agent Core Tests/NACInteractiveEFCLControllerTests.swift
index aaba0eb..ff7e5a3 100644
--- a/Notification Agent Core Tests/NACInteractiveEFCLControllerTests.swift
+++ b/Notification Agent Core Tests/NACInteractiveEFCLControllerTests.swift
@@ -3,7 +3,7 @@
// Notification Agent Core Tests
//
// Created by Simone Martorelli on 27/05/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Core Tests/NACTriggersTests.swift b/Notification Agent Core Tests/NACTriggersTests.swift
index a5d6d0e..0877df1 100644
--- a/Notification Agent Core Tests/NACTriggersTests.swift
+++ b/Notification Agent Core Tests/NACTriggersTests.swift
@@ -3,7 +3,7 @@
// Notification Agent Core Tests
//
// Created by Simone Martorelli on 26/05/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Core/AppDelegate.swift b/Notification Agent Core/AppDelegate.swift
index 2b6ff56..a3bc16e 100644
--- a/Notification Agent Core/AppDelegate.swift
+++ b/Notification Agent Core/AppDelegate.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Jan Valentik on 18/06/2021.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Core/Controllers/Context.swift b/Notification Agent Core/Controllers/Context.swift
index 9bf3419..5288c3f 100644
--- a/Notification Agent Core/Controllers/Context.swift
+++ b/Notification Agent Core/Controllers/Context.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 31/03/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Core/Controllers/DeepLinkEngine.swift b/Notification Agent Core/Controllers/DeepLinkEngine.swift
index 93fb640..6c5c690 100644
--- a/Notification Agent Core/Controllers/DeepLinkEngine.swift
+++ b/Notification Agent Core/Controllers/DeepLinkEngine.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 6/22/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Core/Controllers/HelpBuilder.swift b/Notification Agent Core/Controllers/HelpBuilder.swift
index 0a8d1f4..8082377 100644
--- a/Notification Agent Core/Controllers/HelpBuilder.swift
+++ b/Notification Agent Core/Controllers/HelpBuilder.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 8/27/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
// swiftlint:disable type_body_length file_length
@@ -20,8 +20,8 @@ public final class HelpBuilder {
"-icon_height".yellow(),
"-accessory_view_type".yellow(),
"-accessory_view_payload".yellow(),
- "-secondary_accessory_view_type".yellow(),
- "-secondary_accessory_view_payload".yellow(),
+ "-accessory_view_type_N".yellow(),
+ "-accessory_view_payload_N".yellow(),
"-main_button_label".yellow(),
"-main_button_cta_type".yellow(),
"-main_button_cta_payload".yellow(),
@@ -47,7 +47,9 @@ public final class HelpBuilder {
"-background_panel".yellow(),
"-unmovable".yellow(),
"-disable_quit".yellow(),
- "-custom_width".yellow()]
+ "-custom_width".yellow(),
+ "-buttonless".yellow(),
+ "-hide_title_bar".yellow()]
static let bannerArguments: [String] = ["-type".green(),
"-title".yellow(),
"-subtitle".yellow(),
@@ -110,8 +112,8 @@ public final class HelpBuilder {
"Example 3: -accessory_view_payload \"/percent indeterminate /top_message This is the top message /bottom_message This is the bottom message\";\n " +
"Example 4: -accessory_view_payload \"
Hello, world!
this is a line of text
this is a code block
this is the second line of a code block
this is red text\"\n " +
"Example 5: -accessory_view_payload \"/images /path/to/image.jpg\\nhttps://www.url.to/image.png\\nhttps://www.url.to/image.png /autoplay /delay 3\".",
- "\n Same as for accessory_view_type argument.",
- "\n Same as for accessory_view_payload argument.",
+ "\n Same as for accessory_view_type argument. The tool support multiple accessory views on each pop-up;\n Example 1: accessory_view_type_1 image;\n Example 2: accessory_view_type_2 dropdown;",
+ "\n Same as for accessory_view_payload argument. The tool support multiple accessory views on each pop-up;\n Example 1: accessory_view_payload_1 \"path/or/URL/to/file\";\n Example 2: accessory_view_payload_2 \"/list One\\nTwo\\nThree\";",
"\n The label of the main button.\n Example: -main_button_label \"Main button title\"",
"[ none | link ]".red() + "\n The call to action type for the main button (default: none -> exit).\n Example: -main_button_cta_type link",
"\n An URL if " + "[ link ]".red() + " cta type defined.\n Example: -main_button_cta_payload \"URL\"",
@@ -138,7 +140,8 @@ public final class HelpBuilder {
"\n Flag that make the UI unmovable for the user.\n Example: -unmovable",
"\n Flag that tells the agent to ignore cmd+q shortcut.\n Example: -disable_quit",
"\n A custom width for the UI.\n Example: -custom_width 1000",
- "\n Flag that tells the agent to not show any destructive CTA (Button).\n Example: -buttonless"]
+ "\n Flag that tells the agent to not show any destructive CTA (Button).\n Example: -buttonless",
+ "\n Flag that tells the agent to not show the title bar.\n Example: -hide_title_bar"]
static let bannerDescriptions: [String] = ["[ banner | alert ]".red() + "\n The UI type of the notification.\n Example: -type banner",
"\n The title of the notification.\n Example: -title \"Title\"",
"\n The subtitle of the notification. It supports MarkDown text.\n Example: -subtitle \"Subtitle\"",
@@ -177,7 +180,8 @@ public final class HelpBuilder {
"\n Flag that tells the agent to show the suppression future notifications button on the UI. If checked by the user the agent will print \"suppressed\" in the output before exit.\n Example: -showSuppressionButton"]
static let popupSyntacticRules: [String] = ["At least one argument between" + " [ -title | -subtitle | -accessory_view_type + -accessory_view_payload ] ".red() + "must be defined to present a pop-up.",
"By default tertiary button is not destructive. Use " + "[ exitlink ]".red() + " cta type to trigger a link (optional) and make it destructive for the pop-up.",
- "In general if a call to action type is defined for a button, must be defined also the related payload. Except for the cta types " + "[ none | exitlink ]".red() + "."]
+ "In general if a call to action type is defined for a button, must be defined also the related payload. Except for the cta types " + "[ none | exitlink ]".red() + ".",
+ "To setup multiple accessory views on the pop-up use \"-accessory_view_type_N\" and \"-accessory_view_payload_N\" where N is an integer number that goes from 1 to 100. Use only sequential integers (CORRECT: 1, 2 ,3, 4, ... | WRONG: 1, 3, 5, 6, ...)."]
static let bannerSyntacticRules: [String] = ["At least one argument between" + " [ -title | -subtitle ] ".red() + "must be defined to present a banner.",
"In general if a call to action type is defined for a button, must be defined also the related payload."]
static let systemAlertSyntacticRules: [String] = ["At least one argument between" + " [ -title | -subtitle ] ".red() + "must be defined to present a systemAlert."]
@@ -436,7 +440,7 @@ public final class HelpBuilder {
}
static func printAppVersion() {
- print("IBM Notifier version: \(Bundle.main.infoDictionary!["CFBundleShortVersionString"] as? String ?? "Unknown")".bold())
+ print("IBM Notifier version: \(Bundle.main.infoDictionary!["CFBundleShortVersionString"] as? String ?? "Unknown") (\(Bundle.main.infoDictionary!["CFBundleVersion"] as? String ?? "Unknown"))\n© Copyright IBM Corp. 2021, 2024".bold())
}
}
diff --git a/Notification Agent Core/Controllers/NALogger.swift b/Notification Agent Core/Controllers/NALogger.swift
index c799f5f..1505894 100644
--- a/Notification Agent Core/Controllers/NALogger.swift
+++ b/Notification Agent Core/Controllers/NALogger.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 8/27/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Core/Controllers/TaskManager.swift b/Notification Agent Core/Controllers/TaskManager.swift
index 25cdb06..0d36771 100644
--- a/Notification Agent Core/Controllers/TaskManager.swift
+++ b/Notification Agent Core/Controllers/TaskManager.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 16/06/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Core/Extensions/EFCLController-Extension.swift b/Notification Agent Core/Extensions/EFCLController-Extension.swift
index ee2f3df..20f6b07 100644
--- a/Notification Agent Core/Extensions/EFCLController-Extension.swift
+++ b/Notification Agent Core/Extensions/EFCLController-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent Banner
//
// Created by Simone Martorelli on 28/06/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Core/Extensions/NotificationDispatch-Extension.swift b/Notification Agent Core/Extensions/NotificationDispatch-Extension.swift
index 6739900..cf4cd30 100644
--- a/Notification Agent Core/Extensions/NotificationDispatch-Extension.swift
+++ b/Notification Agent Core/Extensions/NotificationDispatch-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 28/06/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Core/Info.plist b/Notification Agent Core/Info.plist
index 1d19076..7f44a37 100644
--- a/Notification Agent Core/Info.plist
+++ b/Notification Agent Core/Info.plist
@@ -45,7 +45,7 @@
NSHumanReadableCopyright
- Copyright © 2021 IBM. All rights reserved.
+ © Copyright IBM Corp. 2021, 2024
NSMainStoryboardFile
Main
NSPrincipalClass
diff --git a/Notification Agent Core/Resources/NOTICES.rtf b/Notification Agent Core/Resources/NOTICES.rtf
index 415c231..b50b1bf 100644
--- a/Notification Agent Core/Resources/NOTICES.rtf
+++ b/Notification Agent Core/Resources/NOTICES.rtf
@@ -1,16 +1,48 @@
-{\rtf1\ansi\ansicpg1252\cocoartf2580
+{\rtf1\ansi\ansicpg1252\cocoartf2761
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 .AppleSystemUIFontMonospaced-Regular;}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
-\margl1440\margr1440\vieww9000\viewh8400\viewkind0
+\paperw12240\paperh15840\margl1440\margr1440\vieww37420\viewh21880\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0
-\f0\fs24 \cf0 Apache License\
+\f0\fs24 \cf0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\
+THIRD PARTY LICENSING NOTICES \
\
- Version 2.0, January 2004\
+This notices file contains details concerning notices applicable to third party code included in this product. \
\
- http://www.apache.org/licenses/\
+Notwithstanding the terms and conditions of any other agreement you\
+may have with IBM or any of its related or affiliated entities\
+(collectively "IBM"), the third party code identified below is subject\
+to the terms and conditions of the IBM license agreement for this product\
+and not the license terms that may be contained in the notices below.\
+\
+The notices are provided for informational purposes.\
+\
+Please note: This notices file may identify information that is not used\
+by, or that was not shipped with, this product as you installed it.\
+\
+IMPORTANT: IBM does not represent or warrant that the information in this\
+notices file is accurate. Third party websites are independent of IBM and\
+IBM does not represent or warrant that the information on any third party\
+website referenced in this notices file is accurate. IBM disclaims any\
+and all liability for errors and omissions or for any damages accruing\
+from the use of this notices file or its contents, including without\
+limitation URLs or references to any third party websites.\
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\
+\
+TABLE OF CONTENTS\
\
+THIS NOTICE FILE CONSISTS OF THE FOLLOWING SECTIONS:\
+\
+- Apache-2.0 License\
+\
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\
+\
+ Apache License\
+ \
+ Version 2.0, January 2004\
+\
+ http://www.apache.org/licenses/\
\
\
\
diff --git a/Notification Agent Onboarding Tests/NAOTriggersTests.swift b/Notification Agent Onboarding Tests/NAOTriggersTests.swift
index db053e4..ba4d8a2 100644
--- a/Notification Agent Onboarding Tests/NAOTriggersTests.swift
+++ b/Notification Agent Onboarding Tests/NAOTriggersTests.swift
@@ -3,7 +3,7 @@
// Notification Agent Onboarding Tests
//
// Created by Simone Martorelli on 01/06/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Onboarding UI Tests/NAOUITests.swift b/Notification Agent Onboarding UI Tests/NAOUITests.swift
index 5241646..94fddca 100644
--- a/Notification Agent Onboarding UI Tests/NAOUITests.swift
+++ b/Notification Agent Onboarding UI Tests/NAOUITests.swift
@@ -3,7 +3,7 @@
// Notification Agent Onboarding UI Tests
//
// Created by Simone Martorelli on 08/06/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
@@ -14,7 +14,7 @@ class NAOUITests: XCTestCase {
/// Testing simple Onboarding UI
func testA1Onboarding() throws {
let useCase = """
-{"notification":{"retainValues":false,"isMovable":true,"type":"onboarding","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"barTitle":"IBM Notifier","alwaysOnTop":false,"showSuppressionButton":false,"hideTitleBarButtons":false,"accessoryViews":[],"payload":{"pages":[{"infoSection":{"fields":[{"id":"BE8ACDC6-1159-421E-8ECA-F84B6B6785ED","label":"Some Description Some"},{"id":"4C045585-72C2-428B-B574-F55CF86E5DCA","label":"Some Description Some"},{"id":"EF546A45-64CA-473D-8BEA-4BF18C3D624F","label":"Some Description Some"}]},"topIcon":"square.and.arrow.up","subtitle":"First page's subtitle","title":"First page's title","body":"First page's body"},{"singleChange":true,"infoSection":{"fields":[{"label":"First label only","id":"031F8516-F122-4A7D-A53C-4F41C9A6C86A"},{"id":"9A2DE192-E512-484E-B42B-2215C84A0B97","label":"Second label only"},{"label":"Third label only","id":"B9F441F5-E55D-4C71-B0BC-53347A4CE6A4"}]},"tertiaryButton":{"callToActionPayload":"https:\\/\\/www.google.com","label":"Tertiary","callToActionType":"link"},"title":"Second page's title","body":"Second page's body","primaryButtonLabel":"Some","subtitle":"Second page's subtitle"},{"title":"Third page's title","body":"Third page's body","singleChange":true,"subtitle":"Third page's subtitle"},{"body":"Fourth page's body","subtitle":"Fourth page's subtitle","title":"Fourth page's title"}],"progressBarPayload":"automatic"},"silent":false,"forceLightMode":false,"disableQuit":false,"buttonless":false,"miniaturizable":false,"topicID":"untracked","notificationID":"untracked"},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+{"notification":{"retainValues":false,"isMovable":true,"type":"onboarding","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"barTitle":"IBM Notifier","alwaysOnTop":false,"showSuppressionButton":false,"hideTitleBarButtons":false,"accessoryViews":[],"payload":{"pages":[{"infoSection":{"fields":[{"id":"BE8ACDC6-1159-421E-8ECA-F84B6B6785ED","label":"Some Description Some"},{"id":"4C045585-72C2-428B-B574-F55CF86E5DCA","label":"Some Description Some"},{"id":"EF546A45-64CA-473D-8BEA-4BF18C3D624F","label":"Some Description Some"}]},"topIcon":"square.and.arrow.up","subtitle":"First page's subtitle","title":"First page's title","body":"First page's body"},{"singleChange":true,"infoSection":{"fields":[{"label":"First label only","id":"031F8516-F122-4A7D-A53C-4F41C9A6C86A"},{"id":"9A2DE192-E512-484E-B42B-2215C84A0B97","label":"Second label only"},{"label":"Third label only","id":"B9F441F5-E55D-4C71-B0BC-53347A4CE6A4"}]},"tertiaryButton":{"callToActionPayload":"https:\\/\\/www.google.com","label":"Tertiary","callToActionType":"link"},"title":"Second page's title","body":"Second page's body","primaryButtonLabel":"Some","subtitle":"Second page's subtitle"},{"title":"Third page's title","body":"Third page's body","singleChange":true,"subtitle":"Third page's subtitle"},{"body":"Fourth page's body","subtitle":"Fourth page's subtitle","title":"Fourth page's title"}],"progressBarPayload":"automatic"},"silent":false,"forceLightMode":false,"disableQuit":false,"buttonless":false,"hideTitleBar":false,"miniaturizable":false,"topicID":"untracked","notificationID":"untracked"},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -54,7 +54,7 @@ class NAOUITests: XCTestCase {
/// Testing simple Onboarding UI with accessory views.
func testA2Onboarding() throws {
let useCase = """
-{"notification":{"retainValues":false,"isMovable":true,"type":"onboarding","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"barTitle":"IBM Notifier","alwaysOnTop":false,"showSuppressionButton":false,"hideTitleBarButtons":false,"accessoryViews":[],"payload":{"pages":[{"accessoryViews":[[{"type":"image","payload":"https://compote.slate.com/images/697b023b-64a5-49a0-8059-27b963453fb1.gif?crop=780%2C520%2Cx0%2Cy0&width=2200"},{"type":"image","payload":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg"}]],"infoSection":{"fields":[{"id":"BE8ACDC6-1159-421E-8ECA-F84B6B6785ED","label":"Some Description Some"},{"id":"4C045585-72C2-428B-B574-F55CF86E5DCA","label":"Some Description Some"},{"id":"EF546A45-64CA-473D-8BEA-4BF18C3D624F","label":"Some Description Some"}]},"topIcon":"square.and.arrow.up","subtitle":"First page's subtitle","title":"First page's title","body":"First page's body"},{"singleChange":true,"infoSection":{"fields":[{"label":"First label only","id":"031F8516-F122-4A7D-A53C-4F41C9A6C86A"},{"id":"9A2DE192-E512-484E-B42B-2215C84A0B97","label":"Second label only"},{"label":"Third label only","id":"B9F441F5-E55D-4C71-B0BC-53347A4CE6A4"}]},"tertiaryButton":{"callToActionPayload":"https:\\/\\/www.google.com","label":"Tertiary","callToActionType":"link"},"title":"Second page's title","body":"Second page's body","primaryButtonLabel":"Some","subtitle":"Second page's subtitle"},{"title":"Third page's title","body":"Third page's body","singleChange":true,"subtitle":"Third page's subtitle"},{"body":"Fourth page's body","subtitle":"Fourth page's subtitle","title":"Fourth page's title"}],"progressBarPayload":"automatic"},"silent":false,"forceLightMode":false,"disableQuit":false,"buttonless":false,"miniaturizable":false,"topicID":"untracked","notificationID":"untracked"},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+{"notification":{"retainValues":false,"isMovable":true,"type":"onboarding","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"barTitle":"IBM Notifier","alwaysOnTop":false,"showSuppressionButton":false,"hideTitleBarButtons":false,"accessoryViews":[],"payload":{"pages":[{"accessoryViews":[[{"type":"image","payload":"https://compote.slate.com/images/697b023b-64a5-49a0-8059-27b963453fb1.gif?crop=780%2C520%2Cx0%2Cy0&width=2200"},{"type":"image","payload":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg"}]],"infoSection":{"fields":[{"id":"BE8ACDC6-1159-421E-8ECA-F84B6B6785ED","label":"Some Description Some"},{"id":"4C045585-72C2-428B-B574-F55CF86E5DCA","label":"Some Description Some"},{"id":"EF546A45-64CA-473D-8BEA-4BF18C3D624F","label":"Some Description Some"}]},"topIcon":"square.and.arrow.up","subtitle":"First page's subtitle","title":"First page's title","body":"First page's body"},{"singleChange":true,"infoSection":{"fields":[{"label":"First label only","id":"031F8516-F122-4A7D-A53C-4F41C9A6C86A"},{"id":"9A2DE192-E512-484E-B42B-2215C84A0B97","label":"Second label only"},{"label":"Third label only","id":"B9F441F5-E55D-4C71-B0BC-53347A4CE6A4"}]},"tertiaryButton":{"callToActionPayload":"https:\\/\\/www.google.com","label":"Tertiary","callToActionType":"link"},"title":"Second page's title","body":"Second page's body","primaryButtonLabel":"Some","subtitle":"Second page's subtitle"},{"title":"Third page's title","body":"Third page's body","singleChange":true,"subtitle":"Third page's subtitle"},{"body":"Fourth page's body","subtitle":"Fourth page's subtitle","title":"Fourth page's title"}],"progressBarPayload":"automatic"},"silent":false,"forceLightMode":false,"disableQuit":false,"buttonless":false,"hideTitleBar":false,"miniaturizable":false,"topicID":"untracked","notificationID":"untracked"},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
diff --git a/Notification Agent Onboarding/AppDelegate.swift b/Notification Agent Onboarding/AppDelegate.swift
index a19e5d2..10b7847 100644
--- a/Notification Agent Onboarding/AppDelegate.swift
+++ b/Notification Agent Onboarding/AppDelegate.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 18/06/2021.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Onboarding/Controllers/OnboardingInteractiveEFCLController.swift b/Notification Agent Onboarding/Controllers/OnboardingInteractiveEFCLController.swift
index cbe7590..cfbc2b6 100644
--- a/Notification Agent Onboarding/Controllers/OnboardingInteractiveEFCLController.swift
+++ b/Notification Agent Onboarding/Controllers/OnboardingInteractiveEFCLController.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 24/06/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Onboarding/Extensions/NotificationDispatch-Extension.swift b/Notification Agent Onboarding/Extensions/NotificationDispatch-Extension.swift
index 0d42731..a7d0df6 100644
--- a/Notification Agent Onboarding/Extensions/NotificationDispatch-Extension.swift
+++ b/Notification Agent Onboarding/Extensions/NotificationDispatch-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 5/27/21.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Onboarding/Info.plist b/Notification Agent Onboarding/Info.plist
index 411d179..accb4b9 100644
--- a/Notification Agent Onboarding/Info.plist
+++ b/Notification Agent Onboarding/Info.plist
@@ -32,7 +32,7 @@
NSHumanReadableCopyright
- Copyright © 2021 IBM. All rights reserved.
+ © Copyright IBM Corp. 2021, 2024
NSMainStoryboardFile
Main
NSPrincipalClass
diff --git a/Notification Agent Onboarding/Views/OnboardingView.swift b/Notification Agent Onboarding/Views/OnboardingView.swift
index 0635261..ebe2c92 100644
--- a/Notification Agent Onboarding/Views/OnboardingView.swift
+++ b/Notification Agent Onboarding/Views/OnboardingView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 03/04/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Onboarding/Views/OnboardingViewModel.swift b/Notification Agent Onboarding/Views/OnboardingViewModel.swift
index 5691428..9c74d4f 100644
--- a/Notification Agent Onboarding/Views/OnboardingViewModel.swift
+++ b/Notification Agent Onboarding/Views/OnboardingViewModel.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 03/04/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
// swiftlint:disable function_body_length
@@ -111,9 +111,10 @@ class OnboardingViewModel: NSObject, ObservableObject {
self.setTimeout(timeout)
}
NotificationCenter.default.addObserver(self, selector: #selector(repositionWindow), name: NSApplication.didChangeScreenParametersNotification, object: nil)
- if let progressBarPayload = onboardingData.progressBarPayload, onboardingData.pages.count > 1 {
+ if let progressBarPayload = onboardingData.progressBarPayload {
var payload: String = "/percent 0 /user_interaction_enabled true"
if progressBarPayload.lowercased() == "automatic" {
+ guard onboardingData.pages.count > 1 else { return }
automaticProgressBar = true
} else {
payload = progressBarPayload
diff --git a/Notification Agent Onboarding/Views/PageView.swift b/Notification Agent Onboarding/Views/PageView.swift
index 5860ad4..9cdcd95 100644
--- a/Notification Agent Onboarding/Views/PageView.swift
+++ b/Notification Agent Onboarding/Views/PageView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 05/04/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
@@ -57,6 +57,7 @@ struct PageView: View {
.padding(.bottom, 4)
.accessibilityAddTraits(.isHeader)
.accessibilityIdentifier("onboarding_title")
+ .padding(.horizontal, 30)
}
if #available(macOS 12, *) {
if let subtitle = viewModel.page.subtitle {
@@ -64,12 +65,14 @@ struct PageView: View {
.multilineTextAlignment(.center)
.accessibilityAddTraits(.isHeader)
.accessibilityIdentifier("onboarding_subtitle")
+ .padding(.horizontal, 30)
}
if let body = viewModel.page.body {
Text(AttributedString(markdownText(body).attributedString()))
.multilineTextAlignment(.leading)
.padding(.top, 8)
.accessibilityIdentifier("onboarding_body")
+ .padding(.horizontal, 30)
}
} else {
if let subtitle = viewModel.page.subtitle {
@@ -78,6 +81,7 @@ struct PageView: View {
.font(.title2)
.accessibilityAddTraits(.isHeader)
.accessibilityIdentifier("onboarding_subtitle")
+ .padding(.horizontal, 30)
}
if let body = viewModel.page.body {
Text(body)
@@ -85,6 +89,7 @@ struct PageView: View {
.multilineTextAlignment(.center)
.padding(.top, 8)
.accessibilityIdentifier("onboarding_body")
+ .padding(.horizontal, 30)
}
}
diff --git a/Notification Agent Onboarding/Views/PageViewModel.swift b/Notification Agent Onboarding/Views/PageViewModel.swift
index 5a7cebb..7f2c082 100644
--- a/Notification Agent Onboarding/Views/PageViewModel.swift
+++ b/Notification Agent Onboarding/Views/PageViewModel.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 26/04/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Popup Tests/NAPTriggersTests.swift b/Notification Agent Popup Tests/NAPTriggersTests.swift
index 7a122c2..3e3f609 100644
--- a/Notification Agent Popup Tests/NAPTriggersTests.swift
+++ b/Notification Agent Popup Tests/NAPTriggersTests.swift
@@ -3,7 +3,7 @@
// Notification Agent Popups Tests
//
// Created by Simone Martorelli on 01/06/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Popup UI Tests/NAPUITests.swift b/Notification Agent Popup UI Tests/NAPUITests.swift
index 85c71e8..e24bf7d 100644
--- a/Notification Agent Popup UI Tests/NAPUITests.swift
+++ b/Notification Agent Popup UI Tests/NAPUITests.swift
@@ -3,7 +3,7 @@
// Notification Agent Popup UI Tests
//
// Created by Simone Martorelli on 02/06/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
@@ -19,7 +19,7 @@ class NAPUITests: XCTestCase {
/// Icon: "default_icon"
func testA1Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some Title","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some Title","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -44,7 +44,7 @@ class NAPUITests: XCTestCase {
/// Main Button: Label --> Ok
func testA2Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -68,7 +68,7 @@ class NAPUITests: XCTestCase {
/// Main Button: Label --> Ok
func testA3Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","position":"top_left","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"IBM Notifier","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","position":"top_left","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"IBM Notifier","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -93,7 +93,7 @@ class NAPUITests: XCTestCase {
/// Main Button: Label --> Ok
func testA4Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":true,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"IBM N otifier","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":true,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"IBM N otifier","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -118,7 +118,7 @@ class NAPUITests: XCTestCase {
/// Secondary Button: Label --> Secondary
func testA5Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"IBM Notifier","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"IBM Notifier","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -146,7 +146,7 @@ class NAPUITests: XCTestCase {
/// Tertiary Button: Label --> Tertiary
func testA6Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"tertiaryButton":{"label":"Tertiary","callToActionType":"link","callToActionPayload":"https://www.google.com"},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"IBM Notifier","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"tertiaryButton":{"label":"Tertiary","callToActionType":"link","callToActionPayload":"https://www.google.com"},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"IBM Notifier","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -176,7 +176,7 @@ class NAPUITests: XCTestCase {
/// BarTitle: Some
func testA7Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -205,7 +205,7 @@ class NAPUITests: XCTestCase {
/// Icon: Circle SFSymbol
func testA8Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"circle","hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"circle","hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -235,7 +235,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: slideshow with 3 images
func testA9Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"circle","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"slideshow","payload":"/images https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg\\nhttps://cdn.pixabay.com/photo/2015/04/19/08/32/rose-729509_960_720.jpg\\nhttps://cdn.pixabay.com/photo/2015/07/05/10/18/tree-832079_960_720.jpg"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"circle","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"slideshow","payload":"/images https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg\\nhttps://cdn.pixabay.com/photo/2015/04/19/08/32/rose-729509_960_720.jpg\\nhttps://cdn.pixabay.com/photo/2015/07/05/10/18/tree-832079_960_720.jpg"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -273,7 +273,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: image
func testB1Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"circle","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"image","payload":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"circle","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"image","payload":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -302,7 +302,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: whitebox
func testB2Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"whitebox","payload":"Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"whitebox","payload":"Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -334,7 +334,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: timer
func testB3Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"accessoryViews":[{"type":"timer","payload":"Time left: %@"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false,"accessoryViews":[{"type":"timer","payload":"Time left: %@"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -369,7 +369,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: input
func testB4Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"input","payload":"/title AV Title /placeholder Some placeholder"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"input","payload":"/title AV Title /placeholder Some placeholder"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -404,7 +404,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: secureinput
func testB5Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"secureinput","payload":"/title AV Title /placeholder Some secure placeholder"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"secureinput","payload":"/title AV Title /placeholder Some secure placeholder"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -439,7 +439,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: progressbar
func testB6Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"progressbar","payload":"/percent 0 /top_message Top /bottom_message Bottom"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"progressbar","payload":"/percent 0 /top_message Top /bottom_message Bottom"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -469,7 +469,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: progressbar
func testB7Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"progressbar","payload":"/percent indeterminate /top_message Top /bottom_message Bottom"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"progressbar","payload":"/percent indeterminate /top_message Top /bottom_message Bottom"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -499,7 +499,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: progressbar
func testB8Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"progressbar","payload":"/percent 50 /top_message Top /bottom_message Bottom"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"progressbar","payload":"/percent 50 /top_message Top /bottom_message Bottom"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -529,7 +529,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: dropdown
func testB9Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"dropdown","payload":"/list First\\nSecond\\nThird /placeholder Pick something /title Some title"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"dropdown","payload":"/list First\\nSecond\\nThird /placeholder Pick something /title Some title"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -570,7 +570,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: dropdown
func testC1Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"dropdown","payload":"/list First\\nSecond\\nThird /placeholder Pick something"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"dropdown","payload":"/list First\\nSecond\\nThird /placeholder Pick something"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -611,7 +611,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: checklist
func testC2Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /title Some title"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /title Some title"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -650,7 +650,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: checklist
func testC3Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /required"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /required"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -687,7 +687,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: checklist
func testC4Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /complete"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /complete"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -729,7 +729,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: checklist
func testC5Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /preselection 1 /required"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /preselection 1 /required"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -764,7 +764,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: checklist - radio
func testC6Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /radio /required /title Some title"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /radio /required /title Some title"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -799,7 +799,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: checklist - radio
func testC7Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /radio"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /radio"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -830,7 +830,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: checklist - radio
func testC8Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /radio /preselection 1"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"checklist","payload":"/list First\\nSecond\\nThird /radio /preselection 1"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -862,7 +862,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: datepicker
func testC9Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"datepicker","payload":"/title Some title"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"datepicker","payload":"/title Some title"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -894,7 +894,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: datepicker
func testD1Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"datepicker","payload":"/title Some title /style graphical"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"datepicker","payload":"/title Some title /style graphical"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -925,7 +925,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: datepicker
func testD2Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"datepicker","payload":"/title Some title /style graphical /components date"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"datepicker","payload":"/title Some title /style graphical /components date"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -957,7 +957,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: whitebox
func testD3Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","customWidth":"1000","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"whitebox","payload":"Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","customWidth":"1000","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"whitebox","payload":"Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -989,7 +989,7 @@ class NAPUITests: XCTestCase {
/// Unmovable: true
func testD4Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":false,"disableQuit":false,"buttonless":false, "accessoryViews":[]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":false,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -1026,7 +1026,7 @@ class NAPUITests: XCTestCase {
/// Unmovable: false
func testD5Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"timeout":"30","barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -1061,7 +1061,7 @@ class NAPUITests: XCTestCase {
/// Buttonless: true
func testD6Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some Title","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":true},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some Title","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":true,"hideTitleBar":false},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -1088,7 +1088,7 @@ class NAPUITests: XCTestCase {
/// AccessoryView: image with a GIF
func testD7Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"circle","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"image","payload":"https://compote.slate.com/images/697b023b-64a5-49a0-8059-27b963453fb1.gif?crop=780%2C520%2Cx0%2Cy0&width=2200"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"circle","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"image","payload":"https://compote.slate.com/images/697b023b-64a5-49a0-8059-27b963453fb1.gif?crop=780%2C520%2Cx0%2Cy0&width=2200"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -1119,7 +1119,7 @@ class NAPUITests: XCTestCase {
/// Secondary AccessoryView: image
func testD8Popup() throws {
let useCase = """
- {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"circle","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false, "accessoryViews":[{"type":"image","payload":"https://compote.slate.com/images/697b023b-64a5-49a0-8059-27b963453fb1.gif?crop=780%2C520%2Cx0%2Cy0&width=2200"},{"type":"image","payload":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"iconPath":"circle","hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"image","payload":"https://compote.slate.com/images/697b023b-64a5-49a0-8059-27b963453fb1.gif?crop=780%2C520%2Cx0%2Cy0&width=2200"},{"type":"image","payload":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
""" // pragma: allowlist-secret
if let useCaseData = useCase.data(using: .utf8) {
let app = XCUIApplication()
@@ -1139,5 +1139,85 @@ class NAPUITests: XCTestCase {
XCTAssert(false, "Failed to encode the usecase.")
}
}
+
+ /// Testing simple Pop-up with:
+ /// Title: This is a title
+ /// Main Button: Label --> Ok
+ /// BarTitle: hidden
+ /// Icon: "default_icon"
+ func testD9Popup() throws {
+ let useCase = """
+ {"notification":{"topicID":"untracked","mainButton":{"label":"OK","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"accessoryViews":[],"alwaysOnTop":false,"type":"popup","title":"This is a title","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some Title","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":true},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ """ // pragma: allowlist-secret
+ if let useCaseData = useCase.data(using: .utf8) {
+ let app = XCUIApplication()
+ app.launchArguments = [useCaseData.base64EncodedString()]
+ app.launch()
+
+ XCTAssert(app.buttons["main_button"].exists)
+ XCTAssertEqual(app.buttons["main_button"].title, "OK")
+ XCTAssertEqual(app.images["popup_icon"].label, "default_icon")
+ XCTAssert(app.staticTexts["popup_title"].exists)
+ XCTAssertEqual(app.staticTexts["popup_title"].value as? String ?? "", "This is a title")
+ XCTAssertEqual(app.windows["main_window"].title, "")
+ app.terminate()
+ } else {
+ XCTAssert(false, "Failed to encode the usecase.")
+ }
+ }
+
+ /// Testing Pop-up with:
+ /// Title: This is a title
+ /// Subtitle: This is a subtitle
+ /// Main Button: Primary
+ /// Secondary Button: Secondary
+ /// AccessoryView: dropdown
+ /// AccessoryView1: datepicker
+ /// AccessoryView2: whitebox
+ /// AccessoryView3: GIF
+ /// AccessoryView4: image
+ func testE1Popup() throws {
+ let useCase = """
+ {"notification":{"topicID":"untracked","mainButton":{"label":"Primary","callToActionType":"none","callToActionPayload":""},"secondaryButton":{"label":"Secondary","callToActionType":"none","callToActionPayload":""},"hideTitleBarButtons":false,"retainValues":false,"alwaysOnTop":false,"type":"popup","title":"This is a title","subtitle":"This is a subtitle","silent":false,"showSuppressionButton":false,"miniaturizable":false,"barTitle":"Some","forceLightMode":false,"notificationID":"untracked","isMovable":true,"disableQuit":false,"buttonless":false,"hideTitleBar":false, "accessoryViews":[{"type":"dropdown","payload":"/list First\\nSecond\\nThird /placeholder Pick something /title Some title"},{"type":"datepicker","payload":"/title Some title /style graphical /components date"},{"type":"whitebox","payload":"Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view"},{"type":"image","payload":"https://compote.slate.com/images/697b023b-64a5-49a0-8059-27b963453fb1.gif?crop=780%2C520%2Cx0%2Cy0&width=2200"},{"type":"image","payload":"https://cdn.pixabay.com/photo/2015/04/23/22/00/tree-736885_1280.jpg"}]},"settings":{"isVerboseModeEnabled":false,"environment":"prod"}}
+ """ // pragma: allowlist-secret
+ if let useCaseData = useCase.data(using: .utf8) {
+ let app = XCUIApplication()
+ app.launchArguments = [useCaseData.base64EncodedString()]
+ app.launch()
+ XCTAssert(app.buttons["main_button"].exists)
+ XCTAssertEqual(app.buttons["main_button"].title, "Primary")
+ XCTAssert(app.buttons["secondary_button"].exists)
+ XCTAssertEqual(app.buttons["secondary_button"].label, "Secondary")
+ XCTAssert(app.staticTexts["popup_title"].exists)
+ XCTAssertEqual(app.staticTexts["popup_title"].value as? String ?? "", "This is a title")
+ XCTAssert(app.staticTexts["popup_subtitle"].exists)
+ XCTAssertEqual(app.staticTexts["popup_subtitle"].value as? String ?? "", "This is a subtitle")
+ XCTAssertEqual(app.staticTexts["picker_accessory_view_title"].value as? String ?? "", "Some title")
+ XCTAssert(app.popUpButtons["picker_accessory_view_dropdown"].exists)
+ XCTAssertEqual(app.popUpButtons["picker_accessory_view_dropdown"].value as? String, "Pick something")
+ app.popUpButtons["picker_accessory_view_dropdown"].click()
+ XCTAssert(app.popUpButtons["picker_accessory_view_dropdown"].menuItems["First"].exists)
+ app.popUpButtons["picker_accessory_view_dropdown"].menuItems["First"].click()
+ sleep(1)
+ XCTAssertEqual(app.popUpButtons["picker_accessory_view_dropdown"].value as? String, "First")
+ app.popUpButtons["picker_accessory_view_dropdown"].click()
+ XCTAssert(app.popUpButtons["picker_accessory_view_dropdown"].menuItems["Second"].exists)
+ app.popUpButtons["picker_accessory_view_dropdown"].menuItems["Second"].click()
+ sleep(1)
+ XCTAssertEqual(app.popUpButtons["picker_accessory_view_dropdown"].value as? String, "Second")
+ XCTAssert(app.staticTexts["datepicker_accessory_view_title"].exists)
+ XCTAssertEqual(app.staticTexts["datepicker_accessory_view_title"].value as? String ?? "", "Some title")
+ XCTAssert(app.datePickers["datepicker_accessory_view_picker"].exists)
+ XCTAssert(app.datePickers["datepicker_accessory_view_picker"].isEnabled)
+ XCTAssertNotNil(app.datePickers["datepicker_accessory_view_picker"].value)
+ XCTAssert(app.textViews["markdown_accessory_view"].exists)
+ XCTAssertEqual(app.textViews["markdown_accessory_view"].value as? String ?? "", "Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view Some text in the whitebox accessory view")
+ XCTAssert(app.images["image_accessory_view"].exists)
+ XCTAssert(app.staticTexts["picker_accessory_view_title"].exists)
+ app.terminate()
+ } else {
+ XCTAssert(false, "Failed to encode the usecase.")
+ }
+ }
}
// swiftlint:enable type_body_length file_length
diff --git a/Notification Agent Popups/AppDelegate.swift b/Notification Agent Popups/AppDelegate.swift
index f12eb6c..3e5376b 100644
--- a/Notification Agent Popups/AppDelegate.swift
+++ b/Notification Agent Popups/AppDelegate.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 18/06/2021.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Popups/Controllers/PopupInteractiveEFCLController.swift b/Notification Agent Popups/Controllers/PopupInteractiveEFCLController.swift
index 21a8e83..ad25487 100644
--- a/Notification Agent Popups/Controllers/PopupInteractiveEFCLController.swift
+++ b/Notification Agent Popups/Controllers/PopupInteractiveEFCLController.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 24/06/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Popups/Controllers/SystemAlertController.swift b/Notification Agent Popups/Controllers/SystemAlertController.swift
index 8446372..756c026 100644
--- a/Notification Agent Popups/Controllers/SystemAlertController.swift
+++ b/Notification Agent Popups/Controllers/SystemAlertController.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 17/08/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Popups/Extensions/NotificationDispatch-Extension.swift b/Notification Agent Popups/Extensions/NotificationDispatch-Extension.swift
index a1cee12..3e944e7 100644
--- a/Notification Agent Popups/Extensions/NotificationDispatch-Extension.swift
+++ b/Notification Agent Popups/Extensions/NotificationDispatch-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 5/27/21.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
@@ -31,7 +31,12 @@ extension NotificationDispatch {
let contentView = PopUpView(viewModel: viewModel)
let hostingView = NSHostingView(rootView: contentView)
mainWindow.contentView = hostingView
- mainWindow.title = object.barTitle ?? ConfigurableParameters.defaultPopupBarTitle
+ if object.hideTitleBar {
+ mainWindow.title = ""
+ mainWindow.titlebarAppearsTransparent = true
+ } else {
+ mainWindow.title = object.barTitle ?? ConfigurableParameters.defaultPopupBarTitle
+ }
mainWindow.setWindowPosition(object.position ?? .center)
mainWindow.styleMask.remove(.resizable)
mainWindow.styleMask.remove(.closable)
diff --git a/Notification Agent Popups/Info.plist b/Notification Agent Popups/Info.plist
index 411d179..accb4b9 100644
--- a/Notification Agent Popups/Info.plist
+++ b/Notification Agent Popups/Info.plist
@@ -32,7 +32,7 @@
NSHumanReadableCopyright
- Copyright © 2021 IBM. All rights reserved.
+ © Copyright IBM Corp. 2021, 2024
NSMainStoryboardFile
Main
NSPrincipalClass
diff --git a/Notification Agent Popups/Views/BodyLabels.swift b/Notification Agent Popups/Views/BodyLabels.swift
index 7dce2d8..298c1b6 100644
--- a/Notification Agent Popups/Views/BodyLabels.swift
+++ b/Notification Agent Popups/Views/BodyLabels.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 22/11/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Notification Agent Popups/Views/PopUpView.swift b/Notification Agent Popups/Views/PopUpView.swift
index a46a46f..c80dbb5 100644
--- a/Notification Agent Popups/Views/PopUpView.swift
+++ b/Notification Agent Popups/Views/PopUpView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 04/11/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
@@ -54,26 +54,19 @@ struct PopUpView: View {
subtitle: viewModel.notificationObject.subtitle)
.environmentObject(viewModel.viewSpec)
.padding(.bottom, 8)
- if let primaryAV = viewModel.primaryAccessoryView {
- switch primaryAV.accessoryView.type {
- case .timer:
- Text($viewModel.primaryAVInput.wrappedValue.localized)
- .fixedSize(horizontal: false, vertical: true)
- .accessibilityIdentifier("timer_accessory_view")
- default:
- AccessoryViewWrapper(source: primaryAV)
- .environmentObject(viewModel.viewSpec)
- }
- }
- if let secondaryAV = viewModel.secondaryAccessoryView {
- switch secondaryAV.accessoryView.type {
- case .timer:
- Text($viewModel.secondaryAVInput.wrappedValue.localized)
- .fixedSize(horizontal: false, vertical: true)
- .accessibilityIdentifier("timer_accessory_view")
- default:
- AccessoryViewWrapper(source: secondaryAV)
- .environmentObject(viewModel.viewSpec)
+ if !viewModel.accessoryViews.isEmpty {
+ VStack(alignment: .leading) {
+ ForEach(viewModel.accessoryViews, id: \.hashValue) { accessoryView in
+ switch accessoryView.source.accessoryView.type {
+ case .timer:
+ Text($viewModel.timerAVInput.wrappedValue.localized)
+ .fixedSize(horizontal: false, vertical: true)
+ .accessibilityIdentifier("timer_accessory_view")
+ default:
+ accessoryView
+ .environmentObject(viewModel.viewSpec)
+ }
+ }
}
}
Spacer(minLength: 12)
@@ -91,13 +84,13 @@ struct PopUpView: View {
.accessibilityIdentifier("secondary_button")
StandardButton(keyboardShortcut: .return, action: {
self.viewModel.didClickButton(of: .main)
- }, label: viewModel.notificationObject.mainButton.label, buttonState: $viewModel.mainButtonState)
+ }, label: viewModel.notificationObject.mainButton.label, buttonState: $viewModel.primaryButtonState)
.accessibilityHint(viewModel.notificationObject.mainButton.callToActionType.accessibilityHint)
.accessibilityIdentifier("main_button")
}
}
}
- .padding(EdgeInsets(top: 16, leading: 16, bottom: 16, trailing: 16))
+ .padding(EdgeInsets(top: viewModel.notificationObject.hideTitleBar ? -10 : 16, leading: 16, bottom: 16, trailing: 16))
.frame(width: viewModel.viewSpec.mainViewWidth)
}
}
diff --git a/Notification Agent Popups/Views/PopUpViewModel.swift b/Notification Agent Popups/Views/PopUpViewModel.swift
index 639c488..7674789 100644
--- a/Notification Agent Popups/Views/PopUpViewModel.swift
+++ b/Notification Agent Popups/Views/PopUpViewModel.swift
@@ -3,10 +3,10 @@
// Notification Agent
//
// Created by Simone Martorelli on 04/11/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
-// swiftlint:disable type_body_length file_length
+// swiftlint:disable type_body_length
import SwiftUI
import Combine
@@ -66,8 +66,6 @@ class PopUpViewModel: ObservableObject {
// MARK: - Variables
var warningButton: DynamicNotificationButton?
- var primaryAccessoryView: AccessoryViewSource?
- var secondaryAccessoryView: AccessoryViewSource?
var replyHandler = ReplyHandler.shared
var helpButtonState: SwiftUIButtonState
var tertiaryButtonState: SwiftUIButtonState
@@ -78,25 +76,23 @@ class PopUpViewModel: ObservableObject {
var timeoutTimer: Timer?
var countDown: Int = 0
var viewSpec: ViewSpec
+ var primaryButtonStates: [SwiftUIButtonState] = []
+ var secondaryButtonStates: [SwiftUIButtonState] = []
+ var accessoryViews: [AccessoryViewWrapper] = []
+ var outputs: [String] = []
// MARK: - Published Variables
- @Published var mainButtonState: SwiftUIButtonState
+ @Published var primaryButtonState: SwiftUIButtonState
@Published var secondaryButtonState: SwiftUIButtonState
@Published var warningButtonState: SwiftUIButtonState
-
- @Published var primaryAVOutput: String = ""
- @Published var primaryAVInput: String = ""
- @Published var secondaryAVOutput: String = ""
- @Published var secondaryAVInput: String = ""
+ @Published var timerAVInput: String = ""
@Published var primaryAVMainButtonState: SwiftUIButtonState = .enabled
@Published var primaryAVSecButtonState: SwiftUIButtonState = .enabled
@Published var secondaryAVMainButtonState: SwiftUIButtonState = .enabled
@Published var secondaryAVSecButtonState: SwiftUIButtonState = .enabled
-
@Published var showHelpButtonPopover: Bool = false
@Published var showWarningButtonPopover: Bool = false
-
@Published var mainButton: NotificationButton
// MARK: - Initializers
@@ -105,7 +101,7 @@ class PopUpViewModel: ObservableObject {
self.notificationObject = notificationObject
self.window = window
mainButton = notificationObject.mainButton
- mainButtonState = notificationObject.buttonless ? .hidden : .enabled
+ primaryButtonState = notificationObject.buttonless ? .hidden : .enabled
secondaryButtonState = notificationObject.secondaryButton != nil ? (notificationObject.buttonless ? .hidden : .enabled) : .hidden
tertiaryButtonState = notificationObject.tertiaryButton != nil ? .enabled : .hidden
helpButtonState = notificationObject.helpButton != nil ? .enabled : .hidden
@@ -143,7 +139,7 @@ class PopUpViewModel: ObservableObject {
switch type {
case .main:
printOutputIfAvailable()
- triggerAction(ofType: mainButtonState == .cancel ? .cancel : .main)
+ triggerAction(ofType: primaryButtonState == .cancel ? .cancel : .main)
case .secondary:
if let retainValues = notificationObject.retainValues, retainValues {
printOutputIfAvailable()
@@ -174,91 +170,77 @@ class PopUpViewModel: ObservableObject {
}
}
- /// Validate the destructive buttons appearance on the dialog.
- func checkDestructiveButtonVisibility() {
- mainButtonState = {
- guard primaryAccessoryView != nil else { return .enabled }
- guard secondaryAccessoryView != nil else { return primaryAVMainButtonState }
- guard !notificationObject.buttonless else { return .hidden }
- switch primaryAVMainButtonState {
- case .enabled:
- return secondaryAVMainButtonState
- case .disabled:
- return secondaryAVMainButtonState != .hidden ? .disabled : .hidden
- case .hidden:
- return .hidden
- case .cancel:
- return .cancel
- }
- }()
- guard notificationObject.secondaryButton != nil else { return }
- secondaryButtonState = {
- guard primaryAccessoryView != nil else { return .enabled }
- guard secondaryAccessoryView != nil else { return primaryAVSecButtonState }
- guard !notificationObject.buttonless else { return .hidden }
- switch primaryAVSecButtonState {
- case .enabled:
- return secondaryAVSecButtonState
- case .disabled:
- return secondaryAVSecButtonState != .hidden ? .disabled : .hidden
- case .hidden:
- return .hidden
- case .cancel:
- return .hidden
- }
- }()
- }
-
// MARK: - Private Methods
/// This method wrap and bind the accessory views - if present - with the view model
/// in order to be able to react to changes occurred in those accessory views.
private func setupAccessoryViews() {
- if let avs = notificationObject.accessoryViews, avs.count > 0 {
- if avs[0].type == .dropdown {
- primaryAVOutput = "-1"
- }
- primaryAccessoryView = AccessoryViewSource(output: Binding(get: {
- return self.primaryAVOutput
+ for (item, accessoryView) in (notificationObject.accessoryViews ?? []).enumerated() {
+ var primaryButtonState: SwiftUIButtonState = .enabled
+ primaryButtonStates.append(primaryButtonState)
+ var secondaryButtonState: SwiftUIButtonState = .enabled
+ secondaryButtonStates.append(secondaryButtonState)
+ self.outputs.append(accessoryView.type == .dropdown ? "-1" : "")
+
+ accessoryViews.append(AccessoryViewWrapper(source: AccessoryViewSource(output: Binding(get: {
+ return self.outputs[item]
}, set: { newValue, _ in
- self.primaryAVOutput = newValue
- self.checkDestructiveButtonVisibility()
+ guard newValue != self.outputs[item] else { return }
+ self.outputs[item] = newValue
+ self.evaluateBindings()
}), mainButtonState: Binding(get: {
- return self.primaryAVMainButtonState
+ return primaryButtonState
}, set: { newValue, _ in
- self.primaryAVMainButtonState = newValue
- self.checkDestructiveButtonVisibility()
+ guard newValue != primaryButtonState else { return }
+ primaryButtonState = newValue
+ self.evaluateBindings()
}), secondaryButtonState: Binding(get: {
- return self.primaryAVSecButtonState
+ return secondaryButtonState
}, set: { newValue, _ in
- self.primaryAVSecButtonState = newValue
- self.checkDestructiveButtonVisibility()
- }), accessoryView: avs[0])
- if avs.count > 1 {
- if avs[1].type == .dropdown {
- secondaryAVOutput = "-1"
- }
- secondaryAccessoryView = AccessoryViewSource(output: Binding(get: {
- return self.secondaryAVOutput
- }, set: { newValue, _ in
- self.secondaryAVOutput = newValue
- self.checkDestructiveButtonVisibility()
- }), mainButtonState: Binding(get: {
- return self.secondaryAVMainButtonState
- }, set: { newValue, _ in
- self.secondaryAVMainButtonState = newValue
- self.checkDestructiveButtonVisibility()
- }), secondaryButtonState: Binding(get: {
- return self.secondaryAVSecButtonState
- }, set: { newValue, _ in
- self.secondaryAVSecButtonState = newValue
- self.checkDestructiveButtonVisibility()
- }), accessoryView: avs[1])
- }
+ guard newValue != secondaryButtonState else { return }
+ secondaryButtonState = newValue
+ self.evaluateBindings()
+ }), accessoryView: accessoryView)))
+
}
setTimeoutIfNeeded()
}
+ /// Evaluate the current state of the binded variables.
+ private func evaluateBindings() {
+ var localPrimaryButtonState: SwiftUIButtonState = .enabled
+ var localSecondaryButtonState: SwiftUIButtonState = .enabled
+ for acv in accessoryViews {
+ switch acv.source.mainButtonState {
+ case .enabled:
+ break
+ case .disabled:
+ localPrimaryButtonState = .disabled
+ case .hidden:
+ localPrimaryButtonState = .hidden
+ case .cancel:
+ break
+ }
+ switch acv.source.secondaryButtonState {
+ case .enabled:
+ break
+ case .disabled:
+ localSecondaryButtonState = .disabled
+ case .hidden:
+ localSecondaryButtonState = .hidden
+ case .cancel:
+ break
+ }
+ }
+ if self.primaryButtonState != localPrimaryButtonState {
+ self.primaryButtonState = localPrimaryButtonState
+ }
+ guard notificationObject.secondaryButton != nil else { return }
+ if self.secondaryButtonState != localSecondaryButtonState {
+ self.secondaryButtonState = localSecondaryButtonState
+ }
+ }
+
/// Send the relative user action to the replyHandler.
/// - Parameter type: the user action.
private func triggerAction(ofType type: UserReplyType) {
@@ -291,19 +273,11 @@ class PopUpViewModel: ObservableObject {
private func setTimeoutIfNeeded() {
if let timeoutString = notificationObject.timeout, let timeout = Int(timeoutString) {
countDown = timeout
- if let accv = notificationObject.accessoryViews?[safe: 0], let payload = accv.payload, accv.type == .timer {
- primaryAVInput = String.init(format: payload, arguments: [timeout.timeFormattedString])
+ if let accv = accessoryViews.first(where: { $0.source.accessoryView.type == .timer }), let payload = accv.source.accessoryView.payload {
+ timerAVInput = String.init(format: payload, arguments: [timeout.timeFormattedString])
timeoutTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true, block: { _ in
self.updateCountdown()
- self.primaryAVInput = String(format: payload, arguments: [self.countDown.timeFormattedString])
- })
- return
- }
- if let accv = notificationObject.accessoryViews?[safe: 1], let payload = accv.payload, accv.type == .timer {
- secondaryAVInput = String.init(format: payload, arguments: [timeout.timeFormattedString])
- timeoutTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true, block: { _ in
- self.updateCountdown()
- self.secondaryAVInput = String(format: payload, arguments: [self.countDown.timeFormattedString])
+ self.timerAVInput = String(format: payload, arguments: [self.countDown.timeFormattedString])
})
return
}
@@ -353,33 +327,20 @@ class PopUpViewModel: ObservableObject {
}
private func printOutputIfAvailable() {
- guard let primaryAccessoryView = self.primaryAccessoryView else { return }
- switch primaryAccessoryView.accessoryView.type {
- case .checklist:
- if let payload = primaryAccessoryView.accessoryView.payload,
- !payload.localizedStandardContains("/complete") && !primaryAVOutput.isEmpty && !(primaryAVOutput == "-1") {
- print(primaryAVOutput)
- }
- case .input, .secureinput, .securedinput, .dropdown, .datepicker :
- if !primaryAVOutput.isEmpty {
- print(primaryAVOutput)
- }
- default:
- break
- }
- guard let secondaryAccessoryView = self.secondaryAccessoryView else { return }
- switch secondaryAccessoryView.accessoryView.type {
- case .checklist:
- if let payload = secondaryAccessoryView.accessoryView.payload,
- !payload.localizedStandardContains("/complete") && !secondaryAVOutput.isEmpty && !(secondaryAVOutput == "-1") {
- print(secondaryAVOutput)
- }
- case .input, .secureinput, .securedinput, .dropdown, .datepicker :
- if !secondaryAVOutput.isEmpty {
- print(secondaryAVOutput)
+ for (index, accessoryView) in accessoryViews.enumerated() {
+ switch accessoryView.source.accessoryView.type {
+ case .checklist:
+ if let payload = accessoryView.source.accessoryView.payload,
+ !payload.localizedStandardContains("/complete") && !outputs[index].isEmpty && !(outputs[index] == "-1") {
+ print(outputs[index])
+ }
+ case .input, .secureinput, .securedinput, .dropdown, .datepicker :
+ if !outputs[index].isEmpty {
+ print(outputs[index])
+ }
+ default:
+ break
}
- default:
- break
}
}
@@ -402,4 +363,4 @@ extension PopUpViewModel: DynamicNotificationButtonDelegate {
}
}
-// swiftlint:enable type_body_length file_length
+// swiftlint:enable type_body_length
diff --git a/Notification Agent.xcodeproj/project.pbxproj b/Notification Agent.xcodeproj/project.pbxproj
index 6397916..0a7113c 100644
--- a/Notification Agent.xcodeproj/project.pbxproj
+++ b/Notification Agent.xcodeproj/project.pbxproj
@@ -2779,7 +2779,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -2789,7 +2789,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.alert;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2809,7 +2809,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -2819,7 +2819,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.alert;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2839,7 +2839,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -2849,7 +2849,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.popup;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2869,7 +2869,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -2879,7 +2879,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.popup;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2899,7 +2899,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -2909,7 +2909,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.onboarding;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -2928,7 +2928,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -2938,7 +2938,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.onboarding;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -2957,7 +2957,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -2967,7 +2967,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.banner;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -2987,7 +2987,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -2997,7 +2997,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier.banner;
PRODUCT_MODULE_NAME = "$(TARGET_NAME:c99extidentifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -3043,7 +3043,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
@@ -3065,7 +3065,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
@@ -3110,7 +3110,7 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
@@ -3126,7 +3126,7 @@
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 13.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
SDKROOT = macosx;
@@ -3144,7 +3144,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -3155,7 +3155,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -3174,7 +3174,7 @@
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = YES;
@@ -3185,7 +3185,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 11.0;
- MARKETING_VERSION = 3.1.0;
+ MARKETING_VERSION = 3.2.0;
ONLY_ACTIVE_ARCH = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.ibm.cio.notifier;
PRODUCT_NAME = "$(TARGET_NAME)";
@@ -3201,13 +3201,13 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Core-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3223,13 +3223,13 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Core-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3245,13 +3245,13 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Alert-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3267,13 +3267,13 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Alert-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3294,7 +3294,7 @@
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Banner-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3315,7 +3315,7 @@
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Banner-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3331,13 +3331,13 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Popup-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3353,13 +3353,13 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Popup-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3374,13 +3374,13 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Popup-UI-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3395,13 +3395,13 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Popup-UI-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3417,13 +3417,13 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Onboarding-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3439,13 +3439,13 @@
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Manual;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = "";
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Onboarding-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -3460,12 +3460,12 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Onboarding-UI-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
@@ -3479,12 +3479,12 @@
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "gnu++17";
CODE_SIGN_STYLE = Automatic;
- CURRENT_PROJECT_VERSION = 110;
+ CURRENT_PROJECT_VERSION = 125;
DEAD_CODE_STRIPPING = YES;
ENABLE_TESTING_SEARCH_PATHS = YES;
GENERATE_INFOPLIST_FILE = YES;
MACOSX_DEPLOYMENT_TARGET = 12.0;
- MARKETING_VERSION = 3.0.3;
+ MARKETING_VERSION = 3.2.0;
PRODUCT_BUNDLE_IDENTIFIER = "com.ibm.cio.be.Notification-Agent-Onboarding-UI-Tests";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = NO;
@@ -3621,7 +3621,7 @@
repositoryURL = "https://github.com/NuPlay/RichText.git";
requirement = {
kind = upToNextMajorVersion;
- minimumVersion = 2.0.0;
+ minimumVersion = 2.4.1;
};
};
B97F10C225DD682900E15245 /* XCRemoteSwiftPackageReference "SwiftyMarkdown" */ = {
diff --git a/Shared/Controllers/BackPanelController.swift b/Shared/Controllers/BackPanelController.swift
index 1332be0..4d76b97 100644
--- a/Shared/Controllers/BackPanelController.swift
+++ b/Shared/Controllers/BackPanelController.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 23/05/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Controllers/Context.swift b/Shared/Controllers/Context.swift
index 306f8a0..25ca266 100644
--- a/Shared/Controllers/Context.swift
+++ b/Shared/Controllers/Context.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 31/03/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Controllers/EFCLController.swift b/Shared/Controllers/EFCLController.swift
index 93dad24..111e1f4 100644
--- a/Shared/Controllers/EFCLController.swift
+++ b/Shared/Controllers/EFCLController.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 8/26/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
@@ -37,7 +37,8 @@ class EFCLController {
"show_suppression_button",
"unmovable",
"disable_quit",
- "buttonless"]
+ "buttonless",
+ "hide_title_bar"]
// MARK: - Variables
let context = Context.main
diff --git a/Shared/Controllers/Environment.swift b/Shared/Controllers/Environment.swift
index ba46f28..a0ba962 100644
--- a/Shared/Controllers/Environment.swift
+++ b/Shared/Controllers/Environment.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 28/04/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Controllers/InteractiveEFCLContoller.swift b/Shared/Controllers/InteractiveEFCLContoller.swift
index 3c26c44..2298674 100644
--- a/Shared/Controllers/InteractiveEFCLContoller.swift
+++ b/Shared/Controllers/InteractiveEFCLContoller.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 10/15/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Controllers/NALogger.swift b/Shared/Controllers/NALogger.swift
index bdb17a9..159b6fa 100644
--- a/Shared/Controllers/NALogger.swift
+++ b/Shared/Controllers/NALogger.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 8/27/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Controllers/NotificationDispatch.swift b/Shared/Controllers/NotificationDispatch.swift
index 157cb3b..c78136d 100644
--- a/Shared/Controllers/NotificationDispatch.swift
+++ b/Shared/Controllers/NotificationDispatch.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 7/29/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Controllers/ReplyHandler.swift b/Shared/Controllers/ReplyHandler.swift
index e1ad53a..bd6b1ad 100644
--- a/Shared/Controllers/ReplyHandler.swift
+++ b/Shared/Controllers/ReplyHandler.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Jan Valentik on 25/08/2021.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Controllers/TaskManager.swift b/Shared/Controllers/TaskManager.swift
index d0c3770..5c38b83 100644
--- a/Shared/Controllers/TaskManager.swift
+++ b/Shared/Controllers/TaskManager.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 16/06/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Controllers/UserNotificationController.swift b/Shared/Controllers/UserNotificationController.swift
index f5df1e2..e83d244 100644
--- a/Shared/Controllers/UserNotificationController.swift
+++ b/Shared/Controllers/UserNotificationController.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 7/29/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
// swiftlint:disable function_body_length
@@ -56,7 +56,7 @@ class UserNotificationController: NSObject {
/// Show to the user a control center notification that describe the notification object received.
/// - Parameter notificationObject: the notification object that needs to be show.
func showBanner(_ notificationObject: NotificationObject) {
- if let workflow = notificationObject.workflow, (workflow == .resetBanners || workflow == .resetAlerts) {
+ if let workflow = notificationObject.workflow, workflow == .resetBanners || workflow == .resetAlerts {
UNUserNotificationCenter.current().removeAllPendingNotificationRequests()
UNUserNotificationCenter.current().removeAllDeliveredNotifications()
Utils.applicationExit(withReason: .untrackedSuccess)
diff --git a/Shared/Extensions/Binding-Extension.swift b/Shared/Extensions/Binding-Extension.swift
index c7aa8bb..8d5f1c6 100644
--- a/Shared/Extensions/Binding-Extension.swift
+++ b/Shared/Extensions/Binding-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 11/01/23.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/Collection-Extension.swift b/Shared/Extensions/Collection-Extension.swift
index 64db7ef..101b8b2 100644
--- a/Shared/Extensions/Collection-Extension.swift
+++ b/Shared/Extensions/Collection-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 10/05/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/Data-Extension.swift b/Shared/Extensions/Data-Extension.swift
index 17bd52e..f3589dc 100644
--- a/Shared/Extensions/Data-Extension.swift
+++ b/Shared/Extensions/Data-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 06/12/2023.
-// Copyright © 2023 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/Decodable-Extensions.swift b/Shared/Extensions/Decodable-Extensions.swift
index 410513f..bf37552 100644
--- a/Shared/Extensions/Decodable-Extensions.swift
+++ b/Shared/Extensions/Decodable-Extensions.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 22/01/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/EFCLController-Extension.swift b/Shared/Extensions/EFCLController-Extension.swift
index da02d15..c872636 100644
--- a/Shared/Extensions/EFCLController-Extension.swift
+++ b/Shared/Extensions/EFCLController-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 8/26/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/Int-Extension.swift b/Shared/Extensions/Int-Extension.swift
index 3ecedcd..493ae19 100644
--- a/Shared/Extensions/Int-Extension.swift
+++ b/Shared/Extensions/Int-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 8/10/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/NSColor-Extension.swift b/Shared/Extensions/NSColor-Extension.swift
index 8ea5cbc..9758198 100644
--- a/Shared/Extensions/NSColor-Extension.swift
+++ b/Shared/Extensions/NSColor-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 15/04/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/NSScreen-Extension.swift b/Shared/Extensions/NSScreen-Extension.swift
index b41d0e8..9063d7a 100644
--- a/Shared/Extensions/NSScreen-Extension.swift
+++ b/Shared/Extensions/NSScreen-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 27/04/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/Notification-Extension.swift b/Shared/Extensions/Notification-Extension.swift
index ed3eaef..547a28f 100644
--- a/Shared/Extensions/Notification-Extension.swift
+++ b/Shared/Extensions/Notification-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 7/10/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/String-Extension.swift b/Shared/Extensions/String-Extension.swift
index dcea0c7..1d43b97 100644
--- a/Shared/Extensions/String-Extension.swift
+++ b/Shared/Extensions/String-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 8/10/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/UNNotificationAttachment-Extension.swift b/Shared/Extensions/UNNotificationAttachment-Extension.swift
index dffb8e5..e68e821 100644
--- a/Shared/Extensions/UNNotificationAttachment-Extension.swift
+++ b/Shared/Extensions/UNNotificationAttachment-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 03/12/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Extensions/View-Extension.swift b/Shared/Extensions/View-Extension.swift
index a1e5934..1fa3d94 100644
--- a/Shared/Extensions/View-Extension.swift
+++ b/Shared/Extensions/View-Extension.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 06/02/23.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/ACVDecoder.swift b/Shared/Model/Common/ACVDecoder.swift
index 00189d7..1de8406 100644
--- a/Shared/Model/Common/ACVDecoder.swift
+++ b/Shared/Model/Common/ACVDecoder.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 15/12/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/AppComponent.swift b/Shared/Model/Common/AppComponent.swift
index fef46cc..93cc392 100644
--- a/Shared/Model/Common/AppComponent.swift
+++ b/Shared/Model/Common/AppComponent.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 25/06/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/Claims.swift b/Shared/Model/Common/Claims.swift
index b9f7b94..f14a691 100644
--- a/Shared/Model/Common/Claims.swift
+++ b/Shared/Model/Common/Claims.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 18/06/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/InfoSection.swift b/Shared/Model/Common/InfoSection.swift
index 6605f9e..6ed4d47 100644
--- a/Shared/Model/Common/InfoSection.swift
+++ b/Shared/Model/Common/InfoSection.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 8/18/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/LoadableNib.swift b/Shared/Model/Common/LoadableNib.swift
index 2e4f38b..2d020aa 100644
--- a/Shared/Model/Common/LoadableNib.swift
+++ b/Shared/Model/Common/LoadableNib.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 3/5/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/NAError.swift b/Shared/Model/Common/NAError.swift
index f38b762..6cbb2f6 100644
--- a/Shared/Model/Common/NAError.swift
+++ b/Shared/Model/Common/NAError.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 7/13/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/NAMedia.swift b/Shared/Model/Common/NAMedia.swift
index 4361963..5d1bfeb 100644
--- a/Shared/Model/Common/NAMedia.swift
+++ b/Shared/Model/Common/NAMedia.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 01/03/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/PickerItem.swift b/Shared/Model/Common/PickerItem.swift
index 1bc916b..e5d40f3 100644
--- a/Shared/Model/Common/PickerItem.swift
+++ b/Shared/Model/Common/PickerItem.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 15/12/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/SharedSettings.swift b/Shared/Model/Common/SharedSettings.swift
index 90fc247..f1df898 100644
--- a/Shared/Model/Common/SharedSettings.swift
+++ b/Shared/Model/Common/SharedSettings.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 22/06/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/TaskObject.swift b/Shared/Model/Common/TaskObject.swift
index b23ed2a..7ea7445 100644
--- a/Shared/Model/Common/TaskObject.swift
+++ b/Shared/Model/Common/TaskObject.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 22/06/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/Token.swift b/Shared/Model/Common/Token.swift
index 1d0b475..b151fff 100644
--- a/Shared/Model/Common/Token.swift
+++ b/Shared/Model/Common/Token.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Jan Valentik on 20/11/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/Common/UserReplyType.swift b/Shared/Model/Common/UserReplyType.swift
index 5fddb14..662a5bb 100644
--- a/Shared/Model/Common/UserReplyType.swift
+++ b/Shared/Model/Common/UserReplyType.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 17/06/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/UIObjects/ConfigurableParameters.swift b/Shared/Model/UIObjects/ConfigurableParameters.swift
index d5abf31..8fe7046 100644
--- a/Shared/Model/UIObjects/ConfigurableParameters.swift
+++ b/Shared/Model/UIObjects/ConfigurableParameters.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 9/10/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/UIObjects/DynamicNotificationButton.swift b/Shared/Model/UIObjects/DynamicNotificationButton.swift
index b971c2e..75c6f2e 100644
--- a/Shared/Model/UIObjects/DynamicNotificationButton.swift
+++ b/Shared/Model/UIObjects/DynamicNotificationButton.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 23/06/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/UIObjects/NotificationAccessoryElement.swift b/Shared/Model/UIObjects/NotificationAccessoryElement.swift
index 754c1e6..8bf5a31 100644
--- a/Shared/Model/UIObjects/NotificationAccessoryElement.swift
+++ b/Shared/Model/UIObjects/NotificationAccessoryElement.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 7/9/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/UIObjects/NotificationButton.swift b/Shared/Model/UIObjects/NotificationButton.swift
index ad9deea..ea3db85 100644
--- a/Shared/Model/UIObjects/NotificationButton.swift
+++ b/Shared/Model/UIObjects/NotificationButton.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 7/9/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/UIObjects/NotificationObject.swift b/Shared/Model/UIObjects/NotificationObject.swift
index 2be3d85..8e92ad2 100644
--- a/Shared/Model/UIObjects/NotificationObject.swift
+++ b/Shared/Model/UIObjects/NotificationObject.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 7/9/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
// swiftlint:disable type_body_length file_length
@@ -111,8 +111,10 @@ public final class NotificationObject: NSObject, Codable, NSSecureCoding {
var disableQuit: Bool = false
/// Custom width for the pop-up window size.
var customWidth: String?
- /// A boolean value that defined if the UI should appear without any destructive CTA.
+ /// A boolean value that define if the UI should appear without any destructive CTA.
var buttonless: Bool = false
+ /// Boolean value that set the Popup UI title bar visibility.
+ var hideTitleBar: Bool = false
// MARK: - Initializers
@@ -148,11 +150,21 @@ public final class NotificationObject: NSObject, Codable, NSSecureCoding {
}
}
self.accessoryViews = []
+
if let accessoryviewTyperawValue = dict["accessory_view_type"] as? String,
let accessoryViewType = NotificationAccessoryElement.ViewType.init(rawValue: accessoryviewTyperawValue.lowercased()) {
self.accessoryViews?.append(NotificationAccessoryElement(with: accessoryViewType, payload: dict["accessory_view_payload"] as? String))
}
+ for number in 1...100 {
+ if let accessoryviewTyperawValue = dict["accessory_view_type_\(number.description)"] as? String,
+ let accessoryViewType = NotificationAccessoryElement.ViewType.init(rawValue: accessoryviewTyperawValue.lowercased()) {
+ self.accessoryViews?.append(NotificationAccessoryElement(with: accessoryViewType, payload: dict["accessory_view_payload_\(number.description)"] as? String))
+ } else {
+ break
+ }
+ }
+
if let secondaryAccessoryviewTyperawValue = dict["secondary_accessory_view_type"] as? String,
let secondaryAccessoryViewType = NotificationAccessoryElement.ViewType.init(rawValue: secondaryAccessoryviewTyperawValue.lowercased()) {
self.accessoryViews?.append(NotificationAccessoryElement(with: secondaryAccessoryViewType, payload: dict["secondary_accessory_view_payload"] as? String))
@@ -256,6 +268,9 @@ public final class NotificationObject: NSObject, Codable, NSSecureCoding {
if let buttonless = dict["buttonless"] as? String {
self.buttonless = buttonless.lowercased() == "true"
}
+ if let hideTitleBar = dict["hide_title_bar"] as? String {
+ self.hideTitleBar = hideTitleBar.lowercased() == "true"
+ }
super.init()
try checkObjectConsistency()
}
@@ -374,6 +389,7 @@ public final class NotificationObject: NSObject, Codable, NSSecureCoding {
case disableQuit
case customWidth
case buttonless
+ case hideTitleBar
}
required public init(from decoder: Decoder) throws {
@@ -421,6 +437,7 @@ public final class NotificationObject: NSObject, Codable, NSSecureCoding {
self.disableQuit = try container.decode(Bool.self, forKey: .disableQuit)
self.customWidth = try container.decodeIfPresent(String.self, forKey: .customWidth)
self.buttonless = try container.decode(Bool.self, forKey: .buttonless)
+ self.hideTitleBar = try container.decode(Bool.self, forKey: .hideTitleBar)
}
public func encode(to encoder: Encoder) throws {
@@ -460,6 +477,7 @@ public final class NotificationObject: NSObject, Codable, NSSecureCoding {
try container.encodeIfPresent(self.disableQuit, forKey: .disableQuit)
try container.encodeIfPresent(self.customWidth, forKey: .customWidth)
try container.encodeIfPresent(self.buttonless, forKey: .buttonless)
+ try container.encodeIfPresent(self.hideTitleBar, forKey: .hideTitleBar)
}
// MARK: Codable protocol conformity - END
@@ -565,6 +583,8 @@ public final class NotificationObject: NSObject, Codable, NSSecureCoding {
}
let nButtonless = NSNumber(booleanLiteral: buttonless)
coder.encode(nButtonless, forKey: NOCodingKeys.buttonless.rawValue)
+ let nHideTitleBar = NSNumber(booleanLiteral: hideTitleBar)
+ coder.encode(nHideTitleBar, forKey: NOCodingKeys.hideTitleBar.rawValue)
}
// swiftlint:enable function_body_length
@@ -610,6 +630,7 @@ public final class NotificationObject: NSObject, Codable, NSSecureCoding {
self.disableQuit = coder.decodeObject(of: NSNumber.self, forKey: NOCodingKeys.disableQuit.rawValue) as? Bool ?? false
self.customWidth = coder.decodeObject(of: NSString.self, forKey: NOCodingKeys.customWidth.rawValue) as String?
self.buttonless = coder.decodeObject(of: NSNumber.self, forKey: NOCodingKeys.buttonless.rawValue) as? Bool ?? false
+ self.hideTitleBar = coder.decodeObject(of: NSNumber.self, forKey: NOCodingKeys.hideTitleBar.rawValue) as? Bool ?? false
}
// MARK: - NSSecureCoding protocol conformity - END
diff --git a/Shared/Model/UIObjects/OnboardingData.swift b/Shared/Model/UIObjects/OnboardingData.swift
index e329327..3056955 100644
--- a/Shared/Model/UIObjects/OnboardingData.swift
+++ b/Shared/Model/UIObjects/OnboardingData.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 21/01/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/UIObjects/PopupReminder.swift b/Shared/Model/UIObjects/PopupReminder.swift
index 322a2d0..4072dac 100644
--- a/Shared/Model/UIObjects/PopupReminder.swift
+++ b/Shared/Model/UIObjects/PopupReminder.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 10/12/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/UIObjects/ProgressState.swift b/Shared/Model/UIObjects/ProgressState.swift
index cf1d6d7..7e0c67c 100644
--- a/Shared/Model/UIObjects/ProgressState.swift
+++ b/Shared/Model/UIObjects/ProgressState.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 10/15/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/UIObjects/SwiftUIButtonState.swift b/Shared/Model/UIObjects/SwiftUIButtonState.swift
index 845aa9b..b604c0f 100644
--- a/Shared/Model/UIObjects/SwiftUIButtonState.swift
+++ b/Shared/Model/UIObjects/SwiftUIButtonState.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 16/01/23.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Model/UIObjects/ViewSpec.swift b/Shared/Model/UIObjects/ViewSpec.swift
index 827df51..aa25049 100644
--- a/Shared/Model/UIObjects/ViewSpec.swift
+++ b/Shared/Model/UIObjects/ViewSpec.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 13/10/2023.
-// Copyright © 2023 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Protocols/ControlActionClosureProtocol.swift b/Shared/Protocols/ControlActionClosureProtocol.swift
index ebd12b7..efaed9b 100644
--- a/Shared/Protocols/ControlActionClosureProtocol.swift
+++ b/Shared/Protocols/ControlActionClosureProtocol.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 09/02/23.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
// Credits: Sindre Sorhus (sindresorhus)
//
diff --git a/Shared/Protocols/InteractiveObjectProtocol.swift b/Shared/Protocols/InteractiveObjectProtocol.swift
index 938d301..4119492 100644
--- a/Shared/Protocols/InteractiveObjectProtocol.swift
+++ b/Shared/Protocols/InteractiveObjectProtocol.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 24/06/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Resources/en.lproj/Localizable.strings b/Shared/Resources/en.lproj/Localizable.strings
index ee9422f..870b1e3 100644
--- a/Shared/Resources/en.lproj/Localizable.strings
+++ b/Shared/Resources/en.lproj/Localizable.strings
@@ -3,7 +3,7 @@
Notification Agent
Created by Simone Martorelli on 8/10/20.
- Copyright © 2021 IBM. All rights reserved.
+ © Copyright IBM Corp. 2021, 2024
SPDX-License-Identifier: Apache2.0
*/
diff --git a/Shared/Utils/ActionTrampoline.swift b/Shared/Utils/ActionTrampoline.swift
index 514ca66..5e029a6 100644
--- a/Shared/Utils/ActionTrampoline.swift
+++ b/Shared/Utils/ActionTrampoline.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 09/02/23.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
// Credits: Sindre Sorhus (sindresorhus)
//
diff --git a/Shared/Utils/Utils.swift b/Shared/Utils/Utils.swift
index 7872a38..fea59c9 100644
--- a/Shared/Utils/Utils.swift
+++ b/Shared/Utils/Utils.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 9/24/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/AppKit/AccessoryView.swift b/Shared/Views/AccessoryViews/AppKit/AccessoryView.swift
index e2b451b..3b3ff73 100644
--- a/Shared/Views/AccessoryViews/AppKit/AccessoryView.swift
+++ b/Shared/Views/AccessoryViews/AppKit/AccessoryView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 03/05/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/AppKit/HTMLAccessoryView.swift b/Shared/Views/AccessoryViews/AppKit/HTMLAccessoryView.swift
index be3741d..de3b903 100644
--- a/Shared/Views/AccessoryViews/AppKit/HTMLAccessoryView.swift
+++ b/Shared/Views/AccessoryViews/AppKit/HTMLAccessoryView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 15/04/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/AppKit/MarkdownTextView.swift b/Shared/Views/AccessoryViews/AppKit/MarkdownTextView.swift
index fc3f839..dbf4fb2 100644
--- a/Shared/Views/AccessoryViews/AppKit/MarkdownTextView.swift
+++ b/Shared/Views/AccessoryViews/AppKit/MarkdownTextView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 9/21/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/AppKit/VideoAccessoryView.swift b/Shared/Views/AccessoryViews/AppKit/VideoAccessoryView.swift
index f43dfb9..ae61d79 100644
--- a/Shared/Views/AccessoryViews/AppKit/VideoAccessoryView.swift
+++ b/Shared/Views/AccessoryViews/AppKit/VideoAccessoryView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 9/30/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/AccessoryViewSource.swift b/Shared/Views/AccessoryViews/SwiftUI/AccessoryViewSource.swift
index cd832a8..c196424 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/AccessoryViewSource.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/AccessoryViewSource.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 11/05/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/AccessoryViewWrapper.swift b/Shared/Views/AccessoryViews/SwiftUI/AccessoryViewWrapper.swift
index 79c5cad..bfa1ae7 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/AccessoryViewWrapper.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/AccessoryViewWrapper.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 09/02/23.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
@@ -48,6 +48,7 @@ struct AccessoryViewWrapper: View {
ScrollView {
RichText(html: source.accessoryView.payload ?? "")
.colorScheme(source.accessoryView.type == .htmlwhitebox ? .light : .auto)
+ .customCSS("td { color: " + (source.accessoryView.type == .htmlwhitebox ? NSColor.black : NSColor.labelColor).hexString + "; }")
.padding(source.accessoryView.type == .htmlwhitebox ? 4 : 0)
}
.frame(maxHeight: AppComponent.current == .popup ? 300 : .infinity)
diff --git a/Shared/Views/AccessoryViews/SwiftUI/DatePickerView.swift b/Shared/Views/AccessoryViews/SwiftUI/DatePickerView.swift
index 308dd57..6c1e475 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/DatePickerView.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/DatePickerView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 24/05/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/InputView.swift b/Shared/Views/AccessoryViews/SwiftUI/InputView.swift
index 131c593..207f875 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/InputView.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/InputView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 10/01/23.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/MediaView.swift b/Shared/Views/AccessoryViews/SwiftUI/MediaView.swift
index 9497830..fc343bf 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/MediaView.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/MediaView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 27/01/23.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/PickerView.swift b/Shared/Views/AccessoryViews/SwiftUI/PickerView.swift
index e5a7989..8c5543c 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/PickerView.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/PickerView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 24/11/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/ProgressBar/ProgressBarView.swift b/Shared/Views/AccessoryViews/SwiftUI/ProgressBar/ProgressBarView.swift
index 980b1ed..505f82e 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/ProgressBar/ProgressBarView.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/ProgressBar/ProgressBarView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 17/03/23.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/ProgressBar/ProgressBarViewModel.swift b/Shared/Views/AccessoryViews/SwiftUI/ProgressBar/ProgressBarViewModel.swift
index e0c5050..0b6f79c 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/ProgressBar/ProgressBarViewModel.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/ProgressBar/ProgressBarViewModel.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 20/03/23.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/SlideShowView.swift b/Shared/Views/AccessoryViews/SwiftUI/SlideShowView.swift
index f10626e..a9ee85d 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/SlideShowView.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/SlideShowView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 19/07/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/HTMLView.swift b/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/HTMLView.swift
index cd0c02b..62516d1 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/HTMLView.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/HTMLView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 24/11/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/ImageViewRepresentable.swift b/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/ImageViewRepresentable.swift
index a71d827..587306c 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/ImageViewRepresentable.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/ImageViewRepresentable.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 06/12/2023.
-// Copyright © 2023 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/MarkdownView.swift b/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/MarkdownView.swift
index acbc3ae..66bcd4b 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/MarkdownView.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/MarkdownView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 22/11/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/PlayerView.swift b/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/PlayerView.swift
index 5b4b240..81e0c76 100644
--- a/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/PlayerView.swift
+++ b/Shared/Views/AccessoryViews/SwiftUI/ViewRepresentable/PlayerView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 10/05/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/Buttons/CircleButton.swift b/Shared/Views/Buttons/CircleButton.swift
index 3e858e3..e3e0769 100644
--- a/Shared/Views/Buttons/CircleButton.swift
+++ b/Shared/Views/Buttons/CircleButton.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 22/11/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/Buttons/NativeButton.swift b/Shared/Views/Buttons/NativeButton.swift
index 5215737..a75e28d 100644
--- a/Shared/Views/Buttons/NativeButton.swift
+++ b/Shared/Views/Buttons/NativeButton.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 21/11/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
// Credits: Sindre Sorhus (sindresorhus)
//
diff --git a/Shared/Views/Buttons/StandardButton.swift b/Shared/Views/Buttons/StandardButton.swift
index b4f4f4c..a9ba977 100644
--- a/Shared/Views/Buttons/StandardButton.swift
+++ b/Shared/Views/Buttons/StandardButton.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 22/11/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/Common/BackPanelWindow.swift b/Shared/Views/Common/BackPanelWindow.swift
index 8dbff97..3442d6e 100644
--- a/Shared/Views/Common/BackPanelWindow.swift
+++ b/Shared/Views/Common/BackPanelWindow.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 19/05/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/Common/FlippedStackView.swift b/Shared/Views/Common/FlippedStackView.swift
index 272f310..d39f91e 100644
--- a/Shared/Views/Common/FlippedStackView.swift
+++ b/Shared/Views/Common/FlippedStackView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 01/05/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/Common/HorizontalLine.swift b/Shared/Views/Common/HorizontalLine.swift
index 8ed40d4..f683051 100644
--- a/Shared/Views/Common/HorizontalLine.swift
+++ b/Shared/Views/Common/HorizontalLine.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 3/17/20.
-// Copyright © 2021 IBM. All rights reserved
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/Common/NoBackgroundScroller.swift b/Shared/Views/Common/NoBackgroundScroller.swift
index f01bae1..49ee7fa 100644
--- a/Shared/Views/Common/NoBackgroundScroller.swift
+++ b/Shared/Views/Common/NoBackgroundScroller.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 30/04/2021.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
diff --git a/Shared/Views/Components/Icon.swift b/Shared/Views/Components/Icon.swift
index 45c0d81..f9d1f99 100644
--- a/Shared/Views/Components/Icon.swift
+++ b/Shared/Views/Components/Icon.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 22/11/22.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//
@@ -23,10 +23,12 @@ struct Icon: View {
if let image = icon {
Image(nsImage: image)
.resizable()
+ .aspectRatio(contentMode: .fit)
.frame(width: iconSize.width, height: iconSize.height)
} else {
Image("default_icon")
.resizable()
+ .aspectRatio(contentMode: .fit)
.frame(width: iconSize.width, height: iconSize.height)
}
}
diff --git a/Shared/Views/Components/InfoSectionView.swift b/Shared/Views/Components/InfoSectionView.swift
index 8ceb78f..a718b63 100644
--- a/Shared/Views/Components/InfoSectionView.swift
+++ b/Shared/Views/Components/InfoSectionView.swift
@@ -3,7 +3,7 @@
// Notification Agent
//
// Created by Simone Martorelli on 04/04/2023.
-// Copyright © 2021 IBM. All rights reserved.
+// © Copyright IBM Corp. 2021, 2024
// SPDX-License-Identifier: Apache2.0
//