@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">83.33% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>45/54</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">68.75% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>22/32</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">88.88% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>16/18</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">84.31% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>43/51</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>
|
|
@@ -257,7 +257,61 @@
|
|
|
257
257
|
<a name='L192'></a><a href='#L192'>192</a>
|
|
258
258
|
<a name='L193'></a><a href='#L193'>193</a>
|
|
259
259
|
<a name='L194'></a><a href='#L194'>194</a>
|
|
260
|
-
<a name='L195'></a><a href='#L195'>195</a
|
|
260
|
+
<a name='L195'></a><a href='#L195'>195</a>
|
|
261
|
+
<a name='L196'></a><a href='#L196'>196</a>
|
|
262
|
+
<a name='L197'></a><a href='#L197'>197</a>
|
|
263
|
+
<a name='L198'></a><a href='#L198'>198</a>
|
|
264
|
+
<a name='L199'></a><a href='#L199'>199</a>
|
|
265
|
+
<a name='L200'></a><a href='#L200'>200</a>
|
|
266
|
+
<a name='L201'></a><a href='#L201'>201</a>
|
|
267
|
+
<a name='L202'></a><a href='#L202'>202</a>
|
|
268
|
+
<a name='L203'></a><a href='#L203'>203</a>
|
|
269
|
+
<a name='L204'></a><a href='#L204'>204</a>
|
|
270
|
+
<a name='L205'></a><a href='#L205'>205</a>
|
|
271
|
+
<a name='L206'></a><a href='#L206'>206</a>
|
|
272
|
+
<a name='L207'></a><a href='#L207'>207</a>
|
|
273
|
+
<a name='L208'></a><a href='#L208'>208</a>
|
|
274
|
+
<a name='L209'></a><a href='#L209'>209</a>
|
|
275
|
+
<a name='L210'></a><a href='#L210'>210</a>
|
|
276
|
+
<a name='L211'></a><a href='#L211'>211</a>
|
|
277
|
+
<a name='L212'></a><a href='#L212'>212</a>
|
|
278
|
+
<a name='L213'></a><a href='#L213'>213</a>
|
|
279
|
+
<a name='L214'></a><a href='#L214'>214</a>
|
|
280
|
+
<a name='L215'></a><a href='#L215'>215</a>
|
|
281
|
+
<a name='L216'></a><a href='#L216'>216</a>
|
|
282
|
+
<a name='L217'></a><a href='#L217'>217</a>
|
|
283
|
+
<a name='L218'></a><a href='#L218'>218</a>
|
|
284
|
+
<a name='L219'></a><a href='#L219'>219</a>
|
|
285
|
+
<a name='L220'></a><a href='#L220'>220</a>
|
|
286
|
+
<a name='L221'></a><a href='#L221'>221</a>
|
|
287
|
+
<a name='L222'></a><a href='#L222'>222</a>
|
|
288
|
+
<a name='L223'></a><a href='#L223'>223</a>
|
|
289
|
+
<a name='L224'></a><a href='#L224'>224</a>
|
|
290
|
+
<a name='L225'></a><a href='#L225'>225</a>
|
|
291
|
+
<a name='L226'></a><a href='#L226'>226</a>
|
|
292
|
+
<a name='L227'></a><a href='#L227'>227</a>
|
|
293
|
+
<a name='L228'></a><a href='#L228'>228</a>
|
|
294
|
+
<a name='L229'></a><a href='#L229'>229</a>
|
|
295
|
+
<a name='L230'></a><a href='#L230'>230</a>
|
|
296
|
+
<a name='L231'></a><a href='#L231'>231</a>
|
|
297
|
+
<a name='L232'></a><a href='#L232'>232</a>
|
|
298
|
+
<a name='L233'></a><a href='#L233'>233</a>
|
|
299
|
+
<a name='L234'></a><a href='#L234'>234</a>
|
|
300
|
+
<a name='L235'></a><a href='#L235'>235</a>
|
|
301
|
+
<a name='L236'></a><a href='#L236'>236</a>
|
|
302
|
+
<a name='L237'></a><a href='#L237'>237</a>
|
|
303
|
+
<a name='L238'></a><a href='#L238'>238</a>
|
|
304
|
+
<a name='L239'></a><a href='#L239'>239</a>
|
|
305
|
+
<a name='L240'></a><a href='#L240'>240</a>
|
|
306
|
+
<a name='L241'></a><a href='#L241'>241</a>
|
|
307
|
+
<a name='L242'></a><a href='#L242'>242</a>
|
|
308
|
+
<a name='L243'></a><a href='#L243'>243</a>
|
|
309
|
+
<a name='L244'></a><a href='#L244'>244</a>
|
|
310
|
+
<a name='L245'></a><a href='#L245'>245</a>
|
|
311
|
+
<a name='L246'></a><a href='#L246'>246</a>
|
|
312
|
+
<a name='L247'></a><a href='#L247'>247</a>
|
|
313
|
+
<a name='L248'></a><a href='#L248'>248</a>
|
|
314
|
+
<a name='L249'></a><a href='#L249'>249</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
261
315
|
<span class="cline-any cline-neutral"> </span>
|
|
262
316
|
<span class="cline-any cline-neutral"> </span>
|
|
263
317
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -265,8 +319,8 @@
|
|
|
265
319
|
<span class="cline-any cline-neutral"> </span>
|
|
266
320
|
<span class="cline-any cline-neutral"> </span>
|
|
267
321
|
<span class="cline-any cline-neutral"> </span>
|
|
322
|
+
<span class="cline-any cline-yes">1x</span>
|
|
268
323
|
<span class="cline-any cline-neutral"> </span>
|
|
269
|
-
<span class="cline-any cline-no"> </span>
|
|
270
324
|
<span class="cline-any cline-neutral"> </span>
|
|
271
325
|
<span class="cline-any cline-neutral"> </span>
|
|
272
326
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -278,12 +332,13 @@
|
|
|
278
332
|
<span class="cline-any cline-neutral"> </span>
|
|
279
333
|
<span class="cline-any cline-neutral"> </span>
|
|
280
334
|
<span class="cline-any cline-neutral"> </span>
|
|
281
|
-
<span class="cline-any cline-no"> </span>
|
|
282
|
-
<span class="cline-any cline-no"> </span>
|
|
283
335
|
<span class="cline-any cline-neutral"> </span>
|
|
284
|
-
<span class="cline-any cline-
|
|
336
|
+
<span class="cline-any cline-yes">11x</span>
|
|
285
337
|
<span class="cline-any cline-neutral"> </span>
|
|
338
|
+
<span class="cline-any cline-yes">11x</span>
|
|
339
|
+
<span class="cline-any cline-yes">11x</span>
|
|
286
340
|
<span class="cline-any cline-neutral"> </span>
|
|
341
|
+
<span class="cline-any cline-yes">11x</span>
|
|
287
342
|
<span class="cline-any cline-neutral"> </span>
|
|
288
343
|
<span class="cline-any cline-neutral"> </span>
|
|
289
344
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -292,15 +347,17 @@
|
|
|
292
347
|
<span class="cline-any cline-neutral"> </span>
|
|
293
348
|
<span class="cline-any cline-neutral"> </span>
|
|
294
349
|
<span class="cline-any cline-neutral"> </span>
|
|
295
|
-
<span class="cline-any cline-no"> </span>
|
|
296
|
-
<span class="cline-any cline-no"> </span>
|
|
297
|
-
<span class="cline-any cline-no"> </span>
|
|
298
350
|
<span class="cline-any cline-neutral"> </span>
|
|
299
351
|
<span class="cline-any cline-neutral"> </span>
|
|
300
|
-
<span class="cline-any cline-
|
|
352
|
+
<span class="cline-any cline-yes">8x</span>
|
|
353
|
+
<span class="cline-any cline-yes">8x</span>
|
|
354
|
+
<span class="cline-any cline-yes">96x</span>
|
|
301
355
|
<span class="cline-any cline-neutral"> </span>
|
|
302
356
|
<span class="cline-any cline-neutral"> </span>
|
|
303
|
-
<span class="cline-any cline-
|
|
357
|
+
<span class="cline-any cline-yes">8x</span>
|
|
358
|
+
<span class="cline-any cline-neutral"> </span>
|
|
359
|
+
<span class="cline-any cline-neutral"> </span>
|
|
360
|
+
<span class="cline-any cline-yes">11x</span>
|
|
304
361
|
<span class="cline-any cline-no"> </span>
|
|
305
362
|
<span class="cline-any cline-neutral"> </span>
|
|
306
363
|
<span class="cline-any cline-no"> </span>
|
|
@@ -317,16 +374,16 @@
|
|
|
317
374
|
<span class="cline-any cline-neutral"> </span>
|
|
318
375
|
<span class="cline-any cline-neutral"> </span>
|
|
319
376
|
<span class="cline-any cline-neutral"> </span>
|
|
320
|
-
<span class="cline-any cline-
|
|
377
|
+
<span class="cline-any cline-yes">11x</span>
|
|
321
378
|
<span class="cline-any cline-neutral"> </span>
|
|
322
|
-
<span class="cline-any cline-
|
|
323
|
-
<span class="cline-any cline-
|
|
324
|
-
<span class="cline-any cline-
|
|
325
|
-
<span class="cline-any cline-
|
|
379
|
+
<span class="cline-any cline-yes">22x</span>
|
|
380
|
+
<span class="cline-any cline-yes">22x</span>
|
|
381
|
+
<span class="cline-any cline-yes">132x</span>
|
|
382
|
+
<span class="cline-any cline-yes">132x</span>
|
|
326
383
|
<span class="cline-any cline-neutral"> </span>
|
|
327
|
-
<span class="cline-any cline-
|
|
384
|
+
<span class="cline-any cline-yes">66x</span>
|
|
328
385
|
<span class="cline-any cline-neutral"> </span>
|
|
329
|
-
<span class="cline-any cline-
|
|
386
|
+
<span class="cline-any cline-yes">66x</span>
|
|
330
387
|
<span class="cline-any cline-neutral"> </span>
|
|
331
388
|
<span class="cline-any cline-neutral"> </span>
|
|
332
389
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -345,27 +402,43 @@
|
|
|
345
402
|
<span class="cline-any cline-neutral"> </span>
|
|
346
403
|
<span class="cline-any cline-neutral"> </span>
|
|
347
404
|
<span class="cline-any cline-neutral"> </span>
|
|
348
|
-
<span class="cline-any cline-no"> </span>
|
|
349
405
|
<span class="cline-any cline-neutral"> </span>
|
|
350
406
|
<span class="cline-any cline-neutral"> </span>
|
|
351
|
-
<span class="cline-any cline-
|
|
407
|
+
<span class="cline-any cline-yes">132x</span>
|
|
352
408
|
<span class="cline-any cline-neutral"> </span>
|
|
353
409
|
<span class="cline-any cline-neutral"> </span>
|
|
354
|
-
<span class="cline-any cline-
|
|
410
|
+
<span class="cline-any cline-yes">11x</span>
|
|
355
411
|
<span class="cline-any cline-neutral"> </span>
|
|
356
412
|
<span class="cline-any cline-neutral"> </span>
|
|
413
|
+
<span class="cline-any cline-yes">11x</span>
|
|
357
414
|
<span class="cline-any cline-neutral"> </span>
|
|
358
415
|
<span class="cline-any cline-neutral"> </span>
|
|
359
416
|
<span class="cline-any cline-neutral"> </span>
|
|
360
417
|
<span class="cline-any cline-neutral"> </span>
|
|
361
|
-
<span class="cline-any cline-no"> </span>
|
|
362
418
|
<span class="cline-any cline-neutral"> </span>
|
|
363
419
|
<span class="cline-any cline-neutral"> </span>
|
|
364
420
|
<span class="cline-any cline-neutral"> </span>
|
|
365
421
|
<span class="cline-any cline-neutral"> </span>
|
|
366
422
|
<span class="cline-any cline-neutral"> </span>
|
|
367
423
|
<span class="cline-any cline-neutral"> </span>
|
|
368
|
-
<span class="cline-any cline-
|
|
424
|
+
<span class="cline-any cline-neutral"> </span>
|
|
425
|
+
<span class="cline-any cline-neutral"> </span>
|
|
426
|
+
<span class="cline-any cline-neutral"> </span>
|
|
427
|
+
<span class="cline-any cline-yes">132x</span>
|
|
428
|
+
<span class="cline-any cline-neutral"> </span>
|
|
429
|
+
<span class="cline-any cline-neutral"> </span>
|
|
430
|
+
<span class="cline-any cline-neutral"> </span>
|
|
431
|
+
<span class="cline-any cline-neutral"> </span>
|
|
432
|
+
<span class="cline-any cline-neutral"> </span>
|
|
433
|
+
<span class="cline-any cline-neutral"> </span>
|
|
434
|
+
<span class="cline-any cline-neutral"> </span>
|
|
435
|
+
<span class="cline-any cline-neutral"> </span>
|
|
436
|
+
<span class="cline-any cline-neutral"> </span>
|
|
437
|
+
<span class="cline-any cline-neutral"> </span>
|
|
438
|
+
<span class="cline-any cline-neutral"> </span>
|
|
439
|
+
<span class="cline-any cline-neutral"> </span>
|
|
440
|
+
<span class="cline-any cline-neutral"> </span>
|
|
441
|
+
<span class="cline-any cline-yes">132x</span>
|
|
369
442
|
<span class="cline-any cline-neutral"> </span>
|
|
370
443
|
<span class="cline-any cline-neutral"> </span>
|
|
371
444
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -383,41 +456,35 @@
|
|
|
383
456
|
<span class="cline-any cline-neutral"> </span>
|
|
384
457
|
<span class="cline-any cline-neutral"> </span>
|
|
385
458
|
<span class="cline-any cline-neutral"> </span>
|
|
386
|
-
<span class="cline-any cline-
|
|
459
|
+
<span class="cline-any cline-yes">1x</span>
|
|
387
460
|
<span class="cline-any cline-neutral"> </span>
|
|
388
461
|
<span class="cline-any cline-neutral"> </span>
|
|
389
462
|
<span class="cline-any cline-neutral"> </span>
|
|
390
463
|
<span class="cline-any cline-neutral"> </span>
|
|
391
464
|
<span class="cline-any cline-neutral"> </span>
|
|
392
|
-
<span class="cline-any cline-no"> </span>
|
|
393
|
-
<span class="cline-any cline-no"> </span>
|
|
394
465
|
<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
|
-
<span class="cline-any cline-no"> </span>
|
|
400
466
|
<span class="cline-any cline-neutral"> </span>
|
|
467
|
+
<span class="cline-any cline-yes">8x</span>
|
|
468
|
+
<span class="cline-any cline-yes">8x</span>
|
|
401
469
|
<span class="cline-any cline-neutral"> </span>
|
|
402
|
-
<span class="cline-any cline-no"> </span>
|
|
403
470
|
<span class="cline-any cline-neutral"> </span>
|
|
471
|
+
<span class="cline-any cline-yes">8x</span>
|
|
472
|
+
<span class="cline-any cline-yes">96x</span>
|
|
473
|
+
<span class="cline-any cline-yes">96x</span>
|
|
474
|
+
<span class="cline-any cline-yes">32x</span>
|
|
404
475
|
<span class="cline-any cline-neutral"> </span>
|
|
405
476
|
<span class="cline-any cline-neutral"> </span>
|
|
406
477
|
<span class="cline-any cline-neutral"> </span>
|
|
407
|
-
<span class="cline-any cline-no"> </span>
|
|
408
|
-
<span class="cline-any cline-no"> </span>
|
|
409
478
|
<span class="cline-any cline-neutral"> </span>
|
|
410
479
|
<span class="cline-any cline-neutral"> </span>
|
|
411
480
|
<span class="cline-any cline-neutral"> </span>
|
|
412
|
-
<span class="cline-any cline-no"> </span>
|
|
413
481
|
<span class="cline-any cline-neutral"> </span>
|
|
414
482
|
<span class="cline-any cline-neutral"> </span>
|
|
415
|
-
<span class="cline-any cline-no"> </span>
|
|
416
483
|
<span class="cline-any cline-neutral"> </span>
|
|
417
484
|
<span class="cline-any cline-neutral"> </span>
|
|
418
485
|
<span class="cline-any cline-neutral"> </span>
|
|
486
|
+
<span class="cline-any cline-yes">96x</span>
|
|
419
487
|
<span class="cline-any cline-neutral"> </span>
|
|
420
|
-
<span class="cline-any cline-no"> </span>
|
|
421
488
|
<span class="cline-any cline-neutral"> </span>
|
|
422
489
|
<span class="cline-any cline-neutral"> </span>
|
|
423
490
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -427,17 +494,58 @@
|
|
|
427
494
|
<span class="cline-any cline-neutral"> </span>
|
|
428
495
|
<span class="cline-any cline-neutral"> </span>
|
|
429
496
|
<span class="cline-any cline-neutral"> </span>
|
|
497
|
+
<span class="cline-any cline-yes">8x</span>
|
|
498
|
+
<span class="cline-any cline-yes">8x</span>
|
|
499
|
+
<span class="cline-any cline-yes">8x</span>
|
|
500
|
+
<span class="cline-any cline-yes">8x</span>
|
|
501
|
+
<span class="cline-any cline-yes">96x</span>
|
|
430
502
|
<span class="cline-any cline-neutral"> </span>
|
|
431
503
|
<span class="cline-any cline-neutral"> </span>
|
|
504
|
+
<span class="cline-any cline-yes">88x</span>
|
|
432
505
|
<span class="cline-any cline-neutral"> </span>
|
|
433
506
|
<span class="cline-any cline-neutral"> </span>
|
|
434
|
-
<span class="cline-any cline-
|
|
507
|
+
<span class="cline-any cline-neutral"> </span>
|
|
508
|
+
<span class="cline-any cline-neutral"> </span>
|
|
509
|
+
<span class="cline-any cline-yes">38x</span>
|
|
510
|
+
<span class="cline-any cline-yes">3x</span>
|
|
511
|
+
<span class="cline-any cline-neutral"> </span>
|
|
512
|
+
<span class="cline-any cline-neutral"> </span>
|
|
513
|
+
<span class="cline-any cline-neutral"> </span>
|
|
514
|
+
<span class="cline-any cline-yes">5x</span>
|
|
515
|
+
<span class="cline-any cline-neutral"> </span>
|
|
516
|
+
<span class="cline-any cline-neutral"> </span>
|
|
517
|
+
<span class="cline-any cline-yes">8x</span>
|
|
518
|
+
<span class="cline-any cline-neutral"> </span>
|
|
519
|
+
<span class="cline-any cline-neutral"> </span>
|
|
520
|
+
<span class="cline-any cline-neutral"> </span>
|
|
521
|
+
<span class="cline-any cline-neutral"> </span>
|
|
522
|
+
<span class="cline-any cline-yes">8x</span>
|
|
523
|
+
<span class="cline-any cline-neutral"> </span>
|
|
435
524
|
<span class="cline-any cline-neutral"> </span>
|
|
436
525
|
<span class="cline-any cline-neutral"> </span>
|
|
437
526
|
<span class="cline-any cline-neutral"> </span>
|
|
438
527
|
<span class="cline-any cline-neutral"> </span>
|
|
439
528
|
<span class="cline-any cline-neutral"> </span>
|
|
440
|
-
<span class="cline-any cline-
|
|
529
|
+
<span class="cline-any cline-neutral"> </span>
|
|
530
|
+
<span class="cline-any cline-neutral"> </span>
|
|
531
|
+
<span class="cline-any cline-neutral"> </span>
|
|
532
|
+
<span class="cline-any cline-neutral"> </span>
|
|
533
|
+
<span class="cline-any cline-neutral"> </span>
|
|
534
|
+
<span class="cline-any cline-neutral"> </span>
|
|
535
|
+
<span class="cline-any cline-neutral"> </span>
|
|
536
|
+
<span class="cline-any cline-neutral"> </span>
|
|
537
|
+
<span class="cline-any cline-neutral"> </span>
|
|
538
|
+
<span class="cline-any cline-yes">1x</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-yes">1x</span>
|
|
547
|
+
<span class="cline-any cline-neutral"> </span>
|
|
548
|
+
<span class="cline-any cline-neutral"> </span>
|
|
441
549
|
<span class="cline-any cline-neutral"> </span>
|
|
442
550
|
<span class="cline-any cline-neutral"> </span>
|
|
443
551
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -455,27 +563,30 @@
|
|
|
455
563
|
import PropTypes from 'prop-types';
|
|
456
564
|
import { Field, useFormState } from 'react-final-form';
|
|
457
565
|
|
|
458
|
-
import { Button, KeyValue } from '@folio/stripes/components';
|
|
459
|
-
import {
|
|
460
|
-
import { useAvailableCustomProperties } from '../../hooks';
|
|
566
|
+
import { Button, Headline, KeyValue } from '@folio/stripes/components';
|
|
567
|
+
import { useKintIntl } from '../../hooks';
|
|
461
568
|
import CustomPropertyFormCard from './CustomPropertyFormCard';
|
|
462
569
|
|
|
463
|
-
const CustomPropertiesList =
|
|
570
|
+
const CustomPropertiesList = ({
|
|
464
571
|
availableCustomProperties = <span class="branch-0 cbranch-no" title="branch not covered" >[],</span>
|
|
465
572
|
input: {
|
|
466
573
|
name,
|
|
467
574
|
onChange,
|
|
468
575
|
value
|
|
469
576
|
},
|
|
470
|
-
|
|
577
|
+
intlKey: passedIntlKey,
|
|
578
|
+
intlNS: passedIntlNS,
|
|
579
|
+
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
471
580
|
meta: {
|
|
472
581
|
pristine
|
|
473
582
|
},
|
|
474
583
|
}) => {
|
|
475
|
-
const
|
|
476
|
-
|
|
584
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
585
|
+
|
|
586
|
+
const [customProperties, setCustomProperties] = useState([]); // This is the list of customProperties we're currently displaying for edit.
|
|
587
|
+
const [dirtying, setDirtying] = useState(false);
|
|
477
588
|
|
|
478
|
-
|
|
589
|
+
useEffect(() => {
|
|
479
590
|
// When the user loads this form, we want to init the list of customProperties
|
|
480
591
|
// we're displaying (state.customProperties) with the list of customProperties that have been set
|
|
481
592
|
// either via defaults or previously-saved data. Since that data may come in
|
|
@@ -486,15 +597,15 @@ const CustomPropertiesList = <span class="cstat-no" title="statement not covered
|
|
|
486
597
|
// the component when we add/remove rows. That happens _before_ `onChange` is called,
|
|
487
598
|
// so internally we use `state.dirtying` to show that we just initiated an action
|
|
488
599
|
// that will result in a dirty component.
|
|
489
|
-
<span class="
|
|
490
|
-
|
|
491
|
-
|
|
600
|
+
<span class="missing-if-branch" title="else path not taken" >E</span>if (pristine && !dirtying) {
|
|
601
|
+
setCustomProperties(availableCustomProperties.filter(
|
|
602
|
+
customProperty => value[customProperty.value] !== undefined
|
|
492
603
|
));
|
|
493
604
|
}
|
|
494
|
-
|
|
605
|
+
return null;
|
|
495
606
|
}, [availableCustomProperties, dirtying, pristine, value]);
|
|
496
607
|
|
|
497
|
-
const handleDeleteCustomProperty = <span class="
|
|
608
|
+
const handleDeleteCustomProperty = <span class="fstat-no" title="function not covered" >(c</span>ustomProperty, i) => {
|
|
498
609
|
const currentValue = <span class="cstat-no" title="statement not covered" >value[customProperty.value]?.[0] ?? {};</span>
|
|
499
610
|
|
|
500
611
|
const newCustomProperties = <span class="cstat-no" title="statement not covered" >[...customProperties];</span>
|
|
@@ -511,16 +622,16 @@ const CustomPropertiesList = <span class="cstat-no" title="statement not covered
|
|
|
511
622
|
});
|
|
512
623
|
};
|
|
513
624
|
|
|
514
|
-
const renderCustomProperties =
|
|
625
|
+
const renderCustomProperties = (customPropertyType) => {
|
|
515
626
|
// This is necessary to track individually since "index" will span primary/optional for a given set
|
|
516
|
-
let internalPropertyCounter =
|
|
517
|
-
|
|
518
|
-
<span class="
|
|
519
|
-
|
|
627
|
+
let internalPropertyCounter = 0;
|
|
628
|
+
return customProperties.map((customProperty, index) => {
|
|
629
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (customPropertyType === 'primary' && !customProperty.primary) <span class="cstat-no" title="statement not covered" >return undefined;</span>
|
|
630
|
+
if (customPropertyType === 'optional' && customProperty.primary) return undefined;
|
|
520
631
|
|
|
521
|
-
|
|
632
|
+
internalPropertyCounter += 1;
|
|
522
633
|
|
|
523
|
-
|
|
634
|
+
return (
|
|
524
635
|
<CustomPropertyFormCard
|
|
525
636
|
key={`customPropertyField-${customProperty.value}-${index}`}
|
|
526
637
|
{...{
|
|
@@ -531,6 +642,8 @@ const CustomPropertiesList = <span class="cstat-no" title="statement not covered
|
|
|
531
642
|
handleDeleteCustomProperty,
|
|
532
643
|
index,
|
|
533
644
|
internalPropertyCounter,
|
|
645
|
+
intlKey: passedIntlKey,
|
|
646
|
+
intlNS: passedIntlNS,
|
|
534
647
|
labelOverrides,
|
|
535
648
|
name,
|
|
536
649
|
onChange,
|
|
@@ -539,27 +652,41 @@ const CustomPropertiesList = <span class="cstat-no" title="statement not covered
|
|
|
539
652
|
}}
|
|
540
653
|
/>
|
|
541
654
|
);
|
|
542
|
-
}).filter(
|
|
655
|
+
}).filter(cp => cp !== undefined);
|
|
543
656
|
};
|
|
544
657
|
|
|
545
|
-
|
|
658
|
+
return (
|
|
546
659
|
<>
|
|
547
660
|
{
|
|
548
|
-
availableCustomProperties.some(
|
|
661
|
+
availableCustomProperties.some((customProperty = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => customProperty.primary) &&
|
|
549
662
|
<KeyValue
|
|
550
|
-
label={
|
|
663
|
+
label={
|
|
664
|
+
<Headline margin="x-small" size="large" tag="h4">
|
|
665
|
+
{kintIntl.formatKintMessage({
|
|
666
|
+
id: 'customProperties.primaryProperties',
|
|
667
|
+
overrideValue: labelOverrides.primaryProperties
|
|
668
|
+
})}
|
|
669
|
+
</Headline>
|
|
670
|
+
}
|
|
551
671
|
value={renderCustomProperties('primary')}
|
|
552
672
|
/>
|
|
553
673
|
}
|
|
554
674
|
{
|
|
555
|
-
availableCustomProperties.some(
|
|
675
|
+
availableCustomProperties.some((customProperty = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => !customProperty.primary) &&
|
|
556
676
|
<KeyValue
|
|
557
|
-
label={
|
|
677
|
+
label={
|
|
678
|
+
<Headline margin="x-small" size="large" tag="h4">
|
|
679
|
+
{kintIntl.formatKintMessage({
|
|
680
|
+
id: 'customProperties.optionalProperties',
|
|
681
|
+
overrideValue: labelOverrides.optionalProperties
|
|
682
|
+
})}
|
|
683
|
+
</Headline>
|
|
684
|
+
}
|
|
558
685
|
value={renderCustomProperties('optional')}
|
|
559
686
|
/>
|
|
560
687
|
}
|
|
561
688
|
{
|
|
562
|
-
availableCustomProperties.some(
|
|
689
|
+
availableCustomProperties.some((customProperty = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => !customProperty.primary) &&
|
|
563
690
|
<Button
|
|
564
691
|
id="add-customproperty-btn"
|
|
565
692
|
onClick={<span class="fstat-no" title="function not covered" >()</span> => {
|
|
@@ -567,55 +694,86 @@ const CustomPropertiesList = <span class="cstat-no" title="statement not covered
|
|
|
567
694
|
<span class="cstat-no" title="statement not covered" > setDirtying(true);</span>
|
|
568
695
|
}}
|
|
569
696
|
>
|
|
570
|
-
{
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
}
|
|
697
|
+
{kintIntl.formatKintMessage({
|
|
698
|
+
id: 'customProperties.addProperty',
|
|
699
|
+
overrideValue: labelOverrides.addProperty
|
|
700
|
+
})}
|
|
574
701
|
</Button>
|
|
575
702
|
}
|
|
576
703
|
</>
|
|
577
704
|
);
|
|
578
705
|
};
|
|
579
706
|
|
|
580
|
-
const CustomPropertiesListField =
|
|
707
|
+
const CustomPropertiesListField = ({
|
|
581
708
|
ctx,
|
|
582
709
|
customProperties,
|
|
583
|
-
|
|
710
|
+
intlKey: passedIntlKey,
|
|
711
|
+
intlNS: passedIntlNS,
|
|
712
|
+
labelOverrides = {},
|
|
584
713
|
...fieldProps
|
|
585
714
|
}) => {
|
|
586
|
-
const fieldRef =
|
|
587
|
-
const
|
|
715
|
+
const fieldRef = useRef();
|
|
716
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
717
|
+
|
|
718
|
+
// Map customProperties to bring together the options and the definition values
|
|
719
|
+
const availableCustomProperties = customProperties?.map(customProperty => {
|
|
720
|
+
let options = customProperty?.category?.values;
|
|
721
|
+
if (options) {
|
|
722
|
+
options = [
|
|
723
|
+
{
|
|
724
|
+
label: kintIntl.formatKintMessage({
|
|
725
|
+
id: 'notSet',
|
|
726
|
+
overrideValue: labelOverrides.notSet
|
|
727
|
+
}),
|
|
728
|
+
value: '',
|
|
729
|
+
},
|
|
730
|
+
...options,
|
|
731
|
+
];
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
return {
|
|
735
|
+
description: customProperty.description,
|
|
736
|
+
label: customProperty.label,
|
|
737
|
+
primary: customProperty.primary,
|
|
738
|
+
type: customProperty.type,
|
|
739
|
+
options,
|
|
740
|
+
value: customProperty.name,
|
|
741
|
+
defaultInternal: customProperty.defaultInternal,
|
|
742
|
+
};
|
|
743
|
+
});
|
|
588
744
|
|
|
589
|
-
const { initialValues } =
|
|
590
|
-
const getInitialValue =
|
|
591
|
-
const cps =
|
|
592
|
-
<span class="
|
|
593
|
-
.filter(
|
|
745
|
+
const { initialValues } = useFormState();
|
|
746
|
+
const getInitialValue = () => {
|
|
747
|
+
const cps = {};
|
|
748
|
+
(customProperties || <span class="branch-1 cbranch-no" title="branch not covered" >[])</span>
|
|
749
|
+
.filter(cp => cp.primary)
|
|
594
750
|
// Change default to be an ignored customProperty.
|
|
595
751
|
// This means any changes without setting the value will be ignored
|
|
596
|
-
.forEach(
|
|
752
|
+
.forEach(cp => { cps[cp.name] = [{ _delete: true }]; });
|
|
597
753
|
|
|
598
754
|
// IMPORTANT -- All customproperty ctx sections are adding to the same "initialValue" field
|
|
599
755
|
// Ensure that we don't already have initialValues for this particular set before setting them,
|
|
600
756
|
// to ensure no looping behaviour
|
|
601
|
-
|
|
602
|
-
|
|
757
|
+
if (Object.keys(cps).every(key => initialValues.customProperties?.[key] !== undefined)) {
|
|
758
|
+
return initialValues.customProperties;
|
|
603
759
|
}
|
|
604
760
|
|
|
605
761
|
// Ensure that if we already had these values in initialvalues they're not overwritten
|
|
606
|
-
|
|
762
|
+
return ({ ...cps, ...initialValues.customProperties });
|
|
607
763
|
};
|
|
608
764
|
|
|
609
|
-
|
|
765
|
+
return (
|
|
610
766
|
<Field
|
|
611
767
|
{...fieldProps}
|
|
612
768
|
initialValue={getInitialValue()}
|
|
613
|
-
render={
|
|
614
|
-
|
|
769
|
+
render={p => {
|
|
770
|
+
return (
|
|
615
771
|
<CustomPropertiesList
|
|
616
772
|
ref={fieldRef}
|
|
617
773
|
availableCustomProperties={availableCustomProperties}
|
|
618
774
|
ctx={ctx}
|
|
775
|
+
intlKey={passedIntlKey}
|
|
776
|
+
intlNS={passedIntlNS}
|
|
619
777
|
labelOverrides={labelOverrides}
|
|
620
778
|
{...p}
|
|
621
779
|
/>
|
|
@@ -625,13 +783,15 @@ const CustomPropertiesListField = <span class="cstat-no" title="statement not co
|
|
|
625
783
|
);
|
|
626
784
|
};
|
|
627
785
|
|
|
628
|
-
|
|
786
|
+
CustomPropertiesListField.propTypes = {
|
|
629
787
|
ctx: PropTypes.string,
|
|
630
788
|
customProperties: PropTypes.arrayOf(PropTypes.object),
|
|
789
|
+
intlKey: PropTypes.string,
|
|
790
|
+
intlNS: PropTypes.string,
|
|
631
791
|
labelOverrides: PropTypes.object,
|
|
632
792
|
};
|
|
633
793
|
|
|
634
|
-
|
|
794
|
+
CustomPropertiesList.propTypes = {
|
|
635
795
|
availableCustomProperties: PropTypes.arrayOf(PropTypes.object),
|
|
636
796
|
ctx: PropTypes.string,
|
|
637
797
|
input: PropTypes.shape({
|
|
@@ -639,6 +799,8 @@ const CustomPropertiesListField = <span class="cstat-no" title="statement not co
|
|
|
639
799
|
value: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
|
|
640
800
|
onChange: PropTypes.func,
|
|
641
801
|
}),
|
|
802
|
+
intlKey: PropTypes.string,
|
|
803
|
+
intlNS: PropTypes.string,
|
|
642
804
|
labelOverrides: PropTypes.object,
|
|
643
805
|
meta: PropTypes.object,
|
|
644
806
|
};
|
|
@@ -652,7 +814,7 @@ export default CustomPropertiesListField;
|
|
|
652
814
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
653
815
|
Code coverage generated by
|
|
654
816
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
655
|
-
at
|
|
817
|
+
at 2022-09-16T13:23:25.290Z
|
|
656
818
|
</div>
|
|
657
819
|
<script src="../../prettify.js"></script>
|
|
658
820
|
<script>
|