@k-int/stripes-kint-components 4.7.2 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +14 -2
- package/README.md +1 -1
- package/es/index.js +11 -6
- package/es/lib/ActionList/ActionList.js +1 -2
- package/es/lib/ActionList/ActionListFieldArray.js +3 -4
- package/es/lib/ComboButton/ComboButton.js +1 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +2 -3
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +4 -5
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +4 -4
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +1 -2
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +4 -5
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +2 -3
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +10 -10
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -2
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +1 -2
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +2 -3
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +4 -5
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +4 -5
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +15 -13
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +1 -2
- package/es/lib/CustomProperties/Edit/testResources.js +6 -8
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +2 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +4 -4
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +1 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +1 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +4 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +1 -2
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +3 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +3 -4
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +33 -18
- package/es/lib/CustomProperties/Filter/testResources.js +6 -9
- package/es/lib/CustomProperties/Filter/useOperators.js +1 -2
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -2
- package/es/lib/CustomProperties/Filter/useValueProps.js +1 -2
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -2
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +9 -10
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +1 -2
- package/es/lib/CustomProperties/View/testResources.js +5 -9
- package/es/lib/CycleButton/CycleButton.js +1 -2
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +6 -7
- package/es/lib/EditableRefdataList/EditableRefdataList.js +7 -8
- package/es/lib/EditableSettingsList/EditableSettingsList.js +1 -2
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -2
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +1 -2
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +3 -4
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +1 -2
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +7 -5
- package/es/lib/FormModal/FormModal.js +1 -2
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +1 -2
- package/es/lib/IconSelect/IconSelect.js +1 -2
- package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -2
- package/es/lib/QueryTypedown/QueryTypedown.js +1 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +1 -2
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +2 -3
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +3 -4
- package/es/lib/RichSelect/RichSelect.js +1 -2
- package/es/lib/RichSelect/useSelectedOption.js +1 -2
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +1 -2
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +2 -3
- package/es/lib/SASQRoute/SASQRoute.js +1 -2
- package/es/lib/SASQViewComponent/SASQViewComponent.js +3 -4
- package/es/lib/SearchField/SearchField.js +1 -2
- package/es/lib/SettingPage/SettingPage.js +1 -2
- package/es/lib/SettingPage/SettingPagePane.js +1 -2
- package/es/lib/SettingsFormContainer/SettingsFormContainer.js +1 -2
- package/es/lib/Typedown/Typedown.js +5 -6
- package/es/lib/constants/comparators.js +7 -0
- 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 +1 -2
- package/es/lib/hooks/typedownHooks/useTypedownData.js +1 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +1 -2
- package/es/lib/hooks/useActiveElement.js +1 -2
- package/es/lib/hooks/useCustomProperties.js +1 -2
- package/es/lib/hooks/useHelperApp.js +1 -2
- package/es/lib/hooks/useIntlKey.js +1 -2
- package/es/lib/hooks/useIntlKeyStore.js +1 -2
- package/es/lib/hooks/useInvalidateRefdata.js +1 -2
- package/es/lib/hooks/useKintIntl.js +1 -2
- package/es/lib/hooks/useKiwtFieldArray.js +1 -2
- package/es/lib/hooks/useKiwtSASQuery.js +2 -5
- package/es/lib/hooks/useLocalStorageState.js +1 -2
- package/es/lib/hooks/useModConfigEntries.js +1 -2
- package/es/lib/hooks/useMutateCustomProperties.js +1 -2
- package/es/lib/hooks/useMutateModConfigEntry.js +1 -2
- package/es/lib/hooks/useMutateRefdataCategory.js +1 -2
- package/es/lib/hooks/useMutateRefdataValue.js +1 -2
- package/es/lib/hooks/useQIndex.js +1 -2
- package/es/lib/hooks/useRefdata.js +1 -2
- package/es/lib/hooks/useSASQQueryMeta.js +1 -2
- package/es/lib/hooks/useTemplates.js +1 -2
- package/es/lib/settingsHooks/useAppSettings.js +2 -3
- package/es/lib/settingsHooks/useSettingSection.js +1 -2
- package/es/lib/settingsHooks/useSettings.js +1 -2
- package/es/lib/utils/buildUrl.js +6 -10
- package/es/lib/utils/filterParsers/deparseKiwtQueryFilters.js +36 -0
- package/es/lib/utils/filterParsers/index.js +48 -0
- package/es/lib/utils/filterParsers/parseKiwtQueryFilters.js +47 -0
- package/es/lib/utils/{parseKiwtQueryGroups.js → filterParsers/parseKiwtQueryGroups.js} +4 -5
- package/es/lib/utils/filterParsers/parseKiwtQueryString.js +34 -0
- package/es/lib/utils/generateKiwtQuery.js +1 -2
- package/es/lib/utils/generateKiwtQueryParams.js +20 -18
- package/es/lib/utils/groupCustomPropertiesByCtx.js +1 -2
- package/es/lib/utils/index.js +32 -2
- package/es/lib/utils/matchString.js +1 -2
- package/es/lib/utils/modConfigEntriesQueryKey.js +1 -2
- package/es/lib/utils/parseErrorResponse.js +3 -4
- 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 +5 -6
- package/es/lib/utils/sortByLabel.js +1 -2
- package/es/lib/utils/toCamelCase.js +1 -2
- package/es/lib/utils/typedownQueryKey.js +1 -2
- package/junit.xml +160 -160
- package/package.json +12 -30
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +7 -4
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionTrigger.js.html +418 -0
- 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 +568 -0
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/index.html +131 -0
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/index.js.html +88 -0
- 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/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 +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +10 -10
- 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 +15 -15
- 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/SettingsActionList/EditSettingValue.js.html +514 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/RenderSettingValue.js.html +358 -0
- package/src/artifacts/coverage-jest/lcov-report/{CustomProperties/Config/testResources.js.html → SettingsActionList/SettingsActionList.js.html} +256 -313
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/index.html +161 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/SettingsFormContainer.js.html +82 -10
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.html +15 -15
- 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 +121 -0
- 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 +16 -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/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 +2 -2
- 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 +65 -35
- 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 +6 -18
- package/src/artifacts/coverage-jest/lcov-report/utils/{renderHelpText.js.html → filterParsers/deparseKiwtQueryFilters.js.html} +62 -47
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/index.html +176 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/index.js.html +124 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryFilters.js.html +211 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryGroups.js.html +367 -0
- package/src/artifacts/coverage-jest/lcov-report/{hooks/useAvailableCustomProperties.js.html → utils/filterParsers/parseKiwtQueryString.js.html} +56 -77
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +13 -7
- 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 +13 -28
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +24 -3
- 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 +1 -1
- 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/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 +471 -272
- package/src/index.js +1 -2
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +1 -1
- package/src/lib/CustomProperties/Config/CustomPropertyForm.test.js +1 -2
- package/src/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +1 -1
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +1 -1
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +2 -3
- package/src/lib/CustomProperties/Edit/CustomPropertyField.test.js +15 -6
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +1 -1
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +2 -5
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +1 -1
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +27 -12
- package/src/lib/CustomProperties/View/CustomPropertiesView.test.js +1 -1
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +1 -1
- package/src/lib/EditableSettingsList/SettingField/SettingField.test.js +4 -5
- package/src/lib/constants/comparators.js +12 -0
- package/src/lib/hooks/useKiwtSASQuery.js +1 -1
- package/src/lib/utils/buildUrl.js +1 -5
- package/src/lib/utils/filterParsers/deparseKiwtQueryFilters.js +32 -0
- package/src/lib/utils/filterParsers/index.js +13 -0
- package/src/lib/utils/filterParsers/parseKiwtQueryFilters.js +42 -0
- package/src/lib/utils/{parseKiwtQueryGroups.js → filterParsers/parseKiwtQueryGroups.js} +3 -1
- package/src/lib/utils/filterParsers/parseKiwtQueryString.js +33 -0
- package/src/lib/utils/generateKiwtQueryParams.js +6 -4
- package/src/lib/utils/index.js +8 -1
- package/test/jest/helpers/renderWithKintHarness.js +1 -1
- /package/es/lib/utils/{parseKiwtQueryGroups.test.js → filterParsers/parseKiwtQueryGroups.test.js} +0 -0
- /package/src/lib/utils/{parseKiwtQueryGroups.test.js → filterParsers/parseKiwtQueryGroups.test.js} +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "deparseKiwtQueryFilters", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _deparseKiwtQueryFilters.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "deparseKiwtQueryFiltersObject", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _deparseKiwtQueryFilters.deparseKiwtQueryFiltersObject;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "parseKiwtQueryFilters", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _parseKiwtQueryFilters.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "parseKiwtQueryFiltersRecursive", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _parseKiwtQueryFilters.parseKiwtQueryFiltersRecursive;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "parseKiwtQueryGroups", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _parseKiwtQueryGroups.default;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "parseKiwtQueryString", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _parseKiwtQueryString.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
var _parseKiwtQueryGroups = _interopRequireDefault(require("./parseKiwtQueryGroups"));
|
|
43
|
+
var _parseKiwtQueryString = _interopRequireDefault(require("./parseKiwtQueryString"));
|
|
44
|
+
var _parseKiwtQueryFilters = _interopRequireWildcard(require("./parseKiwtQueryFilters"));
|
|
45
|
+
var _deparseKiwtQueryFilters = _interopRequireWildcard(require("./deparseKiwtQueryFilters"));
|
|
46
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
47
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
48
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.parseKiwtQueryFiltersRecursive = exports.default = void 0;
|
|
7
|
+
var _parseKiwtQueryGroups = _interopRequireDefault(require("./parseKiwtQueryGroups"));
|
|
8
|
+
var _parseKiwtQueryString = _interopRequireDefault(require("./parseKiwtQueryString"));
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
// This is an amalgam of parseKiwtQueryGroups, which splits up grouped queries
|
|
11
|
+
// and parseKiwtQueryString, which figures out comparator vs attribute, etc
|
|
12
|
+
|
|
13
|
+
// This will handle the nested recursion logic, switching between String and Array
|
|
14
|
+
const parseKiwtQueryFiltersRecursive = query => {
|
|
15
|
+
if (Array.isArray(query)) {
|
|
16
|
+
return query.map(q => parseKiwtQueryFiltersRecursive(q));
|
|
17
|
+
} else if (typeof query === 'string') {
|
|
18
|
+
if (query === '&&' || query === '||') {
|
|
19
|
+
return query;
|
|
20
|
+
} else {
|
|
21
|
+
return (0, _parseKiwtQueryString.default)(query);
|
|
22
|
+
}
|
|
23
|
+
} else {
|
|
24
|
+
throw new Error("Unexpected query type: ".concat(query));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// This accepts a STRING only
|
|
29
|
+
exports.parseKiwtQueryFiltersRecursive = parseKiwtQueryFiltersRecursive;
|
|
30
|
+
const parseKiwtQueryFilters = queryString => {
|
|
31
|
+
if (typeof queryString === 'string') {
|
|
32
|
+
// parseKiwtQueryGroups already recurses, so we know is the right shape all the way down
|
|
33
|
+
const queryGroups = (0, _parseKiwtQueryGroups.default)(queryString);
|
|
34
|
+
return parseKiwtQueryFiltersRecursive(queryGroups);
|
|
35
|
+
} else {
|
|
36
|
+
throw new Error("parseKiwtQuery expects a parameter of type String, passed: ".concat(queryString));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/* RETURN SHAPE
|
|
41
|
+
* This will return nested arrays of Objects, Strings and Arrays.
|
|
42
|
+
* Each array refers to a bracketed group
|
|
43
|
+
* Each object is a single query value (attribute, comparator and value)
|
|
44
|
+
* Each string should be boolean && or ||
|
|
45
|
+
* To be read from left to right
|
|
46
|
+
*/
|
|
47
|
+
var _default = exports.default = parseKiwtQueryFilters;
|
|
@@ -33,7 +33,7 @@ const parseKiwtQueryGroups = query => {
|
|
|
33
33
|
// but Webkit hasn't implemented look-behind yet so that breaks Safari.
|
|
34
34
|
// https://bugs.webkit.org/show_bug.cgi?id=174931
|
|
35
35
|
// <sigh>
|
|
36
|
-
const splitString = query.split(/(\|\||&&|\(|\))/).filter(Boolean);
|
|
36
|
+
const splitString = query.split(/(\|\||&&|\(|\))/).map(ss => ss.trim()).filter(Boolean);
|
|
37
37
|
|
|
38
38
|
// Keep track of what to skip over when we return from each level of nesting
|
|
39
39
|
let skipCount = [0];
|
|
@@ -44,7 +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 === null || parseArray === void 0
|
|
47
|
+
parseArray === null || parseArray === void 0 || parseArray.every((element, index) => {
|
|
48
48
|
var _skipCount;
|
|
49
49
|
if (skipCount[nestLevel] > 0) {
|
|
50
50
|
skipCount[nestLevel] -= 1;
|
|
@@ -64,7 +64,7 @@ const parseKiwtQueryGroups = query => {
|
|
|
64
64
|
return n;
|
|
65
65
|
});
|
|
66
66
|
if (element !== '(' && element !== ')') {
|
|
67
|
-
group === null || group === void 0
|
|
67
|
+
group === null || group === void 0 || group.push(element);
|
|
68
68
|
} else if (element === ')') {
|
|
69
69
|
// Remove the corresponding skipCount level because we're going down a nesting level
|
|
70
70
|
skipCount.pop();
|
|
@@ -90,5 +90,4 @@ const parseKiwtQueryGroups = query => {
|
|
|
90
90
|
}
|
|
91
91
|
return outputGroups;
|
|
92
92
|
};
|
|
93
|
-
var _default = parseKiwtQueryGroups;
|
|
94
|
-
exports.default = _default;
|
|
93
|
+
var _default = exports.default = parseKiwtQueryGroups;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _comparators = _interopRequireDefault(require("../../constants/comparators"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
/*
|
|
10
|
+
* This is designed to take a SINGLE query string of the form
|
|
11
|
+
* attribute == value, or attribute isEmpty, or attribute ~= value, etc
|
|
12
|
+
*
|
|
13
|
+
* Will return an object: {path: 'attribute', comparator: '==', value: 'value'}
|
|
14
|
+
*/ // No magic numbers sonarlint -.-
|
|
15
|
+
const FIRST = 0;
|
|
16
|
+
const SECOND = 1;
|
|
17
|
+
const THIRD = 2;
|
|
18
|
+
const parseKiwtQueryString = queryString => {
|
|
19
|
+
const comparatorMatch = new RegExp("(".concat(_comparators.default.join('|'), ")"));
|
|
20
|
+
// See parseKiwtQueryGroups for breakdown of why this filter is needed
|
|
21
|
+
const splitString = queryString.split(comparatorMatch).map(ss => ss.trim()).filter(Boolean);
|
|
22
|
+
|
|
23
|
+
/*
|
|
24
|
+
* As far as I can tell, with input of a SINGLE query string at a time,
|
|
25
|
+
* with 2 entries we will have a special case comparator, with 3 we
|
|
26
|
+
* have a comparator, attribute and value.. value can be null in those cases
|
|
27
|
+
*/
|
|
28
|
+
return {
|
|
29
|
+
path: splitString[FIRST],
|
|
30
|
+
comparator: splitString[SECOND],
|
|
31
|
+
value: splitString[THIRD]
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
var _default = exports.default = parseKiwtQueryString;
|
|
@@ -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;
|
|
@@ -11,6 +11,9 @@ const conditionalEncodeURIComponent = function (str) {
|
|
|
11
11
|
}
|
|
12
12
|
return str;
|
|
13
13
|
};
|
|
14
|
+
|
|
15
|
+
// TODO might be nice to allow for filterOptions to be of the shape of parsedKiwtQueryFilters,
|
|
16
|
+
// so we can make use of the deparser there optionally for built in query grouping
|
|
14
17
|
const buildFilterOptionBlock = function (opf) {
|
|
15
18
|
let isNested = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
16
19
|
let encode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
@@ -22,13 +25,13 @@ const buildFilterOptionBlock = function (opf) {
|
|
|
22
25
|
|
|
23
26
|
// First check whether groupValues is ANDed or ORed together
|
|
24
27
|
if (groupValues !== null && groupValues !== void 0 && groupValues.AND && Array.isArray(groupValues.AND) || groupValues !== null && groupValues !== void 0 && groupValues.OR && Array.isArray(groupValues.OR)) {
|
|
25
|
-
var _groupValues$OR
|
|
28
|
+
var _groupValues$OR;
|
|
26
29
|
// AND takes precedence
|
|
27
30
|
if (groupValues.AND) {
|
|
28
|
-
var _groupValues$AND
|
|
29
|
-
return negationAndNesting(groupValues === null || groupValues === void 0
|
|
31
|
+
var _groupValues$AND;
|
|
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
33
|
}
|
|
31
|
-
return negationAndNesting(groupValues === null || groupValues === void 0
|
|
34
|
+
return negationAndNesting(groupValues === null || groupValues === void 0 || (_groupValues$OR = groupValues.OR) === null || _groupValues$OR === void 0 || (_groupValues$OR = _groupValues$OR.map(gvo => buildFilterOptionBlock(gvo, true, encode))) === null || _groupValues$OR === void 0 ? void 0 : _groupValues$OR.join('||'));
|
|
32
35
|
}
|
|
33
36
|
// If neither valid OR nor AND exist, ignore the block
|
|
34
37
|
} else if (opf !== null && opf !== void 0 && opf.values) {
|
|
@@ -105,8 +108,8 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
105
108
|
} = options;
|
|
106
109
|
const paramsArray = [];
|
|
107
110
|
if (query) {
|
|
108
|
-
var _split;
|
|
109
|
-
paramsArray.push(...((_split = (qindex || searchKey).split(','))
|
|
111
|
+
var _split, _ref;
|
|
112
|
+
paramsArray.push(...((_split = (_ref = qindex || searchKey) === null || _ref === void 0 ? void 0 : _ref.split(',')) !== null && _split !== void 0 ? _split : []).map(m => "match=".concat(conditionalEncodeURIComponent(m, encode))));
|
|
110
113
|
paramsArray.push("term=".concat(conditionalEncodeURIComponent(query, encode)));
|
|
111
114
|
}
|
|
112
115
|
|
|
@@ -122,29 +125,29 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
122
125
|
if (filters) {
|
|
123
126
|
const filterMap = {};
|
|
124
127
|
filters.split(',').forEach(filter => {
|
|
125
|
-
var _filter$trim;
|
|
126
|
-
const [filterName, ...filterRest] = (_filter$trim = filter.trim()) === null || _filter$trim === void 0 ? void 0 : _filter$trim.split('.');
|
|
128
|
+
var _filter$trim$split, _filter$trim;
|
|
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 : [];
|
|
127
130
|
const filterValue = filterRest.join('.');
|
|
128
131
|
if (filterMap[filterName] === undefined) filterMap[filterName] = [];
|
|
129
132
|
filterMap[filterName].push(filterValue);
|
|
130
133
|
});
|
|
131
134
|
|
|
132
135
|
// We now have a filterMap of shape { status: ['active', 'cancelled'], type: ['local'] }
|
|
133
|
-
Object.entries(filterMap).forEach(
|
|
134
|
-
let [filterName, filterValues] =
|
|
136
|
+
Object.entries(filterMap).forEach(_ref2 => {
|
|
137
|
+
let [filterName, filterValues] = _ref2;
|
|
135
138
|
const filterConfigEntry = filterConfig.find(conf => conf.name === filterName);
|
|
136
139
|
const filterKey = filterKeys[filterName];
|
|
137
140
|
if (filterConfigEntry) {
|
|
138
141
|
// We have a direct mapping instruction, use it
|
|
139
142
|
const filterString = filterValues.map(v => {
|
|
140
|
-
var _filterConfigEntry$va
|
|
141
|
-
const fceValue = filterConfigEntry === null || filterConfigEntry === void 0
|
|
143
|
+
var _filterConfigEntry$va;
|
|
144
|
+
const fceValue = filterConfigEntry === null || filterConfigEntry === void 0 || (_filterConfigEntry$va = filterConfigEntry.values) === null || _filterConfigEntry$va === void 0 || (_filterConfigEntry$va = _filterConfigEntry$va.find(fce => fce.name === v)) === null || _filterConfigEntry$va === void 0 ? void 0 : _filterConfigEntry$va.value;
|
|
142
145
|
return "".concat(filterName, "==").concat(fceValue !== null && fceValue !== void 0 ? fceValue : v);
|
|
143
146
|
}).join('||');
|
|
144
147
|
paramsArray.push("filters=".concat(conditionalEncodeURIComponent(filterString, encode)));
|
|
145
148
|
} else if (!filterKey) {
|
|
146
149
|
// These filters have no key mapping so we just pass the values to the backend as-is.
|
|
147
|
-
paramsArray.push(...(filterValues
|
|
150
|
+
paramsArray.push(...(filterValues !== null && filterValues !== void 0 ? filterValues : []).map(f => "filters=".concat(conditionalEncodeURIComponent(f, encode))));
|
|
148
151
|
} else {
|
|
149
152
|
const filterString = filterValues.map(v => "".concat(filterKey, "==").concat(v)).join('||');
|
|
150
153
|
paramsArray.push("filters=".concat(conditionalEncodeURIComponent(filterString, encode)));
|
|
@@ -164,8 +167,8 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
164
167
|
});
|
|
165
168
|
}
|
|
166
169
|
if (sort) {
|
|
167
|
-
var _sort$trim;
|
|
168
|
-
paramsArray.push(...((_sort$trim = sort.trim()) === null || _sort$trim === void 0 ? void 0 : _sort$trim.split(',').map(sortKey => {
|
|
170
|
+
var _sort$trim$split, _sort$trim;
|
|
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 => {
|
|
169
172
|
const descending = sortKey.startsWith('-');
|
|
170
173
|
let term = sortKey.replace('-', '');
|
|
171
174
|
if (term in sortKeys) {
|
|
@@ -173,7 +176,7 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
173
176
|
}
|
|
174
177
|
const sortString = "".concat(term, ";").concat(descending ? 'desc' : 'asc');
|
|
175
178
|
return "sort=".concat(conditionalEncodeURIComponent(sortString, encode));
|
|
176
|
-
}))
|
|
179
|
+
}));
|
|
177
180
|
}
|
|
178
181
|
if (stats) {
|
|
179
182
|
paramsArray.push('stats=true');
|
|
@@ -183,5 +186,4 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
183
186
|
}
|
|
184
187
|
return paramsArray;
|
|
185
188
|
};
|
|
186
|
-
var _default = generateKiwtQueryParams;
|
|
187
|
-
exports.default = _default;
|
|
189
|
+
var _default = exports.default = generateKiwtQueryParams;
|
package/es/lib/utils/index.js
CHANGED
|
@@ -15,6 +15,18 @@ Object.defineProperty(exports, "buildUrl", {
|
|
|
15
15
|
return _buildUrl.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
+
Object.defineProperty(exports, "deparseKiwtQueryFilters", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _filterParsers.deparseKiwtQueryFilters;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "deparseKiwtQueryFiltersObject", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _filterParsers.deparseKiwtQueryFiltersObject;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
18
30
|
Object.defineProperty(exports, "generateKiwtQuery", {
|
|
19
31
|
enumerable: true,
|
|
20
32
|
get: function () {
|
|
@@ -57,10 +69,28 @@ Object.defineProperty(exports, "parseErrorResponse", {
|
|
|
57
69
|
return _parseErrorResponse.default;
|
|
58
70
|
}
|
|
59
71
|
});
|
|
72
|
+
Object.defineProperty(exports, "parseKiwtQueryFilters", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function () {
|
|
75
|
+
return _filterParsers.parseKiwtQueryFilters;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "parseKiwtQueryFiltersRecursive", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function () {
|
|
81
|
+
return _filterParsers.parseKiwtQueryFiltersRecursive;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
60
84
|
Object.defineProperty(exports, "parseKiwtQueryGroups", {
|
|
61
85
|
enumerable: true,
|
|
62
86
|
get: function () {
|
|
63
|
-
return
|
|
87
|
+
return _filterParsers.parseKiwtQueryGroups;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
Object.defineProperty(exports, "parseKiwtQueryString", {
|
|
91
|
+
enumerable: true,
|
|
92
|
+
get: function () {
|
|
93
|
+
return _filterParsers.parseKiwtQueryString;
|
|
64
94
|
}
|
|
65
95
|
});
|
|
66
96
|
Object.defineProperty(exports, "parseModConfigEntry", {
|
|
@@ -117,7 +147,7 @@ var _sortByLabel = _interopRequireDefault(require("./sortByLabel"));
|
|
|
117
147
|
var _toCamelCase = _interopRequireDefault(require("./toCamelCase"));
|
|
118
148
|
var _matchString = _interopRequireDefault(require("./matchString"));
|
|
119
149
|
var _highlightString = require("./highlightString");
|
|
120
|
-
var
|
|
150
|
+
var _filterParsers = require("./filterParsers");
|
|
121
151
|
var _parseErrorResponse = _interopRequireDefault(require("./parseErrorResponse"));
|
|
122
152
|
var _modConfigEntriesQueryKey = _interopRequireDefault(require("./modConfigEntriesQueryKey"));
|
|
123
153
|
var _parseModConfigEntry = _interopRequireDefault(require("./parseModConfigEntry"));
|
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
const parseErrorResponse = async responseObj => {
|
|
8
|
-
var _ref
|
|
8
|
+
var _ref;
|
|
9
9
|
let errorResp;
|
|
10
10
|
const code = responseObj === null || responseObj === void 0 ? void 0 : responseObj.status;
|
|
11
|
-
const contentType = (_ref = [...(responseObj === null || responseObj === void 0 ? void 0 : responseObj.headers)]) === null || _ref === void 0
|
|
11
|
+
const contentType = (_ref = [...(responseObj === null || responseObj === void 0 ? void 0 : responseObj.headers)]) === null || _ref === void 0 || (_ref = _ref.find(header => header[0] === 'content-type')) === null || _ref === void 0 ? void 0 : _ref[1];
|
|
12
12
|
if (contentType.includes('json')) {
|
|
13
13
|
errorResp = await responseObj.json();
|
|
14
14
|
} else {
|
|
@@ -26,5 +26,4 @@ const parseErrorResponse = async responseObj => {
|
|
|
26
26
|
}
|
|
27
27
|
return errorResp;
|
|
28
28
|
};
|
|
29
|
-
var _default = parseErrorResponse;
|
|
30
|
-
exports.default = _default;
|
|
29
|
+
var _default = exports.default = parseErrorResponse;
|
|
@@ -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
|
+
};
|
|
@@ -5,14 +5,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
const selectorSafe = string => {
|
|
8
|
-
var _string$normalize
|
|
8
|
+
var _string$normalize;
|
|
9
9
|
// Normalise to separate diacritics from their base characters as "marks"
|
|
10
10
|
// then strip out all marks.
|
|
11
|
-
return (_string$normalize = string.normalize('NFKD')) === null || _string$normalize === void 0
|
|
11
|
+
return (_string$normalize = string.normalize('NFKD')) === null || _string$normalize === void 0 || (_string$normalize = _string$normalize.replace(/\p{M}/gu, '')
|
|
12
12
|
// Then swap out any non-letter/number characters (Also ignore - and _) for `_`
|
|
13
|
-
) === null || _string$normalize
|
|
13
|
+
) === null || _string$normalize === void 0 ? void 0 : _string$normalize.replace(/[^\p{L}\p{N}\-_]/gu, '_');
|
|
14
14
|
};
|
|
15
|
-
var _default = selectorSafe;
|
|
15
|
+
var _default = exports.default = selectorSafe;
|
|
16
16
|
/*
|
|
17
17
|
* Should transform as follows:
|
|
18
18
|
* %%&&||()_-*^%$£"!:;@'~#<>/??|\ --> _________-____________________
|
|
@@ -22,5 +22,4 @@ var _default = selectorSafe;
|
|
|
22
22
|
* æøß --> æøß
|
|
23
23
|
* How do we handle numbers 00!1 --> how_do_we_handle_numbers_00_1
|
|
24
24
|
* This is a normal case --> this_is_a_normal_case
|
|
25
|
-
*/
|
|
26
|
-
exports.default = _default;
|
|
25
|
+
*/
|
|
@@ -11,5 +11,4 @@ str.split(/(?=[A-Z])/).join(' ')
|
|
|
11
11
|
.replace(/[_]/gi, ' ').replace(/[^0-9a-zA-Z\s]/gi, '')
|
|
12
12
|
// CamelCase the remains
|
|
13
13
|
.replace(/(?:^\w|[A-Z]|\b\w)/g, (ltr, idx) => idx === 0 ? ltr.toLowerCase() : ltr.toUpperCase()).replace(/\s+/g, '');
|
|
14
|
-
var _default = toCamelCase;
|
|
15
|
-
exports.default = _default;
|
|
14
|
+
var _default = exports.default = toCamelCase;
|