@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/CustomProperties/Filter/useOperators.js.html
CHANGED
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">86.66% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>13/15</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">85.71% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>18/21</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>1/1</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">86.66% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>15
|
|
49
|
+
<span class='fraction'>13/15</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -138,23 +138,23 @@
|
|
|
138
138
|
<span class="cline-any cline-yes">3x</span>
|
|
139
139
|
<span class="cline-any cline-neutral"> </span>
|
|
140
140
|
<span class="cline-any cline-yes">3x</span>
|
|
141
|
-
<span class="cline-any cline-yes">
|
|
142
|
-
<span class="cline-any cline-yes">88x</span>
|
|
143
|
-
<span class="cline-any cline-yes">8x</span>
|
|
141
|
+
<span class="cline-any cline-yes">16x</span>
|
|
144
142
|
<span class="cline-any cline-neutral"> </span>
|
|
143
|
+
<span class="cline-any cline-yes">16x</span>
|
|
145
144
|
<span class="cline-any cline-neutral"> </span>
|
|
146
145
|
<span class="cline-any cline-neutral"> </span>
|
|
147
146
|
<span class="cline-any cline-neutral"> </span>
|
|
148
|
-
<span class="cline-any cline-yes">8x</span>
|
|
149
|
-
<span class="cline-any cline-yes">8x</span>
|
|
150
147
|
<span class="cline-any cline-neutral"> </span>
|
|
148
|
+
<span class="cline-any cline-yes">16x</span>
|
|
149
|
+
<span class="cline-any cline-yes">12x</span>
|
|
151
150
|
<span class="cline-any cline-neutral"> </span>
|
|
152
151
|
<span class="cline-any cline-neutral"> </span>
|
|
153
152
|
<span class="cline-any cline-neutral"> </span>
|
|
154
153
|
<span class="cline-any cline-neutral"> </span>
|
|
155
154
|
<span class="cline-any cline-neutral"> </span>
|
|
156
155
|
<span class="cline-any cline-neutral"> </span>
|
|
157
|
-
<span class="cline-any cline-
|
|
156
|
+
<span class="cline-any cline-neutral"> </span>
|
|
157
|
+
<span class="cline-any cline-yes">16x</span>
|
|
158
158
|
<span class="cline-any cline-no"> </span>
|
|
159
159
|
<span class="cline-any cline-neutral"> </span>
|
|
160
160
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -163,32 +163,32 @@
|
|
|
163
163
|
<span class="cline-any cline-neutral"> </span>
|
|
164
164
|
<span class="cline-any cline-neutral"> </span>
|
|
165
165
|
<span class="cline-any cline-neutral"> </span>
|
|
166
|
-
<span class="cline-any cline-yes">
|
|
167
|
-
<span class="cline-any cline-yes">
|
|
166
|
+
<span class="cline-any cline-yes">16x</span>
|
|
167
|
+
<span class="cline-any cline-yes">14x</span>
|
|
168
168
|
<span class="cline-any cline-neutral"> </span>
|
|
169
169
|
<span class="cline-any cline-neutral"> </span>
|
|
170
170
|
<span class="cline-any cline-neutral"> </span>
|
|
171
171
|
<span class="cline-any cline-neutral"> </span>
|
|
172
172
|
<span class="cline-any cline-neutral"> </span>
|
|
173
|
-
<span class="cline-any cline-yes">
|
|
174
|
-
<span class="cline-any cline-
|
|
173
|
+
<span class="cline-any cline-yes">16x</span>
|
|
174
|
+
<span class="cline-any cline-no"> </span>
|
|
175
175
|
<span class="cline-any cline-neutral"> </span>
|
|
176
176
|
<span class="cline-any cline-neutral"> </span>
|
|
177
177
|
<span class="cline-any cline-neutral"> </span>
|
|
178
178
|
<span class="cline-any cline-neutral"> </span>
|
|
179
|
-
<span class="cline-any cline-yes">
|
|
180
|
-
<span class="cline-any cline-yes">
|
|
179
|
+
<span class="cline-any cline-yes">16x</span>
|
|
180
|
+
<span class="cline-any cline-yes">14x</span>
|
|
181
181
|
<span class="cline-any cline-neutral"> </span>
|
|
182
182
|
<span class="cline-any cline-neutral"> </span>
|
|
183
183
|
<span class="cline-any cline-neutral"> </span>
|
|
184
184
|
<span class="cline-any cline-neutral"> </span>
|
|
185
185
|
<span class="cline-any cline-neutral"> </span>
|
|
186
|
-
<span class="cline-any cline-yes">
|
|
186
|
+
<span class="cline-any cline-yes">16x</span>
|
|
187
187
|
<span class="cline-any cline-neutral"> </span>
|
|
188
188
|
<span class="cline-any cline-neutral"> </span>
|
|
189
189
|
<span class="cline-any cline-neutral"> </span>
|
|
190
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import
|
|
191
|
-
import
|
|
190
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import * as CUSTPROP_TYPES from '../../constants/customProperties';
|
|
191
|
+
import { useKintIntl } from '../../hooks';
|
|
192
192
|
|
|
193
193
|
const {
|
|
194
194
|
REFDATA_CLASS_NAME: REFDATA,
|
|
@@ -199,49 +199,49 @@ const {
|
|
|
199
199
|
TEXT_CLASS_NAME: TEXT,
|
|
200
200
|
} = CUSTPROP_TYPES;
|
|
201
201
|
|
|
202
|
-
const useOperators = (type) => {
|
|
203
|
-
const
|
|
204
|
-
|
|
202
|
+
const useOperators = (type = null, passedIntlKey = null, passedIntlNS = null, labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => {
|
|
203
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
204
|
+
|
|
205
205
|
const operators = [
|
|
206
|
-
{ value: ' isSet', label:
|
|
207
|
-
{ value: ' isNotSet', label:
|
|
206
|
+
{ value: ' isSet', label: kintIntl.formatKintMessage({ id: 'operator.isSet', overrideValue: labelOverrides.operatorIsSet }), noValueAllowed: true },
|
|
207
|
+
{ value: ' isNotSet', label: kintIntl.formatKintMessage({ id: 'operator.isNotSet', overrideValue: labelOverrides.operatorIsNotSet }), noValueAllowed: true },
|
|
208
208
|
];
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
if (!type || type === INTEGER || type === DECIMAL) {
|
|
211
211
|
operators.push(
|
|
212
|
-
{ value: '==', label:
|
|
213
|
-
{ value: '!=', label:
|
|
214
|
-
{ value: '>=', label:
|
|
215
|
-
{ value: '<=', label:
|
|
212
|
+
{ value: '==', label: kintIntl.formatKintMessage({ id: 'operator.equals', overrideValue: labelOverrides.operatorEquals }) },
|
|
213
|
+
{ value: '!=', label: kintIntl.formatKintMessage({ id: 'operator.doesNotEqual', overrideValue: labelOverrides.operatorDoesNotEqual }) },
|
|
214
|
+
{ value: '>=', label: kintIntl.formatKintMessage({ id: 'operator.isGreaterThanOrEqual', overrideValue: labelOverrides.operatorIsGreaterThanOrEqual }) },
|
|
215
|
+
{ value: '<=', label: kintIntl.formatKintMessage({ id: 'operator.isLessThanOrEqual', overrideValue: labelOverrides.operatorIsLessThanOrEqual }) },
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (type === DATE) { // Basically the same as the "number" types above, so no need to reassign if there is no type
|
|
220
220
|
<span class="cstat-no" title="statement not covered" > operators.push(</span>
|
|
221
|
-
{ value: '==', label:
|
|
222
|
-
{ value: '!=', label:
|
|
223
|
-
{ value: '>=', label:
|
|
224
|
-
{ value: '<=', label:
|
|
221
|
+
{ value: '==', label: kintIntl.formatKintMessage({ id: 'operator.equals', overrideValue: labelOverrides.operatorEquals }) },
|
|
222
|
+
{ value: '!=', label: kintIntl.formatKintMessage({ id: 'operator.doesNotEqual', overrideValue: labelOverrides.operatorDoesNotEqual }) },
|
|
223
|
+
{ value: '>=', label: kintIntl.formatKintMessage({ id: 'operator.isOnOrAfter', overrideValue: labelOverrides.operatorIsOnOrAfter }) },
|
|
224
|
+
{ value: '<=', label: kintIntl.formatKintMessage({ id: 'operator.isOnOrBefore', overrideValue: labelOverrides.operatorIsOnOrBefore }) },
|
|
225
225
|
);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
if (!type || type === REFDATA) {
|
|
229
229
|
operators.push(
|
|
230
|
-
{ value: '==', label:
|
|
231
|
-
{ value: '!=', label:
|
|
230
|
+
{ value: '==', label: kintIntl.formatKintMessage({ id: 'operator.is', overrideValue: labelOverrides.operatorIs }) },
|
|
231
|
+
{ value: '!=', label: kintIntl.formatKintMessage({ id: 'operator.isNot', overrideValue: labelOverrides.operatorIsNot }) },
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
<span class="missing-if-branch" title="
|
|
236
|
-
operators.push(
|
|
237
|
-
{ value: '==', label:
|
|
235
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (type === MULTIREFDATA) {
|
|
236
|
+
<span class="cstat-no" title="statement not covered" > operators.push(</span>
|
|
237
|
+
{ value: '==', label: kintIntl.formatKintMessage({ id: 'operator.contains', overrideValue: labelOverrides.operatorContains }) },
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
if (!type || type === TEXT) {
|
|
242
242
|
operators.push(
|
|
243
|
-
{ value: '=~', label:
|
|
244
|
-
{ value: '!~', label:
|
|
243
|
+
{ value: '=~', label: kintIntl.formatKintMessage({ id: 'operator.contains', overrideValue: labelOverrides.operatorContains }) },
|
|
244
|
+
{ value: '!~', label: kintIntl.formatKintMessage({ id: 'operator.doesNotContain', overrideValue: labelOverrides.operatorDoesNotContain }) },
|
|
245
245
|
);
|
|
246
246
|
}
|
|
247
247
|
|
|
@@ -256,7 +256,7 @@ export default useOperators;
|
|
|
256
256
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
257
257
|
Code coverage generated by
|
|
258
258
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
259
|
-
at
|
|
259
|
+
at 2022-09-16T13:23:25.290Z
|
|
260
260
|
</div>
|
|
261
261
|
<script src="../../prettify.js"></script>
|
|
262
262
|
<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">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>16/16</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">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>5/5</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>14/14</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 high'></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>
|
|
@@ -98,35 +98,41 @@
|
|
|
98
98
|
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
99
|
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
100
|
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
-
<a name='L36'></a><a href='#L36'>36</a
|
|
101
|
+
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
+
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
102
105
|
<span class="cline-any cline-neutral"> </span>
|
|
103
106
|
<span class="cline-any cline-yes">1x</span>
|
|
104
|
-
<span class="cline-any cline-
|
|
107
|
+
<span class="cline-any cline-yes">40x</span>
|
|
105
108
|
<span class="cline-any cline-neutral"> </span>
|
|
106
|
-
<span class="cline-any cline-
|
|
107
|
-
<span class="cline-any cline-
|
|
109
|
+
<span class="cline-any cline-yes">4x</span>
|
|
110
|
+
<span class="cline-any cline-yes">4x</span>
|
|
108
111
|
<span class="cline-any cline-neutral"> </span>
|
|
109
|
-
<span class="cline-any cline-
|
|
112
|
+
<span class="cline-any cline-yes">4x</span>
|
|
110
113
|
<span class="cline-any cline-neutral"> </span>
|
|
111
114
|
<span class="cline-any cline-neutral"> </span>
|
|
112
|
-
<span class="cline-any cline-no"> </span>
|
|
113
|
-
<span class="cline-any cline-no"> </span>
|
|
114
115
|
<span class="cline-any cline-neutral"> </span>
|
|
115
|
-
<span class="cline-any cline-
|
|
116
|
-
<span class="cline-any cline-
|
|
116
|
+
<span class="cline-any cline-yes">4x</span>
|
|
117
|
+
<span class="cline-any cline-yes">4x</span>
|
|
117
118
|
<span class="cline-any cline-neutral"> </span>
|
|
118
|
-
<span class="cline-any cline-
|
|
119
|
+
<span class="cline-any cline-yes">4x</span>
|
|
119
120
|
<span class="cline-any cline-neutral"> </span>
|
|
120
|
-
<span class="cline-any cline-
|
|
121
|
+
<span class="cline-any cline-yes">12x</span>
|
|
122
|
+
<span class="cline-any cline-yes">4x</span>
|
|
121
123
|
<span class="cline-any cline-neutral"> </span>
|
|
124
|
+
<span class="cline-any cline-yes">4x</span>
|
|
122
125
|
<span class="cline-any cline-neutral"> </span>
|
|
123
|
-
<span class="cline-any cline-
|
|
126
|
+
<span class="cline-any cline-yes">4x</span>
|
|
124
127
|
<span class="cline-any cline-neutral"> </span>
|
|
125
128
|
<span class="cline-any cline-neutral"> </span>
|
|
129
|
+
<span class="cline-any cline-yes">4x</span>
|
|
126
130
|
<span class="cline-any cline-neutral"> </span>
|
|
127
131
|
<span class="cline-any cline-neutral"> </span>
|
|
128
132
|
<span class="cline-any cline-neutral"> </span>
|
|
129
|
-
<span class="cline-any cline-
|
|
133
|
+
<span class="cline-any cline-neutral"> </span>
|
|
134
|
+
<span class="cline-any cline-neutral"> </span>
|
|
135
|
+
<span class="cline-any cline-yes">4x</span>
|
|
130
136
|
<span class="cline-any cline-neutral"> </span>
|
|
131
137
|
<span class="cline-any cline-neutral"> </span>
|
|
132
138
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -135,33 +141,36 @@
|
|
|
135
141
|
<span class="cline-any cline-neutral"> </span>
|
|
136
142
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import useOperators from './useOperators';
|
|
137
143
|
|
|
138
|
-
const useParseActiveFilterStrings = <span class="
|
|
139
|
-
const operators =
|
|
144
|
+
const useParseActiveFilterStrings = (filterStrings, passedIntlKey, passedIntlNS, labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => {
|
|
145
|
+
const operators = useOperators(null, passedIntlKey, passedIntlNS, labelOverrides).map(o => o.value);
|
|
140
146
|
|
|
141
|
-
let numberOfFilters =
|
|
142
|
-
const filters =
|
|
147
|
+
let numberOfFilters = 0;
|
|
148
|
+
const filters = filterStrings.map(filter => {
|
|
143
149
|
let customProperty;
|
|
144
|
-
const rules =
|
|
150
|
+
const rules = filter.split('||').map(ruleString => {
|
|
145
151
|
// ruleString is constructed in this.handleSubmit passed to CustomPropertyFiltersForm
|
|
146
152
|
// and has shape "customProperties.foo.value!=42"
|
|
147
|
-
|
|
148
|
-
|
|
153
|
+
// OR customProperties.foo.value.id==1234, so make sure to disregard the .id
|
|
154
|
+
const [customPropertyPath, rule] = ruleString.split('.value');
|
|
155
|
+
const idSafeRule = rule.replace('.id', '');
|
|
156
|
+
|
|
157
|
+
customProperty = customPropertyPath.replace('customProperties.', '');
|
|
149
158
|
|
|
150
|
-
const operator =
|
|
151
|
-
const value =
|
|
159
|
+
const operator = operators.find(o => idSafeRule.startsWith(o)) ?? <span class="branch-1 cbranch-no" title="branch not covered" >'';</span>
|
|
160
|
+
const value = idSafeRule.substring(operator.length);
|
|
152
161
|
|
|
153
|
-
|
|
162
|
+
numberOfFilters += 1;
|
|
154
163
|
|
|
155
|
-
|
|
164
|
+
return { operator, value };
|
|
156
165
|
});
|
|
157
166
|
|
|
158
|
-
|
|
167
|
+
return {
|
|
159
168
|
customProperty,
|
|
160
169
|
rules,
|
|
161
170
|
};
|
|
162
171
|
});
|
|
163
172
|
|
|
164
|
-
|
|
173
|
+
return {
|
|
165
174
|
filters,
|
|
166
175
|
numberOfFilters
|
|
167
176
|
};
|
|
@@ -175,7 +184,7 @@ export default useParseActiveFilterStrings;
|
|
|
175
184
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
176
185
|
Code coverage generated by
|
|
177
186
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
178
|
-
at
|
|
187
|
+
at 2022-09-16T13:23:25.290Z
|
|
179
188
|
</div>
|
|
180
189
|
<script src="../../prettify.js"></script>
|
|
181
190
|
<script>
|
package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html
CHANGED
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">44.44% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>12/27</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">37.5% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>3/8</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">50% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>2/4</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">45.83% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>11/24</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -114,7 +114,12 @@
|
|
|
114
114
|
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
115
|
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
116
|
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
-
<a name='L52'></a><a href='#L52'>52</a
|
|
117
|
+
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
+
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
+
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
|
+
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
|
+
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
|
+
<a name='L57'></a><a href='#L57'>57</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
118
123
|
<span class="cline-any cline-neutral"> </span>
|
|
119
124
|
<span class="cline-any cline-neutral"> </span>
|
|
120
125
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -128,23 +133,28 @@
|
|
|
128
133
|
<span class="cline-any cline-yes">2x</span>
|
|
129
134
|
<span class="cline-any cline-neutral"> </span>
|
|
130
135
|
<span class="cline-any cline-yes">2x</span>
|
|
131
|
-
<span class="cline-any cline-yes">8x</span>
|
|
132
136
|
<span class="cline-any cline-neutral"> </span>
|
|
133
137
|
<span class="cline-any cline-neutral"> </span>
|
|
134
138
|
<span class="cline-any cline-neutral"> </span>
|
|
135
|
-
<span class="cline-any cline-yes">8x</span>
|
|
136
139
|
<span class="cline-any cline-neutral"> </span>
|
|
137
140
|
<span class="cline-any cline-neutral"> </span>
|
|
138
|
-
<span class="cline-any cline-
|
|
139
|
-
<span class="cline-any cline-
|
|
140
|
-
<span class="cline-any cline-
|
|
141
|
-
<span class="cline-any cline-
|
|
141
|
+
<span class="cline-any cline-yes">12x</span>
|
|
142
|
+
<span class="cline-any cline-neutral"> </span>
|
|
143
|
+
<span class="cline-any cline-neutral"> </span>
|
|
144
|
+
<span class="cline-any cline-neutral"> </span>
|
|
145
|
+
<span class="cline-any cline-yes">12x</span>
|
|
146
|
+
<span class="cline-any cline-neutral"> </span>
|
|
142
147
|
<span class="cline-any cline-neutral"> </span>
|
|
143
148
|
<span class="cline-any cline-no"> </span>
|
|
144
149
|
<span class="cline-any cline-no"> </span>
|
|
145
150
|
<span class="cline-any cline-no"> </span>
|
|
146
151
|
<span class="cline-any cline-no"> </span>
|
|
147
152
|
<span class="cline-any cline-neutral"> </span>
|
|
153
|
+
<span class="cline-any cline-yes">2x</span>
|
|
154
|
+
<span class="cline-any cline-yes">14x</span>
|
|
155
|
+
<span class="cline-any cline-yes">2x</span>
|
|
156
|
+
<span class="cline-any cline-yes">2x</span>
|
|
157
|
+
<span class="cline-any cline-neutral"> </span>
|
|
148
158
|
<span class="cline-any cline-no"> </span>
|
|
149
159
|
<span class="cline-any cline-no"> </span>
|
|
150
160
|
<span class="cline-any cline-no"> </span>
|
|
@@ -157,17 +167,17 @@
|
|
|
157
167
|
<span class="cline-any cline-no"> </span>
|
|
158
168
|
<span class="cline-any cline-neutral"> </span>
|
|
159
169
|
<span class="cline-any cline-neutral"> </span>
|
|
160
|
-
<span class="cline-any cline-yes">
|
|
161
|
-
<span class="cline-any cline-yes">
|
|
170
|
+
<span class="cline-any cline-yes">10x</span>
|
|
171
|
+
<span class="cline-any cline-yes">10x</span>
|
|
162
172
|
<span class="cline-any cline-neutral"> </span>
|
|
163
173
|
<span class="cline-any cline-neutral"> </span>
|
|
164
|
-
<span class="cline-any cline-yes">
|
|
174
|
+
<span class="cline-any cline-yes">12x</span>
|
|
165
175
|
<span class="cline-any cline-neutral"> </span>
|
|
166
176
|
<span class="cline-any cline-neutral"> </span>
|
|
167
177
|
<span class="cline-any cline-neutral"> </span>
|
|
168
178
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { Datepicker, Select, TextField } from '@folio/stripes/components';
|
|
169
179
|
import * as CUSTPROP_TYPES from '../../constants/customProperties';
|
|
170
|
-
import { invalidNumber
|
|
180
|
+
import { invalidNumber, required as requiredValidator } from '../../utils/validators';
|
|
171
181
|
|
|
172
182
|
const {
|
|
173
183
|
REFDATA_CLASS_NAME: REFDATA,
|
|
@@ -178,7 +188,12 @@ const {
|
|
|
178
188
|
TEXT_CLASS_NAME: TEXT,
|
|
179
189
|
} = CUSTPROP_TYPES;
|
|
180
190
|
|
|
181
|
-
const useValueProps = (
|
|
191
|
+
const useValueProps = (
|
|
192
|
+
custPropDefinition,
|
|
193
|
+
intlKey,
|
|
194
|
+
intlNS,
|
|
195
|
+
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
196
|
+
) => {
|
|
182
197
|
const props = {
|
|
183
198
|
validate: requiredValidator
|
|
184
199
|
};
|
|
@@ -188,13 +203,13 @@ const useValueProps = (custPropDefinition) => {
|
|
|
188
203
|
<span class="branch-1 cbranch-no" title="branch not covered" > case DECIMAL:</span>
|
|
189
204
|
<span class="cstat-no" title="statement not covered" > props.component = TextField;</span>
|
|
190
205
|
<span class="cstat-no" title="statement not covered" > props.type = 'number';</span>
|
|
191
|
-
<span class="cstat-no" title="statement not covered" > props.validate =
|
|
192
|
-
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
193
|
-
<span class="branch-2 cbranch-no" title="branch not covered" > case REFDATA:</span>
|
|
194
|
-
<span class="cstat-no" title="statement not covered" > props.component = Select;</span>
|
|
195
|
-
<span class="cstat-no" title="statement not covered" > props.dataOptions = custPropDefinition.category.values.map(<span class="fstat-no" title="function not covered" >rd</span>v => (<span class="cstat-no" title="statement not covered" >{ label: rdv.label, value: rdv.id })</span>);</span>
|
|
196
|
-
<span class="cstat-no" title="statement not covered" > props.placeholder = ' ';</span>
|
|
206
|
+
<span class="cstat-no" title="statement not covered" > props.validate = <span class="fstat-no" title="function not covered" >(v</span>alue) => <span class="cstat-no" title="statement not covered" >invalidNumber(value, intlKey, intlNS, labelOverrides);</span></span>
|
|
197
207
|
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
208
|
+
case REFDATA:
|
|
209
|
+
props.component = Select;
|
|
210
|
+
props.dataOptions = custPropDefinition.category.values.map(rdv => ({ label: rdv.label, value: rdv.id }));
|
|
211
|
+
props.placeholder = ' ';
|
|
212
|
+
break;
|
|
198
213
|
<span class="branch-3 cbranch-no" title="branch not covered" > case MULTIREFDATA:</span>
|
|
199
214
|
<span class="cstat-no" title="statement not covered" > props.component = Select;</span>
|
|
200
215
|
<span class="cstat-no" title="statement not covered" > props.dataOptions = custPropDefinition.category.values.map(<span class="fstat-no" title="function not covered" >mr</span>dv => (<span class="cstat-no" title="statement not covered" >{ label: mrdv.label, value: mrdv.id })</span>);</span>
|
|
@@ -206,7 +221,7 @@ const useValueProps = (custPropDefinition) => {
|
|
|
206
221
|
<span class="cstat-no" title="statement not covered" > props.timeZone = 'UTC';</span>
|
|
207
222
|
<span class="cstat-no" title="statement not covered" > props.usePortal = true;</span>
|
|
208
223
|
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
209
|
-
|
|
224
|
+
case TEXT:
|
|
210
225
|
default:
|
|
211
226
|
props.component = TextField;
|
|
212
227
|
break;
|
|
@@ -223,7 +238,7 @@ export default useValueProps;
|
|
|
223
238
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
224
239
|
Code coverage generated by
|
|
225
240
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
226
|
-
at
|
|
241
|
+
at 2022-09-16T13:23:25.290Z
|
|
227
242
|
</div>
|
|
228
243
|
<script src="../../prettify.js"></script>
|
|
229
244
|
<script>
|
package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html
CHANGED
|
@@ -99,7 +99,13 @@
|
|
|
99
99
|
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
100
|
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
101
|
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
-
<a name='L37'></a><a href='#L37'>37</a
|
|
102
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
+
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
+
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
+
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
+
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
+
<a name='L43'></a><a href='#L43'>43</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
103
109
|
<span class="cline-any cline-neutral"> </span>
|
|
104
110
|
<span class="cline-any cline-neutral"> </span>
|
|
105
111
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -109,6 +115,8 @@
|
|
|
109
115
|
<span class="cline-any cline-neutral"> </span>
|
|
110
116
|
<span class="cline-any cline-neutral"> </span>
|
|
111
117
|
<span class="cline-any cline-neutral"> </span>
|
|
118
|
+
<span class="cline-any cline-neutral"> </span>
|
|
119
|
+
<span class="cline-any cline-neutral"> </span>
|
|
112
120
|
<span class="cline-any cline-yes">1x</span>
|
|
113
121
|
<span class="cline-any cline-neutral"> </span>
|
|
114
122
|
<span class="cline-any cline-yes">2x</span>
|
|
@@ -125,6 +133,8 @@
|
|
|
125
133
|
<span class="cline-any cline-neutral"> </span>
|
|
126
134
|
<span class="cline-any cline-neutral"> </span>
|
|
127
135
|
<span class="cline-any cline-neutral"> </span>
|
|
136
|
+
<span class="cline-any cline-neutral"> </span>
|
|
137
|
+
<span class="cline-any cline-neutral"> </span>
|
|
128
138
|
<span class="cline-any cline-yes">1x</span>
|
|
129
139
|
<span class="cline-any cline-neutral"> </span>
|
|
130
140
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -135,6 +145,8 @@
|
|
|
135
145
|
<span class="cline-any cline-neutral"> </span>
|
|
136
146
|
<span class="cline-any cline-neutral"> </span>
|
|
137
147
|
<span class="cline-any cline-neutral"> </span>
|
|
148
|
+
<span class="cline-any cline-neutral"> </span>
|
|
149
|
+
<span class="cline-any cline-neutral"> </span>
|
|
138
150
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import PropTypes from 'prop-types';
|
|
139
151
|
import CustomPropertiesViewCtx from './CustomPropertiesViewCtx';
|
|
140
152
|
|
|
@@ -143,6 +155,8 @@ const CustomPropertiesView = ({
|
|
|
143
155
|
customProperties,
|
|
144
156
|
customPropertiesEndpoint,
|
|
145
157
|
id,
|
|
158
|
+
intlKey: passedIntlKey,
|
|
159
|
+
intlNS: passedIntlNS,
|
|
146
160
|
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
147
161
|
}) => {
|
|
148
162
|
return (
|
|
@@ -154,6 +168,8 @@ const CustomPropertiesView = ({
|
|
|
154
168
|
customProperties,
|
|
155
169
|
customPropertiesEndpoint,
|
|
156
170
|
id,
|
|
171
|
+
intlKey: passedIntlKey,
|
|
172
|
+
intlNS: passedIntlNS,
|
|
157
173
|
labelOverrides
|
|
158
174
|
}}
|
|
159
175
|
/>
|
|
@@ -166,6 +182,8 @@ CustomPropertiesView.propTypes = {
|
|
|
166
182
|
customProperties: PropTypes.object,
|
|
167
183
|
customPropertiesEndpoint: PropTypes.string,
|
|
168
184
|
id: PropTypes.string,
|
|
185
|
+
intlKey: PropTypes.string,
|
|
186
|
+
intlNS: PropTypes.string,
|
|
169
187
|
labelOverrides: PropTypes.object,
|
|
170
188
|
nameOverride: PropTypes.string
|
|
171
189
|
};
|
|
@@ -178,7 +196,7 @@ export default CustomPropertiesView;
|
|
|
178
196
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
179
197
|
Code coverage generated by
|
|
180
198
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
181
|
-
at
|
|
199
|
+
at 2022-09-16T13:23:25.290Z
|
|
182
200
|
</div>
|
|
183
201
|
<script src="../../prettify.js"></script>
|
|
184
202
|
<script>
|