@k-int/stripes-kint-components 3.2.3 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/es/index.js +78 -79
- package/es/lib/ActionList/ActionList.js +38 -51
- package/es/lib/ActionList/ActionListFieldArray.js +159 -194
- package/es/lib/ActionList/index.js +1 -1
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +59 -83
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.test.js +15 -19
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +124 -175
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +30 -67
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +93 -106
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +83 -121
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +42 -43
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +48 -135
- package/es/lib/CustomProperties/Config/index.js +4 -4
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +20 -23
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.test.js +11 -16
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +33 -32
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.test.js +11 -16
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +88 -111
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.test.js +26 -63
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +134 -134
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +95 -176
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +46 -48
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +23 -27
- package/es/lib/CustomProperties/Edit/index.js +5 -5
- package/es/lib/CustomProperties/Edit/testResources.js +14 -39
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +64 -91
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.test.js +23 -57
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +53 -77
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +17 -16
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +34 -31
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.test.js +18 -45
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +19 -22
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +23 -52
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +44 -49
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +77 -225
- package/es/lib/CustomProperties/Filter/index.js +6 -6
- package/es/lib/CustomProperties/Filter/testResources.js +13 -37
- package/es/lib/CustomProperties/Filter/useOperators.js +18 -18
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +18 -33
- package/es/lib/CustomProperties/Filter/useValueProps.js +23 -29
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +20 -23
- package/es/lib/CustomProperties/View/CustomPropertiesView.test.js +11 -16
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +63 -80
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +14 -23
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +23 -29
- package/es/lib/CustomProperties/View/index.js +3 -3
- package/es/lib/CustomProperties/View/testResources.js +5 -9
- package/es/lib/CustomProperties/index.js +18 -18
- package/es/lib/CycleButton/CycleButton.js +19 -35
- package/es/lib/CycleButton/index.js +1 -1
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +105 -162
- package/es/lib/EditableRefdataCategoryList/index.js +1 -1
- package/es/lib/EditableRefdataList/EditableRefdataList.js +119 -179
- package/es/lib/EditableRefdataList/index.js +1 -1
- package/es/lib/EditableSettingsList/EditableSettingsList.js +15 -13
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +19 -26
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +61 -90
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +27 -41
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +99 -83
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +25 -30
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +187 -275
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +76 -111
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +52 -157
- package/es/lib/EditableSettingsList/SettingField/index.js +3 -3
- package/es/lib/EditableSettingsList/index.js +3 -3
- package/es/lib/FormModal/FormModal.js +44 -48
- package/es/lib/FormModal/index.js +1 -1
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +27 -35
- package/es/lib/FormattedKintMessage/index.js +1 -1
- package/es/lib/IconSelect/IconSelect.js +52 -77
- package/es/lib/IconSelect/index.js +1 -1
- package/es/lib/NoResultsMessage/NoResultsMessage.js +23 -23
- package/es/lib/NoResultsMessage/index.js +1 -1
- package/es/lib/QueryTypedown/QueryTypedown.js +16 -35
- package/es/lib/QueryTypedown/index.js +1 -1
- package/es/lib/RefdataButtons/RefdataButtons.js +30 -34
- package/es/lib/RefdataButtons/index.js +1 -1
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +77 -95
- package/es/lib/ResponsiveButtonGroup/index.js +1 -1
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +24 -39
- package/es/lib/RichSelect/RichSelect.js +78 -100
- package/es/lib/RichSelect/index.js +2 -2
- package/es/lib/RichSelect/useSelectedOption.js +5 -16
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +107 -139
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +43 -52
- package/es/lib/SASQLookupComponent/TableBody/index.js +1 -1
- package/es/lib/SASQLookupComponent/index.js +2 -2
- package/es/lib/SASQRoute/SASQRoute.js +34 -41
- package/es/lib/SASQRoute/index.js +1 -1
- package/es/lib/SASQViewComponent/SASQViewComponent.js +37 -49
- package/es/lib/SASQViewComponent/index.js +1 -1
- package/es/lib/SearchField/SearchField.js +11 -18
- package/es/lib/SearchField/index.js +1 -1
- package/es/lib/SettingPage/SettingPage.js +20 -19
- package/es/lib/SettingPage/SettingPagePane.js +11 -10
- package/es/lib/SettingPage/index.js +2 -2
- package/es/lib/Typedown/Typedown.js +73 -98
- package/es/lib/Typedown/index.js +1 -1
- package/es/lib/constants/customProperties.js +11 -22
- package/es/lib/constants/eventCodes.js +3 -6
- package/es/lib/contexts/SettingsContext.js +2 -3
- package/es/lib/contexts/index.js +1 -1
- package/es/lib/hooks/__mocks__/index.js +9 -29
- package/es/lib/hooks/index.js +20 -20
- package/es/lib/hooks/settingsHooks/index.js +3 -3
- package/es/lib/hooks/settingsHooks/useAppSettings.js +22 -34
- package/es/lib/hooks/settingsHooks/useSettingSection.js +17 -19
- package/es/lib/hooks/settingsHooks/useSettings.js +58 -72
- package/es/lib/hooks/typedownHooks/index.js +3 -3
- package/es/lib/hooks/typedownHooks/useTypedown.js +49 -50
- package/es/lib/hooks/typedownHooks/useTypedownData.js +12 -23
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +13 -22
- package/es/lib/hooks/useActiveElement.js +10 -20
- package/es/lib/hooks/useCustomProperties.js +23 -32
- package/es/lib/hooks/useHelperApp.js +31 -51
- package/es/lib/hooks/useIntlKey.js +4 -7
- package/es/lib/hooks/useIntlKeyStore.js +42 -51
- package/es/lib/hooks/useInvalidateRefdata.js +4 -7
- package/es/lib/hooks/useKintIntl.js +31 -41
- package/es/lib/hooks/useKiwtFieldArray.js +35 -47
- package/es/lib/hooks/useKiwtSASQuery.js +40 -51
- package/es/lib/hooks/useLocalStorageState.js +7 -20
- package/es/lib/hooks/useMutateCustomProperties.js +23 -67
- package/es/lib/hooks/useMutateRefdataCategory.js +22 -64
- package/es/lib/hooks/useMutateRefdataValue.js +31 -69
- package/es/lib/hooks/useQIndex.js +17 -32
- package/es/lib/hooks/useRefdata.js +19 -22
- package/es/lib/hooks/useSASQQueryMeta.js +14 -22
- package/es/lib/hooks/useTemplates.js +16 -16
- package/es/lib/utils/buildUrl.js +6 -6
- package/es/lib/utils/generateKiwtQuery.js +4 -7
- package/es/lib/utils/generateKiwtQueryParams.js +77 -96
- package/es/lib/utils/groupCustomPropertiesByCtx.js +9 -21
- package/es/lib/utils/highlightString.js +17 -37
- package/es/lib/utils/index.js +21 -21
- package/es/lib/utils/matchString.js +5 -10
- package/es/lib/utils/parseErrorResponse.js +22 -65
- package/es/lib/utils/refdataOptions.js +2 -3
- package/es/lib/utils/refdataQueryKey.js +3 -4
- package/es/lib/utils/selectorSafe.js +2 -3
- package/es/lib/utils/sortByLabel.js +4 -6
- package/es/lib/utils/toCamelCase.js +8 -14
- package/es/lib/utils/typedownQueryKey.js +3 -4
- package/es/lib/utils/validators.js +25 -32
- package/package.json +12 -2
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -69
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -814
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +0 -181
- package/junit.xml +0 -1543
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +0 -373
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +0 -1465
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +0 -667
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +0 -1240
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +0 -1474
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyView.js.html +0 -733
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +0 -176
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +0 -97
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/testResources.js.html +0 -793
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEdit.js.html +0 -208
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesEditCtx.js.html +0 -352
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertiesListField.js.html +0 -826
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyField.js.html +0 -1297
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/CustomPropertyFormCard.js.html +0 -454
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.html +0 -206
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/index.js.html +0 -100
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Edit/testResources.js.html +0 -271
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilter.js.html +0 -499
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterField.js.html +0 -568
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js.html +0 -415
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesFilterForm.js.html +0 -340
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/CustomPropertiesRule.js.html +0 -502
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.html +0 -251
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/index.js.html +0 -103
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/testResources.js.html +0 -223
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useOperators.js.html +0 -271
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useParseActiveFilterStrings.js.html +0 -199
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Filter/useValueProps.js.html +0 -253
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesView.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertiesViewCtx.js.html +0 -445
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/CustomPropertyCard.js.html +0 -619
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.html +0 -176
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/View/testResources.js.html +0 -571
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.html +0 -116
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/index.js.html +0 -175
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/CycleButton.js.html +0 -217
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/CycleButton/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/EditableRefdataCategoryList.js.html +0 -751
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataCategoryList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +0 -853
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +0 -280
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -259
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -412
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -313
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +0 -574
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +0 -379
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/FormattedKintMessage.js.html +0 -247
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/FormattedKintMessage/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/IconSelect.js.html +0 -508
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/IconSelect/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +0 -361
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +0 -205
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +0 -370
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/ResponsiveButtonGroup.js.html +0 -580
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js.html +0 -301
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/RichSelect.js.html +0 -718
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/RichSelect/useSelectedOption.js.html +0 -127
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +0 -1069
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/TableBody.js.html +0 -400
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/TableBody/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +0 -346
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +0 -307
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +0 -214
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +0 -220
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +0 -208
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +0 -913
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/base.css +0 -224
- package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -87
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +0 -121
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +0 -97
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +0 -371
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +0 -136
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useAppSettings.js.html +0 -292
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +0 -214
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +0 -463
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +0 -520
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +0 -181
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +0 -163
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +0 -157
- package/src/artifacts/coverage-jest/lcov-report/hooks/useAvailableCustomProperties.js.html +0 -205
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +0 -325
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +0 -295
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKey.js.html +0 -151
- package/src/artifacts/coverage-jest/lcov-report/hooks/useIntlKeyStore.js.html +0 -199
- package/src/artifacts/coverage-jest/lcov-report/hooks/useInvalidateRefdata.js.html +0 -118
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKintIntl.js.html +0 -238
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +0 -274
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +0 -196
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +0 -136
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +0 -283
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataCategory.js.html +0 -274
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +0 -322
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +0 -208
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +0 -265
- package/src/artifacts/coverage-jest/lcov-report/hooks/useSASQQueryMeta.js.html +0 -187
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +0 -166
- package/src/artifacts/coverage-jest/lcov-report/index.html +0 -596
- package/src/artifacts/coverage-jest/lcov-report/prettify.css +0 -1
- package/src/artifacts/coverage-jest/lcov-report/prettify.js +0 -2
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useAppSettings.js.html +0 -292
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettingSection.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/settingsHooks/useSettings.js.html +0 -466
- package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/sorter.js +0 -196
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +0 -193
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +0 -109
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +0 -631
- package/src/artifacts/coverage-jest/lcov-report/utils/groupCustomPropertiesByCtx.js.html +0 -124
- package/src/artifacts/coverage-jest/lcov-report/utils/highlightString.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +0 -326
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +0 -160
- package/src/artifacts/coverage-jest/lcov-report/utils/matchString.js.html +0 -127
- package/src/artifacts/coverage-jest/lcov-report/utils/parseErrorResponse.js.html +0 -142
- package/src/artifacts/coverage-jest/lcov-report/utils/parseKiwtQueryGroups.js.html +0 -361
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +0 -109
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataQueryKey.js.html +0 -112
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +0 -166
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +0 -145
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +0 -130
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +0 -127
- package/src/artifacts/coverage-jest/lcov-report/utils/typedownQueryKey.js.html +0 -112
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +0 -370
- package/src/artifacts/coverage-jest/lcov-report/validators/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/validators/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/validators/validators.js.html +0 -370
- package/src/artifacts/coverage-jest/lcov.info +0 -5065
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -16,167 +15,135 @@ var _utils = require("../utils");
|
|
|
16
15
|
var _hooks = require("../hooks");
|
|
17
16
|
var _TableBody = _interopRequireDefault(require("./TableBody"));
|
|
18
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
-
var _excluded = ["data"];
|
|
20
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
_props$labelOverrides = props.labelOverrides,
|
|
57
|
-
labelOverrides = _props$labelOverrides === void 0 ? {} : _props$labelOverrides,
|
|
58
|
-
mainPaneProps = props.mainPaneProps,
|
|
59
|
-
noSearchField = props.noSearchField,
|
|
60
|
-
_props$persistedPanes = props.persistedPanesetProps,
|
|
61
|
-
persistedPanesetProps = _props$persistedPanes === void 0 ? {} : _props$persistedPanes,
|
|
62
|
-
RenderBody = props.RenderBody,
|
|
63
|
-
sasqProps = props.sasqProps,
|
|
64
|
-
searchFieldAriaLabel = props.searchFieldAriaLabel,
|
|
65
|
-
searchFieldProps = props.searchFieldProps;
|
|
66
|
-
var kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
67
|
-
var _useKiwtSASQuery = (0, _hooks.useKiwtSASQuery)(),
|
|
68
|
-
query = _useKiwtSASQuery.query,
|
|
69
|
-
queryGetter = _useKiwtSASQuery.queryGetter,
|
|
70
|
-
querySetter = _useKiwtSASQuery.querySetter;
|
|
71
|
-
var _useNamespace = (0, _core.useNamespace)(),
|
|
72
|
-
namespace = _useNamespace[0];
|
|
73
|
-
var ky = (0, _core.useOkapiKy)();
|
|
74
|
-
var filterPaneVisibileKey = "".concat(namespace, "-").concat(id, "-filterPaneVisibility");
|
|
75
|
-
var fetchPageData = function fetchPageData(_ref) {
|
|
76
|
-
var _ref$pageParam = _ref.pageParam,
|
|
77
|
-
pageParam = _ref$pageParam === void 0 ? 0 : _ref$pageParam;
|
|
78
|
-
var queryMap = fetchParameters.SASQ_MAP;
|
|
19
|
+
const SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
20
|
+
const {
|
|
21
|
+
children,
|
|
22
|
+
fetchParameters = {},
|
|
23
|
+
FilterComponent = () => null,
|
|
24
|
+
FilterPaneHeaderComponent = () => null,
|
|
25
|
+
filterPaneProps = {},
|
|
26
|
+
id,
|
|
27
|
+
intlKey: passedIntlKey,
|
|
28
|
+
intlNS: passedIntlNS,
|
|
29
|
+
labelOverrides = {},
|
|
30
|
+
mainPaneProps,
|
|
31
|
+
noSearchField,
|
|
32
|
+
persistedPanesetProps = {},
|
|
33
|
+
RenderBody,
|
|
34
|
+
sasqProps,
|
|
35
|
+
searchFieldAriaLabel,
|
|
36
|
+
searchFieldProps
|
|
37
|
+
} = props;
|
|
38
|
+
const kintIntl = (0, _hooks.useKintIntl)(passedIntlKey, passedIntlNS);
|
|
39
|
+
const {
|
|
40
|
+
query,
|
|
41
|
+
queryGetter,
|
|
42
|
+
querySetter
|
|
43
|
+
} = (0, _hooks.useKiwtSASQuery)();
|
|
44
|
+
const {
|
|
45
|
+
0: namespace
|
|
46
|
+
} = (0, _core.useNamespace)();
|
|
47
|
+
const ky = (0, _core.useOkapiKy)();
|
|
48
|
+
const filterPaneVisibileKey = `${namespace}-${id}-filterPaneVisibility`;
|
|
49
|
+
const fetchPageData = _ref => {
|
|
50
|
+
let {
|
|
51
|
+
pageParam = 0
|
|
52
|
+
} = _ref;
|
|
53
|
+
const queryMap = fetchParameters.SASQ_MAP;
|
|
79
54
|
queryMap.offset = pageParam;
|
|
80
|
-
return ky(
|
|
55
|
+
return ky(`${fetchParameters.endpoint}${(0, _utils.generateKiwtQuery)(queryMap, query)}`).json();
|
|
81
56
|
};
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
setFilterPaneVisible = _useLocalStorageState2[1];
|
|
86
|
-
var toggleFilterPane = function toggleFilterPane() {
|
|
87
|
-
return setFilterPaneVisible(!filterPaneVisible);
|
|
88
|
-
};
|
|
89
|
-
var queryNamespace = [namespace, 'SASQ'];
|
|
57
|
+
const [filterPaneVisible, setFilterPaneVisible] = (0, _hooks.useLocalStorageState)(filterPaneVisibileKey, true);
|
|
58
|
+
const toggleFilterPane = () => setFilterPaneVisible(!filterPaneVisible);
|
|
59
|
+
const queryNamespace = [namespace, 'SASQ'];
|
|
90
60
|
if (id) {
|
|
91
61
|
queryNamespace.push(id);
|
|
92
62
|
}
|
|
93
63
|
queryNamespace.push('viewAll');
|
|
94
64
|
queryNamespace.push(query);
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
(0, _react.useImperativeHandle)(ref,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
65
|
+
const {
|
|
66
|
+
data: totalData = {},
|
|
67
|
+
...restOfInfiniteQueryProps
|
|
68
|
+
} = (0, _reactQuery.useInfiniteQuery)(queryNamespace, fetchPageData);
|
|
69
|
+
(0, _react.useImperativeHandle)(ref, () => ({
|
|
70
|
+
lookupQueryProps: {
|
|
71
|
+
data: totalData,
|
|
72
|
+
...restOfInfiniteQueryProps
|
|
73
|
+
}
|
|
74
|
+
}));
|
|
75
|
+
const data = totalData.pages?.reduce((acc, curr) => {
|
|
76
|
+
const newAcc = {
|
|
77
|
+
...acc
|
|
104
78
|
};
|
|
105
|
-
|
|
106
|
-
var data = (_totalData$pages$redu = (_totalData$pages = totalData.pages) === null || _totalData$pages === void 0 ? void 0 : _totalData$pages.reduce(function (acc, curr) {
|
|
107
|
-
var _acc$results, _curr$results;
|
|
108
|
-
var newAcc = _objectSpread({}, acc);
|
|
109
|
-
for (var _i2 = 0, _Object$entries = Object.entries(curr); _i2 < _Object$entries.length; _i2++) {
|
|
110
|
-
var _Object$entries$_i = _slicedToArray(_Object$entries[_i2], 2),
|
|
111
|
-
key = _Object$entries$_i[0],
|
|
112
|
-
value = _Object$entries$_i[1];
|
|
79
|
+
for (const [key, value] of Object.entries(curr)) {
|
|
113
80
|
if (key !== 'page' && key !== 'result' && acc[key] !== value) {
|
|
114
81
|
newAcc[key] = value;
|
|
115
82
|
}
|
|
116
83
|
}
|
|
117
|
-
|
|
118
|
-
newResults.push
|
|
84
|
+
const newResults = [...(acc.results ?? [])];
|
|
85
|
+
newResults.push(...(curr.results ?? []));
|
|
119
86
|
newAcc.results = newResults;
|
|
120
87
|
return newAcc;
|
|
121
|
-
}, {})
|
|
122
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.SearchAndSortQuery,
|
|
88
|
+
}, {}) ?? {};
|
|
89
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.SearchAndSortQuery, {
|
|
123
90
|
initialSearchState: {
|
|
124
91
|
query: ''
|
|
125
92
|
},
|
|
126
93
|
queryGetter: queryGetter,
|
|
127
|
-
querySetter: querySetter
|
|
128
|
-
|
|
129
|
-
children:
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
94
|
+
querySetter: querySetter,
|
|
95
|
+
...sasqProps,
|
|
96
|
+
children: sasqRenderProps => {
|
|
97
|
+
const {
|
|
98
|
+
activeFilters,
|
|
99
|
+
filterChanged,
|
|
100
|
+
getFilterHandlers,
|
|
101
|
+
getSearchHandlers,
|
|
102
|
+
onSubmitSearch,
|
|
103
|
+
resetAll,
|
|
104
|
+
searchChanged,
|
|
105
|
+
searchValue
|
|
106
|
+
} = sasqRenderProps;
|
|
107
|
+
const searchHandlers = getSearchHandlers();
|
|
108
|
+
const disableReset = !filterChanged && !searchChanged;
|
|
109
|
+
const filterCount = activeFilters.string ? activeFilters.string.split(',').length : 0;
|
|
110
|
+
const Body = RenderBody ?? _TableBody.default;
|
|
111
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_smartComponents.PersistedPaneset, {
|
|
143
112
|
appId: namespace,
|
|
144
|
-
id:
|
|
145
|
-
|
|
146
|
-
children: [filterPaneVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane,
|
|
113
|
+
id: `${id}-paneset`,
|
|
114
|
+
...persistedPanesetProps,
|
|
115
|
+
children: [filterPaneVisible && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, {
|
|
147
116
|
defaultWidth: "20%",
|
|
148
|
-
id:
|
|
117
|
+
id: `${id}-filter-pane`,
|
|
149
118
|
lastMenu: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PaneMenu, {
|
|
150
119
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.IconButton, {
|
|
151
120
|
icon: "caret-left",
|
|
152
|
-
onClick:
|
|
153
|
-
return setFilterPaneVisible(false);
|
|
154
|
-
}
|
|
121
|
+
onClick: () => setFilterPaneVisible(false)
|
|
155
122
|
})
|
|
156
123
|
}),
|
|
157
124
|
paneTitle: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
158
125
|
id: "stripes-smart-components.searchAndFilter"
|
|
159
|
-
})
|
|
160
|
-
|
|
126
|
+
}),
|
|
127
|
+
...filterPaneProps,
|
|
161
128
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("form", {
|
|
162
129
|
onSubmit: onSubmitSearch,
|
|
163
130
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(FilterPaneHeaderComponent, {}), !noSearchField && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
164
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SearchField,
|
|
131
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SearchField, {
|
|
165
132
|
ariaLabel: searchFieldAriaLabel,
|
|
166
133
|
autoFocus: true,
|
|
167
|
-
id:
|
|
134
|
+
id: `sasq-search-field-${id}`,
|
|
168
135
|
name: "query",
|
|
169
|
-
onChange:
|
|
170
|
-
|
|
171
|
-
if ((_e$target = e.target) !== null && _e$target !== void 0 && _e$target.value) {
|
|
136
|
+
onChange: e => {
|
|
137
|
+
if (e.target?.value) {
|
|
172
138
|
searchHandlers.query(e); // SASQ needs the whole event here
|
|
173
139
|
} else {
|
|
174
140
|
searchHandlers.reset();
|
|
175
141
|
}
|
|
176
142
|
},
|
|
177
143
|
onClear: searchHandlers.reset,
|
|
178
|
-
value: searchValue.query
|
|
179
|
-
|
|
144
|
+
value: searchValue.query,
|
|
145
|
+
...searchFieldProps
|
|
146
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
180
147
|
buttonStyle: "primary",
|
|
181
148
|
disabled: !searchValue.query,
|
|
182
149
|
fullWidth: true,
|
|
@@ -206,40 +173,42 @@ var SASQLookupComponent = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
|
|
|
206
173
|
searchValue: searchValue
|
|
207
174
|
})]
|
|
208
175
|
})
|
|
209
|
-
})
|
|
176
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, {
|
|
210
177
|
defaultWidth: "fill",
|
|
211
178
|
firstMenu: !filterPaneVisible ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.PaneMenu, {
|
|
212
179
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.IconButton, {
|
|
213
180
|
badgeCount: filterCount,
|
|
214
181
|
icon: "caret-right",
|
|
215
|
-
onClick:
|
|
216
|
-
return setFilterPaneVisible(true);
|
|
217
|
-
}
|
|
182
|
+
onClick: () => setFilterPaneVisible(true)
|
|
218
183
|
})
|
|
219
184
|
}) : null,
|
|
220
|
-
id:
|
|
185
|
+
id: `${id}-main-pane`,
|
|
221
186
|
noOverflow: true,
|
|
222
187
|
padContent: false,
|
|
223
188
|
paneSub: kintIntl.formatKintMessage({
|
|
224
189
|
id: 'found#Values',
|
|
225
|
-
overrideValue: labelOverrides
|
|
190
|
+
overrideValue: labelOverrides?.foundValues
|
|
226
191
|
}, {
|
|
227
|
-
total: data
|
|
228
|
-
})
|
|
229
|
-
|
|
230
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Body,
|
|
192
|
+
total: data?.total
|
|
193
|
+
}),
|
|
194
|
+
...mainPaneProps,
|
|
195
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Body, {
|
|
231
196
|
data: data,
|
|
232
197
|
filterPaneVisible: filterPaneVisible,
|
|
233
198
|
intlKey: passedIntlKey,
|
|
234
199
|
intlNS: passedIntlNS,
|
|
235
200
|
labelOverrides: labelOverrides,
|
|
236
201
|
query: query,
|
|
237
|
-
toggleFilterPane: toggleFilterPane
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
202
|
+
toggleFilterPane: toggleFilterPane,
|
|
203
|
+
...restOfInfiniteQueryProps,
|
|
204
|
+
...sasqRenderProps,
|
|
205
|
+
...sasqProps,
|
|
206
|
+
...props
|
|
207
|
+
})
|
|
208
|
+
}), children]
|
|
209
|
+
});
|
|
241
210
|
}
|
|
242
|
-
})
|
|
211
|
+
});
|
|
243
212
|
});
|
|
244
213
|
SASQLookupComponent.propTypes = {
|
|
245
214
|
children: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node]),
|
|
@@ -266,5 +235,4 @@ SASQLookupComponent.propTypes = {
|
|
|
266
235
|
searchFieldAriaLabel: _propTypes.default.string,
|
|
267
236
|
searchFieldProps: _propTypes.default.object
|
|
268
237
|
};
|
|
269
|
-
var _default = SASQLookupComponent;
|
|
270
|
-
exports.default = _default;
|
|
238
|
+
var _default = exports.default = SASQLookupComponent;
|
|
@@ -10,81 +10,73 @@ var _components = require("@folio/stripes/components");
|
|
|
10
10
|
var _NoResultsMessage = _interopRequireDefault(require("../../NoResultsMessage"));
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
toggleFilterPane = _ref.toggleFilterPane,
|
|
37
|
-
query = _ref.query;
|
|
38
|
-
var sortOrder = (_query$sort = query.sort) !== null && _query$sort !== void 0 ? _query$sort : '';
|
|
39
|
-
var history = (0, _reactRouterDom.useHistory)();
|
|
40
|
-
var location = (0, _reactRouterDom.useLocation)();
|
|
41
|
-
var onNeedMoreData = function onNeedMoreData(_askAmount, index) {
|
|
13
|
+
const TableBody = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
data,
|
|
16
|
+
error,
|
|
17
|
+
fetchNextPage,
|
|
18
|
+
filterPaneVisible,
|
|
19
|
+
intlKey: passedIntlKey,
|
|
20
|
+
intlNS: passedIntlNS,
|
|
21
|
+
isError,
|
|
22
|
+
isLoading,
|
|
23
|
+
labelOverrides = {},
|
|
24
|
+
match,
|
|
25
|
+
mclProps,
|
|
26
|
+
onSort,
|
|
27
|
+
path,
|
|
28
|
+
resultColumns,
|
|
29
|
+
toggleFilterPane,
|
|
30
|
+
query
|
|
31
|
+
} = _ref;
|
|
32
|
+
const sortOrder = query.sort ?? '';
|
|
33
|
+
const history = (0, _reactRouterDom.useHistory)();
|
|
34
|
+
const location = (0, _reactRouterDom.useLocation)();
|
|
35
|
+
const onNeedMoreData = (_askAmount, index) => {
|
|
42
36
|
fetchNextPage({
|
|
43
37
|
pageParam: index
|
|
44
38
|
});
|
|
45
39
|
};
|
|
46
40
|
|
|
47
41
|
// Build the map of column definitions
|
|
48
|
-
|
|
49
|
-
return [e.propertyPath, e.label];
|
|
50
|
-
}));
|
|
42
|
+
const columnMapping = Object.fromEntries(resultColumns.map(e => [e.propertyPath, e.label]));
|
|
51
43
|
|
|
52
44
|
// Build the list of visible columns
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
});
|
|
56
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, _objectSpread({
|
|
45
|
+
const visibleColumns = resultColumns.map(e => e.propertyPath);
|
|
46
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, {
|
|
57
47
|
autosize: true,
|
|
58
48
|
columnMapping: columnMapping,
|
|
59
|
-
contentData: data
|
|
49
|
+
contentData: data?.results,
|
|
60
50
|
hasMargin: true,
|
|
61
51
|
isEmptyMessage: /*#__PURE__*/(0, _jsxRuntime.jsx)(_NoResultsMessage.default, {
|
|
62
|
-
error
|
|
52
|
+
error,
|
|
63
53
|
filterPaneIsVisible: filterPaneVisible,
|
|
64
54
|
intlKey: passedIntlKey,
|
|
65
55
|
intlNS: passedIntlNS,
|
|
66
|
-
isError
|
|
67
|
-
isLoading
|
|
68
|
-
labelOverrides
|
|
56
|
+
isError,
|
|
57
|
+
isLoading,
|
|
58
|
+
labelOverrides,
|
|
69
59
|
searchTerm: query.query,
|
|
70
|
-
toggleFilterPane
|
|
60
|
+
toggleFilterPane
|
|
71
61
|
}),
|
|
72
|
-
isSelected:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
62
|
+
isSelected: _ref2 => {
|
|
63
|
+
let {
|
|
64
|
+
item
|
|
65
|
+
} = _ref2;
|
|
66
|
+
return item.id === match?.params?.id;
|
|
76
67
|
},
|
|
77
68
|
onHeaderClick: onSort,
|
|
78
69
|
onNeedMoreData: onNeedMoreData,
|
|
79
|
-
onRowClick:
|
|
80
|
-
history.push(
|
|
70
|
+
onRowClick: (_e, rowData) => {
|
|
71
|
+
history.push(`${path}/${rowData?.id}${location?.search}`);
|
|
81
72
|
},
|
|
82
73
|
pagingType: "click",
|
|
83
74
|
sortDirection: sortOrder.startsWith('-') ? 'descending' : 'ascending',
|
|
84
75
|
sortOrder: sortOrder.replace(/^-/, '').replace(/,.*/, ''),
|
|
85
76
|
totalCount: data.totalRecords,
|
|
86
|
-
visibleColumns: visibleColumns
|
|
87
|
-
|
|
77
|
+
visibleColumns: visibleColumns,
|
|
78
|
+
...mclProps
|
|
79
|
+
});
|
|
88
80
|
};
|
|
89
81
|
TableBody.propTypes = {
|
|
90
82
|
data: _propTypes.default.shape({
|
|
@@ -109,5 +101,4 @@ TableBody.propTypes = {
|
|
|
109
101
|
resultColumns: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
110
102
|
toggleFilterPane: _propTypes.default.func
|
|
111
103
|
};
|
|
112
|
-
var _default = TableBody;
|
|
113
|
-
exports.default = _default;
|
|
104
|
+
var _default = exports.default = TableBody;
|
|
@@ -5,13 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "SASQLookupComponent", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _SASQLookupComponent.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "TableBody", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _TableBody.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
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
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -11,28 +10,24 @@ var _reactRouterDom = require("react-router-dom");
|
|
|
11
10
|
var _SASQLookupComponent = require("../SASQLookupComponent");
|
|
12
11
|
var _SASQViewComponent = _interopRequireDefault(require("../SASQViewComponent"));
|
|
13
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
var _excluded = ["children", "fetchParameters", "path"];
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var SASQRoute = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
24
|
-
var children = _ref.children,
|
|
25
|
-
fetchParameters = _ref.fetchParameters,
|
|
26
|
-
path = _ref.path,
|
|
27
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
14
|
+
const SASQRoute = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
15
|
+
let {
|
|
16
|
+
children,
|
|
17
|
+
fetchParameters,
|
|
18
|
+
path,
|
|
19
|
+
...props
|
|
20
|
+
} = _ref;
|
|
28
21
|
// Grab the SASQ_MAP and tweak it
|
|
29
|
-
|
|
30
|
-
SASQ_MAP =
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
(0, _react.
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
const {
|
|
23
|
+
SASQ_MAP = {}
|
|
24
|
+
} = fetchParameters;
|
|
25
|
+
const lookupRef = (0, _react.useRef)();
|
|
26
|
+
const viewRef = (0, _react.useRef)();
|
|
27
|
+
(0, _react.useImperativeHandle)(ref, () => ({
|
|
28
|
+
...lookupRef.current,
|
|
29
|
+
...viewRef.current
|
|
30
|
+
}));
|
|
36
31
|
if (!SASQ_MAP.perPage) {
|
|
37
32
|
SASQ_MAP.perPage = 25;
|
|
38
33
|
}
|
|
@@ -41,29 +36,28 @@ var SASQRoute = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
41
36
|
// Reinsert the SASQ_MAP
|
|
42
37
|
fetchParameters.SASQ_MAP = SASQ_MAP;
|
|
43
38
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
|
|
44
|
-
path:
|
|
45
|
-
render:
|
|
46
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQLookupComponent.SASQLookupComponent,
|
|
47
|
-
ref: lookupRef
|
|
48
|
-
|
|
39
|
+
path: `${path}/:id?`,
|
|
40
|
+
render: routeProps => {
|
|
41
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQLookupComponent.SASQLookupComponent, {
|
|
42
|
+
ref: lookupRef,
|
|
43
|
+
...routeProps,
|
|
49
44
|
fetchParameters: fetchParameters,
|
|
50
|
-
path: path
|
|
51
|
-
|
|
45
|
+
path: path,
|
|
46
|
+
...props,
|
|
52
47
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactRouterDom.Switch, {
|
|
53
48
|
children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
|
|
54
|
-
path:
|
|
55
|
-
render:
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
49
|
+
path: `${path}/:id`,
|
|
50
|
+
render: innerProps => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQViewComponent.default, {
|
|
51
|
+
ref: viewRef,
|
|
52
|
+
...innerProps,
|
|
53
|
+
fetchParameters: fetchParameters,
|
|
54
|
+
path: path,
|
|
55
|
+
ViewComponent: props.ViewComponent,
|
|
56
|
+
...props
|
|
57
|
+
})
|
|
64
58
|
})]
|
|
65
59
|
})
|
|
66
|
-
})
|
|
60
|
+
});
|
|
67
61
|
}
|
|
68
62
|
});
|
|
69
63
|
});
|
|
@@ -73,5 +67,4 @@ SASQRoute.propTypes = {
|
|
|
73
67
|
path: _propTypes.default.string,
|
|
74
68
|
ViewComponent: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node])
|
|
75
69
|
};
|
|
76
|
-
var _default = SASQRoute;
|
|
77
|
-
exports.default = _default;
|
|
70
|
+
var _default = exports.default = SASQRoute;
|