@genesislcap/foundation-forms 14.492.0-FUI-2571.4 → 14.492.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 +1 -341
- package/dist/dts/form.d.ts +0 -87
- 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/index.d.ts +0 -3
- package/dist/dts/index.d.ts.map +1 -1
- package/dist/dts/jsonforms/renderers/CategorizationWrapperRenderer.d.ts.map +1 -1
- package/dist/dts/react.d.ts +0 -10
- package/dist/dts/utils/index.d.ts +0 -1
- package/dist/dts/utils/index.d.ts.map +1 -1
- package/dist/dts/utils/schema-utils.d.ts +0 -12
- package/dist/dts/utils/schema-utils.d.ts.map +1 -1
- package/dist/esm/form.js +2 -129
- package/dist/esm/form.styles.js +2 -9
- package/dist/esm/form.template.js +25 -59
- package/dist/esm/index.js +0 -3
- package/dist/esm/jsonforms/renderers/CategorizationWrapperRenderer.js +45 -1
- package/dist/esm/utils/index.js +0 -1
- package/dist/esm/utils/schema-utils.js +0 -48
- package/dist/foundation-forms.api.json +0 -428
- package/dist/foundation-forms.d.ts +0 -217
- package/dist/react.cjs +0 -7
- package/dist/react.mjs +0 -6
- package/package.json +15 -15
- package/dist/dts/review.d.ts +0 -34
- package/dist/dts/review.d.ts.map +0 -1
- package/dist/dts/review.styles.d.ts +0 -3
- package/dist/dts/review.styles.d.ts.map +0 -1
- package/dist/dts/review.template.d.ts +0 -6
- package/dist/dts/review.template.d.ts.map +0 -1
- package/dist/dts/utils/review-utils.d.ts +0 -82
- package/dist/dts/utils/review-utils.d.ts.map +0 -1
- package/dist/esm/review.js +0 -63
- package/dist/esm/review.styles.js +0 -93
- package/dist/esm/review.template.js +0 -38
- package/dist/esm/utils/review-utils.js +0 -241
|
@@ -179,32 +179,6 @@ export declare type ArrayRendererOptions = {
|
|
|
179
179
|
showRowStatusIndicator?: boolean;
|
|
180
180
|
};
|
|
181
181
|
|
|
182
|
-
/**
|
|
183
|
-
* Builds the review panel's fields grouped into sections by their nearest `Group` layout.
|
|
184
|
-
* Sections are formed from consecutive runs of the same group title as fields are
|
|
185
|
-
* encountered in the UI schema — not a global title lookup — so two fields that happen to
|
|
186
|
-
* share a title (including `null`, for ungrouped fields) don't get merged into one section
|
|
187
|
-
* unless they're actually adjacent. Otherwise an ungrouped field appearing after a Group
|
|
188
|
-
* would jump back up next to earlier ungrouped fields instead of staying where it sits in
|
|
189
|
-
* the form, and two distinct Groups with the same label would collapse into one. Falls back
|
|
190
|
-
* to a flat, single ungrouped section when no UI schema is available.
|
|
191
|
-
*
|
|
192
|
-
* Async because connected-select fields backed by `options.allOptionsResourceName` (rather
|
|
193
|
-
* than a static `options.data`) resolve their display label with a criteria-filtered fetch
|
|
194
|
-
* — see `resolveResourceOptionLabel`. The UI schema is walked synchronously to collect one
|
|
195
|
-
* value-resolution promise per field (preserving encounter order), then all promises settle
|
|
196
|
-
* in parallel via `Promise.all` before fields are added to their sections — so a slow fetch
|
|
197
|
-
* for one field can't reorder fields that resolved faster.
|
|
198
|
-
*
|
|
199
|
-
* This is the single walker of the UI schema for review purposes — `Form` calls it directly
|
|
200
|
-
* to populate `Review.sections`. Don't reimplement this traversal elsewhere; the two
|
|
201
|
-
* previously did drift (a since-removed `collectReviewFields` resolved labels via
|
|
202
|
-
* `resolveOptionLabel` / `resolveEnumLabel` only, silently skipping `resolveResourceOptionLabel`
|
|
203
|
-
* and showing raw ids for connected-select fields).
|
|
204
|
-
* @internal
|
|
205
|
-
*/
|
|
206
|
-
export declare function buildReviewSections(data: Record<string, any>, uiSchema: any, schema: any): Promise<ReviewSection[]>;
|
|
207
|
-
|
|
208
182
|
/**
|
|
209
183
|
* Tracks the submission status and result for a single row in bulk insert mode.
|
|
210
184
|
* @public
|
|
@@ -622,14 +596,6 @@ export declare function extractFieldsFromUiSchema(uiSchema: UiSchema): Array<{
|
|
|
622
596
|
isHidden: boolean;
|
|
623
597
|
}>;
|
|
624
598
|
|
|
625
|
-
/**
|
|
626
|
-
* Filters review sections down to fields whose label or value contains `query`
|
|
627
|
-
* (case-insensitive). Sections left with no matching fields are dropped entirely.
|
|
628
|
-
* Returns `sections` unchanged when `query` is blank.
|
|
629
|
-
* @internal
|
|
630
|
-
*/
|
|
631
|
-
export declare function filterReviewSections(sections: ReviewSection[], query: string): ReviewSection[];
|
|
632
|
-
|
|
633
599
|
/**
|
|
634
600
|
* Foundation filters component for automatically generated filters based on json schema
|
|
635
601
|
* obtained from the api, supplied initial data or supplied JSON schema.
|
|
@@ -1230,12 +1196,6 @@ export declare class Form extends Form_base {
|
|
|
1230
1196
|
* @internal
|
|
1231
1197
|
*/
|
|
1232
1198
|
serverFieldErrors: ErrorObject[];
|
|
1233
|
-
/**
|
|
1234
|
-
* Reference to the json-forms child element — used to read live validation
|
|
1235
|
-
* errors at submit time so review mode never activates when the form is invalid.
|
|
1236
|
-
* @internal
|
|
1237
|
-
*/
|
|
1238
|
-
jsonFormsEl: any;
|
|
1239
1199
|
/**
|
|
1240
1200
|
* Stores the approval message entered by the user.
|
|
1241
1201
|
* @internal
|
|
@@ -1359,24 +1319,6 @@ export declare class Form extends Form_base {
|
|
|
1359
1319
|
* @public
|
|
1360
1320
|
*/
|
|
1361
1321
|
bulkInsert: boolean;
|
|
1362
|
-
/**
|
|
1363
|
-
* Text to appear on submit button
|
|
1364
|
-
* @default Submit
|
|
1365
|
-
* @public
|
|
1366
|
-
*/
|
|
1367
|
-
submitButtonText: string;
|
|
1368
|
-
/**
|
|
1369
|
-
* Text to appear on submit button in bulk insert mode
|
|
1370
|
-
* @default Submit AllS
|
|
1371
|
-
* @public
|
|
1372
|
-
*/
|
|
1373
|
-
bulkSubmitButtonText: string;
|
|
1374
|
-
/**
|
|
1375
|
-
* Text to appear on reset button
|
|
1376
|
-
* @default Submit
|
|
1377
|
-
* @public
|
|
1378
|
-
*/
|
|
1379
|
-
resetButtonText: string;
|
|
1380
1322
|
/**
|
|
1381
1323
|
* Minimum number of items required in bulk insert mode.
|
|
1382
1324
|
* @public
|
|
@@ -1397,78 +1339,16 @@ export declare class Form extends Form_base {
|
|
|
1397
1339
|
* @internal
|
|
1398
1340
|
*/
|
|
1399
1341
|
private userProvidedUiSchema;
|
|
1400
|
-
/**
|
|
1401
|
-
* When enabled, clicking submit with no validation errors shows a read-only preview
|
|
1402
|
-
* of the form data before the final submission.
|
|
1403
|
-
* @public
|
|
1404
|
-
*/
|
|
1405
|
-
showSubmitReview: boolean;
|
|
1406
|
-
/**
|
|
1407
|
-
* Text to appear on reset button
|
|
1408
|
-
* @public
|
|
1409
|
-
*/
|
|
1410
|
-
reviewButtonText: string;
|
|
1411
|
-
/**
|
|
1412
|
-
* Heading shown at the top of the review panel.
|
|
1413
|
-
* @public
|
|
1414
|
-
*/
|
|
1415
|
-
reviewHeading: string;
|
|
1416
|
-
/**
|
|
1417
|
-
* Name of a top-level data field whose value is shown as an identifier next to the
|
|
1418
|
-
* review heading (e.g. a record's primary key). No identifier is shown when unset.
|
|
1419
|
-
* @public
|
|
1420
|
-
*/
|
|
1421
|
-
reviewIdField: string;
|
|
1422
1342
|
/**
|
|
1423
1343
|
* Tracks the submission status for each row in bulk insert mode.
|
|
1424
1344
|
* Key is the row index, value is the status object.
|
|
1425
1345
|
* @public
|
|
1426
1346
|
*/
|
|
1427
1347
|
rowSubmitStatuses: Map<number, BulkRowStatus>;
|
|
1428
|
-
/**
|
|
1429
|
-
* Whether the form is currently showing the submit-review preview panel.
|
|
1430
|
-
* @internal
|
|
1431
|
-
*/
|
|
1432
|
-
reviewMode: boolean;
|
|
1433
|
-
/**
|
|
1434
|
-
* Field label/value pairs rendered in the review panel, grouped into sections.
|
|
1435
|
-
* @internal
|
|
1436
|
-
*/
|
|
1437
|
-
reviewSections: ReviewSection[];
|
|
1438
|
-
/**
|
|
1439
|
-
* Value of `reviewIdField` resolved from the current form data, if set.
|
|
1440
|
-
* @internal
|
|
1441
|
-
*/
|
|
1442
|
-
get reviewRecordId(): string | undefined;
|
|
1443
1348
|
/**
|
|
1444
1349
|
* @internal
|
|
1445
1350
|
*/
|
|
1446
1351
|
_submit(): Promise<void>;
|
|
1447
|
-
/**
|
|
1448
|
-
* Called from the review panel to go back to the form.
|
|
1449
|
-
* @internal
|
|
1450
|
-
*/
|
|
1451
|
-
backFromReview(): void;
|
|
1452
|
-
/**
|
|
1453
|
-
* Called from the review panel submit button to perform the actual submission.
|
|
1454
|
-
* @internal
|
|
1455
|
-
*/
|
|
1456
|
-
_submitFromReview(): Promise<void>;
|
|
1457
|
-
/**
|
|
1458
|
-
* Whether the form currently has validation errors. Reads live errors directly from the
|
|
1459
|
-
* json-forms element when it's mounted, so we always use the current validation state
|
|
1460
|
-
* (this.errors can lag in edge cases such as required fields with empty-string values not
|
|
1461
|
-
* yet reported via data-change). Falls back to this.errors when json-forms isn't mounted
|
|
1462
|
-
* (e.g. while the read-only review panel is showing), which is safe since no interactive
|
|
1463
|
-
* editing happens during review.
|
|
1464
|
-
* @internal
|
|
1465
|
-
*/
|
|
1466
|
-
private hasValidationErrors;
|
|
1467
|
-
/**
|
|
1468
|
-
* Performs the actual API submission after review (or directly when review is disabled).
|
|
1469
|
-
* @internal
|
|
1470
|
-
*/
|
|
1471
|
-
private _performSubmit;
|
|
1472
1352
|
/**
|
|
1473
1353
|
* Handles bulk insert submission by iterating through items and submitting each separately.
|
|
1474
1354
|
* Updates rowSubmitStatuses to provide row-level feedback.
|
|
@@ -1957,14 +1837,6 @@ declare const Form_base: (new (...args: any[]) => {
|
|
|
1957
1837
|
focus(options?: FocusOptions): void;
|
|
1958
1838
|
}) & typeof FoundationElement;
|
|
1959
1839
|
|
|
1960
|
-
/**
|
|
1961
|
-
* Converts a raw field value to a display string for the review panel.
|
|
1962
|
-
* Arrays of primitives are comma-joined; arrays of objects and plain objects
|
|
1963
|
-
* are rendered as readable `key: value` lines.
|
|
1964
|
-
* @internal
|
|
1965
|
-
*/
|
|
1966
|
-
export declare function formatValueForReview(value: any): string;
|
|
1967
|
-
|
|
1968
1840
|
/**
|
|
1969
1841
|
* Detail payload for the `data-change` event fired by {@link Form} and `JSONForms` whenever
|
|
1970
1842
|
* the bound form data changes.
|
|
@@ -1990,12 +1862,6 @@ export declare type FormDataChangeEventDetail = {
|
|
|
1990
1862
|
path?: string;
|
|
1991
1863
|
};
|
|
1992
1864
|
|
|
1993
|
-
/** @internal */
|
|
1994
|
-
export declare const foundationFormReviewStyles: ElementStyles;
|
|
1995
|
-
|
|
1996
|
-
/** @internal */
|
|
1997
|
-
export declare const foundationFormReviewTemplate: ViewTemplate<Review, any>;
|
|
1998
|
-
|
|
1999
1865
|
/** @internal */
|
|
2000
1866
|
export declare const foundationFormStyles: ElementStyles;
|
|
2001
1867
|
|
|
@@ -2073,19 +1939,9 @@ export declare enum GenesisType {
|
|
|
2073
1939
|
*/
|
|
2074
1940
|
export declare const getAnyOfErrorMessage: (errors: Array<any> | undefined, schema: any, controlPath: string | undefined, uiCustomMsg?: string) => string;
|
|
2075
1941
|
|
|
2076
|
-
/**
|
|
2077
|
-
* Navigates a `/properties/`-separated path in data to support nested object scopes
|
|
2078
|
-
* such as `ADDRESS/properties/STREET` produced by Group layout UI schemas.
|
|
2079
|
-
* @internal
|
|
2080
|
-
*/
|
|
2081
|
-
export declare function getDataValueAtPath(data: any, fieldName: string): any;
|
|
2082
|
-
|
|
2083
1942
|
/** @internal */
|
|
2084
1943
|
export declare const getPrefixedForm: (prefix: any) => ViewTemplate<Form, any>;
|
|
2085
1944
|
|
|
2086
|
-
/** @internal */
|
|
2087
|
-
export declare const getPrefixedReview: (prefix: any) => ViewTemplate<Review, any>;
|
|
2088
|
-
|
|
2089
1945
|
/**
|
|
2090
1946
|
* Fixed height (CSS value) for vertical categorization when `layout` is `{ type: 'vertical'; height?: string }`.
|
|
2091
1947
|
* @public
|
|
@@ -2442,79 +2298,6 @@ export declare type RendererEntry = {
|
|
|
2442
2298
|
*/
|
|
2443
2299
|
export declare const renderers: any[];
|
|
2444
2300
|
|
|
2445
|
-
/**
|
|
2446
|
-
* For plain enum combobox fields (no options.data), applies the same `capitalCase`
|
|
2447
|
-
* transform the renderer uses — e.g. `SEMI_ANNUAL` → `Semi Annual`.
|
|
2448
|
-
* Navigates the JSON schema via the fieldName path to confirm the field is an enum
|
|
2449
|
-
* before transforming. Returns `null` for non-enum fields.
|
|
2450
|
-
* @internal
|
|
2451
|
-
*/
|
|
2452
|
-
export declare function resolveEnumLabel(raw: any, fieldName: string, schema: any): string | null;
|
|
2453
|
-
|
|
2454
|
-
/**
|
|
2455
|
-
* Looks up the display label for a raw value from `options.data` (used by segmented,
|
|
2456
|
-
* radio group, connected-select, and enum-with-explicit-data renderers). Honors
|
|
2457
|
-
* `options.valueField`/`options.labelField` when set, defaulting to `value`/`label`.
|
|
2458
|
-
* Returns `null` when no match found.
|
|
2459
|
-
* @internal
|
|
2460
|
-
*/
|
|
2461
|
-
export declare function resolveOptionLabel(raw: any, options: any): string | null;
|
|
2462
|
-
|
|
2463
|
-
/**
|
|
2464
|
-
* Resolves the display label for a connected-select field backed by
|
|
2465
|
-
* `options.allOptionsResourceName` (a Data Server/Request Server resource) rather than a
|
|
2466
|
-
* static `options.data` array — e.g. `ConnectedSelectControlRenderer` in async/remote mode.
|
|
2467
|
-
* Fetches a single row via a criteria-filtered snapshot matching `valueField === raw`,
|
|
2468
|
-
* then reads `labelField` off the returned row. Returns `null` when there's no resource
|
|
2469
|
-
* to query, the resource can't be reached, or no row matches.
|
|
2470
|
-
* @internal
|
|
2471
|
-
*/
|
|
2472
|
-
export declare function resolveResourceOptionLabel(raw: any, options: any): Promise<string | null>;
|
|
2473
|
-
|
|
2474
|
-
/**
|
|
2475
|
-
* Read-only preview panel shown by `<foundation-form>` when `show-submit-review` is enabled.
|
|
2476
|
-
* Renders the reviewed data grouped into sections with a header and a filter field.
|
|
2477
|
-
* @public
|
|
2478
|
-
*/
|
|
2479
|
-
export declare class Review extends FASTElement {
|
|
2480
|
-
prefix: string;
|
|
2481
|
-
/**
|
|
2482
|
-
* Title shown in the review header.
|
|
2483
|
-
* @public
|
|
2484
|
-
*/
|
|
2485
|
-
heading: string;
|
|
2486
|
-
/**
|
|
2487
|
-
* Optional identifier shown next to the heading, e.g. a record's primary key.
|
|
2488
|
-
* @public
|
|
2489
|
-
*/
|
|
2490
|
-
recordId: string;
|
|
2491
|
-
/**
|
|
2492
|
-
* Sections of label/value pairs to render, grouped by their nearest UI schema `Group`.
|
|
2493
|
-
* @public
|
|
2494
|
-
*/
|
|
2495
|
-
sections: ReviewSection[];
|
|
2496
|
-
/**
|
|
2497
|
-
* Free-text query filtering fields by label or value. Sections with no matching
|
|
2498
|
-
* fields are hidden.
|
|
2499
|
-
* @internal
|
|
2500
|
-
*/
|
|
2501
|
-
filterText: string;
|
|
2502
|
-
/** @internal */
|
|
2503
|
-
get filteredSections(): ReviewSection[];
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
|
-
/** @public */
|
|
2507
|
-
export declare type ReviewField = {
|
|
2508
|
-
label: string;
|
|
2509
|
-
value: string;
|
|
2510
|
-
};
|
|
2511
|
-
|
|
2512
|
-
/** @public */
|
|
2513
|
-
export declare type ReviewSection = {
|
|
2514
|
-
title: string | null;
|
|
2515
|
-
fields: ReviewField[];
|
|
2516
|
-
};
|
|
2517
|
-
|
|
2518
2301
|
/**
|
|
2519
2302
|
* Detail payload for the `row-status-changed` event fired by {@link Form} whenever the
|
|
2520
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.492.0
|
|
4
|
+
"version": "14.492.0",
|
|
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.492.0
|
|
63
|
-
"@genesislcap/genx": "14.492.0
|
|
64
|
-
"@genesislcap/rollup-builder": "14.492.0
|
|
65
|
-
"@genesislcap/ts-builder": "14.492.0
|
|
66
|
-
"@genesislcap/uvu-playwright-builder": "14.492.0
|
|
67
|
-
"@genesislcap/vite-builder": "14.492.0
|
|
68
|
-
"@genesislcap/webpack-builder": "14.492.0
|
|
62
|
+
"@genesislcap/foundation-testing": "14.492.0",
|
|
63
|
+
"@genesislcap/genx": "14.492.0",
|
|
64
|
+
"@genesislcap/rollup-builder": "14.492.0",
|
|
65
|
+
"@genesislcap/ts-builder": "14.492.0",
|
|
66
|
+
"@genesislcap/uvu-playwright-builder": "14.492.0",
|
|
67
|
+
"@genesislcap/vite-builder": "14.492.0",
|
|
68
|
+
"@genesislcap/webpack-builder": "14.492.0",
|
|
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.492.0
|
|
86
|
-
"@genesislcap/foundation-criteria": "14.492.0
|
|
87
|
-
"@genesislcap/foundation-logger": "14.492.0
|
|
88
|
-
"@genesislcap/foundation-notifications": "14.492.0
|
|
89
|
-
"@genesislcap/foundation-ui": "14.492.0
|
|
90
|
-
"@genesislcap/foundation-utils": "14.492.0
|
|
85
|
+
"@genesislcap/foundation-comms": "14.492.0",
|
|
86
|
+
"@genesislcap/foundation-criteria": "14.492.0",
|
|
87
|
+
"@genesislcap/foundation-logger": "14.492.0",
|
|
88
|
+
"@genesislcap/foundation-notifications": "14.492.0",
|
|
89
|
+
"@genesislcap/foundation-ui": "14.492.0",
|
|
90
|
+
"@genesislcap/foundation-utils": "14.492.0",
|
|
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": "
|
|
112
|
+
"gitHead": "a0a04e2ee9ff67058d488f2d0e0ff12b26d3437c"
|
|
113
113
|
}
|
package/dist/dts/review.d.ts
DELETED
|
@@ -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
|
package/dist/dts/review.d.ts.map
DELETED
|
@@ -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 +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,82 +0,0 @@
|
|
|
1
|
-
/** @public */
|
|
2
|
-
export type ReviewField = {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
};
|
|
6
|
-
/** @public */
|
|
7
|
-
export type ReviewSection = {
|
|
8
|
-
title: string | null;
|
|
9
|
-
fields: ReviewField[];
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* Builds the review panel's fields grouped into sections by their nearest `Group` layout.
|
|
13
|
-
* Sections are formed from consecutive runs of the same group title as fields are
|
|
14
|
-
* encountered in the UI schema — not a global title lookup — so two fields that happen to
|
|
15
|
-
* share a title (including `null`, for ungrouped fields) don't get merged into one section
|
|
16
|
-
* unless they're actually adjacent. Otherwise an ungrouped field appearing after a Group
|
|
17
|
-
* would jump back up next to earlier ungrouped fields instead of staying where it sits in
|
|
18
|
-
* the form, and two distinct Groups with the same label would collapse into one. Falls back
|
|
19
|
-
* to a flat, single ungrouped section when no UI schema is available.
|
|
20
|
-
*
|
|
21
|
-
* Async because connected-select fields backed by `options.allOptionsResourceName` (rather
|
|
22
|
-
* than a static `options.data`) resolve their display label with a criteria-filtered fetch
|
|
23
|
-
* — see `resolveResourceOptionLabel`. The UI schema is walked synchronously to collect one
|
|
24
|
-
* value-resolution promise per field (preserving encounter order), then all promises settle
|
|
25
|
-
* in parallel via `Promise.all` before fields are added to their sections — so a slow fetch
|
|
26
|
-
* for one field can't reorder fields that resolved faster.
|
|
27
|
-
*
|
|
28
|
-
* This is the single walker of the UI schema for review purposes — `Form` calls it directly
|
|
29
|
-
* to populate `Review.sections`. Don't reimplement this traversal elsewhere; the two
|
|
30
|
-
* previously did drift (a since-removed `collectReviewFields` resolved labels via
|
|
31
|
-
* `resolveOptionLabel` / `resolveEnumLabel` only, silently skipping `resolveResourceOptionLabel`
|
|
32
|
-
* and showing raw ids for connected-select fields).
|
|
33
|
-
* @internal
|
|
34
|
-
*/
|
|
35
|
-
export declare function buildReviewSections(data: Record<string, any>, uiSchema: any, schema: any): Promise<ReviewSection[]>;
|
|
36
|
-
/**
|
|
37
|
-
* Filters review sections down to fields whose label or value contains `query`
|
|
38
|
-
* (case-insensitive). Sections left with no matching fields are dropped entirely.
|
|
39
|
-
* Returns `sections` unchanged when `query` is blank.
|
|
40
|
-
* @internal
|
|
41
|
-
*/
|
|
42
|
-
export declare function filterReviewSections(sections: ReviewSection[], query: string): ReviewSection[];
|
|
43
|
-
/**
|
|
44
|
-
* Looks up the display label for a raw value from `options.data` (used by segmented,
|
|
45
|
-
* radio group, connected-select, and enum-with-explicit-data renderers). Honors
|
|
46
|
-
* `options.valueField`/`options.labelField` when set, defaulting to `value`/`label`.
|
|
47
|
-
* Returns `null` when no match found.
|
|
48
|
-
* @internal
|
|
49
|
-
*/
|
|
50
|
-
export declare function resolveOptionLabel(raw: any, options: any): string | null;
|
|
51
|
-
/**
|
|
52
|
-
* Resolves the display label for a connected-select field backed by
|
|
53
|
-
* `options.allOptionsResourceName` (a Data Server/Request Server resource) rather than a
|
|
54
|
-
* static `options.data` array — e.g. `ConnectedSelectControlRenderer` in async/remote mode.
|
|
55
|
-
* Fetches a single row via a criteria-filtered snapshot matching `valueField === raw`,
|
|
56
|
-
* then reads `labelField` off the returned row. Returns `null` when there's no resource
|
|
57
|
-
* to query, the resource can't be reached, or no row matches.
|
|
58
|
-
* @internal
|
|
59
|
-
*/
|
|
60
|
-
export declare function resolveResourceOptionLabel(raw: any, options: any): Promise<string | null>;
|
|
61
|
-
/**
|
|
62
|
-
* For plain enum combobox fields (no options.data), applies the same `capitalCase`
|
|
63
|
-
* transform the renderer uses — e.g. `SEMI_ANNUAL` → `Semi Annual`.
|
|
64
|
-
* Navigates the JSON schema via the fieldName path to confirm the field is an enum
|
|
65
|
-
* before transforming. Returns `null` for non-enum fields.
|
|
66
|
-
* @internal
|
|
67
|
-
*/
|
|
68
|
-
export declare function resolveEnumLabel(raw: any, fieldName: string, schema: any): string | null;
|
|
69
|
-
/**
|
|
70
|
-
* Navigates a `/properties/`-separated path in data to support nested object scopes
|
|
71
|
-
* such as `ADDRESS/properties/STREET` produced by Group layout UI schemas.
|
|
72
|
-
* @internal
|
|
73
|
-
*/
|
|
74
|
-
export declare function getDataValueAtPath(data: any, fieldName: string): any;
|
|
75
|
-
/**
|
|
76
|
-
* Converts a raw field value to a display string for the review panel.
|
|
77
|
-
* Arrays of primitives are comma-joined; arrays of objects and plain objects
|
|
78
|
-
* are rendered as readable `key: value` lines.
|
|
79
|
-
* @internal
|
|
80
|
-
*/
|
|
81
|
-
export declare function formatValueForReview(value: any): string;
|
|
82
|
-
//# 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":"AAIA,cAAc;AACd,MAAM,MAAM,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3D,cAAc;AACd,MAAM,MAAM,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,EAAE,WAAW,EAAE,CAAA;CAAE,CAAC;AAE5E;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,QAAQ,EAAE,GAAG,EACb,MAAM,EAAE,GAAG,GACV,OAAO,CAAC,aAAa,EAAE,CAAC,CAuE1B;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,EAAE,CAc9F;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI,CAMxE;AAED;;;;;;;;GAQG;AACH,wBAAsB,0BAA0B,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,GAAG,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA8B/F;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,MAAM,GAAG,IAAI,CAiBxF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,GAAG,GAAG,CAEpE;AAYD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,GAAG,GAAG,MAAM,CAwBvD"}
|
package/dist/esm/review.js
DELETED
|
@@ -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 };
|