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

package.dist.prod.config.NoConflict.js.map Maven / Gradle / Ivy

{
  "version": 3,
  "sources": ["../../../src/config/NoConflict.ts"],
  "sourcesContent": ["import { getNoConflict as getConfiguredNoConflict } from \"../InitialConfiguration.js\";\n\n// Fire these events even with noConflict: true\nconst excludeList = [\n\t\"value-changed\",\n\t\"click\",\n];\n\ntype NoConflictData = boolean | { events: Array};\n\nlet noConflict: NoConflictData;\n\nconst shouldFireOriginalEvent = (eventName: string) => {\n\treturn excludeList.includes(eventName);\n};\n\nconst shouldNotFireOriginalEvent = (eventName: string) => {\n\tconst nc = getNoConflict();\n\t// return !(nc.events && nc.events.includes && nc.events.includes(eventName));\n\treturn !(typeof nc !== \"boolean\" && nc.events && nc.events.includes && nc.events.includes(eventName));\n};\n\n/**\n * Returns if the \"noConflict\" configuration is set.\n * @public\n * @returns { NoConflictData }\n */\nconst getNoConflict = (): NoConflictData => {\n\tif (noConflict === undefined) {\n\t\tnoConflict = getConfiguredNoConflict();\n\t}\n\n\treturn noConflict;\n};\n\n/**\n * Sets the \"noConflict\" mode.\n * - When \"false\" (default value), all custom events are fired with and without the \"ui5-\" prefix.\n * - When \"true\", all custom events are fired with the \"ui5-\" prefix only.\n * - When an object is supplied, just the specified events will be fired with the \"ui5-\" prefix.\n * @public\n * @param { NoConflictData } noConflictData\n */\nconst setNoConflict = (noConflictData: NoConflictData) => {\n\tnoConflict = noConflictData;\n};\n\nconst skipOriginalEvent = (eventName: string) => {\n\tconst nc = getNoConflict();\n\n\t// Always fire these events\n\tif (shouldFireOriginalEvent(eventName)) {\n\t\treturn false;\n\t}\n\n\t// Read from the configuration\n\tif (nc === true) {\n\t\treturn true;\n\t}\n\n\treturn !shouldNotFireOriginalEvent(eventName);\n};\n\nexport {\n\tgetNoConflict,\n\tsetNoConflict,\n\tskipOriginalEvent,\n};\n"],
  "mappings": "aAAA,OAAS,iBAAiBA,MAA+B,6BAGzD,MAAMC,EAAc,CACnB,gBACA,OACD,EAIA,IAAIC,EAEJ,MAAMC,EAA2BC,GACzBH,EAAY,SAASG,CAAS,EAGhCC,EAA8BD,GAAsB,CACzD,MAAME,EAAKC,EAAc,EAEzB,MAAO,EAAE,OAAOD,GAAO,WAAaA,EAAG,QAAUA,EAAG,OAAO,UAAYA,EAAG,OAAO,SAASF,CAAS,EACpG,EAOMG,EAAgB,KACjBL,IAAe,SAClBA,EAAaF,EAAwB,GAG/BE,GAWFM,EAAiBC,GAAmC,CACzDP,EAAaO,CACd,EAEMC,EAAqBN,GAAsB,CAChD,MAAME,EAAKC,EAAc,EAGzB,OAAIJ,EAAwBC,CAAS,EAC7B,GAIJE,IAAO,GACH,GAGD,CAACD,EAA2BD,CAAS,CAC7C,EAEA,OACCG,KAAA,cACAC,KAAA,cACAE,KAAA",
  "names": ["getConfiguredNoConflict", "excludeList", "noConflict", "shouldFireOriginalEvent", "eventName", "shouldNotFireOriginalEvent", "nc", "getNoConflict", "setNoConflict", "noConflictData", "skipOriginalEvent"]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy