@k-int/stripes-kint-components 2.5.1 → 2.6.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 +13 -1
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +1 -28
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -4
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +1 -28
- package/es/index.js +7 -5
- package/es/lib/ActionList/ActionList.js +1 -31
- package/es/lib/ActionList/ActionListFieldArray.js +6 -40
- package/es/lib/ActionList/index.js +1 -5
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +55 -46
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +53 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +102 -62
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +125 -0
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +131 -138
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +200 -0
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +22 -37
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +194 -0
- package/es/lib/CustomProperties/Config/index.js +1 -5
- package/es/lib/CustomProperties/Config/testResources.js +198 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -30
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +48 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +1 -34
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +48 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +1 -37
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +113 -0
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +63 -64
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +283 -0
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -30
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +65 -0
- package/es/lib/CustomProperties/Edit/index.js +1 -5
- package/es/lib/CustomProperties/Edit/testResources.js +923 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +10 -35
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +102 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +1 -34
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +41 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +1 -34
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +91 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +1 -30
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +86 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +1 -35
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +321 -0
- package/es/lib/CustomProperties/Filter/index.js +1 -5
- package/es/lib/CustomProperties/Filter/testResources.js +262 -0
- package/es/lib/CustomProperties/Filter/useOperators.js +9 -39
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -36
- package/es/lib/CustomProperties/Filter/useValueProps.js +13 -35
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -30
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +48 -0
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +1 -34
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +55 -0
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +13 -32
- package/es/lib/CustomProperties/View/index.js +1 -5
- package/es/lib/CustomProperties/View/testResources.js +144 -0
- package/es/lib/CustomProperties/index.js +1 -5
- package/es/lib/EditableRefdataList/EditableRefdataList.js +163 -64
- package/es/lib/EditableRefdataList/index.js +1 -5
- package/es/lib/EditableSettingsList/EditableSettingsList.js +1 -30
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -30
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +10 -35
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +28 -64
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +8 -33
- package/es/lib/EditableSettingsList/SettingField/index.js +1 -5
- package/es/lib/EditableSettingsList/index.js +1 -5
- package/es/lib/FormModal/FormModal.js +2 -31
- package/es/lib/FormModal/index.js +1 -5
- package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -30
- package/es/lib/NoResultsMessage/index.js +1 -5
- package/es/lib/QueryTypedown/QueryTypedown.js +1 -34
- package/es/lib/QueryTypedown/index.js +1 -5
- package/es/lib/RefdataButtons/RefdataButtons.js +1 -34
- package/es/lib/RefdataButtons/index.js +1 -5
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +2 -34
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +1 -34
- package/es/lib/SASQLookupComponent/TableBody/index.js +1 -5
- package/es/lib/SASQLookupComponent/index.js +1 -5
- package/es/lib/SASQRoute/SASQRoute.js +1 -30
- package/es/lib/SASQRoute/index.js +1 -5
- package/es/lib/SASQViewComponent/SASQViewComponent.js +1 -34
- package/es/lib/SASQViewComponent/index.js +1 -5
- package/es/lib/SearchField/SearchField.js +1 -31
- package/es/lib/SearchField/index.js +1 -5
- package/es/lib/SettingPage/SettingPage.js +1 -34
- package/es/lib/SettingPage/SettingPagePane.js +1 -32
- package/es/lib/SettingPage/index.js +1 -5
- package/es/lib/Typedown/Typedown.js +1 -34
- package/es/lib/Typedown/index.js +1 -5
- package/es/lib/constants/customProperties.js +4 -39
- package/es/lib/constants/eventCodes.js +1 -31
- package/es/lib/contexts/SettingsContext.js +1 -30
- package/es/lib/contexts/index.js +1 -5
- package/es/lib/hooks/index.js +7 -5
- package/es/lib/hooks/settingsHooks/index.js +8 -4
- package/es/lib/hooks/settingsHooks/useAppSettings.js +84 -0
- package/es/lib/hooks/settingsHooks/useSettingSection.js +1 -34
- package/es/lib/hooks/settingsHooks/useSettings.js +1 -36
- package/es/lib/hooks/typedownHooks/index.js +1 -5
- package/es/lib/hooks/typedownHooks/useTypedown.js +1 -34
- package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -34
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -34
- package/es/lib/hooks/useActiveElement.js +1 -32
- package/es/lib/hooks/useAvailableCustomProperties.js +1 -34
- package/es/lib/hooks/useCustomProperties.js +4 -34
- package/es/lib/hooks/useHelperApp.js +1 -34
- package/es/lib/hooks/useInvalidateRefdata.js +1 -34
- package/es/lib/hooks/useKiwtFieldArray.js +1 -34
- package/es/lib/hooks/useKiwtSASQuery.js +1 -35
- package/es/lib/hooks/useLocalStorageState.js +1 -34
- package/es/lib/hooks/useMutateCustomProperties.js +14 -42
- package/es/lib/hooks/useMutateRefdataValue.js +11 -39
- package/es/lib/hooks/useQIndex.js +1 -34
- package/es/lib/hooks/useRefdata.js +1 -34
- package/es/lib/hooks/useTemplates.js +1 -34
- package/es/lib/utils/buildUrl.js +2 -31
- package/es/lib/utils/generateKiwtQuery.js +1 -30
- package/es/lib/utils/generateKiwtQueryParams.js +1 -30
- package/es/lib/utils/groupCustomPropertiesByCtx.js +1 -30
- package/es/lib/utils/highlightString.js +1 -29
- package/es/lib/utils/index.js +1 -5
- package/es/lib/utils/matchString.js +1 -30
- package/es/lib/utils/refdataOptions.js +1 -30
- package/es/lib/utils/refdataQueryKey.js +1 -30
- package/es/lib/utils/renderHelpText.js +1 -30
- package/es/lib/utils/selectorSafe.js +1 -30
- package/es/lib/utils/sortByLabel.js +1 -30
- package/es/lib/utils/toCamelCase.js +1 -30
- package/es/lib/utils/typedownQueryKey.js +1 -30
- package/es/lib/utils/validators.js +1 -32
- package/junit.xml +731 -38
- package/package.json +4 -4
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
- 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 +142 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +93 -27
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +308 -188
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +92 -32
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +65 -50
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +793 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +161 -77
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +29 -26
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +61 -46
- 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 +892 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +19 -19
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +42 -42
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +23 -23
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +19 -19
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +41 -41
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +102 -87
- 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 +976 -0
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +58 -37
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +47 -29
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +38 -38
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +30 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +48 -33
- 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 +571 -0
- 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/EditableRefdataList/EditableRefdataList.js.html +134 -17
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +27 -12
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +13 -13
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +32 -32
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- 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/SASQLookupComponent/SASQLookupComponent.js.html +6 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
- 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 +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +18 -18
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +3 -3
- 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 +32 -26
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +13 -13
- 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/hooks/index.html +92 -92
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +292 -0
- 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 +8 -8
- 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/useAvailableCustomProperties.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +32 -17
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +29 -11
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +7 -7
- 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 +109 -109
- 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 +22 -22
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +31 -31
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.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 +46 -46
- package/src/artifacts/coverage-jest/lcov.info +1124 -916
- package/src/index.js +2 -1
- package/src/lib/ActionList/ActionListFieldArray.js +3 -2
- package/src/lib/ActionList/README.md +12 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +46 -8
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +35 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +63 -20
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +51 -0
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +172 -132
- package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +126 -0
- package/src/lib/CustomProperties/Config/CustomPropertyView.js +29 -9
- package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +55 -0
- package/src/lib/CustomProperties/Config/testResources.js +236 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +29 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +29 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +51 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +56 -24
- package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +185 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +1 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +57 -0
- package/src/lib/CustomProperties/Edit/testResources.js +1063 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +15 -3
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +43 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +32 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +44 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +40 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +111 -0
- package/src/lib/CustomProperties/Filter/testResources.js +297 -0
- package/src/lib/CustomProperties/Filter/useOperators.js +7 -0
- package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +5 -2
- package/src/lib/CustomProperties/Filter/useValueProps.js +6 -0
- package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +32 -0
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +32 -0
- package/src/lib/CustomProperties/View/CustomPropertyCard.js +8 -0
- package/src/lib/CustomProperties/View/testResources.js +162 -0
- package/src/lib/EditableRefdataList/EditableRefdataList.js +97 -17
- package/src/lib/EditableRefdataList/README.md +3 -0
- package/src/lib/FormModal/FormModal.js +1 -1
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +1 -0
- package/src/lib/constants/customProperties.js +2 -0
- package/src/lib/hooks/README.md +28 -3
- package/src/lib/hooks/index.js +1 -1
- package/src/lib/hooks/settingsHooks/index.js +1 -0
- package/src/lib/hooks/settingsHooks/useAppSettings.js +69 -0
- package/src/lib/hooks/useCustomProperties.js +5 -0
- package/src/lib/hooks/useMutateCustomProperties.js +7 -3
- package/src/lib/hooks/useMutateRefdataValue.js +5 -2
- package/styles/ActionListFieldArray.css +2 -1
- package/styles/CustomProperties.css +17 -0
- package/translations/stripes-kint-components/ar.json +11 -2
- package/translations/stripes-kint-components/cs_CZ.json +10 -1
- package/translations/stripes-kint-components/de.json +11 -2
- package/translations/stripes-kint-components/en.json +12 -3
- package/translations/stripes-kint-components/es.json +11 -2
- package/translations/stripes-kint-components/fr.json +1 -105
- package/translations/stripes-kint-components/hi_IN.json +1 -105
- package/translations/stripes-kint-components/hu.json +11 -2
- package/translations/stripes-kint-components/it_IT.json +11 -2
- package/translations/stripes-kint-components/ja.json +10 -1
- package/translations/stripes-kint-components/ko.json +11 -2
- package/translations/stripes-kint-components/pl.json +11 -2
- package/translations/stripes-kint-components/pt_PT.json +11 -2
- package/translations/stripes-kint-components/ru.json +11 -2
- package/translations/stripes-kint-components/sv.json +11 -2
- package/translations/stripes-kint-components/zh_CN.json +10 -1
package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html
CHANGED
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">67.74% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>21/31</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">61.53% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>40/65</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">70% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>7/10</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">67.85% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>19/28</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line medium'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -413,7 +413,47 @@
|
|
|
413
413
|
<a name='L348'></a><a href='#L348'>348</a>
|
|
414
414
|
<a name='L349'></a><a href='#L349'>349</a>
|
|
415
415
|
<a name='L350'></a><a href='#L350'>350</a>
|
|
416
|
-
<a name='L351'></a><a href='#L351'>351</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>
|
|
426
|
+
<a name='L361'></a><a href='#L361'>361</a>
|
|
427
|
+
<a name='L362'></a><a href='#L362'>362</a>
|
|
428
|
+
<a name='L363'></a><a href='#L363'>363</a>
|
|
429
|
+
<a name='L364'></a><a href='#L364'>364</a>
|
|
430
|
+
<a name='L365'></a><a href='#L365'>365</a>
|
|
431
|
+
<a name='L366'></a><a href='#L366'>366</a>
|
|
432
|
+
<a name='L367'></a><a href='#L367'>367</a>
|
|
433
|
+
<a name='L368'></a><a href='#L368'>368</a>
|
|
434
|
+
<a name='L369'></a><a href='#L369'>369</a>
|
|
435
|
+
<a name='L370'></a><a href='#L370'>370</a>
|
|
436
|
+
<a name='L371'></a><a href='#L371'>371</a>
|
|
437
|
+
<a name='L372'></a><a href='#L372'>372</a>
|
|
438
|
+
<a name='L373'></a><a href='#L373'>373</a>
|
|
439
|
+
<a name='L374'></a><a href='#L374'>374</a>
|
|
440
|
+
<a name='L375'></a><a href='#L375'>375</a>
|
|
441
|
+
<a name='L376'></a><a href='#L376'>376</a>
|
|
442
|
+
<a name='L377'></a><a href='#L377'>377</a>
|
|
443
|
+
<a name='L378'></a><a href='#L378'>378</a>
|
|
444
|
+
<a name='L379'></a><a href='#L379'>379</a>
|
|
445
|
+
<a name='L380'></a><a href='#L380'>380</a>
|
|
446
|
+
<a name='L381'></a><a href='#L381'>381</a>
|
|
447
|
+
<a name='L382'></a><a href='#L382'>382</a>
|
|
448
|
+
<a name='L383'></a><a href='#L383'>383</a>
|
|
449
|
+
<a name='L384'></a><a href='#L384'>384</a>
|
|
450
|
+
<a name='L385'></a><a href='#L385'>385</a>
|
|
451
|
+
<a name='L386'></a><a href='#L386'>386</a>
|
|
452
|
+
<a name='L387'></a><a href='#L387'>387</a>
|
|
453
|
+
<a name='L388'></a><a href='#L388'>388</a>
|
|
454
|
+
<a name='L389'></a><a href='#L389'>389</a>
|
|
455
|
+
<a name='L390'></a><a href='#L390'>390</a>
|
|
456
|
+
<a name='L391'></a><a href='#L391'>391</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
417
457
|
<span class="cline-any cline-neutral"> </span>
|
|
418
458
|
<span class="cline-any cline-neutral"> </span>
|
|
419
459
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -429,48 +469,54 @@
|
|
|
429
469
|
<span class="cline-any cline-neutral"> </span>
|
|
430
470
|
<span class="cline-any cline-neutral"> </span>
|
|
431
471
|
<span class="cline-any cline-neutral"> </span>
|
|
432
|
-
<span class="cline-any cline-no"> </span>
|
|
433
472
|
<span class="cline-any cline-neutral"> </span>
|
|
434
473
|
<span class="cline-any cline-neutral"> </span>
|
|
435
474
|
<span class="cline-any cline-neutral"> </span>
|
|
436
475
|
<span class="cline-any cline-neutral"> </span>
|
|
437
476
|
<span class="cline-any cline-neutral"> </span>
|
|
438
|
-
<span class="cline-any cline-no"> </span>
|
|
439
|
-
<span class="cline-any cline-no"> </span>
|
|
440
|
-
<span class="cline-any cline-no"> </span>
|
|
441
477
|
<span class="cline-any cline-neutral"> </span>
|
|
442
|
-
<span class="cline-any cline-no"> </span>
|
|
443
|
-
<span class="cline-any cline-no"> </span>
|
|
444
478
|
<span class="cline-any cline-neutral"> </span>
|
|
445
|
-
<span class="cline-any cline-no"> </span>
|
|
446
479
|
<span class="cline-any cline-neutral"> </span>
|
|
447
|
-
<span class="cline-any cline-
|
|
448
|
-
<span class="cline-any cline-
|
|
449
|
-
<span class="cline-any cline-
|
|
450
|
-
<span class="cline-any cline-no"> </span>
|
|
480
|
+
<span class="cline-any cline-neutral"> </span>
|
|
481
|
+
<span class="cline-any cline-yes">2x</span>
|
|
482
|
+
<span class="cline-any cline-neutral"> </span>
|
|
451
483
|
<span class="cline-any cline-neutral"> </span>
|
|
452
484
|
<span class="cline-any cline-neutral"> </span>
|
|
453
|
-
<span class="cline-any cline-no"> </span>
|
|
454
|
-
<span class="cline-any cline-no"> </span>
|
|
455
|
-
<span class="cline-any cline-no"> </span>
|
|
456
485
|
<span class="cline-any cline-neutral"> </span>
|
|
457
|
-
<span class="cline-any cline-no"> </span>
|
|
458
486
|
<span class="cline-any cline-neutral"> </span>
|
|
487
|
+
<span class="cline-any cline-yes">40x</span>
|
|
488
|
+
<span class="cline-any cline-yes">40x</span>
|
|
489
|
+
<span class="cline-any cline-yes">40x</span>
|
|
459
490
|
<span class="cline-any cline-neutral"> </span>
|
|
491
|
+
<span class="cline-any cline-yes">120x</span>
|
|
492
|
+
<span class="cline-any cline-yes">40x</span>
|
|
460
493
|
<span class="cline-any cline-neutral"> </span>
|
|
494
|
+
<span class="cline-any cline-yes">160x</span>
|
|
495
|
+
<span class="cline-any cline-neutral"> </span>
|
|
496
|
+
<span class="cline-any cline-yes">40x</span>
|
|
461
497
|
<span class="cline-any cline-no"> </span>
|
|
462
498
|
<span class="cline-any cline-no"> </span>
|
|
463
499
|
<span class="cline-any cline-no"> </span>
|
|
464
500
|
<span class="cline-any cline-neutral"> </span>
|
|
465
501
|
<span class="cline-any cline-neutral"> </span>
|
|
502
|
+
<span class="cline-any cline-yes">40x</span>
|
|
503
|
+
<span class="cline-any cline-yes">40x</span>
|
|
504
|
+
<span class="cline-any cline-yes">40x</span>
|
|
505
|
+
<span class="cline-any cline-neutral"> </span>
|
|
466
506
|
<span class="cline-any cline-no"> </span>
|
|
467
507
|
<span class="cline-any cline-neutral"> </span>
|
|
468
508
|
<span class="cline-any cline-neutral"> </span>
|
|
509
|
+
<span class="cline-any cline-neutral"> </span>
|
|
510
|
+
<span class="cline-any cline-yes">40x</span>
|
|
511
|
+
<span class="cline-any cline-yes">40x</span>
|
|
469
512
|
<span class="cline-any cline-no"> </span>
|
|
470
513
|
<span class="cline-any cline-neutral"> </span>
|
|
471
514
|
<span class="cline-any cline-neutral"> </span>
|
|
515
|
+
<span class="cline-any cline-yes">40x</span>
|
|
472
516
|
<span class="cline-any cline-neutral"> </span>
|
|
473
517
|
<span class="cline-any cline-neutral"> </span>
|
|
518
|
+
<span class="cline-any cline-yes">40x</span>
|
|
519
|
+
<span class="cline-any cline-neutral"> </span>
|
|
474
520
|
<span class="cline-any cline-neutral"> </span>
|
|
475
521
|
<span class="cline-any cline-neutral"> </span>
|
|
476
522
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -499,15 +545,12 @@
|
|
|
499
545
|
<span class="cline-any cline-neutral"> </span>
|
|
500
546
|
<span class="cline-any cline-neutral"> </span>
|
|
501
547
|
<span class="cline-any cline-neutral"> </span>
|
|
502
|
-
<span class="cline-any cline-no"> </span>
|
|
503
|
-
<span class="cline-any cline-no"> </span>
|
|
504
548
|
<span class="cline-any cline-neutral"> </span>
|
|
505
549
|
<span class="cline-any cline-neutral"> </span>
|
|
506
550
|
<span class="cline-any cline-neutral"> </span>
|
|
507
551
|
<span class="cline-any cline-neutral"> </span>
|
|
508
552
|
<span class="cline-any cline-neutral"> </span>
|
|
509
553
|
<span class="cline-any cline-neutral"> </span>
|
|
510
|
-
<span class="cline-any cline-no"> </span>
|
|
511
554
|
<span class="cline-any cline-neutral"> </span>
|
|
512
555
|
<span class="cline-any cline-neutral"> </span>
|
|
513
556
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -540,13 +583,9 @@
|
|
|
540
583
|
<span class="cline-any cline-neutral"> </span>
|
|
541
584
|
<span class="cline-any cline-neutral"> </span>
|
|
542
585
|
<span class="cline-any cline-neutral"> </span>
|
|
543
|
-
<span class="cline-any cline-no"> </span>
|
|
544
|
-
<span class="cline-any cline-no"> </span>
|
|
545
586
|
<span class="cline-any cline-neutral"> </span>
|
|
546
|
-
<span class="cline-any cline-no"> </span>
|
|
547
587
|
<span class="cline-any cline-neutral"> </span>
|
|
548
588
|
<span class="cline-any cline-neutral"> </span>
|
|
549
|
-
<span class="cline-any cline-no"> </span>
|
|
550
589
|
<span class="cline-any cline-neutral"> </span>
|
|
551
590
|
<span class="cline-any cline-neutral"> </span>
|
|
552
591
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -599,12 +638,16 @@
|
|
|
599
638
|
<span class="cline-any cline-neutral"> </span>
|
|
600
639
|
<span class="cline-any cline-neutral"> </span>
|
|
601
640
|
<span class="cline-any cline-neutral"> </span>
|
|
641
|
+
<span class="cline-any cline-yes">20x</span>
|
|
642
|
+
<span class="cline-any cline-yes">20x</span>
|
|
602
643
|
<span class="cline-any cline-neutral"> </span>
|
|
603
644
|
<span class="cline-any cline-neutral"> </span>
|
|
604
645
|
<span class="cline-any cline-neutral"> </span>
|
|
605
646
|
<span class="cline-any cline-neutral"> </span>
|
|
606
647
|
<span class="cline-any cline-neutral"> </span>
|
|
607
648
|
<span class="cline-any cline-neutral"> </span>
|
|
649
|
+
<span class="cline-any cline-no"> </span>
|
|
650
|
+
<span class="cline-any cline-neutral"> </span>
|
|
608
651
|
<span class="cline-any cline-neutral"> </span>
|
|
609
652
|
<span class="cline-any cline-neutral"> </span>
|
|
610
653
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -646,9 +689,13 @@
|
|
|
646
689
|
<span class="cline-any cline-neutral"> </span>
|
|
647
690
|
<span class="cline-any cline-neutral"> </span>
|
|
648
691
|
<span class="cline-any cline-neutral"> </span>
|
|
692
|
+
<span class="cline-any cline-no"> </span>
|
|
693
|
+
<span class="cline-any cline-no"> </span>
|
|
649
694
|
<span class="cline-any cline-neutral"> </span>
|
|
695
|
+
<span class="cline-any cline-no"> </span>
|
|
650
696
|
<span class="cline-any cline-neutral"> </span>
|
|
651
697
|
<span class="cline-any cline-neutral"> </span>
|
|
698
|
+
<span class="cline-any cline-yes">20x</span>
|
|
652
699
|
<span class="cline-any cline-neutral"> </span>
|
|
653
700
|
<span class="cline-any cline-neutral"> </span>
|
|
654
701
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -755,7 +802,40 @@
|
|
|
755
802
|
<span class="cline-any cline-neutral"> </span>
|
|
756
803
|
<span class="cline-any cline-neutral"> </span>
|
|
757
804
|
<span class="cline-any cline-neutral"> </span>
|
|
758
|
-
<span class="cline-any cline-
|
|
805
|
+
<span class="cline-any cline-neutral"> </span>
|
|
806
|
+
<span class="cline-any cline-neutral"> </span>
|
|
807
|
+
<span class="cline-any cline-neutral"> </span>
|
|
808
|
+
<span class="cline-any cline-neutral"> </span>
|
|
809
|
+
<span class="cline-any cline-neutral"> </span>
|
|
810
|
+
<span class="cline-any cline-neutral"> </span>
|
|
811
|
+
<span class="cline-any cline-neutral"> </span>
|
|
812
|
+
<span class="cline-any cline-neutral"> </span>
|
|
813
|
+
<span class="cline-any cline-neutral"> </span>
|
|
814
|
+
<span class="cline-any cline-neutral"> </span>
|
|
815
|
+
<span class="cline-any cline-neutral"> </span>
|
|
816
|
+
<span class="cline-any cline-neutral"> </span>
|
|
817
|
+
<span class="cline-any cline-neutral"> </span>
|
|
818
|
+
<span class="cline-any cline-neutral"> </span>
|
|
819
|
+
<span class="cline-any cline-neutral"> </span>
|
|
820
|
+
<span class="cline-any cline-neutral"> </span>
|
|
821
|
+
<span class="cline-any cline-neutral"> </span>
|
|
822
|
+
<span class="cline-any cline-neutral"> </span>
|
|
823
|
+
<span class="cline-any cline-neutral"> </span>
|
|
824
|
+
<span class="cline-any cline-neutral"> </span>
|
|
825
|
+
<span class="cline-any cline-neutral"> </span>
|
|
826
|
+
<span class="cline-any cline-neutral"> </span>
|
|
827
|
+
<span class="cline-any cline-neutral"> </span>
|
|
828
|
+
<span class="cline-any cline-neutral"> </span>
|
|
829
|
+
<span class="cline-any cline-neutral"> </span>
|
|
830
|
+
<span class="cline-any cline-neutral"> </span>
|
|
831
|
+
<span class="cline-any cline-neutral"> </span>
|
|
832
|
+
<span class="cline-any cline-neutral"> </span>
|
|
833
|
+
<span class="cline-any cline-neutral"> </span>
|
|
834
|
+
<span class="cline-any cline-neutral"> </span>
|
|
835
|
+
<span class="cline-any cline-neutral"> </span>
|
|
836
|
+
<span class="cline-any cline-neutral"> </span>
|
|
837
|
+
<span class="cline-any cline-neutral"> </span>
|
|
838
|
+
<span class="cline-any cline-yes">2x</span>
|
|
759
839
|
<span class="cline-any cline-neutral"> </span>
|
|
760
840
|
<span class="cline-any cline-neutral"> </span>
|
|
761
841
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -779,81 +859,180 @@ import {
|
|
|
779
859
|
} from '@folio/stripes/components';
|
|
780
860
|
import { required as requiredValidator, composeValidators } from '../../utils/validators';
|
|
781
861
|
|
|
782
|
-
|
|
862
|
+
import {
|
|
863
|
+
DECIMAL_CLASS_NAME,
|
|
864
|
+
INTEGER_CLASS_NAME,
|
|
865
|
+
TEXT_CLASS_NAME,
|
|
866
|
+
REFDATA_CLASS_NAME,
|
|
867
|
+
MULTI_REFDATA_CLASS_NAME,
|
|
868
|
+
DATE_CLASS_NAME
|
|
869
|
+
} from '../../constants/customProperties';
|
|
870
|
+
|
|
871
|
+
const CustomPropertyForm = ({
|
|
783
872
|
contextFilterOptions,
|
|
784
873
|
helpPopovers,
|
|
785
874
|
labelOverrides,
|
|
786
875
|
refdata
|
|
787
876
|
}) => {
|
|
788
|
-
const { values } =
|
|
789
|
-
const { change } =
|
|
790
|
-
const intl =
|
|
877
|
+
const { values } = useFormState();
|
|
878
|
+
const { change } = useForm();
|
|
879
|
+
const intl = useIntl();
|
|
791
880
|
|
|
792
|
-
const booleanToString =
|
|
793
|
-
const stringToBoolean = <span class="
|
|
881
|
+
const booleanToString = booleanValue => booleanValue?.toString();
|
|
882
|
+
const stringToBoolean = <span class="fstat-no" title="function not covered" >st</span>ringValue => <span class="cstat-no" title="statement not covered" >stringValue === 'true';</span>
|
|
794
883
|
|
|
795
|
-
const [contextOptions, setContextOptions] =
|
|
884
|
+
const [contextOptions, setContextOptions] = useState(contextFilterOptions?.filter(ctx => ctx.value !== '' && ctx?.value !== 'isNull'));
|
|
796
885
|
|
|
797
|
-
const addCtx = <span class="
|
|
886
|
+
const addCtx = <span class="fstat-no" title="function not covered" >({</span> _r, _e, filterText }) => {
|
|
798
887
|
const newOption = <span class="cstat-no" title="statement not covered" >{ value: filterText, label: filterText };</span>
|
|
799
888
|
<span class="cstat-no" title="statement not covered" > setContextOptions([newOption, ...contextOptions]);</span>
|
|
800
889
|
<span class="cstat-no" title="statement not covered" > change('ctx', [newOption]);</span>
|
|
801
890
|
};
|
|
802
891
|
|
|
803
|
-
const renderAddCtx =
|
|
804
|
-
<span class="
|
|
805
|
-
|
|
806
|
-
} else {
|
|
892
|
+
const renderAddCtx = ({ filterValue, exactMatch }) => {
|
|
893
|
+
if (!filterValue || <span class="branch-1 cbranch-no" title="branch not covered" >exactMatch)</span> {
|
|
894
|
+
return null;
|
|
895
|
+
} else <span class="missing-if-branch" title="else path not taken" >E</span>{
|
|
807
896
|
<span class="cstat-no" title="statement not covered" > return <FormattedMessage id="stripes-kint-components.customProperties.ctx.addContext" values={{ value: filterValue }} />;</span>
|
|
808
897
|
}
|
|
809
898
|
};
|
|
810
899
|
|
|
811
|
-
const primaryRetiredValidator =
|
|
812
|
-
<span class="
|
|
900
|
+
const primaryRetiredValidator = (_v, allValues) => {
|
|
901
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (allValues.primary && allValues.retired) {
|
|
813
902
|
<span class="cstat-no" title="statement not covered" > return labelOverrides?.primaryRetired ??</span>
|
|
814
903
|
<FormattedMessage id="stripes-kint-components.errors.primaryRetired" />;
|
|
815
904
|
}
|
|
816
|
-
|
|
905
|
+
return null;
|
|
817
906
|
};
|
|
818
907
|
|
|
819
|
-
|
|
908
|
+
return (
|
|
820
909
|
<>
|
|
910
|
+
{/* Users can only configure the type of a custom property when creating it, not when editing it */}
|
|
911
|
+
<Row>
|
|
912
|
+
<Col xs={6}>
|
|
913
|
+
<Field
|
|
914
|
+
component={Select}
|
|
915
|
+
dataOptions={[
|
|
916
|
+
{ label: '', value: '' },
|
|
917
|
+
{
|
|
918
|
+
label: intl.formatMessage({
|
|
919
|
+
id: `stripes-kint-components.customProperties.type.${DECIMAL_CLASS_NAME}`,
|
|
920
|
+
}),
|
|
921
|
+
value: DECIMAL_CLASS_NAME,
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
label: intl.formatMessage({
|
|
925
|
+
id: `stripes-kint-components.customProperties.type.${INTEGER_CLASS_NAME}`,
|
|
926
|
+
}),
|
|
927
|
+
value: INTEGER_CLASS_NAME,
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
label: intl.formatMessage({
|
|
931
|
+
id: `stripes-kint-components.customProperties.type.${TEXT_CLASS_NAME}`,
|
|
932
|
+
}),
|
|
933
|
+
value: TEXT_CLASS_NAME,
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
label: intl.formatMessage({
|
|
937
|
+
id: `stripes-kint-components.customProperties.type.${REFDATA_CLASS_NAME}`,
|
|
938
|
+
}),
|
|
939
|
+
value: REFDATA_CLASS_NAME,
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
label: intl.formatMessage({
|
|
943
|
+
id: `stripes-kint-components.customProperties.type.${MULTI_REFDATA_CLASS_NAME}`,
|
|
944
|
+
}),
|
|
945
|
+
value: MULTI_REFDATA_CLASS_NAME,
|
|
946
|
+
},
|
|
947
|
+
{
|
|
948
|
+
label: intl.formatMessage({
|
|
949
|
+
id: `stripes-kint-components.customProperties.type.${DATE_CLASS_NAME}`,
|
|
950
|
+
}),
|
|
951
|
+
value: DATE_CLASS_NAME,
|
|
952
|
+
},
|
|
953
|
+
]
|
|
954
|
+
}
|
|
955
|
+
disabled={values?.id}
|
|
956
|
+
label={
|
|
957
|
+
<div>
|
|
958
|
+
{labelOverrides?.type ??
|
|
959
|
+
<FormattedMessage id="stripes-kint-components.customProperties.type" />}
|
|
960
|
+
{helpPopovers?.type ?
|
|
961
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > <InfoPopover</span>
|
|
962
|
+
content={helpPopovers?.type}
|
|
963
|
+
/> : null}
|
|
964
|
+
</div>
|
|
965
|
+
}
|
|
966
|
+
name="type"
|
|
967
|
+
required
|
|
968
|
+
validate={requiredValidator}
|
|
969
|
+
/>
|
|
970
|
+
</Col>
|
|
971
|
+
<Col xs={6}>
|
|
972
|
+
{(values?.type === REFDATA_CLASS_NAME || values?.type === MULTI_REFDATA_CLASS_NAME) && (
|
|
973
|
+
<span class="branch-2 cbranch-no" title="branch not covered" > <Field</span>
|
|
974
|
+
component={Select}
|
|
975
|
+
dataOptions={[{ label: '', value: '' }, ...refdata]}
|
|
976
|
+
disabled={values?.id}
|
|
977
|
+
label={
|
|
978
|
+
<div>
|
|
979
|
+
{labelOverrides?.category ??
|
|
980
|
+
<FormattedMessage id="stripes-kint-components.customProperties.category" />}
|
|
981
|
+
{helpPopovers?.category ?
|
|
982
|
+
<InfoPopover
|
|
983
|
+
content={helpPopovers?.category}
|
|
984
|
+
/> : null}
|
|
985
|
+
</div>
|
|
986
|
+
}
|
|
987
|
+
name="category"
|
|
988
|
+
required
|
|
989
|
+
validate={requiredValidator}
|
|
990
|
+
/>
|
|
991
|
+
)}
|
|
992
|
+
</Col>
|
|
993
|
+
</Row>
|
|
821
994
|
<Row>
|
|
822
995
|
<Col xs={6}>
|
|
823
996
|
<Field
|
|
824
997
|
component={TextField}
|
|
825
|
-
|
|
826
|
-
|
|
998
|
+
id="custom-prop-label"
|
|
999
|
+
label={
|
|
1000
|
+
<div>
|
|
1001
|
+
{labelOverrides?.label ??
|
|
1002
|
+
<FormattedMessage id="stripes-kint-components.customProperties.label" />}
|
|
1003
|
+
{helpPopovers?.label ?
|
|
1004
|
+
<InfoPopover
|
|
1005
|
+
content={helpPopovers?.label}
|
|
1006
|
+
/> : <span class="branch-1 cbranch-no" title="branch not covered" >null}</span>
|
|
1007
|
+
</div>
|
|
827
1008
|
}
|
|
828
1009
|
name="label"
|
|
829
1010
|
required
|
|
830
|
-
startControl={helpPopovers?.label ?
|
|
831
|
-
<InfoPopover
|
|
832
|
-
content={helpPopovers?.label}
|
|
833
|
-
/> : null
|
|
834
|
-
}
|
|
835
1011
|
validate={requiredValidator}
|
|
836
1012
|
/>
|
|
837
1013
|
</Col>
|
|
838
1014
|
<Col xs={6}>
|
|
839
1015
|
<Field
|
|
840
1016
|
component={TextField}
|
|
841
|
-
|
|
842
|
-
|
|
1017
|
+
id="custom-prop-name"
|
|
1018
|
+
label={
|
|
1019
|
+
<div>
|
|
1020
|
+
{labelOverrides?.name ??
|
|
1021
|
+
<FormattedMessage id="stripes-kint-components.customProperties.name" />}
|
|
1022
|
+
{helpPopovers?.name ?
|
|
1023
|
+
<InfoPopover
|
|
1024
|
+
content={helpPopovers?.name}
|
|
1025
|
+
/> : <span class="branch-1 cbranch-no" title="branch not covered" >null}</span>
|
|
1026
|
+
</div>
|
|
843
1027
|
}
|
|
844
1028
|
name="name"
|
|
845
1029
|
required
|
|
846
|
-
|
|
847
|
-
&
|
|
848
|
-
|
|
849
|
-
/> : null
|
|
850
|
-
}
|
|
851
|
-
validate={<span class="fstat-no" title="function not covered" >v </span>=> {
|
|
852
|
-
<span class="cstat-no" title="statement not covered" > if (v && v.length) {</span>
|
|
853
|
-
<span class="cstat-no" title="statement not covered" > return /^[a-z][a-z0-9]*$/i.test(v) ? (</span>
|
|
1030
|
+
validate={v => {
|
|
1031
|
+
<span class="missing-if-branch" title="else path not taken" >E</span>if (v && v.length) {
|
|
1032
|
+
return /^[a-z][a-z0-9]*$/i.test(v) ? (
|
|
854
1033
|
undefined
|
|
855
1034
|
) : (
|
|
856
|
-
<FormattedMessage id="stripes-kint-components.errors.hasNonAlphaName" />
|
|
1035
|
+
<span class="branch-1 cbranch-no" title="branch not covered" > <FormattedMessage id="stripes-kint-components.errors.hasNonAlphaName" /></span>
|
|
857
1036
|
);
|
|
858
1037
|
}
|
|
859
1038
|
|
|
@@ -863,30 +1042,40 @@ const CustomPropertyForm = <span class="cstat-no" title="statement not covered"
|
|
|
863
1042
|
</Col>
|
|
864
1043
|
</Row>
|
|
865
1044
|
<Row>
|
|
866
|
-
<Col xs={
|
|
1045
|
+
<Col xs={6}>
|
|
867
1046
|
<Field
|
|
868
1047
|
component={TextArea}
|
|
869
|
-
|
|
870
|
-
|
|
1048
|
+
id="custom-prop-description"
|
|
1049
|
+
label={
|
|
1050
|
+
<div>
|
|
1051
|
+
{labelOverrides?.description ??
|
|
1052
|
+
<FormattedMessage id="stripes-kint-components.customProperties.description" />}
|
|
1053
|
+
{helpPopovers?.description ?
|
|
1054
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > <InfoPopover</span>
|
|
1055
|
+
content={helpPopovers?.description}
|
|
1056
|
+
/> : null}
|
|
1057
|
+
</div>
|
|
871
1058
|
}
|
|
872
1059
|
name="description"
|
|
873
1060
|
required
|
|
874
|
-
startControl={helpPopovers?.description ?
|
|
875
|
-
<InfoPopover
|
|
876
|
-
content={helpPopovers?.description}
|
|
877
|
-
/> : null
|
|
878
|
-
}
|
|
879
1061
|
validate={requiredValidator}
|
|
880
1062
|
/>
|
|
881
1063
|
</Col>
|
|
882
|
-
<Col xs={
|
|
1064
|
+
<Col xs={6}>
|
|
883
1065
|
<Field
|
|
884
1066
|
actions={[{ onSelect: addCtx, render: renderAddCtx }]}
|
|
885
1067
|
component={MultiSelection}
|
|
886
1068
|
dataOptions={contextOptions}
|
|
887
1069
|
emptyMessage={intl.formatMessage({ id: 'stripes-kint-components.customProperties.noCtxFound' })}
|
|
888
|
-
label={
|
|
889
|
-
<
|
|
1070
|
+
label={
|
|
1071
|
+
<div>
|
|
1072
|
+
{labelOverrides?.ctx ??
|
|
1073
|
+
<FormattedMessage id="stripes-kint-components.customProperties.ctx" />}
|
|
1074
|
+
{helpPopovers?.ctx ?
|
|
1075
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > <InfoPopover</span>
|
|
1076
|
+
content={helpPopovers?.ctx}
|
|
1077
|
+
/> : null}
|
|
1078
|
+
</div>
|
|
890
1079
|
}
|
|
891
1080
|
name="ctx"
|
|
892
1081
|
onChange={<span class="fstat-no" title="function not covered" >(s</span>electedItems) => {
|
|
@@ -896,7 +1085,7 @@ const CustomPropertyForm = <span class="cstat-no" title="statement not covered"
|
|
|
896
1085
|
<span class="cstat-no" title="statement not covered" > change('ctx', undefined);</span>
|
|
897
1086
|
}
|
|
898
1087
|
}}
|
|
899
|
-
validate={
|
|
1088
|
+
validate={value => (value?.length > 1 ? <span class="branch-0 cbranch-no" title="branch not covered" ><FormattedMessage id="stripes-kint-components.customProperties.ctx.error.moreThanOne" /> </span>: null)}
|
|
900
1089
|
/>
|
|
901
1090
|
</Col>
|
|
902
1091
|
</Row>
|
|
@@ -904,16 +1093,19 @@ const CustomPropertyForm = <span class="cstat-no" title="statement not covered"
|
|
|
904
1093
|
<Col xs={3}>
|
|
905
1094
|
<Field
|
|
906
1095
|
component={TextField}
|
|
907
|
-
|
|
908
|
-
|
|
1096
|
+
id="custom-prop-weight"
|
|
1097
|
+
label={
|
|
1098
|
+
<div>
|
|
1099
|
+
{labelOverrides?.weight ??
|
|
1100
|
+
<FormattedMessage id="stripes-kint-components.customProperties.weight" />}
|
|
1101
|
+
{helpPopovers?.weight ?
|
|
1102
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > <InfoPopover</span>
|
|
1103
|
+
content={helpPopovers?.weight}
|
|
1104
|
+
/> : null}
|
|
1105
|
+
</div>
|
|
909
1106
|
}
|
|
910
1107
|
name="weight"
|
|
911
1108
|
required
|
|
912
|
-
startControl={helpPopovers?.weight ?
|
|
913
|
-
<InfoPopover
|
|
914
|
-
content={helpPopovers?.weight}
|
|
915
|
-
/> : null
|
|
916
|
-
}
|
|
917
1109
|
type="number"
|
|
918
1110
|
validate={requiredValidator}
|
|
919
1111
|
/>
|
|
@@ -936,19 +1128,19 @@ const CustomPropertyForm = <span class="cstat-no" title="statement not covered"
|
|
|
936
1128
|
},
|
|
937
1129
|
]}
|
|
938
1130
|
format={booleanToString}
|
|
939
|
-
label={
|
|
940
|
-
<
|
|
941
|
-
|
|
942
|
-
|
|
1131
|
+
label={
|
|
1132
|
+
<div>
|
|
1133
|
+
{labelOverrides?.primary ??
|
|
1134
|
+
<FormattedMessage id="stripes-kint-components.customProperties.primary" />}
|
|
1135
|
+
{helpPopovers?.primary ?
|
|
1136
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > <InfoPopover</span>
|
|
1137
|
+
content={helpPopovers?.primary}
|
|
1138
|
+
/> : null}
|
|
1139
|
+
</div>
|
|
943
1140
|
}
|
|
944
1141
|
name="primary"
|
|
945
1142
|
parse={stringToBoolean}
|
|
946
1143
|
required
|
|
947
|
-
startControl={helpPopovers?.primary ?
|
|
948
|
-
<InfoPopover
|
|
949
|
-
content={helpPopovers?.primary}
|
|
950
|
-
/> : null
|
|
951
|
-
}
|
|
952
1144
|
validate={composeValidators(
|
|
953
1145
|
requiredValidator,
|
|
954
1146
|
primaryRetiredValidator
|
|
@@ -973,19 +1165,19 @@ const CustomPropertyForm = <span class="cstat-no" title="statement not covered"
|
|
|
973
1165
|
},
|
|
974
1166
|
]}
|
|
975
1167
|
format={booleanToString}
|
|
976
|
-
label={
|
|
977
|
-
<
|
|
978
|
-
|
|
979
|
-
|
|
1168
|
+
label={
|
|
1169
|
+
<div>
|
|
1170
|
+
{labelOverrides?.retired ??
|
|
1171
|
+
<span class="branch-1 cbranch-no" title="branch not covered" > <FormattedMessage id="stripes-kint-components.customProperties.retired" />}</span>
|
|
1172
|
+
{helpPopovers?.retired ?
|
|
1173
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > <InfoPopover</span>
|
|
1174
|
+
content={helpPopovers?.retired}
|
|
1175
|
+
/> : null}
|
|
1176
|
+
</div>
|
|
980
1177
|
}
|
|
981
1178
|
name="retired"
|
|
982
1179
|
parse={stringToBoolean}
|
|
983
1180
|
required
|
|
984
|
-
startControl={helpPopovers?.primary ?
|
|
985
|
-
<InfoPopover
|
|
986
|
-
content={helpPopovers?.primary}
|
|
987
|
-
/> : null
|
|
988
|
-
}
|
|
989
1181
|
validate={composeValidators(
|
|
990
1182
|
requiredValidator,
|
|
991
1183
|
primaryRetiredValidator
|
|
@@ -1012,101 +1204,29 @@ const CustomPropertyForm = <span class="cstat-no" title="statement not covered"
|
|
|
1012
1204
|
},
|
|
1013
1205
|
]}
|
|
1014
1206
|
format={booleanToString}
|
|
1015
|
-
label={
|
|
1016
|
-
<
|
|
1207
|
+
label={
|
|
1208
|
+
<div>
|
|
1209
|
+
{labelOverrides?.defaultVisibility ??
|
|
1210
|
+
<FormattedMessage id="stripes-kint-components.customProperties.defaultVisibility" />}
|
|
1211
|
+
{helpPopovers?.defaultVisibility ?
|
|
1212
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > <InfoPopover</span>
|
|
1213
|
+
content={helpPopovers?.defaultVisibility}
|
|
1214
|
+
/> : null}
|
|
1215
|
+
</div>
|
|
1017
1216
|
}
|
|
1018
1217
|
name="defaultInternal"
|
|
1019
1218
|
parse={stringToBoolean}
|
|
1020
1219
|
required
|
|
1021
|
-
startControl={helpPopovers?.defaultVisibility ?
|
|
1022
|
-
<InfoPopover
|
|
1023
|
-
content={helpPopovers?.defaultVisibility}
|
|
1024
|
-
/> : null
|
|
1025
|
-
}
|
|
1026
1220
|
validate={requiredValidator}
|
|
1027
1221
|
/>
|
|
1028
1222
|
</Col>
|
|
1029
1223
|
</Row>
|
|
1030
|
-
{/* Users can only configure the type of a custom property when creating it, not when editing it */}
|
|
1031
|
-
{!values?.id && (
|
|
1032
|
-
<Row>
|
|
1033
|
-
<Col xs={6}>
|
|
1034
|
-
<Field
|
|
1035
|
-
component={Select}
|
|
1036
|
-
dataOptions={[
|
|
1037
|
-
{ label: '', value: '' },
|
|
1038
|
-
{
|
|
1039
|
-
label: intl.formatMessage({
|
|
1040
|
-
id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyDecimal',
|
|
1041
|
-
}),
|
|
1042
|
-
value: 'Decimal',
|
|
1043
|
-
},
|
|
1044
|
-
{
|
|
1045
|
-
label: intl.formatMessage({
|
|
1046
|
-
id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyInteger',
|
|
1047
|
-
}),
|
|
1048
|
-
value: 'Integer',
|
|
1049
|
-
},
|
|
1050
|
-
{
|
|
1051
|
-
label: intl.formatMessage({
|
|
1052
|
-
id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyText',
|
|
1053
|
-
}),
|
|
1054
|
-
value: 'Text',
|
|
1055
|
-
},
|
|
1056
|
-
{
|
|
1057
|
-
label: intl.formatMessage({
|
|
1058
|
-
id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata',
|
|
1059
|
-
}),
|
|
1060
|
-
value: 'Refdata',
|
|
1061
|
-
},
|
|
1062
|
-
{
|
|
1063
|
-
label: intl.formatMessage({
|
|
1064
|
-
id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyLocalDate',
|
|
1065
|
-
}),
|
|
1066
|
-
value: 'LocalDate',
|
|
1067
|
-
},
|
|
1068
|
-
]
|
|
1069
|
-
}
|
|
1070
|
-
label={labelOverrides?.type ??
|
|
1071
|
-
<FormattedMessage id="stripes-kint-components.customProperties.type" />
|
|
1072
|
-
}
|
|
1073
|
-
name="type"
|
|
1074
|
-
required
|
|
1075
|
-
startControl={helpPopovers?.type ?
|
|
1076
|
-
<InfoPopover
|
|
1077
|
-
content={helpPopovers?.type}
|
|
1078
|
-
/> : null
|
|
1079
|
-
}
|
|
1080
|
-
validate={requiredValidator}
|
|
1081
|
-
/>
|
|
1082
|
-
</Col>
|
|
1083
|
-
<Col xs={6}>
|
|
1084
|
-
{values?.type === 'Refdata' && (
|
|
1085
|
-
<Field
|
|
1086
|
-
component={Select}
|
|
1087
|
-
dataOptions={[{ label: '', value: '' }, ...refdata]}
|
|
1088
|
-
label={labelOverrides?.category ??
|
|
1089
|
-
<FormattedMessage id="stripes-kint-components.customProperties.category" />
|
|
1090
|
-
}
|
|
1091
|
-
name="category"
|
|
1092
|
-
required
|
|
1093
|
-
startControl={helpPopovers?.category ?
|
|
1094
|
-
<InfoPopover
|
|
1095
|
-
content={helpPopovers?.category}
|
|
1096
|
-
/> : null
|
|
1097
|
-
}
|
|
1098
|
-
validate={requiredValidator}
|
|
1099
|
-
/>
|
|
1100
|
-
)}
|
|
1101
|
-
</Col>
|
|
1102
|
-
</Row>
|
|
1103
|
-
)}
|
|
1104
1224
|
</>
|
|
1105
1225
|
);
|
|
1106
1226
|
};
|
|
1107
1227
|
|
|
1108
|
-
|
|
1109
|
-
contextFilterOptions: PropTypes.arrayOf(PropTypes.
|
|
1228
|
+
CustomPropertyForm.propTypes = {
|
|
1229
|
+
contextFilterOptions: PropTypes.arrayOf(PropTypes.object),
|
|
1110
1230
|
helpPopovers: PropTypes.object,
|
|
1111
1231
|
labelOverrides: PropTypes.object,
|
|
1112
1232
|
refdata: PropTypes.arrayOf(PropTypes.object)
|
|
@@ -1120,7 +1240,7 @@ export default CustomPropertyForm;
|
|
|
1120
1240
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1121
1241
|
Code coverage generated by
|
|
1122
1242
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1123
|
-
at Thu
|
|
1243
|
+
at Thu Jun 16 2022 14:59:18 GMT+0100 (British Summer Time)
|
|
1124
1244
|
</div>
|
|
1125
1245
|
<script src="../../prettify.js"></script>
|
|
1126
1246
|
<script>
|