@openui5/sap.ui.integration 1.99.1 → 1.102.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/.eslintrc.json +18 -0
- package/THIRDPARTY.txt +5 -5
- package/package.json +3 -3
- package/src/sap/ui/integration/.library +1 -1
- 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 +17 -3
- package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticalContent.js +16 -2
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
- package/src/sap/ui/integration/cards/BaseContent.js +4 -3
- package/src/sap/ui/integration/cards/BaseListContent.js +9 -4
- package/src/sap/ui/integration/cards/CalendarContent.js +8 -4
- 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 +4 -2
- package/src/sap/ui/integration/cards/ListContent.js +1 -1
- package/src/sap/ui/integration/cards/NumericHeader.js +5 -2
- package/src/sap/ui/integration/cards/ObjectContent.js +130 -7
- package/src/sap/ui/integration/cards/TableContent.js +1 -1
- 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/actions/CardActions.js +15 -7
- package/src/sap/ui/integration/cards/actions/HideCardAction.js +45 -0
- package/src/sap/ui/integration/cards/actions/ShowCardAction.js +106 -0
- 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 +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
- package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
- package/src/sap/ui/integration/cards/filters/BaseFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +3 -2
- package/src/sap/ui/integration/cards/filters/FilterBar.js +1 -1
- package/src/sap/ui/integration/cards/filters/FilterBarFactory.js +1 -1
- package/src/sap/ui/integration/cards/filters/SearchFilter.js +1 -1
- package/src/sap/ui/integration/cards/filters/SelectFilter.js +1 -1
- package/src/sap/ui/integration/controls/ActionsStrip.js +57 -24
- package/src/sap/ui/integration/controls/ActionsToolbar.js +4 -3
- package/src/sap/ui/integration/controls/LinkWithIcon.js +77 -0
- package/src/sap/ui/integration/controls/LinkWithIconRenderer.js +38 -0
- package/src/sap/ui/integration/controls/ListContentItem.js +1 -1
- 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/controls/Paginator.js +221 -19
- package/src/sap/ui/integration/controls/PaginatorRenderer.js +2 -0
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +6 -4
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n.properties +11 -2
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ar.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_bg.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ca.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_cs.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_cy.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_da.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_de.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_el.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_GB.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_sappsd.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_saprigi.properties +25 -13
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_saptrc.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_es.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_es_MX.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_et.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fi.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fr.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fr_CA.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hi.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hr.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hu.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_id.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_it.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_iw.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ja.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_kk.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ko.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_lt.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_lv.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ms.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_nl.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_no.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pl.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pt.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pt_PT.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ro.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ru.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sh.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sk.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sl.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sv.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_th.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_tr.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_uk.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_vi.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_zh_CN.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_zh_TW.properties +7 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- 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 +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +11 -3
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/multiSelectEditor/MultiSelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/objectArrayEditor/ObjectArrayEditor.fragment.xml +14 -0
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/objectArrayEditor/ObjectArrayEditor.js +102 -0
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/separatorEditor/SeparatorEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +5 -2
- package/src/sap/ui/integration/designtime/baseEditor/util/StylesheetManager.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/binding/ObjectBinding.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/util/createPromise.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 +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/validator/IsInteger.js +1 -1
- 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 +2 -2
- package/src/sap/ui/integration/designtime/cardEditor/BASEditor.js +22 -21
- package/src/sap/ui/integration/designtime/cardEditor/config/index.js +3 -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 +4 -0
- 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 +48 -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 +4 -0
- 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/filtersEditor/FiltersEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +14 -3
- package/src/sap/ui/integration/designtime/editor/CardEditor.js +99 -11
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +1 -1
- package/src/sap/ui/integration/editor/Editor.js +775 -276
- package/src/sap/ui/integration/editor/EditorResourceBundles.js +1 -1
- package/src/sap/ui/integration/editor/Extension.js +1 -1
- package/src/sap/ui/integration/editor/Manifest.js +1 -1
- package/src/sap/ui/integration/editor/Merger.js +0 -1
- package/src/sap/ui/integration/editor/Settings.js +1 -1
- package/src/sap/ui/integration/editor/css/Editor.css +105 -6
- package/src/sap/ui/integration/editor/fields/BaseField.js +50 -16
- package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
- package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
- package/src/sap/ui/integration/editor/fields/IntegerField.js +16 -2
- package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
- package/src/sap/ui/integration/editor/fields/ObjectField.js +1936 -0
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +349 -0
- package/src/sap/ui/integration/editor/fields/StringField.js +41 -16
- package/src/sap/ui/integration/editor/fields/{ListField.js → StringListField.js} +93 -107
- package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +1 -1
- package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
- package/src/sap/ui/integration/formatters/InitialsFormatter.js +38 -0
- package/src/sap/ui/integration/library.js +30 -19
- package/src/sap/ui/integration/messagebundle.properties +99 -0
- package/src/sap/ui/integration/messagebundle_ar.properties +66 -0
- package/src/sap/ui/integration/messagebundle_bg.properties +66 -0
- package/src/sap/ui/integration/messagebundle_ca.properties +66 -0
- package/src/sap/ui/integration/messagebundle_cs.properties +66 -0
- package/src/sap/ui/integration/messagebundle_cy.properties +66 -0
- package/src/sap/ui/integration/messagebundle_da.properties +66 -0
- package/src/sap/ui/integration/messagebundle_de.properties +66 -0
- package/src/sap/ui/integration/messagebundle_el.properties +66 -0
- package/src/sap/ui/integration/messagebundle_en.properties +66 -0
- package/src/sap/ui/integration/messagebundle_en_GB.properties +66 -0
- package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +66 -0
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +157 -55
- package/src/sap/ui/integration/messagebundle_en_US_saptrc.properties +66 -0
- package/src/sap/ui/integration/messagebundle_es.properties +66 -0
- package/src/sap/ui/integration/messagebundle_es_MX.properties +66 -0
- package/src/sap/ui/integration/messagebundle_et.properties +66 -0
- package/src/sap/ui/integration/messagebundle_fi.properties +68 -2
- package/src/sap/ui/integration/messagebundle_fr.properties +66 -0
- package/src/sap/ui/integration/messagebundle_fr_CA.properties +66 -0
- package/src/sap/ui/integration/messagebundle_hi.properties +66 -0
- package/src/sap/ui/integration/messagebundle_hr.properties +66 -0
- package/src/sap/ui/integration/messagebundle_hu.properties +66 -0
- package/src/sap/ui/integration/messagebundle_id.properties +66 -0
- package/src/sap/ui/integration/messagebundle_it.properties +66 -0
- package/src/sap/ui/integration/messagebundle_iw.properties +66 -0
- package/src/sap/ui/integration/messagebundle_ja.properties +66 -0
- package/src/sap/ui/integration/messagebundle_kk.properties +66 -0
- package/src/sap/ui/integration/messagebundle_ko.properties +67 -1
- package/src/sap/ui/integration/messagebundle_lt.properties +66 -0
- package/src/sap/ui/integration/messagebundle_lv.properties +66 -0
- package/src/sap/ui/integration/messagebundle_ms.properties +66 -0
- package/src/sap/ui/integration/messagebundle_nl.properties +66 -0
- package/src/sap/ui/integration/messagebundle_no.properties +66 -0
- package/src/sap/ui/integration/messagebundle_pl.properties +66 -0
- package/src/sap/ui/integration/messagebundle_pt.properties +66 -0
- package/src/sap/ui/integration/messagebundle_pt_PT.properties +66 -0
- package/src/sap/ui/integration/messagebundle_ro.properties +66 -0
- package/src/sap/ui/integration/messagebundle_ru.properties +66 -0
- package/src/sap/ui/integration/messagebundle_sh.properties +66 -0
- package/src/sap/ui/integration/messagebundle_sk.properties +66 -0
- package/src/sap/ui/integration/messagebundle_sl.properties +66 -0
- package/src/sap/ui/integration/messagebundle_sv.properties +67 -1
- package/src/sap/ui/integration/messagebundle_th.properties +66 -0
- package/src/sap/ui/integration/messagebundle_tr.properties +66 -0
- package/src/sap/ui/integration/messagebundle_uk.properties +66 -0
- package/src/sap/ui/integration/messagebundle_vi.properties +66 -0
- package/src/sap/ui/integration/messagebundle_zh_CN.properties +66 -0
- package/src/sap/ui/integration/messagebundle_zh_TW.properties +66 -0
- package/src/sap/ui/integration/model/ContextModel.js +1 -1
- package/src/sap/ui/integration/model/ObservableModel.js +1 -1
- package/src/sap/ui/integration/model/PagingModelListBinding.js +1 -1
- package/src/sap/ui/integration/sap-ui-integration-define-nojQuery.js +2 -1
- package/src/sap/ui/integration/schemas/sap-card.json +142 -12
- package/src/sap/ui/integration/themes/base/CalendarContent.less +2 -2
- package/src/sap/ui/integration/themes/base/Card.less +24 -0
- package/src/sap/ui/integration/themes/base/Footer.less +1 -0
- package/src/sap/ui/integration/themes/base/LinkWithIcon.less +11 -0
- package/src/sap/ui/integration/themes/base/ListContentItem.less +11 -0
- package/src/sap/ui/integration/themes/base/ObjectContent.less +16 -0
- package/src/sap/ui/integration/themes/base/Paginator.less +119 -11
- package/src/sap/ui/integration/themes/base/library.source.less +1 -0
- package/src/sap/ui/integration/util/BaseFactory.js +1 -1
- package/src/sap/ui/integration/util/BindingHelper.js +13 -6
- package/src/sap/ui/integration/util/BindingResolver.js +1 -1
- package/src/sap/ui/integration/util/CacheAndRequestDataProvider.js +4 -30
- package/src/sap/ui/integration/util/CardMerger.js +82 -8
- 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/CsrfTokenHandler.js +1 -1
- package/src/sap/ui/integration/util/DataProvider.js +1 -1
- package/src/sap/ui/integration/util/DataProviderFactory.js +8 -1
- package/src/sap/ui/integration/util/Destinations.js +4 -2
- package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
- package/src/sap/ui/integration/util/HeaderFactory.js +39 -3
- package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
- package/src/sap/ui/integration/util/LoadingProvider.js +4 -4
- package/src/sap/ui/integration/util/Manifest.js +8 -3
- package/src/sap/ui/integration/util/ManifestResolver.js +0 -1
- package/src/sap/ui/integration/util/RequestDataProvider.js +31 -5
- 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/SkeletonCard.js +14 -2
- package/src/sap/ui/integration/util/Utils.js +16 -1
- package/src/sap/ui/integration/widgets/Card.js +228 -48
|
@@ -15,6 +15,7 @@ sap.ui.define([
|
|
|
15
15
|
"sap/ui/base/Interface",
|
|
16
16
|
"sap/ui/integration/Designtime",
|
|
17
17
|
"sap/ui/model/json/JSONModel",
|
|
18
|
+
"sap/ui/model/odata/v4/ODataModel",
|
|
18
19
|
"sap/ui/integration/util/Utils",
|
|
19
20
|
"sap/ui/integration/util/Destinations",
|
|
20
21
|
"sap/ui/integration/util/DataProviderFactory",
|
|
@@ -47,7 +48,9 @@ sap.ui.define([
|
|
|
47
48
|
"sap/m/FlexItemData",
|
|
48
49
|
"sap/m/FlexBox",
|
|
49
50
|
"sap/m/Button",
|
|
50
|
-
"sap/m/OverflowToolbar"
|
|
51
|
+
"sap/m/OverflowToolbar",
|
|
52
|
+
"sap/m/IconTabBar",
|
|
53
|
+
"sap/m/IconTabFilter"
|
|
51
54
|
], function (
|
|
52
55
|
ui5loader,
|
|
53
56
|
Control,
|
|
@@ -59,6 +62,7 @@ sap.ui.define([
|
|
|
59
62
|
Interface,
|
|
60
63
|
Designtime,
|
|
61
64
|
JSONModel,
|
|
65
|
+
ODataModel,
|
|
62
66
|
Utils,
|
|
63
67
|
Destinations,
|
|
64
68
|
DataProviderFactory,
|
|
@@ -91,7 +95,9 @@ sap.ui.define([
|
|
|
91
95
|
FlexItemData,
|
|
92
96
|
FlexBox,
|
|
93
97
|
Button,
|
|
94
|
-
OverflowToolbar
|
|
98
|
+
OverflowToolbar,
|
|
99
|
+
IconTabBar,
|
|
100
|
+
IconTabFilter
|
|
95
101
|
) {
|
|
96
102
|
"use strict";
|
|
97
103
|
|
|
@@ -138,7 +144,7 @@ sap.ui.define([
|
|
|
138
144
|
* @extends sap.ui.core.Control
|
|
139
145
|
*
|
|
140
146
|
* @author SAP SE
|
|
141
|
-
* @version 1.
|
|
147
|
+
* @version 1.102.0
|
|
142
148
|
* @constructor
|
|
143
149
|
* @since 1.94
|
|
144
150
|
* @private
|
|
@@ -191,6 +197,14 @@ sap.ui.define([
|
|
|
191
197
|
previewPosition:{
|
|
192
198
|
type: "string",
|
|
193
199
|
defaultValue: "right" // value can be "top", "bottom", "left", "right"
|
|
200
|
+
},
|
|
201
|
+
width: {
|
|
202
|
+
type: "sap.ui.core.CSSSize",
|
|
203
|
+
defaultValue: ""
|
|
204
|
+
},
|
|
205
|
+
height: {
|
|
206
|
+
type: "sap.ui.core.CSSSize",
|
|
207
|
+
defaultValue: ""
|
|
194
208
|
}
|
|
195
209
|
},
|
|
196
210
|
aggregations: {
|
|
@@ -269,11 +283,11 @@ sap.ui.define([
|
|
|
269
283
|
//render items
|
|
270
284
|
if (aItems) {
|
|
271
285
|
var oPanel;
|
|
272
|
-
var
|
|
286
|
+
var oSubGroup;
|
|
273
287
|
var oLanguagePanel;
|
|
274
288
|
var oLabelItemForNotWrapping;
|
|
275
289
|
var oColFields = [];
|
|
276
|
-
var
|
|
290
|
+
var oColFieldsOfSubGroup = [];
|
|
277
291
|
var oOriginalField;
|
|
278
292
|
var addColFields = function () {
|
|
279
293
|
if (oColFields.length > 0) {
|
|
@@ -289,18 +303,18 @@ sap.ui.define([
|
|
|
289
303
|
oColFields = [];
|
|
290
304
|
}
|
|
291
305
|
};
|
|
292
|
-
var
|
|
293
|
-
if (
|
|
294
|
-
var iLess = 2 -
|
|
306
|
+
var addColFieldsOfSubGroup = function () {
|
|
307
|
+
if (oColFieldsOfSubGroup.length > 0) {
|
|
308
|
+
var iLess = 2 - oColFieldsOfSubGroup.length;
|
|
295
309
|
for (var n = 0; n < iLess; n++) {
|
|
296
|
-
|
|
310
|
+
oColFieldsOfSubGroup.push(new VBox());
|
|
297
311
|
}
|
|
298
|
-
|
|
312
|
+
oSubGroup.addContent(new FlexBox({
|
|
299
313
|
alignItems: "Start",
|
|
300
314
|
justifyContent: "SpaceBetween",
|
|
301
|
-
items:
|
|
315
|
+
items: oColFieldsOfSubGroup
|
|
302
316
|
}));
|
|
303
|
-
|
|
317
|
+
oColFieldsOfSubGroup = [];
|
|
304
318
|
}
|
|
305
319
|
};
|
|
306
320
|
var renderPanel = function (oPanel) {
|
|
@@ -319,42 +333,101 @@ sap.ui.define([
|
|
|
319
333
|
}
|
|
320
334
|
}
|
|
321
335
|
};
|
|
322
|
-
var addSubPanel = function (oPanel,
|
|
323
|
-
if (oPanel &&
|
|
324
|
-
var aContents =
|
|
336
|
+
var addSubPanel = function (oPanel, oSubGroup) {
|
|
337
|
+
if (oPanel && oSubGroup.getContent().length > 0) {
|
|
338
|
+
var aContents = oSubGroup.getContent();
|
|
325
339
|
if (aContents[0].isA("sap.m.MessageStrip")) {
|
|
326
|
-
|
|
327
|
-
|
|
340
|
+
oSubGroup.removeContent(0);
|
|
341
|
+
oSubGroup.addContent(aContents[0]);
|
|
328
342
|
}
|
|
329
|
-
oPanel.addContent(
|
|
330
|
-
if (
|
|
331
|
-
oPanel.addContent(
|
|
343
|
+
oPanel.addContent(oSubGroup);
|
|
344
|
+
if (oSubGroup._messageStrip) {
|
|
345
|
+
oPanel.addContent(oSubGroup._messageStrip);
|
|
332
346
|
}
|
|
333
347
|
} else {
|
|
334
|
-
|
|
348
|
+
oSubGroup = null;
|
|
349
|
+
}
|
|
350
|
+
};
|
|
351
|
+
var addSubTab = function (oPanel, oSubGroup) {
|
|
352
|
+
var oSubItems = oPanel.getContent(),
|
|
353
|
+
oIconTabBar;
|
|
354
|
+
if (oSubItems.length > 0) {
|
|
355
|
+
for (var m = 0; m < oSubItems.length; m++) {
|
|
356
|
+
if (oSubItems[m].isA("sap.m.IconTabBar")) {
|
|
357
|
+
oIconTabBar = oSubItems[m];
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
if (oIconTabBar && oSubGroup.getContent().length > 0) {
|
|
362
|
+
oIconTabBar.addItem(oSubGroup);
|
|
335
363
|
}
|
|
336
364
|
};
|
|
337
365
|
for (var i = 0; i < aItems.length; i++) {
|
|
338
366
|
var oItem = aItems[i];
|
|
339
367
|
if (oControl.getMode() !== "translation") {
|
|
340
|
-
if (oItem.isA("sap.m.Panel")) {
|
|
341
|
-
if (
|
|
368
|
+
if (oItem.isA("sap.m.Panel") || oItem.isA("sap.m.IconTabBar")) {
|
|
369
|
+
if (oSubGroup) {
|
|
342
370
|
//add current col fields to previous sub panel, then empty the col fields list
|
|
343
|
-
|
|
344
|
-
//add sub
|
|
345
|
-
|
|
371
|
+
addColFieldsOfSubGroup();
|
|
372
|
+
//add sub group to panel
|
|
373
|
+
if (oItem.isA("sap.m.Panel") && oSubGroup.isA("sap.m.Panel")) {
|
|
374
|
+
addSubPanel(oPanel, oSubGroup);
|
|
375
|
+
} else {
|
|
376
|
+
addSubTab(oPanel, oSubGroup);
|
|
377
|
+
}
|
|
346
378
|
}
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
379
|
+
var oItemLevel = 0;
|
|
380
|
+
if (oItem.isA("sap.m.Panel")) {
|
|
381
|
+
oItemLevel = oItem._level;
|
|
382
|
+
} else if (oItem.isA("sap.m.IconTabBar")) {
|
|
383
|
+
oItemLevel = "1";
|
|
384
|
+
}
|
|
385
|
+
if (oItemLevel === "1") {
|
|
386
|
+
if (oColFields.length > 0) {
|
|
387
|
+
addColFields();
|
|
388
|
+
// renderPanel(oPanel);
|
|
389
|
+
}
|
|
390
|
+
if (oItem.isA("sap.m.IconTabBar")) {
|
|
391
|
+
var subItems = oPanel.getContent(),
|
|
392
|
+
iconTabBarExist = false,
|
|
393
|
+
nIconTabBar;
|
|
394
|
+
if (subItems.length > 0) {
|
|
395
|
+
for (var j = 0; j < subItems.length; j++) {
|
|
396
|
+
if (subItems[j].isA("sap.m.IconTabBar")) {
|
|
397
|
+
iconTabBarExist = true;
|
|
398
|
+
nIconTabBar = subItems[j];
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
if (!iconTabBarExist) {
|
|
403
|
+
oSubGroup = oItem.getItems()[0];
|
|
404
|
+
oSubGroup._subItems = [];
|
|
405
|
+
oItem.removeItem(oItem.getItems()[0]);
|
|
406
|
+
if (oItem.isA("sap.m.IconTabBar") && oItem._messageStrip) {
|
|
407
|
+
oPanel.addContent(oItem._messageStrip);
|
|
408
|
+
}
|
|
409
|
+
oItem.addStyleClass("sapUiIntegrationEditorSubTab");
|
|
410
|
+
oPanel.addContent(oItem);
|
|
411
|
+
} else {
|
|
412
|
+
oSubGroup = oItem.getItems()[0];
|
|
413
|
+
oSubGroup._subItems = [];
|
|
414
|
+
//add the iconTabFilter into the existed iconTabBar
|
|
415
|
+
nIconTabBar.addItem(oItem.getItems()[0]);
|
|
416
|
+
//remove the unnecessary iconTabBar
|
|
417
|
+
oItem.destroy();
|
|
418
|
+
}
|
|
419
|
+
} else {
|
|
420
|
+
oSubGroup = oItem;
|
|
421
|
+
oSubGroup._subItems = [];
|
|
422
|
+
oSubGroup.addStyleClass("sapUiIntegrationEditorSubGroup");
|
|
423
|
+
}
|
|
351
424
|
} else {
|
|
352
425
|
if (oPanel) {
|
|
353
426
|
//add current col fields to previous panel, then empty the col fields list
|
|
354
427
|
addColFields();
|
|
355
428
|
//render previous panel
|
|
356
429
|
renderPanel(oPanel);
|
|
357
|
-
|
|
430
|
+
oSubGroup = null;
|
|
358
431
|
}
|
|
359
432
|
oPanel = oItem;
|
|
360
433
|
oPanel._subItems = [];
|
|
@@ -369,17 +442,17 @@ sap.ui.define([
|
|
|
369
442
|
}
|
|
370
443
|
// add style class for the hint under group and checkbox/toggle
|
|
371
444
|
if (oItem.isA("sap.m.FormattedText")) {
|
|
372
|
-
if (
|
|
373
|
-
|
|
445
|
+
if (oSubGroup) {
|
|
446
|
+
oSubGroup.addContent(oItem.addStyleClass("sapUiIntegrationEditorHint"));
|
|
374
447
|
} else {
|
|
375
448
|
oPanel.addContent(oItem.addStyleClass("sapUiIntegrationEditorHint"));
|
|
376
449
|
}
|
|
377
450
|
if (i === aItems.length - 1) {
|
|
378
|
-
if (
|
|
451
|
+
if (oSubGroup) {
|
|
379
452
|
//add current col fields to previous sub panel, then empty the col fields list
|
|
380
|
-
|
|
453
|
+
addColFieldsOfSubGroup();
|
|
381
454
|
//add sub panel to panel
|
|
382
|
-
addSubPanel(oPanel,
|
|
455
|
+
addSubPanel(oPanel, oSubGroup);
|
|
383
456
|
}
|
|
384
457
|
//add current col fields to panel, then empty the col fields list
|
|
385
458
|
addColFields();
|
|
@@ -400,18 +473,18 @@ sap.ui.define([
|
|
|
400
473
|
//if cols === 1 and reach the col size, add the col fields to panel, then empty the col fields list
|
|
401
474
|
//if cols === 2, add the col fields to panel, then empty the col fields list
|
|
402
475
|
if (oItem._cols === 2) {
|
|
403
|
-
if (
|
|
404
|
-
|
|
476
|
+
if (oSubGroup) {
|
|
477
|
+
addColFieldsOfSubGroup();
|
|
405
478
|
} else {
|
|
406
479
|
addColFields();
|
|
407
480
|
}
|
|
408
|
-
} else if (
|
|
409
|
-
|
|
481
|
+
} else if (oColFieldsOfSubGroup.length === 2) {
|
|
482
|
+
addColFieldsOfSubGroup();
|
|
410
483
|
} else if (oColFields.length === 2) {
|
|
411
484
|
addColFields();
|
|
412
485
|
}
|
|
413
|
-
if (
|
|
414
|
-
|
|
486
|
+
if (oSubGroup) {
|
|
487
|
+
oSubGroup.addContent(oItem);
|
|
415
488
|
} else {
|
|
416
489
|
oPanel.addContent(oItem);
|
|
417
490
|
}
|
|
@@ -422,9 +495,9 @@ sap.ui.define([
|
|
|
422
495
|
} else {
|
|
423
496
|
oItem.addStyleClass("sapUiIntegrationEditorSpacerWithoutLine");
|
|
424
497
|
}
|
|
425
|
-
if (
|
|
426
|
-
|
|
427
|
-
|
|
498
|
+
if (oSubGroup) {
|
|
499
|
+
addColFieldsOfSubGroup();
|
|
500
|
+
oSubGroup.addContent(oItem);
|
|
428
501
|
} else {
|
|
429
502
|
addColFields();
|
|
430
503
|
oPanel.addContent(oItem);
|
|
@@ -544,11 +617,11 @@ sap.ui.define([
|
|
|
544
617
|
]
|
|
545
618
|
});
|
|
546
619
|
}
|
|
547
|
-
//render
|
|
620
|
+
//render label and field for NotWrapping parameter
|
|
548
621
|
if (oItem._cols === 1) {
|
|
549
|
-
if (
|
|
550
|
-
if (
|
|
551
|
-
|
|
622
|
+
if (oSubGroup) {
|
|
623
|
+
if (oColFieldsOfSubGroup.length === 2) {
|
|
624
|
+
addColFieldsOfSubGroup();
|
|
552
625
|
}
|
|
553
626
|
if (oConfig.hint) {
|
|
554
627
|
var oHint = oControl._createHint(oConfig.hint);
|
|
@@ -559,10 +632,10 @@ sap.ui.define([
|
|
|
559
632
|
]
|
|
560
633
|
});
|
|
561
634
|
oColVBox.addStyleClass("col1");
|
|
562
|
-
|
|
635
|
+
oColFieldsOfSubGroup.push(oColVBox);
|
|
563
636
|
} else {
|
|
564
637
|
oHBox.addStyleClass("col1");
|
|
565
|
-
|
|
638
|
+
oColFieldsOfSubGroup.push(oHBox);
|
|
566
639
|
}
|
|
567
640
|
} else {
|
|
568
641
|
if (oColFields.length === 2) {
|
|
@@ -583,9 +656,9 @@ sap.ui.define([
|
|
|
583
656
|
oColFields.push(oHBox);
|
|
584
657
|
}
|
|
585
658
|
}
|
|
586
|
-
} else if (
|
|
587
|
-
|
|
588
|
-
|
|
659
|
+
} else if (oSubGroup) {
|
|
660
|
+
addColFieldsOfSubGroup();
|
|
661
|
+
oSubGroup.addContent(oHBox);
|
|
589
662
|
} else {
|
|
590
663
|
addColFields();
|
|
591
664
|
oPanel.addContent(oHBox);
|
|
@@ -593,8 +666,8 @@ sap.ui.define([
|
|
|
593
666
|
oLabelItemForNotWrapping = null;
|
|
594
667
|
} else {
|
|
595
668
|
var oLabel;
|
|
596
|
-
if (
|
|
597
|
-
oLabel =
|
|
669
|
+
if (oSubGroup) {
|
|
670
|
+
oLabel = oSubGroup.getContent().pop();
|
|
598
671
|
} else {
|
|
599
672
|
oLabel = oPanel.getContent().pop();
|
|
600
673
|
}
|
|
@@ -631,21 +704,21 @@ sap.ui.define([
|
|
|
631
704
|
oColVBox.addItem(oHint.addStyleClass("sapUiIntegrationEditorHint"));
|
|
632
705
|
}
|
|
633
706
|
oColVBox.addStyleClass("col1");
|
|
634
|
-
if (
|
|
635
|
-
|
|
707
|
+
if (oSubGroup) {
|
|
708
|
+
oColFieldsOfSubGroup.push(oColVBox);
|
|
636
709
|
} else {
|
|
637
710
|
oColFields.push(oColVBox);
|
|
638
711
|
}
|
|
639
|
-
} else if (
|
|
640
|
-
|
|
641
|
-
|
|
712
|
+
} else if (oSubGroup) {
|
|
713
|
+
oSubGroup.addContent(oLabelFlexBox);
|
|
714
|
+
oSubGroup.addContent(oItem);
|
|
642
715
|
} else {
|
|
643
716
|
oPanel.addContent(oLabelFlexBox);
|
|
644
717
|
oPanel.addContent(oItem);
|
|
645
718
|
}
|
|
646
719
|
}
|
|
647
|
-
if (
|
|
648
|
-
|
|
720
|
+
if (oSubGroup) {
|
|
721
|
+
oSubGroup._subItems.push({
|
|
649
722
|
"settingspath": oItem.getConfiguration()._settingspath,
|
|
650
723
|
"itemId": oItem.getId()
|
|
651
724
|
});
|
|
@@ -656,11 +729,15 @@ sap.ui.define([
|
|
|
656
729
|
});
|
|
657
730
|
}
|
|
658
731
|
if (i === aItems.length - 1) {
|
|
659
|
-
if (
|
|
732
|
+
if (oSubGroup) {
|
|
660
733
|
//add current col fields to previous sub panel, then empty the col fields list
|
|
661
|
-
|
|
734
|
+
addColFieldsOfSubGroup();
|
|
662
735
|
//add sub panel to panel
|
|
663
|
-
|
|
736
|
+
if (oSubGroup.isA("sap.m.Panel")) {
|
|
737
|
+
addSubPanel(oPanel, oSubGroup);
|
|
738
|
+
} else {
|
|
739
|
+
addSubTab(oPanel, oSubGroup);
|
|
740
|
+
}
|
|
664
741
|
}
|
|
665
742
|
//add current col fields to panel, then empty the col fields list
|
|
666
743
|
addColFields();
|
|
@@ -674,22 +751,60 @@ sap.ui.define([
|
|
|
674
751
|
oLanguagePanel.addStyleClass("sapUiIntegrationEditorTranslationPanel");
|
|
675
752
|
continue;
|
|
676
753
|
}
|
|
677
|
-
if (oItem.isA("sap.m.Panel")) {
|
|
678
|
-
if (
|
|
754
|
+
if (oItem.isA("sap.m.Panel") || oItem.isA("sap.m.IconTabBar")) {
|
|
755
|
+
if (oSubGroup) {
|
|
679
756
|
//add sub panel to panel
|
|
680
|
-
|
|
757
|
+
if (oItem.isA("sap.m.Panel") && oSubGroup.isA("sap.m.Panel")) {
|
|
758
|
+
addSubPanel(oPanel, oSubGroup);
|
|
759
|
+
} else {
|
|
760
|
+
addSubTab(oPanel, oSubGroup);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
var tItemLevel = 0;
|
|
764
|
+
if (oItem.isA("sap.m.Panel")) {
|
|
765
|
+
tItemLevel = oItem._level;
|
|
766
|
+
} else if (oItem.isA("sap.m.IconTabBar")) {
|
|
767
|
+
if (oItem.getItems().length > 0 && oItem.getItems()[0]._level) {
|
|
768
|
+
tItemLevel = oItem.getItems()[0]._level;
|
|
769
|
+
}
|
|
681
770
|
}
|
|
682
|
-
if (
|
|
683
|
-
|
|
684
|
-
|
|
771
|
+
if (tItemLevel === "1") {
|
|
772
|
+
if (oItem.isA("sap.m.IconTabBar")) {
|
|
773
|
+
if (i !== aItems.length - 1 || (i < aItems.length && (aItems[i].isA("sap.m.IconTabBar") || aItems[i].isA("sap.m.Panel")))) {
|
|
774
|
+
var tSubItems = oPanel.getContent(),
|
|
775
|
+
tIconTabBarExist = false;
|
|
776
|
+
if (tSubItems.length > 0) {
|
|
777
|
+
for (var l = 0; l < tSubItems.length; l++) {
|
|
778
|
+
if (tSubItems[l].isA("sap.m.IconTabBar")) {
|
|
779
|
+
tIconTabBarExist = true;
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
if (!tIconTabBarExist) {
|
|
784
|
+
oSubGroup = oItem.getItems()[0];
|
|
785
|
+
oItem.removeItem(oItem.getItems()[0]);
|
|
786
|
+
oPanel.addContent(oItem);
|
|
787
|
+
} else {
|
|
788
|
+
oSubGroup = oItem.getItems()[0];
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
} else {
|
|
792
|
+
oSubGroup = oItem;
|
|
793
|
+
oSubGroup.addStyleClass("sapUiIntegrationEditorSubGroup");
|
|
794
|
+
}
|
|
685
795
|
} else {
|
|
686
|
-
|
|
796
|
+
oSubGroup = null;
|
|
687
797
|
//add sub panel if it has content into top panel
|
|
688
798
|
if (oPanel && oPanel.getContent().length > 0) {
|
|
689
799
|
oLanguagePanel.addContent(oPanel);
|
|
690
800
|
}
|
|
691
801
|
oPanel = oItem;
|
|
692
|
-
oPanel.addStyleClass("
|
|
802
|
+
oPanel.addStyleClass("sapUiIntegrationEditorSubGroup");
|
|
803
|
+
}
|
|
804
|
+
if (i === aItems.length - 1) {
|
|
805
|
+
//add current col fields to panel, then empty the col fields list
|
|
806
|
+
addColFields();
|
|
807
|
+
renderPanel(oPanel);
|
|
693
808
|
}
|
|
694
809
|
continue;
|
|
695
810
|
}
|
|
@@ -700,8 +815,8 @@ sap.ui.define([
|
|
|
700
815
|
continue;
|
|
701
816
|
}
|
|
702
817
|
if (oItem.isA("sap.m.Label")) {
|
|
703
|
-
if (
|
|
704
|
-
|
|
818
|
+
if (oSubGroup) {
|
|
819
|
+
oSubGroup.addContent(oItem);
|
|
705
820
|
} else {
|
|
706
821
|
oPanel.addContent(oItem);
|
|
707
822
|
}
|
|
@@ -720,15 +835,19 @@ sap.ui.define([
|
|
|
720
835
|
oItem
|
|
721
836
|
]
|
|
722
837
|
}).addStyleClass("notWrappingRow");
|
|
723
|
-
if (
|
|
724
|
-
|
|
838
|
+
if (oSubGroup) {
|
|
839
|
+
oSubGroup.addContent(oHBox);
|
|
725
840
|
} else {
|
|
726
841
|
oPanel.addContent(oHBox);
|
|
727
842
|
}
|
|
728
843
|
if (i === aItems.length - 1) {
|
|
729
|
-
if (
|
|
844
|
+
if (oSubGroup) {
|
|
730
845
|
//add sub panel to panel
|
|
731
|
-
|
|
846
|
+
if (oSubGroup.isA("sap.m.Panel")) {
|
|
847
|
+
addSubPanel(oPanel, oSubGroup);
|
|
848
|
+
} else {
|
|
849
|
+
addSubTab(oPanel, oSubGroup);
|
|
850
|
+
}
|
|
732
851
|
}
|
|
733
852
|
oLanguagePanel.addContent(oPanel);
|
|
734
853
|
}
|
|
@@ -773,7 +892,7 @@ sap.ui.define([
|
|
|
773
892
|
* @experimental since 1.94
|
|
774
893
|
* @public
|
|
775
894
|
* @author SAP SE
|
|
776
|
-
* @version 1.
|
|
895
|
+
* @version 1.102.0
|
|
777
896
|
* @borrows sap.ui.integration.editor.Editor#getParameters as getParameters
|
|
778
897
|
* @borrows sap.ui.integration.editor.Editor#resolveDestination as resolveDestination
|
|
779
898
|
* @borrows sap.ui.integration.editor.Editor#request as request
|
|
@@ -1189,6 +1308,8 @@ sap.ui.define([
|
|
|
1189
1308
|
var oTranslationChange = {
|
|
1190
1309
|
"texts": {}
|
|
1191
1310
|
};
|
|
1311
|
+
// delete the error texts property
|
|
1312
|
+
delete oChange.texts;
|
|
1192
1313
|
oTranslationChange.texts[sLanguage] = {};
|
|
1193
1314
|
Object.keys(oChange).forEach(function (s) {
|
|
1194
1315
|
if (s.charAt(0) === "/") {
|
|
@@ -1344,14 +1465,38 @@ sap.ui.define([
|
|
|
1344
1465
|
if (oItem.translatable && !oItem._changed && oItem._translatedPlaceholder && !this._currentLayerManifestChanges[oItem.manifestpath]) {
|
|
1345
1466
|
//do not save a value that was not changed and comes from a translated default value
|
|
1346
1467
|
//mResult[oItem.manifestpath] = oItem._translatedPlaceholder;
|
|
1347
|
-
//
|
|
1348
|
-
continue;
|
|
1468
|
+
//but we need to save the setting changes for the next layer, so remove the continue sentence.
|
|
1469
|
+
//continue;
|
|
1349
1470
|
} else {
|
|
1350
1471
|
if (oItem.valueItems) {
|
|
1351
1472
|
mResult[oItem.manifestpath.substring(0, oItem.manifestpath.lastIndexOf("/")) + "/valueItems"] = oItem.valueItems;
|
|
1352
1473
|
}
|
|
1353
|
-
if (oItem.
|
|
1354
|
-
mResult[oItem.manifestpath] = oItem.
|
|
1474
|
+
if (oItem.valueTokens) {
|
|
1475
|
+
mResult[oItem.manifestpath.substring(0, oItem.manifestpath.lastIndexOf("/")) + "/valueTokens"] = oItem.valueTokens;
|
|
1476
|
+
}
|
|
1477
|
+
switch (oItem.type) {
|
|
1478
|
+
case "string":
|
|
1479
|
+
if (!oItem.translatable) {
|
|
1480
|
+
mResult[oItem.manifestpath] = oItem.value;
|
|
1481
|
+
} else if (oItem._hasDynamicValue) {
|
|
1482
|
+
// if value is dynamic value of a translatable parameter, save it and delete all the current translations
|
|
1483
|
+
mResult[oItem.manifestpath] = oItem.value;
|
|
1484
|
+
this.deleteAllTranslationValuesInTexts(oItem.manifestpath);
|
|
1485
|
+
} else if (oItem._beforeValue && (oItem._beforeValue.indexOf("{context>") === 0 || oItem._beforeValue.indexOf("{{parameters") === 0)) {
|
|
1486
|
+
// if before value is dynamic value of a translatable parameter, save it
|
|
1487
|
+
mResult[oItem.manifestpath] = oItem.value;
|
|
1488
|
+
}
|
|
1489
|
+
break;
|
|
1490
|
+
case "group":
|
|
1491
|
+
break;
|
|
1492
|
+
case "object":
|
|
1493
|
+
case "object[]":
|
|
1494
|
+
if (oItem.value && oItem.value !== "") {
|
|
1495
|
+
mResult[oItem.manifestpath] = oItem.value;
|
|
1496
|
+
}
|
|
1497
|
+
break;
|
|
1498
|
+
default:
|
|
1499
|
+
mResult[oItem.manifestpath] = oItem.value;
|
|
1355
1500
|
}
|
|
1356
1501
|
}
|
|
1357
1502
|
} else if (oItem.translatable && oItem.value) {
|
|
@@ -1381,24 +1526,64 @@ sap.ui.define([
|
|
|
1381
1526
|
}
|
|
1382
1527
|
}
|
|
1383
1528
|
}
|
|
1384
|
-
if (
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1529
|
+
if (this.getMode() === "translation") {
|
|
1530
|
+
// translation mode don't have texts property
|
|
1531
|
+
delete mResult.texts;
|
|
1532
|
+
} else if (oSettings.texts) {
|
|
1533
|
+
mResult.texts = deepClone(oSettings.texts, 500) || {};
|
|
1534
|
+
// Clean the translations of object or object list field :
|
|
1535
|
+
// - remove the translations if the object is not exist in value
|
|
1536
|
+
for (var language in mResult.texts){
|
|
1537
|
+
for (var key in mResult.texts[language]) {
|
|
1538
|
+
if (typeof mResult.texts[language][key] === "object") {
|
|
1539
|
+
var vValue = mResult[key];
|
|
1540
|
+
if (!vValue || typeof vValue !== "object" || deepEqual(vValue, {}) || deepEqual(vValue, [])) {
|
|
1541
|
+
delete mResult.texts[language][key];
|
|
1542
|
+
} else if (Array.isArray(vValue)) {
|
|
1543
|
+
// get all the uuids in value list of object list field
|
|
1544
|
+
var aUUIDs = vValue.map(function (oObject) {
|
|
1545
|
+
return oObject._dt ? oObject._dt._uuid || "" : "";
|
|
1546
|
+
});
|
|
1547
|
+
// delete translation texts if uuid not included in value list
|
|
1548
|
+
for (var uuid in mResult.texts[language][key]) {
|
|
1549
|
+
if (!includes(aUUIDs, uuid)) {
|
|
1550
|
+
delete mResult.texts[language][key][uuid];
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
} else {
|
|
1554
|
+
// get the uuid in the object value of object field
|
|
1555
|
+
var sUUID = vValue._dt ? vValue._dt._uuid || "" : "";
|
|
1556
|
+
if (sUUID !== "") {
|
|
1557
|
+
// only save the translation texts of current uuid
|
|
1558
|
+
var oTranslation = mResult.texts[language][key][sUUID];
|
|
1559
|
+
if (!oTranslation) {
|
|
1560
|
+
delete mResult.texts[language][key];
|
|
1561
|
+
} else {
|
|
1562
|
+
mResult.texts[language][key] = {};
|
|
1563
|
+
mResult.texts[language][key][sUUID] = oTranslation;
|
|
1564
|
+
}
|
|
1565
|
+
} else {
|
|
1566
|
+
delete mResult.texts[language][key];
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
if (deepEqual(mResult.texts[language], {})) {
|
|
1572
|
+
delete mResult.texts[language];
|
|
1390
1573
|
}
|
|
1391
1574
|
}
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
mResult[":multipleLanguage"] = true;
|
|
1575
|
+
if (deepEqual(mResult.texts, {})) {
|
|
1576
|
+
delete mResult.texts;
|
|
1577
|
+
}
|
|
1396
1578
|
}
|
|
1397
1579
|
mResult[":layer"] = Merger.layers[this.getMode()];
|
|
1398
1580
|
mResult[":errors"] = this.checkCurrentSettings()[":errors"];
|
|
1399
1581
|
if (mNext) {
|
|
1400
1582
|
mResult[":designtime"] = mNext;
|
|
1401
1583
|
}
|
|
1584
|
+
if (oSettings[":designtime"]) {
|
|
1585
|
+
mResult[":designtime"] = merge(mResult[":designtime"], oSettings[":designtime"]);
|
|
1586
|
+
}
|
|
1402
1587
|
return mResult;
|
|
1403
1588
|
};
|
|
1404
1589
|
/**
|
|
@@ -1591,12 +1776,14 @@ sap.ui.define([
|
|
|
1591
1776
|
//map editors for a specific type
|
|
1592
1777
|
Editor.fieldMap = {
|
|
1593
1778
|
"string": "sap/ui/integration/editor/fields/StringField",
|
|
1779
|
+
"string[]": "sap/ui/integration/editor/fields/StringListField",
|
|
1594
1780
|
"integer": "sap/ui/integration/editor/fields/IntegerField",
|
|
1595
1781
|
"number": "sap/ui/integration/editor/fields/NumberField",
|
|
1596
1782
|
"boolean": "sap/ui/integration/editor/fields/BooleanField",
|
|
1597
1783
|
"date": "sap/ui/integration/editor/fields/DateField",
|
|
1598
1784
|
"datetime": "sap/ui/integration/editor/fields/DateTimeField",
|
|
1599
|
-
"
|
|
1785
|
+
"object": "sap/ui/integration/editor/fields/ObjectField",
|
|
1786
|
+
"object[]": "sap/ui/integration/editor/fields/ObjectListField",
|
|
1600
1787
|
"destination": "sap/ui/integration/editor/fields/DestinationField"
|
|
1601
1788
|
};
|
|
1602
1789
|
Editor.Fields = null;
|
|
@@ -1818,8 +2005,8 @@ sap.ui.define([
|
|
|
1818
2005
|
}
|
|
1819
2006
|
}.bind(this)));
|
|
1820
2007
|
//listen to value changes on the settings
|
|
1821
|
-
|
|
1822
|
-
|
|
2008
|
+
oField._oValueBinding = this._settingsModel.bindProperty(oConfig._settingspath + "/value");
|
|
2009
|
+
oField._oValueBinding.attachChange(function () {
|
|
1823
2010
|
if (!this._bIgnoreUpdates) {
|
|
1824
2011
|
oConfig._changed = true;
|
|
1825
2012
|
if (oConfig._dependentFields && oConfig._dependentFields.length > 0) {
|
|
@@ -1838,6 +2025,10 @@ sap.ui.define([
|
|
|
1838
2025
|
}.bind(this));
|
|
1839
2026
|
}
|
|
1840
2027
|
if (oConfig.values) {
|
|
2028
|
+
// load metadata
|
|
2029
|
+
if (oConfig.values.metadata) {
|
|
2030
|
+
this._addMetadataModel(oConfig, oField);
|
|
2031
|
+
}
|
|
1841
2032
|
// for MultiInput used in string[] field with filter backend, do not request data when creating it
|
|
1842
2033
|
if (oConfig.type === "string[]" && oField.isFilterBackend() && oConfig.visualization && oConfig.visualization.type === "MultiInput") {
|
|
1843
2034
|
oField.setModel(new JSONModel({}), undefined);
|
|
@@ -1852,7 +2043,7 @@ sap.ui.define([
|
|
|
1852
2043
|
}
|
|
1853
2044
|
oField._oDataProviderFactory = this._oDataProviderFactory;
|
|
1854
2045
|
oField.setAssociation("_messageStrip", MessageStripId);
|
|
1855
|
-
oField.
|
|
2046
|
+
oField._previewPosition = this.getPreviewPosition();
|
|
1856
2047
|
return oField;
|
|
1857
2048
|
};
|
|
1858
2049
|
|
|
@@ -1892,7 +2083,7 @@ sap.ui.define([
|
|
|
1892
2083
|
/**
|
|
1893
2084
|
* request data via data provider in RT
|
|
1894
2085
|
* @param {object} oConfig
|
|
1895
|
-
* @param {BaseField} oField
|
|
2086
|
+
* @param {sap.ui.integration.editor.fields.BaseField} oField
|
|
1896
2087
|
*/
|
|
1897
2088
|
Editor.prototype._requestData = function (oConfig, oField) {
|
|
1898
2089
|
var oDataProvider = this._oDataProviderFactory.create(oConfig.values.data);
|
|
@@ -1928,6 +2119,13 @@ sap.ui.define([
|
|
|
1928
2119
|
} else {
|
|
1929
2120
|
tResult = oData;
|
|
1930
2121
|
}
|
|
2122
|
+
if (oConfig.type === "object" || oConfig.type === "object[]") {
|
|
2123
|
+
tResult.forEach(function (oResult) {
|
|
2124
|
+
oResult._dt = {
|
|
2125
|
+
_editable: false
|
|
2126
|
+
};
|
|
2127
|
+
});
|
|
2128
|
+
}
|
|
1931
2129
|
if (this.getMode() === "content" && oConfig.pageAdminValues && oConfig.pageAdminValues.length > 0) {
|
|
1932
2130
|
var paValues = oConfig.pageAdminValues,
|
|
1933
2131
|
selValues = oConfig.value,
|
|
@@ -1975,7 +2173,7 @@ sap.ui.define([
|
|
|
1975
2173
|
oData = results;
|
|
1976
2174
|
}
|
|
1977
2175
|
}
|
|
1978
|
-
//add group property "Selected" to each record for MultiComboBox in
|
|
2176
|
+
//add group property "Selected" to each record for MultiComboBox in StringListField
|
|
1979
2177
|
//user configration of the field since its value maybe changed
|
|
1980
2178
|
var oFieldConfig = oField.getConfiguration();
|
|
1981
2179
|
if (oConfig.type === "string[]") {
|
|
@@ -2018,6 +2216,9 @@ sap.ui.define([
|
|
|
2018
2216
|
oValueModel.firePropertyChange();
|
|
2019
2217
|
this._settingsModel.setProperty(oConfig._settingspath + "/_loading", false);
|
|
2020
2218
|
oField._hideValueState(true, true);
|
|
2219
|
+
if (oConfig.type === "object" || oConfig.type === "object[]") {
|
|
2220
|
+
oField.mergeValueWithRequestResult(tResult);
|
|
2221
|
+
}
|
|
2021
2222
|
}.bind(this)).catch(function (oError) {
|
|
2022
2223
|
this._settingsModel.setProperty(oConfig._settingspath + "/_loading", false);
|
|
2023
2224
|
var sError = this._oResourceBundle.getText("EDITOR_BAD_REQUEST");
|
|
@@ -2044,6 +2245,9 @@ sap.ui.define([
|
|
|
2044
2245
|
}
|
|
2045
2246
|
var oValueModel = oField.getModel();
|
|
2046
2247
|
oValueModel.firePropertyChange();
|
|
2248
|
+
if (oConfig.type === "object" || oConfig.type === "object[]") {
|
|
2249
|
+
oField.mergeValueWithRequestResult();
|
|
2250
|
+
}
|
|
2047
2251
|
oField._showValueState("error", sError, true);
|
|
2048
2252
|
}.bind(this));
|
|
2049
2253
|
};
|
|
@@ -2129,7 +2333,7 @@ sap.ui.define([
|
|
|
2129
2333
|
/**
|
|
2130
2334
|
* Creates a unnamed model if a values.data section exists in the configuration
|
|
2131
2335
|
* @param {object} oConfig
|
|
2132
|
-
* @param {BaseField} oField
|
|
2336
|
+
* @param {sap.ui.integration.editor.fields.BaseField} oField
|
|
2133
2337
|
*/
|
|
2134
2338
|
Editor.prototype._addValueListModel = function (oConfig, oField, nTimeout) {
|
|
2135
2339
|
if (oConfig.values) {
|
|
@@ -2191,6 +2395,38 @@ sap.ui.define([
|
|
|
2191
2395
|
}
|
|
2192
2396
|
};
|
|
2193
2397
|
|
|
2398
|
+
/**
|
|
2399
|
+
* Creates a meta model if a values.metadata section exists in the configuration
|
|
2400
|
+
* @param {object} oConfig
|
|
2401
|
+
* @param {sap.ui.integration.editor.fields.BaseField} oField
|
|
2402
|
+
*/
|
|
2403
|
+
Editor.prototype._addMetadataModel = function (oConfig, oField) {
|
|
2404
|
+
if (oConfig.values && oConfig.values.metadata) {
|
|
2405
|
+
var oRequestDefaultParameters = {
|
|
2406
|
+
"synchronizationMode": "None"
|
|
2407
|
+
};
|
|
2408
|
+
oRequestDefaultParameters = merge(oRequestDefaultParameters, oConfig.values.metadata.request);
|
|
2409
|
+
|
|
2410
|
+
var oRequest = {
|
|
2411
|
+
url: oRequestDefaultParameters.serviceUrl
|
|
2412
|
+
};
|
|
2413
|
+
var pRequestChain = Promise.resolve(oRequest);
|
|
2414
|
+
if (this._oDestinations) {
|
|
2415
|
+
pRequestChain = this._oDestinations.process(oRequest);
|
|
2416
|
+
}
|
|
2417
|
+
pRequestChain.then(function(oData) {
|
|
2418
|
+
if (!oData.url.endsWith("/")) {
|
|
2419
|
+
oData.url = oData.url + "/";
|
|
2420
|
+
}
|
|
2421
|
+
oRequestDefaultParameters.serviceUrl = oData.url;
|
|
2422
|
+
var oMetaDataModel = new ODataModel(oRequestDefaultParameters);
|
|
2423
|
+
oMetaDataModel.oMetaModel.fetchData().then(function(oMetaData) {
|
|
2424
|
+
oField.setModel(new JSONModel(oMetaData), "meta");
|
|
2425
|
+
});
|
|
2426
|
+
});
|
|
2427
|
+
}
|
|
2428
|
+
};
|
|
2429
|
+
|
|
2194
2430
|
Editor.prototype._createDependentFields = function (oConfig, oField) {
|
|
2195
2431
|
if (oConfig.values) {
|
|
2196
2432
|
var sData = JSON.stringify(oConfig.values.data);
|
|
@@ -2229,25 +2465,91 @@ sap.ui.define([
|
|
|
2229
2465
|
}
|
|
2230
2466
|
};
|
|
2231
2467
|
|
|
2232
|
-
Editor.prototype.getBeforeLayerChange = function (
|
|
2468
|
+
Editor.prototype.getBeforeLayerChange = function (sManifestPath) {
|
|
2233
2469
|
if (!this._beforeLayerManifestChanges) {
|
|
2234
2470
|
this._beforeLayerManifestChanges = {};
|
|
2235
2471
|
}
|
|
2236
|
-
return this._beforeLayerManifestChanges[
|
|
2472
|
+
return this._beforeLayerManifestChanges[sManifestPath];
|
|
2237
2473
|
};
|
|
2238
2474
|
|
|
2239
|
-
Editor.prototype.getTranslationValueInTexts = function (sLanguage,
|
|
2475
|
+
Editor.prototype.getTranslationValueInTexts = function (sLanguage, sManifestPath) {
|
|
2240
2476
|
var sTranslationPath = "/texts/" + sLanguage;
|
|
2241
2477
|
var oProperty = this._settingsModel.getProperty(sTranslationPath) || {};
|
|
2242
|
-
return oProperty[
|
|
2478
|
+
return oProperty[sManifestPath];
|
|
2479
|
+
};
|
|
2480
|
+
|
|
2481
|
+
Editor.prototype.deleteAllTranslationValuesInTexts = function (sManifestPath) {
|
|
2482
|
+
var that = this;
|
|
2483
|
+
var oData = that._settingsModel.getData();
|
|
2484
|
+
if (!oData || !oData.texts) {
|
|
2485
|
+
return;
|
|
2486
|
+
}
|
|
2487
|
+
var sTranslationPath = "/texts";
|
|
2488
|
+
var oTexts = deepClone(oData.texts, 500);
|
|
2489
|
+
for (var n in oTexts) {
|
|
2490
|
+
if (oTexts[n][sManifestPath]) {
|
|
2491
|
+
delete oTexts[n][sManifestPath];
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
this._settingsModel.setProperty(sTranslationPath, oTexts);
|
|
2495
|
+
};
|
|
2496
|
+
|
|
2497
|
+
Editor.prototype._handleITBValidation = function (oEditor, sItem, sErrorType) {
|
|
2498
|
+
var oResourceBundle = oEditor._oResourceBundle;
|
|
2499
|
+
if (sItem.getItems().length > 0 && sItem._oExpandButton) {
|
|
2500
|
+
var expandBTN = sItem._oExpandButton;
|
|
2501
|
+
var errorMSG = null;
|
|
2502
|
+
if (sErrorType === "Error") {
|
|
2503
|
+
errorMSG = oResourceBundle.getText("EDITOR_GROUP_ERRORS");
|
|
2504
|
+
expandBTN.setIcon("sap-icon://message-error");
|
|
2505
|
+
expandBTN.addStyleClass("errorBTNImage");
|
|
2506
|
+
} else if (sErrorType === "Warning") {
|
|
2507
|
+
errorMSG = oResourceBundle.getText("EDITOR_GROUP_WARNINGS");
|
|
2508
|
+
expandBTN.setIcon("sap-icon://message-warning");
|
|
2509
|
+
expandBTN.addStyleClass("warningBTNImage");
|
|
2510
|
+
}
|
|
2511
|
+
//remove expandButton addtional information
|
|
2512
|
+
expandBTN.setTooltip(null);
|
|
2513
|
+
expandBTN.addEventDelegate({
|
|
2514
|
+
onAfterRendering: function(oEvent) {
|
|
2515
|
+
var eExpandBTN = document.getElementById(expandBTN.getId());
|
|
2516
|
+
eExpandBTN.setAttribute("aria-label", "With validation errors");
|
|
2517
|
+
eExpandBTN.setAttribute("title", "");
|
|
2518
|
+
}
|
|
2519
|
+
});
|
|
2520
|
+
expandBTN.setEnabled(false);
|
|
2521
|
+
expandBTN.addStyleClass("errorBTN").addStyleClass("errorBTNDisabled");
|
|
2522
|
+
var iITBar = expandBTN.getParent().getParent().getParent();
|
|
2523
|
+
var iMessageStrip = Core.byId(iITBar.getId() + "_strip");
|
|
2524
|
+
expandBTN.addEventDelegate({
|
|
2525
|
+
onmouseover: function() {
|
|
2526
|
+
iMessageStrip.setVisible(true);
|
|
2527
|
+
iMessageStrip.setType(sErrorType);
|
|
2528
|
+
iMessageStrip.setText(errorMSG);
|
|
2529
|
+
},
|
|
2530
|
+
onmouseout: function() {
|
|
2531
|
+
iMessageStrip.setVisible(false);
|
|
2532
|
+
}
|
|
2533
|
+
}, oEditor);
|
|
2534
|
+
}
|
|
2535
|
+
};
|
|
2536
|
+
|
|
2537
|
+
Editor.prototype._delayHandleITBValidation = function(oEditor,oItem, sErrorType) {
|
|
2538
|
+
var checkExpandBTNExist = setInterval(function() {
|
|
2539
|
+
if (oItem._oExpandButton) {
|
|
2540
|
+
oEditor._handleITBValidation(oEditor, oItem, sErrorType);
|
|
2541
|
+
clearInterval(checkExpandBTNExist);
|
|
2542
|
+
}
|
|
2543
|
+
}, 50);
|
|
2243
2544
|
};
|
|
2244
2545
|
|
|
2245
2546
|
/**
|
|
2246
2547
|
* Adds an item to the _formContent aggregation based on the config settings
|
|
2247
2548
|
* @param {} oConfig
|
|
2248
2549
|
*/
|
|
2249
|
-
|
|
2250
|
-
var sMode = this.getMode()
|
|
2550
|
+
Editor.prototype._addItem = function (oConfig) {
|
|
2551
|
+
var sMode = this.getMode(),
|
|
2552
|
+
that = this;
|
|
2251
2553
|
//force to turn off features for settings and dynamic values and set the default if not configured
|
|
2252
2554
|
if (this.getAllowDynamicValues() === false || !oConfig.allowDynamicValues) {
|
|
2253
2555
|
oConfig.allowDynamicValues = false;
|
|
@@ -2261,154 +2563,276 @@ sap.ui.define([
|
|
|
2261
2563
|
if (oConfig.visible === false || (!oConfig.translatable && sMode === "translation" && oConfig.type !== "group")) {
|
|
2262
2564
|
return;
|
|
2263
2565
|
}
|
|
2566
|
+
//display subPanel as iconTabBar or Panel
|
|
2264
2567
|
if (oConfig.type === "group") {
|
|
2265
2568
|
oConfig.expanded = oConfig.expanded !== false;
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2569
|
+
if (oConfig.visualization && oConfig.visualization.type === "Tab") {
|
|
2570
|
+
var oIconTabBar = new IconTabBar({
|
|
2571
|
+
expandable: oConfig.expandable !== false,
|
|
2572
|
+
visible: oConfig.visible,
|
|
2573
|
+
expanded: "{currentSettings>expanded}",
|
|
2574
|
+
objectBindings: {
|
|
2575
|
+
currentSettings: {
|
|
2576
|
+
path: "currentSettings>" + oConfig._settingspath
|
|
2577
|
+
},
|
|
2578
|
+
items: {
|
|
2579
|
+
path: "items>/form/items"
|
|
2580
|
+
},
|
|
2581
|
+
context: {
|
|
2582
|
+
path: "context>/"
|
|
2583
|
+
}
|
|
2279
2584
|
},
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
sErrorType
|
|
2585
|
+
select: function (oEvent) {
|
|
2586
|
+
var oControl = oEvent.getSource(),
|
|
2587
|
+
oSelectITFKey = oControl.getSelectedKey(),
|
|
2588
|
+
aItems = oControl.getItems(),
|
|
2589
|
+
vExpanded = oControl.getExpanded(),
|
|
2590
|
+
vShowErrors = false;
|
|
2591
|
+
for (var n = 0; n < aItems.length; n++) {
|
|
2592
|
+
if (!vExpanded) {
|
|
2593
|
+
vShowErrors = true;
|
|
2594
|
+
} else if (aItems[n].getId() !== oSelectITFKey) {
|
|
2595
|
+
vShowErrors = true;
|
|
2596
|
+
} else if (aItems[n].getId() === oSelectITFKey) {
|
|
2597
|
+
vShowErrors = false;
|
|
2598
|
+
}
|
|
2599
|
+
if (vShowErrors) {
|
|
2600
|
+
var bHasError = false,
|
|
2601
|
+
sErrorType = "None";
|
|
2602
|
+
if (aItems[n]._subItems && aItems[n]._subItems.length > 0) {
|
|
2603
|
+
var oCurrentSettingsModel = aItems[n].getModel("currentSettings");
|
|
2604
|
+
for (var i = 0; i < aItems[n]._subItems.length; i++) {
|
|
2605
|
+
var sSettingsPath = aItems[n]._subItems[i].settingspath;
|
|
2606
|
+
var oItem = Core.byId(aItems[n]._subItems[i].itemId);
|
|
2607
|
+
if (oCurrentSettingsModel.getProperty(sSettingsPath + "/hasError") === true && oItem.getVisible()) {
|
|
2608
|
+
bHasError = true;
|
|
2609
|
+
var sType = oCurrentSettingsModel.getProperty(sSettingsPath + "/errorType");
|
|
2610
|
+
if (sType === "Error") {
|
|
2611
|
+
sErrorType = "Error";
|
|
2612
|
+
break;
|
|
2613
|
+
} else if (sType === "Warning" && sErrorType !== "Error") {
|
|
2614
|
+
sErrorType = "Warning";
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
}
|
|
2618
|
+
oCurrentSettingsModel.setProperty("hasError", bHasError, oControl.getBindingContext("currentSettings"));
|
|
2619
|
+
oCurrentSettingsModel.setProperty("errorType", sErrorType, oControl.getBindingContext("currentSettings"));
|
|
2620
|
+
}
|
|
2621
|
+
if (bHasError) {
|
|
2622
|
+
var vITF = new IconTabFilter(),
|
|
2623
|
+
aItem = aItems[n];
|
|
2624
|
+
if (aItem.getItems().length > 0) {
|
|
2625
|
+
aItem.removeAllItems();
|
|
2626
|
+
}
|
|
2627
|
+
aItem.addItem(vITF);
|
|
2628
|
+
that._handleITBValidation(that, aItem, sErrorType);
|
|
2629
|
+
if (aItem._oExpandButton === undefined) {
|
|
2630
|
+
that._delayHandleITBValidation(that, aItem, sErrorType);
|
|
2631
|
+
} else {
|
|
2632
|
+
that._handleITBValidation(that, aItem, sErrorType);
|
|
2633
|
+
}
|
|
2634
|
+
}
|
|
2635
|
+
} else if (aItems[n].getItems().length > 0) {
|
|
2636
|
+
aItems[n].removeItem(aItems[n].getItems()[0]);
|
|
2637
|
+
if (aItems[n]._oExpandButton) {
|
|
2638
|
+
aItems[n]._oExpandButton.visible = false;
|
|
2315
2639
|
}
|
|
2640
|
+
//handle error message for fields
|
|
2641
|
+
var tMessageStrip = oControl.getParent().getParent().getAggregation("_messageStrip");
|
|
2642
|
+
if (tMessageStrip === null) {
|
|
2643
|
+
tMessageStrip = Core.byId(MessageStripId);
|
|
2644
|
+
}
|
|
2645
|
+
aItems[n].addContent(tMessageStrip);
|
|
2316
2646
|
}
|
|
2317
2647
|
}
|
|
2318
|
-
oCurrentSettingsModel.setProperty("hasError", bHasError, oControl.getBindingContext("currentSettings"));
|
|
2319
|
-
oCurrentSettingsModel.setProperty("errorType", sErrorType, oControl.getBindingContext("currentSettings"));
|
|
2320
2648
|
}
|
|
2321
|
-
}
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
var oMessage = new MessageStrip({
|
|
2326
|
-
showIcon: false,
|
|
2327
|
-
text: {
|
|
2328
|
-
path: 'currentSettings>errorType',
|
|
2329
|
-
formatter: function (errorType) {
|
|
2330
|
-
var sPanelTitle = "";
|
|
2331
|
-
switch (errorType) {
|
|
2332
|
-
case "Error":
|
|
2333
|
-
sPanelTitle = oResourceBundle.getText("EDITOR_GROUP_ERRORS");
|
|
2334
|
-
break;
|
|
2335
|
-
case "Warning":
|
|
2336
|
-
sPanelTitle = oResourceBundle.getText("EDITOR_GROUP_WARNINGS");
|
|
2337
|
-
break;
|
|
2338
|
-
default:
|
|
2339
|
-
}
|
|
2340
|
-
return sPanelTitle;
|
|
2341
|
-
}
|
|
2342
|
-
},
|
|
2343
|
-
type: "{currentSettings>errorType}",
|
|
2344
|
-
visible: "{= !${currentSettings>expanded} && ${currentSettings>hasError} === true}"
|
|
2345
|
-
}).addStyleClass("sapUiIntegrationEditorPanelMessageStrip");
|
|
2346
|
-
var oHeaderToolbar = new OverflowToolbar({
|
|
2347
|
-
content: [
|
|
2348
|
-
new Title({
|
|
2349
|
-
text: oConfig.label
|
|
2350
|
-
}),
|
|
2351
|
-
new Separator(),
|
|
2352
|
-
oMessage
|
|
2353
|
-
]
|
|
2354
|
-
}).addStyleClass("sapUiIntegrationEditorPanelHeader");
|
|
2355
|
-
oPanel.setHeaderToolbar(oHeaderToolbar);
|
|
2356
|
-
*/
|
|
2357
|
-
var oResourceBundle = this._oResourceBundle;
|
|
2358
|
-
var oMessageStripOfPanel = new MessageStrip({
|
|
2359
|
-
showIcon: false,
|
|
2360
|
-
visible: "{= !${currentSettings>expanded} && ${currentSettings>hasError} === true}",
|
|
2361
|
-
text: {
|
|
2362
|
-
path: 'currentSettings>errorType',
|
|
2363
|
-
formatter: function (errorType) {
|
|
2364
|
-
var sPanelTitle = "";
|
|
2365
|
-
switch (errorType) {
|
|
2366
|
-
case "Error":
|
|
2367
|
-
sPanelTitle = oResourceBundle.getText("EDITOR_GROUP_ERRORS");
|
|
2368
|
-
break;
|
|
2369
|
-
case "Warning":
|
|
2370
|
-
sPanelTitle = oResourceBundle.getText("EDITOR_GROUP_WARNINGS");
|
|
2371
|
-
break;
|
|
2372
|
-
default:
|
|
2373
|
-
}
|
|
2374
|
-
return sPanelTitle;
|
|
2375
|
-
}
|
|
2376
|
-
},
|
|
2377
|
-
type: "{currentSettings>errorType}",
|
|
2649
|
+
});
|
|
2650
|
+
var oIconTabFilter = new IconTabFilter({
|
|
2651
|
+
text: oConfig.label,
|
|
2652
|
+
visible: oConfig.visible,
|
|
2378
2653
|
objectBindings: {
|
|
2379
2654
|
currentSettings: {
|
|
2380
2655
|
path: "currentSettings>" + oConfig._settingspath
|
|
2656
|
+
},
|
|
2657
|
+
items: {
|
|
2658
|
+
path: "items>/form/items"
|
|
2659
|
+
},
|
|
2660
|
+
context: {
|
|
2661
|
+
path: "context>/"
|
|
2381
2662
|
}
|
|
2382
2663
|
}
|
|
2383
2664
|
});
|
|
2384
|
-
|
|
2385
|
-
|
|
2665
|
+
oIconTabBar.addItem(oIconTabFilter);
|
|
2666
|
+
oIconTabBar.setBackgroundDesign("Transparent");
|
|
2667
|
+
oIconTabBar.setHeaderBackgroundDesign("Transparent");
|
|
2668
|
+
// oIconTabBar.setHeaderBackgroundDesign("Solid");
|
|
2669
|
+
oIconTabBar.addStyleClass("sapUiIntegrationEditorSubGroup");
|
|
2670
|
+
// oIconTabBar.addStyleClass("sapUiIntegrationEditorSubGroup").addStyleClass("cardEditorIconTabBarBG");
|
|
2671
|
+
// handle messageStrip for tab filter
|
|
2672
|
+
if (sMode !== "translation") {
|
|
2673
|
+
var oMessageStripOfTab = new MessageStrip({
|
|
2674
|
+
id: oIconTabBar.getId() + "_strip",
|
|
2675
|
+
showIcon: false,
|
|
2676
|
+
visible: false
|
|
2677
|
+
});
|
|
2678
|
+
oMessageStripOfTab.addStyleClass("sapUiIntegrationEditorTabMessageStrip");
|
|
2679
|
+
oIconTabBar._messageStrip = oMessageStripOfTab;
|
|
2386
2680
|
}
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2681
|
+
this.addAggregation("_formContent", oIconTabBar);
|
|
2682
|
+
// oIconTabFilter._cols = oConfig.cols || 2; //by default 2 cols
|
|
2683
|
+
oIconTabFilter._level = oConfig.level || 0; //by default 0 level
|
|
2684
|
+
if (oConfig.hint) {
|
|
2685
|
+
this._addHint(oConfig.hint);
|
|
2686
|
+
}
|
|
2687
|
+
return;
|
|
2688
|
+
} else {
|
|
2689
|
+
var oPanel = new Panel({
|
|
2690
|
+
headerText: oConfig.label,
|
|
2691
|
+
visible: oConfig.visible,
|
|
2692
|
+
expandable: oConfig.expandable !== false,
|
|
2693
|
+
expanded: "{currentSettings>expanded}",
|
|
2694
|
+
width: "auto",
|
|
2695
|
+
backgroundDesign: "Transparent",
|
|
2696
|
+
objectBindings: {
|
|
2697
|
+
currentSettings: {
|
|
2698
|
+
path: "currentSettings>" + oConfig._settingspath
|
|
2699
|
+
},
|
|
2700
|
+
items: {
|
|
2701
|
+
path: "items>/form/items"
|
|
2702
|
+
},
|
|
2703
|
+
context: {
|
|
2704
|
+
path: "context>/"
|
|
2705
|
+
}
|
|
2706
|
+
},
|
|
2707
|
+
expand: function (oEvent) {
|
|
2708
|
+
var oControl = oEvent.getSource();
|
|
2709
|
+
var bExpand = oEvent.getParameter("expand");
|
|
2710
|
+
// handle error message strip for field
|
|
2711
|
+
var oMessageStrip = oControl._level === "1" ? oControl.getParent().getParent().getAggregation("_messageStrip") : oControl.getParent().getAggregation("_messageStrip");
|
|
2712
|
+
if (oMessageStrip === null) {
|
|
2713
|
+
oMessageStrip = Core.byId(MessageStripId);
|
|
2714
|
+
}
|
|
2715
|
+
if (!bExpand && oControl._level === "1") {
|
|
2716
|
+
oControl.getParent().addContent(oMessageStrip);
|
|
2717
|
+
oControl.getParent().focus();
|
|
2718
|
+
} else {
|
|
2719
|
+
oControl.addContent(oMessageStrip);
|
|
2720
|
+
oControl.focus();
|
|
2721
|
+
}
|
|
2722
|
+
// handle error message for panel
|
|
2723
|
+
if (!bExpand && oControl._subItems && oControl._subItems.length > 0) {
|
|
2724
|
+
var oCurrentSettingsModel = oControl.getModel("currentSettings");
|
|
2725
|
+
var bHasError = false;
|
|
2726
|
+
var sErrorType = "None";
|
|
2727
|
+
for (var i = 0; i < oControl._subItems.length; i++) {
|
|
2728
|
+
var sSettingsPath = oControl._subItems[i].settingspath;
|
|
2729
|
+
var oItem = Core.byId(oControl._subItems[i].itemId);
|
|
2730
|
+
if (oCurrentSettingsModel.getProperty(sSettingsPath + "/hasError") === true && oItem.getVisible()) {
|
|
2731
|
+
bHasError = true;
|
|
2732
|
+
var sType = oCurrentSettingsModel.getProperty(sSettingsPath + "/errorType");
|
|
2733
|
+
if (sType === "Error") {
|
|
2734
|
+
sErrorType = "Error";
|
|
2735
|
+
break;
|
|
2736
|
+
} else if (sType === "Warning" && sErrorType !== "Error") {
|
|
2737
|
+
sErrorType = "Warning";
|
|
2738
|
+
}
|
|
2739
|
+
}
|
|
2740
|
+
}
|
|
2741
|
+
oCurrentSettingsModel.setProperty("hasError", bHasError, oControl.getBindingContext("currentSettings"));
|
|
2742
|
+
oCurrentSettingsModel.setProperty("errorType", sErrorType, oControl.getBindingContext("currentSettings"));
|
|
2743
|
+
}
|
|
2407
2744
|
}
|
|
2745
|
+
});
|
|
2746
|
+
if (sMode !== "translation") {
|
|
2747
|
+
/*
|
|
2748
|
+
var oMessage = new MessageStrip({
|
|
2749
|
+
showIcon: false,
|
|
2750
|
+
text: {
|
|
2751
|
+
path: 'currentSettings>errorType',
|
|
2752
|
+
formatter: function (errorType) {
|
|
2753
|
+
var sPanelTitle = "";
|
|
2754
|
+
switch (errorType) {
|
|
2755
|
+
case "Error":
|
|
2756
|
+
sPanelTitle = oResourceBundle.getText("EDITOR_GROUP_ERRORS");
|
|
2757
|
+
break;
|
|
2758
|
+
case "Warning":
|
|
2759
|
+
sPanelTitle = oResourceBundle.getText("EDITOR_GROUP_WARNINGS");
|
|
2760
|
+
break;
|
|
2761
|
+
default:
|
|
2762
|
+
}
|
|
2763
|
+
return sPanelTitle;
|
|
2764
|
+
}
|
|
2765
|
+
},
|
|
2766
|
+
type: "{currentSettings>errorType}",
|
|
2767
|
+
visible: "{= !${currentSettings>expanded} && ${currentSettings>hasError} === true}"
|
|
2768
|
+
}).addStyleClass("sapUiIntegrationEditorPanelMessageStrip");
|
|
2769
|
+
var oHeaderToolbar = new OverflowToolbar({
|
|
2770
|
+
content: [
|
|
2771
|
+
new Title({
|
|
2772
|
+
text: oConfig.label
|
|
2773
|
+
}),
|
|
2774
|
+
new Separator(),
|
|
2775
|
+
oMessage
|
|
2776
|
+
]
|
|
2777
|
+
}).addStyleClass("sapUiIntegrationEditorPanelHeader");
|
|
2778
|
+
oPanel.setHeaderToolbar(oHeaderToolbar);
|
|
2779
|
+
*/
|
|
2780
|
+
var oResourceBundle = this._oResourceBundle;
|
|
2781
|
+
var oMessageStripOfPanel = new MessageStrip({
|
|
2782
|
+
showIcon: false,
|
|
2783
|
+
visible: "{= !${currentSettings>expanded} && ${currentSettings>hasError} === true}",
|
|
2784
|
+
text: {
|
|
2785
|
+
path: 'currentSettings>errorType',
|
|
2786
|
+
formatter: function (errorType) {
|
|
2787
|
+
var sPanelTitle = "";
|
|
2788
|
+
switch (errorType) {
|
|
2789
|
+
case "Error":
|
|
2790
|
+
sPanelTitle = oResourceBundle.getText("EDITOR_GROUP_ERRORS");
|
|
2791
|
+
break;
|
|
2792
|
+
case "Warning":
|
|
2793
|
+
sPanelTitle = oResourceBundle.getText("EDITOR_GROUP_WARNINGS");
|
|
2794
|
+
break;
|
|
2795
|
+
default:
|
|
2796
|
+
}
|
|
2797
|
+
return sPanelTitle;
|
|
2798
|
+
}
|
|
2799
|
+
},
|
|
2800
|
+
type: "{currentSettings>errorType}",
|
|
2801
|
+
objectBindings: {
|
|
2802
|
+
currentSettings: {
|
|
2803
|
+
path: "currentSettings>" + oConfig._settingspath
|
|
2804
|
+
}
|
|
2805
|
+
}
|
|
2806
|
+
});
|
|
2807
|
+
if (oConfig.level !== "1") {
|
|
2808
|
+
oMessageStripOfPanel.setModel(this._settingsModel, "currentSettings");
|
|
2809
|
+
}
|
|
2810
|
+
oMessageStripOfPanel.addStyleClass("sapUiIntegrationEditorPanelMessageStrip");
|
|
2811
|
+
oPanel._messageStrip = oMessageStripOfPanel;
|
|
2812
|
+
}/* else {
|
|
2813
|
+
oPanel.setHeaderText(oConfig.label);
|
|
2814
|
+
}*/
|
|
2815
|
+
this.addAggregation("_formContent", oPanel);
|
|
2816
|
+
oPanel._cols = oConfig.cols || 2; //by default 2 cols
|
|
2817
|
+
oPanel._level = oConfig.level || 0; //by default 0 level
|
|
2818
|
+
if (oConfig.hint) {
|
|
2819
|
+
this._addHint(oConfig.hint);
|
|
2408
2820
|
}
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2821
|
+
//add "aria-label" for each panel to make the landmark uniquely
|
|
2822
|
+
var oDelegate = {
|
|
2823
|
+
onAfterRendering: function(oEvent) {
|
|
2824
|
+
var ePanel = document.getElementById(oPanel.getId());
|
|
2825
|
+
ePanel.setAttribute("aria-label", oConfig.label);
|
|
2826
|
+
var oControl = oEvent.srcControl;
|
|
2827
|
+
var oMessageStrip = oControl._messageStrip;
|
|
2828
|
+
if (oControl._level !== "1" && oMessageStrip) {
|
|
2829
|
+
oMessageStrip.rerender();
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2832
|
+
};
|
|
2833
|
+
oPanel.addEventDelegate(oDelegate);
|
|
2834
|
+
return;
|
|
2835
|
+
}
|
|
2412
2836
|
}
|
|
2413
2837
|
if (oConfig.type === "separator") {
|
|
2414
2838
|
var oSeparator = new Separator();
|
|
@@ -2420,6 +2844,9 @@ sap.ui.define([
|
|
|
2420
2844
|
var oNewLabel = null;
|
|
2421
2845
|
var sLanguage = Core.getConfiguration().getLanguage().replaceAll('_', '-');
|
|
2422
2846
|
if (sMode === "translation") {
|
|
2847
|
+
if (oConfig.type !== "string") {
|
|
2848
|
+
return;
|
|
2849
|
+
}
|
|
2423
2850
|
if ((typeof oConfig.value === "string" && oConfig.value.indexOf("{") === 0) || typeof oConfig.values !== "undefined") {
|
|
2424
2851
|
//do not show dynamic values for translation
|
|
2425
2852
|
return;
|
|
@@ -2494,10 +2921,13 @@ sap.ui.define([
|
|
|
2494
2921
|
oConfig.value = this._currentLayerManifestChanges[oConfig.manifestpath];
|
|
2495
2922
|
oConfig._beforeLayerChange = oConfig.value;
|
|
2496
2923
|
}
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2924
|
+
//only get translations of string fields
|
|
2925
|
+
if (oConfig.type === "string") {
|
|
2926
|
+
sLanguage = this._language;
|
|
2927
|
+
var sTranslateText = this.getTranslationValueInTexts(sLanguage, oConfig.manifestpath);
|
|
2928
|
+
if (sTranslateText) {
|
|
2929
|
+
oConfig.value = sTranslateText;
|
|
2930
|
+
}
|
|
2501
2931
|
}
|
|
2502
2932
|
var oField = this._createField(oConfig);
|
|
2503
2933
|
this.addAggregation("_formContent",
|
|
@@ -2690,6 +3120,11 @@ sap.ui.define([
|
|
|
2690
3120
|
sTranslationTextKey = sPlaceholder.substring(6, sPlaceholder.length - 1);
|
|
2691
3121
|
}
|
|
2692
3122
|
}
|
|
3123
|
+
// if the value is a dynamic value, do not allow to translate, and delete all the translations
|
|
3124
|
+
if (oItem.value && (oItem.value.indexOf("{context>") === 0 || oItem.value.indexOf("{{parameters") === 0)) {
|
|
3125
|
+
this.deleteAllTranslationValuesInTexts(oItem.manifestpath);
|
|
3126
|
+
sTranslationTextKey = null;
|
|
3127
|
+
}
|
|
2693
3128
|
var sTranslationValueinTexts = this.getTranslationValueInTexts(sLanguage, oItem.manifestpath);
|
|
2694
3129
|
//only if there is a translation key
|
|
2695
3130
|
if (sTranslationTextKey) {
|
|
@@ -2736,6 +3171,24 @@ sap.ui.define([
|
|
|
2736
3171
|
if (oValueTokens) {
|
|
2737
3172
|
oItem.valueTokens = oValueTokens;
|
|
2738
3173
|
}
|
|
3174
|
+
} else if (typeof oItem.value === "object" && oItem.type === "object") {
|
|
3175
|
+
// backward compatibility for pre saved value
|
|
3176
|
+
if (typeof oItem.value._editable === "boolean") {
|
|
3177
|
+
oItem.value._dt = {
|
|
3178
|
+
"_editable" : oItem.value._editable
|
|
3179
|
+
};
|
|
3180
|
+
delete oItem.value._editable;
|
|
3181
|
+
}
|
|
3182
|
+
} else if (Array.isArray(oItem.value) && oItem.value.length > 0 && oItem.type === "object[]") {
|
|
3183
|
+
// backward compatibility for pre saved value
|
|
3184
|
+
oItem.value.forEach(function (oObject) {
|
|
3185
|
+
if (typeof oObject._editable === "boolean") {
|
|
3186
|
+
oObject._dt = {
|
|
3187
|
+
"_editable" : oObject._editable
|
|
3188
|
+
};
|
|
3189
|
+
delete oObject._editable;
|
|
3190
|
+
}
|
|
3191
|
+
});
|
|
2739
3192
|
}
|
|
2740
3193
|
|
|
2741
3194
|
//translate label if it is {{KEY}}
|
|
@@ -2753,6 +3206,17 @@ sap.ui.define([
|
|
|
2753
3206
|
var oItem = aItems[n];
|
|
2754
3207
|
this._addItem(oItem);
|
|
2755
3208
|
}
|
|
3209
|
+
// customize the size of card editor, define the size in dt.js
|
|
3210
|
+
var cardHeight = this._settingsModel.getProperty("/form/height") !== undefined ? this._settingsModel.getProperty("/form/height") : "350px",
|
|
3211
|
+
cardWidth = this._settingsModel.getProperty("/form/width") !== undefined ? this._settingsModel.getProperty("/form/width") : "100%";
|
|
3212
|
+
if (this.getProperty("height") === "") {
|
|
3213
|
+
this.setProperty("height", cardHeight);
|
|
3214
|
+
document.body.style.setProperty("--sapUiIntegrationEditorFormHeight", cardHeight);
|
|
3215
|
+
}
|
|
3216
|
+
if (this.getProperty("width") === "") {
|
|
3217
|
+
this.setProperty("width", cardWidth);
|
|
3218
|
+
document.body.style.setProperty("--sapUiIntegrationEditorFormWidth", cardWidth);
|
|
3219
|
+
}
|
|
2756
3220
|
//add additional content
|
|
2757
3221
|
if (this.getMode() !== "translation") {
|
|
2758
3222
|
Promise.resolve(this._initPreview()).then(function() {
|
|
@@ -2768,6 +3232,21 @@ sap.ui.define([
|
|
|
2768
3232
|
}.bind(this));
|
|
2769
3233
|
}
|
|
2770
3234
|
};
|
|
3235
|
+
|
|
3236
|
+
Editor.prototype.setHeight = function(sValue) {
|
|
3237
|
+
if (sValue) {
|
|
3238
|
+
this.setProperty("height", sValue);
|
|
3239
|
+
document.body.style.setProperty("--sapUiIntegrationEditorFormHeight", sValue);
|
|
3240
|
+
}
|
|
3241
|
+
};
|
|
3242
|
+
|
|
3243
|
+
Editor.prototype.setWidth = function(sValue) {
|
|
3244
|
+
if (sValue) {
|
|
3245
|
+
this.setProperty("width", sValue);
|
|
3246
|
+
document.body.style.setProperty("--sapUiIntegrationEditorFormWidth", sValue);
|
|
3247
|
+
}
|
|
3248
|
+
};
|
|
3249
|
+
|
|
2771
3250
|
/**
|
|
2772
3251
|
* Destroy the editor and the internal instances that it created
|
|
2773
3252
|
*/
|
|
@@ -2848,6 +3327,8 @@ sap.ui.define([
|
|
|
2848
3327
|
case "integer":
|
|
2849
3328
|
case "number": oItem.value = 0; break;
|
|
2850
3329
|
case "string[]": oItem.value = []; break;
|
|
3330
|
+
case "object": oItem.value = undefined; break;
|
|
3331
|
+
case "object[]": oItem.value = undefined; break;
|
|
2851
3332
|
default: oItem.value = "";
|
|
2852
3333
|
}
|
|
2853
3334
|
}
|
|
@@ -2864,6 +3345,7 @@ sap.ui.define([
|
|
|
2864
3345
|
*/
|
|
2865
3346
|
Editor.prototype._applyDesigntimeLayers = function (oSettings) {
|
|
2866
3347
|
var oTexts = {};
|
|
3348
|
+
var oDesigntime = {};
|
|
2867
3349
|
//pull current values
|
|
2868
3350
|
if (this._appliedLayerManifestChanges && Array.isArray(this._appliedLayerManifestChanges)) {
|
|
2869
3351
|
for (var i = 0; i < this._appliedLayerManifestChanges.length; i++) {
|
|
@@ -2871,7 +3353,14 @@ sap.ui.define([
|
|
|
2871
3353
|
if (oChanges) {
|
|
2872
3354
|
var aKeys = Object.keys(oChanges);
|
|
2873
3355
|
for (var j = 0; j < aKeys.length; j++) {
|
|
2874
|
-
|
|
3356
|
+
var vValue = oChanges[aKeys[j]];
|
|
3357
|
+
// if the value of design time is object type,it should for the object field/object list field
|
|
3358
|
+
// add it into designtime of settings
|
|
3359
|
+
if (typeof vValue === "object") {
|
|
3360
|
+
oDesigntime[aKeys[j]] = merge(oDesigntime[aKeys[j]], vValue);
|
|
3361
|
+
continue;
|
|
3362
|
+
}
|
|
3363
|
+
this._settingsModel.setProperty(aKeys[j], vValue);
|
|
2875
3364
|
}
|
|
2876
3365
|
}
|
|
2877
3366
|
var oAppliedLayerManifestChangeTexts = this._appliedLayerManifestChanges[i]["texts"];
|
|
@@ -2888,14 +3377,21 @@ sap.ui.define([
|
|
|
2888
3377
|
//apply the values to a "_next/editable", "_next/visible" entry to the settings.
|
|
2889
3378
|
//the current layer needs to be able to change those values
|
|
2890
3379
|
var sPath = aKeys[j],
|
|
3380
|
+
vValue = oChanges[sPath];
|
|
2891
3381
|
sNext = sPath.substring(0, sPath.lastIndexOf("/") + 1) + "_next";
|
|
3382
|
+
// if the value of design time is object type,it should for the object field/object list field
|
|
3383
|
+
// add it into designtime of settings
|
|
3384
|
+
if (typeof vValue === "object") {
|
|
3385
|
+
oDesigntime[sPath] = merge(oDesigntime[sPath], vValue);
|
|
3386
|
+
continue;
|
|
3387
|
+
}
|
|
2892
3388
|
if (!this._settingsModel.getProperty(sNext)) {
|
|
2893
3389
|
//create a _next entry if it does not exist
|
|
2894
3390
|
this._settingsModel.setProperty(sNext, {});
|
|
2895
3391
|
}
|
|
2896
3392
|
var sNext = sPath.substring(0, sPath.lastIndexOf("/") + 1) + "_next",
|
|
2897
3393
|
sProp = sPath.substring(sPath.lastIndexOf("/") + 1);
|
|
2898
|
-
this._settingsModel.setProperty(sNext + "/" + sProp,
|
|
3394
|
+
this._settingsModel.setProperty(sNext + "/" + sProp, vValue);
|
|
2899
3395
|
}
|
|
2900
3396
|
}
|
|
2901
3397
|
var ocurrentLayerManifestChangeTexts = this._currentLayerManifestChanges["texts"];
|
|
@@ -2906,6 +3402,9 @@ sap.ui.define([
|
|
|
2906
3402
|
if (!deepEqual(oTexts, {})) {
|
|
2907
3403
|
this._settingsModel.setProperty("/texts", oTexts);
|
|
2908
3404
|
}
|
|
3405
|
+
if (!deepEqual(oDesigntime, {})) {
|
|
3406
|
+
this._settingsModel.setProperty("/:designtime", oDesigntime);
|
|
3407
|
+
}
|
|
2909
3408
|
};
|
|
2910
3409
|
/**
|
|
2911
3410
|
* Creates a designtime instance based on an configuration section within the manifest.
|
|
@@ -3040,6 +3539,36 @@ sap.ui.define([
|
|
|
3040
3539
|
return false;
|
|
3041
3540
|
};
|
|
3042
3541
|
|
|
3542
|
+
Editor.prototype.prepareFieldsInKey = function(oConfig) {
|
|
3543
|
+
//get field names in the item key
|
|
3544
|
+
this._sKeySeparator = oConfig.values.keySeparator;
|
|
3545
|
+
if (!this._sKeySeparator) {
|
|
3546
|
+
this._sKeySeparator = "#";
|
|
3547
|
+
}
|
|
3548
|
+
var sKey = oConfig.values.item.key;
|
|
3549
|
+
this._aFields = sKey.split(this._sKeySeparator);
|
|
3550
|
+
for (var n in this._aFields) {
|
|
3551
|
+
//remove the {} in the field
|
|
3552
|
+
if (this._aFields[n].startsWith("{")) {
|
|
3553
|
+
this._aFields[n] = this._aFields[n].substring(1);
|
|
3554
|
+
}
|
|
3555
|
+
if (this._aFields[n].endsWith("}")) {
|
|
3556
|
+
this._aFields[n] = this._aFields[n].substring(0, this._aFields[n].length - 1);
|
|
3557
|
+
}
|
|
3558
|
+
}
|
|
3559
|
+
};
|
|
3560
|
+
|
|
3561
|
+
Editor.prototype.getKeyFromItem = function(oItem) {
|
|
3562
|
+
var sItemKey = "";
|
|
3563
|
+
this._aFields.forEach(function (field) {
|
|
3564
|
+
sItemKey += oItem[field].toString() + this._sKeySeparator;
|
|
3565
|
+
}.bind(this));
|
|
3566
|
+
if (sItemKey.endsWith(this._sKeySeparator)) {
|
|
3567
|
+
sItemKey = sItemKey.substring(0, sItemKey.length - this._sKeySeparator.length);
|
|
3568
|
+
}
|
|
3569
|
+
return sItemKey;
|
|
3570
|
+
};
|
|
3571
|
+
|
|
3043
3572
|
//create static context entries
|
|
3044
3573
|
Editor._contextEntries =
|
|
3045
3574
|
{
|
|
@@ -3112,36 +3641,6 @@ sap.ui.define([
|
|
|
3112
3641
|
}
|
|
3113
3642
|
};
|
|
3114
3643
|
|
|
3115
|
-
Editor.prototype.prepareFieldsInKey = function(oConfig) {
|
|
3116
|
-
//get field names in the item key
|
|
3117
|
-
this._sKeySeparator = oConfig.values.keySeparator;
|
|
3118
|
-
if (!this._sKeySeparator) {
|
|
3119
|
-
this._sKeySeparator = "#";
|
|
3120
|
-
}
|
|
3121
|
-
var sKey = oConfig.values.item.key;
|
|
3122
|
-
this._aFields = sKey.split(this._sKeySeparator);
|
|
3123
|
-
for (var n in this._aFields) {
|
|
3124
|
-
//remove the {} in the field
|
|
3125
|
-
if (this._aFields[n].startsWith("{")) {
|
|
3126
|
-
this._aFields[n] = this._aFields[n].substring(1);
|
|
3127
|
-
}
|
|
3128
|
-
if (this._aFields[n].endsWith("}")) {
|
|
3129
|
-
this._aFields[n] = this._aFields[n].substring(0, this._aFields[n].length - 1);
|
|
3130
|
-
}
|
|
3131
|
-
}
|
|
3132
|
-
};
|
|
3133
|
-
|
|
3134
|
-
Editor.prototype.getKeyFromItem = function(oItem) {
|
|
3135
|
-
var sItemKey = "";
|
|
3136
|
-
this._aFields.forEach(function (field) {
|
|
3137
|
-
sItemKey += oItem[field].toString() + this._sKeySeparator;
|
|
3138
|
-
}.bind(this));
|
|
3139
|
-
if (sItemKey.endsWith(this._sKeySeparator)) {
|
|
3140
|
-
sItemKey = sItemKey.substring(0, sItemKey.length - this._sKeySeparator.length);
|
|
3141
|
-
}
|
|
3142
|
-
return sItemKey;
|
|
3143
|
-
};
|
|
3144
|
-
|
|
3145
3644
|
//initializes global settings
|
|
3146
3645
|
Editor.init = function () {
|
|
3147
3646
|
this.init = function () { }; //replace self
|