@k-int/stripes-kint-components 3.2.2 → 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 +10 -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 -177
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.test.js +30 -73
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +93 -106
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +83 -129
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +42 -43
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +48 -153
- 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 -69
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +134 -134
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +95 -192
- 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 -63
- 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 -49
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +19 -22
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +23 -56
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +44 -49
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.test.js +77 -257
- 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 +25 -31
- 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 -164
- package/es/lib/EditableRefdataCategoryList/index.js +1 -1
- package/es/lib/EditableRefdataList/EditableRefdataList.js +119 -181
- 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 -96
- 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 -299
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +76 -111
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +51 -172
- 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 -73
- package/es/lib/hooks/useMutateRefdataCategory.js +22 -68
- package/es/lib/hooks/useMutateRefdataValue.js +31 -73
- 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 -67
- 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/src/lib/CustomProperties/View/CustomPropertyCard.js +3 -3
- 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 -273
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +0 -364
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +0 -1426
- 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 -1162
- 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 -664
- 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 -730
- 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 -271
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -250
- 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 -559
- 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 -190
- 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 -571
- 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 -253
- 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 -208
- 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 -901
- 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 -139
- 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 -283
- 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 -581
- 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/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 -341
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +0 -193
- 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 -280
- 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 -103
- 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.info +0 -4957
|
@@ -4,25 +4,14 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.TYPE_CLASS_PREFIX = exports.TEXT_CLASS_NAME = exports.REFDATA_DEFINITION_CLASS_NAME = exports.REFDATA_CLASS_NAME = exports.MULTI_REFDATA_CLASS_NAME = exports.INTEGER_CLASS_NAME = exports.DECIMAL_CLASS_NAME = exports.DATE_CLASS_NAME = exports.CONTAINER_CLASS_NAME = exports.BOOLEAN_CLASS_NAME = exports.BLOB_CLASS_NAME = void 0;
|
|
7
|
-
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
exports.
|
|
11
|
-
|
|
12
|
-
exports.
|
|
13
|
-
|
|
14
|
-
exports.
|
|
15
|
-
|
|
16
|
-
exports.
|
|
17
|
-
|
|
18
|
-
exports.INTEGER_CLASS_NAME = INTEGER_CLASS_NAME;
|
|
19
|
-
var REFDATA_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata';
|
|
20
|
-
exports.REFDATA_CLASS_NAME = REFDATA_CLASS_NAME;
|
|
21
|
-
var MULTI_REFDATA_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyMultiRefdata';
|
|
22
|
-
exports.MULTI_REFDATA_CLASS_NAME = MULTI_REFDATA_CLASS_NAME;
|
|
23
|
-
var REFDATA_DEFINITION_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdataDefinition';
|
|
24
|
-
exports.REFDATA_DEFINITION_CLASS_NAME = REFDATA_DEFINITION_CLASS_NAME;
|
|
25
|
-
var TEXT_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyText';
|
|
26
|
-
exports.TEXT_CLASS_NAME = TEXT_CLASS_NAME;
|
|
27
|
-
var DATE_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyLocalDate';
|
|
28
|
-
exports.DATE_CLASS_NAME = DATE_CLASS_NAME;
|
|
7
|
+
const TYPE_CLASS_PREFIX = exports.TYPE_CLASS_PREFIX = 'com.k_int.web.toolkit.custprops.types.CustomProperty';
|
|
8
|
+
const BLOB_CLASS_NAME = exports.BLOB_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyBlob';
|
|
9
|
+
const BOOLEAN_CLASS_NAME = exports.BOOLEAN_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyBoolean';
|
|
10
|
+
const CONTAINER_CLASS_NAME = exports.CONTAINER_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyContainer';
|
|
11
|
+
const DECIMAL_CLASS_NAME = exports.DECIMAL_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyDecimal';
|
|
12
|
+
const INTEGER_CLASS_NAME = exports.INTEGER_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyInteger';
|
|
13
|
+
const REFDATA_CLASS_NAME = exports.REFDATA_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata';
|
|
14
|
+
const MULTI_REFDATA_CLASS_NAME = exports.MULTI_REFDATA_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyMultiRefdata';
|
|
15
|
+
const REFDATA_DEFINITION_CLASS_NAME = exports.REFDATA_DEFINITION_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdataDefinition';
|
|
16
|
+
const TEXT_CLASS_NAME = exports.TEXT_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyText';
|
|
17
|
+
const DATE_CLASS_NAME = exports.DATE_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyLocalDate';
|
|
@@ -4,9 +4,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.UP_ARROW = exports.TAB = exports.DOWN_ARROW = void 0;
|
|
7
|
-
|
|
8
|
-
exports.
|
|
9
|
-
|
|
10
|
-
exports.DOWN_ARROW = DOWN_ARROW;
|
|
11
|
-
var TAB = 'Tab';
|
|
12
|
-
exports.TAB = TAB;
|
|
7
|
+
const UP_ARROW = exports.UP_ARROW = 'ArrowUp';
|
|
8
|
+
const DOWN_ARROW = exports.DOWN_ARROW = 'ArrowDown';
|
|
9
|
+
const TAB = exports.TAB = 'Tab';
|
|
@@ -5,6 +5,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
|
|
9
|
-
var _default = SettingsContext;
|
|
10
|
-
exports.default = _default;
|
|
8
|
+
const SettingsContext = /*#__PURE__*/(0, _react.createContext)();
|
|
9
|
+
var _default = exports.default = SettingsContext;
|
package/es/lib/contexts/index.js
CHANGED
|
@@ -6,36 +6,16 @@ var _useKintIntl = _interopRequireDefault(require("../useKintIntl"));
|
|
|
6
6
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
7
7
|
// We have to do this up here too so that our passed useKintIntl
|
|
8
8
|
// ALSO has a mocked useIntlKeyStore... I think anyway
|
|
9
|
-
jest.mock('../useIntlKeyStore',
|
|
10
|
-
return function () {
|
|
11
|
-
return function () {
|
|
12
|
-
return 'ui-test-implementor';
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
});
|
|
9
|
+
jest.mock('../useIntlKeyStore', () => () => () => 'ui-test-implementor');
|
|
16
10
|
module.exports = {
|
|
17
|
-
useRefdata:
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
useTemplates: function useTemplates() {
|
|
21
|
-
return [];
|
|
22
|
-
},
|
|
11
|
+
useRefdata: () => _refdata.default,
|
|
12
|
+
useTemplates: () => [],
|
|
23
13
|
// We should set up some templates to test this properly
|
|
24
|
-
useCustomProperties:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
useMutateCustomProperties: function useMutateCustomProperties() {
|
|
31
|
-
return [];
|
|
32
|
-
},
|
|
33
|
-
useIntlKeyStore: function useIntlKeyStore() {
|
|
34
|
-
return function () {
|
|
35
|
-
return function () {
|
|
36
|
-
return 'ui-test-implementor';
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
},
|
|
14
|
+
useCustomProperties: () => ({
|
|
15
|
+
data: _customProperties.default,
|
|
16
|
+
isLoading: false
|
|
17
|
+
}),
|
|
18
|
+
useMutateCustomProperties: () => [],
|
|
19
|
+
useIntlKeyStore: () => () => () => 'ui-test-implementor',
|
|
40
20
|
useKintIntl: _useKintIntl.default // Use the "proper" useKintIntl but with a mocked intlKeyStore which returns the ui-test-implementor
|
|
41
21
|
};
|
package/es/lib/hooks/index.js
CHANGED
|
@@ -5,121 +5,121 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "useActiveElement", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _useActiveElement.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "useAppSettings", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _settingsHooks.useAppSettings;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "useCustomProperties", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _useCustomProperties.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "useHelperApp", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _useHelperApp.default;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "useIntlKey", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _useIntlKey.default;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "useIntlKeyStore", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function
|
|
38
|
+
get: function () {
|
|
39
39
|
return _useIntlKeyStore.default;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "useInvalidateRefdata", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function
|
|
44
|
+
get: function () {
|
|
45
45
|
return _useInvalidateRefdata.default;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "useKintIntl", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function
|
|
50
|
+
get: function () {
|
|
51
51
|
return _useKintIntl.default;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "useKiwtFieldArray", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function
|
|
56
|
+
get: function () {
|
|
57
57
|
return _useKiwtFieldArray.default;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "useKiwtSASQuery", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function
|
|
62
|
+
get: function () {
|
|
63
63
|
return _useKiwtSASQuery.default;
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "useLocalStorageState", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function
|
|
68
|
+
get: function () {
|
|
69
69
|
return _useLocalStorageState.default;
|
|
70
70
|
}
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "useMutateCustomProperties", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function
|
|
74
|
+
get: function () {
|
|
75
75
|
return _useMutateCustomProperties.default;
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
Object.defineProperty(exports, "useMutateRefdataCategory", {
|
|
79
79
|
enumerable: true,
|
|
80
|
-
get: function
|
|
80
|
+
get: function () {
|
|
81
81
|
return _useMutateRefdataCategory.default;
|
|
82
82
|
}
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "useMutateRefdataValue", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function
|
|
86
|
+
get: function () {
|
|
87
87
|
return _useMutateRefdataValue.default;
|
|
88
88
|
}
|
|
89
89
|
});
|
|
90
90
|
Object.defineProperty(exports, "useQIndex", {
|
|
91
91
|
enumerable: true,
|
|
92
|
-
get: function
|
|
92
|
+
get: function () {
|
|
93
93
|
return _useQIndex.default;
|
|
94
94
|
}
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "useRefdata", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function
|
|
98
|
+
get: function () {
|
|
99
99
|
return _useRefdata.default;
|
|
100
100
|
}
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "useSASQQueryMeta", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function
|
|
104
|
+
get: function () {
|
|
105
105
|
return _useSASQQueryMeta.default;
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "useSettingSection", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function
|
|
110
|
+
get: function () {
|
|
111
111
|
return _settingsHooks.useSettingSection;
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "useSettings", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function
|
|
116
|
+
get: function () {
|
|
117
117
|
return _settingsHooks.useSettings;
|
|
118
118
|
}
|
|
119
119
|
});
|
|
120
120
|
Object.defineProperty(exports, "useTemplates", {
|
|
121
121
|
enumerable: true,
|
|
122
|
-
get: function
|
|
122
|
+
get: function () {
|
|
123
123
|
return _useTemplates.default;
|
|
124
124
|
}
|
|
125
125
|
});
|
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "useAppSettings", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _useAppSettings.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "useSettingSection", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _useSettingSection.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "useSettings", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _useSettings.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
@@ -7,57 +7,45 @@ exports.default = void 0;
|
|
|
7
7
|
var _reactQuery = require("react-query");
|
|
8
8
|
var _core = require("@folio/stripes/core");
|
|
9
9
|
var _utils = require("../../utils");
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_ref$returnQueryObjec = _ref.returnQueryObject,
|
|
22
|
-
returnQueryObject = _ref$returnQueryObjec === void 0 ? false : _ref$returnQueryObjec,
|
|
23
|
-
sectionName = _ref.sectionName,
|
|
24
|
-
queryParams = _ref.queryParams;
|
|
25
|
-
var ky = (0, _core.useOkapiKy)();
|
|
26
|
-
var defaultQueryParamObject = {
|
|
10
|
+
const useAppSettings = _ref => {
|
|
11
|
+
let {
|
|
12
|
+
endpoint,
|
|
13
|
+
keyName,
|
|
14
|
+
options,
|
|
15
|
+
returnQueryObject = false,
|
|
16
|
+
sectionName,
|
|
17
|
+
queryParams
|
|
18
|
+
} = _ref;
|
|
19
|
+
const ky = (0, _core.useOkapiKy)();
|
|
20
|
+
const defaultQueryParamObject = {
|
|
27
21
|
perPage: 100,
|
|
28
22
|
stats: false
|
|
29
23
|
};
|
|
30
|
-
|
|
24
|
+
const namespaceArray = [endpoint];
|
|
31
25
|
if (sectionName) {
|
|
32
|
-
|
|
33
|
-
defaultQueryParamObject.filters = [].concat(_toConsumableArray((_defaultQueryParamObj = defaultQueryParamObject.filters) !== null && _defaultQueryParamObj !== void 0 ? _defaultQueryParamObj : []), [{
|
|
26
|
+
defaultQueryParamObject.filters = [...(defaultQueryParamObject.filters ?? []), {
|
|
34
27
|
path: 'section',
|
|
35
28
|
value: sectionName
|
|
36
|
-
}]
|
|
29
|
+
}];
|
|
37
30
|
namespaceArray.push(sectionName);
|
|
38
31
|
}
|
|
39
32
|
if (keyName) {
|
|
40
|
-
|
|
41
|
-
defaultQueryParamObject.filters = [].concat(_toConsumableArray((_defaultQueryParamObj2 = defaultQueryParamObject.filters) !== null && _defaultQueryParamObj2 !== void 0 ? _defaultQueryParamObj2 : []), [{
|
|
33
|
+
defaultQueryParamObject.filters = [...(defaultQueryParamObject.filters ?? []), {
|
|
42
34
|
path: 'key',
|
|
43
35
|
value: keyName
|
|
44
|
-
}]
|
|
36
|
+
}];
|
|
45
37
|
defaultQueryParamObject.perPage = 1;
|
|
46
38
|
namespaceArray.push(keyName);
|
|
47
39
|
}
|
|
48
|
-
|
|
40
|
+
const queryParamArray = (0, _utils.generateKiwtQueryParams)(options ?? defaultQueryParamObject, {});
|
|
49
41
|
namespaceArray.push(queryParamArray);
|
|
50
|
-
|
|
51
|
-
return ky("".concat(endpoint, "?").concat(queryParamArray === null || queryParamArray === void 0 ? void 0 : queryParamArray.join('&'))).json();
|
|
52
|
-
}, queryParams);
|
|
42
|
+
const queryObject = (0, _reactQuery.useQuery)(namespaceArray, () => ky(`${endpoint}?${queryParamArray?.join('&')}`).json(), queryParams);
|
|
53
43
|
if (returnQueryObject) {
|
|
54
44
|
return queryObject;
|
|
55
45
|
}
|
|
56
|
-
if ((
|
|
57
|
-
|
|
58
|
-
return (_queryObject$data$ = queryObject === null || queryObject === void 0 ? void 0 : (_queryObject$data = queryObject.data) === null || _queryObject$data === void 0 ? void 0 : _queryObject$data[0]) !== null && _queryObject$data$ !== void 0 ? _queryObject$data$ : {};
|
|
46
|
+
if ((queryParams ?? defaultQueryParamObject)?.perPage && (queryParams ?? defaultQueryParamObject)?.perPage === 1) {
|
|
47
|
+
return queryObject?.data?.[0] ?? {};
|
|
59
48
|
}
|
|
60
|
-
return
|
|
49
|
+
return queryObject?.data ?? [];
|
|
61
50
|
};
|
|
62
|
-
var _default = useAppSettings;
|
|
63
|
-
exports.default = _default;
|
|
51
|
+
var _default = exports.default = useAppSettings;
|
|
@@ -9,11 +9,13 @@ var _reactQuery = require("react-query");
|
|
|
9
9
|
var _core = require("@folio/stripes/core");
|
|
10
10
|
var _utils = require("../../utils");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const useSettingSection = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
sectionName,
|
|
15
|
+
settingEndpoint
|
|
16
|
+
} = _ref;
|
|
17
|
+
const ky = (0, _core.useOkapiKy)();
|
|
18
|
+
const queryParams = (0, _utils.generateKiwtQueryParams)({
|
|
17
19
|
filters: [{
|
|
18
20
|
path: 'section',
|
|
19
21
|
value: sectionName
|
|
@@ -24,21 +26,17 @@ var useSettingSection = function useSettingSection(_ref) {
|
|
|
24
26
|
perPage: 100,
|
|
25
27
|
stats: false
|
|
26
28
|
}, {});
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
});
|
|
36
|
-
}),
|
|
37
|
-
putSetting = _useMutation.mutateAsync;
|
|
29
|
+
const {
|
|
30
|
+
data: settings = []
|
|
31
|
+
} = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSetting', 'appSettings', queryParams, sectionName], () => ky(`${settingEndpoint}?${queryParams?.join('&')}`).json());
|
|
32
|
+
const {
|
|
33
|
+
mutateAsync: putSetting
|
|
34
|
+
} = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useSetting', 'putSetting', sectionName], data => ky.put(`${settingEndpoint}${data.id ? '/' + data.id : ''}`, {
|
|
35
|
+
json: data
|
|
36
|
+
}));
|
|
38
37
|
return {
|
|
39
38
|
handleSubmit: putSetting,
|
|
40
|
-
settings
|
|
39
|
+
settings
|
|
41
40
|
};
|
|
42
41
|
};
|
|
43
|
-
var _default = useSettingSection;
|
|
44
|
-
exports.default = _default;
|
|
42
|
+
var _default = exports.default = useSettingSection;
|
|
@@ -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
|
});
|
|
@@ -17,82 +16,67 @@ var _useKintIntl = _interopRequireDefault(require("../useKintIntl"));
|
|
|
17
16
|
var _useIntlKey = _interopRequireDefault(require("../useIntlKey"));
|
|
18
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
settingEndpoint = _ref.settingEndpoint,
|
|
40
|
-
templateEndpoint = _ref.templateEndpoint;
|
|
41
|
-
var ky = (0, _core.useOkapiKy)();
|
|
42
|
-
var kintIntl = (0, _useKintIntl.default)(passedIntlKey, passedIntlNS);
|
|
43
|
-
var queryParams = (0, _utils.generateKiwtQueryParams)({
|
|
44
|
-
filters: dynamicPageExclusions === null || dynamicPageExclusions === void 0 ? void 0 : dynamicPageExclusions.map(function (dpe) {
|
|
45
|
-
return {
|
|
46
|
-
path: 'section',
|
|
47
|
-
comparator: '!=',
|
|
48
|
-
value: dpe
|
|
49
|
-
};
|
|
50
|
-
}),
|
|
19
|
+
const useSettings = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
dynamicPageExclusions,
|
|
22
|
+
intlKey: passedIntlKey,
|
|
23
|
+
intlNS: passedIntlNS,
|
|
24
|
+
labelOverrides = {},
|
|
25
|
+
persistentPages,
|
|
26
|
+
refdataEndpoint,
|
|
27
|
+
settingEndpoint,
|
|
28
|
+
templateEndpoint
|
|
29
|
+
} = _ref;
|
|
30
|
+
const ky = (0, _core.useOkapiKy)();
|
|
31
|
+
const kintIntl = (0, _useKintIntl.default)(passedIntlKey, passedIntlNS);
|
|
32
|
+
const queryParams = (0, _utils.generateKiwtQueryParams)({
|
|
33
|
+
filters: dynamicPageExclusions?.map(dpe => ({
|
|
34
|
+
path: 'section',
|
|
35
|
+
comparator: '!=',
|
|
36
|
+
value: dpe
|
|
37
|
+
})),
|
|
51
38
|
perPage: 100,
|
|
52
39
|
stats: false
|
|
53
40
|
}, {});
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var sections = _toConsumableArray(new Set(appSettings.map(function (s) {
|
|
61
|
-
return s.section;
|
|
62
|
-
})));
|
|
63
|
-
var dynamic = sections.map(function (section) {
|
|
41
|
+
const {
|
|
42
|
+
data: appSettings = [],
|
|
43
|
+
isLoading
|
|
44
|
+
} = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useSettings', 'appSettings', settingEndpoint, queryParams], () => ky(`${settingEndpoint}?${queryParams?.join('&')}`).json());
|
|
45
|
+
const sections = [...new Set(appSettings.map(s => s.section))];
|
|
46
|
+
const dynamic = sections.map(section => {
|
|
64
47
|
return {
|
|
65
48
|
route: section,
|
|
66
49
|
label: kintIntl.formatKintMessage({
|
|
67
|
-
id:
|
|
50
|
+
id: `settings.settingsSection.${(0, _utils.toCamelCase)(section)}`,
|
|
68
51
|
fallbackMessage: section
|
|
69
52
|
}),
|
|
70
|
-
component:
|
|
71
|
-
|
|
53
|
+
component: props => /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingPage.SettingPagePane, {
|
|
54
|
+
intlKey: passedIntlKey,
|
|
55
|
+
intlNS: passedIntlNS,
|
|
56
|
+
sectionName: section,
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_SettingPage.SettingPage, {
|
|
72
58
|
intlKey: passedIntlKey,
|
|
73
59
|
intlNS: passedIntlNS,
|
|
60
|
+
labelOverrides: labelOverrides,
|
|
74
61
|
sectionName: section,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
labelOverrides: labelOverrides,
|
|
79
|
-
sectionName: section
|
|
80
|
-
}, props))
|
|
81
|
-
});
|
|
82
|
-
}
|
|
62
|
+
...props
|
|
63
|
+
})
|
|
64
|
+
})
|
|
83
65
|
};
|
|
84
66
|
});
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
67
|
+
const pageList = persistentPages.concat(dynamic).sort(_utils.sortByLabel);
|
|
68
|
+
const intlKey = (0, _useIntlKey.default)(passedIntlKey, passedIntlNS);
|
|
69
|
+
const SettingsContextProvider = _ref2 => {
|
|
70
|
+
let {
|
|
71
|
+
children
|
|
72
|
+
} = _ref2;
|
|
89
73
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_contexts.SettingsContext.Provider, {
|
|
90
74
|
value: {
|
|
91
|
-
intlKey
|
|
75
|
+
intlKey,
|
|
92
76
|
// This is only here for backwards compatibility... is now grabbed from useIntlKey instead of what's passed in directly
|
|
93
|
-
refdataEndpoint
|
|
94
|
-
settingEndpoint
|
|
95
|
-
templateEndpoint
|
|
77
|
+
refdataEndpoint,
|
|
78
|
+
settingEndpoint,
|
|
79
|
+
templateEndpoint
|
|
96
80
|
},
|
|
97
81
|
children: children
|
|
98
82
|
});
|
|
@@ -100,25 +84,27 @@ var useSettings = function useSettings(_ref) {
|
|
|
100
84
|
SettingsContextProvider.propTypes = {
|
|
101
85
|
children: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node])
|
|
102
86
|
};
|
|
103
|
-
|
|
104
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.Settings,
|
|
87
|
+
const SettingsComponent = props => {
|
|
88
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_smartComponents.Settings, {
|
|
105
89
|
pages: pageList,
|
|
106
90
|
paneTitle: kintIntl.formatKintMessage({
|
|
107
91
|
id: 'meta.title'
|
|
108
|
-
})
|
|
109
|
-
|
|
92
|
+
}),
|
|
93
|
+
...props
|
|
94
|
+
});
|
|
110
95
|
};
|
|
111
|
-
|
|
96
|
+
const SettingsComponentWithContext = props => {
|
|
112
97
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(SettingsContextProvider, {
|
|
113
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SettingsComponent,
|
|
98
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(SettingsComponent, {
|
|
99
|
+
...props
|
|
100
|
+
})
|
|
114
101
|
});
|
|
115
102
|
};
|
|
116
103
|
return {
|
|
117
|
-
isLoading
|
|
118
|
-
pageList
|
|
104
|
+
isLoading,
|
|
105
|
+
pageList,
|
|
119
106
|
SettingsComponent: SettingsComponentWithContext,
|
|
120
|
-
SettingsContextProvider
|
|
107
|
+
SettingsContextProvider
|
|
121
108
|
};
|
|
122
109
|
};
|
|
123
|
-
var _default = useSettings;
|
|
124
|
-
exports.default = _default;
|
|
110
|
+
var _default = exports.default = useSettings;
|
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "useTypedown", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _useTypedown.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "useTypedownData", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _useTypedownData.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "useTypedownToggle", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _useTypedownToggle.default;
|
|
22
22
|
}
|
|
23
23
|
});
|