@gisce/react-ooui 2.0.0-alpha.2 → 2.0.0-alpha.21
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 +11 -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/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 +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 +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 +9836 -0
- package/dist/react-ooui.es.js.map +1 -0
- package/dist/style.css +1 -0
- package/dist/types/index.d.ts +257 -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 +6 -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.d.ts +32 -0
- package/dist/widgets/views/Tree.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 +36 -13
- 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/FormActionBar.tsx +2 -2
- package/src/actionbar/NewButton.tsx +1 -1
- package/src/actionbar/TreeActionBar.tsx +2 -2
- package/src/context/ActionViewContext.tsx +7 -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/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/hooks/useEffectDebugger.ts +2 -2
- package/src/hooks/useExport.ts +8 -8
- package/src/hooks/useWindowDimensions.ts +1 -1
- 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/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/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 +3 -6
- 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/views/Tree.stories.jsx +3 -5
- package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +15 -30
- package/src/ui/ConfirmDialog.tsx +1 -1
- package/src/ui/GoToResourceModal.tsx +7 -3
- 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 +1 -1
- 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/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/many2one/Many2oneSuffixModal.tsx +2 -2
- package/src/widgets/base/one2many/One2many.tsx +2 -2
- package/src/widgets/base/one2many/One2manyInput.tsx +1 -1
- package/src/widgets/custom/Avatar.tsx +15 -7
- package/src/widgets/custom/Markdown.tsx +12 -8
- 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/modals/SearchModal.tsx +31 -29
- package/src/widgets/modals/TranslationModal.tsx +2 -2
- package/src/widgets/views/Dashboard/Dashboard.tsx +3 -3
- package/src/widgets/views/DashboardGrid/DashboardGrid.tsx +3 -3
- package/src/widgets/views/Form.tsx +1 -1
- package/src/widgets/views/Graph/Graph.tsx +1 -1
- package/src/widgets/views/Graph/GraphChart.tsx +1 -1
- package/src/widgets/views/Graph/GraphDefaults.ts +2 -2
- package/src/widgets/views/SearchTree.tsx +2 -2
- package/src/widgets/views/searchFilter/SearchBottomBar.tsx +2 -6
- package/src/widgets/views/searchFilter/SearchField.tsx +5 -1
- package/src/widgets/views/searchFilter/SearchFilter.tsx +1 -1
- package/src/widgets/views/searchFilter/SearchParams.tsx +7 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchBottomBar.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchBottomBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAY1C,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAkChE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchField.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,EAGN,MAAM,aAAa,CAAC;AAGrB,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,2CAyCvC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SearchFields } from '../../../*/types';
|
|
2
|
+
type Props = {
|
|
3
|
+
fields: any;
|
|
4
|
+
searchFields: SearchFields;
|
|
5
|
+
onClear: () => void;
|
|
6
|
+
onSubmit: (values: any) => void;
|
|
7
|
+
isSearching: boolean;
|
|
8
|
+
limit: number;
|
|
9
|
+
offset: number;
|
|
10
|
+
onLimitChange?: (limit: number) => void;
|
|
11
|
+
searchVisible?: boolean;
|
|
12
|
+
setSearchFilterHeight?: (height: number) => void;
|
|
13
|
+
searchError?: string;
|
|
14
|
+
searchValues?: any;
|
|
15
|
+
showLimitOptions?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare function SearchFilter(props: Props): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export default SearchFilter;
|
|
19
|
+
//# sourceMappingURL=SearchFilter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchFilter.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchFilter.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,iBAAS,YAAY,CAAC,KAAK,EAAE,KAAK,2CAyHjC;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SearchParams.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchParams.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,KAAK,iBAAiB,GAAG;IACvB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAsBzE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gisce/react-ooui",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.21",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": "20.5.0"
|
|
6
6
|
},
|
|
@@ -20,19 +20,21 @@
|
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
22
|
"scripts": {
|
|
23
|
-
"preinstall": "npx only-allow npm",
|
|
24
23
|
"build": "tsc --noEmit && vite build",
|
|
25
24
|
"preview": "npm run build && vite preview",
|
|
26
|
-
"dev:vite": "
|
|
25
|
+
"dev:vite": "vite build --watch --force",
|
|
27
26
|
"dev:tsc": "tsc --noEmit --watch",
|
|
28
27
|
"prepare": "husky install",
|
|
29
28
|
"start": "concurrently npm:dev:*",
|
|
30
|
-
"check": "lint-staged"
|
|
29
|
+
"check": "lint-staged",
|
|
30
|
+
"storybook": "storybook dev -p 6006",
|
|
31
|
+
"build-storybook": "storybook build",
|
|
32
|
+
"analyze": "npx vite-bundle-visualizer"
|
|
31
33
|
},
|
|
32
34
|
"dependencies": {
|
|
33
35
|
"@ant-design/plots": "^1.0.9",
|
|
34
36
|
"@gisce/fiber-diagram": "^1.1.0-rc.3",
|
|
35
|
-
"@gisce/ooui": "
|
|
37
|
+
"@gisce/ooui": "1.0.0-alpha.2",
|
|
36
38
|
"@gisce/react-formiga-components": "^1.0.9-rc.21",
|
|
37
39
|
"@gisce/react-formiga-table": "^0.8.6",
|
|
38
40
|
"@monaco-editor/react": "^4.4.5",
|
|
@@ -42,25 +44,34 @@
|
|
|
42
44
|
"file-type-buffer-browser": "git+ssh://git@github.com/mguellsegarra/file-type-buffer-browser.git",
|
|
43
45
|
"interweave": "^13.0.0",
|
|
44
46
|
"md5": "^2.3.0",
|
|
45
|
-
"react": "
|
|
46
|
-
"react-dom": "
|
|
47
|
+
"react": "18.2.0",
|
|
48
|
+
"react-dom": "18.2.0",
|
|
47
49
|
"react-grid-layout": "^1.3.4",
|
|
48
50
|
"react-hotkeys-hook": "^3.4.4",
|
|
49
51
|
"react-markdown": "^8.0.7",
|
|
50
52
|
"react-measure": "^2.5.2",
|
|
51
53
|
"styled-components": "5.3.5",
|
|
52
54
|
"use-deep-compare-effect": "^1.8.1",
|
|
53
|
-
"uuid": "^
|
|
55
|
+
"uuid": "^9.0.1",
|
|
54
56
|
"validator": "^13.6.0"
|
|
55
57
|
},
|
|
56
58
|
"devDependencies": {
|
|
57
59
|
"@semantic-release/exec": "6.0.3",
|
|
58
60
|
"@semantic-release/git": "10.0.1",
|
|
59
61
|
"@semantic-release/npm": "10.0.4",
|
|
62
|
+
"@storybook/addon-essentials": "^7.4.6",
|
|
63
|
+
"@storybook/addon-interactions": "^7.4.6",
|
|
64
|
+
"@storybook/addon-knobs": "^7.0.2",
|
|
65
|
+
"@storybook/addon-links": "^7.4.6",
|
|
66
|
+
"@storybook/addon-onboarding": "^1.0.8",
|
|
67
|
+
"@storybook/blocks": "^7.4.6",
|
|
68
|
+
"@storybook/react": "^7.4.6",
|
|
69
|
+
"@storybook/react-vite": "^7.4.6",
|
|
70
|
+
"@storybook/testing-library": "^0.2.2",
|
|
60
71
|
"@types/lodash": "^4.14.170",
|
|
61
72
|
"@types/md5": "^2.3.2",
|
|
62
|
-
"@types/react": "
|
|
63
|
-
"@types/react-dom": "
|
|
73
|
+
"@types/react": "18.2.18",
|
|
74
|
+
"@types/react-dom": "18.2.7",
|
|
64
75
|
"@types/react-grid-layout": "^1.3.2",
|
|
65
76
|
"@types/react-measure": "^2.0.7",
|
|
66
77
|
"@types/react-responsive": "^8.0.2",
|
|
@@ -83,19 +94,20 @@
|
|
|
83
94
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
84
95
|
"husky": "8.0.3",
|
|
85
96
|
"lint-staged": "13.2.3",
|
|
86
|
-
"only-allow": "1.1.1",
|
|
87
97
|
"prettier": "3.0.1",
|
|
88
98
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
89
99
|
"semantic-release": "21.0.7",
|
|
100
|
+
"storybook": "^7.4.6",
|
|
90
101
|
"typescript": "^5.0.4",
|
|
91
102
|
"vite": "4.4.8",
|
|
103
|
+
"vite-bundle-visualizer": "^0.10.0",
|
|
92
104
|
"vite-plugin-dts": "^3.6.0",
|
|
93
105
|
"vite-plugin-package-version": "1.0.2",
|
|
94
106
|
"vite-tsconfig-paths": "3.5.0"
|
|
95
107
|
},
|
|
96
108
|
"peerDependencies": {
|
|
97
|
-
"react": "
|
|
98
|
-
"react-dom": "
|
|
109
|
+
"react": "18.2.0",
|
|
110
|
+
"react-dom": "18.2.0",
|
|
99
111
|
"styled-components": "5.3.5"
|
|
100
112
|
},
|
|
101
113
|
"lint-staged": {
|
|
@@ -117,6 +129,12 @@
|
|
|
117
129
|
"plugins": [
|
|
118
130
|
"@semantic-release/commit-analyzer",
|
|
119
131
|
"@semantic-release/release-notes-generator",
|
|
132
|
+
[
|
|
133
|
+
"@semantic-release/exec",
|
|
134
|
+
{
|
|
135
|
+
"prepareCmd": "npm run build"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
120
138
|
[
|
|
121
139
|
"@semantic-release/npm",
|
|
122
140
|
{
|
|
@@ -126,5 +144,10 @@
|
|
|
126
144
|
"@semantic-release/github",
|
|
127
145
|
"@semantic-release/git"
|
|
128
146
|
]
|
|
147
|
+
},
|
|
148
|
+
"overrides": {
|
|
149
|
+
"rc-dropdown": "3.2.0",
|
|
150
|
+
"react": "18.2.0",
|
|
151
|
+
"react-dom": "18.2.0"
|
|
129
152
|
}
|
|
130
153
|
}
|
|
@@ -9,7 +9,7 @@ export default class ConnectionProvider {
|
|
|
9
9
|
|
|
10
10
|
public static getHandler(): ConnectionProviderType {
|
|
11
11
|
if (!ConnectionProvider.handler) {
|
|
12
|
-
throw
|
|
12
|
+
throw "Must call init() first with a valid ConnectionProvider instance";
|
|
13
13
|
}
|
|
14
14
|
return ConnectionProvider.handler;
|
|
15
15
|
}
|
|
@@ -15,16 +15,16 @@ describe("A IconMapper instance", () => {
|
|
|
15
15
|
const findAndReplaceIcon = Icons.FileSearchOutlined;
|
|
16
16
|
const icon = iconMapper("gtk-find-and-replace");
|
|
17
17
|
expect(icon).toBe(findAndReplaceIcon);
|
|
18
|
-
})
|
|
18
|
+
});
|
|
19
19
|
test("should return gtk-go", () => {
|
|
20
20
|
const findAndReplaceIcon = Icons.FileSearchOutlined;
|
|
21
21
|
const icon = iconMapper("gtk-find-and-replace");
|
|
22
22
|
expect(icon).toBe(findAndReplaceIcon);
|
|
23
|
-
})
|
|
23
|
+
});
|
|
24
24
|
describe("If key doesn't exist in iconMapper", () => {
|
|
25
25
|
test("should return undefined", () => {
|
|
26
26
|
const icon = iconMapper("gtk-foo-bar");
|
|
27
27
|
expect(icon).toBe(undefined);
|
|
28
|
-
})
|
|
29
|
-
})
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
30
|
});
|
|
@@ -52,7 +52,7 @@ function AttachmentsButton(props: AttachmentsButtonProps) {
|
|
|
52
52
|
name: r.name,
|
|
53
53
|
datas_fname: r.datas_fname,
|
|
54
54
|
link: r.link,
|
|
55
|
-
}))
|
|
55
|
+
})),
|
|
56
56
|
);
|
|
57
57
|
} catch (error) {
|
|
58
58
|
showErrorDialog(error as any);
|
|
@@ -103,28 +103,30 @@ function AttachmentsButton(props: AttachmentsButtonProps) {
|
|
|
103
103
|
preloadAttachments();
|
|
104
104
|
}, [preloadAttachments]);
|
|
105
105
|
|
|
106
|
-
return (
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
106
|
+
return (
|
|
107
|
+
<>
|
|
108
|
+
<AttachmentsButtonWrapper
|
|
109
|
+
numberOfAttachments={attachments.length}
|
|
110
|
+
attachments={preloadedAttachments}
|
|
111
|
+
disabled={disabled}
|
|
112
|
+
loading={preloading}
|
|
113
|
+
onAddNewAttachment={onAddNewAttachment}
|
|
114
|
+
onListAllAttachments={onListAllAttachments}
|
|
115
|
+
onopenAttachmentLink={openAttachmentLink}
|
|
116
|
+
onOpenAttachmentDetail={openAttachmentDetail}
|
|
117
|
+
/>
|
|
118
|
+
<Modal
|
|
119
|
+
title={t("downloadingAttachment")}
|
|
120
|
+
open={downloading}
|
|
121
|
+
footer={null}
|
|
122
|
+
closable={false}
|
|
123
|
+
centered
|
|
124
|
+
maskClosable={false}
|
|
125
|
+
>
|
|
126
|
+
<Spin />
|
|
127
|
+
</Modal>
|
|
128
|
+
</>
|
|
129
|
+
);
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
export default AttachmentsButton;
|
|
@@ -33,7 +33,7 @@ export type AttachmentsButtonWrapperProps = {
|
|
|
33
33
|
};
|
|
34
34
|
|
|
35
35
|
export const AttachmentsButtonWrapper = (
|
|
36
|
-
props: AttachmentsButtonWrapperProps
|
|
36
|
+
props: AttachmentsButtonWrapperProps,
|
|
37
37
|
) => {
|
|
38
38
|
const { numberOfAttachments, disabled } = props;
|
|
39
39
|
const { t, lang } = useContext(LocaleContext) as LocaleContextType;
|
|
@@ -68,7 +68,7 @@ export const AttachmentsButtonWrapper = (
|
|
|
68
68
|
const Content = (
|
|
69
69
|
props: AttachmentsButtonWrapperProps,
|
|
70
70
|
setPopoverVisible: (visible: boolean) => void,
|
|
71
|
-
locale: string
|
|
71
|
+
locale: string,
|
|
72
72
|
) => {
|
|
73
73
|
const {
|
|
74
74
|
attachments = [],
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import ButtonWithTooltip, {
|
|
3
|
-
|
|
2
|
+
import ButtonWithTooltip, {
|
|
3
|
+
Props as ButtonWithTooltipProps,
|
|
4
|
+
} from "@/common/ButtonWithTooltip";
|
|
5
|
+
import { theme } from "antd";
|
|
4
6
|
const { useToken } = theme;
|
|
5
7
|
|
|
6
8
|
type Props = ButtonWithTooltipProps & {
|
|
@@ -95,7 +95,7 @@ function ChangeViewButton(props: Props) {
|
|
|
95
95
|
function handleMenuClick(event: any) {
|
|
96
96
|
tryNavigate(() => {
|
|
97
97
|
const selectedView = availableViews.find(
|
|
98
|
-
(view) => view.view_id === parseInt(event.key)
|
|
98
|
+
(view) => view.view_id === parseInt(event.key),
|
|
99
99
|
);
|
|
100
100
|
onChangeView(selectedView!);
|
|
101
101
|
});
|
|
@@ -13,12 +13,8 @@ import {
|
|
|
13
13
|
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
14
14
|
|
|
15
15
|
function DashboardActionBar() {
|
|
16
|
-
const {
|
|
17
|
-
|
|
18
|
-
dashboardRef,
|
|
19
|
-
moveItemsEnabled,
|
|
20
|
-
setMoveItemsEnabled,
|
|
21
|
-
} = useContext(DashboardActionContext) as DashboardActionContextType;
|
|
16
|
+
const { isLoading, dashboardRef, moveItemsEnabled, setMoveItemsEnabled } =
|
|
17
|
+
useContext(DashboardActionContext) as DashboardActionContextType;
|
|
22
18
|
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
23
19
|
|
|
24
20
|
return (
|
|
@@ -70,12 +70,12 @@ function FormActionBar({ toolbar }: { toolbar: any }) {
|
|
|
70
70
|
const { t, lang } = useContext(LocaleContext) as LocaleContextType;
|
|
71
71
|
|
|
72
72
|
const contentRootContext = useContext(
|
|
73
|
-
ContentRootContext
|
|
73
|
+
ContentRootContext,
|
|
74
74
|
) as ContentRootContextType;
|
|
75
75
|
const { processAction } = contentRootContext || {};
|
|
76
76
|
|
|
77
77
|
const tabManagerContext = useContext(
|
|
78
|
-
TabManagerContext
|
|
78
|
+
TabManagerContext,
|
|
79
79
|
) as TabManagerContextType;
|
|
80
80
|
const { openRelate, openDefaultActionForModel } = tabManagerContext || {};
|
|
81
81
|
|
|
@@ -16,7 +16,7 @@ function NewButton(props: Props) {
|
|
|
16
16
|
const { disabled = false } = props;
|
|
17
17
|
|
|
18
18
|
const { formHasChanges, onNewClicked: onNewClickedProps } = useContext(
|
|
19
|
-
ActionViewContext
|
|
19
|
+
ActionViewContext,
|
|
20
20
|
) as ActionViewContextType;
|
|
21
21
|
const { t, lang } = useContext(LocaleContext) as LocaleContextType;
|
|
22
22
|
|
|
@@ -69,7 +69,7 @@ function TreeActionBar(props: Props) {
|
|
|
69
69
|
const { previewFeatures } = useContext(ConfigContext);
|
|
70
70
|
const { t, lang } = useContext(LocaleContext) as LocaleContextType;
|
|
71
71
|
const contentRootContext = useContext(
|
|
72
|
-
ContentRootContext
|
|
72
|
+
ContentRootContext,
|
|
73
73
|
) as ContentRootContextType;
|
|
74
74
|
const { processAction } = contentRootContext || {};
|
|
75
75
|
const [exportModalVisible, setExportModalVisible] = useState(false);
|
|
@@ -357,7 +357,7 @@ function TreeActionBar(props: Props) {
|
|
|
357
357
|
model={currentModel!}
|
|
358
358
|
domain={mergeParams(
|
|
359
359
|
searchTreeRef?.current?.getDomain() || [],
|
|
360
|
-
searchParams || []
|
|
360
|
+
searchParams || [],
|
|
361
361
|
)}
|
|
362
362
|
limit={limit}
|
|
363
363
|
totalRegisters={totalItems || 0}
|
|
@@ -105,7 +105,7 @@ const ActionViewProvider = (props: ActionViewProviderProps): any => {
|
|
|
105
105
|
const [previousView, setPreviousView] = useState<View>();
|
|
106
106
|
const [searchValues, setSearchValues] = useState<any>({});
|
|
107
107
|
const [limit, setLimit] = useState<number>(
|
|
108
|
-
limitProps !== undefined ? limitProps : DEFAULT_SEARCH_LIMIT
|
|
108
|
+
limitProps !== undefined ? limitProps : DEFAULT_SEARCH_LIMIT,
|
|
109
109
|
);
|
|
110
110
|
const [title, setTitle] = useState<string>(titleProps);
|
|
111
111
|
|
|
@@ -125,7 +125,9 @@ const ActionViewProvider = (props: ActionViewProviderProps): any => {
|
|
|
125
125
|
setPreviousView(availableViews[0]);
|
|
126
126
|
} else if (availableViews.length > 1) {
|
|
127
127
|
setPreviousView(
|
|
128
|
-
availableViews.filter(
|
|
128
|
+
availableViews.filter(
|
|
129
|
+
(view) => view.view_id !== currentView.view_id,
|
|
130
|
+
)[0],
|
|
129
131
|
);
|
|
130
132
|
}
|
|
131
133
|
}, [availableViews]);
|
|
@@ -136,7 +138,9 @@ const ActionViewProvider = (props: ActionViewProviderProps): any => {
|
|
|
136
138
|
availableViews.length > 1
|
|
137
139
|
) {
|
|
138
140
|
setPreviousView(
|
|
139
|
-
availableViews.filter(
|
|
141
|
+
availableViews.filter(
|
|
142
|
+
(view) => view.view_id !== currentView.view_id,
|
|
143
|
+
)[0],
|
|
140
144
|
);
|
|
141
145
|
}
|
|
142
146
|
}, [currentView]);
|
|
@@ -10,9 +10,8 @@ export type DashboardActionContextType = {
|
|
|
10
10
|
setMoveItemsEnabled: (value: boolean) => void;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export const DashboardActionContext =
|
|
14
|
-
null
|
|
15
|
-
);
|
|
13
|
+
export const DashboardActionContext =
|
|
14
|
+
React.createContext<DashboardActionContextType | null>(null);
|
|
16
15
|
|
|
17
16
|
type DashboardActionProviderProps = {
|
|
18
17
|
children: React.ReactNode;
|
|
@@ -4,9 +4,8 @@ export type FormModalContextType = {
|
|
|
4
4
|
setTitle?: (title: string) => void;
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
-
export const FormModalContext =
|
|
8
|
-
null
|
|
9
|
-
);
|
|
7
|
+
export const FormModalContext =
|
|
8
|
+
React.createContext<FormModalContextType | null>(null);
|
|
10
9
|
|
|
11
10
|
type FormModalProviderProps = FormModalContextType & {
|
|
12
11
|
children: React.ReactNode;
|
|
@@ -11,7 +11,7 @@ export type One2manyContextType = {
|
|
|
11
11
|
};
|
|
12
12
|
|
|
13
13
|
export const One2manyContext = React.createContext<One2manyContextType | null>(
|
|
14
|
-
null
|
|
14
|
+
null,
|
|
15
15
|
);
|
|
16
16
|
|
|
17
17
|
const One2manyProvider = ({
|
|
@@ -23,9 +23,8 @@ const One2manyProvider = ({
|
|
|
23
23
|
}): any => {
|
|
24
24
|
const [currentView, setCurrentView] = useState<ViewType>(initialView);
|
|
25
25
|
const [itemIndex, setItemIndex] = useState<number>(0);
|
|
26
|
-
const [manualTriggerChange, setManualTriggerChange] =
|
|
27
|
-
false
|
|
28
|
-
);
|
|
26
|
+
const [manualTriggerChange, setManualTriggerChange] =
|
|
27
|
+
useState<boolean>(false);
|
|
29
28
|
|
|
30
29
|
return (
|
|
31
30
|
<One2manyContext.Provider
|
|
@@ -72,7 +72,7 @@ const expandWidgetsIfNeeded = ({
|
|
|
72
72
|
|
|
73
73
|
const getSingleRowTemplateColumns = (
|
|
74
74
|
row: Widget[],
|
|
75
|
-
numberOfColumns: number
|
|
75
|
+
numberOfColumns: number,
|
|
76
76
|
) => {
|
|
77
77
|
const gridOptions = row.map((item: Widget) => {
|
|
78
78
|
if (item instanceof Label && (item as Label).fieldForLabel) {
|
|
@@ -20,7 +20,7 @@ const getTextWidth = (text: string, font = "14px -apple-system") => {
|
|
|
20
20
|
export const calculateColumnsWidth = (
|
|
21
21
|
columns: any,
|
|
22
22
|
source: any,
|
|
23
|
-
maxWidthPerCell = 500
|
|
23
|
+
maxWidthPerCell = 500,
|
|
24
24
|
) => {
|
|
25
25
|
if (columns.length === 0) {
|
|
26
26
|
return { columns };
|
|
@@ -32,7 +32,7 @@ export const calculateColumnsWidth = (
|
|
|
32
32
|
const columnsWithWidth = columns.map((column: any) =>
|
|
33
33
|
Object.assign(column, {
|
|
34
34
|
width: getTextWidth(column.title),
|
|
35
|
-
})
|
|
35
|
+
}),
|
|
36
36
|
);
|
|
37
37
|
|
|
38
38
|
// Since we have a minimum width (column's width already calculated),
|
|
@@ -102,7 +102,7 @@ const iconMapping: { [key: string]: string } = {
|
|
|
102
102
|
|
|
103
103
|
export default (
|
|
104
104
|
key: string,
|
|
105
|
-
props?: { className?: any; style: CSSProperties }
|
|
105
|
+
props?: { className?: any; style: CSSProperties },
|
|
106
106
|
) => {
|
|
107
107
|
if (key.indexOf("gtk-") !== -1) {
|
|
108
108
|
const rootIcon = key.replace("gtk-", "").replace(/\-/g, "_");
|
|
@@ -122,15 +122,15 @@ function toCamelCase(key: string): string {
|
|
|
122
122
|
.map((word) =>
|
|
123
123
|
word.replace(
|
|
124
124
|
/\w\S*/g,
|
|
125
|
-
(w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()
|
|
126
|
-
)
|
|
125
|
+
(w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase(),
|
|
126
|
+
),
|
|
127
127
|
)
|
|
128
128
|
.join("")}`;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
function getIconForKey(
|
|
132
132
|
key: string,
|
|
133
|
-
props?: { className?: any; style: CSSProperties }
|
|
133
|
+
props?: { className?: any; style: CSSProperties },
|
|
134
134
|
) {
|
|
135
135
|
let IconCamelCase = key.charAt(0).toUpperCase() + key.slice(1); // Capitalize first letter
|
|
136
136
|
if (IconCamelCase.indexOf("-") !== -1) {
|
|
@@ -150,7 +150,7 @@ function getIconForKey(
|
|
|
150
150
|
const TablerIcon = () =>
|
|
151
151
|
React.createElement(TablerIcons[tablerKey] as any, {
|
|
152
152
|
fill: "transparent",
|
|
153
|
-
size: props?.style?.fontSize || 17
|
|
153
|
+
size: props?.style?.fontSize || 17,
|
|
154
154
|
});
|
|
155
155
|
const CustomIcon = () =>
|
|
156
156
|
React.createElement(Icon, {
|
|
@@ -5,12 +5,14 @@ import showInfo from "@/ui/InfoDialog";
|
|
|
5
5
|
async function showLogInfo(
|
|
6
6
|
model: string,
|
|
7
7
|
currentId: number,
|
|
8
|
-
translateFn: Function
|
|
8
|
+
translateFn: Function,
|
|
9
9
|
) {
|
|
10
|
-
const logInfo = (
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
const logInfo = (
|
|
11
|
+
(await ConnectionProvider.getHandler().getLogInfo({
|
|
12
|
+
model,
|
|
13
|
+
ids: [currentId],
|
|
14
|
+
})) as any
|
|
15
|
+
)[0];
|
|
14
16
|
|
|
15
17
|
const { create_date, create_uid, id, write_date, write_uid } = logInfo;
|
|
16
18
|
|
|
@@ -21,7 +23,7 @@ async function showLogInfo(
|
|
|
21
23
|
{translateFn("creationDate") + ": " + create_date} <br />
|
|
22
24
|
{translateFn("lastUpdatedBy") + ": " + write_uid[1]} <br />
|
|
23
25
|
{translateFn("lastUpdatedDate") + ": " + write_date}
|
|
24
|
-
</div
|
|
26
|
+
</div>,
|
|
25
27
|
);
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -8,7 +8,7 @@ function parseStringToFloat(text?: string) {
|
|
|
8
8
|
const splitted = text.trim().split(":");
|
|
9
9
|
return (
|
|
10
10
|
Math.round(
|
|
11
|
-
(parseInt(splitted[0]) + parseInt(splitted[1]) / 60.0) * 10000
|
|
11
|
+
(parseInt(splitted[0]) + parseInt(splitted[1]) / 60.0) * 10000,
|
|
12
12
|
) / 10000
|
|
13
13
|
);
|
|
14
14
|
} else {
|
|
@@ -55,4 +55,4 @@ function parseFloatToString(num?: number) {
|
|
|
55
55
|
return finalString;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export { parseStringToFloat, parseFloatToString };
|
|
58
|
+
export { parseStringToFloat, parseFloatToString };
|
|
@@ -11,7 +11,7 @@ const usePrevious = (value: any, initialValue: any) => {
|
|
|
11
11
|
const useEffectDebugger = (
|
|
12
12
|
effectHook: any,
|
|
13
13
|
dependencies: any,
|
|
14
|
-
dependencyNames = []
|
|
14
|
+
dependencyNames = [],
|
|
15
15
|
) => {
|
|
16
16
|
const previousDeps = usePrevious(dependencies, []);
|
|
17
17
|
|
|
@@ -30,7 +30,7 @@ const useEffectDebugger = (
|
|
|
30
30
|
|
|
31
31
|
return accum;
|
|
32
32
|
},
|
|
33
|
-
{}
|
|
33
|
+
{},
|
|
34
34
|
);
|
|
35
35
|
|
|
36
36
|
if (Object.keys(changedDeps).length) {
|
package/src/hooks/useExport.ts
CHANGED
|
@@ -70,7 +70,7 @@ export const useExport = ({
|
|
|
70
70
|
const fileType: any = await getMimeType(datas);
|
|
71
71
|
openBase64InNewTab(datas, fileType.mime);
|
|
72
72
|
},
|
|
73
|
-
[locale, model, domain, limit, context, onClose]
|
|
73
|
+
[locale, model, domain, limit, context, onClose],
|
|
74
74
|
);
|
|
75
75
|
|
|
76
76
|
const onGetFields = useCallback(async () => {
|
|
@@ -109,7 +109,7 @@ export const useExport = ({
|
|
|
109
109
|
parentKey: key,
|
|
110
110
|
});
|
|
111
111
|
},
|
|
112
|
-
[fields.current, model, context]
|
|
112
|
+
[fields.current, model, context],
|
|
113
113
|
);
|
|
114
114
|
|
|
115
115
|
const onGetPredefinedExports = useCallback(async () => {
|
|
@@ -171,12 +171,12 @@ export const useExport = ({
|
|
|
171
171
|
fields: fieldsForExportLine,
|
|
172
172
|
context,
|
|
173
173
|
});
|
|
174
|
-
})
|
|
174
|
+
}),
|
|
175
175
|
);
|
|
176
176
|
|
|
177
177
|
return { ...pExport, id: exportId };
|
|
178
178
|
},
|
|
179
|
-
[]
|
|
179
|
+
[],
|
|
180
180
|
);
|
|
181
181
|
|
|
182
182
|
const onRemovePredefinedExport = useCallback(
|
|
@@ -186,7 +186,7 @@ export const useExport = ({
|
|
|
186
186
|
ids: [pExport.id!],
|
|
187
187
|
});
|
|
188
188
|
},
|
|
189
|
-
[]
|
|
189
|
+
[],
|
|
190
190
|
);
|
|
191
191
|
|
|
192
192
|
const getModelFields = useCallback(
|
|
@@ -203,7 +203,7 @@ export const useExport = ({
|
|
|
203
203
|
|
|
204
204
|
exportModelFields.current.set(model, fieldsForModel);
|
|
205
205
|
},
|
|
206
|
-
[exportModelFields, context]
|
|
206
|
+
[exportModelFields, context],
|
|
207
207
|
);
|
|
208
208
|
|
|
209
209
|
return {
|
|
@@ -352,7 +352,7 @@ const getKeysWithoutChildsInFields = ({
|
|
|
352
352
|
return !fields?.[getParentKey(key)]?.[key];
|
|
353
353
|
}
|
|
354
354
|
})
|
|
355
|
-
.map((key) => getParentKey(key))
|
|
355
|
+
.map((key) => getParentKey(key)),
|
|
356
356
|
),
|
|
357
357
|
]);
|
|
358
358
|
};
|
|
@@ -367,7 +367,7 @@ const retrieveKeyFieldsForPredefinedExports = async ({
|
|
|
367
367
|
onGetFieldChilds: (key: string) => Promise<ExportField[]>;
|
|
368
368
|
}) => {
|
|
369
369
|
const allPredefinedExportKeys = predefinedExports.flatMap(
|
|
370
|
-
(exp: PredefinedExport) => exp.fields.map((field: any) => field.key)
|
|
370
|
+
(exp: PredefinedExport) => exp.fields.map((field: any) => field.key),
|
|
371
371
|
);
|
|
372
372
|
|
|
373
373
|
const keysWithoutChildsInFields = getKeysWithoutChildsInFields({
|