@ukhomeoffice/cop-react-form-renderer 5.0.0-alpha → 5.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CheckYourAnswers/Answer.js +18 -7
- package/dist/components/CheckYourAnswers/Answer.test.js +137 -0
- package/dist/components/CheckYourAnswers/CheckYourAnswers.js +70 -46
- package/dist/components/CheckYourAnswers/CheckYourAnswers.stories.mdx +410 -0
- package/dist/components/CheckYourAnswers/CheckYourAnswers.test.js +551 -0
- package/dist/components/CollectionPage/CollectionPage.js +15 -10
- package/dist/components/CollectionPage/CollectionPage.test.js +382 -0
- package/dist/components/FormComponent/Collection.js +91 -48
- package/dist/components/FormComponent/Collection.scss +2 -1
- package/dist/components/FormComponent/Collection.test.js +807 -0
- package/dist/components/FormComponent/Container.js +35 -16
- package/dist/components/FormComponent/Container.test.js +370 -0
- package/dist/components/FormComponent/FormComponent.js +45 -14
- package/dist/components/FormComponent/FormComponent.stories.mdx +184 -0
- package/dist/components/FormComponent/FormComponent.test.js +226 -0
- package/dist/components/FormComponent/helpers/addLabel.js +5 -4
- package/dist/components/FormComponent/helpers/getComponentFieldSet.js +16 -0
- package/dist/components/FormComponent/helpers/getComponentFieldSet.test.js +29 -0
- package/dist/components/FormComponent/helpers/index.js +8 -1
- package/dist/components/FormPage/FormPage.js +69 -30
- package/dist/components/FormPage/FormPage.stories.mdx +155 -0
- package/dist/components/FormPage/FormPage.test.js +330 -0
- package/dist/components/FormRenderer/FormRenderer.js +142 -228
- package/dist/components/FormRenderer/FormRenderer.stories.mdx +183 -0
- package/dist/components/FormRenderer/FormRenderer.test.js +968 -0
- package/dist/components/FormRenderer/handlers/index.js +1 -2
- package/dist/components/FormRenderer/handlers/navigate.js +3 -1
- package/dist/components/FormRenderer/helpers/cleanHiddenNestedData.js +35 -14
- package/dist/components/FormRenderer/helpers/cleanHiddenNestedData.test.js +88 -5
- package/dist/components/FormRenderer/helpers/getCYA.js +11 -2
- package/dist/components/FormRenderer/helpers/getNextPageId.js +13 -7
- package/dist/components/FormRenderer/helpers/getRelevantPages.js +10 -2
- package/dist/components/FormRenderer/helpers/getRelevantPages.test.js +1 -1
- package/dist/components/FormRenderer/helpers/getSubmissionStatus.js +2 -2
- package/dist/components/FormRenderer/helpers/getSubmissionStatus.test.js +6 -2
- package/dist/components/FormRenderer/helpers/getUpdatedSectionStates.js +171 -51
- package/dist/components/FormRenderer/helpers/getUpdatedSectionStates.test.js +307 -24
- package/dist/components/FormRenderer/helpers/index.js +1 -2
- package/dist/components/FormRenderer/onCYAAction.js +108 -0
- package/dist/components/FormRenderer/onCYAAction.test.js +583 -0
- package/dist/components/FormRenderer/onPageAction.js +145 -0
- package/dist/components/FormRenderer/onPageAction.test.js +678 -0
- package/dist/components/FormRenderer/onTaskAction.js +48 -0
- package/dist/components/FormRenderer/onTaskAction.test.js +251 -0
- package/dist/components/PageActions/ActionButton.js +0 -3
- package/dist/components/PageActions/ActionButton.test.js +93 -0
- package/dist/components/PageActions/PageActions.js +2 -2
- package/dist/components/PageActions/PageActions.stories.mdx +74 -0
- package/dist/components/PageActions/PageActions.test.js +132 -0
- package/dist/components/SummaryList/GroupAction.js +2 -2
- package/dist/components/SummaryList/GroupAction.test.js +80 -0
- package/dist/components/SummaryList/RowAction.js +2 -2
- package/dist/components/SummaryList/RowAction.test.js +80 -0
- package/dist/components/SummaryList/SummaryList.js +29 -12
- package/dist/components/SummaryList/SummaryList.scss +19 -0
- package/dist/components/SummaryList/SummaryList.stories.mdx +90 -0
- package/dist/components/SummaryList/SummaryList.test.js +400 -0
- package/dist/components/SummaryList/SummaryListHeadingRow.js +30 -0
- package/dist/components/SummaryList/SummaryListRow.js +5 -2
- package/dist/components/SummaryList/helpers/getGroupActionAttributes.js +2 -1
- package/dist/components/SummaryList/helpers/getRowActionAttributes.js +2 -1
- package/dist/components/TaskList/Task.js +3 -3
- package/dist/components/TaskList/Task.test.js +167 -0
- package/dist/components/TaskList/TaskList.js +76 -23
- package/dist/components/TaskList/TaskList.stories.mdx +164 -0
- package/dist/components/TaskList/TaskList.test.js +389 -0
- package/dist/components/TaskList/TaskState.js +2 -2
- package/dist/components/TaskList/TaskState.test.js +86 -0
- package/dist/components/index.js +14 -0
- package/dist/context/HooksContext/HooksContext.js +72 -8
- package/dist/context/HooksContext/HooksContext.test.js +44 -0
- package/dist/context/ValidationContext/ValidationContext.js +38 -28
- package/dist/context/ValidationContext/ValidationContext.test.js +84 -0
- package/dist/hooks/useAxios.js +10 -12
- package/dist/hooks/useGetRequest.js +48 -49
- package/dist/hooks/useRefData.js +7 -4
- package/dist/index.js +34 -1
- package/dist/json/addressDetails.json +149 -0
- package/dist/json/areYouACivilServant.json +7 -0
- package/dist/json/firstForm.json +94 -0
- package/dist/json/grade.json +108 -0
- package/dist/json/group.data.json +21 -0
- package/dist/json/group.json +402 -0
- package/dist/json/groupOfRow.json +137 -0
- package/dist/json/groupOfRowData.json +15 -0
- package/dist/json/port.json +346 -0
- package/dist/json/saveAndContinue.json +98 -0
- package/dist/json/sublocation.json +859 -0
- package/dist/json/taskList.json +265 -0
- package/dist/json/team.json +17351 -0
- package/dist/json/terminal.json +81 -0
- package/dist/json/userProfile.data.json +21 -0
- package/dist/json/userProfile.json +276 -0
- package/dist/models/ComponentTypes.js +8 -0
- package/dist/models/PageAction.js +4 -1
- package/dist/models/TaskStates.js +10 -2
- package/dist/models/index.js +16 -1
- package/dist/setupTests.js +46 -0
- package/dist/utils/CheckYourAnswers/getCYAAction.js +5 -5
- package/dist/utils/CheckYourAnswers/getCYAAction.test.js +121 -0
- package/dist/utils/CheckYourAnswers/getCYACollectionChangeAction.js +6 -2
- package/dist/utils/CheckYourAnswers/getCYACollectionChangeAction.test.js +71 -0
- package/dist/utils/CheckYourAnswers/getCYACollectionDeleteAction.js +6 -2
- package/dist/utils/CheckYourAnswers/getCYACollectionDeleteAction.test.js +55 -0
- package/dist/utils/CheckYourAnswers/getCYARow.js +14 -11
- package/dist/utils/CheckYourAnswers/getCYARow.test.js +291 -0
- package/dist/utils/CheckYourAnswers/getCYARowForGroup.js +4 -1
- package/dist/utils/CheckYourAnswers/getCYARowForGroup.test.js +70 -0
- package/dist/utils/CheckYourAnswers/getCYARowsForCollection.js +15 -10
- package/dist/utils/CheckYourAnswers/getCYARowsForCollection.test.js +288 -0
- package/dist/utils/CheckYourAnswers/getCYARowsForCollectionPage.js +94 -36
- package/dist/utils/CheckYourAnswers/getCYARowsForCollectionPage.test.js +414 -0
- package/dist/utils/CheckYourAnswers/getCYARowsForContainer.js +21 -7
- package/dist/utils/CheckYourAnswers/getCYARowsForContainer.test.js +486 -0
- package/dist/utils/CheckYourAnswers/getCYARowsForPage.js +11 -3
- package/dist/utils/CheckYourAnswers/getCYARowsForPage.test.js +346 -0
- package/dist/utils/CheckYourAnswers/showComponentCYA.js +19 -3
- package/dist/utils/CheckYourAnswers/showComponentCYA.test.js +143 -0
- package/dist/utils/CollectionPage/duplicateCollectionPageActiveEntry.js +5 -1
- package/dist/utils/CollectionPage/duplicateCollectionPageActiveEntry.test.js +40 -0
- package/dist/utils/CollectionPage/getCollectionPageActiveIndex.test.js +53 -0
- package/dist/utils/CollectionPage/mergeCollectionPages.js +25 -17
- package/dist/utils/CollectionPage/mergeCollectionPages.test.js +130 -0
- package/dist/utils/Component/addShowWhen.js +44 -0
- package/dist/utils/Component/addShowWhen.test.js +216 -0
- package/dist/utils/Component/applyToComponentTree.js +71 -0
- package/dist/utils/Component/applyToComponentTree.test.js +127 -0
- package/dist/utils/Component/cleanAttributes.js +8 -2
- package/dist/utils/Component/cleanAttributes.test.js +68 -0
- package/dist/utils/Component/elevateNestedComponents.js +4 -1
- package/dist/utils/Component/elevateNestedComponents.test.js +122 -0
- package/dist/utils/Component/getComponent.js +80 -11
- package/dist/utils/Component/getComponentTests/getComponent.autocomplete.test.js +4 -4
- package/dist/utils/Component/getComponentTests/getComponent.calculation.test.js +25 -24
- package/dist/utils/Component/getComponentTests/getComponent.checkboxes.test.js +66 -5
- package/dist/utils/Component/getComponentTests/getComponent.date.test.js +2 -2
- package/dist/utils/Component/getComponentTests/getComponent.details.test.js +9 -7
- package/dist/utils/Component/getComponentTests/getComponent.email.test.js +3 -3
- package/dist/utils/Component/getComponentTests/getComponent.file.test.js +3 -3
- package/dist/utils/Component/getComponentTests/getComponent.list.test.js +44 -0
- package/dist/utils/Component/getComponentTests/{getComponent.textarea.test.js → getComponent.multifile.test.js} +29 -21
- package/dist/utils/Component/getComponentTests/getComponent.nested.test.js +159 -83
- package/dist/utils/Component/getComponentTests/getComponent.paragraph.test.js +43 -0
- package/dist/utils/Component/getComponentTests/getComponent.phoneNumber.test.js +3 -3
- package/dist/utils/Component/getComponentTests/getComponent.radios.test.js +55 -5
- package/dist/utils/Component/getComponentTests/getComponent.select.test.js +3 -9
- package/dist/utils/Component/getComponentTests/getComponent.text.test.js +3 -3
- package/dist/utils/Component/getComponentTests/getComponent.textArea.test.js +109 -0
- package/dist/utils/Component/getComponentTests/getComponent.time.test.js +7 -7
- package/dist/utils/Component/getDefaultValue.js +4 -1
- package/dist/utils/Component/getDefaultValue.test.js +50 -0
- package/dist/utils/Component/index.js +2 -0
- package/dist/utils/Component/isEditable.js +2 -2
- package/dist/utils/Component/isEditable.test.js +43 -0
- package/dist/utils/Component/optionIsSelected.js +22 -0
- package/dist/utils/Component/optionIsSelected.test.js +42 -0
- package/dist/utils/Component/setupContainerComponentsPath.js +40 -0
- package/dist/utils/Component/setupContainerComponentsPath.test.js +78 -0
- package/dist/utils/Component/showComponent.test.js +156 -0
- package/dist/utils/Component/wrapInFormGroup.js +1 -1
- package/dist/utils/Condition/meetsAllConditions.js +1 -1
- package/dist/utils/Condition/meetsAllConditions.test.js +61 -0
- package/dist/utils/Condition/meetsCondition.js +74 -4
- package/dist/utils/Condition/meetsCondition.test.js +763 -0
- package/dist/utils/Condition/meetsOneCondition.js +1 -1
- package/dist/utils/Condition/meetsOneCondition.test.js +100 -0
- package/dist/utils/Condition/setupConditions.js +6 -3
- package/dist/utils/Condition/setupConditions.test.js +33 -0
- package/dist/utils/Container/getEditableComponents.test.js +135 -0
- package/dist/utils/Container/setupNesting.js +21 -2
- package/dist/utils/Container/setupNesting.test.js +145 -0
- package/dist/utils/Container/showContainer.test.js +178 -0
- package/dist/utils/Data/applyFormula.js +20 -11
- package/dist/utils/Data/applyFormula.test.js +263 -0
- package/dist/utils/Data/getAutocompleteSource.js +6 -2
- package/dist/utils/Data/getAutocompleteSource.test.js +352 -0
- package/dist/utils/Data/getDataPath.test.js +48 -0
- package/dist/utils/Data/getOptions.js +17 -3
- package/dist/utils/Data/getOptions.test.js +140 -0
- package/dist/utils/Data/getSourceData.js +2 -2
- package/dist/utils/Data/getSourceData.test.js +153 -0
- package/dist/utils/Data/refDataToOptions.js +4 -1
- package/dist/utils/Data/refDataToOptions.test.js +196 -0
- package/dist/utils/Data/setDataItem.test.js +110 -0
- package/dist/utils/Data/setupFormData.js +39 -16
- package/dist/utils/Data/setupFormData.test.js +410 -0
- package/dist/utils/Data/setupRefDataUrlForComponent.js +4 -1
- package/dist/utils/Data/setupRefDataUrlForComponent.test.js +131 -0
- package/dist/utils/FormPage/applyConditionalProperties.js +35 -0
- package/dist/utils/FormPage/applyConditionalProperties.test.js +61 -0
- package/dist/utils/FormPage/getFormPage.js +5 -2
- package/dist/utils/FormPage/getFormPage.test.js +206 -0
- package/dist/utils/FormPage/getFormPages.js +4 -1
- package/dist/utils/FormPage/getFormPages.test.js +97 -0
- package/dist/utils/FormPage/getPageActions.js +8 -4
- package/dist/utils/FormPage/getPageActions.test.js +114 -0
- package/dist/utils/FormPage/getParagraphFromText.test.js +27 -0
- package/dist/utils/FormPage/index.js +2 -0
- package/dist/utils/FormPage/showFormPage.js +2 -2
- package/dist/utils/FormPage/showFormPage.test.js +180 -0
- package/dist/utils/FormPage/showFormPageCYA.js +1 -0
- package/dist/utils/FormPage/showFormPageCYA.test.js +28 -0
- package/dist/utils/FormPage/useComponent.js +29 -14
- package/dist/utils/FormPage/useComponent.test.js +167 -0
- package/dist/utils/Format/formatData.test.js +45 -0
- package/dist/utils/Format/formatDataForComponent.js +2 -1
- package/dist/utils/Format/formatDataForComponent.test.js +142 -0
- package/dist/utils/Format/formatDataForForm.js +4 -1
- package/dist/utils/Format/formatDataForForm.test.js +81 -0
- package/dist/utils/Format/formatDataForPage.test.js +99 -0
- package/dist/utils/Hub/getFormHub.test.js +105 -0
- package/dist/utils/Meta/documents/getDocuments.test.js +4 -1
- package/dist/utils/Meta/documents/index.js +2 -2
- package/dist/utils/Meta/documents/setDocumentsForField.js +31 -0
- package/dist/utils/Meta/documents/setDocumentsForField.test.js +59 -0
- package/dist/utils/Operate/checkValueIsTruthy.test.js +42 -0
- package/dist/utils/Operate/getFirstOf.js +31 -0
- package/dist/utils/Operate/getFirstOf.test.js +86 -0
- package/dist/utils/Operate/getIndexOfMatchingValueIn.test.js +163 -0
- package/dist/utils/Operate/persistValueInFormData.js +2 -1
- package/dist/utils/Operate/persistValueInFormData.test.js +115 -0
- package/dist/utils/Operate/runPageOperations.js +3 -1
- package/dist/utils/Operate/runPageOperations.test.js +105 -0
- package/dist/utils/Operate/setValueInFormData.test.js +44 -0
- package/dist/utils/Operate/shouldRun.js +16 -13
- package/dist/utils/Operate/shouldRun.test.js +66 -0
- package/dist/utils/Validate/additional/conditionallyRequired.js +24 -0
- package/dist/utils/Validate/additional/conditionallyRequired.test.js +73 -0
- package/dist/utils/Validate/additional/index.js +13 -4
- package/dist/utils/Validate/additional/mustBeAfter.js +8 -6
- package/dist/utils/Validate/additional/mustBeAfter.test.js +15 -1
- package/dist/utils/Validate/additional/mustBeBefore.js +9 -5
- package/dist/utils/Validate/additional/mustBeBefore.test.js +14 -0
- package/dist/utils/Validate/additional/mustBeEarlierDateTime.js +1 -1
- package/dist/utils/Validate/additional/mustBeEarlierDateTime.test.js +6 -3
- package/dist/utils/Validate/additional/mustBeGreaterThan.js +22 -0
- package/dist/utils/Validate/additional/mustBeGreaterThan.test.js +56 -0
- package/dist/utils/Validate/additional/mustBeInTheFuture.js +1 -1
- package/dist/utils/Validate/additional/mustBeInThePast.js +5 -5
- package/dist/utils/Validate/additional/mustBeLessThan.js +7 -6
- package/dist/utils/Validate/additional/mustBeLessThan.test.js +11 -1
- package/dist/utils/Validate/additional/mustBeNumbersOnly.js +9 -5
- package/dist/utils/Validate/additional/mustBeNumbersOnly.test.js +10 -2
- package/dist/utils/Validate/additional/mustEnterAtLeastOne.js +1 -0
- package/dist/utils/Validate/additional/mustEnterAtLeastOne.test.js +4 -1
- package/dist/utils/Validate/additional/mustHaveLessThanDecimalPlaces.js +19 -0
- package/dist/utils/Validate/additional/mustHaveLessThanDecimalPlaces.test.js +36 -0
- package/dist/utils/Validate/additional/mustSelectOnlyOne.js +29 -0
- package/dist/utils/Validate/additional/mustSelectOnlyOne.test.js +52 -0
- package/dist/utils/Validate/additional/utils.js +18 -18
- package/dist/utils/Validate/index.js +6 -0
- package/dist/utils/Validate/validateCollection.js +20 -5
- package/dist/utils/Validate/validateCollection.test.js +125 -0
- package/dist/utils/Validate/validateComponent.js +36 -20
- package/dist/utils/Validate/validateComponent.test.js +365 -0
- package/dist/utils/Validate/validateContainer.js +9 -3
- package/dist/utils/Validate/validateContainer.test.js +75 -0
- package/dist/utils/Validate/validateDate.js +4 -3
- package/dist/utils/Validate/validateDate.test.js +114 -0
- package/dist/utils/Validate/validateEmail.js +14 -1
- package/dist/utils/Validate/validateEmail.test.js +74 -0
- package/dist/utils/Validate/validateMultifile.js +32 -0
- package/dist/utils/Validate/validateMultifile.test.js +47 -0
- package/dist/utils/Validate/validatePage.js +12 -6
- package/dist/utils/Validate/validatePage.test.js +472 -0
- package/dist/utils/Validate/validateRegex.js +2 -5
- package/dist/utils/Validate/validateRegex.test.js +42 -0
- package/dist/utils/Validate/validateRequired.js +2 -4
- package/dist/utils/Validate/validateRequired.test.js +63 -0
- package/dist/utils/Validate/validateTextArea.js +37 -0
- package/dist/utils/Validate/validateTextArea.test.js +42 -0
- package/dist/utils/Validate/validateTime.js +2 -2
- package/dist/utils/Validate/validateTime.test.js +59 -0
- package/dist/utils/index.js +4 -1
- package/package.json +35 -50
- package/dist/utils/Meta/documents/setDocumentForField.js +0 -29
- package/dist/utils/Meta/documents/setDocumentForField.test.js +0 -49
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _getCYARowsForCollectionPage = _interopRequireDefault(require("./getCYARowsForCollectionPage"));
|
|
4
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
6
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
9
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
10
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
|
+
describe('utils.CheckYourAnswers.getCYARowsForCollectionPage', function () {
|
|
12
|
+
var TEXT_COMP = {
|
|
13
|
+
id: 'testText',
|
|
14
|
+
fieldId: 'testText',
|
|
15
|
+
label: 'Test text',
|
|
16
|
+
type: 'text'
|
|
17
|
+
};
|
|
18
|
+
var DATE_COMP = {
|
|
19
|
+
id: 'testDate',
|
|
20
|
+
fieldId: 'testDate',
|
|
21
|
+
label: 'Test date',
|
|
22
|
+
type: 'date'
|
|
23
|
+
};
|
|
24
|
+
var PAGES = [{
|
|
25
|
+
id: 'page1',
|
|
26
|
+
collection: {
|
|
27
|
+
name: 'collection'
|
|
28
|
+
},
|
|
29
|
+
components: [TEXT_COMP]
|
|
30
|
+
}, {
|
|
31
|
+
id: 'page2',
|
|
32
|
+
collection: {
|
|
33
|
+
name: 'collection'
|
|
34
|
+
},
|
|
35
|
+
components: [DATE_COMP]
|
|
36
|
+
}];
|
|
37
|
+
var MASTER_PAGE = {
|
|
38
|
+
id: 'page1',
|
|
39
|
+
collection: {
|
|
40
|
+
name: 'collection',
|
|
41
|
+
labels: {
|
|
42
|
+
// eslint-disable-next-line no-template-curly-in-string
|
|
43
|
+
item: 'Collection entry ${index}'
|
|
44
|
+
},
|
|
45
|
+
actions: [{
|
|
46
|
+
type: 'change'
|
|
47
|
+
}, {
|
|
48
|
+
type: 'remove',
|
|
49
|
+
label: 'custom remove label'
|
|
50
|
+
}, {
|
|
51
|
+
type: 'change',
|
|
52
|
+
label: 'custom change label',
|
|
53
|
+
page: 'confirmDelete'
|
|
54
|
+
}]
|
|
55
|
+
},
|
|
56
|
+
collectionPages: PAGES
|
|
57
|
+
};
|
|
58
|
+
it('should return no rows for a collection if it does not exist in formData', function () {
|
|
59
|
+
var FORM_DATA = {};
|
|
60
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
61
|
+
formData: FORM_DATA
|
|
62
|
+
});
|
|
63
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
64
|
+
expect(ROWS.length).toEqual(0);
|
|
65
|
+
});
|
|
66
|
+
it('should return no rows for a collection if it has no entries', function () {
|
|
67
|
+
var FORM_DATA = {
|
|
68
|
+
collection: []
|
|
69
|
+
};
|
|
70
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
71
|
+
formData: FORM_DATA
|
|
72
|
+
});
|
|
73
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
74
|
+
expect(ROWS.length).toEqual(0);
|
|
75
|
+
});
|
|
76
|
+
it('should accept the hideNameFromCYA collection flag', function () {
|
|
77
|
+
var FORM_DATA = {
|
|
78
|
+
collection: [{
|
|
79
|
+
testText: 'hello'
|
|
80
|
+
}]
|
|
81
|
+
};
|
|
82
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
83
|
+
formData: FORM_DATA,
|
|
84
|
+
collection: _objectSpread(_objectSpread({}, MASTER_PAGE.collection), {}, {
|
|
85
|
+
hideNameFromCYA: true
|
|
86
|
+
})
|
|
87
|
+
});
|
|
88
|
+
var TITLE_FIELD_ID = "".concat(PAGE.collection.name, "Title");
|
|
89
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
90
|
+
expect(ROWS[0].fieldId).not.toEqual(TITLE_FIELD_ID);
|
|
91
|
+
});
|
|
92
|
+
it('should format titles correctly when collection.labels.item is specified', function () {
|
|
93
|
+
var FORM_DATA = {
|
|
94
|
+
collection: [{
|
|
95
|
+
id: '01',
|
|
96
|
+
testText: 'value'
|
|
97
|
+
}]
|
|
98
|
+
};
|
|
99
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
100
|
+
formData: FORM_DATA
|
|
101
|
+
});
|
|
102
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
103
|
+
expect(ROWS.length).toEqual(7); // Collection title, item title, action rows & component rows
|
|
104
|
+
expect(ROWS[1].key).toEqual('Collection entry 1');
|
|
105
|
+
});
|
|
106
|
+
it('should provide default titles if collection.labels.item is not specified', function () {
|
|
107
|
+
var FORM_DATA = {
|
|
108
|
+
collection: [{
|
|
109
|
+
id: '01',
|
|
110
|
+
testText: 'value'
|
|
111
|
+
}]
|
|
112
|
+
};
|
|
113
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
114
|
+
collection: _objectSpread(_objectSpread({}, MASTER_PAGE.collection), {}, {
|
|
115
|
+
labels: {}
|
|
116
|
+
}),
|
|
117
|
+
formData: FORM_DATA
|
|
118
|
+
});
|
|
119
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
120
|
+
expect(ROWS.length).toEqual(7); // Collection title, item title, action rows & component rows
|
|
121
|
+
expect(ROWS[1].key).toEqual('Item 1');
|
|
122
|
+
});
|
|
123
|
+
it('should return correctly formatted rows for mutliple entries', function () {
|
|
124
|
+
var FORM_DATA = {
|
|
125
|
+
collection: [{
|
|
126
|
+
id: '01',
|
|
127
|
+
testText: 'value'
|
|
128
|
+
}, {
|
|
129
|
+
id: '02',
|
|
130
|
+
testText: 'value'
|
|
131
|
+
}]
|
|
132
|
+
};
|
|
133
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
134
|
+
formData: FORM_DATA
|
|
135
|
+
});
|
|
136
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
137
|
+
expect(ROWS.length).toEqual(13); // Title row + component row for each item
|
|
138
|
+
expect(ROWS[0]).toMatchObject({
|
|
139
|
+
type: 'heading',
|
|
140
|
+
key: 'Collection'
|
|
141
|
+
});
|
|
142
|
+
expect(ROWS[1]).toMatchObject({
|
|
143
|
+
type: 'heading',
|
|
144
|
+
key: 'Collection entry 1'
|
|
145
|
+
});
|
|
146
|
+
expect(ROWS[2].action.label).toEqual('Change');
|
|
147
|
+
expect(ROWS[3].action.label).toEqual('custom remove label');
|
|
148
|
+
expect(ROWS[4].action.label).toEqual('custom change label');
|
|
149
|
+
expect(ROWS[5]).toMatchObject({
|
|
150
|
+
value: 'value',
|
|
151
|
+
key: 'Test text'
|
|
152
|
+
});
|
|
153
|
+
expect(ROWS[6]).toMatchObject({
|
|
154
|
+
value: '',
|
|
155
|
+
key: 'Test date'
|
|
156
|
+
});
|
|
157
|
+
expect(ROWS[7]).toMatchObject({
|
|
158
|
+
type: 'heading',
|
|
159
|
+
key: 'Collection entry 2'
|
|
160
|
+
});
|
|
161
|
+
expect(ROWS[8].action.label).toEqual('Change');
|
|
162
|
+
expect(ROWS[9].action.label).toEqual('custom remove label');
|
|
163
|
+
expect(ROWS[10].action.label).toEqual('custom change label');
|
|
164
|
+
expect(ROWS[11]).toMatchObject({
|
|
165
|
+
value: 'value',
|
|
166
|
+
key: 'Test text'
|
|
167
|
+
});
|
|
168
|
+
expect(ROWS[12]).toMatchObject({
|
|
169
|
+
value: '',
|
|
170
|
+
key: 'Test date'
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
it('should exclude components that should not be shown', function () {
|
|
174
|
+
var FD = {
|
|
175
|
+
collection: [{
|
|
176
|
+
id: '01',
|
|
177
|
+
otherField: 'yes',
|
|
178
|
+
testText: 'testing'
|
|
179
|
+
}, {
|
|
180
|
+
id: '02',
|
|
181
|
+
otherField: 'no',
|
|
182
|
+
testText: 'testing'
|
|
183
|
+
}]
|
|
184
|
+
};
|
|
185
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
186
|
+
collection: {
|
|
187
|
+
name: 'collection'
|
|
188
|
+
},
|
|
189
|
+
formData: FD,
|
|
190
|
+
collectionPages: [_objectSpread(_objectSpread({}, PAGES[0]), {}, {
|
|
191
|
+
components: [{
|
|
192
|
+
id: 'testText',
|
|
193
|
+
fieldId: 'testText',
|
|
194
|
+
label: 'Test text',
|
|
195
|
+
type: 'text',
|
|
196
|
+
show_when: {
|
|
197
|
+
field: "otherField",
|
|
198
|
+
op: "!=",
|
|
199
|
+
value: "yes"
|
|
200
|
+
}
|
|
201
|
+
}]
|
|
202
|
+
})]
|
|
203
|
+
});
|
|
204
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
205
|
+
expect(ROWS.length).toEqual(4);
|
|
206
|
+
expect(ROWS[0]).toMatchObject({
|
|
207
|
+
type: 'heading',
|
|
208
|
+
key: 'Collection'
|
|
209
|
+
});
|
|
210
|
+
expect(ROWS[1]).toMatchObject({
|
|
211
|
+
type: 'heading',
|
|
212
|
+
key: 'Item 1'
|
|
213
|
+
});
|
|
214
|
+
expect(ROWS[2]).toMatchObject({
|
|
215
|
+
type: 'heading',
|
|
216
|
+
key: 'Item 2'
|
|
217
|
+
});
|
|
218
|
+
expect(ROWS[3]).toMatchObject({
|
|
219
|
+
value: 'testing',
|
|
220
|
+
key: 'Test text'
|
|
221
|
+
});
|
|
222
|
+
});
|
|
223
|
+
it('should exclude pages that should not be shown', function () {
|
|
224
|
+
var FD = {
|
|
225
|
+
collection: [{
|
|
226
|
+
id: '01',
|
|
227
|
+
otherField: 'yes',
|
|
228
|
+
testText: 'testing'
|
|
229
|
+
}]
|
|
230
|
+
};
|
|
231
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
232
|
+
collection: {
|
|
233
|
+
name: 'collection'
|
|
234
|
+
},
|
|
235
|
+
formData: FD,
|
|
236
|
+
collectionPages: [_objectSpread(_objectSpread({}, PAGES[0]), {}, {
|
|
237
|
+
show_when: {
|
|
238
|
+
field: "otherField",
|
|
239
|
+
op: "!=",
|
|
240
|
+
value: "yes"
|
|
241
|
+
}
|
|
242
|
+
}), PAGES[1]]
|
|
243
|
+
});
|
|
244
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
245
|
+
expect(ROWS.length).toEqual(3); // Missing the page with the text component on.
|
|
246
|
+
expect(ROWS[0]).toMatchObject({
|
|
247
|
+
type: 'heading',
|
|
248
|
+
key: 'Collection'
|
|
249
|
+
});
|
|
250
|
+
expect(ROWS[1]).toMatchObject({
|
|
251
|
+
type: 'heading',
|
|
252
|
+
key: 'Item 1'
|
|
253
|
+
});
|
|
254
|
+
expect(ROWS[2]).toMatchObject({
|
|
255
|
+
value: '',
|
|
256
|
+
key: 'Test date'
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
it('should include rows for custom headings', function () {
|
|
260
|
+
var FORM_DATA = {
|
|
261
|
+
collection: [{
|
|
262
|
+
id: '01',
|
|
263
|
+
testText: 'value'
|
|
264
|
+
}]
|
|
265
|
+
};
|
|
266
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
267
|
+
formData: FORM_DATA,
|
|
268
|
+
collectionPages: [_objectSpread(_objectSpread({}, PAGES[0]), {}, {
|
|
269
|
+
collection: _objectSpread(_objectSpread({}, PAGES[0].collection), {}, {
|
|
270
|
+
heading: {
|
|
271
|
+
size: 'm',
|
|
272
|
+
text: 'Custom page heading'
|
|
273
|
+
}
|
|
274
|
+
})
|
|
275
|
+
})]
|
|
276
|
+
});
|
|
277
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
278
|
+
expect(ROWS.length).toEqual(7);
|
|
279
|
+
expect(ROWS[0]).toMatchObject({
|
|
280
|
+
type: 'heading',
|
|
281
|
+
key: 'Collection'
|
|
282
|
+
});
|
|
283
|
+
expect(ROWS[1]).toMatchObject({
|
|
284
|
+
type: 'heading',
|
|
285
|
+
key: 'Collection entry 1'
|
|
286
|
+
});
|
|
287
|
+
expect(ROWS[2].action.label).toEqual('Change');
|
|
288
|
+
expect(ROWS[3].action.label).toEqual('custom remove label');
|
|
289
|
+
expect(ROWS[4].action.label).toEqual('custom change label');
|
|
290
|
+
expect(ROWS[5]).toMatchObject({
|
|
291
|
+
type: 'heading',
|
|
292
|
+
key: 'Custom page heading',
|
|
293
|
+
size: 'm'
|
|
294
|
+
});
|
|
295
|
+
expect(ROWS[6]).toMatchObject({
|
|
296
|
+
value: 'value',
|
|
297
|
+
key: 'Test text'
|
|
298
|
+
});
|
|
299
|
+
});
|
|
300
|
+
it('should default to a title size of small if one is not specified', function () {
|
|
301
|
+
var FORM_DATA = {
|
|
302
|
+
collection: [{
|
|
303
|
+
id: '01',
|
|
304
|
+
testText: 'value'
|
|
305
|
+
}]
|
|
306
|
+
};
|
|
307
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
308
|
+
formData: FORM_DATA,
|
|
309
|
+
collectionPages: [_objectSpread(_objectSpread({}, PAGES[0]), {}, {
|
|
310
|
+
collection: _objectSpread(_objectSpread({}, PAGES[0].collection), {}, {
|
|
311
|
+
heading: {
|
|
312
|
+
text: 'Custom page heading'
|
|
313
|
+
}
|
|
314
|
+
})
|
|
315
|
+
})]
|
|
316
|
+
});
|
|
317
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
318
|
+
expect(ROWS[5]).toMatchObject({
|
|
319
|
+
type: 'heading',
|
|
320
|
+
key: 'Custom page heading',
|
|
321
|
+
size: 's'
|
|
322
|
+
});
|
|
323
|
+
});
|
|
324
|
+
it('should position actions under the title if actionPosition flag is not specified', function () {
|
|
325
|
+
var FORM_DATA = {
|
|
326
|
+
collection: [{
|
|
327
|
+
id: '01',
|
|
328
|
+
testText: 'value'
|
|
329
|
+
}]
|
|
330
|
+
};
|
|
331
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
332
|
+
formData: FORM_DATA
|
|
333
|
+
});
|
|
334
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
335
|
+
expect(ROWS[2].action.label).toEqual('Change');
|
|
336
|
+
expect(ROWS[3].action.label).toEqual('custom remove label');
|
|
337
|
+
expect(ROWS[4].action.label).toEqual('custom change label');
|
|
338
|
+
});
|
|
339
|
+
it('should position actions under the title if actionPosition flag is top', function () {
|
|
340
|
+
var FORM_DATA = {
|
|
341
|
+
collection: [{
|
|
342
|
+
id: '01',
|
|
343
|
+
testText: 'value'
|
|
344
|
+
}]
|
|
345
|
+
};
|
|
346
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
347
|
+
collection: _objectSpread(_objectSpread({}, MASTER_PAGE.collection), {}, {
|
|
348
|
+
actionPosition: 'top'
|
|
349
|
+
}),
|
|
350
|
+
formData: FORM_DATA
|
|
351
|
+
});
|
|
352
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
353
|
+
expect(ROWS[2].action.label).toEqual('Change');
|
|
354
|
+
expect(ROWS[3].action.label).toEqual('custom remove label');
|
|
355
|
+
expect(ROWS[4].action.label).toEqual('custom change label');
|
|
356
|
+
});
|
|
357
|
+
it('should position actions under all other rows if actionPosition flag is bottom', function () {
|
|
358
|
+
var FORM_DATA = {
|
|
359
|
+
collection: [{
|
|
360
|
+
id: '01',
|
|
361
|
+
testText: 'value'
|
|
362
|
+
}]
|
|
363
|
+
};
|
|
364
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
365
|
+
collection: _objectSpread(_objectSpread({}, MASTER_PAGE.collection), {}, {
|
|
366
|
+
actionPosition: 'bottom'
|
|
367
|
+
}),
|
|
368
|
+
formData: FORM_DATA
|
|
369
|
+
});
|
|
370
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null);
|
|
371
|
+
expect(ROWS[ROWS.length - 3].action.label).toEqual('Change');
|
|
372
|
+
expect(ROWS[ROWS.length - 2].action.label).toEqual('custom remove label');
|
|
373
|
+
expect(ROWS[ROWS.length - 1].action.label).toEqual('custom change label');
|
|
374
|
+
});
|
|
375
|
+
it('should ignore the result of the override function if it returns nullish', function () {
|
|
376
|
+
var FORM_DATA = {
|
|
377
|
+
collection: [{
|
|
378
|
+
id: '01',
|
|
379
|
+
testText: 'value'
|
|
380
|
+
}]
|
|
381
|
+
};
|
|
382
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
383
|
+
formData: FORM_DATA
|
|
384
|
+
});
|
|
385
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null, function () {
|
|
386
|
+
return null;
|
|
387
|
+
});
|
|
388
|
+
expect(ROWS.length).toEqual(7); // Collection title, item title, action rows & component rows
|
|
389
|
+
expect(ROWS[5].key).toEqual("Test text");
|
|
390
|
+
});
|
|
391
|
+
it('should use the rows produced by the override function if provided', function () {
|
|
392
|
+
var FORM_DATA = {
|
|
393
|
+
collection: [{
|
|
394
|
+
id: '01',
|
|
395
|
+
testText: 'value'
|
|
396
|
+
}]
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
// eslint-disable-next-line arrow-body-style
|
|
400
|
+
var OVERRIDE = function OVERRIDE(page, comp) {
|
|
401
|
+
// This will be called for each component on the page,
|
|
402
|
+
// returning a custom row object.
|
|
403
|
+
return {
|
|
404
|
+
key: "CustomRowFor".concat(comp.label)
|
|
405
|
+
};
|
|
406
|
+
};
|
|
407
|
+
var PAGE = _objectSpread(_objectSpread({}, MASTER_PAGE), {}, {
|
|
408
|
+
formData: FORM_DATA
|
|
409
|
+
});
|
|
410
|
+
var ROWS = (0, _getCYARowsForCollectionPage.default)(PAGE, null, OVERRIDE);
|
|
411
|
+
expect(ROWS.length).toEqual(7); // Collection title, item title, action rows & component rows
|
|
412
|
+
expect(ROWS[5].key).toEqual("CustomRowFor".concat(TEXT_COMP.label));
|
|
413
|
+
});
|
|
414
|
+
});
|
|
@@ -5,30 +5,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _models = require("../../models");
|
|
8
|
+
var _elevateNestedComponents = _interopRequireDefault(require("../Component/elevateNestedComponents"));
|
|
8
9
|
var _getCYARow = _interopRequireDefault(require("./getCYARow"));
|
|
9
10
|
var _getCYARowsForCollection = _interopRequireDefault(require("./getCYARowsForCollection"));
|
|
10
11
|
var _showComponentCYA = _interopRequireDefault(require("./showComponentCYA"));
|
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
12
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
15
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
14
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
19
|
+
var getCYARowsForContainer = function getCYARowsForContainer(page, container, formData, onAction, fnOverride) {
|
|
20
|
+
if ((0, _showComponentCYA.default)(container, _objectSpread(_objectSpread({}, page.formData), formData))) {
|
|
21
|
+
var allComponents = (0, _elevateNestedComponents.default)(container.components, formData);
|
|
22
|
+
return allComponents.filter(function (c) {
|
|
23
|
+
return (0, _showComponentCYA.default)(c, _objectSpread(_objectSpread({}, page.formData), formData));
|
|
19
24
|
}).flatMap(function (component) {
|
|
20
25
|
var fd = formData ? formData[component.fieldId] : undefined;
|
|
26
|
+
if (typeof fnOverride === 'function') {
|
|
27
|
+
var overrideRows = fnOverride(_objectSpread(_objectSpread({}, page), {}, {
|
|
28
|
+
formData: formData
|
|
29
|
+
}), component, onAction);
|
|
30
|
+
if (overrideRows) {
|
|
31
|
+
return overrideRows;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
21
34
|
if (component.type === _models.ComponentTypes.CONTAINER) {
|
|
22
|
-
return getCYARowsForContainer(page, component, fd, onAction);
|
|
35
|
+
return getCYARowsForContainer(page, component, _objectSpread(_objectSpread({}, fd), formData), onAction, fnOverride);
|
|
23
36
|
}
|
|
24
37
|
if (component.type === _models.ComponentTypes.COLLECTION) {
|
|
25
|
-
return (0, _getCYARowsForCollection.default)(page, component, fd, onAction);
|
|
38
|
+
return (0, _getCYARowsForCollection.default)(page, component, fd, onAction, fnOverride);
|
|
26
39
|
}
|
|
27
40
|
return (0, _getCYARow.default)(_objectSpread(_objectSpread({}, page), {}, {
|
|
28
41
|
formData: formData
|
|
29
42
|
}), component, onAction);
|
|
30
43
|
});
|
|
31
44
|
}
|
|
45
|
+
return null;
|
|
32
46
|
};
|
|
33
47
|
var _default = getCYARowsForContainer;
|
|
34
48
|
exports.default = _default;
|