@openui5/sap.ui.integration 1.93.3 → 1.96.2
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/.reuse/dep5 +6 -11
- package/THIRDPARTY.txt +10 -16
- package/package.json +3 -3
- package/src/sap/ui/integration/.library +7 -2
- package/src/sap/ui/integration/ActionDefinition.js +1 -1
- package/src/sap/ui/integration/Designtime.js +1 -1
- package/src/sap/ui/integration/Extension.js +1 -1
- package/src/sap/ui/integration/Host.js +71 -8
- package/src/sap/ui/integration/cards/AdaptiveContent.js +18 -25
- package/src/sap/ui/integration/cards/AnalyticalContent.js +178 -147
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +3 -2
- package/src/sap/ui/integration/cards/BaseContent.js +11 -2
- package/src/sap/ui/integration/cards/BaseListContent.js +23 -3
- package/src/sap/ui/integration/cards/CalendarContent.js +2 -2
- package/src/sap/ui/integration/cards/CalendarContentRenderer.js +8 -3
- package/src/sap/ui/integration/cards/ComponentContent.js +1 -1
- package/src/sap/ui/integration/cards/Footer.js +1 -1
- package/src/sap/ui/integration/cards/Header.js +7 -1
- package/src/sap/ui/integration/cards/ListContent.js +37 -13
- package/src/sap/ui/integration/cards/ListContentRenderer.js +38 -7
- package/src/sap/ui/integration/cards/NumericHeader.js +9 -2
- package/src/sap/ui/integration/cards/ObjectContent.js +1 -1
- package/src/sap/ui/integration/cards/TableContent.js +9 -2
- package/src/sap/ui/integration/cards/TimelineContent.js +1 -1
- package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +12 -5
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputTime.js +4 -4
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/overwrites/ActionRender.js +2 -2
- package/src/sap/ui/integration/cards/{Filter.js → filters/BaseFilter.js} +56 -128
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +232 -0
- package/src/sap/ui/integration/{util → cards/filters}/FilterBarFactory.js +37 -12
- package/src/sap/ui/integration/cards/filters/SelectFilter.js +157 -0
- package/src/sap/ui/integration/controls/ActionsStrip.js +1 -3
- package/src/sap/ui/integration/controls/ActionsToolbar.js +1 -1
- package/src/sap/ui/integration/controls/ListContentItem.js +13 -2
- package/src/sap/ui/integration/controls/ListContentItemRenderer.js +65 -2
- package/src/sap/ui/integration/controls/Microchart.js +1 -1
- package/src/sap/ui/integration/controls/MicrochartLegend.js +1 -1
- package/src/sap/ui/integration/customElements/CustomElementEditor.js +29 -0
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +26 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +44 -2
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +27 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n.properties +34 -25
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ar.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_bg.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ca.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_cs.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_cy.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_da.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_de.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_el.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_GB.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_sappsd.properties +4 -2
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_saprigi.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_saptrc.properties +4 -2
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_es.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_es_MX.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_et.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fi.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fr.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fr_CA.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hi.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hr.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hu.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_id.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_it.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_iw.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ja.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_kk.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ko.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_lt.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_lv.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ms.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_nl.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_no.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pl.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pt.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pt_PT.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ro.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ru.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sh.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sk.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sl.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sv.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_th.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_tr.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_uk.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_vi.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_zh_CN.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_zh_TW.properties +19 -13
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +48 -3
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +2 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +4 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +4 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +65 -17
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.fragment.xml +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +17 -4
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +4 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +10 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IsInIconPool.validator.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor.js +10 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +11 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.fragment.xml +8 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +62 -35
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.js +10 -2
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/separatorEditor/SeparatorEditor.js +4 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.js +4 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/binding/ObjectBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/unset.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsBoolean.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsDate.js +5 -4
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsInteger.js +1 -5
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsNumber.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsSelectedKey.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsStringList.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueKey.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueList.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsValidBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/MaxLength.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/NotABinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/ValidatorRegistry.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/BASEditor.js +7 -1
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n.properties +6 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ar.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_bg.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ca.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_cs.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_cy.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_da.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_de.properties +6 -2
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_el.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_en.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_en_GB.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_en_US_sappsd.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_en_US_saprigi.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_en_US_saptrc.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_es.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_es_MX.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_et.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_fi.properties +7 -3
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_fr.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_fr_CA.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_hi.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_hr.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_hu.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_id.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_it.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_iw.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ja.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_kk.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ko.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_lt.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_lv.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ms.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_nl.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_no.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_pl.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_pt.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_pt_PT.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ro.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ru.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_sh.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_sk.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_sl.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_sv.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_th.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_tr.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_uk.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_vi.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_zh_CN.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_zh_TW.properties +4 -0
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/destinationsEditor/DestinationsEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +11 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +12 -1
- package/src/sap/ui/integration/designtime/editor/CardEditor.js +39 -1904
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +22 -1
- package/src/sap/ui/integration/designtime/editor/css/CardPreview.css +4 -0
- package/src/sap/ui/integration/editor/Editor.js +2883 -0
- package/src/sap/ui/integration/{designtime/editor/CardResourceBundles.js → editor/EditorResourceBundles.js} +16 -16
- package/src/sap/ui/integration/editor/Extension.js +103 -0
- package/src/sap/ui/integration/editor/Manifest.js +35 -0
- package/src/sap/ui/integration/editor/Merger.js +102 -0
- package/src/sap/ui/integration/editor/Settings.js +894 -0
- package/src/sap/ui/integration/{designtime/editor/css/CardEditor.css → editor/css/Editor.css} +135 -119
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/BaseField.js +91 -149
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/BooleanField.js +5 -5
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/DateField.js +7 -6
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/DateTimeField.js +7 -6
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/DestinationField.js +5 -5
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/IntegerField.js +5 -10
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/ListField.js +43 -45
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/NumberField.js +5 -10
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/StringField.js +183 -124
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/viz/ColorSelect.js +3 -3
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/viz/IconSelect.js +28 -25
- package/src/sap/ui/integration/{designtime/editor → editor}/fields/viz/ShapeSelect.js +3 -3
- package/src/sap/ui/integration/editor/languages.json +51 -0
- package/src/sap/ui/integration/{designtime/editor → editor}/themes/base/CardEditor.less +0 -0
- package/src/sap/ui/integration/library.js +22 -2
- package/src/sap/ui/integration/messagebundle.properties +99 -60
- package/src/sap/ui/integration/messagebundle_ar.properties +67 -55
- package/src/sap/ui/integration/messagebundle_bg.properties +66 -54
- package/src/sap/ui/integration/messagebundle_ca.properties +67 -55
- package/src/sap/ui/integration/messagebundle_cs.properties +65 -53
- package/src/sap/ui/integration/messagebundle_cy.properties +67 -55
- package/src/sap/ui/integration/messagebundle_da.properties +66 -54
- package/src/sap/ui/integration/messagebundle_de.properties +66 -54
- package/src/sap/ui/integration/messagebundle_el.properties +67 -55
- package/src/sap/ui/integration/messagebundle_en.properties +16 -4
- package/src/sap/ui/integration/messagebundle_en_GB.properties +42 -30
- package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +16 -4
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +81 -55
- package/src/sap/ui/integration/messagebundle_en_US_saptrc.properties +16 -4
- package/src/sap/ui/integration/messagebundle_es.properties +66 -54
- package/src/sap/ui/integration/messagebundle_es_MX.properties +66 -54
- package/src/sap/ui/integration/messagebundle_et.properties +65 -53
- package/src/sap/ui/integration/messagebundle_fi.properties +66 -54
- package/src/sap/ui/integration/messagebundle_fr.properties +65 -53
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +65 -53
- package/src/sap/ui/integration/messagebundle_hi.properties +67 -55
- package/src/sap/ui/integration/messagebundle_hr.properties +66 -54
- package/src/sap/ui/integration/messagebundle_hu.properties +66 -54
- package/src/sap/ui/integration/messagebundle_id.properties +68 -56
- package/src/sap/ui/integration/messagebundle_it.properties +66 -54
- package/src/sap/ui/integration/messagebundle_iw.properties +66 -54
- package/src/sap/ui/integration/messagebundle_ja.properties +65 -53
- package/src/sap/ui/integration/messagebundle_kk.properties +66 -54
- package/src/sap/ui/integration/messagebundle_ko.properties +67 -55
- package/src/sap/ui/integration/messagebundle_lt.properties +67 -55
- package/src/sap/ui/integration/messagebundle_lv.properties +67 -55
- package/src/sap/ui/integration/messagebundle_ms.properties +66 -54
- package/src/sap/ui/integration/messagebundle_nl.properties +65 -53
- package/src/sap/ui/integration/messagebundle_no.properties +66 -54
- package/src/sap/ui/integration/messagebundle_pl.properties +66 -54
- package/src/sap/ui/integration/messagebundle_pt.properties +66 -54
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +66 -54
- package/src/sap/ui/integration/messagebundle_ro.properties +66 -54
- package/src/sap/ui/integration/messagebundle_ru.properties +67 -55
- package/src/sap/ui/integration/messagebundle_sh.properties +66 -54
- package/src/sap/ui/integration/messagebundle_sk.properties +66 -54
- package/src/sap/ui/integration/messagebundle_sl.properties +67 -55
- package/src/sap/ui/integration/messagebundle_sv.properties +66 -54
- package/src/sap/ui/integration/messagebundle_th.properties +67 -55
- package/src/sap/ui/integration/messagebundle_tr.properties +67 -55
- package/src/sap/ui/integration/messagebundle_uk.properties +66 -54
- package/src/sap/ui/integration/messagebundle_vi.properties +66 -54
- package/src/sap/ui/integration/messagebundle_zh_CN.properties +67 -55
- package/src/sap/ui/integration/messagebundle_zh_TW.properties +67 -55
- package/src/sap/ui/integration/model/ContextModel.js +1 -1
- package/src/sap/ui/integration/model/ObservableModel.js +2 -14
- package/src/sap/ui/integration/schemas/adaptive-card.json +2399 -1010
- package/src/sap/ui/integration/schemas/sap-card.json +359 -53
- package/src/sap/ui/integration/themes/base/AnalyticsCloudContent.less +4 -0
- package/src/sap/ui/integration/themes/base/ListContentItem.less +111 -64
- package/src/sap/ui/integration/themes/base/Microchart.less +0 -1
- package/src/sap/ui/integration/thirdparty/adaptivecards.js +9724 -7530
- package/src/sap/ui/integration/util/BaseFactory.js +1 -1
- package/src/sap/ui/integration/util/BindingHelper.js +1 -1
- package/src/sap/ui/integration/util/BindingResolver.js +1 -1
- package/src/sap/ui/integration/util/CacheAndRequestDataProvider.js +75 -24
- package/src/sap/ui/integration/util/CardActions.js +1 -1
- package/src/sap/ui/integration/util/CardMerger.js +5 -3
- package/src/sap/ui/integration/util/CardObserver.js +1 -1
- package/src/sap/ui/integration/util/ContentFactory.js +1 -1
- package/src/sap/ui/integration/util/DataProvider.js +28 -14
- package/src/sap/ui/integration/util/DataProviderFactory.js +39 -8
- package/src/sap/ui/integration/util/Destinations.js +1 -1
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/HeaderFactory.js +8 -7
- package/src/sap/ui/integration/util/JSONBindingHelper.js +4 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +1 -1
- package/src/sap/ui/integration/util/Manifest.js +14 -3
- package/src/sap/ui/integration/util/RequestDataProvider.js +6 -4
- package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
- package/src/sap/ui/integration/util/ServiceManager.js +1 -1
- package/src/sap/ui/integration/util/Utils.js +1 -1
- package/src/sap/ui/integration/widgets/Card.js +164 -71
- package/src/sap-ui-integration-card-editor.js +15 -0
- package/src/sap-ui-integration-editor.js +4 -2
- package/ui5.yaml +4 -1
- package/src/sap/ui/integration/designtime/editor/fields/Settings.js +0 -629
- package/src/sap/ui/integration/designtime/editor/languages.json +0 -51
|
@@ -0,0 +1,894 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
sap.ui.define([
|
|
7
|
+
"sap/ui/core/Control",
|
|
8
|
+
"sap/m/ResponsivePopover",
|
|
9
|
+
"sap/ui/model/json/JSONModel",
|
|
10
|
+
"sap/m/Button",
|
|
11
|
+
"sap/m/SegmentedButton",
|
|
12
|
+
"sap/m/SegmentedButtonItem",
|
|
13
|
+
"sap/m/VBox",
|
|
14
|
+
"sap/m/HBox",
|
|
15
|
+
"sap/m/Select",
|
|
16
|
+
"sap/ui/core/ListItem",
|
|
17
|
+
"sap/m/Label",
|
|
18
|
+
"sap/m/Text",
|
|
19
|
+
"sap/m/Title",
|
|
20
|
+
"sap/m/CheckBox",
|
|
21
|
+
"sap/m/Menu",
|
|
22
|
+
"sap/m/MenuItem",
|
|
23
|
+
"sap/m/Input",
|
|
24
|
+
"sap/ui/integration/util/ParameterMap",
|
|
25
|
+
"sap/base/util/merge",
|
|
26
|
+
"sap/ui/core/Core",
|
|
27
|
+
"sap/m/Table",
|
|
28
|
+
"sap/m/Column",
|
|
29
|
+
"sap/m/ColumnListItem",
|
|
30
|
+
"sap/m/ScrollContainer",
|
|
31
|
+
"sap/base/util/ObjectPath",
|
|
32
|
+
"sap/ui/integration/util/BindingHelper"
|
|
33
|
+
], function (
|
|
34
|
+
Control,
|
|
35
|
+
Popover,
|
|
36
|
+
JSONModel,
|
|
37
|
+
Button,
|
|
38
|
+
SegmentedButton,
|
|
39
|
+
SegmentedButtonItem,
|
|
40
|
+
VBox,
|
|
41
|
+
HBox,
|
|
42
|
+
Select,
|
|
43
|
+
ListItem,
|
|
44
|
+
Label,
|
|
45
|
+
Text,
|
|
46
|
+
Title,
|
|
47
|
+
CheckBox,
|
|
48
|
+
Menu,
|
|
49
|
+
MenuItem,
|
|
50
|
+
Input,
|
|
51
|
+
ParameterMap,
|
|
52
|
+
merge,
|
|
53
|
+
Core,
|
|
54
|
+
Table,
|
|
55
|
+
Column,
|
|
56
|
+
ColumnListItem,
|
|
57
|
+
ScrollContainer,
|
|
58
|
+
ObjectPath,
|
|
59
|
+
BindingHelper
|
|
60
|
+
) {
|
|
61
|
+
"use strict";
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @class
|
|
65
|
+
* @extends sap.ui.core.Control
|
|
66
|
+
* @alias sap.ui.integration.editor.Settings
|
|
67
|
+
* @author SAP SE
|
|
68
|
+
* @since 1.83.0
|
|
69
|
+
* @version 1.96.2
|
|
70
|
+
* @private
|
|
71
|
+
* @experimental since 1.83.0
|
|
72
|
+
* @ui5-restricted
|
|
73
|
+
*/
|
|
74
|
+
var Settings = Control.extend("sap.ui.integration.editor.Settings", {
|
|
75
|
+
metadata: {
|
|
76
|
+
library: "sap.ui.integration"
|
|
77
|
+
},
|
|
78
|
+
renderer: null // Dialog-like control without renderer
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.integration"),
|
|
82
|
+
oCurrentModel,
|
|
83
|
+
bCancel,
|
|
84
|
+
oCurrentInstance = null,
|
|
85
|
+
oDynamicPanel,
|
|
86
|
+
oSettingsPanel,
|
|
87
|
+
oDescriptionLabel,
|
|
88
|
+
oDynamicValueField,
|
|
89
|
+
oMenu,
|
|
90
|
+
aMenuItems,
|
|
91
|
+
oSelectFormat,
|
|
92
|
+
oFormatDescriptionLabel,
|
|
93
|
+
oSettingsButton,
|
|
94
|
+
oSegmentedButton,
|
|
95
|
+
oResetToDefaultButton,
|
|
96
|
+
oPopover;
|
|
97
|
+
Settings.prototype.setConfiguration = function (oConfig) {
|
|
98
|
+
this._originalConfig = oConfig;
|
|
99
|
+
oConfig = merge({}, oConfig);
|
|
100
|
+
var oModel = new JSONModel(oConfig);
|
|
101
|
+
this.setModel(oModel, "currentSettings");
|
|
102
|
+
this.bindElement({
|
|
103
|
+
path: "currentSettings>/"
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
Settings.prototype.open = function (oField, oReferrer, oPreview, oHost, oParent, fnApply, fnCancel) {
|
|
108
|
+
var oCurrentData = this.getModel("currentSettings").getData();
|
|
109
|
+
//prepare fields in key
|
|
110
|
+
if (oCurrentData.values) {
|
|
111
|
+
this.prepareFieldsInKey(oCurrentData);
|
|
112
|
+
}
|
|
113
|
+
oCurrentInstance = this;
|
|
114
|
+
oPopover = createPopover(oCurrentData, oParent);
|
|
115
|
+
this.addDependent(oPopover);
|
|
116
|
+
this.oHost = oHost;
|
|
117
|
+
this.fnApply = fnApply;
|
|
118
|
+
this.fnCancel = fnCancel;
|
|
119
|
+
this._oOpener = oParent;
|
|
120
|
+
bCancel = true;
|
|
121
|
+
oField.addDependent(this);
|
|
122
|
+
//adjust page admin values table height
|
|
123
|
+
if (!oCurrentData.allowDynamicValues && oCurrentData.values) {
|
|
124
|
+
Core.byId("settings_scroll_container").setHeight("155px");
|
|
125
|
+
}
|
|
126
|
+
//force update of all bindings
|
|
127
|
+
this.getModel("currentSettings").checkUpdate(true, true);
|
|
128
|
+
applyVariableDescription(oResourceBundle.getText("EDITOR_SELECT_FROM_LIST"), []);
|
|
129
|
+
if (oReferrer) {
|
|
130
|
+
var iOffsetWidth = (!oPreview || oPreview.getDomRef() === null || oPreview.getDomRef().offsetWidth === 0) ? 270 : oPreview.getDomRef().offsetWidth;
|
|
131
|
+
var iOffsetHeight = (!oPreview || oPreview.getDomRef() === null || oPreview.getDomRef().offsetHeight === 0) ? 350 : oPreview.getDomRef().offsetHeight;
|
|
132
|
+
oPopover.setContentWidth(iOffsetWidth + "px");
|
|
133
|
+
oPopover.setContentHeight((iOffsetHeight - 50) + "px");
|
|
134
|
+
if (oPreview && oPreview.getSettings().preview.position === "right") {
|
|
135
|
+
oPopover.setPlacement("Right");
|
|
136
|
+
} else {
|
|
137
|
+
oPopover.setPlacement("Left");
|
|
138
|
+
}
|
|
139
|
+
oDynamicValueField.setValue(oField._label);
|
|
140
|
+
oPopover.openBy(oField);
|
|
141
|
+
} else {
|
|
142
|
+
oPopover.open();
|
|
143
|
+
}
|
|
144
|
+
oCurrentModel = this.getModel("currentSettings");
|
|
145
|
+
if (oCurrentModel.getProperty("/_hasDynamicValue")) {
|
|
146
|
+
selectDynamic();
|
|
147
|
+
} else if (oCurrentModel.getProperty("/_hasSettings")) {
|
|
148
|
+
selectSettings();
|
|
149
|
+
} else if (oCurrentModel.getProperty("/allowDynamicValues")) {
|
|
150
|
+
selectDynamic();
|
|
151
|
+
} else if (oCurrentModel.getProperty("/allowSettings")) {
|
|
152
|
+
selectSettings();
|
|
153
|
+
}
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
Settings.prototype._applyCurrentSettings = function () {
|
|
157
|
+
this.fnApply(oCurrentModel.getData());
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
Settings.prototype._cancelCurrentSettings = function () {
|
|
161
|
+
this.fnCancel(this._originalConfig);
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
Settings.prototype.destroy = function () {
|
|
165
|
+
this.removeDependent(oPopover);
|
|
166
|
+
return Control.prototype.destroy.apply(this, arguments);
|
|
167
|
+
};
|
|
168
|
+
|
|
169
|
+
function createPopover(oData, oField) {
|
|
170
|
+
var oHeader = createHeader(),
|
|
171
|
+
oResetToDefaultButton = createResetBtn(oData),
|
|
172
|
+
oDynamicPanel = createDynamicPanel(),
|
|
173
|
+
oCurrentValue = createCurrentValuesBox(),
|
|
174
|
+
oSettingsPanel = createSettingPanel(oData, oField),
|
|
175
|
+
oPopover = new Popover({
|
|
176
|
+
id: "settings_popover",
|
|
177
|
+
showArrow: true,
|
|
178
|
+
contentWidth: "400px",
|
|
179
|
+
showHeader: false,
|
|
180
|
+
horizontalScrolling: false,
|
|
181
|
+
verticalScrolling: false,
|
|
182
|
+
modal: false,
|
|
183
|
+
endButton: new Button({
|
|
184
|
+
text: oResourceBundle.getText("EDITOR_MORE_CANCEL"),
|
|
185
|
+
press: function () {
|
|
186
|
+
oPopover.close();
|
|
187
|
+
}
|
|
188
|
+
}),
|
|
189
|
+
beginButton: new Button({
|
|
190
|
+
text: oResourceBundle.getText("EDITOR_MORE_OK"),
|
|
191
|
+
type: "Emphasized",
|
|
192
|
+
press: function () {
|
|
193
|
+
//handle page admin values
|
|
194
|
+
if (oData.values) {
|
|
195
|
+
var oTable = Core.byId("settings_pav_table"),
|
|
196
|
+
selectedContexts = oTable.getSelectedContexts(),
|
|
197
|
+
selectedKeys = [];
|
|
198
|
+
if (oCurrentModel.getProperty("/selectedValues") === "Partion") {
|
|
199
|
+
for (var i = 0; i < selectedContexts.length; i++) {
|
|
200
|
+
var selectedKey = oCurrentInstance.getKeyFromItem(selectedContexts[i].getObject());
|
|
201
|
+
selectedKeys.push(selectedKey);
|
|
202
|
+
}
|
|
203
|
+
setNextSetting("pageAdminValues", selectedKeys);
|
|
204
|
+
} else {
|
|
205
|
+
setNextSetting("pageAdminValues", []);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
oCurrentInstance._applyCurrentSettings();
|
|
210
|
+
bCancel = false;
|
|
211
|
+
oPopover.close();
|
|
212
|
+
}
|
|
213
|
+
}),
|
|
214
|
+
afterClose: function () {
|
|
215
|
+
if (bCancel) {
|
|
216
|
+
oCurrentInstance._cancelCurrentSettings();
|
|
217
|
+
}
|
|
218
|
+
bCancel = true;
|
|
219
|
+
oPopover.destroy();
|
|
220
|
+
},
|
|
221
|
+
afterOpen: function () {
|
|
222
|
+
var oFooter = this.getDomRef().querySelector("footer");
|
|
223
|
+
|
|
224
|
+
var oResetToDefaultButtonDom = oResetToDefaultButton.getDomRef(),
|
|
225
|
+
oInsert = oFooter.querySelector("button").parentNode;
|
|
226
|
+
if (oResetToDefaultButtonDom) {
|
|
227
|
+
oInsert.insertBefore(oResetToDefaultButtonDom, oInsert.firstChild);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
window.requestAnimationFrame(function () {
|
|
231
|
+
oPopover.getDomRef() && (oPopover.getDomRef().style.opacity = "1");
|
|
232
|
+
});
|
|
233
|
+
|
|
234
|
+
//handle page admin values selection
|
|
235
|
+
if (oData.values) {
|
|
236
|
+
var oTable = Core.byId("settings_pav_table"),
|
|
237
|
+
paValues = oCurrentModel.getProperty("/_next/pageAdminValues");
|
|
238
|
+
if (paValues !== undefined && paValues.length > 0) {
|
|
239
|
+
oTable.removeSelections();
|
|
240
|
+
oCurrentModel.setProperty("/selectedValues", "None");
|
|
241
|
+
var sItems = oCurrentModel.getProperty("/_next/pageAdminValues"),
|
|
242
|
+
aItems = oTable.getItems();
|
|
243
|
+
for (var i = 0; i < sItems.length; i++) {
|
|
244
|
+
for (var j = 0; j < aItems.length; j++) {
|
|
245
|
+
var aItemValue = oCurrentInstance.getKeyFromItem(aItems[j].getBindingContext().getObject());
|
|
246
|
+
if (sItems[i] === aItemValue) {
|
|
247
|
+
oTable.setSelectedItem(aItems[j]);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
oCurrentModel.setProperty("/selectedValues", "Partion");
|
|
252
|
+
} else {
|
|
253
|
+
oTable.selectAll();
|
|
254
|
+
oCurrentModel.setProperty("/selectedValues", "All");
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
});
|
|
259
|
+
oPopover.setCustomHeader(oHeader);
|
|
260
|
+
oPopover.addContent(oResetToDefaultButton);
|
|
261
|
+
oPopover.addContent(oDynamicPanel);
|
|
262
|
+
oPopover.addContent(oCurrentValue);
|
|
263
|
+
oPopover.addContent(oSettingsPanel);
|
|
264
|
+
|
|
265
|
+
oPopover.addStyleClass("sapUiIntegrationFieldSettings");
|
|
266
|
+
|
|
267
|
+
return oPopover;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function createSettingsButton() {
|
|
271
|
+
oSettingsButton = new SegmentedButtonItem({
|
|
272
|
+
text: oResourceBundle.getText("EDITOR_MORE_SETTINGS"),
|
|
273
|
+
key: "settings",
|
|
274
|
+
icon: "sap-icon://action-settings",
|
|
275
|
+
width: "50%",
|
|
276
|
+
press: selectSettings
|
|
277
|
+
}).addStyleClass("setbtn");
|
|
278
|
+
|
|
279
|
+
return oSettingsButton;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function createSegmentedButton() {
|
|
283
|
+
oSettingsButton = createSettingsButton();
|
|
284
|
+
oSegmentedButton = new SegmentedButton("settings_Segment_btn", {
|
|
285
|
+
width: "100%",
|
|
286
|
+
visible: "{= ${currentSettings>allowDynamicValues} && ${currentSettings>allowSettings}}",
|
|
287
|
+
items: [
|
|
288
|
+
new SegmentedButtonItem({
|
|
289
|
+
text: oResourceBundle.getText("EDITOR_MORE_DYNAMICVALUES"),
|
|
290
|
+
key: "dynamic",
|
|
291
|
+
icon: "{= ${currentSettings>_hasDynamicValue} ? 'sap-icon://display-more' : 'sap-icon://enter-more'}",
|
|
292
|
+
width: "50%",
|
|
293
|
+
press: selectDynamic
|
|
294
|
+
}).addStyleClass("dynbtn sel"),
|
|
295
|
+
oSettingsButton
|
|
296
|
+
]
|
|
297
|
+
});
|
|
298
|
+
|
|
299
|
+
return oSegmentedButton;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
function createHeader() {
|
|
303
|
+
oSegmentedButton = createSegmentedButton();
|
|
304
|
+
var oDynamicValueText = new Text({
|
|
305
|
+
text: oResourceBundle.getText("EDITOR_MORE_DYNAMICVALUES"),
|
|
306
|
+
visible: "{= ${currentSettings>allowDynamicValues} && !${currentSettings>allowSettings}}"
|
|
307
|
+
}).addStyleClass("sapUiTinyMagin");
|
|
308
|
+
var oSettingsText = new Text({
|
|
309
|
+
text: oResourceBundle.getText("EDITOR_MORE_SETTINGS"),
|
|
310
|
+
visible: "{= !${currentSettings>allowDynamicValues} && ${currentSettings>allowSettings}}"
|
|
311
|
+
}).addStyleClass("sapUiTinyMagin");
|
|
312
|
+
|
|
313
|
+
var oTitle = new HBox({
|
|
314
|
+
width: "100%",
|
|
315
|
+
items: [oSegmentedButton, oDynamicValueText, oSettingsText]
|
|
316
|
+
}).addStyleClass("headertitle");
|
|
317
|
+
|
|
318
|
+
return oTitle;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
function createResetBtn(oData) {
|
|
322
|
+
oResetToDefaultButton = new Button("settings_reset_to_default_btn", {
|
|
323
|
+
type: "Transparent",
|
|
324
|
+
text: oResourceBundle.getText("EDITOR_MORE_RESET"),
|
|
325
|
+
enabled: "{= ${currentSettings>_next/visible} === (typeof(${currentSettings>visibleToUser}) === 'undefined' ? false : !${currentSettings>visibleToUser}) || ${currentSettings>_next/editable} === (typeof(${currentSettings>editableToUser}) === 'undefined' ? false : !${currentSettings>editableToUser}) || ${currentSettings>_next/allowDynamicValues} === (typeof(${currentSettings>allowDynamicValues}) === 'undefined' ? false : !${currentSettings>allowDynamicValues}) || ${currentSettings>_beforeValue} !== ${currentSettings>value}}",
|
|
326
|
+
tooltip: oResourceBundle.getText("EDITOR_MORE_SETTINGS_P_ADMIN_RESET"),
|
|
327
|
+
press: function () {
|
|
328
|
+
var bVisibleDefault = typeof (oCurrentModel.getProperty("/visibleToUser")) === 'undefined' ? true : oCurrentModel.getProperty("/visibleToUser");
|
|
329
|
+
var bEditableDefault = typeof (oCurrentModel.getProperty("/editableToUser")) === 'undefined' ? true : oCurrentModel.getProperty("/editableToUser");
|
|
330
|
+
var bAllowDynamicValuesDefault = typeof (oCurrentModel.getProperty("/allowDynamicValues")) === 'undefined' ? true : oCurrentModel.getProperty("/allowDynamicValues");
|
|
331
|
+
var oPopover = Core.byId("settings_popover");
|
|
332
|
+
setNextSetting("visible", bVisibleDefault);
|
|
333
|
+
setNextSetting("editable", bEditableDefault);
|
|
334
|
+
setNextSetting("allowDynamicValues", bAllowDynamicValuesDefault);
|
|
335
|
+
if (oCurrentModel.getProperty("/translatable")) {
|
|
336
|
+
if (oCurrentModel.getProperty("/_translatedDefaultValue") && oCurrentModel.getProperty("/_translatedDefaultValue") !== "") {
|
|
337
|
+
oCurrentModel.setProperty("/value", oCurrentModel.getProperty("/_translatedDefaultValue"));
|
|
338
|
+
} else if (oCurrentModel.getProperty("/_translatedDefaultPlaceholder") && oCurrentModel.getProperty("/_translatedDefaultPlaceholder") !== "") {
|
|
339
|
+
oCurrentModel.setProperty("/value", oCurrentModel.getProperty("/_translatedDefaultPlaceholder"));
|
|
340
|
+
}
|
|
341
|
+
oCurrentModel.setProperty("/_changed", false);
|
|
342
|
+
} else {
|
|
343
|
+
oCurrentModel.setProperty("/value", oCurrentModel.getProperty("/_beforeValue"));
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
//reset table selection
|
|
347
|
+
if (oData.values) {
|
|
348
|
+
var oTable = Core.byId("settings_pav_table"),
|
|
349
|
+
sItems = oCurrentModel.getProperty("/_next/pageAdminValues"),
|
|
350
|
+
aItems = oTable.getItems();
|
|
351
|
+
// pavItemKey = oCurrentModel.getData().values.item.key;
|
|
352
|
+
// pavItemKey = pavItemKey.substring(1, pavItemKey.length - 1);
|
|
353
|
+
if (sItems !== undefined && sItems.length > 0 && sItems.length < aItems.length) {
|
|
354
|
+
oTable.removeSelections();
|
|
355
|
+
for (var i = 0; i < sItems.length; i++) {
|
|
356
|
+
for (var j = 0; j < aItems.length; j++) {
|
|
357
|
+
// var aItemValue = aItems[j].getBindingContext("currentSettings").getObject();
|
|
358
|
+
var aItemValue = oCurrentInstance.getKeyFromItem(aItems[j].getBindingContext().getObject());
|
|
359
|
+
if (sItems[i] === aItemValue) {
|
|
360
|
+
oTable.setSelectedItem(aItems[j]);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
oCurrentModel.setProperty("/selectedValues", "Partion");
|
|
365
|
+
} else {
|
|
366
|
+
oTable.selectAll();
|
|
367
|
+
oCurrentModel.setProperty("/selectedValues", "All");
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
oPopover.getBeginButton().firePress();
|
|
372
|
+
}
|
|
373
|
+
}).addStyleClass("resetbutton");
|
|
374
|
+
return oResetToDefaultButton;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
function selectSettings() {
|
|
378
|
+
oSettingsPanel.setVisible(true);
|
|
379
|
+
oDynamicPanel.setVisible(false);
|
|
380
|
+
Core.byId("settings_Segment_btn").setSelectedKey("settings");
|
|
381
|
+
var oCurrentValue = Core.byId("settings_current_value");
|
|
382
|
+
oCurrentValue.setVisible(false);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
function selectDynamic() {
|
|
386
|
+
oSettingsPanel.setVisible(false);
|
|
387
|
+
oDynamicPanel.setVisible(true);
|
|
388
|
+
Core.byId("settings_Segment_btn").setSelectedKey("dynamic");
|
|
389
|
+
var oFlat = oCurrentInstance.getModel("contextflat"),
|
|
390
|
+
o = oFlat._getValueObject(oCurrentModel.getProperty("/value"));
|
|
391
|
+
if (o && o.object.label) {
|
|
392
|
+
oDynamicValueField.setValue(o.object.label);
|
|
393
|
+
applyVariableDescription(o.object.description, o.object.tags);
|
|
394
|
+
if (o.path === "empty") {
|
|
395
|
+
oDynamicValueField.setValue(o.object.label);
|
|
396
|
+
}
|
|
397
|
+
updateCurrentValue(o);
|
|
398
|
+
}
|
|
399
|
+
//visible current value field
|
|
400
|
+
var oCurrentValue = Core.byId("settings_current_value");
|
|
401
|
+
oCurrentValue.setVisible(true);
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
function setNextSetting(sProperty, vValue) {
|
|
405
|
+
if (!oCurrentModel.getProperty("/_next")) {
|
|
406
|
+
oCurrentModel.setProperty("/_next", {});
|
|
407
|
+
}
|
|
408
|
+
oCurrentModel.setProperty("/_next/" + sProperty, vValue);
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
function createMenuItems(oData, path) {
|
|
412
|
+
var a = [];
|
|
413
|
+
for (var n in oData) {
|
|
414
|
+
if (oData[n] && oData[n].label) {
|
|
415
|
+
var oItem = new MenuItem({
|
|
416
|
+
text: oData[n].label
|
|
417
|
+
});
|
|
418
|
+
oItem.__data = oData[n];
|
|
419
|
+
oData[n].pathvalue = (path + "/" + n).substring(1);
|
|
420
|
+
a.push(oItem);
|
|
421
|
+
var sub = createMenuItems(oData[n], path + "/" + n);
|
|
422
|
+
for (var i = 0; i < sub.length; i++) {
|
|
423
|
+
oItem.addItem(sub[i]);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return a;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
var aFormatters = [
|
|
431
|
+
{
|
|
432
|
+
formatMethod: "format.DateTime",
|
|
433
|
+
sourceTypes: ["datetime", "date"],
|
|
434
|
+
label: "Relative date/datetime text of the value",
|
|
435
|
+
description: "Should be applied to dynamic values of type date or datetime or string values that represent a datetime in the format 'yyyy-MM-ddZhh:mm:ss'",
|
|
436
|
+
example: "4 weeks ago",
|
|
437
|
+
syntax: "handlebars",
|
|
438
|
+
binding: "{= format.dateTime('__|VALUE|__',{relative:true})}"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
formatMethod: "format.DateTime",
|
|
442
|
+
sourceTypes: ["datetime", "date"],
|
|
443
|
+
label: "Short date/datetime text of the value",
|
|
444
|
+
description: "Should be applied to dynamic values of type date, date-time or text values that represent a datetime in the format 'yyyy-MM-ddZhh:mm:ss.sss'",
|
|
445
|
+
example: "9/18/20, 2:09 PM",
|
|
446
|
+
binding: "{= format.dateTime('__|VALUE|__',{style:'short'})}"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
formatMethod: "format.DateTime",
|
|
450
|
+
sourceTypes: ["datetime", "date"],
|
|
451
|
+
label: "Medium date/datetime text of the value",
|
|
452
|
+
description: "Should be applied to dynamic values of type date, date-time or text values that represent a datetime in the format 'yyyy-MM-ddThh:mm:ss.sssZ'",
|
|
453
|
+
example: "Sep 18, 2020, 2:09:04 PM",
|
|
454
|
+
binding: "{= format.dateTime('__|VALUE|__',{style:'medium'})}"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
formatMethod: "format.DateTime",
|
|
458
|
+
sourceTypes: ["datetime", "date"],
|
|
459
|
+
label: "Long date, date-time text of the value",
|
|
460
|
+
description: "Should be applied to dynamic values of type date or date-time or string values that represent a datetime in the format 'yyyy-MM-ddThh:mm:ss.sssZ'",
|
|
461
|
+
example: "Sep 18, 2020, 2:09:04 PM",
|
|
462
|
+
binding: "{= format.dateTime('__|VALUE|__',{style:'long'})}"
|
|
463
|
+
}
|
|
464
|
+
];
|
|
465
|
+
|
|
466
|
+
function createDynamicPanel() {
|
|
467
|
+
oDynamicPanel = new VBox({ visible: true });
|
|
468
|
+
oDynamicPanel.addStyleClass("sapUiSmallMargin");
|
|
469
|
+
oDynamicValueField = new Input({
|
|
470
|
+
width: "100%",
|
|
471
|
+
showValueHelp: true,
|
|
472
|
+
valueHelpOnly: true,
|
|
473
|
+
valueHelpRequest: function () {
|
|
474
|
+
if (oMenu) {
|
|
475
|
+
oMenu.destroy();
|
|
476
|
+
}
|
|
477
|
+
oMenu = new Menu({});
|
|
478
|
+
aMenuItems = createMenuItems(oDynamicPanel.getModel("context").getData(), "");
|
|
479
|
+
for (var i = 0; i < aMenuItems.length; i++) {
|
|
480
|
+
oMenu.addItem(aMenuItems[i]);
|
|
481
|
+
}
|
|
482
|
+
oMenu.attachItemSelected(function (oEvent) {
|
|
483
|
+
var oData = oEvent.getParameter("item").__data;
|
|
484
|
+
applyVariableDescription(oData.description || "", oData.tags || []);
|
|
485
|
+
oDynamicValueField.setValue(oData.placeholder || oData.label);
|
|
486
|
+
//get the path and value
|
|
487
|
+
var oFlat = oCurrentInstance.getModel("contextflat");
|
|
488
|
+
updateCurrentValue(oFlat._getPathObject(oData.pathvalue));
|
|
489
|
+
});
|
|
490
|
+
oDynamicValueField.addDependent(oMenu);
|
|
491
|
+
oMenu.addStyleClass("sapUiIntegrationFieldSettingsMenu");
|
|
492
|
+
oMenu.openBy(oDynamicValueField, false, null, null, "1 0");
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
oDynamicValueField.addStyleClass("selectvariable");
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
var oVBox = new VBox({
|
|
501
|
+
items: [
|
|
502
|
+
new Label({ text: "Select a dynamic value" }),
|
|
503
|
+
oDynamicValueField
|
|
504
|
+
]
|
|
505
|
+
});
|
|
506
|
+
oDynamicPanel.addItem(oVBox);
|
|
507
|
+
|
|
508
|
+
oDescriptionLabel = new Text({ text: "", maxLines: 6, renderWhitespace: true });
|
|
509
|
+
oVBox = new VBox({
|
|
510
|
+
width: "100%",
|
|
511
|
+
items: [
|
|
512
|
+
oDescriptionLabel
|
|
513
|
+
]
|
|
514
|
+
});
|
|
515
|
+
oDescriptionLabel.addStyleClass("description");
|
|
516
|
+
oDynamicPanel.addItem(oVBox);
|
|
517
|
+
if (aFormatters.length === -1) {
|
|
518
|
+
//not applicable right now
|
|
519
|
+
oSelectFormat = new Select({
|
|
520
|
+
width: "100%",
|
|
521
|
+
enabled: true,
|
|
522
|
+
change: function () {
|
|
523
|
+
oFormatDescriptionLabel.setText(oSelectFormat.getSelectedItem()._data.description);
|
|
524
|
+
}
|
|
525
|
+
});
|
|
526
|
+
oVBox = new VBox({
|
|
527
|
+
visible: false,
|
|
528
|
+
items: [
|
|
529
|
+
new Label({ text: "Customize the value..." }),
|
|
530
|
+
oSelectFormat
|
|
531
|
+
]
|
|
532
|
+
});
|
|
533
|
+
oDynamicPanel.addItem(oVBox);
|
|
534
|
+
oFormatDescriptionLabel = new Text({ text: "", maxLines: 4, renderWhitespace: true });
|
|
535
|
+
oFormatDescriptionLabel.addStyleClass("description");
|
|
536
|
+
oVBox = new VBox({
|
|
537
|
+
width: "100%",
|
|
538
|
+
items: [
|
|
539
|
+
oFormatDescriptionLabel
|
|
540
|
+
]
|
|
541
|
+
});
|
|
542
|
+
oDynamicPanel.addItem(oVBox);
|
|
543
|
+
oDynamicPanel.getItems()[2].getItems()[0].addStyleClass("sapUiTinyMarginTop");
|
|
544
|
+
}
|
|
545
|
+
oDynamicPanel.getItems()[0].getItems()[0].addStyleClass("sapUiTinyMarginTop");
|
|
546
|
+
|
|
547
|
+
return oDynamicPanel;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
function createCurrentValuesBox() {
|
|
551
|
+
var oCurrentValue = new VBox("settings_current_value", {
|
|
552
|
+
width: "100%",
|
|
553
|
+
items: [
|
|
554
|
+
new Text({
|
|
555
|
+
text: oResourceBundle.getText("EDITOR_ACTUAL_VALUE")
|
|
556
|
+
}),
|
|
557
|
+
new Input({
|
|
558
|
+
value: {
|
|
559
|
+
path: "currentSettings>_currentContextValue"
|
|
560
|
+
},
|
|
561
|
+
editable: false
|
|
562
|
+
})]
|
|
563
|
+
});
|
|
564
|
+
oCurrentValue.addStyleClass("currentval");
|
|
565
|
+
|
|
566
|
+
return oCurrentValue;
|
|
567
|
+
}
|
|
568
|
+
|
|
569
|
+
function createSettingPanel(oData, oField) {
|
|
570
|
+
oSettingsPanel = new VBox({ visible: false });
|
|
571
|
+
var oBox = new VBox().addStyleClass("commonSettings");
|
|
572
|
+
oSettingsPanel.addItem(oBox);
|
|
573
|
+
oBox.addItem(new Title({
|
|
574
|
+
text: oResourceBundle.getText("EDITOR_MORE_SETTINGS_P_ADMIN")
|
|
575
|
+
}).addStyleClass("stitle"));
|
|
576
|
+
oBox.addItem(new HBox({
|
|
577
|
+
items: [
|
|
578
|
+
new Label({
|
|
579
|
+
text: oResourceBundle.getText("EDITOR_MORE_SETTINGS_P_ADMIN_VISIBLE")
|
|
580
|
+
}),
|
|
581
|
+
new CheckBox({
|
|
582
|
+
selected: "{= ${currentSettings>_next/visible} !== false}",
|
|
583
|
+
select: function (oEvent) {
|
|
584
|
+
setNextSetting("visible", oEvent.getParameter("selected"));
|
|
585
|
+
}
|
|
586
|
+
})
|
|
587
|
+
]
|
|
588
|
+
}).addStyleClass("cbrow"));
|
|
589
|
+
oBox.addItem(new HBox({
|
|
590
|
+
items: [
|
|
591
|
+
new Label({
|
|
592
|
+
text: oResourceBundle.getText("EDITOR_MORE_SETTINGS_P_ADMIN_EDIT")
|
|
593
|
+
}),
|
|
594
|
+
new CheckBox({
|
|
595
|
+
selected: "{= ${currentSettings>_next/editable} !== false}",
|
|
596
|
+
enabled: "{= ${currentSettings>_next/visible} !== false}",
|
|
597
|
+
select: function (oEvent) {
|
|
598
|
+
setNextSetting("editable", oEvent.getParameter("selected"));
|
|
599
|
+
}
|
|
600
|
+
})
|
|
601
|
+
]
|
|
602
|
+
}).addStyleClass("cbrow"));
|
|
603
|
+
oBox.addItem(new HBox({
|
|
604
|
+
visible: "{= ${currentSettings>allowDynamicValues}!== false}",
|
|
605
|
+
items: [
|
|
606
|
+
new Label({
|
|
607
|
+
text: oResourceBundle.getText("EDITOR_MORE_SETTINGS_P_ADMIN_DYN")
|
|
608
|
+
}),
|
|
609
|
+
new CheckBox({
|
|
610
|
+
selected: "{= ${currentSettings>_next/allowDynamicValues} !== false}",
|
|
611
|
+
enabled: "{= ${currentSettings>_next/visible} !== false && ${currentSettings>_next/editable} !== false}",
|
|
612
|
+
select: function (oEvent) {
|
|
613
|
+
setNextSetting("allowDynamicValues", oEvent.getParameter("selected"));
|
|
614
|
+
}
|
|
615
|
+
})
|
|
616
|
+
]
|
|
617
|
+
}).addStyleClass("cbrow"));
|
|
618
|
+
|
|
619
|
+
//Binding page admin data to table
|
|
620
|
+
if (oData.values) {
|
|
621
|
+
var vData;
|
|
622
|
+
if (oData.values.data) {
|
|
623
|
+
var sPath = oData.values.data.path,
|
|
624
|
+
aPath;
|
|
625
|
+
if (sPath && sPath !== "/") {
|
|
626
|
+
if (sPath.startsWith("/")) {
|
|
627
|
+
sPath = sPath.substring(1);
|
|
628
|
+
}
|
|
629
|
+
if (sPath.endsWith("/")) {
|
|
630
|
+
sPath = sPath.substring(0, sPath.length - 1);
|
|
631
|
+
}
|
|
632
|
+
aPath = sPath.split("/");
|
|
633
|
+
vData = ObjectPath.get(["_values", aPath], oData);
|
|
634
|
+
} else {
|
|
635
|
+
vData = ObjectPath.get(["_values"], oData);
|
|
636
|
+
}
|
|
637
|
+
} else if (oField.getParent().getParent().getAggregation("_extension")) {
|
|
638
|
+
var ePath = oData.values.path;
|
|
639
|
+
if (ePath.length > 1) {
|
|
640
|
+
ePath = ePath.substring(1);
|
|
641
|
+
}
|
|
642
|
+
vData = ObjectPath.get([ePath], oField.getModel().getData());
|
|
643
|
+
}
|
|
644
|
+
oBox.addItem(new HBox({
|
|
645
|
+
visible: "{= ${currentSettings>_next/visible} !== false && ${currentSettings>_next/editable} !== false}",
|
|
646
|
+
items: [
|
|
647
|
+
new Label({
|
|
648
|
+
text: oResourceBundle.getText("EDITOR_MORE_SETTINGS_P_ADMIN_VALUES_LIST"),
|
|
649
|
+
tooltip: oResourceBundle.getText("EDITOR_MORE_SETTINGS_P_ADMIN_VALUES_LIST_TOOLTIPS"),
|
|
650
|
+
wrapping: false
|
|
651
|
+
}),
|
|
652
|
+
new Button({
|
|
653
|
+
type: "Transparent",
|
|
654
|
+
enabled: vData !== undefined,
|
|
655
|
+
icon: {
|
|
656
|
+
path: "currentSettings>selectedValues",
|
|
657
|
+
formatter: function(values) {
|
|
658
|
+
if (values === "All") {
|
|
659
|
+
return "sap-icon://multiselect-all";
|
|
660
|
+
} else if (values === "Partion") {
|
|
661
|
+
return "sap-icon://multi-select";
|
|
662
|
+
} else if (values === "None") {
|
|
663
|
+
return "sap-icon://multiselect-none";
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
tooltip: {
|
|
668
|
+
path: "currentSettings>selectedValues",
|
|
669
|
+
formatter: function(values) {
|
|
670
|
+
if (values === "All") {
|
|
671
|
+
return oResourceBundle.getText("EDITOR_MORE_SETTINGS_P_ADMIN_DESELECT_ALL");
|
|
672
|
+
} else {
|
|
673
|
+
return oResourceBundle.getText("EDITOR_MORE_SETTINGS_P_ADMIN_SELECT_ALL");
|
|
674
|
+
}
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
press: onMultiSelectionClick
|
|
678
|
+
})
|
|
679
|
+
]
|
|
680
|
+
}).addStyleClass("cbrow"));
|
|
681
|
+
var pavTable = new Table({
|
|
682
|
+
id: "settings_pav_table",
|
|
683
|
+
mode: "MultiSelect",
|
|
684
|
+
width: "84%",
|
|
685
|
+
select: onTableSelection,
|
|
686
|
+
columns: [
|
|
687
|
+
new Column()
|
|
688
|
+
]
|
|
689
|
+
}).addStyleClass("tableHdr");
|
|
690
|
+
var pavItemText = oData.values.item.text,
|
|
691
|
+
vModel = new JSONModel(vData);
|
|
692
|
+
pavTable.setModel(vModel);
|
|
693
|
+
var oTemplate = new ColumnListItem().addStyleClass("pavlistItem");
|
|
694
|
+
if (vData) {
|
|
695
|
+
for (var i = 0; i < vData.length; i++) {
|
|
696
|
+
oTemplate.addCell(new HBox({
|
|
697
|
+
items: [
|
|
698
|
+
new Text({
|
|
699
|
+
text: BindingHelper.createBindingInfos(pavItemText)
|
|
700
|
+
}).addStyleClass("pavTblCellText")
|
|
701
|
+
]
|
|
702
|
+
})).addStyleClass("pavlistItem");
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
pavTable.bindItems("/", oTemplate);
|
|
706
|
+
var oScrollContainer = new ScrollContainer({
|
|
707
|
+
id: "settings_scroll_container",
|
|
708
|
+
height: "125px",
|
|
709
|
+
width: "94%",
|
|
710
|
+
vertical: true,
|
|
711
|
+
horizontal: false,
|
|
712
|
+
visible: "{= ${currentSettings>_next/visible} !== false && ${currentSettings>_next/editable} !== false}",
|
|
713
|
+
content: [pavTable]
|
|
714
|
+
}).addStyleClass("SettingsPAVTable");
|
|
715
|
+
oSettingsPanel.addItem(oScrollContainer);
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
return oSettingsPanel;
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
function onMultiSelectionClick() {
|
|
722
|
+
var oTable = Core.byId("settings_pav_table"),
|
|
723
|
+
oResetBtn = Core.byId("settings_reset_to_default_btn"),
|
|
724
|
+
selectedValues = oCurrentModel.getProperty("/selectedValues");
|
|
725
|
+
if (selectedValues === "All") {
|
|
726
|
+
oTable.removeSelections();
|
|
727
|
+
oCurrentModel.setProperty("/selectedValues", "None");
|
|
728
|
+
} else {
|
|
729
|
+
oTable.selectAll();
|
|
730
|
+
oCurrentModel.setProperty("/selectedValues", "All");
|
|
731
|
+
}
|
|
732
|
+
if (!oResetBtn.getEnabled()) {
|
|
733
|
+
oResetBtn.setEnabled(true);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
function onTableSelection(oEvent) {
|
|
738
|
+
var oTable = oEvent.getSource(),
|
|
739
|
+
selectedItems = oTable.getSelectedItems(),
|
|
740
|
+
allItems = oTable.getItems(),
|
|
741
|
+
oResetBtn = Core.byId("settings_reset_to_default_btn");
|
|
742
|
+
if (selectedItems.length === allItems.length) {
|
|
743
|
+
oCurrentModel.setProperty("/selectedValues", "All");
|
|
744
|
+
} else if (selectedItems.length < allItems.length && selectedItems.length > 0) {
|
|
745
|
+
oCurrentModel.setProperty("/selectedValues", "Partion");
|
|
746
|
+
} else {
|
|
747
|
+
oCurrentModel.setProperty("/selectedValues", "None");
|
|
748
|
+
}
|
|
749
|
+
if (!oResetBtn.getEnabled()) {
|
|
750
|
+
oResetBtn.setEnabled(true);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
function applyFormatItems(aCustomize, sType) {
|
|
755
|
+
aCustomize = aCustomize || [];
|
|
756
|
+
oSelectFormat.removeAllItems();
|
|
757
|
+
var aItems = [];
|
|
758
|
+
oSelectFormat.addItem(new ListItem({
|
|
759
|
+
text: "No customizing needed",
|
|
760
|
+
key: ""
|
|
761
|
+
}));
|
|
762
|
+
for (var i = 0; i < aFormatters.length; i++) {
|
|
763
|
+
//first add the best matches for the type
|
|
764
|
+
var oFormatter = aFormatters[i],
|
|
765
|
+
oItem = new ListItem({
|
|
766
|
+
text: oFormatter.label,
|
|
767
|
+
key: "key" + i
|
|
768
|
+
});
|
|
769
|
+
oItem._data = oFormatter;
|
|
770
|
+
if (oFormatter.sourceTypes.indexOf(sType) > -1 || aCustomize.indexOf(oFormatter.formatMethod) > -1) {
|
|
771
|
+
oSelectFormat.addItem(oItem);
|
|
772
|
+
} else {
|
|
773
|
+
aItems.push(oItem);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
for (var i = 0; i < aItems.length; i++) {
|
|
777
|
+
oSelectFormat.addItem(aItems[i]);
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
function applyVariableDescription(sText, aTags) {
|
|
782
|
+
aTags = aTags || [];
|
|
783
|
+
if (aTags.indexOf("technical") > -1) {
|
|
784
|
+
sText = sText + "\n" + oResourceBundle.getText("EDITOR_MORE_DYNAMICVALUES_TECHHINT");
|
|
785
|
+
}
|
|
786
|
+
oDescriptionLabel.setText(sText);
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
function updateFormatterSelect(oData) {
|
|
790
|
+
if (aFormatters.length === -1) {
|
|
791
|
+
//currently not applicable
|
|
792
|
+
if (!oData) {
|
|
793
|
+
oSelectFormat.removeAllItems();
|
|
794
|
+
oSelectFormat.addItem(
|
|
795
|
+
new ListItem({
|
|
796
|
+
text: "No customizing available for this value"
|
|
797
|
+
})
|
|
798
|
+
);
|
|
799
|
+
oFormatDescriptionLabel.setText("");
|
|
800
|
+
oSelectFormat.setEnabled(false);
|
|
801
|
+
} else {
|
|
802
|
+
applyFormatItems(oData.customize, oData.type);
|
|
803
|
+
oSelectFormat.setEnabled(true);
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
function updateCurrentValue(oData) {
|
|
809
|
+
if (oData) {
|
|
810
|
+
oCurrentModel.setProperty("/_hasDynamicValue", true);
|
|
811
|
+
var vValue = oData.value;
|
|
812
|
+
oCurrentModel.setProperty("/value", vValue);
|
|
813
|
+
oCurrentModel.setProperty("/_contextpath", oData.path);
|
|
814
|
+
if (oData.object && oData.object.value && oData.object.value.indexOf("{{") === 0) {
|
|
815
|
+
oCurrentModel.setProperty("/_currentContextValue", ParameterMap.processPredefinedParameter(oData.object.value));
|
|
816
|
+
updateFormatterSelect(oData.object);
|
|
817
|
+
} else {
|
|
818
|
+
if (oData.path === "empty") {
|
|
819
|
+
oCurrentModel.setProperty("/value", "");
|
|
820
|
+
oCurrentModel.setProperty("/_currentContextValue", "");
|
|
821
|
+
oCurrentModel.setProperty("/_hasDynamicValue", false);
|
|
822
|
+
updateFormatterSelect();
|
|
823
|
+
} else {
|
|
824
|
+
updateFormatterSelect(oData.object);
|
|
825
|
+
if (oData.object && oData.object.hasOwnProperty("value")) {
|
|
826
|
+
oCurrentModel.setProperty("/_currentContextValue", oData.object.value);
|
|
827
|
+
} else {
|
|
828
|
+
oCurrentInstance.oHost.getContextValue(oData.path + "/value").then(function (v) {
|
|
829
|
+
if (v === null) {
|
|
830
|
+
oCurrentModel.setProperty("/_currentContextValue", "(not available)");
|
|
831
|
+
} else {
|
|
832
|
+
oCurrentModel.setProperty("/_currentContextValue", v);
|
|
833
|
+
}
|
|
834
|
+
oData.object && (oData.object.value = v);
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
Settings._private = function () {
|
|
842
|
+
return {
|
|
843
|
+
oPopover: oPopover,
|
|
844
|
+
oSegmentedButton: oSegmentedButton,
|
|
845
|
+
oSettingsButton: oSettingsButton,
|
|
846
|
+
oDynamicPanel: oDynamicPanel,
|
|
847
|
+
oSettingsPanel: oSettingsPanel,
|
|
848
|
+
oCurrentModel: oCurrentModel,
|
|
849
|
+
updateCurrentValue: updateCurrentValue,
|
|
850
|
+
oCurrentInstance: oCurrentInstance,
|
|
851
|
+
oDynamicValueField: oDynamicValueField,
|
|
852
|
+
oResetToDefaultButton: oResetToDefaultButton,
|
|
853
|
+
getMenuItems: function () {
|
|
854
|
+
return aMenuItems;
|
|
855
|
+
},
|
|
856
|
+
getMenu: function () {
|
|
857
|
+
return oMenu;
|
|
858
|
+
|
|
859
|
+
}
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
|
|
863
|
+
Settings.prototype.prepareFieldsInKey = function(oConfig) {
|
|
864
|
+
//get field names in the item key
|
|
865
|
+
this._sKeySeparator = oConfig.values.keySeparator;
|
|
866
|
+
if (!this._sKeySeparator) {
|
|
867
|
+
this._sKeySeparator = "#";
|
|
868
|
+
}
|
|
869
|
+
var sKey = oConfig.values.item.key;
|
|
870
|
+
this._aFields = sKey.split(this._sKeySeparator);
|
|
871
|
+
for (var n in this._aFields) {
|
|
872
|
+
//remove the {} in the field
|
|
873
|
+
if (this._aFields[n].startsWith("{")) {
|
|
874
|
+
this._aFields[n] = this._aFields[n].substring(1);
|
|
875
|
+
}
|
|
876
|
+
if (this._aFields[n].endsWith("}")) {
|
|
877
|
+
this._aFields[n] = this._aFields[n].substring(0, this._aFields[n].length - 1);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
};
|
|
881
|
+
|
|
882
|
+
Settings.prototype.getKeyFromItem = function(oItem) {
|
|
883
|
+
var sItemKey = "";
|
|
884
|
+
this._aFields.forEach(function (field) {
|
|
885
|
+
sItemKey += oItem[field].toString() + this._sKeySeparator;
|
|
886
|
+
}.bind(this));
|
|
887
|
+
if (sItemKey.endsWith(this._sKeySeparator)) {
|
|
888
|
+
sItemKey = sItemKey.substring(0, sItemKey.length - this._sKeySeparator.length);
|
|
889
|
+
}
|
|
890
|
+
return sItemKey;
|
|
891
|
+
};
|
|
892
|
+
|
|
893
|
+
return Settings;
|
|
894
|
+
});
|