@k-int/stripes-kint-components 5.1.1 → 5.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/es/index.js +2 -2
- package/es/lib/ActionList/ActionList.js +2 -2
- package/es/lib/ActionList/ActionListFieldArray.js +31 -34
- package/es/lib/ComboButton/ComboButton.js +5 -6
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +4 -7
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +29 -32
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +58 -58
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +2 -2
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +32 -33
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +3 -3
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +8 -10
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +22 -28
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +5 -5
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -2
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -3
- package/es/lib/CustomProperties/Edit/testResources.js +11 -12
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +6 -11
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +20 -28
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +8 -8
- package/es/lib/CustomProperties/Filter/testResources.js +1 -2
- package/es/lib/CustomProperties/Filter/useOperators.js +2 -2
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +1 -2
- package/es/lib/CustomProperties/Filter/useValueProps.js +2 -2
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +18 -26
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +9 -13
- package/es/lib/CycleButton/CycleButton.js +1 -1
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +23 -34
- package/es/lib/EditableRefdataList/EditableRefdataList.js +28 -35
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +1 -1
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +5 -5
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +10 -12
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +6 -6
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +4 -7
- package/es/lib/IconSelect/IconSelect.js +7 -11
- package/es/lib/NoResultsMessage/NoResultsMessage.js +4 -4
- package/es/lib/QueryTypedown/QueryTypedown.js +2 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +3 -3
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +21 -28
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +5 -6
- package/es/lib/RichSelect/RichSelect.js +14 -19
- package/es/lib/RichSelect/useSelectedOption.js +1 -2
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +14 -17
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +4 -6
- package/es/lib/SASQRoute/SASQRoute.js +2 -2
- package/es/lib/SASQViewComponent/SASQViewComponent.js +5 -9
- package/es/lib/SettingPage/SettingPage.js +2 -2
- package/es/lib/SettingPage/SettingPagePane.js +2 -2
- package/es/lib/SettingsFormContainer/SettingsFormContainer.js +2 -2
- package/es/lib/Typedown/Typedown.js +21 -28
- package/es/lib/hooks/typedownHooks/useTypedown.js +2 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
- package/es/lib/hooks/useActiveElement.js +1 -1
- package/es/lib/hooks/useCustomProperties.js +2 -2
- package/es/lib/hooks/useHelperApp.js +8 -8
- package/es/lib/hooks/useIntlKeyStore.js +4 -7
- package/es/lib/hooks/useKintIntl.js +5 -11
- package/es/lib/hooks/useKiwtSASQuery.js +1 -1
- package/es/lib/hooks/useLocalStorageState.js +2 -2
- package/es/lib/hooks/useModConfigEntries.js +2 -2
- package/es/lib/hooks/useMutateCustomProperties.js +8 -8
- package/es/lib/hooks/useMutateModConfigEntry.js +2 -2
- package/es/lib/hooks/useMutateRefdataCategory.js +4 -4
- package/es/lib/hooks/useMutateRefdataValue.js +6 -6
- package/es/lib/hooks/useQIndex.js +7 -7
- package/es/lib/hooks/useRefdata.js +3 -3
- package/es/lib/hooks/useTemplates.js +4 -4
- package/es/lib/settingsHooks/useAppSettings.js +7 -11
- package/es/lib/settingsHooks/useSettingSection.js +2 -2
- package/es/lib/settingsHooks/useSettings.js +3 -3
- package/es/lib/utils/buildUrl.js +2 -3
- package/es/lib/utils/filterParsers/deparseKiwtQueryFilters.js +6 -6
- package/es/lib/utils/filterParsers/index.js +2 -2
- package/es/lib/utils/filterParsers/parseKiwtQueryFilters.js +2 -2
- package/es/lib/utils/filterParsers/parseKiwtQueryGroups.js +4 -5
- package/es/lib/utils/filterParsers/parseKiwtQueryString.js +1 -1
- package/es/lib/utils/generateKiwtQueryParams.js +28 -37
- package/es/lib/utils/groupCustomPropertiesByCtx.js +2 -3
- package/es/lib/utils/matchString.js +1 -1
- package/es/lib/utils/parseErrorResponse.js +2 -3
- package/es/lib/utils/selectorSafe.js +2 -3
- package/es/lib/utils/sortByLabel.js +2 -3
- package/es/lib/validators/validators.js +3 -3
- package/junit.xml +162 -162
- package/package.json +2 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/ComboButton.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ComboButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/{SettingsActionList/SettingsActionList.js.html → CustomProperties/Config/testResources.js.html} +313 -256
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +15 -6
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +10 -7
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/SettingsFormContainer.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingsFormContainer/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/comparators.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/endpoints.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +205 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useModConfigEntries.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateModConfigEntry.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/index.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/deparseKiwtQueryFilters.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryFilters.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryGroups.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/filterParsers/parseKiwtQueryString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/modConfigEntriesQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseModConfigEntry.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +166 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/validators/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov.info +231 -230
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +3 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +4 -3
- package/yarn-error.log +129 -0
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionTrigger.js.html +0 -418
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/EditSettingValue.js.html +0 -514
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/RenderSettingValue.js.html +0 -358
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/SettingsActionList/index.js.html +0 -88
|
@@ -17,7 +17,6 @@ var _TableBody = _interopRequireDefault(require("./TableBody"));
|
|
|
17
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
19
|
const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
20
|
-
var _totalData$pages$redu, _totalData$pages;
|
|
21
20
|
const {
|
|
22
21
|
children,
|
|
23
22
|
fetchParameters = {},
|
|
@@ -46,14 +45,14 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
46
45
|
0: namespace
|
|
47
46
|
} = (0, _core.useNamespace)();
|
|
48
47
|
const ky = (0, _core.useOkapiKy)();
|
|
49
|
-
const filterPaneVisibileKey =
|
|
48
|
+
const filterPaneVisibileKey = `${namespace}-${id}-filterPaneVisibility`;
|
|
50
49
|
const fetchPageData = _ref => {
|
|
51
50
|
let {
|
|
52
51
|
pageParam = 0
|
|
53
52
|
} = _ref;
|
|
54
53
|
const queryMap = fetchParameters.SASQ_MAP;
|
|
55
54
|
queryMap.offset = pageParam;
|
|
56
|
-
return ky(
|
|
55
|
+
return ky(`${fetchParameters.endpoint}${(0, _utils.generateKiwtQuery)(queryMap, query)}`).json();
|
|
57
56
|
};
|
|
58
57
|
const [filterPaneVisible, setFilterPaneVisible] = (0, _hooks.useLocalStorageState)(filterPaneVisibileKey, true);
|
|
59
58
|
const toggleFilterPane = () => setFilterPaneVisible(!filterPaneVisible);
|
|
@@ -73,8 +72,7 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
73
72
|
...restOfInfiniteQueryProps
|
|
74
73
|
}
|
|
75
74
|
}));
|
|
76
|
-
const data =
|
|
77
|
-
var _acc$results, _curr$results;
|
|
75
|
+
const data = totalData.pages?.reduce((acc, curr) => {
|
|
78
76
|
const newAcc = {
|
|
79
77
|
...acc
|
|
80
78
|
};
|
|
@@ -83,11 +81,11 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
83
81
|
newAcc[key] = value;
|
|
84
82
|
}
|
|
85
83
|
}
|
|
86
|
-
const newResults = [...(
|
|
87
|
-
newResults.push(...(
|
|
84
|
+
const newResults = [...(acc.results ?? [])];
|
|
85
|
+
newResults.push(...(curr.results ?? []));
|
|
88
86
|
newAcc.results = newResults;
|
|
89
87
|
return newAcc;
|
|
90
|
-
}, {})
|
|
88
|
+
}, {}) ?? {};
|
|
91
89
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.SearchAndSortQuery, {
|
|
92
90
|
initialSearchState: {
|
|
93
91
|
query: ''
|
|
@@ -109,7 +107,7 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
109
107
|
const searchHandlers = getSearchHandlers();
|
|
110
108
|
const disableReset = !filterChanged && !searchChanged;
|
|
111
109
|
const filterCount = activeFilters.string ? activeFilters.string.split(',').length : 0;
|
|
112
|
-
const Body = RenderBody
|
|
110
|
+
const Body = RenderBody ?? _TableBody.default;
|
|
113
111
|
const {
|
|
114
112
|
filterPaneFirstMenu,
|
|
115
113
|
filterPaneLastMenu,
|
|
@@ -131,12 +129,12 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
131
129
|
};
|
|
132
130
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_smartComponents.PersistedPaneset, {
|
|
133
131
|
appId: namespace,
|
|
134
|
-
id:
|
|
132
|
+
id: `${id}-paneset`,
|
|
135
133
|
...persistedPanesetProps,
|
|
136
134
|
children: [filterPaneVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, {
|
|
137
135
|
defaultWidth: "20%",
|
|
138
136
|
firstMenu: filterPaneFirstMenu ? filterPaneFirstMenu(internalStateProps) : null,
|
|
139
|
-
id:
|
|
137
|
+
id: `${id}-filter-pane`,
|
|
140
138
|
lastMenu: filterPaneLastMenu ? filterPaneLastMenu(internalStateProps) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PaneMenu, {
|
|
141
139
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.CollapseFilterPaneButton, {
|
|
142
140
|
onClick: toggleFilterPane
|
|
@@ -152,11 +150,10 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
152
150
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SearchField, {
|
|
153
151
|
ariaLabel: searchFieldAriaLabel,
|
|
154
152
|
autoFocus: true,
|
|
155
|
-
id:
|
|
153
|
+
id: `sasq-search-field-${id}`,
|
|
156
154
|
name: "query",
|
|
157
155
|
onChange: e => {
|
|
158
|
-
|
|
159
|
-
if ((_e$target = e.target) !== null && _e$target !== void 0 && _e$target.value) {
|
|
156
|
+
if (e.target?.value) {
|
|
160
157
|
searchHandlers.query(e); // SASQ needs the whole event here
|
|
161
158
|
} else {
|
|
162
159
|
searchHandlers.reset();
|
|
@@ -203,15 +200,15 @@ const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) =>
|
|
|
203
200
|
onClick: toggleFilterPane
|
|
204
201
|
})
|
|
205
202
|
}) : null,
|
|
206
|
-
id:
|
|
203
|
+
id: `${id}-main-pane`,
|
|
207
204
|
lastMenu: mainPaneLastMenu ? mainPaneLastMenu(internalStateProps) : null,
|
|
208
205
|
noOverflow: true,
|
|
209
206
|
padContent: false,
|
|
210
207
|
paneSub: kintIntl.formatKintMessage({
|
|
211
208
|
id: 'found#Values',
|
|
212
|
-
overrideValue: labelOverrides
|
|
209
|
+
overrideValue: labelOverrides?.foundValues
|
|
213
210
|
}, {
|
|
214
|
-
total: data
|
|
211
|
+
total: data?.total
|
|
215
212
|
}),
|
|
216
213
|
...restOfMainPaneProps,
|
|
217
214
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Body, {
|
|
@@ -11,7 +11,6 @@ var _NoResultsMessage = _interopRequireDefault(require("../../NoResultsMessage")
|
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
const TableBody = _ref => {
|
|
14
|
-
var _query$sort;
|
|
15
14
|
let {
|
|
16
15
|
data,
|
|
17
16
|
error,
|
|
@@ -30,7 +29,7 @@ const TableBody = _ref => {
|
|
|
30
29
|
toggleFilterPane,
|
|
31
30
|
query
|
|
32
31
|
} = _ref;
|
|
33
|
-
const sortOrder =
|
|
32
|
+
const sortOrder = query.sort ?? '';
|
|
34
33
|
const history = (0, _reactRouterDom.useHistory)();
|
|
35
34
|
const location = (0, _reactRouterDom.useLocation)();
|
|
36
35
|
const onNeedMoreData = (_askAmount, index) => {
|
|
@@ -47,7 +46,7 @@ const TableBody = _ref => {
|
|
|
47
46
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, {
|
|
48
47
|
autosize: true,
|
|
49
48
|
columnMapping: columnMapping,
|
|
50
|
-
contentData: data
|
|
49
|
+
contentData: data?.results,
|
|
51
50
|
hasMargin: true,
|
|
52
51
|
isEmptyMessage: /*#__PURE__*/(0, _jsxRuntime.jsx)(_NoResultsMessage.default, {
|
|
53
52
|
error,
|
|
@@ -61,16 +60,15 @@ const TableBody = _ref => {
|
|
|
61
60
|
toggleFilterPane
|
|
62
61
|
}),
|
|
63
62
|
isSelected: _ref2 => {
|
|
64
|
-
var _match$params;
|
|
65
63
|
let {
|
|
66
64
|
item
|
|
67
65
|
} = _ref2;
|
|
68
|
-
return item.id ===
|
|
66
|
+
return item.id === match?.params?.id;
|
|
69
67
|
},
|
|
70
68
|
onHeaderClick: onSort,
|
|
71
69
|
onNeedMoreData: onNeedMoreData,
|
|
72
70
|
onRowClick: (_e, rowData) => {
|
|
73
|
-
history.push(
|
|
71
|
+
history.push(`${path}/${rowData?.id}${location?.search}`);
|
|
74
72
|
},
|
|
75
73
|
pagingType: "click",
|
|
76
74
|
sortDirection: sortOrder.startsWith('-') ? 'descending' : 'ascending',
|
|
@@ -36,7 +36,7 @@ const SASQRoute = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
36
36
|
// Reinsert the SASQ_MAP
|
|
37
37
|
fetchParameters.SASQ_MAP = SASQ_MAP;
|
|
38
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
|
|
39
|
-
path:
|
|
39
|
+
path: `${path}/:id?`,
|
|
40
40
|
render: routeProps => {
|
|
41
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQLookupComponent.SASQLookupComponent, {
|
|
42
42
|
ref: lookupRef,
|
|
@@ -46,7 +46,7 @@ const SASQRoute = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
46
46
|
...props,
|
|
47
47
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactRouterDom.Switch, {
|
|
48
48
|
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
|
|
49
|
-
path:
|
|
49
|
+
path: `${path}/:id`,
|
|
50
50
|
render: innerProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQViewComponent.default, {
|
|
51
51
|
ref: viewRef,
|
|
52
52
|
...innerProps,
|
|
@@ -11,7 +11,6 @@ var _core = require("@folio/stripes/core");
|
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
13
|
const SASQViewComponent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
14
|
-
var _fetchParameters$item, _match$params, _match$params3;
|
|
15
14
|
let {
|
|
16
15
|
fetchParameters,
|
|
17
16
|
history,
|
|
@@ -27,22 +26,19 @@ const SASQViewComponent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
27
26
|
} = (0, _core.useNamespace)();
|
|
28
27
|
|
|
29
28
|
// If itemEndpoint is available, use that, otherwise use standard endpoint
|
|
30
|
-
const endpoint =
|
|
29
|
+
const endpoint = fetchParameters?.itemEndpoint ?? fetchParameters?.endpoint;
|
|
31
30
|
const queryNamespace = [namespace, 'SASQ'];
|
|
32
31
|
if (id) {
|
|
33
32
|
queryNamespace.push(id);
|
|
34
33
|
}
|
|
35
34
|
queryNamespace.push('view');
|
|
36
|
-
queryNamespace.push(match
|
|
35
|
+
queryNamespace.push(match?.params?.id);
|
|
37
36
|
const ky = (0, _core.useOkapiKy)();
|
|
38
37
|
const {
|
|
39
38
|
data = {},
|
|
40
39
|
...rest
|
|
41
|
-
} = (0, _reactQuery.useQuery)(queryNamespace, () => {
|
|
42
|
-
|
|
43
|
-
return ky("".concat(endpoint, "/").concat(match === null || match === void 0 || (_match$params2 = match.params) === null || _match$params2 === void 0 ? void 0 : _match$params2.id)).json();
|
|
44
|
-
}, {
|
|
45
|
-
enabled: !!(match !== null && match !== void 0 && (_match$params3 = match.params) !== null && _match$params3 !== void 0 && _match$params3.id)
|
|
40
|
+
} = (0, _reactQuery.useQuery)(queryNamespace, () => ky(`${endpoint}/${match?.params?.id}`).json(), {
|
|
41
|
+
enabled: !!match?.params?.id
|
|
46
42
|
});
|
|
47
43
|
(0, _react.useImperativeHandle)(ref, () => ({
|
|
48
44
|
queryProps: {
|
|
@@ -51,7 +47,7 @@ const SASQViewComponent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
51
47
|
}
|
|
52
48
|
}));
|
|
53
49
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ViewComponent, {
|
|
54
|
-
onClose: () => history.push(
|
|
50
|
+
onClose: () => history.push(`${path}${location.search}`),
|
|
55
51
|
queryProps: {
|
|
56
52
|
...rest
|
|
57
53
|
},
|
|
@@ -11,8 +11,8 @@ var _contexts = require("../contexts");
|
|
|
11
11
|
var _useSettingSection = _interopRequireDefault(require("../settingsHooks/useSettingSection"));
|
|
12
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(
|
|
15
|
-
function _interopRequireWildcard(
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
16
|
// Importing directly here to avoid cyclic dependency
|
|
17
17
|
|
|
18
18
|
const SettingPage = _ref => {
|
|
@@ -20,9 +20,9 @@ const SettingPagePane = _ref => {
|
|
|
20
20
|
const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
21
21
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, {
|
|
22
22
|
defaultWidth: "fill",
|
|
23
|
-
id:
|
|
23
|
+
id: `settings-${sectionName}`,
|
|
24
24
|
paneTitle: kintIntl.formatKintMessage({
|
|
25
|
-
id:
|
|
25
|
+
id: `settings.settingsSection.${(0, _utils.toCamelCase)(sectionName)}`,
|
|
26
26
|
fallbackMessage: sectionName
|
|
27
27
|
}),
|
|
28
28
|
children: children
|
|
@@ -49,7 +49,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
49
49
|
} = (0, _hooks.useMutateModConfigEntry)({
|
|
50
50
|
configName,
|
|
51
51
|
moduleName,
|
|
52
|
-
id: settings
|
|
52
|
+
id: settings?.id
|
|
53
53
|
});
|
|
54
54
|
const onSubmit = values => {
|
|
55
55
|
const setting = {
|
|
@@ -70,7 +70,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
70
70
|
id: 'settingSaveSuccess',
|
|
71
71
|
intlKey: passedIntlKey,
|
|
72
72
|
intlNS: passedIntlNS,
|
|
73
|
-
overrideValue: labelOverrides
|
|
73
|
+
overrideValue: labelOverrides?.settingSaveSuccess
|
|
74
74
|
}),
|
|
75
75
|
type: 'success'
|
|
76
76
|
});
|
|
@@ -7,7 +7,7 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
-
var
|
|
10
|
+
var _get = _interopRequireDefault(require("lodash/get"));
|
|
11
11
|
var _components = require("@folio/stripes/components");
|
|
12
12
|
var _SearchField = _interopRequireDefault(require("../SearchField"));
|
|
13
13
|
var _TypeDown = _interopRequireDefault(require("../../../styles/TypeDown.css"));
|
|
@@ -15,8 +15,8 @@ var _typedownHooks = require("../hooks/typedownHooks");
|
|
|
15
15
|
var _selectorSafe = _interopRequireDefault(require("../utils/selectorSafe"));
|
|
16
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
-
function _getRequireWildcardCache(
|
|
19
|
-
function _interopRequireWildcard(
|
|
18
|
+
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); }
|
|
19
|
+
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; }
|
|
20
20
|
const Typedown = _ref => {
|
|
21
21
|
let {
|
|
22
22
|
className,
|
|
@@ -36,7 +36,7 @@ const Typedown = _ref => {
|
|
|
36
36
|
required,
|
|
37
37
|
uniqueIdentificationPath = 'id'
|
|
38
38
|
} = _ref;
|
|
39
|
-
const selectedUniqueId = (0,
|
|
39
|
+
const selectedUniqueId = (0, _get.default)(input.value, uniqueIdentificationPath);
|
|
40
40
|
|
|
41
41
|
// Display data needs to be in line with data options but also able to react to default handleType
|
|
42
42
|
const [displayData, setDisplayData] = (0, _react.useState)(dataOptions);
|
|
@@ -50,25 +50,18 @@ const Typedown = _ref => {
|
|
|
50
50
|
|
|
51
51
|
// Setup default handleType
|
|
52
52
|
const handleType = e => {
|
|
53
|
-
|
|
54
|
-
const regex = new RegExp("".concat(e.target.value.toLowerCase()));
|
|
53
|
+
const regex = new RegExp(`${e.target.value.toLowerCase()}`);
|
|
55
54
|
if (onType) {
|
|
56
55
|
onType(e);
|
|
57
|
-
} else if (filterPath && e
|
|
58
|
-
setDisplayData(dataOptions.filter(item =>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}));
|
|
62
|
-
} else if (e !== null && e !== void 0 && (_e$target2 = e.target) !== null && _e$target2 !== void 0 && _e$target2.value) {
|
|
63
|
-
setDisplayData(dataOptions.filter(item => {
|
|
64
|
-
var _get2;
|
|
65
|
-
return (_get2 = (0, _get3.default)(item, uniqueIdentificationPath)) === null || _get2 === void 0 || (_get2 = _get2.toLowerCase()) === null || _get2 === void 0 ? void 0 : _get2.match(regex);
|
|
66
|
-
}));
|
|
56
|
+
} else if (filterPath && e?.target?.value) {
|
|
57
|
+
setDisplayData(dataOptions.filter(item => (0, _get.default)(item, filterPath)?.toLowerCase()?.match(regex)));
|
|
58
|
+
} else if (e?.target?.value) {
|
|
59
|
+
setDisplayData(dataOptions.filter(item => (0, _get.default)(item, uniqueIdentificationPath)?.toLowerCase()?.match(regex)));
|
|
67
60
|
} else {
|
|
68
61
|
setDisplayData(dataOptions);
|
|
69
62
|
}
|
|
70
63
|
setCurrentlyTyped(e.target.value);
|
|
71
|
-
if (displayData.length === 1 && (0,
|
|
64
|
+
if (displayData.length === 1 && (0, _get.default)(displayData[0], filterPath) === e.target.value) {
|
|
72
65
|
setExactMatch(true);
|
|
73
66
|
} else {
|
|
74
67
|
setExactMatch(false);
|
|
@@ -97,7 +90,7 @@ const Typedown = _ref => {
|
|
|
97
90
|
} = (0, _typedownHooks.useTypedown)(input.name);
|
|
98
91
|
const renderItem = (0, _react.useCallback)(option => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
99
92
|
className: _TypeDown.default.listItem,
|
|
100
|
-
children: renderListItem ? renderListItem(option, currentlyTyped, exactMatch) : (0,
|
|
93
|
+
children: renderListItem ? renderListItem(option, currentlyTyped, exactMatch) : (0, _get.default)(option, uniqueIdentificationPath)
|
|
101
94
|
}), [currentlyTyped, exactMatch, renderListItem, uniqueIdentificationPath]);
|
|
102
95
|
const handleChange = (0, _react.useCallback)(value => {
|
|
103
96
|
input.onChange(value);
|
|
@@ -108,20 +101,20 @@ const Typedown = _ref => {
|
|
|
108
101
|
const dropDown = (0, _react.useCallback)(() => {
|
|
109
102
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
110
103
|
className: _TypeDown.default.dropdownMenu,
|
|
111
|
-
id:
|
|
104
|
+
id: `typedown-parent-${(0, _selectorSafe.default)(input.name)}-menu`,
|
|
112
105
|
style: {
|
|
113
|
-
'--searchWidth':
|
|
106
|
+
'--searchWidth': `${searchWidth}px`
|
|
114
107
|
},
|
|
115
108
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
116
109
|
ref: listRef,
|
|
117
110
|
className: _TypeDown.default.listContainer,
|
|
118
111
|
id: "typedown-list",
|
|
119
|
-
children: displayData
|
|
120
|
-
const isSelectedEval = isSelected ? isSelected(input.value, d) : (0,
|
|
112
|
+
children: displayData?.length ? displayData?.map((d, index) => {
|
|
113
|
+
const isSelectedEval = isSelected ? isSelected(input.value, d) : (0, _get.default)(input.value, uniqueIdentificationPath) === (0, _get.default)(d, uniqueIdentificationPath);
|
|
121
114
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("button", {
|
|
122
115
|
className: (0, _classnames.default)(_TypeDown.default.fullWidth, _TypeDown.default.menuButton),
|
|
123
116
|
"data-selected": isSelectedEval,
|
|
124
|
-
id:
|
|
117
|
+
id: `typedown-button-[${index}]`,
|
|
125
118
|
onClick: () => {
|
|
126
119
|
handleChange(d);
|
|
127
120
|
handleNextFocus();
|
|
@@ -129,12 +122,12 @@ const Typedown = _ref => {
|
|
|
129
122
|
onKeyDown: listKeyDownHandler,
|
|
130
123
|
type: "button",
|
|
131
124
|
children: renderItem(d)
|
|
132
|
-
},
|
|
125
|
+
}, `typedown-button-[${index}]`);
|
|
133
126
|
}) : endOfList || /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.EndOfList, {})
|
|
134
127
|
}), renderFooter && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
135
128
|
ref: footerRef,
|
|
136
129
|
className: _TypeDown.default.footer,
|
|
137
|
-
id:
|
|
130
|
+
id: `typedown-footer-${(0, _selectorSafe.default)(input.name)}`,
|
|
138
131
|
children: renderFooter(displayData, currentlyTyped, exactMatch)
|
|
139
132
|
})]
|
|
140
133
|
});
|
|
@@ -142,11 +135,11 @@ const Typedown = _ref => {
|
|
|
142
135
|
const renderSearchField = () => {
|
|
143
136
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
144
137
|
ref: triggerRef,
|
|
145
|
-
id:
|
|
138
|
+
id: `typedown-parent-${(0, _selectorSafe.default)(input.name)}-searchField`,
|
|
146
139
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SearchField.default
|
|
147
140
|
// Pass meta through so correct styling gets applied to the TextField
|
|
148
141
|
, {
|
|
149
|
-
id:
|
|
142
|
+
id: `typedown-searchField-${(0, _selectorSafe.default)(input.name)}`,
|
|
150
143
|
label: label,
|
|
151
144
|
marginBottom0: true,
|
|
152
145
|
meta: meta,
|
|
@@ -159,7 +152,7 @@ const Typedown = _ref => {
|
|
|
159
152
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
160
153
|
ref: resizeRef,
|
|
161
154
|
className: (0, _classnames.default)(_TypeDown.default.typedown, className),
|
|
162
|
-
id:
|
|
155
|
+
id: `typedown-id-${id}`,
|
|
163
156
|
children: [renderSearchField(), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Popper, {
|
|
164
157
|
anchorRef: triggerRef,
|
|
165
158
|
className: (0, _classnames.default)(_TypeDown.default.dropdown, _TypeDown.default.fullWidth),
|
|
@@ -13,14 +13,14 @@ var _useTypedownToggle = _interopRequireDefault(require("./useTypedownToggle"));
|
|
|
13
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
14
|
const useTypedown = name => {
|
|
15
15
|
// SEARCHFIELD COMPONENT
|
|
16
|
-
const searchFieldComponent = document.getElementById(
|
|
16
|
+
const searchFieldComponent = document.getElementById(`typedown-searchField-${(0, _selectorSafe.default)(name)}`);
|
|
17
17
|
|
|
18
18
|
// SET UP REFS
|
|
19
19
|
const listRef = (0, _react.useRef)();
|
|
20
20
|
const triggerRef = (0, _react.useRef)();
|
|
21
21
|
const overlayRef = (0, _react.useRef)();
|
|
22
22
|
const footerRef = (0, _react.useRef)();
|
|
23
|
-
const footer = document.getElementById(
|
|
23
|
+
const footer = document.getElementById(`typedown-footer-${(0, _selectorSafe.default)(name)}`);
|
|
24
24
|
// Add an event listener to the footer, so that we can control tab behaviour between footer elements
|
|
25
25
|
|
|
26
26
|
if (footer && footer.getAttribute('hasListener') !== 'true') {
|
|
@@ -18,8 +18,8 @@ const useTypedownToggle = name => {
|
|
|
18
18
|
} = (0, _useActiveElement.default)();
|
|
19
19
|
|
|
20
20
|
// Trawl up element stack and check if a typedown-parent exists, use that to toggle
|
|
21
|
-
const openBool = !open && hasParent(
|
|
22
|
-
const closeBool = open && !hasParent(
|
|
21
|
+
const openBool = !open && hasParent(`typedown-parent-${(0, _selectorSafe.default)(name)}`);
|
|
22
|
+
const closeBool = open && !hasParent(`typedown-parent-${(0, _selectorSafe.default)(name)}`);
|
|
23
23
|
(0, _react.useEffect)(() => {
|
|
24
24
|
if (openBool || closeBool) {
|
|
25
25
|
onToggle();
|
|
@@ -11,7 +11,7 @@ const useActiveElement = () => {
|
|
|
11
11
|
setActive(document.activeElement);
|
|
12
12
|
};
|
|
13
13
|
const hasParent = id => {
|
|
14
|
-
return active.closest(
|
|
14
|
+
return active.closest(`[id^=${id}]`) !== null;
|
|
15
15
|
};
|
|
16
16
|
(0, _react.useEffect)(() => {
|
|
17
17
|
document.addEventListener('focusin', handleFocusIn);
|
|
@@ -41,7 +41,7 @@ const useCustomProperties = _ref => {
|
|
|
41
41
|
|
|
42
42
|
// Special case if one is isNull
|
|
43
43
|
custPropOptions.filters.push({
|
|
44
|
-
values: ctx.map(c => c === 'isNull' ? 'ctx isNull' :
|
|
44
|
+
values: ctx.map(c => c === 'isNull' ? 'ctx isNull' : `ctx==${c}`)
|
|
45
45
|
});
|
|
46
46
|
} else if (ctx === 'isNull') {
|
|
47
47
|
// isNull is a special case
|
|
@@ -55,7 +55,7 @@ const useCustomProperties = _ref => {
|
|
|
55
55
|
});
|
|
56
56
|
}
|
|
57
57
|
const query = (0, _utils.generateKiwtQuery)(custPropOptions, nsValues);
|
|
58
|
-
const path =
|
|
58
|
+
const path = `${endpoint}${query}`;
|
|
59
59
|
const queryObject = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useCustomProperties', 'custprops', ctx, path], () => ky(path).json(), queryParams);
|
|
60
60
|
if (returnQueryObject) {
|
|
61
61
|
return queryObject || {};
|
|
@@ -10,14 +10,14 @@ var _queryString = _interopRequireDefault(require("query-string"));
|
|
|
10
10
|
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
15
|
let helperObject = {};
|
|
16
16
|
const useHelperApp = helpers => {
|
|
17
17
|
const history = (0, _reactRouterDom.useHistory)();
|
|
18
18
|
const location = (0, _reactRouterDom.useLocation)();
|
|
19
19
|
const query = _queryString.default.parse(location.search);
|
|
20
|
-
const [currentHelper, setCurrentHelper] = (0, _react.useState)(query
|
|
20
|
+
const [currentHelper, setCurrentHelper] = (0, _react.useState)(query?.helper);
|
|
21
21
|
const handleToggleHelper = (0, _react.useCallback)(helper => {
|
|
22
22
|
setCurrentHelper(helper !== currentHelper ? helper : undefined);
|
|
23
23
|
}, [currentHelper]);
|
|
@@ -29,26 +29,26 @@ const useHelperApp = helpers => {
|
|
|
29
29
|
if (!(0, _isEqual.default)(Object.keys(helperObject), Object.keys(helpers))) {
|
|
30
30
|
helperObject = helpers;
|
|
31
31
|
}
|
|
32
|
-
if (currentHelper !==
|
|
32
|
+
if (currentHelper !== query?.helper) {
|
|
33
33
|
const newQuery = {
|
|
34
34
|
...query,
|
|
35
35
|
helper: currentHelper
|
|
36
36
|
};
|
|
37
37
|
history.push({
|
|
38
38
|
pathname: location.pathname,
|
|
39
|
-
search:
|
|
39
|
+
search: `?${_queryString.default.stringify(newQuery)}`
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
}, [currentHelper, helpers, history, location, query]);
|
|
43
43
|
|
|
44
44
|
// Set the HelperComponent
|
|
45
45
|
const HelperComponent = (0, _react.useMemo)(() => props => {
|
|
46
|
-
if (!
|
|
46
|
+
if (!query?.helper) return null;
|
|
47
47
|
let Component = null;
|
|
48
|
-
Component = helperObject[query
|
|
48
|
+
Component = helperObject[query?.helper];
|
|
49
49
|
if (!Component) return null;
|
|
50
50
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
51
|
-
onToggle: () => handleToggleHelper(query
|
|
51
|
+
onToggle: () => handleToggleHelper(query?.helper),
|
|
52
52
|
...props
|
|
53
53
|
});
|
|
54
54
|
}, [handleToggleHelper, query.helper]);
|
|
@@ -12,9 +12,8 @@ var _zustand = require("zustand");
|
|
|
12
12
|
const useIntlKeyStore = (0, _zustand.create)((set, get) => ({
|
|
13
13
|
intlKeys: {},
|
|
14
14
|
addKey: (key, namespace) => set(state => {
|
|
15
|
-
var _useNamespace;
|
|
16
15
|
let ns = namespace;
|
|
17
|
-
const folioNS = (
|
|
16
|
+
const folioNS = (0, _core.useNamespace)()?.[0];
|
|
18
17
|
if (!ns) {
|
|
19
18
|
ns = folioNS;
|
|
20
19
|
}
|
|
@@ -27,9 +26,8 @@ const useIntlKeyStore = (0, _zustand.create)((set, get) => ({
|
|
|
27
26
|
};
|
|
28
27
|
}),
|
|
29
28
|
removeKey: namespace => set(state => {
|
|
30
|
-
var _useNamespace2;
|
|
31
29
|
let ns = namespace;
|
|
32
|
-
const folioNS = (
|
|
30
|
+
const folioNS = (0, _core.useNamespace)()?.[0];
|
|
33
31
|
if (!ns) {
|
|
34
32
|
ns = folioNS;
|
|
35
33
|
}
|
|
@@ -43,13 +41,12 @@ const useIntlKeyStore = (0, _zustand.create)((set, get) => ({
|
|
|
43
41
|
};
|
|
44
42
|
}),
|
|
45
43
|
getKey: namespace => {
|
|
46
|
-
var _useNamespace3, _get$intlKeys;
|
|
47
44
|
let ns = namespace;
|
|
48
|
-
const folioNS = (
|
|
45
|
+
const folioNS = (0, _core.useNamespace)()?.[0];
|
|
49
46
|
if (!ns) {
|
|
50
47
|
ns = folioNS;
|
|
51
48
|
}
|
|
52
|
-
return
|
|
49
|
+
return get().intlKeys?.[ns];
|
|
53
50
|
}
|
|
54
51
|
}));
|
|
55
52
|
var _default = exports.default = useIntlKeyStore;
|
|
@@ -15,7 +15,6 @@ const useKintIntl = (passedIntlKey, passedIntlNS) => {
|
|
|
15
15
|
// FormatKintMessage id misses out the top level key part of the path.
|
|
16
16
|
// This works analogously to FormattedKintMessage component
|
|
17
17
|
const formatKintMessage = (_ref, formatValues) => {
|
|
18
|
-
var _intlObj$messages2;
|
|
19
18
|
let {
|
|
20
19
|
id,
|
|
21
20
|
overrideValue,
|
|
@@ -23,12 +22,11 @@ const useKintIntl = (passedIntlKey, passedIntlNS) => {
|
|
|
23
22
|
...formatParams
|
|
24
23
|
} = _ref;
|
|
25
24
|
if (overrideValue) {
|
|
26
|
-
var _intlObj$messages;
|
|
27
25
|
// Version 3 is a breaking change, where labelOverrides must be strings.
|
|
28
26
|
if (typeof overrideValue !== 'string') {
|
|
29
27
|
throw new Error('Override values must be strings as of stripes-kint-components ^3.0.0');
|
|
30
28
|
}
|
|
31
|
-
if (
|
|
29
|
+
if (intlObj.messages?.[overrideValue]) {
|
|
32
30
|
// We've been passed a key as an override, use it
|
|
33
31
|
return intlObj.formatMessage({
|
|
34
32
|
id: overrideValue,
|
|
@@ -42,10 +40,9 @@ const useKintIntl = (passedIntlKey, passedIntlNS) => {
|
|
|
42
40
|
// If key does not exist in intl, and we have a specified "fallbackMessage", use that
|
|
43
41
|
|
|
44
42
|
// (FallbackMessage works like defaultMessage but with no warning)
|
|
45
|
-
if (!
|
|
46
|
-
var _intlObj$messages3;
|
|
43
|
+
if (!intlObj.messages?.[`${intlKey}.${id}`] && fallbackMessage) {
|
|
47
44
|
// Allow fallback message to be an intl key
|
|
48
|
-
if (
|
|
45
|
+
if (intlObj.messages?.[fallbackMessage]) {
|
|
49
46
|
return intlObj.formatMessage({
|
|
50
47
|
id: fallbackMessage,
|
|
51
48
|
...formatParams
|
|
@@ -56,14 +53,11 @@ const useKintIntl = (passedIntlKey, passedIntlNS) => {
|
|
|
56
53
|
|
|
57
54
|
// After all that, render the message from key
|
|
58
55
|
return intlObj.formatMessage({
|
|
59
|
-
id:
|
|
56
|
+
id: `${intlKey}.${id}`,
|
|
60
57
|
...formatParams
|
|
61
58
|
}, formatValues);
|
|
62
59
|
};
|
|
63
|
-
const messageExists = key => {
|
|
64
|
-
var _intlObj$messages4;
|
|
65
|
-
return !!((_intlObj$messages4 = intlObj.messages) !== null && _intlObj$messages4 !== void 0 && _intlObj$messages4["".concat(intlKey, ".").concat(key)]);
|
|
66
|
-
};
|
|
60
|
+
const messageExists = key => !!intlObj.messages?.[`${intlKey}.${key}`];
|
|
67
61
|
return {
|
|
68
62
|
...intlObj,
|
|
69
63
|
formatKintMessage,
|
|
@@ -23,7 +23,7 @@ const locationQuerySetter = _ref => {
|
|
|
23
23
|
|
|
24
24
|
// Do not push to history if the url didn't change
|
|
25
25
|
// https://issues.folio.org/browse/STSMACOM-637
|
|
26
|
-
if (
|
|
26
|
+
if (`${pathname}${search}` !== url) {
|
|
27
27
|
history.push(url);
|
|
28
28
|
}
|
|
29
29
|
};
|