@ui5/webcomponents-base 2.5.0 → 2.6.0-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/.tsbuildinfobuild +1 -1
  3. package/dist/UI5Element.d.ts +27 -13
  4. package/dist/UI5Element.js +16 -2
  5. package/dist/UI5Element.js.map +1 -1
  6. package/dist/custom-elements-internal.json +69 -165
  7. package/dist/custom-elements.json +69 -66
  8. package/dist/decorators/bound.d.ts +1 -0
  9. package/dist/decorators/bound.js +34 -0
  10. package/dist/decorators/bound.js.map +1 -0
  11. package/dist/decorators.d.ts +3 -1
  12. package/dist/decorators.js +3 -1
  13. package/dist/decorators.js.map +1 -1
  14. package/dist/generated/VersionInfo.js +4 -4
  15. package/dist/generated/VersionInfo.js.map +1 -1
  16. package/dist/index.d.ts +8 -0
  17. package/dist/jsx-dev-runtime.d.ts +4 -0
  18. package/dist/jsx-dev-runtime.js +43 -0
  19. package/dist/jsx-dev-runtime.js.map +1 -0
  20. package/dist/jsx-runtime.d.ts +50 -0
  21. package/dist/jsx-runtime.js +27 -0
  22. package/dist/jsx-runtime.js.map +1 -0
  23. package/dist/jsx-utils.d.ts +3 -0
  24. package/dist/jsx-utils.js +40 -0
  25. package/dist/jsx-utils.js.map +1 -0
  26. package/dist/prod/UI5Element.js +1 -1
  27. package/dist/prod/UI5Element.js.map +3 -3
  28. package/dist/prod/decorators/bound.js +2 -0
  29. package/dist/prod/decorators/bound.js.map +7 -0
  30. package/dist/prod/decorators.js +1 -1
  31. package/dist/prod/decorators.js.map +3 -3
  32. package/dist/prod/generated/VersionInfo.js +1 -1
  33. package/dist/prod/generated/VersionInfo.js.map +2 -2
  34. package/dist/prod/index.d.js +2 -0
  35. package/dist/prod/index.d.js.map +7 -0
  36. package/dist/prod/jsx-dev-runtime.js +2 -0
  37. package/dist/prod/jsx-dev-runtime.js.map +7 -0
  38. package/dist/prod/jsx-runtime.js +2 -0
  39. package/dist/prod/jsx-runtime.js.map +7 -0
  40. package/dist/prod/jsx-utils.js +2 -0
  41. package/dist/prod/jsx-utils.js.map +7 -0
  42. package/dist/prod/renderer/JsxRenderer.js +2 -0
  43. package/dist/prod/renderer/JsxRenderer.js.map +7 -0
  44. package/dist/prod/renderer/LitRenderer.js +1 -1
  45. package/dist/prod/renderer/LitRenderer.js.map +3 -3
  46. package/dist/prod/renderer/executeTemplate.js +1 -1
  47. package/dist/prod/renderer/executeTemplate.js.map +3 -3
  48. package/dist/prod/thirdparty/preact/jsx.d.js +2 -0
  49. package/dist/prod/thirdparty/preact/jsx.d.js.map +7 -0
  50. package/dist/prod/thirdparty/preact/jsxRuntime.module.d.js +2 -0
  51. package/dist/prod/thirdparty/preact/jsxRuntime.module.d.js.map +7 -0
  52. package/dist/prod/thirdparty/preact/preact.module.d.js +2 -0
  53. package/dist/prod/thirdparty/preact/preact.module.d.js.map +7 -0
  54. package/dist/prod/updateShadowRoot.js +1 -1
  55. package/dist/prod/updateShadowRoot.js.map +3 -3
  56. package/dist/prod/util/StringHelper.js +1 -1
  57. package/dist/prod/util/StringHelper.js.map +3 -3
  58. package/dist/prod/util/dragAndDrop/DragRegistry.js +1 -1
  59. package/dist/prod/util/dragAndDrop/DragRegistry.js.map +2 -2
  60. package/dist/prod/util/dragAndDrop/handleDragOver.js +2 -0
  61. package/dist/prod/util/dragAndDrop/handleDragOver.js.map +7 -0
  62. package/dist/prod/util/dragAndDrop/handleDrop.js +2 -0
  63. package/dist/prod/util/dragAndDrop/handleDrop.js.map +7 -0
  64. package/dist/prod/util/hash2str.js +2 -0
  65. package/dist/prod/util/hash2str.js.map +7 -0
  66. package/dist/prod/util/toLowercaseEnumValue.js +2 -0
  67. package/dist/prod/util/toLowercaseEnumValue.js.map +7 -0
  68. package/dist/renderer/JsxRenderer.d.ts +3 -0
  69. package/dist/renderer/JsxRenderer.js +16 -0
  70. package/dist/renderer/JsxRenderer.js.map +1 -0
  71. package/dist/renderer/LitRenderer.js +4 -3
  72. package/dist/renderer/LitRenderer.js.map +1 -1
  73. package/dist/renderer/executeTemplate.d.ts +3 -12
  74. package/dist/renderer/executeTemplate.js +1 -20
  75. package/dist/renderer/executeTemplate.js.map +1 -1
  76. package/dist/thirdparty/preact/jsx.d.ts +2616 -0
  77. package/dist/thirdparty/preact/jsxRuntime.module.d.ts +62 -0
  78. package/dist/thirdparty/preact/jsxRuntime.module.js +2 -0
  79. package/dist/thirdparty/preact/preact.module.d.ts +398 -0
  80. package/dist/thirdparty/preact/preact.module.js +2 -0
  81. package/dist/types.d.ts +24 -21
  82. package/dist/types.js.map +1 -1
  83. package/dist/updateShadowRoot.js +1 -2
  84. package/dist/updateShadowRoot.js.map +1 -1
  85. package/dist/util/StringHelper.d.ts +2 -1
  86. package/dist/util/StringHelper.js +4 -1
  87. package/dist/util/StringHelper.js.map +1 -1
  88. package/dist/util/dragAndDrop/DragRegistry.d.ts +22 -1
  89. package/dist/util/dragAndDrop/DragRegistry.js.map +1 -1
  90. package/dist/util/dragAndDrop/handleDragOver.d.ts +16 -0
  91. package/dist/util/dragAndDrop/handleDragOver.js +42 -0
  92. package/dist/util/dragAndDrop/handleDragOver.js.map +1 -0
  93. package/dist/util/dragAndDrop/handleDrop.d.ts +5 -0
  94. package/dist/util/dragAndDrop/handleDrop.js +22 -0
  95. package/dist/util/dragAndDrop/handleDrop.js.map +1 -0
  96. package/dist/util/getClassCopy.d.ts +6 -0
  97. package/dist/util/hash2str.d.ts +1 -0
  98. package/dist/util/hash2str.js +14 -0
  99. package/dist/util/hash2str.js.map +1 -0
  100. package/dist/util/toLowercaseEnumValue.d.ts +3 -0
  101. package/dist/util/toLowercaseEnumValue.js +4 -0
  102. package/dist/util/toLowercaseEnumValue.js.map +1 -0
  103. package/index.js +0 -6
  104. package/package.json +10 -5
  105. package/src/thirdparty/preact/jsxRuntime.module.js +2 -0
  106. package/src/thirdparty/preact/preact.module.js +2 -0
  107. package/src/thirdparty/preact/version.txt +1 -0
  108. package/dist/prod/types/AriaHasPopup.js +0 -2
  109. package/dist/prod/types/AriaHasPopup.js.map +0 -7
  110. package/dist/prod/types/AriaLandmarkRole.js +0 -2
  111. package/dist/prod/types/AriaLandmarkRole.js.map +0 -7
  112. package/dist/prod/types/AriaRole.js +0 -2
  113. package/dist/prod/types/AriaRole.js.map +0 -7
  114. package/dist/prod/util/getParentElement.js +0 -2
  115. package/dist/prod/util/getParentElement.js.map +0 -7
  116. package/dist/prod/util/isElementContainingBlock.js +0 -2
  117. package/dist/prod/util/isElementContainingBlock.js.map +0 -7
  118. package/dist/types/AriaHasPopup.d.ts +0 -32
  119. package/dist/types/AriaHasPopup.js +0 -34
  120. package/dist/types/AriaHasPopup.js.map +0 -1
  121. package/dist/types/AriaLandmarkRole.d.ts +0 -79
  122. package/dist/types/AriaLandmarkRole.js +0 -81
  123. package/dist/types/AriaLandmarkRole.js.map +0 -1
  124. package/dist/types/AriaRole.d.ts +0 -27
  125. package/dist/types/AriaRole.js +0 -29
  126. package/dist/types/AriaRole.js.map +0 -1
  127. package/dist/util/getParentElement.d.ts +0 -2
  128. package/dist/util/getParentElement.js +0 -5
  129. package/dist/util/getParentElement.js.map +0 -1
  130. package/dist/util/isElementContainingBlock.d.ts +0 -2
  131. package/dist/util/isElementContainingBlock.js +0 -11
  132. package/dist/util/isElementContainingBlock.js.map +0 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/decorators.ts"],
4
- "sourcesContent": ["import customElement from \"./decorators/customElement.js\";\nimport event from \"./decorators/event.js\";\nimport eventStrict from \"./decorators/event-strict.js\";\nimport property from \"./decorators/property.js\";\nimport slot from \"./decorators/slot.js\";\n\nexport {\n\tcustomElement,\n\tevent,\n\teventStrict,\n\tproperty,\n\tslot,\n};\n"],
5
- "mappings": "aAAA,OAAOA,MAAmB,gCAC1B,OAAOC,MAAW,wBAClB,OAAOC,MAAiB,+BACxB,OAAOC,MAAc,2BACrB,OAAOC,MAAU,uBAEjB,OACCJ,KAAA,cACAC,KAAA,MACAC,KAAA,YACAC,KAAA,SACAC,KAAA",
6
- "names": ["customElement", "event", "eventStrict", "property", "slot"]
4
+ "sourcesContent": ["import customElement from \"./decorators/customElement.js\";\nimport event from \"./decorators/event.js\";\nimport eventStrict from \"./decorators/event-strict.js\";\nimport property from \"./decorators/property.js\";\nimport slot from \"./decorators/slot.js\";\nimport bound from \"./decorators/bound.js\";\nimport i18n from \"./decorators/i18n.js\";\n\nexport {\n\tcustomElement,\n\tevent,\n\teventStrict,\n\tproperty,\n\tslot,\n\tbound,\n\ti18n,\n};\n"],
5
+ "mappings": "aAAA,OAAOA,MAAmB,gCAC1B,OAAOC,MAAW,wBAClB,OAAOC,MAAiB,+BACxB,OAAOC,MAAc,2BACrB,OAAOC,MAAU,uBACjB,OAAOC,MAAW,wBAClB,OAAOC,MAAU,uBAEjB,OACCN,KAAA,cACAC,KAAA,MACAC,KAAA,YACAC,KAAA,SACAC,KAAA,KACAC,KAAA,MACAC,KAAA",
6
+ "names": ["customElement", "event", "eventStrict", "property", "slot", "bound", "i18n"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const e={version:"2.5.0",major:2,minor:5,patch:0,suffix:"",isNext:!1,buildTime:1733409507};export default e;
1
+ "use strict";const e={version:"2.6.0-rc.0",major:2,minor:6,patch:0,suffix:"-rc.0",isNext:!1,buildTime:1733990927};export default e;
2
2
  //# sourceMappingURL=VersionInfo.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/generated/VersionInfo.ts"],
4
- "sourcesContent": ["const VersionInfo = {\n\tversion: \"2.5.0\",\n\tmajor: 2,\n\tminor: 5,\n\tpatch: 0,\n\tsuffix: \"\",\n\tisNext: false,\n\tbuildTime: 1733409507,\n};\nexport default VersionInfo;"],
5
- "mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,QACT,MAAO,EACP,MAAO,EACP,MAAO,EACP,OAAQ,GACR,OAAQ,GACR,UAAW,UACZ,EACA,eAAeA",
4
+ "sourcesContent": ["const VersionInfo = {\n\tversion: \"2.6.0-rc.0\",\n\tmajor: 2,\n\tminor: 6,\n\tpatch: 0,\n\tsuffix: \"-rc.0\",\n\tisNext: false,\n\tbuildTime: 1733990927,\n};\nexport default VersionInfo;"],
5
+ "mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,aACT,MAAO,EACP,MAAO,EACP,MAAO,EACP,OAAQ,QACR,OAAQ,GACR,UAAW,UACZ,EACA,eAAeA",
6
6
  "names": ["VersionInfo"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import{jsxDEV as i,Fragment as c}from"./thirdparty/preact/jsxRuntime.module.js";import{options as s}from"./thirdparty/preact/preact.module.js";import{isUI5ElementClass as m,preprocess as u}from"./jsx-utils.js";import{kebabToCamelCase as f}from"./util/StringHelper.js";const a=s.vnode;s.vnode=t=>{const e=t.props;e!==null&&typeof e=="object"&&e.class&&e.class,a&&a(t)};function E(t){return t.name.startsWith("bound ")||t.toString().includes("=>")}function d(t,e){if(!m(t))return;const n=t.getMetadata().getTag(),r=t.getMetadata().getAttributesList();Object.keys(e).forEach(o=>{o.includes("-")&&r.includes(o)&&console.warn(`Avoid attribute usage in favour of properties ['${o}' --> '${f(o)}'] for tag [${n}]. Check stack trace to find out which template causes this. Attributes are not type-checked and boolean conversion is manual and error-prone.`)})}export function Fragment(t,e){return c(t,e)}export function jsxDEV(t,e,n){const r=u(t,e,n);return d(t,e),i(r,e,n)}
2
+ //# sourceMappingURL=jsx-dev-runtime.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/jsx-dev-runtime.ts"],
4
+ "sourcesContent": ["// eslint-disable-next-line import/extensions\nimport { jsxDEV as _jsxDEV, Fragment as _Fragment } from \"./thirdparty/preact/jsxRuntime.module.js\";\nimport { options } from \"./thirdparty/preact/preact.module.js\";\nimport { type VNode } from \"./jsx-runtime.js\";\nimport type UI5Element from \"./UI5Element.js\";\nimport { isUI5ElementClass, preprocess } from \"./jsx-utils.js\";\nimport { kebabToCamelCase } from \"./util/StringHelper.js\";\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst old = options.vnode;\n\noptions.vnode = vnode => {\n\tconst props: Record<string, any> = vnode.props;\n\tif (props !== null && typeof props === \"object\") {\n\t\tif (props.class && typeof props.class === \"object\") {\n\t\t\t// props.class = classObjToStr(props.class as Record<string, boolean>);\n\t\t}\n\t}\n\told && old(vnode);\n};\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nfunction isBoundOrArrow(func: Function): boolean {\n\t// TODO improve => detection after func params\n\treturn func.name.startsWith(\"bound \") || func.toString().includes(\"=>\");\n}\n\nfunction checkAttributeUsage(type: string | typeof UI5Element, props: Record<string, any>) {\n\tif (!isUI5ElementClass(type)) {\n\t\treturn;\n\t}\n\n\tconst tag = type.getMetadata().getTag();\n\tconst componentAttributes = type.getMetadata().getAttributesList();\n\tObject.keys(props).forEach(prop => {\n\t\tif (prop.includes(\"-\") && componentAttributes.includes(prop)) {\n\t\t\t// eslint-disable-next-line no-console\n\t\t\tconsole.warn(`Avoid attribute usage in favour of properties ['${prop}' --> '${kebabToCamelCase(prop)}'] for tag [${tag}]. Check stack trace to find out which template causes this. Attributes are not type-checked and boolean conversion is manual and error-prone.`);\n\t\t}\n\t});\n}\n\nexport function Fragment(props: Record<string, any>, context?: any) {\n\treturn _Fragment(props, context);\n}\n\nexport function jsxDEV(type: string | typeof UI5Element, props: Record<string, any>, key: string): VNode<any> {\n\tconst tag = preprocess(type, props, key);\n\n\tcheckAttributeUsage(type, props);\n\n\treturn _jsxDEV(tag, props, key) as VNode<any>;\n}\n"],
5
+ "mappings": "aACA,OAAS,UAAUA,EAAS,YAAYC,MAAiB,2CACzD,OAAS,WAAAC,MAAe,uCAGxB,OAAS,qBAAAC,EAAmB,cAAAC,MAAkB,iBAC9C,OAAS,oBAAAC,MAAwB,yBAGjC,MAAMC,EAAMJ,EAAQ,MAEpBA,EAAQ,MAAQK,GAAS,CACxB,MAAMC,EAA6BD,EAAM,MACrCC,IAAU,MAAQ,OAAOA,GAAU,UAClCA,EAAM,OAAgBA,EAAM,MAIjCF,GAAOA,EAAIC,CAAK,CACjB,EAGA,SAASE,EAAeC,EAAyB,CAEhD,OAAOA,EAAK,KAAK,WAAW,QAAQ,GAAKA,EAAK,SAAS,EAAE,SAAS,IAAI,CACvE,CAEA,SAASC,EAAoBC,EAAkCJ,EAA4B,CAC1F,GAAI,CAACL,EAAkBS,CAAI,EAC1B,OAGD,MAAMC,EAAMD,EAAK,YAAY,EAAE,OAAO,EAChCE,EAAsBF,EAAK,YAAY,EAAE,kBAAkB,EACjE,OAAO,KAAKJ,CAAK,EAAE,QAAQO,GAAQ,CAC9BA,EAAK,SAAS,GAAG,GAAKD,EAAoB,SAASC,CAAI,GAE1D,QAAQ,KAAK,mDAAmDA,CAAI,UAAUV,EAAiBU,CAAI,CAAC,eAAeF,CAAG,gJAAgJ,CAExQ,CAAC,CACF,CAEO,gBAAS,SAASL,EAA4BQ,EAAe,CACnE,OAAOf,EAAUO,EAAOQ,CAAO,CAChC,CAEO,gBAAS,OAAOJ,EAAkCJ,EAA4BS,EAAyB,CAC7G,MAAMJ,EAAMT,EAAWQ,EAAMJ,EAAOS,CAAG,EAEvC,OAAAN,EAAoBC,EAAMJ,CAAK,EAExBR,EAAQa,EAAKL,EAAOS,CAAG,CAC/B",
6
+ "names": ["_jsxDEV", "_Fragment", "options", "isUI5ElementClass", "preprocess", "kebabToCamelCase", "old", "vnode", "props", "isBoundOrArrow", "func", "checkAttributeUsage", "type", "tag", "componentAttributes", "prop", "context", "key"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import{jsx as a,jsxs as p,Fragment as d}from"./thirdparty/preact/jsxRuntime.module.js";import{options as s}from"./thirdparty/preact/preact.module.js";import{preprocess as o}from"./jsx-utils.js";const i=s.vnode;s.vnode=t=>{const e=t.props;e!==null&&typeof e=="object"&&e.class&&e.class,i&&i(t)};export function Fragment(t,e){return d(t,e)}export function jsx(t,e,n){const r=o(t,e,n);return a(r,e,n)}export function jsxs(t,e,n){const r=o(t,e,n);return p(r,e,n)}export{};export{};
2
+ //# sourceMappingURL=jsx-runtime.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/jsx-runtime.ts"],
4
+ "sourcesContent": ["// eslint-disable-next-line import/extensions\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"./thirdparty/preact/jsxRuntime.module.js\";\nimport type { JSX as _JSX } from \"./thirdparty/preact/jsxRuntime.module.d.ts\";\nimport { options, type VNode as _VNode } from \"./thirdparty/preact/preact.module.js\";\nimport type UI5Element from \"./UI5Element.js\";\nimport { preprocess } from \"./jsx-utils.js\";\nimport { jsxDEV } from \"./jsx-dev-runtime.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\ndeclare namespace JSX {\n\ttype JSXWithClassObj = { [K in keyof _JSX.IntrinsicElements]: Omit<_JSX.IntrinsicElements[K], \"class\"> & { class?: object | string | undefined } };\n\ttype AllHTMLAttributesWithClassObj<T extends EventTarget> = Omit<_JSX.AllHTMLAttributes<T>, \"class\"> & { class?: object | string | undefined }\n\ttype HTMLAttributesWithClassObj<T extends EventTarget> = Omit<_JSX.HTMLAttributes<T>, \"class\"> & { class?: object | string | undefined }\n export interface IntrinsicElements extends JSXWithClassObj {}\n export type ElementClass = UI5Element;\n\texport interface Element extends VNode<any> {}\n export interface ElementAttributesProperty<T extends EventTarget> {\n\t\t_jsxProps: HTMLAttributes<T>;\n\t}\n\texport interface AllHTMLAttributes<T extends EventTarget> extends AllHTMLAttributesWithClassObj<T> {}\n\texport interface HTMLAttributes<T extends EventTarget> extends HTMLAttributesWithClassObj<T> {}\n\texport interface DOMAttributes<T extends EventTarget> extends _JSX.DOMAttributes<T> {}\n\texport interface SVGAttributes extends _JSX.SVGAttributes {}\n\texport type AriaRole = _JSX.AriaRole;\n\texport type MouseEventHandler<T extends EventTarget> = _JSX.MouseEventHandler<T>;\n\texport type TargetedMouseEvent<Target extends EventTarget> = _JSX.TargetedMouseEvent<Target>;\n\texport type TargetedInputEvent<Target extends EventTarget> = _JSX.TargetedInputEvent<Target>;\n}\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst old = options.vnode;\n\noptions.vnode = vnode => {\n\tconst props: Record<string, any> = vnode.props;\n\tif (props !== null && typeof props === \"object\") {\n\t\tif (props.class && typeof props.class === \"object\") {\n\t\t\t// props.class = classObjToStr(props.class as Record<string, boolean>);\n\t\t}\n\t}\n\told && old(vnode);\n};\n\nexport function Fragment(props: Record<string, any>, context?: any) {\n\treturn _Fragment(props, context);\n}\nexport function jsx(type: string | typeof UI5Element, props: Record<string, any>, key: string): VNode<any> {\n\tconst tag = preprocess(type, props, key);\n\n\treturn _jsx(tag, props, key) as VNode<any>;\n}\nexport function jsxs(type: string | typeof UI5Element, props: Record<string, any>, key: string): VNode<any> {\n\tconst tag = preprocess(type, props, key);\n\n\treturn _jsxs(tag, props, key) as VNode<any>;\n}\nexport { type jsxDEV };\n\nexport type ComponentChild =\n\t| VNode<any>\n\t| object\n\t| string\n\t| number\n\t| bigint\n\t| boolean\n\t| null\n\t| undefined;\nexport type ComponentChildren = ComponentChild[] | ComponentChild;\n\nexport type VNode<T = {}> = Omit<_VNode<T>, \"type\" | \"props\"> & { type: string | typeof UI5Element, props: T & { children: ComponentChildren } };\n\nexport { JSX };\n"],
5
+ "mappings": "aACA,OAAS,OAAOA,EAAM,QAAQC,EAAO,YAAYC,MAAiB,2CAElE,OAAS,WAAAC,MAAqC,uCAE9C,OAAS,cAAAC,MAAkB,iBAyB3B,MAAMC,EAAMF,EAAQ,MAEpBA,EAAQ,MAAQG,GAAS,CACxB,MAAMC,EAA6BD,EAAM,MACrCC,IAAU,MAAQ,OAAOA,GAAU,UAClCA,EAAM,OAAgBA,EAAM,MAIjCF,GAAOA,EAAIC,CAAK,CACjB,EAEO,gBAAS,SAASC,EAA4BC,EAAe,CACnE,OAAON,EAAUK,EAAOC,CAAO,CAChC,CACO,gBAAS,IAAIC,EAAkCF,EAA4BG,EAAyB,CAC1G,MAAMC,EAAMP,EAAWK,EAAMF,EAAOG,CAAG,EAEvC,OAAOV,EAAKW,EAAKJ,EAAOG,CAAG,CAC5B,CACO,gBAAS,KAAKD,EAAkCF,EAA4BG,EAAyB,CAC3G,MAAMC,EAAMP,EAAWK,EAAMF,EAAOG,CAAG,EAEvC,OAAOT,EAAMU,EAAKJ,EAAOG,CAAG,CAC7B,CACA,SAeA",
6
+ "names": ["_jsx", "_jsxs", "_Fragment", "options", "preprocess", "old", "vnode", "props", "context", "type", "key", "tag"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import g from"./util/hash2str.js";import{pascalToKebabCase as f}from"./util/StringHelper.js";function l(t,e,s){const a=t.getMetadata().getTag(),o=t.getMetadata().getEvents();Object.keys(e).forEach(n=>{if(n.startsWith("on")){const c=n.slice(2),i=f(c);i in o&&n!=="onClick"&&(e[`onui5-${i}`]=e[n],delete e[n])}})}export function isUI5ElementClass(t){return typeof t=="function"&&"getMetadata"in t}export function preprocess(t,e,s){let a;return isUI5ElementClass(t)?(a=t.getMetadata().getTag(),l(t,e,s)):a=t,typeof e.class=="object"&&(e.class=g(e.class)),a}
2
+ //# sourceMappingURL=jsx-utils.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/jsx-utils.ts"],
4
+ "sourcesContent": ["import type UI5Element from \"./UI5Element.js\";\nimport hash2str from \"./util/hash2str.js\";\nimport { pascalToKebabCase } from \"./util/StringHelper.js\";\n\nfunction convertEventScoping(type: typeof UI5Element, props: Record<string, any>, key: string) {\n\tconst tag = type.getMetadata().getTag();\n\n\tconst events = type.getMetadata().getEvents();\n\n\tObject.keys(props).forEach(prop => {\n\t\tif (prop.startsWith(\"on\")) {\n\t\t\t// Exteract the kebab-case event: onChange - change, onSelectionChange - selection-change, etc.\n\t\t\tconst pascalEvent = prop.slice(\"on\".length);\n\t\t\tconst kebabCaseEvent = pascalToKebabCase(pascalEvent);\n\n\t\t\t// Attach for the \"ui5-\" preffixed event\n\t\t\tif (kebabCaseEvent in events) {\n\t\t\t\tif ((prop !== \"onClick\")) {\n\t\t\t\t\tprops[`onui5-${kebabCaseEvent}`] = props[prop];\n\t\t\t\t\t// TODO keep native events for now, find a way to mark them for runtime\n\t\t\t\t\tdelete props[prop];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t});\n}\n\nexport function isUI5ElementClass(type: string | typeof UI5Element): type is typeof UI5Element {\n\treturn typeof type === \"function\" && \"getMetadata\" in type;\n}\n\nexport function preprocess(type: string | typeof UI5Element, props: Record<string, any>, key: string) {\n\tlet tag: string;\n\tif (isUI5ElementClass(type)) {\n\t\ttag = type.getMetadata().getTag();\n\t\tconvertEventScoping(type, props, key);\n\t} else {\n\t\ttag = type;\n\t}\n\n\t// convert class object to string\n\tif (typeof props.class === \"object\") {\n\t\tprops.class = hash2str(props.class);\n\t}\n\n\treturn tag;\n}\n"],
5
+ "mappings": "aACA,OAAOA,MAAc,qBACrB,OAAS,qBAAAC,MAAyB,yBAElC,SAASC,EAAoBC,EAAyBC,EAA4BC,EAAa,CAC9F,MAAMC,EAAMH,EAAK,YAAY,EAAE,OAAO,EAEhCI,EAASJ,EAAK,YAAY,EAAE,UAAU,EAE5C,OAAO,KAAKC,CAAK,EAAE,QAAQI,GAAQ,CAClC,GAAIA,EAAK,WAAW,IAAI,EAAG,CAE1B,MAAMC,EAAcD,EAAK,MAAM,CAAW,EACpCE,EAAiBT,EAAkBQ,CAAW,EAGhDC,KAAkBH,GAChBC,IAAS,YACbJ,EAAM,SAASM,CAAc,EAAE,EAAIN,EAAMI,CAAI,EAE7C,OAAOJ,EAAMI,CAAI,EAGpB,CACD,CAAC,CACF,CAEO,gBAAS,kBAAkBL,EAA6D,CAC9F,OAAO,OAAOA,GAAS,YAAc,gBAAiBA,CACvD,CAEO,gBAAS,WAAWA,EAAkCC,EAA4BC,EAAa,CACrG,IAAIC,EACJ,OAAI,kBAAkBH,CAAI,GACzBG,EAAMH,EAAK,YAAY,EAAE,OAAO,EAChCD,EAAoBC,EAAMC,EAAOC,CAAG,GAEpCC,EAAMH,EAIH,OAAOC,EAAM,OAAU,WAC1BA,EAAM,MAAQJ,EAASI,EAAM,KAAK,GAG5BE,CACR",
6
+ "names": ["hash2str", "pascalToKebabCase", "convertEventScoping", "type", "props", "key", "tag", "events", "prop", "pascalEvent", "kebabCaseEvent"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import{render as n,createContext as l}from"../thirdparty/preact/preact.module.js";import{jsx as p}from"../thirdparty/preact/jsxRuntime.module.js";const r=new WeakMap,d=(e,o)=>{let t=r.get(e);t||(t=l(e),r.set(e,t));const m=e.render();n(p(t.Provider,{value:e,children:m}),o)};export default d;
2
+ //# sourceMappingURL=JsxRenderer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/renderer/JsxRenderer.ts"],
4
+ "sourcesContent": ["import { render, createContext } from \"../thirdparty/preact/preact.module.js\";\nimport { jsx } from \"../thirdparty/preact/jsxRuntime.module.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\n\nconst instanceToContextMap = new WeakMap<UI5Element, ReturnType<typeof createContext<UI5Element>>>();\n\nconst jsxRenderer: Renderer = (instance: UI5Element, container: HTMLElement | DocumentFragment) => {\n\tlet ctx = instanceToContextMap.get(instance);\n\tif (!ctx) {\n\t\t// create a context holding the element that is being rendered\n\t\t// this contect will be used when adding event listeners - they all will be bound to this element\n\t\tctx = createContext(instance);\n\t\tinstanceToContextMap.set(instance, ctx);\n\t}\n\tconst templateResult = instance.render();\n\trender(jsx(ctx.Provider, { value: instance, children: templateResult }), container);\n};\n\nexport default jsxRenderer;\n"],
5
+ "mappings": "aAAA,OAAS,UAAAA,EAAQ,iBAAAC,MAAqB,wCACtC,OAAS,OAAAC,MAAW,4CAIpB,MAAMC,EAAuB,IAAI,QAE3BC,EAAwB,CAACC,EAAsBC,IAA8C,CAClG,IAAIC,EAAMJ,EAAqB,IAAIE,CAAQ,EACtCE,IAGJA,EAAMN,EAAcI,CAAQ,EAC5BF,EAAqB,IAAIE,EAAUE,CAAG,GAEvC,MAAMC,EAAiBH,EAAS,OAAO,EACvCL,EAAOE,EAAIK,EAAI,SAAU,CAAE,MAAOF,EAAU,SAAUG,CAAe,CAAC,EAAGF,CAAS,CACnF,EAEA,eAAeF",
6
+ "names": ["render", "createContext", "jsx", "instanceToContextMap", "jsxRenderer", "instance", "container", "ctx", "templateResult"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";import{render as i,html as p,svg as s}from"lit-html";import{getFeature as o}from"../FeaturesRegistry.js";const m=(t,...n)=>{const e=o("LitStatic");return(e?e.html:p)(t,...n)},a=(t,...n)=>{const e=o("LitStatic");return(e?e.svg:s)(t,...n)},l=(t,n,e)=>{const r=o("OpenUI5Enablement");r&&(t=r.wrapTemplateResultInBusyMarkup(m,e.host,t)),i(t,n,e)},f=(t,n,e)=>{const r=o("LitStatic");if(r)return r.unsafeStatic((n||[]).includes(t)?`${t}-${e}`:t)};export{m as html,a as svg};export{f as scopeTag};export{repeat}from"lit-html/directives/repeat.js";export{classMap}from"lit-html/directives/class-map.js";export{styleMap}from"./directives/style-map.js";export{ifDefined}from"lit-html/directives/if-defined.js";export{unsafeHTML}from"lit-html/directives/unsafe-html.js";export default l;
1
+ "use strict";import{render as p,html as a,svg as s}from"lit-html";import{getFeature as o}from"../FeaturesRegistry.js";const m=(t,...r)=>{const e=o("LitStatic");return(e?e.html:a)(t,...r)},i=(t,...r)=>{const e=o("LitStatic");return(e?e.svg:s)(t,...r)},l=(t,r)=>{let e=t.render();const n=o("OpenUI5Enablement");n&&(e=n.wrapTemplateResultInBusyMarkup(m,t,e)),p(e,r,{host:t})},f=(t,r,e)=>{const n=o("LitStatic");if(n)return n.unsafeStatic((r||[]).includes(t)?`${t}-${e}`:t)};export{m as html,i as svg};export{f as scopeTag};export{repeat}from"lit-html/directives/repeat.js";export{classMap}from"lit-html/directives/class-map.js";export{styleMap}from"./directives/style-map.js";export{ifDefined}from"lit-html/directives/if-defined.js";export{unsafeHTML}from"lit-html/directives/unsafe-html.js";export default l;
2
2
  //# sourceMappingURL=LitRenderer.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/renderer/LitRenderer.ts"],
4
- "sourcesContent": ["import {\n\trender,\n\thtml,\n\tsvg,\n} from \"lit-html\";\n\nimport type { TemplateResult } from \"lit-html\";\n\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type { LitStatic } from \"../CustomElementsScope.js\";\nimport type OpenUI5Enablement from \"../features/OpenUI5Enablement.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport type { Renderer, RendererOptions } from \"../UI5Element.js\";\nimport type { TemplateFunctionResult } from \"./executeTemplate.js\";\n\nconst effectiveHtml = (strings: TemplateStringsArray, ...values: Array<unknown>) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tconst fn = litStatic ? litStatic.html : html;\n\treturn fn(strings, ...values);\n};\n\nconst effectiveSvg = (strings: TemplateStringsArray, ...values: Array<unknown>) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tconst fn = litStatic ? litStatic.svg : svg;\n\treturn fn(strings, ...values);\n};\n\nconst litRender: Renderer = (templateResult: TemplateFunctionResult, container: HTMLElement | DocumentFragment, options: RendererOptions) => {\n\tconst openUI5Enablement = getFeature<typeof OpenUI5Enablement>(\"OpenUI5Enablement\");\n\tif (openUI5Enablement) {\n\t\ttemplateResult = openUI5Enablement.wrapTemplateResultInBusyMarkup(effectiveHtml, options.host as UI5Element, templateResult as TemplateResult);\n\t}\n\n\trender(templateResult as TemplateResult, container, options);\n};\n\nconst scopeTag = (tag: string, tags: Array<string>, suffix: string) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tif (litStatic) {\n\t\treturn litStatic.unsafeStatic((tags || []).includes(tag) ? `${tag}-${suffix}` : tag);\n\t}\n};\n\nexport {\n\teffectiveHtml as html,\n\teffectiveSvg as svg,\n};\nexport { scopeTag };\nexport { repeat } from \"lit-html/directives/repeat.js\";\nexport { classMap } from \"lit-html/directives/class-map.js\";\n// @ts-ignore style-map is a JS file\nexport { styleMap } from \"./directives/style-map.js\";\nexport { ifDefined } from \"lit-html/directives/if-defined.js\";\nexport { unsafeHTML } from \"lit-html/directives/unsafe-html.js\";\n\nexport default litRender;\n"],
5
- "mappings": "aAAA,OACC,UAAAA,EACA,QAAAC,EACA,OAAAC,MACM,WAIP,OAAS,cAAAC,MAAkB,yBAO3B,MAAMC,EAAgB,CAACC,KAAkCC,IAA2B,CACnF,MAAMC,EAAYJ,EAA6B,WAAW,EAE1D,OADWI,EAAYA,EAAU,KAAON,GAC9BI,EAAS,GAAGC,CAAM,CAC7B,EAEME,EAAe,CAACH,KAAkCC,IAA2B,CAClF,MAAMC,EAAYJ,EAA6B,WAAW,EAE1D,OADWI,EAAYA,EAAU,IAAML,GAC7BG,EAAS,GAAGC,CAAM,CAC7B,EAEMG,EAAsB,CAACC,EAAwCC,EAA2CC,IAA6B,CAC5I,MAAMC,EAAoBV,EAAqC,mBAAmB,EAC9EU,IACHH,EAAiBG,EAAkB,+BAA+BT,EAAeQ,EAAQ,KAAoBF,CAAgC,GAG9IV,EAAOU,EAAkCC,EAAWC,CAAO,CAC5D,EAEME,EAAW,CAACC,EAAaC,EAAqBC,IAAmB,CACtE,MAAMV,EAAYJ,EAA6B,WAAW,EAC1D,GAAII,EACH,OAAOA,EAAU,cAAcS,GAAQ,CAAC,GAAG,SAASD,CAAG,EAAI,GAAGA,CAAG,IAAIE,CAAM,GAAKF,CAAG,CAErF,EAEA,OACCX,KAAiB,KACjBI,KAAgB,KAEjB,OAASM,KAAA,UACT,OAAS,WAAc,gCACvB,OAAS,aAAgB,mCAEzB,OAAS,aAAgB,4BACzB,OAAS,cAAiB,oCAC1B,OAAS,eAAkB,qCAE3B,eAAeL",
6
- "names": ["render", "html", "svg", "getFeature", "effectiveHtml", "strings", "values", "litStatic", "effectiveSvg", "litRender", "templateResult", "container", "options", "openUI5Enablement", "scopeTag", "tag", "tags", "suffix"]
4
+ "sourcesContent": ["import {\n\trender,\n\thtml,\n\tsvg,\n} from \"lit-html\";\n\nimport type { TemplateResult } from \"lit-html\";\n\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type { LitStatic } from \"../CustomElementsScope.js\";\nimport type OpenUI5Enablement from \"../features/OpenUI5Enablement.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\n\nconst effectiveHtml = (strings: TemplateStringsArray, ...values: Array<unknown>) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tconst fn = litStatic ? litStatic.html : html;\n\treturn fn(strings, ...values);\n};\n\nconst effectiveSvg = (strings: TemplateStringsArray, ...values: Array<unknown>) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tconst fn = litStatic ? litStatic.svg : svg;\n\treturn fn(strings, ...values);\n};\n\nconst litRender: Renderer = (instance: UI5Element, container: HTMLElement | DocumentFragment) => {\n\tlet templateResult = instance.render();\n\tconst openUI5Enablement = getFeature<typeof OpenUI5Enablement>(\"OpenUI5Enablement\");\n\tif (openUI5Enablement) {\n\t\ttemplateResult = openUI5Enablement.wrapTemplateResultInBusyMarkup(effectiveHtml, instance, templateResult as TemplateResult);\n\t}\n\n\trender(templateResult as TemplateResult, container, { host: instance });\n};\n\nconst scopeTag = (tag: string, tags: Array<string>, suffix: string) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tif (litStatic) {\n\t\treturn litStatic.unsafeStatic((tags || []).includes(tag) ? `${tag}-${suffix}` : tag);\n\t}\n};\n\nexport {\n\teffectiveHtml as html,\n\teffectiveSvg as svg,\n};\nexport { scopeTag };\nexport { repeat } from \"lit-html/directives/repeat.js\";\nexport { classMap } from \"lit-html/directives/class-map.js\";\n// @ts-ignore style-map is a JS file\nexport { styleMap } from \"./directives/style-map.js\";\nexport { ifDefined } from \"lit-html/directives/if-defined.js\";\nexport { unsafeHTML } from \"lit-html/directives/unsafe-html.js\";\n\nexport default litRender;\n"],
5
+ "mappings": "aAAA,OACC,UAAAA,EACA,QAAAC,EACA,OAAAC,MACM,WAIP,OAAS,cAAAC,MAAkB,yBAM3B,MAAMC,EAAgB,CAACC,KAAkCC,IAA2B,CACnF,MAAMC,EAAYJ,EAA6B,WAAW,EAE1D,OADWI,EAAYA,EAAU,KAAON,GAC9BI,EAAS,GAAGC,CAAM,CAC7B,EAEME,EAAe,CAACH,KAAkCC,IAA2B,CAClF,MAAMC,EAAYJ,EAA6B,WAAW,EAE1D,OADWI,EAAYA,EAAU,IAAML,GAC7BG,EAAS,GAAGC,CAAM,CAC7B,EAEMG,EAAsB,CAACC,EAAsBC,IAA8C,CAChG,IAAIC,EAAiBF,EAAS,OAAO,EACrC,MAAMG,EAAoBV,EAAqC,mBAAmB,EAC9EU,IACHD,EAAiBC,EAAkB,+BAA+BT,EAAeM,EAAUE,CAAgC,GAG5HZ,EAAOY,EAAkCD,EAAW,CAAE,KAAMD,CAAS,CAAC,CACvE,EAEMI,EAAW,CAACC,EAAaC,EAAqBC,IAAmB,CACtE,MAAMV,EAAYJ,EAA6B,WAAW,EAC1D,GAAII,EACH,OAAOA,EAAU,cAAcS,GAAQ,CAAC,GAAG,SAASD,CAAG,EAAI,GAAGA,CAAG,IAAIE,CAAM,GAAKF,CAAG,CAErF,EAEA,OACCX,KAAiB,KACjBI,KAAgB,KAEjB,OAASM,KAAA,UACT,OAAS,WAAc,gCACvB,OAAS,aAAgB,mCAEzB,OAAS,aAAgB,4BACzB,OAAS,cAAiB,oCAC1B,OAAS,eAAkB,qCAE3B,eAAeL",
6
+ "names": ["render", "html", "svg", "getFeature", "effectiveHtml", "strings", "values", "litStatic", "effectiveSvg", "litRender", "instance", "container", "templateResult", "openUI5Enablement", "scopeTag", "tag", "tags", "suffix"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import{getCustomElementsScopingSuffix as a,shouldScopeCustomElement as p}from"../CustomElementsScopeUtils.js";const l=(n,e)=>{const t=c(e),o=a();return n.call(e,e,t,o)},c=n=>{const e=n.constructor,t=e.getMetadata().getPureTag(),o=e.getUniqueDependencies().map(s=>s.getMetadata().getPureTag()).filter(p);return p(t)&&o.push(t),o};export default l;export{c as getTagsToScope};
1
+ "use strict";const n=(e,t)=>e.call(t);export default n;
2
2
  //# sourceMappingURL=executeTemplate.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/renderer/executeTemplate.ts"],
4
- "sourcesContent": ["import { getCustomElementsScopingSuffix, shouldScopeCustomElement } from \"../CustomElementsScopeUtils.js\";\nimport type UI5Element from \"../UI5Element.js\";\n\ntype TemplateFunctionResult = object;\ntype TemplateFunction = (component: UI5Element, tagsToScope: Array<string>, scope: string | undefined) => TemplateFunctionResult;\n\n/**\n * Runs a component's template with the component's current state, while also scoping HTML\n *\n * @param template - the template to execute\n * @param component - the component\n * @public\n */\nconst executeTemplate = (template: TemplateFunction, component: UI5Element): TemplateFunctionResult => {\n\tconst tagsToScope = getTagsToScope(component);\n\tconst scope = getCustomElementsScopingSuffix();\n\treturn template.call(component, component, tagsToScope, scope);\n};\n\n/**\n * Returns all tags, used inside component's template subject to scoping.\n * @param component - the component\n * @returns {Array[]}\n * @private\n */\nconst getTagsToScope = (component: UI5Element) => {\n\tconst ctor = component.constructor as typeof UI5Element;\n\n\tconst componentTag = ctor.getMetadata().getPureTag();\n\tconst tagsToScope = ctor.getUniqueDependencies().map((dep: typeof UI5Element) => dep.getMetadata().getPureTag()).filter(shouldScopeCustomElement);\n\n\tif (shouldScopeCustomElement(componentTag)) {\n\t\ttagsToScope.push(componentTag);\n\t}\n\n\treturn tagsToScope;\n};\n\nexport default executeTemplate;\nexport { getTagsToScope };\nexport type { TemplateFunction, TemplateFunctionResult };\n"],
5
- "mappings": "aAAA,OAAS,kCAAAA,EAAgC,4BAAAC,MAAgC,iCAazE,MAAMC,EAAkB,CAACC,EAA4BC,IAAkD,CACtG,MAAMC,EAAcC,EAAeF,CAAS,EACtCG,EAAQP,EAA+B,EAC7C,OAAOG,EAAS,KAAKC,EAAWA,EAAWC,EAAaE,CAAK,CAC9D,EAQMD,EAAkBF,GAA0B,CACjD,MAAMI,EAAOJ,EAAU,YAEjBK,EAAeD,EAAK,YAAY,EAAE,WAAW,EAC7CH,EAAcG,EAAK,sBAAsB,EAAE,IAAKE,GAA2BA,EAAI,YAAY,EAAE,WAAW,CAAC,EAAE,OAAOT,CAAwB,EAEhJ,OAAIA,EAAyBQ,CAAY,GACxCJ,EAAY,KAAKI,CAAY,EAGvBJ,CACR,EAEA,eAAeH,EACf,OAASI,KAAA",
6
- "names": ["getCustomElementsScopingSuffix", "shouldScopeCustomElement", "executeTemplate", "template", "component", "tagsToScope", "getTagsToScope", "scope", "ctor", "componentTag", "dep"]
4
+ "sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\n\ntype TemplateFunction = () => object;\n\n/**\n * Runs a component's template with the component's current state, while also scoping HTML\n *\n * @param template - the template to execute\n * @param component - the component\n * @public\n */\nconst executeTemplate = (template: TemplateFunction, component: UI5Element) => {\n\treturn template.call(component);\n};\n\nexport default executeTemplate;\nexport type { TemplateFunction };\n"],
5
+ "mappings": "aAWA,MAAMA,EAAkB,CAACC,EAA4BC,IAC7CD,EAAS,KAAKC,CAAS,EAG/B,eAAeF",
6
+ "names": ["executeTemplate", "template", "component"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=jsx.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";export{Fragment}from"./preact.module.d.ts";import{JSXInternal as n}from"./jsx.d.ts";export{n as JSX};
2
+ //# sourceMappingURL=jsxRuntime.module.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/thirdparty/preact/jsxRuntime.module.d.ts"],
4
+ "sourcesContent": ["// Intentionally not using a relative path to take advantage of\n// the TS version resolution mechanism\nexport { Fragment } from './preact.module.d.ts';\nimport {\n\tComponentType,\n\tComponentChild,\n\tComponentChildren,\n\tVNode,\n\tAttributes\n} from './preact.module.d.ts';\nimport { JSXInternal } from './jsx.d.ts';\n\nexport function jsx(\n\ttype: string,\n\tprops: JSXInternal.HTMLAttributes &\n\t\tJSXInternal.SVGAttributes &\n\t\tRecord<string, any> & { children?: ComponentChild },\n\tkey?: string\n): VNode<any>;\nexport function jsx<P>(\n\ttype: ComponentType<P>,\n\tprops: Attributes & P & { children?: ComponentChild },\n\tkey?: string\n): VNode<any>;\n\nexport function jsxs(\n\ttype: string,\n\tprops: JSXInternal.HTMLAttributes &\n\t\tJSXInternal.SVGAttributes &\n\t\tRecord<string, any> & { children?: ComponentChild[] },\n\tkey?: string\n): VNode<any>;\nexport function jsxs<P>(\n\ttype: ComponentType<P>,\n\tprops: Attributes & P & { children?: ComponentChild[] },\n\tkey?: string\n): VNode<any>;\n\nexport function jsxDEV(\n\ttype: string,\n\tprops: JSXInternal.HTMLAttributes &\n\t\tJSXInternal.SVGAttributes &\n\t\tRecord<string, any> & { children?: ComponentChildren },\n\tkey?: string\n): VNode<any>;\nexport function jsxDEV<P>(\n\ttype: ComponentType<P>,\n\tprops: Attributes & P & { children?: ComponentChildren },\n\tkey?: string\n): VNode<any>;\n\n// These are not expected to be used manually, but by a JSX transform\nexport function jsxTemplate(\n\ttemplate: string[],\n\t...expressions: any[]\n): VNode<any>;\nexport function jsxAttr(name: string, value: any): string | null;\nexport function jsxEscape<T>(\n\tvalue: T\n): string | null | VNode<any> | Array<string | null | VNode>;\n\nexport { JSXInternal as JSX };\n"],
5
+ "mappings": "aAEA,OAAS,aAAgB,uBAQzB,OAAS,eAAAA,MAAmB,aAmD5B,OAASA,KAAe",
6
+ "names": ["JSXInternal"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import{JSXInternal as t}from"./jsx";export const JSX=t;export class Component{}export var createElement;(e=>e.JSX=t)(createElement||={});export var h;(e=>e.JSX=t)(h||={});export let Fragment,options;
2
+ //# sourceMappingURL=preact.module.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/thirdparty/preact/preact.module.d.ts"],
4
+ "sourcesContent": ["export as namespace preact;\n\nimport { JSXInternal } from './jsx';\n\nexport import JSX = JSXInternal;\n\n//\n// Preact Virtual DOM\n// -----------------------------------\n\nexport interface VNode<P = {}> {\n\ttype: ComponentType<P> | string;\n\tprops: P & { children: ComponentChildren };\n\tkey: Key;\n\t/**\n\t * ref is not guaranteed by React.ReactElement, for compatibility reasons\n\t * with popular react libs we define it as optional too\n\t */\n\tref?: Ref<any> | null;\n\t/**\n\t * The time this `vnode` started rendering. Will only be set when\n\t * the devtools are attached.\n\t * Default value: `0`\n\t */\n\tstartTime?: number;\n\t/**\n\t * The time that the rendering of this `vnode` was completed. Will only be\n\t * set when the devtools are attached.\n\t * Default value: `-1`\n\t */\n\tendTime?: number;\n}\n\n//\n// Preact Component interface\n// -----------------------------------\n\nexport type Key = string | number | any;\n\nexport type RefObject<T> = { current: T | null };\nexport type RefCallback<T> = (instance: T | null) => void;\nexport type Ref<T> = RefObject<T> | RefCallback<T> | null;\n\nexport type ComponentChild =\n\t| VNode<any>\n\t| object\n\t| string\n\t| number\n\t| bigint\n\t| boolean\n\t| null\n\t| undefined;\nexport type ComponentChildren = ComponentChild[] | ComponentChild;\n\nexport interface Attributes {\n\tkey?: Key | undefined;\n\tjsx?: boolean | undefined;\n}\n\nexport interface ClassAttributes<T> extends Attributes {\n\tref?: Ref<T>;\n}\n\nexport interface PreactDOMAttributes {\n\tchildren?: ComponentChildren;\n\tdangerouslySetInnerHTML?: {\n\t\t__html: string;\n\t};\n}\n\nexport interface ErrorInfo {\n\tcomponentStack?: string;\n}\n\nexport type RenderableProps<P, RefType = any> = P &\n\tReadonly<Attributes & { children?: ComponentChildren; ref?: Ref<RefType> }>;\n\nexport type ComponentType<P = {}> = ComponentClass<P> | FunctionComponent<P>;\nexport type ComponentFactory<P = {}> = ComponentType<P>;\n\nexport type ComponentProps<\n\tC extends ComponentType<any> | keyof JSXInternal.IntrinsicElements\n> = C extends ComponentType<infer P>\n\t? P\n\t: C extends keyof JSXInternal.IntrinsicElements\n\t\t? JSXInternal.IntrinsicElements[C]\n\t\t: never;\n\nexport interface FunctionComponent<P = {}> {\n\t(props: RenderableProps<P>, context?: any): ComponentChildren;\n\tdisplayName?: string;\n\tdefaultProps?: Partial<P> | undefined;\n}\nexport interface FunctionalComponent<P = {}> extends FunctionComponent<P> {}\n\nexport interface ComponentClass<P = {}, S = {}> {\n\tnew (props: P, context?: any): Component<P, S>;\n\tdisplayName?: string;\n\tdefaultProps?: Partial<P>;\n\tcontextType?: Context<any>;\n\tgetDerivedStateFromProps?(\n\t\tprops: Readonly<P>,\n\t\tstate: Readonly<S>\n\t): Partial<S> | null;\n\tgetDerivedStateFromError?(error: any): Partial<S> | null;\n}\nexport interface ComponentConstructor<P = {}, S = {}>\n\textends ComponentClass<P, S> {}\n\n// Type alias for a component instance considered generally, whether stateless or stateful.\nexport type AnyComponent<P = {}, S = {}> =\n\t| FunctionComponent<P>\n\t| ComponentConstructor<P, S>;\n\nexport interface Component<P = {}, S = {}> {\n\tcomponentWillMount?(): void;\n\tcomponentDidMount?(): void;\n\tcomponentWillUnmount?(): void;\n\tgetChildContext?(): object;\n\tcomponentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;\n\tshouldComponentUpdate?(\n\t\tnextProps: Readonly<P>,\n\t\tnextState: Readonly<S>,\n\t\tnextContext: any\n\t): boolean;\n\tcomponentWillUpdate?(\n\t\tnextProps: Readonly<P>,\n\t\tnextState: Readonly<S>,\n\t\tnextContext: any\n\t): void;\n\tgetSnapshotBeforeUpdate?(oldProps: Readonly<P>, oldState: Readonly<S>): any;\n\tcomponentDidUpdate?(\n\t\tpreviousProps: Readonly<P>,\n\t\tpreviousState: Readonly<S>,\n\t\tsnapshot: any\n\t): void;\n\tcomponentDidCatch?(error: any, errorInfo: ErrorInfo): void;\n}\n\nexport abstract class Component<P, S> {\n\tconstructor(props?: P, context?: any);\n\n\tstatic displayName?: string;\n\tstatic defaultProps?: any;\n\tstatic contextType?: Context<any>;\n\n\t// Static members cannot reference class type parameters. This is not\n\t// supported in TypeScript. Reusing the same type arguments from `Component`\n\t// will lead to an impossible state where one cannot satisfy the type\n\t// constraint under no circumstances, see #1356.In general type arguments\n\t// seem to be a bit buggy and not supported well at the time of this\n\t// writing with TS 3.3.3333.\n\tstatic getDerivedStateFromProps?(\n\t\tprops: Readonly<object>,\n\t\tstate: Readonly<object>\n\t): object | null;\n\tstatic getDerivedStateFromError?(error: any): object | null;\n\n\tstate: Readonly<S>;\n\tprops: RenderableProps<P>;\n\tcontext: any;\n\tbase?: Element | Text;\n\n\t// From https://github.com/DefinitelyTyped/DefinitelyTyped/blob/e836acc75a78cf0655b5dfdbe81d69fdd4d8a252/types/react/index.d.ts#L402\n\t// // We MUST keep setState() as a unified signature because it allows proper checking of the method return type.\n\t// // See: https://github.com/DefinitelyTyped/DefinitelyTyped/issues/18365#issuecomment-351013257\n\tsetState<K extends keyof S>(\n\t\tstate:\n\t\t\t| ((\n\t\t\t\t\tprevState: Readonly<S>,\n\t\t\t\t\tprops: Readonly<P>\n\t\t\t ) => Pick<S, K> | Partial<S> | null)\n\t\t\t| (Pick<S, K> | Partial<S> | null),\n\t\tcallback?: () => void\n\t): void;\n\n\tforceUpdate(callback?: () => void): void;\n\n\tabstract render(\n\t\tprops?: RenderableProps<P>,\n\t\tstate?: Readonly<S>,\n\t\tcontext?: any\n\t): ComponentChildren;\n}\n\n//\n// Preact createElement\n// -----------------------------------\n\nexport function createElement(\n\ttype: 'input',\n\tprops:\n\t\t| (JSXInternal.DOMAttributes<HTMLInputElement> &\n\t\t\t\tClassAttributes<HTMLInputElement>)\n\t\t| null,\n\t...children: ComponentChildren[]\n): VNode<\n\tJSXInternal.DOMAttributes<HTMLInputElement> &\n\t\tClassAttributes<HTMLInputElement>\n>;\nexport function createElement<\n\tP extends JSXInternal.HTMLAttributes<T>,\n\tT extends HTMLElement\n>(\n\ttype: keyof JSXInternal.IntrinsicElements,\n\tprops: (ClassAttributes<T> & P) | null,\n\t...children: ComponentChildren[]\n): VNode<ClassAttributes<T> & P>;\nexport function createElement<\n\tP extends JSXInternal.SVGAttributes<T>,\n\tT extends HTMLElement\n>(\n\ttype: keyof JSXInternal.IntrinsicSVGElements,\n\tprops: (ClassAttributes<T> & P) | null,\n\t...children: ComponentChildren[]\n): VNode<ClassAttributes<T> & P>;\nexport function createElement<T extends HTMLElement>(\n\ttype: string,\n\tprops:\n\t\t| (ClassAttributes<T> &\n\t\t\t\tJSXInternal.HTMLAttributes &\n\t\t\t\tJSXInternal.SVGAttributes)\n\t\t| null,\n\t...children: ComponentChildren[]\n): VNode<\n\tClassAttributes<T> & JSXInternal.HTMLAttributes & JSXInternal.SVGAttributes\n>;\nexport function createElement<P>(\n\ttype: ComponentType<P> | string,\n\tprops: (Attributes & P) | null,\n\t...children: ComponentChildren[]\n): VNode<P>;\nexport namespace createElement {\n\texport import JSX = JSXInternal;\n}\n\nexport function h(\n\ttype: 'input',\n\tprops:\n\t\t| (JSXInternal.DOMAttributes<HTMLInputElement> &\n\t\t\t\tClassAttributes<HTMLInputElement>)\n\t\t| null,\n\t...children: ComponentChildren[]\n): VNode<\n\tJSXInternal.DOMAttributes<HTMLInputElement> &\n\t\tClassAttributes<HTMLInputElement>\n>;\nexport function h<\n\tP extends JSXInternal.HTMLAttributes<T>,\n\tT extends HTMLElement\n>(\n\ttype: keyof JSXInternal.IntrinsicElements,\n\tprops: (ClassAttributes<T> & P) | null,\n\t...children: ComponentChildren[]\n): VNode<ClassAttributes<T> & P>;\nexport function h<\n\tP extends JSXInternal.SVGAttributes<T>,\n\tT extends HTMLElement\n>(\n\ttype: keyof JSXInternal.IntrinsicSVGElements,\n\tprops: (ClassAttributes<T> & P) | null,\n\t...children: ComponentChildren[]\n): VNode<ClassAttributes<T> & P>;\nexport function h<T extends HTMLElement>(\n\ttype: string,\n\tprops:\n\t\t| (ClassAttributes<T> &\n\t\t\t\tJSXInternal.HTMLAttributes &\n\t\t\t\tJSXInternal.SVGAttributes)\n\t\t| null,\n\t...children: ComponentChildren[]\n): VNode<\n\t| (ClassAttributes<T> &\n\t\t\tJSXInternal.HTMLAttributes &\n\t\t\tJSXInternal.SVGAttributes)\n\t| null\n>;\nexport function h<P>(\n\ttype: ComponentType<P> | string,\n\tprops: (Attributes & P) | null,\n\t...children: ComponentChildren[]\n): VNode<Attributes & P>;\nexport namespace h {\n\texport import JSX = JSXInternal;\n}\n\n//\n// Preact render\n// -----------------------------------\ninterface ContainerNode {\n\treadonly nodeType: number;\n\treadonly parentNode: ContainerNode | null;\n\treadonly firstChild: ContainerNode | null;\n\treadonly childNodes: ArrayLike<ContainerNode>;\n\n\tcontains(other: ContainerNode | null): boolean;\n\tinsertBefore(node: ContainerNode, child: ContainerNode | null): ContainerNode;\n\tappendChild(node: ContainerNode): ContainerNode;\n\tremoveChild(child: ContainerNode): ContainerNode;\n}\n\nexport function render(vnode: ComponentChild, parent: ContainerNode): void;\n/**\n * @deprecated Will be removed in v11.\n *\n * Replacement Preact 10+ implementation can be found here: https://gist.github.com/developit/f4c67a2ede71dc2fab7f357f39cff28c\n */\nexport function render(\n\tvnode: ComponentChild,\n\tparent: ContainerNode,\n\treplaceNode?: Element | Text\n): void;\nexport function hydrate(vnode: ComponentChild, parent: ContainerNode): void;\nexport function cloneElement(\n\tvnode: VNode<any>,\n\tprops?: any,\n\t...children: ComponentChildren[]\n): VNode<any>;\nexport function cloneElement<P>(\n\tvnode: VNode<P>,\n\tprops?: any,\n\t...children: ComponentChildren[]\n): VNode<P>;\n\n//\n// Preact Built-in Components\n// -----------------------------------\n\n// TODO: Revisit what the public type of this is...\nexport let Fragment: FunctionComponent<{}>;\n\n//\n// Preact options\n// -----------------------------------\n\n/**\n * Global options for preact\n */\nexport interface Options {\n\t/** Attach a hook that is invoked whenever a VNode is created. */\n\tvnode?(vnode: VNode): void;\n\t/** Attach a hook that is invoked immediately before a vnode is unmounted. */\n\tunmount?(vnode: VNode): void;\n\t/** Attach a hook that is invoked after a vnode has rendered. */\n\tdiffed?(vnode: VNode): void;\n\tevent?(e: Event): any;\n\trequestAnimationFrame?(callback: () => void): void;\n\tdebounceRendering?(cb: () => void): void;\n\tuseDebugValue?(value: string | number): void;\n\t_addHookName?(name: string | number): void;\n\t__suspenseDidResolve?(vnode: VNode, cb: () => void): void;\n\t// __canSuspenseResolve?(vnode: VNode, cb: () => void): void;\n\n\t/**\n\t * Customize attribute serialization when a precompiled JSX transform\n\t * is used.\n\t */\n\tattr?(name: string, value: any): string | void;\n}\n\nexport let options: Options;\n\n//\n// Preact helpers\n// -----------------------------------\nexport function createRef<T = any>(): RefObject<T>;\nexport function toChildArray(\n\tchildren: ComponentChildren\n): Array<VNode | string | number>;\nexport function isValidElement(vnode: any): vnode is VNode;\n\n//\n// Context\n// -----------------------------------\nexport interface Consumer<T>\n\textends FunctionComponent<{\n\t\tchildren: (value: T) => ComponentChildren;\n\t}> {}\nexport interface PreactConsumer<T> extends Consumer<T> {}\n\nexport interface Provider<T>\n\textends FunctionComponent<{\n\t\tvalue: T;\n\t\tchildren?: ComponentChildren;\n\t}> {}\nexport interface PreactProvider<T> extends Provider<T> {}\nexport type ContextType<C extends Context<any>> = C extends Context<infer T>\n\t? T\n\t: never;\n\nexport interface Context<T> {\n\tConsumer: Consumer<T>;\n\tProvider: Provider<T>;\n\tdisplayName?: string;\n}\nexport interface PreactContext<T> extends Context<T> {}\n\nexport function createContext<T>(defaultValue: T): Context<T>;\n"],
5
+ "mappings": "aAEA,OAAS,eAAAA,MAAmB,QAErB,aAAO,IAAMA,EAuIb,aAAe,SAAgB,CA4CtC,CAiDO,WAAU,eAAAC,GACFA,EAAA,IAAMD,GADJ,oBAkDV,WAAU,GAAAE,GACFA,EAAA,IAAMF,GADJ,QA+CV,WAAI,SA+BA",
6
+ "names": ["JSXInternal", "createElement", "h"]
7
+ }
@@ -1,2 +1,2 @@
1
- "use strict";import s from"./theming/getConstructableStyle.js";const n=o=>{const e=o.constructor,t=o.shadowRoot,r=o.render();if(!t){console.warn("There is no shadow root to update");return}t.adoptedStyleSheets=s(e),e.renderer(r,t,{host:o})};export default n;
1
+ "use strict";import r from"./theming/getConstructableStyle.js";const s=o=>{const e=o.constructor,t=o.shadowRoot;if(!t){console.warn("There is no shadow root to update");return}t.adoptedStyleSheets=r(e),e.renderer(o,t)};export default s;
2
2
  //# sourceMappingURL=updateShadowRoot.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/updateShadowRoot.ts"],
4
- "sourcesContent": ["import getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n */\nconst updateShadowRoot = (element: UI5Element) => {\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst shadowRoot = element.shadowRoot;\n\tconst renderResult = element.render(); // this is checked before calling updateShadowRoot\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tshadowRoot.adoptedStyleSheets = getConstructableStyle(ctor);\n\n\tctor.renderer(renderResult, shadowRoot, { host: element });\n};\n\nexport default updateShadowRoot;\n"],
5
- "mappings": "aAAA,OAAOA,MAA2B,qCAOlC,MAAMC,EAAoBC,GAAwB,CACjD,MAAMC,EAAOD,EAAQ,YACfE,EAAaF,EAAQ,WACrBG,EAAeH,EAAQ,OAAO,EAEpC,GAAI,CAACE,EAAY,CAChB,QAAQ,KAAK,mCAAmC,EAChD,MACD,CAEAA,EAAW,mBAAqBJ,EAAsBG,CAAI,EAE1DA,EAAK,SAASE,EAAcD,EAAY,CAAE,KAAMF,CAAQ,CAAC,CAC1D,EAEA,eAAeD",
6
- "names": ["getConstructableStyle", "updateShadowRoot", "element", "ctor", "shadowRoot", "renderResult"]
4
+ "sourcesContent": ["import getConstructableStyle from \"./theming/getConstructableStyle.js\";\nimport type UI5Element from \"./UI5Element.js\";\n\n/**\n * Updates the shadow root of a UI5Element or its static area item\n * @param element\n */\nconst updateShadowRoot = (element: UI5Element) => {\n\tconst ctor = element.constructor as typeof UI5Element;\n\tconst shadowRoot = element.shadowRoot;\n\n\tif (!shadowRoot) {\n\t\tconsole.warn(`There is no shadow root to update`); // eslint-disable-line\n\t\treturn;\n\t}\n\n\tshadowRoot.adoptedStyleSheets = getConstructableStyle(ctor);\n\tctor.renderer(element, shadowRoot);\n};\n\nexport default updateShadowRoot;\n"],
5
+ "mappings": "aAAA,OAAOA,MAA2B,qCAOlC,MAAMC,EAAoBC,GAAwB,CACjD,MAAMC,EAAOD,EAAQ,YACfE,EAAaF,EAAQ,WAE3B,GAAI,CAACE,EAAY,CAChB,QAAQ,KAAK,mCAAmC,EAChD,MACD,CAEAA,EAAW,mBAAqBJ,EAAsBG,CAAI,EAC1DA,EAAK,SAASD,EAASE,CAAU,CAClC,EAEA,eAAeH",
6
+ "names": ["getConstructableStyle", "updateShadowRoot", "element", "ctor", "shadowRoot"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const s=new Map,o=new Map,n=new Map,c=e=>{if(!s.has(e)){const a=p(e.split("-"));s.set(e,a)}return s.get(e)},l=e=>{if(!o.has(e)){const a=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();o.set(e,a)}return o.get(e)},p=e=>e.map((a,t)=>t===0?a.toLowerCase():a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join(""),b=e=>{const a=n.get(e);if(a)return a;const t=c(e),r=t.charAt(0).toUpperCase()+t.slice(1);return n.set(e,r),r};export{c as kebabToCamelCase,l as camelToKebabCase,b as kebabToPascalCase};
1
+ "use strict";const s=new Map,o=new Map,n=new Map,c=e=>{if(!s.has(e)){const a=b(e.split("-"));s.set(e,a)}return s.get(e)},l=e=>{if(!o.has(e)){const a=e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();o.set(e,a)}return o.get(e)},p=e=>l(e),b=e=>e.map((a,t)=>t===0?a.toLowerCase():a.charAt(0).toUpperCase()+a.slice(1).toLowerCase()).join(""),C=e=>{const a=n.get(e);if(a)return a;const t=c(e),r=t.charAt(0).toUpperCase()+t.slice(1);return n.set(e,r),r};export{c as kebabToCamelCase,l as camelToKebabCase,p as pascalToKebabCase,C as kebabToPascalCase};
2
2
  //# sourceMappingURL=StringHelper.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/util/StringHelper.ts"],
4
- "sourcesContent": ["const kebabToCamelMap = new Map<string, string>();\nconst camelToKebabMap = new Map<string, string>();\nconst kebabToPascalMap = new Map<string, string>();\n\nconst kebabToCamelCase = (string: string) => {\n\tif (!kebabToCamelMap.has(string)) {\n\t\tconst result = toCamelCase(string.split(\"-\"));\n\t\tkebabToCamelMap.set(string, result);\n\t}\n\treturn kebabToCamelMap.get(string)!;\n};\n\nconst camelToKebabCase = (string: string) => {\n\tif (!camelToKebabMap.has(string)) {\n\t\tconst result = string.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n\t\tcamelToKebabMap.set(string, result);\n\t}\n\treturn camelToKebabMap.get(string)!;\n};\n\nconst toCamelCase = (parts: Array<string>) => {\n\treturn parts.map((string, index) => {\n\t\treturn index === 0 ? string.toLowerCase() : string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();\n\t}).join(\"\");\n};\n\nconst kebabToPascalCase = (src: string) => {\n\tconst cachedName = kebabToPascalMap.get(src);\n\tif (cachedName) {\n\t\treturn cachedName;\n\t}\n\n\tconst camelStr = kebabToCamelCase(src);\n\tconst result = camelStr.charAt(0).toUpperCase() + camelStr.slice(1);\n\tkebabToPascalMap.set(src, result);\n\treturn result;\n};\n\nexport { kebabToCamelCase, camelToKebabCase, kebabToPascalCase };\n"],
5
- "mappings": "aAAA,MAAMA,EAAkB,IAAI,IACtBC,EAAkB,IAAI,IACtBC,EAAmB,IAAI,IAEvBC,EAAoBC,GAAmB,CAC5C,GAAI,CAACJ,EAAgB,IAAII,CAAM,EAAG,CACjC,MAAMC,EAASC,EAAYF,EAAO,MAAM,GAAG,CAAC,EAC5CJ,EAAgB,IAAII,EAAQC,CAAM,CACnC,CACA,OAAOL,EAAgB,IAAII,CAAM,CAClC,EAEMG,EAAoBH,GAAmB,CAC5C,GAAI,CAACH,EAAgB,IAAIG,CAAM,EAAG,CACjC,MAAMC,EAASD,EAAO,QAAQ,kBAAmB,OAAO,EAAE,YAAY,EACtEH,EAAgB,IAAIG,EAAQC,CAAM,CACnC,CACA,OAAOJ,EAAgB,IAAIG,CAAM,CAClC,EAEME,EAAeE,GACbA,EAAM,IAAI,CAACJ,EAAQK,IAClBA,IAAU,EAAIL,EAAO,YAAY,EAAIA,EAAO,OAAO,CAAC,EAAE,YAAY,EAAIA,EAAO,MAAM,CAAC,EAAE,YAAY,CACzG,EAAE,KAAK,EAAE,EAGLM,EAAqBC,GAAgB,CAC1C,MAAMC,EAAaV,EAAiB,IAAIS,CAAG,EAC3C,GAAIC,EACH,OAAOA,EAGR,MAAMC,EAAWV,EAAiBQ,CAAG,EAC/BN,EAASQ,EAAS,OAAO,CAAC,EAAE,YAAY,EAAIA,EAAS,MAAM,CAAC,EAClE,OAAAX,EAAiB,IAAIS,EAAKN,CAAM,EACzBA,CACR,EAEA,OAASF,KAAA,iBAAkBI,KAAA,iBAAkBG,KAAA",
6
- "names": ["kebabToCamelMap", "camelToKebabMap", "kebabToPascalMap", "kebabToCamelCase", "string", "result", "toCamelCase", "camelToKebabCase", "parts", "index", "kebabToPascalCase", "src", "cachedName", "camelStr"]
4
+ "sourcesContent": ["const kebabToCamelMap = new Map<string, string>();\nconst camelToKebabMap = new Map<string, string>();\nconst kebabToPascalMap = new Map<string, string>();\n\nconst kebabToCamelCase = (string: string) => {\n\tif (!kebabToCamelMap.has(string)) {\n\t\tconst result = toCamelCase(string.split(\"-\"));\n\t\tkebabToCamelMap.set(string, result);\n\t}\n\treturn kebabToCamelMap.get(string)!;\n};\n\nconst camelToKebabCase = (string: string) => {\n\tif (!camelToKebabMap.has(string)) {\n\t\tconst result = string.replace(/([a-z])([A-Z])/g, \"$1-$2\").toLowerCase();\n\t\tcamelToKebabMap.set(string, result);\n\t}\n\treturn camelToKebabMap.get(string)!;\n};\n\nconst pascalToKebabCase = (pascalString: string) => {\n\treturn camelToKebabCase(pascalString);\n};\n\nconst toCamelCase = (parts: Array<string>) => {\n\treturn parts.map((string, index) => {\n\t\treturn index === 0 ? string.toLowerCase() : string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();\n\t}).join(\"\");\n};\n\nconst kebabToPascalCase = (src: string) => {\n\tconst cachedName = kebabToPascalMap.get(src);\n\tif (cachedName) {\n\t\treturn cachedName;\n\t}\n\n\tconst camelStr = kebabToCamelCase(src);\n\tconst result = camelStr.charAt(0).toUpperCase() + camelStr.slice(1);\n\tkebabToPascalMap.set(src, result);\n\treturn result;\n};\n\nexport {\n\tkebabToCamelCase,\n\tcamelToKebabCase,\n\tpascalToKebabCase,\n\tkebabToPascalCase,\n};\n"],
5
+ "mappings": "aAAA,MAAMA,EAAkB,IAAI,IACtBC,EAAkB,IAAI,IACtBC,EAAmB,IAAI,IAEvBC,EAAoBC,GAAmB,CAC5C,GAAI,CAACJ,EAAgB,IAAII,CAAM,EAAG,CACjC,MAAMC,EAASC,EAAYF,EAAO,MAAM,GAAG,CAAC,EAC5CJ,EAAgB,IAAII,EAAQC,CAAM,CACnC,CACA,OAAOL,EAAgB,IAAII,CAAM,CAClC,EAEMG,EAAoBH,GAAmB,CAC5C,GAAI,CAACH,EAAgB,IAAIG,CAAM,EAAG,CACjC,MAAMC,EAASD,EAAO,QAAQ,kBAAmB,OAAO,EAAE,YAAY,EACtEH,EAAgB,IAAIG,EAAQC,CAAM,CACnC,CACA,OAAOJ,EAAgB,IAAIG,CAAM,CAClC,EAEMI,EAAqBC,GACnBF,EAAiBE,CAAY,EAG/BH,EAAeI,GACbA,EAAM,IAAI,CAACN,EAAQO,IAClBA,IAAU,EAAIP,EAAO,YAAY,EAAIA,EAAO,OAAO,CAAC,EAAE,YAAY,EAAIA,EAAO,MAAM,CAAC,EAAE,YAAY,CACzG,EAAE,KAAK,EAAE,EAGLQ,EAAqBC,GAAgB,CAC1C,MAAMC,EAAaZ,EAAiB,IAAIW,CAAG,EAC3C,GAAIC,EACH,OAAOA,EAGR,MAAMC,EAAWZ,EAAiBU,CAAG,EAC/BR,EAASU,EAAS,OAAO,CAAC,EAAE,YAAY,EAAIA,EAAS,MAAM,CAAC,EAClE,OAAAb,EAAiB,IAAIW,EAAKR,CAAM,EACzBA,CACR,EAEA,OACCF,KAAA,iBACAI,KAAA,iBACAC,KAAA,kBACAI,KAAA",
6
+ "names": ["kebabToCamelMap", "camelToKebabMap", "kebabToPascalMap", "kebabToCamelCase", "string", "result", "toCamelCase", "camelToKebabCase", "pascalToKebabCase", "pascalString", "parts", "index", "kebabToPascalCase", "src", "cachedName", "camelStr"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";let t=null,n=!1;const r=new Set,d=new Set,a=e=>{!e.dataTransfer||!(e.target instanceof HTMLElement)||d.has(e.target)||(t=e.target)},o=()=>{t=null},l=()=>{t=null},s=e=>{t=e},g=()=>t,c=()=>{n||(document.body.addEventListener("dragstart",a),document.body.addEventListener("dragend",o),document.body.addEventListener("drop",l))},m=()=>{document.body.removeEventListener("dragstart",a),document.body.removeEventListener("dragend",o),document.body.removeEventListener("drop",l),n=!1},E=e=>{r.add(e),n||c()},u=e=>{r.delete(e),r.size===0&&n&&m()},i=e=>(d.add(e),s),b=e=>{d.delete(e)},f={subscribe:E,unsubscribe:u,addSelfManagedArea:i,removeSelfManagedArea:b,getDraggedElement:g};export default f;
1
+ "use strict";let t=null,n=!1;const o=new Set,a=new Set,r=e=>{!e.dataTransfer||!(e.target instanceof HTMLElement)||a.has(e.target)||(t=e.target)},d=()=>{t=null},l=()=>{t=null},s=e=>{t=e},m=()=>t,g=()=>{n||(document.body.addEventListener("dragstart",r),document.body.addEventListener("dragend",d),document.body.addEventListener("drop",l))},c=()=>{document.body.removeEventListener("dragstart",r),document.body.removeEventListener("dragend",d),document.body.removeEventListener("drop",l),n=!1},i=e=>{o.add(e),n||g()},E=e=>{o.delete(e),o.size===0&&n&&c()},u=e=>(a.add(e),s),v=e=>{a.delete(e)},p={subscribe:i,unsubscribe:E,addSelfManagedArea:u,removeSelfManagedArea:v,getDraggedElement:m};export default p;
2
2
  //# sourceMappingURL=DragRegistry.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/util/dragAndDrop/DragRegistry.ts"],
4
- "sourcesContent": ["import type UI5Element from \"../../UI5Element.js\";\n\nlet draggedElement: HTMLElement | null = null;\nlet globalHandlersAttached = false;\nconst subscribers = new Set<UI5Element>();\nconst selfManagedDragAreas = new Set<HTMLElement | ShadowRoot>();\n\nconst ondragstart = (e: DragEvent) => {\n\tif (!e.dataTransfer || !(e.target instanceof HTMLElement)) {\n\t\treturn;\n\t}\n\n\tif (!selfManagedDragAreas.has(e.target)) {\n\t\tdraggedElement = e.target;\n\t}\n};\n\nconst ondragend = () => {\n\tdraggedElement = null;\n};\n\nconst ondrop = () => {\n\tdraggedElement = null;\n};\n\nconst setDraggedElement = (element: HTMLElement | null) => {\n\tdraggedElement = element;\n};\ntype SetDraggedElementFunction = typeof setDraggedElement;\n\nconst getDraggedElement = () => {\n\treturn draggedElement;\n};\n\nconst attachGlobalHandlers = () => {\n\tif (globalHandlersAttached) {\n\t\treturn;\n\t}\n\n\tdocument.body.addEventListener(\"dragstart\", ondragstart);\n\tdocument.body.addEventListener(\"dragend\", ondragend);\n\tdocument.body.addEventListener(\"drop\", ondrop);\n};\n\nconst detachGlobalHandlers = () => {\n\tdocument.body.removeEventListener(\"dragstart\", ondragstart);\n\tdocument.body.removeEventListener(\"dragend\", ondragend);\n\tdocument.body.removeEventListener(\"drop\", ondrop);\n\tglobalHandlersAttached = false;\n};\n\nconst subscribe = (subscriber: UI5Element) => {\n\tsubscribers.add(subscriber);\n\n\tif (!globalHandlersAttached) {\n\t\tattachGlobalHandlers();\n\t}\n};\n\nconst unsubscribe = (subscriber: UI5Element) => {\n\tsubscribers.delete(subscriber);\n\n\tif (subscribers.size === 0 && globalHandlersAttached) {\n\t\tdetachGlobalHandlers();\n\t}\n};\n\nconst addSelfManagedArea = (area: HTMLElement | ShadowRoot) => {\n\tselfManagedDragAreas.add(area);\n\n\treturn setDraggedElement;\n};\n\nconst removeSelfManagedArea = (area: HTMLElement | ShadowRoot) => {\n\tselfManagedDragAreas.delete(area);\n};\n\nconst DragRegistry = {\n\tsubscribe,\n\tunsubscribe,\n\taddSelfManagedArea,\n\tremoveSelfManagedArea,\n\tgetDraggedElement,\n};\n\nexport default DragRegistry;\nexport type {\n\tSetDraggedElementFunction,\n};\n"],
5
- "mappings": "aAEA,IAAIA,EAAqC,KACrCC,EAAyB,GAC7B,MAAMC,EAAc,IAAI,IAClBC,EAAuB,IAAI,IAE3BC,EAAe,GAAiB,CACjC,CAAC,EAAE,cAAgB,EAAE,EAAE,kBAAkB,cAIxCD,EAAqB,IAAI,EAAE,MAAM,IACrCH,EAAiB,EAAE,OAErB,EAEMK,EAAY,IAAM,CACvBL,EAAiB,IAClB,EAEMM,EAAS,IAAM,CACpBN,EAAiB,IAClB,EAEMO,EAAqBC,GAAgC,CAC1DR,EAAiBQ,CAClB,EAGMC,EAAoB,IAClBT,EAGFU,EAAuB,IAAM,CAC9BT,IAIJ,SAAS,KAAK,iBAAiB,YAAaG,CAAW,EACvD,SAAS,KAAK,iBAAiB,UAAWC,CAAS,EACnD,SAAS,KAAK,iBAAiB,OAAQC,CAAM,EAC9C,EAEMK,EAAuB,IAAM,CAClC,SAAS,KAAK,oBAAoB,YAAaP,CAAW,EAC1D,SAAS,KAAK,oBAAoB,UAAWC,CAAS,EACtD,SAAS,KAAK,oBAAoB,OAAQC,CAAM,EAChDL,EAAyB,EAC1B,EAEMW,EAAaC,GAA2B,CAC7CX,EAAY,IAAIW,CAAU,EAErBZ,GACJS,EAAqB,CAEvB,EAEMI,EAAeD,GAA2B,CAC/CX,EAAY,OAAOW,CAAU,EAEzBX,EAAY,OAAS,GAAKD,GAC7BU,EAAqB,CAEvB,EAEMI,EAAsBC,IAC3Bb,EAAqB,IAAIa,CAAI,EAEtBT,GAGFU,EAAyBD,GAAmC,CACjEb,EAAqB,OAAOa,CAAI,CACjC,EAEME,EAAe,CACpB,UAAAN,EACA,YAAAE,EACA,mBAAAC,EACA,sBAAAE,EACA,kBAAAR,CACD,EAEA,eAAeS",
4
+ "sourcesContent": ["import type UI5Element from \"../../UI5Element.js\";\nimport type MovePlacement from \"../../types/MovePlacement.js\";\n\nlet draggedElement: HTMLElement | null = null;\nlet globalHandlersAttached = false;\nconst subscribers = new Set<UI5Element>();\nconst selfManagedDragAreas = new Set<HTMLElement | ShadowRoot>();\n\nconst ondragstart = (e: DragEvent) => {\n\tif (!e.dataTransfer || !(e.target instanceof HTMLElement)) {\n\t\treturn;\n\t}\n\n\tif (!selfManagedDragAreas.has(e.target)) {\n\t\tdraggedElement = e.target;\n\t}\n};\n\nconst ondragend = () => {\n\tdraggedElement = null;\n};\n\nconst ondrop = () => {\n\tdraggedElement = null;\n};\n\nconst setDraggedElement = (element: HTMLElement | null) => {\n\tdraggedElement = element;\n};\ntype SetDraggedElementFunction = typeof setDraggedElement;\n\nconst getDraggedElement = () => {\n\treturn draggedElement;\n};\n\nconst attachGlobalHandlers = () => {\n\tif (globalHandlersAttached) {\n\t\treturn;\n\t}\n\n\tdocument.body.addEventListener(\"dragstart\", ondragstart);\n\tdocument.body.addEventListener(\"dragend\", ondragend);\n\tdocument.body.addEventListener(\"drop\", ondrop);\n};\n\nconst detachGlobalHandlers = () => {\n\tdocument.body.removeEventListener(\"dragstart\", ondragstart);\n\tdocument.body.removeEventListener(\"dragend\", ondragend);\n\tdocument.body.removeEventListener(\"drop\", ondrop);\n\tglobalHandlersAttached = false;\n};\n\nconst subscribe = (subscriber: UI5Element) => {\n\tsubscribers.add(subscriber);\n\n\tif (!globalHandlersAttached) {\n\t\tattachGlobalHandlers();\n\t}\n};\n\nconst unsubscribe = (subscriber: UI5Element) => {\n\tsubscribers.delete(subscriber);\n\n\tif (subscribers.size === 0 && globalHandlersAttached) {\n\t\tdetachGlobalHandlers();\n\t}\n};\n\nconst addSelfManagedArea = (area: HTMLElement | ShadowRoot) => {\n\tselfManagedDragAreas.add(area);\n\n\treturn setDraggedElement;\n};\n\nconst removeSelfManagedArea = (area: HTMLElement | ShadowRoot) => {\n\tselfManagedDragAreas.delete(area);\n};\n\ntype DragAndDropSettings = {\n\t/**\n\t * Allow cross-browser and file drag and drop.\n\t */\n\tcrossDnD?: boolean;\n\t/**\n\t * Pass the original event in the event parameters.\n\t */\n\toriginalEvent?: boolean;\n};\n\ntype MoveEventDetail = {\n\toriginalEvent: Event,\n\tsource: {\n\t\telement: HTMLElement,\n\t},\n\tdestination: {\n\t\telement: HTMLElement,\n\t\tplacement: `${MovePlacement}`,\n\t}\n};\n\nconst DragRegistry = {\n\tsubscribe,\n\tunsubscribe,\n\taddSelfManagedArea,\n\tremoveSelfManagedArea,\n\tgetDraggedElement,\n};\n\nexport default DragRegistry;\nexport type {\n\tSetDraggedElementFunction,\n\tDragAndDropSettings,\n\tMoveEventDetail,\n};\n"],
5
+ "mappings": "aAGA,IAAIA,EAAqC,KACrCC,EAAyB,GAC7B,MAAMC,EAAc,IAAI,IAClBC,EAAuB,IAAI,IAE3BC,EAAe,GAAiB,CACjC,CAAC,EAAE,cAAgB,EAAE,EAAE,kBAAkB,cAIxCD,EAAqB,IAAI,EAAE,MAAM,IACrCH,EAAiB,EAAE,OAErB,EAEMK,EAAY,IAAM,CACvBL,EAAiB,IAClB,EAEMM,EAAS,IAAM,CACpBN,EAAiB,IAClB,EAEMO,EAAqBC,GAAgC,CAC1DR,EAAiBQ,CAClB,EAGMC,EAAoB,IAClBT,EAGFU,EAAuB,IAAM,CAC9BT,IAIJ,SAAS,KAAK,iBAAiB,YAAaG,CAAW,EACvD,SAAS,KAAK,iBAAiB,UAAWC,CAAS,EACnD,SAAS,KAAK,iBAAiB,OAAQC,CAAM,EAC9C,EAEMK,EAAuB,IAAM,CAClC,SAAS,KAAK,oBAAoB,YAAaP,CAAW,EAC1D,SAAS,KAAK,oBAAoB,UAAWC,CAAS,EACtD,SAAS,KAAK,oBAAoB,OAAQC,CAAM,EAChDL,EAAyB,EAC1B,EAEMW,EAAaC,GAA2B,CAC7CX,EAAY,IAAIW,CAAU,EAErBZ,GACJS,EAAqB,CAEvB,EAEMI,EAAeD,GAA2B,CAC/CX,EAAY,OAAOW,CAAU,EAEzBX,EAAY,OAAS,GAAKD,GAC7BU,EAAqB,CAEvB,EAEMI,EAAsBC,IAC3Bb,EAAqB,IAAIa,CAAI,EAEtBT,GAGFU,EAAyBD,GAAmC,CACjEb,EAAqB,OAAOa,CAAI,CACjC,EAwBME,EAAe,CACpB,UAAAN,EACA,YAAAE,EACA,mBAAAC,EACA,sBAAAE,EACA,kBAAAR,CACD,EAEA,eAAeS",
6
6
  "names": ["draggedElement", "globalHandlersAttached", "subscribers", "selfManagedDragAreas", "ondragstart", "ondragend", "ondrop", "setDraggedElement", "element", "getDraggedElement", "attachGlobalHandlers", "detachGlobalHandlers", "subscribe", "subscriber", "unsubscribe", "addSelfManagedArea", "area", "removeSelfManagedArea", "DragRegistry"]
7
7
  }
@@ -0,0 +1,2 @@
1
+ "use strict";import g from"./DragRegistry.js";function i(t,o,n,m,r={}){const a=g.getDraggedElement(),e={targetReference:null,placement:null};if(!a&&!r?.crossDnD)return e;const s=n.placements;return e.targetReference=t.target,s.some(l=>{const c=r.originalEvent?{originalEvent:t}:{};return o.fireDecoratorEvent("move-over",{...c,source:{element:a},destination:{element:m,placement:l}})?!1:(t.preventDefault(),e.targetReference=n.element,e.placement=l,!0)})||(e.targetReference=null),e}export default i;
2
+ //# sourceMappingURL=handleDragOver.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/util/dragAndDrop/handleDragOver.ts"],
4
+ "sourcesContent": ["import type UI5Element from \"../../UI5Element.js\";\nimport type MovePlacement from \"../../types/MovePlacement.js\";\nimport type { DragAndDropSettings } from \"./DragRegistry.js\";\nimport DragRegistry from \"./DragRegistry.js\";\n\ntype DragOverResult = {\n\ttargetReference: HTMLElement | null;\n\tplacement: any;\n}\n\ntype DragPosition = {\n\telement: HTMLElement;\n\tplacements: MovePlacement[];\n};\n\n/**\n * Handles the dragover event.\n */\nfunction handleDragOver<T extends UI5Element>(e: DragEvent, component: T, position: DragPosition, target: HTMLElement, settings: DragAndDropSettings = {}): DragOverResult {\n\tconst draggedElement = DragRegistry.getDraggedElement();\n\tconst dragOverResult: DragOverResult = {\n\t\ttargetReference: null,\n\t\tplacement: null,\n\t};\n\n\tif (!draggedElement && !settings?.crossDnD) {\n\t\treturn dragOverResult;\n\t}\n\n\tconst placements = position.placements;\n\tdragOverResult.targetReference = e.target as HTMLElement;\n\n\tconst placementAccepted = placements.some(placement => {\n\t\tconst originalEvent = settings.originalEvent ? { originalEvent: e } : {};\n\t\tconst beforeItemMovePrevented = !component.fireDecoratorEvent(\"move-over\" as keyof T[\"eventDetails\"], {\n\t\t\t...originalEvent,\n\t\t\tsource: {\n\t\t\t\telement: draggedElement,\n\t\t\t},\n\t\t\tdestination: {\n\t\t\t\telement: target,\n\t\t\t\tplacement,\n\t\t\t},\n\t\t} as T[\"eventDetails\"][keyof T[\"eventDetails\"]]);\n\n\t\tif (beforeItemMovePrevented) {\n\t\t\te.preventDefault();\n\t\t\tdragOverResult.targetReference = position.element;\n\t\t\tdragOverResult.placement = placement;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t});\n\n\tif (!placementAccepted) {\n\t\tdragOverResult.targetReference = null;\n\t}\n\n\treturn dragOverResult;\n}\n\nexport default handleDragOver;\n"],
5
+ "mappings": "aAGA,OAAOA,MAAkB,oBAezB,SAASC,EAAqCC,EAAcC,EAAcC,EAAwBC,EAAqBC,EAAgC,CAAC,EAAmB,CAC1K,MAAMC,EAAiBP,EAAa,kBAAkB,EAChDQ,EAAiC,CACtC,gBAAiB,KACjB,UAAW,IACZ,EAEA,GAAI,CAACD,GAAkB,CAACD,GAAU,SACjC,OAAOE,EAGR,MAAMC,EAAaL,EAAS,WAC5B,OAAAI,EAAe,gBAAkBN,EAAE,OAETO,EAAW,KAAKC,GAAa,CACtD,MAAMC,EAAgBL,EAAS,cAAgB,CAAE,cAAeJ,CAAE,EAAI,CAAC,EAYvE,OAXiCC,EAAU,mBAAmB,YAAwC,CACrG,GAAGQ,EACH,OAAQ,CACP,QAASJ,CACV,EACA,YAAa,CACZ,QAASF,EACT,UAAAK,CACD,CACD,CAA+C,EASxC,IANNR,EAAE,eAAe,EACjBM,EAAe,gBAAkBJ,EAAS,QAC1CI,EAAe,UAAYE,EACpB,GAIT,CAAC,IAGAF,EAAe,gBAAkB,MAG3BA,CACR,CAEA,eAAeP",
6
+ "names": ["DragRegistry", "handleDragOver", "e", "component", "position", "target", "settings", "draggedElement", "dragOverResult", "placements", "placement", "originalEvent"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import l from"./DragRegistry.js";function m(t,r,o,a,n={}){t.preventDefault();const e=l.getDraggedElement();if(!e&&n?.crossDnD)return;const i=n.originalEvent?{originalEvent:t}:{};r.fireDecoratorEvent("move",{...i,source:{element:e},destination:{element:o,placement:a}}),e?.focus()}export default m;
2
+ //# sourceMappingURL=handleDrop.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/util/dragAndDrop/handleDrop.ts"],
4
+ "sourcesContent": ["import type UI5Element from \"../../UI5Element.js\";\nimport type MovePlacement from \"../../types/MovePlacement.js\";\nimport type { DragAndDropSettings } from \"./DragRegistry.js\";\nimport DragRegistry from \"./DragRegistry.js\";\n\nfunction handleDrop<T extends UI5Element>(e: DragEvent, component: T, target: HTMLElement, placement: `${MovePlacement}`, settings: DragAndDropSettings = {}): void {\n\te.preventDefault();\n\tconst draggedElement = DragRegistry.getDraggedElement();\n\n\tif (!draggedElement && settings?.crossDnD) {\n\t\treturn;\n\t}\n\n\tconst originalEvent = settings.originalEvent ? { originalEvent: e } : {};\n\tcomponent.fireDecoratorEvent(\"move\" as keyof T[\"eventDetails\"], {\n\t\t...originalEvent,\n\t\tsource: {\n\t\t\telement: draggedElement,\n\t\t},\n\t\tdestination: {\n\t\t\telement: target,\n\t\t\tplacement,\n\t\t},\n\t} as T[\"eventDetails\"][keyof T[\"eventDetails\"]]);\n\n\tdraggedElement?.focus();\n}\n\nexport default handleDrop;\n"],
5
+ "mappings": "aAGA,OAAOA,MAAkB,oBAEzB,SAASC,EAAiCC,EAAcC,EAAcC,EAAqBC,EAA+BC,EAAgC,CAAC,EAAS,CACnKJ,EAAE,eAAe,EACjB,MAAMK,EAAiBP,EAAa,kBAAkB,EAEtD,GAAI,CAACO,GAAkBD,GAAU,SAChC,OAGD,MAAME,EAAgBF,EAAS,cAAgB,CAAE,cAAeJ,CAAE,EAAI,CAAC,EACvEC,EAAU,mBAAmB,OAAmC,CAC/D,GAAGK,EACH,OAAQ,CACP,QAASD,CACV,EACA,YAAa,CACZ,QAASH,EACT,UAAAC,CACD,CACD,CAA+C,EAE/CE,GAAgB,MAAM,CACvB,CAEA,eAAeN",
6
+ "names": ["DragRegistry", "handleDrop", "e", "component", "target", "placement", "settings", "draggedElement", "originalEvent"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";export default function o(t){let r="";for(const n in t)t[n]&&(r&&(r+=" "),r+=n);return r}
2
+ //# sourceMappingURL=hash2str.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/util/hash2str.ts"],
4
+ "sourcesContent": ["export default function hash2str(hash: Record<string, boolean>): string {\n\tlet str = \"\";\n\t// eslint-disable-next-line no-restricted-syntax\n\tfor (const prop in hash) {\n\t\tif (hash[prop]) {\n\t\t\tif (str) {\n\t\t\t\tstr += \" \";\n\t\t\t}\n\t\t\tstr += prop;\n\t\t}\n\t}\n\treturn str;\n}\n"],
5
+ "mappings": "aAAA,wBAAwBA,EAASC,EAAuC,CACvE,IAAIC,EAAM,GAEV,UAAWC,KAAQF,EACdA,EAAKE,CAAI,IACRD,IACHA,GAAO,KAERA,GAAOC,GAGT,OAAOD,CACR",
6
+ "names": ["hash2str", "hash", "str", "prop"]
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";export default function n(e){return e.toLowerCase()}
2
+ //# sourceMappingURL=toLowercaseEnumValue.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/util/toLowercaseEnumValue.ts"],
4
+ "sourcesContent": ["type LowercaseEnum<T> = T extends string ? Lowercase<T> : never;\n\nexport default function toLowercaseEnumValue<T extends string>(value: T): LowercaseEnum<T> {\n\treturn value.toLowerCase() as LowercaseEnum<T>;\n}\n"],
5
+ "mappings": "aAEA,wBAAwBA,EAAuCC,EAA4B,CAC1F,OAAOA,EAAM,YAAY,CAC1B",
6
+ "names": ["toLowercaseEnumValue", "value"]
7
+ }
@@ -0,0 +1,3 @@
1
+ import type { Renderer } from "../UI5Element.js";
2
+ declare const jsxRenderer: Renderer;
3
+ export default jsxRenderer;
@@ -0,0 +1,16 @@
1
+ import { render, createContext } from "../thirdparty/preact/preact.module.js";
2
+ import { jsx } from "../thirdparty/preact/jsxRuntime.module.js";
3
+ const instanceToContextMap = new WeakMap();
4
+ const jsxRenderer = (instance, container) => {
5
+ let ctx = instanceToContextMap.get(instance);
6
+ if (!ctx) {
7
+ // create a context holding the element that is being rendered
8
+ // this contect will be used when adding event listeners - they all will be bound to this element
9
+ ctx = createContext(instance);
10
+ instanceToContextMap.set(instance, ctx);
11
+ }
12
+ const templateResult = instance.render();
13
+ render(jsx(ctx.Provider, { value: instance, children: templateResult }), container);
14
+ };
15
+ export default jsxRenderer;
16
+ //# sourceMappingURL=JsxRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"JsxRenderer.js","sourceRoot":"","sources":["../../src/renderer/JsxRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,GAAG,EAAE,MAAM,2CAA2C,CAAC;AAIhE,MAAM,oBAAoB,GAAG,IAAI,OAAO,EAA4D,CAAC;AAErG,MAAM,WAAW,GAAa,CAAC,QAAoB,EAAE,SAAyC,EAAE,EAAE;IACjG,IAAI,GAAG,GAAG,oBAAoB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC7C,IAAI,CAAC,GAAG,EAAE,CAAC;QACV,8DAA8D;QAC9D,iGAAiG;QACjG,GAAG,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;QAC9B,oBAAoB,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IACzC,CAAC;IACD,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;IACzC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;AACrF,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { render, createContext } from \"../thirdparty/preact/preact.module.js\";\nimport { jsx } from \"../thirdparty/preact/jsxRuntime.module.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\n\nconst instanceToContextMap = new WeakMap<UI5Element, ReturnType<typeof createContext<UI5Element>>>();\n\nconst jsxRenderer: Renderer = (instance: UI5Element, container: HTMLElement | DocumentFragment) => {\n\tlet ctx = instanceToContextMap.get(instance);\n\tif (!ctx) {\n\t\t// create a context holding the element that is being rendered\n\t\t// this contect will be used when adding event listeners - they all will be bound to this element\n\t\tctx = createContext(instance);\n\t\tinstanceToContextMap.set(instance, ctx);\n\t}\n\tconst templateResult = instance.render();\n\trender(jsx(ctx.Provider, { value: instance, children: templateResult }), container);\n};\n\nexport default jsxRenderer;\n"]}
@@ -10,12 +10,13 @@ const effectiveSvg = (strings, ...values) => {
10
10
  const fn = litStatic ? litStatic.svg : svg;
11
11
  return fn(strings, ...values);
12
12
  };
13
- const litRender = (templateResult, container, options) => {
13
+ const litRender = (instance, container) => {
14
+ let templateResult = instance.render();
14
15
  const openUI5Enablement = getFeature("OpenUI5Enablement");
15
16
  if (openUI5Enablement) {
16
- templateResult = openUI5Enablement.wrapTemplateResultInBusyMarkup(effectiveHtml, options.host, templateResult);
17
+ templateResult = openUI5Enablement.wrapTemplateResultInBusyMarkup(effectiveHtml, instance, templateResult);
17
18
  }
18
- render(templateResult, container, options);
19
+ render(templateResult, container, { host: instance });
19
20
  };
20
21
  const scopeTag = (tag, tags, suffix) => {
21
22
  const litStatic = getFeature("LitStatic");
@@ -1 +1 @@
1
- {"version":3,"file":"LitRenderer.js","sourceRoot":"","sources":["../../src/renderer/LitRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,IAAI,EACJ,GAAG,GACH,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAOpD,MAAM,aAAa,GAAG,CAAC,OAA6B,EAAE,GAAG,MAAsB,EAAE,EAAE;IAClF,MAAM,SAAS,GAAG,UAAU,CAAmB,WAAW,CAAC,CAAC;IAC5D,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAA6B,EAAE,GAAG,MAAsB,EAAE,EAAE;IACjF,MAAM,SAAS,GAAG,UAAU,CAAmB,WAAW,CAAC,CAAC;IAC5D,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC3C,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,SAAS,GAAa,CAAC,cAAsC,EAAE,SAAyC,EAAE,OAAwB,EAAE,EAAE;IAC3I,MAAM,iBAAiB,GAAG,UAAU,CAA2B,mBAAmB,CAAC,CAAC;IACpF,IAAI,iBAAiB,EAAE,CAAC;QACvB,cAAc,GAAG,iBAAiB,CAAC,8BAA8B,CAAC,aAAa,EAAE,OAAO,CAAC,IAAkB,EAAE,cAAgC,CAAC,CAAC;IAChJ,CAAC;IAED,MAAM,CAAC,cAAgC,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,IAAmB,EAAE,MAAc,EAAE,EAAE;IACrE,MAAM,SAAS,GAAG,UAAU,CAAmB,WAAW,CAAC,CAAC;IAC5D,IAAI,SAAS,EAAE,CAAC;QACf,OAAO,SAAS,CAAC,YAAY,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACtF,CAAC;AACF,CAAC,CAAC;AAEF,OAAO,EACN,aAAa,IAAI,IAAI,EACrB,YAAY,IAAI,GAAG,GACnB,CAAC;AACF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,oCAAoC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,eAAe,SAAS,CAAC","sourcesContent":["import {\n\trender,\n\thtml,\n\tsvg,\n} from \"lit-html\";\n\nimport type { TemplateResult } from \"lit-html\";\n\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type { LitStatic } from \"../CustomElementsScope.js\";\nimport type OpenUI5Enablement from \"../features/OpenUI5Enablement.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport type { Renderer, RendererOptions } from \"../UI5Element.js\";\nimport type { TemplateFunctionResult } from \"./executeTemplate.js\";\n\nconst effectiveHtml = (strings: TemplateStringsArray, ...values: Array<unknown>) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tconst fn = litStatic ? litStatic.html : html;\n\treturn fn(strings, ...values);\n};\n\nconst effectiveSvg = (strings: TemplateStringsArray, ...values: Array<unknown>) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tconst fn = litStatic ? litStatic.svg : svg;\n\treturn fn(strings, ...values);\n};\n\nconst litRender: Renderer = (templateResult: TemplateFunctionResult, container: HTMLElement | DocumentFragment, options: RendererOptions) => {\n\tconst openUI5Enablement = getFeature<typeof OpenUI5Enablement>(\"OpenUI5Enablement\");\n\tif (openUI5Enablement) {\n\t\ttemplateResult = openUI5Enablement.wrapTemplateResultInBusyMarkup(effectiveHtml, options.host as UI5Element, templateResult as TemplateResult);\n\t}\n\n\trender(templateResult as TemplateResult, container, options);\n};\n\nconst scopeTag = (tag: string, tags: Array<string>, suffix: string) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tif (litStatic) {\n\t\treturn litStatic.unsafeStatic((tags || []).includes(tag) ? `${tag}-${suffix}` : tag);\n\t}\n};\n\nexport {\n\teffectiveHtml as html,\n\teffectiveSvg as svg,\n};\nexport { scopeTag };\nexport { repeat } from \"lit-html/directives/repeat.js\";\nexport { classMap } from \"lit-html/directives/class-map.js\";\n// @ts-ignore style-map is a JS file\nexport { styleMap } from \"./directives/style-map.js\";\nexport { ifDefined } from \"lit-html/directives/if-defined.js\";\nexport { unsafeHTML } from \"lit-html/directives/unsafe-html.js\";\n\nexport default litRender;\n"]}
1
+ {"version":3,"file":"LitRenderer.js","sourceRoot":"","sources":["../../src/renderer/LitRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,MAAM,EACN,IAAI,EACJ,GAAG,GACH,MAAM,UAAU,CAAC;AAIlB,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAMpD,MAAM,aAAa,GAAG,CAAC,OAA6B,EAAE,GAAG,MAAsB,EAAE,EAAE;IAClF,MAAM,SAAS,GAAG,UAAU,CAAmB,WAAW,CAAC,CAAC;IAC5D,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,CAAC,OAA6B,EAAE,GAAG,MAAsB,EAAE,EAAE;IACjF,MAAM,SAAS,GAAG,UAAU,CAAmB,WAAW,CAAC,CAAC;IAC5D,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC;IAC3C,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,MAAM,CAAC,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,SAAS,GAAa,CAAC,QAAoB,EAAE,SAAyC,EAAE,EAAE;IAC/F,IAAI,cAAc,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;IACvC,MAAM,iBAAiB,GAAG,UAAU,CAA2B,mBAAmB,CAAC,CAAC;IACpF,IAAI,iBAAiB,EAAE,CAAC;QACvB,cAAc,GAAG,iBAAiB,CAAC,8BAA8B,CAAC,aAAa,EAAE,QAAQ,EAAE,cAAgC,CAAC,CAAC;IAC9H,CAAC;IAED,MAAM,CAAC,cAAgC,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACzE,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,IAAmB,EAAE,MAAc,EAAE,EAAE;IACrE,MAAM,SAAS,GAAG,UAAU,CAAmB,WAAW,CAAC,CAAC;IAC5D,IAAI,SAAS,EAAE,CAAC;QACf,OAAO,SAAS,CAAC,YAAY,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,MAAM,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IACtF,CAAC;AACF,CAAC,CAAC;AAEF,OAAO,EACN,aAAa,IAAI,IAAI,EACrB,YAAY,IAAI,GAAG,GACnB,CAAC;AACF,OAAO,EAAE,QAAQ,EAAE,CAAC;AACpB,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAC5D,oCAAoC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,eAAe,SAAS,CAAC","sourcesContent":["import {\n\trender,\n\thtml,\n\tsvg,\n} from \"lit-html\";\n\nimport type { TemplateResult } from \"lit-html\";\n\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type { LitStatic } from \"../CustomElementsScope.js\";\nimport type OpenUI5Enablement from \"../features/OpenUI5Enablement.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport type { Renderer } from \"../UI5Element.js\";\n\nconst effectiveHtml = (strings: TemplateStringsArray, ...values: Array<unknown>) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tconst fn = litStatic ? litStatic.html : html;\n\treturn fn(strings, ...values);\n};\n\nconst effectiveSvg = (strings: TemplateStringsArray, ...values: Array<unknown>) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tconst fn = litStatic ? litStatic.svg : svg;\n\treturn fn(strings, ...values);\n};\n\nconst litRender: Renderer = (instance: UI5Element, container: HTMLElement | DocumentFragment) => {\n\tlet templateResult = instance.render();\n\tconst openUI5Enablement = getFeature<typeof OpenUI5Enablement>(\"OpenUI5Enablement\");\n\tif (openUI5Enablement) {\n\t\ttemplateResult = openUI5Enablement.wrapTemplateResultInBusyMarkup(effectiveHtml, instance, templateResult as TemplateResult);\n\t}\n\n\trender(templateResult as TemplateResult, container, { host: instance });\n};\n\nconst scopeTag = (tag: string, tags: Array<string>, suffix: string) => {\n\tconst litStatic = getFeature<typeof LitStatic>(\"LitStatic\");\n\tif (litStatic) {\n\t\treturn litStatic.unsafeStatic((tags || []).includes(tag) ? `${tag}-${suffix}` : tag);\n\t}\n};\n\nexport {\n\teffectiveHtml as html,\n\teffectiveSvg as svg,\n};\nexport { scopeTag };\nexport { repeat } from \"lit-html/directives/repeat.js\";\nexport { classMap } from \"lit-html/directives/class-map.js\";\n// @ts-ignore style-map is a JS file\nexport { styleMap } from \"./directives/style-map.js\";\nexport { ifDefined } from \"lit-html/directives/if-defined.js\";\nexport { unsafeHTML } from \"lit-html/directives/unsafe-html.js\";\n\nexport default litRender;\n"]}
@@ -1,6 +1,5 @@
1
1
  import type UI5Element from "../UI5Element.js";
2
- type TemplateFunctionResult = object;
3
- type TemplateFunction = (component: UI5Element, tagsToScope: Array<string>, scope: string | undefined) => TemplateFunctionResult;
2
+ type TemplateFunction = () => object;
4
3
  /**
5
4
  * Runs a component's template with the component's current state, while also scoping HTML
6
5
  *
@@ -8,14 +7,6 @@ type TemplateFunction = (component: UI5Element, tagsToScope: Array<string>, scop
8
7
  * @param component - the component
9
8
  * @public
10
9
  */
11
- declare const executeTemplate: (template: TemplateFunction, component: UI5Element) => TemplateFunctionResult;
12
- /**
13
- * Returns all tags, used inside component's template subject to scoping.
14
- * @param component - the component
15
- * @returns {Array[]}
16
- * @private
17
- */
18
- declare const getTagsToScope: (component: UI5Element) => string[];
10
+ declare const executeTemplate: (template: TemplateFunction, component: UI5Element) => object;
19
11
  export default executeTemplate;
20
- export { getTagsToScope };
21
- export type { TemplateFunction, TemplateFunctionResult };
12
+ export type { TemplateFunction };
@@ -1,4 +1,3 @@
1
- import { getCustomElementsScopingSuffix, shouldScopeCustomElement } from "../CustomElementsScopeUtils.js";
2
1
  /**
3
2
  * Runs a component's template with the component's current state, while also scoping HTML
4
3
  *
@@ -7,25 +6,7 @@ import { getCustomElementsScopingSuffix, shouldScopeCustomElement } from "../Cus
7
6
  * @public
8
7
  */
9
8
  const executeTemplate = (template, component) => {
10
- const tagsToScope = getTagsToScope(component);
11
- const scope = getCustomElementsScopingSuffix();
12
- return template.call(component, component, tagsToScope, scope);
13
- };
14
- /**
15
- * Returns all tags, used inside component's template subject to scoping.
16
- * @param component - the component
17
- * @returns {Array[]}
18
- * @private
19
- */
20
- const getTagsToScope = (component) => {
21
- const ctor = component.constructor;
22
- const componentTag = ctor.getMetadata().getPureTag();
23
- const tagsToScope = ctor.getUniqueDependencies().map((dep) => dep.getMetadata().getPureTag()).filter(shouldScopeCustomElement);
24
- if (shouldScopeCustomElement(componentTag)) {
25
- tagsToScope.push(componentTag);
26
- }
27
- return tagsToScope;
9
+ return template.call(component);
28
10
  };
29
11
  export default executeTemplate;
30
- export { getTagsToScope };
31
12
  //# sourceMappingURL=executeTemplate.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"executeTemplate.js","sourceRoot":"","sources":["../../src/renderer/executeTemplate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAM1G;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,QAA0B,EAAE,SAAqB,EAA0B,EAAE;IACrG,MAAM,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;IAC9C,MAAM,KAAK,GAAG,8BAA8B,EAAE,CAAC;IAC/C,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;AAChE,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,cAAc,GAAG,CAAC,SAAqB,EAAE,EAAE;IAChD,MAAM,IAAI,GAAG,SAAS,CAAC,WAAgC,CAAC;IAExD,MAAM,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC;IACrD,MAAM,WAAW,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,GAAG,CAAC,CAAC,GAAsB,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,EAAE,CAAC,UAAU,EAAE,CAAC,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;IAElJ,IAAI,wBAAwB,CAAC,YAAY,CAAC,EAAE,CAAC;QAC5C,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAChC,CAAC;IAED,OAAO,WAAW,CAAC;AACpB,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { getCustomElementsScopingSuffix, shouldScopeCustomElement } from \"../CustomElementsScopeUtils.js\";\nimport type UI5Element from \"../UI5Element.js\";\n\ntype TemplateFunctionResult = object;\ntype TemplateFunction = (component: UI5Element, tagsToScope: Array<string>, scope: string | undefined) => TemplateFunctionResult;\n\n/**\n * Runs a component's template with the component's current state, while also scoping HTML\n *\n * @param template - the template to execute\n * @param component - the component\n * @public\n */\nconst executeTemplate = (template: TemplateFunction, component: UI5Element): TemplateFunctionResult => {\n\tconst tagsToScope = getTagsToScope(component);\n\tconst scope = getCustomElementsScopingSuffix();\n\treturn template.call(component, component, tagsToScope, scope);\n};\n\n/**\n * Returns all tags, used inside component's template subject to scoping.\n * @param component - the component\n * @returns {Array[]}\n * @private\n */\nconst getTagsToScope = (component: UI5Element) => {\n\tconst ctor = component.constructor as typeof UI5Element;\n\n\tconst componentTag = ctor.getMetadata().getPureTag();\n\tconst tagsToScope = ctor.getUniqueDependencies().map((dep: typeof UI5Element) => dep.getMetadata().getPureTag()).filter(shouldScopeCustomElement);\n\n\tif (shouldScopeCustomElement(componentTag)) {\n\t\ttagsToScope.push(componentTag);\n\t}\n\n\treturn tagsToScope;\n};\n\nexport default executeTemplate;\nexport { getTagsToScope };\nexport type { TemplateFunction, TemplateFunctionResult };\n"]}
1
+ {"version":3,"file":"executeTemplate.js","sourceRoot":"","sources":["../../src/renderer/executeTemplate.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,MAAM,eAAe,GAAG,CAAC,QAA0B,EAAE,SAAqB,EAAE,EAAE;IAC7E,OAAO,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import type UI5Element from \"../UI5Element.js\";\n\ntype TemplateFunction = () => object;\n\n/**\n * Runs a component's template with the component's current state, while also scoping HTML\n *\n * @param template - the template to execute\n * @param component - the component\n * @public\n */\nconst executeTemplate = (template: TemplateFunction, component: UI5Element) => {\n\treturn template.call(component);\n};\n\nexport default executeTemplate;\nexport type { TemplateFunction };\n"]}