@genesislcap/foundation-react-utils 14.408.0 → 14.409.0
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/README.md +4 -21
- package/package.json +11 -11
- package/docs/api/foundation-react-utils.md +0 -43
- package/docs/api/foundation-react-utils.reactfactory.md +0 -83
- package/docs/api/foundation-react-utils.reactfactorywithprovider.md +0 -125
- package/docs/api/index.md +0 -30
- package/docs/api-report.md.api.md +0 -20
- package/temp/api-report.md.api.md +0 -20
package/README.md
CHANGED
|
@@ -1,22 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @genesislcap/foundation-react-utils
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Documentation for this package is published on the Genesis docs site:
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
For more detailed information on API and configurations, please refer to the API documentation in the `docs/api` directory (to be generated).
|
|
8
|
-
|
|
9
|
-
## Features
|
|
10
|
-
|
|
11
|
-
This is a new module. Features and utilities will be added as they are developed. This module will include:
|
|
12
|
-
|
|
13
|
-
- React-specific utilities for Genesis applications
|
|
14
|
-
- Helper functions for common React patterns
|
|
15
|
-
- Utilities for improving layout functionality in React applications
|
|
5
|
+
**Docs: [Framework integration](https://docs.genesis.global/docs/develop/client-capabilities/framework-integration/)**
|
|
16
6
|
|
|
17
7
|
## Installation
|
|
18
8
|
|
|
19
|
-
|
|
9
|
+
Add the package to your `package.json` dependencies. After changing dependencies, run `npm run bootstrap` (or your project's equivalent). See [package.json basics](https://learn.genesis.global/secure/web/basics/package-json-basics/) for more information.
|
|
20
10
|
|
|
21
11
|
```json
|
|
22
12
|
{
|
|
@@ -26,12 +16,6 @@ To include `@genesislcap/foundation-react-utils` in your project, add it as a de
|
|
|
26
16
|
}
|
|
27
17
|
```
|
|
28
18
|
|
|
29
|
-
## Usage
|
|
30
|
-
|
|
31
|
-
```typescript
|
|
32
|
-
import { /* utilities will be exported here */ } from '@genesislcap/foundation-react-utils';
|
|
33
|
-
```
|
|
34
|
-
|
|
35
19
|
## License
|
|
36
20
|
|
|
37
21
|
Note: this project provides front-end dependencies and uses licensed components listed in the next section; thus, licenses for those components are required during development. Contact [Genesis Global](https://genesis.global/contact-us/) for more details.
|
|
@@ -39,4 +23,3 @@ Note: this project provides front-end dependencies and uses licensed components
|
|
|
39
23
|
### Licensed components
|
|
40
24
|
|
|
41
25
|
Genesis low-code platform
|
|
42
|
-
|
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.
|
|
4
|
+
"version": "14.409.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -29,21 +29,21 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@genesislcap/foundation-testing": "14.
|
|
33
|
-
"@genesislcap/genx": "14.
|
|
34
|
-
"@genesislcap/rollup-builder": "14.
|
|
35
|
-
"@genesislcap/ts-builder": "14.
|
|
36
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
37
|
-
"@genesislcap/vite-builder": "14.
|
|
38
|
-
"@genesislcap/webpack-builder": "14.
|
|
32
|
+
"@genesislcap/foundation-testing": "14.409.0",
|
|
33
|
+
"@genesislcap/genx": "14.409.0",
|
|
34
|
+
"@genesislcap/rollup-builder": "14.409.0",
|
|
35
|
+
"@genesislcap/ts-builder": "14.409.0",
|
|
36
|
+
"@genesislcap/uvu-playwright-builder": "14.409.0",
|
|
37
|
+
"@genesislcap/vite-builder": "14.409.0",
|
|
38
|
+
"@genesislcap/webpack-builder": "14.409.0"
|
|
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-layout": "14.
|
|
46
|
-
"@genesislcap/foundation-logger": "14.
|
|
45
|
+
"@genesislcap/foundation-layout": "14.409.0",
|
|
46
|
+
"@genesislcap/foundation-logger": "14.409.0"
|
|
47
47
|
},
|
|
48
48
|
"repository": {
|
|
49
49
|
"type": "git",
|
|
@@ -54,5 +54,5 @@
|
|
|
54
54
|
"access": "public"
|
|
55
55
|
},
|
|
56
56
|
"customElements": "dist/custom-elements.json",
|
|
57
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "cbe0459d170f27c35a7de18cec415947aedf4da5"
|
|
58
58
|
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-react-utils](./foundation-react-utils.md)
|
|
4
|
-
|
|
5
|
-
## foundation-react-utils package
|
|
6
|
-
|
|
7
|
-
## Functions
|
|
8
|
-
|
|
9
|
-
<table><thead><tr><th>
|
|
10
|
-
|
|
11
|
-
Function
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</th><th>
|
|
15
|
-
|
|
16
|
-
Description
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</th></tr></thead>
|
|
20
|
-
<tbody><tr><td>
|
|
21
|
-
|
|
22
|
-
[reactFactory(Component, props)](./foundation-react-utils.reactfactory.md)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</td><td>
|
|
26
|
-
|
|
27
|
-
Creates a factory function for rendering React components in layout items.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
</td></tr>
|
|
31
|
-
<tr><td>
|
|
32
|
-
|
|
33
|
-
[reactFactoryWithProvider(Component, Wrapper, wrapperProps, componentProps)](./foundation-react-utils.reactfactorywithprovider.md)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
</td><td>
|
|
37
|
-
|
|
38
|
-
Creates a factory function that wraps a React component with a provider (e.g., Redux Provider, Context Provider).
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
</td></tr>
|
|
42
|
-
</tbody></table>
|
|
43
|
-
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-react-utils](./foundation-react-utils.md) > [reactFactory](./foundation-react-utils.reactfactory.md)
|
|
4
|
-
|
|
5
|
-
## reactFactory() function
|
|
6
|
-
|
|
7
|
-
Creates a factory function for rendering React components in layout items.
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export declare function reactFactory<P = {}>(Component: React.ComponentType<P>, props?: P): ComponentFactory;
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Parameters
|
|
16
|
-
|
|
17
|
-
<table><thead><tr><th>
|
|
18
|
-
|
|
19
|
-
Parameter
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
</th><th>
|
|
23
|
-
|
|
24
|
-
Type
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
</th><th>
|
|
28
|
-
|
|
29
|
-
Description
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
</th></tr></thead>
|
|
33
|
-
<tbody><tr><td>
|
|
34
|
-
|
|
35
|
-
Component
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
</td><td>
|
|
39
|
-
|
|
40
|
-
React.ComponentType<P>
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
</td><td>
|
|
44
|
-
|
|
45
|
-
React component to render
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</td></tr>
|
|
49
|
-
<tr><td>
|
|
50
|
-
|
|
51
|
-
props
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</td><td>
|
|
55
|
-
|
|
56
|
-
P
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</td><td>
|
|
60
|
-
|
|
61
|
-
_(Optional)_ Optional props to pass to the component
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</td></tr>
|
|
65
|
-
</tbody></table>
|
|
66
|
-
|
|
67
|
-
**Returns:**
|
|
68
|
-
|
|
69
|
-
ComponentFactory
|
|
70
|
-
|
|
71
|
-
ComponentFactory compatible with foundation-layout
|
|
72
|
-
|
|
73
|
-
## Example
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
```tsx
|
|
77
|
-
<foundation-layout-item
|
|
78
|
-
registration="my-component"
|
|
79
|
-
title="My Component"
|
|
80
|
-
factory={reactFactory(MyComponent, { someProp: 'value' })}
|
|
81
|
-
/>
|
|
82
|
-
```
|
|
83
|
-
|
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md) > [@genesislcap/foundation-react-utils](./foundation-react-utils.md) > [reactFactoryWithProvider](./foundation-react-utils.reactfactorywithprovider.md)
|
|
4
|
-
|
|
5
|
-
## reactFactoryWithProvider() function
|
|
6
|
-
|
|
7
|
-
Creates a factory function that wraps a React component with a provider (e.g., Redux Provider, Context Provider).
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
export declare function reactFactoryWithProvider<CP = {}, WP = {}>(Component: React.ComponentType<CP>, Wrapper: React.ComponentType<WP & {
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
}>, wrapperProps: WP, componentProps?: CP): ComponentFactory;
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
## Parameters
|
|
18
|
-
|
|
19
|
-
<table><thead><tr><th>
|
|
20
|
-
|
|
21
|
-
Parameter
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</th><th>
|
|
25
|
-
|
|
26
|
-
Type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
</th><th>
|
|
30
|
-
|
|
31
|
-
Description
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
</th></tr></thead>
|
|
35
|
-
<tbody><tr><td>
|
|
36
|
-
|
|
37
|
-
Component
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
</td><td>
|
|
41
|
-
|
|
42
|
-
React.ComponentType<CP>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
</td><td>
|
|
46
|
-
|
|
47
|
-
React component to render
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</td></tr>
|
|
51
|
-
<tr><td>
|
|
52
|
-
|
|
53
|
-
Wrapper
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</td><td>
|
|
57
|
-
|
|
58
|
-
React.ComponentType<WP & { children: React.ReactNode; }>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
</td><td>
|
|
62
|
-
|
|
63
|
-
Wrapper component (e.g., Redux Provider, Context Provider)
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
</td></tr>
|
|
67
|
-
<tr><td>
|
|
68
|
-
|
|
69
|
-
wrapperProps
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</td><td>
|
|
73
|
-
|
|
74
|
-
WP
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
</td><td>
|
|
78
|
-
|
|
79
|
-
Props for the wrapper component
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
</td></tr>
|
|
83
|
-
<tr><td>
|
|
84
|
-
|
|
85
|
-
componentProps
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
</td><td>
|
|
89
|
-
|
|
90
|
-
CP
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
</td><td>
|
|
94
|
-
|
|
95
|
-
_(Optional)_ Optional props for the component
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
</td></tr>
|
|
99
|
-
</tbody></table>
|
|
100
|
-
|
|
101
|
-
**Returns:**
|
|
102
|
-
|
|
103
|
-
ComponentFactory
|
|
104
|
-
|
|
105
|
-
ComponentFactory compatible with foundation-layout
|
|
106
|
-
|
|
107
|
-
## Example
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
```tsx
|
|
111
|
-
import { Provider } from 'react-redux';
|
|
112
|
-
import { store } from './store';
|
|
113
|
-
|
|
114
|
-
<foundation-layout-item
|
|
115
|
-
registration="my-component"
|
|
116
|
-
title="My Component"
|
|
117
|
-
factory={reactFactoryWithProvider(
|
|
118
|
-
MyComponent,
|
|
119
|
-
Provider,
|
|
120
|
-
{ store },
|
|
121
|
-
{ someProp: 'value' }
|
|
122
|
-
)}
|
|
123
|
-
/>
|
|
124
|
-
```
|
|
125
|
-
|
package/docs/api/index.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
-
|
|
3
|
-
[Home](./index.md)
|
|
4
|
-
|
|
5
|
-
## API Reference
|
|
6
|
-
|
|
7
|
-
## Packages
|
|
8
|
-
|
|
9
|
-
<table><thead><tr><th>
|
|
10
|
-
|
|
11
|
-
Package
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
</th><th>
|
|
15
|
-
|
|
16
|
-
Description
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</th></tr></thead>
|
|
20
|
-
<tbody><tr><td>
|
|
21
|
-
|
|
22
|
-
[@genesislcap/foundation-react-utils](./foundation-react-utils.md)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</td><td>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
</td></tr>
|
|
29
|
-
</tbody></table>
|
|
30
|
-
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
## API Report File for "@genesislcap/foundation-react-utils"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import type { ComponentFactory } from '@genesislcap/foundation-layout';
|
|
8
|
-
import * as React_2 from 'react';
|
|
9
|
-
|
|
10
|
-
// @public
|
|
11
|
-
export function reactFactory<P = {}>(Component: React_2.ComponentType<P>, props?: P): ComponentFactory;
|
|
12
|
-
|
|
13
|
-
// @public
|
|
14
|
-
export function reactFactoryWithProvider<CP = {}, WP = {}>(Component: React_2.ComponentType<CP>, Wrapper: React_2.ComponentType<WP & {
|
|
15
|
-
children: React_2.ReactNode;
|
|
16
|
-
}>, wrapperProps: WP, componentProps?: CP): ComponentFactory;
|
|
17
|
-
|
|
18
|
-
// (No @packageDocumentation comment for this package)
|
|
19
|
-
|
|
20
|
-
```
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
## API Report File for "@genesislcap/foundation-react-utils"
|
|
2
|
-
|
|
3
|
-
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
-
|
|
5
|
-
```ts
|
|
6
|
-
|
|
7
|
-
import type { ComponentFactory } from '@genesislcap/foundation-layout';
|
|
8
|
-
import * as React_2 from 'react';
|
|
9
|
-
|
|
10
|
-
// @public
|
|
11
|
-
export function reactFactory<P = {}>(Component: React_2.ComponentType<P>, props?: P): ComponentFactory;
|
|
12
|
-
|
|
13
|
-
// @public
|
|
14
|
-
export function reactFactoryWithProvider<CP = {}, WP = {}>(Component: React_2.ComponentType<CP>, Wrapper: React_2.ComponentType<WP & {
|
|
15
|
-
children: React_2.ReactNode;
|
|
16
|
-
}>, wrapperProps: WP, componentProps?: CP): ComponentFactory;
|
|
17
|
-
|
|
18
|
-
// (No @packageDocumentation comment for this package)
|
|
19
|
-
|
|
20
|
-
```
|