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

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

{"version":3,"file":"NoConflict.js","sourceRoot":"","sources":["../../src/config/NoConflict.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAEtF,+CAA+C;AAC/C,MAAM,WAAW,GAAG;IACnB,eAAe;IACf,OAAO;CACP,CAAC;AAIF,IAAI,UAA0B,CAAC;AAE/B,MAAM,uBAAuB,GAAG,CAAC,SAAiB,EAAE,EAAE;IACrD,OAAO,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,CAAC,SAAiB,EAAE,EAAE;IACxD,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;IAC3B,8EAA8E;IAC9E,OAAO,CAAC,CAAC,OAAO,EAAE,KAAK,SAAS,IAAI,EAAE,CAAC,MAAM,IAAI,EAAE,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC;AACvG,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,aAAa,GAAG,GAAmB,EAAE;IAC1C,IAAI,UAAU,KAAK,SAAS,EAAE;QAC7B,UAAU,GAAG,uBAAuB,EAAE,CAAC;KACvC;IAED,OAAO,UAAU,CAAC;AACnB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,aAAa,GAAG,CAAC,cAA8B,EAAE,EAAE;IACxD,UAAU,GAAG,cAAc,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,SAAiB,EAAE,EAAE;IAC/C,MAAM,EAAE,GAAG,aAAa,EAAE,CAAC;IAE3B,2BAA2B;IAC3B,IAAI,uBAAuB,CAAC,SAAS,CAAC,EAAE;QACvC,OAAO,KAAK,CAAC;KACb;IAED,8BAA8B;IAC9B,IAAI,EAAE,KAAK,IAAI,EAAE;QAChB,OAAO,IAAI,CAAC;KACZ;IAED,OAAO,CAAC,0BAA0B,CAAC,SAAS,CAAC,CAAC;AAC/C,CAAC,CAAC;AAEF,OAAO,EACN,aAAa,EACb,aAAa,EACb,iBAAiB,GACjB,CAAC","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"]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy