@genesislcap/foundation-forms 14.488.2-FUI-2571.3 → 14.488.2-GENC-1351.2

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 (37) hide show
  1. package/dist/custom-elements.json +1115 -1775
  2. package/dist/dts/form.d.ts +0 -77
  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/index.d.ts +0 -3
  7. package/dist/dts/index.d.ts.map +1 -1
  8. package/dist/dts/jsonforms/renderers/CategorizationWrapperRenderer.d.ts.map +1 -1
  9. package/dist/dts/react.d.ts +0 -10
  10. package/dist/dts/utils/index.d.ts +0 -1
  11. package/dist/dts/utils/index.d.ts.map +1 -1
  12. package/dist/dts/utils/schema-utils.d.ts +0 -12
  13. package/dist/dts/utils/schema-utils.d.ts.map +1 -1
  14. package/dist/esm/form.js +1 -120
  15. package/dist/esm/form.styles.js +2 -9
  16. package/dist/esm/form.template.js +24 -58
  17. package/dist/esm/index.js +0 -3
  18. package/dist/esm/jsonforms/renderers/CategorizationWrapperRenderer.js +45 -1
  19. package/dist/esm/utils/index.js +0 -1
  20. package/dist/esm/utils/schema-utils.js +0 -48
  21. package/dist/foundation-forms.api.json +112 -1227
  22. package/dist/foundation-forms.d.ts +0 -200
  23. package/dist/react.cjs +0 -7
  24. package/dist/react.mjs +0 -6
  25. package/package.json +15 -15
  26. package/dist/dts/review.d.ts +0 -34
  27. package/dist/dts/review.d.ts.map +0 -1
  28. package/dist/dts/review.styles.d.ts +0 -3
  29. package/dist/dts/review.styles.d.ts.map +0 -1
  30. package/dist/dts/review.template.d.ts +0 -6
  31. package/dist/dts/review.template.d.ts.map +0 -1
  32. package/dist/dts/utils/review-utils.d.ts +0 -73
  33. package/dist/dts/utils/review-utils.d.ts.map +0 -1
  34. package/dist/esm/review.js +0 -63
  35. package/dist/esm/review.styles.js +0 -93
  36. package/dist/esm/review.template.js +0 -38
  37. package/dist/esm/utils/review-utils.js +0 -269
@@ -2,7 +2,6 @@ import { FoundationElement } from '@microsoft/fast-foundation';
2
2
  import { ErrorObject } from 'ajv';
3
3
  import { JSONSchema7 } from 'json-schema';
4
4
  import { BulkRowStatus, FormDataChangeEventDetail, RendererEntry, UiSchema } from './types';
5
- import { ReviewSection } from './utils';
6
5
  /**
7
6
  * Set of default renderers used by the foundation-forms.
8
7
  * @public
@@ -451,12 +450,6 @@ export declare class Form extends Form_base {
451
450
  * @internal
452
451
  */
453
452
  serverFieldErrors: ErrorObject[];
454
- /**
455
- * Reference to the json-forms child element — used to read live validation
456
- * errors at submit time so review mode never activates when the form is invalid.
457
- * @internal
458
- */
459
- jsonFormsEl: any;
460
453
  /**
461
454
  * Stores the approval message entered by the user.
462
455
  * @internal
@@ -580,24 +573,6 @@ export declare class Form extends Form_base {
580
573
  * @public
581
574
  */
582
575
  bulkInsert: boolean;
583
- /**
584
- * Text to appear on submit button
585
- * @default Submit
586
- * @public
587
- */
588
- submitButtonText: string;
589
- /**
590
- * Text to appear on submit button in bulk insert mode
591
- * @default Submit AllS
592
- * @public
593
- */
594
- bulkSubmitButtonText: string;
595
- /**
596
- * Text to appear on reset button
597
- * @default Submit
598
- * @public
599
- */
600
- resetButtonText: string;
601
576
  /**
602
577
  * Minimum number of items required in bulk insert mode.
603
578
  * @public
@@ -618,68 +593,16 @@ export declare class Form extends Form_base {
618
593
  * @internal
619
594
  */
620
595
  private userProvidedUiSchema;
621
- /**
622
- * When enabled, clicking submit with no validation errors shows a read-only preview
623
- * of the form data before the final submission.
624
- * @public
625
- */
626
- showSubmitReview: boolean;
627
- /**
628
- * Text to appear on reset button
629
- * @public
630
- */
631
- reviewButtonText: string;
632
- /**
633
- * Heading shown at the top of the review panel.
634
- * @public
635
- */
636
- reviewHeading: string;
637
- /**
638
- * Name of a top-level data field whose value is shown as an identifier next to the
639
- * review heading (e.g. a record's primary key). No identifier is shown when unset.
640
- * @public
641
- */
642
- reviewIdField: string;
643
596
  /**
644
597
  * Tracks the submission status for each row in bulk insert mode.
645
598
  * Key is the row index, value is the status object.
646
599
  * @public
647
600
  */
648
601
  rowSubmitStatuses: Map<number, BulkRowStatus>;
649
- /**
650
- * Whether the form is currently showing the submit-review preview panel.
651
- * @internal
652
- */
653
- reviewMode: boolean;
654
- /**
655
- * Field label/value pairs rendered in the review panel, grouped into sections.
656
- * @internal
657
- */
658
- reviewSections: ReviewSection[];
659
- /**
660
- * Value of `reviewIdField` resolved from the current form data, if set.
661
- * @internal
662
- */
663
- get reviewRecordId(): string | undefined;
664
602
  /**
665
603
  * @internal
666
604
  */
667
605
  _submit(): Promise<void>;
668
- /**
669
- * Called from the review panel to go back to the form.
670
- * @internal
671
- */
672
- backFromReview(): void;
673
- /**
674
- * Called from the review panel submit button to perform the actual submission.
675
- * @internal
676
- */
677
- _submitFromReview(): Promise<void>;
678
- /**
679
- * Performs the actual API submission after review (or directly when review is disabled).
680
- * @internal
681
- */
682
- private _performSubmit;
683
606
  /**
684
607
  * Handles bulk insert submission by iterating through items and submitting each separately.
685
608
  * Updates rowSubmitStatuses to provide row-level feedback.
@@ -1 +1 @@
1
- {"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../../src/form.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAyB1C,OAAO,EACL,aAAa,EAOb,yBAAyB,EACzB,aAAa,EAOb,QAAQ,EACT,MAAM,SAAS,CAAC;AACjB,OAAO,EAWL,aAAa,EACd,MAAM,SAAS,CAAC;AAiBjB;;;GAGG;AACH,eAAO,MAAM,SAAS,OAwBrB,CAAC;;;;;;;kBAjEa,CAAC;;;;;;;;8BA2Dc,CAAC,cACzB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;yB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ACH,oBAAoB;IAKpB;;;;OAIG;IACH,kBAAkB,IAAI,IAAI;IAK1B;;;OAGG;IACH,KAAK,CAAC,SAAS,UAAO;IAUtB;;;OAGG;IACH,OAAO,CAAC,sBAAsB;IAW9B;;;OAGG;IACH,OAAO,CAAC,0BAA0B;IAQlC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAOzB;;;OAGG;IACH,kBAAkB;IAQlB;;;OAGG;IACG,kBAAkB;IAmCxB;;;;;OAKG;IACG,qBAAqB,CAAC,KAAK,EAAE,KAAK;IA4FxC;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;;;;OAKG;IACH,mBAAmB;CA+BpB"}
@@ -1 +1 @@
1
- {"version":3,"file":"form.styles.d.ts","sourceRoot":"","sources":["../../src/form.styles.ts"],"names":[],"mappings":"AAMA,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,GAAI,SAAQ,MAAe,WAK7D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,iDA2IhC,CAAC"}
1
+ {"version":3,"file":"form.styles.d.ts","sourceRoot":"","sources":["../../src/form.styles.ts"],"names":[],"mappings":"AAMA,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,GAAI,SAAQ,MAAe,WAK7D,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,oBAAoB,iDAoIhC,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;AAmBnC,gBAAgB;AAChB,eAAO,MAAM,eAAe,GAAI,WAAM,8DA+JrC,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,8DAkHrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,2DAElC,CAAC"}
@@ -2,9 +2,6 @@ export * from './filters';
2
2
  export * from './form';
3
3
  export * from './form.styles';
4
4
  export * from './form.template';
5
- export * from './review';
6
- export * from './review.styles';
7
- export * from './review.template';
8
5
  export { MulticolumnDropdownControlRendererEntry, MulticolumnDropdownControlRendererTemplate, } from './jsonforms/renderers/MulticolumnDropdownControlRenderer';
9
6
  export { LayoutVerticalCategorizationRendererEntry } from './jsonforms/renderers/LayoutVerticalCategorizationRenderer';
10
7
  export { controlWrapperTemplate, controlWrapperStyles,
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACL,uCAAuC,EACvC,0CAA0C,GAC3C,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,yCAAyC,EAAE,MAAM,4DAA4D,CAAC;AACvH,OAAO,EACL,sBAAsB,EACtB,oBAAoB;AACpB,8DAA8D;AAC9D,cAAc;AACd,8DAA8D;AAC9D,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,qBAAqB;AACrB,6DAA6D;AAC7D,aAAa,GACd,MAAM,sCAAsC,CAAC;AAC9C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,OAAO,EACL,uCAAuC,EACvC,0CAA0C,GAC3C,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,yCAAyC,EAAE,MAAM,4DAA4D,CAAC;AACvH,OAAO,EACL,sBAAsB,EACtB,oBAAoB;AACpB,8DAA8D;AAC9D,cAAc;AACd,8DAA8D;AAC9D,8BAA8B,GAC/B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EACL,qBAAqB;AACrB,6DAA6D;AAC7D,aAAa,GACd,MAAM,sCAAsC,CAAC;AAC9C,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CategorizationWrapperRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/CategorizationWrapperRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,WAAW,EAIZ,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAY,eAAe,EAAE,MAAM,aAAa,CAAC;AAGxD;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,QAAQ,EAAE,eAAe,EAAE,GAC1B,MAAM,CAKR;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,GAAG,MAAM,CAMrF;AAED,eAAO,MAAM,oBAAoB,iDAKhC,CAAC;AAEF,eAAO,MAAM,qCAAqC,GAChD,eAAe,+EA6DhB,CAAC;AAkBF,qBAQa,qBAAsB,SAAQ,WAAW;IACxC,IAAI,MAAC;IACL,OAAO,MAAC;IACR,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAgB;IACxC,cAAc,EAAE,MAAM,CAAK;IAEvC;;;;;;;OAOG;IACH,OAAO,CAAC,wBAAwB,CAAS;IAEzC,cAAc;IAUd,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIjC,eAAe,CAAC,KAAK,EAAE,KAAK;IAQ5B,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO;CAQjD"}
1
+ {"version":3,"file":"CategorizationWrapperRenderer.d.ts","sourceRoot":"","sources":["../../../../src/jsonforms/renderers/CategorizationWrapperRenderer.ts"],"names":[],"mappings":"AACA,OAAO,EAKL,WAAW,EAIZ,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAA2C,eAAe,EAAE,MAAM,aAAa,CAAC;AAEvF;;;;;;;GAOG;AACH,wBAAgB,0BAA0B,CACxC,cAAc,EAAE,MAAM,GAAG,SAAS,EAClC,QAAQ,EAAE,eAAe,EAAE,GAC1B,MAAM,CAKR;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,GAAG,MAAM,CAMrF;AAED,eAAO,MAAM,oBAAoB,iDAKhC,CAAC;AAEF,eAAO,MAAM,qCAAqC,GAChD,eAAe,+EA6DhB,CAAC;AAkBF,qBAQa,qBAAsB,SAAQ,WAAW;IACxC,IAAI,MAAC;IACL,OAAO,MAAC;IACR,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,CAAgB;IACxC,cAAc,EAAE,MAAM,CAAK;IAEvC;;;;;;;OAOG;IACH,OAAO,CAAC,wBAAwB,CAAS;IAEzC,cAAc;IAUd,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAIjC,eAAe,CAAC,KAAK,EAAE,KAAK;IAQ5B,gBAAgB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO;CAQjD"}
@@ -15,7 +15,6 @@ import type { StepperWrapper as StepperWrapperWC } from './jsonforms/renderers/S
15
15
  import type { VerticalCategorizationWrapper as VerticalCategorizationWrapperWC } from './jsonforms/renderers/VerticalCategorizationWrapperRenderer';
16
16
  import type { DispatchRenderer as DispatchRendererWC } from './jsonforms/renderers/dispatch-renderer';
17
17
  import type { FoundationReactSlot as FoundationReactSlotWC } from './jsonforms/renderers/foundation-react-slot';
18
- import type { Review as ReviewWC } from './review';
19
18
  import type { BulkSubmitResult, CsvImportedEventDetail, CsvParseErrorEventDetail, CsvTemplateDownloadedEventDetail, CsvTemplateErrorEventDetail, FormDataChangeEventDetail, RowStatusChangedEventDetail, RowSubmitFailureEventDetail, RowSubmitSuccessEventDetail, SubmitFailureEventDetail, SubmitPartialSuccessEventDetail } from '@genesislcap/foundation-forms';
20
19
 
21
20
  /** @internal Maps a web component class to its public props only.
@@ -69,15 +68,6 @@ export declare const Form: React.ForwardRefExoticComponent<
69
68
  >;
70
69
  export type FormRef = FormWC;
71
70
 
72
- export declare const Review: React.ForwardRefExoticComponent<
73
- React.PropsWithChildren<
74
- Omit<PublicOf<ReviewWC>, 'children' | 'style'> &
75
- HTMLWCProps & {
76
- }
77
- > & React.RefAttributes<ReviewWC>
78
- >;
79
- export type ReviewRef = ReviewWC;
80
-
81
71
  export declare const Filters: React.ForwardRefExoticComponent<
82
72
  React.PropsWithChildren<
83
73
  Omit<PublicOf<FiltersWC>, 'children' | 'style'> &
@@ -1,5 +1,4 @@
1
1
  export * from './csv-parser';
2
- export * from './review-utils';
3
2
  export * from './filters';
4
3
  export * from './logger';
5
4
  export * from './translation';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,SAAS,CAAC"}
@@ -1,4 +1,3 @@
1
- import { ErrorObject } from 'ajv';
2
1
  import type { UiSchema, UiSchemaElement } from '../types';
3
2
  /**
4
3
  * Extracted control info for grid layout rendering.
@@ -37,17 +36,6 @@ export declare function withGridView(uiSchema: UiSchema): UiSchema;
37
36
  * @internal
38
37
  */
39
38
  export declare function isBulkUiSchema(uischema: UiSchema): boolean;
40
- /**
41
- * Converts AJV validation errors to the JSON Schema scope strings they correspond to
42
- * (e.g. `#/properties/ADDRESS/properties/STREET`). Used to match errors back to UI
43
- * schema controls for features like categorization-tab error indicators.
44
- */
45
- export declare function extractErrorScopes(errors: ErrorObject[]): string[];
46
- /**
47
- * Returns true when `uiSchema` (or any of its descendants) has a scope that appears
48
- * in `errorScopes`. Walks both `elements` and `options.childElements`.
49
- */
50
- export declare function uiSchemaHasAnyError(uiSchema: UiSchemaElement | UiSchema, errorScopes: string[]): boolean;
51
39
  /**
52
40
  * Generates a UI schema suitable for bulk insert mode with array control.
53
41
  * @param userProvidedUiSchema - Optional user-provided UI schema to use as childUiSchema
@@ -1 +1 @@
1
- {"version":3,"file":"schema-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/schema-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AAClC,OAAO,KAAK,EAAiC,QAAQ,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEzF;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,QAAQ,EAAE,eAAe,CAAC;IAC1B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,SAAS,EAAE,MAAM,CAAC;CACnB;AAaD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,GAAG,gBAAgB,EAAE,CA6ClF;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAiBzD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAK1D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,EAAE,CAelE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,GAAG,QAAQ,EACpC,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAmBT;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,oBAAoB,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,QAAQ,CAoBrF"}
1
+ {"version":3,"file":"schema-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/schema-utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE1D;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,iDAAiD;IACjD,QAAQ,EAAE,eAAe,CAAC;IAC1B,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,2FAA2F;IAC3F,SAAS,EAAE,MAAM,CAAC;CACnB;AAaD;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,QAAQ,GAAG,gBAAgB,EAAE,CA6ClF;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAiBzD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAK1D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,oBAAoB,CAAC,EAAE,QAAQ,GAAG,IAAI,GAAG,QAAQ,CAoBrF"}
package/dist/esm/form.js CHANGED
@@ -29,7 +29,7 @@ import { NumberControlRendererEntry } from './jsonforms/renderers/NumberControlR
29
29
  import { SegmentedControlRendererEntry } from './jsonforms/renderers/SegmentedControlRenderer';
30
30
  import { StringArrayEntry } from './jsonforms/renderers/StringArrayControlRenderer';
31
31
  import { StringControlRendererTemplate } from './jsonforms/renderers/StringControlRenderer';
32
- import { buildReviewSections, downloadCsvTemplate as downloadCsvFile, extractFieldsFromUiSchema, generateCsvTemplate, getDataValueAtPath, logger, mapCsvToSchema, mapGenesisFieldErrorsToAdditionalErrors, parseCsv, } from './utils';
32
+ import { downloadCsvTemplate as downloadCsvFile, extractFieldsFromUiSchema, generateCsvTemplate, logger, mapCsvToSchema, mapGenesisFieldErrorsToAdditionalErrors, parseCsv, } from './utils';
33
33
  import { findModalParent, showConfirmationDialog } from './utils/confirmation-dialog-utils';
34
34
  import { removeDataPropertiesNotInSchema } from './utils/form-utils';
35
35
  import { generateBulkUiSchema, isBulkUiSchema } from './utils/schema-utils';
@@ -149,55 +149,17 @@ let Form = class Form extends LifecycleMixin(FoundationElement) {
149
149
  * @public
150
150
  */
151
151
  this.data = {};
152
- /**
153
- * Text to appear on submit button
154
- * @default Submit
155
- * @public
156
- */
157
- this.submitButtonText = 'Submit';
158
- /**
159
- * Text to appear on submit button in bulk insert mode
160
- * @default Submit AllS
161
- * @public
162
- */
163
- this.bulkSubmitButtonText = 'Submit All';
164
- /**
165
- * Text to appear on reset button
166
- * @default Submit
167
- * @public
168
- */
169
- this.resetButtonText = 'Reset';
170
152
  /**
171
153
  * Minimum number of items required in bulk insert mode.
172
154
  * @public
173
155
  */
174
156
  this.bulkInsertMinItems = 1;
175
- /**
176
- * Text to appear on reset button
177
- * @public
178
- */
179
- this.reviewButtonText = 'Review';
180
- /**
181
- * Heading shown at the top of the review panel.
182
- * @public
183
- */
184
- this.reviewHeading = 'Review';
185
157
  /**
186
158
  * Tracks the submission status for each row in bulk insert mode.
187
159
  * Key is the row index, value is the status object.
188
160
  * @public
189
161
  */
190
162
  this.rowSubmitStatuses = new Map();
191
- /**
192
- * Whether the form is currently showing the submit-review preview panel.
193
- * @internal
194
- */
195
- this.reviewMode = false;
196
- /**
197
- * Field label/value pairs rendered in the review panel, grouped into sections.
198
- * @internal
199
- */
200
- this.reviewSections = [];
201
163
  }
202
164
  resourceNameChanged() {
203
165
  return __awaiter(this, void 0, void 0, function* () {
@@ -296,23 +258,11 @@ let Form = class Form extends LifecycleMixin(FoundationElement) {
296
258
  const { renderers: defaultRenderers = [], additionalRenderers = [] } = this;
297
259
  this.mergedRenderers = [...defaultRenderers, ...additionalRenderers];
298
260
  }
299
- /**
300
- * Value of `reviewIdField` resolved from the current form data, if set.
301
- * @internal
302
- */
303
- get reviewRecordId() {
304
- if (!this.reviewIdField) {
305
- return undefined;
306
- }
307
- const value = getDataValueAtPath(this.data, this.reviewIdField);
308
- return value === undefined || value === null ? undefined : String(value);
309
- }
310
261
  /**
311
262
  * @internal
312
263
  */
313
264
  _submit() {
314
265
  return __awaiter(this, void 0, void 0, function* () {
315
- var _a, _b, _c, _d, _e, _f, _g, _h;
316
266
  if (this.submitting) {
317
267
  return;
318
268
  }
@@ -337,46 +287,6 @@ let Form = class Form extends LifecycleMixin(FoundationElement) {
337
287
  yield this._submitBulk();
338
288
  return;
339
289
  }
340
- // Show review preview if enabled and the form has no validation errors.
341
- // Read live errors directly from the json-forms element so we always use
342
- // the current validation state (this.errors can lag in edge cases such as
343
- // required fields with empty-string values not yet reported via data-change).
344
- const jfEl = this.jsonFormsEl;
345
- const hasErrors = jfEl
346
- ? ((_d = (_c = (_b = (_a = jfEl.jsonforms) === null || _a === void 0 ? void 0 : _a.core) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0 ||
347
- ((_h = (_g = (_f = (_e = jfEl.jsonforms) === null || _e === void 0 ? void 0 : _e.core) === null || _f === void 0 ? void 0 : _f.additionalErrors) === null || _g === void 0 ? void 0 : _g.length) !== null && _h !== void 0 ? _h : 0) > 0
348
- : this.errors.length > 0;
349
- if (this.showSubmitReview && !hasErrors) {
350
- this.reviewSections = yield buildReviewSections(this.data || {}, this.userProvidedUiSchema || this.uischema, this.originalDetailsSchema || this.jsonSchema);
351
- this.reviewMode = true;
352
- return;
353
- }
354
- yield this._performSubmit();
355
- });
356
- }
357
- /**
358
- * Called from the review panel to go back to the form.
359
- * @internal
360
- */
361
- backFromReview() {
362
- this.reviewMode = false;
363
- }
364
- /**
365
- * Called from the review panel submit button to perform the actual submission.
366
- * @internal
367
- */
368
- _submitFromReview() {
369
- return __awaiter(this, void 0, void 0, function* () {
370
- this.reviewMode = false;
371
- yield this._performSubmit();
372
- });
373
- }
374
- /**
375
- * Performs the actual API submission after review (or directly when review is disabled).
376
- * @internal
377
- */
378
- _performSubmit() {
379
- return __awaiter(this, void 0, void 0, function* () {
380
290
  const payload = Object.assign({}, this.data);
381
291
  const commitPayload = this.buildCommitPayload(payload);
382
292
  logger.debug({ payload, errors: this.errors });
@@ -728,8 +638,6 @@ let Form = class Form extends LifecycleMixin(FoundationElement) {
728
638
  */
729
639
  reset(clearData = true) {
730
640
  this.submitted = false;
731
- this.reviewMode = false;
732
- this.reviewSections = [];
733
641
  this.clearRowSubmitStatuses();
734
642
  this.serverFieldErrors = [];
735
643
  if (clearData) {
@@ -994,15 +902,6 @@ __decorate([
994
902
  __decorate([
995
903
  attr({ attribute: 'bulk-insert', mode: 'boolean' })
996
904
  ], Form.prototype, "bulkInsert", void 0);
997
- __decorate([
998
- attr({ attribute: 'submit-button-text' })
999
- ], Form.prototype, "submitButtonText", void 0);
1000
- __decorate([
1001
- attr({ attribute: 'bulk-submit-button-text' })
1002
- ], Form.prototype, "bulkSubmitButtonText", void 0);
1003
- __decorate([
1004
- attr({ attribute: 'reset-button-text' })
1005
- ], Form.prototype, "resetButtonText", void 0);
1006
905
  __decorate([
1007
906
  attr({
1008
907
  attribute: 'bulk-insert-min-items',
@@ -1021,27 +920,9 @@ __decorate([
1021
920
  },
1022
921
  })
1023
922
  ], Form.prototype, "bulkInsertMaxItems", void 0);
1024
- __decorate([
1025
- attr({ attribute: 'show-submit-review', mode: 'boolean' })
1026
- ], Form.prototype, "showSubmitReview", void 0);
1027
- __decorate([
1028
- attr({ attribute: 'review-button-text' })
1029
- ], Form.prototype, "reviewButtonText", void 0);
1030
- __decorate([
1031
- attr({ attribute: 'review-heading' })
1032
- ], Form.prototype, "reviewHeading", void 0);
1033
- __decorate([
1034
- attr({ attribute: 'review-id-field' })
1035
- ], Form.prototype, "reviewIdField", void 0);
1036
923
  __decorate([
1037
924
  observable
1038
925
  ], Form.prototype, "rowSubmitStatuses", void 0);
1039
- __decorate([
1040
- observable
1041
- ], Form.prototype, "reviewMode", void 0);
1042
- __decorate([
1043
- observable
1044
- ], Form.prototype, "reviewSections", void 0);
1045
926
  __decorate([
1046
927
  volatile
1047
928
  ], Form.prototype, "isSubmitHidden", null);
@@ -22,17 +22,10 @@ export const foundationFormStyles = css `
22
22
  min-width: 64px;
23
23
  width: 100%;
24
24
  height: 100%;
25
- display: flex;
26
- flex-direction: column;
27
- overflow: hidden;
28
- box-sizing: border-box;
29
- }
30
-
31
- foundation-form json-forms {
32
- flex: 1;
33
25
  overflow-y: auto;
34
- min-height: 0;
26
+ display: inline-block;
35
27
  scrollbar-color: var(--neutral-stroke-rest) transparent;
28
+ box-sizing: border-box;
36
29
  }
37
30
 
38
31
  foundation-form .actions {
@@ -6,12 +6,11 @@ import { CategorizationWrapper } from './jsonforms/renderers/CategorizationWrapp
6
6
  import { DispatchRenderer } from './jsonforms/renderers/dispatch-renderer';
7
7
  import { StepperWrapper } from './jsonforms/renderers/StepperWrapperRenderer';
8
8
  import { VerticalCategorizationWrapper } from './jsonforms/renderers/VerticalCategorizationWrapperRenderer';
9
- import { Review } from './review';
10
- avoidTreeShaking(JSONForms, ArrayListWrapper, CategorizationWrapper, VerticalCategorizationWrapper, DispatchRenderer, StepperWrapper, Review);
9
+ avoidTreeShaking(JSONForms, ArrayListWrapper, CategorizationWrapper, VerticalCategorizationWrapper, DispatchRenderer, StepperWrapper);
11
10
  /** @internal */
12
11
  export const getPrefixedForm = (prefix) => html `
13
12
  <template>
14
- ${when((x) => !x.reviewMode && x.bulkInsert, html `
13
+ ${when((x) => x.bulkInsert, html `
15
14
  <div class="csv-upload-section" part="csv-upload">
16
15
  <input
17
16
  type="file"
@@ -40,76 +39,43 @@ export const getPrefixedForm = (prefix) => html `
40
39
  </${prefix}-button>
41
40
  </div>
42
41
  `)}
43
- ${when((x) => !x.reviewMode, html `
44
- <json-forms
45
- ${ref('jsonFormsEl')}
46
- @submit-button-clicked=${(x) => x._submit()}
47
- @submit-part=${(x, c) => x.submitPart(c.event)}
48
- @submit-single-row=${(x, c) => x.submitSingleRow(c.event.detail.index)}
49
- @reset-form=${(x) => x.reset(false)}
50
- ?readonly=${(x) => x.readonly}
51
- :submitted=${(x) => x.submitted}
52
- :renderers=${(x) => x.mergedRenderers}
53
- :uischema=${(x) => x.uischema}
54
- :schema=${(x) => x.jsonSchema}
55
- :data=${(x) => x.data}
56
- :serverFieldErrors=${(x) => x.serverFieldErrors}
57
- :prefix=${(x) => x.prefix}
58
- :rowSubmitStatuses=${(x) => x.rowSubmitStatuses}
59
- :bulkInsert=${(x) => x.bulkInsert}
60
- @data-change=${(x, c) => x.onChange(c.event)}
61
- ></json-forms>
62
- `)}
63
- ${when((x) => x.reviewMode, html `
64
- <foundation-form-review
65
- part="review-panel"
66
- design-system-prefix=${(x) => x.prefix}
67
- heading=${(x) => x.reviewHeading}
68
- :recordId=${(x) => x.reviewRecordId}
69
- :sections=${(x) => x.reviewSections}
70
- ></foundation-form-review>
71
- `)}
72
- ${when((x) => x.reviewMode || x.isSubmitHidden || x.isResetVisible, html `
42
+ <json-forms
43
+ @submit-button-clicked=${(x) => x._submit()}
44
+ @submit-part=${(x, c) => x.submitPart(c.event)}
45
+ @submit-single-row=${(x, c) => x.submitSingleRow(c.event.detail.index)}
46
+ @reset-form=${(x) => x.reset(false)}
47
+ ?readonly=${(x) => x.readonly}
48
+ :submitted=${(x) => x.submitted}
49
+ :renderers=${(x) => x.mergedRenderers}
50
+ :uischema=${(x) => x.uischema}
51
+ :schema=${(x) => x.jsonSchema}
52
+ :data=${(x) => x.data}
53
+ :serverFieldErrors=${(x) => x.serverFieldErrors}
54
+ :prefix=${(x) => x.prefix}
55
+ :rowSubmitStatuses=${(x) => x.rowSubmitStatuses}
56
+ :bulkInsert=${(x) => x.bulkInsert}
57
+ @data-change=${(x, c) => x.onChange(c.event)}
58
+ ></json-forms>
59
+ ${when((x) => x.isSubmitHidden || x.isResetVisible, html `
73
60
  <slot name="userActions" part="userActions" class="actions">
74
- ${when((x) => !x.reviewMode && x.isResetVisible, html `
61
+ ${when((x) => x.isResetVisible, html `
75
62
  <${prefix}-button
76
63
  @click="${(x) => x.handleResetClicked()}"
77
64
  class="reset-button"
78
65
  appearance="neutral"
79
66
  data-test-id="reset-button"
80
67
  >
81
- ${(x) => x.resetButtonText}
82
- </${prefix}-button>
83
- `)}
84
- ${when((x) => x.reviewMode, html `
85
- <${prefix}-button
86
- @click="${(x) => x.backFromReview()}"
87
- class="reset-button"
88
- appearance="neutral"
89
- data-test-id="review-back-button"
90
- >
91
- Back
68
+ Reset
92
69
  </${prefix}-button>
93
70
  `)}
94
- ${when((x) => !x.reviewMode && x.isSubmitHidden, html `
71
+ ${when((x) => x.isSubmitHidden, html `
95
72
  <${prefix}-button
96
73
  @click="${(x) => x._submit()}"
97
74
  ?disable=${(x) => !x.submitting}
98
75
  class="submit-button"
99
76
  appearance="accent"
100
77
  >
101
- ${(x) => (x.bulkInsert ? x.bulkSubmitButtonText : x.submitButtonText)}
102
- </${prefix}-button>
103
- `)}
104
- ${when((x) => x.reviewMode, html `
105
- <${prefix}-button
106
- @click="${(x) => x._submitFromReview()}"
107
- ?disabled=${(x) => x.submitting}
108
- class="submit-button"
109
- appearance="accent"
110
- data-test-id="review-submit-button"
111
- >
112
- ${(x) => (x.showSubmitReview ? x.reviewButtonText : x.submitButtonText)}
78
+ ${(x) => (x.bulkInsert ? 'Submit All' : 'Submit')}
113
79
  </${prefix}-button>
114
80
  `)}
115
81
  </slot>
package/dist/esm/index.js CHANGED
@@ -2,9 +2,6 @@ export * from './filters';
2
2
  export * from './form';
3
3
  export * from './form.styles';
4
4
  export * from './form.template';
5
- export * from './review';
6
- export * from './review.styles';
7
- export * from './review.template';
8
5
  export { MulticolumnDropdownControlRendererEntry, MulticolumnDropdownControlRendererTemplate, } from './jsonforms/renderers/MulticolumnDropdownControlRenderer';
9
6
  export { LayoutVerticalCategorizationRendererEntry } from './jsonforms/renderers/LayoutVerticalCategorizationRenderer';
10
7
  export { controlWrapperTemplate, controlWrapperStyles,
@@ -1,7 +1,6 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { html, css, observable, customElement, FASTElement, repeat, when, } from '@microsoft/fast-element';
3
3
  import { classNames } from '@microsoft/fast-web-utilities';
4
- import { extractErrorScopes, uiSchemaHasAnyError } from '../../utils/schema-utils';
5
4
  /**
6
5
  * Resolves the `activeCategory` option (the zero-based index of the category
7
6
  * tab that should open on first render) to a valid tab index. Out-of-bounds or
@@ -161,3 +160,48 @@ CategorizationWrapper = __decorate([
161
160
  })
162
161
  ], CategorizationWrapper);
163
162
  export { CategorizationWrapper };
163
+ function uiSchemaHasAnyError(uiSchema, errorScopes) {
164
+ // Direct scope match
165
+ if (typeof uiSchema.scope === 'string' &&
166
+ errorScopes.includes(uiSchema.scope)) {
167
+ return true;
168
+ }
169
+ // Check composite children via options.childElements
170
+ const options = uiSchema.options;
171
+ const childElements = options === null || options === void 0 ? void 0 : options.childElements;
172
+ if (Array.isArray(childElements)) {
173
+ for (const child of childElements) {
174
+ if (uiSchemaHasAnyError(child, errorScopes)) {
175
+ return true;
176
+ }
177
+ }
178
+ }
179
+ // Check layout children (elements)
180
+ if (Array.isArray(uiSchema.elements)) {
181
+ for (const el of uiSchema.elements) {
182
+ if (uiSchemaHasAnyError(el, errorScopes)) {
183
+ return true;
184
+ }
185
+ }
186
+ }
187
+ return false;
188
+ }
189
+ function extractErrorScopes(errors) {
190
+ var _a;
191
+ const scopes = new Set();
192
+ for (const error of errors) {
193
+ if (error.keyword === 'required' && ((_a = error.params) === null || _a === void 0 ? void 0 : _a.missingProperty)) {
194
+ const basePath = error.instancePath || '';
195
+ const prop = error.params.missingProperty;
196
+ // Normalize the base path
197
+ const fullPath = basePath === '' ? `#/properties/${prop}` : `#${basePath}/properties/${prop}`;
198
+ scopes.add(fullPath);
199
+ }
200
+ else if (error.instancePath) {
201
+ // Remove leading slash and convert to JSON Pointer path
202
+ const instancePath = `#${error.instancePath.replace(/\//g, '/properties/')}`;
203
+ scopes.add(instancePath);
204
+ }
205
+ }
206
+ return Array.from(scopes);
207
+ }
@@ -1,5 +1,4 @@
1
1
  export * from './csv-parser';
2
- export * from './review-utils';
3
2
  export * from './filters';
4
3
  export * from './logger';
5
4
  export * from './translation';