@openui5/sap.ui.fl 1.92.0 → 1.93.3

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.
Files changed (213) hide show
  1. package/{.eslintrc → .eslintrc.json} +0 -0
  2. package/.reuse/dep5 +5 -0
  3. package/THIRDPARTY.txt +10 -1
  4. package/package.json +3 -3
  5. package/src/sap/ui/fl/.library +1 -1
  6. package/src/sap/ui/fl/Cache.js +1 -1
  7. package/src/sap/ui/fl/Change.js +41 -27
  8. package/src/sap/ui/fl/ChangePersistence.js +63 -22
  9. package/src/sap/ui/fl/ChangePersistenceFactory.js +1 -1
  10. package/src/sap/ui/fl/ControlPersonalizationAPI.js +1 -1
  11. package/src/sap/ui/fl/EventHistory.js +1 -1
  12. package/src/sap/ui/fl/FakeLrepConnectorLocalStorage.js +1 -1
  13. package/src/sap/ui/fl/FakeLrepConnectorSessionStorage.js +1 -1
  14. package/src/sap/ui/fl/FakeLrepLocalStorage.js +1 -1
  15. package/src/sap/ui/fl/FlexController.js +1 -1
  16. package/src/sap/ui/fl/FlexControllerFactory.js +1 -1
  17. package/src/sap/ui/fl/LayerUtils.js +1 -1
  18. package/src/sap/ui/fl/PreprocessorImpl.js +1 -1
  19. package/src/sap/ui/fl/RegistrationDelegator.js +1 -1
  20. package/src/sap/ui/fl/Utils.js +50 -2
  21. package/src/sap/ui/fl/Variant.js +20 -20
  22. package/src/sap/ui/fl/XmlPreprocessorImpl.js +1 -1
  23. package/src/sap/ui/fl/apply/_internal/DelegateMediator.js +2 -2
  24. package/src/sap/ui/fl/apply/_internal/changes/Applier.js +85 -40
  25. package/src/sap/ui/fl/apply/_internal/changes/FlexCustomData.js +196 -38
  26. package/src/sap/ui/fl/apply/_internal/changes/Reverter.js +91 -85
  27. package/src/sap/ui/fl/apply/_internal/changes/Utils.js +19 -8
  28. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Preprocessor.js +1 -1
  29. package/src/sap/ui/fl/apply/_internal/changes/descriptor/Registration.js +1 -1
  30. package/src/sap/ui/fl/apply/_internal/changes/descriptor/RegistrationBuild.js +1 -1
  31. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/AddAnnotationsToOData.js +1 -1
  32. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeDataSource.js +1 -1
  33. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/ChangeInbound.js +1 -1
  34. package/src/sap/ui/fl/apply/_internal/changes/descriptor/app/SetTitle.js +1 -1
  35. package/src/sap/ui/fl/apply/_internal/changes/descriptor/fiori/SetRegistrationIds.js +1 -1
  36. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/AddNewCard.js +1 -1
  37. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/ChangeCard.js +1 -1
  38. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ovp/DeleteCard.js +1 -1
  39. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddComponentUsages.js +1 -1
  40. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddLibrary.js +1 -1
  41. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModel.js +1 -1
  42. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/AddNewModelEnhanceWith.js +1 -1
  43. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetFlexExtensionPointEnabled.js +1 -1
  44. package/src/sap/ui/fl/apply/_internal/changes/descriptor/ui5/SetMinUI5Version.js +1 -1
  45. package/src/sap/ui/fl/apply/_internal/connectors/ObjectStorageUtils.js +1 -1
  46. package/src/sap/ui/fl/apply/_internal/extensionPoint/Processor.js +1 -1
  47. package/src/sap/ui/fl/apply/_internal/flexState/FlexState.js +13 -1
  48. package/src/sap/ui/fl/apply/_internal/flexState/Loader.js +1 -1
  49. package/src/sap/ui/fl/apply/_internal/flexState/ManifestUtils.js +1 -1
  50. package/src/sap/ui/fl/apply/_internal/flexState/UI2Personalization/UI2PersonalizationState.js +1 -1
  51. package/src/sap/ui/fl/apply/_internal/flexState/changes/DependencyHandler.js +1 -1
  52. package/src/sap/ui/fl/apply/_internal/flexState/changes/ExtensionPointState.js +1 -1
  53. package/src/sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger.js +2 -2
  54. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/Switcher.js +1 -1
  55. package/src/sap/ui/fl/apply/_internal/flexState/controlVariants/VariantManagementState.js +1 -1
  56. package/src/sap/ui/fl/apply/api/ControlVariantApplyAPI.js +1 -1
  57. package/src/sap/ui/fl/apply/api/SmartVariantManagementApplyAPI.js +2 -0
  58. package/src/sap/ui/fl/changeHandler/AddIFrame.js +23 -9
  59. package/src/sap/ui/fl/changeHandler/AddXML.js +2 -3
  60. package/src/sap/ui/fl/changeHandler/AddXMLAtExtensionPoint.js +40 -29
  61. package/src/sap/ui/fl/changeHandler/Base.js +1 -1
  62. package/src/sap/ui/fl/changeHandler/BaseAddViaDelegate.js +43 -30
  63. package/src/sap/ui/fl/changeHandler/BaseAddXml.js +65 -26
  64. package/src/sap/ui/fl/changeHandler/BaseRename.js +26 -18
  65. package/src/sap/ui/fl/changeHandler/HideControl.js +21 -18
  66. package/src/sap/ui/fl/changeHandler/MoveControls.js +250 -172
  67. package/src/sap/ui/fl/changeHandler/MoveElements.js +90 -61
  68. package/src/sap/ui/fl/changeHandler/PropertyBindingChange.js +12 -12
  69. package/src/sap/ui/fl/changeHandler/PropertyChange.js +27 -23
  70. package/src/sap/ui/fl/changeHandler/StashControl.js +51 -23
  71. package/src/sap/ui/fl/changeHandler/UnhideControl.js +13 -14
  72. package/src/sap/ui/fl/changeHandler/UnstashControl.js +23 -16
  73. package/src/sap/ui/fl/changeHandler/UpdateIFrame.js +45 -21
  74. package/src/sap/ui/fl/changeHandler/common/createIFrame.js +6 -2
  75. package/src/sap/ui/fl/changeHandler/common/getTargetAggregationIndex.js +8 -4
  76. package/src/sap/ui/fl/changeHandler/common/revertAddedControls.js +17 -7
  77. package/src/sap/ui/fl/codeExt/CodeExtManager.js +1 -1
  78. package/src/sap/ui/fl/descriptorRelated/api/DescriptorChangeFactory.js +4 -4
  79. package/src/sap/ui/fl/descriptorRelated/api/DescriptorInlineChangeFactory.js +1 -1
  80. package/src/sap/ui/fl/descriptorRelated/api/DescriptorVariantFactory.js +1 -1
  81. package/src/sap/ui/fl/descriptorRelated/internal/Utils.js +1 -0
  82. package/src/sap/ui/fl/designtime/util/IFrame.designtime.js +3 -0
  83. package/src/sap/ui/fl/initial/_internal/Storage.js +1 -1
  84. package/src/sap/ui/fl/initial/_internal/StorageUtils.js +1 -1
  85. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeHandlerStorage.js +5 -0
  86. package/src/sap/ui/fl/initial/_internal/changeHandlers/ChangeRegistryItem.js +1 -1
  87. package/src/sap/ui/fl/initial/_internal/connectors/Utils.js +2 -2
  88. package/src/sap/ui/fl/initial/_internal/storageResultDisassemble.js +1 -1
  89. package/src/sap/ui/fl/interfaces/BaseLoadConnector.js +1 -1
  90. package/src/sap/ui/fl/interfaces/Delegate.js +1 -1
  91. package/src/sap/ui/fl/library.js +9 -9
  92. package/src/sap/ui/fl/messagebundle.properties +15 -0
  93. package/src/sap/ui/fl/messagebundle_ar.properties +9 -1
  94. package/src/sap/ui/fl/messagebundle_bg.properties +9 -1
  95. package/src/sap/ui/fl/messagebundle_ca.properties +9 -1
  96. package/src/sap/ui/fl/messagebundle_cs.properties +9 -1
  97. package/src/sap/ui/fl/messagebundle_cy.properties +9 -1
  98. package/src/sap/ui/fl/messagebundle_da.properties +9 -1
  99. package/src/sap/ui/fl/messagebundle_de.properties +9 -1
  100. package/src/sap/ui/fl/messagebundle_el.properties +9 -1
  101. package/src/sap/ui/fl/messagebundle_en.properties +8 -0
  102. package/src/sap/ui/fl/messagebundle_en_GB.properties +8 -0
  103. package/src/sap/ui/fl/messagebundle_en_US_sappsd.properties +10 -0
  104. package/src/sap/ui/fl/messagebundle_en_US_saptrc.properties +8 -0
  105. package/src/sap/ui/fl/messagebundle_es.properties +9 -1
  106. package/src/sap/ui/fl/messagebundle_es_MX.properties +9 -1
  107. package/src/sap/ui/fl/messagebundle_et.properties +9 -1
  108. package/src/sap/ui/fl/messagebundle_fi.properties +9 -1
  109. package/src/sap/ui/fl/messagebundle_fr.properties +8 -0
  110. package/src/sap/ui/fl/messagebundle_fr_CA.properties +8 -0
  111. package/src/sap/ui/fl/messagebundle_hi.properties +9 -1
  112. package/src/sap/ui/fl/messagebundle_hr.properties +9 -1
  113. package/src/sap/ui/fl/messagebundle_hu.properties +9 -1
  114. package/src/sap/ui/fl/messagebundle_id.properties +9 -1
  115. package/src/sap/ui/fl/messagebundle_it.properties +9 -1
  116. package/src/sap/ui/fl/messagebundle_iw.properties +9 -1
  117. package/src/sap/ui/fl/messagebundle_ja.properties +9 -1
  118. package/src/sap/ui/fl/messagebundle_kk.properties +9 -1
  119. package/src/sap/ui/fl/messagebundle_ko.properties +9 -1
  120. package/src/sap/ui/fl/messagebundle_lt.properties +9 -1
  121. package/src/sap/ui/fl/messagebundle_lv.properties +9 -1
  122. package/src/sap/ui/fl/messagebundle_ms.properties +9 -1
  123. package/src/sap/ui/fl/messagebundle_nl.properties +9 -1
  124. package/src/sap/ui/fl/messagebundle_no.properties +9 -1
  125. package/src/sap/ui/fl/messagebundle_pl.properties +9 -1
  126. package/src/sap/ui/fl/messagebundle_pt.properties +9 -1
  127. package/src/sap/ui/fl/messagebundle_pt_PT.properties +9 -1
  128. package/src/sap/ui/fl/messagebundle_ro.properties +8 -0
  129. package/src/sap/ui/fl/messagebundle_ru.properties +9 -1
  130. package/src/sap/ui/fl/messagebundle_sh.properties +9 -1
  131. package/src/sap/ui/fl/messagebundle_sk.properties +9 -1
  132. package/src/sap/ui/fl/messagebundle_sl.properties +9 -1
  133. package/src/sap/ui/fl/messagebundle_sv.properties +9 -1
  134. package/src/sap/ui/fl/messagebundle_th.properties +9 -1
  135. package/src/sap/ui/fl/messagebundle_tr.properties +9 -1
  136. package/src/sap/ui/fl/messagebundle_uk.properties +9 -1
  137. package/src/sap/ui/fl/messagebundle_vi.properties +9 -1
  138. package/src/sap/ui/fl/messagebundle_zh_CN.properties +9 -1
  139. package/src/sap/ui/fl/messagebundle_zh_TW.properties +9 -1
  140. package/src/sap/ui/fl/registry/Settings.js +27 -23
  141. package/src/sap/ui/fl/support/Flexibility.js +1 -1
  142. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetails.controller.js +1 -1
  143. package/src/sap/ui/fl/support/apps/contentbrowser/controller/ContentDetailsEdit.controller.js +1 -1
  144. package/src/sap/ui/fl/support/apps/contentbrowser/controller/LayerContentMaster.controller.js +1 -1
  145. package/src/sap/ui/fl/support/apps/contentbrowser/controller/Layers.controller.js +1 -1
  146. package/src/sap/ui/fl/support/apps/contentbrowser/lrepConnector/LRepConnector.js +7 -7
  147. package/src/sap/ui/fl/support/apps/contentbrowser/utils/DataUtils.js +2 -2
  148. package/src/sap/ui/fl/support/apps/contentbrowser/utils/ErrorUtils.js +1 -1
  149. package/src/sap/ui/fl/support/diagnostics/Flexibility.controller.js +1 -1
  150. package/src/sap/ui/fl/themes/base/VariantManagement.less +11 -38
  151. package/src/sap/ui/fl/transport/TransportSelection.js +1 -1
  152. package/src/sap/ui/fl/util/IFrame.flexibility.js +2 -1
  153. package/src/sap/ui/fl/util/IFrame.js +29 -2
  154. package/src/sap/ui/fl/util/IFrameRenderer.js +1 -1
  155. package/src/sap/ui/fl/util/ManagedObjectModel.js +1 -1
  156. package/src/sap/ui/fl/util/resolveBinding.js +1 -1
  157. package/src/sap/ui/fl/variants/VariantManagement.js +86 -29
  158. package/src/sap/ui/fl/variants/VariantModel.js +41 -18
  159. package/src/sap/ui/fl/write/_internal/Storage.js +2 -2
  160. package/src/sap/ui/fl/write/_internal/StorageFeaturesMerger.js +4 -1
  161. package/src/sap/ui/fl/write/_internal/Versions.js +1 -1
  162. package/src/sap/ui/fl/write/_internal/appVariant/AppVariant.js +1 -1
  163. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantFactory.js +1 -1
  164. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChange.js +1 -1
  165. package/src/sap/ui/fl/write/_internal/appVariant/AppVariantInlineChangeFactory.js +1 -1
  166. package/src/sap/ui/fl/write/_internal/condenser/Condenser.js +11 -10
  167. package/src/sap/ui/fl/write/_internal/condenser/UIReconstruction.js +2 -24
  168. package/src/sap/ui/fl/write/_internal/condenser/Utils.js +8 -5
  169. package/src/sap/ui/fl/write/_internal/condenser/classifications/Create.js +10 -8
  170. package/src/sap/ui/fl/write/_internal/condenser/classifications/Destroy.js +14 -11
  171. package/src/sap/ui/fl/write/_internal/condenser/classifications/Move.js +31 -20
  172. package/src/sap/ui/fl/write/_internal/connectors/BackendConnector.js +1 -1
  173. package/src/sap/ui/fl/write/_internal/connectors/KeyUserConnector.js +1 -1
  174. package/src/sap/ui/fl/write/_internal/connectors/LocalStorageConnector.js +3 -1
  175. package/src/sap/ui/fl/write/_internal/connectors/LrepConnector.js +1 -1
  176. package/src/sap/ui/fl/write/_internal/connectors/NeoLrepConnector.js +1 -1
  177. package/src/sap/ui/fl/write/_internal/connectors/ObjectPathConnector.js +1 -1
  178. package/src/sap/ui/fl/write/_internal/connectors/PersonalizationConnector.js +1 -1
  179. package/src/sap/ui/fl/write/_internal/connectors/Utils.js +1 -1
  180. package/src/sap/ui/fl/write/_internal/delegates/ODataV4ReadDelegate.js +1 -1
  181. package/src/sap/ui/fl/write/_internal/extensionPoint/Processor.js +1 -1
  182. package/src/sap/ui/fl/write/_internal/extensionPoint/Registry.js +7 -5
  183. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPAccess.js +1 -1
  184. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariant.js +1 -1
  185. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ABAPExtensibilityVariantFactory.js +1 -1
  186. package/src/sap/ui/fl/write/_internal/fieldExtensibility/MultiTenantABAPExtensibilityVariant.js +1 -1
  187. package/src/sap/ui/fl/write/_internal/fieldExtensibility/ServiceValidation.js +1 -1
  188. package/src/sap/ui/fl/write/_internal/fieldExtensibility/SingleTenantABAPExtensibilityVariant.js +1 -1
  189. package/src/sap/ui/fl/write/_internal/fieldExtensibility/UriParser.js +1 -1
  190. package/src/sap/ui/fl/write/_internal/fieldExtensibility/Utils.js +2 -2
  191. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/CAPAccess.js +129 -0
  192. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.fragment.xml +33 -0
  193. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/dialog/CustomFieldCAPDialog.js +163 -0
  194. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/getEditorConfig.js +209 -0
  195. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/annotationsEditor/AnnotationsEditor.js +49 -0
  196. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.fragment.xml +6 -0
  197. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor.js +41 -0
  198. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateEditor/DateEditor.js +43 -0
  199. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateTimeEditor/DateTimeEditor.js +38 -0
  200. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.fragment.xml +22 -0
  201. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor.js +84 -0
  202. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.fragment.xml +10 -0
  203. package/src/sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor.js +70 -0
  204. package/src/sap/ui/fl/write/_internal/flexState/FlexObjectState.js +16 -10
  205. package/src/sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState.js +11 -4
  206. package/src/sap/ui/fl/write/_internal/transport/TransportSelection.js +1 -1
  207. package/src/sap/ui/fl/write/_internal/transport/Transports.js +1 -1
  208. package/src/sap/ui/fl/write/api/ChangesWriteAPI.js +1 -0
  209. package/src/sap/ui/fl/write/api/FeaturesAPI.js +1 -0
  210. package/src/sap/ui/fl/write/api/FieldExtensibility.js +24 -9
  211. package/src/sap/ui/fl/write/api/LocalResetAPI.js +9 -8
  212. package/src/sap/ui/fl/write/api/PersistenceWriteAPI.js +32 -26
  213. package/src/sap/ui/fl/write/api/SmartVariantManagementWriteAPI.js +1 -0
@@ -0,0 +1,209 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ *
6
+ * @private
7
+ * @experimental
8
+ */
9
+ sap.ui.define([
10
+ ], function () {
11
+ "use strict";
12
+
13
+ return function(oCustomConfig) {
14
+ return {
15
+ context: "/",
16
+ properties: {
17
+ entityType: {
18
+ tags: ["general"],
19
+ label: "Entity Type",
20
+ path: "entityType",
21
+ type: "select",
22
+ items: (oCustomConfig.entityTypes || []).map(function(sEntityType) {
23
+ return {
24
+ key: sEntityType
25
+ };
26
+ })
27
+ },
28
+ name: {
29
+ tags: ["general"],
30
+ label: "Name",
31
+ path: "name",
32
+ type: "string"
33
+ },
34
+ label: {
35
+ tags: ["general"],
36
+ label: "Label",
37
+ path: "@Common.Label",
38
+ type: "string"
39
+ },
40
+ type: {
41
+ tags: ["general"],
42
+ label: "Type",
43
+ path: "type",
44
+ type: "select",
45
+ items: [
46
+ {
47
+ key: "cds.String",
48
+ title: "String"
49
+ },
50
+ {
51
+ key: "cds.Integer",
52
+ title: "Integer"
53
+ },
54
+ {
55
+ key: "cds.Decimal",
56
+ title: "Decimal"
57
+ },
58
+ {
59
+ key: "cds.Date",
60
+ title: "Date"
61
+ },
62
+ {
63
+ key: "cds.Time",
64
+ title: "Time"
65
+ },
66
+ {
67
+ key: "cds.DateTime",
68
+ title: "DateTime"
69
+ },
70
+ {
71
+ key: "cds.Boolean",
72
+ title: "Boolean"
73
+ }
74
+ ]
75
+ },
76
+ numberPrecision: {
77
+ tags: ["general"],
78
+ label: "Precision",
79
+ path: "precision",
80
+ type: "number",
81
+ defaultValue: "",
82
+ visible: "{= ${/type} === 'cds.Decimal' }"
83
+ },
84
+ numberScale: {
85
+ tags: ["general"],
86
+ label: "Scale",
87
+ path: "scale",
88
+ type: "number",
89
+ defaultValue: "",
90
+ visible: "{= ${/type} === 'cds.Decimal' }"
91
+ },
92
+ stringLength: {
93
+ tags: ["general"],
94
+ label: "Length",
95
+ path: "length",
96
+ type: "number",
97
+ defaultValue: "",
98
+ visible: "{= ${/type} === 'cds.String' }"
99
+ },
100
+ defaultValue: {
101
+ tags: ["general"],
102
+ label: "Default",
103
+ path: "default/val",
104
+ defaultValue: "",
105
+ type: "{/type}" //"{path: '/type', formatter: '._getEditorForType'}"
106
+ },
107
+ readonly: {
108
+ tags: ["validation"],
109
+ label: "Readonly",
110
+ path: "@readonly",
111
+ type: "bool"
112
+ },
113
+ mandatory: {
114
+ tags: ["validation"],
115
+ label: "Mandatory",
116
+ path: "@mandatory",
117
+ type: "bool"
118
+ },
119
+ format: {
120
+ tags: ["validation"],
121
+ label: "Format",
122
+ path: "@assert.format",
123
+ type: "string",
124
+ defaultValue: "",
125
+ visible: "{= ${/type} === 'cds.String' }"
126
+ },
127
+ stringRange: {
128
+ tags: ["validation"],
129
+ label: "Allowed Values",
130
+ path: "@assert.range",
131
+ type: "list",
132
+ visible: "{= ${/type} === 'cds.String' }",
133
+ active: "{= ${/type} === 'cds.String' }"
134
+ },
135
+ arrayRange: {
136
+ tags: ["validation"],
137
+ label: "Range",
138
+ path: "@assert.range",
139
+ type: "range",
140
+ rangeType: "{/type}",
141
+ // TODO: Once expression bindings are supported, check for ordinal types differently
142
+ visible: "{= ${/type} === 'cds.Integer' || ${/type} === 'cds.Decimal' || ${/type} === 'cds.DateTime' || ${/type} === 'cds.Date' || ${/type} === 'cds.Time'}",
143
+ active: "{= ${/type} === 'cds.Integer' || ${/type} === 'cds.Decimal' || ${/type} === 'cds.DateTime' || ${/type} === 'cds.Date' || ${/type} === 'cds.Time'}"
144
+ },
145
+ annotations: {
146
+ tags: ["advanced"],
147
+ label: "Additional Annotations",
148
+ allowedTypes: ["string", "json"],
149
+ path: "annotations",
150
+ type: "annotations",
151
+ allowTypeChange: false
152
+ }
153
+ },
154
+ layout: {
155
+ form: {
156
+ groups: [
157
+ {
158
+ label: "General",
159
+ items: [
160
+ {
161
+ type: "tag",
162
+ value: "general"
163
+ }
164
+ ]
165
+ },
166
+ {
167
+ label: "Input Validation",
168
+ items: [
169
+ {
170
+ type: "tag",
171
+ value: "validation"
172
+ }
173
+ ]
174
+ },
175
+ {
176
+ label: "Advanced",
177
+ items: [
178
+ {
179
+ type: "tag",
180
+ value: "advanced"
181
+ }
182
+ ]
183
+ }
184
+ ]
185
+ }
186
+ },
187
+ propertyEditors: {
188
+ select: "sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor",
189
+ string: "sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor",
190
+ integer: "sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor",
191
+ number: "sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor",
192
+ map: "sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor",
193
+ annotations: "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/annotationsEditor/AnnotationsEditor",
194
+ list: "sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor",
195
+ bool: "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor",
196
+ range: "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/rangeEditor/RangeEditor",
197
+ json: "sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor",
198
+ // Re-register basic editors as a workaround for missing formatter support
199
+ "cds.String": "sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor",
200
+ "cds.Integer": "sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor",
201
+ "cds.Decimal": "sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor",
202
+ "cds.Date": "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateEditor/DateEditor",
203
+ "cds.Time": "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/timeEditor/TimeEditor",
204
+ "cds.DateTime": "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/dateTimeEditor/DateTimeEditor",
205
+ "cds.Boolean": "sap/ui/fl/write/_internal/fieldExtensibility/cap/editor/propertyEditor/booleanEditor/BooleanEditor"
206
+ }
207
+ };
208
+ };
209
+ });
@@ -0,0 +1,49 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ sap.ui.define([
8
+ "sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor"
9
+ ], function (
10
+ MapEditor
11
+ ) {
12
+ "use strict";
13
+
14
+ /**
15
+ * @class
16
+ * Constructor for a new <code>AnnotationsEditor</code>.
17
+ *
18
+ * @extends sap.ui.integration.designtime.baseEditor.propertyEditor.mapEditor.MapEditor
19
+ * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.annotationsEditor.AnnotationsEditor
20
+ * @author SAP SE
21
+ * @since 1.93
22
+ * @version 1.93.3
23
+ *
24
+ * @private
25
+ * @experimental 1.93
26
+ * @ui5-restricted sap.ui.fl
27
+ */
28
+ var AnnotationsEditor = MapEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.annotationsEditor.AnnotationsEditor", {
29
+ xmlFragment: "sap.ui.integration.designtime.baseEditor.propertyEditor.mapEditor.MapEditor",
30
+ metadata: {
31
+ library: "sap.ui.fl"
32
+ },
33
+ renderer: MapEditor.getMetadata().getRenderer().render
34
+ });
35
+
36
+ AnnotationsEditor.prototype.processInputValue = function(oValue) {
37
+ return {
38
+ value: oValue,
39
+ type: "json"
40
+ };
41
+ };
42
+
43
+ AnnotationsEditor.prototype._isValidItem = function() {
44
+ // Temporary fix, can be properly validated once the json type is registered in the MapEditor
45
+ return true;
46
+ };
47
+
48
+ return AnnotationsEditor;
49
+ });
@@ -0,0 +1,6 @@
1
+ <core:FragmentDefinition
2
+ xmlns="sap.m"
3
+ xmlns:core="sap.ui.core"
4
+ >
5
+ <CheckBox select="_onChange" />
6
+ </core:FragmentDefinition>
@@ -0,0 +1,41 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ sap.ui.define([
7
+ "sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor"
8
+ ], function (
9
+ BasePropertyEditor
10
+ ) {
11
+ "use strict";
12
+
13
+ /**
14
+ * @class
15
+ * Constructor for a new <code>BooleanEditor</code>.
16
+ *
17
+ * @extends sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor
18
+ * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.booleanEditor.BooleanEditor
19
+ * @author SAP SE
20
+ * @since 1.93
21
+ * @version 1.93.3
22
+ *
23
+ * @private
24
+ * @experimental 1.93
25
+ * @ui5-restricted sap.ui.fl
26
+ */
27
+ var BooleanEditor = BasePropertyEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.booleanEditor.BooleanEditor", {
28
+ xmlFragment: "sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.booleanEditor.BooleanEditor",
29
+ metadata: {
30
+ library: "sap.ui.fl"
31
+ },
32
+ renderer: BasePropertyEditor.getMetadata().getRenderer().render
33
+ });
34
+
35
+ BooleanEditor.prototype._onChange = function(oEvent) {
36
+ var bValue = !!oEvent.getParameter("selected");
37
+ this.setValue(bValue);
38
+ };
39
+
40
+ return BooleanEditor;
41
+ });
@@ -0,0 +1,43 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ // Customization of the default date editor to support custom output formats
8
+ // To be implemented in base class
9
+
10
+ sap.ui.define([
11
+ "sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor",
12
+ "sap/ui/core/format/DateFormat"
13
+ ], function (
14
+ BaseDateEditor,
15
+ DateFormat
16
+ ) {
17
+ "use strict";
18
+
19
+ var DateEditor = BaseDateEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.dateEditor.DateEditor", {
20
+ xmlFragment: "sap.ui.integration.designtime.baseEditor.propertyEditor.dateEditor.DateEditor",
21
+ metadata: {
22
+ library: "sap.ui.fl"
23
+ },
24
+ renderer: BaseDateEditor.getMetadata().getRenderer().render
25
+ });
26
+
27
+ DateEditor.prototype._parse = function (sValue) {
28
+ if (sValue === "") {
29
+ return undefined;
30
+ }
31
+ var sParsedDate = new Date(sValue);
32
+
33
+ // TODO: For now use a hardcoded format, move to default config later
34
+ var oDateFormatterInstance = DateFormat.getDateInstance({
35
+ pattern: "yyyy-MM-dd"
36
+ });
37
+ return this._isValidDate(sParsedDate)
38
+ ? oDateFormatterInstance.format(sParsedDate)
39
+ : sValue;
40
+ };
41
+
42
+ return DateEditor;
43
+ });
@@ -0,0 +1,38 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
7
+ // Customization of the default datetime editor to support custom output formats
8
+ // To be implemented in base class
9
+
10
+ sap.ui.define([
11
+ "sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor"
12
+ ], function (
13
+ BaseDateTimeEditor
14
+ ) {
15
+ "use strict";
16
+
17
+ var DateTimeEditor = BaseDateTimeEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.dateTimeEditor.DateTimeEditor", {
18
+ xmlFragment: "sap.ui.integration.designtime.baseEditor.propertyEditor.dateTimeEditor.DateTimeEditor",
19
+ metadata: {
20
+ library: "sap.ui.fl"
21
+ },
22
+ renderer: BaseDateTimeEditor.getMetadata().getRenderer().render
23
+ });
24
+
25
+ DateTimeEditor.prototype._parse = function (sValue) {
26
+ if (sValue === "") {
27
+ return undefined;
28
+ }
29
+ var sParsedDate = new Date(sValue);
30
+
31
+ // TODO: For now use a hardcoded format, move to default config later
32
+ return this._isValidDate(sParsedDate)
33
+ ? sParsedDate.toISOString().split(".")[0] + "Z" // Cut ms
34
+ : sValue;
35
+ };
36
+
37
+ return DateTimeEditor;
38
+ });
@@ -0,0 +1,22 @@
1
+ <core:FragmentDefinition
2
+ xmlns="sap.m"
3
+ xmlns:core="sap.ui.core"
4
+ xmlns:baseEditor="sap.ui.integration.designtime.baseEditor"
5
+ >
6
+ <HBox>
7
+ <baseEditor:PropertyEditor
8
+ init="wrapperInit"
9
+ config="{contentModel>/0/config}"
10
+ value="{contentModel>/0/value}"
11
+ renderLabel="false"
12
+ valueChange="_onChange"
13
+ />
14
+ <baseEditor:PropertyEditor
15
+ init="wrapperInit"
16
+ config="{contentModel>/1/config}"
17
+ value="{contentModel>/1/value}"
18
+ renderLabel="false"
19
+ valueChange="_onChange"
20
+ />
21
+ </HBox>
22
+ </core:FragmentDefinition>
@@ -0,0 +1,84 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ sap.ui.define([
7
+ "sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor",
8
+ "sap/ui/model/json/JSONModel"
9
+ ], function (
10
+ BasePropertyEditor,
11
+ JSONModel
12
+ ) {
13
+ "use strict";
14
+
15
+ /**
16
+ * @class
17
+ * Constructor for a new <code>RangeEditor</code>.
18
+ *
19
+ * @extends sap.ui.integration.designtime.baseEditor.propertyEditor.BasePropertyEditor
20
+ * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor
21
+ * @author SAP SE
22
+ * @since 1.93
23
+ * @version 1.93.3
24
+ *
25
+ * @private
26
+ * @experimental 1.93
27
+ * @ui5-restricted sap.ui.fl
28
+ */
29
+ var RangeEditor = BasePropertyEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor", {
30
+ xmlFragment: "sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.rangeEditor.RangeEditor",
31
+ metadata: {
32
+ library: "sap.ui.fl"
33
+ },
34
+ renderer: BasePropertyEditor.getMetadata().getRenderer().render
35
+ });
36
+
37
+ RangeEditor.configMetadata = Object.assign({}, BasePropertyEditor.configMetadata, {
38
+ rangeType: {
39
+ defaultValue: "string"
40
+ }
41
+ });
42
+
43
+ RangeEditor.prototype.init = function() {
44
+ BasePropertyEditor.prototype.init.apply(this, arguments);
45
+ this._oContentModel = new JSONModel();
46
+ this._oContentModel.setDefaultBindingMode("OneWay");
47
+ this.setModel(this._oContentModel, "contentModel");
48
+ };
49
+
50
+ RangeEditor.prototype.getExpectedWrapperCount = function () {
51
+ return 2;
52
+ };
53
+
54
+ RangeEditor.prototype.setConfig = function() {
55
+ // RangeType might change, make sure to update nested editors
56
+ BasePropertyEditor.prototype.setConfig.apply(this, arguments);
57
+ this.setValue(this.getValue());
58
+ };
59
+
60
+ RangeEditor.prototype.setValue = function(aValues) {
61
+ BasePropertyEditor.prototype.setValue.apply(this, arguments);
62
+ var oConfig = {
63
+ type: this.getConfig().rangeType
64
+ };
65
+ var aRangeValues = Array.isArray(aValues) ? aValues : [];
66
+ this._oContentModel.setData([{
67
+ value: aRangeValues[0],
68
+ config: Object.assign({ index: 0 }, oConfig)
69
+ }, {
70
+ value: aRangeValues[1],
71
+ config: Object.assign({ index: 1 }, oConfig)
72
+ }]);
73
+ };
74
+
75
+ RangeEditor.prototype._onChange = function(oEvent) {
76
+ var vValue = oEvent.getParameter("value");
77
+ var iIndex = oEvent.getSource().getConfig().index;
78
+ var aNewValue = (this.getValue() || []).slice();
79
+ aNewValue[iIndex] = vValue;
80
+ this.setValue(aNewValue);
81
+ };
82
+
83
+ return RangeEditor;
84
+ });
@@ -0,0 +1,10 @@
1
+ <core:FragmentDefinition
2
+ xmlns="sap.m"
3
+ xmlns:core="sap.ui.core"
4
+ >
5
+ <TimePicker
6
+ value="{displayValue}"
7
+ valueFormat="HH:mm:ss"
8
+ change="_onChange"
9
+ />
10
+ </core:FragmentDefinition>
@@ -0,0 +1,70 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2021 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+ sap.ui.define([
7
+ "sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor",
8
+ "sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor",
9
+ "sap/ui/core/format/DateFormat"
10
+ ], function (
11
+ BasePropertyEditor,
12
+ DateEditor,
13
+ DateFormat
14
+ ) {
15
+ "use strict";
16
+
17
+ /**
18
+ * @class
19
+ * Constructor for a new <code>TimeEditor</code>.
20
+ *
21
+ * @extends sap.ui.integration.designtime.baseEditor.propertyEditor.dateEditor.DateEditor
22
+ * @alias sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor
23
+ * @author SAP SE
24
+ * @since 1.93
25
+ * @version 1.93.3
26
+ *
27
+ * @private
28
+ * @experimental 1.93
29
+ * @ui5-restricted sap.ui.fl
30
+ */
31
+ var TimeEditor = DateEditor.extend("sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor", {
32
+ xmlFragment: "sap.ui.fl.write._internal.fieldExtensibility.cap.editor.propertyEditor.timeEditor.TimeEditor",
33
+ metadata: {
34
+ library: "sap.ui.fl"
35
+ },
36
+ renderer: BasePropertyEditor.getMetadata().getRenderer().render
37
+ });
38
+
39
+ TimeEditor.prototype.getDefaultValidators = function () {
40
+ return Object.assign(
41
+ {},
42
+ BasePropertyEditor.prototype.getDefaultValidators.call(this)
43
+ );
44
+ };
45
+
46
+ TimeEditor.prototype.formatValue = function (sValue) {
47
+ return sValue;
48
+ };
49
+
50
+ TimeEditor.prototype._parse = function (sValue) {
51
+ if (sValue === "") {
52
+ return undefined;
53
+ }
54
+
55
+ // For now use a hardcoded format, move to default config later
56
+ var oTimeFormatterInstance = DateFormat.getTimeInstance({
57
+ pattern: "HH:mm:ss"
58
+ });
59
+ var oParsedDate = oTimeFormatterInstance.parse(sValue);
60
+ return this._isValidDate(oParsedDate)
61
+ ? oTimeFormatterInstance.format(oParsedDate)
62
+ : sValue;
63
+ };
64
+
65
+ TimeEditor.prototype.getFormatterInstance = function () {
66
+ return DateFormat.getTimeInstance();
67
+ };
68
+
69
+ return TimeEditor;
70
+ });
@@ -10,6 +10,7 @@ sap.ui.define([
10
10
  "sap/ui/fl/apply/_internal/flexState/ManifestUtils",
11
11
  "sap/ui/fl/apply/_internal/ChangesController",
12
12
  "sap/ui/fl/write/_internal/flexState/compVariants/CompVariantState",
13
+ "sap/ui/fl/apply/_internal/flexState/compVariants/CompVariantMerger",
13
14
  "sap/ui/fl/ChangePersistenceFactory",
14
15
  "sap/ui/fl/LayerUtils",
15
16
  "sap/ui/fl/apply/_internal/flexState/compVariants/Utils",
@@ -20,6 +21,7 @@ sap.ui.define([
20
21
  ManifestUtils,
21
22
  ChangesController,
22
23
  CompVariantState,
24
+ CompVariantMerger,
23
25
  ChangePersistenceFactory,
24
26
  LayerUtils,
25
27
  CompVariantsUtils,
@@ -30,7 +32,7 @@ sap.ui.define([
30
32
  /**
31
33
  * @namespace sap.ui.fl.apply._internal.flexState.FlexObjectState
32
34
  * @since 1.83
33
- * @version 1.92.0
35
+ * @version 1.93.3
34
36
  * @private
35
37
  * @ui5-restricted sap.ui.fl
36
38
  */
@@ -50,6 +52,17 @@ sap.ui.define([
50
52
  function getCompVariantEntities(mPropertyBag) {
51
53
  var mCompEntities = FlexState.getCompVariantsMap(mPropertyBag.reference);
52
54
  var aEntities = [];
55
+ //Enhance CompVariantsMap with external data and standard variant after FlexState has been cleared and reinitialized
56
+ if (mPropertyBag.invalidateCache) {
57
+ var oDataToRestore = FlexState.getInitialNonFlCompVariantData(mPropertyBag.reference);
58
+ if (oDataToRestore) {
59
+ Object.keys(oDataToRestore).forEach(function(sPersistencyKey) {
60
+ mCompEntities._initialize(sPersistencyKey, oDataToRestore[sPersistencyKey].variants);
61
+ CompVariantMerger.merge(sPersistencyKey, mCompEntities[sPersistencyKey], oDataToRestore[sPersistencyKey].standardVariant);
62
+ });
63
+ }
64
+ }
65
+
53
66
  for (var sPersistencyKey in mCompEntities) {
54
67
  var mCompVariantsOfPersistencyKey = mCompEntities[sPersistencyKey];
55
68
  for (var sId in mCompVariantsOfPersistencyKey.byId) {
@@ -108,15 +121,8 @@ sap.ui.define([
108
121
  FlexObjectState.getFlexObjects = function (mPropertyBag) {
109
122
  return initFlexStateAndSetReference(mPropertyBag)
110
123
  .then(function () {
111
- var aCompVariantEntities = getCompVariantEntities(mPropertyBag);
112
- var aChangePersistenceEntities = getChangePersistenceEntities(mPropertyBag);
113
-
114
- return Promise.all([
115
- aCompVariantEntities,
116
- aChangePersistenceEntities
117
- ]).then(function (aEntities) {
118
- return aEntities[0] // compVariant entities (changes of type defaultVariant / standardVariant, variant)
119
- .concat(aEntities[1]); // ChangePersistence entities (change, ctrl_variant, ctrl_variant_change, ctrl_variant_management_change)
124
+ return getChangePersistenceEntities(mPropertyBag).then(function (aChangePersistenceEntities) {
125
+ return getCompVariantEntities(mPropertyBag).concat(aChangePersistenceEntities);
120
126
  });
121
127
  });
122
128
  };