@k-int/stripes-kint-components 4.5.1 → 4.6.1
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 +11 -1
- package/README.md +14 -0
- package/es/__mocks__/@folio/stripes/components.js +10 -21
- package/es/__mocks__/@folio/stripes/core.js +4 -7
- package/es/__mocks__/@folio/stripes/smart-components.js +4 -7
- package/es/__mocks__/react-query.js +4 -7
- package/es/__mocks__/react-router-dom.js +6 -7
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +2 -2
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +6 -6
- package/es/index.js +62 -49
- package/es/lib/ActionList/ActionList.js +38 -51
- package/es/lib/ActionList/ActionListFieldArray.js +143 -167
- package/es/lib/ActionList/index.js +1 -1
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +57 -77
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +15 -19
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +111 -160
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +30 -67
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +36 -48
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +83 -121
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +9 -8
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +48 -135
- package/es/lib/CustomProperties/Config/index.js +4 -4
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +19 -21
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +11 -16
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +29 -27
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +11 -16
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +86 -103
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +26 -63
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +123 -115
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +95 -176
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +43 -44
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +23 -27
- package/es/lib/CustomProperties/Edit/index.js +5 -5
- package/es/lib/CustomProperties/Edit/testResources.js +13 -35
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +60 -81
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +23 -57
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +39 -54
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +17 -16
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +27 -23
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +18 -45
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +18 -20
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +23 -52
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +37 -41
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +77 -225
- package/es/lib/CustomProperties/Filter/index.js +6 -6
- package/es/lib/CustomProperties/Filter/testResources.js +12 -32
- package/es/lib/CustomProperties/Filter/useOperators.js +17 -16
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +17 -30
- package/es/lib/CustomProperties/Filter/useValueProps.js +22 -27
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +19 -21
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +11 -16
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +49 -57
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +14 -23
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +17 -18
- package/es/lib/CustomProperties/View/index.js +3 -3
- package/es/lib/CustomProperties/View/testResources.js +4 -4
- package/es/lib/CustomProperties/index.js +18 -18
- package/es/lib/CycleButton/CycleButton.js +17 -32
- package/es/lib/CycleButton/index.js +1 -1
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +108 -150
- package/es/lib/EditableRefdataCategoryList/index.js +1 -1
- package/es/lib/EditableRefdataList/EditableRefdataList.js +127 -170
- package/es/lib/EditableRefdataList/index.js +1 -1
- package/es/lib/EditableSettingsList/EditableSettingsList.js +16 -13
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +18 -25
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +61 -90
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +21 -34
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +99 -83
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +17 -19
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +187 -275
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +74 -109
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +52 -157
- package/es/lib/EditableSettingsList/SettingField/index.js +3 -3
- package/es/lib/EditableSettingsList/index.js +3 -3
- package/es/lib/FormModal/FormModal.js +43 -46
- package/es/lib/FormModal/index.js +1 -1
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +23 -27
- package/es/lib/FormattedKintMessage/index.js +1 -1
- package/es/lib/IconSelect/IconSelect.js +48 -68
- package/es/lib/IconSelect/index.js +1 -1
- package/es/lib/NoResultsMessage/NoResultsMessage.js +18 -17
- package/es/lib/NoResultsMessage/index.js +1 -1
- package/es/lib/QueryTypedown/QueryTypedown.js +17 -38
- package/es/lib/QueryTypedown/index.js +1 -1
- package/es/lib/RefdataButtons/RefdataButtons.js +26 -29
- package/es/lib/RefdataButtons/index.js +1 -1
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +83 -88
- package/es/lib/ResponsiveButtonGroup/index.js +1 -1
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +27 -40
- package/es/lib/RichSelect/RichSelect.js +70 -86
- package/es/lib/RichSelect/index.js +2 -2
- package/es/lib/RichSelect/useSelectedOption.js +3 -12
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +115 -137
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +39 -45
- package/es/lib/SASQLookupComponent/TableBody/index.js +1 -1
- package/es/lib/SASQLookupComponent/index.js +2 -2
- package/es/lib/SASQRoute/SASQRoute.js +31 -37
- package/es/lib/SASQRoute/index.js +1 -1
- package/es/lib/SASQViewComponent/SASQViewComponent.js +38 -45
- package/es/lib/SASQViewComponent/index.js +1 -1
- package/es/lib/SearchField/SearchField.js +10 -16
- package/es/lib/SearchField/index.js +1 -1
- package/es/lib/SettingPage/SettingPage.js +21 -20
- package/es/lib/SettingPage/SettingPagePane.js +8 -6
- package/es/lib/SettingPage/index.js +2 -2
- package/es/lib/SettingsFormContainer/SettingsFormContainer.js +112 -0
- package/es/lib/SettingsFormContainer/index.js +13 -0
- package/es/lib/Typedown/Typedown.js +61 -79
- package/es/lib/Typedown/index.js +1 -1
- package/es/lib/constants/customProperties.js +11 -11
- package/es/lib/constants/endpoints.js +9 -0
- package/es/lib/constants/eventCodes.js +3 -3
- package/es/lib/contexts/SettingsContext.js +1 -1
- package/es/lib/contexts/index.js +1 -1
- package/es/lib/hooks/__mocks__/index.js +9 -29
- package/es/lib/hooks/index.js +31 -17
- package/es/lib/hooks/typedownHooks/index.js +3 -3
- package/es/lib/hooks/typedownHooks/useTypedown.js +48 -48
- package/es/lib/hooks/typedownHooks/useTypedownData.js +11 -21
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +12 -20
- package/es/lib/hooks/useActiveElement.js +8 -17
- package/es/lib/hooks/useCustomProperties.js +22 -30
- package/es/lib/hooks/useHelperApp.js +30 -49
- package/es/lib/hooks/useIntlKey.js +3 -5
- package/es/lib/hooks/useIntlKeyStore.js +44 -49
- package/es/lib/hooks/useInvalidateRefdata.js +3 -5
- package/es/lib/hooks/useKintIntl.js +28 -31
- package/es/lib/hooks/useKiwtFieldArray.js +34 -45
- package/es/lib/hooks/useKiwtSASQuery.js +38 -48
- package/es/lib/hooks/useLocalStorageState.js +6 -18
- package/es/lib/hooks/useModConfigEntries.js +49 -0
- package/es/lib/hooks/useMutateCustomProperties.js +19 -62
- package/es/lib/hooks/useMutateModConfigEntry.js +40 -0
- package/es/lib/hooks/useMutateRefdataCategory.js +19 -60
- package/es/lib/hooks/useMutateRefdataValue.js +28 -65
- package/es/lib/hooks/useQIndex.js +12 -26
- package/es/lib/hooks/useRefdata.js +17 -19
- package/es/lib/hooks/useSASQQueryMeta.js +13 -20
- package/es/lib/hooks/useTemplates.js +13 -12
- package/es/lib/settingsHooks/index.js +3 -3
- package/es/lib/settingsHooks/useAppSettings.js +18 -25
- package/es/lib/settingsHooks/useSettingSection.js +16 -17
- package/es/lib/settingsHooks/useSettings.js +58 -72
- package/es/lib/utils/buildUrl.js +5 -5
- package/es/lib/utils/generateKiwtQuery.js +3 -3
- package/es/lib/utils/generateKiwtQueryParams.js +85 -93
- package/es/lib/utils/groupCustomPropertiesByCtx.js +8 -18
- package/es/lib/utils/highlightString.js +17 -37
- package/es/lib/utils/index.js +29 -15
- package/es/lib/utils/matchString.js +4 -8
- package/es/lib/utils/modConfigEntriesQueryKey.js +24 -0
- package/es/lib/utils/parseErrorResponse.js +22 -63
- package/es/lib/utils/parseKiwtQueryGroups.js +10 -10
- package/es/lib/utils/parseKiwtQueryGroups.test.js +15 -15
- package/es/lib/utils/parseModConfigEntry.js +21 -0
- package/es/lib/utils/refdataQueryKey.js +2 -2
- package/es/lib/utils/selectorSafe.js +3 -3
- package/es/lib/utils/sortByLabel.js +3 -3
- package/es/lib/utils/toCamelCase.js +7 -12
- package/es/lib/utils/typedownQueryKey.js +2 -2
- package/es/lib/validators/index.js +1 -1
- package/es/lib/validators/validators.js +22 -29
- package/junit.xml +239 -1489
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +17 -17
- 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 +44 -44
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +53 -53
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +59 -59
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +29 -29
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +53 -53
- 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 +19 -19
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +28 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +94 -94
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +118 -118
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +28 -28
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +64 -64
- 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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +33 -33
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +47 -47
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +22 -22
- 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 +42 -42
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +96 -96
- 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 +5 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +35 -35
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +38 -38
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +34 -34
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +16 -16
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +45 -45
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +36 -36
- 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/CycleButton/CycleButton.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +22 -22
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +39 -39
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +64 -64
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +64 -64
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +43 -43
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +28 -28
- 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/FormattedKintMessage/FormattedKintMessage.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +54 -54
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +15 -15
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +17 -17
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +12 -12
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +13 -13
- 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/SettingsFormContainer/SettingsFormContainer.js.html +337 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +11 -11
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +12 -12
- package/src/artifacts/coverage-jest/lcov-report/constants/endpoints.js.html +91 -0
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +12 -12
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +28 -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 +153 -123
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +8 -2
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +23 -23
- 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 +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +24 -24
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +21 -21
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +38 -38
- 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/useModConfigEntries.js.html +226 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateModConfigEntry.js.html +238 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.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/useSASQQueryMeta.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/index.html +257 -242
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +23 -23
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +7 -7
- 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 +4 -4
- 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 +61 -31
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +11 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/modConfigEntriesQueryKey.js.html +142 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseModConfigEntry.js.html +130 -0
- 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/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 +16 -16
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/validators/index.html +19 -19
- package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +32 -32
- package/src/artifacts/coverage-jest/lcov.info +1225 -1067
- package/src/index.js +6 -0
- package/src/lib/SettingsFormContainer/SettingsFormContainer.js +108 -0
- package/src/lib/SettingsFormContainer/index.js +1 -0
- package/src/lib/constants/endpoints.js +2 -0
- package/src/lib/hooks/index.js +2 -0
- package/src/lib/hooks/useModConfigEntries.js +47 -0
- package/src/lib/hooks/useMutateModConfigEntry.js +51 -0
- package/src/lib/utils/index.js +3 -0
- package/src/lib/utils/modConfigEntriesQueryKey.js +19 -0
- package/src/lib/utils/parseModConfigEntry.js +15 -0
- package/test/jest/helpers/KintHarness.js +21 -4
package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html
CHANGED
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">86.66% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>13/15</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">85.71% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>18/21</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>1/1</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">86.66% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>13/15</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>
|
|
@@ -135,18 +135,18 @@
|
|
|
135
135
|
<span class="cline-any cline-neutral"> </span>
|
|
136
136
|
<span class="cline-any cline-neutral"> </span>
|
|
137
137
|
<span class="cline-any cline-neutral"> </span>
|
|
138
|
-
<span class="cline-any cline-yes">
|
|
138
|
+
<span class="cline-any cline-yes">20x</span>
|
|
139
139
|
<span class="cline-any cline-neutral"> </span>
|
|
140
|
-
<span class="cline-any cline-yes">
|
|
141
|
-
<span class="cline-any cline-
|
|
140
|
+
<span class="cline-any cline-yes">20x</span>
|
|
141
|
+
<span class="cline-any cline-yes">16x</span>
|
|
142
142
|
<span class="cline-any cline-neutral"> </span>
|
|
143
|
-
<span class="cline-any cline-
|
|
143
|
+
<span class="cline-any cline-yes">16x</span>
|
|
144
144
|
<span class="cline-any cline-neutral"> </span>
|
|
145
145
|
<span class="cline-any cline-neutral"> </span>
|
|
146
146
|
<span class="cline-any cline-neutral"> </span>
|
|
147
147
|
<span class="cline-any cline-neutral"> </span>
|
|
148
|
-
<span class="cline-any cline-
|
|
149
|
-
<span class="cline-any cline-
|
|
148
|
+
<span class="cline-any cline-yes">16x</span>
|
|
149
|
+
<span class="cline-any cline-yes">12x</span>
|
|
150
150
|
<span class="cline-any cline-neutral"> </span>
|
|
151
151
|
<span class="cline-any cline-neutral"> </span>
|
|
152
152
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -154,7 +154,7 @@
|
|
|
154
154
|
<span class="cline-any cline-neutral"> </span>
|
|
155
155
|
<span class="cline-any cline-neutral"> </span>
|
|
156
156
|
<span class="cline-any cline-neutral"> </span>
|
|
157
|
-
<span class="cline-any cline-
|
|
157
|
+
<span class="cline-any cline-yes">16x</span>
|
|
158
158
|
<span class="cline-any cline-no"> </span>
|
|
159
159
|
<span class="cline-any cline-neutral"> </span>
|
|
160
160
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -163,27 +163,27 @@
|
|
|
163
163
|
<span class="cline-any cline-neutral"> </span>
|
|
164
164
|
<span class="cline-any cline-neutral"> </span>
|
|
165
165
|
<span class="cline-any cline-neutral"> </span>
|
|
166
|
-
<span class="cline-any cline-
|
|
167
|
-
<span class="cline-any cline-
|
|
166
|
+
<span class="cline-any cline-yes">16x</span>
|
|
167
|
+
<span class="cline-any cline-yes">14x</span>
|
|
168
168
|
<span class="cline-any cline-neutral"> </span>
|
|
169
169
|
<span class="cline-any cline-neutral"> </span>
|
|
170
170
|
<span class="cline-any cline-neutral"> </span>
|
|
171
171
|
<span class="cline-any cline-neutral"> </span>
|
|
172
172
|
<span class="cline-any cline-neutral"> </span>
|
|
173
|
-
<span class="cline-any cline-
|
|
173
|
+
<span class="cline-any cline-yes">16x</span>
|
|
174
174
|
<span class="cline-any cline-no"> </span>
|
|
175
175
|
<span class="cline-any cline-neutral"> </span>
|
|
176
176
|
<span class="cline-any cline-neutral"> </span>
|
|
177
177
|
<span class="cline-any cline-neutral"> </span>
|
|
178
178
|
<span class="cline-any cline-neutral"> </span>
|
|
179
|
-
<span class="cline-any cline-
|
|
180
|
-
<span class="cline-any cline-
|
|
179
|
+
<span class="cline-any cline-yes">16x</span>
|
|
180
|
+
<span class="cline-any cline-yes">14x</span>
|
|
181
181
|
<span class="cline-any cline-neutral"> </span>
|
|
182
182
|
<span class="cline-any cline-neutral"> </span>
|
|
183
183
|
<span class="cline-any cline-neutral"> </span>
|
|
184
184
|
<span class="cline-any cline-neutral"> </span>
|
|
185
185
|
<span class="cline-any cline-neutral"> </span>
|
|
186
|
-
<span class="cline-any cline-
|
|
186
|
+
<span class="cline-any cline-yes">16x</span>
|
|
187
187
|
<span class="cline-any cline-neutral"> </span>
|
|
188
188
|
<span class="cline-any cline-neutral"> </span>
|
|
189
189
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -199,16 +199,16 @@ const {
|
|
|
199
199
|
TEXT_CLASS_NAME: TEXT,
|
|
200
200
|
} = CUSTPROP_TYPES;
|
|
201
201
|
|
|
202
|
-
const useOperators =
|
|
203
|
-
const kintIntl =
|
|
202
|
+
const useOperators = (type = null, passedIntlKey = null, passedIntlNS = null, labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => {
|
|
203
|
+
const kintIntl = useKintIntl(passedIntlKey, passedIntlNS);
|
|
204
204
|
|
|
205
|
-
const operators =
|
|
205
|
+
const operators = [
|
|
206
206
|
{ value: ' isSet', label: kintIntl.formatKintMessage({ id: 'operator.isSet', overrideValue: labelOverrides.operatorIsSet }), noValueAllowed: true },
|
|
207
207
|
{ value: ' isNotSet', label: kintIntl.formatKintMessage({ id: 'operator.isNotSet', overrideValue: labelOverrides.operatorIsNotSet }), noValueAllowed: true },
|
|
208
208
|
];
|
|
209
209
|
|
|
210
|
-
|
|
211
|
-
|
|
210
|
+
if (!type || type === INTEGER || type === DECIMAL) {
|
|
211
|
+
operators.push(
|
|
212
212
|
{ value: '==', label: kintIntl.formatKintMessage({ id: 'operator.equals', overrideValue: labelOverrides.operatorEquals }) },
|
|
213
213
|
{ value: '!=', label: kintIntl.formatKintMessage({ id: 'operator.doesNotEqual', overrideValue: labelOverrides.operatorDoesNotEqual }) },
|
|
214
214
|
{ value: '>=', label: kintIntl.formatKintMessage({ id: 'operator.isGreaterThanOrEqual', overrideValue: labelOverrides.operatorIsGreaterThanOrEqual }) },
|
|
@@ -216,7 +216,7 @@ const useOperators = <span class="fstat-no" title="function not covered" >(t</sp
|
|
|
216
216
|
);
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
<span class="
|
|
219
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (type === DATE) { // Basically the same as the "number" types above, so no need to reassign if there is no type
|
|
220
220
|
<span class="cstat-no" title="statement not covered" > operators.push(</span>
|
|
221
221
|
{ value: '==', label: kintIntl.formatKintMessage({ id: 'operator.equals', overrideValue: labelOverrides.operatorEquals }) },
|
|
222
222
|
{ value: '!=', label: kintIntl.formatKintMessage({ id: 'operator.doesNotEqual', overrideValue: labelOverrides.operatorDoesNotEqual }) },
|
|
@@ -225,27 +225,27 @@ const useOperators = <span class="fstat-no" title="function not covered" >(t</sp
|
|
|
225
225
|
);
|
|
226
226
|
}
|
|
227
227
|
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
if (!type || type === REFDATA) {
|
|
229
|
+
operators.push(
|
|
230
230
|
{ value: '==', label: kintIntl.formatKintMessage({ id: 'operator.is', overrideValue: labelOverrides.operatorIs }) },
|
|
231
231
|
{ value: '!=', label: kintIntl.formatKintMessage({ id: 'operator.isNot', overrideValue: labelOverrides.operatorIsNot }) },
|
|
232
232
|
);
|
|
233
233
|
}
|
|
234
234
|
|
|
235
|
-
<span class="
|
|
235
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (type === MULTIREFDATA) {
|
|
236
236
|
<span class="cstat-no" title="statement not covered" > operators.push(</span>
|
|
237
237
|
{ value: '==', label: kintIntl.formatKintMessage({ id: 'operator.contains', overrideValue: labelOverrides.operatorContains }) },
|
|
238
238
|
);
|
|
239
239
|
}
|
|
240
240
|
|
|
241
|
-
|
|
242
|
-
|
|
241
|
+
if (!type || type === TEXT) {
|
|
242
|
+
operators.push(
|
|
243
243
|
{ value: '=~', label: kintIntl.formatKintMessage({ id: 'operator.contains', overrideValue: labelOverrides.operatorContains }) },
|
|
244
244
|
{ value: '!~', label: kintIntl.formatKintMessage({ id: 'operator.doesNotContain', overrideValue: labelOverrides.operatorDoesNotContain }) },
|
|
245
245
|
);
|
|
246
246
|
}
|
|
247
247
|
|
|
248
|
-
|
|
248
|
+
return operators;
|
|
249
249
|
};
|
|
250
250
|
|
|
251
251
|
export default useOperators;
|
|
@@ -256,7 +256,7 @@ export default useOperators;
|
|
|
256
256
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
257
257
|
Code coverage generated by
|
|
258
258
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
259
|
-
at 2023-
|
|
259
|
+
at 2023-04-14T13:37:20.869Z
|
|
260
260
|
</div>
|
|
261
261
|
<script src="../../prettify.js"></script>
|
|
262
262
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>16/16</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">33.33% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>1/3</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>5/5</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>14/14</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -103,36 +103,36 @@
|
|
|
103
103
|
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
104
|
<a name='L39'></a><a href='#L39'>39</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
105
105
|
<span class="cline-any cline-neutral"> </span>
|
|
106
|
-
<span class="cline-any cline-yes">
|
|
107
|
-
<span class="cline-any cline-
|
|
106
|
+
<span class="cline-any cline-yes">20x</span>
|
|
107
|
+
<span class="cline-any cline-yes">40x</span>
|
|
108
108
|
<span class="cline-any cline-neutral"> </span>
|
|
109
|
-
<span class="cline-any cline-
|
|
110
|
-
<span class="cline-any cline-
|
|
109
|
+
<span class="cline-any cline-yes">4x</span>
|
|
110
|
+
<span class="cline-any cline-yes">4x</span>
|
|
111
111
|
<span class="cline-any cline-neutral"> </span>
|
|
112
|
-
<span class="cline-any cline-
|
|
112
|
+
<span class="cline-any cline-yes">4x</span>
|
|
113
113
|
<span class="cline-any cline-neutral"> </span>
|
|
114
114
|
<span class="cline-any cline-neutral"> </span>
|
|
115
115
|
<span class="cline-any cline-neutral"> </span>
|
|
116
|
-
<span class="cline-any cline-
|
|
117
|
-
<span class="cline-any cline-
|
|
116
|
+
<span class="cline-any cline-yes">4x</span>
|
|
117
|
+
<span class="cline-any cline-yes">4x</span>
|
|
118
118
|
<span class="cline-any cline-neutral"> </span>
|
|
119
|
-
<span class="cline-any cline-
|
|
119
|
+
<span class="cline-any cline-yes">4x</span>
|
|
120
120
|
<span class="cline-any cline-neutral"> </span>
|
|
121
|
-
<span class="cline-any cline-
|
|
122
|
-
<span class="cline-any cline-
|
|
121
|
+
<span class="cline-any cline-yes">12x</span>
|
|
122
|
+
<span class="cline-any cline-yes">4x</span>
|
|
123
123
|
<span class="cline-any cline-neutral"> </span>
|
|
124
|
-
<span class="cline-any cline-
|
|
124
|
+
<span class="cline-any cline-yes">4x</span>
|
|
125
125
|
<span class="cline-any cline-neutral"> </span>
|
|
126
|
-
<span class="cline-any cline-
|
|
126
|
+
<span class="cline-any cline-yes">4x</span>
|
|
127
127
|
<span class="cline-any cline-neutral"> </span>
|
|
128
128
|
<span class="cline-any cline-neutral"> </span>
|
|
129
|
-
<span class="cline-any cline-
|
|
129
|
+
<span class="cline-any cline-yes">4x</span>
|
|
130
130
|
<span class="cline-any cline-neutral"> </span>
|
|
131
131
|
<span class="cline-any cline-neutral"> </span>
|
|
132
132
|
<span class="cline-any cline-neutral"> </span>
|
|
133
133
|
<span class="cline-any cline-neutral"> </span>
|
|
134
134
|
<span class="cline-any cline-neutral"> </span>
|
|
135
|
-
<span class="cline-any cline-
|
|
135
|
+
<span class="cline-any cline-yes">4x</span>
|
|
136
136
|
<span class="cline-any cline-neutral"> </span>
|
|
137
137
|
<span class="cline-any cline-neutral"> </span>
|
|
138
138
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -141,36 +141,36 @@
|
|
|
141
141
|
<span class="cline-any cline-neutral"> </span>
|
|
142
142
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import useOperators from './useOperators';
|
|
143
143
|
|
|
144
|
-
const useParseActiveFilterStrings =
|
|
145
|
-
const operators =
|
|
144
|
+
const useParseActiveFilterStrings = (filterStrings, passedIntlKey, passedIntlNS, labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{})</span> => {
|
|
145
|
+
const operators = useOperators(null, passedIntlKey, passedIntlNS, labelOverrides).map(o => o.value);
|
|
146
146
|
|
|
147
|
-
let numberOfFilters =
|
|
148
|
-
const filters =
|
|
147
|
+
let numberOfFilters = 0;
|
|
148
|
+
const filters = filterStrings.map(filter => {
|
|
149
149
|
let customProperty;
|
|
150
|
-
const rules =
|
|
150
|
+
const rules = filter.split('||').map(ruleString => {
|
|
151
151
|
// ruleString is constructed in this.handleSubmit passed to CustomPropertyFiltersForm
|
|
152
152
|
// and has shape "customProperties.foo.value!=42"
|
|
153
153
|
// OR customProperties.foo.value.id==1234, so make sure to disregard the .id
|
|
154
|
-
const [customPropertyPath, rule] =
|
|
155
|
-
const idSafeRule =
|
|
154
|
+
const [customPropertyPath, rule] = ruleString.split('.value');
|
|
155
|
+
const idSafeRule = rule.replace('.id', '');
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
customProperty = customPropertyPath.replace('customProperties.', '');
|
|
158
158
|
|
|
159
|
-
const operator =
|
|
160
|
-
const value =
|
|
159
|
+
const operator = operators.find(o => idSafeRule.startsWith(o)) ?? <span class="branch-1 cbranch-no" title="branch not covered" >'';</span>
|
|
160
|
+
const value = idSafeRule.substring(operator.length);
|
|
161
161
|
|
|
162
|
-
|
|
162
|
+
numberOfFilters += 1;
|
|
163
163
|
|
|
164
|
-
|
|
164
|
+
return { operator, value };
|
|
165
165
|
});
|
|
166
166
|
|
|
167
|
-
|
|
167
|
+
return {
|
|
168
168
|
customProperty,
|
|
169
169
|
rules,
|
|
170
170
|
};
|
|
171
171
|
});
|
|
172
172
|
|
|
173
|
-
|
|
173
|
+
return {
|
|
174
174
|
filters,
|
|
175
175
|
numberOfFilters
|
|
176
176
|
};
|
|
@@ -184,7 +184,7 @@ export default useParseActiveFilterStrings;
|
|
|
184
184
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
185
185
|
Code coverage generated by
|
|
186
186
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
187
|
-
at 2023-
|
|
187
|
+
at 2023-04-14T13:37:20.869Z
|
|
188
188
|
</div>
|
|
189
189
|
<script src="../../prettify.js"></script>
|
|
190
190
|
<script>
|
package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html
CHANGED
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">44.44% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>12/27</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">37.5% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>3/8</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">50% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>2/4</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">45.83% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>11/24</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -130,19 +130,19 @@
|
|
|
130
130
|
<span class="cline-any cline-neutral"> </span>
|
|
131
131
|
<span class="cline-any cline-neutral"> </span>
|
|
132
132
|
<span class="cline-any cline-neutral"> </span>
|
|
133
|
-
<span class="cline-any cline-yes">
|
|
133
|
+
<span class="cline-any cline-yes">19x</span>
|
|
134
134
|
<span class="cline-any cline-neutral"> </span>
|
|
135
|
-
<span class="cline-any cline-yes">
|
|
135
|
+
<span class="cline-any cline-yes">19x</span>
|
|
136
136
|
<span class="cline-any cline-neutral"> </span>
|
|
137
137
|
<span class="cline-any cline-neutral"> </span>
|
|
138
138
|
<span class="cline-any cline-neutral"> </span>
|
|
139
139
|
<span class="cline-any cline-neutral"> </span>
|
|
140
140
|
<span class="cline-any cline-neutral"> </span>
|
|
141
|
-
<span class="cline-any cline-
|
|
141
|
+
<span class="cline-any cline-yes">12x</span>
|
|
142
142
|
<span class="cline-any cline-neutral"> </span>
|
|
143
143
|
<span class="cline-any cline-neutral"> </span>
|
|
144
144
|
<span class="cline-any cline-neutral"> </span>
|
|
145
|
-
<span class="cline-any cline-
|
|
145
|
+
<span class="cline-any cline-yes">12x</span>
|
|
146
146
|
<span class="cline-any cline-neutral"> </span>
|
|
147
147
|
<span class="cline-any cline-neutral"> </span>
|
|
148
148
|
<span class="cline-any cline-no"> </span>
|
|
@@ -150,10 +150,10 @@
|
|
|
150
150
|
<span class="cline-any cline-no"> </span>
|
|
151
151
|
<span class="cline-any cline-no"> </span>
|
|
152
152
|
<span class="cline-any cline-neutral"> </span>
|
|
153
|
-
<span class="cline-any cline-
|
|
154
|
-
<span class="cline-any cline-
|
|
155
|
-
<span class="cline-any cline-
|
|
156
|
-
<span class="cline-any cline-
|
|
153
|
+
<span class="cline-any cline-yes">2x</span>
|
|
154
|
+
<span class="cline-any cline-yes">14x</span>
|
|
155
|
+
<span class="cline-any cline-yes">2x</span>
|
|
156
|
+
<span class="cline-any cline-yes">2x</span>
|
|
157
157
|
<span class="cline-any cline-neutral"> </span>
|
|
158
158
|
<span class="cline-any cline-no"> </span>
|
|
159
159
|
<span class="cline-any cline-no"> </span>
|
|
@@ -167,11 +167,11 @@
|
|
|
167
167
|
<span class="cline-any cline-no"> </span>
|
|
168
168
|
<span class="cline-any cline-neutral"> </span>
|
|
169
169
|
<span class="cline-any cline-neutral"> </span>
|
|
170
|
-
<span class="cline-any cline-
|
|
171
|
-
<span class="cline-any cline-
|
|
170
|
+
<span class="cline-any cline-yes">10x</span>
|
|
171
|
+
<span class="cline-any cline-yes">10x</span>
|
|
172
172
|
<span class="cline-any cline-neutral"> </span>
|
|
173
173
|
<span class="cline-any cline-neutral"> </span>
|
|
174
|
-
<span class="cline-any cline-
|
|
174
|
+
<span class="cline-any cline-yes">12x</span>
|
|
175
175
|
<span class="cline-any cline-neutral"> </span>
|
|
176
176
|
<span class="cline-any cline-neutral"> </span>
|
|
177
177
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -188,34 +188,34 @@ const {
|
|
|
188
188
|
TEXT_CLASS_NAME: TEXT,
|
|
189
189
|
} = CUSTPROP_TYPES;
|
|
190
190
|
|
|
191
|
-
const useValueProps =
|
|
191
|
+
const useValueProps = (
|
|
192
192
|
custPropDefinition,
|
|
193
193
|
intlKey,
|
|
194
194
|
intlNS,
|
|
195
195
|
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
196
196
|
) => {
|
|
197
|
-
const props =
|
|
197
|
+
const props = {
|
|
198
198
|
validate: requiredValidator
|
|
199
199
|
};
|
|
200
200
|
|
|
201
|
-
|
|
202
|
-
case INTEGER
|
|
203
|
-
case DECIMAL
|
|
201
|
+
switch (custPropDefinition.type) {
|
|
202
|
+
<span class="branch-0 cbranch-no" title="branch not covered" > case INTEGER:</span>
|
|
203
|
+
<span class="branch-1 cbranch-no" title="branch not covered" > case DECIMAL:</span>
|
|
204
204
|
<span class="cstat-no" title="statement not covered" > props.component = TextField;</span>
|
|
205
205
|
<span class="cstat-no" title="statement not covered" > props.type = 'number';</span>
|
|
206
206
|
<span class="cstat-no" title="statement not covered" > props.validate = <span class="fstat-no" title="function not covered" >(v</span>alue) => <span class="cstat-no" title="statement not covered" >invalidNumber(value, intlKey, intlNS, labelOverrides);</span></span>
|
|
207
207
|
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
208
208
|
case REFDATA:
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
case MULTIREFDATA
|
|
209
|
+
props.component = Select;
|
|
210
|
+
props.dataOptions = custPropDefinition.category.values.map(rdv => ({ label: rdv.label, value: rdv.id }));
|
|
211
|
+
props.placeholder = ' ';
|
|
212
|
+
break;
|
|
213
|
+
<span class="branch-3 cbranch-no" title="branch not covered" > case MULTIREFDATA:</span>
|
|
214
214
|
<span class="cstat-no" title="statement not covered" > props.component = Select;</span>
|
|
215
215
|
<span class="cstat-no" title="statement not covered" > props.dataOptions = custPropDefinition.category.values.map(<span class="fstat-no" title="function not covered" >mr</span>dv => (<span class="cstat-no" title="statement not covered" >{ label: mrdv.label, value: mrdv.id })</span>);</span>
|
|
216
216
|
<span class="cstat-no" title="statement not covered" > props.placeholder = ' ';</span>
|
|
217
217
|
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
218
|
-
case DATE
|
|
218
|
+
<span class="branch-4 cbranch-no" title="branch not covered" > case DATE:</span>
|
|
219
219
|
<span class="cstat-no" title="statement not covered" > props.component = Datepicker;</span>
|
|
220
220
|
<span class="cstat-no" title="statement not covered" > props.backendDateStandard = 'YYYY-MM-DD';</span>
|
|
221
221
|
<span class="cstat-no" title="statement not covered" > props.timeZone = 'UTC';</span>
|
|
@@ -223,11 +223,11 @@ const useValueProps = <span class="fstat-no" title="function not covered" >(</sp
|
|
|
223
223
|
<span class="cstat-no" title="statement not covered" > break;</span>
|
|
224
224
|
case TEXT:
|
|
225
225
|
default:
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
props.component = TextField;
|
|
227
|
+
break;
|
|
228
228
|
}
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
return props;
|
|
231
231
|
};
|
|
232
232
|
|
|
233
233
|
export default useValueProps;
|
|
@@ -238,7 +238,7 @@ export default useValueProps;
|
|
|
238
238
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
239
239
|
Code coverage generated by
|
|
240
240
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
241
|
-
at 2023-
|
|
241
|
+
at 2023-04-14T13:37:20.869Z
|
|
242
242
|
</div>
|
|
243
243
|
<script src="../../prettify.js"></script>
|
|
244
244
|
<script>
|
package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html
CHANGED
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">100% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>4/4</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>2/2</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>4/4</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>
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
<a name='L43'></a><a href='#L43'>43</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
109
109
|
<span class="cline-any cline-neutral"> </span>
|
|
110
110
|
<span class="cline-any cline-neutral"> </span>
|
|
111
|
-
<span class="cline-any cline-yes">
|
|
111
|
+
<span class="cline-any cline-yes">20x</span>
|
|
112
112
|
<span class="cline-any cline-neutral"> </span>
|
|
113
113
|
<span class="cline-any cline-neutral"> </span>
|
|
114
114
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -117,9 +117,9 @@
|
|
|
117
117
|
<span class="cline-any cline-neutral"> </span>
|
|
118
118
|
<span class="cline-any cline-neutral"> </span>
|
|
119
119
|
<span class="cline-any cline-neutral"> </span>
|
|
120
|
-
<span class="cline-any cline-
|
|
120
|
+
<span class="cline-any cline-yes">1x</span>
|
|
121
121
|
<span class="cline-any cline-neutral"> </span>
|
|
122
|
-
<span class="cline-any cline-
|
|
122
|
+
<span class="cline-any cline-yes">2x</span>
|
|
123
123
|
<span class="cline-any cline-neutral"> </span>
|
|
124
124
|
<span class="cline-any cline-neutral"> </span>
|
|
125
125
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
<span class="cline-any cline-neutral"> </span>
|
|
136
136
|
<span class="cline-any cline-neutral"> </span>
|
|
137
137
|
<span class="cline-any cline-neutral"> </span>
|
|
138
|
-
<span class="cline-any cline-yes">
|
|
138
|
+
<span class="cline-any cline-yes">20x</span>
|
|
139
139
|
<span class="cline-any cline-neutral"> </span>
|
|
140
140
|
<span class="cline-any cline-neutral"> </span>
|
|
141
141
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -150,7 +150,7 @@
|
|
|
150
150
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import PropTypes from 'prop-types';
|
|
151
151
|
import CustomPropertiesViewCtx from './CustomPropertiesViewCtx';
|
|
152
152
|
|
|
153
|
-
const CustomPropertiesView =
|
|
153
|
+
const CustomPropertiesView = ({
|
|
154
154
|
contexts = <span class="branch-0 cbranch-no" title="branch not covered" >[],</span>
|
|
155
155
|
customProperties,
|
|
156
156
|
customPropertiesEndpoint,
|
|
@@ -159,9 +159,9 @@ const CustomPropertiesView = <span class="fstat-no" title="function not covered"
|
|
|
159
159
|
intlNS: passedIntlNS,
|
|
160
160
|
labelOverrides = <span class="branch-0 cbranch-no" title="branch not covered" >{},</span>
|
|
161
161
|
}) => {
|
|
162
|
-
|
|
163
|
-
contexts.map(
|
|
164
|
-
|
|
162
|
+
return (
|
|
163
|
+
contexts.map(ctx => (
|
|
164
|
+
<CustomPropertiesViewCtx
|
|
165
165
|
key={`customPropertiesView-${ctx}`}
|
|
166
166
|
{...{
|
|
167
167
|
ctx,
|
|
@@ -196,7 +196,7 @@ export default CustomPropertiesView;
|
|
|
196
196
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
197
197
|
Code coverage generated by
|
|
198
198
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
199
|
-
at 2023-
|
|
199
|
+
at 2023-04-14T13:37:20.869Z
|
|
200
200
|
</div>
|
|
201
201
|
<script src="../../prettify.js"></script>
|
|
202
202
|
<script>
|