@sapui5/sap.suite.ui.generic.template 1.131.1 → 1.132.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/sap/suite/ui/generic/template/.library +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/SmartFilterBarExt.js +3 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/SmartKpiTag.js +37 -11
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/FilterItem.js +3 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/FilterItemMicroChart.js +19 -4
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/SmartVisualFilterBar.js +46 -15
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/DropDownController.js +42 -17
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/KpiTagController.js +13 -3
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/extensionAPI/ExtensionAPI.js +2 -2
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_US_saptrc.properties +105 -105
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sk.properties +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/util/FilterUtil.js +17 -6
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +44 -22
- package/src/sap/suite/ui/generic/template/ListReport/controller/IappStateHandler.js +18 -2
- package/src/sap/suite/ui/generic/template/ListReport/extensionAPI/ExtensionAPI.js +2 -2
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +1 -4
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ar.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_bg.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ca.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cnr.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cs.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cy.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_da.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_de.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_el.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_GB.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_saprigi.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_saptrc.properties +58 -58
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_es.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_es_MX.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_et.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fi.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr_CA.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hi.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hr.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hu.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_id.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_it.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_iw.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ja.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_kk.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ko.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_lt.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_lv.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_mk.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ms.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_nl.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_no.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pl.properties +2 -4
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt_PT.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ro.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ru.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sh.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sk.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sl.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sr.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sv.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_th.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_tr.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_uk.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_vi.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_zh_CN.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_zh_TW.properties +1 -3
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/BreakoutActionButtons.fragment.xml +3 -2
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/FullscreenPage.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartList.fragment.xml +3 -3
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartTable.fragment.xml +1 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +107 -23
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +34 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/InlineCreationRowsHelper.js +46 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/controllerFrameworkExtensions.js +21 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/extensionAPI/ExtensionAPI.js +29 -5
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_saptrc.properties +95 -95
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/view/Details.view.xml +2 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/CRUDActionButtons.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Footer.fragment.xml +3 -3
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/HeaderContainer.fragment.xml +4 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/HeaderImage.fragment.xml +4 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartChart.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTable.fragment.xml +2 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/i18n/i18n_en_US_saptrc.properties +14 -14
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickView/i18n/i18n_en_US_saptrc.properties +2 -2
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/designtime/controls/DynamicPage.designtime.js +142 -194
- package/src/sap/suite/ui/generic/template/designtime/controls/ObjectPageLayout.designtime.js +204 -0
- package/src/sap/suite/ui/generic/template/designtime/controls/SmartFilterBar.designtime.js +236 -0
- package/src/sap/suite/ui/generic/template/designtime/utils/designtimeHelper.js +36 -9
- package/src/sap/suite/ui/generic/template/designtime/utils/designtimeUtils.js +67 -23
- package/src/sap/suite/ui/generic/template/detailTemplates/i18n/i18n_en_US_saptrc.properties +6 -6
- package/src/sap/suite/ui/generic/template/fragments/BreakoutActions.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/fragments/DeterminingActions.fragment.xml +3 -2
- package/src/sap/suite/ui/generic/template/fragments/EasyFilter.fragment.xml +0 -6
- package/src/sap/suite/ui/generic/template/fragments/GlobalActions.fragment.xml +3 -2
- package/src/sap/suite/ui/generic/template/fragments/GridTableCells.fragment.xml +3 -2
- package/src/sap/suite/ui/generic/template/fragments/HeaderAddress.fragment.xml +2 -1
- package/src/sap/suite/ui/generic/template/fragments/HeaderContactWithDetailsPopover.fragment.xml +2 -1
- package/src/sap/suite/ui/generic/template/fragments/HeaderDataPointContent.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/HeaderForm.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/HeaderFormDataField.fragment.xml +12 -5
- package/src/sap/suite/ui/generic/template/fragments/HeaderPlainText.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/HeaderRatingIndicator.fragment.xml +5 -7
- package/src/sap/suite/ui/generic/template/fragments/ProgressIndicator.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/fragments/QuickViewSmartForm.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/fragments/RatingIndicatorFacet.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/fragments/SmartFormDataField.fragment.xml +4 -3
- package/src/sap/suite/ui/generic/template/fragments/SmartMicroChart.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/SmartTableUiTableCommons.fragment.xml +2 -5
- package/src/sap/suite/ui/generic/template/fragments/TableCell.fragment.xml +7 -5
- package/src/sap/suite/ui/generic/template/fragments/TableColumnListItem.fragment.xml +2 -5
- package/src/sap/suite/ui/generic/template/fragments/ToolbarButton.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/fragments/TreeTableColumns.fragment.xml +3 -2
- package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +10 -9
- package/src/sap/suite/ui/generic/template/genericUtilities/filterHelper.js +70 -2
- package/src/sap/suite/ui/generic/template/genericUtilities/polyFill.js +14 -0
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +53 -12
- package/src/sap/suite/ui/generic/template/js/QuickTemplates/QuickTemplateComponentFactory.js +25 -13
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +16 -225
- package/src/sap/suite/ui/generic/template/lib/CRUDHelper.js +5 -3
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +11 -4
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +37 -12
- package/src/sap/suite/ui/generic/template/lib/ComponentUtils.js +3 -3
- package/src/sap/suite/ui/generic/template/lib/ContextBookkeeping.js +39 -23
- package/src/sap/suite/ui/generic/template/lib/FlexibleColumnLayoutHandler.js +13 -5
- package/src/sap/suite/ui/generic/template/lib/FlexibleColumnLayoutHelper.js +168 -0
- package/src/sap/suite/ui/generic/template/lib/MessageStripHelper.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/ShellPersonalizationService.js +137 -0
- package/src/sap/suite/ui/generic/template/lib/SideEffectUtil.js +56 -1
- package/src/sap/suite/ui/generic/template/lib/TemplateComponent.js +24 -4
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +91 -36
- package/src/sap/suite/ui/generic/template/lib/ai/FioriAIHandler.js +30 -35
- package/src/sap/suite/ui/generic/template/lib/deletionHelper.js +10 -2
- package/src/sap/suite/ui/generic/template/lib/filterHelper.js +7 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +6 -15
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +2 -10
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_sappsd.properties +0 -11
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saptrc.properties +174 -149
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +3 -11
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +3 -11
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +1 -9
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +59 -38
- package/src/sap/suite/ui/generic/template/library.js +7 -3
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/ChartActions.fragment.xml +4 -3
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +4 -3
- package/src/sap/suite/ui/generic/template/listTemplates/i18n/i18n_en_US_saptrc.properties +1 -1
- package/src/sap/suite/ui/generic/template/manifestMerger/ChangePageConfiguration.js +1 -1
- package/src/sap/suite/ui/generic/template/support/DiagnosticsTool/DiagnosticsTool.js +15 -3
- package/src/sap/suite/ui/generic/template/support/DiagnosticsTool/view/DiagnosticsTool.view.xml +0 -24
- package/src/sap/suite/ui/generic/template/support/lib/CommonChecks.js +11 -19
- package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +0 -4
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/ObjectPage.less +0 -4
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +0 -4
- package/src/sap/suite/ui/generic/template/themes/sap_fiori_3_hcb/AnalyticalListPage.less +0 -1
- package/src/sap/suite/ui/generic/template/themes/sap_fiori_3_hcw/AnalyticalListPage.less +0 -1
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_ObjectPage.less +0 -4
- package/src/sap/suite/ui/generic/template/themes/sap_horizon_hcb/AnalyticalListPage.less +0 -1
- package/src/sap/suite/ui/generic/template/themes/sap_horizon_hcw/AnalyticalListPage.less +0 -1
- package/src/sap/suite/ui/generic/template/fragments/ContactDetailsQuickViewGroup.fragment.xml +0 -36
- package/src/sap/suite/ui/generic/template/js/formatters/formatDisplayValueForProgressIndicator.js +0 -28
- package/src/sap/suite/ui/generic/template/js/formatters/formatImageUrl.js +0 -21
- package/src/sap/suite/ui/generic/template/js/formatters/formatRatingIndicatorAggregateCount.js +0 -21
- package/src/sap/suite/ui/generic/template/js/formatters/formatRatingIndicatorFooterText.js +0 -21
- package/src/sap/suite/ui/generic/template/js/formatters/formatRatingIndicatorSubTitle.js +0 -21
- package/src/sap/suite/ui/generic/template/js/formatters/setInfoHighlight.js +0 -21
- package/src/sap/suite/ui/generic/template/js/formatters/setRowNavigated.js +0 -26
|
@@ -6,13 +6,12 @@
|
|
|
6
6
|
*/
|
|
7
7
|
sap.ui.define([
|
|
8
8
|
"sap/base/util/deepClone",
|
|
9
|
-
"sap/base/util/ObjectPath",
|
|
10
9
|
"sap/suite/ui/generic/template/designtime/utils/designtimeUtils",
|
|
10
|
+
"sap/base/util/ObjectPath",
|
|
11
11
|
"sap/suite/ui/generic/template/genericUtilities/testableHelper"
|
|
12
12
|
],
|
|
13
|
-
function (deepClone,
|
|
13
|
+
function (deepClone, designtimeUtils, ObjectPath, testableHelper) {
|
|
14
14
|
"use strict";
|
|
15
|
-
const { SettingScope } = designtimeUtils;
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
17
|
* @typedef {Object} DesigntimeSetting
|
|
@@ -36,7 +35,7 @@ sap.ui.define([
|
|
|
36
35
|
===============================================
|
|
37
36
|
|
|
38
37
|
* @typedef {Object} ControlInfo
|
|
39
|
-
* @property {string} sParentComponentName - The name of the parent component.
|
|
38
|
+
* @property {string} [sParentComponentName] - The name of the parent component.
|
|
40
39
|
* @extends ChangeParameters
|
|
41
40
|
|
|
42
41
|
* @typedef {ChangeParameters & ControlInfo} ControlChangeParams
|
|
@@ -51,40 +50,153 @@ sap.ui.define([
|
|
|
51
50
|
|
|
52
51
|
|
|
53
52
|
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Retrieves the designtime metadata for the control.
|
|
56
|
+
* @param {Object} oControl - Dynamic Page control
|
|
57
|
+
* @returns {DesigntimeSetting[]} The designtime metadata
|
|
58
|
+
*/
|
|
59
|
+
function getAllDesigntimeSettings(oControl) {
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @type {DesigntimeSetting}
|
|
63
|
+
*/
|
|
64
|
+
const smartVariantManagement = {
|
|
65
|
+
id: "smartVariantManagement",
|
|
66
|
+
name: "Variant Management",
|
|
67
|
+
description: "Enable Smart Variant Management",
|
|
68
|
+
type: "booleanOrString",
|
|
69
|
+
value: "true",
|
|
70
|
+
enums: [
|
|
71
|
+
{
|
|
72
|
+
id: "true",
|
|
73
|
+
name: "Entire Page"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: "false",
|
|
77
|
+
name: "Per Control"
|
|
78
|
+
}
|
|
79
|
+
],
|
|
80
|
+
getPath: () => getSettingsPath("smartVariantManagement")
|
|
81
|
+
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @type {DesigntimeSetting}
|
|
86
|
+
*/
|
|
87
|
+
const hideVariantManagement = {
|
|
88
|
+
id: "variantManagementHidden",
|
|
89
|
+
name: "Hide Variant Management",
|
|
90
|
+
description: "Hide Variant Management",
|
|
91
|
+
type: "boolean",
|
|
92
|
+
value: false,
|
|
93
|
+
getPath: () => getSettingsPath("variantManagementHidden")
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @type {DesigntimeSetting}
|
|
98
|
+
*/
|
|
99
|
+
const enableTableFilterInPageVariant = {
|
|
100
|
+
id: "enableTableFilterInPageVariant",
|
|
101
|
+
name: "Enable Table Filter in Page Variant",
|
|
102
|
+
description: "Enable Table Filter in Page Variant",
|
|
103
|
+
type: "boolean",
|
|
104
|
+
value: false,
|
|
105
|
+
getPath: () => getSettingsPath("enableTableFilterInPageVariant")
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* @type {DesigntimeSetting}
|
|
111
|
+
* enum for dataLoadSettings - ifFilterExists, always, never
|
|
112
|
+
*/
|
|
113
|
+
const initialLoad = {
|
|
114
|
+
id: "loadDataOnAppLaunch",
|
|
115
|
+
name: "Initial Load",
|
|
116
|
+
description: "Initial Load",
|
|
117
|
+
type: "string",
|
|
118
|
+
value: "ifFilterExists",
|
|
119
|
+
enums: [
|
|
120
|
+
{
|
|
121
|
+
id: "ifFilterExists",
|
|
122
|
+
name: "Auto"
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
id: "always",
|
|
126
|
+
name: "Enabled"
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
id: "never",
|
|
130
|
+
name: "Disabled"
|
|
131
|
+
}
|
|
132
|
+
],
|
|
133
|
+
getPath: () => "component/settings/dataLoadSettings/loadDataOnAppLaunch"
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @type {DesigntimeSetting}
|
|
138
|
+
*/
|
|
139
|
+
const openInEditMode = {
|
|
140
|
+
id: "editFlow",
|
|
141
|
+
name: "Open in Edit Mode",
|
|
142
|
+
description: "Define the selection limit",
|
|
143
|
+
value: "display",
|
|
144
|
+
type: "booleanOrStringCheckbox",
|
|
145
|
+
getPath: () => getSettingsPath("editFlow"),
|
|
146
|
+
enums: [
|
|
147
|
+
{ id: "direct", name: "true" },
|
|
148
|
+
{ id: "display", name: "false" }
|
|
149
|
+
|
|
150
|
+
]
|
|
151
|
+
};
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
return [
|
|
156
|
+
smartVariantManagement,
|
|
157
|
+
hideVariantManagement,
|
|
158
|
+
enableTableFilterInPageVariant,
|
|
159
|
+
initialLoad,
|
|
160
|
+
openInEditMode
|
|
161
|
+
];
|
|
162
|
+
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
function getSettingsPath(name, mControlDetails) {
|
|
167
|
+
return `component/settings/${name}`;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
|
|
54
172
|
/**
|
|
55
173
|
* Retrieves the runtime adaptation properties based on the allowed design-time settings and global settings.
|
|
56
174
|
*
|
|
57
175
|
* @param {Array} aAllowedDesigntimeSettings - The array of allowed design-time settings.
|
|
58
|
-
* @param {Object}
|
|
176
|
+
* @param {Object} mLrOrALPSettings - The global manifest settings object.
|
|
59
177
|
* @returns {Object} - The object containing the runtime adaptation properties.
|
|
60
178
|
*/
|
|
61
|
-
function getRuntimeAdapationProperties(aAllowedDesigntimeSettings,
|
|
179
|
+
function getRuntimeAdapationProperties(aAllowedDesigntimeSettings, mLrOrALPSettings) {
|
|
62
180
|
const mPropertyValues = {};
|
|
63
181
|
|
|
64
182
|
aAllowedDesigntimeSettings.forEach(oSetting => {
|
|
65
183
|
const sProperty = oSetting.id;
|
|
66
184
|
switch (sProperty) {
|
|
67
|
-
case "
|
|
68
|
-
mPropertyValues[sProperty] =
|
|
69
|
-
break;
|
|
70
|
-
case "flexibleColumnLayout":
|
|
71
|
-
mPropertyValues[sProperty] = !!mGlobalSettings.flexibleColumnLayout || oSetting.value;
|
|
185
|
+
case "smartVariantManagement":
|
|
186
|
+
mPropertyValues[sProperty] = mLrOrALPSettings.smartVariantManagement || oSetting.value;
|
|
72
187
|
break;
|
|
73
|
-
case "
|
|
74
|
-
|
|
75
|
-
mPropertyValues[sProperty] = ObjectPath.get(manifestPath, mGlobalSettings) || oSetting.value;
|
|
188
|
+
case "variantManagementHidden":
|
|
189
|
+
mPropertyValues[sProperty] = mLrOrALPSettings.variantManagementHidden || oSetting.value;
|
|
76
190
|
break;
|
|
77
|
-
case "
|
|
78
|
-
|
|
79
|
-
mPropertyValues[sProperty] = ObjectPath.get(manifestPathThreeColumns, mGlobalSettings) || oSetting.value;
|
|
191
|
+
case "enableTableFilterInPageVariant":
|
|
192
|
+
mPropertyValues[sProperty] = mLrOrALPSettings.enableTableFilterInPageVariant || oSetting.value;
|
|
80
193
|
break;
|
|
81
|
-
case "
|
|
82
|
-
mPropertyValues[sProperty] =
|
|
194
|
+
case "loadDataOnAppLaunch":
|
|
195
|
+
mPropertyValues[sProperty] = ObjectPath.get("dataLoadSettings.loadDataOnAppLaunch", mLrOrALPSettings) || oSetting.value;
|
|
83
196
|
break;
|
|
84
|
-
case "
|
|
85
|
-
mPropertyValues[sProperty] =
|
|
197
|
+
case "editFlow":
|
|
198
|
+
mPropertyValues[sProperty] = mLrOrALPSettings.editFlow || oSetting.value;
|
|
86
199
|
break;
|
|
87
|
-
|
|
88
200
|
default:
|
|
89
201
|
break;
|
|
90
202
|
}
|
|
@@ -92,6 +204,9 @@ sap.ui.define([
|
|
|
92
204
|
return mPropertyValues;
|
|
93
205
|
}
|
|
94
206
|
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
95
210
|
/**
|
|
96
211
|
* Opens the dialog for the table configuration.
|
|
97
212
|
* @param {sap.ui.core.Control} oControl - The control for which the dialog should be opened.
|
|
@@ -101,199 +216,32 @@ sap.ui.define([
|
|
|
101
216
|
async function fnOpenTableConfigurationDialog(oControl, mPropertyBag) {
|
|
102
217
|
const oResourceModel = oControl.getModel("i18n");
|
|
103
218
|
const oComponent = designtimeUtils.getOwnerComponentFor(oControl);
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
const aAllowedDesigntimeSettings = getAllowedDesigntimeSettings(oControl);
|
|
108
|
-
const mGlobalSettings = designtimeUtils.getSupportedGlobalManifestSettings(oAppComponent);
|
|
219
|
+
const mLrOrALPSettings = oComponent.mProperties;
|
|
220
|
+
const aAllowedDesigntimeSettings = getAllDesigntimeSettings(oControl);
|
|
109
221
|
|
|
110
222
|
// Get the current values of the properties
|
|
111
|
-
const mRuntimeAdaptationPropertyValues = getRuntimeAdapationProperties(aAllowedDesigntimeSettings,
|
|
223
|
+
const mRuntimeAdaptationPropertyValues = getRuntimeAdapationProperties(aAllowedDesigntimeSettings, mLrOrALPSettings);
|
|
112
224
|
// Save the unchanged data to compare later
|
|
113
225
|
const mUnchangedData = deepClone(mRuntimeAdaptationPropertyValues);
|
|
114
226
|
// Get the settings of the dialog from the designtime settings using which the dialog will be created
|
|
115
227
|
const aItems = designtimeUtils.getSettings(mRuntimeAdaptationPropertyValues, aAllowedDesigntimeSettings);
|
|
116
|
-
// Add the scope of the changes
|
|
117
|
-
const oScopeControlData = {
|
|
118
|
-
type: "string",
|
|
119
|
-
"enum": [],
|
|
120
|
-
value: SettingScope.Page,
|
|
121
|
-
id: "scope",
|
|
122
|
-
disabled: false
|
|
123
|
-
};
|
|
124
|
-
const aChangeScopeOption = [
|
|
125
|
-
{
|
|
126
|
-
label: "Scope of the changes",
|
|
127
|
-
tooltip: "Scope of the changes",
|
|
128
|
-
control: [
|
|
129
|
-
oScopeControlData
|
|
130
|
-
]
|
|
131
|
-
}
|
|
132
|
-
];
|
|
133
228
|
|
|
134
|
-
// if the allowed designtime settings contain a setting that supports global scope
|
|
135
|
-
// then add the global scope option
|
|
136
|
-
const bSupportsGlobalScope = aAllowedDesigntimeSettings.some(oSetting => oSetting.bSupportsGlobalScope);
|
|
137
|
-
if (bSupportsGlobalScope) {
|
|
138
|
-
// @ts-ignore
|
|
139
|
-
oScopeControlData.enum.push({ id: SettingScope.Application, name: SettingScope.Application });
|
|
140
|
-
}
|
|
141
229
|
// disable the scope control if there is only one option
|
|
142
|
-
oScopeControlData.disabled = oScopeControlData.enum.length <= 1;
|
|
143
230
|
|
|
144
|
-
const mPropertyValuesEntered = await designtimeUtils.openAdaptionDialog([...
|
|
231
|
+
const mPropertyValuesEntered = await designtimeUtils.openAdaptionDialog([...aItems], mRuntimeAdaptationPropertyValues, mUnchangedData, "{i18n>RTA_CONFIGURATION_TITLE_LIST_REPORT}", { width: "650px", height: "800px" }, oResourceModel);
|
|
145
232
|
|
|
146
|
-
// if the scope is not set, set it to the default is "Application Scope"
|
|
147
|
-
mPropertyValuesEntered["scope"] = mPropertyValuesEntered["scope"] || SettingScope.Application;
|
|
148
|
-
mUnchangedData["scope"] = mUnchangedData["scope"] || SettingScope.Application;
|
|
149
233
|
|
|
150
234
|
/**
|
|
151
235
|
* @type {ControlChangeParams}
|
|
152
236
|
*/
|
|
153
237
|
const mPathParameters = {
|
|
154
|
-
sChangeType: designtimeUtils.ChangeType.ChangePageConfiguration
|
|
155
|
-
sParentComponentName: sComponentName,
|
|
156
|
-
sScope: mPropertyValuesEntered["scope"]
|
|
238
|
+
sChangeType: designtimeUtils.ChangeType.ChangePageConfiguration
|
|
157
239
|
};
|
|
158
240
|
return designtimeUtils.extractChanges(mPropertyValuesEntered, mUnchangedData, aAllowedDesigntimeSettings, oComponent, mPathParameters);
|
|
159
241
|
|
|
160
242
|
}
|
|
161
243
|
|
|
162
|
-
|
|
163
|
-
/**
|
|
164
|
-
* Retrieves the designtime settings for the Control.
|
|
165
|
-
* @param {object} oControl - The Control object.
|
|
166
|
-
* @returns {DesigntimeSetting[]} - The designtime settings for the Control.
|
|
167
|
-
*/
|
|
168
|
-
let getAllowedDesigntimeSettings = function getAllowedDesigntimeSettings(oControl) {
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* @type {DesigntimeSetting}
|
|
172
|
-
*/
|
|
173
|
-
const statePreservationMode = {
|
|
174
|
-
id: "statePreservationMode",
|
|
175
|
-
name: "State Preservation Mode",
|
|
176
|
-
description: "The state preservation mode.",
|
|
177
|
-
value: "auto",
|
|
178
|
-
type: "string",
|
|
179
|
-
// "auto" - indicates that "persistence" should be used in FCL and "discovery" in non-FCL case
|
|
180
|
-
enums: [
|
|
181
|
-
{ id: "auto", name: "Auto" },
|
|
182
|
-
{ id: "persistence", name: "Persistence" },
|
|
183
|
-
{ id: "discovery", name: "Discovery" }
|
|
184
|
-
],
|
|
185
|
-
bSupportsGlobalScope: true,
|
|
186
|
-
getPath: (mControlDetails) => {
|
|
187
|
-
return "settings/statePreservationMode";
|
|
188
|
-
}
|
|
189
|
-
};
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* @type {DesigntimeSetting}
|
|
193
|
-
*/
|
|
194
|
-
const flexibleColumnLayout = {
|
|
195
|
-
id: "flexibleColumnLayout",
|
|
196
|
-
name: "Flexible Column Layout (FCL)",
|
|
197
|
-
description: "The flexible column layout.",
|
|
198
|
-
type: "booleanOrString",
|
|
199
|
-
value: null,
|
|
200
|
-
bSupportsGlobalScope: true,
|
|
201
|
-
getPath: (mControlDetails) => {
|
|
202
|
-
return "settings/flexibleColumnLayout";
|
|
203
|
-
},
|
|
204
|
-
enums: [
|
|
205
|
-
{ id: "null", name: "Standard", value: {} },
|
|
206
|
-
{ id: "object", name: "Flexible Column Layout" }
|
|
207
|
-
],
|
|
208
|
-
writeObject: [
|
|
209
|
-
{
|
|
210
|
-
id: "defaultTwoColumnLayoutType",
|
|
211
|
-
getPath: () => "defaultTwoColumnLayoutType",
|
|
212
|
-
description: "Select layout for 2 columns"
|
|
213
|
-
},
|
|
214
|
-
{
|
|
215
|
-
id: "defaultThreeColumnLayoutType", getPath: () => "defaultThreeColumnLayoutType",
|
|
216
|
-
description: "Select layout for 3 columns"
|
|
217
|
-
}
|
|
218
|
-
],
|
|
219
|
-
writeObjectFor: "object"
|
|
220
|
-
};
|
|
221
|
-
/**
|
|
222
|
-
* @type {DesigntimeSetting}
|
|
223
|
-
*/
|
|
224
|
-
const fclDefaultTwoColumnLayoutType = {
|
|
225
|
-
id: "defaultTwoColumnLayoutType",
|
|
226
|
-
name: "FCL / Default Two Column Layout Type",
|
|
227
|
-
description: "The default two column layout type.",
|
|
228
|
-
type: "string",
|
|
229
|
-
value: "TwoColumnsBeginExpanded",
|
|
230
|
-
enums: [
|
|
231
|
-
{ id: "TwoColumnsBeginExpanded", name: "Begin-Expanded" },
|
|
232
|
-
{ id: "TwoColumnsMidExpanded", name: "Mid-Expanded" }
|
|
233
|
-
],
|
|
234
|
-
skipChange: true
|
|
235
|
-
};
|
|
236
|
-
|
|
237
|
-
/**
|
|
238
|
-
* @type {DesigntimeSetting}
|
|
239
|
-
*/
|
|
240
|
-
const fclDefaultThreeColumnLayoutType = {
|
|
241
|
-
id: "defaultThreeColumnLayoutType",
|
|
242
|
-
name: "FCL / Default Three Column Layout Type",
|
|
243
|
-
description: "The default three column layout type.",
|
|
244
|
-
type: "string",
|
|
245
|
-
value: "ThreeColumnsMidExpanded",
|
|
246
|
-
enums: [
|
|
247
|
-
{ id: "ThreeColumnsMidExpanded", name: "Mid-Expanded" },
|
|
248
|
-
{ id: "ThreeColumnsEndExpanded", name: "End-Expanded" }
|
|
249
|
-
],
|
|
250
|
-
skipChange: true
|
|
251
|
-
};
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
* @type {DesigntimeSetting}
|
|
255
|
-
*/
|
|
256
|
-
const externalNavigationSettings = {
|
|
257
|
-
id: "externalNavigationSettings",
|
|
258
|
-
name: "External Navigation Settings",
|
|
259
|
-
description: "The external navigation settings.",
|
|
260
|
-
type: "json",
|
|
261
|
-
value: undefined
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
/**
|
|
265
|
-
* @type {DesigntimeSetting}
|
|
266
|
-
*/
|
|
267
|
-
const inboundParameters = {
|
|
268
|
-
id: "inboundParameters",
|
|
269
|
-
name: "Inbound Parameters",
|
|
270
|
-
description: "The inbound parameters.",
|
|
271
|
-
type: "json",
|
|
272
|
-
value: undefined
|
|
273
|
-
};
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* @type {DesigntimeSetting[]}
|
|
278
|
-
*/
|
|
279
|
-
const designtimeSettings = [
|
|
280
|
-
statePreservationMode,
|
|
281
|
-
flexibleColumnLayout,
|
|
282
|
-
fclDefaultTwoColumnLayoutType,
|
|
283
|
-
fclDefaultThreeColumnLayoutType,
|
|
284
|
-
externalNavigationSettings,
|
|
285
|
-
inboundParameters
|
|
286
|
-
|
|
287
|
-
];
|
|
288
|
-
return designtimeSettings.filter(oSetting => {
|
|
289
|
-
const sComponentName = designtimeUtils.getOwnerComponentFor(oControl).getMetadata().getComponentName();
|
|
290
|
-
return !oSetting.restrictedTo || oSetting.restrictedTo.includes(sComponentName);
|
|
291
|
-
});
|
|
292
|
-
};
|
|
293
|
-
|
|
294
244
|
// Expose the functions for QUnit tests
|
|
295
|
-
|
|
296
|
-
testableHelper.testableStatic(getRuntimeAdapationProperties, "getRuntimeAdapationProperties");
|
|
297
245
|
testableHelper.testableStatic(fnOpenTableConfigurationDialog, "fnOpenTableConfigurationDialog");
|
|
298
246
|
|
|
299
247
|
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
|
|
4
|
+
(c) Copyright 2009-2015 SAP SE. All rights reserved
|
|
5
|
+
|
|
6
|
+
*/
|
|
7
|
+
sap.ui.define([
|
|
8
|
+
"sap/base/util/deepClone",
|
|
9
|
+
"sap/suite/ui/generic/template/designtime/utils/designtimeUtils",
|
|
10
|
+
"sap/base/util/ObjectPath",
|
|
11
|
+
"sap/suite/ui/generic/template/genericUtilities/testableHelper"
|
|
12
|
+
],
|
|
13
|
+
function (deepClone, designtimeUtils, ObjectPath, testableHelper) {
|
|
14
|
+
"use strict";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @typedef {Object} DesigntimeSetting
|
|
18
|
+
* @property {string} id - The ID of the designtime setting.
|
|
19
|
+
* @property {string} name - The name of the designtime setting.
|
|
20
|
+
* @property {string} description - The description of the designtime setting.
|
|
21
|
+
* @property {PropertyValue} [value] - The default value of the designtime setting.
|
|
22
|
+
* @property {string} type - The type of the designtime setting.
|
|
23
|
+
* @property {Array.<Enum>} [enums] - The array of possible enum values for the designtime setting.
|
|
24
|
+
* @property {(mControlDetails: ControlInfo) => string} [getPath] - The path to the designtime setting in the manifest.
|
|
25
|
+
* @property {boolean} [bSupportsGlobalScope] - Indicates if the setting supports global scope. (Default: false)
|
|
26
|
+
* @property {string[]} [restrictedTo] - The array of components for which the setting is restricted.
|
|
27
|
+
* @property {Partial<DesigntimeSetting>[]} [writeObject] - An array of DesigntimeSetting objects.
|
|
28
|
+
* @property {string} [writeObjectFor] - The value for which the writeObject should be applied.
|
|
29
|
+
* @property {boolean} [skipChange] - Indicates if the change should be skipped.
|
|
30
|
+
|
|
31
|
+
===============================================
|
|
32
|
+
* @typedef {Object} ChangeParameters - Descriptor change parameters.
|
|
33
|
+
* @property {string} [sScope] - The scope of the manifest setting.
|
|
34
|
+
* @property {string} [sChangeType] - Desciptor change type.
|
|
35
|
+
===============================================
|
|
36
|
+
|
|
37
|
+
* @typedef {Object} ControlInfo
|
|
38
|
+
* @property {string} [sParentComponentName] - The name of the parent component.
|
|
39
|
+
* @extends ChangeParameters
|
|
40
|
+
|
|
41
|
+
* @typedef {ChangeParameters & ControlInfo} ControlChangeParams
|
|
42
|
+
|
|
43
|
+
* @typedef {string | boolean | string[] | null } PropertyValue
|
|
44
|
+
|
|
45
|
+
* @typedef {Object} Enum
|
|
46
|
+
* @property {string} id - The ID of the enum value.
|
|
47
|
+
* @property {string} name - The name of the enum value.
|
|
48
|
+
* @property {Object} [value] - The value of the enum value.
|
|
49
|
+
*/
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Retrieves the runtime adaptation properties based on the allowed design-time settings and global settings.
|
|
54
|
+
*
|
|
55
|
+
* @param {Array} aAllowedDesigntimeSettings - The array of allowed design-time settings.
|
|
56
|
+
* @param {Object} mSettings - The global manifest settings object.
|
|
57
|
+
* @returns {Object} - The object containing the runtime adaptation properties.
|
|
58
|
+
*/
|
|
59
|
+
function getRuntimeAdapationProperties(aAllowedDesigntimeSettings, mSettings) {
|
|
60
|
+
const mPropertyValues = {};
|
|
61
|
+
|
|
62
|
+
aAllowedDesigntimeSettings.forEach(oSetting => {
|
|
63
|
+
const sProperty = oSetting.id;
|
|
64
|
+
switch (sProperty) {
|
|
65
|
+
case "editableHeaderContent":
|
|
66
|
+
mPropertyValues[sProperty] = mSettings[sProperty] || oSetting.value;
|
|
67
|
+
break;
|
|
68
|
+
case "tableVariantManagement":
|
|
69
|
+
mPropertyValues[sProperty] = mSettings[sProperty] || oSetting.value;
|
|
70
|
+
break;
|
|
71
|
+
case "showRelatedApps":
|
|
72
|
+
mPropertyValues[sProperty] = mSettings[sProperty] || oSetting.value;
|
|
73
|
+
break;
|
|
74
|
+
default:
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
return mPropertyValues;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Retrieves the designtime settings for the Control.
|
|
83
|
+
* @param {object} oControl - The Control object.
|
|
84
|
+
* @returns {DesigntimeSetting[]}
|
|
85
|
+
*/
|
|
86
|
+
let getAllDesigntimeSettings = function getAllDesigntimeSettings(oControl) {
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* @type {DesigntimeSetting}
|
|
90
|
+
*/
|
|
91
|
+
const editableHeaderContent = {
|
|
92
|
+
id: "editableHeaderContent",
|
|
93
|
+
name: "Editable Header Content",
|
|
94
|
+
description: "Decide whether the header content is editable",
|
|
95
|
+
value: false,
|
|
96
|
+
getPath: () => 'component/settings/editableHeaderContent',
|
|
97
|
+
type: "boolean"
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* @type {DesigntimeSetting}
|
|
101
|
+
*/
|
|
102
|
+
const tableVariantManagement = {
|
|
103
|
+
id: "variantManagement",
|
|
104
|
+
name: "Table Variant Management",
|
|
105
|
+
description: "Decide whether Variant Management is used",
|
|
106
|
+
value: false,
|
|
107
|
+
getPath: () => 'component/settings/tableSettings/variantManagement',
|
|
108
|
+
type: "boolean"
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @type {DesigntimeSetting}
|
|
113
|
+
*/
|
|
114
|
+
const showRelatedApps = {
|
|
115
|
+
id: "showRelatedApps",
|
|
116
|
+
name: "Show Related Apps",
|
|
117
|
+
description: "Decide whether Related Apps are shown",
|
|
118
|
+
value: false,
|
|
119
|
+
getPath: () => 'component/settings/showRelatedApps',
|
|
120
|
+
type: "boolean"
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
return [
|
|
124
|
+
editableHeaderContent,
|
|
125
|
+
tableVariantManagement,
|
|
126
|
+
showRelatedApps
|
|
127
|
+
];
|
|
128
|
+
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
function getObjectPageSettings(oComponent) {
|
|
134
|
+
return {
|
|
135
|
+
editableHeaderContent: JSON.parse(oComponent.getEditableHeaderContent()),
|
|
136
|
+
tableVariantManagement: !!(ObjectPath.get(["tableVariantManagement"], oComponent.getTableSettings())),
|
|
137
|
+
showRelatedApps: JSON.parse(oComponent.getShowRelatedApps())
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Opens the dialog for the table configuration.
|
|
146
|
+
* @param {sap.ui.core.Control} oControl - The control for which the dialog should be opened.
|
|
147
|
+
* @param {object} mPropertyBag - The property bag.
|
|
148
|
+
* @returns {Promise<ControlChangeParams[]>} - The changes.
|
|
149
|
+
*/
|
|
150
|
+
async function fnOpenTableConfigurationDialog(oControl, mPropertyBag) {
|
|
151
|
+
const oResourceModel = oControl.getModel("i18n");
|
|
152
|
+
const oComponent = designtimeUtils.getOwnerComponentFor(oControl);
|
|
153
|
+
|
|
154
|
+
const mObjectPageSettings = getObjectPageSettings(oComponent);
|
|
155
|
+
|
|
156
|
+
// Get all the designtime settings
|
|
157
|
+
const aAllDesigntimeSettings = getAllDesigntimeSettings(oControl);
|
|
158
|
+
// Get the allowed designtime settings based on the floorplan
|
|
159
|
+
const aAllowedDesigntimeSettings = designtimeUtils.getAllowedDesigntimeSettings(oControl, aAllDesigntimeSettings);
|
|
160
|
+
|
|
161
|
+
// Get the current values of the properties
|
|
162
|
+
const mRuntimeAdaptationPropertyValues = getRuntimeAdapationProperties(aAllowedDesigntimeSettings, mObjectPageSettings);
|
|
163
|
+
// Save the unchanged data to compare later
|
|
164
|
+
const mUnchangedData = deepClone(mRuntimeAdaptationPropertyValues);
|
|
165
|
+
// Get the settings of the dialog from the designtime settings using which the dialog will be created
|
|
166
|
+
const aItems = designtimeUtils.getSettings(mRuntimeAdaptationPropertyValues, aAllowedDesigntimeSettings);
|
|
167
|
+
|
|
168
|
+
// disable the scope control if there is only one option
|
|
169
|
+
|
|
170
|
+
const mPropertyValuesEntered = await designtimeUtils.openAdaptionDialog([...aItems], mRuntimeAdaptationPropertyValues, mUnchangedData, "{i18n>RTA_CONFIGURATION_TITLE_OBJECT_PAGE}", { width: "650px", height: "800px" }, oResourceModel);
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* @type {ControlChangeParams}
|
|
175
|
+
*/
|
|
176
|
+
const mPathParameters = {
|
|
177
|
+
sChangeType: designtimeUtils.ChangeType.ChangePageConfiguration
|
|
178
|
+
};
|
|
179
|
+
return designtimeUtils.extractChanges(mPropertyValuesEntered, mUnchangedData, aAllowedDesigntimeSettings, oComponent, mPathParameters);
|
|
180
|
+
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// Expose the functions for QUnit tests
|
|
184
|
+
testableHelper.testableStatic(fnOpenTableConfigurationDialog, "fnOpenTableConfigurationDialog");
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
const oHelper = {
|
|
188
|
+
getDesigntime: function (oControl) {
|
|
189
|
+
return {
|
|
190
|
+
actions: {
|
|
191
|
+
settings: {
|
|
192
|
+
fe: {
|
|
193
|
+
name: "Configuration",
|
|
194
|
+
icon: "sap-icon://developer-settings",
|
|
195
|
+
handler: fnOpenTableConfigurationDialog
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
return oHelper;
|
|
203
|
+
}
|
|
204
|
+
);
|