@ui5/webcomponents-base 0.0.0-41ab6cd28 → 0.0.0-4237771ff

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 (124) hide show
  1. package/CHANGELOG.md +394 -0
  2. package/README.md +2 -1
  3. package/dist/.tsbuildinfo +1 -0
  4. package/dist/AssetRegistry.d.ts +2 -2
  5. package/dist/AssetRegistry.js +2 -2
  6. package/dist/AssetRegistry.js.map +1 -1
  7. package/dist/Boot.js +1 -1
  8. package/dist/Boot.js.map +1 -1
  9. package/dist/CustomElementsScope.d.ts +4 -4
  10. package/dist/CustomElementsScope.js +2 -2
  11. package/dist/CustomElementsScope.js.map +1 -1
  12. package/dist/CustomElementsScopeUtils.d.ts +8 -1
  13. package/dist/CustomElementsScopeUtils.js +13 -1
  14. package/dist/CustomElementsScopeUtils.js.map +1 -1
  15. package/dist/Device.d.ts +2 -1
  16. package/dist/Device.js +10 -1
  17. package/dist/Device.js.map +1 -1
  18. package/dist/FontFace.js +1 -1
  19. package/dist/FontFace.js.map +1 -1
  20. package/dist/InitialConfiguration.d.ts +2 -1
  21. package/dist/InitialConfiguration.js +7 -2
  22. package/dist/InitialConfiguration.js.map +1 -1
  23. package/dist/Keys.d.ts +5 -1
  24. package/dist/Keys.js +109 -106
  25. package/dist/Keys.js.map +1 -1
  26. package/dist/ManagedStyles.d.ts +5 -4
  27. package/dist/ManagedStyles.js +92 -23
  28. package/dist/ManagedStyles.js.map +1 -1
  29. package/dist/StaticAreaItem.d.ts +1 -0
  30. package/dist/StaticAreaItem.js +7 -7
  31. package/dist/StaticAreaItem.js.map +1 -1
  32. package/dist/UI5Element.d.ts +16 -2
  33. package/dist/UI5Element.js +31 -15
  34. package/dist/UI5Element.js.map +1 -1
  35. package/dist/UI5ElementMetadata.d.ts +1 -0
  36. package/dist/UI5ElementMetadata.js +2 -2
  37. package/dist/UI5ElementMetadata.js.map +1 -1
  38. package/dist/api.json +1 -1
  39. package/dist/asset-registries/Icons.d.ts +4 -3
  40. package/dist/asset-registries/Icons.js +28 -17
  41. package/dist/asset-registries/Icons.js.map +1 -1
  42. package/dist/asset-registries/Illustrations.d.ts +1 -0
  43. package/dist/asset-registries/Illustrations.js +57 -19
  44. package/dist/asset-registries/Illustrations.js.map +1 -1
  45. package/dist/asset-registries/Themes.d.ts +4 -3
  46. package/dist/asset-registries/Themes.js +26 -10
  47. package/dist/asset-registries/Themes.js.map +1 -1
  48. package/dist/asset-registries/i18n.js +2 -1
  49. package/dist/asset-registries/i18n.js.map +1 -1
  50. package/dist/{assets-meta → asset-registries/util}/IconCollectionsAlias.d.ts +1 -2
  51. package/dist/{assets-meta → asset-registries/util}/IconCollectionsAlias.js +1 -2
  52. package/dist/asset-registries/util/IconCollectionsAlias.js.map +1 -0
  53. package/dist/asset-registries/util/IconCollectionsByTheme.d.ts +20 -0
  54. package/dist/asset-registries/util/IconCollectionsByTheme.js +42 -0
  55. package/dist/asset-registries/util/IconCollectionsByTheme.js.map +1 -0
  56. package/dist/asset-registries/util/getIconCollectionByTheme.d.ts +13 -0
  57. package/dist/asset-registries/util/getIconCollectionByTheme.js +29 -0
  58. package/dist/asset-registries/util/getIconCollectionByTheme.js.map +1 -0
  59. package/dist/config/CalendarType.d.ts +8 -1
  60. package/dist/config/CalendarType.js +18 -2
  61. package/dist/config/CalendarType.js.map +1 -1
  62. package/dist/config/Icons.d.ts +2 -17
  63. package/dist/config/Icons.js +1 -60
  64. package/dist/config/Icons.js.map +1 -1
  65. package/dist/connectToComponent.d.ts +9 -0
  66. package/dist/connectToComponent.js +59 -0
  67. package/dist/connectToComponent.js.map +1 -0
  68. package/dist/css/FontFace.css +47 -17
  69. package/dist/delegate/ItemNavigation.d.ts +1 -0
  70. package/dist/delegate/ItemNavigation.js +4 -5
  71. package/dist/delegate/ItemNavigation.js.map +1 -1
  72. package/dist/delegate/ScrollEnablement.js +2 -2
  73. package/dist/delegate/ScrollEnablement.js.map +1 -1
  74. package/dist/features/OpenUI5Enablement.d.ts +1 -1
  75. package/dist/features/OpenUI5Support.d.ts +13 -3
  76. package/dist/features/OpenUI5Support.js +89 -33
  77. package/dist/features/OpenUI5Support.js.map +1 -1
  78. package/dist/generated/AssetParameters.d.ts +6 -0
  79. package/dist/generated/AssetParameters.js +3 -10
  80. package/dist/generated/AssetParameters.js.map +1 -0
  81. package/dist/generated/VersionInfo.d.ts +10 -0
  82. package/dist/generated/VersionInfo.js +9 -8
  83. package/dist/generated/VersionInfo.js.map +1 -0
  84. package/dist/generated/css/FontFace.css.js +1 -1
  85. package/dist/generated/css/FontFace.css.js.map +1 -1
  86. package/dist/generated/templates/elements/WithComplexTemplateTemplate.lit.d.ts +1 -1
  87. package/dist/i18nBundle.d.ts +1 -1
  88. package/dist/i18nBundle.js.map +1 -1
  89. package/dist/renderer/LitRenderer.d.ts +2 -2
  90. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +111 -96
  91. package/dist/theming/applyTheme.js +5 -5
  92. package/dist/theming/applyTheme.js.map +1 -1
  93. package/dist/types/CSSSize.d.ts +15 -0
  94. package/dist/types/CSSSize.js +18 -0
  95. package/dist/types/CSSSize.js.map +1 -0
  96. package/dist/types/InvisibleMessageMode.d.ts +5 -4
  97. package/dist/types/InvisibleMessageMode.js +4 -5
  98. package/dist/types/InvisibleMessageMode.js.map +1 -1
  99. package/dist/updateShadowRoot.js +2 -1
  100. package/dist/updateShadowRoot.js.map +1 -1
  101. package/dist/util/ColorConversion.js +200 -195
  102. package/dist/util/ColorConversion.js.map +1 -1
  103. package/dist/util/InvisibleMessage.d.ts +1 -1
  104. package/dist/util/InvisibleMessage.js.map +1 -1
  105. package/dist/util/PopupUtils.js +1 -1
  106. package/dist/util/PopupUtils.js.map +1 -1
  107. package/dist/util/getClassCopy.d.ts +47 -31
  108. package/dist/util/getParentElement.d.ts +2 -0
  109. package/dist/util/getParentElement.js +5 -0
  110. package/dist/util/getParentElement.js.map +1 -0
  111. package/dist/util/isElementContainingBlock.d.ts +2 -0
  112. package/dist/util/isElementContainingBlock.js +11 -0
  113. package/dist/util/isElementContainingBlock.js.map +1 -0
  114. package/index.js +3 -3
  115. package/lib/generate-asset-parameters/index.js +2 -2
  116. package/lib/generate-version-info/index.js +2 -2
  117. package/package-scripts.cjs +6 -7
  118. package/package.json +8 -5
  119. package/src/css/FontFace.css +47 -17
  120. package/tsconfig.json +3 -0
  121. package/dist/assets/Boot.34b7cea0.css +0 -1
  122. package/dist/assets/Boot.e98db706.js +0 -9
  123. package/dist/assets/bundle.esm.027ecc55.js +0 -50
  124. package/dist/assets-meta/IconCollectionsAlias.js.map +0 -1
@@ -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
  }
@@ -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,wBAAw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Content":["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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CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IAE1H,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, 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"]}
@@ -0,0 +1,15 @@
1
+ import DataType from "./DataType.js";
2
+ /**
3
+ * @class
4
+ * CSSSize data type.
5
+ *
6
+ * @extends sap.ui.webc.base.types.DataType
7
+ * @constructor
8
+ * @author SAP SE
9
+ * @alias sap.ui.webc.base.types.CSSSize
10
+ * @public
11
+ */
12
+ declare class CSSSize extends DataType {
13
+ static isValid(value: string): boolean;
14
+ }
15
+ export default CSSSize;
@@ -0,0 +1,18 @@
1
+ import DataType from "./DataType.js";
2
+ /**
3
+ * @class
4
+ * CSSSize data type.
5
+ *
6
+ * @extends sap.ui.webc.base.types.DataType
7
+ * @constructor
8
+ * @author SAP SE
9
+ * @alias sap.ui.webc.base.types.CSSSize
10
+ * @public
11
+ */
12
+ class CSSSize extends DataType {
13
+ static isValid(value) {
14
+ return /^(auto|inherit|[-+]?(0*|([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%))|calc\(\s*(\(\s*)*[-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)(\s*(\)\s*)*(\s[-+]\s|[*\/])\s*(\(\s*)*([-+]?(([0-9]+|[0-9]*\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)))*\s*(\)\s*)*\))$/.test(value); // eslint-disable-line
15
+ }
16
+ }
17
+ export default CSSSize;
18
+ //# sourceMappingURL=CSSSize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CSSSize.js","sourceRoot":"","sources":["../../src/types/CSSSize.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;;;;;;;;GASG;AACH,MAAM,OAAQ,SAAQ,QAAQ;IAC7B,MAAM,CAAC,OAAO,CAAC,KAAa;QAC3B,OAAO,ocAAoc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,sBAAsB;IAChf,CAAC;CACD;AAED,eAAe,OAAO,CAAC","sourcesContent":["import DataType from \"./DataType.js\";\n\n/**\n * @class\n * CSSSize data type.\n *\n * @extends sap.ui.webc.base.types.DataType\n * @constructor\n * @author SAP SE\n * @alias sap.ui.webc.base.types.CSSSize\n * @public\n */\nclass CSSSize extends DataType {\n\tstatic isValid(value: string) {\n\t\treturn /^(auto|inherit|[-+]?(0*|([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%))|calc\\(\\s*(\\(\\s*)*[-+]?(([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)(\\s*(\\)\\s*)*(\\s[-+]\\s|[*\\/])\\s*(\\(\\s*)*([-+]?(([0-9]+|[0-9]*\\.[0-9]+)([rR][eE][mM]|[eE][mM]|[eE][xX]|[pP][xX]|[cC][mM]|[mM][mM]|[iI][nN]|[pP][tT]|[pP][cC]|%)?)))*\\s*(\\)\\s*)*\\))$/.test(value); // eslint-disable-line\n\t}\n}\n\nexport default CSSSize;\n"]}
@@ -7,19 +7,20 @@
7
7
  * @author SAP SE
8
8
  * @alias sap.ui.webc.base.types.InvisibleMessageMode
9
9
  */
10
- declare enum InvisibleMessageMode {
10
+ declare const InvisibleMessageMode: {
11
11
  /**
12
12
  * Indicates that updates to the region should be presented at the next graceful opportunity,
13
13
  * such as at the end of reading the current sentence, or when the user pauses typing.
14
14
  * @public
15
15
  * @type {Polite}
16
16
  */
17
- Polite = "Polite",
17
+ readonly Polite: "Polite";
18
18
  /**
19
19
  * Indicates that updates to the region have the highest priority and should be presented to the user immediately.
20
20
  * @public
21
21
  * @type {Assertive}
22
22
  */
23
- Assertive = "Assertive"
24
- }
23
+ readonly Assertive: "Assertive";
24
+ };
25
+ type InvisibleMessageMode = typeof InvisibleMessageMode[keyof typeof InvisibleMessageMode];
25
26
  export default InvisibleMessageMode;
@@ -7,21 +7,20 @@
7
7
  * @author SAP SE
8
8
  * @alias sap.ui.webc.base.types.InvisibleMessageMode
9
9
  */
10
- var InvisibleMessageMode;
11
- (function (InvisibleMessageMode) {
10
+ const InvisibleMessageMode = {
12
11
  /**
13
12
  * Indicates that updates to the region should be presented at the next graceful opportunity,
14
13
  * such as at the end of reading the current sentence, or when the user pauses typing.
15
14
  * @public
16
15
  * @type {Polite}
17
16
  */
18
- InvisibleMessageMode["Polite"] = "Polite";
17
+ Polite: "Polite",
19
18
  /**
20
19
  * Indicates that updates to the region have the highest priority and should be presented to the user immediately.
21
20
  * @public
22
21
  * @type {Assertive}
23
22
  */
24
- InvisibleMessageMode["Assertive"] = "Assertive";
25
- })(InvisibleMessageMode || (InvisibleMessageMode = {}));
23
+ Assertive: "Assertive",
24
+ };
26
25
  export default InvisibleMessageMode;
27
26
  //# sourceMappingURL=InvisibleMessageMode.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InvisibleMessageMode.js","sourceRoot":"","sources":["../../src/types/InvisibleMessageMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,IAAK,oBAeJ;AAfD,WAAK,oBAAoB;IACxB;;;;;OAKM;IACN,yCAAiB,CAAA;IAEjB;;;;OAIM;IACN,+CAAuB,CAAA;AACxB,CAAC,EAfI,oBAAoB,KAApB,oBAAoB,QAexB;AAED,eAAe,oBAAoB,CAAC","sourcesContent":["/**\n * Enumeration for different mode behaviors of the InvisibleMessage.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.base.types.InvisibleMessageMode\n */\nenum InvisibleMessageMode {\n\t/**\n * Indicates that updates to the region should be presented at the next graceful opportunity,\n * such as at the end of reading the current sentence, or when the user pauses typing.\n\t * @public\n\t * @type {Polite}\n */\n\tPolite = \"Polite\",\n\n\t/**\n * Indicates that updates to the region have the highest priority and should be presented to the user immediately.\n\t * @public\n\t * @type {Assertive}\n */\n\tAssertive = \"Assertive\",\n}\n\nexport default InvisibleMessageMode;\n"]}
1
+ {"version":3,"file":"InvisibleMessageMode.js","sourceRoot":"","sources":["../../src/types/InvisibleMessageMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,oBAAoB,GAAG;IAC5B;;;;;OAKM;IACN,MAAM,EAAE,QAAQ;IAEhB;;;;OAIM;IACN,SAAS,EAAE,WAAW;CACb,CAAC;AAIX,eAAe,oBAAoB,CAAC","sourcesContent":["/**\n * Enumeration for different mode behaviors of the InvisibleMessage.\n *\n * @readonly\n * @enum {string}\n * @public\n * @author SAP SE\n * @alias sap.ui.webc.base.types.InvisibleMessageMode\n */\nconst InvisibleMessageMode = {\n\t/**\n * Indicates that updates to the region should be presented at the next graceful opportunity,\n * such as at the end of reading the current sentence, or when the user pauses typing.\n\t * @public\n\t * @type {Polite}\n */\n\tPolite: \"Polite\",\n\n\t/**\n * Indicates that updates to the region have the highest priority and should be presented to the user immediately.\n\t * @public\n\t * @type {Assertive}\n */\n\tAssertive: \"Assertive\",\n} as const;\n\ntype InvisibleMessageMode = typeof InvisibleMessageMode[keyof typeof InvisibleMessageMode];\n\nexport default InvisibleMessageMode;\n"]}
@@ -2,6 +2,7 @@ import getConstructableStyle from "./theming/getConstructableStyle.js";
2
2
  import getEffectiveStyle from "./theming/getEffectiveStyle.js";
3
3
  import getEffectiveLinksHrefs from "./theming/getEffectiveLinksHrefs.js";
4
4
  import { shouldUseLinks } from "./CSP.js";
5
+ import { isSafari } from "./Device.js";
5
6
  /**
6
7
  * Updates the shadow root of a UI5Element or its static area item
7
8
  * @param element
@@ -25,7 +26,7 @@ const updateShadowRoot = (element, forStaticArea = false) => {
25
26
  if (shouldUseLinks()) {
26
27
  styleStrOrHrefsArr = getEffectiveLinksHrefs(ctor, forStaticArea);
27
28
  }
28
- else if (document.adoptedStyleSheets) { // Chrome
29
+ else if (document.adoptedStyleSheets && !isSafari()) { // Chrome
29
30
  shadowRoot.adoptedStyleSheets = getConstructableStyle(ctor, forStaticArea);
30
31
  }
31
32
  else { // FF, Safari
@@ -1 +1 @@
1
- {"version":3,"file":"updateShadowRo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kBAAkB,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9F,OAAO;KACP;IAED,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAC7F,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport getEffectiveStyle from \"./theming/getEffectiveStyle.js\";\nimport getEffectiveLinksHrefs from \"./theming/getEffectiveLinksHrefs.js\";\nimport { shouldUseLinks } from \"./CSP.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n * @param forStaticArea\n */\nconst updateShadowRoot = (element: UI5Element, forStaticArea = false) => {\n\tlet styleStrOrHrefsArr;\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst shadowRoot = forStaticArea ? element.staticAreaItem!.shadowRoot : element.shadowRoot;\n\tlet renderResult;\n\tif (forStaticArea) {\n\t\trenderResult = element.renderStatic(); // this is checked before calling updateShadowRoot\n\t} else {\n\t\trenderResult = element.render(); // this is checked before calling updateShadowRoot\n\t}\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (shouldUseLinks()) {\n\t\tstyleStrOrHrefsArr = getEffectiveLinksHrefs(ctor, forStaticArea);\n\t} else if (document.adoptedStyleSheets) { // Chrome\n\t\tshadowRoot.adoptedStyleSheets = getConstructableStyle(ctor, forStaticArea);\n\t} else { // FF, Safari\n\t\tstyleStrOrHrefsArr = getEffectiveStyle(ctor, forStaticArea);\n\t}\n\n\tif (ctor.renderer) {\n\t\tctor.renderer(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });\n\t\treturn;\n\t}\n\n\tctor.render(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });\n};\n\nexport default updateShadowRoot;\n"]}
1
+ {"version":3,"file":"updateShadowRoot.js","sourceRoot":"","sources":["../src/updateShadowRoot.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,MAAM,oCAAoC,CAAC;AACvE,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAC/D,OAAO,sBAAsB,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;GAIG;AACH,MAAM,gBAAgB,GAAG,CAAC,OAAmB,EAAE,aAAa,GAAG,KAAK,EAAE,EAAE;IACvE,IAAI,kBAAkB,CAAC;IACvB,MAAM,IAAI,GAAG,OAAO,CAAC,WAAgC,CAAC;IACtD,MAAM,UAAU,GAAG,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,cAAe,CAAC,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,UAAU,CAAC;IAC3F,IAAI,YAAY,CAAC;IACjB,IAAI,aAAa,EAAE;QAClB,YAAY,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,kDAAkD;KACzF;SAAM;QACN,YAAY,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,kDAAkD;KACnF;IAED,IAAI,CAAC,UAAU,EAAE;QAChB,OAAO,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC,CAAC,sBAAsB;QACzE,OAAO;KACP;IAED,IAAI,cAAc,EAAE,EAAE;QACrB,kBAAkB,GAAG,sBAAsB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KACjE;SAAM,IAAI,QAAQ,CAAC,kBAAkB,IAAI,CAAC,QAAQ,EAAE,EAAE,EAAE,SAAS;QACjE,UAAU,CAAC,kBAAkB,GAAG,qBAAqB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KAC3E;SAAM,EAAE,aAAa;QACrB,kBAAkB,GAAG,iBAAiB,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC;KAC5D;IAED,IAAI,IAAI,CAAC,QAAQ,EAAE;QAClB,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;QAC9F,OAAO;KACP;IAED,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;AAC7F,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC","sourcesContent":["import getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport getEffectiveStyle from \"./theming/getEffectiveStyle.js\";\nimport getEffectiveLinksHrefs from \"./theming/getEffectiveLinksHrefs.js\";\nimport { shouldUseLinks } from \"./CSP.js\";\nimport type UI5Element from \"./UI5Element.js\";\nimport { isSafari } from \"./Device.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n * @param forStaticArea\n */\nconst updateShadowRoot = (element: UI5Element, forStaticArea = false) => {\n\tlet styleStrOrHrefsArr;\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst shadowRoot = forStaticArea ? element.staticAreaItem!.shadowRoot : element.shadowRoot;\n\tlet renderResult;\n\tif (forStaticArea) {\n\t\trenderResult = element.renderStatic(); // this is checked before calling updateShadowRoot\n\t} else {\n\t\trenderResult = element.render(); // this is checked before calling updateShadowRoot\n\t}\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tif (shouldUseLinks()) {\n\t\tstyleStrOrHrefsArr = getEffectiveLinksHrefs(ctor, forStaticArea);\n\t} else if (document.adoptedStyleSheets && !isSafari()) { // Chrome\n\t\tshadowRoot.adoptedStyleSheets = getConstructableStyle(ctor, forStaticArea);\n\t} else { // FF, Safari\n\t\tstyleStrOrHrefsArr = getEffectiveStyle(ctor, forStaticArea);\n\t}\n\n\tif (ctor.renderer) {\n\t\tctor.renderer(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });\n\t\treturn;\n\t}\n\n\tctor.render(renderResult, shadowRoot, styleStrOrHrefsArr, forStaticArea, { host: element });\n};\n\nexport default updateShadowRoot;\n"]}