@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,96 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [CsvParseResult](./foundation-forms.csvparseresult.md)
|
|
4
|
+
|
|
5
|
+
## CsvParseResult interface
|
|
6
|
+
|
|
7
|
+
Result of parsing a CSV file.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export interface CsvParseResult
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
<table><thead><tr><th>
|
|
18
|
+
|
|
19
|
+
Property
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
</th><th>
|
|
23
|
+
|
|
24
|
+
Modifiers
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</th><th>
|
|
28
|
+
|
|
29
|
+
Type
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
</th><th>
|
|
33
|
+
|
|
34
|
+
Description
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
</th></tr></thead>
|
|
38
|
+
<tbody><tr><td>
|
|
39
|
+
|
|
40
|
+
[errors](./foundation-forms.csvparseresult.errors.md)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
</td><td>
|
|
47
|
+
|
|
48
|
+
string\[\]
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
</td><td>
|
|
52
|
+
|
|
53
|
+
Any errors encountered during parsing.
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
</td></tr>
|
|
57
|
+
<tr><td>
|
|
58
|
+
|
|
59
|
+
[headers](./foundation-forms.csvparseresult.headers.md)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
</td><td>
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
</td><td>
|
|
66
|
+
|
|
67
|
+
string\[\]
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</td><td>
|
|
71
|
+
|
|
72
|
+
The header names from the first row of the CSV.
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
</td></tr>
|
|
76
|
+
<tr><td>
|
|
77
|
+
|
|
78
|
+
[rows](./foundation-forms.csvparseresult.rows.md)
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
</td><td>
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
</td><td>
|
|
85
|
+
|
|
86
|
+
Record<string, string>\[\]
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
</td><td>
|
|
90
|
+
|
|
91
|
+
The parsed data rows as key-value objects.
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
</td></tr>
|
|
95
|
+
</tbody></table>
|
|
96
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [CsvParseResult](./foundation-forms.csvparseresult.md) > [rows](./foundation-forms.csvparseresult.rows.md)
|
|
4
|
+
|
|
5
|
+
## CsvParseResult.rows property
|
|
6
|
+
|
|
7
|
+
The parsed data rows as key-value objects.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
rows: Record<string, string>[];
|
|
13
|
+
```
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [downloadCsvTemplate](./foundation-forms.downloadcsvtemplate.md)
|
|
4
|
+
|
|
5
|
+
## downloadCsvTemplate() function
|
|
6
|
+
|
|
7
|
+
Triggers a download of the CSV template file in the browser.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function downloadCsvTemplate(csvContent: string, fileName?: string): void;
|
|
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
|
+
csvContent
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
string
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The CSV content to download
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
fileName
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
string
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
_(Optional)_ The name for the downloaded file (default: 'template.csv')
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
</tbody></table>
|
|
66
|
+
|
|
67
|
+
**Returns:**
|
|
68
|
+
|
|
69
|
+
void
|
|
70
|
+
|
|
71
|
+
## Remarks
|
|
72
|
+
|
|
73
|
+
Browser-only; uses document and URL.createObjectURL. Will throw in Node.js.
|
|
74
|
+
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [Form](./foundation-forms.form.md) > [bulkInsert](./foundation-forms.form.bulkinsert.md)
|
|
4
|
+
|
|
5
|
+
## Form.bulkInsert property
|
|
6
|
+
|
|
7
|
+
When enabled, transforms the form into bulk insert mode where multiple records can be added. The JSON schema will be wrapped as an array, and each item will be submitted separately.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
bulkInsert: boolean;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [Form](./foundation-forms.form.md) > [bulkInsertMaxItems](./foundation-forms.form.bulkinsertmaxitems.md)
|
|
4
|
+
|
|
5
|
+
## Form.bulkInsertMaxItems property
|
|
6
|
+
|
|
7
|
+
Maximum number of items allowed in bulk insert mode. If not set, no maximum is enforced.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
bulkInsertMaxItems: number | undefined;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [Form](./foundation-forms.form.md) > [bulkInsertMinItems](./foundation-forms.form.bulkinsertminitems.md)
|
|
4
|
+
|
|
5
|
+
## Form.bulkInsertMinItems property
|
|
6
|
+
|
|
7
|
+
Minimum number of items required in bulk insert mode.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
bulkInsertMinItems: number;
|
|
13
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [Form](./foundation-forms.form.md) > [clearRowSubmitStatuses](./foundation-forms.form.clearrowsubmitstatuses.md)
|
|
4
|
+
|
|
5
|
+
## Form.clearRowSubmitStatuses() method
|
|
6
|
+
|
|
7
|
+
Clears all row submit statuses, typically called when resetting the form.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
clearRowSubmitStatuses(): void;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
void
|
|
17
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [Form](./foundation-forms.form.md) > [downloadCsvTemplate](./foundation-forms.form.downloadcsvtemplate.md)
|
|
4
|
+
|
|
5
|
+
## Form.downloadCsvTemplate() method
|
|
6
|
+
|
|
7
|
+
Downloads a CSV template file with headers and sample data based on the schema. If a UI schema is provided, it will be used to determine which fields to include and in what order. Hidden fields will be excluded from the template.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
downloadCsvTemplate(): void;
|
|
13
|
+
```
|
|
14
|
+
**Returns:**
|
|
15
|
+
|
|
16
|
+
void
|
|
17
|
+
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [Form](./foundation-forms.form.md) > [handleCsvFileSelected](./foundation-forms.form.handlecsvfileselected.md)
|
|
4
|
+
|
|
5
|
+
## Form.handleCsvFileSelected() method
|
|
6
|
+
|
|
7
|
+
Handles CSV file selection for bulk import. Parses the CSV content and appends it to existing form items.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
handleCsvFileSelected(event: Event): Promise<void>;
|
|
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
|
+
event
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
Event
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The file input change event
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
Promise<void>
|
|
54
|
+
|
|
@@ -73,6 +73,63 @@ string
|
|
|
73
73
|
Label for the approval message field in the approval dialog.
|
|
74
74
|
|
|
75
75
|
|
|
76
|
+
</td></tr>
|
|
77
|
+
<tr><td>
|
|
78
|
+
|
|
79
|
+
[bulkInsert](./foundation-forms.form.bulkinsert.md)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
</td><td>
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
</td><td>
|
|
86
|
+
|
|
87
|
+
boolean
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
</td><td>
|
|
91
|
+
|
|
92
|
+
When enabled, transforms the form into bulk insert mode where multiple records can be added. The JSON schema will be wrapped as an array, and each item will be submitted separately.
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
</td></tr>
|
|
96
|
+
<tr><td>
|
|
97
|
+
|
|
98
|
+
[bulkInsertMaxItems](./foundation-forms.form.bulkinsertmaxitems.md)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
</td><td>
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
</td><td>
|
|
105
|
+
|
|
106
|
+
number \| undefined
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
</td><td>
|
|
110
|
+
|
|
111
|
+
Maximum number of items allowed in bulk insert mode. If not set, no maximum is enforced.
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
</td></tr>
|
|
115
|
+
<tr><td>
|
|
116
|
+
|
|
117
|
+
[bulkInsertMinItems](./foundation-forms.form.bulkinsertminitems.md)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
</td><td>
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
</td><td>
|
|
124
|
+
|
|
125
|
+
number
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
</td><td>
|
|
129
|
+
|
|
130
|
+
Minimum number of items required in bulk insert mode.
|
|
131
|
+
|
|
132
|
+
|
|
76
133
|
</td></tr>
|
|
77
134
|
<tr><td>
|
|
78
135
|
|
|
@@ -225,6 +282,25 @@ string
|
|
|
225
282
|
Name of the backend resource which will provide metadata used to generate form and later used for submitting data
|
|
226
283
|
|
|
227
284
|
|
|
285
|
+
</td></tr>
|
|
286
|
+
<tr><td>
|
|
287
|
+
|
|
288
|
+
[rowSubmitStatuses](./foundation-forms.form.rowsubmitstatuses.md)
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
</td><td>
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
</td><td>
|
|
295
|
+
|
|
296
|
+
Map<number, [BulkRowStatus](./foundation-forms.bulkrowstatus.md)<!-- -->>
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
</td><td>
|
|
300
|
+
|
|
301
|
+
Tracks the submission status for each row in bulk insert mode. Key is the row index, value is the status object.
|
|
302
|
+
|
|
303
|
+
|
|
228
304
|
</td></tr>
|
|
229
305
|
<tr><td>
|
|
230
306
|
|
|
@@ -286,6 +362,48 @@ Description
|
|
|
286
362
|
</th></tr></thead>
|
|
287
363
|
<tbody><tr><td>
|
|
288
364
|
|
|
365
|
+
[clearRowSubmitStatuses()](./foundation-forms.form.clearrowsubmitstatuses.md)
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
</td><td>
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
</td><td>
|
|
372
|
+
|
|
373
|
+
Clears all row submit statuses, typically called when resetting the form.
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
</td></tr>
|
|
377
|
+
<tr><td>
|
|
378
|
+
|
|
379
|
+
[downloadCsvTemplate()](./foundation-forms.form.downloadcsvtemplate.md)
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
</td><td>
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
</td><td>
|
|
386
|
+
|
|
387
|
+
Downloads a CSV template file with headers and sample data based on the schema. If a UI schema is provided, it will be used to determine which fields to include and in what order. Hidden fields will be excluded from the template.
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
</td></tr>
|
|
391
|
+
<tr><td>
|
|
392
|
+
|
|
393
|
+
[handleCsvFileSelected(event)](./foundation-forms.form.handlecsvfileselected.md)
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
</td><td>
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
</td><td>
|
|
400
|
+
|
|
401
|
+
Handles CSV file selection for bulk import. Parses the CSV content and appends it to existing form items.
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
</td></tr>
|
|
405
|
+
<tr><td>
|
|
406
|
+
|
|
289
407
|
[reset(clearData)](./foundation-forms.form.reset.md)
|
|
290
408
|
|
|
291
409
|
|
|
@@ -297,6 +415,20 @@ Description
|
|
|
297
415
|
Reset the form state
|
|
298
416
|
|
|
299
417
|
|
|
418
|
+
</td></tr>
|
|
419
|
+
<tr><td>
|
|
420
|
+
|
|
421
|
+
[submitSingleRow(index)](./foundation-forms.form.submitsinglerow.md)
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
</td><td>
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
</td><td>
|
|
428
|
+
|
|
429
|
+
Submits a single row in bulk insert mode.
|
|
430
|
+
|
|
431
|
+
|
|
300
432
|
</td></tr>
|
|
301
433
|
</tbody></table>
|
|
302
434
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [Form](./foundation-forms.form.md) > [rowSubmitStatuses](./foundation-forms.form.rowsubmitstatuses.md)
|
|
4
|
+
|
|
5
|
+
## Form.rowSubmitStatuses property
|
|
6
|
+
|
|
7
|
+
Tracks the submission status for each row in bulk insert mode. Key is the row index, value is the status object.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
rowSubmitStatuses: Map<number, BulkRowStatus>;
|
|
13
|
+
```
|
|
@@ -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) > [Form](./foundation-forms.form.md) > [submitSingleRow](./foundation-forms.form.submitsinglerow.md)
|
|
4
|
+
|
|
5
|
+
## Form.submitSingleRow() method
|
|
6
|
+
|
|
7
|
+
Submits a single row in bulk insert mode.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
submitSingleRow(index: number): Promise<void>;
|
|
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
|
+
index
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
number
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The index of the row to submit
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
</tbody></table>
|
|
50
|
+
|
|
51
|
+
**Returns:**
|
|
52
|
+
|
|
53
|
+
Promise<void>
|
|
54
|
+
|
|
55
|
+
Promise that resolves when submission is complete
|
|
56
|
+
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
2
|
+
|
|
3
|
+
[Home](./index.md) > [@genesislcap/foundation-forms](./foundation-forms.md) > [generateCsvTemplate](./foundation-forms.generatecsvtemplate.md)
|
|
4
|
+
|
|
5
|
+
## generateCsvTemplate() function
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
export declare function generateCsvTemplate(schema: JSONSchema7 | undefined, uiSchema?: UiSchema, includeOptionalFields?: boolean, includeBom?: boolean): string;
|
|
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
|
+
schema
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
</td><td>
|
|
39
|
+
|
|
40
|
+
JSONSchema7 \| undefined
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
</td><td>
|
|
44
|
+
|
|
45
|
+
The JSON schema defining the fields
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
</td></tr>
|
|
49
|
+
<tr><td>
|
|
50
|
+
|
|
51
|
+
uiSchema
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
</td><td>
|
|
55
|
+
|
|
56
|
+
[UiSchema](./foundation-forms.uischema.md)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
</td><td>
|
|
60
|
+
|
|
61
|
+
_(Optional)_ Optional UI schema to determine field order and visibility
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
</td></tr>
|
|
65
|
+
<tr><td>
|
|
66
|
+
|
|
67
|
+
includeOptionalFields
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
</td><td>
|
|
71
|
+
|
|
72
|
+
boolean
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
</td><td>
|
|
76
|
+
|
|
77
|
+
_(Optional)_ Whether to include optional fields when no UI schema (default: true)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
</td></tr>
|
|
81
|
+
<tr><td>
|
|
82
|
+
|
|
83
|
+
includeBom
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
</td><td>
|
|
87
|
+
|
|
88
|
+
boolean
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
</td><td>
|
|
92
|
+
|
|
93
|
+
_(Optional)_ Whether to prepend UTF-8 BOM for Excel compatibility (default: true)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
</td></tr>
|
|
97
|
+
</tbody></table>
|
|
98
|
+
|
|
99
|
+
**Returns:**
|
|
100
|
+
|
|
101
|
+
string
|
|
102
|
+
|
|
103
|
+
The CSV template string with headers and one sample row
|
|
104
|
+
|