@gisce/react-ooui 1.5.2-alpha.1 → 1.5.2-rc.0
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 +13 -0
- package/dist/actionbar/ActionButton.d.ts.map +1 -0
- package/dist/actionbar/AttachmentsButton.d.ts +12 -0
- package/dist/actionbar/AttachmentsButton.d.ts.map +1 -0
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts +19 -0
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts.map +1 -0
- package/dist/actionbar/ButtonWithBadge.d.ts +8 -0
- package/dist/actionbar/ButtonWithBadge.d.ts.map +1 -0
- package/dist/actionbar/ChangeViewButton.d.ts +13 -0
- package/dist/actionbar/ChangeViewButton.d.ts.map +1 -0
- package/dist/actionbar/DashboardActionBar.d.ts +4 -0
- package/dist/actionbar/DashboardActionBar.d.ts.map +1 -0
- package/dist/actionbar/DropdownButton.d.ts +12 -0
- package/dist/actionbar/DropdownButton.d.ts.map +1 -0
- package/dist/actionbar/FormActionBar.d.ts +6 -0
- package/dist/actionbar/FormActionBar.d.ts.map +1 -0
- package/dist/actionbar/GraphActionBar.d.ts +6 -0
- package/dist/actionbar/GraphActionBar.d.ts.map +1 -0
- package/dist/actionbar/NewButton.d.ts +7 -0
- package/dist/actionbar/NewButton.d.ts.map +1 -0
- package/dist/actionbar/SearchBar.d.ts +9 -0
- package/dist/actionbar/SearchBar.d.ts.map +1 -0
- package/dist/actionbar/TreeActionBar.d.ts +9 -0
- package/dist/actionbar/TreeActionBar.d.ts.map +1 -0
- package/dist/common/ButtonWithTooltip.d.ts +8 -0
- package/dist/common/ButtonWithTooltip.d.ts.map +1 -0
- package/dist/common/DatePicker.d.ts +20 -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 +10 -0
- package/dist/common/SelectAllRecordsRow.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 +7 -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/dynamicColumnsHelper.d.ts +8 -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/useExport.d.ts +44 -0
- package/dist/hooks/useExport.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 +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/locales/ca_ES.d.ts +93 -0
- package/dist/locales/ca_ES.d.ts.map +1 -0
- package/dist/locales/en_US.d.ts +93 -0
- package/dist/locales/en_US.d.ts.map +1 -0
- package/dist/locales/es_ES.d.ts +93 -0
- package/dist/locales/es_ES.d.ts.map +1 -0
- package/dist/react-ooui.es.js +11763 -0
- package/dist/react-ooui.es.js.map +1 -0
- package/dist/react-ooui.umd.js +42 -0
- package/dist/react-ooui.umd.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +256 -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 +6 -0
- package/dist/ui/ErrorAlert.d.ts.map +1 -0
- package/dist/ui/FavouriteButton.d.ts +26 -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 +10 -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 +8 -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 +4 -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 +4 -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 +18 -0
- package/dist/views/actionViews/FormActionView.d.ts.map +1 -0
- package/dist/views/actionViews/GraphActionView.d.ts +13 -0
- package/dist/views/actionViews/GraphActionView.d.ts.map +1 -0
- package/dist/views/actionViews/TreeActionView.d.ts +20 -0
- package/dist/views/actionViews/TreeActionView.d.ts.map +1 -0
- package/dist/views/tabs/Tab.d.ts +11 -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 +14 -0
- package/dist/widgets/base/Binary.d.ts.map +1 -0
- package/dist/widgets/base/Boolean.d.ts +4 -0
- package/dist/widgets/base/Boolean.d.ts.map +1 -0
- package/dist/widgets/base/Button.d.ts +8 -0
- package/dist/widgets/base/Button.d.ts.map +1 -0
- package/dist/widgets/base/Char.d.ts +8 -0
- package/dist/widgets/base/Char.d.ts.map +1 -0
- package/dist/widgets/base/Date.d.ts +5 -0
- package/dist/widgets/base/Date.d.ts.map +1 -0
- package/dist/widgets/base/DateTime.d.ts +5 -0
- package/dist/widgets/base/DateTime.d.ts.map +1 -0
- package/dist/widgets/base/Email.d.ts +4 -0
- package/dist/widgets/base/Email.d.ts.map +1 -0
- package/dist/widgets/base/Float.d.ts +4 -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 +14 -0
- package/dist/widgets/base/Image.d.ts.map +1 -0
- package/dist/widgets/base/Integer.d.ts +8 -0
- package/dist/widgets/base/Integer.d.ts.map +1 -0
- package/dist/widgets/base/Label.d.ts +9 -0
- package/dist/widgets/base/Label.d.ts.map +1 -0
- package/dist/widgets/base/LinkInput.d.ts +12 -0
- package/dist/widgets/base/LinkInput.d.ts.map +1 -0
- package/dist/widgets/base/MultiSelection.d.ts +10 -0
- package/dist/widgets/base/MultiSelection.d.ts.map +1 -0
- package/dist/widgets/base/ProgressBar.d.ts +7 -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 +10 -0
- package/dist/widgets/base/Selection.d.ts.map +1 -0
- package/dist/widgets/base/Separator.d.ts +8 -0
- package/dist/widgets/base/Separator.d.ts.map +1 -0
- package/dist/widgets/base/Text.d.ts +8 -0
- package/dist/widgets/base/Text.d.ts.map +1 -0
- package/dist/widgets/base/Time.d.ts +12 -0
- package/dist/widgets/base/Time.d.ts.map +1 -0
- package/dist/widgets/base/Url.d.ts +4 -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 +9 -0
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts.map +1 -0
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts +10 -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 +8 -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 +23 -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 +8 -0
- package/dist/widgets/custom/ButtonGroup.d.ts.map +1 -0
- package/dist/widgets/custom/CodeEditor.d.ts +9 -0
- package/dist/widgets/custom/CodeEditor.d.ts.map +1 -0
- package/dist/widgets/custom/Comments.d.ts +35 -0
- package/dist/widgets/custom/Comments.d.ts.map +1 -0
- package/dist/widgets/custom/FiberGrid.d.ts +10 -0
- package/dist/widgets/custom/FiberGrid.d.ts.map +1 -0
- package/dist/widgets/custom/Indicator.d.ts +10 -0
- package/dist/widgets/custom/Indicator.d.ts.map +1 -0
- package/dist/widgets/custom/Markdown.d.ts +5 -0
- package/dist/widgets/custom/Markdown.d.ts.map +1 -0
- package/dist/widgets/custom/MultiCheckbox.d.ts +14 -0
- package/dist/widgets/custom/MultiCheckbox.d.ts.map +1 -0
- package/dist/widgets/custom/Radio.d.ts +10 -0
- package/dist/widgets/custom/Radio.d.ts.map +1 -0
- package/dist/widgets/custom/Steps.d.ts +13 -0
- package/dist/widgets/custom/Steps.d.ts.map +1 -0
- package/dist/widgets/custom/Switch.d.ts +4 -0
- package/dist/widgets/custom/Switch.d.ts.map +1 -0
- package/dist/widgets/custom/Tag.d.ts +7 -0
- package/dist/widgets/custom/Tag.d.ts.map +1 -0
- package/dist/widgets/custom/Tags.d.ts +15 -0
- package/dist/widgets/custom/Tags.d.ts.map +1 -0
- package/dist/widgets/custom/Timeline.d.ts +16 -0
- package/dist/widgets/custom/Timeline.d.ts.map +1 -0
- package/dist/widgets/modals/ExportModal.d.ts +15 -0
- package/dist/widgets/modals/ExportModal.d.ts.map +1 -0
- package/dist/widgets/modals/FormModal.d.ts +12 -0
- package/dist/widgets/modals/FormModal.d.ts.map +1 -0
- package/dist/widgets/modals/SearchModal.d.ts +13 -0
- package/dist/widgets/modals/SearchModal.d.ts.map +1 -0
- package/dist/widgets/modals/TranslationModal.d.ts +12 -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 +4 -0
- package/dist/widgets/views/Dashboard/DashboardForm.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts +19 -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 +4 -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 +4 -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 +11 -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 +17 -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.d.ts +32 -0
- package/dist/widgets/views/Tree.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts +4 -0
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts +4 -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 +8 -0
- package/dist/widgets/views/searchFilter/SearchField.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts +20 -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 -74
- 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 +5 -4
- package/src/context/ContentRootContext.tsx +54 -61
- package/src/context/TabManagerContext.tsx +4 -3
- package/src/helpers/dynamicColumnsHelper.ts +1 -1
- package/src/helpers/filesHelper.ts +7 -7
- package/src/helpers/formHelper.ts +24 -23
- package/src/helpers/one2manyHelper.ts +6 -6
- package/src/helpers/searchHelper.ts +5 -8
- package/src/helpers/treeHelper.ts +7 -7
- package/src/helpers/viewHelper.ts +2 -2
- package/src/hooks/useExport.ts +3 -2
- package/src/hooks/useSearch.ts +8 -8
- package/src/index.ts +0 -4
- package/src/stories/Binary.stories.tsx +3 -0
- package/src/stories/Boolean.stories.tsx +3 -0
- package/src/stories/Button.stories.tsx +14 -8
- package/src/stories/Char.stories.tsx +3 -0
- package/src/stories/FiberGrid.stories.tsx +3 -0
- package/src/stories/Float.stories.tsx +3 -0
- package/src/stories/FloatTime.stories.tsx +3 -0
- package/src/stories/Image.stories.tsx +3 -0
- package/src/stories/Integer.stories.tsx +3 -0
- package/src/stories/Label.stories.tsx +3 -0
- package/src/stories/Many2one.stories.tsx +3 -0
- package/src/stories/One2many.stories.tsx +11 -4
- package/src/stories/ProgressBar.stories.tsx +3 -0
- package/src/stories/Reference.stories.tsx +3 -0
- package/src/stories/Selection.stories.tsx +3 -0
- package/src/stories/Separator.stories.tsx +7 -3
- package/src/stories/Text.stories.tsx +3 -0
- package/src/stories/containers/Group.stories.tsx +5 -0
- package/src/stories/containers/NewLine.stories.tsx +4 -0
- package/src/stories/containers/Notebook.stories.tsx +5 -0
- package/src/stories/custom/Avatar.stories.tsx +1 -0
- package/src/stories/custom/ButtonGroup.stories.tsx +23 -36
- package/src/stories/custom/CodeEditor.stories.tsx +4 -1
- package/src/stories/custom/Indicator.stories.tsx +11 -3
- package/src/stories/custom/Markdown.stories.tsx +6 -2
- package/src/stories/custom/MultiCheckbox.stories.tsx +15 -20
- package/src/stories/custom/Radio.stories.tsx +16 -13
- package/src/stories/custom/Steps.stories.tsx +5 -7
- package/src/stories/custom/Switch.stories.tsx +3 -0
- package/src/stories/custom/Tag.stories.tsx +11 -17
- package/src/stories/custom/Tags.stories.tsx +16 -20
- package/src/stories/forms/PreferencesForm.stories.tsx +4 -0
- package/src/stories/ui/ActionBar.stories.tsx +3 -0
- package/src/stories/ui/FavouriteButton.stories.tsx +3 -0
- package/src/stories/ui/GoToResourceModal.stories.tsx +3 -0
- package/src/stories/views/SearchTree.stories.tsx +89 -43
- package/src/stories/views/Tab.stories.tsx +3 -0
- package/src/stories/views/TabsAndContent.stories.tsx +3 -0
- package/src/stories/views/Tree.stories.jsx +4 -0
- package/src/stories/views/searchFilter/DateRangePicker.stories.tsx +3 -0
- package/src/stories/views/searchFilter/DateTimeRangePicker.stories.tsx +3 -0
- package/src/stories/views/searchFilter/PairFields.stories.tsx +3 -0
- package/src/stories/views/searchFilter/SearchFilter.stories.tsx +4 -0
- package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +4 -0
- package/src/tailwind.css +8 -0
- package/src/tailwind.generated.css +168533 -0
- package/src/types/index.ts +43 -94
- package/src/ui/FavouriteButton.tsx +3 -2
- package/src/views/ActionView.tsx +11 -12
- package/src/views/RootView.tsx +6 -5
- package/src/widgets/base/Binary.tsx +2 -2
- package/src/widgets/base/Boolean.tsx +2 -1
- 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 +1 -6
- package/src/widgets/base/MultiSelection.tsx +2 -1
- package/src/widgets/base/Selection.tsx +5 -11
- package/src/widgets/base/Time.tsx +12 -13
- package/src/widgets/base/many2one/Many2one.tsx +8 -7
- package/src/widgets/base/many2one/Many2oneSuffix.tsx +12 -23
- package/src/widgets/base/one2many/One2manyInput.tsx +15 -14
- package/src/widgets/containers/Notebook.tsx +2 -9
- package/src/widgets/custom/ButtonGroup.tsx +10 -13
- package/src/widgets/custom/CodeEditor.tsx +3 -7
- package/src/widgets/custom/Comments.tsx +70 -76
- package/src/widgets/custom/Indicator.tsx +2 -1
- package/src/widgets/custom/MultiCheckbox.tsx +2 -2
- package/src/widgets/custom/Tag.tsx +16 -20
- 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 +11 -10
- package/src/widgets/views/Graph/GraphIndicator.tsx +7 -7
- package/src/widgets/views/SearchTree.tsx +2 -2
- package/src/widgets/views/Tree.tsx +16 -15
- package/src/widgets/views/searchFilter/DateTimeRangePicker.tsx +3 -1
package/src/types/index.ts
CHANGED
|
@@ -76,7 +76,7 @@ type SearchResponse = {
|
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
type SearchRequest = {
|
|
79
|
-
params: any
|
|
79
|
+
params: Array<any>;
|
|
80
80
|
limit?: number;
|
|
81
81
|
offset?: number;
|
|
82
82
|
model: string;
|
|
@@ -84,7 +84,6 @@ type SearchRequest = {
|
|
|
84
84
|
context?: any;
|
|
85
85
|
attrs?: any;
|
|
86
86
|
order?: number | string | null;
|
|
87
|
-
fieldsToRetrieve?: string[];
|
|
88
87
|
};
|
|
89
88
|
|
|
90
89
|
type SearchAllIdsRequest = SearchCountRequest & {
|
|
@@ -92,7 +91,7 @@ type SearchAllIdsRequest = SearchCountRequest & {
|
|
|
92
91
|
};
|
|
93
92
|
|
|
94
93
|
type SearchCountRequest = {
|
|
95
|
-
params: any
|
|
94
|
+
params: Array<any>;
|
|
96
95
|
model: string;
|
|
97
96
|
context?: any;
|
|
98
97
|
};
|
|
@@ -252,102 +251,52 @@ type ExportDataOptions = {
|
|
|
252
251
|
};
|
|
253
252
|
|
|
254
253
|
type ConnectionProviderType = {
|
|
255
|
-
getActionStringForModel: (
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}: {
|
|
264
|
-
action: string;
|
|
265
|
-
context?: any;
|
|
266
|
-
},
|
|
267
|
-
requestConfig?: any,
|
|
268
|
-
) => Promise<ViewData>;
|
|
254
|
+
getActionStringForModel: (model: string) => Promise<string>;
|
|
255
|
+
getViewsForAction: ({
|
|
256
|
+
action,
|
|
257
|
+
context,
|
|
258
|
+
}: {
|
|
259
|
+
action: string;
|
|
260
|
+
context?: any;
|
|
261
|
+
}) => Promise<ViewData>;
|
|
269
262
|
getView: (
|
|
270
|
-
options: GetViewRequest
|
|
271
|
-
requestConfig?: any,
|
|
263
|
+
options: GetViewRequest
|
|
272
264
|
) => Promise<FormView | TreeView | GraphView>;
|
|
273
|
-
getFields: (options: GetFieldsRequest
|
|
274
|
-
searchAllIds: (
|
|
275
|
-
|
|
276
|
-
requestConfig?: any,
|
|
277
|
-
) => Promise<number[]>;
|
|
278
|
-
searchCount: (
|
|
279
|
-
options: SearchCountRequest,
|
|
280
|
-
requestConfig?: any,
|
|
281
|
-
) => Promise<number>;
|
|
265
|
+
getFields: (options: GetFieldsRequest) => Promise<any>;
|
|
266
|
+
searchAllIds: (options: SearchAllIdsRequest) => Promise<number[]>;
|
|
267
|
+
searchCount: (options: SearchCountRequest) => Promise<number>;
|
|
282
268
|
search: (options: SearchRequest) => Promise<any[]>;
|
|
283
|
-
searchForTree: (
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
) => Promise<
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
) => Promise<any>;
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
) => Promise<any>;
|
|
306
|
-
|
|
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>;
|
|
269
|
+
searchForTree: (options: SearchRequest) => Promise<SearchResponse>;
|
|
270
|
+
update: (options: UpdateObjectRequest) => Promise<any>;
|
|
271
|
+
create: (options: CreateObjectRequest) => Promise<any>;
|
|
272
|
+
delete: (options: DeleteObjectsRequest) => Promise<any>;
|
|
273
|
+
execute: (options: ExecuteRequest) => Promise<any>;
|
|
274
|
+
readObjects: (options: ReadObjectsRequest) => Promise<any>;
|
|
275
|
+
readEvalUiObjects: (options: ReadEvalUiObjectsRequest) => Promise<any>;
|
|
276
|
+
parseCondition: (options: ParseConditionRequest) => Promise<any>;
|
|
277
|
+
executeWorkflow: (options: ExecuteRequest) => Promise<any>;
|
|
278
|
+
createReport: (options: CreateReportRequest) => Promise<any>;
|
|
279
|
+
getReport: (options: GetReportRequest) => Promise<any>;
|
|
280
|
+
executeOnChange: (options: ExecuteOnChangeRequest) => Promise<any>;
|
|
281
|
+
defaultGet: (options: DefaultGetRequest) => Promise<any>;
|
|
282
|
+
getActionData: ({
|
|
283
|
+
action,
|
|
284
|
+
context,
|
|
285
|
+
}: {
|
|
286
|
+
action: string;
|
|
287
|
+
context?: any;
|
|
288
|
+
}) => Promise<any>;
|
|
289
|
+
nameSearch: (options: NameSearchRequest) => Promise<any>;
|
|
290
|
+
duplicate: (options: DuplicateRequest) => Promise<any>;
|
|
291
|
+
evalDomain: (options: EvalDomainRequest) => Promise<any>;
|
|
292
|
+
getLogInfo: (options: GetLogInfoRequest) => Promise<any>;
|
|
334
293
|
isShortcutFavorite: (
|
|
335
|
-
options: IsShortcutFavoriteOptions
|
|
336
|
-
requestConfig?: any,
|
|
294
|
+
options: IsShortcutFavoriteOptions
|
|
337
295
|
) => Promise<number | boolean>;
|
|
338
|
-
removeFavourite: (
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
) => Promise<
|
|
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>;
|
|
296
|
+
removeFavourite: ({ shortcut_id }: { shortcut_id: number }) => Promise<void>;
|
|
297
|
+
addFavourite: (options: IsShortcutFavoriteOptions) => Promise<void>;
|
|
298
|
+
treeButOpen: (options: TreeButOpenOptions) => Promise<any>;
|
|
299
|
+
exportData: (options: ExportDataOptions) => Promise<any>;
|
|
351
300
|
};
|
|
352
301
|
|
|
353
302
|
type ViewType = "tree" | "form" | "dashboard" | "graph" | "calendar";
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
FormOutlined,
|
|
8
8
|
EditOutlined,
|
|
9
9
|
} from "@ant-design/icons";
|
|
10
|
-
import { Button, Col, Row, Spin, Tooltip, theme
|
|
10
|
+
import { Button, Col, Row, Spin, Tooltip, theme } from "antd";
|
|
11
|
+
import { Menu, Dropdown } from "antd";
|
|
11
12
|
import showErrorDialog from "@/ui/ActionErrorDialog";
|
|
12
13
|
import {
|
|
13
14
|
TabManagerContext,
|
|
@@ -60,7 +61,7 @@ const FavouriteButton = (props: Props) => {
|
|
|
60
61
|
const { token } = useToken();
|
|
61
62
|
|
|
62
63
|
const tabManagerContext = useContext(
|
|
63
|
-
TabManagerContext
|
|
64
|
+
TabManagerContext
|
|
64
65
|
) as TabManagerContextType;
|
|
65
66
|
const {
|
|
66
67
|
openShortcut,
|
package/src/views/ActionView.tsx
CHANGED
|
@@ -82,9 +82,8 @@ function ActionView(props: Props, ref: any) {
|
|
|
82
82
|
? (res_id as number)
|
|
83
83
|
: undefined;
|
|
84
84
|
|
|
85
|
-
const [currentId, setCurrentIdInternal] =
|
|
86
|
-
res_id_parsed
|
|
87
|
-
);
|
|
85
|
+
const [currentId, setCurrentIdInternal] =
|
|
86
|
+
useState<number | undefined>(res_id_parsed);
|
|
88
87
|
const [selectedRowItems, setSelectedRowItems] = useState<any[]>([]);
|
|
89
88
|
const [currentItemIndex, setCurrentItemIndex] = useState<number>();
|
|
90
89
|
const [results, setResults] = useState<any>([]);
|
|
@@ -96,13 +95,13 @@ function ActionView(props: Props, ref: any) {
|
|
|
96
95
|
useState<boolean>(false);
|
|
97
96
|
const [searchTreeNameSearch, setSearchTreeNameSearch] = useState<string>();
|
|
98
97
|
|
|
99
|
-
const { t } =
|
|
98
|
+
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
100
99
|
|
|
101
100
|
const formRef = useRef();
|
|
102
101
|
const searchTreeRef = useRef();
|
|
103
102
|
|
|
104
103
|
const tabManagerContext = useContext(
|
|
105
|
-
TabManagerContext
|
|
104
|
+
TabManagerContext
|
|
106
105
|
) as TabManagerContextType;
|
|
107
106
|
const {
|
|
108
107
|
setCurrentView: setCurrentViewTabContext,
|
|
@@ -119,7 +118,7 @@ function ActionView(props: Props, ref: any) {
|
|
|
119
118
|
event.preventDefault();
|
|
120
119
|
handleGoToRecordShortcut();
|
|
121
120
|
},
|
|
122
|
-
[activeKey, tabs, currentView, currentItemIndex, results]
|
|
121
|
+
[activeKey, tabs, currentView, currentItemIndex, results]
|
|
123
122
|
);
|
|
124
123
|
|
|
125
124
|
function setCurrentId(id?: number) {
|
|
@@ -171,7 +170,7 @@ function ActionView(props: Props, ref: any) {
|
|
|
171
170
|
|
|
172
171
|
const [, viewType] = view.viewTuple;
|
|
173
172
|
|
|
174
|
-
|
|
173
|
+
let viewInfo = view.info;
|
|
175
174
|
|
|
176
175
|
switch (viewType) {
|
|
177
176
|
case "dashboard": {
|
|
@@ -229,16 +228,16 @@ function ActionView(props: Props, ref: any) {
|
|
|
229
228
|
break;
|
|
230
229
|
}
|
|
231
230
|
}
|
|
232
|
-
let currentViewToAssign;
|
|
231
|
+
let currentViewToAssign = undefined;
|
|
233
232
|
|
|
234
233
|
if (!initialView && viewDataRetrieved.find((v) => v.type === "tree")) {
|
|
235
234
|
const treeView: TreeView = viewDataRetrieved.find(
|
|
236
|
-
(v) => v.type === "tree"
|
|
235
|
+
(v) => v.type === "tree"
|
|
237
236
|
) as TreeView;
|
|
238
237
|
currentViewToAssign = treeView;
|
|
239
238
|
} else if (!initialView) {
|
|
240
239
|
const formView: TreeView = viewDataRetrieved.find(
|
|
241
|
-
(v) => v.type === "form"
|
|
240
|
+
(v) => v.type === "form"
|
|
242
241
|
) as TreeView;
|
|
243
242
|
currentViewToAssign = formView;
|
|
244
243
|
} else {
|
|
@@ -254,7 +253,7 @@ function ActionView(props: Props, ref: any) {
|
|
|
254
253
|
|
|
255
254
|
if (!currentViewToAssign) {
|
|
256
255
|
showErrorDialog(
|
|
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
|
|
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`
|
|
258
257
|
);
|
|
259
258
|
onRemoveTab?.(tabKey);
|
|
260
259
|
}
|
|
@@ -458,7 +457,7 @@ function ActionView(props: Props, ref: any) {
|
|
|
458
457
|
} else {
|
|
459
458
|
setCurrentId(undefined);
|
|
460
459
|
const formView: FormView = availableViews.find(
|
|
461
|
-
(v) => v.type === "form"
|
|
460
|
+
(v) => v.type === "form"
|
|
462
461
|
) as FormView;
|
|
463
462
|
setCurrentView(formView);
|
|
464
463
|
}
|
package/src/views/RootView.tsx
CHANGED
|
@@ -10,7 +10,8 @@ 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
|
|
13
|
+
import LocaleContextProvider from "@/context/LocaleContext";
|
|
14
|
+
import { tForLang } from "@/context/LocaleContext";
|
|
14
15
|
import { ShortcutApi } from "@/ui/FavouriteButton";
|
|
15
16
|
import showErrorDialog from "@/ui/ActionErrorDialog";
|
|
16
17
|
import { InitialViewData, ViewType } from "@/types";
|
|
@@ -153,7 +154,7 @@ function RootView(props: RootViewProps, ref: any) {
|
|
|
153
154
|
|
|
154
155
|
if (initialViewType) {
|
|
155
156
|
const [id, type] = finalViews.find(
|
|
156
|
-
([_, type]) => type === initialViewType
|
|
157
|
+
([_, type]) => type === initialViewType
|
|
157
158
|
);
|
|
158
159
|
initialView = { id, type };
|
|
159
160
|
} else {
|
|
@@ -244,7 +245,7 @@ function RootView(props: RootViewProps, ref: any) {
|
|
|
244
245
|
|
|
245
246
|
const parsedDomain = domain
|
|
246
247
|
? await ConnectionProvider.getHandler().evalDomain({
|
|
247
|
-
domain,
|
|
248
|
+
domain: domain,
|
|
248
249
|
values: transformPlainMany2Ones({
|
|
249
250
|
fields,
|
|
250
251
|
values: { ...values, ...globalValues },
|
|
@@ -402,7 +403,7 @@ function RootView(props: RootViewProps, ref: any) {
|
|
|
402
403
|
domain: any;
|
|
403
404
|
context: any;
|
|
404
405
|
model: string;
|
|
405
|
-
views: any
|
|
406
|
+
views: Array<any>;
|
|
406
407
|
title: string;
|
|
407
408
|
target: string;
|
|
408
409
|
initialView: InitialViewData;
|
|
@@ -483,7 +484,7 @@ function RootView(props: RootViewProps, ref: any) {
|
|
|
483
484
|
activeKey={activeKey}
|
|
484
485
|
onRemoveTab={async (key: string) => {
|
|
485
486
|
const canWeCloseFn = tabViewsCloseFunctions.current.get(
|
|
486
|
-
key as string
|
|
487
|
+
key as string
|
|
487
488
|
);
|
|
488
489
|
const canWeClose = await canWeCloseFn?.();
|
|
489
490
|
|
|
@@ -2,6 +2,7 @@ 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;
|
|
5
6
|
import ButtonWithTooltip from "@/common/ButtonWithTooltip";
|
|
6
7
|
import {
|
|
7
8
|
FolderOpenOutlined,
|
|
@@ -18,7 +19,6 @@ import {
|
|
|
18
19
|
openBase64InNewTab,
|
|
19
20
|
toBase64,
|
|
20
21
|
} 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,9 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Checkbox as AntCheckbox
|
|
2
|
+
import { Checkbox as AntCheckbox } 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";
|
|
7
8
|
|
|
8
9
|
const { defaultAlgorithm, defaultSeed } = theme;
|
|
9
10
|
|
|
@@ -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;
|
|
6
7
|
|
|
7
8
|
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
|
+
let truncatedValue = Math.trunc(parseFloat(value));
|
|
37
37
|
return `${truncatedValue}`.replace(/[^0-9\-]+/g, "");
|
|
38
38
|
} else if (typeof value === "number") {
|
|
39
|
-
|
|
39
|
+
let 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 ? true : false;
|
|
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 ? 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
|
-
|
|
42
|
-
color: token.colorPrimary,
|
|
43
|
-
}}
|
|
44
|
-
/>
|
|
39
|
+
<QuestionCircleOutlined className="pr-1 text-xs" style={{
|
|
40
|
+
color: token.colorPrimary
|
|
41
|
+
}} />
|
|
45
42
|
</Tooltip>
|
|
46
43
|
)}
|
|
47
44
|
<span className="pr-2">
|
|
48
|
-
<TextType
|
|
45
|
+
<TextType
|
|
46
|
+
level={labelSize}
|
|
47
|
+
type={labelType as any}
|
|
48
|
+
>
|
|
49
49
|
<Interweave content={labelText} />
|
|
50
50
|
</TextType>
|
|
51
51
|
</span>
|
|
@@ -74,11 +74,7 @@ export const LinkInput = (props: LinkInputProps) => {
|
|
|
74
74
|
<Col flex="auto">
|
|
75
75
|
{showInput ? (
|
|
76
76
|
<Input
|
|
77
|
-
style={{
|
|
78
|
-
borderTopLeftRadius: 0,
|
|
79
|
-
borderBottomLeftRadius: 0,
|
|
80
|
-
...requiredStyle,
|
|
81
|
-
}}
|
|
77
|
+
style={{ borderTopLeftRadius: 0, borderBottomLeftRadius: 0, ...requiredStyle }}
|
|
82
78
|
id={id}
|
|
83
79
|
onChange={onValueStringChange}
|
|
84
80
|
value={value}
|
|
@@ -95,7 +91,6 @@ export const LinkInput = (props: LinkInputProps) => {
|
|
|
95
91
|
href={`${linkPrefix}${value}`}
|
|
96
92
|
style={{ color: token.colorPrimary, paddingRight: 15 }}
|
|
97
93
|
target="_blank"
|
|
98
|
-
rel="noreferrer"
|
|
99
94
|
>
|
|
100
95
|
{value}
|
|
101
96
|
</a>
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Select
|
|
2
|
+
import { Select } 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";
|
|
8
9
|
|
|
9
10
|
const { defaultAlgorithm, defaultSeed } = theme;
|
|
10
11
|
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Select
|
|
2
|
+
import { Select } 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";
|
|
8
9
|
|
|
9
10
|
const { defaultAlgorithm, defaultSeed } = theme;
|
|
10
11
|
|
|
@@ -49,16 +50,9 @@ export const SelectionInput = (props: SelectionInputProps) => {
|
|
|
49
50
|
const CustomSelect: any = required && !readOnly ? RequiredSelect : Select;
|
|
50
51
|
|
|
51
52
|
return (
|
|
52
|
-
<CustomSelect
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
value={value}
|
|
56
|
-
optionFilterProp="children"
|
|
57
|
-
filterOption={(input: string, option: any) =>
|
|
58
|
-
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
59
|
-
}
|
|
60
|
-
showSearch
|
|
61
|
-
>
|
|
53
|
+
<CustomSelect disabled={readOnly} onChange={onChange} value={value} optionFilterProp="children" filterOption={
|
|
54
|
+
(input: string, option: any) => option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
55
|
+
} showSearch>
|
|
62
56
|
{options}
|
|
63
57
|
</CustomSelect>
|
|
64
58
|
);
|
|
@@ -3,10 +3,12 @@ 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
|
|
7
|
-
import
|
|
6
|
+
import dayjs from "dayjs";
|
|
7
|
+
import { Dayjs } from 'dayjs';
|
|
8
|
+
import customParseFormat from 'dayjs/plugin/customParseFormat'
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
|
|
11
|
+
dayjs.extend(customParseFormat)
|
|
10
12
|
|
|
11
13
|
const Time = (props: WidgetProps) => {
|
|
12
14
|
const { ooui } = props;
|
|
@@ -22,21 +24,18 @@ type TimeInputProps = {
|
|
|
22
24
|
ooui: TimeOoui;
|
|
23
25
|
value?: string;
|
|
24
26
|
onChange?: (value?: string) => void;
|
|
25
|
-
}
|
|
27
|
+
}
|
|
26
28
|
|
|
27
29
|
export const TimeInput = (props: TimeInputProps) => {
|
|
30
|
+
|
|
28
31
|
const onChange = (time: Dayjs | null, timestring: string) => {
|
|
29
32
|
if (props.onChange) {
|
|
30
|
-
props.onChange(timestring)
|
|
33
|
+
props.onChange(timestring)
|
|
31
34
|
}
|
|
32
|
-
}
|
|
35
|
+
}
|
|
33
36
|
|
|
34
|
-
return (
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
value={props.value ? dayjs(props.value, "HH:mm:ss") : undefined}
|
|
38
|
-
/>
|
|
39
|
-
);
|
|
40
|
-
};
|
|
37
|
+
return <TimePicker onChange={onChange} value={props.value ? dayjs(props.value, 'HH:mm:ss') : undefined} />
|
|
38
|
+
|
|
39
|
+
}
|
|
41
40
|
|
|
42
41
|
export default Time;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import React, { useState, useRef, useEffect, useContext } from "react";
|
|
2
|
-
import { Input, Button, Row, Col
|
|
2
|
+
import { Input, Button, Row, Col } 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);
|
|
9
14
|
|
|
10
15
|
import {
|
|
11
16
|
Many2one as Many2oneOoui,
|
|
@@ -20,10 +25,6 @@ import showErrorDialog from "@/ui/GenericErrorDialog";
|
|
|
20
25
|
import { FormContext, FormContextType } from "@/context/FormContext";
|
|
21
26
|
import { transformPlainMany2Ones } from "@/helpers/formHelper";
|
|
22
27
|
|
|
23
|
-
const { defaultAlgorithm, defaultSeed } = theme;
|
|
24
|
-
|
|
25
|
-
const mapToken = defaultAlgorithm(defaultSeed);
|
|
26
|
-
|
|
27
28
|
type Props = {
|
|
28
29
|
ooui: Many2oneOoui;
|
|
29
30
|
onOpenDetailClick?:
|
|
@@ -57,7 +58,7 @@ interface Many2oneInputProps {
|
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
export const Many2oneInput: React.FC<Many2oneInputProps> = (
|
|
60
|
-
props: Many2oneInputProps
|
|
61
|
+
props: Many2oneInputProps
|
|
61
62
|
) => {
|
|
62
63
|
const { value, onChange, ooui } = props;
|
|
63
64
|
const {
|
|
@@ -215,7 +216,7 @@ export const Many2oneInput: React.FC<Many2oneInputProps> = (
|
|
|
215
216
|
transformDomainForChildWidget({
|
|
216
217
|
domain,
|
|
217
218
|
widgetFieldName: fieldName,
|
|
218
|
-
})
|
|
219
|
+
})
|
|
219
220
|
);
|
|
220
221
|
}
|
|
221
222
|
|
|
@@ -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,34 +55,22 @@ export const Many2oneSuffix = (props: Props) => {
|
|
|
55
55
|
setIsLoading(true);
|
|
56
56
|
|
|
57
57
|
try {
|
|
58
|
-
const formView =
|
|
58
|
+
const formView = await ConnectionProvider.getHandler().getView({
|
|
59
59
|
model,
|
|
60
60
|
type: "form",
|
|
61
61
|
context,
|
|
62
|
-
})
|
|
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
|
-
|
|
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
|
-
);
|
|
66
|
+
toolbar.action?.filter((item: any) => item.hasOwnProperty('context')).map((item: any) => fields.push(...parseContextFields(item.context)));
|
|
67
|
+
toolbar.action?.filter((item: any) => item.hasOwnProperty('domain')).map((item: any) => fields.push(...parseDomainFields(item.domain)));
|
|
68
|
+
toolbar.relate?.filter((item: any) => item.hasOwnProperty('context')).map((item: any) => fields.push(...parseContextFields(item.context)));
|
|
69
|
+
toolbar.relate?.filter((item: any) => item.hasOwnProperty('domain')).map((item: any) => fields.push(...parseDomainFields(item.domain)));
|
|
70
|
+
toolbar.print?.filter((item: any) => item.hasOwnProperty('context')).map((item: any) => fields.push(...parseContextFields(item.context)));
|
|
71
|
+
fields = fields.filter((i) => Object.keys(formView.fields).indexOf(i) > -1)
|
|
84
72
|
|
|
85
|
-
let values = {}
|
|
73
|
+
let values = {}
|
|
86
74
|
|
|
87
75
|
if (fields.length > 0) {
|
|
88
76
|
values = (
|
|
@@ -101,6 +89,7 @@ export const Many2oneSuffix = (props: Props) => {
|
|
|
101
89
|
} catch (err) {
|
|
102
90
|
setIsLoading(false);
|
|
103
91
|
showErrorDialog(err);
|
|
92
|
+
return;
|
|
104
93
|
}
|
|
105
94
|
}
|
|
106
95
|
|