@ui5/webcomponents-base 0.0.0-0af474175 → 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 (297) hide show
  1. package/CHANGELOG.md +1055 -0
  2. package/README.md +2 -9
  3. package/config/wdio.conf.cjs +0 -8
  4. package/dist/.tsbuildinfo +1 -0
  5. package/dist/AssetRegistry.d.ts +2 -2
  6. package/dist/AssetRegistry.js +2 -2
  7. package/dist/AssetRegistry.js.map +1 -1
  8. package/dist/Boot.d.ts +3 -2
  9. package/dist/Boot.js +8 -6
  10. package/dist/Boot.js.map +1 -1
  11. package/dist/CustomElementsScope.d.ts +4 -4
  12. package/dist/CustomElementsScope.js +2 -2
  13. package/dist/CustomElementsScope.js.map +1 -1
  14. package/dist/CustomElementsScopeUtils.d.ts +8 -1
  15. package/dist/CustomElementsScopeUtils.js +13 -1
  16. package/dist/CustomElementsScopeUtils.js.map +1 -1
  17. package/dist/Device.d.ts +2 -2
  18. package/dist/Device.js +14 -12
  19. package/dist/Device.js.map +1 -1
  20. package/dist/FontFace.js +1 -1
  21. package/dist/FontFace.js.map +1 -1
  22. package/dist/IgnoreCustomElements.d.ts +3 -5
  23. package/dist/IgnoreCustomElements.js +3 -5
  24. package/dist/IgnoreCustomElements.js.map +1 -1
  25. package/dist/InitialConfiguration.d.ts +2 -2
  26. package/dist/InitialConfiguration.js +7 -6
  27. package/dist/InitialConfiguration.js.map +1 -1
  28. package/dist/Keys.d.ts +7 -1
  29. package/dist/Keys.js +113 -106
  30. package/dist/Keys.js.map +1 -1
  31. package/dist/ManagedStyles.d.ts +5 -4
  32. package/dist/ManagedStyles.js +55 -60
  33. package/dist/ManagedStyles.js.map +1 -1
  34. package/dist/MediaRange.d.ts +6 -12
  35. package/dist/MediaRange.js +21 -31
  36. package/dist/MediaRange.js.map +1 -1
  37. package/dist/UI5Element.d.ts +48 -53
  38. package/dist/UI5Element.js +127 -100
  39. package/dist/UI5Element.js.map +1 -1
  40. package/dist/UI5ElementMetadata.d.ts +13 -13
  41. package/dist/UI5ElementMetadata.js +26 -15
  42. package/dist/UI5ElementMetadata.js.map +1 -1
  43. package/dist/asset-registries/Icons.d.ts +4 -3
  44. package/dist/asset-registries/Icons.js +28 -17
  45. package/dist/asset-registries/Icons.js.map +1 -1
  46. package/dist/asset-registries/Illustrations.d.ts +2 -0
  47. package/dist/asset-registries/Illustrations.js +51 -20
  48. package/dist/asset-registries/Illustrations.js.map +1 -1
  49. package/dist/asset-registries/LocaleData.js +1 -1
  50. package/dist/asset-registries/LocaleData.js.map +1 -1
  51. package/dist/asset-registries/Themes.d.ts +4 -3
  52. package/dist/asset-registries/Themes.js +26 -10
  53. package/dist/asset-registries/Themes.js.map +1 -1
  54. package/dist/asset-registries/i18n.d.ts +2 -2
  55. package/dist/asset-registries/i18n.js +4 -3
  56. package/dist/asset-registries/i18n.js.map +1 -1
  57. package/dist/{assets-meta → asset-registries/util}/IconCollectionsAlias.d.ts +1 -2
  58. package/dist/{assets-meta → asset-registries/util}/IconCollectionsAlias.js +1 -2
  59. package/dist/asset-registries/util/IconCollectionsAlias.js.map +1 -0
  60. package/dist/asset-registries/util/IconCollectionsByTheme.d.ts +20 -0
  61. package/dist/asset-registries/util/IconCollectionsByTheme.js +42 -0
  62. package/dist/asset-registries/util/IconCollectionsByTheme.js.map +1 -0
  63. package/dist/asset-registries/util/getIconCollectionByTheme.d.ts +13 -0
  64. package/dist/asset-registries/util/getIconCollectionByTheme.js +29 -0
  65. package/dist/asset-registries/util/getIconCollectionByTheme.js.map +1 -0
  66. package/dist/config/CalendarType.d.ts +8 -1
  67. package/dist/config/CalendarType.js +18 -2
  68. package/dist/config/CalendarType.js.map +1 -1
  69. package/dist/config/Icons.d.ts +9 -24
  70. package/dist/config/Icons.js +8 -67
  71. package/dist/config/Icons.js.map +1 -1
  72. package/dist/config/Language.d.ts +1 -1
  73. package/dist/config/Language.js +6 -3
  74. package/dist/config/Language.js.map +1 -1
  75. package/dist/config/Theme.d.ts +4 -3
  76. package/dist/config/Theme.js +13 -6
  77. package/dist/config/Theme.js.map +1 -1
  78. package/dist/config/ThemeRoot.d.ts +2 -4
  79. package/dist/config/ThemeRoot.js +2 -4
  80. package/dist/config/ThemeRoot.js.map +1 -1
  81. package/dist/config/Timezone.d.ts +1 -1
  82. package/dist/config/Timezone.js +1 -1
  83. package/dist/config/Timezone.js.map +1 -1
  84. package/dist/connectToComponent.d.ts +9 -0
  85. package/dist/connectToComponent.js +59 -0
  86. package/dist/connectToComponent.js.map +1 -0
  87. package/dist/css/FontFace.css +47 -17
  88. package/dist/css/SystemCSSVars.css +0 -8
  89. package/dist/custom-elements-internal.json +2952 -0
  90. package/dist/custom-elements.json +2583 -0
  91. package/dist/decorators/customElement.d.ts +3 -3
  92. package/dist/decorators/customElement.js +10 -5
  93. package/dist/decorators/customElement.js.map +1 -1
  94. package/dist/decorators/event.d.ts +5 -2
  95. package/dist/decorators/event.js.map +1 -1
  96. package/dist/decorators.d.ts +5 -0
  97. package/dist/decorators.js +6 -0
  98. package/dist/decorators.js.map +1 -0
  99. package/dist/delegate/ItemNavigation.d.ts +9 -8
  100. package/dist/delegate/ItemNavigation.js +13 -14
  101. package/dist/delegate/ItemNavigation.js.map +1 -1
  102. package/dist/delegate/ResizeHandler.d.ts +4 -6
  103. package/dist/delegate/ResizeHandler.js +4 -6
  104. package/dist/delegate/ResizeHandler.js.map +1 -1
  105. package/dist/delegate/ScrollEnablement.js +2 -2
  106. package/dist/delegate/ScrollEnablement.js.map +1 -1
  107. package/dist/features/InputElementsFormSupport.d.ts +18 -0
  108. package/dist/features/InputElementsFormSupport.js +40 -0
  109. package/dist/features/InputElementsFormSupport.js.map +1 -0
  110. package/dist/features/OpenUI5Enablement.d.ts +1 -1
  111. package/dist/features/OpenUI5Support.d.ts +13 -5
  112. package/dist/features/OpenUI5Support.js +87 -46
  113. package/dist/features/OpenUI5Support.js.map +1 -1
  114. package/dist/features/patchPatcher.d.ts +11 -0
  115. package/dist/features/patchPatcher.js +11 -0
  116. package/dist/features/patchPatcher.js.map +1 -0
  117. package/dist/features/patchPopup.d.ts +14 -0
  118. package/dist/features/patchPopup.js +50 -0
  119. package/dist/features/patchPopup.js.map +1 -0
  120. package/dist/generated/AssetParameters.d.ts +6 -0
  121. package/dist/generated/AssetParameters.js +3 -10
  122. package/dist/generated/AssetParameters.js.map +1 -0
  123. package/dist/generated/VersionInfo.d.ts +10 -0
  124. package/dist/generated/VersionInfo.js +9 -8
  125. package/dist/generated/VersionInfo.js.map +1 -0
  126. package/dist/generated/css/FontFace.css.js +1 -1
  127. package/dist/generated/css/FontFace.css.js.map +1 -1
  128. package/dist/generated/css/SystemCSSVars.css.js +1 -1
  129. package/dist/generated/css/SystemCSSVars.css.js.map +1 -1
  130. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +1 -1
  131. package/dist/i18nBundle.d.ts +2 -4
  132. package/dist/i18nBundle.js +1 -4
  133. package/dist/i18nBundle.js.map +1 -1
  134. package/dist/locale/applyDirection.d.ts +3 -2
  135. package/dist/locale/applyDirection.js +3 -2
  136. package/dist/locale/applyDirection.js.map +1 -1
  137. package/dist/locale/getEffectiveDir.d.ts +1 -1
  138. package/dist/locale/getEffectiveDir.js +3 -19
  139. package/dist/locale/getEffectiveDir.js.map +1 -1
  140. package/dist/renderer/LitRenderer.d.ts +2 -2
  141. package/dist/renderer/LitRenderer.js +2 -8
  142. package/dist/renderer/LitRenderer.js.map +1 -1
  143. package/dist/renderer/directives/style-map.d.ts +13 -0
  144. package/dist/renderer/directives/style-map.js +59 -59
  145. package/dist/renderer/directives/style-map.js.map +1 -0
  146. package/dist/sap/base/Log.js +698 -188
  147. package/dist/sap/base/assert.js +28 -1
  148. package/dist/sap/base/config/MemoryConfigurationProvider.js +20 -0
  149. package/dist/sap/base/security/URLListValidator.js +253 -6
  150. package/dist/sap/base/security/encodeCSS.js +34 -8
  151. package/dist/sap/base/security/encodeXML.js +47 -17
  152. package/dist/sap/base/security/sanitizeHTML.js +35 -13
  153. package/dist/sap/base/strings/toHex.js +27 -2
  154. package/dist/sap/base/util/now.js +24 -3
  155. package/dist/sap/base/util/uid.js +27 -0
  156. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +112 -97
  157. package/dist/ssr-dom-shim.d.ts +1 -0
  158. package/dist/ssr-dom-shim.js +12 -0
  159. package/dist/ssr-dom-shim.js.map +1 -0
  160. package/dist/ssr-dom.d.ts +0 -0
  161. package/dist/ssr-dom.js +0 -0
  162. package/dist/theming/applyTheme.js +5 -5
  163. package/dist/theming/applyTheme.js.map +1 -1
  164. package/dist/theming/getConstructableStyle.d.ts +1 -1
  165. package/dist/theming/getConstructableStyle.js +3 -3
  166. package/dist/theming/getConstructableStyle.js.map +1 -1
  167. package/dist/theming/getEffectiveStyle.d.ts +1 -1
  168. package/dist/theming/getEffectiveStyle.js +5 -12
  169. package/dist/theming/getEffectiveStyle.js.map +1 -1
  170. package/dist/types/AnimationMode.d.ts +0 -8
  171. package/dist/types/AnimationMode.js +0 -8
  172. package/dist/types/AnimationMode.js.map +1 -1
  173. package/dist/types/AriaHasPopup.d.ts +32 -0
  174. package/dist/types/AriaHasPopup.js +34 -0
  175. package/dist/types/AriaHasPopup.js.map +1 -0
  176. package/dist/types/AriaLandmarkRole.d.ts +79 -0
  177. package/dist/types/AriaLandmarkRole.js +81 -0
  178. package/dist/types/AriaLandmarkRole.js.map +1 -0
  179. package/dist/types/AriaRole.d.ts +27 -0
  180. package/dist/types/AriaRole.js +29 -0
  181. package/dist/types/AriaRole.js.map +1 -0
  182. package/dist/types/CSSColor.d.ts +0 -4
  183. package/dist/types/CSSColor.js +0 -4
  184. package/dist/types/CSSColor.js.map +1 -1
  185. package/dist/types/CSSSize.d.ts +11 -0
  186. package/dist/types/CSSSize.js +14 -0
  187. package/dist/types/CSSSize.js.map +1 -0
  188. package/dist/types/CalendarType.d.ts +0 -9
  189. package/dist/types/CalendarType.js +0 -9
  190. package/dist/types/CalendarType.js.map +1 -1
  191. package/dist/types/DOMReference.d.ts +1 -5
  192. package/dist/types/DOMReference.js +1 -5
  193. package/dist/types/DOMReference.js.map +1 -1
  194. package/dist/types/DataType.d.ts +1 -6
  195. package/dist/types/DataType.js +1 -6
  196. package/dist/types/DataType.js.map +1 -1
  197. package/dist/types/Float.d.ts +0 -3
  198. package/dist/types/Float.js +0 -3
  199. package/dist/types/Float.js.map +1 -1
  200. package/dist/types/Integer.d.ts +0 -3
  201. package/dist/types/Integer.js +0 -3
  202. package/dist/types/Integer.js.map +1 -1
  203. package/dist/types/InvisibleMessageMode.d.ts +5 -10
  204. package/dist/types/InvisibleMessageMode.js +4 -11
  205. package/dist/types/InvisibleMessageMode.js.map +1 -1
  206. package/dist/types/ItemNavigationBehavior.d.ts +0 -6
  207. package/dist/types/ItemNavigationBehavior.js +0 -6
  208. package/dist/types/ItemNavigationBehavior.js.map +1 -1
  209. package/dist/types/MovePlacement.d.ts +20 -0
  210. package/dist/types/MovePlacement.js +22 -0
  211. package/dist/types/MovePlacement.js.map +1 -0
  212. package/dist/types/NavigationMode.d.ts +0 -8
  213. package/dist/types/NavigationMode.js +0 -8
  214. package/dist/types/NavigationMode.js.map +1 -1
  215. package/dist/types/Orientation.d.ts +16 -0
  216. package/dist/types/Orientation.js +18 -0
  217. package/dist/types/Orientation.js.map +1 -0
  218. package/dist/types/ValueState.d.ts +3 -17
  219. package/dist/types/ValueState.js +3 -17
  220. package/dist/types/ValueState.js.map +1 -1
  221. package/dist/types.d.ts +24 -1
  222. package/dist/types.js.map +1 -1
  223. package/dist/updateShadowRoot.d.ts +1 -2
  224. package/dist/updateShadowRoot.js +5 -28
  225. package/dist/updateShadowRoot.js.map +1 -1
  226. package/dist/util/ColorConversion.js +200 -195
  227. package/dist/util/ColorConversion.js.map +1 -1
  228. package/dist/util/InvisibleMessage.d.ts +1 -1
  229. package/dist/util/InvisibleMessage.js.map +1 -1
  230. package/dist/util/PopupUtils.d.ts +1 -3
  231. package/dist/util/PopupUtils.js +1 -15
  232. package/dist/util/PopupUtils.js.map +1 -1
  233. package/dist/util/clamp.js +2 -1
  234. package/dist/util/clamp.js.map +1 -1
  235. package/dist/util/createLinkInHead.d.ts +1 -1
  236. package/dist/util/createLinkInHead.js +1 -1
  237. package/dist/util/createLinkInHead.js.map +1 -1
  238. package/dist/util/detectNavigatorLanguage.d.ts +2 -2
  239. package/dist/util/detectNavigatorLanguage.js +6 -1
  240. package/dist/util/detectNavigatorLanguage.js.map +1 -1
  241. package/dist/util/dragAndDrop/DragRegistry.d.ts +12 -0
  242. package/dist/util/dragAndDrop/DragRegistry.js +68 -0
  243. package/dist/util/dragAndDrop/DragRegistry.js.map +1 -0
  244. package/dist/util/dragAndDrop/findClosestPosition.d.ts +7 -0
  245. package/dist/util/dragAndDrop/findClosestPosition.js +59 -0
  246. package/dist/util/dragAndDrop/findClosestPosition.js.map +1 -0
  247. package/dist/util/dragAndDrop/longDragOverHandler.d.ts +2 -0
  248. package/dist/util/dragAndDrop/longDragOverHandler.js +25 -0
  249. package/dist/util/dragAndDrop/longDragOverHandler.js.map +1 -0
  250. package/dist/util/getClassCopy.d.ts +62 -42
  251. package/dist/util/getDesigntimePropertyAsArray.d.ts +2 -2
  252. package/dist/util/getDesigntimePropertyAsArray.js +2 -1
  253. package/dist/util/getDesigntimePropertyAsArray.js.map +1 -1
  254. package/dist/util/getParentElement.d.ts +2 -0
  255. package/dist/util/getParentElement.js +5 -0
  256. package/dist/util/getParentElement.js.map +1 -0
  257. package/dist/util/isElementContainingBlock.d.ts +2 -0
  258. package/dist/util/isElementContainingBlock.js +11 -0
  259. package/dist/util/isElementContainingBlock.js.map +1 -0
  260. package/dist/vscode.html-custom-data.json +22 -0
  261. package/index.js +3 -19
  262. package/package-scripts.cjs +17 -19
  263. package/package.json +16 -7
  264. package/src/css/FontFace.css +47 -17
  265. package/src/css/SystemCSSVars.css +0 -8
  266. package/tsconfig.json +6 -0
  267. package/.eslintignore +0 -16
  268. package/.eslintrc.cjs +0 -3
  269. package/bundle.esm.js +0 -67
  270. package/dist/CSP.d.ts +0 -30
  271. package/dist/CSP.js +0 -51
  272. package/dist/CSP.js.map +0 -1
  273. package/dist/StaticAreaItem.d.ts +0 -36
  274. package/dist/StaticAreaItem.js +0 -102
  275. package/dist/StaticAreaItem.js.map +0 -1
  276. package/dist/api.json +0 -1
  277. package/dist/assets/Boot.34b7cea0.css +0 -1
  278. package/dist/assets/Boot.4ee0e678.js +0 -9
  279. package/dist/assets/bundle.esm.a67f0b0c.js +0 -50
  280. package/dist/assets-meta/IconCollectionsAlias.js.map +0 -1
  281. package/dist/config/RTL.d.ts +0 -7
  282. package/dist/config/RTL.js +0 -37
  283. package/dist/config/RTL.js.map +0 -1
  284. package/dist/theming/getEffectiveLinksHrefs.d.ts +0 -3
  285. package/dist/theming/getEffectiveLinksHrefs.js +0 -17
  286. package/dist/theming/getEffectiveLinksHrefs.js.map +0 -1
  287. package/dist/theming/preloadLinks.d.ts +0 -3
  288. package/dist/theming/preloadLinks.js +0 -19
  289. package/dist/theming/preloadLinks.js.map +0 -1
  290. package/dist/util/createStyleInHead.d.ts +0 -8
  291. package/dist/util/createStyleInHead.js +0 -18
  292. package/dist/util/createStyleInHead.js.map +0 -1
  293. package/lib/generate-asset-parameters/index.js +0 -27
  294. package/lib/generate-styles/index.js +0 -31
  295. package/lib/generate-version-info/index.js +0 -32
  296. package/src/renderer/directives/style-map.js +0 -72
  297. package/used-modules.txt +0 -10
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Some private variable used for creation of (pseudo-)unique IDs.
3
+ * @type int
4
+ * @private
5
+ */ /*!
6
+ * OpenUI5
7
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
8
+ * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
9
+ */
10
+
11
+ var iIdCounter = 0;
12
+
13
+ /**
14
+ * Creates and returns a pseudo-unique ID.
15
+ *
16
+ * No means for detection of overlap with already present or future UIDs.
17
+ *
18
+ * @function
19
+ * @since 1.58
20
+ * @alias module:sap/base/util/uid
21
+ * @return {string} A pseudo-unique id.
22
+ * @public
23
+ */
24
+ var fnUid = function uid() {
25
+ return "id-" + new Date().valueOf() + "-" + iIdCounter++;
26
+ };
27
+ export default fnUid;
@@ -489,7 +489,10 @@ var cssSchema = (function () {
489
489
  },
490
490
  'font-weight': {
491
491
  'cssPropBits': 0,
492
- 'cssLitGroup': [ L[ 4 ], L[ 47 ], L[ 55 ] ]
492
+ 'cssLitGroup': [ L[ 4 ], L[ 47 ], L[ 55 ] ],
493
+ // ##### BEGIN: MODIFIED BY SAP
494
+ 'cssLitNumeric': true
495
+ // ##### END: MODIFIED BY SAP
493
496
  },
494
497
  'height': {
495
498
  'cssPropBits': 37,
@@ -1217,101 +1220,113 @@ var sanitizeCssProperty = (function () {
1217
1220
  token = (
1218
1221
  // Strip out spaces. Normally cssparser.js dumps these, but we
1219
1222
  // strip them out in case the content doesn't come via cssparser.js.
1220
- (cc === ' '.charCodeAt(0)) ? ''
1221
- : (cc === '"'.charCodeAt(0)) ? ( // Quoted string.
1222
- (qstringBits === CSS_PROP_BIT_QSTRING_URL && opt_naiveUriRewriter)
1223
- // Sanitize and convert to url("...") syntax.
1224
- // Treat url content as case-sensitive.
1225
- ? (normalizeUrl(safeUri(
1226
- decodeCss(tokens[i].substring(1, token.length - 1)),
1227
- property,
1228
- opt_naiveUriRewriter)))
1229
- // Drop if plain text content strings not allowed.
1230
- : (qstringBits === CSS_PROP_BIT_QSTRING_CONTENT) ? token : '')
1231
- // Preserve hash color literals if allowed.
1232
- : (cc === '#'.charCodeAt(0) && /^#(?:[0-9a-f]{3}){1,2}$/.test(token))
1233
- ? (propBits & CSS_PROP_BIT_HASH_VALUE ? token : '')
1234
- : ('0'.charCodeAt(0) <= cc && cc <= '9'.charCodeAt(0))
1235
- // A number starting with a digit.
1236
- ? ((propBits & CSS_PROP_BIT_QUANTITY)
1237
- ? ((propBits & CSS_PROP_BIT_Z_INDEX)
1238
- ? (token.match(/^\d{1,7}$/) ? token : '')
1239
- : token)
1240
- : '')
1241
- // Normalize quantities so they don't start with a '.' or '+' sign and
1242
- // make sure they all have an integer component so can't be confused
1243
- // with a dotted identifier.
1244
- // This can't be done in the lexer since ".4" is a valid rule part.
1245
- : (cc1 = token.charCodeAt(1),
1246
- cc2 = token.charCodeAt(2),
1247
- isnum1 = '0'.charCodeAt(0) <= cc1 && cc1 <= '9'.charCodeAt(0),
1248
- isnum2 = '0'.charCodeAt(0) <= cc2 && cc2 <= '9'.charCodeAt(0),
1249
- // +.5 -> 0.5 if allowed.
1250
- (cc === '+'.charCodeAt(0)
1251
- && (isnum1 || (cc1 === '.'.charCodeAt(0) && isnum2))))
1252
- ? ((propBits & CSS_PROP_BIT_QUANTITY)
1253
- ? ((propBits & CSS_PROP_BIT_Z_INDEX)
1254
- ? (token.match(/^\+\d{1,7}$/) ? token : '')
1255
- : ((isnum1 ? '' : '0') + token.substring(1)))
1256
- : '')
1257
- // -.5 -> -0.5 if allowed otherwise -> 0 if quantities allowed.
1258
- : (cc === '-'.charCodeAt(0)
1259
- && (isnum1 || (cc1 === '.'.charCodeAt(0) && isnum2)))
1260
- ? ((propBits & CSS_PROP_BIT_NEGATIVE_QUANTITY)
1261
- ? ((propBits & CSS_PROP_BIT_Z_INDEX)
1262
- ? (token.match(/^\-\d{1,7}$/) ? token : '')
1263
- : ((isnum1 ? '-' : '-0') + token.substring(1)))
1264
- : ((propBits & CSS_PROP_BIT_QUANTITY) ? '0' : ''))
1265
- // .5 -> 0.5 if allowed.
1266
- : (cc === '.'.charCodeAt(0) && isnum1)
1267
- ? ((propBits & CSS_PROP_BIT_QUANTITY) ? '0' + token : '')
1268
- // Handle url("...") by rewriting the body.
1269
- : ('url(' === token.substring(0, 4))
1270
- ? ((opt_naiveUriRewriter && (qstringBits & CSS_PROP_BIT_QSTRING_URL))
1271
- ? normalizeUrl(safeUri(
1272
- tokens[i].substring(5, token.length - 2),
1273
- property,
1274
- opt_naiveUriRewriter))
1275
- : '')
1276
- // Handle func(...) and literal tokens
1277
- // such as keywords and punctuation.
1278
- : (
1279
- // Step 1. Combine func(...) into something that can be compared
1280
- // against propertySchema.cssExtra.
1281
- (token.charAt(token.length-1) === '(')
1282
- && (end = normalizeFunctionCall(tokens, i),
1283
- // When tokens is
1284
- // ['x', ' ', 'rgb(', '255', ',', '0', ',', '0', ')', ' ', 'y']
1285
- // and i is the index of 'rgb(' and end is the index of ')'
1286
- // splices tokens to where i now is the index of the whole call:
1287
- // ['x', ' ', 'rgb( 255 , 0 , 0 )', ' ', 'y']
1288
- tokens.splice(i, end - i,
1289
- token = tokens.slice(i, end).join(' '))),
1290
- litGroup = propertySchema.cssLitGroup,
1291
- litMap = (litGroup
1292
- ? (propertySchema.cssLitMap
1293
- // Lazily compute the union from litGroup.
1294
- || (propertySchema.cssLitMap = unionArrays(litGroup)))
1295
- : ALLOWED_LITERAL), // A convenient empty object.
1296
- (litMap[token] === ALLOWED_LITERAL
1297
- || propertySchema.cssExtra && propertySchema.cssExtra.test(token)))
1298
- // Token is in the literal map or matches extra.
1299
- ? token
1300
- : (/^\w+$/.test(token)
1301
- && (qstringBits === CSS_PROP_BIT_QSTRING_CONTENT))
1302
- // Quote unrecognized keywords so font names like
1303
- // Arial Bold
1304
- // ->
1305
- // "Arial Bold"
1306
- ? (lastQuoted+1 === k
1307
- // If the last token was also a keyword that was quoted, then
1308
- // combine this token into that.
1309
- ? (tokens[lastQuoted] = tokens[lastQuoted]
1310
- .substring(0, tokens[lastQuoted].length-1) + ' ' + token + '"',
1311
- token = '')
1312
- : (lastQuoted = k, '"' + token + '"'))
1313
- // Disallowed.
1314
- : '');
1223
+ (cc === ' '.charCodeAt(0))
1224
+ ? ''
1225
+ : (cc === '"'.charCodeAt(0))
1226
+ ? ( // Quoted string.
1227
+ (qstringBits === CSS_PROP_BIT_QSTRING_URL && opt_naiveUriRewriter)
1228
+ // Sanitize and convert to url("...") syntax.
1229
+ // Treat url content as case-sensitive.
1230
+ ? (normalizeUrl(
1231
+ safeUri(
1232
+ decodeCss(tokens[i].substring(1, token.length - 1)),
1233
+ property,
1234
+ opt_naiveUriRewriter
1235
+ )
1236
+ ))
1237
+ // Drop if plain text content strings not allowed.
1238
+ : (qstringBits === CSS_PROP_BIT_QSTRING_CONTENT) ? token : '')
1239
+ // Preserve hash color literals if allowed.
1240
+ : (cc === '#'.charCodeAt(0) && /^#(?:[0-9a-f]{3}){1,2}$/.test(token))
1241
+ ? (propBits & CSS_PROP_BIT_HASH_VALUE ? token : '')
1242
+ // ##### BEGIN: MODIFIED BY SAP
1243
+ // : ('0'.charCodeAt(0) <= cc && cc <= '9'.charCodeAt(0))
1244
+ : ('0'.charCodeAt(0) <= cc && cc <= '9'.charCodeAt(0) && !propertySchema.cssLitNumeric)
1245
+ // ##### END: MODIFIED BY SAP
1246
+ // A number starting with a digit.
1247
+ ? ((propBits & CSS_PROP_BIT_QUANTITY)
1248
+ ? ((propBits & CSS_PROP_BIT_Z_INDEX)
1249
+ ? (token.match(/^\d{1,7}$/) ? token : '')
1250
+ : token)
1251
+ : '')
1252
+ // Normalize quantities so they don't start with a '.' or '+' sign and
1253
+ // make sure they all have an integer component so can't be confused
1254
+ // with a dotted identifier.
1255
+ // This can't be done in the lexer since ".4" is a valid rule part.
1256
+ : (cc1 = token.charCodeAt(1),
1257
+ cc2 = token.charCodeAt(2),
1258
+ isnum1 = '0'.charCodeAt(0) <= cc1 && cc1 <= '9'.charCodeAt(0),
1259
+ isnum2 = '0'.charCodeAt(0) <= cc2 && cc2 <= '9'.charCodeAt(0),
1260
+ // +.5 -> 0.5 if allowed.
1261
+ (cc === '+'.charCodeAt(0)
1262
+ && (isnum1 || (cc1 === '.'.charCodeAt(0) && isnum2))))
1263
+ ? ((propBits & CSS_PROP_BIT_QUANTITY)
1264
+ ? ((propBits & CSS_PROP_BIT_Z_INDEX)
1265
+ ? (token.match(/^\+\d{1,7}$/) ? token : '')
1266
+ : ((isnum1 ? '' : '0') + token.substring(1)))
1267
+ : '')
1268
+ // -.5 -> -0.5 if allowed otherwise -> 0 if quantities allowed.
1269
+ : (cc === '-'.charCodeAt(0)
1270
+ && (isnum1 || (cc1 === '.'.charCodeAt(0) && isnum2)))
1271
+ ? ((propBits & CSS_PROP_BIT_NEGATIVE_QUANTITY)
1272
+ ? ((propBits & CSS_PROP_BIT_Z_INDEX)
1273
+ ? (token.match(/^\-\d{1,7}$/) ? token : '')
1274
+ : ((isnum1 ? '-' : '-0') + token.substring(1)))
1275
+ : ((propBits & CSS_PROP_BIT_QUANTITY) ? '0' : ''))
1276
+ // .5 -> 0.5 if allowed.
1277
+ : (cc === '.'.charCodeAt(0) && isnum1)
1278
+ ? ((propBits & CSS_PROP_BIT_QUANTITY) ? '0' + token : '')
1279
+ // Handle url("...") by rewriting the body.
1280
+ : ('url(' === token.substring(0, 4))
1281
+ ? ((opt_naiveUriRewriter && (qstringBits & CSS_PROP_BIT_QSTRING_URL))
1282
+ ? normalizeUrl(
1283
+ safeUri(
1284
+ tokens[i].substring(5, token.length - 2),
1285
+ property,
1286
+ opt_naiveUriRewriter
1287
+ )
1288
+ )
1289
+ : '')
1290
+ // Handle func(...) and literal tokens
1291
+ // such as keywords and punctuation.
1292
+ : (
1293
+ // Step 1. Combine func(...) into something that can be compared
1294
+ // against propertySchema.cssExtra.
1295
+ (token.charAt(token.length-1) === '(')
1296
+ && (end = normalizeFunctionCall(tokens, i),
1297
+ // When tokens is
1298
+ // ['x', ' ', 'rgb(', '255', ',', '0', ',', '0', ')', ' ', 'y']
1299
+ // and i is the index of 'rgb(' and end is the index of ')'
1300
+ // splices tokens to where i now is the index of the whole call:
1301
+ // ['x', ' ', 'rgb( 255 , 0 , 0 )', ' ', 'y']
1302
+ tokens.splice(i, end - i,
1303
+ token = tokens.slice(i, end).join(' '))),
1304
+ litGroup = propertySchema.cssLitGroup,
1305
+ litMap = (
1306
+ litGroup
1307
+ ? (propertySchema.cssLitMap
1308
+ // Lazily compute the union from litGroup.
1309
+ || (propertySchema.cssLitMap = unionArrays(litGroup)))
1310
+ : ALLOWED_LITERAL), // A convenient empty object.
1311
+ (litMap[token] === ALLOWED_LITERAL
1312
+ || propertySchema.cssExtra && propertySchema.cssExtra.test(token)))
1313
+ // Token is in the literal map or matches extra.
1314
+ ? token
1315
+ : (/^\w+$/.test(token)
1316
+ && (qstringBits === CSS_PROP_BIT_QSTRING_CONTENT))
1317
+ // Quote unrecognized keywords so font names like
1318
+ // Arial Bold
1319
+ // ->
1320
+ // "Arial Bold"
1321
+ ? (lastQuoted+1 === k
1322
+ // If the last token was also a keyword that was quoted, then
1323
+ // combine this token into that.
1324
+ ? (tokens[lastQuoted] = tokens[lastQuoted]
1325
+ .substring(0, tokens[lastQuoted].length-1) + ' ' + token + '"',
1326
+ token = '')
1327
+ : (lastQuoted = k, '"' + token + '"'))
1328
+ // Disallowed.
1329
+ : '');
1315
1330
  if (token) {
1316
1331
  tokens[k++] = token;
1317
1332
  }
@@ -1989,7 +2004,7 @@ if (typeof window !== 'undefined') {
1989
2004
  }
1990
2005
  /*!
1991
2006
  * OpenUI5
1992
- * (c) Copyright 2009-2023 SAP SE or an SAP affiliate company.
2007
+ * (c) Copyright 2009-2024 SAP SE or an SAP affiliate company.
1993
2008
  * Licensed under the Apache License, Version 2.0 - see LICENSE.txt.
1994
2009
  */
1995
2010
  // Based on coding from the HTML4 Sanitizer by Google Inc.
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ /* eslint-disable max-classes-per-file */
2
+ import { HTMLElement, Element, customElements } from "@lit-labs/ssr-dom-shim";
3
+ globalThis.HTMLElement ??= HTMLElement;
4
+ globalThis.Element ??= Element;
5
+ globalThis.customElements ??= customElements;
6
+ class NodeShim {
7
+ }
8
+ globalThis.Node ??= NodeShim;
9
+ class FileListShim {
10
+ }
11
+ globalThis.FileList ??= FileListShim;
12
+ //# sourceMappingURL=ssr-dom-shim.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssr-dom-shim.js","sourceRoot":"","sources":["../src/ssr-dom-shim.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE9E,UAAU,CAAC,WAAW,KAAK,WAAW,CAAC;AACvC,UAAU,CAAC,OAAO,KAAK,OAAO,CAAC;AAC/B,UAAU,CAAC,cAAc,KAAK,cAAc,CAAC;AAE7C,MAAM,QAAQ;CAAG;AACjB,UAAU,CAAC,IAAI,KAAK,QAAiC,CAAC;AAEtD,MAAM,YAAY;CAAG;AACrB,UAAU,CAAC,QAAQ,KAAK,YAAyC,CAAC","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport { HTMLElement, Element, customElements } from \"@lit-labs/ssr-dom-shim\";\n\nglobalThis.HTMLElement ??= HTMLElement;\nglobalThis.Element ??= Element;\nglobalThis.customElements ??= customElements;\n\nclass NodeShim {}\nglobalThis.Node ??= NodeShim as object as typeof Node;\n\nclass FileListShim {}\nglobalThis.FileList ??= FileListShim as object as typeof FileList;\n"]}
File without changes
File without changes
@@ -17,19 +17,19 @@ const loadThemeBase = async (theme) => {
17
17
  }
18
18
  const cssData = await getThemeProperties(BASE_THEME_PACKAGE, theme);
19
19
  if (cssData) {
20
- createOrUpdateStyle(cssData, "data-ui5-theme-properties", BASE_THEME_PACKAGE);
20
+ createOrUpdateStyle(cssData, "data-ui5-theme-properties", BASE_THEME_PACKAGE, theme);
21
21
  }
22
22
  };
23
23
  const deleteThemeBase = () => {
24
24
  removeStyle("data-ui5-theme-properties", BASE_THEME_PACKAGE);
25
25
  };
26
- const loadComponentPackages = async (theme) => {
26
+ const loadComponentPackages = async (theme, externalThemeName) => {
27
27
  const registeredPackages = getRegisteredPackages();
28
28
  const packagesStylesPromises = [...registeredPackages].map(async (packageName) => {
29
29
  if (packageName === BASE_THEME_PACKAGE) {
30
30
  return;
31
31
  }
32
- const cssData = await getThemeProperties(packageName, theme);
32
+ const cssData = await getThemeProperties(packageName, theme, externalThemeName);
33
33
  if (cssData) {
34
34
  createOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);
35
35
  }
@@ -44,7 +44,7 @@ const detectExternalTheme = async (theme) => {
44
44
  }
45
45
  // If OpenUI5Support is enabled, try to find out if it loaded variables
46
46
  const openUI5Support = getFeature("OpenUI5Support");
47
- if (openUI5Support) {
47
+ if (openUI5Support && openUI5Support.isOpenUI5Detected()) {
48
48
  const varsLoaded = openUI5Support.cssVariablesLoaded();
49
49
  if (varsLoaded) {
50
50
  return {
@@ -69,7 +69,7 @@ const applyTheme = async (theme) => {
69
69
  }
70
70
  // Always load component packages properties. For non-registered themes, try with the base theme, if any
71
71
  const packagesTheme = isThemeRegistered(theme) ? theme : extTheme && extTheme.baseThemeName;
72
- await loadComponentPackages(packagesTheme || DEFAULT_THEME);
72
+ await loadComponentPackages(packagesTheme || DEFAULT_THEME, extTheme && extTheme.themeName === theme ? theme : undefined);
73
73
  fireThemeLoaded(theme);
74
74
  };
75
75
  export default applyTheme;
@@ -1 +1 @@
1
- {"version":3,"file":"applyTheme.js","sourceRoot":"","sources":["../../src/theming/applyTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErF,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,kBAAkB,GAA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,GAAG,qBAAqB,EAAE,CAAC;IACzC,IAAI,QAAQ,EAAE;QACb,OAAO,QAAQ,CAAC;KAChB;IAED,uEAAuE;IACvE,MAAM,cAAc,GAAG,UAAU,CAAwB,gBAAgB,CAAC,CAAC;IAC3E,IAAI,cAAc,EAAE;QACnB,MAAM,UAAU,GAAG,cAAc,CAAC,kBAAkB,EAAE,CAAC;QACvD,IAAI,UAAU,EAAE;YACf,OAAO;gBACN,SAAS,EAAE,cAAc,CAAC,8BAA8B,EAAE,EAAE,KAAK;gBACjE,aAAa,EAAE,EAAE,EAAE,mDAAmD;aACtE,CAAC;SACF;KACD;SAAM,IAAI,YAAY,EAAE,EAAE;QAC1B,MAAM,6BAA6B,CAAC,KAAK,CAAC,CAAC;QAE3C,OAAO,qBAAqB,EAAE,CAAC;KAC/B;AACF,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,KAAK,EAAE,KAAa,EAAE,EAAE;IAC1C,MAAM,QAAQ,GAAG,MAAM,mBAAmB,CAAC,KAAK,CAAC,CAAC;IAElD,kHAAkH;IAClH,IAAI,CAAC,QAAQ,IAAI,KAAK,KAAK,QAAQ,CAAC,SAAS,EAAE;QAC9C,MAAM,aAAa,CAAC,KAAK,CAAC,CAAC;KAC3B;SAAM;QACN,eAAe,EAAE,CAAC;KAClB;IAED,wGAAwG;IACxG,MAAM,aAAa,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,IAAI,QAAQ,CAAC,aAAa,CAAC;IAC5F,MAAM,qBAAqB,CAAC,aAAa,IAAI,aAAa,CAAC,CAAC;IAE5D,eAAe,CAAC,KAAK,CAAC,CAAC;AACxB,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC","sourcesContent":["import { getThemeProperties, getRegisteredPackages, isThemeRegistered } from \"../asset-registries/Themes.js\";\nimport { removeStyle, createOrUpdateStyle } from \"../ManagedStyles.js\";\nimport getThemeDesignerTheme from \"./getThemeDesignerTheme.js\";\nimport { fireThemeLoaded } from \"./ThemeLoaded.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport { attachCustomThemeStylesToHead, getThemeRoot } from \"../config/ThemeRoot.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\nimport { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { getCurrentRuntimeIndex } from \"../Runtimes.js\";\n\nconst BASE_THEME_PACKAGE = \"@ui5/webcomponents-theming\";\n\nconst isThemeBaseRegistered = () => {\n\tconst registeredPackages = getRegisteredPackages();\n\treturn registeredPackages.has(BASE_THEME_PACKAGE);\n};\n\nconst loadThemeBase = async (theme: string) => {\n\tif (!isThemeBaseRegistered()) {\n\t\treturn;\n\t}\n\n\tconst cssData = await getThemeProperties(BASE_THEME_PACKAGE, theme);\n\tif (cssData) {\n\t\tcreateOrUpdateStyle(cssData, \"data-ui5-theme-properties\", BASE_THEME_PACKAGE);\n\t}\n};\n\nconst deleteThemeBase = () => {\n\tremoveStyle(\"data-ui5-theme-properties\", BASE_THEME_PACKAGE);\n};\n\nconst loadComponentPackages = async (theme: string) => {\n\tconst registeredPackages = getRegisteredPackages();\n\n\tconst packagesStylesPromises = [...registeredPackages].map(async packageName => {\n\t\tif (packageName === BASE_THEME_PACKAGE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst cssData = await getThemeProperties(packageName, theme);\n\t\tif (cssData) {\n\t\t\tcreateOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);\n\t\t}\n\t});\n\n\treturn Promise.all(packagesStylesPromises);\n};\n\nconst detectExternalTheme = async (theme: string) => {\n\t// If theme designer theme is detected, use this\n\tconst extTheme = getThemeDesignerTheme();\n\tif (extTheme) {\n\t\treturn extTheme;\n\t}\n\n\t// If OpenUI5Support is enabled, try to find out if it loaded variables\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support) {\n\t\tconst varsLoaded = openUI5Support.cssVariablesLoaded();\n\t\tif (varsLoaded) {\n\t\t\treturn {\n\t\t\t\tthemeName: openUI5Support.getConfigurationSettingsObject()?.theme, // just themeName\n\t\t\t\tbaseThemeName: \"\", // baseThemeName is only relevant for custom themes\n\t\t\t};\n\t\t}\n\t} else if (getThemeRoot()) {\n\t\tawait attachCustomThemeStylesToHead(theme);\n\n\t\treturn getThemeDesignerTheme();\n\t}\n};\n\nconst applyTheme = async (theme: string) => {\n\tconst extTheme = await detectExternalTheme(theme);\n\n\t// Only load theme_base properties if there is no externally loaded theme, or there is, but it is not being loaded\n\tif (!extTheme || theme !== extTheme.themeName) {\n\t\tawait loadThemeBase(theme);\n\t} else {\n\t\tdeleteThemeBase();\n\t}\n\n\t// Always load component packages properties. For non-registered themes, try with the base theme, if any\n\tconst packagesTheme = isThemeRegistered(theme) ? theme : extTheme && extTheme.baseThemeName;\n\tawait loadComponentPackages(packagesTheme || DEFAULT_THEME);\n\n\tfireThemeLoaded(theme);\n};\n\nexport default applyTheme;\n"]}
1
+ {"version":3,"file":"applyTheme.js","sourceRoot":"","sources":["../../src/theming/applyTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAC7G,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,qBAAqB,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAErF,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,MAAM,kBAAkB,GAAG,4BAA4B,CAAC;AAExD,MAAM,qBAAqB,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["import { getThemeProperties, getRegisteredPackages, isThemeRegistered } from \"../asset-registries/Themes.js\";\nimport { removeStyle, createOrUpdateStyle } from \"../ManagedStyles.js\";\nimport getThemeDesignerTheme from \"./getThemeDesignerTheme.js\";\nimport { fireThemeLoaded } from \"./ThemeLoaded.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport { attachCustomThemeStylesToHead, getThemeRoot } from \"../config/ThemeRoot.js\";\nimport type OpenUI5Support from \"../features/OpenUI5Support.js\";\nimport { DEFAULT_THEME } from \"../generated/AssetParameters.js\";\nimport { getCurrentRuntimeIndex } from \"../Runtimes.js\";\n\nconst BASE_THEME_PACKAGE = \"@ui5/webcomponents-theming\";\n\nconst isThemeBaseRegistered = () => {\n\tconst registeredPackages = getRegisteredPackages();\n\treturn registeredPackages.has(BASE_THEME_PACKAGE);\n};\n\nconst loadThemeBase = async (theme: string) => {\n\tif (!isThemeBaseRegistered()) {\n\t\treturn;\n\t}\n\n\tconst cssData = await getThemeProperties(BASE_THEME_PACKAGE, theme);\n\tif (cssData) {\n\t\tcreateOrUpdateStyle(cssData, \"data-ui5-theme-properties\", BASE_THEME_PACKAGE, theme);\n\t}\n};\n\nconst deleteThemeBase = () => {\n\tremoveStyle(\"data-ui5-theme-properties\", BASE_THEME_PACKAGE);\n};\n\nconst loadComponentPackages = async (theme: string, externalThemeName?: string) => {\n\tconst registeredPackages = getRegisteredPackages();\n\n\tconst packagesStylesPromises = [...registeredPackages].map(async packageName => {\n\t\tif (packageName === BASE_THEME_PACKAGE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst cssData = await getThemeProperties(packageName, theme, externalThemeName);\n\t\tif (cssData) {\n\t\t\tcreateOrUpdateStyle(cssData, `data-ui5-component-properties-${getCurrentRuntimeIndex()}`, packageName);\n\t\t}\n\t});\n\n\treturn Promise.all(packagesStylesPromises);\n};\n\nconst detectExternalTheme = async (theme: string) => {\n\t// If theme designer theme is detected, use this\n\tconst extTheme = getThemeDesignerTheme();\n\tif (extTheme) {\n\t\treturn extTheme;\n\t}\n\n\t// If OpenUI5Support is enabled, try to find out if it loaded variables\n\tconst openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\tif (openUI5Support && openUI5Support.isOpenUI5Detected()) {\n\t\tconst varsLoaded = openUI5Support.cssVariablesLoaded();\n\t\tif (varsLoaded) {\n\t\t\treturn {\n\t\t\t\tthemeName: openUI5Support.getConfigurationSettingsObject()?.theme, // just themeName\n\t\t\t\tbaseThemeName: \"\", // baseThemeName is only relevant for custom themes\n\t\t\t};\n\t\t}\n\t} else if (getThemeRoot()) {\n\t\tawait attachCustomThemeStylesToHead(theme);\n\n\t\treturn getThemeDesignerTheme();\n\t}\n};\n\nconst applyTheme = async (theme: string) => {\n\tconst extTheme = await detectExternalTheme(theme);\n\n\t// Only load theme_base properties if there is no externally loaded theme, or there is, but it is not being loaded\n\tif (!extTheme || theme !== extTheme.themeName) {\n\t\tawait loadThemeBase(theme);\n\t} else {\n\t\tdeleteThemeBase();\n\t}\n\n\t// Always load component packages properties. For non-registered themes, try with the base theme, if any\n\tconst packagesTheme = isThemeRegistered(theme) ? theme : extTheme && extTheme.baseThemeName;\n\tawait loadComponentPackages(packagesTheme || DEFAULT_THEME, extTheme && extTheme.themeName === theme ? theme : undefined);\n\n\tfireThemeLoaded(theme);\n};\n\nexport default applyTheme;\n"]}
@@ -5,5 +5,5 @@ import UI5Element from "../UI5Element.js";
5
5
  * @param ElementClass
6
6
  * @returns {*}
7
7
  */
8
- declare const getConstructableStyle: (ElementClass: typeof UI5Element, forStaticArea?: boolean) => CSSStyleSheet[];
8
+ declare const getConstructableStyle: (ElementClass: typeof UI5Element) => CSSStyleSheet[];
9
9
  export default getConstructableStyle;
@@ -10,11 +10,11 @@ attachCustomCSSChange((tag) => {
10
10
  * @param ElementClass
11
11
  * @returns {*}
12
12
  */
13
- const getConstructableStyle = (ElementClass, forStaticArea = false) => {
13
+ const getConstructableStyle = (ElementClass) => {
14
14
  const tag = ElementClass.getMetadata().getTag();
15
- const key = `${tag}_${forStaticArea ? "static" : "normal"}`;
15
+ const key = `${tag}_normal`;
16
16
  if (!constructableStyleMap.has(key)) {
17
- const styleContent = getEffectiveStyle(ElementClass, forStaticArea);
17
+ const styleContent = getEffectiveStyle(ElementClass);
18
18
  const style = new CSSStyleSheet();
19
19
  style.replaceSync(styleContent);
20
20
  constructableStyleMap.set(key, [style]);
@@ -1 +1 @@
1
- {"version":3,"file":"getConstructableStyle.js","sourceRoot":"","sources":["../../src/theming/getConstructableStyle.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAAgC,CAAC;AAEtE,qBAAqB,CAAC,CAAC,GAAW,EAAE,EAAE;IACrC,qBAAqB,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,kFAAkF;AAClI,CAAC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,qBAAqB,GAAG,CAAC,YAA+B,EAAE,aAAa,GAAG,KAAK,EAAE,EAAE;IACxF,MAAM,GAAG,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC;IAChD,MAAM,GAAG,GAAG,GAAG,GAAG,IAAI,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC;IAE5D,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACpC,MAAM,YAAY,GAAG,iBAAiB,CAAC,YAAY,EAAE,aAAa,CAAC,CAAC;QACpE,MAAM,KAAK,GAAG,IAAI,aAAa,EAAE,CAAC;QAClC,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAChC,qBAAqB,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;KACxC;IAED,OAAO,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;AACxC,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import getEffectiveStyle from \"./getEffectiveStyle.js\";\nimport { attachCustomCSSChange } from \"./CustomStyle.js\";\nimport UI5Element from \"../UI5Element.js\";\n\nconst constructableStyleMap = new Map<string, Array<CSSStyleSheet>>();\n\nattachCustomCSSChange((tag: string) => {\n\tconstructableStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part\n});\n\n/**\n * Returns (and caches) a constructable style sheet for a web component class\n * Note: Chrome\n * @param ElementClass\n * @returns {*}\n */\nconst getConstructableStyle = (ElementClass: typeof UI5Element, forStaticArea = false) => {\n\tconst tag = ElementClass.getMetadata().getTag();\n\tconst key = `${tag}_${forStaticArea ? \"static\" : \"normal\"}`;\n\n\tif (!constructableStyleMap.has(key)) {\n\t\tconst styleContent = getEffectiveStyle(ElementClass, forStaticArea);\n\t\tconst style = new CSSStyleSheet();\n\t\tstyle.replaceSync(styleContent);\n\t\tconstructableStyleMap.set(key, [style]);\n\t}\n\n\treturn constructableStyleMap.get(key)!;\n};\n\nexport default getConstructableStyle;\n"]}
1
+ {"version":3,"file":"getConstructableStyle.js","sourceRoot":"","sources":["../../src/theming/getConstructableStyle.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAGzD,MAAM,qBAAqB,GAAG,IAAI,GAAG,EAAgC,CAAC;AAEtE,qBAAqB,CAAC,CAAC,GAAW,EAAE,EAAE;IACrC,qBAAqB,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,kFAAkF;AAClI,CAAC,CAAC,CAAC;AAEH;;;;;GAKG;AACH,MAAM,qBAAqB,GAAG,CAAC,YAA+B,EAAE,EAAE;IACjE,MAAM,GAAG,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC;IAChD,MAAM,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC;IAE5B,IAAI,CAAC,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QACpC,MAAM,YAAY,GAAG,iBAAiB,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,IAAI,aAAa,EAAE,CAAC;QAClC,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAChC,qBAAqB,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;KACxC;IAED,OAAO,qBAAqB,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC;AACxC,CAAC,CAAC;AAEF,eAAe,qBAAqB,CAAC","sourcesContent":["import getEffectiveStyle from \"./getEffectiveStyle.js\";\nimport { attachCustomCSSChange } from \"./CustomStyle.js\";\nimport UI5Element from \"../UI5Element.js\";\n\nconst constructableStyleMap = new Map<string, Array<CSSStyleSheet>>();\n\nattachCustomCSSChange((tag: string) => {\n\tconstructableStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part\n});\n\n/**\n * Returns (and caches) a constructable style sheet for a web component class\n * Note: Chrome\n * @param ElementClass\n * @returns {*}\n */\nconst getConstructableStyle = (ElementClass: typeof UI5Element) => {\n\tconst tag = ElementClass.getMetadata().getTag();\n\tconst key = `${tag}_normal`;\n\n\tif (!constructableStyleMap.has(key)) {\n\t\tconst styleContent = getEffectiveStyle(ElementClass);\n\t\tconst style = new CSSStyleSheet();\n\t\tstyle.replaceSync(styleContent);\n\t\tconstructableStyleMap.set(key, [style]);\n\t}\n\n\treturn constructableStyleMap.get(key)!;\n};\n\nexport default getConstructableStyle;\n"]}
@@ -1,3 +1,3 @@
1
1
  import type UI5Element from "../UI5Element.js";
2
- declare const getEffectiveStyle: (ElementClass: typeof UI5Element, forStaticArea?: boolean) => string;
2
+ declare const getEffectiveStyle: (ElementClass: typeof UI5Element) => string;
3
3
  export default getEffectiveStyle;
@@ -5,25 +5,18 @@ const effectiveStyleMap = new Map();
5
5
  attachCustomCSSChange((tag) => {
6
6
  effectiveStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part
7
7
  });
8
- const getEffectiveStyle = (ElementClass, forStaticArea = false) => {
8
+ const getEffectiveStyle = (ElementClass) => {
9
9
  const tag = ElementClass.getMetadata().getTag();
10
- const key = `${tag}_${forStaticArea ? "static" : "normal"}`;
10
+ const key = `${tag}_normal`;
11
11
  const openUI5Enablement = getFeature("OpenUI5Enablement");
12
12
  if (!effectiveStyleMap.has(key)) {
13
- let effectiveStyle;
14
13
  let busyIndicatorStyles = "";
15
14
  if (openUI5Enablement) {
16
15
  busyIndicatorStyles = getStylesString(openUI5Enablement.getBusyIndicatorStyles());
17
16
  }
18
- if (forStaticArea) {
19
- effectiveStyle = getStylesString(ElementClass.staticAreaStyles);
20
- }
21
- else {
22
- const customStyle = getCustomCSS(tag) || "";
23
- const builtInStyles = getStylesString(ElementClass.styles);
24
- effectiveStyle = `${builtInStyles} ${customStyle}`;
25
- }
26
- effectiveStyle = `${effectiveStyle} ${busyIndicatorStyles}`;
17
+ const customStyle = getCustomCSS(tag) || "";
18
+ const builtInStyles = getStylesString(ElementClass.styles);
19
+ const effectiveStyle = `${builtInStyles} ${customStyle} ${busyIndicatorStyles}`;
27
20
  effectiveStyleMap.set(key, effectiveStyle);
28
21
  }
29
22
  return effectiveStyleMap.get(key); // The key is guaranteed to exist
@@ -1 +1 @@
1
- {"version":3,"file":"getEffectiveStyle.js","sourceRoot":"","sources":["../../src/theming/getEffectiveStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIpD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;A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sourcesContent":["import { getCustomCSS, attachCustomCSSChange } from \"./CustomStyle.js\";\nimport getStylesString from \"./getStylesString.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport OpenUI5Enablement from \"../features/OpenUI5Enablement.js\";\n\nconst effectiveStyleMap = new Map<string, string>();\n\nattachCustomCSSChange((tag: string) => {\n\teffectiveStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part\n});\n\nconst getEffectiveStyle = (ElementClass: typeof UI5Element, forStaticArea = false) => {\n\tconst tag = ElementClass.getMetadata().getTag();\n\tconst key = `${tag}_${forStaticArea ? \"static\" : \"normal\"}`;\n\tconst openUI5Enablement = getFeature<typeof OpenUI5Enablement>(\"OpenUI5Enablement\");\n\n\tif (!effectiveStyleMap.has(key)) {\n\t\tlet effectiveStyle;\n\t\tlet busyIndicatorStyles = \"\";\n\n\t\tif (openUI5Enablement) {\n\t\t\tbusyIndicatorStyles = getStylesString(openUI5Enablement.getBusyIndicatorStyles());\n\t\t}\n\n\t\tif (forStaticArea) {\n\t\t\teffectiveStyle = getStylesString(ElementClass.staticAreaStyles);\n\t\t} else {\n\t\t\tconst customStyle = getCustomCSS(tag) || \"\";\n\t\t\tconst builtInStyles = getStylesString(ElementClass.styles);\n\t\t\teffectiveStyle = `${builtInStyles} ${customStyle}`;\n\t\t}\n\n\t\teffectiveStyle = `${effectiveStyle} ${busyIndicatorStyles}`;\n\t\teffectiveStyleMap.set(key, effectiveStyle);\n\t}\n\n\treturn effectiveStyleMap.get(key)!; // The key is guaranteed to exist\n};\n\nexport default getEffectiveStyle;\n"]}
1
+ {"version":3,"file":"getEffectiveStyle.js","sourceRoot":"","sources":["../../src/theming/getEffectiveStyle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACvE,OAAO,eAAe,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAIpD,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEpD,qBAAqB,CAAC,CAAC,GAAW,EAAE,EAAE;IACrC,iBAAiB,CAAC,MAAM,CAAC,GAAG,GAAG,SAAS,CAAC,CAAC,CAAC,kFAAkF;AAC9H,CAAC,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,YAA+B,EAAE,EAAE;IAC7D,MAAM,GAAG,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,MAAM,EAAE,CAAC;IAChD,MAAM,GAAG,GAAG,GAAG,GAAG,SAAS,CAAC;IAC5B,MAAM,iBAAiB,GAAG,UAAU,CAA2B,mBAAmB,CAAC,CAAC;IAEpF,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE;QAChC,IAAI,mBAAmB,GAAG,EAAE,CAAC;QAE7B,IAAI,iBAAiB,EAAE;YACtB,mBAAmB,GAAG,eAAe,CAAC,iBAAiB,CAAC,sBAAsB,EAAE,CAAC,CAAC;SAClF;QAED,MAAM,WAAW,GAAG,YAAY,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;QAC5C,MAAM,aAAa,GAAG,eAAe,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAE3D,MAAM,cAAc,GAAG,GAAG,aAAa,IAAI,WAAW,IAAI,mBAAmB,EAAE,CAAC;QAChF,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;KAC3C;IAED,OAAO,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAE,CAAC,CAAC,iCAAiC;AACtE,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC","sourcesContent":["import { getCustomCSS, attachCustomCSSChange } from \"./CustomStyle.js\";\nimport getStylesString from \"./getStylesString.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport OpenUI5Enablement from \"../features/OpenUI5Enablement.js\";\n\nconst effectiveStyleMap = new Map<string, string>();\n\nattachCustomCSSChange((tag: string) => {\n\teffectiveStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part\n});\n\nconst getEffectiveStyle = (ElementClass: typeof UI5Element) => {\n\tconst tag = ElementClass.getMetadata().getTag();\n\tconst key = `${tag}_normal`;\n\tconst openUI5Enablement = getFeature<typeof OpenUI5Enablement>(\"OpenUI5Enablement\");\n\n\tif (!effectiveStyleMap.has(key)) {\n\t\tlet busyIndicatorStyles = \"\";\n\n\t\tif (openUI5Enablement) {\n\t\t\tbusyIndicatorStyles = getStylesString(openUI5Enablement.getBusyIndicatorStyles());\n\t\t}\n\n\t\tconst customStyle = getCustomCSS(tag) || \"\";\n\t\tconst builtInStyles = getStylesString(ElementClass.styles);\n\n\t\tconst effectiveStyle = `${builtInStyles} ${customStyle} ${busyIndicatorStyles}`;\n\t\teffectiveStyleMap.set(key, effectiveStyle);\n\t}\n\n\treturn effectiveStyleMap.get(key)!; // The key is guaranteed to exist\n};\n\nexport default getEffectiveStyle;\n"]}
@@ -1,31 +1,23 @@
1
1
  /**
2
2
  * Different types of AnimationMode.
3
3
  *
4
- * @readonly
5
- * @enum {string}
6
4
  * @public
7
- * @author SAP SE
8
- * @alias sap.ui.webc.base.types.AnimationMode
9
5
  */
10
6
  declare enum AnimationMode {
11
7
  /**
12
8
  * @public
13
- * @type {Full}
14
9
  */
15
10
  Full = "full",
16
11
  /**
17
12
  * @public
18
- * @type {Basic}
19
13
  */
20
14
  Basic = "basic",
21
15
  /**
22
16
  * @public
23
- * @type {Minimal}
24
17
  */
25
18
  Minimal = "minimal",
26
19
  /**
27
20
  * @public
28
- * @type {None}
29
21
  */
30
22
  None = "none"
31
23
  }
@@ -1,32 +1,24 @@
1
1
  /**
2
2
  * Different types of AnimationMode.
3
3
  *
4
- * @readonly
5
- * @enum {string}
6
4
  * @public
7
- * @author SAP SE
8
- * @alias sap.ui.webc.base.types.AnimationMode
9
5
  */
10
6
  var AnimationMode;
11
7
  (function (AnimationMode) {
12
8
  /**
13
9
  * @public
14
- * @type {Full}
15
10
  */
16
11
  AnimationMode["Full"] = "full";
17
12
  /**
18
13
  * @public
19
- * @type {Basic}
20
14
  */
21
15
  AnimationMode["Basic"] = "basic";
22
16
  /**
23
17
  * @public
24
- * @type {Minimal}
25
18
  */
26
19
  AnimationMode["Minimal"] = "minimal";
27
20
  /**
28
21
  * @public
29
- * @type {None}
30
22
  */
31
23
  AnimationMode["None"] = "none";
32
24
  })(AnimationMode || (AnimationMode = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"AnimationMode.js","sourceRoot":"","sources":["../../src/types/AnimationMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,IAAK,aAqBJ;AArBD,WAAK,aAAa;IACjB;;;OAGG;IACH,8BAAa,CAAA;IACb;;;OAGG;IACH,gCAAe,CAAA;IACf;;;OAGG;IACH,oCAAmB,CAAA;IACnB;;;OAGG;IACH,8BAAa,CAAA;AACd,CAAC,EArBI,aAAa,KAAb,aAAa,QAqBjB;AAED,eAAe,aAAa,CAAC","sourcesContent":["/**\n * Different types of AnimationMode.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.base.types.AnimationMode\n */\nenum AnimationMode {\n\t/**\n\t * @public\n\t * @type {Full}\n\t */\n\tFull = \"full\",\n\t/**\n\t * @public\n\t * @type {Basic}\n\t */\n\tBasic = \"basic\",\n\t/**\n\t * @public\n\t * @type {Minimal}\n\t */\n\tMinimal = \"minimal\",\n\t/**\n\t * @public\n\t * @type {None}\n\t */\n\tNone = \"none\",\n}\n\nexport default AnimationMode;\n"]}
1
+ {"version":3,"file":"AnimationMode.js","sourceRoot":"","sources":["../../src/types/AnimationMode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,IAAK,aAiBJ;AAjBD,WAAK,aAAa;IACjB;;OAEG;IACH,8BAAa,CAAA;IACb;;OAEG;IACH,gCAAe,CAAA;IACf;;OAEG;IACH,oCAAmB,CAAA;IACnB;;OAEG;IACH,8BAAa,CAAA;AACd,CAAC,EAjBI,aAAa,KAAb,aAAa,QAiBjB;AAED,eAAe,aAAa,CAAC","sourcesContent":["/**\n * Different types of AnimationMode.\n *\n * @public\n */\nenum AnimationMode {\n\t/**\n\t * @public\n\t */\n\tFull = \"full\",\n\t/**\n\t * @public\n\t */\n\tBasic = \"basic\",\n\t/**\n\t * @public\n\t */\n\tMinimal = \"minimal\",\n\t/**\n\t * @public\n\t */\n\tNone = \"none\",\n}\n\nexport default AnimationMode;\n"]}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Different types of ARIA hasPopup.
3
+ * @public
4
+ */
5
+ declare enum AriaHasPopup {
6
+ /**
7
+ * Dialog popup type.
8
+ * @public
9
+ */
10
+ Dialog = "Dialog",
11
+ /**
12
+ * Grid popup type.
13
+ * @public
14
+ */
15
+ Grid = "Grid",
16
+ /**
17
+ * ListBox popup type.
18
+ * @public
19
+ */
20
+ ListBox = "ListBox",
21
+ /**
22
+ * Menu popup type.
23
+ * @public
24
+ */
25
+ Menu = "Menu",
26
+ /**
27
+ * Tree popup type.
28
+ * @public
29
+ */
30
+ Tree = "Tree"
31
+ }
32
+ export default AriaHasPopup;
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Different types of ARIA hasPopup.
3
+ * @public
4
+ */
5
+ var AriaHasPopup;
6
+ (function (AriaHasPopup) {
7
+ /**
8
+ * Dialog popup type.
9
+ * @public
10
+ */
11
+ AriaHasPopup["Dialog"] = "Dialog";
12
+ /**
13
+ * Grid popup type.
14
+ * @public
15
+ */
16
+ AriaHasPopup["Grid"] = "Grid";
17
+ /**
18
+ * ListBox popup type.
19
+ * @public
20
+ */
21
+ AriaHasPopup["ListBox"] = "ListBox";
22
+ /**
23
+ * Menu popup type.
24
+ * @public
25
+ */
26
+ AriaHasPopup["Menu"] = "Menu";
27
+ /**
28
+ * Tree popup type.
29
+ * @public
30
+ */
31
+ AriaHasPopup["Tree"] = "Tree";
32
+ })(AriaHasPopup || (AriaHasPopup = {}));
33
+ export default AriaHasPopup;
34
+ //# sourceMappingURL=AriaHasPopup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AriaHasPopup.js","sourceRoot":"","sources":["../../src/types/AriaHasPopup.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,IAAK,YA8BJ;AA9BD,WAAK,YAAY;IAChB;;;OAGG;IACH,iCAAiB,CAAA;IAEjB;;;OAGG;IACH,6BAAa,CAAA;IAEb;;;OAGG;IACH,mCAAmB,CAAA;IAElB;;;OAGG;IACJ,6BAAa,CAAA;IAEZ;;;OAGG;IACJ,6BAAa,CAAA;AACd,CAAC,EA9BI,YAAY,KAAZ,YAAY,QA8BhB;AAED,eAAe,YAAY,CAAC","sourcesContent":["/**\n * Different types of ARIA hasPopup.\n * @public\n */\nenum AriaHasPopup {\n\t/**\n\t * Dialog popup type.\n\t * @public\n\t */\n\tDialog = \"Dialog\",\n\n\t/**\n\t * Grid popup type.\n\t * @public\n\t */\n\tGrid = \"Grid\",\n\n\t/**\n\t * ListBox popup type.\n\t * @public\n\t */\n\tListBox = \"ListBox\",\n\n\t /**\n\t * Menu popup type.\n\t * @public\n\t */\n\tMenu = \"Menu\",\n\n\t /**\n\t * Tree popup type.\n\t * @public\n\t */\n\tTree = \"Tree\",\n}\n\nexport default AriaHasPopup;\n"]}