@openui5/sap.ui.webc.common 1.111.0 → 1.112.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 (154) hide show
  1. package/package.json +2 -2
  2. package/src/sap/ui/webc/common/.library +2 -2
  3. package/src/sap/ui/webc/common/Configuration.js +6 -0
  4. package/src/sap/ui/webc/common/Icons.js +6 -0
  5. package/src/sap/ui/webc/common/WebComponent.js +1 -1
  6. package/src/sap/ui/webc/common/WebComponentMetadata.js +1 -1
  7. package/src/sap/ui/webc/common/library.js +3 -3
  8. package/src/sap/ui/webc/common/thirdparty/base/Boot.js +2 -11
  9. package/src/sap/ui/webc/common/thirdparty/base/CSP.js +3 -14
  10. package/src/sap/ui/webc/common/thirdparty/base/CustomElementsRegistry.js +0 -21
  11. package/src/sap/ui/webc/common/thirdparty/base/CustomElementsScopeUtils.js +5 -22
  12. package/src/sap/ui/webc/common/thirdparty/base/DOMObserver.js +5 -18
  13. package/src/sap/ui/webc/common/thirdparty/base/Device.js +2 -35
  14. package/src/sap/ui/webc/common/thirdparty/base/EventProvider.js +2 -21
  15. package/src/sap/ui/webc/common/thirdparty/base/FeaturesRegistry.js +0 -4
  16. package/src/sap/ui/webc/common/thirdparty/base/FontFace.js +4 -8
  17. package/src/sap/ui/webc/common/thirdparty/base/InitialConfiguration.js +13 -42
  18. package/src/sap/ui/webc/common/thirdparty/base/Keys.js +3 -138
  19. package/src/sap/ui/webc/common/thirdparty/base/ManagedStyles.js +0 -19
  20. package/src/sap/ui/webc/common/thirdparty/base/MediaRange.js +4 -8
  21. package/src/sap/ui/webc/common/thirdparty/base/PropertiesFileFormat.js +2 -16
  22. package/src/sap/ui/webc/common/thirdparty/base/Render.js +14 -35
  23. package/src/sap/ui/webc/common/thirdparty/base/RenderQueue.js +1 -16
  24. package/src/sap/ui/webc/common/thirdparty/base/RenderScheduler.js +2 -10
  25. package/src/sap/ui/webc/common/thirdparty/base/Runtimes.js +18 -34
  26. package/src/sap/ui/webc/common/thirdparty/base/StaticAreaItem.js +4 -25
  27. package/src/sap/ui/webc/common/thirdparty/base/SystemCSSVars.js +0 -3
  28. package/src/sap/ui/webc/common/thirdparty/base/UI5Element.js +104 -246
  29. package/src/sap/ui/webc/common/thirdparty/base/UI5ElementMetadata.js +39 -84
  30. package/src/sap/ui/webc/common/thirdparty/base/animations/AnimationQueue.js +0 -11
  31. package/src/sap/ui/webc/common/thirdparty/base/animations/animate.js +0 -8
  32. package/src/sap/ui/webc/common/thirdparty/base/animations/scroll.js +0 -4
  33. package/src/sap/ui/webc/common/thirdparty/base/animations/slideDown.js +9 -10
  34. package/src/sap/ui/webc/common/thirdparty/base/animations/slideUp.js +4 -7
  35. package/src/sap/ui/webc/common/thirdparty/base/asset-registries/Icons.js +9 -34
  36. package/src/sap/ui/webc/common/thirdparty/base/asset-registries/Illustrations.js +0 -8
  37. package/src/sap/ui/webc/common/thirdparty/base/asset-registries/LocaleData.js +36 -57
  38. package/src/sap/ui/webc/common/thirdparty/base/asset-registries/Themes.js +4 -27
  39. package/src/sap/ui/webc/common/thirdparty/base/asset-registries/i18n.js +12 -37
  40. package/src/sap/ui/webc/common/thirdparty/base/assets-meta/IconCollectionsAlias.js +0 -1
  41. package/src/sap/ui/webc/common/thirdparty/base/config/AnimationMode.js +0 -7
  42. package/src/sap/ui/webc/common/thirdparty/base/config/CalendarType.js +2 -7
  43. package/src/sap/ui/webc/common/thirdparty/base/config/FormatSettings.js +2 -4
  44. package/src/sap/ui/webc/common/thirdparty/base/config/Icons.js +3 -11
  45. package/src/sap/ui/webc/common/thirdparty/base/config/Language.js +4 -14
  46. package/src/sap/ui/webc/common/thirdparty/base/config/NoConflict.js +4 -14
  47. package/src/sap/ui/webc/common/thirdparty/base/config/RTL.js +2 -8
  48. package/src/sap/ui/webc/common/thirdparty/base/config/Theme.js +4 -15
  49. package/src/sap/ui/webc/common/thirdparty/base/delegate/ItemNavigation.js +8 -72
  50. package/src/sap/ui/webc/common/thirdparty/base/delegate/ResizeHandler.js +8 -23
  51. package/src/sap/ui/webc/common/thirdparty/base/delegate/ScrollEnablement.js +9 -34
  52. package/src/sap/ui/webc/common/thirdparty/base/features/F6Navigation.js +1 -20
  53. package/src/sap/ui/webc/common/thirdparty/base/features/OpenUI5Enablement.js +0 -17
  54. package/src/sap/ui/webc/common/thirdparty/base/features/OpenUI5Support.js +0 -32
  55. package/src/sap/ui/webc/common/thirdparty/base/generated/VersionInfo.js +1 -1
  56. package/src/sap/ui/webc/common/thirdparty/base/getSharedResource.js +1 -9
  57. package/src/sap/ui/webc/common/thirdparty/base/i18nBundle.js +4 -18
  58. package/src/sap/ui/webc/common/thirdparty/base/locale/Locale.js +0 -25
  59. package/src/sap/ui/webc/common/thirdparty/base/locale/RTLAwareRegistry.js +0 -4
  60. package/src/sap/ui/webc/common/thirdparty/base/locale/applyDirection.js +0 -2
  61. package/src/sap/ui/webc/common/thirdparty/base/locale/directionChange.js +2 -9
  62. package/src/sap/ui/webc/common/thirdparty/base/locale/getEffectiveDir.js +4 -9
  63. package/src/sap/ui/webc/common/thirdparty/base/locale/getLocale.js +3 -11
  64. package/src/sap/ui/webc/common/thirdparty/base/locale/languageChange.js +0 -8
  65. package/src/sap/ui/webc/common/thirdparty/base/locale/nextFallbackLocale.js +4 -8
  66. package/src/sap/ui/webc/common/thirdparty/base/locale/normalizeLocale.js +8 -14
  67. package/src/sap/ui/webc/common/thirdparty/base/renderer/LitRenderer.js +0 -11
  68. package/src/sap/ui/webc/common/thirdparty/base/renderer/directives/style-map.js +7 -21
  69. package/src/sap/ui/webc/common/thirdparty/base/renderer/executeTemplate.js +1 -6
  70. package/src/sap/ui/webc/common/thirdparty/base/theming/CustomStyle.js +2 -16
  71. package/src/sap/ui/webc/common/thirdparty/base/theming/ThemeLoaded.js +0 -8
  72. package/src/sap/ui/webc/common/thirdparty/base/theming/applyTheme.js +6 -21
  73. package/src/sap/ui/webc/common/thirdparty/base/theming/getConstructableStyle.js +1 -6
  74. package/src/sap/ui/webc/common/thirdparty/base/theming/getEffectiveLinksHrefs.js +0 -7
  75. package/src/sap/ui/webc/common/thirdparty/base/theming/getEffectiveStyle.js +0 -8
  76. package/src/sap/ui/webc/common/thirdparty/base/theming/getStylesString.js +0 -4
  77. package/src/sap/ui/webc/common/thirdparty/base/theming/getThemeDesignerTheme.js +4 -22
  78. package/src/sap/ui/webc/common/thirdparty/base/theming/preloadLinks.js +0 -5
  79. package/src/sap/ui/webc/common/thirdparty/base/thirdparty/_merge.js +10 -20
  80. package/src/sap/ui/webc/common/thirdparty/base/thirdparty/isPlainObject.js +0 -6
  81. package/src/sap/ui/webc/common/thirdparty/base/thirdparty/merge.js +0 -3
  82. package/src/sap/ui/webc/common/thirdparty/base/types/CSSColor.js +0 -4
  83. package/src/sap/ui/webc/common/thirdparty/base/types/CSSSize.js +0 -4
  84. package/src/sap/ui/webc/common/thirdparty/base/types/CalendarType.js +0 -5
  85. package/src/sap/ui/webc/common/thirdparty/base/types/DataType.js +0 -8
  86. package/src/sap/ui/webc/common/thirdparty/base/types/Float.js +0 -5
  87. package/src/sap/ui/webc/common/thirdparty/base/types/Integer.js +0 -5
  88. package/src/sap/ui/webc/common/thirdparty/base/types/InvisibleMessageMode.js +0 -6
  89. package/src/sap/ui/webc/common/thirdparty/base/types/ItemNavigationBehavior.js +0 -2
  90. package/src/sap/ui/webc/common/thirdparty/base/types/PopupState.js +0 -8
  91. package/src/sap/ui/webc/common/thirdparty/base/types/ValueState.js +0 -5
  92. package/src/sap/ui/webc/common/thirdparty/base/updateShadowRoot.js +0 -5
  93. package/src/sap/ui/webc/common/thirdparty/base/util/AriaLabelHelper.js +1 -9
  94. package/src/sap/ui/webc/common/thirdparty/base/util/Caret.js +0 -6
  95. package/src/sap/ui/webc/common/thirdparty/base/util/ColorConversion.js +29 -46
  96. package/src/sap/ui/webc/common/thirdparty/base/util/FetchHelper.js +0 -10
  97. package/src/sap/ui/webc/common/thirdparty/base/util/FocusableElements.js +2 -19
  98. package/src/sap/ui/webc/common/thirdparty/base/util/InvisibleMessage.js +3 -9
  99. package/src/sap/ui/webc/common/thirdparty/base/util/PopupUtils.js +0 -28
  100. package/src/sap/ui/webc/common/thirdparty/base/util/SlotsHelper.js +4 -15
  101. package/src/sap/ui/webc/common/thirdparty/base/util/StringHelper.js +0 -7
  102. package/src/sap/ui/webc/common/thirdparty/base/util/TabbableElements.js +0 -12
  103. package/src/sap/ui/webc/common/thirdparty/base/util/arraysAreEqual.js +0 -4
  104. package/src/sap/ui/webc/common/thirdparty/base/util/clamp.js +0 -2
  105. package/src/sap/ui/webc/common/thirdparty/base/util/createLinkInHead.js +0 -2
  106. package/src/sap/ui/webc/common/thirdparty/base/util/createStyleInHead.js +0 -2
  107. package/src/sap/ui/webc/common/thirdparty/base/util/debounce.js +1 -3
  108. package/src/sap/ui/webc/common/thirdparty/base/util/detectNavigatorLanguage.js +0 -4
  109. package/src/sap/ui/webc/common/thirdparty/base/util/escapeRegex.js +0 -2
  110. package/src/sap/ui/webc/common/thirdparty/base/util/findNodeOwner.js +0 -6
  111. package/src/sap/ui/webc/common/thirdparty/base/util/formatMessage.js +2 -7
  112. package/src/sap/ui/webc/common/thirdparty/base/util/generateHighlightedMarkup.js +9 -17
  113. package/src/sap/ui/webc/common/thirdparty/base/util/getActiveElement.js +0 -4
  114. package/src/sap/ui/webc/common/thirdparty/base/util/getClassCopy.js +0 -3
  115. package/src/sap/ui/webc/common/thirdparty/base/util/getDesigntimePropertyAsArray.js +0 -2
  116. package/src/sap/ui/webc/common/thirdparty/base/util/getEffectiveContentDensity.js +0 -2
  117. package/src/sap/ui/webc/common/thirdparty/base/util/getFileExtension.js +0 -4
  118. package/src/sap/ui/webc/common/thirdparty/base/util/getNormalizedTarget.js +0 -4
  119. package/src/sap/ui/webc/common/thirdparty/base/util/getSingletonElementInstance.js +0 -4
  120. package/src/sap/ui/webc/common/thirdparty/base/util/isDefaultSlotProvided.js +0 -2
  121. package/src/sap/ui/webc/common/thirdparty/base/util/isDescendantOf.js +0 -6
  122. package/src/sap/ui/webc/common/thirdparty/base/util/isElementInView.js +0 -2
  123. package/src/sap/ui/webc/common/thirdparty/base/util/isNodeClickable.js +0 -5
  124. package/src/sap/ui/webc/common/thirdparty/base/util/isNodeHidden.js +0 -3
  125. package/src/sap/ui/webc/common/thirdparty/base/util/isNodeTabbable.js +0 -9
  126. package/src/sap/ui/webc/common/thirdparty/base/util/isValidPropertyName.js +1 -3
  127. package/src/sap/ui/webc/common/thirdparty/base/util/setToArray.js +0 -2
  128. package/src/sap/ui/webc/common/thirdparty/base/util/whenDOMReady.js +0 -2
  129. package/src/sap/ui/webc/common/thirdparty/icons/generated/json-imports/i18n.js +0 -52
  130. package/src/sap/ui/webc/common/thirdparty/icons/json-imports/Icons.js +0 -5
  131. package/src/sap/ui/webc/common/thirdparty/icons-business-suite/json-imports/Icons.js +0 -3
  132. package/src/sap/ui/webc/common/thirdparty/icons-tnt/json-imports/Icons.js +0 -3
  133. package/src/sap/ui/webc/common/thirdparty/lit-html/directive-helpers.js +62 -70
  134. package/src/sap/ui/webc/common/thirdparty/lit-html/directive.js +11 -20
  135. package/src/sap/ui/webc/common/thirdparty/lit-html/directives/class-map.js +0 -10
  136. package/src/sap/ui/webc/common/thirdparty/lit-html/directives/if-defined.js +0 -2
  137. package/src/sap/ui/webc/common/thirdparty/lit-html/directives/repeat.js +55 -71
  138. package/src/sap/ui/webc/common/thirdparty/lit-html/directives/unsafe-html.js +0 -4
  139. package/src/sap/ui/webc/common/thirdparty/lit-html/lit-html.js +96 -171
  140. package/src/sap/ui/webc/common/thirdparty/lit-html/static.js +34 -40
  141. package/src/sap/ui/webc/common/thirdparty/localization/DateFormat.js +0 -2
  142. package/src/sap/ui/webc/common/thirdparty/localization/LocaleData.js +0 -2
  143. package/src/sap/ui/webc/common/thirdparty/localization/dates/CalendarDate.js +13 -56
  144. package/src/sap/ui/webc/common/thirdparty/localization/dates/ExtremeDates.js +0 -11
  145. package/src/sap/ui/webc/common/thirdparty/localization/dates/calculateWeekNumber.js +5 -8
  146. package/src/sap/ui/webc/common/thirdparty/localization/dates/getRoundedTimestamp.js +0 -3
  147. package/src/sap/ui/webc/common/thirdparty/localization/dates/getTodayUTCTimestamp.js +0 -3
  148. package/src/sap/ui/webc/common/thirdparty/localization/dates/modifyDateBy.js +0 -9
  149. package/src/sap/ui/webc/common/thirdparty/localization/getCachedLocaleDataInstance.js +0 -5
  150. package/src/sap/ui/webc/common/thirdparty/localization/locale/getLocaleData.js +1 -6
  151. package/src/sap/ui/webc/common/thirdparty/theming/generated/json-imports/Themes.js +0 -16
  152. package/ui5.yaml +7 -7
  153. package/src/sap/ui/webc/common/thirdparty/icons-business-suite/main-milestone.js +0 -25
  154. package/src/sap/ui/webc/common/thirdparty/icons-business-suite/main-sequence.js +0 -25
@@ -7,16 +7,12 @@ sap.ui.define(["exports", "./util/createStyleInHead", "./util/createLinkInHead",
7
7
  _exports.updateStyle = _exports.removeStyle = _exports.hasStyle = _exports.createStyle = _exports.createOrUpdateStyle = void 0;
8
8
  _createStyleInHead = _interopRequireDefault(_createStyleInHead);
9
9
  _createLinkInHead = _interopRequireDefault(_createLinkInHead);
10
-
11
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
11
  const getStyleId = (name, value) => {
14
12
  return value ? `${name}|${value}` : name;
15
13
  };
16
-
17
14
  const createStyle = (data, name, value = "") => {
18
15
  const content = typeof data === "string" ? data : data.content;
19
-
20
16
  if ((0, _CSP.shouldUseLinks)()) {
21
17
  const attributes = {};
22
18
  attributes[name] = value;
@@ -26,7 +22,6 @@ sap.ui.define(["exports", "./util/createStyleInHead", "./util/createLinkInHead",
26
22
  const stylesheet = new CSSStyleSheet();
27
23
  stylesheet.replaceSync(content);
28
24
  stylesheet._ui5StyleId = getStyleId(name, value); // set an id so that we can find the style later
29
-
30
25
  document.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];
31
26
  } else {
32
27
  const attributes = {};
@@ -34,12 +29,9 @@ sap.ui.define(["exports", "./util/createStyleInHead", "./util/createLinkInHead",
34
29
  (0, _createStyleInHead.default)(content, attributes);
35
30
  }
36
31
  };
37
-
38
32
  _exports.createStyle = createStyle;
39
-
40
33
  const updateStyle = (data, name, value = "") => {
41
34
  const content = typeof data === "string" ? data : data.content;
42
-
43
35
  if ((0, _CSP.shouldUseLinks)()) {
44
36
  document.querySelector(`head>link[${name}="${value}"]`).href = (0, _CSP.getUrl)(data.packageName, data.fileName);
45
37
  } else if (document.adoptedStyleSheets) {
@@ -48,27 +40,20 @@ sap.ui.define(["exports", "./util/createStyleInHead", "./util/createLinkInHead",
48
40
  document.querySelector(`head>style[${name}="${value}"]`).textContent = content || "";
49
41
  }
50
42
  };
51
-
52
43
  _exports.updateStyle = updateStyle;
53
-
54
44
  const hasStyle = (name, value = "") => {
55
45
  if ((0, _CSP.shouldUseLinks)()) {
56
46
  return !!document.querySelector(`head>link[${name}="${value}"]`);
57
47
  }
58
-
59
48
  if (document.adoptedStyleSheets) {
60
49
  return !!document.adoptedStyleSheets.find(sh => sh._ui5StyleId === getStyleId(name, value));
61
50
  }
62
-
63
51
  return !!document.querySelector(`head>style[${name}="${value}"]`);
64
52
  };
65
-
66
53
  _exports.hasStyle = hasStyle;
67
-
68
54
  const removeStyle = (name, value = "") => {
69
55
  if ((0, _CSP.shouldUseLinks)()) {
70
56
  const linkElement = document.querySelector(`head>link[${name}="${value}"]`);
71
-
72
57
  if (linkElement) {
73
58
  linkElement.parentElement.removeChild(linkElement);
74
59
  }
@@ -76,15 +61,12 @@ sap.ui.define(["exports", "./util/createStyleInHead", "./util/createLinkInHead",
76
61
  document.adoptedStyleSheets = document.adoptedStyleSheets.filter(sh => sh._ui5StyleId !== getStyleId(name, value));
77
62
  } else {
78
63
  const styleElement = document.querySelector(`head > style[${name}="${value}"]`);
79
-
80
64
  if (styleElement) {
81
65
  styleElement.parentElement.removeChild(styleElement);
82
66
  }
83
67
  }
84
68
  };
85
-
86
69
  _exports.removeStyle = removeStyle;
87
-
88
70
  const createOrUpdateStyle = (data, name, value = "") => {
89
71
  if (hasStyle(name, value)) {
90
72
  updateStyle(data, name, value);
@@ -92,6 +74,5 @@ sap.ui.define(["exports", "./util/createStyleInHead", "./util/createLinkInHead",
92
74
  createStyle(data, name, value);
93
75
  }
94
76
  };
95
-
96
77
  _exports.createOrUpdateStyle = createOrUpdateStyle;
97
78
  });
@@ -6,6 +6,7 @@ sap.ui.define(["exports"], function (_exports) {
6
6
  });
7
7
  _exports.default = void 0;
8
8
  const querySets = {};
9
+
9
10
  /**
10
11
  * Initializes a screen width media query range set.
11
12
  *
@@ -33,13 +34,13 @@ sap.ui.define(["exports"], function (_exports) {
33
34
  * @function
34
35
  * @public
35
36
  */
36
-
37
37
  const _initRangeSet = (name, borders, names) => {
38
38
  querySets[name] = {
39
39
  borders,
40
40
  names
41
41
  };
42
42
  };
43
+
43
44
  /**
44
45
  * Returns information about the current active range of the range set with the given name.
45
46
  *
@@ -55,24 +56,20 @@ sap.ui.define(["exports"], function (_exports) {
55
56
  * @function
56
57
  * @public
57
58
  */
58
-
59
-
60
59
  const _getCurrentRange = (name, width = window.innerWidth) => {
61
60
  const querySet = querySets[name];
62
61
  let i = 0;
63
-
64
62
  if (!querySet) {
65
63
  return null;
66
64
  }
67
-
68
65
  for (; i < querySet.borders.length; i++) {
69
66
  if (width < querySet.borders[i]) {
70
67
  return querySet.names[i];
71
68
  }
72
69
  }
73
-
74
70
  return querySet.names[i];
75
71
  };
72
+
76
73
  /**
77
74
  * Enumeration containing the names and settings of predefined screen width media query range sets.
78
75
  *
@@ -80,8 +77,6 @@ sap.ui.define(["exports"], function (_exports) {
80
77
  * @name MediaRange.RANGESETS
81
78
  * @public
82
79
  */
83
-
84
-
85
80
  const RANGESETS = {
86
81
  /**
87
82
  * A 4-step range set (S-M-L-XL).
@@ -99,6 +94,7 @@ sap.ui.define(["exports"], function (_exports) {
99
94
  */
100
95
  RANGE_4STEPS: "4Step"
101
96
  };
97
+
102
98
  /**
103
99
  * API for screen width changes.
104
100
  *
@@ -9,7 +9,6 @@ sap.ui.define(["exports"], function (_exports) {
9
9
  if (iConcatOps > 2 && 40 * iConcatOps > s.length) {
10
10
  Number(s);
11
11
  }
12
-
13
12
  return s;
14
13
  } : s => s;
15
14
  const rLines = /(?:\r\n|\r|\n|^)[ \t\f]*/;
@@ -21,18 +20,17 @@ sap.ui.define(["exports"], function (_exports) {
21
20
  "\\r": "\r",
22
21
  "\\t": "\t"
23
22
  };
23
+
24
24
  /**
25
25
  * Parses a .properties format
26
26
  * @param {string} sText the contents a of a .properties file
27
27
  * @returns a object with key/value pairs parsed from the .properties file format
28
28
  * @public
29
29
  */
30
-
31
30
  const parseProperties = sText => {
32
31
  const properties = {},
33
- aLines = sText.split(rLines);
32
+ aLines = sText.split(rLines);
34
33
  let sLine, rMatcher, sKey, sValue, i, m, iLastIndex, iConcatOps;
35
-
36
34
  const append = s => {
37
35
  if (sValue) {
38
36
  sValue = `${sValue}${s}`;
@@ -42,11 +40,9 @@ sap.ui.define(["exports"], function (_exports) {
42
40
  iConcatOps = 0;
43
41
  }
44
42
  };
45
-
46
43
  for (i = 0; i < aLines.length; i++) {
47
44
  sLine = aLines[i];
48
45
  const skipLine = sLine === "" || sLine.charAt(0) === "#" || sLine.charAt(0) === "!";
49
-
50
46
  if (!skipLine) {
51
47
  rMatcher = rEscapesOrSeparator;
52
48
  iLastIndex = 0;
@@ -54,19 +50,15 @@ sap.ui.define(["exports"], function (_exports) {
54
50
  sKey = null;
55
51
  sValue = "";
56
52
  m = rMatcher.exec(sLine);
57
-
58
53
  while (m !== null) {
59
54
  if (iLastIndex < m.index) {
60
55
  append(sLine.slice(iLastIndex, m.index));
61
56
  }
62
-
63
57
  iLastIndex = rMatcher.lastIndex;
64
-
65
58
  if (m[1]) {
66
59
  if (m[1].length !== 6) {
67
60
  throw new Error(`Incomplete Unicode Escape '${m[1]}'`);
68
61
  }
69
-
70
62
  append(String.fromCharCode(parseInt(m[1].slice(2), 16)));
71
63
  } else if (m[2]) {
72
64
  append(mEscapes[m[2]] || m[2].slice(1));
@@ -80,26 +72,20 @@ sap.ui.define(["exports"], function (_exports) {
80
72
  rMatcher = rEscapes;
81
73
  rMatcher.lastIndex = iLastIndex;
82
74
  }
83
-
84
75
  m = rMatcher.exec(sLine);
85
76
  }
86
-
87
77
  if (iLastIndex < sLine.length) {
88
78
  append(sLine.slice(iLastIndex));
89
79
  }
90
-
91
80
  if (sKey == null) {
92
81
  sKey = sValue;
93
82
  sValue = "";
94
83
  }
95
-
96
84
  properties[sKey] = flatstr(sValue, sValue ? iConcatOps : 0);
97
85
  }
98
86
  }
99
-
100
87
  return properties;
101
88
  };
102
-
103
89
  var _default = parseProperties;
104
90
  _exports.default = _default;
105
91
  });
@@ -7,9 +7,7 @@ sap.ui.define(["exports", "./EventProvider", "./RenderQueue", "./CustomElementsR
7
7
  _exports.renderImmediately = _exports.renderFinished = _exports.renderDeferred = _exports.reRenderAllUI5Elements = _exports.detachBeforeComponentRender = _exports.cancelRender = _exports.attachBeforeComponentRender = void 0;
8
8
  _EventProvider = _interopRequireDefault(_EventProvider);
9
9
  _RenderQueue = _interopRequireDefault(_RenderQueue);
10
-
11
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
11
  const registeredElements = new Set();
14
12
  const eventProvider = new _EventProvider.default();
15
13
  const invalidatedWebComponents = new _RenderQueue.default(); // Queue for invalidated web components
@@ -17,70 +15,66 @@ sap.ui.define(["exports", "./EventProvider", "./RenderQueue", "./CustomElementsR
17
15
  let renderTaskPromise, renderTaskPromiseResolve;
18
16
  let mutationObserverTimer;
19
17
  let queuePromise;
18
+
20
19
  /**
21
20
  * Schedules a render task (if not already scheduled) to render the component
22
21
  *
23
22
  * @param webComponent
24
23
  * @returns {Promise}
25
24
  */
26
-
27
25
  const renderDeferred = async webComponent => {
28
26
  // Enqueue the web component
29
- invalidatedWebComponents.add(webComponent); // Schedule a rendering task
27
+ invalidatedWebComponents.add(webComponent);
30
28
 
29
+ // Schedule a rendering task
31
30
  await scheduleRenderTask();
32
31
  };
32
+
33
33
  /**
34
34
  * Renders a component synchronously and adds it to the registry of rendered components
35
35
  *
36
36
  * @param webComponent
37
37
  */
38
-
39
-
40
38
  _exports.renderDeferred = renderDeferred;
41
-
42
39
  const renderImmediately = webComponent => {
43
40
  eventProvider.fireEvent("beforeComponentRender", webComponent);
44
41
  registeredElements.add(webComponent);
45
-
46
42
  webComponent._render();
47
43
  };
44
+
48
45
  /**
49
46
  * Cancels the rendering of a component, if awaiting to be rendered, and removes it from the registry of rendered components
50
47
  *
51
48
  * @param webComponent
52
49
  */
53
-
54
-
55
50
  _exports.renderImmediately = renderImmediately;
56
-
57
51
  const cancelRender = webComponent => {
58
52
  invalidatedWebComponents.remove(webComponent);
59
53
  registeredElements.delete(webComponent);
60
54
  };
55
+
61
56
  /**
62
57
  * Schedules a rendering task, if not scheduled already
63
58
  */
64
-
65
-
66
59
  _exports.cancelRender = cancelRender;
67
-
68
60
  const scheduleRenderTask = async () => {
69
61
  if (!queuePromise) {
70
62
  queuePromise = new Promise(resolve => {
71
63
  window.requestAnimationFrame(() => {
72
64
  // Render all components in the queue
65
+
73
66
  // console.log(`--------------------RENDER TASK START------------------------------`); // eslint-disable-line
74
- invalidatedWebComponents.process(renderImmediately); // console.log(`--------------------RENDER TASK END------------------------------`); // eslint-disable-line
75
- // Resolve the promise so that callers of renderDeferred can continue
67
+ invalidatedWebComponents.process(renderImmediately);
68
+ // console.log(`--------------------RENDER TASK END------------------------------`); // eslint-disable-line
76
69
 
70
+ // Resolve the promise so that callers of renderDeferred can continue
77
71
  queuePromise = null;
78
- resolve(); // Wait for Mutation observer before the render task is considered finished
72
+ resolve();
79
73
 
74
+ // Wait for Mutation observer before the render task is considered finished
80
75
  if (!mutationObserverTimer) {
81
76
  mutationObserverTimer = setTimeout(() => {
82
77
  mutationObserverTimer = undefined;
83
-
84
78
  if (invalidatedWebComponents.isEmpty()) {
85
79
  _resolveTaskPromise();
86
80
  }
@@ -89,19 +83,16 @@ sap.ui.define(["exports", "./EventProvider", "./RenderQueue", "./CustomElementsR
89
83
  });
90
84
  });
91
85
  }
92
-
93
86
  await queuePromise;
94
87
  };
88
+
95
89
  /**
96
90
  * return a promise that will be resolved once all invalidated web components are rendered
97
91
  */
98
-
99
-
100
92
  const whenDOMUpdated = () => {
101
93
  if (renderTaskPromise) {
102
94
  return renderTaskPromise;
103
95
  }
104
-
105
96
  renderTaskPromise = new Promise(resolve => {
106
97
  renderTaskPromiseResolve = resolve;
107
98
  window.requestAnimationFrame(() => {
@@ -113,31 +104,27 @@ sap.ui.define(["exports", "./EventProvider", "./RenderQueue", "./CustomElementsR
113
104
  });
114
105
  return renderTaskPromise;
115
106
  };
116
-
117
107
  const whenAllCustomElementsAreDefined = () => {
118
108
  const definedPromises = (0, _CustomElementsRegistry.getAllRegisteredTags)().map(tag => customElements.whenDefined(tag));
119
109
  return Promise.all(definedPromises);
120
110
  };
121
-
122
111
  const renderFinished = async () => {
123
112
  await whenAllCustomElementsAreDefined();
124
113
  await whenDOMUpdated();
125
114
  };
126
-
127
115
  _exports.renderFinished = renderFinished;
128
-
129
116
  const _resolveTaskPromise = () => {
130
117
  if (!invalidatedWebComponents.isEmpty()) {
131
118
  // More updates are pending. Resolve will be called again
132
119
  return;
133
120
  }
134
-
135
121
  if (renderTaskPromiseResolve) {
136
122
  renderTaskPromiseResolve();
137
123
  renderTaskPromiseResolve = undefined;
138
124
  renderTaskPromise = undefined;
139
125
  }
140
126
  };
127
+
141
128
  /**
142
129
  * Re-renders all UI5 Elements on the page, with the option to specify filters to rerender only some components.
143
130
  *
@@ -154,33 +141,25 @@ sap.ui.define(["exports", "./EventProvider", "./RenderQueue", "./CustomElementsR
154
141
  * @param {Object|undefined} filters - Object with keys that can be "rtlAware" or "languageAware"
155
142
  * @returns {Promise<void>}
156
143
  */
157
-
158
-
159
144
  const reRenderAllUI5Elements = async filters => {
160
145
  registeredElements.forEach(element => {
161
146
  const tag = element.constructor.getMetadata().getTag();
162
147
  const rtlAware = (0, _RTLAwareRegistry.isRtlAware)(element.constructor);
163
148
  const languageAware = element.constructor.getMetadata().isLanguageAware();
164
149
  const themeAware = element.constructor.getMetadata().isThemeAware();
165
-
166
150
  if (!filters || filters.tag === tag || filters.rtlAware && rtlAware || filters.languageAware && languageAware || filters.themeAware && themeAware) {
167
151
  renderDeferred(element);
168
152
  }
169
153
  });
170
154
  await renderFinished();
171
155
  };
172
-
173
156
  _exports.reRenderAllUI5Elements = reRenderAllUI5Elements;
174
-
175
157
  const attachBeforeComponentRender = listener => {
176
158
  eventProvider.attachEvent("beforeComponentRender", listener);
177
159
  };
178
-
179
160
  _exports.attachBeforeComponentRender = attachBeforeComponentRender;
180
-
181
161
  const detachBeforeComponentRender = listener => {
182
162
  eventProvider.detachEvent("beforeComponentRender", listener);
183
163
  };
184
-
185
164
  _exports.detachBeforeComponentRender = detachBeforeComponentRender;
186
165
  });
@@ -6,11 +6,9 @@ sap.ui.define(["exports"], function (_exports) {
6
6
  });
7
7
  _exports.default = void 0;
8
8
  const MAX_PROCESS_COUNT = 10;
9
-
10
9
  class RenderQueue {
11
10
  constructor() {
12
11
  this.list = []; // Used to store the web components in order
13
-
14
12
  this.lookup = new Set(); // Used for faster search
15
13
  }
16
14
 
@@ -18,64 +16,51 @@ sap.ui.define(["exports"], function (_exports) {
18
16
  if (this.lookup.has(webComponent)) {
19
17
  return;
20
18
  }
21
-
22
19
  this.list.push(webComponent);
23
20
  this.lookup.add(webComponent);
24
21
  }
25
-
26
22
  remove(webComponent) {
27
23
  if (!this.lookup.has(webComponent)) {
28
24
  return;
29
25
  }
30
-
31
26
  this.list = this.list.filter(item => item !== webComponent);
32
27
  this.lookup.delete(webComponent);
33
28
  }
34
-
35
29
  shift() {
36
30
  const webComponent = this.list.shift();
37
-
38
31
  if (webComponent) {
39
32
  this.lookup.delete(webComponent);
40
33
  return webComponent;
41
34
  }
42
35
  }
43
-
44
36
  isEmpty() {
45
37
  return this.list.length === 0;
46
38
  }
47
-
48
39
  isAdded(webComponent) {
49
40
  return this.lookup.has(webComponent);
50
41
  }
42
+
51
43
  /**
52
44
  * Processes the whole queue by executing the callback on each component,
53
45
  * while also imposing restrictions on how many times a component may be processed.
54
46
  *
55
47
  * @param callback - function with one argument (the web component to be processed)
56
48
  */
57
-
58
-
59
49
  process(callback) {
60
50
  let webComponent;
61
51
  const stats = new Map();
62
52
  webComponent = this.shift();
63
-
64
53
  while (webComponent) {
65
54
  const timesProcessed = stats.get(webComponent) || 0;
66
-
67
55
  if (timesProcessed > MAX_PROCESS_COUNT) {
68
56
  throw new Error(`Web component processed too many times this task, max allowed is: ${MAX_PROCESS_COUNT}`);
69
57
  }
70
-
71
58
  callback(webComponent);
72
59
  stats.set(webComponent, timesProcessed + 1);
73
60
  webComponent = this.shift();
74
61
  }
75
62
  }
76
-
77
63
  }
78
-
79
64
  var _default = RenderQueue;
80
65
  _exports.default = _default;
81
66
  });
@@ -5,7 +5,6 @@ sap.ui.define(["exports", "./Render"], function (_exports, _Render) {
5
5
  value: true
6
6
  });
7
7
  _exports.default = void 0;
8
-
9
8
  /**
10
9
  * @deprecated Use the Render.js module instead
11
10
  */
@@ -19,36 +18,29 @@ sap.ui.define(["exports", "./Render"], function (_exports, _Render) {
19
18
  */
20
19
  static async renderDeferred(webComponent) {
21
20
  console.log("RenderScheduler.renderDeferred is deprecated, please use renderDeferred, exported by Render.js instead"); // eslint-disable-line
22
-
23
21
  await (0, _Render.renderDeferred)(webComponent);
24
22
  }
23
+
25
24
  /**
26
25
  * Renders a component synchronously
27
26
  *
28
27
  * @param webComponent
29
28
  * @deprecated Use renderImmediately from the Render.js module instead
30
29
  */
31
-
32
-
33
30
  static renderImmediately(webComponent) {
34
31
  console.log("RenderScheduler.renderImmediately is deprecated, please use renderImmediately, exported by Render.js instead"); // eslint-disable-line
35
-
36
32
  return (0, _Render.renderImmediately)(webComponent);
37
33
  }
34
+
38
35
  /**
39
36
  * @deprecated Use renderFinished from the Render.js module instead
40
37
  * @returns {Promise<void>}
41
38
  */
42
-
43
-
44
39
  static async whenFinished() {
45
40
  console.log("RenderScheduler.whenFinished is deprecated, please use renderFinished, exported by Render.js instead"); // eslint-disable-line
46
-
47
41
  await (0, _Render.renderFinished)();
48
42
  }
49
-
50
43
  }
51
-
52
44
  var _default = RenderScheduler;
53
45
  _exports.default = _default;
54
46
  });
@@ -7,95 +7,84 @@ sap.ui.define(["exports", "./generated/VersionInfo", "./getSharedResource"], fun
7
7
  _exports.setRuntimeAlias = _exports.registerCurrentRuntime = _exports.getCurrentRuntimeIndex = _exports.getAllRuntimes = _exports.compareRuntimes = void 0;
8
8
  _VersionInfo = _interopRequireDefault(_VersionInfo);
9
9
  _getSharedResource = _interopRequireDefault(_getSharedResource);
10
-
11
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
11
  let currentRuntimeIndex;
14
12
  let currentRuntimeAlias = "";
15
13
  const compareCache = new Map();
14
+
16
15
  /**
17
16
  * Central registry where all runtimes register themselves by pushing an object.
18
17
  * The index in the registry servers as an ID for the runtime.
19
18
  * @type {*}
20
19
  */
21
-
22
20
  const Runtimes = (0, _getSharedResource.default)("Runtimes", []);
21
+
23
22
  /**
24
23
  * Registers the current runtime in the shared runtimes resource registry
25
24
  */
26
-
27
25
  const registerCurrentRuntime = () => {
28
26
  if (currentRuntimeIndex === undefined) {
29
27
  currentRuntimeIndex = Runtimes.length;
30
- Runtimes.push({ ..._VersionInfo.default,
28
+ Runtimes.push({
29
+ ..._VersionInfo.default,
31
30
  alias: currentRuntimeAlias,
32
31
  description: `Runtime ${currentRuntimeIndex} - ver ${_VersionInfo.default.version}${currentRuntimeAlias ? ` (${currentRuntimeAlias})` : ""}`
33
32
  });
34
33
  }
35
34
  };
35
+
36
36
  /**
37
37
  * Returns the index of the current runtime's object in the shared runtimes resource registry
38
38
  * @returns {*}
39
39
  */
40
-
41
-
42
40
  _exports.registerCurrentRuntime = registerCurrentRuntime;
43
-
44
41
  const getCurrentRuntimeIndex = () => {
45
42
  return currentRuntimeIndex;
46
43
  };
44
+
47
45
  /**
48
46
  * Compares two runtimes and returns 1 if the first is of a bigger version, -1 if the second is of a bigger version, and 0 if equal
49
47
  * @param index1 The index of the first runtime to compare
50
48
  * @param index2 The index of the second runtime to compare
51
49
  * @returns {number}
52
50
  */
53
-
54
-
55
51
  _exports.getCurrentRuntimeIndex = getCurrentRuntimeIndex;
56
-
57
52
  const compareRuntimes = (index1, index2) => {
58
53
  const cacheIndex = `${index1},${index2}`;
59
-
60
54
  if (compareCache.has(cacheIndex)) {
61
55
  return compareCache.get(cacheIndex);
62
56
  }
63
-
64
57
  const runtime1 = Runtimes[index1];
65
58
  const runtime2 = Runtimes[index2];
66
-
67
59
  if (!runtime1 || !runtime2) {
68
60
  throw new Error("Invalid runtime index supplied");
69
- } // If any of the two is a next version, bigger buildTime wins
70
-
61
+ }
71
62
 
63
+ // If any of the two is a next version, bigger buildTime wins
72
64
  if (runtime1.isNext || runtime2.isNext) {
73
65
  return runtime1.buildTime - runtime2.buildTime;
74
- } // If major versions differ, bigger one wins
75
-
66
+ }
76
67
 
68
+ // If major versions differ, bigger one wins
77
69
  const majorDiff = runtime1.major - runtime2.major;
78
-
79
70
  if (majorDiff) {
80
71
  return majorDiff;
81
- } // If minor versions differ, bigger one wins
82
-
72
+ }
83
73
 
74
+ // If minor versions differ, bigger one wins
84
75
  const minorDiff = runtime1.minor - runtime2.minor;
85
-
86
76
  if (minorDiff) {
87
77
  return minorDiff;
88
- } // If patch versions differ, bigger one wins
89
-
78
+ }
90
79
 
80
+ // If patch versions differ, bigger one wins
91
81
  const patchDiff = runtime1.patch - runtime2.patch;
92
-
93
82
  if (patchDiff) {
94
83
  return patchDiff;
95
- } // Bigger suffix wins, f.e. rc10 > rc9
96
- // Important: suffix is alphanumeric, must use natural compare
97
-
84
+ }
98
85
 
86
+ // Bigger suffix wins, f.e. rc10 > rc9
87
+ // Important: suffix is alphanumeric, must use natural compare
99
88
  const collator = new Intl.Collator(undefined, {
100
89
  numeric: true,
101
90
  sensitivity: "base"
@@ -104,23 +93,18 @@ sap.ui.define(["exports", "./generated/VersionInfo", "./getSharedResource"], fun
104
93
  compareCache.set(cacheIndex, result);
105
94
  return result;
106
95
  };
96
+
107
97
  /**
108
98
  * Set an alias for the the current app/library/microfrontend which will appear in debug messages and console warnings
109
99
  * @param alias
110
100
  */
111
-
112
-
113
101
  _exports.compareRuntimes = compareRuntimes;
114
-
115
102
  const setRuntimeAlias = alias => {
116
103
  currentRuntimeAlias = alias;
117
104
  };
118
-
119
105
  _exports.setRuntimeAlias = setRuntimeAlias;
120
-
121
106
  const getAllRuntimes = () => {
122
107
  return Runtimes;
123
108
  };
124
-
125
109
  _exports.getAllRuntimes = getAllRuntimes;
126
110
  });