@k-int/stripes-kint-components 3.2.2 → 3.2.3
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 +3 -0
- package/es/lib/ActionList/ActionListFieldArray.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +22 -24
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +26 -32
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +39 -47
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +82 -100
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +2 -2
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +22 -28
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +69 -85
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +2 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +26 -32
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +2 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +15 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +17 -21
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +129 -161
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -2
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +2 -2
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +2 -2
- package/es/lib/CycleButton/CycleButton.js +2 -2
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +22 -24
- package/es/lib/EditableRefdataList/EditableRefdataList.js +25 -27
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +44 -50
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +139 -163
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +9 -9
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +117 -133
- package/es/lib/IconSelect/IconSelect.js +2 -2
- package/es/lib/QueryTypedown/QueryTypedown.js +2 -2
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +1 -1
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +2 -2
- package/es/lib/RichSelect/RichSelect.js +2 -2
- package/es/lib/RichSelect/useSelectedOption.js +2 -2
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +2 -2
- package/es/lib/Typedown/Typedown.js +2 -2
- package/es/lib/hooks/settingsHooks/useAppSettings.js +1 -1
- package/es/lib/hooks/settingsHooks/useSettings.js +1 -1
- package/es/lib/hooks/typedownHooks/useTypedownData.js +2 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
- package/es/lib/hooks/useActiveElement.js +2 -2
- package/es/lib/hooks/useHelperApp.js +2 -2
- package/es/lib/hooks/useKiwtFieldArray.js +2 -2
- package/es/lib/hooks/useKiwtSASQuery.js +2 -2
- package/es/lib/hooks/useLocalStorageState.js +2 -2
- package/es/lib/hooks/useMutateCustomProperties.js +23 -29
- package/es/lib/hooks/useMutateRefdataCategory.js +21 -25
- package/es/lib/hooks/useMutateRefdataValue.js +30 -34
- package/es/lib/hooks/useQIndex.js +2 -2
- package/es/lib/hooks/useSASQQueryMeta.js +1 -1
- package/es/lib/utils/generateKiwtQueryParams.js +2 -2
- package/es/lib/utils/groupCustomPropertiesByCtx.js +1 -1
- package/es/lib/utils/highlightString.js +2 -2
- package/es/lib/utils/parseErrorResponse.js +42 -44
- package/junit.xml +1492 -222
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +12 -3
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +53 -14
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +8 -8
- 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 +42 -42
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +166 -88
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +58 -58
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +27 -27
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +53 -53
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +26 -26
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +90 -90
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +116 -116
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +26 -26
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +64 -64
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +31 -31
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +48 -48
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +20 -20
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +43 -43
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +96 -96
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +5 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +35 -35
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +37 -37
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +35 -35
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +14 -14
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +43 -43
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +5 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +31 -31
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +96 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +152 -29
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +13 -4
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +29 -20
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +37 -37
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +62 -62
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +85 -70
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +43 -43
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +30 -30
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
- 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 +23 -8
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +52 -52
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +11 -2
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +58 -10
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.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/TableBody/TableBody.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.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 +1 -1
- 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 +1 -1
- 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 +16 -4
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +20 -8
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +12 -12
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +2 -2
- 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 +34 -34
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +2 -5
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +30 -18
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +24 -24
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +38 -38
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +1 -1
- 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/useSASQQueryMeta.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 +161 -146
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +161 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +94 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +292 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +211 -0
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +466 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +4 -4
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +22 -22
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +42 -57
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +2 -35
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +161 -80
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +45 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +16 -16
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/validators/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +370 -0
- package/src/artifacts/coverage-jest/lcov.info +1843 -1735
- package/src/lib/CustomProperties/View/CustomPropertyCard.js +3 -3
package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html
CHANGED
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">2.35% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>2/85</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>0/61</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>0/21</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">2.46% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>2/81</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -499,13 +499,13 @@
|
|
|
499
499
|
<span class="cline-any cline-neutral"> </span>
|
|
500
500
|
<span class="cline-any cline-neutral"> </span>
|
|
501
501
|
<span class="cline-any cline-neutral"> </span>
|
|
502
|
-
<span class="cline-any cline-
|
|
502
|
+
<span class="cline-any cline-no"> </span>
|
|
503
503
|
<span class="cline-any cline-neutral"> </span>
|
|
504
504
|
<span class="cline-any cline-neutral"> </span>
|
|
505
|
-
<span class="cline-any cline-
|
|
506
|
-
<span class="cline-any cline-
|
|
505
|
+
<span class="cline-any cline-no"> </span>
|
|
506
|
+
<span class="cline-any cline-no"> </span>
|
|
507
507
|
<span class="cline-any cline-neutral"> </span>
|
|
508
|
-
<span class="cline-any cline-
|
|
508
|
+
<span class="cline-any cline-no"> </span>
|
|
509
509
|
<span class="cline-any cline-no"> </span>
|
|
510
510
|
<span class="cline-any cline-neutral"> </span>
|
|
511
511
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -526,38 +526,38 @@
|
|
|
526
526
|
<span class="cline-any cline-neutral"> </span>
|
|
527
527
|
<span class="cline-any cline-neutral"> </span>
|
|
528
528
|
<span class="cline-any cline-neutral"> </span>
|
|
529
|
-
<span class="cline-any cline-
|
|
530
|
-
<span class="cline-any cline-
|
|
531
|
-
<span class="cline-any cline-
|
|
529
|
+
<span class="cline-any cline-no"> </span>
|
|
530
|
+
<span class="cline-any cline-no"> </span>
|
|
531
|
+
<span class="cline-any cline-no"> </span>
|
|
532
532
|
<span class="cline-any cline-neutral"> </span>
|
|
533
533
|
<span class="cline-any cline-neutral"> </span>
|
|
534
534
|
<span class="cline-any cline-neutral"> </span>
|
|
535
535
|
<span class="cline-any cline-neutral"> </span>
|
|
536
536
|
<span class="cline-any cline-neutral"> </span>
|
|
537
537
|
<span class="cline-any cline-neutral"> </span>
|
|
538
|
-
<span class="cline-any cline-
|
|
539
|
-
<span class="cline-any cline-
|
|
540
|
-
<span class="cline-any cline-
|
|
538
|
+
<span class="cline-any cline-no"> </span>
|
|
539
|
+
<span class="cline-any cline-no"> </span>
|
|
540
|
+
<span class="cline-any cline-no"> </span>
|
|
541
541
|
<span class="cline-any cline-neutral"> </span>
|
|
542
|
-
<span class="cline-any cline-
|
|
542
|
+
<span class="cline-any cline-no"> </span>
|
|
543
543
|
<span class="cline-any cline-neutral"> </span>
|
|
544
544
|
<span class="cline-any cline-neutral"> </span>
|
|
545
545
|
<span class="cline-any cline-neutral"> </span>
|
|
546
546
|
<span class="cline-any cline-neutral"> </span>
|
|
547
547
|
<span class="cline-any cline-neutral"> </span>
|
|
548
548
|
<span class="cline-any cline-neutral"> </span>
|
|
549
|
-
<span class="cline-any cline-
|
|
549
|
+
<span class="cline-any cline-no"> </span>
|
|
550
550
|
<span class="cline-any cline-no"> </span>
|
|
551
551
|
<span class="cline-any cline-neutral"> </span>
|
|
552
552
|
<span class="cline-any cline-neutral"> </span>
|
|
553
|
-
<span class="cline-any cline-
|
|
553
|
+
<span class="cline-any cline-no"> </span>
|
|
554
554
|
<span class="cline-any cline-neutral"> </span>
|
|
555
555
|
<span class="cline-any cline-neutral"> </span>
|
|
556
|
-
<span class="cline-any cline-
|
|
556
|
+
<span class="cline-any cline-no"> </span>
|
|
557
557
|
<span class="cline-any cline-no"> </span>
|
|
558
558
|
<span class="cline-any cline-neutral"> </span>
|
|
559
559
|
<span class="cline-any cline-neutral"> </span>
|
|
560
|
-
<span class="cline-any cline-
|
|
560
|
+
<span class="cline-any cline-no"> </span>
|
|
561
561
|
<span class="cline-any cline-no"> </span>
|
|
562
562
|
<span class="cline-any cline-neutral"> </span>
|
|
563
563
|
<span class="cline-any cline-no"> </span>
|
|
@@ -614,13 +614,13 @@
|
|
|
614
614
|
<span class="cline-any cline-neutral"> </span>
|
|
615
615
|
<span class="cline-any cline-neutral"> </span>
|
|
616
616
|
<span class="cline-any cline-neutral"> </span>
|
|
617
|
-
<span class="cline-any cline-
|
|
618
|
-
<span class="cline-any cline-
|
|
619
|
-
<span class="cline-any cline-
|
|
620
|
-
<span class="cline-any cline-
|
|
617
|
+
<span class="cline-any cline-no"> </span>
|
|
618
|
+
<span class="cline-any cline-no"> </span>
|
|
619
|
+
<span class="cline-any cline-no"> </span>
|
|
620
|
+
<span class="cline-any cline-no"> </span>
|
|
621
621
|
<span class="cline-any cline-neutral"> </span>
|
|
622
622
|
<span class="cline-any cline-neutral"> </span>
|
|
623
|
-
<span class="cline-any cline-
|
|
623
|
+
<span class="cline-any cline-no"> </span>
|
|
624
624
|
<span class="cline-any cline-no"> </span>
|
|
625
625
|
<span class="cline-any cline-neutral"> </span>
|
|
626
626
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -633,24 +633,24 @@
|
|
|
633
633
|
<span class="cline-any cline-neutral"> </span>
|
|
634
634
|
<span class="cline-any cline-neutral"> </span>
|
|
635
635
|
<span class="cline-any cline-neutral"> </span>
|
|
636
|
-
<span class="cline-any cline-
|
|
636
|
+
<span class="cline-any cline-no"> </span>
|
|
637
637
|
<span class="cline-any cline-neutral"> </span>
|
|
638
|
-
<span class="cline-any cline-
|
|
638
|
+
<span class="cline-any cline-no"> </span>
|
|
639
639
|
<span class="cline-any cline-neutral"> </span>
|
|
640
640
|
<span class="cline-any cline-neutral"> </span>
|
|
641
|
-
<span class="cline-any cline-
|
|
641
|
+
<span class="cline-any cline-no"> </span>
|
|
642
642
|
<span class="cline-any cline-neutral"> </span>
|
|
643
|
-
<span class="cline-any cline-
|
|
643
|
+
<span class="cline-any cline-no"> </span>
|
|
644
644
|
<span class="cline-any cline-neutral"> </span>
|
|
645
|
-
<span class="cline-any cline-
|
|
645
|
+
<span class="cline-any cline-no"> </span>
|
|
646
646
|
<span class="cline-any cline-neutral"> </span>
|
|
647
647
|
<span class="cline-any cline-neutral"> </span>
|
|
648
|
-
<span class="cline-any cline-
|
|
648
|
+
<span class="cline-any cline-no"> </span>
|
|
649
649
|
<span class="cline-any cline-neutral"> </span>
|
|
650
650
|
<span class="cline-any cline-neutral"> </span>
|
|
651
651
|
<span class="cline-any cline-neutral"> </span>
|
|
652
|
-
<span class="cline-any cline-
|
|
653
|
-
<span class="cline-any cline-
|
|
652
|
+
<span class="cline-any cline-no"> </span>
|
|
653
|
+
<span class="cline-any cline-no"> </span>
|
|
654
654
|
<span class="cline-any cline-neutral"> </span>
|
|
655
655
|
<span class="cline-any cline-neutral"> </span>
|
|
656
656
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -659,17 +659,17 @@
|
|
|
659
659
|
<span class="cline-any cline-neutral"> </span>
|
|
660
660
|
<span class="cline-any cline-neutral"> </span>
|
|
661
661
|
<span class="cline-any cline-neutral"> </span>
|
|
662
|
-
<span class="cline-any cline-
|
|
662
|
+
<span class="cline-any cline-no"> </span>
|
|
663
663
|
<span class="cline-any cline-neutral"> </span>
|
|
664
664
|
<span class="cline-any cline-neutral"> </span>
|
|
665
|
-
<span class="cline-any cline-
|
|
665
|
+
<span class="cline-any cline-no"> </span>
|
|
666
666
|
<span class="cline-any cline-neutral"> </span>
|
|
667
667
|
<span class="cline-any cline-neutral"> </span>
|
|
668
668
|
<span class="cline-any cline-neutral"> </span>
|
|
669
669
|
<span class="cline-any cline-neutral"> </span>
|
|
670
670
|
<span class="cline-any cline-neutral"> </span>
|
|
671
671
|
<span class="cline-any cline-neutral"> </span>
|
|
672
|
-
<span class="cline-any cline-
|
|
672
|
+
<span class="cline-any cline-no"> </span>
|
|
673
673
|
<span class="cline-any cline-no"> </span>
|
|
674
674
|
<span class="cline-any cline-neutral"> </span>
|
|
675
675
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -679,7 +679,7 @@
|
|
|
679
679
|
<span class="cline-any cline-neutral"> </span>
|
|
680
680
|
<span class="cline-any cline-neutral"> </span>
|
|
681
681
|
<span class="cline-any cline-neutral"> </span>
|
|
682
|
-
<span class="cline-any cline-
|
|
682
|
+
<span class="cline-any cline-no"> </span>
|
|
683
683
|
<span class="cline-any cline-neutral"> </span>
|
|
684
684
|
<span class="cline-any cline-no"> </span>
|
|
685
685
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -687,19 +687,19 @@
|
|
|
687
687
|
<span class="cline-any cline-neutral"> </span>
|
|
688
688
|
<span class="cline-any cline-no"> </span>
|
|
689
689
|
<span class="cline-any cline-neutral"> </span>
|
|
690
|
-
<span class="cline-any cline-
|
|
690
|
+
<span class="cline-any cline-no"> </span>
|
|
691
691
|
<span class="cline-any cline-neutral"> </span>
|
|
692
692
|
<span class="cline-any cline-neutral"> </span>
|
|
693
693
|
<span class="cline-any cline-neutral"> </span>
|
|
694
694
|
<span class="cline-any cline-neutral"> </span>
|
|
695
695
|
<span class="cline-any cline-neutral"> </span>
|
|
696
|
-
<span class="cline-any cline-
|
|
696
|
+
<span class="cline-any cline-no"> </span>
|
|
697
697
|
<span class="cline-any cline-neutral"> </span>
|
|
698
698
|
<span class="cline-any cline-no"> </span>
|
|
699
699
|
<span class="cline-any cline-no"> </span>
|
|
700
700
|
<span class="cline-any cline-neutral"> </span>
|
|
701
701
|
<span class="cline-any cline-neutral"> </span>
|
|
702
|
-
<span class="cline-any cline-
|
|
702
|
+
<span class="cline-any cline-no"> </span>
|
|
703
703
|
<span class="cline-any cline-neutral"> </span>
|
|
704
704
|
<span class="cline-any cline-neutral"> </span>
|
|
705
705
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -712,16 +712,16 @@
|
|
|
712
712
|
<span class="cline-any cline-neutral"> </span>
|
|
713
713
|
<span class="cline-any cline-neutral"> </span>
|
|
714
714
|
<span class="cline-any cline-neutral"> </span>
|
|
715
|
-
<span class="cline-any cline-
|
|
715
|
+
<span class="cline-any cline-no"> </span>
|
|
716
716
|
<span class="cline-any cline-neutral"> </span>
|
|
717
717
|
<span class="cline-any cline-neutral"> </span>
|
|
718
718
|
<span class="cline-any cline-neutral"> </span>
|
|
719
719
|
<span class="cline-any cline-neutral"> </span>
|
|
720
720
|
<span class="cline-any cline-neutral"> </span>
|
|
721
|
-
<span class="cline-any cline-
|
|
722
|
-
<span class="cline-any cline-
|
|
721
|
+
<span class="cline-any cline-no"> </span>
|
|
722
|
+
<span class="cline-any cline-no"> </span>
|
|
723
723
|
<span class="cline-any cline-neutral"> </span>
|
|
724
|
-
<span class="cline-any cline-
|
|
724
|
+
<span class="cline-any cline-no"> </span>
|
|
725
725
|
<span class="cline-any cline-no"> </span>
|
|
726
726
|
<span class="cline-any cline-neutral"> </span>
|
|
727
727
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -731,7 +731,7 @@
|
|
|
731
731
|
<span class="cline-any cline-neutral"> </span>
|
|
732
732
|
<span class="cline-any cline-neutral"> </span>
|
|
733
733
|
<span class="cline-any cline-neutral"> </span>
|
|
734
|
-
<span class="cline-any cline-
|
|
734
|
+
<span class="cline-any cline-no"> </span>
|
|
735
735
|
<span class="cline-any cline-neutral"> </span>
|
|
736
736
|
<span class="cline-any cline-neutral"> </span>
|
|
737
737
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -763,10 +763,10 @@
|
|
|
763
763
|
<span class="cline-any cline-neutral"> </span>
|
|
764
764
|
<span class="cline-any cline-neutral"> </span>
|
|
765
765
|
<span class="cline-any cline-neutral"> </span>
|
|
766
|
-
<span class="cline-any cline-
|
|
767
|
-
<span class="cline-any cline-
|
|
766
|
+
<span class="cline-any cline-no"> </span>
|
|
767
|
+
<span class="cline-any cline-no"> </span>
|
|
768
768
|
<span class="cline-any cline-neutral"> </span>
|
|
769
|
-
<span class="cline-any cline-
|
|
769
|
+
<span class="cline-any cline-no"> </span>
|
|
770
770
|
<span class="cline-any cline-no"> </span>
|
|
771
771
|
<span class="cline-any cline-neutral"> </span>
|
|
772
772
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -776,7 +776,7 @@
|
|
|
776
776
|
<span class="cline-any cline-neutral"> </span>
|
|
777
777
|
<span class="cline-any cline-neutral"> </span>
|
|
778
778
|
<span class="cline-any cline-neutral"> </span>
|
|
779
|
-
<span class="cline-any cline-
|
|
779
|
+
<span class="cline-any cline-no"> </span>
|
|
780
780
|
<span class="cline-any cline-neutral"> </span>
|
|
781
781
|
<span class="cline-any cline-neutral"> </span>
|
|
782
782
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -792,10 +792,10 @@
|
|
|
792
792
|
<span class="cline-any cline-neutral"> </span>
|
|
793
793
|
<span class="cline-any cline-neutral"> </span>
|
|
794
794
|
<span class="cline-any cline-neutral"> </span>
|
|
795
|
-
<span class="cline-any cline-
|
|
796
|
-
<span class="cline-any cline-
|
|
795
|
+
<span class="cline-any cline-no"> </span>
|
|
796
|
+
<span class="cline-any cline-no"> </span>
|
|
797
797
|
<span class="cline-any cline-neutral"> </span>
|
|
798
|
-
<span class="cline-any cline-
|
|
798
|
+
<span class="cline-any cline-no"> </span>
|
|
799
799
|
<span class="cline-any cline-no"> </span>
|
|
800
800
|
<span class="cline-any cline-neutral"> </span>
|
|
801
801
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -805,7 +805,7 @@
|
|
|
805
805
|
<span class="cline-any cline-neutral"> </span>
|
|
806
806
|
<span class="cline-any cline-neutral"> </span>
|
|
807
807
|
<span class="cline-any cline-neutral"> </span>
|
|
808
|
-
<span class="cline-any cline-
|
|
808
|
+
<span class="cline-any cline-no"> </span>
|
|
809
809
|
<span class="cline-any cline-neutral"> </span>
|
|
810
810
|
<span class="cline-any cline-neutral"> </span>
|
|
811
811
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -821,7 +821,7 @@
|
|
|
821
821
|
<span class="cline-any cline-neutral"> </span>
|
|
822
822
|
<span class="cline-any cline-neutral"> </span>
|
|
823
823
|
<span class="cline-any cline-neutral"> </span>
|
|
824
|
-
<span class="cline-any cline-
|
|
824
|
+
<span class="cline-any cline-no"> </span>
|
|
825
825
|
<span class="cline-any cline-neutral"> </span>
|
|
826
826
|
<span class="cline-any cline-neutral"> </span>
|
|
827
827
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -889,7 +889,7 @@ import * as CUSTOM_PROPERTY_TYPES from '../../constants/customProperties';
|
|
|
889
889
|
|
|
890
890
|
import { useKintIntl } from '../../hooks';
|
|
891
891
|
|
|
892
|
-
const CustomPropertyField = ({
|
|
892
|
+
const CustomPropertyField = <span class="fstat-no" title="function not covered" >({</span>
|
|
893
893
|
availableCustomProperties,
|
|
894
894
|
customProperty,
|
|
895
895
|
customPropertyType,
|
|
@@ -897,19 +897,19 @@ const CustomPropertyField = ({
|
|
|
897
897
|
index,
|
|
898
898
|
intlKey: passedIntlKey,
|
|
899
899
|
intlNS: passedIntlNS,
|
|
900
|
-
labelOverrides = {}
|
|
900
|
+
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
901
901
|
name,
|
|
902
902
|
onChange,
|
|
903
903
|
value,
|
|
904
904
|
setCustomProperties
|
|
905
905
|
}) => {
|
|
906
|
-
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS)
|
|
906
|
+
const kintIntl = <span class="cstat-no" title="statement not covered" >useKintIntl(passedIntlKey, passedIntlNS);</span>
|
|
907
907
|
|
|
908
908
|
// Set up the validator for the customProperty
|
|
909
|
-
const customPropertyValidator = (
|
|
910
|
-
const { note, publicNote, value: currentValue } = allValues?.customProperties?.[customProperty?.value]?.[0] ?? {}
|
|
909
|
+
const customPropertyValidator = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(f</span>ieldValue, allValues) => {</span>
|
|
910
|
+
const { note, publicNote, value: currentValue } = <span class="cstat-no" title="statement not covered" >allValues?.customProperties?.[customProperty?.value]?.[0] ?? {};</span>
|
|
911
911
|
|
|
912
|
-
|
|
912
|
+
<span class="cstat-no" title="statement not covered" > if ((note && !currentValue) || (publicNote && !currentValue)) {</span>
|
|
913
913
|
<span class="cstat-no" title="statement not covered" > if (</span>
|
|
914
914
|
customProperty.type === CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME ||
|
|
915
915
|
customProperty.type === CUSTOM_PROPERTY_TYPES.INTEGER_CLASS_NAME
|
|
@@ -930,38 +930,38 @@ const CustomPropertyField = ({
|
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
|
|
933
|
-
if (customProperty.type === CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME) {
|
|
934
|
-
const regexp =
|
|
935
|
-
return (fieldValue && !regexp.test(fieldValue))
|
|
936
|
-
|
|
933
|
+
<span class="cstat-no" title="statement not covered" > if (customProperty.type === CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME) {</span>
|
|
934
|
+
const regexp = <span class="cstat-no" title="statement not covered" >/^-?[\d]*(\.[\d]{0,2})?$/;</span>
|
|
935
|
+
<span class="cstat-no" title="statement not covered" > return (fieldValue && !regexp.test(fieldValue)) ?</span>
|
|
936
|
+
kintIntl.formatKintMessage({
|
|
937
937
|
id: 'errors.maxTwoDecimals',
|
|
938
938
|
overrideValue: labelOverrides.maxTwoDecimalsError
|
|
939
939
|
}) : undefined;
|
|
940
940
|
}
|
|
941
941
|
|
|
942
|
-
if (customProperty.type === CUSTOM_PROPERTY_TYPES.INTEGER_CLASS_NAME) {
|
|
943
|
-
const min = Number.MIN_SAFE_INTEGER
|
|
944
|
-
const max = Number.MAX_SAFE_INTEGER
|
|
942
|
+
<span class="cstat-no" title="statement not covered" > if (customProperty.type === CUSTOM_PROPERTY_TYPES.INTEGER_CLASS_NAME) {</span>
|
|
943
|
+
const min = <span class="cstat-no" title="statement not covered" >Number.MIN_SAFE_INTEGER;</span>
|
|
944
|
+
const max = <span class="cstat-no" title="statement not covered" >Number.MAX_SAFE_INTEGER;</span>
|
|
945
945
|
|
|
946
|
-
return (fieldValue && (fieldValue > max || fieldValue < min))
|
|
947
|
-
|
|
946
|
+
<span class="cstat-no" title="statement not covered" > return (fieldValue && (fieldValue > max || fieldValue < min)) ?</span>
|
|
947
|
+
kintIntl.formatKintMessage({
|
|
948
948
|
id: 'errors.valueNotInRange',
|
|
949
949
|
overrideValue: labelOverrides.valueNotInRangeError
|
|
950
950
|
}, { min, max }) : undefined;
|
|
951
951
|
}
|
|
952
952
|
|
|
953
|
-
|
|
953
|
+
<span class="cstat-no" title="statement not covered" > if (!customProperty.primary && !currentValue) {</span>
|
|
954
954
|
<span class="cstat-no" title="statement not covered" > return kintIntl.formatMessage({ id: 'stripes-core.label.missingRequiredField' });</span>
|
|
955
955
|
}
|
|
956
956
|
|
|
957
|
-
return undefined
|
|
957
|
+
<span class="cstat-no" title="statement not covered" > return undefined;</span>
|
|
958
958
|
};
|
|
959
959
|
|
|
960
|
-
const getCustomProperty = <span class="fstat-no" title="function not covered" >(c</span>ustomPropertyValue) => {
|
|
960
|
+
const getCustomProperty = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(c</span>ustomPropertyValue) => {</span>
|
|
961
961
|
<span class="cstat-no" title="statement not covered" > return availableCustomProperties.find(<span class="fstat-no" title="function not covered" >cp</span> => <span class="cstat-no" title="statement not covered" >cp.value === customPropertyValue)</span>;</span>
|
|
962
962
|
};
|
|
963
963
|
|
|
964
|
-
const renderCustomPropertyName = <span class="fstat-no" title="function not covered" >()</span> => {
|
|
964
|
+
const renderCustomPropertyName = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
965
965
|
const unsetCustomProperties = <span class="cstat-no" title="statement not covered" >availableCustomProperties.filter(<span class="fstat-no" title="function not covered" >t </span>=> {</span>
|
|
966
966
|
// Only optional properties can be set
|
|
967
967
|
<span class="cstat-no" title="statement not covered" > if (t.primary) <span class="cstat-no" title="statement not covered" >return false;</span></span>
|
|
@@ -1018,13 +1018,13 @@ const CustomPropertyField = ({
|
|
|
1018
1018
|
);
|
|
1019
1019
|
};
|
|
1020
1020
|
|
|
1021
|
-
const renderCustomPropertyValue = () => {
|
|
1022
|
-
const currentValue = value[customProperty.value] ? value[customProperty.value][0] : {}
|
|
1023
|
-
const min = Number.MIN_SAFE_INTEGER
|
|
1024
|
-
const max = Number.MAX_SAFE_INTEGER
|
|
1021
|
+
const renderCustomPropertyValue = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
1022
|
+
const currentValue = <span class="cstat-no" title="statement not covered" >value[customProperty.value] ? value[customProperty.value][0] : {};</span>
|
|
1023
|
+
const min = <span class="cstat-no" title="statement not covered" >Number.MIN_SAFE_INTEGER;</span>
|
|
1024
|
+
const max = <span class="cstat-no" title="statement not covered" >Number.MAX_SAFE_INTEGER;</span>
|
|
1025
1025
|
|
|
1026
1026
|
// Default change handler
|
|
1027
|
-
let handleChange = <span class="fstat-no" title="function not covered" >e </span>=> {
|
|
1027
|
+
let handleChange = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >e </span>=> {</span>
|
|
1028
1028
|
<span class="cstat-no" title="statement not covered" > onChange({</span>
|
|
1029
1029
|
...value,
|
|
1030
1030
|
[customProperty.value]: [{
|
|
@@ -1037,43 +1037,43 @@ const CustomPropertyField = ({
|
|
|
1037
1037
|
// Figure out which component we're rendering and specify its unique props.
|
|
1038
1038
|
let fieldProps;
|
|
1039
1039
|
|
|
1040
|
-
switch (customProperty.type) {
|
|
1040
|
+
<span class="cstat-no" title="statement not covered" > switch (customProperty.type) {</span>
|
|
1041
1041
|
case CUSTOM_PROPERTY_TYPES.REFDATA_CLASS_NAME:
|
|
1042
|
-
fieldProps = {
|
|
1042
|
+
<span class="cstat-no" title="statement not covered" > fieldProps = {</span>
|
|
1043
1043
|
component: Select,
|
|
1044
1044
|
dataOptions: customProperty.options,
|
|
1045
|
-
format: (v) => v?.value
|
|
1045
|
+
format: <span class="fstat-no" title="function not covered" >(v</span>) => <span class="cstat-no" title="statement not covered" >v?.value,</span>
|
|
1046
1046
|
};
|
|
1047
|
-
break
|
|
1047
|
+
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
1048
1048
|
case CUSTOM_PROPERTY_TYPES.MULTI_REFDATA_CLASS_NAME:
|
|
1049
|
-
fieldProps = {
|
|
1049
|
+
<span class="cstat-no" title="statement not covered" > fieldProps = {</span>
|
|
1050
1050
|
component: MultiSelection,
|
|
1051
1051
|
// The "not set" value is not relevant for a multi select
|
|
1052
|
-
dataOptions: customProperty.options?.filter(
|
|
1052
|
+
dataOptions: customProperty.options?.filter(<span class="fstat-no" title="function not covered" >op</span>t => <span class="cstat-no" title="statement not covered" >!!opt?.value)</span>,
|
|
1053
1053
|
renderToOverlay: true
|
|
1054
1054
|
};
|
|
1055
1055
|
// MultiSelection passes the changed array as a value not an event
|
|
1056
|
-
handleChange =
|
|
1057
|
-
onChange({
|
|
1056
|
+
<span class="cstat-no" title="statement not covered" > handleChange = <span class="fstat-no" title="function not covered" >re</span>fdataArray => {</span>
|
|
1057
|
+
<span class="cstat-no" title="statement not covered" > onChange({</span>
|
|
1058
1058
|
...value,
|
|
1059
1059
|
[customProperty.value]: [{
|
|
1060
1060
|
...currentValue,
|
|
1061
|
-
_delete: refdataArray?.length === 0 ?
|
|
1061
|
+
_delete: refdataArray?.length === 0 ? true : undefined, // Delete customProperty if removing all values.
|
|
1062
1062
|
value: refdataArray
|
|
1063
1063
|
}]
|
|
1064
1064
|
});
|
|
1065
1065
|
};
|
|
1066
|
-
break
|
|
1066
|
+
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
1067
1067
|
case CUSTOM_PROPERTY_TYPES.INTEGER_CLASS_NAME:
|
|
1068
1068
|
case CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME:
|
|
1069
|
-
fieldProps = {
|
|
1069
|
+
<span class="cstat-no" title="statement not covered" > fieldProps = {</span>
|
|
1070
1070
|
component: TextField,
|
|
1071
1071
|
max,
|
|
1072
1072
|
min,
|
|
1073
1073
|
step: 'any',
|
|
1074
1074
|
type: 'number',
|
|
1075
1075
|
};
|
|
1076
|
-
handleChange = <span class="fstat-no" title="function not covered" >e </span>=> {
|
|
1076
|
+
<span class="cstat-no" title="statement not covered" > handleChange = <span class="fstat-no" title="function not covered" >e </span>=> {</span>
|
|
1077
1077
|
<span class="cstat-no" title="statement not covered" > onChange({</span>
|
|
1078
1078
|
...value,
|
|
1079
1079
|
[customProperty.value]: [{
|
|
@@ -1083,27 +1083,27 @@ const CustomPropertyField = ({
|
|
|
1083
1083
|
}],
|
|
1084
1084
|
});
|
|
1085
1085
|
};
|
|
1086
|
-
break
|
|
1087
|
-
|
|
1086
|
+
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
1087
|
+
case CUSTOM_PROPERTY_TYPES.TEXT_CLASS_NAME:
|
|
1088
1088
|
<span class="cstat-no" title="statement not covered" > fieldProps = {</span>
|
|
1089
1089
|
component: TextArea,
|
|
1090
1090
|
parse: <span class="fstat-no" title="function not covered" >v </span>=> <span class="cstat-no" title="statement not covered" >v </span> // Lets us send an empty string instead of `undefined`
|
|
1091
1091
|
};
|
|
1092
1092
|
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
1093
1093
|
case CUSTOM_PROPERTY_TYPES.DATE_CLASS_NAME:
|
|
1094
|
-
fieldProps = {
|
|
1094
|
+
<span class="cstat-no" title="statement not covered" > fieldProps = {</span>
|
|
1095
1095
|
component: Datepicker,
|
|
1096
1096
|
backendDateStandard: 'YYYY-MM-DD',
|
|
1097
1097
|
timeZone: 'UTC',
|
|
1098
1098
|
usePortal: true
|
|
1099
1099
|
};
|
|
1100
|
-
break
|
|
1101
|
-
|
|
1100
|
+
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
1101
|
+
default:
|
|
1102
1102
|
<span class="cstat-no" title="statement not covered" > fieldProps = { component: TextField };</span>
|
|
1103
1103
|
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
1104
1104
|
}
|
|
1105
1105
|
|
|
1106
|
-
return (
|
|
1106
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
1107
1107
|
<Field
|
|
1108
1108
|
data-test-customproperty-value
|
|
1109
1109
|
id={`edit-customproperty-${index}-value`}
|
|
@@ -1116,16 +1116,16 @@ const CustomPropertyField = ({
|
|
|
1116
1116
|
name={`${name}.${customProperty.value}[0].value`}
|
|
1117
1117
|
onChange={handleChange}
|
|
1118
1118
|
required={!customProperty.primary}
|
|
1119
|
-
validate={(
|
|
1119
|
+
validate={<span class="fstat-no" title="function not covered" >(f</span>ieldValue, allValues) => <span class="cstat-no" title="statement not covered" >customPropertyValidator(fieldValue, allValues)}</span>
|
|
1120
1120
|
{...fieldProps}
|
|
1121
1121
|
/>
|
|
1122
1122
|
);
|
|
1123
1123
|
};
|
|
1124
1124
|
|
|
1125
|
-
const renderCustomPropertyVisibility = () => {
|
|
1126
|
-
const customPropertyObject = value[customProperty.value]?.[0] ?? {}
|
|
1125
|
+
const renderCustomPropertyVisibility = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
1126
|
+
const customPropertyObject = <span class="cstat-no" title="statement not covered" >value[customProperty.value]?.[0] ?? {};</span>
|
|
1127
1127
|
|
|
1128
|
-
const handleChange = <span class="fstat-no" title="function not covered" >e </span>=> {
|
|
1128
|
+
const handleChange = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >e </span>=> {</span>
|
|
1129
1129
|
<span class="cstat-no" title="statement not covered" > onChange({</span>
|
|
1130
1130
|
...value,
|
|
1131
1131
|
[customProperty.value]: [{
|
|
@@ -1135,7 +1135,7 @@ const CustomPropertyField = ({
|
|
|
1135
1135
|
});
|
|
1136
1136
|
};
|
|
1137
1137
|
|
|
1138
|
-
return (
|
|
1138
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
1139
1139
|
<Select
|
|
1140
1140
|
data-test-customproperty-visibility
|
|
1141
1141
|
dataOptions={[
|
|
@@ -1167,10 +1167,10 @@ const CustomPropertyField = ({
|
|
|
1167
1167
|
);
|
|
1168
1168
|
};
|
|
1169
1169
|
|
|
1170
|
-
const renderCustomPropertyNoteInternal = () => {
|
|
1171
|
-
const customPropertyObject = value[customProperty.value]?.[0] ?? {}
|
|
1170
|
+
const renderCustomPropertyNoteInternal = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
1171
|
+
const customPropertyObject = <span class="cstat-no" title="statement not covered" >value[customProperty.value]?.[0] ?? {};</span>
|
|
1172
1172
|
|
|
1173
|
-
const handleChange = <span class="fstat-no" title="function not covered" >e </span>=> {
|
|
1173
|
+
const handleChange = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >e </span>=> {</span>
|
|
1174
1174
|
<span class="cstat-no" title="statement not covered" > onChange({</span>
|
|
1175
1175
|
...value,
|
|
1176
1176
|
[customProperty.value]: [{
|
|
@@ -1180,7 +1180,7 @@ const CustomPropertyField = ({
|
|
|
1180
1180
|
});
|
|
1181
1181
|
};
|
|
1182
1182
|
|
|
1183
|
-
return (
|
|
1183
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
1184
1184
|
<TextArea
|
|
1185
1185
|
data-test-customproperty-note
|
|
1186
1186
|
id={`edit-customproperty-${index}-internal-note`}
|
|
@@ -1196,10 +1196,10 @@ const CustomPropertyField = ({
|
|
|
1196
1196
|
);
|
|
1197
1197
|
};
|
|
1198
1198
|
|
|
1199
|
-
const renderCustomPropertyNotePublic = () => {
|
|
1200
|
-
const customPropertyObject = value[customProperty.value]?.[0] ?? {}
|
|
1199
|
+
const renderCustomPropertyNotePublic = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
1200
|
+
const customPropertyObject = <span class="cstat-no" title="statement not covered" >value[customProperty.value]?.[0] ?? {};</span>
|
|
1201
1201
|
|
|
1202
|
-
const handleChange = <span class="fstat-no" title="function not covered" >e </span>=> {
|
|
1202
|
+
const handleChange = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >e </span>=> {</span>
|
|
1203
1203
|
<span class="cstat-no" title="statement not covered" > onChange({</span>
|
|
1204
1204
|
...value,
|
|
1205
1205
|
[customProperty.value]: [{
|
|
@@ -1209,7 +1209,7 @@ const CustomPropertyField = ({
|
|
|
1209
1209
|
});
|
|
1210
1210
|
};
|
|
1211
1211
|
|
|
1212
|
-
return (
|
|
1212
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
1213
1213
|
<TextArea
|
|
1214
1214
|
data-test-customproperty-public-note
|
|
1215
1215
|
id={`edit-customproperty-${index}-public-note`}
|
|
@@ -1225,14 +1225,14 @@ const CustomPropertyField = ({
|
|
|
1225
1225
|
);
|
|
1226
1226
|
};
|
|
1227
1227
|
|
|
1228
|
-
return (
|
|
1228
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
1229
1229
|
<>
|
|
1230
1230
|
<div
|
|
1231
1231
|
data-testid="customPropertyField"
|
|
1232
1232
|
>
|
|
1233
1233
|
{
|
|
1234
1234
|
customPropertyType === 'optional' &&
|
|
1235
|
-
|
|
1235
|
+
<Row>
|
|
1236
1236
|
<Col xs={12}>
|
|
1237
1237
|
{renderCustomPropertyName()}
|
|
1238
1238
|
</Col>
|
|
@@ -1282,7 +1282,7 @@ export default CustomPropertyField;
|
|
|
1282
1282
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1283
1283
|
Code coverage generated by
|
|
1284
1284
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1285
|
-
at 2023-
|
|
1285
|
+
at 2023-03-21T17:34:57.995Z
|
|
1286
1286
|
</div>
|
|
1287
1287
|
<script src="../../prettify.js"></script>
|
|
1288
1288
|
<script>
|