@ui5/webcomponents-base 0.0.0-d9b978d1d → 0.0.0-da0d3eb88

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 (251) 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 +8 -6
  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 -12
  23. package/dist/MediaRange.js +21 -31
  24. package/dist/MediaRange.js.map +1 -1
  25. package/dist/UI5Element.d.ts +36 -54
  26. package/dist/UI5Element.js +152 -101
  27. package/dist/UI5Element.js.map +1 -1
  28. package/dist/UI5ElementMetadata.d.ts +12 -13
  29. package/dist/UI5ElementMetadata.js +24 -13
  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/AnimationMode.js +2 -1
  48. package/dist/config/AnimationMode.js.map +1 -1
  49. package/dist/config/Icons.d.ts +7 -7
  50. package/dist/config/Icons.js +7 -7
  51. package/dist/config/Icons.js.map +1 -1
  52. package/dist/config/Language.d.ts +1 -1
  53. package/dist/config/Language.js +6 -3
  54. package/dist/config/Language.js.map +1 -1
  55. package/dist/config/Theme.d.ts +4 -3
  56. package/dist/config/Theme.js +13 -6
  57. package/dist/config/Theme.js.map +1 -1
  58. package/dist/config/ThemeRoot.d.ts +2 -4
  59. package/dist/config/ThemeRoot.js +2 -4
  60. package/dist/config/ThemeRoot.js.map +1 -1
  61. package/dist/config/Timezone.d.ts +1 -1
  62. package/dist/config/Timezone.js +1 -1
  63. package/dist/config/Timezone.js.map +1 -1
  64. package/dist/css/SystemCSSVars.css +0 -8
  65. package/dist/decorators/customElement.d.ts +3 -3
  66. package/dist/decorators/customElement.js +11 -6
  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/delegate/ResizeHandler.d.ts +4 -6
  77. package/dist/delegate/ResizeHandler.js +4 -6
  78. package/dist/delegate/ResizeHandler.js.map +1 -1
  79. package/dist/features/InputElementsFormSupport.d.ts +18 -0
  80. package/dist/features/InputElementsFormSupport.js +40 -0
  81. package/dist/features/InputElementsFormSupport.js.map +1 -0
  82. package/dist/features/OpenUI5Support.d.ts +0 -2
  83. package/dist/features/OpenUI5Support.js +6 -21
  84. package/dist/features/OpenUI5Support.js.map +1 -1
  85. package/dist/features/patchPatcher.d.ts +11 -0
  86. package/dist/features/patchPatcher.js +11 -0
  87. package/dist/features/patchPatcher.js.map +1 -0
  88. package/dist/features/patchPopup.d.ts +14 -0
  89. package/dist/features/patchPopup.js +50 -0
  90. package/dist/features/patchPopup.js.map +1 -0
  91. package/dist/generated/AssetParameters.js +1 -1
  92. package/dist/generated/AssetParameters.js.map +1 -1
  93. package/dist/generated/VersionInfo.js +5 -5
  94. package/dist/generated/VersionInfo.js.map +1 -1
  95. package/dist/generated/css/SystemCSSVars.css.js +1 -1
  96. package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
  97. package/dist/i18nBundle.d.ts +1 -3
  98. package/dist/i18nBundle.js +1 -4
  99. package/dist/i18nBundle.js.map +1 -1
  100. package/dist/locale/applyDirection.d.ts +3 -2
  101. package/dist/locale/applyDirection.js +3 -2
  102. package/dist/locale/applyDirection.js.map +1 -1
  103. package/dist/locale/getEffectiveDir.d.ts +1 -1
  104. package/dist/locale/getEffectiveDir.js +3 -19
  105. package/dist/locale/getEffectiveDir.js.map +1 -1
  106. package/dist/renderer/LitRenderer.js +2 -8
  107. package/dist/renderer/LitRenderer.js.map +1 -1
  108. package/dist/renderer/directives/style-map.d.ts +13 -0
  109. package/dist/renderer/directives/style-map.js +59 -59
  110. package/dist/renderer/directives/style-map.js.map +1 -0
  111. package/dist/renderer/executeTemplate.d.ts +8 -0
  112. package/dist/renderer/executeTemplate.js +1 -0
  113. package/dist/renderer/executeTemplate.js.map +1 -1
  114. package/dist/sap/base/Log.js +698 -188
  115. package/dist/sap/base/assert.js +28 -1
  116. package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
  117. package/dist/sap/base/security/URLListValidator.js +253 -6
  118. package/dist/sap/base/security/encodeCSS.js +34 -8
  119. package/dist/sap/base/security/encodeXML.js +47 -17
  120. package/dist/sap/base/security/sanitizeHTML.js +35 -13
  121. package/dist/sap/base/strings/toHex.js +27 -2
  122. package/dist/sap/base/util/now.js +24 -3
  123. package/dist/sap/base/util/uid.js +27 -0
  124. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +1 -1
  125. package/dist/ssr-dom-shim.d.ts +1 -0
  126. package/dist/ssr-dom-shim.js +12 -0
  127. package/dist/ssr-dom-shim.js.map +1 -0
  128. package/dist/ssr-dom.d.ts +0 -0
  129. package/dist/ssr-dom.js +0 -0
  130. package/dist/theming/getConstructableStyle.d.ts +1 -1
  131. package/dist/theming/getConstructableStyle.js +3 -3
  132. package/dist/theming/getConstructableStyle.js.map +1 -1
  133. package/dist/theming/getEffectiveStyle.d.ts +1 -1
  134. package/dist/theming/getEffectiveStyle.js +5 -12
  135. package/dist/theming/getEffectiveStyle.js.map +1 -1
  136. package/dist/types/AnimationMode.d.ts +0 -8
  137. package/dist/types/AnimationMode.js +0 -8
  138. package/dist/types/AnimationMode.js.map +1 -1
  139. package/dist/types/AriaHasPopup.d.ts +32 -0
  140. package/dist/types/AriaHasPopup.js +34 -0
  141. package/dist/types/AriaHasPopup.js.map +1 -0
  142. package/dist/types/AriaLandmarkRole.d.ts +79 -0
  143. package/dist/types/AriaLandmarkRole.js +81 -0
  144. package/dist/types/AriaLandmarkRole.js.map +1 -0
  145. package/dist/types/AriaRole.d.ts +27 -0
  146. package/dist/types/AriaRole.js +29 -0
  147. package/dist/types/AriaRole.js.map +1 -0
  148. package/dist/types/CSSColor.d.ts +0 -4
  149. package/dist/types/CSSColor.js +0 -4
  150. package/dist/types/CSSColor.js.map +1 -1
  151. package/dist/types/CSSSize.d.ts +0 -4
  152. package/dist/types/CSSSize.js +0 -4
  153. package/dist/types/CSSSize.js.map +1 -1
  154. package/dist/types/CalendarType.d.ts +0 -9
  155. package/dist/types/CalendarType.js +0 -9
  156. package/dist/types/CalendarType.js.map +1 -1
  157. package/dist/types/DOMReference.d.ts +1 -5
  158. package/dist/types/DOMReference.js +1 -5
  159. package/dist/types/DOMReference.js.map +1 -1
  160. package/dist/types/DataType.d.ts +1 -6
  161. package/dist/types/DataType.js +1 -6
  162. package/dist/types/DataType.js.map +1 -1
  163. package/dist/types/Float.d.ts +0 -3
  164. package/dist/types/Float.js +0 -3
  165. package/dist/types/Float.js.map +1 -1
  166. package/dist/types/Integer.d.ts +0 -3
  167. package/dist/types/Integer.js +0 -3
  168. package/dist/types/Integer.js.map +1 -1
  169. package/dist/types/InvisibleMessageMode.d.ts +0 -6
  170. package/dist/types/InvisibleMessageMode.js +0 -6
  171. package/dist/types/InvisibleMessageMode.js.map +1 -1
  172. package/dist/types/ItemNavigationBehavior.d.ts +0 -6
  173. package/dist/types/ItemNavigationBehavior.js +0 -6
  174. package/dist/types/ItemNavigationBehavior.js.map +1 -1
  175. package/dist/types/MovePlacement.d.ts +20 -0
  176. package/dist/types/MovePlacement.js +22 -0
  177. package/dist/types/MovePlacement.js.map +1 -0
  178. package/dist/types/NavigationMode.d.ts +0 -8
  179. package/dist/types/NavigationMode.js +0 -8
  180. package/dist/types/NavigationMode.js.map +1 -1
  181. package/dist/types/Orientation.d.ts +16 -0
  182. package/dist/types/Orientation.js +18 -0
  183. package/dist/types/Orientation.js.map +1 -0
  184. package/dist/types/ValueState.d.ts +3 -17
  185. package/dist/types/ValueState.js +3 -17
  186. package/dist/types/ValueState.js.map +1 -1
  187. package/dist/types.d.ts +24 -1
  188. package/dist/types.js.map +1 -1
  189. package/dist/updateShadowRoot.d.ts +1 -2
  190. package/dist/updateShadowRoot.js +5 -29
  191. package/dist/updateShadowRoot.js.map +1 -1
  192. package/dist/util/InvisibleMessage.js +2 -2
  193. package/dist/util/InvisibleMessage.js.map +1 -1
  194. package/dist/util/PopupUtils.d.ts +1 -3
  195. package/dist/util/PopupUtils.js +1 -15
  196. package/dist/util/PopupUtils.js.map +1 -1
  197. package/dist/util/clamp.js +2 -1
  198. package/dist/util/clamp.js.map +1 -1
  199. package/dist/util/createLinkInHead.d.ts +1 -1
  200. package/dist/util/createLinkInHead.js +1 -1
  201. package/dist/util/createLinkInHead.js.map +1 -1
  202. package/dist/util/detectNavigatorLanguage.d.ts +2 -2
  203. package/dist/util/detectNavigatorLanguage.js +6 -1
  204. package/dist/util/detectNavigatorLanguage.js.map +1 -1
  205. package/dist/util/dragAndDrop/DragRegistry.d.ts +12 -0
  206. package/dist/util/dragAndDrop/DragRegistry.js +68 -0
  207. package/dist/util/dragAndDrop/DragRegistry.js.map +1 -0
  208. package/dist/util/dragAndDrop/findClosestPosition.d.ts +7 -0
  209. package/dist/util/dragAndDrop/findClosestPosition.js +59 -0
  210. package/dist/util/dragAndDrop/findClosestPosition.js.map +1 -0
  211. package/dist/util/dragAndDrop/longDragOverHandler.d.ts +2 -0
  212. package/dist/util/dragAndDrop/longDragOverHandler.js +25 -0
  213. package/dist/util/dragAndDrop/longDragOverHandler.js.map +1 -0
  214. package/dist/util/getClassCopy.d.ts +17 -12
  215. package/dist/util/getDesigntimePropertyAsArray.d.ts +2 -2
  216. package/dist/util/getDesigntimePropertyAsArray.js +2 -1
  217. package/dist/util/getDesigntimePropertyAsArray.js.map +1 -1
  218. package/index.js +1 -17
  219. package/package-scripts.cjs +18 -14
  220. package/package.json +20 -8
  221. package/src/css/SystemCSSVars.css +0 -8
  222. package/tsconfig.json +3 -0
  223. package/.eslintignore +0 -16
  224. package/.eslintrc.cjs +0 -3
  225. package/bundle.esm.js +0 -67
  226. package/dist/CSP.d.ts +0 -30
  227. package/dist/CSP.js +0 -51
  228. package/dist/CSP.js.map +0 -1
  229. package/dist/StaticArea.js +0 -7
  230. package/dist/StaticArea.js.map +0 -1
  231. package/dist/StaticAreaItem.d.ts +0 -37
  232. package/dist/StaticAreaItem.js +0 -102
  233. package/dist/StaticAreaItem.js.map +0 -1
  234. package/dist/api.json +0 -1
  235. package/dist/config/RTL.d.ts +0 -7
  236. package/dist/config/RTL.js +0 -37
  237. package/dist/config/RTL.js.map +0 -1
  238. package/dist/theming/getEffectiveLinksHrefs.d.ts +0 -3
  239. package/dist/theming/getEffectiveLinksHrefs.js +0 -17
  240. package/dist/theming/getEffectiveLinksHrefs.js.map +0 -1
  241. package/dist/theming/preloadLinks.d.ts +0 -3
  242. package/dist/theming/preloadLinks.js +0 -19
  243. package/dist/theming/preloadLinks.js.map +0 -1
  244. package/dist/util/createStyleInHead.d.ts +0 -8
  245. package/dist/util/createStyleInHead.js +0 -18
  246. package/dist/util/createStyleInHead.js.map +0 -1
  247. package/lib/generate-asset-parameters/index.js +0 -27
  248. package/lib/generate-styles/index.js +0 -31
  249. package/lib/generate-version-info/index.js +0 -32
  250. package/src/renderer/directives/style-map.js +0 -72
  251. package/used-modules.txt +0 -10
@@ -5,25 +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");
9
- const preprocessJSDocScript = resolve.sync("@ui5/webcomponents-tools/lib/jsdoc/preprocess.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");
10
10
 
11
11
  const LIB = path.join(__dirname, `../tools/lib/`);
12
12
 
13
13
  const viteConfig = `-c "${require.resolve("@ui5/webcomponents-tools/components-package/vite.config.js")}"`;
14
14
 
15
15
  const scripts = {
16
- clean: "rimraf jsdoc-dist && rimraf src/generated && rimraf dist && rimraf .port",
16
+ clean: "rimraf src/generated && rimraf dist && rimraf .port",
17
17
  lint: `eslint .`,
18
- generate: "cross-env UI5_TS=true nps clean integrate copy generateAssetParameters generateVersionInfo generateStyles generateTemplates",
19
- 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",
20
20
  typescript: "tsc -b",
21
21
  integrate: {
22
- 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",
23
23
  "copy-used-modules": `node "${copyUsedModules}" ./used-modules.txt dist/`,
24
- "replace-amd": "replace-in-file sap.ui.define define dist/**/*.js",
25
- "amd-to-es6": "amdtoes6 --src=dist/ --replace --glob=**/*.js",
26
- "esm-abs-to-rel": `node "${esmAbsToRel}" dist/ dist/`,
24
+ "amd-to-es6": `node "${amdToES6}" dist/`,
25
+ "no-remaining-require": `node "${noRequire}" dist/`,
27
26
  "third-party": {
28
27
  default: "nps integrate.third-party.copy integrate.third-party.fix",
29
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/",
@@ -41,13 +40,18 @@ const scripts = {
41
40
  generateAssetParameters: `node "${assetParametersScript}"`,
42
41
  generateVersionInfo: `node "${versionScript}"`,
43
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`,
44
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`,
46
+ generateProd: {
47
+ "default": "nps generateProd.remove-dev-mode generateProd.copy-prod",
48
+ "remove-dev-mode": `node "${LIB}/remove-dev-mode/remove-dev-mode.mjs"`,
49
+ "copy-prod": `copy-and-watch "dist/sap/**/*" dist/prod/sap/`,
50
+ },
45
51
  generateAPI: {
46
- default: "nps generateAPI.prepare generateAPI.preprocess generateAPI.jsdoc generateAPI.cleanup",
47
- prepare: `copy-and-watch "dist/**/*.js" jsdoc-dist/`,
48
- preprocess: `node "${preprocessJSDocScript}" jsdoc-dist/`,
49
- jsdoc: `jsdoc -c "${LIB}/jsdoc/configTypescript.json"`,
50
- cleanup: "rimraf jsdoc-dist/"
52
+ default: "nps generateAPI.generateCEM generateAPI.validateCEM",
53
+ generateCEM: `cem analyze --config "${LIB}/cem/custom-elements-manifest.config.mjs" --dev`,
54
+ validateCEM: `node "${LIB}/cem/validate.js" --dev`,
51
55
  },
52
56
  watch: {
53
57
  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-d9b978d1d",
3
+ "version": "0.0.0-da0d3eb88",
4
4
  "description": "UI5 Web Components: webcomponents.base",
5
5
  "author": "SAP SE (https://www.sap.com)",
6
6
  "license": "Apache-2.0",
@@ -16,9 +16,19 @@
16
16
  "url": "https://github.com/SAP/ui5-webcomponents.git",
17
17
  "directory": "packages/base"
18
18
  },
19
+ "types": "./dist",
19
20
  "exports": {
21
+ "./dist/ssr-dom.js": {
22
+ "browser": "./dist/ssr-dom.js",
23
+ "node": "./dist/ssr-dom-shim.js",
24
+ "default": "./dist/ssr-dom.js"
25
+ },
20
26
  ".": "./index.js",
21
- "./dist/*": "./dist/*",
27
+ "./dist/*": {
28
+ "production": "./dist/prod/*",
29
+ "development": "./dist/*",
30
+ "default": "./dist/*"
31
+ },
22
32
  "./package.json": "./package.json",
23
33
  "./bundle.esm.js": "./bundle.esm.js",
24
34
  "./*": "./dist/*"
@@ -30,24 +40,26 @@
30
40
  "build": "nps build",
31
41
  "generate": "nps generate",
32
42
  "generateAPI": "nps generateAPI",
43
+ "generateProd": "nps generateProd",
33
44
  "bundle": "nps build.bundle",
34
45
  "test": "nps test",
35
- "prepublishOnly": "tsc"
46
+ "prepublishOnly": "tsc -b"
36
47
  },
37
48
  "dependencies": {
49
+ "@lit-labs/ssr-dom-shim": "^1.1.2",
38
50
  "lit-html": "^2.0.1"
39
51
  },
40
52
  "devDependencies": {
41
- "@buxlabs/amd-to-es6": "0.16.1",
42
- "@openui5/sap.ui.core": "1.116.0",
43
- "@ui5/webcomponents-tools": "0.0.0-d9b978d1d",
44
- "chromedriver": "119.0.1",
53
+ "@openui5/sap.ui.core": "1.120.5",
54
+ "@ui5/webcomponents-tools": "0.0.0-da0d3eb88",
55
+ "chromedriver": "^125.0.0",
45
56
  "clean-css": "^5.2.2",
46
57
  "copy-and-watch": "^0.1.5",
47
58
  "cross-env": "^7.0.3",
48
59
  "eslint": "^7.22.0",
49
60
  "mkdirp": "^1.0.4",
50
61
  "replace-in-file": "^6.3.5",
51
- "resolve": "^1.20.0"
62
+ "resolve": "^1.20.0",
63
+ "touch": "^3.1.0"
52
64
  }
53
65
  }
@@ -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,7 +0,0 @@
1
- class StaticArea extends HTMLElement {
2
- }
3
- if (!customElements.get("ui5-static-area")) {
4
- customElements.define("ui5-static-area", StaticArea);
5
- }
6
- export default StaticArea;
7
- //# sourceMappingURL=StaticArea.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StaticArea.js","sourceRoot":"","sources":["../src/StaticArea.ts"],"names":[],"mappings":"AAAA,MAAM,UAAW,SAAQ,WAAW;CAAG;AAEvC,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,EAAE;IAC3C,cAAc,CAAC,MAAM,CAAC,iBAAiB,EAAE,UAAU,CAAC,CAAC;CACrD;AAED,eAAe,UAAU,CAAC","sourcesContent":["class StaticArea extends HTMLElement {}\n\nif (!customElements.get(\"ui5-static-area\")) {\n\tcustomElements.define(\"ui5-static-area\", StaticArea);\n}\n\nexport default StaticArea;\n"]}
@@ -1,37 +0,0 @@
1
- import "./StaticArea.js";
2
- import type UI5Element from "./UI5Element.js";
3
- /**
4
- *
5
- * @class
6
- * @author SAP SE
7
- * @private
8
- */
9
- declare class StaticAreaItem extends HTMLElement {
10
- _rendered: boolean;
11
- ownerElement?: UI5Element;
12
- constructor();
13
- /**
14
- * @param {UI5Element} ownerElement the UI5Element instance that owns this static area item
15
- */
16
- setOwnerElement(ownerElement: UI5Element): void;
17
- /**
18
- * Updates the shadow root of the static area item with the latest state, if rendered
19
- */
20
- update(): void;
21
- updateAdditionalProperties(): void;
22
- /**
23
- * Sets the correct content density based on the owner element's state
24
- * @private
25
- */
26
- _updateContentDensity(): void;
27
- _updateDirection(): void;
28
- _updateAdditionalAttrs(): void;
29
- /**
30
- * @protected
31
- * Returns reference to the DOM element where the current fragment is added.
32
- */
33
- getDomRef(): Promise<ShadowRoot | null>;
34
- static getTag(): string;
35
- static createInstance(): StaticAreaItem;
36
- }
37
- export default StaticAreaItem;
@@ -1,102 +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
- *
11
- * @class
12
- * @author SAP SE
13
- * @private
14
- */
15
- class StaticAreaItem extends HTMLElement {
16
- constructor() {
17
- super();
18
- this._rendered = false;
19
- this.attachShadow({ mode: "open" });
20
- }
21
- /**
22
- * @param {UI5Element} ownerElement the UI5Element instance that owns this static area item
23
- */
24
- setOwnerElement(ownerElement) {
25
- this.ownerElement = ownerElement;
26
- this.classList.add(this.ownerElement._id); // used for getting the popover in the tests
27
- if (this.ownerElement.hasAttribute("data-ui5-static-stable")) {
28
- this.setAttribute("data-ui5-stable", this.ownerElement.getAttribute("data-ui5-static-stable")); // stable selector
29
- }
30
- }
31
- /**
32
- * Updates the shadow root of the static area item with the latest state, if rendered
33
- */
34
- update() {
35
- if (this._rendered) {
36
- this.updateAdditionalProperties();
37
- updateShadowRoot(this.ownerElement, true);
38
- }
39
- }
40
- updateAdditionalProperties() {
41
- this._updateAdditionalAttrs();
42
- this._updateContentDensity();
43
- this._updateDirection();
44
- }
45
- /**
46
- * Sets the correct content density based on the owner element's state
47
- * @private
48
- */
49
- _updateContentDensity() {
50
- if (getEffectiveContentDensity(this.ownerElement) === "compact") {
51
- this.classList.add("sapUiSizeCompact");
52
- this.classList.add("ui5-content-density-compact");
53
- }
54
- else {
55
- this.classList.remove("sapUiSizeCompact");
56
- this.classList.remove("ui5-content-density-compact");
57
- }
58
- }
59
- _updateDirection() {
60
- if (this.ownerElement) {
61
- const dir = getEffectiveDir(this.ownerElement);
62
- if (dir) {
63
- this.setAttribute("dir", dir);
64
- }
65
- else {
66
- this.removeAttribute("dir");
67
- }
68
- }
69
- }
70
- _updateAdditionalAttrs() {
71
- this.setAttribute(pureTagName, "");
72
- this.setAttribute(popupIntegrationAttr, "");
73
- }
74
- /**
75
- * @protected
76
- * Returns reference to the DOM element where the current fragment is added.
77
- */
78
- async getDomRef() {
79
- this.updateAdditionalProperties();
80
- if (!this._rendered) {
81
- this._rendered = true;
82
- updateShadowRoot(this.ownerElement, true);
83
- }
84
- await renderFinished(); // Wait for the content of the ui5-static-area-item to be rendered
85
- return this.shadowRoot;
86
- }
87
- static getTag() {
88
- const suffix = getEffectiveScopingSuffixForTag(pureTagName);
89
- if (!suffix) {
90
- return pureTagName;
91
- }
92
- return `${pureTagName}-${suffix}`;
93
- }
94
- static createInstance() {
95
- if (!customElements.get(StaticAreaItem.getTag())) {
96
- customElements.define(StaticAreaItem.getTag(), StaticAreaItem);
97
- }
98
- return document.createElement(this.getTag());
99
- }
100
- }
101
- export default StaticAreaItem;
102
- //# sourceMappingURL=StaticAreaItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"StaticAreaItem.js","sourceRoot":"","sources":["../src/StaticAreaItem.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,gBAAgB,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,0BAA0B,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAG1D,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAC3C,MAAM,oBAAoB,GAAG,uCAAuC,CAAC;AAErE;;;;;GAKG;AACH,MAAM,cAAe,SAAQ,WAAW;IAIvC;QACC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;QACvB,IAAI,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;IACrC,CAAC;IAED;;OAEG;IACH,eAAe,CAAC,YAAwB;QACvC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;QACjC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,4CAA4C;QACvF,IAAI,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,wBAAwB,CAAC,EAAE;YAC7D,IAAI,CAAC,YAAY,CAAC,iBAAiB,EAAE,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,wBAAwB,CAAE,CAAC,CAAC,CAAC,kBAAkB;SACnH;IACF,CAAC;IAED;;OAEG;IACH,MAAM;QACL,IAAI,IAAI,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,0BAA0B,EAAE,CAAC;YAClC,gBAAgB,CAAC,IAAI,CAAC,YAAa,EAAE,IAAI,CAAC,CAAC;SAC3C;IACF,CAAC;IAED,0BAA0B;QACzB,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC9B,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC7B,IAAI,CAAC,gBAAgB,EAAE,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,qBAAqB;QACpB,IAAI,0BAA0B,CAAC,IAAI,CAAC,YAAa,CAAC,KAAK,SAAS,EAAE;YACjE,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;YACvC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;SAClD;aAAM;YACN,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC;YAC1C,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,6BAA6B,CAAC,CAAC;SACrD;IACF,CAAC;IAED,gBAAgB;QACf,IAAI,IAAI,CAAC,YAAY,EAAE;YACtB,MAAM,GAAG,GAAG,eAAe,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YAC/C,IAAI,GAAG,EAAE;gBACR,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;aAC9B;iBAAM;gBACN,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;aAC5B;SACD;IACF,CAAC;IAED,sBAAsB;QACrB,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC;QACnC,IAAI,CAAC,YAAY,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;IAC7C,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,SAAS;QACd,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YACpB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;YACtB,gBAAgB,CAAC,IAAI,CAAC,YAAa,EAAE,IAAI,CAAC,CAAC;SAC3C;QACD,MAAM,cAAc,EAAE,CAAC,CAAC,kEAAkE;QAC1F,OAAO,IAAI,CAAC,UAAU,CAAC;IACxB,CAAC;IAED,MAAM,CAAC,MAAM;QACZ,MAAM,MAAM,GAAG,+BAA+B,CAAC,WAAW,CAAC,CAAC;QAC5D,IAAI,CAAC,MAAM,EAAE;YACZ,OAAO,WAAW,CAAC;SACnB;QAED,OAAO,GAAG,WAAW,IAAI,MAAM,EAAE,CAAC;IACnC,CAAC;IAED,MAAM,CAAC,cAAc;QACpB,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,EAAE;YACjD,cAAc,CAAC,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,EAAE,cAAc,CAAC,CAAC;SAC/D;QAED,OAAO,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,CAAmB,CAAC;IAChE,CAAC;CACD;AAED,eAAe,cAAc,CAAC","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 *\n * @class\n * @author SAP SE\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 {UI5Element} 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 * @protected\n\t * Returns reference to the DOM element where the current fragment is added.\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"]}
package/dist/api.json DELETED
@@ -1 +0,0 @@
1
- {"$schema-ref":"http://schemas.sap.com/sapui5/designtime/api.json/1.0","version":"1.62","symbols":[{"kind":"class","name":"I18nBundle","basename":"I18nBundle","resource":"i18nBundle.js","module":"i18nBundle","visibility":"public","constructor":{"visibility":"public"},"methods":[{"name":"getText","visibility":"public","returnValue":{"type":"string"},"parameters":[{"name":"textObj","type":"Object|String","optional":false,"description":"key/defaultText pair or just the key"},{"name":"params","type":"undefined","optional":false,"description":"Values for the placeholders"}],"description":"Returns a text in the currently loaded language"}]},{"kind":"class","name":"ItemNavigation","basename":"ItemNavigation","resource":"delegate/ItemNavigation.js","module":"delegate/ItemNavigation","visibility":"public","description":"The ItemNavigation class manages the calculations to determine the correct \"tabindex\" for a group of related items inside a root component. Important: ItemNavigation only does the calculations and does not change \"tabindex\" directly, this is a responsibility of the developer.\n\nThe keys that trigger ItemNavigation are: - Up/down - Left/right - Home/End\n\nUsage: 1) Use the \"getItemsCallback\" constructor property to pass a callback to ItemNavigation, which, whenever called, will return the list of items to navigate among.\n\nEach item passed to ItemNavigation via \"getItemsCallback\" must be: - A) either a UI5Element with a \"_tabIndex\" property - B) or an Object with \"id\" and \"_tabIndex\" properties which represents a part of the root component's shadow DOM. The \"id\" must be a valid ID within the shadow root of the component ItemNavigation operates on. This object must not be a DOM object because, as said, ItemNavigation will not set \"tabindex\" on it. It must be a representation of a DOM object only and the developer has the responsibility to update the \"tabindex\" in the component's DOM. - C) a combination of the above\n\nWhenever the user navigates with the keyboard, ItemNavigation will modify the \"_tabIndex\" properties of the items. It is the items' responsibilities to re-render themselves and apply the correct value of \"tabindex\" (i.e. to map the \"_tabIndex\" ItemNavigation set to them to the \"tabindex\" property). If the items of the ItemNavigation are UI5Elements themselves, this can happen naturally since they will be invalidated by their \"_tabIndex\" property. If the items are Objects with \"id\" and \"_tabIndex\" however, it is the developer's responsibility to apply these and the easiest way is to have the root component invalidated by ItemNavigation. To do so, set the \"affectedPropertiesNames\" constructor property to point to one or more of the root component's properties that need refreshing when \"_tabIndex\" is changed deeply.\n\n2) Call the \"setCurrentItem\" method of ItemNavigation whenever you want to change the current item. This is most commonly required if the user for example clicks on an item and thus selects it directly. Pass as the only argument to \"setCurrentItem\" the item that becomes current (must be one of the items, returned by \"getItemsCallback\").","constructor":{"visibility":"public","parameters":[{"name":"rootWebComponent","type":"undefined","optional":false,"description":"the component to operate on (component that slots or contains within its shadow root the items the user navigates among)"},{"name":"options","type":"ItemNavigationOptions","optional":false,"description":"Object with configuration options: - currentIndex: the index of the item that will be initially selected (from which navigation will begin) - navigationMode (Auto|Horizontal|Vertical): whether the items are displayed horizontally (Horizontal), vertically (Vertical) or as a matrix (Auto) meaning the user can navigate in both directions (up/down and left/right) - rowSize: tells how many items per row there are when the items are not rendered as a flat list but rather as a matrix. Relevant for navigationMode=Auto - skipItemsSize: tells how many items upon PAGE_UP and PAGE_DOWN should be skipped to applying the focus on the next item - behavior (Static|Cycling): tells what to do when trying to navigate beyond the first and last items Static means that nothing happens if the user tries to navigate beyond the first/last item. Cycling means that when the user navigates beyond the last item they go to the first and vice versa. - getItemsCallback: function that, when called, returns an array with all items the user can navigate among - affectedPropertiesNames: a list of metadata properties on the root component which, upon user navigation, will be reassigned by address thus causing the root component to invalidate"}]},"methods":[{"name":"setCurrentItem","visibility":"public","parameters":[{"name":"current","type":"undefined","optional":false,"description":"the new selected item"}],"description":"Call this method to set a new \"current\" (selected) item in the item navigation Note: the item passed to this function must be one of the items, returned by the getItemsCallback function"},{"name":"setRowSize","visibility":"public","parameters":[{"name":"newRowSize","type":"undefined","optional":false}],"description":"Call this method to dynamically change the row size"}]},{"kind":"namespace","name":"MediaRange.RANGESETS","basename":"RANGESETS","resource":"MediaRange.js","module":"MediaRange","export":"RANGESETS","static":true,"visibility":"public","description":"Enumeration containing the names and settings of predefined screen width media query range sets.","properties":[{"name":"RANGE_4STEPS","visibility":"public","static":true,"type":"undefined","description":"A 4-step range set (S-M-L-XL).\n\nThe ranges of this set are: <ul> <li><code>\"S\"</code>: For screens smaller than 600 pixels.</li> <li><code>\"M\"</code>: For screens greater than or equal to 600 pixels and smaller than 1024 pixels.</li> <li><code>\"L\"</code>: For screens greater than or equal to 1024 pixels and smaller than 1440 pixels.</li> <li><code>\"XL\"</code>: For screens greater than or equal to 1440 pixels.</li> </ul>"}],"slots":[]},{"kind":"class","name":"ResizeHandler","basename":"ResizeHandler","resource":"delegate/ResizeHandler.js","module":"delegate/ResizeHandler","visibility":"public","description":"Allows to register/deregister resize observers for a DOM element","constructor":{"visibility":"public"},"methods":[{"name":"deregister","visibility":"public","static":true,"parameters":[{"name":"element","type":"*","optional":false,"description":"UI5 Web Component or DOM Element to be unobserved"},{"name":"callback","type":"*","optional":false,"description":"Callback to be removed"}]},{"name":"register","visibility":"public","static":true,"parameters":[{"name":"element","type":"*","optional":false,"description":"UI5 Web Component or DOM Element to be observed"},{"name":"callback","type":"*","optional":false,"description":"Callback to be executed"}]}]},{"kind":"enum","name":"sap.ui.webc.base.types.AnimationMode","basename":"AnimationMode","resource":"types/AnimationMode.js","module":"types/AnimationMode","static":true,"visibility":"public","description":"Different types of AnimationMode.","properties":[{"name":"Basic","visibility":"public","type":"Basic"},{"name":"Full","visibility":"public","type":"Full"},{"name":"Minimal","visibility":"public","type":"Minimal"},{"name":"None","visibility":"public","type":"None"}],"slots":[]},{"kind":"enum","name":"sap.ui.webc.base.types.CalendarType","basename":"CalendarType","resource":"types/CalendarType.js","module":"types/CalendarType","static":true,"visibility":"public","description":"Different calendar types.","properties":[{"name":"Buddhist","visibility":"public","type":"Buddhist"},{"name":"Gregorian","visibility":"public","type":"Gregorian"},{"name":"Islamic","visibility":"public","type":"Islamic"},{"name":"Japanese","visibility":"public","type":"Japanese"},{"name":"Persian","visibility":"public","type":"Persian"}],"slots":[]},{"kind":"class","name":"sap.ui.webc.base.types.CSSColor","basename":"CSSColor","resource":"types/CSSColor.js","module":"types/CSSColor","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"CSSColor data type.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.CSSSize","basename":"CSSSize","resource":"types/CSSSize.js","module":"types/CSSSize","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"CSSSize data type.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.DataType","basename":"DataType","resource":"types/DataType.js","module":"types/DataType","static":true,"visibility":"public","constructor":{"visibility":"public"},"methods":[{"name":"isValid","visibility":"public","static":true,"returnValue":{"type":"Boolean"},"description":"Checks if the value is valid for its data type."}]},{"kind":"class","name":"sap.ui.webc.base.types.DOMReference","basename":"DOMReference","resource":"types/DOMReference.js","module":"types/DOMReference","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"DOM Element reference or ID. <b>Note:</b> If an ID is passed, it is expected to be part of the same <code>document</code> element as the consuming component.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.Float","basename":"Float","resource":"types/Float.js","module":"types/Float","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"Float data type.","constructor":{"visibility":"public"}},{"kind":"class","name":"sap.ui.webc.base.types.Integer","basename":"Integer","resource":"types/Integer.js","module":"types/Integer","static":true,"visibility":"public","extends":"sap.ui.webc.base.types.DataType","description":"Integer data type.","constructor":{"visibility":"public"}},{"kind":"enum","name":"sap.ui.webc.base.types.ItemNavigationBehavior","basename":"ItemNavigationBehavior","resource":"types/ItemNavigationBehavior.js","module":"types/ItemNavigationBehavior","static":true,"visibility":"public","description":"Different behavior for ItemNavigation.","properties":[{"name":"Cyclic","visibility":"public","type":"Cyclic","description":"Cycling behavior: navigating past the last item continues with the first and vice versa."},{"name":"Static","visibility":"public","type":"Static","description":"Static behavior: navigations stops at the first or last item."}],"slots":[]},{"kind":"enum","name":"sap.ui.webc.base.types.NavigationMode","basename":"NavigationMode","resource":"types/NavigationMode.js","module":"types/NavigationMode","static":true,"visibility":"public","description":"Different navigation modes for ItemNavigation.","properties":[{"name":"Auto","visibility":"public","type":"Auto"},{"name":"Horizontal","visibility":"public","type":"Horizontal"},{"name":"Paging","visibility":"public","type":"Paging"},{"name":"Vertical","visibility":"public","type":"Vertical"}],"slots":[]},{"kind":"enum","name":"sap.ui.webc.base.types.ValueState","basename":"ValueState","resource":"types/ValueState.js","module":"types/ValueState","static":true,"visibility":"public","description":"Different types of ValueStates.","properties":[{"name":"Error","visibility":"public","type":"Error"},{"name":"Information","visibility":"public","type":"Information"},{"name":"None","visibility":"public","type":"None"},{"name":"Success","visibility":"public","type":"Success"},{"name":"Warning","visibility":"public","type":"Warning"}],"slots":[]},{"kind":"class","name":"sap.ui.webc.base.UI5Element","basename":"UI5Element","resource":"UI5Element.js","module":"UI5Element","static":true,"visibility":"public","extends":"HTMLElement","constructor":{"visibility":"public"},"properties":[{"name":"_id","visibility":"protected","type":"undefined","description":"Returns a unique ID for this UI5 Element","deprecated":{"text":"- This property is not guaranteed in future releases"}},{"name":"dependencies","visibility":"protected","static":true,"type":"undefined","description":"Returns an array with the dependencies for this UI5 Web Component, which could be: - composed components (used in its shadow root or static area item) - slotted components that the component may need to communicate with"},{"name":"effectiveDir","visibility":"public","type":"undefined","description":"Determines whether the component should be rendered in RTL mode or not. Returns: \"rtl\", \"ltr\" or undefined"},{"name":"isUI5Element","visibility":"public","type":"undefined","description":"Used to duck-type UI5 elements without using instanceof"},{"name":"metadata","visibility":"protected","static":true,"type":"undefined","description":"Returns the metadata object for this UI5 Web Component Class"},{"name":"staticAreaStyles","visibility":"protected","static":true,"type":"undefined","description":"Returns the Static Area CSS for this UI5 Web Component Class"},{"name":"styles","visibility":"protected","static":true,"type":"undefined","description":"Returns the CSS for this UI5 Web Component Class"}],"slots":[],"methods":[{"name":"_render","visibility":"protected","description":"Do not call this method directly, only intended to be called by js"},{"name":"attachComponentStateFinalized","visibility":"public","parameters":[{"name":"callback","type":"undefined","optional":false}],"description":"Attach a callback that will be executed whenever the component's state is finalized"},{"name":"attachInvalidate","visibility":"public","parameters":[{"name":"callback","type":"InvalidationInfo","optional":false}],"description":"Attach a callback that will be executed whenever the component is invalidated"},{"name":"define","visibility":"public","static":true,"returnValue":{"type":"Promise.<UI5Element>"},"description":"Registers a UI5 Web Component in the browser window object"},{"name":"detachComponentStateFinalized","visibility":"public","parameters":[{"name":"callback","type":"undefined","optional":false}],"description":"Detach the callback that is executed whenever the component's state is finalized"},{"name":"detachInvalidate","visibility":"public","parameters":[{"name":"callback","type":"InvalidationInfo","optional":false}],"description":"Detach the callback that is executed whenever the component is invalidated"},{"name":"fireEvent","visibility":"public","returnValue":{"type":"boolean","description":"false, if the event was cancelled (preventDefault called), true otherwise"},"parameters":[{"name":"name","type":"undefined","optional":false,"description":"name of the event"},{"name":"data","type":"undefined","optional":false,"description":"additional data for the event"},{"name":"cancelable","type":"undefined","optional":false,"defaultValue":false,"description":"true, if the user can call preventDefault on the event object"},{"name":"bubbles","type":"undefined","optional":false,"defaultValue":true,"description":"true, if the event bubbles"}]},{"name":"focus","visibility":"public","parameters":[{"name":"focusOptions","type":"FocusOptions","optional":false,"description":"additional options for the focus"}],"description":"Set the focus to the element, returned by \"getFocusDomRef()\" (marked by \"data-sap-focus-ref\")"},{"name":"getDomRef","visibility":"public","description":"Returns the DOM Element inside the Shadow Root that corresponds to the opening tag in the UI5 Web Component's template *Note:* For logical (abstract) elements (items, options, etc...), returns the part of the parent's DOM that represents this option Use this method instead of \"this.shadowRoot\" to read the Shadow DOM, if ever necessary"},{"name":"getFocusDomRef","visibility":"public","description":"Returns the DOM Element marked with \"data-sap-focus-ref\" inside the template. This is the element that will receive the focus by default."},{"name":"getFocusDomRefAsync","visibility":"public","description":"Waits for dom ref and then returns the DOM Element marked with \"data-sap-focus-ref\" inside the template. This is the element that will receive the focus by default."},{"name":"getMetadata","visibility":"public","static":true,"returnValue":{"type":"UI5ElementMetadata"},"description":"Returns an instance of UI5ElementMetadata.js representing this UI5 Web Component's full metadata (its and its parents') Note: not to be confused with the \"get metadata()\" method, which returns an object for this class's metadata only"},{"name":"getSlottedNodes","visibility":"public","description":"Returns the actual children, associated with a slot. Useful when there are transitive slots in nested component scenarios and you don't want to get a list of the slots, but rather of their content."},{"name":"getStaticAreaItemDomRef","visibility":"public"},{"name":"getUniqueDependencies","visibility":"public","static":true,"description":"Returns a list of the unique dependencies for this UI5 Web Component"},{"name":"onAfterRendering","visibility":"public","description":"Called every time after the component renders."},{"name":"onBeforeRendering","visibility":"public","description":"Called every time before the component renders."},{"name":"onDefine","visibility":"protected","static":true,"returnValue":{"type":"Promise.<void>"},"description":"Hook that will be called upon custom element definition"},{"name":"onEnterDOM","visibility":"public","description":"Called on connectedCallback - added to the DOM."},{"name":"onExitDOM","visibility":"public","description":"Called on disconnectedCallback - removed from the DOM."},{"name":"onInvalidation","visibility":"public","parameters":[{"name":"changeInfo","type":"undefined","optional":false,"description":"An object with information about the change that caused invalidation. The object can have the following properties: - type: (property|slot) tells what caused the invalidation 1) property: a property value was changed either directly or as a result of changing the corresponding attribute 2) slot: a slotted node(nodes) changed in one of several ways (see \"reason\")\n\n- name: the name of the property or slot that caused the invalidation\n\n- reason: (children|textcontent|childchange|slotchange) relevant only for type=\"slot\" only and tells exactly what changed in the slot 1) children: immediate children (HTML elements or text nodes) were added, removed or reordered in the slot 2) textcontent: text nodes in the slot changed value (or nested text nodes were added or changed value). Can only trigger for slots of \"type: Node\" 3) slotchange: a slot element, slotted inside that slot had its \"slotchange\" event listener called. This practically means that transitively slotted children changed. Can only trigger if the child of a slot is a slot element itself. 4) childchange: indicates that a UI5Element child in that slot was invalidated and in turn invalidated the component. Can only trigger for slots with \"invalidateOnChildChange\" metadata descriptor\n\n- newValue: the new value of the property (for type=\"property\" only)\n\n- oldValue: the old value of the property (for type=\"property\" only)\n\n- child the child that was changed (for type=\"slot\" and reason=\"childchange\" only)"}],"description":"A callback that is executed each time an already rendered component is invalidated (scheduled for re-rendering)"}]},{"kind":"class","name":"UI5ElementMetadata","basename":"UI5ElementMetadata","resource":"UI5ElementMetadata.js","module":"UI5ElementMetadata","export":"","visibility":"public","constructor":{"visibility":"public"},"methods":[{"name":"getAttributesList","visibility":"public","returnValue":{"type":"string[]"},"description":"Returns an array with the attributes of the UI5 Element (in kebab-case)"},{"name":"getEvents","visibility":"public","description":"Returns an object with key-value pairs of events and their metadata definitions"},{"name":"getProperties","visibility":"public","description":"Returns an object with key-value pairs of properties and their metadata definitions"},{"name":"getPropertiesList","visibility":"public","returnValue":{"type":"string[]"},"description":"Returns an array with the properties of the UI5 Element (in camelCase)"},{"name":"getPureTag","visibility":"public","description":"Returns the tag of the UI5 Element without the scope"},{"name":"getSlots","visibility":"public","description":"Returns an object with key-value pairs of slots and their metadata definitions"},{"name":"getTag","visibility":"public","description":"Returns the tag of the UI5 Element"},{"name":"hasAttribute","visibility":"public","returnValue":{"type":"boolean"},"parameters":[{"name":"propName","type":"undefined","optional":false}],"description":"Determines whether a property should have an attribute counterpart"},{"name":"hasIndividualSlots","visibility":"public","description":"Determines whether this UI5 Element supports any slots with \"individualSlots: true\""},{"name":"hasSlots","visibility":"public","description":"Determines whether this UI5 Element supports any slots"},{"name":"slotsAreManaged","visibility":"public","description":"Determines whether this UI5 Element needs to invalidate if children are added/removed/changed"},{"name":"supportsF6FastNavigation","visibility":"public","description":"Determines whether this control supports F6 fast navigation"},{"name":"validatePropertyValue","visibility":"public","static":true,"description":"Validates the property's value and returns it if correct or returns the default value if not. <b>Note:</b> Only intended for use by UI5Element.js"}]}]}
@@ -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;