@genesislcap/foundation-forms 14.397.2 → 14.398.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/dist/custom-elements.json +389 -4
- package/dist/dts/form.d.ts +100 -1
- package/dist/dts/form.d.ts.map +1 -1
- package/dist/dts/form.styles.d.ts.map +1 -1
- package/dist/dts/form.template.d.ts.map +1 -1
- package/dist/dts/jsonforms/json-forms.d.ts +13 -0
- package/dist/dts/jsonforms/json-forms.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/ArrayListWrapperRenderer.d.ts +5 -0
- package/dist/dts/jsonforms/renderers/ArrayListWrapperRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/BooleanControlRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/ConnectedMultiselectControlRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/ControlWrapperRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/EnumControlRenderer.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/LayoutFormGridRenderer.d.ts +3 -0
- package/dist/dts/jsonforms/renderers/LayoutFormGridRenderer.d.ts.map +1 -0
- package/dist/dts/jsonforms/renderers/RenderersRanks.d.ts +1 -0
- package/dist/dts/jsonforms/renderers/RenderersRanks.d.ts.map +1 -1
- package/dist/dts/jsonforms/testers/isOneOfOptionMultiselect.d.ts.map +1 -1
- package/dist/dts/types.d.ts +89 -2
- package/dist/dts/types.d.ts.map +1 -1
- package/dist/dts/utils/csv-parser.d.ts +85 -0
- package/dist/dts/utils/csv-parser.d.ts.map +1 -0
- package/dist/dts/utils/index.d.ts +1 -0
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/schema-utils.d.ts +46 -0
- package/dist/dts/utils/schema-utils.d.ts.map +1 -0
- package/dist/dts/utils/validation.d.ts +2 -0
- package/dist/dts/utils/validation.d.ts.map +1 -1
- package/dist/esm/form.js +423 -5
- package/dist/esm/form.styles.js +41 -1
- package/dist/esm/form.template.js +33 -1
- package/dist/esm/jsonforms/json-forms.js +30 -0
- package/dist/esm/jsonforms/renderers/ArrayListWrapperRenderer.js +223 -22
- package/dist/esm/jsonforms/renderers/BooleanControlRenderer.js +1 -2
- package/dist/esm/jsonforms/renderers/ConnectedMultiselectControlRenderer.js +13 -2
- package/dist/esm/jsonforms/renderers/ControlWrapperRenderer.js +25 -4
- package/dist/esm/jsonforms/renderers/EnumControlRenderer.js +14 -5
- package/dist/esm/jsonforms/renderers/LayoutFormGridRenderer.js +39 -0
- package/dist/esm/jsonforms/renderers/RenderersRanks.js +1 -0
- package/dist/esm/jsonforms/testers/isOneOfOptionMultiselect.js +1 -1
- package/dist/esm/utils/csv-parser.js +486 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/schema-utils.js +120 -0
- package/dist/esm/utils/validation.js +2 -0
- package/dist/foundation-forms.api.json +1028 -34
- package/dist/foundation-forms.d.ts +285 -2
- package/docs/api/foundation-forms.arrayrendereroptions.md +2 -2
- package/docs/api/foundation-forms.bulkrowstatus.md +22 -0
- package/docs/api/foundation-forms.bulkrowsubmitstatus.md +13 -0
- package/docs/api/foundation-forms.bulksubmitfaileditem.md +20 -0
- package/docs/api/foundation-forms.bulksubmitresult.md +18 -0
- package/docs/api/foundation-forms.bulksubmitsuccessitem.md +17 -0
- package/docs/api/foundation-forms.childuischemaresolver.md +15 -0
- package/docs/api/foundation-forms.csvmappingresult.mappedrows.md +13 -0
- package/docs/api/foundation-forms.csvmappingresult.md +77 -0
- package/docs/api/foundation-forms.csvmappingresult.unmappedcolumns.md +13 -0
- package/docs/api/foundation-forms.csvparseresult.errors.md +13 -0
- package/docs/api/foundation-forms.csvparseresult.headers.md +13 -0
- package/docs/api/foundation-forms.csvparseresult.md +96 -0
- package/docs/api/foundation-forms.csvparseresult.rows.md +13 -0
- package/docs/api/foundation-forms.downloadcsvtemplate.md +74 -0
- package/docs/api/foundation-forms.form.bulkinsert.md +13 -0
- package/docs/api/foundation-forms.form.bulkinsertmaxitems.md +13 -0
- package/docs/api/foundation-forms.form.bulkinsertminitems.md +13 -0
- package/docs/api/foundation-forms.form.clearrowsubmitstatuses.md +17 -0
- package/docs/api/foundation-forms.form.downloadcsvtemplate.md +17 -0
- package/docs/api/foundation-forms.form.handlecsvfileselected.md +54 -0
- package/docs/api/foundation-forms.form.md +132 -0
- package/docs/api/foundation-forms.form.rowsubmitstatuses.md +13 -0
- package/docs/api/foundation-forms.form.submitsinglerow.md +56 -0
- package/docs/api/foundation-forms.generatecsvtemplate.md +104 -0
- package/docs/api/foundation-forms.mapcsvtoschema.md +88 -0
- package/docs/api/foundation-forms.md +147 -0
- package/docs/api/foundation-forms.parsecsv.md +56 -0
- package/docs/api/foundation-forms.uischemaelementtype.md +1 -1
- package/docs/api-report.md.api.md +87 -4
- package/package.json +19 -17
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [mapCsvToSchema](./foundation-forms.mapcsvtoschema.md)
|
|
4
|
+
|
|
5
|
+
## mapCsvToSchema() function
|
|
6
|
+
|
|
7
|
+
Maps CSV rows to schema fields with case-insensitive matching. When uiSchema is provided, CSV headers can also match UI schema labels. Converts values to appropriate types based on schema definition.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function mapCsvToSchema(csvRows: Record<string, string>[], schema: JSONSchema7 | undefined, uiSchema?: UiSchema): CsvMappingResult;
|
|
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
|
+
csvRows
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
Record<string, string>\[\]
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The parsed CSV rows
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
schema
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
JSONSchema7 \| undefined
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
The JSON schema defining the fields
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
<tr><td>
|
|
66
|
+
|
|
67
|
+
uiSchema
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</td><td>
|
|
71
|
+
|
|
72
|
+
[UiSchema](./foundation-forms.uischema.md)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
</td><td>
|
|
76
|
+
|
|
77
|
+
_(Optional)_ Optional UI schema to map labels to field names on import
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
</td></tr>
|
|
81
|
+
</tbody></table>
|
|
82
|
+
|
|
83
|
+
**Returns:**
|
|
84
|
+
|
|
85
|
+
[CsvMappingResult](./foundation-forms.csvmappingresult.md)
|
|
86
|
+
|
|
87
|
+
Mapped rows and list of unmapped columns
|
|
88
|
+
|
|
@@ -56,6 +56,28 @@ Description
|
|
|
56
56
|
</th></tr></thead>
|
|
57
57
|
<tbody><tr><td>
|
|
58
58
|
|
|
59
|
+
[downloadCsvTemplate(csvContent, fileName)](./foundation-forms.downloadcsvtemplate.md)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</td><td>
|
|
63
|
+
|
|
64
|
+
Triggers a download of the CSV template file in the browser.
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
</td></tr>
|
|
68
|
+
<tr><td>
|
|
69
|
+
|
|
70
|
+
[generateCsvTemplate(schema, uiSchema, includeOptionalFields, includeBom)](./foundation-forms.generatecsvtemplate.md)
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
</td><td>
|
|
74
|
+
|
|
75
|
+
Generates a CSV template string with headers and sample data based on JSON schema. If a UI schema is provided, it will be used to determine which fields to include and in what order. Hidden fields in the UI schema will be excluded.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
</td></tr>
|
|
79
|
+
<tr><td>
|
|
80
|
+
|
|
59
81
|
[getAnyOfErrorMessage(errors, schema, controlPath, uiCustomMsg)](./foundation-forms.getanyoferrormessage.md)
|
|
60
82
|
|
|
61
83
|
|
|
@@ -64,6 +86,17 @@ Description
|
|
|
64
86
|
Computes a human-friendly anyOf error message for a given control path. Prefers UI schema custom message, then JSON schema errorMessage.anyOf, then a constructed fallback.
|
|
65
87
|
|
|
66
88
|
|
|
89
|
+
</td></tr>
|
|
90
|
+
<tr><td>
|
|
91
|
+
|
|
92
|
+
[mapCsvToSchema(csvRows, schema, uiSchema)](./foundation-forms.mapcsvtoschema.md)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
</td><td>
|
|
96
|
+
|
|
97
|
+
Maps CSV rows to schema fields with case-insensitive matching. When uiSchema is provided, CSV headers can also match UI schema labels. Converts values to appropriate types based on schema definition.
|
|
98
|
+
|
|
99
|
+
|
|
67
100
|
</td></tr>
|
|
68
101
|
<tr><td>
|
|
69
102
|
|
|
@@ -75,6 +108,54 @@ Computes a human-friendly anyOf error message for a given control path. Prefers
|
|
|
75
108
|
Ensures the value of the current field (the one the validator is on) matches the one of the target field.
|
|
76
109
|
|
|
77
110
|
|
|
111
|
+
</td></tr>
|
|
112
|
+
<tr><td>
|
|
113
|
+
|
|
114
|
+
[parseCsv(content)](./foundation-forms.parsecsv.md)
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
</td><td>
|
|
118
|
+
|
|
119
|
+
Parses a CSV string into headers and rows using PapaParse. Handles quoted fields, escaped quotes, empty values, and mixed line endings.
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
</td></tr>
|
|
123
|
+
</tbody></table>
|
|
124
|
+
|
|
125
|
+
## Interfaces
|
|
126
|
+
|
|
127
|
+
<table><thead><tr><th>
|
|
128
|
+
|
|
129
|
+
Interface
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
</th><th>
|
|
133
|
+
|
|
134
|
+
Description
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
</th></tr></thead>
|
|
138
|
+
<tbody><tr><td>
|
|
139
|
+
|
|
140
|
+
[CsvMappingResult](./foundation-forms.csvmappingresult.md)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
</td><td>
|
|
144
|
+
|
|
145
|
+
Result of mapping CSV data to schema fields.
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
</td></tr>
|
|
149
|
+
<tr><td>
|
|
150
|
+
|
|
151
|
+
[CsvParseResult](./foundation-forms.csvparseresult.md)
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
</td><td>
|
|
155
|
+
|
|
156
|
+
Result of parsing a CSV file.
|
|
157
|
+
|
|
158
|
+
|
|
78
159
|
</td></tr>
|
|
79
160
|
</tbody></table>
|
|
80
161
|
|
|
@@ -138,6 +219,61 @@ Description
|
|
|
138
219
|
Configuration options available for array renderer.
|
|
139
220
|
|
|
140
221
|
|
|
222
|
+
</td></tr>
|
|
223
|
+
<tr><td>
|
|
224
|
+
|
|
225
|
+
[BulkRowStatus](./foundation-forms.bulkrowstatus.md)
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
</td><td>
|
|
229
|
+
|
|
230
|
+
Tracks the submission status and result for a single row in bulk insert mode.
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
</td></tr>
|
|
234
|
+
<tr><td>
|
|
235
|
+
|
|
236
|
+
[BulkRowSubmitStatus](./foundation-forms.bulkrowsubmitstatus.md)
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
</td><td>
|
|
240
|
+
|
|
241
|
+
Possible submission status values for a row in bulk insert mode.
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
</td></tr>
|
|
245
|
+
<tr><td>
|
|
246
|
+
|
|
247
|
+
[BulkSubmitFailedItem](./foundation-forms.bulksubmitfaileditem.md)
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
</td><td>
|
|
251
|
+
|
|
252
|
+
Represents a failed bulk insert item result.
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
</td></tr>
|
|
256
|
+
<tr><td>
|
|
257
|
+
|
|
258
|
+
[BulkSubmitResult](./foundation-forms.bulksubmitresult.md)
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
</td><td>
|
|
262
|
+
|
|
263
|
+
Result of a bulk insert submission containing successful and failed items.
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
</td></tr>
|
|
267
|
+
<tr><td>
|
|
268
|
+
|
|
269
|
+
[BulkSubmitSuccessItem](./foundation-forms.bulksubmitsuccessitem.md)
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
</td><td>
|
|
273
|
+
|
|
274
|
+
Represents a successful bulk insert item result.
|
|
275
|
+
|
|
276
|
+
|
|
141
277
|
</td></tr>
|
|
142
278
|
<tr><td>
|
|
143
279
|
|
|
@@ -149,6 +285,17 @@ Configuration options available for array renderer.
|
|
|
149
285
|
Configuration options available for categorization renderer.
|
|
150
286
|
|
|
151
287
|
|
|
288
|
+
</td></tr>
|
|
289
|
+
<tr><td>
|
|
290
|
+
|
|
291
|
+
[ChildUiSchemaResolver](./foundation-forms.childuischemaresolver.md)
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
</td><td>
|
|
295
|
+
|
|
296
|
+
Resolver for dynamic per-row UI schema in array/bulk-insert mode. Receives the row index, that row's data, and the full form data.
|
|
297
|
+
|
|
298
|
+
|
|
152
299
|
</td></tr>
|
|
153
300
|
<tr><td>
|
|
154
301
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [parseCsv](./foundation-forms.parsecsv.md)
|
|
4
|
+
|
|
5
|
+
## parseCsv() function
|
|
6
|
+
|
|
7
|
+
Parses a CSV string into headers and rows using PapaParse. Handles quoted fields, escaped quotes, empty values, and mixed line endings.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function parseCsv(content: string): CsvParseResult;
|
|
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
|
+
content
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
string
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The CSV content as a string
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
[CsvParseResult](./foundation-forms.csvparseresult.md)
|
|
54
|
+
|
|
55
|
+
The parsed result with headers, rows, and any errors
|
|
56
|
+
|
|
@@ -9,5 +9,5 @@ The layouts and control types, which allow you to customize the arrangement of f
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
export type UiSchemaElementType = 'Control' | 'VerticalLayout' | 'LayoutVertical2Columns' | 'Categorization' | 'Group' | 'Stepper' | 'HorizontalLayout';
|
|
12
|
+
export type UiSchemaElementType = 'Control' | 'VerticalLayout' | 'LayoutVertical2Columns' | 'FormGridLayout' | 'Categorization' | 'Group' | 'Stepper' | 'HorizontalLayout';
|
|
13
13
|
```
|
|
@@ -31,18 +31,57 @@ import { ViewTemplate } from '@microsoft/fast-element';
|
|
|
31
31
|
|
|
32
32
|
// @public
|
|
33
33
|
export type ArrayRendererOptions = {
|
|
34
|
-
childUiSchema?: UiSchema;
|
|
34
|
+
childUiSchema?: UiSchema | ChildUiSchemaResolver;
|
|
35
35
|
addLabel?: string;
|
|
36
36
|
deleteLabel?: string;
|
|
37
37
|
border?: boolean;
|
|
38
38
|
canDelete?: (item: any) => boolean;
|
|
39
39
|
};
|
|
40
40
|
|
|
41
|
+
// @public
|
|
42
|
+
export type BulkRowStatus = {
|
|
43
|
+
status: BulkRowSubmitStatus;
|
|
44
|
+
errors?: Array<{
|
|
45
|
+
CODE: string;
|
|
46
|
+
TEXT: string;
|
|
47
|
+
}>;
|
|
48
|
+
response?: any;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
// @public
|
|
52
|
+
export type BulkRowSubmitStatus = 'pending' | 'submitting' | 'success' | 'failed';
|
|
53
|
+
|
|
54
|
+
// @public
|
|
55
|
+
export type BulkSubmitFailedItem = {
|
|
56
|
+
item: any;
|
|
57
|
+
index: number;
|
|
58
|
+
errors: Array<{
|
|
59
|
+
CODE: string;
|
|
60
|
+
TEXT: string;
|
|
61
|
+
}>;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// @public
|
|
65
|
+
export type BulkSubmitResult = {
|
|
66
|
+
successful: BulkSubmitSuccessItem[];
|
|
67
|
+
failed: BulkSubmitFailedItem[];
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
// @public
|
|
71
|
+
export type BulkSubmitSuccessItem = {
|
|
72
|
+
item: any;
|
|
73
|
+
index: number;
|
|
74
|
+
response: any;
|
|
75
|
+
};
|
|
76
|
+
|
|
41
77
|
// @public
|
|
42
78
|
export type CategorizationRendererOptions = {
|
|
43
79
|
childElements?: UiSchema[];
|
|
44
80
|
};
|
|
45
81
|
|
|
82
|
+
// @public
|
|
83
|
+
export type ChildUiSchemaResolver = (index: number, rowData: any, formData: any) => UiSchema;
|
|
84
|
+
|
|
46
85
|
// Warning: (ae-internal-missing-underscore) The name "comboboxRendererStyles" should be prefixed with an underscore because the declaration is marked as @internal
|
|
47
86
|
//
|
|
48
87
|
// @internal (undocumented)
|
|
@@ -75,6 +114,31 @@ export type ConnectedRenderersOptions = {
|
|
|
75
114
|
// @internal
|
|
76
115
|
export const createExpressions: (payload: any) => Expressions;
|
|
77
116
|
|
|
117
|
+
// @public
|
|
118
|
+
export interface CsvMappingResult {
|
|
119
|
+
mappedRows: Record<string, any>[];
|
|
120
|
+
unmappedColumns: string[];
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// @public
|
|
124
|
+
export interface CsvParseResult {
|
|
125
|
+
errors: string[];
|
|
126
|
+
headers: string[];
|
|
127
|
+
rows: Record<string, string>[];
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// @public
|
|
131
|
+
export function downloadCsvTemplate(csvContent: string, fileName?: string): void;
|
|
132
|
+
|
|
133
|
+
// Warning: (ae-internal-missing-underscore) The name "extractFieldsFromUiSchema" should be prefixed with an underscore because the declaration is marked as @internal
|
|
134
|
+
//
|
|
135
|
+
// @internal
|
|
136
|
+
export function extractFieldsFromUiSchema(uiSchema: UiSchema): Array<{
|
|
137
|
+
fieldName: string;
|
|
138
|
+
label?: string;
|
|
139
|
+
isHidden: boolean;
|
|
140
|
+
}>;
|
|
141
|
+
|
|
78
142
|
// Warning: (ae-forgotten-export) The symbol "Filters_base" needs to be exported by the entry point index.d.ts
|
|
79
143
|
//
|
|
80
144
|
// @public
|
|
@@ -137,14 +201,22 @@ export class Form extends Form_base {
|
|
|
137
201
|
approvalMessageLabel: string;
|
|
138
202
|
// @internal
|
|
139
203
|
approvalModal: any;
|
|
204
|
+
bulkInsert: boolean;
|
|
205
|
+
bulkInsertMaxItems: number | undefined;
|
|
206
|
+
bulkInsertMinItems: number;
|
|
207
|
+
clearRowSubmitStatuses(): void;
|
|
140
208
|
// @internal
|
|
141
209
|
closeApprovalModal(): void;
|
|
142
210
|
confirmationMessage: string;
|
|
211
|
+
// @internal
|
|
212
|
+
csvFileInput: HTMLInputElement;
|
|
143
213
|
data: any;
|
|
144
214
|
// @internal (undocumented)
|
|
145
215
|
deepClone(): Node;
|
|
146
216
|
// @internal (undocumented)
|
|
147
217
|
disconnectedCallback(): void;
|
|
218
|
+
downloadCsvTemplate(): void;
|
|
219
|
+
handleCsvFileSelected(event: Event): Promise<void>;
|
|
148
220
|
hideSubmit: boolean;
|
|
149
221
|
// @internal
|
|
150
222
|
get isSubmitHidden(): boolean;
|
|
@@ -160,11 +232,13 @@ export class Form extends Form_base {
|
|
|
160
232
|
renderersChanged(): void;
|
|
161
233
|
reset(clearData?: boolean): void;
|
|
162
234
|
resourceName: string;
|
|
235
|
+
rowSubmitStatuses: Map<number, BulkRowStatus>;
|
|
163
236
|
setApprovalMessage: boolean;
|
|
164
237
|
// @internal (undocumented)
|
|
165
238
|
_submit(): Promise<void>;
|
|
166
239
|
// @internal (undocumented)
|
|
167
240
|
submitPart(event: CustomEvent): void;
|
|
241
|
+
submitSingleRow(index: number): Promise<void>;
|
|
168
242
|
// @internal (undocumented)
|
|
169
243
|
submitted: boolean;
|
|
170
244
|
// @internal (undocumented)
|
|
@@ -184,6 +258,9 @@ export const foundationFormStyles: ElementStyles;
|
|
|
184
258
|
// @internal (undocumented)
|
|
185
259
|
export const foundationFormTemplate: ViewTemplate<Form, any>;
|
|
186
260
|
|
|
261
|
+
// @public
|
|
262
|
+
export function generateCsvTemplate(schema: JSONSchema7 | undefined, uiSchema?: UiSchema, includeOptionalFields?: boolean, includeBom?: boolean): string;
|
|
263
|
+
|
|
187
264
|
// Warning: (ae-internal-missing-underscore) The name "genesisErrorTranslator" should be prefixed with an underscore because the declaration is marked as @internal
|
|
188
265
|
//
|
|
189
266
|
// @internal (undocumented)
|
|
@@ -243,6 +320,9 @@ export { Layout }
|
|
|
243
320
|
// @internal (undocumented)
|
|
244
321
|
export const logger: Logger;
|
|
245
322
|
|
|
323
|
+
// @public
|
|
324
|
+
export function mapCsvToSchema(csvRows: Record<string, string>[], schema: JSONSchema7 | undefined, uiSchema?: UiSchema): CsvMappingResult;
|
|
325
|
+
|
|
246
326
|
// @public
|
|
247
327
|
export const mustMatch: (target: string) => (data: any, path: any, label: any) => {
|
|
248
328
|
instancePath: string;
|
|
@@ -259,6 +339,9 @@ export type NumberRendererOptions = {
|
|
|
259
339
|
autocomplete?: string;
|
|
260
340
|
};
|
|
261
341
|
|
|
342
|
+
// @public
|
|
343
|
+
export function parseCsv(content: string): CsvParseResult;
|
|
344
|
+
|
|
262
345
|
// @public
|
|
263
346
|
export type RendererEntry = {
|
|
264
347
|
renderer: ViewTemplate<DispatchRenderer, any>;
|
|
@@ -322,15 +405,15 @@ export type UiSchemaElement = {
|
|
|
322
405
|
export type UiSchemaElementOptions = ConnectedRenderersOptions | NumberRendererOptions | ArrayRendererOptions | CategorizationRendererOptions | GroupRendererOptions | StepperRendererOptions | StringRendererOptions | StandardRendererOptions;
|
|
323
406
|
|
|
324
407
|
// @public
|
|
325
|
-
export type UiSchemaElementType = 'Control' | 'VerticalLayout' | 'LayoutVertical2Columns' | 'Categorization' | 'Group' | 'Stepper' | 'HorizontalLayout';
|
|
408
|
+
export type UiSchemaElementType = 'Control' | 'VerticalLayout' | 'LayoutVertical2Columns' | 'FormGridLayout' | 'Categorization' | 'Group' | 'Stepper' | 'HorizontalLayout';
|
|
326
409
|
|
|
327
410
|
// @public
|
|
328
411
|
export type UiSchemaOptions = StepperOrientationOptions | LabelPlacementOptions;
|
|
329
412
|
|
|
330
413
|
// Warnings were encountered during analysis:
|
|
331
414
|
//
|
|
332
|
-
// src/types.ts:
|
|
333
|
-
// src/types.ts:
|
|
415
|
+
// src/types.ts:378:3 - (ae-forgotten-export) The symbol "Rule" needs to be exported by the entry point index.d.ts
|
|
416
|
+
// src/types.ts:428:3 - (ae-forgotten-export) The symbol "DispatchRenderer" needs to be exported by the entry point index.d.ts
|
|
334
417
|
|
|
335
418
|
// (No @packageDocumentation comment for this package)
|
|
336
419
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/foundation-forms",
|
|
3
3
|
"description": "Genesis Foundation Forms",
|
|
4
|
-
"version": "14.
|
|
4
|
+
"version": "14.398.0",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "SEE LICENSE IN license.txt",
|
|
7
7
|
"main": "dist/esm/index.js",
|
|
@@ -50,22 +50,23 @@
|
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
-
"@genesislcap/foundation-testing": "14.
|
|
54
|
-
"@genesislcap/genx": "14.
|
|
55
|
-
"@genesislcap/rollup-builder": "14.
|
|
56
|
-
"@genesislcap/ts-builder": "14.
|
|
57
|
-
"@genesislcap/uvu-playwright-builder": "14.
|
|
58
|
-
"@genesislcap/vite-builder": "14.
|
|
59
|
-
"@genesislcap/webpack-builder": "14.
|
|
60
|
-
"@types/json-schema": "^7.0.11"
|
|
53
|
+
"@genesislcap/foundation-testing": "14.398.0",
|
|
54
|
+
"@genesislcap/genx": "14.398.0",
|
|
55
|
+
"@genesislcap/rollup-builder": "14.398.0",
|
|
56
|
+
"@genesislcap/ts-builder": "14.398.0",
|
|
57
|
+
"@genesislcap/uvu-playwright-builder": "14.398.0",
|
|
58
|
+
"@genesislcap/vite-builder": "14.398.0",
|
|
59
|
+
"@genesislcap/webpack-builder": "14.398.0",
|
|
60
|
+
"@types/json-schema": "^7.0.11",
|
|
61
|
+
"@types/papaparse": "^5.3.14"
|
|
61
62
|
},
|
|
62
63
|
"dependencies": {
|
|
63
|
-
"@genesislcap/foundation-comms": "14.
|
|
64
|
-
"@genesislcap/foundation-criteria": "14.
|
|
65
|
-
"@genesislcap/foundation-logger": "14.
|
|
66
|
-
"@genesislcap/foundation-notifications": "14.
|
|
67
|
-
"@genesislcap/foundation-ui": "14.
|
|
68
|
-
"@genesislcap/foundation-utils": "14.
|
|
64
|
+
"@genesislcap/foundation-comms": "14.398.0",
|
|
65
|
+
"@genesislcap/foundation-criteria": "14.398.0",
|
|
66
|
+
"@genesislcap/foundation-logger": "14.398.0",
|
|
67
|
+
"@genesislcap/foundation-notifications": "14.398.0",
|
|
68
|
+
"@genesislcap/foundation-ui": "14.398.0",
|
|
69
|
+
"@genesislcap/foundation-utils": "14.398.0",
|
|
69
70
|
"@json-schema-tools/dereferencer": "^1.6.1",
|
|
70
71
|
"@jsonforms/core": "^3.2.1",
|
|
71
72
|
"@microsoft/fast-components": "2.30.6",
|
|
@@ -75,7 +76,8 @@
|
|
|
75
76
|
"ajv": "8.16.0",
|
|
76
77
|
"change-case": "^4.1.2",
|
|
77
78
|
"json-schema": "^0.4.0",
|
|
78
|
-
"lodash": "^4.17.21"
|
|
79
|
+
"lodash": "^4.17.21",
|
|
80
|
+
"papaparse": "^5.4.1"
|
|
79
81
|
},
|
|
80
82
|
"repository": {
|
|
81
83
|
"type": "git",
|
|
@@ -86,5 +88,5 @@
|
|
|
86
88
|
"access": "public"
|
|
87
89
|
},
|
|
88
90
|
"customElements": "dist/custom-elements.json",
|
|
89
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "d9c0d13f49958e386d339075078dc15561455c18"
|
|
90
92
|
}
|