@abgov/jsonforms-components 1.57.1 → 1.58.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/index.esm.js +1166 -874
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/lib/Controls/FormStepper/PageStepperReviewControl.d.ts +4 -0
- package/src/lib/Controls/FormStepper/context/StepperContext.d.ts +3 -0
- package/src/lib/Controls/FormStepper/context/reducer.d.ts +5 -0
- package/src/lib/Controls/FormStepper/context/types.d.ts +1 -0
- package/src/lib/Controls/FormStepper/styled-components.d.ts +3 -0
- package/src/lib/Controls/Inputs/InputBaseTableReviewControl.d.ts +4 -0
- package/src/lib/Controls/Inputs/index.d.ts +1 -0
- package/src/lib/Controls/Inputs/style-component.d.ts +4 -0
package/index.esm.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as runtime from 'react/jsx-runtime';
|
|
2
2
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import React, { createContext, useContext, useReducer, useMemo, useEffect, useState, useRef, useCallback } from 'react';
|
|
4
|
-
import { GoAFormItem, GoAInput, GoATextArea, GoACallout, GoAInputDate, GoAInputDateTime, GoAInputTime, GoARadioGroup, GoARadioItem, GoACheckbox, GoAIcon, GoAGrid, GoAFormStepper, GoAFormStep, GoAPages,
|
|
4
|
+
import { GoAFormItem, GoAInput, GoATextArea, GoACallout, GoAInputDate, GoAInputDateTime, GoAInputTime, GoARadioGroup, GoARadioItem, GoACheckbox, GoAIcon, GoAButton, GoAGrid, GoAFormStepper, GoAFormStep, GoAPages, GoAModal, GoAButtonGroup, GoATable, GoAIconButton, GoAFileUploadInput, GoACircularProgress, GoAContainer, GoADropdown, GoADropdownItem, GoADetails, GoASpinner } from '@abgov/react-components';
|
|
5
5
|
import styled from 'styled-components';
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
import get$1 from 'lodash/get';
|
|
8
|
-
import { rankWith, isStringControl, and, optionIs, uiTypeIs, isDateControl, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, isEnumControl, isBooleanControl,
|
|
8
|
+
import { rankWith, isStringControl, and, optionIs, uiTypeIs, isDateControl, isNumberControl, isIntegerControl, isDateTimeControl, isTimeControl, isEnumControl, isBooleanControl, getControlPath, toDataPath, deriveLabelForUISchemaElement, isEnabled, getAjv, isVisible, schemaTypeIs, formatIs, createDefaultValue, or, isObjectArrayControl, isPrimitiveArrayControl, Paths, schemaMatches, hasType, isControl, isCategorization, isLayout } from '@jsonforms/core';
|
|
9
9
|
import { withJsonFormsControlProps, withJsonFormsRendererProps, withJsonFormsEnumProps, withTranslateProps, useJsonForms, JsonFormsDispatch, withJsonFormsLayoutProps, withJsonFormsArrayLayoutProps, withJsonFormsCellProps } from '@jsonforms/react';
|
|
10
10
|
import * as _$c from 'lodash';
|
|
11
11
|
import { isEqual, isObject as isObject$f } from 'lodash';
|
|
@@ -3800,7 +3800,11 @@ const JsonFormRegisterProvider = ({
|
|
|
3800
3800
|
let _$a = t => t,
|
|
3801
3801
|
_t$a,
|
|
3802
3802
|
_t2$6,
|
|
3803
|
-
_t3$5
|
|
3803
|
+
_t3$5,
|
|
3804
|
+
_t4$5,
|
|
3805
|
+
_t5$3,
|
|
3806
|
+
_t6$3,
|
|
3807
|
+
_t7$2;
|
|
3804
3808
|
const FormFieldWrapper = styled.div(_t$a || (_t$a = _$a`
|
|
3805
3809
|
margin-bottom: var(--goa-space-l);
|
|
3806
3810
|
`));
|
|
@@ -3818,6 +3822,23 @@ const RequiredTextLabel = styled.label(_t3$5 || (_t3$5 = _$a`
|
|
|
3818
3822
|
line-height: var(--goa-line-height-1);
|
|
3819
3823
|
font-style: normal;
|
|
3820
3824
|
`));
|
|
3825
|
+
const PageReviewNameCol = styled.td(_t4$5 || (_t4$5 = _$a`
|
|
3826
|
+
width: 70%;
|
|
3827
|
+
padding-top: var(--goa-space-s);
|
|
3828
|
+
padding-bottom: var(--goa-space-s);
|
|
3829
|
+
padding-right: var(--goa-space-m);
|
|
3830
|
+
`));
|
|
3831
|
+
const PageReviewValueCol = styled.td(_t5$3 || (_t5$3 = _$a`
|
|
3832
|
+
width: 20%;
|
|
3833
|
+
text-align: left;
|
|
3834
|
+
`));
|
|
3835
|
+
const PageReviewActionCol = styled.td(_t6$3 || (_t6$3 = _$a`
|
|
3836
|
+
width: 10%;
|
|
3837
|
+
`));
|
|
3838
|
+
//Check and unchecked are different heights otherwise
|
|
3839
|
+
const CheckboxWrapper = styled.div(_t7$2 || (_t7$2 = _$a`
|
|
3840
|
+
height: 28px;
|
|
3841
|
+
`));
|
|
3821
3842
|
|
|
3822
3843
|
const GoAInputBaseControl = props => {
|
|
3823
3844
|
var _a, _b;
|
|
@@ -5057,19 +5078,21 @@ const BooleanComponent = ({
|
|
|
5057
5078
|
}) => {
|
|
5058
5079
|
var _a, _b, _c;
|
|
5059
5080
|
const text = `${((_a = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _a === void 0 ? void 0 : _a.text) ? (_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.text : (schema === null || schema === void 0 ? void 0 : schema.title) ? schema === null || schema === void 0 ? void 0 : schema.title : schema === null || schema === void 0 ? void 0 : schema.description}${required ? ' (required)' : ''}`;
|
|
5060
|
-
return jsx(
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5081
|
+
return jsx(CheckboxWrapper, {
|
|
5082
|
+
children: jsx(GoACheckbox, Object.assign({
|
|
5083
|
+
error: isVisited && errors.length > 0,
|
|
5084
|
+
testId: `${path}-checkbox-test-id`,
|
|
5085
|
+
disabled: !enabled,
|
|
5086
|
+
text: text && text !== 'undefined' ? text : convertToReadableFormat(getLastSegmentFromPointer(uischema.scope)),
|
|
5087
|
+
name: `${path}`,
|
|
5088
|
+
checked: data,
|
|
5089
|
+
onChange: (_, checked) => {
|
|
5090
|
+
handleChange(path, checked);
|
|
5091
|
+
}
|
|
5092
|
+
}, (_c = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _c === void 0 ? void 0 : _c.componentProps, {
|
|
5093
|
+
mb: "none"
|
|
5094
|
+
}))
|
|
5095
|
+
});
|
|
5073
5096
|
};
|
|
5074
5097
|
const BooleanControl = props => jsx(GoAInputBaseControl, Object.assign({}, props, {
|
|
5075
5098
|
input: BooleanComponent
|
|
@@ -5158,10 +5181,9 @@ const CheckBoxGroupDiv = styled.div(_t$8 || (_t$8 = _$8`
|
|
|
5158
5181
|
`));
|
|
5159
5182
|
|
|
5160
5183
|
const CheckboxGroup = props => {
|
|
5161
|
-
var _a, _b;
|
|
5184
|
+
var _a, _b, _c;
|
|
5162
5185
|
const {
|
|
5163
5186
|
data,
|
|
5164
|
-
className,
|
|
5165
5187
|
id,
|
|
5166
5188
|
schema,
|
|
5167
5189
|
uischema,
|
|
@@ -5172,10 +5194,14 @@ const CheckboxGroup = props => {
|
|
|
5172
5194
|
label,
|
|
5173
5195
|
t
|
|
5174
5196
|
} = props;
|
|
5175
|
-
const
|
|
5197
|
+
const newSchema = schema;
|
|
5198
|
+
const enumData = (schema === null || schema === void 0 ? void 0 : schema.enum) || ((_a = newSchema === null || newSchema === void 0 ? void 0 : newSchema.items) === null || _a === void 0 ? void 0 : _a.enum) || [];
|
|
5176
5199
|
const appliedUiSchemaOptions = merge({}, config, props.uischema.options, options);
|
|
5200
|
+
useEffect(() => {
|
|
5201
|
+
handleChange(path, data || []);
|
|
5202
|
+
}, []);
|
|
5177
5203
|
return jsx(Checkboxes, {
|
|
5178
|
-
orientation: ((
|
|
5204
|
+
orientation: ((_b = uischema.options) === null || _b === void 0 ? void 0 : _b.orientation) ? (_c = uischema.options) === null || _c === void 0 ? void 0 : _c.orientation : 'vertical',
|
|
5179
5205
|
testId: `${label || id}-jsonforms-checkboxes`,
|
|
5180
5206
|
children: enumData.map(enumValue => {
|
|
5181
5207
|
return jsx(GoACheckbox, Object.assign({
|
|
@@ -5186,7 +5212,13 @@ const CheckboxGroup = props => {
|
|
|
5186
5212
|
text: enumValue,
|
|
5187
5213
|
testId: `${enumValue}-checkbox`,
|
|
5188
5214
|
onChange: (name, value) => {
|
|
5189
|
-
|
|
5215
|
+
let newData = Array.isArray(data) ? [...data] : [];
|
|
5216
|
+
if (value) {
|
|
5217
|
+
newData.push(enumValue);
|
|
5218
|
+
} else {
|
|
5219
|
+
newData = newData.filter(item => item !== enumValue);
|
|
5220
|
+
}
|
|
5221
|
+
handleChange(path, newData);
|
|
5190
5222
|
}
|
|
5191
5223
|
}));
|
|
5192
5224
|
})
|
|
@@ -5198,7 +5230,7 @@ const EnumCheckboxControl = props => {
|
|
|
5198
5230
|
}));
|
|
5199
5231
|
};
|
|
5200
5232
|
const GoAEnumCheckboxGroupControl = withJsonFormsEnumProps(withTranslateProps(EnumCheckboxControl), true);
|
|
5201
|
-
const GoACheckoutGroupControlTester = rankWith(18, and(
|
|
5233
|
+
const GoACheckoutGroupControlTester = rankWith(18, and(optionIs('format', 'checkbox')));
|
|
5202
5234
|
|
|
5203
5235
|
const warningIcon = errorMessage => {
|
|
5204
5236
|
return jsxs(WarningIconDiv, {
|
|
@@ -5267,888 +5299,974 @@ const GoInputBaseReview = props => jsx(GoAInputBaseControl, Object.assign({}, pr
|
|
|
5267
5299
|
}));
|
|
5268
5300
|
const GoInputBaseReviewControl = withJsonFormsControlProps(GoInputBaseReview);
|
|
5269
5301
|
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
path: path,
|
|
5278
|
-
enabled: enabled,
|
|
5279
|
-
renderers: renderers,
|
|
5280
|
-
cells: cells
|
|
5281
|
-
}, path)
|
|
5282
|
-
}, index));
|
|
5283
|
-
};
|
|
5284
|
-
const withAjvProps = Component => function WithAjvProps(props) {
|
|
5285
|
-
const ctx = useJsonForms();
|
|
5286
|
-
const ajv = getAjv({
|
|
5287
|
-
jsonforms: Object.assign({}, ctx)
|
|
5288
|
-
});
|
|
5289
|
-
return jsx(Component, Object.assign({}, props, {
|
|
5290
|
-
ajv: ajv
|
|
5291
|
-
}));
|
|
5292
|
-
};
|
|
5293
|
-
const LayoutRenderer = ({
|
|
5294
|
-
elements,
|
|
5295
|
-
schema,
|
|
5296
|
-
path,
|
|
5297
|
-
enabled,
|
|
5298
|
-
direction,
|
|
5299
|
-
renderers,
|
|
5300
|
-
cells,
|
|
5301
|
-
visible,
|
|
5302
|
-
width
|
|
5303
|
-
}) => {
|
|
5304
|
-
if (isEmpty(elements)) {
|
|
5305
|
-
return null;
|
|
5306
|
-
} else {
|
|
5307
|
-
if (direction === 'row') {
|
|
5308
|
-
return jsx(Visible, {
|
|
5309
|
-
visible: visible,
|
|
5310
|
-
children: jsx(GoAGrid, {
|
|
5311
|
-
minChildWidth: width || '10ch',
|
|
5312
|
-
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
5313
|
-
})
|
|
5314
|
-
});
|
|
5315
|
-
} else {
|
|
5316
|
-
return jsx(Visible, {
|
|
5317
|
-
visible: visible,
|
|
5318
|
-
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
5319
|
-
});
|
|
5302
|
+
// eslint-disable-next-line
|
|
5303
|
+
const getProperty = (obj, propName) => {
|
|
5304
|
+
if (obj[propName] !== undefined) return obj[propName];
|
|
5305
|
+
for (const key in obj) {
|
|
5306
|
+
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
5307
|
+
const result = getProperty(obj[key], propName);
|
|
5308
|
+
if (result !== undefined) return result;
|
|
5320
5309
|
}
|
|
5321
5310
|
}
|
|
5322
5311
|
};
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
})
|
|
5343
|
-
});
|
|
5344
|
-
} else {
|
|
5345
|
-
return jsx(Visible, {
|
|
5346
|
-
visible: visible,
|
|
5347
|
-
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
5312
|
+
// eslint-disable-next-line
|
|
5313
|
+
const pickPropertyValues = (obj, property, endWithType) => {
|
|
5314
|
+
let values = [];
|
|
5315
|
+
Object.keys(obj).forEach(function (key) {
|
|
5316
|
+
var _a;
|
|
5317
|
+
if (key === property) {
|
|
5318
|
+
values.push(obj[key]);
|
|
5319
|
+
} else if (_$c.isObject(obj[key])) {
|
|
5320
|
+
// if the object type is equal to end type, we are not going to continue the recursive approach
|
|
5321
|
+
if (endWithType && ((_a = obj[key]) === null || _a === void 0 ? void 0 : _a.type) === endWithType) {
|
|
5322
|
+
if (property in obj[key]) {
|
|
5323
|
+
values.push(obj[key][property]);
|
|
5324
|
+
}
|
|
5325
|
+
} else {
|
|
5326
|
+
values = [...values, ...pickPropertyValues(obj[key], property, endWithType)];
|
|
5327
|
+
}
|
|
5328
|
+
} else if (_$c.isArray(obj[key])) {
|
|
5329
|
+
const nextValues = obj[key].map(function (arrayObj) {
|
|
5330
|
+
return pickPropertyValues(arrayObj, property, endWithType);
|
|
5348
5331
|
});
|
|
5332
|
+
values = [...values, ...nextValues];
|
|
5349
5333
|
}
|
|
5350
|
-
}
|
|
5334
|
+
});
|
|
5335
|
+
return values;
|
|
5351
5336
|
};
|
|
5352
|
-
const ReviewGrid = styled.div(_t$7 || (_t$7 = _$7`
|
|
5353
|
-
display: grid;
|
|
5354
|
-
grid-template-columns: repeat(auto-fit, minmax(250px, calc(50% - 8px)));
|
|
5355
|
-
gap: 16px;
|
|
5356
|
-
`));
|
|
5357
5337
|
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5338
|
+
const isErrorPathIncluded = (errorPaths, path) => {
|
|
5339
|
+
return errorPaths.some(ePath => {
|
|
5340
|
+
/**
|
|
5341
|
+
* case A: errorPaths: [name] path: [name]
|
|
5342
|
+
*
|
|
5343
|
+
* case B: errorPath: [name] path: [name.firstName]
|
|
5344
|
+
* */
|
|
5345
|
+
return ePath === path || path.startsWith(ePath + '.');
|
|
5346
|
+
});
|
|
5347
|
+
};
|
|
5348
|
+
function isNumber(value) {
|
|
5349
|
+
return value != null && value !== '' && !isNaN(Number(value.toString()));
|
|
5350
|
+
}
|
|
5351
|
+
const getIncompletePaths = (ajv, scopes) => {
|
|
5352
|
+
var _a;
|
|
5353
|
+
const requiredErrorPaths = (_a = ajv === null || ajv === void 0 ? void 0 : ajv.errors) === null || _a === void 0 ? void 0 : _a.filter(e => e.keyword === 'required' || e.keyword === 'minLength').map(e => {
|
|
5354
|
+
return getControlPath(e);
|
|
5355
|
+
});
|
|
5356
|
+
const _scopes = scopes.map(scope => toDataPath(scope)).filter(path => requiredErrorPaths && isErrorPathIncluded(requiredErrorPaths, path));
|
|
5357
|
+
return _scopes;
|
|
5358
|
+
};
|
|
5359
|
+
const subErrorInParent = (error, paths) => {
|
|
5360
|
+
/*
|
|
5361
|
+
Detect is there sub error in an object array.
|
|
5362
|
+
For example: error with instance path /roadmap/0/when belongs to /roadmap
|
|
5363
|
+
*/
|
|
5364
|
+
const errorPaths = error.instancePath.split('/');
|
|
5365
|
+
if (errorPaths.length < 2) return false;
|
|
5366
|
+
// For case /roadmap/0
|
|
5367
|
+
if (errorPaths.length > 1 && isNumber(errorPaths[errorPaths.length - 1])) {
|
|
5368
|
+
const parentPath = errorPaths.slice(0, errorPaths.length - 1).join('/');
|
|
5369
|
+
return paths.includes(parentPath);
|
|
5381
5370
|
}
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
padding: var(--goa-space-m);
|
|
5387
|
-
border: 1px solid #dcdcdc;
|
|
5388
|
-
border-radius: 5px;
|
|
5389
|
-
|
|
5390
|
-
.element-style {
|
|
5391
|
-
max-width: 1600px;
|
|
5371
|
+
// For case /roadmap/0/when
|
|
5372
|
+
if (errorPaths.length > 2 && isNumber(errorPaths[errorPaths.length - 2])) {
|
|
5373
|
+
const parentPath = errorPaths.slice(0, errorPaths.length - 2).join('/');
|
|
5374
|
+
return paths.includes(parentPath);
|
|
5392
5375
|
}
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
line-height: var(--goa-space-xl);
|
|
5403
|
-
font-weight: 300;
|
|
5404
|
-
`));
|
|
5405
|
-
const Anchor = styled.div(_t5$2 || (_t5$2 = _$6`
|
|
5406
|
-
color: #0070c4;
|
|
5407
|
-
text-decoration: underline;
|
|
5408
|
-
outline: none;
|
|
5409
|
-
cursor: pointer;
|
|
5376
|
+
return false;
|
|
5377
|
+
};
|
|
5378
|
+
const getErrorsInScopes = (errors, scopes) => {
|
|
5379
|
+
return errors.filter(e => {
|
|
5380
|
+
// transfer scope #properties/value to data path /value
|
|
5381
|
+
const dataPaths = scopes.map(s => '/' + toDataPath(s));
|
|
5382
|
+
return dataPaths.includes(e.instancePath) || subErrorInParent(e, dataPaths);
|
|
5383
|
+
});
|
|
5384
|
+
};
|
|
5410
5385
|
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
styled.div(_t8$1 || (_t8$1 = _$6`
|
|
5423
|
-
margin: var(--goa-space-s);
|
|
5424
|
-
width: 100%;
|
|
5425
|
-
`));
|
|
5426
|
-
styled.h3(_t9$1 || (_t9$1 = _$6`
|
|
5427
|
-
text-transform: capitalize;
|
|
5428
|
-
`));
|
|
5429
|
-
const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$6`
|
|
5430
|
-
@media screen and (max-width: 767px) {
|
|
5431
|
-
margin-bottom: var(--goa-space-l);
|
|
5432
|
-
}
|
|
5433
|
-
@media screen and (min-width: 768px) {
|
|
5434
|
-
display: flex;
|
|
5435
|
-
justify-content: flex-end;
|
|
5436
|
-
margin-bottom: var(--goa-space-l);
|
|
5437
|
-
}
|
|
5438
|
-
`));
|
|
5439
|
-
const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$6`
|
|
5440
|
-
flex: 1;
|
|
5441
|
-
margin-bottom: var(--goa-space-m);
|
|
5442
|
-
font-size: var(--goa-font-size-7);
|
|
5443
|
-
line-height: var(--goa-line-height-4);
|
|
5444
|
-
font-weight: var(--goa-font-weight-regular);
|
|
5445
|
-
`));
|
|
5446
|
-
const PageRenderPadding = styled.h3(_t12$1 || (_t12$1 = _$6`
|
|
5447
|
-
margin-top: var(--goa-space-2xl);
|
|
5448
|
-
`));
|
|
5449
|
-
const PageBorder = styled.h3(_t13$1 || (_t13$1 = _$6`
|
|
5450
|
-
padding: var(--goa-space-3xl);
|
|
5451
|
-
`));
|
|
5452
|
-
|
|
5453
|
-
class ContextProviderClass {
|
|
5454
|
-
addDataByUrl(key, url, processDataFunction, token) {
|
|
5455
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
5456
|
-
let header = {};
|
|
5457
|
-
const [requestId, axiosWithConfig] = this.getAxiosInterceptorConfig(axios);
|
|
5458
|
-
if (token) {
|
|
5459
|
-
header = Object.assign(Object.assign({}, header), {
|
|
5460
|
-
Authorization: `Bearer ${token}`
|
|
5461
|
-
});
|
|
5386
|
+
const stepperReducer = (state, action) => {
|
|
5387
|
+
var _a, _b;
|
|
5388
|
+
const {
|
|
5389
|
+
activeId,
|
|
5390
|
+
categories
|
|
5391
|
+
} = state;
|
|
5392
|
+
const lastId = categories[categories.length - 1].id;
|
|
5393
|
+
switch (action.type) {
|
|
5394
|
+
case 'update/uischema':
|
|
5395
|
+
{
|
|
5396
|
+
return Object.assign({}, action.payload.state);
|
|
5462
5397
|
}
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5398
|
+
case 'page/next':
|
|
5399
|
+
{
|
|
5400
|
+
state.activeId += 1;
|
|
5401
|
+
if (activeId === lastId) {
|
|
5402
|
+
state.isOnReview = true;
|
|
5403
|
+
state.hasNextButton = false;
|
|
5404
|
+
state.hasPrevButton = false;
|
|
5469
5405
|
} else {
|
|
5470
|
-
|
|
5406
|
+
state.hasNextButton = true;
|
|
5407
|
+
state.hasPrevButton = true;
|
|
5408
|
+
state.isOnReview = false;
|
|
5471
5409
|
}
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
});
|
|
5475
|
-
}
|
|
5476
|
-
constructor() {
|
|
5477
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5478
|
-
this.enumValues = new Map();
|
|
5479
|
-
this.enumFunctions = new Map();
|
|
5480
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5481
|
-
this.enumSubmitFunctions = new Map();
|
|
5482
|
-
this.addFormContextData = (key, data) => {
|
|
5483
|
-
this.enumValues.set(key, () => data);
|
|
5484
|
-
};
|
|
5485
|
-
this.setup = props => {
|
|
5486
|
-
var _a, _b;
|
|
5487
|
-
this.selfProps = props;
|
|
5488
|
-
if (props.fileManagement) {
|
|
5489
|
-
const {
|
|
5490
|
-
fileList,
|
|
5491
|
-
uploadFile,
|
|
5492
|
-
downloadFile,
|
|
5493
|
-
deleteFile
|
|
5494
|
-
} = props.fileManagement;
|
|
5495
|
-
this.enumValues.set('file-list', () => fileList);
|
|
5496
|
-
this.enumFunctions.set('upload-file', () => uploadFile);
|
|
5497
|
-
this.enumFunctions.set('download-file', () => downloadFile);
|
|
5498
|
-
this.enumFunctions.set('delete-file', () => deleteFile);
|
|
5410
|
+
state.categories[activeId].isVisited = true;
|
|
5411
|
+
return Object.assign({}, state);
|
|
5499
5412
|
}
|
|
5500
|
-
|
|
5413
|
+
case 'page/prev':
|
|
5414
|
+
{
|
|
5415
|
+
state.categories[activeId].isVisited = true;
|
|
5416
|
+
if (activeId > 0) {
|
|
5417
|
+
state.activeId -= 1;
|
|
5418
|
+
state.hasPrevButton = state.activeId !== 0;
|
|
5419
|
+
state.hasNextButton = true;
|
|
5420
|
+
state.isOnReview = false;
|
|
5421
|
+
}
|
|
5422
|
+
return Object.assign({}, state);
|
|
5423
|
+
}
|
|
5424
|
+
case 'page/to/index':
|
|
5425
|
+
{
|
|
5501
5426
|
const {
|
|
5502
|
-
|
|
5503
|
-
} =
|
|
5504
|
-
|
|
5505
|
-
|
|
5427
|
+
id
|
|
5428
|
+
} = action.payload;
|
|
5429
|
+
state.activeId = id;
|
|
5430
|
+
if (id > lastId) {
|
|
5431
|
+
state.isOnReview = true;
|
|
5432
|
+
state.hasNextButton = false;
|
|
5433
|
+
state.hasPrevButton = true;
|
|
5434
|
+
return Object.assign({}, state);
|
|
5435
|
+
} else {
|
|
5436
|
+
state.categories[id].isVisited = true;
|
|
5437
|
+
state.hasNextButton = id <= lastId;
|
|
5438
|
+
state.hasPrevButton = id !== 0;
|
|
5439
|
+
state.isOnReview = false;
|
|
5440
|
+
state.maxReachedStep = Math.max(state.maxReachedStep, activeId);
|
|
5441
|
+
return Object.assign({}, state);
|
|
5442
|
+
}
|
|
5506
5443
|
}
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5444
|
+
case 'update/category':
|
|
5445
|
+
{
|
|
5446
|
+
const {
|
|
5447
|
+
id,
|
|
5448
|
+
ajv,
|
|
5449
|
+
errors
|
|
5450
|
+
} = action.payload;
|
|
5451
|
+
if (id === state.categories.length) {
|
|
5452
|
+
return Object.assign({}, state);
|
|
5453
|
+
}
|
|
5454
|
+
/*
|
|
5455
|
+
ctx.core.errors only includes required errors when the fields are touched. In this case, we still ajv to figure out the required errors at the very beginning.
|
|
5456
|
+
*/
|
|
5457
|
+
const incompletePaths = getIncompletePaths(ajv, ((_a = state.categories[id]) === null || _a === void 0 ? void 0 : _a.scopes) || []);
|
|
5458
|
+
const errorsInCategory = getErrorsInScopes(errors, ((_b = state.categories[id]) === null || _b === void 0 ? void 0 : _b.scopes) || []);
|
|
5459
|
+
state.categories[id].isCompleted = (incompletePaths === null || incompletePaths === void 0 ? void 0 : incompletePaths.length) === 0;
|
|
5460
|
+
state.categories[id].isValid = errorsInCategory.length === 0;
|
|
5461
|
+
state.categories[id].isVisited = true;
|
|
5462
|
+
return Object.assign({}, state);
|
|
5512
5463
|
}
|
|
5513
|
-
|
|
5514
|
-
|
|
5464
|
+
case 'validate/form':
|
|
5465
|
+
{
|
|
5466
|
+
const {
|
|
5467
|
+
errors
|
|
5468
|
+
} = action.payload;
|
|
5469
|
+
state.isValid = errors.length === 0;
|
|
5470
|
+
return Object.assign({}, state);
|
|
5515
5471
|
}
|
|
5516
|
-
|
|
5517
|
-
|
|
5472
|
+
case 'toggle/category/review-link':
|
|
5473
|
+
{
|
|
5474
|
+
const {
|
|
5475
|
+
id
|
|
5476
|
+
} = action.payload;
|
|
5477
|
+
state.categories[id].showReviewPageLink = !state.categories[id].showReviewPageLink;
|
|
5478
|
+
return Object.assign({}, state);
|
|
5518
5479
|
}
|
|
5519
|
-
|
|
5520
|
-
return
|
|
5521
|
-
value: this.baseEnumerator,
|
|
5522
|
-
children: (_b = this.selfProps) === null || _b === void 0 ? void 0 : _b.children
|
|
5523
|
-
});
|
|
5524
|
-
};
|
|
5525
|
-
this.getContextProvider = () => {
|
|
5526
|
-
var _a;
|
|
5527
|
-
return jsx(JsonFormContext.Provider, {
|
|
5528
|
-
value: this.baseEnumerator,
|
|
5529
|
-
children: (_a = this.selfProps) === null || _a === void 0 ? void 0 : _a.children
|
|
5530
|
-
});
|
|
5531
|
-
};
|
|
5532
|
-
this.getFormUrl = () => {
|
|
5533
|
-
var _a;
|
|
5534
|
-
return (_a = this.selfProps) === null || _a === void 0 ? void 0 : _a.formUrl;
|
|
5535
|
-
};
|
|
5536
|
-
this.getAxiosInterceptorConfig = axios => {
|
|
5537
|
-
const requestId = axios.interceptors.request.use(req => {
|
|
5538
|
-
if (req.data === undefined) {
|
|
5539
|
-
throw new Error(`The URL: ${req.url} encountered a CORS error.`);
|
|
5540
|
-
}
|
|
5541
|
-
return req;
|
|
5542
|
-
});
|
|
5543
|
-
return [requestId, axios];
|
|
5544
|
-
};
|
|
5545
|
-
/**
|
|
5546
|
-
* Grabs data stored under a given key
|
|
5547
|
-
*
|
|
5548
|
-
*/
|
|
5549
|
-
this.getFormContextData = key => {
|
|
5550
|
-
const dataFunction = this.baseEnumerator.data.get(key);
|
|
5551
|
-
return dataFunction && dataFunction();
|
|
5552
|
-
};
|
|
5553
|
-
/**
|
|
5554
|
-
* Grabs all data
|
|
5555
|
-
*
|
|
5556
|
-
*/
|
|
5557
|
-
this.getAllFormContextData = () => {
|
|
5558
|
-
const allData = [];
|
|
5559
|
-
this.baseEnumerator.data.forEach((d, key) => {
|
|
5560
|
-
allData.push({
|
|
5561
|
-
[key]: d()
|
|
5562
|
-
});
|
|
5563
|
-
});
|
|
5564
|
-
return allData;
|
|
5565
|
-
};
|
|
5566
|
-
this.baseEnumerator = {
|
|
5567
|
-
data: this.enumValues,
|
|
5568
|
-
functions: this.enumFunctions,
|
|
5569
|
-
submitFunction: this.enumSubmitFunctions,
|
|
5570
|
-
addFormContextData: this.addFormContextData,
|
|
5571
|
-
getFormContextData: this.getFormContextData,
|
|
5572
|
-
getAllFormContextData: this.getAllFormContextData,
|
|
5573
|
-
formUrl: this.getFormUrl()
|
|
5574
|
-
};
|
|
5575
|
-
this.selfProps = {};
|
|
5480
|
+
default:
|
|
5481
|
+
return state;
|
|
5576
5482
|
}
|
|
5577
|
-
}
|
|
5578
|
-
const ContextProviderC = new ContextProviderClass();
|
|
5579
|
-
const ContextProviderFactory = () => new ContextProviderClass().setup;
|
|
5580
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5581
|
-
const JsonFormContext = /*#__PURE__*/createContext(null);
|
|
5582
|
-
|
|
5583
|
-
const RenderStepElements = props => {
|
|
5584
|
-
return jsx(Visible, {
|
|
5585
|
-
visible: props.visible,
|
|
5586
|
-
"date-testid": `${props.path}-categories-${props.categoryIndex}`,
|
|
5587
|
-
children: props.category.elements.map((uiSchema, index) => {
|
|
5588
|
-
return jsx(JsonFormsDispatch, {
|
|
5589
|
-
schema: props.schema,
|
|
5590
|
-
uischema: uiSchema,
|
|
5591
|
-
renderers: props.renderers,
|
|
5592
|
-
cells: props.cells,
|
|
5593
|
-
path: props.path,
|
|
5594
|
-
visible: props.visible,
|
|
5595
|
-
enabled: props.enabled
|
|
5596
|
-
}, `${props.path}-category-page-${index}`);
|
|
5597
|
-
})
|
|
5598
|
-
});
|
|
5599
|
-
};
|
|
5600
|
-
|
|
5601
|
-
var uncurryThis$3 = functionUncurryThisClause;
|
|
5602
|
-
var aCallable$6 = aCallable$9;
|
|
5603
|
-
var NATIVE_BIND = functionBindNative;
|
|
5604
|
-
|
|
5605
|
-
var bind$5 = uncurryThis$3(uncurryThis$3.bind);
|
|
5606
|
-
|
|
5607
|
-
// optional / simple context binding
|
|
5608
|
-
var functionBindContext = function (fn, that) {
|
|
5609
|
-
aCallable$6(fn);
|
|
5610
|
-
return that === undefined ? fn : NATIVE_BIND ? bind$5(fn, that) : function (/* ...args */) {
|
|
5611
|
-
return fn.apply(that, arguments);
|
|
5612
|
-
};
|
|
5613
5483
|
};
|
|
5614
5484
|
|
|
5615
|
-
|
|
5616
|
-
var
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5485
|
+
const createStepperContextInitData = props => {
|
|
5486
|
+
var _a;
|
|
5487
|
+
const {
|
|
5488
|
+
uischema,
|
|
5489
|
+
data,
|
|
5490
|
+
schema,
|
|
5491
|
+
ajv,
|
|
5492
|
+
t,
|
|
5493
|
+
visible,
|
|
5494
|
+
path
|
|
5495
|
+
} = props;
|
|
5496
|
+
const categorization = uischema;
|
|
5497
|
+
const valid = ajv.validate(schema, data || {});
|
|
5498
|
+
const categories = (_a = categorization.elements) === null || _a === void 0 ? void 0 : _a.map((c, id) => {
|
|
5499
|
+
const scopes = pickPropertyValues(c, 'scope', 'ListWithDetail');
|
|
5500
|
+
const incompletePaths = getIncompletePaths(ajv, scopes);
|
|
5501
|
+
return {
|
|
5502
|
+
id,
|
|
5503
|
+
label: deriveLabelForUISchemaElement(c, t),
|
|
5504
|
+
scopes,
|
|
5505
|
+
isVisited: false,
|
|
5506
|
+
isCompleted: (incompletePaths === null || incompletePaths === void 0 ? void 0 : incompletePaths.length) === 0,
|
|
5507
|
+
isValid: (incompletePaths === null || incompletePaths === void 0 ? void 0 : incompletePaths.length) === 0,
|
|
5508
|
+
uischema: c,
|
|
5509
|
+
showReviewPageLink: props.withBackReviewBtn || false,
|
|
5510
|
+
isEnabled: isEnabled(c, data, '', ajv),
|
|
5511
|
+
visible
|
|
5512
|
+
};
|
|
5513
|
+
});
|
|
5514
|
+
const activeId = (props === null || props === void 0 ? void 0 : props.activeId) || 0;
|
|
5515
|
+
return {
|
|
5516
|
+
categories: categories,
|
|
5517
|
+
activeId,
|
|
5518
|
+
hasNextButton: activeId !== (categories === null || categories === void 0 ? void 0 : categories.length),
|
|
5519
|
+
hasPrevButton: activeId > 0 && activeId !== (categories === null || categories === void 0 ? void 0 : categories.length),
|
|
5520
|
+
path,
|
|
5521
|
+
isOnReview: activeId === (categories === null || categories === void 0 ? void 0 : categories.length),
|
|
5522
|
+
isValid: valid === true,
|
|
5523
|
+
maxReachedStep: 0
|
|
5524
|
+
};
|
|
5525
|
+
};
|
|
5526
|
+
const JsonFormsStepperContext = /*#__PURE__*/createContext(undefined);
|
|
5527
|
+
const JsonFormsStepperContextProvider = ({
|
|
5528
|
+
children,
|
|
5529
|
+
StepperProps
|
|
5530
|
+
}) => {
|
|
5531
|
+
var _a;
|
|
5532
|
+
const ctx = useJsonForms();
|
|
5533
|
+
const {
|
|
5534
|
+
schema,
|
|
5535
|
+
ajv
|
|
5536
|
+
} = StepperProps;
|
|
5537
|
+
const [stepperState, dispatch] = useReducer(stepperReducer, createStepperContextInitData(StepperProps));
|
|
5538
|
+
const stepperDispatch = (StepperProps === null || StepperProps === void 0 ? void 0 : StepperProps.customDispatch) || dispatch;
|
|
5539
|
+
const context = useMemo(() => {
|
|
5540
|
+
return {
|
|
5541
|
+
isProvided: true,
|
|
5542
|
+
stepperDispatch,
|
|
5543
|
+
selectStepperState: () => {
|
|
5544
|
+
return stepperState;
|
|
5545
|
+
},
|
|
5546
|
+
selectIsDisabled: () => {
|
|
5547
|
+
var _a;
|
|
5548
|
+
const category = (_a = stepperState.categories) === null || _a === void 0 ? void 0 : _a[stepperState.activeId];
|
|
5549
|
+
return category === undefined ? false : !(category === null || category === void 0 ? void 0 : category.isEnabled);
|
|
5550
|
+
},
|
|
5551
|
+
selectIsActive: id => {
|
|
5552
|
+
return id === stepperState.activeId;
|
|
5553
|
+
},
|
|
5554
|
+
selectPath: () => {
|
|
5555
|
+
return stepperState.path;
|
|
5556
|
+
},
|
|
5557
|
+
selectCategory: id => {
|
|
5558
|
+
return stepperState.categories[id];
|
|
5559
|
+
},
|
|
5560
|
+
validatePage: id => {
|
|
5561
|
+
var _a;
|
|
5562
|
+
stepperDispatch({
|
|
5563
|
+
type: 'update/category',
|
|
5564
|
+
payload: {
|
|
5565
|
+
errors: (_a = ctx === null || ctx === void 0 ? void 0 : ctx.core) === null || _a === void 0 ? void 0 : _a.errors,
|
|
5566
|
+
id,
|
|
5567
|
+
ajv
|
|
5568
|
+
}
|
|
5569
|
+
});
|
|
5570
|
+
},
|
|
5571
|
+
goToPage: (id, updateCategoryId) => {
|
|
5572
|
+
var _a, _b, _c;
|
|
5573
|
+
ajv.validate(schema, ((_a = ctx.core) === null || _a === void 0 ? void 0 : _a.data) || {});
|
|
5574
|
+
if (stepperState.isOnReview !== true) {
|
|
5575
|
+
for (let i = 0; i < id; i++) {
|
|
5576
|
+
stepperDispatch({
|
|
5577
|
+
type: 'update/category',
|
|
5578
|
+
payload: {
|
|
5579
|
+
errors: (_b = ctx === null || ctx === void 0 ? void 0 : ctx.core) === null || _b === void 0 ? void 0 : _b.errors,
|
|
5580
|
+
id: i,
|
|
5581
|
+
ajv
|
|
5582
|
+
}
|
|
5583
|
+
});
|
|
5584
|
+
}
|
|
5585
|
+
}
|
|
5586
|
+
stepperDispatch({
|
|
5587
|
+
type: 'validate/form',
|
|
5588
|
+
payload: {
|
|
5589
|
+
errors: (_c = ctx === null || ctx === void 0 ? void 0 : ctx.core) === null || _c === void 0 ? void 0 : _c.errors
|
|
5590
|
+
}
|
|
5591
|
+
});
|
|
5592
|
+
stepperDispatch({
|
|
5593
|
+
type: 'page/to/index',
|
|
5594
|
+
payload: {
|
|
5595
|
+
id
|
|
5596
|
+
}
|
|
5597
|
+
});
|
|
5598
|
+
},
|
|
5599
|
+
toggleShowReviewLink: id => {
|
|
5600
|
+
stepperDispatch({
|
|
5601
|
+
type: 'toggle/category/review-link',
|
|
5602
|
+
payload: {
|
|
5603
|
+
id
|
|
5604
|
+
}
|
|
5605
|
+
});
|
|
5606
|
+
}
|
|
5607
|
+
};
|
|
5608
|
+
}, [stepperDispatch, stepperState, (_a = ctx.core) === null || _a === void 0 ? void 0 : _a.errors]);
|
|
5609
|
+
useEffect(() => {
|
|
5610
|
+
if ((context === null || context === void 0 ? void 0 : context.isProvided) === true) {
|
|
5611
|
+
/* The block is used to cache the state for the tenant web app review editor */
|
|
5612
|
+
stepperDispatch({
|
|
5613
|
+
type: 'update/uischema',
|
|
5614
|
+
payload: {
|
|
5615
|
+
state: createStepperContextInitData(Object.assign(Object.assign({}, StepperProps), {
|
|
5616
|
+
activeId: stepperState === null || stepperState === void 0 ? void 0 : stepperState.activeId
|
|
5617
|
+
}))
|
|
5618
|
+
}
|
|
5619
|
+
});
|
|
5620
|
+
context.goToPage(stepperState.maxReachedStep);
|
|
5621
|
+
context.goToPage(stepperState.activeId);
|
|
5622
|
+
}
|
|
5623
|
+
}, [JSON.stringify(StepperProps.uischema), JSON.stringify(StepperProps.schema)]);
|
|
5624
|
+
return jsx(JsonFormsStepperContext.Provider, {
|
|
5625
|
+
value: context,
|
|
5626
|
+
children: children
|
|
5627
|
+
});
|
|
5628
|
+
};
|
|
5631
5629
|
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5630
|
+
const GoAInputBaseTableReview = props => {
|
|
5631
|
+
var _a, _b, _c, _d;
|
|
5632
|
+
const {
|
|
5633
|
+
data,
|
|
5634
|
+
uischema,
|
|
5635
|
+
label
|
|
5636
|
+
} = props;
|
|
5637
|
+
const labelToUpdate = convertToSentenceCase(getLabelText(uischema.scope, label || ''));
|
|
5638
|
+
const categoryIndex = (_a = uischema.options) === null || _a === void 0 ? void 0 : _a.categoryIndex;
|
|
5639
|
+
const formStepperCtx = useContext(JsonFormsStepperContext);
|
|
5640
|
+
let reviewText = data;
|
|
5641
|
+
const isBoolean = typeof data === 'boolean';
|
|
5642
|
+
if (isBoolean) {
|
|
5643
|
+
const checkboxLabel = ((_c = (_b = uischema.options) === null || _b === void 0 ? void 0 : _b.text) === null || _c === void 0 ? void 0 : _c.trim()) || convertToSentenceCase(getLastSegmentFromPointer(uischema.scope));
|
|
5644
|
+
if (((_d = uischema.options) === null || _d === void 0 ? void 0 : _d.radio) === true) {
|
|
5645
|
+
reviewText = data ? `Yes` : `No`;
|
|
5646
|
+
} else {
|
|
5647
|
+
if (label !== '' || typeof label === 'boolean') {
|
|
5648
|
+
reviewText = data ? `Yes` : `No`;
|
|
5635
5649
|
} else {
|
|
5636
|
-
|
|
5637
|
-
target[targetIndex] = element;
|
|
5650
|
+
reviewText = data ? `Yes (${checkboxLabel.trim()})` : `No (${checkboxLabel.trim()})`;
|
|
5638
5651
|
}
|
|
5639
|
-
|
|
5640
|
-
targetIndex++;
|
|
5641
5652
|
}
|
|
5642
|
-
sourceIndex++;
|
|
5643
5653
|
}
|
|
5644
|
-
return
|
|
5654
|
+
return jsxs("tr", {
|
|
5655
|
+
"data-testid": `input-base-table-${label}-row`,
|
|
5656
|
+
children: [jsx(PageReviewNameCol, {
|
|
5657
|
+
children: jsx("strong", {
|
|
5658
|
+
children: labelToUpdate
|
|
5659
|
+
})
|
|
5660
|
+
}), jsx(PageReviewValueCol, {
|
|
5661
|
+
children: reviewText
|
|
5662
|
+
}), jsx(PageReviewActionCol, {
|
|
5663
|
+
children: jsx(GoAButton, {
|
|
5664
|
+
type: "tertiary",
|
|
5665
|
+
testId: `page-review-change-${label}-btn`,
|
|
5666
|
+
onClick: () => {
|
|
5667
|
+
if (formStepperCtx) {
|
|
5668
|
+
formStepperCtx.toggleShowReviewLink(categoryIndex);
|
|
5669
|
+
formStepperCtx.goToPage(categoryIndex);
|
|
5670
|
+
}
|
|
5671
|
+
},
|
|
5672
|
+
children: "Change"
|
|
5673
|
+
})
|
|
5674
|
+
})]
|
|
5675
|
+
});
|
|
5645
5676
|
};
|
|
5677
|
+
const GoAInputBaseTableReviewControl = withJsonFormsControlProps(GoAInputBaseTableReview);
|
|
5646
5678
|
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5655
|
-
|
|
5656
|
-
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5660
|
-
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
5661
|
-
|
|
5662
|
-
var isConstructorModern = function isConstructor(argument) {
|
|
5663
|
-
if (!isCallable$4(argument)) return false;
|
|
5664
|
-
try {
|
|
5665
|
-
construct(noop, [], argument);
|
|
5666
|
-
return true;
|
|
5667
|
-
} catch (error) {
|
|
5668
|
-
return false;
|
|
5669
|
-
}
|
|
5679
|
+
let _$7 = t => t,
|
|
5680
|
+
_t$7;
|
|
5681
|
+
const renderLayoutElements = (elements, schema, path, enabled, renderers, cells) => {
|
|
5682
|
+
return elements.map((child, index) => jsx("div", {
|
|
5683
|
+
children: jsx(JsonFormsDispatch, {
|
|
5684
|
+
uischema: child,
|
|
5685
|
+
schema: schema,
|
|
5686
|
+
path: path,
|
|
5687
|
+
enabled: enabled,
|
|
5688
|
+
renderers: renderers,
|
|
5689
|
+
cells: cells
|
|
5690
|
+
}, path)
|
|
5691
|
+
}, index));
|
|
5670
5692
|
};
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
}
|
|
5679
|
-
try {
|
|
5680
|
-
// we can't check .prototype since constructors produced by .bind haven't it
|
|
5681
|
-
// `Function#toString` throws on some built-it function in some legacy engines
|
|
5682
|
-
// (for example, `DOMQuad` and similar in FF41-)
|
|
5683
|
-
return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
|
|
5684
|
-
} catch (error) {
|
|
5685
|
-
return true;
|
|
5686
|
-
}
|
|
5693
|
+
const withAjvProps = Component => function WithAjvProps(props) {
|
|
5694
|
+
const ctx = useJsonForms();
|
|
5695
|
+
const ajv = getAjv({
|
|
5696
|
+
jsonforms: Object.assign({}, ctx)
|
|
5697
|
+
});
|
|
5698
|
+
return jsx(Component, Object.assign({}, props, {
|
|
5699
|
+
ajv: ajv
|
|
5700
|
+
}));
|
|
5687
5701
|
};
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
// cross-realm fallback
|
|
5716
|
-
if (isConstructor$1(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
|
5717
|
-
else if (isObject$2(C)) {
|
|
5718
|
-
C = C[SPECIES$2];
|
|
5719
|
-
if (C === null) C = undefined;
|
|
5702
|
+
const LayoutRenderer = ({
|
|
5703
|
+
elements,
|
|
5704
|
+
schema,
|
|
5705
|
+
path,
|
|
5706
|
+
enabled,
|
|
5707
|
+
direction,
|
|
5708
|
+
renderers,
|
|
5709
|
+
cells,
|
|
5710
|
+
visible,
|
|
5711
|
+
width
|
|
5712
|
+
}) => {
|
|
5713
|
+
if (isEmpty(elements)) {
|
|
5714
|
+
return null;
|
|
5715
|
+
} else {
|
|
5716
|
+
if (direction === 'row') {
|
|
5717
|
+
return jsx(Visible, {
|
|
5718
|
+
visible: visible,
|
|
5719
|
+
children: jsx(GoAGrid, {
|
|
5720
|
+
minChildWidth: width || '10ch',
|
|
5721
|
+
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
5722
|
+
})
|
|
5723
|
+
});
|
|
5724
|
+
} else {
|
|
5725
|
+
return jsx(Visible, {
|
|
5726
|
+
visible: visible,
|
|
5727
|
+
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
5728
|
+
});
|
|
5720
5729
|
}
|
|
5721
|
-
}
|
|
5730
|
+
}
|
|
5722
5731
|
};
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5732
|
+
const ReviewLayoutRenderer = ({
|
|
5733
|
+
elements,
|
|
5734
|
+
schema,
|
|
5735
|
+
path,
|
|
5736
|
+
enabled,
|
|
5737
|
+
direction,
|
|
5738
|
+
renderers,
|
|
5739
|
+
cells,
|
|
5740
|
+
visible,
|
|
5741
|
+
width
|
|
5742
|
+
}) => {
|
|
5743
|
+
if (isEmpty(elements)) {
|
|
5744
|
+
return null;
|
|
5745
|
+
} else {
|
|
5746
|
+
if (direction === 'row') {
|
|
5747
|
+
return jsx(Visible, {
|
|
5748
|
+
visible: visible,
|
|
5749
|
+
children: jsx(ReviewGrid, {
|
|
5750
|
+
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
5751
|
+
})
|
|
5752
|
+
});
|
|
5753
|
+
} else {
|
|
5754
|
+
return jsx(Visible, {
|
|
5755
|
+
visible: visible,
|
|
5756
|
+
children: renderLayoutElements(elements, schema, path, enabled, renderers, cells)
|
|
5757
|
+
});
|
|
5758
|
+
}
|
|
5759
|
+
}
|
|
5730
5760
|
};
|
|
5761
|
+
const ReviewGrid = styled.div(_t$7 || (_t$7 = _$7`
|
|
5762
|
+
display: grid;
|
|
5763
|
+
grid-template-columns: repeat(auto-fit, minmax(250px, calc(50% - 8px)));
|
|
5764
|
+
gap: 16px;
|
|
5765
|
+
`));
|
|
5731
5766
|
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5767
|
+
let _$6 = t => t,
|
|
5768
|
+
_t$6,
|
|
5769
|
+
_t2$4,
|
|
5770
|
+
_t3$3,
|
|
5771
|
+
_t4$3,
|
|
5772
|
+
_t5$2,
|
|
5773
|
+
_t6$2,
|
|
5774
|
+
_t7$1,
|
|
5775
|
+
_t8$1,
|
|
5776
|
+
_t9$1,
|
|
5777
|
+
_t10$1,
|
|
5778
|
+
_t11$1,
|
|
5779
|
+
_t12$1,
|
|
5780
|
+
_t13$1,
|
|
5781
|
+
_t14$1,
|
|
5782
|
+
_t15$1,
|
|
5783
|
+
_t16;
|
|
5784
|
+
const ReviewItem = styled.div(_t$6 || (_t$6 = _$6`
|
|
5785
|
+
display: flex;
|
|
5786
|
+
flex-direction: column;
|
|
5787
|
+
border: var(--goa-border-width-s) solid grey;
|
|
5788
|
+
border-radius: var(--goa-border-radius-m);
|
|
5789
|
+
margin: var(--goa-space-2xs);
|
|
5790
|
+
padding: var(--goa-space-xs);
|
|
5791
|
+
div:empty {
|
|
5792
|
+
display: none;
|
|
5749
5793
|
}
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
var
|
|
5794
|
+
`));
|
|
5795
|
+
const ReviewItemSection = styled.div(_t2$4 || (_t2$4 = _$6`
|
|
5796
|
+
background-color: #f1f1f1;
|
|
5797
|
+
margin-bottom: var(--goa-space-m);
|
|
5798
|
+
padding: var(--goa-space-m);
|
|
5799
|
+
border: 1px solid #dcdcdc;
|
|
5800
|
+
border-radius: 5px;
|
|
5755
5801
|
|
|
5756
|
-
|
|
5757
|
-
|
|
5802
|
+
.element-style {
|
|
5803
|
+
max-width: 1600px;
|
|
5804
|
+
}
|
|
5805
|
+
`));
|
|
5806
|
+
const ReviewItemHeader = styled.div(_t3$3 || (_t3$3 = _$6`
|
|
5807
|
+
display: flex;
|
|
5808
|
+
align-items: center;
|
|
5809
|
+
justify-content: space-between;
|
|
5810
|
+
margin-bottom: var(--goa-space-xl);
|
|
5811
|
+
`));
|
|
5812
|
+
const ReviewItemTitle = styled.div(_t4$3 || (_t4$3 = _$6`
|
|
5813
|
+
font-size: var(--goa-space-l);
|
|
5814
|
+
line-height: var(--goa-space-xl);
|
|
5815
|
+
font-weight: 300;
|
|
5816
|
+
`));
|
|
5817
|
+
const Anchor = styled.div(_t5$2 || (_t5$2 = _$6`
|
|
5818
|
+
color: #0070c4;
|
|
5819
|
+
text-decoration: underline;
|
|
5820
|
+
outline: none;
|
|
5821
|
+
cursor: pointer;
|
|
5758
5822
|
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
for (const key in obj) {
|
|
5763
|
-
if (typeof obj[key] === 'object' && obj[key] !== null) {
|
|
5764
|
-
const result = getProperty(obj[key], propName);
|
|
5765
|
-
if (result !== undefined) return result;
|
|
5766
|
-
}
|
|
5823
|
+
&:focus {
|
|
5824
|
+
outline: 2px solid #0070c4;
|
|
5825
|
+
background-color: #e6f7ff;
|
|
5767
5826
|
}
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5827
|
+
`));
|
|
5828
|
+
styled.div(_t6$2 || (_t6$2 = _$6`
|
|
5829
|
+
margin-left: var(--goa-space-m);
|
|
5830
|
+
`));
|
|
5831
|
+
styled.div(_t7$1 || (_t7$1 = _$6`
|
|
5832
|
+
margin-bottom: var(--goa-space-m);
|
|
5833
|
+
`));
|
|
5834
|
+
styled.div(_t8$1 || (_t8$1 = _$6`
|
|
5835
|
+
margin: var(--goa-space-s);
|
|
5836
|
+
width: 100%;
|
|
5837
|
+
`));
|
|
5838
|
+
styled.h3(_t9$1 || (_t9$1 = _$6`
|
|
5839
|
+
text-transform: capitalize;
|
|
5840
|
+
`));
|
|
5841
|
+
const RightAlignmentDiv = styled.div(_t10$1 || (_t10$1 = _$6`
|
|
5842
|
+
@media screen and (max-width: 767px) {
|
|
5843
|
+
margin-bottom: var(--goa-space-l);
|
|
5844
|
+
}
|
|
5845
|
+
@media screen and (min-width: 768px) {
|
|
5846
|
+
display: flex;
|
|
5847
|
+
justify-content: flex-end;
|
|
5848
|
+
margin-bottom: var(--goa-space-l);
|
|
5849
|
+
}
|
|
5850
|
+
`));
|
|
5851
|
+
const FormStepperSummaryH3 = styled.h3(_t11$1 || (_t11$1 = _$6`
|
|
5852
|
+
flex: 1;
|
|
5853
|
+
margin-bottom: var(--goa-space-m);
|
|
5854
|
+
font-size: var(--goa-font-size-7);
|
|
5855
|
+
line-height: var(--goa-line-height-4);
|
|
5856
|
+
font-weight: var(--goa-font-weight-regular);
|
|
5857
|
+
`));
|
|
5858
|
+
const PageRenderPadding = styled.h3(_t12$1 || (_t12$1 = _$6`
|
|
5859
|
+
margin-top: var(--goa-space-2xl);
|
|
5860
|
+
`));
|
|
5861
|
+
const PageBorder = styled.h3(_t13$1 || (_t13$1 = _$6`
|
|
5862
|
+
padding: var(--goa-space-3xl);
|
|
5863
|
+
`));
|
|
5864
|
+
const TableReviewItemSection = styled.div(_t14$1 || (_t14$1 = _$6`
|
|
5865
|
+
.element-style {
|
|
5866
|
+
max-width: 1600px;
|
|
5867
|
+
}
|
|
5868
|
+
`));
|
|
5869
|
+
const TableReviewItem = styled.div(_t15$1 || (_t15$1 = _$6`
|
|
5870
|
+
border: 1px solid #dcdcdc;
|
|
5871
|
+
border-radius: 5px;
|
|
5872
|
+
padding: var(--goa-space-2xl);
|
|
5873
|
+
`));
|
|
5874
|
+
const TableReviewCategoryLabel = styled.h3(_t16 || (_t16 = _$6`
|
|
5875
|
+
color: var(--goa-color-text-secondary) !important;
|
|
5876
|
+
`));
|
|
5877
|
+
|
|
5878
|
+
class ContextProviderClass {
|
|
5879
|
+
addDataByUrl(key, url, processDataFunction, token) {
|
|
5880
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
5881
|
+
let header = {};
|
|
5882
|
+
const [requestId, axiosWithConfig] = this.getAxiosInterceptorConfig(axios);
|
|
5883
|
+
if (token) {
|
|
5884
|
+
header = Object.assign(Object.assign({}, header), {
|
|
5885
|
+
Authorization: `Bearer ${token}`
|
|
5886
|
+
});
|
|
5784
5887
|
}
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5888
|
+
yield axiosWithConfig.get(url, header).then(response => {
|
|
5889
|
+
const processedData = processDataFunction(response.data);
|
|
5890
|
+
this.enumValues.set(key, () => processedData);
|
|
5891
|
+
}).catch(err => {
|
|
5892
|
+
if (err.message.includes('CORS')) {
|
|
5893
|
+
console.warn(err.message);
|
|
5894
|
+
} else {
|
|
5895
|
+
console.warn(`addDataByUrl: ${err.message}`);
|
|
5896
|
+
}
|
|
5788
5897
|
});
|
|
5789
|
-
|
|
5790
|
-
}
|
|
5791
|
-
});
|
|
5792
|
-
return values;
|
|
5793
|
-
};
|
|
5794
|
-
|
|
5795
|
-
const FormStepperReviewer = props => {
|
|
5796
|
-
var _a, _b, _c;
|
|
5797
|
-
const {
|
|
5798
|
-
uischema,
|
|
5799
|
-
data,
|
|
5800
|
-
schema,
|
|
5801
|
-
ajv,
|
|
5802
|
-
cells,
|
|
5803
|
-
enabled,
|
|
5804
|
-
navigationFunc
|
|
5805
|
-
} = props;
|
|
5806
|
-
const componentProps = (_b = (_a = uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps) !== null && _b !== void 0 ? _b : {};
|
|
5807
|
-
const readOnly = (_c = componentProps === null || componentProps === void 0 ? void 0 : componentProps.readOnly) !== null && _c !== void 0 ? _c : false;
|
|
5808
|
-
const categorization = uischema;
|
|
5809
|
-
const categories = categorization.elements.filter(category => isVisible(category, data, '', ajv));
|
|
5810
|
-
const rescopeMaps = ['#/properties/albertaAddress', '#/properties/canadianAddress', '#/properties/sin'];
|
|
5811
|
-
return jsx(ReviewItem, {
|
|
5812
|
-
children: categories.map((category, index) => {
|
|
5813
|
-
const categoryLabel = category.label || category.i18n || 'Unknown Category';
|
|
5814
|
-
const testId = `${categoryLabel}-review-link`;
|
|
5815
|
-
return jsxs(ReviewItemSection, {
|
|
5816
|
-
children: [jsxs(ReviewItemHeader, {
|
|
5817
|
-
children: [jsx(ReviewItemTitle, {
|
|
5818
|
-
children: categoryLabel
|
|
5819
|
-
}), navigationFunc && jsx(Anchor, {
|
|
5820
|
-
onClick: () => {
|
|
5821
|
-
navigationFunc(index);
|
|
5822
|
-
},
|
|
5823
|
-
"data-testid": testId,
|
|
5824
|
-
onKeyDown: e => {
|
|
5825
|
-
if (!readOnly && (e.key === ' ' || e.key === 'Enter')) {
|
|
5826
|
-
e.preventDefault();
|
|
5827
|
-
navigationFunc(index);
|
|
5828
|
-
}
|
|
5829
|
-
},
|
|
5830
|
-
children: readOnly ? 'View' : 'Edit'
|
|
5831
|
-
})]
|
|
5832
|
-
}), jsx(GoAGrid, {
|
|
5833
|
-
minChildWidth: "100%",
|
|
5834
|
-
children: category.elements.filter(field => {
|
|
5835
|
-
var _a, _b;
|
|
5836
|
-
// [TODO] we need to double check why we cannot hide the elements at the element level
|
|
5837
|
-
const conditionProps = (_a = field.rule) === null || _a === void 0 ? void 0 : _a.condition;
|
|
5838
|
-
/* istanbul ignore next */
|
|
5839
|
-
if (conditionProps && data) {
|
|
5840
|
-
const canHideControlParts = (_b = conditionProps === null || conditionProps === void 0 ? void 0 : conditionProps.scope) === null || _b === void 0 ? void 0 : _b.split('/');
|
|
5841
|
-
const canHideControl = canHideControlParts && canHideControlParts[(canHideControlParts === null || canHideControlParts === void 0 ? void 0 : canHideControlParts.length) - 1];
|
|
5842
|
-
const isHidden = getProperty(data, canHideControl);
|
|
5843
|
-
if (!isHidden) {
|
|
5844
|
-
return field;
|
|
5845
|
-
}
|
|
5846
|
-
} else {
|
|
5847
|
-
return field;
|
|
5848
|
-
}
|
|
5849
|
-
}).map(e => {
|
|
5850
|
-
const layout = e;
|
|
5851
|
-
if (rescopeMaps.some(scope => {
|
|
5852
|
-
var _a;
|
|
5853
|
-
return (_a = layout.elements) === null || _a === void 0 ? void 0 : _a.map(el => {
|
|
5854
|
-
const element = el;
|
|
5855
|
-
return element.scope;
|
|
5856
|
-
}).includes(scope);
|
|
5857
|
-
})) {
|
|
5858
|
-
return layout.elements;
|
|
5859
|
-
} else {
|
|
5860
|
-
return e;
|
|
5861
|
-
}
|
|
5862
|
-
}).flat().map((element, index) => {
|
|
5863
|
-
return jsx("div", {
|
|
5864
|
-
className: "element-style",
|
|
5865
|
-
children: jsx(JsonFormsDispatch, {
|
|
5866
|
-
"data-testid": `jsonforms-object-list-defined-elements-dispatch`,
|
|
5867
|
-
schema: schema,
|
|
5868
|
-
uischema: element,
|
|
5869
|
-
enabled: enabled,
|
|
5870
|
-
renderers: GoAReviewRenderers,
|
|
5871
|
-
cells: cells
|
|
5872
|
-
})
|
|
5873
|
-
}, `form-stepper-category-${index}`);
|
|
5874
|
-
})
|
|
5875
|
-
})]
|
|
5876
|
-
}, index);
|
|
5877
|
-
})
|
|
5878
|
-
});
|
|
5879
|
-
};
|
|
5880
|
-
const FormStepperReviewControl = withAjvProps(withTranslateProps(withJsonFormsLayoutProps(FormStepperReviewer)));
|
|
5881
|
-
|
|
5882
|
-
const isErrorPathIncluded = (errorPaths, path) => {
|
|
5883
|
-
return errorPaths.some(ePath => {
|
|
5884
|
-
/**
|
|
5885
|
-
* case A: errorPaths: [name] path: [name]
|
|
5886
|
-
*
|
|
5887
|
-
* case B: errorPath: [name] path: [name.firstName]
|
|
5888
|
-
* */
|
|
5889
|
-
return ePath === path || path.startsWith(ePath + '.');
|
|
5890
|
-
});
|
|
5891
|
-
};
|
|
5892
|
-
function isNumber(value) {
|
|
5893
|
-
return value != null && value !== '' && !isNaN(Number(value.toString()));
|
|
5894
|
-
}
|
|
5895
|
-
const getIncompletePaths = (ajv, scopes) => {
|
|
5896
|
-
var _a;
|
|
5897
|
-
const requiredErrorPaths = (_a = ajv === null || ajv === void 0 ? void 0 : ajv.errors) === null || _a === void 0 ? void 0 : _a.filter(e => e.keyword === 'required' || e.keyword === 'minLength').map(e => {
|
|
5898
|
-
return getControlPath(e);
|
|
5899
|
-
});
|
|
5900
|
-
const _scopes = scopes.map(scope => toDataPath(scope)).filter(path => requiredErrorPaths && isErrorPathIncluded(requiredErrorPaths, path));
|
|
5901
|
-
return _scopes;
|
|
5902
|
-
};
|
|
5903
|
-
const subErrorInParent = (error, paths) => {
|
|
5904
|
-
/*
|
|
5905
|
-
Detect is there sub error in an object array.
|
|
5906
|
-
For example: error with instance path /roadmap/0/when belongs to /roadmap
|
|
5907
|
-
*/
|
|
5908
|
-
const errorPaths = error.instancePath.split('/');
|
|
5909
|
-
if (errorPaths.length < 2) return false;
|
|
5910
|
-
// For case /roadmap/0
|
|
5911
|
-
if (errorPaths.length > 1 && isNumber(errorPaths[errorPaths.length - 1])) {
|
|
5912
|
-
const parentPath = errorPaths.slice(0, errorPaths.length - 1).join('/');
|
|
5913
|
-
return paths.includes(parentPath);
|
|
5914
|
-
}
|
|
5915
|
-
// For case /roadmap/0/when
|
|
5916
|
-
if (errorPaths.length > 2 && isNumber(errorPaths[errorPaths.length - 2])) {
|
|
5917
|
-
const parentPath = errorPaths.slice(0, errorPaths.length - 2).join('/');
|
|
5918
|
-
return paths.includes(parentPath);
|
|
5898
|
+
axiosWithConfig.interceptors.request.eject(requestId);
|
|
5899
|
+
});
|
|
5919
5900
|
}
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
//
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
};
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
categories
|
|
5934
|
-
} = state;
|
|
5935
|
-
const lastId = categories[categories.length - 1].id;
|
|
5936
|
-
switch (action.type) {
|
|
5937
|
-
case 'update/uischema':
|
|
5938
|
-
{
|
|
5939
|
-
return Object.assign({}, action.payload.state);
|
|
5940
|
-
}
|
|
5941
|
-
case 'page/next':
|
|
5942
|
-
{
|
|
5943
|
-
state.activeId += 1;
|
|
5944
|
-
if (activeId === lastId) {
|
|
5945
|
-
state.isOnReview = true;
|
|
5946
|
-
state.hasNextButton = false;
|
|
5947
|
-
state.hasPrevButton = false;
|
|
5948
|
-
} else {
|
|
5949
|
-
state.hasNextButton = true;
|
|
5950
|
-
state.hasPrevButton = true;
|
|
5951
|
-
state.isOnReview = false;
|
|
5952
|
-
}
|
|
5953
|
-
state.categories[activeId].isVisited = true;
|
|
5954
|
-
return Object.assign({}, state);
|
|
5955
|
-
}
|
|
5956
|
-
case 'page/prev':
|
|
5957
|
-
{
|
|
5958
|
-
state.categories[activeId].isVisited = true;
|
|
5959
|
-
if (activeId > 0) {
|
|
5960
|
-
state.activeId -= 1;
|
|
5961
|
-
state.hasPrevButton = state.activeId !== 0;
|
|
5962
|
-
state.hasNextButton = true;
|
|
5963
|
-
state.isOnReview = false;
|
|
5964
|
-
}
|
|
5965
|
-
return Object.assign({}, state);
|
|
5966
|
-
}
|
|
5967
|
-
case 'page/to/index':
|
|
5968
|
-
{
|
|
5901
|
+
constructor() {
|
|
5902
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5903
|
+
this.enumValues = new Map();
|
|
5904
|
+
this.enumFunctions = new Map();
|
|
5905
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5906
|
+
this.enumSubmitFunctions = new Map();
|
|
5907
|
+
this.addFormContextData = (key, data) => {
|
|
5908
|
+
this.enumValues.set(key, () => data);
|
|
5909
|
+
};
|
|
5910
|
+
this.setup = props => {
|
|
5911
|
+
var _a, _b;
|
|
5912
|
+
this.selfProps = props;
|
|
5913
|
+
if (props.fileManagement) {
|
|
5969
5914
|
const {
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
state.categories[id].isVisited = true;
|
|
5980
|
-
state.hasNextButton = id <= lastId;
|
|
5981
|
-
state.hasPrevButton = id !== 0;
|
|
5982
|
-
state.isOnReview = false;
|
|
5983
|
-
state.maxReachedStep = Math.max(state.maxReachedStep, activeId);
|
|
5984
|
-
return Object.assign({}, state);
|
|
5985
|
-
}
|
|
5915
|
+
fileList,
|
|
5916
|
+
uploadFile,
|
|
5917
|
+
downloadFile,
|
|
5918
|
+
deleteFile
|
|
5919
|
+
} = props.fileManagement;
|
|
5920
|
+
this.enumValues.set('file-list', () => fileList);
|
|
5921
|
+
this.enumFunctions.set('upload-file', () => uploadFile);
|
|
5922
|
+
this.enumFunctions.set('download-file', () => downloadFile);
|
|
5923
|
+
this.enumFunctions.set('delete-file', () => deleteFile);
|
|
5986
5924
|
}
|
|
5987
|
-
|
|
5988
|
-
{
|
|
5925
|
+
if (props.submit) {
|
|
5989
5926
|
const {
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
/*
|
|
5995
|
-
ctx.core.errors only includes required errors when the fields are touched. In this case, we still ajv to figure out the required errors at the very beginning.
|
|
5996
|
-
*/
|
|
5997
|
-
const incompletePaths = getIncompletePaths(ajv, state.categories[id].scopes);
|
|
5998
|
-
const errorsInCategory = getErrorsInScopes(errors, state.categories[id].scopes || []);
|
|
5999
|
-
state.categories[id].isCompleted = (incompletePaths === null || incompletePaths === void 0 ? void 0 : incompletePaths.length) === 0;
|
|
6000
|
-
state.categories[id].isValid = errorsInCategory.length === 0;
|
|
6001
|
-
state.categories[id].isVisited = true;
|
|
6002
|
-
return Object.assign({}, state);
|
|
5927
|
+
submitForm
|
|
5928
|
+
} = props.submit;
|
|
5929
|
+
const submitFunction = submitForm;
|
|
5930
|
+
this.enumSubmitFunctions.set('submit-form', () => submitFunction);
|
|
6003
5931
|
}
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
}
|
|
6009
|
-
state.isValid = errors.length === 0;
|
|
6010
|
-
return Object.assign({}, state);
|
|
5932
|
+
if (props.data) {
|
|
5933
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
5934
|
+
Object.keys(props.data).forEach(item => {
|
|
5935
|
+
this.enumValues.set(item, () => props.data[item]);
|
|
5936
|
+
});
|
|
6011
5937
|
}
|
|
6012
|
-
|
|
6013
|
-
|
|
5938
|
+
if (!props.children) {
|
|
5939
|
+
return null;
|
|
5940
|
+
}
|
|
5941
|
+
if (props.formUrl) {
|
|
5942
|
+
this.baseEnumerator.formUrl = props.formUrl;
|
|
5943
|
+
}
|
|
5944
|
+
this.baseEnumerator.isFormSubmitted = (_a = props.isFormSubmitted) !== null && _a !== void 0 ? _a : false;
|
|
5945
|
+
return jsx(JsonFormContext.Provider, {
|
|
5946
|
+
value: this.baseEnumerator,
|
|
5947
|
+
children: (_b = this.selfProps) === null || _b === void 0 ? void 0 : _b.children
|
|
5948
|
+
});
|
|
5949
|
+
};
|
|
5950
|
+
this.getContextProvider = () => {
|
|
5951
|
+
var _a;
|
|
5952
|
+
return jsx(JsonFormContext.Provider, {
|
|
5953
|
+
value: this.baseEnumerator,
|
|
5954
|
+
children: (_a = this.selfProps) === null || _a === void 0 ? void 0 : _a.children
|
|
5955
|
+
});
|
|
5956
|
+
};
|
|
5957
|
+
this.getFormUrl = () => {
|
|
5958
|
+
var _a;
|
|
5959
|
+
return (_a = this.selfProps) === null || _a === void 0 ? void 0 : _a.formUrl;
|
|
5960
|
+
};
|
|
5961
|
+
this.getAxiosInterceptorConfig = axios => {
|
|
5962
|
+
const requestId = axios.interceptors.request.use(req => {
|
|
5963
|
+
if (req.data === undefined) {
|
|
5964
|
+
throw new Error(`The URL: ${req.url} encountered a CORS error.`);
|
|
5965
|
+
}
|
|
5966
|
+
return req;
|
|
5967
|
+
});
|
|
5968
|
+
return [requestId, axios];
|
|
5969
|
+
};
|
|
5970
|
+
/**
|
|
5971
|
+
* Grabs data stored under a given key
|
|
5972
|
+
*
|
|
5973
|
+
*/
|
|
5974
|
+
this.getFormContextData = key => {
|
|
5975
|
+
const dataFunction = this.baseEnumerator.data.get(key);
|
|
5976
|
+
return dataFunction && dataFunction();
|
|
5977
|
+
};
|
|
5978
|
+
/**
|
|
5979
|
+
* Grabs all data
|
|
5980
|
+
*
|
|
5981
|
+
*/
|
|
5982
|
+
this.getAllFormContextData = () => {
|
|
5983
|
+
const allData = [];
|
|
5984
|
+
this.baseEnumerator.data.forEach((d, key) => {
|
|
5985
|
+
allData.push({
|
|
5986
|
+
[key]: d()
|
|
5987
|
+
});
|
|
5988
|
+
});
|
|
5989
|
+
return allData;
|
|
5990
|
+
};
|
|
5991
|
+
this.baseEnumerator = {
|
|
5992
|
+
data: this.enumValues,
|
|
5993
|
+
functions: this.enumFunctions,
|
|
5994
|
+
submitFunction: this.enumSubmitFunctions,
|
|
5995
|
+
addFormContextData: this.addFormContextData,
|
|
5996
|
+
getFormContextData: this.getFormContextData,
|
|
5997
|
+
getAllFormContextData: this.getAllFormContextData,
|
|
5998
|
+
formUrl: this.getFormUrl()
|
|
5999
|
+
};
|
|
6000
|
+
this.selfProps = {};
|
|
6014
6001
|
}
|
|
6015
|
-
}
|
|
6002
|
+
}
|
|
6003
|
+
const ContextProviderC = new ContextProviderClass();
|
|
6004
|
+
const ContextProviderFactory = () => new ContextProviderClass().setup;
|
|
6005
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6006
|
+
const JsonFormContext = /*#__PURE__*/createContext(null);
|
|
6016
6007
|
|
|
6017
|
-
const
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6031
|
-
|
|
6032
|
-
const incompletePaths = getIncompletePaths(ajv, scopes);
|
|
6033
|
-
return {
|
|
6034
|
-
id,
|
|
6035
|
-
label: deriveLabelForUISchemaElement(c, t),
|
|
6036
|
-
scopes,
|
|
6037
|
-
isVisited: false,
|
|
6038
|
-
isCompleted: (incompletePaths === null || incompletePaths === void 0 ? void 0 : incompletePaths.length) === 0,
|
|
6039
|
-
isValid: (incompletePaths === null || incompletePaths === void 0 ? void 0 : incompletePaths.length) === 0,
|
|
6040
|
-
uischema: c,
|
|
6041
|
-
isEnabled: isEnabled(c, data, '', ajv),
|
|
6042
|
-
visible
|
|
6043
|
-
};
|
|
6008
|
+
const RenderStepElements = props => {
|
|
6009
|
+
return jsx(Visible, {
|
|
6010
|
+
visible: props.visible,
|
|
6011
|
+
"date-testid": `${props.path}-categories-${props.categoryIndex}`,
|
|
6012
|
+
children: props.category.elements.map((uiSchema, index) => {
|
|
6013
|
+
return jsx(JsonFormsDispatch, {
|
|
6014
|
+
schema: props.schema,
|
|
6015
|
+
uischema: uiSchema,
|
|
6016
|
+
renderers: props.renderers,
|
|
6017
|
+
cells: props.cells,
|
|
6018
|
+
path: props.path,
|
|
6019
|
+
visible: props.visible,
|
|
6020
|
+
enabled: props.enabled
|
|
6021
|
+
}, `${props.path}-category-page-${index}`);
|
|
6022
|
+
})
|
|
6044
6023
|
});
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6024
|
+
};
|
|
6025
|
+
|
|
6026
|
+
var uncurryThis$3 = functionUncurryThisClause;
|
|
6027
|
+
var aCallable$6 = aCallable$9;
|
|
6028
|
+
var NATIVE_BIND = functionBindNative;
|
|
6029
|
+
|
|
6030
|
+
var bind$5 = uncurryThis$3(uncurryThis$3.bind);
|
|
6031
|
+
|
|
6032
|
+
// optional / simple context binding
|
|
6033
|
+
var functionBindContext = function (fn, that) {
|
|
6034
|
+
aCallable$6(fn);
|
|
6035
|
+
return that === undefined ? fn : NATIVE_BIND ? bind$5(fn, that) : function (/* ...args */) {
|
|
6036
|
+
return fn.apply(that, arguments);
|
|
6055
6037
|
};
|
|
6056
6038
|
};
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6079
|
-
|
|
6080
|
-
|
|
6081
|
-
},
|
|
6082
|
-
selectIsActive: id => {
|
|
6083
|
-
return id === stepperState.activeId;
|
|
6084
|
-
},
|
|
6085
|
-
selectPath: () => {
|
|
6086
|
-
return stepperState.path;
|
|
6087
|
-
},
|
|
6088
|
-
selectCategory: id => {
|
|
6089
|
-
return stepperState.categories[id];
|
|
6090
|
-
},
|
|
6091
|
-
validatePage: id => {
|
|
6092
|
-
var _a;
|
|
6093
|
-
stepperDispatch({
|
|
6094
|
-
type: 'update/category',
|
|
6095
|
-
payload: {
|
|
6096
|
-
errors: (_a = ctx === null || ctx === void 0 ? void 0 : ctx.core) === null || _a === void 0 ? void 0 : _a.errors,
|
|
6097
|
-
id,
|
|
6098
|
-
ajv
|
|
6099
|
-
}
|
|
6100
|
-
});
|
|
6101
|
-
},
|
|
6102
|
-
goToPage: (id, updateCategoryId) => {
|
|
6103
|
-
var _a, _b, _c;
|
|
6104
|
-
ajv.validate(schema, ((_a = ctx.core) === null || _a === void 0 ? void 0 : _a.data) || {});
|
|
6105
|
-
if (stepperState.isOnReview !== true) {
|
|
6106
|
-
for (let i = 0; i < id; i++) {
|
|
6107
|
-
stepperDispatch({
|
|
6108
|
-
type: 'update/category',
|
|
6109
|
-
payload: {
|
|
6110
|
-
errors: (_b = ctx === null || ctx === void 0 ? void 0 : ctx.core) === null || _b === void 0 ? void 0 : _b.errors,
|
|
6111
|
-
id: i,
|
|
6112
|
-
ajv
|
|
6113
|
-
}
|
|
6114
|
-
});
|
|
6115
|
-
}
|
|
6116
|
-
}
|
|
6117
|
-
stepperDispatch({
|
|
6118
|
-
type: 'validate/form',
|
|
6119
|
-
payload: {
|
|
6120
|
-
errors: (_c = ctx === null || ctx === void 0 ? void 0 : ctx.core) === null || _c === void 0 ? void 0 : _c.errors
|
|
6121
|
-
}
|
|
6122
|
-
});
|
|
6123
|
-
stepperDispatch({
|
|
6124
|
-
type: 'page/to/index',
|
|
6125
|
-
payload: {
|
|
6126
|
-
id
|
|
6127
|
-
}
|
|
6128
|
-
});
|
|
6039
|
+
|
|
6040
|
+
var isArray$1 = isArray$4;
|
|
6041
|
+
var lengthOfArrayLike$3 = lengthOfArrayLike$7;
|
|
6042
|
+
var doesNotExceedSafeInteger = doesNotExceedSafeInteger$2;
|
|
6043
|
+
var bind$4 = functionBindContext;
|
|
6044
|
+
|
|
6045
|
+
// `FlattenIntoArray` abstract operation
|
|
6046
|
+
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
6047
|
+
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
6048
|
+
var targetIndex = start;
|
|
6049
|
+
var sourceIndex = 0;
|
|
6050
|
+
var mapFn = mapper ? bind$4(mapper, thisArg) : false;
|
|
6051
|
+
var element, elementLen;
|
|
6052
|
+
|
|
6053
|
+
while (sourceIndex < sourceLen) {
|
|
6054
|
+
if (sourceIndex in source) {
|
|
6055
|
+
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
6056
|
+
|
|
6057
|
+
if (depth > 0 && isArray$1(element)) {
|
|
6058
|
+
elementLen = lengthOfArrayLike$3(element);
|
|
6059
|
+
targetIndex = flattenIntoArray$1(target, original, element, elementLen, targetIndex, depth - 1) - 1;
|
|
6060
|
+
} else {
|
|
6061
|
+
doesNotExceedSafeInteger(targetIndex + 1);
|
|
6062
|
+
target[targetIndex] = element;
|
|
6129
6063
|
}
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6064
|
+
|
|
6065
|
+
targetIndex++;
|
|
6066
|
+
}
|
|
6067
|
+
sourceIndex++;
|
|
6068
|
+
}
|
|
6069
|
+
return targetIndex;
|
|
6070
|
+
};
|
|
6071
|
+
|
|
6072
|
+
var flattenIntoArray_1 = flattenIntoArray$1;
|
|
6073
|
+
|
|
6074
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
6075
|
+
var fails$3 = fails$s;
|
|
6076
|
+
var isCallable$4 = isCallable$q;
|
|
6077
|
+
var classof$2 = classof$9;
|
|
6078
|
+
var getBuiltIn$2 = getBuiltIn$9;
|
|
6079
|
+
var inspectSource$1 = inspectSource$3;
|
|
6080
|
+
|
|
6081
|
+
var noop = function () { /* empty */ };
|
|
6082
|
+
var construct = getBuiltIn$2('Reflect', 'construct');
|
|
6083
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
6084
|
+
var exec$1 = uncurryThis$2(constructorRegExp.exec);
|
|
6085
|
+
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
6086
|
+
|
|
6087
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
6088
|
+
if (!isCallable$4(argument)) return false;
|
|
6089
|
+
try {
|
|
6090
|
+
construct(noop, [], argument);
|
|
6091
|
+
return true;
|
|
6092
|
+
} catch (error) {
|
|
6093
|
+
return false;
|
|
6094
|
+
}
|
|
6095
|
+
};
|
|
6096
|
+
|
|
6097
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
6098
|
+
if (!isCallable$4(argument)) return false;
|
|
6099
|
+
switch (classof$2(argument)) {
|
|
6100
|
+
case 'AsyncFunction':
|
|
6101
|
+
case 'GeneratorFunction':
|
|
6102
|
+
case 'AsyncGeneratorFunction': return false;
|
|
6103
|
+
}
|
|
6104
|
+
try {
|
|
6105
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
6106
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
6107
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
6108
|
+
return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
|
|
6109
|
+
} catch (error) {
|
|
6110
|
+
return true;
|
|
6111
|
+
}
|
|
6112
|
+
};
|
|
6113
|
+
|
|
6114
|
+
isConstructorLegacy.sham = true;
|
|
6115
|
+
|
|
6116
|
+
// `IsConstructor` abstract operation
|
|
6117
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
6118
|
+
var isConstructor$2 = !construct || fails$3(function () {
|
|
6119
|
+
var called;
|
|
6120
|
+
return isConstructorModern(isConstructorModern.call)
|
|
6121
|
+
|| !isConstructorModern(Object)
|
|
6122
|
+
|| !isConstructorModern(function () { called = true; })
|
|
6123
|
+
|| called;
|
|
6124
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
6125
|
+
|
|
6126
|
+
var isArray = isArray$4;
|
|
6127
|
+
var isConstructor$1 = isConstructor$2;
|
|
6128
|
+
var isObject$2 = isObject$e;
|
|
6129
|
+
var wellKnownSymbol$5 = wellKnownSymbol$k;
|
|
6130
|
+
|
|
6131
|
+
var SPECIES$2 = wellKnownSymbol$5('species');
|
|
6132
|
+
var $Array = Array;
|
|
6133
|
+
|
|
6134
|
+
// a part of `ArraySpeciesCreate` abstract operation
|
|
6135
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
6136
|
+
var arraySpeciesConstructor$1 = function (originalArray) {
|
|
6137
|
+
var C;
|
|
6138
|
+
if (isArray(originalArray)) {
|
|
6139
|
+
C = originalArray.constructor;
|
|
6140
|
+
// cross-realm fallback
|
|
6141
|
+
if (isConstructor$1(C) && (C === $Array || isArray(C.prototype))) C = undefined;
|
|
6142
|
+
else if (isObject$2(C)) {
|
|
6143
|
+
C = C[SPECIES$2];
|
|
6144
|
+
if (C === null) C = undefined;
|
|
6145
6145
|
}
|
|
6146
|
-
}
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6146
|
+
} return C === undefined ? $Array : C;
|
|
6147
|
+
};
|
|
6148
|
+
|
|
6149
|
+
var arraySpeciesConstructor = arraySpeciesConstructor$1;
|
|
6150
|
+
|
|
6151
|
+
// `ArraySpeciesCreate` abstract operation
|
|
6152
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
6153
|
+
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
6154
|
+
return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
|
|
6155
|
+
};
|
|
6156
|
+
|
|
6157
|
+
var $$a = _export;
|
|
6158
|
+
var flattenIntoArray = flattenIntoArray_1;
|
|
6159
|
+
var toObject$1 = toObject$8;
|
|
6160
|
+
var lengthOfArrayLike$2 = lengthOfArrayLike$7;
|
|
6161
|
+
var toIntegerOrInfinity = toIntegerOrInfinity$7;
|
|
6162
|
+
var arraySpeciesCreate = arraySpeciesCreate$1;
|
|
6163
|
+
|
|
6164
|
+
// `Array.prototype.flat` method
|
|
6165
|
+
// https://tc39.es/ecma262/#sec-array.prototype.flat
|
|
6166
|
+
$$a({ target: 'Array', proto: true }, {
|
|
6167
|
+
flat: function flat(/* depthArg = 1 */) {
|
|
6168
|
+
var depthArg = arguments.length ? arguments[0] : undefined;
|
|
6169
|
+
var O = toObject$1(this);
|
|
6170
|
+
var sourceLen = lengthOfArrayLike$2(O);
|
|
6171
|
+
var A = arraySpeciesCreate(O, 0);
|
|
6172
|
+
A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
|
|
6173
|
+
return A;
|
|
6174
|
+
}
|
|
6175
|
+
});
|
|
6176
|
+
|
|
6177
|
+
// this method was added to unscopables after implementation
|
|
6178
|
+
// in popular engines, so it's moved to a separate module
|
|
6179
|
+
var addToUnscopables = addToUnscopables$4;
|
|
6180
|
+
|
|
6181
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
6182
|
+
addToUnscopables('flat');
|
|
6183
|
+
|
|
6184
|
+
const FormStepperReviewer = props => {
|
|
6185
|
+
var _a, _b, _c;
|
|
6186
|
+
const {
|
|
6187
|
+
uischema,
|
|
6188
|
+
data,
|
|
6189
|
+
schema,
|
|
6190
|
+
ajv,
|
|
6191
|
+
cells,
|
|
6192
|
+
enabled,
|
|
6193
|
+
navigationFunc
|
|
6194
|
+
} = props;
|
|
6195
|
+
const componentProps = (_b = (_a = uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps) !== null && _b !== void 0 ? _b : {};
|
|
6196
|
+
const readOnly = (_c = componentProps === null || componentProps === void 0 ? void 0 : componentProps.readOnly) !== null && _c !== void 0 ? _c : false;
|
|
6197
|
+
const categorization = uischema;
|
|
6198
|
+
const categories = categorization.elements.filter(category => isVisible(category, data, '', ajv));
|
|
6199
|
+
const rescopeMaps = ['#/properties/albertaAddress', '#/properties/canadianAddress', '#/properties/sin'];
|
|
6200
|
+
return jsx(ReviewItem, {
|
|
6201
|
+
children: categories.map((category, index) => {
|
|
6202
|
+
const categoryLabel = category.label || category.i18n || 'Unknown Category';
|
|
6203
|
+
const testId = `${categoryLabel}-review-link`;
|
|
6204
|
+
return jsxs(ReviewItemSection, {
|
|
6205
|
+
children: [jsxs(ReviewItemHeader, {
|
|
6206
|
+
children: [jsx(ReviewItemTitle, {
|
|
6207
|
+
children: categoryLabel
|
|
6208
|
+
}), navigationFunc && jsx(Anchor, {
|
|
6209
|
+
onClick: () => {
|
|
6210
|
+
navigationFunc(index);
|
|
6211
|
+
},
|
|
6212
|
+
"data-testid": testId,
|
|
6213
|
+
onKeyDown: e => {
|
|
6214
|
+
if (!readOnly && (e.key === ' ' || e.key === 'Enter')) {
|
|
6215
|
+
e.preventDefault();
|
|
6216
|
+
navigationFunc(index);
|
|
6217
|
+
}
|
|
6218
|
+
},
|
|
6219
|
+
children: readOnly ? 'View' : 'Edit'
|
|
6220
|
+
})]
|
|
6221
|
+
}), jsx(GoAGrid, {
|
|
6222
|
+
minChildWidth: "100%",
|
|
6223
|
+
children: category.elements.filter(field => {
|
|
6224
|
+
var _a, _b;
|
|
6225
|
+
// [TODO] we need to double check why we cannot hide the elements at the element level
|
|
6226
|
+
const conditionProps = (_a = field.rule) === null || _a === void 0 ? void 0 : _a.condition;
|
|
6227
|
+
/* istanbul ignore next */
|
|
6228
|
+
if (conditionProps && data) {
|
|
6229
|
+
const canHideControlParts = (_b = conditionProps === null || conditionProps === void 0 ? void 0 : conditionProps.scope) === null || _b === void 0 ? void 0 : _b.split('/');
|
|
6230
|
+
const canHideControl = canHideControlParts && canHideControlParts[(canHideControlParts === null || canHideControlParts === void 0 ? void 0 : canHideControlParts.length) - 1];
|
|
6231
|
+
const isHidden = getProperty(data, canHideControl);
|
|
6232
|
+
if (!isHidden) {
|
|
6233
|
+
return field;
|
|
6234
|
+
}
|
|
6235
|
+
} else {
|
|
6236
|
+
return field;
|
|
6237
|
+
}
|
|
6238
|
+
}).map(e => {
|
|
6239
|
+
const layout = e;
|
|
6240
|
+
if (rescopeMaps.some(scope => {
|
|
6241
|
+
var _a;
|
|
6242
|
+
return (_a = layout.elements) === null || _a === void 0 ? void 0 : _a.map(el => {
|
|
6243
|
+
const element = el;
|
|
6244
|
+
return element.scope;
|
|
6245
|
+
}).includes(scope);
|
|
6246
|
+
})) {
|
|
6247
|
+
return layout.elements;
|
|
6248
|
+
} else {
|
|
6249
|
+
return e;
|
|
6250
|
+
}
|
|
6251
|
+
}).flat().map((element, index) => {
|
|
6252
|
+
return jsx("div", {
|
|
6253
|
+
className: "element-style",
|
|
6254
|
+
children: jsx(JsonFormsDispatch, {
|
|
6255
|
+
"data-testid": `jsonforms-object-list-defined-elements-dispatch`,
|
|
6256
|
+
schema: schema,
|
|
6257
|
+
uischema: element,
|
|
6258
|
+
enabled: enabled,
|
|
6259
|
+
renderers: GoAReviewRenderers,
|
|
6260
|
+
cells: cells
|
|
6261
|
+
})
|
|
6262
|
+
}, `form-stepper-category-${index}`);
|
|
6263
|
+
})
|
|
6264
|
+
})]
|
|
6265
|
+
}, index);
|
|
6266
|
+
})
|
|
6150
6267
|
});
|
|
6151
6268
|
};
|
|
6269
|
+
const FormStepperReviewControl = withAjvProps(withTranslateProps(withJsonFormsLayoutProps(FormStepperReviewer)));
|
|
6152
6270
|
|
|
6153
6271
|
const summaryLabel = 'Summary';
|
|
6154
6272
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -6377,6 +6495,84 @@ const BackButton = ({
|
|
|
6377
6495
|
});
|
|
6378
6496
|
};
|
|
6379
6497
|
|
|
6498
|
+
const FormStepperPageReviewer = props => {
|
|
6499
|
+
var _a, _b;
|
|
6500
|
+
const {
|
|
6501
|
+
uischema,
|
|
6502
|
+
data,
|
|
6503
|
+
schema,
|
|
6504
|
+
ajv,
|
|
6505
|
+
cells,
|
|
6506
|
+
enabled,
|
|
6507
|
+
navigationFunc
|
|
6508
|
+
} = props;
|
|
6509
|
+
(_b = (_a = uischema.options) === null || _a === void 0 ? void 0 : _a.componentProps) !== null && _b !== void 0 ? _b : {};
|
|
6510
|
+
const categorization = uischema;
|
|
6511
|
+
const categories = categorization.elements.filter(category => isVisible(category, data, '', ajv));
|
|
6512
|
+
const rescopeMaps = ['#/properties/albertaAddress', '#/properties/canadianAddress', '#/properties/sin'];
|
|
6513
|
+
return jsxs(TableReviewItem, {
|
|
6514
|
+
children: [jsx("h2", {
|
|
6515
|
+
children: "Review your answers"
|
|
6516
|
+
}), categories.map((category, index) => {
|
|
6517
|
+
const categoryLabel = category.label || category.i18n || 'Unknown Category';
|
|
6518
|
+
return jsxs(Fragment, {
|
|
6519
|
+
children: [jsx(TableReviewCategoryLabel, {
|
|
6520
|
+
children: categoryLabel
|
|
6521
|
+
}), jsx(TableReviewItemSection, {
|
|
6522
|
+
children: category.elements.filter(field => {
|
|
6523
|
+
var _a, _b;
|
|
6524
|
+
// [TODO] we need to double check why we cannot hide the elements at the element level
|
|
6525
|
+
const conditionProps = (_a = field.rule) === null || _a === void 0 ? void 0 : _a.condition;
|
|
6526
|
+
/* istanbul ignore next */
|
|
6527
|
+
if (conditionProps && data) {
|
|
6528
|
+
const canHideControlParts = (_b = conditionProps === null || conditionProps === void 0 ? void 0 : conditionProps.scope) === null || _b === void 0 ? void 0 : _b.split('/');
|
|
6529
|
+
const canHideControl = canHideControlParts && canHideControlParts[(canHideControlParts === null || canHideControlParts === void 0 ? void 0 : canHideControlParts.length) - 1];
|
|
6530
|
+
const isHidden = getProperty(data, canHideControl);
|
|
6531
|
+
if (!isHidden) {
|
|
6532
|
+
return field;
|
|
6533
|
+
}
|
|
6534
|
+
} else {
|
|
6535
|
+
return field;
|
|
6536
|
+
}
|
|
6537
|
+
}).map(e => {
|
|
6538
|
+
const layout = e;
|
|
6539
|
+
if (rescopeMaps.some(scope => {
|
|
6540
|
+
var _a;
|
|
6541
|
+
return (_a = layout.elements) === null || _a === void 0 ? void 0 : _a.map(el => {
|
|
6542
|
+
const element = el;
|
|
6543
|
+
return element.scope;
|
|
6544
|
+
}).includes(scope);
|
|
6545
|
+
})) {
|
|
6546
|
+
return layout.elements;
|
|
6547
|
+
} else {
|
|
6548
|
+
return e;
|
|
6549
|
+
}
|
|
6550
|
+
}).flat().map(element => {
|
|
6551
|
+
return jsx(GoATable, {
|
|
6552
|
+
width: "100%",
|
|
6553
|
+
children: jsx("tbody", {
|
|
6554
|
+
children: jsx(JsonFormsDispatch, {
|
|
6555
|
+
"data-testid": `jsonforms-object-list-defined-elements-dispatch`,
|
|
6556
|
+
schema: schema,
|
|
6557
|
+
uischema: Object.assign(Object.assign({}, element), {
|
|
6558
|
+
options: Object.assign(Object.assign({}, element === null || element === void 0 ? void 0 : element.options), {
|
|
6559
|
+
categoryIndex: index
|
|
6560
|
+
})
|
|
6561
|
+
}),
|
|
6562
|
+
enabled: enabled,
|
|
6563
|
+
renderers: GoABaseTableReviewRenderers,
|
|
6564
|
+
cells: cells
|
|
6565
|
+
})
|
|
6566
|
+
})
|
|
6567
|
+
});
|
|
6568
|
+
})
|
|
6569
|
+
}, index)]
|
|
6570
|
+
});
|
|
6571
|
+
})]
|
|
6572
|
+
});
|
|
6573
|
+
};
|
|
6574
|
+
withAjvProps(withTranslateProps(withJsonFormsLayoutProps(FormStepperPageReviewer)));
|
|
6575
|
+
|
|
6380
6576
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
6381
6577
|
const FormPageStepper = props => {
|
|
6382
6578
|
const formStepperCtx = useContext(JsonFormsStepperContext);
|
|
@@ -6406,7 +6602,8 @@ const FormPagesView = props => {
|
|
|
6406
6602
|
const formStepperCtx = useContext(JsonFormsStepperContext);
|
|
6407
6603
|
const {
|
|
6408
6604
|
validatePage,
|
|
6409
|
-
goToPage
|
|
6605
|
+
goToPage,
|
|
6606
|
+
toggleShowReviewLink
|
|
6410
6607
|
} = formStepperCtx;
|
|
6411
6608
|
const {
|
|
6412
6609
|
categories,
|
|
@@ -6436,9 +6633,9 @@ const FormPagesView = props => {
|
|
|
6436
6633
|
visible: visible,
|
|
6437
6634
|
children: jsx("div", {
|
|
6438
6635
|
id: `${path || `goa`}-form-pages`,
|
|
6439
|
-
children:
|
|
6440
|
-
children: categories === null || categories === void 0 ? void 0 : categories.map((category, index) => {
|
|
6441
|
-
const
|
|
6636
|
+
children: jsxs(PageBorder, {
|
|
6637
|
+
children: [categories === null || categories === void 0 ? void 0 : categories.map((category, index) => {
|
|
6638
|
+
const categoryProps = {
|
|
6442
6639
|
category: category.uischema,
|
|
6443
6640
|
categoryIndex: category.id,
|
|
6444
6641
|
visible: category === null || category === void 0 ? void 0 : category.visible,
|
|
@@ -6462,28 +6659,46 @@ const FormPagesView = props => {
|
|
|
6462
6659
|
}), jsxs(PageRenderPadding, {
|
|
6463
6660
|
children: [jsxs("h3", {
|
|
6464
6661
|
children: ["Step ", index + 1, " of ", categories.length]
|
|
6465
|
-
}), jsx(RenderStepElements, Object.assign({},
|
|
6662
|
+
}), jsx(RenderStepElements, Object.assign({}, categoryProps))]
|
|
6466
6663
|
}), jsx(PageRenderPadding, {
|
|
6467
|
-
children:
|
|
6468
|
-
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
type:
|
|
6477
|
-
onClick:
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6664
|
+
children: jsxs(GoAButtonGroup, {
|
|
6665
|
+
alignment: "start",
|
|
6666
|
+
children: [jsx(GoAButton, {
|
|
6667
|
+
type: "submit",
|
|
6668
|
+
onClick: () => goToPage(activeId + 1),
|
|
6669
|
+
disabled: !(category.isValid && category.isCompleted),
|
|
6670
|
+
testId: "pages-save-continue-btn",
|
|
6671
|
+
children: "Save and continue"
|
|
6672
|
+
}), category.showReviewPageLink && jsx(GoAButton, {
|
|
6673
|
+
type: "tertiary",
|
|
6674
|
+
onClick: () => {
|
|
6675
|
+
toggleShowReviewLink(activeId);
|
|
6676
|
+
goToPage(categories.length);
|
|
6677
|
+
},
|
|
6678
|
+
testId: "pages-to-review-page-btn",
|
|
6679
|
+
children: "Back to application overview"
|
|
6680
|
+
})]
|
|
6482
6681
|
})
|
|
6483
6682
|
})]
|
|
6484
6683
|
}, `${category.label}`);
|
|
6485
6684
|
}
|
|
6486
|
-
})
|
|
6685
|
+
}), isOnReview && jsxs("div", {
|
|
6686
|
+
"data-testid": "stepper-pages-review-page",
|
|
6687
|
+
children: [jsx(FormStepperPageReviewer, Object.assign({}, props, {
|
|
6688
|
+
navigationFunc: goToPage
|
|
6689
|
+
})), jsx(PageRenderPadding, {
|
|
6690
|
+
children: jsx(GoAButtonGroup, {
|
|
6691
|
+
alignment: "end",
|
|
6692
|
+
children: jsx(GoAButton, {
|
|
6693
|
+
type: 'primary',
|
|
6694
|
+
onClick: handleSubmit,
|
|
6695
|
+
disabled: !isValid,
|
|
6696
|
+
testId: "pages-submit-btn",
|
|
6697
|
+
children: "Submit"
|
|
6698
|
+
})
|
|
6699
|
+
})
|
|
6700
|
+
})]
|
|
6701
|
+
})]
|
|
6487
6702
|
})
|
|
6488
6703
|
})
|
|
6489
6704
|
}), jsxs(GoAModal, {
|
|
@@ -7234,6 +7449,21 @@ function objectListReducer(state, action) {
|
|
|
7234
7449
|
}
|
|
7235
7450
|
}
|
|
7236
7451
|
|
|
7452
|
+
function extractNames(obj, names = []) {
|
|
7453
|
+
if (Array.isArray(obj)) {
|
|
7454
|
+
obj.forEach(item => extractNames(item, names));
|
|
7455
|
+
} else if (typeof obj === 'object' && obj !== null) {
|
|
7456
|
+
const typedObj = obj;
|
|
7457
|
+
if (typeof typedObj.label === 'string') {
|
|
7458
|
+
names.push(typedObj.label);
|
|
7459
|
+
} else if (typeof typedObj.scope === 'string') {
|
|
7460
|
+
const parts = typedObj.scope.split('/');
|
|
7461
|
+
names.push(parts[parts.length - 1]);
|
|
7462
|
+
}
|
|
7463
|
+
Object.values(typedObj).forEach(value => extractNames(value, names));
|
|
7464
|
+
}
|
|
7465
|
+
return names;
|
|
7466
|
+
}
|
|
7237
7467
|
const GenerateRows$1 = (Cell, schema, rowPath, enabled, openDeleteDialog, handleChange, cells, uischema, isInReview, count, data,
|
|
7238
7468
|
// eslint-disable-next-line
|
|
7239
7469
|
errors) => {
|
|
@@ -7265,6 +7495,7 @@ errors) => {
|
|
|
7265
7495
|
rowPath,
|
|
7266
7496
|
cellPath: rowPath,
|
|
7267
7497
|
enabled,
|
|
7498
|
+
uischema,
|
|
7268
7499
|
isInReview,
|
|
7269
7500
|
openDeleteDialog,
|
|
7270
7501
|
handleChange,
|
|
@@ -7315,7 +7546,7 @@ function capitalizeFirstLetter(str) {
|
|
|
7315
7546
|
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
|
|
7316
7547
|
}
|
|
7317
7548
|
const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellComponent(props) {
|
|
7318
|
-
var _a, _b;
|
|
7549
|
+
var _a, _b, _c;
|
|
7319
7550
|
const {
|
|
7320
7551
|
schema,
|
|
7321
7552
|
enabled,
|
|
@@ -7332,10 +7563,14 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
7332
7563
|
} = props;
|
|
7333
7564
|
const properties = (schema === null || schema === void 0 ? void 0 : schema.items) && 'properties' in schema.items && schema.items.properties || {};
|
|
7334
7565
|
const required = (_a = schema.items) === null || _a === void 0 ? void 0 : _a.required;
|
|
7566
|
+
let tableKeys = extractNames((_b = uischema === null || uischema === void 0 ? void 0 : uischema.options) === null || _b === void 0 ? void 0 : _b.detail);
|
|
7567
|
+
if (tableKeys.length === 0) {
|
|
7568
|
+
tableKeys = Object.keys(properties);
|
|
7569
|
+
}
|
|
7335
7570
|
return jsxs(NonEmptyCellStyle, {
|
|
7336
7571
|
children: [
|
|
7337
7572
|
// eslint-disable-next-line
|
|
7338
|
-
(
|
|
7573
|
+
(_c = uischema === null || uischema === void 0 ? void 0 : uischema.elements) === null || _c === void 0 ? void 0 : _c.map(element => {
|
|
7339
7574
|
return jsx(JsonFormsDispatch, {
|
|
7340
7575
|
"data-testid": `jsonforms-object-list-defined-elements-dispatch`,
|
|
7341
7576
|
schema: schema,
|
|
@@ -7349,7 +7584,7 @@ const NonEmptyCellComponent$1 = /*#__PURE__*/React.memo(function NonEmptyCellCom
|
|
|
7349
7584
|
width: "100%",
|
|
7350
7585
|
children: [jsx("thead", {
|
|
7351
7586
|
children: jsxs("tr", {
|
|
7352
|
-
children: [
|
|
7587
|
+
children: [tableKeys.map((key, index) => {
|
|
7353
7588
|
if (!isInReview) {
|
|
7354
7589
|
return jsx("th", {
|
|
7355
7590
|
children: jsxs("p", {
|
|
@@ -7628,7 +7863,7 @@ const ObjectArrayControl = props => {
|
|
|
7628
7863
|
};
|
|
7629
7864
|
useEffect(() => {
|
|
7630
7865
|
// eslint-disable-next-line
|
|
7631
|
-
const updatedData =
|
|
7866
|
+
const updatedData = Array.isArray(parsedData) ? Object.fromEntries(parsedData.map((item, index) => [index, item])) : {};
|
|
7632
7867
|
const count = Object.keys(updatedData).length;
|
|
7633
7868
|
const dispatchData = {
|
|
7634
7869
|
[path]: {
|
|
@@ -10925,6 +11160,63 @@ const GoABaseReviewRenderers = [
|
|
|
10925
11160
|
tester: HelpContentTester,
|
|
10926
11161
|
renderer: HelpReviewContent
|
|
10927
11162
|
}];
|
|
11163
|
+
const GoABaseTableReviewRenderers = [
|
|
11164
|
+
// controls
|
|
11165
|
+
{
|
|
11166
|
+
tester: GoAEnumControlTester,
|
|
11167
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11168
|
+
}, {
|
|
11169
|
+
tester: GoAIntegerControlTester,
|
|
11170
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11171
|
+
}, {
|
|
11172
|
+
tester: GoANumberControlTester,
|
|
11173
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11174
|
+
}, {
|
|
11175
|
+
tester: GoATextControlTester,
|
|
11176
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11177
|
+
}, {
|
|
11178
|
+
tester: GoADateControlTester,
|
|
11179
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11180
|
+
}, {
|
|
11181
|
+
tester: GoADateTimeControlTester,
|
|
11182
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11183
|
+
}, {
|
|
11184
|
+
tester: GoATimeControlTester,
|
|
11185
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11186
|
+
}, {
|
|
11187
|
+
tester: GoARadioGroupControlTester,
|
|
11188
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11189
|
+
}, {
|
|
11190
|
+
tester: GoACheckoutGroupControlTester,
|
|
11191
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11192
|
+
}, {
|
|
11193
|
+
tester: GoABooleanControlTester,
|
|
11194
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11195
|
+
}, {
|
|
11196
|
+
tester: GoABooleanRadioControlTester,
|
|
11197
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11198
|
+
}, {
|
|
11199
|
+
tester: MultiLineTextControlTester,
|
|
11200
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11201
|
+
}, {
|
|
11202
|
+
tester: GoAArrayControlTester,
|
|
11203
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11204
|
+
}, {
|
|
11205
|
+
tester: GoAListWithDetailsTester,
|
|
11206
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11207
|
+
}, {
|
|
11208
|
+
tester: GoAHorizontalLayoutTester,
|
|
11209
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11210
|
+
}, {
|
|
11211
|
+
tester: GoAlVerticalLayoutTester,
|
|
11212
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11213
|
+
}, {
|
|
11214
|
+
tester: GoAGroupReviewLayoutTester,
|
|
11215
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11216
|
+
}, {
|
|
11217
|
+
tester: HelpContentTester,
|
|
11218
|
+
renderer: GoAInputBaseTableReviewControl
|
|
11219
|
+
}];
|
|
10928
11220
|
const GoAReviewRenderers = [...GoABaseReviewRenderers, {
|
|
10929
11221
|
tester: CategorizationStepperRendererTester,
|
|
10930
11222
|
renderer: FormStepperReviewControl
|
|
@@ -10965,4 +11257,4 @@ const GoARenderers = [...GoABaseRenderers, {
|
|
|
10965
11257
|
}];
|
|
10966
11258
|
const GoACells = [...InputCells];
|
|
10967
11259
|
|
|
10968
|
-
export { ADD_DATALIST_ACTION, ADD_NO_ANONYMOUS_ACTION, ADD_REGISTER_DATA_ACTION, ADD_REGISTER_DATA_ERROR, AddressLookUpControl, AddressLookUpControlReview, AddressLookUpTester, ArrayControl, ArrayControlBase, ArrayControlReview, BooleanComponent, BooleanControl, BooleanRadioComponent, BooleanRadioControl, CategorizationPagesRendererTester, CategorizationStepperRendererTester, CheckboxGroup, ContextProviderC, ContextProviderClass, ContextProviderFactory, EnumCheckboxControl, EnumRadioControl, EnumSelect, FileUploader, FileUploaderReview, FileUploaderTester, FormPageStepper, FormPagesView, FormStepper, FormStepperControl, FormStepperPagesControl, FormStepperReviewControl, FormStepperReviewer, FormStepperView, FullNameControl, FullNameDobControl, FullNameDobReviewControl, FullNameDobTester, FullNameReviewControl, FullNameTester, GoAArrayControlRenderer, GoAArrayControlReviewRenderer, GoAArrayControlTester, GoABaseInputReviewComponent, GoABaseRenderers, GoABaseReviewRenderers, GoABooleanControl, GoABooleanControlTester, GoABooleanRadioControl, GoABooleanRadioControlTester, GoACells, GoACheckoutGroupControlTester, GoADateControl, GoADateControlTester, GoADateInput, GoADateTimeControl, GoADateTimeControlTester, GoADateTimeInput, GoAEnumCheckboxGroupControl, GoAEnumControl, GoAEnumControlTester, GoAEnumRadioGroupControl, GoAInputBaseControl, GoAInputDateControl, GoAInputDateTimeControl, GoAInputInteger, GoAInputIntegerControl, GoAInputNumberControl, GoAInputText, GoAInputTextControl, GoAInputTimeControl, GoAIntegerControl, GoAIntegerControlTester, GoAListWithDetailsControlRenderer, GoAListWithDetailsTester, GoANumberControl, GoANumberControlTester, GoANumberInput, GoARadioGroupControlTester, GoARenderers, GoAReviewRenderers, GoATextControl, GoATextControlTester, GoATimeControl, GoATimeControlTester, GoATimeInput, GoInputBaseReview, GoInputBaseReviewControl, JsonFormContext, JsonFormRegisterProvider, JsonFormsRegisterContext, ListWithDetailsControl, MultiLineText, MultiLineTextControl, MultiLineTextControlInput, MultiLineTextControlTester, RadioGroup, categoriesAreValid, createDefaultAjv, enumControl, errMalformedDate, formatSin, isAddressLookup, isFullName, isFullNameDoB, registerReducer, resolveRefs, tryResolveRefs };
|
|
11260
|
+
export { ADD_DATALIST_ACTION, ADD_NO_ANONYMOUS_ACTION, ADD_REGISTER_DATA_ACTION, ADD_REGISTER_DATA_ERROR, AddressLookUpControl, AddressLookUpControlReview, AddressLookUpTester, ArrayControl, ArrayControlBase, ArrayControlReview, BooleanComponent, BooleanControl, BooleanRadioComponent, BooleanRadioControl, CategorizationPagesRendererTester, CategorizationStepperRendererTester, CheckboxGroup, ContextProviderC, ContextProviderClass, ContextProviderFactory, EnumCheckboxControl, EnumRadioControl, EnumSelect, FileUploader, FileUploaderReview, FileUploaderTester, FormPageStepper, FormPagesView, FormStepper, FormStepperControl, FormStepperPagesControl, FormStepperReviewControl, FormStepperReviewer, FormStepperView, FullNameControl, FullNameDobControl, FullNameDobReviewControl, FullNameDobTester, FullNameReviewControl, FullNameTester, GoAArrayControlRenderer, GoAArrayControlReviewRenderer, GoAArrayControlTester, GoABaseInputReviewComponent, GoABaseRenderers, GoABaseReviewRenderers, GoABaseTableReviewRenderers, GoABooleanControl, GoABooleanControlTester, GoABooleanRadioControl, GoABooleanRadioControlTester, GoACells, GoACheckoutGroupControlTester, GoADateControl, GoADateControlTester, GoADateInput, GoADateTimeControl, GoADateTimeControlTester, GoADateTimeInput, GoAEnumCheckboxGroupControl, GoAEnumControl, GoAEnumControlTester, GoAEnumRadioGroupControl, GoAInputBaseControl, GoAInputBaseTableReview, GoAInputBaseTableReviewControl, GoAInputDateControl, GoAInputDateTimeControl, GoAInputInteger, GoAInputIntegerControl, GoAInputNumberControl, GoAInputText, GoAInputTextControl, GoAInputTimeControl, GoAIntegerControl, GoAIntegerControlTester, GoAListWithDetailsControlRenderer, GoAListWithDetailsTester, GoANumberControl, GoANumberControlTester, GoANumberInput, GoARadioGroupControlTester, GoARenderers, GoAReviewRenderers, GoATextControl, GoATextControlTester, GoATimeControl, GoATimeControlTester, GoATimeInput, GoInputBaseReview, GoInputBaseReviewControl, JsonFormContext, JsonFormRegisterProvider, JsonFormsRegisterContext, ListWithDetailsControl, MultiLineText, MultiLineTextControl, MultiLineTextControlInput, MultiLineTextControlTester, RadioGroup, categoriesAreValid, createDefaultAjv, enumControl, errMalformedDate, formatSin, isAddressLookup, isFullName, isFullNameDoB, registerReducer, resolveRefs, tryResolveRefs };
|