@openui5/sap.ui.integration 1.100.0 → 1.101.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.
Files changed (189) hide show
  1. package/.eslintrc.json +18 -0
  2. package/THIRDPARTY.txt +5 -5
  3. package/package.json +3 -3
  4. package/src/sap/ui/integration/.library +1 -1
  5. package/src/sap/ui/integration/ActionDefinition.js +1 -1
  6. package/src/sap/ui/integration/Designtime.js +1 -1
  7. package/src/sap/ui/integration/Extension.js +1 -1
  8. package/src/sap/ui/integration/Host.js +1 -1
  9. package/src/sap/ui/integration/cards/AdaptiveContent.js +1 -1
  10. package/src/sap/ui/integration/cards/AnalyticalContent.js +3 -2
  11. package/src/sap/ui/integration/cards/AnalyticsCloudContent.js +1 -1
  12. package/src/sap/ui/integration/cards/BaseContent.js +4 -3
  13. package/src/sap/ui/integration/cards/BaseListContent.js +1 -1
  14. package/src/sap/ui/integration/cards/CalendarContent.js +1 -1
  15. package/src/sap/ui/integration/cards/ComponentContent.js +1 -1
  16. package/src/sap/ui/integration/cards/Footer.js +1 -1
  17. package/src/sap/ui/integration/cards/Header.js +4 -2
  18. package/src/sap/ui/integration/cards/ListContent.js +1 -1
  19. package/src/sap/ui/integration/cards/NumericHeader.js +5 -2
  20. package/src/sap/ui/integration/cards/ObjectContent.js +68 -10
  21. package/src/sap/ui/integration/cards/TableContent.js +1 -1
  22. package/src/sap/ui/integration/cards/TimelineContent.js +1 -1
  23. package/src/sap/ui/integration/cards/WebPageContent.js +1 -1
  24. package/src/sap/ui/integration/cards/actions/CardActions.js +1 -1
  25. package/src/sap/ui/integration/cards/actions/HideCardAction.js +12 -3
  26. package/src/sap/ui/integration/cards/actions/ShowCardAction.js +33 -1
  27. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputChoiceSet.js +1 -1
  28. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputDate.js +1 -1
  29. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputNumber.js +1 -1
  30. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputText.js +1 -1
  31. package/src/sap/ui/integration/cards/adaptivecards/elements/UI5InputToggle.js +1 -1
  32. package/src/sap/ui/integration/cards/filters/BaseFilter.js +1 -1
  33. package/src/sap/ui/integration/cards/filters/DateRangeFilter.js +1 -1
  34. package/src/sap/ui/integration/cards/filters/FilterBar.js +1 -1
  35. package/src/sap/ui/integration/cards/filters/FilterBarFactory.js +1 -1
  36. package/src/sap/ui/integration/cards/filters/SearchFilter.js +1 -1
  37. package/src/sap/ui/integration/cards/filters/SelectFilter.js +1 -1
  38. package/src/sap/ui/integration/controls/ActionsStrip.js +57 -24
  39. package/src/sap/ui/integration/controls/ActionsToolbar.js +1 -1
  40. package/src/sap/ui/integration/controls/LinkWithIcon.js +77 -0
  41. package/src/sap/ui/integration/controls/LinkWithIconRenderer.js +38 -0
  42. package/src/sap/ui/integration/controls/ListContentItem.js +1 -1
  43. package/src/sap/ui/integration/controls/Microchart.js +1 -1
  44. package/src/sap/ui/integration/controls/MicrochartLegend.js +1 -1
  45. package/src/sap/ui/integration/controls/Paginator.js +218 -18
  46. package/src/sap/ui/integration/controls/PaginatorRenderer.js +2 -0
  47. package/src/sap/ui/integration/designtime/baseEditor/BaseEditor.js +1 -1
  48. package/src/sap/ui/integration/designtime/baseEditor/PropertyEditor.js +1 -1
  49. package/src/sap/ui/integration/designtime/baseEditor/PropertyEditors.js +1 -1
  50. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/BasePropertyEditor.js +1 -1
  51. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/PropertyEditorFactory.js +1 -1
  52. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/arrayEditor/ArrayEditor.js +1 -1
  53. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/booleanEditor/BooleanEditor.js +1 -1
  54. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateEditor/DateEditor.js +1 -1
  55. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/dateTimeEditor/DateTimeEditor.js +1 -1
  56. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/enumStringEditor/EnumStringEditor.js +1 -1
  57. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/groupEditor/GroupEditor.js +1 -1
  58. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
  59. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/iconEditor/IsInIconPool.validator.js +1 -1
  60. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/integerEditor/IntegerEditor.js +1 -1
  61. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/jsonEditor/JsonEditor.js +1 -1
  62. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/listEditor/ListEditor.js +1 -1
  63. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/mapEditor/MapEditor.js +1 -1
  64. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/multiSelectEditor/MultiSelectEditor.js +1 -1
  65. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/numberEditor/NumberEditor.js +1 -1
  66. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/objectArrayEditor/ObjectArrayEditor.js +1 -1
  67. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/selectEditor/SelectEditor.js +1 -1
  68. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/separatorEditor/SeparatorEditor.js +1 -1
  69. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/stringEditor/StringEditor.js +1 -1
  70. package/src/sap/ui/integration/designtime/baseEditor/propertyEditor/textAreaEditor/TextAreaEditor.js +1 -1
  71. package/src/sap/ui/integration/designtime/baseEditor/util/binding/ObjectBinding.js +1 -1
  72. package/src/sap/ui/integration/designtime/baseEditor/util/unset.js +1 -1
  73. package/src/sap/ui/integration/designtime/baseEditor/validator/IsBoolean.js +1 -1
  74. package/src/sap/ui/integration/designtime/baseEditor/validator/IsDate.js +1 -1
  75. package/src/sap/ui/integration/designtime/baseEditor/validator/IsInteger.js +1 -1
  76. package/src/sap/ui/integration/designtime/baseEditor/validator/IsNumber.js +1 -1
  77. package/src/sap/ui/integration/designtime/baseEditor/validator/IsSelectedKey.js +1 -1
  78. package/src/sap/ui/integration/designtime/baseEditor/validator/IsStringList.js +1 -1
  79. package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueKey.js +1 -1
  80. package/src/sap/ui/integration/designtime/baseEditor/validator/IsUniqueList.js +1 -1
  81. package/src/sap/ui/integration/designtime/baseEditor/validator/IsValidBinding.js +1 -1
  82. package/src/sap/ui/integration/designtime/baseEditor/validator/MaxLength.js +1 -1
  83. package/src/sap/ui/integration/designtime/baseEditor/validator/NotABinding.js +1 -1
  84. package/src/sap/ui/integration/designtime/baseEditor/validator/ValidatorRegistry.js +1 -1
  85. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/complexMapEditor/ComplexMapEditor.js +1 -1
  86. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/destinationsEditor/DestinationsEditor.js +1 -1
  87. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/filtersEditor/FiltersEditor.js +1 -1
  88. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/iconEditor/IconEditor.js +1 -1
  89. package/src/sap/ui/integration/designtime/cardEditor/propertyEditor/parametersEditor/ParametersEditor.js +1 -1
  90. package/src/sap/ui/integration/designtime/editor/CardEditor.js +87 -7
  91. package/src/sap/ui/integration/designtime/editor/CardPreview.js +1 -1
  92. package/src/sap/ui/integration/editor/Editor.js +44 -34
  93. package/src/sap/ui/integration/editor/EditorResourceBundles.js +1 -1
  94. package/src/sap/ui/integration/editor/Extension.js +1 -1
  95. package/src/sap/ui/integration/editor/Manifest.js +1 -1
  96. package/src/sap/ui/integration/editor/Settings.js +1 -1
  97. package/src/sap/ui/integration/editor/fields/BaseField.js +8 -8
  98. package/src/sap/ui/integration/editor/fields/BooleanField.js +1 -1
  99. package/src/sap/ui/integration/editor/fields/DateField.js +1 -1
  100. package/src/sap/ui/integration/editor/fields/DateTimeField.js +1 -1
  101. package/src/sap/ui/integration/editor/fields/DestinationField.js +1 -1
  102. package/src/sap/ui/integration/editor/fields/IntegerField.js +1 -1
  103. package/src/sap/ui/integration/editor/fields/NumberField.js +1 -1
  104. package/src/sap/ui/integration/editor/fields/ObjectField.js +49 -25
  105. package/src/sap/ui/integration/editor/fields/ObjectListField.js +3 -3
  106. package/src/sap/ui/integration/editor/fields/StringField.js +4 -4
  107. package/src/sap/ui/integration/editor/fields/StringListField.js +38 -52
  108. package/src/sap/ui/integration/editor/fields/viz/ColorSelect.js +1 -1
  109. package/src/sap/ui/integration/editor/fields/viz/IconSelect.js +1 -1
  110. package/src/sap/ui/integration/editor/fields/viz/ShapeSelect.js +1 -1
  111. package/src/sap/ui/integration/library.js +12 -15
  112. package/src/sap/ui/integration/messagebundle.properties +9 -3
  113. package/src/sap/ui/integration/messagebundle_ar.properties +7 -3
  114. package/src/sap/ui/integration/messagebundle_bg.properties +7 -3
  115. package/src/sap/ui/integration/messagebundle_ca.properties +5 -1
  116. package/src/sap/ui/integration/messagebundle_cs.properties +6 -2
  117. package/src/sap/ui/integration/messagebundle_cy.properties +7 -3
  118. package/src/sap/ui/integration/messagebundle_da.properties +6 -2
  119. package/src/sap/ui/integration/messagebundle_de.properties +6 -2
  120. package/src/sap/ui/integration/messagebundle_el.properties +7 -3
  121. package/src/sap/ui/integration/messagebundle_en.properties +7 -3
  122. package/src/sap/ui/integration/messagebundle_en_GB.properties +6 -2
  123. package/src/sap/ui/integration/messagebundle_en_US_sappsd.properties +6 -2
  124. package/src/sap/ui/integration/messagebundle_en_US_saprigi.properties +6 -2
  125. package/src/sap/ui/integration/messagebundle_en_US_saptrc.properties +6 -2
  126. package/src/sap/ui/integration/messagebundle_es.properties +6 -2
  127. package/src/sap/ui/integration/messagebundle_es_MX.properties +6 -2
  128. package/src/sap/ui/integration/messagebundle_et.properties +7 -3
  129. package/src/sap/ui/integration/messagebundle_fi.properties +7 -3
  130. package/src/sap/ui/integration/messagebundle_fr.properties +5 -1
  131. package/src/sap/ui/integration/messagebundle_fr_CA.properties +5 -1
  132. package/src/sap/ui/integration/messagebundle_hi.properties +6 -2
  133. package/src/sap/ui/integration/messagebundle_hr.properties +6 -2
  134. package/src/sap/ui/integration/messagebundle_hu.properties +6 -2
  135. package/src/sap/ui/integration/messagebundle_id.properties +7 -3
  136. package/src/sap/ui/integration/messagebundle_it.properties +7 -3
  137. package/src/sap/ui/integration/messagebundle_iw.properties +6 -2
  138. package/src/sap/ui/integration/messagebundle_ja.properties +6 -2
  139. package/src/sap/ui/integration/messagebundle_kk.properties +6 -2
  140. package/src/sap/ui/integration/messagebundle_ko.properties +6 -2
  141. package/src/sap/ui/integration/messagebundle_lt.properties +6 -2
  142. package/src/sap/ui/integration/messagebundle_lv.properties +7 -3
  143. package/src/sap/ui/integration/messagebundle_ms.properties +7 -3
  144. package/src/sap/ui/integration/messagebundle_nl.properties +6 -2
  145. package/src/sap/ui/integration/messagebundle_no.properties +6 -2
  146. package/src/sap/ui/integration/messagebundle_pl.properties +6 -2
  147. package/src/sap/ui/integration/messagebundle_pt.properties +6 -2
  148. package/src/sap/ui/integration/messagebundle_pt_PT.properties +7 -3
  149. package/src/sap/ui/integration/messagebundle_ro.properties +6 -2
  150. package/src/sap/ui/integration/messagebundle_ru.properties +6 -2
  151. package/src/sap/ui/integration/messagebundle_sh.properties +7 -3
  152. package/src/sap/ui/integration/messagebundle_sk.properties +7 -3
  153. package/src/sap/ui/integration/messagebundle_sl.properties +7 -3
  154. package/src/sap/ui/integration/messagebundle_sv.properties +7 -3
  155. package/src/sap/ui/integration/messagebundle_th.properties +7 -3
  156. package/src/sap/ui/integration/messagebundle_tr.properties +6 -2
  157. package/src/sap/ui/integration/messagebundle_uk.properties +7 -3
  158. package/src/sap/ui/integration/messagebundle_vi.properties +6 -2
  159. package/src/sap/ui/integration/messagebundle_zh_CN.properties +7 -3
  160. package/src/sap/ui/integration/messagebundle_zh_TW.properties +6 -2
  161. package/src/sap/ui/integration/model/ContextModel.js +1 -1
  162. package/src/sap/ui/integration/model/ObservableModel.js +1 -1
  163. package/src/sap/ui/integration/model/PagingModelListBinding.js +1 -1
  164. package/src/sap/ui/integration/themes/base/CalendarContent.less +2 -2
  165. package/src/sap/ui/integration/themes/base/Card.less +24 -0
  166. package/src/sap/ui/integration/themes/base/LinkWithIcon.less +11 -0
  167. package/src/sap/ui/integration/themes/base/ListContentItem.less +11 -0
  168. package/src/sap/ui/integration/themes/base/Paginator.less +86 -0
  169. package/src/sap/ui/integration/themes/base/library.source.less +1 -0
  170. package/src/sap/ui/integration/util/BaseFactory.js +1 -1
  171. package/src/sap/ui/integration/util/BindingHelper.js +1 -1
  172. package/src/sap/ui/integration/util/BindingResolver.js +1 -1
  173. package/src/sap/ui/integration/util/CardObserver.js +1 -1
  174. package/src/sap/ui/integration/util/ContentFactory.js +1 -1
  175. package/src/sap/ui/integration/util/CsrfTokenHandler.js +1 -1
  176. package/src/sap/ui/integration/util/DataProvider.js +1 -1
  177. package/src/sap/ui/integration/util/DataProviderFactory.js +1 -1
  178. package/src/sap/ui/integration/util/Destinations.js +1 -1
  179. package/src/sap/ui/integration/util/ExtensionDataProvider.js +1 -1
  180. package/src/sap/ui/integration/util/HeaderFactory.js +35 -4
  181. package/src/sap/ui/integration/util/JSONBindingHelper.js +1 -1
  182. package/src/sap/ui/integration/util/LoadingProvider.js +2 -2
  183. package/src/sap/ui/integration/util/Manifest.js +1 -1
  184. package/src/sap/ui/integration/util/RequestDataProvider.js +1 -1
  185. package/src/sap/ui/integration/util/ServiceDataProvider.js +1 -1
  186. package/src/sap/ui/integration/util/ServiceManager.js +1 -1
  187. package/src/sap/ui/integration/util/SkeletonCard.js +14 -2
  188. package/src/sap/ui/integration/util/Utils.js +1 -1
  189. package/src/sap/ui/integration/widgets/Card.js +29 -7
@@ -144,7 +144,7 @@ sap.ui.define([
144
144
  * @extends sap.ui.core.Control
145
145
  *
146
146
  * @author SAP SE
147
- * @version 1.100.0
147
+ * @version 1.101.0
148
148
  * @constructor
149
149
  * @since 1.94
150
150
  * @private
@@ -380,7 +380,7 @@ sap.ui.define([
380
380
  if (oItem.isA("sap.m.Panel")) {
381
381
  oItemLevel = oItem._level;
382
382
  } else if (oItem.isA("sap.m.IconTabBar")) {
383
- oItemLevel = oItem.getItems()[0]._level;
383
+ oItemLevel = "1";
384
384
  }
385
385
  if (oItemLevel === "1") {
386
386
  if (oColFields.length > 0) {
@@ -389,11 +389,13 @@ sap.ui.define([
389
389
  }
390
390
  if (oItem.isA("sap.m.IconTabBar")) {
391
391
  var subItems = oPanel.getContent(),
392
- iconTabBarExist = false;
392
+ iconTabBarExist = false,
393
+ nIconTabBar;
393
394
  if (subItems.length > 0) {
394
395
  for (var j = 0; j < subItems.length; j++) {
395
396
  if (subItems[j].isA("sap.m.IconTabBar")) {
396
397
  iconTabBarExist = true;
398
+ nIconTabBar = subItems[j];
397
399
  }
398
400
  }
399
401
  }
@@ -409,6 +411,10 @@ sap.ui.define([
409
411
  } else {
410
412
  oSubGroup = oItem.getItems()[0];
411
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();
412
418
  }
413
419
  } else {
414
420
  oSubGroup = oItem;
@@ -886,7 +892,7 @@ sap.ui.define([
886
892
  * @experimental since 1.94
887
893
  * @public
888
894
  * @author SAP SE
889
- * @version 1.100.0
895
+ * @version 1.101.0
890
896
  * @borrows sap.ui.integration.editor.Editor#getParameters as getParameters
891
897
  * @borrows sap.ui.integration.editor.Editor#resolveDestination as resolveDestination
892
898
  * @borrows sap.ui.integration.editor.Editor#request as request
@@ -1463,6 +1469,9 @@ sap.ui.define([
1463
1469
  if (oItem.valueItems) {
1464
1470
  mResult[oItem.manifestpath.substring(0, oItem.manifestpath.lastIndexOf("/")) + "/valueItems"] = oItem.valueItems;
1465
1471
  }
1472
+ if (oItem.valueTokens) {
1473
+ mResult[oItem.manifestpath.substring(0, oItem.manifestpath.lastIndexOf("/")) + "/valueTokens"] = oItem.valueTokens;
1474
+ }
1466
1475
  switch (oItem.type) {
1467
1476
  case "string":
1468
1477
  if (!oItem.translatable) {
@@ -2503,6 +2512,7 @@ sap.ui.define([
2503
2512
  if (oConfig.visualization && oConfig.visualization.type === "Tab") {
2504
2513
  var oIconTabBar = new IconTabBar({
2505
2514
  expandable: oConfig.expandable !== false,
2515
+ visible: oConfig.visible,
2506
2516
  expanded: "{currentSettings>expanded}",
2507
2517
  objectBindings: {
2508
2518
  currentSettings: {
@@ -3425,6 +3435,36 @@ sap.ui.define([
3425
3435
  return false;
3426
3436
  };
3427
3437
 
3438
+ Editor.prototype.prepareFieldsInKey = function(oConfig) {
3439
+ //get field names in the item key
3440
+ this._sKeySeparator = oConfig.values.keySeparator;
3441
+ if (!this._sKeySeparator) {
3442
+ this._sKeySeparator = "#";
3443
+ }
3444
+ var sKey = oConfig.values.item.key;
3445
+ this._aFields = sKey.split(this._sKeySeparator);
3446
+ for (var n in this._aFields) {
3447
+ //remove the {} in the field
3448
+ if (this._aFields[n].startsWith("{")) {
3449
+ this._aFields[n] = this._aFields[n].substring(1);
3450
+ }
3451
+ if (this._aFields[n].endsWith("}")) {
3452
+ this._aFields[n] = this._aFields[n].substring(0, this._aFields[n].length - 1);
3453
+ }
3454
+ }
3455
+ };
3456
+
3457
+ Editor.prototype.getKeyFromItem = function(oItem) {
3458
+ var sItemKey = "";
3459
+ this._aFields.forEach(function (field) {
3460
+ sItemKey += oItem[field].toString() + this._sKeySeparator;
3461
+ }.bind(this));
3462
+ if (sItemKey.endsWith(this._sKeySeparator)) {
3463
+ sItemKey = sItemKey.substring(0, sItemKey.length - this._sKeySeparator.length);
3464
+ }
3465
+ return sItemKey;
3466
+ };
3467
+
3428
3468
  //create static context entries
3429
3469
  Editor._contextEntries =
3430
3470
  {
@@ -3497,36 +3537,6 @@ sap.ui.define([
3497
3537
  }
3498
3538
  };
3499
3539
 
3500
- Editor.prototype.prepareFieldsInKey = function(oConfig) {
3501
- //get field names in the item key
3502
- this._sKeySeparator = oConfig.values.keySeparator;
3503
- if (!this._sKeySeparator) {
3504
- this._sKeySeparator = "#";
3505
- }
3506
- var sKey = oConfig.values.item.key;
3507
- this._aFields = sKey.split(this._sKeySeparator);
3508
- for (var n in this._aFields) {
3509
- //remove the {} in the field
3510
- if (this._aFields[n].startsWith("{")) {
3511
- this._aFields[n] = this._aFields[n].substring(1);
3512
- }
3513
- if (this._aFields[n].endsWith("}")) {
3514
- this._aFields[n] = this._aFields[n].substring(0, this._aFields[n].length - 1);
3515
- }
3516
- }
3517
- };
3518
-
3519
- Editor.prototype.getKeyFromItem = function(oItem) {
3520
- var sItemKey = "";
3521
- this._aFields.forEach(function (field) {
3522
- sItemKey += oItem[field].toString() + this._sKeySeparator;
3523
- }.bind(this));
3524
- if (sItemKey.endsWith(this._sKeySeparator)) {
3525
- sItemKey = sItemKey.substring(0, sItemKey.length - this._sKeySeparator.length);
3526
- }
3527
- return sItemKey;
3528
- };
3529
-
3530
3540
  //initializes global settings
3531
3541
  Editor.init = function () {
3532
3542
  this.init = function () { }; //replace self
@@ -16,7 +16,7 @@ sap.ui.define([
16
16
  * @alias sap.ui.integration.editor.EditorResourceBundles
17
17
  * @author SAP SE
18
18
  * @since 1.94.0
19
- * @version 1.100.0
19
+ * @version 1.101.0
20
20
  * @private
21
21
  * @experimental since 1.94.0
22
22
  * @ui5-restricted
@@ -24,7 +24,7 @@ sap.ui.define([
24
24
  * @extends sap.ui.base.ManagedObject
25
25
  *
26
26
  * @author SAP SE
27
- * @version 1.100.0
27
+ * @version 1.101.0
28
28
  *
29
29
  * @constructor
30
30
  * @public
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @extends sap.ui.integration.util.Manifest
18
18
  *
19
19
  * @author SAP SE
20
- * @version 1.100.0
20
+ * @version 1.101.0
21
21
  *
22
22
  * @constructor
23
23
  * @since 1.94
@@ -66,7 +66,7 @@ sap.ui.define([
66
66
  * @alias sap.ui.integration.editor.Settings
67
67
  * @author SAP SE
68
68
  * @since 1.83.0
69
- * @version 1.100.0
69
+ * @version 1.101.0
70
70
  * @private
71
71
  * @experimental since 1.83.0
72
72
  * @ui5-restricted
@@ -32,8 +32,7 @@ sap.ui.define([
32
32
  ) {
33
33
  "use strict";
34
34
 
35
- var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.integration"),
36
- sBuildInViz = "sap/ui/integration/editor/fields/viz";
35
+ var sBuildInViz = "sap/ui/integration/editor/fields/viz";
37
36
 
38
37
  /**
39
38
  * @class
@@ -41,7 +40,7 @@ sap.ui.define([
41
40
  * @alias sap.ui.integration.editor.fields.BaseField
42
41
  * @author SAP SE
43
42
  * @since 1.83.0
44
- * @version 1.100.0
43
+ * @version 1.101.0
45
44
  * @private
46
45
  * @ui5-restricted
47
46
  * @experimental since 1.83.0
@@ -173,10 +172,11 @@ sap.ui.define([
173
172
  }
174
173
  };
175
174
 
175
+ BaseField.prototype.getResourceBundle = function() {
176
+ return this.getModel("i18n").getResourceBundle();
177
+ };
178
+
176
179
  BaseField.prototype.setConfiguration = function (oConfig, bSuppress) {
177
- if (oResourceBundle && oResourceBundle.sLocale !== Core.getConfiguration().getLanguage()) {
178
- oResourceBundle = Core.getLibraryResourceBundle("sap.ui.integration");
179
- }
180
180
  if (oConfig !== this.getConfiguration()) {
181
181
  //sanitize configuration
182
182
  this._sanitizeValidationSettings(oConfig);
@@ -407,9 +407,9 @@ sap.ui.define([
407
407
  }
408
408
  if (!sError) {
409
409
  if (oSettings._txt) {
410
- sError = oResourceBundle.getText(oValidations[oSettings._txt], [oSettings[n]]);
410
+ sError = this.getResourceBundle().getText(oValidations[oSettings._txt], [oSettings[n]]);
411
411
  } else {
412
- sError = oResourceBundle.getText(oValidations[n + "Txt"], [oSettings[n]]);
412
+ sError = this.getResourceBundle().getText(oValidations[n + "Txt"], [oSettings[n]]);
413
413
  }
414
414
  }
415
415
  this._showValueState(oSettings.type || "error", sError);
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @alias sap.ui.integration.editor.fields.BooleanField
18
18
  * @author SAP SE
19
19
  * @since 1.83.0
20
- * @version 1.100.0
20
+ * @version 1.101.0
21
21
  * @private
22
22
  * @experimental since 1.83.0
23
23
  * @ui5-restricted
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @alias sap.ui.integration.editor.fields.DateField
18
18
  * @author SAP SE
19
19
  * @since 1.83.0
20
- * @version 1.100.0
20
+ * @version 1.101.0
21
21
  * @private
22
22
  * @experimental since 1.83.0
23
23
  * @ui5-restricted
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @alias sap.ui.integration.editor.fields.DateTimeField
18
18
  * @author SAP SE
19
19
  * @since 1.83.0
20
- * @version 1.100.0
20
+ * @version 1.101.0
21
21
  * @private
22
22
  * @experimental since 1.83.0
23
23
  * @ui5-restricted
@@ -19,7 +19,7 @@ sap.ui.define([
19
19
  * @alias sap.ui.integration.editor.fields.DestinationField
20
20
  * @author SAP SE
21
21
  * @since 1.83.0
22
- * @version 1.100.0
22
+ * @version 1.101.0
23
23
  * @private
24
24
  * @experimental since 1.83.0
25
25
  * @ui5-restricted
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @alias sap.ui.integration.editor.fields.IntegerField
18
18
  * @author SAP SE
19
19
  * @since 1.83.0
20
- * @version 1.100.0
20
+ * @version 1.101.0
21
21
  * @private
22
22
  * @experimental since 1.83.0
23
23
  * @ui5-restricted
@@ -17,7 +17,7 @@ sap.ui.define([
17
17
  * @alias sap.ui.integration.editor.fields.NumberField
18
18
  * @author SAP SE
19
19
  * @since 1.83.0
20
- * @version 1.100.0
20
+ * @version 1.101.0
21
21
  * @private
22
22
  * @experimental since 1.83.0
23
23
  * @ui5-restricted
@@ -58,7 +58,6 @@ sap.ui.define([
58
58
  merge
59
59
  ) {
60
60
  "use strict";
61
- var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.integration");
62
61
  var REGEXP_TRANSLATABLE = /\{\{(?!parameters.)(?!destinations.)([^\}\}]+)\}\}/g;
63
62
 
64
63
  /**
@@ -67,7 +66,7 @@ sap.ui.define([
67
66
  * @alias sap.ui.integration.editor.fields.ObjectField
68
67
  * @author SAP SE
69
68
  * @since 1.100.0
70
- * @version 1.100.0
69
+ * @version 1.101.0
71
70
  * @private
72
71
  * @experimental since 1.100.0
73
72
  * @ui5-restricted
@@ -170,6 +169,7 @@ sap.ui.define([
170
169
 
171
170
  ObjectField.prototype.createSimpleFormVisualization = function(oConfig) {
172
171
  var that = this;
172
+ var oResourceBundle = that.getResourceBundle();
173
173
  var fnChange = function() {
174
174
  var oModel = this.getAggregation("_field").getModel();
175
175
  oModel.checkUpdate(true);
@@ -335,7 +335,6 @@ sap.ui.define([
335
335
  case "Text":
336
336
  oCellSettings = {
337
337
  text: sDefaultValue,
338
- tooltip: sDefaultValue,
339
338
  wrapping: false
340
339
  };
341
340
  oCellSettings = merge(oCellSettings, oCell);
@@ -365,6 +364,7 @@ sap.ui.define([
365
364
  };
366
365
  }
367
366
  }
367
+ oCellSettings.tooltip = oCell.tooltip || oCellSettings.text;
368
368
  oCellTemplate = new Text(oCellSettings);
369
369
  break;
370
370
  case "Icon":
@@ -428,11 +428,13 @@ sap.ui.define([
428
428
 
429
429
  ObjectField.prototype.createTableToolbar = function(oConfig) {
430
430
  var that = this;
431
+ var oResourceBundle = that.getResourceBundle();
431
432
  // check if has filterProperty defined in each column of config.properties
432
433
  var bHasFilterDefined = that.checkHasFilter(oConfig);
433
434
  var bAddButtonVisible = oConfig.enabled !== false;
435
+ var sAddButtonTooltip = oConfig.addButtonTooltip || oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_ADD_TOOLTIP");
434
436
  if (bAddButtonVisible && oConfig.values) {
435
- bAddButtonVisible = oConfig.values.allowCreateNew === true;
437
+ bAddButtonVisible = oConfig.values.allowAdd === true;
436
438
  }
437
439
  return new OverflowToolbar({
438
440
  content: [
@@ -440,7 +442,7 @@ sap.ui.define([
440
442
  new Button({
441
443
  icon: "sap-icon://add",
442
444
  visible: bAddButtonVisible,
443
- tooltip: oResourceBundle.getText("EDITOR_FIELD_OBJECT_TABLE_BUTTON_ADD_TOOLTIP"),
445
+ tooltip: sAddButtonTooltip,
444
446
  press: that.createNewObject.bind(that)
445
447
  }),
446
448
  new Button({
@@ -511,6 +513,7 @@ sap.ui.define([
511
513
  ObjectField.prototype.createActionColumn = function() {
512
514
  var that = this;
513
515
  var oConfig = that.getConfiguration();
516
+ var oResourceBundle = that.getResourceBundle();
514
517
  return new Column({
515
518
  width: "5rem",
516
519
  hAlign: "Center",
@@ -611,7 +614,7 @@ sap.ui.define([
611
614
  ObjectField.prototype.createNewObject = function (oEvent) {
612
615
  var that = this;
613
616
  var oControl = oEvent.getSource();
614
- that.openObjectDetailsPopover(that._newObjectTemplate, oControl, "create");
617
+ that.openObjectDetailsPopover(that._newObjectTemplate, oControl, "add");
615
618
  };
616
619
 
617
620
  ObjectField.prototype.mergeValueWithRequestResult = function (tResult) {
@@ -648,6 +651,7 @@ sap.ui.define([
648
651
 
649
652
  ObjectField.prototype.onChangeOfTextArea = function (oEvent) {
650
653
  var that = this;
654
+ var oResourceBundle = that.getResourceBundle();
651
655
  var oTextArea = oEvent.getSource();
652
656
  var sValue = oTextArea.getValue();
653
657
  if (!sValue || sValue === "") {
@@ -670,6 +674,7 @@ sap.ui.define([
670
674
 
671
675
  ObjectField.prototype.onChangeOfTextAreaInPopover = function (oEvent) {
672
676
  var that = this;
677
+ var oResourceBundle = that.getResourceBundle();
673
678
  var oTextArea = oEvent.getSource();
674
679
  var sValue = oTextArea.getValue();
675
680
  if (!sValue || sValue === "") {
@@ -917,12 +922,13 @@ sap.ui.define([
917
922
  ObjectField.prototype.openObjectDetailsPopover = function (oItem, oControl, sMode) {
918
923
  var that = this;
919
924
  var oField = that.getAggregation("_field");
925
+ var oResourceBundle = that.getResourceBundle();
920
926
  var oItemCloned = deepClone(oItem, 500);
921
927
  var oModel;
922
928
  if (!that._oObjectDetailsPopover) {
923
- var oCreateButton = new Button({
924
- text: oResourceBundle.getText("EDITOR_FIELD_OBJECT_DETAILS_POPOVER_BUTTON_CREATE"),
925
- visible: sMode === "create",
929
+ var oAddButton = new Button({
930
+ text: oResourceBundle.getText("EDITOR_FIELD_OBJECT_DETAILS_POPOVER_BUTTON_ADD"),
931
+ visible: sMode === "add",
926
932
  enabled: {
927
933
  path: '/value',
928
934
  formatter: function(vValue) {
@@ -948,6 +954,20 @@ sap.ui.define([
948
954
  },
949
955
  press: that.onUpdate.bind(that)
950
956
  });
957
+ var oCancelButton = new Button({
958
+ text: oResourceBundle.getText("EDITOR_FIELD_OBJECT_DETAILS_POPOVER_BUTTON_CANCEL"),
959
+ visible: sMode !== "view",
960
+ press: function () {
961
+ that._oObjectDetailsPopover.close();
962
+ }
963
+ });
964
+ var oCloseButton = new Button({
965
+ text: oResourceBundle.getText("EDITOR_FIELD_OBJECT_DETAILS_POPOVER_BUTTON_CLOSE"),
966
+ visible: sMode === "view",
967
+ press: function () {
968
+ that._oObjectDetailsPopover.close();
969
+ }
970
+ });
951
971
  oModel = new JSONModel({
952
972
  "value": oItemCloned,
953
973
  "editMode": "Properties"
@@ -958,9 +978,9 @@ sap.ui.define([
958
978
  oModel.checkUpdate(true);
959
979
  var oNewObject = oModel.getProperty("/value");
960
980
  if (oNewObject && oNewObject !== "" && typeof oNewObject === "object" && !deepEqual(oNewObject, {})) {
961
- oCreateButton.setEnabled(true);
981
+ oAddButton.setEnabled(true);
962
982
  } else {
963
- oCreateButton.setEnabled(false);
983
+ oAddButton.setEnabled(false);
964
984
  }
965
985
  };
966
986
  var fnChange = function() {};
@@ -1035,34 +1055,38 @@ sap.ui.define([
1035
1055
  footer: new OverflowToolbar({
1036
1056
  content: [
1037
1057
  new ToolbarSpacer(),
1038
- oCreateButton,
1058
+ oAddButton,
1039
1059
  oUpdateButton,
1040
- new Button({
1041
- text: oResourceBundle.getText("EDITOR_FIELD_OBJECT_DETAILS_POPOVER_BUTTON_CLOSE"),
1042
- press: function () {
1043
- that._oObjectDetailsPopover.close();
1044
- }
1045
- })
1060
+ oCancelButton,
1061
+ oCloseButton
1046
1062
  ]
1047
1063
  })
1048
1064
  }).addStyleClass("sapUiIntegrationEditorItemObjectFieldDetailsPopover");
1049
1065
  that._oObjectDetailsPopover.setModel(oModel);
1050
1066
  that._oObjectDetailsPopover.setModel(that.getModel("i18n"), "i18n");
1051
- that._oObjectDetailsPopover._oCreateButton = oCreateButton;
1067
+ that._oObjectDetailsPopover._oAddButton = oAddButton;
1052
1068
  that._oObjectDetailsPopover._oUpdateButton = oUpdateButton;
1069
+ that._oObjectDetailsPopover._oCancelButton = oCancelButton;
1070
+ that._oObjectDetailsPopover._oCloseButton = oCloseButton;
1053
1071
  that._oObjectDetailsPopover._openBy = oControl;
1054
1072
  } else {
1055
1073
  oModel = that._oObjectDetailsPopover.getModel();
1056
1074
  oModel.setProperty("/value", oItemCloned);
1057
- if (sMode === "create") {
1058
- that._oObjectDetailsPopover._oCreateButton.setVisible(true);
1075
+ if (sMode === "add") {
1076
+ that._oObjectDetailsPopover._oAddButton.setVisible(true);
1059
1077
  that._oObjectDetailsPopover._oUpdateButton.setVisible(false);
1078
+ that._oObjectDetailsPopover._oCancelButton.setVisible(true);
1079
+ that._oObjectDetailsPopover._oCloseButton.setVisible(false);
1060
1080
  } else if (sMode === "update") {
1061
- that._oObjectDetailsPopover._oCreateButton.setVisible(false);
1081
+ that._oObjectDetailsPopover._oAddButton.setVisible(false);
1062
1082
  that._oObjectDetailsPopover._oUpdateButton.setVisible(true);
1083
+ that._oObjectDetailsPopover._oCancelButton.setVisible(true);
1084
+ that._oObjectDetailsPopover._oCloseButton.setVisible(false);
1063
1085
  } else {
1064
- that._oObjectDetailsPopover._oCreateButton.setVisible(false);
1086
+ that._oObjectDetailsPopover._oAddButton.setVisible(false);
1065
1087
  that._oObjectDetailsPopover._oUpdateButton.setVisible(false);
1088
+ that._oObjectDetailsPopover._oCancelButton.setVisible(false);
1089
+ that._oObjectDetailsPopover._oCloseButton.setVisible(true);
1066
1090
  }
1067
1091
  that._oObjectDetailsPopover._openBy = oControl;
1068
1092
  }
@@ -1089,7 +1113,7 @@ sap.ui.define([
1089
1113
 
1090
1114
  // restore the selections since the selections are lost, BCP: 2280048930, JIRA: CPOUIFTEAMB-252
1091
1115
  if (bHasBeforeValue) {
1092
- that.applyBeforeValueAndSelections("create", oParameter);
1116
+ that.applyBeforeValueAndSelections("add", oParameter);
1093
1117
  }
1094
1118
  };
1095
1119
 
@@ -1166,7 +1190,7 @@ sap.ui.define([
1166
1190
  var sPath = oControl.getBinding("rows").getPath();
1167
1191
  var iRealIndexOfFilteredOut;
1168
1192
  switch (sMode) {
1169
- case "create":
1193
+ case "add":
1170
1194
  if (iSelectedIndex > -1) {
1171
1195
  oControl.setSelectedIndex(iSelectedIndex);
1172
1196
  oControl._sPathOfFilteredOut = null;
@@ -22,7 +22,6 @@ sap.ui.define([
22
22
  includes
23
23
  ) {
24
24
  "use strict";
25
- var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.integration");
26
25
 
27
26
  /**
28
27
  * @class Object List Field with object list value, such as [{"key": "key1"}, {"key": "key2"}]
@@ -30,7 +29,7 @@ sap.ui.define([
30
29
  * @alias sap.ui.integration.editor.fields.ObjectListField
31
30
  * @author SAP SE
32
31
  * @since 1.100.0
33
- * @version 1.100.0
32
+ * @version 1.101.0
34
33
  * @private
35
34
  * @experimental since 1.100.0
36
35
  * @ui5-restricted
@@ -169,6 +168,7 @@ sap.ui.define([
169
168
 
170
169
  ObjectListField.prototype.onChangeOfTextArea = function (oEvent) {
171
170
  var that = this;
171
+ var oResourceBundle = that.getResourceBundle();
172
172
  var oTextArea = oEvent.getSource();
173
173
  var sValue = oTextArea.getValue();
174
174
  if (!sValue || sValue === "") {
@@ -225,7 +225,7 @@ sap.ui.define([
225
225
  var oNewValue = [];
226
226
  var aSelectedIndicesCloned;
227
227
  switch (sMode) {
228
- case "create":
228
+ case "add":
229
229
  // update the selections
230
230
  aSelectedIndices.forEach(function(iSelectedIndex) {
231
231
  oControl.addSelectionInterval(iSelectedIndex, iSelectedIndex);
@@ -46,7 +46,7 @@ sap.ui.define([
46
46
  * @alias sap.ui.integration.editor.fields.StringField
47
47
  * @author SAP SE
48
48
  * @since 1.83.0
49
- * @version 1.100.0
49
+ * @version 1.101.0
50
50
  * @private
51
51
  * @experimental since 1.83.0
52
52
  * @ui5-restricted
@@ -273,9 +273,9 @@ sap.ui.define([
273
273
  if (this.isFilterBackend()) {
274
274
  this.onInput = _debounce(this.onInput, 500);
275
275
  //if need to filter backend by input value, need to hook the onInput function which only support filter locally.
276
- oControl.oninput = this.onInput;
276
+ oControl.oninput = this.onInput.bind(this);
277
277
  //listen to the selectionChange event of Combobox
278
- oControl.attachSelectionChange(this.onSelectionChange);
278
+ oControl.attachSelectionChange(this.onSelectionChange.bind(this));
279
279
  }
280
280
  }
281
281
  this._settingsModel = this.getModel("currentSettings");
@@ -400,7 +400,7 @@ sap.ui.define([
400
400
  that._aOriginTranslatedValues = oField.getOriginTranslatedValues(oConfig);
401
401
  }
402
402
  var aTempTranslatedLanguages = deepClone(that._aOriginTranslatedValues, 500);
403
- var oResourceBundle = Core.getLibraryResourceBundle("sap.ui.integration");
403
+ var oResourceBundle = oField.getResourceBundle();
404
404
  //merge the value in texts or beforeLayerChange into the value list of i18n files
405
405
  aTempTranslatedLanguages.forEach(function (translatedValue) {
406
406
  var sTranslateText = oField.getTranslationValueInTexts(translatedValue.key, oConfig.manifestpath);