@ui5/webcomponents-base 2.21.0-rc.2 → 2.21.0-rc.4

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 (41) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/.tsbuildinfobuild +1 -1
  3. package/dist/asset-registries/Icons.d.ts +1 -0
  4. package/dist/asset-registries/Icons.js +1 -0
  5. package/dist/asset-registries/Icons.js.map +1 -1
  6. package/dist/custom-elements-internal.json +132 -117
  7. package/dist/custom-elements.json +132 -117
  8. package/dist/generated/VersionInfo.js +3 -3
  9. package/dist/generated/VersionInfo.js.map +1 -1
  10. package/dist/prod/asset-registries/Icons.js +1 -1
  11. package/dist/prod/asset-registries/Icons.js.map +2 -2
  12. package/dist/prod/generated/VersionInfo.js +1 -1
  13. package/dist/prod/generated/VersionInfo.js.map +1 -1
  14. package/dist/prod/sap/base/Log.js +15 -29
  15. package/dist/prod/sap/base/assert.js +1 -1
  16. package/dist/prod/sap/base/config/MemoryConfigurationProvider.js +1 -1
  17. package/dist/prod/sap/base/security/URLListValidator.js +9 -5
  18. package/dist/prod/sap/base/security/encodeCSS.js +1 -1
  19. package/dist/prod/sap/base/security/encodeXML.js +1 -1
  20. package/dist/prod/sap/base/security/sanitizeHTML.js +1 -1
  21. package/dist/prod/sap/base/strings/toHex.js +1 -1
  22. package/dist/prod/sap/base/util/now.js +7 -13
  23. package/dist/prod/sap/base/util/uid.js +1 -1
  24. package/dist/prod/sap/ui/thirdparty/caja-html-sanitizer.js +15 -3
  25. package/dist/prod/util/generateHighlightedMarkupFirstMatch.js +2 -0
  26. package/dist/prod/util/generateHighlightedMarkupFirstMatch.js.map +7 -0
  27. package/dist/sap/base/Log.js +15 -29
  28. package/dist/sap/base/assert.js +1 -1
  29. package/dist/sap/base/config/MemoryConfigurationProvider.js +1 -1
  30. package/dist/sap/base/security/URLListValidator.js +9 -5
  31. package/dist/sap/base/security/encodeCSS.js +1 -1
  32. package/dist/sap/base/security/encodeXML.js +1 -1
  33. package/dist/sap/base/security/sanitizeHTML.js +1 -1
  34. package/dist/sap/base/strings/toHex.js +1 -1
  35. package/dist/sap/base/util/now.js +7 -13
  36. package/dist/sap/base/util/uid.js +1 -1
  37. package/dist/sap/ui/thirdparty/caja-html-sanitizer.js +15 -3
  38. package/dist/util/generateHighlightedMarkupFirstMatch.d.ts +10 -0
  39. package/dist/util/generateHighlightedMarkupFirstMatch.js +36 -0
  40. package/dist/util/generateHighlightedMarkupFirstMatch.js.map +1 -0
  41. package/package.json +4 -4
@@ -10,6 +10,7 @@ type CollectionData = {
10
10
  path?: string;
11
11
  paths?: Array<string>;
12
12
  ltr?: boolean;
13
+ viewBox?: string;
13
14
  acc?: I18nText;
14
15
  }>;
15
16
  };
@@ -27,6 +27,7 @@ const _fillRegistry = (bundleData) => {
27
27
  registerIcon(iconName, {
28
28
  pathData: (iconData.path || iconData.paths),
29
29
  ltr: iconData.ltr,
30
+ viewBox: iconData.viewBox,
30
31
  accData: iconData.acc,
31
32
  collection: bundleData.collection,
32
33
  packageName: bundleData.packageName,
@@ -1 +1 @@
1
- {"version":3,"file":"Icons.js","sourceRoot":"","sources":["../../src/asset-registries/Icons.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,0BAA0B,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,MAAM,oBAAoB,GAAG,QAAQ,CAAC,CAAC,uBAAuB;AAkC9D,MAAM,OAAO,GAAG,IAAI,GAAG,EAAsB,CAAC;AAC9C,MAAM,QAAQ,GAAG,iBAAiB,CAAyC,mBAAmB,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AAC3G,MAAM,sBAAsB,GAAG,iB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,CAAC,WAAW,CAAC,CAAC;YAC7D,OAAO,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;QACD,OAAO,QAAQ,CAAC,OAAO,EAAE,WAAW,IAAI,EAAE,CAAC;IAC5C,CAAC;AACF,CAAC,CAAC;AAEF,uBAAuB;AACvB,MAAM,mBAAmB,GAAG,KAAK,IAAI,EAAE;IACtC,+DAA+D;IAC/D,MAAM,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,MAAM,WAAW,CAAC,WAAW,CAAC,CAAC;IAC/B,MAAM,WAAW,CAAC,mBAAmB,CAAC,CAAC;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,OAAO,EACN,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,GACnB,CAAC","sourcesContent":["import getSharedResource from \"../getSharedResource.js\";\nimport { getIconCollectionByAlias } from \"./util/IconCollectionsAlias.js\";\nimport { registerIconCollectionForTheme } from \"./util/IconCollectionsByTheme.js\";\nimport getEffectiveIconCollection from \"./util/getIconCollectionByTheme.js\";\nimport { getI18nBundle } from \"../i18nBundle.js\";\nimport type { I18nText } from \"../i18nBundle.js\";\nimport type { TemplateFunction } from \"../renderer/executeTemplate.js\";\n\nconst DEFAULT_THEME_FAMILY = \"legacy\"; // includes sap_fiori_*\n\ntype IconLoader = (collectionName: string) => Promise<CollectionData | Array<CollectionData>>;\n\ntype CollectionData = {\n\tcollection: string,\n\tpackageName: string,\n\tthemeFamily?: \"legacy\" | \"sap_horizon\",\n\tversion?: string,\n\tdata: Record<string, {\n\t\tpath?: string,\n\t\tpaths?: Array<string>,\n\t\tltr?: boolean,\n\t\tacc?: I18nText,\n\t}>,\n};\n\ntype IconDatabase = {\n\tcollection: string;\n\tpackageName?: string;\n\tviewBox?: string;\n\tltr?: boolean;\n\taccData?: I18nText;\n}\n\ntype IconData = IconDatabase & {\n\tpathData?: string | string[];\n\tcustomTemplate?: TemplateFunction;\n};\n\ntype UnsafeIconData = IconDatabase & {\n\tcustomTemplateAsString: string;\n};\n\nconst loaders = new Map<string, IconLoader>();\nconst registry = getSharedResource<Map<string, IconData | UnsafeIconData>>(\"SVGIcons.registry\", new Map());\nconst iconCollectionPromises = getSharedResource<Map<string, Promise<CollectionData| Array<CollectionData>>>>(\"SVGIcons.promises\", new Map());\n\nconst ICON_NOT_FOUND = \"ICON_NOT_FOUND\";\n\nconst registerIconLoader = (collectionName: string, loader: IconLoader) => {\n\tloaders.set(collectionName, loader);\n};\n\nconst _loadIconCollectionOnce = async (collectionName: string) => {\n\tif (!iconCollectionPromises.has(collectionName)) {\n\t\tif (!loaders.has(collectionName)) {\n\t\t\tthrow new Error(`No loader registered for the ${collectionName} icons collection. Probably you forgot to import the \"AllIcons.js\" module for the respective package.`);\n\t\t}\n\n\t\tconst loadIcons = loaders.get(collectionName)!;\n\t\ticonCollectionPromises.set(collectionName, loadIcons(collectionName));\n\t}\n\n\treturn iconCollectionPromises.get(collectionName);\n};\n\nconst _fillRegistry = (bundleData: CollectionData) => {\n\tObject.keys(bundleData.data).forEach(iconName => {\n\t\tconst iconData = bundleData.data[iconName];\n\n\t\tregisterIcon(iconName, {\n\t\t\tpathData: (iconData.path || iconData.paths)!,\n\t\t\tltr: iconData.ltr,\n\t\t\taccData: iconData.acc,\n\t\t\tcollection: bundleData.collection,\n\t\t\tpackageName: bundleData.packageName,\n\t\t});\n\t});\n};\n\n/**\n * Registers a SVG icon with the given name and associated icon data.\n *\n * This method is used to add an icon to the registry, making it available for use\n * in the application.\n *\n * @public\n * @param { string } name - The name of the icon to register.\n * @param { IconData } iconData - The data associated with the icon: `collection`, `pathData`, `packageName`\n * `customTemplate`, `viewBox`, `ltr`, `accData`.\n *\n * <b>Note:</b> Properties `pathData` and `customTemplate` are mutually exclusive.\n * If both are set, `customTemplate` will be used.\n */\nconst registerIcon = (name: string, iconData: IconData) => { // eslint-disable-line\n\tconst key = `${iconData.collection}/${name}`;\n\n\tconst data: IconData = {\n\t\tcollection: iconData.collection,\n\t\tpackageName: iconData.packageName,\n\t\tpathData: iconData.pathData,\n\t\tviewBox: iconData.viewBox,\n\t\tltr: iconData.ltr,\n\t\taccData: iconData.accData,\n\t\tcustomTemplate: iconData.customTemplate,\n\t};\n\n\tregistry.set(key, data);\n};\n\n/**\n * Registers a SVG icon in the registry with the given name and icon data.\n *\n * <b>Note:</b> This method is unsafe as it allows the SVG content to be passed as a string\n * through the `customTemplateAsString` property of the `iconData`.\n * Ensure that the SVG content is properly validated.\n * Improperly sanitized SVG strings can lead to security vulnerabilities such as XSS (Cross-Site Scripting).\n *\n * @public\n * @param { string } name - The name of the icon to register.\n * @param { UnsafeIconData } iconData - The data for the icon: `collection`, `customTemplateAsString`, `packageName`\n * `viewBox`, `ltr` and `accData`.\n * @since 2.14.0\n */\nconst unsafeRegisterIcon = (name: string, iconData: UnsafeIconData) => {\n\tconst key = `${iconData.collection}/${name}`;\n\n\tconst data: UnsafeIconData = {\n\t\tcollection: iconData.collection,\n\t\tcustomTemplateAsString: iconData.customTemplateAsString,\n\t\tpackageName: iconData.packageName,\n\t\tviewBox: iconData.viewBox,\n\t\tltr: iconData.ltr,\n\t\taccData: iconData.accData,\n\t};\n\n\tregistry.set(key, data);\n};\n\n/**\n * Processes the full icon name and splits it into - \"name\", \"collection\".\n * - removes legacy protocol (\"sap-icon://\")\n * - resolves aliases (f.e \"SAP-icons-TNT/actor\" => \"tnt/actor\")\n *\n * @param { string } name\n * @return { object }\n */\nconst processName = (name: string) => {\n\t// silently support ui5-compatible URIs\n\tif (name.startsWith(\"sap-icon://\")) {\n\t\tname = name.replace(\"sap-icon://\", \"\");\n\t}\n\n\tlet collection: string;\n\t[name, collection] = name.split(\"/\").reverse();\n\n\tname = name.replace(\"icon-\", \"\");\n\tif (collection) {\n\t\tcollection = getIconCollectionByAlias(collection);\n\t}\n\treturn { name, collection };\n};\n\nconst getIconDataSync = (iconName: string) => {\n\tconst { name, collection } = processName(iconName);\n\treturn getRegisteredIconData(collection, name);\n};\n\nconst getIconData = async (iconName: string) => {\n\tconst { name, collection } = processName(iconName);\n\n\tlet iconData: string | CollectionData | Array<CollectionData> = ICON_NOT_FOUND;\n\ttry {\n\t\ticonData = (await _loadIconCollectionOnce(getEffectiveIconCollection(collection)))!;\n\t} catch (error: unknown) {\n\t\tconst e = error as Error;\n\t\tconsole.error(e.message); /* eslint-disable-line */\n\t}\n\n\tif (iconData === ICON_NOT_FOUND) {\n\t\treturn iconData;\n\t}\n\n\tconst registeredIconData = getRegisteredIconData(collection, name);\n\n\tif (registeredIconData) {\n\t\treturn registeredIconData;\n\t}\n\n\t// not filled by another await. many getters will await on the same loader, but fill only once\n\tif (Array.isArray(iconData)) {\n\t\ticonData.forEach(data => {\n\t\t\t_fillRegistry(data);\n\t\t\tregisterIconCollectionForTheme(collection, { [data.themeFamily || DEFAULT_THEME_FAMILY]: data.collection });\n\t\t});\n\t} else {\n\t\t_fillRegistry(iconData as CollectionData);\n\t}\n\n\treturn getRegisteredIconData(collection, name);\n};\n\nconst getRegisteredIconData = (collection: string, name: string) => {\n\tconst registryKey = `${getEffectiveIconCollection(collection)}/${name}`;\n\treturn registry.get(registryKey);\n};\n\n/**\n * Returns the accessible name for the given icon,\n * or undefined if accessible name is not present.\n *\n * @param { string } name\n * @return { Promise }\n */\nconst getIconAccessibleName = async (name: string | undefined): Promise<string | undefined> => {\n\tif (!name) {\n\t\treturn;\n\t}\n\n\tlet iconData: typeof ICON_NOT_FOUND | IconData | undefined = getIconDataSync(name);\n\n\tif (!iconData) {\n\t\ticonData = await getIconData(name);\n\t}\n\n\tif (iconData && iconData !== ICON_NOT_FOUND && iconData.accData) {\n\t\tif (iconData.packageName) {\n\t\t\tconst i18nBundle = await getI18nBundle(iconData.packageName);\n\t\t\treturn i18nBundle.getText(iconData.accData);\n\t\t}\n\t\treturn iconData.accData?.defaultText || \"\";\n\t}\n};\n\n// test page usage only\nconst _getRegisteredNames = async () => {\n\t// fetch one icon of each collection to trigger the bundle load\n\tawait getIconData(\"edit\");\n\tawait getIconData(\"tnt/arrow\");\n\tawait getIconData(\"business-suite/3d\");\n\treturn Array.from(registry.keys());\n};\n\nexport {\n\tregisterIconLoader,\n\tgetIconData,\n\tgetIconDataSync,\n\tgetIconAccessibleName,\n\tregisterIcon,\n\tunsafeRegisterIcon,\n\t_getRegisteredNames,\n};\n\nexport type {\n\tIconData,\n\tUnsafeIconData,\n\tCollectionData,\n};\n"]}
1
+ {"version":3,"file":"Icons.js","sourceRoot":"","sources":["../../src/asset-registries/Icons.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,0BAA0B,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAIjD,MAAM,oBAAoB,GAAG,QAAQ,CAAC,CAAC,uBAAuB;AAmC9D,MAAM,OAAO,GAAG,IAAI,GAAG,EAAsB,CAAC;AAC9C,MAAM,QAAQ,GAAG,iBAAiB,CAAyC,mBAAmB,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AAC3G,MAAM,sBAAsB,GAAG,iBAAiB,CAA8D,mBAAmB,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;AAE9I,MAAM,cAAc,GAAG,gBAAgB,CAAC;AAExC,MAAM,kBAAkB,GAAG,CAAC,cAAsB,EAAE,MAAkB,EAAE,EAAE;IACzE,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,MAAM,CAAC,CAAC;AACrC,CAAC,CAAC;AAEF,MAAM,uBAAuB,GAAG,KAAK,EAAE,cAAsB,EAAE,EAAE;IAChE,IAAI,CAA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D,MAAM,WAAW,CAAC,MAAM,CAAC,CAAC;IAC1B,MAAM,WAAW,CAAC,WAAW,CAAC,CAAC;IAC/B,MAAM,WAAW,CAAC,mBAAmB,CAAC,CAAC;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC;AAEF,OAAO,EACN,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,GACnB,CAAC","sourcesContent":["import getSharedResource from \"../getSharedResource.js\";\nimport { getIconCollectionByAlias } from \"./util/IconCollectionsAlias.js\";\nimport { registerIconCollectionForTheme } from \"./util/IconCollectionsByTheme.js\";\nimport getEffectiveIconCollection from \"./util/getIconCollectionByTheme.js\";\nimport { getI18nBundle } from \"../i18nBundle.js\";\nimport type { I18nText } from \"../i18nBundle.js\";\nimport type { TemplateFunction } from \"../renderer/executeTemplate.js\";\n\nconst DEFAULT_THEME_FAMILY = \"legacy\"; // includes sap_fiori_*\n\ntype IconLoader = (collectionName: string) => Promise<CollectionData | Array<CollectionData>>;\n\ntype CollectionData = {\n\tcollection: string,\n\tpackageName: string,\n\tthemeFamily?: \"legacy\" | \"sap_horizon\",\n\tversion?: string,\n\tdata: Record<string, {\n\t\tpath?: string,\n\t\tpaths?: Array<string>,\n\t\tltr?: boolean,\n\t\tviewBox?: string,\n\t\tacc?: I18nText,\n\t}>,\n};\n\ntype IconDatabase = {\n\tcollection: string;\n\tpackageName?: string;\n\tviewBox?: string;\n\tltr?: boolean;\n\taccData?: I18nText;\n}\n\ntype IconData = IconDatabase & {\n\tpathData?: string | string[];\n\tcustomTemplate?: TemplateFunction;\n};\n\ntype UnsafeIconData = IconDatabase & {\n\tcustomTemplateAsString: string;\n};\n\nconst loaders = new Map<string, IconLoader>();\nconst registry = getSharedResource<Map<string, IconData | UnsafeIconData>>(\"SVGIcons.registry\", new Map());\nconst iconCollectionPromises = getSharedResource<Map<string, Promise<CollectionData| Array<CollectionData>>>>(\"SVGIcons.promises\", new Map());\n\nconst ICON_NOT_FOUND = \"ICON_NOT_FOUND\";\n\nconst registerIconLoader = (collectionName: string, loader: IconLoader) => {\n\tloaders.set(collectionName, loader);\n};\n\nconst _loadIconCollectionOnce = async (collectionName: string) => {\n\tif (!iconCollectionPromises.has(collectionName)) {\n\t\tif (!loaders.has(collectionName)) {\n\t\t\tthrow new Error(`No loader registered for the ${collectionName} icons collection. Probably you forgot to import the \"AllIcons.js\" module for the respective package.`);\n\t\t}\n\n\t\tconst loadIcons = loaders.get(collectionName)!;\n\t\ticonCollectionPromises.set(collectionName, loadIcons(collectionName));\n\t}\n\n\treturn iconCollectionPromises.get(collectionName);\n};\n\nconst _fillRegistry = (bundleData: CollectionData) => {\n\tObject.keys(bundleData.data).forEach(iconName => {\n\t\tconst iconData = bundleData.data[iconName];\n\n\t\tregisterIcon(iconName, {\n\t\t\tpathData: (iconData.path || iconData.paths)!,\n\t\t\tltr: iconData.ltr,\n\t\t\tviewBox: iconData.viewBox,\n\t\t\taccData: iconData.acc,\n\t\t\tcollection: bundleData.collection,\n\t\t\tpackageName: bundleData.packageName,\n\t\t});\n\t});\n};\n\n/**\n * Registers a SVG icon with the given name and associated icon data.\n *\n * This method is used to add an icon to the registry, making it available for use\n * in the application.\n *\n * @public\n * @param { string } name - The name of the icon to register.\n * @param { IconData } iconData - The data associated with the icon: `collection`, `pathData`, `packageName`\n * `customTemplate`, `viewBox`, `ltr`, `accData`.\n *\n * <b>Note:</b> Properties `pathData` and `customTemplate` are mutually exclusive.\n * If both are set, `customTemplate` will be used.\n */\nconst registerIcon = (name: string, iconData: IconData) => { // eslint-disable-line\n\tconst key = `${iconData.collection}/${name}`;\n\n\tconst data: IconData = {\n\t\tcollection: iconData.collection,\n\t\tpackageName: iconData.packageName,\n\t\tpathData: iconData.pathData,\n\t\tviewBox: iconData.viewBox,\n\t\tltr: iconData.ltr,\n\t\taccData: iconData.accData,\n\t\tcustomTemplate: iconData.customTemplate,\n\t};\n\n\tregistry.set(key, data);\n};\n\n/**\n * Registers a SVG icon in the registry with the given name and icon data.\n *\n * <b>Note:</b> This method is unsafe as it allows the SVG content to be passed as a string\n * through the `customTemplateAsString` property of the `iconData`.\n * Ensure that the SVG content is properly validated.\n * Improperly sanitized SVG strings can lead to security vulnerabilities such as XSS (Cross-Site Scripting).\n *\n * @public\n * @param { string } name - The name of the icon to register.\n * @param { UnsafeIconData } iconData - The data for the icon: `collection`, `customTemplateAsString`, `packageName`\n * `viewBox`, `ltr` and `accData`.\n * @since 2.14.0\n */\nconst unsafeRegisterIcon = (name: string, iconData: UnsafeIconData) => {\n\tconst key = `${iconData.collection}/${name}`;\n\n\tconst data: UnsafeIconData = {\n\t\tcollection: iconData.collection,\n\t\tcustomTemplateAsString: iconData.customTemplateAsString,\n\t\tpackageName: iconData.packageName,\n\t\tviewBox: iconData.viewBox,\n\t\tltr: iconData.ltr,\n\t\taccData: iconData.accData,\n\t};\n\n\tregistry.set(key, data);\n};\n\n/**\n * Processes the full icon name and splits it into - \"name\", \"collection\".\n * - removes legacy protocol (\"sap-icon://\")\n * - resolves aliases (f.e \"SAP-icons-TNT/actor\" => \"tnt/actor\")\n *\n * @param { string } name\n * @return { object }\n */\nconst processName = (name: string) => {\n\t// silently support ui5-compatible URIs\n\tif (name.startsWith(\"sap-icon://\")) {\n\t\tname = name.replace(\"sap-icon://\", \"\");\n\t}\n\n\tlet collection: string;\n\t[name, collection] = name.split(\"/\").reverse();\n\n\tname = name.replace(\"icon-\", \"\");\n\tif (collection) {\n\t\tcollection = getIconCollectionByAlias(collection);\n\t}\n\treturn { name, collection };\n};\n\nconst getIconDataSync = (iconName: string) => {\n\tconst { name, collection } = processName(iconName);\n\treturn getRegisteredIconData(collection, name);\n};\n\nconst getIconData = async (iconName: string) => {\n\tconst { name, collection } = processName(iconName);\n\n\tlet iconData: string | CollectionData | Array<CollectionData> = ICON_NOT_FOUND;\n\ttry {\n\t\ticonData = (await _loadIconCollectionOnce(getEffectiveIconCollection(collection)))!;\n\t} catch (error: unknown) {\n\t\tconst e = error as Error;\n\t\tconsole.error(e.message); /* eslint-disable-line */\n\t}\n\n\tif (iconData === ICON_NOT_FOUND) {\n\t\treturn iconData;\n\t}\n\n\tconst registeredIconData = getRegisteredIconData(collection, name);\n\n\tif (registeredIconData) {\n\t\treturn registeredIconData;\n\t}\n\n\t// not filled by another await. many getters will await on the same loader, but fill only once\n\tif (Array.isArray(iconData)) {\n\t\ticonData.forEach(data => {\n\t\t\t_fillRegistry(data);\n\t\t\tregisterIconCollectionForTheme(collection, { [data.themeFamily || DEFAULT_THEME_FAMILY]: data.collection });\n\t\t});\n\t} else {\n\t\t_fillRegistry(iconData as CollectionData);\n\t}\n\n\treturn getRegisteredIconData(collection, name);\n};\n\nconst getRegisteredIconData = (collection: string, name: string) => {\n\tconst registryKey = `${getEffectiveIconCollection(collection)}/${name}`;\n\treturn registry.get(registryKey);\n};\n\n/**\n * Returns the accessible name for the given icon,\n * or undefined if accessible name is not present.\n *\n * @param { string } name\n * @return { Promise }\n */\nconst getIconAccessibleName = async (name: string | undefined): Promise<string | undefined> => {\n\tif (!name) {\n\t\treturn;\n\t}\n\n\tlet iconData: typeof ICON_NOT_FOUND | IconData | undefined = getIconDataSync(name);\n\n\tif (!iconData) {\n\t\ticonData = await getIconData(name);\n\t}\n\n\tif (iconData && iconData !== ICON_NOT_FOUND && iconData.accData) {\n\t\tif (iconData.packageName) {\n\t\t\tconst i18nBundle = await getI18nBundle(iconData.packageName);\n\t\t\treturn i18nBundle.getText(iconData.accData);\n\t\t}\n\t\treturn iconData.accData?.defaultText || \"\";\n\t}\n};\n\n// test page usage only\nconst _getRegisteredNames = async () => {\n\t// fetch one icon of each collection to trigger the bundle load\n\tawait getIconData(\"edit\");\n\tawait getIconData(\"tnt/arrow\");\n\tawait getIconData(\"business-suite/3d\");\n\treturn Array.from(registry.keys());\n};\n\nexport {\n\tregisterIconLoader,\n\tgetIconData,\n\tgetIconDataSync,\n\tgetIconAccessibleName,\n\tregisterIcon,\n\tunsafeRegisterIcon,\n\t_getRegisteredNames,\n};\n\nexport type {\n\tIconData,\n\tUnsafeIconData,\n\tCollectionData,\n};\n"]}
@@ -1367,123 +1367,6 @@
1367
1367
  }
1368
1368
  ]
1369
1369
  },
1370
- {
1371
- "kind": "javascript-module",
1372
- "path": "dist/features/F6Navigation.js",
1373
- "declarations": [],
1374
- "exports": [
1375
- {
1376
- "kind": "js",
1377
- "name": "default",
1378
- "declaration": {
1379
- "name": "F6Navigation",
1380
- "module": "dist/features/F6Navigation.js"
1381
- }
1382
- }
1383
- ]
1384
- },
1385
- {
1386
- "kind": "javascript-module",
1387
- "path": "dist/features/InputElementsFormSupport.js",
1388
- "declarations": [],
1389
- "exports": []
1390
- },
1391
- {
1392
- "kind": "javascript-module",
1393
- "path": "dist/features/LegacyDateFormats.js",
1394
- "declarations": [],
1395
- "exports": [
1396
- {
1397
- "kind": "js",
1398
- "name": "default",
1399
- "declaration": {
1400
- "name": "LegacyDateFormats",
1401
- "module": "dist/features/LegacyDateFormats.js"
1402
- }
1403
- }
1404
- ]
1405
- },
1406
- {
1407
- "kind": "javascript-module",
1408
- "path": "dist/features/OpenUI5Element.js",
1409
- "declarations": [],
1410
- "exports": [
1411
- {
1412
- "kind": "js",
1413
- "name": "default",
1414
- "declaration": {
1415
- "name": "OpenUI5Element",
1416
- "module": "dist/features/OpenUI5Element.js"
1417
- }
1418
- }
1419
- ]
1420
- },
1421
- {
1422
- "kind": "javascript-module",
1423
- "path": "dist/features/OpenUI5Enablement.js",
1424
- "declarations": [],
1425
- "exports": [
1426
- {
1427
- "kind": "js",
1428
- "name": "default",
1429
- "declaration": {
1430
- "name": "OpenUI5Enablement",
1431
- "module": "dist/features/OpenUI5Enablement.js"
1432
- }
1433
- }
1434
- ]
1435
- },
1436
- {
1437
- "kind": "javascript-module",
1438
- "path": "dist/features/OpenUI5Support.js",
1439
- "declarations": [],
1440
- "exports": [
1441
- {
1442
- "kind": "js",
1443
- "name": "default",
1444
- "declaration": {
1445
- "name": "OpenUI5Support",
1446
- "module": "dist/features/OpenUI5Support.js"
1447
- }
1448
- }
1449
- ]
1450
- },
1451
- {
1452
- "kind": "javascript-module",
1453
- "path": "dist/features/insertOpenUI5PopupStyles.js",
1454
- "declarations": [],
1455
- "exports": [
1456
- {
1457
- "kind": "js",
1458
- "name": "default",
1459
- "declaration": {
1460
- "name": "insertOpenUI5PopupStyles",
1461
- "module": "dist/features/insertOpenUI5PopupStyles.js"
1462
- }
1463
- }
1464
- ]
1465
- },
1466
- {
1467
- "kind": "javascript-module",
1468
- "path": "dist/features/patchPatcher.js",
1469
- "declarations": [],
1470
- "exports": [
1471
- {
1472
- "kind": "js",
1473
- "name": "default",
1474
- "declaration": {
1475
- "name": "patchPatcher",
1476
- "module": "dist/features/patchPatcher.js"
1477
- }
1478
- }
1479
- ]
1480
- },
1481
- {
1482
- "kind": "javascript-module",
1483
- "path": "dist/features/patchPopup.js",
1484
- "declarations": [],
1485
- "exports": []
1486
- },
1487
1370
  {
1488
1371
  "kind": "javascript-module",
1489
1372
  "path": "dist/delegate/ItemNavigation.js",
@@ -1667,6 +1550,123 @@
1667
1550
  }
1668
1551
  ]
1669
1552
  },
1553
+ {
1554
+ "kind": "javascript-module",
1555
+ "path": "dist/features/F6Navigation.js",
1556
+ "declarations": [],
1557
+ "exports": [
1558
+ {
1559
+ "kind": "js",
1560
+ "name": "default",
1561
+ "declaration": {
1562
+ "name": "F6Navigation",
1563
+ "module": "dist/features/F6Navigation.js"
1564
+ }
1565
+ }
1566
+ ]
1567
+ },
1568
+ {
1569
+ "kind": "javascript-module",
1570
+ "path": "dist/features/InputElementsFormSupport.js",
1571
+ "declarations": [],
1572
+ "exports": []
1573
+ },
1574
+ {
1575
+ "kind": "javascript-module",
1576
+ "path": "dist/features/LegacyDateFormats.js",
1577
+ "declarations": [],
1578
+ "exports": [
1579
+ {
1580
+ "kind": "js",
1581
+ "name": "default",
1582
+ "declaration": {
1583
+ "name": "LegacyDateFormats",
1584
+ "module": "dist/features/LegacyDateFormats.js"
1585
+ }
1586
+ }
1587
+ ]
1588
+ },
1589
+ {
1590
+ "kind": "javascript-module",
1591
+ "path": "dist/features/OpenUI5Element.js",
1592
+ "declarations": [],
1593
+ "exports": [
1594
+ {
1595
+ "kind": "js",
1596
+ "name": "default",
1597
+ "declaration": {
1598
+ "name": "OpenUI5Element",
1599
+ "module": "dist/features/OpenUI5Element.js"
1600
+ }
1601
+ }
1602
+ ]
1603
+ },
1604
+ {
1605
+ "kind": "javascript-module",
1606
+ "path": "dist/features/OpenUI5Enablement.js",
1607
+ "declarations": [],
1608
+ "exports": [
1609
+ {
1610
+ "kind": "js",
1611
+ "name": "default",
1612
+ "declaration": {
1613
+ "name": "OpenUI5Enablement",
1614
+ "module": "dist/features/OpenUI5Enablement.js"
1615
+ }
1616
+ }
1617
+ ]
1618
+ },
1619
+ {
1620
+ "kind": "javascript-module",
1621
+ "path": "dist/features/OpenUI5Support.js",
1622
+ "declarations": [],
1623
+ "exports": [
1624
+ {
1625
+ "kind": "js",
1626
+ "name": "default",
1627
+ "declaration": {
1628
+ "name": "OpenUI5Support",
1629
+ "module": "dist/features/OpenUI5Support.js"
1630
+ }
1631
+ }
1632
+ ]
1633
+ },
1634
+ {
1635
+ "kind": "javascript-module",
1636
+ "path": "dist/features/insertOpenUI5PopupStyles.js",
1637
+ "declarations": [],
1638
+ "exports": [
1639
+ {
1640
+ "kind": "js",
1641
+ "name": "default",
1642
+ "declaration": {
1643
+ "name": "insertOpenUI5PopupStyles",
1644
+ "module": "dist/features/insertOpenUI5PopupStyles.js"
1645
+ }
1646
+ }
1647
+ ]
1648
+ },
1649
+ {
1650
+ "kind": "javascript-module",
1651
+ "path": "dist/features/patchPatcher.js",
1652
+ "declarations": [],
1653
+ "exports": [
1654
+ {
1655
+ "kind": "js",
1656
+ "name": "default",
1657
+ "declaration": {
1658
+ "name": "patchPatcher",
1659
+ "module": "dist/features/patchPatcher.js"
1660
+ }
1661
+ }
1662
+ ]
1663
+ },
1664
+ {
1665
+ "kind": "javascript-module",
1666
+ "path": "dist/features/patchPopup.js",
1667
+ "declarations": [],
1668
+ "exports": []
1669
+ },
1670
1670
  {
1671
1671
  "kind": "javascript-module",
1672
1672
  "path": "dist/locale/Locale.js",
@@ -2631,6 +2631,21 @@
2631
2631
  }
2632
2632
  ]
2633
2633
  },
2634
+ {
2635
+ "kind": "javascript-module",
2636
+ "path": "dist/util/generateHighlightedMarkupFirstMatch.js",
2637
+ "declarations": [],
2638
+ "exports": [
2639
+ {
2640
+ "kind": "js",
2641
+ "name": "default",
2642
+ "declaration": {
2643
+ "name": "generateHighlightedMarkupFirstMatch",
2644
+ "module": "dist/util/generateHighlightedMarkupFirstMatch.js"
2645
+ }
2646
+ }
2647
+ ]
2648
+ },
2634
2649
  {
2635
2650
  "kind": "javascript-module",
2636
2651
  "path": "dist/util/getActiveElement.js",
@@ -1349,123 +1349,6 @@
1349
1349
  }
1350
1350
  ]
1351
1351
  },
1352
- {
1353
- "kind": "javascript-module",
1354
- "path": "dist/features/F6Navigation.js",
1355
- "declarations": [],
1356
- "exports": [
1357
- {
1358
- "kind": "js",
1359
- "name": "default",
1360
- "declaration": {
1361
- "name": "F6Navigation",
1362
- "module": "dist/features/F6Navigation.js"
1363
- }
1364
- }
1365
- ]
1366
- },
1367
- {
1368
- "kind": "javascript-module",
1369
- "path": "dist/features/InputElementsFormSupport.js",
1370
- "declarations": [],
1371
- "exports": []
1372
- },
1373
- {
1374
- "kind": "javascript-module",
1375
- "path": "dist/features/LegacyDateFormats.js",
1376
- "declarations": [],
1377
- "exports": [
1378
- {
1379
- "kind": "js",
1380
- "name": "default",
1381
- "declaration": {
1382
- "name": "LegacyDateFormats",
1383
- "module": "dist/features/LegacyDateFormats.js"
1384
- }
1385
- }
1386
- ]
1387
- },
1388
- {
1389
- "kind": "javascript-module",
1390
- "path": "dist/features/OpenUI5Element.js",
1391
- "declarations": [],
1392
- "exports": [
1393
- {
1394
- "kind": "js",
1395
- "name": "default",
1396
- "declaration": {
1397
- "name": "OpenUI5Element",
1398
- "module": "dist/features/OpenUI5Element.js"
1399
- }
1400
- }
1401
- ]
1402
- },
1403
- {
1404
- "kind": "javascript-module",
1405
- "path": "dist/features/OpenUI5Enablement.js",
1406
- "declarations": [],
1407
- "exports": [
1408
- {
1409
- "kind": "js",
1410
- "name": "default",
1411
- "declaration": {
1412
- "name": "OpenUI5Enablement",
1413
- "module": "dist/features/OpenUI5Enablement.js"
1414
- }
1415
- }
1416
- ]
1417
- },
1418
- {
1419
- "kind": "javascript-module",
1420
- "path": "dist/features/OpenUI5Support.js",
1421
- "declarations": [],
1422
- "exports": [
1423
- {
1424
- "kind": "js",
1425
- "name": "default",
1426
- "declaration": {
1427
- "name": "OpenUI5Support",
1428
- "module": "dist/features/OpenUI5Support.js"
1429
- }
1430
- }
1431
- ]
1432
- },
1433
- {
1434
- "kind": "javascript-module",
1435
- "path": "dist/features/insertOpenUI5PopupStyles.js",
1436
- "declarations": [],
1437
- "exports": [
1438
- {
1439
- "kind": "js",
1440
- "name": "default",
1441
- "declaration": {
1442
- "name": "insertOpenUI5PopupStyles",
1443
- "module": "dist/features/insertOpenUI5PopupStyles.js"
1444
- }
1445
- }
1446
- ]
1447
- },
1448
- {
1449
- "kind": "javascript-module",
1450
- "path": "dist/features/patchPatcher.js",
1451
- "declarations": [],
1452
- "exports": [
1453
- {
1454
- "kind": "js",
1455
- "name": "default",
1456
- "declaration": {
1457
- "name": "patchPatcher",
1458
- "module": "dist/features/patchPatcher.js"
1459
- }
1460
- }
1461
- ]
1462
- },
1463
- {
1464
- "kind": "javascript-module",
1465
- "path": "dist/features/patchPopup.js",
1466
- "declarations": [],
1467
- "exports": []
1468
- },
1469
1352
  {
1470
1353
  "kind": "javascript-module",
1471
1354
  "path": "dist/delegate/ItemNavigation.js",
@@ -1641,6 +1524,123 @@
1641
1524
  }
1642
1525
  ]
1643
1526
  },
1527
+ {
1528
+ "kind": "javascript-module",
1529
+ "path": "dist/features/F6Navigation.js",
1530
+ "declarations": [],
1531
+ "exports": [
1532
+ {
1533
+ "kind": "js",
1534
+ "name": "default",
1535
+ "declaration": {
1536
+ "name": "F6Navigation",
1537
+ "module": "dist/features/F6Navigation.js"
1538
+ }
1539
+ }
1540
+ ]
1541
+ },
1542
+ {
1543
+ "kind": "javascript-module",
1544
+ "path": "dist/features/InputElementsFormSupport.js",
1545
+ "declarations": [],
1546
+ "exports": []
1547
+ },
1548
+ {
1549
+ "kind": "javascript-module",
1550
+ "path": "dist/features/LegacyDateFormats.js",
1551
+ "declarations": [],
1552
+ "exports": [
1553
+ {
1554
+ "kind": "js",
1555
+ "name": "default",
1556
+ "declaration": {
1557
+ "name": "LegacyDateFormats",
1558
+ "module": "dist/features/LegacyDateFormats.js"
1559
+ }
1560
+ }
1561
+ ]
1562
+ },
1563
+ {
1564
+ "kind": "javascript-module",
1565
+ "path": "dist/features/OpenUI5Element.js",
1566
+ "declarations": [],
1567
+ "exports": [
1568
+ {
1569
+ "kind": "js",
1570
+ "name": "default",
1571
+ "declaration": {
1572
+ "name": "OpenUI5Element",
1573
+ "module": "dist/features/OpenUI5Element.js"
1574
+ }
1575
+ }
1576
+ ]
1577
+ },
1578
+ {
1579
+ "kind": "javascript-module",
1580
+ "path": "dist/features/OpenUI5Enablement.js",
1581
+ "declarations": [],
1582
+ "exports": [
1583
+ {
1584
+ "kind": "js",
1585
+ "name": "default",
1586
+ "declaration": {
1587
+ "name": "OpenUI5Enablement",
1588
+ "module": "dist/features/OpenUI5Enablement.js"
1589
+ }
1590
+ }
1591
+ ]
1592
+ },
1593
+ {
1594
+ "kind": "javascript-module",
1595
+ "path": "dist/features/OpenUI5Support.js",
1596
+ "declarations": [],
1597
+ "exports": [
1598
+ {
1599
+ "kind": "js",
1600
+ "name": "default",
1601
+ "declaration": {
1602
+ "name": "OpenUI5Support",
1603
+ "module": "dist/features/OpenUI5Support.js"
1604
+ }
1605
+ }
1606
+ ]
1607
+ },
1608
+ {
1609
+ "kind": "javascript-module",
1610
+ "path": "dist/features/insertOpenUI5PopupStyles.js",
1611
+ "declarations": [],
1612
+ "exports": [
1613
+ {
1614
+ "kind": "js",
1615
+ "name": "default",
1616
+ "declaration": {
1617
+ "name": "insertOpenUI5PopupStyles",
1618
+ "module": "dist/features/insertOpenUI5PopupStyles.js"
1619
+ }
1620
+ }
1621
+ ]
1622
+ },
1623
+ {
1624
+ "kind": "javascript-module",
1625
+ "path": "dist/features/patchPatcher.js",
1626
+ "declarations": [],
1627
+ "exports": [
1628
+ {
1629
+ "kind": "js",
1630
+ "name": "default",
1631
+ "declaration": {
1632
+ "name": "patchPatcher",
1633
+ "module": "dist/features/patchPatcher.js"
1634
+ }
1635
+ }
1636
+ ]
1637
+ },
1638
+ {
1639
+ "kind": "javascript-module",
1640
+ "path": "dist/features/patchPopup.js",
1641
+ "declarations": [],
1642
+ "exports": []
1643
+ },
1644
1644
  {
1645
1645
  "kind": "javascript-module",
1646
1646
  "path": "dist/locale/Locale.js",
@@ -2328,6 +2328,21 @@
2328
2328
  }
2329
2329
  ]
2330
2330
  },
2331
+ {
2332
+ "kind": "javascript-module",
2333
+ "path": "dist/util/generateHighlightedMarkupFirstMatch.js",
2334
+ "declarations": [],
2335
+ "exports": [
2336
+ {
2337
+ "kind": "js",
2338
+ "name": "default",
2339
+ "declaration": {
2340
+ "name": "generateHighlightedMarkupFirstMatch",
2341
+ "module": "dist/util/generateHighlightedMarkupFirstMatch.js"
2342
+ }
2343
+ }
2344
+ ]
2345
+ },
2331
2346
  {
2332
2347
  "kind": "javascript-module",
2333
2348
  "path": "dist/util/getActiveElement.js",
@@ -1,11 +1,11 @@
1
1
  const VersionInfo = {
2
- version: "2.21.0-rc.2",
2
+ version: "2.21.0-rc.4",
3
3
  major: 2,
4
4
  minor: 21,
5
5
  patch: 0,
6
- suffix: "-rc.2",
6
+ suffix: "-rc.4",
7
7
  isNext: false,
8
- buildTime: 1773946276,
8
+ buildTime: 1775118131,
9
9
  };
10
10
  export default VersionInfo;
11
11
  //# sourceMappingURL=VersionInfo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.21.0-rc.2\",\n\tmajor: 2,\n\tminor: 21,\n\tpatch: 0,\n\tsuffix: \"-rc.2\",\n\tisNext: false,\n\tbuildTime: 1773946276,\n};\nexport default VersionInfo;"]}
1
+ {"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.21.0-rc.4\",\n\tmajor: 2,\n\tminor: 21,\n\tpatch: 0,\n\tsuffix: \"-rc.4\",\n\tisNext: false,\n\tbuildTime: 1775118131,\n};\nexport default VersionInfo;"]}
@@ -1,2 +1,2 @@
1
- "use strict";import m from"../getSharedResource.js";import{getIconCollectionByAlias as d}from"./util/IconCollectionsAlias.js";import{registerIconCollectionForTheme as h}from"./util/IconCollectionsByTheme.js";import I from"./util/getIconCollectionByTheme.js";import{getI18nBundle as T}from"../i18nBundle.js";const w="legacy",s=new Map,c=m("SVGIcons.registry",new Map),i=m("SVGIcons.promises",new Map),l="ICON_NOT_FOUND",C=(e,t)=>{s.set(e,t)},N=async e=>{if(!i.has(e)){if(!s.has(e))throw new Error(`No loader registered for the ${e} icons collection. Probably you forgot to import the "AllIcons.js" module for the respective package.`);const t=s.get(e);i.set(e,t(e))}return i.get(e)},f=e=>{Object.keys(e.data).forEach(t=>{const a=e.data[t];y(t,{pathData:a.path||a.paths,ltr:a.ltr,accData:a.acc,collection:e.collection,packageName:e.packageName})})},y=(e,t)=>{const a=`${t.collection}/${e}`,o={collection:t.collection,packageName:t.packageName,pathData:t.pathData,viewBox:t.viewBox,ltr:t.ltr,accData:t.accData,customTemplate:t.customTemplate};c.set(a,o)},k=(e,t)=>{const a=`${t.collection}/${e}`,o={collection:t.collection,customTemplateAsString:t.customTemplateAsString,packageName:t.packageName,viewBox:t.viewBox,ltr:t.ltr,accData:t.accData};c.set(a,o)},u=e=>{e.startsWith("sap-icon://")&&(e=e.replace("sap-icon://",""));let t;return[e,t]=e.split("/").reverse(),e=e.replace("icon-",""),t&&(t=d(t)),{name:e,collection:t}},D=e=>{const{name:t,collection:a}=u(e);return g(a,t)},n=async e=>{const{name:t,collection:a}=u(e);let o=l;try{o=await N(I(a))}catch(r){console.error(r.message)}if(o===l)return o;const p=g(a,t);return p||(Array.isArray(o)?o.forEach(r=>{f(r),h(a,{[r.themeFamily||w]:r.collection})}):f(o),g(a,t))},g=(e,t)=>{const a=`${I(e)}/${t}`;return c.get(a)},A=async e=>{if(!e)return;let t=D(e);if(t||(t=await n(e)),t&&t!==l&&t.accData)return t.packageName?(await T(t.packageName)).getText(t.accData):t.accData?.defaultText||""},x=async()=>(await n("edit"),await n("tnt/arrow"),await n("business-suite/3d"),Array.from(c.keys()));export{C as registerIconLoader,n as getIconData,D as getIconDataSync,A as getIconAccessibleName,y as registerIcon,k as unsafeRegisterIcon,x as _getRegisteredNames};
1
+ "use strict";import m from"../getSharedResource.js";import{getIconCollectionByAlias as d}from"./util/IconCollectionsAlias.js";import{registerIconCollectionForTheme as h}from"./util/IconCollectionsByTheme.js";import I from"./util/getIconCollectionByTheme.js";import{getI18nBundle as w}from"../i18nBundle.js";const T="legacy",s=new Map,c=m("SVGIcons.registry",new Map),i=m("SVGIcons.promises",new Map),l="ICON_NOT_FOUND",C=(e,t)=>{s.set(e,t)},N=async e=>{if(!i.has(e)){if(!s.has(e))throw new Error(`No loader registered for the ${e} icons collection. Probably you forgot to import the "AllIcons.js" module for the respective package.`);const t=s.get(e);i.set(e,t(e))}return i.get(e)},f=e=>{Object.keys(e.data).forEach(t=>{const o=e.data[t];y(t,{pathData:o.path||o.paths,ltr:o.ltr,viewBox:o.viewBox,accData:o.acc,collection:e.collection,packageName:e.packageName})})},y=(e,t)=>{const o=`${t.collection}/${e}`,a={collection:t.collection,packageName:t.packageName,pathData:t.pathData,viewBox:t.viewBox,ltr:t.ltr,accData:t.accData,customTemplate:t.customTemplate};c.set(o,a)},k=(e,t)=>{const o=`${t.collection}/${e}`,a={collection:t.collection,customTemplateAsString:t.customTemplateAsString,packageName:t.packageName,viewBox:t.viewBox,ltr:t.ltr,accData:t.accData};c.set(o,a)},u=e=>{e.startsWith("sap-icon://")&&(e=e.replace("sap-icon://",""));let t;return[e,t]=e.split("/").reverse(),e=e.replace("icon-",""),t&&(t=d(t)),{name:e,collection:t}},D=e=>{const{name:t,collection:o}=u(e);return g(o,t)},n=async e=>{const{name:t,collection:o}=u(e);let a=l;try{a=await N(I(o))}catch(r){console.error(r.message)}if(a===l)return a;const p=g(o,t);return p||(Array.isArray(a)?a.forEach(r=>{f(r),h(o,{[r.themeFamily||T]:r.collection})}):f(a),g(o,t))},g=(e,t)=>{const o=`${I(e)}/${t}`;return c.get(o)},x=async e=>{if(!e)return;let t=D(e);if(t||(t=await n(e)),t&&t!==l&&t.accData)return t.packageName?(await w(t.packageName)).getText(t.accData):t.accData?.defaultText||""},A=async()=>(await n("edit"),await n("tnt/arrow"),await n("business-suite/3d"),Array.from(c.keys()));export{C as registerIconLoader,n as getIconData,D as getIconDataSync,x as getIconAccessibleName,y as registerIcon,k as unsafeRegisterIcon,A as _getRegisteredNames};
2
2
  //# sourceMappingURL=Icons.js.map