@gisce/react-ooui 2.0.0-alpha.6 → 2.0.0-alpha.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ConnectionProvider.d.ts +7 -0
- package/dist/ConnectionProvider.d.ts.map +1 -0
- package/dist/actionbar/ActionButton.d.ts +12 -0
- package/dist/actionbar/ActionButton.d.ts.map +1 -0
- package/dist/actionbar/AttachmentsButton.d.ts +11 -0
- package/dist/actionbar/AttachmentsButton.d.ts.map +1 -0
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts +18 -0
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts.map +1 -0
- package/dist/actionbar/ButtonWithBadge.d.ts +7 -0
- package/dist/actionbar/ButtonWithBadge.d.ts.map +1 -0
- package/dist/actionbar/ChangeViewButton.d.ts +12 -0
- package/dist/actionbar/ChangeViewButton.d.ts.map +1 -0
- package/dist/actionbar/DashboardActionBar.d.ts +3 -0
- package/dist/actionbar/DashboardActionBar.d.ts.map +1 -0
- package/dist/actionbar/DropdownButton.d.ts +13 -0
- package/dist/actionbar/DropdownButton.d.ts.map +1 -0
- package/dist/actionbar/FormActionBar.d.ts +5 -0
- package/dist/actionbar/FormActionBar.d.ts.map +1 -0
- package/dist/actionbar/GraphActionBar.d.ts +5 -0
- package/dist/actionbar/GraphActionBar.d.ts.map +1 -0
- package/dist/actionbar/NewButton.d.ts +6 -0
- package/dist/actionbar/NewButton.d.ts.map +1 -0
- package/dist/actionbar/SearchBar.d.ts +8 -0
- package/dist/actionbar/SearchBar.d.ts.map +1 -0
- package/dist/actionbar/TreeActionBar.d.ts +8 -0
- package/dist/actionbar/TreeActionBar.d.ts.map +1 -0
- package/dist/common/ButtonWithTooltip.d.ts +7 -0
- package/dist/common/ButtonWithTooltip.d.ts.map +1 -0
- package/dist/common/DatePicker.d.ts +19 -0
- package/dist/common/DatePicker.d.ts.map +1 -0
- package/dist/common/Field.d.ts +14 -0
- package/dist/common/Field.d.ts.map +1 -0
- package/dist/common/SelectAllRecordsRow.d.ts +9 -0
- package/dist/common/SelectAllRecordsRow.d.ts.map +1 -0
- package/dist/common/TimePicker.d.ts +10 -0
- package/dist/common/TimePicker.d.ts.map +1 -0
- package/dist/context/ActionViewContext.d.ts +65 -0
- package/dist/context/ActionViewContext.d.ts.map +1 -0
- package/dist/context/ConfigContext.d.ts +15 -0
- package/dist/context/ConfigContext.d.ts.map +1 -0
- package/dist/context/ContentRootContext.d.ts +19 -0
- package/dist/context/ContentRootContext.d.ts.map +1 -0
- package/dist/context/DashboardActionContext.d.ts +19 -0
- package/dist/context/DashboardActionContext.d.ts.map +1 -0
- package/dist/context/FormContext.d.ts +35 -0
- package/dist/context/FormContext.d.ts.map +1 -0
- package/dist/context/FormModalContext.d.ts +11 -0
- package/dist/context/FormModalContext.d.ts.map +1 -0
- package/dist/context/LocaleContext.d.ts +14 -0
- package/dist/context/LocaleContext.d.ts.map +1 -0
- package/dist/context/One2manyContext.d.ts +17 -0
- package/dist/context/One2manyContext.d.ts.map +1 -0
- package/dist/context/TabManagerContext.d.ts +50 -0
- package/dist/context/TabManagerContext.d.ts.map +1 -0
- package/dist/helpers/containerHelper.d.ts +22 -0
- package/dist/helpers/containerHelper.d.ts.map +1 -0
- package/dist/helpers/dayjs.d.ts +3 -0
- package/dist/helpers/dayjs.d.ts.map +1 -0
- package/dist/helpers/dynamicColumnsHelper.d.ts +16 -0
- package/dist/helpers/dynamicColumnsHelper.d.ts.map +1 -0
- package/dist/helpers/errorHelper.d.ts +6 -0
- package/dist/helpers/errorHelper.d.ts.map +1 -0
- package/dist/helpers/filesHelper.d.ts +8 -0
- package/dist/helpers/filesHelper.d.ts.map +1 -0
- package/dist/helpers/formHelper.d.ts +36 -0
- package/dist/helpers/formHelper.d.ts.map +1 -0
- package/dist/helpers/iconMapper.d.ts +13 -0
- package/dist/helpers/iconMapper.d.ts.map +1 -0
- package/dist/helpers/logInfoHelper.d.ts +3 -0
- package/dist/helpers/logInfoHelper.d.ts.map +1 -0
- package/dist/helpers/one2manyHelper.d.ts +37 -0
- package/dist/helpers/one2manyHelper.d.ts.map +1 -0
- package/dist/helpers/searchHelper.d.ts +6 -0
- package/dist/helpers/searchHelper.d.ts.map +1 -0
- package/dist/helpers/timeHelper.d.ts +4 -0
- package/dist/helpers/timeHelper.d.ts.map +1 -0
- package/dist/helpers/treeHelper.d.ts +23 -0
- package/dist/helpers/treeHelper.d.ts.map +1 -0
- package/dist/helpers/viewHelper.d.ts +10 -0
- package/dist/helpers/viewHelper.d.ts.map +1 -0
- package/dist/hooks/useEffectDebugger.d.ts +3 -0
- package/dist/hooks/useEffectDebugger.d.ts.map +1 -0
- package/dist/hooks/useExport.d.ts +44 -0
- package/dist/hooks/useExport.d.ts.map +1 -0
- package/dist/hooks/useFetchViews.d.ts +1 -0
- package/dist/hooks/useFetchViews.d.ts.map +1 -0
- package/dist/hooks/useSearch.d.ts +56 -0
- package/dist/hooks/useSearch.d.ts.map +1 -0
- package/dist/hooks/useWindowDimensions.d.ts +7 -0
- package/dist/hooks/useWindowDimensions.d.ts.map +1 -0
- package/dist/index.d.ts +59 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/locales/ca_ES.d.ts +94 -0
- package/dist/locales/ca_ES.d.ts.map +1 -0
- package/dist/locales/en_US.d.ts +94 -0
- package/dist/locales/en_US.d.ts.map +1 -0
- package/dist/locales/es_ES.d.ts +94 -0
- package/dist/locales/es_ES.d.ts.map +1 -0
- package/dist/react-ooui.es.js +10077 -0
- package/dist/react-ooui.es.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +258 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/ui/ActionErrorDialog.d.ts +3 -0
- package/dist/ui/ActionErrorDialog.d.ts.map +1 -0
- package/dist/ui/ConfirmDialog.d.ts +7 -0
- package/dist/ui/ConfirmDialog.d.ts.map +1 -0
- package/dist/ui/ErrorAlert.d.ts +5 -0
- package/dist/ui/ErrorAlert.d.ts.map +1 -0
- package/dist/ui/FavouriteButton.d.ts +25 -0
- package/dist/ui/FavouriteButton.d.ts.map +1 -0
- package/dist/ui/FormErrorsDialog.d.ts +3 -0
- package/dist/ui/FormErrorsDialog.d.ts.map +1 -0
- package/dist/ui/GenericErrorDialog.d.ts +3 -0
- package/dist/ui/GenericErrorDialog.d.ts.map +1 -0
- package/dist/ui/GoToResourceModal.d.ts +9 -0
- package/dist/ui/GoToResourceModal.d.ts.map +1 -0
- package/dist/ui/InfoDialog.d.ts +3 -0
- package/dist/ui/InfoDialog.d.ts.map +1 -0
- package/dist/ui/RefreshItemDialog.d.ts +7 -0
- package/dist/ui/RefreshItemDialog.d.ts.map +1 -0
- package/dist/ui/RemoveItemDialog.d.ts +6 -0
- package/dist/ui/RemoveItemDialog.d.ts.map +1 -0
- package/dist/ui/TitleHeader.d.ts +7 -0
- package/dist/ui/TitleHeader.d.ts.map +1 -0
- package/dist/ui/UnlinkItemDialog.d.ts +6 -0
- package/dist/ui/UnlinkItemDialog.d.ts.map +1 -0
- package/dist/ui/UnsavedChangesDialog.d.ts +7 -0
- package/dist/ui/UnsavedChangesDialog.d.ts.map +1 -0
- package/dist/ui/WarningDialog.d.ts +3 -0
- package/dist/ui/WarningDialog.d.ts.map +1 -0
- package/dist/views/ActionView.d.ts +22 -0
- package/dist/views/ActionView.d.ts.map +1 -0
- package/dist/views/CurrentTabContent.d.ts +3 -0
- package/dist/views/CurrentTabContent.d.ts.map +1 -0
- package/dist/views/RootView.d.ts +14 -0
- package/dist/views/RootView.d.ts.map +1 -0
- package/dist/views/TabContent.d.ts +8 -0
- package/dist/views/TabContent.d.ts.map +1 -0
- package/dist/views/TabSelector.d.ts +3 -0
- package/dist/views/TabSelector.d.ts.map +1 -0
- package/dist/views/Welcome.d.ts +4 -0
- package/dist/views/Welcome.d.ts.map +1 -0
- package/dist/views/actionViews/DashboardActionView.d.ts +7 -0
- package/dist/views/actionViews/DashboardActionView.d.ts.map +1 -0
- package/dist/views/actionViews/FormActionView.d.ts +17 -0
- package/dist/views/actionViews/FormActionView.d.ts.map +1 -0
- package/dist/views/actionViews/GraphActionView.d.ts +12 -0
- package/dist/views/actionViews/GraphActionView.d.ts.map +1 -0
- package/dist/views/actionViews/TreeActionView.d.ts +19 -0
- package/dist/views/actionViews/TreeActionView.d.ts.map +1 -0
- package/dist/views/tabs/Tab.d.ts +10 -0
- package/dist/views/tabs/Tab.d.ts.map +1 -0
- package/dist/widgets/WidgetFactory.d.ts +4 -0
- package/dist/widgets/WidgetFactory.d.ts.map +1 -0
- package/dist/widgets/base/Binary.d.ts +13 -0
- package/dist/widgets/base/Binary.d.ts.map +1 -0
- package/dist/widgets/base/Boolean.d.ts +3 -0
- package/dist/widgets/base/Boolean.d.ts.map +1 -0
- package/dist/widgets/base/Button.d.ts +7 -0
- package/dist/widgets/base/Button.d.ts.map +1 -0
- package/dist/widgets/base/Char.d.ts +7 -0
- package/dist/widgets/base/Char.d.ts.map +1 -0
- package/dist/widgets/base/Date.d.ts +4 -0
- package/dist/widgets/base/Date.d.ts.map +1 -0
- package/dist/widgets/base/DateTime.d.ts +4 -0
- package/dist/widgets/base/DateTime.d.ts.map +1 -0
- package/dist/widgets/base/Email.d.ts +3 -0
- package/dist/widgets/base/Email.d.ts.map +1 -0
- package/dist/widgets/base/Float.d.ts +3 -0
- package/dist/widgets/base/Float.d.ts.map +1 -0
- package/dist/widgets/base/FloatTime.d.ts +12 -0
- package/dist/widgets/base/FloatTime.d.ts.map +1 -0
- package/dist/widgets/base/Image.d.ts +13 -0
- package/dist/widgets/base/Image.d.ts.map +1 -0
- package/dist/widgets/base/Integer.d.ts +7 -0
- package/dist/widgets/base/Integer.d.ts.map +1 -0
- package/dist/widgets/base/Label.d.ts +8 -0
- package/dist/widgets/base/Label.d.ts.map +1 -0
- package/dist/widgets/base/LinkInput.d.ts +11 -0
- package/dist/widgets/base/LinkInput.d.ts.map +1 -0
- package/dist/widgets/base/MultiSelection.d.ts +9 -0
- package/dist/widgets/base/MultiSelection.d.ts.map +1 -0
- package/dist/widgets/base/ProgressBar.d.ts +6 -0
- package/dist/widgets/base/ProgressBar.d.ts.map +1 -0
- package/dist/widgets/base/Reference.d.ts +16 -0
- package/dist/widgets/base/Reference.d.ts.map +1 -0
- package/dist/widgets/base/ReferenceTree.d.ts +8 -0
- package/dist/widgets/base/ReferenceTree.d.ts.map +1 -0
- package/dist/widgets/base/Selection.d.ts +9 -0
- package/dist/widgets/base/Selection.d.ts.map +1 -0
- package/dist/widgets/base/Separator.d.ts +7 -0
- package/dist/widgets/base/Separator.d.ts.map +1 -0
- package/dist/widgets/base/Text.d.ts +7 -0
- package/dist/widgets/base/Text.d.ts.map +1 -0
- package/dist/widgets/base/Time.d.ts +11 -0
- package/dist/widgets/base/Time.d.ts.map +1 -0
- package/dist/widgets/base/Url.d.ts +3 -0
- package/dist/widgets/base/Url.d.ts.map +1 -0
- package/dist/widgets/base/many2one/Many2one.d.ts +16 -0
- package/dist/widgets/base/many2one/Many2one.d.ts.map +1 -0
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts +8 -0
- package/dist/widgets/base/many2one/Many2oneSuffix.d.ts.map +1 -0
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts +9 -0
- package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts.map +1 -0
- package/dist/widgets/base/many2one/Many2oneTree.d.ts +6 -0
- package/dist/widgets/base/many2one/Many2oneTree.d.ts.map +1 -0
- package/dist/widgets/base/one2many/One2many.d.ts +7 -0
- package/dist/widgets/base/one2many/One2many.d.ts.map +1 -0
- package/dist/widgets/base/one2many/One2manyInput.d.ts +23 -0
- package/dist/widgets/base/one2many/One2manyInput.d.ts.map +1 -0
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts +22 -0
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts.map +1 -0
- package/dist/widgets/containers/Container.d.ts +9 -0
- package/dist/widgets/containers/Container.d.ts.map +1 -0
- package/dist/widgets/containers/Group.d.ts +10 -0
- package/dist/widgets/containers/Group.d.ts.map +1 -0
- package/dist/widgets/containers/Notebook.d.ts +9 -0
- package/dist/widgets/containers/Notebook.d.ts.map +1 -0
- package/dist/widgets/custom/Avatar.d.ts +10 -0
- package/dist/widgets/custom/Avatar.d.ts.map +1 -0
- package/dist/widgets/custom/ButtonGroup.d.ts +7 -0
- package/dist/widgets/custom/ButtonGroup.d.ts.map +1 -0
- package/dist/widgets/custom/CodeEditor.d.ts +8 -0
- package/dist/widgets/custom/CodeEditor.d.ts.map +1 -0
- package/dist/widgets/custom/Comments.d.ts +34 -0
- package/dist/widgets/custom/Comments.d.ts.map +1 -0
- package/dist/widgets/custom/FiberGrid.d.ts +9 -0
- package/dist/widgets/custom/FiberGrid.d.ts.map +1 -0
- package/dist/widgets/custom/Indicator.d.ts +9 -0
- package/dist/widgets/custom/Indicator.d.ts.map +1 -0
- package/dist/widgets/custom/Markdown.d.ts +4 -0
- package/dist/widgets/custom/Markdown.d.ts.map +1 -0
- package/dist/widgets/custom/MultiCheckbox.d.ts +13 -0
- package/dist/widgets/custom/MultiCheckbox.d.ts.map +1 -0
- package/dist/widgets/custom/Radio.d.ts +9 -0
- package/dist/widgets/custom/Radio.d.ts.map +1 -0
- package/dist/widgets/custom/Steps.d.ts +12 -0
- package/dist/widgets/custom/Steps.d.ts.map +1 -0
- package/dist/widgets/custom/Switch.d.ts +3 -0
- package/dist/widgets/custom/Switch.d.ts.map +1 -0
- package/dist/widgets/custom/Tag.d.ts +6 -0
- package/dist/widgets/custom/Tag.d.ts.map +1 -0
- package/dist/widgets/custom/Tags.d.ts +14 -0
- package/dist/widgets/custom/Tags.d.ts.map +1 -0
- package/dist/widgets/custom/Timeline.d.ts +15 -0
- package/dist/widgets/custom/Timeline.d.ts.map +1 -0
- package/dist/widgets/modals/ExportModal.d.ts +14 -0
- package/dist/widgets/modals/ExportModal.d.ts.map +1 -0
- package/dist/widgets/modals/FormModal.d.ts +11 -0
- package/dist/widgets/modals/FormModal.d.ts.map +1 -0
- package/dist/widgets/modals/SearchModal.d.ts +12 -0
- package/dist/widgets/modals/SearchModal.d.ts.map +1 -0
- package/dist/widgets/modals/TranslationModal.d.ts +11 -0
- package/dist/widgets/modals/TranslationModal.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/Dashboard.d.ts +5 -0
- package/dist/widgets/views/Dashboard/Dashboard.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/DashboardForm.d.ts +3 -0
- package/dist/widgets/views/Dashboard/DashboardForm.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts +18 -0
- package/dist/widgets/views/Dashboard/DashboardTree.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/dashboardHelper.d.ts +6 -0
- package/dist/widgets/views/Dashboard/dashboardHelper.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts +3 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts +6 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts +3 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts +11 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/index.d.ts +5 -0
- package/dist/widgets/views/DashboardGrid/index.d.ts.map +1 -0
- package/dist/widgets/views/Form.d.ts +29 -0
- package/dist/widgets/views/Form.d.ts.map +1 -0
- package/dist/widgets/views/Graph/Graph.d.ts +11 -0
- package/dist/widgets/views/Graph/Graph.d.ts.map +1 -0
- package/dist/widgets/views/Graph/GraphChart.d.ts +10 -0
- package/dist/widgets/views/Graph/GraphChart.d.ts.map +1 -0
- package/dist/widgets/views/Graph/GraphDefaults.d.ts +83 -0
- package/dist/widgets/views/Graph/GraphDefaults.d.ts.map +1 -0
- package/dist/widgets/views/Graph/GraphIndicator.d.ts +16 -0
- package/dist/widgets/views/Graph/GraphIndicator.d.ts.map +1 -0
- package/dist/widgets/views/Graph/useGraphData.d.ts +20 -0
- package/dist/widgets/views/Graph/useGraphData.d.ts.map +1 -0
- package/dist/widgets/views/SearchTree.d.ts +24 -0
- package/dist/widgets/views/SearchTree.d.ts.map +1 -0
- package/dist/widgets/views/Tree/Tree.d.ts +33 -0
- package/dist/widgets/views/Tree/Tree.d.ts.map +1 -0
- package/dist/widgets/views/Tree/index.d.ts +2 -0
- package/dist/widgets/views/Tree/index.d.ts.map +1 -0
- package/dist/widgets/views/Tree/treeComponents.d.ts +131 -0
- package/dist/widgets/views/Tree/treeComponents.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts +3 -0
- package/dist/widgets/views/searchFilter/DateRangePicker.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts +3 -0
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/PairFields.d.ts +4 -0
- package/dist/widgets/views/searchFilter/PairFields.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts +10 -0
- package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/SearchField.d.ts +7 -0
- package/dist/widgets/views/searchFilter/SearchField.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts +19 -0
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/SearchParams.d.ts +7 -0
- package/dist/widgets/views/searchFilter/SearchParams.d.ts.map +1 -0
- package/package.json +43 -18
- package/src/ConnectionProvider.ts +1 -1
- package/src/__tests__/iconMapper.test.ts +4 -4
- package/src/actionbar/AttachmentsButton.tsx +25 -23
- package/src/actionbar/AttachmentsButtonWrapper.tsx +2 -2
- package/src/actionbar/ButtonWithBadge.tsx +4 -2
- package/src/actionbar/ChangeViewButton.tsx +1 -1
- package/src/actionbar/DashboardActionBar.tsx +2 -6
- package/src/actionbar/DropdownButton.tsx +100 -37
- package/src/actionbar/FormActionBar.tsx +22 -16
- package/src/actionbar/NewButton.tsx +1 -1
- package/src/actionbar/TreeActionBar.tsx +86 -79
- package/src/common/DatePicker.tsx +4 -5
- package/src/common/Field.tsx +2 -1
- package/src/common/TimePicker.tsx +38 -0
- package/src/context/ActionViewContext.tsx +8 -4
- package/src/context/ConfigContext.tsx +22 -3
- package/src/context/DashboardActionContext.tsx +2 -3
- package/src/context/FormModalContext.tsx +2 -3
- package/src/context/LocaleContext.tsx +1 -1
- package/src/context/One2manyContext.tsx +3 -4
- package/src/helpers/containerHelper.ts +1 -1
- package/src/helpers/dayjs.ts +21 -0
- package/src/helpers/dynamicColumnsHelper.ts +2 -2
- package/src/helpers/iconMapper.ts +5 -5
- package/src/helpers/logInfoHelper.tsx +8 -6
- package/src/helpers/timeHelper.ts +2 -2
- package/src/helpers/{treeHelper.ts → treeHelper.tsx} +25 -4
- package/src/hooks/useEffectDebugger.ts +2 -2
- package/src/hooks/useExport.ts +9 -8
- package/src/hooks/useWindowDimensions.ts +1 -1
- package/src/index.ts +1 -1
- package/src/locales/ca_ES.tsx +1 -0
- package/src/locales/en_US.tsx +1 -0
- package/src/locales/es_ES.tsx +2 -0
- package/src/stories/Char.stories.tsx +27 -0
- package/src/stories/Time.stories.tsx +2 -3
- package/src/stories/Utils.stories.tsx +1 -3
- package/src/stories/containers/Group.stories.tsx +2 -3
- package/src/stories/containers/Notebook.stories.tsx +0 -6
- package/src/stories/custom/Avatar.stories.tsx +2 -6
- package/src/stories/custom/Comments.stories.tsx +32 -25
- package/src/stories/forms/FormWithLinks.stories.tsx +1 -2
- package/src/stories/forms/ModContractForm.stories.tsx +1 -0
- package/src/stories/forms/PreferencesForm.stories.tsx +1 -2
- package/src/stories/mocks/mockProvider.ts +5 -2
- package/src/stories/mocks/models/attachment.ts +1 -2
- package/src/stories/mocks/models/butlleti.ts +249 -297
- package/src/stories/mocks/models/company.ts +2 -4
- package/src/stories/mocks/models/cups.ts +18 -1
- package/src/stories/mocks/models/document.ts +2 -4
- package/src/stories/mocks/models/factura.ts +14 -28
- package/src/stories/mocks/models/form_with_gridfiber.ts +2 -4
- package/src/stories/mocks/models/hist_autoconsum.ts +2 -4
- package/src/stories/mocks/models/lead.ts +8 -16
- package/src/stories/mocks/models/modcontractual.ts +229 -83
- package/src/stories/mocks/models/partner.ts +20 -40
- package/src/stories/mocks/models/polissa.ts +6 -12
- package/src/stories/mocks/models/res_partner_category.ts +3 -3
- package/src/stories/mocks/models/signatura.ts +135 -195
- package/src/stories/mocks/models/switching.ts +2 -4
- package/src/stories/ui/GoToResourceModal.stories.tsx +3 -2
- package/src/stories/views/Tree.stories.jsx +3 -5
- package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +15 -30
- package/src/types/index.ts +2 -1
- package/src/ui/ConfirmDialog.tsx +1 -1
- package/src/ui/GoToResourceModal.tsx +8 -7
- package/src/ui/TitleHeader.tsx +8 -1
- package/src/views/ActionView.tsx +41 -30
- package/src/views/CurrentTabContent.tsx +1 -1
- package/src/views/TabContent.tsx +1 -1
- package/src/views/TabSelector.tsx +1 -1
- package/src/views/actionViews/DashboardActionView.tsx +7 -2
- package/src/views/actionViews/GraphActionView.tsx +1 -1
- package/src/views/actionViews/TreeActionView.tsx +2 -2
- package/src/widgets/WidgetFactory.tsx +1 -1
- package/src/widgets/base/Button.tsx +1 -1
- package/src/widgets/base/Float.tsx +0 -1
- package/src/widgets/base/FloatTime.tsx +1 -1
- package/src/widgets/base/Integer.tsx +0 -1
- package/src/widgets/base/Reference.tsx +1 -1
- package/src/widgets/base/ReferenceTree.tsx +1 -1
- package/src/widgets/base/Separator.tsx +3 -4
- package/src/widgets/base/Time.tsx +5 -7
- package/src/widgets/base/many2one/Many2oneSuffixModal.tsx +2 -2
- package/src/widgets/base/one2many/One2many.tsx +2 -2
- package/src/widgets/base/one2many/One2manyInput.tsx +6 -5
- package/src/widgets/custom/Avatar.tsx +15 -7
- package/src/widgets/custom/Comments.tsx +4 -7
- package/src/widgets/custom/Markdown.tsx +18 -8
- package/src/widgets/custom/MultiCheckbox.tsx +1 -1
- package/src/widgets/custom/Radio.tsx +2 -4
- package/src/widgets/custom/Steps.tsx +10 -9
- package/src/widgets/custom/Switch.tsx +1 -5
- package/src/widgets/custom/Tags.tsx +1 -1
- package/src/widgets/modals/FormModal.tsx +5 -2
- package/src/widgets/modals/SearchModal.tsx +33 -33
- package/src/widgets/modals/TranslationModal.tsx +3 -3
- package/src/widgets/views/Dashboard/Dashboard.tsx +3 -3
- package/src/widgets/views/Dashboard/DashboardTree.tsx +3 -1
- package/src/widgets/views/DashboardGrid/DashboardGrid.tsx +3 -3
- package/src/widgets/views/DashboardGrid/DashboardGridItem.tsx +2 -2
- package/src/widgets/views/Form.tsx +2 -2
- package/src/widgets/views/Graph/Graph.tsx +1 -1
- package/src/widgets/views/Graph/GraphChart.tsx +2 -2
- package/src/widgets/views/Graph/GraphDefaults.ts +3 -3
- package/src/widgets/views/Graph/useGraphData.tsx +1 -1
- package/src/widgets/views/SearchTree.tsx +23 -13
- package/src/widgets/views/Tree/Tree.tsx +295 -0
- package/src/widgets/views/Tree/index.ts +1 -0
- package/src/widgets/views/Tree/treeComponents.tsx +276 -0
- package/src/widgets/views/searchFilter/DateTimeRangePicker.tsx +34 -8
- package/src/widgets/views/searchFilter/SearchBottomBar.tsx +4 -8
- package/src/widgets/views/searchFilter/SearchField.tsx +5 -1
- package/src/widgets/views/searchFilter/SearchFilter.tsx +3 -2
- package/src/widgets/views/searchFilter/SearchParams.tsx +7 -4
- package/src/widgets/views/Tree.tsx +0 -412
package/src/ui/ConfirmDialog.tsx
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React, { useContext, useRef } from "react";
|
|
2
|
-
import { Button, Col, Form,
|
|
2
|
+
import { Button, Col, Form, Input, Modal, Row, Space } from "antd";
|
|
3
3
|
import { CheckOutlined, CloseOutlined } from "@ant-design/icons";
|
|
4
4
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
5
5
|
|
|
6
6
|
type Props = {
|
|
7
7
|
visible: boolean;
|
|
8
|
-
onIdSubmitted: (
|
|
8
|
+
onIdSubmitted: (ids: number[]) => void;
|
|
9
9
|
onCancel: () => void;
|
|
10
10
|
isSearching: boolean;
|
|
11
11
|
};
|
|
@@ -18,11 +18,12 @@ export const GoToResourceModal = (props: Props) => {
|
|
|
18
18
|
const inputRef = useRef<null | HTMLElement>();
|
|
19
19
|
|
|
20
20
|
function handleSubmit(values: any) {
|
|
21
|
-
|
|
21
|
+
const ids = values.id.split(",").map((id: string) => parseInt(id.trim()));
|
|
22
|
+
onIdSubmitted(ids);
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
return (
|
|
25
|
-
|
|
26
|
+
<Modal
|
|
26
27
|
title={t("goToResourceId")}
|
|
27
28
|
centered
|
|
28
29
|
open={visible}
|
|
@@ -39,11 +40,11 @@ export const GoToResourceModal = (props: Props) => {
|
|
|
39
40
|
rules={[
|
|
40
41
|
{
|
|
41
42
|
required: true,
|
|
42
|
-
type: "number",
|
|
43
43
|
},
|
|
44
44
|
]}
|
|
45
|
+
help={t("searchIdHelp")}
|
|
45
46
|
>
|
|
46
|
-
<
|
|
47
|
+
<Input style={{ width: "100%" }} autoFocus ref={inputRef as any} />
|
|
47
48
|
</Form.Item>
|
|
48
49
|
<Row align="middle" justify="end">
|
|
49
50
|
<Col>
|
|
@@ -70,6 +71,6 @@ export const GoToResourceModal = (props: Props) => {
|
|
|
70
71
|
</Col>
|
|
71
72
|
</Row>
|
|
72
73
|
</Form>
|
|
73
|
-
</Modal>
|
|
74
|
+
</Modal>
|
|
74
75
|
);
|
|
75
76
|
};
|
package/src/ui/TitleHeader.tsx
CHANGED
|
@@ -82,13 +82,20 @@ function TitleHeader(props: Props) {
|
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
84
|
return (
|
|
85
|
-
<div
|
|
85
|
+
<div
|
|
86
|
+
style={{
|
|
87
|
+
position: "sticky",
|
|
88
|
+
top: 80,
|
|
89
|
+
zIndex: 3,
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
86
92
|
<Row
|
|
87
93
|
className="shadow-md"
|
|
88
94
|
style={{
|
|
89
95
|
padding: "1em",
|
|
90
96
|
borderRadius: token.borderRadius,
|
|
91
97
|
backgroundColor: token.colorPrimaryBg,
|
|
98
|
+
minHeight: "82px",
|
|
92
99
|
}}
|
|
93
100
|
align="middle"
|
|
94
101
|
>
|
package/src/views/ActionView.tsx
CHANGED
|
@@ -319,52 +319,59 @@ function ActionView(props: Props, ref: any) {
|
|
|
319
319
|
setGtResourceModalVisible(true);
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
async function goToResourceId(
|
|
322
|
+
async function goToResourceId(ids: number[]) {
|
|
323
323
|
setSearchingForResourceId(true);
|
|
324
324
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
325
|
+
let mode: ViewType;
|
|
326
|
+
let domain: any[];
|
|
327
|
+
if (ids.length === 1) {
|
|
328
|
+
mode = "form";
|
|
329
|
+
domain = [];
|
|
330
|
+
const id = ids[0];
|
|
331
|
+
const itemIndex = results!.findIndex((item: any) => {
|
|
332
|
+
return item.id === id;
|
|
333
|
+
});
|
|
334
|
+
let resource;
|
|
335
|
+
|
|
336
|
+
if (itemIndex === -1) {
|
|
337
|
+
try {
|
|
338
|
+
resource = (
|
|
339
|
+
await ConnectionProvider.getHandler().readObjects({
|
|
340
|
+
model,
|
|
341
|
+
ids: [id],
|
|
342
|
+
context,
|
|
343
|
+
})
|
|
344
|
+
)?.[0];
|
|
345
|
+
} catch (err) {}
|
|
346
|
+
|
|
347
|
+
if (!resource) {
|
|
348
|
+
setSearchingForResourceId(false);
|
|
349
|
+
setGtResourceModalVisible(false);
|
|
350
|
+
showInfo(t("idNotFound"));
|
|
351
|
+
return;
|
|
352
|
+
}
|
|
353
|
+
} else {
|
|
354
|
+
resource = results[itemIndex];
|
|
347
355
|
}
|
|
348
356
|
} else {
|
|
349
|
-
|
|
357
|
+
mode = "tree";
|
|
358
|
+
domain = [["id", "in", ids]];
|
|
350
359
|
}
|
|
351
360
|
|
|
352
361
|
setSearchingForResourceId(false);
|
|
353
362
|
setGtResourceModalVisible(false);
|
|
354
|
-
|
|
355
|
-
const viewForm = views.find((v) => v[1] === "form");
|
|
356
|
-
|
|
363
|
+
const viewForm = views.find((v) => v[1] === mode);
|
|
357
364
|
openAction({
|
|
358
|
-
domain
|
|
365
|
+
domain,
|
|
359
366
|
context,
|
|
360
367
|
model,
|
|
361
368
|
views,
|
|
362
369
|
title,
|
|
363
370
|
target: "current",
|
|
364
|
-
initialView: { id: viewForm?.[0]!, type:
|
|
371
|
+
initialView: { id: viewForm?.[0]!, type: mode },
|
|
365
372
|
action_id,
|
|
366
373
|
action_type,
|
|
367
|
-
res_id:
|
|
374
|
+
res_id: ids[0],
|
|
368
375
|
});
|
|
369
376
|
}
|
|
370
377
|
|
|
@@ -445,6 +452,10 @@ function ActionView(props: Props, ref: any) {
|
|
|
445
452
|
<DashboardActionView
|
|
446
453
|
key={`${view.type}-${view.view_id}`}
|
|
447
454
|
dashboardData={view as DashboardView}
|
|
455
|
+
visible={
|
|
456
|
+
currentView!.type === view.type &&
|
|
457
|
+
currentView!.view_id === view.view_id
|
|
458
|
+
}
|
|
448
459
|
/>
|
|
449
460
|
);
|
|
450
461
|
}
|
package/src/views/TabContent.tsx
CHANGED
|
@@ -11,13 +11,14 @@ import { DashboardProps } from "@/types";
|
|
|
11
11
|
|
|
12
12
|
export type DashboardActionViewProps = {
|
|
13
13
|
dashboardData: DashboardProps;
|
|
14
|
+
visible: boolean;
|
|
14
15
|
};
|
|
15
16
|
|
|
16
17
|
export const DashboardActionView = (props: DashboardActionViewProps) => {
|
|
17
|
-
const { dashboardData } = props;
|
|
18
|
+
const { dashboardData, visible } = props;
|
|
18
19
|
const dashboardRef = useRef();
|
|
19
20
|
const tabManagerContext = useContext(
|
|
20
|
-
TabManagerContext
|
|
21
|
+
TabManagerContext,
|
|
21
22
|
) as TabManagerContextType;
|
|
22
23
|
const { openShortcut } = tabManagerContext || {};
|
|
23
24
|
|
|
@@ -25,6 +26,10 @@ export const DashboardActionView = (props: DashboardActionViewProps) => {
|
|
|
25
26
|
return null;
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
if (!visible) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
28
33
|
return (
|
|
29
34
|
<DashboardActionProvider
|
|
30
35
|
dashboardRef={dashboardRef}
|
|
@@ -29,7 +29,7 @@ export const GraphActionView = (props: GraphActionViewProps) => {
|
|
|
29
29
|
const graphRef = useRef();
|
|
30
30
|
|
|
31
31
|
const actionViewContext = useContext(
|
|
32
|
-
ActionViewContext
|
|
32
|
+
ActionViewContext,
|
|
33
33
|
) as ActionViewContextType;
|
|
34
34
|
const {
|
|
35
35
|
setResults: setResultsActionView = undefined,
|
|
@@ -43,7 +43,7 @@ export const TreeActionView = (props: TreeActionViewProps) => {
|
|
|
43
43
|
} = props;
|
|
44
44
|
|
|
45
45
|
const { currentView, setPreviousView } = useContext(
|
|
46
|
-
ActionViewContext
|
|
46
|
+
ActionViewContext,
|
|
47
47
|
) as ActionViewContextType;
|
|
48
48
|
|
|
49
49
|
if (!visible) {
|
|
@@ -77,7 +77,7 @@ export const TreeActionView = (props: TreeActionViewProps) => {
|
|
|
77
77
|
setPreviousView?.(currentView);
|
|
78
78
|
setCurrentItemIndex(itemIndex);
|
|
79
79
|
const formView = availableViews.find(
|
|
80
|
-
(v) => v.type === "form"
|
|
80
|
+
(v) => v.type === "form",
|
|
81
81
|
) as FormView;
|
|
82
82
|
setCurrentView(formView);
|
|
83
83
|
}}
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
import { Image } from "./base/Image";
|
|
39
39
|
import { FiberGrid } from "./custom/FiberGrid";
|
|
40
40
|
import { Timeline } from "./custom/Timeline";
|
|
41
|
-
import { Indicator} from "./custom/Indicator";
|
|
41
|
+
import { Indicator } from "./custom/Indicator";
|
|
42
42
|
import { Tags } from "./custom/Tags";
|
|
43
43
|
|
|
44
44
|
const getWidgetType = (type: string) => {
|
|
@@ -63,7 +63,7 @@ export const Button = (props: Props) => {
|
|
|
63
63
|
<Field ooui={ooui}>
|
|
64
64
|
<AntButton
|
|
65
65
|
block
|
|
66
|
-
disabled={!activated || readOnly}
|
|
66
|
+
disabled={!activated || readOnly || isRunning}
|
|
67
67
|
onClick={onClick}
|
|
68
68
|
icon={getButtonIcon()}
|
|
69
69
|
type={ooui.primary ? "primary" : "default"}
|
|
@@ -25,7 +25,7 @@ interface FloatTimeInputProps {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
export const FloatTimeInput: React.FC<FloatTimeInputProps> = (
|
|
28
|
-
props: FloatTimeInputProps
|
|
28
|
+
props: FloatTimeInputProps,
|
|
29
29
|
) => {
|
|
30
30
|
const { ooui, value, onChange } = props;
|
|
31
31
|
const { id, readOnly, required } = ooui as FloatOoui;
|
|
@@ -37,7 +37,7 @@ interface ReferenceInputProps {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
export const ReferenceInput: React.FC<ReferenceInputProps> = (
|
|
40
|
-
props: ReferenceInputProps
|
|
40
|
+
props: ReferenceInputProps,
|
|
41
41
|
) => {
|
|
42
42
|
const { value, onChange, ooui } = props;
|
|
43
43
|
const { required, selectionValues, readOnly } = ooui;
|
|
@@ -10,17 +10,16 @@ type Props = {
|
|
|
10
10
|
export const Separator = (props: Props) => {
|
|
11
11
|
const { ooui } = props;
|
|
12
12
|
const { label, icon } = ooui;
|
|
13
|
-
const Icon
|
|
14
|
-
|
|
13
|
+
const Icon: React.ElementType | undefined = iconMapper(icon || "");
|
|
15
14
|
|
|
16
15
|
return (
|
|
17
16
|
<Divider orientation="left" className="text-sm">
|
|
18
|
-
{
|
|
17
|
+
{(Icon || label) && (
|
|
19
18
|
<Space>
|
|
20
19
|
{Icon ? <Icon /> : null}
|
|
21
20
|
{label}
|
|
22
21
|
</Space>
|
|
23
|
-
}
|
|
22
|
+
)}
|
|
24
23
|
</Divider>
|
|
25
24
|
);
|
|
26
25
|
};
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import React, { useContext, useEffect, useRef, useState } from "react";
|
|
2
|
-
import { TimePicker, theme } from "antd";
|
|
3
1
|
import Field from "@/common/Field";
|
|
4
2
|
import { Time as TimeOoui } from "@gisce/ooui";
|
|
5
3
|
import { WidgetProps } from "@/types";
|
|
6
|
-
import dayjs
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
dayjs.extend(customParseFormat);
|
|
4
|
+
import dayjs from "@/helpers/dayjs";
|
|
5
|
+
import { Dayjs } from "dayjs";
|
|
6
|
+
import { TimePicker } from "../../common/TimePicker";
|
|
10
7
|
|
|
11
8
|
const Time = (props: WidgetProps) => {
|
|
12
9
|
const { ooui } = props;
|
|
@@ -25,7 +22,7 @@ type TimeInputProps = {
|
|
|
25
22
|
};
|
|
26
23
|
|
|
27
24
|
export const TimeInput = (props: TimeInputProps) => {
|
|
28
|
-
const onChange = (time: Dayjs | null, timestring
|
|
25
|
+
const onChange = (time: Dayjs | null, timestring?: string) => {
|
|
29
26
|
if (props.onChange) {
|
|
30
27
|
props.onChange(timestring);
|
|
31
28
|
}
|
|
@@ -34,6 +31,7 @@ export const TimeInput = (props: TimeInputProps) => {
|
|
|
34
31
|
return (
|
|
35
32
|
<TimePicker
|
|
36
33
|
onChange={onChange}
|
|
34
|
+
numberOfSelectsToHide={3} // Since it has hours, minutes, and seconds
|
|
37
35
|
value={props.value ? dayjs(props.value, "HH:mm:ss") : undefined}
|
|
38
36
|
/>
|
|
39
37
|
);
|
|
@@ -14,7 +14,7 @@ export const Many2oneSuffixModal = (props: Props) => {
|
|
|
14
14
|
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
|
-
|
|
17
|
+
<Modal
|
|
18
18
|
title={t("selectAction")}
|
|
19
19
|
centered
|
|
20
20
|
open={visible}
|
|
@@ -37,6 +37,6 @@ export const Many2oneSuffixModal = (props: Props) => {
|
|
|
37
37
|
);
|
|
38
38
|
})}
|
|
39
39
|
</Space>
|
|
40
|
-
</Modal>
|
|
40
|
+
</Modal>
|
|
41
41
|
);
|
|
42
42
|
};
|
|
@@ -47,9 +47,9 @@ export const One2many = (props: Props) => {
|
|
|
47
47
|
if (mode && mode.length > 0) {
|
|
48
48
|
for (const m of mode as ViewType[]) {
|
|
49
49
|
const v = await getViewData(m);
|
|
50
|
-
views.set(m, v)
|
|
50
|
+
views.set(m, v);
|
|
51
51
|
}
|
|
52
|
-
setViews(views)
|
|
52
|
+
setViews(views);
|
|
53
53
|
} else {
|
|
54
54
|
const formView = await getViewData("form");
|
|
55
55
|
const treeView = await getViewData("tree");
|
|
@@ -124,6 +124,7 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
fetchDataIfNeeded();
|
|
127
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
127
128
|
}, [items, currentView]);
|
|
128
129
|
|
|
129
130
|
const fetchDataIfNeeded = useCallback(() => {
|
|
@@ -135,10 +136,12 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
135
136
|
) {
|
|
136
137
|
fetchData();
|
|
137
138
|
}
|
|
139
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
138
140
|
}, [items, currentView]);
|
|
139
141
|
|
|
140
142
|
useEffect(() => {
|
|
141
143
|
parseDomain();
|
|
144
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
142
145
|
}, [domain]);
|
|
143
146
|
|
|
144
147
|
const triggerChange = (changedValue: One2manyItem[]) => {
|
|
@@ -626,10 +629,8 @@ const One2manyInput: React.FC<One2manyInputProps> = (
|
|
|
626
629
|
: undefined
|
|
627
630
|
}
|
|
628
631
|
showPagination={false}
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
onChange: setSelectedRowKeys,
|
|
632
|
-
}}
|
|
632
|
+
selectedRowKeys={selectedRowKeys}
|
|
633
|
+
onRowSelectionChange={setSelectedRowKeys}
|
|
633
634
|
sorter={sorter}
|
|
634
635
|
onChangeSort={setSorter}
|
|
635
636
|
context={{ ...getContext?.(), ...context }}
|
|
@@ -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,16 +1,16 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {WidgetProps} from "@/types";
|
|
2
|
+
import { WidgetProps } from "@/types";
|
|
3
3
|
import { Avatar as AntdAvatar, Tooltip } from "antd";
|
|
4
|
-
import { Avatar as AvatarOoui} from "@gisce/ooui";
|
|
4
|
+
import { Avatar as AvatarOoui } from "@gisce/ooui";
|
|
5
5
|
import { colorFromString } from "@/helpers/formHelper";
|
|
6
6
|
|
|
7
7
|
type AvatarProps = WidgetProps & {
|
|
8
|
-
ooui: AvatarOoui
|
|
8
|
+
ooui: AvatarOoui;
|
|
9
9
|
value?: any;
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
const Avatar = (props: AvatarProps): React.ReactElement | null => {
|
|
13
|
-
const {ooui, value} = props;
|
|
13
|
+
const { ooui, value } = props;
|
|
14
14
|
if (!value) {
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
@@ -20,13 +20,21 @@ const Avatar = (props: AvatarProps): React.ReactElement | null => {
|
|
|
20
20
|
} else if (Array.isArray(value)) {
|
|
21
21
|
formattedValue = value[1];
|
|
22
22
|
}
|
|
23
|
-
const text = formattedValue
|
|
23
|
+
const text = formattedValue
|
|
24
|
+
.toString()
|
|
25
|
+
.split(" ")
|
|
26
|
+
.filter((word: string) => word.length > 1)
|
|
27
|
+
.slice(0, 3)
|
|
28
|
+
.map((word: string) => word[0].toUpperCase())
|
|
29
|
+
.join("");
|
|
24
30
|
const backgroundColor = colorFromString(formattedValue);
|
|
25
31
|
return (
|
|
26
32
|
<Tooltip title={formattedValue}>
|
|
27
|
-
<AntdAvatar alt={formattedValue} style={{backgroundColor}}>
|
|
33
|
+
<AntdAvatar alt={formattedValue} style={{ backgroundColor }}>
|
|
34
|
+
{text}
|
|
35
|
+
</AntdAvatar>
|
|
28
36
|
</Tooltip>
|
|
29
37
|
);
|
|
30
|
-
}
|
|
38
|
+
};
|
|
31
39
|
|
|
32
40
|
export default Avatar;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Fragment, useContext } from "react";
|
|
2
2
|
import Field from "@/common/Field";
|
|
3
3
|
import { WidgetProps } from "@/types";
|
|
4
4
|
import {
|
|
@@ -12,15 +12,12 @@ import {
|
|
|
12
12
|
} from "antd";
|
|
13
13
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
14
14
|
|
|
15
|
-
import dayjs from "dayjs";
|
|
16
|
-
import relativeTime from "dayjs/plugin/relativeTime";
|
|
15
|
+
import dayjs from "@/helpers/dayjs";
|
|
17
16
|
import md5 from "md5";
|
|
18
17
|
|
|
19
18
|
const { Meta } = Card;
|
|
20
19
|
const { Text } = Typography;
|
|
21
20
|
|
|
22
|
-
dayjs.extend(relativeTime);
|
|
23
|
-
|
|
24
21
|
type GravatarProps = {
|
|
25
22
|
email: string;
|
|
26
23
|
size?: number;
|
|
@@ -75,10 +72,10 @@ function TextWithNewlines({ text }: { text: string }) {
|
|
|
75
72
|
return (
|
|
76
73
|
<div>
|
|
77
74
|
{textParts.map((part, index) => (
|
|
78
|
-
<
|
|
75
|
+
<Fragment key={index}>
|
|
79
76
|
{part}
|
|
80
77
|
{index !== textParts.length - 1 && <br />}
|
|
81
|
-
</
|
|
78
|
+
</Fragment>
|
|
82
79
|
))}
|
|
83
80
|
</div>
|
|
84
81
|
);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import Field from "@/common/Field";
|
|
2
2
|
import ReactMarkdown from "react-markdown";
|
|
3
3
|
import React from "react";
|
|
4
|
-
import {WidgetProps} from "@/types";
|
|
4
|
+
import { WidgetProps } from "@/types";
|
|
5
|
+
import remarkGfm from "remark-gfm";
|
|
5
6
|
|
|
6
|
-
export
|
|
7
|
+
export const Markdown = (props: WidgetProps) => {
|
|
7
8
|
return (
|
|
8
9
|
<Field {...props}>
|
|
9
10
|
<MarkdownInput {...props} />
|
|
@@ -12,11 +13,20 @@ export const Markdown = (props: WidgetProps) => {
|
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
export const MarkdownInput = (props: any) => {
|
|
15
|
-
const {value, ooui} = props;
|
|
16
|
+
const { value, ooui } = props;
|
|
16
17
|
return (
|
|
17
|
-
<div
|
|
18
|
-
|
|
18
|
+
<div
|
|
19
|
+
style={{
|
|
20
|
+
height: ooui?.height ? ooui.height + "px" : "100%",
|
|
21
|
+
overflow: "auto",
|
|
22
|
+
}}
|
|
23
|
+
>
|
|
24
|
+
<ReactMarkdown
|
|
25
|
+
remarkPlugins={[remarkGfm]}
|
|
26
|
+
className="markdown-typography"
|
|
27
|
+
>
|
|
28
|
+
{value}
|
|
29
|
+
</ReactMarkdown>
|
|
19
30
|
</div>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
@@ -71,7 +71,7 @@ export const MultiCheckboxInput = (props: MultiCheckboxInputProps) => {
|
|
|
71
71
|
const optionsRead = await ConnectionProvider.getHandler().search({
|
|
72
72
|
model: relation,
|
|
73
73
|
params,
|
|
74
|
-
|
|
74
|
+
fieldsToRetrieve: [field],
|
|
75
75
|
context: { ...getContext?.(), ...context },
|
|
76
76
|
});
|
|
77
77
|
const options = optionsRead.map((item: any) => {
|
|
@@ -41,9 +41,7 @@ export const SelectionInput = (props: RadioInputProps) => {
|
|
|
41
41
|
|
|
42
42
|
return (
|
|
43
43
|
<RadioAnt.Group disabled={readOnly} onChange={onChange} value={value}>
|
|
44
|
-
<Space direction={direction}>
|
|
45
|
-
{options}
|
|
46
|
-
</Space>
|
|
44
|
+
<Space direction={direction}>{options}</Space>
|
|
47
45
|
</RadioAnt.Group>
|
|
48
46
|
);
|
|
49
|
-
};
|
|
47
|
+
};
|
|
@@ -6,11 +6,10 @@ import { Steps as StepsOoui } from "@gisce/ooui";
|
|
|
6
6
|
|
|
7
7
|
type StepsProps = {
|
|
8
8
|
ooui: StepsOoui;
|
|
9
|
-
value: any
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
type StatusType = 'wait' | 'process' | 'finish' | 'error';
|
|
9
|
+
value: any;
|
|
10
|
+
};
|
|
13
11
|
|
|
12
|
+
type StatusType = "wait" | "process" | "finish" | "error";
|
|
14
13
|
|
|
15
14
|
export const Steps = (props: StepsProps) => {
|
|
16
15
|
const { ooui } = props;
|
|
@@ -33,10 +32,10 @@ export const StepsInput = (props: StepsInputProps) => {
|
|
|
33
32
|
const formContext = useContext(FormContext) as FormContextType;
|
|
34
33
|
|
|
35
34
|
const values = Array.from(selectionValues.entries());
|
|
36
|
-
const current = values.map(val => val[0]).indexOf(value);
|
|
35
|
+
const current = values.map((val) => val[0]).indexOf(value);
|
|
37
36
|
let status: StatusType = "process";
|
|
38
37
|
let error = "";
|
|
39
|
-
|
|
38
|
+
|
|
40
39
|
if (errorField) {
|
|
41
40
|
error = formContext.getFieldValue(errorField);
|
|
42
41
|
if (error) {
|
|
@@ -44,12 +43,14 @@ export const StepsInput = (props: StepsInputProps) => {
|
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
|
|
47
|
-
|
|
48
46
|
return (
|
|
49
47
|
<AntdSteps current={current} status={status}>
|
|
50
48
|
{values.map((val, idx) => (
|
|
51
|
-
<AntdSteps.Step
|
|
49
|
+
<AntdSteps.Step
|
|
50
|
+
title={val[1]}
|
|
51
|
+
description={idx === current && status === "error" ? error : null}
|
|
52
|
+
/>
|
|
52
53
|
))}
|
|
53
54
|
</AntdSteps>
|
|
54
55
|
);
|
|
55
|
-
};
|
|
56
|
+
};
|