@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
|
@@ -4,7 +4,7 @@ import classnames from 'classnames';
|
|
|
4
4
|
|
|
5
5
|
import get from 'lodash/get';
|
|
6
6
|
|
|
7
|
-
import { EndOfList, IconButton, Popper } from '@folio/stripes/components';
|
|
7
|
+
import { EndOfList, IconButton, Label, Popper } from '@folio/stripes/components';
|
|
8
8
|
|
|
9
9
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
10
10
|
import { interactionStyles } from '@folio/stripes-components/lib/sharedStyles/interactionStyles.css';
|
|
@@ -17,19 +17,29 @@ import selectorSafe from '../utils/selectorSafe';
|
|
|
17
17
|
|
|
18
18
|
const Typedown = ({
|
|
19
19
|
dataOptions,
|
|
20
|
+
endOfList,
|
|
21
|
+
id,
|
|
20
22
|
input,
|
|
23
|
+
isSelected,
|
|
21
24
|
filterPath,
|
|
25
|
+
label,
|
|
22
26
|
meta,
|
|
23
27
|
onChange,
|
|
24
28
|
onType,
|
|
25
29
|
renderFooter = null,
|
|
26
30
|
renderListItem = null,
|
|
31
|
+
required,
|
|
27
32
|
uniqueIdentificationPath = 'id'
|
|
28
33
|
}) => {
|
|
29
34
|
const selectedUniqueId = get(input.value, uniqueIdentificationPath);
|
|
30
35
|
|
|
31
36
|
// Display data needs to be in line with data options but also able to react to default handleType
|
|
32
37
|
const [displayData, setDisplayData] = useState(dataOptions);
|
|
38
|
+
|
|
39
|
+
// keep track of what we've typed and whether we've typed an exact match or not
|
|
40
|
+
const [currentlyTyped, setCurrentlyTyped] = useState('');
|
|
41
|
+
const [exactMatch, setExactMatch] = useState(false);
|
|
42
|
+
|
|
33
43
|
useEffect(() => {
|
|
34
44
|
setDisplayData(dataOptions);
|
|
35
45
|
}, [dataOptions]);
|
|
@@ -46,6 +56,14 @@ const Typedown = ({
|
|
|
46
56
|
} else {
|
|
47
57
|
setDisplayData(dataOptions);
|
|
48
58
|
}
|
|
59
|
+
|
|
60
|
+
setCurrentlyTyped(e.target.value);
|
|
61
|
+
|
|
62
|
+
if (displayData.length === 1 && get(displayData[0], filterPath) === e.target.value) {
|
|
63
|
+
setExactMatch(true);
|
|
64
|
+
} else {
|
|
65
|
+
setExactMatch(false);
|
|
66
|
+
}
|
|
49
67
|
};
|
|
50
68
|
|
|
51
69
|
// Hook to set up all the essentials
|
|
@@ -74,11 +92,11 @@ const Typedown = ({
|
|
|
74
92
|
className={css.listItem}
|
|
75
93
|
>
|
|
76
94
|
{renderListItem ?
|
|
77
|
-
renderListItem(option) :
|
|
95
|
+
renderListItem(option, currentlyTyped, exactMatch) :
|
|
78
96
|
get(option, uniqueIdentificationPath)
|
|
79
97
|
}
|
|
80
98
|
</div>
|
|
81
|
-
), [renderListItem, uniqueIdentificationPath]);
|
|
99
|
+
), [currentlyTyped, exactMatch, renderListItem, uniqueIdentificationPath]);
|
|
82
100
|
|
|
83
101
|
const handleChange = useCallback(value => {
|
|
84
102
|
input.onChange(value);
|
|
@@ -101,7 +119,7 @@ const Typedown = ({
|
|
|
101
119
|
id="typedown-list"
|
|
102
120
|
>
|
|
103
121
|
{displayData?.length ? displayData?.map((d, index) => {
|
|
104
|
-
const
|
|
122
|
+
const isSelectedEval = isSelected ? isSelected(input.value, d) : get(input.value, uniqueIdentificationPath) === get(d, uniqueIdentificationPath);
|
|
105
123
|
return (
|
|
106
124
|
<button
|
|
107
125
|
key={`typedown-button-[${index}]`}
|
|
@@ -110,7 +128,7 @@ const Typedown = ({
|
|
|
110
128
|
css.fullWidth,
|
|
111
129
|
css.menuButton
|
|
112
130
|
)}
|
|
113
|
-
data-selected={
|
|
131
|
+
data-selected={isSelectedEval}
|
|
114
132
|
id={`typedown-button-[${index}]`}
|
|
115
133
|
onClick={() => {
|
|
116
134
|
handleChange(d);
|
|
@@ -123,8 +141,7 @@ const Typedown = ({
|
|
|
123
141
|
</button>
|
|
124
142
|
);
|
|
125
143
|
}) :
|
|
126
|
-
|
|
127
|
-
<EndOfList />
|
|
144
|
+
endOfList || <EndOfList />
|
|
128
145
|
}
|
|
129
146
|
</div>
|
|
130
147
|
{renderFooter &&
|
|
@@ -133,17 +150,21 @@ const Typedown = ({
|
|
|
133
150
|
className={css.footer}
|
|
134
151
|
id={`typedown-footer-${selectorSafe(input.name)}`}
|
|
135
152
|
>
|
|
136
|
-
{renderFooter()}
|
|
153
|
+
{renderFooter(displayData, currentlyTyped, exactMatch)}
|
|
137
154
|
</div>
|
|
138
155
|
}
|
|
139
156
|
</div>
|
|
140
157
|
);
|
|
141
158
|
}, [
|
|
159
|
+
currentlyTyped,
|
|
142
160
|
displayData,
|
|
161
|
+
endOfList,
|
|
162
|
+
exactMatch,
|
|
143
163
|
footerRef,
|
|
144
164
|
handleChange,
|
|
145
165
|
handleNextFocus,
|
|
146
166
|
input,
|
|
167
|
+
isSelected,
|
|
147
168
|
listKeyDownHandler,
|
|
148
169
|
listRef,
|
|
149
170
|
renderFooter,
|
|
@@ -174,6 +195,15 @@ const Typedown = ({
|
|
|
174
195
|
<div
|
|
175
196
|
ref={resizeRef}
|
|
176
197
|
>
|
|
198
|
+
{label &&
|
|
199
|
+
<Label
|
|
200
|
+
htmlFor={id}
|
|
201
|
+
id={`${id}-label`}
|
|
202
|
+
required={required}
|
|
203
|
+
>
|
|
204
|
+
{label}
|
|
205
|
+
</Label>
|
|
206
|
+
}
|
|
177
207
|
{renderSearchField()}
|
|
178
208
|
<Popper
|
|
179
209
|
key="typedown-menu-toggle"
|
|
@@ -222,13 +252,25 @@ const Typedown = ({
|
|
|
222
252
|
|
|
223
253
|
Typedown.propTypes = {
|
|
224
254
|
dataOptions: PropTypes.arrayOf(PropTypes.object),
|
|
255
|
+
endOfList: PropTypes.oneOfType([
|
|
256
|
+
PropTypes.func,
|
|
257
|
+
PropTypes.node,
|
|
258
|
+
PropTypes.element
|
|
259
|
+
]),
|
|
225
260
|
filterPath: PropTypes.string,
|
|
261
|
+
id: PropTypes.string,
|
|
226
262
|
input: PropTypes.object,
|
|
263
|
+
isSelected: PropTypes.func,
|
|
264
|
+
label: PropTypes.oneOfType([
|
|
265
|
+
PropTypes.string,
|
|
266
|
+
PropTypes.element
|
|
267
|
+
]),
|
|
227
268
|
meta: PropTypes.object,
|
|
228
269
|
onChange: PropTypes.func,
|
|
229
270
|
onType: PropTypes.func,
|
|
230
271
|
renderFooter: PropTypes.func,
|
|
231
272
|
renderListItem: PropTypes.func,
|
|
273
|
+
required: PropTypes.bool,
|
|
232
274
|
uniqueIdentificationPath: PropTypes.string
|
|
233
275
|
};
|
|
234
276
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const TYPE_CLASS_PREFIX = 'com.k_int.web.toolkit.custprops.types.CustomProperty';
|
|
2
|
+
export const BLOB_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyBlob';
|
|
3
|
+
export const BOOLEAN_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyBoolean';
|
|
4
|
+
export const CONTAINER_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyContainer';
|
|
5
|
+
export const DECIMAL_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyDecimal';
|
|
6
|
+
export const INTEGER_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyInteger';
|
|
7
|
+
export const REFDATA_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata';
|
|
8
|
+
export const REFDATA_DEFINITION_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyRefdataDefinition';
|
|
9
|
+
export const TEXT_CLASS_NAME = 'com.k_int.web.toolkit.custprops.types.CustomPropertyText';
|
package/src/lib/hooks/index.js
CHANGED
|
@@ -8,3 +8,5 @@ export { default as useLocalStorageState } from './useLocalStorageState';
|
|
|
8
8
|
export { default as useQIndex } from './useQIndex';
|
|
9
9
|
export { useSettings, useSettingSection } from './settingsHooks';
|
|
10
10
|
export { default as useKiwtFieldArray } from './useKiwtFieldArray';
|
|
11
|
+
export { default as useCustomProperties } from './useCustomProperties';
|
|
12
|
+
export { default as useMutateCustomProperties } from './useMutateCustomProperties';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
|
|
3
|
+
import { useQuery } from 'react-query';
|
|
4
|
+
import { useOkapiKy } from '@folio/stripes/core';
|
|
5
|
+
|
|
6
|
+
import { generateKiwtQuery } from '../utils';
|
|
7
|
+
|
|
8
|
+
const useCustomProperties = ({
|
|
9
|
+
endpoint,
|
|
10
|
+
ctx,
|
|
11
|
+
nsValues = {
|
|
12
|
+
sort: 'id'
|
|
13
|
+
},
|
|
14
|
+
options = {
|
|
15
|
+
searchKey: 'label,name,description',
|
|
16
|
+
filterKeys: {
|
|
17
|
+
ContextKey: 'ctx'
|
|
18
|
+
},
|
|
19
|
+
stats: false,
|
|
20
|
+
max: 100
|
|
21
|
+
},
|
|
22
|
+
queryParams,
|
|
23
|
+
returnQueryObject = false,
|
|
24
|
+
}) => {
|
|
25
|
+
const ky = useOkapiKy();
|
|
26
|
+
|
|
27
|
+
// Allow passing of 'false' for isNull
|
|
28
|
+
if (Array.isArray(ctx)) {
|
|
29
|
+
// If we have an array, append a context filter for each ctx given
|
|
30
|
+
nsValues.filters = ctx.map(c => {
|
|
31
|
+
if (c === 'isNull') {
|
|
32
|
+
return 'ContextWithoutKey.ctx isNull';
|
|
33
|
+
} else {
|
|
34
|
+
return `ContextKey.${c}`;
|
|
35
|
+
}
|
|
36
|
+
}).join(',');
|
|
37
|
+
} else if (ctx === 'isNull') { // isNull is a special case
|
|
38
|
+
nsValues.filters = 'ContextWithoutKey.ctx isNull';
|
|
39
|
+
} else if (ctx) {
|
|
40
|
+
// If we just have a string, append a single ctx filter
|
|
41
|
+
nsValues.filters = `ContextKey.${ctx}`;
|
|
42
|
+
} else {
|
|
43
|
+
nsValues.filters = null;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const query = generateKiwtQuery(options, nsValues);
|
|
47
|
+
const path = `${endpoint}${query}`;
|
|
48
|
+
|
|
49
|
+
const queryObject = useQuery(
|
|
50
|
+
['stripes-kint-components', 'useCustomProperties', 'custprops', ctx, path],
|
|
51
|
+
() => ky(path).json(),
|
|
52
|
+
queryParams
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
if (returnQueryObject) {
|
|
56
|
+
return queryObject || {};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
const { data: custprops } = queryObject;
|
|
60
|
+
return custprops || [];
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
useCustomProperties.propTypes = {
|
|
64
|
+
endpoint: PropTypes.string,
|
|
65
|
+
ctx: PropTypes.oneOfType([
|
|
66
|
+
PropTypes.string,
|
|
67
|
+
PropTypes.arrayOf(PropTypes.string)
|
|
68
|
+
]),
|
|
69
|
+
queryParams: PropTypes.object,
|
|
70
|
+
returnQueryObject: PropTypes.bool
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export default useCustomProperties;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { useMutation } from 'react-query';
|
|
2
|
+
|
|
3
|
+
import { useOkapiKy } from '@folio/stripes/core';
|
|
4
|
+
|
|
5
|
+
const useMutateCustomProperties = ({
|
|
6
|
+
afterQueryCalls,
|
|
7
|
+
endpoint,
|
|
8
|
+
id,
|
|
9
|
+
queryParams,
|
|
10
|
+
returnQueryObject = {
|
|
11
|
+
post: false,
|
|
12
|
+
put: false,
|
|
13
|
+
delete: false
|
|
14
|
+
}
|
|
15
|
+
}) => {
|
|
16
|
+
const returnObj = {};
|
|
17
|
+
|
|
18
|
+
const ky = useOkapiKy();
|
|
19
|
+
|
|
20
|
+
const deleteQueryObject = useMutation(
|
|
21
|
+
['stripes-kint-components', 'useMutateCustomProperties', 'delete', id],
|
|
22
|
+
async () => ky.delete(`${endpoint}/${id}`).json()
|
|
23
|
+
.then(afterQueryCalls?.delete),
|
|
24
|
+
queryParams?.delete
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
const putQueryObject = useMutation(
|
|
28
|
+
['stripes-kint-components', 'useMutateCustomProperties', 'put', id],
|
|
29
|
+
async (data) => ky.put(`${endpoint}/${id}`, { json: data }).json()
|
|
30
|
+
.then(afterQueryCalls?.put),
|
|
31
|
+
queryParams?.put
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const postQueryObject = useMutation(
|
|
35
|
+
['stripes-kint-components', 'useMutateCustomProperties', 'post'],
|
|
36
|
+
async (data) => ky.post(`${endpoint}`, { json: data }).json()
|
|
37
|
+
.then(afterQueryCalls?.post),
|
|
38
|
+
queryParams?.post
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
if (returnQueryObject?.delete) {
|
|
42
|
+
returnObj.delete = deleteQueryObject;
|
|
43
|
+
} else {
|
|
44
|
+
returnObj.delete = deleteQueryObject.mutateAsync;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (returnQueryObject?.put) {
|
|
48
|
+
returnObj.put = putQueryObject;
|
|
49
|
+
} else {
|
|
50
|
+
returnObj.put = putQueryObject.mutateAsync;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (returnQueryObject?.post) {
|
|
54
|
+
returnObj.post = postQueryObject;
|
|
55
|
+
} else {
|
|
56
|
+
returnObj.post = postQueryObject.mutateAsync;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
return returnObj;
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export default useMutateCustomProperties;
|
|
@@ -4,20 +4,14 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import { useQuery } from 'react-query';
|
|
5
5
|
import { useOkapiKy } from '@folio/stripes/core';
|
|
6
6
|
|
|
7
|
-
import { generateKiwtQuery } from '../utils';
|
|
7
|
+
import { generateKiwtQuery, refdataOptions } from '../utils';
|
|
8
8
|
|
|
9
9
|
const useRefdata = ({
|
|
10
10
|
endpoint,
|
|
11
11
|
desc,
|
|
12
|
+
options = refdataOptions,
|
|
12
13
|
queryParams,
|
|
13
14
|
returnQueryObject = false,
|
|
14
|
-
options = {
|
|
15
|
-
filterKeys: {
|
|
16
|
-
DescKey: 'desc'
|
|
17
|
-
},
|
|
18
|
-
stats: false,
|
|
19
|
-
max: 100
|
|
20
|
-
}
|
|
21
15
|
}) => {
|
|
22
16
|
const ky = useOkapiKy();
|
|
23
17
|
|
package/src/lib/utils/index.js
CHANGED
|
@@ -4,6 +4,8 @@ export { default as selectorSafe } from './selectorSafe';
|
|
|
4
4
|
|
|
5
5
|
export { default as buildUrl } from './buildUrl';
|
|
6
6
|
|
|
7
|
+
export { default as refdataOptions } from './refdataOptions';
|
|
8
|
+
|
|
7
9
|
// Settings utils
|
|
8
10
|
export { default as renderHelpText } from './renderHelpText';
|
|
9
11
|
export { default as sortByLabel } from './sortByLabel';
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
+
|
|
3
|
+
"create": "Create",
|
|
4
|
+
"edit": "Edit",
|
|
5
|
+
"save": "Save",
|
|
6
|
+
"cancel": "Cancel",
|
|
7
|
+
"delete": "Delete",
|
|
8
|
+
|
|
9
|
+
"errors.hasNonAlphaName": "The name can only contain Latin alphabetical characters (a-z) and non-leading numeric characters.",
|
|
10
|
+
|
|
2
11
|
"settings.noCurrentValue": "No current value",
|
|
3
12
|
"settings.default": "default",
|
|
4
13
|
"settings.edit": "Edit",
|
|
@@ -18,5 +27,44 @@
|
|
|
18
27
|
|
|
19
28
|
"sasqLookupComponent.mainPane.found": "{total} records found",
|
|
20
29
|
|
|
21
|
-
"noResultsMessage.showFilters": "Show filters"
|
|
30
|
+
"noResultsMessage.showFilters": "Show filters",
|
|
31
|
+
|
|
32
|
+
"customProperties": "Custom properties",
|
|
33
|
+
|
|
34
|
+
"customProperties.all": "All",
|
|
35
|
+
"customProperties.none": "None",
|
|
36
|
+
|
|
37
|
+
"customProperties.label": "Label",
|
|
38
|
+
"customProperties.primary": "Primary",
|
|
39
|
+
"customProperties.ctx": "Context",
|
|
40
|
+
"customProperties.ctx.addContext": "Add context {value}",
|
|
41
|
+
"customProperties.weight": "Order weight",
|
|
42
|
+
"customProperties.type": "Type",
|
|
43
|
+
"customProperties.internalFalse": "Public",
|
|
44
|
+
"customProperties.internalNote": "Internal note",
|
|
45
|
+
"customProperties.internalTrue": "Internal",
|
|
46
|
+
"customProperties.publicNote": "Public note",
|
|
47
|
+
"customProperties.name": "Name",
|
|
48
|
+
"customProperties.description": "Description",
|
|
49
|
+
"customProperties.category": "Picklist",
|
|
50
|
+
"customProperties.defaultVisibility": "Default visibility",
|
|
51
|
+
|
|
52
|
+
"customProperties.noCtxFound": "No matching context found",
|
|
53
|
+
|
|
54
|
+
"customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyBlob": "Blob",
|
|
55
|
+
"customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyBoolean": "Boolean",
|
|
56
|
+
"customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyContainer": "Container",
|
|
57
|
+
"customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyDecimal": "Decimal",
|
|
58
|
+
"customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyInteger": "Integer",
|
|
59
|
+
"customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata": "Refdata",
|
|
60
|
+
"customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyRefdataDefinition": "Refdata definition",
|
|
61
|
+
"customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyText": "Text",
|
|
62
|
+
|
|
63
|
+
"customProperties.delete.confirmLabel": "Delete",
|
|
64
|
+
"customProperties.delete.confirmHeading": "Delete custom property",
|
|
65
|
+
"customProperties.delete.confirmMessage": "Custom property <strong>{name}</strong> will be <strong>deleted</strong>.",
|
|
66
|
+
|
|
67
|
+
"search": "Search",
|
|
68
|
+
"yes": "Yes",
|
|
69
|
+
"no": "No"
|
|
22
70
|
}
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
body, html {
|
|
2
|
-
margin:0; padding: 0;
|
|
3
|
-
height: 100%;
|
|
4
|
-
}
|
|
5
|
-
body {
|
|
6
|
-
font-family: Helvetica Neue, Helvetica, Arial;
|
|
7
|
-
font-size: 14px;
|
|
8
|
-
color:#333;
|
|
9
|
-
}
|
|
10
|
-
.small { font-size: 12px; }
|
|
11
|
-
*, *:after, *:before {
|
|
12
|
-
-webkit-box-sizing:border-box;
|
|
13
|
-
-moz-box-sizing:border-box;
|
|
14
|
-
box-sizing:border-box;
|
|
15
|
-
}
|
|
16
|
-
h1 { font-size: 20px; margin: 0;}
|
|
17
|
-
h2 { font-size: 14px; }
|
|
18
|
-
pre {
|
|
19
|
-
font: 12px/1.4 Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
20
|
-
margin: 0;
|
|
21
|
-
padding: 0;
|
|
22
|
-
-moz-tab-size: 2;
|
|
23
|
-
-o-tab-size: 2;
|
|
24
|
-
tab-size: 2;
|
|
25
|
-
}
|
|
26
|
-
a { color:#0074D9; text-decoration:none; }
|
|
27
|
-
a:hover { text-decoration:underline; }
|
|
28
|
-
.strong { font-weight: bold; }
|
|
29
|
-
.space-top1 { padding: 10px 0 0 0; }
|
|
30
|
-
.pad2y { padding: 20px 0; }
|
|
31
|
-
.pad1y { padding: 10px 0; }
|
|
32
|
-
.pad2x { padding: 0 20px; }
|
|
33
|
-
.pad2 { padding: 20px; }
|
|
34
|
-
.pad1 { padding: 10px; }
|
|
35
|
-
.space-left2 { padding-left:55px; }
|
|
36
|
-
.space-right2 { padding-right:20px; }
|
|
37
|
-
.center { text-align:center; }
|
|
38
|
-
.clearfix { display:block; }
|
|
39
|
-
.clearfix:after {
|
|
40
|
-
content:'';
|
|
41
|
-
display:block;
|
|
42
|
-
height:0;
|
|
43
|
-
clear:both;
|
|
44
|
-
visibility:hidden;
|
|
45
|
-
}
|
|
46
|
-
.fl { float: left; }
|
|
47
|
-
@media only screen and (max-width:640px) {
|
|
48
|
-
.col3 { width:100%; max-width:100%; }
|
|
49
|
-
.hide-mobile { display:none!important; }
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.quiet {
|
|
53
|
-
color: #7f7f7f;
|
|
54
|
-
color: rgba(0,0,0,0.5);
|
|
55
|
-
}
|
|
56
|
-
.quiet a { opacity: 0.7; }
|
|
57
|
-
|
|
58
|
-
.fraction {
|
|
59
|
-
font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
|
|
60
|
-
font-size: 10px;
|
|
61
|
-
color: #555;
|
|
62
|
-
background: #E8E8E8;
|
|
63
|
-
padding: 4px 5px;
|
|
64
|
-
border-radius: 3px;
|
|
65
|
-
vertical-align: middle;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
div.path a:link, div.path a:visited { color: #333; }
|
|
69
|
-
table.coverage {
|
|
70
|
-
border-collapse: collapse;
|
|
71
|
-
margin: 10px 0 0 0;
|
|
72
|
-
padding: 0;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
table.coverage td {
|
|
76
|
-
margin: 0;
|
|
77
|
-
padding: 0;
|
|
78
|
-
vertical-align: top;
|
|
79
|
-
}
|
|
80
|
-
table.coverage td.line-count {
|
|
81
|
-
text-align: right;
|
|
82
|
-
padding: 0 5px 0 20px;
|
|
83
|
-
}
|
|
84
|
-
table.coverage td.line-coverage {
|
|
85
|
-
text-align: right;
|
|
86
|
-
padding-right: 10px;
|
|
87
|
-
min-width:20px;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
table.coverage td span.cline-any {
|
|
91
|
-
display: inline-block;
|
|
92
|
-
padding: 0 5px;
|
|
93
|
-
width: 100%;
|
|
94
|
-
}
|
|
95
|
-
.missing-if-branch {
|
|
96
|
-
display: inline-block;
|
|
97
|
-
margin-right: 5px;
|
|
98
|
-
border-radius: 3px;
|
|
99
|
-
position: relative;
|
|
100
|
-
padding: 0 4px;
|
|
101
|
-
background: #333;
|
|
102
|
-
color: yellow;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.skip-if-branch {
|
|
106
|
-
display: none;
|
|
107
|
-
margin-right: 10px;
|
|
108
|
-
position: relative;
|
|
109
|
-
padding: 0 4px;
|
|
110
|
-
background: #ccc;
|
|
111
|
-
color: white;
|
|
112
|
-
}
|
|
113
|
-
.missing-if-branch .typ, .skip-if-branch .typ {
|
|
114
|
-
color: inherit !important;
|
|
115
|
-
}
|
|
116
|
-
.coverage-summary {
|
|
117
|
-
border-collapse: collapse;
|
|
118
|
-
width: 100%;
|
|
119
|
-
}
|
|
120
|
-
.coverage-summary tr { border-bottom: 1px solid #bbb; }
|
|
121
|
-
.keyline-all { border: 1px solid #ddd; }
|
|
122
|
-
.coverage-summary td, .coverage-summary th { padding: 10px; }
|
|
123
|
-
.coverage-summary tbody { border: 1px solid #bbb; }
|
|
124
|
-
.coverage-summary td { border-right: 1px solid #bbb; }
|
|
125
|
-
.coverage-summary td:last-child { border-right: none; }
|
|
126
|
-
.coverage-summary th {
|
|
127
|
-
text-align: left;
|
|
128
|
-
font-weight: normal;
|
|
129
|
-
white-space: nowrap;
|
|
130
|
-
}
|
|
131
|
-
.coverage-summary th.file { border-right: none !important; }
|
|
132
|
-
.coverage-summary th.pct { }
|
|
133
|
-
.coverage-summary th.pic,
|
|
134
|
-
.coverage-summary th.abs,
|
|
135
|
-
.coverage-summary td.pct,
|
|
136
|
-
.coverage-summary td.abs { text-align: right; }
|
|
137
|
-
.coverage-summary td.file { white-space: nowrap; }
|
|
138
|
-
.coverage-summary td.pic { min-width: 120px !important; }
|
|
139
|
-
.coverage-summary tfoot td { }
|
|
140
|
-
|
|
141
|
-
.coverage-summary .sorter {
|
|
142
|
-
height: 10px;
|
|
143
|
-
width: 7px;
|
|
144
|
-
display: inline-block;
|
|
145
|
-
margin-left: 0.5em;
|
|
146
|
-
background: url(sort-arrow-sprite.png) no-repeat scroll 0 0 transparent;
|
|
147
|
-
}
|
|
148
|
-
.coverage-summary .sorted .sorter {
|
|
149
|
-
background-position: 0 -20px;
|
|
150
|
-
}
|
|
151
|
-
.coverage-summary .sorted-desc .sorter {
|
|
152
|
-
background-position: 0 -10px;
|
|
153
|
-
}
|
|
154
|
-
.status-line { height: 10px; }
|
|
155
|
-
/* yellow */
|
|
156
|
-
.cbranch-no { background: yellow !important; color: #111; }
|
|
157
|
-
/* dark red */
|
|
158
|
-
.red.solid, .status-line.low, .low .cover-fill { background:#C21F39 }
|
|
159
|
-
.low .chart { border:1px solid #C21F39 }
|
|
160
|
-
.highlighted,
|
|
161
|
-
.highlighted .cstat-no, .highlighted .fstat-no, .highlighted .cbranch-no{
|
|
162
|
-
background: #C21F39 !important;
|
|
163
|
-
}
|
|
164
|
-
/* medium red */
|
|
165
|
-
.cstat-no, .fstat-no, .cbranch-no, .cbranch-no { background:#F6C6CE }
|
|
166
|
-
/* light red */
|
|
167
|
-
.low, .cline-no { background:#FCE1E5 }
|
|
168
|
-
/* light green */
|
|
169
|
-
.high, .cline-yes { background:rgb(230,245,208) }
|
|
170
|
-
/* medium green */
|
|
171
|
-
.cstat-yes { background:rgb(161,215,106) }
|
|
172
|
-
/* dark green */
|
|
173
|
-
.status-line.high, .high .cover-fill { background:rgb(77,146,33) }
|
|
174
|
-
.high .chart { border:1px solid rgb(77,146,33) }
|
|
175
|
-
/* dark yellow (gold) */
|
|
176
|
-
.status-line.medium, .medium .cover-fill { background: #f9cd0b; }
|
|
177
|
-
.medium .chart { border:1px solid #f9cd0b; }
|
|
178
|
-
/* light yellow */
|
|
179
|
-
.medium { background: #fff4c2; }
|
|
180
|
-
|
|
181
|
-
.cstat-skip { background: #ddd; color: #111; }
|
|
182
|
-
.fstat-skip { background: #ddd; color: #111 !important; }
|
|
183
|
-
.cbranch-skip { background: #ddd !important; color: #111; }
|
|
184
|
-
|
|
185
|
-
span.cline-neutral { background: #eaeaea; }
|
|
186
|
-
|
|
187
|
-
.coverage-summary td.empty {
|
|
188
|
-
opacity: .5;
|
|
189
|
-
padding-top: 4px;
|
|
190
|
-
padding-bottom: 4px;
|
|
191
|
-
line-height: 1;
|
|
192
|
-
color: #888;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
.cover-fill, .cover-empty {
|
|
196
|
-
display:inline-block;
|
|
197
|
-
height: 12px;
|
|
198
|
-
}
|
|
199
|
-
.chart {
|
|
200
|
-
line-height: 0;
|
|
201
|
-
}
|
|
202
|
-
.cover-empty {
|
|
203
|
-
background: white;
|
|
204
|
-
}
|
|
205
|
-
.cover-full {
|
|
206
|
-
border-right: none !important;
|
|
207
|
-
}
|
|
208
|
-
pre.prettyprint {
|
|
209
|
-
border: none !important;
|
|
210
|
-
padding: 0 !important;
|
|
211
|
-
margin: 0 !important;
|
|
212
|
-
}
|
|
213
|
-
.com { color: #999 !important; }
|
|
214
|
-
.ignore-none { color: #999; font-weight: normal; }
|
|
215
|
-
|
|
216
|
-
.wrapper {
|
|
217
|
-
min-height: 100%;
|
|
218
|
-
height: auto !important;
|
|
219
|
-
height: 100%;
|
|
220
|
-
margin: 0 auto -48px;
|
|
221
|
-
}
|
|
222
|
-
.footer, .push {
|
|
223
|
-
height: 48px;
|
|
224
|
-
}
|