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

package.dist.prod.IgnoreCustomElements.js.map Maven / Gradle / Ivy

{
  "version": 3,
  "sources": ["../../src/IgnoreCustomElements.ts"],
  "sourcesContent": ["/**\n * The tag prefixes to be ignored.\n */\nconst tagPrefixes: Array = [];\n\n/**\n * Ignores all custom HTML elements with a given tag prefix to improve the rendering performance of the UI5 Web Components.\n *\n * **When used:** the UI5 Web Components framework treats all custom HTML elements,\n * starting with the given prefix as if they are standard HTML elements, such as: `div`, `span`, etc, without additional processing.\n *\n * **When not used:** the framework waits for the slotted children to be defined and registered first,\n * because the state or visual appearance of the parent may rely on the slotted elements/children.\n *\n * **Note:** We recommend using `ignoreCustomElements` when slotting custom HTML elements (with only semantic purpose)\n * inside UI5 Web Components, to improve the time to render.\n *\n * @public\n * @since 1.14.0\n * @param { string } tagPrefix\n */\nconst ignoreCustomElements = (tagPrefix: string) => {\n\tif (typeof tagPrefix !== \"string\" || !tagPrefix.length) {\n\t\tthrow new Error(\"Only string characters for a tag prefix.\");\n\t}\n\n\ttagPrefixes.push(tagPrefix);\n};\n\n/**\n * Determines whether custom elements with the given tag should be ignored.\n *\n * @private\n * @param { string } tag\n */\nconst shouldIgnoreCustomElement = (tag: string): boolean => {\n\treturn tagPrefixes.some(pref => tag.startsWith(pref));\n};\n\nexport {\n\tignoreCustomElements,\n\tshouldIgnoreCustomElement,\n};\n"],
  "mappings": "aAGA,MAAMA,EAA6B,CAAC,EAkB9BC,EAAwBC,GAAsB,CACnD,GAAI,OAAOA,GAAc,UAAY,CAACA,EAAU,OAC/C,MAAM,IAAI,MAAM,0CAA0C,EAG3DF,EAAY,KAAKE,CAAS,CAC3B,EAQMC,EAA6BC,GAC3BJ,EAAY,KAAKK,GAAQD,EAAI,WAAWC,CAAI,CAAC,EAGrD,OACCJ,KAAA,qBACAE,KAAA",
  "names": ["tagPrefixes", "ignoreCustomElements", "tagPrefix", "shouldIgnoreCustomElement", "tag", "pref"]
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy