@sapui5/sap.cux.home 1.140.0 → 1.142.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/cux/home/.library +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js +3 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +3 -1
- package/src/sap/cux/home/App.d.ts.map +1 -1
- package/src/sap/cux/home/App.js +6 -1
- package/src/sap/cux/home/App.js.map +1 -1
- package/src/sap/cux/home/App.ts +7 -1
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +1 -0
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +64 -59
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +44 -34
- package/src/sap/cux/home/AppsContainer.d.ts +5 -1
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +44 -37
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +43 -33
- package/src/sap/cux/home/BaseAppPanel.d.ts +2 -1
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +3 -1
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +5 -2
- package/src/sap/cux/home/BaseContainer.d.ts +8 -0
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +26 -4
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +26 -3
- package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.ts +1 -1
- package/src/sap/cux/home/BaseNewsPanel.js +1 -1
- package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.ts +2 -2
- package/src/sap/cux/home/BasePanel.d.ts +7 -0
- package/src/sap/cux/home/BasePanel.d.ts.map +1 -1
- package/src/sap/cux/home/BasePanel.js +20 -0
- package/src/sap/cux/home/BasePanel.js.map +1 -1
- package/src/sap/cux/home/BasePanel.ts +16 -0
- package/src/sap/cux/home/BaseSettingsPanel.d.ts +9 -0
- package/src/sap/cux/home/BaseSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.js +13 -0
- package/src/sap/cux/home/BaseSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseSettingsPanel.ts +15 -0
- package/src/sap/cux/home/CardsPanel.d.ts +7 -0
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +132 -113
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +19 -8
- package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.js +6 -2
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.ts +5 -1
- package/src/sap/cux/home/ErrorPanel.js +2 -2
- package/src/sap/cux/home/ErrorPanel.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.ts +2 -2
- package/src/sap/cux/home/FavAppPanel.d.ts +4 -10
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +432 -446
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +56 -84
- package/src/sap/cux/home/FrequentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.js +5 -1
- package/src/sap/cux/home/FrequentAppPanel.js.map +1 -1
- package/src/sap/cux/home/FrequentAppPanel.ts +4 -0
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js +3 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +2 -0
- package/src/sap/cux/home/InsightsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsContainer.js +2 -2
- package/src/sap/cux/home/InsightsContainer.js.map +1 -1
- package/src/sap/cux/home/InsightsContainer.ts +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts +0 -4
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js +2 -2
- package/src/sap/cux/home/NewsAndPagesContainer.js.map +1 -1
- package/src/sap/cux/home/NewsAndPagesContainer.ts +4 -4
- package/src/sap/cux/home/NewsPanel.d.ts +17 -0
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.js +100 -68
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +60 -33
- package/src/sap/cux/home/NewsSettingsPanel.d.ts +42 -6
- package/src/sap/cux/home/NewsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.js +219 -81
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +215 -80
- package/src/sap/cux/home/Page.d.ts.map +1 -1
- package/src/sap/cux/home/Page.js +4 -1
- package/src/sap/cux/home/Page.js.map +1 -1
- package/src/sap/cux/home/Page.ts +2 -0
- package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/PagePanel.js +5 -2
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +8 -8
- package/src/sap/cux/home/PageSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.js +6 -3
- package/src/sap/cux/home/PageSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/PageSettingsPanel.ts +2 -2
- package/src/sap/cux/home/RecentAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.js +6 -0
- package/src/sap/cux/home/RecentAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecentAppPanel.ts +5 -1
- package/src/sap/cux/home/RecommendedAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.js +7 -0
- package/src/sap/cux/home/RecommendedAppPanel.js.map +1 -1
- package/src/sap/cux/home/RecommendedAppPanel.ts +6 -1
- package/src/sap/cux/home/SettingsDialog.d.ts +1 -0
- package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
- package/src/sap/cux/home/SettingsDialog.js +13 -6
- package/src/sap/cux/home/SettingsDialog.js.map +1 -1
- package/src/sap/cux/home/SettingsDialog.ts +14 -6
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts +10 -0
- package/src/sap/cux/home/SideBySideIconTabFilter.d.ts.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js +12 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.js.map +1 -1
- package/src/sap/cux/home/SideBySideIconTabFilter.ts +13 -1
- package/src/sap/cux/home/SituationPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SituationPanel.js +7 -2
- package/src/sap/cux/home/SituationPanel.js.map +1 -1
- package/src/sap/cux/home/SituationPanel.ts +2 -0
- package/src/sap/cux/home/SpaceInsightsPanel.js +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.ts +1 -1
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +3 -0
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +2 -1
- package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TilesPanel.js +10 -3
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +7 -3
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +29 -8
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +19 -8
- package/src/sap/cux/home/ToDosContainer.js +3 -3
- package/src/sap/cux/home/ToDosContainer.js.map +1 -1
- package/src/sap/cux/home/ToDosContainer.ts +1 -1
- package/src/sap/cux/home/i18n/messagebundle.properties +13 -7
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_da.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_de.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_el.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_en.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_es.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_et.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_id.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_it.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_no.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +1 -3
- package/src/sap/cux/home/i18n/messagebundle_th.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +0 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +0 -2
- package/src/sap/cux/home/interface/AppsInterface.d.ts +5 -0
- package/src/sap/cux/home/interface/AppsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/AppsInterface.ts +6 -0
- package/src/sap/cux/home/library.d.ts.map +1 -1
- package/src/sap/cux/home/library.js +1 -0
- package/src/sap/cux/home/library.js.map +1 -1
- package/src/sap/cux/home/library.ts +1 -0
- package/src/sap/cux/home/themes/base/AppsContainer.less +12 -1
- package/src/sap/cux/home/themes/base/BaseLayout.less +11 -0
- package/src/sap/cux/home/themes/base/InsightsContainer.less +4 -0
- package/src/sap/cux/home/themes/base/ToDosContainer.less +4 -0
- package/src/sap/cux/home/utils/AppManager.d.ts +7 -6
- package/src/sap/cux/home/utils/AppManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/AppManager.js +1 -1
- package/src/sap/cux/home/utils/AppManager.js.map +1 -1
- package/src/sap/cux/home/utils/AppManager.ts +9 -10
- package/src/sap/cux/home/utils/BatchHelper.d.ts.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.js +1 -1
- package/src/sap/cux/home/utils/BatchHelper.js.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.ts +4 -1
- package/src/sap/cux/home/utils/FESRUtil.d.ts +30 -0
- package/src/sap/cux/home/utils/FESRUtil.d.ts.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.js +36 -1
- package/src/sap/cux/home/utils/FESRUtil.js.map +1 -1
- package/src/sap/cux/home/utils/FESRUtil.ts +36 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts +4 -0
- package/src/sap/cux/home/utils/PXFeedback.d.ts.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.js +28 -0
- package/src/sap/cux/home/utils/PXFeedback.js.map +1 -0
- package/src/sap/cux/home/utils/PXFeedback.ts +19 -0
- package/src/sap/cux/home/utils/PageManager.d.ts +0 -4
- package/src/sap/cux/home/utils/PageManager.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PageManager.js +6 -6
- package/src/sap/cux/home/utils/PageManager.js.map +1 -1
- package/src/sap/cux/home/utils/PageManager.ts +6 -5
- package/src/sap/cux/home/utils/UshellPersonalizer.js +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.js.map +1 -1
- package/src/sap/cux/home/utils/UshellPersonalizer.ts +1 -1
- package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +1 -1
|
@@ -3,13 +3,16 @@
|
|
|
3
3
|
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import Button from "sap/m/Button";
|
|
6
7
|
import CheckBox from "sap/m/CheckBox";
|
|
8
|
+
import Column from "sap/m/Column";
|
|
9
|
+
import ColumnListItem from "sap/m/ColumnListItem";
|
|
7
10
|
import CustomListItem from "sap/m/CustomListItem";
|
|
8
11
|
import HBox from "sap/m/HBox";
|
|
9
12
|
import Label from "sap/m/Label";
|
|
10
13
|
import List from "sap/m/List";
|
|
11
|
-
import ListItemBase from "sap/m/ListItemBase";
|
|
12
14
|
import Switch from "sap/m/Switch";
|
|
15
|
+
import Table from "sap/m/Table";
|
|
13
16
|
import Text from "sap/m/Text";
|
|
14
17
|
import Title from "sap/m/Title";
|
|
15
18
|
import VBox from "sap/m/VBox";
|
|
@@ -54,6 +57,9 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
54
57
|
private deselectedDefaultFeeds!: string[];
|
|
55
58
|
private headerText!: Text;
|
|
56
59
|
private title!: Title;
|
|
60
|
+
private groupTable!: Table;
|
|
61
|
+
private newsListVBox!: VBox;
|
|
62
|
+
private _resetActionButton!: Button;
|
|
57
63
|
|
|
58
64
|
/**
|
|
59
65
|
* Init lifecycle method
|
|
@@ -69,6 +75,15 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
69
75
|
this.setProperty("title", this._i18nBundle.getText("news"));
|
|
70
76
|
this.setProperty("icon", "sap-icon://newspaper");
|
|
71
77
|
|
|
78
|
+
this._resetActionButton = new Button({
|
|
79
|
+
id: `${this.getId()}-newsResetBtn`,
|
|
80
|
+
visible: false,
|
|
81
|
+
enabled: false,
|
|
82
|
+
text: this._i18nBundle.getText("resetDefaultButton"),
|
|
83
|
+
press: () => this.resetDefaultNewsSettings()
|
|
84
|
+
});
|
|
85
|
+
// Add button to actionButtons aggregation
|
|
86
|
+
this.addActionButton(this._resetActionButton);
|
|
72
87
|
//setup layout content
|
|
73
88
|
this.addAggregation("content", this.getContent());
|
|
74
89
|
|
|
@@ -91,7 +106,7 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
91
106
|
const oContentVBox = new VBox(this.getId() + "--idNewsPageOuterVBoX", {
|
|
92
107
|
alignItems: "Start",
|
|
93
108
|
justifyContent: "SpaceBetween",
|
|
94
|
-
items: [oHeader, oTitle, this.
|
|
109
|
+
items: [oHeader, oTitle, this.createCustomNewsList(), this.createNewsGroupTable()]
|
|
95
110
|
});
|
|
96
111
|
return oContentVBox;
|
|
97
112
|
}
|
|
@@ -152,56 +167,92 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
152
167
|
}
|
|
153
168
|
|
|
154
169
|
/**
|
|
155
|
-
* Returns the content for the news List
|
|
170
|
+
* Returns the content for the news List for custom news feed
|
|
156
171
|
*
|
|
157
172
|
* @private
|
|
158
173
|
* @returns {sap.ui.core.Control} The control containing the News Settings Panel's List
|
|
159
174
|
*/
|
|
160
|
-
private
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
175
|
+
private createCustomNewsList() {
|
|
176
|
+
if (!this.newsListVBox) {
|
|
177
|
+
//showAllPrepRequired Switch
|
|
178
|
+
const oShowSwitchLabel = new Label(this.getId() + "--idShowAllCustNewsSwitchLabel", {
|
|
179
|
+
text: this._i18nBundle.getText("showAllPreparationRequiredSwitchLabel")
|
|
180
|
+
});
|
|
181
|
+
this.oShowSwitch = new Switch(`${this.getId()}-showSwitch`, {
|
|
182
|
+
customTextOn: " ",
|
|
183
|
+
customTextOff: " ",
|
|
184
|
+
change: () => {
|
|
185
|
+
void this.saveNewsFeedSettings();
|
|
186
|
+
},
|
|
187
|
+
state: false,
|
|
188
|
+
ariaLabelledBy: [`${this.getId()}--idShowAllCustNewsSwitchLabel`]
|
|
189
|
+
});
|
|
190
|
+
addFESRSemanticStepName(this.oShowSwitch, FESR_EVENTS.CHANGE, "showPrepRequire");
|
|
191
|
+
this.oCustNewsSwitchContainer = new HBox(this.getId() + "--idShowAllCustNewsSwitchContainer", {
|
|
192
|
+
alignItems: "Center",
|
|
193
|
+
items: [oShowSwitchLabel, this.oShowSwitch],
|
|
194
|
+
width: "94%"
|
|
195
|
+
}).addStyleClass("sapUiSmallMarginTop");
|
|
196
|
+
|
|
197
|
+
const oShowAllPrep = new VBox(this.getId() + "--idShowAllCustNewsSwitchVBox", {
|
|
198
|
+
items: [this.oCustNewsSwitchContainer],
|
|
199
|
+
width: "94%"
|
|
200
|
+
}).addStyleClass("sapUiSmallMarginTop");
|
|
201
|
+
const oInvisibleText = getInvisibleText(`${this.getId()}--newsTitleText`, this._i18nBundle.getText("newsTitle"));
|
|
202
|
+
//List of news items
|
|
203
|
+
this.oList = new List(this.getId() + "--idCustNewsFeedList", {
|
|
204
|
+
ariaLabelledBy: [
|
|
205
|
+
oInvisibleText.getId(),
|
|
206
|
+
`${this.getId()}--idCustNewsFeedSettingsText`,
|
|
207
|
+
`${this.getId()}--idCustNewsFeedSettignsTitle`
|
|
208
|
+
]
|
|
209
|
+
});
|
|
210
|
+
//Outer VBox
|
|
211
|
+
this.newsListVBox = new VBox(this.getId() + "--idCustNewsFeedListContainer", {
|
|
212
|
+
direction: "Column",
|
|
213
|
+
visible: false,
|
|
214
|
+
items: [this.oList, oShowAllPrep, oInvisibleText],
|
|
215
|
+
width: "96%"
|
|
216
|
+
}).addStyleClass("sapUiSmallMarginTop sapUiSmallMarginBegin");
|
|
217
|
+
}
|
|
218
|
+
return this.newsListVBox;
|
|
203
219
|
}
|
|
204
220
|
|
|
221
|
+
/**
|
|
222
|
+
* Creates and returns a table for managing default news group settings.
|
|
223
|
+
* @returns {Table} Table for news groups for default manage news feed
|
|
224
|
+
* @private
|
|
225
|
+
*/
|
|
226
|
+
private createNewsGroupTable() {
|
|
227
|
+
//Table for news groups
|
|
228
|
+
if (!this.groupTable) {
|
|
229
|
+
this.groupTable = new Table(this.getId() + "--idNewsGroupTbl", {
|
|
230
|
+
includeItemInSelection: true,
|
|
231
|
+
visible: false
|
|
232
|
+
}).addStyleClass("sapUiTinyMarginBegin");
|
|
233
|
+
const placeHolderCol = new Column(this.getId() + "--idNewsGroupPlaceHolder", {
|
|
234
|
+
width: "8%"
|
|
235
|
+
});
|
|
236
|
+
|
|
237
|
+
//title column
|
|
238
|
+
const titleCol = new Column(this.getId() + "--idNewsGroupTitle", {
|
|
239
|
+
header: new Label(this.getId() + "--idNewsGroupTitleLbl", {
|
|
240
|
+
text: this._i18nBundle.getText("defaultNewsSettingsHeading")
|
|
241
|
+
}),
|
|
242
|
+
width: "50%"
|
|
243
|
+
});
|
|
244
|
+
const articleCount = new Column(this.getId() + "--idNewsGroupCount", {
|
|
245
|
+
header: new Label(this.getId() + "--idNewsGroupCountLbl", {
|
|
246
|
+
text: this._i18nBundle.getText("articleCount")
|
|
247
|
+
}),
|
|
248
|
+
width: "42%"
|
|
249
|
+
});
|
|
250
|
+
this.groupTable.addColumn(placeHolderCol);
|
|
251
|
+
this.groupTable.addColumn(titleCol);
|
|
252
|
+
this.groupTable.addColumn(articleCount);
|
|
253
|
+
}
|
|
254
|
+
return this.groupTable;
|
|
255
|
+
}
|
|
205
256
|
/**
|
|
206
257
|
* Checks if the custom file format is CSV based on the custom file name.
|
|
207
258
|
*
|
|
@@ -225,22 +276,11 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
225
276
|
const showDefault = newsType === NewsType.Default;
|
|
226
277
|
const customFileName = this.oNewsPanel.getProperty("customFileName") as string;
|
|
227
278
|
const feedKey = this.oNewsPanel.getCustomFeedKey();
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
const isSelected = checkbox.getSelected();
|
|
234
|
-
|
|
235
|
-
if (showDefault) {
|
|
236
|
-
const groupId = this.getDefaultGroupId(newsListHBox);
|
|
237
|
-
if (!isSelected && groupId) {
|
|
238
|
-
deselectedDefaultFeeds.push(groupId);
|
|
239
|
-
}
|
|
240
|
-
} else if (isSelected) {
|
|
241
|
-
selectedFeeds.push(label.getText());
|
|
242
|
-
}
|
|
243
|
-
});
|
|
279
|
+
if (showDefault) {
|
|
280
|
+
deselectedDefaultFeeds.push(...this.collectDeselectedDefaultGroupIds());
|
|
281
|
+
} else {
|
|
282
|
+
selectedFeeds.push(...this.collectSelectedCustomFeedTitles());
|
|
283
|
+
}
|
|
244
284
|
|
|
245
285
|
const personalizer = await this.getPersonalization();
|
|
246
286
|
const personalizationData = (await personalizer.read()) || {};
|
|
@@ -259,28 +299,64 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
259
299
|
// get the latest value of switch and set the state
|
|
260
300
|
if (!showDefault) {
|
|
261
301
|
this.oShowSwitch.setState(personalizationData.favNewsFeed?.showAllPreparationRequired);
|
|
302
|
+
} else {
|
|
303
|
+
this._resetActionButton.setEnabled(!!(deselectedDefaultFeeds.length > 0));
|
|
262
304
|
}
|
|
263
305
|
await this.oNewsPanel.setCustomNewsFeed(showDefault ? "" : feedKey);
|
|
264
306
|
}
|
|
265
307
|
|
|
266
|
-
/**
|
|
267
|
-
*
|
|
308
|
+
/**
|
|
309
|
+
* Collect selected custom feed titles from the list
|
|
310
|
+
* @returns {string[]} Array of selected custom feed titles
|
|
311
|
+
* @private
|
|
312
|
+
*/
|
|
313
|
+
private collectSelectedCustomFeedTitles(): string[] {
|
|
314
|
+
const items = this.oList?.getItems() ?? [];
|
|
315
|
+
if (!items.length) return [];
|
|
316
|
+
return items.flatMap((item) => {
|
|
317
|
+
const content = item.getAggregation("content") as Control[] | undefined;
|
|
318
|
+
const hBox = content?.[0] as HBox | undefined;
|
|
319
|
+
if (!hBox) return [];
|
|
320
|
+
const [checkBox, text] = hBox.getItems() as [CheckBox, Text];
|
|
321
|
+
return checkBox.getSelected() ? [text.getText()] : [];
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
/**
|
|
326
|
+
* Collect deselected default group IDs from the table
|
|
327
|
+
* @returns {string[]} Array of deselected default group IDs from the table
|
|
328
|
+
* @private
|
|
329
|
+
*/
|
|
330
|
+
private collectDeselectedDefaultGroupIds(): string[] {
|
|
331
|
+
const rows = (this.groupTable?.getItems() as ColumnListItem[]) ?? [];
|
|
332
|
+
if (!rows.length) return [];
|
|
333
|
+
return rows.flatMap((row: ColumnListItem) => {
|
|
334
|
+
const cells = row.getCells() as [CheckBox, Text, Text];
|
|
335
|
+
const checkBox = cells[0];
|
|
336
|
+
if (checkBox.getSelected()) return [];
|
|
337
|
+
const groupId = this.getDefaultGroupId(row);
|
|
338
|
+
return groupId ? [groupId] : [];
|
|
339
|
+
});
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Get groupId info for the default NewsList
|
|
344
|
+
* @param {HBox | ColumnListItem} contentBox, content Hbox or ColumnListItem
|
|
268
345
|
* @returns {string} groupId
|
|
269
346
|
* @private
|
|
270
347
|
*/
|
|
271
|
-
private getDefaultGroupId(contentBox: HBox): string {
|
|
348
|
+
private getDefaultGroupId(contentBox: HBox | ColumnListItem): string {
|
|
272
349
|
const customData = contentBox.getCustomData();
|
|
273
350
|
return customData?.length ? (customData[0].getValue() as string) : "";
|
|
274
351
|
}
|
|
275
352
|
|
|
276
|
-
/**
|
|
353
|
+
/**
|
|
354
|
+
* Set items for the NewsList for custom news feed
|
|
277
355
|
* @param {Array} [aItems] news items to be set as items aggregation
|
|
278
356
|
* @private
|
|
279
357
|
*/
|
|
280
|
-
private
|
|
358
|
+
private setCustomNewsItems(aItems: INewsFeed[]) {
|
|
281
359
|
this.oList.destroyAggregation("items", true);
|
|
282
|
-
const newsType = this.oNewsPanel?.getNewsType();
|
|
283
|
-
let showDefault = newsType === NewsType.Default;
|
|
284
360
|
(aItems || []).forEach((oItem: INewsFeed, i: number) => {
|
|
285
361
|
let oNewsListItemHbox = new HBox({
|
|
286
362
|
id: `${this.getId()}--idCustNewsFeedItemContent--${i}`,
|
|
@@ -297,10 +373,7 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
297
373
|
],
|
|
298
374
|
width: "100%"
|
|
299
375
|
});
|
|
300
|
-
|
|
301
|
-
// if showDefault is true, add group_id as custom data to the item
|
|
302
|
-
oNewsListItemHbox.addCustomData(new CustomData({ key: "newsGroupId", value: oItem.group_id }));
|
|
303
|
-
}
|
|
376
|
+
|
|
304
377
|
const customListItem = new CustomListItem({
|
|
305
378
|
id: `${this.getId()}--idCustNewsFeedItem--${i}`,
|
|
306
379
|
content: [oNewsListItemHbox]
|
|
@@ -330,11 +403,15 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
330
403
|
const aPersNewsFeed = (showDefaultNewsFeed ? oPersData?.["defaultNewsFeed"] : oPersData?.["favNewsFeed"]) as IFavNewsFeed;
|
|
331
404
|
const showAllPreparationRequired = aPersNewsFeed?.showAllPreparationRequired ?? !aPersNewsFeed;
|
|
332
405
|
|
|
333
|
-
let aNewsFeed: INewsFeed[]
|
|
334
|
-
|
|
406
|
+
let aNewsFeed: INewsFeed[];
|
|
335
407
|
if (showDefaultNewsFeed) {
|
|
408
|
+
this._resetActionButton.setVisible(true);
|
|
409
|
+
this._resetActionButton.setEnabled(!!(aPersNewsFeed?.items?.length > 0));
|
|
410
|
+
aNewsFeed = await this.oNewsPanel.getDefaultNewsData();
|
|
336
411
|
return this._handleDefaultNewsFeed(aNewsFeed, aPersNewsFeed);
|
|
337
412
|
} else {
|
|
413
|
+
this._resetActionButton.setVisible(false);
|
|
414
|
+
aNewsFeed = await this.oNewsPanel.getCustomOrDefaultNewsFeed(showDefaultNewsFeed ? "" : sFeedKey, false);
|
|
338
415
|
return this._handleCustomNewsFeed(aNewsFeed, aPersNewsFeed, showAllPreparationRequired);
|
|
339
416
|
}
|
|
340
417
|
}
|
|
@@ -350,8 +427,13 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
350
427
|
* If no news feed is provided, it returns undefined.
|
|
351
428
|
*/
|
|
352
429
|
private _handleDefaultNewsFeed(aNewsFeed: INewsFeed[], aPersNewsFeed: IFavNewsFeed): INewsFeed[] | undefined {
|
|
353
|
-
this.headerText.setText(
|
|
354
|
-
|
|
430
|
+
this.headerText.setText(
|
|
431
|
+
this._i18nBundle.getText("defaultNewsSettingsText") + "\n" + this._i18nBundle.getText("defaultNewsSettingsSubText")
|
|
432
|
+
);
|
|
433
|
+
this.title.setVisible(false);
|
|
434
|
+
this.newsListVBox.setVisible(false);
|
|
435
|
+
this.oShowSwitch.setState(false);
|
|
436
|
+
|
|
355
437
|
const mandatoryNewsFeed = this.oNewsPanel.getMandatoryDefaultNewsFeed();
|
|
356
438
|
this.deselectedDefaultFeeds = aPersNewsFeed?.items || [];
|
|
357
439
|
|
|
@@ -372,11 +454,44 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
372
454
|
return oNewsFeed;
|
|
373
455
|
});
|
|
374
456
|
|
|
375
|
-
this.
|
|
376
|
-
this.
|
|
457
|
+
this.groupTable.setVisible(true);
|
|
458
|
+
this.setColumnListItems(aNewsFeed);
|
|
459
|
+
|
|
377
460
|
return aNewsFeed;
|
|
378
461
|
}
|
|
379
462
|
|
|
463
|
+
/**
|
|
464
|
+
* This method populates the column list items in the group table for the default news feed settings.
|
|
465
|
+
* @param aItems Array of news feed items
|
|
466
|
+
* @private
|
|
467
|
+
*/
|
|
468
|
+
private setColumnListItems(aItems: INewsFeed[]) {
|
|
469
|
+
this.groupTable.destroyItems();
|
|
470
|
+
//add column list item, title and article count
|
|
471
|
+
(aItems || []).forEach((oItem: INewsFeed, i: number) => {
|
|
472
|
+
const colListItem = new ColumnListItem({
|
|
473
|
+
id: `${this.getId()}--idNewsGroupColListItem--${i}`,
|
|
474
|
+
selected: oItem.selected as boolean,
|
|
475
|
+
type: "Active",
|
|
476
|
+
cells: [
|
|
477
|
+
new CheckBox({
|
|
478
|
+
id: `${this.getId()}--idNewsGroupCheckBox--${i}`,
|
|
479
|
+
selected: oItem.selected as boolean,
|
|
480
|
+
enabled: !oItem.disabled,
|
|
481
|
+
select: () => {
|
|
482
|
+
void this.saveNewsFeedSettings();
|
|
483
|
+
}
|
|
484
|
+
}),
|
|
485
|
+
new Text({ text: oItem.title }),
|
|
486
|
+
new Text({ text: String(oItem._group_to_article?.length ?? 0) })
|
|
487
|
+
]
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
// if showDefault is true, add group_id as custom data to the item
|
|
491
|
+
colListItem.addCustomData(new CustomData({ key: "newsGroupId", value: oItem.group_id }));
|
|
492
|
+
this.groupTable.addItem(colListItem);
|
|
493
|
+
});
|
|
494
|
+
}
|
|
380
495
|
/**
|
|
381
496
|
* @param {INewsFeed[]} aNewsFeed
|
|
382
497
|
* @param aPersNewsFeed
|
|
@@ -393,8 +508,11 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
393
508
|
aPersNewsFeed: IFavNewsFeed,
|
|
394
509
|
showAllPreparationRequired: boolean
|
|
395
510
|
): INewsFeed[] | undefined {
|
|
511
|
+
this.groupTable.setVisible(false);
|
|
396
512
|
this.headerText.setText(this._i18nBundle.getText("newsFeedSettingsText"));
|
|
397
513
|
this.title.setText(this._i18nBundle.getText("newsFeedSettingsHeading"));
|
|
514
|
+
this.title.setVisible(true);
|
|
515
|
+
this.newsListVBox.setVisible(true);
|
|
398
516
|
|
|
399
517
|
if (!aNewsFeed || aNewsFeed.length === 0) {
|
|
400
518
|
return;
|
|
@@ -408,11 +526,28 @@ export default class NewsSettingsPanel extends BaseSettingsPanel {
|
|
|
408
526
|
});
|
|
409
527
|
|
|
410
528
|
this.aFavNewsFeed = aNewsFeed;
|
|
411
|
-
this.
|
|
529
|
+
this.setCustomNewsItems(this.aFavNewsFeed);
|
|
412
530
|
this.oShowSwitch.setState(!!showAllPreparationRequired);
|
|
413
531
|
return aNewsFeed;
|
|
414
532
|
}
|
|
415
533
|
|
|
534
|
+
/**
|
|
535
|
+
* Resets the default manage news' news settings to default by clearing
|
|
536
|
+
* the personalization data and updating the news panel.
|
|
537
|
+
* @private
|
|
538
|
+
* @returns {Promise<INewsFeed[] | undefined>} A promise that resolves to the updated news feed items or undefined.
|
|
539
|
+
*/
|
|
540
|
+
private async resetDefaultNewsSettings() {
|
|
541
|
+
const personalizer = await this.getPersonalization();
|
|
542
|
+
const personalizationData = (await personalizer.read()) || {};
|
|
543
|
+
personalizationData.defaultNewsFeed = { items: [] };
|
|
544
|
+
await personalizer.write(personalizationData);
|
|
545
|
+
await this.oNewsPanel.setCustomNewsFeed("");
|
|
546
|
+
let aNewsFeed = await this.oNewsPanel.getDefaultNewsData();
|
|
547
|
+
this._resetActionButton.setEnabled(false);
|
|
548
|
+
return this._handleDefaultNewsFeed(aNewsFeed, personalizationData.defaultNewsFeed);
|
|
549
|
+
}
|
|
550
|
+
|
|
416
551
|
/**
|
|
417
552
|
* Checks if the News Settings Panel is supported based on the properties of the News Panel.
|
|
418
553
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/Page.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,mBAAmB,CAAC;IACnC;;;OAGG;IAEH,OAAO,OAAO,EAAE,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;IAG/D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;IAClD,OAAO,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"Page.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/Page.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,mBAAmB,CAAC;IACnC;;;OAGG;IAEH,OAAO,OAAO,EAAE,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;IAG/D,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;IAClD,OAAO,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;IAGlE;;;;;;;;;;;;OAYG;IAEH,MAAM,CAAC,OAAO,OAAO,IAAK,SAAQ,OAAO;oBAC5B,YAAY,CAAC,EAAE,MAAM,GAAG,aAAa;oBACrC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,aAAa;QAIjD,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAkDvC;QAEW,eAAe,CAAC,KAAK,EAAE,KAAK;KAgBzC;CAEA"}
|
package/src/sap/cux/home/Page.js
CHANGED
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
3
|
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
4
|
*/
|
|
5
|
-
sap.ui.define(["sap/ui/core/Element", "sap/ushell/Container"], function (Element, Container) {
|
|
5
|
+
sap.ui.define(["sap/ui/core/Element", "sap/ushell/Container", "./utils/FESRUtil"], function (Element, Container, ___utils_FESRUtil) {
|
|
6
6
|
"use strict";
|
|
7
7
|
|
|
8
|
+
const addFESRNavigationSource = ___utils_FESRUtil["addFESRNavigationSource"];
|
|
9
|
+
const FESRNavigationSource = ___utils_FESRUtil["FESRNavigationSource"];
|
|
8
10
|
/**
|
|
9
11
|
*
|
|
10
12
|
* Class for managing and storing Pages.
|
|
@@ -110,6 +112,7 @@ sap.ui.define(["sap/ui/core/Element", "sap/ushell/Container"], function (Element
|
|
|
110
112
|
const sPageId = oPage.getProperty?.("pageId"),
|
|
111
113
|
sSpaceId = oPage.getProperty?.("spaceId");
|
|
112
114
|
return Promise.resolve(Container.getServiceAsync("Navigation")).then(function (navigationService) {
|
|
115
|
+
addFESRNavigationSource(FESRNavigationSource.Page);
|
|
113
116
|
return Promise.resolve(navigationService.navigate({
|
|
114
117
|
target: {
|
|
115
118
|
semanticObject: "Launchpad",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Page.js","names":["sap","ui","define","Element","Container","Page","extend","metadata","library","properties","title","type","group","defaultValue","icon","subTitle","bgColor","pageId","spaceId","spaceTitle","url","events","press","constructor","_constructor","id","settings","Element.prototype.constructor.call","onPageTilePress","_onPageTilePress","oPage","sPageId","getProperty","sSpaceId","Promise","resolve","getServiceAsync","then","navigationService","navigate","target","semanticObject","action","params","e","reject"],"sources":["Page.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Element, { MetadataOptions } from \"sap/ui/core/Element\";\nimport Container from \"sap/ushell/Container\";\nimport Navigation from \"sap/ushell/services/Navigation\";\nimport { $PageSettings } from \"./Page\";\nimport { IPage } from \"./interface/PageSpaceInterface\";\n\n/**\n *\n * Class for managing and storing Pages.\n *\n * @extends sap.ui.core.Element\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121\n * @private\n *\n * @alias sap.cux.home.Page\n */\n\nexport default class Page extends Element {\n\tconstructor(idOrSettings?: string | $PageSettings);\n\tconstructor(id?: string, settings?: $PageSettings);\n\tconstructor(id?: string, settings?: $PageSettings) {\n\t\tsuper(id, settings);\n\t}\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\tproperties: {\n\t\t\t/**\n\t\t\t * Title for the page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\ttitle: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Icon for the page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\ticon: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Subtitle for the page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\tsubTitle: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Background color for the page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\tbgColor: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Id for the corresponding page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\tpageId: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Space id for the corresponding page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\tspaceId: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Space title for the corresponding page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\tspaceTitle: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Url to be launched for the corresponding page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\turl: { type: \"string\", group: \"Misc\", defaultValue: \"\" }\n\t\t},\n\t\tevents: {\n\t\t\t/**\n\t\t\t * Press event for the page\n\t\t\t */\n\t\t\tpress: {}\n\t\t}\n\t};\n\n\tpublic async onPageTilePress(oPage: IPage) {\n\t\tconst sPageId = oPage.getProperty?.(\"pageId\"),\n\t\t\tsSpaceId = oPage.getProperty?.(\"spaceId\");\n\t\tconst navigationService = await Container.getServiceAsync<Navigation>(\"Navigation\");\n\t\tawait navigationService.navigate({\n\t\t\ttarget: {\n\t\t\t\tsemanticObject: \"Launchpad\",\n\t\t\t\taction: \"openFLPPage\"\n\t\t\t},\n\t\t\tparams: {\n\t\t\t\tpageId: sPageId,\n\t\t\t\tspaceId: sSpaceId\n\t\t\t}\n\t\t});\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,
|
|
1
|
+
{"version":3,"file":"Page.js","names":["sap","ui","define","Element","Container","___utils_FESRUtil","addFESRNavigationSource","FESRNavigationSource","Page","extend","metadata","library","properties","title","type","group","defaultValue","icon","subTitle","bgColor","pageId","spaceId","spaceTitle","url","events","press","constructor","_constructor","id","settings","Element.prototype.constructor.call","onPageTilePress","_onPageTilePress","oPage","sPageId","getProperty","sSpaceId","Promise","resolve","getServiceAsync","then","navigationService","navigate","target","semanticObject","action","params","e","reject"],"sources":["Page.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Element, { MetadataOptions } from \"sap/ui/core/Element\";\nimport Container from \"sap/ushell/Container\";\nimport Navigation from \"sap/ushell/services/Navigation\";\nimport { $PageSettings } from \"./Page\";\nimport { IPage } from \"./interface/PageSpaceInterface\";\nimport { addFESRNavigationSource, FESRNavigationSource } from \"./utils/FESRUtil\";\n\n/**\n *\n * Class for managing and storing Pages.\n *\n * @extends sap.ui.core.Element\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121\n * @private\n *\n * @alias sap.cux.home.Page\n */\n\nexport default class Page extends Element {\n\tconstructor(idOrSettings?: string | $PageSettings);\n\tconstructor(id?: string, settings?: $PageSettings);\n\tconstructor(id?: string, settings?: $PageSettings) {\n\t\tsuper(id, settings);\n\t}\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\tproperties: {\n\t\t\t/**\n\t\t\t * Title for the page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\ttitle: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Icon for the page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\ticon: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Subtitle for the page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\tsubTitle: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Background color for the page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\tbgColor: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Id for the corresponding page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\tpageId: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Space id for the corresponding page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\tspaceId: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Space title for the corresponding page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\tspaceTitle: { type: \"string\", group: \"Misc\", defaultValue: \"\" },\n\t\t\t/**\n\t\t\t * Url to be launched for the corresponding page\n\t\t\t * @since 1.120\n\t\t\t */\n\t\t\turl: { type: \"string\", group: \"Misc\", defaultValue: \"\" }\n\t\t},\n\t\tevents: {\n\t\t\t/**\n\t\t\t * Press event for the page\n\t\t\t */\n\t\t\tpress: {}\n\t\t}\n\t};\n\n\tpublic async onPageTilePress(oPage: IPage) {\n\t\tconst sPageId = oPage.getProperty?.(\"pageId\"),\n\t\t\tsSpaceId = oPage.getProperty?.(\"spaceId\");\n\t\tconst navigationService = await Container.getServiceAsync<Navigation>(\"Navigation\");\n\t\taddFESRNavigationSource(FESRNavigationSource.Page);\n\t\tawait navigationService.navigate({\n\t\t\ttarget: {\n\t\t\t\tsemanticObject: \"Launchpad\",\n\t\t\t\taction: \"openFLPPage\"\n\t\t\t},\n\t\t\tparams: {\n\t\t\t\tpageId: sPageId,\n\t\t\t\tspaceId: sSpaceId\n\t\t\t}\n\t\t});\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,gFAAAC,OAAA,EAAAC,SAAA,EAAAC,iBAAA;EAAA;;EAAA,MAUSC,uBAAuB,GAAAD,iBAAA;EAAA,MAAEE,oBAAoB,GAAAF,iBAAA;EAEtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAZA,MAcqBG,IAAI,GAASL,OAAO,CAAAM,MAAA;IAMxBC,QAAQ,EAAoB;MAC3CC,OAAO,EAAE,cAAc;MACvBC,UAAU,EAAE;QACX;AACH;AACA;AACA;QACGC,KAAK,EAAE;UAAEC,IAAI,EAAE,QAAQ;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE;QAAG,CAAC;QAC1D;AACH;AACA;AACA;QACGC,IAAI,EAAE;UAAEH,IAAI,EAAE,QAAQ;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE;QAAG,CAAC;QACzD;AACH;AACA;AACA;QACGE,QAAQ,EAAE;UAAEJ,IAAI,EAAE,QAAQ;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE;QAAG,CAAC;QAC7D;AACH;AACA;AACA;QACGG,OAAO,EAAE;UAAEL,IAAI,EAAE,QAAQ;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE;QAAG,CAAC;QA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AAI,IAAA;QAAA;MACH,CAAC,QAAAO,CAAA;QAAA,OAAAV,OAAA,CAAAW,MAAA,CAAAD,CAAA;MAAA;IAAA;EAAA;EAAA,OAzEmBvC,IAAI;AAAA","ignoreList":[]}
|
package/src/sap/cux/home/Page.ts
CHANGED
|
@@ -8,6 +8,7 @@ import Container from "sap/ushell/Container";
|
|
|
8
8
|
import Navigation from "sap/ushell/services/Navigation";
|
|
9
9
|
import { $PageSettings } from "./Page";
|
|
10
10
|
import { IPage } from "./interface/PageSpaceInterface";
|
|
11
|
+
import { addFESRNavigationSource, FESRNavigationSource } from "./utils/FESRUtil";
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
*
|
|
@@ -85,6 +86,7 @@ export default class Page extends Element {
|
|
|
85
86
|
const sPageId = oPage.getProperty?.("pageId"),
|
|
86
87
|
sSpaceId = oPage.getProperty?.("spaceId");
|
|
87
88
|
const navigationService = await Container.getServiceAsync<Navigation>("Navigation");
|
|
89
|
+
addFESRNavigationSource(FESRNavigationSource.Page);
|
|
88
90
|
await navigationService.navigate({
|
|
89
91
|
target: {
|
|
90
92
|
semanticObject: "Launchpad",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PagePanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/PagePanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,wBAAwB,CAAC;IAOxC,OAAO,OAAO,EAAE,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;IAU1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;IAGtD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;IACzE,OAAO,aAAa,MAAM,4BAA4B,CAAC;IAIvD,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;IACpF,OAAO,EAAE,KAAK,EAAE,MAAM,2CAA2C,CAAC;IAWlE,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;KAsBd,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;;;WAKG;QACH,OAAO,CAAC,gBAAgB;QAKxB;;;WAGG;QACH,OAAO,CAAC,uBAAuB;QAiBxB,mBAAmB,CAAC,iBAAiB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,mBAAmB,EAAE,OAAO,GAAG,IAAI;QAqDrG,qBAAqB;QAIlC,OAAO,CAAC,oBAAoB;QAoB5B,OAAO,CAAC,iBAAiB;QAqEzB,OAAO,CAAC,mBAAmB;QAQ3B,OAAO,CAAC,oBAAoB;QAkB5B,OAAO,CAAC,iBAAiB;QAiBzB,OAAO,CAAC,kBAAkB;gBAaZ,cAAc;gBAkBd,eAAe;QAe7B;;;;;;;;WAQG;QACH,OAAO,CAAC,eAAe;QASvB;;;;;;;WAOG;gBACW,qBAAqB;QAc5B,0BAA0B,CAAC,gBAAgB,EAAE,KAAK,CAAC,yBAAyB,CAAC;QAI7E,yBAAyB,CAAC,gBAAgB,EAAE,KAAK,CAAC,yBAAyB,CAAC;QAInF,OAAO,CAAC,uBAAuB;QAK/B;;;;;WAKG;QACI,cAAc,IAAI,OAAO;KAGhC;CAEA"}
|
|
@@ -153,7 +153,10 @@ sap.ui.define(["sap/m/Button", "sap/m/FlexBox", "sap/m/GenericTile", "sap/m/Illu
|
|
|
153
153
|
renderType: "Bare",
|
|
154
154
|
wrap: "Wrap",
|
|
155
155
|
items: this.getPlaceholderPageTiles()
|
|
156
|
-
}).addStyleClass("pagesFlexGap
|
|
156
|
+
}).addStyleClass("pagesFlexGap sapCuxPagesWrapper");
|
|
157
|
+
if (this.getDeviceType() !== DeviceType.Mobile) {
|
|
158
|
+
this._oWrapperFlexBox.addStyleClass("sapUiSmallMarginTop");
|
|
159
|
+
}
|
|
157
160
|
this._pageWrapper = new VBox(`${this.getId()}-pageContentWrapper`, {
|
|
158
161
|
items: [this._oWrapperFlexBox]
|
|
159
162
|
});
|
|
@@ -258,7 +261,7 @@ sap.ui.define(["sap/m/Button", "sap/m/FlexBox", "sap/m/GenericTile", "sap/m/Illu
|
|
|
258
261
|
hBoxWidth,
|
|
259
262
|
finalTilesWidth,
|
|
260
263
|
wrapperWidth = domRefClientWidth / 16; // Divide by 16 to convert to rem,
|
|
261
|
-
const gap = 1;
|
|
264
|
+
const gap = deviceType === DeviceType.Mobile ? 0.5 : 1;
|
|
262
265
|
pagesContentWrapper.setWidth("100%");
|
|
263
266
|
if (favPagesCount > 0) {
|
|
264
267
|
const pagesPerRow = this.calculatePagesPerRow(favPagesCount, isNewsTileVisible);
|