@k-int/stripes-kint-components 2.8.3 → 2.8.5
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 +6 -0
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +6 -19
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +2 -182
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +64 -94
- package/es/index.js +0 -27
- package/es/lib/ActionList/ActionList.js +18 -38
- package/es/lib/ActionList/ActionListFieldArray.js +57 -112
- package/es/lib/ActionList/index.js +0 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +32 -63
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +2 -13
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +89 -138
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +3 -22
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +14 -50
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +17 -34
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +3 -12
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -26
- package/es/lib/CustomProperties/Config/index.js +0 -5
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +6 -12
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +1 -13
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +24 -39
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +1 -13
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +25 -69
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +3 -23
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +26 -77
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +6 -33
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +19 -33
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -14
- package/es/lib/CustomProperties/Edit/index.js +0 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +33 -70
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +2 -18
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +14 -44
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -10
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +4 -23
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +2 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +8 -22
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +2 -20
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +9 -27
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +1 -32
- package/es/lib/CustomProperties/Filter/index.js +0 -7
- package/es/lib/CustomProperties/Filter/useOperators.js +5 -21
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +3 -15
- package/es/lib/CustomProperties/Filter/useValueProps.js +5 -20
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +6 -12
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +1 -10
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +43 -65
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +1 -13
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +10 -38
- package/es/lib/CustomProperties/View/index.js +0 -4
- package/es/lib/CustomProperties/index.js +0 -4
- package/es/lib/CycleButton/CycleButton.js +8 -33
- package/es/lib/CycleButton/index.js +0 -2
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +85 -131
- package/es/lib/EditableRefdataCategoryList/index.js +0 -2
- package/es/lib/EditableRefdataList/EditableRefdataList.js +90 -139
- package/es/lib/EditableRefdataList/index.js +0 -2
- package/es/lib/EditableSettingsList/EditableSettingsList.js +3 -13
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +2 -15
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +4 -19
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +3 -25
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +19 -26
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +2 -20
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +14 -35
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +15 -51
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +6 -31
- package/es/lib/EditableSettingsList/SettingField/index.js +0 -4
- package/es/lib/EditableSettingsList/index.js +0 -4
- package/es/lib/FormModal/FormModal.js +14 -34
- package/es/lib/FormModal/index.js +0 -2
- package/es/lib/IconSelect/IconSelect.js +29 -67
- package/es/lib/IconSelect/index.js +0 -2
- package/es/lib/NoResultsMessage/NoResultsMessage.js +13 -22
- package/es/lib/NoResultsMessage/index.js +0 -2
- package/es/lib/QueryTypedown/QueryTypedown.js +9 -36
- package/es/lib/QueryTypedown/index.js +0 -2
- package/es/lib/RefdataButtons/RefdataButtons.js +5 -24
- package/es/lib/RefdataButtons/index.js +0 -2
- package/es/lib/RichSelect/RichSelect.js +39 -67
- package/es/lib/RichSelect/index.js +0 -3
- package/es/lib/RichSelect/useSelectedOption.js +3 -14
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +36 -80
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +16 -29
- package/es/lib/SASQLookupComponent/TableBody/index.js +0 -2
- package/es/lib/SASQLookupComponent/index.js +0 -3
- package/es/lib/SASQRoute/SASQRoute.js +6 -23
- package/es/lib/SASQRoute/index.js +0 -2
- package/es/lib/SASQViewComponent/SASQViewComponent.js +17 -36
- package/es/lib/SASQViewComponent/index.js +0 -2
- package/es/lib/SearchField/SearchField.js +1 -17
- package/es/lib/SearchField/index.js +0 -2
- package/es/lib/SettingPage/SettingPage.js +6 -21
- package/es/lib/SettingPage/SettingPagePane.js +2 -17
- package/es/lib/SettingPage/index.js +0 -3
- package/es/lib/Typedown/Typedown.js +51 -82
- package/es/lib/Typedown/index.js +0 -2
- package/es/lib/contexts/SettingsContext.js +0 -2
- package/es/lib/contexts/index.js +0 -2
- package/es/lib/hooks/index.js +0 -16
- package/es/lib/hooks/settingsHooks/index.js +0 -4
- package/es/lib/hooks/settingsHooks/useAppSettings.js +6 -27
- package/es/lib/hooks/settingsHooks/useSettingSection.js +10 -20
- package/es/lib/hooks/settingsHooks/useSettings.js +10 -43
- package/es/lib/hooks/typedownHooks/index.js +0 -4
- package/es/lib/hooks/typedownHooks/useTypedown.js +17 -37
- package/es/lib/hooks/typedownHooks/useTypedownData.js +12 -26
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +5 -19
- package/es/lib/hooks/useActiveElement.js +3 -15
- package/es/lib/hooks/useAvailableCustomProperties.js +3 -22
- package/es/lib/hooks/useCustomProperties.js +11 -25
- package/es/lib/hooks/useHelperApp.js +7 -30
- package/es/lib/hooks/useInvalidateRefdata.js +0 -4
- package/es/lib/hooks/useKiwtFieldArray.js +5 -29
- package/es/lib/hooks/useKiwtSASQuery.js +12 -37
- package/es/lib/hooks/useLocalStorageState.js +5 -21
- package/es/lib/hooks/useMutateCustomProperties.js +11 -28
- package/es/lib/hooks/useMutateRefdataCategory.js +9 -29
- package/es/lib/hooks/useMutateRefdataValue.js +10 -27
- package/es/lib/hooks/useQIndex.js +3 -27
- package/es/lib/hooks/useRefdata.js +7 -16
- package/es/lib/hooks/useTemplates.js +6 -17
- package/es/lib/utils/buildUrl.js +1 -10
- package/es/lib/utils/generateKiwtQuery.js +0 -4
- package/es/lib/utils/generateKiwtQueryParams.js +24 -62
- package/es/lib/utils/groupCustomPropertiesByCtx.js +0 -14
- package/es/lib/utils/highlightString.js +6 -23
- package/es/lib/utils/index.js +0 -15
- package/es/lib/utils/matchString.js +0 -6
- package/es/lib/utils/parseErrorResponse.js +2 -24
- package/es/lib/utils/refdataQueryKey.js +0 -4
- package/es/lib/utils/renderHelpText.js +0 -7
- package/es/lib/utils/selectorSafe.js +0 -2
- package/es/lib/utils/sortByLabel.js +0 -6
- package/es/lib/utils/toCamelCase.js +6 -5
- package/es/lib/utils/typedownQueryKey.js +0 -4
- package/es/lib/utils/validators.js +4 -35
- package/junit.xml +151 -151
- package/package.json +1 -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/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +4 -4
- 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 +5 -5
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +793 -0
- 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 +6 -9
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +29 -92
- 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 +24 -24
- 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 +17 -17
- 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 +15 -15
- 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 +3 -3
- 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 +28 -22
- 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 +2 -2
- 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 +535 -0
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +146 -0
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +88 -0
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +253 -0
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +5 -2
- 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 +99 -12
- 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 +9 -9
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +53 -8
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +65 -11
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +9 -9
- 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/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/customProperties.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 +24 -9
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +5 -2
- 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 +3 -3
- 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/useMutateCustomProperties.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 +187 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/index.html +74 -59
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +9 -9
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +63 -21
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +33 -33
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +166 -0
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +39 -39
- package/src/artifacts/coverage-jest/lcov.info +755 -537
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +0 -1
- package/src/lib/utils/parseErrorResponse.js +1 -1
- package/translate.sh +4 -0
- package/translations/stripes-kint-components/ar.json +12 -12
- package/translations/stripes-kint-components/cs_CZ.json +4 -4
- package/translations/stripes-kint-components/de.json +41 -41
- package/translations/stripes-kint-components/en_GB.json +1 -0
- package/translations/stripes-kint-components/en_SE.json +1 -0
- package/translations/stripes-kint-components/es_419.json +122 -0
- package/translations/stripes-kint-components/es_ES.json +122 -0
- package/translations/stripes-kint-components/fr.json +105 -1
- package/translations/stripes-kint-components/fr_FR.json +105 -0
- package/translations/stripes-kint-components/hu.json +12 -12
- package/translations/stripes-kint-components/it_IT.json +6 -6
- package/translations/stripes-kint-components/ja.json +43 -43
- package/translations/stripes-kint-components/ko.json +49 -49
- package/translations/stripes-kint-components/pt_PT.json +6 -6
- package/translations/stripes-kint-components/ru.json +1 -1
- package/translations/stripes-kint-components/sv.json +7 -7
- package/translations/stripes-kint-components/zh_TW.json +122 -0
- package/yarn-error.log +147 -0
|
@@ -4,59 +4,51 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _reactIntl = require("react-intl");
|
|
13
|
-
|
|
14
10
|
var _components = require("@folio/stripes/components");
|
|
15
|
-
|
|
16
11
|
var _NoResultsMessage = _interopRequireDefault(require("../../../styles/NoResultsMessage.css"));
|
|
17
|
-
|
|
18
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
var NoResultsMessage = function NoResultsMessage(_ref) {
|
|
23
15
|
var userIcon = _ref.icon,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
16
|
+
isLoading = _ref.isLoading,
|
|
17
|
+
isError = _ref.isError,
|
|
18
|
+
error = _ref.error,
|
|
19
|
+
filterPaneIsVisible = _ref.filterPaneIsVisible,
|
|
20
|
+
userLabel = _ref.label,
|
|
21
|
+
searchTerm = _ref.searchTerm,
|
|
22
|
+
toggleFilterPane = _ref.toggleFilterPane;
|
|
31
23
|
var icon = 'search';
|
|
32
24
|
var label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
33
25
|
id: "stripes-smart-components.sas.noResults.default",
|
|
34
26
|
values: {
|
|
35
27
|
searchTerm: searchTerm
|
|
36
28
|
}
|
|
37
|
-
});
|
|
29
|
+
});
|
|
38
30
|
|
|
31
|
+
// No search term but no results
|
|
39
32
|
if (!searchTerm) {
|
|
40
33
|
icon = 'search';
|
|
41
34
|
label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
42
35
|
id: "stripes-smart-components.sas.noResults.noResults"
|
|
43
36
|
});
|
|
44
|
-
}
|
|
45
|
-
|
|
37
|
+
}
|
|
46
38
|
|
|
39
|
+
// Loading results
|
|
47
40
|
if (isLoading) {
|
|
48
41
|
icon = 'spinner-ellipsis';
|
|
49
42
|
label = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
50
43
|
id: "stripes-smart-components.sas.noResults.loading"
|
|
51
44
|
});
|
|
52
|
-
}
|
|
53
|
-
|
|
45
|
+
}
|
|
54
46
|
|
|
47
|
+
// Request failure
|
|
55
48
|
if (isError) {
|
|
56
49
|
icon = 'exclamation-circle';
|
|
57
50
|
label = error === null || error === void 0 ? void 0 : error.message;
|
|
58
51
|
}
|
|
59
|
-
|
|
60
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
61
53
|
className: _NoResultsMessage.default.noResultsMessage,
|
|
62
54
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -78,7 +70,6 @@ var NoResultsMessage = function NoResultsMessage(_ref) {
|
|
|
78
70
|
})]
|
|
79
71
|
});
|
|
80
72
|
};
|
|
81
|
-
|
|
82
73
|
NoResultsMessage.propTypes = {
|
|
83
74
|
error: _propTypes.default.object,
|
|
84
75
|
filterPaneIsVisible: _propTypes.default.bool.isRequired,
|
|
@@ -9,7 +9,5 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _NoResultsMessage.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _NoResultsMessage = _interopRequireDefault(require("./NoResultsMessage"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,78 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports.default = void 0;
|
|
9
|
-
|
|
10
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
10
|
var _Typedown = _interopRequireDefault(require("../Typedown"));
|
|
15
|
-
|
|
16
11
|
var _typedownHooks = require("../hooks/typedownHooks");
|
|
17
|
-
|
|
18
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
13
|
var _excluded = ["dataFormatter", "path", "pathMutator"];
|
|
21
|
-
|
|
22
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
15
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
16
|
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; }
|
|
27
|
-
|
|
28
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
|
-
|
|
30
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
31
|
-
|
|
32
19
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
|
-
|
|
34
20
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
35
|
-
|
|
36
21
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37
|
-
|
|
38
22
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
39
|
-
|
|
40
23
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
41
|
-
|
|
42
24
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
43
|
-
|
|
44
25
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
45
|
-
|
|
46
26
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
47
|
-
|
|
48
27
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
49
|
-
|
|
50
28
|
var QueryTypedown = function QueryTypedown(_ref) {
|
|
51
29
|
var _ref$dataFormatter = _ref.dataFormatter,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
30
|
+
dataFormatter = _ref$dataFormatter === void 0 ? function (d) {
|
|
31
|
+
return d;
|
|
32
|
+
} : _ref$dataFormatter,
|
|
33
|
+
path = _ref.path,
|
|
34
|
+
pathMutator = _ref.pathMutator,
|
|
35
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
59
36
|
var _useState = (0, _react.useState)(pathMutator(null, path)),
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
37
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
38
|
+
callPath = _useState2[0],
|
|
39
|
+
setCallPath = _useState2[1];
|
|
64
40
|
var data = dataFormatter((0, _typedownHooks.useTypedownData)(path, callPath));
|
|
65
|
-
|
|
66
41
|
var onType = function onType(e) {
|
|
67
42
|
setCallPath(pathMutator(e.target.value, path));
|
|
68
43
|
};
|
|
69
|
-
|
|
70
44
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typedown.default, _objectSpread(_objectSpread({}, rest), {}, {
|
|
71
45
|
dataOptions: data,
|
|
72
46
|
onType: onType
|
|
73
47
|
}));
|
|
74
48
|
};
|
|
75
|
-
|
|
76
49
|
QueryTypedown.propTypes = {
|
|
77
50
|
dataFormatter: _propTypes.default.func,
|
|
78
51
|
path: _propTypes.default.string,
|
|
@@ -9,7 +9,5 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _QueryTypedown.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _QueryTypedown = _interopRequireDefault(require("./QueryTypedown"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -4,35 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _reactIntl = require("react-intl");
|
|
13
|
-
|
|
14
10
|
var _components = require("@folio/stripes/components");
|
|
15
|
-
|
|
16
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
19
|
-
|
|
20
13
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
-
|
|
22
14
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
23
|
-
|
|
24
15
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
|
-
|
|
26
16
|
var RefdataButtons = function RefdataButtons(props) {
|
|
27
17
|
// Render the right number of buttons:
|
|
28
18
|
var labelTranslations = props.labelTranslations,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
var intl = (0, _reactIntl.useIntl)();
|
|
19
|
+
lockColumns = props.lockColumns,
|
|
20
|
+
_props$maxCols = props.maxCols,
|
|
21
|
+
maxCols = _props$maxCols === void 0 ? 4 : _props$maxCols;
|
|
22
|
+
var intl = (0, _reactIntl.useIntl)();
|
|
33
23
|
|
|
24
|
+
// maxCols can be any of 1,2,3 or 4. Anything outside of this should be disregarded and default to 4.
|
|
34
25
|
var maximumColumns = [1, 2, 3, 4].includes(maxCols) ? maxCols : 4;
|
|
35
|
-
|
|
36
26
|
var buttonRender = function buttonRender(dataOptions, dynamicColumnWidth) {
|
|
37
27
|
// This accepts a SORTED list of dataoptions.
|
|
38
28
|
var input = props.input;
|
|
@@ -57,44 +47,35 @@ var RefdataButtons = function RefdataButtons(props) {
|
|
|
57
47
|
}, "".concat(input.name, ":").concat(option.id));
|
|
58
48
|
});
|
|
59
49
|
};
|
|
60
|
-
|
|
61
50
|
var returnRows = function returnRows(dataOptions) {
|
|
62
51
|
var sortedDataOptions = dataOptions.sort(function (a, b) {
|
|
63
52
|
if (a.label < b.label) {
|
|
64
53
|
return -1;
|
|
65
54
|
}
|
|
66
|
-
|
|
67
55
|
if (a.label > b.label) {
|
|
68
56
|
return 1;
|
|
69
57
|
}
|
|
70
|
-
|
|
71
58
|
return 0;
|
|
72
59
|
});
|
|
73
60
|
var arrayLength = sortedDataOptions.length;
|
|
74
|
-
|
|
75
61
|
if (!lockColumns && arrayLength <= maximumColumns) {
|
|
76
62
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Row, {
|
|
77
63
|
children: buttonRender(sortedDataOptions, true)
|
|
78
64
|
});
|
|
79
65
|
}
|
|
80
|
-
|
|
81
66
|
var rowsNeeded = Math.ceil(sortedDataOptions.length / maximumColumns);
|
|
82
67
|
var chunkedDataOptions = [];
|
|
83
|
-
|
|
84
68
|
for (var i = 0; i < rowsNeeded; i++) {
|
|
85
69
|
chunkedDataOptions.push(sortedDataOptions.slice(i * maximumColumns, i * maximumColumns + maximumColumns));
|
|
86
70
|
}
|
|
87
|
-
|
|
88
71
|
return chunkedDataOptions.map(function (cdo, index) {
|
|
89
72
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Row, {
|
|
90
73
|
children: buttonRender(cdo, false)
|
|
91
74
|
}, "".concat(props.input.name, ":row").concat(index));
|
|
92
75
|
});
|
|
93
76
|
};
|
|
94
|
-
|
|
95
77
|
return returnRows(props.dataOptions);
|
|
96
78
|
};
|
|
97
|
-
|
|
98
79
|
RefdataButtons.propTypes = {
|
|
99
80
|
dataOptions: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
100
81
|
id: _propTypes.default.string.isRequired,
|
|
@@ -9,7 +9,5 @@ Object.defineProperty(exports, "default", {
|
|
|
9
9
|
return _RefdataButtons.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _RefdataButtons = _interopRequireDefault(require("./RefdataButtons"));
|
|
14
|
-
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -4,80 +4,58 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _reactIntl = require("react-intl");
|
|
13
|
-
|
|
14
10
|
var _components = require("@folio/stripes/components");
|
|
15
|
-
|
|
16
11
|
var _RichSelect = _interopRequireDefault(require("../../../styles/RichSelect.css"));
|
|
17
|
-
|
|
18
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
14
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
|
-
|
|
24
15
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
|
-
|
|
26
16
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
27
|
-
|
|
28
17
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
29
|
-
|
|
30
18
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
31
|
-
|
|
32
19
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
33
|
-
|
|
34
20
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
35
|
-
|
|
36
21
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
37
|
-
|
|
38
22
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
39
|
-
|
|
40
23
|
var RichSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
41
24
|
var _ref2, _meta$initial, _findSelectedOptionBy, _meta$initial2;
|
|
42
|
-
|
|
43
25
|
var ariaLabel = _ref.ariaLabel,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
26
|
+
_ref$disabled = _ref.disabled,
|
|
27
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
28
|
+
_ref$dropdownProps = _ref.dropdownProps,
|
|
29
|
+
dropdownProps = _ref$dropdownProps === void 0 ? {} : _ref$dropdownProps,
|
|
30
|
+
id = _ref.id,
|
|
31
|
+
_ref$input = _ref.input,
|
|
32
|
+
formInput = _ref$input === void 0 ? {} : _ref$input,
|
|
33
|
+
label = _ref.label,
|
|
34
|
+
meta = _ref.meta,
|
|
35
|
+
onChange = _ref.onChange,
|
|
36
|
+
_ref$options = _ref.options,
|
|
37
|
+
userOptions = _ref$options === void 0 ? [] : _ref$options,
|
|
38
|
+
placeholder = _ref.placeholder,
|
|
39
|
+
_renderMenu = _ref.renderMenu,
|
|
40
|
+
renderOption = _ref.renderOption,
|
|
41
|
+
_renderTrigger = _ref.renderTrigger,
|
|
42
|
+
_ref$required = _ref.required,
|
|
43
|
+
required = _ref$required === void 0 ? false : _ref$required,
|
|
44
|
+
value = _ref.value;
|
|
63
45
|
var hiddenInput = (0, _react.useRef)(null);
|
|
64
|
-
|
|
65
46
|
var _useState = (0, _react.useState)((_ref2 = (_meta$initial = meta === null || meta === void 0 ? void 0 : meta.initial) !== null && _meta$initial !== void 0 ? _meta$initial : value) !== null && _ref2 !== void 0 ? _ref2 : ''),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
47
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
48
|
+
internalValue = _useState2[0],
|
|
49
|
+
setInternalValue = _useState2[1];
|
|
70
50
|
var findSelectedOptionByValue = (0, _react.useCallback)(function (val) {
|
|
71
51
|
return userOptions.find(function (opt) {
|
|
72
52
|
return opt.value === val;
|
|
73
53
|
});
|
|
74
54
|
}, [userOptions]);
|
|
75
|
-
|
|
76
55
|
var _useState3 = (0, _react.useState)((_findSelectedOptionBy = findSelectedOptionByValue((_meta$initial2 = meta === null || meta === void 0 ? void 0 : meta.initial) !== null && _meta$initial2 !== void 0 ? _meta$initial2 : '')) !== null && _findSelectedOptionBy !== void 0 ? _findSelectedOptionBy : {}),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
56
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
57
|
+
selectedOption = _useState4[0],
|
|
58
|
+
setSelectedOption = _useState4[1];
|
|
81
59
|
(0, _react.useEffect)(function () {
|
|
82
60
|
// We treat non-undefined value/formInput values as valid values, whereas undefined is only relevant when prop has not been provided
|
|
83
61
|
if (value !== undefined && !(value === (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) && value === internalValue)) {
|
|
@@ -87,23 +65,22 @@ var RichSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
87
65
|
setSelectedOption(findSelectedOptionByValue(formInput.value));
|
|
88
66
|
setInternalValue(formInput.value);
|
|
89
67
|
}
|
|
90
|
-
}, [formInput, value, internalValue, selectedOption, findSelectedOptionByValue]);
|
|
68
|
+
}, [formInput, value, internalValue, selectedOption, findSelectedOptionByValue]);
|
|
91
69
|
|
|
70
|
+
// Way to grab internal selectedOption state, thereby avoiding having to reparse options for it
|
|
92
71
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
93
72
|
return {
|
|
94
73
|
selectedOption: selectedOption
|
|
95
74
|
};
|
|
96
75
|
});
|
|
97
|
-
|
|
98
76
|
var defaultRenderTrigger = function defaultRenderTrigger(_ref3) {
|
|
99
77
|
var _ref4, _ref5, _ref6, _selectedOption$label;
|
|
100
|
-
|
|
101
78
|
var onToggle = _ref3.onToggle,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
79
|
+
triggerRef = _ref3.triggerRef,
|
|
80
|
+
keyHandler = _ref3.keyHandler,
|
|
81
|
+
open = _ref3.open,
|
|
82
|
+
ariaProps = _ref3.ariaProps,
|
|
83
|
+
getTriggerProps = _ref3.getTriggerProps;
|
|
107
84
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, _objectSpread(_objectSpread(_objectSpread({
|
|
108
85
|
ref: triggerRef,
|
|
109
86
|
buttonClass: _RichSelect.default.iconButtonText,
|
|
@@ -122,8 +99,8 @@ var RichSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
122
99
|
id: "stripes-kint-components.richSelect.placeholder"
|
|
123
100
|
})
|
|
124
101
|
})
|
|
125
|
-
}))
|
|
126
|
-
|
|
102
|
+
}))
|
|
103
|
+
// Awaiting result of conversation about whether we want to allow labels on IconButtons
|
|
127
104
|
/* <IconButton
|
|
128
105
|
ref={triggerRef}
|
|
129
106
|
disabled={disabled}
|
|
@@ -143,32 +120,27 @@ var RichSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
143
120
|
placeholder ??
|
|
144
121
|
<FormattedMessage id="stripes-kint-components.richSelect.placeholder" />
|
|
145
122
|
}
|
|
146
|
-
</IconButton>
|
|
147
|
-
;
|
|
123
|
+
</IconButton> */;
|
|
148
124
|
};
|
|
149
125
|
|
|
150
126
|
var handleChange = function handleChange(e) {
|
|
151
127
|
// Actually set the value in the form (If formInput exists)
|
|
152
128
|
if (formInput !== null && formInput !== void 0 && formInput.onChange) {
|
|
153
129
|
formInput.onChange(e);
|
|
154
|
-
}
|
|
155
|
-
|
|
130
|
+
}
|
|
156
131
|
|
|
132
|
+
// If the user has set up an onChange, this will ensure that that fires
|
|
157
133
|
if (onChange) {
|
|
158
134
|
onChange(e, e.target.value);
|
|
159
135
|
}
|
|
160
136
|
};
|
|
161
|
-
|
|
162
137
|
var changeField = function changeField(val) {
|
|
163
138
|
(0, _components.nativeChangeFieldValue)(hiddenInput, false, val);
|
|
164
139
|
};
|
|
165
|
-
|
|
166
140
|
var defaultRenderOption = function defaultRenderOption(opt) {
|
|
167
141
|
var _opt$label;
|
|
168
|
-
|
|
169
142
|
return (_opt$label = opt.label) !== null && _opt$label !== void 0 ? _opt$label : opt.value;
|
|
170
143
|
};
|
|
171
|
-
|
|
172
144
|
var defaultRenderMenu = function defaultRenderMenu(_ref7) {
|
|
173
145
|
var onToggle = _ref7.onToggle;
|
|
174
146
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DropdownMenu, {
|
|
@@ -180,8 +152,9 @@ var RichSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
180
152
|
marginBottom0: true,
|
|
181
153
|
onClick: function onClick() {
|
|
182
154
|
// Trigger change event
|
|
183
|
-
changeField(opt.value);
|
|
155
|
+
changeField(opt.value);
|
|
184
156
|
|
|
157
|
+
// Close the menu on select
|
|
185
158
|
onToggle();
|
|
186
159
|
},
|
|
187
160
|
children: renderOption ? renderOption(opt) : defaultRenderOption(opt)
|
|
@@ -189,7 +162,6 @@ var RichSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
189
162
|
})
|
|
190
163
|
});
|
|
191
164
|
};
|
|
192
|
-
|
|
193
165
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
194
166
|
children: [label || ariaLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Label, {
|
|
195
167
|
className: ariaLabel && 'sr-only',
|
|
@@ -15,9 +15,6 @@ Object.defineProperty(exports, "useSelectedOption", {
|
|
|
15
15
|
return _useSelectedOption.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
|
|
19
18
|
var _RichSelect = _interopRequireDefault(require("./RichSelect"));
|
|
20
|
-
|
|
21
19
|
var _useSelectedOption = _interopRequireDefault(require("./useSelectedOption"));
|
|
22
|
-
|
|
23
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -4,36 +4,25 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = require("react");
|
|
9
|
-
|
|
10
8
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
11
|
-
|
|
12
9
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
-
|
|
14
10
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
15
|
-
|
|
16
11
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
17
|
-
|
|
18
12
|
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
19
|
-
|
|
20
13
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
21
|
-
|
|
22
14
|
var useSelectedOption = function useSelectedOption() {
|
|
23
15
|
var _useState = (0, _react.useState)(),
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
17
|
+
selectedOption = _useState2[0],
|
|
18
|
+
setSelectedOption = _useState2[1];
|
|
28
19
|
var ref = (0, _react.useCallback)(function (node) {
|
|
29
20
|
var _node$selectedOption;
|
|
30
|
-
|
|
31
21
|
if (node !== null && (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) !== ((_node$selectedOption = node.selectedOption) === null || _node$selectedOption === void 0 ? void 0 : _node$selectedOption.value)) {
|
|
32
22
|
setSelectedOption(node.selectedOption);
|
|
33
23
|
}
|
|
34
24
|
}, [selectedOption]);
|
|
35
25
|
return [ref, selectedOption];
|
|
36
26
|
};
|
|
37
|
-
|
|
38
27
|
var _default = useSelectedOption;
|
|
39
28
|
exports.default = _default;
|