@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
|
@@ -5,16 +5,17 @@ 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";
|
|
8
13
|
import {
|
|
9
|
-
One2many as One2manyOoui,
|
|
10
14
|
Form as FormOoui,
|
|
11
15
|
Tree as TreeOoui,
|
|
12
16
|
parseGraph,
|
|
13
17
|
transformDomainForChildWidget,
|
|
14
18
|
} from "@gisce/ooui";
|
|
15
|
-
import { Alert, Spin } from "antd";
|
|
16
|
-
import { Form, Tree } from "@/index";
|
|
17
|
-
import { Graph } from "@/widgets/views/Graph/Graph";
|
|
18
19
|
import { Views, ViewType } from "@/types";
|
|
19
20
|
import ConnectionProvider from "@/ConnectionProvider";
|
|
20
21
|
import { FormModal } from "@/widgets/modals/FormModal";
|
|
@@ -35,7 +36,7 @@ import { transformPlainMany2Ones } from "@/helpers/formHelper";
|
|
|
35
36
|
|
|
36
37
|
type One2manyValue = {
|
|
37
38
|
fields?: any;
|
|
38
|
-
items: One2manyItem
|
|
39
|
+
items: Array<One2manyItem>;
|
|
39
40
|
};
|
|
40
41
|
|
|
41
42
|
const ViewObjects = {
|
|
@@ -74,13 +75,13 @@ function filterDuplicateItems(items: any) {
|
|
|
74
75
|
}
|
|
75
76
|
|
|
76
77
|
const One2manyInput: React.FC<One2manyInputProps> = (
|
|
77
|
-
props: One2manyInputProps
|
|
78
|
+
props: One2manyInputProps
|
|
78
79
|
) => {
|
|
79
80
|
const { value, onChange, ooui, views } = props;
|
|
80
81
|
const { items = [] } = value || {};
|
|
81
82
|
|
|
82
83
|
const { currentView, setCurrentView, itemIndex, setItemIndex } = useContext(
|
|
83
|
-
One2manyContext
|
|
84
|
+
One2manyContext
|
|
84
85
|
) as One2manyContextType;
|
|
85
86
|
|
|
86
87
|
const formContext = useContext(FormContext) as FormContextType;
|
|
@@ -112,7 +113,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
112
113
|
const { id: fieldName } = ooui;
|
|
113
114
|
const itemsToShow = items.filter(
|
|
114
115
|
(item) =>
|
|
115
|
-
(item.values || item.treeValues) && item.operation !== "pendingRemove"
|
|
116
|
+
(item.values || item.treeValues) && item.operation !== "pendingRemove"
|
|
116
117
|
);
|
|
117
118
|
const previousCurrentView = useRef<ViewType>();
|
|
118
119
|
|
|
@@ -141,7 +142,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
141
142
|
parseDomain();
|
|
142
143
|
}, [domain]);
|
|
143
144
|
|
|
144
|
-
const triggerChange = (changedValue: One2manyItem
|
|
145
|
+
const triggerChange = (changedValue: Array<One2manyItem>) => {
|
|
145
146
|
onChange?.({
|
|
146
147
|
fields: views.get("form")?.fields || views.get("tree")?.fields,
|
|
147
148
|
items: filterDuplicateItems(changedValue),
|
|
@@ -211,7 +212,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
211
212
|
transformDomainForChildWidget({
|
|
212
213
|
domain,
|
|
213
214
|
widgetFieldName: fieldName,
|
|
214
|
-
})
|
|
215
|
+
})
|
|
215
216
|
);
|
|
216
217
|
}
|
|
217
218
|
}
|
|
@@ -383,7 +384,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
383
384
|
triggerChange(updatedItems);
|
|
384
385
|
} else {
|
|
385
386
|
triggerChange(
|
|
386
|
-
items.filter((item) => item.id !== itemsToShow[itemIndex].id!)
|
|
387
|
+
items.filter((item) => item.id !== itemsToShow[itemIndex].id!)
|
|
387
388
|
);
|
|
388
389
|
}
|
|
389
390
|
} catch (err) {
|
|
@@ -437,7 +438,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
437
438
|
id: number | undefined,
|
|
438
439
|
_: any,
|
|
439
440
|
values: any,
|
|
440
|
-
x2manyPendingLink: boolean = false
|
|
441
|
+
x2manyPendingLink: boolean = false
|
|
441
442
|
) => {
|
|
442
443
|
let updatedItems: One2manyItem[];
|
|
443
444
|
|
|
@@ -497,7 +498,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
497
498
|
const onSearchModalSelectValue = async (ids: number[]) => {
|
|
498
499
|
setIsLoading(true);
|
|
499
500
|
|
|
500
|
-
|
|
501
|
+
let updatedItems = items;
|
|
501
502
|
const filteredIds = ids.filter((id) => {
|
|
502
503
|
return !items.find((item) => item.id === id);
|
|
503
504
|
});
|
|
@@ -670,7 +671,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
670
671
|
<One2manyTopBar
|
|
671
672
|
mode={currentView}
|
|
672
673
|
title={getTitle()}
|
|
673
|
-
readOnly={readOnly}
|
|
674
|
+
readOnly={readOnly || false}
|
|
674
675
|
isMany2Many={isMany2many}
|
|
675
676
|
formHasChanges={formHasChanges}
|
|
676
677
|
totalItems={itemsToShow.length}
|
|
@@ -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;
|
|
4
5
|
|
|
5
6
|
import { Notebook as NotebookOoui, Group as GroupOoui } from "@gisce/ooui";
|
|
6
7
|
import { Group } from "@/index";
|
|
7
|
-
const { TabPane } = Tabs;
|
|
8
8
|
|
|
9
9
|
type Props = {
|
|
10
10
|
ooui: NotebookOoui;
|
|
@@ -29,14 +29,7 @@ function Notebook(props: Props): React.ReactElement {
|
|
|
29
29
|
.filter((page: any) => !page.invisible)
|
|
30
30
|
.map((page: any) => {
|
|
31
31
|
return (
|
|
32
|
-
<TabPane
|
|
33
|
-
tab={
|
|
34
|
-
<>
|
|
35
|
-
{getPageIcon(page.icon)} {page.label}
|
|
36
|
-
</>
|
|
37
|
-
}
|
|
38
|
-
key={page.label}
|
|
39
|
-
>
|
|
32
|
+
<TabPane tab={<>{getPageIcon(page.icon)} {page.label}</>} key={page.label}>
|
|
40
33
|
<Group
|
|
41
34
|
ooui={page as GroupOoui}
|
|
42
35
|
showLabel={false}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useContext, useState } from "react";
|
|
2
2
|
import Field from "@/common/Field";
|
|
3
|
-
import { DownOutlined
|
|
3
|
+
import { DownOutlined } from "@ant-design/icons";
|
|
4
4
|
import { Dropdown, Menu } from "antd";
|
|
5
5
|
import { Button } from "@/widgets/base/Button";
|
|
6
6
|
import {
|
|
@@ -10,6 +10,7 @@ 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";
|
|
13
14
|
import iconMapper from "@/helpers/iconMapper";
|
|
14
15
|
import { WidgetProps } from "@/types";
|
|
15
16
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
@@ -20,8 +21,8 @@ type ButtonGroupProps = {
|
|
|
20
21
|
|
|
21
22
|
type ItemsProps = {
|
|
22
23
|
ooui: ButtonOoui[];
|
|
23
|
-
executeButtonAction: any
|
|
24
|
-
lang: string
|
|
24
|
+
executeButtonAction: any,
|
|
25
|
+
lang: string
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
export const ButtonGroup = (props: ButtonGroupProps) => {
|
|
@@ -85,23 +86,19 @@ export const ButtonGroup = (props: ButtonGroupProps) => {
|
|
|
85
86
|
onClick={onClick}
|
|
86
87
|
icon={<DownOutlined />}
|
|
87
88
|
type={primary ? "primary" : undefined}
|
|
88
|
-
//
|
|
89
|
+
//danger={danger ? true : undefined} This works but typescript
|
|
89
90
|
// doesn't accept
|
|
90
|
-
overlay={
|
|
91
|
-
<Items
|
|
92
|
-
ooui={secondaryButtons}
|
|
93
|
-
executeButtonAction={executeButtonAction}
|
|
94
|
-
lang={lang}
|
|
95
|
-
/>
|
|
96
|
-
}
|
|
91
|
+
overlay={<Items ooui={secondaryButtons} executeButtonAction={executeButtonAction} lang={lang} /> }
|
|
97
92
|
>
|
|
98
93
|
{getButtonIcon()}
|
|
99
94
|
{caption}
|
|
100
95
|
</Dropdown.Button>
|
|
101
96
|
</Field>
|
|
102
97
|
);
|
|
103
|
-
}
|
|
104
|
-
return
|
|
98
|
+
} else if (defaultButton) {
|
|
99
|
+
return (
|
|
100
|
+
<Button ooui={defaultButton} />
|
|
101
|
+
)
|
|
105
102
|
}
|
|
106
103
|
};
|
|
107
104
|
|
|
@@ -17,16 +17,12 @@ 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
|
|
26
|
-
defaultLanguage={lang || ""}
|
|
27
|
-
height={height || 300}
|
|
28
|
-
onMount={onMount}
|
|
29
|
-
/>
|
|
25
|
+
<Editor defaultLanguage={lang ? lang : ''} height={height ? height : 300} onMount={onMount}/>
|
|
30
26
|
</Field>
|
|
31
27
|
);
|
|
32
28
|
};
|
|
@@ -1,76 +1,72 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {useContext} from "react";
|
|
2
2
|
import Field from "@/common/Field";
|
|
3
3
|
import { WidgetProps } from "@/types";
|
|
4
|
-
import {
|
|
5
|
-
Card,
|
|
6
|
-
Space,
|
|
7
|
-
Typography,
|
|
8
|
-
Avatar,
|
|
9
|
-
Tag,
|
|
10
|
-
Timeline,
|
|
11
|
-
TimelineItemProps,
|
|
12
|
-
} from "antd";
|
|
4
|
+
import {Card, Space, Typography, Avatar, Tag, Timeline, TimelineItemProps} from "antd"
|
|
13
5
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
14
6
|
|
|
7
|
+
const { Meta } = Card;
|
|
8
|
+
const { Text} = Typography;
|
|
9
|
+
|
|
15
10
|
import dayjs from "dayjs";
|
|
16
11
|
import relativeTime from "dayjs/plugin/relativeTime";
|
|
17
12
|
import md5 from "md5";
|
|
18
13
|
|
|
19
|
-
const { Meta } = Card;
|
|
20
|
-
const { Text } = Typography;
|
|
21
14
|
|
|
22
15
|
dayjs.extend(relativeTime);
|
|
23
16
|
|
|
24
17
|
type GravatarProps = {
|
|
25
|
-
email: string
|
|
26
|
-
size?: number
|
|
27
|
-
theme: string
|
|
28
|
-
}
|
|
18
|
+
email: string,
|
|
19
|
+
size?: number,
|
|
20
|
+
theme: string,
|
|
21
|
+
}
|
|
29
22
|
|
|
30
23
|
type CommentDataType = {
|
|
31
|
-
id: number
|
|
32
|
-
isSender: boolean
|
|
33
|
-
isAuthor: boolean
|
|
34
|
-
text: string
|
|
35
|
-
email: string
|
|
36
|
-
date: string
|
|
37
|
-
author: string
|
|
38
|
-
}
|
|
24
|
+
id: number,
|
|
25
|
+
isSender: boolean,
|
|
26
|
+
isAuthor: boolean,
|
|
27
|
+
text: string,
|
|
28
|
+
email: string,
|
|
29
|
+
date: string,
|
|
30
|
+
author: string,
|
|
31
|
+
}
|
|
39
32
|
|
|
40
33
|
type CommentProps = {
|
|
41
|
-
data: CommentDataType
|
|
42
|
-
style?: any
|
|
43
|
-
}
|
|
34
|
+
data: CommentDataType,
|
|
35
|
+
style?: any,
|
|
36
|
+
}
|
|
44
37
|
|
|
45
38
|
type CommentsTypeProps = {
|
|
46
|
-
data: CommentDataType[]
|
|
47
|
-
}
|
|
39
|
+
data: CommentDataType[],
|
|
40
|
+
}
|
|
48
41
|
|
|
49
42
|
type CommentsTimelineProps = {
|
|
50
|
-
value?: EventsType[]
|
|
51
|
-
}
|
|
43
|
+
value?: EventsType[],
|
|
44
|
+
}
|
|
45
|
+
|
|
52
46
|
|
|
53
47
|
type EventActionType = {
|
|
54
|
-
date: string
|
|
55
|
-
action: string
|
|
56
|
-
}
|
|
48
|
+
date: string,
|
|
49
|
+
action: string,
|
|
50
|
+
}
|
|
57
51
|
|
|
58
52
|
export type EventsType = {
|
|
59
|
-
type: "action" | "comment"
|
|
60
|
-
event: EventActionType | CommentDataType
|
|
61
|
-
|
|
53
|
+
type: "action" | "comment",
|
|
54
|
+
event: EventActionType | CommentDataType
|
|
55
|
+
|
|
56
|
+
}
|
|
62
57
|
|
|
63
|
-
const Gravatar = ({ email, size = 40, theme =
|
|
58
|
+
const Gravatar = ({ email, size = 40, theme = '' } : GravatarProps) => {
|
|
64
59
|
// Genera el enlace de Gravatar utilizando el email
|
|
65
|
-
const gravatarUrl = `https://www.gravatar.com/avatar/${md5(
|
|
66
|
-
email,
|
|
67
|
-
)}?s=${size}&d=${theme}`;
|
|
60
|
+
const gravatarUrl = `https://www.gravatar.com/avatar/${md5(email)}?s=${size}&d=${theme}`;
|
|
68
61
|
|
|
69
|
-
return
|
|
62
|
+
return (
|
|
63
|
+
<Avatar src={gravatarUrl} size={size} />
|
|
64
|
+
);
|
|
70
65
|
};
|
|
71
66
|
|
|
72
|
-
|
|
73
|
-
|
|
67
|
+
|
|
68
|
+
function TextWithNewlines({ text }:{text: string}) {
|
|
69
|
+
const textParts = text.split('\n');
|
|
74
70
|
|
|
75
71
|
return (
|
|
76
72
|
<div>
|
|
@@ -85,61 +81,59 @@ function TextWithNewlines({ text }: { text: string }) {
|
|
|
85
81
|
}
|
|
86
82
|
|
|
87
83
|
export const Comment = (props: CommentProps) => {
|
|
88
|
-
const {
|
|
84
|
+
const {data, style} = props;
|
|
89
85
|
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
90
86
|
return (
|
|
91
|
-
<Card key={data.id} style={{
|
|
92
|
-
<Meta
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
style={{ marginBottom: "5px" }}
|
|
102
|
-
/>
|
|
87
|
+
<Card key={data.id} style={{...style, ...{textAlign: 'start'}}}>
|
|
88
|
+
<Meta avatar={<Gravatar email={data.email} theme='mp'/>}
|
|
89
|
+
title={data.author}
|
|
90
|
+
description={(
|
|
91
|
+
<Space direction="horizontal">
|
|
92
|
+
<span title={data.date}>{dayjs(data.date).fromNow()}</span>
|
|
93
|
+
{data.isAuthor && <Tag color="blue">{t('author')}</Tag>}
|
|
94
|
+
</Space>
|
|
95
|
+
)} style={{marginBottom: '5px'}}/>
|
|
103
96
|
<Text>
|
|
104
97
|
<TextWithNewlines text={data.text} />
|
|
105
98
|
</Text>
|
|
106
99
|
</Card>
|
|
107
|
-
)
|
|
108
|
-
}
|
|
100
|
+
)
|
|
101
|
+
}
|
|
109
102
|
|
|
110
103
|
export const Comments = (props: CommentsTypeProps) => {
|
|
111
104
|
const { data = [] } = props;
|
|
112
105
|
const comments = data.map((c) => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
106
|
+
const style = {float: c.isSender ? 'right' : 'left', width: '60%'};
|
|
107
|
+
return <Comment data={c} style={style}/>
|
|
108
|
+
});
|
|
116
109
|
return (
|
|
117
110
|
<div>
|
|
118
|
-
<Space direction="vertical" size="middle" style={{ display:
|
|
111
|
+
<Space direction="vertical" size="middle" style={{ display: 'flex' }}>
|
|
119
112
|
{comments}
|
|
120
113
|
</Space>
|
|
121
114
|
</div>
|
|
122
|
-
)
|
|
123
|
-
}
|
|
115
|
+
)
|
|
116
|
+
}
|
|
117
|
+
|
|
124
118
|
|
|
125
119
|
export const CommentsTimeline = (props: CommentsTimelineProps) => {
|
|
126
120
|
const { value } = props;
|
|
127
|
-
const items = (value || []).map(
|
|
128
|
-
if (i.type ===
|
|
121
|
+
const items = (value || []).map(i => {
|
|
122
|
+
if (i.type === 'action') {
|
|
129
123
|
return {
|
|
130
|
-
children: `${i.event.date} - ${(i.event as EventActionType).action}
|
|
131
|
-
}
|
|
124
|
+
children: `${i.event.date} - ${(i.event as EventActionType).action}`
|
|
125
|
+
}
|
|
132
126
|
} else if (i.type === "comment") {
|
|
133
127
|
return {
|
|
134
|
-
color:
|
|
135
|
-
position: (i.event as CommentDataType).isSender ?
|
|
128
|
+
color: 'gray',
|
|
129
|
+
position: (i.event as CommentDataType).isSender ? 'left' : 'right',
|
|
136
130
|
label: i.event.date,
|
|
137
131
|
children: <Comment data={i.event as CommentDataType} />,
|
|
138
|
-
}
|
|
132
|
+
}
|
|
139
133
|
}
|
|
140
|
-
})
|
|
141
|
-
return <Timeline mode="alternate" items={items as TimelineItemProps[]}
|
|
142
|
-
}
|
|
134
|
+
})
|
|
135
|
+
return <Timeline mode="alternate" items={items as TimelineItemProps[]} />
|
|
136
|
+
}
|
|
143
137
|
|
|
144
138
|
export const CommentsTimelineField = (props: WidgetProps) => {
|
|
145
139
|
return (
|
|
@@ -147,4 +141,4 @@ export const CommentsTimelineField = (props: WidgetProps) => {
|
|
|
147
141
|
<CommentsTimeline />
|
|
148
142
|
</Field>
|
|
149
143
|
);
|
|
150
|
-
}
|
|
144
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Tooltip, theme
|
|
2
|
+
import { Tooltip, theme } from "antd";
|
|
3
|
+
import { Statistic, Card } from "antd";
|
|
3
4
|
import { Indicator as IndicatorOoui } from "@gisce/ooui";
|
|
4
5
|
import { WidgetProps } from "@/types";
|
|
5
6
|
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: One2manyItem
|
|
49
|
+
const triggerChange = (changedValue: Array<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: 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 {
|
|
17
|
+
const {ooui, value} = props;
|
|
18
18
|
let formattedValue = value;
|
|
19
19
|
let colorValue = value;
|
|
20
20
|
if (ooui.selectionValues.size) {
|
|
@@ -24,30 +24,26 @@ 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 = ooui.colors === "auto" ? colorFromString(colorValue) : ooui.colors[colorValue] || colorFromString(colorValue);
|
|
30
|
+
return (
|
|
31
|
+
<CustomTag color={color}>{formattedValue}</CustomTag>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
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: 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
|
-
|
|
50
|
-
{props.children}
|
|
51
|
-
</AntdTag>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
48
|
+
return <AntdTag {...props} style={style} color={color}>{props.children}</AntdTag>
|
|
49
|
+
}
|
|
@@ -48,7 +48,7 @@ export const TagsInput = (props: TagsInputProps) => {
|
|
|
48
48
|
fetchOptions();
|
|
49
49
|
}, [items]);
|
|
50
50
|
|
|
51
|
-
const triggerChange = (changedValue: One2manyItem
|
|
51
|
+
const triggerChange = (changedValue: Array<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: 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={{
|
|
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: One2manyItem
|
|
97
|
+
const triggerChange = (changedValue: Array<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<any
|
|
51
|
+
const paramsRef = useRef<Array<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: sorter,
|
|
93
93
|
fields: { ...treeView!.fields, ...formView!.fields },
|
|
94
94
|
});
|
|
95
95
|
setTableRefreshing(false);
|