@sapui5/sap.suite.ui.generic.template 1.125.0 → 1.127.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/SmartKpiTag.js +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/FilterItem.js +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/FilterItemMicroChart.js +3 -2
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/SmartVisualFilterBar.js +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/control/visualfilterbar/VisualFilterProvider.js +17 -15
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/ControllerImplementation.js +13 -15
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/DropDownController.js +12 -17
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/DynamicDateRangeController.js +4 -5
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/FilterBarController.js +2 -5
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controller/VisualFilterDialogController.js +1 -10
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/controllerFrameworkExtensions.js +12 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/extensionAPI/ExtensionAPI.js +10 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/i18n/i18n_de.properties +2 -2
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/util/AnnotationHelper.js +11 -11
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/util/FilterUtil.js +6 -6
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/AnalyticalListPage.view.xml +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/ContentViewButtons.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/AnalyticalListPage/view/fragments/SmartFilterBar.fragment.xml +1 -3
- package/src/sap/suite/ui/generic/template/Canvas/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/Component.js +9 -1
- package/src/sap/suite/ui/generic/template/ListReport/controller/ControllerImplementation.js +118 -40
- package/src/sap/suite/ui/generic/template/ListReport/controller/IappStateHandler.js +10 -0
- package/src/sap/suite/ui/generic/template/ListReport/controllerFrameworkExtensions.js +12 -1
- package/src/sap/suite/ui/generic/template/ListReport/extensionAPI/ExtensionAPI.js +3 -3
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n.properties +19 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ar.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_bg.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ca.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cnr.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cs.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_cy.properties +13 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_da.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_de.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_el.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_GB.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_en_US_saprigi.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_es.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_es_MX.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_et.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fi.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_fr_CA.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hi.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hr.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_hu.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_id.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_it.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_iw.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ja.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_kk.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ko.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_lt.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_lv.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_mk.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ms.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_nl.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_no.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pl.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_pt_PT.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ro.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_ru.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sh.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sk.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sl.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sr.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_sv.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_th.properties +13 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_tr.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_uk.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_vi.properties +13 -1
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_zh_CN.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/i18n/i18n_zh_TW.properties +12 -0
- package/src/sap/suite/ui/generic/template/ListReport/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/DefaultVariant.fragment.xml +18 -3
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/FullscreenPage.fragment.xml +6 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartFilterBar.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/ListReport/view/fragments/SmartTable.fragment.xml +6 -12
- package/src/sap/suite/ui/generic/template/ObjectPage/Component.js +2 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +26 -18
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/MessageStripHelper.js +3 -4
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/PasteHandler.js +12 -15
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/inlineCreationRows/InlineCreationRowsHelper.js +5 -6
- package/src/sap/suite/ui/generic/template/ObjectPage/controllerFrameworkExtensions.js +12 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/i18n/i18n_de.properties +4 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/ObjectPage/templateSpecificPreparationHelper.js +38 -12
- package/src/sap/suite/ui/generic/template/ObjectPage/view/Details.view.xml +2 -0
- 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/CRUDActionButtons.fragment.xml +2 -2
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/HeaderContainer.fragment.xml +11 -0
- package/src/sap/suite/ui/generic/template/ObjectPage/view/fragments/SmartTable.fragment.xml +6 -15
- package/src/sap/suite/ui/generic/template/QuickCreate/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/QuickCreate/view/QuickCreate.controller.js +4 -3
- package/src/sap/suite/ui/generic/template/QuickView/manifest.json +1 -1
- package/src/sap/suite/ui/generic/template/designtime/AnalyticalListPage.designtime.js +2 -2
- package/src/sap/suite/ui/generic/template/designtime/ListReport.designtime.js +2 -2
- package/src/sap/suite/ui/generic/template/designtime/ObjectPage.designtime.js +2 -5
- package/src/sap/suite/ui/generic/template/designtime/utils/DesigntimeHandler.js +4 -2
- package/src/sap/suite/ui/generic/template/designtime/utils/designtimeHelper.js +27 -10
- package/src/sap/suite/ui/generic/template/fragments/ContactDetails.fragment.xml +15 -16
- package/src/sap/suite/ui/generic/template/fragments/ContactDetailsQuickViewGroupReplica.fragment.xml +0 -1
- package/src/sap/suite/ui/generic/template/fragments/EasyFilter.fragment.xml +24 -0
- package/src/sap/suite/ui/generic/template/fragments/GridTableCells.fragment.xml +12 -1
- package/src/sap/suite/ui/generic/template/fragments/HeaderDataPointContent.fragment.xml +11 -0
- package/src/sap/suite/ui/generic/template/fragments/HeaderFormDataField.fragment.xml +13 -1
- package/src/sap/suite/ui/generic/template/fragments/MessageDialog.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/MessageInfluencingCRUDAction.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/fragments/QuickViewSmartForm.fragment.xml +2 -1
- package/src/sap/suite/ui/generic/template/fragments/SmartFormDataField.fragment.xml +23 -2
- package/src/sap/suite/ui/generic/template/fragments/TableCell.fragment.xml +12 -1
- package/src/sap/suite/ui/generic/template/fragments/TreeTableColumns.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/AjaxHelper.js +57 -47
- package/src/sap/suite/ui/generic/template/genericUtilities/ControlStateWrapperFactory.js +1 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/FeLogger.js +0 -1
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartFilterBarWrapper.js +64 -12
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartTableChartCommon.js +32 -24
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartVariantManagementWrapper.js +6 -6
- package/src/sap/suite/ui/generic/template/genericUtilities/filterHelper.js +6 -6
- package/src/sap/suite/ui/generic/template/js/AnnotationHelper.js +62 -53
- package/src/sap/suite/ui/generic/template/js/RuntimeFormatters.js +3 -3
- package/src/sap/suite/ui/generic/template/js/formatters/formatDisplayValueForProgressIndicator.js +3 -3
- package/src/sap/suite/ui/generic/template/lib/AdaptiveCardHelper.js +39 -33
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +79 -53
- package/src/sap/suite/ui/generic/template/lib/Application.js +3 -8
- package/src/sap/suite/ui/generic/template/lib/CRUDHelper.js +25 -22
- package/src/sap/suite/ui/generic/template/lib/CRUDManager.js +34 -19
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +56 -11
- package/src/sap/suite/ui/generic/template/lib/ContactCardDetailHelper.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/ContextMenuHandler.js +11 -12
- package/src/sap/suite/ui/generic/template/lib/CreateWithDialogHandler.js +25 -12
- package/src/sap/suite/ui/generic/template/lib/MessageButtonHelper.js +7 -5
- package/src/sap/suite/ui/generic/template/lib/MessageStripHelper.js +6 -6
- package/src/sap/suite/ui/generic/template/lib/PageLeaveHandler.js +6 -6
- package/src/sap/suite/ui/generic/template/lib/ShareUtils.js +2 -12
- package/src/sap/suite/ui/generic/template/lib/SideEffectUtil.js +5 -7
- package/src/sap/suite/ui/generic/template/lib/TemplateAssembler.js +1 -0
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFilterBarHandler.js +323 -0
- package/src/sap/suite/ui/generic/template/lib/ai/FioriAIHandler.js +77 -0
- package/src/sap/suite/ui/generic/template/lib/ai/JouleContextProvider.js +56 -0
- package/src/sap/suite/ui/generic/template/lib/filterHelper.js +38 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +16 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +13 -5
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +10 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +13 -5
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +9 -1
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +8 -0
- package/src/sap/suite/ui/generic/template/lib/info/SmartTableInfo.js +26 -2
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsCardHelper.js +10 -29
- package/src/sap/suite/ui/generic/template/lib/insights/InsightsHandler.js +24 -24
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +1 -1
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartChartHandler.js +15 -1
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartListHandler.js +6 -1
- package/src/sap/suite/ui/generic/template/lib/presentationControl/SmartTableHandler.js +8 -2
- package/src/sap/suite/ui/generic/template/library.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/controller/DetailController.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/controller/IappStateHandler.js +32 -29
- package/src/sap/suite/ui/generic/template/listTemplates/controller/SmartChartController.js +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/filterSettingsPreparationHelper.js +4 -2
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/DetailSmartTable.fragment.xml +4 -14
- package/src/sap/suite/ui/generic/template/listTemplates/fragments/SmartTableToolbar.fragment.xml +1 -1
- package/src/sap/suite/ui/generic/template/listTemplates/semanticDateRangeTypeHelper.js +1 -1
- package/src/sap/suite/ui/generic/template/themes/base/ObjectPage.less +1 -1
- package/src/sap/suite/ui/generic/template/themes/base/base.less +4 -0
- package/src/sap/suite/ui/generic/template/themes/sap_bluecrystal_base/ObjectPage.less +1 -1
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/ALPConstants.less +47 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base.less +7 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_AnalyticalListPage.less +475 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_ListReport.less +33 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_ObjectPage.less +391 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_QuickCreate.less +96 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/base_QuickView.less +108 -0
- package/src/sap/suite/ui/generic/template/themes/sap_hcb/library.source.less +24 -7
- package/ui5.yaml +1 -1
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
sap.ui.define([
|
|
2
|
+
"sap/ui/base/Object",
|
|
3
|
+
"sap/base/util/extend",
|
|
4
|
+
"sap/suite/ui/generic/template/lib/filterHelper",
|
|
5
|
+
"sap/ui/core/library"
|
|
6
|
+
], function(BaseObject, extend, filterHelper, SapCoreLibrary) {
|
|
7
|
+
'use strict';
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
* This is a handler class for EasyFilterBar.
|
|
11
|
+
* It gets initialized when the Fiori AI is enabled and provides the EasyFilterBar capabilities to the floorplan.
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
var oEasyFilterMetadata;
|
|
15
|
+
|
|
16
|
+
function getMethods(oState, oController, oTemplateUtils) {
|
|
17
|
+
var ValueState = SapCoreLibrary.ValueState;
|
|
18
|
+
var mCodeList = {};
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* This method prepares the metadata calculation after the smart filter bar is initialized
|
|
22
|
+
* @returns A promise which returns the prepared metadata
|
|
23
|
+
*/
|
|
24
|
+
function fnGetEasyFilterSearchMetadata() {
|
|
25
|
+
if (oEasyFilterMetadata) {
|
|
26
|
+
return Promise.resolve(oEasyFilterMetadata);
|
|
27
|
+
} else {
|
|
28
|
+
return new Promise(function(fnResolve) {
|
|
29
|
+
// In case the smart filter bar is already initialized then do not use "attachInitialized" as this event will never get triggered again
|
|
30
|
+
if (oState.oSmartFilterbar.isInitialised()) {
|
|
31
|
+
fnPrepareSearchMetadata().then(function(oMetadata){
|
|
32
|
+
fnResolve(oMetadata);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
} else {
|
|
36
|
+
oState.oSmartFilterbar.attachInitialized(function() {
|
|
37
|
+
fnPrepareSearchMetadata().then(function(oMetadata) {
|
|
38
|
+
fnResolve(oMetadata);
|
|
39
|
+
});
|
|
40
|
+
},this);
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* This method prepares the metadata for each filterable field from the smart filter bar
|
|
47
|
+
*
|
|
48
|
+
* @returns Filterbar metadata which is required for the EasyFilter search
|
|
49
|
+
*/
|
|
50
|
+
function fnPrepareSearchMetadata() {
|
|
51
|
+
|
|
52
|
+
var aPromise = [];
|
|
53
|
+
var oOwnerFilterControl = oState.oSmartFilterbar;
|
|
54
|
+
var oSFBModel = oOwnerFilterControl.getModel();
|
|
55
|
+
var oSFBMetaModel = oSFBModel.getMetaModel();
|
|
56
|
+
var oEditStateFilterItem;
|
|
57
|
+
var sEntitySet = oController.getOwnerComponent().getEntitySet();
|
|
58
|
+
|
|
59
|
+
var mFilterProperties = {}; // todo : Add the properties from navigation entites
|
|
60
|
+
var oEntityType = oTemplateUtils.oCommonUtils.getMetaModelEntityType(sEntitySet);
|
|
61
|
+
oEntityType.property.map(function (oProperty) {
|
|
62
|
+
if (filterHelper.isPropertyFilterable(oProperty)) {
|
|
63
|
+
var bIsCodeListRequired = "";
|
|
64
|
+
oProperty.extensions && oProperty.extensions.forEach(function(oExtension) {
|
|
65
|
+
if (oExtension.name === "value-list" && oExtension.value === "fixed-values") {
|
|
66
|
+
bIsCodeListRequired = true;
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
mFilterProperties[oProperty.name] = {
|
|
70
|
+
name: oProperty.name,
|
|
71
|
+
//label: oProperty.label, Name is added from the filter item control
|
|
72
|
+
dataType: oProperty.type,
|
|
73
|
+
filterable: true,
|
|
74
|
+
sortable: false,
|
|
75
|
+
codeList : bIsCodeListRequired
|
|
76
|
+
//,required: oProperty.required (TO-DO)
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
oEasyFilterMetadata = {
|
|
82
|
+
version: 1,
|
|
83
|
+
entitySet: sEntitySet,
|
|
84
|
+
fields : []
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
oOwnerFilterControl.getAllFilterItems().forEach(function (oFilterItem) {
|
|
88
|
+
//check if the filter item from the filter control is a property of the entity type , if then push it to the easy filter metadata
|
|
89
|
+
// todo : Add the properties from navigation entites
|
|
90
|
+
var oFilterItemForQuery = mFilterProperties[oFilterItem.getName()];
|
|
91
|
+
if (oFilterItemForQuery) {
|
|
92
|
+
oFilterItemForQuery.label = oFilterItem.getLabel();
|
|
93
|
+
// codeList is set to true for fixed value list and codelist is fetched
|
|
94
|
+
if (oFilterItemForQuery.codeList) {
|
|
95
|
+
var oProperty = oSFBMetaModel.getODataProperty(oEntityType, oFilterItemForQuery.name , true);
|
|
96
|
+
var oPropertyContext = oSFBMetaModel.createBindingContext(oProperty);
|
|
97
|
+
var oVHPromise = oSFBMetaModel.getODataValueLists(oPropertyContext);
|
|
98
|
+
aPromise.push(oVHPromise);
|
|
99
|
+
oVHPromise.then(function(oValueList) {
|
|
100
|
+
if (mCodeList[oFilterItemForQuery.name]) {
|
|
101
|
+
oFilterItemForQuery.codeList = mCodeList[oFilterItemForQuery.name];
|
|
102
|
+
} else {
|
|
103
|
+
oFilterItemForQuery.codeList = function() {
|
|
104
|
+
return fnGetValueListValues(oFilterItemForQuery, oValueList, oSFBModel);
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
oEasyFilterMetadata.fields.push(oFilterItemForQuery);
|
|
108
|
+
});
|
|
109
|
+
} else {
|
|
110
|
+
oEasyFilterMetadata.fields.push(oFilterItemForQuery);
|
|
111
|
+
}
|
|
112
|
+
} else if (oFilterItem.getName() === "EditState") {// For draft scenarios
|
|
113
|
+
oEditStateFilterItem = oFilterItem;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// Adding Editing status filter
|
|
118
|
+
if (oTemplateUtils.oComponentUtils.isDraftEnabled()) {
|
|
119
|
+
var oEditStateControl = oController.byId("editStateFilter");
|
|
120
|
+
if (oEditStateControl) {
|
|
121
|
+
var oEditingStatusCodeList = oEditStateControl.getItems().map(function(oItem) {
|
|
122
|
+
return {
|
|
123
|
+
value : oItem.getKey(),
|
|
124
|
+
description : oItem.getText()
|
|
125
|
+
};
|
|
126
|
+
});
|
|
127
|
+
var oEditStateFilterMetadata = {
|
|
128
|
+
name: oEditStateFilterItem.getName(),
|
|
129
|
+
label: oEditStateFilterItem.getLabel(),
|
|
130
|
+
dataType: "Edm.String",
|
|
131
|
+
filterable: true,
|
|
132
|
+
required: false,
|
|
133
|
+
sortable: false,
|
|
134
|
+
codeList : oEditingStatusCodeList
|
|
135
|
+
};
|
|
136
|
+
oEasyFilterMetadata.fields.push(oEditStateFilterMetadata);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
return Promise.allSettled(aPromise).then(function() {
|
|
141
|
+
return oEasyFilterMetadata;
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* This method is used to trigger the EasyFilter search of the fiori AI reuse library
|
|
147
|
+
* @param {*} oEasyFilterControl EasyFilter control of the floorplan
|
|
148
|
+
* @returns Promise which resolves to AI filters
|
|
149
|
+
*/
|
|
150
|
+
function fnTriggerEasyFilterQuery(oEasyFilterControl) {
|
|
151
|
+
|
|
152
|
+
var sEasyFilterQuery = oEasyFilterControl.getValue();
|
|
153
|
+
if (sEasyFilterQuery.length === 0) {
|
|
154
|
+
// Resolving with an empty array will reset the SFB filters and trigger a fresh GET call
|
|
155
|
+
return Promise.resolve([]);
|
|
156
|
+
} else {
|
|
157
|
+
var oEasyFilterMetadataPromise = fnGetEasyFilterSearchMetadata();
|
|
158
|
+
var oResultPromise = new Promise(function(fnResolve, fnReject) {
|
|
159
|
+
oEasyFilterMetadataPromise.then(function(oEasyFilterMetadata) {
|
|
160
|
+
var oFioriAIFilterQueryPromise = oTemplateUtils.oServices.oFioriAIHandler.fioriaiLib.EasyFilter.easyFilter(sEasyFilterQuery, oEasyFilterMetadata);
|
|
161
|
+
oFioriAIFilterQueryPromise.then(function(oResponse) {
|
|
162
|
+
if (oResponse.success) {
|
|
163
|
+
if (oResponse.data.version === 1) {
|
|
164
|
+
// In cases where user filters with some random string and the no valuable filter is availabel then simply reject
|
|
165
|
+
if (oResponse.data.unclear || !oResponse.data.filter) {
|
|
166
|
+
var sUnclearInputMessage = oResponse.data.unclear ? "Unclear input: " + oResponse.data.unclear : "Unclear input";
|
|
167
|
+
oEasyFilterControl.setValueStateText(sUnclearInputMessage);
|
|
168
|
+
oEasyFilterControl.setValueState(ValueState.Warning);
|
|
169
|
+
fnReject(oResponse);
|
|
170
|
+
} else if (oResponse.data.filter) {
|
|
171
|
+
// Commenting out for v4 parity
|
|
172
|
+
//oEasyFilterControl.setValueState(ValueState.Success);
|
|
173
|
+
fnResolve(oResponse.data.filter);
|
|
174
|
+
}
|
|
175
|
+
} else if (oResponse.data.version === 2) {
|
|
176
|
+
// to-do for version 2
|
|
177
|
+
}
|
|
178
|
+
} else {
|
|
179
|
+
oEasyFilterControl.setValueStateText(oResponse.message);
|
|
180
|
+
oEasyFilterControl.setValueState(ValueState.Warning);
|
|
181
|
+
fnReject(oResponse);
|
|
182
|
+
}
|
|
183
|
+
},fnReject);
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
return oResultPromise;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* This method reads the values of the valuehelp entity from the backend and fills the code list of each property.
|
|
192
|
+
* Once the values are filled then the fioriAI uses it for getting the ID of the user entered description in the search field
|
|
193
|
+
* Later the key field is set in the SFB and table is filtered with the same. Description cannot be used for filtering.
|
|
194
|
+
* @param {*} oFilterItemForQuery A Property from the easy filter metadata
|
|
195
|
+
* @param {*} oValueList Value list object of the filter item
|
|
196
|
+
* @returns
|
|
197
|
+
*/
|
|
198
|
+
function fnGetValueListValues(oFilterItemForQuery, oValueList, oSFBModel) {
|
|
199
|
+
|
|
200
|
+
if (mCodeList[oFilterItemForQuery.name]) {
|
|
201
|
+
return mCodeList[oFilterItemForQuery.name];
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return new Promise(function(fnResolve, fnReject) {
|
|
205
|
+
|
|
206
|
+
var oValueListDefaultBinding = oValueList[""];
|
|
207
|
+
// Cases where the default binding is not available ignore for now
|
|
208
|
+
if (oValueListDefaultBinding) {
|
|
209
|
+
var sSelect = oValueListDefaultBinding.Parameters && oValueListDefaultBinding.Parameters.map(function(oParam) {
|
|
210
|
+
return oParam.ValueListProperty.String;
|
|
211
|
+
}).join(",");
|
|
212
|
+
|
|
213
|
+
var fnSuccess = function(oResponse) {
|
|
214
|
+
var mValueListData = [];
|
|
215
|
+
oResponse.results && oResponse.results.forEach(function(oItem) {
|
|
216
|
+
mValueListData.push({
|
|
217
|
+
value : oItem[sValueProperty],
|
|
218
|
+
description : sDescriptionProperty ? oItem[sDescriptionProperty] : undefined
|
|
219
|
+
});
|
|
220
|
+
});
|
|
221
|
+
mCodeList[oFilterItemForQuery.name] = mValueListData;
|
|
222
|
+
oEasyFilterMetadata.fields.forEach(function (oField) {
|
|
223
|
+
if (oField.name === oFilterItemForQuery.name) {
|
|
224
|
+
oField.codeList = mValueListData;
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
fnResolve(mValueListData);
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
oSFBModel.read("/" + oValueListDefaultBinding.CollectionPath.String, {
|
|
231
|
+
$select : sSelect,
|
|
232
|
+
success : fnSuccess,
|
|
233
|
+
error : fnReject
|
|
234
|
+
});
|
|
235
|
+
|
|
236
|
+
var sValueProperty;
|
|
237
|
+
var sDescriptionProperty;
|
|
238
|
+
|
|
239
|
+
oValueListDefaultBinding.Parameters && oValueListDefaultBinding.Parameters.forEach(function(oParam) {
|
|
240
|
+
if (oParam.LocalDataProperty && (oParam.LocalDataProperty.PropertyPath === oFilterItemForQuery.name)) {
|
|
241
|
+
sValueProperty = oParam.ValueListProperty.String;
|
|
242
|
+
} else {
|
|
243
|
+
sDescriptionProperty = oParam.ValueListProperty.String;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
});
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* This method is used to convert the AI filters to the selectOptions for the SmartFilterBar
|
|
252
|
+
* It also identifies the values of edit state filter in case of draft
|
|
253
|
+
* @param {*} oAIFilters
|
|
254
|
+
* @returns array of selectOptions
|
|
255
|
+
*/
|
|
256
|
+
function fnGetSFBVariantData(oAIFilters) {
|
|
257
|
+
|
|
258
|
+
// Each filter from AI will be converted to a selectOption and added to the SmartVariantManagement state
|
|
259
|
+
// Case 1 : AI Query "Show P1 = a"
|
|
260
|
+
// ------- AI response "P1 = Ranges [a]" .
|
|
261
|
+
// ------- Converted to selectOptions [ {Property = P1, Ranges = [ a ] } ].
|
|
262
|
+
// ------- Filtered as P1 = a.
|
|
263
|
+
// Case 1.a : AI Query "Show P1 = a , b"
|
|
264
|
+
// ------- AI response "P1 = Ranges [a, b]" .
|
|
265
|
+
// ------- Converted to selectOptions [ {Property = P1, Ranges = [ a, b ] } ] .
|
|
266
|
+
// ------- FE filters as "a or b".
|
|
267
|
+
// Case 1.b : AI Query "Show P1 between a and b"
|
|
268
|
+
// ------- AI response " [P1 = Ranges [a] , P1 = Ranges [b]]".
|
|
269
|
+
// ------- Converted to selectOptions [ {Property = P1, Ranges = [ a ] } , {Property = P2, Ranges = [ b ] } ] .
|
|
270
|
+
// ------- FE filters as "a and b" but (todo) currently it is "a or b".
|
|
271
|
+
// Case 2 : AI Query "Show P1 = a and P2 = b"
|
|
272
|
+
// ------- AI response "[P1 = Ranges [a] , P2 = Ranges [b]]"
|
|
273
|
+
// ------- Convert to selectOptions [ {Property = P1, Ranges = [ a ] } , {Property = P2, Ranges = [ b ] } ].
|
|
274
|
+
// ------- FE filters as "a and b".
|
|
275
|
+
|
|
276
|
+
var aSelectOptions = [];
|
|
277
|
+
var oEditStateFilter = 0;
|
|
278
|
+
oAIFilters.forEach(function(oFilterItem) {
|
|
279
|
+
|
|
280
|
+
if ( oFilterItem.name === "EditState") {
|
|
281
|
+
oEditStateFilter = oFilterItem.values[0]; // Edit state generally should not have more than one filter value
|
|
282
|
+
} else {
|
|
283
|
+
var oFilter = {
|
|
284
|
+
PropertyName : oFilterItem.name,
|
|
285
|
+
Ranges : []
|
|
286
|
+
};
|
|
287
|
+
oFilterItem.values.forEach(function (oValue) {
|
|
288
|
+
var oRange = {
|
|
289
|
+
Sign : "I", // currently not considering "E"
|
|
290
|
+
High : "" // Usually for "BT" High is required, but AI provides two separate filters (LT and GT) and FE converts it to two separate selectOptions
|
|
291
|
+
// But this results in OR condition
|
|
292
|
+
// todo : check if AI can provide BT filter or FE should handle it
|
|
293
|
+
};
|
|
294
|
+
if (oFilterItem.operator === "Contains") { // need to check for other operators if special handling is required
|
|
295
|
+
oRange.Option = "CP";
|
|
296
|
+
} else {
|
|
297
|
+
oRange.Option = oFilterItem.operator;
|
|
298
|
+
}
|
|
299
|
+
oRange.Low = oValue;
|
|
300
|
+
oFilter.Ranges.push(oRange);
|
|
301
|
+
});
|
|
302
|
+
aSelectOptions.push(oFilter);
|
|
303
|
+
}
|
|
304
|
+
});
|
|
305
|
+
return {
|
|
306
|
+
aSelectOptions: aSelectOptions,
|
|
307
|
+
oEditStateFilter : oEditStateFilter
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
return {
|
|
311
|
+
triggerEasyFilterQuery : fnTriggerEasyFilterQuery,
|
|
312
|
+
getSFBVariantData : fnGetSFBVariantData,
|
|
313
|
+
getEasyFilterSearchMetadata : fnGetEasyFilterSearchMetadata
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
return BaseObject.extend("sap.suite.ui.generic.template.lib.ai.EasyFilterBarHandler", {
|
|
318
|
+
constructor: function (oState, oController, oTemplateUtils) {
|
|
319
|
+
extend(this, getMethods(oState, oController, oTemplateUtils));
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
});
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
sap.ui.define([
|
|
2
|
+
"sap/ui/base/Object",
|
|
3
|
+
"sap/base/util/extend",
|
|
4
|
+
"sap/ui/core/Lib",
|
|
5
|
+
"sap/suite/ui/generic/template/genericUtilities/FeLogger"
|
|
6
|
+
], function(BaseObject, extend, Lib, FeLogger) {
|
|
7
|
+
'use strict';
|
|
8
|
+
var sAIIntent = "#IntelligentPrompt-summarize"; // For now the intent is common for all the AI scenarios
|
|
9
|
+
var sFioriAILibrary = "ux.eng.fioriai.reuse";
|
|
10
|
+
var UShellContainer = sap.ui.require("sap/ushell/Container");
|
|
11
|
+
var oLogger = new FeLogger("js.FioriAIHandler").getLogger();
|
|
12
|
+
/*
|
|
13
|
+
* This is a handler class for Fiori AI. It is used to load the Fiori AI library and provide it to the template for template consumption.
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
function getMethods(oTemplateContract) {
|
|
18
|
+
|
|
19
|
+
var fnResolveInit = null;
|
|
20
|
+
var fnRejectInit = null;
|
|
21
|
+
var oFioriAILoaderPromise = new Promise(function(fnResolve, fnReject) {
|
|
22
|
+
fnResolveInit = fnResolve;
|
|
23
|
+
fnRejectInit = fnReject;
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* This method is used to load the Fiori AI library and make the available AI capabilities to the template contract
|
|
28
|
+
*/
|
|
29
|
+
function fnLoadAILibrary() {
|
|
30
|
+
var that = this;
|
|
31
|
+
UShellContainer && UShellContainer.getServiceAsync("Navigation").then(function(oNavigationService) {
|
|
32
|
+
oNavigationService.resolveIntent(sAIIntent).then(function(sUrl) {
|
|
33
|
+
Lib.load({name: sFioriAILibrary, url: sUrl}).then(function() {
|
|
34
|
+
// To-Do : load the summarize from reuse/summary
|
|
35
|
+
sap.ui.require(["ux/eng/fioriai/reuse/library", "ux/eng/fioriai/reuse/easyfilter/EasyFilter"], function(fioriaiLib, EasyFilter) {
|
|
36
|
+
that.fioriaiLib.summarize = fioriaiLib.summarize;
|
|
37
|
+
that.fioriaiLib.EasyFilter = EasyFilter;
|
|
38
|
+
that.isFioriAIEnabled = true;
|
|
39
|
+
// Each AI capability will be enabled separately. Currently there is no separation for beta , but in future it will be
|
|
40
|
+
oTemplateContract.oTemplatePrivateGlobalModel.setProperty("/generic/fioriAI/isSummarizationEnabled", !!sUrl);
|
|
41
|
+
// isEasyFilterEnabled property controls the visibility of the EasyFilterBar
|
|
42
|
+
oTemplateContract.oTemplatePrivateGlobalModel.setProperty("/generic/fioriAI/isEasyFilterEnabled", false);
|
|
43
|
+
fnResolveInit();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
}).catch(function() {
|
|
47
|
+
oLogger.warning("No intelligent capability enabled on the tenant");
|
|
48
|
+
fnRejectInit();
|
|
49
|
+
});
|
|
50
|
+
}, fnRejectInit);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
*
|
|
55
|
+
* @returns Promise which resolves to true if the AI is enabled
|
|
56
|
+
*/
|
|
57
|
+
function fnGetFioriAIEnabledPromise() {
|
|
58
|
+
return this.isFioriAIEnabled ? Promise.resolve() : oFioriAILoaderPromise;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return {
|
|
62
|
+
loadAILibrary: fnLoadAILibrary,
|
|
63
|
+
getFioriAIEnabledPromise: fnGetFioriAIEnabledPromise
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return BaseObject.extend("sap.suite.ui.generic.template.lib.ai.FioriAIHandler", {
|
|
67
|
+
constructor: function (oTemplateContract) {
|
|
68
|
+
// If the AI intent is available then later the library will be loaded
|
|
69
|
+
this.fioriaiLib = {
|
|
70
|
+
summarize: null,
|
|
71
|
+
EasyFilter: null
|
|
72
|
+
};
|
|
73
|
+
this.isFioriAIEnabled = false;
|
|
74
|
+
extend(this, getMethods(oTemplateContract));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
|
|
2
|
+
sap.ui.define([
|
|
3
|
+
"sap/ui/base/Object",
|
|
4
|
+
"sap/base/util/extend",
|
|
5
|
+
"sap/insights/channels/ContextChannel",
|
|
6
|
+
"sap/suite/ui/generic/template/lib/ShareUtils"
|
|
7
|
+
], function(BaseObject, extend, ContextChannel, ShareUtils) {
|
|
8
|
+
'use strict';
|
|
9
|
+
function getMethods(oTemplateContract) {
|
|
10
|
+
|
|
11
|
+
function fnRegisterProvider() {
|
|
12
|
+
var oApp = oTemplateContract.oAppComponent.getManifestEntry("sap.app");
|
|
13
|
+
this.contextProvider = {
|
|
14
|
+
getId: function () {
|
|
15
|
+
return oApp.id;
|
|
16
|
+
},
|
|
17
|
+
getContext() {
|
|
18
|
+
var rootLevel = oTemplateContract.oTemplatePrivateGlobalModel.getProperty("/generic/routeLevel");
|
|
19
|
+
var oComponent = Object.values(oTemplateContract.componentRegistry).find(r => r.viewLevel === rootLevel);
|
|
20
|
+
var sEntityPath = "/" + oComponent.routeConfig.entitySet;
|
|
21
|
+
var oView = oComponent.oController.getView();
|
|
22
|
+
var oContext = {
|
|
23
|
+
app_title: oApp.title,
|
|
24
|
+
[oApp.id]: {
|
|
25
|
+
app: {
|
|
26
|
+
view: oView.getViewName()
|
|
27
|
+
},
|
|
28
|
+
flp: {
|
|
29
|
+
hash: ShareUtils.getCustomUrl()
|
|
30
|
+
},
|
|
31
|
+
entity: {
|
|
32
|
+
servicePath: oView.getModel().sServiceUrl,
|
|
33
|
+
entityPath: oView.getBindingContext()?.getPath() ?? oView.getViewData()?.fullContextPath ?? sEntityPath
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
oComponent.oController.getContext(oContext);
|
|
38
|
+
return Promise.resolve(oContext);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
ContextChannel && ContextChannel.getInstance().then(channel => channel.registerProvider(this.contextProvider));
|
|
42
|
+
}
|
|
43
|
+
function fnUnregisterProvider() {
|
|
44
|
+
ContextChannel && ContextChannel.getInstance().then(channel => channel.unregisterProvider(this.contextProvider));
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
fnRegisterProvider: fnRegisterProvider,
|
|
48
|
+
fnUnregisterProvider: fnUnregisterProvider
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
return BaseObject.extend("sap.suite.ui.generic.template.lib.ai.JouleContextProvider",{
|
|
52
|
+
constructor: function(oTemplateContract) {
|
|
53
|
+
extend(this, getMethods(oTemplateContract));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
});
|
|
@@ -606,6 +606,40 @@ sap.ui.define([
|
|
|
606
606
|
}
|
|
607
607
|
}
|
|
608
608
|
|
|
609
|
+
function getCommonFilterProperties(aEntityProp, aParameters) {
|
|
610
|
+
var aCommonPropKeys = aEntityProp.filter(function(oProperty) {
|
|
611
|
+
return isPropertyFilterable(oProperty);
|
|
612
|
+
}) || [];
|
|
613
|
+
if (aParameters && aParameters.length > 0) {
|
|
614
|
+
aEntityProp.forEach(function(oEntityProp){
|
|
615
|
+
var sPropertyNameWithPrefix = "P_" + oEntityProp.name;
|
|
616
|
+
if (aParameters.includes(sPropertyNameWithPrefix)) {
|
|
617
|
+
aCommonPropKeys.push(oEntityProp);
|
|
618
|
+
}
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
return aCommonPropKeys;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
function isPropertyFilterable(oProperty) {
|
|
625
|
+
return oProperty["sap:filterable"] ? oProperty["sap:filterable"] !== "false" : true;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* This function will create a selection variant object from the filter object
|
|
630
|
+
* @param {*} aFilters
|
|
631
|
+
* @returns {object} oSelectionVariant
|
|
632
|
+
*/
|
|
633
|
+
function fnCreateSVFromFilter(aFilters) {
|
|
634
|
+
var oSelectionVariant = new SelectionVariant();
|
|
635
|
+
aFilters && aFilters.forEach(function(oFilter) {
|
|
636
|
+
// to-do: handle multiple values
|
|
637
|
+
var aFilters = oFilter.values;
|
|
638
|
+
oSelectionVariant.addSelectOption(oFilter.name, "I", oFilter.operator, aFilters[0].toString(), "");
|
|
639
|
+
});
|
|
640
|
+
return oSelectionVariant;
|
|
641
|
+
}
|
|
642
|
+
|
|
609
643
|
return {
|
|
610
644
|
enhanceVariant: enhanceVariant,
|
|
611
645
|
updateRangeValue: updateRangeValue,
|
|
@@ -621,6 +655,9 @@ sap.ui.define([
|
|
|
621
655
|
getRelatedTextToRange: getRelatedTextToRange,
|
|
622
656
|
setFilterRestrictionToSemanticDateRange: setFilterRestrictionToSemanticDateRange,
|
|
623
657
|
addDateRangeValueToSV: addDateRangeValueToSV,
|
|
624
|
-
getDateRangeDefaultValue: getDateRangeDefaultValue
|
|
658
|
+
getDateRangeDefaultValue: getDateRangeDefaultValue,
|
|
659
|
+
getCommonFilterProperties: getCommonFilterProperties,
|
|
660
|
+
isPropertyFilterable: isPropertyFilterable,
|
|
661
|
+
createSVFromFilter : fnCreateSVFromFilter
|
|
625
662
|
};
|
|
626
663
|
});
|
|
@@ -305,6 +305,19 @@ ST_CARD_CREATION_FAILURE_REASON_SEMANTIC_DATE_FILTERS=Card creation isn\u2019t p
|
|
|
305
305
|
ST_CARD_NAVIGATION_FAILURE_INFO=Direct navigation to the object details isn’t possible from this insights card.
|
|
306
306
|
|
|
307
307
|
|
|
308
|
+
#------------Easy filter related text-----------------------
|
|
309
|
+
|
|
310
|
+
# YMSG, 200: Message shown when the user switches to Easy filter mode
|
|
311
|
+
ST_EASY_FILTER_PROMPT_INFO=The Prompt-based filtering will create completely new filter criteria. Generated content may not always be accurate. Consider verifying it.
|
|
312
|
+
|
|
313
|
+
# YMSG, 100: Placeholder text for the Easy Filter input field
|
|
314
|
+
ST_EASY_FILTER_INPUT_PLACEHOLDER=Enter your query in natural language to filter the list
|
|
315
|
+
|
|
316
|
+
# XBUT, 20: Text for the Go button in Easy Filter mode
|
|
317
|
+
ST_EASY_FILTER_GO_BUTTON_TEXT=Go
|
|
318
|
+
|
|
319
|
+
#------------End of: Easy filter related text-----------------------
|
|
320
|
+
|
|
308
321
|
#---Final block: texts to be redefined by the application ----------------------------------------------
|
|
309
322
|
|
|
310
323
|
#--- a) Texts that are only relevant for the object page of the root object
|
|
@@ -320,10 +333,10 @@ ST_GENERIC_UNSAVED_CHANGES_CHECKBOX=Also delete objects with unsaved changes.
|
|
|
320
333
|
#YMSG, 100: Delete selected items text. "objects" to be redefined.
|
|
321
334
|
ST_GENERIC_DELETE_SELECTED_PLURAL=Delete the selected objects?
|
|
322
335
|
|
|
323
|
-
#YMSG,
|
|
336
|
+
#YMSG, 120: Delete unsaved changes items text. Parameter: {1}= user name. "object" to be redefined.
|
|
324
337
|
ST_GENERIC_DELETE_UNSAVED_CHANGES=Another user edited this object without saving the changes\: \n{1} \n\nDelete anyway?
|
|
325
338
|
|
|
326
|
-
#YMSG,
|
|
339
|
+
#YMSG, 130: Delete unsaved changes items text. "objects" to be redefined.
|
|
327
340
|
ST_GENERIC_DELETE_UNSAVED_CHANGES_PLURAL=Other users have edited the selected objects without saving the changes. \n\nDelete them anyway?
|
|
328
341
|
|
|
329
342
|
#YMSG, 100: Delete locked item text. Parameter: {1}= user name. "object" to be redefined.
|
|
@@ -353,7 +366,7 @@ ST_GENERIC_DELETE_REMAINING_PLURAL=Do you still want to delete the remaining {0}
|
|
|
353
366
|
#YMSG, 100: Delete the remaining item with unsaved changes text. "object" to be redefined.
|
|
354
367
|
ST_GENERIC_DELETE_REMAINING_UNSAVED_CHANGES=The remaining object has unsaved changes. \n\nDo you still want to delete it?
|
|
355
368
|
|
|
356
|
-
#YMSG,
|
|
369
|
+
#YMSG, 130: Delete the remaining items with unsaved changes text. "objects" to be redefined.
|
|
357
370
|
ST_GENERIC_DELETE_REMAINING_UNSAVED_CHANGES_PLURAL=The remaining objects have unsaved changes by other users. \n\nDo you still want to delete them?
|
|
358
371
|
|
|
359
372
|
#YMSG, 40: Delete success message. "objects" to be redefined.
|
|
@@ -198,6 +198,14 @@ ST_CARD_NAVIGATION_FAILURE_INFO=\u0627\u0644\u062A\u0646\u0642\u0644 \u0627\u064
|
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
|
|
201
|
+
ST_EASY_FILTER_PROMPT_INFO=\u062A\u0642\u0648\u0645 \u0627\u0644\u062A\u0635\u0641\u064A\u0629 \u0639\u0644\u0649 \u0623\u0633\u0627\u0633 \u0627\u0644\u0637\u0644\u0628 \u0627\u0644\u0641\u0648\u0631\u064A \u0628\u0625\u0646\u0634\u0627\u0621 \u0645\u0639\u0627\u064A\u064A\u0631 \u062A\u0635\u0641\u064A\u0629 \u062C\u062F\u064A\u062F\u0629 \u062A\u0645\u0627\u0645\u064B\u0627. \u0642\u062F \u0644\u0627 \u064A\u0643\u0648\u0646 \u0627\u0644\u0645\u062D\u062A\u0648\u0649 \u0627\u0644\u0630\u064A \u062A\u0645 \u0625\u0646\u0634\u0627\u0624\u0647 \u062F\u0642\u064A\u0642\u064B\u0627 \u062F\u0627\u0626\u0645\u064B\u0627. \u0641\u0643\u0631 \u0641\u064A \u0627\u0644\u062A\u062D\u0642\u0642 \u0645\u0646 \u0635\u062D\u062A\u0647.
|
|
202
|
+
|
|
203
|
+
ST_EASY_FILTER_INPUT_PLACEHOLDER=\u0623\u062F\u062E\u0644 \u0627\u0633\u062A\u0639\u0644\u0627\u0645\u0643 \u0628\u0627\u0644\u0644\u063A\u0629 \u0627\u0644\u0637\u0628\u064A\u0639\u064A\u0629 \u0644\u062A\u0635\u0641\u064A\u0629 \u0627\u0644\u0642\u0627\u0626\u0645\u0629.
|
|
204
|
+
|
|
205
|
+
ST_EASY_FILTER_GO_BUTTON_TEXT=\u0627\u0646\u062A\u0642\u0627\u0644
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
201
209
|
|
|
202
210
|
ST_GENERIC_DRAFT_LOCKED_BY_USER=\u0642\u0627\u0645 \u0645\u0633\u062A\u062E\u062F\u0645 \u0622\u062E\u0631 \u0628\u062A\u062D\u0631\u064A\u0631 \u0647\u0630\u0627 \u0627\u0644\u0643\u0627\u0626\u0646 \u0628\u062F\u0648\u0646 \u062D\u0641\u0638 \u0627\u0644\u062A\u063A\u064A\u064A\u0631\u0627\u062A\: \n{1} \n\u0641\u064A \u062D\u0627\u0644\u0629 \u0627\u0644\u0645\u062A\u0627\u0628\u0639\u0629\u060C \u0641\u0633\u064A\u062A\u0645 \u0641\u0642\u062F\u0627\u0646 \u0623\u064A \u062A\u063A\u064A\u064A\u0631\u0627\u062A.
|
|
203
211
|
|
|
@@ -198,6 +198,14 @@ ST_CARD_NAVIGATION_FAILURE_INFO=\u0414\u0438\u0440\u0435\u043A\u0442\u043D\u0430
|
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
|
|
201
|
+
ST_EASY_FILTER_PROMPT_INFO=\u0424\u0438\u043B\u0442\u0440\u0438\u0440\u0430\u043D\u0435\u0442\u043E \u043D\u0430 \u0431\u0430\u0437\u0430 \u0437\u0430\u043F\u0438\u0442\u0432\u0430\u043D\u0435 \u0441\u044A\u0437\u0434\u0430\u0432\u0430 \u043D\u0430\u043F\u044A\u043B\u043D\u043E \u043D\u043E\u0432\u0438 \u043A\u0440\u0438\u0442\u0435\u0440\u0438\u0438 \u0437\u0430 \u0444\u0438\u043B\u0442\u0440\u0438\u0440\u0430\u043D\u0435. \u0412\u044A\u0437\u043C\u043E\u0436\u043D\u043E \u0435 \u0433\u0435\u043D\u0435\u0440\u0438\u0440\u0430\u043D\u043E\u0442\u043E \u0441\u044A\u0434\u044A\u0440\u0436\u0430\u043D\u0438\u0435 \u043D\u0435\u0432\u0438\u043D\u0430\u0433\u0438 \u0434\u0430 \u0435 \u0442\u043E\u0447\u043D\u043E. \u041F\u0440\u043E\u0432\u0435\u0440\u0435\u0442\u0435 \u0433\u043E.
|
|
202
|
+
|
|
203
|
+
ST_EASY_FILTER_INPUT_PLACEHOLDER=\u0412\u044A\u0432\u0435\u0434\u0435\u0442\u0435 \u0437\u0430\u043F\u0438\u0442\u0432\u0430\u043D\u0435\u0442\u043E \u0441\u0438 \u043D\u0430 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043D \u0435\u0437\u0438\u043A, \u0437\u0430 \u0434\u0430 \u0444\u0438\u043B\u0442\u0440\u0438\u0440\u0430\u0442\u0435 \u0441\u043F\u0438\u0441\u044A\u043A\u0430.
|
|
204
|
+
|
|
205
|
+
ST_EASY_FILTER_GO_BUTTON_TEXT=\u0421\u0442\u0430\u0440\u0442
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
201
209
|
|
|
202
210
|
ST_GENERIC_DRAFT_LOCKED_BY_USER=\u0414\u0440\u0443\u0433 \u043F\u043E\u0442\u0440\u0435\u0431\u0438\u0442\u0435\u043B \u0435 \u0440\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u0430\u043B \u043E\u0431\u0435\u043A\u0442\u0430, \u0431\u0435\u0437 \u0434\u0430 \u0437\u0430\u043F\u0430\u0437\u0438 \u043F\u0440\u043E\u043C\u0435\u043D\u0438\u0442\u0435\:\n{1} \n\u0410\u043A\u043E \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435, \u043F\u0440\u043E\u043C\u0435\u043D\u0438\u0442\u0435 \u0449\u0435 \u0431\u044A\u0434\u0430\u0442 \u0438\u0437\u0433\u0443\u0431\u0435\u043D\u0438.
|
|
203
211
|
|
|
@@ -198,6 +198,14 @@ ST_CARD_NAVIGATION_FAILURE_INFO=No es pot accedir directament als detalls de l'o
|
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
|
|
201
|
+
ST_EASY_FILTER_PROMPT_INFO=El filtratge basat en preguntes crea uns criteris de filtre nous. Pot ser que el contingut generat no sigui sempre prec\u00EDs. Considereu verificar-lo.
|
|
202
|
+
|
|
203
|
+
ST_EASY_FILTER_INPUT_PLACEHOLDER=Introdu\u00EFu una consulta en llenguatge natural per filtrar la llista.
|
|
204
|
+
|
|
205
|
+
ST_EASY_FILTER_GO_BUTTON_TEXT=Anar
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
201
209
|
|
|
202
210
|
ST_GENERIC_DRAFT_LOCKED_BY_USER=Alt.usuar.han edit.aq.obj.sense desar les mod.\: \n{1} \nSi transferiu l''obj., totes modif.es perdran.
|
|
203
211
|
|
|
@@ -198,6 +198,14 @@ ST_CARD_NAVIGATION_FAILURE_INFO=Direktna navigacija do detalja objekta nije mogu
|
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
|
|
201
|
+
ST_EASY_FILTER_PROMPT_INFO=Filtriranje zasnovano na upitu kreira potpuno nove krit.filtera. Gen.sadr\u017Eaj mo\u017Eda ne\u0107e uvijek biti precizan. Uzmite u obzir da ga potvrdite.
|
|
202
|
+
|
|
203
|
+
ST_EASY_FILTER_INPUT_PLACEHOLDER=Unesite svoj upit na prirodnom jeziku da biste filtrirali listu.
|
|
204
|
+
|
|
205
|
+
ST_EASY_FILTER_GO_BUTTON_TEXT=Idi
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
201
209
|
|
|
202
210
|
ST_GENERIC_DRAFT_LOCKED_BY_USER=Dr.korisnik je uredio ovaj obj.bez snim.prom.\: \n{1} \nAko vi preuzmete, sve prom.\u0107e biti izgubljene.
|
|
203
211
|
|
|
@@ -198,6 +198,14 @@ ST_CARD_NAVIGATION_FAILURE_INFO=P\u0159\u00EDm\u00E1 navigace k detail\u016Fm ob
|
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
|
|
201
|
+
ST_EASY_FILTER_PROMPT_INFO=Filtrov\u00E1n\u00ED zalo\u017Een\u00E9 na v\u00FDzv\u011B vytv\u00E1\u0159\u00ED zcela nov\u00E1 krit\u00E9ria filtrov\u00E1n\u00ED. Vygenerovan\u00FD obsah nemus\u00ED b\u00FDt v\u017Edy p\u0159esn\u00FD. Zva\u017Ete jeho ov\u011B\u0159en\u00ED.
|
|
202
|
+
|
|
203
|
+
ST_EASY_FILTER_INPUT_PLACEHOLDER=Chcete-li seznam filtrovat, zadejte dotaz v p\u0159irozen\u00E9m jazyce.
|
|
204
|
+
|
|
205
|
+
ST_EASY_FILTER_GO_BUTTON_TEXT=Spustit
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
201
209
|
|
|
202
210
|
ST_GENERIC_DRAFT_LOCKED_BY_USER=Jin\u00FD u\u017Eivatel zpracov\u00E1val tento objekt, ani\u017E zm\u011Bny ulo\u017Eil\: \n{1} \nP\u0159i p\u0159evzet\u00ED se v\u0161echny zm\u011Bny ztrat\u00ED.
|
|
203
211
|
|
|
@@ -198,6 +198,14 @@ ST_CARD_NAVIGATION_FAILURE_INFO=Does dim modd llywio'n uniongyrchol i fanylion y
|
|
|
198
198
|
|
|
199
199
|
|
|
200
200
|
|
|
201
|
+
ST_EASY_FILTER_PROMPT_INFO=Mae hidlo ar sail anogwyr yn creu meini prawf hildo hollol newydd. Efallai na fydd y cynnwys a gynhyrchir bob amser yn gywir. Ystyriwch ei wirio.
|
|
202
|
+
|
|
203
|
+
ST_EASY_FILTER_INPUT_PLACEHOLDER=Rhowch eich ymholiad mewn iaith naturiol er mwyn hidlo'r rhestr.
|
|
204
|
+
|
|
205
|
+
ST_EASY_FILTER_GO_BUTTON_TEXT=Mynd
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
|
|
201
209
|
|
|
202
210
|
ST_GENERIC_DRAFT_LOCKED_BY_USER=Defnyddiwr arall wnaeth olygu''r gwrthrych hwn heb gadw\u2019r newidiadau\: \n{1}\nOs byddwch yn cymryd yr awenau, byddwch yn colli unrhyw newidiadau.
|
|
203
211
|
|