@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
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,36 @@
|
|
|
1
|
+
## 2.0.1 2022-03-08
|
|
2
|
+
* Fixes for ActionList
|
|
3
|
+
* When no formatter is present, it no longer crashes
|
|
4
|
+
* Formatting for buttons
|
|
5
|
+
* Fixes for CustomProperty work
|
|
6
|
+
* Editing CustProp with context no longer crashes
|
|
7
|
+
* Added translation for "no matching context found"
|
|
8
|
+
|
|
9
|
+
## 2.0.0 2022-03-04
|
|
10
|
+
* ActionList updates
|
|
11
|
+
* Formatter now accepted, will apply while not editing a row
|
|
12
|
+
* MCL props not specified in prop list will be passed directly to MCL
|
|
13
|
+
* fieldComponents prop allows for rendering of a custom Field for use in editing a specific field on a row
|
|
14
|
+
* Removed deprecated TypeDown component (replaced by Typedown in v1.3.0)
|
|
15
|
+
* Typedown
|
|
16
|
+
* Added isSelected prop
|
|
17
|
+
* Added id prop
|
|
18
|
+
* Added label prop
|
|
19
|
+
* Added required prop
|
|
20
|
+
* Added endOfList prop
|
|
21
|
+
* FormModal component
|
|
22
|
+
* Custom Property configuration components
|
|
23
|
+
* CustomPropertiesLookup
|
|
24
|
+
* CustomPropertiesView
|
|
25
|
+
* CustomPropertiesSettings
|
|
26
|
+
* Added jest artifacts one level below root to gitignore
|
|
27
|
+
## 1.7.0 Released 20th January 2022
|
|
28
|
+
* EditableRefdataList fixes and sorting
|
|
29
|
+
* Fixes to create action in actionlist
|
|
30
|
+
* creatableFields added to ActionList
|
|
31
|
+
* refdataOptions -- a default SASQ options setup is now exported
|
|
32
|
+
* Added FilterPaneHeaderComponent to SASQLookupComponent
|
|
33
|
+
|
|
1
34
|
## 1.6.0 Released 10th December 2021
|
|
2
35
|
* RefdataButtons now exposed
|
|
3
36
|
* Jest testing framework now up and operational
|
|
@@ -51,4 +84,4 @@
|
|
|
51
84
|
* Settings files migrated away from ui-rs
|
|
52
85
|
* useTemplates hook created
|
|
53
86
|
* useRefdata hook created
|
|
54
|
-
* Set up npm publishing to the @k-int scope
|
|
87
|
+
* Set up npm publishing to the @k-int scope
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -9,6 +11,24 @@ Object.defineProperty(exports, "ActionList", {
|
|
|
9
11
|
return _ActionList.default;
|
|
10
12
|
}
|
|
11
13
|
});
|
|
14
|
+
Object.defineProperty(exports, "CustomPropertiesLookup", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _Config.CustomPropertiesLookup;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "CustomPropertiesSettings", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _Config.CustomPropertiesSettings;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "CustomPropertiesView", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _Config.CustomPropertiesView;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
12
32
|
Object.defineProperty(exports, "EditableRefdataList", {
|
|
13
33
|
enumerable: true,
|
|
14
34
|
get: function get() {
|
|
@@ -75,18 +95,13 @@ Object.defineProperty(exports, "SettingsContext", {
|
|
|
75
95
|
return _contexts.SettingsContext;
|
|
76
96
|
}
|
|
77
97
|
});
|
|
78
|
-
Object.defineProperty(exports, "TypeDown", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function get() {
|
|
81
|
-
return _TypeDown.default;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
98
|
Object.defineProperty(exports, "Typedown", {
|
|
85
99
|
enumerable: true,
|
|
86
100
|
get: function get() {
|
|
87
101
|
return _Typedown.default;
|
|
88
102
|
}
|
|
89
103
|
});
|
|
104
|
+
exports.customPropertyContants = void 0;
|
|
90
105
|
Object.defineProperty(exports, "generateKiwtQuery", {
|
|
91
106
|
enumerable: true,
|
|
92
107
|
get: function get() {
|
|
@@ -99,6 +114,12 @@ Object.defineProperty(exports, "generateKiwtQueryParams", {
|
|
|
99
114
|
return _utils.generateKiwtQueryParams;
|
|
100
115
|
}
|
|
101
116
|
});
|
|
117
|
+
Object.defineProperty(exports, "refdataOptions", {
|
|
118
|
+
enumerable: true,
|
|
119
|
+
get: function get() {
|
|
120
|
+
return _utils.refdataOptions;
|
|
121
|
+
}
|
|
122
|
+
});
|
|
102
123
|
Object.defineProperty(exports, "selectorSafe", {
|
|
103
124
|
enumerable: true,
|
|
104
125
|
get: function get() {
|
|
@@ -111,6 +132,12 @@ Object.defineProperty(exports, "useActiveElement", {
|
|
|
111
132
|
return _hooks.useActiveElement;
|
|
112
133
|
}
|
|
113
134
|
});
|
|
135
|
+
Object.defineProperty(exports, "useCustomProperties", {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function get() {
|
|
138
|
+
return _hooks.useCustomProperties;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
114
141
|
Object.defineProperty(exports, "useHelperApp", {
|
|
115
142
|
enumerable: true,
|
|
116
143
|
get: function get() {
|
|
@@ -135,6 +162,12 @@ Object.defineProperty(exports, "useLocalStorageState", {
|
|
|
135
162
|
return _hooks.useLocalStorageState;
|
|
136
163
|
}
|
|
137
164
|
});
|
|
165
|
+
Object.defineProperty(exports, "useMutateCustomProperties", {
|
|
166
|
+
enumerable: true,
|
|
167
|
+
get: function get() {
|
|
168
|
+
return _hooks.useMutateCustomProperties;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
138
171
|
Object.defineProperty(exports, "useMutateRefdataValue", {
|
|
139
172
|
enumerable: true,
|
|
140
173
|
get: function get() {
|
|
@@ -178,8 +211,6 @@ var _ActionList = _interopRequireDefault(require("./lib/ActionList"));
|
|
|
178
211
|
|
|
179
212
|
var _EditableRefdataList = _interopRequireDefault(require("./lib/EditableRefdataList"));
|
|
180
213
|
|
|
181
|
-
var _TypeDown = _interopRequireDefault(require("./lib/TypeDown"));
|
|
182
|
-
|
|
183
214
|
var _Typedown = _interopRequireDefault(require("./lib/Typedown"));
|
|
184
215
|
|
|
185
216
|
var _QueryTypedown = _interopRequireDefault(require("./lib/QueryTypedown"));
|
|
@@ -196,6 +227,16 @@ var _NoResultsMessage = _interopRequireDefault(require("./lib/NoResultsMessage")
|
|
|
196
227
|
|
|
197
228
|
var _RefdataButtons = _interopRequireDefault(require("./lib/RefdataButtons"));
|
|
198
229
|
|
|
230
|
+
var _Config = require("./lib/CustomProperties/Config");
|
|
231
|
+
|
|
232
|
+
var _customPropertyContants = _interopRequireWildcard(require("./lib/constants/customProperties"));
|
|
233
|
+
|
|
234
|
+
exports.customPropertyContants = _customPropertyContants;
|
|
235
|
+
|
|
236
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
237
|
+
|
|
238
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
239
|
+
|
|
199
240
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
200
241
|
|
|
201
242
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
@@ -19,6 +19,8 @@ var _ActionListFieldArray = _interopRequireDefault(require("./ActionListFieldArr
|
|
|
19
19
|
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
|
|
22
|
+
var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "contentData", "creatableFields", "editableFields", "fieldComponents", "visibleFields"];
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
26
|
(function () {
|
|
@@ -26,6 +28,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
26
28
|
enterModule && enterModule(module);
|
|
27
29
|
})();
|
|
28
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 _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
38
|
+
|
|
39
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
40
|
+
|
|
29
41
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
30
42
|
return a;
|
|
31
43
|
};
|
|
@@ -35,7 +47,9 @@ var propTypes = {
|
|
|
35
47
|
actionCalls: _propTypes.default.object,
|
|
36
48
|
columnMapping: _propTypes.default.object,
|
|
37
49
|
contentData: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
50
|
+
creatableFields: _propTypes.default.object,
|
|
38
51
|
editableFields: _propTypes.default.object,
|
|
52
|
+
fieldComponents: _propTypes.default.object,
|
|
39
53
|
visibleFields: _propTypes.default.arrayOf(_propTypes.default.string)
|
|
40
54
|
};
|
|
41
55
|
|
|
@@ -45,34 +59,45 @@ var ActionList = function ActionList(_ref) {
|
|
|
45
59
|
actionCalls = _ref$actionCalls === void 0 ? {} : _ref$actionCalls,
|
|
46
60
|
columnMapping = _ref.columnMapping,
|
|
47
61
|
contentData = _ref.contentData,
|
|
62
|
+
_ref$creatableFields = _ref.creatableFields,
|
|
63
|
+
creatableFields = _ref$creatableFields === void 0 ? {} : _ref$creatableFields,
|
|
48
64
|
_ref$editableFields = _ref.editableFields,
|
|
49
65
|
editableFields = _ref$editableFields === void 0 ? {} : _ref$editableFields,
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
_ref$fieldComponents = _ref.fieldComponents,
|
|
67
|
+
fieldComponents = _ref$fieldComponents === void 0 ? {} : _ref$fieldComponents,
|
|
68
|
+
visibleFields = _ref.visibleFields,
|
|
69
|
+
mclProps = _objectWithoutProperties(_ref, _excluded);
|
|
70
|
+
|
|
71
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
72
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Form, {
|
|
73
|
+
enableReinitialize: true,
|
|
74
|
+
initialValues: {
|
|
75
|
+
contentData: contentData
|
|
76
|
+
},
|
|
77
|
+
mutators: _finalFormArrays.default,
|
|
78
|
+
onSubmit: actionCalls.edit,
|
|
79
|
+
subscription: {
|
|
80
|
+
contentData: true
|
|
81
|
+
},
|
|
82
|
+
children: function children() {
|
|
83
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("form", {
|
|
84
|
+
onSubmit: function onSubmit(e) {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
},
|
|
87
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalFormArrays.FieldArray, _objectSpread({
|
|
88
|
+
actionAssigner: actionAssigner,
|
|
89
|
+
actionCalls: actionCalls,
|
|
90
|
+
columnMapping: columnMapping,
|
|
91
|
+
component: _ActionListFieldArray.default,
|
|
92
|
+
creatableFields: creatableFields,
|
|
93
|
+
editableFields: editableFields,
|
|
94
|
+
fieldComponents: fieldComponents,
|
|
95
|
+
name: "contentData",
|
|
96
|
+
visibleFields: visibleFields
|
|
97
|
+
}, mclProps))
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
})
|
|
76
101
|
});
|
|
77
102
|
};
|
|
78
103
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof";
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
4
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
@@ -23,8 +23,11 @@ var _ActionListFieldArray = _interopRequireDefault(require("../../../styles/Acti
|
|
|
23
23
|
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
|
|
26
|
-
var _excluded = ["
|
|
27
|
-
_excluded2 = ["actionListActions"]
|
|
26
|
+
var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "creatableFields", "editableFields", "fields", "fieldComponents", "visibleFields"],
|
|
27
|
+
_excluded2 = ["actionListActions"],
|
|
28
|
+
_excluded3 = ["actionListActions"],
|
|
29
|
+
_excluded4 = ["actionListActions"],
|
|
30
|
+
_excluded5 = ["formatter"];
|
|
28
31
|
|
|
29
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
33
|
|
|
@@ -47,16 +50,12 @@ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToAr
|
|
|
47
50
|
|
|
48
51
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
49
52
|
|
|
50
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
53
|
+
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; }
|
|
51
54
|
|
|
52
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
55
|
+
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; }
|
|
53
56
|
|
|
54
57
|
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; }
|
|
55
58
|
|
|
56
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
57
|
-
|
|
58
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
59
|
-
|
|
60
59
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
61
60
|
|
|
62
61
|
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."); }
|
|
@@ -69,6 +68,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
69
68
|
|
|
70
69
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
71
70
|
|
|
71
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
72
|
+
|
|
73
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
74
|
+
|
|
72
75
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
73
76
|
return a;
|
|
74
77
|
};
|
|
@@ -80,8 +83,11 @@ var propTypes = {
|
|
|
80
83
|
actionAssigner: _propTypes.default.func,
|
|
81
84
|
actionCalls: _propTypes.default.object,
|
|
82
85
|
columnMapping: _propTypes.default.object,
|
|
86
|
+
creatableFields: _propTypes.default.object,
|
|
83
87
|
editableFields: _propTypes.default.object,
|
|
84
88
|
fields: _propTypes.default.object,
|
|
89
|
+
fieldComponents: _propTypes.default.object,
|
|
90
|
+
formatter: _propTypes.default.object,
|
|
85
91
|
visibleFields: _propTypes.default.arrayOf(_propTypes.default.string)
|
|
86
92
|
};
|
|
87
93
|
|
|
@@ -89,9 +95,12 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
89
95
|
var actionAssigner = _ref.actionAssigner,
|
|
90
96
|
actionCalls = _ref.actionCalls,
|
|
91
97
|
columnMapping = _ref.columnMapping,
|
|
98
|
+
creatableFields = _ref.creatableFields,
|
|
92
99
|
editableFields = _ref.editableFields,
|
|
93
100
|
fields = _ref.fields,
|
|
94
|
-
|
|
101
|
+
fieldComponents = _ref.fieldComponents,
|
|
102
|
+
visibleFields = _ref.visibleFields,
|
|
103
|
+
mclProps = _objectWithoutProperties(_ref, _excluded);
|
|
95
104
|
|
|
96
105
|
// Grab finalForm functions/values from form hooks
|
|
97
106
|
var _useForm = (0, _reactFinalForm.useForm)(),
|
|
@@ -125,13 +134,16 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
125
134
|
var handleSave = function handleSave(index) {
|
|
126
135
|
var _fields$value$index = fields.value[index],
|
|
127
136
|
_a = _fields$value$index.actionListActions,
|
|
128
|
-
rowData = _objectWithoutProperties(_fields$value$index,
|
|
137
|
+
rowData = _objectWithoutProperties(_fields$value$index, _excluded2);
|
|
129
138
|
|
|
130
139
|
actionCalls.edit(rowData);
|
|
131
140
|
};
|
|
132
141
|
|
|
133
142
|
var handleCreate = function handleCreate(index) {
|
|
134
|
-
var
|
|
143
|
+
var _fields$value$index2 = fields.value[index],
|
|
144
|
+
_a = _fields$value$index2.actionListActions,
|
|
145
|
+
rowData = _objectWithoutProperties(_fields$value$index2, _excluded3);
|
|
146
|
+
|
|
135
147
|
actionCalls.create(rowData);
|
|
136
148
|
};
|
|
137
149
|
|
|
@@ -152,7 +164,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
152
164
|
var fieldName = "contentData[".concat(data.rowIndex, "]");
|
|
153
165
|
|
|
154
166
|
var actions = data.actionListActions,
|
|
155
|
-
rest = _objectWithoutProperties(data,
|
|
167
|
+
rest = _objectWithoutProperties(data, _excluded4);
|
|
156
168
|
|
|
157
169
|
if (data.id === editing || !data.id && editing === 'NEW_ROW') {
|
|
158
170
|
// Render the save/cancel buttons
|
|
@@ -160,6 +172,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
160
172
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
161
173
|
buttonStyle: "primary",
|
|
162
174
|
disabled: submitting || pristine,
|
|
175
|
+
marginBottom0: true,
|
|
163
176
|
onClick: function onClick() {
|
|
164
177
|
if (!data.id && editing === 'NEW_ROW') {
|
|
165
178
|
handleCreate(data.rowIndex);
|
|
@@ -174,9 +187,15 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
174
187
|
})
|
|
175
188
|
}, "save[".concat(data.rowIndex, "]")), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
176
189
|
"data-type-button": "cancel",
|
|
190
|
+
marginBottom0: true,
|
|
177
191
|
onClick: function onClick() {
|
|
178
|
-
|
|
179
|
-
|
|
192
|
+
if (!data.id && editing === 'NEW_ROW') {
|
|
193
|
+
fields.remove(data.rowIndex);
|
|
194
|
+
toggleEditing('NEW_ROW');
|
|
195
|
+
} else {
|
|
196
|
+
change(fieldName, (0, _get.default)(initialValues, fieldName));
|
|
197
|
+
toggleEditing(data.id);
|
|
198
|
+
}
|
|
180
199
|
},
|
|
181
200
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
182
201
|
id: "stripes-kint-components.actionList.cancel"
|
|
@@ -205,6 +224,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
205
224
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.IconButton, {
|
|
206
225
|
disabled: editing,
|
|
207
226
|
icon: action.icon,
|
|
227
|
+
marginBottom0: true,
|
|
208
228
|
onClick: actionFunction
|
|
209
229
|
}, "action-".concat(action.name, "[").concat(data.rowIndex, "]"));
|
|
210
230
|
} // Else return a button with the label, or failing that the name of the action
|
|
@@ -212,6 +232,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
212
232
|
|
|
213
233
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
214
234
|
disabled: editing,
|
|
235
|
+
marginBottom0: true,
|
|
215
236
|
onClick: actionFunction,
|
|
216
237
|
children: (_action$label = action.label) !== null && _action$label !== void 0 ? _action$label : action.name
|
|
217
238
|
}, "action-".concat(action.name, "[").concat(data.rowIndex, "]"));
|
|
@@ -220,7 +241,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
220
241
|
};
|
|
221
242
|
|
|
222
243
|
var formatContent = function formatContent() {
|
|
223
|
-
return fields.map(function (fieldName) {
|
|
244
|
+
return fields.map(function (fieldName, fieldIndex) {
|
|
224
245
|
// Fetch the content from the field Values
|
|
225
246
|
var cd = (0, _get.default)(values, fieldName);
|
|
226
247
|
cd.actionListActions = actionAssigner(cd); // Row is being edited if it has no id, or its id is in the editing string
|
|
@@ -240,22 +261,34 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
240
261
|
|
|
241
262
|
try {
|
|
242
263
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
243
|
-
var _editableFields$key;
|
|
264
|
+
var _editableFields$key, _creatableFields$key;
|
|
244
265
|
|
|
245
266
|
var key = _step.value;
|
|
246
267
|
var editFunction = (_editableFields$key = editableFields[key]) !== null && _editableFields$key !== void 0 ? _editableFields$key : function () {
|
|
247
268
|
return true;
|
|
248
269
|
};
|
|
270
|
+
var createFunction = (_creatableFields$key = creatableFields[key]) !== null && _creatableFields$key !== void 0 ? _creatableFields$key : function () {
|
|
271
|
+
return true;
|
|
272
|
+
};
|
|
249
273
|
/*
|
|
250
|
-
Next check if this is a new row, if so we should
|
|
251
|
-
If it
|
|
252
|
-
|
|
274
|
+
Next check if this is a new row, if so we should run the createableField function with the data.
|
|
275
|
+
If it is not a new row, then we run the editableField function with the data,
|
|
276
|
+
and it should return true/false
|
|
277
|
+
For both checks
|
|
278
|
+
true => Field, false => display value
|
|
253
279
|
*/
|
|
254
280
|
|
|
255
|
-
if (!cd.id || editFunction(cd)) {
|
|
256
|
-
returnObj[key] =
|
|
257
|
-
component: _components.TextField,
|
|
281
|
+
if (!cd.id && createFunction(cd) || editFunction(cd)) {
|
|
282
|
+
returnObj[key] = fieldComponents[key] ? fieldComponents[key]({
|
|
258
283
|
name: "".concat(fieldName, ".").concat(key)
|
|
284
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
285
|
+
autofocus: fieldIndex === 0,
|
|
286
|
+
component: _components.TextField,
|
|
287
|
+
marginBottom0: true,
|
|
288
|
+
name: "".concat(fieldName, ".").concat(key),
|
|
289
|
+
parse: function parse(v) {
|
|
290
|
+
return v;
|
|
291
|
+
}
|
|
259
292
|
});
|
|
260
293
|
}
|
|
261
294
|
}
|
|
@@ -270,6 +303,30 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
270
303
|
});
|
|
271
304
|
};
|
|
272
305
|
|
|
306
|
+
var formatter = mclProps.formatter,
|
|
307
|
+
restOfMclProps = _objectWithoutProperties(mclProps, _excluded5); // Destructure formatter part of mclProps
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
var fieldAwareFormatter = function fieldAwareFormatter() {
|
|
311
|
+
var returnObj = {}; // For each visible field, if it's being edited then ignore passed formatters, else use them
|
|
312
|
+
|
|
313
|
+
visibleFields.forEach(function (key) {
|
|
314
|
+
returnObj[key] = function (cd) {
|
|
315
|
+
// Row is being edited if it has no id, or its id is in the editing string
|
|
316
|
+
var editingRow = cd.id === editing || !cd.id; // If not editing, use the passed formatter values
|
|
317
|
+
|
|
318
|
+
var returnValue = cd[key];
|
|
319
|
+
|
|
320
|
+
if (!editingRow && formatter !== null && formatter !== void 0 && formatter[key]) {
|
|
321
|
+
returnValue = formatter[key](cd);
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
return returnValue;
|
|
325
|
+
};
|
|
326
|
+
});
|
|
327
|
+
return returnObj;
|
|
328
|
+
};
|
|
329
|
+
|
|
273
330
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
274
331
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
275
332
|
buttonClass: _ActionListFieldArray.default.buttonRight,
|
|
@@ -281,7 +338,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
281
338
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
282
339
|
id: "stripes-kint-components.actionList.create"
|
|
283
340
|
})
|
|
284
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, {
|
|
341
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, _objectSpread({
|
|
285
342
|
columnMapping: _objectSpread(_objectSpread({}, columnMapping), {}, {
|
|
286
343
|
actionListActions: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
287
344
|
id: "stripes-kint-components.actionList.actions"
|
|
@@ -289,12 +346,12 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
289
346
|
}),
|
|
290
347
|
columnWidths: getColumnWidths(),
|
|
291
348
|
contentData: formatContent(),
|
|
292
|
-
formatter: {
|
|
349
|
+
formatter: _objectSpread({
|
|
293
350
|
actionListActions: renderActionButtons
|
|
294
|
-
},
|
|
351
|
+
}, fieldAwareFormatter()),
|
|
295
352
|
interactive: false,
|
|
296
353
|
visibleColumns: [].concat(_toConsumableArray(visibleFields), ['actionListActions'])
|
|
297
|
-
})]
|
|
354
|
+
}, restOfMclProps))]
|
|
298
355
|
});
|
|
299
356
|
};
|
|
300
357
|
|