@gisce/react-ooui 1.5.1 → 2.0.0-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
package/src/types/index.ts
CHANGED
|
@@ -76,7 +76,7 @@ type SearchResponse = {
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
type SearchRequest = {
|
|
79
|
-
params:
|
|
79
|
+
params: any[];
|
|
80
80
|
limit?: number;
|
|
81
81
|
offset?: number;
|
|
82
82
|
model: string;
|
|
@@ -84,6 +84,7 @@ type SearchRequest = {
|
|
|
84
84
|
context?: any;
|
|
85
85
|
attrs?: any;
|
|
86
86
|
order?: number | string | null;
|
|
87
|
+
fieldsToRetrieve?: string[];
|
|
87
88
|
};
|
|
88
89
|
|
|
89
90
|
type SearchAllIdsRequest = SearchCountRequest & {
|
|
@@ -91,7 +92,7 @@ type SearchAllIdsRequest = SearchCountRequest & {
|
|
|
91
92
|
};
|
|
92
93
|
|
|
93
94
|
type SearchCountRequest = {
|
|
94
|
-
params:
|
|
95
|
+
params: any[];
|
|
95
96
|
model: string;
|
|
96
97
|
context?: any;
|
|
97
98
|
};
|
|
@@ -251,52 +252,102 @@ type ExportDataOptions = {
|
|
|
251
252
|
};
|
|
252
253
|
|
|
253
254
|
type ConnectionProviderType = {
|
|
254
|
-
getActionStringForModel: (
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
255
|
+
getActionStringForModel: (
|
|
256
|
+
model: string,
|
|
257
|
+
requestConfig?: any,
|
|
258
|
+
) => Promise<string>;
|
|
259
|
+
getViewsForAction: (
|
|
260
|
+
{
|
|
261
|
+
action,
|
|
262
|
+
context,
|
|
263
|
+
}: {
|
|
264
|
+
action: string;
|
|
265
|
+
context?: any;
|
|
266
|
+
},
|
|
267
|
+
requestConfig?: any,
|
|
268
|
+
) => Promise<ViewData>;
|
|
262
269
|
getView: (
|
|
263
|
-
options: GetViewRequest
|
|
270
|
+
options: GetViewRequest,
|
|
271
|
+
requestConfig?: any,
|
|
264
272
|
) => Promise<FormView | TreeView | GraphView>;
|
|
265
|
-
getFields: (options: GetFieldsRequest) => Promise<any>;
|
|
266
|
-
searchAllIds: (
|
|
267
|
-
|
|
273
|
+
getFields: (options: GetFieldsRequest, requestConfig?: any) => Promise<any>;
|
|
274
|
+
searchAllIds: (
|
|
275
|
+
options: SearchAllIdsRequest,
|
|
276
|
+
requestConfig?: any,
|
|
277
|
+
) => Promise<number[]>;
|
|
278
|
+
searchCount: (
|
|
279
|
+
options: SearchCountRequest,
|
|
280
|
+
requestConfig?: any,
|
|
281
|
+
) => Promise<number>;
|
|
268
282
|
search: (options: SearchRequest) => Promise<any[]>;
|
|
269
|
-
searchForTree: (
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
283
|
+
searchForTree: (
|
|
284
|
+
options: SearchRequest,
|
|
285
|
+
requestConfig?: any,
|
|
286
|
+
) => Promise<SearchResponse>;
|
|
287
|
+
update: (options: UpdateObjectRequest, requestConfig?: any) => Promise<any>;
|
|
288
|
+
create: (options: CreateObjectRequest, requestConfig?: any) => Promise<any>;
|
|
289
|
+
deleteObjects: (
|
|
290
|
+
options: DeleteObjectsRequest,
|
|
291
|
+
requestConfig?: any,
|
|
292
|
+
) => Promise<any>;
|
|
293
|
+
execute: (options: ExecuteRequest, requestConfig?: any) => Promise<any>;
|
|
294
|
+
readObjects: (
|
|
295
|
+
options: ReadObjectsRequest,
|
|
296
|
+
requestConfig?: any,
|
|
297
|
+
) => Promise<any>;
|
|
298
|
+
readEvalUiObjects: (
|
|
299
|
+
options: ReadEvalUiObjectsRequest,
|
|
300
|
+
requestConfig?: any,
|
|
301
|
+
) => Promise<any>;
|
|
302
|
+
parseCondition: (
|
|
303
|
+
options: ParseConditionRequest,
|
|
304
|
+
requestConfig?: any,
|
|
305
|
+
) => Promise<any>;
|
|
306
|
+
executeWorkflow: (
|
|
307
|
+
options: ExecuteRequest,
|
|
308
|
+
requestConfig?: any,
|
|
309
|
+
) => Promise<any>;
|
|
310
|
+
createReport: (
|
|
311
|
+
options: CreateReportRequest,
|
|
312
|
+
requestConfig?: any,
|
|
313
|
+
) => Promise<any>;
|
|
314
|
+
getReport: (options: GetReportRequest, requestConfig?: any) => Promise<any>;
|
|
315
|
+
executeOnChange: (
|
|
316
|
+
options: ExecuteOnChangeRequest,
|
|
317
|
+
requestConfig?: any,
|
|
318
|
+
) => Promise<any>;
|
|
319
|
+
defaultGet: (options: DefaultGetRequest, requestConfig?: any) => Promise<any>;
|
|
320
|
+
getActionData: (
|
|
321
|
+
{
|
|
322
|
+
action,
|
|
323
|
+
context,
|
|
324
|
+
}: {
|
|
325
|
+
action: string;
|
|
326
|
+
context?: any;
|
|
327
|
+
},
|
|
328
|
+
requestConfig?: any,
|
|
329
|
+
) => Promise<any>;
|
|
330
|
+
nameSearch: (options: NameSearchRequest, requestConfig?: any) => Promise<any>;
|
|
331
|
+
duplicate: (options: DuplicateRequest, requestConfig?: any) => Promise<any>;
|
|
332
|
+
evalDomain: (options: EvalDomainRequest, requestConfig?: any) => Promise<any>;
|
|
333
|
+
getLogInfo: (options: GetLogInfoRequest, requestConfig?: any) => Promise<any>;
|
|
293
334
|
isShortcutFavorite: (
|
|
294
|
-
options: IsShortcutFavoriteOptions
|
|
335
|
+
options: IsShortcutFavoriteOptions,
|
|
336
|
+
requestConfig?: any,
|
|
295
337
|
) => Promise<number | boolean>;
|
|
296
|
-
removeFavourite: (
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
338
|
+
removeFavourite: (
|
|
339
|
+
{ shortcut_id }: { shortcut_id: number },
|
|
340
|
+
requestConfig?: any,
|
|
341
|
+
) => Promise<void>;
|
|
342
|
+
addFavourite: (
|
|
343
|
+
options: IsShortcutFavoriteOptions,
|
|
344
|
+
requestConfig?: any,
|
|
345
|
+
) => Promise<void>;
|
|
346
|
+
treeButOpen: (
|
|
347
|
+
options: TreeButOpenOptions,
|
|
348
|
+
requestConfig?: any,
|
|
349
|
+
) => Promise<any>;
|
|
350
|
+
exportData: (options: ExportDataOptions, requestConfig?: any) => Promise<any>;
|
|
300
351
|
};
|
|
301
352
|
|
|
302
353
|
type ViewType = "tree" | "form" | "dashboard" | "graph" | "calendar";
|
|
@@ -7,8 +7,7 @@ import {
|
|
|
7
7
|
FormOutlined,
|
|
8
8
|
EditOutlined,
|
|
9
9
|
} from "@ant-design/icons";
|
|
10
|
-
import { Button, Col, Row, Spin, Tooltip, theme } from "antd";
|
|
11
|
-
import { Menu, Dropdown } from "antd";
|
|
10
|
+
import { Button, Col, Row, Spin, Tooltip, theme, Menu, Dropdown } from "antd";
|
|
12
11
|
import showErrorDialog from "@/ui/ActionErrorDialog";
|
|
13
12
|
import {
|
|
14
13
|
TabManagerContext,
|
|
@@ -61,7 +60,7 @@ const FavouriteButton = (props: Props) => {
|
|
|
61
60
|
const { token } = useToken();
|
|
62
61
|
|
|
63
62
|
const tabManagerContext = useContext(
|
|
64
|
-
TabManagerContext
|
|
63
|
+
TabManagerContext,
|
|
65
64
|
) as TabManagerContextType;
|
|
66
65
|
const {
|
|
67
66
|
openShortcut,
|
package/src/views/ActionView.tsx
CHANGED
|
@@ -82,8 +82,9 @@ function ActionView(props: Props, ref: any) {
|
|
|
82
82
|
? (res_id as number)
|
|
83
83
|
: undefined;
|
|
84
84
|
|
|
85
|
-
const [currentId, setCurrentIdInternal] =
|
|
86
|
-
|
|
85
|
+
const [currentId, setCurrentIdInternal] = useState<number | undefined>(
|
|
86
|
+
res_id_parsed,
|
|
87
|
+
);
|
|
87
88
|
const [selectedRowItems, setSelectedRowItems] = useState<any[]>([]);
|
|
88
89
|
const [currentItemIndex, setCurrentItemIndex] = useState<number>();
|
|
89
90
|
const [results, setResults] = useState<any>([]);
|
|
@@ -95,13 +96,13 @@ function ActionView(props: Props, ref: any) {
|
|
|
95
96
|
useState<boolean>(false);
|
|
96
97
|
const [searchTreeNameSearch, setSearchTreeNameSearch] = useState<string>();
|
|
97
98
|
|
|
98
|
-
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
99
|
+
const { t } = (useContext(LocaleContext) as LocaleContextType) || {};
|
|
99
100
|
|
|
100
101
|
const formRef = useRef();
|
|
101
102
|
const searchTreeRef = useRef();
|
|
102
103
|
|
|
103
104
|
const tabManagerContext = useContext(
|
|
104
|
-
TabManagerContext
|
|
105
|
+
TabManagerContext,
|
|
105
106
|
) as TabManagerContextType;
|
|
106
107
|
const {
|
|
107
108
|
setCurrentView: setCurrentViewTabContext,
|
|
@@ -118,7 +119,7 @@ function ActionView(props: Props, ref: any) {
|
|
|
118
119
|
event.preventDefault();
|
|
119
120
|
handleGoToRecordShortcut();
|
|
120
121
|
},
|
|
121
|
-
[activeKey, tabs, currentView, currentItemIndex, results]
|
|
122
|
+
[activeKey, tabs, currentView, currentItemIndex, results],
|
|
122
123
|
);
|
|
123
124
|
|
|
124
125
|
function setCurrentId(id?: number) {
|
|
@@ -170,7 +171,7 @@ function ActionView(props: Props, ref: any) {
|
|
|
170
171
|
|
|
171
172
|
const [, viewType] = view.viewTuple;
|
|
172
173
|
|
|
173
|
-
|
|
174
|
+
const viewInfo = view.info;
|
|
174
175
|
|
|
175
176
|
switch (viewType) {
|
|
176
177
|
case "dashboard": {
|
|
@@ -228,16 +229,16 @@ function ActionView(props: Props, ref: any) {
|
|
|
228
229
|
break;
|
|
229
230
|
}
|
|
230
231
|
}
|
|
231
|
-
let currentViewToAssign
|
|
232
|
+
let currentViewToAssign;
|
|
232
233
|
|
|
233
234
|
if (!initialView && viewDataRetrieved.find((v) => v.type === "tree")) {
|
|
234
235
|
const treeView: TreeView = viewDataRetrieved.find(
|
|
235
|
-
(v) => v.type === "tree"
|
|
236
|
+
(v) => v.type === "tree",
|
|
236
237
|
) as TreeView;
|
|
237
238
|
currentViewToAssign = treeView;
|
|
238
239
|
} else if (!initialView) {
|
|
239
240
|
const formView: TreeView = viewDataRetrieved.find(
|
|
240
|
-
(v) => v.type === "form"
|
|
241
|
+
(v) => v.type === "form",
|
|
241
242
|
) as TreeView;
|
|
242
243
|
currentViewToAssign = formView;
|
|
243
244
|
} else {
|
|
@@ -253,7 +254,7 @@ function ActionView(props: Props, ref: any) {
|
|
|
253
254
|
|
|
254
255
|
if (!currentViewToAssign) {
|
|
255
256
|
showErrorDialog(
|
|
256
|
-
`Error determining the first view to show for model ${model}.\nPlease, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action
|
|
257
|
+
`Error determining the first view to show for model ${model}.\nPlease, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`,
|
|
257
258
|
);
|
|
258
259
|
onRemoveTab?.(tabKey);
|
|
259
260
|
}
|
|
@@ -457,7 +458,7 @@ function ActionView(props: Props, ref: any) {
|
|
|
457
458
|
} else {
|
|
458
459
|
setCurrentId(undefined);
|
|
459
460
|
const formView: FormView = availableViews.find(
|
|
460
|
-
(v) => v.type === "form"
|
|
461
|
+
(v) => v.type === "form",
|
|
461
462
|
) as FormView;
|
|
462
463
|
setCurrentView(formView);
|
|
463
464
|
}
|
package/src/views/RootView.tsx
CHANGED
|
@@ -10,8 +10,7 @@ import Welcome from "./Welcome";
|
|
|
10
10
|
import TabManagerProvider from "@/context/TabManagerContext";
|
|
11
11
|
import ActionView from "./ActionView";
|
|
12
12
|
import { parseContext } from "@gisce/ooui";
|
|
13
|
-
import LocaleContextProvider from "@/context/LocaleContext";
|
|
14
|
-
import { tForLang } from "@/context/LocaleContext";
|
|
13
|
+
import LocaleContextProvider, { tForLang } from "@/context/LocaleContext";
|
|
15
14
|
import { ShortcutApi } from "@/ui/FavouriteButton";
|
|
16
15
|
import showErrorDialog from "@/ui/ActionErrorDialog";
|
|
17
16
|
import { InitialViewData, ViewType } from "@/types";
|
|
@@ -154,7 +153,7 @@ function RootView(props: RootViewProps, ref: any) {
|
|
|
154
153
|
|
|
155
154
|
if (initialViewType) {
|
|
156
155
|
const [id, type] = finalViews.find(
|
|
157
|
-
([_, type]) => type === initialViewType
|
|
156
|
+
([_, type]) => type === initialViewType,
|
|
158
157
|
);
|
|
159
158
|
initialView = { id, type };
|
|
160
159
|
} else {
|
|
@@ -245,7 +244,7 @@ function RootView(props: RootViewProps, ref: any) {
|
|
|
245
244
|
|
|
246
245
|
const parsedDomain = domain
|
|
247
246
|
? await ConnectionProvider.getHandler().evalDomain({
|
|
248
|
-
domain
|
|
247
|
+
domain,
|
|
249
248
|
values: transformPlainMany2Ones({
|
|
250
249
|
fields,
|
|
251
250
|
values: { ...values, ...globalValues },
|
|
@@ -403,7 +402,7 @@ function RootView(props: RootViewProps, ref: any) {
|
|
|
403
402
|
domain: any;
|
|
404
403
|
context: any;
|
|
405
404
|
model: string;
|
|
406
|
-
views:
|
|
405
|
+
views: any[];
|
|
407
406
|
title: string;
|
|
408
407
|
target: string;
|
|
409
408
|
initialView: InitialViewData;
|
|
@@ -484,7 +483,7 @@ function RootView(props: RootViewProps, ref: any) {
|
|
|
484
483
|
activeKey={activeKey}
|
|
485
484
|
onRemoveTab={async (key: string) => {
|
|
486
485
|
const canWeCloseFn = tabViewsCloseFunctions.current.get(
|
|
487
|
-
key as string
|
|
486
|
+
key as string,
|
|
488
487
|
);
|
|
489
488
|
const canWeClose = await canWeCloseFn?.();
|
|
490
489
|
|
|
@@ -2,7 +2,6 @@ import React, { useRef, useContext } from "react";
|
|
|
2
2
|
import { Row, Col, Button, Input, Space, theme } from "antd";
|
|
3
3
|
import Field from "@/common/Field";
|
|
4
4
|
import { Binary as BinaryOoui } from "@gisce/ooui";
|
|
5
|
-
const { useToken } = theme;
|
|
6
5
|
import ButtonWithTooltip from "@/common/ButtonWithTooltip";
|
|
7
6
|
import {
|
|
8
7
|
FolderOpenOutlined,
|
|
@@ -19,6 +18,7 @@ import {
|
|
|
19
18
|
openBase64InNewTab,
|
|
20
19
|
toBase64,
|
|
21
20
|
} from "@/helpers/filesHelper";
|
|
21
|
+
const { useToken } = theme;
|
|
22
22
|
|
|
23
23
|
type Props = {
|
|
24
24
|
ooui: BinaryOoui;
|
|
@@ -68,7 +68,7 @@ export const BinaryInput = (props: BinaryInputProps) => {
|
|
|
68
68
|
const name = getFieldValue("name");
|
|
69
69
|
|
|
70
70
|
downloadLink.href = linkSource;
|
|
71
|
-
downloadLink.download = fileName ||
|
|
71
|
+
downloadLink.download = fileName || name;
|
|
72
72
|
downloadLink.click();
|
|
73
73
|
}
|
|
74
74
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Checkbox as AntCheckbox } from "antd";
|
|
2
|
+
import { Checkbox as AntCheckbox, theme } from "antd";
|
|
3
3
|
import styled from "styled-components";
|
|
4
4
|
|
|
5
5
|
import Field from "@/common/Field";
|
|
6
6
|
import { WidgetProps } from "@/types";
|
|
7
|
-
import { theme } from "antd";
|
|
8
7
|
|
|
9
8
|
const { defaultAlgorithm, defaultSeed } = theme;
|
|
10
9
|
|
|
@@ -3,9 +3,9 @@ import { InputNumber, theme } from "antd";
|
|
|
3
3
|
import Field from "@/common/Field";
|
|
4
4
|
import { Float as FloatOoui } from "@gisce/ooui";
|
|
5
5
|
import { WidgetProps } from "@/types";
|
|
6
|
-
const { useToken } = theme;
|
|
7
6
|
|
|
8
7
|
import { FormContext, FormContextType } from "@/context/FormContext";
|
|
8
|
+
const { useToken } = theme;
|
|
9
9
|
|
|
10
10
|
export const Float = (props: WidgetProps) => {
|
|
11
11
|
const { ooui } = props;
|
|
@@ -33,10 +33,10 @@ export const Integer = (props: IntegerProps) => {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
if (typeof value === "string" && !isNaN(parseFloat(value))) {
|
|
36
|
-
|
|
36
|
+
const truncatedValue = Math.trunc(parseFloat(value));
|
|
37
37
|
return `${truncatedValue}`.replace(/[^0-9\-]+/g, "");
|
|
38
38
|
} else if (typeof value === "number") {
|
|
39
|
-
|
|
39
|
+
const truncatedValue = Math.trunc(value);
|
|
40
40
|
return `${truncatedValue}`.replace(/[^0-9\-]+/g, "");
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -22,10 +22,10 @@ const Label = (props: Props) => {
|
|
|
22
22
|
const { ooui, align, responsiveBehaviour } = props;
|
|
23
23
|
const { label, tooltip, fieldForLabel, labelSize, labelType } =
|
|
24
24
|
ooui as LabelOoui;
|
|
25
|
-
const addColon = fieldForLabel !== null
|
|
25
|
+
const addColon = fieldForLabel !== null;
|
|
26
26
|
const labelText = addColon && label.length > 1 ? label + " :" : label;
|
|
27
27
|
const responsiveAlign = responsiveBehaviour ? "left" : "right";
|
|
28
|
-
const labelAlgin = align
|
|
28
|
+
const labelAlgin = align || (fieldForLabel ? responsiveAlign : "left");
|
|
29
29
|
const { token } = useToken();
|
|
30
30
|
|
|
31
31
|
const TextType = labelSize === undefined ? Text : Title;
|
|
@@ -36,16 +36,16 @@ const Label = (props: Props) => {
|
|
|
36
36
|
>
|
|
37
37
|
{tooltip && (
|
|
38
38
|
<Tooltip title={tooltip}>
|
|
39
|
-
<QuestionCircleOutlined
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
<QuestionCircleOutlined
|
|
40
|
+
className="pr-1 text-xs"
|
|
41
|
+
style={{
|
|
42
|
+
color: token.colorPrimary,
|
|
43
|
+
}}
|
|
44
|
+
/>
|
|
42
45
|
</Tooltip>
|
|
43
46
|
)}
|
|
44
47
|
<span className="pr-2">
|
|
45
|
-
<TextType
|
|
46
|
-
level={labelSize}
|
|
47
|
-
type={labelType as any}
|
|
48
|
-
>
|
|
48
|
+
<TextType level={labelSize} type={labelType as any}>
|
|
49
49
|
<Interweave content={labelText} />
|
|
50
50
|
</TextType>
|
|
51
51
|
</span>
|
|
@@ -74,7 +74,11 @@ export const LinkInput = (props: LinkInputProps) => {
|
|
|
74
74
|
<Col flex="auto">
|
|
75
75
|
{showInput ? (
|
|
76
76
|
<Input
|
|
77
|
-
style={{
|
|
77
|
+
style={{
|
|
78
|
+
borderTopLeftRadius: 0,
|
|
79
|
+
borderBottomLeftRadius: 0,
|
|
80
|
+
...requiredStyle,
|
|
81
|
+
}}
|
|
78
82
|
id={id}
|
|
79
83
|
onChange={onValueStringChange}
|
|
80
84
|
value={value}
|
|
@@ -91,6 +95,7 @@ export const LinkInput = (props: LinkInputProps) => {
|
|
|
91
95
|
href={`${linkPrefix}${value}`}
|
|
92
96
|
style={{ color: token.colorPrimary, paddingRight: 15 }}
|
|
93
97
|
target="_blank"
|
|
98
|
+
rel="noreferrer"
|
|
94
99
|
>
|
|
95
100
|
{value}
|
|
96
101
|
</a>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Select } from "antd";
|
|
2
|
+
import { Select, theme } from "antd";
|
|
3
3
|
import styled from "styled-components";
|
|
4
4
|
|
|
5
5
|
import Field from "@/common/Field";
|
|
6
6
|
import { Selection as SelectionOoui } from "@gisce/ooui";
|
|
7
7
|
import { WidgetProps } from "@/types";
|
|
8
|
-
import { theme } from "antd";
|
|
9
8
|
|
|
10
9
|
const { defaultAlgorithm, defaultSeed } = theme;
|
|
11
10
|
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Select } from "antd";
|
|
2
|
+
import { Select, theme } from "antd";
|
|
3
3
|
import styled from "styled-components";
|
|
4
4
|
|
|
5
5
|
import Field from "@/common/Field";
|
|
6
6
|
import { Selection as SelectionOoui } from "@gisce/ooui";
|
|
7
7
|
import { WidgetProps } from "@/types";
|
|
8
|
-
import { theme } from "antd";
|
|
9
8
|
|
|
10
9
|
const { defaultAlgorithm, defaultSeed } = theme;
|
|
11
10
|
|
|
@@ -50,9 +49,16 @@ export const SelectionInput = (props: SelectionInputProps) => {
|
|
|
50
49
|
const CustomSelect: any = required && !readOnly ? RequiredSelect : Select;
|
|
51
50
|
|
|
52
51
|
return (
|
|
53
|
-
<CustomSelect
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
<CustomSelect
|
|
53
|
+
disabled={readOnly}
|
|
54
|
+
onChange={onChange}
|
|
55
|
+
value={value}
|
|
56
|
+
optionFilterProp="children"
|
|
57
|
+
filterOption={(input: string, option: any) =>
|
|
58
|
+
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
59
|
+
}
|
|
60
|
+
showSearch
|
|
61
|
+
>
|
|
56
62
|
{options}
|
|
57
63
|
</CustomSelect>
|
|
58
64
|
);
|
|
@@ -3,12 +3,10 @@ import { TimePicker, theme } from "antd";
|
|
|
3
3
|
import Field from "@/common/Field";
|
|
4
4
|
import { Time as TimeOoui } from "@gisce/ooui";
|
|
5
5
|
import { WidgetProps } from "@/types";
|
|
6
|
-
import dayjs from "dayjs";
|
|
7
|
-
import
|
|
8
|
-
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
|
6
|
+
import dayjs, { Dayjs } from "dayjs";
|
|
7
|
+
import customParseFormat from "dayjs/plugin/customParseFormat";
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
dayjs.extend(customParseFormat)
|
|
9
|
+
dayjs.extend(customParseFormat);
|
|
12
10
|
|
|
13
11
|
const Time = (props: WidgetProps) => {
|
|
14
12
|
const { ooui } = props;
|
|
@@ -24,18 +22,21 @@ type TimeInputProps = {
|
|
|
24
22
|
ooui: TimeOoui;
|
|
25
23
|
value?: string;
|
|
26
24
|
onChange?: (value?: string) => void;
|
|
27
|
-
}
|
|
25
|
+
};
|
|
28
26
|
|
|
29
27
|
export const TimeInput = (props: TimeInputProps) => {
|
|
30
|
-
|
|
31
28
|
const onChange = (time: Dayjs | null, timestring: string) => {
|
|
32
29
|
if (props.onChange) {
|
|
33
|
-
props.onChange(timestring)
|
|
30
|
+
props.onChange(timestring);
|
|
34
31
|
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
return <TimePicker onChange={onChange} value={props.value ? dayjs(props.value, 'HH:mm:ss') : undefined} />
|
|
32
|
+
};
|
|
38
33
|
|
|
39
|
-
|
|
34
|
+
return (
|
|
35
|
+
<TimePicker
|
|
36
|
+
onChange={onChange}
|
|
37
|
+
value={props.value ? dayjs(props.value, "HH:mm:ss") : undefined}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
};
|
|
40
41
|
|
|
41
42
|
export default Time;
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect, useContext } from "react";
|
|
2
|
-
import { Input, Button, Row, Col } from "antd";
|
|
2
|
+
import { Input, Button, Row, Col, theme } from "antd";
|
|
3
3
|
import {
|
|
4
4
|
SearchOutlined,
|
|
5
5
|
FolderOpenOutlined,
|
|
6
6
|
LoadingOutlined,
|
|
7
7
|
} from "@ant-design/icons";
|
|
8
8
|
import styled from "styled-components";
|
|
9
|
-
import { theme } from "antd";
|
|
10
|
-
|
|
11
|
-
const { defaultAlgorithm, defaultSeed } = theme;
|
|
12
|
-
|
|
13
|
-
const mapToken = defaultAlgorithm(defaultSeed);
|
|
14
9
|
|
|
15
10
|
import {
|
|
16
11
|
Many2one as Many2oneOoui,
|
|
@@ -25,6 +20,10 @@ import showErrorDialog from "@/ui/GenericErrorDialog";
|
|
|
25
20
|
import { FormContext, FormContextType } from "@/context/FormContext";
|
|
26
21
|
import { transformPlainMany2Ones } from "@/helpers/formHelper";
|
|
27
22
|
|
|
23
|
+
const { defaultAlgorithm, defaultSeed } = theme;
|
|
24
|
+
|
|
25
|
+
const mapToken = defaultAlgorithm(defaultSeed);
|
|
26
|
+
|
|
28
27
|
type Props = {
|
|
29
28
|
ooui: Many2oneOoui;
|
|
30
29
|
onOpenDetailClick?:
|
|
@@ -58,7 +57,7 @@ interface Many2oneInputProps {
|
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
export const Many2oneInput: React.FC<Many2oneInputProps> = (
|
|
61
|
-
props: Many2oneInputProps
|
|
60
|
+
props: Many2oneInputProps,
|
|
62
61
|
) => {
|
|
63
62
|
const { value, onChange, ooui } = props;
|
|
64
63
|
const {
|
|
@@ -216,7 +215,7 @@ export const Many2oneInput: React.FC<Many2oneInputProps> = (
|
|
|
216
215
|
transformDomainForChildWidget({
|
|
217
216
|
domain,
|
|
218
217
|
widgetFieldName: fieldName,
|
|
219
|
-
})
|
|
218
|
+
}),
|
|
220
219
|
);
|
|
221
220
|
}
|
|
222
221
|
|
|
@@ -38,12 +38,12 @@ export const Many2oneSuffix = (props: Props) => {
|
|
|
38
38
|
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
39
39
|
|
|
40
40
|
const tabManagerContext = useContext(
|
|
41
|
-
TabManagerContext
|
|
41
|
+
TabManagerContext,
|
|
42
42
|
) as TabManagerContextType;
|
|
43
43
|
const { openRelate } = tabManagerContext || {};
|
|
44
44
|
|
|
45
45
|
const contentRootContext = useContext(
|
|
46
|
-
ContentRootContext
|
|
46
|
+
ContentRootContext,
|
|
47
47
|
) as ContentRootContextType;
|
|
48
48
|
const { processAction } = contentRootContext || {};
|
|
49
49
|
|
|
@@ -55,22 +55,34 @@ export const Many2oneSuffix = (props: Props) => {
|
|
|
55
55
|
setIsLoading(true);
|
|
56
56
|
|
|
57
57
|
try {
|
|
58
|
-
const formView = await ConnectionProvider.getHandler().getView({
|
|
58
|
+
const formView = (await ConnectionProvider.getHandler().getView({
|
|
59
59
|
model,
|
|
60
60
|
type: "form",
|
|
61
61
|
context,
|
|
62
|
-
}) as FormView;
|
|
62
|
+
})) as FormView;
|
|
63
63
|
setFormView(formView);
|
|
64
64
|
let fields: string[] = [];
|
|
65
65
|
const { toolbar } = formView;
|
|
66
|
-
toolbar.action
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
toolbar.
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
toolbar.action
|
|
67
|
+
?.filter((item: any) => item.hasOwnProperty("context"))
|
|
68
|
+
.map((item: any) => fields.push(...parseContextFields(item.context)));
|
|
69
|
+
toolbar.action
|
|
70
|
+
?.filter((item: any) => item.hasOwnProperty("domain"))
|
|
71
|
+
.map((item: any) => fields.push(...parseDomainFields(item.domain)));
|
|
72
|
+
toolbar.relate
|
|
73
|
+
?.filter((item: any) => item.hasOwnProperty("context"))
|
|
74
|
+
.map((item: any) => fields.push(...parseContextFields(item.context)));
|
|
75
|
+
toolbar.relate
|
|
76
|
+
?.filter((item: any) => item.hasOwnProperty("domain"))
|
|
77
|
+
.map((item: any) => fields.push(...parseDomainFields(item.domain)));
|
|
78
|
+
toolbar.print
|
|
79
|
+
?.filter((item: any) => item.hasOwnProperty("context"))
|
|
80
|
+
.map((item: any) => fields.push(...parseContextFields(item.context)));
|
|
81
|
+
fields = fields.filter(
|
|
82
|
+
(i) => Object.keys(formView.fields).indexOf(i) > -1,
|
|
83
|
+
);
|
|
72
84
|
|
|
73
|
-
let values = {}
|
|
85
|
+
let values = {};
|
|
74
86
|
|
|
75
87
|
if (fields.length > 0) {
|
|
76
88
|
values = (
|
|
@@ -89,7 +101,6 @@ export const Many2oneSuffix = (props: Props) => {
|
|
|
89
101
|
} catch (err) {
|
|
90
102
|
setIsLoading(false);
|
|
91
103
|
showErrorDialog(err);
|
|
92
|
-
return;
|
|
93
104
|
}
|
|
94
105
|
}
|
|
95
106
|
|