@sapui5/sap.cux.home 1.142.0 → 1.142.1
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 +4 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts +3 -2
- package/src/sap/cux/home/AdvancedSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.js +6 -5
- package/src/sap/cux/home/AdvancedSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/AdvancedSettingsPanel.ts +6 -5
- package/src/sap/cux/home/AppsAdditionPanel.d.ts +47 -34
- package/src/sap/cux/home/AppsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.js +333 -237
- package/src/sap/cux/home/AppsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/AppsAdditionPanel.ts +344 -230
- package/src/sap/cux/home/AppsContainer.d.ts.map +1 -1
- package/src/sap/cux/home/AppsContainer.js +3 -2
- package/src/sap/cux/home/AppsContainer.js.map +1 -1
- package/src/sap/cux/home/AppsContainer.ts +3 -2
- package/src/sap/cux/home/BaseAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.js +6 -1
- package/src/sap/cux/home/BaseAppPanel.js.map +1 -1
- package/src/sap/cux/home/BaseAppPanel.ts +6 -1
- package/src/sap/cux/home/BaseContainer.d.ts +1 -1
- package/src/sap/cux/home/BaseContainer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainer.js +10 -2
- package/src/sap/cux/home/BaseContainer.js.map +1 -1
- package/src/sap/cux/home/BaseContainer.ts +7 -3
- package/src/sap/cux/home/BaseContainerRenderer.d.ts.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.js +6 -0
- package/src/sap/cux/home/BaseContainerRenderer.js.map +1 -1
- package/src/sap/cux/home/BaseContainerRenderer.ts +6 -0
- package/src/sap/cux/home/BaseNewsPanel.js.map +1 -1
- package/src/sap/cux/home/BaseNewsPanel.ts +2 -2
- package/src/sap/cux/home/CardsContainer.d.ts +108 -0
- package/src/sap/cux/home/CardsContainer.d.ts.map +1 -0
- package/src/sap/cux/home/CardsContainer.js +207 -0
- package/src/sap/cux/home/CardsContainer.js.map +1 -0
- package/src/sap/cux/home/CardsContainer.ts +202 -0
- package/src/sap/cux/home/CardsPanel.d.ts +43 -62
- package/src/sap/cux/home/CardsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/CardsPanel.js +345 -285
- package/src/sap/cux/home/CardsPanel.js.map +1 -1
- package/src/sap/cux/home/CardsPanel.ts +211 -200
- package/src/sap/cux/home/ContentAdditionDialog.d.ts +2 -0
- package/src/sap/cux/home/ContentAdditionDialog.d.ts.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.js +12 -6
- package/src/sap/cux/home/ContentAdditionDialog.js.map +1 -1
- package/src/sap/cux/home/ContentAdditionDialog.ts +13 -5
- package/src/sap/cux/home/ErrorPanel.d.ts +0 -5
- package/src/sap/cux/home/ErrorPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ErrorPanel.gen.d.ts +31 -0
- package/src/sap/cux/home/ErrorPanel.js +11 -16
- package/src/sap/cux/home/ErrorPanel.js.map +1 -1
- package/src/sap/cux/home/ErrorPanel.ts +7 -19
- package/src/sap/cux/home/FavAppPanel.d.ts +1 -2
- package/src/sap/cux/home/FavAppPanel.d.ts.map +1 -1
- package/src/sap/cux/home/FavAppPanel.js +296 -301
- package/src/sap/cux/home/FavAppPanel.js.map +1 -1
- package/src/sap/cux/home/FavAppPanel.ts +14 -10
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts +11 -4
- package/src/sap/cux/home/InsightsAdditionPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.js +20 -8
- package/src/sap/cux/home/InsightsAdditionPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsAdditionPanel.ts +20 -7
- package/src/sap/cux/home/InsightsCardsSettingsPanel.d.ts +8 -0
- package/src/sap/cux/home/InsightsCardsSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/InsightsCardsSettingsPanel.js +15 -0
- package/src/sap/cux/home/InsightsCardsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsCardsSettingsPanel.ts +11 -0
- package/src/sap/cux/home/InsightsTilesSettingsPanel.js +1 -1
- package/src/sap/cux/home/InsightsTilesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/InsightsTilesSettingsPanel.ts +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts +3 -0
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js +252 -39
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserLayoutSettingsPanel.ts +287 -57
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js +11 -10
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsPagesSettingsPanel.ts +12 -10
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.js +2 -2
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserNewsSettingsPanel.ts +7 -7
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/KeyUserPagesSettingsPanel.ts +2 -2
- package/src/sap/cux/home/Layout.d.ts +3 -1
- package/src/sap/cux/home/Layout.d.ts.map +1 -1
- package/src/sap/cux/home/Layout.js +49 -8
- package/src/sap/cux/home/Layout.js.map +1 -1
- package/src/sap/cux/home/Layout.ts +59 -8
- package/src/sap/cux/home/LayoutSettingsPanel.d.ts +10 -0
- package/src/sap/cux/home/LayoutSettingsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.js +341 -56
- package/src/sap/cux/home/LayoutSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/LayoutSettingsPanel.ts +379 -63
- package/src/sap/cux/home/{NewsAndPagesContainer.d.ts → NewsContainer.d.ts} +13 -14
- package/src/sap/cux/home/NewsContainer.d.ts.map +1 -0
- package/src/sap/cux/home/{NewsAndPagesContainer.gen.d.ts → NewsContainer.gen.d.ts} +3 -3
- package/src/sap/cux/home/{NewsAndPagesContainer.js → NewsContainer.js} +26 -113
- package/src/sap/cux/home/NewsContainer.js.map +1 -0
- package/src/sap/cux/home/{NewsAndPagesContainer.ts → NewsContainer.ts} +29 -118
- package/src/sap/cux/home/NewsGroup.js.map +1 -1
- package/src/sap/cux/home/NewsGroup.ts +1 -1
- package/src/sap/cux/home/NewsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/NewsPanel.js +12 -14
- package/src/sap/cux/home/NewsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsPanel.ts +13 -16
- package/src/sap/cux/home/NewsSettingsPanel.js +4 -4
- package/src/sap/cux/home/NewsSettingsPanel.js.map +1 -1
- package/src/sap/cux/home/NewsSettingsPanel.ts +5 -5
- package/src/sap/cux/home/PagePanel.d.ts +1 -1
- package/src/sap/cux/home/PagePanel.d.ts.map +1 -1
- package/src/sap/cux/home/PagePanel.js +18 -10
- package/src/sap/cux/home/PagePanel.js.map +1 -1
- package/src/sap/cux/home/PagePanel.ts +25 -15
- package/src/sap/cux/home/PagesContainer.d.ts +72 -0
- package/src/sap/cux/home/PagesContainer.d.ts.map +1 -0
- package/src/sap/cux/home/PagesContainer.gen.d.ts +78 -0
- package/src/sap/cux/home/PagesContainer.js +333 -0
- package/src/sap/cux/home/PagesContainer.js.map +1 -0
- package/src/sap/cux/home/PagesContainer.ts +179 -0
- package/src/sap/cux/home/SpaceInsightsPanel.d.ts +8 -60
- package/src/sap/cux/home/SpaceInsightsPanel.d.ts.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.js +66 -132
- package/src/sap/cux/home/SpaceInsightsPanel.js.map +1 -1
- package/src/sap/cux/home/SpaceInsightsPanel.ts +69 -151
- package/src/sap/cux/home/TaskPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TaskPanel.js +16 -1
- package/src/sap/cux/home/TaskPanel.js.map +1 -1
- package/src/sap/cux/home/TaskPanel.ts +15 -1
- package/src/sap/cux/home/TilesContainer.d.ts +111 -0
- package/src/sap/cux/home/TilesContainer.d.ts.map +1 -0
- package/src/sap/cux/home/TilesContainer.js +218 -0
- package/src/sap/cux/home/TilesContainer.js.map +1 -0
- package/src/sap/cux/home/TilesContainer.ts +216 -0
- package/src/sap/cux/home/TilesPanel.d.ts +22 -52
- package/src/sap/cux/home/TilesPanel.d.ts.map +1 -1
- package/src/sap/cux/home/TilesPanel.js +184 -165
- package/src/sap/cux/home/TilesPanel.js.map +1 -1
- package/src/sap/cux/home/TilesPanel.ts +160 -154
- package/src/sap/cux/home/ToDoPanel.d.ts +1 -0
- package/src/sap/cux/home/ToDoPanel.d.ts.map +1 -1
- package/src/sap/cux/home/ToDoPanel.js +38 -63
- package/src/sap/cux/home/ToDoPanel.js.map +1 -1
- package/src/sap/cux/home/ToDoPanel.ts +32 -31
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.js.map +1 -1
- package/src/sap/cux/home/changeHandler/NewsFeedVisibilityChange.ts +4 -4
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SetNewsFeedUrl.ts +4 -4
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageColorHandler.ts +3 -3
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts +2 -2
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.d.ts.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js +4 -4
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.js.map +1 -1
- package/src/sap/cux/home/changeHandler/SpacePageIconHandler.ts +5 -5
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.d.ts.map +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js +30 -3
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.js.map +1 -1
- package/src/sap/cux/home/flexibility/BaseContainer.flexibility.ts +23 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts +29 -19
- package/src/sap/cux/home/flexibility/Layout.flexibility.d.ts.map +1 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.js +78 -2
- package/src/sap/cux/home/flexibility/Layout.flexibility.js.map +1 -1
- package/src/sap/cux/home/flexibility/Layout.flexibility.ts +81 -1
- package/src/sap/cux/home/i18n/messagebundle.properties +26 -12
- package/src/sap/cux/home/i18n/messagebundle_ar.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_bg.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ca.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cnr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cs.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_cy.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_da.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_de.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_el.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_en.properties +19 -3
- package/src/sap/cux/home/i18n/messagebundle_en_GB.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_en_US_sappsd.properties +21 -5
- package/src/sap/cux/home/i18n/messagebundle_en_US_saprigi.properties +21 -5
- package/src/sap/cux/home/i18n/messagebundle_en_US_saptrc.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_es.properties +19 -2
- package/src/sap/cux/home/i18n/messagebundle_es_MX.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_et.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_fr_CA.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_hu.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_id.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_it.properties +23 -7
- package/src/sap/cux/home/i18n/messagebundle_iw.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ja.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_kk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ko.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_lt.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_lv.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_mk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ms.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_nl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_no.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_pl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_pt.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_pt_PT.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ro.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_ru.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sh.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sk.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sl.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_sv.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_th.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_tr.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_uk.properties +20 -4
- package/src/sap/cux/home/i18n/messagebundle_vi.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_CN.properties +18 -2
- package/src/sap/cux/home/i18n/messagebundle_zh_TW.properties +18 -2
- package/src/sap/cux/home/interface/CardsInterface.d.ts +6 -0
- package/src/sap/cux/home/interface/CardsInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.js.map +1 -1
- package/src/sap/cux/home/interface/CardsInterface.ts +6 -1
- package/src/sap/cux/home/interface/KeyUserInterface.d.ts +27 -4
- package/src/sap/cux/home/interface/KeyUserInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/KeyUserInterface.js.map +1 -1
- package/src/sap/cux/home/interface/KeyUserInterface.ts +23 -4
- package/src/sap/cux/home/interface/LayoutInterface.d.ts +7 -0
- package/src/sap/cux/home/interface/LayoutInterface.d.ts.map +1 -1
- package/src/sap/cux/home/interface/LayoutInterface.js.map +1 -1
- package/src/sap/cux/home/interface/LayoutInterface.ts +7 -0
- package/src/sap/cux/home/library.d.ts.map +1 -1
- package/src/sap/cux/home/library.js +7 -4
- package/src/sap/cux/home/library.js.map +1 -1
- package/src/sap/cux/home/library.ts +10 -5
- package/src/sap/cux/home/themes/base/BaseContainer.less +36 -0
- package/src/sap/cux/home/themes/base/BaseLayout.less +11 -0
- package/src/sap/cux/home/themes/base/{InsightsContainer.less → CardsContainer.less} +0 -45
- package/src/sap/cux/home/themes/base/ContentAdditionDialog.less +10 -18
- package/src/sap/cux/home/themes/base/PlaceHolder.less +1 -1
- package/src/sap/cux/home/themes/base/SettingsDialog.less +4 -0
- package/src/sap/cux/home/themes/base/TilesContainer.less +65 -0
- package/src/sap/cux/home/themes/base/library.source.less +2 -1
- package/src/sap/cux/home/utils/BatchHelper.d.ts +1 -0
- package/src/sap/cux/home/utils/BatchHelper.d.ts.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.js +7 -2
- package/src/sap/cux/home/utils/BatchHelper.js.map +1 -1
- package/src/sap/cux/home/utils/BatchHelper.ts +8 -1
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts +4 -2
- package/src/sap/cux/home/utils/PerformanceUtils.d.ts.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.js +4 -2
- package/src/sap/cux/home/utils/PerformanceUtils.js.map +1 -1
- package/src/sap/cux/home/utils/PerformanceUtils.ts +4 -2
- package/src/sap/cux/home/utils/fragment/appsAdditionContent.fragment.xml +150 -151
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.js → CardsPlaceholder.js} +3 -77
- package/src/sap/cux/home/utils/placeholder/CardsPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{InsightsPlaceholder.ts → CardsPlaceholder.ts} +1 -75
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js +44 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/NewsPlaceholder.ts +34 -0
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.js → PagesPlaceholder.js} +3 -23
- package/src/sap/cux/home/utils/placeholder/PagesPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/{NewsAndPagesPlaceholder.ts → PagesPlaceholder.ts} +1 -21
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts +8 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.d.ts.map +1 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js +95 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.js.map +1 -0
- package/src/sap/cux/home/utils/placeholder/TilesPlaceholder.ts +85 -0
- package/ui5.yaml +1 -0
- package/src/sap/cux/home/InsightsContainer.d.ts +0 -205
- package/src/sap/cux/home/InsightsContainer.d.ts.map +0 -1
- package/src/sap/cux/home/InsightsContainer.js +0 -459
- package/src/sap/cux/home/InsightsContainer.js.map +0 -1
- package/src/sap/cux/home/InsightsContainer.ts +0 -489
- package/src/sap/cux/home/NewsAndPagesContainer.d.ts.map +0 -1
- package/src/sap/cux/home/NewsAndPagesContainer.js.map +0 -1
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts +0 -8
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/utils/placeholder/InsightsPlaceholder.js.map +0 -1
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts +0 -8
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.d.ts.map +0 -1
- package/src/sap/cux/home/utils/placeholder/NewsAndPagesPlaceholder.js.map +0 -1
|
@@ -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","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
|
|
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 NewsContainer from \"./NewsContainer\";\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 NewsContainer;\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,s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EAAE,CAAC,IAAI,CAACf,gBAAgB;QAC1C,CAAC,CAAC,CAACgB,aAAa,CAAC,0BAA0B,CAAC;QAC5C,IAAI,CAACjB,SAAS,GAAG,IAAI1C,IAAI,CAAC,GAAG,IAAI,CAAC8B,KAAK,CAAC,CAAC,YAAY,EAAE;UACtD8B,IAAI,EAAE,MAAM;UACZC,gBAAgB,EAAE,OAAO;UACzBxB,KAAK,EAAE,CAACc,aAAa,CAAC;UACtBW,OAAO,EAAE,KAAK;UACdC,MAAM,EAAE,OAAO;UACfC,KAAK,EAAE;QACR,CAAC,CAAC,CAACL,aAAa,CAAC,4DAA4D,CAAC;MAC/E;MACA,OAAO,IAAI,CAACjB,SAAS;IACtB,CAAC;IAED;AACD;AACA;AACA;AACA;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,CAAkB;MACzDD,eAAe,EAAEE,UAAU,CAAC,CAAC,CAACC,kBAAkB,CAAC/D,oBAAoB,CAACgE,IAAI,CAAC;IAC5E;EAAC;EAAA,OA/G4B/D,aAAa;AAAA","ignoreList":[]}
|
|
@@ -13,7 +13,7 @@ import type { MetadataOptions } from "sap/ui/core/Element";
|
|
|
13
13
|
import VerticalLayout from "sap/ui/layout/VerticalLayout";
|
|
14
14
|
import { $BaseNewsPanelSettings } from "./BaseNewsPanel";
|
|
15
15
|
import BasePanel from "./BasePanel";
|
|
16
|
-
import
|
|
16
|
+
import NewsContainer from "./NewsContainer";
|
|
17
17
|
import { SETTINGS_PANELS_KEYS } from "./utils/Constants";
|
|
18
18
|
|
|
19
19
|
/**
|
|
@@ -141,7 +141,7 @@ export default abstract class BaseNewsPanel extends BasePanel {
|
|
|
141
141
|
* @private
|
|
142
142
|
*/
|
|
143
143
|
protected handleEditNews() {
|
|
144
|
-
const parentContainer = this.getParent() as
|
|
144
|
+
const parentContainer = this.getParent() as NewsContainer;
|
|
145
145
|
parentContainer?._getLayout().openSettingsDialog(SETTINGS_PANELS_KEYS.NEWS);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
declare module "sap/cux/home/CardsContainer" {
|
|
2
|
+
/*!
|
|
3
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
4
|
+
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
5
|
+
*/
|
|
6
|
+
import BaseContainer, { $BaseContainerSettings } from "sap/cux/home/BaseContainer";
|
|
7
|
+
import BasePanel from "sap/cux/home/BasePanel";
|
|
8
|
+
import CardsPanel from "sap/cux/home/CardsPanel";
|
|
9
|
+
const cardsPanelName: string;
|
|
10
|
+
interface IpanelLoaded {
|
|
11
|
+
[key: string]: {
|
|
12
|
+
loaded: boolean | undefined;
|
|
13
|
+
count: number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface IpanelContext {
|
|
17
|
+
[key: string]: CardsPanel;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* Container class for managing and storing Insights Cards.
|
|
22
|
+
*
|
|
23
|
+
* @extends sap.cux.home.BaseContainer
|
|
24
|
+
*
|
|
25
|
+
* @author SAP SE
|
|
26
|
+
* @version 0.0.1
|
|
27
|
+
* @since 1.142
|
|
28
|
+
*
|
|
29
|
+
* @private
|
|
30
|
+
* @ui5-restricted ux.eng.s4producthomes1
|
|
31
|
+
*
|
|
32
|
+
* @alias sap.cux.home.CardsContainer
|
|
33
|
+
*/
|
|
34
|
+
export default class CardsContainer extends BaseContainer {
|
|
35
|
+
private panelLoaded;
|
|
36
|
+
private panelContext;
|
|
37
|
+
private _isInitialRender;
|
|
38
|
+
static readonly renderer: {
|
|
39
|
+
apiVersion: number;
|
|
40
|
+
render: (rm: import("sap/ui/core/RenderManager").default, control: BaseContainer) => void;
|
|
41
|
+
renderContent: (rm: import("sap/ui/core/RenderManager").default, control: BaseContainer) => void;
|
|
42
|
+
};
|
|
43
|
+
constructor(id?: string | $BaseContainerSettings);
|
|
44
|
+
constructor(id?: string, settings?: $BaseContainerSettings);
|
|
45
|
+
/**
|
|
46
|
+
* Init lifecycle method
|
|
47
|
+
*
|
|
48
|
+
* @private
|
|
49
|
+
* @override
|
|
50
|
+
*/
|
|
51
|
+
init(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Loads the Insights section.
|
|
54
|
+
* Overrides the load method of the BaseContainer.
|
|
55
|
+
*
|
|
56
|
+
* @private
|
|
57
|
+
* @override
|
|
58
|
+
*/
|
|
59
|
+
load(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Handles the hiding of a panel by removing its content, updating the panel load status,
|
|
62
|
+
* and managing the display of the container header and error panel.
|
|
63
|
+
*
|
|
64
|
+
* @param {BasePanel} panel - The panel to be hidden.
|
|
65
|
+
* @private
|
|
66
|
+
*/
|
|
67
|
+
handleHidePanel(panel: BasePanel): void;
|
|
68
|
+
/**
|
|
69
|
+
* Unhides the specified panel if it is hidden.
|
|
70
|
+
*
|
|
71
|
+
* @param {CardsPanel} panel - The panel to unhide.
|
|
72
|
+
*/
|
|
73
|
+
unhidePanelIfHidden(panel: CardsPanel): void;
|
|
74
|
+
/**
|
|
75
|
+
* Adjusts the layout of the container.
|
|
76
|
+
*
|
|
77
|
+
* @private
|
|
78
|
+
* @override
|
|
79
|
+
*/
|
|
80
|
+
adjustLayout(): void;
|
|
81
|
+
/**
|
|
82
|
+
* Handles the loading of a panel.
|
|
83
|
+
*
|
|
84
|
+
* @param {string} panelName - The name of the panel.
|
|
85
|
+
* @param {object} oVal - The load status and count of the panel.
|
|
86
|
+
* @param {boolean} oVal.loaded - The load status of the panel.
|
|
87
|
+
* @param {number} oVal.count - The count of items in the panel.
|
|
88
|
+
*/
|
|
89
|
+
handlePanelLoad(panelName: string, oVal: {
|
|
90
|
+
loaded: boolean;
|
|
91
|
+
count: number;
|
|
92
|
+
}): void;
|
|
93
|
+
/**
|
|
94
|
+
* Retrieves the generic placeholder content for the Cards container.
|
|
95
|
+
*
|
|
96
|
+
* @returns {string} The HTML string representing the cards container's placeholder content.
|
|
97
|
+
*/
|
|
98
|
+
protected getGenericPlaceholderContent(): string;
|
|
99
|
+
/**
|
|
100
|
+
* Refreshes the data for a specific panel based on its key.
|
|
101
|
+
*
|
|
102
|
+
* @private
|
|
103
|
+
* @param {string} key - The key of the panel to refresh.
|
|
104
|
+
*/
|
|
105
|
+
refreshData(key: string): Promise<void>;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=CardsContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardsContainer.d.ts","sourceRoot":"../../../../..","sources":["src/sap/cux/home/CardsContainer.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,6BAA6B,CAAC;IAC7C;;;OAGG;IACH,OAAO,aAAa,EAAE,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;IACnF,OAAO,SAAS,MAAM,wBAAwB,CAAC;IAC/C,OAAO,UAAU,MAAM,yBAAyB,CAAC;IAGjD,MAAM,cAAc,EAAE,MAAkC,CAAC;IAEzD,UAAU,YAAY;QACrB,CAAC,GAAG,EAAE,MAAM,GAAG;YAAE,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC;KAC9D;IACD,UAAU,aAAa;QACtB,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAAC;KAC1B;IACD;;;;;;;;;;;;;;OAcG;IAEH,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,aAAa;QACxD,OAAO,CAAC,WAAW,CAAgB;QACnC,OAAO,CAAC,YAAY,CAAiB;QACrC,OAAO,CAAC,gBAAgB,CAAiB;QACzC,MAAM,CAAC,QAAQ,CAAC,QAAQ;;;;UAGtB;oBACU,EAAE,CAAC,EAAE,MAAM,GAAG,sBAAsB;oBACpC,EAAE,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,sBAAsB;QAW1D;;;;;WAKG;QACI,IAAI,IAAI,IAAI;QAoBnB;;;;;;WAMG;QACI,IAAI;QAkBX;;;;;;WAMG;QACI,eAAe,CAAC,KAAK,EAAE,SAAS;QAMvC;;;;WAIG;QACI,mBAAmB,CAAC,KAAK,EAAE,UAAU;QAkC5C;;;;;WAKG;QACI,YAAY;QAKnB;;;;;;;WAOG;QACI,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE;YAAE,MAAM,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE;QAOlF;;;;WAIG;QACH,SAAS,CAAC,4BAA4B,IAAI,MAAM;QAIhD;;;;;WAKG;QACU,WAAW,CAAC,GAAG,EAAE,MAAM;KAIpC;CAEA"}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
|
+
*/
|
|
5
|
+
sap.ui.define(["./BaseContainer", "./CardsPanel", "./utils/placeholder/CardsPlaceholder"], function (__BaseContainer, __CardsPanel, ___utils_placeholder_CardsPlaceholder) {
|
|
6
|
+
"use strict";
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) {
|
|
9
|
+
return obj && obj.__esModule && typeof obj.default !== "undefined" ? obj.default : obj;
|
|
10
|
+
}
|
|
11
|
+
const BaseContainer = _interopRequireDefault(__BaseContainer);
|
|
12
|
+
const CardsPanel = _interopRequireDefault(__CardsPanel);
|
|
13
|
+
const getCardsPlaceholder = ___utils_placeholder_CardsPlaceholder["getCardsPlaceholder"];
|
|
14
|
+
const cardsPanelName = "sap.cux.home.CardsPanel";
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* Container class for managing and storing Insights Cards.
|
|
18
|
+
*
|
|
19
|
+
* @extends sap.cux.home.BaseContainer
|
|
20
|
+
*
|
|
21
|
+
* @author SAP SE
|
|
22
|
+
* @version 0.0.1
|
|
23
|
+
* @since 1.142
|
|
24
|
+
*
|
|
25
|
+
* @private
|
|
26
|
+
* @ui5-restricted ux.eng.s4producthomes1
|
|
27
|
+
*
|
|
28
|
+
* @alias sap.cux.home.CardsContainer
|
|
29
|
+
*/
|
|
30
|
+
const CardsContainer = BaseContainer.extend("sap.cux.home.CardsContainer", {
|
|
31
|
+
renderer: {
|
|
32
|
+
...BaseContainer.renderer,
|
|
33
|
+
apiVersion: 2
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* Constructor for a new Cards container.
|
|
37
|
+
*
|
|
38
|
+
* @param {string} [id] ID for the new control, generated automatically if an ID is not provided
|
|
39
|
+
* @param {object} [settings] Initial settings for the new control
|
|
40
|
+
*/
|
|
41
|
+
constructor: function _constructor(id, settings) {
|
|
42
|
+
BaseContainer.prototype.constructor.call(this, id, settings);
|
|
43
|
+
this._isInitialRender = true;
|
|
44
|
+
},
|
|
45
|
+
/**
|
|
46
|
+
* Init lifecycle method
|
|
47
|
+
*
|
|
48
|
+
* @private
|
|
49
|
+
* @override
|
|
50
|
+
*/
|
|
51
|
+
init: function _init() {
|
|
52
|
+
BaseContainer.prototype.init.call(this);
|
|
53
|
+
/* As Container Level default value for enableSettings is false,
|
|
54
|
+
this needs to be added from container level.
|
|
55
|
+
(default value cannot be true as News & Page Container header should be hidden)
|
|
56
|
+
*/
|
|
57
|
+
this.setProperty("enableSettings", false);
|
|
58
|
+
this.setProperty("orientation", "Vertical");
|
|
59
|
+
this.setProperty("compositeId", "Insights");
|
|
60
|
+
this.panelLoaded = {
|
|
61
|
+
[cardsPanelName]: {
|
|
62
|
+
loaded: undefined,
|
|
63
|
+
count: 0
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
this.panelContext = {};
|
|
67
|
+
this.addCustomSetting("title", this._i18nBundle.getText("insightsCards"));
|
|
68
|
+
this.addCustomSetting("groupTitle", this._i18nBundle.getText("insights"));
|
|
69
|
+
this.setTooltip(String(this._i18nBundle.getText("insightsCards")));
|
|
70
|
+
//remove aggregation menuItems and actionButtons as they will be added from individual panels
|
|
71
|
+
this.removeAllAggregation("menuItems");
|
|
72
|
+
this.removeAllAggregation("actionButtons");
|
|
73
|
+
},
|
|
74
|
+
/**
|
|
75
|
+
* Loads the Insights section.
|
|
76
|
+
* Overrides the load method of the BaseContainer.
|
|
77
|
+
*
|
|
78
|
+
* @private
|
|
79
|
+
* @override
|
|
80
|
+
*/
|
|
81
|
+
load: function _load() {
|
|
82
|
+
if (this._isInitialRender) {
|
|
83
|
+
const aContent = this.getContent();
|
|
84
|
+
aContent.forEach(oContent => {
|
|
85
|
+
this.panelContext[oContent.getMetadata().getName()] = oContent;
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// Render individual panels
|
|
89
|
+
aContent.forEach(content => {
|
|
90
|
+
const panel = content;
|
|
91
|
+
panel.attachHandleHidePanel(() => this.handleHidePanel(panel));
|
|
92
|
+
panel.attachHandleUnhidePanel(() => this.unhidePanelIfHidden(panel));
|
|
93
|
+
void panel.renderPanel();
|
|
94
|
+
});
|
|
95
|
+
this._isInitialRender = false;
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
/**
|
|
99
|
+
* Handles the hiding of a panel by removing its content, updating the panel load status,
|
|
100
|
+
* and managing the display of the container header and error panel.
|
|
101
|
+
*
|
|
102
|
+
* @param {BasePanel} panel - The panel to be hidden.
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
handleHidePanel: function _handleHidePanel(panel) {
|
|
106
|
+
this.removeContent(panel);
|
|
107
|
+
const panelName = panel.getMetadata().getName();
|
|
108
|
+
this.handlePanelLoad(panelName, {
|
|
109
|
+
loaded: false,
|
|
110
|
+
count: 0
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* Unhides the specified panel if it is hidden.
|
|
115
|
+
*
|
|
116
|
+
* @param {CardsPanel} panel - The panel to unhide.
|
|
117
|
+
*/
|
|
118
|
+
unhidePanelIfHidden: function _unhidePanelIfHidden(panel) {
|
|
119
|
+
const layout = this._getLayout();
|
|
120
|
+
const panelExpandedName = layout._getCurrentExpandedElementName();
|
|
121
|
+
// Function to handle panel content insertion
|
|
122
|
+
const processPanelVisibility = (panelName, insertContentFn) => {
|
|
123
|
+
if (!panelExpandedName || panelExpandedName === panel.getProperty("fullScreenName")) {
|
|
124
|
+
/**
|
|
125
|
+
loaded value can be false or undefined, false being hidden and undefined being loading
|
|
126
|
+
if the panel is hidden then only unhide it
|
|
127
|
+
*/
|
|
128
|
+
if (this.panelLoaded[panelName].loaded === false) {
|
|
129
|
+
insertContentFn();
|
|
130
|
+
// Remove hidden class if applied
|
|
131
|
+
panel.setVisible(true);
|
|
132
|
+
}
|
|
133
|
+
this.handlePanelLoad(panelName, {
|
|
134
|
+
loaded: true,
|
|
135
|
+
count: this.panelLoaded[panelName].count
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
const listener = () => {
|
|
139
|
+
insertContentFn();
|
|
140
|
+
// Remove hidden class if applied
|
|
141
|
+
panel.setVisible(true);
|
|
142
|
+
layout.detachOnCollapse(listener); // Remove the listener after execution
|
|
143
|
+
};
|
|
144
|
+
this.handlePanelLoad(panelName, {
|
|
145
|
+
loaded: true,
|
|
146
|
+
count: this.panelLoaded[panelName].count
|
|
147
|
+
});
|
|
148
|
+
layout.attachOnCollapse(listener);
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
// Handling CardsPanel
|
|
153
|
+
if (panel instanceof CardsPanel && !this.panelLoaded[cardsPanelName].loaded) {
|
|
154
|
+
processPanelVisibility(cardsPanelName, () => this.addContent(this.panelContext[cardsPanelName]));
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
/**
|
|
158
|
+
* Adjusts the layout of the container.
|
|
159
|
+
*
|
|
160
|
+
* @private
|
|
161
|
+
* @override
|
|
162
|
+
*/
|
|
163
|
+
adjustLayout: function _adjustLayout() {
|
|
164
|
+
//adjust layout of all panels
|
|
165
|
+
this.getContent().forEach(panel => panel._adjustLayout?.());
|
|
166
|
+
},
|
|
167
|
+
/**
|
|
168
|
+
* Handles the loading of a panel.
|
|
169
|
+
*
|
|
170
|
+
* @param {string} panelName - The name of the panel.
|
|
171
|
+
* @param {object} oVal - The load status and count of the panel.
|
|
172
|
+
* @param {boolean} oVal.loaded - The load status of the panel.
|
|
173
|
+
* @param {number} oVal.count - The count of items in the panel.
|
|
174
|
+
*/
|
|
175
|
+
handlePanelLoad: function _handlePanelLoad(panelName, oVal) {
|
|
176
|
+
if (this.panelLoaded[panelName].loaded !== oVal.loaded) {
|
|
177
|
+
this.panelLoaded[panelName] = oVal;
|
|
178
|
+
}
|
|
179
|
+
this.adjustLayout();
|
|
180
|
+
},
|
|
181
|
+
/**
|
|
182
|
+
* Retrieves the generic placeholder content for the Cards container.
|
|
183
|
+
*
|
|
184
|
+
* @returns {string} The HTML string representing the cards container's placeholder content.
|
|
185
|
+
*/
|
|
186
|
+
getGenericPlaceholderContent: function _getGenericPlaceholderContent() {
|
|
187
|
+
return getCardsPlaceholder();
|
|
188
|
+
},
|
|
189
|
+
/**
|
|
190
|
+
* Refreshes the data for a specific panel based on its key.
|
|
191
|
+
*
|
|
192
|
+
* @private
|
|
193
|
+
* @param {string} key - The key of the panel to refresh.
|
|
194
|
+
*/
|
|
195
|
+
refreshData: function _refreshData(key) {
|
|
196
|
+
try {
|
|
197
|
+
const _this = this;
|
|
198
|
+
const panel = Object.values(_this.panelContext).find(panel => panel.getKey() === key);
|
|
199
|
+
return Promise.resolve(panel?.refreshData?.()).then(function () {});
|
|
200
|
+
} catch (e) {
|
|
201
|
+
return Promise.reject(e);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
return CardsContainer;
|
|
206
|
+
});
|
|
207
|
+
//# sourceMappingURL=CardsContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CardsContainer.js","names":["sap","ui","define","__BaseContainer","__CardsPanel","___utils_placeholder_CardsPlaceholder","_interopRequireDefault","obj","__esModule","default","BaseContainer","CardsPanel","getCardsPlaceholder","cardsPanelName","CardsContainer","extend","renderer","apiVersion","constructor","_constructor","id","settings","BaseContainer.prototype.constructor.call","_isInitialRender","init","_init","BaseContainer.prototype.init.call","setProperty","panelLoaded","loaded","undefined","count","panelContext","addCustomSetting","_i18nBundle","getText","setTooltip","String","removeAllAggregation","load","_load","aContent","getContent","forEach","oContent","getMetadata","getName","content","panel","attachHandleHidePanel","handleHidePanel","attachHandleUnhidePanel","unhidePanelIfHidden","renderPanel","_handleHidePanel","removeContent","panelName","handlePanelLoad","_unhidePanelIfHidden","layout","_getLayout","panelExpandedName","_getCurrentExpandedElementName","processPanelVisibility","insertContentFn","getProperty","setVisible","listener","detachOnCollapse","attachOnCollapse","addContent","adjustLayout","_adjustLayout","_handlePanelLoad","oVal","getGenericPlaceholderContent","_getGenericPlaceholderContent","refreshData","_refreshData","key","_this","Object","values","find","getKey","Promise","resolve","then","e","reject"],"sources":["CardsContainer.ts"],"sourcesContent":["/*!\n * SAP UI development toolkit for HTML5 (SAPUI5)\n * * (c) Copyright 2009-2025 SAP SE. All rights reserved\n */\nimport BaseContainer, { $BaseContainerSettings } from \"./BaseContainer\";\nimport BasePanel from \"./BasePanel\";\nimport CardsPanel from \"./CardsPanel\";\nimport { getCardsPlaceholder } from \"./utils/placeholder/CardsPlaceholder\";\n\nconst cardsPanelName: string = \"sap.cux.home.CardsPanel\";\n\ninterface IpanelLoaded {\n\t[key: string]: { loaded: boolean | undefined; count: number };\n}\ninterface IpanelContext {\n\t[key: string]: CardsPanel;\n}\n/**\n *\n * Container class for managing and storing Insights Cards.\n *\n * @extends sap.cux.home.BaseContainer\n *\n * @author SAP SE\n * @version 0.0.1\n * @since 1.142\n *\n * @private\n * @ui5-restricted ux.eng.s4producthomes1\n *\n * @alias sap.cux.home.CardsContainer\n */\n\nexport default class CardsContainer extends BaseContainer {\n\tprivate panelLoaded!: IpanelLoaded;\n\tprivate panelContext!: IpanelContext;\n\tprivate _isInitialRender: boolean = true;\n\tstatic readonly renderer = {\n\t\t...BaseContainer.renderer,\n\t\tapiVersion: 2\n\t};\n\tconstructor(id?: string | $BaseContainerSettings);\n\tconstructor(id?: string, settings?: $BaseContainerSettings);\n\t/**\n\t * Constructor for a new Cards container.\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?: $BaseContainerSettings) {\n\t\tsuper(id, settings);\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\t\t/* As Container Level default value for enableSettings is false,\n\t\t\tthis needs to be added from container level.\n\t\t\t(default value cannot be true as News & Page Container header should be hidden)\n\t\t*/\n\t\tthis.setProperty(\"enableSettings\", false);\n\t\tthis.setProperty(\"orientation\", \"Vertical\");\n\t\tthis.setProperty(\"compositeId\", \"Insights\");\n\t\tthis.panelLoaded = {\n\t\t\t[cardsPanelName]: { loaded: undefined, count: 0 }\n\t\t};\n\t\tthis.panelContext = {};\n\t\tthis.addCustomSetting(\"title\", this._i18nBundle.getText(\"insightsCards\") as string);\n\t\tthis.addCustomSetting(\"groupTitle\", this._i18nBundle.getText(\"insights\") as string);\n\t\tthis.setTooltip(String(this._i18nBundle.getText(\"insightsCards\")));\n\t\t//remove aggregation menuItems and actionButtons as they will be added from individual panels\n\t\tthis.removeAllAggregation(\"menuItems\");\n\t\tthis.removeAllAggregation(\"actionButtons\");\n\t}\n\t/**\n\t * Loads the Insights section.\n\t * Overrides the load method of the BaseContainer.\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic load() {\n\t\tif (this._isInitialRender) {\n\t\t\tconst aContent = this.getContent();\n\t\t\taContent.forEach((oContent) => {\n\t\t\t\tthis.panelContext[oContent.getMetadata().getName()] = oContent as CardsPanel;\n\t\t\t});\n\n\t\t\t// Render individual panels\n\t\t\taContent.forEach((content) => {\n\t\t\t\tconst panel = content as CardsPanel;\n\t\t\t\tpanel.attachHandleHidePanel(() => this.handleHidePanel(panel));\n\t\t\t\tpanel.attachHandleUnhidePanel(() => this.unhidePanelIfHidden(panel));\n\t\t\t\tvoid panel.renderPanel();\n\t\t\t});\n\t\t\tthis._isInitialRender = false;\n\t\t}\n\t}\n\n\t/**\n\t * Handles the hiding of a panel by removing its content, updating the panel load status,\n\t * and managing the display of the container header and error panel.\n\t *\n\t * @param {BasePanel} panel - The panel to be hidden.\n\t * @private\n\t */\n\tpublic handleHidePanel(panel: BasePanel) {\n\t\tthis.removeContent(panel);\n\t\tconst panelName = panel.getMetadata().getName();\n\t\tthis.handlePanelLoad(panelName, { loaded: false, count: 0 });\n\t}\n\n\t/**\n\t * Unhides the specified panel if it is hidden.\n\t *\n\t * @param {CardsPanel} panel - The panel to unhide.\n\t */\n\tpublic unhidePanelIfHidden(panel: CardsPanel) {\n\t\tconst layout = this._getLayout();\n\t\tconst panelExpandedName = layout._getCurrentExpandedElementName();\n\t\t// Function to handle panel content insertion\n\t\tconst processPanelVisibility = (panelName: string, insertContentFn: () => void) => {\n\t\t\tif (!panelExpandedName || panelExpandedName === panel.getProperty(\"fullScreenName\")) {\n\t\t\t\t/**\n loaded value can be false or undefined, false being hidden and undefined being loading\n if the panel is hidden then only unhide it\n */\n\t\t\t\tif (this.panelLoaded[panelName].loaded === false) {\n\t\t\t\t\tinsertContentFn();\n\t\t\t\t\t// Remove hidden class if applied\n\t\t\t\t\tpanel.setVisible(true);\n\t\t\t\t}\n\t\t\t\tthis.handlePanelLoad(panelName, { loaded: true, count: this.panelLoaded[panelName].count });\n\t\t\t} else {\n\t\t\t\tconst listener = () => {\n\t\t\t\t\tinsertContentFn();\n\t\t\t\t\t// Remove hidden class if applied\n\t\t\t\t\tpanel.setVisible(true);\n\t\t\t\t\tlayout.detachOnCollapse(listener); // Remove the listener after execution\n\t\t\t\t};\n\t\t\t\tthis.handlePanelLoad(panelName, { loaded: true, count: this.panelLoaded[panelName].count });\n\t\t\t\tlayout.attachOnCollapse(listener);\n\t\t\t}\n\t\t};\n\n\t\t// Handling CardsPanel\n\t\tif (panel instanceof CardsPanel && !this.panelLoaded[cardsPanelName].loaded) {\n\t\t\tprocessPanelVisibility(cardsPanelName, () => this.addContent(this.panelContext[cardsPanelName]));\n\t\t}\n\t}\n\n\t/**\n\t * Adjusts the layout of the container.\n\t *\n\t * @private\n\t * @override\n\t */\n\tpublic adjustLayout() {\n\t\t//adjust layout of all panels\n\t\t(this.getContent() as CardsPanel[]).forEach((panel) => panel._adjustLayout?.());\n\t}\n\n\t/**\n\t * Handles the loading of a panel.\n\t *\n\t * @param {string} panelName - The name of the panel.\n\t * @param {object} oVal - The load status and count of the panel.\n\t * @param {boolean} oVal.loaded - The load status of the panel.\n\t * @param {number} oVal.count - The count of items in the panel.\n\t */\n\tpublic handlePanelLoad(panelName: string, oVal: { loaded: boolean; count: number }) {\n\t\tif (this.panelLoaded[panelName].loaded !== oVal.loaded) {\n\t\t\tthis.panelLoaded[panelName] = oVal;\n\t\t}\n\t\tthis.adjustLayout();\n\t}\n\n\t/**\n\t * Retrieves the generic placeholder content for the Cards container.\n\t *\n\t * @returns {string} The HTML string representing the cards container's placeholder content.\n\t */\n\tprotected getGenericPlaceholderContent(): string {\n\t\treturn getCardsPlaceholder();\n\t}\n\n\t/**\n\t * Refreshes the data for a specific panel based on its key.\n\t *\n\t * @private\n\t * @param {string} key - The key of the panel to refresh.\n\t */\n\tpublic async refreshData(key: string) {\n\t\tconst panel = Object.values(this.panelContext).find((panel) => panel.getKey() === key);\n\t\tawait panel?.refreshData?.();\n\t}\n}\n"],"mappings":"AAAA;A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,EAAE6B,WAAW,GAAG,CAAC,EAAAU,IAAA;MAC7B,CAAC,QAAAC,CAAA;QAAA,OAAAH,OAAA,CAAAI,MAAA,CAAAD,CAAA;MAAA;IAAA;EAAA;EAAA,OAvKmB1E,cAAc;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
* * (c) Copyright 2009-2025 SAP SE. All rights reserved
|
|
4
|
+
*/
|
|
5
|
+
import BaseContainer, { $BaseContainerSettings } from "./BaseContainer";
|
|
6
|
+
import BasePanel from "./BasePanel";
|
|
7
|
+
import CardsPanel from "./CardsPanel";
|
|
8
|
+
import { getCardsPlaceholder } from "./utils/placeholder/CardsPlaceholder";
|
|
9
|
+
|
|
10
|
+
const cardsPanelName: string = "sap.cux.home.CardsPanel";
|
|
11
|
+
|
|
12
|
+
interface IpanelLoaded {
|
|
13
|
+
[key: string]: { loaded: boolean | undefined; count: number };
|
|
14
|
+
}
|
|
15
|
+
interface IpanelContext {
|
|
16
|
+
[key: string]: CardsPanel;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* Container class for managing and storing Insights Cards.
|
|
21
|
+
*
|
|
22
|
+
* @extends sap.cux.home.BaseContainer
|
|
23
|
+
*
|
|
24
|
+
* @author SAP SE
|
|
25
|
+
* @version 0.0.1
|
|
26
|
+
* @since 1.142
|
|
27
|
+
*
|
|
28
|
+
* @private
|
|
29
|
+
* @ui5-restricted ux.eng.s4producthomes1
|
|
30
|
+
*
|
|
31
|
+
* @alias sap.cux.home.CardsContainer
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
export default class CardsContainer extends BaseContainer {
|
|
35
|
+
private panelLoaded!: IpanelLoaded;
|
|
36
|
+
private panelContext!: IpanelContext;
|
|
37
|
+
private _isInitialRender: boolean = true;
|
|
38
|
+
static readonly renderer = {
|
|
39
|
+
...BaseContainer.renderer,
|
|
40
|
+
apiVersion: 2
|
|
41
|
+
};
|
|
42
|
+
constructor(id?: string | $BaseContainerSettings);
|
|
43
|
+
constructor(id?: string, settings?: $BaseContainerSettings);
|
|
44
|
+
/**
|
|
45
|
+
* Constructor for a new Cards container.
|
|
46
|
+
*
|
|
47
|
+
* @param {string} [id] ID for the new control, generated automatically if an ID is not provided
|
|
48
|
+
* @param {object} [settings] Initial settings for the new control
|
|
49
|
+
*/
|
|
50
|
+
public constructor(id?: string, settings?: $BaseContainerSettings) {
|
|
51
|
+
super(id, settings);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Init lifecycle method
|
|
56
|
+
*
|
|
57
|
+
* @private
|
|
58
|
+
* @override
|
|
59
|
+
*/
|
|
60
|
+
public init(): void {
|
|
61
|
+
super.init();
|
|
62
|
+
/* As Container Level default value for enableSettings is false,
|
|
63
|
+
this needs to be added from container level.
|
|
64
|
+
(default value cannot be true as News & Page Container header should be hidden)
|
|
65
|
+
*/
|
|
66
|
+
this.setProperty("enableSettings", false);
|
|
67
|
+
this.setProperty("orientation", "Vertical");
|
|
68
|
+
this.setProperty("compositeId", "Insights");
|
|
69
|
+
this.panelLoaded = {
|
|
70
|
+
[cardsPanelName]: { loaded: undefined, count: 0 }
|
|
71
|
+
};
|
|
72
|
+
this.panelContext = {};
|
|
73
|
+
this.addCustomSetting("title", this._i18nBundle.getText("insightsCards") as string);
|
|
74
|
+
this.addCustomSetting("groupTitle", this._i18nBundle.getText("insights") as string);
|
|
75
|
+
this.setTooltip(String(this._i18nBundle.getText("insightsCards")));
|
|
76
|
+
//remove aggregation menuItems and actionButtons as they will be added from individual panels
|
|
77
|
+
this.removeAllAggregation("menuItems");
|
|
78
|
+
this.removeAllAggregation("actionButtons");
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Loads the Insights section.
|
|
82
|
+
* Overrides the load method of the BaseContainer.
|
|
83
|
+
*
|
|
84
|
+
* @private
|
|
85
|
+
* @override
|
|
86
|
+
*/
|
|
87
|
+
public load() {
|
|
88
|
+
if (this._isInitialRender) {
|
|
89
|
+
const aContent = this.getContent();
|
|
90
|
+
aContent.forEach((oContent) => {
|
|
91
|
+
this.panelContext[oContent.getMetadata().getName()] = oContent as CardsPanel;
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// Render individual panels
|
|
95
|
+
aContent.forEach((content) => {
|
|
96
|
+
const panel = content as CardsPanel;
|
|
97
|
+
panel.attachHandleHidePanel(() => this.handleHidePanel(panel));
|
|
98
|
+
panel.attachHandleUnhidePanel(() => this.unhidePanelIfHidden(panel));
|
|
99
|
+
void panel.renderPanel();
|
|
100
|
+
});
|
|
101
|
+
this._isInitialRender = false;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Handles the hiding of a panel by removing its content, updating the panel load status,
|
|
107
|
+
* and managing the display of the container header and error panel.
|
|
108
|
+
*
|
|
109
|
+
* @param {BasePanel} panel - The panel to be hidden.
|
|
110
|
+
* @private
|
|
111
|
+
*/
|
|
112
|
+
public handleHidePanel(panel: BasePanel) {
|
|
113
|
+
this.removeContent(panel);
|
|
114
|
+
const panelName = panel.getMetadata().getName();
|
|
115
|
+
this.handlePanelLoad(panelName, { loaded: false, count: 0 });
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Unhides the specified panel if it is hidden.
|
|
120
|
+
*
|
|
121
|
+
* @param {CardsPanel} panel - The panel to unhide.
|
|
122
|
+
*/
|
|
123
|
+
public unhidePanelIfHidden(panel: CardsPanel) {
|
|
124
|
+
const layout = this._getLayout();
|
|
125
|
+
const panelExpandedName = layout._getCurrentExpandedElementName();
|
|
126
|
+
// Function to handle panel content insertion
|
|
127
|
+
const processPanelVisibility = (panelName: string, insertContentFn: () => void) => {
|
|
128
|
+
if (!panelExpandedName || panelExpandedName === panel.getProperty("fullScreenName")) {
|
|
129
|
+
/**
|
|
130
|
+
loaded value can be false or undefined, false being hidden and undefined being loading
|
|
131
|
+
if the panel is hidden then only unhide it
|
|
132
|
+
*/
|
|
133
|
+
if (this.panelLoaded[panelName].loaded === false) {
|
|
134
|
+
insertContentFn();
|
|
135
|
+
// Remove hidden class if applied
|
|
136
|
+
panel.setVisible(true);
|
|
137
|
+
}
|
|
138
|
+
this.handlePanelLoad(panelName, { loaded: true, count: this.panelLoaded[panelName].count });
|
|
139
|
+
} else {
|
|
140
|
+
const listener = () => {
|
|
141
|
+
insertContentFn();
|
|
142
|
+
// Remove hidden class if applied
|
|
143
|
+
panel.setVisible(true);
|
|
144
|
+
layout.detachOnCollapse(listener); // Remove the listener after execution
|
|
145
|
+
};
|
|
146
|
+
this.handlePanelLoad(panelName, { loaded: true, count: this.panelLoaded[panelName].count });
|
|
147
|
+
layout.attachOnCollapse(listener);
|
|
148
|
+
}
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
// Handling CardsPanel
|
|
152
|
+
if (panel instanceof CardsPanel && !this.panelLoaded[cardsPanelName].loaded) {
|
|
153
|
+
processPanelVisibility(cardsPanelName, () => this.addContent(this.panelContext[cardsPanelName]));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Adjusts the layout of the container.
|
|
159
|
+
*
|
|
160
|
+
* @private
|
|
161
|
+
* @override
|
|
162
|
+
*/
|
|
163
|
+
public adjustLayout() {
|
|
164
|
+
//adjust layout of all panels
|
|
165
|
+
(this.getContent() as CardsPanel[]).forEach((panel) => panel._adjustLayout?.());
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Handles the loading of a panel.
|
|
170
|
+
*
|
|
171
|
+
* @param {string} panelName - The name of the panel.
|
|
172
|
+
* @param {object} oVal - The load status and count of the panel.
|
|
173
|
+
* @param {boolean} oVal.loaded - The load status of the panel.
|
|
174
|
+
* @param {number} oVal.count - The count of items in the panel.
|
|
175
|
+
*/
|
|
176
|
+
public handlePanelLoad(panelName: string, oVal: { loaded: boolean; count: number }) {
|
|
177
|
+
if (this.panelLoaded[panelName].loaded !== oVal.loaded) {
|
|
178
|
+
this.panelLoaded[panelName] = oVal;
|
|
179
|
+
}
|
|
180
|
+
this.adjustLayout();
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Retrieves the generic placeholder content for the Cards container.
|
|
185
|
+
*
|
|
186
|
+
* @returns {string} The HTML string representing the cards container's placeholder content.
|
|
187
|
+
*/
|
|
188
|
+
protected getGenericPlaceholderContent(): string {
|
|
189
|
+
return getCardsPlaceholder();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* Refreshes the data for a specific panel based on its key.
|
|
194
|
+
*
|
|
195
|
+
* @private
|
|
196
|
+
* @param {string} key - The key of the panel to refresh.
|
|
197
|
+
*/
|
|
198
|
+
public async refreshData(key: string) {
|
|
199
|
+
const panel = Object.values(this.panelContext).find((panel) => panel.getKey() === key);
|
|
200
|
+
await panel?.refreshData?.();
|
|
201
|
+
}
|
|
202
|
+
}
|