@ui5/webcomponents-base 2.7.0-rc.2 → 2.7.1
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 +19 -0
- package/cypress/specs/{Accessor.cy.ts → Accessor.cy.tsx} +4 -4
- package/cypress/specs/{ConfigurationScript.cy.ts → ConfigurationScript.cy.tsx} +2 -1
- package/cypress/specs/{ConfigurationURL.cy.ts → ConfigurationURL.cy.tsx} +7 -7
- package/cypress/specs/{CustomMount.cy.ts → CustomMount.cy.tsx} +2 -2
- package/cypress/specs/{CustomTheme.cy.ts → CustomTheme.cy.tsx} +2 -2
- package/cypress/specs/{UI5ElementInvalidation.cy.ts → UI5ElementInvalidation.cy.tsx} +55 -10
- package/cypress/specs/{UI5ElementLifecycle.cy.ts → UI5ElementLifecycle.cy.tsx} +4 -4
- package/cypress/specs/{UI5ElementListenForChildPropChanges.cy.ts → UI5ElementListenForChildPropChanges.cy.tsx} +32 -11
- package/cypress/specs/{UI5ElementMetadataExt.cy.ts → UI5ElementMetadataExt.cy.tsx} +3 -3
- package/cypress/specs/{UI5ElementPropertyValidation.cy.ts → UI5ElementPropertyValidation.cy.tsx} +2 -2
- package/cypress/specs/{UI5ElementPropsAndAttrs.cy.ts → UI5ElementPropsAndAttrs.cy.tsx} +8 -8
- package/cypress/specs/{UI5ElementShadowDOM.cy.ts → UI5ElementShadowDOM.cy.tsx} +4 -4
- package/cypress/specs/{UI5ElementSlots.cy.ts → UI5ElementSlots.cy.tsx} +47 -27
- package/cypress/specs/{WithComplexTemplate.cy.ts → WithComplexTemplate.cy.tsx} +2 -2
- package/cypress/tsconfig.json +2 -0
- package/dist/.tsbuildinfobuild +1 -1
- package/dist/custom-elements-internal.json +135 -135
- package/dist/custom-elements.json +135 -135
- package/dist/features/patchPopup.js +10 -1
- package/dist/features/patchPopup.js.map +1 -1
- package/dist/generated/VersionInfo.js +4 -4
- package/dist/generated/VersionInfo.js.map +1 -1
- 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 +2 -2
- package/dist/prod/ssr-dom-shim.js +1 -1
- package/dist/prod/ssr-dom-shim.js.map +3 -3
- package/dist/ssr-dom-shim.js +5 -1
- package/dist/ssr-dom-shim.js.map +1 -1
- package/package.json +3 -3
- /package/cypress/specs/{Boot.cy.ts → Boot.cy.tsx} +0 -0
- /package/cypress/specs/{ConfigurationChange.cy.ts → ConfigurationChange.cy.tsx} +0 -0
- /package/cypress/specs/{EventProvider.cy.ts → EventProvider.cy.tsx} +0 -0
- /package/cypress/specs/{SystemDOMElements.cy.ts → SystemDOMElements.cy.tsx} +0 -0
- /package/cypress/specs/{Theming.cy.ts → Theming.cy.tsx} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/features/patchPopup.ts"],
|
|
4
|
-
"sourcesContent": ["// OpenUI5's Control.js subset\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\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 =
|
|
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,
|
|
6
|
-
"names": ["openNativePopover", "domRef", "closeNativePopover", "patchOpen", "Popup", "origOpen", "args", "topLayerAlreadyInUse", "
|
|
4
|
+
"sourcesContent": ["// OpenUI5's Control.js subset\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\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\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\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,EAAsB,CAACC,EAA8B,WACtDA,EAAK,cAAc,eAAe,EAC9B,GAGD,MAAM,KAAKA,EAAK,iBAAiB,GAAG,CAAC,EAAE,KAAKC,GAAW,CAC7D,MAAMC,EAAaD,EAAQ,WAC3B,OAAOC,GAAcH,EAAoBG,CAAU,CACpD,CAAC,EAGIC,EAAaC,GAAwB,CAC1C,MAAMC,EAAWD,EAAM,UAAU,KACjCA,EAAM,UAAU,KAAO,YAAiBE,EAAa,CACpDD,EAAS,MAAM,KAAMC,CAAI,EACzB,MAAMC,EAAuBR,EAAoB,EAEjD,GADyB,CAAC,UAAW,MAAM,EAAE,SAAS,KAAK,aAAa,CAAC,GACjDQ,EAAsB,CAC7C,MAAMN,EAAU,KAAK,WAAW,EAChC,GAAIA,EAAS,CACZ,MAAMJ,EAASI,aAAmB,YAAcA,EAAUA,GAAS,UAAU,EACzEJ,GACHD,EAAkBC,CAAM,CAE1B,CACD,CACD,CACD,EAEMW,EAAeJ,GAAwB,CAC5C,MAAMK,EAAcL,EAAM,UAAU,QACpCA,EAAM,UAAU,QAAU,YAAoBE,EAAa,CAC1D,MAAML,EAAU,KAAK,WAAW,EAC1BJ,EAASI,aAAmB,YAAcA,EAAUA,GAAS,UAAU,EAC7EQ,EAAY,MAAM,KAAMH,CAAI,EACxBT,GACHC,EAAmBD,CAAM,CAE3B,CACD,EAEMa,EAAmBN,GAAwB,CAChD,MAAMO,EAAiBP,EAAM,UAAU,aACvCA,EAAM,UAAU,aAAe,SAAsBQ,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,EAAcb,GAAwB,CAC3CD,EAAUC,CAAK,EACfI,EAAYJ,CAAK,EACjBW,EAAmB,EACnBL,EAAgBN,CAAK,CACtB,EAEA,eAAea",
|
|
6
|
+
"names": ["openNativePopover", "domRef", "closeNativePopover", "isNativePopoverOpen", "root", "element", "shadowRoot", "patchOpen", "Popup", "origOpen", "args", "topLayerAlreadyInUse", "patchClosed", "_origClosed", "patchFocusEvent", "origFocusEvent", "e", "isTypeFocus", "target", "createGlobalStyles", "stylesheet", "patchPopup"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";const e={version:"2.7.
|
|
1
|
+
"use strict";const e={version:"2.7.1",major:2,minor:7,patch:1,suffix:"",isNext:!1,buildTime:1738925749};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.7.
|
|
5
|
-
"mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,
|
|
4
|
+
"sourcesContent": ["const VersionInfo = {\n\tversion: \"2.7.1\",\n\tmajor: 2,\n\tminor: 7,\n\tpatch: 1,\n\tsuffix: \"\",\n\tisNext: false,\n\tbuildTime: 1738925749,\n};\nexport default VersionInfo;"],
|
|
5
|
+
"mappings": "aAAA,MAAMA,EAAc,CACnB,QAAS,QACT,MAAO,EACP,MAAO,EACP,MAAO,EACP,OAAQ,GACR,OAAQ,GACR,UAAW,UACZ,EACA,eAAeA",
|
|
6
6
|
"names": ["VersionInfo"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";import{HTMLElement as o,Element as s,customElements as l}from"@lit-labs/ssr-dom-shim";globalThis.HTMLElement??=o,globalThis.Element??=s,globalThis.customElements??=l;class
|
|
1
|
+
"use strict";import{HTMLElement as o,Element as s,customElements as l,ElementInternals as i}from"@lit-labs/ssr-dom-shim";globalThis.HTMLElement??=o,globalThis.Element??=s,globalThis.customElements??=l;class n{}globalThis.Node??=n;class r{}globalThis.FileList??=r;const t=new WeakMap;globalThis.Document&&!("adoptedStyleSheets"in Document.prototype)&&Object.defineProperty(Document.prototype,"adoptedStyleSheets",{get(){return t.get(this)||[]},set(e){t.set(this,e)}}),globalThis.ShadowRoot&&!("adoptedStyleSheets"in ShadowRoot.prototype)&&Object.defineProperty(ShadowRoot.prototype,"adoptedStyleSheets",{get(){return t.get(this)||[]},set(e){t.set(this,e)}}),globalThis.CSSStyleSheet&&!("replaceSync"in CSSStyleSheet.prototype)&&Object.defineProperty(CSSStyleSheet.prototype,"replaceSync",{value(e){return this.cssText=e,e}}),globalThis.ResizeObserver=class{observe(){}unobserve(){}disconnect(){}},globalThis.HTMLElement.prototype.showPopover=function(){},globalThis.HTMLElement.prototype.attachInternals=function(){return new i};
|
|
2
2
|
//# sourceMappingURL=ssr-dom-shim.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ssr-dom-shim.ts"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable max-classes-per-file */\nimport { HTMLElement, Element, customElements } from \"@lit-labs/ssr-dom-shim\";\n\nglobalThis.HTMLElement ??= HTMLElement;\nglobalThis.Element ??= Element;\nglobalThis.customElements ??= customElements;\n\nclass NodeShim {}\nglobalThis.Node ??= NodeShim as object as typeof Node;\n\nclass FileListShim {}\nglobalThis.FileList ??= FileListShim as object as typeof FileList;\n\n// ------- JS DOM shims -------\n\n// Polyfill `adoptedStyleSheets` globally for both `Document` and `ShadowRoot`\nconst adoptedSheetsStore = new WeakMap();\n\nif (globalThis.Document && !(\"adoptedStyleSheets\" in Document.prototype)) {\n Object.defineProperty(Document.prototype, \"adoptedStyleSheets\", {\n get() {\n return adoptedSheetsStore.get(this) || [];\n },\n set(sheets: CSSStyleSheet[]) {\n adoptedSheetsStore.set(this, sheets);\n },\n });\n}\n\nif (globalThis.ShadowRoot && !(\"adoptedStyleSheets\" in ShadowRoot.prototype)) {\n Object.defineProperty(ShadowRoot.prototype, \"adoptedStyleSheets\", {\n get() {\n return adoptedSheetsStore.get(this) || [];\n },\n set(sheets: CSSStyleSheet[]) {\n adoptedSheetsStore.set(this, sheets);\n },\n });\n}\n\n// Polyfill CSSStyleSheet to provide `replaceSync`\nif (globalThis.CSSStyleSheet && !(\"replaceSync\" in CSSStyleSheet.prototype)) {\n Object.defineProperty(CSSStyleSheet.prototype, \"replaceSync\", {\n value(cssText: string) {\n this.cssText = cssText;\n return cssText;\n },\n });\n }\n\n// Empty resize observer\nglobalThis.ResizeObserver = class ResizeObserver {\n observe() {\n // do nothing\n }\n unobserve() {\n // do nothing\n }\n disconnect() {\n // do nothing\n }\n};\n\n// empty showPopover method\nglobalThis.HTMLElement.prototype.showPopover = function () {};\n"],
|
|
5
|
-
"mappings": "aACA,OAAS,eAAAA,EAAa,WAAAC,EAAS,kBAAAC,
|
|
6
|
-
"names": ["HTMLElement", "Element", "customElements", "NodeShim", "FileListShim", "adoptedSheetsStore", "sheets", "cssText"]
|
|
4
|
+
"sourcesContent": ["/* eslint-disable max-classes-per-file */\nimport { HTMLElement, Element, customElements, ElementInternals } from \"@lit-labs/ssr-dom-shim\";\n\nglobalThis.HTMLElement ??= HTMLElement;\nglobalThis.Element ??= Element;\nglobalThis.customElements ??= customElements;\n\nclass NodeShim {}\nglobalThis.Node ??= NodeShim as object as typeof Node;\n\nclass FileListShim {}\nglobalThis.FileList ??= FileListShim as object as typeof FileList;\n\n// ------- JS DOM shims -------\n\n// Polyfill `adoptedStyleSheets` globally for both `Document` and `ShadowRoot`\nconst adoptedSheetsStore = new WeakMap();\n\nif (globalThis.Document && !(\"adoptedStyleSheets\" in Document.prototype)) {\n Object.defineProperty(Document.prototype, \"adoptedStyleSheets\", {\n get() {\n return adoptedSheetsStore.get(this) || [];\n },\n set(sheets: CSSStyleSheet[]) {\n adoptedSheetsStore.set(this, sheets);\n },\n });\n}\n\nif (globalThis.ShadowRoot && !(\"adoptedStyleSheets\" in ShadowRoot.prototype)) {\n Object.defineProperty(ShadowRoot.prototype, \"adoptedStyleSheets\", {\n get() {\n return adoptedSheetsStore.get(this) || [];\n },\n set(sheets: CSSStyleSheet[]) {\n adoptedSheetsStore.set(this, sheets);\n },\n });\n}\n\n// Polyfill CSSStyleSheet to provide `replaceSync`\nif (globalThis.CSSStyleSheet && !(\"replaceSync\" in CSSStyleSheet.prototype)) {\n Object.defineProperty(CSSStyleSheet.prototype, \"replaceSync\", {\n value(cssText: string) {\n this.cssText = cssText;\n return cssText;\n },\n });\n }\n\n// Empty resize observer\nglobalThis.ResizeObserver = class ResizeObserver {\n observe() {\n // do nothing\n }\n unobserve() {\n // do nothing\n }\n disconnect() {\n // do nothing\n }\n};\n\n// empty showPopover method\nglobalThis.HTMLElement.prototype.showPopover = function () {};\n\n// ElementInternals\nglobalThis.HTMLElement.prototype.attachInternals = function() {\n return new ElementInternals();\n}"],
|
|
5
|
+
"mappings": "aACA,OAAS,eAAAA,EAAa,WAAAC,EAAS,kBAAAC,EAAgB,oBAAAC,MAAwB,yBAEvE,WAAW,cAAgBH,EAC3B,WAAW,UAAYC,EACvB,WAAW,iBAAmBC,EAE9B,MAAME,CAAS,CAAC,CAChB,WAAW,OAASA,EAEpB,MAAMC,CAAa,CAAC,CACpB,WAAW,WAAaA,EAKxB,MAAMC,EAAqB,IAAI,QAE3B,WAAW,UAAY,EAAE,uBAAwB,SAAS,YAC5D,OAAO,eAAe,SAAS,UAAW,qBAAsB,CAC9D,KAAM,CACJ,OAAOA,EAAmB,IAAI,IAAI,GAAK,CAAC,CAC1C,EACA,IAAIC,EAAyB,CAC3BD,EAAmB,IAAI,KAAMC,CAAM,CACrC,CACF,CAAC,EAGC,WAAW,YAAc,EAAE,uBAAwB,WAAW,YAChE,OAAO,eAAe,WAAW,UAAW,qBAAsB,CAChE,KAAM,CACJ,OAAOD,EAAmB,IAAI,IAAI,GAAK,CAAC,CAC1C,EACA,IAAIC,EAAyB,CAC3BD,EAAmB,IAAI,KAAMC,CAAM,CACrC,CACF,CAAC,EAIC,WAAW,eAAiB,EAAE,gBAAiB,cAAc,YAC7D,OAAO,eAAe,cAAc,UAAW,cAAe,CAC5D,MAAMC,EAAiB,CACrB,YAAK,QAAUA,EACRA,CACT,CACF,CAAC,EAIL,WAAW,eAAiB,KAAqB,CAC7C,SAAU,CAEV,CACA,WAAY,CAEZ,CACA,YAAa,CAEb,CACJ,EAGA,WAAW,YAAY,UAAU,YAAc,UAAY,CAAC,EAG5D,WAAW,YAAY,UAAU,gBAAkB,UAAW,CAC1D,OAAO,IAAIL,CACf",
|
|
6
|
+
"names": ["HTMLElement", "Element", "customElements", "ElementInternals", "NodeShim", "FileListShim", "adoptedSheetsStore", "sheets", "cssText"]
|
|
7
7
|
}
|
package/dist/ssr-dom-shim.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable max-classes-per-file */
|
|
2
|
-
import { HTMLElement, Element, customElements } from "@lit-labs/ssr-dom-shim";
|
|
2
|
+
import { HTMLElement, Element, customElements, ElementInternals } from "@lit-labs/ssr-dom-shim";
|
|
3
3
|
globalThis.HTMLElement ??= HTMLElement;
|
|
4
4
|
globalThis.Element ??= Element;
|
|
5
5
|
globalThis.customElements ??= customElements;
|
|
@@ -55,4 +55,8 @@ globalThis.ResizeObserver = class ResizeObserver {
|
|
|
55
55
|
};
|
|
56
56
|
// empty showPopover method
|
|
57
57
|
globalThis.HTMLElement.prototype.showPopover = function () { };
|
|
58
|
+
// ElementInternals
|
|
59
|
+
globalThis.HTMLElement.prototype.attachInternals = function () {
|
|
60
|
+
return new ElementInternals();
|
|
61
|
+
};
|
|
58
62
|
//# sourceMappingURL=ssr-dom-shim.js.map
|
package/dist/ssr-dom-shim.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssr-dom-shim.js","sourceRoot":"","sources":["../src/ssr-dom-shim.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"ssr-dom-shim.js","sourceRoot":"","sources":["../src/ssr-dom-shim.ts"],"names":[],"mappings":"AAAA,yCAAyC;AACzC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEhG,UAAU,CAAC,WAAW,KAAK,WAAW,CAAC;AACvC,UAAU,CAAC,OAAO,KAAK,OAAO,CAAC;AAC/B,UAAU,CAAC,cAAc,KAAK,cAAc,CAAC;AAE7C,MAAM,QAAQ;CAAG;AACjB,UAAU,CAAC,IAAI,KAAK,QAAiC,CAAC;AAEtD,MAAM,YAAY;CAAG;AACrB,UAAU,CAAC,QAAQ,KAAK,YAAyC,CAAC;AAElE,+BAA+B;AAE/B,8EAA8E;AAC9E,MAAM,kBAAkB,GAAG,IAAI,OAAO,EAAE,CAAC;AAEzC,IAAI,UAAU,CAAC,QAAQ,IAAI,CAAC,CAAC,oBAAoB,IAAI,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC;IACzE,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,SAAS,EAAE,oBAAoB,EAAE;QAC9D,GAAG;YACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5C,CAAC;QACD,GAAG,CAAC,MAAuB;YACzB,kBAAkB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,IAAI,UAAU,CAAC,UAAU,IAAI,CAAC,CAAC,oBAAoB,IAAI,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;IAC7E,MAAM,CAAC,cAAc,CAAC,UAAU,CAAC,SAAS,EAAE,oBAAoB,EAAE;QAChE,GAAG;YACD,OAAO,kBAAkB,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;QAC5C,CAAC;QACD,GAAG,CAAC,MAAuB;YACzB,kBAAkB,CAAC,GAAG,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAED,kDAAkD;AAClD,IAAI,UAAU,CAAC,aAAa,IAAI,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC;IAC1E,MAAM,CAAC,cAAc,CAAC,aAAa,CAAC,SAAS,EAAE,aAAa,EAAE;QAC5D,KAAK,CAAC,OAAe;YACnB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,OAAO,OAAO,CAAC;QACjB,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAEH,wBAAwB;AACxB,UAAU,CAAC,cAAc,GAAG,MAAM,cAAc;IAC5C,OAAO;QACL,aAAa;IACf,CAAC;IACD,SAAS;QACP,aAAa;IACf,CAAC;IACD,UAAU;QACR,aAAa;IACf,CAAC;CACJ,CAAC;AAEF,2BAA2B;AAC3B,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,WAAW,GAAG,cAAa,CAAC,CAAC;AAE9D,oBAAoB;AACpB,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,eAAe,GAAG;IAC/C,OAAO,IAAI,gBAAgB,EAAE,CAAC;AAClC,CAAC,CAAA","sourcesContent":["/* eslint-disable max-classes-per-file */\nimport { HTMLElement, Element, customElements, ElementInternals } from \"@lit-labs/ssr-dom-shim\";\n\nglobalThis.HTMLElement ??= HTMLElement;\nglobalThis.Element ??= Element;\nglobalThis.customElements ??= customElements;\n\nclass NodeShim {}\nglobalThis.Node ??= NodeShim as object as typeof Node;\n\nclass FileListShim {}\nglobalThis.FileList ??= FileListShim as object as typeof FileList;\n\n// ------- JS DOM shims -------\n\n// Polyfill `adoptedStyleSheets` globally for both `Document` and `ShadowRoot`\nconst adoptedSheetsStore = new WeakMap();\n\nif (globalThis.Document && !(\"adoptedStyleSheets\" in Document.prototype)) {\n Object.defineProperty(Document.prototype, \"adoptedStyleSheets\", {\n get() {\n return adoptedSheetsStore.get(this) || [];\n },\n set(sheets: CSSStyleSheet[]) {\n adoptedSheetsStore.set(this, sheets);\n },\n });\n}\n\nif (globalThis.ShadowRoot && !(\"adoptedStyleSheets\" in ShadowRoot.prototype)) {\n Object.defineProperty(ShadowRoot.prototype, \"adoptedStyleSheets\", {\n get() {\n return adoptedSheetsStore.get(this) || [];\n },\n set(sheets: CSSStyleSheet[]) {\n adoptedSheetsStore.set(this, sheets);\n },\n });\n}\n\n// Polyfill CSSStyleSheet to provide `replaceSync`\nif (globalThis.CSSStyleSheet && !(\"replaceSync\" in CSSStyleSheet.prototype)) {\n Object.defineProperty(CSSStyleSheet.prototype, \"replaceSync\", {\n value(cssText: string) {\n this.cssText = cssText;\n return cssText;\n },\n });\n }\n\n// Empty resize observer\nglobalThis.ResizeObserver = class ResizeObserver {\n observe() {\n // do nothing\n }\n unobserve() {\n // do nothing\n }\n disconnect() {\n // do nothing\n }\n};\n\n// empty showPopover method\nglobalThis.HTMLElement.prototype.showPopover = function () {};\n\n// ElementInternals\nglobalThis.HTMLElement.prototype.attachInternals = function() {\n return new ElementInternals();\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ui5/webcomponents-base",
|
|
3
|
-
"version": "2.7.
|
|
3
|
+
"version": "2.7.1",
|
|
4
4
|
"description": "UI5 Web Components: webcomponents.base",
|
|
5
5
|
"author": "SAP SE (https://www.sap.com)",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@openui5/sap.ui.core": "1.120.17",
|
|
60
|
-
"@ui5/webcomponents-tools": "2.7.
|
|
60
|
+
"@ui5/webcomponents-tools": "2.7.1",
|
|
61
61
|
"chromedriver": "^131.0.0",
|
|
62
62
|
"clean-css": "^5.2.2",
|
|
63
63
|
"copy-and-watch": "^0.1.5",
|
|
@@ -68,5 +68,5 @@
|
|
|
68
68
|
"resolve": "^1.20.0",
|
|
69
69
|
"touch": "^3.1.0"
|
|
70
70
|
},
|
|
71
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "ac15553f68d3e22b4a3a70203976dbf1bb916724"
|
|
72
72
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|