@k-int/stripes-kint-components 5.1.1 → 5.1.3
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 +7 -0
- package/es/index.js +2 -2
- package/es/lib/ActionList/ActionList.js +2 -2
- package/es/lib/ActionList/ActionListFieldArray.js +31 -34
- package/es/lib/ComboButton/ComboButton.js +5 -6
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +4 -7
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +29 -32
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +58 -58
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +2 -2
- 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 +8 -10
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +22 -28
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +5 -5
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -2
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -3
- package/es/lib/CustomProperties/Edit/testResources.js +11 -12
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +6 -11
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +20 -28
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +8 -8
- package/es/lib/CustomProperties/Filter/testResources.js +1 -2
- package/es/lib/CustomProperties/Filter/useOperators.js +2 -2
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -2
- package/es/lib/CustomProperties/Filter/useValueProps.js +2 -2
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +18 -26
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +9 -13
- package/es/lib/CycleButton/CycleButton.js +1 -1
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +23 -34
- package/es/lib/EditableRefdataList/EditableRefdataList.js +28 -35
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +5 -5
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +10 -12
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +6 -6
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +4 -7
- package/es/lib/IconSelect/IconSelect.js +7 -11
- package/es/lib/NoResultsMessage/NoResultsMessage.js +4 -4
- package/es/lib/QueryTypedown/QueryTypedown.js +2 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +3 -3
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +21 -28
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +5 -6
- package/es/lib/RichSelect/RichSelect.js +14 -19
- package/es/lib/RichSelect/useSelectedOption.js +1 -2
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +14 -17
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +4 -6
- package/es/lib/SASQRoute/SASQRoute.js +2 -2
- package/es/lib/SASQViewComponent/SASQViewComponent.js +5 -9
- package/es/lib/SettingPage/SettingPage.js +2 -2
- package/es/lib/SettingPage/SettingPagePane.js +2 -2
- package/es/lib/SettingsFormContainer/SettingsFormContainer.js +2 -2
- package/es/lib/Typedown/Typedown.js +21 -28
- package/es/lib/hooks/typedownHooks/useTypedown.js +2 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
- package/es/lib/hooks/useActiveElement.js +1 -1
- package/es/lib/hooks/useCustomProperties.js +2 -2
- package/es/lib/hooks/useHelperApp.js +8 -8
- package/es/lib/hooks/useIntlKeyStore.js +4 -7
- package/es/lib/hooks/useKintIntl.js +5 -11
- package/es/lib/hooks/useKiwtSASQuery.js +1 -1
- package/es/lib/hooks/useLocalStorageState.js +2 -2
- package/es/lib/hooks/useModConfigEntries.js +2 -2
- package/es/lib/hooks/useMutateCustomProperties.js +8 -8
- package/es/lib/hooks/useMutateModConfigEntry.js +2 -2
- package/es/lib/hooks/useMutateRefdataCategory.js +4 -4
- package/es/lib/hooks/useMutateRefdataValue.js +6 -6
- package/es/lib/hooks/useQIndex.js +7 -7
- package/es/lib/hooks/useRefdata.js +3 -3
- package/es/lib/hooks/useTemplates.js +4 -4
- package/es/lib/settingsHooks/useAppSettings.js +7 -11
- package/es/lib/settingsHooks/useSettingSection.js +2 -2
- package/es/lib/settingsHooks/useSettings.js +3 -3
- package/es/lib/utils/buildUrl.js +2 -3
- package/es/lib/utils/filterParsers/deparseKiwtQueryFilters.js +6 -6
- package/es/lib/utils/filterParsers/index.js +2 -2
- 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.js +28 -37
- package/es/lib/utils/groupCustomPropertiesByCtx.js +2 -3
- package/es/lib/utils/matchString.js +1 -1
- package/es/lib/utils/parseErrorResponse.js +2 -3
- package/es/lib/utils/selectorSafe.js +2 -3
- package/es/lib/utils/sortByLabel.js +2 -3
- package/es/lib/validators/validators.js +3 -3
- package/junit.xml +162 -162
- package/package.json +2 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/ComboButton.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList/SettingsActionList.js.html → CustomProperties/Config/testResources.js.html} +313 -256
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +15 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +10 -7
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/comparators.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/endpoints.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +205 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useModConfigEntries.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateModConfigEntry.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/index.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/modConfigEntriesQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseModConfigEntry.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +166 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/validators/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov.info +231 -230
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +3 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +4 -3
- package/yarn-error.log +129 -0
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionTrigger.js.html +0 -418
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/EditSettingValue.js.html +0 -514
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/RenderSettingValue.js.html +0 -358
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/index.js.html +0 -88
|
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _localStorage = require("@rehooks/local-storage");
|
|
9
|
-
function _getRequireWildcardCache(
|
|
10
|
-
function _interopRequireWildcard(
|
|
9
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
const useLocalStorageState = (key, defaultValue) => {
|
|
12
12
|
const [local] = (0, _localStorage.useLocalStorage)(key, defaultValue);
|
|
13
13
|
const [localState, setLocalState] = (0, _react.useState)(local);
|
|
@@ -18,8 +18,8 @@ const useModConfigEntries = _ref => {
|
|
|
18
18
|
queryParams
|
|
19
19
|
} = _ref;
|
|
20
20
|
const ky = (0, _core.useOkapiKy)();
|
|
21
|
-
const query =
|
|
22
|
-
const path =
|
|
21
|
+
const query = `?query=(module=${moduleName} and configName=${configName})`;
|
|
22
|
+
const path = `${_endpoints.MOD_SETTINGS_ENDPOINT}${query}`;
|
|
23
23
|
const namespace = (0, _utils.modConfigEntriesQueryKey)({
|
|
24
24
|
configName,
|
|
25
25
|
moduleName,
|
|
@@ -21,24 +21,24 @@ const useMutateCustomProperties = _ref => {
|
|
|
21
21
|
} = _ref;
|
|
22
22
|
const returnObj = {};
|
|
23
23
|
const ky = (0, _core.useOkapiKy)();
|
|
24
|
-
const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'delete', id], async () => ky.delete(
|
|
25
|
-
const putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'put', id], async data => ky.put(
|
|
24
|
+
const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'delete', id], async () => ky.delete(`${endpoint}/${id}`).json().then(afterQueryCalls?.delete).catch(catchQueryCalls?.delete), queryParams?.delete);
|
|
25
|
+
const putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'put', id], async data => ky.put(`${endpoint}/${id}`, {
|
|
26
26
|
json: data
|
|
27
|
-
}).json().then(afterQueryCalls
|
|
28
|
-
const postQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'post'], async data => ky.post(
|
|
27
|
+
}).json().then(afterQueryCalls?.put).catch(catchQueryCalls?.put), queryParams?.put);
|
|
28
|
+
const postQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateCustomProperties', 'post'], async data => ky.post(`${endpoint}`, {
|
|
29
29
|
json: data
|
|
30
|
-
}).json().then(afterQueryCalls
|
|
31
|
-
if (returnQueryObject
|
|
30
|
+
}).json().then(afterQueryCalls?.post).catch(catchQueryCalls?.post), queryParams?.post);
|
|
31
|
+
if (returnQueryObject?.delete) {
|
|
32
32
|
returnObj.delete = deleteQueryObject;
|
|
33
33
|
} else {
|
|
34
34
|
returnObj.delete = deleteQueryObject.mutateAsync;
|
|
35
35
|
}
|
|
36
|
-
if (returnQueryObject
|
|
36
|
+
if (returnQueryObject?.put) {
|
|
37
37
|
returnObj.put = putQueryObject;
|
|
38
38
|
} else {
|
|
39
39
|
returnObj.put = putQueryObject.mutateAsync;
|
|
40
40
|
}
|
|
41
|
-
if (returnQueryObject
|
|
41
|
+
if (returnQueryObject?.post) {
|
|
42
42
|
returnObj.post = postQueryObject;
|
|
43
43
|
} else {
|
|
44
44
|
returnObj.post = postQueryObject.mutateAsync;
|
|
@@ -21,12 +21,12 @@ const useMutateModConfigEntry = _ref => {
|
|
|
21
21
|
configName,
|
|
22
22
|
moduleName
|
|
23
23
|
});
|
|
24
|
-
const putQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'putConfigEntry', id], async data => ky.put(
|
|
24
|
+
const putQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'putConfigEntry', id], async data => ky.put(`${_endpoints.MOD_SETTINGS_ENDPOINT}/${id}`, {
|
|
25
25
|
json: data
|
|
26
26
|
}).json().then(() => {
|
|
27
27
|
queryClient.invalidateQueries(baseNamespace);
|
|
28
28
|
}));
|
|
29
|
-
const postQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'postConfigEntry'], async data => ky.post(
|
|
29
|
+
const postQueryObject = (0, _reactQuery.useMutation)([...baseNamespace, 'postConfigEntry'], async data => ky.post(`${_endpoints.MOD_SETTINGS_ENDPOINT}`, {
|
|
30
30
|
json: data
|
|
31
31
|
}).json().then(() => {
|
|
32
32
|
queryClient.invalidateQueries(baseNamespace);
|
|
@@ -22,19 +22,19 @@ const useMutateRefdataCategory = _ref => {
|
|
|
22
22
|
const returnObj = {};
|
|
23
23
|
const ky = (0, _core.useOkapiKy)();
|
|
24
24
|
const invalidateRefdata = (0, _useInvalidateRefdata.default)();
|
|
25
|
-
const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataCategory', 'delete'], async id => ky.delete(
|
|
25
|
+
const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataCategory', 'delete'], async id => ky.delete(`${endpoint}/${id}`).json().then(afterQueryCalls?.delete).then(() => invalidateRefdata()).catch(catchQueryCalls?.delete), queryParams?.delete);
|
|
26
26
|
const postQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataCategory', 'post'], async payload => ky.post(endpoint, {
|
|
27
27
|
json: {
|
|
28
28
|
...payload,
|
|
29
29
|
values: []
|
|
30
30
|
}
|
|
31
|
-
}).json().then(afterQueryCalls
|
|
32
|
-
if (returnQueryObject
|
|
31
|
+
}).json().then(afterQueryCalls?.post).then(() => invalidateRefdata()).catch(catchQueryCalls?.post), queryParams?.post);
|
|
32
|
+
if (returnQueryObject?.delete) {
|
|
33
33
|
returnObj.delete = deleteQueryObject;
|
|
34
34
|
} else {
|
|
35
35
|
returnObj.delete = deleteQueryObject.mutateAsync;
|
|
36
36
|
}
|
|
37
|
-
if (returnQueryObject
|
|
37
|
+
if (returnQueryObject?.post) {
|
|
38
38
|
returnObj.post = postQueryObject;
|
|
39
39
|
} else {
|
|
40
40
|
returnObj.post = postQueryObject.mutateAsync;
|
|
@@ -23,7 +23,7 @@ const useMutateRefdataValue = _ref => {
|
|
|
23
23
|
const returnObj = {};
|
|
24
24
|
const ky = (0, _core.useOkapiKy)();
|
|
25
25
|
const invalidateRefdata = (0, _useInvalidateRefdata.default)();
|
|
26
|
-
const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataValue', 'delete', id], async data => ky.put(
|
|
26
|
+
const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataValue', 'delete', id], async data => ky.put(`${endpoint}/${id}`, {
|
|
27
27
|
json: {
|
|
28
28
|
id,
|
|
29
29
|
values: [{
|
|
@@ -31,19 +31,19 @@ const useMutateRefdataValue = _ref => {
|
|
|
31
31
|
_delete: true
|
|
32
32
|
}]
|
|
33
33
|
}
|
|
34
|
-
}).json().then(afterQueryCalls
|
|
35
|
-
const putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'editableRefdataList', 'editValue', id], async data => ky.put(
|
|
34
|
+
}).json().then(afterQueryCalls?.delete).then(() => invalidateRefdata()).catch(catchQueryCalls?.delete), queryParams?.delete);
|
|
35
|
+
const putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'editableRefdataList', 'editValue', id], async data => ky.put(`${endpoint}/${id}`, {
|
|
36
36
|
json: {
|
|
37
37
|
id,
|
|
38
38
|
values: [data]
|
|
39
39
|
}
|
|
40
|
-
}).json().then(afterQueryCalls
|
|
41
|
-
if (returnQueryObject
|
|
40
|
+
}).json().then(afterQueryCalls?.put).then(() => invalidateRefdata()).catch(catchQueryCalls?.put), queryParams?.put);
|
|
41
|
+
if (returnQueryObject?.delete) {
|
|
42
42
|
returnObj.delete = deleteQueryObject;
|
|
43
43
|
} else {
|
|
44
44
|
returnObj.delete = deleteQueryObject.mutateAsync;
|
|
45
45
|
}
|
|
46
|
-
if (returnQueryObject
|
|
46
|
+
if (returnQueryObject?.put) {
|
|
47
47
|
returnObj.put = putQueryObject;
|
|
48
48
|
} else {
|
|
49
49
|
returnObj.put = putQueryObject.mutateAsync;
|
|
@@ -8,29 +8,29 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _reactRouterDom = require("react-router-dom");
|
|
9
9
|
var _queryString = _interopRequireDefault(require("query-string"));
|
|
10
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
function _getRequireWildcardCache(
|
|
12
|
-
function _interopRequireWildcard(
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
13
|
const useQIndex = () => {
|
|
14
14
|
const history = (0, _reactRouterDom.useHistory)();
|
|
15
15
|
const location = (0, _reactRouterDom.useLocation)();
|
|
16
16
|
const query = _queryString.default.parse(location.search);
|
|
17
|
-
const [currentQindex, setCurrentQindex] = (0, _react.useState)(query
|
|
17
|
+
const [currentQindex, setCurrentQindex] = (0, _react.useState)(query?.qindex);
|
|
18
18
|
const handleQindexChange = newQindex => {
|
|
19
19
|
setCurrentQindex(newQindex);
|
|
20
|
-
if (newQindex !==
|
|
20
|
+
if (newQindex !== query?.qindex) {
|
|
21
21
|
const newQuery = {
|
|
22
22
|
...query,
|
|
23
23
|
qindex: newQindex
|
|
24
24
|
};
|
|
25
25
|
history.push({
|
|
26
26
|
pathname: location.pathname,
|
|
27
|
-
search:
|
|
27
|
+
search: `?${_queryString.default.stringify(newQuery)}`
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
(0, _react.useEffect)(() => {
|
|
32
|
-
if (currentQindex !==
|
|
33
|
-
setCurrentQindex(query
|
|
32
|
+
if (currentQindex !== query?.qindex) {
|
|
33
|
+
setCurrentQindex(query?.qindex);
|
|
34
34
|
}
|
|
35
35
|
}, [currentQindex, history, location, query]);
|
|
36
36
|
return [currentQindex, handleQindexChange];
|
|
@@ -28,13 +28,13 @@ const useRefdata = _ref => {
|
|
|
28
28
|
|
|
29
29
|
if (Array.isArray(desc)) {
|
|
30
30
|
// If we have an array, append a desc filter for each desc given
|
|
31
|
-
nsValues.filters = desc.map(d =>
|
|
31
|
+
nsValues.filters = desc.map(d => `DescKey.${d}`).join(',');
|
|
32
32
|
} else if (desc) {
|
|
33
33
|
// If we just have a string, append a single desc filter
|
|
34
|
-
nsValues.filters =
|
|
34
|
+
nsValues.filters = `DescKey.${desc}`;
|
|
35
35
|
}
|
|
36
36
|
const query = (0, _utils.generateKiwtQuery)(options, nsValues);
|
|
37
|
-
const path =
|
|
37
|
+
const path = `${endpoint}${query}`;
|
|
38
38
|
const queryObject = (0, _reactQuery.useQuery)((0, _utils.refdataQueryKey)(desc), () => ky(path).json(), queryParams);
|
|
39
39
|
if (returnQueryObject) {
|
|
40
40
|
return queryObject || {};
|
|
@@ -18,16 +18,16 @@ const useTemplates = _ref => {
|
|
|
18
18
|
const ky = (0, _core.useOkapiKy)();
|
|
19
19
|
const extraPathItems = [];
|
|
20
20
|
if (context) {
|
|
21
|
-
extraPathItems.push(
|
|
21
|
+
extraPathItems.push(`filters=context=${context}`);
|
|
22
22
|
}
|
|
23
23
|
if (sort) {
|
|
24
|
-
extraPathItems.push(
|
|
24
|
+
extraPathItems.push(`sort=${sort}`);
|
|
25
25
|
}
|
|
26
26
|
extraPathItems.push('max=500');
|
|
27
|
-
const path =
|
|
27
|
+
const path = `${endpoint}?${extraPathItems.join('&')}`;
|
|
28
28
|
const {
|
|
29
29
|
data: templates
|
|
30
|
-
} = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context
|
|
30
|
+
} = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context ?? ''], () => ky(path).json(), queryParams);
|
|
31
31
|
return templates || [];
|
|
32
32
|
};
|
|
33
33
|
var _default = exports.default = useTemplates;
|
|
@@ -8,7 +8,6 @@ var _reactQuery = require("react-query");
|
|
|
8
8
|
var _core = require("@folio/stripes/core");
|
|
9
9
|
var _utils = require("../utils");
|
|
10
10
|
const useAppSettings = _ref => {
|
|
11
|
-
var _ref2, _ref3, _queryObject$data2;
|
|
12
11
|
let {
|
|
13
12
|
endpoint,
|
|
14
13
|
keyName,
|
|
@@ -24,32 +23,29 @@ const useAppSettings = _ref => {
|
|
|
24
23
|
};
|
|
25
24
|
const namespaceArray = [endpoint];
|
|
26
25
|
if (sectionName) {
|
|
27
|
-
|
|
28
|
-
defaultQueryParamObject.filters = [...((_defaultQueryParamObj = defaultQueryParamObject.filters) !== null && _defaultQueryParamObj !== void 0 ? _defaultQueryParamObj : []), {
|
|
26
|
+
defaultQueryParamObject.filters = [...(defaultQueryParamObject.filters ?? []), {
|
|
29
27
|
path: 'section',
|
|
30
28
|
value: sectionName
|
|
31
29
|
}];
|
|
32
30
|
namespaceArray.push(sectionName);
|
|
33
31
|
}
|
|
34
32
|
if (keyName) {
|
|
35
|
-
|
|
36
|
-
defaultQueryParamObject.filters = [...((_defaultQueryParamObj2 = defaultQueryParamObject.filters) !== null && _defaultQueryParamObj2 !== void 0 ? _defaultQueryParamObj2 : []), {
|
|
33
|
+
defaultQueryParamObject.filters = [...(defaultQueryParamObject.filters ?? []), {
|
|
37
34
|
path: 'key',
|
|
38
35
|
value: keyName
|
|
39
36
|
}];
|
|
40
37
|
defaultQueryParamObject.perPage = 1;
|
|
41
38
|
namespaceArray.push(keyName);
|
|
42
39
|
}
|
|
43
|
-
const queryParamArray = (0, _utils.generateKiwtQueryParams)(options
|
|
40
|
+
const queryParamArray = (0, _utils.generateKiwtQueryParams)(options ?? defaultQueryParamObject, {});
|
|
44
41
|
namespaceArray.push(queryParamArray);
|
|
45
|
-
const queryObject = (0, _reactQuery.useQuery)(namespaceArray, () => ky(
|
|
42
|
+
const queryObject = (0, _reactQuery.useQuery)(namespaceArray, () => ky(`${endpoint}?${queryParamArray?.join('&')}`).json(), queryParams);
|
|
46
43
|
if (returnQueryObject) {
|
|
47
44
|
return queryObject;
|
|
48
45
|
}
|
|
49
|
-
if ((
|
|
50
|
-
|
|
51
|
-
return (_queryObject$data$ = queryObject === null || queryObject === void 0 || (_queryObject$data = queryObject.data) === null || _queryObject$data === void 0 ? void 0 : _queryObject$data[0]) !== null && _queryObject$data$ !== void 0 ? _queryObject$data$ : {};
|
|
46
|
+
if ((queryParams ?? defaultQueryParamObject)?.perPage && (queryParams ?? defaultQueryParamObject)?.perPage === 1) {
|
|
47
|
+
return queryObject?.data?.[0] ?? {};
|
|
52
48
|
}
|
|
53
|
-
return
|
|
49
|
+
return queryObject?.data ?? [];
|
|
54
50
|
};
|
|
55
51
|
var _default = exports.default = useAppSettings;
|
|
@@ -26,10 +26,10 @@ const useSettingSection = _ref => {
|
|
|
26
26
|
}, {});
|
|
27
27
|
const {
|
|
28
28
|
data: settings = []
|
|
29
|
-
} = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSetting', 'appSettings', queryParams, sectionName], () => ky(
|
|
29
|
+
} = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSetting', 'appSettings', queryParams, sectionName], () => ky(`${settingEndpoint}?${queryParams?.join('&')}`).json());
|
|
30
30
|
const {
|
|
31
31
|
mutateAsync: putSetting
|
|
32
|
-
} = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useSetting', 'putSetting', sectionName], data => ky.put(
|
|
32
|
+
} = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useSetting', 'putSetting', sectionName], data => ky.put(`${settingEndpoint}${data.id ? '/' + data.id : ''}`, {
|
|
33
33
|
json: data
|
|
34
34
|
}));
|
|
35
35
|
return {
|
|
@@ -30,7 +30,7 @@ const useSettings = _ref => {
|
|
|
30
30
|
const ky = (0, _core.useOkapiKy)();
|
|
31
31
|
const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
32
32
|
const queryParams = (0, _utils.generateKiwtQueryParams)({
|
|
33
|
-
filters: dynamicPageExclusions
|
|
33
|
+
filters: dynamicPageExclusions?.map(dpe => ({
|
|
34
34
|
path: 'section',
|
|
35
35
|
comparator: '!=',
|
|
36
36
|
value: dpe
|
|
@@ -41,13 +41,13 @@ const useSettings = _ref => {
|
|
|
41
41
|
const {
|
|
42
42
|
data: appSettings = [],
|
|
43
43
|
isLoading
|
|
44
|
-
} = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSettings', 'appSettings', settingEndpoint, queryParams], () => ky(
|
|
44
|
+
} = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSettings', 'appSettings', settingEndpoint, queryParams], () => ky(`${settingEndpoint}?${queryParams?.join('&')}`).json());
|
|
45
45
|
const sections = [...new Set(appSettings.map(s => s.section))];
|
|
46
46
|
const dynamic = sections.map(section => {
|
|
47
47
|
return {
|
|
48
48
|
route: section,
|
|
49
49
|
label: kintIntl.formatKintMessage({
|
|
50
|
-
id:
|
|
50
|
+
id: `settings.settingsSection.${(0, _utils.toCamelCase)(section)}`,
|
|
51
51
|
fallbackMessage: section
|
|
52
52
|
}),
|
|
53
53
|
component: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingPage.SettingPagePane, {
|
package/es/lib/utils/buildUrl.js
CHANGED
|
@@ -17,13 +17,12 @@ function removeEmpty(obj) {
|
|
|
17
17
|
return cleanObj;
|
|
18
18
|
}
|
|
19
19
|
function buildUrl(location, values, basePath) {
|
|
20
|
-
|
|
21
|
-
const locationQuery = (_location$query = location === null || location === void 0 ? void 0 : location.query) !== null && _location$query !== void 0 ? _location$query : _queryString.default.parse(location.search);
|
|
20
|
+
const locationQuery = location?.query ?? _queryString.default.parse(location.search);
|
|
22
21
|
let url = values._path || basePath || location.pathname;
|
|
23
22
|
const params = removeEmpty(Object.assign(locationQuery, values));
|
|
24
23
|
(0, _lodash.unset)(params, '_path');
|
|
25
24
|
if (!(0, _lodash.isEmpty)(params)) {
|
|
26
|
-
url +=
|
|
25
|
+
url += `?${_queryString.default.stringify(params)}`;
|
|
27
26
|
}
|
|
28
27
|
return url;
|
|
29
28
|
}
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.deparseKiwtQueryFiltersObject = exports.default = void 0;
|
|
7
7
|
// Does not validate object... make sure you pass it the right thing
|
|
8
8
|
const deparseKiwtQueryFiltersObject = queryObject => {
|
|
9
|
-
let returnString =
|
|
9
|
+
let returnString = `${queryObject.path} ${queryObject.comparator}`;
|
|
10
10
|
if (queryObject.value) {
|
|
11
|
-
returnString +=
|
|
11
|
+
returnString += ` ${queryObject.value}`;
|
|
12
12
|
}
|
|
13
13
|
return returnString;
|
|
14
14
|
};
|
|
@@ -20,17 +20,17 @@ const deparseKiwtQueryFilters = queryArray => {
|
|
|
20
20
|
let returnString = '';
|
|
21
21
|
queryArray.forEach(qa => {
|
|
22
22
|
if (Array.isArray(qa)) {
|
|
23
|
-
returnString +=
|
|
23
|
+
returnString += ` (${deparseKiwtQueryFilters(qa)})`;
|
|
24
24
|
} else if (typeof qa === 'string') {
|
|
25
|
-
returnString +=
|
|
25
|
+
returnString += ` ${qa}`;
|
|
26
26
|
} else {
|
|
27
27
|
// Assuming object at this stage
|
|
28
|
-
returnString +=
|
|
28
|
+
returnString += ` ${deparseKiwtQueryFiltersObject(qa)}`;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
return returnString.trim();
|
|
32
32
|
} else {
|
|
33
|
-
throw new Error(
|
|
33
|
+
throw new Error(`deparseKiwtQuery expects a parameter of type Array, passed: ${queryArray}`);
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
var _default = exports.default = deparseKiwtQueryFilters;
|
|
@@ -43,6 +43,6 @@ var _parseKiwtQueryGroups = _interopRequireDefault(require("./parseKiwtQueryGrou
|
|
|
43
43
|
var _parseKiwtQueryString = _interopRequireDefault(require("./parseKiwtQueryString"));
|
|
44
44
|
var _parseKiwtQueryFilters = _interopRequireWildcard(require("./parseKiwtQueryFilters"));
|
|
45
45
|
var _deparseKiwtQueryFilters = _interopRequireWildcard(require("./deparseKiwtQueryFilters"));
|
|
46
|
-
function _getRequireWildcardCache(
|
|
47
|
-
function _interopRequireWildcard(
|
|
46
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
47
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
48
48
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -21,7 +21,7 @@ const parseKiwtQueryFiltersRecursive = query => {
|
|
|
21
21
|
return (0, _parseKiwtQueryString.default)(query);
|
|
22
22
|
}
|
|
23
23
|
} else {
|
|
24
|
-
throw new Error(
|
|
24
|
+
throw new Error(`Unexpected query type: ${query}`);
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -33,7 +33,7 @@ const parseKiwtQueryFilters = queryString => {
|
|
|
33
33
|
const queryGroups = (0, _parseKiwtQueryGroups.default)(queryString);
|
|
34
34
|
return parseKiwtQueryFiltersRecursive(queryGroups);
|
|
35
35
|
} else {
|
|
36
|
-
throw new Error(
|
|
36
|
+
throw new Error(`parseKiwtQuery expects a parameter of type String, passed: ${queryString}`);
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -44,8 +44,7 @@ const parseKiwtQueryGroups = query => {
|
|
|
44
44
|
let nestLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
45
45
|
const group = [];
|
|
46
46
|
// Iterate over each element in the array, recursively calling this when hitting parens
|
|
47
|
-
parseArray
|
|
48
|
-
var _skipCount;
|
|
47
|
+
parseArray?.every((element, index) => {
|
|
49
48
|
if (skipCount[nestLevel] > 0) {
|
|
50
49
|
skipCount[nestLevel] -= 1;
|
|
51
50
|
return true; // Equivalent to BREAK -- move onto next element
|
|
@@ -57,14 +56,14 @@ const parseKiwtQueryGroups = query => {
|
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
// At the levels below all of the following will need
|
|
60
|
-
skipCount =
|
|
59
|
+
skipCount = skipCount?.map((n, i) => {
|
|
61
60
|
if (i < nestLevel) {
|
|
62
61
|
return n + 1;
|
|
63
62
|
}
|
|
64
63
|
return n;
|
|
65
64
|
});
|
|
66
65
|
if (element !== '(' && element !== ')') {
|
|
67
|
-
group
|
|
66
|
+
group?.push(element);
|
|
68
67
|
} else if (element === ')') {
|
|
69
68
|
// Remove the corresponding skipCount level because we're going down a nesting level
|
|
70
69
|
skipCount.pop();
|
|
@@ -74,7 +73,7 @@ const parseKiwtQueryGroups = query => {
|
|
|
74
73
|
// Add next index to skipcount for the nesting
|
|
75
74
|
skipCount.push(0);
|
|
76
75
|
unclosedParens += 1;
|
|
77
|
-
group.push(groupParser(parseArray.slice(index + 1, parseArray
|
|
76
|
+
group.push(groupParser(parseArray.slice(index + 1, parseArray?.length), nestLevel + 1));
|
|
78
77
|
}
|
|
79
78
|
|
|
80
79
|
// If all is well, continue on parsing
|
|
@@ -16,7 +16,7 @@ const FIRST = 0;
|
|
|
16
16
|
const SECOND = 1;
|
|
17
17
|
const THIRD = 2;
|
|
18
18
|
const parseKiwtQueryString = queryString => {
|
|
19
|
-
const comparatorMatch = new RegExp(
|
|
19
|
+
const comparatorMatch = new RegExp(`(${_comparators.default.join('|')})`);
|
|
20
20
|
// See parseKiwtQueryGroups for breakdown of why this filter is needed
|
|
21
21
|
const splitString = queryString.split(comparatorMatch).map(ss => ss.trim()).filter(Boolean);
|
|
22
22
|
|
|
@@ -17,40 +17,36 @@ const conditionalEncodeURIComponent = function (str) {
|
|
|
17
17
|
const buildFilterOptionBlock = function (opf) {
|
|
18
18
|
let isNested = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
19
19
|
let encode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
20
|
-
if (opf
|
|
20
|
+
if (opf?.groupValues) {
|
|
21
21
|
const groupValues = opf.groupValues;
|
|
22
22
|
|
|
23
23
|
// Small utility function to add negation and brackets to the options block where necessary
|
|
24
|
-
const negationAndNesting = str =>
|
|
24
|
+
const negationAndNesting = str => `${groupValues?.NOT ? '!' : ''}${isNested || groupValues?.NOT ? '(' : ''}${str}${isNested || groupValues?.NOT ? ')' : ''}`;
|
|
25
25
|
|
|
26
26
|
// First check whether groupValues is ANDed or ORed together
|
|
27
|
-
if (groupValues
|
|
28
|
-
var _groupValues$OR;
|
|
27
|
+
if (groupValues?.AND && Array.isArray(groupValues.AND) || groupValues?.OR && Array.isArray(groupValues.OR)) {
|
|
29
28
|
// AND takes precedence
|
|
30
29
|
if (groupValues.AND) {
|
|
31
|
-
|
|
32
|
-
return negationAndNesting(groupValues === null || groupValues === void 0 || (_groupValues$AND = groupValues.AND) === null || _groupValues$AND === void 0 || (_groupValues$AND = _groupValues$AND.map(gvo => buildFilterOptionBlock(gvo, true, encode))) === null || _groupValues$AND === void 0 ? void 0 : _groupValues$AND.join('&&'));
|
|
30
|
+
return negationAndNesting(groupValues?.AND?.map(gvo => buildFilterOptionBlock(gvo, true, encode))?.join('&&'));
|
|
33
31
|
}
|
|
34
|
-
return negationAndNesting(groupValues
|
|
32
|
+
return negationAndNesting(groupValues?.OR?.map(gvo => buildFilterOptionBlock(gvo, true, encode))?.join('||'));
|
|
35
33
|
}
|
|
36
34
|
// If neither valid OR nor AND exist, ignore the block
|
|
37
|
-
} else if (opf
|
|
35
|
+
} else if (opf?.values) {
|
|
38
36
|
// Build the values filter block
|
|
39
37
|
const innerFilters = [];
|
|
40
38
|
opf.values.forEach(opfv => {
|
|
41
39
|
if (opf.path) {
|
|
42
|
-
|
|
43
|
-
innerFilters.push("".concat(opf.path).concat((_opf$comparator = opf.comparator) !== null && _opf$comparator !== void 0 ? _opf$comparator : '==').concat(opfv));
|
|
40
|
+
innerFilters.push(`${opf.path}${opf.comparator ?? '=='}${opfv}`);
|
|
44
41
|
} else {
|
|
45
42
|
innerFilters.push(opfv);
|
|
46
43
|
}
|
|
47
44
|
});
|
|
48
45
|
return conditionalEncodeURIComponent(innerFilters.join('||'), encode);
|
|
49
|
-
} else if (opf
|
|
46
|
+
} else if (opf?.value) {
|
|
50
47
|
// If no value OR values, then ignore
|
|
51
48
|
if (opf.path) {
|
|
52
|
-
|
|
53
|
-
const filterString = "".concat(opf.path).concat((_opf$comparator2 = opf.comparator) !== null && _opf$comparator2 !== void 0 ? _opf$comparator2 : '==').concat(opf.value);
|
|
49
|
+
const filterString = `${opf.path}${opf.comparator ?? '=='}${opf.value}`;
|
|
54
50
|
return conditionalEncodeURIComponent(filterString, encode);
|
|
55
51
|
}
|
|
56
52
|
return conditionalEncodeURIComponent(opf.value, encode);
|
|
@@ -108,9 +104,8 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
108
104
|
} = options;
|
|
109
105
|
const paramsArray = [];
|
|
110
106
|
if (query) {
|
|
111
|
-
|
|
112
|
-
paramsArray.push(
|
|
113
|
-
paramsArray.push("term=".concat(conditionalEncodeURIComponent(query, encode)));
|
|
107
|
+
paramsArray.push(...((qindex || searchKey)?.split(',') ?? []).map(m => `match=${conditionalEncodeURIComponent(m, encode)}`));
|
|
108
|
+
paramsArray.push(`term=${conditionalEncodeURIComponent(query, encode)}`);
|
|
114
109
|
}
|
|
115
110
|
|
|
116
111
|
// Actually build the optionsFilters block (Moved logic to its own function to allow recursion)
|
|
@@ -118,71 +113,67 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
118
113
|
optionsFilters.forEach(opf => {
|
|
119
114
|
const optionsBlock = buildFilterOptionBlock(opf, false, encode);
|
|
120
115
|
if (optionsBlock) {
|
|
121
|
-
paramsArray.push(
|
|
116
|
+
paramsArray.push(`filters=${optionsBlock}`);
|
|
122
117
|
}
|
|
123
118
|
});
|
|
124
119
|
}
|
|
125
120
|
if (filters) {
|
|
126
121
|
const filterMap = {};
|
|
127
122
|
filters.split(',').forEach(filter => {
|
|
128
|
-
|
|
129
|
-
const [filterName, ...filterRest] = (_filter$trim$split = (_filter$trim = filter.trim()) === null || _filter$trim === void 0 ? void 0 : _filter$trim.split('.')) !== null && _filter$trim$split !== void 0 ? _filter$trim$split : [];
|
|
123
|
+
const [filterName, ...filterRest] = filter.trim()?.split('.') ?? [];
|
|
130
124
|
const filterValue = filterRest.join('.');
|
|
131
125
|
if (filterMap[filterName] === undefined) filterMap[filterName] = [];
|
|
132
126
|
filterMap[filterName].push(filterValue);
|
|
133
127
|
});
|
|
134
128
|
|
|
135
129
|
// We now have a filterMap of shape { status: ['active', 'cancelled'], type: ['local'] }
|
|
136
|
-
Object.entries(filterMap).forEach(
|
|
137
|
-
let [filterName, filterValues] =
|
|
130
|
+
Object.entries(filterMap).forEach(_ref => {
|
|
131
|
+
let [filterName, filterValues] = _ref;
|
|
138
132
|
const filterConfigEntry = filterConfig.find(conf => conf.name === filterName);
|
|
139
133
|
const filterKey = filterKeys[filterName];
|
|
140
134
|
if (filterConfigEntry) {
|
|
141
135
|
// We have a direct mapping instruction, use it
|
|
142
136
|
const filterString = filterValues.map(v => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
return "".concat(filterName, "==").concat(fceValue !== null && fceValue !== void 0 ? fceValue : v);
|
|
137
|
+
const fceValue = filterConfigEntry?.values?.find(fce => fce.name === v)?.value;
|
|
138
|
+
return `${filterName}==${fceValue ?? v}`;
|
|
146
139
|
}).join('||');
|
|
147
|
-
paramsArray.push(
|
|
140
|
+
paramsArray.push(`filters=${conditionalEncodeURIComponent(filterString, encode)}`);
|
|
148
141
|
} else if (!filterKey) {
|
|
149
142
|
// These filters have no key mapping so we just pass the values to the backend as-is.
|
|
150
|
-
paramsArray.push(...(filterValues
|
|
143
|
+
paramsArray.push(...(filterValues ?? []).map(f => `filters=${conditionalEncodeURIComponent(f, encode)}`));
|
|
151
144
|
} else {
|
|
152
|
-
const filterString = filterValues.map(v =>
|
|
153
|
-
paramsArray.push(
|
|
145
|
+
const filterString = filterValues.map(v => `${filterKey}==${v}`).join('||');
|
|
146
|
+
paramsArray.push(`filters=${conditionalEncodeURIComponent(filterString, encode)}`);
|
|
154
147
|
}
|
|
155
148
|
});
|
|
156
149
|
}
|
|
157
150
|
if (optionsSort && optionsSort.length > 0) {
|
|
158
151
|
optionsSort.forEach(os => {
|
|
159
152
|
if (os.value) {
|
|
160
|
-
paramsArray.push(
|
|
153
|
+
paramsArray.push(`sort=${conditionalEncodeURIComponent(os.value, encode)}`);
|
|
161
154
|
} else if (os.path) {
|
|
162
|
-
var _os$direction;
|
|
163
155
|
// If no path then ignore
|
|
164
|
-
const sortString =
|
|
165
|
-
paramsArray.push(
|
|
156
|
+
const sortString = `${os.path};${os.direction ?? 'asc'}`;
|
|
157
|
+
paramsArray.push(`sort=${conditionalEncodeURIComponent(sortString, encode)}`);
|
|
166
158
|
}
|
|
167
159
|
});
|
|
168
160
|
}
|
|
169
161
|
if (sort) {
|
|
170
|
-
|
|
171
|
-
paramsArray.push(...((_sort$trim$split = (_sort$trim = sort.trim()) === null || _sort$trim === void 0 ? void 0 : _sort$trim.split(',')) !== null && _sort$trim$split !== void 0 ? _sort$trim$split : []).map(sortKey => {
|
|
162
|
+
paramsArray.push(...(sort.trim()?.split(',') ?? []).map(sortKey => {
|
|
172
163
|
const descending = sortKey.startsWith('-');
|
|
173
164
|
let term = sortKey.replace('-', '');
|
|
174
165
|
if (term in sortKeys) {
|
|
175
166
|
term = term.replace(term, sortKeys[term]);
|
|
176
167
|
}
|
|
177
|
-
const sortString =
|
|
178
|
-
return
|
|
168
|
+
const sortString = `${term};${descending ? 'desc' : 'asc'}`;
|
|
169
|
+
return `sort=${conditionalEncodeURIComponent(sortString, encode)}`;
|
|
179
170
|
}));
|
|
180
171
|
}
|
|
181
172
|
if (stats) {
|
|
182
173
|
paramsArray.push('stats=true');
|
|
183
174
|
}
|
|
184
175
|
for (const [key, value] of Object.entries(rest)) {
|
|
185
|
-
paramsArray.push(
|
|
176
|
+
paramsArray.push(`${key}=${conditionalEncodeURIComponent(value, encode)}`);
|
|
186
177
|
}
|
|
187
178
|
return paramsArray;
|
|
188
179
|
};
|