@sitecore-feaas/clientside 0.4.3 → 0.4.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-feaas/clientside",
3
- "version": "0.4.3",
3
+ "version": "0.4.4",
4
4
  "scripts": {
5
5
  "start": "webpack serve --open",
6
6
  "build": "rm -rf dist;npm run types; npm run build:esbuild; npm run build:sourcemaps",
@@ -86,6 +86,6 @@
86
86
  "react-dom": "^18.2.0"
87
87
  },
88
88
  "dependencies": {
89
- "@sitecore/byoc": "^0.1.0"
89
+ "@sitecore/byoc": "^0.1.3"
90
90
  }
91
91
  }
@@ -1,4 +1,4 @@
1
- import { beforeEach, describe, it, assert, beforeAll, expect } from 'vitest'
1
+ import { beforeEach, describe, it, assert, beforeAll, expect, afterEach } from 'vitest'
2
2
  import { FEAASElement, ReactPayload } from '../src/headless.js'
3
3
  import { FEAASContextProps, FEAASContext } from '../src/ui/FEAASContext.js'
4
4
  import { JSDOM } from 'jsdom'
@@ -12,6 +12,9 @@ describe('React', function () {
12
12
  document.write('<html><head></head><body></body></html>')
13
13
  document.close()
14
14
  })
15
+ afterEach(() => {
16
+ document.body.innerHTML = ''
17
+ })
15
18
  it('should initiate loading with isolation', async () => {
16
19
  // @ts-ignore
17
20
  const spyLoad = vi.spyOn(FEAASContext.prototype, 'import')
@@ -53,7 +53,7 @@ export declare class FEAASContext extends FEAASElement<FEAASContextProps, typeof
53
53
  clientside: typeof FEAAS;
54
54
  onStatusChange: FEAASContextImports.SDKStatusCallback;
55
55
  whenSDKReady: ControlledPromise<FEAASContextImports.SDK>;
56
- getPortalRoot(): FEAASElement<any, any> | HTMLElement | ShadowRoot;
56
+ getPortalRoot(): HTMLElement | ShadowRoot | FEAASElement<any, any>;
57
57
  render({ children, library }: React.PropsWithChildren<FEAASContextProps>, { AppContext, Chakra: { Button, Tooltip }, React }: typeof this.payload): JSX.Element;
58
58
  }
59
59
  declare global {
@@ -4,7 +4,7 @@ import { FEAASElement } from '../components/FEAASElement.js';
4
4
  export declare function FEAASPickerProps(element: FEAASElement<any, any>): {
5
5
  part: string;
6
6
  slot: string;
7
- mode: "context" | "library" | "element" | "themes" | "datasources" | "versions" | "overview" | "attributes";
7
+ mode: "library" | "context" | "datasources" | "versions" | "element" | "themes" | "overview" | "attributes";
8
8
  dialog: string;
9
9
  placeholder: string;
10
10
  frontend: string;
@@ -22,7 +22,7 @@ export declare class FEAASPicker extends FEAASElement<FEAASPickerProps, typeof F
22
22
  defaultProps: Partial<{
23
23
  part: string;
24
24
  slot: string;
25
- mode: "context" | "library" | "element" | "themes" | "datasources" | "versions" | "overview" | "attributes";
25
+ mode: "library" | "context" | "datasources" | "versions" | "element" | "themes" | "overview" | "attributes";
26
26
  dialog: string;
27
27
  placeholder: string;
28
28
  frontend: string;
@@ -37,7 +37,7 @@ export declare class FEAASPicker extends FEAASElement<FEAASPickerProps, typeof F
37
37
  getProps(): {
38
38
  part: string;
39
39
  slot: string;
40
- mode: "context" | "library" | "element" | "themes" | "datasources" | "versions" | "overview" | "attributes";
40
+ mode: "library" | "context" | "datasources" | "versions" | "element" | "themes" | "overview" | "attributes";
41
41
  dialog: string;
42
42
  placeholder: string;
43
43
  frontend: string;