@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,198 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _reactIntl = require("react-intl");
|
|
13
|
+
|
|
14
|
+
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
15
|
+
|
|
16
|
+
var _components = require("@folio/stripes/components");
|
|
17
|
+
|
|
18
|
+
var _SearchField = _interopRequireDefault(require("../../SearchField"));
|
|
19
|
+
|
|
20
|
+
var _hooks = require("../../hooks");
|
|
21
|
+
|
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
(function () {
|
|
27
|
+
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
28
|
+
enterModule && enterModule(module);
|
|
29
|
+
})();
|
|
30
|
+
|
|
31
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32
|
+
|
|
33
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
34
|
+
|
|
35
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
36
|
+
|
|
37
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
38
|
+
|
|
39
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
40
|
+
|
|
41
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
42
|
+
|
|
43
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
44
|
+
|
|
45
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
46
|
+
|
|
47
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
48
|
+
|
|
49
|
+
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
50
|
+
return a;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
var DEBOUNCE_TIME = 500;
|
|
54
|
+
|
|
55
|
+
var CustomPropertiesLookup = function CustomPropertiesLookup(_ref) {
|
|
56
|
+
var _labelOverrides$label, _labelOverrides$prima, _labelOverrides$ctx, _labelOverrides$weigh, _labelOverrides$type, _labelOverrides$categ;
|
|
57
|
+
|
|
58
|
+
var contextFilterOptions = _ref.contextFilterOptions,
|
|
59
|
+
endpoint = _ref.customPropertiesEndpoint,
|
|
60
|
+
labelOverrides = _ref.labelOverrides,
|
|
61
|
+
mclProps = _ref.mclProps,
|
|
62
|
+
onSelectCustomProperty = _ref.onSelectCustomProperty,
|
|
63
|
+
queryParams = _ref.queryParams;
|
|
64
|
+
|
|
65
|
+
var _useState = (0, _react.useState)({
|
|
66
|
+
sort: 'id'
|
|
67
|
+
}),
|
|
68
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
69
|
+
nsValues = _useState2[0],
|
|
70
|
+
setNsValues = _useState2[1];
|
|
71
|
+
|
|
72
|
+
var _useState3 = (0, _react.useState)(),
|
|
73
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
74
|
+
selectedContext = _useState4[0],
|
|
75
|
+
setSelectedContext = _useState4[1];
|
|
76
|
+
|
|
77
|
+
var _useCustomProperties = (0, _hooks.useCustomProperties)({
|
|
78
|
+
endpoint: endpoint,
|
|
79
|
+
nsValues: nsValues,
|
|
80
|
+
queryParams: queryParams,
|
|
81
|
+
returnQueryObject: true,
|
|
82
|
+
ctx: selectedContext
|
|
83
|
+
}),
|
|
84
|
+
custprops = _useCustomProperties.data,
|
|
85
|
+
isLoading = _useCustomProperties.isLoading;
|
|
86
|
+
|
|
87
|
+
var handleSearch = (0, _debounce.default)(function (query) {
|
|
88
|
+
setNsValues(_objectSpread(_objectSpread({}, nsValues), {}, {
|
|
89
|
+
query: query
|
|
90
|
+
}));
|
|
91
|
+
}, DEBOUNCE_TIME);
|
|
92
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
93
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SearchField.default, {
|
|
94
|
+
fullWidth: true,
|
|
95
|
+
onChange: function onChange(e) {
|
|
96
|
+
return handleSearch(e.target.value);
|
|
97
|
+
}
|
|
98
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Row, {
|
|
99
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
|
|
100
|
+
xs: 6,
|
|
101
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Select, {
|
|
102
|
+
dataOptions: contextFilterOptions,
|
|
103
|
+
onChange: function onChange(e) {
|
|
104
|
+
setSelectedContext(e.target.value);
|
|
105
|
+
},
|
|
106
|
+
value: selectedContext
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
}), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Spinner, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, _objectSpread({
|
|
110
|
+
columnMapping: {
|
|
111
|
+
'label': (_labelOverrides$label = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.label) !== null && _labelOverrides$label !== void 0 ? _labelOverrides$label : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
112
|
+
id: "stripes-kint-components.customProperties.label"
|
|
113
|
+
}),
|
|
114
|
+
'primary': (_labelOverrides$prima = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.primary) !== null && _labelOverrides$prima !== void 0 ? _labelOverrides$prima : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
115
|
+
id: "stripes-kint-components.customProperties.primary"
|
|
116
|
+
}),
|
|
117
|
+
'ctx': (_labelOverrides$ctx = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.ctx) !== null && _labelOverrides$ctx !== void 0 ? _labelOverrides$ctx : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
118
|
+
id: "stripes-kint-components.customProperties.ctx"
|
|
119
|
+
}),
|
|
120
|
+
'weight': (_labelOverrides$weigh = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.weight) !== null && _labelOverrides$weigh !== void 0 ? _labelOverrides$weigh : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
121
|
+
id: "stripes-kint-components.customProperties.weight"
|
|
122
|
+
}),
|
|
123
|
+
'type': (_labelOverrides$type = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.type) !== null && _labelOverrides$type !== void 0 ? _labelOverrides$type : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
124
|
+
id: "stripes-kint-components.customProperties.type"
|
|
125
|
+
}),
|
|
126
|
+
'category': (_labelOverrides$categ = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.category) !== null && _labelOverrides$categ !== void 0 ? _labelOverrides$categ : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
127
|
+
id: "stripes-kint-components.customProperties.category"
|
|
128
|
+
})
|
|
129
|
+
},
|
|
130
|
+
contentData: custprops,
|
|
131
|
+
formatter: {
|
|
132
|
+
primary: function primary(data) {
|
|
133
|
+
if (data !== null && data !== void 0 && data.primary) {
|
|
134
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
135
|
+
id: "stripes-kint-components.yes"
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
139
|
+
id: "stripes-kint-components.no"
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
type: function type(data) {
|
|
144
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
145
|
+
id: "stripes-kint-components.customProperties.type.".concat(data === null || data === void 0 ? void 0 : data.type)
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
category: function category(data) {
|
|
149
|
+
var _data$category;
|
|
150
|
+
|
|
151
|
+
return data === null || data === void 0 ? void 0 : (_data$category = data.category) === null || _data$category === void 0 ? void 0 : _data$category.desc;
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
onRowClick: onSelectCustomProperty,
|
|
155
|
+
visibleColumns: ['label', 'primary', 'ctx', 'weight', 'type', 'category']
|
|
156
|
+
}, mclProps))]
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
__signature__(CustomPropertiesLookup, "useState{[nsValues, setNsValues]({\n sort: 'id'\n })}\nuseState{[selectedContext, setSelectedContext]}\nuseCustomProperties{{ data: custprops, isLoading }}", function () {
|
|
161
|
+
return [_hooks.useCustomProperties];
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
CustomPropertiesLookup.propTypes = {
|
|
165
|
+
contextFilterOptions: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
166
|
+
value: _propTypes.default.string,
|
|
167
|
+
label: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.string])
|
|
168
|
+
})),
|
|
169
|
+
customPropertiesEndpoint: _propTypes.default.string,
|
|
170
|
+
labelOverrides: _propTypes.default.object,
|
|
171
|
+
mclProps: _propTypes.default.object,
|
|
172
|
+
onSelectCustomProperty: _propTypes.default.func,
|
|
173
|
+
queryParams: _propTypes.default.object,
|
|
174
|
+
refdataEndpoint: _propTypes.default.string
|
|
175
|
+
};
|
|
176
|
+
var _default = CustomPropertiesLookup;
|
|
177
|
+
var _default2 = _default;
|
|
178
|
+
exports.default = _default2;
|
|
179
|
+
;
|
|
180
|
+
|
|
181
|
+
(function () {
|
|
182
|
+
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
183
|
+
|
|
184
|
+
if (!reactHotLoader) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
reactHotLoader.register(DEBOUNCE_TIME, "DEBOUNCE_TIME", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesLookup.js");
|
|
189
|
+
reactHotLoader.register(CustomPropertiesLookup, "CustomPropertiesLookup", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesLookup.js");
|
|
190
|
+
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesLookup.js");
|
|
191
|
+
})();
|
|
192
|
+
|
|
193
|
+
;
|
|
194
|
+
|
|
195
|
+
(function () {
|
|
196
|
+
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
197
|
+
leaveModule && leaveModule(module);
|
|
198
|
+
})();
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _composeFunction = _interopRequireDefault(require("compose-function"));
|
|
13
|
+
|
|
14
|
+
var _reactIntl = require("react-intl");
|
|
15
|
+
|
|
16
|
+
var _reactQuery = require("react-query");
|
|
17
|
+
|
|
18
|
+
var _reactIntlSafeHtml = _interopRequireDefault(require("@folio/react-intl-safe-html"));
|
|
19
|
+
|
|
20
|
+
var _components = require("@folio/stripes/components");
|
|
21
|
+
|
|
22
|
+
var _FormModal = _interopRequireDefault(require("../../FormModal/FormModal"));
|
|
23
|
+
|
|
24
|
+
var _CustomPropertiesLookup = _interopRequireDefault(require("./CustomPropertiesLookup"));
|
|
25
|
+
|
|
26
|
+
var _CustomPropertiesView = _interopRequireDefault(require("./CustomPropertiesView"));
|
|
27
|
+
|
|
28
|
+
var _CustomPropertyForm = _interopRequireDefault(require("./CustomPropertyForm"));
|
|
29
|
+
|
|
30
|
+
var _hooks = require("../../hooks");
|
|
31
|
+
|
|
32
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
33
|
+
|
|
34
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
35
|
+
|
|
36
|
+
(function () {
|
|
37
|
+
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
38
|
+
enterModule && enterModule(module);
|
|
39
|
+
})();
|
|
40
|
+
|
|
41
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
42
|
+
|
|
43
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
44
|
+
|
|
45
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
46
|
+
|
|
47
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
48
|
+
|
|
49
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
50
|
+
|
|
51
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
52
|
+
|
|
53
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
54
|
+
|
|
55
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
56
|
+
|
|
57
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
58
|
+
|
|
59
|
+
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
60
|
+
return a;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
var EDITING = 'edit';
|
|
64
|
+
var CREATING = 'create';
|
|
65
|
+
var VIEWING = 'view'; // A default option for setting up panes manually
|
|
66
|
+
|
|
67
|
+
var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
68
|
+
var _labelOverrides$paneT, _ref3, _renderViewPaneTitle, _labelOverrides$confi, _labelOverrides$confi2, _labelOverrides$confi3;
|
|
69
|
+
|
|
70
|
+
var afterQueryCalls = _ref.afterQueryCalls,
|
|
71
|
+
contextFilterOptions = _ref.contextFilterOptions,
|
|
72
|
+
customPropertiesEndpoint = _ref.customPropertiesEndpoint,
|
|
73
|
+
helpPopovers = _ref.helpPopovers,
|
|
74
|
+
labelOverrides = _ref.labelOverrides,
|
|
75
|
+
refdataEndpoint = _ref.refdataEndpoint;
|
|
76
|
+
var queryClient = (0, _reactQuery.useQueryClient)();
|
|
77
|
+
var intl = (0, _reactIntl.useIntl)();
|
|
78
|
+
|
|
79
|
+
var _useState = (0, _react.useState)(),
|
|
80
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
81
|
+
customProperty = _useState2[0],
|
|
82
|
+
setCustomProperty = _useState2[1];
|
|
83
|
+
|
|
84
|
+
var _useState3 = (0, _react.useState)(false),
|
|
85
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
86
|
+
deleteModal = _useState4[0],
|
|
87
|
+
setDeleteModal = _useState4[1];
|
|
88
|
+
|
|
89
|
+
var refdata = (0, _hooks.useRefdata)({
|
|
90
|
+
endpoint: refdataEndpoint
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
var _useState5 = (0, _react.useState)(VIEWING),
|
|
94
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
95
|
+
mode = _useState6[0],
|
|
96
|
+
setMode = _useState6[1]; // Default props that need hooks are hard
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
var renderContextFilterOptions = contextFilterOptions;
|
|
100
|
+
|
|
101
|
+
if (!contextFilterOptions) {
|
|
102
|
+
/*
|
|
103
|
+
Default is {value: '', label: 'All'}, empty string will map to ALL contexts
|
|
104
|
+
If null context is needed, use
|
|
105
|
+
{value: 'isNull', label: ...}
|
|
106
|
+
*/
|
|
107
|
+
renderContextFilterOptions = [{
|
|
108
|
+
value: '',
|
|
109
|
+
// empty string is all custoprop contexts
|
|
110
|
+
label: intl.formatMessage({
|
|
111
|
+
id: 'stripes-kint-components.customProperties.all'
|
|
112
|
+
})
|
|
113
|
+
}];
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
var renderViewPaneTitle = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.viewPaneTitle;
|
|
117
|
+
|
|
118
|
+
if (renderViewPaneTitle instanceof Function) {
|
|
119
|
+
renderViewPaneTitle = renderViewPaneTitle(customProperty);
|
|
120
|
+
} // Defaulting is hard
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
var afterQueryCallsSafe = _objectSpread({
|
|
124
|
+
put: function put() {
|
|
125
|
+
return null;
|
|
126
|
+
},
|
|
127
|
+
post: function post() {
|
|
128
|
+
return null;
|
|
129
|
+
},
|
|
130
|
+
delete: function _delete() {
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
}, afterQueryCalls);
|
|
134
|
+
|
|
135
|
+
var _useMutateCustomPrope = (0, _hooks.useMutateCustomProperties)({
|
|
136
|
+
afterQueryCalls: {
|
|
137
|
+
put: function put() {
|
|
138
|
+
setMode(VIEWING);
|
|
139
|
+
queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
|
|
140
|
+
afterQueryCallsSafe.put();
|
|
141
|
+
},
|
|
142
|
+
post: function post() {
|
|
143
|
+
setMode(VIEWING);
|
|
144
|
+
queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
|
|
145
|
+
afterQueryCallsSafe.post();
|
|
146
|
+
},
|
|
147
|
+
delete: function _delete() {
|
|
148
|
+
setMode(VIEWING);
|
|
149
|
+
queryClient.invalidateQueries(['stripes-kint-components', 'useCustomProperties', 'custprops']);
|
|
150
|
+
afterQueryCallsSafe.delete();
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
endpoint: customPropertiesEndpoint,
|
|
154
|
+
id: customProperty === null || customProperty === void 0 ? void 0 : customProperty.id
|
|
155
|
+
}),
|
|
156
|
+
createCustprop = _useMutateCustomPrope.post,
|
|
157
|
+
editCustProp = _useMutateCustomPrope.put,
|
|
158
|
+
deleteCustProp = _useMutateCustomPrope.delete;
|
|
159
|
+
|
|
160
|
+
var handeContextSubmit = function handeContextSubmit(submitData) {
|
|
161
|
+
var _submitData$ctx, _submitData$ctx$;
|
|
162
|
+
|
|
163
|
+
return _objectSpread(_objectSpread({}, submitData), {}, {
|
|
164
|
+
ctx: submitData === null || submitData === void 0 ? void 0 : (_submitData$ctx = submitData.ctx) === null || _submitData$ctx === void 0 ? void 0 : (_submitData$ctx$ = _submitData$ctx[0]) === null || _submitData$ctx$ === void 0 ? void 0 : _submitData$ctx$.value
|
|
165
|
+
});
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
169
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, {
|
|
170
|
+
defaultWidth: "fill",
|
|
171
|
+
id: "settings-customProperties.lookupPane",
|
|
172
|
+
lastMenu: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
173
|
+
marginBottom0: true,
|
|
174
|
+
onClick: function onClick() {
|
|
175
|
+
return setMode(CREATING);
|
|
176
|
+
} // TODO do we need to clear form here too?
|
|
177
|
+
,
|
|
178
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
179
|
+
id: "stripes-kint-components.create"
|
|
180
|
+
})
|
|
181
|
+
}),
|
|
182
|
+
paneTitle: (_labelOverrides$paneT = labelOverrides.paneTitle) !== null && _labelOverrides$paneT !== void 0 ? _labelOverrides$paneT : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
183
|
+
id: "stripes-kint-components.customProperties"
|
|
184
|
+
}) // This should be configurable?
|
|
185
|
+
,
|
|
186
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesLookup.default, {
|
|
187
|
+
contextFilterOptions: renderContextFilterOptions,
|
|
188
|
+
customPropertiesEndpoint: customPropertiesEndpoint,
|
|
189
|
+
labelOverrides: labelOverrides,
|
|
190
|
+
onSelectCustomProperty: function onSelectCustomProperty(_e, cp) {
|
|
191
|
+
return setCustomProperty(cp);
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
}), customProperty && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, {
|
|
195
|
+
actionMenu: function actionMenu(_ref2) {
|
|
196
|
+
var onToggle = _ref2.onToggle;
|
|
197
|
+
return [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
198
|
+
buttonStyle: "dropdownItem",
|
|
199
|
+
marginBottom0: true,
|
|
200
|
+
onClick: function onClick() {
|
|
201
|
+
return setMode(EDITING);
|
|
202
|
+
},
|
|
203
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
204
|
+
id: "stripes-kint-components.edit"
|
|
205
|
+
})
|
|
206
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
207
|
+
buttonStyle: "dropdownItem",
|
|
208
|
+
marginBottom0: true,
|
|
209
|
+
onClick: function onClick() {
|
|
210
|
+
setDeleteModal(true);
|
|
211
|
+
onToggle();
|
|
212
|
+
},
|
|
213
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
214
|
+
id: "stripes-kint-components.delete"
|
|
215
|
+
})
|
|
216
|
+
})];
|
|
217
|
+
},
|
|
218
|
+
defaultWidth: "fill",
|
|
219
|
+
dismissible: true,
|
|
220
|
+
id: "settings-customProperties-viewPane",
|
|
221
|
+
onClose: function onClose() {
|
|
222
|
+
return setCustomProperty();
|
|
223
|
+
},
|
|
224
|
+
paneTitle: (_ref3 = (_renderViewPaneTitle = renderViewPaneTitle) !== null && _renderViewPaneTitle !== void 0 ? _renderViewPaneTitle : customProperty === null || customProperty === void 0 ? void 0 : customProperty.label) !== null && _ref3 !== void 0 ? _ref3 : customProperty === null || customProperty === void 0 ? void 0 : customProperty.name,
|
|
225
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesView.default, {
|
|
226
|
+
customProperty: customProperty,
|
|
227
|
+
labelOverrides: labelOverrides
|
|
228
|
+
})
|
|
229
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormModal.default, {
|
|
230
|
+
initialValues: mode === CREATING ? {
|
|
231
|
+
weight: 0,
|
|
232
|
+
primary: true,
|
|
233
|
+
defaultInternal: true
|
|
234
|
+
} : _objectSpread(_objectSpread({}, customProperty), {}, {
|
|
235
|
+
ctx: customProperty !== null && customProperty !== void 0 && customProperty.ctx ? [{
|
|
236
|
+
value: customProperty.ctx,
|
|
237
|
+
label: customProperty.ctx
|
|
238
|
+
}] : null
|
|
239
|
+
}),
|
|
240
|
+
modalProps: {
|
|
241
|
+
dismissible: true,
|
|
242
|
+
onClose: function onClose() {
|
|
243
|
+
return setMode(VIEWING);
|
|
244
|
+
},
|
|
245
|
+
open: mode === CREATING || mode === EDITING
|
|
246
|
+
},
|
|
247
|
+
onSubmit: mode === CREATING ? (0, _composeFunction.default)(createCustprop, handeContextSubmit) : (0, _composeFunction.default)(editCustProp, handeContextSubmit),
|
|
248
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertyForm.default, {
|
|
249
|
+
contextFilterOptions: renderContextFilterOptions,
|
|
250
|
+
helpPopovers: helpPopovers,
|
|
251
|
+
labelOverrides: labelOverrides,
|
|
252
|
+
refdata: refdata.map(function (rdc) {
|
|
253
|
+
return {
|
|
254
|
+
label: rdc.desc,
|
|
255
|
+
value: rdc.id
|
|
256
|
+
};
|
|
257
|
+
})
|
|
258
|
+
})
|
|
259
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.ConfirmationModal, {
|
|
260
|
+
buttonStyle: "danger",
|
|
261
|
+
confirmLabel: (_labelOverrides$confi = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.confirmLabel) !== null && _labelOverrides$confi !== void 0 ? _labelOverrides$confi : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
262
|
+
id: "stripes-kint-components.customProperties.delete.confirmLabel"
|
|
263
|
+
}),
|
|
264
|
+
heading: (_labelOverrides$confi2 = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.confirmHeading) !== null && _labelOverrides$confi2 !== void 0 ? _labelOverrides$confi2 : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
265
|
+
id: "stripes-kint-components.customProperties.delete.confirmHeading"
|
|
266
|
+
}),
|
|
267
|
+
id: "delete-job-confirmation",
|
|
268
|
+
message: (_labelOverrides$confi3 = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.confirmMessage) !== null && _labelOverrides$confi3 !== void 0 ? _labelOverrides$confi3 : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntlSafeHtml.default, {
|
|
269
|
+
id: "stripes-kint-components.customProperties.delete.confirmMessage",
|
|
270
|
+
values: {
|
|
271
|
+
name: customProperty === null || customProperty === void 0 ? void 0 : customProperty.name
|
|
272
|
+
}
|
|
273
|
+
}),
|
|
274
|
+
onCancel: function onCancel() {
|
|
275
|
+
return setDeleteModal(false);
|
|
276
|
+
},
|
|
277
|
+
onConfirm: function onConfirm() {
|
|
278
|
+
deleteCustProp();
|
|
279
|
+
setCustomProperty();
|
|
280
|
+
setDeleteModal(false);
|
|
281
|
+
},
|
|
282
|
+
open: deleteModal
|
|
283
|
+
})]
|
|
284
|
+
});
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
__signature__(CustomPropertiesSettings, "useQueryClient{queryClient}\nuseIntl{intl}\nuseState{[customProperty, setCustomProperty]}\nuseState{[deleteModal, setDeleteModal](false)}\nuseRefdata{refdata}\nuseState{[mode, setMode](VIEWING)}\nuseMutateCustomProperties{{\n post: createCustprop,\n put: editCustProp,\n delete: deleteCustProp\n }}", function () {
|
|
288
|
+
return [_reactQuery.useQueryClient, _reactIntl.useIntl, _hooks.useRefdata, _hooks.useMutateCustomProperties];
|
|
289
|
+
});
|
|
290
|
+
|
|
291
|
+
CustomPropertiesSettings.propTypes = {
|
|
292
|
+
afterQueryCalls: _propTypes.default.object,
|
|
293
|
+
contextFilterOptions: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
294
|
+
value: _propTypes.default.string,
|
|
295
|
+
label: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.string])
|
|
296
|
+
})),
|
|
297
|
+
customPropertiesEndpoint: _propTypes.default.string,
|
|
298
|
+
helpPopovers: _propTypes.default.object,
|
|
299
|
+
labelOverrides: _propTypes.default.object,
|
|
300
|
+
refdataEndpoint: _propTypes.default.string
|
|
301
|
+
};
|
|
302
|
+
var _default = CustomPropertiesSettings;
|
|
303
|
+
var _default2 = _default;
|
|
304
|
+
exports.default = _default2;
|
|
305
|
+
;
|
|
306
|
+
|
|
307
|
+
(function () {
|
|
308
|
+
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
309
|
+
|
|
310
|
+
if (!reactHotLoader) {
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
reactHotLoader.register(EDITING, "EDITING", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesSettings.js");
|
|
315
|
+
reactHotLoader.register(CREATING, "CREATING", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesSettings.js");
|
|
316
|
+
reactHotLoader.register(VIEWING, "VIEWING", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesSettings.js");
|
|
317
|
+
reactHotLoader.register(CustomPropertiesSettings, "CustomPropertiesSettings", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesSettings.js");
|
|
318
|
+
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesSettings.js");
|
|
319
|
+
})();
|
|
320
|
+
|
|
321
|
+
;
|
|
322
|
+
|
|
323
|
+
(function () {
|
|
324
|
+
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
325
|
+
leaveModule && leaveModule(module);
|
|
326
|
+
})();
|