@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
|
@@ -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">42.3% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>11/26</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">27.77% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>5/18</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">11.11% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>1/9</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">47.82% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>11/23</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -215,7 +215,6 @@
|
|
|
215
215
|
<span class="cline-any cline-neutral"> </span>
|
|
216
216
|
<span class="cline-any cline-neutral"> </span>
|
|
217
217
|
<span class="cline-any cline-neutral"> </span>
|
|
218
|
-
<span class="cline-any cline-neutral"> </span>
|
|
219
218
|
<span class="cline-any cline-yes">1x</span>
|
|
220
219
|
<span class="cline-any cline-neutral"> </span>
|
|
221
220
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -225,12 +224,15 @@
|
|
|
225
224
|
<span class="cline-any cline-neutral"> </span>
|
|
226
225
|
<span class="cline-any cline-neutral"> </span>
|
|
227
226
|
<span class="cline-any cline-neutral"> </span>
|
|
227
|
+
<span class="cline-any cline-neutral"> </span>
|
|
228
|
+
<span class="cline-any cline-neutral"> </span>
|
|
228
229
|
<span class="cline-any cline-yes">4x</span>
|
|
229
230
|
<span class="cline-any cline-yes">4x</span>
|
|
230
231
|
<span class="cline-any cline-yes">4x</span>
|
|
231
232
|
<span class="cline-any cline-neutral"> </span>
|
|
232
233
|
<span class="cline-any cline-yes">4x</span>
|
|
233
234
|
<span class="cline-any cline-neutral"> </span>
|
|
235
|
+
<span class="cline-any cline-yes">4x</span>
|
|
234
236
|
<span class="cline-any cline-neutral"> </span>
|
|
235
237
|
<span class="cline-any cline-neutral"> </span>
|
|
236
238
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -241,13 +243,10 @@
|
|
|
241
243
|
<span class="cline-any cline-neutral"> </span>
|
|
242
244
|
<span class="cline-any cline-neutral"> </span>
|
|
243
245
|
<span class="cline-any cline-neutral"> </span>
|
|
244
|
-
<span class="cline-any cline-yes">4x</span>
|
|
245
246
|
<span class="cline-any cline-neutral"> </span>
|
|
246
247
|
<span class="cline-any cline-yes">4x</span>
|
|
247
|
-
<span class="cline-any cline-yes">4x</span>
|
|
248
|
-
<span class="cline-any cline-yes">4x</span>
|
|
249
|
-
<span class="cline-any cline-neutral"> </span>
|
|
250
248
|
<span class="cline-any cline-neutral"> </span>
|
|
249
|
+
<span class="cline-any cline-yes">4x</span>
|
|
251
250
|
<span class="cline-any cline-no"> </span>
|
|
252
251
|
<span class="cline-any cline-neutral"> </span>
|
|
253
252
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -257,14 +256,6 @@
|
|
|
257
256
|
<span class="cline-any cline-neutral"> </span>
|
|
258
257
|
<span class="cline-any cline-neutral"> </span>
|
|
259
258
|
<span class="cline-any cline-neutral"> </span>
|
|
260
|
-
<span class="cline-any cline-yes">4x</span>
|
|
261
|
-
<span class="cline-any cline-no"> </span>
|
|
262
|
-
<span class="cline-any cline-neutral"> </span>
|
|
263
|
-
<span class="cline-any cline-neutral"> </span>
|
|
264
|
-
<span class="cline-any cline-neutral"> </span>
|
|
265
|
-
<span class="cline-any cline-neutral"> </span>
|
|
266
|
-
<span class="cline-any cline-neutral"> </span>
|
|
267
|
-
<span class="cline-any cline-neutral"> </span>
|
|
268
259
|
<span class="cline-any cline-neutral"> </span>
|
|
269
260
|
<span class="cline-any cline-neutral"> </span>
|
|
270
261
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -310,6 +301,8 @@
|
|
|
310
301
|
<span class="cline-any cline-neutral"> </span>
|
|
311
302
|
<span class="cline-any cline-neutral"> </span>
|
|
312
303
|
<span class="cline-any cline-neutral"> </span>
|
|
304
|
+
<span class="cline-any cline-neutral"> </span>
|
|
305
|
+
<span class="cline-any cline-neutral"> </span>
|
|
313
306
|
<span class="cline-any cline-no"> </span>
|
|
314
307
|
<span class="cline-any cline-neutral"> </span>
|
|
315
308
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -331,6 +324,11 @@
|
|
|
331
324
|
<span class="cline-any cline-neutral"> </span>
|
|
332
325
|
<span class="cline-any cline-neutral"> </span>
|
|
333
326
|
<span class="cline-any cline-neutral"> </span>
|
|
327
|
+
<span class="cline-any cline-neutral"> </span>
|
|
328
|
+
<span class="cline-any cline-neutral"> </span>
|
|
329
|
+
<span class="cline-any cline-neutral"> </span>
|
|
330
|
+
<span class="cline-any cline-neutral"> </span>
|
|
331
|
+
<span class="cline-any cline-neutral"> </span>
|
|
334
332
|
<span class="cline-any cline-yes">1x</span>
|
|
335
333
|
<span class="cline-any cline-neutral"> </span>
|
|
336
334
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -339,9 +337,10 @@
|
|
|
339
337
|
<span class="cline-any cline-neutral"> </span>
|
|
340
338
|
<span class="cline-any cline-neutral"> </span>
|
|
341
339
|
<span class="cline-any cline-neutral"> </span>
|
|
340
|
+
<span class="cline-any cline-neutral"> </span>
|
|
341
|
+
<span class="cline-any cline-neutral"> </span>
|
|
342
342
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useState } from 'react';
|
|
343
343
|
import PropTypes from 'prop-types';
|
|
344
|
-
import { FormattedMessage } from 'react-intl';
|
|
345
344
|
|
|
346
345
|
import {
|
|
347
346
|
Accordion,
|
|
@@ -349,7 +348,7 @@ import {
|
|
|
349
348
|
Layout,
|
|
350
349
|
Spinner
|
|
351
350
|
} from '@folio/stripes/components';
|
|
352
|
-
import { useCustomProperties } from '../../hooks';
|
|
351
|
+
import { useCustomProperties, useKintIntl } from '../../hooks';
|
|
353
352
|
import useParseActiveFilterStrings from './useParseActiveFilterStrings';
|
|
354
353
|
import CustomPropertiesFilterForm from './CustomPropertiesFilterForm';
|
|
355
354
|
import { MULTI_REFDATA_CLASS_NAME, REFDATA_CLASS_NAME } from '../../constants/customProperties';
|
|
@@ -361,11 +360,15 @@ const CustomPropertiesFilter = ({
|
|
|
361
360
|
},
|
|
362
361
|
customPropertiesEndpoint,
|
|
363
362
|
filterHandlers,
|
|
364
|
-
|
|
363
|
+
intlKey: passedIntlKey,
|
|
364
|
+
intlNS: passedIntlNS,
|
|
365
|
+
labelOverrides = {}
|
|
365
366
|
}) => {
|
|
366
367
|
const [editingFilters, setEditingFilters] = useState(false);
|
|
367
368
|
const openEditModal = <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setEditingFilters(true);</span>
|
|
368
369
|
const closeEditModal = <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setEditingFilters(false);</span>
|
|
370
|
+
|
|
371
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
369
372
|
|
|
370
373
|
const { data: custprops, isLoading } = useCustomProperties({
|
|
371
374
|
endpoint: customPropertiesEndpoint,
|
|
@@ -379,21 +382,7 @@ const CustomPropertiesFilter = ({
|
|
|
379
382
|
],
|
|
380
383
|
}
|
|
381
384
|
});
|
|
382
|
-
const parsedFilterData = useParseActiveFilterStrings(custPropFilters || <span class="branch-1 cbranch-no" title="branch not covered" >[])
|
|
383
|
-
|
|
384
|
-
const getFiltersApplied = () => {
|
|
385
|
-
<span class="missing-if-branch" title="else path not taken" >E</span>if (labelOverrides.filtersApplied && typeof labelOverrides.filtersApplied === 'function') {
|
|
386
|
-
return labelOverrides.filtersApplied((parsedFilterData?.numberOfFilters ?? <span class="branch-1 cbranch-no" title="branch not covered" >0)</span>);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
390
|
-
labelOverrides.filtersApplied ??
|
|
391
|
-
<FormattedMessage
|
|
392
|
-
id="stripes-kint-components.customProperty.filtersApplied"
|
|
393
|
-
values={{ count: (parsedFilterData?.numberOfFilters ?? 0) }}
|
|
394
|
-
/>
|
|
395
|
-
);
|
|
396
|
-
};
|
|
385
|
+
const parsedFilterData = useParseActiveFilterStrings(custPropFilters || <span class="branch-1 cbranch-no" title="branch not covered" >[],</span> passedIntlKey, passedIntlNS, labelOverrides);
|
|
397
386
|
|
|
398
387
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (isLoading) {
|
|
399
388
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
@@ -402,8 +391,10 @@ const CustomPropertiesFilter = ({
|
|
|
402
391
|
header={FilterAccordionHeader}
|
|
403
392
|
id="clickable-custprop-filter"
|
|
404
393
|
label={
|
|
405
|
-
|
|
406
|
-
|
|
394
|
+
kintIntl.formatKintMessage({
|
|
395
|
+
id: 'customProperties',
|
|
396
|
+
overrideValue: labelOverrides.customProperties,
|
|
397
|
+
})
|
|
407
398
|
}
|
|
408
399
|
separator={false}
|
|
409
400
|
>
|
|
@@ -445,14 +436,21 @@ const CustomPropertiesFilter = ({
|
|
|
445
436
|
header={FilterAccordionHeader}
|
|
446
437
|
id="clickable-custprop-filter"
|
|
447
438
|
label={
|
|
448
|
-
|
|
449
|
-
|
|
439
|
+
kintIntl.formatKintMessage({
|
|
440
|
+
id: 'customProperties',
|
|
441
|
+
overrideValue: labelOverrides.customProperties,
|
|
442
|
+
})
|
|
450
443
|
}
|
|
451
444
|
onClearFilter={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >filterHandlers.state({ ...restOfFilters, customProperties: [] })}</span>
|
|
452
445
|
separator={false}
|
|
453
446
|
>
|
|
454
447
|
<Layout className="padding-bottom-gutter">
|
|
455
|
-
{
|
|
448
|
+
{
|
|
449
|
+
kintIntl.formatKintMessage({
|
|
450
|
+
id: 'customProperty.filtersApplied',
|
|
451
|
+
overrideValue: labelOverrides.filtersApplied,
|
|
452
|
+
}, { count: (parsedFilterData?.numberOfFilters ?? <span class="branch-1 cbranch-no" title="branch not covered" >0)</span> })
|
|
453
|
+
}
|
|
456
454
|
</Layout>
|
|
457
455
|
<CustomPropertiesFilterForm
|
|
458
456
|
customProperties={custprops}
|
|
@@ -473,6 +471,8 @@ CustomPropertiesFilter.propTypes = {
|
|
|
473
471
|
activeFilters: PropTypes.object,
|
|
474
472
|
customPropertiesEndpoint: PropTypes.string,
|
|
475
473
|
filterHandlers: PropTypes.object,
|
|
474
|
+
intlKey: PropTypes.string,
|
|
475
|
+
intlNS: PropTypes.string,
|
|
476
476
|
labelOverrides: PropTypes.object
|
|
477
477
|
};
|
|
478
478
|
|
|
@@ -484,7 +484,7 @@ export default CustomPropertiesFilter;
|
|
|
484
484
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
485
485
|
Code coverage generated by
|
|
486
486
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
487
|
-
at 2022-
|
|
487
|
+
at 2022-12-09T15:17:50.295Z
|
|
488
488
|
</div>
|
|
489
489
|
<script src="../../prettify.js"></script>
|
|
490
490
|
<script>
|
|
@@ -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">68% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>17/25</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">42.85% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>6/
|
|
35
|
+
<span class='fraction'>6/14</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">75% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>9/12</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">72.72% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>16/22</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -211,8 +211,20 @@
|
|
|
211
211
|
<a name='L146'></a><a href='#L146'>146</a>
|
|
212
212
|
<a name='L147'></a><a href='#L147'>147</a>
|
|
213
213
|
<a name='L148'></a><a href='#L148'>148</a>
|
|
214
|
-
<a name='L149'></a><a href='#L149'>149</a
|
|
215
|
-
<
|
|
214
|
+
<a name='L149'></a><a href='#L149'>149</a>
|
|
215
|
+
<a name='L150'></a><a href='#L150'>150</a>
|
|
216
|
+
<a name='L151'></a><a href='#L151'>151</a>
|
|
217
|
+
<a name='L152'></a><a href='#L152'>152</a>
|
|
218
|
+
<a name='L153'></a><a href='#L153'>153</a>
|
|
219
|
+
<a name='L154'></a><a href='#L154'>154</a>
|
|
220
|
+
<a name='L155'></a><a href='#L155'>155</a>
|
|
221
|
+
<a name='L156'></a><a href='#L156'>156</a>
|
|
222
|
+
<a name='L157'></a><a href='#L157'>157</a>
|
|
223
|
+
<a name='L158'></a><a href='#L158'>158</a>
|
|
224
|
+
<a name='L159'></a><a href='#L159'>159</a>
|
|
225
|
+
<a name='L160'></a><a href='#L160'>160</a>
|
|
226
|
+
<a name='L161'></a><a href='#L161'>161</a>
|
|
227
|
+
<a name='L162'></a><a href='#L162'>162</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
216
228
|
<span class="cline-any cline-neutral"> </span>
|
|
217
229
|
<span class="cline-any cline-neutral"> </span>
|
|
218
230
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -238,54 +250,60 @@
|
|
|
238
250
|
<span class="cline-any cline-neutral"> </span>
|
|
239
251
|
<span class="cline-any cline-neutral"> </span>
|
|
240
252
|
<span class="cline-any cline-neutral"> </span>
|
|
241
|
-
<span class="cline-any cline-yes">2x</span>
|
|
242
|
-
<span class="cline-any cline-yes">2x</span>
|
|
243
|
-
<span class="cline-any cline-yes">2x</span>
|
|
244
253
|
<span class="cline-any cline-neutral"> </span>
|
|
245
254
|
<span class="cline-any cline-neutral"> </span>
|
|
246
|
-
<span class="cline-any cline-yes">
|
|
255
|
+
<span class="cline-any cline-yes">4x</span>
|
|
256
|
+
<span class="cline-any cline-yes">4x</span>
|
|
257
|
+
<span class="cline-any cline-yes">4x</span>
|
|
258
|
+
<span class="cline-any cline-yes">4x</span>
|
|
259
|
+
<span class="cline-any cline-neutral"> </span>
|
|
260
|
+
<span class="cline-any cline-yes">4x</span>
|
|
261
|
+
<span class="cline-any cline-neutral"> </span>
|
|
262
|
+
<span class="cline-any cline-neutral"> </span>
|
|
263
|
+
<span class="cline-any cline-neutral"> </span>
|
|
247
264
|
<span class="cline-any cline-neutral"> </span>
|
|
248
|
-
<span class="cline-any cline-no"> </span>
|
|
249
|
-
<span class="cline-any cline-no"> </span>
|
|
250
265
|
<span class="cline-any cline-neutral"> </span>
|
|
251
266
|
<span class="cline-any cline-neutral"> </span>
|
|
252
267
|
<span class="cline-any cline-neutral"> </span>
|
|
253
268
|
<span class="cline-any cline-neutral"> </span>
|
|
254
269
|
<span class="cline-any cline-neutral"> </span>
|
|
270
|
+
<span class="cline-any cline-neutral"> </span>
|
|
271
|
+
<span class="cline-any cline-neutral"> </span>
|
|
272
|
+
<span class="cline-any cline-neutral"> </span>
|
|
273
|
+
<span class="cline-any cline-yes">4x</span>
|
|
274
|
+
<span class="cline-any cline-yes">4x</span>
|
|
275
|
+
<span class="cline-any cline-neutral"> </span>
|
|
276
|
+
<span class="cline-any cline-no"> </span>
|
|
277
|
+
<span class="cline-any cline-no"> </span>
|
|
255
278
|
<span class="cline-any cline-no"> </span>
|
|
256
279
|
<span class="cline-any cline-neutral"> </span>
|
|
257
280
|
<span class="cline-any cline-neutral"> </span>
|
|
281
|
+
<span class="cline-any cline-yes">4x</span>
|
|
258
282
|
<span class="cline-any cline-neutral"> </span>
|
|
259
283
|
<span class="cline-any cline-neutral"> </span>
|
|
260
284
|
<span class="cline-any cline-neutral"> </span>
|
|
261
|
-
<span class="cline-any cline-yes">2x</span>
|
|
262
285
|
<span class="cline-any cline-neutral"> </span>
|
|
263
286
|
<span class="cline-any cline-neutral"> </span>
|
|
264
287
|
<span class="cline-any cline-neutral"> </span>
|
|
265
288
|
<span class="cline-any cline-neutral"> </span>
|
|
289
|
+
<span class="cline-any cline-yes">8x</span>
|
|
266
290
|
<span class="cline-any cline-neutral"> </span>
|
|
267
291
|
<span class="cline-any cline-neutral"> </span>
|
|
268
292
|
<span class="cline-any cline-neutral"> </span>
|
|
269
|
-
<span class="cline-any cline-yes">2x</span>
|
|
270
293
|
<span class="cline-any cline-neutral"> </span>
|
|
271
294
|
<span class="cline-any cline-neutral"> </span>
|
|
295
|
+
<span class="cline-any cline-yes">48x</span>
|
|
272
296
|
<span class="cline-any cline-neutral"> </span>
|
|
273
297
|
<span class="cline-any cline-neutral"> </span>
|
|
274
298
|
<span class="cline-any cline-neutral"> </span>
|
|
275
299
|
<span class="cline-any cline-neutral"> </span>
|
|
276
300
|
<span class="cline-any cline-neutral"> </span>
|
|
277
|
-
<span class="cline-any cline-yes">2x</span>
|
|
278
301
|
<span class="cline-any cline-neutral"> </span>
|
|
279
|
-
<span class="cline-any cline-no"> </span>
|
|
280
|
-
<span class="cline-any cline-no"> </span>
|
|
281
|
-
<span class="cline-any cline-no"> </span>
|
|
282
302
|
<span class="cline-any cline-neutral"> </span>
|
|
283
|
-
<span class="cline-any cline-yes">4x</span>
|
|
284
303
|
<span class="cline-any cline-neutral"> </span>
|
|
285
304
|
<span class="cline-any cline-neutral"> </span>
|
|
286
305
|
<span class="cline-any cline-neutral"> </span>
|
|
287
306
|
<span class="cline-any cline-neutral"> </span>
|
|
288
|
-
<span class="cline-any cline-yes">8x</span>
|
|
289
307
|
<span class="cline-any cline-neutral"> </span>
|
|
290
308
|
<span class="cline-any cline-neutral"> </span>
|
|
291
309
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -305,11 +323,11 @@
|
|
|
305
323
|
<span class="cline-any cline-neutral"> </span>
|
|
306
324
|
<span class="cline-any cline-neutral"> </span>
|
|
307
325
|
<span class="cline-any cline-neutral"> </span>
|
|
326
|
+
<span class="cline-any cline-yes">10x</span>
|
|
308
327
|
<span class="cline-any cline-neutral"> </span>
|
|
309
328
|
<span class="cline-any cline-neutral"> </span>
|
|
310
329
|
<span class="cline-any cline-neutral"> </span>
|
|
311
330
|
<span class="cline-any cline-neutral"> </span>
|
|
312
|
-
<span class="cline-any cline-yes">2x</span>
|
|
313
331
|
<span class="cline-any cline-neutral"> </span>
|
|
314
332
|
<span class="cline-any cline-neutral"> </span>
|
|
315
333
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -326,12 +344,15 @@
|
|
|
326
344
|
<span class="cline-any cline-neutral"> </span>
|
|
327
345
|
<span class="cline-any cline-neutral"> </span>
|
|
328
346
|
<span class="cline-any cline-neutral"> </span>
|
|
329
|
-
<span class="cline-any cline-
|
|
330
|
-
<span class="cline-any cline-
|
|
347
|
+
<span class="cline-any cline-neutral"> </span>
|
|
348
|
+
<span class="cline-any cline-neutral"> </span>
|
|
349
|
+
<span class="cline-any cline-yes">4x</span>
|
|
350
|
+
<span class="cline-any cline-yes">4x</span>
|
|
331
351
|
<span class="cline-any cline-neutral"> </span>
|
|
332
352
|
<span class="cline-any cline-neutral"> </span>
|
|
333
353
|
<span class="cline-any cline-no"> </span>
|
|
334
|
-
<span class="cline-any cline-
|
|
354
|
+
<span class="cline-any cline-yes">10x</span>
|
|
355
|
+
<span class="cline-any cline-neutral"> </span>
|
|
335
356
|
<span class="cline-any cline-neutral"> </span>
|
|
336
357
|
<span class="cline-any cline-neutral"> </span>
|
|
337
358
|
<span class="cline-any cline-no"> </span>
|
|
@@ -350,6 +371,9 @@
|
|
|
350
371
|
<span class="cline-any cline-neutral"> </span>
|
|
351
372
|
<span class="cline-any cline-neutral"> </span>
|
|
352
373
|
<span class="cline-any cline-neutral"> </span>
|
|
374
|
+
<span class="cline-any cline-neutral"> </span>
|
|
375
|
+
<span class="cline-any cline-neutral"> </span>
|
|
376
|
+
<span class="cline-any cline-neutral"> </span>
|
|
353
377
|
<span class="cline-any cline-yes">1x</span>
|
|
354
378
|
<span class="cline-any cline-neutral"> </span>
|
|
355
379
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -359,10 +383,10 @@
|
|
|
359
383
|
<span class="cline-any cline-neutral"> </span>
|
|
360
384
|
<span class="cline-any cline-neutral"> </span>
|
|
361
385
|
<span class="cline-any cline-neutral"> </span>
|
|
386
|
+
<span class="cline-any cline-neutral"> </span>
|
|
387
|
+
<span class="cline-any cline-neutral"> </span>
|
|
362
388
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import PropTypes from 'prop-types';
|
|
363
389
|
|
|
364
|
-
import { FormattedMessage } from 'react-intl';
|
|
365
|
-
|
|
366
390
|
import { Field, useForm, useFormState } from 'react-final-form';
|
|
367
391
|
import { FieldArray } from 'react-final-form-arrays';
|
|
368
392
|
|
|
@@ -378,58 +402,54 @@ import { groupCustomPropertiesByCtx } from '../../utils';
|
|
|
378
402
|
import { required as requiredValidator } from '../../utils/validators';
|
|
379
403
|
|
|
380
404
|
import CustomPropertiesRule from './CustomPropertiesRule';
|
|
405
|
+
import { useKintIntl } from '../../hooks';
|
|
381
406
|
|
|
382
407
|
const CustomPropertiesFilterField = ({
|
|
383
408
|
customProperties = <span class="branch-0 cbranch-no" title="branch not covered" >[],</span>
|
|
384
409
|
fields,
|
|
385
410
|
index,
|
|
386
|
-
|
|
411
|
+
intlKey: passedIntlKey,
|
|
412
|
+
intlNS: passedIntlNS,
|
|
413
|
+
labelOverrides = {},
|
|
387
414
|
name,
|
|
388
415
|
}) => {
|
|
389
416
|
const groupedCustomProperties = groupCustomPropertiesByCtx(customProperties);
|
|
390
417
|
const { change, mutators: { push } } = useForm();
|
|
391
418
|
const { values } = useFormState();
|
|
392
|
-
|
|
393
|
-
// Deal with all the possible label override options
|
|
394
|
-
const getRetiredName = <span class="fstat-no" title="function not covered" >(c</span>ustomProperty) => {
|
|
395
|
-
// Label override for default card title,
|
|
396
|
-
<span class="cstat-no" title="statement not covered" > if (labelOverrides.retiredName && typeof labelOverrides.retiredName === 'function') {</span>
|
|
397
|
-
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
398
|
-
labelOverrides.retiredName(customProperty.label)
|
|
399
|
-
);
|
|
400
|
-
}
|
|
401
|
-
|
|
402
|
-
// Label override for default title or finally built in default
|
|
403
|
-
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
404
|
-
labelOverrides.retiredName ??
|
|
405
|
-
<FormattedMessage id="stripes-kint-components.customProperty.retiredName" values={{ name: customProperty.label }} />
|
|
406
|
-
);
|
|
407
|
-
};
|
|
419
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
408
420
|
|
|
409
421
|
return (
|
|
410
422
|
<>
|
|
411
423
|
<Field
|
|
412
424
|
id={`input-custprop-${index}`}
|
|
413
|
-
label={
|
|
425
|
+
label={
|
|
426
|
+
kintIntl.formatKintMessage({
|
|
427
|
+
id: 'customProperty',
|
|
428
|
+
overrideValue: labelOverrides.customProperty
|
|
429
|
+
})
|
|
430
|
+
}
|
|
414
431
|
name={`${name}.customProperty`}
|
|
415
432
|
placeholder=" "
|
|
416
433
|
render={fieldProps => {
|
|
434
|
+
const sortedGroupedCustProps = Object.entries(groupedCustomProperties)?.sort((a, b) => {
|
|
435
|
+
<span class="missing-if-branch" title="else path not taken" >E</span>if (a[0] === 'isNull') return -1; // Make sure noContext is at top
|
|
436
|
+
|
|
437
|
+
<span class="cstat-no" title="statement not covered" > if (a[0].toLowerCase() < b[0].toLowerCase()) <span class="cstat-no" title="statement not covered" >return -1;</span></span>
|
|
438
|
+
<span class="cstat-no" title="statement not covered" > if (a[0].toLowerCase() > b[0].toLowerCase()) <span class="cstat-no" title="statement not covered" >return 1;</span></span>
|
|
439
|
+
<span class="cstat-no" title="statement not covered" > return 0;</span>
|
|
440
|
+
});
|
|
441
|
+
|
|
417
442
|
return (
|
|
418
443
|
<Select
|
|
419
444
|
{...fieldProps}
|
|
420
445
|
placeholder={null} // placeholder default causes issues
|
|
421
446
|
>
|
|
422
|
-
<option value=""> </option>
|
|
447
|
+
<option key="empty-option" value=""> </option>
|
|
423
448
|
{
|
|
424
|
-
|
|
425
|
-
<span class="missing-if-branch" title="else path not taken" >E</span>if (a[0] === 'isNull') return -1; // Make sure noContext is at top
|
|
426
|
-
|
|
427
|
-
<span class="cstat-no" title="statement not covered" > if (a[0].toLowerCase() < b[0].toLowerCase()) <span class="cstat-no" title="statement not covered" >return -1;</span></span>
|
|
428
|
-
<span class="cstat-no" title="statement not covered" > if (a[0].toLowerCase() > b[0].toLowerCase()) <span class="cstat-no" title="statement not covered" >return 1;</span></span>
|
|
429
|
-
<span class="cstat-no" title="statement not covered" > return 0;</span>
|
|
430
|
-
}).map(([key, value]) => {
|
|
449
|
+
sortedGroupedCustProps.map(([key, value]) => {
|
|
431
450
|
return (
|
|
432
451
|
<optgroup
|
|
452
|
+
key={`custom-property-optgroup-${key}`}
|
|
433
453
|
label={key === 'isNull' ? '-' : key}
|
|
434
454
|
>
|
|
435
455
|
{value.map(v => {
|
|
@@ -438,7 +458,13 @@ const CustomPropertiesFilterField = ({
|
|
|
438
458
|
key={v.id}
|
|
439
459
|
value={v.name}
|
|
440
460
|
>
|
|
441
|
-
{v.retired ?
|
|
461
|
+
{v.retired ?
|
|
462
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > kintIntl.formatKintMessage({</span>
|
|
463
|
+
id: 'customProperty.retiredName',
|
|
464
|
+
overrideValue: labelOverrides.retiredName
|
|
465
|
+
}, { name: v.label }) :
|
|
466
|
+
v.label
|
|
467
|
+
}
|
|
442
468
|
</option>
|
|
443
469
|
);
|
|
444
470
|
})}
|
|
@@ -454,6 +480,7 @@ const CustomPropertiesFilterField = ({
|
|
|
454
480
|
/>
|
|
455
481
|
{/* This next div is rendered so that it can be referred to using aria-labelledby */}
|
|
456
482
|
<div
|
|
483
|
+
data-testid={`selected-custprop-name-${index}`}
|
|
457
484
|
id={`selected-custprop-name-${index}`}
|
|
458
485
|
style={{ display: 'none' }}
|
|
459
486
|
>
|
|
@@ -463,24 +490,31 @@ const CustomPropertiesFilterField = ({
|
|
|
463
490
|
<Col xs={2} />
|
|
464
491
|
<Col xs={4}>
|
|
465
492
|
<Label id="rule-column-header-comparator" required>
|
|
466
|
-
|
|
493
|
+
{kintIntl.formatKintMessage({
|
|
494
|
+
id: 'comparator',
|
|
495
|
+
overrideValue: labelOverrides.comparator
|
|
496
|
+
})}
|
|
467
497
|
</Label>
|
|
468
498
|
</Col>
|
|
469
499
|
<Col xs={4}>
|
|
470
500
|
<Label id="rule-column-header-value" required>
|
|
471
|
-
|
|
501
|
+
{kintIntl.formatKintMessage({
|
|
502
|
+
id: 'value',
|
|
503
|
+
overrideValue: labelOverrides.value
|
|
504
|
+
})}
|
|
472
505
|
</Label>
|
|
473
506
|
</Col>
|
|
474
507
|
<Col xs={2} />
|
|
475
508
|
</Row>
|
|
476
509
|
<FieldArray name={`${name}.rules`}>
|
|
477
|
-
{({ fields: ruleFields }) => ruleFields.map(
|
|
478
|
-
|
|
510
|
+
{({ fields: ruleFields }) => ruleFields.map((ruleFieldName, ruleFieldIndex) => (
|
|
511
|
+
<CustomPropertiesRule
|
|
479
512
|
key={ruleFieldName}
|
|
480
513
|
ariaLabelledby={`selected-custprop-name-${index}`}
|
|
481
514
|
clearRuleValue={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >change(`filters[${index}].rules[${ruleFieldIndex}].value`, '')}</span>
|
|
482
|
-
custPropDefinition={customProperties.find(
|
|
515
|
+
custPropDefinition={customProperties.find(t => t.name === fields.value[index].customProperty)}
|
|
483
516
|
index={ruleFieldIndex}
|
|
517
|
+
labelOverrides={labelOverrides}
|
|
484
518
|
name={ruleFieldName}
|
|
485
519
|
onDelete={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >ruleFields.remove(ruleFieldIndex)}</span>
|
|
486
520
|
value={values.filters[index]?.rules[ruleFieldIndex]}
|
|
@@ -492,7 +526,10 @@ const CustomPropertiesFilterField = ({
|
|
|
492
526
|
disabled={!fields.value[index]?.customProperty}
|
|
493
527
|
onClick={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >push(`${name}.rules`)}</span>
|
|
494
528
|
>
|
|
495
|
-
|
|
529
|
+
{kintIntl.formatKintMessage({
|
|
530
|
+
id: 'addRule',
|
|
531
|
+
overrideValue: labelOverrides.addRule
|
|
532
|
+
})}
|
|
496
533
|
</Button>
|
|
497
534
|
</>
|
|
498
535
|
);
|
|
@@ -502,6 +539,8 @@ CustomPropertiesFilterField.propTypes = {
|
|
|
502
539
|
customProperties: PropTypes.arrayOf(PropTypes.object),
|
|
503
540
|
fields: PropTypes.object,
|
|
504
541
|
index: PropTypes.number,
|
|
542
|
+
intlKey: PropTypes.string,
|
|
543
|
+
intlNS: PropTypes.string,
|
|
505
544
|
labelOverrides: PropTypes.object,
|
|
506
545
|
name: PropTypes.string
|
|
507
546
|
};
|
|
@@ -514,7 +553,7 @@ export default CustomPropertiesFilterField;
|
|
|
514
553
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
515
554
|
Code coverage generated by
|
|
516
555
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
517
|
-
at 2022-
|
|
556
|
+
at 2022-12-09T15:17:50.295Z
|
|
518
557
|
</div>
|
|
519
558
|
<script src="../../prettify.js"></script>
|
|
520
559
|
<script>
|