@k-int/stripes-kint-components 4.7.2 → 4.7.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 +3 -4
- package/es/lib/ActionList/ActionListFieldArray.js +32 -36
- package/es/lib/ComboButton/ComboButton.js +6 -8
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +5 -9
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +30 -34
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +59 -60
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +33 -35
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +2 -3
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +4 -5
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +6 -12
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +21 -29
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +5 -5
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +3 -4
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -3
- package/es/lib/CustomProperties/Edit/testResources.js +14 -17
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +7 -13
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +21 -30
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +7 -8
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +1 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +9 -10
- package/es/lib/CustomProperties/Filter/testResources.js +5 -9
- package/es/lib/CustomProperties/Filter/useOperators.js +3 -4
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -4
- package/es/lib/CustomProperties/Filter/useValueProps.js +3 -4
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +2 -3
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +19 -28
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +10 -15
- package/es/lib/CustomProperties/View/testResources.js +5 -9
- package/es/lib/CycleButton/CycleButton.js +2 -3
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +24 -36
- package/es/lib/EditableRefdataList/EditableRefdataList.js +29 -37
- package/es/lib/EditableSettingsList/EditableSettingsList.js +1 -2
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +2 -3
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +6 -7
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +11 -14
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +7 -8
- package/es/lib/FormModal/FormModal.js +1 -2
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +5 -9
- package/es/lib/IconSelect/IconSelect.js +8 -13
- package/es/lib/NoResultsMessage/NoResultsMessage.js +5 -6
- package/es/lib/QueryTypedown/QueryTypedown.js +3 -4
- package/es/lib/RefdataButtons/RefdataButtons.js +4 -5
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +22 -30
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +6 -8
- package/es/lib/RichSelect/RichSelect.js +15 -21
- package/es/lib/RichSelect/useSelectedOption.js +2 -4
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +15 -19
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +5 -8
- package/es/lib/SASQRoute/SASQRoute.js +3 -4
- package/es/lib/SASQViewComponent/SASQViewComponent.js +6 -11
- package/es/lib/SearchField/SearchField.js +1 -2
- package/es/lib/SettingPage/SettingPage.js +3 -4
- package/es/lib/SettingPage/SettingPagePane.js +3 -4
- package/es/lib/SettingsFormContainer/SettingsFormContainer.js +3 -4
- package/es/lib/Typedown/Typedown.js +22 -30
- package/es/lib/constants/customProperties.js +11 -22
- package/es/lib/constants/endpoints.js +1 -2
- package/es/lib/constants/eventCodes.js +3 -6
- package/es/lib/contexts/SettingsContext.js +1 -2
- package/es/lib/hooks/typedownHooks/useTypedown.js +3 -4
- package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +3 -4
- package/es/lib/hooks/useActiveElement.js +2 -3
- package/es/lib/hooks/useCustomProperties.js +3 -4
- package/es/lib/hooks/useHelperApp.js +9 -10
- package/es/lib/hooks/useIntlKey.js +1 -2
- package/es/lib/hooks/useIntlKeyStore.js +5 -9
- package/es/lib/hooks/useInvalidateRefdata.js +1 -2
- package/es/lib/hooks/useKintIntl.js +6 -13
- package/es/lib/hooks/useKiwtFieldArray.js +1 -2
- package/es/lib/hooks/useKiwtSASQuery.js +4 -5
- package/es/lib/hooks/useLocalStorageState.js +3 -4
- package/es/lib/hooks/useModConfigEntries.js +3 -4
- package/es/lib/hooks/useMutateCustomProperties.js +9 -10
- package/es/lib/hooks/useMutateModConfigEntry.js +3 -4
- package/es/lib/hooks/useMutateRefdataCategory.js +5 -6
- package/es/lib/hooks/useMutateRefdataValue.js +7 -8
- package/es/lib/hooks/useQIndex.js +8 -9
- package/es/lib/hooks/useRefdata.js +4 -5
- package/es/lib/hooks/useSASQQueryMeta.js +1 -2
- package/es/lib/hooks/useTemplates.js +5 -6
- package/es/lib/settingsHooks/useAppSettings.js +8 -13
- package/es/lib/settingsHooks/useSettingSection.js +3 -4
- package/es/lib/settingsHooks/useSettings.js +4 -5
- package/es/lib/utils/buildUrl.js +1 -1
- package/es/lib/utils/generateKiwtQuery.js +1 -2
- package/es/lib/utils/generateKiwtQueryParams.js +28 -38
- package/es/lib/utils/groupCustomPropertiesByCtx.js +3 -5
- package/es/lib/utils/matchString.js +2 -3
- package/es/lib/utils/modConfigEntriesQueryKey.js +1 -2
- package/es/lib/utils/parseErrorResponse.js +3 -5
- package/es/lib/utils/parseKiwtQueryGroups.js +5 -7
- package/es/lib/utils/parseModConfigEntry.js +1 -2
- package/es/lib/utils/refdataOptions.js +2 -3
- package/es/lib/utils/refdataQueryKey.js +1 -2
- package/es/lib/utils/selectorSafe.js +4 -6
- package/es/lib/utils/sortByLabel.js +3 -5
- package/es/lib/utils/toCamelCase.js +1 -2
- package/es/lib/utils/typedownQueryKey.js +1 -2
- package/es/lib/validators/validators.js +3 -3
- package/package.json +12 -2
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -69
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -814
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +0 -181
- package/junit.xml +0 -293
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +0 -373
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +0 -1465
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +0 -667
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +0 -1240
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +0 -1474
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +0 -733
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +0 -176
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +0 -97
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +0 -793
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +0 -208
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +0 -352
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +0 -826
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +0 -1297
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +0 -454
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +0 -206
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +0 -100
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +0 -271
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +0 -499
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +0 -568
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +0 -415
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +0 -340
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +0 -502
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +0 -251
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +0 -103
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +0 -223
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +0 -271
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +0 -199
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +0 -253
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +0 -445
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +0 -619
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +0 -176
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +0 -571
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +0 -116
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +0 -175
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +0 -217
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +0 -751
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +0 -853
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +0 -280
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -259
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -412
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -313
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +0 -574
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +0 -379
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +0 -247
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +0 -508
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +0 -361
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +0 -205
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +0 -370
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +0 -580
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +0 -301
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +0 -718
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +0 -127
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +0 -1069
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +0 -400
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +0 -346
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +0 -307
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +0 -214
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +0 -220
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +0 -208
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/SettingsFormContainer.js.html +0 -337
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +0 -913
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/base.css +0 -224
- package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -87
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +0 -121
- package/src/artifacts/coverage-jest/lcov-report/constants/endpoints.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +0 -97
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +0 -401
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +0 -142
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +0 -292
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +0 -214
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +0 -463
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +0 -520
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +0 -181
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +0 -163
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +0 -157
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +0 -205
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +0 -325
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +0 -295
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +0 -151
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +0 -199
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +0 -118
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +0 -238
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +0 -274
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +0 -196
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +0 -136
- package/src/artifacts/coverage-jest/lcov-report/hooks/useModConfigEntries.js.html +0 -226
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +0 -283
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateModConfigEntry.js.html +0 -238
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +0 -274
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +0 -322
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +0 -208
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +0 -265
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +0 -187
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +0 -166
- package/src/artifacts/coverage-jest/lcov-report/index.html +0 -611
- package/src/artifacts/coverage-jest/lcov-report/prettify.css +0 -1
- package/src/artifacts/coverage-jest/lcov-report/prettify.js +0 -2
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +0 -292
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +0 -466
- package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/sorter.js +0 -196
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +0 -193
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +0 -109
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +0 -631
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +0 -124
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +0 -356
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +0 -169
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +0 -127
- package/src/artifacts/coverage-jest/lcov-report/utils/modConfigEntriesQueryKey.js.html +0 -142
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +0 -142
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +0 -361
- package/src/artifacts/coverage-jest/lcov-report/utils/parseModConfigEntry.js.html +0 -130
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +0 -109
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +0 -112
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +0 -166
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +0 -145
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +0 -130
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +0 -127
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +0 -112
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +0 -370
- package/src/artifacts/coverage-jest/lcov-report/validators/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +0 -370
- package/src/artifacts/coverage-jest/lcov.info +0 -5223
|
@@ -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);
|
|
@@ -36,5 +36,4 @@ const useMutateModConfigEntry = _ref => {
|
|
|
36
36
|
}
|
|
37
37
|
return postQueryObject;
|
|
38
38
|
};
|
|
39
|
-
var _default = useMutateModConfigEntry;
|
|
40
|
-
exports.default = _default;
|
|
39
|
+
var _default = exports.default = useMutateModConfigEntry;
|
|
@@ -22,24 +22,23 @@ 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;
|
|
41
41
|
}
|
|
42
42
|
return returnObj;
|
|
43
43
|
};
|
|
44
|
-
var _default = useMutateRefdataCategory;
|
|
45
|
-
exports.default = _default;
|
|
44
|
+
var _default = exports.default = useMutateRefdataCategory;
|
|
@@ -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,24 +31,23 @@ 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;
|
|
50
50
|
}
|
|
51
51
|
return returnObj;
|
|
52
52
|
};
|
|
53
|
-
var _default = useMutateRefdataValue;
|
|
54
|
-
exports.default = _default;
|
|
53
|
+
var _default = exports.default = useMutateRefdataValue;
|
|
@@ -8,32 +8,31 @@ 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];
|
|
37
37
|
};
|
|
38
|
-
var _default = useQIndex;
|
|
39
|
-
exports.default = _default;
|
|
38
|
+
var _default = exports.default = useQIndex;
|
|
@@ -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 || {};
|
|
@@ -50,5 +50,4 @@ useRefdata.propTypes = {
|
|
|
50
50
|
queryParams: _propTypes.default.object,
|
|
51
51
|
returnQueryObject: _propTypes.default.bool
|
|
52
52
|
};
|
|
53
|
-
var _default = useRefdata;
|
|
54
|
-
exports.default = _default;
|
|
53
|
+
var _default = exports.default = useRefdata;
|
|
@@ -18,17 +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
|
-
var _default = useTemplates;
|
|
34
|
-
exports.default = _default;
|
|
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,33 +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 ? 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
|
-
var _default = useAppSettings;
|
|
56
|
-
exports.default = _default;
|
|
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 {
|
|
@@ -37,5 +37,4 @@ const useSettingSection = _ref => {
|
|
|
37
37
|
settings
|
|
38
38
|
};
|
|
39
39
|
};
|
|
40
|
-
var _default = useSettingSection;
|
|
41
|
-
exports.default = _default;
|
|
40
|
+
var _default = exports.default = useSettingSection;
|
|
@@ -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, {
|
|
@@ -108,5 +108,4 @@ const useSettings = _ref => {
|
|
|
108
108
|
SettingsContextProvider
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
|
-
var _default = useSettings;
|
|
112
|
-
exports.default = _default;
|
|
111
|
+
var _default = exports.default = useSettings;
|
package/es/lib/utils/buildUrl.js
CHANGED
|
@@ -27,7 +27,7 @@ function buildUrl(location, values, basePath) {
|
|
|
27
27
|
const params = removeEmpty(Object.assign(locationQuery, values));
|
|
28
28
|
(0, _unset2.default)(params, '_path');
|
|
29
29
|
if (!(0, _isEmpty2.default)(params)) {
|
|
30
|
-
url +=
|
|
30
|
+
url += `?${_queryString.default.stringify(params)}`;
|
|
31
31
|
}
|
|
32
32
|
return url;
|
|
33
33
|
}
|
|
@@ -11,5 +11,4 @@ const generateKiwtQuery = function (options, nsValues) {
|
|
|
11
11
|
const paramsArray = (0, _generateKiwtQueryParams.default)(options, nsValues, encode);
|
|
12
12
|
return paramsArray.length ? '?' + paramsArray.join('&') : '';
|
|
13
13
|
};
|
|
14
|
-
var _default = generateKiwtQuery;
|
|
15
|
-
exports.default = _default;
|
|
14
|
+
var _default = exports.default = generateKiwtQuery;
|
|
@@ -14,40 +14,36 @@ const conditionalEncodeURIComponent = function (str) {
|
|
|
14
14
|
const buildFilterOptionBlock = function (opf) {
|
|
15
15
|
let isNested = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
16
16
|
let encode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
17
|
-
if (opf
|
|
17
|
+
if (opf?.groupValues) {
|
|
18
18
|
const groupValues = opf.groupValues;
|
|
19
19
|
|
|
20
20
|
// Small utility function to add negation and brackets to the options block where necessary
|
|
21
|
-
const negationAndNesting = str =>
|
|
21
|
+
const negationAndNesting = str => `${groupValues?.NOT ? '!' : ''}${isNested || groupValues?.NOT ? '(' : ''}${str}${isNested || groupValues?.NOT ? ')' : ''}`;
|
|
22
22
|
|
|
23
23
|
// First check whether groupValues is ANDed or ORed together
|
|
24
|
-
if (groupValues
|
|
25
|
-
var _groupValues$OR, _groupValues$OR$map;
|
|
24
|
+
if (groupValues?.AND && Array.isArray(groupValues.AND) || groupValues?.OR && Array.isArray(groupValues.OR)) {
|
|
26
25
|
// AND takes precedence
|
|
27
26
|
if (groupValues.AND) {
|
|
28
|
-
|
|
29
|
-
return negationAndNesting(groupValues === null || groupValues === void 0 ? void 0 : (_groupValues$AND = groupValues.AND) === null || _groupValues$AND === void 0 ? void 0 : (_groupValues$AND$map = _groupValues$AND.map(gvo => buildFilterOptionBlock(gvo, true, encode))) === null || _groupValues$AND$map === void 0 ? void 0 : _groupValues$AND$map.join('&&'));
|
|
27
|
+
return negationAndNesting(groupValues?.AND?.map(gvo => buildFilterOptionBlock(gvo, true, encode))?.join('&&'));
|
|
30
28
|
}
|
|
31
|
-
return negationAndNesting(groupValues
|
|
29
|
+
return negationAndNesting(groupValues?.OR?.map(gvo => buildFilterOptionBlock(gvo, true, encode))?.join('||'));
|
|
32
30
|
}
|
|
33
31
|
// If neither valid OR nor AND exist, ignore the block
|
|
34
|
-
} else if (opf
|
|
32
|
+
} else if (opf?.values) {
|
|
35
33
|
// Build the values filter block
|
|
36
34
|
const innerFilters = [];
|
|
37
35
|
opf.values.forEach(opfv => {
|
|
38
36
|
if (opf.path) {
|
|
39
|
-
|
|
40
|
-
innerFilters.push("".concat(opf.path).concat((_opf$comparator = opf.comparator) !== null && _opf$comparator !== void 0 ? _opf$comparator : '==').concat(opfv));
|
|
37
|
+
innerFilters.push(`${opf.path}${opf.comparator ?? '=='}${opfv}`);
|
|
41
38
|
} else {
|
|
42
39
|
innerFilters.push(opfv);
|
|
43
40
|
}
|
|
44
41
|
});
|
|
45
42
|
return conditionalEncodeURIComponent(innerFilters.join('||'), encode);
|
|
46
|
-
} else if (opf
|
|
43
|
+
} else if (opf?.value) {
|
|
47
44
|
// If no value OR values, then ignore
|
|
48
45
|
if (opf.path) {
|
|
49
|
-
|
|
50
|
-
const filterString = "".concat(opf.path).concat((_opf$comparator2 = opf.comparator) !== null && _opf$comparator2 !== void 0 ? _opf$comparator2 : '==').concat(opf.value);
|
|
46
|
+
const filterString = `${opf.path}${opf.comparator ?? '=='}${opf.value}`;
|
|
51
47
|
return conditionalEncodeURIComponent(filterString, encode);
|
|
52
48
|
}
|
|
53
49
|
return conditionalEncodeURIComponent(opf.value, encode);
|
|
@@ -105,9 +101,8 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
105
101
|
} = options;
|
|
106
102
|
const paramsArray = [];
|
|
107
103
|
if (query) {
|
|
108
|
-
|
|
109
|
-
paramsArray.push(
|
|
110
|
-
paramsArray.push("term=".concat(conditionalEncodeURIComponent(query, encode)));
|
|
104
|
+
paramsArray.push(...(qindex || searchKey).split(',')?.map(m => `match=${conditionalEncodeURIComponent(m, encode)}`));
|
|
105
|
+
paramsArray.push(`term=${conditionalEncodeURIComponent(query, encode)}`);
|
|
111
106
|
}
|
|
112
107
|
|
|
113
108
|
// Actually build the optionsFilters block (Moved logic to its own function to allow recursion)
|
|
@@ -115,15 +110,14 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
115
110
|
optionsFilters.forEach(opf => {
|
|
116
111
|
const optionsBlock = buildFilterOptionBlock(opf, false, encode);
|
|
117
112
|
if (optionsBlock) {
|
|
118
|
-
paramsArray.push(
|
|
113
|
+
paramsArray.push(`filters=${optionsBlock}`);
|
|
119
114
|
}
|
|
120
115
|
});
|
|
121
116
|
}
|
|
122
117
|
if (filters) {
|
|
123
118
|
const filterMap = {};
|
|
124
119
|
filters.split(',').forEach(filter => {
|
|
125
|
-
|
|
126
|
-
const [filterName, ...filterRest] = (_filter$trim = filter.trim()) === null || _filter$trim === void 0 ? void 0 : _filter$trim.split('.');
|
|
120
|
+
const [filterName, ...filterRest] = filter.trim()?.split('.');
|
|
127
121
|
const filterValue = filterRest.join('.');
|
|
128
122
|
if (filterMap[filterName] === undefined) filterMap[filterName] = [];
|
|
129
123
|
filterMap[filterName].push(filterValue);
|
|
@@ -137,51 +131,47 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
137
131
|
if (filterConfigEntry) {
|
|
138
132
|
// We have a direct mapping instruction, use it
|
|
139
133
|
const filterString = filterValues.map(v => {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
return "".concat(filterName, "==").concat(fceValue !== null && fceValue !== void 0 ? fceValue : v);
|
|
134
|
+
const fceValue = filterConfigEntry?.values?.find(fce => fce.name === v)?.value;
|
|
135
|
+
return `${filterName}==${fceValue ?? v}`;
|
|
143
136
|
}).join('||');
|
|
144
|
-
paramsArray.push(
|
|
137
|
+
paramsArray.push(`filters=${conditionalEncodeURIComponent(filterString, encode)}`);
|
|
145
138
|
} else if (!filterKey) {
|
|
146
139
|
// These filters have no key mapping so we just pass the values to the backend as-is.
|
|
147
|
-
paramsArray.push(...
|
|
140
|
+
paramsArray.push(...filterValues?.map(f => `filters=${conditionalEncodeURIComponent(f, encode)}`));
|
|
148
141
|
} else {
|
|
149
|
-
const filterString = filterValues.map(v =>
|
|
150
|
-
paramsArray.push(
|
|
142
|
+
const filterString = filterValues.map(v => `${filterKey}==${v}`).join('||');
|
|
143
|
+
paramsArray.push(`filters=${conditionalEncodeURIComponent(filterString, encode)}`);
|
|
151
144
|
}
|
|
152
145
|
});
|
|
153
146
|
}
|
|
154
147
|
if (optionsSort && optionsSort.length > 0) {
|
|
155
148
|
optionsSort.forEach(os => {
|
|
156
149
|
if (os.value) {
|
|
157
|
-
paramsArray.push(
|
|
150
|
+
paramsArray.push(`sort=${conditionalEncodeURIComponent(os.value, encode)}`);
|
|
158
151
|
} else if (os.path) {
|
|
159
|
-
var _os$direction;
|
|
160
152
|
// If no path then ignore
|
|
161
|
-
const sortString =
|
|
162
|
-
paramsArray.push(
|
|
153
|
+
const sortString = `${os.path};${os.direction ?? 'asc'}`;
|
|
154
|
+
paramsArray.push(`sort=${conditionalEncodeURIComponent(sortString, encode)}`);
|
|
163
155
|
}
|
|
164
156
|
});
|
|
165
157
|
}
|
|
166
158
|
if (sort) {
|
|
167
|
-
|
|
168
|
-
paramsArray.push(...((_sort$trim = sort.trim()) === null || _sort$trim === void 0 ? void 0 : _sort$trim.split(',').map(sortKey => {
|
|
159
|
+
paramsArray.push(...sort.trim()?.split(',').map(sortKey => {
|
|
169
160
|
const descending = sortKey.startsWith('-');
|
|
170
161
|
let term = sortKey.replace('-', '');
|
|
171
162
|
if (term in sortKeys) {
|
|
172
163
|
term = term.replace(term, sortKeys[term]);
|
|
173
164
|
}
|
|
174
|
-
const sortString =
|
|
175
|
-
return
|
|
176
|
-
}))
|
|
165
|
+
const sortString = `${term};${descending ? 'desc' : 'asc'}`;
|
|
166
|
+
return `sort=${conditionalEncodeURIComponent(sortString, encode)}`;
|
|
167
|
+
}));
|
|
177
168
|
}
|
|
178
169
|
if (stats) {
|
|
179
170
|
paramsArray.push('stats=true');
|
|
180
171
|
}
|
|
181
172
|
for (const [key, value] of Object.entries(rest)) {
|
|
182
|
-
paramsArray.push(
|
|
173
|
+
paramsArray.push(`${key}=${conditionalEncodeURIComponent(value, encode)}`);
|
|
183
174
|
}
|
|
184
175
|
return paramsArray;
|
|
185
176
|
};
|
|
186
|
-
var _default = generateKiwtQueryParams;
|
|
187
|
-
exports.default = _default;
|
|
177
|
+
var _default = exports.default = generateKiwtQueryParams;
|
|
@@ -7,14 +7,12 @@ exports.default = void 0;
|
|
|
7
7
|
const groupCustomPropertiesByCtx = function () {
|
|
8
8
|
let customProperties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
9
9
|
return customProperties.reduce((acc, curr) => {
|
|
10
|
-
|
|
11
|
-
const ctx = (_curr$ctx = curr.ctx) !== null && _curr$ctx !== void 0 ? _curr$ctx : 'isNull';
|
|
10
|
+
const ctx = curr.ctx ?? 'isNull';
|
|
12
11
|
const returnObj = {
|
|
13
12
|
...acc
|
|
14
13
|
};
|
|
15
|
-
returnObj[ctx] = [...(
|
|
14
|
+
returnObj[ctx] = [...(acc?.[ctx] ?? []), curr];
|
|
16
15
|
return returnObj;
|
|
17
16
|
}, {});
|
|
18
17
|
};
|
|
19
|
-
var _default = groupCustomPropertiesByCtx;
|
|
20
|
-
exports.default = _default;
|
|
18
|
+
var _default = exports.default = groupCustomPropertiesByCtx;
|
|
@@ -8,7 +8,7 @@ var _escapeRegExp = _interopRequireDefault(require("lodash/escapeRegExp"));
|
|
|
8
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
9
|
const matchString = function (match, str) {
|
|
10
10
|
let ignoreNull = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
11
|
-
const regex = new RegExp(
|
|
11
|
+
const regex = new RegExp(`${match.split(/(\s+)/).filter(h => h.trim()).map(hl => '(' + (0, _escapeRegExp.default)(hl) + ')').join('|')}`, 'gi');
|
|
12
12
|
if (ignoreNull && !match) {
|
|
13
13
|
const nullRegex = /a^/gi; // Should match nothing
|
|
14
14
|
|
|
@@ -16,5 +16,4 @@ const matchString = function (match, str) {
|
|
|
16
16
|
}
|
|
17
17
|
return [str.split(regex), regex];
|
|
18
18
|
};
|
|
19
|
-
var _default = matchString;
|
|
20
|
-
exports.default = _default;
|
|
19
|
+
var _default = exports.default = matchString;
|
|
@@ -5,10 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
const parseErrorResponse = async responseObj => {
|
|
8
|
-
var _ref, _ref$find;
|
|
9
8
|
let errorResp;
|
|
10
|
-
const code = responseObj
|
|
11
|
-
const contentType =
|
|
9
|
+
const code = responseObj?.status;
|
|
10
|
+
const contentType = [...responseObj?.headers]?.find(header => header[0] === 'content-type')?.[1];
|
|
12
11
|
if (contentType.includes('json')) {
|
|
13
12
|
errorResp = await responseObj.json();
|
|
14
13
|
} else {
|
|
@@ -26,5 +25,4 @@ const parseErrorResponse = async responseObj => {
|
|
|
26
25
|
}
|
|
27
26
|
return errorResp;
|
|
28
27
|
};
|
|
29
|
-
var _default = parseErrorResponse;
|
|
30
|
-
exports.default = _default;
|
|
28
|
+
var _default = exports.default = parseErrorResponse;
|
|
@@ -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
|
|
@@ -90,5 +89,4 @@ const parseKiwtQueryGroups = query => {
|
|
|
90
89
|
}
|
|
91
90
|
return outputGroups;
|
|
92
91
|
};
|
|
93
|
-
var _default = parseKiwtQueryGroups;
|
|
94
|
-
exports.default = _default;
|
|
92
|
+
var _default = exports.default = parseKiwtQueryGroups;
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _default = {
|
|
7
|
+
var _default = exports.default = {
|
|
8
8
|
filterKeys: {
|
|
9
9
|
DescKey: 'desc'
|
|
10
10
|
},
|
|
@@ -13,5 +13,4 @@ var _default = {
|
|
|
13
13
|
}],
|
|
14
14
|
stats: false,
|
|
15
15
|
max: 100
|
|
16
|
-
};
|
|
17
|
-
exports.default = _default;
|
|
16
|
+
};
|