@k-int/stripes-kint-components 2.8.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -3
- package/es/index.js +48 -12
- package/es/lib/ActionList/ActionList.js +11 -5
- package/es/lib/ActionList/ActionListFieldArray.js +147 -77
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +43 -31
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +17 -14
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +64 -46
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +17 -24
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +91 -70
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +53 -36
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +50 -31
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +13 -14
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +8 -12
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +22 -24
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +9 -12
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +62 -13
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +12 -13
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +91 -44
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +80 -73
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +31 -32
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +26 -24
- package/es/lib/CustomProperties/Edit/testResources.js +73 -908
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +21 -29
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +12 -10
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +38 -39
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +28 -13
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +29 -44
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +6 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +16 -10
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +12 -12
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +20 -11
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +4 -3
- package/es/lib/CustomProperties/Filter/testResources.js +37 -233
- package/es/lib/CustomProperties/Filter/useOperators.js +69 -27
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +3 -2
- package/es/lib/CustomProperties/Filter/useValueProps.js +7 -2
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +6 -0
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +4 -3
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +13 -19
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +4 -10
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +34 -51
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +35 -27
- package/es/lib/EditableRefdataList/EditableRefdataList.js +41 -31
- package/es/lib/EditableSettingsList/EditableSettingsList.js +11 -1
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +10 -0
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +19 -11
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +9 -8
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +21 -9
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -0
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +83 -16
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +138 -65
- package/es/lib/FormModal/FormModal.js +14 -9
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +91 -0
- package/es/lib/FormattedKintMessage/index.js +15 -0
- package/es/lib/IconSelect/IconSelect.js +18 -12
- package/es/lib/NoResultsMessage/NoResultsMessage.js +13 -2
- package/es/lib/RichSelect/RichSelect.js +13 -34
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +16 -5
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +11 -1
- package/es/lib/SettingPage/SettingPage.js +12 -13
- package/es/lib/SettingPage/SettingPagePane.js +12 -20
- package/es/lib/hooks/__mocks__/index.js +46 -0
- package/es/lib/hooks/index.js +24 -8
- package/es/lib/hooks/settingsHooks/useSettings.js +22 -17
- package/es/lib/hooks/useIntlKey.js +34 -0
- package/es/lib/hooks/useIntlKeyStore.js +84 -0
- package/es/lib/hooks/useKintIntl.js +93 -0
- package/es/lib/utils/index.js +40 -4
- package/es/lib/utils/parseErrorResponse.js +1 -1
- package/es/lib/utils/validators.js +76 -59
- package/jest.config.js +4 -1
- package/junit.xml +157 -656
- package/package.json +54 -33
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +56 -8
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +394 -64
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +187 -52
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +372 -87
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +293 -74
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +126 -54
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +45 -60
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +23 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +59 -47
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +259 -97
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +399 -105
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +41 -68
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +57 -57
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +67 -688
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +92 -53
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +103 -64
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +54 -63
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +49 -16
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +69 -18
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +89 -89
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +33 -786
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +46 -46
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +45 -36
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +43 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +20 -2
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +50 -41
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +54 -75
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +24 -24
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/{hooks/useAvailableCustomProperties.js.html → CycleButton/CycleButton.js.html} +62 -50
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +664 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +264 -39
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +41 -14
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +45 -6
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +47 -11
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +65 -14
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +154 -31
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +26 -26
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +18 -18
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +35 -17
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +247 -0
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/{CustomProperties/Config/CustomPropertiesView.js.html → IconSelect/IconSelect.js.html} +158 -257
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +48 -6
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/{CustomProperties/Config/testResources.js.html → RichSelect/RichSelect.js.html} +256 -334
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +91 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +127 -0
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +52 -7
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +31 -4
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +24 -27
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +47 -17
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +22 -22
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +142 -97
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +13 -4
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +35 -20
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +61 -22
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +19 -22
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +151 -0
- package/src/artifacts/coverage-jest/lcov-report/{utils/renderHelpText.js.html → hooks/useIntlKeyStore.js.html} +71 -38
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +238 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +23 -11
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +274 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +19 -10
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/index.html +205 -130
- package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +34 -34
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +42 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +139 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +128 -80
- package/src/artifacts/coverage-jest/lcov.info +2603 -2086
- package/src/index.js +11 -4
- package/src/lib/ActionList/ActionList.js +9 -3
- package/src/lib/ActionList/ActionListFieldArray.js +115 -37
- package/src/lib/ActionList/README.md +2 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +60 -16
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +14 -4
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +106 -33
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +16 -9
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +131 -58
- package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +52 -33
- package/src/lib/CustomProperties/Config/CustomPropertyView.js +71 -47
- package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +8 -6
- package/src/lib/CustomProperties/Config/README.md +33 -28
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +7 -3
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +23 -19
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +5 -3
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +65 -11
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +10 -8
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +115 -21
- package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +59 -60
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +24 -33
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +20 -27
- package/src/lib/CustomProperties/Edit/testResources.js +46 -1047
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +22 -22
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +12 -8
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +44 -31
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +26 -13
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +33 -36
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +3 -3
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +19 -8
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +9 -12
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.js +22 -5
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +3 -1
- package/src/lib/CustomProperties/Filter/testResources.js +14 -265
- package/src/lib/CustomProperties/Filter/useOperators.js +20 -20
- package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -2
- package/src/lib/CustomProperties/Filter/useValueProps.js +8 -3
- package/src/lib/CustomProperties/View/CustomPropertiesView.js +6 -0
- package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +2 -1
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js +15 -13
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +2 -5
- package/src/lib/CustomProperties/View/CustomPropertyCard.js +36 -43
- package/src/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +45 -27
- package/src/lib/EditableRefdataList/EditableRefdataList.js +56 -32
- package/src/lib/EditableSettingsList/EditableSettingsList.js +10 -1
- package/src/lib/EditableSettingsList/EditableSettingsListFieldArray.js +14 -1
- package/src/lib/EditableSettingsList/SettingField/EditSettingValue.js +17 -5
- package/src/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +9 -8
- package/src/lib/EditableSettingsList/SettingField/RenderSettingValue.js +24 -7
- package/src/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +1 -0
- package/src/lib/EditableSettingsList/SettingField/SettingField.js +57 -16
- package/src/lib/EditableSettingsList/SettingField/SettingField.test.js +14 -19
- package/src/lib/FormModal/FormModal.js +15 -9
- package/src/lib/FormattedKintMessage/FormattedKintMessage.js +54 -0
- package/src/lib/FormattedKintMessage/index.js +1 -0
- package/src/lib/IconSelect/IconSelect.js +17 -8
- package/src/lib/NoResultsMessage/NoResultsMessage.js +15 -1
- package/src/lib/RichSelect/RichSelect.js +16 -36
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +17 -2
- package/src/lib/SASQLookupComponent/TableBody/TableBody.js +10 -1
- package/src/lib/SettingPage/SettingPage.js +12 -13
- package/src/lib/SettingPage/SettingPagePane.js +16 -6
- package/src/lib/hooks/__mocks__/index.js +17 -0
- package/src/lib/hooks/index.js +3 -1
- package/src/lib/hooks/settingsHooks/useSettings.js +25 -12
- package/src/lib/hooks/useIntlKey.js +22 -0
- package/src/lib/hooks/useIntlKeyStore.js +38 -0
- package/src/lib/hooks/useKintIntl.js +51 -0
- package/src/lib/utils/index.js +11 -1
- package/src/lib/utils/parseErrorResponse.js +1 -1
- package/src/lib/utils/validators.js +57 -41
- package/styles/RichSelect.css +7 -4
- package/test/helpers/test-implementor-translations.json +80 -0
- package/test/helpers/translationsProperties.js +6 -1
- package/test/jest/customProperties.js +166 -0
- package/test/jest/helpers/KintHarness.js +1 -1
- package/test/jest/helpers/renderWithKintHarness.js +2 -1
- package/test/jest/index.js +8 -0
- package/test/jest/refdata.js +471 -0
- package/test/jest/resolver.js +29 -0
- package/translations/stripes-kint-components/ar.json +1 -122
- package/translations/stripes-kint-components/cs_CZ.json +1 -122
- package/translations/stripes-kint-components/de.json +1 -122
- package/translations/stripes-kint-components/en.json +1 -148
- package/translations/stripes-kint-components/es.json +1 -122
- package/translations/stripes-kint-components/hi_IN.json +1 -122
- package/translations/stripes-kint-components/hu.json +1 -122
- package/translations/stripes-kint-components/it_IT.json +1 -122
- package/translations/stripes-kint-components/ja.json +1 -122
- package/translations/stripes-kint-components/ko.json +1 -122
- package/translations/stripes-kint-components/pt_PT.json +1 -122
- package/translations/stripes-kint-components/ru.json +1 -122
- package/translations/stripes-kint-components/sv.json +1 -122
- package/translations/stripes-kint-components/zh_CN.json +1 -122
- package/es/lib/CustomProperties/Config/testResources.js +0 -198
- package/es/lib/hooks/useAvailableCustomProperties.js +0 -73
- package/es/lib/utils/renderHelpText.js +0 -80
- package/src/lib/CustomProperties/Config/testResources.js +0 -236
- package/src/lib/hooks/useAvailableCustomProperties.js +0 -40
- package/src/lib/utils/renderHelpText.js +0 -27
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">35.84% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>19/53</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">42.42% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>14/33</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">11.76% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>2/17</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">35.84% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>19/53</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -327,8 +327,102 @@
|
|
|
327
327
|
<a name='L262'></a><a href='#L262'>262</a>
|
|
328
328
|
<a name='L263'></a><a href='#L263'>263</a>
|
|
329
329
|
<a name='L264'></a><a href='#L264'>264</a>
|
|
330
|
-
<a name='L265'></a><a href='#L265'>265</a
|
|
331
|
-
<
|
|
330
|
+
<a name='L265'></a><a href='#L265'>265</a>
|
|
331
|
+
<a name='L266'></a><a href='#L266'>266</a>
|
|
332
|
+
<a name='L267'></a><a href='#L267'>267</a>
|
|
333
|
+
<a name='L268'></a><a href='#L268'>268</a>
|
|
334
|
+
<a name='L269'></a><a href='#L269'>269</a>
|
|
335
|
+
<a name='L270'></a><a href='#L270'>270</a>
|
|
336
|
+
<a name='L271'></a><a href='#L271'>271</a>
|
|
337
|
+
<a name='L272'></a><a href='#L272'>272</a>
|
|
338
|
+
<a name='L273'></a><a href='#L273'>273</a>
|
|
339
|
+
<a name='L274'></a><a href='#L274'>274</a>
|
|
340
|
+
<a name='L275'></a><a href='#L275'>275</a>
|
|
341
|
+
<a name='L276'></a><a href='#L276'>276</a>
|
|
342
|
+
<a name='L277'></a><a href='#L277'>277</a>
|
|
343
|
+
<a name='L278'></a><a href='#L278'>278</a>
|
|
344
|
+
<a name='L279'></a><a href='#L279'>279</a>
|
|
345
|
+
<a name='L280'></a><a href='#L280'>280</a>
|
|
346
|
+
<a name='L281'></a><a href='#L281'>281</a>
|
|
347
|
+
<a name='L282'></a><a href='#L282'>282</a>
|
|
348
|
+
<a name='L283'></a><a href='#L283'>283</a>
|
|
349
|
+
<a name='L284'></a><a href='#L284'>284</a>
|
|
350
|
+
<a name='L285'></a><a href='#L285'>285</a>
|
|
351
|
+
<a name='L286'></a><a href='#L286'>286</a>
|
|
352
|
+
<a name='L287'></a><a href='#L287'>287</a>
|
|
353
|
+
<a name='L288'></a><a href='#L288'>288</a>
|
|
354
|
+
<a name='L289'></a><a href='#L289'>289</a>
|
|
355
|
+
<a name='L290'></a><a href='#L290'>290</a>
|
|
356
|
+
<a name='L291'></a><a href='#L291'>291</a>
|
|
357
|
+
<a name='L292'></a><a href='#L292'>292</a>
|
|
358
|
+
<a name='L293'></a><a href='#L293'>293</a>
|
|
359
|
+
<a name='L294'></a><a href='#L294'>294</a>
|
|
360
|
+
<a name='L295'></a><a href='#L295'>295</a>
|
|
361
|
+
<a name='L296'></a><a href='#L296'>296</a>
|
|
362
|
+
<a name='L297'></a><a href='#L297'>297</a>
|
|
363
|
+
<a name='L298'></a><a href='#L298'>298</a>
|
|
364
|
+
<a name='L299'></a><a href='#L299'>299</a>
|
|
365
|
+
<a name='L300'></a><a href='#L300'>300</a>
|
|
366
|
+
<a name='L301'></a><a href='#L301'>301</a>
|
|
367
|
+
<a name='L302'></a><a href='#L302'>302</a>
|
|
368
|
+
<a name='L303'></a><a href='#L303'>303</a>
|
|
369
|
+
<a name='L304'></a><a href='#L304'>304</a>
|
|
370
|
+
<a name='L305'></a><a href='#L305'>305</a>
|
|
371
|
+
<a name='L306'></a><a href='#L306'>306</a>
|
|
372
|
+
<a name='L307'></a><a href='#L307'>307</a>
|
|
373
|
+
<a name='L308'></a><a href='#L308'>308</a>
|
|
374
|
+
<a name='L309'></a><a href='#L309'>309</a>
|
|
375
|
+
<a name='L310'></a><a href='#L310'>310</a>
|
|
376
|
+
<a name='L311'></a><a href='#L311'>311</a>
|
|
377
|
+
<a name='L312'></a><a href='#L312'>312</a>
|
|
378
|
+
<a name='L313'></a><a href='#L313'>313</a>
|
|
379
|
+
<a name='L314'></a><a href='#L314'>314</a>
|
|
380
|
+
<a name='L315'></a><a href='#L315'>315</a>
|
|
381
|
+
<a name='L316'></a><a href='#L316'>316</a>
|
|
382
|
+
<a name='L317'></a><a href='#L317'>317</a>
|
|
383
|
+
<a name='L318'></a><a href='#L318'>318</a>
|
|
384
|
+
<a name='L319'></a><a href='#L319'>319</a>
|
|
385
|
+
<a name='L320'></a><a href='#L320'>320</a>
|
|
386
|
+
<a name='L321'></a><a href='#L321'>321</a>
|
|
387
|
+
<a name='L322'></a><a href='#L322'>322</a>
|
|
388
|
+
<a name='L323'></a><a href='#L323'>323</a>
|
|
389
|
+
<a name='L324'></a><a href='#L324'>324</a>
|
|
390
|
+
<a name='L325'></a><a href='#L325'>325</a>
|
|
391
|
+
<a name='L326'></a><a href='#L326'>326</a>
|
|
392
|
+
<a name='L327'></a><a href='#L327'>327</a>
|
|
393
|
+
<a name='L328'></a><a href='#L328'>328</a>
|
|
394
|
+
<a name='L329'></a><a href='#L329'>329</a>
|
|
395
|
+
<a name='L330'></a><a href='#L330'>330</a>
|
|
396
|
+
<a name='L331'></a><a href='#L331'>331</a>
|
|
397
|
+
<a name='L332'></a><a href='#L332'>332</a>
|
|
398
|
+
<a name='L333'></a><a href='#L333'>333</a>
|
|
399
|
+
<a name='L334'></a><a href='#L334'>334</a>
|
|
400
|
+
<a name='L335'></a><a href='#L335'>335</a>
|
|
401
|
+
<a name='L336'></a><a href='#L336'>336</a>
|
|
402
|
+
<a name='L337'></a><a href='#L337'>337</a>
|
|
403
|
+
<a name='L338'></a><a href='#L338'>338</a>
|
|
404
|
+
<a name='L339'></a><a href='#L339'>339</a>
|
|
405
|
+
<a name='L340'></a><a href='#L340'>340</a>
|
|
406
|
+
<a name='L341'></a><a href='#L341'>341</a>
|
|
407
|
+
<a name='L342'></a><a href='#L342'>342</a>
|
|
408
|
+
<a name='L343'></a><a href='#L343'>343</a>
|
|
409
|
+
<a name='L344'></a><a href='#L344'>344</a>
|
|
410
|
+
<a name='L345'></a><a href='#L345'>345</a>
|
|
411
|
+
<a name='L346'></a><a href='#L346'>346</a>
|
|
412
|
+
<a name='L347'></a><a href='#L347'>347</a>
|
|
413
|
+
<a name='L348'></a><a href='#L348'>348</a>
|
|
414
|
+
<a name='L349'></a><a href='#L349'>349</a>
|
|
415
|
+
<a name='L350'></a><a href='#L350'>350</a>
|
|
416
|
+
<a name='L351'></a><a href='#L351'>351</a>
|
|
417
|
+
<a name='L352'></a><a href='#L352'>352</a>
|
|
418
|
+
<a name='L353'></a><a href='#L353'>353</a>
|
|
419
|
+
<a name='L354'></a><a href='#L354'>354</a>
|
|
420
|
+
<a name='L355'></a><a href='#L355'>355</a>
|
|
421
|
+
<a name='L356'></a><a href='#L356'>356</a>
|
|
422
|
+
<a name='L357'></a><a href='#L357'>357</a>
|
|
423
|
+
<a name='L358'></a><a href='#L358'>358</a>
|
|
424
|
+
<a name='L359'></a><a href='#L359'>359</a>
|
|
425
|
+
<a name='L360'></a><a href='#L360'>360</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
332
426
|
<span class="cline-any cline-neutral"> </span>
|
|
333
427
|
<span class="cline-any cline-neutral"> </span>
|
|
334
428
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -358,44 +452,40 @@
|
|
|
358
452
|
<span class="cline-any cline-neutral"> </span>
|
|
359
453
|
<span class="cline-any cline-neutral"> </span>
|
|
360
454
|
<span class="cline-any cline-neutral"> </span>
|
|
361
|
-
<span class="cline-any cline-yes">10x</span>
|
|
362
455
|
<span class="cline-any cline-neutral"> </span>
|
|
363
|
-
<span class="cline-any cline-no"> </span>
|
|
364
|
-
<span class="cline-any cline-no"> </span>
|
|
365
|
-
<span class="cline-any cline-no"> </span>
|
|
366
456
|
<span class="cline-any cline-neutral"> </span>
|
|
367
|
-
<span class="cline-any cline-no"> </span>
|
|
368
457
|
<span class="cline-any cline-neutral"> </span>
|
|
458
|
+
<span class="cline-any cline-yes">5x</span>
|
|
459
|
+
<span class="cline-any cline-yes">5x</span>
|
|
369
460
|
<span class="cline-any cline-neutral"> </span>
|
|
461
|
+
<span class="cline-any cline-yes">5x</span>
|
|
462
|
+
<span class="cline-any cline-yes">5x</span>
|
|
370
463
|
<span class="cline-any cline-neutral"> </span>
|
|
371
|
-
<span class="cline-any cline-
|
|
464
|
+
<span class="cline-any cline-yes">5x</span>
|
|
372
465
|
<span class="cline-any cline-neutral"> </span>
|
|
373
466
|
<span class="cline-any cline-neutral"> </span>
|
|
374
|
-
<span class="cline-any cline-no"> </span>
|
|
375
|
-
<span class="cline-any cline-no"> </span>
|
|
376
467
|
<span class="cline-any cline-neutral"> </span>
|
|
468
|
+
<span class="cline-any cline-yes">5x</span>
|
|
377
469
|
<span class="cline-any cline-neutral"> </span>
|
|
470
|
+
<span class="cline-any cline-yes">5x</span>
|
|
378
471
|
<span class="cline-any cline-neutral"> </span>
|
|
379
472
|
<span class="cline-any cline-neutral"> </span>
|
|
473
|
+
<span class="cline-any cline-yes">5x</span>
|
|
474
|
+
<span class="cline-any cline-yes">5x</span>
|
|
380
475
|
<span class="cline-any cline-neutral"> </span>
|
|
381
|
-
<span class="cline-any cline-no"> </span>
|
|
382
476
|
<span class="cline-any cline-neutral"> </span>
|
|
383
477
|
<span class="cline-any cline-neutral"> </span>
|
|
384
478
|
<span class="cline-any cline-neutral"> </span>
|
|
385
479
|
<span class="cline-any cline-neutral"> </span>
|
|
480
|
+
<span class="cline-any cline-no"> </span>
|
|
481
|
+
<span class="cline-any cline-neutral"> </span>
|
|
482
|
+
<span class="cline-any cline-neutral"> </span>
|
|
386
483
|
<span class="cline-any cline-neutral"> </span>
|
|
387
484
|
<span class="cline-any cline-neutral"> </span>
|
|
388
485
|
<span class="cline-any cline-neutral"> </span>
|
|
389
|
-
<span class="cline-any cline-no"> </span>
|
|
390
|
-
<span class="cline-any cline-no"> </span>
|
|
391
|
-
<span class="cline-any cline-no"> </span>
|
|
392
486
|
<span class="cline-any cline-neutral"> </span>
|
|
393
487
|
<span class="cline-any cline-neutral"> </span>
|
|
394
488
|
<span class="cline-any cline-neutral"> </span>
|
|
395
|
-
<span class="cline-any cline-no"> </span>
|
|
396
|
-
<span class="cline-any cline-no"> </span>
|
|
397
|
-
<span class="cline-any cline-no"> </span>
|
|
398
|
-
<span class="cline-any cline-no"> </span>
|
|
399
489
|
<span class="cline-any cline-neutral"> </span>
|
|
400
490
|
<span class="cline-any cline-neutral"> </span>
|
|
401
491
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -403,21 +493,27 @@
|
|
|
403
493
|
<span class="cline-any cline-neutral"> </span>
|
|
404
494
|
<span class="cline-any cline-neutral"> </span>
|
|
405
495
|
<span class="cline-any cline-neutral"> </span>
|
|
406
|
-
<span class="cline-any cline-no"> </span>
|
|
407
496
|
<span class="cline-any cline-neutral"> </span>
|
|
497
|
+
<span class="cline-any cline-yes">5x</span>
|
|
408
498
|
<span class="cline-any cline-neutral"> </span>
|
|
499
|
+
<span class="cline-any cline-neutral"> </span>
|
|
500
|
+
<span class="cline-any cline-no"> </span>
|
|
409
501
|
<span class="cline-any cline-no"> </span>
|
|
410
502
|
<span class="cline-any cline-no"> </span>
|
|
411
503
|
<span class="cline-any cline-no"> </span>
|
|
412
504
|
<span class="cline-any cline-no"> </span>
|
|
413
505
|
<span class="cline-any cline-neutral"> </span>
|
|
414
506
|
<span class="cline-any cline-neutral"> </span>
|
|
507
|
+
<span class="cline-any cline-neutral"> </span>
|
|
508
|
+
<span class="cline-any cline-no"> </span>
|
|
415
509
|
<span class="cline-any cline-no"> </span>
|
|
416
510
|
<span class="cline-any cline-no"> </span>
|
|
417
511
|
<span class="cline-any cline-no"> </span>
|
|
418
512
|
<span class="cline-any cline-no"> </span>
|
|
419
513
|
<span class="cline-any cline-neutral"> </span>
|
|
420
514
|
<span class="cline-any cline-neutral"> </span>
|
|
515
|
+
<span class="cline-any cline-neutral"> </span>
|
|
516
|
+
<span class="cline-any cline-no"> </span>
|
|
421
517
|
<span class="cline-any cline-no"> </span>
|
|
422
518
|
<span class="cline-any cline-no"> </span>
|
|
423
519
|
<span class="cline-any cline-no"> </span>
|
|
@@ -428,7 +524,9 @@
|
|
|
428
524
|
<span class="cline-any cline-neutral"> </span>
|
|
429
525
|
<span class="cline-any cline-neutral"> </span>
|
|
430
526
|
<span class="cline-any cline-neutral"> </span>
|
|
527
|
+
<span class="cline-any cline-neutral"> </span>
|
|
431
528
|
<span class="cline-any cline-no"> </span>
|
|
529
|
+
<span class="cline-any cline-neutral"> </span>
|
|
432
530
|
<span class="cline-any cline-no"> </span>
|
|
433
531
|
<span class="cline-any cline-neutral"> </span>
|
|
434
532
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -437,7 +535,28 @@
|
|
|
437
535
|
<span class="cline-any cline-neutral"> </span>
|
|
438
536
|
<span class="cline-any cline-neutral"> </span>
|
|
439
537
|
<span class="cline-any cline-neutral"> </span>
|
|
538
|
+
<span class="cline-any cline-neutral"> </span>
|
|
539
|
+
<span class="cline-any cline-neutral"> </span>
|
|
540
|
+
<span class="cline-any cline-neutral"> </span>
|
|
541
|
+
<span class="cline-any cline-neutral"> </span>
|
|
542
|
+
<span class="cline-any cline-neutral"> </span>
|
|
543
|
+
<span class="cline-any cline-neutral"> </span>
|
|
544
|
+
<span class="cline-any cline-neutral"> </span>
|
|
545
|
+
<span class="cline-any cline-neutral"> </span>
|
|
546
|
+
<span class="cline-any cline-neutral"> </span>
|
|
547
|
+
<span class="cline-any cline-neutral"> </span>
|
|
548
|
+
<span class="cline-any cline-neutral"> </span>
|
|
549
|
+
<span class="cline-any cline-neutral"> </span>
|
|
550
|
+
<span class="cline-any cline-yes">5x</span>
|
|
440
551
|
<span class="cline-any cline-no"> </span>
|
|
552
|
+
<span class="cline-any cline-neutral"> </span>
|
|
553
|
+
<span class="cline-any cline-neutral"> </span>
|
|
554
|
+
<span class="cline-any cline-neutral"> </span>
|
|
555
|
+
<span class="cline-any cline-neutral"> </span>
|
|
556
|
+
<span class="cline-any cline-neutral"> </span>
|
|
557
|
+
<span class="cline-any cline-neutral"> </span>
|
|
558
|
+
<span class="cline-any cline-neutral"> </span>
|
|
559
|
+
<span class="cline-any cline-yes">5x</span>
|
|
441
560
|
<span class="cline-any cline-no"> </span>
|
|
442
561
|
<span class="cline-any cline-no"> </span>
|
|
443
562
|
<span class="cline-any cline-no"> </span>
|
|
@@ -446,7 +565,7 @@
|
|
|
446
565
|
<span class="cline-any cline-neutral"> </span>
|
|
447
566
|
<span class="cline-any cline-neutral"> </span>
|
|
448
567
|
<span class="cline-any cline-neutral"> </span>
|
|
449
|
-
<span class="cline-any cline-
|
|
568
|
+
<span class="cline-any cline-yes">5x</span>
|
|
450
569
|
<span class="cline-any cline-neutral"> </span>
|
|
451
570
|
<span class="cline-any cline-neutral"> </span>
|
|
452
571
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -468,6 +587,18 @@
|
|
|
468
587
|
<span class="cline-any cline-neutral"> </span>
|
|
469
588
|
<span class="cline-any cline-neutral"> </span>
|
|
470
589
|
<span class="cline-any cline-neutral"> </span>
|
|
590
|
+
<span class="cline-any cline-neutral"> </span>
|
|
591
|
+
<span class="cline-any cline-neutral"> </span>
|
|
592
|
+
<span class="cline-any cline-neutral"> </span>
|
|
593
|
+
<span class="cline-any cline-neutral"> </span>
|
|
594
|
+
<span class="cline-any cline-neutral"> </span>
|
|
595
|
+
<span class="cline-any cline-neutral"> </span>
|
|
596
|
+
<span class="cline-any cline-neutral"> </span>
|
|
597
|
+
<span class="cline-any cline-neutral"> </span>
|
|
598
|
+
<span class="cline-any cline-neutral"> </span>
|
|
599
|
+
<span class="cline-any cline-neutral"> </span>
|
|
600
|
+
<span class="cline-any cline-neutral"> </span>
|
|
601
|
+
<span class="cline-any cline-neutral"> </span>
|
|
471
602
|
<span class="cline-any cline-no"> </span>
|
|
472
603
|
<span class="cline-any cline-neutral"> </span>
|
|
473
604
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -478,6 +609,7 @@
|
|
|
478
609
|
<span class="cline-any cline-neutral"> </span>
|
|
479
610
|
<span class="cline-any cline-neutral"> </span>
|
|
480
611
|
<span class="cline-any cline-neutral"> </span>
|
|
612
|
+
<span class="cline-any cline-neutral"> </span>
|
|
481
613
|
<span class="cline-any cline-no"> </span>
|
|
482
614
|
<span class="cline-any cline-neutral"> </span>
|
|
483
615
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -488,6 +620,14 @@
|
|
|
488
620
|
<span class="cline-any cline-neutral"> </span>
|
|
489
621
|
<span class="cline-any cline-neutral"> </span>
|
|
490
622
|
<span class="cline-any cline-neutral"> </span>
|
|
623
|
+
<span class="cline-any cline-neutral"> </span>
|
|
624
|
+
<span class="cline-any cline-neutral"> </span>
|
|
625
|
+
<span class="cline-any cline-neutral"> </span>
|
|
626
|
+
<span class="cline-any cline-neutral"> </span>
|
|
627
|
+
<span class="cline-any cline-neutral"> </span>
|
|
628
|
+
<span class="cline-any cline-neutral"> </span>
|
|
629
|
+
<span class="cline-any cline-neutral"> </span>
|
|
630
|
+
<span class="cline-any cline-neutral"> </span>
|
|
491
631
|
<span class="cline-any cline-no"> </span>
|
|
492
632
|
<span class="cline-any cline-no"> </span>
|
|
493
633
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -501,6 +641,13 @@
|
|
|
501
641
|
<span class="cline-any cline-neutral"> </span>
|
|
502
642
|
<span class="cline-any cline-neutral"> </span>
|
|
503
643
|
<span class="cline-any cline-neutral"> </span>
|
|
644
|
+
<span class="cline-any cline-neutral"> </span>
|
|
645
|
+
<span class="cline-any cline-neutral"> </span>
|
|
646
|
+
<span class="cline-any cline-neutral"> </span>
|
|
647
|
+
<span class="cline-any cline-neutral"> </span>
|
|
648
|
+
<span class="cline-any cline-neutral"> </span>
|
|
649
|
+
<span class="cline-any cline-neutral"> </span>
|
|
650
|
+
<span class="cline-any cline-neutral"> </span>
|
|
504
651
|
<span class="cline-any cline-no"> </span>
|
|
505
652
|
<span class="cline-any cline-neutral"> </span>
|
|
506
653
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -533,7 +680,18 @@
|
|
|
533
680
|
<span class="cline-any cline-neutral"> </span>
|
|
534
681
|
<span class="cline-any cline-neutral"> </span>
|
|
535
682
|
<span class="cline-any cline-neutral"> </span>
|
|
536
|
-
<span class="cline-any cline-
|
|
683
|
+
<span class="cline-any cline-neutral"> </span>
|
|
684
|
+
<span class="cline-any cline-neutral"> </span>
|
|
685
|
+
<span class="cline-any cline-neutral"> </span>
|
|
686
|
+
<span class="cline-any cline-neutral"> </span>
|
|
687
|
+
<span class="cline-any cline-neutral"> </span>
|
|
688
|
+
<span class="cline-any cline-neutral"> </span>
|
|
689
|
+
<span class="cline-any cline-neutral"> </span>
|
|
690
|
+
<span class="cline-any cline-neutral"> </span>
|
|
691
|
+
<span class="cline-any cline-neutral"> </span>
|
|
692
|
+
<span class="cline-any cline-neutral"> </span>
|
|
693
|
+
<span class="cline-any cline-neutral"> </span>
|
|
694
|
+
<span class="cline-any cline-neutral"> </span>
|
|
537
695
|
<span class="cline-any cline-neutral"> </span>
|
|
538
696
|
<span class="cline-any cline-neutral"> </span>
|
|
539
697
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -559,6 +717,35 @@
|
|
|
559
717
|
<span class="cline-any cline-neutral"> </span>
|
|
560
718
|
<span class="cline-any cline-neutral"> </span>
|
|
561
719
|
<span class="cline-any cline-neutral"> </span>
|
|
720
|
+
<span class="cline-any cline-yes">100x</span>
|
|
721
|
+
<span class="cline-any cline-neutral"> </span>
|
|
722
|
+
<span class="cline-any cline-neutral"> </span>
|
|
723
|
+
<span class="cline-any cline-neutral"> </span>
|
|
724
|
+
<span class="cline-any cline-neutral"> </span>
|
|
725
|
+
<span class="cline-any cline-neutral"> </span>
|
|
726
|
+
<span class="cline-any cline-neutral"> </span>
|
|
727
|
+
<span class="cline-any cline-neutral"> </span>
|
|
728
|
+
<span class="cline-any cline-neutral"> </span>
|
|
729
|
+
<span class="cline-any cline-neutral"> </span>
|
|
730
|
+
<span class="cline-any cline-neutral"> </span>
|
|
731
|
+
<span class="cline-any cline-neutral"> </span>
|
|
732
|
+
<span class="cline-any cline-neutral"> </span>
|
|
733
|
+
<span class="cline-any cline-neutral"> </span>
|
|
734
|
+
<span class="cline-any cline-neutral"> </span>
|
|
735
|
+
<span class="cline-any cline-neutral"> </span>
|
|
736
|
+
<span class="cline-any cline-neutral"> </span>
|
|
737
|
+
<span class="cline-any cline-neutral"> </span>
|
|
738
|
+
<span class="cline-any cline-neutral"> </span>
|
|
739
|
+
<span class="cline-any cline-neutral"> </span>
|
|
740
|
+
<span class="cline-any cline-neutral"> </span>
|
|
741
|
+
<span class="cline-any cline-neutral"> </span>
|
|
742
|
+
<span class="cline-any cline-neutral"> </span>
|
|
743
|
+
<span class="cline-any cline-neutral"> </span>
|
|
744
|
+
<span class="cline-any cline-neutral"> </span>
|
|
745
|
+
<span class="cline-any cline-neutral"> </span>
|
|
746
|
+
<span class="cline-any cline-neutral"> </span>
|
|
747
|
+
<span class="cline-any cline-neutral"> </span>
|
|
748
|
+
<span class="cline-any cline-neutral"> </span>
|
|
562
749
|
<span class="cline-any cline-neutral"> </span>
|
|
563
750
|
<span class="cline-any cline-neutral"> </span>
|
|
564
751
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -591,23 +778,25 @@
|
|
|
591
778
|
<span class="cline-any cline-neutral"> </span>
|
|
592
779
|
<span class="cline-any cline-neutral"> </span>
|
|
593
780
|
<span class="cline-any cline-neutral"> </span>
|
|
594
|
-
<span class="cline-any cline-neutral"> </span
|
|
781
|
+
<span class="cline-any cline-neutral"> </span>
|
|
782
|
+
<span class="cline-any cline-neutral"> </span>
|
|
783
|
+
<span class="cline-any cline-neutral"> </span>
|
|
784
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useState, useContext } from 'react';
|
|
595
785
|
import PropTypes from 'prop-types';
|
|
596
786
|
|
|
597
787
|
import compose from 'compose-function';
|
|
598
788
|
|
|
599
|
-
import { FormattedMessage, useIntl } from 'react-intl';
|
|
600
|
-
|
|
601
789
|
import { useQueryClient } from 'react-query';
|
|
602
790
|
|
|
603
791
|
import { Button, ConfirmationModal, Icon, Pane } from '@folio/stripes/components';
|
|
604
|
-
|
|
792
|
+
import { CalloutContext } from '@folio/stripes/core';
|
|
605
793
|
import FormModal from '../../FormModal/FormModal';
|
|
606
794
|
|
|
607
795
|
import CustomPropertiesLookup from './CustomPropertiesLookup';
|
|
608
796
|
import CustomPropertyView from './CustomPropertyView';
|
|
609
797
|
import CustomPropertiesForm from './CustomPropertyForm';
|
|
610
|
-
import { useMutateCustomProperties, useRefdata } from '../../hooks';
|
|
798
|
+
import { useKintIntl, useMutateCustomProperties, useRefdata } from '../../hooks';
|
|
799
|
+
import { parseErrorResponse } from '../../utils';
|
|
611
800
|
|
|
612
801
|
const EDITING = 'edit';
|
|
613
802
|
const CREATING = 'create';
|
|
@@ -616,27 +805,32 @@ const VIEWING = 'view';
|
|
|
616
805
|
// A default option for setting up panes manually
|
|
617
806
|
const CustomPropertiesSettings = ({
|
|
618
807
|
afterQueryCalls,
|
|
808
|
+
catchQueryCalls,
|
|
619
809
|
contextFilterOptions,
|
|
620
810
|
customPropertiesEndpoint,
|
|
621
811
|
helpPopovers,
|
|
622
|
-
|
|
812
|
+
intlKey: passedIntlKey,
|
|
813
|
+
intlNS: passedIntlNS,
|
|
814
|
+
labelOverrides = {},
|
|
623
815
|
refdataEndpoint,
|
|
624
816
|
}) => {
|
|
817
|
+
const callout = useContext(CalloutContext);
|
|
625
818
|
const queryClient = useQueryClient();
|
|
626
819
|
|
|
627
|
-
const
|
|
628
|
-
const [
|
|
629
|
-
const [deleteModal, setDeleteModal] = <span class="cstat-no" title="statement not covered" >useState(false);</span>
|
|
820
|
+
const [customProperty, setCustomProperty] = useState();
|
|
821
|
+
const [deleteModal, setDeleteModal] = useState(false);
|
|
630
822
|
|
|
631
|
-
const refdata =
|
|
823
|
+
const refdata = useRefdata({
|
|
632
824
|
endpoint: refdataEndpoint,
|
|
633
825
|
});
|
|
634
826
|
|
|
635
|
-
const [mode, setMode] =
|
|
827
|
+
const [mode, setMode] = useState(VIEWING);
|
|
828
|
+
|
|
829
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
636
830
|
|
|
637
831
|
// Default props that need hooks are hard
|
|
638
|
-
let renderContextFilterOptions =
|
|
639
|
-
<span class="
|
|
832
|
+
let renderContextFilterOptions = contextFilterOptions;
|
|
833
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (!contextFilterOptions) {
|
|
640
834
|
/*
|
|
641
835
|
Default is {value: '', label: 'All'}, empty string will map to ALL contexts
|
|
642
836
|
If null context is needed, use
|
|
@@ -645,54 +839,74 @@ const CustomPropertiesSettings = ({
|
|
|
645
839
|
<span class="cstat-no" title="statement not covered" > renderContextFilterOptions = [</span>
|
|
646
840
|
{
|
|
647
841
|
value: '', // empty string is all custoprop contexts
|
|
648
|
-
label:
|
|
842
|
+
label: kintIntl.formatKintMessage(
|
|
843
|
+
{
|
|
844
|
+
id: 'customProperties.config.all',
|
|
845
|
+
overrideValue: labelOverrides?.all,
|
|
846
|
+
},
|
|
847
|
+
)
|
|
649
848
|
}
|
|
650
849
|
];
|
|
651
850
|
}
|
|
652
|
-
|
|
653
|
-
let renderViewPaneTitle = <span class="cstat-no" title="statement not covered" >labelOverrides?.viewPaneTitle;</span>
|
|
654
|
-
<span class="cstat-no" title="statement not covered" > if (renderViewPaneTitle instanceof Function) {</span>
|
|
655
|
-
<span class="cstat-no" title="statement not covered" > renderViewPaneTitle = renderViewPaneTitle(customProperty);</span>
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
// Defaulting is hard
|
|
659
|
-
const afterQueryCallsSafe = <span class="cstat-no" title="statement not covered" >{</span>
|
|
660
|
-
put: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >null,</span>
|
|
661
|
-
post: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >null,</span>
|
|
662
|
-
delete: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >null,</span>
|
|
663
|
-
...afterQueryCalls
|
|
664
|
-
};
|
|
665
851
|
|
|
666
852
|
const {
|
|
667
853
|
post: createCustprop,
|
|
668
854
|
put: editCustProp,
|
|
669
855
|
delete: deleteCustProp
|
|
670
|
-
} =
|
|
856
|
+
} = useMutateCustomProperties({
|
|
671
857
|
afterQueryCalls: {
|
|
672
858
|
put: <span class="fstat-no" title="function not covered" >re</span>s => {
|
|
673
859
|
<span class="cstat-no" title="statement not covered" > setMode(VIEWING);</span>
|
|
674
860
|
<span class="cstat-no" title="statement not covered" > queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);</span>
|
|
675
861
|
<span class="cstat-no" title="statement not covered" > setCustomProperty(res);</span>
|
|
676
|
-
<span class="cstat-no" title="statement not covered" >
|
|
862
|
+
<span class="cstat-no" title="statement not covered" > if (afterQueryCalls?.put) {</span>
|
|
863
|
+
<span class="cstat-no" title="statement not covered" > afterQueryCalls.put(res);</span>
|
|
864
|
+
}
|
|
677
865
|
},
|
|
678
866
|
post: <span class="fstat-no" title="function not covered" >re</span>s => {
|
|
679
867
|
<span class="cstat-no" title="statement not covered" > setMode(VIEWING);</span>
|
|
680
868
|
<span class="cstat-no" title="statement not covered" > queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);</span>
|
|
681
869
|
<span class="cstat-no" title="statement not covered" > setCustomProperty(res);</span>
|
|
682
|
-
<span class="cstat-no" title="statement not covered" >
|
|
870
|
+
<span class="cstat-no" title="statement not covered" > if (afterQueryCalls?.post) {</span>
|
|
871
|
+
<span class="cstat-no" title="statement not covered" > afterQueryCalls.post(res);</span>
|
|
872
|
+
}
|
|
683
873
|
},
|
|
684
874
|
delete: <span class="fstat-no" title="function not covered" >re</span>s => {
|
|
685
875
|
<span class="cstat-no" title="statement not covered" > setMode(VIEWING);</span>
|
|
686
876
|
<span class="cstat-no" title="statement not covered" > queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);</span>
|
|
687
877
|
<span class="cstat-no" title="statement not covered" > setCustomProperty();</span>
|
|
688
|
-
<span class="cstat-no" title="statement not covered" >
|
|
878
|
+
<span class="cstat-no" title="statement not covered" > if (afterQueryCalls?.delete) {</span>
|
|
879
|
+
<span class="cstat-no" title="statement not covered" > afterQueryCalls.delete(res);</span>
|
|
880
|
+
}
|
|
689
881
|
}
|
|
690
882
|
},
|
|
883
|
+
catchQueryCalls: {
|
|
884
|
+
// Default delete behaviour is to fire a callout, either with kint-components default message
|
|
885
|
+
// or one provided in labelOverrides, which is passed the error message and customProperty in question
|
|
886
|
+
delete: <span class="fstat-no" title="function not covered" >as</span>ync (err) => {
|
|
887
|
+
const errorResp = <span class="cstat-no" title="statement not covered" >await parseErrorResponse(err.response);</span>
|
|
888
|
+
|
|
889
|
+
<span class="cstat-no" title="statement not covered" > callout.sendCallout({</span>
|
|
890
|
+
message: kintIntl.formatKintMessage(
|
|
891
|
+
{
|
|
892
|
+
id: 'customProperties.config.delete.errorMessage',
|
|
893
|
+
overrideValue: labelOverrides?.deleteError
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
error: errorResp?.message,
|
|
897
|
+
label: customProperty?.label
|
|
898
|
+
}
|
|
899
|
+
),
|
|
900
|
+
type: 'error',
|
|
901
|
+
});
|
|
902
|
+
},
|
|
903
|
+
...catchQueryCalls // Override defaults here
|
|
904
|
+
},
|
|
691
905
|
endpoint: customPropertiesEndpoint,
|
|
692
906
|
id: customProperty?.id
|
|
693
907
|
});
|
|
694
908
|
|
|
695
|
-
const handeContextSubmit = <span class="
|
|
909
|
+
const handeContextSubmit = <span class="fstat-no" title="function not covered" >(s</span>ubmitData) => {
|
|
696
910
|
<span class="cstat-no" title="statement not covered" > return {</span>
|
|
697
911
|
...submitData,
|
|
698
912
|
ctx: submitData?.ctx?.[0]?.value
|
|
@@ -701,7 +915,7 @@ const CustomPropertiesSettings = ({
|
|
|
701
915
|
|
|
702
916
|
// When POSTing a custom property, the backend expects a shorthand "Integer" or "LocalDate"
|
|
703
917
|
// When PUTing a custom property, the backend needs the full class name
|
|
704
|
-
const handleType = <span class="
|
|
918
|
+
const handleType = <span class="fstat-no" title="function not covered" >(s</span>ubmitData) => {
|
|
705
919
|
const typeRegex = <span class="cstat-no" title="statement not covered" >/(com\.k_int\.web\.toolkit\.custprops\.types\.CustomProperty)(.*)/g;</span>
|
|
706
920
|
const typeMatch = <span class="cstat-no" title="statement not covered" >typeRegex.exec(submitData?.type) ?? [];</span>
|
|
707
921
|
<span class="cstat-no" title="statement not covered" > return {</span>
|
|
@@ -710,7 +924,7 @@ const CustomPropertiesSettings = ({
|
|
|
710
924
|
};
|
|
711
925
|
};
|
|
712
926
|
|
|
713
|
-
|
|
927
|
+
return (
|
|
714
928
|
<>
|
|
715
929
|
<Pane
|
|
716
930
|
defaultWidth="fill"
|
|
@@ -721,34 +935,55 @@ const CustomPropertiesSettings = ({
|
|
|
721
935
|
marginBottom0
|
|
722
936
|
onClick={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setMode(CREATING)}</span> // TODO do we need to clear form here too?
|
|
723
937
|
>
|
|
724
|
-
|
|
938
|
+
{
|
|
939
|
+
kintIntl.formatKintMessage(
|
|
940
|
+
{
|
|
941
|
+
id: 'new',
|
|
942
|
+
overrideValue: labelOverrides?.new,
|
|
943
|
+
}
|
|
944
|
+
)
|
|
945
|
+
}
|
|
725
946
|
</Button>
|
|
726
947
|
}
|
|
727
|
-
paneTitle={
|
|
728
|
-
|
|
948
|
+
paneTitle={
|
|
949
|
+
kintIntl.formatKintMessage({
|
|
950
|
+
id: 'customProperties',
|
|
951
|
+
overrideValue: labelOverrides.paneTitle
|
|
952
|
+
})
|
|
729
953
|
}
|
|
730
954
|
>
|
|
731
955
|
<CustomPropertiesLookup
|
|
732
956
|
contextFilterOptions={renderContextFilterOptions}
|
|
733
957
|
customPropertiesEndpoint={customPropertiesEndpoint}
|
|
958
|
+
intlKey={passedIntlKey}
|
|
959
|
+
intlNS={passedIntlNS}
|
|
734
960
|
labelOverrides={labelOverrides}
|
|
735
961
|
onSelectCustomProperty={<span class="fstat-no" title="function not covered" >(_</span>e, cp) => <span class="cstat-no" title="statement not covered" >setCustomProperty(cp)}</span>
|
|
736
962
|
/>
|
|
737
963
|
</Pane>
|
|
738
964
|
{customProperty &&
|
|
739
|
-
<Pane
|
|
965
|
+
<span class="branch-1 cbranch-no" title="branch not covered" > <Pane</span>
|
|
740
966
|
actionMenu={<span class="fstat-no" title="function not covered" >({</span> onToggle }) => (
|
|
741
967
|
<span class="cstat-no" title="statement not covered" > [</span>
|
|
742
968
|
<Button
|
|
969
|
+
key={`${customProperty.name}-action-edit`}
|
|
743
970
|
buttonStyle="dropdownItem"
|
|
744
971
|
marginBottom0
|
|
745
972
|
onClick={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setMode(EDITING)}</span>
|
|
746
973
|
>
|
|
747
974
|
<Icon icon="edit">
|
|
748
|
-
|
|
975
|
+
{
|
|
976
|
+
kintIntl.formatKintMessage(
|
|
977
|
+
{
|
|
978
|
+
id: 'edit',
|
|
979
|
+
overrideValue: labelOverrides?.edit,
|
|
980
|
+
}
|
|
981
|
+
)
|
|
982
|
+
}
|
|
749
983
|
</Icon>
|
|
750
984
|
</Button>,
|
|
751
985
|
<Button
|
|
986
|
+
key={`${customProperty.name}-action-delete`}
|
|
752
987
|
buttonStyle="dropdownItem"
|
|
753
988
|
marginBottom0
|
|
754
989
|
onClick={<span class="fstat-no" title="function not covered" >()</span> => {
|
|
@@ -757,7 +992,14 @@ const CustomPropertiesSettings = ({
|
|
|
757
992
|
}}
|
|
758
993
|
>
|
|
759
994
|
<Icon icon="trash">
|
|
760
|
-
|
|
995
|
+
{
|
|
996
|
+
kintIntl.formatKintMessage(
|
|
997
|
+
{
|
|
998
|
+
id: 'delete',
|
|
999
|
+
overrideValue: labelOverrides?.delete,
|
|
1000
|
+
}
|
|
1001
|
+
)
|
|
1002
|
+
}
|
|
761
1003
|
</Icon>
|
|
762
1004
|
</Button>
|
|
763
1005
|
]
|
|
@@ -767,19 +1009,30 @@ const CustomPropertiesSettings = ({
|
|
|
767
1009
|
id="settings-customProperties-viewPane"
|
|
768
1010
|
onClose={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setCustomProperty()}</span>
|
|
769
1011
|
paneTitle={
|
|
770
|
-
|
|
1012
|
+
kintIntl.formatKintMessage(
|
|
1013
|
+
{
|
|
1014
|
+
id: 'customProperties.config.viewPaneTitle',
|
|
1015
|
+
overrideValue: labelOverrides?.viewPaneTitle,
|
|
1016
|
+
fallbackMessage: customProperty?.label ?? customProperty?.name,
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
name: customProperty?.label ?? customProperty?.name,
|
|
1020
|
+
}
|
|
1021
|
+
)
|
|
771
1022
|
}
|
|
772
1023
|
>
|
|
773
1024
|
<CustomPropertyView
|
|
774
1025
|
customProperty={customProperty}
|
|
775
1026
|
helpPopovers={helpPopovers}
|
|
1027
|
+
intlKey={passedIntlKey}
|
|
1028
|
+
intlNS={passedIntlNS}
|
|
776
1029
|
labelOverrides={labelOverrides}
|
|
777
1030
|
/>
|
|
778
1031
|
</Pane>
|
|
779
1032
|
}
|
|
780
1033
|
<FormModal
|
|
781
1034
|
initialValues={mode === CREATING ?
|
|
782
|
-
{
|
|
1035
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > {</span>
|
|
783
1036
|
weight: 0,
|
|
784
1037
|
primary: true,
|
|
785
1038
|
retired: false,
|
|
@@ -787,49 +1040,78 @@ const CustomPropertiesSettings = ({
|
|
|
787
1040
|
} :
|
|
788
1041
|
{
|
|
789
1042
|
...customProperty,
|
|
790
|
-
ctx: customProperty?.ctx ? [{ value: customProperty.ctx, label: customProperty.ctx }]
|
|
791
|
-
category: customProperty?.category ? customProperty?.category?.id
|
|
1043
|
+
ctx: customProperty?.ctx ? <span class="branch-0 cbranch-no" title="branch not covered" >[{ value: customProperty.ctx, label: customProperty.ctx }] </span>: null,
|
|
1044
|
+
category: customProperty?.category ? <span class="branch-0 cbranch-no" title="branch not covered" >customProperty?.category?.id </span>: null
|
|
792
1045
|
}
|
|
793
1046
|
}
|
|
794
1047
|
modalProps={{
|
|
795
1048
|
dismissible: true,
|
|
796
1049
|
label: mode === CREATING ?
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
1050
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > kintIntl.formatKintMessage(</span>
|
|
1051
|
+
{
|
|
1052
|
+
id: 'customProperties.config.newModal',
|
|
1053
|
+
overrideValue: labelOverrides?.newModalTitle
|
|
1054
|
+
}
|
|
1055
|
+
) :
|
|
1056
|
+
kintIntl.formatKintMessage(
|
|
1057
|
+
{
|
|
1058
|
+
id: 'customProperties.config.editModal',
|
|
1059
|
+
overrideValue: labelOverrides?.editModalTitle
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
name: customProperty?.label ?? customProperty?.name,
|
|
1063
|
+
}
|
|
1064
|
+
),
|
|
800
1065
|
onClose: <span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setMode(VIEWING),</span>
|
|
801
1066
|
open: (mode === CREATING || mode === EDITING)
|
|
802
1067
|
}}
|
|
803
1068
|
onSubmit={mode === CREATING ?
|
|
804
|
-
compose(createCustprop, handeContextSubmit, handleType)
|
|
1069
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > compose(createCustprop, handeContextSubmit, handleType) </span>:
|
|
805
1070
|
compose(editCustProp, handeContextSubmit)
|
|
806
1071
|
}
|
|
807
1072
|
>
|
|
808
1073
|
<CustomPropertiesForm
|
|
809
1074
|
contextFilterOptions={renderContextFilterOptions}
|
|
810
1075
|
helpPopovers={helpPopovers}
|
|
1076
|
+
intlKey={passedIntlKey}
|
|
1077
|
+
intlNS={passedIntlNS}
|
|
811
1078
|
labelOverrides={labelOverrides}
|
|
812
|
-
refdata={refdata.map(
|
|
1079
|
+
refdata={refdata.map(rdc => ({ label: rdc.desc, value: rdc.id }))}
|
|
813
1080
|
/>
|
|
814
1081
|
</FormModal>
|
|
815
1082
|
<ConfirmationModal
|
|
816
1083
|
buttonStyle="danger"
|
|
817
1084
|
confirmLabel={
|
|
818
|
-
|
|
819
|
-
|
|
1085
|
+
kintIntl.formatKintMessage(
|
|
1086
|
+
{
|
|
1087
|
+
id: 'delete',
|
|
1088
|
+
overrideValue: labelOverrides?.delete,
|
|
1089
|
+
}
|
|
1090
|
+
)
|
|
820
1091
|
}
|
|
821
1092
|
heading={
|
|
822
|
-
|
|
823
|
-
|
|
1093
|
+
kintIntl.formatKintMessage(
|
|
1094
|
+
{
|
|
1095
|
+
id: 'customProperties.config.delete.confirmHeading',
|
|
1096
|
+
overrideValue: labelOverrides?.confirmHeading
|
|
1097
|
+
}
|
|
1098
|
+
)
|
|
824
1099
|
}
|
|
825
|
-
id="delete-
|
|
1100
|
+
id="delete-custprop-confirmation"
|
|
826
1101
|
message={
|
|
827
|
-
|
|
828
|
-
|
|
1102
|
+
kintIntl.formatKintMessage(
|
|
1103
|
+
{
|
|
1104
|
+
id: 'customProperties.config.delete.confirmMessage',
|
|
1105
|
+
overrideValue: labelOverrides?.confirmMessage
|
|
1106
|
+
},
|
|
1107
|
+
{
|
|
1108
|
+
name: customProperty?.label ?? customProperty?.name,
|
|
1109
|
+
}
|
|
1110
|
+
)
|
|
829
1111
|
}
|
|
830
1112
|
onCancel={<span class="fstat-no" title="function not covered" >()</span> => <span class="cstat-no" title="statement not covered" >setDeleteModal(false)}</span>
|
|
831
1113
|
onConfirm={<span class="fstat-no" title="function not covered" >()</span> => {
|
|
832
|
-
<span class="cstat-no" title="statement not covered" > deleteCustProp();</span>
|
|
1114
|
+
<span class="cstat-no" title="statement not covered" > deleteCustProp(customProperty?.id);</span>
|
|
833
1115
|
<span class="cstat-no" title="statement not covered" > setCustomProperty();</span>
|
|
834
1116
|
<span class="cstat-no" title="statement not covered" > setDeleteModal(false);</span>
|
|
835
1117
|
}}
|
|
@@ -841,6 +1123,7 @@ const CustomPropertiesSettings = ({
|
|
|
841
1123
|
|
|
842
1124
|
CustomPropertiesSettings.propTypes = {
|
|
843
1125
|
afterQueryCalls: PropTypes.object,
|
|
1126
|
+
catchQueryCalls: PropTypes.object,
|
|
844
1127
|
contextFilterOptions: PropTypes.arrayOf(PropTypes.shape({
|
|
845
1128
|
value: PropTypes.string,
|
|
846
1129
|
label: PropTypes.oneOfType([
|
|
@@ -850,6 +1133,8 @@ CustomPropertiesSettings.propTypes = {
|
|
|
850
1133
|
})),
|
|
851
1134
|
customPropertiesEndpoint: PropTypes.string,
|
|
852
1135
|
helpPopovers: PropTypes.object,
|
|
1136
|
+
intlKey: PropTypes.string,
|
|
1137
|
+
intlNS: PropTypes.string,
|
|
853
1138
|
labelOverrides: PropTypes.object,
|
|
854
1139
|
refdataEndpoint: PropTypes.string,
|
|
855
1140
|
};
|
|
@@ -862,7 +1147,7 @@ export default CustomPropertiesSettings;
|
|
|
862
1147
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
863
1148
|
Code coverage generated by
|
|
864
1149
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
865
|
-
at
|
|
1150
|
+
at 2022-09-16T13:23:25.290Z
|
|
866
1151
|
</div>
|
|
867
1152
|
<script src="../../prettify.js"></script>
|
|
868
1153
|
<script>
|