@openui5/sap.ui.integration 1.105.0 → 1.106.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/.reuse/dep5 +20 -17
- package/THIRDPARTY.txt +31 -21
- 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 +1 -1
- package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticalContent.js +1 -1
- package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +2 -2
- package/src/sap/ui/integration/cards/BaseContent.js +7 -1
- package/src/sap/ui/integration/cards/BaseListContent.js +1 -1
- package/src/sap/ui/integration/cards/CalendarContent.js +1 -1
- 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 +1 -1
- package/src/sap/ui/integration/cards/ListContent.js +8 -3
- package/src/sap/ui/integration/cards/NumericHeader.js +1 -1
- package/src/sap/ui/integration/cards/ObjectContent.js +57 -8
- package/src/sap/ui/integration/cards/TableContent.js +6 -2
- package/src/sap/ui/integration/cards/TimelineContent.js +1 -1
- package/src/sap/ui/integration/cards/TimelineContentRenderer.js +9 -2
- package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
- package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
- package/src/sap/ui/integration/cards/actions/SubmitAction.js +19 -13
- 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 +2 -2
- package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +1 -1
- 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 +1 -1
- package/src/sap/ui/integration/controls/ActionsToolbar.js +1 -1
- package/src/sap/ui/integration/controls/LinkWithIcon.js +1 -1
- package/src/sap/ui/integration/controls/ListContentItem.js +7 -1
- package/src/sap/ui/integration/controls/ListContentItemRenderer.js +2 -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/controls/Paginator.js +1 -1
- package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
- 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 +12 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ar.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_bg.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ca.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_cs.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_cy.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_da.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_de.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_el.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_GB.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_sappsd.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_saprigi.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_en_US_saptrc.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_es.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_es_MX.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_et.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fi.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fr.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_fr_CA.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hi.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hr.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_hu.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_id.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_it.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_iw.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ja.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_kk.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ko.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_lt.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_lv.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ms.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_nl.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_no.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pl.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pt.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_pt_PT.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ro.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_ru.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sh.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sk.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sl.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_sv.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_th.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_tr.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_uk.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_vi.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_zh_CN.properties +8 -0
- package/src/sap/ui/integration/designtime/baseEditor/i18n/i18n_zh_TW.properties +8 -0
- 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/codeEditor/CodeEditor.fragment.xml +13 -0
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/codeEditor/CodeEditor.js +211 -0
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/codeEditor/CodeEditorDialog.fragment.xml +48 -0
- 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 +1 -1
- 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.js +13 -13
- 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/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 +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 +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/BASEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/config/index.js +2 -2
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ar.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_bg.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ca.properties +12 -12
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_cs.properties +13 -13
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_cy.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_da.properties +12 -12
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_de.properties +12 -12
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_el.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_en.properties +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_en_GB.properties +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_en_US_saptrc.properties +28 -0
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_es.properties +13 -13
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_es_MX.properties +13 -13
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_et.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_fi.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_fr.properties +12 -12
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_fr_CA.properties +12 -12
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_hi.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_hr.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_hu.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_id.properties +11 -11
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_it.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_iw.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ja.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_kk.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ko.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_lt.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_lv.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ms.properties +13 -13
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_nl.properties +12 -12
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_no.properties +12 -12
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_pl.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_pt.properties +13 -13
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_pt_PT.properties +15 -15
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ro.properties +12 -12
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_ru.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_sh.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_sk.properties +12 -12
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_sl.properties +13 -13
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_sv.properties +12 -12
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_th.properties +13 -13
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_tr.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_uk.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_vi.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_zh_CN.properties +14 -14
- package/src/sap/ui/integration/designtime/cardEditor/i18n/i18n_zh_TW.properties +15 -15
- 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 +2 -2
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
- package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +10 -9
- package/src/sap/ui/integration/designtime/editor/CardEditor.js +2 -2
- package/src/sap/ui/integration/designtime/editor/CardPreview.js +1 -1
- package/src/sap/ui/integration/editor/Editor.js +2 -2
- 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/Settings.js +1 -1
- package/src/sap/ui/integration/editor/fields/BaseField.js +6 -135
- 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 +1 -1
- package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
- package/src/sap/ui/integration/editor/fields/ObjectField.js +1 -1
- package/src/sap/ui/integration/editor/fields/ObjectListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/StringField.js +1 -1
- package/src/sap/ui/integration/editor/fields/StringListField.js +1 -1
- package/src/sap/ui/integration/editor/fields/fragment/Controller.js +1 -1
- 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/editor/fields/viz/VizBase.js +1 -1
- package/src/sap/ui/integration/library.js +2 -2
- package/src/sap/ui/integration/messagebundle.properties +9 -0
- package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +6 -0
- package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +6 -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/schemas/sap-card.json +116 -2
- package/src/sap/ui/integration/themes/base/Card.less +5 -2
- package/src/sap/ui/integration/themes/base/ObjectContent.less +8 -0
- 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 +6 -5
- package/src/sap/ui/integration/util/CacheAndRequestDataProvider.js +2 -2
- 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 +12 -24
- package/src/sap/ui/integration/util/DataProviderFactory.js +44 -35
- 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/Forms.js +167 -0
- package/src/sap/ui/integration/util/HeaderFactory.js +1 -1
- package/src/sap/ui/integration/util/JSONBindingHelper.js +2 -2
- package/src/sap/ui/integration/util/LoadingProvider.js +15 -3
- package/src/sap/ui/integration/util/Manifest.js +1 -1
- package/src/sap/ui/integration/util/ManifestResolver.js +36 -31
- package/src/sap/ui/integration/util/RequestDataProvider.js +4 -6
- package/src/sap/ui/integration/util/ServiceDataProvider.js +4 -4
- package/src/sap/ui/integration/util/ServiceManager.js +1 -1
- package/src/sap/ui/integration/util/SkeletonCard.js +1 -1
- package/src/sap/ui/integration/util/Utils.js +1 -1
- package/src/sap/ui/integration/util/Validators.js +125 -0
- package/src/sap/ui/integration/widgets/Card.js +74 -28
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.fragment.xml +0 -14
- package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +0 -126
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* OpenUI5
|
|
3
|
+
* (c) Copyright 2009-2022 SAP SE or an SAP affiliate company.
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
sap.ui.define([], function () {
|
|
8
|
+
"use strict";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Utility class helping with input validations.
|
|
12
|
+
*
|
|
13
|
+
* @author SAP SE
|
|
14
|
+
* @version 1.106.0
|
|
15
|
+
*
|
|
16
|
+
* @private
|
|
17
|
+
* @alias sap.ui.integration.util.Validators
|
|
18
|
+
*/
|
|
19
|
+
var Validators = {
|
|
20
|
+
string: {
|
|
21
|
+
maxLength: function (v, max) {
|
|
22
|
+
return v.length <= max;
|
|
23
|
+
},
|
|
24
|
+
maxLengthTxt: "EDITOR_VAL_MAXLENGTH",
|
|
25
|
+
minLength: function (v, min) {
|
|
26
|
+
return v.length >= min;
|
|
27
|
+
},
|
|
28
|
+
minLengthTxt: "EDITOR_VAL_MINLENGTH",
|
|
29
|
+
pattern: function (v, pattern) {
|
|
30
|
+
var p = new RegExp(pattern);
|
|
31
|
+
return p.test(v);
|
|
32
|
+
},
|
|
33
|
+
patternTxt: "EDITOR_VAL_NOMATCH",
|
|
34
|
+
required: function (v, b) {
|
|
35
|
+
return !b || !!v;
|
|
36
|
+
},
|
|
37
|
+
requiredTxt: "EDITOR_VAL_TEXTREQ",
|
|
38
|
+
validateTxt: "EDITOR_VAL_NOMATCH"
|
|
39
|
+
},
|
|
40
|
+
"string[]": {
|
|
41
|
+
maxLength: function (v, max) {
|
|
42
|
+
return Array.isArray(v) && v.length <= max;
|
|
43
|
+
},
|
|
44
|
+
maxLengthTxt: "EDITOR_VAL_LISTMAXLENGTH",
|
|
45
|
+
minLength: function (v, min) {
|
|
46
|
+
return Array.isArray(v) && v.length >= min;
|
|
47
|
+
},
|
|
48
|
+
minLengthTxt: "EDITOR_VAL_LISTMINLENGTH",
|
|
49
|
+
required: function (v, b) {
|
|
50
|
+
return Array.isArray(v) && v.length > 0;
|
|
51
|
+
},
|
|
52
|
+
requiredTxt: "EDITOR_VAL_LISTREQ"
|
|
53
|
+
},
|
|
54
|
+
integer: {
|
|
55
|
+
maximum: function (v, valValue, valSettings) {
|
|
56
|
+
if (valSettings.exclusiveMaximum) {
|
|
57
|
+
valSettings._txt = "maximumExclusiveTxt";
|
|
58
|
+
return v < valValue;
|
|
59
|
+
}
|
|
60
|
+
return v <= valValue;
|
|
61
|
+
},
|
|
62
|
+
maximumTxt: "EDITOR_VAL_MAX",
|
|
63
|
+
maximumExclusiveTxt: "EDITOR_VAL_MAX_E",
|
|
64
|
+
minimum: function (v, valValue, valSettings) {
|
|
65
|
+
if (valSettings.exclusiveMinimum) {
|
|
66
|
+
valSettings._txt = "minimumExclusiveTxt";
|
|
67
|
+
return v > valValue;
|
|
68
|
+
}
|
|
69
|
+
return v >= valValue;
|
|
70
|
+
},
|
|
71
|
+
minimumTxt: "EDITOR_VAL_MIN",
|
|
72
|
+
minimumExclusiveTxt: "EDITOR_VAL_MIN_E",
|
|
73
|
+
multipleOf: function (v, valValue) {
|
|
74
|
+
return (v % valValue) === 0;
|
|
75
|
+
},
|
|
76
|
+
multipleOfTxt: "EDITOR_VAL_MULTIPLE",
|
|
77
|
+
required: function (v, b) {
|
|
78
|
+
return !isNaN(v) && v !== "";
|
|
79
|
+
},
|
|
80
|
+
requiredTxt: "EDITOR_VAL_NUMBERREQ",
|
|
81
|
+
validateTxt: "EDITOR_VAL_NOMATCH"
|
|
82
|
+
},
|
|
83
|
+
number: {
|
|
84
|
+
maximum: function (v, valValue, valSettings) {
|
|
85
|
+
if (valSettings.exclusiveMaximum) {
|
|
86
|
+
valSettings._txt = "maximumExclusiveTxt";
|
|
87
|
+
return v < valValue;
|
|
88
|
+
}
|
|
89
|
+
return v <= valValue;
|
|
90
|
+
},
|
|
91
|
+
maximumTxt: "EDITOR_VAL_MAX",
|
|
92
|
+
maximumExclusiveTxt: "EDITOR_VAL_MAX_E",
|
|
93
|
+
minimum: function (v, valValue, valSettings) {
|
|
94
|
+
if (valSettings.exclusiveMinimum) {
|
|
95
|
+
valSettings._txt = "minimumExclusiveTxt";
|
|
96
|
+
return v > valValue;
|
|
97
|
+
}
|
|
98
|
+
return v >= valValue;
|
|
99
|
+
},
|
|
100
|
+
minimumTxt: "EDITOR_VAL_MIN",
|
|
101
|
+
minimumExclusiveTxt: "EDITOR_VAL_MAX_E",
|
|
102
|
+
multipleOf: function (v, valValue) {
|
|
103
|
+
return (v % valValue) === 0;
|
|
104
|
+
},
|
|
105
|
+
multipleOfTxt: "EDITOR_VAL_MULTIPLE",
|
|
106
|
+
required: function (v, b) {
|
|
107
|
+
return !isNaN(v) && v !== "";
|
|
108
|
+
},
|
|
109
|
+
requiredTxt: "EDITOR_VAL_NUMBERREQ",
|
|
110
|
+
validateTxt: "EDITOR_VAL_NOMATCH"
|
|
111
|
+
},
|
|
112
|
+
keyValuePair: {
|
|
113
|
+
required: function (v, b) {
|
|
114
|
+
return !b || !!v.value;
|
|
115
|
+
},
|
|
116
|
+
requiredTxt: "EDITOR_VAL_FIELDREQ",
|
|
117
|
+
restrictToPredefinedOptions: function (v, b) {
|
|
118
|
+
return (b && !v.value && !v.key) || (b && !!v.key);
|
|
119
|
+
},
|
|
120
|
+
restrictToPredefinedOptionsTxt: "EDITOR_ONLY_LISTED_VALUES_ALLOWED"
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
return Validators;
|
|
125
|
+
});
|
|
@@ -103,7 +103,7 @@ sap.ui.define([
|
|
|
103
103
|
/**
|
|
104
104
|
* @const A list of model names which are used internally by the card.
|
|
105
105
|
*/
|
|
106
|
-
var INTERNAL_MODEL_NAMES = ["parameters", "filters", "paginator", "form", "context", "i18n"];
|
|
106
|
+
var INTERNAL_MODEL_NAMES = ["parameters", "filters", "paginator", "form", "messages", "context", "i18n"];
|
|
107
107
|
|
|
108
108
|
var RESERVED_PARAMETER_NAMES = ["visibleItems", "allItems"];
|
|
109
109
|
|
|
@@ -188,7 +188,7 @@ sap.ui.define([
|
|
|
188
188
|
* @extends sap.f.CardBase
|
|
189
189
|
*
|
|
190
190
|
* @author SAP SE
|
|
191
|
-
* @version 1.
|
|
191
|
+
* @version 1.106.0
|
|
192
192
|
* @public
|
|
193
193
|
* @constructor
|
|
194
194
|
* @see {@link topic:5b46b03f024542ba802d99d67bc1a3f4 Cards}
|
|
@@ -203,6 +203,7 @@ sap.ui.define([
|
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
205
|
* Optional property which can be used by the host to reference the card.
|
|
206
|
+
* It will be forwarded to any children cards.
|
|
206
207
|
* Does not affect the card behavior.
|
|
207
208
|
*/
|
|
208
209
|
referenceId : {
|
|
@@ -255,12 +256,15 @@ sap.ui.define([
|
|
|
255
256
|
*
|
|
256
257
|
* This can be a list of flexibility changes generated during designtime.
|
|
257
258
|
*
|
|
258
|
-
* Each level of changes
|
|
259
|
+
* Each item in the array represents a separate level of changes. For example, the first item might be created by an administrator, the second by a page administrator and the third by the end user.
|
|
260
|
+
*
|
|
261
|
+
* The order of the items is the order in which the changes will be merged on top of each other. So the last item will overwrite the previous items where the paths match.
|
|
259
262
|
*
|
|
260
263
|
* Example:
|
|
261
264
|
* <pre>
|
|
262
265
|
* [
|
|
263
266
|
* {
|
|
267
|
+
* // Administrator
|
|
264
268
|
* "/sap.card/header/title": "My Configured Title in Default Language",
|
|
265
269
|
* "/sap.card/content/maxItems": 10,
|
|
266
270
|
* "texts": {
|
|
@@ -270,13 +274,13 @@ sap.ui.define([
|
|
|
270
274
|
* }
|
|
271
275
|
* },
|
|
272
276
|
* {
|
|
273
|
-
*
|
|
274
|
-
* "/sap.card/content/maxItems":
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
277
|
+
* // Page administrator
|
|
278
|
+
* "/sap.card/content/maxItems": 5
|
|
279
|
+
* },
|
|
280
|
+
* {
|
|
281
|
+
* // End user
|
|
282
|
+
* "/sap.card/header/title": "Title by End User",
|
|
283
|
+
* "/sap.card/content/maxItems": 8
|
|
280
284
|
* }
|
|
281
285
|
* ]
|
|
282
286
|
* </pre>
|
|
@@ -477,8 +481,8 @@ sap.ui.define([
|
|
|
477
481
|
this._bFirstRendering = true;
|
|
478
482
|
this._aFundamentalErrors = [];
|
|
479
483
|
this._sPerformanceId = "UI5 Integration Cards - " + this.getId() + "---";
|
|
480
|
-
this.
|
|
481
|
-
this.
|
|
484
|
+
this._fnOnDataReady = function () {
|
|
485
|
+
this._bDataReady = true;
|
|
482
486
|
}.bind(this);
|
|
483
487
|
|
|
484
488
|
/**
|
|
@@ -488,7 +492,7 @@ sap.ui.define([
|
|
|
488
492
|
* @experimental since 1.79
|
|
489
493
|
* @public
|
|
490
494
|
* @author SAP SE
|
|
491
|
-
* @version 1.
|
|
495
|
+
* @version 1.106.0
|
|
492
496
|
* @borrows sap.ui.integration.widgets.Card#getDomRef as getDomRef
|
|
493
497
|
* @borrows sap.ui.integration.widgets.Card#setVisible as setVisible
|
|
494
498
|
* @borrows sap.ui.integration.widgets.Card#getParameters as getParameters
|
|
@@ -515,6 +519,7 @@ sap.ui.define([
|
|
|
515
519
|
* @borrows sap.ui.integration.widgets.Card#showCard as showCard
|
|
516
520
|
* @borrows sap.ui.integration.widgets.Card#hide as hide
|
|
517
521
|
* @borrows sap.ui.integration.widgets.Card#getOpener as getOpener
|
|
522
|
+
* @borrows sap.ui.integration.widgets.Card#validateControls as validateControls
|
|
518
523
|
*/
|
|
519
524
|
this._oLimitedInterface = new Interface(this, [
|
|
520
525
|
"getDomRef",
|
|
@@ -542,7 +547,8 @@ sap.ui.define([
|
|
|
542
547
|
"hideLoadingPlaceholders",
|
|
543
548
|
"showCard",
|
|
544
549
|
"hide",
|
|
545
|
-
"getOpener"
|
|
550
|
+
"getOpener",
|
|
551
|
+
"validateControls"
|
|
546
552
|
]);
|
|
547
553
|
};
|
|
548
554
|
|
|
@@ -569,6 +575,13 @@ sap.ui.define([
|
|
|
569
575
|
ParameterMap.getParamsForModel()
|
|
570
576
|
);
|
|
571
577
|
break;
|
|
578
|
+
case "messages":
|
|
579
|
+
oModel = new JSONModel({
|
|
580
|
+
hasErrors: false,
|
|
581
|
+
hasWarnings: false,
|
|
582
|
+
records: []
|
|
583
|
+
});
|
|
584
|
+
break;
|
|
572
585
|
default:
|
|
573
586
|
oModel = new JSONModel();
|
|
574
587
|
break;
|
|
@@ -600,17 +613,18 @@ sap.ui.define([
|
|
|
600
613
|
Card.prototype._initReadyState = function () {
|
|
601
614
|
this._aReadyPromises = [];
|
|
602
615
|
|
|
616
|
+
this._awaitEvent("_dataReady");
|
|
617
|
+
this._awaitEvent("_dataPassedToContent");
|
|
603
618
|
this._awaitEvent("_headerReady");
|
|
604
619
|
this._awaitEvent("_filterBarReady");
|
|
605
620
|
this._awaitEvent("_contentReady");
|
|
606
|
-
this._awaitEvent("_cardReady");
|
|
607
621
|
|
|
608
622
|
Promise.all(this._aReadyPromises).then(function () {
|
|
609
623
|
this._bReady = true;
|
|
610
624
|
this.fireEvent("_ready");
|
|
611
625
|
}.bind(this));
|
|
612
626
|
|
|
613
|
-
this.attachEventOnce("
|
|
627
|
+
this.attachEventOnce("_dataReady", this._fnOnDataReady);
|
|
614
628
|
};
|
|
615
629
|
|
|
616
630
|
/**
|
|
@@ -620,9 +634,9 @@ sap.ui.define([
|
|
|
620
634
|
*/
|
|
621
635
|
Card.prototype._clearReadyState = function () {
|
|
622
636
|
this._bReady = false;
|
|
623
|
-
this.
|
|
637
|
+
this._bDataReady = false;
|
|
624
638
|
this._aReadyPromises = [];
|
|
625
|
-
this.detachEvent("
|
|
639
|
+
this.detachEvent("_dataReady", this._fnOnDataReady);
|
|
626
640
|
};
|
|
627
641
|
|
|
628
642
|
/**
|
|
@@ -648,7 +662,7 @@ sap.ui.define([
|
|
|
648
662
|
Measurement.end(this._sPerformanceId + "firstRenderingWithStaticData");
|
|
649
663
|
}
|
|
650
664
|
|
|
651
|
-
if (this.
|
|
665
|
+
if (this._bDataReady && !Measurement.getMeasurement(this._sPerformanceId + "firstRenderingWithDynamicData").end) {
|
|
652
666
|
Measurement.end(this._sPerformanceId + "firstRenderingWithDynamicData");
|
|
653
667
|
}
|
|
654
668
|
}
|
|
@@ -816,12 +830,12 @@ sap.ui.define([
|
|
|
816
830
|
}.bind(this))
|
|
817
831
|
.then(this._applyManifest.bind(this))
|
|
818
832
|
.catch(function (e) {
|
|
819
|
-
if (e.message
|
|
820
|
-
this._applyManifest();
|
|
833
|
+
if (e.message === CARD_DESTROYED_ERROR) {
|
|
821
834
|
return;
|
|
822
835
|
}
|
|
823
836
|
|
|
824
837
|
this._logFundamentalError(e.message);
|
|
838
|
+
this._applyManifest();
|
|
825
839
|
}.bind(this));
|
|
826
840
|
};
|
|
827
841
|
|
|
@@ -877,6 +891,22 @@ sap.ui.define([
|
|
|
877
891
|
return this._aFundamentalErrors;
|
|
878
892
|
};
|
|
879
893
|
|
|
894
|
+
/**
|
|
895
|
+
* Causes all of the controls within the Card
|
|
896
|
+
* that support validation to validate their data.
|
|
897
|
+
* @public
|
|
898
|
+
* @experimental
|
|
899
|
+
* @returns {boolean} if all of the controls validated successfully; otherwise, false
|
|
900
|
+
*/
|
|
901
|
+
Card.prototype.validateControls = function () {
|
|
902
|
+
var oCardContent = this.getCardContent();
|
|
903
|
+
if (oCardContent) {
|
|
904
|
+
oCardContent.validateControls();
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
return !this.getModel("messages").getProperty("/hasErrors");
|
|
908
|
+
};
|
|
909
|
+
|
|
880
910
|
/**
|
|
881
911
|
* Prepares the manifest and applies all settings.
|
|
882
912
|
*/
|
|
@@ -1519,7 +1549,8 @@ sap.ui.define([
|
|
|
1519
1549
|
oModel;
|
|
1520
1550
|
|
|
1521
1551
|
if (!oDataSettings) {
|
|
1522
|
-
this.fireEvent("
|
|
1552
|
+
this.fireEvent("_dataReady");
|
|
1553
|
+
this.fireEvent("_dataPassedToContent");
|
|
1523
1554
|
return;
|
|
1524
1555
|
}
|
|
1525
1556
|
|
|
@@ -1541,7 +1572,8 @@ sap.ui.define([
|
|
|
1541
1572
|
}
|
|
1542
1573
|
|
|
1543
1574
|
if (!oModel) {
|
|
1544
|
-
this.fireEvent("
|
|
1575
|
+
this.fireEvent("_dataReady");
|
|
1576
|
+
this.fireEvent("_dataPassedToContent");
|
|
1545
1577
|
return;
|
|
1546
1578
|
}
|
|
1547
1579
|
|
|
@@ -1556,9 +1588,11 @@ sap.ui.define([
|
|
|
1556
1588
|
if (this._createContentPromise) {
|
|
1557
1589
|
this._createContentPromise.then(function (oContent) {
|
|
1558
1590
|
oContent.onDataChanged();
|
|
1591
|
+
this.fireEvent("_dataPassedToContent");
|
|
1559
1592
|
this.onDataRequestComplete();
|
|
1560
1593
|
}.bind(this));
|
|
1561
1594
|
} else {
|
|
1595
|
+
this.fireEvent("_dataPassedToContent");
|
|
1562
1596
|
this.onDataRequestComplete();
|
|
1563
1597
|
}
|
|
1564
1598
|
|
|
@@ -1570,17 +1604,21 @@ sap.ui.define([
|
|
|
1570
1604
|
}.bind(this));
|
|
1571
1605
|
|
|
1572
1606
|
this._oDataProvider.attachDataChanged(function (oEvent) {
|
|
1607
|
+
this.fireEvent("_dataReady");
|
|
1573
1608
|
oModel.setData(oEvent.getParameter("data"));
|
|
1574
|
-
});
|
|
1609
|
+
}.bind(this));
|
|
1575
1610
|
|
|
1576
1611
|
this._oDataProvider.attachError(function (oEvent) {
|
|
1612
|
+
this.fireEvent("_dataReady");
|
|
1613
|
+
this.fireEvent("_dataPassedToContent");
|
|
1577
1614
|
this._handleError("Data service unavailable. " + oEvent.getParameter("message"));
|
|
1578
1615
|
this.onDataRequestComplete();
|
|
1579
1616
|
}.bind(this));
|
|
1580
1617
|
|
|
1581
1618
|
this._oDataProvider.triggerDataUpdate();
|
|
1582
1619
|
} else {
|
|
1583
|
-
this.fireEvent("
|
|
1620
|
+
this.fireEvent("_dataReady");
|
|
1621
|
+
this.fireEvent("_dataPassedToContent");
|
|
1584
1622
|
}
|
|
1585
1623
|
};
|
|
1586
1624
|
|
|
@@ -2278,7 +2316,6 @@ sap.ui.define([
|
|
|
2278
2316
|
var oContent = this.getCardContent(),
|
|
2279
2317
|
oLoadingProvider = this.getAggregation("_loadingProvider");
|
|
2280
2318
|
|
|
2281
|
-
this.fireEvent("_cardReady");
|
|
2282
2319
|
this.hideLoadingPlaceholders(CardArea.Header);
|
|
2283
2320
|
this.hideLoadingPlaceholders(CardArea.Filters);
|
|
2284
2321
|
|
|
@@ -2477,10 +2514,18 @@ sap.ui.define([
|
|
|
2477
2514
|
* @private
|
|
2478
2515
|
*/
|
|
2479
2516
|
Card.prototype.getContentPageSize = function (oContentConfig) {
|
|
2480
|
-
var iMaxItems =
|
|
2517
|
+
var iMaxItems = 0,
|
|
2481
2518
|
oFooter = this.getAggregation("_footer"),
|
|
2482
2519
|
oPaginator;
|
|
2483
2520
|
|
|
2521
|
+
if (oContentConfig.maxItems !== undefined) {
|
|
2522
|
+
if (typeof oContentConfig.maxItems === "number") {
|
|
2523
|
+
iMaxItems = oContentConfig.maxItems;
|
|
2524
|
+
} else {
|
|
2525
|
+
iMaxItems = parseInt(BindingResolver.resolveValue(oContentConfig, this).maxItems) || 0;
|
|
2526
|
+
}
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2484
2529
|
if (!oFooter) {
|
|
2485
2530
|
return iMaxItems;
|
|
2486
2531
|
}
|
|
@@ -2568,7 +2613,8 @@ sap.ui.define([
|
|
|
2568
2613
|
oChildCard = this._createCard({
|
|
2569
2614
|
width: oParameters.width,
|
|
2570
2615
|
host: this.getHostInstance(),
|
|
2571
|
-
parameters: oParameters.parameters
|
|
2616
|
+
parameters: oParameters.parameters,
|
|
2617
|
+
referenceId: this.getReferenceId()
|
|
2572
2618
|
});
|
|
2573
2619
|
|
|
2574
2620
|
oChildCard.setAssociation("openerReference", this);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
<core:FragmentDefinition
|
|
2
|
-
xmlns="sap.m"
|
|
3
|
-
xmlns:core="sap.ui.core"
|
|
4
|
-
>
|
|
5
|
-
<TextArea
|
|
6
|
-
value="{displayValue}"
|
|
7
|
-
width="100%"
|
|
8
|
-
enabled="{config/enabled}"
|
|
9
|
-
placeholder="{config/placeholder}"
|
|
10
|
-
liveChange="_onLiveChange"
|
|
11
|
-
growing="true"
|
|
12
|
-
growingMaxLines="7"
|
|
13
|
-
/>
|
|
14
|
-
</core:FragmentDefinition>
|
package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* OpenUI5
|
|
3
|
-
* (c) Copyright 2009-2022 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/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor",
|
|
8
|
-
"sap/base/util/restricted/_isNil"
|
|
9
|
-
], function (
|
|
10
|
-
BasePropertyEditor,
|
|
11
|
-
_isNil
|
|
12
|
-
) {
|
|
13
|
-
"use strict";
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* @class
|
|
17
|
-
* Constructor for a new <code>TextAreaEditor</code>.
|
|
18
|
-
* This allows to set a code editor or binding strings for a specified property of a JSON object.
|
|
19
|
-
* The editor is rendered as a {@link sap.m.TextArea}.
|
|
20
|
-
*
|
|
21
|
-
* <h3>Configuration</h3>
|
|
22
|
-
*
|
|
23
|
-
* <table style="width:100%;">
|
|
24
|
-
* <tr style="text-align:left">
|
|
25
|
-
* <th>Option</th>
|
|
26
|
-
* <th>Type</th>
|
|
27
|
-
* <th>Default</th>
|
|
28
|
-
* <th>Description</th>
|
|
29
|
-
* </tr>
|
|
30
|
-
* <tr>
|
|
31
|
-
* <td><code>type</code></td>
|
|
32
|
-
* <td><code>string</code></td>
|
|
33
|
-
* <td><code>json</code></td>
|
|
34
|
-
* <td>The type of the code in the editor used for syntax highlighting</td>
|
|
35
|
-
* </tr>
|
|
36
|
-
* <tr>
|
|
37
|
-
* <td><code>allowBindings</code></td>
|
|
38
|
-
* <td><code>boolean</code></td>
|
|
39
|
-
* <td><code>true</code></td>
|
|
40
|
-
* <td>Whether binding strings can be set instead of selecting items</td>
|
|
41
|
-
* </tr>
|
|
42
|
-
* <tr>
|
|
43
|
-
* <td><code>maxLength</code></td>
|
|
44
|
-
* <td><code>number</code></td>
|
|
45
|
-
* <td></td>
|
|
46
|
-
* <td>Maximum number of characters</td>
|
|
47
|
-
* </tr>
|
|
48
|
-
* </table>
|
|
49
|
-
*
|
|
50
|
-
* @extends sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor
|
|
51
|
-
* @alias sap.ui.integration.designtime.baseEditor.propertyEditor.textAreaEditor.TextAreaEditor
|
|
52
|
-
* @author SAP SE
|
|
53
|
-
* @since 1.85
|
|
54
|
-
* @version 1.105.0
|
|
55
|
-
*
|
|
56
|
-
* @private
|
|
57
|
-
* @experimental 1.85
|
|
58
|
-
* @ui5-restricted
|
|
59
|
-
*/
|
|
60
|
-
var TextAreaEditor = BasePropertyEditor.extend("sap.ui.integration.designtime.baseEditor.propertyEditor.textAreaEditor.TextAreaEditor", {
|
|
61
|
-
xmlFragment: "sap.ui.integration.designtime.baseEditor.propertyEditor.textAreaEditor.TextAreaEditor",
|
|
62
|
-
metadata: {
|
|
63
|
-
library: "sap.ui.integration"
|
|
64
|
-
},
|
|
65
|
-
renderer: BasePropertyEditor.getMetadata().getRenderer().render
|
|
66
|
-
});
|
|
67
|
-
|
|
68
|
-
TextAreaEditor.configMetadata = Object.assign({}, BasePropertyEditor.configMetadata, {
|
|
69
|
-
allowBindings: {
|
|
70
|
-
defaultValue: true,
|
|
71
|
-
mergeStrategy: "mostRestrictiveWins"
|
|
72
|
-
},
|
|
73
|
-
typeLabel: {
|
|
74
|
-
defaultValue: "BASE_EDITOR.TYPES.OBJECT"
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
TextAreaEditor.prototype.getDefaultValidators = function () {
|
|
79
|
-
var oConfig = this.getConfig();
|
|
80
|
-
return Object.assign(
|
|
81
|
-
{},
|
|
82
|
-
BasePropertyEditor.prototype.getDefaultValidators.call(this),
|
|
83
|
-
{
|
|
84
|
-
notABinding: {
|
|
85
|
-
type: "notABinding",
|
|
86
|
-
isEnabled: !oConfig.allowBindings
|
|
87
|
-
},
|
|
88
|
-
maxLength: {
|
|
89
|
-
type: "maxLength",
|
|
90
|
-
isEnabled: typeof oConfig.maxLength === "number",
|
|
91
|
-
config: {
|
|
92
|
-
maxLength: oConfig.maxLength
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
);
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
TextAreaEditor.prototype.formatValue = function (vValue) {
|
|
100
|
-
vValue = JSON.stringify(vValue, null, "\t");
|
|
101
|
-
if (typeof vValue === "object" && !vValue.length) {
|
|
102
|
-
vValue = vValue.replace(/\"\$\$([a-zA-Z]*)\$\$\"/g, function (s) {
|
|
103
|
-
return s.substring(3, s.length - 3);
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
return vValue;
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
TextAreaEditor.prototype._onLiveChange = function () {
|
|
110
|
-
var oTextArea = this.getContent();
|
|
111
|
-
var sValue = oTextArea.getValue();
|
|
112
|
-
if (!sValue || sValue === "") {
|
|
113
|
-
this.setValue(undefined);
|
|
114
|
-
} else {
|
|
115
|
-
try {
|
|
116
|
-
var oValue = JSON.parse(sValue);
|
|
117
|
-
this.setValue(oValue);
|
|
118
|
-
} catch (e) {
|
|
119
|
-
oTextArea.setValueState("Error");
|
|
120
|
-
oTextArea.setValueStateText(this.getI18nProperty("BASE_EDITOR.VALIDATOR.NOT_A_JSONOBJECT"));
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
return TextAreaEditor;
|
|
126
|
-
});
|