@gisce/react-ooui 2.0.0-alpha.6 → 2.0.0-alpha.60
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/dist/ConnectionProvider.d.ts +7 -0
- package/dist/ConnectionProvider.d.ts.map +1 -0
- package/dist/actionbar/ActionButton.d.ts +12 -0
- package/dist/actionbar/ActionButton.d.ts.map +1 -0
- package/dist/actionbar/AttachmentsButton.d.ts +11 -0
- package/dist/actionbar/AttachmentsButton.d.ts.map +1 -0
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts +18 -0
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts.map +1 -0
- package/dist/actionbar/ButtonWithBadge.d.ts +7 -0
- package/dist/actionbar/ButtonWithBadge.d.ts.map +1 -0
- package/dist/actionbar/ChangeViewButton.d.ts +12 -0
- package/dist/actionbar/ChangeViewButton.d.ts.map +1 -0
- package/dist/actionbar/DashboardActionBar.d.ts +3 -0
- package/dist/actionbar/DashboardActionBar.d.ts.map +1 -0
- package/dist/actionbar/DropdownButton.d.ts +13 -0
- package/dist/actionbar/DropdownButton.d.ts.map +1 -0
- package/dist/actionbar/FormActionBar.d.ts +5 -0
- package/dist/actionbar/FormActionBar.d.ts.map +1 -0
- package/dist/actionbar/GraphActionBar.d.ts +5 -0
- package/dist/actionbar/GraphActionBar.d.ts.map +1 -0
- package/dist/actionbar/NewButton.d.ts +6 -0
- package/dist/actionbar/NewButton.d.ts.map +1 -0
- package/dist/actionbar/SearchBar.d.ts +8 -0
- package/dist/actionbar/SearchBar.d.ts.map +1 -0
- package/dist/actionbar/TreeActionBar.d.ts +8 -0
- package/dist/actionbar/TreeActionBar.d.ts.map +1 -0
- package/dist/common/ButtonWithTooltip.d.ts +7 -0
- package/dist/common/ButtonWithTooltip.d.ts.map +1 -0
- package/dist/common/DatePicker.d.ts +19 -0
- package/dist/common/DatePicker.d.ts.map +1 -0
- package/dist/common/Field.d.ts +14 -0
- package/dist/common/Field.d.ts.map +1 -0
- package/dist/common/SelectAllRecordsRow.d.ts +9 -0
- package/dist/common/SelectAllRecordsRow.d.ts.map +1 -0
- package/dist/common/TimePicker.d.ts +10 -0
- package/dist/common/TimePicker.d.ts.map +1 -0
- package/dist/context/ActionViewContext.d.ts +65 -0
- package/dist/context/ActionViewContext.d.ts.map +1 -0
- package/dist/context/ConfigContext.d.ts +15 -0
- package/dist/context/ConfigContext.d.ts.map +1 -0
- package/dist/context/ContentRootContext.d.ts +19 -0
- package/dist/context/ContentRootContext.d.ts.map +1 -0
- package/dist/context/DashboardActionContext.d.ts +19 -0
- package/dist/context/DashboardActionContext.d.ts.map +1 -0
- package/dist/context/FormContext.d.ts +35 -0
- package/dist/context/FormContext.d.ts.map +1 -0
- package/dist/context/FormModalContext.d.ts +11 -0
- package/dist/context/FormModalContext.d.ts.map +1 -0
- package/dist/context/LocaleContext.d.ts +14 -0
- package/dist/context/LocaleContext.d.ts.map +1 -0
- package/dist/context/One2manyContext.d.ts +17 -0
- package/dist/context/One2manyContext.d.ts.map +1 -0
- package/dist/context/TabManagerContext.d.ts +50 -0
- package/dist/context/TabManagerContext.d.ts.map +1 -0
- package/dist/helpers/containerHelper.d.ts +22 -0
- package/dist/helpers/containerHelper.d.ts.map +1 -0
- package/dist/helpers/dayjs.d.ts +3 -0
- package/dist/helpers/dayjs.d.ts.map +1 -0
- package/dist/helpers/dynamicColumnsHelper.d.ts +16 -0
- package/dist/helpers/dynamicColumnsHelper.d.ts.map +1 -0
- package/dist/helpers/errorHelper.d.ts +6 -0
- package/dist/helpers/errorHelper.d.ts.map +1 -0
- package/dist/helpers/filesHelper.d.ts +8 -0
- package/dist/helpers/filesHelper.d.ts.map +1 -0
- package/dist/helpers/formHelper.d.ts +36 -0
- package/dist/helpers/formHelper.d.ts.map +1 -0
- package/dist/helpers/iconMapper.d.ts +13 -0
- package/dist/helpers/iconMapper.d.ts.map +1 -0
- package/dist/helpers/logInfoHelper.d.ts +3 -0
- package/dist/helpers/logInfoHelper.d.ts.map +1 -0
- package/dist/helpers/one2manyHelper.d.ts +37 -0
- package/dist/helpers/one2manyHelper.d.ts.map +1 -0
- package/dist/helpers/searchHelper.d.ts +6 -0
- package/dist/helpers/searchHelper.d.ts.map +1 -0
- package/dist/helpers/timeHelper.d.ts +4 -0
- package/dist/helpers/timeHelper.d.ts.map +1 -0
- package/dist/helpers/treeHelper.d.ts +23 -0
- package/dist/helpers/treeHelper.d.ts.map +1 -0
- package/dist/helpers/viewHelper.d.ts +10 -0
- package/dist/helpers/viewHelper.d.ts.map +1 -0
- package/dist/hooks/useEffectDebugger.d.ts +3 -0
- package/dist/hooks/useEffectDebugger.d.ts.map +1 -0
- package/dist/hooks/useExport.d.ts +44 -0
- package/dist/hooks/useExport.d.ts.map +1 -0
- package/dist/hooks/useFetchViews.d.ts +1 -0
- package/dist/hooks/useFetchViews.d.ts.map +1 -0
- package/dist/hooks/useSearch.d.ts +56 -0
- package/dist/hooks/useSearch.d.ts.map +1 -0
- package/dist/hooks/useWindowDimensions.d.ts +7 -0
- package/dist/hooks/useWindowDimensions.d.ts.map +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/locales/ca_ES.d.ts +94 -0
- package/dist/locales/ca_ES.d.ts.map +1 -0
- package/dist/locales/en_US.d.ts +94 -0
- package/dist/locales/en_US.d.ts.map +1 -0
- package/dist/locales/es_ES.d.ts +94 -0
- package/dist/locales/es_ES.d.ts.map +1 -0
- package/dist/react-ooui.es.js +10077 -0
- package/dist/react-ooui.es.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +258 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/ui/ActionErrorDialog.d.ts +3 -0
- package/dist/ui/ActionErrorDialog.d.ts.map +1 -0
- package/dist/ui/ConfirmDialog.d.ts +7 -0
- package/dist/ui/ConfirmDialog.d.ts.map +1 -0
- package/dist/ui/ErrorAlert.d.ts +5 -0
- package/dist/ui/ErrorAlert.d.ts.map +1 -0
- package/dist/ui/FavouriteButton.d.ts +25 -0
- package/dist/ui/FavouriteButton.d.ts.map +1 -0
- package/dist/ui/FormErrorsDialog.d.ts +3 -0
- package/dist/ui/FormErrorsDialog.d.ts.map +1 -0
- package/dist/ui/GenericErrorDialog.d.ts +3 -0
- package/dist/ui/GenericErrorDialog.d.ts.map +1 -0
- package/dist/ui/GoToResourceModal.d.ts +9 -0
- package/dist/ui/GoToResourceModal.d.ts.map +1 -0
- package/dist/ui/InfoDialog.d.ts +3 -0
- package/dist/ui/InfoDialog.d.ts.map +1 -0
- package/dist/ui/RefreshItemDialog.d.ts +7 -0
- package/dist/ui/RefreshItemDialog.d.ts.map +1 -0
- package/dist/ui/RemoveItemDialog.d.ts +6 -0
- package/dist/ui/RemoveItemDialog.d.ts.map +1 -0
- package/dist/ui/TitleHeader.d.ts +7 -0
- package/dist/ui/TitleHeader.d.ts.map +1 -0
- package/dist/ui/UnlinkItemDialog.d.ts +6 -0
- package/dist/ui/UnlinkItemDialog.d.ts.map +1 -0
- package/dist/ui/UnsavedChangesDialog.d.ts +7 -0
- package/dist/ui/UnsavedChangesDialog.d.ts.map +1 -0
- package/dist/ui/WarningDialog.d.ts +3 -0
- package/dist/ui/WarningDialog.d.ts.map +1 -0
- package/dist/views/ActionView.d.ts +22 -0
- package/dist/views/ActionView.d.ts.map +1 -0
- package/dist/views/CurrentTabContent.d.ts +3 -0
- package/dist/views/CurrentTabContent.d.ts.map +1 -0
- package/dist/views/RootView.d.ts +14 -0
- package/dist/views/RootView.d.ts.map +1 -0
- package/dist/views/TabContent.d.ts +8 -0
- package/dist/views/TabContent.d.ts.map +1 -0
- package/dist/views/TabSelector.d.ts +3 -0
- package/dist/views/TabSelector.d.ts.map +1 -0
- package/dist/views/Welcome.d.ts +4 -0
- package/dist/views/Welcome.d.ts.map +1 -0
- package/dist/views/actionViews/DashboardActionView.d.ts +7 -0
- package/dist/views/actionViews/DashboardActionView.d.ts.map +1 -0
- package/dist/views/actionViews/FormActionView.d.ts +17 -0
- package/dist/views/actionViews/FormActionView.d.ts.map +1 -0
- package/dist/views/actionViews/GraphActionView.d.ts +12 -0
- package/dist/views/actionViews/GraphActionView.d.ts.map +1 -0
- package/dist/views/actionViews/TreeActionView.d.ts +19 -0
- package/dist/views/actionViews/TreeActionView.d.ts.map +1 -0
- package/dist/views/tabs/Tab.d.ts +10 -0
- package/dist/views/tabs/Tab.d.ts.map +1 -0
- package/dist/widgets/WidgetFactory.d.ts +4 -0
- package/dist/widgets/WidgetFactory.d.ts.map +1 -0
- package/dist/widgets/base/Binary.d.ts +13 -0
- package/dist/widgets/base/Binary.d.ts.map +1 -0
- package/dist/widgets/base/Boolean.d.ts +3 -0
- package/dist/widgets/base/Boolean.d.ts.map +1 -0
- package/dist/widgets/base/Button.d.ts +7 -0
- package/dist/widgets/base/Button.d.ts.map +1 -0
- package/dist/widgets/base/Char.d.ts +7 -0
- package/dist/widgets/base/Char.d.ts.map +1 -0
- package/dist/widgets/base/Date.d.ts +4 -0
- package/dist/widgets/base/Date.d.ts.map +1 -0
- package/dist/widgets/base/DateTime.d.ts +4 -0
- package/dist/widgets/base/DateTime.d.ts.map +1 -0
- package/dist/widgets/base/Email.d.ts +3 -0
- package/dist/widgets/base/Email.d.ts.map +1 -0
- package/dist/widgets/base/Float.d.ts +3 -0
- package/dist/widgets/base/Float.d.ts.map +1 -0
- package/dist/widgets/base/FloatTime.d.ts +12 -0
- package/dist/widgets/base/FloatTime.d.ts.map +1 -0
- package/dist/widgets/base/Image.d.ts +13 -0
- package/dist/widgets/base/Image.d.ts.map +1 -0
- package/dist/widgets/base/Integer.d.ts +7 -0
- package/dist/widgets/base/Integer.d.ts.map +1 -0
- package/dist/widgets/base/Label.d.ts +8 -0
- package/dist/widgets/base/Label.d.ts.map +1 -0
- package/dist/widgets/base/LinkInput.d.ts +11 -0
- package/dist/widgets/base/LinkInput.d.ts.map +1 -0
- package/dist/widgets/base/MultiSelection.d.ts +9 -0
- package/dist/widgets/base/MultiSelection.d.ts.map +1 -0
- package/dist/widgets/base/ProgressBar.d.ts +6 -0
- package/dist/widgets/base/ProgressBar.d.ts.map +1 -0
- package/dist/widgets/base/Reference.d.ts +16 -0
- package/dist/widgets/base/Reference.d.ts.map +1 -0
- package/dist/widgets/base/ReferenceTree.d.ts +8 -0
- package/dist/widgets/base/ReferenceTree.d.ts.map +1 -0
- package/dist/widgets/base/Selection.d.ts +9 -0
- package/dist/widgets/base/Selection.d.ts.map +1 -0
- package/dist/widgets/base/Separator.d.ts +7 -0
- package/dist/widgets/base/Separator.d.ts.map +1 -0
- package/dist/widgets/base/Text.d.ts +7 -0
- package/dist/widgets/base/Text.d.ts.map +1 -0
- package/dist/widgets/base/Time.d.ts +11 -0
- package/dist/widgets/base/Time.d.ts.map +1 -0
- package/dist/widgets/base/Url.d.ts +3 -0
- package/dist/widgets/base/Url.d.ts.map +1 -0
- package/dist/widgets/base/many2one/Many2one.d.ts +16 -0
- package/dist/widgets/base/many2one/Many2one.d.ts.map +1 -0
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts +8 -0
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts.map +1 -0
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts +9 -0
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts.map +1 -0
- package/dist/widgets/base/many2one/Many2oneTree.d.ts +6 -0
- package/dist/widgets/base/many2one/Many2oneTree.d.ts.map +1 -0
- package/dist/widgets/base/one2many/One2many.d.ts +7 -0
- package/dist/widgets/base/one2many/One2many.d.ts.map +1 -0
- package/dist/widgets/base/one2many/One2manyInput.d.ts +23 -0
- package/dist/widgets/base/one2many/One2manyInput.d.ts.map +1 -0
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts +22 -0
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts.map +1 -0
- package/dist/widgets/containers/Container.d.ts +9 -0
- package/dist/widgets/containers/Container.d.ts.map +1 -0
- package/dist/widgets/containers/Group.d.ts +10 -0
- package/dist/widgets/containers/Group.d.ts.map +1 -0
- package/dist/widgets/containers/Notebook.d.ts +9 -0
- package/dist/widgets/containers/Notebook.d.ts.map +1 -0
- package/dist/widgets/custom/Avatar.d.ts +10 -0
- package/dist/widgets/custom/Avatar.d.ts.map +1 -0
- package/dist/widgets/custom/ButtonGroup.d.ts +7 -0
- package/dist/widgets/custom/ButtonGroup.d.ts.map +1 -0
- package/dist/widgets/custom/CodeEditor.d.ts +8 -0
- package/dist/widgets/custom/CodeEditor.d.ts.map +1 -0
- package/dist/widgets/custom/Comments.d.ts +34 -0
- package/dist/widgets/custom/Comments.d.ts.map +1 -0
- package/dist/widgets/custom/FiberGrid.d.ts +9 -0
- package/dist/widgets/custom/FiberGrid.d.ts.map +1 -0
- package/dist/widgets/custom/Indicator.d.ts +9 -0
- package/dist/widgets/custom/Indicator.d.ts.map +1 -0
- package/dist/widgets/custom/Markdown.d.ts +4 -0
- package/dist/widgets/custom/Markdown.d.ts.map +1 -0
- package/dist/widgets/custom/MultiCheckbox.d.ts +13 -0
- package/dist/widgets/custom/MultiCheckbox.d.ts.map +1 -0
- package/dist/widgets/custom/Radio.d.ts +9 -0
- package/dist/widgets/custom/Radio.d.ts.map +1 -0
- package/dist/widgets/custom/Steps.d.ts +12 -0
- package/dist/widgets/custom/Steps.d.ts.map +1 -0
- package/dist/widgets/custom/Switch.d.ts +3 -0
- package/dist/widgets/custom/Switch.d.ts.map +1 -0
- package/dist/widgets/custom/Tag.d.ts +6 -0
- package/dist/widgets/custom/Tag.d.ts.map +1 -0
- package/dist/widgets/custom/Tags.d.ts +14 -0
- package/dist/widgets/custom/Tags.d.ts.map +1 -0
- package/dist/widgets/custom/Timeline.d.ts +15 -0
- package/dist/widgets/custom/Timeline.d.ts.map +1 -0
- package/dist/widgets/modals/ExportModal.d.ts +14 -0
- package/dist/widgets/modals/ExportModal.d.ts.map +1 -0
- package/dist/widgets/modals/FormModal.d.ts +11 -0
- package/dist/widgets/modals/FormModal.d.ts.map +1 -0
- package/dist/widgets/modals/SearchModal.d.ts +12 -0
- package/dist/widgets/modals/SearchModal.d.ts.map +1 -0
- package/dist/widgets/modals/TranslationModal.d.ts +11 -0
- package/dist/widgets/modals/TranslationModal.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/Dashboard.d.ts +5 -0
- package/dist/widgets/views/Dashboard/Dashboard.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/DashboardForm.d.ts +3 -0
- package/dist/widgets/views/Dashboard/DashboardForm.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts +18 -0
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/dashboardHelper.d.ts +6 -0
- package/dist/widgets/views/Dashboard/dashboardHelper.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts +3 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts +6 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts +3 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts +11 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/index.d.ts +5 -0
- package/dist/widgets/views/DashboardGrid/index.d.ts.map +1 -0
- package/dist/widgets/views/Form.d.ts +29 -0
- package/dist/widgets/views/Form.d.ts.map +1 -0
- package/dist/widgets/views/Graph/Graph.d.ts +11 -0
- package/dist/widgets/views/Graph/Graph.d.ts.map +1 -0
- package/dist/widgets/views/Graph/GraphChart.d.ts +10 -0
- package/dist/widgets/views/Graph/GraphChart.d.ts.map +1 -0
- package/dist/widgets/views/Graph/GraphDefaults.d.ts +83 -0
- package/dist/widgets/views/Graph/GraphDefaults.d.ts.map +1 -0
- package/dist/widgets/views/Graph/GraphIndicator.d.ts +16 -0
- package/dist/widgets/views/Graph/GraphIndicator.d.ts.map +1 -0
- package/dist/widgets/views/Graph/useGraphData.d.ts +20 -0
- package/dist/widgets/views/Graph/useGraphData.d.ts.map +1 -0
- package/dist/widgets/views/SearchTree.d.ts +24 -0
- package/dist/widgets/views/SearchTree.d.ts.map +1 -0
- package/dist/widgets/views/Tree/Tree.d.ts +33 -0
- package/dist/widgets/views/Tree/Tree.d.ts.map +1 -0
- package/dist/widgets/views/Tree/index.d.ts +2 -0
- package/dist/widgets/views/Tree/index.d.ts.map +1 -0
- package/dist/widgets/views/Tree/treeComponents.d.ts +131 -0
- package/dist/widgets/views/Tree/treeComponents.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts +3 -0
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts +3 -0
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/PairFields.d.ts +4 -0
- package/dist/widgets/views/searchFilter/PairFields.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts +10 -0
- package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/SearchField.d.ts +7 -0
- package/dist/widgets/views/searchFilter/SearchField.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts +19 -0
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/SearchParams.d.ts +7 -0
- package/dist/widgets/views/searchFilter/SearchParams.d.ts.map +1 -0
- package/package.json +43 -18
- package/src/ConnectionProvider.ts +1 -1
- package/src/__tests__/iconMapper.test.ts +4 -4
- package/src/actionbar/AttachmentsButton.tsx +25 -23
- package/src/actionbar/AttachmentsButtonWrapper.tsx +2 -2
- package/src/actionbar/ButtonWithBadge.tsx +4 -2
- package/src/actionbar/ChangeViewButton.tsx +1 -1
- package/src/actionbar/DashboardActionBar.tsx +2 -6
- package/src/actionbar/DropdownButton.tsx +100 -37
- package/src/actionbar/FormActionBar.tsx +22 -16
- package/src/actionbar/NewButton.tsx +1 -1
- package/src/actionbar/TreeActionBar.tsx +86 -79
- package/src/common/DatePicker.tsx +4 -5
- package/src/common/Field.tsx +2 -1
- package/src/common/TimePicker.tsx +38 -0
- package/src/context/ActionViewContext.tsx +8 -4
- package/src/context/ConfigContext.tsx +22 -3
- package/src/context/DashboardActionContext.tsx +2 -3
- package/src/context/FormModalContext.tsx +2 -3
- package/src/context/LocaleContext.tsx +1 -1
- package/src/context/One2manyContext.tsx +3 -4
- package/src/helpers/containerHelper.ts +1 -1
- package/src/helpers/dayjs.ts +21 -0
- package/src/helpers/dynamicColumnsHelper.ts +2 -2
- package/src/helpers/iconMapper.ts +5 -5
- package/src/helpers/logInfoHelper.tsx +8 -6
- package/src/helpers/timeHelper.ts +2 -2
- package/src/helpers/{treeHelper.ts → treeHelper.tsx} +25 -4
- package/src/hooks/useEffectDebugger.ts +2 -2
- package/src/hooks/useExport.ts +9 -8
- package/src/hooks/useWindowDimensions.ts +1 -1
- package/src/index.ts +1 -1
- package/src/locales/ca_ES.tsx +1 -0
- package/src/locales/en_US.tsx +1 -0
- package/src/locales/es_ES.tsx +2 -0
- package/src/stories/Char.stories.tsx +27 -0
- package/src/stories/Time.stories.tsx +2 -3
- package/src/stories/Utils.stories.tsx +1 -3
- package/src/stories/containers/Group.stories.tsx +2 -3
- package/src/stories/containers/Notebook.stories.tsx +0 -6
- package/src/stories/custom/Avatar.stories.tsx +2 -6
- package/src/stories/custom/Comments.stories.tsx +32 -25
- package/src/stories/forms/FormWithLinks.stories.tsx +1 -2
- package/src/stories/forms/ModContractForm.stories.tsx +1 -0
- package/src/stories/forms/PreferencesForm.stories.tsx +1 -2
- package/src/stories/mocks/mockProvider.ts +5 -2
- package/src/stories/mocks/models/attachment.ts +1 -2
- package/src/stories/mocks/models/butlleti.ts +249 -297
- package/src/stories/mocks/models/company.ts +2 -4
- package/src/stories/mocks/models/cups.ts +18 -1
- package/src/stories/mocks/models/document.ts +2 -4
- package/src/stories/mocks/models/factura.ts +14 -28
- package/src/stories/mocks/models/form_with_gridfiber.ts +2 -4
- package/src/stories/mocks/models/hist_autoconsum.ts +2 -4
- package/src/stories/mocks/models/lead.ts +8 -16
- package/src/stories/mocks/models/modcontractual.ts +229 -83
- package/src/stories/mocks/models/partner.ts +20 -40
- package/src/stories/mocks/models/polissa.ts +6 -12
- package/src/stories/mocks/models/res_partner_category.ts +3 -3
- package/src/stories/mocks/models/signatura.ts +135 -195
- package/src/stories/mocks/models/switching.ts +2 -4
- package/src/stories/ui/GoToResourceModal.stories.tsx +3 -2
- package/src/stories/views/Tree.stories.jsx +3 -5
- package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +15 -30
- package/src/types/index.ts +2 -1
- package/src/ui/ConfirmDialog.tsx +1 -1
- package/src/ui/GoToResourceModal.tsx +8 -7
- package/src/ui/TitleHeader.tsx +8 -1
- package/src/views/ActionView.tsx +41 -30
- package/src/views/CurrentTabContent.tsx +1 -1
- package/src/views/TabContent.tsx +1 -1
- package/src/views/TabSelector.tsx +1 -1
- package/src/views/actionViews/DashboardActionView.tsx +7 -2
- package/src/views/actionViews/GraphActionView.tsx +1 -1
- package/src/views/actionViews/TreeActionView.tsx +2 -2
- package/src/widgets/WidgetFactory.tsx +1 -1
- package/src/widgets/base/Button.tsx +1 -1
- package/src/widgets/base/Float.tsx +0 -1
- package/src/widgets/base/FloatTime.tsx +1 -1
- package/src/widgets/base/Integer.tsx +0 -1
- package/src/widgets/base/Reference.tsx +1 -1
- package/src/widgets/base/ReferenceTree.tsx +1 -1
- package/src/widgets/base/Separator.tsx +3 -4
- package/src/widgets/base/Time.tsx +5 -7
- package/src/widgets/base/many2one/Many2oneSuffixModal.tsx +2 -2
- package/src/widgets/base/one2many/One2many.tsx +2 -2
- package/src/widgets/base/one2many/One2manyInput.tsx +6 -5
- package/src/widgets/custom/Avatar.tsx +15 -7
- package/src/widgets/custom/Comments.tsx +4 -7
- package/src/widgets/custom/Markdown.tsx +18 -8
- package/src/widgets/custom/MultiCheckbox.tsx +1 -1
- package/src/widgets/custom/Radio.tsx +2 -4
- package/src/widgets/custom/Steps.tsx +10 -9
- package/src/widgets/custom/Switch.tsx +1 -5
- package/src/widgets/custom/Tags.tsx +1 -1
- package/src/widgets/modals/FormModal.tsx +5 -2
- package/src/widgets/modals/SearchModal.tsx +33 -33
- package/src/widgets/modals/TranslationModal.tsx +3 -3
- package/src/widgets/views/Dashboard/Dashboard.tsx +3 -3
- package/src/widgets/views/Dashboard/DashboardTree.tsx +3 -1
- package/src/widgets/views/DashboardGrid/DashboardGrid.tsx +3 -3
- package/src/widgets/views/DashboardGrid/DashboardGridItem.tsx +2 -2
- package/src/widgets/views/Form.tsx +2 -2
- package/src/widgets/views/Graph/Graph.tsx +1 -1
- package/src/widgets/views/Graph/GraphChart.tsx +2 -2
- package/src/widgets/views/Graph/GraphDefaults.ts +3 -3
- package/src/widgets/views/Graph/useGraphData.tsx +1 -1
- package/src/widgets/views/SearchTree.tsx +23 -13
- package/src/widgets/views/Tree/Tree.tsx +295 -0
- package/src/widgets/views/Tree/index.ts +1 -0
- package/src/widgets/views/Tree/treeComponents.tsx +276 -0
- package/src/widgets/views/searchFilter/DateTimeRangePicker.tsx +34 -8
- package/src/widgets/views/searchFilter/SearchBottomBar.tsx +4 -8
- package/src/widgets/views/searchFilter/SearchField.tsx +5 -1
- package/src/widgets/views/searchFilter/SearchFilter.tsx +3 -2
- package/src/widgets/views/searchFilter/SearchParams.tsx +7 -4
- package/src/widgets/views/Tree.tsx +0 -412
|
@@ -9,10 +9,7 @@ export const Switch = (props: WidgetProps) => {
|
|
|
9
9
|
const { id, readOnly, required } = ooui;
|
|
10
10
|
|
|
11
11
|
return (
|
|
12
|
-
<Field
|
|
13
|
-
{...props}
|
|
14
|
-
valuePropName="checked"
|
|
15
|
-
>
|
|
12
|
+
<Field {...props} valuePropName="checked">
|
|
16
13
|
<SwitchInput id={id} readOnly={readOnly} required={required} />
|
|
17
14
|
</Field>
|
|
18
15
|
);
|
|
@@ -21,7 +18,6 @@ export const Switch = (props: WidgetProps) => {
|
|
|
21
18
|
const SwitchInput = (props: any) => {
|
|
22
19
|
const { required, readOnly, ...restProps } = props;
|
|
23
20
|
|
|
24
|
-
|
|
25
21
|
return (
|
|
26
22
|
<div className="flex flex-row">
|
|
27
23
|
<AntdSwitch disabled={readOnly} {...restProps} />
|
|
@@ -78,7 +78,7 @@ export const TagsInput = (props: TagsInputProps) => {
|
|
|
78
78
|
const optionsRead = await ConnectionProvider.getHandler().search({
|
|
79
79
|
model: relation,
|
|
80
80
|
params,
|
|
81
|
-
|
|
81
|
+
fieldsToRetrieve: [field],
|
|
82
82
|
context: { ...getContext?.(), ...context },
|
|
83
83
|
});
|
|
84
84
|
const options = optionsRead.map((item: any) => {
|
|
@@ -26,20 +26,22 @@ export const FormModal = (props: FormModalProps) => {
|
|
|
26
26
|
...rest
|
|
27
27
|
} = props;
|
|
28
28
|
|
|
29
|
+
const { model } = rest;
|
|
30
|
+
|
|
29
31
|
const { modalWidth } = useWindowDimensions();
|
|
30
32
|
const [formTitle, setFormTitle] = useState<string>(title!);
|
|
31
33
|
const [isFavourite, setIsFavourite] = useState(false);
|
|
32
34
|
const [currentShortcutId, setCurrentShortcutId] = useState<number>();
|
|
35
|
+
const { action_id, res_id, action_type, view_id } = actionData || {};
|
|
33
36
|
|
|
34
37
|
useEffect(() => {
|
|
35
38
|
if (isMenuAction) {
|
|
36
39
|
checkFavourite();
|
|
37
40
|
}
|
|
41
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
42
|
}, [actionData, isMenuAction]);
|
|
39
43
|
|
|
40
44
|
async function checkFavourite() {
|
|
41
|
-
const { action_id, res_id, action_type, view_id } = actionData;
|
|
42
|
-
|
|
43
45
|
const result = await ConnectionProvider.getHandler().isShortcutFavorite({
|
|
44
46
|
action_id,
|
|
45
47
|
action_type,
|
|
@@ -109,6 +111,7 @@ export const FormModal = (props: FormModalProps) => {
|
|
|
109
111
|
maskClosable={false}
|
|
110
112
|
>
|
|
111
113
|
<Form
|
|
114
|
+
key={`${model}-${id}-${action_id}-${res_id}-${action_type}-${view_id}-${title}`}
|
|
112
115
|
id={id}
|
|
113
116
|
showFooter={true}
|
|
114
117
|
insideButtonModal={buttonModal}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useState, useContext } from "react";
|
|
2
2
|
import { Modal, Button, Divider, Row, Space } from "antd";
|
|
3
3
|
import { FormModal } from "./FormModal";
|
|
4
4
|
import SearchTree from "@/widgets/views/SearchTree";
|
|
@@ -65,9 +65,7 @@ export const SearchModal = (props: SearchSelectionProps) => {
|
|
|
65
65
|
treeScrollY={modalHeight * 0.3}
|
|
66
66
|
domain={domain}
|
|
67
67
|
parentContext={context}
|
|
68
|
-
onChangeSelectedRowKeys={
|
|
69
|
-
setSelectedRowKeys(selectedRowKeys);
|
|
70
|
-
}}
|
|
68
|
+
onChangeSelectedRowKeys={setSelectedRowKeys}
|
|
71
69
|
/>
|
|
72
70
|
<Divider />
|
|
73
71
|
<Row justify="end">
|
|
@@ -98,33 +96,35 @@ export const SearchModal = (props: SearchSelectionProps) => {
|
|
|
98
96
|
);
|
|
99
97
|
};
|
|
100
98
|
|
|
101
|
-
return (
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
99
|
+
return (
|
|
100
|
+
<>
|
|
101
|
+
<Modal
|
|
102
|
+
title={t("search")}
|
|
103
|
+
centered
|
|
104
|
+
width={modalWidth}
|
|
105
|
+
open={visible && !showCreateModal}
|
|
106
|
+
closable={true}
|
|
107
|
+
onCancel={onCloseModal}
|
|
108
|
+
footer={null}
|
|
109
|
+
destroyOnClose
|
|
110
|
+
maskClosable={false}
|
|
111
|
+
>
|
|
112
|
+
{content()}
|
|
113
|
+
</Modal>
|
|
114
|
+
<FormModal
|
|
115
|
+
model={model}
|
|
116
|
+
visible={showCreateModal}
|
|
117
|
+
parentContext={context}
|
|
118
|
+
onSubmitSucceed={(id?: number) => {
|
|
119
|
+
setShowCreateModal(false);
|
|
120
|
+
onCloseModal();
|
|
121
|
+
onSelectValues([id!]);
|
|
122
|
+
}}
|
|
123
|
+
onCancel={() => {
|
|
124
|
+
setShowCreateModal(false);
|
|
125
|
+
onCloseModal();
|
|
126
|
+
}}
|
|
127
|
+
/>
|
|
128
|
+
</>
|
|
129
|
+
);
|
|
130
130
|
};
|
|
@@ -65,7 +65,7 @@ export const TranslationModal = (props: TranslationModalProps) => {
|
|
|
65
65
|
async function getLangs() {
|
|
66
66
|
const results: any[] = (await ConnectionProvider.getHandler().search({
|
|
67
67
|
params: [["translatable", "=", "1"]],
|
|
68
|
-
|
|
68
|
+
fieldsToRetrieve: ["code", "name"],
|
|
69
69
|
model: "res.lang",
|
|
70
70
|
})) as any;
|
|
71
71
|
|
|
@@ -185,7 +185,7 @@ export const TranslationModal = (props: TranslationModalProps) => {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
return (
|
|
188
|
-
|
|
188
|
+
<Modal
|
|
189
189
|
title={t("translate")}
|
|
190
190
|
centered
|
|
191
191
|
width={modalWidth}
|
|
@@ -197,6 +197,6 @@ export const TranslationModal = (props: TranslationModalProps) => {
|
|
|
197
197
|
maskClosable={false}
|
|
198
198
|
>
|
|
199
199
|
{content()}
|
|
200
|
-
</Modal>
|
|
200
|
+
</Modal>
|
|
201
201
|
);
|
|
202
202
|
};
|
|
@@ -156,7 +156,7 @@ function Dashboard(props: DashboardProps, ref: any) {
|
|
|
156
156
|
|
|
157
157
|
const differences = itemPositions.filter((itemPosition) => {
|
|
158
158
|
const dashboardItem = dashboardItems.find(
|
|
159
|
-
(dashboardItem) => dashboardItem.id === itemPosition.id
|
|
159
|
+
(dashboardItem) => dashboardItem.id === itemPosition.id,
|
|
160
160
|
);
|
|
161
161
|
if (!dashboardItem) {
|
|
162
162
|
return false;
|
|
@@ -265,7 +265,7 @@ function Dashboard(props: DashboardProps, ref: any) {
|
|
|
265
265
|
<Graph
|
|
266
266
|
view_id={
|
|
267
267
|
views.filter(
|
|
268
|
-
(view: [number, string]) => view[1] === "graph"
|
|
268
|
+
(view: [number, string]) => view[1] === "graph",
|
|
269
269
|
)[0][0]
|
|
270
270
|
}
|
|
271
271
|
model={model}
|
|
@@ -283,7 +283,7 @@ function Dashboard(props: DashboardProps, ref: any) {
|
|
|
283
283
|
domain={domain}
|
|
284
284
|
view_id={
|
|
285
285
|
views.filter(
|
|
286
|
-
(view: [number, string]) => view[1] === "tree"
|
|
286
|
+
(view: [number, string]) => view[1] === "tree",
|
|
287
287
|
)[0][0]
|
|
288
288
|
}
|
|
289
289
|
onRowClicked={(record) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React, { useEffect, useState, useRef } from "react";
|
|
2
2
|
import { Alert, Spin } from "antd";
|
|
3
3
|
|
|
4
|
-
import Tree from "@/widgets/views/Tree";
|
|
4
|
+
import { Tree } from "@/widgets/views/Tree";
|
|
5
5
|
import { FormView, TreeView } from "@/types/index";
|
|
6
6
|
import ConnectionProvider from "@/ConnectionProvider";
|
|
7
7
|
|
|
@@ -116,6 +116,7 @@ function DashboardTree(props: Props) {
|
|
|
116
116
|
if (visible) {
|
|
117
117
|
fetchResults();
|
|
118
118
|
}
|
|
119
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
119
120
|
}, [page, offset, initialFetchDone, visible]);
|
|
120
121
|
|
|
121
122
|
const fetchData = async (type: "action" | "model") => {
|
|
@@ -176,6 +177,7 @@ function DashboardTree(props: Props) {
|
|
|
176
177
|
} else if (model) {
|
|
177
178
|
fetchData("model");
|
|
178
179
|
}
|
|
180
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
179
181
|
}, [action, model]);
|
|
180
182
|
|
|
181
183
|
const onRowClickedHandler = (record: any) => {
|
|
@@ -16,7 +16,7 @@ export const DashboardGrid = (props: DashboardGridProps) => {
|
|
|
16
16
|
| boolean
|
|
17
17
|
| React.ReactChild
|
|
18
18
|
| React.ReactFragment
|
|
19
|
-
| React.ReactPortal
|
|
19
|
+
| React.ReactPortal,
|
|
20
20
|
) => {
|
|
21
21
|
const { parms, id } = (child as any).props;
|
|
22
22
|
return (
|
|
@@ -24,7 +24,7 @@ export const DashboardGrid = (props: DashboardGridProps) => {
|
|
|
24
24
|
{child}
|
|
25
25
|
</div>
|
|
26
26
|
);
|
|
27
|
-
}
|
|
27
|
+
},
|
|
28
28
|
);
|
|
29
29
|
|
|
30
30
|
return (
|
|
@@ -43,7 +43,7 @@ export const DashboardGrid = (props: DashboardGridProps) => {
|
|
|
43
43
|
w: item.w,
|
|
44
44
|
h: item.h,
|
|
45
45
|
};
|
|
46
|
-
})
|
|
46
|
+
}),
|
|
47
47
|
);
|
|
48
48
|
}}
|
|
49
49
|
>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { DashboardGridItemProps } from "./DashboardGridItem.types";
|
|
3
2
|
import { ExportOutlined } from "@ant-design/icons";
|
|
4
3
|
import { Row, Col, Typography, theme } from "antd";
|
|
4
|
+
import ErrorBoundary from "antd/es/alert/ErrorBoundary";
|
|
5
5
|
const { useToken } = theme;
|
|
6
6
|
|
|
7
7
|
const { Text } = Typography;
|
|
@@ -56,7 +56,7 @@ export const DashboardGridItem = (props: DashboardGridItemProps) => {
|
|
|
56
56
|
</Col>
|
|
57
57
|
)}
|
|
58
58
|
</Row>
|
|
59
|
-
{children}
|
|
59
|
+
<ErrorBoundary>{children}</ErrorBoundary>
|
|
60
60
|
</div>
|
|
61
61
|
);
|
|
62
62
|
};
|
|
@@ -555,7 +555,7 @@ function Form(props: FormProps, ref: any) {
|
|
|
555
555
|
["res_model", "=", model],
|
|
556
556
|
["res_id", "=", getCurrentId()!],
|
|
557
557
|
],
|
|
558
|
-
|
|
558
|
+
fieldsToRetrieve: ["id", "name"],
|
|
559
559
|
context: getContext(),
|
|
560
560
|
model: "ir.attachment",
|
|
561
561
|
});
|
|
@@ -1014,7 +1014,7 @@ function Form(props: FormProps, ref: any) {
|
|
|
1014
1014
|
let mustBlockButtons = false;
|
|
1015
1015
|
|
|
1016
1016
|
try {
|
|
1017
|
-
if (formHasChanges() || getCurrentId() === undefined) {
|
|
1017
|
+
if (!readOnly && (formHasChanges() || getCurrentId() === undefined)) {
|
|
1018
1018
|
mustBlockButtons = true;
|
|
1019
1019
|
updateOperationInProgress(true);
|
|
1020
1020
|
if (submitMode === "2many") {
|
|
@@ -36,7 +36,7 @@ const GraphComp = (props: GraphProps, ref: any) => {
|
|
|
36
36
|
const [graphOoui, setGraphOoui] = useState<GraphOoui>();
|
|
37
37
|
const [graphXml, setGraphXml] = useState<string>();
|
|
38
38
|
const actionViewContext = useContext(
|
|
39
|
-
ActionViewContext
|
|
39
|
+
ActionViewContext,
|
|
40
40
|
) as ActionViewContextType;
|
|
41
41
|
const { setGraphIsLoading = undefined } = actionViewContext || {};
|
|
42
42
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { useContext } from "react";
|
|
2
2
|
import { Line, Column, Pie } from "@ant-design/plots";
|
|
3
3
|
import GraphDefaults from "./GraphDefaults";
|
|
4
4
|
import { useGraphData } from "./useGraphData";
|
|
@@ -61,7 +61,7 @@ export const GraphChart = (props: GraphChartProps) => {
|
|
|
61
61
|
"es-ES",
|
|
62
62
|
{
|
|
63
63
|
useGrouping: true,
|
|
64
|
-
}
|
|
64
|
+
},
|
|
65
65
|
)}`}
|
|
66
66
|
</p>
|
|
67
67
|
<Chart
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import dayjs from "dayjs";
|
|
1
|
+
import dayjs from "@/helpers/dayjs";
|
|
2
2
|
|
|
3
3
|
const formatter = (graphType: "pie" | "default" | "barGrouped") => {
|
|
4
4
|
return (object: any) => {
|
|
@@ -25,7 +25,7 @@ const axisFormatter = (value: any) => {
|
|
|
25
25
|
return value;
|
|
26
26
|
}
|
|
27
27
|
return dayjs(value, (dateFormats.input as any)[dateType]).format(
|
|
28
|
-
(dateFormats.output as any)[dateType]
|
|
28
|
+
(dateFormats.output as any)[dateType],
|
|
29
29
|
);
|
|
30
30
|
} else {
|
|
31
31
|
return value;
|
|
@@ -157,7 +157,7 @@ function getDateType(dateString: string): string | null {
|
|
|
157
157
|
const isValidFormat = dayjs(
|
|
158
158
|
dateString,
|
|
159
159
|
(dateFormats.input as any)[format],
|
|
160
|
-
true
|
|
160
|
+
true,
|
|
161
161
|
).isValid();
|
|
162
162
|
if (isValidFormat) {
|
|
163
163
|
return format;
|
|
@@ -5,11 +5,13 @@ import React, {
|
|
|
5
5
|
useContext,
|
|
6
6
|
forwardRef,
|
|
7
7
|
useImperativeHandle,
|
|
8
|
+
useMemo,
|
|
9
|
+
useCallback,
|
|
8
10
|
} from "react";
|
|
9
11
|
import { Alert, Spin } from "antd";
|
|
10
12
|
|
|
11
13
|
import SearchFilter from "@/widgets/views/searchFilter/SearchFilter";
|
|
12
|
-
import Tree from "@/widgets/views/Tree";
|
|
14
|
+
import { Tree } from "@/widgets/views/Tree";
|
|
13
15
|
import { FormView, TreeView } from "@/types/index";
|
|
14
16
|
import ConnectionProvider from "@/ConnectionProvider";
|
|
15
17
|
|
|
@@ -80,12 +82,12 @@ function SearchTree(props: Props, ref: any) {
|
|
|
80
82
|
const { height } = useWindowDimensions();
|
|
81
83
|
|
|
82
84
|
const contentRootContext = useContext(
|
|
83
|
-
ContentRootContext
|
|
85
|
+
ContentRootContext,
|
|
84
86
|
) as ContentRootContextType;
|
|
85
87
|
const { processAction } = contentRootContext || {};
|
|
86
88
|
|
|
87
89
|
const actionViewContext = useContext(
|
|
88
|
-
ActionViewContext
|
|
90
|
+
ActionViewContext,
|
|
89
91
|
) as ActionViewContextType;
|
|
90
92
|
const {
|
|
91
93
|
setResults: setResultsActionView = undefined,
|
|
@@ -109,6 +111,14 @@ function SearchTree(props: Props, ref: any) {
|
|
|
109
111
|
setLimit = undefined,
|
|
110
112
|
} = (rootTree ? actionViewContext : {}) || {};
|
|
111
113
|
|
|
114
|
+
const changeSelectedRowKeys = useCallback(
|
|
115
|
+
(newSelectedRowKeys: any[]) => {
|
|
116
|
+
setSelectedRowItems?.(newSelectedRowKeys.map((id: number) => ({ id })));
|
|
117
|
+
onChangeSelectedRowKeys?.(newSelectedRowKeys);
|
|
118
|
+
},
|
|
119
|
+
[onChangeSelectedRowKeys, setSelectedRowItems],
|
|
120
|
+
);
|
|
121
|
+
|
|
112
122
|
const {
|
|
113
123
|
submit,
|
|
114
124
|
clear,
|
|
@@ -170,6 +180,7 @@ function SearchTree(props: Props, ref: any) {
|
|
|
170
180
|
searchNameGetDoneRef.current = false;
|
|
171
181
|
fetchResults();
|
|
172
182
|
}
|
|
183
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
173
184
|
}, [page, offset, initialFetchDone, visible, nameSearch, treeView]);
|
|
174
185
|
|
|
175
186
|
const fetchData = async () => {
|
|
@@ -218,6 +229,7 @@ function SearchTree(props: Props, ref: any) {
|
|
|
218
229
|
|
|
219
230
|
useEffect(() => {
|
|
220
231
|
fetchData();
|
|
232
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
221
233
|
}, [model]);
|
|
222
234
|
|
|
223
235
|
const onSearchTreeLimitChange = (newLimit: number) => {
|
|
@@ -269,11 +281,6 @@ function SearchTree(props: Props, ref: any) {
|
|
|
269
281
|
});
|
|
270
282
|
};
|
|
271
283
|
|
|
272
|
-
function changeSelectedRowKeys(selectedRowKeys: any[]) {
|
|
273
|
-
setSelectedRowItems?.(selectedRowKeys.map((id: number) => ({ id })));
|
|
274
|
-
onChangeSelectedRowKeys?.(selectedRowKeys);
|
|
275
|
-
}
|
|
276
|
-
|
|
277
284
|
async function selectAllRecords() {
|
|
278
285
|
const allIds = await getAllIds();
|
|
279
286
|
setSelectedRowItems?.(allIds.map((id: number) => ({ id })));
|
|
@@ -284,9 +291,14 @@ function SearchTree(props: Props, ref: any) {
|
|
|
284
291
|
if (treeView?.isExpandable) {
|
|
285
292
|
return height - 160;
|
|
286
293
|
}
|
|
287
|
-
return height - (searchFilterHeight +
|
|
294
|
+
return height - (searchFilterHeight + 240);
|
|
288
295
|
}
|
|
289
296
|
|
|
297
|
+
const selectedRowKeys = useMemo(
|
|
298
|
+
() => selectedRowItems?.map((item) => item.id),
|
|
299
|
+
[selectedRowItems],
|
|
300
|
+
);
|
|
301
|
+
|
|
290
302
|
const content = () => {
|
|
291
303
|
if (!treeView || !formView) {
|
|
292
304
|
return null;
|
|
@@ -324,10 +336,8 @@ function SearchTree(props: Props, ref: any) {
|
|
|
324
336
|
scrollY={treeScrollY || calculateTableHeight()}
|
|
325
337
|
colorsForResults={colorsForResults}
|
|
326
338
|
statusForResults={statusForResults}
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
onChange: changeSelectedRowKeys,
|
|
330
|
-
}}
|
|
339
|
+
selectedRowKeys={selectedRowKeys}
|
|
340
|
+
onRowSelectionChange={changeSelectedRowKeys}
|
|
331
341
|
sorter={sorter}
|
|
332
342
|
onChangeSort={changeSort}
|
|
333
343
|
onFetchChildrenForRecord={
|