@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
package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html
CHANGED
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/41</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/20</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/17</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/40</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -203,7 +203,83 @@
|
|
|
203
203
|
<a name='L138'></a><a href='#L138'>138</a>
|
|
204
204
|
<a name='L139'></a><a href='#L139'>139</a>
|
|
205
205
|
<a name='L140'></a><a href='#L140'>140</a>
|
|
206
|
-
<a name='L141'></a><a href='#L141'>141</a
|
|
206
|
+
<a name='L141'></a><a href='#L141'>141</a>
|
|
207
|
+
<a name='L142'></a><a href='#L142'>142</a>
|
|
208
|
+
<a name='L143'></a><a href='#L143'>143</a>
|
|
209
|
+
<a name='L144'></a><a href='#L144'>144</a>
|
|
210
|
+
<a name='L145'></a><a href='#L145'>145</a>
|
|
211
|
+
<a name='L146'></a><a href='#L146'>146</a>
|
|
212
|
+
<a name='L147'></a><a href='#L147'>147</a>
|
|
213
|
+
<a name='L148'></a><a href='#L148'>148</a>
|
|
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>
|
|
228
|
+
<a name='L163'></a><a href='#L163'>163</a>
|
|
229
|
+
<a name='L164'></a><a href='#L164'>164</a>
|
|
230
|
+
<a name='L165'></a><a href='#L165'>165</a>
|
|
231
|
+
<a name='L166'></a><a href='#L166'>166</a>
|
|
232
|
+
<a name='L167'></a><a href='#L167'>167</a>
|
|
233
|
+
<a name='L168'></a><a href='#L168'>168</a>
|
|
234
|
+
<a name='L169'></a><a href='#L169'>169</a>
|
|
235
|
+
<a name='L170'></a><a href='#L170'>170</a>
|
|
236
|
+
<a name='L171'></a><a href='#L171'>171</a>
|
|
237
|
+
<a name='L172'></a><a href='#L172'>172</a>
|
|
238
|
+
<a name='L173'></a><a href='#L173'>173</a>
|
|
239
|
+
<a name='L174'></a><a href='#L174'>174</a>
|
|
240
|
+
<a name='L175'></a><a href='#L175'>175</a>
|
|
241
|
+
<a name='L176'></a><a href='#L176'>176</a>
|
|
242
|
+
<a name='L177'></a><a href='#L177'>177</a>
|
|
243
|
+
<a name='L178'></a><a href='#L178'>178</a>
|
|
244
|
+
<a name='L179'></a><a href='#L179'>179</a>
|
|
245
|
+
<a name='L180'></a><a href='#L180'>180</a>
|
|
246
|
+
<a name='L181'></a><a href='#L181'>181</a>
|
|
247
|
+
<a name='L182'></a><a href='#L182'>182</a>
|
|
248
|
+
<a name='L183'></a><a href='#L183'>183</a>
|
|
249
|
+
<a name='L184'></a><a href='#L184'>184</a>
|
|
250
|
+
<a name='L185'></a><a href='#L185'>185</a>
|
|
251
|
+
<a name='L186'></a><a href='#L186'>186</a>
|
|
252
|
+
<a name='L187'></a><a href='#L187'>187</a>
|
|
253
|
+
<a name='L188'></a><a href='#L188'>188</a>
|
|
254
|
+
<a name='L189'></a><a href='#L189'>189</a>
|
|
255
|
+
<a name='L190'></a><a href='#L190'>190</a>
|
|
256
|
+
<a name='L191'></a><a href='#L191'>191</a>
|
|
257
|
+
<a name='L192'></a><a href='#L192'>192</a>
|
|
258
|
+
<a name='L193'></a><a href='#L193'>193</a>
|
|
259
|
+
<a name='L194'></a><a href='#L194'>194</a>
|
|
260
|
+
<a name='L195'></a><a href='#L195'>195</a>
|
|
261
|
+
<a name='L196'></a><a href='#L196'>196</a>
|
|
262
|
+
<a name='L197'></a><a href='#L197'>197</a>
|
|
263
|
+
<a name='L198'></a><a href='#L198'>198</a>
|
|
264
|
+
<a name='L199'></a><a href='#L199'>199</a>
|
|
265
|
+
<a name='L200'></a><a href='#L200'>200</a>
|
|
266
|
+
<a name='L201'></a><a href='#L201'>201</a>
|
|
267
|
+
<a name='L202'></a><a href='#L202'>202</a>
|
|
268
|
+
<a name='L203'></a><a href='#L203'>203</a>
|
|
269
|
+
<a name='L204'></a><a href='#L204'>204</a>
|
|
270
|
+
<a name='L205'></a><a href='#L205'>205</a>
|
|
271
|
+
<a name='L206'></a><a href='#L206'>206</a>
|
|
272
|
+
<a name='L207'></a><a href='#L207'>207</a>
|
|
273
|
+
<a name='L208'></a><a href='#L208'>208</a>
|
|
274
|
+
<a name='L209'></a><a href='#L209'>209</a>
|
|
275
|
+
<a name='L210'></a><a href='#L210'>210</a>
|
|
276
|
+
<a name='L211'></a><a href='#L211'>211</a>
|
|
277
|
+
<a name='L212'></a><a href='#L212'>212</a>
|
|
278
|
+
<a name='L213'></a><a href='#L213'>213</a>
|
|
279
|
+
<a name='L214'></a><a href='#L214'>214</a>
|
|
280
|
+
<a name='L215'></a><a href='#L215'>215</a>
|
|
281
|
+
<a name='L216'></a><a href='#L216'>216</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
282
|
+
<span class="cline-any cline-neutral"> </span>
|
|
207
283
|
<span class="cline-any cline-neutral"> </span>
|
|
208
284
|
<span class="cline-any cline-neutral"> </span>
|
|
209
285
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -220,8 +296,26 @@
|
|
|
220
296
|
<span class="cline-any cline-neutral"> </span>
|
|
221
297
|
<span class="cline-any cline-neutral"> </span>
|
|
222
298
|
<span class="cline-any cline-neutral"> </span>
|
|
299
|
+
<span class="cline-any cline-neutral"> </span>
|
|
300
|
+
<span class="cline-any cline-neutral"> </span>
|
|
301
|
+
<span class="cline-any cline-neutral"> </span>
|
|
302
|
+
<span class="cline-any cline-neutral"> </span>
|
|
303
|
+
<span class="cline-any cline-neutral"> </span>
|
|
304
|
+
<span class="cline-any cline-neutral"> </span>
|
|
305
|
+
<span class="cline-any cline-neutral"> </span>
|
|
306
|
+
<span class="cline-any cline-neutral"> </span>
|
|
223
307
|
<span class="cline-any cline-no"> </span>
|
|
224
308
|
<span class="cline-any cline-neutral"> </span>
|
|
309
|
+
<span class="cline-any cline-neutral"> </span>
|
|
310
|
+
<span class="cline-any cline-neutral"> </span>
|
|
311
|
+
<span class="cline-any cline-neutral"> </span>
|
|
312
|
+
<span class="cline-any cline-neutral"> </span>
|
|
313
|
+
<span class="cline-any cline-neutral"> </span>
|
|
314
|
+
<span class="cline-any cline-neutral"> </span>
|
|
315
|
+
<span class="cline-any cline-neutral"> </span>
|
|
316
|
+
<span class="cline-any cline-neutral"> </span>
|
|
317
|
+
<span class="cline-any cline-neutral"> </span>
|
|
318
|
+
<span class="cline-any cline-no"> </span>
|
|
225
319
|
<span class="cline-any cline-no"> </span>
|
|
226
320
|
<span class="cline-any cline-neutral"> </span>
|
|
227
321
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -248,11 +342,40 @@
|
|
|
248
342
|
<span class="cline-any cline-neutral"> </span>
|
|
249
343
|
<span class="cline-any cline-no"> </span>
|
|
250
344
|
<span class="cline-any cline-neutral"> </span>
|
|
345
|
+
<span class="cline-any cline-neutral"> </span>
|
|
346
|
+
<span class="cline-any cline-no"> </span>
|
|
251
347
|
<span class="cline-any cline-no"> </span>
|
|
252
348
|
<span class="cline-any cline-no"> </span>
|
|
253
349
|
<span class="cline-any cline-neutral"> </span>
|
|
254
350
|
<span class="cline-any cline-neutral"> </span>
|
|
255
351
|
<span class="cline-any cline-neutral"> </span>
|
|
352
|
+
<span class="cline-any cline-no"> </span>
|
|
353
|
+
<span class="cline-any cline-no"> </span>
|
|
354
|
+
<span class="cline-any cline-no"> </span>
|
|
355
|
+
<span class="cline-any cline-neutral"> </span>
|
|
356
|
+
<span class="cline-any cline-neutral"> </span>
|
|
357
|
+
<span class="cline-any cline-neutral"> </span>
|
|
358
|
+
<span class="cline-any cline-neutral"> </span>
|
|
359
|
+
<span class="cline-any cline-neutral"> </span>
|
|
360
|
+
<span class="cline-any cline-neutral"> </span>
|
|
361
|
+
<span class="cline-any cline-neutral"> </span>
|
|
362
|
+
<span class="cline-any cline-no"> </span>
|
|
363
|
+
<span class="cline-any cline-no"> </span>
|
|
364
|
+
<span class="cline-any cline-neutral"> </span>
|
|
365
|
+
<span class="cline-any cline-neutral"> </span>
|
|
366
|
+
<span class="cline-any cline-neutral"> </span>
|
|
367
|
+
<span class="cline-any cline-neutral"> </span>
|
|
368
|
+
<span class="cline-any cline-neutral"> </span>
|
|
369
|
+
<span class="cline-any cline-neutral"> </span>
|
|
370
|
+
<span class="cline-any cline-neutral"> </span>
|
|
371
|
+
<span class="cline-any cline-neutral"> </span>
|
|
372
|
+
<span class="cline-any cline-neutral"> </span>
|
|
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>
|
|
377
|
+
<span class="cline-any cline-neutral"> </span>
|
|
378
|
+
<span class="cline-any cline-neutral"> </span>
|
|
256
379
|
<span class="cline-any cline-neutral"> </span>
|
|
257
380
|
<span class="cline-any cline-neutral"> </span>
|
|
258
381
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -274,7 +397,17 @@
|
|
|
274
397
|
<span class="cline-any cline-neutral"> </span>
|
|
275
398
|
<span class="cline-any cline-neutral"> </span>
|
|
276
399
|
<span class="cline-any cline-neutral"> </span>
|
|
400
|
+
<span class="cline-any cline-neutral"> </span>
|
|
401
|
+
<span class="cline-any cline-neutral"> </span>
|
|
402
|
+
<span class="cline-any cline-neutral"> </span>
|
|
277
403
|
<span class="cline-any cline-no"> </span>
|
|
404
|
+
<span class="cline-any cline-no"> </span>
|
|
405
|
+
<span class="cline-any cline-neutral"> </span>
|
|
406
|
+
<span class="cline-any cline-neutral"> </span>
|
|
407
|
+
<span class="cline-any cline-neutral"> </span>
|
|
408
|
+
<span class="cline-any cline-neutral"> </span>
|
|
409
|
+
<span class="cline-any cline-neutral"> </span>
|
|
410
|
+
<span class="cline-any cline-neutral"> </span>
|
|
278
411
|
<span class="cline-any cline-neutral"> </span>
|
|
279
412
|
<span class="cline-any cline-neutral"> </span>
|
|
280
413
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -283,9 +416,19 @@
|
|
|
283
416
|
<span class="cline-any cline-neutral"> </span>
|
|
284
417
|
<span class="cline-any cline-neutral"> </span>
|
|
285
418
|
<span class="cline-any cline-neutral"> </span>
|
|
419
|
+
<span class="cline-any cline-neutral"> </span>
|
|
420
|
+
<span class="cline-any cline-neutral"> </span>
|
|
421
|
+
<span class="cline-any cline-neutral"> </span>
|
|
422
|
+
<span class="cline-any cline-no"> </span>
|
|
286
423
|
<span class="cline-any cline-no"> </span>
|
|
287
424
|
<span class="cline-any cline-neutral"> </span>
|
|
288
425
|
<span class="cline-any cline-neutral"> </span>
|
|
426
|
+
<span class="cline-any cline-neutral"> </span>
|
|
427
|
+
<span class="cline-any cline-neutral"> </span>
|
|
428
|
+
<span class="cline-any cline-neutral"> </span>
|
|
429
|
+
<span class="cline-any cline-neutral"> </span>
|
|
430
|
+
<span class="cline-any cline-neutral"> </span>
|
|
431
|
+
<span class="cline-any cline-neutral"> </span>
|
|
289
432
|
<span class="cline-any cline-no"> </span>
|
|
290
433
|
<span class="cline-any cline-neutral"> </span>
|
|
291
434
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -299,6 +442,12 @@
|
|
|
299
442
|
<span class="cline-any cline-neutral"> </span>
|
|
300
443
|
<span class="cline-any cline-neutral"> </span>
|
|
301
444
|
<span class="cline-any cline-neutral"> </span>
|
|
445
|
+
<span class="cline-any cline-neutral"> </span>
|
|
446
|
+
<span class="cline-any cline-neutral"> </span>
|
|
447
|
+
<span class="cline-any cline-neutral"> </span>
|
|
448
|
+
<span class="cline-any cline-neutral"> </span>
|
|
449
|
+
<span class="cline-any cline-neutral"> </span>
|
|
450
|
+
<span class="cline-any cline-neutral"> </span>
|
|
302
451
|
<span class="cline-any cline-no"> </span>
|
|
303
452
|
<span class="cline-any cline-neutral"> </span>
|
|
304
453
|
<span class="cline-any cline-no"> </span>
|
|
@@ -307,6 +456,7 @@
|
|
|
307
456
|
<span class="cline-any cline-neutral"> </span>
|
|
308
457
|
<span class="cline-any cline-neutral"> </span>
|
|
309
458
|
<span class="cline-any cline-neutral"> </span>
|
|
459
|
+
<span class="cline-any cline-no"> </span>
|
|
310
460
|
<span class="cline-any cline-neutral"> </span>
|
|
311
461
|
<span class="cline-any cline-neutral"> </span>
|
|
312
462
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -321,9 +471,7 @@
|
|
|
321
471
|
<span class="cline-any cline-neutral"> </span>
|
|
322
472
|
<span class="cline-any cline-neutral"> </span>
|
|
323
473
|
<span class="cline-any cline-neutral"> </span>
|
|
324
|
-
<span class="cline-any cline-no"> </span>
|
|
325
474
|
<span class="cline-any cline-neutral"> </span>
|
|
326
|
-
<span class="cline-any cline-no"> </span>
|
|
327
475
|
<span class="cline-any cline-neutral"> </span>
|
|
328
476
|
<span class="cline-any cline-neutral"> </span>
|
|
329
477
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -331,8 +479,10 @@
|
|
|
331
479
|
<span class="cline-any cline-neutral"> </span>
|
|
332
480
|
<span class="cline-any cline-neutral"> </span>
|
|
333
481
|
<span class="cline-any cline-neutral"> </span>
|
|
482
|
+
<span class="cline-any cline-no"> </span>
|
|
334
483
|
<span class="cline-any cline-neutral"> </span>
|
|
335
484
|
<span class="cline-any cline-no"> </span>
|
|
485
|
+
<span class="cline-any cline-no"> </span>
|
|
336
486
|
<span class="cline-any cline-neutral"> </span>
|
|
337
487
|
<span class="cline-any cline-neutral"> </span>
|
|
338
488
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -345,24 +495,43 @@
|
|
|
345
495
|
<span class="cline-any cline-neutral"> </span>
|
|
346
496
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useEffect, useState, useContext } from 'react';
|
|
347
497
|
import PropTypes from 'prop-types';
|
|
348
|
-
import { FormattedMessage } from 'react-intl';
|
|
349
498
|
|
|
350
499
|
import { ConfirmationModal } from '@folio/stripes/components';
|
|
351
500
|
import { CalloutContext } from '@folio/stripes/core';
|
|
352
501
|
|
|
353
|
-
import { useMutateRefdataValue, useRefdata } from '../hooks';
|
|
502
|
+
import { useKintIntl, useMutateRefdataValue, useRefdata } from '../hooks';
|
|
354
503
|
|
|
355
504
|
import ActionList from '../ActionList';
|
|
505
|
+
import { required } from '../utils/validators';
|
|
506
|
+
import { parseErrorResponse } from '../utils';
|
|
356
507
|
|
|
357
508
|
const propTypes = <span class="cstat-no" title="statement not covered" >{</span>
|
|
509
|
+
afterQueryCalls: PropTypes.object,
|
|
510
|
+
catchQueryCalls: PropTypes.object,
|
|
358
511
|
desc: PropTypes.string,
|
|
359
|
-
|
|
512
|
+
intlKey: PropTypes.string,
|
|
513
|
+
intlNS: PropTypes.string,
|
|
514
|
+
label: PropTypes.oneOfType([
|
|
515
|
+
PropTypes.string,
|
|
516
|
+
PropTypes.node
|
|
517
|
+
]),
|
|
518
|
+
labelOverrides: PropTypes.object,
|
|
360
519
|
refdataEndpoint: PropTypes.string
|
|
361
520
|
};
|
|
362
521
|
|
|
363
|
-
const EditableRefdataList = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span
|
|
522
|
+
const EditableRefdataList = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span></span>
|
|
523
|
+
afterQueryCalls,
|
|
524
|
+
catchQueryCalls,
|
|
525
|
+
desc,
|
|
526
|
+
intlKey: passedIntlKey,
|
|
527
|
+
intlNS: passedIntlNS,
|
|
528
|
+
label,
|
|
529
|
+
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span> // An object containing translation alternatives
|
|
530
|
+
refdataEndpoint
|
|
531
|
+
}) => {
|
|
364
532
|
/* A component that allows for editing of refdata values */
|
|
365
533
|
const callout = <span class="cstat-no" title="statement not covered" >useContext(CalloutContext);</span>
|
|
534
|
+
const kintIntl = <span class="cstat-no" title="statement not covered" >useKintIntl(passedIntlKey, passedIntlNS);</span>
|
|
366
535
|
|
|
367
536
|
// fetch refdata values
|
|
368
537
|
const { data: { 0: refdata } = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span> isLoading: isRefdataLoading } = <span class="cstat-no" title="statement not covered" >useRefdata({</span>
|
|
@@ -388,8 +557,37 @@ const EditableRefdataList = <span class="cstat-no" title="statement not covered"
|
|
|
388
557
|
// Edit and Create will use the same PUT mutation
|
|
389
558
|
const { delete: deleteRefdataValue, put: editRefdataValue } = <span class="cstat-no" title="statement not covered" >useMutateRefdataValue({</span>
|
|
390
559
|
afterQueryCalls: {
|
|
391
|
-
delete: <span class="fstat-no" title="function not covered" >js</span>on =>
|
|
392
|
-
|
|
560
|
+
delete: <span class="fstat-no" title="function not covered" >js</span>on => {
|
|
561
|
+
<span class="cstat-no" title="statement not covered" > setContentData(json?.values?.sort(sortByLabel) ?? []);</span>
|
|
562
|
+
<span class="cstat-no" title="statement not covered" > if (afterQueryCalls?.delete) {</span>
|
|
563
|
+
<span class="cstat-no" title="statement not covered" > afterQueryCalls.delete(json);</span>
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
put: <span class="fstat-no" title="function not covered" >js</span>on => {
|
|
567
|
+
<span class="cstat-no" title="statement not covered" > setContentData(json?.values?.sort(sortByLabel) ?? []);</span>
|
|
568
|
+
<span class="cstat-no" title="statement not covered" > if (afterQueryCalls?.put) {</span>
|
|
569
|
+
<span class="cstat-no" title="statement not covered" > afterQueryCalls.put(json);</span>
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
catchQueryCalls: {
|
|
574
|
+
// Default delete behaviour is to fire a callout, either with kint-components default message
|
|
575
|
+
// or one provided in labelOverrides, which is passed the error message and refdata in question
|
|
576
|
+
delete: <span class="fstat-no" title="function not covered" >as</span>ync (err) => {
|
|
577
|
+
const errorResp = <span class="cstat-no" title="statement not covered" >await parseErrorResponse(err.response);</span>
|
|
578
|
+
<span class="cstat-no" title="statement not covered" > callout.sendCallout({</span>
|
|
579
|
+
message: kintIntl.formatKintMessage({
|
|
580
|
+
id: 'refdata.deleteRefdataValue.errorMessage',
|
|
581
|
+
overrideValue: labelOverrides?.deleteError
|
|
582
|
+
},
|
|
583
|
+
{
|
|
584
|
+
label: deleteModal?.refdata?.label,
|
|
585
|
+
error: errorResp?.message
|
|
586
|
+
}),
|
|
587
|
+
type: 'error',
|
|
588
|
+
});
|
|
589
|
+
},
|
|
590
|
+
...catchQueryCalls // override defaults here
|
|
393
591
|
},
|
|
394
592
|
endpoint: refdataEndpoint,
|
|
395
593
|
id: refdata?.id,
|
|
@@ -412,18 +610,38 @@ const EditableRefdataList = <span class="cstat-no" title="statement not covered"
|
|
|
412
610
|
const actionArray = <span class="cstat-no" title="statement not covered" >[</span>
|
|
413
611
|
{
|
|
414
612
|
name: 'edit',
|
|
415
|
-
label:
|
|
613
|
+
label: kintIntl.formatKintMessage({
|
|
614
|
+
id: 'edit',
|
|
615
|
+
overrideValue: labelOverrides?.edit
|
|
616
|
+
}),
|
|
416
617
|
icon: 'edit',
|
|
417
|
-
callback: <span class="fstat-no" title="function not covered" >(d</span>ata) => <span class="cstat-no" title="statement not covered" >editRefdataValue(data)
|
|
618
|
+
callback: <span class="fstat-no" title="function not covered" >(d</span>ata) => <span class="cstat-no" title="statement not covered" >editRefdataValue(data),</span>
|
|
619
|
+
ariaLabel: <span class="fstat-no" title="function not covered" >(d</span>ata) => <span class="cstat-no" title="statement not covered" >kintIntl.formatKintMessage(</span>
|
|
620
|
+
{
|
|
621
|
+
id: 'refdata.editAriaLabel',
|
|
622
|
+
overrideValue: labelOverrides?.editAriaLabel
|
|
623
|
+
},
|
|
624
|
+
{ label: data?.label }
|
|
625
|
+
),
|
|
418
626
|
}
|
|
419
627
|
];
|
|
420
628
|
|
|
421
629
|
<span class="cstat-no" title="statement not covered" > if (!refdata?.internal) {</span>
|
|
422
630
|
<span class="cstat-no" title="statement not covered" > actionArray.push({</span>
|
|
423
631
|
name: 'delete',
|
|
424
|
-
label:
|
|
632
|
+
label: kintIntl.formatKintMessage({
|
|
633
|
+
id: 'delete',
|
|
634
|
+
overrideValue: labelOverrides?.delete
|
|
635
|
+
}),
|
|
425
636
|
icon: 'trash',
|
|
426
637
|
callback: <span class="fstat-no" title="function not covered" >(d</span>ata) => <span class="cstat-no" title="statement not covered" >setDeleteModal({ visible: true, refdata: data }),</span>
|
|
638
|
+
ariaLabel: <span class="fstat-no" title="function not covered" >(d</span>ata) => <span class="cstat-no" title="statement not covered" >kintIntl.formatKintMessage(</span>
|
|
639
|
+
{
|
|
640
|
+
id: 'refdata.deleteAriaLabel',
|
|
641
|
+
overrideValue: labelOverrides?.deleteAriaLabel
|
|
642
|
+
},
|
|
643
|
+
{ label: data?.label }
|
|
644
|
+
),
|
|
427
645
|
});
|
|
428
646
|
}
|
|
429
647
|
<span class="cstat-no" title="statement not covered" > return actionArray;</span>
|
|
@@ -434,44 +652,51 @@ const EditableRefdataList = <span class="cstat-no" title="statement not covered"
|
|
|
434
652
|
<ActionList
|
|
435
653
|
actionAssigner={actionAssigner}
|
|
436
654
|
columnMapping={{
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
655
|
+
label: kintIntl.formatKintMessage({
|
|
656
|
+
id: 'refdata.label',
|
|
657
|
+
overrideValue: labelOverrides?.label
|
|
658
|
+
}),
|
|
659
|
+
value: kintIntl.formatKintMessage({
|
|
660
|
+
id: 'refdata.value',
|
|
661
|
+
overrideValue: labelOverrides?.value
|
|
662
|
+
}),
|
|
663
|
+
}}
|
|
440
664
|
contentData={contentData}
|
|
441
665
|
creatableFields={{
|
|
442
|
-
|
|
443
|
-
|
|
666
|
+
value: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >false</span>
|
|
667
|
+
}}
|
|
444
668
|
createCallback={refdata?.internal ? null : <span class="fstat-no" title="function not covered" >(d</span>ata) => <span class="cstat-no" title="statement not covered" >editRefdataValue(data)}</span>
|
|
445
669
|
editableFields={{
|
|
446
|
-
|
|
447
|
-
|
|
670
|
+
value: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >false</span>
|
|
671
|
+
}}
|
|
448
672
|
label={label}
|
|
673
|
+
validateFields={{
|
|
674
|
+
label: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >required</span>
|
|
675
|
+
}}
|
|
449
676
|
visibleFields={['label', 'value']}
|
|
450
677
|
/>
|
|
451
678
|
<ConfirmationModal
|
|
452
679
|
confirmLabel={
|
|
453
|
-
|
|
680
|
+
kintIntl.formatKintMessage({
|
|
681
|
+
id: 'delete',
|
|
682
|
+
overrideValue: labelOverrides?.delete
|
|
683
|
+
})
|
|
454
684
|
}
|
|
455
685
|
heading={
|
|
456
|
-
|
|
686
|
+
kintIntl.formatKintMessage({
|
|
687
|
+
id: 'refdata.deleteRefdataValue',
|
|
688
|
+
overrideValue: labelOverrides?.deleteRefdataValue
|
|
689
|
+
})
|
|
457
690
|
}
|
|
458
691
|
message={
|
|
459
|
-
|
|
460
|
-
id
|
|
461
|
-
|
|
462
|
-
|
|
692
|
+
kintIntl.formatKintMessage({
|
|
693
|
+
id: 'refdata.deleteRefdataValue.confirmMessage',
|
|
694
|
+
overrideValue: labelOverrides?.deleteRefdataValueMessage
|
|
695
|
+
}, { name: deleteModal?.refdata?.label })
|
|
463
696
|
}
|
|
464
697
|
onCancel={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setDeleteModal({ visible: false, refdata: null })}</span>
|
|
465
698
|
onConfirm={<span class="fstat-no" title="function not covered" >()</span> => {
|
|
466
|
-
<span class="cstat-no" title="statement not covered" > deleteRefdataValue(deleteModal?.refdata?.id)
|
|
467
|
-
message: (
|
|
468
|
-
<FormattedMessage
|
|
469
|
-
id="stripes-kint-components.editableRefdataList.deleteLabel.errorMessage"
|
|
470
|
-
values={{ label: deleteModal?.refdata?.label }}
|
|
471
|
-
/>
|
|
472
|
-
),
|
|
473
|
-
type: 'error',
|
|
474
|
-
}));
|
|
699
|
+
<span class="cstat-no" title="statement not covered" > deleteRefdataValue(deleteModal?.refdata?.id);</span>
|
|
475
700
|
<span class="cstat-no" title="statement not covered" > setDeleteModal({ visible: false, refdata: null });</span>
|
|
476
701
|
}}
|
|
477
702
|
open={deleteModal?.visible}
|
|
@@ -490,7 +715,7 @@ export default EditableRefdataList;
|
|
|
490
715
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
491
716
|
Code coverage generated by
|
|
492
717
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
493
|
-
at
|
|
718
|
+
at 2022-09-16T13:23:25.290Z
|
|
494
719
|
</div>
|
|
495
720
|
<script src="../prettify.js"></script>
|
|
496
721
|
<script>
|
|
@@ -25,28 +25,28 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/41</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/20</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/17</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/40</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
85
85
|
</td>
|
|
86
86
|
<td data-value="0" class="pct low">0%</td>
|
|
87
|
-
<td data-value="
|
|
87
|
+
<td data-value="41" class="abs low">0/41</td>
|
|
88
88
|
<td data-value="0" class="pct low">0%</td>
|
|
89
|
-
<td data-value="
|
|
89
|
+
<td data-value="20" class="abs low">0/20</td>
|
|
90
90
|
<td data-value="0" class="pct low">0%</td>
|
|
91
|
-
<td data-value="
|
|
91
|
+
<td data-value="17" class="abs low">0/17</td>
|
|
92
92
|
<td data-value="0" class="pct low">0%</td>
|
|
93
|
-
<td data-value="
|
|
93
|
+
<td data-value="40" class="abs low">0/40</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
<tr>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at
|
|
119
|
+
at 2022-09-16T13:23:25.290Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
74
74
|
Code coverage generated by
|
|
75
75
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
76
|
-
at
|
|
76
|
+
at 2022-09-16T13:23:25.290Z
|
|
77
77
|
</div>
|
|
78
78
|
<script src="../prettify.js"></script>
|
|
79
79
|
<script>
|