@sapui5/sap.suite.ui.generic.template 1.152.1 → 1.154.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/controller/ControllerImplementation.js +31 -2
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n.properties +7 -2
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ar.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_bg.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ca.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_cnr.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_cs.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_cy.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_da.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_de.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_el.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_GB.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_US_sappsd.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_en_US_saprigi.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_es.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_es_MX.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_et.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fi.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fr.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_fr_CA.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_hi.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_hr.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_hu.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_id.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_it.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_iw.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ja.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_kk.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ko.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_lt.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_lv.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_mk.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ms.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_nl.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_no.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_pl.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_pt.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_pt_PT.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ro.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_ru.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sh.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sk.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sl.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sr.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_sv.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_th.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_tr.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_uk.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_vi.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_zh_CN.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_zh_TW.properties +3 -0
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +8 -3
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/FilterContainer.fragment.xml +2 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/HeaderCommands.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/SmartFilterBar.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/Component.js +25 -1
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +121 -25
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +6 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ar.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_bg.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ca.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cnr.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cs.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cy.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_da.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_de.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_el.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en.properties +3 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_GB.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_sappsd.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_saprigi.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_es.properties +3 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_es_MX.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_et.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fi.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr_CA.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hi.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hr.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hu.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_id.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_it.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_iw.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ja.properties +4 -2
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_kk.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ko.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_lt.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_lv.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_mk.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ms.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_nl.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_no.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pl.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt_PT.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ro.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ru.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sh.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sk.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sl.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sr.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sv.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_th.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_tr.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_uk.properties +3 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_vi.properties +2 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_zh_CN.properties +4 -2
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_zh_TW.properties +5 -3
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +7 -2
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/HeaderCommands.fragment.xml +21 -15
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartFilterBar.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +96 -14
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/SectionTitleHandler.js +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n.properties +6 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ar.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_bg.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ca.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cnr.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cs.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_cy.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_da.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_de.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_el.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_GB.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_sappsd.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_en_US_saprigi.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_es.properties +5 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_es_MX.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_et.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fi.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_fr_CA.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hi.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hr.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_hu.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_id.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_it.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_iw.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ja.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_kk.properties +30 -26
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ko.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_lt.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_lv.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_mk.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ms.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_nl.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_no.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pl.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_pt_PT.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ro.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_ru.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sh.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sk.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sl.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sr.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_sv.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_th.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_tr.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_uk.properties +8 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_vi.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_zh_CN.properties +4 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_zh_TW.properties +8 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +13 -5
- package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +2 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/Actions.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/PageLevelCommands.fragment.xml +2 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTableUiTableCommons.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/designtime/controls/DynamicPage.designtime.js +39 -3
- package/src/sap/suite/ui/generic/template/designtime/controls/ObjectPageLayout.designtime.js +39 -5
- package/src/sap/suite/ui/generic/template/designtime/controls/SmartTable.designtime.js +17 -0
- package/src/sap/suite/ui/generic/template/detailTemplates/detailUtils.js +3 -2
- package/src/sap/suite/ui/generic/template/detailTemplates/i18n/i18n_es.properties +1 -1
- package/src/sap/suite/ui/generic/template/fragments/EasyFilter.fragment.xml +1 -0
- package/src/sap/suite/ui/generic/template/fragments/SmartTableUiTableCommons.fragment.xml +1 -0
- package/src/sap/suite/ui/generic/template/fragments/TableColumnListItem.fragment.xml +3 -0
- package/src/sap/suite/ui/generic/template/genericUtilities/controlHelper.js +3 -0
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +8 -3
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +7 -0
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartVariantManagementWrapper.js +35 -43
- package/src/sap/suite/ui/generic/template/genericUtilities/designtime/messagebundle.properties +0 -0
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +28 -7
- package/src/sap/suite/ui/generic/template/lib/Application.js +13 -0
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +88 -4
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +36 -5
- package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +45 -2
- package/src/sap/suite/ui/generic/template/lib/MessageUtils.js +1 -0
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillAIOrchestrator.js +142 -8
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillApplyHandler.js +21 -6
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillDialogController.js +234 -13
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFileHandler.js +218 -0
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillFormRenderer.js +83 -18
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +165 -6
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillTableRenderer.js +106 -6
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/fragments/EasyFillDialog.fragment.xml +193 -30
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +610 -27
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +71 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +48 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_sappsd.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saptrc.properties +7 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +49 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +50 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +49 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +47 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +48 -2
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +24 -4
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +27 -7
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +4 -0
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +3 -0
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/TableCommands.fragment.xml +23 -19
- package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +271 -0
- package/src/sap/suite/ui/generic/template/themes/sap_belize_base/ObjectPage.less +9 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +9 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_ObjectPage.less +9 -0
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* SAP UI development toolkit for HTML5 (SAPUI5)
|
|
3
|
+
|
|
4
|
+
(c) Copyright 2009-2015 SAP SE. All rights reserved
|
|
5
|
+
|
|
6
|
+
*/
|
|
1
7
|
sap.ui.define([
|
|
2
8
|
"sap/ui/base/Object",
|
|
3
9
|
"sap/base/util/extend",
|
|
@@ -31,6 +37,16 @@ sap.ui.define([
|
|
|
31
37
|
|
|
32
38
|
var bApplyingGrouplevels = false;
|
|
33
39
|
|
|
40
|
+
// Last resolved sap.ui.model.Filter tree from a non-simplified complexFilterApplied.
|
|
41
|
+
// Pushed into oBindingParams.filters on every onBeforeRebindTable until cleared.
|
|
42
|
+
var oComplexFilter = null;
|
|
43
|
+
|
|
44
|
+
// Snapshot of the simplified conditions last APPLIED by EasyFilter. Used on switch-back
|
|
45
|
+
// SFB->EasyFilter to detect whether the user diverged the SFB from the applied EasyFilter
|
|
46
|
+
// state; if so the table is marked dirty (grey overlay) without a search.
|
|
47
|
+
// Shape: [{ field, operator, values }]. null = nothing applied.
|
|
48
|
+
var aAppliedEasyFilterConditions = null;
|
|
49
|
+
|
|
34
50
|
// fnValueHelpPromiseReject;
|
|
35
51
|
// Tracks the filterMode that was saved in the most recently loaded variant.
|
|
36
52
|
// Used in onFilterSwitch to compare against the current toggle state without
|
|
@@ -46,6 +62,7 @@ sap.ui.define([
|
|
|
46
62
|
// afterVariantLoad fires as a side effect of the subsequent setUiState call.
|
|
47
63
|
var bFiltersResetByUser = false;
|
|
48
64
|
|
|
65
|
+
|
|
49
66
|
/**
|
|
50
67
|
* Calls setVariantCreationByUserAllowed(bAllowed) on the SmartVariantManagement control
|
|
51
68
|
* that owns the SmartFilterBar. Disabling creation blocks both Save and Save As in the VM
|
|
@@ -246,7 +263,8 @@ sap.ui.define([
|
|
|
246
263
|
}
|
|
247
264
|
|
|
248
265
|
oEasyFilterMetadata = {
|
|
249
|
-
version:
|
|
266
|
+
// version field omitted: only .fields is consumed by setFilterBarMetadata().
|
|
267
|
+
// TODO(UXIEC-4979): remove version concept entirely once cleanup ticket lands.
|
|
250
268
|
entitySet: sEntitySet,
|
|
251
269
|
fields : []
|
|
252
270
|
};
|
|
@@ -311,8 +329,36 @@ sap.ui.define([
|
|
|
311
329
|
oFilterItemForQuery.label = oFilterItem.getLabel();
|
|
312
330
|
// codeList is set to true for fixed value list and codelist is fetched
|
|
313
331
|
if (oFilterItemForQuery.codeList) {
|
|
314
|
-
|
|
332
|
+
// For fields from 1:1 navigation properties the name is "NavProp.LocalName".
|
|
333
|
+
// getODataProperty cannot resolve dotted paths against the root entity type,
|
|
334
|
+
// so we resolve the target entity type first.
|
|
335
|
+
var sLocalPropertyName = oFilterItemForQuery.name;
|
|
336
|
+
var oResolvedEntityType = oEntityType;
|
|
337
|
+
var iDotPos = sLocalPropertyName.indexOf(".");
|
|
338
|
+
if (iDotPos !== -1) {
|
|
339
|
+
var sNavPropertyName = sLocalPropertyName.substring(0, iDotPos);
|
|
340
|
+
sLocalPropertyName = sLocalPropertyName.substring(iDotPos + 1);
|
|
341
|
+
var oNavAssocEnd = oSFBMetaModel.getODataAssociationEnd && oSFBMetaModel.getODataAssociationEnd(oEntityType, sNavPropertyName);
|
|
342
|
+
var sNavTargetType = oNavAssocEnd && oNavAssocEnd.type;
|
|
343
|
+
oResolvedEntityType = sNavTargetType && oSFBMetaModel.getODataEntityType && oSFBMetaModel.getODataEntityType(sNavTargetType);
|
|
344
|
+
if (!oResolvedEntityType) {
|
|
345
|
+
oLogger.warning("EasyFilterBarHandler: could not resolve target entity type for nav property '" + sNavPropertyName + "' — skipping value list fetch for '" + oFilterItemForQuery.name + "'");
|
|
346
|
+
oEasyFilterMetadata.fields.push(oFilterItemForQuery);
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
var oProperty = oSFBMetaModel.getODataProperty(oResolvedEntityType, sLocalPropertyName, true);
|
|
351
|
+
if (!oProperty) {
|
|
352
|
+
oLogger.warning("EasyFilterBarHandler: getODataProperty returned null for '" + oFilterItemForQuery.name + "' — skipping value list fetch");
|
|
353
|
+
oEasyFilterMetadata.fields.push(oFilterItemForQuery);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
315
356
|
var oPropertyContext = oSFBMetaModel.createBindingContext(oProperty);
|
|
357
|
+
if (!oPropertyContext) {
|
|
358
|
+
oLogger.warning("EasyFilterBarHandler: createBindingContext returned null for '" + oFilterItemForQuery.name + "' — skipping value list fetch");
|
|
359
|
+
oEasyFilterMetadata.fields.push(oFilterItemForQuery);
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
316
362
|
var oVHPromise = oSFBMetaModel.getODataValueLists(oPropertyContext);
|
|
317
363
|
aPromise.push(oVHPromise);
|
|
318
364
|
oVHPromise.then(function(oValueList) {
|
|
@@ -333,6 +379,9 @@ sap.ui.define([
|
|
|
333
379
|
}
|
|
334
380
|
});
|
|
335
381
|
|
|
382
|
+
// Adding custom filter fields (ControlConfiguration entries) invisible to OData metadata
|
|
383
|
+
fnAppendCustomFilterMetadata(oOwnerFilterControl, oEasyFilterMetadata.fields);
|
|
384
|
+
|
|
336
385
|
// Adding Editing status filter
|
|
337
386
|
if (oTemplateUtils.oComponentUtils.isDraftEnabled()) {
|
|
338
387
|
var oEditStateControl = oController.byId("editStateFilter");
|
|
@@ -368,7 +417,7 @@ sap.ui.define([
|
|
|
368
417
|
* Later the key field is set in the SFB and table is filtered with the same. Description cannot be used for filtering.
|
|
369
418
|
* @param {*} oFilterItemForQuery A Property from the easy filter metadata
|
|
370
419
|
* @param {*} oValueList Value list object of the filter item
|
|
371
|
-
* @returns
|
|
420
|
+
* @returns {Promise} Promise resolving with the value list data array
|
|
372
421
|
*/
|
|
373
422
|
function fnGetValueListValues(oFilterItemForQuery, oValueList, oSFBModel) {
|
|
374
423
|
|
|
@@ -456,9 +505,22 @@ sap.ui.define([
|
|
|
456
505
|
var aSelectOptions = [];
|
|
457
506
|
var oEditStateFilter = 0;
|
|
458
507
|
|
|
508
|
+
// Build lookup of custom filter keys to exclude from OData selectOptions.
|
|
509
|
+
// Custom filters are applied directly to the live control — they must not
|
|
510
|
+
// be routed through the OData $filter pipeline as they are not OData properties.
|
|
511
|
+
var mCustomFilterKeys = {};
|
|
512
|
+
if (oEasyFilterMetadata) {
|
|
513
|
+
oEasyFilterMetadata.fields.forEach(function(oField) {
|
|
514
|
+
if (oField.isCustomFilter) { mCustomFilterKeys[oField.name] = true; }
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
|
|
459
518
|
oAIFilters.forEach(function (oFilterItem) {
|
|
460
519
|
if (oFilterItem.key === "EditState") {
|
|
461
520
|
oEditStateFilter = oFilterItem.keySpecificSelectedValues[0].selectedValues[0]; // Edit state generally should not have more than one filter value
|
|
521
|
+
} else if (mCustomFilterKeys[oFilterItem.key]) {
|
|
522
|
+
// Custom filter — value applied directly to control via fnApplyCustomFilterActivations.
|
|
523
|
+
// Do NOT build an OData selectOption — this key is not an OData property.
|
|
462
524
|
} else {
|
|
463
525
|
var oFilter = {
|
|
464
526
|
PropertyName: oFilterItem.key,
|
|
@@ -586,6 +648,9 @@ sap.ui.define([
|
|
|
586
648
|
oEasyFilter.setAppId(oController.getOwnerComponent().getAppComponent().getManifestEntry("sap.app").id);
|
|
587
649
|
oEasyFilter.setFilterBarMetadata(oEasyFilterMetadata.fields);
|
|
588
650
|
oEasyFilter.easyfilter = oTemplateUtils.oServices.oFioriAIHandler.fioriaiLib.EasyFilter;
|
|
651
|
+
// Complex filter (V2) is the default; setEasyFilterVersion(2) is called unconditionally.
|
|
652
|
+
// TODO(UXIEC-4979): remove once the version concept is cleaned up server-side.
|
|
653
|
+
oEasyFilter.setEasyFilterVersion(2);
|
|
589
654
|
|
|
590
655
|
// Register callbacks on SmartFilterBarWrapper so filterMode and query are
|
|
591
656
|
// included in the genericData bucket when a variant is saved or loaded.
|
|
@@ -650,6 +715,31 @@ sap.ui.define([
|
|
|
650
715
|
oSmartFilterbar.getSmartVariant().currentVariantSetModified(true);
|
|
651
716
|
}
|
|
652
717
|
bFiltersResetByUser = true;
|
|
718
|
+
oComplexFilter = null;
|
|
719
|
+
aAppliedEasyFilterConditions = null;
|
|
720
|
+
|
|
721
|
+
// Simplified conditions are written into the SmartFilterBar (see fnTokensChanged setState),
|
|
722
|
+
// so clearing the module vars alone is not enough — the SFB still holds the old values and
|
|
723
|
+
// would re-apply them on the next rebind. Clear the SFB's own filter state too (symmetric
|
|
724
|
+
// inverse of the setState write): empty selectOptions + reset custom-filter appExtension.
|
|
725
|
+
// Mirrors FeV4 onClearFilters, which calls _clearFilterValuesWithOptions before triggerSearch.
|
|
726
|
+
var oSmartFilterBarWrapper = oTemplateUtils.oCommonUtils.getControlStateWrapperById(oSmartFilterbar.getId(), "SmartFilterBar");
|
|
727
|
+
var oSmartFilterBarVariant = oSmartFilterBarWrapper.getState();
|
|
728
|
+
oSmartFilterBarVariant.selectOptions = [];
|
|
729
|
+
if (oSmartFilterBarVariant.customFilters && oSmartFilterBarVariant.customFilters.appExtension) {
|
|
730
|
+
Object.keys(oSmartFilterBarVariant.customFilters.appExtension).forEach(function(sKey) {
|
|
731
|
+
oSmartFilterBarVariant.customFilters.appExtension[sKey] = "";
|
|
732
|
+
});
|
|
733
|
+
}
|
|
734
|
+
oSmartFilterBarWrapper.setState(oSmartFilterBarVariant);
|
|
735
|
+
|
|
736
|
+
// Honour the control's mandatoryMissing signal (as FeV4 does): when a mandatory filter is
|
|
737
|
+
// unset, do not fire a select-all search — the control keeps the table overlay instead.
|
|
738
|
+
if (oEvent && typeof oEvent.getParameter === "function" && oEvent.getParameter("mandatoryMissing") === true) {
|
|
739
|
+
return;
|
|
740
|
+
}
|
|
741
|
+
// Rebind with cleared state (select all). Covers Clear All and empty-query Go.
|
|
742
|
+
oSmartFilterbar.search();
|
|
653
743
|
}
|
|
654
744
|
|
|
655
745
|
function fnAfterQueryProcessing(oEvent) {
|
|
@@ -669,6 +759,8 @@ sap.ui.define([
|
|
|
669
759
|
if (oEvent.getParameter("reset")) {
|
|
670
760
|
bTokensModifiedByUser = false;
|
|
671
761
|
fnSetCreationAllowed(false);
|
|
762
|
+
oComplexFilter = null;
|
|
763
|
+
aAppliedEasyFilterConditions = null;
|
|
672
764
|
return;
|
|
673
765
|
}
|
|
674
766
|
var oSmartFilterbar = oState.oSmartFilterbar;
|
|
@@ -685,6 +777,44 @@ sap.ui.define([
|
|
|
685
777
|
if (oSmartFilterbar.getSmartVariant()) {
|
|
686
778
|
oSmartFilterbar.getSmartVariant().currentVariantSetModified(true);
|
|
687
779
|
}
|
|
780
|
+
|
|
781
|
+
// Special handling for custom filter token removal by user:
|
|
782
|
+
// When the user unchecks/removes a custom filter token, clear the live
|
|
783
|
+
// control value directly and return early — do NOT rebuild the entire SFB
|
|
784
|
+
// variant state, which would wipe other correctly-set standard tokens.
|
|
785
|
+
if (oEasyFilterMetadata) {
|
|
786
|
+
var bHasCustomTokenModified = false;
|
|
787
|
+
oEasyFilterMetadata.fields.forEach(function(oField) {
|
|
788
|
+
if (!oField.isCustomFilter) { return; }
|
|
789
|
+
var oRemainingToken = (oFiltersFromAI || []).find(function(t) { return t.key === oField.name; });
|
|
790
|
+
if (oRemainingToken) { return; } // token still present — nothing to clear
|
|
791
|
+
// Only treat as a removal if the control currently holds a value.
|
|
792
|
+
// Without this guard, fields that were never activated would trigger the
|
|
793
|
+
// early-return path and silently skip standard OData token removal.
|
|
794
|
+
if (typeof oSmartFilterbar.determineFilterItemByName === "function") {
|
|
795
|
+
oSmartFilterbar.determineFilterItemByName(oField.name);
|
|
796
|
+
}
|
|
797
|
+
var oControl = typeof oSmartFilterbar.getControlByKey === "function" ? oSmartFilterbar.getControlByKey(oField.name) : null;
|
|
798
|
+
if (!oControl || oControl.bIsDestroyed) { return; }
|
|
799
|
+
var sMetaName = oControl.getMetadata && oControl.getMetadata().getName();
|
|
800
|
+
var bHasValue = (sMetaName === "sap.m.ComboBox" || sMetaName === "sap.m.Select")
|
|
801
|
+
? !!oControl.getSelectedKey()
|
|
802
|
+
: (typeof oControl.getValue === "function" && !!oControl.getValue());
|
|
803
|
+
if (!bHasValue) { return; } // control is already empty — not a removal
|
|
804
|
+
bHasCustomTokenModified = true;
|
|
805
|
+
if (sMetaName === "sap.m.ComboBox" || sMetaName === "sap.m.Select") {
|
|
806
|
+
oControl.setSelectedKey(null);
|
|
807
|
+
} else if (typeof oControl.setValue === "function") {
|
|
808
|
+
oControl.setValue("");
|
|
809
|
+
}
|
|
810
|
+
oLogger.info("EasyFilterBarHandler: user removed custom filter token '" + oField.name + "', control cleared");
|
|
811
|
+
});
|
|
812
|
+
if (bHasCustomTokenModified) {
|
|
813
|
+
bTokensModifiedByUser = false;
|
|
814
|
+
oSmartFilterbar.search();
|
|
815
|
+
return;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
688
818
|
} else {
|
|
689
819
|
// AI-resolved result path: reset the user-edit flag and re-enable Save/SaveAs.
|
|
690
820
|
fnSetCreationAllowed(true);
|
|
@@ -708,27 +838,35 @@ sap.ui.define([
|
|
|
708
838
|
oSmartFilterBarVariant.customFilters.editState = oVariantDataFromAI.oEditStateFilter;
|
|
709
839
|
}
|
|
710
840
|
|
|
711
|
-
//
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
841
|
+
// [BUG-09] Build/update semanticDates for date fields — handles both update-in-place and create-from-scratch.
|
|
842
|
+
(oVariantDataFromAI.aSelectOptions || []).forEach(function(oSelectOption) {
|
|
843
|
+
if (!oSelectOption || !oSelectOption.PropertyName || !Array.isArray(oSelectOption.Ranges) || !oSelectOption.Ranges.length) { return; }
|
|
844
|
+
var oRange = oSelectOption.Ranges[0];
|
|
845
|
+
var sOperator = oRange.Option || "BT";
|
|
846
|
+
if (sOperator !== "GT" && sOperator !== "GE" && sOperator !== "LT" && sOperator !== "LE" && sOperator !== "BT") { return; }
|
|
715
847
|
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
return selectOption.PropertyName === propertyName;
|
|
719
|
-
});
|
|
848
|
+
var sPropertyName = oSelectOption.PropertyName;
|
|
849
|
+
var dateData;
|
|
720
850
|
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
|
|
851
|
+
if (oSmartFilterBarVariant.semanticDates && Array.isArray(oSmartFilterBarVariant.semanticDates.Dates)) {
|
|
852
|
+
var oExisting = oSmartFilterBarVariant.semanticDates.Dates.find(function(d) { return d.PropertyName === sPropertyName; });
|
|
853
|
+
if (oExisting) { dateData = oExisting.Data; }
|
|
854
|
+
}
|
|
855
|
+
if (!dateData) {
|
|
856
|
+
if (!oSmartFilterBarVariant.semanticDates) { oSmartFilterBarVariant.semanticDates = { Dates: [] }; }
|
|
857
|
+
if (!Array.isArray(oSmartFilterBarVariant.semanticDates.Dates)) { oSmartFilterBarVariant.semanticDates.Dates = []; }
|
|
858
|
+
dateData = { operation: "DATERANGE", value1: null, value2: null, key: sPropertyName, tokenText: "", calendarType: "Gregorian" };
|
|
859
|
+
oSmartFilterBarVariant.semanticDates.Dates.push({ PropertyName: sPropertyName, Data: dateData });
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
if (sOperator === "GT" || sOperator === "GE") {
|
|
863
|
+
dateData.operation = "FROM"; dateData.value1 = oRange.Low; dateData.value2 = null;
|
|
864
|
+
} else if (sOperator === "LT" || sOperator === "LE") {
|
|
865
|
+
dateData.operation = "TO"; dateData.value1 = oRange.Low; dateData.value2 = null;
|
|
866
|
+
} else {
|
|
867
|
+
dateData.operation = "DATERANGE"; dateData.value1 = oRange.Low; dateData.value2 = oRange.High || oRange.Low;
|
|
868
|
+
}
|
|
869
|
+
});
|
|
732
870
|
|
|
733
871
|
oSmartFilterBarWrapper.setState(oSmartFilterBarVariant);
|
|
734
872
|
// currentVariantSetModified intentionally omitted — pressing Go with the same
|
|
@@ -738,6 +876,11 @@ sap.ui.define([
|
|
|
738
876
|
fnInjectCustomFiltersOnRebind(aSelectOptionsNeedingInjection);
|
|
739
877
|
fnSyncCustomFieldInputValues(aSelectOptionsNeedingInjection, oSmartFilterbar);
|
|
740
878
|
|
|
879
|
+
// Apply values for custom ControlConfiguration filters (isCustomFilter:true).
|
|
880
|
+
// Must run after setState so standard SFB filters are already applied,
|
|
881
|
+
// and before search() so the rebind picks up the custom control value.
|
|
882
|
+
fnApplyCustomFilterActivations(oFiltersFromAI, oSmartFilterbar);
|
|
883
|
+
|
|
741
884
|
// Apply sorters/groupLevels bundled with tokens after SFB state is set but
|
|
742
885
|
// before triggering search, to prevent a premature rebind with incomplete filters.
|
|
743
886
|
var aBundledSorters = oEvent.getParameter("sorters");
|
|
@@ -752,6 +895,118 @@ sap.ui.define([
|
|
|
752
895
|
oSmartFilterbar.search();
|
|
753
896
|
}
|
|
754
897
|
|
|
898
|
+
/**
|
|
899
|
+
* Infers a type hint and optional allowed-values list from a live SAPUI5 control instance.
|
|
900
|
+
* codeList is only set for controls that expose a finite set of selectable items (ComboBox, Select).
|
|
901
|
+
* @param {sap.ui.core.Control} oControl - The live control from getControlByKey()
|
|
902
|
+
* @returns {object} Descriptor with dataType string and optional codeList array
|
|
903
|
+
*/
|
|
904
|
+
function fnInferControlTypeInfo(oControl) {
|
|
905
|
+
var sMetaName = oControl && oControl.getMetadata && oControl.getMetadata().getName();
|
|
906
|
+
if (!sMetaName) {
|
|
907
|
+
return { dataType: "Edm.String", type: "ValueHelp" };
|
|
908
|
+
}
|
|
909
|
+
// ComboBox / Select — fixed item list → MenuWithCheckBox (same as OData fixed-values fields)
|
|
910
|
+
if (sMetaName === "sap.m.ComboBox" || sMetaName === "sap.m.Select") {
|
|
911
|
+
var aItems = oControl.getItems ? oControl.getItems() : [];
|
|
912
|
+
var aCodeList = aItems.map(function(oItem) {
|
|
913
|
+
return { value: oItem.getKey(), description: oItem.getText() };
|
|
914
|
+
});
|
|
915
|
+
return { dataType: "Edm.String", type: "MenuWithCheckBox", codeList: aCodeList };
|
|
916
|
+
}
|
|
917
|
+
// DatePicker → Calendar (same as OData Edm.DateTime date fields)
|
|
918
|
+
if (sMetaName === "sap.m.DatePicker") {
|
|
919
|
+
return { dataType: "Edm.DateTime", type: "Calendar" };
|
|
920
|
+
}
|
|
921
|
+
// DateRangeSelection → Calendar with range restriction
|
|
922
|
+
if (sMetaName === "sap.m.DateRangeSelection") {
|
|
923
|
+
return { dataType: "Edm.DateTime", type: "Calendar", filterRestriction: "SingleRange" };
|
|
924
|
+
}
|
|
925
|
+
// RatingIndicator — no dedicated token type, use ValueHelp fallback
|
|
926
|
+
if (sMetaName === "sap.m.RatingIndicator") {
|
|
927
|
+
return { dataType: "Edm.Int32", type: "ValueHelp" };
|
|
928
|
+
}
|
|
929
|
+
// MultiInput / Input → ValueHelp (free-text)
|
|
930
|
+
return { dataType: "Edm.String", type: "ValueHelp" };
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
/**
|
|
934
|
+
* Reads the custom ControlConfiguration keys from the SFB's _CUSTOM filter-data bucket,
|
|
935
|
+
* resolves each control via getControlByKey(), builds a PropertyMetadata-compatible
|
|
936
|
+
* descriptor with isCustomFilter:true, and appends it to aFields.
|
|
937
|
+
* Fields whose key is already present in aFields (OData field with same name) are skipped.
|
|
938
|
+
* @param {sap.ui.comp.smartfilterbar.SmartFilterBar} oSmartFilterbar
|
|
939
|
+
* @param {Array} aFields - The fields array of the in-progress oEasyFilterMetadata
|
|
940
|
+
*/
|
|
941
|
+
function fnAppendCustomFilterMetadata(oSmartFilterbar, aFields) {
|
|
942
|
+
// Strategy: getAllFilterItems returns ALL filter items including ControlConfiguration entries.
|
|
943
|
+
// Items whose name is NOT already in mExisting (OData fields) AND not present in the OData
|
|
944
|
+
// metamodel AND have a live custom control are pure frontend custom filters.
|
|
945
|
+
var mExisting = {};
|
|
946
|
+
aFields.forEach(function(oField) { mExisting[oField.name] = true; });
|
|
947
|
+
|
|
948
|
+
// Get metamodel for OData property existence double-check.
|
|
949
|
+
// Some fields (e.g. OverallSDProcessStatus) may be absent from mFilterProperties but
|
|
950
|
+
// ARE in the OData metadata — they must not be treated as custom filters.
|
|
951
|
+
// All calls are guarded with typeof checks so this works in test environments
|
|
952
|
+
// where the mock SFB does not expose getEntitySet or getODataEntitySet.
|
|
953
|
+
var oModel = typeof oSmartFilterbar.getModel === "function" ? oSmartFilterbar.getModel() : null;
|
|
954
|
+
var oMetaModel = oModel && typeof oModel.getMetaModel === "function" ? oModel.getMetaModel() : null;
|
|
955
|
+
var sEntitySet = typeof oSmartFilterbar.getEntitySet === "function" ? oSmartFilterbar.getEntitySet() : null;
|
|
956
|
+
var oEntitySetMeta = (oMetaModel && sEntitySet && typeof oMetaModel.getODataEntitySet === "function") ? oMetaModel.getODataEntitySet(sEntitySet) : null;
|
|
957
|
+
var oEntityType = (oMetaModel && oEntitySetMeta && typeof oMetaModel.getODataEntityType === "function") ? oMetaModel.getODataEntityType(oEntitySetMeta.entityType) : null;
|
|
958
|
+
|
|
959
|
+
var aAllItems = oSmartFilterbar.getAllFilterItems(true) || [];
|
|
960
|
+
|
|
961
|
+
aAllItems.forEach(function(oFilterItem) {
|
|
962
|
+
var sKey = oFilterItem.getName && oFilterItem.getName();
|
|
963
|
+
if (!sKey) { return; }
|
|
964
|
+
if (mExisting[sKey]) {
|
|
965
|
+
return; // OData-backed field — already in fields array
|
|
966
|
+
}
|
|
967
|
+
// Double-check OData metamodel — field may be OData-backed but absent from mFilterProperties
|
|
968
|
+
if (oEntityType && oMetaModel) {
|
|
969
|
+
var oODataProp = oMetaModel.getODataProperty(oEntityType, sKey);
|
|
970
|
+
if (oODataProp) {
|
|
971
|
+
return; // Exists in OData metadata — not a custom filter
|
|
972
|
+
}
|
|
973
|
+
}
|
|
974
|
+
// Not in OData metadata at all — check if it has a live custom control
|
|
975
|
+
if (typeof oSmartFilterbar.determineFilterItemByName === "function") {
|
|
976
|
+
oSmartFilterbar.determineFilterItemByName(sKey);
|
|
977
|
+
}
|
|
978
|
+
if (typeof oSmartFilterbar.getControlByKey !== "function") {
|
|
979
|
+
return; // SFB does not support custom controls
|
|
980
|
+
}
|
|
981
|
+
var oControl = oSmartFilterbar.getControlByKey(sKey);
|
|
982
|
+
if (!oControl || oControl.bIsDestroyed) {
|
|
983
|
+
return; // No custom control or destroyed — skip
|
|
984
|
+
}
|
|
985
|
+
var sLabel = oFilterItem.getLabel ? (oFilterItem.getLabel() || sKey) : sKey;
|
|
986
|
+
var oTypeInfo = fnInferControlTypeInfo(oControl);
|
|
987
|
+
// type comes directly from fnInferControlTypeInfo — MenuWithCheckBox, Calendar, or ValueHelp
|
|
988
|
+
var sTokenType = oTypeInfo.type || "ValueHelp";
|
|
989
|
+
var oDescriptor = {
|
|
990
|
+
name: sKey,
|
|
991
|
+
label: sLabel,
|
|
992
|
+
dataType: oTypeInfo.dataType,
|
|
993
|
+
filterable: true,
|
|
994
|
+
sortable: false,
|
|
995
|
+
groupable: false,
|
|
996
|
+
required: false,
|
|
997
|
+
type: sTokenType,
|
|
998
|
+
isCustomFilter: true
|
|
999
|
+
};
|
|
1000
|
+
if (oTypeInfo.codeList && oTypeInfo.codeList.length > 0) {
|
|
1001
|
+
oDescriptor.codeList = oTypeInfo.codeList;
|
|
1002
|
+
}
|
|
1003
|
+
if (oTypeInfo.filterRestriction) {
|
|
1004
|
+
oDescriptor.filterRestriction = oTypeInfo.filterRestriction;
|
|
1005
|
+
}
|
|
1006
|
+
aFields.push(oDescriptor);
|
|
1007
|
+
});
|
|
1008
|
+
}
|
|
1009
|
+
|
|
755
1010
|
/**
|
|
756
1011
|
* Returns the subset of aSelectOptions whose property names landed in SFB's _CUSTOM
|
|
757
1012
|
* bucket after setState — meaning SFB could not route them through its standard filter
|
|
@@ -846,6 +1101,116 @@ sap.ui.define([
|
|
|
846
1101
|
});
|
|
847
1102
|
}
|
|
848
1103
|
|
|
1104
|
+
/**
|
|
1105
|
+
* For each AI token whose field is marked isCustomFilter:true in oEasyFilterMetadata,
|
|
1106
|
+
* locates the live control on the SmartFilterBar via getControlByKey() and sets its value
|
|
1107
|
+
* using a type-dispatched setter. Does NOT call search() — the caller (fnTokensChanged)
|
|
1108
|
+
* is responsible for the single search() call at the end of its flow.
|
|
1109
|
+
* @param {Array} aAITokens - Raw token list from oEvent.getParameter("tokens")
|
|
1110
|
+
* @param {object} oSmartFilterbar - The SmartFilterBar control instance
|
|
1111
|
+
*/
|
|
1112
|
+
function fnApplyCustomFilterActivations(aAITokens, oSmartFilterbar) {
|
|
1113
|
+
if (!aAITokens || !aAITokens.length || !oEasyFilterMetadata) {
|
|
1114
|
+
return;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
// Build a lookup of custom filter keys from the current metadata snapshot
|
|
1118
|
+
var mCustomFilterKeys = {};
|
|
1119
|
+
oEasyFilterMetadata.fields.forEach(function(oField) {
|
|
1120
|
+
if (oField.isCustomFilter) {
|
|
1121
|
+
mCustomFilterKeys[oField.name] = true;
|
|
1122
|
+
}
|
|
1123
|
+
});
|
|
1124
|
+
|
|
1125
|
+
if (Object.keys(mCustomFilterKeys).length === 0) {
|
|
1126
|
+
return;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
aAITokens.forEach(function(oToken) {
|
|
1130
|
+
var sKey = oToken.key;
|
|
1131
|
+
if (!mCustomFilterKeys[sKey]) {
|
|
1132
|
+
return; // standard OData token — handled by the existing pipeline
|
|
1133
|
+
}
|
|
1134
|
+
|
|
1135
|
+
// Force instantiation in case the control hasn't been rendered yet
|
|
1136
|
+
if (typeof oSmartFilterbar.determineFilterItemByName === "function") {
|
|
1137
|
+
oSmartFilterbar.determineFilterItemByName(sKey);
|
|
1138
|
+
}
|
|
1139
|
+
var oControl = oSmartFilterbar.getControlByKey(sKey);
|
|
1140
|
+
if (!oControl || oControl.bIsDestroyed) {
|
|
1141
|
+
oLogger.warning("EasyFilterBarHandler: control for custom filter '" + sKey + "' is null or destroyed — skipping");
|
|
1142
|
+
return;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
// Extract the first value the LLM produced for this key
|
|
1146
|
+
var sValue = null;
|
|
1147
|
+
if (oToken.keySpecificSelectedValues && oToken.keySpecificSelectedValues.length > 0) {
|
|
1148
|
+
var oFirstGroup = oToken.keySpecificSelectedValues[0];
|
|
1149
|
+
if (oFirstGroup.selectedValues && oFirstGroup.selectedValues.length > 0) {
|
|
1150
|
+
var oVal = oFirstGroup.selectedValues[0];
|
|
1151
|
+
if (oVal && typeof oVal === "object" && oVal.value !== undefined) {
|
|
1152
|
+
// Plain object with a .value property (e.g. {value:"editable",description:"Editable"})
|
|
1153
|
+
sValue = String(oVal.value);
|
|
1154
|
+
} else {
|
|
1155
|
+
// Primitive string OR boxed String object — String() unwraps both
|
|
1156
|
+
sValue = String(oVal);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
if (sValue === null || sValue === undefined) {
|
|
1162
|
+
return;
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
// Validate against codeList when available to guard against hallucinated values
|
|
1166
|
+
var oFieldMeta = oEasyFilterMetadata.fields.find(function(f) { return f.name === sKey; });
|
|
1167
|
+
if (oFieldMeta && Array.isArray(oFieldMeta.codeList)) {
|
|
1168
|
+
var bValid = oFieldMeta.codeList.some(function(oEntry) {
|
|
1169
|
+
return String(oEntry.value) === sValue;
|
|
1170
|
+
});
|
|
1171
|
+
if (!bValid) {
|
|
1172
|
+
oLogger.warning("EasyFilterBarHandler: LLM produced value '" + sValue + "' for custom filter '" + sKey + "' which is not in the allowed list — skipping");
|
|
1173
|
+
return;
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
// Type-dispatched setter
|
|
1178
|
+
var sMetaName = oControl.getMetadata && oControl.getMetadata().getName();
|
|
1179
|
+
try {
|
|
1180
|
+
if (sMetaName === "sap.m.ComboBox" || sMetaName === "sap.m.Select") {
|
|
1181
|
+
oControl.setSelectedKey(sValue);
|
|
1182
|
+
} else if (sMetaName === "sap.m.DatePicker") {
|
|
1183
|
+
// sValue is an ISO string from the LLM — setDateValue(Date) is the
|
|
1184
|
+
// reliable setter regardless of the control's displayFormat/valueFormat config.
|
|
1185
|
+
// setValue() silently rejects ISO strings when valueFormat is not set.
|
|
1186
|
+
var oDate = new Date(sValue);
|
|
1187
|
+
if (!isNaN(oDate.getTime())) {
|
|
1188
|
+
oControl.setDateValue(oDate);
|
|
1189
|
+
} else {
|
|
1190
|
+
oControl.setValue(sValue); // fallback: locale-format string
|
|
1191
|
+
}
|
|
1192
|
+
} else if (sMetaName === "sap.m.DateRangeSelection") {
|
|
1193
|
+
// For DateRangeSelection the LLM produces a single value (start date).
|
|
1194
|
+
// Use setDateValue for the same reason as DatePicker.
|
|
1195
|
+
var oRangeDate = new Date(sValue);
|
|
1196
|
+
if (!isNaN(oRangeDate.getTime())) {
|
|
1197
|
+
oControl.setDateValue(oRangeDate);
|
|
1198
|
+
} else {
|
|
1199
|
+
oControl.setValue(sValue);
|
|
1200
|
+
}
|
|
1201
|
+
} else if (sMetaName === "sap.m.RatingIndicator") {
|
|
1202
|
+
oControl.setValue(parseInt(sValue, 10));
|
|
1203
|
+
} else if (typeof oControl.setValue === "function") {
|
|
1204
|
+
oControl.setValue(sValue);
|
|
1205
|
+
} else {
|
|
1206
|
+
oLogger.warning("EasyFilterBarHandler: no setter found for control type '" + sMetaName + "' on custom filter '" + sKey + "'");
|
|
1207
|
+
}
|
|
1208
|
+
} catch (e) {
|
|
1209
|
+
oLogger.error("EasyFilterBarHandler: error setting value on custom filter '" + sKey + "': " + e.message);
|
|
1210
|
+
}
|
|
1211
|
+
});
|
|
1212
|
+
}
|
|
1213
|
+
|
|
849
1214
|
/**
|
|
850
1215
|
* Event handler for the EasyFilterBarContainer's tokensChangedByUser event.
|
|
851
1216
|
* Fired when the user manually deletes or modifies a token (distinct from AI-resolved tokens).
|
|
@@ -938,15 +1303,229 @@ sap.ui.define([
|
|
|
938
1303
|
}
|
|
939
1304
|
|
|
940
1305
|
/**
|
|
941
|
-
*
|
|
942
|
-
*
|
|
943
|
-
*
|
|
944
|
-
*
|
|
1306
|
+
* Main handler for the complexFilterApplied event fired by EasyFilterBarContainer (V2).
|
|
1307
|
+
* Two paths, distinguished by the event params:
|
|
1308
|
+
* Simplified — conditions[] present: mapped to AI-token shape and routed through
|
|
1309
|
+
* fnTokensChanged, which writes them into the SmartFilterBar (setState) and
|
|
1310
|
+
* triggers search(). They are applied via the SFB's own selectOptions, not
|
|
1311
|
+
* injected in onBeforeRebindTable. oComplexFilter is cleared.
|
|
1312
|
+
* Non-simplified — currentFilterExpression present: built into a sap.ui.model.Filter tree
|
|
1313
|
+
* via fnBuildFilterFromExpression() and stored in oComplexFilter. Injection
|
|
1314
|
+
* happens in onBeforeRebindTable (ControllerImplementation) so it persists
|
|
1315
|
+
* across all subsequent rebinds (sort, group, pagination) without re-hooking.
|
|
945
1316
|
*/
|
|
1317
|
+
function fnBuildFilterFromExpression(oExpr) {
|
|
1318
|
+
if (!oExpr) { return null; }
|
|
1319
|
+
if (oExpr.AND) {
|
|
1320
|
+
return new Filter({ filters: oExpr.AND.map(fnBuildFilterFromExpression).filter(Boolean), and: true });
|
|
1321
|
+
}
|
|
1322
|
+
if (oExpr.OR) {
|
|
1323
|
+
return new Filter({ filters: oExpr.OR.map(fnBuildFilterFromExpression).filter(Boolean), and: false });
|
|
1324
|
+
}
|
|
1325
|
+
// Leaf node format: { FieldName: [["OPERATOR", "value"], ...], ... }
|
|
1326
|
+
// A leaf may carry MORE THAN ONE field key — the EasyFilterBarContainer emits a
|
|
1327
|
+
// multi-field leaf to mean "FieldA AND FieldB" (FilterExpressionLeaf is a
|
|
1328
|
+
// Record<string, conditions[]>). Build a Filter per field and AND them together.
|
|
1329
|
+
// Within a single field, multiple tuples are OR'd together.
|
|
1330
|
+
var aKeys = Object.keys(oExpr);
|
|
1331
|
+
if (!aKeys.length) { return null; }
|
|
1332
|
+
var fnBuildFieldFilter = function(sField) {
|
|
1333
|
+
var aTuples = oExpr[sField];
|
|
1334
|
+
if (!Array.isArray(aTuples) || !aTuples.length) { return null; }
|
|
1335
|
+
if (aTuples.length === 1) {
|
|
1336
|
+
return new Filter({ path: sField, operator: aTuples[0][0], value1: aTuples[0][1], value2: aTuples[0][2] });
|
|
1337
|
+
}
|
|
1338
|
+
// Multiple tuples → OR them within the same field.
|
|
1339
|
+
return new Filter({
|
|
1340
|
+
filters: aTuples.map(function(aTuple) {
|
|
1341
|
+
return new Filter({ path: sField, operator: aTuple[0], value1: aTuple[1], value2: aTuple[2] });
|
|
1342
|
+
}),
|
|
1343
|
+
and: false
|
|
1344
|
+
});
|
|
1345
|
+
};
|
|
1346
|
+
var aFieldFilters = aKeys.map(fnBuildFieldFilter).filter(Boolean);
|
|
1347
|
+
if (!aFieldFilters.length) { return null; }
|
|
1348
|
+
if (aFieldFilters.length === 1) { return aFieldFilters[0]; }
|
|
1349
|
+
// Multiple fields in one leaf → AND them together.
|
|
1350
|
+
return new Filter({ filters: aFieldFilters, and: true });
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
function fnComplexFilterApplied(oEvent) {
|
|
1354
|
+
var aSorters = oEvent.getParameter("sorters") || [];
|
|
1355
|
+
var aGroupLevels = oEvent.getParameter("groupLevels") || [];
|
|
1356
|
+
fnApplySortersToTable(aSorters);
|
|
1357
|
+
fnApplyGroupLevelsToTable(aGroupLevels);
|
|
1358
|
+
|
|
1359
|
+
var aConditions = oEvent.getParameter("conditions"); // undefined on non-simplified path
|
|
1360
|
+
|
|
1361
|
+
// Clear previous state before storing new one.
|
|
1362
|
+
oComplexFilter = null;
|
|
1363
|
+
|
|
1364
|
+
if (Array.isArray(aConditions)) {
|
|
1365
|
+
// Snapshot the applied simplified conditions: used on switch-back to detect
|
|
1366
|
+
// whether the user diverged the SFB from this applied state and should see the dirty overlay.
|
|
1367
|
+
aAppliedEasyFilterConditions = aConditions.map(function(oCondition) {
|
|
1368
|
+
return {
|
|
1369
|
+
field: oCondition.field,
|
|
1370
|
+
operator: oCondition.operator,
|
|
1371
|
+
values: (Array.isArray(oCondition.values) ? oCondition.values : [oCondition.values]).slice()
|
|
1372
|
+
};
|
|
1373
|
+
});
|
|
1374
|
+
// Simplified path: conditions can be expressed as classic SFB filters.
|
|
1375
|
+
// Map them to the AI-token shape and route through fnTokensChanged so they are
|
|
1376
|
+
// written into the SmartFilterBar (setState) — this keeps the SFB fields populated
|
|
1377
|
+
// and visible on switch to classic. (The control suppresses tokensChanged on the V2
|
|
1378
|
+
// path, so without this the SFB stays empty.) fnTokensChanged also triggers search().
|
|
1379
|
+
var aTokens = aConditions.map(function(oCondition) {
|
|
1380
|
+
var aVals = Array.isArray(oCondition.values) ? oCondition.values : [oCondition.values];
|
|
1381
|
+
return {
|
|
1382
|
+
key: oCondition.field,
|
|
1383
|
+
keySpecificSelectedValues: [{ operator: oCondition.operator, selectedValues: aVals }]
|
|
1384
|
+
};
|
|
1385
|
+
});
|
|
1386
|
+
fnTokensChanged({
|
|
1387
|
+
getParameter: function(sParam) {
|
|
1388
|
+
if (sParam === "reset") { return false; }
|
|
1389
|
+
if (sParam === "tokens") { return aTokens; }
|
|
1390
|
+
return undefined;
|
|
1391
|
+
}
|
|
1392
|
+
});
|
|
1393
|
+
return;
|
|
1394
|
+
}
|
|
1395
|
+
|
|
1396
|
+
// Non-simplified path: cannot be represented as classic SFB conditions (cross-field OR,
|
|
1397
|
+
// universal lambda). Build a Filter tree and inject it via onBeforeRebindTable.
|
|
1398
|
+
// No simplified SFB snapshot applies here — clear it so switch-back doesn't use stale data.
|
|
1399
|
+
// Non-simplified path — clear snapshot so switch-back doesn't use stale data.
|
|
1400
|
+
aAppliedEasyFilterConditions = null;
|
|
1401
|
+
// [BUG-07] Clear stale SFB selectOptions from a prior simplified query before setting oComplexFilter.
|
|
1402
|
+
var oSmartFilterBarWrapper = oTemplateUtils.oCommonUtils.getControlStateWrapperById(oState.oSmartFilterbar.getId(), "SmartFilterBar");
|
|
1403
|
+
var oSFBState = oSmartFilterBarWrapper.getState();
|
|
1404
|
+
oSFBState.selectOptions = [];
|
|
1405
|
+
if (oSFBState.customFilters && oSFBState.customFilters.appExtension) {
|
|
1406
|
+
Object.keys(oSFBState.customFilters.appExtension).forEach(function(sKey) {
|
|
1407
|
+
oSFBState.customFilters.appExtension[sKey] = "";
|
|
1408
|
+
});
|
|
1409
|
+
}
|
|
1410
|
+
oSmartFilterBarWrapper.setState(oSFBState);
|
|
1411
|
+
|
|
1412
|
+
var oExpression = oEvent.getParameter("currentFilterExpression");
|
|
1413
|
+
// TODO: remove fallback once updated EasyFilterBarContainer bundle is deployed to all systems.
|
|
1414
|
+
// Deployed bundle on older servers predates the commit that added currentFilterExpression to
|
|
1415
|
+
// the complexFilterApplied event payload — fall back to reading it from the control instance.
|
|
1416
|
+
if (!oExpression) {
|
|
1417
|
+
oExpression = oEvent.getSource() && oEvent.getSource().currentFilterExpression;
|
|
1418
|
+
}
|
|
1419
|
+
if (oExpression) {
|
|
1420
|
+
oComplexFilter = fnBuildFilterFromExpression(oExpression);
|
|
1421
|
+
} else {
|
|
1422
|
+
oLogger.warning("fnComplexFilterApplied: currentFilterExpression is empty — non-simplified filter not applied.");
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
oState.oSmartFilterbar.search();
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
/**
|
|
1429
|
+
* Decide whether switching back from classic SFB to EasyFilter should mark the table
|
|
1430
|
+
* dirty (grey overlay) — only when the current classic filter conditions diverge from
|
|
1431
|
+
* the applied EasyFilter conditions.
|
|
1432
|
+
*
|
|
1433
|
+
* Returns true ONLY when a simplified EasyFilter result was applied (snapshot present) AND the
|
|
1434
|
+
* SFB's current filter state no longer matches that snapshot (user changed it in classic mode).
|
|
1435
|
+
* When they match, or when nothing was applied, returns false so switching alone never greys the
|
|
1436
|
+
* table (no false-overlay regression).
|
|
1437
|
+
* @returns {boolean}
|
|
1438
|
+
*/
|
|
1439
|
+
function fnIsTableDirtyOnSwitchBack() {
|
|
1440
|
+
if (!aAppliedEasyFilterConditions || !aAppliedEasyFilterConditions.length) {
|
|
1441
|
+
return false; // nothing was applied via EasyFilter -> classic is authoritative, no overlay
|
|
1442
|
+
}
|
|
1443
|
+
// Normalize date values to YYYY-MM-DD — applied snapshot stores ISO strings,
|
|
1444
|
+
// SFB Ranges[].Low/High may be UI5 Date objects with locale-dependent String() output.
|
|
1445
|
+
var fnNormDateToISO = function(v) {
|
|
1446
|
+
var s = String(v);
|
|
1447
|
+
var oISO = s.match(/^(\d{4}-\d{2}-\d{2})/);
|
|
1448
|
+
if (oISO) { return oISO[1]; }
|
|
1449
|
+
var d = new Date(s);
|
|
1450
|
+
if (!isNaN(d.getTime())) {
|
|
1451
|
+
return d.getUTCFullYear() + "-" + String(d.getUTCMonth() + 1).padStart(2, "0") + "-" + String(d.getUTCDate()).padStart(2, "0");
|
|
1452
|
+
}
|
|
1453
|
+
return s;
|
|
1454
|
+
};
|
|
1455
|
+
var fnNormalizeApplied = function(aConds) {
|
|
1456
|
+
var m = {};
|
|
1457
|
+
aConds.forEach(function(oCond) {
|
|
1458
|
+
var aVals = (Array.isArray(oCond.values) ? oCond.values : [oCond.values]).map(fnNormDateToISO);
|
|
1459
|
+
m[oCond.field] = (m[oCond.field] || []).concat(aVals);
|
|
1460
|
+
});
|
|
1461
|
+
Object.keys(m).forEach(function(k) { m[k] = m[k].slice().sort(); });
|
|
1462
|
+
return m;
|
|
1463
|
+
};
|
|
1464
|
+
var fnNormalizeSelectOptions = function(aSelectOptions) {
|
|
1465
|
+
var m = {};
|
|
1466
|
+
(aSelectOptions || []).forEach(function(oSO) {
|
|
1467
|
+
if (!oSO || !oSO.PropertyName || !Array.isArray(oSO.Ranges)) { return; }
|
|
1468
|
+
// Skip SFB-internal / non-filter pseudo-entries that the SmartFilterBar adds to its
|
|
1469
|
+
// own selectOptions (e.g. "<entitySet>.basicSearch", "$"-prefixed, "_CUSTOM"). These are
|
|
1470
|
+
// not OData filter fields and must not count as divergence (would cause a false overlay).
|
|
1471
|
+
if (oSO.PropertyName.indexOf("basicSearch") > -1 ||
|
|
1472
|
+
oSO.PropertyName.charAt(0) === "$" ||
|
|
1473
|
+
oSO.PropertyName.indexOf("_CUSTOM") > -1) { return; }
|
|
1474
|
+
var aVals = [];
|
|
1475
|
+
oSO.Ranges.forEach(function(oRange) {
|
|
1476
|
+
aVals.push(fnNormDateToISO(oRange.Low));
|
|
1477
|
+
if (oRange.High && oRange.High !== oRange.Low) { aVals.push(fnNormDateToISO(oRange.High)); }
|
|
1478
|
+
});
|
|
1479
|
+
m[oSO.PropertyName] = (m[oSO.PropertyName] || []).concat(aVals);
|
|
1480
|
+
});
|
|
1481
|
+
Object.keys(m).forEach(function(k) { m[k] = m[k].slice().sort(); });
|
|
1482
|
+
return m;
|
|
1483
|
+
};
|
|
1484
|
+
var oApplied = fnNormalizeApplied(aAppliedEasyFilterConditions);
|
|
1485
|
+
var oSmartFilterBarWrapper = oTemplateUtils.oCommonUtils.getControlStateWrapperById(oState.oSmartFilterbar.getId(), "SmartFilterBar");
|
|
1486
|
+
var oCurrentState = oSmartFilterBarWrapper.getState();
|
|
1487
|
+
var oCurrent = fnNormalizeSelectOptions(oCurrentState && oCurrentState.selectOptions);
|
|
1488
|
+
// Diverged if the field sets differ or any field's value set differs.
|
|
1489
|
+
var aAppliedKeys = Object.keys(oApplied);
|
|
1490
|
+
if (aAppliedKeys.length !== Object.keys(oCurrent).length) { return true; }
|
|
1491
|
+
return aAppliedKeys.some(function(sField) {
|
|
1492
|
+
var aA = oApplied[sField] || [];
|
|
1493
|
+
var aC = oCurrent[sField] || [];
|
|
1494
|
+
return aA.length !== aC.length || aA.some(function(v, i) { return v !== aC[i]; });
|
|
1495
|
+
});
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
|
|
946
1499
|
function fnShowValueHelp(oEvent) {
|
|
947
1500
|
var oSmartFilterbar = oState.oSmartFilterbar;
|
|
948
1501
|
var sKey = oEvent.getParameter("key");
|
|
949
1502
|
fnValueHelpPromiseResolve = oEvent.getParameter("resolve");
|
|
1503
|
+
|
|
1504
|
+
// For custom filters (isCustomFilter:true), the SFB has no value help dialog.
|
|
1505
|
+
// Resolve immediately with the codeList items so EasyFilter can show them as suggestions.
|
|
1506
|
+
if (oEasyFilterMetadata) {
|
|
1507
|
+
var oFieldMeta = oEasyFilterMetadata.fields.find(function(oField) { return oField.name === sKey; });
|
|
1508
|
+
if (oFieldMeta && oFieldMeta.isCustomFilter) {
|
|
1509
|
+
if (typeof fnValueHelpPromiseResolve === "function") {
|
|
1510
|
+
if (Array.isArray(oFieldMeta.codeList)) {
|
|
1511
|
+
var aTokens = oFieldMeta.codeList.map(function(oEntry) {
|
|
1512
|
+
return {
|
|
1513
|
+
operator: "EQ",
|
|
1514
|
+
selectedValues: [{ value: String(oEntry.value), description: oEntry.description || String(oEntry.value) }]
|
|
1515
|
+
};
|
|
1516
|
+
});
|
|
1517
|
+
fnValueHelpPromiseResolve(aTokens);
|
|
1518
|
+
} else {
|
|
1519
|
+
// No fixed item list (e.g. DatePicker, free-text Input) — resolve with empty
|
|
1520
|
+
// so the caller's promise does not hang.
|
|
1521
|
+
fnValueHelpPromiseResolve([]);
|
|
1522
|
+
}
|
|
1523
|
+
fnValueHelpPromiseResolve = null;
|
|
1524
|
+
}
|
|
1525
|
+
return; // Skip SFB value help entirely for custom filters
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
|
|
950
1529
|
oSmartFilterbar.associateValueLists();
|
|
951
1530
|
try {
|
|
952
1531
|
oSmartFilterbar.ensureLoadedValueHelp(sKey);
|
|
@@ -1158,8 +1737,12 @@ sap.ui.define([
|
|
|
1158
1737
|
handleVariantLoad : fnHandleVariantLoad,
|
|
1159
1738
|
onDataFetcher,
|
|
1160
1739
|
getLoadedVariantFilterMode: function() { return sLoadedVariantFilterMode; },
|
|
1740
|
+
getComplexFilter: function() { return oComplexFilter; },
|
|
1741
|
+
isTableDirtyOnSwitchBack: fnIsTableDirtyOnSwitchBack,
|
|
1742
|
+
hasAppliedEasyFilterConditions: function() { return !!(aAppliedEasyFilterConditions && aAppliedEasyFilterConditions.length); },
|
|
1161
1743
|
attachSmartTableStateChangeHandler: fnAttachSmartTableStateChangeHandler,
|
|
1162
|
-
detachSmartTableStateChangeHandler: fnDetachSmartTableStateChangeHandler
|
|
1744
|
+
detachSmartTableStateChangeHandler: fnDetachSmartTableStateChangeHandler,
|
|
1745
|
+
onComplexFilterApplied: fnComplexFilterApplied
|
|
1163
1746
|
};
|
|
1164
1747
|
}
|
|
1165
1748
|
|