@k-int/stripes-kint-components 2.8.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -3
- package/es/index.js +48 -12
- package/es/lib/ActionList/ActionList.js +11 -5
- package/es/lib/ActionList/ActionListFieldArray.js +147 -77
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +43 -31
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +17 -14
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +64 -46
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +17 -24
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +91 -70
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +53 -36
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +50 -31
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +13 -14
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +8 -12
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +22 -24
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +9 -12
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +62 -13
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +12 -13
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +91 -44
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +80 -73
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +31 -32
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +26 -24
- package/es/lib/CustomProperties/Edit/testResources.js +73 -908
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +21 -29
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +12 -10
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +38 -39
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +28 -13
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +29 -44
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +6 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +16 -10
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +12 -12
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +20 -11
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +4 -3
- package/es/lib/CustomProperties/Filter/testResources.js +37 -233
- package/es/lib/CustomProperties/Filter/useOperators.js +69 -27
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +3 -2
- package/es/lib/CustomProperties/Filter/useValueProps.js +7 -2
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +6 -0
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +4 -3
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +13 -19
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +4 -10
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +34 -51
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +35 -27
- package/es/lib/EditableRefdataList/EditableRefdataList.js +41 -31
- package/es/lib/EditableSettingsList/EditableSettingsList.js +11 -1
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +10 -0
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +19 -11
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +9 -8
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +21 -9
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -0
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +83 -16
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +138 -65
- package/es/lib/FormModal/FormModal.js +14 -9
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +91 -0
- package/es/lib/FormattedKintMessage/index.js +15 -0
- package/es/lib/IconSelect/IconSelect.js +18 -12
- package/es/lib/NoResultsMessage/NoResultsMessage.js +13 -2
- package/es/lib/RichSelect/RichSelect.js +13 -34
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +16 -5
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +11 -1
- package/es/lib/SettingPage/SettingPage.js +12 -13
- package/es/lib/SettingPage/SettingPagePane.js +12 -20
- package/es/lib/hooks/__mocks__/index.js +46 -0
- package/es/lib/hooks/index.js +24 -8
- package/es/lib/hooks/settingsHooks/useSettings.js +22 -17
- package/es/lib/hooks/useIntlKey.js +34 -0
- package/es/lib/hooks/useIntlKeyStore.js +84 -0
- package/es/lib/hooks/useKintIntl.js +93 -0
- package/es/lib/utils/index.js +40 -4
- package/es/lib/utils/parseErrorResponse.js +1 -1
- package/es/lib/utils/validators.js +76 -59
- package/jest.config.js +4 -1
- package/junit.xml +157 -656
- package/package.json +54 -33
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +56 -8
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +394 -64
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +187 -52
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +372 -87
- 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 +45 -60
- 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 +59 -47
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +259 -97
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +399 -105
- 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 +57 -57
- 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 +67 -688
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +92 -53
- 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 +89 -89
- 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 +46 -46
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +45 -36
- 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 +50 -41
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +54 -75
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +24 -24
- 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/{hooks/useAvailableCustomProperties.js.html → CycleButton/CycleButton.js.html} +62 -50
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +664 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +264 -39
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +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 +247 -0
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/{CustomProperties/Config/CustomPropertiesView.js.html → IconSelect/IconSelect.js.html} +158 -257
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +48 -6
- 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/{CustomProperties/Config/testResources.js.html → RichSelect/RichSelect.js.html} +256 -334
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +91 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +127 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +52 -7
- 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 +7 -7
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +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 +2 -2
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +142 -97
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +13 -4
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +35 -20
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +5 -2
- 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 +19 -22
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +151 -0
- package/src/artifacts/coverage-jest/lcov-report/{utils/renderHelpText.js.html → hooks/useIntlKeyStore.js.html} +71 -38
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +238 -0
- 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 +23 -11
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +274 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +19 -10
- 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/useTemplates.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/index.html +205 -130
- package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +2 -2
- 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 +34 -34
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +42 -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 +139 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +5 -2
- 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 +128 -80
- package/src/artifacts/coverage-jest/lcov.info +2603 -2086
- package/src/index.js +11 -4
- package/src/lib/ActionList/ActionList.js +9 -3
- package/src/lib/ActionList/ActionListFieldArray.js +115 -37
- package/src/lib/ActionList/README.md +2 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +60 -16
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +14 -4
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +106 -33
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +16 -9
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +131 -58
- package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +52 -33
- package/src/lib/CustomProperties/Config/CustomPropertyView.js +71 -47
- package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +8 -6
- package/src/lib/CustomProperties/Config/README.md +33 -28
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +7 -3
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +23 -19
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +5 -3
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +65 -11
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +10 -8
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +115 -21
- package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +59 -60
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +24 -33
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +20 -27
- package/src/lib/CustomProperties/Edit/testResources.js +46 -1047
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +22 -22
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +12 -8
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +44 -31
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +26 -13
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +33 -36
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +3 -3
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +19 -8
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +9 -12
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.js +22 -5
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +3 -1
- package/src/lib/CustomProperties/Filter/testResources.js +14 -265
- package/src/lib/CustomProperties/Filter/useOperators.js +20 -20
- package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -2
- package/src/lib/CustomProperties/Filter/useValueProps.js +8 -3
- package/src/lib/CustomProperties/View/CustomPropertiesView.js +6 -0
- package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +2 -1
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js +15 -13
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +2 -5
- package/src/lib/CustomProperties/View/CustomPropertyCard.js +36 -43
- package/src/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +45 -27
- package/src/lib/EditableRefdataList/EditableRefdataList.js +56 -32
- package/src/lib/EditableSettingsList/EditableSettingsList.js +10 -1
- package/src/lib/EditableSettingsList/EditableSettingsListFieldArray.js +14 -1
- package/src/lib/EditableSettingsList/SettingField/EditSettingValue.js +17 -5
- package/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +9 -8
- package/src/lib/EditableSettingsList/SettingField/RenderSettingValue.js +24 -7
- package/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -0
- package/src/lib/EditableSettingsList/SettingField/SettingField.js +57 -16
- package/src/lib/EditableSettingsList/SettingField/SettingField.test.js +14 -19
- package/src/lib/FormModal/FormModal.js +15 -9
- package/src/lib/FormattedKintMessage/FormattedKintMessage.js +54 -0
- package/src/lib/FormattedKintMessage/index.js +1 -0
- package/src/lib/IconSelect/IconSelect.js +17 -8
- package/src/lib/NoResultsMessage/NoResultsMessage.js +15 -1
- package/src/lib/RichSelect/RichSelect.js +16 -36
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +17 -2
- package/src/lib/SASQLookupComponent/TableBody/TableBody.js +10 -1
- package/src/lib/SettingPage/SettingPage.js +12 -13
- package/src/lib/SettingPage/SettingPagePane.js +16 -6
- package/src/lib/hooks/__mocks__/index.js +17 -0
- package/src/lib/hooks/index.js +3 -1
- package/src/lib/hooks/settingsHooks/useSettings.js +25 -12
- package/src/lib/hooks/useIntlKey.js +22 -0
- package/src/lib/hooks/useIntlKeyStore.js +38 -0
- package/src/lib/hooks/useKintIntl.js +51 -0
- package/src/lib/utils/index.js +11 -1
- package/src/lib/utils/parseErrorResponse.js +1 -1
- package/src/lib/utils/validators.js +57 -41
- package/styles/RichSelect.css +7 -4
- package/test/helpers/test-implementor-translations.json +80 -0
- package/test/helpers/translationsProperties.js +6 -1
- package/test/jest/customProperties.js +166 -0
- package/test/jest/helpers/KintHarness.js +1 -1
- package/test/jest/helpers/renderWithKintHarness.js +2 -1
- package/test/jest/index.js +8 -0
- package/test/jest/refdata.js +471 -0
- package/test/jest/resolver.js +29 -0
- package/translations/stripes-kint-components/ar.json +1 -122
- package/translations/stripes-kint-components/cs_CZ.json +1 -122
- package/translations/stripes-kint-components/de.json +1 -122
- package/translations/stripes-kint-components/en.json +1 -148
- package/translations/stripes-kint-components/es.json +1 -122
- package/translations/stripes-kint-components/hi_IN.json +1 -122
- package/translations/stripes-kint-components/hu.json +1 -122
- package/translations/stripes-kint-components/it_IT.json +1 -122
- package/translations/stripes-kint-components/ja.json +1 -122
- package/translations/stripes-kint-components/ko.json +1 -122
- package/translations/stripes-kint-components/pt_PT.json +1 -122
- package/translations/stripes-kint-components/ru.json +1 -122
- package/translations/stripes-kint-components/sv.json +1 -122
- package/translations/stripes-kint-components/zh_CN.json +1 -122
- package/es/lib/CustomProperties/Config/testResources.js +0 -198
- package/es/lib/hooks/useAvailableCustomProperties.js +0 -73
- package/es/lib/utils/renderHelpText.js +0 -80
- package/src/lib/CustomProperties/Config/testResources.js +0 -236
- package/src/lib/hooks/useAvailableCustomProperties.js +0 -40
- package/src/lib/utils/renderHelpText.js +0 -27
|
@@ -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
|
|
556
|
+
at 2022-09-16T13:23:25.290Z
|
|
518
557
|
</div>
|
|
519
558
|
<script src="../../prettify.js"></script>
|
|
520
559
|
<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">60% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>6/10</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">33.33% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>1/3</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">33.33% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>2/
|
|
42
|
+
<span class='fraction'>2/6</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">60% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>6/10</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line medium'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -173,11 +173,7 @@
|
|
|
173
173
|
<a name='L108'></a><a href='#L108'>108</a>
|
|
174
174
|
<a name='L109'></a><a href='#L109'>109</a>
|
|
175
175
|
<a name='L110'></a><a href='#L110'>110</a>
|
|
176
|
-
<a name='L111'></a><a href='#L111'>111</a>
|
|
177
|
-
<a name='L112'></a><a href='#L112'>112</a>
|
|
178
|
-
<a name='L113'></a><a href='#L113'>113</a>
|
|
179
|
-
<a name='L114'></a><a href='#L114'>114</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
180
|
-
<span class="cline-any cline-neutral"> </span>
|
|
176
|
+
<a name='L111'></a><a href='#L111'>111</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
181
177
|
<span class="cline-any cline-neutral"> </span>
|
|
182
178
|
<span class="cline-any cline-neutral"> </span>
|
|
183
179
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -197,25 +193,23 @@
|
|
|
197
193
|
<span class="cline-any cline-neutral"> </span>
|
|
198
194
|
<span class="cline-any cline-neutral"> </span>
|
|
199
195
|
<span class="cline-any cline-neutral"> </span>
|
|
196
|
+
<span class="cline-any cline-neutral"> </span>
|
|
197
|
+
<span class="cline-any cline-neutral"> </span>
|
|
198
|
+
<span class="cline-any cline-yes">3x</span>
|
|
200
199
|
<span class="cline-any cline-yes">3x</span>
|
|
201
200
|
<span class="cline-any cline-neutral"> </span>
|
|
202
201
|
<span class="cline-any cline-yes">3x</span>
|
|
203
|
-
<span class="cline-any cline-no"> </span>
|
|
204
|
-
<span class="cline-any cline-no"> </span>
|
|
205
202
|
<span class="cline-any cline-neutral"> </span>
|
|
206
203
|
<span class="cline-any cline-neutral"> </span>
|
|
204
|
+
<span class="cline-any cline-yes">3x</span>
|
|
207
205
|
<span class="cline-any cline-no"> </span>
|
|
208
206
|
<span class="cline-any cline-neutral"> </span>
|
|
209
207
|
<span class="cline-any cline-neutral"> </span>
|
|
210
208
|
<span class="cline-any cline-neutral"> </span>
|
|
211
209
|
<span class="cline-any cline-neutral"> </span>
|
|
212
210
|
<span class="cline-any cline-neutral"> </span>
|
|
213
|
-
<span class="cline-any cline-yes">3x</span>
|
|
214
|
-
<span class="cline-any cline-no"> </span>
|
|
215
|
-
<span class="cline-any cline-no"> </span>
|
|
216
211
|
<span class="cline-any cline-neutral"> </span>
|
|
217
212
|
<span class="cline-any cline-neutral"> </span>
|
|
218
|
-
<span class="cline-any cline-no"> </span>
|
|
219
213
|
<span class="cline-any cline-neutral"> </span>
|
|
220
214
|
<span class="cline-any cline-neutral"> </span>
|
|
221
215
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -223,13 +217,13 @@
|
|
|
223
217
|
<span class="cline-any cline-neutral"> </span>
|
|
224
218
|
<span class="cline-any cline-neutral"> </span>
|
|
225
219
|
<span class="cline-any cline-neutral"> </span>
|
|
226
|
-
<span class="cline-any cline-
|
|
220
|
+
<span class="cline-any cline-no"> </span>
|
|
227
221
|
<span class="cline-any cline-neutral"> </span>
|
|
228
222
|
<span class="cline-any cline-neutral"> </span>
|
|
229
|
-
<span class="cline-any cline-yes">3x</span>
|
|
230
|
-
<span class="cline-any cline-no"> </span>
|
|
231
223
|
<span class="cline-any cline-neutral"> </span>
|
|
232
224
|
<span class="cline-any cline-neutral"> </span>
|
|
225
|
+
<span class="cline-any cline-no"> </span>
|
|
226
|
+
<span class="cline-any cline-neutral"> </span>
|
|
233
227
|
<span class="cline-any cline-neutral"> </span>
|
|
234
228
|
<span class="cline-any cline-neutral"> </span>
|
|
235
229
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -237,12 +231,10 @@
|
|
|
237
231
|
<span class="cline-any cline-neutral"> </span>
|
|
238
232
|
<span class="cline-any cline-neutral"> </span>
|
|
239
233
|
<span class="cline-any cline-neutral"> </span>
|
|
240
|
-
<span class="cline-any cline-no"> </span>
|
|
241
234
|
<span class="cline-any cline-neutral"> </span>
|
|
242
235
|
<span class="cline-any cline-neutral"> </span>
|
|
243
236
|
<span class="cline-any cline-neutral"> </span>
|
|
244
237
|
<span class="cline-any cline-neutral"> </span>
|
|
245
|
-
<span class="cline-any cline-no"> </span>
|
|
246
238
|
<span class="cline-any cline-neutral"> </span>
|
|
247
239
|
<span class="cline-any cline-neutral"> </span>
|
|
248
240
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -289,10 +281,10 @@
|
|
|
289
281
|
<span class="cline-any cline-neutral"> </span>
|
|
290
282
|
<span class="cline-any cline-neutral"> </span>
|
|
291
283
|
<span class="cline-any cline-neutral"> </span>
|
|
284
|
+
<span class="cline-any cline-neutral"> </span>
|
|
285
|
+
<span class="cline-any cline-neutral"> </span>
|
|
292
286
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import PropTypes from 'prop-types';
|
|
293
287
|
|
|
294
|
-
import { FormattedMessage } from 'react-intl';
|
|
295
|
-
|
|
296
288
|
import { useForm } from 'react-final-form';
|
|
297
289
|
import { FieldArray } from 'react-final-form-arrays';
|
|
298
290
|
|
|
@@ -305,49 +297,34 @@ import {
|
|
|
305
297
|
} from '@folio/stripes/components';
|
|
306
298
|
|
|
307
299
|
import CustomPropertiesFilterField from './CustomPropertiesFilterField';
|
|
300
|
+
import { useKintIntl } from '../../hooks';
|
|
308
301
|
|
|
309
302
|
const CustomPropertiesFilterFieldArray = ({
|
|
310
303
|
customProperties,
|
|
311
|
-
|
|
304
|
+
intlKey: passedIntlKey,
|
|
305
|
+
intlNS: passedIntlNS,
|
|
306
|
+
labelOverrides = {},
|
|
312
307
|
}) => {
|
|
313
308
|
const { mutators: { push } } = useForm();
|
|
309
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
314
310
|
|
|
315
|
-
const getCardTitle = <span class="fstat-no" title="function not covered" >(i</span>ndex) => {
|
|
316
|
-
<span class="cstat-no" title="statement not covered" > if (labelOverrides.customPropertyFilter && typeof labelOverrides.customPropertyFilter === 'function') {</span>
|
|
317
|
-
<span class="cstat-no" title="statement not covered" > return labelOverrides.customPropertyFilter(index);</span>
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
321
|
-
labelOverrides.customPropertyFilter ??
|
|
322
|
-
<FormattedMessage id="stripes-kint-components.customProperty.filterIndex" values={{ index: index + 1 }} />
|
|
323
|
-
);
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
const getTooltipText = <span class="fstat-no" title="function not covered" >(i</span>ndex) => {
|
|
327
|
-
<span class="cstat-no" title="statement not covered" > if (labelOverrides.removeFilter && typeof labelOverrides.removeFilter === 'function') {</span>
|
|
328
|
-
<span class="cstat-no" title="statement not covered" > return labelOverrides.removeFilter(index);</span>
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
332
|
-
labelOverrides.removeFilter ??
|
|
333
|
-
<FormattedMessage
|
|
334
|
-
id="stripes-kint-components.customProperty.removeFilter"
|
|
335
|
-
values={{ number: index + 1 }}
|
|
336
|
-
/>
|
|
337
|
-
);
|
|
338
|
-
};
|
|
339
311
|
return (
|
|
340
312
|
<>
|
|
341
313
|
<FieldArray name="filters">
|
|
342
314
|
{({ fields }) => fields.map(<span class="fstat-no" title="function not covered" >(n</span>ame, index) => {
|
|
343
315
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
344
|
-
<
|
|
316
|
+
<div key={`custom-property-filter-card[${index}]-container`}>
|
|
345
317
|
<Card
|
|
346
318
|
key={`custom-property-filter-card[${index}]`}
|
|
347
319
|
headerEnd={
|
|
348
320
|
<Tooltip
|
|
349
321
|
id={`custom-property-filter-card-delete-[${index}]-tooltip`}
|
|
350
|
-
text={
|
|
322
|
+
text={
|
|
323
|
+
kintIntl.formatKintMessage({
|
|
324
|
+
id: 'customProperty.removeFilter',
|
|
325
|
+
overrideValue: labelOverrides.removeFilter
|
|
326
|
+
}, { index: index + 1 })
|
|
327
|
+
}
|
|
351
328
|
>
|
|
352
329
|
{<span class="fstat-no" title="function not covered" >({</span> ref, ariaIds }) => (
|
|
353
330
|
<span class="cstat-no" title="statement not covered" > <IconButton</span>
|
|
@@ -362,12 +339,18 @@ const CustomPropertiesFilterFieldArray = ({
|
|
|
362
339
|
}
|
|
363
340
|
headerStart={
|
|
364
341
|
<strong>
|
|
365
|
-
{
|
|
342
|
+
{
|
|
343
|
+
kintIntl.formatKintMessage({
|
|
344
|
+
id: 'customProperty.filterIndex',
|
|
345
|
+
overrideValue: labelOverrides.customPropertyFilter
|
|
346
|
+
}, { index: index + 1 })
|
|
347
|
+
}
|
|
366
348
|
</strong>
|
|
367
349
|
}
|
|
368
350
|
marginBottom0={index !== fields.length - 1}
|
|
369
351
|
>
|
|
370
352
|
<CustomPropertiesFilterField
|
|
353
|
+
key={`custom-property-filter-field-${name}[${index}]`}
|
|
371
354
|
customProperties={customProperties}
|
|
372
355
|
fields={fields}
|
|
373
356
|
index={index}
|
|
@@ -376,21 +359,27 @@ const CustomPropertiesFilterFieldArray = ({
|
|
|
376
359
|
/>
|
|
377
360
|
</Card>
|
|
378
361
|
{index < fields.value.length - 1 && (
|
|
379
|
-
<Layout
|
|
380
|
-
|
|
362
|
+
<Layout
|
|
363
|
+
key={`custom-property-filter[${index}]-AND`}
|
|
364
|
+
className="textCentered"
|
|
365
|
+
>
|
|
366
|
+
{kintIntl.formatKintMessage({
|
|
367
|
+
id: 'AND',
|
|
368
|
+
overrideValue: labelOverrides.AND
|
|
369
|
+
})}
|
|
381
370
|
</Layout>
|
|
382
371
|
)}
|
|
383
|
-
<
|
|
372
|
+
</div>
|
|
384
373
|
);
|
|
385
374
|
})}
|
|
386
375
|
</FieldArray>
|
|
387
376
|
<Button
|
|
388
377
|
onClick={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >push('filters', { rules: [{}] })}</span>
|
|
389
378
|
>
|
|
390
|
-
{
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
379
|
+
{kintIntl.formatKintMessage({
|
|
380
|
+
id: 'customProperty.addFilter',
|
|
381
|
+
overrideValue: labelOverrides.addFilter
|
|
382
|
+
})}
|
|
394
383
|
</Button>
|
|
395
384
|
</>
|
|
396
385
|
);
|
|
@@ -398,6 +387,8 @@ const CustomPropertiesFilterFieldArray = ({
|
|
|
398
387
|
|
|
399
388
|
CustomPropertiesFilterFieldArray.propTypes = {
|
|
400
389
|
customProperties: PropTypes.arrayOf(PropTypes.object),
|
|
390
|
+
intlKey: PropTypes.string,
|
|
391
|
+
intlNS: PropTypes.string,
|
|
401
392
|
labelOverrides: PropTypes.object
|
|
402
393
|
};
|
|
403
394
|
|
|
@@ -409,7 +400,7 @@ export default CustomPropertiesFilterFieldArray;
|
|
|
409
400
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
410
401
|
Code coverage generated by
|
|
411
402
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
412
|
-
at
|
|
403
|
+
at 2022-09-16T13:23:25.290Z
|
|
413
404
|
</div>
|
|
414
405
|
<script src="../../prettify.js"></script>
|
|
415
406
|
<script>
|