@genesislcap/foundation-forms 14.397.0 → 14.397.1-alpha-87a7828.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.
Files changed (60) hide show
  1. package/dist/custom-elements.json +325 -1
  2. package/dist/dts/form.d.ts +100 -1
  3. package/dist/dts/form.d.ts.map +1 -1
  4. package/dist/dts/form.styles.d.ts.map +1 -1
  5. package/dist/dts/form.template.d.ts.map +1 -1
  6. package/dist/dts/jsonforms/json-forms.d.ts +13 -0
  7. package/dist/dts/jsonforms/json-forms.d.ts.map +1 -1
  8. package/dist/dts/jsonforms/renderers/ArrayListWrapperRenderer.d.ts +5 -0
  9. package/dist/dts/jsonforms/renderers/ArrayListWrapperRenderer.d.ts.map +1 -1
  10. package/dist/dts/types.d.ts +88 -1
  11. package/dist/dts/types.d.ts.map +1 -1
  12. package/dist/dts/utils/csv-parser.d.ts +82 -0
  13. package/dist/dts/utils/csv-parser.d.ts.map +1 -0
  14. package/dist/dts/utils/index.d.ts +1 -0
  15. package/dist/dts/utils/index.d.ts.map +1 -1
  16. package/dist/dts/utils/schema-utils.d.ts +46 -0
  17. package/dist/dts/utils/schema-utils.d.ts.map +1 -0
  18. package/dist/dts/utils/validation.d.ts +2 -0
  19. package/dist/dts/utils/validation.d.ts.map +1 -1
  20. package/dist/esm/form.js +421 -5
  21. package/dist/esm/form.styles.js +38 -1
  22. package/dist/esm/form.template.js +33 -1
  23. package/dist/esm/jsonforms/json-forms.js +30 -0
  24. package/dist/esm/jsonforms/renderers/ArrayListWrapperRenderer.js +207 -13
  25. package/dist/esm/utils/csv-parser.js +458 -0
  26. package/dist/esm/utils/index.js +1 -0
  27. package/dist/esm/utils/schema-utils.js +120 -0
  28. package/dist/esm/utils/validation.js +2 -0
  29. package/dist/foundation-forms.api.json +1006 -29
  30. package/dist/foundation-forms.d.ts +281 -1
  31. package/docs/api/foundation-forms.arrayrendereroptions.md +2 -2
  32. package/docs/api/foundation-forms.bulkrowstatus.md +22 -0
  33. package/docs/api/foundation-forms.bulkrowsubmitstatus.md +13 -0
  34. package/docs/api/foundation-forms.bulksubmitfaileditem.md +20 -0
  35. package/docs/api/foundation-forms.bulksubmitresult.md +18 -0
  36. package/docs/api/foundation-forms.bulksubmitsuccessitem.md +17 -0
  37. package/docs/api/foundation-forms.childuischemaresolver.md +15 -0
  38. package/docs/api/foundation-forms.csvmappingresult.mappedrows.md +13 -0
  39. package/docs/api/foundation-forms.csvmappingresult.md +77 -0
  40. package/docs/api/foundation-forms.csvmappingresult.unmappedcolumns.md +13 -0
  41. package/docs/api/foundation-forms.csvparseresult.errors.md +13 -0
  42. package/docs/api/foundation-forms.csvparseresult.headers.md +13 -0
  43. package/docs/api/foundation-forms.csvparseresult.md +96 -0
  44. package/docs/api/foundation-forms.csvparseresult.rows.md +13 -0
  45. package/docs/api/foundation-forms.downloadcsvtemplate.md +74 -0
  46. package/docs/api/foundation-forms.form.bulkinsert.md +13 -0
  47. package/docs/api/foundation-forms.form.bulkinsertmaxitems.md +13 -0
  48. package/docs/api/foundation-forms.form.bulkinsertminitems.md +13 -0
  49. package/docs/api/foundation-forms.form.clearrowsubmitstatuses.md +17 -0
  50. package/docs/api/foundation-forms.form.downloadcsvtemplate.md +17 -0
  51. package/docs/api/foundation-forms.form.handlecsvfileselected.md +54 -0
  52. package/docs/api/foundation-forms.form.md +132 -0
  53. package/docs/api/foundation-forms.form.rowsubmitstatuses.md +13 -0
  54. package/docs/api/foundation-forms.form.submitsinglerow.md +56 -0
  55. package/docs/api/foundation-forms.generatecsvtemplate.md +104 -0
  56. package/docs/api/foundation-forms.mapcsvtoschema.md +72 -0
  57. package/docs/api/foundation-forms.md +147 -0
  58. package/docs/api/foundation-forms.parsecsv.md +56 -0
  59. package/docs/api-report.md.api.md +85 -3
  60. package/package.json +19 -17
@@ -173,6 +173,70 @@
173
173
  "description": "Controls the visibility of the submit button.",
174
174
  "privacy": "public"
175
175
  },
176
+ {
177
+ "kind": "field",
178
+ "name": "bulkInsert",
179
+ "type": {
180
+ "text": "boolean"
181
+ },
182
+ "description": "When enabled, transforms the form into bulk insert mode where multiple records can be added.\nThe JSON schema will be wrapped as an array, and each item will be submitted separately.",
183
+ "privacy": "public"
184
+ },
185
+ {
186
+ "kind": "field",
187
+ "name": "bulkInsertMinItems",
188
+ "type": {
189
+ "text": "number"
190
+ },
191
+ "default": "1",
192
+ "description": "Minimum number of items required in bulk insert mode.",
193
+ "privacy": "public"
194
+ },
195
+ {
196
+ "kind": "field",
197
+ "name": "bulkInsertMaxItems",
198
+ "type": {
199
+ "text": "number | undefined"
200
+ },
201
+ "description": "Maximum number of items allowed in bulk insert mode. If not set, no maximum is enforced.",
202
+ "privacy": "public"
203
+ },
204
+ {
205
+ "kind": "field",
206
+ "name": "rowSubmitStatuses",
207
+ "type": {
208
+ "text": "Map<number, BulkRowStatus>"
209
+ },
210
+ "default": "new Map()",
211
+ "description": "Tracks the submission status for each row in bulk insert mode.\nKey is the row index, value is the status object.",
212
+ "privacy": "public"
213
+ },
214
+ {
215
+ "kind": "method",
216
+ "name": "clearRowSubmitStatuses",
217
+ "description": "Clears all row submit statuses, typically called when resetting the form.",
218
+ "privacy": "public"
219
+ },
220
+ {
221
+ "kind": "method",
222
+ "name": "submitSingleRow",
223
+ "return": {
224
+ "type": {
225
+ "text": ""
226
+ }
227
+ },
228
+ "parameters": [
229
+ {
230
+ "name": "index",
231
+ "type": {
232
+ "text": "number"
233
+ },
234
+ "description": "The index of the row to submit"
235
+ }
236
+ ],
237
+ "description": "Submits a single row in bulk insert mode.",
238
+ "privacy": "public"
239
+ },
176
240
  {
177
241
  "kind": "method",
178
242
  "name": "reset",
@@ -185,6 +249,27 @@
185
249
  "description": "Reset the form state",
186
250
  "privacy": "public"
187
251
  },
252
+ {
253
+ "kind": "method",
254
+ "name": "handleCsvFileSelected",
255
+ "parameters": [
256
+ {
257
+ "name": "event",
258
+ "type": {
259
+ "text": "Event"
260
+ },
261
+ "description": "The file input change event"
262
+ }
263
+ ],
264
+ "description": "Handles CSV file selection for bulk import.\nParses the CSV content and appends it to existing form items.",
265
+ "privacy": "public"
266
+ },
267
+ {
268
+ "kind": "method",
269
+ "name": "downloadCsvTemplate",
270
+ "description": "Downloads a CSV template file with headers and sample data based on the schema.\nIf a UI schema is provided, it will be used to determine which fields to include\nand in what order. Hidden fields will be excluded from the template.",
271
+ "privacy": "public"
272
+ },
188
273
  {
189
274
  "kind": "method",
190
275
  "name": "cloneNode",
@@ -438,6 +523,31 @@
438
523
  },
439
524
  "description": "Controls the visibility of the submit button.",
440
525
  "fieldName": "hideSubmit"
526
+ },
527
+ {
528
+ "name": "bulk-insert",
529
+ "type": {
530
+ "text": "boolean"
531
+ },
532
+ "description": "When enabled, transforms the form into bulk insert mode where multiple records can be added.\nThe JSON schema will be wrapped as an array, and each item will be submitted separately.",
533
+ "fieldName": "bulkInsert"
534
+ },
535
+ {
536
+ "name": "bulk-insert-min-items",
537
+ "type": {
538
+ "text": "number"
539
+ },
540
+ "default": "1",
541
+ "description": "Minimum number of items required in bulk insert mode.",
542
+ "fieldName": "bulkInsertMinItems"
543
+ },
544
+ {
545
+ "name": "bulk-insert-max-items",
546
+ "type": {
547
+ "text": "number | undefined"
548
+ },
549
+ "description": "Maximum number of items allowed in bulk insert mode. If not set, no maximum is enforced.",
550
+ "fieldName": "bulkInsertMaxItems"
441
551
  }
442
552
  ],
443
553
  "mixins": [
@@ -1161,6 +1271,32 @@
1161
1271
  "kind": "method",
1162
1272
  "name": "configChanged"
1163
1273
  },
1274
+ {
1275
+ "kind": "field",
1276
+ "name": "rowSubmitStatuses",
1277
+ "type": {
1278
+ "text": "Map<number, BulkRowStatus>"
1279
+ },
1280
+ "default": "new Map()",
1281
+ "description": "Row submit statuses for bulk insert mode.\nPassed from the parent foundation-form."
1282
+ },
1283
+ {
1284
+ "kind": "method",
1285
+ "name": "rowSubmitStatusesChanged"
1286
+ },
1287
+ {
1288
+ "kind": "field",
1289
+ "name": "bulkInsert",
1290
+ "type": {
1291
+ "text": "boolean"
1292
+ },
1293
+ "default": "false",
1294
+ "description": "Whether the form is in bulk insert mode.\nPassed from the parent foundation-form."
1295
+ },
1296
+ {
1297
+ "kind": "method",
1298
+ "name": "bulkInsertChanged"
1299
+ },
1164
1300
  {
1165
1301
  "kind": "field",
1166
1302
  "name": "props",
@@ -1241,6 +1377,165 @@
1241
1377
  "declarations": [],
1242
1378
  "exports": []
1243
1379
  },
1380
+ {
1381
+ "kind": "javascript-module",
1382
+ "path": "src/utils/csv-parser.ts",
1383
+ "declarations": [
1384
+ {
1385
+ "kind": "function",
1386
+ "name": "parseCsv",
1387
+ "return": {
1388
+ "type": {
1389
+ "text": ""
1390
+ }
1391
+ },
1392
+ "parameters": [
1393
+ {
1394
+ "name": "content",
1395
+ "type": {
1396
+ "text": "string"
1397
+ },
1398
+ "description": "The CSV content as a string"
1399
+ }
1400
+ ],
1401
+ "description": "Parses a CSV string into headers and rows using PapaParse.\nHandles quoted fields, escaped quotes, empty values, and mixed line endings.",
1402
+ "privacy": "public"
1403
+ },
1404
+ {
1405
+ "kind": "function",
1406
+ "name": "mapCsvToSchema",
1407
+ "return": {
1408
+ "type": {
1409
+ "text": ""
1410
+ }
1411
+ },
1412
+ "parameters": [
1413
+ {
1414
+ "name": "csvRows",
1415
+ "type": {
1416
+ "text": "Record<string, string>[]"
1417
+ },
1418
+ "description": "The parsed CSV rows"
1419
+ },
1420
+ {
1421
+ "name": "schema",
1422
+ "type": {
1423
+ "text": "JSONSchema7 | undefined"
1424
+ },
1425
+ "description": "The JSON schema defining the fields"
1426
+ }
1427
+ ],
1428
+ "description": "Maps CSV rows to schema fields with case-insensitive matching.\nConverts values to appropriate types based on schema definition.",
1429
+ "privacy": "public"
1430
+ },
1431
+ {
1432
+ "kind": "function",
1433
+ "name": "generateCsvTemplate",
1434
+ "return": {
1435
+ "type": {
1436
+ "text": ""
1437
+ }
1438
+ },
1439
+ "parameters": [
1440
+ {
1441
+ "name": "schema",
1442
+ "type": {
1443
+ "text": "JSONSchema7 | undefined"
1444
+ },
1445
+ "description": "The JSON schema defining the fields"
1446
+ },
1447
+ {
1448
+ "name": "uiSchema",
1449
+ "optional": true,
1450
+ "type": {
1451
+ "text": "UiSchema"
1452
+ },
1453
+ "description": "Optional UI schema to determine field order and visibility"
1454
+ },
1455
+ {
1456
+ "name": "includeOptionalFields",
1457
+ "default": "true",
1458
+ "type": {
1459
+ "text": "boolean"
1460
+ },
1461
+ "description": "Whether to include optional fields when no UI schema (default: true)"
1462
+ },
1463
+ {
1464
+ "name": "includeBom",
1465
+ "default": "true",
1466
+ "type": {
1467
+ "text": "boolean"
1468
+ },
1469
+ "description": "Whether to prepend UTF-8 BOM for Excel compatibility (default: true)"
1470
+ }
1471
+ ],
1472
+ "description": "Generates a CSV template string with headers and sample data based on JSON schema.\nIf a UI schema is provided, it will be used to determine which fields to include\nand in what order. Hidden fields in the UI schema will be excluded.",
1473
+ "privacy": "public"
1474
+ },
1475
+ {
1476
+ "kind": "function",
1477
+ "name": "downloadCsvTemplate",
1478
+ "return": {
1479
+ "type": {
1480
+ "text": "void"
1481
+ }
1482
+ },
1483
+ "parameters": [
1484
+ {
1485
+ "name": "csvContent",
1486
+ "type": {
1487
+ "text": "string"
1488
+ },
1489
+ "description": "The CSV content to download"
1490
+ },
1491
+ {
1492
+ "name": "fileName",
1493
+ "default": "'template.csv'",
1494
+ "type": {
1495
+ "text": "string"
1496
+ },
1497
+ "description": "The name for the downloaded file (default: 'template.csv')"
1498
+ }
1499
+ ],
1500
+ "description": "Triggers a download of the CSV template file in the browser.",
1501
+ "privacy": "public"
1502
+ }
1503
+ ],
1504
+ "exports": [
1505
+ {
1506
+ "kind": "js",
1507
+ "name": "parseCsv",
1508
+ "declaration": {
1509
+ "name": "parseCsv",
1510
+ "module": "src/utils/csv-parser.ts"
1511
+ }
1512
+ },
1513
+ {
1514
+ "kind": "js",
1515
+ "name": "mapCsvToSchema",
1516
+ "declaration": {
1517
+ "name": "mapCsvToSchema",
1518
+ "module": "src/utils/csv-parser.ts"
1519
+ }
1520
+ },
1521
+ {
1522
+ "kind": "js",
1523
+ "name": "generateCsvTemplate",
1524
+ "declaration": {
1525
+ "name": "generateCsvTemplate",
1526
+ "module": "src/utils/csv-parser.ts"
1527
+ }
1528
+ },
1529
+ {
1530
+ "kind": "js",
1531
+ "name": "downloadCsvTemplate",
1532
+ "declaration": {
1533
+ "name": "downloadCsvTemplate",
1534
+ "module": "src/utils/csv-parser.ts"
1535
+ }
1536
+ }
1537
+ ]
1538
+ },
1244
1539
  {
1245
1540
  "kind": "javascript-module",
1246
1541
  "path": "src/utils/filters.ts",
@@ -1294,6 +1589,14 @@
1294
1589
  "path": "src/utils/index.ts",
1295
1590
  "declarations": [],
1296
1591
  "exports": [
1592
+ {
1593
+ "kind": "js",
1594
+ "name": "*",
1595
+ "declaration": {
1596
+ "name": "*",
1597
+ "package": "./csv-parser"
1598
+ }
1599
+ },
1297
1600
  {
1298
1601
  "kind": "js",
1299
1602
  "name": "*",
@@ -1342,6 +1645,12 @@
1342
1645
  "declarations": [],
1343
1646
  "exports": []
1344
1647
  },
1648
+ {
1649
+ "kind": "javascript-module",
1650
+ "path": "src/utils/schema-utils.ts",
1651
+ "declarations": [],
1652
+ "exports": []
1653
+ },
1345
1654
  {
1346
1655
  "kind": "javascript-module",
1347
1656
  "path": "src/utils/translation.ts",
@@ -1413,7 +1722,8 @@
1413
1722
  }
1414
1723
  }
1415
1724
  ],
1416
- "description": "Computes a human-friendly anyOf error message for a given control path.\nPrefers UI schema custom message, then JSON schema errorMessage.anyOf, then a constructed fallback."
1725
+ "description": "Computes a human-friendly anyOf error message for a given control path.\nPrefers UI schema custom message, then JSON schema errorMessage.anyOf, then a constructed fallback.",
1726
+ "privacy": "public"
1417
1727
  }
1418
1728
  ],
1419
1729
  "exports": [
@@ -1492,6 +1802,20 @@
1492
1802
  }
1493
1803
  }
1494
1804
  ]
1805
+ },
1806
+ {
1807
+ "kind": "method",
1808
+ "name": "submitRow",
1809
+ "parameters": [
1810
+ {
1811
+ "name": "index",
1812
+ "type": {
1813
+ "text": "number"
1814
+ },
1815
+ "description": "The row index to submit"
1816
+ }
1817
+ ],
1818
+ "description": "Submits a single row by emitting an event that bubbles up to the foundation-form."
1495
1819
  }
1496
1820
  ],
1497
1821
  "superclass": {
@@ -1,6 +1,6 @@
1
1
  import { FoundationElement } from '@microsoft/fast-foundation';
2
2
  import { JSONSchema7 } from 'json-schema';
3
- import { RendererEntry, UiSchema } from './types';
3
+ import { BulkRowStatus, RendererEntry, UiSchema } from './types';
4
4
  /**
5
5
  * Set of default renderers used by the foundation-forms.
6
6
  * @public
@@ -391,6 +391,16 @@ export declare class Form extends Form_base {
391
391
  */
392
392
  resourceName: string;
393
393
  private resourceNameChanged;
394
+ /**
395
+ * Initializes the data with default empty items for bulk insert mode.
396
+ * @internal
397
+ */
398
+ private initializeBulkInsertData;
399
+ /**
400
+ * Transforms the JSON schema to support bulk insert mode by wrapping it in an array.
401
+ * @internal
402
+ */
403
+ private transformSchemaForBulkInsert;
394
404
  /**
395
405
  * Optional confirmation message to display before form submission.
396
406
  * If set, a confirmation dialog will be shown when the user clicks submit.
@@ -413,6 +423,11 @@ export declare class Form extends Form_base {
413
423
  * @internal
414
424
  */
415
425
  approvalModal: any;
426
+ /**
427
+ * Reference to the CSV file input element for bulk import.
428
+ * @internal
429
+ */
430
+ csvFileInput: HTMLInputElement;
416
431
  /**
417
432
  * Stores the approval message entered by the user.
418
433
  * @internal
@@ -521,10 +536,75 @@ export declare class Form extends Form_base {
521
536
  * @public
522
537
  */
523
538
  hideSubmit: boolean;
539
+ /**
540
+ * When enabled, transforms the form into bulk insert mode where multiple records can be added.
541
+ * The JSON schema will be wrapped as an array, and each item will be submitted separately.
542
+ * @public
543
+ */
544
+ bulkInsert: boolean;
545
+ /**
546
+ * Minimum number of items required in bulk insert mode.
547
+ * @public
548
+ */
549
+ bulkInsertMinItems: number;
550
+ /**
551
+ * Maximum number of items allowed in bulk insert mode. If not set, no maximum is enforced.
552
+ * @public
553
+ */
554
+ bulkInsertMaxItems: number | undefined;
555
+ /**
556
+ * Stores the original schema before bulk insert transformation.
557
+ * @internal
558
+ */
559
+ private originalDetailsSchema;
560
+ /**
561
+ * User-provided UI schema for bulk insert mode, stored separately.
562
+ * @internal
563
+ */
564
+ private userProvidedUiSchema;
565
+ /**
566
+ * Tracks the submission status for each row in bulk insert mode.
567
+ * Key is the row index, value is the status object.
568
+ * @public
569
+ */
570
+ rowSubmitStatuses: Map<number, BulkRowStatus>;
524
571
  /**
525
572
  * @internal
526
573
  */
527
574
  _submit(): Promise<void>;
575
+ /**
576
+ * Handles bulk insert submission by iterating through items and submitting each separately.
577
+ * Updates rowSubmitStatuses to provide row-level feedback.
578
+ * @internal
579
+ */
580
+ private _submitBulk;
581
+ /**
582
+ * Updates the submit status for a specific row and triggers reactivity.
583
+ * @param index - The row index
584
+ * @param status - The new status object
585
+ * @internal
586
+ */
587
+ private updateRowStatus;
588
+ /**
589
+ * Clears all row submit statuses, typically called when resetting the form.
590
+ * @public
591
+ */
592
+ clearRowSubmitStatuses(): void;
593
+ /**
594
+ * Submits a single row in bulk insert mode.
595
+ * @param index - The index of the row to submit
596
+ * @returns Promise that resolves when submission is complete
597
+ * @public
598
+ */
599
+ submitSingleRow(index: number): Promise<void>;
600
+ /**
601
+ * Filters item data to only include fields defined in the UI schema.
602
+ * This ensures we don't submit default values for fields not shown in the UI.
603
+ * @param item - The item data to filter
604
+ * @returns Filtered item data containing only UI schema fields
605
+ * @internal
606
+ */
607
+ private filterDataByUiSchema;
528
608
  /**
529
609
  * Builds the commit payload for the form submission.
530
610
  * @internal
@@ -571,6 +651,25 @@ export declare class Form extends Form_base {
571
651
  * @internal
572
652
  */
573
653
  submitWithApproval(): Promise<void>;
654
+ /**
655
+ * Handles CSV file selection for bulk import.
656
+ * Parses the CSV content and appends it to existing form items.
657
+ * @param event - The file input change event
658
+ * @public
659
+ */
660
+ handleCsvFileSelected(event: Event): Promise<void>;
661
+ /**
662
+ * Clears the CSV file input to allow re-selection of the same file.
663
+ * @internal
664
+ */
665
+ private clearCsvFileInput;
666
+ /**
667
+ * Downloads a CSV template file with headers and sample data based on the schema.
668
+ * If a UI schema is provided, it will be used to determine which fields to include
669
+ * and in what order. Hidden fields will be excluded from the template.
670
+ * @public
671
+ */
672
+ downloadCsvTemplate(): void;
574
673
  }
575
674
  export {};
576
675
  //# sourceMappingURL=form.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAqB1C,OAAO,EAAiB,aAAa,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAiBjE;;;GAGG;AACH,eAAO,MAAM,SAAS,OAmBrB,CAAC;;;;;;;kBAbM,CAAC;;;;;;;;8BAiDM,CAAC,cAGV,CADJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA8BwC,CAAA;4IAM3B,CAAC;wFAMyB,CAAC;+IASnC,CAAC;2FAIQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BA6Cd,CAAC;;;;;;;;;;;;;;;;;;;;;;;mBAmEK,CAAC;;;;;;;;;;;;;6BA+BA,CAAC;8BAEkB,CAAC;kBACA,CAAC;;oBAEzB,CAAF;;sBACI,CAAC;oBAEE,CAAC;;;;;;;;gDAU2B,CAAA;;;;;;;;;;;;;;;;;;uBAqC/B,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EA4GyyC,CAAC;yBAA8E,CAAC;UAAoD,GAAG;WAAgD,GAAG;;gBAA6E,GAAG;;;;;;;WAA4V,GAAG;YAAiD,GAAG;;;;;;;;;;;oBAAupC,GAAG;;;;;;;;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KpB;;;OAGG;IACH,KAAK,CAAC,SAAS,UAAO;IAQtB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;;OAGG;IACH,kBAAkB;IAQlB;;;OAGG;IACG,kBAAkB;IA+BxB;;;;;OAKG;IACG,qBAAqB,CAAC,KAAK,EAAE,KAAK;IAwFxC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;;;;OAKG;IACH,mBAAmB;CA8BpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"form.styles.d.ts","sourceRoot":"","sources":["../../src/form.styles.ts"],"names":[],"mappings":"AAKA,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,GAAI,SAAQ,MAAe,WAK7D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,iDAmEhC,CAAC"}
1
+ {"version":3,"file":"form.styles.d.ts","sourceRoot":"","sources":["../../src/form.styles.ts"],"names":[],"mappings":"AAKA,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,GAAI,SAAQ,MAAe,WAK7D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,iDAwGhC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"form.template.d.ts","sourceRoot":"","sources":["../../src/form.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAiBnC,gBAAgB;AAChB,eAAO,MAAM,eAAe,GAAI,WAAM,8DA4DrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,2DAElC,CAAC"}
1
+ {"version":3,"file":"form.template.d.ts","sourceRoot":"","sources":["../../src/form.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAiBnC,gBAAgB;AAChB,eAAO,MAAM,eAAe,GAAI,WAAM,8DA+FrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,2DAElC,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { CoreActions, JsonFormsRendererRegistryEntry, RendererProps, UISchemaElement, ValidationMode } from '@jsonforms/core';
2
2
  import { FASTElement } from '@microsoft/fast-element';
3
3
  import Ajv, { ErrorObject } from 'ajv';
4
+ import { BulkRowStatus } from '../types';
4
5
  export declare class JSONForms extends FASTElement {
5
6
  submitted: boolean;
6
7
  prefix: any;
@@ -24,6 +25,18 @@ export declare class JSONForms extends FASTElement {
24
25
  readonlyChanged(): void;
25
26
  config: any;
26
27
  configChanged(): void;
28
+ /**
29
+ * Row submit statuses for bulk insert mode.
30
+ * Passed from the parent foundation-form.
31
+ */
32
+ rowSubmitStatuses: Map<number, BulkRowStatus>;
33
+ rowSubmitStatusesChanged(): void;
34
+ /**
35
+ * Whether the form is in bulk insert mode.
36
+ * Passed from the parent foundation-form.
37
+ */
38
+ bulkInsert: boolean;
39
+ bulkInsertChanged(): void;
27
40
  get props(): RendererProps;
28
41
  dispatch: (action: CoreActions) => void;
29
42
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"json-forms.d.ts","sourceRoot":"","sources":["../../../src/jsonforms/json-forms.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,WAAW,EAOX,8BAA8B,EAE9B,aAAa,EAEb,eAAe,EACf,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAIL,WAAW,EAIZ,MAAM,yBAAyB,CAAC;AACjC,OAAO,GAAG,EAAE,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAmCvC,qBASa,SAAU,SAAQ,WAAW;IACb,SAAS,EAAE,OAAO,CAAC;IAElC,MAAM,MAAC;IACnB,aAAa;IAGD,SAAS,MAAC;IACV,IAAI,MAAC;IACL,YAAY,MAAC;IAEb,MAAM,MAAC;IACnB,aAAa;IAiDD,QAAQ,EAAE,eAAe,CAAC;IACtC,eAAe;IAIH,IAAI,MAAC;IACjB,WAAW;IAIC,SAAS,EAAE,8BAA8B,EAAE,CAAC;IACxD,gBAAgB;IAIJ,cA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;IACtE,wBAAwB;IAUxB;;;OAGG;IACS,UAAU,EAAE,OAAO,CAAS;IACxC,iBAAiB;IAUjB,IAAI,KAAK,IAAI,aAAa,CAuBzB;IAED,QAAQ,GAAI,QAAQ,WAAW,UAW7B;IAEF;;;;OAIG;IACH,QAAQ,GAAI,aAAQ,KAAG,WAAW,EAAE,CAwClC;IAEI,uBAAuB;CAQ9B"}
@@ -8,5 +8,10 @@ export declare class ArrayListWrapper extends FASTElement {
8
8
  controlChanged(): void;
9
9
  addItem(): void;
10
10
  deleteItem(index: number): void;
11
+ /**
12
+ * Submits a single row by emitting an event that bubbles up to the foundation-form.
13
+ * @param index - The row index to submit
14
+ */
15
+ submitRow(index: number): void;
11
16
  }
12
17
  //# sourceMappingURL=ArrayListWrapperRenderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ArrayListWrapperRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/ArrayListWrapperRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AAajC,eAAO,MAAM,gCAAgC,GAAI,SAAQ,MAAe,6DA2CvE,CAAC;AAsBF,qBAOa,gBAAiB,SAAQ,WAAW;IACnC,IAAI,MAAC;IACL,OAAO,MAAC;IACR,MAAM,MAAC;IACP,QAAQ,MAAC;IAErB,cAAc;IAcd,OAAO;IAOP,UAAU,CAAC,KAAK,EAAE,MAAM;CAGzB"}
1
+ {"version":3,"file":"ArrayListWrapperRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/ArrayListWrapperRenderer.ts"],"names":[],"mappings":"AAEA,OAAO,EAKL,WAAW,EAGZ,MAAM,yBAAyB,CAAC;AA0CjC,eAAO,MAAM,gCAAgC,GAAI,SAAQ,MAAe,6DAkFvE,CAAC;AAyJF,qBAOa,gBAAiB,SAAQ,WAAW;IACnC,IAAI,MAAC;IACL,OAAO,MAAC;IACR,MAAM,MAAC;IACP,QAAQ,MAAC;IAErB,cAAc;IAgBd,OAAO;IAOP,UAAU,CAAC,KAAK,EAAE,MAAM;IAIxB;;;OAGG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM;CAGxB"}