All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.dist.asset-registries.util.getIconCollectionByTheme.js.map Maven / Gradle / Ivy

{"version":3,"file":"getIconCollectionByTheme.js","sourceRoot":"","sources":["../../../src/asset-registries/util/getIconCollectionByTheme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE;;;;;;;;;GASG;AACH,MAAM,0BAA0B,GAAG,CAAC,cAA+B,EAAkB,EAAE;IACtF,MAAM,qBAAqB,GAAG,wBAAwB,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEnE,uHAAuH;IACvH,IAAI,CAAC,cAAc,IAAI,qBAAqB,EAAE;QAC7C,OAAO,wBAAwB,CAAC,qBAAqB,CAAC,CAAC;KACvD;IAED,4DAA4D;IAC5D,IAAI,CAAC,cAAc,EAAE;QACpB,OAAO,yBAAyB,CAAC,WAAW,CAAC,CAAC;KAC9C;IAED,wIAAwI;IACxI,OAAO,yBAAyB,CAAC,cAAc,CAAC,CAAC;AAClD,CAAC,CAAC;AAEF,eAAe,0BAA0B,CAAC","sourcesContent":["import { getTheme } from \"../../config/Theme.js\";\nimport type { IconCollection } from \"../../config/Icons.js\";\nimport { getDefaultIconCollection } from \"../../config/Icons.js\";\nimport { getIconCollectionByAlias } from \"./IconCollectionsAlias.js\";\nimport { getIconCollectionForTheme } from \"./IconCollectionsByTheme.js\";\n\n/**\n * Returns the effective theme dependant icon collection:\n *\n * - \"no collection\" resolves to \"SAP-icons-v4\" in \"Quartz\" and to \"SAP-icons-v5\" in \"Horizon\"\n * - \"tnt\" (and its alias \"SAP-icons-TNT\") resolves to \"tnt-v2\" in \"Quartz\" and resolves to \"tnt-v3\" in \"Horizon\"\n * - \"business-suite\" (and its alias \"BusinessSuiteInAppSymbols\") resolves to \"business-suite-v1\" in \"Quartz\" and resolves to \"business-suite-v2\" in \"Horizon\"\n *\n * @param { IconCollection } collectionName\n * @returns { IconCollection } the effective collection name\n */\nconst getEffectiveIconCollection = (collectionName?: IconCollection): IconCollection => {\n\tconst defaultIconCollection = getDefaultIconCollection(getTheme());\n\n\t// no collection + default collection, configured via setDefaultIconCollection - return the configured icon collection.\n\tif (!collectionName && defaultIconCollection) {\n\t\treturn getIconCollectionByAlias(defaultIconCollection);\n\t}\n\n\t// no collection - return \"SAP-icons-v4\" or  \"SAP-icons-v5\".\n\tif (!collectionName) {\n\t\treturn getIconCollectionForTheme(\"SAP-icons\");\n\t}\n\n\t// has collection - return \"SAP-icons-v4\", \"SAP-icons-v5\", \"tnt-v1\", \"tnt-v2\", \"business-suite-v1\", \"business-suite-v2\", or custom ones.\n\treturn getIconCollectionForTheme(collectionName);\n};\n\nexport default getEffectiveIconCollection;\n"]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy