@k-int/stripes-kint-components 5.32.0 → 5.33.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 +14 -0
- package/LICENSE +1 -1
- package/es/__mocks__/@folio/stripes/components.js +3 -7
- package/es/__mocks__/@folio/stripes/core.js +4 -6
- package/es/__mocks__/@folio/stripes/smart-components.js +4 -6
- package/es/__mocks__/react-query.js +4 -6
- package/es/__mocks__/react-router-dom.js +6 -6
- package/es/lib/ActionList/ActionList.js +26 -33
- package/es/lib/ActionList/ActionListFieldArray.js +103 -119
- package/es/lib/ButtonTypedown/ButtonTypedown.js +25 -33
- package/es/lib/ComboButton/ComboButton.js +42 -47
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +11 -17
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +42 -46
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +58 -58
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +4 -8
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +32 -33
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +3 -3
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +29 -35
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +61 -59
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +20 -20
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -2
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +1 -1
- package/es/lib/CustomProperties/Edit/testResources.js +11 -12
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +22 -33
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +24 -37
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +3 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +4 -8
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +15 -19
- package/es/lib/CustomProperties/Filter/testResources.js +1 -2
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -2
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +17 -25
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +3 -6
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +7 -11
- package/es/lib/CycleButton/CycleButton.js +9 -17
- package/es/lib/FormModal/FormModal.js +24 -32
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +23 -30
- package/es/lib/IconSelect/IconSelect.js +22 -32
- package/es/lib/NoResultsMessage/NoResultsMessage.js +4 -5
- package/es/lib/NumberField/NumberField.js +17 -25
- package/es/lib/NumberField/NumberField.test.js +6 -7
- package/es/lib/QueryTypedown/QueryTypedown.js +8 -15
- package/es/lib/RefdataButtons/RefdataButtons.js +6 -9
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +48 -60
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +5 -6
- package/es/lib/RichSelect/RichSelect.js +31 -36
- package/es/lib/RichSelect/useSelectedOption.js +1 -2
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +91 -94
- package/es/lib/SASQLookupComponent/SASQLookupComponent.test.js +44 -36
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +42 -53
- package/es/lib/SASQLookupComponent/TableBody/TableBody.test.js +19 -23
- package/es/lib/SASQRoute/SASQRoute.js +25 -29
- package/es/lib/SASQRoute/SASQRoute.test.js +11 -13
- package/es/lib/SASQViewComponent/SASQViewComponent.js +68 -76
- package/es/lib/SASQViewComponent/SASQViewComponent.test.js +4 -8
- package/es/lib/SearchField/SearchField.js +7 -13
- package/es/lib/SearchKeyControl/SearchKeyControl.js +8 -13
- package/es/lib/SearchKeyControl/SearchKeyControl.test.js +2 -6
- package/es/lib/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js +30 -46
- package/es/lib/Settings/EditableRefdataList/EditableRefdataList.js +33 -43
- package/es/lib/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js +7 -11
- package/es/lib/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js +13 -20
- package/es/lib/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js +10 -12
- package/es/lib/Settings/EditableSettingsList/SettingField/SettingField.js +10 -15
- package/es/lib/Settings/EditableSettingsList/SettingField/SettingField.test.js +3 -3
- package/es/lib/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js +19 -26
- package/es/lib/Settings/SettingPage/SettingPagePane/SettingPagePane.js +2 -2
- package/es/lib/Settings/Settings/Settings.js +31 -13
- package/es/lib/Settings/SettingsFormContainer/SettingsFormContainer.js +30 -35
- package/es/lib/Settings/StaticSettingsField/StaticSettingsField.js +5 -8
- package/es/lib/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js +18 -22
- package/es/lib/Settings/hooks/staticSettingsPages/useSettingCallout/useSettingCallout.js +2 -2
- package/es/lib/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/useSettingsSectionInitalValues.js +1 -1
- package/es/lib/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js +3 -7
- package/es/lib/Settings/hooks/useAppSettings/useAppSettings.js +7 -11
- package/es/lib/Settings/hooks/useSettingSection/useSettingSection.js +16 -22
- package/es/lib/Settings/hooks/useSettings/useSettings.js +104 -88
- package/es/lib/Settings/index.js +8 -0
- package/es/lib/Tags/Tags.js +5 -8
- package/es/lib/Tags/hooks/useTags.js +1 -1
- package/es/lib/Tags/hooks/useTagsEnabled.js +2 -3
- package/es/lib/Tags/tagsConfig.js +1 -1
- package/es/lib/Typedown/Typedown.js +21 -28
- package/es/lib/hooks/__mocks__/index.js +3 -7
- package/es/lib/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js +20 -26
- package/es/lib/hooks/intlHooks/useKintIntl/useKintIntl.js +24 -34
- package/es/lib/hooks/typedownHooks/useTypedown.js +11 -12
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
- package/es/lib/hooks/useActionListRef.js +1 -1
- package/es/lib/hooks/useActiveElement.js +1 -1
- package/es/lib/hooks/useCustomProperties.js +6 -10
- package/es/lib/hooks/useHelperApp.js +13 -16
- package/es/lib/hooks/useKiwtFieldArray.js +7 -8
- package/es/lib/hooks/useKiwtSASQuery.js +15 -19
- package/es/lib/hooks/useLocalPageStore.js +7 -10
- package/es/lib/hooks/useModConfigEntries.js +2 -2
- package/es/lib/hooks/useMutateCustomProperties/useMutateCustomProperties.js +10 -17
- package/es/lib/hooks/useMutateGeneric/useMutateGeneric.js +2 -2
- package/es/lib/hooks/useMutateModConfigEntry.js +2 -2
- package/es/lib/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js +15 -21
- package/es/lib/hooks/useMutateRefdataValue/useMutateRefdataValue.js +16 -23
- package/es/lib/hooks/usePrevNextPagination.js +17 -19
- package/es/lib/hooks/useQIndex.js +11 -14
- package/es/lib/hooks/useRefdata.js +3 -3
- package/es/lib/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js +9 -13
- package/es/lib/hooks/useTemplates.js +4 -4
- package/es/lib/utils/buildUrl.js +2 -3
- package/es/lib/utils/filterParsers/deparseKiwtQueryFilters.js +5 -5
- package/es/lib/utils/filterParsers/parseKiwtQueryFilters.js +2 -2
- package/es/lib/utils/filterParsers/parseKiwtQueryGroups.js +4 -5
- package/es/lib/utils/filterParsers/parseKiwtQueryString.js +1 -1
- package/es/lib/utils/generateKiwtQueryParams/generateKiwtQueryParams.js +94 -107
- package/es/lib/utils/groupCustomPropertiesByCtx.js +5 -9
- package/es/lib/utils/index.js +34 -13
- package/es/lib/utils/matchString/index.js +13 -0
- package/es/lib/utils/{matchString.js → matchString/matchString.js} +8 -9
- package/es/lib/utils/matchString/matchString.test.js +40 -0
- package/es/lib/utils/parseErrorResponse.js +3 -7
- package/es/lib/utils/selectorSafe.js +2 -3
- package/es/lib/utils/sortByLabel.js +2 -3
- package/es/lib/utils/stringStyling/boldString.js +30 -0
- package/es/lib/utils/stringStyling/boldString.test.js +47 -0
- package/es/lib/utils/stringStyling/highlightString.js +30 -0
- package/es/lib/utils/stringStyling/highlightString.test.js +51 -0
- package/es/lib/utils/stringStyling/index.js +20 -0
- package/es/lib/validators/validators.js +6 -9
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/ActionList/ActionList.js.html +1 -1
- package/src/artifacts/coverage-jest/ActionList/ActionListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/ActionList/index.html +1 -1
- package/src/artifacts/coverage-jest/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/ButtonTypedown/ButtonTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/ButtonTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/ButtonTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/ComboButton/ComboButton.js.html +1 -1
- package/src/artifacts/coverage-jest/ComboButton/index.html +1 -1
- package/src/artifacts/coverage-jest/ComboButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyView.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/index.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyField.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/index.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Edit/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/index.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/useOperators.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/Filter/useValueProps.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesView.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertyCard.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/index.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/CycleButton/CycleButton.js.html +1 -1
- package/src/artifacts/coverage-jest/CycleButton/index.html +1 -1
- package/src/artifacts/coverage-jest/CycleButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/FieldLabel/FieldLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/FieldLabel/index.html +1 -1
- package/src/artifacts/coverage-jest/FieldLabel/index.js.html +1 -1
- package/src/artifacts/coverage-jest/FormModal/FormModal.js.html +1 -1
- package/src/artifacts/coverage-jest/FormModal/index.html +1 -1
- package/src/artifacts/coverage-jest/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/FormattedKintMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/FormattedKintMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/IconSelect/IconSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/IconSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/NoResultsMessage/NoResultsMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/NumberField/NumberField.js.html +15 -15
- package/src/artifacts/coverage-jest/NumberField/index.html +1 -1
- package/src/artifacts/coverage-jest/NumberField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/RefdataButtons/RefdataButtons.js.html +1 -1
- package/src/artifacts/coverage-jest/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
- package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.html +1 -1
- package/src/artifacts/coverage-jest/ResponsiveButtonGroup/index.js.html +1 -1
- package/src/artifacts/coverage-jest/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
- package/src/artifacts/coverage-jest/RichSelect/RichSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/RichSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/RichSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/RichSelect/useSelectedOption.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/SASQLookupComponent.js.html +31 -31
- package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SearchKeyControl/SearchKeyControl.js.html +1 -1
- package/src/artifacts/coverage-jest/SearchKeyControl/index.html +1 -1
- package/src/artifacts/coverage-jest/SearchKeyControl/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataList/EditableRefdataList.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsList.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/EditSettingValue/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/RenderSettingValue/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/SettingField.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/RefdataCategoriesSettings/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPage.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/Settings/Settings.js.html +96 -9
- package/src/artifacts/coverage-jest/Settings/Settings/index.html +14 -14
- package/src/artifacts/coverage-jest/Settings/Settings/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsField.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/constants/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/constants/queryKeys.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/contexts/SettingsContext.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingCallout/useSettingCallout.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useSettingsSectionInitalValues/useSettingsSectionInitalValues.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useAppSettings/useAppSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettingSection/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.html +13 -13
- package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettings/useSettings.js.html +105 -69
- package/src/artifacts/coverage-jest/Settings/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/index.js.html +11 -2
- package/src/artifacts/coverage-jest/Tags/Tags.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/hooks/index.html +1 -1
- package/src/artifacts/coverage-jest/Tags/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/hooks/useTags.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/hooks/useTagsEnabled.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/index.html +1 -1
- package/src/artifacts/coverage-jest/Tags/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/tagsConfig.js.html +1 -1
- package/src/artifacts/coverage-jest/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/cobertura-coverage.xml +371 -334
- package/src/artifacts/coverage-jest/constants/comparators.js.html +1 -1
- package/src/artifacts/coverage-jest/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/constants/endpoints.js.html +1 -1
- package/src/artifacts/coverage-jest/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/constants/pagination.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKey/useIntlKey.js.html +7 -7
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js.html +6 -6
- package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/intlHooks/useKintIntl/useKintIntl.js.html +6 -6
- package/src/artifacts/coverage-jest/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useActionListRef.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useActiveElement.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useHelperApp.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useInvalidateRefdata/useInvalidateRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useKiwtFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useKiwtSASQuery.js.html +9 -9
- package/src/artifacts/coverage-jest/hooks/useLocalPageStore.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useLocalStorageState.js.html +5 -5
- package/src/artifacts/coverage-jest/hooks/useModConfigEntries.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateCustomProperties/useMutateCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateGeneric/useMutateGeneric.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateModConfigEntry.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateRefdataValue/useMutateRefdataValue.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/usePrevNextPagination.js.html +20 -20
- package/src/artifacts/coverage-jest/hooks/useQIndex.js.html +8 -8
- package/src/artifacts/coverage-jest/hooks/useRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useSASQQueryMeta.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/index.html +63 -33
- package/src/artifacts/coverage-jest/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/index.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/index.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/generateKiwtQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/generateKiwtQueryParams.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.html +1 -1
- package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/groupCustomPropertiesByCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/index.html +9 -39
- package/src/artifacts/coverage-jest/utils/index.js.html +2 -2
- package/src/artifacts/coverage-jest/utils/matchString/index.html +131 -0
- package/src/artifacts/coverage-jest/utils/matchString/index.js.html +88 -0
- package/src/artifacts/coverage-jest/utils/{matchString.js.html → matchString/matchString.js.html} +82 -55
- package/src/artifacts/coverage-jest/utils/modConfigEntriesQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/parseErrorResponse.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/parseModConfigEntry.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.html +1 -1
- package/src/artifacts/coverage-jest/utils/refdataQueryKey/index.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/refdataQueryKey/refdataQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/selectorSafe.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/sortByLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/stringStyling/boldString.js.html +190 -0
- package/src/artifacts/coverage-jest/utils/stringStyling/highlightString.js.html +190 -0
- package/src/artifacts/coverage-jest/utils/stringStyling/index.html +146 -0
- package/src/artifacts/coverage-jest/utils/stringStyling/index.js.html +91 -0
- package/src/artifacts/coverage-jest/utils/toCamelCase.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/typedownQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/validators/index.html +1 -1
- package/src/artifacts/coverage-jest/validators/index.js.html +1 -1
- package/src/artifacts/coverage-jest/validators/validators.js.html +1 -1
- package/src/lib/Settings/Settings/Settings.js +30 -1
- package/src/lib/Settings/hooks/useSettings/README.md +49 -19
- package/src/lib/Settings/hooks/useSettings/useSettings.js +60 -48
- package/src/lib/Settings/index.js +3 -0
- package/src/lib/utils/index.js +1 -1
- package/src/lib/utils/matchString/index.js +1 -0
- package/src/lib/utils/matchString/matchString.js +44 -0
- package/src/lib/utils/matchString/matchString.test.js +68 -0
- package/src/lib/utils/stringStyling/boldString.js +35 -0
- package/src/lib/utils/stringStyling/boldString.test.js +59 -0
- package/src/lib/utils/stringStyling/highlightString.js +35 -0
- package/src/lib/utils/stringStyling/highlightString.test.js +67 -0
- package/src/lib/utils/stringStyling/index.js +2 -0
- package/styles/stringMatchStyles.css +3 -0
- package/es/lib/utils/highlightString.js +0 -45
- package/src/artifacts/coverage-jest/utils/highlightString.js.html +0 -259
- package/src/lib/utils/highlightString.js +0 -58
- package/src/lib/utils/matchString.js +0 -35
|
@@ -16,19 +16,8 @@ var _hooks = require("../hooks");
|
|
|
16
16
|
var _TableBody = _interopRequireDefault(require("./TableBody"));
|
|
17
17
|
var _SearchKeyControl = _interopRequireDefault(require("../SearchKeyControl"));
|
|
18
18
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
const _excluded = ["data"],
|
|
20
|
-
_excluded2 = ["filterPaneFirstMenu", "filterPaneLastMenu"],
|
|
21
|
-
_excluded3 = ["mainPaneFirstMenu", "mainPaneLastMenu"];
|
|
22
19
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
23
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
24
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
25
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
26
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
27
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
28
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
29
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
30
20
|
const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
31
|
-
var _fetchParameters$SASQ, _fetchParameters$quer;
|
|
32
21
|
const {
|
|
33
22
|
children,
|
|
34
23
|
fetchParameters = {},
|
|
@@ -63,7 +52,7 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
63
52
|
ky,
|
|
64
53
|
queryParams
|
|
65
54
|
} = _ref2;
|
|
66
|
-
return ky.get(
|
|
55
|
+
return ky.get(`${endpoint}${queryParams}`).json();
|
|
67
56
|
},
|
|
68
57
|
lookupResponseTransform = response => response,
|
|
69
58
|
// Function to transform the response from the query
|
|
@@ -92,7 +81,7 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
92
81
|
queryGetter: sasqPropsQueryGetter,
|
|
93
82
|
querySetter: sasqPropsQuerySetter,
|
|
94
83
|
syncToLocation = true
|
|
95
|
-
} = sasqProps
|
|
84
|
+
} = sasqProps ?? {};
|
|
96
85
|
|
|
97
86
|
// We manage our internal state of pagination (URL vs MCL page state) using usePrevNextPagination.
|
|
98
87
|
// Below the queryParameterGenerator can then choose to use the outputs (namely totalRecords and page) as it sees fit.
|
|
@@ -103,7 +92,7 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
103
92
|
} = (0, _hooks.usePrevNextPagination)({
|
|
104
93
|
count,
|
|
105
94
|
// totalRecord
|
|
106
|
-
pageSize:
|
|
95
|
+
pageSize: fetchParameters.SASQ_MAP?.perPage,
|
|
107
96
|
syncToLocation
|
|
108
97
|
});
|
|
109
98
|
const {
|
|
@@ -111,70 +100,72 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
111
100
|
queryGetter: kintSASQQueryGetter,
|
|
112
101
|
querySetter: kintSASQQuerySetter
|
|
113
102
|
} = (0, _hooks.useKiwtSASQuery)();
|
|
114
|
-
const query = (0, _react.useMemo)(() => sasqPropsQuery
|
|
115
|
-
const queryGetter = (0, _react.useMemo)(() => sasqPropsQueryGetter
|
|
116
|
-
const querySetter = (0, _react.useMemo)(() => sasqPropsQuerySetter
|
|
103
|
+
const query = (0, _react.useMemo)(() => sasqPropsQuery ?? kintSASQQuery, [sasqPropsQuery, kintSASQQuery]);
|
|
104
|
+
const queryGetter = (0, _react.useMemo)(() => sasqPropsQueryGetter ?? kintSASQQueryGetter, [sasqPropsQueryGetter, kintSASQQueryGetter]);
|
|
105
|
+
const querySetter = (0, _react.useMemo)(() => sasqPropsQuerySetter ?? kintSASQQuerySetter, [sasqPropsQuerySetter, kintSASQQuerySetter]);
|
|
117
106
|
const {
|
|
118
107
|
0: namespace
|
|
119
108
|
} = (0, _core.useNamespace)();
|
|
120
109
|
const ky = (0, _core.useOkapiKy)();
|
|
121
|
-
const filterPaneVisibileKey =
|
|
122
|
-
const queryParams = (0, _react.useMemo)(() => queryParameterGenerator(
|
|
110
|
+
const filterPaneVisibileKey = `${namespace}-${id}-filterPaneVisibility`;
|
|
111
|
+
const queryParams = (0, _react.useMemo)(() => queryParameterGenerator(
|
|
112
|
+
// With Typescript this would be a type of SASQ_MAP, and so totalRecords is a valid property in our new shape
|
|
123
113
|
// In generateKiwtQueryParams we can choose to ignore totalRecords, which while being a valid property is not necessary for KIWT queries
|
|
124
|
-
|
|
114
|
+
{
|
|
125
115
|
page: currentPage,
|
|
126
|
-
totalRecords: count
|
|
127
|
-
|
|
116
|
+
totalRecords: count,
|
|
117
|
+
...fetchParameters.SASQ_MAP
|
|
118
|
+
}, query ?? {}), [count, currentPage, fetchParameters.SASQ_MAP, query, queryParameterGenerator]);
|
|
128
119
|
const [filterPaneVisible, setFilterPaneVisible] = (0, _hooks.useLocalStorageState)(filterPaneVisibileKey, true);
|
|
129
120
|
const toggleFilterPane = () => setFilterPaneVisible(!filterPaneVisible);
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
restOfQueryProps = _objectWithoutProperties(_useQuery, _excluded);
|
|
121
|
+
const {
|
|
122
|
+
data = {},
|
|
123
|
+
...restOfQueryProps
|
|
124
|
+
} = (0, _reactQuery.useQuery)(lookupQueryNamespaceGenerator({
|
|
125
|
+
currentPage,
|
|
126
|
+
endpoint: fetchParameters.endpoint,
|
|
127
|
+
namespace,
|
|
128
|
+
id,
|
|
129
|
+
query,
|
|
130
|
+
queryParams
|
|
131
|
+
}), () => {
|
|
132
|
+
return lookupQueryPromise({
|
|
133
|
+
ky,
|
|
134
|
+
queryParams,
|
|
135
|
+
endpoint: fetchParameters.endpoint
|
|
136
|
+
});
|
|
137
|
+
}, {
|
|
138
|
+
enabled: (!!query?.filters || !!query?.query) && !!currentPage,
|
|
139
|
+
...(fetchParameters.queryOptions ?? {}),
|
|
140
|
+
// select is a parameter supported by useQuery to transform the response
|
|
141
|
+
// Could be possible to instead pass this down along with the queryOptions
|
|
142
|
+
// Additionally this is assuming the lookupResponseTransform is a func as opposed to an object
|
|
143
|
+
select: selectData => {
|
|
144
|
+
return lookupResponseTransform(selectData);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
157
147
|
(0, _react.useEffect)(() => {
|
|
158
|
-
if (count !==
|
|
159
|
-
setCount(data
|
|
148
|
+
if (count !== data?.totalRecords) {
|
|
149
|
+
setCount(data?.totalRecords);
|
|
160
150
|
}
|
|
161
151
|
}, [count, data.totalRecords]);
|
|
162
152
|
(0, _react.useImperativeHandle)(ref, () => ({
|
|
163
|
-
lookupQueryProps:
|
|
164
|
-
data
|
|
165
|
-
|
|
153
|
+
lookupQueryProps: {
|
|
154
|
+
data,
|
|
155
|
+
...restOfQueryProps
|
|
156
|
+
},
|
|
166
157
|
queryParams
|
|
167
158
|
}));
|
|
168
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.SearchAndSortQuery,
|
|
159
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.SearchAndSortQuery, {
|
|
169
160
|
initialSearchState: {
|
|
170
161
|
query: ''
|
|
171
162
|
},
|
|
172
163
|
queryGetter: queryGetter,
|
|
173
164
|
querySetter: querySetter,
|
|
174
|
-
syncToLocation: syncToLocation
|
|
175
|
-
|
|
165
|
+
syncToLocation: syncToLocation,
|
|
166
|
+
...sasqProps,
|
|
167
|
+
...paginationSASQProps,
|
|
176
168
|
children: sasqRenderProps => {
|
|
177
|
-
var _ref3, _data$total;
|
|
178
169
|
const {
|
|
179
170
|
activeFilters,
|
|
180
171
|
filterChanged,
|
|
@@ -188,17 +179,17 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
188
179
|
const searchHandlers = getSearchHandlers();
|
|
189
180
|
const disableReset = !filterChanged && !searchChanged;
|
|
190
181
|
const filterCount = activeFilters.string ? activeFilters.string.split(',').length : 0;
|
|
191
|
-
const Body = RenderBody
|
|
182
|
+
const Body = RenderBody ?? _TableBody.default;
|
|
192
183
|
const {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
184
|
+
filterPaneFirstMenu,
|
|
185
|
+
filterPaneLastMenu,
|
|
186
|
+
...restOfFilterPaneProps
|
|
187
|
+
} = filterPaneProps;
|
|
197
188
|
const {
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
189
|
+
mainPaneFirstMenu,
|
|
190
|
+
mainPaneLastMenu,
|
|
191
|
+
...restOfMainPaneProps
|
|
192
|
+
} = mainPaneProps;
|
|
202
193
|
const internalStateProps = {
|
|
203
194
|
activeFilters,
|
|
204
195
|
filterCount,
|
|
@@ -222,14 +213,14 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
222
213
|
}
|
|
223
214
|
return null;
|
|
224
215
|
};
|
|
225
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_smartComponents.PersistedPaneset,
|
|
216
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_smartComponents.PersistedPaneset, {
|
|
226
217
|
appId: namespace,
|
|
227
|
-
id:
|
|
228
|
-
|
|
229
|
-
children: [hasFilterPane && filterPaneVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane,
|
|
218
|
+
id: `${id}-paneset`,
|
|
219
|
+
...persistedPanesetProps,
|
|
220
|
+
children: [hasFilterPane && filterPaneVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, {
|
|
230
221
|
defaultWidth: "20%",
|
|
231
222
|
firstMenu: filterPaneFirstMenu ? filterPaneFirstMenu(internalStateProps) : null,
|
|
232
|
-
id:
|
|
223
|
+
id: `${id}-filter-pane`,
|
|
233
224
|
lastMenu: filterPaneLastMenu ? filterPaneLastMenu(internalStateProps) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PaneMenu, {
|
|
234
225
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.CollapseFilterPaneButton, {
|
|
235
226
|
onClick: toggleFilterPane
|
|
@@ -237,27 +228,27 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
237
228
|
}),
|
|
238
229
|
paneTitle: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
239
230
|
id: "stripes-smart-components.searchAndFilter"
|
|
240
|
-
})
|
|
241
|
-
|
|
231
|
+
}),
|
|
232
|
+
...restOfFilterPaneProps,
|
|
242
233
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
|
|
243
234
|
onSubmit: onSubmitSearch,
|
|
244
235
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FilterPaneHeaderComponent, {}), !noSearchField && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
245
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SearchField,
|
|
236
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SearchField, {
|
|
246
237
|
ariaLabel: searchFieldAriaLabel,
|
|
247
238
|
autoFocus: true,
|
|
248
|
-
id:
|
|
239
|
+
id: `sasq-search-field-${id}`,
|
|
249
240
|
name: "query",
|
|
250
241
|
onChange: e => {
|
|
251
|
-
|
|
252
|
-
if ((_e$target = e.target) !== null && _e$target !== void 0 && _e$target.value) {
|
|
242
|
+
if (e.target?.value) {
|
|
253
243
|
searchHandlers.query(e); // SASQ needs the whole event here
|
|
254
244
|
} else {
|
|
255
245
|
searchHandlers.reset();
|
|
256
246
|
}
|
|
257
247
|
},
|
|
258
248
|
onClear: searchHandlers.reset,
|
|
259
|
-
value: searchValue.query
|
|
260
|
-
|
|
249
|
+
value: searchValue.query,
|
|
250
|
+
...searchFieldProps
|
|
251
|
+
}), searchableIndexes?.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_SearchKeyControl.default, {
|
|
261
252
|
options: searchableIndexes
|
|
262
253
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
263
254
|
buttonStyle: "primary",
|
|
@@ -289,23 +280,23 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
289
280
|
searchValue: searchValue
|
|
290
281
|
})]
|
|
291
282
|
})
|
|
292
|
-
})
|
|
283
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, {
|
|
293
284
|
defaultWidth: "fill",
|
|
294
285
|
firstMenu: renderFirstMenu(),
|
|
295
|
-
id:
|
|
286
|
+
id: `${id}-main-pane`,
|
|
296
287
|
lastMenu: mainPaneLastMenu ? mainPaneLastMenu(internalStateProps) : null,
|
|
297
288
|
noOverflow: true,
|
|
298
289
|
padContent: false,
|
|
299
290
|
paneSub: kintIntl.formatKintMessage({
|
|
300
291
|
id: 'found#Values',
|
|
301
|
-
overrideValue: labelOverrides
|
|
292
|
+
overrideValue: labelOverrides?.foundValues
|
|
302
293
|
},
|
|
303
294
|
// DEPRECATED data.total should NOT be the first call here, but staying for backwards compatibility. Elsewhere we use data.totalRecords
|
|
304
295
|
{
|
|
305
|
-
total:
|
|
306
|
-
})
|
|
307
|
-
|
|
308
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Body,
|
|
296
|
+
total: data?.total ?? data?.totalRecords ?? 0
|
|
297
|
+
}),
|
|
298
|
+
...restOfMainPaneProps,
|
|
299
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Body, {
|
|
309
300
|
data: data,
|
|
310
301
|
filterPaneVisible: filterPaneVisible,
|
|
311
302
|
intlKey: passedIntlKey,
|
|
@@ -314,14 +305,20 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
314
305
|
noResultsProps: noResultsProps,
|
|
315
306
|
query: query,
|
|
316
307
|
rowNavigation: rowNavigation,
|
|
317
|
-
toggleFilterPane: toggleFilterPane
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
308
|
+
toggleFilterPane: toggleFilterPane,
|
|
309
|
+
...restOfQueryProps,
|
|
310
|
+
...sasqRenderProps,
|
|
311
|
+
...sasqProps,
|
|
312
|
+
...props,
|
|
313
|
+
mclProps: {
|
|
314
|
+
...paginationMCLProps,
|
|
315
|
+
...mclProps
|
|
316
|
+
}
|
|
317
|
+
})
|
|
318
|
+
}), children]
|
|
319
|
+
});
|
|
323
320
|
}
|
|
324
|
-
})
|
|
321
|
+
});
|
|
325
322
|
});
|
|
326
323
|
SASQLookupComponent.propTypes = {
|
|
327
324
|
children: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node]),
|
|
@@ -12,16 +12,13 @@ var _SASQLookupComponent = _interopRequireDefault(require("./SASQLookupComponent
|
|
|
12
12
|
var _helpers = _interopRequireDefault(require("../../../test/helpers"));
|
|
13
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
14
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
-
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
19
|
-
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
15
|
jest.mock('react-query', () => {
|
|
21
16
|
const {
|
|
22
17
|
mockReactQuery
|
|
23
18
|
} = jest.requireActual('@folio/stripes-erm-testing');
|
|
24
|
-
return
|
|
19
|
+
return {
|
|
20
|
+
...jest.requireActual('react-query'),
|
|
21
|
+
...mockReactQuery,
|
|
25
22
|
useQuery: jest.fn((_key, func, opts) => {
|
|
26
23
|
const defaultData = {
|
|
27
24
|
results: [{
|
|
@@ -51,7 +48,7 @@ jest.mock('react-query', () => {
|
|
|
51
48
|
extraProp: 'extraProp'
|
|
52
49
|
};
|
|
53
50
|
})
|
|
54
|
-
}
|
|
51
|
+
};
|
|
55
52
|
});
|
|
56
53
|
|
|
57
54
|
// TODO why does unmocking react-router-dom cause module hierarchy issues?
|
|
@@ -63,13 +60,15 @@ jest.mock('react-router-dom', () => {
|
|
|
63
60
|
mockReactRouterDom
|
|
64
61
|
} = jest.requireActual('@folio/stripes-erm-testing');
|
|
65
62
|
const actualReactRouterDom = jest.requireActual('react-router-dom');
|
|
66
|
-
return
|
|
63
|
+
return {
|
|
64
|
+
...actualReactRouterDom,
|
|
65
|
+
...mockReactRouterDom,
|
|
67
66
|
useHistory: jest.fn(() => ({
|
|
68
67
|
push: mockHistoryPush,
|
|
69
68
|
replace: mockHistoryReplace
|
|
70
69
|
})),
|
|
71
70
|
useLocation: actualReactRouterDom.useLocation // Bit ugly... idk why I need to put this back specifically like this instead of just unmocking react-router-dom
|
|
72
|
-
}
|
|
71
|
+
};
|
|
73
72
|
});
|
|
74
73
|
jest.mock('./TableBody', () => jest.fn(_ref => {
|
|
75
74
|
let {
|
|
@@ -122,12 +121,13 @@ describe('SASQLookupComponent', () => {
|
|
|
122
121
|
expectedMockKyCall: '/wibble?filters=status.value%3D%3DtestFilter&stats=true&page=1'
|
|
123
122
|
}, {
|
|
124
123
|
testLabel: 'with searchable indexes',
|
|
125
|
-
props:
|
|
124
|
+
props: {
|
|
125
|
+
...baseSASQLookupProps,
|
|
126
126
|
searchableIndexes: [{
|
|
127
127
|
key: 'name',
|
|
128
128
|
label: 'Name'
|
|
129
129
|
}]
|
|
130
|
-
}
|
|
130
|
+
},
|
|
131
131
|
expectQueryFire: false,
|
|
132
132
|
// No actual query yet
|
|
133
133
|
expectedSearchKeyControl: true
|
|
@@ -173,14 +173,15 @@ describe('SASQLookupComponent', () => {
|
|
|
173
173
|
expectedMockKyCallAfterSearch: '/wibble?match=test.test1.test2&term=some%20test%20query&stats=true&page=1'
|
|
174
174
|
}, {
|
|
175
175
|
testLabel: 'starting with qindex and query',
|
|
176
|
-
props:
|
|
176
|
+
props: {
|
|
177
|
+
...baseSASQLookupProps,
|
|
177
178
|
sasqProps: {
|
|
178
179
|
initialSearchState: {
|
|
179
180
|
query: 'hello',
|
|
180
181
|
qindex: 'test.test1.test2'
|
|
181
182
|
}
|
|
182
183
|
}
|
|
183
|
-
}
|
|
184
|
+
},
|
|
184
185
|
startingLocation: '/wibble?qindex=some.new.qindex.path&query=hello',
|
|
185
186
|
expectedQueryNamespace: getBaseExpectedQueryNamespace({
|
|
186
187
|
filters: '',
|
|
@@ -209,61 +210,67 @@ describe('SASQLookupComponent', () => {
|
|
|
209
210
|
}
|
|
210
211
|
}, {
|
|
211
212
|
testLabel: 'with FilterComponent',
|
|
212
|
-
props:
|
|
213
|
+
props: {
|
|
214
|
+
...baseSASQLookupProps,
|
|
213
215
|
FilterComponent: () => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
214
216
|
children: "FilterComponent"
|
|
215
217
|
})
|
|
216
|
-
}
|
|
218
|
+
},
|
|
217
219
|
expectQueryFire: false,
|
|
218
220
|
expectedMockKyCall: '/wibble?filters=status.value%3D%3DtestFilter&stats=true&page=1',
|
|
219
221
|
expectedFilterComponent: 'FilterComponent'
|
|
220
222
|
}, {
|
|
221
223
|
testLabel: 'with filter pane disabled',
|
|
222
|
-
props:
|
|
224
|
+
props: {
|
|
225
|
+
...baseSASQLookupProps,
|
|
223
226
|
hasFilterPane: false
|
|
224
|
-
}
|
|
227
|
+
},
|
|
225
228
|
expectQueryFire: false,
|
|
226
229
|
expectedSearchField: false,
|
|
227
230
|
expectedFilterPane: false
|
|
228
231
|
}, {
|
|
229
232
|
testLabel: 'with FilterHeaderComponent',
|
|
230
|
-
props:
|
|
233
|
+
props: {
|
|
234
|
+
...baseSASQLookupProps,
|
|
231
235
|
FilterPaneHeaderComponent: () => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
232
236
|
children: "FilterPaneHeaderComponent"
|
|
233
237
|
})
|
|
234
|
-
}
|
|
238
|
+
},
|
|
235
239
|
expectQueryFire: false,
|
|
236
240
|
expectedMockKyCall: '/wibble?filters=status.value%3D%3DtestFilter&stats=true&page=1',
|
|
237
241
|
expectedFilterHeaderComponent: 'FilterPaneHeaderComponent'
|
|
238
242
|
}, {
|
|
239
243
|
testLabel: 'no search field mode',
|
|
240
|
-
props:
|
|
244
|
+
props: {
|
|
245
|
+
...baseSASQLookupProps,
|
|
241
246
|
noSearchField: true
|
|
242
|
-
}
|
|
247
|
+
},
|
|
243
248
|
expectQueryFire: false,
|
|
244
249
|
expectedSearchField: false
|
|
245
250
|
}, {
|
|
246
251
|
testLabel: 'with RenderBody',
|
|
247
|
-
props:
|
|
252
|
+
props: {
|
|
253
|
+
...baseSASQLookupProps,
|
|
248
254
|
RenderBody: () => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
249
255
|
children: "TheBodyComponent"
|
|
250
256
|
})
|
|
251
|
-
}
|
|
257
|
+
},
|
|
252
258
|
expectQueryFire: false,
|
|
253
259
|
expectedMockKyCall: '/wibble?filters=status.value%3D%3DtestFilter&stats=true&page=1',
|
|
254
260
|
expectedBodyComponent: 'TheBodyComponent'
|
|
255
261
|
}, {
|
|
256
262
|
testLabel: 'with custom lookupQueryNamespaceGenerator',
|
|
257
|
-
props:
|
|
263
|
+
props: {
|
|
264
|
+
...baseSASQLookupProps,
|
|
258
265
|
lookupQueryNamespaceGenerator: _ref2 => {
|
|
259
266
|
let {
|
|
260
267
|
currentPage,
|
|
261
268
|
namespace,
|
|
262
269
|
id: passedId
|
|
263
270
|
} = _ref2;
|
|
264
|
-
return [
|
|
271
|
+
return [`testing-${currentPage}`, `testing-${namespace}`, `testing-${passedId}`];
|
|
265
272
|
}
|
|
266
|
-
}
|
|
273
|
+
},
|
|
267
274
|
expectedQueryNamespace: ['testing-1', 'testing-@folio/test-implementor', 'testing-testing-sasq-lookup-component'],
|
|
268
275
|
startingLocation: '/wibble?filters=status.testFilter',
|
|
269
276
|
expectedMockKyCall: '/wibble?filters=status.value%3D%3DtestFilter&stats=true&page=1',
|
|
@@ -288,7 +295,8 @@ describe('SASQLookupComponent', () => {
|
|
|
288
295
|
}
|
|
289
296
|
}, {
|
|
290
297
|
testLabel: 'with lookupResponseTransform',
|
|
291
|
-
props:
|
|
298
|
+
props: {
|
|
299
|
+
...baseSASQLookupProps,
|
|
292
300
|
sasqProps: {
|
|
293
301
|
initialSearchState: {
|
|
294
302
|
query: 'test',
|
|
@@ -300,7 +308,7 @@ describe('SASQLookupComponent', () => {
|
|
|
300
308
|
originalData: resp,
|
|
301
309
|
transformed: true
|
|
302
310
|
})
|
|
303
|
-
}
|
|
311
|
+
},
|
|
304
312
|
startingLocation: '/wibble?query=test',
|
|
305
313
|
expectedQueryNamespace: getBaseExpectedQueryNamespace({
|
|
306
314
|
filters: '',
|
|
@@ -359,13 +367,13 @@ describe('SASQLookupComponent', () => {
|
|
|
359
367
|
theRef = /*#__PURE__*/(0, _react.createRef)();
|
|
360
368
|
renderComponent = (0, _jest.renderWithKintHarness)(/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.MemoryRouter, {
|
|
361
369
|
initialEntries: [startingLocation],
|
|
362
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQLookupComponent.default,
|
|
363
|
-
ref: theRef
|
|
364
|
-
|
|
370
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQLookupComponent.default, {
|
|
371
|
+
ref: theRef,
|
|
372
|
+
...props,
|
|
365
373
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
366
374
|
children: "CHILD COMPONENT"
|
|
367
375
|
})
|
|
368
|
-
})
|
|
376
|
+
})
|
|
369
377
|
}), undefined, _helpers.default);
|
|
370
378
|
});
|
|
371
379
|
test('renders children', () => {
|
|
@@ -376,7 +384,7 @@ describe('SASQLookupComponent', () => {
|
|
|
376
384
|
});
|
|
377
385
|
test('renders the main pane', async () => {
|
|
378
386
|
await (0, _stripesErmTesting.Pane)({
|
|
379
|
-
id:
|
|
387
|
+
id: `${props.id}-main-pane`
|
|
380
388
|
}).exists();
|
|
381
389
|
});
|
|
382
390
|
|
|
@@ -463,7 +471,7 @@ describe('SASQLookupComponent', () => {
|
|
|
463
471
|
test('displays the correct number of found values', async () => {
|
|
464
472
|
// SASQ uses paneSub for "found X values"
|
|
465
473
|
await (0, _stripesErmTesting.Pane)({
|
|
466
|
-
subtitle:
|
|
474
|
+
subtitle: `Found ${expectedNumberOfResults} values`
|
|
467
475
|
}).exists();
|
|
468
476
|
});
|
|
469
477
|
if (expectedBodyComponent) {
|
|
@@ -485,7 +493,7 @@ describe('SASQLookupComponent', () => {
|
|
|
485
493
|
describe('Filter pane', () => {
|
|
486
494
|
test('renders the filter pane', async () => {
|
|
487
495
|
await (0, _stripesErmTesting.Pane)({
|
|
488
|
-
id:
|
|
496
|
+
id: `${props.id}-filter-pane`
|
|
489
497
|
}).exists();
|
|
490
498
|
});
|
|
491
499
|
test('collapse filter pane button exists', async () => {
|
|
@@ -506,7 +514,7 @@ describe('SASQLookupComponent', () => {
|
|
|
506
514
|
});
|
|
507
515
|
test('filter pane is removed from DOM', async () => {
|
|
508
516
|
await (0, _stripesErmTesting.Pane)({
|
|
509
|
-
id:
|
|
517
|
+
id: `${props.id}-filter-pane`
|
|
510
518
|
}).absent();
|
|
511
519
|
});
|
|
512
520
|
});
|