@genesislcap/foundation-forms 14.488.1-FUI-2571.1 → 14.488.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/custom-elements.json +2 -630
  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 +13 -1044
  22. package/dist/foundation-forms.d.ts +0 -181
  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 -55
  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 -205
@@ -179,20 +179,6 @@ export declare type ArrayRendererOptions = {
179
179
  showRowStatusIndicator?: boolean;
180
180
  };
181
181
 
182
- /**
183
- * Flattens `buildReviewSections` output into a single ordered list.
184
- * Section titles are prepended to field labels as "Title — Field".
185
- */
186
- export declare function buildReviewFields(data: Record<string, any>, uiSchema: any, schema: any): ReviewField[];
187
-
188
- /**
189
- * Builds the review panel's fields grouped into sections by their nearest `Group` layout.
190
- * Ungrouped fields are collected into a single section with a `null` title (rendered with
191
- * a placeholder heading). Falls back to a flat, single ungrouped section when no UI schema
192
- * is available.
193
- */
194
- export declare function buildReviewSections(data: Record<string, any>, uiSchema: any, schema: any): ReviewSection[];
195
-
196
182
  /**
197
183
  * Tracks the submission status and result for a single row in bulk insert mode.
198
184
  * @public
@@ -327,12 +313,6 @@ export declare type CategorizationRendererOptions = {
327
313
  */
328
314
  export declare type ChildUiSchemaResolver = (index: number, rowData: any, formData: any) => UiSchema;
329
315
 
330
- /**
331
- * Recursively walks a UI schema element, collecting visible Control fields into `out`.
332
- * Passes the nearest Group label down so children are labelled "Group — Field".
333
- */
334
- export declare function collectReviewFields(element: any, data: any, out: ReviewField[], groupLabel: string | undefined, schema: any): void;
335
-
336
316
  /** @internal */
337
317
  export declare const comboboxRendererStyles: (prefix?: string) => string;
338
318
 
@@ -616,13 +596,6 @@ export declare function extractFieldsFromUiSchema(uiSchema: UiSchema): Array<{
616
596
  isHidden: boolean;
617
597
  }>;
618
598
 
619
- /**
620
- * Filters review sections down to fields whose label or value contains `query`
621
- * (case-insensitive). Sections left with no matching fields are dropped entirely.
622
- * Returns `sections` unchanged when `query` is blank.
623
- */
624
- export declare function filterReviewSections(sections: ReviewSection[], query: string): ReviewSection[];
625
-
626
599
  /**
627
600
  * Foundation filters component for automatically generated filters based on json schema
628
601
  * obtained from the api, supplied initial data or supplied JSON schema.
@@ -1223,12 +1196,6 @@ export declare class Form extends Form_base {
1223
1196
  * @internal
1224
1197
  */
1225
1198
  serverFieldErrors: ErrorObject[];
1226
- /**
1227
- * Reference to the json-forms child element — used to read live validation
1228
- * errors at submit time so review mode never activates when the form is invalid.
1229
- * @internal
1230
- */
1231
- jsonFormsEl: any;
1232
1199
  /**
1233
1200
  * Stores the approval message entered by the user.
1234
1201
  * @internal
@@ -1352,24 +1319,6 @@ export declare class Form extends Form_base {
1352
1319
  * @public
1353
1320
  */
1354
1321
  bulkInsert: boolean;
1355
- /**
1356
- * Text to appear on submit button
1357
- * @default Submit
1358
- * @public
1359
- */
1360
- submitButtonText: string;
1361
- /**
1362
- * Text to appear on submit button in bulk insert mode
1363
- * @default Submit AllS
1364
- * @public
1365
- */
1366
- bulkSubmitButtonText: string;
1367
- /**
1368
- * Text to appear on reset button
1369
- * @default Submit
1370
- * @public
1371
- */
1372
- resetButtonText: string;
1373
1322
  /**
1374
1323
  * Minimum number of items required in bulk insert mode.
1375
1324
  * @public
@@ -1390,68 +1339,16 @@ export declare class Form extends Form_base {
1390
1339
  * @internal
1391
1340
  */
1392
1341
  private userProvidedUiSchema;
1393
- /**
1394
- * When enabled, clicking submit with no validation errors shows a read-only preview
1395
- * of the form data before the final submission.
1396
- * @public
1397
- */
1398
- showSubmitReview: boolean;
1399
- /**
1400
- * Text to appear on reset button
1401
- * @public
1402
- */
1403
- reviewButtonText: string;
1404
- /**
1405
- * Heading shown at the top of the review panel.
1406
- * @public
1407
- */
1408
- reviewHeading: string;
1409
- /**
1410
- * Name of a top-level data field whose value is shown as an identifier next to the
1411
- * review heading (e.g. a record's primary key). No identifier is shown when unset.
1412
- * @public
1413
- */
1414
- reviewIdField: string;
1415
1342
  /**
1416
1343
  * Tracks the submission status for each row in bulk insert mode.
1417
1344
  * Key is the row index, value is the status object.
1418
1345
  * @public
1419
1346
  */
1420
1347
  rowSubmitStatuses: Map<number, BulkRowStatus>;
1421
- /**
1422
- * Whether the form is currently showing the submit-review preview panel.
1423
- * @internal
1424
- */
1425
- reviewMode: boolean;
1426
- /**
1427
- * Field label/value pairs rendered in the review panel, grouped into sections.
1428
- * @internal
1429
- */
1430
- reviewSections: ReviewSection[];
1431
- /**
1432
- * Value of `reviewIdField` resolved from the current form data, if set.
1433
- * @internal
1434
- */
1435
- get reviewRecordId(): string | undefined;
1436
1348
  /**
1437
1349
  * @internal
1438
1350
  */
1439
1351
  _submit(): Promise<void>;
1440
- /**
1441
- * Called from the review panel to go back to the form.
1442
- * @internal
1443
- */
1444
- backFromReview(): void;
1445
- /**
1446
- * Called from the review panel submit button to perform the actual submission.
1447
- * @internal
1448
- */
1449
- _submitFromReview(): Promise<void>;
1450
- /**
1451
- * Performs the actual API submission after review (or directly when review is disabled).
1452
- * @internal
1453
- */
1454
- private _performSubmit;
1455
1352
  /**
1456
1353
  * Handles bulk insert submission by iterating through items and submitting each separately.
1457
1354
  * Updates rowSubmitStatuses to provide row-level feedback.
@@ -1940,13 +1837,6 @@ declare const Form_base: (new (...args: any[]) => {
1940
1837
  focus(options?: FocusOptions): void;
1941
1838
  }) & typeof FoundationElement;
1942
1839
 
1943
- /**
1944
- * Converts a raw field value to a display string for the review panel.
1945
- * Arrays of primitives are comma-joined; arrays of objects and plain objects
1946
- * are rendered as readable `key: value` lines.
1947
- */
1948
- export declare function formatValueForReview(value: any): string;
1949
-
1950
1840
  /**
1951
1841
  * Detail payload for the `data-change` event fired by {@link Form} and `JSONForms` whenever
1952
1842
  * the bound form data changes.
@@ -1972,12 +1862,6 @@ export declare type FormDataChangeEventDetail = {
1972
1862
  path?: string;
1973
1863
  };
1974
1864
 
1975
- /** @internal */
1976
- export declare const foundationFormReviewStyles: ElementStyles;
1977
-
1978
- /** @internal */
1979
- export declare const foundationFormReviewTemplate: ViewTemplate<Review, any>;
1980
-
1981
1865
  /** @internal */
1982
1866
  export declare const foundationFormStyles: ElementStyles;
1983
1867
 
@@ -2055,18 +1939,9 @@ export declare enum GenesisType {
2055
1939
  */
2056
1940
  export declare const getAnyOfErrorMessage: (errors: Array<any> | undefined, schema: any, controlPath: string | undefined, uiCustomMsg?: string) => string;
2057
1941
 
2058
- /**
2059
- * Navigates a `/properties/`-separated path in data to support nested object scopes
2060
- * such as `ADDRESS/properties/STREET` produced by Group layout UI schemas.
2061
- */
2062
- export declare function getDataValueAtPath(data: any, fieldName: string): any;
2063
-
2064
1942
  /** @internal */
2065
1943
  export declare const getPrefixedForm: (prefix: any) => ViewTemplate<Form, any>;
2066
1944
 
2067
- /** @internal */
2068
- export declare const getPrefixedReview: (prefix: any) => ViewTemplate<Review, any>;
2069
-
2070
1945
  /**
2071
1946
  * Fixed height (CSS value) for vertical categorization when `layout` is `{ type: 'vertical'; height?: string }`.
2072
1947
  * @public
@@ -2423,62 +2298,6 @@ export declare type RendererEntry = {
2423
2298
  */
2424
2299
  export declare const renderers: any[];
2425
2300
 
2426
- /**
2427
- * For plain enum combobox fields (no options.data), applies the same `capitalCase`
2428
- * transform the renderer uses — e.g. `SEMI_ANNUAL` → `Semi Annual`.
2429
- * Navigates the JSON schema via the fieldName path to confirm the field is an enum
2430
- * before transforming. Returns `null` for non-enum fields.
2431
- */
2432
- export declare function resolveEnumLabel(raw: any, fieldName: string, schema: any): string | null;
2433
-
2434
- /**
2435
- * Looks up the display label for a raw value from `options.data` (used by segmented,
2436
- * radio group, and enum-with-explicit-data renderers). Returns `null` when no match found.
2437
- */
2438
- export declare function resolveOptionLabel(raw: any, options: any): string | null;
2439
-
2440
- /**
2441
- * Read-only preview panel shown by `<foundation-form>` when `show-submit-review` is enabled.
2442
- * Renders the reviewed data grouped into sections with a header and a filter field.
2443
- * @public
2444
- */
2445
- export declare class Review extends FASTElement {
2446
- prefix: string;
2447
- /**
2448
- * Title shown in the review header.
2449
- * @public
2450
- */
2451
- heading: string;
2452
- /**
2453
- * Optional identifier shown next to the heading, e.g. a record's primary key.
2454
- * @public
2455
- */
2456
- recordId: string;
2457
- /**
2458
- * Sections of label/value pairs to render, grouped by their nearest UI schema `Group`.
2459
- * @public
2460
- */
2461
- sections: ReviewSection[];
2462
- /**
2463
- * Free-text query filtering fields by label or value. Sections with no matching
2464
- * fields are hidden.
2465
- * @internal
2466
- */
2467
- filterText: string;
2468
- /** @internal */
2469
- get filteredSections(): ReviewSection[];
2470
- }
2471
-
2472
- export declare type ReviewField = {
2473
- label: string;
2474
- value: string;
2475
- };
2476
-
2477
- export declare type ReviewSection = {
2478
- title: string | null;
2479
- fields: ReviewField[];
2480
- };
2481
-
2482
2301
  /**
2483
2302
  * Detail payload for the `row-status-changed` event fired by {@link Form} whenever the
2484
2303
  * submission status of one or all bulk insert rows changes.
package/dist/react.cjs CHANGED
@@ -17,7 +17,6 @@ const { StepperWrapper: StepperWrapperWC } = require('./esm/jsonforms/renderers/
17
17
  const { VerticalCategorizationWrapper: VerticalCategorizationWrapperWC } = require('./esm/jsonforms/renderers/VerticalCategorizationWrapperRenderer.js');
18
18
  const { DispatchRenderer: DispatchRendererWC } = require('./esm/jsonforms/renderers/dispatch-renderer.js');
19
19
  const { FoundationReactSlot: FoundationReactSlotWC } = require('./esm/jsonforms/renderers/foundation-react-slot.js');
20
- const { Review: ReviewWC } = require('./esm/review.js');
21
20
 
22
21
  function _mergeRefs(...refs) {
23
22
  return (value) => {
@@ -105,11 +104,6 @@ const Form = React.forwardRef(function Form(props, ref) {
105
104
  return React.createElement(customElements.getName(FormWC) ?? 'foundation-form', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
106
105
  });
107
106
 
108
- const Review = React.forwardRef(function Review(props, ref) {
109
- const { children, ...rest } = props;
110
- return React.createElement(customElements.getName(ReviewWC) ?? 'foundation-form-review', { ...rest, ref }, children);
111
- });
112
-
113
107
  const Filters = React.forwardRef(function Filters(props, ref) {
114
108
  const { children, ...rest } = props;
115
109
  return React.createElement(customElements.getName(FiltersWC) ?? 'foundation-filters', { ...rest, ref }, children);
@@ -174,7 +168,6 @@ const FoundationReactSlot = React.forwardRef(function FoundationReactSlot(props,
174
168
 
175
169
  module.exports = {
176
170
  Form,
177
- Review,
178
171
  Filters,
179
172
  JSONForms,
180
173
  ArrayListWrapper,
package/dist/react.mjs CHANGED
@@ -15,7 +15,6 @@ import { StepperWrapper as StepperWrapperWC } from './esm/jsonforms/renderers/St
15
15
  import { VerticalCategorizationWrapper as VerticalCategorizationWrapperWC } from './esm/jsonforms/renderers/VerticalCategorizationWrapperRenderer.js';
16
16
  import { DispatchRenderer as DispatchRendererWC } from './esm/jsonforms/renderers/dispatch-renderer.js';
17
17
  import { FoundationReactSlot as FoundationReactSlotWC } from './esm/jsonforms/renderers/foundation-react-slot.js';
18
- import { Review as ReviewWC } from './esm/review.js';
19
18
 
20
19
  function _mergeRefs(...refs) {
21
20
  return (value) => {
@@ -103,11 +102,6 @@ export const Form = React.forwardRef(function Form(props, ref) {
103
102
  return React.createElement(customElements.getName(FormWC) ?? 'foundation-form', { ...rest, ref: _mergeRefs(_innerRef, ref) }, children);
104
103
  });
105
104
 
106
- export const Review = React.forwardRef(function Review(props, ref) {
107
- const { children, ...rest } = props;
108
- return React.createElement(customElements.getName(ReviewWC) ?? 'foundation-form-review', { ...rest, ref }, children);
109
- });
110
-
111
105
  export const Filters = React.forwardRef(function Filters(props, ref) {
112
106
  const { children, ...rest } = props;
113
107
  return React.createElement(customElements.getName(FiltersWC) ?? 'foundation-filters', { ...rest, ref }, children);
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.488.1-FUI-2571.1",
4
+ "version": "14.488.1",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -59,13 +59,13 @@
59
59
  }
60
60
  },
61
61
  "devDependencies": {
62
- "@genesislcap/foundation-testing": "14.488.1-FUI-2571.1",
63
- "@genesislcap/genx": "14.488.1-FUI-2571.1",
64
- "@genesislcap/rollup-builder": "14.488.1-FUI-2571.1",
65
- "@genesislcap/ts-builder": "14.488.1-FUI-2571.1",
66
- "@genesislcap/uvu-playwright-builder": "14.488.1-FUI-2571.1",
67
- "@genesislcap/vite-builder": "14.488.1-FUI-2571.1",
68
- "@genesislcap/webpack-builder": "14.488.1-FUI-2571.1",
62
+ "@genesislcap/foundation-testing": "14.488.1",
63
+ "@genesislcap/genx": "14.488.1",
64
+ "@genesislcap/rollup-builder": "14.488.1",
65
+ "@genesislcap/ts-builder": "14.488.1",
66
+ "@genesislcap/uvu-playwright-builder": "14.488.1",
67
+ "@genesislcap/vite-builder": "14.488.1",
68
+ "@genesislcap/webpack-builder": "14.488.1",
69
69
  "@types/json-schema": "^7.0.11",
70
70
  "@types/papaparse": "^5.3.14"
71
71
  },
@@ -82,12 +82,12 @@
82
82
  }
83
83
  },
84
84
  "dependencies": {
85
- "@genesislcap/foundation-comms": "14.488.1-FUI-2571.1",
86
- "@genesislcap/foundation-criteria": "14.488.1-FUI-2571.1",
87
- "@genesislcap/foundation-logger": "14.488.1-FUI-2571.1",
88
- "@genesislcap/foundation-notifications": "14.488.1-FUI-2571.1",
89
- "@genesislcap/foundation-ui": "14.488.1-FUI-2571.1",
90
- "@genesislcap/foundation-utils": "14.488.1-FUI-2571.1",
85
+ "@genesislcap/foundation-comms": "14.488.1",
86
+ "@genesislcap/foundation-criteria": "14.488.1",
87
+ "@genesislcap/foundation-logger": "14.488.1",
88
+ "@genesislcap/foundation-notifications": "14.488.1",
89
+ "@genesislcap/foundation-ui": "14.488.1",
90
+ "@genesislcap/foundation-utils": "14.488.1",
91
91
  "@json-schema-tools/dereferencer": "^1.6.1",
92
92
  "@jsonforms/core": "^3.2.1",
93
93
  "@microsoft/fast-components": "2.30.6",
@@ -109,5 +109,5 @@
109
109
  "access": "public"
110
110
  },
111
111
  "customElements": "dist/custom-elements.json",
112
- "gitHead": "895e5ee6992484c60ac422e56dfe363b9e4b5add"
112
+ "gitHead": "59f08be328928035b4591fa97da580cc650f96c3"
113
113
  }
@@ -1,34 +0,0 @@
1
- import { FASTElement } from '@microsoft/fast-element';
2
- import { type ReviewSection } from './utils/review-utils';
3
- /**
4
- * Read-only preview panel shown by `<foundation-form>` when `show-submit-review` is enabled.
5
- * Renders the reviewed data grouped into sections with a header and a filter field.
6
- * @public
7
- */
8
- export declare class Review extends FASTElement {
9
- prefix: string;
10
- /**
11
- * Title shown in the review header.
12
- * @public
13
- */
14
- heading: string;
15
- /**
16
- * Optional identifier shown next to the heading, e.g. a record's primary key.
17
- * @public
18
- */
19
- recordId: string;
20
- /**
21
- * Sections of label/value pairs to render, grouped by their nearest UI schema `Group`.
22
- * @public
23
- */
24
- sections: ReviewSection[];
25
- /**
26
- * Free-text query filtering fields by label or value. Sections with no matching
27
- * fields are hidden.
28
- * @internal
29
- */
30
- filterText: string;
31
- /** @internal */
32
- get filteredSections(): ReviewSection[];
33
- }
34
- //# sourceMappingURL=review.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"review.d.ts","sourceRoot":"","sources":["../../src/review.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,WAAW,EAAwB,MAAM,yBAAyB,CAAC;AAGjG,OAAO,EAAwB,KAAK,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAEhF;;;;GAIG;AACH,qBAMa,MAAO,SAAQ,WAAW;IACQ,MAAM,EAAE,MAAM,CAAW;IAEtE;;;OAGG;IACG,OAAO,EAAE,MAAM,CAAY;IAEjC;;;OAGG;IAC+B,QAAQ,EAAE,MAAM,CAAC;IAEnD;;;OAGG;IACS,QAAQ,EAAE,aAAa,EAAE,CAAM;IAE3C;;;;OAIG;IACS,UAAU,EAAE,MAAM,CAAM;IAEpC,gBAAgB;IAChB,IACI,gBAAgB,IAAI,aAAa,EAAE,CAEtC;CACF"}
@@ -1,3 +0,0 @@
1
- /** @internal */
2
- export declare const foundationFormReviewStyles: import("@microsoft/fast-element").ElementStyles;
3
- //# sourceMappingURL=review.styles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"review.styles.d.ts","sourceRoot":"","sources":["../../src/review.styles.ts"],"names":[],"mappings":"AAKA,gBAAgB;AAChB,eAAO,MAAM,0BAA0B,iDAyFtC,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { Review } from './review';
2
- /** @internal */
3
- export declare const getPrefixedReview: (prefix: any) => import("@microsoft/fast-element").ViewTemplate<Review, any>;
4
- /** @internal */
5
- export declare const foundationFormReviewTemplate: import("@microsoft/fast-element").ViewTemplate<Review, any>;
6
- //# sourceMappingURL=review.template.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"review.template.d.ts","sourceRoot":"","sources":["../../src/review.template.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAGvC,gBAAgB;AAChB,eAAO,MAAM,iBAAiB,GAAI,WAAM,gEA0CvC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,4BAA4B,6DAExC,CAAC"}
@@ -1,55 +0,0 @@
1
- export type ReviewField = {
2
- label: string;
3
- value: string;
4
- };
5
- export type ReviewSection = {
6
- title: string | null;
7
- fields: ReviewField[];
8
- };
9
- /**
10
- * Flattens `buildReviewSections` output into a single ordered list.
11
- * Section titles are prepended to field labels as "Title — Field".
12
- */
13
- export declare function buildReviewFields(data: Record<string, any>, uiSchema: any, schema: any): ReviewField[];
14
- /**
15
- * Builds the review panel's fields grouped into sections by their nearest `Group` layout.
16
- * Ungrouped fields are collected into a single section with a `null` title (rendered with
17
- * a placeholder heading). Falls back to a flat, single ungrouped section when no UI schema
18
- * is available.
19
- */
20
- export declare function buildReviewSections(data: Record<string, any>, uiSchema: any, schema: any): ReviewSection[];
21
- /**
22
- * Filters review sections down to fields whose label or value contains `query`
23
- * (case-insensitive). Sections left with no matching fields are dropped entirely.
24
- * Returns `sections` unchanged when `query` is blank.
25
- */
26
- export declare function filterReviewSections(sections: ReviewSection[], query: string): ReviewSection[];
27
- /**
28
- * Recursively walks a UI schema element, collecting visible Control fields into `out`.
29
- * Passes the nearest Group label down so children are labelled "Group — Field".
30
- */
31
- export declare function collectReviewFields(element: any, data: any, out: ReviewField[], groupLabel: string | undefined, schema: any): void;
32
- /**
33
- * Looks up the display label for a raw value from `options.data` (used by segmented,
34
- * radio group, and enum-with-explicit-data renderers). Returns `null` when no match found.
35
- */
36
- export declare function resolveOptionLabel(raw: any, options: any): string | null;
37
- /**
38
- * For plain enum combobox fields (no options.data), applies the same `capitalCase`
39
- * transform the renderer uses — e.g. `SEMI_ANNUAL` → `Semi Annual`.
40
- * Navigates the JSON schema via the fieldName path to confirm the field is an enum
41
- * before transforming. Returns `null` for non-enum fields.
42
- */
43
- export declare function resolveEnumLabel(raw: any, fieldName: string, schema: any): string | null;
44
- /**
45
- * Navigates a `/properties/`-separated path in data to support nested object scopes
46
- * such as `ADDRESS/properties/STREET` produced by Group layout UI schemas.
47
- */
48
- export declare function getDataValueAtPath(data: any, fieldName: string): any;
49
- /**
50
- * Converts a raw field value to a display string for the review panel.
51
- * Arrays of primitives are comma-joined; arrays of objects and plain objects
52
- * are rendered as readable `key: value` lines.
53
- */
54
- export declare function formatValueForReview(value: any): string;
55
- //# sourceMappingURL=review-utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"review-utils.d.ts","sourceRoot":"","sources":["../../../src/utils/review-utils.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC;AAE5E;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,QAAQ,EAAE,GAAG,EACb,MAAM,EAAE,GAAG,GACV,WAAW,EAAE,CAOf;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,QAAQ,EAAE,GAAG,EACb,MAAM,EAAE,GAAG,GACV,aAAa,EAAE,CA2DjB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAc9F;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,GAAG,EACZ,IAAI,EAAE,GAAG,EACT,GAAG,EAAE,WAAW,EAAE,EAClB,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,MAAM,EAAE,GAAG,GACV,IAAI,CA6BN;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI,CAIxE;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI,CAiBxF;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,GAAG,GAAG,CAEpE;AAYD;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAuBvD"}
@@ -1,63 +0,0 @@
1
- import { __decorate } from "tslib";
2
- import { attr, customElement, FASTElement, observable, volatile } from '@microsoft/fast-element';
3
- import { foundationFormReviewStyles as styles } from './review.styles';
4
- import { foundationFormReviewTemplate as template } from './review.template';
5
- import { filterReviewSections } from './utils/review-utils';
6
- /**
7
- * Read-only preview panel shown by `<foundation-form>` when `show-submit-review` is enabled.
8
- * Renders the reviewed data grouped into sections with a header and a filter field.
9
- * @public
10
- */
11
- let Review = class Review extends FASTElement {
12
- constructor() {
13
- super(...arguments);
14
- this.prefix = 'rapid';
15
- /**
16
- * Title shown in the review header.
17
- * @public
18
- */
19
- this.heading = 'Review';
20
- /**
21
- * Sections of label/value pairs to render, grouped by their nearest UI schema `Group`.
22
- * @public
23
- */
24
- this.sections = [];
25
- /**
26
- * Free-text query filtering fields by label or value. Sections with no matching
27
- * fields are hidden.
28
- * @internal
29
- */
30
- this.filterText = '';
31
- }
32
- /** @internal */
33
- get filteredSections() {
34
- return filterReviewSections(this.sections, this.filterText);
35
- }
36
- };
37
- __decorate([
38
- attr({ attribute: 'design-system-prefix' })
39
- ], Review.prototype, "prefix", void 0);
40
- __decorate([
41
- attr
42
- ], Review.prototype, "heading", void 0);
43
- __decorate([
44
- attr({ attribute: 'record-id' })
45
- ], Review.prototype, "recordId", void 0);
46
- __decorate([
47
- observable
48
- ], Review.prototype, "sections", void 0);
49
- __decorate([
50
- observable
51
- ], Review.prototype, "filterText", void 0);
52
- __decorate([
53
- volatile
54
- ], Review.prototype, "filteredSections", null);
55
- Review = __decorate([
56
- customElement({
57
- name: 'foundation-form-review',
58
- template,
59
- styles,
60
- shadowOptions: null,
61
- })
62
- ], Review);
63
- export { Review };
@@ -1,93 +0,0 @@
1
- import { designUnit, strokeWidth } from '@microsoft/fast-components';
2
- import { css } from '@microsoft/fast-element';
3
- import { forcedColorsStylesheetBehavior } from '@microsoft/fast-foundation';
4
- import { SystemColors } from '@microsoft/fast-web-utilities';
5
- /** @internal */
6
- export const foundationFormReviewStyles = css `
7
- foundation-form-review {
8
- display: flex;
9
- flex-direction: column;
10
- flex: 1;
11
- min-height: 0;
12
- overflow: hidden;
13
- }
14
-
15
- foundation-form-review .review-header {
16
- display: flex;
17
- align-items: baseline;
18
- gap: calc(${designUnit} * 2px);
19
- padding: calc(${designUnit} * 2px) calc(${designUnit} * 2px) calc(${designUnit} * 1px);
20
- border-bottom: calc(${strokeWidth} * 1px) solid var(--neutral-stroke-rest, rgb(0 0 0 / 12%));
21
- }
22
-
23
- foundation-form-review .review-title {
24
- font-size: var(--type-ramp-plus-1-font-size, 1rem);
25
- line-height: var(--type-ramp-plus-1-line-height, 1.5rem);
26
- font-weight: 600;
27
- color: var(--neutral-foreground-rest);
28
- }
29
-
30
- foundation-form-review .review-id {
31
- font-family: var(--mono-font-family, 'Courier New', Courier, monospace);
32
- font-size: var(--type-ramp-base-font-size, 0.875rem);
33
- color: var(--neutral-foreground-hint, rgb(0 0 0 / 60%));
34
- }
35
-
36
- foundation-form-review .review-filter {
37
- padding: calc(${designUnit} * 2px);
38
- }
39
-
40
- foundation-form-review .review-filter-input {
41
- width: 100%;
42
- }
43
-
44
- foundation-form-review .review-body {
45
- flex: 1;
46
- overflow-y: auto;
47
- min-height: 0;
48
- scrollbar-color: var(--neutral-stroke-rest) transparent;
49
- }
50
-
51
- foundation-form-review .review-section-header {
52
- font-size: var(--type-ramp-minus-1-font-size, 0.75rem);
53
- line-height: var(--type-ramp-minus-1-line-height, 1rem);
54
- font-weight: 600;
55
- letter-spacing: 0.04em;
56
- text-transform: uppercase;
57
- color: var(--neutral-foreground-hint, rgb(0 0 0 / 60%));
58
- background-color: var(--neutral-layer-2, rgb(0 0 0 / 4%));
59
- padding: calc(${designUnit} * 1px) calc(${designUnit} * 2px);
60
- margin-top: calc(${designUnit} * 3px);
61
- }
62
-
63
- foundation-form-review .review-field {
64
- display: flex;
65
- align-items: baseline;
66
- justify-content: space-between;
67
- gap: calc(${designUnit} * 2px);
68
- padding: calc(${designUnit} * 1.5px) calc(${designUnit} * 2px);
69
- border-bottom: calc(${strokeWidth} * 1px) solid var(--neutral-stroke-rest, rgb(0 0 0 / 12%));
70
- }
71
-
72
- foundation-form-review .review-field:last-child {
73
- border-bottom: none;
74
- }
75
-
76
- foundation-form-review .review-field-label {
77
- color: var(--neutral-foreground-hint, rgb(0 0 0 / 60%));
78
- font-size: var(--type-ramp-base-font-size, 0.875rem);
79
- flex-shrink: 0;
80
- }
81
-
82
- foundation-form-review .review-field-value {
83
- color: var(--neutral-foreground-rest);
84
- font-size: var(--type-ramp-base-font-size, 0.875rem);
85
- text-align: right;
86
- word-break: break-word;
87
- white-space: pre-wrap;
88
- }
89
- `.withBehaviors(forcedColorsStylesheetBehavior(css `
90
- foundation-form-review {
91
- background: ${SystemColors.Canvas};
92
- }
93
- `));