@gisce/react-ooui 1.5.1 → 1.5.2-alpha.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/package.json +73 -42
- package/src/actionbar/FormActionBar.tsx +1 -1
- package/src/actionbar/TreeActionBar.tsx +1 -1
- package/src/common/DatePicker.tsx +2 -2
- package/src/common/SelectAllRecordsRow.tsx +4 -5
- package/src/context/ContentRootContext.tsx +61 -54
- package/src/context/TabManagerContext.tsx +3 -4
- package/src/helpers/dynamicColumnsHelper.ts +1 -1
- package/src/helpers/filesHelper.ts +7 -7
- package/src/helpers/formHelper.ts +23 -24
- package/src/helpers/one2manyHelper.ts +6 -6
- package/src/helpers/searchHelper.ts +8 -5
- package/src/helpers/treeHelper.ts +7 -7
- package/src/helpers/viewHelper.ts +2 -2
- package/src/hooks/useExport.ts +2 -3
- package/src/hooks/useSearch.ts +8 -8
- package/src/index.ts +4 -0
- package/src/stories/Binary.stories.tsx +0 -3
- package/src/stories/Boolean.stories.tsx +0 -3
- package/src/stories/Button.stories.tsx +8 -14
- package/src/stories/Char.stories.tsx +0 -3
- package/src/stories/FiberGrid.stories.tsx +0 -3
- package/src/stories/Float.stories.tsx +0 -3
- package/src/stories/FloatTime.stories.tsx +0 -3
- package/src/stories/Image.stories.tsx +0 -3
- package/src/stories/Integer.stories.tsx +0 -3
- package/src/stories/Label.stories.tsx +0 -3
- package/src/stories/Many2one.stories.tsx +0 -3
- package/src/stories/One2many.stories.tsx +4 -11
- package/src/stories/ProgressBar.stories.tsx +0 -3
- package/src/stories/Reference.stories.tsx +0 -3
- package/src/stories/Selection.stories.tsx +0 -3
- package/src/stories/Separator.stories.tsx +3 -7
- package/src/stories/Text.stories.tsx +0 -3
- package/src/stories/containers/Group.stories.tsx +0 -5
- package/src/stories/containers/NewLine.stories.tsx +0 -4
- package/src/stories/containers/Notebook.stories.tsx +0 -5
- package/src/stories/custom/Avatar.stories.tsx +0 -1
- package/src/stories/custom/ButtonGroup.stories.tsx +36 -23
- package/src/stories/custom/CodeEditor.stories.tsx +1 -4
- package/src/stories/custom/Indicator.stories.tsx +3 -11
- package/src/stories/custom/Markdown.stories.tsx +2 -6
- package/src/stories/custom/MultiCheckbox.stories.tsx +20 -15
- package/src/stories/custom/Radio.stories.tsx +13 -16
- package/src/stories/custom/Steps.stories.tsx +7 -5
- package/src/stories/custom/Switch.stories.tsx +0 -3
- package/src/stories/custom/Tag.stories.tsx +17 -11
- package/src/stories/custom/Tags.stories.tsx +20 -16
- package/src/stories/forms/PreferencesForm.stories.tsx +0 -4
- package/src/stories/ui/ActionBar.stories.tsx +0 -3
- package/src/stories/ui/FavouriteButton.stories.tsx +0 -3
- package/src/stories/ui/GoToResourceModal.stories.tsx +0 -3
- package/src/stories/views/SearchTree.stories.tsx +43 -89
- package/src/stories/views/Tab.stories.tsx +0 -3
- package/src/stories/views/TabsAndContent.stories.tsx +0 -3
- package/src/stories/views/Tree.stories.jsx +0 -4
- package/src/stories/views/searchFilter/DateRangePicker.stories.tsx +0 -3
- package/src/stories/views/searchFilter/DateTimeRangePicker.stories.tsx +0 -3
- package/src/stories/views/searchFilter/PairFields.stories.tsx +0 -3
- package/src/stories/views/searchFilter/SearchFilter.stories.tsx +0 -4
- package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +0 -4
- package/src/types/index.ts +94 -43
- package/src/ui/FavouriteButton.tsx +2 -3
- package/src/views/ActionView.tsx +12 -11
- package/src/views/RootView.tsx +5 -6
- package/src/widgets/base/Binary.tsx +2 -2
- package/src/widgets/base/Boolean.tsx +1 -2
- package/src/widgets/base/Float.tsx +1 -1
- package/src/widgets/base/Integer.tsx +2 -2
- package/src/widgets/base/Label.tsx +9 -9
- package/src/widgets/base/LinkInput.tsx +6 -1
- package/src/widgets/base/MultiSelection.tsx +1 -2
- package/src/widgets/base/Selection.tsx +11 -5
- package/src/widgets/base/Time.tsx +13 -12
- package/src/widgets/base/many2one/Many2one.tsx +7 -8
- package/src/widgets/base/many2one/Many2oneSuffix.tsx +23 -12
- package/src/widgets/base/one2many/One2manyInput.tsx +13 -14
- package/src/widgets/containers/Notebook.tsx +9 -2
- package/src/widgets/custom/ButtonGroup.tsx +13 -10
- package/src/widgets/custom/CodeEditor.tsx +7 -3
- package/src/widgets/custom/Comments.tsx +76 -70
- package/src/widgets/custom/Indicator.tsx +1 -2
- package/src/widgets/custom/MultiCheckbox.tsx +2 -2
- package/src/widgets/custom/Tag.tsx +20 -16
- package/src/widgets/custom/Tags.tsx +3 -3
- package/src/widgets/custom/Timeline.tsx +6 -6
- package/src/widgets/views/Dashboard/DashboardTree.tsx +2 -2
- package/src/widgets/views/DashboardGrid/DashboardGrid.types.ts +1 -1
- package/src/widgets/views/Form.tsx +9 -10
- package/src/widgets/views/Graph/GraphIndicator.tsx +7 -7
- package/src/widgets/views/SearchTree.tsx +2 -2
- package/src/widgets/views/Tree.tsx +15 -16
- package/src/widgets/views/searchFilter/DateTimeRangePicker.tsx +1 -3
- package/dist/ConnectionProvider.d.ts +0 -7
- package/dist/ConnectionProvider.d.ts.map +0 -1
- package/dist/actionbar/ActionButton.d.ts +0 -13
- package/dist/actionbar/ActionButton.d.ts.map +0 -1
- package/dist/actionbar/AttachmentsButton.d.ts +0 -12
- package/dist/actionbar/AttachmentsButton.d.ts.map +0 -1
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts +0 -19
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts.map +0 -1
- package/dist/actionbar/ButtonWithBadge.d.ts +0 -8
- package/dist/actionbar/ButtonWithBadge.d.ts.map +0 -1
- package/dist/actionbar/ChangeViewButton.d.ts +0 -13
- package/dist/actionbar/ChangeViewButton.d.ts.map +0 -1
- package/dist/actionbar/DashboardActionBar.d.ts +0 -4
- package/dist/actionbar/DashboardActionBar.d.ts.map +0 -1
- package/dist/actionbar/DropdownButton.d.ts +0 -12
- package/dist/actionbar/DropdownButton.d.ts.map +0 -1
- package/dist/actionbar/FormActionBar.d.ts +0 -6
- package/dist/actionbar/FormActionBar.d.ts.map +0 -1
- package/dist/actionbar/GraphActionBar.d.ts +0 -6
- package/dist/actionbar/GraphActionBar.d.ts.map +0 -1
- package/dist/actionbar/NewButton.d.ts +0 -7
- package/dist/actionbar/NewButton.d.ts.map +0 -1
- package/dist/actionbar/SearchBar.d.ts +0 -9
- package/dist/actionbar/SearchBar.d.ts.map +0 -1
- package/dist/actionbar/TreeActionBar.d.ts +0 -9
- package/dist/actionbar/TreeActionBar.d.ts.map +0 -1
- package/dist/common/ButtonWithTooltip.d.ts +0 -8
- package/dist/common/ButtonWithTooltip.d.ts.map +0 -1
- package/dist/common/DatePicker.d.ts +0 -20
- package/dist/common/DatePicker.d.ts.map +0 -1
- package/dist/common/Field.d.ts +0 -14
- package/dist/common/Field.d.ts.map +0 -1
- package/dist/common/SelectAllRecordsRow.d.ts +0 -10
- package/dist/common/SelectAllRecordsRow.d.ts.map +0 -1
- package/dist/context/ActionViewContext.d.ts +0 -65
- package/dist/context/ActionViewContext.d.ts.map +0 -1
- package/dist/context/ConfigContext.d.ts +0 -7
- package/dist/context/ConfigContext.d.ts.map +0 -1
- package/dist/context/ContentRootContext.d.ts +0 -19
- package/dist/context/ContentRootContext.d.ts.map +0 -1
- package/dist/context/DashboardActionContext.d.ts +0 -19
- package/dist/context/DashboardActionContext.d.ts.map +0 -1
- package/dist/context/FormContext.d.ts +0 -35
- package/dist/context/FormContext.d.ts.map +0 -1
- package/dist/context/FormModalContext.d.ts +0 -11
- package/dist/context/FormModalContext.d.ts.map +0 -1
- package/dist/context/LocaleContext.d.ts +0 -14
- package/dist/context/LocaleContext.d.ts.map +0 -1
- package/dist/context/One2manyContext.d.ts +0 -17
- package/dist/context/One2manyContext.d.ts.map +0 -1
- package/dist/context/TabManagerContext.d.ts +0 -50
- package/dist/context/TabManagerContext.d.ts.map +0 -1
- package/dist/helpers/containerHelper.d.ts +0 -22
- package/dist/helpers/containerHelper.d.ts.map +0 -1
- package/dist/helpers/dynamicColumnsHelper.d.ts +0 -8
- package/dist/helpers/dynamicColumnsHelper.d.ts.map +0 -1
- package/dist/helpers/errorHelper.d.ts +0 -6
- package/dist/helpers/errorHelper.d.ts.map +0 -1
- package/dist/helpers/filesHelper.d.ts +0 -8
- package/dist/helpers/filesHelper.d.ts.map +0 -1
- package/dist/helpers/formHelper.d.ts +0 -36
- package/dist/helpers/formHelper.d.ts.map +0 -1
- package/dist/helpers/iconMapper.d.ts +0 -13
- package/dist/helpers/iconMapper.d.ts.map +0 -1
- package/dist/helpers/logInfoHelper.d.ts +0 -3
- package/dist/helpers/logInfoHelper.d.ts.map +0 -1
- package/dist/helpers/one2manyHelper.d.ts +0 -37
- package/dist/helpers/one2manyHelper.d.ts.map +0 -1
- package/dist/helpers/searchHelper.d.ts +0 -6
- package/dist/helpers/searchHelper.d.ts.map +0 -1
- package/dist/helpers/timeHelper.d.ts +0 -4
- package/dist/helpers/timeHelper.d.ts.map +0 -1
- package/dist/helpers/treeHelper.d.ts +0 -23
- package/dist/helpers/treeHelper.d.ts.map +0 -1
- package/dist/helpers/viewHelper.d.ts +0 -10
- package/dist/helpers/viewHelper.d.ts.map +0 -1
- package/dist/hooks/useExport.d.ts +0 -44
- package/dist/hooks/useExport.d.ts.map +0 -1
- package/dist/hooks/useSearch.d.ts +0 -56
- package/dist/hooks/useSearch.d.ts.map +0 -1
- package/dist/hooks/useWindowDimensions.d.ts +0 -7
- package/dist/hooks/useWindowDimensions.d.ts.map +0 -1
- package/dist/index.d.ts +0 -57
- package/dist/index.d.ts.map +0 -1
- package/dist/locales/ca_ES.d.ts +0 -93
- package/dist/locales/ca_ES.d.ts.map +0 -1
- package/dist/locales/en_US.d.ts +0 -93
- package/dist/locales/en_US.d.ts.map +0 -1
- package/dist/locales/es_ES.d.ts +0 -93
- package/dist/locales/es_ES.d.ts.map +0 -1
- package/dist/react-ooui.es.js +0 -11763
- package/dist/react-ooui.es.js.map +0 -1
- package/dist/react-ooui.umd.js +0 -42
- package/dist/react-ooui.umd.js.map +0 -1
- package/dist/style.css +0 -1
- package/dist/types/index.d.ts +0 -256
- package/dist/types/index.d.ts.map +0 -1
- package/dist/ui/ActionErrorDialog.d.ts +0 -3
- package/dist/ui/ActionErrorDialog.d.ts.map +0 -1
- package/dist/ui/ConfirmDialog.d.ts +0 -7
- package/dist/ui/ConfirmDialog.d.ts.map +0 -1
- package/dist/ui/ErrorAlert.d.ts +0 -6
- package/dist/ui/ErrorAlert.d.ts.map +0 -1
- package/dist/ui/FavouriteButton.d.ts +0 -26
- package/dist/ui/FavouriteButton.d.ts.map +0 -1
- package/dist/ui/FormErrorsDialog.d.ts +0 -3
- package/dist/ui/FormErrorsDialog.d.ts.map +0 -1
- package/dist/ui/GenericErrorDialog.d.ts +0 -3
- package/dist/ui/GenericErrorDialog.d.ts.map +0 -1
- package/dist/ui/GoToResourceModal.d.ts +0 -10
- package/dist/ui/GoToResourceModal.d.ts.map +0 -1
- package/dist/ui/InfoDialog.d.ts +0 -3
- package/dist/ui/InfoDialog.d.ts.map +0 -1
- package/dist/ui/RefreshItemDialog.d.ts +0 -7
- package/dist/ui/RefreshItemDialog.d.ts.map +0 -1
- package/dist/ui/RemoveItemDialog.d.ts +0 -6
- package/dist/ui/RemoveItemDialog.d.ts.map +0 -1
- package/dist/ui/TitleHeader.d.ts +0 -8
- package/dist/ui/TitleHeader.d.ts.map +0 -1
- package/dist/ui/UnlinkItemDialog.d.ts +0 -6
- package/dist/ui/UnlinkItemDialog.d.ts.map +0 -1
- package/dist/ui/UnsavedChangesDialog.d.ts +0 -7
- package/dist/ui/UnsavedChangesDialog.d.ts.map +0 -1
- package/dist/ui/WarningDialog.d.ts +0 -3
- package/dist/ui/WarningDialog.d.ts.map +0 -1
- package/dist/views/ActionView.d.ts +0 -22
- package/dist/views/ActionView.d.ts.map +0 -1
- package/dist/views/CurrentTabContent.d.ts +0 -4
- package/dist/views/CurrentTabContent.d.ts.map +0 -1
- package/dist/views/RootView.d.ts +0 -14
- package/dist/views/RootView.d.ts.map +0 -1
- package/dist/views/TabContent.d.ts +0 -8
- package/dist/views/TabContent.d.ts.map +0 -1
- package/dist/views/TabSelector.d.ts +0 -4
- package/dist/views/TabSelector.d.ts.map +0 -1
- package/dist/views/Welcome.d.ts +0 -4
- package/dist/views/Welcome.d.ts.map +0 -1
- package/dist/views/actionViews/DashboardActionView.d.ts +0 -7
- package/dist/views/actionViews/DashboardActionView.d.ts.map +0 -1
- package/dist/views/actionViews/FormActionView.d.ts +0 -18
- package/dist/views/actionViews/FormActionView.d.ts.map +0 -1
- package/dist/views/actionViews/GraphActionView.d.ts +0 -13
- package/dist/views/actionViews/GraphActionView.d.ts.map +0 -1
- package/dist/views/actionViews/TreeActionView.d.ts +0 -20
- package/dist/views/actionViews/TreeActionView.d.ts.map +0 -1
- package/dist/views/tabs/Tab.d.ts +0 -11
- package/dist/views/tabs/Tab.d.ts.map +0 -1
- package/dist/widgets/WidgetFactory.d.ts +0 -4
- package/dist/widgets/WidgetFactory.d.ts.map +0 -1
- package/dist/widgets/base/Binary.d.ts +0 -14
- package/dist/widgets/base/Binary.d.ts.map +0 -1
- package/dist/widgets/base/Boolean.d.ts +0 -4
- package/dist/widgets/base/Boolean.d.ts.map +0 -1
- package/dist/widgets/base/Button.d.ts +0 -8
- package/dist/widgets/base/Button.d.ts.map +0 -1
- package/dist/widgets/base/Char.d.ts +0 -8
- package/dist/widgets/base/Char.d.ts.map +0 -1
- package/dist/widgets/base/Date.d.ts +0 -5
- package/dist/widgets/base/Date.d.ts.map +0 -1
- package/dist/widgets/base/DateTime.d.ts +0 -5
- package/dist/widgets/base/DateTime.d.ts.map +0 -1
- package/dist/widgets/base/Email.d.ts +0 -4
- package/dist/widgets/base/Email.d.ts.map +0 -1
- package/dist/widgets/base/Float.d.ts +0 -4
- package/dist/widgets/base/Float.d.ts.map +0 -1
- package/dist/widgets/base/FloatTime.d.ts +0 -12
- package/dist/widgets/base/FloatTime.d.ts.map +0 -1
- package/dist/widgets/base/Image.d.ts +0 -14
- package/dist/widgets/base/Image.d.ts.map +0 -1
- package/dist/widgets/base/Integer.d.ts +0 -8
- package/dist/widgets/base/Integer.d.ts.map +0 -1
- package/dist/widgets/base/Label.d.ts +0 -9
- package/dist/widgets/base/Label.d.ts.map +0 -1
- package/dist/widgets/base/LinkInput.d.ts +0 -12
- package/dist/widgets/base/LinkInput.d.ts.map +0 -1
- package/dist/widgets/base/MultiSelection.d.ts +0 -10
- package/dist/widgets/base/MultiSelection.d.ts.map +0 -1
- package/dist/widgets/base/ProgressBar.d.ts +0 -7
- package/dist/widgets/base/ProgressBar.d.ts.map +0 -1
- package/dist/widgets/base/Reference.d.ts +0 -16
- package/dist/widgets/base/Reference.d.ts.map +0 -1
- package/dist/widgets/base/ReferenceTree.d.ts +0 -8
- package/dist/widgets/base/ReferenceTree.d.ts.map +0 -1
- package/dist/widgets/base/Selection.d.ts +0 -10
- package/dist/widgets/base/Selection.d.ts.map +0 -1
- package/dist/widgets/base/Separator.d.ts +0 -8
- package/dist/widgets/base/Separator.d.ts.map +0 -1
- package/dist/widgets/base/Text.d.ts +0 -8
- package/dist/widgets/base/Text.d.ts.map +0 -1
- package/dist/widgets/base/Time.d.ts +0 -12
- package/dist/widgets/base/Time.d.ts.map +0 -1
- package/dist/widgets/base/Url.d.ts +0 -4
- package/dist/widgets/base/Url.d.ts.map +0 -1
- package/dist/widgets/base/many2one/Many2one.d.ts +0 -16
- package/dist/widgets/base/many2one/Many2one.d.ts.map +0 -1
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts +0 -9
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts.map +0 -1
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts +0 -10
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts.map +0 -1
- package/dist/widgets/base/many2one/Many2oneTree.d.ts +0 -6
- package/dist/widgets/base/many2one/Many2oneTree.d.ts.map +0 -1
- package/dist/widgets/base/one2many/One2many.d.ts +0 -8
- package/dist/widgets/base/one2many/One2many.d.ts.map +0 -1
- package/dist/widgets/base/one2many/One2manyInput.d.ts +0 -23
- package/dist/widgets/base/one2many/One2manyInput.d.ts.map +0 -1
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts +0 -23
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts.map +0 -1
- package/dist/widgets/containers/Container.d.ts +0 -9
- package/dist/widgets/containers/Container.d.ts.map +0 -1
- package/dist/widgets/containers/Group.d.ts +0 -10
- package/dist/widgets/containers/Group.d.ts.map +0 -1
- package/dist/widgets/containers/Notebook.d.ts +0 -9
- package/dist/widgets/containers/Notebook.d.ts.map +0 -1
- package/dist/widgets/custom/Avatar.d.ts +0 -10
- package/dist/widgets/custom/Avatar.d.ts.map +0 -1
- package/dist/widgets/custom/ButtonGroup.d.ts +0 -8
- package/dist/widgets/custom/ButtonGroup.d.ts.map +0 -1
- package/dist/widgets/custom/CodeEditor.d.ts +0 -9
- package/dist/widgets/custom/CodeEditor.d.ts.map +0 -1
- package/dist/widgets/custom/Comments.d.ts +0 -35
- package/dist/widgets/custom/Comments.d.ts.map +0 -1
- package/dist/widgets/custom/FiberGrid.d.ts +0 -10
- package/dist/widgets/custom/FiberGrid.d.ts.map +0 -1
- package/dist/widgets/custom/Indicator.d.ts +0 -10
- package/dist/widgets/custom/Indicator.d.ts.map +0 -1
- package/dist/widgets/custom/Markdown.d.ts +0 -5
- package/dist/widgets/custom/Markdown.d.ts.map +0 -1
- package/dist/widgets/custom/MultiCheckbox.d.ts +0 -14
- package/dist/widgets/custom/MultiCheckbox.d.ts.map +0 -1
- package/dist/widgets/custom/Radio.d.ts +0 -10
- package/dist/widgets/custom/Radio.d.ts.map +0 -1
- package/dist/widgets/custom/Steps.d.ts +0 -13
- package/dist/widgets/custom/Steps.d.ts.map +0 -1
- package/dist/widgets/custom/Switch.d.ts +0 -4
- package/dist/widgets/custom/Switch.d.ts.map +0 -1
- package/dist/widgets/custom/Tag.d.ts +0 -7
- package/dist/widgets/custom/Tag.d.ts.map +0 -1
- package/dist/widgets/custom/Tags.d.ts +0 -15
- package/dist/widgets/custom/Tags.d.ts.map +0 -1
- package/dist/widgets/custom/Timeline.d.ts +0 -16
- package/dist/widgets/custom/Timeline.d.ts.map +0 -1
- package/dist/widgets/modals/ExportModal.d.ts +0 -15
- package/dist/widgets/modals/ExportModal.d.ts.map +0 -1
- package/dist/widgets/modals/FormModal.d.ts +0 -12
- package/dist/widgets/modals/FormModal.d.ts.map +0 -1
- package/dist/widgets/modals/SearchModal.d.ts +0 -13
- package/dist/widgets/modals/SearchModal.d.ts.map +0 -1
- package/dist/widgets/modals/TranslationModal.d.ts +0 -12
- package/dist/widgets/modals/TranslationModal.d.ts.map +0 -1
- package/dist/widgets/views/Dashboard/Dashboard.d.ts +0 -5
- package/dist/widgets/views/Dashboard/Dashboard.d.ts.map +0 -1
- package/dist/widgets/views/Dashboard/DashboardForm.d.ts +0 -4
- package/dist/widgets/views/Dashboard/DashboardForm.d.ts.map +0 -1
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts +0 -19
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts.map +0 -1
- package/dist/widgets/views/Dashboard/dashboardHelper.d.ts +0 -6
- package/dist/widgets/views/Dashboard/dashboardHelper.d.ts.map +0 -1
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts +0 -4
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts.map +0 -1
- package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts +0 -6
- package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts.map +0 -1
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts +0 -4
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts.map +0 -1
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts +0 -11
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts.map +0 -1
- package/dist/widgets/views/DashboardGrid/index.d.ts +0 -5
- package/dist/widgets/views/DashboardGrid/index.d.ts.map +0 -1
- package/dist/widgets/views/Form.d.ts +0 -29
- package/dist/widgets/views/Form.d.ts.map +0 -1
- package/dist/widgets/views/Graph/Graph.d.ts +0 -11
- package/dist/widgets/views/Graph/Graph.d.ts.map +0 -1
- package/dist/widgets/views/Graph/GraphChart.d.ts +0 -11
- package/dist/widgets/views/Graph/GraphChart.d.ts.map +0 -1
- package/dist/widgets/views/Graph/GraphDefaults.d.ts +0 -83
- package/dist/widgets/views/Graph/GraphDefaults.d.ts.map +0 -1
- package/dist/widgets/views/Graph/GraphIndicator.d.ts +0 -17
- package/dist/widgets/views/Graph/GraphIndicator.d.ts.map +0 -1
- package/dist/widgets/views/Graph/useGraphData.d.ts +0 -20
- package/dist/widgets/views/Graph/useGraphData.d.ts.map +0 -1
- package/dist/widgets/views/SearchTree.d.ts +0 -24
- package/dist/widgets/views/SearchTree.d.ts.map +0 -1
- package/dist/widgets/views/Tree.d.ts +0 -32
- package/dist/widgets/views/Tree.d.ts.map +0 -1
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts +0 -4
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts.map +0 -1
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts +0 -4
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts.map +0 -1
- package/dist/widgets/views/searchFilter/PairFields.d.ts +0 -4
- package/dist/widgets/views/searchFilter/PairFields.d.ts.map +0 -1
- package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts +0 -10
- package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts.map +0 -1
- package/dist/widgets/views/searchFilter/SearchField.d.ts +0 -8
- package/dist/widgets/views/searchFilter/SearchField.d.ts.map +0 -1
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts +0 -20
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +0 -1
- package/dist/widgets/views/searchFilter/SearchParams.d.ts +0 -7
- package/dist/widgets/views/searchFilter/SearchParams.d.ts.map +0 -1
- package/src/tailwind.css +0 -8
- package/src/tailwind.generated.css +0 -168533
|
@@ -5,17 +5,16 @@ import React, {
|
|
|
5
5
|
useEffect,
|
|
6
6
|
useCallback,
|
|
7
7
|
} from "react";
|
|
8
|
-
import { One2many as One2manyOoui } from "@gisce/ooui";
|
|
9
|
-
import { Alert, Spin } from "antd";
|
|
10
|
-
import { Form } from "@/index";
|
|
11
|
-
import { Tree } from "@/index";
|
|
12
|
-
import { Graph } from "@/widgets/views/Graph/Graph";
|
|
13
8
|
import {
|
|
9
|
+
One2many as One2manyOoui,
|
|
14
10
|
Form as FormOoui,
|
|
15
11
|
Tree as TreeOoui,
|
|
16
12
|
parseGraph,
|
|
17
13
|
transformDomainForChildWidget,
|
|
18
14
|
} from "@gisce/ooui";
|
|
15
|
+
import { Alert, Spin } from "antd";
|
|
16
|
+
import { Form, Tree } from "@/index";
|
|
17
|
+
import { Graph } from "@/widgets/views/Graph/Graph";
|
|
19
18
|
import { Views, ViewType } from "@/types";
|
|
20
19
|
import ConnectionProvider from "@/ConnectionProvider";
|
|
21
20
|
import { FormModal } from "@/widgets/modals/FormModal";
|
|
@@ -36,7 +35,7 @@ import { transformPlainMany2Ones } from "@/helpers/formHelper";
|
|
|
36
35
|
|
|
37
36
|
type One2manyValue = {
|
|
38
37
|
fields?: any;
|
|
39
|
-
items:
|
|
38
|
+
items: One2manyItem[];
|
|
40
39
|
};
|
|
41
40
|
|
|
42
41
|
const ViewObjects = {
|
|
@@ -75,13 +74,13 @@ function filterDuplicateItems(items: any) {
|
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
const One2manyInput: React.FC<One2manyInputProps> = (
|
|
78
|
-
props: One2manyInputProps
|
|
77
|
+
props: One2manyInputProps,
|
|
79
78
|
) => {
|
|
80
79
|
const { value, onChange, ooui, views } = props;
|
|
81
80
|
const { items = [] } = value || {};
|
|
82
81
|
|
|
83
82
|
const { currentView, setCurrentView, itemIndex, setItemIndex } = useContext(
|
|
84
|
-
One2manyContext
|
|
83
|
+
One2manyContext,
|
|
85
84
|
) as One2manyContextType;
|
|
86
85
|
|
|
87
86
|
const formContext = useContext(FormContext) as FormContextType;
|
|
@@ -113,7 +112,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
113
112
|
const { id: fieldName } = ooui;
|
|
114
113
|
const itemsToShow = items.filter(
|
|
115
114
|
(item) =>
|
|
116
|
-
(item.values || item.treeValues) && item.operation !== "pendingRemove"
|
|
115
|
+
(item.values || item.treeValues) && item.operation !== "pendingRemove",
|
|
117
116
|
);
|
|
118
117
|
const previousCurrentView = useRef<ViewType>();
|
|
119
118
|
|
|
@@ -142,7 +141,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
142
141
|
parseDomain();
|
|
143
142
|
}, [domain]);
|
|
144
143
|
|
|
145
|
-
const triggerChange = (changedValue:
|
|
144
|
+
const triggerChange = (changedValue: One2manyItem[]) => {
|
|
146
145
|
onChange?.({
|
|
147
146
|
fields: views.get("form")?.fields || views.get("tree")?.fields,
|
|
148
147
|
items: filterDuplicateItems(changedValue),
|
|
@@ -212,7 +211,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
212
211
|
transformDomainForChildWidget({
|
|
213
212
|
domain,
|
|
214
213
|
widgetFieldName: fieldName,
|
|
215
|
-
})
|
|
214
|
+
}),
|
|
216
215
|
);
|
|
217
216
|
}
|
|
218
217
|
}
|
|
@@ -384,7 +383,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
384
383
|
triggerChange(updatedItems);
|
|
385
384
|
} else {
|
|
386
385
|
triggerChange(
|
|
387
|
-
items.filter((item) => item.id !== itemsToShow[itemIndex].id!)
|
|
386
|
+
items.filter((item) => item.id !== itemsToShow[itemIndex].id!),
|
|
388
387
|
);
|
|
389
388
|
}
|
|
390
389
|
} catch (err) {
|
|
@@ -438,7 +437,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
438
437
|
id: number | undefined,
|
|
439
438
|
_: any,
|
|
440
439
|
values: any,
|
|
441
|
-
x2manyPendingLink: boolean = false
|
|
440
|
+
x2manyPendingLink: boolean = false,
|
|
442
441
|
) => {
|
|
443
442
|
let updatedItems: One2manyItem[];
|
|
444
443
|
|
|
@@ -498,7 +497,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
498
497
|
const onSearchModalSelectValue = async (ids: number[]) => {
|
|
499
498
|
setIsLoading(true);
|
|
500
499
|
|
|
501
|
-
|
|
500
|
+
const updatedItems = items;
|
|
502
501
|
const filteredIds = ids.filter((id) => {
|
|
503
502
|
return !items.find((item) => item.id === id);
|
|
504
503
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Tabs } from "antd";
|
|
3
3
|
import iconMapper from "@/helpers/iconMapper";
|
|
4
|
-
const { TabPane } = Tabs;
|
|
5
4
|
|
|
6
5
|
import { Notebook as NotebookOoui, Group as GroupOoui } from "@gisce/ooui";
|
|
7
6
|
import { Group } from "@/index";
|
|
7
|
+
const { TabPane } = Tabs;
|
|
8
8
|
|
|
9
9
|
type Props = {
|
|
10
10
|
ooui: NotebookOoui;
|
|
@@ -29,7 +29,14 @@ function Notebook(props: Props): React.ReactElement {
|
|
|
29
29
|
.filter((page: any) => !page.invisible)
|
|
30
30
|
.map((page: any) => {
|
|
31
31
|
return (
|
|
32
|
-
<TabPane
|
|
32
|
+
<TabPane
|
|
33
|
+
tab={
|
|
34
|
+
<>
|
|
35
|
+
{getPageIcon(page.icon)} {page.label}
|
|
36
|
+
</>
|
|
37
|
+
}
|
|
38
|
+
key={page.label}
|
|
39
|
+
>
|
|
33
40
|
<Group
|
|
34
41
|
ooui={page as GroupOoui}
|
|
35
42
|
showLabel={false}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useContext, useState } from "react";
|
|
2
2
|
import Field from "@/common/Field";
|
|
3
|
-
import { DownOutlined } from "@ant-design/icons";
|
|
3
|
+
import { DownOutlined, LoadingOutlined } from "@ant-design/icons";
|
|
4
4
|
import { Dropdown, Menu } from "antd";
|
|
5
5
|
import { Button } from "@/widgets/base/Button";
|
|
6
6
|
import {
|
|
@@ -10,7 +10,6 @@ import {
|
|
|
10
10
|
} from "@gisce/ooui";
|
|
11
11
|
import showConfirmDialog from "@/ui/ConfirmDialog";
|
|
12
12
|
import { FormContext, FormContextType } from "@/context/FormContext";
|
|
13
|
-
import { LoadingOutlined } from "@ant-design/icons";
|
|
14
13
|
import iconMapper from "@/helpers/iconMapper";
|
|
15
14
|
import { WidgetProps } from "@/types";
|
|
16
15
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
@@ -21,8 +20,8 @@ type ButtonGroupProps = {
|
|
|
21
20
|
|
|
22
21
|
type ItemsProps = {
|
|
23
22
|
ooui: ButtonOoui[];
|
|
24
|
-
executeButtonAction: any
|
|
25
|
-
lang: string
|
|
23
|
+
executeButtonAction: any;
|
|
24
|
+
lang: string;
|
|
26
25
|
};
|
|
27
26
|
|
|
28
27
|
export const ButtonGroup = (props: ButtonGroupProps) => {
|
|
@@ -86,19 +85,23 @@ export const ButtonGroup = (props: ButtonGroupProps) => {
|
|
|
86
85
|
onClick={onClick}
|
|
87
86
|
icon={<DownOutlined />}
|
|
88
87
|
type={primary ? "primary" : undefined}
|
|
89
|
-
//danger={danger ? true : undefined} This works but typescript
|
|
88
|
+
// danger={danger ? true : undefined} This works but typescript
|
|
90
89
|
// doesn't accept
|
|
91
|
-
overlay={
|
|
90
|
+
overlay={
|
|
91
|
+
<Items
|
|
92
|
+
ooui={secondaryButtons}
|
|
93
|
+
executeButtonAction={executeButtonAction}
|
|
94
|
+
lang={lang}
|
|
95
|
+
/>
|
|
96
|
+
}
|
|
92
97
|
>
|
|
93
98
|
{getButtonIcon()}
|
|
94
99
|
{caption}
|
|
95
100
|
</Dropdown.Button>
|
|
96
101
|
</Field>
|
|
97
102
|
);
|
|
98
|
-
}
|
|
99
|
-
return
|
|
100
|
-
<Button ooui={defaultButton} />
|
|
101
|
-
)
|
|
103
|
+
} else if (defaultButton) {
|
|
104
|
+
return <Button ooui={defaultButton} />;
|
|
102
105
|
}
|
|
103
106
|
};
|
|
104
107
|
|
|
@@ -17,12 +17,16 @@ export const CodeEditor = (props: CodeEditorProps) => {
|
|
|
17
17
|
const { elementHasLostFocus } = formContext || {};
|
|
18
18
|
|
|
19
19
|
const onMount = (editor: any) => {
|
|
20
|
-
editor.onDidBlurEditorWidget(elementHasLostFocus)
|
|
21
|
-
}
|
|
20
|
+
editor.onDidBlurEditorWidget(elementHasLostFocus);
|
|
21
|
+
};
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<Field {...props}>
|
|
25
|
-
<Editor
|
|
25
|
+
<Editor
|
|
26
|
+
defaultLanguage={lang || ""}
|
|
27
|
+
height={height || 300}
|
|
28
|
+
onMount={onMount}
|
|
29
|
+
/>
|
|
26
30
|
</Field>
|
|
27
31
|
);
|
|
28
32
|
};
|
|
@@ -1,72 +1,76 @@
|
|
|
1
|
-
import React, {useContext} from "react";
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
2
|
import Field from "@/common/Field";
|
|
3
3
|
import { WidgetProps } from "@/types";
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
Card,
|
|
6
|
+
Space,
|
|
7
|
+
Typography,
|
|
8
|
+
Avatar,
|
|
9
|
+
Tag,
|
|
10
|
+
Timeline,
|
|
11
|
+
TimelineItemProps,
|
|
12
|
+
} from "antd";
|
|
5
13
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
6
14
|
|
|
7
|
-
const { Meta } = Card;
|
|
8
|
-
const { Text} = Typography;
|
|
9
|
-
|
|
10
15
|
import dayjs from "dayjs";
|
|
11
16
|
import relativeTime from "dayjs/plugin/relativeTime";
|
|
12
17
|
import md5 from "md5";
|
|
13
18
|
|
|
19
|
+
const { Meta } = Card;
|
|
20
|
+
const { Text } = Typography;
|
|
14
21
|
|
|
15
22
|
dayjs.extend(relativeTime);
|
|
16
23
|
|
|
17
24
|
type GravatarProps = {
|
|
18
|
-
email: string
|
|
19
|
-
size?: number
|
|
20
|
-
theme: string
|
|
21
|
-
}
|
|
25
|
+
email: string;
|
|
26
|
+
size?: number;
|
|
27
|
+
theme: string;
|
|
28
|
+
};
|
|
22
29
|
|
|
23
30
|
type CommentDataType = {
|
|
24
|
-
id: number
|
|
25
|
-
isSender: boolean
|
|
26
|
-
isAuthor: boolean
|
|
27
|
-
text: string
|
|
28
|
-
email: string
|
|
29
|
-
date: string
|
|
30
|
-
author: string
|
|
31
|
-
}
|
|
31
|
+
id: number;
|
|
32
|
+
isSender: boolean;
|
|
33
|
+
isAuthor: boolean;
|
|
34
|
+
text: string;
|
|
35
|
+
email: string;
|
|
36
|
+
date: string;
|
|
37
|
+
author: string;
|
|
38
|
+
};
|
|
32
39
|
|
|
33
40
|
type CommentProps = {
|
|
34
|
-
data: CommentDataType
|
|
35
|
-
style?: any
|
|
36
|
-
}
|
|
41
|
+
data: CommentDataType;
|
|
42
|
+
style?: any;
|
|
43
|
+
};
|
|
37
44
|
|
|
38
45
|
type CommentsTypeProps = {
|
|
39
|
-
data: CommentDataType[]
|
|
40
|
-
}
|
|
46
|
+
data: CommentDataType[];
|
|
47
|
+
};
|
|
41
48
|
|
|
42
49
|
type CommentsTimelineProps = {
|
|
43
|
-
value?: EventsType[]
|
|
44
|
-
}
|
|
45
|
-
|
|
50
|
+
value?: EventsType[];
|
|
51
|
+
};
|
|
46
52
|
|
|
47
53
|
type EventActionType = {
|
|
48
|
-
date: string
|
|
49
|
-
action: string
|
|
50
|
-
}
|
|
54
|
+
date: string;
|
|
55
|
+
action: string;
|
|
56
|
+
};
|
|
51
57
|
|
|
52
58
|
export type EventsType = {
|
|
53
|
-
type: "action" | "comment"
|
|
54
|
-
event: EventActionType | CommentDataType
|
|
55
|
-
|
|
56
|
-
}
|
|
59
|
+
type: "action" | "comment";
|
|
60
|
+
event: EventActionType | CommentDataType;
|
|
61
|
+
};
|
|
57
62
|
|
|
58
|
-
const Gravatar = ({ email, size = 40, theme =
|
|
63
|
+
const Gravatar = ({ email, size = 40, theme = "" }: GravatarProps) => {
|
|
59
64
|
// Genera el enlace de Gravatar utilizando el email
|
|
60
|
-
const gravatarUrl = `https://www.gravatar.com/avatar/${md5(
|
|
65
|
+
const gravatarUrl = `https://www.gravatar.com/avatar/${md5(
|
|
66
|
+
email,
|
|
67
|
+
)}?s=${size}&d=${theme}`;
|
|
61
68
|
|
|
62
|
-
return
|
|
63
|
-
<Avatar src={gravatarUrl} size={size} />
|
|
64
|
-
);
|
|
69
|
+
return <Avatar src={gravatarUrl} size={size} />;
|
|
65
70
|
};
|
|
66
71
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
const textParts = text.split('\n');
|
|
72
|
+
function TextWithNewlines({ text }: { text: string }) {
|
|
73
|
+
const textParts = text.split("\n");
|
|
70
74
|
|
|
71
75
|
return (
|
|
72
76
|
<div>
|
|
@@ -81,59 +85,61 @@ function TextWithNewlines({ text }:{text: string}) {
|
|
|
81
85
|
}
|
|
82
86
|
|
|
83
87
|
export const Comment = (props: CommentProps) => {
|
|
84
|
-
const {data, style} = props;
|
|
88
|
+
const { data, style } = props;
|
|
85
89
|
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
86
90
|
return (
|
|
87
|
-
<Card key={data.id} style={{...style, ...{textAlign:
|
|
88
|
-
<Meta
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
91
|
+
<Card key={data.id} style={{ ...style, ...{ textAlign: "start" } }}>
|
|
92
|
+
<Meta
|
|
93
|
+
avatar={<Gravatar email={data.email} theme="mp" />}
|
|
94
|
+
title={data.author}
|
|
95
|
+
description={
|
|
96
|
+
<Space direction="horizontal">
|
|
97
|
+
<span title={data.date}>{dayjs(data.date).fromNow()}</span>
|
|
98
|
+
{data.isAuthor && <Tag color="blue">{t("author")}</Tag>}
|
|
99
|
+
</Space>
|
|
100
|
+
}
|
|
101
|
+
style={{ marginBottom: "5px" }}
|
|
102
|
+
/>
|
|
96
103
|
<Text>
|
|
97
104
|
<TextWithNewlines text={data.text} />
|
|
98
105
|
</Text>
|
|
99
106
|
</Card>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
107
|
+
);
|
|
108
|
+
};
|
|
102
109
|
|
|
103
110
|
export const Comments = (props: CommentsTypeProps) => {
|
|
104
111
|
const { data = [] } = props;
|
|
105
112
|
const comments = data.map((c) => {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
113
|
+
const style = { float: c.isSender ? "right" : "left", width: "60%" };
|
|
114
|
+
return <Comment data={c} style={style} />;
|
|
115
|
+
});
|
|
109
116
|
return (
|
|
110
117
|
<div>
|
|
111
|
-
<Space direction="vertical" size="middle" style={{ display:
|
|
118
|
+
<Space direction="vertical" size="middle" style={{ display: "flex" }}>
|
|
112
119
|
{comments}
|
|
113
120
|
</Space>
|
|
114
121
|
</div>
|
|
115
|
-
)
|
|
116
|
-
}
|
|
117
|
-
|
|
122
|
+
);
|
|
123
|
+
};
|
|
118
124
|
|
|
119
125
|
export const CommentsTimeline = (props: CommentsTimelineProps) => {
|
|
120
126
|
const { value } = props;
|
|
121
|
-
const items = (value || []).map(i => {
|
|
122
|
-
if (i.type ===
|
|
127
|
+
const items = (value || []).map((i) => {
|
|
128
|
+
if (i.type === "action") {
|
|
123
129
|
return {
|
|
124
|
-
children: `${i.event.date} - ${(i.event as EventActionType).action}
|
|
125
|
-
}
|
|
130
|
+
children: `${i.event.date} - ${(i.event as EventActionType).action}`,
|
|
131
|
+
};
|
|
126
132
|
} else if (i.type === "comment") {
|
|
127
133
|
return {
|
|
128
|
-
color:
|
|
129
|
-
position: (i.event as CommentDataType).isSender ?
|
|
134
|
+
color: "gray",
|
|
135
|
+
position: (i.event as CommentDataType).isSender ? "left" : "right",
|
|
130
136
|
label: i.event.date,
|
|
131
137
|
children: <Comment data={i.event as CommentDataType} />,
|
|
132
|
-
}
|
|
138
|
+
};
|
|
133
139
|
}
|
|
134
|
-
})
|
|
135
|
-
return <Timeline mode="alternate" items={items as TimelineItemProps[]}
|
|
136
|
-
}
|
|
140
|
+
});
|
|
141
|
+
return <Timeline mode="alternate" items={items as TimelineItemProps[]} />;
|
|
142
|
+
};
|
|
137
143
|
|
|
138
144
|
export const CommentsTimelineField = (props: WidgetProps) => {
|
|
139
145
|
return (
|
|
@@ -141,4 +147,4 @@ export const CommentsTimelineField = (props: WidgetProps) => {
|
|
|
141
147
|
<CommentsTimeline />
|
|
142
148
|
</Field>
|
|
143
149
|
);
|
|
144
|
-
}
|
|
150
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Tooltip, theme } from "antd";
|
|
3
|
-
import { Statistic, Card } from "antd";
|
|
2
|
+
import { Tooltip, theme, Statistic, Card } from "antd";
|
|
4
3
|
import { Indicator as IndicatorOoui } from "@gisce/ooui";
|
|
5
4
|
import { WidgetProps } from "@/types";
|
|
6
5
|
import Field from "@/common/Field";
|
|
@@ -46,7 +46,7 @@ export const MultiCheckboxInput = (props: MultiCheckboxInputProps) => {
|
|
|
46
46
|
fetchOptions();
|
|
47
47
|
}, [items]);
|
|
48
48
|
|
|
49
|
-
const triggerChange = (changedValue:
|
|
49
|
+
const triggerChange = (changedValue: One2manyItem[]) => {
|
|
50
50
|
onChange?.({
|
|
51
51
|
items: changedValue,
|
|
52
52
|
});
|
|
@@ -70,7 +70,7 @@ export const MultiCheckboxInput = (props: MultiCheckboxInputProps) => {
|
|
|
70
70
|
try {
|
|
71
71
|
const optionsRead = await ConnectionProvider.getHandler().search({
|
|
72
72
|
model: relation,
|
|
73
|
-
params
|
|
73
|
+
params,
|
|
74
74
|
fields: [field],
|
|
75
75
|
context: { ...getContext?.(), ...context },
|
|
76
76
|
});
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import Field from "@/common/Field";
|
|
3
3
|
import { WidgetProps } from "@/types";
|
|
4
|
-
import { Tag as AntdTag, TagProps } from
|
|
5
|
-
import { isPresetStatusColor, isPresetColor } from
|
|
4
|
+
import { Tag as AntdTag, TagProps } from "antd";
|
|
5
|
+
import { isPresetStatusColor, isPresetColor } from "antd/lib/_util/colors";
|
|
6
6
|
import { colorFromString } from "@/helpers/formHelper";
|
|
7
7
|
|
|
8
8
|
export const Tag = (props: WidgetProps) => {
|
|
9
9
|
return (
|
|
10
10
|
<Field {...props}>
|
|
11
|
-
<TagInput {...props}/>
|
|
11
|
+
<TagInput {...props} />
|
|
12
12
|
</Field>
|
|
13
13
|
);
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
export const TagInput = (props: any) => {
|
|
17
|
-
const {ooui, value} = props;
|
|
17
|
+
const { ooui, value } = props;
|
|
18
18
|
let formattedValue = value;
|
|
19
19
|
let colorValue = value;
|
|
20
20
|
if (ooui.selectionValues.size) {
|
|
@@ -24,26 +24,30 @@ export const TagInput = (props: any) => {
|
|
|
24
24
|
formattedValue = value[1];
|
|
25
25
|
}
|
|
26
26
|
if (!value) {
|
|
27
|
-
return null
|
|
27
|
+
return null;
|
|
28
28
|
}
|
|
29
|
-
const color =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
29
|
+
const color =
|
|
30
|
+
ooui.colors === "auto"
|
|
31
|
+
? colorFromString(colorValue)
|
|
32
|
+
: ooui.colors[colorValue] || colorFromString(colorValue);
|
|
33
|
+
return <CustomTag color={color}>{formattedValue}</CustomTag>;
|
|
34
|
+
};
|
|
35
35
|
|
|
36
36
|
export const CustomTag = (props: TagProps) => {
|
|
37
37
|
let { color } = props;
|
|
38
|
-
let style = {}
|
|
38
|
+
let style = {};
|
|
39
39
|
if (!isPresetStatusColor(props.color) && !isPresetColor(props.color)) {
|
|
40
40
|
style = {
|
|
41
|
-
color
|
|
41
|
+
color,
|
|
42
42
|
borderColor: color,
|
|
43
43
|
borderStyle: "solid",
|
|
44
44
|
borderWidth: "1px",
|
|
45
|
-
}
|
|
45
|
+
};
|
|
46
46
|
color = `${color}20`;
|
|
47
47
|
}
|
|
48
|
-
return
|
|
49
|
-
}
|
|
48
|
+
return (
|
|
49
|
+
<AntdTag {...props} style={style} color={color}>
|
|
50
|
+
{props.children}
|
|
51
|
+
</AntdTag>
|
|
52
|
+
);
|
|
53
|
+
};
|
|
@@ -48,7 +48,7 @@ export const TagsInput = (props: TagsInputProps) => {
|
|
|
48
48
|
fetchOptions();
|
|
49
49
|
}, [items]);
|
|
50
50
|
|
|
51
|
-
const triggerChange = (changedValue:
|
|
51
|
+
const triggerChange = (changedValue: One2manyItem[]) => {
|
|
52
52
|
onChange?.({
|
|
53
53
|
items: changedValue,
|
|
54
54
|
});
|
|
@@ -77,7 +77,7 @@ export const TagsInput = (props: TagsInputProps) => {
|
|
|
77
77
|
|
|
78
78
|
const optionsRead = await ConnectionProvider.getHandler().search({
|
|
79
79
|
model: relation,
|
|
80
|
-
params
|
|
80
|
+
params,
|
|
81
81
|
fields: [field],
|
|
82
82
|
context: { ...getContext?.(), ...context },
|
|
83
83
|
});
|
|
@@ -134,7 +134,7 @@ export const TagsInput = (props: TagsInputProps) => {
|
|
|
134
134
|
onMouseDown={onPreventMouseDown}
|
|
135
135
|
closable={closable}
|
|
136
136
|
onClose={onClose}
|
|
137
|
-
closeIcon={<span style={{color}}>X</span>}
|
|
137
|
+
closeIcon={<span style={{ color }}>X</span>}
|
|
138
138
|
>
|
|
139
139
|
{label}
|
|
140
140
|
</CustomTag>
|
|
@@ -94,7 +94,7 @@ export const TimelineInput = (props: TimelineInputProps) => {
|
|
|
94
94
|
fetchData();
|
|
95
95
|
}, [items]);
|
|
96
96
|
|
|
97
|
-
const triggerChange = (changedValue:
|
|
97
|
+
const triggerChange = (changedValue: One2manyItem[]) => {
|
|
98
98
|
onChange?.({
|
|
99
99
|
items: changedValue,
|
|
100
100
|
});
|
|
@@ -108,7 +108,7 @@ export const TimelineInput = (props: TimelineInputProps) => {
|
|
|
108
108
|
const [itemsWithValues] = await readObjectValues({
|
|
109
109
|
treeView: {
|
|
110
110
|
fields: views.get("tree").fields,
|
|
111
|
-
arch: views.get("tree").arch
|
|
111
|
+
arch: views.get("tree").arch,
|
|
112
112
|
},
|
|
113
113
|
formView: {
|
|
114
114
|
fields: views.get("form").fields,
|
|
@@ -147,8 +147,8 @@ export const TimelineInput = (props: TimelineInputProps) => {
|
|
|
147
147
|
onClick={() => {
|
|
148
148
|
setModalItem(
|
|
149
149
|
itemsToShow.find(
|
|
150
|
-
(searchItem) => item.id === searchItem.id
|
|
151
|
-
)
|
|
150
|
+
(searchItem) => item.id === searchItem.id,
|
|
151
|
+
),
|
|
152
152
|
);
|
|
153
153
|
setShowFormModal(true);
|
|
154
154
|
}}
|
|
@@ -161,8 +161,8 @@ export const TimelineInput = (props: TimelineInputProps) => {
|
|
|
161
161
|
onClick={() => {
|
|
162
162
|
setModalItem(
|
|
163
163
|
itemsToShow.find(
|
|
164
|
-
(searchItem) => item.id === searchItem.id
|
|
165
|
-
)
|
|
164
|
+
(searchItem) => item.id === searchItem.id,
|
|
165
|
+
),
|
|
166
166
|
);
|
|
167
167
|
setShowFormModal(true);
|
|
168
168
|
}}
|
|
@@ -48,7 +48,7 @@ function DashboardTree(props: Props) {
|
|
|
48
48
|
const [offset, setOffset] = useState<number>(0);
|
|
49
49
|
const limitRef = useRef<number>(DEFAULT_SEARCH_LIMIT);
|
|
50
50
|
|
|
51
|
-
const paramsRef = useRef<
|
|
51
|
+
const paramsRef = useRef<any[]>([]);
|
|
52
52
|
|
|
53
53
|
const [totalItems, setTotalItems] = useState<number>(0);
|
|
54
54
|
const [results, setResults] = useState<any>([]);
|
|
@@ -89,7 +89,7 @@ function DashboardTree(props: Props) {
|
|
|
89
89
|
|
|
90
90
|
const resultsSorted = sortResults({
|
|
91
91
|
resultsToSort: results,
|
|
92
|
-
sorter
|
|
92
|
+
sorter,
|
|
93
93
|
fields: { ...treeView!.fields, ...formView!.fields },
|
|
94
94
|
});
|
|
95
95
|
setTableRefreshing(false);
|