@k-int/stripes-kint-components 1.7.0 → 2.1.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/CHANGELOG.md +36 -0
- package/es/index.js +51 -8
- package/es/lib/ActionList/ActionList.js +48 -28
- package/es/lib/ActionList/ActionListFieldArray.js +56 -16
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +198 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +326 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesView.js +166 -0
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +360 -0
- package/es/lib/CustomProperties/Config/index.js +41 -0
- package/es/lib/EditableRefdataList/EditableRefdataList.js +0 -1
- package/es/lib/FormModal/FormModal.js +126 -0
- package/es/lib/{TypeDown → FormModal}/index.js +2 -2
- package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -1
- package/es/lib/SASQRoute/SASQRoute.js +15 -11
- package/es/lib/SASQViewComponent/SASQViewComponent.js +6 -3
- package/es/lib/Typedown/Typedown.js +50 -18
- package/es/lib/constants/customProperties.js +60 -0
- package/es/lib/hooks/index.js +16 -0
- package/es/lib/hooks/useCustomProperties.js +122 -0
- package/es/lib/hooks/useMutateCustomProperties.js +143 -0
- package/es/lib/utils/generateKiwtQueryParams.js +51 -8
- package/junit.xml +40 -40
- package/package.json +5 -3
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +47 -26
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +122 -8
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +418 -0
- package/src/artifacts/coverage-jest/lcov-report/{TypeDown/TypeDown.js.html → CustomProperties/Config/CustomPropertiesSettings.js.html} +268 -232
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesView.js.html +535 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +973 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +176 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +97 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +2 -5
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +298 -0
- package/src/artifacts/coverage-jest/lcov-report/{TypeDown → FormModal}/index.html +14 -14
- package/src/artifacts/coverage-jest/lcov-report/{TypeDown → FormModal}/index.js.html +4 -4
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +43 -16
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +6 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +150 -21
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +112 -0
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +18 -3
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +35 -5
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +8 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +313 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +271 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/index.html +62 -47
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +174 -12
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov.info +841 -348
- package/src/index.js +14 -4
- package/src/lib/ActionList/ActionList.js +30 -23
- package/src/lib/ActionList/ActionListFieldArray.js +40 -2
- package/src/lib/ActionList/README.md +4 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +111 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +240 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesView.js +150 -0
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +296 -0
- package/src/lib/CustomProperties/Config/index.js +4 -0
- package/src/lib/EditableRefdataList/EditableRefdataList.js +0 -1
- package/src/lib/FormModal/FormModal.js +71 -0
- package/src/lib/FormModal/index.js +1 -0
- package/src/lib/NoResultsMessage/NoResultsMessage.js +2 -2
- package/src/lib/SASQRoute/SASQRoute.js +23 -14
- package/src/lib/SASQViewComponent/SASQViewComponent.js +2 -1
- package/src/lib/Typedown/Typedown.js +56 -13
- package/src/lib/constants/customProperties.js +9 -0
- package/src/lib/hooks/index.js +2 -0
- package/src/lib/hooks/useCustomProperties.js +76 -0
- package/src/lib/hooks/useMutateCustomProperties.js +62 -0
- package/src/lib/utils/generateKiwtQueryParams.js +58 -4
- package/styles/TypeDown.css +7 -0
- package/translations/stripes-kint-components/en.json +49 -1
- package/es/lib/TypeDown/TypeDown.js +0 -251
- package/src/lib/TypeDown/README.md +0 -1
- package/src/lib/TypeDown/TypeDown.js +0 -228
- package/src/lib/TypeDown/index.js +0 -1
package/junit.xml
CHANGED
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<testsuites name="jest tests" tests="34" failures="0" errors="0" time="
|
|
3
|
-
<testsuite name="RenderSettingValue" errors="0" failures="0" skipped="0" timestamp="2022-
|
|
4
|
-
<testcase classname="RenderSettingValue render string settings render a string setting renders the value" name="RenderSettingValue render string settings render a string setting renders the value" time="0.
|
|
2
|
+
<testsuites name="jest tests" tests="34" failures="0" errors="0" time="15.928">
|
|
3
|
+
<testsuite name="RenderSettingValue" errors="0" failures="0" skipped="0" timestamp="2022-03-09T12:00:43" time="10.429" tests="12">
|
|
4
|
+
<testcase classname="RenderSettingValue render string settings render a string setting renders the value" name="RenderSettingValue render string settings render a string setting renders the value" time="0.032">
|
|
5
5
|
</testcase>
|
|
6
|
-
<testcase classname="RenderSettingValue render string settings render a string setting without a value renders the default value" name="RenderSettingValue render string settings render a string setting without a value renders the default value" time="0.
|
|
6
|
+
<testcase classname="RenderSettingValue render string settings render a string setting without a value renders the default value" name="RenderSettingValue render string settings render a string setting without a value renders the default value" time="0.003">
|
|
7
7
|
</testcase>
|
|
8
|
-
<testcase classname="RenderSettingValue render string settings render a string setting without a value or default renders the empty message" name="RenderSettingValue render string settings render a string setting without a value or default renders the empty message" time="0.
|
|
8
|
+
<testcase classname="RenderSettingValue render string settings render a string setting without a value or default renders the empty message" name="RenderSettingValue render string settings render a string setting without a value or default renders the empty message" time="0.004">
|
|
9
9
|
</testcase>
|
|
10
|
-
<testcase classname="RenderSettingValue render refdata settings render a refdata setting renders the value" name="RenderSettingValue render refdata settings render a refdata setting renders the value" time="0.
|
|
10
|
+
<testcase classname="RenderSettingValue render refdata settings render a refdata setting renders the value" name="RenderSettingValue render refdata settings render a refdata setting renders the value" time="0.003">
|
|
11
11
|
</testcase>
|
|
12
|
-
<testcase classname="RenderSettingValue render refdata settings render a refdata setting without a value renders the default value" name="RenderSettingValue render refdata settings render a refdata setting without a value renders the default value" time="0.
|
|
12
|
+
<testcase classname="RenderSettingValue render refdata settings render a refdata setting without a value renders the default value" name="RenderSettingValue render refdata settings render a refdata setting without a value renders the default value" time="0.002">
|
|
13
13
|
</testcase>
|
|
14
|
-
<testcase classname="RenderSettingValue render refdata settings render a refdata setting without a value or default renders the empty message" name="RenderSettingValue render refdata settings render a refdata setting without a value or default renders the empty message" time="0.
|
|
14
|
+
<testcase classname="RenderSettingValue render refdata settings render a refdata setting without a value or default renders the empty message" name="RenderSettingValue render refdata settings render a refdata setting without a value or default renders the empty message" time="0.002">
|
|
15
15
|
</testcase>
|
|
16
|
-
<testcase classname="RenderSettingValue render password settings render a password setting renders the value" name="RenderSettingValue render password settings render a password setting renders the value" time="0.
|
|
16
|
+
<testcase classname="RenderSettingValue render password settings render a password setting renders the value" name="RenderSettingValue render password settings render a password setting renders the value" time="0.003">
|
|
17
17
|
</testcase>
|
|
18
|
-
<testcase classname="RenderSettingValue render password settings render a password setting without a value renders the default value" name="RenderSettingValue render password settings render a password setting without a value renders the default value" time="0.
|
|
18
|
+
<testcase classname="RenderSettingValue render password settings render a password setting without a value renders the default value" name="RenderSettingValue render password settings render a password setting without a value renders the default value" time="0.003">
|
|
19
19
|
</testcase>
|
|
20
|
-
<testcase classname="RenderSettingValue render password settings render a password setting without a value or default renders the empty message" name="RenderSettingValue render password settings render a password setting without a value or default renders the empty message" time="0.
|
|
20
|
+
<testcase classname="RenderSettingValue render password settings render a password setting without a value or default renders the empty message" name="RenderSettingValue render password settings render a password setting without a value or default renders the empty message" time="0.002">
|
|
21
21
|
</testcase>
|
|
22
|
-
<testcase classname="RenderSettingValue render template settings render a template setting renders the value" name="RenderSettingValue render template settings render a template setting renders the value" time="0.
|
|
22
|
+
<testcase classname="RenderSettingValue render template settings render a template setting renders the value" name="RenderSettingValue render template settings render a template setting renders the value" time="0.003">
|
|
23
23
|
</testcase>
|
|
24
|
-
<testcase classname="RenderSettingValue render template settings render a template setting without a value renders the default value" name="RenderSettingValue render template settings render a template setting without a value renders the default value" time="0.
|
|
24
|
+
<testcase classname="RenderSettingValue render template settings render a template setting without a value renders the default value" name="RenderSettingValue render template settings render a template setting without a value renders the default value" time="0.005">
|
|
25
25
|
</testcase>
|
|
26
|
-
<testcase classname="RenderSettingValue render template settings render a template setting without a value or default renders the empty message" name="RenderSettingValue render template settings render a template setting without a value or default renders the empty message" time="0.
|
|
26
|
+
<testcase classname="RenderSettingValue render template settings render a template setting without a value or default renders the empty message" name="RenderSettingValue render template settings render a template setting without a value or default renders the empty message" time="0.002">
|
|
27
27
|
</testcase>
|
|
28
28
|
</testsuite>
|
|
29
|
-
<testsuite name="EditableSettingsListFieldArray" errors="0" failures="0" skipped="0" timestamp="2022-
|
|
30
|
-
<testcase classname="EditableSettingsListFieldArray with empty initial values renders empty field" name="EditableSettingsListFieldArray with empty initial values renders empty field" time="0.
|
|
29
|
+
<testsuite name="EditableSettingsListFieldArray" errors="0" failures="0" skipped="0" timestamp="2022-03-09T12:00:43" time="10.755" tests="3">
|
|
30
|
+
<testcase classname="EditableSettingsListFieldArray with empty initial values renders empty field" name="EditableSettingsListFieldArray with empty initial values renders empty field" time="0.045">
|
|
31
31
|
</testcase>
|
|
32
|
-
<testcase classname="EditableSettingsListFieldArray with initial value set renders the SettingField component" name="EditableSettingsListFieldArray with initial value set renders the SettingField component" time="0.
|
|
32
|
+
<testcase classname="EditableSettingsListFieldArray with initial value set renders the SettingField component" name="EditableSettingsListFieldArray with initial value set renders the SettingField component" time="0.011">
|
|
33
33
|
</testcase>
|
|
34
|
-
<testcase classname="EditableSettingsListFieldArray with multiple initial values set renders the correct number of SettingField components" name="EditableSettingsListFieldArray with multiple initial values set renders the correct number of SettingField components" time="0.
|
|
34
|
+
<testcase classname="EditableSettingsListFieldArray with multiple initial values set renders the correct number of SettingField components" name="EditableSettingsListFieldArray with multiple initial values set renders the correct number of SettingField components" time="0.007">
|
|
35
35
|
</testcase>
|
|
36
36
|
</testsuite>
|
|
37
|
-
<testsuite name="
|
|
38
|
-
<testcase classname="
|
|
37
|
+
<testsuite name="EditSettingValue" errors="0" failures="0" skipped="0" timestamp="2022-03-09T12:00:43" time="12.062" tests="16">
|
|
38
|
+
<testcase classname="EditSettingValue edit string setting with no initial value renders the edit field" name="EditSettingValue edit string setting with no initial value renders the edit field" time="0.102">
|
|
39
39
|
</testcase>
|
|
40
|
-
<testcase classname="
|
|
40
|
+
<testcase classname="EditSettingValue edit string setting with initial value renders the expected value in the edit field" name="EditSettingValue edit string setting with initial value renders the expected value in the edit field" time="0.031">
|
|
41
41
|
</testcase>
|
|
42
|
-
<testcase classname="
|
|
42
|
+
<testcase classname="EditSettingValue edit refdata setting with no initial value for refdata with <4 options renders the expected radio buttons" name="EditSettingValue edit refdata setting with no initial value for refdata with <4 options renders the expected radio buttons" time="0.155">
|
|
43
43
|
</testcase>
|
|
44
|
-
|
|
45
|
-
<testsuite name="EditSettingValue" errors="0" failures="0" skipped="0" timestamp="2022-01-20T16:19:10" time="24.883" tests="16">
|
|
46
|
-
<testcase classname="EditSettingValue edit string setting with no initial value renders the edit field" name="EditSettingValue edit string setting with no initial value renders the edit field" time="0.167">
|
|
44
|
+
<testcase classname="EditSettingValue edit refdata setting with no initial value for refdata with <4 options no radio buttons are checked" name="EditSettingValue edit refdata setting with no initial value for refdata with <4 options no radio buttons are checked" time="0.133">
|
|
47
45
|
</testcase>
|
|
48
|
-
<testcase classname="EditSettingValue edit
|
|
46
|
+
<testcase classname="EditSettingValue edit refdata setting with initial value for refdata with <4 options renders the expected radio buttons" name="EditSettingValue edit refdata setting with initial value for refdata with <4 options renders the expected radio buttons" time="0.12">
|
|
49
47
|
</testcase>
|
|
50
|
-
<testcase classname="EditSettingValue edit refdata setting with
|
|
48
|
+
<testcase classname="EditSettingValue edit refdata setting with initial value for refdata with <4 options the correct radio button is checked" name="EditSettingValue edit refdata setting with initial value for refdata with <4 options the correct radio button is checked" time="0.127">
|
|
51
49
|
</testcase>
|
|
52
|
-
<testcase classname="EditSettingValue edit refdata setting with no initial value for refdata with &
|
|
50
|
+
<testcase classname="EditSettingValue edit refdata setting with no initial value for refdata with >4 options renders the expected select field" name="EditSettingValue edit refdata setting with no initial value for refdata with >4 options renders the expected select field" time="0.023">
|
|
53
51
|
</testcase>
|
|
54
|
-
<testcase classname="EditSettingValue edit refdata setting with initial value for refdata with &
|
|
52
|
+
<testcase classname="EditSettingValue edit refdata setting with no initial value for refdata with >4 options renders the expected refdata options" name="EditSettingValue edit refdata setting with no initial value for refdata with >4 options renders the expected refdata options" time="0.201">
|
|
55
53
|
</testcase>
|
|
56
|
-
<testcase classname="EditSettingValue edit refdata setting with initial value for refdata with &
|
|
54
|
+
<testcase classname="EditSettingValue edit refdata setting with initial value for refdata with >4 options renders the expected refdata options" name="EditSettingValue edit refdata setting with initial value for refdata with >4 options renders the expected refdata options" time="0.196">
|
|
57
55
|
</testcase>
|
|
58
|
-
<testcase classname="EditSettingValue edit refdata setting with
|
|
56
|
+
<testcase classname="EditSettingValue edit refdata setting with initial value for refdata with >4 options renders the expected value in the refdata dropdown" name="EditSettingValue edit refdata setting with initial value for refdata with >4 options renders the expected value in the refdata dropdown" time="0.018">
|
|
59
57
|
</testcase>
|
|
60
|
-
<testcase classname="EditSettingValue edit
|
|
58
|
+
<testcase classname="EditSettingValue edit template setting with no initial value renders the edit field" name="EditSettingValue edit template setting with no initial value renders the edit field" time="0.02">
|
|
61
59
|
</testcase>
|
|
62
|
-
<testcase classname="EditSettingValue edit
|
|
60
|
+
<testcase classname="EditSettingValue edit template setting with no initial value renders the expected template options" name="EditSettingValue edit template setting with no initial value renders the expected template options" time="0.064">
|
|
63
61
|
</testcase>
|
|
64
|
-
<testcase classname="EditSettingValue edit
|
|
62
|
+
<testcase classname="EditSettingValue edit template setting with no initial value renders expected display item in template dropdown" name="EditSettingValue edit template setting with no initial value renders expected display item in template dropdown" time="0.017">
|
|
65
63
|
</testcase>
|
|
66
|
-
<testcase classname="EditSettingValue edit template setting with
|
|
64
|
+
<testcase classname="EditSettingValue edit template setting with initial value renders the edit field" name="EditSettingValue edit template setting with initial value renders the edit field" time="0.017">
|
|
67
65
|
</testcase>
|
|
68
|
-
<testcase classname="EditSettingValue edit template setting with
|
|
66
|
+
<testcase classname="EditSettingValue edit template setting with initial value renders the expected template options" name="EditSettingValue edit template setting with initial value renders the expected template options" time="0.065">
|
|
69
67
|
</testcase>
|
|
70
|
-
<testcase classname="EditSettingValue edit template setting with
|
|
68
|
+
<testcase classname="EditSettingValue edit template setting with initial value renders expected display item in template dropdown" name="EditSettingValue edit template setting with initial value renders expected display item in template dropdown" time="0.016">
|
|
71
69
|
</testcase>
|
|
72
|
-
|
|
70
|
+
</testsuite>
|
|
71
|
+
<testsuite name="SettingField" errors="0" failures="0" skipped="0" timestamp="2022-03-09T12:00:43" time="12.24" tests="3">
|
|
72
|
+
<testcase classname="SettingField renders RenderSettingValue" name="SettingField renders RenderSettingValue" time="0.07">
|
|
73
73
|
</testcase>
|
|
74
|
-
<testcase classname="
|
|
74
|
+
<testcase classname="SettingField renders the edit button" name="SettingField renders the edit button" time="0.007">
|
|
75
75
|
</testcase>
|
|
76
|
-
<testcase classname="
|
|
76
|
+
<testcase classname="SettingField clicking edit/save works as expected" name="SettingField clicking edit/save works as expected" time="0.127">
|
|
77
77
|
</testcase>
|
|
78
78
|
</testsuite>
|
|
79
79
|
</testsuites>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@k-int/stripes-kint-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Stripes Component library for K-Int specific applications",
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"*.css"
|
|
@@ -21,7 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"react-resize-detector": "^6.7.6",
|
|
24
|
-
"@rehooks/local-storage": "2.4.0"
|
|
24
|
+
"@rehooks/local-storage": "2.4.0",
|
|
25
|
+
"@folio/react-intl-safe-html": "^3.1.0",
|
|
26
|
+
"compose-function": "^3.0.3"
|
|
25
27
|
},
|
|
26
28
|
"devDependencies": {
|
|
27
29
|
"@babel/cli": "^7.11.6",
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
"react": "^16.6.3",
|
|
61
63
|
"react-dom": "^16.6.3",
|
|
62
64
|
"react-router-dom": "^5.2.0",
|
|
63
|
-
"@folio/stripes": "
|
|
65
|
+
"@folio/stripes": "^7.0.3",
|
|
64
66
|
"react-intl": ">=5.8.1",
|
|
65
67
|
"regenerator-runtime": "^0.13.9"
|
|
66
68
|
},
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/4</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -120,7 +120,14 @@
|
|
|
120
120
|
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
121
|
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
122
|
<a name='L57'></a><a href='#L57'>57</a>
|
|
123
|
-
<a name='L58'></a><a href='#L58'>58</a
|
|
123
|
+
<a name='L58'></a><a href='#L58'>58</a>
|
|
124
|
+
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
|
+
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
|
+
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
|
+
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
+
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
+
<a name='L64'></a><a href='#L64'>64</a>
|
|
130
|
+
<a name='L65'></a><a href='#L65'>65</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
124
131
|
<span class="cline-any cline-neutral"> </span>
|
|
125
132
|
<span class="cline-any cline-neutral"> </span>
|
|
126
133
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -139,6 +146,7 @@
|
|
|
139
146
|
<span class="cline-any cline-neutral"> </span>
|
|
140
147
|
<span class="cline-any cline-neutral"> </span>
|
|
141
148
|
<span class="cline-any cline-neutral"> </span>
|
|
149
|
+
<span class="cline-any cline-neutral"> </span>
|
|
142
150
|
<span class="cline-any cline-no"> </span>
|
|
143
151
|
<span class="cline-any cline-neutral"> </span>
|
|
144
152
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -148,6 +156,8 @@
|
|
|
148
156
|
<span class="cline-any cline-neutral"> </span>
|
|
149
157
|
<span class="cline-any cline-neutral"> </span>
|
|
150
158
|
<span class="cline-any cline-neutral"> </span>
|
|
159
|
+
<span class="cline-any cline-neutral"> </span>
|
|
160
|
+
<span class="cline-any cline-neutral"> </span>
|
|
151
161
|
<span class="cline-any cline-no"> </span>
|
|
152
162
|
<span class="cline-any cline-neutral"> </span>
|
|
153
163
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -157,6 +167,7 @@
|
|
|
157
167
|
<span class="cline-any cline-neutral"> </span>
|
|
158
168
|
<span class="cline-any cline-neutral"> </span>
|
|
159
169
|
<span class="cline-any cline-neutral"> </span>
|
|
170
|
+
<span class="cline-any cline-neutral"> </span>
|
|
160
171
|
<span class="cline-any cline-no"> </span>
|
|
161
172
|
<span class="cline-any cline-neutral"> </span>
|
|
162
173
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -174,6 +185,9 @@
|
|
|
174
185
|
<span class="cline-any cline-neutral"> </span>
|
|
175
186
|
<span class="cline-any cline-neutral"> </span>
|
|
176
187
|
<span class="cline-any cline-neutral"> </span>
|
|
188
|
+
<span class="cline-any cline-neutral"> </span>
|
|
189
|
+
<span class="cline-any cline-neutral"> </span>
|
|
190
|
+
<span class="cline-any cline-neutral"> </span>
|
|
177
191
|
<span class="cline-any cline-no"> </span>
|
|
178
192
|
<span class="cline-any cline-neutral"> </span>
|
|
179
193
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -193,6 +207,7 @@ const propTypes = <span class="cstat-no" title="statement not covered" >{</span>
|
|
|
193
207
|
contentData: PropTypes.arrayOf(PropTypes.object),
|
|
194
208
|
creatableFields: PropTypes.object,
|
|
195
209
|
editableFields: PropTypes.object,
|
|
210
|
+
fieldComponents: PropTypes.object,
|
|
196
211
|
visibleFields: PropTypes.arrayOf(PropTypes.string)
|
|
197
212
|
};
|
|
198
213
|
|
|
@@ -203,31 +218,37 @@ const ActionList = <span class="cstat-no" title="statement not covered" ><span c
|
|
|
203
218
|
contentData,
|
|
204
219
|
creatableFields = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
205
220
|
editableFields = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
206
|
-
|
|
221
|
+
fieldComponents = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
222
|
+
visibleFields,
|
|
223
|
+
...mclProps // Assume anything left over is to directly apply to the MCL
|
|
207
224
|
}) => {
|
|
208
225
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
<
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
226
|
+
<>
|
|
227
|
+
<Form
|
|
228
|
+
enableReinitialize
|
|
229
|
+
initialValues={{ contentData }}
|
|
230
|
+
mutators={arrayMutators}
|
|
231
|
+
onSubmit={actionCalls.edit}
|
|
232
|
+
subscription={{ contentData: true }}
|
|
233
|
+
>
|
|
234
|
+
{<span class="fstat-no" title="function not covered" >()</span> => (
|
|
235
|
+
<span class="cstat-no" title="statement not covered" > <form onSubmit={<span class="fstat-no" title="function not covered" >e </span>=> { <span class="cstat-no" title="statement not covered" >e.preventDefault(); </span>}}></span>
|
|
236
|
+
<FieldArray
|
|
237
|
+
actionAssigner={actionAssigner}
|
|
238
|
+
actionCalls={actionCalls}
|
|
239
|
+
columnMapping={columnMapping}
|
|
240
|
+
component={ActionListFieldArray}
|
|
241
|
+
creatableFields={creatableFields}
|
|
242
|
+
editableFields={editableFields}
|
|
243
|
+
fieldComponents={fieldComponents}
|
|
244
|
+
name="contentData"
|
|
245
|
+
visibleFields={visibleFields}
|
|
246
|
+
{...mclProps}
|
|
247
|
+
/>
|
|
248
|
+
</form>
|
|
249
|
+
)}
|
|
250
|
+
</Form>
|
|
251
|
+
</>
|
|
231
252
|
);
|
|
232
253
|
};
|
|
233
254
|
|
|
@@ -241,7 +262,7 @@ export default ActionList;
|
|
|
241
262
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
242
263
|
Code coverage generated by
|
|
243
264
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
244
|
-
at
|
|
265
|
+
at Wed Mar 09 2022 12:00:59 GMT+0000 (Greenwich Mean Time)
|
|
245
266
|
</div>
|
|
246
267
|
<script src="../prettify.js"></script>
|
|
247
268
|
<script>
|
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/81</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/50</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/21</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/77</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -301,7 +301,45 @@
|
|
|
301
301
|
<a name='L236'></a><a href='#L236'>236</a>
|
|
302
302
|
<a name='L237'></a><a href='#L237'>237</a>
|
|
303
303
|
<a name='L238'></a><a href='#L238'>238</a>
|
|
304
|
-
<a name='L239'></a><a href='#L239'>239</a
|
|
304
|
+
<a name='L239'></a><a href='#L239'>239</a>
|
|
305
|
+
<a name='L240'></a><a href='#L240'>240</a>
|
|
306
|
+
<a name='L241'></a><a href='#L241'>241</a>
|
|
307
|
+
<a name='L242'></a><a href='#L242'>242</a>
|
|
308
|
+
<a name='L243'></a><a href='#L243'>243</a>
|
|
309
|
+
<a name='L244'></a><a href='#L244'>244</a>
|
|
310
|
+
<a name='L245'></a><a href='#L245'>245</a>
|
|
311
|
+
<a name='L246'></a><a href='#L246'>246</a>
|
|
312
|
+
<a name='L247'></a><a href='#L247'>247</a>
|
|
313
|
+
<a name='L248'></a><a href='#L248'>248</a>
|
|
314
|
+
<a name='L249'></a><a href='#L249'>249</a>
|
|
315
|
+
<a name='L250'></a><a href='#L250'>250</a>
|
|
316
|
+
<a name='L251'></a><a href='#L251'>251</a>
|
|
317
|
+
<a name='L252'></a><a href='#L252'>252</a>
|
|
318
|
+
<a name='L253'></a><a href='#L253'>253</a>
|
|
319
|
+
<a name='L254'></a><a href='#L254'>254</a>
|
|
320
|
+
<a name='L255'></a><a href='#L255'>255</a>
|
|
321
|
+
<a name='L256'></a><a href='#L256'>256</a>
|
|
322
|
+
<a name='L257'></a><a href='#L257'>257</a>
|
|
323
|
+
<a name='L258'></a><a href='#L258'>258</a>
|
|
324
|
+
<a name='L259'></a><a href='#L259'>259</a>
|
|
325
|
+
<a name='L260'></a><a href='#L260'>260</a>
|
|
326
|
+
<a name='L261'></a><a href='#L261'>261</a>
|
|
327
|
+
<a name='L262'></a><a href='#L262'>262</a>
|
|
328
|
+
<a name='L263'></a><a href='#L263'>263</a>
|
|
329
|
+
<a name='L264'></a><a href='#L264'>264</a>
|
|
330
|
+
<a name='L265'></a><a href='#L265'>265</a>
|
|
331
|
+
<a name='L266'></a><a href='#L266'>266</a>
|
|
332
|
+
<a name='L267'></a><a href='#L267'>267</a>
|
|
333
|
+
<a name='L268'></a><a href='#L268'>268</a>
|
|
334
|
+
<a name='L269'></a><a href='#L269'>269</a>
|
|
335
|
+
<a name='L270'></a><a href='#L270'>270</a>
|
|
336
|
+
<a name='L271'></a><a href='#L271'>271</a>
|
|
337
|
+
<a name='L272'></a><a href='#L272'>272</a>
|
|
338
|
+
<a name='L273'></a><a href='#L273'>273</a>
|
|
339
|
+
<a name='L274'></a><a href='#L274'>274</a>
|
|
340
|
+
<a name='L275'></a><a href='#L275'>275</a>
|
|
341
|
+
<a name='L276'></a><a href='#L276'>276</a>
|
|
342
|
+
<a name='L277'></a><a href='#L277'>277</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
305
343
|
<span class="cline-any cline-neutral"> </span>
|
|
306
344
|
<span class="cline-any cline-neutral"> </span>
|
|
307
345
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -324,6 +362,8 @@
|
|
|
324
362
|
<span class="cline-any cline-neutral"> </span>
|
|
325
363
|
<span class="cline-any cline-neutral"> </span>
|
|
326
364
|
<span class="cline-any cline-neutral"> </span>
|
|
365
|
+
<span class="cline-any cline-neutral"> </span>
|
|
366
|
+
<span class="cline-any cline-neutral"> </span>
|
|
327
367
|
<span class="cline-any cline-no"> </span>
|
|
328
368
|
<span class="cline-any cline-neutral"> </span>
|
|
329
369
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -334,6 +374,8 @@
|
|
|
334
374
|
<span class="cline-any cline-neutral"> </span>
|
|
335
375
|
<span class="cline-any cline-neutral"> </span>
|
|
336
376
|
<span class="cline-any cline-neutral"> </span>
|
|
377
|
+
<span class="cline-any cline-neutral"> </span>
|
|
378
|
+
<span class="cline-any cline-neutral"> </span>
|
|
337
379
|
<span class="cline-any cline-no"> </span>
|
|
338
380
|
<span class="cline-any cline-no"> </span>
|
|
339
381
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -396,6 +438,7 @@
|
|
|
396
438
|
<span class="cline-any cline-neutral"> </span>
|
|
397
439
|
<span class="cline-any cline-neutral"> </span>
|
|
398
440
|
<span class="cline-any cline-neutral"> </span>
|
|
441
|
+
<span class="cline-any cline-neutral"> </span>
|
|
399
442
|
<span class="cline-any cline-no"> </span>
|
|
400
443
|
<span class="cline-any cline-no"> </span>
|
|
401
444
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -410,6 +453,7 @@
|
|
|
410
453
|
<span class="cline-any cline-neutral"> </span>
|
|
411
454
|
<span class="cline-any cline-neutral"> </span>
|
|
412
455
|
<span class="cline-any cline-neutral"> </span>
|
|
456
|
+
<span class="cline-any cline-neutral"> </span>
|
|
413
457
|
<span class="cline-any cline-no"> </span>
|
|
414
458
|
<span class="cline-any cline-no"> </span>
|
|
415
459
|
<span class="cline-any cline-no"> </span>
|
|
@@ -447,6 +491,7 @@
|
|
|
447
491
|
<span class="cline-any cline-neutral"> </span>
|
|
448
492
|
<span class="cline-any cline-neutral"> </span>
|
|
449
493
|
<span class="cline-any cline-neutral"> </span>
|
|
494
|
+
<span class="cline-any cline-neutral"> </span>
|
|
450
495
|
<span class="cline-any cline-no"> </span>
|
|
451
496
|
<span class="cline-any cline-neutral"> </span>
|
|
452
497
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -461,6 +506,7 @@
|
|
|
461
506
|
<span class="cline-any cline-neutral"> </span>
|
|
462
507
|
<span class="cline-any cline-neutral"> </span>
|
|
463
508
|
<span class="cline-any cline-neutral"> </span>
|
|
509
|
+
<span class="cline-any cline-neutral"> </span>
|
|
464
510
|
<span class="cline-any cline-no"> </span>
|
|
465
511
|
<span class="cline-any cline-no"> </span>
|
|
466
512
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -502,9 +548,37 @@
|
|
|
502
548
|
<span class="cline-any cline-neutral"> </span>
|
|
503
549
|
<span class="cline-any cline-neutral"> </span>
|
|
504
550
|
<span class="cline-any cline-neutral"> </span>
|
|
551
|
+
<span class="cline-any cline-neutral"> </span>
|
|
552
|
+
<span class="cline-any cline-no"> </span>
|
|
553
|
+
<span class="cline-any cline-neutral"> </span>
|
|
554
|
+
<span class="cline-any cline-neutral"> </span>
|
|
555
|
+
<span class="cline-any cline-neutral"> </span>
|
|
556
|
+
<span class="cline-any cline-neutral"> </span>
|
|
557
|
+
<span class="cline-any cline-no"> </span>
|
|
558
|
+
<span class="cline-any cline-neutral"> </span>
|
|
559
|
+
<span class="cline-any cline-neutral"> </span>
|
|
560
|
+
<span class="cline-any cline-neutral"> </span>
|
|
561
|
+
<span class="cline-any cline-neutral"> </span>
|
|
562
|
+
<span class="cline-any cline-no"> </span>
|
|
563
|
+
<span class="cline-any cline-no"> </span>
|
|
564
|
+
<span class="cline-any cline-no"> </span>
|
|
565
|
+
<span class="cline-any cline-neutral"> </span>
|
|
566
|
+
<span class="cline-any cline-no"> </span>
|
|
567
|
+
<span class="cline-any cline-no"> </span>
|
|
568
|
+
<span class="cline-any cline-neutral"> </span>
|
|
569
|
+
<span class="cline-any cline-no"> </span>
|
|
570
|
+
<span class="cline-any cline-neutral"> </span>
|
|
571
|
+
<span class="cline-any cline-neutral"> </span>
|
|
572
|
+
<span class="cline-any cline-no"> </span>
|
|
573
|
+
<span class="cline-any cline-neutral"> </span>
|
|
574
|
+
<span class="cline-any cline-no"> </span>
|
|
505
575
|
<span class="cline-any cline-no"> </span>
|
|
506
576
|
<span class="cline-any cline-neutral"> </span>
|
|
507
577
|
<span class="cline-any cline-neutral"> </span>
|
|
578
|
+
<span class="cline-any cline-no"> </span>
|
|
579
|
+
<span class="cline-any cline-neutral"> </span>
|
|
580
|
+
<span class="cline-any cline-neutral"> </span>
|
|
581
|
+
<span class="cline-any cline-no"> </span>
|
|
508
582
|
<span class="cline-any cline-neutral"> </span>
|
|
509
583
|
<span class="cline-any cline-neutral"> </span>
|
|
510
584
|
<span class="cline-any cline-no"> </span>
|
|
@@ -536,6 +610,8 @@
|
|
|
536
610
|
<span class="cline-any cline-neutral"> </span>
|
|
537
611
|
<span class="cline-any cline-neutral"> </span>
|
|
538
612
|
<span class="cline-any cline-neutral"> </span>
|
|
613
|
+
<span class="cline-any cline-neutral"> </span>
|
|
614
|
+
<span class="cline-any cline-neutral"> </span>
|
|
539
615
|
<span class="cline-any cline-no"> </span>
|
|
540
616
|
<span class="cline-any cline-neutral"> </span>
|
|
541
617
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -559,6 +635,8 @@ const propTypes = <span class="cstat-no" title="statement not covered" >{</span>
|
|
|
559
635
|
creatableFields: PropTypes.object,
|
|
560
636
|
editableFields: PropTypes.object,
|
|
561
637
|
fields: PropTypes.object,
|
|
638
|
+
fieldComponents: PropTypes.object,
|
|
639
|
+
formatter: PropTypes.object,
|
|
562
640
|
visibleFields: PropTypes.arrayOf(PropTypes.string)
|
|
563
641
|
};
|
|
564
642
|
|
|
@@ -569,7 +647,9 @@ const ActionListFieldArray = <span class="cstat-no" title="statement not covered
|
|
|
569
647
|
creatableFields,
|
|
570
648
|
editableFields,
|
|
571
649
|
fields,
|
|
572
|
-
|
|
650
|
+
fieldComponents,
|
|
651
|
+
visibleFields,
|
|
652
|
+
...mclProps // Assume anything left over is to directly apply to the MCL
|
|
573
653
|
}) => {
|
|
574
654
|
// Grab finalForm functions/values from form hooks
|
|
575
655
|
const { change } = <span class="cstat-no" title="statement not covered" >useForm();</span>
|
|
@@ -633,6 +713,7 @@ const ActionListFieldArray = <span class="cstat-no" title="statement not covered
|
|
|
633
713
|
key={`save[${data.rowIndex}]`}
|
|
634
714
|
buttonStyle="primary"
|
|
635
715
|
disabled={submitting || pristine}
|
|
716
|
+
marginBottom0
|
|
636
717
|
onClick={<span class="fstat-no" title="function not covered" >()</span> => {
|
|
637
718
|
<span class="cstat-no" title="statement not covered" > if (!data.id && editing === 'NEW_ROW') {</span>
|
|
638
719
|
<span class="cstat-no" title="statement not covered" > handleCreate(data.rowIndex);</span>
|
|
@@ -647,6 +728,7 @@ const ActionListFieldArray = <span class="cstat-no" title="statement not covered
|
|
|
647
728
|
<Button
|
|
648
729
|
key={`cancel[${data.rowIndex}]`}
|
|
649
730
|
data-type-button="cancel"
|
|
731
|
+
marginBottom0
|
|
650
732
|
onClick={<span class="fstat-no" title="function not covered" >()</span> => {
|
|
651
733
|
<span class="cstat-no" title="statement not covered" > if (!data.id && editing === 'NEW_ROW') {</span>
|
|
652
734
|
<span class="cstat-no" title="statement not covered" > fields.remove(data.rowIndex);</span>
|
|
@@ -679,6 +761,7 @@ const ActionListFieldArray = <span class="cstat-no" title="statement not covered
|
|
|
679
761
|
key={`action-${action.name}[${data.rowIndex}]`}
|
|
680
762
|
disabled={editing}
|
|
681
763
|
icon={action.icon}
|
|
764
|
+
marginBottom0
|
|
682
765
|
onClick={actionFunction}
|
|
683
766
|
/>
|
|
684
767
|
);
|
|
@@ -689,6 +772,7 @@ const ActionListFieldArray = <span class="cstat-no" title="statement not covered
|
|
|
689
772
|
<Button
|
|
690
773
|
key={`action-${action.name}[${data.rowIndex}]`}
|
|
691
774
|
disabled={editing}
|
|
775
|
+
marginBottom0
|
|
692
776
|
onClick={actionFunction}
|
|
693
777
|
>
|
|
694
778
|
{action.label ?? action.name}
|
|
@@ -732,10 +816,16 @@ const ActionListFieldArray = <span class="cstat-no" title="statement not covered
|
|
|
732
816
|
(editFunction(cd))
|
|
733
817
|
) {
|
|
734
818
|
<span class="cstat-no" title="statement not covered" > returnObj[key] =</span>
|
|
819
|
+
fieldComponents[key] ?
|
|
820
|
+
fieldComponents[key]({
|
|
821
|
+
name: `${fieldName}.${key}`
|
|
822
|
+
}) :
|
|
735
823
|
<Field
|
|
736
824
|
autofocus={fieldIndex === 0}
|
|
737
825
|
component={TextField}
|
|
826
|
+
marginBottom0
|
|
738
827
|
name={`${fieldName}.${key}`}
|
|
828
|
+
parse={<span class="fstat-no" title="function not covered" >v </span>=> <span class="cstat-no" title="statement not covered" >v}</span>
|
|
739
829
|
/>;
|
|
740
830
|
}
|
|
741
831
|
}
|
|
@@ -744,6 +834,28 @@ const ActionListFieldArray = <span class="cstat-no" title="statement not covered
|
|
|
744
834
|
})
|
|
745
835
|
);
|
|
746
836
|
};
|
|
837
|
+
|
|
838
|
+
const { formatter, ...restOfMclProps } = <span class="cstat-no" title="statement not covered" >mclProps;</span> // Destructure formatter part of mclProps
|
|
839
|
+
const fieldAwareFormatter = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
840
|
+
const returnObj = <span class="cstat-no" title="statement not covered" >{};</span>
|
|
841
|
+
// For each visible field, if it's being edited then ignore passed formatters, else use them
|
|
842
|
+
<span class="cstat-no" title="statement not covered" > visibleFields.forEach(<span class="fstat-no" title="function not covered" >ke</span>y => {</span>
|
|
843
|
+
<span class="cstat-no" title="statement not covered" > returnObj[key] = <span class="fstat-no" title="function not covered" >cd</span> => {</span>
|
|
844
|
+
// Row is being edited if it has no id, or its id is in the editing string
|
|
845
|
+
const editingRow = <span class="cstat-no" title="statement not covered" >cd.id === editing || !cd.id;</span>
|
|
846
|
+
// If not editing, use the passed formatter values
|
|
847
|
+
|
|
848
|
+
let returnValue = <span class="cstat-no" title="statement not covered" >cd[key];</span>
|
|
849
|
+
|
|
850
|
+
<span class="cstat-no" title="statement not covered" > if (!editingRow && formatter?.[key]) {</span>
|
|
851
|
+
<span class="cstat-no" title="statement not covered" > returnValue = formatter[key](cd);</span>
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
<span class="cstat-no" title="statement not covered" > return returnValue;</span>
|
|
855
|
+
};
|
|
856
|
+
});
|
|
857
|
+
<span class="cstat-no" title="statement not covered" > return returnObj;</span>
|
|
858
|
+
};
|
|
747
859
|
|
|
748
860
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
749
861
|
<>
|
|
@@ -765,10 +877,12 @@ const ActionListFieldArray = <span class="cstat-no" title="statement not covered
|
|
|
765
877
|
columnWidths={getColumnWidths()}
|
|
766
878
|
contentData={formatContent()}
|
|
767
879
|
formatter={{
|
|
768
|
-
actionListActions: renderActionButtons
|
|
880
|
+
actionListActions: renderActionButtons,
|
|
881
|
+
...fieldAwareFormatter()
|
|
769
882
|
}}
|
|
770
883
|
interactive={false}
|
|
771
884
|
visibleColumns={[...visibleFields, 'actionListActions']}
|
|
885
|
+
{...restOfMclProps}
|
|
772
886
|
/>
|
|
773
887
|
</>
|
|
774
888
|
);
|
|
@@ -784,7 +898,7 @@ export default ActionListFieldArray;
|
|
|
784
898
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
785
899
|
Code coverage generated by
|
|
786
900
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
787
|
-
at
|
|
901
|
+
at Wed Mar 09 2022 12:00:59 GMT+0000 (Greenwich Mean Time)
|
|
788
902
|
</div>
|
|
789
903
|
<script src="../prettify.js"></script>
|
|
790
904
|
<script>
|