@k-int/stripes-kint-components 5.31.3 → 5.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/es/__mocks__/@folio/stripes/components.js +7 -3
- package/es/__mocks__/@folio/stripes/core.js +6 -4
- package/es/__mocks__/@folio/stripes/smart-components.js +6 -4
- package/es/__mocks__/react-query.js +6 -4
- package/es/__mocks__/react-router-dom.js +6 -6
- package/es/lib/ActionList/ActionList.js +33 -26
- package/es/lib/ActionList/ActionListFieldArray.js +119 -103
- package/es/lib/ButtonTypedown/ButtonTypedown.js +72 -17
- package/es/lib/ComboButton/ComboButton.js +47 -42
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +17 -11
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +46 -42
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +58 -58
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +8 -4
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +33 -32
- 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 +35 -29
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +59 -61
- 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 +12 -11
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +33 -22
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +37 -24
- 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 +6 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +8 -4
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +19 -15
- package/es/lib/CustomProperties/Filter/testResources.js +2 -1
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -1
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +26 -18
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +6 -3
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +11 -7
- package/es/lib/CycleButton/CycleButton.js +17 -9
- package/es/lib/FormModal/FormModal.js +32 -24
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +30 -23
- package/es/lib/IconSelect/IconSelect.js +32 -22
- package/es/lib/NoResultsMessage/NoResultsMessage.js +5 -4
- package/es/lib/NumberField/NumberField.js +25 -17
- package/es/lib/NumberField/NumberField.test.js +7 -6
- package/es/lib/QueryTypedown/QueryTypedown.js +15 -8
- package/es/lib/RefdataButtons/RefdataButtons.js +9 -6
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +60 -48
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +6 -5
- package/es/lib/RichSelect/RichSelect.js +36 -31
- package/es/lib/RichSelect/useSelectedOption.js +2 -1
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +94 -91
- package/es/lib/SASQLookupComponent/SASQLookupComponent.test.js +532 -0
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +58 -43
- package/es/lib/SASQLookupComponent/TableBody/TableBody.test.js +257 -0
- package/es/lib/SASQLookupComponent/__mocks__/SASQLookupComponent.js +33 -0
- package/es/lib/SASQLookupComponent/__mocks__/SASQLookupComponentRender.js +24 -0
- package/es/lib/SASQLookupComponent/__mocks__/index.js +20 -0
- package/es/lib/SASQRoute/SASQRoute.js +29 -25
- package/es/lib/SASQRoute/SASQRoute.test.js +269 -0
- package/es/lib/SASQViewComponent/SASQViewComponent.js +76 -68
- package/es/lib/SASQViewComponent/SASQViewComponent.test.js +108 -0
- package/es/lib/SASQViewComponent/__mocks__/SASQViewComponent.js +19 -0
- package/es/lib/SASQViewComponent/__mocks__/SASQViewComponentRender.js +19 -0
- package/es/lib/SASQViewComponent/__mocks__/index.js +20 -0
- package/es/lib/SearchField/SearchField.js +13 -7
- package/es/lib/SearchKeyControl/SearchKeyControl.js +13 -8
- package/es/lib/SearchKeyControl/SearchKeyControl.test.js +6 -2
- package/es/lib/Settings/EditableRefdataCategoryList/EditableRefdataCategoryList.js +46 -30
- package/es/lib/Settings/EditableRefdataList/EditableRefdataList.js +43 -33
- package/es/lib/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js +12 -8
- package/es/lib/Settings/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js +20 -13
- package/es/lib/Settings/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js +12 -10
- package/es/lib/Settings/EditableSettingsList/SettingField/SettingField.js +15 -10
- package/es/lib/Settings/EditableSettingsList/SettingField/SettingField.test.js +3 -3
- package/es/lib/Settings/RefdataCategoriesSettings/RefdataCategoriesSettings.js +26 -19
- package/es/lib/Settings/SettingPage/SettingPagePane/SettingPagePane.js +2 -2
- package/es/lib/Settings/Settings/Settings.js +158 -0
- package/es/lib/Settings/Settings/index.js +13 -0
- package/es/lib/Settings/SettingsFormContainer/SettingsFormContainer.js +35 -30
- package/es/lib/Settings/StaticSettingsField/StaticSettingsField.js +8 -5
- package/es/lib/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js +22 -18
- 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 +7 -3
- package/es/lib/Settings/hooks/useAppSettings/useAppSettings.js +11 -7
- package/es/lib/Settings/hooks/useSettingSection/useSettingSection.js +22 -16
- package/es/lib/Settings/hooks/useSettings/useSettings.js +69 -63
- package/es/lib/Tags/Tags.js +8 -5
- package/es/lib/Tags/hooks/useTags.js +1 -1
- package/es/lib/Tags/hooks/useTagsEnabled.js +3 -2
- package/es/lib/Tags/tagsConfig.js +1 -1
- package/es/lib/Typedown/Typedown.js +31 -21
- package/es/lib/hooks/__mocks__/index.js +7 -3
- package/es/lib/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js +26 -20
- package/es/lib/hooks/intlHooks/useKintIntl/useKintIntl.js +34 -24
- package/es/lib/hooks/typedownHooks/useTypedown.js +12 -11
- 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 +10 -6
- package/es/lib/hooks/useHelperApp.js +16 -13
- package/es/lib/hooks/useKiwtFieldArray.js +8 -7
- package/es/lib/hooks/useKiwtSASQuery.js +19 -15
- package/es/lib/hooks/useLocalPageStore.js +10 -7
- package/es/lib/hooks/useModConfigEntries.js +2 -2
- package/es/lib/hooks/useMutateCustomProperties/useMutateCustomProperties.js +17 -10
- package/es/lib/hooks/useMutateGeneric/useMutateGeneric.js +2 -2
- package/es/lib/hooks/useMutateModConfigEntry.js +2 -2
- package/es/lib/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js +21 -15
- package/es/lib/hooks/useMutateRefdataValue/useMutateRefdataValue.js +23 -16
- package/es/lib/hooks/usePrevNextPagination.js +19 -17
- package/es/lib/hooks/useQIndex.js +14 -11
- package/es/lib/hooks/useRefdata.js +3 -3
- package/es/lib/hooks/useStandaloneSASQQueryParameter/useStandaloneSASQQueryParameter.js +13 -9
- package/es/lib/hooks/useTemplates.js +4 -4
- package/es/lib/utils/buildUrl.js +3 -2
- 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 +5 -4
- package/es/lib/utils/filterParsers/parseKiwtQueryString.js +1 -1
- package/es/lib/utils/generateKiwtQueryParams/generateKiwtQueryParams.js +107 -94
- package/es/lib/utils/groupCustomPropertiesByCtx.js +9 -5
- package/es/lib/utils/matchString.js +7 -5
- package/es/lib/utils/parseErrorResponse.js +7 -3
- package/es/lib/utils/selectorSafe.js +3 -2
- package/es/lib/utils/sortByLabel.js +3 -2
- package/es/lib/validators/validators.js +9 -6
- package/package.json +5 -1
- package/src/artifacts/coverage-jest/ActionList/ActionList.js.html +4 -4
- package/src/artifacts/coverage-jest/ActionList/ActionListFieldArray.js.html +10 -10
- 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 +217 -25
- package/src/artifacts/coverage-jest/ButtonTypedown/index.html +17 -17
- package/src/artifacts/coverage-jest/ButtonTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/ComboButton/ComboButton.js.html +3 -3
- 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 +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertiesSettings.js.html +6 -6
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyForm.js.html +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/Config/CustomPropertyView.js.html +3 -3
- 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 +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertiesListField.js.html +5 -5
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyField.js.html +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/Edit/CustomPropertyFormCard.js.html +3 -3
- 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 +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterField.js.html +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/Filter/CustomPropertiesRule.js.html +4 -4
- 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 +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/Filter/useParseActiveFilterStrings.js.html +2 -2
- package/src/artifacts/coverage-jest/CustomProperties/Filter/useValueProps.js.html +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesView.js.html +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertiesViewCtx.js.html +3 -3
- package/src/artifacts/coverage-jest/CustomProperties/View/CustomPropertyCard.js.html +3 -3
- 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 +3 -3
- 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 +2 -2
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +6 -6
- 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 +2 -2
- package/src/artifacts/coverage-jest/RichSelect/RichSelect.js.html +3 -3
- 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 +2 -2
- package/src/artifacts/coverage-jest/SASQLookupComponent/SASQLookupComponent.js.html +146 -149
- package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/TableBody.js.html +74 -65
- package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.html +21 -21
- package/src/artifacts/coverage-jest/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQLookupComponent/index.html +21 -21
- package/src/artifacts/coverage-jest/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQRoute/SASQRoute.js.html +43 -43
- package/src/artifacts/coverage-jest/SASQRoute/index.html +21 -21
- package/src/artifacts/coverage-jest/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SASQViewComponent/SASQViewComponent.js.html +42 -42
- package/src/artifacts/coverage-jest/SASQViewComponent/index.html +21 -21
- package/src/artifacts/coverage-jest/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/SearchField/SearchField.js.html +4 -4
- 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 +3 -3
- 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 +4 -4
- 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 +4 -4
- 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 +3 -3
- package/src/artifacts/coverage-jest/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js.html +5 -5
- 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 +3 -3
- 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 +3 -3
- 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 +3 -3
- 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 +4 -4
- 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 +3 -3
- package/src/artifacts/coverage-jest/Settings/SettingPage/SettingPagePane/SettingPagePane.js.html +3 -3
- 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 +643 -0
- package/src/artifacts/coverage-jest/Settings/Settings/index.html +131 -0
- package/src/artifacts/coverage-jest/Settings/Settings/index.js.html +88 -0
- package/src/artifacts/coverage-jest/Settings/SettingsFormContainer/SettingsFormContainer.js.html +3 -3
- 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 +3 -3
- package/src/artifacts/coverage-jest/Settings/StaticSettingsField/StaticSettingsFieldComponent/StaticSettingsFieldComponent.js.html +2 -2
- 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 +5 -5
- package/src/artifacts/coverage-jest/Settings/contexts/SettingsContext.js.html +2 -2
- 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 +2 -2
- 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 +2 -2
- package/src/artifacts/coverage-jest/Settings/hooks/staticSettingsPages/useStaticSettingsSection.js.html +2 -2
- 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 +2 -2
- 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 +2 -2
- package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.html +12 -12
- package/src/artifacts/coverage-jest/Settings/hooks/useSettings/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Settings/hooks/useSettings/useSettings.js.html +33 -15
- package/src/artifacts/coverage-jest/Settings/index.html +1 -1
- package/src/artifacts/coverage-jest/Settings/index.js.html +1 -1
- package/src/artifacts/coverage-jest/Tags/Tags.js.html +3 -3
- 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 +2 -2
- package/src/artifacts/coverage-jest/Tags/hooks/useTagsEnabled.js.html +8 -8
- 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 +5 -5
- package/src/artifacts/coverage-jest/Typedown/Typedown.js.html +15 -6
- package/src/artifacts/coverage-jest/Typedown/index.html +3 -3
- package/src/artifacts/coverage-jest/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/cobertura-coverage.xml +1006 -839
- package/src/artifacts/coverage-jest/constants/comparators.js.html +1 -1
- package/src/artifacts/coverage-jest/constants/customProperties.js.html +12 -12
- package/src/artifacts/coverage-jest/constants/endpoints.js.html +4 -4
- package/src/artifacts/coverage-jest/constants/eventCodes.js.html +4 -4
- package/src/artifacts/coverage-jest/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/constants/pagination.js.html +6 -6
- package/src/artifacts/coverage-jest/hooks/index.html +51 -51
- 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 +8 -8
- 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 +12 -12
- 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 +10 -10
- 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 +2 -2
- package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownData.js.html +2 -2
- package/src/artifacts/coverage-jest/hooks/typedownHooks/useTypedownToggle.js.html +2 -2
- package/src/artifacts/coverage-jest/hooks/useActionListRef.js.html +2 -2
- package/src/artifacts/coverage-jest/hooks/useActiveElement.js.html +2 -2
- package/src/artifacts/coverage-jest/hooks/useCustomProperties.js.html +3 -3
- package/src/artifacts/coverage-jest/hooks/useHelperApp.js.html +2 -2
- 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 +2 -2
- package/src/artifacts/coverage-jest/hooks/useKiwtFieldArray.js.html +2 -2
- package/src/artifacts/coverage-jest/hooks/useKiwtSASQuery.js.html +48 -48
- package/src/artifacts/coverage-jest/hooks/useLocalPageStore.js.html +3 -3
- package/src/artifacts/coverage-jest/hooks/useLocalStorageState.js.html +22 -22
- package/src/artifacts/coverage-jest/hooks/useModConfigEntries.js.html +3 -3
- 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 +2 -2
- package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.html +1 -1
- package/src/artifacts/coverage-jest/hooks/useMutateGeneric/index.js.html +5 -2
- package/src/artifacts/coverage-jest/hooks/useMutateGeneric/useMutateGeneric.js.html +2 -2
- package/src/artifacts/coverage-jest/hooks/useMutateModConfigEntry.js.html +2 -2
- 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 +2 -2
- 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 +2 -2
- package/src/artifacts/coverage-jest/hooks/usePrevNextPagination.js.html +68 -68
- package/src/artifacts/coverage-jest/hooks/useQIndex.js.html +28 -28
- package/src/artifacts/coverage-jest/hooks/useRefdata.js.html +3 -3
- package/src/artifacts/coverage-jest/hooks/useSASQQueryMeta.js.html +2 -2
- 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 +2 -2
- package/src/artifacts/coverage-jest/hooks/useTemplates.js.html +2 -2
- package/src/artifacts/coverage-jest/index.html +115 -100
- package/src/artifacts/coverage-jest/utils/buildUrl.js.html +34 -34
- package/src/artifacts/coverage-jest/utils/filterParsers/deparseKiwtQueryFilters.js.html +3 -3
- 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 +3 -3
- package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryGroups.js.html +2 -2
- package/src/artifacts/coverage-jest/utils/filterParsers/parseKiwtQueryString.js.html +5 -5
- package/src/artifacts/coverage-jest/utils/generateKiwtQuery.js.html +7 -7
- package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/generateKiwtQueryParams.js.html +67 -67
- package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.html +21 -21
- package/src/artifacts/coverage-jest/utils/generateKiwtQueryParams/index.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/groupCustomPropertiesByCtx.js.html +2 -2
- package/src/artifacts/coverage-jest/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/utils/index.html +22 -22
- package/src/artifacts/coverage-jest/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/utils/matchString.js.html +2 -2
- package/src/artifacts/coverage-jest/utils/modConfigEntriesQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/utils/parseErrorResponse.js.html +2 -2
- package/src/artifacts/coverage-jest/utils/parseModConfigEntry.js.html +2 -2
- 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 +2 -2
- package/src/artifacts/coverage-jest/utils/selectorSafe.js.html +2 -2
- package/src/artifacts/coverage-jest/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/utils/toCamelCase.js.html +2 -2
- package/src/artifacts/coverage-jest/utils/typedownQueryKey.js.html +2 -2
- 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 +8 -8
- package/src/lib/ButtonTypedown/ButtonTypedown.js +77 -13
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +3 -4
- package/src/lib/SASQLookupComponent/SASQLookupComponent.test.js +495 -0
- package/src/lib/SASQLookupComponent/TableBody/TableBody.js +6 -3
- package/src/lib/SASQLookupComponent/TableBody/TableBody.test.js +247 -0
- package/src/lib/SASQLookupComponent/__mocks__/SASQLookupComponent.js +31 -0
- package/src/lib/SASQLookupComponent/__mocks__/SASQLookupComponentRender.js +20 -0
- package/src/lib/SASQLookupComponent/__mocks__/index.js +2 -0
- package/src/lib/SASQRoute/SASQRoute.test.js +281 -0
- package/src/lib/SASQViewComponent/SASQViewComponent.test.js +114 -0
- package/src/lib/SASQViewComponent/__mocks__/SASQViewComponent.js +13 -0
- package/src/lib/SASQViewComponent/__mocks__/SASQViewComponentRender.js +17 -0
- package/src/lib/SASQViewComponent/__mocks__/index.js +2 -0
- package/src/lib/Settings/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js +1 -1
- package/src/lib/Settings/Settings/Settings.js +186 -0
- package/src/lib/Settings/Settings/index.js +1 -0
- package/src/lib/Settings/hooks/useSettings/useSettings.js +13 -7
- package/src/lib/Typedown/Typedown.js +4 -1
- package/src/lib/hooks/useMutateGeneric/index.js +1 -1
- package/styles/TypeDown.css +2 -2
- package/test/helpers/test-implementor-translations.json +2 -1
- package/test/helpers/translationsProperties.js +1 -1
- package/test/jest/setupTests.js +1 -1
|
@@ -4,14 +4,18 @@ var _refdata = _interopRequireDefault(require("../../../../test/jest/refdata"));
|
|
|
4
4
|
var _customProperties = _interopRequireDefault(require("../../../../test/jest/customProperties"));
|
|
5
5
|
var _useKintIntl = _interopRequireDefault(require("../intlHooks/useKintIntl"));
|
|
6
6
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
+
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; }
|
|
8
|
+
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; }
|
|
9
|
+
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; }
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
11
|
+
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); }
|
|
7
12
|
/* EXAMPLE Grab actual hooks for anything not mocked here */
|
|
8
13
|
const hooks = jest.requireActual('../index');
|
|
9
14
|
|
|
10
15
|
// We have to do this up here too so that our passed useKintIntl
|
|
11
16
|
// ALSO has a mocked useIntlKeyStore... I think anyway
|
|
12
17
|
jest.mock('../intlHooks/useIntlKeyStore', () => () => () => 'ui-test-implementor');
|
|
13
|
-
module.exports = {
|
|
14
|
-
...hooks,
|
|
18
|
+
module.exports = _objectSpread(_objectSpread({}, hooks), {}, {
|
|
15
19
|
useRefdata: () => _refdata.default,
|
|
16
20
|
useTemplates: () => [],
|
|
17
21
|
// We should set up some templates to test this properly
|
|
@@ -22,4 +26,4 @@ module.exports = {
|
|
|
22
26
|
useMutateCustomProperties: () => [],
|
|
23
27
|
useIntlKeyStore: () => () => () => 'ui-test-implementor',
|
|
24
28
|
useKintIntl: _useKintIntl.default // Use the "proper" useKintIntl but with a mocked intlKeyStore which returns the ui-test-implementor
|
|
25
|
-
};
|
|
29
|
+
});
|
|
@@ -6,47 +6,53 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _core = require("@folio/stripes/core");
|
|
8
8
|
var _zustand = require("zustand");
|
|
9
|
-
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
|
+
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); } // We can use hooks within zustand store functions without violating the laws of hooks
|
|
10
16
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
11
|
-
|
|
12
17
|
const useIntlKeyStore = (0, _zustand.create)((set, get) => ({
|
|
13
18
|
intlKeys: {},
|
|
14
19
|
addKey: (key, namespace) => set(state => {
|
|
20
|
+
var _useNamespace;
|
|
15
21
|
let ns = namespace;
|
|
16
|
-
const folioNS = (0, _core.useNamespace)()
|
|
22
|
+
const folioNS = (_useNamespace = (0, _core.useNamespace)()) === null || _useNamespace === void 0 ? void 0 : _useNamespace[0];
|
|
17
23
|
if (!ns) {
|
|
18
24
|
ns = folioNS;
|
|
19
25
|
}
|
|
20
|
-
return {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
};
|
|
26
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
27
|
+
intlKeys: _objectSpread({
|
|
28
|
+
[ns]: key
|
|
29
|
+
}, state.intlKeys)
|
|
30
|
+
});
|
|
27
31
|
}),
|
|
28
32
|
removeKey: namespace => set(state => {
|
|
33
|
+
var _useNamespace2;
|
|
29
34
|
let ns = namespace;
|
|
30
|
-
const folioNS = (0, _core.useNamespace)()
|
|
35
|
+
const folioNS = (_useNamespace2 = (0, _core.useNamespace)()) === null || _useNamespace2 === void 0 ? void 0 : _useNamespace2[0];
|
|
31
36
|
if (!ns) {
|
|
32
37
|
ns = folioNS;
|
|
33
38
|
}
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
39
|
+
const _state$intlKeys = state.intlKeys,
|
|
40
|
+
{
|
|
41
|
+
[ns]: _valueToRemove
|
|
42
|
+
} = _state$intlKeys,
|
|
43
|
+
newKeys = _objectWithoutProperties(_state$intlKeys, [ns].map(_toPropertyKey));
|
|
44
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
40
45
|
intlKeys: newKeys
|
|
41
|
-
};
|
|
46
|
+
});
|
|
42
47
|
}),
|
|
43
48
|
getKey: namespace => {
|
|
49
|
+
var _useNamespace3, _get$intlKeys;
|
|
44
50
|
let ns = namespace;
|
|
45
|
-
const folioNS = (0, _core.useNamespace)()
|
|
51
|
+
const folioNS = (_useNamespace3 = (0, _core.useNamespace)()) === null || _useNamespace3 === void 0 ? void 0 : _useNamespace3[0];
|
|
46
52
|
if (!ns) {
|
|
47
53
|
ns = folioNS;
|
|
48
54
|
}
|
|
49
|
-
return get().intlKeys
|
|
55
|
+
return (_get$intlKeys = get().intlKeys) === null || _get$intlKeys === void 0 ? void 0 : _get$intlKeys[ns];
|
|
50
56
|
}
|
|
51
57
|
}));
|
|
52
58
|
var _default = exports.default = useIntlKeyStore;
|
|
@@ -6,7 +6,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _reactIntl = require("react-intl");
|
|
8
8
|
var _useIntlKey = _interopRequireDefault(require("../useIntlKey"));
|
|
9
|
+
const _excluded = ["id", "overrideValue", "fallbackMessage"];
|
|
9
10
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
10
18
|
/* A hook to enrich the intl object we get from useIntl */
|
|
11
19
|
const useKintIntl = (passedIntlKey, passedIntlNS) => {
|
|
12
20
|
const intlObj = (0, _reactIntl.useIntl)();
|
|
@@ -15,23 +23,24 @@ const useKintIntl = (passedIntlKey, passedIntlNS) => {
|
|
|
15
23
|
// FormatKintMessage id misses out the top level key part of the path.
|
|
16
24
|
// This works analogously to FormattedKintMessage component
|
|
17
25
|
const formatKintMessage = (_ref, formatValues) => {
|
|
26
|
+
var _intlObj$messages2;
|
|
18
27
|
let {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
id,
|
|
29
|
+
overrideValue,
|
|
30
|
+
fallbackMessage
|
|
31
|
+
} = _ref,
|
|
32
|
+
formatParams = _objectWithoutProperties(_ref, _excluded);
|
|
24
33
|
if (overrideValue) {
|
|
34
|
+
var _intlObj$messages;
|
|
25
35
|
// Version 3 is a breaking change, where labelOverrides must be strings.
|
|
26
36
|
if (typeof overrideValue !== 'string') {
|
|
27
37
|
throw new Error('Override values must be strings as of stripes-kint-components ^3.0.0');
|
|
28
38
|
}
|
|
29
|
-
if (intlObj.messages
|
|
39
|
+
if ((_intlObj$messages = intlObj.messages) !== null && _intlObj$messages !== void 0 && _intlObj$messages[overrideValue]) {
|
|
30
40
|
// We've been passed a key as an override, use it
|
|
31
|
-
return intlObj.formatMessage({
|
|
32
|
-
id: overrideValue
|
|
33
|
-
|
|
34
|
-
}, formatValues);
|
|
41
|
+
return intlObj.formatMessage(_objectSpread({
|
|
42
|
+
id: overrideValue
|
|
43
|
+
}, formatParams), formatValues);
|
|
35
44
|
}
|
|
36
45
|
// At this stage we have an overrideValue that's not a key, return it.
|
|
37
46
|
return overrideValue;
|
|
@@ -40,28 +49,29 @@ const useKintIntl = (passedIntlKey, passedIntlNS) => {
|
|
|
40
49
|
// If key does not exist in intl, and we have a specified "fallbackMessage", use that
|
|
41
50
|
|
|
42
51
|
// (FallbackMessage works like defaultMessage but with no warning)
|
|
43
|
-
if (!intlObj.messages
|
|
52
|
+
if (!((_intlObj$messages2 = intlObj.messages) !== null && _intlObj$messages2 !== void 0 && _intlObj$messages2["".concat(intlKey, ".").concat(id)]) && fallbackMessage) {
|
|
53
|
+
var _intlObj$messages3;
|
|
44
54
|
// Allow fallback message to be an intl key
|
|
45
|
-
if (intlObj.messages
|
|
46
|
-
return intlObj.formatMessage({
|
|
47
|
-
id: fallbackMessage
|
|
48
|
-
|
|
49
|
-
}, formatValues);
|
|
55
|
+
if ((_intlObj$messages3 = intlObj.messages) !== null && _intlObj$messages3 !== void 0 && _intlObj$messages3[fallbackMessage]) {
|
|
56
|
+
return intlObj.formatMessage(_objectSpread({
|
|
57
|
+
id: fallbackMessage
|
|
58
|
+
}, formatParams), formatValues);
|
|
50
59
|
}
|
|
51
60
|
return fallbackMessage;
|
|
52
61
|
}
|
|
53
62
|
|
|
54
63
|
// After all that, render the message from key
|
|
55
|
-
return intlObj.formatMessage({
|
|
56
|
-
id:
|
|
57
|
-
|
|
58
|
-
}, formatValues);
|
|
64
|
+
return intlObj.formatMessage(_objectSpread({
|
|
65
|
+
id: "".concat(intlKey, ".").concat(id)
|
|
66
|
+
}, formatParams), formatValues);
|
|
59
67
|
};
|
|
60
|
-
const messageExists = key =>
|
|
61
|
-
|
|
62
|
-
|
|
68
|
+
const messageExists = key => {
|
|
69
|
+
var _intlObj$messages4;
|
|
70
|
+
return !!((_intlObj$messages4 = intlObj.messages) !== null && _intlObj$messages4 !== void 0 && _intlObj$messages4["".concat(intlKey, ".").concat(key)]);
|
|
71
|
+
};
|
|
72
|
+
return _objectSpread(_objectSpread({}, intlObj), {}, {
|
|
63
73
|
formatKintMessage,
|
|
64
74
|
messageExists
|
|
65
|
-
};
|
|
75
|
+
});
|
|
66
76
|
};
|
|
67
77
|
var _default = exports.default = useKintIntl;
|
|
@@ -47,20 +47,21 @@ const useTypedown = function (name) {
|
|
|
47
47
|
// There appears to be some BIZARRE off-by-one issue with selectors here, that can be fixed by introducing a 1ms delay...
|
|
48
48
|
// I hate it but it is effective
|
|
49
49
|
setTimeout(() => {
|
|
50
|
+
var _dataOptions$length, _dataOptions$length2, _ref, _ref2, _ref3, _ref4, _ref5, _ref6;
|
|
50
51
|
// Split these out to shut up the linter
|
|
51
52
|
const rawFirstItemInList = list ? (0, _components.getFirstFocusable)(list) : null;
|
|
52
53
|
const rawLastItemInList = list ? (0, _components.getLastFocusable)(list) : null;
|
|
53
54
|
|
|
54
55
|
// If there are no dataOptions, this can get a bit stuck, so deliberately set to null when no dataOptions are present
|
|
55
|
-
const firstItemInList = (dataOptions
|
|
56
|
-
const lastItemInList = (dataOptions
|
|
56
|
+
const firstItemInList = ((_dataOptions$length = dataOptions === null || dataOptions === void 0 ? void 0 : dataOptions.length) !== null && _dataOptions$length !== void 0 ? _dataOptions$length : 0) > 0 ? rawFirstItemInList : null;
|
|
57
|
+
const lastItemInList = ((_dataOptions$length2 = dataOptions === null || dataOptions === void 0 ? void 0 : dataOptions.length) !== null && _dataOptions$length2 !== void 0 ? _dataOptions$length2 : 0) > 0 ? rawLastItemInList : null;
|
|
57
58
|
const configs = [
|
|
58
59
|
// --- HEADER CONFIG ---
|
|
59
60
|
{
|
|
60
61
|
element: header,
|
|
61
62
|
allowTabThroughContents: true,
|
|
62
63
|
previousElement: trigger,
|
|
63
|
-
nextElement: (footer ? (0, _components.getFirstFocusable)(footer) : null)
|
|
64
|
+
nextElement: (_ref = footer ? (0, _components.getFirstFocusable)(footer) : null) !== null && _ref !== void 0 ? _ref : (0, _components.getNextFocusable)(trigger, false),
|
|
64
65
|
downElement: firstItemInList,
|
|
65
66
|
upElement: lastItemInList
|
|
66
67
|
},
|
|
@@ -68,7 +69,7 @@ const useTypedown = function (name) {
|
|
|
68
69
|
{
|
|
69
70
|
element: footer,
|
|
70
71
|
allowTabThroughContents: true,
|
|
71
|
-
previousElement: (header ? (0, _components.getLastFocusable)(header) : null)
|
|
72
|
+
previousElement: (_ref2 = header ? (0, _components.getLastFocusable)(header) : null) !== null && _ref2 !== void 0 ? _ref2 : trigger,
|
|
72
73
|
nextElement: (0, _components.getNextFocusable)(trigger, false),
|
|
73
74
|
downElement: firstItemInList,
|
|
74
75
|
upElement: lastItemInList
|
|
@@ -77,13 +78,13 @@ const useTypedown = function (name) {
|
|
|
77
78
|
{
|
|
78
79
|
element: list,
|
|
79
80
|
allowUpDownThroughContents: true,
|
|
80
|
-
previousElement: (header ? (0, _components.getLastFocusable)(header) : null)
|
|
81
|
-
nextElement: (footer ? (0, _components.getFirstFocusable)(footer) : null)
|
|
81
|
+
previousElement: (_ref3 = header ? (0, _components.getLastFocusable)(header) : null) !== null && _ref3 !== void 0 ? _ref3 : trigger,
|
|
82
|
+
nextElement: (_ref4 = footer ? (0, _components.getFirstFocusable)(footer) : null) !== null && _ref4 !== void 0 ? _ref4 : (0, _components.getNextFocusable)(trigger, false)
|
|
82
83
|
},
|
|
83
84
|
// --- TRIGGER CONFIG ---
|
|
84
85
|
{
|
|
85
86
|
element: trigger,
|
|
86
|
-
nextElement: (header ? (0, _components.getFirstFocusable)(header) : null)
|
|
87
|
+
nextElement: (_ref5 = (_ref6 = header ? (0, _components.getFirstFocusable)(header) : null) !== null && _ref6 !== void 0 ? _ref6 : footer ? (0, _components.getFirstFocusable)(footer) : null) !== null && _ref5 !== void 0 ? _ref5 : (0, _components.getNextFocusable)(trigger, false),
|
|
87
88
|
previousElement: getPreviousToTrigger(),
|
|
88
89
|
downElement: firstItemInList,
|
|
89
90
|
upElement: lastItemInList
|
|
@@ -103,9 +104,9 @@ const useTypedown = function (name) {
|
|
|
103
104
|
const IS_SHIFT = e.shiftKey;
|
|
104
105
|
const tabIgnoreContents = () => {
|
|
105
106
|
if (IS_SHIFT) {
|
|
106
|
-
return previousElement
|
|
107
|
+
return previousElement === null || previousElement === void 0 ? void 0 : previousElement.focus();
|
|
107
108
|
}
|
|
108
|
-
return nextElement
|
|
109
|
+
return nextElement === null || nextElement === void 0 ? void 0 : nextElement.focus();
|
|
109
110
|
};
|
|
110
111
|
if (!allowTabThroughContents) {
|
|
111
112
|
return tabIgnoreContents();
|
|
@@ -122,9 +123,9 @@ const useTypedown = function (name) {
|
|
|
122
123
|
const IS_UP = e.code === _eventCodes.UP_ARROW;
|
|
123
124
|
const upDownIgnoreContents = () => {
|
|
124
125
|
if (IS_UP) {
|
|
125
|
-
return upElement
|
|
126
|
+
return upElement === null || upElement === void 0 ? void 0 : upElement.focus();
|
|
126
127
|
}
|
|
127
|
-
return downElement
|
|
128
|
+
return downElement === null || downElement === void 0 ? void 0 : downElement.focus();
|
|
128
129
|
};
|
|
129
130
|
if (!allowUpDownThroughContents) {
|
|
130
131
|
return upDownIgnoreContents();
|
|
@@ -18,8 +18,8 @@ const useTypedownToggle = name => {
|
|
|
18
18
|
} = (0, _useActiveElement.default)();
|
|
19
19
|
|
|
20
20
|
// Trawl up element stack and check if a typedown-parent exists, use that to toggle
|
|
21
|
-
const openBool = !open && hasParent(
|
|
22
|
-
const closeBool = open && !hasParent(
|
|
21
|
+
const openBool = !open && hasParent("typedown-parent-".concat((0, _selectorSafe.default)(name)));
|
|
22
|
+
const closeBool = open && !hasParent("typedown-parent-".concat((0, _selectorSafe.default)(name)));
|
|
23
23
|
(0, _react.useEffect)(() => {
|
|
24
24
|
if (openBool || closeBool) {
|
|
25
25
|
onToggle();
|
|
@@ -13,7 +13,7 @@ const useActionListRef = () => {
|
|
|
13
13
|
const passedRef = (0, _react.useCallback)(node => {
|
|
14
14
|
// All functions must be present on here
|
|
15
15
|
actionListRef.current = node;
|
|
16
|
-
if (node
|
|
16
|
+
if (node !== null && node !== void 0 && node.editing) {
|
|
17
17
|
setEditing(node.editing);
|
|
18
18
|
} else {
|
|
19
19
|
setEditing();
|
|
@@ -11,7 +11,7 @@ const useActiveElement = () => {
|
|
|
11
11
|
setActive(document.activeElement);
|
|
12
12
|
};
|
|
13
13
|
const hasParent = id => {
|
|
14
|
-
return active.closest(
|
|
14
|
+
return active.closest("[id^=".concat(id, "]")) !== null;
|
|
15
15
|
};
|
|
16
16
|
(0, _react.useEffect)(() => {
|
|
17
17
|
document.addEventListener('focusin', handleFocusIn);
|
|
@@ -9,6 +9,11 @@ var _reactQuery = require("react-query");
|
|
|
9
9
|
var _core = require("@folio/stripes/core");
|
|
10
10
|
var _utils = require("../utils");
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
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; }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
16
|
+
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); }
|
|
12
17
|
const useCustomProperties = _ref => {
|
|
13
18
|
let {
|
|
14
19
|
endpoint,
|
|
@@ -21,7 +26,7 @@ const useCustomProperties = _ref => {
|
|
|
21
26
|
returnQueryObject = false
|
|
22
27
|
} = _ref;
|
|
23
28
|
const ky = (0, _core.useOkapiKy)();
|
|
24
|
-
const custPropOptions = {
|
|
29
|
+
const custPropOptions = _objectSpread({
|
|
25
30
|
searchKey: 'label,name,description',
|
|
26
31
|
filterKeys: {
|
|
27
32
|
ContextKey: 'ctx'
|
|
@@ -33,15 +38,14 @@ const useCustomProperties = _ref => {
|
|
|
33
38
|
}],
|
|
34
39
|
filters: [],
|
|
35
40
|
stats: false,
|
|
36
|
-
max: 100
|
|
37
|
-
|
|
38
|
-
};
|
|
41
|
+
max: 100
|
|
42
|
+
}, options);
|
|
39
43
|
if (Array.isArray(ctx)) {
|
|
40
44
|
// If we have an array, append a context filter for each ctx given
|
|
41
45
|
|
|
42
46
|
// Special case if one is isNull
|
|
43
47
|
custPropOptions.filters.push({
|
|
44
|
-
values: ctx.map(c => c === 'isNull' ? 'ctx isNull' :
|
|
48
|
+
values: ctx.map(c => c === 'isNull' ? 'ctx isNull' : "ctx==".concat(c))
|
|
45
49
|
});
|
|
46
50
|
} else if (ctx === 'isNull') {
|
|
47
51
|
// isNull is a special case
|
|
@@ -55,7 +59,7 @@ const useCustomProperties = _ref => {
|
|
|
55
59
|
});
|
|
56
60
|
}
|
|
57
61
|
const query = (0, _utils.generateKiwtQuery)(custPropOptions, nsValues);
|
|
58
|
-
const path =
|
|
62
|
+
const path = "".concat(endpoint).concat(query);
|
|
59
63
|
const queryObject = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useCustomProperties', 'custprops', ctx, path], () => ky(path).json(), queryParams);
|
|
60
64
|
if (returnQueryObject) {
|
|
61
65
|
return queryObject || {};
|
|
@@ -10,13 +10,18 @@ var _queryString = _interopRequireDefault(require("query-string"));
|
|
|
10
10
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
17
|
+
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); }
|
|
13
18
|
const useHelperApp = helpers => {
|
|
14
19
|
const history = (0, _reactRouterDom.useHistory)();
|
|
15
20
|
const location = (0, _reactRouterDom.useLocation)();
|
|
16
21
|
const [helperObject, setHelperObject] = (0, _react.useState)({});
|
|
17
22
|
const [helperToggleFunctions, setHelperToggleFunctions] = (0, _react.useState)({});
|
|
18
23
|
const query = _queryString.default.parse(location.search);
|
|
19
|
-
const [currentHelper, setCurrentHelper] = (0, _react.useState)(query
|
|
24
|
+
const [currentHelper, setCurrentHelper] = (0, _react.useState)(query === null || query === void 0 ? void 0 : query.helper);
|
|
20
25
|
const handleToggleHelper = (0, _react.useCallback)(helper => {
|
|
21
26
|
setCurrentHelper(helper !== currentHelper ? helper : undefined);
|
|
22
27
|
}, [currentHelper]);
|
|
@@ -35,14 +40,13 @@ const useHelperApp = helpers => {
|
|
|
35
40
|
// This makes sure adding/removing helpers changes the functions
|
|
36
41
|
setHelperToggleFunctions(newHelperToggleFunctions);
|
|
37
42
|
}
|
|
38
|
-
if (currentHelper !== query
|
|
39
|
-
const newQuery = {
|
|
40
|
-
...query,
|
|
43
|
+
if (currentHelper !== (query === null || query === void 0 ? void 0 : query.helper)) {
|
|
44
|
+
const newQuery = _objectSpread(_objectSpread({}, query), {}, {
|
|
41
45
|
helper: currentHelper
|
|
42
|
-
};
|
|
46
|
+
});
|
|
43
47
|
history.push({
|
|
44
48
|
pathname: location.pathname,
|
|
45
|
-
search:
|
|
49
|
+
search: "?".concat(_queryString.default.stringify(newQuery))
|
|
46
50
|
});
|
|
47
51
|
|
|
48
52
|
// When helper changes, reset helperToggleFunctions
|
|
@@ -52,15 +56,14 @@ const useHelperApp = helpers => {
|
|
|
52
56
|
|
|
53
57
|
// Set the HelperComponent
|
|
54
58
|
const HelperComponent = (0, _react.useCallback)(props => {
|
|
55
|
-
if (!query
|
|
59
|
+
if (!(query !== null && query !== void 0 && query.helper)) return null;
|
|
56
60
|
let Component = null;
|
|
57
|
-
Component = helperObject[query
|
|
61
|
+
Component = helperObject[query === null || query === void 0 ? void 0 : query.helper];
|
|
58
62
|
if (!Component) return null;
|
|
59
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
60
|
-
onToggle: () => handleToggleHelper(query
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}, [handleToggleHelper, helperObject, query?.helper]);
|
|
63
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, _objectSpread({
|
|
64
|
+
onToggle: () => handleToggleHelper(query === null || query === void 0 ? void 0 : query.helper)
|
|
65
|
+
}, props));
|
|
66
|
+
}, [handleToggleHelper, helperObject, query === null || query === void 0 ? void 0 : query.helper]);
|
|
64
67
|
return {
|
|
65
68
|
currentHelper,
|
|
66
69
|
HelperComponent,
|
|
@@ -6,6 +6,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactFinalFormArrays = require("react-final-form-arrays");
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
|
+
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); }
|
|
9
14
|
const useKiwtFieldArray = function (name) {
|
|
10
15
|
let submitWholeDeletedObject = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
11
16
|
const {
|
|
@@ -28,10 +33,9 @@ const useKiwtFieldArray = function (name) {
|
|
|
28
33
|
const onMarkForDeletion = field => {
|
|
29
34
|
if (field && field.id) {
|
|
30
35
|
if (submitWholeDeletedObject) {
|
|
31
|
-
fields.push({
|
|
32
|
-
...field,
|
|
36
|
+
fields.push(_objectSpread(_objectSpread({}, field), {}, {
|
|
33
37
|
_delete: true
|
|
34
|
-
});
|
|
38
|
+
}));
|
|
35
39
|
} else {
|
|
36
40
|
fields.push({
|
|
37
41
|
id: field.id,
|
|
@@ -57,10 +61,7 @@ const useKiwtFieldArray = function (name) {
|
|
|
57
61
|
}
|
|
58
62
|
};
|
|
59
63
|
const onUpdateField = (index, field) => {
|
|
60
|
-
fields.update(index, {
|
|
61
|
-
...fields.value[index],
|
|
62
|
-
...field
|
|
63
|
-
});
|
|
64
|
+
fields.update(index, _objectSpread(_objectSpread({}, fields.value[index]), field));
|
|
64
65
|
};
|
|
65
66
|
const items = values.slice(0, endOfList);
|
|
66
67
|
return {
|
|
@@ -8,7 +8,15 @@ var _react = require("react");
|
|
|
8
8
|
var _reactRouterDom = require("react-router-dom");
|
|
9
9
|
var _buildUrl = _interopRequireDefault(require("../utils/buildUrl"));
|
|
10
10
|
var _useQIndex = _interopRequireDefault(require("./useQIndex"));
|
|
11
|
+
const _excluded = ["nsValues"];
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
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); }
|
|
12
20
|
const locationQuerySetter = _ref => {
|
|
13
21
|
let {
|
|
14
22
|
location,
|
|
@@ -24,10 +32,10 @@ const locationQuerySetter = _ref => {
|
|
|
24
32
|
|
|
25
33
|
// Do not push to history if the url didn't change
|
|
26
34
|
// https://issues.folio.org/browse/STSMACOM-637
|
|
27
|
-
if (
|
|
35
|
+
if ("".concat(pathname).concat(search) !== url) {
|
|
28
36
|
// Only PUSH to history if we're not doing an initialisation OR changing from external-location
|
|
29
37
|
// This is the SASQ state being used here
|
|
30
|
-
if (['external-location', 'init.reset'].includes(state
|
|
38
|
+
if (['external-location', 'init.reset'].includes(state === null || state === void 0 ? void 0 : state.changeType)) {
|
|
31
39
|
history.replace(url);
|
|
32
40
|
} else {
|
|
33
41
|
history.push(url);
|
|
@@ -42,27 +50,23 @@ const useKiwtSASQuery = () => {
|
|
|
42
50
|
const [qindex] = (0, _useQIndex.default)();
|
|
43
51
|
// Ensure we update the query along with the querySetter
|
|
44
52
|
if (query.qindex !== qindex) {
|
|
45
|
-
setQuery({
|
|
46
|
-
...query,
|
|
53
|
+
setQuery(_objectSpread(_objectSpread({}, query), {}, {
|
|
47
54
|
qindex
|
|
48
|
-
});
|
|
55
|
+
}));
|
|
49
56
|
}
|
|
50
57
|
const querySetter = _ref2 => {
|
|
51
58
|
let {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
setQuery({
|
|
56
|
-
...query,
|
|
57
|
-
...nsValues,
|
|
59
|
+
nsValues
|
|
60
|
+
} = _ref2,
|
|
61
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
62
|
+
setQuery(_objectSpread(_objectSpread(_objectSpread({}, query), nsValues), {}, {
|
|
58
63
|
qindex
|
|
59
|
-
});
|
|
60
|
-
locationQuerySetter({
|
|
61
|
-
...rest,
|
|
64
|
+
}));
|
|
65
|
+
locationQuerySetter(_objectSpread(_objectSpread({}, rest), {}, {
|
|
62
66
|
location,
|
|
63
67
|
history,
|
|
64
68
|
nsValues
|
|
65
|
-
});
|
|
69
|
+
}));
|
|
66
70
|
};
|
|
67
71
|
return {
|
|
68
72
|
query,
|
|
@@ -6,20 +6,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _zustand = require("zustand");
|
|
8
8
|
var _pagination = require("../constants/pagination");
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
13
|
+
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); }
|
|
9
14
|
// Any time that usePrevNextPagination is NOT synced to location,
|
|
10
15
|
// store a keyed currentPage here instead
|
|
11
16
|
const useLocalPageStore = (0, _zustand.create)(set => ({
|
|
12
17
|
pageStore: {},
|
|
13
18
|
setPage: (id, page) => set(state => {
|
|
14
19
|
// Any non-id keyed pages will go into a single storage slot
|
|
15
|
-
const key = id
|
|
16
|
-
return {
|
|
17
|
-
|
|
18
|
-
pageStore: {
|
|
19
|
-
...state.pageStore,
|
|
20
|
+
const key = id !== null && id !== void 0 ? id : _pagination.DEFAULT_PAGE_KEY;
|
|
21
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
22
|
+
pageStore: _objectSpread(_objectSpread({}, state.pageStore), {}, {
|
|
20
23
|
[key]: page
|
|
21
|
-
}
|
|
22
|
-
};
|
|
24
|
+
})
|
|
25
|
+
});
|
|
23
26
|
})
|
|
24
27
|
}));
|
|
25
28
|
var _default = exports.default = useLocalPageStore;
|
|
@@ -22,8 +22,8 @@ const useModConfigEntries = _ref => {
|
|
|
22
22
|
// eslint-disable-next-line no-console
|
|
23
23
|
console.warn('useModConfigEntries is deprecated, as it utilises mod-config');
|
|
24
24
|
const ky = (0, _core.useOkapiKy)();
|
|
25
|
-
const query =
|
|
26
|
-
const path =
|
|
25
|
+
const query = "?query=(module=".concat(moduleName, " and configName=").concat(configName, ")");
|
|
26
|
+
const path = "".concat(_endpoints.MOD_SETTINGS_ENDPOINT).concat(query);
|
|
27
27
|
const namespace = (0, _utils.modConfigEntriesQueryKey)({
|
|
28
28
|
configName,
|
|
29
29
|
moduleName,
|
|
@@ -5,22 +5,29 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _useMutateGeneric = _interopRequireDefault(require("../useMutateGeneric"));
|
|
8
|
+
const _excluded = ["endpoint", "id"];
|
|
8
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
9
17
|
const useMutateCustomProperties = _ref => {
|
|
10
18
|
let {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return (0, _useMutateGeneric.default)({
|
|
19
|
+
endpoint,
|
|
20
|
+
id
|
|
21
|
+
} = _ref,
|
|
22
|
+
mutateGenericProps = _objectWithoutProperties(_ref, _excluded);
|
|
23
|
+
return (0, _useMutateGeneric.default)(_objectSpread({
|
|
16
24
|
endpoint,
|
|
17
25
|
endpointMutators: {
|
|
18
|
-
delete: () =>
|
|
19
|
-
put: () =>
|
|
26
|
+
delete: () => "".concat(endpoint, "/").concat(id),
|
|
27
|
+
put: () => "".concat(endpoint, "/").concat(id)
|
|
20
28
|
},
|
|
21
29
|
id,
|
|
22
|
-
queryKey: ['stripes-kint-components', 'useMutateCustomProperties', id]
|
|
23
|
-
|
|
24
|
-
});
|
|
30
|
+
queryKey: ['stripes-kint-components', 'useMutateCustomProperties', id]
|
|
31
|
+
}, mutateGenericProps));
|
|
25
32
|
};
|
|
26
33
|
var _default = exports.default = useMutateCustomProperties;
|
|
@@ -25,9 +25,9 @@ const useMutateGeneric = function () {
|
|
|
25
25
|
} = {},
|
|
26
26
|
endpoint,
|
|
27
27
|
endpointMutators: {
|
|
28
|
-
delete: endpointMutatorDelete = id =>
|
|
28
|
+
delete: endpointMutatorDelete = id => "".concat(endpoint, "/").concat(id),
|
|
29
29
|
post: endpointMutatorPost = () => endpoint,
|
|
30
|
-
put: endpointMutatorPut = data =>
|
|
30
|
+
put: endpointMutatorPut = data => "".concat(endpoint, "/").concat(data.id)
|
|
31
31
|
} = {},
|
|
32
32
|
payloadMutators: {
|
|
33
33
|
post: payloadMutatorPost = data => ({
|