@ui5/webcomponents-base 2.0.0-rc.5 → 2.0.0-rc.6

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 (100) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/Boot.js.map +1 -1
  4. package/dist/CustomElementsRegistry.js.map +1 -1
  5. package/dist/InitialConfiguration.d.ts +1 -1
  6. package/dist/InitialConfiguration.js.map +1 -1
  7. package/dist/ManagedStyles.d.ts +1 -1
  8. package/dist/ManagedStyles.js.map +1 -1
  9. package/dist/Render.js.map +1 -1
  10. package/dist/UI5Element.d.ts +2 -1
  11. package/dist/UI5Element.js +4 -1
  12. package/dist/UI5Element.js.map +1 -1
  13. package/dist/UI5ElementMetadata.d.ts +1 -1
  14. package/dist/UI5ElementMetadata.js.map +1 -1
  15. package/dist/connectToComponent.js.map +1 -1
  16. package/dist/decorators/property.d.ts +1 -1
  17. package/dist/decorators/property.js.map +1 -1
  18. package/dist/decorators/slot.d.ts +1 -1
  19. package/dist/decorators/slot.js.map +1 -1
  20. package/dist/features/F6Navigation.js +1 -1
  21. package/dist/features/F6Navigation.js.map +1 -1
  22. package/dist/features/OpenUI5Enablement.d.ts +1 -1
  23. package/dist/features/OpenUI5Enablement.js.map +1 -1
  24. package/dist/features/OpenUI5Support.d.ts +1 -1
  25. package/dist/features/OpenUI5Support.js.map +1 -1
  26. package/dist/features/patchPopup.d.ts +1 -0
  27. package/dist/features/patchPopup.js +11 -0
  28. package/dist/features/patchPopup.js.map +1 -1
  29. package/dist/generated/VersionInfo.js +3 -3
  30. package/dist/generated/VersionInfo.js.map +1 -1
  31. package/dist/prod/Boot.js +1 -1
  32. package/dist/prod/Boot.js.map +1 -1
  33. package/dist/prod/CustomElementsRegistry.js +2 -2
  34. package/dist/prod/CustomElementsRegistry.js.map +1 -1
  35. package/dist/prod/InitialConfiguration.js.map +1 -1
  36. package/dist/prod/ManagedStyles.js +1 -1
  37. package/dist/prod/ManagedStyles.js.map +1 -1
  38. package/dist/prod/Render.js +1 -1
  39. package/dist/prod/Render.js.map +1 -1
  40. package/dist/prod/UI5Element.js +1 -1
  41. package/dist/prod/UI5Element.js.map +2 -2
  42. package/dist/prod/UI5ElementMetadata.js +1 -1
  43. package/dist/prod/UI5ElementMetadata.js.map +1 -1
  44. package/dist/prod/connectToComponent.js +1 -1
  45. package/dist/prod/connectToComponent.js.map +1 -1
  46. package/dist/prod/decorators/property.js +1 -1
  47. package/dist/prod/decorators/property.js.map +1 -1
  48. package/dist/prod/decorators/slot.js +1 -1
  49. package/dist/prod/decorators/slot.js.map +1 -1
  50. package/dist/prod/features/F6Navigation.js +1 -1
  51. package/dist/prod/features/F6Navigation.js.map +2 -2
  52. package/dist/prod/features/OpenUI5Enablement.js.map +1 -1
  53. package/dist/prod/features/OpenUI5Support.js.map +1 -1
  54. package/dist/prod/features/patchPopup.js +1 -1
  55. package/dist/prod/features/patchPopup.js.map +3 -3
  56. package/dist/prod/generated/VersionInfo.js +1 -1
  57. package/dist/prod/generated/VersionInfo.js.map +1 -1
  58. package/dist/prod/renderer/LitRenderer.js +1 -1
  59. package/dist/prod/renderer/LitRenderer.js.map +2 -2
  60. package/dist/prod/theming/getConstructableStyle.js +1 -1
  61. package/dist/prod/theming/getConstructableStyle.js.map +1 -1
  62. package/dist/prod/theming/getEffectiveStyle.js +1 -1
  63. package/dist/prod/theming/getEffectiveStyle.js.map +1 -1
  64. package/dist/prod/types/DataType.js +1 -1
  65. package/dist/prod/types/DataType.js.map +1 -1
  66. package/dist/prod/types/Float.js +1 -1
  67. package/dist/prod/types/Float.js.map +1 -1
  68. package/dist/prod/types/Integer.js +1 -1
  69. package/dist/prod/types/Integer.js.map +1 -1
  70. package/dist/prod/util/AriaLabelHelper.js +1 -1
  71. package/dist/prod/util/AriaLabelHelper.js.map +2 -2
  72. package/dist/prod/util/TabbableElements.js +1 -1
  73. package/dist/prod/util/TabbableElements.js.map +3 -3
  74. package/dist/prod/util/debounce.js +1 -1
  75. package/dist/prod/util/debounce.js.map +1 -1
  76. package/dist/prod/util/dragAndDrop/DragRegistry.js +1 -1
  77. package/dist/prod/util/dragAndDrop/DragRegistry.js.map +2 -2
  78. package/dist/prod/util/isElementTabbable.js +1 -1
  79. package/dist/prod/util/isElementTabbable.js.map +3 -3
  80. package/dist/renderer/LitRenderer.d.ts +1 -1
  81. package/dist/renderer/LitRenderer.js.map +1 -1
  82. package/dist/theming/getConstructableStyle.d.ts +1 -1
  83. package/dist/theming/getConstructableStyle.js.map +1 -1
  84. package/dist/theming/getEffectiveStyle.js.map +1 -1
  85. package/dist/types/DataType.d.ts +1 -1
  86. package/dist/types/DataType.js.map +1 -1
  87. package/dist/types/Float.d.ts +1 -1
  88. package/dist/types/Float.js.map +1 -1
  89. package/dist/types/Integer.d.ts +1 -1
  90. package/dist/types/Integer.js.map +1 -1
  91. package/dist/util/AriaLabelHelper.d.ts +1 -1
  92. package/dist/util/AriaLabelHelper.js.map +1 -1
  93. package/dist/util/TabbableElements.js +3 -10
  94. package/dist/util/TabbableElements.js.map +1 -1
  95. package/dist/util/debounce.js.map +1 -1
  96. package/dist/util/dragAndDrop/DragRegistry.js +0 -2
  97. package/dist/util/dragAndDrop/DragRegistry.js.map +1 -1
  98. package/dist/util/isElementTabbable.js +2 -2
  99. package/dist/util/isElementTabbable.js.map +1 -1
  100. package/package.json +3 -3
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/connectToComponent.ts"],
4
- "sourcesContent": ["import type UI5Element from \"./UI5Element.js\";\nimport { renderDeferred } from \"./Render.js\";\nimport { Interval } from \"./types.js\";\n\nconst MISSING_ELEMENT_POLL_TIMEOUT = 500; // how often to poll for not-yet-in-DOM friend elements\nconst connections = new Map<string, HTMLElement>();\nconst intervals = new Map<string, Interval>();\n\ntype ConnectOptions = {\n\thost: UI5Element;\n\tpropName: string;\n\tonConnect?: (friend: HTMLElement) => void;\n\tonDisconnect?: (friend: HTMLElement) => void;\n}\n\nconst connectToComponent = (options: ConnectOptions): HTMLElement | undefined => {\n\tconst host = options.host;\n\tconst propName = options.propName;\n\tconst friend = host[propName as keyof typeof host] as HTMLElement | string | undefined;\n\n\tlet connectedTo: HTMLElement | undefined;\n\tif (friend === undefined || friend === \"\") {\n\t\tconnectedTo = undefined; // do not return early even if a \"menu\" property is not set - it may have been set before and cleanup must run\n\t} else if (friend instanceof HTMLElement) {\n\t\tconnectedTo = friend;\n\t} else {\n\t\tconst rootNode = host.getRootNode() as Document;\n\t\tconnectedTo = (rootNode.getElementById && rootNode.getElementById(friend)) || undefined;\n\t}\n\n\tconst key = `${host._id}-${propName}`;\n\tconst prevConnectedTo = connections.get(key);\n\n\t// Not connected - return undefined\n\tif (!connectedTo) {\n\t\tif (prevConnectedTo) { // but first disconnect, if needed\n\t\t\toptions.onDisconnect && options.onDisconnect(prevConnectedTo);\n\t\t\tconnections.delete(key);\n\t\t}\n\n\t\t// if friend element not in DOM yet, start polling\n\t\tif (typeof friend === \"string\" && friend && !intervals.has(key)) {\n\t\t\tconst interval = setInterval(() => {\n\t\t\t\tconst rootNode = host.getRootNode() as Document;\n\t\t\t\tconst found = (rootNode.getElementById && rootNode.getElementById(friend));\n\n\t\t\t\tif (found) {\n\t\t\t\t\tclearInterval(intervals.get(key));\n\t\t\t\t\tintervals.delete(key);\n\t\t\t\t\trenderDeferred(host);\n\t\t\t\t}\n\t\t\t}, MISSING_ELEMENT_POLL_TIMEOUT);\n\t\t\tintervals.set(key, interval);\n\t\t}\n\n\t\treturn;\n\t}\n\n\t// If connected, but still polling, stop polling\n\tif (intervals.has(key)) {\n\t\tclearInterval(intervals.get(key));\n\t\tintervals.delete(key);\n\t}\n\n\t// Connected - either for the first time, or to something else\n\tif (prevConnectedTo !== connectedTo) {\n\t\tif (prevConnectedTo) {\n\t\t\toptions.onDisconnect && options.onDisconnect(prevConnectedTo);\n\t\t}\n\t\toptions.onConnect && options.onConnect(connectedTo);\n\t\tconnections.set(key, connectedTo);\n\t}\n\n\treturn connections.get(key);\n};\n\nexport default connectToComponent;\n"],
4
+ "sourcesContent": ["import type UI5Element from \"./UI5Element.js\";\nimport { renderDeferred } from \"./Render.js\";\nimport type { Interval } from \"./types.js\";\n\nconst MISSING_ELEMENT_POLL_TIMEOUT = 500; // how often to poll for not-yet-in-DOM friend elements\nconst connections = new Map<string, HTMLElement>();\nconst intervals = new Map<string, Interval>();\n\ntype ConnectOptions = {\n\thost: UI5Element;\n\tpropName: string;\n\tonConnect?: (friend: HTMLElement) => void;\n\tonDisconnect?: (friend: HTMLElement) => void;\n}\n\nconst connectToComponent = (options: ConnectOptions): HTMLElement | undefined => {\n\tconst host = options.host;\n\tconst propName = options.propName;\n\tconst friend = host[propName as keyof typeof host] as HTMLElement | string | undefined;\n\n\tlet connectedTo: HTMLElement | undefined;\n\tif (friend === undefined || friend === \"\") {\n\t\tconnectedTo = undefined; // do not return early even if a \"menu\" property is not set - it may have been set before and cleanup must run\n\t} else if (friend instanceof HTMLElement) {\n\t\tconnectedTo = friend;\n\t} else {\n\t\tconst rootNode = host.getRootNode() as Document;\n\t\tconnectedTo = (rootNode.getElementById && rootNode.getElementById(friend)) || undefined;\n\t}\n\n\tconst key = `${host._id}-${propName}`;\n\tconst prevConnectedTo = connections.get(key);\n\n\t// Not connected - return undefined\n\tif (!connectedTo) {\n\t\tif (prevConnectedTo) { // but first disconnect, if needed\n\t\t\toptions.onDisconnect && options.onDisconnect(prevConnectedTo);\n\t\t\tconnections.delete(key);\n\t\t}\n\n\t\t// if friend element not in DOM yet, start polling\n\t\tif (typeof friend === \"string\" && friend && !intervals.has(key)) {\n\t\t\tconst interval = setInterval(() => {\n\t\t\t\tconst rootNode = host.getRootNode() as Document;\n\t\t\t\tconst found = (rootNode.getElementById && rootNode.getElementById(friend));\n\n\t\t\t\tif (found) {\n\t\t\t\t\tclearInterval(intervals.get(key));\n\t\t\t\t\tintervals.delete(key);\n\t\t\t\t\trenderDeferred(host);\n\t\t\t\t}\n\t\t\t}, MISSING_ELEMENT_POLL_TIMEOUT);\n\t\t\tintervals.set(key, interval);\n\t\t}\n\n\t\treturn;\n\t}\n\n\t// If connected, but still polling, stop polling\n\tif (intervals.has(key)) {\n\t\tclearInterval(intervals.get(key));\n\t\tintervals.delete(key);\n\t}\n\n\t// Connected - either for the first time, or to something else\n\tif (prevConnectedTo !== connectedTo) {\n\t\tif (prevConnectedTo) {\n\t\t\toptions.onDisconnect && options.onDisconnect(prevConnectedTo);\n\t\t}\n\t\toptions.onConnect && options.onConnect(connectedTo);\n\t\tconnections.set(key, connectedTo);\n\t}\n\n\treturn connections.get(key);\n};\n\nexport default connectToComponent;\n"],
5
5
  "mappings": "aACA,OAAS,kBAAAA,MAAsB,cAG/B,MAAMC,EAA+B,IAC/BC,EAAc,IAAI,IAClBC,EAAY,IAAI,IAShBC,EAAsBC,GAAqD,CAChF,MAAMC,EAAOD,EAAQ,KACfE,EAAWF,EAAQ,SACnBG,EAASF,EAAKC,CAA6B,EAEjD,IAAIE,EACJ,GAAID,IAAW,QAAaA,IAAW,GACtCC,EAAc,eACJD,aAAkB,YAC5BC,EAAcD,MACR,CACN,MAAME,EAAWJ,EAAK,YAAY,EAClCG,EAAeC,EAAS,gBAAkBA,EAAS,eAAeF,CAAM,GAAM,MAC/E,CAEA,MAAMG,EAAM,GAAGL,EAAK,GAAG,IAAIC,CAAQ,GAC7BK,EAAkBV,EAAY,IAAIS,CAAG,EAG3C,GAAI,CAACF,EAAa,CAOjB,GANIG,IACHP,EAAQ,cAAgBA,EAAQ,aAAaO,CAAe,EAC5DV,EAAY,OAAOS,CAAG,GAInB,OAAOH,GAAW,UAAYA,GAAU,CAACL,EAAU,IAAIQ,CAAG,EAAG,CAChE,MAAME,EAAW,YAAY,IAAM,CAClC,MAAMH,EAAWJ,EAAK,YAAY,EACnBI,EAAS,gBAAkBA,EAAS,eAAeF,CAAM,IAGvE,cAAcL,EAAU,IAAIQ,CAAG,CAAC,EAChCR,EAAU,OAAOQ,CAAG,EACpBX,EAAeM,CAAI,EAErB,EAAGL,CAA4B,EAC/BE,EAAU,IAAIQ,EAAKE,CAAQ,CAC5B,CAEA,MACD,CAGA,OAAIV,EAAU,IAAIQ,CAAG,IACpB,cAAcR,EAAU,IAAIQ,CAAG,CAAC,EAChCR,EAAU,OAAOQ,CAAG,GAIjBC,IAAoBH,IACnBG,GACHP,EAAQ,cAAgBA,EAAQ,aAAaO,CAAe,EAE7DP,EAAQ,WAAaA,EAAQ,UAAUI,CAAW,EAClDP,EAAY,IAAIS,EAAKF,CAAW,GAG1BP,EAAY,IAAIS,CAAG,CAC3B,EAEA,eAAeP",
6
6
  "names": ["renderDeferred", "MISSING_ELEMENT_POLL_TIMEOUT", "connections", "intervals", "connectToComponent", "options", "host", "propName", "friend", "connectedTo", "rootNode", "key", "prevConnectedTo", "interval"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const s=a=>(p,e)=>{const t=p.constructor;Object.prototype.hasOwnProperty.call(t,"metadata")||(t.metadata={});const r=t.metadata;r.properties||(r.properties={});const o=r.properties;o[e]||(o[e]=a||{type:String})};export default s;
1
+ "use strict";const s=o=>(p,r)=>{const t=p.constructor;Object.prototype.hasOwnProperty.call(t,"metadata")||(t.metadata={});const e=t.metadata;e.properties||(e.properties={});const a=e.properties;a[r]||(a[r]=o||{type:String})};export default s;
2
2
  //# sourceMappingURL=property.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/property.ts"],
4
- "sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport { Property } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a property decorator.\n *\n * @param { Property } propData\n * @returns { PropertyDecorator }\n */\nconst property = (propData?: Property): PropertyDecorator => {\n\treturn (target: any, propertyKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.properties) {\n\t\t\tmetadata.properties = {};\n\t\t}\n\n\t\tconst propsMetadata = metadata.properties;\n\t\tif (!propsMetadata[propertyKey as string]) {\n\t\t\tpropsMetadata[propertyKey as string] = propData || { type: String };\n\t\t}\n\t};\n};\n\nexport default property;\n"],
4
+ "sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Property } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a property decorator.\n *\n * @param { Property } propData\n * @returns { PropertyDecorator }\n */\nconst property = (propData?: Property): PropertyDecorator => {\n\treturn (target: any, propertyKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.properties) {\n\t\t\tmetadata.properties = {};\n\t\t}\n\n\t\tconst propsMetadata = metadata.properties;\n\t\tif (!propsMetadata[propertyKey as string]) {\n\t\t\tpropsMetadata[propertyKey as string] = propData || { type: String };\n\t\t}\n\t};\n};\n\nexport default property;\n"],
5
5
  "mappings": "aASA,MAAMA,EAAYC,GACV,CAACC,EAAaC,IAAiC,CACrD,MAAMC,EAAOF,EAAO,YAEf,OAAO,UAAU,eAAe,KAAKE,EAAM,UAAU,IACzDA,EAAK,SAAW,CAAC,GAGlB,MAAMC,EAAWD,EAAK,SACjBC,EAAS,aACbA,EAAS,WAAa,CAAC,GAGxB,MAAMC,EAAgBD,EAAS,WAC1BC,EAAcH,CAAqB,IACvCG,EAAcH,CAAqB,EAAIF,GAAY,CAAE,KAAM,MAAO,EAEpE,EAGD,eAAeD",
6
6
  "names": ["property", "propData", "target", "propertyKey", "ctor", "metadata", "propsMetadata"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const f=e=>(l,n)=>{const r=l.constructor;Object.prototype.hasOwnProperty.call(r,"metadata")||(r.metadata={});const o=r.metadata;o.slots||(o.slots={});const t=o.slots;if(e&&e.default&&t.default)throw new Error("Only one slot can be the default slot.");const a=e&&e.default?"default":n;e=e||{type:HTMLElement},e.type||(e.type=HTMLElement),t[a]||(t[a]=e),e.default&&(delete t.default.default,t.default.propertyName=n),r.metadata.managedSlots=!0};export default f;
1
+ "use strict";const d=e=>(l,a)=>{const r=l.constructor;Object.prototype.hasOwnProperty.call(r,"metadata")||(r.metadata={});const o=r.metadata;o.slots||(o.slots={});const t=o.slots;if(e&&e.default&&t.default)throw new Error("Only one slot can be the default slot.");const n=e&&e.default?"default":a;e=e||{type:HTMLElement},e.type||(e.type=HTMLElement),t[n]||(t[n]=e),e.default&&(delete t.default.default,t.default.propertyName=a),r.metadata.managedSlots=!0};export default d;
2
2
  //# sourceMappingURL=slot.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/decorators/slot.ts"],
4
- "sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport { Slot } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a slot decorator.\n *\n * @param { Slot } slotData\n * @returns { PropertyDecorator }\n */\nconst slot = (slotData?: Slot): PropertyDecorator => {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : slotKey as string;\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n};\n\nexport default slot;\n"],
4
+ "sourcesContent": ["import type UI5Element from \"../UI5Element.js\";\nimport type { Slot } from \"../UI5ElementMetadata.js\";\n\n/**\n * Returns a slot decorator.\n *\n * @param { Slot } slotData\n * @returns { PropertyDecorator }\n */\nconst slot = (slotData?: Slot): PropertyDecorator => {\n\treturn (target: any, slotKey: string | symbol) => {\n\t\tconst ctor = target.constructor as typeof UI5Element;\n\n\t\tif (!Object.prototype.hasOwnProperty.call(ctor, \"metadata\")) {\n\t\t\tctor.metadata = {};\n\t\t}\n\n\t\tconst metadata = ctor.metadata;\n\t\tif (!metadata.slots) {\n\t\t\tmetadata.slots = {};\n\t\t}\n\n\t\tconst slotMetadata = metadata.slots;\n\n\t\tif (slotData && slotData.default && slotMetadata.default) {\n\t\t\tthrow new Error(\"Only one slot can be the default slot.\");\n\t\t}\n\n\t\tconst key = slotData && slotData.default ? \"default\" : slotKey as string;\n\t\tslotData = slotData || { type: HTMLElement };\n\n\t\tif (!slotData.type) {\n\t\t\tslotData.type = HTMLElement;\n\t\t}\n\n\t\tif (!slotMetadata[key]) {\n\t\t\tslotMetadata[key] = slotData;\n\t\t}\n\n\t\tif (slotData.default) {\n\t\t\tdelete slotMetadata.default.default;\n\t\t\tslotMetadata.default.propertyName = slotKey as string;\n\t\t}\n\n\t\tctor.metadata.managedSlots = true;\n\t};\n};\n\nexport default slot;\n"],
5
5
  "mappings": "aASA,MAAMA,EAAQC,GACN,CAACC,EAAaC,IAA6B,CACjD,MAAMC,EAAOF,EAAO,YAEf,OAAO,UAAU,eAAe,KAAKE,EAAM,UAAU,IACzDA,EAAK,SAAW,CAAC,GAGlB,MAAMC,EAAWD,EAAK,SACjBC,EAAS,QACbA,EAAS,MAAQ,CAAC,GAGnB,MAAMC,EAAeD,EAAS,MAE9B,GAAIJ,GAAYA,EAAS,SAAWK,EAAa,QAChD,MAAM,IAAI,MAAM,wCAAwC,EAGzD,MAAMC,EAAMN,GAAYA,EAAS,QAAU,UAAYE,EACvDF,EAAWA,GAAY,CAAE,KAAM,WAAY,EAEtCA,EAAS,OACbA,EAAS,KAAO,aAGZK,EAAaC,CAAG,IACpBD,EAAaC,CAAG,EAAIN,GAGjBA,EAAS,UACZ,OAAOK,EAAa,QAAQ,QAC5BA,EAAa,QAAQ,aAAeH,GAGrCC,EAAK,SAAS,aAAe,EAC9B,EAGD,eAAeJ",
6
6
  "names": ["slot", "slotData", "target", "slotKey", "ctor", "metadata", "slotMetadata", "key"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import{registerFeature as a}from"../FeaturesRegistry.js";import{isF6Next as r,isF6Previous as l}from"../Keys.js";import{instanceOfUI5Element as u}from"../UI5Element.js";import{getFirstFocusableElement as h}from"../util/FocusableElements.js";import m from"../util/getFastNavigationGroups.js";import p from"../util/isElementClickable.js";class n{constructor(){this.selectedGroup=null;this.groups=[];this.keydownHandler=this._keydownHandler.bind(this),this.attachEventListeners()}attachEventListeners(){document.addEventListener("keydown",this.keydownHandler)}async groupElementToFocus(e){const s=u(e)?e.getDomRef():e;if(s){if(p(s))return s;const t=await h(s);if(t)return t}}async findNextFocusableGroupElement(e){let s;for(let t=0;t<this.groups.length;t++){let o;if(e>-1?e+1>=this.groups.length?(e=0,o=this.groups[e]):(e+=1,o=this.groups[e]):(e=0,o=this.groups[e]),s=await this.groupElementToFocus(o),s)break}return s}async findPreviousFocusableGroupElement(e){let s;for(let t=0;t<this.groups.length;t++){let o;if(e>0?(e=await this.groupElementToFocus(this.groups[e-1])===await this.groupElementToFocus(this.groups[e])?e-2:e-1,e<0&&(e=this.groups.length-1),o=this.groups[e]):(e=this.groups.length-1,o=this.groups[e]),s=await this.groupElementToFocus(o),s)break}return s}async _keydownHandler(e){const s=r(e),t=l(e);if(!(s||t)||(this.updateGroups(),this.groups.length<1))return;e.preventDefault();let o;if(this.groups.length===0)return o=await this.groupElementToFocus(this.groups[0]),o?.focus();let i=-1;this.selectedGroup&&(i=this.groups.indexOf(this.selectedGroup)),s&&(o=await this.findNextFocusableGroupElement(i)),t&&(o=await this.findPreviousFocusableGroupElement(i)),o?.focus()}removeEventListeners(){document.removeEventListener("keydown",this.keydownHandler)}updateGroups(){this.setSelectedGroup(),this.groups=m(document.body)}setSelectedGroup(e=window.document){const s=window.document.querySelector("html");let t=this.deepActive(e);for(;t&&t.getAttribute("data-sap-ui-fastnavgroup")!=="true"&&t!==s;)t=t.parentElement?t.parentNode:t.parentNode.host;this.selectedGroup=t}deepActive(e){return e.activeElement&&e.activeElement.shadowRoot?this.deepActive(e.activeElement.shadowRoot):e.activeElement}destroy(){this.removeEventListeners()}static init(){return this._instance||(this._instance=new n),this._instance}}a("F6Navigation",n);export default n;
1
+ "use strict";import{registerFeature as a}from"../FeaturesRegistry.js";import{isF6Next as r,isF6Previous as l}from"../Keys.js";import{instanceOfUI5Element as u}from"../UI5Element.js";import{getFirstFocusableElement as h}from"../util/FocusableElements.js";import m from"../util/getFastNavigationGroups.js";import p from"../util/isElementClickable.js";class n{constructor(){this.selectedGroup=null;this.groups=[];this.keydownHandler=this._keydownHandler.bind(this),this.attachEventListeners()}attachEventListeners(){document.addEventListener("keydown",this.keydownHandler)}async groupElementToFocus(e){const o=u(e)?e.getDomRef():e;if(o){if(p(o))return o;const t=await h(o);if(t)return t}}async findNextFocusableGroupElement(e){let o;for(let t=0;t<this.groups.length;t++){let s;if(e>-1?e+1>=this.groups.length?(e=0,s=this.groups[e]):(e+=1,s=this.groups[e]):(e=0,s=this.groups[e]),o=await this.groupElementToFocus(s),o)break}return o}async findPreviousFocusableGroupElement(e){let o;for(let t=0;t<this.groups.length;t++){let s;if(e>0?(e=await this.groupElementToFocus(this.groups[e-1])===await this.groupElementToFocus(this.groups[e])?e-2:e-1,e<0&&(e=this.groups.length-1),s=this.groups[e]):(e=this.groups.length-1,s=this.groups[e]),o=await this.groupElementToFocus(s),o)break}return o}async _keydownHandler(e){const o=r(e),t=l(e);if(!(o||t)||(this.updateGroups(),this.groups.length<1))return;e.preventDefault();let s;if(this.groups.length===0)return s=await this.groupElementToFocus(this.groups[0]),s?.focus();let i=-1;this.selectedGroup&&(i=this.groups.indexOf(this.selectedGroup)),o&&(s=await this.findNextFocusableGroupElement(i)),t&&(s=await this.findPreviousFocusableGroupElement(i)),s?.focus()}removeEventListeners(){document.removeEventListener("keydown",this.keydownHandler)}updateGroups(){this.setSelectedGroup(),this.groups=m(document.body)}setSelectedGroup(e=window.document){const o=window.document.querySelector("html");let t=this.deepActive(e);for(;t&&t.getAttribute("data-sap-ui-fastnavgroup")!=="true"&&t!==o;)t=t.parentElement?t.parentNode:t.parentNode.host;this.selectedGroup=t}deepActive(e){return e?.activeElement?.shadowRoot?.activeElement?this.deepActive(e.activeElement.shadowRoot):e.activeElement}destroy(){this.removeEventListeners()}static init(){return this._instance||(this._instance=new n),this._instance}}a("F6Navigation",n);export default n;
2
2
  //# sourceMappingURL=F6Navigation.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/F6Navigation.ts"],
4
- "sourcesContent": ["import { registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\nimport { getFirstFocusableElement } from \"../util/FocusableElements.js\";\nimport getFastNavigationGroups from \"../util/getFastNavigationGroups.js\";\nimport isElementClickable from \"../util/isElementClickable.js\";\n\nclass F6Navigation {\n\tstatic _instance: F6Navigation;\n\tkeydownHandler: (event: KeyboardEvent) => void;\n\tselectedGroup: HTMLElement | null = null;\n\tgroups: Array<HTMLElement> = [];\n\n\tconstructor() {\n\t\tthis.keydownHandler = this._keydownHandler.bind(this) as (event: KeyboardEvent) => void;\n\t\tthis.attachEventListeners();\n\t}\n\n\tattachEventListeners() {\n\t\tdocument.addEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tconst nextElementDomRef = instanceOfUI5Element(nextElement) ? nextElement.getDomRef() : nextElement;\n\n\t\tif (nextElementDomRef) {\n\t\t\tif (isElementClickable(nextElementDomRef)) {\n\t\t\t\treturn nextElementDomRef;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElementDomRef);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\treturn elementToFocus;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync findNextFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > -1) {\n\t\t\t\tif (currentIndex + 1 >= this.groups.length) {\n\t\t\t\t\tcurrentIndex = 0;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tcurrentIndex += 1;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentIndex = 0;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync findPreviousFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\t// Handle the situation where the first focusable element of two neighbor groups is the same\n\t\t\t\t// For example:\n\t\t\t\t// <ui5-flexible-column-layout>\n\t\t\t\t// <ui5-list>\n\t\t\t\t// <ui5-li>List Item</ui5-li>\n\t\t\t\t// </ui5-list>\n\t\t\t\t// </ui5-flexible-column-layout>\n\t\t\t\t// Here for both FCL & List the firstFoccusableElement is the same (the ui5-li)\n\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - 1]);\n\t\t\t\tconst shouldSkipParent = firstFocusable === await this.groupElementToFocus(this.groups[currentIndex]);\n\n\t\t\t\tcurrentIndex = shouldSkipParent ? currentIndex - 2 : currentIndex - 1;\n\n\t\t\t\tif (currentIndex < 0) {\n\t\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\t}\n\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t} else {\n\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync _keydownHandler(event: KeyboardEvent) {\n\t\tconst forward = isF6Next(event);\n\t\tconst backward = isF6Previous(event);\n\t\tif (!(forward || backward)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateGroups();\n\n\t\tif (this.groups.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tlet elementToFocus;\n\n\t\tif (this.groups.length === 0) {\n\t\t\telementToFocus = await this.groupElementToFocus(this.groups[0]);\n\n\t\t\treturn elementToFocus?.focus();\n\t\t}\n\n\t\tlet currentIndex = -1;\n\n\t\tif (this.selectedGroup) {\n\t\t\tcurrentIndex = this.groups.indexOf(this.selectedGroup);\n\t\t}\n\n\t\tif (forward) {\n\t\t\telementToFocus = await this.findNextFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\tif (backward) {\n\t\t\telementToFocus = await this.findPreviousFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\telementToFocus?.focus();\n\t}\n\n\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tupdateGroups() {\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(document.body);\n\t}\n\n\tsetSelectedGroup(root: DocumentOrShadowRoot = window.document) {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element: Element | null | ParentNode = this.deepActive(root);\n\n\t\twhile (element && (element as Element).getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = element.parentElement ? element.parentNode : (element.parentNode as ShadowRoot).host;\n\t\t}\n\n\t\tthis.selectedGroup = element as HTMLElement;\n\t}\n\n\tdeepActive(root: DocumentOrShadowRoot): Element | null {\n\t\tif (root.activeElement && root.activeElement.shadowRoot) {\n\t\t\treturn this.deepActive(root.activeElement.shadowRoot);\n\t\t}\n\n\t\treturn root.activeElement;\n\t}\n\n\tdestroy() {\n\t\tthis.removeEventListeners();\n\t}\n\n\tstatic init() {\n\t\tif (!this._instance) {\n\t\t\tthis._instance = new F6Navigation();\n\t\t}\n\n\t\treturn this._instance;\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"],
5
- "mappings": "aAAA,OAAS,mBAAAA,MAAuB,yBAChC,OAAS,YAAAC,EAAU,gBAAAC,MAAoB,aACvC,OAAS,wBAAAC,MAA4B,mBACrC,OAAS,4BAAAC,MAAgC,+BACzC,OAAOC,MAA6B,qCACpC,OAAOC,MAAwB,gCAE/B,MAAMC,CAAa,CAMlB,aAAc,CAHd,mBAAoC,KACpC,YAA6B,CAAC,EAG7B,KAAK,eAAiB,KAAK,gBAAgB,KAAK,IAAI,EACpD,KAAK,qBAAqB,CAC3B,CAEA,sBAAuB,CACtB,SAAS,iBAAiB,UAAW,KAAK,cAAc,CACzD,CAEA,MA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AAWC,KAIjB,KAAK,aAAa,EAEd,KAAK,OAAO,OAAS,GACxB,OAGDF,EAAM,eAAe,EAErB,IAAIH,EAEJ,GAAI,KAAK,OAAO,SAAW,EAC1B,OAAAA,EAAiB,MAAM,KAAK,oBAAoB,KAAK,OAAO,CAAC,CAAC,EAEvDA,GAAgB,MAAM,EAG9B,IAAIC,EAAe,GAEf,KAAK,gBACRA,EAAe,KAAK,OAAO,QAAQ,KAAK,aAAa,GAGlDG,IACHJ,EAAiB,MAAM,KAAK,8BAA8BC,CAAY,GAGnEI,IACHL,EAAiB,MAAM,KAAK,kCAAkCC,CAAY,GAG3ED,GAAgB,MAAM,CACvB,CAEA,sBAAuB,CACtB,SAAS,oBAAoB,UAAW,KAAK,cAAc,CAC5D,CAEA,cAAe,CACd,KAAK,iBAAiB,EACtB,KAAK,OAASL,EAAwB,SAAS,IAAI,CACpD,CAEA,iBAAiBW,EAA6B,OAAO,SAAU,CAC9D,MAAMC,EAAc,OAAO,SAAS,cAAc,MAAM,EACxD,IAAIC,EAAuC,KAAK,WAAWF,CAAI,EAE/D,KAAOE,GAAYA,EAAoB,aAAa,0BAA0B,IAAM,QAAUA,IAAYD,GACzGC,EAAUA,EAAQ,cAAgBA,EAAQ,WAAcA,EAAQ,WAA0B,KAG3F,KAAK,cAAgBA,CACtB,CAEA,WAAWF,EAA4C,CACtD,OAAIA,EAAK,eAAiBA,EAAK,cAAc,WACrC,KAAK,WAAWA,EAAK,cAAc,UAAU,EAG9CA,EAAK,aACb,CAEA,SAAU,CACT,KAAK,qBAAqB,CAC3B,CAEA,OAAO,MAAO,CACb,OAAK,KAAK,YACT,KAAK,UAAY,IAAIT,GAGf,KAAK,SACb,CACD,CAEAP,EAAgB,eAAgBO,CAAY,EAE5C,eAAeA",
4
+ "sourcesContent": ["import { registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.js\";\nimport { instanceOfUI5Element } from \"../UI5Element.js\";\nimport { getFirstFocusableElement } from \"../util/FocusableElements.js\";\nimport getFastNavigationGroups from \"../util/getFastNavigationGroups.js\";\nimport isElementClickable from \"../util/isElementClickable.js\";\n\nclass F6Navigation {\n\tstatic _instance: F6Navigation;\n\tkeydownHandler: (event: KeyboardEvent) => void;\n\tselectedGroup: HTMLElement | null = null;\n\tgroups: Array<HTMLElement> = [];\n\n\tconstructor() {\n\t\tthis.keydownHandler = this._keydownHandler.bind(this) as (event: KeyboardEvent) => void;\n\t\tthis.attachEventListeners();\n\t}\n\n\tattachEventListeners() {\n\t\tdocument.addEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tconst nextElementDomRef = instanceOfUI5Element(nextElement) ? nextElement.getDomRef() : nextElement;\n\n\t\tif (nextElementDomRef) {\n\t\t\tif (isElementClickable(nextElementDomRef)) {\n\t\t\t\treturn nextElementDomRef;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElementDomRef);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\treturn elementToFocus;\n\t\t\t}\n\t\t}\n\t}\n\n\tasync findNextFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > -1) {\n\t\t\t\tif (currentIndex + 1 >= this.groups.length) {\n\t\t\t\t\tcurrentIndex = 0;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t} else {\n\t\t\t\t\tcurrentIndex += 1;\n\t\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcurrentIndex = 0;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync findPreviousFocusableGroupElement(currentIndex: number) {\n\t\tlet elementToFocus;\n\n\t\t/* eslint-disable no-await-in-loop */\n\t\tfor (let index = 0; index < this.groups.length; index++) {\n\t\t\tlet nextElement;\n\n\t\t\tif (currentIndex > 0) {\n\t\t\t\t// Handle the situation where the first focusable element of two neighbor groups is the same\n\t\t\t\t// For example:\n\t\t\t\t// <ui5-flexible-column-layout>\n\t\t\t\t// <ui5-list>\n\t\t\t\t// <ui5-li>List Item</ui5-li>\n\t\t\t\t// </ui5-list>\n\t\t\t\t// </ui5-flexible-column-layout>\n\t\t\t\t// Here for both FCL & List the firstFoccusableElement is the same (the ui5-li)\n\t\t\t\tconst firstFocusable = await this.groupElementToFocus(this.groups[currentIndex - 1]);\n\t\t\t\tconst shouldSkipParent = firstFocusable === await this.groupElementToFocus(this.groups[currentIndex]);\n\n\t\t\t\tcurrentIndex = shouldSkipParent ? currentIndex - 2 : currentIndex - 1;\n\n\t\t\t\tif (currentIndex < 0) {\n\t\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\t}\n\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t} else {\n\t\t\t\tcurrentIndex = this.groups.length - 1;\n\t\t\t\tnextElement = this.groups[currentIndex];\n\t\t\t}\n\n\t\t\telementToFocus = await this.groupElementToFocus(nextElement);\n\n\t\t\tif (elementToFocus) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* eslint-enable no-await-in-loop */\n\n\t\treturn elementToFocus;\n\t}\n\n\tasync _keydownHandler(event: KeyboardEvent) {\n\t\tconst forward = isF6Next(event);\n\t\tconst backward = isF6Previous(event);\n\t\tif (!(forward || backward)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.updateGroups();\n\n\t\tif (this.groups.length < 1) {\n\t\t\treturn;\n\t\t}\n\n\t\tevent.preventDefault();\n\n\t\tlet elementToFocus;\n\n\t\tif (this.groups.length === 0) {\n\t\t\telementToFocus = await this.groupElementToFocus(this.groups[0]);\n\n\t\t\treturn elementToFocus?.focus();\n\t\t}\n\n\t\tlet currentIndex = -1;\n\n\t\tif (this.selectedGroup) {\n\t\t\tcurrentIndex = this.groups.indexOf(this.selectedGroup);\n\t\t}\n\n\t\tif (forward) {\n\t\t\telementToFocus = await this.findNextFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\tif (backward) {\n\t\t\telementToFocus = await this.findPreviousFocusableGroupElement(currentIndex);\n\t\t}\n\n\t\telementToFocus?.focus();\n\t}\n\n\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tupdateGroups() {\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(document.body);\n\t}\n\n\tsetSelectedGroup(root: DocumentOrShadowRoot = window.document) {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element: Element | null | ParentNode = this.deepActive(root);\n\n\t\twhile (element && (element as Element).getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = element.parentElement ? element.parentNode : (element.parentNode as ShadowRoot).host;\n\t\t}\n\n\t\tthis.selectedGroup = element as HTMLElement;\n\t}\n\n\tdeepActive(root: DocumentOrShadowRoot): Element | null {\n\t\tif (root?.activeElement?.shadowRoot?.activeElement) {\n\t\t\treturn this.deepActive(root.activeElement.shadowRoot);\n\t\t}\n\n\t\treturn root.activeElement;\n\t}\n\n\tdestroy() {\n\t\tthis.removeEventListeners();\n\t}\n\n\tstatic init() {\n\t\tif (!this._instance) {\n\t\t\tthis._instance = new F6Navigation();\n\t\t}\n\n\t\treturn this._instance;\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"],
5
+ "mappings": "aAAA,OAAS,mBAAAA,MAAuB,yBAChC,OAAS,YAAAC,EAAU,gBAAAC,MAAoB,aACvC,OAAS,wBAAAC,MAA4B,mBACrC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,CAC3B,CAEA,OAAO,MAAO,CACb,OAAK,KAAK,YACT,KAAK,UAAY,IAAIT,GAGf,KAAK,SACb,CACD,CAEAP,EAAgB,eAAgBO,CAAY,EAE5C,eAAeA",
6
6
  "names": ["registerFeature", "isF6Next", "isF6Previous", "instanceOfUI5Element", "getFirstFocusableElement", "getFastNavigationGroups", "isElementClickable", "F6Navigation", "nextElement", "nextElementDomRef", "elementToFocus", "currentIndex", "index", "event", "forward", "backward", "root", "htmlElement", "element"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/OpenUI5Enablement.ts"],
4
- "sourcesContent": ["import { TemplateResult } from \"lit-html\";\nimport { registerFeature } from \"../FeaturesRegistry.js\";\nimport BusyIndicatorStyles from \"../generated/css/BusyIndicator.css.js\";\nimport merge from \"../thirdparty/merge.js\";\nimport {\n\tisTabPrevious,\n} from \"../Keys.js\";\n\nimport type UI5Element from \"../UI5Element.js\";\nimport type OpenUI5Element from \"./OpenUI5Element.js\";\n\nconst busyIndicatorMetadata = {\n\tproperties: {\n\t\t__isBusy: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n};\n\nclass OpenUI5Enablement {\n\tstatic wrapTemplateResultInBusyMarkup(html: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult, host: OpenUI5Element, templateResult: TemplateResult) {\n\t\tif (host.isOpenUI5Component && host.__isBusy) {\n\t\t\ttemplateResult = html`\n\t\t\t<div class=\"busy-indicator-wrapper\">\n\t\t\t\t<span tabindex=\"0\" busy-indicator-before-span @focusin=${host.__suppressFocusIn}></span>\n\t\t\t\t${templateResult}\n\t\t\t\t<div class=\"busy-indicator-overlay\"></div>\n\t\t\t\t<div busy-indicator\n\t\t\t\t\tclass=\"busy-indicator-busy-area\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\trole=\"progressbar\"\n\t\t\t\t\t@keydown=${host.__suppressFocusBack}\n\t\t\t\t\taria-valuemin=\"0\"\n\t\t\t\t\taria-valuemax=\"100\"\n\t\t\t\t\taria-valuetext=\"Busy\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"busy-indicator-circle circle-animation-0\"></div>\n\t\t\t\t\t\t<div class=\"busy-indicator-circle circle-animation-1\"></div>\n\t\t\t\t\t\t<div class=\"busy-indicator-circle circle-animation-2\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>`;\n\t\t}\n\n\t\treturn templateResult;\n\t}\n\n\tstatic enrichBusyIndicatorSettings(klass: typeof UI5Element) {\n\t\tOpenUI5Enablement.enrichBusyIndicatorMetadata(klass);\n\t\tOpenUI5Enablement.enrichBusyIndicatorMethods(klass.prototype);\n\t}\n\n\tstatic enrichBusyIndicatorMetadata(klass: typeof UI5Element) {\n\t\tklass.metadata = merge(klass.metadata, busyIndicatorMetadata);\n\t}\n\n\tstatic enrichBusyIndicatorMethods(UI5ElementPrototype: typeof OpenUI5Element.prototype) {\n\t\tObject.defineProperties(UI5ElementPrototype, {\n\t\t\t\"__redirectFocus\": { value: true, writable: true },\n\t\t\t\"__suppressFocusBack\": {\n\t\t\t\tget() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\thandleEvent: (e: KeyboardEvent) => {\n\t\t\t\t\t\t\tif (isTabPrevious(e)) {\n\t\t\t\t\t\t\t\tconst beforeElem = this.shadowRoot.querySelector(\"[busy-indicator-before-span]\");\n\t\t\t\t\t\t\t\tthis.__redirectFocus = false;\n\t\t\t\t\t\t\t\tbeforeElem.focus();\n\t\t\t\t\t\t\t\tthis.__redirectFocus = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcapture: true,\n\t\t\t\t\t\tpassive: false,\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"isOpenUI5Component\": { get: () => { return true; } },\n\t\t});\n\n\t\tUI5ElementPrototype.__suppressFocusIn = function handleFocusIn() {\n\t\t\tconst busyIndicator = this.shadowRoot?.querySelector(\"[busy-indicator]\") as HTMLElement;\n\t\t\tif (busyIndicator && this.__redirectFocus) {\n\t\t\t\tbusyIndicator.focus();\n\t\t\t}\n\t\t};\n\n\t\tUI5ElementPrototype.getDomRef = function getDomRef() {\n\t\t\t// If a component set _getRealDomRef to its children, use the return value of this function\n\t\t\tif (typeof this._getRealDomRef === \"function\") {\n\t\t\t\treturn this._getRealDomRef();\n\t\t\t}\n\n\t\t\tif (!this.shadowRoot || this.shadowRoot.children.length === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst children = [...this.shadowRoot.children].filter(child => ![\"link\", \"style\"].includes(child.localName));\n\n\t\t\tif (children.length !== 1) {\n\t\t\t\tconsole.warn(`The shadow DOM for ${(this.constructor as typeof UI5Element).getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`); // eslint-disable-line\n\t\t\t}\n\n\t\t\tif (this.__isBusy) {\n\t\t\t\treturn children[0].querySelector(\".busy-indicator-wrapper > :not([busy-indicator-before-span]):not(.busy-indicator-overlay):not(.busy-indicator-busy-area)\") as HTMLElement;\n\t\t\t}\n\n\t\t\treturn children[0] as HTMLElement;\n\t\t};\n\t}\n\n\tstatic getBusyIndicatorStyles() {\n\t\treturn BusyIndicatorStyles;\n\t}\n}\n\nregisterFeature(\"OpenUI5Enablement\", OpenUI5Enablement);\n\nexport default OpenUI5Enablement;\n"],
4
+ "sourcesContent": ["import type { TemplateResult } from \"lit-html\";\nimport { registerFeature } from \"../FeaturesRegistry.js\";\nimport BusyIndicatorStyles from \"../generated/css/BusyIndicator.css.js\";\nimport merge from \"../thirdparty/merge.js\";\nimport {\n\tisTabPrevious,\n} from \"../Keys.js\";\n\nimport type UI5Element from \"../UI5Element.js\";\nimport type OpenUI5Element from \"./OpenUI5Element.js\";\n\nconst busyIndicatorMetadata = {\n\tproperties: {\n\t\t__isBusy: {\n\t\t\ttype: Boolean,\n\t\t},\n\t},\n};\n\nclass OpenUI5Enablement {\n\tstatic wrapTemplateResultInBusyMarkup(html: (strings: TemplateStringsArray, ...values: Array<unknown>) => TemplateResult, host: OpenUI5Element, templateResult: TemplateResult) {\n\t\tif (host.isOpenUI5Component && host.__isBusy) {\n\t\t\ttemplateResult = html`\n\t\t\t<div class=\"busy-indicator-wrapper\">\n\t\t\t\t<span tabindex=\"0\" busy-indicator-before-span @focusin=${host.__suppressFocusIn}></span>\n\t\t\t\t${templateResult}\n\t\t\t\t<div class=\"busy-indicator-overlay\"></div>\n\t\t\t\t<div busy-indicator\n\t\t\t\t\tclass=\"busy-indicator-busy-area\"\n\t\t\t\t\ttabindex=\"0\"\n\t\t\t\t\trole=\"progressbar\"\n\t\t\t\t\t@keydown=${host.__suppressFocusBack}\n\t\t\t\t\taria-valuemin=\"0\"\n\t\t\t\t\taria-valuemax=\"100\"\n\t\t\t\t\taria-valuetext=\"Busy\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div class=\"busy-indicator-circle circle-animation-0\"></div>\n\t\t\t\t\t\t<div class=\"busy-indicator-circle circle-animation-1\"></div>\n\t\t\t\t\t\t<div class=\"busy-indicator-circle circle-animation-2\"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>`;\n\t\t}\n\n\t\treturn templateResult;\n\t}\n\n\tstatic enrichBusyIndicatorSettings(klass: typeof UI5Element) {\n\t\tOpenUI5Enablement.enrichBusyIndicatorMetadata(klass);\n\t\tOpenUI5Enablement.enrichBusyIndicatorMethods(klass.prototype);\n\t}\n\n\tstatic enrichBusyIndicatorMetadata(klass: typeof UI5Element) {\n\t\tklass.metadata = merge(klass.metadata, busyIndicatorMetadata);\n\t}\n\n\tstatic enrichBusyIndicatorMethods(UI5ElementPrototype: typeof OpenUI5Element.prototype) {\n\t\tObject.defineProperties(UI5ElementPrototype, {\n\t\t\t\"__redirectFocus\": { value: true, writable: true },\n\t\t\t\"__suppressFocusBack\": {\n\t\t\t\tget() {\n\t\t\t\t\treturn {\n\t\t\t\t\t\thandleEvent: (e: KeyboardEvent) => {\n\t\t\t\t\t\t\tif (isTabPrevious(e)) {\n\t\t\t\t\t\t\t\tconst beforeElem = this.shadowRoot.querySelector(\"[busy-indicator-before-span]\");\n\t\t\t\t\t\t\t\tthis.__redirectFocus = false;\n\t\t\t\t\t\t\t\tbeforeElem.focus();\n\t\t\t\t\t\t\t\tthis.__redirectFocus = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\tcapture: true,\n\t\t\t\t\t\tpassive: false,\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t},\n\t\t\t\"isOpenUI5Component\": { get: () => { return true; } },\n\t\t});\n\n\t\tUI5ElementPrototype.__suppressFocusIn = function handleFocusIn() {\n\t\t\tconst busyIndicator = this.shadowRoot?.querySelector(\"[busy-indicator]\") as HTMLElement;\n\t\t\tif (busyIndicator && this.__redirectFocus) {\n\t\t\t\tbusyIndicator.focus();\n\t\t\t}\n\t\t};\n\n\t\tUI5ElementPrototype.getDomRef = function getDomRef() {\n\t\t\t// If a component set _getRealDomRef to its children, use the return value of this function\n\t\t\tif (typeof this._getRealDomRef === \"function\") {\n\t\t\t\treturn this._getRealDomRef();\n\t\t\t}\n\n\t\t\tif (!this.shadowRoot || this.shadowRoot.children.length === 0) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst children = [...this.shadowRoot.children].filter(child => ![\"link\", \"style\"].includes(child.localName));\n\n\t\t\tif (children.length !== 1) {\n\t\t\t\tconsole.warn(`The shadow DOM for ${(this.constructor as typeof UI5Element).getMetadata().getTag()} does not have a top level element, the getDomRef() method might not work as expected`); // eslint-disable-line\n\t\t\t}\n\n\t\t\tif (this.__isBusy) {\n\t\t\t\treturn children[0].querySelector(\".busy-indicator-wrapper > :not([busy-indicator-before-span]):not(.busy-indicator-overlay):not(.busy-indicator-busy-area)\") as HTMLElement;\n\t\t\t}\n\n\t\t\treturn children[0] as HTMLElement;\n\t\t};\n\t}\n\n\tstatic getBusyIndicatorStyles() {\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YAAY,cAAc,kBAAkB,EACnEA,GAAiB,KAAK,iBACzBA,EAAc,MAAM,CAEtB,EAEAH,EAAoB,UAAY,UAAqB,CAEpD,GAAI,OAAO,KAAK,gBAAmB,WAClC,OAAO,KAAK,eAAe,EAG5B,GAAI,CAAC,KAAK,YAAc,KAAK,WAAW,SAAS,SAAW,EAC3D,OAGD,MAAMI,EAAW,CAAC,GAAG,KAAK,WAAW,QAAQ,EAAE,OAAOC,GAAS,CAAC,CAAC,OAAQ,OAAO,EAAE,SAASA,EAAM,SAAS,CAAC,EAM3G,OAJID,EAAS,SAAW,GACvB,QAAQ,KAAK,sBAAuB,KAAK,YAAkC,YAAY,EAAE,OAAO,CAAC,uFAAuF,EAGrL,KAAK,SACDA,EAAS,CAAC,EAAE,cAAc,0HAA0H,EAGrJA,EAAS,CAAC,CAClB,CACD,CAEA,OAAO,wBAAyB,CAC/B,OAAOb,CACR,CACD,CAEAD,EAAgB,oBAAqBK,CAAiB,EAEtD,eAAeA",
6
6
  "names": ["registerFeature", "BusyIndicatorStyles", "merge", "isTabPrevious", "busyIndicatorMetadata", "OpenUI5Enablement", "html", "host", "templateResult", "klass", "UI5ElementPrototype", "e", "beforeElem", "busyIndicator", "children", "child"]
7
7
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/OpenUI5Support.ts"],
4
- "sourcesContent": ["import patchPatcher from \"./patchPatcher.js\";\nimport type { OpenUI5Patcher } from \"./patchPatcher.js\";\nimport patchPopup from \"./patchPopup.js\";\nimport type { OpenUI5Popup } from \"./patchPopup.js\";\nimport { registerFeature } from \"../FeaturesRegistry.js\";\nimport { setTheme } from \"../config/Theme.js\";\nimport { CLDRData } from \"../asset-registries/LocaleData.js\";\nimport type { LegacyDateCalendarCustomizing } from \"../features/LegacyDateFormats.js\";\n\ntype OpenUI5Core = {\n\tattachInit: (callback: () => void) => void,\n\tready: () => Promise<void>,\n\tattachThemeChanged: (callback: () => void) => void,\n\tgetConfiguration: () => OpenUI5CoreConfiguration,\n};\n\ntype OpenUI5CoreConfiguration = {\n\tgetAnimationMode: () => string,\n\tgetLanguage: () => string,\n\tgetTheme: () => string,\n\tgetThemeRoot: () => string,\n\tgetRTL: () => string,\n\tgetTimezone: () => string,\n\tgetCalendarType: () => string,\n\tgetLocale: () => string,\n\tgetFormatSettings: () => {\n\t\tgetLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing;\n\t}\n};\n\ntype ControlBehavior = {\n\tgetAnimationMode: () => string,\n}\n\ntype Localization = {\n\tgetLanguage: () => string,\n\tgetLanguageTag: () => string,\n\tgetRTL: () => string,\n\tgetTimezone: () => string,\n}\n\ntype LocaleData = {\n\tgetInstance: (locale: string) => Locale,\n}\n\ntype Theming = {\n\tgetThemeRoot: () => string,\n\tgetTheme: () => string,\n\tattachApplied: (callback: () => void) => void,\n}\n\ntype Formatting = {\n\tgetCalendarType: () => string,\n\tgetLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing,\n\tgetCustomIslamicCalendarData?: () => LegacyDateCalendarCustomizing,\n}\n\ntype CalendarUtils = {\n\tgetWeekConfigurationValues: () => {\n\t\tfirstDayOfWeek: number | undefined,\n\t},\n}\n\ntype Locale = {\n\tgetFirstDayOfWeek: () => number,\n\t_get: () => CLDRData,\n};\n\nclass OpenUI5Support {\n\tstatic isAtLeastVersion116() {\n\t\tconst version = window.sap.ui!.version as string;\n\t\tconst parts = version.split(\".\");\n\t\tif (!parts || parts.length < 2) {\n\t\t\treturn false;\n\t\t}\n\t\treturn parseInt(parts[0]) > 1 || parseInt(parts[1]) >= 116;\n\t}\n\n\tstatic isOpenUI5Detected() {\n\t\treturn typeof window.sap?.ui?.require === \"function\";\n\t}\n\n\tstatic init() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\treturn new Promise<void>(resolve => {\n\t\t\twindow.sap.ui.require([\"sap/ui/core/Core\"], async (Core: OpenUI5Core) => {\n\t\t\t\tconst callback = () => {\n\t\t\t\t\tlet deps: Array<string> = [\"sap/ui/core/Popup\", \"sap/ui/core/Patcher\", \"sap/ui/core/LocaleData\"];\n\t\t\t\t\tif (OpenUI5Support.isAtLeastVersion116()) { // for versions since 1.116.0 and onward, use the modular core\n\t\t\t\t\t\tdeps = [\n\t\t\t\t\t\t\t...deps,\n\t\t\t\t\t\t\t\"sap/base/i18n/Formatting\",\n\t\t\t\t\t\t\t\"sap/base/i18n/Localization\",\n\t\t\t\t\t\t\t\"sap/ui/core/ControlBehavior\",\n\t\t\t\t\t\t\t\"sap/ui/core/Theming\",\n\t\t\t\t\t\t\t\"sap/ui/core/date/CalendarUtils\",\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t\twindow.sap.ui.require(deps, (Popup: OpenUI5Popup, Patcher: OpenUI5Patcher) => {\n\t\t\t\t\t\tpatchPatcher(Patcher);\n\t\t\t\t\t\tpatchPopup(Popup);\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\t\t\tawait Core.ready();\n\t\t\t\t\tcallback();\n\t\t\t\t} else {\n\t\t\t\t\tCore.attachInit(callback);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tstatic getConfigurationSettingsObject() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn {};\n\t\t}\n\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst ControlBehavior = window.sap.ui.require(\"sap/ui/core/ControlBehavior\") as ControlBehavior;\n\t\t\tconst Localization = window.sap.ui.require(\"sap/base/i18n/Localization\") as Localization;\n\t\t\tconst Theming = window.sap.ui.require(\"sap/ui/core/Theming\") as Theming;\n\t\t\tconst Formatting = window.sap.ui.require(\"sap/base/i18n/Formatting\") as Formatting;\n\t\t\tconst CalendarUtils = window.sap.ui.require(\"sap/ui/core/date/CalendarUtils\") as CalendarUtils;\n\n\t\t\treturn {\n\t\t\t\tanimationMode: ControlBehavior.getAnimationMode(),\n\t\t\t\tlanguage: Localization.getLanguage(),\n\t\t\t\ttheme: Theming.getTheme(),\n\t\t\t\tthemeRoot: Theming.getThemeRoot(),\n\t\t\t\trtl: Localization.getRTL(),\n\t\t\t\ttimezone: Localization.getTimezone(),\n\t\t\t\tcalendarType: Formatting.getCalendarType(),\n\t\t\t\tformatSettings: {\n\t\t\t\t\tfirstDayOfWeek: CalendarUtils.getWeekConfigurationValues().firstDayOfWeek,\n\t\t\t\t\tlegacyDateCalendarCustomizing: Formatting.getCustomIslamicCalendarData?.()\n\t\t\t\t\t\t\t\t\t\t\t\t?? Formatting.getLegacyDateCalendarCustomizing?.(),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\tconst config = Core.getConfiguration();\n\t\tconst LocaleData = window.sap.ui.require(\"sap/ui/core/LocaleData\") as LocaleData;\n\n\t\treturn {\n\t\t\tanimationMode: config.getAnimationMode(),\n\t\t\tlanguage: config.getLanguage(),\n\t\t\ttheme: config.getTheme(),\n\t\t\tthemeRoot: config.getThemeRoot(),\n\t\t\trtl: config.getRTL(),\n\t\t\ttimezone: config.getTimezone(),\n\t\t\tcalendarType: config.getCalendarType(),\n\t\t\tformatSettings: {\n\t\t\t\tfirstDayOfWeek: LocaleData ? LocaleData.getInstance(config.getLocale()).getFirstDayOfWeek() : undefined,\n\t\t\t\tlegacyDateCalendarCustomizing: config.getFormatSettings().getLegacyDateCalendarCustomizing(),\n\t\t\t},\n\t\t};\n\t}\n\n\tstatic getLocaleDataObject() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst LocaleData = window.sap.ui.require(\"sap/ui/core/LocaleData\") as LocaleData;\n\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst Localization = window.sap.ui.require(\"sap/base/i18n/Localization\") as Localization;\n\t\t\treturn LocaleData.getInstance(Localization.getLanguageTag())._get();\n\t\t}\n\n\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\tconst config = Core.getConfiguration();\n\t\treturn LocaleData.getInstance(config.getLocale())._get();\n\t}\n\n\tstatic _listenForThemeChange() {\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst Theming: Theming = window.sap.ui.require(\"sap/ui/core/Theming\");\n\t\t\tTheming.attachApplied(() => {\n\t\t\t\tsetTheme(Theming.getTheme());\n\t\t\t});\n\t\t} else {\n\t\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\t\tconst config = Core.getConfiguration();\n\t\t\tCore.attachThemeChanged(() => {\n\t\t\t\tsetTheme(config.getTheme());\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic attachListeners() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tOpenUI5Support._listenForThemeChange();\n\t}\n\n\tstatic cssVariablesLoaded() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst link = [...document.head.children].find(el => el.id === \"sap-ui-theme-sap.ui.core\") as HTMLLinkElement; // more reliable than querySelector early\n\t\tif (!link) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !!link.href.match(/\\/css(-|_)variables\\.css/);\n\t}\n}\n\nregisterFeature(\"OpenUI5Support\", OpenUI5Support);\n\nexport default OpenUI5Support;\n"],
4
+ "sourcesContent": ["import patchPatcher from \"./patchPatcher.js\";\nimport type { OpenUI5Patcher } from \"./patchPatcher.js\";\nimport patchPopup from \"./patchPopup.js\";\nimport type { OpenUI5Popup } from \"./patchPopup.js\";\nimport { registerFeature } from \"../FeaturesRegistry.js\";\nimport { setTheme } from \"../config/Theme.js\";\nimport type { CLDRData } from \"../asset-registries/LocaleData.js\";\nimport type { LegacyDateCalendarCustomizing } from \"../features/LegacyDateFormats.js\";\n\ntype OpenUI5Core = {\n\tattachInit: (callback: () => void) => void,\n\tready: () => Promise<void>,\n\tattachThemeChanged: (callback: () => void) => void,\n\tgetConfiguration: () => OpenUI5CoreConfiguration,\n};\n\ntype OpenUI5CoreConfiguration = {\n\tgetAnimationMode: () => string,\n\tgetLanguage: () => string,\n\tgetTheme: () => string,\n\tgetThemeRoot: () => string,\n\tgetRTL: () => string,\n\tgetTimezone: () => string,\n\tgetCalendarType: () => string,\n\tgetLocale: () => string,\n\tgetFormatSettings: () => {\n\t\tgetLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing;\n\t}\n};\n\ntype ControlBehavior = {\n\tgetAnimationMode: () => string,\n}\n\ntype Localization = {\n\tgetLanguage: () => string,\n\tgetLanguageTag: () => string,\n\tgetRTL: () => string,\n\tgetTimezone: () => string,\n}\n\ntype LocaleData = {\n\tgetInstance: (locale: string) => Locale,\n}\n\ntype Theming = {\n\tgetThemeRoot: () => string,\n\tgetTheme: () => string,\n\tattachApplied: (callback: () => void) => void,\n}\n\ntype Formatting = {\n\tgetCalendarType: () => string,\n\tgetLegacyDateCalendarCustomizing: () => LegacyDateCalendarCustomizing,\n\tgetCustomIslamicCalendarData?: () => LegacyDateCalendarCustomizing,\n}\n\ntype CalendarUtils = {\n\tgetWeekConfigurationValues: () => {\n\t\tfirstDayOfWeek: number | undefined,\n\t},\n}\n\ntype Locale = {\n\tgetFirstDayOfWeek: () => number,\n\t_get: () => CLDRData,\n};\n\nclass OpenUI5Support {\n\tstatic isAtLeastVersion116() {\n\t\tconst version = window.sap.ui!.version as string;\n\t\tconst parts = version.split(\".\");\n\t\tif (!parts || parts.length < 2) {\n\t\t\treturn false;\n\t\t}\n\t\treturn parseInt(parts[0]) > 1 || parseInt(parts[1]) >= 116;\n\t}\n\n\tstatic isOpenUI5Detected() {\n\t\treturn typeof window.sap?.ui?.require === \"function\";\n\t}\n\n\tstatic init() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\treturn new Promise<void>(resolve => {\n\t\t\twindow.sap.ui.require([\"sap/ui/core/Core\"], async (Core: OpenUI5Core) => {\n\t\t\t\tconst callback = () => {\n\t\t\t\t\tlet deps: Array<string> = [\"sap/ui/core/Popup\", \"sap/ui/core/Patcher\", \"sap/ui/core/LocaleData\"];\n\t\t\t\t\tif (OpenUI5Support.isAtLeastVersion116()) { // for versions since 1.116.0 and onward, use the modular core\n\t\t\t\t\t\tdeps = [\n\t\t\t\t\t\t\t...deps,\n\t\t\t\t\t\t\t\"sap/base/i18n/Formatting\",\n\t\t\t\t\t\t\t\"sap/base/i18n/Localization\",\n\t\t\t\t\t\t\t\"sap/ui/core/ControlBehavior\",\n\t\t\t\t\t\t\t\"sap/ui/core/Theming\",\n\t\t\t\t\t\t\t\"sap/ui/core/date/CalendarUtils\",\n\t\t\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t\twindow.sap.ui.require(deps, (Popup: OpenUI5Popup, Patcher: OpenUI5Patcher) => {\n\t\t\t\t\t\tpatchPatcher(Patcher);\n\t\t\t\t\t\tpatchPopup(Popup);\n\t\t\t\t\t\tresolve();\n\t\t\t\t\t});\n\t\t\t\t};\n\t\t\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\t\t\tawait Core.ready();\n\t\t\t\t\tcallback();\n\t\t\t\t} else {\n\t\t\t\t\tCore.attachInit(callback);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tstatic getConfigurationSettingsObject() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn {};\n\t\t}\n\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst ControlBehavior = window.sap.ui.require(\"sap/ui/core/ControlBehavior\") as ControlBehavior;\n\t\t\tconst Localization = window.sap.ui.require(\"sap/base/i18n/Localization\") as Localization;\n\t\t\tconst Theming = window.sap.ui.require(\"sap/ui/core/Theming\") as Theming;\n\t\t\tconst Formatting = window.sap.ui.require(\"sap/base/i18n/Formatting\") as Formatting;\n\t\t\tconst CalendarUtils = window.sap.ui.require(\"sap/ui/core/date/CalendarUtils\") as CalendarUtils;\n\n\t\t\treturn {\n\t\t\t\tanimationMode: ControlBehavior.getAnimationMode(),\n\t\t\t\tlanguage: Localization.getLanguage(),\n\t\t\t\ttheme: Theming.getTheme(),\n\t\t\t\tthemeRoot: Theming.getThemeRoot(),\n\t\t\t\trtl: Localization.getRTL(),\n\t\t\t\ttimezone: Localization.getTimezone(),\n\t\t\t\tcalendarType: Formatting.getCalendarType(),\n\t\t\t\tformatSettings: {\n\t\t\t\t\tfirstDayOfWeek: CalendarUtils.getWeekConfigurationValues().firstDayOfWeek,\n\t\t\t\t\tlegacyDateCalendarCustomizing: Formatting.getCustomIslamicCalendarData?.()\n\t\t\t\t\t\t\t\t\t\t\t\t?? Formatting.getLegacyDateCalendarCustomizing?.(),\n\t\t\t\t},\n\t\t\t};\n\t\t}\n\n\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\tconst config = Core.getConfiguration();\n\t\tconst LocaleData = window.sap.ui.require(\"sap/ui/core/LocaleData\") as LocaleData;\n\n\t\treturn {\n\t\t\tanimationMode: config.getAnimationMode(),\n\t\t\tlanguage: config.getLanguage(),\n\t\t\ttheme: config.getTheme(),\n\t\t\tthemeRoot: config.getThemeRoot(),\n\t\t\trtl: config.getRTL(),\n\t\t\ttimezone: config.getTimezone(),\n\t\t\tcalendarType: config.getCalendarType(),\n\t\t\tformatSettings: {\n\t\t\t\tfirstDayOfWeek: LocaleData ? LocaleData.getInstance(config.getLocale()).getFirstDayOfWeek() : undefined,\n\t\t\t\tlegacyDateCalendarCustomizing: config.getFormatSettings().getLegacyDateCalendarCustomizing(),\n\t\t\t},\n\t\t};\n\t}\n\n\tstatic getLocaleDataObject() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst LocaleData = window.sap.ui.require(\"sap/ui/core/LocaleData\") as LocaleData;\n\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst Localization = window.sap.ui.require(\"sap/base/i18n/Localization\") as Localization;\n\t\t\treturn LocaleData.getInstance(Localization.getLanguageTag())._get();\n\t\t}\n\n\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\tconst config = Core.getConfiguration();\n\t\treturn LocaleData.getInstance(config.getLocale())._get();\n\t}\n\n\tstatic _listenForThemeChange() {\n\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\tconst Theming: Theming = window.sap.ui.require(\"sap/ui/core/Theming\");\n\t\t\tTheming.attachApplied(() => {\n\t\t\t\tsetTheme(Theming.getTheme());\n\t\t\t});\n\t\t} else {\n\t\t\tconst Core = window.sap.ui.require(\"sap/ui/core/Core\") as OpenUI5Core;\n\t\t\tconst config = Core.getConfiguration();\n\t\t\tCore.attachThemeChanged(() => {\n\t\t\t\tsetTheme(config.getTheme());\n\t\t\t});\n\t\t}\n\t}\n\n\tstatic attachListeners() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tOpenUI5Support._listenForThemeChange();\n\t}\n\n\tstatic cssVariablesLoaded() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst link = [...document.head.children].find(el => el.id === \"sap-ui-theme-sap.ui.core\") as HTMLLinkElement; // more reliable than querySelector early\n\t\tif (!link) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn !!link.href.match(/\\/css(-|_)variables\\.css/);\n\t}\n}\n\nregisterFeature(\"OpenUI5Support\", OpenUI5Support);\n\nexport default OpenUI5Support;\n"],
5
5
  "mappings": "aAAA,OAAOA,MAAkB,oBAEzB,OAAOC,MAAgB,kBAEvB,OAAS,mBAAAC,MAAuB,yB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U,EAAmB,OAAO,IAAI,GAAG,QAAQ,qBAAqB,EACpEA,EAAQ,cAAc,IAAM,CAC3BX,EAASW,EAAQ,SAAS,CAAC,CAC5B,CAAC,CACF,KAAO,CACN,MAAMP,EAAO,OAAO,IAAI,GAAG,QAAQ,kBAAkB,EAC/CU,EAASV,EAAK,iBAAiB,EACrCA,EAAK,mBAAmB,IAAM,CAC7BJ,EAASc,EAAO,SAAS,CAAC,CAC3B,CAAC,CACF,CACD,CAEA,OAAO,iBAAkB,CACnBb,EAAe,kBAAkB,GAItCA,EAAe,sBAAsB,CACtC,CAEA,OAAO,oBAAqB,CAC3B,GAAI,CAACA,EAAe,kBAAkB,EACrC,OAGD,MAAMe,EAAO,CAAC,GAAG,SAAS,KAAK,QAAQ,EAAE,KAAKC,GAAMA,EAAG,KAAO,0BAA0B,EACxF,OAAKD,EAIE,CAAC,CAACA,EAAK,KAAK,MAAM,0BAA0B,EAH3C,EAIT,CACD,CAEAjB,EAAgB,iBAAkBE,CAAc,EAEhD,eAAeA",
6
6
  "names": ["patchPatcher", "patchPopup", "registerFeature", "setTheme", "OpenUI5Support", "parts", "resolve", "Core", "callback", "deps", "Popup", "Patcher", "ControlBehavior", "Localization", "Theming", "Formatting", "CalendarUtils", "config", "LocaleData", "link", "el"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const i=e=>{e.setAttribute("popover","manual"),e.showPopover()},r=e=>{e.hasAttribute("popover")&&(e.hidePopover(),e.removeAttribute("popover"))},a=e=>{const t=e.prototype.open;e.prototype.open=function(...o){t.apply(this,o);const p=!!document.body.querySelector(":popover-open");if(["OPENING","OPEN"].includes(this.getOpenState())&&p){const s=this.getContent();if(s){const c=s.getDomRef();c&&i(c)}}}},y=e=>{const t=e.prototype._closed;e.prototype._closed=function(...o){const n=this.getContent().getDomRef();t.apply(this,o),n&&r(n)}},d=()=>{const e=new CSSStyleSheet;e.replaceSync(".sapMPopup-CTX:popover-open { inset: unset; }"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]},u=e=>{a(e),y(e),d()};export default u;
1
+ "use strict";const r=e=>{e.setAttribute("popover","manual"),e.showPopover()},a=e=>{e.hasAttribute("popover")&&(e.hidePopover(),e.removeAttribute("popover"))},l=e=>{const o=e.prototype.open;e.prototype.open=function(...t){o.apply(this,t);const p=!!document.body.querySelector(":popover-open");if(["OPENING","OPEN"].includes(this.getOpenState())&&p){const c=this.getContent();if(c){const i=c.getDomRef();i&&r(i)}}}},u=e=>{const o=e.prototype._closed;e.prototype._closed=function(...t){const n=this.getContent().getDomRef();o.apply(this,t),n&&a(n)}},y=e=>{const o=e.prototype.onFocusEvent;e.prototype.onFocusEvent=function(t){const p=t.type==="focus"||t.type==="activate",n=t.target;(!p||!n.closest("[ui5-popover],[ui5-responsive-popover],[ui5-dialog]"))&&o.call(this,t)}},v=()=>{const e=new CSSStyleSheet;e.replaceSync(".sapMPopup-CTX:popover-open { inset: unset; }"),document.adoptedStyleSheets=[...document.adoptedStyleSheets,e]},d=e=>{l(e),u(e),v(),y(e)};export default d;
2
2
  //# sourceMappingURL=patchPopup.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/features/patchPopup.ts"],
4
- "sourcesContent": ["// OpenUI5's Element.js subset\ntype Element = {\n\tgetDomRef: () => HTMLElement | null,\n}\n\n// The lifecycle of Popup.js is open -> _opened -> close -> _closed, we're interested in the first (open) and last (_closed)\ntype OpenUI5Popup = {\n\tprototype: {\n\t\topen: (...args: any[]) => void,\n\t\t_closed: (...args: any[]) => void,\n\t\tgetOpenState: () => \"CLOSED\" | \"CLOSING\" | \"OPEN\" | \"OPENING\",\n\t\tgetContent: () => Element, // this is the OpenUI5 Element/Control instance that opens the Popup (usually sap.m.Popover/sap.m.Dialog)\n\t}\n};\n\nconst openNativePopover = (domRef: HTMLElement) => {\n\tdomRef.setAttribute(\"popover\", \"manual\");\n\tdomRef.showPopover();\n};\n\nconst closeNativePopover = (domRef: HTMLElement) => {\n\tif (domRef.hasAttribute(\"popover\")) {\n\t\tdomRef.hidePopover();\n\t\tdomRef.removeAttribute(\"popover\");\n\t}\n};\n\nconst patchOpen = (Popup: OpenUI5Popup) => {\n\tconst origOpen = Popup.prototype.open;\n\tPopup.prototype.open = function open(...args: any[]) {\n\t\torigOpen.apply(this, args); // call open first to initiate opening\n\t\tconst topLayerAlreadyInUse = !!document.body.querySelector(\":popover-open\"); // check if there is already something in the top layer\n\t\tconst openingInitiated = [\"OPENING\", \"OPEN\"].includes(this.getOpenState());\n\t\tif (openingInitiated && topLayerAlreadyInUse) {\n\t\t\tconst element = this.getContent();\n\t\t\tif (element) {\n\t\t\t\tconst domRef = element.getDomRef();\n\t\t\t\tif (domRef) {\n\t\t\t\t\topenNativePopover(domRef);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n};\n\nconst patchClosed = (Popup: OpenUI5Popup) => {\n\tconst _origClosed = Popup.prototype._closed;\n\tPopup.prototype._closed = function _closed(...args: any[]) {\n\t\tconst element = this.getContent();\n\t\tconst domRef = element.getDomRef();\n\t\t_origClosed.apply(this, args); // only then call _close\n\t\tif (domRef) {\n\t\t\tcloseNativePopover(domRef); // unset the popover attribute and close the native popover, but only if still in DOM\n\t\t}\n\t};\n};\n\nconst createGlobalStyles = () => {\n\tconst stylesheet = new CSSStyleSheet();\n\tstylesheet.replaceSync(`.sapMPopup-CTX:popover-open { inset: unset; }`);\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n};\n\nconst patchPopup = (Popup: OpenUI5Popup) => {\n\tpatchOpen(Popup); // Popup.prototype.open\n\tpatchClosed(Popup); // Popup.prototype._closed\n\tcreateGlobalStyles(); // Ensures correct popover positioning by OpenUI5 (otherwise 0,0 is the center of the screen)\n};\n\nexport default patchPopup;\nexport type { OpenUI5Popup };\n"],
5
- "mappings": "aAeA,MAAMA,EAAqBC,GAAwB,CAClDA,EAAO,aAAa,UAAW,QAAQ,EACvCA,EAAO,YAAY,CACpB,EAEMC,EAAsBD,GAAwB,CAC/CA,EAAO,aAAa,SAAS,IAChCA,EAAO,YAAY,EACnBA,EAAO,gBAAgB,SAAS,EAElC,EAEME,EAAaC,GAAwB,CAC1C,MAAMC,EAAWD,EAAM,UAAU,KACjCA,EAAM,UAAU,KAAO,YAAiBE,EAAa,CACpDD,EAAS,MAAM,KAAMC,CAAI,EACzB,MAAMC,EAAuB,CAAC,CAAC,SAAS,KAAK,cAAc,eAAe,EAE1E,GADyB,CAAC,UAAW,MAAM,EAAE,SAAS,KAAK,aAAa,CAAC,GACjDA,EAAsB,CAC7C,MAAMC,EAAU,KAAK,WAAW,EAChC,GAAIA,EAAS,CACZ,MAAMP,EAASO,EAAQ,UAAU,EAC7BP,GACHD,EAAkBC,CAAM,CAE1B,CACD,CACD,CACD,EAEMQ,EAAeL,GAAwB,CAC5C,MAAMM,EAAcN,EAAM,UAAU,QACpCA,EAAM,UAAU,QAAU,YAAoBE,EAAa,CAE1D,MAAML,EADU,KAAK,WAAW,EACT,UAAU,EACjCS,EAAY,MAAM,KAAMJ,CAAI,EACxBL,GACHC,EAAmBD,CAAM,CAE3B,CACD,EAEMU,EAAqB,IAAM,CAChC,MAAMC,EAAa,IAAI,cACvBA,EAAW,YAAY,+CAA+C,EACtE,SAAS,mBAAqB,CAAC,GAAG,SAAS,mBAAoBA,CAAU,CAC1E,EAEMC,EAAcT,GAAwB,CAC3CD,EAAUC,CAAK,EACfK,EAAYL,CAAK,EACjBO,EAAmB,CACpB,EAEA,eAAeE",
6
- "names": ["openNativePopover", "domRef", "closeNativePopover", "patchOpen", "Popup", "origOpen", "args", "topLayerAlreadyInUse", "element", "patchClosed", "_origClosed", "createGlobalStyles", "stylesheet", "patchPopup"]
4
+ "sourcesContent": ["// OpenUI5's Element.js subset\ntype Element = {\n\tgetDomRef: () => HTMLElement | null,\n}\n\n// The lifecycle of Popup.js is open -> _opened -> close -> _closed, we're interested in the first (open) and last (_closed)\ntype OpenUI5Popup = {\n\tprototype: {\n\t\topen: (...args: any[]) => void,\n\t\t_closed: (...args: any[]) => void,\n\t\tgetOpenState: () => \"CLOSED\" | \"CLOSING\" | \"OPEN\" | \"OPENING\",\n\t\tgetContent: () => Element, // this is the OpenUI5 Element/Control instance that opens the Popup (usually sap.m.Popover/sap.m.Dialog)\n\t\tonFocusEvent: (e: FocusEvent) => void,\n\t}\n};\n\nconst openNativePopover = (domRef: HTMLElement) => {\n\tdomRef.setAttribute(\"popover\", \"manual\");\n\tdomRef.showPopover();\n};\n\nconst closeNativePopover = (domRef: HTMLElement) => {\n\tif (domRef.hasAttribute(\"popover\")) {\n\t\tdomRef.hidePopover();\n\t\tdomRef.removeAttribute(\"popover\");\n\t}\n};\n\nconst patchOpen = (Popup: OpenUI5Popup) => {\n\tconst origOpen = Popup.prototype.open;\n\tPopup.prototype.open = function open(...args: any[]) {\n\t\torigOpen.apply(this, args); // call open first to initiate opening\n\t\tconst topLayerAlreadyInUse = !!document.body.querySelector(\":popover-open\"); // check if there is already something in the top layer\n\t\tconst openingInitiated = [\"OPENING\", \"OPEN\"].includes(this.getOpenState());\n\t\tif (openingInitiated && topLayerAlreadyInUse) {\n\t\t\tconst element = this.getContent();\n\t\t\tif (element) {\n\t\t\t\tconst domRef = element.getDomRef();\n\t\t\t\tif (domRef) {\n\t\t\t\t\topenNativePopover(domRef);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n};\n\nconst patchClosed = (Popup: OpenUI5Popup) => {\n\tconst _origClosed = Popup.prototype._closed;\n\tPopup.prototype._closed = function _closed(...args: any[]) {\n\t\tconst element = this.getContent();\n\t\tconst domRef = element.getDomRef();\n\t\t_origClosed.apply(this, args); // only then call _close\n\t\tif (domRef) {\n\t\t\tcloseNativePopover(domRef); // unset the popover attribute and close the native popover, but only if still in DOM\n\t\t}\n\t};\n};\n\nconst patchFocusEvent = (Popup: OpenUI5Popup) => {\n\tconst origFocusEvent = Popup.prototype.onFocusEvent;\n\tPopup.prototype.onFocusEvent = function onFocusEvent(e: FocusEvent) {\n\t\tconst isTypeFocus = e.type === \"focus\" || e.type === \"activate\";\n\t\tconst target = e.target as HTMLElement;\n\t\tif (!isTypeFocus || !target.closest(\"[ui5-popover],[ui5-responsive-popover],[ui5-dialog]\")) {\n\t\t\torigFocusEvent.call(this, e);\n\t\t}\n\t};\n};\n\nconst createGlobalStyles = () => {\n\tconst stylesheet = new CSSStyleSheet();\n\tstylesheet.replaceSync(`.sapMPopup-CTX:popover-open { inset: unset; }`);\n\tdocument.adoptedStyleSheets = [...document.adoptedStyleSheets, stylesheet];\n};\n\nconst patchPopup = (Popup: OpenUI5Popup) => {\n\tpatchOpen(Popup); // Popup.prototype.open\n\tpatchClosed(Popup); // Popup.prototype._closed\n\tcreateGlobalStyles(); // Ensures correct popover positioning by OpenUI5 (otherwise 0,0 is the center of the screen)\n\tpatchFocusEvent(Popup);// Popup.prototype.onFocusEvent\n};\n\nexport default patchPopup;\nexport type { OpenUI5Popup };\n"],
5
+ "mappings": "aAgBA,MAAMA,EAAqBC,GAAwB,CAClDA,EAAO,aAAa,UAAW,QAAQ,EACvCA,EAAO,YAAY,CACpB,EAEMC,EAAsBD,GAAwB,CAC/CA,EAAO,aAAa,SAAS,IAChCA,EAAO,YAAY,EACnBA,EAAO,gBAAgB,SAAS,EAElC,EAEME,EAAaC,GAAwB,CAC1C,MAAMC,EAAWD,EAAM,UAAU,KACjCA,EAAM,UAAU,KAAO,YAAiBE,EAAa,CACpDD,EAAS,MAAM,KAAMC,CAAI,EACzB,MAAMC,EAAuB,CAAC,CAAC,SAAS,KAAK,cAAc,eAAe,EAE1E,GADyB,CAAC,UAAW,MAAM,EAAE,SAAS,KAAK,aAAa,CAAC,GACjDA,EAAsB,CAC7C,MAAMC,EAAU,KAAK,WAAW,EAChC,GAAIA,EAAS,CACZ,MAAMP,EAASO,EAAQ,UAAU,EAC7BP,GACHD,EAAkBC,CAAM,CAE1B,CACD,CACD,CACD,EAEMQ,EAAeL,GAAwB,CAC5C,MAAMM,EAAcN,EAAM,UAAU,QACpCA,EAAM,UAAU,QAAU,YAAoBE,EAAa,CAE1D,MAAML,EADU,KAAK,WAAW,EACT,UAAU,EACjCS,EAAY,MAAM,KAAMJ,CAAI,EACxBL,GACHC,EAAmBD,CAAM,CAE3B,CACD,EAEMU,EAAmBP,GAAwB,CAChD,MAAMQ,EAAiBR,EAAM,UAAU,aACvCA,EAAM,UAAU,aAAe,SAAsBS,EAAe,CACnE,MAAMC,EAAcD,EAAE,OAAS,SAAWA,EAAE,OAAS,WAC/CE,EAASF,EAAE,QACb,CAACC,GAAe,CAACC,EAAO,QAAQ,qDAAqD,IACxFH,EAAe,KAAK,KAAMC,CAAC,CAE7B,CACD,EAEMG,EAAqB,IAAM,CAChC,MAAMC,EAAa,IAAI,cACvBA,EAAW,YAAY,+CAA+C,EACtE,SAAS,mBAAqB,CAAC,GAAG,SAAS,mBAAoBA,CAAU,CAC1E,EAEMC,EAAcd,GAAwB,CAC3CD,EAAUC,CAAK,EACfK,EAAYL,CAAK,EACjBY,EAAmB,EACnBL,EAAgBP,CAAK,CACtB,EAEA,eAAec",
6
+ "names": ["openNativePopover", "domRef", "closeNativePopover", "patchOpen", "Popup", "origOpen", "args", "topLayerAlreadyInUse", "element", "patchClosed", "_origClosed", "patchFocusEvent", "origFocusEvent", "e", "isTypeFocus", "target", "createGlobalStyles", "stylesheet", "patchPopup"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const e={version:"2.0.0-rc.5",major:2,minor:0,patch:0,suffix:"-rc.5",isNext:!1,buildTime:1717680065};export default e;
1
+ "use strict";const e={version:"2.0.0-rc.6",major:2,minor:0,patch:0,suffix:"-rc.6",isNext:!1,buildTime:1718638412};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.0.0-rc.5\",\n\tmajor: 2,\n\tminor: 0,\n\tpatch: 0,\n\tsuffix: \"-rc.5\",\n\tisNext: false,\n\tbuildTime: 1717680065,\n};\nexport default VersionInfo;"],
4
+ "sourcesContent": ["const VersionInfo = {\n\tversion: \"2.0.0-rc.6\",\n\tmajor: 2,\n\tminor: 0,\n\tpatch: 0,\n\tsuffix: \"-rc.6\",\n\tisNext: false,\n\tbuildTime: 1718638412,\n};\nexport default VersionInfo;"],
5
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
  }
@@ -1,2 +1,2 @@
1
- "use strict";import{render as s,html as a,svg as m}from"lit-html";import{getFeature as o}from"../FeaturesRegistry.js";const i=(t,...n)=>{const e=o("LitStatic");return(e?e.html:a)(t,...n)},p=(t,...n)=>{const e=o("LitStatic");return(e?e.svg:m)(t,...n)},l=(t,n,e)=>{const r=o("OpenUI5Enablement");r&&(t=r.wrapTemplateResultInBusyMarkup(i,e.host,t)),s(t,n,e)},f=(t,n,e)=>{const r=o("LitStatic");if(r)return r.unsafeStatic((n||[]).includes(t)?`${t}-${e}`:t)};export{i as html,p 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 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;
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\tTemplateResult,\n} 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 { 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,MAEM,WAEP,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",
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
6
  "names": ["render", "html", "svg", "getFeature", "effectiveHtml", "strings", "values", "litStatic", "effectiveSvg", "litRender", "templateResult", "container", "options", "openUI5Enablement", "scopeTag", "tag", "tags", "suffix"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import r from"./getEffectiveStyle.js";import{attachCustomCSSChange as l}from"./CustomStyle.js";const e=new Map;l(t=>{e.delete(`${t}_normal`)});const S=t=>{const n=`${t.getMetadata().getTag()}_normal`;if(!e.has(n)){const a=r(t),o=new CSSStyleSheet;o.replaceSync(a),e.set(n,[o])}return e.get(n)};export default S;
1
+ "use strict";import r from"./getEffectiveStyle.js";import{attachCustomCSSChange as l}from"./CustomStyle.js";const e=new Map;l(t=>{e.delete(`${t}_normal`)});const s=t=>{const n=`${t.getMetadata().getTag()}_normal`;if(!e.has(n)){const a=r(t),o=new CSSStyleSheet;o.replaceSync(a),e.set(n,[o])}return e.get(n)};export default s;
2
2
  //# sourceMappingURL=getConstructableStyle.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/theming/getConstructableStyle.ts"],
4
- "sourcesContent": ["import getEffectiveStyle from \"./getEffectiveStyle.js\";\nimport { attachCustomCSSChange } from \"./CustomStyle.js\";\nimport UI5Element from \"../UI5Element.js\";\n\nconst constructableStyleMap = new Map<string, Array<CSSStyleSheet>>();\n\nattachCustomCSSChange((tag: string) => {\n\tconstructableStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part\n});\n\n/**\n * Returns (and caches) a constructable style sheet for a web component class\n * Note: Chrome\n * @param ElementClass\n * @returns {*}\n */\nconst getConstructableStyle = (ElementClass: typeof UI5Element) => {\n\tconst tag = ElementClass.getMetadata().getTag();\n\tconst key = `${tag}_normal`;\n\n\tif (!constructableStyleMap.has(key)) {\n\t\tconst styleContent = getEffectiveStyle(ElementClass);\n\t\tconst style = new CSSStyleSheet();\n\t\tstyle.replaceSync(styleContent);\n\t\tconstructableStyleMap.set(key, [style]);\n\t}\n\n\treturn constructableStyleMap.get(key)!;\n};\n\nexport default getConstructableStyle;\n"],
4
+ "sourcesContent": ["import getEffectiveStyle from \"./getEffectiveStyle.js\";\nimport { attachCustomCSSChange } from \"./CustomStyle.js\";\nimport type UI5Element from \"../UI5Element.js\";\n\nconst constructableStyleMap = new Map<string, Array<CSSStyleSheet>>();\n\nattachCustomCSSChange((tag: string) => {\n\tconstructableStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part\n});\n\n/**\n * Returns (and caches) a constructable style sheet for a web component class\n * Note: Chrome\n * @param ElementClass\n * @returns {*}\n */\nconst getConstructableStyle = (ElementClass: typeof UI5Element) => {\n\tconst tag = ElementClass.getMetadata().getTag();\n\tconst key = `${tag}_normal`;\n\n\tif (!constructableStyleMap.has(key)) {\n\t\tconst styleContent = getEffectiveStyle(ElementClass);\n\t\tconst style = new CSSStyleSheet();\n\t\tstyle.replaceSync(styleContent);\n\t\tconstructableStyleMap.set(key, [style]);\n\t}\n\n\treturn constructableStyleMap.get(key)!;\n};\n\nexport default getConstructableStyle;\n"],
5
5
  "mappings": "aAAA,OAAOA,MAAuB,yBAC9B,OAAS,yBAAAC,MAA6B,mBAGtC,MAAMC,EAAwB,IAAI,IAElCD,EAAuBE,GAAgB,CACtCD,EAAsB,OAAO,GAAGC,CAAG,SAAS,CAC7C,CAAC,EAQD,MAAMC,EAAyBC,GAAoC,CAElE,MAAMC,EAAM,GADAD,EAAa,YAAY,EAAE,OAAO,CAC5B,UAElB,GAAI,CAACH,EAAsB,IAAII,CAAG,EAAG,CACpC,MAAMC,EAAeP,EAAkBK,CAAY,EAC7CG,EAAQ,IAAI,cAClBA,EAAM,YAAYD,CAAY,EAC9BL,EAAsB,IAAII,EAAK,CAACE,CAAK,CAAC,CACvC,CAEA,OAAON,EAAsB,IAAII,CAAG,CACrC,EAEA,eAAeF",
6
6
  "names": ["getEffectiveStyle", "attachCustomCSSChange", "constructableStyleMap", "tag", "getConstructableStyle", "ElementClass", "key", "styleContent", "style"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import{getCustomCSS as i,attachCustomCSSChange as f}from"./CustomStyle.js";import r from"./getStylesString.js";import{getFeature as y}from"../FeaturesRegistry.js";const e=new Map;f(t=>{e.delete(`${t}_normal`)});const c=t=>{const o=t.getMetadata().getTag(),n=`${o}_normal`,s=y("OpenUI5Enablement");if(!e.has(n)){let l="";s&&(l=r(s.getBusyIndicatorStyles()));const m=i(o)||"",a=`${r(t.styles)} ${m} ${l}`;e.set(n,a)}return e.get(n)};export default c;
1
+ "use strict";import{getCustomCSS as i,attachCustomCSSChange as f}from"./CustomStyle.js";import r from"./getStylesString.js";import{getFeature as p}from"../FeaturesRegistry.js";const e=new Map;f(t=>{e.delete(`${t}_normal`)});const y=t=>{const o=t.getMetadata().getTag(),n=`${o}_normal`,s=p("OpenUI5Enablement");if(!e.has(n)){let l="";s&&(l=r(s.getBusyIndicatorStyles()));const a=i(o)||"",m=`${r(t.styles)} ${a} ${l}`;e.set(n,m)}return e.get(n)};export default y;
2
2
  //# sourceMappingURL=getEffectiveStyle.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/theming/getEffectiveStyle.ts"],
4
- "sourcesContent": ["import { getCustomCSS, attachCustomCSSChange } from \"./CustomStyle.js\";\nimport getStylesString from \"./getStylesString.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport OpenUI5Enablement from \"../features/OpenUI5Enablement.js\";\n\nconst effectiveStyleMap = new Map<string, string>();\n\nattachCustomCSSChange((tag: string) => {\n\teffectiveStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part\n});\n\nconst getEffectiveStyle = (ElementClass: typeof UI5Element) => {\n\tconst tag = ElementClass.getMetadata().getTag();\n\tconst key = `${tag}_normal`;\n\tconst openUI5Enablement = getFeature<typeof OpenUI5Enablement>(\"OpenUI5Enablement\");\n\n\tif (!effectiveStyleMap.has(key)) {\n\t\tlet busyIndicatorStyles = \"\";\n\n\t\tif (openUI5Enablement) {\n\t\t\tbusyIndicatorStyles = getStylesString(openUI5Enablement.getBusyIndicatorStyles());\n\t\t}\n\n\t\tconst customStyle = getCustomCSS(tag) || \"\";\n\t\tconst builtInStyles = getStylesString(ElementClass.styles);\n\n\t\tconst effectiveStyle = `${builtInStyles} ${customStyle} ${busyIndicatorStyles}`;\n\t\teffectiveStyleMap.set(key, effectiveStyle);\n\t}\n\n\treturn effectiveStyleMap.get(key)!; // The key is guaranteed to exist\n};\n\nexport default getEffectiveStyle;\n"],
4
+ "sourcesContent": ["import { getCustomCSS, attachCustomCSSChange } from \"./CustomStyle.js\";\nimport getStylesString from \"./getStylesString.js\";\nimport { getFeature } from \"../FeaturesRegistry.js\";\nimport type UI5Element from \"../UI5Element.js\";\nimport type OpenUI5Enablement from \"../features/OpenUI5Enablement.js\";\n\nconst effectiveStyleMap = new Map<string, string>();\n\nattachCustomCSSChange((tag: string) => {\n\teffectiveStyleMap.delete(`${tag}_normal`); // there is custom CSS only for the component itself, not for its static area part\n});\n\nconst getEffectiveStyle = (ElementClass: typeof UI5Element) => {\n\tconst tag = ElementClass.getMetadata().getTag();\n\tconst key = `${tag}_normal`;\n\tconst openUI5Enablement = getFeature<typeof OpenUI5Enablement>(\"OpenUI5Enablement\");\n\n\tif (!effectiveStyleMap.has(key)) {\n\t\tlet busyIndicatorStyles = \"\";\n\n\t\tif (openUI5Enablement) {\n\t\t\tbusyIndicatorStyles = getStylesString(openUI5Enablement.getBusyIndicatorStyles());\n\t\t}\n\n\t\tconst customStyle = getCustomCSS(tag) || \"\";\n\t\tconst builtInStyles = getStylesString(ElementClass.styles);\n\n\t\tconst effectiveStyle = `${builtInStyles} ${customStyle} ${busyIndicatorStyles}`;\n\t\teffectiveStyleMap.set(key, effectiveStyle);\n\t}\n\n\treturn effectiveStyleMap.get(key)!; // The key is guaranteed to exist\n};\n\nexport default getEffectiveStyle;\n"],
5
5
  "mappings": "aAAA,OAAS,gBAAAA,EAAc,yBAAAC,MAA6B,mBACpD,OAAOC,MAAqB,uBAC5B,OAAS,cAAAC,MAAkB,yBAI3B,MAAMC,EAAoB,IAAI,IAE9BH,EAAuBI,GAAgB,CACtCD,EAAkB,OAAO,GAAGC,CAAG,SAAS,CACzC,CAAC,EAED,MAAMC,EAAqBC,GAAoC,CAC9D,MAAMF,EAAME,EAAa,YAAY,EAAE,OAAO,EACxCC,EAAM,GAAGH,CAAG,UACZI,EAAoBN,EAAqC,mBAAmB,EAElF,GAAI,CAACC,EAAkB,IAAII,CAAG,EAAG,CAChC,IAAIE,EAAsB,GAEtBD,IACHC,EAAsBR,EAAgBO,EAAkB,uBAAuB,CAAC,GAGjF,MAAME,EAAcX,EAAaK,CAAG,GAAK,GAGnCO,EAAiB,GAFDV,EAAgBK,EAAa,MAAM,CAElB,IAAII,CAAW,IAAID,CAAmB,GAC7EN,EAAkB,IAAII,EAAKI,CAAc,CAC1C,CAEA,OAAOR,EAAkB,IAAII,CAAG,CACjC,EAEA,eAAeF",
6
6
  "names": ["getCustomCSS", "attachCustomCSSChange", "getStylesString", "getFeature", "effectiveStyleMap", "tag", "getEffectiveStyle", "ElementClass", "key", "openUI5Enablement", "busyIndicatorStyles", "customStyle", "effectiveStyle"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";class e{static isValid(t){return!1}static attributeToProperty(t){return t}static propertyToAttribute(t){return t===null?null:String(t)}static valuesAreEqual(t,r){return t===r}static generateTypeAccessors(t){Object.keys(t).forEach(r=>{Object.defineProperty(this,r,{get(){return t[r]}})})}static get isDataTypeClass(){return!0}}export default e;
1
+ "use strict";class r{static isValid(t){return!1}static attributeToProperty(t){return t}static propertyToAttribute(t){return t===null?null:String(t)}static valuesAreEqual(t,e){return t===e}static generateTypeAccessors(t){Object.keys(t).forEach(e=>{Object.defineProperty(this,e,{get(){return t[e]}})})}static get isDataTypeClass(){return!0}}export default r;
2
2
  //# sourceMappingURL=DataType.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/DataType.ts"],
4
- "sourcesContent": ["import { PropertyValue } from \"../UI5ElementMetadata.js\";\n\n/**\n * @class\n * Base class for all data types.\n *\n * @public\n */\nclass DataType {\n\t/**\n\t * Checks if the value is valid for its data type.\n \t * @public\n\t */\n\t// eslint-disable-next-line\n\tstatic isValid(value: any): boolean {\n\t\treturn false;\n\t}\n\n\tstatic attributeToProperty(attributeValue: string | null): PropertyValue {\n\t\treturn attributeValue;\n\t}\n\n\tstatic propertyToAttribute(propertyValue: PropertyValue): string | null {\n\t\treturn propertyValue === null ? null : String(propertyValue);\n\t}\n\n\tstatic valuesAreEqual(value1: any, value2: any) {\n\t\treturn value1 === value2;\n\t}\n\n\tstatic generateTypeAccessors(types: Record<string, string>) {\n\t\tObject.keys(types).forEach(type => {\n\t\t\tObject.defineProperty(this, type, {\n\t\t\t\tget() {\n\t\t\t\t\treturn types[type];\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\t}\n\n\tstatic get isDataTypeClass() {\n\t\treturn true;\n\t}\n}\n\nexport default DataType;\n"],
4
+ "sourcesContent": ["import type { PropertyValue } from \"../UI5ElementMetadata.js\";\n\n/**\n * @class\n * Base class for all data types.\n *\n * @public\n */\nclass DataType {\n\t/**\n\t * Checks if the value is valid for its data type.\n \t * @public\n\t */\n\t// eslint-disable-next-line\n\tstatic isValid(value: any): boolean {\n\t\treturn false;\n\t}\n\n\tstatic attributeToProperty(attributeValue: string | null): PropertyValue {\n\t\treturn attributeValue;\n\t}\n\n\tstatic propertyToAttribute(propertyValue: PropertyValue): string | null {\n\t\treturn propertyValue === null ? null : String(propertyValue);\n\t}\n\n\tstatic valuesAreEqual(value1: any, value2: any) {\n\t\treturn value1 === value2;\n\t}\n\n\tstatic generateTypeAccessors(types: Record<string, string>) {\n\t\tObject.keys(types).forEach(type => {\n\t\t\tObject.defineProperty(this, type, {\n\t\t\t\tget() {\n\t\t\t\t\treturn types[type];\n\t\t\t\t},\n\t\t\t});\n\t\t});\n\t}\n\n\tstatic get isDataTypeClass() {\n\t\treturn true;\n\t}\n}\n\nexport default DataType;\n"],
5
5
  "mappings": "aAQA,MAAMA,CAAS,CAMd,OAAO,QAAQC,EAAqB,CACnC,MAAO,EACR,CAEA,OAAO,oBAAoBC,EAA8C,CACxE,OAAOA,CACR,CAEA,OAAO,oBAAoBC,EAA6C,CACvE,OAAOA,IAAkB,KAAO,KAAO,OAAOA,CAAa,CAC5D,CAEA,OAAO,eAAeC,EAAaC,EAAa,CAC/C,OAAOD,IAAWC,CACnB,CAEA,OAAO,sBAAsBC,EAA+B,CAC3D,OAAO,KAAKA,CAAK,EAAE,QAAQC,GAAQ,CAClC,OAAO,eAAe,KAAMA,EAAM,CACjC,KAAM,CACL,OAAOD,EAAMC,CAAI,CAClB,CACD,CAAC,CACF,CAAC,CACF,CAEA,WAAW,iBAAkB,CAC5B,MAAO,EACR,CACD,CAEA,eAAeP",
6
6
  "names": ["DataType", "value", "attributeValue", "propertyValue", "value1", "value2", "types", "type"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import t from"./DataType.js";class e extends t{static isValid(r){return Number(r)===r}static attributeToProperty(r){return parseFloat(r)}}export default e;
1
+ "use strict";import r from"./DataType.js";class e extends r{static isValid(t){return Number(t)===t}static attributeToProperty(t){return parseFloat(t)}}export default e;
2
2
  //# sourceMappingURL=Float.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/Float.ts"],
4
- "sourcesContent": ["import { PropertyValue } from \"../UI5ElementMetadata.js\";\nimport DataType from \"./DataType.js\";\n\n/**\n * @class\n * Float data type.\n *\n * @constructor\n * @public\n */\nclass Float extends DataType {\n\tstatic override isValid(value: any) {\n\t\treturn Number(value) === value;\n\t}\n\n\tstatic override attributeToProperty(attributeValue: string): PropertyValue {\n\t\treturn parseFloat(attributeValue);\n\t}\n}\n\nexport default Float;\n"],
4
+ "sourcesContent": ["import type { PropertyValue } from \"../UI5ElementMetadata.js\";\nimport DataType from \"./DataType.js\";\n\n/**\n * @class\n * Float data type.\n *\n * @constructor\n * @public\n */\nclass Float extends DataType {\n\tstatic override isValid(value: any) {\n\t\treturn Number(value) === value;\n\t}\n\n\tstatic override attributeToProperty(attributeValue: string): PropertyValue {\n\t\treturn parseFloat(attributeValue);\n\t}\n}\n\nexport default Float;\n"],
5
5
  "mappings": "aACA,OAAOA,MAAc,gBASrB,MAAMC,UAAcD,CAAS,CAC5B,OAAgB,QAAQE,EAAY,CACnC,OAAO,OAAOA,CAAK,IAAMA,CAC1B,CAEA,OAAgB,oBAAoBC,EAAuC,CAC1E,OAAO,WAAWA,CAAc,CACjC,CACD,CAEA,eAAeF",
6
6
  "names": ["DataType", "Float", "value", "attributeValue"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import e from"./DataType.js";class t extends e{static isValid(r){return Number.isInteger(r)}static attributeToProperty(r){return parseInt(r)}}export default t;
1
+ "use strict";import t from"./DataType.js";class r extends t{static isValid(e){return Number.isInteger(e)}static attributeToProperty(e){return parseInt(e)}}export default r;
2
2
  //# sourceMappingURL=Integer.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/types/Integer.ts"],
4
- "sourcesContent": ["import { PropertyValue } from \"../UI5ElementMetadata.js\";\nimport DataType from \"./DataType.js\";\n\n/**\n * @class\n * Integer data type.\n *\n * @constructor\n * @public\n */\nclass Integer extends DataType {\n\tstatic override isValid(value: any) {\n\t\treturn Number.isInteger(value);\n\t}\n\n\tstatic override attributeToProperty(attributeValue: string): PropertyValue {\n\t\treturn parseInt(attributeValue);\n\t}\n}\n\nexport default Integer;\n"],
4
+ "sourcesContent": ["import type { PropertyValue } from \"../UI5ElementMetadata.js\";\nimport DataType from \"./DataType.js\";\n\n/**\n * @class\n * Integer data type.\n *\n * @constructor\n * @public\n */\nclass Integer extends DataType {\n\tstatic override isValid(value: any) {\n\t\treturn Number.isInteger(value);\n\t}\n\n\tstatic override attributeToProperty(attributeValue: string): PropertyValue {\n\t\treturn parseInt(attributeValue);\n\t}\n}\n\nexport default Integer;\n"],
5
5
  "mappings": "aACA,OAAOA,MAAc,gBASrB,MAAMC,UAAgBD,CAAS,CAC9B,OAAgB,QAAQE,EAAY,CACnC,OAAO,OAAO,UAAUA,CAAK,CAC9B,CAEA,OAAgB,oBAAoBC,EAAuC,CAC1E,OAAO,SAASA,CAAc,CAC/B,CACD,CAEA,eAAeF",
6
6
  "names": ["DataType", "Integer", "value", "attributeValue"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";const r=new WeakMap,o=new WeakMap,u={attributes:!0,childList:!0,characterData:!0,subtree:!0},v=e=>{const t=e;return t.accessibleNameRef?b(e):t.accessibleName?t.accessibleName:void 0},b=e=>{const t=e.accessibleNameRef?.split(" ")??[],s=e.getRootNode();let l="";return t.forEach((n,c)=>{const a=s.querySelector(`[id='${n}']`),d=`${a&&a.textContent?a.textContent:""}`;d&&(l+=d,c<t.length-1&&(l+=" "))}),l},m=e=>{const t=new Set;return E(e).forEach(c=>{t.add(c)}),(e.accessibleNameRef?.split(" ")??[]).forEach(c=>{const a=g(e,c);a&&t.add(a)}),Array.from(t)},E=e=>{const t=e.getRootNode().querySelectorAll(`[for="${e.id}"]`);return Array.from(t)},g=(e,t)=>e.getRootNode().querySelector(`[id='${t}']`),M=e=>{const t=[];if(E(e).forEach(l=>{const n=l.textContent;n&&t.push(n)}),t.length)return t.join(" ")},k=e=>s=>{if(!(s&&s.type==="property"&&s.name==="accessibleNameRef"))return;const l=o.get(e);if(!l)return;const n=l.observedElements,c=m(e);n.forEach(a=>{c.includes(a)||i(l,a)}),c.forEach(a=>{n.includes(a)||(f(l,a),l.observedElements.push(a))}),l?.callback()},A=(e,t)=>{if(o.has(e))return;const s=m(e),l=k(e),n={host:e,observedElements:s,callback:t,invalidationCallback:l};o.set(e,n),e.attachInvalidate(l),s.forEach(c=>{f(n,c)}),t()},f=(e,t)=>{let s=r.get(t);if(!s){s={observer:null,callbacks:[]};const l=new MutationObserver(()=>{s.callbacks.forEach(a=>{a()});const c=document.getElementById(t.id);e.host.id===t.getAttribute("for")||c||i(e,t)});s.observer=l,l.observe(t,u),r.set(t,s)}s.callbacks.includes(e.callback)||s.callbacks.push(e.callback)},i=(e,t)=>{const s=r.get(t);s&&(s.callbacks=s.callbacks.filter(l=>l!==e.callback),s.callbacks.length||(s.observer?.disconnect(),r.delete(t))),e.observedElements=e.observedElements.filter(l=>l!==t)},T=e=>{const t=o.get(e);if(!t)return;[...t.observedElements].forEach(l=>{i(t,l)}),e.detachInvalidate(t.invalidationCallback),o.delete(e)};export{v as getEffectiveAriaLabelText,M as getAssociatedLabelForTexts,A as registerUI5Element,T as deregisterUI5Element,b as getAllAccessibleNameRefTexts};
1
+ "use strict";const r=new WeakMap,o=new WeakMap,u={attributes:!0,childList:!0,characterData:!0,subtree:!0},v=e=>{const t=e;return t.accessibleNameRef?m(e):t.accessibleName?t.accessibleName:void 0},m=e=>{const t=e.accessibleNameRef?.split(" ")??[],s=e.getRootNode();let l="";return t.forEach((a,c)=>{const n=s.querySelector(`[id='${a}']`),d=`${n&&n.textContent?n.textContent:""}`;d&&(l+=d,c<t.length-1&&(l+=" "))}),l},E=e=>{const t=new Set;return b(e).forEach(c=>{t.add(c)}),(e.accessibleNameRef?.split(" ")??[]).forEach(c=>{const n=g(e,c);n&&t.add(n)}),Array.from(t)},b=e=>{const t=e.getRootNode().querySelectorAll(`[for="${e.id}"]`);return Array.from(t)},g=(e,t)=>e.getRootNode().querySelector(`[id='${t}']`),M=e=>{const t=[];if(b(e).forEach(l=>{const a=l.textContent;a&&t.push(a)}),t.length)return t.join(" ")},k=e=>s=>{if(!(s&&s.type==="property"&&s.name==="accessibleNameRef"))return;const l=o.get(e);if(!l)return;const a=l.observedElements,c=E(e);a.forEach(n=>{c.includes(n)||i(l,n)}),c.forEach(n=>{a.includes(n)||(f(l,n),l.observedElements.push(n))}),l?.callback()},A=(e,t)=>{if(o.has(e))return;const s=E(e),l=k(e),a={host:e,observedElements:s,callback:t,invalidationCallback:l};o.set(e,a),e.attachInvalidate(l),s.forEach(c=>{f(a,c)}),t()},f=(e,t)=>{let s=r.get(t);if(!s){s={observer:null,callbacks:[]};const l=new MutationObserver(()=>{s.callbacks.forEach(n=>{n()});const c=document.getElementById(t.id);e.host.id===t.getAttribute("for")||c||i(e,t)});s.observer=l,l.observe(t,u),r.set(t,s)}s.callbacks.includes(e.callback)||s.callbacks.push(e.callback)},i=(e,t)=>{const s=r.get(t);s&&(s.callbacks=s.callbacks.filter(l=>l!==e.callback),s.callbacks.length||(s.observer?.disconnect(),r.delete(t))),e.observedElements=e.observedElements.filter(l=>l!==t)},T=e=>{const t=o.get(e);if(!t)return;[...t.observedElements].forEach(l=>{i(t,l)}),e.detachInvalidate(t.invalidationCallback),o.delete(e)};export{v as getEffectiveAriaLabelText,M as getAssociatedLabelForTexts,A as registerUI5Element,T as deregisterUI5Element,m as getAllAccessibleNameRefTexts};
2
2
  //# sourceMappingURL=AriaLabelHelper.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/util/AriaLabelHelper.ts"],
4
- "sourcesContent": ["import UI5Element, { ChangeInfo } from \"../UI5Element.js\";\n\ntype InvalidateCallback = (changeInfo: ChangeInfo) => void;\ntype MutationCallback = () => void;\ntype AssociatedElement = {\n\tobserver: MutationObserver | null;\n\tcallbacks: Array<MutationCallback>;\n};\ntype RegisteredElement = {\n\thost: UI5Element;\n\tobservedElements: Array<HTMLElement>;\n\tcallback: MutationCallback;\n\tinvalidationCallback: InvalidateCallback;\n};\n\nconst associatedElements = new WeakMap<HTMLElement, AssociatedElement>();\nconst registeredElements = new WeakMap<UI5Element, RegisteredElement>();\n\ntype AccessibleElement = HTMLElement & {\n\taccessibleNameRef: string;\n\taccessibleName: string;\n};\n\nconst observerOptions = {\n\tattributes: true,\n\tchildList: true,\n\tcharacterData: true,\n\tsubtree: true,\n};\n\nconst getEffectiveAriaLabelText = (el: HTMLElement) => {\n\tconst accessibleEl = el as AccessibleElement;\n\n\tif (!accessibleEl.accessibleNameRef) {\n\t\tif (accessibleEl.accessibleName) {\n\t\t\treturn accessibleEl.accessibleName;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\treturn getAllAccessibleNameRefTexts(el);\n};\n\n/**\n *\n * @param {HTMLElement} el Defines the HTMLElement, for which you need to get all related texts\n */\nconst getAllAccessibleNameRefTexts = (el: HTMLElement) => {\n\tconst ids = (el as AccessibleElement).accessibleNameRef?.split(\" \") ?? [];\n\tconst owner = el.getRootNode() as HTMLElement;\n\tlet result = \"\";\n\n\tids.forEach((elementId: string, index: number) => {\n\t\tconst element = owner.querySelector(`[id='${elementId}']`);\n\t\tconst text = `${element && element.textContent ? element.textContent : \"\"}`;\n\t\tif (text) {\n\t\t\tresult += text;\n\t\t\tif (index < ids.length - 1) {\n\t\t\t\tresult += \" \";\n\t\t\t}\n\t\t}\n\t});\n\n\treturn result;\n};\n\nconst _getAllAssociatedElementsFromDOM = (el: UI5Element): Array<HTMLElement> => {\n\tconst set = new Set<HTMLElement>();\n\t// adding labels with attribute for matching the el.id\n\tconst labelsForAssociated = _getAssociatedLabels(el);\n\tlabelsForAssociated.forEach(itm => {\n\t\tset.add(itm);\n\t});\n\t// adding other elements that id is the same as accessibleNameRef value\n\tconst value = el[\"accessibleNameRef\" as keyof typeof el] as string;\n\tconst ids = value?.split(\" \") ?? [];\n\tids.forEach(id => {\n\t\tconst refEl = _getReferencedElementById(el, id);\n\t\tif (refEl) {\n\t\t\tset.add(refEl);\n\t\t}\n\t});\n\treturn Array.from(set);\n};\n\nconst _getAssociatedLabels = (el: HTMLElement): Array<HTMLElement> => {\n\tconst labels = (el.getRootNode() as HTMLElement).querySelectorAll<HTMLElement>(`[for=\"${el.id}\"]`);\n\treturn Array.from(labels);\n};\n\nconst _getReferencedElementById = (el: HTMLElement, elementId: string): HTMLElement | null => {\n\treturn (el.getRootNode() as HTMLElement).querySelector<HTMLElement>(`[id='${elementId}']`);\n};\n\n/**\n * @param {HTMLElement} el Defines the HTMLElement, for which you need to get all related \"label for\" texts\n */\nconst getAssociatedLabelForTexts = (el: HTMLElement) => {\n\tconst results: Array<string> = [];\n\tconst labels = _getAssociatedLabels(el);\n\n\tlabels.forEach((label: HTMLElement) => {\n\t\tconst labelText = label.textContent;\n\t\tlabelText && results.push(labelText);\n\t});\n\n\tif (results.length) {\n\t\treturn results.join(\" \");\n\t}\n\n\treturn undefined;\n};\n\nconst _createInvalidationCallback = (el: UI5Element) => {\n\tconst invalidationCallback = (changeInfo: ChangeInfo) => {\n\t\tif (!(changeInfo && changeInfo.type === \"property\" && changeInfo.name === \"accessibleNameRef\")) {\n\t\t\treturn;\n\t\t}\n\t\tconst registeredElement = registeredElements.get(el);\n\t\tif (!registeredElement) {\n\t\t\treturn;\n\t\t}\n\t\tconst oldAssociatedElements = registeredElement.observedElements;\n\t\tconst newAssociatedElements = _getAllAssociatedElementsFromDOM(el);\n\t\toldAssociatedElements.forEach(oldElement => {\n\t\t\tif (!newAssociatedElements.includes(oldElement)) {\n\t\t\t\t_removeObservedElementFromRegisteredElement(registeredElement, oldElement);\n\t\t\t}\n\t\t});\n\t\tnewAssociatedElements.forEach(newElement => {\n\t\t\tif (!oldAssociatedElements.includes(newElement)) {\n\t\t\t\t_addObservedElementToRegisteredElement(registeredElement, newElement);\n\t\t\t\tregisteredElement.observedElements.push(newElement);\n\t\t\t}\n\t\t});\n\t\tregisteredElement?.callback();\n\t};\n\treturn invalidationCallback;\n};\n\nconst registerUI5Element = (el: UI5Element, callback: MutationCallback) => {\n\tif (registeredElements.has(el)) {\n\t\treturn;\n\t}\n\tconst allAssociatedElements = _getAllAssociatedElementsFromDOM(el);\n\tconst invalidationCallback = _createInvalidationCallback(el);\n\tconst registeredElement = {\n\t\thost: el,\n\t\tobservedElements: allAssociatedElements,\n\t\tcallback,\n\t\tinvalidationCallback,\n\t};\n\tregisteredElements.set(el, registeredElement);\n\tel.attachInvalidate(invalidationCallback);\n\n\tallAssociatedElements.forEach((element: HTMLElement) => {\n\t\t_addObservedElementToRegisteredElement(registeredElement, element);\n\t});\n\tcallback();\n};\n\nconst _addObservedElementToRegisteredElement = (registeredElement: RegisteredElement, element: HTMLElement) => {\n\tlet associatedElement = associatedElements.get(element);\n\tif (!associatedElement) {\n\t\tassociatedElement = { observer: null, callbacks: [] };\n\t\tconst observer = new MutationObserver(() => {\n\t\t\tconst callbacks = (associatedElement as AssociatedElement).callbacks;\n\t\t\tcallbacks.forEach(callback => {\n\t\t\t\tcallback();\n\t\t\t});\n\t\t\tconst domEl = document.getElementById(element.id);\n\t\t\t// if no longer should be observed from this registeredElement, remove it\n\t\t\tif (!(registeredElement.host.id === element.getAttribute(\"for\") || domEl)) {\n\t\t\t\t_removeObservedElementFromRegisteredElement(registeredElement, element);\n\t\t\t}\n\t\t});\n\t\tassociatedElement.observer = observer;\n\t\tobserver.observe(element, observerOptions);\n\t\tassociatedElements.set(element, associatedElement);\n\t}\n\tif (!associatedElement.callbacks.includes(registeredElement.callback)) {\n\t\tassociatedElement.callbacks.push(registeredElement.callback);\n\t}\n};\n\nconst _removeObservedElementFromRegisteredElement = (registeredElement: RegisteredElement, element: HTMLElement) => {\n\tconst associatedElement = associatedElements.get(element);\n\tif (associatedElement) {\n\t\tassociatedElement.callbacks = associatedElement.callbacks.filter(itm => itm !== registeredElement.callback);\n\t\tif (!associatedElement.callbacks.length) {\n\t\t\tassociatedElement.observer?.disconnect();\n\t\t\tassociatedElements.delete(element);\n\t\t}\n\t}\n\tregisteredElement.observedElements = registeredElement.observedElements.filter(itm => itm !== element);\n};\n\nconst deregisterUI5Element = (el: UI5Element) => {\n\tconst registeredElement = registeredElements.get(el);\n\tif (!registeredElement) {\n\t\treturn;\n\t}\n\tconst oldObservedElements = [...registeredElement.observedElements];\n\toldObservedElements.forEach(observedElement => {\n\t\t_removeObservedElementFromRegisteredElement(registeredElement, observedElement);\n\t});\n\tel.detachInvalidate(registeredElement.invalidationCallback);\n\tregisteredElements.delete(el);\n};\n\nexport {\n\tgetEffectiveAriaLabelText,\n\tg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\";\n\ntype InvalidateCallback = (changeInfo: ChangeInfo) => void;\ntype MutationCallback = () => void;\ntype AssociatedElement = {\n\tobserver: MutationObserver | null;\n\tcallbacks: Array<MutationCallback>;\n};\ntype RegisteredElement = {\n\thost: UI5Element;\n\tobservedElements: Array<HTMLElement>;\n\tcallback: MutationCallback;\n\tinvalidationCallback: InvalidateCallback;\n};\n\nconst associatedElements = new WeakMap<HTMLElement, AssociatedElement>();\nconst registeredElements = new WeakMap<UI5Element, RegisteredElement>();\n\ntype AccessibleElement = HTMLElement & {\n\taccessibleNameRef: string;\n\taccessibleName: string;\n};\n\nconst observerOptions = {\n\tattributes: true,\n\tchildList: true,\n\tcharacterData: true,\n\tsubtree: true,\n};\n\nconst getEffectiveAriaLabelText = (el: HTMLElement) => {\n\tconst accessibleEl = el as AccessibleElement;\n\n\tif (!accessibleEl.accessibleNameRef) {\n\t\tif (accessibleEl.accessibleName) {\n\t\t\treturn accessibleEl.accessibleName;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\treturn getAllAccessibleNameRefTexts(el);\n};\n\n/**\n *\n * @param {HTMLElement} el Defines the HTMLElement, for which you need to get all related texts\n */\nconst getAllAccessibleNameRefTexts = (el: HTMLElement) => {\n\tconst ids = (el as AccessibleElement).accessibleNameRef?.split(\" \") ?? [];\n\tconst owner = el.getRootNode() as HTMLElement;\n\tlet result = \"\";\n\n\tids.forEach((elementId: string, index: number) => {\n\t\tconst element = owner.querySelector(`[id='${elementId}']`);\n\t\tconst text = `${element && element.textContent ? element.textContent : \"\"}`;\n\t\tif (text) {\n\t\t\tresult += text;\n\t\t\tif (index < ids.length - 1) {\n\t\t\t\tresult += \" \";\n\t\t\t}\n\t\t}\n\t});\n\n\treturn result;\n};\n\nconst _getAllAssociatedElementsFromDOM = (el: UI5Element): Array<HTMLElement> => {\n\tconst set = new Set<HTMLElement>();\n\t// adding labels with attribute for matching the el.id\n\tconst labelsForAssociated = _getAssociatedLabels(el);\n\tlabelsForAssociated.forEach(itm => {\n\t\tset.add(itm);\n\t});\n\t// adding other elements that id is the same as accessibleNameRef value\n\tconst value = el[\"accessibleNameRef\" as keyof typeof el] as string;\n\tconst ids = value?.split(\" \") ?? [];\n\tids.forEach(id => {\n\t\tconst refEl = _getReferencedElementById(el, id);\n\t\tif (refEl) {\n\t\t\tset.add(refEl);\n\t\t}\n\t});\n\treturn Array.from(set);\n};\n\nconst _getAssociatedLabels = (el: HTMLElement): Array<HTMLElement> => {\n\tconst labels = (el.getRootNode() as HTMLElement).querySelectorAll<HTMLElement>(`[for=\"${el.id}\"]`);\n\treturn Array.from(labels);\n};\n\nconst _getReferencedElementById = (el: HTMLElement, elementId: string): HTMLElement | null => {\n\treturn (el.getRootNode() as HTMLElement).querySelector<HTMLElement>(`[id='${elementId}']`);\n};\n\n/**\n * @param {HTMLElement} el Defines the HTMLElement, for which you need to get all related \"label for\" texts\n */\nconst getAssociatedLabelForTexts = (el: HTMLElement) => {\n\tconst results: Array<string> = [];\n\tconst labels = _getAssociatedLabels(el);\n\n\tlabels.forEach((label: HTMLElement) => {\n\t\tconst labelText = label.textContent;\n\t\tlabelText && results.push(labelText);\n\t});\n\n\tif (results.length) {\n\t\treturn results.join(\" \");\n\t}\n\n\treturn undefined;\n};\n\nconst _createInvalidationCallback = (el: UI5Element) => {\n\tconst invalidationCallback = (changeInfo: ChangeInfo) => {\n\t\tif (!(changeInfo && changeInfo.type === \"property\" && changeInfo.name === \"accessibleNameRef\")) {\n\t\t\treturn;\n\t\t}\n\t\tconst registeredElement = registeredElements.get(el);\n\t\tif (!registeredElement) {\n\t\t\treturn;\n\t\t}\n\t\tconst oldAssociatedElements = registeredElement.observedElements;\n\t\tconst newAssociatedElements = _getAllAssociatedElementsFromDOM(el);\n\t\toldAssociatedElements.forEach(oldElement => {\n\t\t\tif (!newAssociatedElements.includes(oldElement)) {\n\t\t\t\t_removeObservedElementFromRegisteredElement(registeredElement, oldElement);\n\t\t\t}\n\t\t});\n\t\tnewAssociatedElements.forEach(newElement => {\n\t\t\tif (!oldAssociatedElements.includes(newElement)) {\n\t\t\t\t_addObservedElementToRegisteredElement(registeredElement, newElement);\n\t\t\t\tregisteredElement.observedElements.push(newElement);\n\t\t\t}\n\t\t});\n\t\tregisteredElement?.callback();\n\t};\n\treturn invalidationCallback;\n};\n\nconst registerUI5Element = (el: UI5Element, callback: MutationCallback) => {\n\tif (registeredElements.has(el)) {\n\t\treturn;\n\t}\n\tconst allAssociatedElements = _getAllAssociatedElementsFromDOM(el);\n\tconst invalidationCallback = _createInvalidationCallback(el);\n\tconst registeredElement = {\n\t\thost: el,\n\t\tobservedElements: allAssociatedElements,\n\t\tcallback,\n\t\tinvalidationCallback,\n\t};\n\tregisteredElements.set(el, registeredElement);\n\tel.attachInvalidate(invalidationCallback);\n\n\tallAssociatedElements.forEach((element: HTMLElement) => {\n\t\t_addObservedElementToRegisteredElement(registeredElement, element);\n\t});\n\tcallback();\n};\n\nconst _addObservedElementToRegisteredElement = (registeredElement: RegisteredElement, element: HTMLElement) => {\n\tlet associatedElement = associatedElements.get(element);\n\tif (!associatedElement) {\n\t\tassociatedElement = { observer: null, callbacks: [] };\n\t\tconst observer = new MutationObserver(() => {\n\t\t\tconst callbacks = (associatedElement as AssociatedElement).callbacks;\n\t\t\tcallbacks.forEach(callback => {\n\t\t\t\tcallback();\n\t\t\t});\n\t\t\tconst domEl = document.getElementById(element.id);\n\t\t\t// if no longer should be observed from this registeredElement, remove it\n\t\t\tif (!(registeredElement.host.id === element.getAttribute(\"for\") || domEl)) {\n\t\t\t\t_removeObservedElementFromRegisteredElement(registeredElement, element);\n\t\t\t}\n\t\t});\n\t\tassociatedElement.observer = observer;\n\t\tobserver.observe(element, observerOptions);\n\t\tassociatedElements.set(element, associatedElement);\n\t}\n\tif (!associatedElement.callbacks.includes(registeredElement.callback)) {\n\t\tassociatedElement.callbacks.push(registeredElement.callback);\n\t}\n};\n\nconst _removeObservedElementFromRegisteredElement = (registeredElement: RegisteredElement, element: HTMLElement) => {\n\tconst associatedElement = associatedElements.get(element);\n\tif (associatedElement) {\n\t\tassociatedElement.callbacks = associatedElement.callbacks.filter(itm => itm !== registeredElement.callback);\n\t\tif (!associatedElement.callbacks.length) {\n\t\t\tassociatedElement.observer?.disconnect();\n\t\t\tassociatedElements.delete(element);\n\t\t}\n\t}\n\tregisteredElement.observedElements = registeredElement.observedElements.filter(itm => itm !== element);\n};\n\nconst deregisterUI5Element = (el: UI5Element) => {\n\tconst registeredElement = registeredElements.get(el);\n\tif (!registeredElement) {\n\t\treturn;\n\t}\n\tconst oldObservedElements = [...registeredElement.observedElements];\n\toldObservedElements.forEach(observedElement => {\n\t\t_removeObservedElementFromRegisteredElement(registeredElement, observedElement);\n\t});\n\tel.detachInvalidate(registeredElement.invalidationCallback);\n\tregisteredElements.delete(el);\n};\n\nexport {\n\tgetEffectiveAriaLabelText,\n\tgetAssociatedLabelForTexts,\n\tregisterUI5Element,\n\tderegisterUI5Element,\n\tgetAllAccessibleNameRefTexts,\n};\n"],
5
+ "mappings": "aAgBA,MAAMA,EAAqB,IAAI,QACzBC,EAAqB,IAAI,QAOzBC,EAAkB,CACvB,WAAY,GACZ,UAAW,GACX,cAAe,GACf,QAAS,EACV,EAEMC,EAA6BC,GAAoB,CACtD,MAAMC,EAAeD,EAErB,OAAKC,EAAa,kBAQXC,EAA6BF,CAAE,EAPjCC,EAAa,eACTA,EAAa,eAGrB,MAIF,EAMMC,EAAgCF,GAAoB,CACzD,MAAMG,EAAOH,EAAyB,mBAAmB,MAAM,GAAG,GAAK,CAAC,EAClEI,EAAQJ,EAAG,YAAY,EAC7B,IAAIK,EAAS,GAEb,OAAAF,EAAI,QAAQ,CAACG,EAAmBC,IAAkB,CACjD,MAAMC,EAAUJ,EAAM,cAAc,QAAQE,CAAS,IAAI,EACnDG,EAAO,GAAGD,GAAWA,EAAQ,YAAcA,EAAQ,YAAc,EAAE,GACrEC,IACHJ,GAAUI,EACNF,EAAQJ,EAAI,OAAS,IACxBE,GAAU,KAGb,CA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AAU,WAAW,EACvCvC,EAAmB,OAAOY,CAAO,IAGnCgB,EAAkB,iBAAmBA,EAAkB,iBAAiB,OAAOX,GAAOA,IAAQL,CAAO,CACtG,EAEM8B,EAAwBtC,GAAmB,CAChD,MAAMwB,EAAoB3B,EAAmB,IAAIG,CAAE,EACnD,GAAI,CAACwB,EACJ,OAE2B,CAAC,GAAGA,EAAkB,gBAAgB,EAC9C,QAAQe,GAAmB,CAC9CX,EAA4CJ,EAAmBe,CAAe,CAC/E,CAAC,EACDvC,EAAG,iBAAiBwB,EAAkB,oBAAoB,EAC1D3B,EAAmB,OAAOG,CAAE,CAC7B,EAEA,OACCD,KAAA,0BACAmB,KAAA,2BACAa,KAAA,mBACAO,KAAA,qBACApC,KAAA",
6
6
  "names": ["associatedElements", "registeredElements", "observerOptions", "getEffectiveAriaLabelText", "el", "accessibleEl", "getAllAccessibleNameRefTexts", "ids", "owner", "result", "elementId", "index", "element", "text", "_getAllAssociatedElementsFromDOM", "set", "_getAssociatedLabels", "itm", "id", "refEl", "_getReferencedElementById", "labels", "getAssociatedLabelForTexts", "results", "label", "labelText", "_createInvalidationCallback", "changeInfo", "registeredElement", "oldAssociatedElements", "newAssociatedElements", "oldElement", "_removeObservedElementFromRegisteredElement", "newElement", "_addObservedElementToRegisteredElement", "registerUI5Element", "callback", "allAssociatedElements", "invalidationCallback", "associatedElement", "observer", "domEl", "deregisterUI5Element", "observedElement"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";import E from"./isElementTabbable.js";const T=t=>r([...t.children]),b=t=>{const n=r([...t.children]);return n.length?n[n.length-1]:null},r=(t,n)=>{const a=n||[];return t&&t.forEach(l=>{if(l.nodeType===Node.TEXT_NODE||l.nodeType===Node.COMMENT_NODE)return;let e=l;if(!e.hasAttribute("data-sap-no-tab-ref")){if(e.shadowRoot){const s=e.shadowRoot.children;e=Array.from(s).find(o=>o.tagName!=="STYLE")}e&&(E(e)&&a.push(e),e.tagName==="SLOT"?r(e.assignedNodes(),a):r([...e.children],a))}}),a};export{T as getTabbableElements,b as getLastTabbableElement};
1
+ "use strict";import o from"./isElementTabbable.js";const b=t=>a([...t.children]),E=t=>{const n=a([...t.children]);return n.length?n[n.length-1]:null},a=(t,n)=>{const l=n||[];return t&&t.forEach(r=>{if(r.nodeType===Node.TEXT_NODE||r.nodeType===Node.COMMENT_NODE)return;const e=r;if(!e.hasAttribute("data-sap-no-tab-ref"))if(o(e)&&l.push(e),e.tagName==="SLOT")a(e.assignedNodes(),l);else{const s=e.shadowRoot?e.shadowRoot.children:e.children;a([...s],l)}}),l};export{b as getTabbableElements,E as getLastTabbableElement};
2
2
  //# sourceMappingURL=TabbableElements.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/util/TabbableElements.ts"],
4
- "sourcesContent": ["import isElementTabbable from \"./isElementTabbable.js\";\n\n/**\n * Returns the tabbable elements within the provided HTMLElement.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { Array<HTMLElement> } the tabbable elements\n */\nconst getTabbableElements = (el: HTMLElement): Array<HTMLElement> => {\n\treturn getTabbables([...el.children]);\n};\n\n/**\n * Returns the last tabbable element within the provided HTMLElement.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { HTMLElement | null } the last tabbable element or \"null\" if not found\n */\nconst getLastTabbableElement = (el: HTMLElement): HTMLElement | null => {\n\tconst tabbables = getTabbables([...el.children]);\n\treturn tabbables.length ? tabbables[tabbables.length - 1] : null;\n};\n\nconst getTabbables = (nodes: Array<Node>, tabbables?: Array<HTMLElement>): Array<HTMLElement> => {\n\tconst tabbableElements = tabbables || [];\n\n\tif (!nodes) {\n\t\treturn tabbableElements;\n\t}\n\n\tnodes.forEach(currentNode => {\n\t\tif (currentNode.nodeType === Node.TEXT_NODE || currentNode.nodeType === Node.COMMENT_NODE) {\n\t\t\treturn;\n\t\t}\n\n\t\tlet currentElement = currentNode as HTMLElement;\n\t\tif (currentElement.hasAttribute(\"data-sap-no-tab-ref\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (currentElement.shadowRoot) {\n\t\t\t// get the root node of the ShadowDom (1st none style tag)\n\t\t\tconst children = currentElement.shadowRoot.children;\n\t\t\tcurrentElement = Array.from(children).find(node => node.tagName !== \"STYLE\") as HTMLElement;\n\t\t}\n\n\t\tif (!currentElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isElementTabbable(currentElement)) {\n\t\t\ttabbableElements.push(currentElement);\n\t\t}\n\n\t\tif (currentElement.tagName === \"SLOT\") {\n\t\t\tgetTabbables((currentElement as HTMLSlotElement).assignedNodes() as Array<HTMLElement>, tabbableElements);\n\t\t} else {\n\t\t\tgetTabbables([...currentElement.children], tabbableElements);\n\t\t}\n\t});\n\n\treturn tabbableElements;\n};\n\nexport {\n\tgetTabbableElements,\n\tgetLastTabbableElement,\n};\n"],
5
- "mappings": "aAAA,OAAOA,MAAuB,yBAS9B,MAAMC,EAAuBC,GACrBC,EAAa,CAAC,GAAGD,EAAG,QAAQ,CAAC,EAU/BE,EAA0BF,GAAwC,CACvE,MAAMG,EAAYF,EAAa,CAAC,GAAGD,EAAG,QAAQ,CAAC,EAC/C,OAAOG,EAAU,OAASA,EAAUA,EAAU,OAAS,CAAC,EAAI,IAC7D,EAEMF,EAAe,CAACG,EAAoBD,IAAuD,CAChG,MAAME,EAAmBF,GAAa,CAAC,EAEvC,OAAKC,GAILA,EAAM,QAAQE,GAAe,CAC5B,GAAIA,EAAY,WAAa,KAAK,WAAaA,EAAY,WAAa,KAAK,aAC5E,OAGD,IAAIC,EAAiBD,EACrB,GAAI,CAAAC,EAAe,aAAa,qBAAqB,EAIrD,IAAIA,EAAe,WAAY,CAE9B,MAAMC,EAAWD,EAAe,WAAW,SAC3CA,EAAiB,MAAM,KAAKC,CAAQ,EAAE,KAAKC,GAAQA,EAAK,UAAY,OAAO,CAC5E,CAEKF,IAIDT,EAAkBS,CAAc,GACnCF,EAAiB,KAAKE,CAAc,EAGjCA,EAAe,UAAY,OAC9BN,EAAcM,EAAmC,cAAc,EAAyBF,CAAgB,EAExGJ,EAAa,CAAC,GAAGM,EAAe,QAAQ,EAAGF,CAAgB,GAE7D,CAAC,EAEMA,CACR,EAEA,OACCN,KAAA,oBACAG,KAAA",
6
- "names": ["isElementTabbable", "getTabbableElements", "el", "getTabbables", "getLastTabbableElement", "tabbables", "nodes", "tabbableElements", "currentNode", "currentElement", "children", "node"]
4
+ "sourcesContent": ["import isElementTabbable from \"./isElementTabbable.js\";\n\n/**\n * Returns the tabbable elements within the provided HTMLElement.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { Array<HTMLElement> } the tabbable elements\n */\nconst getTabbableElements = (el: HTMLElement): Array<HTMLElement> => {\n\treturn getTabbables([...el.children]);\n};\n\n/**\n * Returns the last tabbable element within the provided HTMLElement.\n *\n * @public\n * @param { HTMLElement } el the component to operate on (component that slots or contains within its shadow root the items the user navigates among)\n * @returns { HTMLElement | null } the last tabbable element or \"null\" if not found\n */\nconst getLastTabbableElement = (el: HTMLElement): HTMLElement | null => {\n\tconst tabbables = getTabbables([...el.children]);\n\treturn tabbables.length ? tabbables[tabbables.length - 1] : null;\n};\n\nconst getTabbables = (nodes: Array<Node>, tabbables?: Array<HTMLElement>): Array<HTMLElement> => {\n\tconst tabbableElements = tabbables || [];\n\n\tif (!nodes) {\n\t\treturn tabbableElements;\n\t}\n\n\tnodes.forEach(currentNode => {\n\t\tif (currentNode.nodeType === Node.TEXT_NODE || currentNode.nodeType === Node.COMMENT_NODE) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentElement = currentNode as HTMLElement;\n\t\tif (currentElement.hasAttribute(\"data-sap-no-tab-ref\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (isElementTabbable(currentElement)) {\n\t\t\ttabbableElements.push(currentElement);\n\t\t}\n\n\t\tif (currentElement.tagName === \"SLOT\") {\n\t\t\tgetTabbables((currentElement as HTMLSlotElement).assignedNodes() as Array<HTMLElement>, tabbableElements);\n\t\t} else {\n\t\t\tconst children = currentElement.shadowRoot ? currentElement.shadowRoot.children : currentElement.children;\n\t\t\tgetTabbables([...children], tabbableElements);\n\t\t}\n\t});\n\n\treturn tabbableElements;\n};\n\nexport {\n\tgetTabbableElements,\n\tgetLastTabbableElement,\n};\n"],
5
+ "mappings": "aAAA,OAAOA,MAAuB,yBAS9B,MAAMC,EAAuBC,GACrBC,EAAa,CAAC,GAAGD,EAAG,QAAQ,CAAC,EAU/BE,EAA0BF,GAAwC,CACvE,MAAMG,EAAYF,EAAa,CAAC,GAAGD,EAAG,QAAQ,CAAC,EAC/C,OAAOG,EAAU,OAASA,EAAUA,EAAU,OAAS,CAAC,EAAI,IAC7D,EAEMF,EAAe,CAACG,EAAoBD,IAAuD,CAChG,MAAME,EAAmBF,GAAa,CAAC,EAEvC,OAAKC,GAILA,EAAM,QAAQE,GAAe,CAC5B,GAAIA,EAAY,WAAa,KAAK,WAAaA,EAAY,WAAa,KAAK,aAC5E,OAGD,MAAMC,EAAiBD,EACvB,GAAI,CAAAC,EAAe,aAAa,qBAAqB,EAQrD,GAJIT,EAAkBS,CAAc,GACnCF,EAAiB,KAAKE,CAAc,EAGjCA,EAAe,UAAY,OAC9BN,EAAcM,EAAmC,cAAc,EAAyBF,CAAgB,MAClG,CACN,MAAMG,EAAWD,EAAe,WAAaA,EAAe,WAAW,SAAWA,EAAe,SACjGN,EAAa,CAAC,GAAGO,CAAQ,EAAGH,CAAgB,CAC7C,CACD,CAAC,EAEMA,CACR,EAEA,OACCN,KAAA,oBACAG,KAAA",
6
+ "names": ["isElementTabbable", "getTabbableElements", "el", "getTabbables", "getLastTabbableElement", "tabbables", "nodes", "tabbableElements", "currentNode", "currentElement", "children"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";let e=null;const u=(o,t)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=null,o()},t)};export default u;
1
+ "use strict";let e=null;const u=(t,o)=>{e&&clearTimeout(e),e=setTimeout(()=>{e=null,t()},o)};export default u;
2
2
  //# sourceMappingURL=debounce.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/util/debounce.ts"],
4
- "sourcesContent": ["import { Timeout } from \"../types.js\";\n\n/**\n * Delays function execution by given threshold.\n * @param fn {Function}\n * @param delay {Integer}\n */\nlet debounceInterval: Timeout | null = null;\n\nconst debounce = (fn: () => void, delay: number) => {\n\tdebounceInterval && clearTimeout(debounceInterval);\n\tdebounceInterval = setTimeout(() => {\n\t\tdebounceInterval = null;\n\t\tfn();\n\t}, delay);\n};\n\nexport default debounce;\n"],
4
+ "sourcesContent": ["import type { Timeout } from \"../types.js\";\n\n/**\n * Delays function execution by given threshold.\n * @param fn {Function}\n * @param delay {Integer}\n */\nlet debounceInterval: Timeout | null = null;\n\nconst debounce = (fn: () => void, delay: number) => {\n\tdebounceInterval && clearTimeout(debounceInterval);\n\tdebounceInterval = setTimeout(() => {\n\t\tdebounceInterval = null;\n\t\tfn();\n\t}, delay);\n};\n\nexport default debounce;\n"],
5
5
  "mappings": "aAOA,IAAIA,EAAmC,KAEvC,MAAMC,EAAW,CAACC,EAAgBC,IAAkB,CACnDH,GAAoB,aAAaA,CAAgB,EACjDA,EAAmB,WAAW,IAAM,CACnCA,EAAmB,KACnBE,EAAG,CACJ,EAAGC,CAAK,CACT,EAEA,eAAeF",
6
6
  "names": ["debounceInterval", "debounce", "fn", "delay"]
7
7
  }
@@ -1,2 +1,2 @@
1
- "use strict";let t=null,n=!1;const r=new Set,a=new Set,d=e=>{!e.dataTransfer||!(e.target instanceof HTMLElement)||(e.dataTransfer.dropEffect="move",e.dataTransfer.effectAllowed="move",a.has(e.target)||(t=e.target))},o=()=>{t=null},l=()=>{t=null},s=e=>{t=e},c=()=>t,m=()=>{n||(document.body.addEventListener("dragstart",d),document.body.addEventListener("dragend",o),document.body.addEventListener("drop",l))},g=()=>{document.body.removeEventListener("dragstart",d),document.body.removeEventListener("dragend",o),document.body.removeEventListener("drop",l),n=!1},E=e=>{r.add(e),n||m()},u=e=>{r.delete(e),r.size===0&&n&&g()},f=e=>(a.add(e),s),i=e=>{a.delete(e)},b={subscribe:E,unsubscribe:u,addSelfManagedArea:f,removeSelfManagedArea:i,getDraggedElement:c};export default b;
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;
2
2
  //# sourceMappingURL=DragRegistry.js.map