@sapui5/sap.cux.home 1.140.0 → 1.141.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.
Files changed (126) hide show
  1. package/package.json +1 -1
  2. package/src/sap/cux/home/.library +1 -1
  3. package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
  4. package/src/sap/cux/home/AdvancedSettingsPanel.js +3 -0
  5. package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
  6. package/src/sap/cux/home/AdvancedSettingsPanel.ts +3 -0
  7. package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
  8. package/src/sap/cux/home/AppsAdditionPanel.js +5 -1
  9. package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
  10. package/src/sap/cux/home/AppsAdditionPanel.ts +5 -1
  11. package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
  12. package/src/sap/cux/home/AppsContainer.js +14 -21
  13. package/src/sap/cux/home/AppsContainer.js.map +1 -1
  14. package/src/sap/cux/home/AppsContainer.ts +14 -20
  15. package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
  16. package/src/sap/cux/home/BaseAppPanel.js +1 -0
  17. package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
  18. package/src/sap/cux/home/BaseAppPanel.ts +1 -0
  19. package/src/sap/cux/home/BaseNewsPanel.js +1 -1
  20. package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
  21. package/src/sap/cux/home/BaseNewsPanel.ts +2 -2
  22. package/src/sap/cux/home/BaseSettingsPanel.d.ts +9 -0
  23. package/src/sap/cux/home/BaseSettingsPanel.d.ts.map +1 -1
  24. package/src/sap/cux/home/BaseSettingsPanel.js +13 -0
  25. package/src/sap/cux/home/BaseSettingsPanel.js.map +1 -1
  26. package/src/sap/cux/home/BaseSettingsPanel.ts +15 -0
  27. package/src/sap/cux/home/CardsPanel.js +2 -2
  28. package/src/sap/cux/home/CardsPanel.js.map +1 -1
  29. package/src/sap/cux/home/CardsPanel.ts +2 -2
  30. package/src/sap/cux/home/ErrorPanel.js +2 -2
  31. package/src/sap/cux/home/ErrorPanel.js.map +1 -1
  32. package/src/sap/cux/home/ErrorPanel.ts +2 -2
  33. package/src/sap/cux/home/FavAppPanel.d.ts +4 -0
  34. package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
  35. package/src/sap/cux/home/FavAppPanel.js +189 -148
  36. package/src/sap/cux/home/FavAppPanel.js.map +1 -1
  37. package/src/sap/cux/home/FavAppPanel.ts +49 -28
  38. package/src/sap/cux/home/InsightsContainer.d.ts.map +1 -1
  39. package/src/sap/cux/home/InsightsContainer.js +2 -2
  40. package/src/sap/cux/home/InsightsContainer.js.map +1 -1
  41. package/src/sap/cux/home/InsightsContainer.ts +1 -1
  42. package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
  43. package/src/sap/cux/home/NewsPanel.js +10 -11
  44. package/src/sap/cux/home/NewsPanel.js.map +1 -1
  45. package/src/sap/cux/home/NewsPanel.ts +10 -11
  46. package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
  47. package/src/sap/cux/home/PagePanel.js +4 -1
  48. package/src/sap/cux/home/PagePanel.js.map +1 -1
  49. package/src/sap/cux/home/PagePanel.ts +6 -2
  50. package/src/sap/cux/home/SettingsDialog.d.ts +1 -0
  51. package/src/sap/cux/home/SettingsDialog.d.ts.map +1 -1
  52. package/src/sap/cux/home/SettingsDialog.js +13 -6
  53. package/src/sap/cux/home/SettingsDialog.js.map +1 -1
  54. package/src/sap/cux/home/SettingsDialog.ts +14 -6
  55. package/src/sap/cux/home/SideBySideIconTabFilter.d.ts.map +1 -1
  56. package/src/sap/cux/home/SideBySideIconTabFilter.js +1 -0
  57. package/src/sap/cux/home/SideBySideIconTabFilter.js.map +1 -1
  58. package/src/sap/cux/home/SideBySideIconTabFilter.ts +2 -1
  59. package/src/sap/cux/home/i18n/messagebundle.properties +1 -1
  60. package/src/sap/cux/home/i18n/messagebundle_ar.properties +0 -2
  61. package/src/sap/cux/home/i18n/messagebundle_bg.properties +0 -2
  62. package/src/sap/cux/home/i18n/messagebundle_ca.properties +0 -2
  63. package/src/sap/cux/home/i18n/messagebundle_cnr.properties +0 -2
  64. package/src/sap/cux/home/i18n/messagebundle_cs.properties +0 -2
  65. package/src/sap/cux/home/i18n/messagebundle_cy.properties +0 -2
  66. package/src/sap/cux/home/i18n/messagebundle_da.properties +0 -2
  67. package/src/sap/cux/home/i18n/messagebundle_de.properties +0 -2
  68. package/src/sap/cux/home/i18n/messagebundle_el.properties +0 -2
  69. package/src/sap/cux/home/i18n/messagebundle_en.properties +0 -2
  70. package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +0 -2
  71. package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +1 -3
  72. package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +1 -3
  73. package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +0 -2
  74. package/src/sap/cux/home/i18n/messagebundle_es.properties +0 -2
  75. package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +0 -2
  76. package/src/sap/cux/home/i18n/messagebundle_et.properties +0 -2
  77. package/src/sap/cux/home/i18n/messagebundle_fi.properties +0 -2
  78. package/src/sap/cux/home/i18n/messagebundle_fr.properties +0 -2
  79. package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +0 -2
  80. package/src/sap/cux/home/i18n/messagebundle_hi.properties +0 -2
  81. package/src/sap/cux/home/i18n/messagebundle_hr.properties +0 -2
  82. package/src/sap/cux/home/i18n/messagebundle_hu.properties +0 -2
  83. package/src/sap/cux/home/i18n/messagebundle_id.properties +0 -2
  84. package/src/sap/cux/home/i18n/messagebundle_it.properties +0 -2
  85. package/src/sap/cux/home/i18n/messagebundle_iw.properties +0 -2
  86. package/src/sap/cux/home/i18n/messagebundle_ja.properties +0 -2
  87. package/src/sap/cux/home/i18n/messagebundle_kk.properties +0 -2
  88. package/src/sap/cux/home/i18n/messagebundle_ko.properties +0 -2
  89. package/src/sap/cux/home/i18n/messagebundle_lt.properties +0 -2
  90. package/src/sap/cux/home/i18n/messagebundle_lv.properties +0 -2
  91. package/src/sap/cux/home/i18n/messagebundle_mk.properties +0 -2
  92. package/src/sap/cux/home/i18n/messagebundle_ms.properties +0 -2
  93. package/src/sap/cux/home/i18n/messagebundle_nl.properties +0 -2
  94. package/src/sap/cux/home/i18n/messagebundle_no.properties +0 -2
  95. package/src/sap/cux/home/i18n/messagebundle_pl.properties +0 -2
  96. package/src/sap/cux/home/i18n/messagebundle_pt.properties +0 -2
  97. package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +0 -2
  98. package/src/sap/cux/home/i18n/messagebundle_ro.properties +0 -2
  99. package/src/sap/cux/home/i18n/messagebundle_ru.properties +0 -2
  100. package/src/sap/cux/home/i18n/messagebundle_sh.properties +0 -2
  101. package/src/sap/cux/home/i18n/messagebundle_sk.properties +0 -2
  102. package/src/sap/cux/home/i18n/messagebundle_sl.properties +0 -2
  103. package/src/sap/cux/home/i18n/messagebundle_sr.properties +0 -2
  104. package/src/sap/cux/home/i18n/messagebundle_sv.properties +1 -3
  105. package/src/sap/cux/home/i18n/messagebundle_th.properties +0 -2
  106. package/src/sap/cux/home/i18n/messagebundle_tr.properties +0 -2
  107. package/src/sap/cux/home/i18n/messagebundle_uk.properties +0 -2
  108. package/src/sap/cux/home/i18n/messagebundle_vi.properties +0 -2
  109. package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +0 -2
  110. package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +0 -2
  111. package/src/sap/cux/home/library.d.ts.map +1 -1
  112. package/src/sap/cux/home/library.js +1 -0
  113. package/src/sap/cux/home/library.js.map +1 -1
  114. package/src/sap/cux/home/library.ts +1 -0
  115. package/src/sap/cux/home/utils/AppManager.d.ts +7 -6
  116. package/src/sap/cux/home/utils/AppManager.d.ts.map +1 -1
  117. package/src/sap/cux/home/utils/AppManager.js +1 -1
  118. package/src/sap/cux/home/utils/AppManager.js.map +1 -1
  119. package/src/sap/cux/home/utils/AppManager.ts +9 -10
  120. package/src/sap/cux/home/utils/BatchHelper.d.ts.map +1 -1
  121. package/src/sap/cux/home/utils/BatchHelper.js +1 -1
  122. package/src/sap/cux/home/utils/BatchHelper.js.map +1 -1
  123. package/src/sap/cux/home/utils/BatchHelper.ts +4 -1
  124. package/src/sap/cux/home/utils/UshellPersonalizer.js +1 -1
  125. package/src/sap/cux/home/utils/UshellPersonalizer.js.map +1 -1
  126. package/src/sap/cux/home/utils/UshellPersonalizer.ts +1 -1
@@ -72,7 +72,7 @@ sap.ui.define(["sap/m/Button", "sap/m/FlexItemData", "sap/m/IllustratedMessage",
72
72
  order: 0,
73
73
  growFactor: 1
74
74
  })
75
- });
75
+ }).setWidth("100%");
76
76
  this.newsWrapper = new VBox(`${this.getId()}-newsContentWrapper`, {
77
77
  items: [this.newsVerticalLayout]
78
78
  });
@@ -1 +1 @@
1
- {"version":3,"file":"BaseNewsPanel.js","names":["sap","ui","define","Button","FlexItemData","IllustratedMessage","IllustratedMessageSize","IllustratedMessageType","VBox","VerticalLayout","__BasePanel","___utils_Constants","_interopRequireDefault","obj","__esModule","default","BasePanel","SETTINGS_PANELS_KEYS","BaseNewsPanel","extend","metadata","library","aggregations","content","multiple","singularName","visibility","newsItems","type","constructor","_constructor","id","settings","BasePanel.prototype.constructor.call","init","_init","BasePanel.prototype.init.call","newsVerticalLayout","getId","generateErrorMessage","layoutData","order","growFactor","newsWrapper","items","addContent","getNewsWrapper","_getNewsWrapper","_generateErrorMessage","errorCard","manageNewsButton","text","_i18nBundle","getText","tooltip","press","handleEditNews","bind","oErrorMessage","illustrationSize","Small","illustrationType","NoNotifications","title","description","additionalContent","addStyleClass","wrap","backgroundDesign","visible","height","width","setManageNewsButtonVisibility","_setManageNewsButtonVisibility","setVisible","_handleEditNews","parentContainer","getParent","_getLayout","openSettingsDialog","NEWS"],"sources":["BaseNewsPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Button from \"sap/m/Button\";\nimport FlexItemData from \"sap/m/FlexItemData\";\nimport IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport IllustratedMessageSize from \"sap/m/IllustratedMessageSize\";\nimport IllustratedMessageType from \"sap/m/IllustratedMessageType\";\nimport VBox from \"sap/m/VBox\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport VerticalLayout from \"sap/ui/layout/VerticalLayout\";\nimport { $BaseNewsPanelSettings } from \"./BaseNewsPanel\";\nimport BasePanel from \"./BasePanel\";\nimport NewsAndPagesContainer from \"./NewsAndPagesContainer\";\nimport { SETTINGS_PANELS_KEYS } from \"./utils/Constants\";\n\n/**\n *\n * Base Panel class for managing and storing News.\n *\n * @extends sap.cux.home.BasePanel\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121\n *\n * @abstract\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.BaseNewsPanel\n */\nexport default abstract class BaseNewsPanel extends BasePanel {\n\tconstructor(idOrSettings?: string | $BaseNewsPanelSettings);\n\tconstructor(id?: string, settings?: $BaseNewsPanelSettings);\n\t/**\n\t * Constructor for a new Base News Panel.\n\t *\n\t * @param {string} [id] ID for the new panel, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new panel\n\t */\n\tpublic constructor(id?: string, settings?: $BaseNewsPanelSettings) {\n\t\tsuper(id, settings);\n\t}\n\n\tprivate errorCard!: VBox;\n\tprivate newsVerticalLayout!: VerticalLayout;\n\tprivate newsWrapper!: VBox;\n\tprivate manageNewsButton!: Button;\n\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\taggregations: {\n\t\t\t/**\n\t\t\t * Specifies the content aggregation of the panel.\n\t\t\t */\n\t\t\tcontent: { multiple: true, singularName: \"content\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Holds the news aggregation\n\t\t\t */\n\t\t\tnewsItems: { type: \"sap.cux.home.BaseNewsItem\", singularName: \"newsItem\", multiple: true }\n\t\t}\n\t};\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tsuper.init();\n\n\t\tthis.newsVerticalLayout = new VerticalLayout(`${this.getId()}-newsContent`, {\n\t\t\tcontent: [this.generateErrorMessage()],\n\t\t\tlayoutData: new FlexItemData({\n\t\t\t\tid: `${this.getId()}-flexItemdata`,\n\t\t\t\torder: 0,\n\t\t\t\tgrowFactor: 1\n\t\t\t})\n\t\t});\n\t\tthis.newsWrapper = new VBox(`${this.getId()}-newsContentWrapper`, { items: [ this.newsVerticalLayout ] });\n\t\tthis.addContent(this.newsWrapper);\n\t}\n\n\t/**\n\t * Generates app wrapper for displaying apps.\n\t * @private\n\t * @returns The generated apps wrapper.\n\t */\n\tpublic getNewsWrapper(): VerticalLayout {\n\t\treturn this.newsVerticalLayout;\n\t}\n\n\t/**\n\t * Generates the error message wrapper with illustrated message.\n\t * @private\n\t * @returns Wrapper with illustrated message.\n\t */\n\tprotected generateErrorMessage(): VBox {\n\t\tif (!this.errorCard) {\n\t\t\tthis.manageNewsButton = new Button(`${this.getId()}-idManageNewsBtn`, {\n\t\t\t\ttext: this._i18nBundle.getText(\"editLinkNews\"),\n\t\t\t\ttooltip: this._i18nBundle.getText(\"editLinkNews\"),\n\t\t\t\ttype: \"Emphasized\",\n\t\t\t\tpress: this.handleEditNews.bind(this)\n\t\t\t});\n\t\t\tconst oErrorMessage = new IllustratedMessage(`${this.getId()}-errorMessage`, {\n\t\t\t\tillustrationSize: IllustratedMessageSize.Small,\n\t\t\t\tillustrationType: IllustratedMessageType.NoNotifications,\n\t\t\t\ttitle: this._i18nBundle.getText(\"noNewsTitle\"),\n\t\t\t\tdescription: this._i18nBundle.getText(\"noNewsDescription\"),\n\t\t\t\tadditionalContent: [this.manageNewsButton]\n\t\t\t}).addStyleClass(\"customIllustratedMessage\");\n\t\t\tthis.errorCard = new VBox(`${this.getId()}-errorCard`, {\n\t\t\t\twrap: \"Wrap\",\n\t\t\t\tbackgroundDesign: \"Solid\",\n\t\t\t\titems: [oErrorMessage],\n\t\t\t\tvisible: false,\n\t\t\t\theight: \"17rem\",\n\t\t\t\twidth: \"100%\"\n\t\t\t}).addStyleClass(\"sapUiRoundedBorder noCardsBorder sapUiSmallMarginTopBottom\");\n\t\t}\n\t\treturn this.errorCard;\n\t}\n\n\t/**\n\t * Set the visibility of the manage news button.\n\t * @param visible - A boolean indicating whether the manage news should be visible or not.\n\t * @private\n\t */\n\tprotected setManageNewsButtonVisibility(visible: boolean): void {\n\t\tthis.manageNewsButton.setVisible(visible);\n\t}\n\n\t/**\n\t * Handles the edit news event.\n\t * Opens the news dialog for managing news data.\n\t * @private\n\t */\n\tprotected handleEditNews() {\n\t\tconst parentContainer = this.getParent() as NewsAndPagesContainer;\n\t\tparentContainer?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.NEWS);\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,iOAAAC,MAAA,EAAAC,YAAA,EAAAC,kBAAA,EAAAC,sBAAA,EAAAC,sBAAA,EAAAC,IAAA,EAAAC,cAAA,EAAAC,WAAA,EAAAC,kBAAA;EAAA;;EAAA,SAAAC,uBAAAC,GAAA;IAAA,OAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,CAAAE,OAAA,mBAAAF,GAAA,CAAAE,OAAA,GAAAF,GAAA;EAAA;EAAA,MAcOG,SAAS,GAAAJ,sBAAA,CAAAF,WAAA;EAAA,MAEPO,oBAAoB,GAAAN,kBAAA;EAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAfA,MAgB8BO,aAAa,GAASF,SAAS,CAAAG,MAAA;IAkB5CC,QAA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IACWuB,6BAA6B,WAAAC,+BAACJ,OAAgB,EAAQ;MAC/D,IAAI,CAACnB,gBAAgB,CAACwB,UAAU,CAACL,OAAO,CAAC;IAC1C,CAAC;IAED;AACD;AACA;AACA;AACA;IACWb,cAAc,WAAAmB,gBAAA,EAAG;MAC1B,MAAMC,eAAe,GAAG,IAAI,CAACC,SAAS,CAAC,CAA0B;MACjED,eAAe,EAAEE,UAAU,CAAC,CAAC,CAACC,kBAAkB,CAAC9D,oBAAoB,CAAC+D,IAAI,CAAC;IAC5E;EAAC;EAAA,OA/G4B9D,aAAa;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"BaseNewsPanel.js","names":["sap","ui","define","Button","FlexItemData","IllustratedMessage","IllustratedMessageSize","IllustratedMessageType","VBox","VerticalLayout","__BasePanel","___utils_Constants","_interopRequireDefault","obj","__esModule","default","BasePanel","SETTINGS_PANELS_KEYS","BaseNewsPanel","extend","metadata","library","aggregations","content","multiple","singularName","visibility","newsItems","type","constructor","_constructor","id","settings","BasePanel.prototype.constructor.call","init","_init","BasePanel.prototype.init.call","newsVerticalLayout","getId","generateErrorMessage","layoutData","order","growFactor","setWidth","newsWrapper","items","addContent","getNewsWrapper","_getNewsWrapper","_generateErrorMessage","errorCard","manageNewsButton","text","_i18nBundle","getText","tooltip","press","handleEditNews","bind","oErrorMessage","illustrationSize","Small","illustrationType","NoNotifications","title","description","additionalContent","addStyleClass","wrap","backgroundDesign","visible","height","width","setManageNewsButtonVisibility","_setManageNewsButtonVisibility","setVisible","_handleEditNews","parentContainer","getParent","_getLayout","openSettingsDialog","NEWS"],"sources":["BaseNewsPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport Button from \"sap/m/Button\";\nimport FlexItemData from \"sap/m/FlexItemData\";\nimport IllustratedMessage from \"sap/m/IllustratedMessage\";\nimport IllustratedMessageSize from \"sap/m/IllustratedMessageSize\";\nimport IllustratedMessageType from \"sap/m/IllustratedMessageType\";\nimport VBox from \"sap/m/VBox\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport VerticalLayout from \"sap/ui/layout/VerticalLayout\";\nimport { $BaseNewsPanelSettings } from \"./BaseNewsPanel\";\nimport BasePanel from \"./BasePanel\";\nimport NewsAndPagesContainer from \"./NewsAndPagesContainer\";\nimport { SETTINGS_PANELS_KEYS } from \"./utils/Constants\";\n\n/**\n *\n * Base Panel class for managing and storing News.\n *\n * @extends sap.cux.home.BasePanel\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121\n *\n * @abstract\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.BaseNewsPanel\n */\nexport default abstract class BaseNewsPanel extends BasePanel {\n\tconstructor(idOrSettings?: string | $BaseNewsPanelSettings);\n\tconstructor(id?: string, settings?: $BaseNewsPanelSettings);\n\t/**\n\t * Constructor for a new Base News Panel.\n\t *\n\t * @param {string} [id] ID for the new panel, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new panel\n\t */\n\tpublic constructor(id?: string, settings?: $BaseNewsPanelSettings) {\n\t\tsuper(id, settings);\n\t}\n\n\tprivate errorCard!: VBox;\n\tprivate newsVerticalLayout!: VerticalLayout;\n\tprivate newsWrapper!: VBox;\n\tprivate manageNewsButton!: Button;\n\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\taggregations: {\n\t\t\t/**\n\t\t\t * Specifies the content aggregation of the panel.\n\t\t\t */\n\t\t\tcontent: { multiple: true, singularName: \"content\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Holds the news aggregation\n\t\t\t */\n\t\t\tnewsItems: { type: \"sap.cux.home.BaseNewsItem\", singularName: \"newsItem\", multiple: true }\n\t\t}\n\t};\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tsuper.init();\n\n\t\tthis.newsVerticalLayout = new VerticalLayout(`${this.getId()}-newsContent`, {\n\t\t\tcontent: [this.generateErrorMessage()],\n\t\t\tlayoutData: new FlexItemData({\n\t\t\t\tid: `${this.getId()}-flexItemdata`,\n\t\t\t\torder: 0,\n\t\t\t\tgrowFactor: 1\n\t\t\t})\n\t\t}).setWidth(\"100%\");\n\t\tthis.newsWrapper = new VBox(`${this.getId()}-newsContentWrapper`, { items: [this.newsVerticalLayout] });\n\t\tthis.addContent(this.newsWrapper);\n\t}\n\n\t/**\n\t * Generates app wrapper for displaying apps.\n\t * @private\n\t * @returns The generated apps wrapper.\n\t */\n\tpublic getNewsWrapper(): VerticalLayout {\n\t\treturn this.newsVerticalLayout;\n\t}\n\n\t/**\n\t * Generates the error message wrapper with illustrated message.\n\t * @private\n\t * @returns Wrapper with illustrated message.\n\t */\n\tprotected generateErrorMessage(): VBox {\n\t\tif (!this.errorCard) {\n\t\t\tthis.manageNewsButton = new Button(`${this.getId()}-idManageNewsBtn`, {\n\t\t\t\ttext: this._i18nBundle.getText(\"editLinkNews\"),\n\t\t\t\ttooltip: this._i18nBundle.getText(\"editLinkNews\"),\n\t\t\t\ttype: \"Emphasized\",\n\t\t\t\tpress: this.handleEditNews.bind(this)\n\t\t\t});\n\t\t\tconst oErrorMessage = new IllustratedMessage(`${this.getId()}-errorMessage`, {\n\t\t\t\tillustrationSize: IllustratedMessageSize.Small,\n\t\t\t\tillustrationType: IllustratedMessageType.NoNotifications,\n\t\t\t\ttitle: this._i18nBundle.getText(\"noNewsTitle\"),\n\t\t\t\tdescription: this._i18nBundle.getText(\"noNewsDescription\"),\n\t\t\t\tadditionalContent: [this.manageNewsButton]\n\t\t\t}).addStyleClass(\"customIllustratedMessage\");\n\t\t\tthis.errorCard = new VBox(`${this.getId()}-errorCard`, {\n\t\t\t\twrap: \"Wrap\",\n\t\t\t\tbackgroundDesign: \"Solid\",\n\t\t\t\titems: [oErrorMessage],\n\t\t\t\tvisible: false,\n\t\t\t\theight: \"17rem\",\n\t\t\t\twidth: \"100%\"\n\t\t\t}).addStyleClass(\"sapUiRoundedBorder noCardsBorder sapUiSmallMarginTopBottom\");\n\t\t}\n\t\treturn this.errorCard;\n\t}\n\n\t/**\n\t * Set the visibility of the manage news button.\n\t * @param visible - A boolean indicating whether the manage news should be visible or not.\n\t * @private\n\t */\n\tprotected setManageNewsButtonVisibility(visible: boolean): void {\n\t\tthis.manageNewsButton.setVisible(visible);\n\t}\n\n\t/**\n\t * Handles the edit news event.\n\t * Opens the news dialog for managing news data.\n\t * @private\n\t */\n\tprotected handleEditNews() {\n\t\tconst parentContainer = this.getParent() as NewsAndPagesContainer;\n\t\tparentContainer?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.NEWS);\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,iOAAAC,MAAA,EAAAC,YAAA,EAAAC,kBAAA,EAAAC,sBAAA,EAAAC,sBAAA,EAAAC,IAAA,EAAAC,cAAA,EAAAC,WAAA,EAAAC,kBAAA;EAAA;;EAAA,SAAAC,uBAAAC,GAAA;IAAA,OAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,CAAAE,OAAA,mBAAAF,GAAA,CAAAE,OAAA,GAAAF,GAAA;EAAA;EAAA,MAcOG,SAAS,GAAAJ,sBAAA,CAAAF,WAAA;EAAA,MAEPO,oBAAoB,GAAAN,kBAAA;EAE7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAfA,MAgB8BO,aAAa,GAASF,SAAS,CAAAG,MAAA;IAkB5CC,QAAQ,EAAoB;MAC3CC,OAAO,EAAE,cAAc;MACvBC,YAAY,EAAE;QACb;AACH;AACA;QACGC,OAAO,EAAE;UAAEC,QAAQ,EAAE,IAAI;UAAEC,YAAY,EAAE,SAAS;UAAEC,UAAU,EAAE;QAAS,CAAC;QAC1E;AACH;AACA;QAC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AmB,gBAAA,EAAG;MAC1B,MAAMC,eAAe,GAAG,IAAI,CAACC,SAAS,CAAC,CAA0B;MACjED,eAAe,EAAEE,UAAU,CAAC,CAAC,CAACC,kBAAkB,CAAC/D,oBAAoB,CAACgE,IAAI,CAAC;IAC5E;EAAC;EAAA,OA/G4B/D,aAAa;AAAA","ignoreList":[]}
@@ -80,8 +80,8 @@ export default abstract class BaseNewsPanel extends BasePanel {
80
80
  order: 0,
81
81
  growFactor: 1
82
82
  })
83
- });
84
- this.newsWrapper = new VBox(`${this.getId()}-newsContentWrapper`, { items: [ this.newsVerticalLayout ] });
83
+ }).setWidth("100%");
84
+ this.newsWrapper = new VBox(`${this.getId()}-newsContentWrapper`, { items: [this.newsVerticalLayout] });
85
85
  this.addContent(this.newsWrapper);
86
86
  }
87
87
 
@@ -58,6 +58,15 @@ declare module "sap/cux/home/BaseSettingsPanel" {
58
58
  * @private
59
59
  */
60
60
  protected _persistDialog(dialog: BaseSettingsDialog): void;
61
+ /**
62
+ * Checks if the dialog is persisted by examining the parent layout's persistence properties.
63
+ *
64
+ * @param {BaseSettingsDialog} dialog - The dialog to check for persistence status
65
+ * @returns {boolean} True if the dialog is persisted (either settings dialog or content addition dialog), false otherwise
66
+ *
67
+ * @private
68
+ */
69
+ protected _isDialogPersisted(dialog: BaseSettingsDialog): boolean;
61
70
  /**
62
71
  * Returns the KeyUser Changes made by user.
63
72
  *
@@ -1 +1 @@
1
- {"version":3,"file":"BaseSettingsPanel.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/BaseSettingsPanel.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,gCAAgC,CAAC;IAChD;;;OAGG;IAEH,OAAO,cAAc,MAAM,8BAA8B,CAAC;IAC1D,OAAO,MAAM,MAAM,cAAc,CAAC;IAClC,OAAO,KAAK,MAAM,aAAa,CAAC;IAEhC,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;IAC9D,OAAO,KAAK,EAAE,eAAe,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,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAsDvC;QAEF;;;;;WAKG;QACI,IAAI,IAAI,IAAI;QAKnB;;;;;WAKG;QACH,SAAS,CAAC,SAAS,IAAI,SAAS,GAAG,UAAU;QAI7C;;;;;WAKG;QACH,SAAS,CAAC,cAAc,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;QAiB1D;;;;;;;WAOG;QACH,SAAS,CAAC,kBAAkB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO;QAOjE;;;;WAIG;QACI,iBAAiB,IAAI,KAAK,CAAC,cAAc,CAAC;QAIjD;;;;WAIG;QACI,iBAAiB,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;QAItD;;;;WAIG;QACI,mBAAmB,IAAI,IAAI;QAGlC,SAAS,CAAC,mBAAmB,CAAC,SAAS,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,GAAG,IAAI;QAmBvG;;;;;WAKG;QACI,gBAAgB,IAAI,MAAM,EAAE;QAInC;;;;;;WAMG;QACI,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,iBAAiB;QAMzD;;;;;;;WAOG;QACI,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,iBAAiB;QAM3E;;;;;;WAMG;QACI,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;QAMxD;;;;;;WAMG;QACU,WAAW,IAAI,OAAO,CAAC,OAAO,CAAC;KAG5C;CAEA"}
@@ -161,6 +161,19 @@ sap.ui.define(["sap/ui/core/dnd/DragDropInfo", "sap/ui/core/Element", "sap/ui/co
161
161
  layout?.setProperty(persistPropertyName, true, true);
162
162
  }
163
163
  },
164
+ /**
165
+ * Checks if the dialog is persisted by examining the parent layout's persistence properties.
166
+ *
167
+ * @param {BaseSettingsDialog} dialog - The dialog to check for persistence status
168
+ * @returns {boolean} True if the dialog is persisted (either settings dialog or content addition dialog), false otherwise
169
+ *
170
+ * @private
171
+ */
172
+ _isDialogPersisted: function _isDialogPersisted(dialog) {
173
+ const layout = dialog.getParent();
174
+ if (!layout) return false;
175
+ return layout.getProperty("settingsDialogPersisted") === true || layout.getProperty("contentAdditionDialogPersisted") === true;
176
+ },
164
177
  /**
165
178
  * Returns the KeyUser Changes made by user.
166
179
  *
@@ -1 +1 @@
1
- {"version":3,"file":"BaseSettingsPanel.js","names":["sap","ui","define","DragDropInfo","Element","Lib","sap_ui_core_library","___utils_DragDropUtils","dnd","attachKeyboardHandler","BaseSettingsPanel","extend","metadata","library","properties","key","type","group","defaultValue","visibility","title","icon","showHeader","defaultAggregation","aggregations","content","singularName","multiple","actionButtons","associations","panel","events","panelNavigated","parameters","context","onDialogClose","constructor","_constructor","id","settings","Element.prototype.constructor.call","_keyuserChanges","init","_init","_i18nBundle","getResourceBundleFor","_actionButtonsCache","_getPanel","getElementById","getAssociation","_persistDialog","dialog","layout","getParent","keyMap","dialogName","getMetadata","getName","persistPropertyName","undefined","setProperty","getKeyUserChanges","_getKeyUserChanges","addKeyUserChanges","_addKeyUserChanges","change","push","clearKeyUserChanges","_clearKeyUserChanges","addDragDropConfigTo","_addDragDropConfigTo","container","dropHandler","addDragDropConfig","getId","sourceAggregation","targetAggregation","dropPosition","DropPosition","On","dropLayout","DropLayout","Horizontal","drop","attachBrowserEvent","event","disableNavigation","metaKey","ctrlKey","dragDropEvent","getActionButtons","_getActionButtons","slice","addActionButton","_addActionButton","button","addAggregation","insertActionButton","_insertActionButton","index","splice","insertAggregation","removeActionButton","_removeActionButton","removedButton","indexOf","removeAggregation","isSupported","_isSupported","Promise","resolve","e","reject"],"sources":["BaseSettingsPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport ResourceBundle from \"sap/base/i18n/ResourceBundle\";\nimport Button from \"sap/m/Button\";\nimport Table from \"sap/m/Table\";\nimport DragDropInfo from \"sap/ui/core/dnd/DragDropInfo\";\nimport { DropInfo$DropEvent } from \"sap/ui/core/dnd/DropInfo\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport Element from \"sap/ui/core/Element\";\nimport Lib from \"sap/ui/core/Lib\";\nimport { dnd } from \"sap/ui/core/library\";\nimport BaseLayout from \"./BaseLayout\";\nimport BasePanel from \"./BasePanel\";\nimport BaseSettingsDialog from \"./BaseSettingsDialog\";\nimport { $BaseSettingsPanelSettings } from \"./BaseSettingsPanel\";\nimport { IKeyUserChange } from \"./interface/KeyUserInterface\";\nimport { attachKeyboardHandler } from \"./utils/DragDropUtils\";\n\n/**\n *\n * Abstract base class for panels inside My Home Settings Dialog.\n *\n * @extends sap.ui.core.Element\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121\n *\n * @abstract\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.BaseSettingsPanel\n */\nexport default abstract class BaseSettingsPanel extends Element {\n\tprotected _i18nBundle!: ResourceBundle;\n\tprivate _keyuserChanges: Array<IKeyUserChange> = [];\n\tprivate _actionButtonsCache!: Button[];\n\n\tconstructor(id?: string | $BaseSettingsPanelSettings);\n\tconstructor(id?: string, settings?: $BaseSettingsPanelSettings);\n\t/**\n\t * Constructor for a new Base Settings Panel.\n\t *\n\t * @param {string} [id] ID for the new control, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new control\n\t */\n\tpublic constructor(id?: string, settings?: $BaseSettingsPanelSettings) {\n\t\tsuper(id, settings);\n\t}\n\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\tproperties: {\n\t\t\t/**\n\t\t\t * Key of the settings panel.\n\t\t\t */\n\t\t\tkey: { type: \"string\", group: \"Misc\", defaultValue: \"\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Title of the settings panel.\n\t\t\t */\n\t\t\ttitle: { type: \"string\", group: \"Misc\", defaultValue: \"\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Icon of the settings panel.\n\t\t\t */\n\t\t\ticon: { type: \"sap.ui.core.URI\", group: \"Misc\", defaultValue: \"\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Specifies if header should be shown for the settings panel page.\n\t\t\t */\n\t\t\tshowHeader: { type: \"boolean\", group: \"Misc\", defaultValue: true, visibility: \"hidden\" }\n\t\t},\n\t\tdefaultAggregation: \"content\",\n\t\taggregations: {\n\t\t\t/**\n\t\t\t * Content aggregation of the settings panel.\n\t\t\t */\n\t\t\tcontent: { type: \"sap.ui.core.Control\", singularName: \"content\", multiple: true, visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Holds the actions to be shown within the settings panel.\n\t\t\t */\n\t\t\tactionButtons: { type: \"sap.m.Button\", multiple: true, singularName: \"actionButton\", visibility: \"hidden\" }\n\t\t},\n\t\tassociations: {\n\t\t\t/**\n\t\t\t * Associations of the settings panel.\n\t\t\t * Id of the panel associated with the settings panel to be provided.\n\t\t\t * In case of multiple panels with same Id, the first panel will be associated.\n\t\t\t * If no panel is found with the provided id, the settings panel will not be associated with any panel.\n\t\t\t */\n\t\t\tpanel: { type: \"string\" }\n\t\t},\n\t\tevents: {\n\t\t\t/**\n\t\t\t * Fired whenever the panel has been navigated to.\n\t\t\t */\n\t\t\tpanelNavigated: {\n\t\t\t\tparameters: {\n\t\t\t\t\tcontext: { type: \"object\" }\n\t\t\t\t}\n\t\t\t},\n\t\t\t/**\n\t\t\t * Fired whenever the associated settings dialog is closed.\n\t\t\t */\n\t\t\tonDialogClose: {}\n\t\t}\n\t};\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @public\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tthis._i18nBundle = Lib.getResourceBundleFor(\"sap.cux.home.i18n\") as ResourceBundle;\n\t\tthis._actionButtonsCache = [];\n\t}\n\n\t/**\n\t * Retrieves the BasePanel or BaseLayout associated with the BaseSettingsPanel.\n\t *\n\t * @returns {BasePanel | BaseLayout} The panel or layout associated with the BaseSettingsPanel\n\t * @private\n\t */\n\tprotected _getPanel(): BasePanel | BaseLayout {\n\t\treturn Element.getElementById(this.getAssociation(\"panel\", null) as string) as BasePanel | BaseLayout;\n\t}\n\n\t/**\n\t * Persists the dialog state by setting a property on the parent layout\n\t * indicating that the settings dialog should be persisted.\n\t *\n\t * @private\n\t */\n\tprotected _persistDialog(dialog: BaseSettingsDialog): void {\n\t\tif (!dialog) return;\n\n\t\tconst layout = dialog.getParent() as BaseLayout;\n\t\tconst keyMap = {\n\t\t\t\"sap.cux.home.SettingsDialog\": \"settingsDialogPersisted\",\n\t\t\t\"sap.cux.home.ContentAdditionDialog\": \"contentAdditionDialogPersisted\"\n\t\t};\n\n\t\tconst dialogName = dialog.getMetadata().getName();\n\t\tconst persistPropertyName = dialogName in keyMap ? keyMap[dialogName as keyof typeof keyMap] : undefined;\n\n\t\tif (persistPropertyName) {\n\t\t\tlayout?.setProperty(persistPropertyName, true, true);\n\t\t}\n\t}\n\n\t/**\n\t * Returns the KeyUser Changes made by user.\n\t *\n\t * @public\n\t */\n\tpublic getKeyUserChanges(): Array<IKeyUserChange> {\n\t\treturn this._keyuserChanges;\n\t}\n\n\t/**\n\t * Add Changes made by user in case of KeyUser Settings Panel.\n\t *\n\t * @public\n\t */\n\tpublic addKeyUserChanges(change: IKeyUserChange): void {\n\t\tthis._keyuserChanges.push(change);\n\t}\n\n\t/**\n\t * Clear all KeyUser Changes made by user.\n\t *\n\t * @public\n\t */\n\tpublic clearKeyUserChanges(): void {\n\t\tthis._keyuserChanges = [];\n\t}\n\tprotected addDragDropConfigTo(container: Table, dropHandler: (event: DropInfo$DropEvent) => void): void {\n\t\tcontainer\n\t\t\t.addDragDropConfig(\n\t\t\t\tnew DragDropInfo(`${container.getId()}--settingsDragDropConfig`, {\n\t\t\t\t\tsourceAggregation: \"items\",\n\t\t\t\t\ttargetAggregation: \"items\",\n\t\t\t\t\tdropPosition: dnd.DropPosition.On,\n\t\t\t\t\tdropLayout: dnd.DropLayout.Horizontal,\n\t\t\t\t\tdrop: dropHandler\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attachBrowserEvent(\"keydown\", (event: KeyboardEvent) => {\n\t\t\t\tconst disableNavigation = event.metaKey || event.ctrlKey;\n\t\t\t\tvoid attachKeyboardHandler(event, disableNavigation, (dragDropEvent: DropInfo$DropEvent) => {\n\t\t\t\t\tdropHandler(dragDropEvent);\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\t/**\n\t * Retrieves the action buttons from the panel.\n\t *\n\t * @public\n\t * @returns {Button[]} array of action buttons.\n\t */\n\tpublic getActionButtons(): Button[] {\n\t\treturn this._actionButtonsCache.slice();\n\t}\n\n\t/**\n\t * Adds an action button to the panel.\n\t *\n\t * @public\n\t * @param {Button} button - The button to add.\n\t * @returns {BaseSettingsPanel} The instance of the panel for chaining.\n\t */\n\tpublic addActionButton(button: Button): BaseSettingsPanel {\n\t\tthis._actionButtonsCache.push(button);\n\t\tthis.addAggregation(\"actionButtons\", button);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Inserts an action button at a specific index in the panel.\n\t *\n\t * @public\n\t * @param {Button} button - The button to insert.\n\t * @param {number} index - The index at which to insert the button.\n\t * @returns {BaseSettingsPanel} The instance of the panel for chaining.\n\t */\n\tpublic insertActionButton(button: Button, index: number): BaseSettingsPanel {\n\t\tthis._actionButtonsCache.splice(index, 0, button);\n\t\tthis.insertAggregation(\"actionButtons\", button, index);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes an action button from the panel.\n\t *\n\t * @public\n\t * @param {Button} button - The button to remove.\n\t * @returns {Button | null} The removed button or null if not found.\n\t */\n\tpublic removeActionButton(button: Button): Button | null {\n\t\tconst removedButton = this._actionButtonsCache.splice(this._actionButtonsCache.indexOf(button), 1);\n\t\tthis.removeAggregation(\"actionButtons\", button);\n\t\treturn removedButton[0] || null;\n\t}\n\n\t/**\n\t * Checks if the panel is supported. To be overridden by subclasses.\n\t *\n\t * @public\n\t * @async\n\t * @returns {Promise<boolean>} A promise that resolves to true if the panel is supported.\n\t */\n\tpublic async isSupported(): Promise<boolean> {\n\t\treturn Promise.resolve(true);\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,uIAAAC,YAAA,EAAAC,OAAA,EAAAC,GAAA,EAAAC,mBAAA,EAAAC,sBAAA;EAAA;;EAAA,MAaSC,GAAG,GAAAF,mBAAA;EAAA,MAMHG,qBAAqB,GAAAF,sBAAA;EAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAfA,MAgB8BG,iBAAiB,GAASN,OAAO,CAAAO,MAAA;IAiB9CC,QAAQ,EAAoB;MAC3CC,OAAO,EAAE,cAAc;MACvBC,UAAU,EAAE;QACX;AACH;AACA;QACGC,GAAG,EAAE;UAAEC,IAAI,EAAE,QAAQ;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE,EAAE;UAAEC,UAAU,EAAE;QAAS,CAAC;QAC9E;AACH;AACA;QACGC,KAAK,EAAE;UAAEJ,IAAI,EAAE,QAAQ;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE,EAAE;UAAEC,UAAU,EAAE;QAAS,CAAC;QAChF;AACH;AACA;QACGE,IAAI,EAAE;UAAEL,IAAI,EAAE,iBAAiB;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE,EAAE;UAAEC,UAAU,EAAE;QAAS,CAAC;QACxF;AACH;AACA;QACGG,UAAU,EAAE;UAAEN,IAAI,EAAE,SAAS;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE,IAAI;UAAEC,UAAU,EAAE;QAAS;MACxF,CAAC;MACDI,kBAAkB,EAAE,SAAS;MAC7BC,YAAY,EAAE;QACb;AACH;AACA;QACGC,OAAO,EAAE;UAAET,IAAI,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CAAC,QAAAC,CAAA;QAAA,OAAAF,OAAA,CAAAG,MAAA,CAAAD,CAAA;MAAA;IAAA;EAAA;EAAA,OA7N4BrG,iBAAiB;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"BaseSettingsPanel.js","names":["sap","ui","define","DragDropInfo","Element","Lib","sap_ui_core_library","___utils_DragDropUtils","dnd","attachKeyboardHandler","BaseSettingsPanel","extend","metadata","library","properties","key","type","group","defaultValue","visibility","title","icon","showHeader","defaultAggregation","aggregations","content","singularName","multiple","actionButtons","associations","panel","events","panelNavigated","parameters","context","onDialogClose","constructor","_constructor","id","settings","Element.prototype.constructor.call","_keyuserChanges","init","_init","_i18nBundle","getResourceBundleFor","_actionButtonsCache","_getPanel","getElementById","getAssociation","_persistDialog","dialog","layout","getParent","keyMap","dialogName","getMetadata","getName","persistPropertyName","undefined","setProperty","_isDialogPersisted","getProperty","getKeyUserChanges","_getKeyUserChanges","addKeyUserChanges","_addKeyUserChanges","change","push","clearKeyUserChanges","_clearKeyUserChanges","addDragDropConfigTo","_addDragDropConfigTo","container","dropHandler","addDragDropConfig","getId","sourceAggregation","targetAggregation","dropPosition","DropPosition","On","dropLayout","DropLayout","Horizontal","drop","attachBrowserEvent","event","disableNavigation","metaKey","ctrlKey","dragDropEvent","getActionButtons","_getActionButtons","slice","addActionButton","_addActionButton","button","addAggregation","insertActionButton","_insertActionButton","index","splice","insertAggregation","removeActionButton","_removeActionButton","removedButton","indexOf","removeAggregation","isSupported","_isSupported","Promise","resolve","e","reject"],"sources":["BaseSettingsPanel.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\n\nimport ResourceBundle from \"sap/base/i18n/ResourceBundle\";\nimport Button from \"sap/m/Button\";\nimport Table from \"sap/m/Table\";\nimport DragDropInfo from \"sap/ui/core/dnd/DragDropInfo\";\nimport { DropInfo$DropEvent } from \"sap/ui/core/dnd/DropInfo\";\nimport type { MetadataOptions } from \"sap/ui/core/Element\";\nimport Element from \"sap/ui/core/Element\";\nimport Lib from \"sap/ui/core/Lib\";\nimport { dnd } from \"sap/ui/core/library\";\nimport BaseLayout from \"./BaseLayout\";\nimport BasePanel from \"./BasePanel\";\nimport BaseSettingsDialog from \"./BaseSettingsDialog\";\nimport { $BaseSettingsPanelSettings } from \"./BaseSettingsPanel\";\nimport { IKeyUserChange } from \"./interface/KeyUserInterface\";\nimport { attachKeyboardHandler } from \"./utils/DragDropUtils\";\n\n/**\n *\n * Abstract base class for panels inside My Home Settings Dialog.\n *\n * @extends sap.ui.core.Element\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.121\n *\n * @abstract\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.BaseSettingsPanel\n */\nexport default abstract class BaseSettingsPanel extends Element {\n\tprotected _i18nBundle!: ResourceBundle;\n\tprivate _keyuserChanges: Array<IKeyUserChange> = [];\n\tprivate _actionButtonsCache!: Button[];\n\n\tconstructor(id?: string | $BaseSettingsPanelSettings);\n\tconstructor(id?: string, settings?: $BaseSettingsPanelSettings);\n\t/**\n\t * Constructor for a new Base Settings Panel.\n\t *\n\t * @param {string} [id] ID for the new control, generated automatically if an ID is not provided\n\t * @param {object} [settings] Initial settings for the new control\n\t */\n\tpublic constructor(id?: string, settings?: $BaseSettingsPanelSettings) {\n\t\tsuper(id, settings);\n\t}\n\n\tstatic readonly metadata: MetadataOptions = {\n\t\tlibrary: \"sap.cux.home\",\n\t\tproperties: {\n\t\t\t/**\n\t\t\t * Key of the settings panel.\n\t\t\t */\n\t\t\tkey: { type: \"string\", group: \"Misc\", defaultValue: \"\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Title of the settings panel.\n\t\t\t */\n\t\t\ttitle: { type: \"string\", group: \"Misc\", defaultValue: \"\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Icon of the settings panel.\n\t\t\t */\n\t\t\ticon: { type: \"sap.ui.core.URI\", group: \"Misc\", defaultValue: \"\", visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Specifies if header should be shown for the settings panel page.\n\t\t\t */\n\t\t\tshowHeader: { type: \"boolean\", group: \"Misc\", defaultValue: true, visibility: \"hidden\" }\n\t\t},\n\t\tdefaultAggregation: \"content\",\n\t\taggregations: {\n\t\t\t/**\n\t\t\t * Content aggregation of the settings panel.\n\t\t\t */\n\t\t\tcontent: { type: \"sap.ui.core.Control\", singularName: \"content\", multiple: true, visibility: \"hidden\" },\n\t\t\t/**\n\t\t\t * Holds the actions to be shown within the settings panel.\n\t\t\t */\n\t\t\tactionButtons: { type: \"sap.m.Button\", multiple: true, singularName: \"actionButton\", visibility: \"hidden\" }\n\t\t},\n\t\tassociations: {\n\t\t\t/**\n\t\t\t * Associations of the settings panel.\n\t\t\t * Id of the panel associated with the settings panel to be provided.\n\t\t\t * In case of multiple panels with same Id, the first panel will be associated.\n\t\t\t * If no panel is found with the provided id, the settings panel will not be associated with any panel.\n\t\t\t */\n\t\t\tpanel: { type: \"string\" }\n\t\t},\n\t\tevents: {\n\t\t\t/**\n\t\t\t * Fired whenever the panel has been navigated to.\n\t\t\t */\n\t\t\tpanelNavigated: {\n\t\t\t\tparameters: {\n\t\t\t\t\tcontext: { type: \"object\" }\n\t\t\t\t}\n\t\t\t},\n\t\t\t/**\n\t\t\t * Fired whenever the associated settings dialog is closed.\n\t\t\t */\n\t\t\tonDialogClose: {}\n\t\t}\n\t};\n\n\t/**\n\t * Init lifecycle method\n\t *\n\t * @public\n\t * @override\n\t */\n\tpublic init(): void {\n\t\tthis._i18nBundle = Lib.getResourceBundleFor(\"sap.cux.home.i18n\") as ResourceBundle;\n\t\tthis._actionButtonsCache = [];\n\t}\n\n\t/**\n\t * Retrieves the BasePanel or BaseLayout associated with the BaseSettingsPanel.\n\t *\n\t * @returns {BasePanel | BaseLayout} The panel or layout associated with the BaseSettingsPanel\n\t * @private\n\t */\n\tprotected _getPanel(): BasePanel | BaseLayout {\n\t\treturn Element.getElementById(this.getAssociation(\"panel\", null) as string) as BasePanel | BaseLayout;\n\t}\n\n\t/**\n\t * Persists the dialog state by setting a property on the parent layout\n\t * indicating that the settings dialog should be persisted.\n\t *\n\t * @private\n\t */\n\tprotected _persistDialog(dialog: BaseSettingsDialog): void {\n\t\tif (!dialog) return;\n\n\t\tconst layout = dialog.getParent() as BaseLayout;\n\t\tconst keyMap = {\n\t\t\t\"sap.cux.home.SettingsDialog\": \"settingsDialogPersisted\",\n\t\t\t\"sap.cux.home.ContentAdditionDialog\": \"contentAdditionDialogPersisted\"\n\t\t};\n\n\t\tconst dialogName = dialog.getMetadata().getName();\n\t\tconst persistPropertyName = dialogName in keyMap ? keyMap[dialogName as keyof typeof keyMap] : undefined;\n\n\t\tif (persistPropertyName) {\n\t\t\tlayout?.setProperty(persistPropertyName, true, true);\n\t\t}\n\t}\n\n\t/**\n\t * Checks if the dialog is persisted by examining the parent layout's persistence properties.\n\t *\n\t * @param {BaseSettingsDialog} dialog - The dialog to check for persistence status\n\t * @returns {boolean} True if the dialog is persisted (either settings dialog or content addition dialog), false otherwise\n\t *\n\t * @private\n\t */\n\tprotected _isDialogPersisted(dialog: BaseSettingsDialog): boolean {\n\t\tconst layout = dialog.getParent() as BaseLayout;\n\t\tif (!layout) return false;\n\n\t\treturn layout.getProperty(\"settingsDialogPersisted\") === true || layout.getProperty(\"contentAdditionDialogPersisted\") === true;\n\t}\n\n\t/**\n\t * Returns the KeyUser Changes made by user.\n\t *\n\t * @public\n\t */\n\tpublic getKeyUserChanges(): Array<IKeyUserChange> {\n\t\treturn this._keyuserChanges;\n\t}\n\n\t/**\n\t * Add Changes made by user in case of KeyUser Settings Panel.\n\t *\n\t * @public\n\t */\n\tpublic addKeyUserChanges(change: IKeyUserChange): void {\n\t\tthis._keyuserChanges.push(change);\n\t}\n\n\t/**\n\t * Clear all KeyUser Changes made by user.\n\t *\n\t * @public\n\t */\n\tpublic clearKeyUserChanges(): void {\n\t\tthis._keyuserChanges = [];\n\t}\n\tprotected addDragDropConfigTo(container: Table, dropHandler: (event: DropInfo$DropEvent) => void): void {\n\t\tcontainer\n\t\t\t.addDragDropConfig(\n\t\t\t\tnew DragDropInfo(`${container.getId()}--settingsDragDropConfig`, {\n\t\t\t\t\tsourceAggregation: \"items\",\n\t\t\t\t\ttargetAggregation: \"items\",\n\t\t\t\t\tdropPosition: dnd.DropPosition.On,\n\t\t\t\t\tdropLayout: dnd.DropLayout.Horizontal,\n\t\t\t\t\tdrop: dropHandler\n\t\t\t\t})\n\t\t\t)\n\t\t\t.attachBrowserEvent(\"keydown\", (event: KeyboardEvent) => {\n\t\t\t\tconst disableNavigation = event.metaKey || event.ctrlKey;\n\t\t\t\tvoid attachKeyboardHandler(event, disableNavigation, (dragDropEvent: DropInfo$DropEvent) => {\n\t\t\t\t\tdropHandler(dragDropEvent);\n\t\t\t\t});\n\t\t\t});\n\t}\n\n\t/**\n\t * Retrieves the action buttons from the panel.\n\t *\n\t * @public\n\t * @returns {Button[]} array of action buttons.\n\t */\n\tpublic getActionButtons(): Button[] {\n\t\treturn this._actionButtonsCache.slice();\n\t}\n\n\t/**\n\t * Adds an action button to the panel.\n\t *\n\t * @public\n\t * @param {Button} button - The button to add.\n\t * @returns {BaseSettingsPanel} The instance of the panel for chaining.\n\t */\n\tpublic addActionButton(button: Button): BaseSettingsPanel {\n\t\tthis._actionButtonsCache.push(button);\n\t\tthis.addAggregation(\"actionButtons\", button);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Inserts an action button at a specific index in the panel.\n\t *\n\t * @public\n\t * @param {Button} button - The button to insert.\n\t * @param {number} index - The index at which to insert the button.\n\t * @returns {BaseSettingsPanel} The instance of the panel for chaining.\n\t */\n\tpublic insertActionButton(button: Button, index: number): BaseSettingsPanel {\n\t\tthis._actionButtonsCache.splice(index, 0, button);\n\t\tthis.insertAggregation(\"actionButtons\", button, index);\n\t\treturn this;\n\t}\n\n\t/**\n\t * Removes an action button from the panel.\n\t *\n\t * @public\n\t * @param {Button} button - The button to remove.\n\t * @returns {Button | null} The removed button or null if not found.\n\t */\n\tpublic removeActionButton(button: Button): Button | null {\n\t\tconst removedButton = this._actionButtonsCache.splice(this._actionButtonsCache.indexOf(button), 1);\n\t\tthis.removeAggregation(\"actionButtons\", button);\n\t\treturn removedButton[0] || null;\n\t}\n\n\t/**\n\t * Checks if the panel is supported. To be overridden by subclasses.\n\t *\n\t * @public\n\t * @async\n\t * @returns {Promise<boolean>} A promise that resolves to true if the panel is supported.\n\t */\n\tpublic async isSupported(): Promise<boolean> {\n\t\treturn Promise.resolve(true);\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AAHAA,GAAA,CAAAC,EAAA,CAAAC,MAAA,uIAAAC,YAAA,EAAAC,OAAA,EAAAC,GAAA,EAAAC,mBAAA,EAAAC,sBAAA;EAAA;;EAAA,MAaSC,GAAG,GAAAF,mBAAA;EAAA,MAMHG,qBAAqB,GAAAF,sBAAA;EAE9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EAfA,MAgB8BG,iBAAiB,GAASN,OAAO,CAAAO,MAAA;IAiB9CC,QAAQ,EAAoB;MAC3CC,OAAO,EAAE,cAAc;MACvBC,UAAU,EAAE;QACX;AACH;AACA;QACGC,GAAG,EAAE;UAAEC,IAAI,EAAE,QAAQ;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE,EAAE;UAAEC,UAAU,EAAE;QAAS,CAAC;QAC9E;AACH;AACA;QACGC,KAAK,EAAE;UAAEJ,IAAI,EAAE,QAAQ;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE,EAAE;UAAEC,UAAU,EAAE;QAAS,CAAC;QAChF;AACH;AACA;QACGE,IAAI,EAAE;UAAEL,IAAI,EAAE,iBAAiB;UAAEC,KAAK,EAAE,MAAM;UAAEC,YAAY,EAAE,EAAE;UAAEC,UAAU,EAAE;QAAS,CAAC;QACxF;AAC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ACM,iBAAiB,CAAC,eAAe,EAAEN,MAAM,EAAEI,KAAK,CAAC;MACtD,OAAO,IAAI;IACZ,CAAC;IAED;AACD;AACA;AACA;AACA;AACA;AACA;IACQG,kBAAkB,WAAAC,oBAACR,MAAc,EAAiB;MACxD,MAAMS,aAAa,GAAG,IAAI,CAAC5D,mBAAmB,CAACwD,MAAM,CAAC,IAAI,CAACxD,mBAAmB,CAAC6D,OAAO,CAACV,MAAM,CAAC,EAAE,CAAC,CAAC;MAClG,IAAI,CAACW,iBAAiB,CAAC,eAAe,EAAEX,MAAM,CAAC;MAC/C,OAAOS,aAAa,CAAC,CAAC,CAAC,IAAI,IAAI;IAChC,CAAC;IAED;AACD;AACA;AACA;AACA;AACA;AACA;IACcG,WAAW,WAAAC,aAAA;MAAA,IAAqB;QAC5C,OAAOC,OAAO,CAACC,OAAO,CAAC,IAAI,CAAC;MAC7B,CAAC,QAAAC,CAAA;QAAA,OAAAF,OAAA,CAAAG,MAAA,CAAAD,CAAA;MAAA;IAAA;EAAA;EAAA,OA5O4BvG,iBAAiB;AAAA","ignoreList":[]}
@@ -152,6 +152,21 @@ export default abstract class BaseSettingsPanel extends Element {
152
152
  }
153
153
  }
154
154
 
155
+ /**
156
+ * Checks if the dialog is persisted by examining the parent layout's persistence properties.
157
+ *
158
+ * @param {BaseSettingsDialog} dialog - The dialog to check for persistence status
159
+ * @returns {boolean} True if the dialog is persisted (either settings dialog or content addition dialog), false otherwise
160
+ *
161
+ * @private
162
+ */
163
+ protected _isDialogPersisted(dialog: BaseSettingsDialog): boolean {
164
+ const layout = dialog.getParent() as BaseLayout;
165
+ if (!layout) return false;
166
+
167
+ return layout.getProperty("settingsDialogPersisted") === true || layout.getProperty("contentAdditionDialogPersisted") === true;
168
+ }
169
+
155
170
  /**
156
171
  * Returns the KeyUser Changes made by user.
157
172
  *
@@ -530,7 +530,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
530
530
  */
531
531
  _refreshCardData: function _refreshCardData(oCard) {
532
532
  sap.ui.require(["sap/insights/base/CacheData"], InsightsCacheData => {
533
- const sCardId = oCard.getManifestEntry("sap.app").id;
533
+ const sCardId = oCard.getManifestEntry("sap.app")?.id;
534
534
  const cacheDataInstance = InsightsCacheData.getInstance();
535
535
  cacheDataInstance.clearCache(sCardId);
536
536
  oCard.refreshData();
@@ -1456,7 +1456,7 @@ sap.ui.define(["sap/base/Log", "sap/f/GridContainer", "sap/f/GridContainerSettin
1456
1456
  this._getInsightsContainer()?.toggleFullScreenElements(this, showFullScreenButton);
1457
1457
  } else {
1458
1458
  const fullScreenButton = getAssociatedFullScreenMenuItem(this);
1459
- const fullScreenText = fullScreenButton.getTitle();
1459
+ const fullScreenText = fullScreenButton?.getTitle();
1460
1460
  this._getInsightsContainer()?.updateMenuItem(this._controlMap.get(`${this.getId()}-${cardsContainerMenuItems.SHOW_MORE}`), showFullScreenButton, fullScreenText);
1461
1461
  this._getInsightsContainer()?.updateActionButton(this._controlMap.get(`${this.getId()}-${cardsContainerActionButtons.SHOW_MORE}`), showFullScreenButton, fullScreenText);
1462
1462
  }