@genesislcap/foundation-react-utils 14.432.1 → 14.432.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"react-layout-factory.d.ts","sourceRoot":"","sources":["../../src/react-layout-factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAEvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,GAAG,EAAE,EACjC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACjC,KAAK,CAAC,EAAE,CAAC,GACR,gBAAgB,CAUlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EACvD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,EAClC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,EAChE,YAAY,EAAE,EAAE,EAChB,cAAc,CAAC,EAAE,EAAE,GAClB,gBAAgB,CAclB"}
1
+ {"version":3,"file":"react-layout-factory.d.ts","sourceRoot":"","sources":["../../src/react-layout-factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,GAAG,EAAE,EACjC,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACjC,KAAK,CAAC,EAAE,CAAC,GACR,gBAAgB,CAUlB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,GAAG,EAAE,EACvD,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,EAClC,OAAO,EAAE,KAAK,CAAC,aAAa,CAAC,EAAE,GAAG;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,EAChE,YAAY,EAAE,EAAE,EAChB,cAAc,CAAC,EAAE,EAAE,GAClB,gBAAgB,CAclB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-react-utils",
3
3
  "description": "Genesis Foundation React Utils",
4
- "version": "14.432.1",
4
+ "version": "14.432.2",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -29,23 +29,23 @@
29
29
  }
30
30
  },
31
31
  "devDependencies": {
32
- "@genesislcap/foundation-testing": "14.432.1",
33
- "@genesislcap/genx": "14.432.1",
34
- "@genesislcap/rollup-builder": "14.432.1",
35
- "@genesislcap/ts-builder": "14.432.1",
36
- "@genesislcap/uvu-playwright-builder": "14.432.1",
37
- "@genesislcap/vite-builder": "14.432.1",
38
- "@genesislcap/webpack-builder": "14.432.1"
32
+ "@genesislcap/foundation-testing": "14.432.2",
33
+ "@genesislcap/genx": "14.432.2",
34
+ "@genesislcap/rollup-builder": "14.432.2",
35
+ "@genesislcap/ts-builder": "14.432.2",
36
+ "@genesislcap/uvu-playwright-builder": "14.432.2",
37
+ "@genesislcap/vite-builder": "14.432.2",
38
+ "@genesislcap/webpack-builder": "14.432.2"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": "^19.0.0",
42
42
  "react-dom": "^19.0.0"
43
43
  },
44
44
  "dependencies": {
45
- "@genesislcap/foundation-forms": "14.432.1",
46
- "@genesislcap/foundation-layout": "14.432.1",
47
- "@genesislcap/foundation-logger": "14.432.1",
48
- "@genesislcap/web-core": "14.432.1",
45
+ "@genesislcap/foundation-forms": "14.432.2",
46
+ "@genesislcap/foundation-layout": "14.432.2",
47
+ "@genesislcap/foundation-logger": "14.432.2",
48
+ "@genesislcap/web-core": "14.432.2",
49
49
  "@jsonforms/core": "^3.2.1",
50
50
  "@r2wc/react-to-web-component": "^2.0.2"
51
51
  },
@@ -58,5 +58,5 @@
58
58
  "access": "public"
59
59
  },
60
60
  "customElements": "dist/custom-elements.json",
61
- "gitHead": "db069baa1e602aba41b0a8eb54a5d48823b962de"
61
+ "gitHead": "a93cc1972a01671997a744f7ce0477ca5809006d"
62
62
  }
@@ -1,15 +1,14 @@
1
1
  import type { ComponentFactory } from '@genesislcap/foundation-layout';
2
- import { createRoot, Root } from 'react-dom/client';
3
2
  import * as React from 'react';
4
- import type { ComponentType, ReactElement } from 'react';
3
+ import { createRoot, Root } from 'react-dom/client';
5
4
 
6
5
  /**
7
6
  * Creates a factory function for rendering React components in layout items.
8
- *
7
+ *
9
8
  * @param Component - React component to render
10
9
  * @param props - Optional props to pass to the component
11
10
  * @returns ComponentFactory compatible with foundation-layout
12
- *
11
+ *
13
12
  * @example
14
13
  * ```tsx
15
14
  * <foundation-layout-item
@@ -21,12 +20,12 @@ import type { ComponentType, ReactElement } from 'react';
21
20
  */
22
21
  export function reactFactory<P = {}>(
23
22
  Component: React.ComponentType<P>,
24
- props?: P
23
+ props?: P,
25
24
  ): ComponentFactory {
26
25
  return (container: HTMLElement) => {
27
26
  const root: Root = createRoot(container);
28
27
  root.render(<Component {...(props || ({} as P))} />);
29
-
28
+
30
29
  // Return cleanup function
31
30
  return () => {
32
31
  root.unmount();
@@ -36,18 +35,18 @@ export function reactFactory<P = {}>(
36
35
 
37
36
  /**
38
37
  * Creates a factory function that wraps a React component with a provider (e.g., Redux Provider, Context Provider).
39
- *
38
+ *
40
39
  * @param Component - React component to render
41
40
  * @param Wrapper - Wrapper component (e.g., Redux Provider, Context Provider)
42
41
  * @param wrapperProps - Props for the wrapper component
43
42
  * @param componentProps - Optional props for the component
44
43
  * @returns ComponentFactory compatible with foundation-layout
45
- *
44
+ *
46
45
  * @example
47
46
  * ```tsx
48
47
  * import { Provider } from 'react-redux';
49
48
  * import { store } from './store';
50
- *
49
+ *
51
50
  * <foundation-layout-item
52
51
  * registration="my-component"
53
52
  * title="My Component"
@@ -64,20 +63,19 @@ export function reactFactoryWithProvider<CP = {}, WP = {}>(
64
63
  Component: React.ComponentType<CP>,
65
64
  Wrapper: React.ComponentType<WP & { children: React.ReactNode }>,
66
65
  wrapperProps: WP,
67
- componentProps?: CP
66
+ componentProps?: CP,
68
67
  ): ComponentFactory {
69
68
  return (container: HTMLElement) => {
70
69
  const root: Root = createRoot(container);
71
70
  root.render(
72
71
  <Wrapper {...wrapperProps}>
73
72
  <Component {...(componentProps || ({} as CP))} />
74
- </Wrapper>
73
+ </Wrapper>,
75
74
  );
76
-
75
+
77
76
  // Return cleanup function
78
77
  return () => {
79
78
  root.unmount();
80
79
  };
81
80
  };
82
81
  }
83
-