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

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

{
  "version": 3,
  "sources": ["../../../../src/asset-registries/util/IconCollectionsByTheme.ts"],
  "sourcesContent": ["import { isLegacyThemeFamily } from \"../../config/Theme.js\";\n\nenum RegisteredIconCollection {\n\tSAPIconsV4 = \"SAP-icons-v4\",\n\tSAPIconsV5 = \"SAP-icons-v5\",\n\tSAPIconsTNTV2 = \"tnt-v2\",\n\tSAPIconsTNTV3 = \"tnt-v3\",\n\tSAPBSIconsV1 = \"business-suite-v1\",\n\tSAPBSIconsV2 = \"business-suite-v2\",\n}\n\ntype ThemeToCollectionMap = {[x: string]: string; };\n\nconst iconCollections = new Map();\niconCollections.set(\"SAP-icons\", {\n\t\"legacy\": RegisteredIconCollection.SAPIconsV4,\n\t\"sap_horizon\": RegisteredIconCollection.SAPIconsV5,\n});\niconCollections.set(\"tnt\", {\n\t\"legacy\": RegisteredIconCollection.SAPIconsTNTV2,\n\t\"sap_horizon\": RegisteredIconCollection.SAPIconsTNTV3,\n});\niconCollections.set(\"business-suite\", {\n\t\"legacy\": RegisteredIconCollection.SAPBSIconsV1,\n\t\"sap_horizon\": RegisteredIconCollection.SAPBSIconsV2,\n});\n\n/**\n * Registers collection version per theme.\n * **For exmaple:** registerIconCollectionForTheme(\"my-custom-icons\", {\"sap_horizon\": \"my-custom-icons-v5\"})\n * @param { string } collectionName\n * @param { ThemeToCollectionMap } themeCollectionMap\n */\nconst registerIconCollectionForTheme = (collectionName: string, themeCollectionMap: ThemeToCollectionMap) => {\n\tif (iconCollections.has(collectionName)) {\n\t\ticonCollections.set(collectionName, { ...themeCollectionMap, ...iconCollections.get(collectionName) });\n\t\treturn;\n\t}\n\ticonCollections.set(collectionName, themeCollectionMap);\n};\n\nconst getIconCollectionForTheme = (collectionName: string) => {\n\tconst themeFamily = isLegacyThemeFamily() ? \"legacy\" : \"sap_horizon\";\n\treturn iconCollections.has(collectionName) ? iconCollections.get(collectionName)![themeFamily] : collectionName;\n};\n\nexport {\n\tregisterIconCollectionForTheme,\n\tgetIconCollectionForTheme,\n\tRegisteredIconCollection,\n};\n"],
  "mappings": "aAAA,OAAS,uBAAAA,MAA2B,wBAEpC,IAAKC,OACJA,EAAA,WAAa,eACbA,EAAA,WAAa,eACbA,EAAA,cAAgB,SAChBA,EAAA,cAAgB,SAChBA,EAAA,aAAe,oBACfA,EAAA,aAAe,oBANXA,OAAA,IAWL,MAAMC,EAAkB,IAAI,IAC5BA,EAAgB,IAAI,YAAa,CAChC,OAAU,eACV,YAAe,cAChB,CAAC,EACDA,EAAgB,IAAI,MAAO,CAC1B,OAAU,SACV,YAAe,QAChB,CAAC,EACDA,EAAgB,IAAI,iBAAkB,CACrC,OAAU,oBACV,YAAe,mBAChB,CAAC,EAQD,MAAMC,EAAiC,CAACC,EAAwBC,IAA6C,CAC5G,GAAIH,EAAgB,IAAIE,CAAc,EAAG,CACxCF,EAAgB,IAAIE,EAAgB,CAAE,GAAGC,EAAoB,GAAGH,EAAgB,IAAIE,CAAc,CAAE,CAAC,EACrG,MACD,CACAF,EAAgB,IAAIE,EAAgBC,CAAkB,CACvD,EAEMC,EAA6BF,GAA2B,CAC7D,MAAMG,EAAcP,EAAoB,EAAI,SAAW,cACvD,OAAOE,EAAgB,IAAIE,CAAc,EAAIF,EAAgB,IAAIE,CAAc,EAAGG,CAAW,EAAIH,CAClG,EAEA,OACCD,KAAA,+BACAG,KAAA,0BACAL,KAAA",
  "names": ["isLegacyThemeFamily", "RegisteredIconCollection", "iconCollections", "registerIconCollectionForTheme", "collectionName", "themeCollectionMap", "getIconCollectionForTheme", "themeFamily"]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy