@genesislcap/foundation-react-utils 14.354.2-FUI-2341-3.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/README.md +42 -0
- package/api-extractor.json +5 -0
- package/custom-elements-manifest.config.js +14 -0
- package/dist/custom-elements.json +48 -0
- package/dist/dts/index.d.ts +15 -0
- package/dist/dts/index.d.ts.map +1 -0
- package/dist/dts/react-layout-factory.d.ts +49 -0
- package/dist/dts/react-layout-factory.d.ts.map +1 -0
- package/dist/dts/tsdoc-metadata.json +11 -0
- package/dist/esm/index.js +14 -0
- package/dist/esm/react-layout-factory.js +64 -0
- package/dist/foundation-react-utils.api.json +446 -0
- package/dist/foundation-react-utils.d.ts +58 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/docs/api/foundation-react-utils.md +69 -0
- package/docs/api/foundation-react-utils.reactfactory.md +83 -0
- package/docs/api/foundation-react-utils.reactfactorywithprovider.md +125 -0
- package/docs/api/foundation-react-utils.version.md +13 -0
- package/docs/api/index.md +30 -0
- package/docs/api-report.md.api.md +23 -0
- package/license.txt +47 -0
- package/package.json +56 -0
- package/src/index.ts +16 -0
- package/src/react-layout-factory.tsx +83 -0
- package/temp/api-report.md.api.md +23 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
{
|
|
2
|
+
"metadata": {
|
|
3
|
+
"toolPackage": "@microsoft/api-extractor",
|
|
4
|
+
"toolVersion": "7.52.10",
|
|
5
|
+
"schemaVersion": 1011,
|
|
6
|
+
"oldestForwardsCompatibleVersion": 1001,
|
|
7
|
+
"tsdocConfig": {
|
|
8
|
+
"$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json",
|
|
9
|
+
"noStandardTags": true,
|
|
10
|
+
"tagDefinitions": [
|
|
11
|
+
{
|
|
12
|
+
"tagName": "@alpha",
|
|
13
|
+
"syntaxKind": "modifier"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"tagName": "@beta",
|
|
17
|
+
"syntaxKind": "modifier"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"tagName": "@defaultValue",
|
|
21
|
+
"syntaxKind": "block"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"tagName": "@decorator",
|
|
25
|
+
"syntaxKind": "block",
|
|
26
|
+
"allowMultiple": true
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"tagName": "@deprecated",
|
|
30
|
+
"syntaxKind": "block"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"tagName": "@eventProperty",
|
|
34
|
+
"syntaxKind": "modifier"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"tagName": "@example",
|
|
38
|
+
"syntaxKind": "block",
|
|
39
|
+
"allowMultiple": true
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"tagName": "@experimental",
|
|
43
|
+
"syntaxKind": "modifier"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"tagName": "@inheritDoc",
|
|
47
|
+
"syntaxKind": "inline"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"tagName": "@internal",
|
|
51
|
+
"syntaxKind": "modifier"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"tagName": "@label",
|
|
55
|
+
"syntaxKind": "inline"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"tagName": "@link",
|
|
59
|
+
"syntaxKind": "inline",
|
|
60
|
+
"allowMultiple": true
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"tagName": "@override",
|
|
64
|
+
"syntaxKind": "modifier"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"tagName": "@packageDocumentation",
|
|
68
|
+
"syntaxKind": "modifier"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"tagName": "@param",
|
|
72
|
+
"syntaxKind": "block",
|
|
73
|
+
"allowMultiple": true
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"tagName": "@privateRemarks",
|
|
77
|
+
"syntaxKind": "block"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"tagName": "@public",
|
|
81
|
+
"syntaxKind": "modifier"
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
"tagName": "@readonly",
|
|
85
|
+
"syntaxKind": "modifier"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"tagName": "@remarks",
|
|
89
|
+
"syntaxKind": "block"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"tagName": "@returns",
|
|
93
|
+
"syntaxKind": "block"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"tagName": "@sealed",
|
|
97
|
+
"syntaxKind": "modifier"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"tagName": "@see",
|
|
101
|
+
"syntaxKind": "block"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"tagName": "@throws",
|
|
105
|
+
"syntaxKind": "block",
|
|
106
|
+
"allowMultiple": true
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"tagName": "@typeParam",
|
|
110
|
+
"syntaxKind": "block",
|
|
111
|
+
"allowMultiple": true
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"tagName": "@virtual",
|
|
115
|
+
"syntaxKind": "modifier"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
"tagName": "@betaDocumentation",
|
|
119
|
+
"syntaxKind": "modifier"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"tagName": "@internalRemarks",
|
|
123
|
+
"syntaxKind": "block"
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"tagName": "@preapproved",
|
|
127
|
+
"syntaxKind": "modifier"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"supportForTags": {
|
|
131
|
+
"@alpha": true,
|
|
132
|
+
"@beta": true,
|
|
133
|
+
"@defaultValue": true,
|
|
134
|
+
"@decorator": true,
|
|
135
|
+
"@deprecated": true,
|
|
136
|
+
"@eventProperty": true,
|
|
137
|
+
"@example": true,
|
|
138
|
+
"@experimental": true,
|
|
139
|
+
"@inheritDoc": true,
|
|
140
|
+
"@internal": true,
|
|
141
|
+
"@label": true,
|
|
142
|
+
"@link": true,
|
|
143
|
+
"@override": true,
|
|
144
|
+
"@packageDocumentation": true,
|
|
145
|
+
"@param": true,
|
|
146
|
+
"@privateRemarks": true,
|
|
147
|
+
"@public": true,
|
|
148
|
+
"@readonly": true,
|
|
149
|
+
"@remarks": true,
|
|
150
|
+
"@returns": true,
|
|
151
|
+
"@sealed": true,
|
|
152
|
+
"@see": true,
|
|
153
|
+
"@throws": true,
|
|
154
|
+
"@typeParam": true,
|
|
155
|
+
"@virtual": true,
|
|
156
|
+
"@betaDocumentation": true,
|
|
157
|
+
"@internalRemarks": true,
|
|
158
|
+
"@preapproved": true
|
|
159
|
+
},
|
|
160
|
+
"reportUnsupportedHtmlElements": false
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
"kind": "Package",
|
|
164
|
+
"canonicalReference": "@genesislcap/foundation-react-utils!",
|
|
165
|
+
"docComment": "",
|
|
166
|
+
"name": "@genesislcap/foundation-react-utils",
|
|
167
|
+
"preserveMemberOrder": false,
|
|
168
|
+
"members": [
|
|
169
|
+
{
|
|
170
|
+
"kind": "EntryPoint",
|
|
171
|
+
"canonicalReference": "@genesislcap/foundation-react-utils!",
|
|
172
|
+
"name": "",
|
|
173
|
+
"preserveMemberOrder": false,
|
|
174
|
+
"members": [
|
|
175
|
+
{
|
|
176
|
+
"kind": "Function",
|
|
177
|
+
"canonicalReference": "@genesislcap/foundation-react-utils!reactFactory:function(1)",
|
|
178
|
+
"docComment": "/**\n * Creates a factory function for rendering React components in layout items.\n *\n * @param Component - React component to render\n *\n * @param props - Optional props to pass to the component\n *\n * @returns ComponentFactory compatible with foundation-layout\n *\n * @example\n * ```tsx\n * <foundation-layout-item\n * registration=\"my-component\"\n * title=\"My Component\"\n * factory={reactFactory(MyComponent, { someProp: 'value' })}\n * />\n * ```\n *\n */\n",
|
|
179
|
+
"excerptTokens": [
|
|
180
|
+
{
|
|
181
|
+
"kind": "Content",
|
|
182
|
+
"text": "export declare function reactFactory<P = "
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"kind": "Content",
|
|
186
|
+
"text": "{}"
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
"kind": "Content",
|
|
190
|
+
"text": ">(Component: "
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"kind": "Reference",
|
|
194
|
+
"text": "React.ComponentType",
|
|
195
|
+
"canonicalReference": "@types/react!React.ComponentType:type"
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"kind": "Content",
|
|
199
|
+
"text": "<P>"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"kind": "Content",
|
|
203
|
+
"text": ", props?: "
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"kind": "Content",
|
|
207
|
+
"text": "P"
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"kind": "Content",
|
|
211
|
+
"text": "): "
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"kind": "Reference",
|
|
215
|
+
"text": "ComponentFactory",
|
|
216
|
+
"canonicalReference": "@genesislcap/foundation-layout!ComponentFactory:type"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"kind": "Content",
|
|
220
|
+
"text": ";"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
"fileUrlPath": "src/react-layout-factory.tsx",
|
|
224
|
+
"returnTypeTokenRange": {
|
|
225
|
+
"startIndex": 8,
|
|
226
|
+
"endIndex": 9
|
|
227
|
+
},
|
|
228
|
+
"releaseTag": "Public",
|
|
229
|
+
"overloadIndex": 1,
|
|
230
|
+
"parameters": [
|
|
231
|
+
{
|
|
232
|
+
"parameterName": "Component",
|
|
233
|
+
"parameterTypeTokenRange": {
|
|
234
|
+
"startIndex": 3,
|
|
235
|
+
"endIndex": 5
|
|
236
|
+
},
|
|
237
|
+
"isOptional": false
|
|
238
|
+
},
|
|
239
|
+
{
|
|
240
|
+
"parameterName": "props",
|
|
241
|
+
"parameterTypeTokenRange": {
|
|
242
|
+
"startIndex": 6,
|
|
243
|
+
"endIndex": 7
|
|
244
|
+
},
|
|
245
|
+
"isOptional": true
|
|
246
|
+
}
|
|
247
|
+
],
|
|
248
|
+
"typeParameters": [
|
|
249
|
+
{
|
|
250
|
+
"typeParameterName": "P",
|
|
251
|
+
"constraintTokenRange": {
|
|
252
|
+
"startIndex": 0,
|
|
253
|
+
"endIndex": 0
|
|
254
|
+
},
|
|
255
|
+
"defaultTypeTokenRange": {
|
|
256
|
+
"startIndex": 1,
|
|
257
|
+
"endIndex": 2
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
],
|
|
261
|
+
"name": "reactFactory"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"kind": "Function",
|
|
265
|
+
"canonicalReference": "@genesislcap/foundation-react-utils!reactFactoryWithProvider:function(1)",
|
|
266
|
+
"docComment": "/**\n * Creates a factory function that wraps a React component with a provider (e.g., Redux Provider, Context Provider).\n *\n * @param Component - React component to render\n *\n * @param Wrapper - Wrapper component (e.g., Redux Provider, Context Provider)\n *\n * @param wrapperProps - Props for the wrapper component\n *\n * @param componentProps - Optional props for the component\n *\n * @returns ComponentFactory compatible with foundation-layout\n *\n * @example\n * ```tsx\n * import { Provider } from 'react-redux';\n * import { store } from './store';\n *\n * <foundation-layout-item\n * registration=\"my-component\"\n * title=\"My Component\"\n * factory={reactFactoryWithProvider(\n * MyComponent,\n * Provider,\n * { store },\n * { someProp: 'value' }\n * )}\n * />\n * ```\n *\n */\n",
|
|
267
|
+
"excerptTokens": [
|
|
268
|
+
{
|
|
269
|
+
"kind": "Content",
|
|
270
|
+
"text": "export declare function reactFactoryWithProvider<CP = "
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"kind": "Content",
|
|
274
|
+
"text": "{}"
|
|
275
|
+
},
|
|
276
|
+
{
|
|
277
|
+
"kind": "Content",
|
|
278
|
+
"text": ", WP = "
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
"kind": "Content",
|
|
282
|
+
"text": "{}"
|
|
283
|
+
},
|
|
284
|
+
{
|
|
285
|
+
"kind": "Content",
|
|
286
|
+
"text": ">(Component: "
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"kind": "Reference",
|
|
290
|
+
"text": "React.ComponentType",
|
|
291
|
+
"canonicalReference": "@types/react!React.ComponentType:type"
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
"kind": "Content",
|
|
295
|
+
"text": "<CP>"
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
"kind": "Content",
|
|
299
|
+
"text": ", Wrapper: "
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
"kind": "Reference",
|
|
303
|
+
"text": "React.ComponentType",
|
|
304
|
+
"canonicalReference": "@types/react!React.ComponentType:type"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"kind": "Content",
|
|
308
|
+
"text": "<WP & {\n children: "
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"kind": "Reference",
|
|
312
|
+
"text": "React.ReactNode",
|
|
313
|
+
"canonicalReference": "@types/react!React.ReactNode:type"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
"kind": "Content",
|
|
317
|
+
"text": ";\n}>"
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"kind": "Content",
|
|
321
|
+
"text": ", wrapperProps: "
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"kind": "Content",
|
|
325
|
+
"text": "WP"
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"kind": "Content",
|
|
329
|
+
"text": ", componentProps?: "
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"kind": "Content",
|
|
333
|
+
"text": "CP"
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"kind": "Content",
|
|
337
|
+
"text": "): "
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"kind": "Reference",
|
|
341
|
+
"text": "ComponentFactory",
|
|
342
|
+
"canonicalReference": "@genesislcap/foundation-layout!ComponentFactory:type"
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"kind": "Content",
|
|
346
|
+
"text": ";"
|
|
347
|
+
}
|
|
348
|
+
],
|
|
349
|
+
"fileUrlPath": "src/react-layout-factory.tsx",
|
|
350
|
+
"returnTypeTokenRange": {
|
|
351
|
+
"startIndex": 17,
|
|
352
|
+
"endIndex": 18
|
|
353
|
+
},
|
|
354
|
+
"releaseTag": "Public",
|
|
355
|
+
"overloadIndex": 1,
|
|
356
|
+
"parameters": [
|
|
357
|
+
{
|
|
358
|
+
"parameterName": "Component",
|
|
359
|
+
"parameterTypeTokenRange": {
|
|
360
|
+
"startIndex": 5,
|
|
361
|
+
"endIndex": 7
|
|
362
|
+
},
|
|
363
|
+
"isOptional": false
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"parameterName": "Wrapper",
|
|
367
|
+
"parameterTypeTokenRange": {
|
|
368
|
+
"startIndex": 8,
|
|
369
|
+
"endIndex": 12
|
|
370
|
+
},
|
|
371
|
+
"isOptional": false
|
|
372
|
+
},
|
|
373
|
+
{
|
|
374
|
+
"parameterName": "wrapperProps",
|
|
375
|
+
"parameterTypeTokenRange": {
|
|
376
|
+
"startIndex": 13,
|
|
377
|
+
"endIndex": 14
|
|
378
|
+
},
|
|
379
|
+
"isOptional": false
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
"parameterName": "componentProps",
|
|
383
|
+
"parameterTypeTokenRange": {
|
|
384
|
+
"startIndex": 15,
|
|
385
|
+
"endIndex": 16
|
|
386
|
+
},
|
|
387
|
+
"isOptional": true
|
|
388
|
+
}
|
|
389
|
+
],
|
|
390
|
+
"typeParameters": [
|
|
391
|
+
{
|
|
392
|
+
"typeParameterName": "CP",
|
|
393
|
+
"constraintTokenRange": {
|
|
394
|
+
"startIndex": 0,
|
|
395
|
+
"endIndex": 0
|
|
396
|
+
},
|
|
397
|
+
"defaultTypeTokenRange": {
|
|
398
|
+
"startIndex": 1,
|
|
399
|
+
"endIndex": 2
|
|
400
|
+
}
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"typeParameterName": "WP",
|
|
404
|
+
"constraintTokenRange": {
|
|
405
|
+
"startIndex": 0,
|
|
406
|
+
"endIndex": 0
|
|
407
|
+
},
|
|
408
|
+
"defaultTypeTokenRange": {
|
|
409
|
+
"startIndex": 3,
|
|
410
|
+
"endIndex": 4
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
],
|
|
414
|
+
"name": "reactFactoryWithProvider"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"kind": "Variable",
|
|
418
|
+
"canonicalReference": "@genesislcap/foundation-react-utils!VERSION:var",
|
|
419
|
+
"docComment": "/**\n * Package version\n *\n * @public\n */\n",
|
|
420
|
+
"excerptTokens": [
|
|
421
|
+
{
|
|
422
|
+
"kind": "Content",
|
|
423
|
+
"text": "VERSION = "
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
"kind": "Content",
|
|
427
|
+
"text": "\"14.354.2\""
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"fileUrlPath": "src/index.ts",
|
|
431
|
+
"initializerTokenRange": {
|
|
432
|
+
"startIndex": 1,
|
|
433
|
+
"endIndex": 2
|
|
434
|
+
},
|
|
435
|
+
"isReadonly": true,
|
|
436
|
+
"releaseTag": "Public",
|
|
437
|
+
"name": "VERSION",
|
|
438
|
+
"variableTypeTokenRange": {
|
|
439
|
+
"startIndex": 0,
|
|
440
|
+
"endIndex": 0
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
]
|
|
446
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { ComponentFactory } from '@genesislcap/foundation-layout';
|
|
2
|
+
import * as React_2 from 'react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Creates a factory function for rendering React components in layout items.
|
|
6
|
+
*
|
|
7
|
+
* @param Component - React component to render
|
|
8
|
+
* @param props - Optional props to pass to the component
|
|
9
|
+
* @returns ComponentFactory compatible with foundation-layout
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <foundation-layout-item
|
|
14
|
+
* registration="my-component"
|
|
15
|
+
* title="My Component"
|
|
16
|
+
* factory={reactFactory(MyComponent, { someProp: 'value' })}
|
|
17
|
+
* />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function reactFactory<P = {}>(Component: React_2.ComponentType<P>, props?: P): ComponentFactory;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Creates a factory function that wraps a React component with a provider (e.g., Redux Provider, Context Provider).
|
|
24
|
+
*
|
|
25
|
+
* @param Component - React component to render
|
|
26
|
+
* @param Wrapper - Wrapper component (e.g., Redux Provider, Context Provider)
|
|
27
|
+
* @param wrapperProps - Props for the wrapper component
|
|
28
|
+
* @param componentProps - Optional props for the component
|
|
29
|
+
* @returns ComponentFactory compatible with foundation-layout
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```tsx
|
|
33
|
+
* import { Provider } from 'react-redux';
|
|
34
|
+
* import { store } from './store';
|
|
35
|
+
*
|
|
36
|
+
* <foundation-layout-item
|
|
37
|
+
* registration="my-component"
|
|
38
|
+
* title="My Component"
|
|
39
|
+
* factory={reactFactoryWithProvider(
|
|
40
|
+
* MyComponent,
|
|
41
|
+
* Provider,
|
|
42
|
+
* { store },
|
|
43
|
+
* { someProp: 'value' }
|
|
44
|
+
* )}
|
|
45
|
+
* />
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare function reactFactoryWithProvider<CP = {}, WP = {}>(Component: React_2.ComponentType<CP>, Wrapper: React_2.ComponentType<WP & {
|
|
49
|
+
children: React_2.ReactNode;
|
|
50
|
+
}>, wrapperProps: WP, componentProps?: CP): ComponentFactory;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Package version
|
|
54
|
+
* @public
|
|
55
|
+
*/
|
|
56
|
+
export declare const VERSION = "14.354.2";
|
|
57
|
+
|
|
58
|
+
export { }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"root":["../src/index.ts","../src/react-layout-factory.tsx"],"version":"5.9.2"}
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
|
|
44
|
+
## Variables
|
|
45
|
+
|
|
46
|
+
<table><thead><tr><th>
|
|
47
|
+
|
|
48
|
+
Variable
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
</th><th>
|
|
52
|
+
|
|
53
|
+
Description
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
</th></tr></thead>
|
|
57
|
+
<tbody><tr><td>
|
|
58
|
+
|
|
59
|
+
[VERSION](./foundation-react-utils.version.md)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</td><td>
|
|
63
|
+
|
|
64
|
+
Package version
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
</td></tr>
|
|
68
|
+
</tbody></table>
|
|
69
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
|