@k-int/stripes-kint-components 1.6.0 → 1.7.1
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 +15 -1
- package/es/index.js +34 -48
- package/es/lib/ActionList/ActionList.js +29 -69
- package/es/lib/ActionList/ActionListFieldArray.js +105 -211
- package/es/lib/ActionList/index.js +2 -8
- package/es/lib/EditableRefdataList/EditableRefdataList.js +48 -127
- package/es/lib/EditableRefdataList/index.js +2 -8
- package/es/lib/EditableSettingsList/EditableSettingsList.js +11 -47
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +16 -61
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +62 -137
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +23 -91
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +103 -127
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +19 -75
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +188 -357
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +39 -120
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +61 -157
- package/es/lib/EditableSettingsList/SettingField/index.js +4 -12
- package/es/lib/EditableSettingsList/index.js +4 -12
- package/es/lib/NoResultsMessage/NoResultsMessage.js +24 -61
- package/es/lib/NoResultsMessage/index.js +2 -8
- package/es/lib/QueryTypedown/QueryTypedown.js +15 -89
- package/es/lib/QueryTypedown/index.js +2 -8
- package/es/lib/RefdataButtons/RefdataButtons.js +32 -85
- package/es/lib/RefdataButtons/index.js +2 -8
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +122 -224
- package/es/lib/SASQLookupComponent/index.js +2 -8
- package/es/lib/SASQRoute/SASQRoute.js +27 -76
- package/es/lib/SASQRoute/index.js +2 -8
- package/es/lib/SASQViewComponent/SASQViewComponent.js +28 -89
- package/es/lib/SASQViewComponent/index.js +2 -8
- package/es/lib/SearchField/SearchField.js +11 -61
- package/es/lib/SearchField/index.js +2 -8
- package/es/lib/SettingPage/SettingPage.js +17 -63
- package/es/lib/SettingPage/SettingPagePane.js +13 -58
- package/es/lib/SettingPage/index.js +3 -10
- package/es/lib/TypeDown/TypeDown.js +61 -132
- package/es/lib/TypeDown/index.js +2 -8
- package/es/lib/Typedown/Typedown.js +74 -153
- package/es/lib/Typedown/index.js +2 -8
- package/es/lib/constants/eventCodes.js +3 -36
- package/es/lib/contexts/SettingsContext.js +2 -34
- package/es/lib/contexts/index.js +2 -8
- package/es/lib/hooks/index.js +12 -27
- package/es/lib/hooks/settingsHooks/index.js +3 -10
- package/es/lib/hooks/settingsHooks/useSettingSection.js +16 -60
- package/es/lib/hooks/settingsHooks/useSettings.js +51 -130
- package/es/lib/hooks/typedownHooks/index.js +4 -12
- package/es/lib/hooks/typedownHooks/useTypedown.js +60 -114
- package/es/lib/hooks/typedownHooks/useTypedownData.js +13 -69
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +15 -71
- package/es/lib/hooks/useActiveElement.js +10 -63
- package/es/lib/hooks/useHelperApp.js +37 -111
- package/es/lib/hooks/useKiwtFieldArray.js +35 -101
- package/es/lib/hooks/useKiwtSASQuery.js +36 -107
- package/es/lib/hooks/useLocalStorageState.js +7 -69
- package/es/lib/hooks/useMutateRefdataValue.js +31 -115
- package/es/lib/hooks/useQIndex.js +17 -87
- package/es/lib/hooks/useRefdata.js +19 -71
- package/es/lib/hooks/useTemplates.js +16 -60
- package/es/lib/utils/buildUrl.js +11 -51
- package/es/lib/utils/generateKiwtQuery.js +4 -40
- package/es/lib/utils/generateKiwtQueryParams.js +38 -125
- package/es/lib/utils/index.js +15 -20
- package/es/lib/utils/refdataOptions.js +13 -0
- package/es/lib/utils/renderHelpText.js +32 -89
- package/es/lib/utils/selectorSafe.js +2 -34
- package/es/lib/utils/sortByLabel.js +4 -41
- package/es/lib/utils/toCamelCase.js +8 -42
- package/package.json +17 -3
- package/src/index.js +1 -0
- package/src/lib/ActionList/ActionList.js +5 -2
- package/src/lib/ActionList/ActionListFieldArray.js +20 -8
- package/src/lib/ActionList/README.md +1 -0
- package/src/lib/EditableRefdataList/EditableRefdataList.js +9 -4
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +6 -0
- package/src/lib/hooks/useRefdata.js +2 -8
- package/src/lib/utils/index.js +2 -0
- package/src/lib/utils/refdataOptions.js +7 -0
- package/artifacts/coverage-jest/lcov-report/base.css +0 -224
- package/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -87
- package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/ActionList.js.html +0 -389
- package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/ActionListFieldArray.js.html +0 -1076
- package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/index.html +0 -147
- package/artifacts/coverage-jest/lcov-report/es/lib/ActionList/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableRefdataList/EditableRefdataList.js.html +0 -680
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableRefdataList/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableRefdataList/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/EditableSettingsList.js.html +0 -353
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -353
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -482
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -434
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/SettingField.js.html +0 -644
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/index.html +0 -162
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/SettingField/index.js.html +0 -188
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/index.html +0 -147
- package/artifacts/coverage-jest/lcov-report/es/lib/EditableSettingsList/index.js.html +0 -188
- package/artifacts/coverage-jest/lcov-report/es/lib/NoResultsMessage/NoResultsMessage.js.html +0 -449
- package/artifacts/coverage-jest/lcov-report/es/lib/NoResultsMessage/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/NoResultsMessage/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/QueryTypedown/QueryTypedown.js.html +0 -413
- package/artifacts/coverage-jest/lcov-report/es/lib/QueryTypedown/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/QueryTypedown/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/RefdataButtons/RefdataButtons.js.html +0 -512
- package/artifacts/coverage-jest/lcov-report/es/lib/RefdataButtons/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/RefdataButtons/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQLookupComponent/SASQLookupComponent.js.html +0 -1115
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQLookupComponent/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQLookupComponent/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQRoute/SASQRoute.js.html +0 -404
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQRoute/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQRoute/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQViewComponent/SASQViewComponent.js.html +0 -413
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQViewComponent/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/SASQViewComponent/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/SearchField/SearchField.js.html +0 -353
- package/artifacts/coverage-jest/lcov-report/es/lib/SearchField/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/SearchField/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/SettingPage.js.html +0 -380
- package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/SettingPagePane.js.html +0 -308
- package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/index.html +0 -147
- package/artifacts/coverage-jest/lcov-report/es/lib/SettingPage/index.js.html +0 -164
- package/artifacts/coverage-jest/lcov-report/es/lib/TypeDown/TypeDown.js.html +0 -839
- package/artifacts/coverage-jest/lcov-report/es/lib/TypeDown/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/TypeDown/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/Typedown/Typedown.js.html +0 -887
- package/artifacts/coverage-jest/lcov-report/es/lib/Typedown/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/Typedown/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/constants/eventCodes.js.html +0 -209
- package/artifacts/coverage-jest/lcov-report/es/lib/constants/index.html +0 -117
- package/artifacts/coverage-jest/lcov-report/es/lib/contexts/SettingsContext.js.html +0 -206
- package/artifacts/coverage-jest/lcov-report/es/lib/contexts/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/es/lib/contexts/index.js.html +0 -140
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/index.html +0 -252
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/index.js.html +0 -374
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/index.html +0 -147
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/index.js.html +0 -164
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/useSettingSection.js.html +0 -305
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/settingsHooks/useSettings.js.html +0 -584
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/index.html +0 -162
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/index.js.html +0 -188
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/useTypedown.js.html +0 -644
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/useTypedownData.js.html +0 -335
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/typedownHooks/useTypedownToggle.js.html +0 -350
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useActiveElement.js.html +0 -323
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useHelperApp.js.html +0 -488
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useKiwtFieldArray.js.html +0 -509
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useKiwtSASQuery.js.html +0 -467
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useLocalStorageState.js.html +0 -329
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useMutateRefdataValue.js.html +0 -488
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useQIndex.js.html +0 -407
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useRefdata.js.html +0 -401
- package/artifacts/coverage-jest/lcov-report/es/lib/hooks/useTemplates.js.html +0 -314
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/buildUrl.js.html +0 -296
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/generateKiwtQuery.js.html +0 -230
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/generateKiwtQueryParams.js.html +0 -545
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/getFocusableElements.js.html +0 -572
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/index.html +0 -237
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/index.js.html +0 -284
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/renderHelpText.js.html +0 -410
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/selectorSafe.js.html +0 -209
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/sortByLabel.js.html +0 -248
- package/artifacts/coverage-jest/lcov-report/es/lib/utils/toCamelCase.js.html +0 -227
- package/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/artifacts/coverage-jest/lcov-report/index.html +0 -717
- package/artifacts/coverage-jest/lcov-report/prettify.css +0 -1
- package/artifacts/coverage-jest/lcov-report/prettify.js +0 -2
- package/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/artifacts/coverage-jest/lcov-report/sorter.js +0 -196
- package/artifacts/coverage-jest/lcov-report/src/index.html +0 -117
- package/artifacts/coverage-jest/lcov-report/src/index.js.html +0 -305
- package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/ActionList.js.html +0 -248
- package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/ActionListFieldArray.js.html +0 -764
- package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/index.html +0 -147
- package/artifacts/coverage-jest/lcov-report/src/lib/ActionList/index.js.html +0 -89
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableRefdataList/EditableRefdataList.js.html +0 -362
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableRefdataList/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableRefdataList/index.js.html +0 -86
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/EditableSettingsList.js.html +0 -224
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -212
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -308
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -260
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/SettingField.js.html +0 -437
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/index.html +0 -162
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/index.js.html +0 -95
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/index.html +0 -147
- package/artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/index.js.html +0 -95
- package/artifacts/coverage-jest/lcov-report/src/lib/NoResultsMessage/NoResultsMessage.js.html +0 -320
- package/artifacts/coverage-jest/lcov-report/src/lib/NoResultsMessage/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/NoResultsMessage/index.js.html +0 -89
- package/artifacts/coverage-jest/lcov-report/src/lib/QueryTypedown/QueryTypedown.js.html +0 -185
- package/artifacts/coverage-jest/lcov-report/src/lib/QueryTypedown/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/QueryTypedown/index.js.html +0 -89
- package/artifacts/coverage-jest/lcov-report/src/lib/RefdataButtons/RefdataButtons.js.html +0 -371
- package/artifacts/coverage-jest/lcov-report/src/lib/RefdataButtons/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/RefdataButtons/index.js.html +0 -89
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQLookupComponent/SASQLookupComponent.js.html +0 -932
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQLookupComponent/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQLookupComponent/index.js.html +0 -89
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQRoute/SASQRoute.js.html +0 -275
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQRoute/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQRoute/index.js.html +0 -89
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQViewComponent/SASQViewComponent.js.html +0 -251
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQViewComponent/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/SASQViewComponent/index.js.html +0 -89
- package/artifacts/coverage-jest/lcov-report/src/lib/SearchField/SearchField.js.html +0 -215
- package/artifacts/coverage-jest/lcov-report/src/lib/SearchField/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/SearchField/index.js.html +0 -89
- package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/SettingPage.js.html +0 -212
- package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/SettingPagePane.js.html +0 -149
- package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/index.html +0 -147
- package/artifacts/coverage-jest/lcov-report/src/lib/SettingPage/index.js.html +0 -92
- package/artifacts/coverage-jest/lcov-report/src/lib/TypeDown/TypeDown.js.html +0 -764
- package/artifacts/coverage-jest/lcov-report/src/lib/TypeDown/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/TypeDown/index.js.html +0 -89
- package/artifacts/coverage-jest/lcov-report/src/lib/Typedown/Typedown.js.html +0 -788
- package/artifacts/coverage-jest/lcov-report/src/lib/Typedown/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/Typedown/index.js.html +0 -89
- package/artifacts/coverage-jest/lcov-report/src/lib/constants/eventCodes.js.html +0 -95
- package/artifacts/coverage-jest/lcov-report/src/lib/constants/index.html +0 -117
- package/artifacts/coverage-jest/lcov-report/src/lib/contexts/SettingsContext.js.html +0 -98
- package/artifacts/coverage-jest/lcov-report/src/lib/contexts/index.html +0 -132
- package/artifacts/coverage-jest/lcov-report/src/lib/contexts/index.js.html +0 -86
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/index.html +0 -252
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/index.js.html +0 -116
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/index.html +0 -147
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/index.js.html +0 -92
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/useSettingSection.js.html +0 -164
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/settingsHooks/useSettings.js.html +0 -377
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/index.html +0 -162
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/index.js.html +0 -95
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/useTypedown.js.html +0 -524
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/useTypedownData.js.html +0 -164
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/useTypedownToggle.js.html +0 -164
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useActiveElement.js.html +0 -158
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useHelperApp.js.html +0 -284
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useKiwtFieldArray.js.html +0 -275
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useKiwtSASQuery.js.html +0 -179
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useLocalStorageState.js.html +0 -137
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useMutateRefdataValue.js.html +0 -302
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useQIndex.js.html +0 -209
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useRefdata.js.html +0 -287
- package/artifacts/coverage-jest/lcov-report/src/lib/hooks/useTemplates.js.html +0 -167
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/buildUrl.js.html +0 -194
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/generateKiwtQuery.js.html +0 -110
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/generateKiwtQueryParams.js.html +0 -287
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/getFocusableElements.js.html +0 -380
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/index.html +0 -237
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/index.js.html +0 -116
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/renderHelpText.js.html +0 -167
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/selectorSafe.js.html +0 -104
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/sortByLabel.js.html +0 -131
- package/artifacts/coverage-jest/lcov-report/src/lib/utils/toCamelCase.js.html +0 -128
- package/artifacts/coverage-jest/lcov.info +0 -10040
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -109
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -998
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +0 -238
- package/junit.xml +0 -79
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +0 -248
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +0 -764
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +0 -147
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +0 -89
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +0 -362
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +0 -89
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +0 -224
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -212
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -377
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -263
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +0 -437
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +0 -162
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +0 -95
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +0 -147
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +0 -95
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +0 -320
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +0 -89
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +0 -185
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +0 -89
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +0 -371
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +0 -89
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +0 -932
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +0 -89
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +0 -275
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +0 -89
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +0 -251
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +0 -89
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +0 -215
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +0 -89
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +0 -212
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +0 -179
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +0 -147
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +0 -92
- package/src/artifacts/coverage-jest/lcov-report/TypeDown/TypeDown.js.html +0 -770
- package/src/artifacts/coverage-jest/lcov-report/TypeDown/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/TypeDown/index.js.html +0 -89
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +0 -791
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +0 -89
- 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/eventCodes.js.html +0 -95
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +0 -117
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +0 -98
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +0 -132
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +0 -92
- package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +0 -252
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +0 -116
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +0 -147
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +0 -92
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +0 -164
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +0 -404
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +0 -162
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +0 -95
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +0 -524
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +0 -164
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +0 -164
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +0 -158
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +0 -284
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +0 -275
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +0 -179
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +0 -137
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +0 -302
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +0 -209
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +0 -287
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +0 -167
- package/src/artifacts/coverage-jest/lcov-report/index.html +0 -402
- 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 -194
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +0 -110
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +0 -287
- package/src/artifacts/coverage-jest/lcov-report/utils/getFocusableElements.js.html +0 -386
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +0 -237
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +0 -116
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +0 -167
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +0 -104
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +0 -128
- package/src/artifacts/coverage-jest/lcov.info +0 -2073
- package/yarn-error.log +0 -15050
|
@@ -4,132 +4,48 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactQuery = require("react-query");
|
|
11
|
-
|
|
12
9
|
var _core = require("@folio/stripes/core");
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
while (1) {
|
|
45
|
-
switch (_context.prev = _context.next) {
|
|
46
|
-
case 0:
|
|
47
|
-
return _context.abrupt("return", ky.put("".concat(endpoint, "/").concat(id), {
|
|
48
|
-
json: {
|
|
49
|
-
id: id,
|
|
50
|
-
values: [{
|
|
51
|
-
id: data,
|
|
52
|
-
_delete: true
|
|
53
|
-
}]
|
|
54
|
-
}
|
|
55
|
-
}).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.delete));
|
|
56
|
-
|
|
57
|
-
case 1:
|
|
58
|
-
case "end":
|
|
59
|
-
return _context.stop();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}, _callee);
|
|
63
|
-
}));
|
|
64
|
-
|
|
65
|
-
return function (_x) {
|
|
66
|
-
return _ref2.apply(this, arguments);
|
|
67
|
-
};
|
|
68
|
-
}(), queryParams === null || queryParams === void 0 ? void 0 : queryParams.delete);
|
|
69
|
-
var putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'editableRefdataList', 'editValue', id], /*#__PURE__*/function () {
|
|
70
|
-
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2(data) {
|
|
71
|
-
return regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
72
|
-
while (1) {
|
|
73
|
-
switch (_context2.prev = _context2.next) {
|
|
74
|
-
case 0:
|
|
75
|
-
return _context2.abrupt("return", ky.put("".concat(endpoint, "/").concat(id), {
|
|
76
|
-
json: {
|
|
77
|
-
id: id,
|
|
78
|
-
values: [data]
|
|
79
|
-
}
|
|
80
|
-
}).json().then(afterQueryCalls === null || afterQueryCalls === void 0 ? void 0 : afterQueryCalls.put));
|
|
81
|
-
|
|
82
|
-
case 1:
|
|
83
|
-
case "end":
|
|
84
|
-
return _context2.stop();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}, _callee2);
|
|
88
|
-
}));
|
|
89
|
-
|
|
90
|
-
return function (_x2) {
|
|
91
|
-
return _ref3.apply(this, arguments);
|
|
92
|
-
};
|
|
93
|
-
}(), queryParams === null || queryParams === void 0 ? void 0 : queryParams.put);
|
|
94
|
-
|
|
95
|
-
if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.delete) {
|
|
11
|
+
const useMutateRefdataValue = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
afterQueryCalls,
|
|
14
|
+
endpoint,
|
|
15
|
+
id,
|
|
16
|
+
queryParams,
|
|
17
|
+
returnQueryObject = {
|
|
18
|
+
put: false,
|
|
19
|
+
delete: false
|
|
20
|
+
}
|
|
21
|
+
} = _ref;
|
|
22
|
+
const returnObj = {};
|
|
23
|
+
const ky = (0, _core.useOkapiKy)();
|
|
24
|
+
const deleteQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'useMutateRefdataValue', 'delete', id], async data => ky.put(`${endpoint}/${id}`, {
|
|
25
|
+
json: {
|
|
26
|
+
id,
|
|
27
|
+
values: [{
|
|
28
|
+
id: data,
|
|
29
|
+
_delete: true
|
|
30
|
+
}]
|
|
31
|
+
}
|
|
32
|
+
}).json().then(afterQueryCalls?.delete), queryParams?.delete);
|
|
33
|
+
const putQueryObject = (0, _reactQuery.useMutation)(['stripes-kint-components', 'editableRefdataList', 'editValue', id], async data => ky.put(`${endpoint}/${id}`, {
|
|
34
|
+
json: {
|
|
35
|
+
id,
|
|
36
|
+
values: [data]
|
|
37
|
+
}
|
|
38
|
+
}).json().then(afterQueryCalls?.put), queryParams?.put);
|
|
39
|
+
if (returnQueryObject?.delete) {
|
|
96
40
|
returnObj.delete = deleteQueryObject;
|
|
97
41
|
} else {
|
|
98
42
|
returnObj.delete = deleteQueryObject.mutateAsync;
|
|
99
43
|
}
|
|
100
|
-
|
|
101
|
-
if (returnQueryObject !== null && returnQueryObject !== void 0 && returnQueryObject.put) {
|
|
44
|
+
if (returnQueryObject?.put) {
|
|
102
45
|
returnObj.put = putQueryObject;
|
|
103
46
|
} else {
|
|
104
47
|
returnObj.put = putQueryObject.mutateAsync;
|
|
105
48
|
}
|
|
106
|
-
|
|
107
49
|
return returnObj;
|
|
108
50
|
};
|
|
109
|
-
|
|
110
|
-
__signature__(useMutateRefdataValue, "useOkapiKy{ky}\nuseMutation{deleteQueryObject}\nuseMutation{putQueryObject}", function () {
|
|
111
|
-
return [_core.useOkapiKy, _reactQuery.useMutation, _reactQuery.useMutation];
|
|
112
|
-
});
|
|
113
|
-
|
|
114
|
-
var _default = useMutateRefdataValue;
|
|
115
|
-
var _default2 = _default;
|
|
116
|
-
exports.default = _default2;
|
|
117
|
-
;
|
|
118
|
-
|
|
119
|
-
(function () {
|
|
120
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
121
|
-
|
|
122
|
-
if (!reactHotLoader) {
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
reactHotLoader.register(useMutateRefdataValue, "useMutateRefdataValue", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useMutateRefdataValue.js");
|
|
127
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useMutateRefdataValue.js");
|
|
128
|
-
})();
|
|
129
|
-
|
|
130
|
-
;
|
|
131
|
-
|
|
132
|
-
(function () {
|
|
133
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
134
|
-
leaveModule && leaveModule(module);
|
|
135
|
-
})();
|
|
51
|
+
var _default = exports.default = useMutateRefdataValue;
|
|
@@ -1,108 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
8
|
var _reactRouterDom = require("react-router-dom");
|
|
13
|
-
|
|
14
9
|
var _queryString = _interopRequireDefault(require("query-string"));
|
|
15
|
-
|
|
16
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
})();
|
|
26
|
-
|
|
27
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
28
|
-
|
|
29
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
30
|
-
|
|
31
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
32
|
-
|
|
33
|
-
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
34
|
-
|
|
35
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
36
|
-
|
|
37
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
38
|
-
|
|
39
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
40
|
-
|
|
41
|
-
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
42
|
-
|
|
43
|
-
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
44
|
-
|
|
45
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
46
|
-
return a;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
var useQIndex = function useQIndex() {
|
|
50
|
-
var history = (0, _reactRouterDom.useHistory)();
|
|
51
|
-
var location = (0, _reactRouterDom.useLocation)();
|
|
52
|
-
|
|
53
|
-
var query = _queryString.default.parse(location.search);
|
|
54
|
-
|
|
55
|
-
var _useState = (0, _react.useState)(query === null || query === void 0 ? void 0 : query.qindex),
|
|
56
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
57
|
-
currentQindex = _useState2[0],
|
|
58
|
-
setCurrentQindex = _useState2[1];
|
|
59
|
-
|
|
60
|
-
var handleQindexChange = function handleQindexChange(newQindex) {
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
const useQIndex = () => {
|
|
14
|
+
const history = (0, _reactRouterDom.useHistory)();
|
|
15
|
+
const location = (0, _reactRouterDom.useLocation)();
|
|
16
|
+
const query = _queryString.default.parse(location.search);
|
|
17
|
+
const [currentQindex, setCurrentQindex] = (0, _react.useState)(query?.qindex);
|
|
18
|
+
const handleQindexChange = newQindex => {
|
|
61
19
|
setCurrentQindex(newQindex);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
20
|
+
if (newQindex !== query?.qindex) {
|
|
21
|
+
const newQuery = {
|
|
22
|
+
...query,
|
|
65
23
|
qindex: newQindex
|
|
66
|
-
}
|
|
67
|
-
|
|
24
|
+
};
|
|
68
25
|
history.push({
|
|
69
26
|
pathname: location.pathname,
|
|
70
|
-
search:
|
|
27
|
+
search: `?${_queryString.default.stringify(newQuery)}`
|
|
71
28
|
});
|
|
72
29
|
}
|
|
73
30
|
};
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
setCurrentQindex(query === null || query === void 0 ? void 0 : query.qindex);
|
|
31
|
+
(0, _react.useEffect)(() => {
|
|
32
|
+
if (currentQindex !== query?.qindex) {
|
|
33
|
+
setCurrentQindex(query?.qindex);
|
|
78
34
|
}
|
|
79
35
|
}, [currentQindex, history, location, query]);
|
|
80
36
|
return [currentQindex, handleQindexChange];
|
|
81
37
|
};
|
|
82
|
-
|
|
83
|
-
__signature__(useQIndex, "useHistory{history}\nuseLocation{location}\nuseState{[currentQindex, setCurrentQindex](query?.qindex)}\nuseEffect{}", function () {
|
|
84
|
-
return [_reactRouterDom.useHistory, _reactRouterDom.useLocation];
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
var _default = useQIndex;
|
|
88
|
-
var _default2 = _default;
|
|
89
|
-
exports.default = _default2;
|
|
90
|
-
;
|
|
91
|
-
|
|
92
|
-
(function () {
|
|
93
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
94
|
-
|
|
95
|
-
if (!reactHotLoader) {
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
reactHotLoader.register(useQIndex, "useQIndex", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useQIndex.js");
|
|
100
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useQIndex.js");
|
|
101
|
-
})();
|
|
102
|
-
|
|
103
|
-
;
|
|
104
|
-
|
|
105
|
-
(function () {
|
|
106
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
107
|
-
leaveModule && leaveModule(module);
|
|
108
|
-
})();
|
|
38
|
+
var _default = exports.default = useQIndex;
|
|
@@ -4,44 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _reactQuery = require("react-query");
|
|
13
|
-
|
|
14
10
|
var _core = require("@folio/stripes/core");
|
|
15
|
-
|
|
16
11
|
var _utils = require("../utils");
|
|
17
|
-
|
|
18
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
const useRefdata = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
endpoint,
|
|
16
|
+
desc,
|
|
17
|
+
options = _utils.refdataOptions,
|
|
18
|
+
queryParams,
|
|
19
|
+
returnQueryObject = false
|
|
20
|
+
} = _ref;
|
|
21
|
+
const ky = (0, _core.useOkapiKy)();
|
|
22
|
+
const nsValues = {};
|
|
19
23
|
|
|
20
|
-
(function () {
|
|
21
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
22
|
-
enterModule && enterModule(module);
|
|
23
|
-
})();
|
|
24
|
-
|
|
25
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
26
|
-
return a;
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
var useRefdata = function useRefdata(_ref) {
|
|
30
|
-
var endpoint = _ref.endpoint,
|
|
31
|
-
desc = _ref.desc,
|
|
32
|
-
queryParams = _ref.queryParams,
|
|
33
|
-
_ref$returnQueryObjec = _ref.returnQueryObject,
|
|
34
|
-
returnQueryObject = _ref$returnQueryObjec === void 0 ? false : _ref$returnQueryObjec,
|
|
35
|
-
_ref$options = _ref.options,
|
|
36
|
-
options = _ref$options === void 0 ? {
|
|
37
|
-
filterKeys: {
|
|
38
|
-
DescKey: 'desc'
|
|
39
|
-
},
|
|
40
|
-
stats: false,
|
|
41
|
-
max: 100
|
|
42
|
-
} : _ref$options;
|
|
43
|
-
var ky = (0, _core.useOkapiKy)();
|
|
44
|
-
var nsValues = {};
|
|
45
24
|
/* Desc will tend to contain a '.', which will throw off generateKiwtQuery.
|
|
46
25
|
* To combat this we can insert another Desc. at the beginning to act as the filtername, so
|
|
47
26
|
* Funder.Name => Desc.desc=Funder.Name. This way "Desc" acts as the filterName, and without a filterKey
|
|
@@ -50,57 +29,26 @@ var useRefdata = function useRefdata(_ref) {
|
|
|
50
29
|
|
|
51
30
|
if (Array.isArray(desc)) {
|
|
52
31
|
// If we have an array, append a desc filter for each desc given
|
|
53
|
-
nsValues.filters = desc.map(
|
|
54
|
-
return "DescKey.".concat(d);
|
|
55
|
-
}).join(',');
|
|
32
|
+
nsValues.filters = desc.map(d => `DescKey.${d}`).join(',');
|
|
56
33
|
} else if (desc) {
|
|
57
34
|
// If we just have a string, append a single desc filter
|
|
58
|
-
nsValues.filters =
|
|
35
|
+
nsValues.filters = `DescKey.${desc}`;
|
|
59
36
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
var queryObject = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useRefdata', 'refdata', desc !== null && desc !== void 0 ? desc : ''], function () {
|
|
64
|
-
return ky(path).json();
|
|
65
|
-
}, queryParams);
|
|
66
|
-
|
|
37
|
+
const query = (0, _utils.generateKiwtQuery)(options, nsValues);
|
|
38
|
+
const path = `${endpoint}${query}`;
|
|
39
|
+
const queryObject = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useRefdata', 'refdata', desc ?? ''], () => ky(path).json(), queryParams);
|
|
67
40
|
if (returnQueryObject) {
|
|
68
41
|
return queryObject || {};
|
|
69
42
|
}
|
|
70
|
-
|
|
71
|
-
|
|
43
|
+
const {
|
|
44
|
+
data: refdata
|
|
45
|
+
} = queryObject;
|
|
72
46
|
return refdata || [];
|
|
73
47
|
};
|
|
74
|
-
|
|
75
|
-
__signature__(useRefdata, "useOkapiKy{ky}\nuseQuery{queryObject}", function () {
|
|
76
|
-
return [_core.useOkapiKy, _reactQuery.useQuery];
|
|
77
|
-
});
|
|
78
|
-
|
|
79
48
|
useRefdata.propTypes = {
|
|
80
49
|
endpoint: _propTypes.default.string,
|
|
81
50
|
desc: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.arrayOf(_propTypes.default.string)]),
|
|
82
51
|
queryParams: _propTypes.default.object,
|
|
83
52
|
returnQueryObject: _propTypes.default.bool
|
|
84
53
|
};
|
|
85
|
-
var _default = useRefdata;
|
|
86
|
-
var _default2 = _default;
|
|
87
|
-
exports.default = _default2;
|
|
88
|
-
;
|
|
89
|
-
|
|
90
|
-
(function () {
|
|
91
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
92
|
-
|
|
93
|
-
if (!reactHotLoader) {
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
reactHotLoader.register(useRefdata, "useRefdata", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useRefdata.js");
|
|
98
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useRefdata.js");
|
|
99
|
-
})();
|
|
100
|
-
|
|
101
|
-
;
|
|
102
|
-
|
|
103
|
-
(function () {
|
|
104
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
105
|
-
leaveModule && leaveModule(module);
|
|
106
|
-
})();
|
|
54
|
+
var _default = exports.default = useRefdata;
|
|
@@ -4,74 +4,30 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _reactQuery = require("react-query");
|
|
11
|
-
|
|
12
9
|
var _core = require("@folio/stripes/core");
|
|
13
|
-
|
|
14
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var useTemplates = function useTemplates(_ref) {
|
|
26
|
-
var context = _ref.context,
|
|
27
|
-
endpoint = _ref.endpoint,
|
|
28
|
-
queryParams = _ref.queryParams,
|
|
29
|
-
sort = _ref.sort;
|
|
30
|
-
var ky = (0, _core.useOkapiKy)();
|
|
31
|
-
var extraPathItems = [];
|
|
32
|
-
|
|
11
|
+
const useTemplates = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
context,
|
|
14
|
+
endpoint,
|
|
15
|
+
queryParams,
|
|
16
|
+
sort
|
|
17
|
+
} = _ref;
|
|
18
|
+
const ky = (0, _core.useOkapiKy)();
|
|
19
|
+
const extraPathItems = [];
|
|
33
20
|
if (context) {
|
|
34
|
-
extraPathItems.push(
|
|
21
|
+
extraPathItems.push(`filters=context=${context}`);
|
|
35
22
|
}
|
|
36
|
-
|
|
37
23
|
if (sort) {
|
|
38
|
-
extraPathItems.push(
|
|
24
|
+
extraPathItems.push(`sort=${sort}`);
|
|
39
25
|
}
|
|
40
|
-
|
|
41
26
|
extraPathItems.push('max=500');
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}, queryParams),
|
|
47
|
-
templates = _useQuery.data;
|
|
48
|
-
|
|
27
|
+
const path = `${endpoint}?${extraPathItems.join('&')}`;
|
|
28
|
+
const {
|
|
29
|
+
data: templates
|
|
30
|
+
} = (0, _reactQuery.useQuery)(['stripes-kint-components', 'useTemplates', 'templates', context ?? ''], () => ky(path).json(), queryParams);
|
|
49
31
|
return templates || [];
|
|
50
32
|
};
|
|
51
|
-
|
|
52
|
-
__signature__(useTemplates, "useOkapiKy{ky}\nuseQuery{{ data: templates }}", function () {
|
|
53
|
-
return [_core.useOkapiKy, _reactQuery.useQuery];
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
var _default = useTemplates;
|
|
57
|
-
var _default2 = _default;
|
|
58
|
-
exports.default = _default2;
|
|
59
|
-
;
|
|
60
|
-
|
|
61
|
-
(function () {
|
|
62
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
63
|
-
|
|
64
|
-
if (!reactHotLoader) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
reactHotLoader.register(useTemplates, "useTemplates", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useTemplates.js");
|
|
69
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/hooks/useTemplates.js");
|
|
70
|
-
})();
|
|
71
|
-
|
|
72
|
-
;
|
|
73
|
-
|
|
74
|
-
(function () {
|
|
75
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
76
|
-
leaveModule && leaveModule(module);
|
|
77
|
-
})();
|
|
33
|
+
var _default = exports.default = useTemplates;
|
package/es/lib/utils/buildUrl.js
CHANGED
|
@@ -4,68 +4,28 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = buildUrl;
|
|
7
|
-
|
|
8
|
-
var _forOwn2 = _interopRequireDefault(require("lodash/forOwn"));
|
|
9
|
-
|
|
10
|
-
var _isEmpty2 = _interopRequireDefault(require("lodash/isEmpty"));
|
|
11
|
-
|
|
12
|
-
var _unset2 = _interopRequireDefault(require("lodash/unset"));
|
|
13
|
-
|
|
14
7
|
var _queryString = _interopRequireDefault(require("query-string"));
|
|
15
|
-
|
|
8
|
+
var _lodash = require("lodash");
|
|
16
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
|
-
|
|
18
|
-
(function () {
|
|
19
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
20
|
-
enterModule && enterModule(module);
|
|
21
|
-
})();
|
|
22
|
-
|
|
23
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
24
|
-
return a;
|
|
25
|
-
};
|
|
10
|
+
// File copied from https://github.com/folio-org/stripes-smart-components/blob/master/lib/SearchAndSort/buildUrl.js
|
|
26
11
|
|
|
27
12
|
function getLocationQuery(location) {
|
|
28
13
|
return location.query ? location.query : _queryString.default.parse(location.search);
|
|
29
14
|
}
|
|
30
|
-
|
|
31
15
|
function removeEmpty(obj) {
|
|
32
|
-
|
|
33
|
-
(0,
|
|
16
|
+
const cleanObj = {};
|
|
17
|
+
(0, _lodash.forOwn)(obj, (value, key) => {
|
|
34
18
|
if (value) cleanObj[key] = value;
|
|
35
19
|
});
|
|
36
20
|
return cleanObj;
|
|
37
21
|
}
|
|
38
|
-
|
|
39
22
|
function buildUrl(location, values, basePath) {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
(0,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
url += "?".concat(_queryString.default.stringify(params));
|
|
23
|
+
const locationQuery = getLocationQuery(location);
|
|
24
|
+
let url = values._path || basePath || location.pathname;
|
|
25
|
+
const params = removeEmpty(Object.assign(locationQuery, values));
|
|
26
|
+
(0, _lodash.unset)(params, '_path');
|
|
27
|
+
if (!(0, _lodash.isEmpty)(params)) {
|
|
28
|
+
url += `?${_queryString.default.stringify(params)}`;
|
|
47
29
|
}
|
|
48
|
-
|
|
49
30
|
return url;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
;
|
|
53
|
-
|
|
54
|
-
(function () {
|
|
55
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
56
|
-
|
|
57
|
-
if (!reactHotLoader) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
reactHotLoader.register(getLocationQuery, "getLocationQuery", "/home/ethan/FolioModules/stripes-kint-components/src/lib/utils/buildUrl.js");
|
|
62
|
-
reactHotLoader.register(removeEmpty, "removeEmpty", "/home/ethan/FolioModules/stripes-kint-components/src/lib/utils/buildUrl.js");
|
|
63
|
-
reactHotLoader.register(buildUrl, "buildUrl", "/home/ethan/FolioModules/stripes-kint-components/src/lib/utils/buildUrl.js");
|
|
64
|
-
})();
|
|
65
|
-
|
|
66
|
-
;
|
|
67
|
-
|
|
68
|
-
(function () {
|
|
69
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
70
|
-
leaveModule && leaveModule(module);
|
|
71
|
-
})();
|
|
31
|
+
}
|
|
@@ -4,46 +4,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _generateKiwtQueryParams = _interopRequireDefault(require("./generateKiwtQueryParams"));
|
|
9
|
-
|
|
10
8
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
|
|
12
|
-
(
|
|
13
|
-
|
|
14
|
-
enterModule && enterModule(module);
|
|
15
|
-
})();
|
|
16
|
-
|
|
17
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
var generateKiwtQuery = function generateKiwtQuery(options, nsValues) {
|
|
22
|
-
var paramsArray = (0, _generateKiwtQueryParams.default)(options, nsValues);
|
|
23
|
-
return paramsArray.length ? '?' + paramsArray.map(function (p) {
|
|
24
|
-
return encodeURI(p);
|
|
25
|
-
}).join('&') : '';
|
|
9
|
+
const generateKiwtQuery = (options, nsValues) => {
|
|
10
|
+
const paramsArray = (0, _generateKiwtQueryParams.default)(options, nsValues);
|
|
11
|
+
return paramsArray.length ? '?' + paramsArray.map(p => encodeURI(p)).join('&') : '';
|
|
26
12
|
};
|
|
27
|
-
|
|
28
|
-
var _default = generateKiwtQuery;
|
|
29
|
-
var _default2 = _default;
|
|
30
|
-
exports.default = _default2;
|
|
31
|
-
;
|
|
32
|
-
|
|
33
|
-
(function () {
|
|
34
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
35
|
-
|
|
36
|
-
if (!reactHotLoader) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
reactHotLoader.register(generateKiwtQuery, "generateKiwtQuery", "/home/ethan/FolioModules/stripes-kint-components/src/lib/utils/generateKiwtQuery.js");
|
|
41
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/utils/generateKiwtQuery.js");
|
|
42
|
-
})();
|
|
43
|
-
|
|
44
|
-
;
|
|
45
|
-
|
|
46
|
-
(function () {
|
|
47
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
48
|
-
leaveModule && leaveModule(module);
|
|
49
|
-
})();
|
|
13
|
+
var _default = exports.default = generateKiwtQuery;
|