@k-int/stripes-kint-components 2.8.4 → 2.8.6
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 +7 -0
- package/es/lib/ActionList/ActionList.js +3 -1
- package/es/lib/ActionList/ActionListFieldArray.js +4 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +5 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +4 -1
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +6 -4
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +5 -3
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +1 -1
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +1 -1
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +5 -3
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +4 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +4 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +5 -2
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +5 -3
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +3 -1
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +4 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +5 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +5 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +4 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +5 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +4 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +1 -1
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +4 -1
- package/es/lib/CycleButton/CycleButton.js +5 -2
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +6 -4
- package/es/lib/EditableRefdataList/EditableRefdataList.js +6 -4
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +4 -1
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +4 -2
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +1 -1
- package/es/lib/FormModal/FormModal.js +4 -1
- package/es/lib/IconSelect/IconSelect.js +4 -2
- package/es/lib/QueryTypedown/QueryTypedown.js +4 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +4 -1
- package/es/lib/RichSelect/RichSelect.js +5 -2
- package/es/lib/RichSelect/useSelectedOption.js +1 -1
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +5 -2
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +4 -1
- package/es/lib/SASQRoute/SASQRoute.js +4 -1
- package/es/lib/SASQViewComponent/SASQViewComponent.js +4 -1
- package/es/lib/SearchField/SearchField.js +4 -1
- package/es/lib/Typedown/Typedown.js +1 -1
- package/es/lib/hooks/settingsHooks/useSettings.js +3 -1
- package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -1
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -1
- package/es/lib/hooks/useActiveElement.js +1 -1
- package/es/lib/hooks/useAvailableCustomProperties.js +1 -1
- package/es/lib/hooks/useCustomProperties.js +4 -1
- package/es/lib/hooks/useHelperApp.js +4 -2
- package/es/lib/hooks/useKiwtFieldArray.js +5 -2
- package/es/lib/hooks/useKiwtSASQuery.js +4 -2
- package/es/lib/hooks/useLocalStorageState.js +1 -1
- package/es/lib/hooks/useMutateCustomProperties.js +1 -1
- package/es/lib/hooks/useMutateRefdataCategory.js +4 -2
- package/es/lib/hooks/useMutateRefdataValue.js +1 -1
- package/es/lib/hooks/useQIndex.js +4 -2
- package/es/lib/utils/generateKiwtQueryParams.js +1 -1
- package/es/lib/utils/groupCustomPropertiesByCtx.js +4 -1
- package/es/lib/utils/highlightString.js +1 -1
- package/es/lib/utils/parseErrorResponse.js +23 -19
- package/junit.xml +150 -150
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +23 -5
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +324 -48
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +7 -7
- 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 +171 -39
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +271 -52
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +293 -74
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +126 -54
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +41 -56
- 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 +23 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +54 -42
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +213 -54
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +260 -41
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +41 -68
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +53 -53
- 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 +62 -3065
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +45 -45
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +103 -64
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +54 -63
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +49 -16
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +69 -18
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +81 -81
- 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 +33 -786
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +45 -45
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +6 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +43 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +20 -2
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +52 -46
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +53 -74
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +25 -25
- 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 +86 -32
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +109 -37
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +41 -14
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +45 -6
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +47 -11
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +65 -14
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +154 -31
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +26 -26
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +18 -18
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +35 -17
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
- 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 +67 -34
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +49 -7
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +7 -7
- 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/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +36 -12
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +24 -81
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +3 -3
- 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 +146 -14
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +31 -4
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +53 -8
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +65 -11
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +9 -9
- 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 +24 -27
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +47 -17
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +22 -22
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- 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 +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 +151 -106
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +12 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +25 -25
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +61 -22
- 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 +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +37 -37
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/index.html +166 -136
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +16 -16
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +240 -90
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +62 -62
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +39 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +11 -8
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +280 -0
- 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 +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +124 -76
- package/src/artifacts/coverage-jest/lcov.info +2706 -2419
- package/src/lib/utils/parseErrorResponse.js +3 -2
- package/translations/stripes-kint-components/de.json +41 -41
- package/translations/stripes-kint-components/ja.json +45 -45
- package/translations/stripes-kint-components/ko.json +49 -49
- package/yarn-error.log +0 -147
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">60% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>51/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">62.29% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>38/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">47.61% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>10/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">62.96% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>51/81</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -394,7 +394,80 @@
|
|
|
394
394
|
<a name='L329'></a><a href='#L329'>329</a>
|
|
395
395
|
<a name='L330'></a><a href='#L330'>330</a>
|
|
396
396
|
<a name='L331'></a><a href='#L331'>331</a>
|
|
397
|
-
<a name='L332'></a><a href='#L332'>332</a
|
|
397
|
+
<a name='L332'></a><a href='#L332'>332</a>
|
|
398
|
+
<a name='L333'></a><a href='#L333'>333</a>
|
|
399
|
+
<a name='L334'></a><a href='#L334'>334</a>
|
|
400
|
+
<a name='L335'></a><a href='#L335'>335</a>
|
|
401
|
+
<a name='L336'></a><a href='#L336'>336</a>
|
|
402
|
+
<a name='L337'></a><a href='#L337'>337</a>
|
|
403
|
+
<a name='L338'></a><a href='#L338'>338</a>
|
|
404
|
+
<a name='L339'></a><a href='#L339'>339</a>
|
|
405
|
+
<a name='L340'></a><a href='#L340'>340</a>
|
|
406
|
+
<a name='L341'></a><a href='#L341'>341</a>
|
|
407
|
+
<a name='L342'></a><a href='#L342'>342</a>
|
|
408
|
+
<a name='L343'></a><a href='#L343'>343</a>
|
|
409
|
+
<a name='L344'></a><a href='#L344'>344</a>
|
|
410
|
+
<a name='L345'></a><a href='#L345'>345</a>
|
|
411
|
+
<a name='L346'></a><a href='#L346'>346</a>
|
|
412
|
+
<a name='L347'></a><a href='#L347'>347</a>
|
|
413
|
+
<a name='L348'></a><a href='#L348'>348</a>
|
|
414
|
+
<a name='L349'></a><a href='#L349'>349</a>
|
|
415
|
+
<a name='L350'></a><a href='#L350'>350</a>
|
|
416
|
+
<a name='L351'></a><a href='#L351'>351</a>
|
|
417
|
+
<a name='L352'></a><a href='#L352'>352</a>
|
|
418
|
+
<a name='L353'></a><a href='#L353'>353</a>
|
|
419
|
+
<a name='L354'></a><a href='#L354'>354</a>
|
|
420
|
+
<a name='L355'></a><a href='#L355'>355</a>
|
|
421
|
+
<a name='L356'></a><a href='#L356'>356</a>
|
|
422
|
+
<a name='L357'></a><a href='#L357'>357</a>
|
|
423
|
+
<a name='L358'></a><a href='#L358'>358</a>
|
|
424
|
+
<a name='L359'></a><a href='#L359'>359</a>
|
|
425
|
+
<a name='L360'></a><a href='#L360'>360</a>
|
|
426
|
+
<a name='L361'></a><a href='#L361'>361</a>
|
|
427
|
+
<a name='L362'></a><a href='#L362'>362</a>
|
|
428
|
+
<a name='L363'></a><a href='#L363'>363</a>
|
|
429
|
+
<a name='L364'></a><a href='#L364'>364</a>
|
|
430
|
+
<a name='L365'></a><a href='#L365'>365</a>
|
|
431
|
+
<a name='L366'></a><a href='#L366'>366</a>
|
|
432
|
+
<a name='L367'></a><a href='#L367'>367</a>
|
|
433
|
+
<a name='L368'></a><a href='#L368'>368</a>
|
|
434
|
+
<a name='L369'></a><a href='#L369'>369</a>
|
|
435
|
+
<a name='L370'></a><a href='#L370'>370</a>
|
|
436
|
+
<a name='L371'></a><a href='#L371'>371</a>
|
|
437
|
+
<a name='L372'></a><a href='#L372'>372</a>
|
|
438
|
+
<a name='L373'></a><a href='#L373'>373</a>
|
|
439
|
+
<a name='L374'></a><a href='#L374'>374</a>
|
|
440
|
+
<a name='L375'></a><a href='#L375'>375</a>
|
|
441
|
+
<a name='L376'></a><a href='#L376'>376</a>
|
|
442
|
+
<a name='L377'></a><a href='#L377'>377</a>
|
|
443
|
+
<a name='L378'></a><a href='#L378'>378</a>
|
|
444
|
+
<a name='L379'></a><a href='#L379'>379</a>
|
|
445
|
+
<a name='L380'></a><a href='#L380'>380</a>
|
|
446
|
+
<a name='L381'></a><a href='#L381'>381</a>
|
|
447
|
+
<a name='L382'></a><a href='#L382'>382</a>
|
|
448
|
+
<a name='L383'></a><a href='#L383'>383</a>
|
|
449
|
+
<a name='L384'></a><a href='#L384'>384</a>
|
|
450
|
+
<a name='L385'></a><a href='#L385'>385</a>
|
|
451
|
+
<a name='L386'></a><a href='#L386'>386</a>
|
|
452
|
+
<a name='L387'></a><a href='#L387'>387</a>
|
|
453
|
+
<a name='L388'></a><a href='#L388'>388</a>
|
|
454
|
+
<a name='L389'></a><a href='#L389'>389</a>
|
|
455
|
+
<a name='L390'></a><a href='#L390'>390</a>
|
|
456
|
+
<a name='L391'></a><a href='#L391'>391</a>
|
|
457
|
+
<a name='L392'></a><a href='#L392'>392</a>
|
|
458
|
+
<a name='L393'></a><a href='#L393'>393</a>
|
|
459
|
+
<a name='L394'></a><a href='#L394'>394</a>
|
|
460
|
+
<a name='L395'></a><a href='#L395'>395</a>
|
|
461
|
+
<a name='L396'></a><a href='#L396'>396</a>
|
|
462
|
+
<a name='L397'></a><a href='#L397'>397</a>
|
|
463
|
+
<a name='L398'></a><a href='#L398'>398</a>
|
|
464
|
+
<a name='L399'></a><a href='#L399'>399</a>
|
|
465
|
+
<a name='L400'></a><a href='#L400'>400</a>
|
|
466
|
+
<a name='L401'></a><a href='#L401'>401</a>
|
|
467
|
+
<a name='L402'></a><a href='#L402'>402</a>
|
|
468
|
+
<a name='L403'></a><a href='#L403'>403</a>
|
|
469
|
+
<a name='L404'></a><a href='#L404'>404</a>
|
|
470
|
+
<a name='L405'></a><a href='#L405'>405</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
398
471
|
<span class="cline-any cline-neutral"> </span>
|
|
399
472
|
<span class="cline-any cline-neutral"> </span>
|
|
400
473
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -412,9 +485,9 @@
|
|
|
412
485
|
<span class="cline-any cline-neutral"> </span>
|
|
413
486
|
<span class="cline-any cline-neutral"> </span>
|
|
414
487
|
<span class="cline-any cline-neutral"> </span>
|
|
488
|
+
<span class="cline-any cline-yes">1x</span>
|
|
415
489
|
<span class="cline-any cline-neutral"> </span>
|
|
416
490
|
<span class="cline-any cline-neutral"> </span>
|
|
417
|
-
<span class="cline-any cline-yes">1x</span>
|
|
418
491
|
<span class="cline-any cline-neutral"> </span>
|
|
419
492
|
<span class="cline-any cline-neutral"> </span>
|
|
420
493
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -428,6 +501,58 @@
|
|
|
428
501
|
<span class="cline-any cline-neutral"> </span>
|
|
429
502
|
<span class="cline-any cline-yes">14x</span>
|
|
430
503
|
<span class="cline-any cline-neutral"> </span>
|
|
504
|
+
<span class="cline-any cline-neutral"> </span>
|
|
505
|
+
<span class="cline-any cline-yes">14x</span>
|
|
506
|
+
<span class="cline-any cline-yes">14x</span>
|
|
507
|
+
<span class="cline-any cline-neutral"> </span>
|
|
508
|
+
<span class="cline-any cline-yes">14x</span>
|
|
509
|
+
<span class="cline-any cline-no"> </span>
|
|
510
|
+
<span class="cline-any cline-neutral"> </span>
|
|
511
|
+
<span class="cline-any cline-neutral"> </span>
|
|
512
|
+
<span class="cline-any cline-neutral"> </span>
|
|
513
|
+
<span class="cline-any cline-no"> </span>
|
|
514
|
+
<span class="cline-any cline-neutral"> </span>
|
|
515
|
+
<span class="cline-any cline-neutral"> </span>
|
|
516
|
+
<span class="cline-any cline-neutral"> </span>
|
|
517
|
+
<span class="cline-any cline-neutral"> </span>
|
|
518
|
+
<span class="cline-any cline-neutral"> </span>
|
|
519
|
+
<span class="cline-any cline-neutral"> </span>
|
|
520
|
+
<span class="cline-any cline-no"> </span>
|
|
521
|
+
<span class="cline-any cline-neutral"> </span>
|
|
522
|
+
<span class="cline-any cline-neutral"> </span>
|
|
523
|
+
<span class="cline-any cline-neutral"> </span>
|
|
524
|
+
<span class="cline-any cline-neutral"> </span>
|
|
525
|
+
<span class="cline-any cline-neutral"> </span>
|
|
526
|
+
<span class="cline-any cline-neutral"> </span>
|
|
527
|
+
<span class="cline-any cline-neutral"> </span>
|
|
528
|
+
<span class="cline-any cline-neutral"> </span>
|
|
529
|
+
<span class="cline-any cline-yes">14x</span>
|
|
530
|
+
<span class="cline-any cline-yes">1x</span>
|
|
531
|
+
<span class="cline-any cline-yes">1x</span>
|
|
532
|
+
<span class="cline-any cline-neutral"> </span>
|
|
533
|
+
<span class="cline-any cline-neutral"> </span>
|
|
534
|
+
<span class="cline-any cline-neutral"> </span>
|
|
535
|
+
<span class="cline-any cline-neutral"> </span>
|
|
536
|
+
<span class="cline-any cline-neutral"> </span>
|
|
537
|
+
<span class="cline-any cline-neutral"> </span>
|
|
538
|
+
<span class="cline-any cline-yes">13x</span>
|
|
539
|
+
<span class="cline-any cline-yes">1x</span>
|
|
540
|
+
<span class="cline-any cline-yes">1x</span>
|
|
541
|
+
<span class="cline-any cline-neutral"> </span>
|
|
542
|
+
<span class="cline-any cline-yes">1x</span>
|
|
543
|
+
<span class="cline-any cline-neutral"> </span>
|
|
544
|
+
<span class="cline-any cline-neutral"> </span>
|
|
545
|
+
<span class="cline-any cline-neutral"> </span>
|
|
546
|
+
<span class="cline-any cline-neutral"> </span>
|
|
547
|
+
<span class="cline-any cline-neutral"> </span>
|
|
548
|
+
<span class="cline-any cline-neutral"> </span>
|
|
549
|
+
<span class="cline-any cline-yes">12x</span>
|
|
550
|
+
<span class="cline-any cline-no"> </span>
|
|
551
|
+
<span class="cline-any cline-neutral"> </span>
|
|
552
|
+
<span class="cline-any cline-neutral"> </span>
|
|
553
|
+
<span class="cline-any cline-yes">12x</span>
|
|
554
|
+
<span class="cline-any cline-neutral"> </span>
|
|
555
|
+
<span class="cline-any cline-neutral"> </span>
|
|
431
556
|
<span class="cline-any cline-yes">14x</span>
|
|
432
557
|
<span class="cline-any cline-no"> </span>
|
|
433
558
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -460,6 +585,8 @@
|
|
|
460
585
|
<span class="cline-any cline-neutral"> </span>
|
|
461
586
|
<span class="cline-any cline-neutral"> </span>
|
|
462
587
|
<span class="cline-any cline-neutral"> </span>
|
|
588
|
+
<span class="cline-any cline-neutral"> </span>
|
|
589
|
+
<span class="cline-any cline-neutral"> </span>
|
|
463
590
|
<span class="cline-any cline-no"> </span>
|
|
464
591
|
<span class="cline-any cline-neutral"> </span>
|
|
465
592
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -542,9 +669,6 @@
|
|
|
542
669
|
<span class="cline-any cline-neutral"> </span>
|
|
543
670
|
<span class="cline-any cline-neutral"> </span>
|
|
544
671
|
<span class="cline-any cline-neutral"> </span>
|
|
545
|
-
<span class="cline-any cline-neutral"> </span>
|
|
546
|
-
<span class="cline-any cline-neutral"> </span>
|
|
547
|
-
<span class="cline-any cline-neutral"> </span>
|
|
548
672
|
<span class="cline-any cline-yes">2x</span>
|
|
549
673
|
<span class="cline-any cline-no"> </span>
|
|
550
674
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -586,9 +710,10 @@
|
|
|
586
710
|
<span class="cline-any cline-neutral"> </span>
|
|
587
711
|
<span class="cline-any cline-neutral"> </span>
|
|
588
712
|
<span class="cline-any cline-neutral"> </span>
|
|
589
|
-
<span class="cline-any cline-yes">14x</span>
|
|
590
713
|
<span class="cline-any cline-neutral"> </span>
|
|
591
714
|
<span class="cline-any cline-neutral"> </span>
|
|
715
|
+
<span class="cline-any cline-yes">14x</span>
|
|
716
|
+
<span class="cline-any cline-neutral"> </span>
|
|
592
717
|
<span class="cline-any cline-neutral"> </span>
|
|
593
718
|
<span class="cline-any cline-neutral"> </span>
|
|
594
719
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -624,6 +749,20 @@
|
|
|
624
749
|
<span class="cline-any cline-neutral"> </span>
|
|
625
750
|
<span class="cline-any cline-neutral"> </span>
|
|
626
751
|
<span class="cline-any cline-neutral"> </span>
|
|
752
|
+
<span class="cline-any cline-neutral"> </span>
|
|
753
|
+
<span class="cline-any cline-neutral"> </span>
|
|
754
|
+
<span class="cline-any cline-neutral"> </span>
|
|
755
|
+
<span class="cline-any cline-neutral"> </span>
|
|
756
|
+
<span class="cline-any cline-neutral"> </span>
|
|
757
|
+
<span class="cline-any cline-neutral"> </span>
|
|
758
|
+
<span class="cline-any cline-neutral"> </span>
|
|
759
|
+
<span class="cline-any cline-neutral"> </span>
|
|
760
|
+
<span class="cline-any cline-neutral"> </span>
|
|
761
|
+
<span class="cline-any cline-neutral"> </span>
|
|
762
|
+
<span class="cline-any cline-neutral"> </span>
|
|
763
|
+
<span class="cline-any cline-neutral"> </span>
|
|
764
|
+
<span class="cline-any cline-neutral"> </span>
|
|
765
|
+
<span class="cline-any cline-neutral"> </span>
|
|
627
766
|
<span class="cline-any cline-yes">14x</span>
|
|
628
767
|
<span class="cline-any cline-yes">14x</span>
|
|
629
768
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -650,6 +789,9 @@
|
|
|
650
789
|
<span class="cline-any cline-neutral"> </span>
|
|
651
790
|
<span class="cline-any cline-neutral"> </span>
|
|
652
791
|
<span class="cline-any cline-neutral"> </span>
|
|
792
|
+
<span class="cline-any cline-neutral"> </span>
|
|
793
|
+
<span class="cline-any cline-neutral"> </span>
|
|
794
|
+
<span class="cline-any cline-neutral"> </span>
|
|
653
795
|
<span class="cline-any cline-yes">14x</span>
|
|
654
796
|
<span class="cline-any cline-yes">14x</span>
|
|
655
797
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -677,6 +819,8 @@
|
|
|
677
819
|
<span class="cline-any cline-neutral"> </span>
|
|
678
820
|
<span class="cline-any cline-neutral"> </span>
|
|
679
821
|
<span class="cline-any cline-neutral"> </span>
|
|
822
|
+
<span class="cline-any cline-neutral"> </span>
|
|
823
|
+
<span class="cline-any cline-neutral"> </span>
|
|
680
824
|
<span class="cline-any cline-yes">14x</span>
|
|
681
825
|
<span class="cline-any cline-neutral"> </span>
|
|
682
826
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -725,10 +869,10 @@
|
|
|
725
869
|
<span class="cline-any cline-neutral"> </span>
|
|
726
870
|
<span class="cline-any cline-neutral"> </span>
|
|
727
871
|
<span class="cline-any cline-neutral"> </span>
|
|
872
|
+
<span class="cline-any cline-neutral"> </span>
|
|
873
|
+
<span class="cline-any cline-neutral"> </span>
|
|
728
874
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import PropTypes from 'prop-types';
|
|
729
875
|
|
|
730
|
-
import { FormattedMessage, useIntl } from 'react-intl';
|
|
731
|
-
|
|
732
876
|
import { Field } from 'react-final-form';
|
|
733
877
|
|
|
734
878
|
import {
|
|
@@ -743,7 +887,7 @@ import {
|
|
|
743
887
|
|
|
744
888
|
import * as CUSTOM_PROPERTY_TYPES from '../../constants/customProperties';
|
|
745
889
|
|
|
746
|
-
import {
|
|
890
|
+
import { useKintIntl } from '../../hooks';
|
|
747
891
|
|
|
748
892
|
const CustomPropertyField = ({
|
|
749
893
|
availableCustomProperties,
|
|
@@ -751,13 +895,67 @@ const CustomPropertyField = ({
|
|
|
751
895
|
customPropertyType,
|
|
752
896
|
customProperties,
|
|
753
897
|
index,
|
|
754
|
-
|
|
898
|
+
intlKey: passedIntlKey,
|
|
899
|
+
intlNS: passedIntlNS,
|
|
900
|
+
labelOverrides = {},
|
|
755
901
|
name,
|
|
756
902
|
onChange,
|
|
757
903
|
value,
|
|
758
904
|
setCustomProperties
|
|
759
905
|
}) => {
|
|
760
|
-
const
|
|
906
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
907
|
+
|
|
908
|
+
// Set up the validator for the customProperty
|
|
909
|
+
const customPropertyValidator = (fieldValue, allValues) => {
|
|
910
|
+
const { note, publicNote, value: currentValue } = allValues?.customProperties?.[customProperty?.value]?.[0] ?? {};
|
|
911
|
+
|
|
912
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if ((note && !currentValue) || (publicNote && !currentValue)) {
|
|
913
|
+
<span class="cstat-no" title="statement not covered" > if (</span>
|
|
914
|
+
customProperty.type === CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME ||
|
|
915
|
+
customProperty.type === CUSTOM_PROPERTY_TYPES.INTEGER_CLASS_NAME
|
|
916
|
+
) {
|
|
917
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
918
|
+
kintIntl.formatKintMessage({
|
|
919
|
+
id: 'customProperties.errors.customPropertyNoteInvalidNumber',
|
|
920
|
+
overrideValue: labelOverrides.customPropertyNoteInvalidNumberError
|
|
921
|
+
})
|
|
922
|
+
);
|
|
923
|
+
} else {
|
|
924
|
+
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
925
|
+
kintIntl.formatKintMessage({
|
|
926
|
+
id: 'customProperties.errors.customPropertyNoteWithoutValue',
|
|
927
|
+
overrideValue: labelOverrides.customPropertyNoteWithoutValueError
|
|
928
|
+
})
|
|
929
|
+
);
|
|
930
|
+
}
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
if (customProperty.type === CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME) {
|
|
934
|
+
const regexp = /^-?[\d]*(\.[\d]{0,2})?$/;
|
|
935
|
+
return (fieldValue && !regexp.test(fieldValue)) ?
|
|
936
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > kintIntl.formatKintMessage({</span>
|
|
937
|
+
id: 'errors.maxTwoDecimals',
|
|
938
|
+
overrideValue: labelOverrides.maxTwoDecimalsError
|
|
939
|
+
}) : undefined;
|
|
940
|
+
}
|
|
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;
|
|
945
|
+
|
|
946
|
+
return (fieldValue && (fieldValue > max || fieldValue < min)) ?
|
|
947
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > kintIntl.formatKintMessage({</span>
|
|
948
|
+
id: 'errors.valueNotInRange',
|
|
949
|
+
overrideValue: labelOverrides.valueNotInRangeError
|
|
950
|
+
}, { min, max }) : undefined;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (!customProperty.primary && <span class="branch-1 cbranch-no" title="branch not covered" >!currentValue)</span> {
|
|
954
|
+
<span class="cstat-no" title="statement not covered" > return kintIntl.formatMessage({ id: 'stripes-core.label.missingRequiredField' });</span>
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
return undefined;
|
|
958
|
+
};
|
|
761
959
|
|
|
762
960
|
const getCustomProperty = <span class="fstat-no" title="function not covered" >(c</span>ustomPropertyValue) => {
|
|
763
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>
|
|
@@ -787,8 +985,10 @@ const CustomPropertyField = ({
|
|
|
787
985
|
dataOptions={[customProperty, ...unsetCustomProperties]} // The selected customProperty, and the available unset customProperties
|
|
788
986
|
id={`edit-customproperty-${index}-name`}
|
|
789
987
|
label={
|
|
790
|
-
|
|
791
|
-
|
|
988
|
+
kintIntl.formatKintMessage({
|
|
989
|
+
id: 'customProperties.name',
|
|
990
|
+
overrideValue: labelOverrides.name
|
|
991
|
+
})
|
|
792
992
|
}
|
|
793
993
|
onChange={<span class="fstat-no" title="function not covered" >e </span>=> {
|
|
794
994
|
const newValue = <span class="cstat-no" title="statement not covered" >e.target.value;</span>
|
|
@@ -819,7 +1019,7 @@ const CustomPropertyField = ({
|
|
|
819
1019
|
};
|
|
820
1020
|
|
|
821
1021
|
const renderCustomPropertyValue = () => {
|
|
822
|
-
const currentValue = value[customProperty.value] ? value[customProperty.value][0] :
|
|
1022
|
+
const currentValue = value[customProperty.value] ? value[customProperty.value][0] : {};
|
|
823
1023
|
const min = Number.MIN_SAFE_INTEGER;
|
|
824
1024
|
const max = Number.MAX_SAFE_INTEGER;
|
|
825
1025
|
|
|
@@ -867,12 +1067,9 @@ const CustomPropertyField = ({
|
|
|
867
1067
|
case CUSTOM_PROPERTY_TYPES.INTEGER_CLASS_NAME:
|
|
868
1068
|
case CUSTOM_PROPERTY_TYPES.DECIMAL_CLASS_NAME:
|
|
869
1069
|
fieldProps = {
|
|
870
|
-
badInput: intl.formatMessage({ id: 'stripes-kint-components.errors.customPropertyInvalidNumber' }),
|
|
871
1070
|
component: TextField,
|
|
872
1071
|
max,
|
|
873
1072
|
min,
|
|
874
|
-
rangeOverflow: intl.formatMessage({ id: 'stripes-kint-components.errors.customPropertyDecimalValueNotInRange' }, { min, max }),
|
|
875
|
-
rangeUnderflow: intl.formatMessage({ id: 'stripes-kint-components.errors.customPropertyDecimalValueNotInRange' }, { min, max }),
|
|
876
1073
|
step: 'any',
|
|
877
1074
|
type: 'number',
|
|
878
1075
|
};
|
|
@@ -911,21 +1108,22 @@ const CustomPropertyField = ({
|
|
|
911
1108
|
data-test-customproperty-value
|
|
912
1109
|
id={`edit-customproperty-${index}-value`}
|
|
913
1110
|
label={
|
|
914
|
-
|
|
915
|
-
|
|
1111
|
+
kintIntl.formatKintMessage({
|
|
1112
|
+
id: 'customProperties.value',
|
|
1113
|
+
overrideValue: labelOverrides.value
|
|
1114
|
+
})
|
|
916
1115
|
}
|
|
917
1116
|
name={`${name}.${customProperty.value}[0].value`}
|
|
918
1117
|
onChange={handleChange}
|
|
919
1118
|
required={!customProperty.primary}
|
|
920
|
-
validate={(fieldValue, allValues) => customPropertyValidator(fieldValue, allValues
|
|
921
|
-
valueMissing={intl.formatMessage({ id: 'stripes-core.label.missingRequiredField' })}
|
|
1119
|
+
validate={(fieldValue, allValues) => customPropertyValidator(fieldValue, allValues)}
|
|
922
1120
|
{...fieldProps}
|
|
923
1121
|
/>
|
|
924
1122
|
);
|
|
925
1123
|
};
|
|
926
1124
|
|
|
927
1125
|
const renderCustomPropertyVisibility = () => {
|
|
928
|
-
const customPropertyObject = value[customProperty.value]?.[0] ??
|
|
1126
|
+
const customPropertyObject = value[customProperty.value]?.[0] ?? {};
|
|
929
1127
|
|
|
930
1128
|
const handleChange = <span class="fstat-no" title="function not covered" >e </span>=> {
|
|
931
1129
|
<span class="cstat-no" title="statement not covered" > onChange({</span>
|
|
@@ -941,13 +1139,27 @@ const CustomPropertyField = ({
|
|
|
941
1139
|
<Select
|
|
942
1140
|
data-test-customproperty-visibility
|
|
943
1141
|
dataOptions={[
|
|
944
|
-
{
|
|
945
|
-
|
|
1142
|
+
{
|
|
1143
|
+
value: true,
|
|
1144
|
+
label: kintIntl.formatKintMessage({
|
|
1145
|
+
id: 'customProperties.internalTrue',
|
|
1146
|
+
overrideValue: labelOverrides.internalTrue
|
|
1147
|
+
})
|
|
1148
|
+
},
|
|
1149
|
+
{
|
|
1150
|
+
value: false,
|
|
1151
|
+
label: kintIntl.formatKintMessage({
|
|
1152
|
+
id: 'customProperties.internalFalse',
|
|
1153
|
+
overrideValue: labelOverrides.internalFalse
|
|
1154
|
+
})
|
|
1155
|
+
}
|
|
946
1156
|
]}
|
|
947
1157
|
id={`edit-customproperty-${index}-visibility`}
|
|
948
1158
|
label={
|
|
949
|
-
|
|
950
|
-
|
|
1159
|
+
kintIntl.formatKintMessage({
|
|
1160
|
+
id: 'customProperties.visibility',
|
|
1161
|
+
overrideValue: labelOverrides.visibility
|
|
1162
|
+
})
|
|
951
1163
|
}
|
|
952
1164
|
onChange={handleChange}
|
|
953
1165
|
value={customPropertyObject?.internal ?? customProperty.defaultInternal}
|
|
@@ -956,7 +1168,7 @@ const CustomPropertyField = ({
|
|
|
956
1168
|
};
|
|
957
1169
|
|
|
958
1170
|
const renderCustomPropertyNoteInternal = () => {
|
|
959
|
-
const customPropertyObject = value[customProperty.value]?.[0] ??
|
|
1171
|
+
const customPropertyObject = value[customProperty.value]?.[0] ?? {};
|
|
960
1172
|
|
|
961
1173
|
const handleChange = <span class="fstat-no" title="function not covered" >e </span>=> {
|
|
962
1174
|
<span class="cstat-no" title="statement not covered" > onChange({</span>
|
|
@@ -973,8 +1185,11 @@ const CustomPropertyField = ({
|
|
|
973
1185
|
data-test-customproperty-note
|
|
974
1186
|
id={`edit-customproperty-${index}-internal-note`}
|
|
975
1187
|
label={
|
|
976
|
-
|
|
977
|
-
|
|
1188
|
+
kintIntl.formatKintMessage({
|
|
1189
|
+
id: 'customProperties.internalNote',
|
|
1190
|
+
overrideValue: labelOverrides.internalNote
|
|
1191
|
+
})
|
|
1192
|
+
}
|
|
978
1193
|
onChange={handleChange}
|
|
979
1194
|
value={customPropertyObject?.note}
|
|
980
1195
|
/>
|
|
@@ -982,7 +1197,7 @@ const CustomPropertyField = ({
|
|
|
982
1197
|
};
|
|
983
1198
|
|
|
984
1199
|
const renderCustomPropertyNotePublic = () => {
|
|
985
|
-
const customPropertyObject = value[customProperty.value]?.[0] ??
|
|
1200
|
+
const customPropertyObject = value[customProperty.value]?.[0] ?? {};
|
|
986
1201
|
|
|
987
1202
|
const handleChange = <span class="fstat-no" title="function not covered" >e </span>=> {
|
|
988
1203
|
<span class="cstat-no" title="statement not covered" > onChange({</span>
|
|
@@ -999,8 +1214,10 @@ const CustomPropertyField = ({
|
|
|
999
1214
|
data-test-customproperty-public-note
|
|
1000
1215
|
id={`edit-customproperty-${index}-public-note`}
|
|
1001
1216
|
label={
|
|
1002
|
-
|
|
1003
|
-
|
|
1217
|
+
kintIntl.formatKintMessage({
|
|
1218
|
+
id: 'customProperties.publicNote',
|
|
1219
|
+
overrideValue: labelOverrides.publicNote
|
|
1220
|
+
})
|
|
1004
1221
|
}
|
|
1005
1222
|
onChange={handleChange}
|
|
1006
1223
|
value={customPropertyObject?.publicNote}
|
|
@@ -1048,6 +1265,8 @@ CustomPropertyField.propTypes = {
|
|
|
1048
1265
|
customPropertyType: PropTypes.string,
|
|
1049
1266
|
customProperties: PropTypes.arrayOf(PropTypes.object),
|
|
1050
1267
|
index: PropTypes.number,
|
|
1268
|
+
intlKey: PropTypes.string,
|
|
1269
|
+
intlNS: PropTypes.string,
|
|
1051
1270
|
labelOverrides: PropTypes.object,
|
|
1052
1271
|
name: PropTypes.string,
|
|
1053
1272
|
onChange: PropTypes.func,
|
|
@@ -1063,7 +1282,7 @@ export default CustomPropertyField;
|
|
|
1063
1282
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1064
1283
|
Code coverage generated by
|
|
1065
1284
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1066
|
-
at 2022-
|
|
1285
|
+
at 2022-12-09T15:17:50.295Z
|
|
1067
1286
|
</div>
|
|
1068
1287
|
<script src="../../prettify.js"></script>
|
|
1069
1288
|
<script>
|