@openui5/sap.ui.webc.common 1.111.6 → 1.112.1

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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openui5/sap.ui.webc.common",
3
- "version": "1.111.6",
3
+ "version": "1.112.1",
4
4
  "description": "OpenUI5 UI Library sap.ui.webc.common",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -19,6 +19,6 @@
19
19
  "build": "rimraf src/sap/ui/webc/common/thirdparty/ && ui5-webc-prebuild"
20
20
  },
21
21
  "dependencies": {
22
- "@openui5/sap.ui.core": "1.111.6"
22
+ "@openui5/sap.ui.core": "1.112.1"
23
23
  }
24
24
  }
@@ -3,7 +3,7 @@
3
3
 
4
4
  <name>sap.ui.webc.common</name>
5
5
  <vendor>SAP SE</vendor>
6
- <version>1.111.6</version>
6
+ <version>1.112.1</version>
7
7
  <copyright>OpenUI5
8
8
  * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
9
9
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.</copyright>
@@ -37,7 +37,7 @@
37
37
  <pattern>sap/ui/webc/common/thirdparty/icons-tnt/*.*</pattern>
38
38
  <pattern>sap/ui/webc/common/thirdparty/icons-business-suite/*.*</pattern>
39
39
  </lib>
40
- <lib name="lit-html" displayName="lit-html" npmName="lit-html" version="2.2.2" hash="c4908d4f4bd86a4d71c8c017a0139055" homepage="https://lit-html.polymer-project.org">
40
+ <lib name="lit-html" displayName="lit-html" npmName="lit-html" version="2.2.2" hash="94bafc7d74b032d0b543afb10cae9b08" homepage="https://lit-html.polymer-project.org">
41
41
  <license url="https://github.com/lit/lit/blob/main/LICENSE" type="BSD-3-Clause"></license>
42
42
  <copyright>Google LLC</copyright>
43
43
  <pattern>sap/ui/webc/common/thirdparty/lit-html/*.*</pattern>
@@ -1,3 +1,9 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
1
7
  sap.ui.define([
2
8
  "./thirdparty/base/config/Theme",
3
9
  "./thirdparty/base/config/Language"
@@ -1,3 +1,9 @@
1
+ /*!
2
+ * OpenUI5
3
+ * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
4
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
5
+ */
6
+
1
7
  sap.ui.define([
2
8
  "./thirdparty/icons/Assets",
3
9
  "./thirdparty/icons/AllIcons",
@@ -106,7 +106,7 @@ sap.ui.define([
106
106
  *
107
107
  * @extends sap.ui.core.Control
108
108
  * @author SAP SE
109
- * @version 1.111.6
109
+ * @version 1.112.1
110
110
  * @public
111
111
  * @since 1.92.0
112
112
  * @alias sap.ui.webc.common.WebComponent
@@ -23,7 +23,7 @@ sap.ui.define([
23
23
  *
24
24
  * @class
25
25
  * @author SAP SE
26
- * @version 1.111.6
26
+ * @version 1.112.1
27
27
  * @since 1.92.0
28
28
  * @experimental Since 1.92.0 The API might change. It is not intended for productive usage yet!
29
29
  * @alias sap.ui.webc.common.WebComponentMetadata
@@ -28,7 +28,7 @@ sap.ui.define([
28
28
  * @namespace
29
29
  * @name sap.ui.webc
30
30
  * @author SAP SE
31
- * @version 1.111.6
31
+ * @version 1.112.1
32
32
  * @public
33
33
  * @since 1.92.0
34
34
  * @experimental Since 1.92.0
@@ -40,14 +40,14 @@ sap.ui.define([
40
40
  * @namespace
41
41
  * @alias sap.ui.webc.common
42
42
  * @author SAP SE
43
- * @version 1.111.6
43
+ * @version 1.112.1
44
44
  * @public
45
45
  * @since 1.92.0
46
46
  * @experimental Since 1.92.0
47
47
  */
48
48
  var thisLib = sap.ui.getCore().initLibrary({
49
49
  name : "sap.ui.webc.common",
50
- version: "1.111.6",
50
+ version: "1.112.1",
51
51
  dependencies : ["sap.ui.core"],
52
52
  noLibraryCSS: true,
53
53
  designtime: "sap/ui/webc/common/designtime/library.designtime",
@@ -9,47 +9,39 @@ sap.ui.define(["exports", "./util/whenDOMReady", "./FontFace", "./SystemCSSVars"
9
9
  _FontFace = _interopRequireDefault(_FontFace);
10
10
  _SystemCSSVars = _interopRequireDefault(_SystemCSSVars);
11
11
  _applyTheme = _interopRequireDefault(_applyTheme);
12
-
13
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
-
15
13
  let bootPromise;
14
+
16
15
  /**
17
16
  * Attach a callback that will be executed on boot
18
17
  * @public
19
18
  * @param listener
20
19
  */
21
-
22
20
  const attachBoot = async listener => {
23
21
  await boot();
24
22
  listener();
25
23
  };
26
-
27
24
  _exports.attachBoot = attachBoot;
28
-
29
25
  const boot = async () => {
30
26
  if (bootPromise) {
31
27
  return bootPromise;
32
28
  }
33
- /* eslint-disable no-alert, no-async-promise-executor */
34
29
 
30
+ /* eslint-disable no-alert, no-async-promise-executor */
35
31
  /*
36
32
  Note(since we disable eslint rule):
37
33
  If an async executor function throws an error, the error will be lost and won't cause the newly-constructed Promise to reject.
38
34
  This could make it difficult to debug and handle some errors.
39
35
  */
40
-
41
-
42
36
  bootPromise = new Promise(async resolve => {
43
37
  (0, _Runtimes.registerCurrentRuntime)();
44
38
  const OpenUI5Support = (0, _FeaturesRegistry.getFeature)("OpenUI5Support");
45
39
  const F6Navigation = (0, _FeaturesRegistry.getFeature)("F6Navigation");
46
-
47
40
  if (OpenUI5Support) {
48
41
  await OpenUI5Support.init();
49
42
  } else if (F6Navigation) {
50
43
  F6Navigation.init();
51
44
  }
52
-
53
45
  await (0, _whenDOMReady.default)();
54
46
  await (0, _applyTheme.default)((0, _Theme.getTheme)());
55
47
  OpenUI5Support && OpenUI5Support.attachListeners();
@@ -61,6 +53,5 @@ sap.ui.define(["exports", "./util/whenDOMReady", "./FontFace", "./SystemCSSVars"
61
53
 
62
54
  return bootPromise;
63
55
  };
64
-
65
56
  _exports.boot = boot;
66
57
  });
@@ -8,6 +8,7 @@ sap.ui.define(["exports"], function (_exports) {
8
8
  const roots = new Map();
9
9
  let useLinks = false;
10
10
  let preloadLinks = true;
11
+
11
12
  /**
12
13
  * Use this function to provide the path to the directory where the css resources for the given package will be served from
13
14
  *
@@ -15,16 +16,14 @@ sap.ui.define(["exports"], function (_exports) {
15
16
  * @param packageName name of the package that is being configured
16
17
  * @param root path, accessible by the server that will serve the css resources
17
18
  */
18
-
19
19
  const setPackageCSSRoot = (packageName, root) => {
20
20
  roots.set(packageName, root);
21
21
  };
22
-
23
22
  _exports.setPackageCSSRoot = setPackageCSSRoot;
24
-
25
23
  const getUrl = (packageName, path) => {
26
24
  return `${roots.get(packageName)}${path}`;
27
25
  };
26
+
28
27
  /**
29
28
  * Call this function to enable or disable the usage of <link> tags instead of <style> tags to achieve CSP compliance
30
29
  * Example: "setUseLinks(true)" will unconditionally use <link> tags for all browsers;
@@ -33,13 +32,11 @@ sap.ui.define(["exports"], function (_exports) {
33
32
  * @public
34
33
  * @param use whether links will be used
35
34
  */
36
-
37
-
38
35
  _exports.getUrl = getUrl;
39
-
40
36
  const setUseLinks = use => {
41
37
  useLinks = use;
42
38
  };
39
+
43
40
  /**
44
41
  * Call this function to enable or disable the preloading of <link> tags.
45
42
  * Note: only taken into account when <link> tags are being used.
@@ -48,25 +45,17 @@ sap.ui.define(["exports"], function (_exports) {
48
45
  * @public
49
46
  * @param preload
50
47
  */
51
-
52
-
53
48
  _exports.setUseLinks = setUseLinks;
54
-
55
49
  const setPreloadLinks = preload => {
56
50
  preloadLinks = preload;
57
51
  };
58
-
59
52
  _exports.setPreloadLinks = setPreloadLinks;
60
-
61
53
  const shouldUseLinks = () => {
62
54
  return useLinks;
63
55
  };
64
-
65
56
  _exports.shouldUseLinks = shouldUseLinks;
66
-
67
57
  const shouldPreloadLinks = () => {
68
58
  return preloadLinks;
69
59
  };
70
-
71
60
  _exports.shouldPreloadLinks = shouldPreloadLinks;
72
61
  });
@@ -7,44 +7,33 @@ sap.ui.define(["exports", "./util/setToArray", "./getSharedResource", "./Runtime
7
7
  _exports.registerTag = _exports.recordTagRegistrationFailure = _exports.isTagRegistered = _exports.getAllRegisteredTags = void 0;
8
8
  _setToArray = _interopRequireDefault(_setToArray);
9
9
  _getSharedResource = _interopRequireDefault(_getSharedResource);
10
-
11
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
11
  const Tags = (0, _getSharedResource.default)("Tags", new Map());
14
12
  const Definitions = new Set();
15
13
  let Failures = {};
16
14
  let failureTimeout;
17
15
  const UNKNOWN_RUNTIME = "unknown";
18
-
19
16
  const registerTag = tag => {
20
17
  Definitions.add(tag);
21
18
  Tags.set(tag, (0, _Runtimes.getCurrentRuntimeIndex)());
22
19
  };
23
-
24
20
  _exports.registerTag = registerTag;
25
-
26
21
  const isTagRegistered = tag => {
27
22
  return Definitions.has(tag);
28
23
  };
29
-
30
24
  _exports.isTagRegistered = isTagRegistered;
31
-
32
25
  const getAllRegisteredTags = () => {
33
26
  return (0, _setToArray.default)(Definitions);
34
27
  };
35
-
36
28
  _exports.getAllRegisteredTags = getAllRegisteredTags;
37
-
38
29
  const recordTagRegistrationFailure = tag => {
39
30
  let tagRegRuntimeIndex = Tags.get(tag);
40
-
41
31
  if (tagRegRuntimeIndex === undefined) {
42
32
  tagRegRuntimeIndex = UNKNOWN_RUNTIME; // If the tag is taken, but not registered in Tags, then a version before 1.1.0 defined it => use the "unknown" key
43
33
  }
44
34
 
45
35
  Failures[tagRegRuntimeIndex] = Failures[tagRegRuntimeIndex] || new Set();
46
36
  Failures[tagRegRuntimeIndex].add(tag);
47
-
48
37
  if (!failureTimeout) {
49
38
  failureTimeout = setTimeout(() => {
50
39
  displayFailedRegistrations();
@@ -53,27 +42,21 @@ sap.ui.define(["exports", "./util/setToArray", "./getSharedResource", "./Runtime
53
42
  }, 1000);
54
43
  }
55
44
  };
56
-
57
45
  _exports.recordTagRegistrationFailure = recordTagRegistrationFailure;
58
-
59
46
  const displayFailedRegistrations = () => {
60
47
  const allRuntimes = (0, _Runtimes.getAllRuntimes)();
61
48
  const currentRuntimeIndex = (0, _Runtimes.getCurrentRuntimeIndex)();
62
49
  const currentRuntime = allRuntimes[currentRuntimeIndex];
63
50
  let message = `Multiple UI5 Web Components instances detected.`;
64
-
65
51
  if (allRuntimes.length > 1) {
66
52
  message = `${message}\nLoading order (versions before 1.1.0 not listed): ${allRuntimes.map(runtime => `\n${runtime.description}`).join("")}`;
67
53
  }
68
-
69
54
  Object.keys(Failures).forEach(otherRuntimeIndex => {
70
55
  let comparison;
71
56
  let otherRuntime;
72
-
73
57
  if (otherRuntimeIndex === UNKNOWN_RUNTIME) {
74
58
  // version < 1.1.0 defined the tag
75
59
  comparison = 1; // the current runtime is considered newer
76
-
77
60
  otherRuntime = {
78
61
  description: `Older unknown runtime`
79
62
  };
@@ -81,9 +64,7 @@ sap.ui.define(["exports", "./util/setToArray", "./getSharedResource", "./Runtime
81
64
  comparison = (0, _Runtimes.compareRuntimes)(currentRuntimeIndex, otherRuntimeIndex);
82
65
  otherRuntime = allRuntimes[otherRuntimeIndex];
83
66
  }
84
-
85
67
  let compareWord;
86
-
87
68
  if (comparison > 0) {
88
69
  compareWord = "an older";
89
70
  } else if (comparison < 0) {
@@ -91,9 +72,7 @@ sap.ui.define(["exports", "./util/setToArray", "./getSharedResource", "./Runtime
91
72
  } else {
92
73
  compareWord = "the same";
93
74
  }
94
-
95
75
  message = `${message}\n\n"${currentRuntime.description}" failed to define ${Failures[otherRuntimeIndex].size} tag(s) as they were defined by a runtime of ${compareWord} version "${otherRuntime.description}": ${(0, _setToArray.default)(Failures[otherRuntimeIndex]).sort().join(", ")}.`;
96
-
97
76
  if (comparison > 0) {
98
77
  message = `${message}\nWARNING! If your code uses features of the above web components, unavailable in ${otherRuntime.description}, it might not work as expected!`;
99
78
  } else {
@@ -19,27 +19,24 @@ sap.ui.define(["exports"], function (_exports) {
19
19
  * @public
20
20
  * @param suffix The scoping suffix
21
21
  */
22
-
23
22
  const setCustomElementsScopingSuffix = suffix => {
24
23
  if (!suffix.match(/^[a-zA-Z0-9_-]+$/)) {
25
24
  throw new Error("Only alphanumeric characters and dashes allowed for the scoping suffix");
26
25
  }
27
-
28
26
  suf = suffix;
29
27
  };
28
+
30
29
  /**
31
30
  * Returns the currently set scoping suffix, or undefined if not set.
32
31
  *
33
32
  * @public
34
33
  * @returns {String|undefined}
35
34
  */
36
-
37
-
38
35
  _exports.setCustomElementsScopingSuffix = setCustomElementsScopingSuffix;
39
-
40
36
  const getCustomElementsScopingSuffix = () => {
41
37
  return suf;
42
38
  };
39
+
43
40
  /**
44
41
  * Sets the rules, governing which custom element tags to scope and which not, f.e.
45
42
  * setCustomElementsScopingRules({include: [/^ui5-/]}, exclude: [/^ui5-mylib-/, /^ui5-carousel$/]);
@@ -49,27 +46,22 @@ sap.ui.define(["exports"], function (_exports) {
49
46
  * @param rules Object with "include" and "exclude" properties, both arrays of regular expressions. Note that "include"
50
47
  * rules are applied first and "exclude" rules second.
51
48
  */
52
-
53
-
54
49
  _exports.getCustomElementsScopingSuffix = getCustomElementsScopingSuffix;
55
-
56
50
  const setCustomElementsScopingRules = rules => {
57
51
  if (!rules || !rules.include) {
58
52
  throw new Error(`"rules" must be an object with at least an "include" property`);
59
53
  }
60
-
61
54
  if (!Array.isArray(rules.include) || rules.include.some(rule => !(rule instanceof RegExp))) {
62
55
  throw new Error(`"rules.include" must be an array of regular expressions`);
63
56
  }
64
-
65
57
  if (rules.exclude && (!Array.isArray(rules.exclude) || rules.exclude.some(rule => !(rule instanceof RegExp)))) {
66
58
  throw new Error(`"rules.exclude" must be an array of regular expressions`);
67
59
  }
68
-
69
60
  rules.exclude = rules.exclude || [];
70
61
  rulesObj = rules;
71
62
  tagsCache.clear(); // reset the cache upon setting new rules
72
63
  };
64
+
73
65
  /**
74
66
  * Returns the rules, governing which custom element tags to scope and which not. By default, all elements
75
67
  * starting with "ui5-" are scoped. The default rules are: {include: [/^ui5-/]}.
@@ -77,13 +69,11 @@ sap.ui.define(["exports"], function (_exports) {
77
69
  * @public
78
70
  * @returns {Object}
79
71
  */
80
-
81
-
82
72
  _exports.setCustomElementsScopingRules = setCustomElementsScopingRules;
83
-
84
73
  const getCustomElementsScopingRules = () => {
85
74
  return rulesObj;
86
75
  };
76
+
87
77
  /**
88
78
  * Determines whether custom elements with the given tag should be scoped or not.
89
79
  * The tag is first matched against the "include" rules and then against the "exclude" rules and the
@@ -92,18 +82,15 @@ sap.ui.define(["exports"], function (_exports) {
92
82
  * @public
93
83
  * @param tag
94
84
  */
95
-
96
-
97
85
  _exports.getCustomElementsScopingRules = getCustomElementsScopingRules;
98
-
99
86
  const shouldScopeCustomElement = tag => {
100
87
  if (!tagsCache.has(tag)) {
101
88
  const result = rulesObj.include.some(rule => tag.match(rule)) && !rulesObj.exclude.some(rule => tag.match(rule));
102
89
  tagsCache.set(tag, result);
103
90
  }
104
-
105
91
  return tagsCache.get(tag);
106
92
  };
93
+
107
94
  /**
108
95
  * Returns the currently set scoping suffix, if any and if the tag should be scoped, or undefined otherwise.
109
96
  *
@@ -111,15 +98,11 @@ sap.ui.define(["exports"], function (_exports) {
111
98
  * @param tag
112
99
  * @returns {String}
113
100
  */
114
-
115
-
116
101
  _exports.shouldScopeCustomElement = shouldScopeCustomElement;
117
-
118
102
  const getEffectiveScopingSuffixForTag = tag => {
119
103
  if (shouldScopeCustomElement(tag)) {
120
104
  return getCustomElementsScopingSuffix();
121
105
  }
122
106
  };
123
-
124
107
  _exports.getEffectiveScopingSuffixForTag = getEffectiveScopingSuffixForTag;
125
108
  });
@@ -10,74 +10,61 @@ sap.ui.define(["exports"], function (_exports) {
10
10
  /**
11
11
  * Default implementation with MutationObserver for browsers with native support
12
12
  */
13
-
14
13
  let _createObserver = (node, callback, options) => {
15
14
  const observer = new MutationObserver(callback);
16
15
  observer.observe(node, options);
17
16
  return observer;
18
17
  };
18
+
19
19
  /**
20
20
  * Default implementation with MutationObserver for browsers with native support
21
21
  */
22
-
23
-
24
22
  let _destroyObserver = observer => {
25
23
  observer.disconnect();
26
24
  };
25
+
27
26
  /**
28
27
  * Allows to create an alternative DOM observer implementation
29
28
  * @param createFn
30
29
  */
31
-
32
-
33
30
  const setCreateObserverCallback = createFn => {
34
31
  if (typeof createFn === "function") {
35
32
  _createObserver = createFn;
36
33
  }
37
34
  };
35
+
38
36
  /**
39
37
  * Allows to create an alternative DOM observer implementation
40
38
  * @param destroyFn
41
39
  */
42
-
43
-
44
40
  _exports.setCreateObserverCallback = setCreateObserverCallback;
45
-
46
41
  const setDestroyObserverCallback = destroyFn => {
47
42
  if (typeof destroyFn === "function") {
48
43
  _destroyObserver = destroyFn;
49
44
  }
50
45
  };
46
+
51
47
  /**
52
48
  * @param node
53
49
  * @param callback
54
50
  * @param options
55
51
  */
56
-
57
-
58
52
  _exports.setDestroyObserverCallback = setDestroyObserverCallback;
59
-
60
53
  const observeDOMNode = (node, callback, options) => {
61
54
  const observer = _createObserver(node, callback, options);
62
-
63
55
  observers.set(node, observer);
64
56
  };
57
+
65
58
  /**
66
59
  * @param node
67
60
  */
68
-
69
-
70
61
  _exports.observeDOMNode = observeDOMNode;
71
-
72
62
  const unobserveDOMNode = node => {
73
63
  const observer = observers.get(node);
74
-
75
64
  if (observer) {
76
65
  _destroyObserver(observer);
77
-
78
66
  observers.delete(node);
79
67
  }
80
68
  };
81
-
82
69
  _exports.unobserveDOMNode = unobserveDOMNode;
83
70
  });
@@ -15,125 +15,92 @@ sap.ui.define(["exports"], function (_exports) {
15
15
  const iOS = navigator.platform.match(/iPhone|iPad|iPod/) || navigator.userAgent.match(/Mac/) && "ontouchend" in document;
16
16
  const android = !windows && /Android/.test(ua);
17
17
  const androidPhone = android && /(?=android)(?=.*mobile)/i.test(ua);
18
- const ipad = /ipad/i.test(ua) || /Macintosh/i.test(ua) && "ontouchend" in document; // With iOS 13 the string 'iPad' was removed from the user agent string through a browser setting, which is applied on all sites by default:
18
+ const ipad = /ipad/i.test(ua) || /Macintosh/i.test(ua) && "ontouchend" in document;
19
+ // With iOS 13 the string 'iPad' was removed from the user agent string through a browser setting, which is applied on all sites by default:
19
20
  // "Request Desktop Website -> All websites" (for more infos see: https://forums.developer.apple.com/thread/119186).
20
21
  // Therefore the OS is detected as MACINTOSH instead of iOS and the device is a tablet if the Device.support.touch is true.
21
22
 
22
23
  let windowsVersion;
23
24
  let webkitVersion;
24
25
  let tablet;
25
-
26
26
  const isWindows8OrAbove = () => {
27
27
  if (!windows) {
28
28
  return false;
29
29
  }
30
-
31
30
  if (windowsVersion === undefined) {
32
31
  const matches = ua.match(/Windows NT (\d+).(\d)/);
33
32
  windowsVersion = matches ? parseFloat(matches[1]) : 0;
34
33
  }
35
-
36
34
  return windowsVersion >= 8;
37
35
  };
38
-
39
36
  const isWebkit537OrAbove = () => {
40
37
  if (!webkit) {
41
38
  return false;
42
39
  }
43
-
44
40
  if (webkitVersion === undefined) {
45
41
  const matches = ua.match(/(webkit)[ /]([\w.]+)/);
46
42
  webkitVersion = matches ? parseFloat(matches[1]) : 0;
47
43
  }
48
-
49
44
  return webkitVersion >= 537.10;
50
45
  };
51
-
52
46
  const detectTablet = () => {
53
47
  if (tablet !== undefined) {
54
48
  return;
55
49
  }
56
-
57
50
  if (ipad) {
58
51
  tablet = true;
59
52
  return;
60
53
  }
61
-
62
54
  if (touch) {
63
55
  if (isWindows8OrAbove()) {
64
56
  tablet = true;
65
57
  return;
66
58
  }
67
-
68
59
  if (chrome && android) {
69
60
  tablet = !/Mobile Safari\/[.0-9]+/.test(ua);
70
61
  return;
71
62
  }
72
-
73
63
  let densityFactor = window.devicePixelRatio ? window.devicePixelRatio : 1; // may be undefined in Windows Phone devices
74
-
75
64
  if (android && isWebkit537OrAbove()) {
76
65
  densityFactor = 1;
77
66
  }
78
-
79
67
  tablet = Math.min(window.screen.width / densityFactor, window.screen.height / densityFactor) >= 600;
80
68
  return;
81
69
  }
82
-
83
70
  tablet = ie && ua.indexOf("Touch") !== -1 || android && !androidPhone;
84
71
  };
85
-
86
72
  const supportsTouch = () => touch;
87
-
88
73
  _exports.supportsTouch = supportsTouch;
89
-
90
74
  const isIE = () => ie;
91
-
92
75
  _exports.isIE = isIE;
93
-
94
76
  const isSafari = () => safari;
95
-
96
77
  _exports.isSafari = isSafari;
97
-
98
78
  const isChrome = () => chrome;
99
-
100
79
  _exports.isChrome = isChrome;
101
-
102
80
  const isTablet = () => {
103
81
  detectTablet();
104
82
  return (touch || isWindows8OrAbove()) && tablet;
105
83
  };
106
-
107
84
  _exports.isTablet = isTablet;
108
-
109
85
  const isPhone = () => {
110
86
  detectTablet();
111
87
  return touch && !tablet;
112
88
  };
113
-
114
89
  _exports.isPhone = isPhone;
115
-
116
90
  const isDesktop = () => {
117
91
  return !isTablet() && !isPhone() || isWindows8OrAbove();
118
92
  };
119
-
120
93
  _exports.isDesktop = isDesktop;
121
-
122
94
  const isCombi = () => {
123
95
  return isTablet() && isDesktop();
124
96
  };
125
-
126
97
  _exports.isCombi = isCombi;
127
-
128
98
  const isIOS = () => {
129
99
  return iOS;
130
100
  };
131
-
132
101
  _exports.isIOS = isIOS;
133
-
134
102
  const isAndroid = () => {
135
103
  return android || androidPhone;
136
104
  };
137
-
138
105
  _exports.isAndroid = isAndroid;
139
106
  });