@ui5/webcomponents-base 0.0.0-0a35d6b3d → 0.0.0-0dd36ca4b

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 (208) hide show
  1. package/CHANGELOG.md +653 -0
  2. package/README.md +0 -8
  3. package/config/wdio.conf.cjs +0 -8
  4. package/dist/.tsbuildinfo +1 -1
  5. package/dist/Boot.d.ts +3 -2
  6. package/dist/Boot.js +7 -5
  7. package/dist/Boot.js.map +1 -1
  8. package/dist/Device.d.ts +1 -2
  9. package/dist/Device.js +5 -12
  10. package/dist/Device.js.map +1 -1
  11. package/dist/IgnoreCustomElements.d.ts +3 -5
  12. package/dist/IgnoreCustomElements.js +3 -5
  13. package/dist/IgnoreCustomElements.js.map +1 -1
  14. package/dist/InitialConfiguration.d.ts +1 -2
  15. package/dist/InitialConfiguration.js +1 -5
  16. package/dist/InitialConfiguration.js.map +1 -1
  17. package/dist/Keys.d.ts +3 -1
  18. package/dist/Keys.js +5 -1
  19. package/dist/Keys.js.map +1 -1
  20. package/dist/ManagedStyles.js +24 -98
  21. package/dist/ManagedStyles.js.map +1 -1
  22. package/dist/MediaRange.d.ts +6 -6
  23. package/dist/MediaRange.js +16 -16
  24. package/dist/MediaRange.js.map +1 -1
  25. package/dist/UI5Element.d.ts +20 -28
  26. package/dist/UI5Element.js +89 -67
  27. package/dist/UI5Element.js.map +1 -1
  28. package/dist/UI5ElementMetadata.d.ts +9 -2
  29. package/dist/UI5ElementMetadata.js +23 -4
  30. package/dist/UI5ElementMetadata.js.map +1 -1
  31. package/dist/asset-registries/Icons.js +1 -1
  32. package/dist/asset-registries/Icons.js.map +1 -1
  33. package/dist/asset-registries/Illustrations.d.ts +1 -0
  34. package/dist/asset-registries/Illustrations.js +12 -19
  35. package/dist/asset-registries/Illustrations.js.map +1 -1
  36. package/dist/asset-registries/LocaleData.js +1 -1
  37. package/dist/asset-registries/LocaleData.js.map +1 -1
  38. package/dist/asset-registries/i18n.d.ts +2 -2
  39. package/dist/asset-registries/i18n.js +2 -2
  40. package/dist/asset-registries/i18n.js.map +1 -1
  41. package/dist/asset-registries/util/IconCollectionsByTheme.d.ts +1 -1
  42. package/dist/asset-registries/util/IconCollectionsByTheme.js +1 -1
  43. package/dist/asset-registries/util/IconCollectionsByTheme.js.map +1 -1
  44. package/dist/asset-registries/util/getIconCollectionByTheme.d.ts +3 -3
  45. package/dist/asset-registries/util/getIconCollectionByTheme.js +3 -3
  46. package/dist/asset-registries/util/getIconCollectionByTheme.js.map +1 -1
  47. package/dist/config/Icons.d.ts +7 -7
  48. package/dist/config/Icons.js +7 -7
  49. package/dist/config/Icons.js.map +1 -1
  50. package/dist/config/Language.d.ts +1 -1
  51. package/dist/config/Language.js +6 -3
  52. package/dist/config/Language.js.map +1 -1
  53. package/dist/config/Theme.d.ts +4 -3
  54. package/dist/config/Theme.js +13 -6
  55. package/dist/config/Theme.js.map +1 -1
  56. package/dist/config/ThemeRoot.d.ts +2 -4
  57. package/dist/config/ThemeRoot.js +2 -4
  58. package/dist/config/ThemeRoot.js.map +1 -1
  59. package/dist/config/Timezone.d.ts +1 -1
  60. package/dist/config/Timezone.js +1 -1
  61. package/dist/config/Timezone.js.map +1 -1
  62. package/dist/css/SystemCSSVars.css +0 -8
  63. package/dist/custom-elements-internal.json +2952 -0
  64. package/dist/custom-elements.json +322 -2891
  65. package/dist/decorators/customElement.d.ts +2 -2
  66. package/dist/decorators/customElement.js +9 -4
  67. package/dist/decorators/customElement.js.map +1 -1
  68. package/dist/decorators/event.d.ts +5 -2
  69. package/dist/decorators/event.js.map +1 -1
  70. package/dist/decorators.d.ts +5 -0
  71. package/dist/decorators.js +6 -0
  72. package/dist/decorators.js.map +1 -0
  73. package/dist/delegate/ItemNavigation.d.ts +8 -8
  74. package/dist/delegate/ItemNavigation.js +9 -9
  75. package/dist/delegate/ItemNavigation.js.map +1 -1
  76. package/dist/features/InputElementsFormSupport.d.ts +18 -0
  77. package/dist/features/InputElementsFormSupport.js +40 -0
  78. package/dist/features/InputElementsFormSupport.js.map +1 -0
  79. package/dist/features/OpenUI5Support.d.ts +0 -2
  80. package/dist/features/OpenUI5Support.js +6 -21
  81. package/dist/features/OpenUI5Support.js.map +1 -1
  82. package/dist/features/patchPatcher.d.ts +11 -0
  83. package/dist/features/patchPatcher.js +11 -0
  84. package/dist/features/patchPatcher.js.map +1 -0
  85. package/dist/features/patchPopup.d.ts +14 -0
  86. package/dist/features/patchPopup.js +50 -0
  87. package/dist/features/patchPopup.js.map +1 -0
  88. package/dist/generated/AssetParameters.js +1 -1
  89. package/dist/generated/AssetParameters.js.map +1 -1
  90. package/dist/generated/VersionInfo.js +5 -5
  91. package/dist/generated/VersionInfo.js.map +1 -1
  92. package/dist/generated/css/SystemCSSVars.css.js +1 -1
  93. package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
  94. package/dist/locale/applyDirection.d.ts +3 -2
  95. package/dist/locale/applyDirection.js +3 -2
  96. package/dist/locale/applyDirection.js.map +1 -1
  97. package/dist/locale/getEffectiveDir.d.ts +1 -1
  98. package/dist/locale/getEffectiveDir.js +3 -19
  99. package/dist/locale/getEffectiveDir.js.map +1 -1
  100. package/dist/renderer/LitRenderer.js +2 -8
  101. package/dist/renderer/LitRenderer.js.map +1 -1
  102. package/dist/renderer/directives/style-map.d.ts +13 -0
  103. package/dist/renderer/directives/style-map.js +59 -59
  104. package/dist/renderer/directives/style-map.js.map +1 -0
  105. package/dist/sap/base/Log.js +698 -188
  106. package/dist/sap/base/assert.js +28 -1
  107. package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
  108. package/dist/sap/base/security/URLListValidator.js +253 -6
  109. package/dist/sap/base/security/encodeCSS.js +34 -8
  110. package/dist/sap/base/security/encodeXML.js +47 -17
  111. package/dist/sap/base/security/sanitizeHTML.js +35 -13
  112. package/dist/sap/base/strings/toHex.js +27 -2
  113. package/dist/sap/base/util/now.js +24 -3
  114. package/dist/sap/base/util/uid.js +27 -0
  115. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
  116. package/dist/ssr-dom-shim.d.ts +1 -0
  117. package/dist/ssr-dom-shim.js +12 -0
  118. package/dist/ssr-dom-shim.js.map +1 -0
  119. package/dist/ssr-dom.d.ts +0 -0
  120. package/dist/ssr-dom.js +0 -0
  121. package/dist/theming/getConstructableStyle.d.ts +1 -1
  122. package/dist/theming/getConstructableStyle.js +3 -3
  123. package/dist/theming/getConstructableStyle.js.map +1 -1
  124. package/dist/theming/getEffectiveStyle.d.ts +1 -1
  125. package/dist/theming/getEffectiveStyle.js +5 -12
  126. package/dist/theming/getEffectiveStyle.js.map +1 -1
  127. package/dist/types/AriaHasPopup.d.ts +32 -0
  128. package/dist/types/AriaHasPopup.js +34 -0
  129. package/dist/types/AriaHasPopup.js.map +1 -0
  130. package/dist/types/AriaLandmarkRole.d.ts +79 -0
  131. package/dist/types/AriaLandmarkRole.js +81 -0
  132. package/dist/types/AriaLandmarkRole.js.map +1 -0
  133. package/dist/types/AriaRole.d.ts +27 -0
  134. package/dist/types/AriaRole.js +29 -0
  135. package/dist/types/AriaRole.js.map +1 -0
  136. package/dist/types/DOMReference.d.ts +1 -1
  137. package/dist/types/DOMReference.js +1 -1
  138. package/dist/types/DOMReference.js.map +1 -1
  139. package/dist/types/MovePlacement.d.ts +20 -0
  140. package/dist/types/MovePlacement.js +22 -0
  141. package/dist/types/MovePlacement.js.map +1 -0
  142. package/dist/types/Orientation.d.ts +16 -0
  143. package/dist/types/Orientation.js +18 -0
  144. package/dist/types/Orientation.js.map +1 -0
  145. package/dist/types/ValueState.d.ts +3 -3
  146. package/dist/types/ValueState.js +3 -3
  147. package/dist/types/ValueState.js.map +1 -1
  148. package/dist/types.d.ts +24 -1
  149. package/dist/types.js.map +1 -1
  150. package/dist/updateShadowRoot.d.ts +1 -2
  151. package/dist/updateShadowRoot.js +5 -29
  152. package/dist/updateShadowRoot.js.map +1 -1
  153. package/dist/util/PopupUtils.d.ts +1 -3
  154. package/dist/util/PopupUtils.js +1 -15
  155. package/dist/util/PopupUtils.js.map +1 -1
  156. package/dist/util/clamp.js +2 -1
  157. package/dist/util/clamp.js.map +1 -1
  158. package/dist/util/createLinkInHead.d.ts +1 -1
  159. package/dist/util/createLinkInHead.js +1 -1
  160. package/dist/util/createLinkInHead.js.map +1 -1
  161. package/dist/util/detectNavigatorLanguage.d.ts +2 -2
  162. package/dist/util/detectNavigatorLanguage.js +6 -1
  163. package/dist/util/detectNavigatorLanguage.js.map +1 -1
  164. package/dist/util/dragAndDrop/DragRegistry.d.ts +12 -0
  165. package/dist/util/dragAndDrop/DragRegistry.js +68 -0
  166. package/dist/util/dragAndDrop/DragRegistry.js.map +1 -0
  167. package/dist/util/dragAndDrop/findClosestPosition.d.ts +7 -0
  168. package/dist/util/dragAndDrop/findClosestPosition.js +59 -0
  169. package/dist/util/dragAndDrop/findClosestPosition.js.map +1 -0
  170. package/dist/util/dragAndDrop/longDragOverHandler.d.ts +2 -0
  171. package/dist/util/dragAndDrop/longDragOverHandler.js +25 -0
  172. package/dist/util/dragAndDrop/longDragOverHandler.js.map +1 -0
  173. package/dist/util/getClassCopy.d.ts +13 -9
  174. package/dist/util/getDesigntimePropertyAsArray.d.ts +2 -2
  175. package/dist/util/getDesigntimePropertyAsArray.js +2 -1
  176. package/dist/util/getDesigntimePropertyAsArray.js.map +1 -1
  177. package/dist/vscode.html-custom-data.json +22 -0
  178. package/index.js +1 -17
  179. package/package-scripts.cjs +12 -10
  180. package/package.json +13 -7
  181. package/src/css/SystemCSSVars.css +0 -8
  182. package/tsconfig.json +3 -0
  183. package/.eslintignore +0 -16
  184. package/.eslintrc.cjs +0 -3
  185. package/bundle.esm.js +0 -67
  186. package/dist/CSP.d.ts +0 -30
  187. package/dist/CSP.js +0 -51
  188. package/dist/CSP.js.map +0 -1
  189. package/dist/StaticAreaItem.d.ts +0 -35
  190. package/dist/StaticAreaItem.js +0 -100
  191. package/dist/StaticAreaItem.js.map +0 -1
  192. package/dist/config/RTL.d.ts +0 -7
  193. package/dist/config/RTL.js +0 -37
  194. package/dist/config/RTL.js.map +0 -1
  195. package/dist/theming/getEffectiveLinksHrefs.d.ts +0 -3
  196. package/dist/theming/getEffectiveLinksHrefs.js +0 -17
  197. package/dist/theming/getEffectiveLinksHrefs.js.map +0 -1
  198. package/dist/theming/preloadLinks.d.ts +0 -3
  199. package/dist/theming/preloadLinks.js +0 -19
  200. package/dist/theming/preloadLinks.js.map +0 -1
  201. package/dist/util/createStyleInHead.d.ts +0 -8
  202. package/dist/util/createStyleInHead.js +0 -18
  203. package/dist/util/createStyleInHead.js.map +0 -1
  204. package/lib/generate-asset-parameters/index.js +0 -27
  205. package/lib/generate-styles/index.js +0 -31
  206. package/lib/generate-version-info/index.js +0 -32
  207. package/src/renderer/directives/style-map.js +0 -72
  208. package/used-modules.txt +0 -10
package/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  getDefaultIconCollection,
13
13
  } from "./dist/config/Icons.js";
14
14
  import { RegisteredIconCollection } from "./dist/asset-registries/util/IconCollectionsByTheme.js";
15
- import getEffectiveIconCollection from "./dist/asset-registries/util/getIconCollectionsByTheme.js";
15
+ import getEffectiveIconCollection from "./dist/asset-registries/util/getIconCollectionByTheme.js";
16
16
  import {
17
17
  getLanguage,
18
18
  setLanguage,
@@ -21,7 +21,6 @@ import {
21
21
  getFetchDefaultLanguage,
22
22
  } from "./dist/config/Language.js";
23
23
  import { getNoConflict, setNoConflict } from "./dist/config/NoConflict.js";
24
- import { getRTL } from "./dist/config/RTL.js";
25
24
  import {
26
25
  getTheme,
27
26
  setTheme,
@@ -57,13 +56,6 @@ import { registerIconLoader } from "./dist/asset-registries/Icons.js";
57
56
  // Boot.ts
58
57
  import { attachBoot } from "./dist/Boot.js";
59
58
 
60
- // CSP.ts
61
- import {
62
- setPackageCSSRoot,
63
- setUseLinks,
64
- setPreloadLinks,
65
- } from "./dist/CSP.js";
66
-
67
59
  // CustomElementsScope.ts
68
60
  import {
69
61
  setCustomElementsScopingSuffix,
@@ -76,7 +68,6 @@ import {
76
68
  // Device.ts
77
69
  import {
78
70
  supportsTouch,
79
- isIE,
80
71
  isSafari,
81
72
  isChrome,
82
73
  isFirefox,
@@ -138,7 +129,6 @@ export {
138
129
  getFetchDefaultLanguage,
139
130
  getNoConflict,
140
131
  setNoConflict,
141
- getRTL,
142
132
  getTheme,
143
133
  setTheme,
144
134
  getDefaultTheme,
@@ -175,11 +165,6 @@ export {
175
165
  // Boot.ts
176
166
  attachBoot,
177
167
 
178
- // CSP.ts
179
- setPackageCSSRoot,
180
- setUseLinks,
181
- setPreloadLinks,
182
-
183
168
  // CustomElementsScope.ts
184
169
  setCustomElementsScopingSuffix,
185
170
  getCustomElementsScopingSuffix,
@@ -189,7 +174,6 @@ export {
189
174
 
190
175
  // Device.ts
191
176
  supportsTouch,
192
- isIE,
193
177
  isSafari,
194
178
  isChrome,
195
179
  isFirefox,
@@ -5,24 +5,24 @@ const assetParametersScript = resolve.sync("@ui5/webcomponents-base/lib/generate
5
5
  const stylesScript = resolve.sync("@ui5/webcomponents-base/lib/generate-styles/index.js");
6
6
  const versionScript = resolve.sync("@ui5/webcomponents-base/lib/generate-version-info/index.js");
7
7
  const copyUsedModules = resolve.sync("@ui5/webcomponents-tools/lib/copy-list/index.js");
8
- const esmAbsToRel = resolve.sync("@ui5/webcomponents-tools/lib/esm-abs-to-rel/index.js");
8
+ const amdToES6 = resolve.sync("@ui5/webcomponents-tools/lib/amd-to-es6/index.js");
9
+ const noRequire = resolve.sync("@ui5/webcomponents-tools/lib/amd-to-es6/no-remaining-require.js");
9
10
 
10
11
  const LIB = path.join(__dirname, `../tools/lib/`);
11
12
 
12
13
  const viteConfig = `-c "${require.resolve("@ui5/webcomponents-tools/components-package/vite.config.js")}"`;
13
14
 
14
15
  const scripts = {
15
- clean: "rimraf jsdoc-dist && rimraf src/generated && rimraf dist && rimraf .port",
16
+ clean: "rimraf src/generated && rimraf dist && rimraf .port",
16
17
  lint: `eslint .`,
17
- generate: "cross-env UI5_TS=true nps clean integrate copy generateAssetParameters generateVersionInfo generateStyles generateTemplates",
18
- prepare: "cross-env UI5_TS=true nps clean integrate copy generateAssetParameters generateVersionInfo generateStyles generateTemplates typescript",
18
+ generate: "cross-env UI5_TS=true nps clean integrate copy generateAssetParameters generateVersionInfo generateStyles generateTemplates generateSsrDom",
19
+ prepare: "cross-env UI5_TS=true nps clean integrate copy generateAssetParameters generateVersionInfo generateStyles generateTemplates typescript integrate.no-remaining-require",
19
20
  typescript: "tsc -b",
20
21
  integrate: {
21
- default: "nps integrate.copy-used-modules integrate.replace-amd integrate.amd-to-es6 integrate.esm-abs-to-rel integrate.third-party",
22
+ default: "nps integrate.copy-used-modules integrate.amd-to-es6 integrate.third-party",
22
23
  "copy-used-modules": `node "${copyUsedModules}" ./used-modules.txt dist/`,
23
- "replace-amd": "replace-in-file sap.ui.define define dist/**/*.js",
24
- "amd-to-es6": "amdtoes6 --src=dist/ --replace --glob=**/*.js",
25
- "esm-abs-to-rel": `node "${esmAbsToRel}" dist/ dist/`,
24
+ "amd-to-es6": `node "${amdToES6}" dist/`,
25
+ "no-remaining-require": `node "${noRequire}" dist/`,
26
26
  "third-party": {
27
27
  default: "nps integrate.third-party.copy integrate.third-party.fix",
28
28
  copy: "mkdirp dist/sap/ui/thirdparty/ && copy-and-watch ../../node_modules/@openui5/sap.ui.core/src/sap/ui/thirdparty/caja-html-sanitizer.js dist/sap/ui/thirdparty/",
@@ -40,11 +40,13 @@ const scripts = {
40
40
  generateAssetParameters: `node "${assetParametersScript}"`,
41
41
  generateVersionInfo: `node "${versionScript}"`,
42
42
  generateStyles: `node "${stylesScript}"`,
43
+ // these files are ignored in TS because the import in UI5Elments tries to load them from the dist and throws an error. create them empty here
44
+ generateSsrDom: `yarn nodetouch dist/ssr-dom.js dist/ssr-dom.d.ts`,
43
45
  generateTemplates: `mkdirp src/generated/templates && cross-env UI5_BASE=true UI5_TS=true node "${LIB}/hbs2ui5/index.js" -d test/elements -o src/generated/templates`,
44
46
  generateAPI: {
45
47
  default: "nps generateAPI.generateCEM generateAPI.validateCEM",
46
- generateCEM: `cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs"`,
47
- validateCEM: `node "${LIB}/cem/validate.js"`,
48
+ generateCEM: `cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs" --dev`,
49
+ validateCEM: `node "${LIB}/cem/validate.js" --dev`,
48
50
  },
49
51
  watch: {
50
52
  default: 'concurrently "nps watch.src" "nps watch.styles"',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui5/webcomponents-base",
3
- "version": "0.0.0-0a35d6b3d",
3
+ "version": "0.0.0-0dd36ca4b",
4
4
  "description": "UI5 Web Components: webcomponents.base",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -17,6 +17,11 @@
17
17
  "directory": "packages/base"
18
18
  },
19
19
  "exports": {
20
+ "./dist/ssr-dom.js": {
21
+ "browser": "./dist/ssr-dom.js",
22
+ "node": "./dist/ssr-dom-shim.js",
23
+ "default": "./dist/ssr-dom.js"
24
+ },
20
25
  ".": "./index.js",
21
26
  "./dist/*": "./dist/*",
22
27
  "./package.json": "./package.json",
@@ -32,22 +37,23 @@
32
37
  "generateAPI": "nps generateAPI",
33
38
  "bundle": "nps build.bundle",
34
39
  "test": "nps test",
35
- "prepublishOnly": "tsc"
40
+ "prepublishOnly": "tsc -b"
36
41
  },
37
42
  "dependencies": {
43
+ "@lit-labs/ssr-dom-shim": "^1.1.2",
38
44
  "lit-html": "^2.0.1"
39
45
  },
40
46
  "devDependencies": {
41
- "@buxlabs/amd-to-es6": "0.16.1",
42
- "@openui5/sap.ui.core": "1.116.0",
43
- "@ui5/webcomponents-tools": "0.0.0-0a35d6b3d",
44
- "chromedriver": "119.0.1",
47
+ "@openui5/sap.ui.core": "1.120.5",
48
+ "@ui5/webcomponents-tools": "0.0.0-0dd36ca4b",
49
+ "chromedriver": "^123.0.3",
45
50
  "clean-css": "^5.2.2",
46
51
  "copy-and-watch": "^0.1.5",
47
52
  "cross-env": "^7.0.3",
48
53
  "eslint": "^7.22.0",
49
54
  "mkdirp": "^1.0.4",
50
55
  "replace-in-file": "^6.3.5",
51
- "resolve": "^1.20.0"
56
+ "resolve": "^1.20.0",
57
+ "touch": "^3.1.0"
52
58
  }
53
59
  }
@@ -7,11 +7,3 @@
7
7
  .sapUiSizeCompact {
8
8
  --_ui5_content_density:compact;
9
9
  }
10
-
11
- [dir="rtl"] {
12
- --_ui5_dir:rtl;
13
- }
14
-
15
- [dir="ltr"] {
16
- --_ui5_dir:ltr;
17
- }
package/tsconfig.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "include": ["src/**/*", "src/global.d.ts"],
3
+ // ssr-dom is imported with bare specifier so that conditional exports are used, but this treats it as input and output, so ignore it
4
+ "exclude": ["src/ssr-dom.ts"],
3
5
  "compilerOptions": {
4
6
  "target": "ES2021",
7
+ "lib": ["DOM", "DOM.Iterable", "ES2023"],
5
8
  // Generate d.ts files
6
9
  "declaration": true,
7
10
  "outDir": "dist",
package/.eslintignore DELETED
@@ -1,16 +0,0 @@
1
- # Note: Changes to this file also must be applied to the top level .eslintignore file.
2
- test
3
- lib
4
- dist
5
- jsdoc-dist
6
- src/generated
7
- src/thirdparty
8
- bundle.esm.js
9
- bundle.es5.js
10
- rollup.config*.js
11
- wdio.conf.cjs
12
- postcss.config.cjs
13
- package-scripts.cjs
14
- .eslintrc.cjs
15
- src/renderer/directives/style-map.js
16
- src/util/metaUrl.js
package/.eslintrc.cjs DELETED
@@ -1,3 +0,0 @@
1
- const config = require("@ui5/webcomponents-tools/components-package/eslint.js");
2
-
3
- module.exports = config;
package/bundle.esm.js DELETED
@@ -1,67 +0,0 @@
1
- import { registerThemePropertiesLoader } from "./dist/AssetRegistry.js";
2
- import EventProvider from "./dist/EventProvider.js";
3
-
4
- // ESM bundle targets browsers with native support
5
- import "./dist/features/OpenUI5Support.js";
6
-
7
- // Test components
8
- import "./test/elements/Generic.js";
9
- import "./test/elements/NoShadowDOM.js";
10
- import "./test/elements/Parent.js";
11
- import "./test/elements/Child.js";
12
- import "./test/elements/WithStaticArea.js";
13
- import "./test/elements/WithComplexTemplate.js";
14
- import "./test/elements/GenericExt.js";
15
-
16
- // Test themes - CSS Vars for the sap_fiori_3, sap_fiori_3_dark, sap_belize and sap_belize_hcb themes
17
- import "./test/assets/Themes.js";
18
-
19
- // used in test pages
20
- import { renderFinished } from "./dist/Render.js";
21
-
22
- // used for tests - to register a custom theme
23
- window.registerThemePropertiesLoader = registerThemePropertiesLoader;
24
-
25
- // i18n
26
- import { registerI18nLoader, getI18nBundle } from "./dist/i18nBundle.js";
27
- import parseProperties from "./dist/PropertiesFileFormat.js";
28
-
29
- // Note: keep in sync with rollup.config value for IIFE
30
- import { getAnimationMode } from "./dist/config/AnimationMode.js";
31
- import { getLanguage, setLanguage } from "./dist/config/Language.js";
32
- import { getCalendarType } from "./dist/config/CalendarType.js";
33
- import { getTheme, setTheme } from "./dist/config/Theme.js";
34
- import { getThemeRoot, setThemeRoot } from "./dist/config/ThemeRoot.js";
35
- import { getNoConflict, setNoConflict } from "./dist/config/NoConflict.js";
36
- import { getRTL } from "./dist/config/RTL.js";
37
- import { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from "./dist/config/FormatSettings.js";
38
- import { _getRegisteredNames as getIconNames } from "./dist/asset-registries/Icons.js"
39
- import applyDirection from "./dist/locale/applyDirection.js";
40
- import { getCurrentRuntimeIndex } from "./dist/Runtimes.js";
41
- import LegacyDateFormats from "./dist/features/LegacyDateFormats.js";
42
-
43
- window["sap-ui-webcomponents-bundle"] = {
44
- configuration : {
45
- getAnimationMode,
46
- getLanguage,
47
- setLanguage,
48
- getTheme,
49
- getThemeRoot,
50
- setThemeRoot,
51
- setTheme,
52
- getNoConflict,
53
- setNoConflict,
54
- getCalendarType,
55
- getRTL,
56
- getFirstDayOfWeek,
57
- getLegacyDateCalendarCustomizing,
58
- },
59
- getCurrentRuntimeIndex,
60
- getIconNames,
61
- parseProperties,
62
- registerI18nLoader,
63
- getI18nBundle,
64
- renderFinished,
65
- applyDirection,
66
- EventProvider,
67
- };
package/dist/CSP.d.ts DELETED
@@ -1,30 +0,0 @@
1
- /**
2
- * Use this function to provide the path to the directory where the css resources for the given package will be served from.
3
- *
4
- * @public
5
- * @param packageName name of the package that is being configured
6
- * @param root path, accessible by the server that will serve the css resources
7
- */
8
- declare const setPackageCSSRoot: (packageName: string, root: string) => void;
9
- declare const getUrl: (packageName: string, path: string) => string;
10
- /**
11
- * Call this function to enable or disable the usage of <link> tags instead of <style> tags to achieve CSP compliance
12
- * Example: "setUseLinks(true)" will unconditionally use <link> tags for all browsers;
13
- * Example: "setUseLinks(!document.adoptedStyleSheets) will only enable the usage of <link> tags for browsers that do not support constructable stylesheets.
14
- *
15
- * @public
16
- * @param use whether links will be used
17
- */
18
- declare const setUseLinks: (use: boolean) => void;
19
- /**
20
- * Call this function to enable or disable the preloading of <link> tags.
21
- * Note: only taken into account when <link> tags are being used.
22
- * Note: links are being preloaded by default, so call "setPreloadLinks(false)" to opt out of this.
23
- *
24
- * @public
25
- * @param preload
26
- */
27
- declare const setPreloadLinks: (preload: boolean) => void;
28
- declare const shouldUseLinks: () => boolean;
29
- declare const shouldPreloadLinks: () => boolean;
30
- export { setPackageCSSRoot, getUrl, setUseLinks, setPreloadLinks, shouldUseLinks, shouldPreloadLinks, };
package/dist/CSP.js DELETED
@@ -1,51 +0,0 @@
1
- const roots = new Map();
2
- let useLinks = false;
3
- let preloadLinks = true;
4
- /**
5
- * Use this function to provide the path to the directory where the css resources for the given package will be served from.
6
- *
7
- * @public
8
- * @param packageName name of the package that is being configured
9
- * @param root path, accessible by the server that will serve the css resources
10
- */
11
- const setPackageCSSRoot = (packageName, root) => {
12
- roots.set(packageName, root);
13
- };
14
- const getUrl = (packageName, path) => {
15
- const packageCSSRoot = roots.get(packageName);
16
- if (!packageCSSRoot) {
17
- console.warn(`Root path to the CSS resources ${packageName} not provided - use "setPackageCSSRoot" to provide the root.`); // eslint-disable-line
18
- return "";
19
- }
20
- return `${packageCSSRoot}${path}`;
21
- };
22
- /**
23
- * Call this function to enable or disable the usage of <link> tags instead of <style> tags to achieve CSP compliance
24
- * Example: "setUseLinks(true)" will unconditionally use <link> tags for all browsers;
25
- * Example: "setUseLinks(!document.adoptedStyleSheets) will only enable the usage of <link> tags for browsers that do not support constructable stylesheets.
26
- *
27
- * @public
28
- * @param use whether links will be used
29
- */
30
- const setUseLinks = (use) => {
31
- useLinks = use;
32
- };
33
- /**
34
- * Call this function to enable or disable the preloading of <link> tags.
35
- * Note: only taken into account when <link> tags are being used.
36
- * Note: links are being preloaded by default, so call "setPreloadLinks(false)" to opt out of this.
37
- *
38
- * @public
39
- * @param preload
40
- */
41
- const setPreloadLinks = (preload) => {
42
- preloadLinks = preload;
43
- };
44
- const shouldUseLinks = () => {
45
- return useLinks;
46
- };
47
- const shouldPreloadLinks = () => {
48
- return preloadLinks;
49
- };
50
- export { setPackageCSSRoot, getUrl, setUseLinks, setPreloadLinks, shouldUseLinks, shouldPreloadLinks, };
51
- //# sourceMappingURL=CSP.js.map
package/dist/CSP.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"CSP.js","sourceRoot":"","sources":["../src/CSP.ts"],"names":[],"mappings":"AAAA,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;AACxC,IAAI,QAAQ,GAAG,KAAK,CAAC;AACrB,IAAI,YAAY,GAAG,IAAI,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG,CAAC,WAAmB,EAAE,IAAY,EAAE,EAAE;IAC/D,KAAK,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,WAAmB,EAAE,IAAY,EAAE,EAAE;IACpD,MAAM,cAAc,GAAG,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAE9C,IAAI,CAAC,cAAc,EAAE;QACpB,OAAO,CAAC,IAAI,CAAC,kCAAkC,WAAW,8DAA8D,CAAC,CAAC,CAAC,sBAAsB;QACjJ,OAAO,EAAE,CAAC;KACV;IAED,OAAO,GAAG,cAAc,GAAG,IAAI,EAAE,CAAC;AACnC,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,WAAW,GAAG,CAAC,GAAY,EAAE,EAAE;IACpC,QAAQ,GAAG,GAAG,CAAC;AAChB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,eAAe,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC5C,YAAY,GAAG,OAAO,CAAC;AACxB,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,GAAG,EAAE;IAC3B,OAAO,QAAQ,CAAC;AACjB,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,OAAO,YAAY,CAAC;AACrB,CAAC,CAAC;AAEF,OAAO,EACN,iBAAiB,EACjB,MAAM,EACN,WAAW,EACX,eAAe,EACf,cAAc,EACd,kBAAkB,GAClB,CAAC","sourcesContent":["const roots = new Map<string, string>();\nlet useLinks = false;\nlet preloadLinks = true;\n\n/**\n * Use this function to provide the path to the directory where the css resources for the given package will be served from.\n *\n * @public\n * @param packageName name of the package that is being configured\n * @param root path, accessible by the server that will serve the css resources\n */\nconst setPackageCSSRoot = (packageName: string, root: string) => {\n\troots.set(packageName, root);\n};\n\nconst getUrl = (packageName: string, path: string) => {\n\tconst packageCSSRoot = roots.get(packageName);\n\n\tif (!packageCSSRoot) {\n\t\tconsole.warn(`Root path to the CSS resources ${packageName} not provided - use \"setPackageCSSRoot\" to provide the root.`); // eslint-disable-line\n\t\treturn \"\";\n\t}\n\n\treturn `${packageCSSRoot}${path}`;\n};\n\n/**\n * Call this function to enable or disable the usage of <link> tags instead of <style> tags to achieve CSP compliance\n * Example: \"setUseLinks(true)\" will unconditionally use <link> tags for all browsers;\n * Example: \"setUseLinks(!document.adoptedStyleSheets) will only enable the usage of <link> tags for browsers that do not support constructable stylesheets.\n *\n * @public\n * @param use whether links will be used\n */\nconst setUseLinks = (use: boolean) => {\n\tuseLinks = use;\n};\n\n/**\n * Call this function to enable or disable the preloading of <link> tags.\n * Note: only taken into account when <link> tags are being used.\n * Note: links are being preloaded by default, so call \"setPreloadLinks(false)\" to opt out of this.\n *\n * @public\n * @param preload\n */\nconst setPreloadLinks = (preload: boolean) => {\n\tpreloadLinks = preload;\n};\n\nconst shouldUseLinks = () => {\n\treturn useLinks;\n};\n\nconst shouldPreloadLinks = () => {\n\treturn preloadLinks;\n};\n\nexport {\n\tsetPackageCSSRoot,\n\tgetUrl,\n\tsetUseLinks,\n\tsetPreloadLinks,\n\tshouldUseLinks,\n\tshouldPreloadLinks,\n};\n"]}
@@ -1,35 +0,0 @@
1
- import "./StaticArea.js";
2
- import type UI5Element from "./UI5Element.js";
3
- /**
4
- * @class
5
- * @private
6
- */
7
- declare class StaticAreaItem extends HTMLElement {
8
- _rendered: boolean;
9
- ownerElement?: UI5Element;
10
- constructor();
11
- /**
12
- * @param ownerElement the UI5Element instance that owns this static area item
13
- */
14
- setOwnerElement(ownerElement: UI5Element): void;
15
- /**
16
- * Updates the shadow root of the static area item with the latest state, if rendered
17
- */
18
- update(): void;
19
- updateAdditionalProperties(): void;
20
- /**
21
- * Sets the correct content density based on the owner element's state
22
- * @private
23
- */
24
- _updateContentDensity(): void;
25
- _updateDirection(): void;
26
- _updateAdditionalAttrs(): void;
27
- /**
28
- * Returns reference to the DOM element where the current fragment is added.
29
- * @protected
30
- */
31
- getDomRef(): Promise<ShadowRoot | null>;
32
- static getTag(): string;
33
- static createInstance(): StaticAreaItem;
34
- }
35
- export default StaticAreaItem;
@@ -1,100 +0,0 @@
1
- import "./StaticArea.js";
2
- import updateShadowRoot from "./updateShadowRoot.js";
3
- import { renderFinished } from "./Render.js";
4
- import getEffectiveContentDensity from "./util/getEffectiveContentDensity.js";
5
- import { getEffectiveScopingSuffixForTag } from "./CustomElementsScopeUtils.js";
6
- import getEffectiveDir from "./locale/getEffectiveDir.js";
7
- const pureTagName = "ui5-static-area-item";
8
- const popupIntegrationAttr = "data-sap-ui-integration-popup-content";
9
- /**
10
- * @class
11
- * @private
12
- */
13
- class StaticAreaItem extends HTMLElement {
14
- constructor() {
15
- super();
16
- this._rendered = false;
17
- this.attachShadow({ mode: "open" });
18
- }
19
- /**
20
- * @param ownerElement the UI5Element instance that owns this static area item
21
- */
22
- setOwnerElement(ownerElement) {
23
- this.ownerElement = ownerElement;
24
- this.classList.add(this.ownerElement._id); // used for getting the popover in the tests
25
- if (this.ownerElement.hasAttribute("data-ui5-static-stable")) {
26
- this.setAttribute("data-ui5-stable", this.ownerElement.getAttribute("data-ui5-static-stable")); // stable selector
27
- }
28
- }
29
- /**
30
- * Updates the shadow root of the static area item with the latest state, if rendered
31
- */
32
- update() {
33
- if (this._rendered) {
34
- this.updateAdditionalProperties();
35
- updateShadowRoot(this.ownerElement, true);
36
- }
37
- }
38
- updateAdditionalProperties() {
39
- this._updateAdditionalAttrs();
40
- this._updateContentDensity();
41
- this._updateDirection();
42
- }
43
- /**
44
- * Sets the correct content density based on the owner element's state
45
- * @private
46
- */
47
- _updateContentDensity() {
48
- if (getEffectiveContentDensity(this.ownerElement) === "compact") {
49
- this.classList.add("sapUiSizeCompact");
50
- this.classList.add("ui5-content-density-compact");
51
- }
52
- else {
53
- this.classList.remove("sapUiSizeCompact");
54
- this.classList.remove("ui5-content-density-compact");
55
- }
56
- }
57
- _updateDirection() {
58
- if (this.ownerElement) {
59
- const dir = getEffectiveDir(this.ownerElement);
60
- if (dir) {
61
- this.setAttribute("dir", dir);
62
- }
63
- else {
64
- this.removeAttribute("dir");
65
- }
66
- }
67
- }
68
- _updateAdditionalAttrs() {
69
- this.setAttribute(pureTagName, "");
70
- this.setAttribute(popupIntegrationAttr, "");
71
- }
72
- /**
73
- * Returns reference to the DOM element where the current fragment is added.
74
- * @protected
75
- */
76
- async getDomRef() {
77
- this.updateAdditionalProperties();
78
- if (!this._rendered) {
79
- this._rendered = true;
80
- updateShadowRoot(this.ownerElement, true);
81
- }
82
- await renderFinished(); // Wait for the content of the ui5-static-area-item to be rendered
83
- return this.shadowRoot;
84
- }
85
- static getTag() {
86
- const suffix = getEffectiveScopingSuffixForTag(pureTagName);
87
- if (!suffix) {
88
- return pureTagName;
89
- }
90
- return `${pureTagName}-${suffix}`;
91
- }
92
- static createInstance() {
93
- if (!customElements.get(StaticAreaItem.getTag())) {
94
- customElements.define(StaticAreaItem.getTag(), StaticAreaItem);
95
- }
96
- return document.createElement(this.getTag());
97
- }
98
- }
99
- export default StaticAreaItem;
100
- //# sourceMappingURL=StaticAreaItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StaticAreaItem.js","sourceRoot":"","sources":["../src/StaticAreaItem.ts"],"names":[],"mappings":"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","sourcesContent":["import \"./StaticArea.js\";\nimport updateShadowRoot from \"./updateShadowRoot.js\";\nimport { renderFinished } from \"./Render.js\";\nimport getEffectiveContentDensity from \"./util/getEffectiveContentDensity.js\";\nimport { getEffectiveScopingSuffixForTag } from \"./CustomElementsScopeUtils.js\";\nimport getEffectiveDir from \"./locale/getEffectiveDir.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\nconst pureTagName = \"ui5-static-area-item\";\nconst popupIntegrationAttr = \"data-sap-ui-integration-popup-content\";\n\n/**\n * @class\n * @private\n */\nclass StaticAreaItem extends HTMLElement {\n\t_rendered: boolean;\n\townerElement?: UI5Element;\n\n\tconstructor() {\n\t\tsuper();\n\t\tthis._rendered = false;\n\t\tthis.attachShadow({ mode: \"open\" });\n\t}\n\n\t/**\n\t * @param ownerElement the UI5Element instance that owns this static area item\n\t */\n\tsetOwnerElement(ownerElement: UI5Element) {\n\t\tthis.ownerElement = ownerElement;\n\t\tthis.classList.add(this.ownerElement._id); // used for getting the popover in the tests\n\t\tif (this.ownerElement.hasAttribute(\"data-ui5-static-stable\")) {\n\t\t\tthis.setAttribute(\"data-ui5-stable\", this.ownerElement.getAttribute(\"data-ui5-static-stable\")!); // stable selector\n\t\t}\n\t}\n\n\t/**\n\t * Updates the shadow root of the static area item with the latest state, if rendered\n\t */\n\tupdate() {\n\t\tif (this._rendered) {\n\t\t\tthis.updateAdditionalProperties();\n\t\t\tupdateShadowRoot(this.ownerElement!, true);\n\t\t}\n\t}\n\n\tupdateAdditionalProperties() {\n\t\tthis._updateAdditionalAttrs();\n\t\tthis._updateContentDensity();\n\t\tthis._updateDirection();\n\t}\n\n\t/**\n\t * Sets the correct content density based on the owner element's state\n\t * @private\n\t */\n\t_updateContentDensity() {\n\t\tif (getEffectiveContentDensity(this.ownerElement!) === \"compact\") {\n\t\t\tthis.classList.add(\"sapUiSizeCompact\");\n\t\t\tthis.classList.add(\"ui5-content-density-compact\");\n\t\t} else {\n\t\t\tthis.classList.remove(\"sapUiSizeCompact\");\n\t\t\tthis.classList.remove(\"ui5-content-density-compact\");\n\t\t}\n\t}\n\n\t_updateDirection() {\n\t\tif (this.ownerElement) {\n\t\t\tconst dir = getEffectiveDir(this.ownerElement);\n\t\t\tif (dir) {\n\t\t\t\tthis.setAttribute(\"dir\", dir);\n\t\t\t} else {\n\t\t\t\tthis.removeAttribute(\"dir\");\n\t\t\t}\n\t\t}\n\t}\n\n\t_updateAdditionalAttrs() {\n\t\tthis.setAttribute(pureTagName, \"\");\n\t\tthis.setAttribute(popupIntegrationAttr, \"\");\n\t}\n\n\t/**\n\t * Returns reference to the DOM element where the current fragment is added.\n\t * @protected\n\t */\n\tasync getDomRef() {\n\t\tthis.updateAdditionalProperties();\n\t\tif (!this._rendered) {\n\t\t\tthis._rendered = true;\n\t\t\tupdateShadowRoot(this.ownerElement!, true);\n\t\t}\n\t\tawait renderFinished(); // Wait for the content of the ui5-static-area-item to be rendered\n\t\treturn this.shadowRoot;\n\t}\n\n\tstatic getTag() {\n\t\tconst suffix = getEffectiveScopingSuffixForTag(pureTagName);\n\t\tif (!suffix) {\n\t\t\treturn pureTagName;\n\t\t}\n\n\t\treturn `${pureTagName}-${suffix}`;\n\t}\n\n\tstatic createInstance() {\n\t\tif (!customElements.get(StaticAreaItem.getTag())) {\n\t\t\tcustomElements.define(StaticAreaItem.getTag(), StaticAreaItem);\n\t\t}\n\n\t\treturn document.createElement(this.getTag()) as StaticAreaItem;\n\t}\n}\n\nexport default StaticAreaItem;\n"]}
@@ -1,7 +0,0 @@
1
- /**
2
- * Gets the effective RTL setting by first checking the configuration
3
- * and if not set using the currently set language or the navigator language if the language is not explicitly set.
4
- * @returns {boolean} whether RTL should be used
5
- */
6
- declare const getRTL: () => boolean;
7
- export { getRTL };
@@ -1,37 +0,0 @@
1
- import { getRTL as getConfiguredRTL } from "../InitialConfiguration.js";
2
- import { getLanguage } from "./Language.js";
3
- import getDesigntimePropertyAsArray from "../util/getDesigntimePropertyAsArray.js";
4
- import detectNavigatorLanguage from "../util/detectNavigatorLanguage.js";
5
- const M_ISO639_OLD_TO_NEW = {
6
- "iw": "he",
7
- "ji": "yi",
8
- "in": "id",
9
- "sh": "sr",
10
- };
11
- const A_RTL_LOCALES = getDesigntimePropertyAsArray("$cldr-rtl-locales:ar,fa,he$") || [];
12
- /**
13
- * Checks whether the language is using RTL
14
- * @param {string} language
15
- * @returns {boolean} whether the language is using RTL
16
- */
17
- const impliesRTL = (language) => {
18
- language = (language && M_ISO639_OLD_TO_NEW[language]) || language;
19
- return A_RTL_LOCALES.indexOf(language) >= 0;
20
- };
21
- /**
22
- * Gets the effective RTL setting by first checking the configuration
23
- * and if not set using the currently set language or the navigator language if the language is not explicitly set.
24
- * @returns {boolean} whether RTL should be used
25
- */
26
- const getRTL = () => {
27
- if (typeof document === "undefined") {
28
- return false;
29
- }
30
- const configurationRTL = getConfiguredRTL();
31
- if (configurationRTL !== undefined) {
32
- return !!configurationRTL;
33
- }
34
- return impliesRTL(getLanguage() || detectNavigatorLanguage());
35
- };
36
- export { getRTL }; // eslint-disable-line
37
- //# sourceMappingURL=RTL.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"RTL.js","sourceRoot":"","sources":["../../src/config/RTL.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,4BAA4B,MAAM,yCAAyC,CAAC;AACnF,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AAEzE,MAAM,mBAAmB,GAAG;IAC3B,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACV,CAAC;AAEF,MAAM,aAAa,GAAG,4BAA4B,CAAC,6BAA6B,CAAC,IAAI,EAAE,CAAC;AAExF;;;;GAIG;AACH,MAAM,UAAU,GAAG,CAAC,QAAgB,EAAE,EAAE;IACvC,QAAQ,GAAG,CAAC,QAAQ,IAAI,mBAAmB,CAAC,QAA4C,CAAC,CAAC,IAAI,QAAQ,CAAC;IAEvG,OAAO,aAAa,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,GAAG,GAAY,EAAE;IAC5B,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;QACpC,OAAO,KAAK,CAAC;KACb;IAED,MAAM,gBAAgB,GAAG,gBAAgB,EAAE,CAAC;IAE5C,IAAI,gBAAgB,KAAK,SAAS,EAAE;QACnC,OAAO,CAAC,CAAC,gBAAgB,CAAC;KAC1B;IAED,OAAO,UAAU,CAAC,WAAW,EAAE,IAAI,uBAAuB,EAAE,CAAC,CAAC;AAC/D,CAAC,CAAC;AAEF,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,sBAAsB","sourcesContent":["import { getRTL as getConfiguredRTL } from \"../InitialConfiguration.js\";\nimport { getLanguage } from \"./Language.js\";\nimport getDesigntimePropertyAsArray from \"../util/getDesigntimePropertyAsArray.js\";\nimport detectNavigatorLanguage from \"../util/detectNavigatorLanguage.js\";\n\nconst M_ISO639_OLD_TO_NEW = {\n\t\"iw\": \"he\",\n\t\"ji\": \"yi\",\n\t\"in\": \"id\",\n\t\"sh\": \"sr\",\n};\n\nconst A_RTL_LOCALES = getDesigntimePropertyAsArray(\"$cldr-rtl-locales:ar,fa,he$\") || [];\n\n/**\n * Checks whether the language is using RTL\n * @param {string} language\n * @returns {boolean} whether the language is using RTL\n */\nconst impliesRTL = (language: string) => {\n\tlanguage = (language && M_ISO639_OLD_TO_NEW[language as keyof typeof M_ISO639_OLD_TO_NEW]) || language;\n\n\treturn A_RTL_LOCALES.indexOf(language) >= 0;\n};\n\n/**\n * Gets the effective RTL setting by first checking the configuration\n * and if not set using the currently set language or the navigator language if the language is not explicitly set.\n * @returns {boolean} whether RTL should be used\n */\nconst getRTL = (): boolean => {\n\tif (typeof document === \"undefined\") {\n\t\treturn false;\n\t}\n\n\tconst configurationRTL = getConfiguredRTL();\n\n\tif (configurationRTL !== undefined) {\n\t\treturn !!configurationRTL;\n\t}\n\n\treturn impliesRTL(getLanguage() || detectNavigatorLanguage());\n};\n\nexport { getRTL }; // eslint-disable-line\n"]}
@@ -1,3 +0,0 @@
1
- import type UI5Element from "../UI5Element.js";
2
- declare const getEffectiveLinksHrefs: (ElementClass: typeof UI5Element, forStaticArea?: boolean) => string[] | undefined;
3
- export default getEffectiveLinksHrefs;
@@ -1,17 +0,0 @@
1
- import { getUrl } from "../CSP.js";
2
- import { getFeature } from "../FeaturesRegistry.js";
3
- const MAX_DEPTH_INHERITED_CLASSES = 10; // TypeScript complains about Infinity and big numbers
4
- const getEffectiveLinksHrefs = (ElementClass, forStaticArea = false) => {
5
- const stylesData = ElementClass[forStaticArea ? "staticAreaStyles" : "styles"];
6
- if (!stylesData) {
7
- return;
8
- }
9
- const stylesDataArray = Array.isArray(stylesData) ? stylesData : [stylesData];
10
- const openUI5Enablement = getFeature("OpenUI5Enablement");
11
- if (openUI5Enablement) {
12
- stylesDataArray.push(openUI5Enablement.getBusyIndicatorStyles());
13
- }
14
- return stylesDataArray.flat(MAX_DEPTH_INHERITED_CLASSES).filter(data => !!data).map(data => getUrl(data.packageName, data.fileName));
15
- };
16
- export default getEffectiveLinksHrefs;
17
- //# sourceMappingURL=getEffectiveLinksHrefs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getEffectiveLinksHrefs.js","sourceRoot":"","sources":["../../src/theming/getEffectiveLinksHrefs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAKpD,MAAM,2BAA2B,GAAG,EAAE,CAAC,CAAC,sDAAsD;AAE9F,MAAM,sBAAsB,GAAG,CAAC,YAA+B,EAAE,aAAa,GAAG,KAAK,EAAE,EAAE;IACzF,MAAM,UAAU,GAAwB,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC;IAEpG,IAAI,CAAC,UAAU,EAAE;QAChB,OAAO;KACP;IAED,MAAM,eAAe,GAAwB,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAEnG,MAAM,iBAAiB,GAAG,UAAU,CAA2B,mBAAmB,CAAC,CAAC;IACpF,IAAI,iBAAiB,EAAE;QACtB,eAAe,CAAC,IAAI,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,CAAC,CAAC;KACjE;IAED,OAAO,eAAe,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAE,IAAqB,CAAC,WAAW,EAAG,IAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC;AAC1K,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC","sourcesContent":["import { getUrl } from \"../CSP.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport type OpenUI5Enablement from \"../features/OpenUI5Enablement.js\";\nimport type { ComponentStylesData, StyleDataCSP } from \"../types.js\";\n\nconst MAX_DEPTH_INHERITED_CLASSES = 10; // TypeScript complains about Infinity and big numbers\n\nconst getEffectiveLinksHrefs = (ElementClass: typeof UI5Element, forStaticArea = false) => {\n\tconst stylesData: ComponentStylesData = ElementClass[forStaticArea ? \"staticAreaStyles\" : \"styles\"];\n\n\tif (!stylesData) {\n\t\treturn;\n\t}\n\n\tconst stylesDataArray: ComponentStylesData = Array.isArray(stylesData) ? stylesData : [stylesData];\n\n\tconst openUI5Enablement = getFeature<typeof OpenUI5Enablement>(\"OpenUI5Enablement\");\n\tif (openUI5Enablement) {\n\t\tstylesDataArray.push(openUI5Enablement.getBusyIndicatorStyles());\n\t}\n\n\treturn stylesDataArray.flat(MAX_DEPTH_INHERITED_CLASSES).filter(data => !!data).map(data => getUrl((data as StyleDataCSP).packageName, (data as StyleDataCSP).fileName));\n};\n\nexport default getEffectiveLinksHrefs;\n"]}
@@ -1,3 +0,0 @@
1
- import type UI5Element from "../UI5Element.js";
2
- declare const preloadLinks: (ElementClass: typeof UI5Element) => void;
3
- export default preloadLinks;
@@ -1,19 +0,0 @@
1
- import getEffectiveLinksHrefs from "./getEffectiveLinksHrefs.js";
2
- import createLinkInHead from "../util/createLinkInHead.js";
3
- import { shouldUseLinks, shouldPreloadLinks } from "../CSP.js";
4
- const preloaded = new Set();
5
- const preloadLinks = (ElementClass) => {
6
- if (!shouldUseLinks() || !shouldPreloadLinks()) {
7
- return;
8
- }
9
- const linksHrefs = getEffectiveLinksHrefs(ElementClass, false) || [];
10
- const staticAreaLinksHrefs = getEffectiveLinksHrefs(ElementClass, true) || [];
11
- [...linksHrefs, ...staticAreaLinksHrefs].forEach(href => {
12
- if (!preloaded.has(href)) {
13
- createLinkInHead(href, { rel: "preload", as: "style" });
14
- preloaded.add(href);
15
- }
16
- });
17
- };
18
- export default preloadLinks;
19
- //# sourceMappingURL=preloadLinks.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preloadLinks.js","sourceRoot":"","sources":["../../src/theming/preloadLinks.ts"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,MAAM,6BAA6B,CAAC;AACjE,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAG/D,MAAM,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;AAEpC,MAAM,YAAY,GAAG,CAAC,YAA+B,EAAE,EAAE;IACxD,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,kBAAkB,EAAE,EAAE;QAC/C,OAAO;KACP;IAED,MAAM,UAAU,GAAG,sBAAsB,CAAC,YAAY,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC;IACrE,MAAM,oBAAoB,GAAG,sBAAsB,CAAC,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,CAAC;IAE9E,CAAC,GAAG,UAAU,EAAE,GAAG,oBAAoB,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;QACvD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACzB,gBAAgB,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC;YACxD,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SACpB;IACF,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import getEffectiveLinksHrefs from \"./getEffectiveLinksHrefs.js\";\nimport createLinkInHead from \"../util/createLinkInHead.js\";\nimport { shouldUseLinks, shouldPreloadLinks } from \"../CSP.js\";\nimport type UI5Element from \"../UI5Element.js\";\n\nconst preloaded = new Set<string>();\n\nconst preloadLinks = (ElementClass: typeof UI5Element) => {\n\tif (!shouldUseLinks() || !shouldPreloadLinks()) {\n\t\treturn;\n\t}\n\n\tconst linksHrefs = getEffectiveLinksHrefs(ElementClass, false) || [];\n\tconst staticAreaLinksHrefs = getEffectiveLinksHrefs(ElementClass, true) || [];\n\n\t[...linksHrefs, ...staticAreaLinksHrefs].forEach(href => {\n\t\tif (!preloaded.has(href)) {\n\t\t\tcreateLinkInHead(href, { rel: \"preload\", as: \"style\" });\n\t\t\tpreloaded.add(href);\n\t\t}\n\t});\n};\n\nexport default preloadLinks;\n"]}
@@ -1,8 +0,0 @@
1
- /**
2
- * Creates a <style> tag in the <head> tag
3
- * @param cssText - the CSS
4
- * @param attributes - optional attributes to add to the tag
5
- * @returns {HTMLElement}
6
- */
7
- declare const createStyleInHead: (cssText: string, attributes?: Record<string, string>) => HTMLStyleElement;
8
- export default createStyleInHead;