@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
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { FormattedMessage } from 'react-intl';
|
|
3
|
+
import { Col, KeyValue, NoValue, Row } from '@folio/stripes/components';
|
|
4
|
+
|
|
5
|
+
import { REFDATA_CLASS_NAME } from '../../constants/customProperties';
|
|
6
|
+
|
|
7
|
+
// A default option for CustProp view pane, with the ability to override labels for fields
|
|
8
|
+
const CustomPropertiesView = ({
|
|
9
|
+
customProperty,
|
|
10
|
+
labelOverrides
|
|
11
|
+
}) => {
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<Row>
|
|
15
|
+
<Col xs={6}>
|
|
16
|
+
<KeyValue
|
|
17
|
+
label={
|
|
18
|
+
labelOverrides?.label ??
|
|
19
|
+
<FormattedMessage id="stripes-kint-components.customProperties.label" />
|
|
20
|
+
}
|
|
21
|
+
value={customProperty?.label}
|
|
22
|
+
/>
|
|
23
|
+
</Col>
|
|
24
|
+
<Col xs={6}>
|
|
25
|
+
<KeyValue
|
|
26
|
+
label={
|
|
27
|
+
labelOverrides?.name ??
|
|
28
|
+
<FormattedMessage id="stripes-kint-components.customProperties.name" />
|
|
29
|
+
}
|
|
30
|
+
value={customProperty?.name}
|
|
31
|
+
/>
|
|
32
|
+
</Col>
|
|
33
|
+
</Row>
|
|
34
|
+
<Row>
|
|
35
|
+
<Col xs={12}>
|
|
36
|
+
<KeyValue
|
|
37
|
+
label={
|
|
38
|
+
labelOverrides?.description ??
|
|
39
|
+
<FormattedMessage id="stripes-kint-components.customProperties.description" />
|
|
40
|
+
}
|
|
41
|
+
value={customProperty?.description}
|
|
42
|
+
/>
|
|
43
|
+
</Col>
|
|
44
|
+
</Row>
|
|
45
|
+
<Row>
|
|
46
|
+
<Col xs={6}>
|
|
47
|
+
<KeyValue
|
|
48
|
+
label={
|
|
49
|
+
labelOverrides?.weight ??
|
|
50
|
+
<FormattedMessage id="stripes-kint-components.customProperties.weight" />
|
|
51
|
+
}
|
|
52
|
+
value={customProperty?.weight}
|
|
53
|
+
/>
|
|
54
|
+
</Col>
|
|
55
|
+
<Col xs={6}>
|
|
56
|
+
<KeyValue
|
|
57
|
+
label={
|
|
58
|
+
labelOverrides?.primary ??
|
|
59
|
+
<FormattedMessage
|
|
60
|
+
id="stripes-kint-components.customProperties.primary"
|
|
61
|
+
/>
|
|
62
|
+
}
|
|
63
|
+
value={
|
|
64
|
+
<FormattedMessage
|
|
65
|
+
id={
|
|
66
|
+
customProperty?.primary
|
|
67
|
+
? 'stripes-kint-components.yes'
|
|
68
|
+
: 'stripes-kint-components.no'
|
|
69
|
+
}
|
|
70
|
+
/>
|
|
71
|
+
}
|
|
72
|
+
/>
|
|
73
|
+
</Col>
|
|
74
|
+
</Row>
|
|
75
|
+
<Row>
|
|
76
|
+
<Col xs={6}>
|
|
77
|
+
<KeyValue
|
|
78
|
+
label={
|
|
79
|
+
labelOverrides?.defaultVisibility ??
|
|
80
|
+
<FormattedMessage id="stripes-kint-components.customProperties.defaultVisibility" />
|
|
81
|
+
}
|
|
82
|
+
value={
|
|
83
|
+
<FormattedMessage
|
|
84
|
+
id={
|
|
85
|
+
customProperty?.defaultInternal
|
|
86
|
+
? 'stripes-kint-components.customProperties.internalTrue'
|
|
87
|
+
: 'stripes-kint-components.customProperties.internalFalse'
|
|
88
|
+
}
|
|
89
|
+
/>
|
|
90
|
+
}
|
|
91
|
+
/>
|
|
92
|
+
</Col>
|
|
93
|
+
<Col xs={6}>
|
|
94
|
+
<KeyValue
|
|
95
|
+
label={
|
|
96
|
+
labelOverrides?.ctx ??
|
|
97
|
+
<FormattedMessage id="stripes-kint-components.customProperties.ctx" />
|
|
98
|
+
}
|
|
99
|
+
value={customProperty?.ctx ?? <NoValue />}
|
|
100
|
+
/>
|
|
101
|
+
</Col>
|
|
102
|
+
</Row>
|
|
103
|
+
<Row>
|
|
104
|
+
<Col xs={6}>
|
|
105
|
+
{customProperty?.type && (
|
|
106
|
+
<KeyValue
|
|
107
|
+
label={
|
|
108
|
+
labelOverrides?.type ??
|
|
109
|
+
<FormattedMessage id="stripes-kint-components.customProperties.type" />
|
|
110
|
+
}
|
|
111
|
+
value={<FormattedMessage id={`stripes-kint-components.customProperties.type.${customProperty?.type}`} />}
|
|
112
|
+
/>
|
|
113
|
+
)}
|
|
114
|
+
</Col>
|
|
115
|
+
<Col xs={6}>
|
|
116
|
+
{customProperty?.type === REFDATA_CLASS_NAME && (
|
|
117
|
+
<KeyValue
|
|
118
|
+
label={
|
|
119
|
+
labelOverrides?.category ??
|
|
120
|
+
<FormattedMessage id="stripes-kint-components.customProperties.category" />
|
|
121
|
+
}
|
|
122
|
+
value={customProperty?.category?.desc ?? <NoValue />}
|
|
123
|
+
/>
|
|
124
|
+
)}
|
|
125
|
+
</Col>
|
|
126
|
+
</Row>
|
|
127
|
+
</>
|
|
128
|
+
);
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
CustomPropertiesView.propTypes = {
|
|
132
|
+
customProperty: PropTypes.shape({
|
|
133
|
+
id: PropTypes.string,
|
|
134
|
+
label: PropTypes.string,
|
|
135
|
+
name: PropTypes.string,
|
|
136
|
+
description: PropTypes.string,
|
|
137
|
+
weight: PropTypes.number,
|
|
138
|
+
primary: PropTypes.bool,
|
|
139
|
+
defaultInternal: PropTypes.bool,
|
|
140
|
+
ctx: PropTypes.string,
|
|
141
|
+
type: PropTypes.string,
|
|
142
|
+
category: PropTypes.shape({
|
|
143
|
+
desc: PropTypes.string
|
|
144
|
+
})
|
|
145
|
+
|
|
146
|
+
}),
|
|
147
|
+
labelOverrides: PropTypes.object
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export default CustomPropertiesView;
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { useState } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
4
|
+
import { Field, useFormState, useForm } from 'react-final-form';
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
Col,
|
|
8
|
+
InfoPopover,
|
|
9
|
+
MultiSelection,
|
|
10
|
+
Row,
|
|
11
|
+
Select,
|
|
12
|
+
TextArea,
|
|
13
|
+
TextField
|
|
14
|
+
} from '@folio/stripes/components';
|
|
15
|
+
import { requiredValidator } from '@folio/stripes-erm-components';
|
|
16
|
+
|
|
17
|
+
const CustomPropertyForm = ({
|
|
18
|
+
contextFilterOptions,
|
|
19
|
+
helpPopovers,
|
|
20
|
+
labelOverrides,
|
|
21
|
+
refdata
|
|
22
|
+
}) => {
|
|
23
|
+
const { values } = useFormState();
|
|
24
|
+
const { change } = useForm();
|
|
25
|
+
const intl = useIntl();
|
|
26
|
+
|
|
27
|
+
const booleanToString = booleanValue => booleanValue?.toString();
|
|
28
|
+
const stringToBoolean = stringValue => stringValue === 'true';
|
|
29
|
+
|
|
30
|
+
const [contextOptions, setContextOptions] = useState(contextFilterOptions?.filter(ctx => ctx.value !== '' && ctx?.value !== 'isNull'));
|
|
31
|
+
|
|
32
|
+
const addCtx = ({ _r, _e, filterText }) => {
|
|
33
|
+
const newOption = { value: filterText, label: filterText };
|
|
34
|
+
setContextOptions([newOption, ...contextOptions]);
|
|
35
|
+
change('ctx', [newOption]);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
const renderAddCtx = ({ filterValue, exactMatch }) => {
|
|
39
|
+
if (!filterValue || exactMatch) {
|
|
40
|
+
return null;
|
|
41
|
+
} else {
|
|
42
|
+
return <FormattedMessage id="stripes-kint-components.customProperties.ctx.addContext" values={{ value: filterValue }} />;
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
return (
|
|
47
|
+
<>
|
|
48
|
+
<Row>
|
|
49
|
+
<Col xs={6}>
|
|
50
|
+
<Field
|
|
51
|
+
component={TextField}
|
|
52
|
+
label={labelOverrides?.label ??
|
|
53
|
+
<FormattedMessage id="stripes-kint-components.customProperties.label" />
|
|
54
|
+
}
|
|
55
|
+
name="label"
|
|
56
|
+
required
|
|
57
|
+
startControl={helpPopovers?.label ?
|
|
58
|
+
<InfoPopover
|
|
59
|
+
content={helpPopovers?.label}
|
|
60
|
+
/> : null
|
|
61
|
+
}
|
|
62
|
+
validate={requiredValidator}
|
|
63
|
+
/>
|
|
64
|
+
</Col>
|
|
65
|
+
<Col xs={6}>
|
|
66
|
+
<Field
|
|
67
|
+
component={TextField}
|
|
68
|
+
label={labelOverrides?.name ??
|
|
69
|
+
<FormattedMessage id="stripes-kint-components.customProperties.name" />
|
|
70
|
+
}
|
|
71
|
+
name="name"
|
|
72
|
+
required
|
|
73
|
+
startControl={helpPopovers?.name ?
|
|
74
|
+
<InfoPopover
|
|
75
|
+
content={helpPopovers?.name}
|
|
76
|
+
/> : null
|
|
77
|
+
}
|
|
78
|
+
validate={v => {
|
|
79
|
+
if (v && v.length) {
|
|
80
|
+
return /^[a-z][a-z0-9]*$/i.test(v) ? (
|
|
81
|
+
undefined
|
|
82
|
+
) : (
|
|
83
|
+
<FormattedMessage id="stripes-kint-components.errors.hasNonAlphaName" />
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return requiredValidator(v);
|
|
88
|
+
}}
|
|
89
|
+
/>
|
|
90
|
+
</Col>
|
|
91
|
+
</Row>
|
|
92
|
+
<Row>
|
|
93
|
+
<Col xs={12}>
|
|
94
|
+
<Field
|
|
95
|
+
component={TextArea}
|
|
96
|
+
label={labelOverrides?.description ??
|
|
97
|
+
<FormattedMessage id="stripes-kint-components.customProperties.description" />
|
|
98
|
+
}
|
|
99
|
+
name="description"
|
|
100
|
+
required
|
|
101
|
+
startControl={helpPopovers?.description ?
|
|
102
|
+
<InfoPopover
|
|
103
|
+
content={helpPopovers?.description}
|
|
104
|
+
/> : null
|
|
105
|
+
}
|
|
106
|
+
validate={requiredValidator}
|
|
107
|
+
/>
|
|
108
|
+
</Col>
|
|
109
|
+
</Row>
|
|
110
|
+
<Row>
|
|
111
|
+
<Col xs={3}>
|
|
112
|
+
<Field
|
|
113
|
+
component={TextField}
|
|
114
|
+
label={labelOverrides?.weight ??
|
|
115
|
+
<FormattedMessage id="stripes-kint-components.customProperties.weight" />
|
|
116
|
+
}
|
|
117
|
+
name="weight"
|
|
118
|
+
required
|
|
119
|
+
startControl={helpPopovers?.weight ?
|
|
120
|
+
<InfoPopover
|
|
121
|
+
content={helpPopovers?.weight}
|
|
122
|
+
/> : null
|
|
123
|
+
}
|
|
124
|
+
type="number"
|
|
125
|
+
validate={requiredValidator}
|
|
126
|
+
/>
|
|
127
|
+
</Col>
|
|
128
|
+
<Col xs={3}>
|
|
129
|
+
<Field
|
|
130
|
+
component={Select}
|
|
131
|
+
dataOptions={[
|
|
132
|
+
{
|
|
133
|
+
label: intl.formatMessage({
|
|
134
|
+
id: 'stripes-kint-components.yes',
|
|
135
|
+
}),
|
|
136
|
+
value: 'true',
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
label: intl.formatMessage({
|
|
140
|
+
id: 'stripes-kint-components.no',
|
|
141
|
+
}),
|
|
142
|
+
value: 'false',
|
|
143
|
+
},
|
|
144
|
+
]}
|
|
145
|
+
format={booleanToString}
|
|
146
|
+
label={labelOverrides?.primary ??
|
|
147
|
+
<FormattedMessage
|
|
148
|
+
id="stripes-kint-components.customProperties.primary"
|
|
149
|
+
/>
|
|
150
|
+
}
|
|
151
|
+
name="primary"
|
|
152
|
+
parse={stringToBoolean}
|
|
153
|
+
required
|
|
154
|
+
startControl={helpPopovers?.primary ?
|
|
155
|
+
<InfoPopover
|
|
156
|
+
content={helpPopovers?.primary}
|
|
157
|
+
/> : null
|
|
158
|
+
}
|
|
159
|
+
validate={requiredValidator}
|
|
160
|
+
/>
|
|
161
|
+
</Col>
|
|
162
|
+
<Col xs={3}>
|
|
163
|
+
<Field
|
|
164
|
+
component={Select}
|
|
165
|
+
dataOptions={[
|
|
166
|
+
{
|
|
167
|
+
label: intl.formatMessage({
|
|
168
|
+
id:
|
|
169
|
+
'stripes-kint-components.customProperties.internalTrue',
|
|
170
|
+
}),
|
|
171
|
+
value: 'true',
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
label: intl.formatMessage({
|
|
175
|
+
id:
|
|
176
|
+
'stripes-kint-components.customProperties.internalFalse',
|
|
177
|
+
}),
|
|
178
|
+
value: 'false',
|
|
179
|
+
},
|
|
180
|
+
]}
|
|
181
|
+
format={booleanToString}
|
|
182
|
+
label={labelOverrides?.defaultVisibility ??
|
|
183
|
+
<FormattedMessage id="stripes-kint-components.customProperties.defaultVisibility" />
|
|
184
|
+
}
|
|
185
|
+
name="defaultInternal"
|
|
186
|
+
parse={stringToBoolean}
|
|
187
|
+
required
|
|
188
|
+
startControl={helpPopovers?.defaultVisibility ?
|
|
189
|
+
<InfoPopover
|
|
190
|
+
content={helpPopovers?.defaultVisibility}
|
|
191
|
+
/> : null
|
|
192
|
+
}
|
|
193
|
+
validate={requiredValidator}
|
|
194
|
+
/>
|
|
195
|
+
</Col>
|
|
196
|
+
<Col xs={3}>
|
|
197
|
+
<Field
|
|
198
|
+
actions={[{ onSelect: addCtx, render: renderAddCtx }]}
|
|
199
|
+
component={MultiSelection}
|
|
200
|
+
dataOptions={contextOptions}
|
|
201
|
+
emptyMessage={intl.formatMessage({ id: 'stripes-kint-components.customProperties.noCtxFound' })}
|
|
202
|
+
label={labelOverrides?.ctx ??
|
|
203
|
+
<FormattedMessage id="stripes-kint-components.customProperties.ctx" />
|
|
204
|
+
}
|
|
205
|
+
name="ctx"
|
|
206
|
+
onChange={(selectedItems) => {
|
|
207
|
+
if (selectedItems.length) {
|
|
208
|
+
change('ctx', [selectedItems?.[selectedItems?.length - 1]]);
|
|
209
|
+
} else {
|
|
210
|
+
change('ctx', undefined);
|
|
211
|
+
}
|
|
212
|
+
}}
|
|
213
|
+
validate={value => (value?.length > 1 ? <FormattedMessage id="stripes-kint-components.customProperties.ctx.error.moreThanOne" /> : null)}
|
|
214
|
+
/>
|
|
215
|
+
</Col>
|
|
216
|
+
</Row>
|
|
217
|
+
{/* Users can only configure the type of a custom property when creating it, not when editing it */}
|
|
218
|
+
{!values?.id && (
|
|
219
|
+
<Row>
|
|
220
|
+
<Col xs={6}>
|
|
221
|
+
<Field
|
|
222
|
+
component={Select}
|
|
223
|
+
dataOptions={[
|
|
224
|
+
{ label: '', value: '' },
|
|
225
|
+
{
|
|
226
|
+
label: intl.formatMessage({
|
|
227
|
+
id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyDecimal',
|
|
228
|
+
}),
|
|
229
|
+
value: 'Decimal',
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
label: intl.formatMessage({
|
|
233
|
+
id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyInteger',
|
|
234
|
+
}),
|
|
235
|
+
value: 'Integer',
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
label: intl.formatMessage({
|
|
239
|
+
id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyText',
|
|
240
|
+
}),
|
|
241
|
+
value: 'Text',
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
label: intl.formatMessage({
|
|
245
|
+
id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata',
|
|
246
|
+
}),
|
|
247
|
+
value: 'Refdata',
|
|
248
|
+
},
|
|
249
|
+
]
|
|
250
|
+
}
|
|
251
|
+
label={labelOverrides?.type ??
|
|
252
|
+
<FormattedMessage id="stripes-kint-components.customProperties.type" />
|
|
253
|
+
}
|
|
254
|
+
name="type"
|
|
255
|
+
required
|
|
256
|
+
startControl={helpPopovers?.type ?
|
|
257
|
+
<InfoPopover
|
|
258
|
+
content={helpPopovers?.type}
|
|
259
|
+
/> : null
|
|
260
|
+
}
|
|
261
|
+
validate={requiredValidator}
|
|
262
|
+
/>
|
|
263
|
+
</Col>
|
|
264
|
+
<Col xs={6}>
|
|
265
|
+
{values?.type === 'Refdata' && (
|
|
266
|
+
<Field
|
|
267
|
+
component={Select}
|
|
268
|
+
dataOptions={[{ label: '', value: '' }, ...refdata]}
|
|
269
|
+
label={labelOverrides?.category ??
|
|
270
|
+
<FormattedMessage id="stripes-kint-components.customProperties.category" />
|
|
271
|
+
}
|
|
272
|
+
name="category"
|
|
273
|
+
required
|
|
274
|
+
startControl={helpPopovers?.category ?
|
|
275
|
+
<InfoPopover
|
|
276
|
+
content={helpPopovers?.category}
|
|
277
|
+
/> : null
|
|
278
|
+
}
|
|
279
|
+
validate={requiredValidator}
|
|
280
|
+
/>
|
|
281
|
+
)}
|
|
282
|
+
</Col>
|
|
283
|
+
</Row>
|
|
284
|
+
)}
|
|
285
|
+
</>
|
|
286
|
+
);
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
CustomPropertyForm.propTypes = {
|
|
290
|
+
contextFilterOptions: PropTypes.arrayOf(PropTypes.string),
|
|
291
|
+
helpPopovers: PropTypes.object,
|
|
292
|
+
labelOverrides: PropTypes.object,
|
|
293
|
+
refdata: PropTypes.arrayOf(PropTypes.object)
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
export default CustomPropertyForm;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as CustomPropertiesLookup } from './CustomPropertiesLookup';
|
|
2
|
+
export { default as CustomPropertiesView } from './CustomPropertiesLookup';
|
|
3
|
+
export { default as CustomPropertiesSettings } from './CustomPropertiesSettings';
|
|
4
|
+
export { default as CustomPropertyForm } from './CustomPropertyForm';
|
|
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import { FormattedMessage } from 'react-intl';
|
|
4
4
|
|
|
5
5
|
import { useMutateRefdataValue, useRefdata } from '../hooks';
|
|
6
|
+
|
|
6
7
|
import ActionList from '../ActionList';
|
|
7
8
|
|
|
8
9
|
const propTypes = {
|
|
@@ -21,18 +22,19 @@ const EditableRefdataList = ({ desc, refdataEndpoint }) => {
|
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
const [contentData, setContentData] = useState([]);
|
|
25
|
+
const sortByLabel = (a, b) => (a.label.localeCompare(b.label));
|
|
24
26
|
|
|
25
27
|
useEffect(() => {
|
|
26
28
|
if (!isRefdataLoading) {
|
|
27
|
-
setContentData(refdata?.values ?? []);
|
|
29
|
+
setContentData(refdata?.values?.sort(sortByLabel) ?? []);
|
|
28
30
|
}
|
|
29
31
|
}, [isRefdataLoading, refdata]);
|
|
30
32
|
|
|
31
33
|
// Edit and Create will use the same PUT mutation
|
|
32
34
|
const { delete: deleteRefdataValue, put: editRefdataValue } = useMutateRefdataValue({
|
|
33
35
|
afterQueryCalls: {
|
|
34
|
-
delete: json => setContentData(json?.values ?? []),
|
|
35
|
-
put: json => setContentData(json?.values ?? [])
|
|
36
|
+
delete: json => setContentData(json?.values?.sort(sortByLabel) ?? []),
|
|
37
|
+
put: json => setContentData(json?.values?.sort(sortByLabel) ?? [])
|
|
36
38
|
},
|
|
37
39
|
endpoint: refdataEndpoint,
|
|
38
40
|
id: refdata?.id,
|
|
@@ -51,7 +53,6 @@ const EditableRefdataList = ({ desc, refdataEndpoint }) => {
|
|
|
51
53
|
}
|
|
52
54
|
|
|
53
55
|
// This is the function which will take a row in the table and assign the relevant actions to it
|
|
54
|
-
// TODO make these 'labels' into ARIA labels
|
|
55
56
|
const actionAssigner = () => {
|
|
56
57
|
const actionArray = [
|
|
57
58
|
{ name: 'edit', label: <FormattedMessage id="stripes-kint-components.editableRefdataList.edit" />, icon: 'edit' },
|
|
@@ -78,8 +79,11 @@ const EditableRefdataList = ({ desc, refdataEndpoint }) => {
|
|
|
78
79
|
value: <FormattedMessage id="stripes-kint-components.editableRefdataList.value" />
|
|
79
80
|
}}
|
|
80
81
|
contentData={contentData}
|
|
82
|
+
creatableFields={{
|
|
83
|
+
value: () => false
|
|
84
|
+
}}
|
|
81
85
|
editableFields={{
|
|
82
|
-
value: () =>
|
|
86
|
+
value: () => false
|
|
83
87
|
}}
|
|
84
88
|
visibleFields={['label', 'value']}
|
|
85
89
|
// TODO add a field validator/fieldType as options?
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
|
|
3
|
+
import { Form } from 'react-final-form';
|
|
4
|
+
import { FormattedMessage } from 'react-intl';
|
|
5
|
+
import { Button, Modal, ModalFooter } from '@folio/stripes/components';
|
|
6
|
+
|
|
7
|
+
const FormModal = ({ children, modalProps: { onClose, ...modalProps }, onSubmit, ...formProps }) => {
|
|
8
|
+
return (
|
|
9
|
+
<Form
|
|
10
|
+
onSubmit={onSubmit}
|
|
11
|
+
{...formProps}
|
|
12
|
+
>
|
|
13
|
+
{({ handleSubmit, form: { restart } }) => {
|
|
14
|
+
const handleClose = (e) => {
|
|
15
|
+
onClose(e);
|
|
16
|
+
restart();
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const handleSubmitAndClear = () => {
|
|
20
|
+
handleSubmit();
|
|
21
|
+
restart();
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const renderFooter = () => (
|
|
25
|
+
<ModalFooter>
|
|
26
|
+
<Button
|
|
27
|
+
buttonStyle="primary"
|
|
28
|
+
onClick={handleSubmitAndClear}
|
|
29
|
+
>
|
|
30
|
+
<FormattedMessage id="stripes-kint-components.save" />
|
|
31
|
+
</Button>
|
|
32
|
+
<Button
|
|
33
|
+
onClick={handleClose}
|
|
34
|
+
>
|
|
35
|
+
<FormattedMessage id="stripes-kint-components.cancel" />
|
|
36
|
+
</Button>
|
|
37
|
+
</ModalFooter>
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<form
|
|
42
|
+
onSubmit={handleSubmitAndClear}
|
|
43
|
+
>
|
|
44
|
+
<Modal
|
|
45
|
+
enforceFocus={false}
|
|
46
|
+
footer={renderFooter()}
|
|
47
|
+
onClose={handleClose}
|
|
48
|
+
{...modalProps}
|
|
49
|
+
>
|
|
50
|
+
{children}
|
|
51
|
+
</Modal>
|
|
52
|
+
</form>
|
|
53
|
+
);
|
|
54
|
+
}}
|
|
55
|
+
</Form>
|
|
56
|
+
);
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
FormModal.propTypes = {
|
|
60
|
+
children: PropTypes.oneOfType([
|
|
61
|
+
PropTypes.arrayOf(PropTypes.node),
|
|
62
|
+
PropTypes.node,
|
|
63
|
+
PropTypes.func,
|
|
64
|
+
]),
|
|
65
|
+
modalProps: PropTypes.shape({
|
|
66
|
+
onClose: PropTypes.func
|
|
67
|
+
}),
|
|
68
|
+
onSubmit: PropTypes.func
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export default FormModal;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './FormModal';
|
|
@@ -66,11 +66,11 @@ NoResultsMessage.propTypes = {
|
|
|
66
66
|
icon: PropTypes.string,
|
|
67
67
|
isLoading: PropTypes.bool,
|
|
68
68
|
isError: PropTypes.bool,
|
|
69
|
-
label: PropTypes.oneOfType(
|
|
69
|
+
label: PropTypes.oneOfType([
|
|
70
70
|
PropTypes.string,
|
|
71
71
|
PropTypes.node,
|
|
72
72
|
PropTypes.func
|
|
73
|
-
),
|
|
73
|
+
]),
|
|
74
74
|
searchTerm: PropTypes.string.isRequired,
|
|
75
75
|
toggleFilterPane: PropTypes.func.isRequired,
|
|
76
76
|
};
|
|
@@ -31,6 +31,7 @@ import { useKiwtSASQuery, useLocalStorageState } from '../hooks';
|
|
|
31
31
|
const SASQLookupComponent = ({
|
|
32
32
|
children,
|
|
33
33
|
fetchParameters = {},
|
|
34
|
+
FilterPaneHeaderComponent = () => null,
|
|
34
35
|
FilterComponent = () => null,
|
|
35
36
|
history,
|
|
36
37
|
id,
|
|
@@ -185,6 +186,7 @@ const SASQLookupComponent = ({
|
|
|
185
186
|
paneTitle={<FormattedMessage id="stripes-smart-components.searchAndFilter" />}
|
|
186
187
|
>
|
|
187
188
|
<form onSubmit={onSubmitSearch}>
|
|
189
|
+
<FilterPaneHeaderComponent />
|
|
188
190
|
{!noSearchField &&
|
|
189
191
|
<>
|
|
190
192
|
<SearchField
|
|
@@ -262,6 +264,10 @@ SASQLookupComponent.propTypes = {
|
|
|
262
264
|
PropTypes.func,
|
|
263
265
|
PropTypes.node
|
|
264
266
|
]),
|
|
267
|
+
FilterPaneHeaderComponent: PropTypes.oneOfType([
|
|
268
|
+
PropTypes.func,
|
|
269
|
+
PropTypes.node
|
|
270
|
+
]),
|
|
265
271
|
history: PropTypes.object,
|
|
266
272
|
id: PropTypes.string.isRequired,
|
|
267
273
|
location: PropTypes.object,
|