@sapui5/sap.suite.ui.generic.template 1.153.0 → 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 +122 -20
- 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/Component.js +0 -5
- package/src/sap/suite/ui/generic/template/ObjectPage/controller/ControllerImplementation.js +87 -36
- 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/SmartTableChartCommon.js +7 -0
- package/src/sap/suite/ui/generic/template/genericUtilities/controlStateWrapperFactory/SmartVariantManagementWrapper.js +35 -43
- package/src/sap/suite/ui/generic/template/lib/AppComponent.js +20 -15
- package/src/sap/suite/ui/generic/template/lib/CommonEventHandlers.js +69 -0
- package/src/sap/suite/ui/generic/template/lib/CommonUtils.js +32 -1
- 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 +127 -8
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillApplyHandler.js +9 -1
- 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 +6 -2
- package/src/sap/suite/ui/generic/template/lib/ai/EasyFill/EasyFillHandler.js +162 -5
- 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 +581 -26
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n.properties +60 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ar.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_bg.properties +43 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ca.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cnr.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cs.properties +40 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_cy.properties +44 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_da.properties +44 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_de.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_el.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en.properties +40 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_GB.properties +40 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_sappsd.properties +40 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_en_US_saprigi.properties +40 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es.properties +44 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_es_MX.properties +40 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_et.properties +43 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fi.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr.properties +40 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_fr_CA.properties +44 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hi.properties +43 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hr.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_hu.properties +43 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_id.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_it.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_iw.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ja.properties +43 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_kk.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ko.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lt.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_lv.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_mk.properties +44 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ms.properties +43 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_nl.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_no.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pl.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_pt_PT.properties +44 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ro.properties +40 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_ru.properties +40 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sh.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sk.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sl.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sr.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_sv.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_th.properties +44 -4
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_tr.properties +43 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_uk.properties +40 -0
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_vi.properties +43 -3
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_CN.properties +42 -2
- package/src/sap/suite/ui/generic/template/lib/i18n/i18n_zh_TW.properties +44 -4
- package/src/sap/suite/ui/generic/template/lib/navigation/NavigationController.js +27 -7
- 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 +265 -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
|
@@ -169,6 +169,7 @@ sap.ui.define([
|
|
|
169
169
|
sMessageDescription = oResourceBundle.getText("ST_GENERIC_ERROR_SYSTEM_UNAVAILABLE_DESC");
|
|
170
170
|
break;
|
|
171
171
|
case 0:
|
|
172
|
+
case undefined:
|
|
172
173
|
// case when server being offline
|
|
173
174
|
/*adapted to have a reasonable processing for the Apply-Button -
|
|
174
175
|
* workaround to not leave the page in case of apply */
|
|
@@ -92,8 +92,11 @@ sap.ui.define([
|
|
|
92
92
|
},
|
|
93
93
|
|
|
94
94
|
/**
|
|
95
|
-
* Sends the user's free-text input to the AI service
|
|
96
|
-
*
|
|
95
|
+
* Sends the user's free-text input to the AI service using a two-prompt flow.
|
|
96
|
+
*
|
|
97
|
+
* First prompt sends field metadata without table row data. If the AI returns
|
|
98
|
+
* 'scnd_cll' (second-call flag), a second prompt is made with the current table
|
|
99
|
+
* row data (ISLM_Collection_Data) so the AI can reference existing rows.
|
|
97
100
|
*
|
|
98
101
|
* @param {string} sInputText - the user's free-text input from the EasyFill textarea
|
|
99
102
|
* @param {object} mFieldMapping - the complete field mapping built by buildFieldMapping()
|
|
@@ -101,19 +104,135 @@ sap.ui.define([
|
|
|
101
104
|
* @returns {Promise<object>} AI service result: { success: boolean, data: object }
|
|
102
105
|
*/
|
|
103
106
|
submitToAI: async function(sInputText, mFieldMapping, oTemplateUtils) {
|
|
104
|
-
oLogger.debug("submitToAI:
|
|
107
|
+
oLogger.debug("submitToAI: starting two-prompt AI extraction flow");
|
|
105
108
|
try {
|
|
106
|
-
var
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
);
|
|
110
|
-
|
|
109
|
+
var oEasyFill = oTemplateUtils.oServices.oFioriAIHandler.fioriaiLib.EasyFill;
|
|
110
|
+
|
|
111
|
+
// First prompt: send field metadata without table row data
|
|
112
|
+
var mFieldMappingWithoutTableRows = this.buildFieldMappingWithoutTableRows(mFieldMapping);
|
|
113
|
+
var oFirstResult = await oEasyFill.extractFieldValuesFromText(sInputText, mFieldMappingWithoutTableRows);
|
|
114
|
+
if (!oFirstResult.success) {
|
|
115
|
+
return oFirstResult;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// If the AI signals that table row context is needed, run a second prompt
|
|
119
|
+
if ("scnd_cll" in oFirstResult.data) {
|
|
120
|
+
oLogger.debug("submitToAI: second prompt required for table row edits");
|
|
121
|
+
var oTableData = this.buildTableDataForSecondPrompt(oFirstResult.data, mFieldMapping);
|
|
122
|
+
var mFilteredMetadata = this.filterFieldMetadataByFirstPromptResponse(oFirstResult.data, mFieldMapping);
|
|
123
|
+
var oSecondResult = await oEasyFill.extractFieldValuesWithTableData(sInputText, mFilteredMetadata, oTableData);
|
|
124
|
+
if (!oSecondResult.success) {
|
|
125
|
+
return oSecondResult;
|
|
126
|
+
}
|
|
127
|
+
return { success: true, data: this.stripSecondPromptFlag(oSecondResult.data) };
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// No second prompt needed: first prompt returned all field values
|
|
131
|
+
return { success: true, data: this.stripSecondPromptFlag(oFirstResult.data) };
|
|
111
132
|
} catch (e) {
|
|
112
133
|
oLogger.error("submitToAI: AI call failed: " + (e && e.message));
|
|
113
134
|
return { success: false, data: {} };
|
|
114
135
|
}
|
|
115
136
|
},
|
|
116
137
|
|
|
138
|
+
/**
|
|
139
|
+
* Returns a copy of mFieldMapping where collection entries contain only
|
|
140
|
+
* { description, dataType, itemProperties, isCollection: true }, with
|
|
141
|
+
* currentItems removed. Used for the first AI prompt to avoid sending large
|
|
142
|
+
* table row payloads before it is known whether the AI needs them.
|
|
143
|
+
* itemProperties is preserved so the LLM knows the schema of each collection.
|
|
144
|
+
*
|
|
145
|
+
* @param {object} mFieldMapping - the complete field mapping
|
|
146
|
+
* @returns {object} field mapping with currentItems stripped from collection entries
|
|
147
|
+
*/
|
|
148
|
+
buildFieldMappingWithoutTableRows: function(mFieldMapping) {
|
|
149
|
+
var mResult = {};
|
|
150
|
+
Object.keys(mFieldMapping).forEach(function(sFieldName) {
|
|
151
|
+
var oEntry = mFieldMapping[sFieldName];
|
|
152
|
+
if (oEntry && oEntry.isCollection === true) {
|
|
153
|
+
mResult[sFieldName] = {
|
|
154
|
+
description: oEntry.description,
|
|
155
|
+
dataType: oEntry.dataType,
|
|
156
|
+
itemProperties: oEntry.itemProperties,
|
|
157
|
+
isCollection: true
|
|
158
|
+
};
|
|
159
|
+
} else {
|
|
160
|
+
mResult[sFieldName] = oEntry;
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
return mResult;
|
|
164
|
+
},
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Builds the table data structure passed to the second AI prompt (ISLM_Collection_Data).
|
|
168
|
+
* Only includes tables that were mentioned in the first prompt response and have
|
|
169
|
+
* existing row data.
|
|
170
|
+
*
|
|
171
|
+
* @param {object} oFirstPromptData - the first prompt response data (may contain scnd_cll)
|
|
172
|
+
* @param {object} mFieldMapping - the complete field mapping (contains currentItems per table)
|
|
173
|
+
* @returns {object} table data: { [navProp]: { currentItems: array } }
|
|
174
|
+
*/
|
|
175
|
+
buildTableDataForSecondPrompt: function(oFirstPromptData, mFieldMapping) {
|
|
176
|
+
var oTableData = {};
|
|
177
|
+
Object.keys(oFirstPromptData).forEach(function(sFieldName) {
|
|
178
|
+
if (sFieldName === "scnd_cll") { return; }
|
|
179
|
+
var oFieldMeta = mFieldMapping[sFieldName];
|
|
180
|
+
if (!oFieldMeta || oFieldMeta.isCollection !== true) { return; }
|
|
181
|
+
var aCurrentItems = oFieldMeta.currentItems;
|
|
182
|
+
if (Array.isArray(aCurrentItems) && aCurrentItems.length > 0) {
|
|
183
|
+
oTableData[sFieldName] = { currentItems: aCurrentItems };
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
return oTableData;
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Filters the field mapping to only include fields mentioned in the first prompt
|
|
191
|
+
* response. For collection fields, currentItems is excluded because table data is
|
|
192
|
+
* passed separately via ISLM_Collection_Data in the second prompt.
|
|
193
|
+
*
|
|
194
|
+
* @param {object} oFirstPromptData - the first prompt response data
|
|
195
|
+
* @param {object} mFieldMapping - the complete field mapping
|
|
196
|
+
* @returns {object} filtered field metadata for the second prompt
|
|
197
|
+
*/
|
|
198
|
+
filterFieldMetadataByFirstPromptResponse: function(oFirstPromptData, mFieldMapping) {
|
|
199
|
+
var mResult = {};
|
|
200
|
+
Object.keys(oFirstPromptData).forEach(function(sFieldName) {
|
|
201
|
+
if (sFieldName === "scnd_cll") { return; }
|
|
202
|
+
var oFieldMeta = mFieldMapping[sFieldName];
|
|
203
|
+
if (oFieldMeta === undefined) { return; }
|
|
204
|
+
if (oFieldMeta.isCollection === true) {
|
|
205
|
+
// Include collection metadata without currentItems
|
|
206
|
+
var oWithoutCurrentItems = {};
|
|
207
|
+
Object.keys(oFieldMeta).forEach(function(sKey) {
|
|
208
|
+
if (sKey !== "currentItems") {
|
|
209
|
+
oWithoutCurrentItems[sKey] = oFieldMeta[sKey];
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
mResult[sFieldName] = oWithoutCurrentItems;
|
|
213
|
+
} else {
|
|
214
|
+
mResult[sFieldName] = oFieldMeta;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
return mResult;
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Returns a copy of oData with the internal 'scnd_cll' flag key removed.
|
|
222
|
+
*
|
|
223
|
+
* @param {object} oData - field values that may contain the scnd_cll flag
|
|
224
|
+
* @returns {object} field values without the internal flag
|
|
225
|
+
*/
|
|
226
|
+
stripSecondPromptFlag: function(oData) {
|
|
227
|
+
var oResult = {};
|
|
228
|
+
Object.keys(oData).forEach(function(sKey) {
|
|
229
|
+
if (sKey !== "scnd_cll") {
|
|
230
|
+
oResult[sKey] = oData[sKey];
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
return oResult;
|
|
234
|
+
},
|
|
235
|
+
|
|
117
236
|
/**
|
|
118
237
|
* Converts date-like string values in the AI response to JavaScript Date objects,
|
|
119
238
|
* based on the OData data type declared in the field mapping.
|
|
@@ -8,6 +8,11 @@ sap.ui.define([
|
|
|
8
8
|
var sClassName = "lib.ai.EasyFill.EasyFillApplyHandler";
|
|
9
9
|
var oLogger = new FeLogger(sClassName).getLogger();
|
|
10
10
|
|
|
11
|
+
// Maximum number of characters accepted as AI input.
|
|
12
|
+
// Keep in sync with EasyFillDialogController.MAX_INPUT_LENGTH and the TextArea maxLength in
|
|
13
|
+
// EasyFillDialog.fragment.xml.
|
|
14
|
+
var MAX_INPUT_LENGTH = 50000;
|
|
15
|
+
|
|
11
16
|
/**
|
|
12
17
|
* EasyFillApplyHandler
|
|
13
18
|
*
|
|
@@ -210,7 +215,7 @@ sap.ui.define([
|
|
|
210
215
|
* Clears the dialog model properties, destroys table preview items,
|
|
211
216
|
* and optionally clears the text area value.
|
|
212
217
|
*
|
|
213
|
-
* @param {boolean} bRemoveTextAreaValue - if true, also clears the user input text area
|
|
218
|
+
* @param {boolean} bRemoveTextAreaValue - if true, also clears the user input text area and resets all file import state (sImportedFileText, file model properties)
|
|
214
219
|
* @param {object} oDialogModel - the easyFillDialogModel JSONModel
|
|
215
220
|
* @param {object} oController - MVC controller (used to byId controls)
|
|
216
221
|
* @param {object} mCollectionUpdates - mutable collection updates map (cleared in place)
|
|
@@ -260,6 +265,9 @@ sap.ui.define([
|
|
|
260
265
|
var oTextArea = oController.byId("EasyFillInputTextArea");
|
|
261
266
|
if (oTextArea) { oTextArea.setValue(""); }
|
|
262
267
|
oDialogModel.setProperty("/isEasyFillButtonEnabled", false);
|
|
268
|
+
oDialogModel.setProperty("/hasEnteredText", false);
|
|
269
|
+
var oRb = oController.getView().getModel("i18n").getResourceBundle();
|
|
270
|
+
oDialogModel.setProperty("/remainingCharactersText", oRb.getText("EASYFILL_REMAINING_CHARACTERS", [MAX_INPUT_LENGTH]));
|
|
263
271
|
}
|
|
264
272
|
|
|
265
273
|
oLogger.debug("resetEasyFill: dialog state reset" + (bRemoveTextAreaValue ? " (including text area)" : ""));
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
sap.ui.define([
|
|
2
2
|
"sap/ui/model/json/JSONModel",
|
|
3
3
|
"sap/m/MessageToast",
|
|
4
|
+
"sap/m/MessageBox",
|
|
5
|
+
"sap/m/Text",
|
|
4
6
|
"sap/suite/ui/generic/template/genericUtilities/FeLogger",
|
|
5
|
-
"sap/ui/core/ResizeHandler"
|
|
6
|
-
|
|
7
|
+
"sap/ui/core/ResizeHandler",
|
|
8
|
+
"sap/m/Table",
|
|
9
|
+
"sap/m/Column",
|
|
10
|
+
"sap/m/ColumnListItem"
|
|
11
|
+
], function(JSONModel, MessageToast, MessageBox, Text, FeLogger, ResizeHandler, MTable, Column, ColumnListItem) {
|
|
7
12
|
"use strict";
|
|
8
13
|
|
|
9
14
|
var sClassName = "lib.ai.EasyFill.EasyFillDialogController";
|
|
10
15
|
var oLogger = new FeLogger(sClassName).getLogger();
|
|
11
16
|
|
|
17
|
+
// Maximum number of characters accepted as AI input — applies to both the textarea
|
|
18
|
+
// (fragment maxLength) and imported file text. Keep in sync with EasyFillDialog.fragment.xml
|
|
19
|
+
// (TextArea maxLength) and EasyFillApplyHandler.
|
|
20
|
+
var MAX_INPUT_LENGTH = 50000;
|
|
21
|
+
// Maximum number of CSV data rows rendered in the preview table — guards against building
|
|
22
|
+
// thousands of controls synchronously. The full text is still sent to the AI.
|
|
23
|
+
var MAX_PREVIEW_ROWS = 200;
|
|
24
|
+
|
|
12
25
|
/**
|
|
13
26
|
* EasyFillDialogController
|
|
14
27
|
*
|
|
@@ -22,6 +35,29 @@ sap.ui.define([
|
|
|
22
35
|
* All data operations are delegated to EasyFillAIOrchestrator, EasyFillFormRenderer,
|
|
23
36
|
* EasyFillTableRenderer, and EasyFillApplyHandler.
|
|
24
37
|
*/
|
|
38
|
+
// ─── Private Helpers ─────────────────────────────────────────────────────
|
|
39
|
+
|
|
40
|
+
function _addTextPreview(oPreviewContent, sText) {
|
|
41
|
+
var oText = new Text({ text: sText });
|
|
42
|
+
oText.addStyleClass("sapSmartTemplatesObjectPageEasyFillFilePreviewText");
|
|
43
|
+
oPreviewContent.addItem(oText);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function _createCSVPreviewTable(oParsed) {
|
|
47
|
+
var oTable = new MTable({ width: "100%", backgroundDesign: "Solid" });
|
|
48
|
+
oTable.addStyleClass("sapSmartTemplatesObjectPageEasyFillFilePreviewTable");
|
|
49
|
+
oParsed.headers.forEach(function(sHeader) {
|
|
50
|
+
oTable.addColumn(new Column({ width: "10rem", header: new Text({ text: sHeader }) }));
|
|
51
|
+
});
|
|
52
|
+
// Cap the number of rendered rows so a large CSV cannot freeze the dialog by creating
|
|
53
|
+
// one control per cell for thousands of rows.
|
|
54
|
+
oParsed.rows.slice(0, MAX_PREVIEW_ROWS).forEach(function(aRow) {
|
|
55
|
+
var aCells = aRow.map(function(sCell) { return new Text({ text: sCell }); });
|
|
56
|
+
oTable.addItem(new ColumnListItem({ cells: aCells }));
|
|
57
|
+
});
|
|
58
|
+
return oTable;
|
|
59
|
+
}
|
|
60
|
+
|
|
25
61
|
return {
|
|
26
62
|
|
|
27
63
|
/**
|
|
@@ -66,9 +102,22 @@ sap.ui.define([
|
|
|
66
102
|
isFullScreen: true,
|
|
67
103
|
hasTableUpdates: false,
|
|
68
104
|
attemptedMultipleNewRows: false,
|
|
69
|
-
isSplitterPageMode: false
|
|
105
|
+
isSplitterPageMode: false,
|
|
106
|
+
// File import state
|
|
107
|
+
uploadedFileName: "",
|
|
108
|
+
uploadedFileSize: "",
|
|
109
|
+
uploadedFileType: "none",
|
|
110
|
+
filePreviewVisible: false,
|
|
111
|
+
uploadProgress: 0,
|
|
112
|
+
selectedFilePreviewMode: "Text",
|
|
113
|
+
isDragging: false,
|
|
114
|
+
hasEnteredText: false,
|
|
115
|
+
remainingCharactersText: ""
|
|
70
116
|
};
|
|
71
117
|
|
|
118
|
+
var oRbInit = oController.getView().getModel("i18n").getResourceBundle();
|
|
119
|
+
oData.remainingCharactersText = oRbInit.getText("EASYFILL_REMAINING_CHARACTERS", [MAX_INPUT_LENGTH]);
|
|
120
|
+
|
|
72
121
|
oController.getView().setModel(new JSONModel(oData), "easyFillDialogModel");
|
|
73
122
|
oLogger.debug("initDialogModel: easyFillDialogModel created and registered on view");
|
|
74
123
|
},
|
|
@@ -118,6 +167,10 @@ sap.ui.define([
|
|
|
118
167
|
|
|
119
168
|
if (!oDialog) { return; } // guard: load rejected, nothing to open
|
|
120
169
|
|
|
170
|
+
if (oHandlers._onAfterOpen) {
|
|
171
|
+
oDialog.attachEventOnce("afterOpen", oHandlers._onAfterOpen);
|
|
172
|
+
}
|
|
173
|
+
|
|
121
174
|
oDialog.open();
|
|
122
175
|
|
|
123
176
|
if (!oDialog._easyFillResizeHandlerId) {
|
|
@@ -212,25 +265,193 @@ sap.ui.define([
|
|
|
212
265
|
|
|
213
266
|
/**
|
|
214
267
|
* Handles the live change event on the input text area.
|
|
215
|
-
* Enforces the 2000 character limit by truncating excess input.
|
|
216
268
|
* Enables/disables the "Easy Fill" submit button based on whether there is any input.
|
|
217
269
|
*
|
|
218
270
|
* @param {sap.ui.base.Event} oEvent
|
|
219
271
|
* @param {object} oController - MVC controller
|
|
220
272
|
*/
|
|
221
273
|
onLiveChange: function(oEvent, oController) {
|
|
222
|
-
var
|
|
223
|
-
|
|
224
|
-
var
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
274
|
+
var sValue = oEvent.getSource().getValue();
|
|
275
|
+
|
|
276
|
+
var oDialogModel = oController.getView().getModel("easyFillDialogModel");
|
|
277
|
+
// Button is enabled when there is text in the textarea OR a file has been imported
|
|
278
|
+
var bHasFileImported = !!oDialogModel.getProperty("/uploadedFileName") &&
|
|
279
|
+
oDialogModel.getProperty("/filePreviewVisible");
|
|
280
|
+
oDialogModel.setProperty("/isEasyFillButtonEnabled", !!sValue || bHasFileImported);
|
|
281
|
+
oDialogModel.setProperty("/hasEnteredText", !!sValue);
|
|
282
|
+
|
|
283
|
+
var oRb = oController.getView().getModel("i18n").getResourceBundle();
|
|
284
|
+
oDialogModel.setProperty("/remainingCharactersText", oRb.getText("EASYFILL_REMAINING_CHARACTERS", [MAX_INPUT_LENGTH - sValue.length]));
|
|
285
|
+
},
|
|
286
|
+
|
|
287
|
+
// ─── File Import Handlers ──────────────────────────────────────────────────
|
|
288
|
+
|
|
289
|
+
/**
|
|
290
|
+
* Handles the FileUploader change event when a file is selected.
|
|
291
|
+
* Delegates to the shared acceptFile path.
|
|
292
|
+
*
|
|
293
|
+
* @param {sap.ui.base.Event} oEvent - FileUploader change event
|
|
294
|
+
* @param {object} oController - MVC controller
|
|
295
|
+
* @param {object} oRb - i18n resource bundle
|
|
296
|
+
* @param {object} oFileHandler - EasyFillFileHandler module
|
|
297
|
+
* @param {function} fnOnTextImported - callback(sText) called after successful file read
|
|
298
|
+
*/
|
|
299
|
+
onFileUploaderChange: function(oEvent, oController, oRb, oFileHandler, fnOnTextImported) {
|
|
300
|
+
var oFileUploader = oEvent.getSource();
|
|
301
|
+
var aFiles = oEvent.getParameter("files");
|
|
302
|
+
var oFile = aFiles && aFiles[0];
|
|
303
|
+
if (oFile) {
|
|
304
|
+
this.acceptFile(oController, oRb, oFileHandler, oFile, fnOnTextImported);
|
|
305
|
+
}
|
|
306
|
+
oFileUploader.clear();
|
|
307
|
+
},
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Shows a file-upload error in a MessageBox popup dialog (mirrors V4
|
|
311
|
+
* EasyFillDialog.showFileUploadError). Used for every file-import failure —
|
|
312
|
+
* unsupported type, multiple files, empty/unreadable file, and over-limit text.
|
|
313
|
+
*
|
|
314
|
+
* @param {object} oRb - i18n resource bundle
|
|
315
|
+
* @param {string} sMessage - localized error message to display
|
|
316
|
+
*/
|
|
317
|
+
showFileUploadError: function(oRb, sMessage) {
|
|
318
|
+
MessageBox.error(sMessage, {
|
|
319
|
+
title: oRb.getText("EASY_FILL_FILE_UPLOAD_ERROR_TITLE")
|
|
320
|
+
});
|
|
321
|
+
},
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Shows the "unsupported file type" error popup. Wired to the FileUploader
|
|
325
|
+
* typeMissmatch event, which fires when the chosen file's extension is not txt/csv
|
|
326
|
+
* (the FileUploader rejects it before change fires, so the user otherwise gets no feedback).
|
|
327
|
+
*
|
|
328
|
+
* @param {object} oRb - i18n resource bundle
|
|
329
|
+
*/
|
|
330
|
+
showFileTypeError: function(oRb) {
|
|
331
|
+
this.showFileUploadError(oRb, oRb.getText("EASY_FILL_UPLOAD_UNSUPPORTED_FILE_ERROR"));
|
|
332
|
+
},
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* Shared file-accept path used by both the FileUploader change handler and the
|
|
336
|
+
* drag-and-drop handler. Sets the file metadata on the model, reads the file via
|
|
337
|
+
* EasyFillFileHandler, enforces the input-length cap, and surfaces all failures as a
|
|
338
|
+
* MessageBox error popup (localized) rather than a transient toast.
|
|
339
|
+
*
|
|
340
|
+
* @param {object} oController - MVC controller
|
|
341
|
+
* @param {object} oRb - i18n resource bundle
|
|
342
|
+
* @param {object} oFileHandler - EasyFillFileHandler module
|
|
343
|
+
* @param {File} oFile - the selected/dropped file
|
|
344
|
+
* @param {function} fnOnTextImported - callback(sText) invoked once the (within-limit) text is read
|
|
345
|
+
*/
|
|
346
|
+
acceptFile: function(oController, oRb, oFileHandler, oFile, fnOnTextImported) {
|
|
347
|
+
var oDialogModel = oController.getView().getModel("easyFillDialogModel");
|
|
348
|
+
var oSelf = this;
|
|
349
|
+
|
|
350
|
+
function clearFileMeta() {
|
|
351
|
+
oDialogModel.setProperty("/uploadedFileName", "");
|
|
352
|
+
oDialogModel.setProperty("/uploadedFileSize", "");
|
|
353
|
+
oDialogModel.setProperty("/uploadedFileType", "none");
|
|
354
|
+
oDialogModel.setProperty("/uploadProgress", 0);
|
|
355
|
+
oDialogModel.setProperty("/filePreviewVisible", false);
|
|
356
|
+
oDialogModel.setProperty("/isEasyFillButtonEnabled", false);
|
|
230
357
|
}
|
|
231
358
|
|
|
359
|
+
oDialogModel.setProperty("/uploadedFileName", oFile.name);
|
|
360
|
+
oDialogModel.setProperty("/uploadedFileSize", oFileHandler.formatFileSize(oFile.size));
|
|
361
|
+
oDialogModel.setProperty("/uploadedFileType", oFileHandler.getFileType(oFile.name));
|
|
362
|
+
oDialogModel.setProperty("/uploadProgress", 0);
|
|
363
|
+
|
|
364
|
+
oFileHandler.importFile(oFile, {
|
|
365
|
+
onTextImported: function(sText) {
|
|
366
|
+
// Enforce the same character cap as the textarea on imported file text.
|
|
367
|
+
if (sText.length > MAX_INPUT_LENGTH) {
|
|
368
|
+
oLogger.warning("acceptFile: imported text exceeds MAX_INPUT_LENGTH (" + sText.length + ")");
|
|
369
|
+
clearFileMeta();
|
|
370
|
+
oSelf.showFileUploadError(oRb, oRb.getText("EASY_FILL_UPLOAD_FILE_TOO_LARGE_ERROR", [MAX_INPUT_LENGTH]));
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
var sFileType = oDialogModel.getProperty("/uploadedFileType");
|
|
374
|
+
oDialogModel.setProperty("/selectedFilePreviewMode", sFileType === "csv" ? "Table" : "Text");
|
|
375
|
+
fnOnTextImported(sText);
|
|
376
|
+
oDialogModel.setProperty("/filePreviewVisible", true);
|
|
377
|
+
oDialogModel.setProperty("/isEasyFillButtonEnabled", true);
|
|
378
|
+
MessageToast.show(oRb.getText("EASY_FILL_FILE_IMPORTED_SUCCESS", [oFile.name]));
|
|
379
|
+
},
|
|
380
|
+
onValidationError: function() {
|
|
381
|
+
clearFileMeta();
|
|
382
|
+
oSelf.showFileUploadError(oRb, oRb.getText("EASY_FILL_UPLOAD_UNSUPPORTED_FILE_ERROR"));
|
|
383
|
+
},
|
|
384
|
+
onReadError: function(sReason) {
|
|
385
|
+
clearFileMeta();
|
|
386
|
+
var sErrorKey = sReason === "empty"
|
|
387
|
+
? "EASY_FILL_UPLOAD_EMPTY_FILE_ERROR"
|
|
388
|
+
: "EASY_FILL_UPLOAD_READ_ERROR";
|
|
389
|
+
oSelf.showFileUploadError(oRb, oRb.getText(sErrorKey));
|
|
390
|
+
},
|
|
391
|
+
onProgress: function(iPercent) {
|
|
392
|
+
oDialogModel.setProperty("/uploadProgress", iPercent);
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
},
|
|
396
|
+
|
|
397
|
+
/**
|
|
398
|
+
* Renders file preview content into the EasyFillFilePreviewContent VBox.
|
|
399
|
+
* CSV files in table-preview mode are rendered as a sap.m.Table; all other content
|
|
400
|
+
* is rendered as a sap.m.Text.
|
|
401
|
+
*
|
|
402
|
+
* @param {object} oController - MVC controller
|
|
403
|
+
* @param {object} oFileHandler - EasyFillFileHandler module (used for parseCSV in table-preview mode)
|
|
404
|
+
* @param {string|null} sImportedFileText - currently imported file text (or null)
|
|
405
|
+
*/
|
|
406
|
+
renderFilePreview: function(oController, oFileHandler, sImportedFileText) {
|
|
407
|
+
var oPreviewContent = oController.byId("EasyFillFilePreviewContent");
|
|
408
|
+
if (!oPreviewContent) { return; }
|
|
409
|
+
oPreviewContent.destroyItems();
|
|
410
|
+
|
|
411
|
+
var sText = sImportedFileText || "";
|
|
412
|
+
if (!sText) { return; }
|
|
413
|
+
|
|
414
|
+
var oDialogModel = oController.getView().getModel("easyFillDialogModel");
|
|
415
|
+
var sMode = oDialogModel ? oDialogModel.getProperty("/selectedFilePreviewMode") : "Text";
|
|
416
|
+
var sFileType = oDialogModel ? oDialogModel.getProperty("/uploadedFileType") : "none";
|
|
417
|
+
|
|
418
|
+
if (sMode === "Table" && sFileType === "csv") {
|
|
419
|
+
var oParsed = oFileHandler.parseCSV(sText);
|
|
420
|
+
if (oParsed && oParsed.headers.length > 0) {
|
|
421
|
+
oPreviewContent.addItem(_createCSVPreviewTable(oParsed));
|
|
422
|
+
if (oParsed.rows.length > MAX_PREVIEW_ROWS) {
|
|
423
|
+
var oRb = oController.getView().getModel("i18n").getResourceBundle();
|
|
424
|
+
var oNote = new Text({ text: oRb.getText("EASY_FILL_FILE_PREVIEW_TRUNCATED", [MAX_PREVIEW_ROWS]) });
|
|
425
|
+
oNote.addStyleClass("sapSmartTemplatesObjectPageEasyFillFilePreviewText");
|
|
426
|
+
oPreviewContent.addItem(oNote);
|
|
427
|
+
}
|
|
428
|
+
} else {
|
|
429
|
+
_addTextPreview(oPreviewContent, sText);
|
|
430
|
+
}
|
|
431
|
+
} else {
|
|
432
|
+
_addTextPreview(oPreviewContent, sText);
|
|
433
|
+
}
|
|
434
|
+
},
|
|
435
|
+
|
|
436
|
+
/**
|
|
437
|
+
* Resets all file-related state in the dialog model and clears the preview area.
|
|
438
|
+
* Called by EasyFillHandler._resetEasyFill when the dialog is cleared or cancelled.
|
|
439
|
+
*
|
|
440
|
+
* @param {object} oController - MVC controller
|
|
441
|
+
*/
|
|
442
|
+
resetFileState: function(oController) {
|
|
232
443
|
var oDialogModel = oController.getView().getModel("easyFillDialogModel");
|
|
233
|
-
oDialogModel
|
|
444
|
+
if (!oDialogModel) { return; }
|
|
445
|
+
oDialogModel.setProperty("/uploadedFileName", "");
|
|
446
|
+
oDialogModel.setProperty("/uploadedFileSize", "");
|
|
447
|
+
oDialogModel.setProperty("/uploadedFileType", "none");
|
|
448
|
+
oDialogModel.setProperty("/filePreviewVisible", false);
|
|
449
|
+
oDialogModel.setProperty("/uploadProgress", 0);
|
|
450
|
+
oDialogModel.setProperty("/selectedFilePreviewMode", "Text");
|
|
451
|
+
oDialogModel.setProperty("/isDragging", false);
|
|
452
|
+
|
|
453
|
+
var oPreviewContent = oController.byId("EasyFillFilePreviewContent");
|
|
454
|
+
if (oPreviewContent) { oPreviewContent.destroyItems(); }
|
|
234
455
|
},
|
|
235
456
|
|
|
236
457
|
/**
|