@k-int/stripes-kint-components 1.6.0 → 2.0.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 +34 -1
- package/es/index.js +49 -8
- package/es/lib/ActionList/ActionList.js +51 -26
- package/es/lib/ActionList/ActionListFieldArray.js +84 -27
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +198 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +326 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesView.js +166 -0
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +360 -0
- package/es/lib/CustomProperties/Config/index.js +41 -0
- package/es/lib/EditableRefdataList/EditableRefdataList.js +17 -9
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +2 -2
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +3 -3
- package/es/lib/FormModal/FormModal.js +126 -0
- package/es/lib/{TypeDown → FormModal}/index.js +2 -2
- package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -1
- package/es/lib/QueryTypedown/QueryTypedown.js +3 -3
- package/es/lib/RefdataButtons/RefdataButtons.js +2 -2
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +8 -3
- package/es/lib/SASQRoute/SASQRoute.js +2 -2
- package/es/lib/SASQViewComponent/SASQViewComponent.js +2 -2
- package/es/lib/SearchField/SearchField.js +2 -2
- package/es/lib/SettingPage/SettingPage.js +1 -1
- package/es/lib/SettingPage/SettingPagePane.js +1 -1
- package/es/lib/Typedown/Typedown.js +45 -14
- package/es/lib/constants/customProperties.js +60 -0
- package/es/lib/hooks/index.js +16 -0
- package/es/lib/hooks/settingsHooks/useSettings.js +3 -3
- package/es/lib/hooks/useCustomProperties.js +112 -0
- package/es/lib/hooks/useHelperApp.js +3 -3
- package/es/lib/hooks/useKiwtFieldArray.js +2 -2
- package/es/lib/hooks/useKiwtSASQuery.js +3 -3
- package/es/lib/hooks/useLocalStorageState.js +1 -1
- package/es/lib/hooks/useMutateCustomProperties.js +143 -0
- package/es/lib/hooks/useQIndex.js +3 -3
- package/es/lib/hooks/useRefdata.js +3 -9
- package/es/lib/utils/index.js +8 -0
- package/es/lib/utils/refdataOptions.js +43 -0
- package/junit.xml +38 -38
- package/package.json +5 -3
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +58 -29
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +167 -18
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +13 -14
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +2 -3
- package/{artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/SettingField/SettingField.js.html → src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html} +121 -140
- package/{artifacts/coverage-jest/lcov-report/src/lib/Typedown/Typedown.js.html → src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html} +263 -246
- package/{artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks/useTypedown.js.html → src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesView.js.html} +222 -211
- package/{artifacts/coverage-jest/lcov-report/src/lib/SASQLookupComponent/SASQLookupComponent.js.html → src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html} +356 -315
- package/{artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks → src/artifacts/coverage-jest/lcov-report/CustomProperties/Config}/index.html +55 -41
- package/{artifacts/coverage-jest/lcov-report/src/lib/hooks/typedownHooks → src/artifacts/coverage-jest/lcov-report/CustomProperties/Config}/index.js.html +18 -16
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +24 -13
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +8 -9
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +2 -3
- package/{artifacts/coverage-jest/lcov-report/src/index.js.html → src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html} +86 -93
- package/src/artifacts/coverage-jest/lcov-report/{TypeDown → FormModal}/index.html +15 -16
- package/src/artifacts/coverage-jest/lcov-report/{TypeDown → FormModal}/index.js.html +5 -6
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +4 -5
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +4 -5
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +25 -8
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +10 -11
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +141 -16
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +8 -9
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +2 -3
- package/{artifacts/coverage-jest/lcov-report/src/lib/utils/sortByLabel.js.html → src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html} +28 -47
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +19 -5
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +36 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +9 -4
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +6 -7
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +32 -36
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +2 -3
- package/{artifacts/coverage-jest/lcov-report/src/lib/hooks/useRefdata.js.html → src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html} +64 -47
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +2 -3
- package/{artifacts/coverage-jest/lcov-report/src/lib/hooks/useMutateRefdataValue.js.html → src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html} +43 -74
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +5 -24
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/index.html +72 -58
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +21 -22
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +9 -4
- package/{artifacts/coverage-jest/lcov-report/src/lib/EditableSettingsList/index.js.html → src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html} +27 -16
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +2 -3
- package/src/artifacts/coverage-jest/lcov.info +924 -552
- package/src/index.js +12 -4
- package/src/lib/ActionList/ActionList.js +32 -22
- package/src/lib/ActionList/ActionListFieldArray.js +60 -10
- package/src/lib/ActionList/README.md +5 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +111 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +240 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesView.js +150 -0
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +296 -0
- package/src/lib/CustomProperties/Config/index.js +4 -0
- package/src/lib/EditableRefdataList/EditableRefdataList.js +9 -5
- package/src/lib/FormModal/FormModal.js +71 -0
- package/src/lib/FormModal/index.js +1 -0
- package/src/lib/NoResultsMessage/NoResultsMessage.js +2 -2
- package/src/lib/SASQLookupComponent/SASQLookupComponent.js +6 -0
- package/src/lib/Typedown/Typedown.js +50 -8
- package/src/lib/constants/customProperties.js +9 -0
- package/src/lib/hooks/index.js +2 -0
- package/src/lib/hooks/useCustomProperties.js +73 -0
- package/src/lib/hooks/useMutateCustomProperties.js +62 -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/translations/stripes-kint-components/en.json +49 -1
- 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/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/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/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/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/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/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/useQIndex.js.html +0 -209
- 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/toCamelCase.js.html +0 -128
- package/artifacts/coverage-jest/lcov.info +0 -10040
- package/es/lib/TypeDown/TypeDown.js +0 -251
- package/src/artifacts/coverage-jest/lcov-report/TypeDown/TypeDown.js.html +0 -770
- package/src/artifacts/coverage-jest/lcov-report/utils/getFocusableElements.js.html +0 -386
- package/src/lib/TypeDown/README.md +0 -1
- package/src/lib/TypeDown/TypeDown.js +0 -228
- package/src/lib/TypeDown/index.js +0 -1
- package/yarn-error.log +0 -15050
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for
|
|
6
|
+
<title>Code coverage report for hooks/useCustomProperties.js</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="
|
|
8
|
+
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
12
|
<style type='text/css'>
|
|
13
13
|
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
@@ -19,20 +19,20 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">hooks</a> useCustomProperties.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/21</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/17</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/21</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -130,8 +130,13 @@
|
|
|
130
130
|
<a name='L65'></a><a href='#L65'>65</a>
|
|
131
131
|
<a name='L66'></a><a href='#L66'>66</a>
|
|
132
132
|
<a name='L67'></a><a href='#L67'>67</a>
|
|
133
|
-
<a name='L68'></a><a href='#L68'>68</a
|
|
134
|
-
<
|
|
133
|
+
<a name='L68'></a><a href='#L68'>68</a>
|
|
134
|
+
<a name='L69'></a><a href='#L69'>69</a>
|
|
135
|
+
<a name='L70'></a><a href='#L70'>70</a>
|
|
136
|
+
<a name='L71'></a><a href='#L71'>71</a>
|
|
137
|
+
<a name='L72'></a><a href='#L72'>72</a>
|
|
138
|
+
<a name='L73'></a><a href='#L73'>73</a>
|
|
139
|
+
<a name='L74'></a><a href='#L74'>74</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
135
140
|
<span class="cline-any cline-neutral"> </span>
|
|
136
141
|
<span class="cline-any cline-neutral"> </span>
|
|
137
142
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -151,20 +156,27 @@
|
|
|
151
156
|
<span class="cline-any cline-neutral"> </span>
|
|
152
157
|
<span class="cline-any cline-neutral"> </span>
|
|
153
158
|
<span class="cline-any cline-neutral"> </span>
|
|
154
|
-
<span class="cline-any cline-no"> </span>
|
|
155
159
|
<span class="cline-any cline-neutral"> </span>
|
|
156
|
-
<span class="cline-any cline-no"> </span>
|
|
157
160
|
<span class="cline-any cline-neutral"> </span>
|
|
158
161
|
<span class="cline-any cline-neutral"> </span>
|
|
159
162
|
<span class="cline-any cline-neutral"> </span>
|
|
163
|
+
<span class="cline-any cline-no"> </span>
|
|
160
164
|
<span class="cline-any cline-neutral"> </span>
|
|
161
165
|
<span class="cline-any cline-neutral"> </span>
|
|
166
|
+
<span class="cline-any cline-no"> </span>
|
|
162
167
|
<span class="cline-any cline-neutral"> </span>
|
|
168
|
+
<span class="cline-any cline-no"> </span>
|
|
169
|
+
<span class="cline-any cline-no"> </span>
|
|
170
|
+
<span class="cline-any cline-no"> </span>
|
|
163
171
|
<span class="cline-any cline-neutral"> </span>
|
|
164
172
|
<span class="cline-any cline-no"> </span>
|
|
165
173
|
<span class="cline-any cline-neutral"> </span>
|
|
174
|
+
<span class="cline-any cline-neutral"> </span>
|
|
166
175
|
<span class="cline-any cline-no"> </span>
|
|
167
176
|
<span class="cline-any cline-no"> </span>
|
|
177
|
+
<span class="cline-any cline-no"> </span>
|
|
178
|
+
<span class="cline-any cline-neutral"> </span>
|
|
179
|
+
<span class="cline-any cline-no"> </span>
|
|
168
180
|
<span class="cline-any cline-neutral"> </span>
|
|
169
181
|
<span class="cline-any cline-no"> </span>
|
|
170
182
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -197,50 +209,56 @@
|
|
|
197
209
|
<span class="cline-any cline-neutral"> </span>
|
|
198
210
|
<span class="cline-any cline-neutral"> </span>
|
|
199
211
|
<span class="cline-any cline-neutral"> </span>
|
|
200
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import
|
|
201
|
-
import PropTypes from 'prop-types';
|
|
212
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import PropTypes from 'prop-types';
|
|
202
213
|
|
|
203
214
|
import { useQuery } from 'react-query';
|
|
204
215
|
import { useOkapiKy } from '@folio/stripes/core';
|
|
205
216
|
|
|
206
217
|
import { generateKiwtQuery } from '../utils';
|
|
207
218
|
|
|
208
|
-
const
|
|
219
|
+
const useCustomProperties = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span></span>
|
|
209
220
|
endpoint,
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
221
|
+
ctx,
|
|
222
|
+
nsValues = <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
223
|
+
sort: 'id'
|
|
224
|
+
},
|
|
213
225
|
options = <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
226
|
+
searchKey: 'label,name,description',
|
|
214
227
|
filterKeys: {
|
|
215
|
-
|
|
228
|
+
ContextKey: 'ctx'
|
|
216
229
|
},
|
|
217
230
|
stats: false,
|
|
218
231
|
max: 100
|
|
219
|
-
}
|
|
232
|
+
},
|
|
233
|
+
queryParams,
|
|
234
|
+
returnQueryObject = <span class="branch-0 cbranch-no" title="branch not covered" >false,</span>
|
|
220
235
|
}) => {
|
|
221
236
|
const ky = <span class="cstat-no" title="statement not covered" >useOkapiKy();</span>
|
|
222
237
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
<span class="cstat-no" title="statement not covered" >
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
238
|
+
// Allow passing of 'false' for isNull
|
|
239
|
+
<span class="cstat-no" title="statement not covered" > if (Array.isArray(ctx)) {</span>
|
|
240
|
+
// If we have an array, append a context filter for each ctx given
|
|
241
|
+
<span class="cstat-no" title="statement not covered" > nsValues.filters = ctx.map(<span class="fstat-no" title="function not covered" >c </span>=> {</span>
|
|
242
|
+
<span class="cstat-no" title="statement not covered" > if (c === 'isNull') {</span>
|
|
243
|
+
<span class="cstat-no" title="statement not covered" > return 'ContextWithoutKey.ctx isNull';</span>
|
|
244
|
+
} else {
|
|
245
|
+
<span class="cstat-no" title="statement not covered" > return `ContextKey.${c}`;</span>
|
|
246
|
+
}
|
|
247
|
+
}).join(',');
|
|
248
|
+
} else <span class="cstat-no" title="statement not covered" >if (ctx === 'isNull') { // isNull is a special case</span>
|
|
249
|
+
<span class="cstat-no" title="statement not covered" > nsValues.filters = 'ContextWithoutKey.ctx isNull';</span>
|
|
250
|
+
} else <span class="cstat-no" title="statement not covered" >if (ctx) {</span>
|
|
251
|
+
// If we just have a string, append a single ctx filter
|
|
252
|
+
<span class="cstat-no" title="statement not covered" > nsValues.filters = `ContextKey.${ctx}`;</span>
|
|
253
|
+
} else {
|
|
254
|
+
<span class="cstat-no" title="statement not covered" > nsValues.filters = null;</span>
|
|
237
255
|
}
|
|
238
256
|
|
|
239
257
|
const query = <span class="cstat-no" title="statement not covered" >generateKiwtQuery(options, nsValues);</span>
|
|
240
258
|
const path = <span class="cstat-no" title="statement not covered" >`${endpoint}${query}`;</span>
|
|
241
259
|
|
|
242
260
|
const queryObject = <span class="cstat-no" title="statement not covered" >useQuery(</span>
|
|
243
|
-
['stripes-kint-components', '
|
|
261
|
+
['stripes-kint-components', 'useCustomProperties', 'custprops', ctx, path],
|
|
244
262
|
<span class="fstat-no" title="function not covered" > ()</span> => <span class="cstat-no" title="statement not covered" >ky(path).json(),</span>
|
|
245
263
|
queryParams
|
|
246
264
|
);
|
|
@@ -249,13 +267,13 @@ const useRefdata = <span class="cstat-no" title="statement not covered" ><span c
|
|
|
249
267
|
<span class="cstat-no" title="statement not covered" > return queryObject || {};</span>
|
|
250
268
|
}
|
|
251
269
|
|
|
252
|
-
const { data:
|
|
253
|
-
<span class="cstat-no" title="statement not covered" > return
|
|
270
|
+
const { data: custprops } = <span class="cstat-no" title="statement not covered" >queryObject;</span>
|
|
271
|
+
<span class="cstat-no" title="statement not covered" > return custprops || [];</span>
|
|
254
272
|
};
|
|
255
273
|
|
|
256
|
-
<span class="cstat-no" title="statement not covered" >
|
|
274
|
+
<span class="cstat-no" title="statement not covered" >useCustomProperties.propTypes = {</span>
|
|
257
275
|
endpoint: PropTypes.string,
|
|
258
|
-
|
|
276
|
+
ctx: PropTypes.oneOfType([
|
|
259
277
|
PropTypes.string,
|
|
260
278
|
PropTypes.arrayOf(PropTypes.string)
|
|
261
279
|
]),
|
|
@@ -263,25 +281,24 @@ const useRefdata = <span class="cstat-no" title="statement not covered" ><span c
|
|
|
263
281
|
returnQueryObject: PropTypes.bool
|
|
264
282
|
};
|
|
265
283
|
|
|
266
|
-
export default
|
|
284
|
+
export default useCustomProperties;
|
|
267
285
|
</pre></td></tr></table></pre>
|
|
268
286
|
|
|
269
287
|
<div class='push'></div><!-- for sticky footer -->
|
|
270
288
|
</div><!-- /wrapper -->
|
|
271
289
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
272
290
|
Code coverage generated by
|
|
273
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
274
|
-
at
|
|
291
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
292
|
+
at Tue Mar 08 2022 11:38:49 GMT+0000 (Greenwich Mean Time)
|
|
275
293
|
</div>
|
|
276
|
-
|
|
277
|
-
<script src="../../../prettify.js"></script>
|
|
294
|
+
<script src="../prettify.js"></script>
|
|
278
295
|
<script>
|
|
279
296
|
window.onload = function () {
|
|
280
297
|
prettyPrint();
|
|
281
298
|
};
|
|
282
299
|
</script>
|
|
283
|
-
<script src="
|
|
284
|
-
<script src="
|
|
300
|
+
<script src="../sorter.js"></script>
|
|
301
|
+
<script src="../block-navigation.js"></script>
|
|
285
302
|
</body>
|
|
286
303
|
</html>
|
|
287
304
|
|
|
@@ -267,10 +267,9 @@ export default useHelperApp;
|
|
|
267
267
|
</div><!-- /wrapper -->
|
|
268
268
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
269
269
|
Code coverage generated by
|
|
270
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
271
|
-
at
|
|
270
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
271
|
+
at Tue Mar 08 2022 11:38:49 GMT+0000 (Greenwich Mean Time)
|
|
272
272
|
</div>
|
|
273
|
-
</div>
|
|
274
273
|
<script src="../prettify.js"></script>
|
|
275
274
|
<script>
|
|
276
275
|
window.onload = function () {
|
|
@@ -258,10 +258,9 @@ export default useKiwtFieldArray;
|
|
|
258
258
|
</div><!-- /wrapper -->
|
|
259
259
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
260
260
|
Code coverage generated by
|
|
261
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
262
|
-
at
|
|
261
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
262
|
+
at Tue Mar 08 2022 11:38:49 GMT+0000 (Greenwich Mean Time)
|
|
263
263
|
</div>
|
|
264
|
-
</div>
|
|
265
264
|
<script src="../prettify.js"></script>
|
|
266
265
|
<script>
|
|
267
266
|
window.onload = function () {
|
|
@@ -162,10 +162,9 @@ export default useKiwtSASQuery;
|
|
|
162
162
|
</div><!-- /wrapper -->
|
|
163
163
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
164
164
|
Code coverage generated by
|
|
165
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
166
|
-
at
|
|
165
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
166
|
+
at Tue Mar 08 2022 11:38:49 GMT+0000 (Greenwich Mean Time)
|
|
167
167
|
</div>
|
|
168
|
-
</div>
|
|
169
168
|
<script src="../prettify.js"></script>
|
|
170
169
|
<script>
|
|
171
170
|
window.onload = function () {
|
|
@@ -120,10 +120,9 @@ export default useLocalStorageState;
|
|
|
120
120
|
</div><!-- /wrapper -->
|
|
121
121
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
122
122
|
Code coverage generated by
|
|
123
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
124
|
-
at
|
|
123
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
124
|
+
at Tue Mar 08 2022 11:38:49 GMT+0000 (Greenwich Mean Time)
|
|
125
125
|
</div>
|
|
126
|
-
</div>
|
|
127
126
|
<script src="../prettify.js"></script>
|
|
128
127
|
<script>
|
|
129
128
|
window.onload = function () {
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for
|
|
6
|
+
<title>Code coverage report for hooks/useMutateCustomProperties.js</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="
|
|
8
|
+
<link rel="stylesheet" href="../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../favicon.png" />
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
12
|
<style type='text/css'>
|
|
13
13
|
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(
|
|
14
|
+
background-image: url(../sort-arrow-sprite.png);
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
@@ -19,34 +19,34 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">hooks</a> useMutateCustomProperties.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/19</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/7</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/4</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/19</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -125,18 +125,7 @@
|
|
|
125
125
|
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
126
|
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
127
|
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
-
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
-
<a name='L64'></a><a href='#L64'>64</a>
|
|
130
|
-
<a name='L65'></a><a href='#L65'>65</a>
|
|
131
|
-
<a name='L66'></a><a href='#L66'>66</a>
|
|
132
|
-
<a name='L67'></a><a href='#L67'>67</a>
|
|
133
|
-
<a name='L68'></a><a href='#L68'>68</a>
|
|
134
|
-
<a name='L69'></a><a href='#L69'>69</a>
|
|
135
|
-
<a name='L70'></a><a href='#L70'>70</a>
|
|
136
|
-
<a name='L71'></a><a href='#L71'>71</a>
|
|
137
|
-
<a name='L72'></a><a href='#L72'>72</a>
|
|
138
|
-
<a name='L73'></a><a href='#L73'>73</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
139
|
-
<span class="cline-any cline-neutral"> </span>
|
|
128
|
+
<a name='L63'></a><a href='#L63'>63</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
140
129
|
<span class="cline-any cline-neutral"> </span>
|
|
141
130
|
<span class="cline-any cline-neutral"> </span>
|
|
142
131
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -150,7 +139,6 @@
|
|
|
150
139
|
<span class="cline-any cline-neutral"> </span>
|
|
151
140
|
<span class="cline-any cline-neutral"> </span>
|
|
152
141
|
<span class="cline-any cline-neutral"> </span>
|
|
153
|
-
<span class="cline-any cline-no"> </span>
|
|
154
142
|
<span class="cline-any cline-neutral"> </span>
|
|
155
143
|
<span class="cline-any cline-no"> </span>
|
|
156
144
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -158,18 +146,7 @@
|
|
|
158
146
|
<span class="cline-any cline-neutral"> </span>
|
|
159
147
|
<span class="cline-any cline-no"> </span>
|
|
160
148
|
<span class="cline-any cline-neutral"> </span>
|
|
161
|
-
<span class="cline-any cline-
|
|
162
|
-
<span class="cline-any cline-neutral"> </span>
|
|
163
|
-
<span class="cline-any cline-neutral"> </span>
|
|
164
|
-
<span class="cline-any cline-neutral"> </span>
|
|
165
|
-
<span class="cline-any cline-neutral"> </span>
|
|
166
|
-
<span class="cline-any cline-neutral"> </span>
|
|
167
|
-
<span class="cline-any cline-neutral"> </span>
|
|
168
|
-
<span class="cline-any cline-neutral"> </span>
|
|
169
|
-
<span class="cline-any cline-neutral"> </span>
|
|
170
|
-
<span class="cline-any cline-neutral"> </span>
|
|
171
|
-
<span class="cline-any cline-neutral"> </span>
|
|
172
|
-
<span class="cline-any cline-neutral"> </span>
|
|
149
|
+
<span class="cline-any cline-no"> </span>
|
|
173
150
|
<span class="cline-any cline-neutral"> </span>
|
|
174
151
|
<span class="cline-any cline-neutral"> </span>
|
|
175
152
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -181,14 +158,17 @@
|
|
|
181
158
|
<span class="cline-any cline-neutral"> </span>
|
|
182
159
|
<span class="cline-any cline-neutral"> </span>
|
|
183
160
|
<span class="cline-any cline-neutral"> </span>
|
|
161
|
+
<span class="cline-any cline-no"> </span>
|
|
184
162
|
<span class="cline-any cline-neutral"> </span>
|
|
163
|
+
<span class="cline-any cline-no"> </span>
|
|
185
164
|
<span class="cline-any cline-neutral"> </span>
|
|
186
165
|
<span class="cline-any cline-neutral"> </span>
|
|
187
166
|
<span class="cline-any cline-neutral"> </span>
|
|
188
167
|
<span class="cline-any cline-neutral"> </span>
|
|
168
|
+
<span class="cline-any cline-no"> </span>
|
|
169
|
+
<span class="cline-any cline-no"> </span>
|
|
189
170
|
<span class="cline-any cline-neutral"> </span>
|
|
190
|
-
<span class="cline-any cline-
|
|
191
|
-
<span class="cline-any cline-neutral"> </span>
|
|
171
|
+
<span class="cline-any cline-no"> </span>
|
|
192
172
|
<span class="cline-any cline-neutral"> </span>
|
|
193
173
|
<span class="cline-any cline-neutral"> </span>
|
|
194
174
|
<span class="cline-any cline-no"> </span>
|
|
@@ -207,17 +187,17 @@
|
|
|
207
187
|
<span class="cline-any cline-neutral"> </span>
|
|
208
188
|
<span class="cline-any cline-neutral"> </span>
|
|
209
189
|
<span class="cline-any cline-neutral"> </span>
|
|
210
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import
|
|
211
|
-
import { useMutation } from 'react-query';
|
|
190
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useMutation } from 'react-query';
|
|
212
191
|
|
|
213
192
|
import { useOkapiKy } from '@folio/stripes/core';
|
|
214
193
|
|
|
215
|
-
const
|
|
194
|
+
const useMutateCustomProperties = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span></span>
|
|
216
195
|
afterQueryCalls,
|
|
217
196
|
endpoint,
|
|
218
197
|
id,
|
|
219
198
|
queryParams,
|
|
220
199
|
returnQueryObject = <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
200
|
+
post: false,
|
|
221
201
|
put: false,
|
|
222
202
|
delete: false
|
|
223
203
|
}
|
|
@@ -227,41 +207,25 @@ const useMutateRefdataValue = <span class="cstat-no" title="statement not covere
|
|
|
227
207
|
const ky = <span class="cstat-no" title="statement not covered" >useOkapiKy();</span>
|
|
228
208
|
|
|
229
209
|
const deleteQueryObject = <span class="cstat-no" title="statement not covered" >useMutation(</span>
|
|
230
|
-
['stripes-kint-components', '
|
|
231
|
-
<span class="fstat-no" title="function not covered" > as</span>ync (
|
|
232
|
-
`${endpoint}/${id}`,
|
|
233
|
-
{
|
|
234
|
-
json: {
|
|
235
|
-
id,
|
|
236
|
-
values: [
|
|
237
|
-
{
|
|
238
|
-
id: data,
|
|
239
|
-
_delete: true
|
|
240
|
-
}
|
|
241
|
-
]
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
).json()
|
|
210
|
+
['stripes-kint-components', 'useMutateCustomProperties', 'delete', id],
|
|
211
|
+
<span class="fstat-no" title="function not covered" > as</span>ync () => <span class="cstat-no" title="statement not covered" >ky.delete(`${endpoint}/${id}`).json()</span>
|
|
245
212
|
.then(afterQueryCalls?.delete),
|
|
246
213
|
queryParams?.delete
|
|
247
214
|
);
|
|
248
215
|
|
|
249
216
|
const putQueryObject = <span class="cstat-no" title="statement not covered" >useMutation(</span>
|
|
250
|
-
['stripes-kint-components', '
|
|
251
|
-
<span class="fstat-no" title="function not covered" > as</span>ync (data) => <span class="cstat-no" title="statement not covered" >ky.put(</span>
|
|
252
|
-
`${endpoint}/${id}`,
|
|
253
|
-
{
|
|
254
|
-
json: {
|
|
255
|
-
id,
|
|
256
|
-
values: [
|
|
257
|
-
data
|
|
258
|
-
]
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
).json()
|
|
217
|
+
['stripes-kint-components', 'useMutateCustomProperties', 'put', id],
|
|
218
|
+
<span class="fstat-no" title="function not covered" > as</span>ync (data) => <span class="cstat-no" title="statement not covered" >ky.put(`${endpoint}/${id}`, { json: data }).json()</span>
|
|
262
219
|
.then(afterQueryCalls?.put),
|
|
263
220
|
queryParams?.put
|
|
264
221
|
);
|
|
222
|
+
|
|
223
|
+
const postQueryObject = <span class="cstat-no" title="statement not covered" >useMutation(</span>
|
|
224
|
+
['stripes-kint-components', 'useMutateCustomProperties', 'post'],
|
|
225
|
+
<span class="fstat-no" title="function not covered" > as</span>ync (data) => <span class="cstat-no" title="statement not covered" >ky.post(`${endpoint}`, { json: data }).json()</span>
|
|
226
|
+
.then(afterQueryCalls?.post),
|
|
227
|
+
queryParams?.post
|
|
228
|
+
);
|
|
265
229
|
|
|
266
230
|
<span class="cstat-no" title="statement not covered" > if (returnQueryObject?.delete) {</span>
|
|
267
231
|
<span class="cstat-no" title="statement not covered" > returnObj.delete = deleteQueryObject;</span>
|
|
@@ -275,28 +239,33 @@ const useMutateRefdataValue = <span class="cstat-no" title="statement not covere
|
|
|
275
239
|
<span class="cstat-no" title="statement not covered" > returnObj.put = putQueryObject.mutateAsync;</span>
|
|
276
240
|
}
|
|
277
241
|
|
|
242
|
+
<span class="cstat-no" title="statement not covered" > if (returnQueryObject?.post) {</span>
|
|
243
|
+
<span class="cstat-no" title="statement not covered" > returnObj.post = postQueryObject;</span>
|
|
244
|
+
} else {
|
|
245
|
+
<span class="cstat-no" title="statement not covered" > returnObj.post = postQueryObject.mutateAsync;</span>
|
|
246
|
+
}
|
|
247
|
+
|
|
278
248
|
<span class="cstat-no" title="statement not covered" > return returnObj;</span>
|
|
279
249
|
};
|
|
280
250
|
|
|
281
|
-
export default
|
|
251
|
+
export default useMutateCustomProperties;
|
|
282
252
|
</pre></td></tr></table></pre>
|
|
283
253
|
|
|
284
254
|
<div class='push'></div><!-- for sticky footer -->
|
|
285
255
|
</div><!-- /wrapper -->
|
|
286
256
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
287
257
|
Code coverage generated by
|
|
288
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
289
|
-
at
|
|
258
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
259
|
+
at Tue Mar 08 2022 11:38:49 GMT+0000 (Greenwich Mean Time)
|
|
290
260
|
</div>
|
|
291
|
-
|
|
292
|
-
<script src="../../../prettify.js"></script>
|
|
261
|
+
<script src="../prettify.js"></script>
|
|
293
262
|
<script>
|
|
294
263
|
window.onload = function () {
|
|
295
264
|
prettyPrint();
|
|
296
265
|
};
|
|
297
266
|
</script>
|
|
298
|
-
<script src="
|
|
299
|
-
<script src="
|
|
267
|
+
<script src="../sorter.js"></script>
|
|
268
|
+
<script src="../block-navigation.js"></script>
|
|
300
269
|
</body>
|
|
301
270
|
</html>
|
|
302
271
|
|
|
@@ -285,10 +285,9 @@ export default useMutateRefdataValue;
|
|
|
285
285
|
</div><!-- /wrapper -->
|
|
286
286
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
287
287
|
Code coverage generated by
|
|
288
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
289
|
-
at
|
|
288
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
289
|
+
at Tue Mar 08 2022 11:38:49 GMT+0000 (Greenwich Mean Time)
|
|
290
290
|
</div>
|
|
291
|
-
</div>
|
|
292
291
|
<script src="../prettify.js"></script>
|
|
293
292
|
<script>
|
|
294
293
|
window.onload = function () {
|
|
@@ -192,10 +192,9 @@ export default useQIndex;
|
|
|
192
192
|
</div><!-- /wrapper -->
|
|
193
193
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
194
194
|
Code coverage generated by
|
|
195
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
196
|
-
at
|
|
195
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
196
|
+
at Tue Mar 08 2022 11:38:49 GMT+0000 (Greenwich Mean Time)
|
|
197
197
|
</div>
|
|
198
|
-
</div>
|
|
199
198
|
<script src="../prettify.js"></script>
|
|
200
199
|
<script>
|
|
201
200
|
window.onload = function () {
|
|
@@ -124,13 +124,7 @@
|
|
|
124
124
|
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
125
|
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
126
|
<a name='L61'></a><a href='#L61'>61</a>
|
|
127
|
-
<a name='L62'></a><a href='#L62'>62</a>
|
|
128
|
-
<a name='L63'></a><a href='#L63'>63</a>
|
|
129
|
-
<a name='L64'></a><a href='#L64'>64</a>
|
|
130
|
-
<a name='L65'></a><a href='#L65'>65</a>
|
|
131
|
-
<a name='L66'></a><a href='#L66'>66</a>
|
|
132
|
-
<a name='L67'></a><a href='#L67'>67</a>
|
|
133
|
-
<a name='L68'></a><a href='#L68'>68</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<a name='L62'></a><a href='#L62'>62</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
134
128
|
<span class="cline-any cline-neutral"> </span>
|
|
135
129
|
<span class="cline-any cline-neutral"> </span>
|
|
136
130
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -145,12 +139,6 @@
|
|
|
145
139
|
<span class="cline-any cline-neutral"> </span>
|
|
146
140
|
<span class="cline-any cline-neutral"> </span>
|
|
147
141
|
<span class="cline-any cline-neutral"> </span>
|
|
148
|
-
<span class="cline-any cline-neutral"> </span>
|
|
149
|
-
<span class="cline-any cline-neutral"> </span>
|
|
150
|
-
<span class="cline-any cline-neutral"> </span>
|
|
151
|
-
<span class="cline-any cline-neutral"> </span>
|
|
152
|
-
<span class="cline-any cline-neutral"> </span>
|
|
153
|
-
<span class="cline-any cline-neutral"> </span>
|
|
154
142
|
<span class="cline-any cline-no"> </span>
|
|
155
143
|
<span class="cline-any cline-neutral"> </span>
|
|
156
144
|
<span class="cline-any cline-no"> </span>
|
|
@@ -203,20 +191,14 @@ import PropTypes from 'prop-types';
|
|
|
203
191
|
import { useQuery } from 'react-query';
|
|
204
192
|
import { useOkapiKy } from '@folio/stripes/core';
|
|
205
193
|
|
|
206
|
-
import { generateKiwtQuery } from '../utils';
|
|
194
|
+
import { generateKiwtQuery, refdataOptions } from '../utils';
|
|
207
195
|
|
|
208
196
|
const useRefdata = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >({</span></span>
|
|
209
197
|
endpoint,
|
|
210
198
|
desc,
|
|
199
|
+
options = <span class="branch-0 cbranch-no" title="branch not covered" >refdataOptions,</span>
|
|
211
200
|
queryParams,
|
|
212
201
|
returnQueryObject = <span class="branch-0 cbranch-no" title="branch not covered" >false,</span>
|
|
213
|
-
options = <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
214
|
-
filterKeys: {
|
|
215
|
-
DescKey: 'desc'
|
|
216
|
-
},
|
|
217
|
-
stats: false,
|
|
218
|
-
max: 100
|
|
219
|
-
}
|
|
220
202
|
}) => {
|
|
221
203
|
const ky = <span class="cstat-no" title="statement not covered" >useOkapiKy();</span>
|
|
222
204
|
|
|
@@ -270,10 +252,9 @@ export default useRefdata;
|
|
|
270
252
|
</div><!-- /wrapper -->
|
|
271
253
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
272
254
|
Code coverage generated by
|
|
273
|
-
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
274
|
-
at
|
|
255
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
256
|
+
at Tue Mar 08 2022 11:38:49 GMT+0000 (Greenwich Mean Time)
|
|
275
257
|
</div>
|
|
276
|
-
</div>
|
|
277
258
|
<script src="../prettify.js"></script>
|
|
278
259
|
<script>
|
|
279
260
|
window.onload = function () {
|