@k-int/stripes-kint-components 3.0.4 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -10
- package/LICENSE +201 -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 +13 -27
- package/es/lib/ActionList/ActionList.js +20 -40
- package/es/lib/ActionList/ActionListFieldArray.js +67 -129
- package/es/lib/ActionList/index.js +0 -2
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +34 -61
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +2 -9
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +92 -138
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +3 -18
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +18 -51
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +13 -35
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +5 -14
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -23
- package/es/lib/CustomProperties/Config/index.js +0 -5
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +8 -14
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +1 -9
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +25 -35
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +1 -9
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +32 -75
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +3 -20
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +34 -91
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +6 -33
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +15 -27
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +3 -13
- package/es/lib/CustomProperties/Edit/index.js +0 -6
- package/es/lib/CustomProperties/Edit/testResources.js +0 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +35 -67
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +2 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +13 -42
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -12
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -18
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +2 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +10 -23
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +2 -19
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +13 -31
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +1 -32
- package/es/lib/CustomProperties/Filter/index.js +0 -7
- package/es/lib/CustomProperties/Filter/testResources.js +0 -3
- package/es/lib/CustomProperties/Filter/useOperators.js +5 -19
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +3 -15
- package/es/lib/CustomProperties/Filter/useValueProps.js +5 -22
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +8 -14
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +1 -10
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +45 -62
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +1 -13
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +11 -33
- 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 +87 -132
- package/es/lib/EditableRefdataCategoryList/index.js +0 -2
- package/es/lib/EditableRefdataList/EditableRefdataList.js +92 -140
- package/es/lib/EditableRefdataList/index.js +0 -2
- package/es/lib/EditableSettingsList/EditableSettingsList.js +7 -17
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +6 -19
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +4 -19
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +7 -29
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +19 -26
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +6 -23
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +14 -35
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +18 -55
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +1 -34
- package/es/lib/EditableSettingsList/SettingField/index.js +0 -4
- package/es/lib/EditableSettingsList/index.js +0 -4
- package/es/lib/FormModal/FormModal.js +16 -35
- package/es/lib/FormModal/index.js +0 -2
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +10 -31
- package/es/lib/FormattedKintMessage/index.js +0 -2
- package/es/lib/IconSelect/IconSelect.js +26 -63
- package/es/lib/IconSelect/index.js +0 -2
- package/es/lib/NoResultsMessage/NoResultsMessage.js +18 -28
- 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/ResponsiveButtonGroup/ResponsiveButtonGroup.js +148 -0
- package/es/lib/ResponsiveButtonGroup/index.js +13 -0
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +74 -0
- package/es/lib/RichSelect/RichSelect.js +37 -65
- package/es/lib/RichSelect/index.js +0 -3
- package/es/lib/RichSelect/useSelectedOption.js +3 -14
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +75 -93
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +20 -33
- package/es/lib/SASQLookupComponent/TableBody/index.js +0 -2
- package/es/lib/SASQLookupComponent/index.js +0 -3
- package/es/lib/SASQRoute/SASQRoute.js +21 -29
- package/es/lib/SASQRoute/index.js +0 -2
- package/es/lib/SASQViewComponent/SASQViewComponent.js +37 -41
- 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 +10 -25
- package/es/lib/SettingPage/SettingPagePane.js +3 -11
- 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/__mocks__/index.js +0 -5
- package/es/lib/hooks/index.js +7 -18
- 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 +13 -44
- 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/useCustomProperties.js +11 -25
- package/es/lib/hooks/useHelperApp.js +7 -30
- package/es/lib/hooks/useIntlKey.js +0 -7
- package/es/lib/hooks/useIntlKeyStore.js +2 -24
- package/es/lib/hooks/useInvalidateRefdata.js +0 -4
- package/es/lib/hooks/useKintIntl.js +13 -32
- 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/useSASQQueryMeta.js +41 -0
- 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 +1 -23
- package/es/lib/utils/refdataQueryKey.js +0 -4
- 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 +5 -38
- package/junit.xml +150 -150
- package/package.json +2 -2
- 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/Edit/CustomPropertiesEdit.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +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 +19 -19
- 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 +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 +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 +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 +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/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 +2 -2
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +2 -2
- 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 +20 -20
- 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/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 +567 -359
- package/src/index.js +4 -1
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +0 -7
- package/src/lib/NoResultsMessage/NoResultsMessage.js +1 -1
- package/src/lib/ResponsiveButtonGroup/README.md +31 -0
- package/src/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +150 -0
- package/src/lib/ResponsiveButtonGroup/index.js +1 -0
- package/src/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +56 -0
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +34 -5
- package/src/lib/SASQRoute/SASQRoute.js +18 -3
- package/src/lib/SASQViewComponent/SASQViewComponent.js +23 -5
- package/src/lib/hooks/index.js +1 -0
- package/src/lib/hooks/useSASQQueryMeta.js +34 -0
- package/styles/ResponsiveButtonGroup.css +79 -0
- package/yarn-error.log +147 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _debounce2 = _interopRequireDefault(require("lodash/debounce"));
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
var _isEqual = _interopRequireDefault(require("lodash/isEqual"));
|
|
10
|
+
var _reactResizeDetector = require("react-resize-detector");
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
13
|
+
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."); }
|
|
14
|
+
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
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
|
+
var useResponsiveButtonGroupSizing = function useResponsiveButtonGroupSizing(_ref) {
|
|
19
|
+
var _ref$buttons = _ref.buttons,
|
|
20
|
+
buttons = _ref$buttons === void 0 ? [] : _ref$buttons;
|
|
21
|
+
// Set up size measuring to be able to do fullWidth if and only if the button is too small for the container.
|
|
22
|
+
// This way when the button is too _large_ for the container, we can measure it properly
|
|
23
|
+
var _useResizeDetector = (0, _reactResizeDetector.useResizeDetector)(),
|
|
24
|
+
containerRef = _useResizeDetector.ref,
|
|
25
|
+
containerWidth = _useResizeDetector.width;
|
|
26
|
+
var _useState = (0, _react.useState)([]),
|
|
27
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
28
|
+
cachedSizeArray = _useState2[0],
|
|
29
|
+
setCachedSizeArray = _useState2[1];
|
|
30
|
+
var _useState3 = (0, _react.useState)([]),
|
|
31
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
32
|
+
sizeArray = _useState4[0],
|
|
33
|
+
setSizeArray = _useState4[1];
|
|
34
|
+
// We also need to set up a ref for each of the buttons
|
|
35
|
+
// to measure the size of each one, we can then use that for choosing where to break later.
|
|
36
|
+
var refArray = buttons.map(function (_button, index) {
|
|
37
|
+
return function (node) {
|
|
38
|
+
if (node !== null) {
|
|
39
|
+
var _node$clientWidth;
|
|
40
|
+
var newSizeArray = sizeArray.slice(0, index).concat([(_node$clientWidth = node === null || node === void 0 ? void 0 : node.clientWidth) !== null && _node$clientWidth !== void 0 ? _node$clientWidth : 0]).concat(sizeArray.slice(index + 1));
|
|
41
|
+
if (!(0, _isEqual.default)(sizeArray, newSizeArray)) {
|
|
42
|
+
setSizeArray(newSizeArray);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
var _useState5 = (0, _react.useState)(false),
|
|
48
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
49
|
+
ready = _useState6[0],
|
|
50
|
+
setReady = _useState6[1];
|
|
51
|
+
|
|
52
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53
|
+
(0, _react.useEffect)((0, _debounce2.default)(function () {
|
|
54
|
+
if (!(cachedSizeArray !== null && cachedSizeArray !== void 0 && cachedSizeArray.length) && sizeArray !== null && sizeArray !== void 0 && sizeArray.length) {
|
|
55
|
+
setCachedSizeArray(sizeArray);
|
|
56
|
+
setReady(true);
|
|
57
|
+
}
|
|
58
|
+
}, 150), [cachedSizeArray, sizeArray]);
|
|
59
|
+
var returnButtons = buttons === null || buttons === void 0 ? void 0 : buttons.map(function (button, index) {
|
|
60
|
+
return /*#__PURE__*/(0, _react.cloneElement)(button, {
|
|
61
|
+
ref: refArray === null || refArray === void 0 ? void 0 : refArray[index]
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
return {
|
|
65
|
+
buttons: returnButtons,
|
|
66
|
+
cachedSizeArray: cachedSizeArray,
|
|
67
|
+
containerRef: containerRef,
|
|
68
|
+
containerWidth: containerWidth,
|
|
69
|
+
ready: ready,
|
|
70
|
+
sizeArray: sizeArray
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
var _default = useResponsiveButtonGroupSizing;
|
|
74
|
+
exports.default = _default;
|
|
@@ -4,82 +4,60 @@ 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 _components = require("@folio/stripes/components");
|
|
13
|
-
|
|
14
10
|
var _RichSelect = _interopRequireDefault(require("../../../styles/RichSelect.css"));
|
|
15
|
-
|
|
16
11
|
var _FormattedKintMessage = _interopRequireDefault(require("../FormattedKintMessage"));
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
+
passedIntlKey = _ref.intlKey,
|
|
34
|
+
passedIntlNS = _ref.intlNS,
|
|
35
|
+
label = _ref.label,
|
|
36
|
+
meta = _ref.meta,
|
|
37
|
+
onChange = _ref.onChange,
|
|
38
|
+
_ref$options = _ref.options,
|
|
39
|
+
userOptions = _ref$options === void 0 ? [] : _ref$options,
|
|
40
|
+
placeholder = _ref.placeholder,
|
|
41
|
+
_renderMenu = _ref.renderMenu,
|
|
42
|
+
renderOption = _ref.renderOption,
|
|
43
|
+
_renderTrigger = _ref.renderTrigger,
|
|
44
|
+
_ref$required = _ref.required,
|
|
45
|
+
required = _ref$required === void 0 ? false : _ref$required,
|
|
46
|
+
value = _ref.value;
|
|
65
47
|
var hiddenInput = (0, _react.useRef)(null);
|
|
66
|
-
|
|
67
48
|
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 : ''),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
49
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
50
|
+
internalValue = _useState2[0],
|
|
51
|
+
setInternalValue = _useState2[1];
|
|
72
52
|
var findSelectedOptionByValue = (0, _react.useCallback)(function (val) {
|
|
73
53
|
return userOptions.find(function (opt) {
|
|
74
54
|
return opt.value === val;
|
|
75
55
|
});
|
|
76
56
|
}, [userOptions]);
|
|
77
|
-
|
|
78
57
|
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 : {}),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
58
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
59
|
+
selectedOption = _useState4[0],
|
|
60
|
+
setSelectedOption = _useState4[1];
|
|
83
61
|
(0, _react.useEffect)(function () {
|
|
84
62
|
// We treat non-undefined value/formInput values as valid values, whereas undefined is only relevant when prop has not been provided
|
|
85
63
|
if (value !== undefined && !(value === (selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.value) && value === internalValue)) {
|
|
@@ -89,22 +67,21 @@ var RichSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
89
67
|
setSelectedOption(findSelectedOptionByValue(formInput.value));
|
|
90
68
|
setInternalValue(formInput.value);
|
|
91
69
|
}
|
|
92
|
-
}, [formInput, value, internalValue, selectedOption, findSelectedOptionByValue]);
|
|
70
|
+
}, [formInput, value, internalValue, selectedOption, findSelectedOptionByValue]);
|
|
93
71
|
|
|
72
|
+
// Way to grab internal selectedOption state, thereby avoiding having to reparse options for it
|
|
94
73
|
(0, _react.useImperativeHandle)(ref, function () {
|
|
95
74
|
return {
|
|
96
75
|
selectedOption: selectedOption
|
|
97
76
|
};
|
|
98
77
|
});
|
|
99
|
-
|
|
100
78
|
var defaultRenderTrigger = function defaultRenderTrigger(_ref3) {
|
|
101
79
|
var _ref4, _ref5, _ref6, _selectedOption$label;
|
|
102
|
-
|
|
103
80
|
var onToggle = _ref3.onToggle,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
81
|
+
triggerRef = _ref3.triggerRef,
|
|
82
|
+
keyHandler = _ref3.keyHandler,
|
|
83
|
+
ariaProps = _ref3.ariaProps,
|
|
84
|
+
getTriggerProps = _ref3.getTriggerProps;
|
|
108
85
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DropdownButton, _objectSpread(_objectSpread(_objectSpread({
|
|
109
86
|
ref: triggerRef,
|
|
110
87
|
buttonClass: _RichSelect.default.triggerButton,
|
|
@@ -123,29 +100,24 @@ var RichSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
123
100
|
})
|
|
124
101
|
}));
|
|
125
102
|
};
|
|
126
|
-
|
|
127
103
|
var handleChange = function handleChange(e) {
|
|
128
104
|
// Actually set the value in the form (If formInput exists)
|
|
129
105
|
if (formInput !== null && formInput !== void 0 && formInput.onChange) {
|
|
130
106
|
formInput.onChange(e);
|
|
131
|
-
}
|
|
132
|
-
|
|
107
|
+
}
|
|
133
108
|
|
|
109
|
+
// If the user has set up an onChange, this will ensure that that fires
|
|
134
110
|
if (onChange) {
|
|
135
111
|
onChange(e, e.target.value);
|
|
136
112
|
}
|
|
137
113
|
};
|
|
138
|
-
|
|
139
114
|
var changeField = function changeField(val) {
|
|
140
115
|
(0, _components.nativeChangeFieldValue)(hiddenInput, false, val);
|
|
141
116
|
};
|
|
142
|
-
|
|
143
117
|
var defaultRenderOption = function defaultRenderOption(opt) {
|
|
144
118
|
var _opt$label;
|
|
145
|
-
|
|
146
119
|
return (_opt$label = opt.label) !== null && _opt$label !== void 0 ? _opt$label : opt.value;
|
|
147
120
|
};
|
|
148
|
-
|
|
149
121
|
var defaultRenderMenu = function defaultRenderMenu(_ref7) {
|
|
150
122
|
var onToggle = _ref7.onToggle;
|
|
151
123
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.DropdownMenu, {
|
|
@@ -157,8 +129,9 @@ var RichSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
157
129
|
marginBottom0: true,
|
|
158
130
|
onClick: function onClick() {
|
|
159
131
|
// Trigger change event
|
|
160
|
-
changeField(opt.value);
|
|
132
|
+
changeField(opt.value);
|
|
161
133
|
|
|
134
|
+
// Close the menu on select
|
|
162
135
|
onToggle();
|
|
163
136
|
},
|
|
164
137
|
children: renderOption ? renderOption(opt) : defaultRenderOption(opt)
|
|
@@ -166,7 +139,6 @@ var RichSelect = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
166
139
|
})
|
|
167
140
|
});
|
|
168
141
|
};
|
|
169
|
-
|
|
170
142
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
171
143
|
children: [label || ariaLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Label, {
|
|
172
144
|
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;
|
|
@@ -4,137 +4,114 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
7
|
+
var _react = require("react");
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
|
|
10
9
|
var _reactIntl = require("react-intl");
|
|
11
|
-
|
|
12
10
|
var _reactQuery = require("react-query");
|
|
13
|
-
|
|
14
11
|
var _core = require("@folio/stripes/core");
|
|
15
|
-
|
|
16
12
|
var _smartComponents = require("@folio/stripes/smart-components");
|
|
17
|
-
|
|
18
13
|
var _components = require("@folio/stripes/components");
|
|
19
|
-
|
|
20
14
|
var _utils = require("../utils");
|
|
21
|
-
|
|
22
15
|
var _hooks = require("../hooks");
|
|
23
|
-
|
|
24
16
|
var _TableBody = _interopRequireDefault(require("./TableBody"));
|
|
25
|
-
|
|
26
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
-
|
|
28
18
|
var _excluded = ["data"];
|
|
29
|
-
|
|
30
19
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
|
-
|
|
32
20
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
33
|
-
|
|
34
21
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
35
|
-
|
|
36
22
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
37
|
-
|
|
38
23
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
39
|
-
|
|
40
24
|
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; }
|
|
41
|
-
|
|
42
25
|
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; }
|
|
43
|
-
|
|
44
26
|
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; }
|
|
45
|
-
|
|
46
27
|
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
28
|
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
29
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
51
|
-
|
|
52
30
|
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."); }
|
|
53
|
-
|
|
54
31
|
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); }
|
|
55
|
-
|
|
56
32
|
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; }
|
|
57
|
-
|
|
58
33
|
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; }
|
|
59
|
-
|
|
60
34
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
61
|
-
|
|
62
|
-
var SASQLookupComponent = function SASQLookupComponent(props) {
|
|
35
|
+
var SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
63
36
|
var _totalData$pages$redu, _totalData$pages;
|
|
64
|
-
|
|
65
37
|
var _children = props.children,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
38
|
+
_props$fetchParameter = props.fetchParameters,
|
|
39
|
+
fetchParameters = _props$fetchParameter === void 0 ? {} : _props$fetchParameter,
|
|
40
|
+
_props$FilterComponen = props.FilterComponent,
|
|
41
|
+
FilterComponent = _props$FilterComponen === void 0 ? function () {
|
|
42
|
+
return null;
|
|
43
|
+
} : _props$FilterComponen,
|
|
44
|
+
_props$FilterPaneHead = props.FilterPaneHeaderComponent,
|
|
45
|
+
FilterPaneHeaderComponent = _props$FilterPaneHead === void 0 ? function () {
|
|
46
|
+
return null;
|
|
47
|
+
} : _props$FilterPaneHead,
|
|
48
|
+
_props$filterPaneProp = props.filterPaneProps,
|
|
49
|
+
filterPaneProps = _props$filterPaneProp === void 0 ? {} : _props$filterPaneProp,
|
|
50
|
+
id = props.id,
|
|
51
|
+
passedIntlKey = props.intlKey,
|
|
52
|
+
passedIntlNS = props.intlNS,
|
|
53
|
+
_props$labelOverrides = props.labelOverrides,
|
|
54
|
+
labelOverrides = _props$labelOverrides === void 0 ? {} : _props$labelOverrides,
|
|
55
|
+
mainPaneProps = props.mainPaneProps,
|
|
56
|
+
noSearchField = props.noSearchField,
|
|
57
|
+
_props$persistedPanes = props.persistedPanesetProps,
|
|
58
|
+
persistedPanesetProps = _props$persistedPanes === void 0 ? {} : _props$persistedPanes,
|
|
59
|
+
RenderBody = props.RenderBody,
|
|
60
|
+
sasqProps = props.sasqProps,
|
|
61
|
+
searchFieldAriaLabel = props.searchFieldAriaLabel,
|
|
62
|
+
searchFieldProps = props.searchFieldProps;
|
|
86
63
|
var kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
87
|
-
|
|
88
64
|
var _useKiwtSASQuery = (0, _hooks.useKiwtSASQuery)(),
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
65
|
+
query = _useKiwtSASQuery.query,
|
|
66
|
+
queryGetter = _useKiwtSASQuery.queryGetter,
|
|
67
|
+
querySetter = _useKiwtSASQuery.querySetter;
|
|
93
68
|
var _useNamespace = (0, _core.useNamespace)(),
|
|
94
|
-
|
|
95
|
-
|
|
69
|
+
namespace = _useNamespace[0];
|
|
96
70
|
var ky = (0, _core.useOkapiKy)();
|
|
97
71
|
var filterPaneVisibileKey = "".concat(namespace, "-").concat(id, "-filterPaneVisibility");
|
|
98
|
-
|
|
99
72
|
var fetchPageData = function fetchPageData(_ref) {
|
|
100
73
|
var _ref$pageParam = _ref.pageParam,
|
|
101
|
-
|
|
74
|
+
pageParam = _ref$pageParam === void 0 ? 0 : _ref$pageParam;
|
|
102
75
|
var queryMap = fetchParameters.SASQ_MAP;
|
|
103
76
|
queryMap.offset = pageParam;
|
|
104
77
|
return ky("".concat(fetchParameters.endpoint).concat((0, _utils.generateKiwtQuery)(queryMap, query))).json();
|
|
105
78
|
};
|
|
106
|
-
|
|
107
79
|
var _useLocalStorageState = (0, _hooks.useLocalStorageState)(filterPaneVisibileKey, true),
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
80
|
+
_useLocalStorageState2 = _slicedToArray(_useLocalStorageState, 2),
|
|
81
|
+
filterPaneVisible = _useLocalStorageState2[0],
|
|
82
|
+
setFilterPaneVisible = _useLocalStorageState2[1];
|
|
112
83
|
var toggleFilterPane = function toggleFilterPane() {
|
|
113
84
|
return setFilterPaneVisible(!filterPaneVisible);
|
|
114
85
|
};
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
86
|
+
var queryNamespace = [namespace, 'SASQ'];
|
|
87
|
+
if (id) {
|
|
88
|
+
queryNamespace.push(id);
|
|
89
|
+
}
|
|
90
|
+
queryNamespace.push('viewAll');
|
|
91
|
+
queryNamespace.push(query);
|
|
92
|
+
var _useInfiniteQuery = (0, _reactQuery.useInfiniteQuery)(queryNamespace, fetchPageData),
|
|
93
|
+
_useInfiniteQuery$dat = _useInfiniteQuery.data,
|
|
94
|
+
totalData = _useInfiniteQuery$dat === void 0 ? {} : _useInfiniteQuery$dat,
|
|
95
|
+
restOfInfiniteQueryProps = _objectWithoutProperties(_useInfiniteQuery, _excluded);
|
|
96
|
+
(0, _react.useImperativeHandle)(ref, function () {
|
|
97
|
+
return {
|
|
98
|
+
lookupQueryProps: _objectSpread({
|
|
99
|
+
data: totalData
|
|
100
|
+
}, restOfInfiniteQueryProps)
|
|
101
|
+
};
|
|
102
|
+
});
|
|
121
103
|
var data = (_totalData$pages$redu = (_totalData$pages = totalData.pages) === null || _totalData$pages === void 0 ? void 0 : _totalData$pages.reduce(function (acc, curr) {
|
|
122
104
|
var _acc$results, _curr$results;
|
|
123
|
-
|
|
124
105
|
var newAcc = _objectSpread({}, acc);
|
|
125
|
-
|
|
126
106
|
for (var _i2 = 0, _Object$entries = Object.entries(curr); _i2 < _Object$entries.length; _i2++) {
|
|
127
107
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
108
|
+
key = _Object$entries$_i[0],
|
|
109
|
+
value = _Object$entries$_i[1];
|
|
131
110
|
if (key !== 'page' && key !== 'result' && acc[key] !== value) {
|
|
132
111
|
newAcc[key] = value;
|
|
133
112
|
}
|
|
134
113
|
}
|
|
135
|
-
|
|
136
114
|
var newResults = _toConsumableArray((_acc$results = acc.results) !== null && _acc$results !== void 0 ? _acc$results : []);
|
|
137
|
-
|
|
138
115
|
newResults.push.apply(newResults, _toConsumableArray((_curr$results = curr.results) !== null && _curr$results !== void 0 ? _curr$results : []));
|
|
139
116
|
newAcc.results = newResults;
|
|
140
117
|
return newAcc;
|
|
@@ -148,22 +125,24 @@ var SASQLookupComponent = function SASQLookupComponent(props) {
|
|
|
148
125
|
}, sasqProps), {}, {
|
|
149
126
|
children: function children(sasqRenderProps) {
|
|
150
127
|
var activeFilters = sasqRenderProps.activeFilters,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
128
|
+
filterChanged = sasqRenderProps.filterChanged,
|
|
129
|
+
getFilterHandlers = sasqRenderProps.getFilterHandlers,
|
|
130
|
+
getSearchHandlers = sasqRenderProps.getSearchHandlers,
|
|
131
|
+
onSubmitSearch = sasqRenderProps.onSubmitSearch,
|
|
132
|
+
resetAll = sasqRenderProps.resetAll,
|
|
133
|
+
searchChanged = sasqRenderProps.searchChanged,
|
|
134
|
+
searchValue = sasqRenderProps.searchValue;
|
|
158
135
|
var searchHandlers = getSearchHandlers();
|
|
159
136
|
var disableReset = !filterChanged && !searchChanged;
|
|
160
137
|
var filterCount = activeFilters.string ? activeFilters.string.split(',').length : 0;
|
|
161
138
|
var Body = RenderBody !== null && RenderBody !== void 0 ? RenderBody : _TableBody.default;
|
|
162
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_smartComponents.PersistedPaneset, {
|
|
139
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_smartComponents.PersistedPaneset, _objectSpread(_objectSpread({
|
|
163
140
|
appId: namespace,
|
|
164
|
-
id: "".concat(id, "-paneset")
|
|
141
|
+
id: "".concat(id, "-paneset")
|
|
142
|
+
}, persistedPanesetProps), {}, {
|
|
165
143
|
children: [filterPaneVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, _objectSpread(_objectSpread({
|
|
166
144
|
defaultWidth: "20%",
|
|
145
|
+
id: "".concat(id, "-filter-pane"),
|
|
167
146
|
lastMenu: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PaneMenu, {
|
|
168
147
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.IconButton, {
|
|
169
148
|
icon: "caret-left",
|
|
@@ -179,13 +158,13 @@ var SASQLookupComponent = function SASQLookupComponent(props) {
|
|
|
179
158
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
|
|
180
159
|
onSubmit: onSubmitSearch,
|
|
181
160
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FilterPaneHeaderComponent, {}), !noSearchField && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
182
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SearchField, {
|
|
161
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SearchField, _objectSpread({
|
|
162
|
+
ariaLabel: searchFieldAriaLabel,
|
|
183
163
|
autoFocus: true,
|
|
184
164
|
id: "sasq-search-field-".concat(id),
|
|
185
165
|
name: "query",
|
|
186
166
|
onChange: function onChange(e) {
|
|
187
167
|
var _e$target;
|
|
188
|
-
|
|
189
168
|
if ((_e$target = e.target) !== null && _e$target !== void 0 && _e$target.value) {
|
|
190
169
|
searchHandlers.query(e); // SASQ needs the whole event here
|
|
191
170
|
} else {
|
|
@@ -194,7 +173,7 @@ var SASQLookupComponent = function SASQLookupComponent(props) {
|
|
|
194
173
|
},
|
|
195
174
|
onClear: searchHandlers.reset,
|
|
196
175
|
value: searchValue.query
|
|
197
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
176
|
+
}, searchFieldProps)), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
198
177
|
buttonStyle: "primary",
|
|
199
178
|
disabled: !searchValue.query,
|
|
200
179
|
fullWidth: true,
|
|
@@ -235,6 +214,7 @@ var SASQLookupComponent = function SASQLookupComponent(props) {
|
|
|
235
214
|
}
|
|
236
215
|
})
|
|
237
216
|
}) : null,
|
|
217
|
+
id: "".concat(id, "-main-pane"),
|
|
238
218
|
noOverflow: true,
|
|
239
219
|
padContent: false,
|
|
240
220
|
paneSub: kintIntl.formatKintMessage({
|
|
@@ -254,11 +234,10 @@ var SASQLookupComponent = function SASQLookupComponent(props) {
|
|
|
254
234
|
toggleFilterPane: toggleFilterPane
|
|
255
235
|
}, restOfInfiniteQueryProps), sasqRenderProps), sasqProps), props))
|
|
256
236
|
})), _children]
|
|
257
|
-
});
|
|
237
|
+
}));
|
|
258
238
|
}
|
|
259
239
|
}));
|
|
260
|
-
};
|
|
261
|
-
|
|
240
|
+
});
|
|
262
241
|
SASQLookupComponent.propTypes = {
|
|
263
242
|
children: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node]),
|
|
264
243
|
fetchParameters: _propTypes.default.object,
|
|
@@ -276,10 +255,13 @@ SASQLookupComponent.propTypes = {
|
|
|
276
255
|
mclProps: _propTypes.default.object,
|
|
277
256
|
noSearchField: _propTypes.default.bool,
|
|
278
257
|
path: _propTypes.default.string.isRequired,
|
|
258
|
+
persistedPanesetProps: _propTypes.default.object,
|
|
279
259
|
RenderBody: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node]),
|
|
280
260
|
resource: _propTypes.default.object,
|
|
281
261
|
resultColumns: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
282
|
-
sasqProps: _propTypes.default.object
|
|
262
|
+
sasqProps: _propTypes.default.object,
|
|
263
|
+
searchFieldAriaLabel: _propTypes.default.string,
|
|
264
|
+
searchFieldProps: _propTypes.default.object
|
|
283
265
|
};
|
|
284
266
|
var _default = SASQLookupComponent;
|
|
285
267
|
exports.default = _default;
|