@ui5/webcomponents-base 2.13.0-rc.1 → 2.13.0-rc.3
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.
- package/CHANGELOG.md +29 -0
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/Assets-fetch.d.ts +1 -0
- package/dist/Assets-fetch.js +3 -0
- package/dist/Assets-fetch.js.map +1 -0
- package/dist/Assets-node.d.ts +12 -0
- package/dist/Assets-node.js +14 -0
- package/dist/Assets-node.js.map +1 -0
- package/dist/Assets.d.ts +1 -0
- package/dist/Assets.js +3 -0
- package/dist/Assets.js.map +1 -0
- package/dist/DragAndDrop.d.ts +2 -0
- package/dist/DragAndDrop.js +5 -0
- package/dist/DragAndDrop.js.map +1 -0
- package/dist/UI5Element.js +1 -1
- package/dist/UI5Element.js.map +1 -1
- package/dist/css/MultipleDragGhost.css +17 -0
- package/dist/custom-elements-internal.json +25 -10
- package/dist/custom-elements.json +25 -10
- package/dist/features/F6Navigation.js +4 -9
- package/dist/features/F6Navigation.js.map +1 -1
- package/dist/features/OpenUI5Support.d.ts +3 -0
- package/dist/features/OpenUI5Support.js +10 -1
- package/dist/features/OpenUI5Support.js.map +1 -1
- package/dist/features/patchPopup.d.ts +4 -1
- package/dist/features/patchPopup.js +22 -4
- package/dist/features/patchPopup.js.map +1 -1
- package/dist/generated/VersionInfo.js +3 -3
- package/dist/generated/VersionInfo.js.map +1 -1
- package/dist/generated/css/MultipleDragGhost.css.d.ts +2 -0
- package/dist/generated/css/MultipleDragGhost.css.js +2 -0
- package/dist/generated/css/MultipleDragGhost.css.js.map +1 -0
- package/dist/generated/i18n/i18n-defaults.d.ts +3 -0
- package/dist/generated/i18n/i18n-defaults.js +3 -0
- package/dist/generated/i18n/i18n-defaults.js.map +1 -0
- package/dist/generated/json-imports/i18n-fetch.d.ts +1 -0
- package/dist/generated/json-imports/i18n-fetch.js +2 -0
- package/dist/generated/json-imports/i18n-fetch.js.map +1 -0
- package/dist/generated/json-imports/i18n-node.d.ts +1 -0
- package/dist/generated/json-imports/i18n-node.js +2 -0
- package/dist/generated/json-imports/i18n-node.js.map +1 -0
- package/dist/generated/json-imports/i18n.d.ts +1 -0
- package/dist/generated/json-imports/i18n.js +2 -0
- package/dist/generated/json-imports/i18n.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/jsx-runtime.d.ts +1 -0
- package/dist/jsx-runtime.js.map +1 -1
- package/dist/prod/Assets-fetch.js +2 -0
- package/dist/prod/Assets-fetch.js.map +7 -0
- package/dist/prod/Assets-node.js +2 -0
- package/dist/prod/Assets-node.js.map +7 -0
- package/dist/prod/Assets.js +2 -0
- package/dist/prod/Assets.js.map +7 -0
- package/dist/prod/DragAndDrop.js +2 -0
- package/dist/prod/DragAndDrop.js.map +7 -0
- package/dist/prod/UI5Element.js +1 -1
- package/dist/prod/UI5Element.js.map +2 -2
- package/dist/prod/features/F6Navigation.js +1 -1
- package/dist/prod/features/F6Navigation.js.map +3 -3
- package/dist/prod/features/OpenUI5Support.js +1 -1
- package/dist/prod/features/OpenUI5Support.js.map +3 -3
- package/dist/prod/features/patchPopup.js +1 -1
- package/dist/prod/features/patchPopup.js.map +3 -3
- package/dist/prod/generated/VersionInfo.js +1 -1
- package/dist/prod/generated/VersionInfo.js.map +1 -1
- package/dist/prod/generated/css/MultipleDragGhost.css.js +2 -0
- package/dist/prod/generated/css/MultipleDragGhost.css.js.map +7 -0
- package/dist/prod/generated/i18n/i18n-defaults.js +2 -0
- package/dist/prod/generated/i18n/i18n-defaults.js.map +7 -0
- package/dist/prod/generated/json-imports/i18n-fetch.js +2 -0
- package/dist/prod/generated/json-imports/i18n-fetch.js.map +7 -0
- package/dist/prod/generated/json-imports/i18n-node.js +2 -0
- package/dist/prod/generated/json-imports/i18n-node.js.map +7 -0
- package/dist/prod/generated/json-imports/i18n.js +2 -0
- package/dist/prod/generated/json-imports/i18n.js.map +7 -0
- package/dist/prod/index.js +1 -1
- package/dist/prod/index.js.map +3 -3
- package/dist/prod/jsx-runtime.js.map +2 -2
- package/dist/prod/util/dragAndDrop/DragRegistry.js +1 -1
- package/dist/prod/util/dragAndDrop/DragRegistry.js.map +3 -3
- package/dist/types.d.ts +6 -1
- package/dist/types.js.map +1 -1
- package/dist/util/dragAndDrop/DragRegistry.d.ts +10 -0
- package/dist/util/dragAndDrop/DragRegistry.js +48 -0
- package/dist/util/dragAndDrop/DragRegistry.js.map +1 -1
- package/package-scripts.cjs +11 -2
- package/package.json +3 -3
- package/src/css/MultipleDragGhost.css +17 -0
- package/src/i18n/messagebundle.properties +5 -0
|
@@ -604,16 +604,7 @@
|
|
|
604
604
|
"kind": "javascript-module",
|
|
605
605
|
"path": "dist/features/patchPopup.js",
|
|
606
606
|
"declarations": [],
|
|
607
|
-
"exports": [
|
|
608
|
-
{
|
|
609
|
-
"kind": "js",
|
|
610
|
-
"name": "default",
|
|
611
|
-
"declaration": {
|
|
612
|
-
"name": "patchPopup",
|
|
613
|
-
"module": "dist/features/patchPopup.js"
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
]
|
|
607
|
+
"exports": []
|
|
617
608
|
},
|
|
618
609
|
{
|
|
619
610
|
"kind": "javascript-module",
|
|
@@ -1578,6 +1569,24 @@
|
|
|
1578
1569
|
"declarations": [],
|
|
1579
1570
|
"exports": []
|
|
1580
1571
|
},
|
|
1572
|
+
{
|
|
1573
|
+
"kind": "javascript-module",
|
|
1574
|
+
"path": "dist/Assets-fetch.js",
|
|
1575
|
+
"declarations": [],
|
|
1576
|
+
"exports": []
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
"kind": "javascript-module",
|
|
1580
|
+
"path": "dist/Assets-node.js",
|
|
1581
|
+
"declarations": [],
|
|
1582
|
+
"exports": []
|
|
1583
|
+
},
|
|
1584
|
+
{
|
|
1585
|
+
"kind": "javascript-module",
|
|
1586
|
+
"path": "dist/Assets.js",
|
|
1587
|
+
"declarations": [],
|
|
1588
|
+
"exports": []
|
|
1589
|
+
},
|
|
1581
1590
|
{
|
|
1582
1591
|
"kind": "javascript-module",
|
|
1583
1592
|
"path": "dist/Boot.js",
|
|
@@ -1614,6 +1623,12 @@
|
|
|
1614
1623
|
"declarations": [],
|
|
1615
1624
|
"exports": []
|
|
1616
1625
|
},
|
|
1626
|
+
{
|
|
1627
|
+
"kind": "javascript-module",
|
|
1628
|
+
"path": "dist/DragAndDrop.js",
|
|
1629
|
+
"declarations": [],
|
|
1630
|
+
"exports": []
|
|
1631
|
+
},
|
|
1617
1632
|
{
|
|
1618
1633
|
"kind": "javascript-module",
|
|
1619
1634
|
"path": "dist/EventProvider.js",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { getFeature, registerFeature } from "../FeaturesRegistry.js";
|
|
2
2
|
import { isF6Next, isF6Previous } from "../Keys.js";
|
|
3
|
-
import { instanceOfUI5Element } from "../UI5Element.js";
|
|
4
3
|
import { getFirstFocusableElement } from "../util/FocusableElements.js";
|
|
5
4
|
import getFastNavigationGroups from "../util/getFastNavigationGroups.js";
|
|
6
5
|
import isElementClickable from "../util/isElementClickable.js";
|
|
@@ -28,15 +27,11 @@ class F6Navigation {
|
|
|
28
27
|
document.removeEventListener("keydown", this.keydownHandler);
|
|
29
28
|
}
|
|
30
29
|
async groupElementToFocus(nextElement) {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
if (nextElementDomRef) {
|
|
36
|
-
if (isElementClickable(nextElementDomRef)) {
|
|
37
|
-
return nextElementDomRef;
|
|
30
|
+
if (nextElement) {
|
|
31
|
+
if (isElementClickable(nextElement)) {
|
|
32
|
+
return nextElement;
|
|
38
33
|
}
|
|
39
|
-
const elementToFocus = await getFirstFocusableElement(
|
|
34
|
+
const elementToFocus = await getFirstFocusableElement(nextElement);
|
|
40
35
|
if (elementToFocus) {
|
|
41
36
|
return elementToFocus;
|
|
42
37
|
}
|
|
@@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,WAAW,EAAE,CAAC;YAC1G,OAAO,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;QACrC,CAAC;QAED,IAAI,CAAC,aAAa,GAAG,OAAsB,CAAC;IAC7C,CAAC;IAED,UAAU,CAAC,IAA0B;QACpC,IAAI,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,aAAa,EAAE,CAAC;YACpD,OAAO,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC;IAC3B,CAAC;IAED,OAAO;QACN,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7B,CAAC;IAED,IAAI,gBAAgB;QACnB,OAAO,mBAAmB,CAAC;IAC5B,CAAC;IAED,MAAM,CAAC,IAAI;QACV,MAAM,UAAU,GAAG,iBAAiB,CAAa,YAAY,EAAE,EAAE,CAAC,CAAC;QAEnE,IAAI,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC;YAC1B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;aAAM,IAAI,YAAY,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAAE,CAAC;YAChE,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC/B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;IACF,CAAC;CACD;AAED,eAAe,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAE9C,eAAe,YAAY,CAAC","sourcesContent":["import { getFeature, 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\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"../Runtimes.js\";\nimport getSharedResource from \"../getSharedResource.js\";\nimport type OpenUI5Support from \"./OpenUI5Support.js\";\nimport getParentElement from \"../util/getParentElement.js\";\n\ntype F6Registry = {\n\tinstance?: F6Navigation,\n}\n\nconst currentRuntimeINdex = getCurrentRuntimeIndex();\n\nconst shouldUpdate = (runtimeIndex: number | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(currentRuntimeINdex, runtimeIndex) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nclass 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\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tlet nextElementDomRef = nextElement;\n\n\t\tif (instanceOfUI5Element(nextElement)) {\n\t\t\tnextElementDomRef = nextElement.getDomRef() || nextElement.firstElementChild as HTMLElement;\n\t\t}\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 openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\t\tconst isOpenUI5Detected = openUI5Support && openUI5Support.isOpenUI5Detected();\n\n\t\tif (isOpenUI5Detected) {\n\t\t\tthis.destroy();\n\t\t\treturn;\n\t\t}\n\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\tupdateGroups() {\n\t\tconst container = this.findContainer();\n\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(container);\n\t}\n\n\tfindContainer() {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element = this.deepActive(window.document);\n\n\t\twhile (element && element !== htmlElement) {\n\t\t\tconst closestScopeEl = element.closest<HTMLElement>(\"[data-sap-ui-fastnavgroup-container='true']\");\n\n\t\t\tif (closestScopeEl) {\n\t\t\t\treturn closestScopeEl;\n\t\t\t}\n\n\t\t\telement = getParentElement(element);\n\t\t}\n\n\t\treturn 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 = this.deepActive(root);\n\n\t\twhile (element && element.getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = getParentElement(element);\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\tget _ui5RuntimeIndex() {\n\t\treturn currentRuntimeINdex;\n\t}\n\n\tstatic init() {\n\t\tconst f6Registry = getSharedResource<F6Registry>(\"F6Registry\", {});\n\n\t\tif (!f6Registry.instance) {\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t} else if (shouldUpdate(f6Registry.instance?._ui5RuntimeIndex)) {\n\t\t\tf6Registry.instance?.destroy();\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t}\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"]}
|
|
1
|
+
{"version":3,"file":"F6Navigation.js","sourceRoot":"","sources":["../../src/features/F6Navigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACrE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACpD,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,uBAAuB,MAAM,oCAAoC,CAAC;AACzE,OAAO,kBAAkB,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,gBAA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G,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;aAAM,IAAI,YAAY,CAAC,UAAU,CAAC,QAAQ,EAAE,gBAAgB,CAAC,EAAE,CAAC;YAChE,UAAU,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;YAC/B,UAAU,CAAC,QAAQ,GAAG,IAAI,YAAY,EAAE,CAAC;QAC1C,CAAC;IACF,CAAC;CACD;AAED,eAAe,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;AAE9C,eAAe,YAAY,CAAC","sourcesContent":["import { getFeature, registerFeature } from \"../FeaturesRegistry.js\";\nimport { isF6Next, isF6Previous } from \"../Keys.js\";\nimport { getFirstFocusableElement } from \"../util/FocusableElements.js\";\nimport getFastNavigationGroups from \"../util/getFastNavigationGroups.js\";\nimport isElementClickable from \"../util/isElementClickable.js\";\nimport { getCurrentRuntimeIndex, compareRuntimes } from \"../Runtimes.js\";\nimport getSharedResource from \"../getSharedResource.js\";\nimport type OpenUI5Support from \"./OpenUI5Support.js\";\nimport getParentElement from \"../util/getParentElement.js\";\n\ntype F6Registry = {\n\tinstance?: F6Navigation,\n}\n\nconst currentRuntimeINdex = getCurrentRuntimeIndex();\n\nconst shouldUpdate = (runtimeIndex: number | undefined) => {\n\tif (runtimeIndex === undefined) {\n\t\treturn true;\n\t}\n\treturn compareRuntimes(currentRuntimeINdex, runtimeIndex) === 1; // 1 means the current is newer, 0 means the same, -1 means the resource's runtime is newer\n};\n\nclass 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\tremoveEventListeners() {\n\t\tdocument.removeEventListener(\"keydown\", this.keydownHandler);\n\t}\n\n\tasync groupElementToFocus(nextElement: HTMLElement) {\n\t\tif (nextElement) {\n\t\t\tif (isElementClickable(nextElement)) {\n\t\t\t\treturn nextElement;\n\t\t\t}\n\n\t\t\tconst elementToFocus = await getFirstFocusableElement(nextElement);\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 openUI5Support = getFeature<typeof OpenUI5Support>(\"OpenUI5Support\");\n\t\tconst isOpenUI5Detected = openUI5Support && openUI5Support.isOpenUI5Detected();\n\n\t\tif (isOpenUI5Detected) {\n\t\t\tthis.destroy();\n\t\t\treturn;\n\t\t}\n\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\tupdateGroups() {\n\t\tconst container = this.findContainer();\n\n\t\tthis.setSelectedGroup();\n\t\tthis.groups = getFastNavigationGroups(container);\n\t}\n\n\tfindContainer() {\n\t\tconst htmlElement = window.document.querySelector(\"html\");\n\t\tlet element = this.deepActive(window.document);\n\n\t\twhile (element && element !== htmlElement) {\n\t\t\tconst closestScopeEl = element.closest<HTMLElement>(\"[data-sap-ui-fastnavgroup-container='true']\");\n\n\t\t\tif (closestScopeEl) {\n\t\t\t\treturn closestScopeEl;\n\t\t\t}\n\n\t\t\telement = getParentElement(element);\n\t\t}\n\n\t\treturn 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 = this.deepActive(root);\n\n\t\twhile (element && element.getAttribute(\"data-sap-ui-fastnavgroup\") !== \"true\" && element !== htmlElement) {\n\t\t\telement = getParentElement(element);\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\tget _ui5RuntimeIndex() {\n\t\treturn currentRuntimeINdex;\n\t}\n\n\tstatic init() {\n\t\tconst f6Registry = getSharedResource<F6Registry>(\"F6Registry\", {});\n\n\t\tif (!f6Registry.instance) {\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t} else if (shouldUpdate(f6Registry.instance?._ui5RuntimeIndex)) {\n\t\t\tf6Registry.instance?.destroy();\n\t\t\tf6Registry.instance = new F6Navigation();\n\t\t}\n\t}\n}\n\nregisterFeature(\"F6Navigation\", F6Navigation);\n\nexport default F6Navigation;\n"]}
|
|
@@ -31,5 +31,8 @@ declare class OpenUI5Support {
|
|
|
31
31
|
static _listenForThemeChange(): void;
|
|
32
32
|
static attachListeners(): void;
|
|
33
33
|
static cssVariablesLoaded(): boolean | undefined;
|
|
34
|
+
static addOpenedPopup(popup: object): void;
|
|
35
|
+
static removeOpenedPopup(popup: object): void;
|
|
36
|
+
static getTopmostPopup(): object;
|
|
34
37
|
}
|
|
35
38
|
export default OpenUI5Support;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import patchPatcher from "./patchPatcher.js";
|
|
2
|
-
import patchPopup from "./patchPopup.js";
|
|
2
|
+
import { patchPopup, addOpenedPopup, removeOpenedPopup, getTopmostPopup, } from "./patchPopup.js";
|
|
3
3
|
import { registerFeature } from "../FeaturesRegistry.js";
|
|
4
4
|
import { setTheme } from "../config/Theme.js";
|
|
5
5
|
class OpenUI5Support {
|
|
@@ -140,6 +140,15 @@ class OpenUI5Support {
|
|
|
140
140
|
}
|
|
141
141
|
return !!link.href.match(/\/css(-|_)variables\.css/);
|
|
142
142
|
}
|
|
143
|
+
static addOpenedPopup(popup) {
|
|
144
|
+
addOpenedPopup(popup);
|
|
145
|
+
}
|
|
146
|
+
static removeOpenedPopup(popup) {
|
|
147
|
+
removeOpenedPopup(popup);
|
|
148
|
+
}
|
|
149
|
+
static getTopmostPopup() {
|
|
150
|
+
return getTopmostPopup();
|
|
151
|
+
}
|
|
143
152
|
}
|
|
144
153
|
registerFeature("OpenUI5Support", OpenUI5Support);
|
|
145
154
|
export default OpenUI5Support;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenUI5Support.js","sourceRoot":"","sources":["../../src/features/OpenUI5Support.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAA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ACP,MAAM,IAAI,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,kBAAkB,CAAgB,CAAC;YACtE,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACvC,IAAI,CAAC,kBAAkB,CAAC,GAAG,EAAE;gBAC5B,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;YAC7B,CAAC,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAED,MAAM,CAAC,eAAe;QACrB,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,EAAE,CAAC;YACzC,OAAO;QACR,CAAC;QAED,cAAc,CAAC,qBAAqB,EAAE,CAAC;IACxC,CAAC;IAED,MAAM,CAAC,kBAAkB;QACxB,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,EAAE,CAAC;YACzC,OAAO;QACR,CAAC;QAED,MAAM,IAAI,GAAG,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,0BAA0B,CAAoB,CAAC,CAAC,yCAAyC;QACvJ,IAAI,CAAC,IAAI,EAAE,CAAC;YACX,OAAO,KAAK,CAAC;QACd,CAAC;QAED,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACtD,CAAC;CACD;AAED,eAAe,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAElD,eAAe,cAAc,CAAC","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\tif (!window.sap.ui!.version) {\n\t\t\treturn true; // sap.ui.version will be removed in newer OpenUI5 versions\n\t\t}\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 initPromise?: Promise<void>;\n\n\tstatic init() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tif (!OpenUI5Support.initPromise) {\n\t\t\tOpenUI5Support.initPromise = new Promise<void>(resolve => {\n\t\t\t\twindow.sap.ui.require([\"sap/ui/core/Core\"], async (Core: OpenUI5Core) => {\n\t\t\t\t\tconst callback = () => {\n\t\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\t\tif (OpenUI5Support.isAtLeastVersion116()) { // for versions since 1.116.0 and onward, use the modular core\n\t\t\t\t\t\t\tdeps = [\n\t\t\t\t\t\t\t\t...deps,\n\t\t\t\t\t\t\t\t\"sap/base/i18n/Formatting\",\n\t\t\t\t\t\t\t\t\"sap/base/i18n/Localization\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/ControlBehavior\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/Theming\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/date/CalendarUtils\",\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t\twindow.sap.ui.require(deps, (Popup: OpenUI5Popup, Patcher: OpenUI5Patcher) => {\n\t\t\t\t\t\t\tpatchPatcher(Patcher);\n\t\t\t\t\t\t\tpatchPopup(Popup);\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\t\t\t\tawait Core.ready();\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tCore.attachInit(callback);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn OpenUI5Support.initPromise;\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"]}
|
|
1
|
+
{"version":3,"file":"OpenUI5Support.js","sourceRoot":"","sources":["../../src/features/OpenUI5Support.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EACN,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,GACf,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AA+D9C,MAAM,cAAc;IACnB,MAAM,CAAC,mBAAmB;QACzB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAG,CAAC,OAAO,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,CAAC,2DAA2D;QACzE,CAAC;QACD,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,EAAG,CAAC,OAAiB,CAAC;QACjD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC;QACd,CAAC;QACD,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC;IAC5D,CAAC;IAED,MAAM,CAAC,iBAAiB;QACvB,OAAO,OAAO,MAAM,CAAC,GAAG,EAAE,EAAE,EAAE,OAAO,KAAK,UAAU,CAAC;IACtD,CAAC;IAID,MAAM,CAAC,IAAI;QACV,IAAI,CAAC,cAAc,CAAC,iBAAiB,EAAE,EAAE,CAAC;YACzC,OAAO,OAAO,CAAC,O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,CAAC;QACd,CAAC;QAED,OAAO,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACtD,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,KAAa;QAClC,cAAc,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,iBAAiB,CAAC,KAAa;QACrC,iBAAiB,CAAC,KAAK,CAAC,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,eAAe;QACrB,OAAO,eAAe,EAAE,CAAC;IAC1B,CAAC;CACD;AAED,eAAe,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;AAElD,eAAe,cAAc,CAAC","sourcesContent":["import patchPatcher from \"./patchPatcher.js\";\nimport type { OpenUI5Patcher } from \"./patchPatcher.js\";\nimport {\n\tpatchPopup,\n\taddOpenedPopup,\n\tremoveOpenedPopup,\n\tgetTopmostPopup,\n} 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\tif (!window.sap.ui!.version) {\n\t\t\treturn true; // sap.ui.version will be removed in newer OpenUI5 versions\n\t\t}\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 initPromise?: Promise<void>;\n\n\tstatic init() {\n\t\tif (!OpenUI5Support.isOpenUI5Detected()) {\n\t\t\treturn Promise.resolve();\n\t\t}\n\n\t\tif (!OpenUI5Support.initPromise) {\n\t\t\tOpenUI5Support.initPromise = new Promise<void>(resolve => {\n\t\t\t\twindow.sap.ui.require([\"sap/ui/core/Core\"], async (Core: OpenUI5Core) => {\n\t\t\t\t\tconst callback = () => {\n\t\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\t\tif (OpenUI5Support.isAtLeastVersion116()) { // for versions since 1.116.0 and onward, use the modular core\n\t\t\t\t\t\t\tdeps = [\n\t\t\t\t\t\t\t\t...deps,\n\t\t\t\t\t\t\t\t\"sap/base/i18n/Formatting\",\n\t\t\t\t\t\t\t\t\"sap/base/i18n/Localization\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/ControlBehavior\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/Theming\",\n\t\t\t\t\t\t\t\t\"sap/ui/core/date/CalendarUtils\",\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t\twindow.sap.ui.require(deps, (Popup: OpenUI5Popup, Patcher: OpenUI5Patcher) => {\n\t\t\t\t\t\t\tpatchPatcher(Patcher);\n\t\t\t\t\t\t\tpatchPopup(Popup);\n\t\t\t\t\t\t\tresolve();\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tif (OpenUI5Support.isAtLeastVersion116()) {\n\t\t\t\t\t\tawait Core.ready();\n\t\t\t\t\t\tcallback();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tCore.attachInit(callback);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\treturn OpenUI5Support.initPromise;\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\tstatic addOpenedPopup(popup: object) {\n\t\taddOpenedPopup(popup);\n\t}\n\n\tstatic removeOpenedPopup(popup: object) {\n\t\tremoveOpenedPopup(popup);\n\t}\n\n\tstatic getTopmostPopup() {\n\t\treturn getTopmostPopup();\n\t}\n}\n\nregisterFeature(\"OpenUI5Support\", OpenUI5Support);\n\nexport default OpenUI5Support;\n"]}
|
|
@@ -10,6 +10,9 @@ type OpenUI5Popup = {
|
|
|
10
10
|
onFocusEvent: (e: FocusEvent) => void;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
+
declare const addOpenedPopup: (popup: object) => void;
|
|
14
|
+
declare const removeOpenedPopup: (popup: object) => void;
|
|
15
|
+
declare const getTopmostPopup: () => object;
|
|
13
16
|
declare const patchPopup: (Popup: OpenUI5Popup) => void;
|
|
14
|
-
export
|
|
17
|
+
export { patchPopup, addOpenedPopup, removeOpenedPopup, getTopmostPopup, };
|
|
15
18
|
export type { OpenUI5Popup };
|
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
// OpenUI5's Control.js subset
|
|
2
|
+
import getSharedResource from "../getSharedResource.js";
|
|
3
|
+
// contains all OpenUI5 and Web Component popups that are currently opened
|
|
4
|
+
const AllOpenedPopupsRegistry = getSharedResource("AllOpenedPopupsRegistry", { openedRegistry: [] });
|
|
5
|
+
const addOpenedPopup = (popup) => {
|
|
6
|
+
AllOpenedPopupsRegistry.openedRegistry.push(popup);
|
|
7
|
+
};
|
|
8
|
+
const removeOpenedPopup = (popup) => {
|
|
9
|
+
const index = AllOpenedPopupsRegistry.openedRegistry.indexOf(popup);
|
|
10
|
+
if (index > -1) {
|
|
11
|
+
AllOpenedPopupsRegistry.openedRegistry.splice(index, 1);
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
const getTopmostPopup = () => {
|
|
15
|
+
return AllOpenedPopupsRegistry.openedRegistry[AllOpenedPopupsRegistry.openedRegistry.length - 1];
|
|
16
|
+
};
|
|
1
17
|
const openNativePopover = (domRef) => {
|
|
2
18
|
domRef.setAttribute("popover", "manual");
|
|
3
19
|
domRef.showPopover();
|
|
@@ -32,6 +48,7 @@ const patchOpen = (Popup) => {
|
|
|
32
48
|
}
|
|
33
49
|
}
|
|
34
50
|
}
|
|
51
|
+
addOpenedPopup(this);
|
|
35
52
|
};
|
|
36
53
|
};
|
|
37
54
|
const patchClosed = (Popup) => {
|
|
@@ -43,14 +60,15 @@ const patchClosed = (Popup) => {
|
|
|
43
60
|
if (domRef) {
|
|
44
61
|
closeNativePopover(domRef); // unset the popover attribute and close the native popover, but only if still in DOM
|
|
45
62
|
}
|
|
63
|
+
removeOpenedPopup(this);
|
|
46
64
|
};
|
|
47
65
|
};
|
|
48
66
|
const patchFocusEvent = (Popup) => {
|
|
49
67
|
const origFocusEvent = Popup.prototype.onFocusEvent;
|
|
50
68
|
Popup.prototype.onFocusEvent = function onFocusEvent(e) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (
|
|
69
|
+
// If the popup is the topmost one, we call the original focus event handler from the OpenUI5 Popup,
|
|
70
|
+
// otherwise the focus event is handled by the Web Component Popup.
|
|
71
|
+
if (this === getTopmostPopup()) {
|
|
54
72
|
origFocusEvent.call(this, e);
|
|
55
73
|
}
|
|
56
74
|
};
|
|
@@ -66,5 +84,5 @@ const patchPopup = (Popup) => {
|
|
|
66
84
|
createGlobalStyles(); // Ensures correct popover positioning by OpenUI5 (otherwise 0,0 is the center of the screen)
|
|
67
85
|
patchFocusEvent(Popup); // Popup.prototype.onFocusEvent
|
|
68
86
|
};
|
|
69
|
-
export
|
|
87
|
+
export { patchPopup, addOpenedPopup, removeOpenedPopup, getTopmostPopup, };
|
|
70
88
|
//# sourceMappingURL=patchPopup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patchPopup.js","sourceRoot":"","sources":["../../src/features/patchPopup.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"patchPopup.js","sourceRoot":"","sources":["../../src/features/patchPopup.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAC9B,OAAO,iBAAiB,MAAM,yBAAyB,CAAC;AAiBxD,0EAA0E;AAC1E,MAAM,uBAAuB,GAAG,iBAAiB,CAAoC,yBAAyB,EAAE,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,CAAC;AAExI,MAAM,cAAc,GAAG,CAAC,KAAa,EAAE,EAAE;IACxC,uBAAuB,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpD,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAE,EAAE;IAC3C,MAAM,KAAK,GAAG,uBAAuB,CAAC,cAAc,C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CAAC,MAAM,CAAC,CAAC,CAAC,qFAAqF;QAClH,CAAC;QAED,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACzB,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,eAAe,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC/C,MAAM,cAAc,GAAG,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC;IACpD,KAAK,CAAC,SAAS,CAAC,YAAY,GAAG,SAAS,YAAY,CAAC,CAAa;QACjE,oGAAoG;QACpG,mEAAmE;QACnE,IAAI,IAAI,KAAK,eAAe,EAAE,EAAE,CAAC;YAChC,cAAc,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;QAC9B,CAAC;IACF,CAAC,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,MAAM,UAAU,GAAG,IAAI,aAAa,EAAE,CAAC;IACvC,UAAU,CAAC,WAAW,CAAC,+CAA+C,CAAC,CAAC;IACxE,QAAQ,CAAC,kBAAkB,GAAG,CAAC,GAAG,QAAQ,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;AAC5E,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,KAAmB,EAAE,EAAE;IAC1C,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB;IACzC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,0BAA0B;IAC9C,kBAAkB,EAAE,CAAC,CAAC,6FAA6F;IACnH,eAAe,CAAC,KAAK,CAAC,CAAC,CAAA,+BAA+B;AACvD,CAAC,CAAC;AAEF,OAAO,EACN,UAAU,EACV,cAAc,EACd,iBAAiB,EACjB,eAAe,GACf,CAAC","sourcesContent":["// OpenUI5's Control.js subset\nimport getSharedResource from \"../getSharedResource.js\";\n\ntype Control = {\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: () => Control | HTMLElement | null, // 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\n// contains all OpenUI5 and Web Component popups that are currently opened\nconst AllOpenedPopupsRegistry = getSharedResource<{ openedRegistry: Array<object> }>(\"AllOpenedPopupsRegistry\", { openedRegistry: [] });\n\nconst addOpenedPopup = (popup: object) => {\n\tAllOpenedPopupsRegistry.openedRegistry.push(popup);\n};\n\nconst removeOpenedPopup = (popup: object) => {\n\tconst index = AllOpenedPopupsRegistry.openedRegistry.indexOf(popup);\n\tif (index > -1) {\n\t\tAllOpenedPopupsRegistry.openedRegistry.splice(index, 1);\n\t}\n};\n\nconst getTopmostPopup = () => {\n\treturn AllOpenedPopupsRegistry.openedRegistry[AllOpenedPopupsRegistry.openedRegistry.length - 1];\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 isNativePopoverOpen = (root: Document | ShadowRoot = document): boolean => {\n\tif (root.querySelector(\":popover-open\")) {\n\t\treturn true;\n\t}\n\n\treturn Array.from(root.querySelectorAll(\"*\")).some(element => {\n\t\tconst shadowRoot = element.shadowRoot;\n\t\treturn shadowRoot && isNativePopoverOpen(shadowRoot);\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 = isNativePopoverOpen();\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 instanceof HTMLElement ? element : 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\n\t\taddOpenedPopup(this);\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 instanceof HTMLElement ? element : 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\n\t\tremoveOpenedPopup(this);\n\t};\n};\n\nconst patchFocusEvent = (Popup: OpenUI5Popup) => {\n\tconst origFocusEvent = Popup.prototype.onFocusEvent;\n\tPopup.prototype.onFocusEvent = function onFocusEvent(e: FocusEvent) {\n\t\t// If the popup is the topmost one, we call the original focus event handler from the OpenUI5 Popup,\n\t\t// otherwise the focus event is handled by the Web Component Popup.\n\t\tif (this === getTopmostPopup()) {\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 {\n\tpatchPopup,\n\taddOpenedPopup,\n\tremoveOpenedPopup,\n\tgetTopmostPopup,\n};\n\nexport type { OpenUI5Popup };\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
const VersionInfo = {
|
|
2
|
-
version: "2.13.0-rc.
|
|
2
|
+
version: "2.13.0-rc.3",
|
|
3
3
|
major: 2,
|
|
4
4
|
minor: 13,
|
|
5
5
|
patch: 0,
|
|
6
|
-
suffix: "-rc.
|
|
6
|
+
suffix: "-rc.3",
|
|
7
7
|
isNext: false,
|
|
8
|
-
buildTime:
|
|
8
|
+
buildTime: 1753949477,
|
|
9
9
|
};
|
|
10
10
|
export default VersionInfo;
|
|
11
11
|
//# sourceMappingURL=VersionInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.13.0-rc.
|
|
1
|
+
{"version":3,"file":"VersionInfo.js","sourceRoot":"","sources":["../../src/generated/VersionInfo.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG;IACnB,OAAO,EAAE,aAAa;IACtB,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,OAAO;IACf,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,UAAU;CACrB,CAAC;AACF,eAAe,WAAW,CAAC","sourcesContent":["const VersionInfo = {\n\tversion: \"2.13.0-rc.3\",\n\tmajor: 2,\n\tminor: 13,\n\tpatch: 0,\n\tsuffix: \"-rc.3\",\n\tisNext: false,\n\tbuildTime: 1753949477,\n};\nexport default VersionInfo;"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
declare const _default: ":host{justify-content:center;align-items:center;display:flex;color:var(--sapList_TextColor);background-color:var(--sapList_Background);font-family:\"72override\",var(--sapFontFamily);height:var(--sapElement_LineHeight);border-bottom:var(--sapList_BorderWidth) solid var(--sapList_BorderColor);opacity:.8;position:absolute;padding:0 1rem;top:-1000px;left:-1000px}";
|
|
2
|
+
export default _default;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default `:host{justify-content:center;align-items:center;display:flex;color:var(--sapList_TextColor);background-color:var(--sapList_Background);font-family:"72override",var(--sapFontFamily);height:var(--sapElement_LineHeight);border-bottom:var(--sapList_BorderWidth) solid var(--sapList_BorderColor);opacity:.8;position:absolute;padding:0 1rem;top:-1000px;left:-1000px}`;
|
|
2
|
+
//# sourceMappingURL=MultipleDragGhost.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultipleDragGhost.css.js","sourceRoot":"","sources":["../../../src/generated/css/MultipleDragGhost.css.ts"],"names":[],"mappings":"AAAA,eAAe,0WAA0W,CAAC","sourcesContent":["export default `:host{justify-content:center;align-items:center;display:flex;color:var(--sapList_TextColor);background-color:var(--sapList_Background);font-family:\"72override\",var(--sapFontFamily);height:var(--sapElement_LineHeight);border-bottom:var(--sapList_BorderWidth) solid var(--sapList_BorderColor);opacity:.8;position:absolute;padding:0 1rem;top:-1000px;left:-1000px}`;"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n-defaults.js","sourceRoot":"","sources":["../../../src/generated/i18n/i18n-defaults.ts"],"names":[],"mappings":"AACA,MAAM,uBAAuB,GAAa,EAAC,GAAG,EAAE,yBAAyB,EAAE,WAAW,EAAE,WAAW,EAAC,CAAC;AACrG,OAAO,EAAC,uBAAuB,EAAC,CAAC","sourcesContent":["import type { I18nText } from \"@ui5/webcomponents-base/dist/i18nBundle.js\";\nconst DRAG_DROP_MULTIPLE_TEXT: I18nText = {key: \"DRAG_DROP_MULTIPLE_TEXT\", defaultText: \"{0} items\"};\nexport {DRAG_DROP_MULTIPLE_TEXT};"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n-fetch.js","sourceRoot":"","sources":["../../../src/generated/json-imports/i18n-fetch.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n-node.js","sourceRoot":"","sources":["../../../src/generated/json-imports/i18n-node.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"i18n.js","sourceRoot":"","sources":["../../../src/generated/json-imports/i18n.ts"],"names":[],"mappings":"","sourcesContent":[""]}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from "./config/Fo
|
|
|
8
8
|
import { setDefaultIconCollection, getDefaultIconCollection } from "./config/Icons.js";
|
|
9
9
|
import { RegisteredIconCollection } from "./asset-registries/util/IconCollectionsByTheme.js";
|
|
10
10
|
import getEffectiveIconCollection from "./asset-registries/util/getIconCollectionByTheme.js";
|
|
11
|
+
import { startMultipleDrag } from "./DragAndDrop.js";
|
|
11
12
|
import { getLanguage, setLanguage, getDefaultLanguage, setFetchDefaultLanguage, getFetchDefaultLanguage } from "./config/Language.js";
|
|
12
13
|
import { getNoConflict, setNoConflict } from "./config/NoConflict.js";
|
|
13
14
|
import { getTheme, setTheme, getDefaultTheme } from "./config/Theme.js";
|
|
@@ -37,7 +38,7 @@ import { renderDeferred, renderImmediately, cancelRender, renderFinished } from
|
|
|
37
38
|
import { addCustomCSS, attachThemeLoaded, detachThemeLoaded } from "./Theming.js";
|
|
38
39
|
import UI5Element from "./UI5Element.js";
|
|
39
40
|
export default UI5Element;
|
|
40
|
-
export { scroll, slideDown, slideUp, getAnimationMode, setAnimationMode, getCalendarType, getFirstDayOfWeek, getLegacyDateCalendarCustomizing, setDefaultIconCollection, getDefaultIconCollection, getEffectiveIconCollection, RegisteredIconCollection, getLanguage, setLanguage, getDefaultLanguage, setFetchDefaultLanguage, getFetchDefaultLanguage, getNoConflict, setNoConflict, getTheme, setTheme, getDefaultTheme, customElement, event, property, slot, ItemNavigation, ResizeHandler, ScrollEnablement, applyDirection, attachDirectionChange, detachDirectionChange, getEffectiveDir, attachLanguageChange, detachLanguageChange, URLListValidator, sanitizeHTML, registerI18nLoader, registerLocaleDataLoader, registerThemePropertiesLoader, registerIconLoader, attachBoot, setCustomElementsScopingSuffix, getCustomElementsScopingSuffix, setCustomElementsScopingRules, getCustomElementsScopingRules, getEffectiveScopingSuffixForTag, supportsTouch, isSafari, isChrome, isFirefox, isPhone, isTablet, isDesktop, isCombi, isIOS, isAndroid, EventProvider, I18nBundle, getI18nBundle, registerCustomI18nBundleGetter, MediaRange, renderDeferred, renderImmediately, cancelRender, renderFinished, addCustomCSS, attachThemeLoaded, detachThemeLoaded, UI5Element, };
|
|
41
|
+
export { startMultipleDrag, scroll, slideDown, slideUp, getAnimationMode, setAnimationMode, getCalendarType, getFirstDayOfWeek, getLegacyDateCalendarCustomizing, setDefaultIconCollection, getDefaultIconCollection, getEffectiveIconCollection, RegisteredIconCollection, getLanguage, setLanguage, getDefaultLanguage, setFetchDefaultLanguage, getFetchDefaultLanguage, getNoConflict, setNoConflict, getTheme, setTheme, getDefaultTheme, customElement, event, property, slot, ItemNavigation, ResizeHandler, ScrollEnablement, applyDirection, attachDirectionChange, detachDirectionChange, getEffectiveDir, attachLanguageChange, detachLanguageChange, URLListValidator, sanitizeHTML, registerI18nLoader, registerLocaleDataLoader, registerThemePropertiesLoader, registerIconLoader, attachBoot, setCustomElementsScopingSuffix, getCustomElementsScopingSuffix, setCustomElementsScopingRules, getCustomElementsScopingRules, getEffectiveScopingSuffixForTag, supportsTouch, isSafari, isChrome, isFirefox, isPhone, isTablet, isDesktop, isCombi, isIOS, isAndroid, EventProvider, I18nBundle, getI18nBundle, registerCustomI18nBundleGetter, MediaRange, renderDeferred, renderImmediately, cancelRender, renderFinished, addCustomCSS, attachThemeLoaded, detachThemeLoaded, UI5Element, };
|
|
41
42
|
type TargetedCustomEvent<D, T> = Omit<CustomEvent<D>, "currentTarget"> & {
|
|
42
43
|
currentTarget: T;
|
|
43
44
|
};
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from "./config/Fo
|
|
|
9
9
|
import { setDefaultIconCollection, getDefaultIconCollection, } from "./config/Icons.js";
|
|
10
10
|
import { RegisteredIconCollection } from "./asset-registries/util/IconCollectionsByTheme.js";
|
|
11
11
|
import getEffectiveIconCollection from "./asset-registries/util/getIconCollectionByTheme.js";
|
|
12
|
+
import { startMultipleDrag } from "./DragAndDrop.js";
|
|
12
13
|
import { getLanguage, setLanguage, getDefaultLanguage, setFetchDefaultLanguage, getFetchDefaultLanguage, } from "./config/Language.js";
|
|
13
14
|
import { getNoConflict, setNoConflict } from "./config/NoConflict.js";
|
|
14
15
|
import { getTheme, setTheme, getDefaultTheme, } from "./config/Theme.js";
|
|
@@ -53,6 +54,8 @@ import { addCustomCSS, attachThemeLoaded, detachThemeLoaded } from "./Theming.js
|
|
|
53
54
|
import UI5Element from "./UI5Element.js";
|
|
54
55
|
export default UI5Element;
|
|
55
56
|
export {
|
|
57
|
+
// drag and drop
|
|
58
|
+
startMultipleDrag,
|
|
56
59
|
// animations/
|
|
57
60
|
scroll, slideDown, slideUp,
|
|
58
61
|
// config/
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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N,SAAS,EACT,OAAO;AAEP,UAAU;AACV,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,gCAAgC,EAChC,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,eAAe;AAEf,cAAc;AACd,aAAa,EACb,KAAK,EACL,QAAQ,EACR,IAAI;AAEJ,YAAY;AACZ,cAAc,EACd,aAAa,EACb,gBAAgB;AAEhB,UAAU;AACV,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,oBAAoB;AAEpB,QAAQ;AACR,gBAAgB,EAChB,YAAY;AAEZ,YAAY;AACZ,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,kBAAkB;AAElB,UAAU;AACV,UAAU;AAEV,yBAAyB;AACzB,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B;AAE/B,YAAY;AACZ,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAAQ,EACR,SAAS,EACT,OAAO,EACP,KAAK,EACL,SAAS;AAET,mBAAmB;AACnB,aAAa;AAEb,gBAAgB;AAChB,UAAU,EACV,aAAa,EACb,8BAA8B;AAE9B,gBAAgB;AAChB,UAAU;AAEV,YAAY;AACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,cAAc;AAEd,aAAa;AACb,YAAY,EACZ,iBAAiB,EACjB,iBAAiB;AAEjB,gBAAgB;AAChB,UAAU,GACV,CAAC","sourcesContent":["import type { JSX } from \"./jsx-runtime.d.ts\";\n\n// animations/\nimport scroll from \"./animations/scroll.js\";\nimport slideDown from \"./animations/slideDown.js\";\nimport slideUp from \"./animations/slideUp.js\";\n\n// config/\nimport { getAnimationMode, setAnimationMode } from \"./config/AnimationMode.js\";\nimport { getCalendarType } from \"./config/CalendarType.js\";\nimport { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from \"./config/FormatSettings.js\";\nimport {\n\tsetDefaultIconCollection,\n\tgetDefaultIconCollection,\n} from \"./config/Icons.js\";\nimport { RegisteredIconCollection } from \"./asset-registries/util/IconCollectionsByTheme.js\";\nimport getEffectiveIconCollection from \"./asset-registries/util/getIconCollectionByTheme.js\";\nimport {\n\tgetLanguage,\n\tsetLanguage,\n\tgetDefaultLanguage,\n\tsetFetchDefaultLanguage,\n\tgetFetchDefaultLanguage,\n} from \"./config/Language.js\";\nimport { getNoConflict, setNoConflict } from \"./config/NoConflict.js\";\nimport {\n\tgetTheme,\n\tsetTheme,\n\tgetDefaultTheme,\n} from \"./config/Theme.js\";\n\n// decorators/\nimport customElement from \"./decorators/customElement.js\";\nimport event from \"./decorators/event.js\";\nimport property from \"./decorators/property.js\";\nimport slot from \"./decorators/slot.js\";\n\n// delegate/\nimport ItemNavigation from \"./delegate/ItemNavigation.js\";\nimport ResizeHandler from \"./delegate/ResizeHandler.js\";\nimport ScrollEnablement from \"./delegate/ScrollEnablement.js\";\n\n// locale/\nimport applyDirection from \"./locale/applyDirection.js\";\nimport { attachDirectionChange, detachDirectionChange } from \"./locale/directionChange.js\";\nimport getEffectiveDir from \"./locale/getEffectiveDir.js\";\nimport { attachLanguageChange, detachLanguageChange } from \"./locale/languageChange.js\";\n\n// util/\nimport { URLListValidator, sanitizeHTML } from \"./util/HTMLSanitizer.js\";\n\n// Assets.ts\nimport { registerI18nLoader } from \"./asset-registries/i18n.js\";\nimport { registerLocaleDataLoader } from \"./asset-registries/LocaleData.js\";\nimport { registerThemePropertiesLoader } from \"./asset-registries/Themes.js\";\nimport { registerIconLoader } from \"./asset-registries/Icons.js\";\n\n// Boot.ts\nimport { attachBoot } from \"./Boot.js\";\n\n// CustomElementsScope.ts\nimport {\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tgetEffectiveScopingSuffixForTag,\n} from \"./CustomElementsScope.js\";\n\n// Device.ts\nimport {\n\tsupportsTouch,\n\tisSafari,\n\tisChrome,\n\tisFirefox,\n\tisPhone,\n\tisTablet,\n\tisDesktop,\n\tisCombi,\n\tisIOS,\n\tisAndroid,\n} from \"./Device.js\";\n\n// EventProvider.ts\nimport EventProvider from \"./EventProvider.js\";\n\n// i18nBundle.ts\nimport I18nBundle, { getI18nBundle, registerCustomI18nBundleGetter } from \"./i18nBundle.js\";\n\n// MediaRange.ts\nimport MediaRange from \"./MediaRange.js\";\n\n// Render.ts\nimport {\n\trenderDeferred,\n\trenderImmediately,\n\tcancelRender,\n\trenderFinished,\n} from \"./Render.js\";\n\n// Theming.ts\nimport { addCustomCSS, attachThemeLoaded, detachThemeLoaded } from \"./Theming.js\";\n\n// UI5Element.ts\nimport UI5Element from \"./UI5Element.js\";\n\nexport default UI5Element;\nexport {\n\t// animations/\n\tscroll,\n\tslideDown,\n\tslideUp,\n\n\t// config/\n\tgetAnimationMode,\n\tsetAnimationMode,\n\tgetCalendarType,\n\tgetFirstDayOfWeek,\n\tgetLegacyDateCalendarCustomizing,\n\tsetDefaultIconCollection,\n\tgetDefaultIconCollection,\n\tgetEffectiveIconCollection,\n\tRegisteredIconCollection,\n\tgetLanguage,\n\tsetLanguage,\n\tgetDefaultLanguage,\n\tsetFetchDefaultLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tsetNoConflict,\n\tgetTheme,\n\tsetTheme,\n\tgetDefaultTheme,\n\n\t// decorators/\n\tcustomElement,\n\tevent,\n\tproperty,\n\tslot,\n\n\t// delegate/\n\tItemNavigation,\n\tResizeHandler,\n\tScrollEnablement,\n\n\t// locale/\n\tapplyDirection,\n\tattachDirectionChange,\n\tdetachDirectionChange,\n\tgetEffectiveDir,\n\tattachLanguageChange,\n\tdetachLanguageChange,\n\n\t// util/\n\tURLListValidator,\n\tsanitizeHTML,\n\n\t// Assets.ts\n\tregisterI18nLoader,\n\tregisterLocaleDataLoader,\n\tregisterThemePropertiesLoader,\n\tregisterIconLoader,\n\n\t// Boot.ts\n\tattachBoot,\n\n\t// CustomElementsScope.ts\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tgetEffectiveScopingSuffixForTag,\n\n\t// Device.ts\n\tsupportsTouch,\n\tisSafari,\n\tisChrome,\n\tisFirefox,\n\tisPhone,\n\tisTablet,\n\tisDesktop,\n\tisCombi,\n\tisIOS,\n\tisAndroid,\n\n\t// EventProvider.ts\n\tEventProvider,\n\n\t// i18nBundle.ts\n\tI18nBundle,\n\tgetI18nBundle,\n\tregisterCustomI18nBundleGetter,\n\n\t// MediaRange.ts\n\tMediaRange,\n\n\t// Render.ts\n\trenderDeferred,\n\trenderImmediately,\n\tcancelRender,\n\trenderFinished,\n\n\t// Theming.ts\n\taddCustomCSS,\n\tattachThemeLoaded,\n\tdetachThemeLoaded,\n\n\t// UI5Element.ts\n\tUI5Element,\n};\n\ntype TargetedCustomEvent<D, T> = Omit<CustomEvent<D>, \"currentTarget\"> & { currentTarget: T };\n// export type UI5NativeEvent<T extends keyof HTMLElementTagNameMap, N> = Parameters<JSX.IntrinsicElements[T][N]>[0];\nexport type UI5CustomEvent<T extends UI5Element, N extends keyof T[\"eventDetails\"]> = TargetedCustomEvent<T[\"eventDetails\"][N], T>;\nexport type JsxTemplateResult = JSX.Element | void;\nexport type JsxTemplate = () => JsxTemplateResult;\n\nexport type * from \"./types.d.ts\";\nexport type * from \"./jsx-runtime.d.ts\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc;AACd,OAAO,MAAM,MAAM,wBAAwB,CAAC;AAC5C,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,OA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e,EACf,iBAAiB,EACjB,gCAAgC,EAChC,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,WAAW,EACX,WAAW,EACX,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,aAAa,EACb,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,eAAe;AAEf,cAAc;AACd,aAAa,EACb,KAAK,EACL,QAAQ,EACR,IAAI;AAEJ,YAAY;AACZ,cAAc,EACd,aAAa,EACb,gBAAgB;AAEhB,UAAU;AACV,cAAc,EACd,qBAAqB,EACrB,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,oBAAoB;AAEpB,QAAQ;AACR,gBAAgB,EAChB,YAAY;AAEZ,YAAY;AACZ,kBAAkB,EAClB,wBAAwB,EACxB,6BAA6B,EAC7B,kBAAkB;AAElB,UAAU;AACV,UAAU;AAEV,yBAAyB;AACzB,8BAA8B,EAC9B,8BAA8B,EAC9B,6BAA6B,EAC7B,6BAA6B,EAC7B,+BAA+B;AAE/B,YAAY;AACZ,aAAa,EACb,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,OAAO,EACP,QAAQ,EACR,SAAS,EACT,OAAO,EACP,KAAK,EACL,SAAS;AAET,mBAAmB;AACnB,aAAa;AAEb,gBAAgB;AAChB,UAAU,EACV,aAAa,EACb,8BAA8B;AAE9B,gBAAgB;AAChB,UAAU;AAEV,YAAY;AACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,cAAc;AAEd,aAAa;AACb,YAAY,EACZ,iBAAiB,EACjB,iBAAiB;AAEjB,gBAAgB;AAChB,UAAU,GACV,CAAC","sourcesContent":["import type { JSX } from \"./jsx-runtime.d.ts\";\n\n// animations/\nimport scroll from \"./animations/scroll.js\";\nimport slideDown from \"./animations/slideDown.js\";\nimport slideUp from \"./animations/slideUp.js\";\n\n// config/\nimport { getAnimationMode, setAnimationMode } from \"./config/AnimationMode.js\";\nimport { getCalendarType } from \"./config/CalendarType.js\";\nimport { getFirstDayOfWeek, getLegacyDateCalendarCustomizing } from \"./config/FormatSettings.js\";\nimport {\n\tsetDefaultIconCollection,\n\tgetDefaultIconCollection,\n} from \"./config/Icons.js\";\nimport { RegisteredIconCollection } from \"./asset-registries/util/IconCollectionsByTheme.js\";\nimport getEffectiveIconCollection from \"./asset-registries/util/getIconCollectionByTheme.js\";\nimport { startMultipleDrag } from \"./DragAndDrop.js\";\nimport {\n\tgetLanguage,\n\tsetLanguage,\n\tgetDefaultLanguage,\n\tsetFetchDefaultLanguage,\n\tgetFetchDefaultLanguage,\n} from \"./config/Language.js\";\nimport { getNoConflict, setNoConflict } from \"./config/NoConflict.js\";\nimport {\n\tgetTheme,\n\tsetTheme,\n\tgetDefaultTheme,\n} from \"./config/Theme.js\";\n\n// decorators/\nimport customElement from \"./decorators/customElement.js\";\nimport event from \"./decorators/event.js\";\nimport property from \"./decorators/property.js\";\nimport slot from \"./decorators/slot.js\";\n\n// delegate/\nimport ItemNavigation from \"./delegate/ItemNavigation.js\";\nimport ResizeHandler from \"./delegate/ResizeHandler.js\";\nimport ScrollEnablement from \"./delegate/ScrollEnablement.js\";\n\n// locale/\nimport applyDirection from \"./locale/applyDirection.js\";\nimport { attachDirectionChange, detachDirectionChange } from \"./locale/directionChange.js\";\nimport getEffectiveDir from \"./locale/getEffectiveDir.js\";\nimport { attachLanguageChange, detachLanguageChange } from \"./locale/languageChange.js\";\n\n// util/\nimport { URLListValidator, sanitizeHTML } from \"./util/HTMLSanitizer.js\";\n\n// Assets.ts\nimport { registerI18nLoader } from \"./asset-registries/i18n.js\";\nimport { registerLocaleDataLoader } from \"./asset-registries/LocaleData.js\";\nimport { registerThemePropertiesLoader } from \"./asset-registries/Themes.js\";\nimport { registerIconLoader } from \"./asset-registries/Icons.js\";\n\n// Boot.ts\nimport { attachBoot } from \"./Boot.js\";\n\n// CustomElementsScope.ts\nimport {\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tgetEffectiveScopingSuffixForTag,\n} from \"./CustomElementsScope.js\";\n\n// Device.ts\nimport {\n\tsupportsTouch,\n\tisSafari,\n\tisChrome,\n\tisFirefox,\n\tisPhone,\n\tisTablet,\n\tisDesktop,\n\tisCombi,\n\tisIOS,\n\tisAndroid,\n} from \"./Device.js\";\n\n// EventProvider.ts\nimport EventProvider from \"./EventProvider.js\";\n\n// i18nBundle.ts\nimport I18nBundle, { getI18nBundle, registerCustomI18nBundleGetter } from \"./i18nBundle.js\";\n\n// MediaRange.ts\nimport MediaRange from \"./MediaRange.js\";\n\n// Render.ts\nimport {\n\trenderDeferred,\n\trenderImmediately,\n\tcancelRender,\n\trenderFinished,\n} from \"./Render.js\";\n\n// Theming.ts\nimport { addCustomCSS, attachThemeLoaded, detachThemeLoaded } from \"./Theming.js\";\n\n// UI5Element.ts\nimport UI5Element from \"./UI5Element.js\";\n\nexport default UI5Element;\nexport {\n\t// drag and drop\n\tstartMultipleDrag,\n\n\t// animations/\n\tscroll,\n\tslideDown,\n\tslideUp,\n\n\t// config/\n\tgetAnimationMode,\n\tsetAnimationMode,\n\tgetCalendarType,\n\tgetFirstDayOfWeek,\n\tgetLegacyDateCalendarCustomizing,\n\tsetDefaultIconCollection,\n\tgetDefaultIconCollection,\n\tgetEffectiveIconCollection,\n\tRegisteredIconCollection,\n\tgetLanguage,\n\tsetLanguage,\n\tgetDefaultLanguage,\n\tsetFetchDefaultLanguage,\n\tgetFetchDefaultLanguage,\n\tgetNoConflict,\n\tsetNoConflict,\n\tgetTheme,\n\tsetTheme,\n\tgetDefaultTheme,\n\n\t// decorators/\n\tcustomElement,\n\tevent,\n\tproperty,\n\tslot,\n\n\t// delegate/\n\tItemNavigation,\n\tResizeHandler,\n\tScrollEnablement,\n\n\t// locale/\n\tapplyDirection,\n\tattachDirectionChange,\n\tdetachDirectionChange,\n\tgetEffectiveDir,\n\tattachLanguageChange,\n\tdetachLanguageChange,\n\n\t// util/\n\tURLListValidator,\n\tsanitizeHTML,\n\n\t// Assets.ts\n\tregisterI18nLoader,\n\tregisterLocaleDataLoader,\n\tregisterThemePropertiesLoader,\n\tregisterIconLoader,\n\n\t// Boot.ts\n\tattachBoot,\n\n\t// CustomElementsScope.ts\n\tsetCustomElementsScopingSuffix,\n\tgetCustomElementsScopingSuffix,\n\tsetCustomElementsScopingRules,\n\tgetCustomElementsScopingRules,\n\tgetEffectiveScopingSuffixForTag,\n\n\t// Device.ts\n\tsupportsTouch,\n\tisSafari,\n\tisChrome,\n\tisFirefox,\n\tisPhone,\n\tisTablet,\n\tisDesktop,\n\tisCombi,\n\tisIOS,\n\tisAndroid,\n\n\t// EventProvider.ts\n\tEventProvider,\n\n\t// i18nBundle.ts\n\tI18nBundle,\n\tgetI18nBundle,\n\tregisterCustomI18nBundleGetter,\n\n\t// MediaRange.ts\n\tMediaRange,\n\n\t// Render.ts\n\trenderDeferred,\n\trenderImmediately,\n\tcancelRender,\n\trenderFinished,\n\n\t// Theming.ts\n\taddCustomCSS,\n\tattachThemeLoaded,\n\tdetachThemeLoaded,\n\n\t// UI5Element.ts\n\tUI5Element,\n};\n\ntype TargetedCustomEvent<D, T> = Omit<CustomEvent<D>, \"currentTarget\"> & { currentTarget: T };\n// export type UI5NativeEvent<T extends keyof HTMLElementTagNameMap, N> = Parameters<JSX.IntrinsicElements[T][N]>[0];\nexport type UI5CustomEvent<T extends UI5Element, N extends keyof T[\"eventDetails\"]> = TargetedCustomEvent<T[\"eventDetails\"][N], T>;\nexport type JsxTemplateResult = JSX.Element | void;\nexport type JsxTemplate = () => JsxTemplateResult;\n\nexport type * from \"./types.d.ts\";\nexport type * from \"./jsx-runtime.d.ts\";\n"]}
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ declare namespace JSX {
|
|
|
31
31
|
interface SVGAttributes extends _JSX.SVGAttributes {
|
|
32
32
|
}
|
|
33
33
|
type AriaRole = _JSX.AriaRole;
|
|
34
|
+
type AriaAttributes = _JSX.AriaAttributes;
|
|
34
35
|
type MouseEventHandler<T extends EventTarget> = _JSX.MouseEventHandler<T>;
|
|
35
36
|
type TargetedMouseEvent<Target extends EventTarget> = _JSX.TargetedMouseEvent<Target>;
|
|
36
37
|
type TargetedInputEvent<Target extends EventTarget> = _JSX.TargetedInputEvent<Target>;
|
package/dist/jsx-runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../src/jsx-runtime.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,EAAE,GAAG,IAAI,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAE7G,OAAO,EAAE,OAAO,EAAwB,MAAM,sCAAsC,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"jsx-runtime.js","sourceRoot":"","sources":["../src/jsx-runtime.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAC7C,OAAO,EAAE,GAAG,IAAI,IAAI,EAAE,IAAI,IAAI,KAAK,EAAE,QAAQ,IAAI,SAAS,EAAE,MAAM,0CAA0C,CAAC;AAE7G,OAAO,EAAE,OAAO,EAAwB,MAAM,sCAAsC,CAAC;AAErF,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAyB5C,6DAA6D;AAC7D,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC;AAE1B,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC,EAAE;IACvB,MAAM,KAAK,GAAwB,KAAK,CAAC,KAAK,CAAC;IAC/C,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACjD,IAAI,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;YACpD,uEAAuE;QACxE,CAAC;IACF,CAAC;IACD,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;AACnB,CAAC,CAAC;AAEF,MAAM,UAAU,QAAQ,CAAC,KAA0B,EAAE,OAAa;IACjE,OAAO,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAClC,CAAC;AACD,MAAM,UAAU,GAAG,CAAC,IAAgC,EAAE,KAA0B,EAAE,GAAW;IAC5F,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IAEzC,OAAO,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAe,CAAC;AAC5C,CAAC;AACD,MAAM,UAAU,IAAI,CAAC,IAAgC,EAAE,KAA0B,EAAE,GAAW;IAC7F,MAAM,GAAG,GAAG,UAAU,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC;IAEzC,OAAO,KAAK,CAAC,GAAG,EAAE,KAAK,EAAE,GAAG,CAAe,CAAC;AAC7C,CAAC","sourcesContent":["// eslint-disable-next-line import/extensions\nimport { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from \"./thirdparty/preact/jsxRuntime.module.js\";\nimport type { JSX as _JSX } from \"./thirdparty/preact/jsxRuntime.module.d.ts\";\nimport { options, type VNode as _VNode } from \"./thirdparty/preact/preact.module.js\";\nimport type UI5Element from \"./UI5Element.js\";\nimport { preprocess } from \"./jsx-utils.js\";\nimport { jsxDEV } from \"./jsx-dev-runtime.js\";\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\ndeclare namespace JSX {\n\ttype JSXWithClassObj = { [K in keyof _JSX.IntrinsicElements]: Omit<_JSX.IntrinsicElements[K], \"class\"> & { class?: object | string | undefined } };\n\ttype AllHTMLAttributesWithClassObj<T extends EventTarget> = Omit<_JSX.AllHTMLAttributes<T>, \"class\"> & { class?: object | string | undefined }\n\ttype HTMLAttributesWithClassObj<T extends EventTarget> = Omit<_JSX.HTMLAttributes<T>, \"class\"> & { class?: object | string | undefined }\n export interface IntrinsicElements extends JSXWithClassObj {}\n export type ElementClass = UI5Element;\n\texport interface Element extends VNode<any> {}\n export interface ElementAttributesProperty<T extends EventTarget> {\n\t\t_jsxProps: HTMLAttributes<T>;\n\t}\n\texport interface AllHTMLAttributes<T extends EventTarget> extends AllHTMLAttributesWithClassObj<T> {}\n\texport interface HTMLAttributes<T extends EventTarget> extends HTMLAttributesWithClassObj<T> {}\n\texport interface DOMAttributes<T extends EventTarget> extends _JSX.DOMAttributes<T> {}\n\texport interface SVGAttributes extends _JSX.SVGAttributes {}\n\texport type AriaRole = _JSX.AriaRole;\n\texport type AriaAttributes = _JSX.AriaAttributes;\n\texport type MouseEventHandler<T extends EventTarget> = _JSX.MouseEventHandler<T>;\n\texport type TargetedMouseEvent<Target extends EventTarget> = _JSX.TargetedMouseEvent<Target>;\n\texport type TargetedInputEvent<Target extends EventTarget> = _JSX.TargetedInputEvent<Target>;\n}\n\n// eslint-disable-next-line @typescript-eslint/unbound-method\nconst old = options.vnode;\n\noptions.vnode = vnode => {\n\tconst props: Record<string, any> = vnode.props;\n\tif (props !== null && typeof props === \"object\") {\n\t\tif (props.class && typeof props.class === \"object\") {\n\t\t\t// props.class = classObjToStr(props.class as Record<string, boolean>);\n\t\t}\n\t}\n\told && old(vnode);\n};\n\nexport function Fragment(props: Record<string, any>, context?: any) {\n\treturn _Fragment(props, context);\n}\nexport function jsx(type: string | typeof UI5Element, props: Record<string, any>, key: string): VNode<any> {\n\tconst tag = preprocess(type, props, key);\n\n\treturn _jsx(tag, props, key) as VNode<any>;\n}\nexport function jsxs(type: string | typeof UI5Element, props: Record<string, any>, key: string): VNode<any> {\n\tconst tag = preprocess(type, props, key);\n\n\treturn _jsxs(tag, props, key) as VNode<any>;\n}\nexport { type jsxDEV };\n\nexport type ComponentChild =\n\t| VNode<any>\n\t| object\n\t| string\n\t| number\n\t| bigint\n\t| boolean\n\t| null\n\t| undefined;\nexport type ComponentChildren = ComponentChild[] | ComponentChild;\n\nexport type VNode<T = {}> = Omit<_VNode<T>, \"type\" | \"props\"> & { type: string | typeof UI5Element, props: T & { children: ComponentChildren } };\n\nexport { JSX };\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Assets-node.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * The `Assets-node` entry point is used to import all CLDR, theming, and i18n assets.\n *\n * It serves as an alternative to the `Assets` and `Assets-fetch` modules and supports the\n * `with: { type: 'json' }` import attribute for loading JSON files.\n *\n * This import attribute is required in some environments, such as Node.js with server-side rendering (SSR).\n *\n * Example usage:\n * await import(\"../assets/i18n/messagebundle_bg.json\", { with: { type: 'json' } })\n */\n\n// own base package assets\nimport \"./generated/json-imports/i18n-node.js\";\n"],
|
|
5
|
+
"mappings": "aAaA,MAAO",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|