@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
@@ -12,20 +12,19 @@ sap.ui.define(["exports", "./asset-registries/i18n", "./util/formatMessage"], fu
12
12
  }
13
13
  });
14
14
  _formatMessage = _interopRequireDefault(_formatMessage);
15
-
16
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
16
  const I18nBundleInstances = new Map();
19
17
  let customGetI18nBundle;
18
+
20
19
  /**
21
20
  * @class
22
21
  * @public
23
22
  */
24
-
25
23
  class I18nBundle {
26
24
  constructor(packageName) {
27
25
  this.packageName = packageName;
28
26
  }
27
+
29
28
  /**
30
29
  * Returns a text in the currently loaded language
31
30
  *
@@ -34,8 +33,6 @@ sap.ui.define(["exports", "./asset-registries/i18n", "./util/formatMessage"], fu
34
33
  * @param params Values for the placeholders
35
34
  * @returns {*}
36
35
  */
37
-
38
-
39
36
  getText(textObj, ...params) {
40
37
  if (typeof textObj === "string") {
41
38
  textObj = {
@@ -43,13 +40,10 @@ sap.ui.define(["exports", "./asset-registries/i18n", "./util/formatMessage"], fu
43
40
  defaultText: textObj
44
41
  };
45
42
  }
46
-
47
43
  if (!textObj || !textObj.key) {
48
44
  return "";
49
45
  }
50
-
51
46
  const bundle = (0, _i18n.getI18nBundleData)(this.packageName);
52
-
53
47
  if (bundle && !bundle[textObj.key]) {
54
48
  console.warn(`Key ${textObj.key} not found in the i18n bundle, the default text will be used`); // eslint-disable-line
55
49
  }
@@ -57,18 +51,16 @@ sap.ui.define(["exports", "./asset-registries/i18n", "./util/formatMessage"], fu
57
51
  const messageText = bundle && bundle[textObj.key] ? bundle[textObj.key] : textObj.defaultText || textObj.key;
58
52
  return (0, _formatMessage.default)(messageText, params);
59
53
  }
60
-
61
54
  }
62
-
63
55
  const getI18nBundleSync = packageName => {
64
56
  if (I18nBundleInstances.has(packageName)) {
65
57
  return I18nBundleInstances.get(packageName);
66
58
  }
67
-
68
59
  const i18nBundle = new I18nBundle(packageName);
69
60
  I18nBundleInstances.set(packageName, i18nBundle);
70
61
  return i18nBundle;
71
62
  };
63
+
72
64
  /**
73
65
  * Allows developers to provide a custom getI18nBundle implementation
74
66
  * If this function is called, the custom implementation will be used for all components and will completely
@@ -77,11 +69,10 @@ sap.ui.define(["exports", "./asset-registries/i18n", "./util/formatMessage"], fu
77
69
  * @public
78
70
  * @param customGet the function to use instead of the standard getI18nBundle implementation
79
71
  */
80
-
81
-
82
72
  const registerCustomI18nBundleGetter = customGet => {
83
73
  customGetI18nBundle = customGet;
84
74
  };
75
+
85
76
  /**
86
77
  * Fetches and returns the I18nBundle instance for the given package
87
78
  *
@@ -89,18 +80,13 @@ sap.ui.define(["exports", "./asset-registries/i18n", "./util/formatMessage"], fu
89
80
  * @param packageName
90
81
  * @returns {Promise<I18nBundle>}
91
82
  */
92
-
93
-
94
83
  _exports.registerCustomI18nBundleGetter = registerCustomI18nBundleGetter;
95
-
96
84
  const getI18nBundle = async packageName => {
97
85
  if (customGetI18nBundle) {
98
86
  return customGetI18nBundle(packageName);
99
87
  }
100
-
101
88
  await (0, _i18n.fetchI18nBundle)(packageName);
102
89
  return getI18nBundleSync(packageName);
103
90
  };
104
-
105
91
  _exports.getI18nBundle = getI18nBundle;
106
92
  });
@@ -6,15 +6,12 @@ sap.ui.define(["exports"], function (_exports) {
6
6
  });
7
7
  _exports.default = void 0;
8
8
  const rLocale = /^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;
9
-
10
9
  class Locale {
11
10
  constructor(sLocaleId) {
12
11
  const aResult = rLocale.exec(sLocaleId.replace(/_/g, "-"));
13
-
14
12
  if (aResult === null) {
15
13
  throw new Error(`The given language ${sLocaleId} does not adhere to BCP-47.`);
16
14
  }
17
-
18
15
  this.sLocaleId = sLocaleId;
19
16
  this.sLanguage = aResult[1] || null;
20
17
  this.sScript = aResult[2] || null;
@@ -22,90 +19,68 @@ sap.ui.define(["exports"], function (_exports) {
22
19
  this.sVariant = aResult[4] && aResult[4].slice(1) || null;
23
20
  this.sExtension = aResult[5] && aResult[5].slice(1) || null;
24
21
  this.sPrivateUse = aResult[6] || null;
25
-
26
22
  if (this.sLanguage) {
27
23
  this.sLanguage = this.sLanguage.toLowerCase();
28
24
  }
29
-
30
25
  if (this.sScript) {
31
26
  this.sScript = this.sScript.toLowerCase().replace(/^[a-z]/, s => {
32
27
  return s.toUpperCase();
33
28
  });
34
29
  }
35
-
36
30
  if (this.sRegion) {
37
31
  this.sRegion = this.sRegion.toUpperCase();
38
32
  }
39
33
  }
40
-
41
34
  getLanguage() {
42
35
  return this.sLanguage;
43
36
  }
44
-
45
37
  getScript() {
46
38
  return this.sScript;
47
39
  }
48
-
49
40
  getRegion() {
50
41
  return this.sRegion;
51
42
  }
52
-
53
43
  getVariant() {
54
44
  return this.sVariant;
55
45
  }
56
-
57
46
  getVariantSubtags() {
58
47
  return this.sVariant ? this.sVariant.split("-") : [];
59
48
  }
60
-
61
49
  getExtension() {
62
50
  return this.sExtension;
63
51
  }
64
-
65
52
  getExtensionSubtags() {
66
53
  return this.sExtension ? this.sExtension.slice(2).split("-") : [];
67
54
  }
68
-
69
55
  getPrivateUse() {
70
56
  return this.sPrivateUse;
71
57
  }
72
-
73
58
  getPrivateUseSubtags() {
74
59
  return this.sPrivateUse ? this.sPrivateUse.slice(2).split("-") : [];
75
60
  }
76
-
77
61
  hasPrivateUseSubtag(sSubtag) {
78
62
  return this.getPrivateUseSubtags().indexOf(sSubtag) >= 0;
79
63
  }
80
-
81
64
  toString() {
82
65
  const r = [this.sLanguage];
83
-
84
66
  if (this.sScript) {
85
67
  r.push(this.sScript);
86
68
  }
87
-
88
69
  if (this.sRegion) {
89
70
  r.push(this.sRegion);
90
71
  }
91
-
92
72
  if (this.sVariant) {
93
73
  r.push(this.sVariant);
94
74
  }
95
-
96
75
  if (this.sExtension) {
97
76
  r.push(this.sExtension);
98
77
  }
99
-
100
78
  if (this.sPrivateUse) {
101
79
  r.push(this.sPrivateUse);
102
80
  }
103
-
104
81
  return r.join("-");
105
82
  }
106
-
107
83
  }
108
-
109
84
  var _default = Locale;
110
85
  _exports.default = _default;
111
86
  });
@@ -6,16 +6,12 @@ sap.ui.define(["exports"], function (_exports) {
6
6
  });
7
7
  _exports.markAsRtlAware = _exports.isRtlAware = void 0;
8
8
  const rtlAwareSet = new Set();
9
-
10
9
  const markAsRtlAware = klass => {
11
10
  rtlAwareSet.add(klass);
12
11
  };
13
-
14
12
  _exports.markAsRtlAware = markAsRtlAware;
15
-
16
13
  const isRtlAware = klass => {
17
14
  return rtlAwareSet.has(klass);
18
15
  };
19
-
20
16
  _exports.isRtlAware = isRtlAware;
21
17
  });
@@ -5,7 +5,6 @@ sap.ui.define(["exports", "../Render", "./directionChange"], function (_exports,
5
5
  value: true
6
6
  });
7
7
  _exports.default = void 0;
8
-
9
8
  /**
10
9
  * Re-renders all RTL-aware UI5 Elements.
11
10
  * Call this method whenever you change the "dir" property anywhere in your HTML page
@@ -20,7 +19,6 @@ sap.ui.define(["exports", "../Render", "./directionChange"], function (_exports,
20
19
  rtlAware: true
21
20
  });
22
21
  };
23
-
24
22
  var _default = applyDirection;
25
23
  _exports.default = _default;
26
24
  });
@@ -6,38 +6,31 @@ sap.ui.define(["exports", "../EventProvider"], function (_exports, _EventProvide
6
6
  });
7
7
  _exports.fireDirectionChange = _exports.detachDirectionChange = _exports.attachDirectionChange = void 0;
8
8
  _EventProvider = _interopRequireDefault(_EventProvider);
9
-
10
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
10
  const eventProvider = new _EventProvider.default();
13
11
  const DIR_CHANGE = "directionChange";
12
+
14
13
  /**
15
14
  * Attach a callback that will be executed whenever the application calls the "applyDirection" function
16
15
  * @public
17
16
  * @param listener
18
17
  */
19
-
20
18
  const attachDirectionChange = listener => {
21
19
  eventProvider.attachEvent(DIR_CHANGE, listener);
22
20
  };
21
+
23
22
  /**
24
23
  * Detach a callback that was passed with "attachDirectionChange"
25
24
  * @public
26
25
  * @param listener
27
26
  */
28
-
29
-
30
27
  _exports.attachDirectionChange = attachDirectionChange;
31
-
32
28
  const detachDirectionChange = listener => {
33
29
  eventProvider.detachEvent(DIR_CHANGE, listener);
34
30
  };
35
-
36
31
  _exports.detachDirectionChange = detachDirectionChange;
37
-
38
32
  const fireDirectionChange = () => {
39
33
  return eventProvider.fireEvent(DIR_CHANGE);
40
34
  };
41
-
42
35
  _exports.fireDirectionChange = fireDirectionChange;
43
36
  });
@@ -6,33 +6,28 @@ sap.ui.define(["exports", "../config/RTL"], function (_exports, _RTL) {
6
6
  });
7
7
  _exports.default = void 0;
8
8
  const GLOBAL_DIR_CSS_VAR = "--_ui5_dir";
9
-
10
9
  const getEffectiveDir = element => {
11
10
  const doc = window.document;
12
11
  const dirValues = ["ltr", "rtl"]; // exclude "auto" and "" from all calculations
12
+ const locallyAppliedDir = getComputedStyle(element).getPropertyValue(GLOBAL_DIR_CSS_VAR);
13
13
 
14
- const locallyAppliedDir = getComputedStyle(element).getPropertyValue(GLOBAL_DIR_CSS_VAR); // In that order, inspect the CSS Var (for modern browsers), the element itself, html and body (for IE fallback)
15
-
14
+ // In that order, inspect the CSS Var (for modern browsers), the element itself, html and body (for IE fallback)
16
15
  if (dirValues.includes(locallyAppliedDir)) {
17
16
  return locallyAppliedDir;
18
17
  }
19
-
20
18
  if (dirValues.includes(element.dir)) {
21
19
  return element.dir;
22
20
  }
23
-
24
21
  if (dirValues.includes(doc.documentElement.dir)) {
25
22
  return doc.documentElement.dir;
26
23
  }
27
-
28
24
  if (dirValues.includes(doc.body.dir)) {
29
25
  return doc.body.dir;
30
- } // Finally, check the configuration for explicitly set RTL or language-implied RTL
31
-
26
+ }
32
27
 
28
+ // Finally, check the configuration for explicitly set RTL or language-implied RTL
33
29
  return (0, _RTL.getRTL)() ? "rtl" : undefined;
34
30
  };
35
-
36
31
  var _default = getEffectiveDir;
37
32
  _exports.default = _default;
38
33
  });
@@ -7,45 +7,37 @@ sap.ui.define(["exports", "../util/detectNavigatorLanguage", "../config/Language
7
7
  _exports.default = void 0;
8
8
  _detectNavigatorLanguage = _interopRequireDefault(_detectNavigatorLanguage);
9
9
  _Locale = _interopRequireDefault(_Locale);
10
-
11
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12
-
13
11
  const cache = new Map();
14
-
15
12
  const getLocaleInstance = lang => {
16
13
  if (!cache.has(lang)) {
17
14
  cache.set(lang, new _Locale.default(lang));
18
15
  }
19
-
20
16
  return cache.get(lang);
21
17
  };
22
-
23
18
  const convertToLocaleOrNull = lang => {
24
19
  try {
25
20
  if (lang && typeof lang === "string") {
26
21
  return getLocaleInstance(lang);
27
22
  }
28
- } catch (e) {// ignore
23
+ } catch (e) {
24
+ // ignore
29
25
  }
30
26
  };
27
+
31
28
  /**
32
29
  * Returns the locale based on the parameter or configured language Configuration#getLanguage
33
30
  * If no language has been configured - a new locale based on browser language is returned
34
31
  */
35
-
36
-
37
32
  const getLocale = lang => {
38
33
  if (lang) {
39
34
  return convertToLocaleOrNull(lang);
40
35
  }
41
-
42
36
  if ((0, _Language.getLanguage)()) {
43
37
  return getLocaleInstance((0, _Language.getLanguage)());
44
38
  }
45
-
46
39
  return convertToLocaleOrNull((0, _detectNavigatorLanguage.default)());
47
40
  };
48
-
49
41
  var _default = getLocale;
50
42
  _exports.default = _default;
51
43
  });
@@ -6,27 +6,19 @@ sap.ui.define(["exports", "../EventProvider"], function (_exports, _EventProvide
6
6
  });
7
7
  _exports.fireLanguageChange = _exports.detachLanguageChange = _exports.attachLanguageChange = void 0;
8
8
  _EventProvider = _interopRequireDefault(_EventProvider);
9
-
10
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
10
  const eventProvider = new _EventProvider.default();
13
11
  const LANG_CHANGE = "languageChange";
14
-
15
12
  const attachLanguageChange = listener => {
16
13
  eventProvider.attachEvent(LANG_CHANGE, listener);
17
14
  };
18
-
19
15
  _exports.attachLanguageChange = attachLanguageChange;
20
-
21
16
  const detachLanguageChange = listener => {
22
17
  eventProvider.detachEvent(LANG_CHANGE, listener);
23
18
  };
24
-
25
19
  _exports.detachLanguageChange = detachLanguageChange;
26
-
27
20
  const fireLanguageChange = lang => {
28
21
  return eventProvider.fireEventAsync(LANG_CHANGE, lang);
29
22
  };
30
-
31
23
  _exports.fireLanguageChange = fireLanguageChange;
32
24
  });
@@ -5,7 +5,6 @@ sap.ui.define(["exports", "../generated/AssetParameters"], function (_exports, _
5
5
  value: true
6
6
  });
7
7
  _exports.default = void 0;
8
-
9
8
  /**
10
9
  * Calculates the next fallback locale for the given locale.
11
10
  *
@@ -16,22 +15,19 @@ sap.ui.define(["exports", "../generated/AssetParameters"], function (_exports, _
16
15
  if (!locale) {
17
16
  return _AssetParameters.DEFAULT_LOCALE;
18
17
  }
19
-
20
18
  if (locale === "zh_HK") {
21
19
  return "zh_TW";
22
- } // if there are multiple segments (separated by underscores), remove the last one
23
-
20
+ }
24
21
 
22
+ // if there are multiple segments (separated by underscores), remove the last one
25
23
  const p = locale.lastIndexOf("_");
26
-
27
24
  if (p >= 0) {
28
25
  return locale.slice(0, p);
29
- } // for any language but the default, fallback to the default first before falling back to the 'raw' language (empty string)
30
-
26
+ }
31
27
 
28
+ // for any language but the default, fallback to the default first before falling back to the 'raw' language (empty string)
32
29
  return locale !== _AssetParameters.DEFAULT_LOCALE ? _AssetParameters.DEFAULT_LOCALE : "";
33
30
  };
34
-
35
31
  var _default = nextFallbackLocale;
36
32
  _exports.default = _default;
37
33
  });
@@ -7,27 +7,25 @@ sap.ui.define(["exports", "../generated/AssetParameters"], function (_exports, _
7
7
  _exports.default = void 0;
8
8
  const localeRegEX = /^((?:[A-Z]{2,3}(?:-[A-Z]{3}){0,3})|[A-Z]{4}|[A-Z]{5,8})(?:-([A-Z]{4}))?(?:-([A-Z]{2}|[0-9]{3}))?((?:-[0-9A-Z]{5,8}|-[0-9][0-9A-Z]{3})*)((?:-[0-9A-WYZ](?:-[0-9A-Z]{2,8})+)*)(?:-(X(?:-[0-9A-Z]{1,8})+))?$/i;
9
9
  const SAPSupportabilityLocales = /(?:^|-)(saptrc|sappsd)(?:-|$)/i;
10
- /* Map for old language names for a few ISO639 codes. */
11
10
 
11
+ /* Map for old language names for a few ISO639 codes. */
12
12
  const M_ISO639_NEW_TO_OLD = {
13
13
  "he": "iw",
14
14
  "yi": "ji",
15
15
  "id": "in",
16
16
  "sr": "sh"
17
17
  };
18
+
18
19
  /**
19
20
  * Normalizes the given locale in BCP-47 syntax.
20
21
  * @param {string} locale locale to normalize
21
22
  * @returns {string} Normalized locale, "undefined" if the locale can't be normalized or the default locale, if no locale provided.
22
23
  */
23
-
24
24
  const normalizeLocale = locale => {
25
25
  let m;
26
-
27
26
  if (!locale) {
28
27
  return _AssetParameters.DEFAULT_LOCALE;
29
28
  }
30
-
31
29
  if (typeof locale === "string" && (m = localeRegEX.exec(locale.replace(/_/g, "-")))) {
32
30
  /* eslint-disable-line */
33
31
  let language = m[1].toLowerCase();
@@ -35,16 +33,15 @@ sap.ui.define(["exports", "../generated/AssetParameters"], function (_exports, _
35
33
  const script = m[2] ? m[2].toLowerCase() : undefined;
36
34
  const variants = m[4] ? m[4].slice(1) : undefined;
37
35
  const isPrivate = m[6];
38
- language = M_ISO639_NEW_TO_OLD[language] || language; // recognize and convert special SAP supportability locales (overwrites m[]!)
36
+ language = M_ISO639_NEW_TO_OLD[language] || language;
39
37
 
40
- if (isPrivate && (m = SAPSupportabilityLocales.exec(isPrivate))
41
- /* eslint-disable-line */
42
- || variants && (m = SAPSupportabilityLocales.exec(variants))) {
38
+ // recognize and convert special SAP supportability locales (overwrites m[]!)
39
+ if (isPrivate && (m = SAPSupportabilityLocales.exec(isPrivate)) /* eslint-disable-line */ || variants && (m = SAPSupportabilityLocales.exec(variants))) {
43
40
  /* eslint-disable-line */
44
41
  return `en_US_${m[1].toLowerCase()}`; // for now enforce en_US (agreed with SAP SLS)
45
- } // Chinese: when no region but a script is specified, use default region for each script
46
-
42
+ }
47
43
 
44
+ // Chinese: when no region but a script is specified, use default region for each script
48
45
  if (language === "zh" && !region) {
49
46
  if (script === "hans") {
50
47
  region = "CN";
@@ -52,12 +49,9 @@ sap.ui.define(["exports", "../generated/AssetParameters"], function (_exports, _
52
49
  region = "TW";
53
50
  }
54
51
  }
55
-
56
- return language + (region ? "_" + region + (variants ? "_" + variants.replace("-", "_") : "") : "");
57
- /* eslint-disable-line */
52
+ return language + (region ? "_" + region + (variants ? "_" + variants.replace("-", "_") : "") : ""); /* eslint-disable-line */
58
53
  }
59
54
  };
60
-
61
55
  var _default = normalizeLocale;
62
56
  _exports.default = _default;
63
57
  });
@@ -37,51 +37,40 @@ sap.ui.define(["exports", "sap/ui/webc/common/thirdparty/lit-html/lit-html", "..
37
37
  return _unsafeHtml.unsafeHTML;
38
38
  }
39
39
  });
40
-
41
40
  const effectiveHtml = (...args) => {
42
41
  const LitStatic = (0, _FeaturesRegistry.getFeature)("LitStatic");
43
42
  const fn = LitStatic ? LitStatic.html : _litHtml.html;
44
43
  return fn(...args);
45
44
  };
46
-
47
45
  _exports.html = effectiveHtml;
48
-
49
46
  const effectiveSvg = (...args) => {
50
47
  const LitStatic = (0, _FeaturesRegistry.getFeature)("LitStatic");
51
48
  const fn = LitStatic ? LitStatic.svg : _litHtml.svg;
52
49
  return fn(...args);
53
50
  };
54
-
55
51
  _exports.svg = effectiveSvg;
56
-
57
52
  const litRender = (templateResult, domNode, styleStrOrHrefsArr, forStaticArea, {
58
53
  host
59
54
  } = {}) => {
60
55
  const OpenUI5Enablement = (0, _FeaturesRegistry.getFeature)("OpenUI5Enablement");
61
-
62
56
  if (OpenUI5Enablement && !forStaticArea) {
63
57
  templateResult = OpenUI5Enablement.wrapTemplateResultInBusyMarkup(effectiveHtml, host, templateResult);
64
58
  }
65
-
66
59
  if (typeof styleStrOrHrefsArr === "string") {
67
60
  templateResult = effectiveHtml`<style>${styleStrOrHrefsArr}</style>${templateResult}`;
68
61
  } else if (Array.isArray(styleStrOrHrefsArr) && styleStrOrHrefsArr.length) {
69
62
  templateResult = effectiveHtml`${styleStrOrHrefsArr.map(href => effectiveHtml`<link type="text/css" rel="stylesheet" href="${href}">`)}${templateResult}`;
70
63
  }
71
-
72
64
  (0, _litHtml.render)(templateResult, domNode, {
73
65
  host
74
66
  });
75
67
  };
76
-
77
68
  const scopeTag = (tag, tags, suffix) => {
78
69
  const LitStatic = (0, _FeaturesRegistry.getFeature)("LitStatic");
79
-
80
70
  if (LitStatic) {
81
71
  return LitStatic.unsafeStatic((tags || []).includes(tag) ? `${tag}-${suffix}` : tag);
82
72
  }
83
73
  };
84
-
85
74
  _exports.scopeTag = scopeTag;
86
75
  var _default = litRender;
87
76
  _exports.default = _default;
@@ -5,7 +5,6 @@ sap.ui.define(["exports", "sap/ui/webc/common/thirdparty/lit-html/lit-html", "sa
5
5
  value: true
6
6
  });
7
7
  _exports.styleMap = void 0;
8
-
9
8
  /**
10
9
  * @license
11
10
  * Copyright 2018 Google LLC
@@ -15,43 +14,36 @@ sap.ui.define(["exports", "sap/ui/webc/common/thirdparty/lit-html/lit-html", "sa
15
14
  /**
16
15
  * This is the original style-map.js directive from lit-html 2 with the only difference that "render" is not called even for the first rendering (update is used instead)
17
16
  */
17
+
18
18
  class StyleMapDirective extends _directive.Directive {
19
19
  constructor(partInfo) {
20
20
  var _a;
21
-
22
21
  super(partInfo);
23
-
24
22
  if (partInfo.type !== _directive.PartType.ATTRIBUTE || partInfo.name !== 'style' || ((_a = partInfo.strings) === null || _a === void 0 ? void 0 : _a.length) > 2) {
25
23
  throw new Error('The `styleMap` directive must be used in the `style` attribute ' + 'and must be the only part in the attribute.');
26
24
  }
27
25
  }
28
-
29
26
  render(styleInfo) {
30
27
  return "";
31
28
  }
32
-
33
29
  update(part, [styleInfo]) {
34
30
  const {
35
31
  style
36
32
  } = part.element;
37
-
38
33
  if (this._previousStyleProperties === undefined) {
39
34
  this._previousStyleProperties = new Set();
40
-
41
35
  for (const name in styleInfo) {
42
36
  this._previousStyleProperties.add(name);
43
- } // return this.render(styleInfo);
44
-
45
- } // Remove old properties that no longer exist in styleInfo
37
+ }
38
+ // return this.render(styleInfo);
39
+ }
40
+ // Remove old properties that no longer exist in styleInfo
46
41
  // We use forEach() instead of for-of so that re don't require down-level
47
42
  // iteration.
48
-
49
-
50
43
  this._previousStyleProperties.forEach(name => {
51
44
  // If the name isn't in styleInfo or it's null/undefined
52
45
  if (styleInfo[name] == null) {
53
46
  this._previousStyleProperties.delete(name);
54
-
55
47
  if (name.includes('-')) {
56
48
  style.removeProperty(name);
57
49
  } else {
@@ -61,15 +53,12 @@ sap.ui.define(["exports", "sap/ui/webc/common/thirdparty/lit-html/lit-html", "sa
61
53
  style[name] = '';
62
54
  }
63
55
  }
64
- }); // Add or update properties
65
-
66
-
56
+ });
57
+ // Add or update properties
67
58
  for (const name in styleInfo) {
68
59
  const value = styleInfo[name];
69
-
70
60
  if (value != null) {
71
61
  this._previousStyleProperties.add(name);
72
-
73
62
  if (name.includes('-')) {
74
63
  style.setProperty(name, value);
75
64
  } else {
@@ -78,12 +67,9 @@ sap.ui.define(["exports", "sap/ui/webc/common/thirdparty/lit-html/lit-html", "sa
78
67
  }
79
68
  }
80
69
  }
81
-
82
70
  return _litHtml.noChange;
83
71
  }
84
-
85
72
  }
86
-
87
73
  const styleMap = (0, _directive.directive)(StyleMapDirective);
88
74
  _exports.styleMap = styleMap;
89
75
  });
@@ -5,7 +5,6 @@ sap.ui.define(["exports", "../CustomElementsScopeUtils"], function (_exports, _C
5
5
  value: true
6
6
  });
7
7
  _exports.default = void 0;
8
-
9
8
  /**
10
9
  * Runs a component's template with the component's current state, while also scoping HTML
11
10
  *
@@ -19,25 +18,21 @@ sap.ui.define(["exports", "../CustomElementsScopeUtils"], function (_exports, _C
19
18
  const scope = (0, _CustomElementsScopeUtils.getCustomElementsScopingSuffix)();
20
19
  return template(component, tagsToScope, scope);
21
20
  };
21
+
22
22
  /**
23
23
  * Returns all tags, used inside component's template subject to scoping.
24
24
  * @param component - the component
25
25
  * @returns {Array[]}
26
26
  * @private
27
27
  */
28
-
29
-
30
28
  const getTagsToScope = component => {
31
29
  const componentTag = component.constructor.getMetadata().getPureTag();
32
30
  const tagsToScope = component.constructor.getUniqueDependencies().map(dep => dep.getMetadata().getPureTag()).filter(_CustomElementsScopeUtils.shouldScopeCustomElement);
33
-
34
31
  if ((0, _CustomElementsScopeUtils.shouldScopeCustomElement)(componentTag)) {
35
32
  tagsToScope.push(componentTag);
36
33
  }
37
-
38
34
  return tagsToScope;
39
35
  };
40
-
41
36
  var _default = executeTemplate;
42
37
  _exports.default = _default;
43
38
  });