@gisce/react-ooui 0.1.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/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/Config.d.ts +6 -0
- package/dist/Config.d.ts.map +1 -0
- package/dist/Config.js +7 -0
- package/dist/Config.js.map +1 -0
- package/dist/ConnectionProvider.d.ts +7 -0
- package/dist/ConnectionProvider.d.ts.map +1 -0
- package/dist/ConnectionProvider.js +18 -0
- package/dist/ConnectionProvider.js.map +1 -0
- package/dist/actionbar/ActionButton.d.ts +13 -0
- package/dist/actionbar/ActionButton.d.ts.map +1 -0
- package/dist/actionbar/ActionButton.js +17 -0
- package/dist/actionbar/ActionButton.js.map +1 -0
- package/dist/actionbar/AttachmentsButton.d.ts +11 -0
- package/dist/actionbar/AttachmentsButton.d.ts.map +1 -0
- package/dist/actionbar/AttachmentsButton.js +170 -0
- package/dist/actionbar/AttachmentsButton.js.map +1 -0
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts +18 -0
- package/dist/actionbar/AttachmentsButtonWrapper.d.ts.map +1 -0
- package/dist/actionbar/AttachmentsButtonWrapper.js +72 -0
- package/dist/actionbar/AttachmentsButtonWrapper.js.map +1 -0
- package/dist/actionbar/ButtonWithBadge.d.ts +8 -0
- package/dist/actionbar/ButtonWithBadge.d.ts.map +1 -0
- package/dist/actionbar/ButtonWithBadge.js +47 -0
- package/dist/actionbar/ButtonWithBadge.js.map +1 -0
- package/dist/actionbar/ChangeViewButton.d.ts +12 -0
- package/dist/actionbar/ChangeViewButton.d.ts.map +1 -0
- package/dist/actionbar/ChangeViewButton.js +97 -0
- package/dist/actionbar/ChangeViewButton.js.map +1 -0
- package/dist/actionbar/DashboardActionBar.d.ts +4 -0
- package/dist/actionbar/DashboardActionBar.d.ts.map +1 -0
- package/dist/actionbar/DashboardActionBar.js +50 -0
- package/dist/actionbar/DashboardActionBar.js.map +1 -0
- package/dist/actionbar/DropdownButton.d.ts +12 -0
- package/dist/actionbar/DropdownButton.d.ts.map +1 -0
- package/dist/actionbar/DropdownButton.js +38 -0
- package/dist/actionbar/DropdownButton.js.map +1 -0
- package/dist/actionbar/FormActionBar.d.ts +4 -0
- package/dist/actionbar/FormActionBar.d.ts.map +1 -0
- package/dist/actionbar/FormActionBar.js +346 -0
- package/dist/actionbar/FormActionBar.js.map +1 -0
- package/dist/actionbar/NewButton.d.ts +7 -0
- package/dist/actionbar/NewButton.d.ts.map +1 -0
- package/dist/actionbar/NewButton.js +50 -0
- package/dist/actionbar/NewButton.js.map +1 -0
- package/dist/actionbar/SearchBar.d.ts +9 -0
- package/dist/actionbar/SearchBar.d.ts.map +1 -0
- package/dist/actionbar/SearchBar.js +55 -0
- package/dist/actionbar/SearchBar.js.map +1 -0
- package/dist/actionbar/TreeActionBar.d.ts +7 -0
- package/dist/actionbar/TreeActionBar.d.ts.map +1 -0
- package/dist/actionbar/TreeActionBar.js +233 -0
- package/dist/actionbar/TreeActionBar.js.map +1 -0
- package/dist/common/ButtonWithTooltip.d.ts +8 -0
- package/dist/common/ButtonWithTooltip.d.ts.map +1 -0
- package/dist/common/ButtonWithTooltip.js +36 -0
- package/dist/common/ButtonWithTooltip.js.map +1 -0
- package/dist/common/DatePicker.d.ts +8 -0
- package/dist/common/DatePicker.d.ts.map +1 -0
- package/dist/common/DatePicker.js +66 -0
- package/dist/common/DatePicker.js.map +1 -0
- package/dist/common/Field.d.ts +14 -0
- package/dist/common/Field.d.ts.map +1 -0
- package/dist/common/Field.js +68 -0
- package/dist/common/Field.js.map +1 -0
- package/dist/context/ActionViewContext.d.ts +54 -0
- package/dist/context/ActionViewContext.d.ts.map +1 -0
- package/dist/context/ActionViewContext.js +93 -0
- package/dist/context/ActionViewContext.js.map +1 -0
- package/dist/context/ContentRootContext.d.ts +19 -0
- package/dist/context/ContentRootContext.d.ts.map +1 -0
- package/dist/context/ContentRootContext.js +419 -0
- package/dist/context/ContentRootContext.js.map +1 -0
- package/dist/context/DashboardActionContext.d.ts +19 -0
- package/dist/context/DashboardActionContext.d.ts.map +1 -0
- package/dist/context/DashboardActionContext.js +39 -0
- package/dist/context/DashboardActionContext.js.map +1 -0
- package/dist/context/FormContext.d.ts +30 -0
- package/dist/context/FormContext.d.ts.map +1 -0
- package/dist/context/FormContext.js +29 -0
- package/dist/context/FormContext.js.map +1 -0
- package/dist/context/FormModalContext.d.ts +11 -0
- package/dist/context/FormModalContext.d.ts.map +1 -0
- package/dist/context/FormModalContext.js +16 -0
- package/dist/context/FormModalContext.js.map +1 -0
- package/dist/context/LocaleContext.d.ts +14 -0
- package/dist/context/LocaleContext.d.ts.map +1 -0
- package/dist/context/LocaleContext.js +34 -0
- package/dist/context/LocaleContext.js.map +1 -0
- package/dist/context/One2manyContext.d.ts +17 -0
- package/dist/context/One2manyContext.d.ts.map +1 -0
- package/dist/context/One2manyContext.js +40 -0
- package/dist/context/One2manyContext.js.map +1 -0
- package/dist/context/TabManagerContext.d.ts +50 -0
- package/dist/context/TabManagerContext.d.ts.map +1 -0
- package/dist/context/TabManagerContext.js +45 -0
- package/dist/context/TabManagerContext.js.map +1 -0
- package/dist/helpers/containerHelper.d.ts +22 -0
- package/dist/helpers/containerHelper.d.ts.map +1 -0
- package/dist/helpers/containerHelper.js +108 -0
- package/dist/helpers/containerHelper.js.map +1 -0
- package/dist/helpers/dynamicColumnsHelper.d.ts +8 -0
- package/dist/helpers/dynamicColumnsHelper.d.ts.map +1 -0
- package/dist/helpers/dynamicColumnsHelper.js +67 -0
- package/dist/helpers/dynamicColumnsHelper.js.map +1 -0
- package/dist/helpers/filesHelper.d.ts +8 -0
- package/dist/helpers/filesHelper.d.ts.map +1 -0
- package/dist/helpers/filesHelper.js +91 -0
- package/dist/helpers/filesHelper.js.map +1 -0
- package/dist/helpers/formHelper.d.ts +31 -0
- package/dist/helpers/formHelper.d.ts.map +1 -0
- package/dist/helpers/formHelper.js +191 -0
- package/dist/helpers/formHelper.js.map +1 -0
- package/dist/helpers/iconMapper.d.ts +3 -0
- package/dist/helpers/iconMapper.d.ts.map +1 -0
- package/dist/helpers/iconMapper.js +125 -0
- package/dist/helpers/iconMapper.js.map +1 -0
- package/dist/helpers/logInfoHelper.d.ts +3 -0
- package/dist/helpers/logInfoHelper.d.ts.map +1 -0
- package/dist/helpers/logInfoHelper.js +78 -0
- package/dist/helpers/logInfoHelper.js.map +1 -0
- package/dist/helpers/one2manyHelper.d.ts +29 -0
- package/dist/helpers/one2manyHelper.d.ts.map +1 -0
- package/dist/helpers/one2manyHelper.js +159 -0
- package/dist/helpers/one2manyHelper.js.map +1 -0
- package/dist/helpers/searchFilterHelper.d.ts +5 -0
- package/dist/helpers/searchFilterHelper.d.ts.map +1 -0
- package/dist/helpers/searchFilterHelper.js +157 -0
- package/dist/helpers/searchFilterHelper.js.map +1 -0
- package/dist/helpers/timeHelper.d.ts +4 -0
- package/dist/helpers/timeHelper.d.ts.map +1 -0
- package/dist/helpers/timeHelper.js +53 -0
- package/dist/helpers/timeHelper.js.map +1 -0
- package/dist/helpers/treeHelper.d.ts +16 -0
- package/dist/helpers/treeHelper.d.ts.map +1 -0
- package/dist/helpers/treeHelper.js +128 -0
- package/dist/helpers/treeHelper.js.map +1 -0
- package/dist/hooks/useEffectDebugger.d.ts +3 -0
- package/dist/hooks/useEffectDebugger.d.ts.map +1 -0
- package/dist/hooks/useEffectDebugger.js +43 -0
- package/dist/hooks/useEffectDebugger.js.map +1 -0
- package/dist/hooks/useWindowDimensions.d.ts +7 -0
- package/dist/hooks/useWindowDimensions.d.ts.map +1 -0
- package/dist/hooks/useWindowDimensions.js +29 -0
- package/dist/hooks/useWindowDimensions.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.LICENSE.txt +76 -0
- package/dist/index.js.map +1 -0
- package/dist/locales/ca_ES.d.ts +81 -0
- package/dist/locales/ca_ES.d.ts.map +1 -0
- package/dist/locales/ca_ES.js +82 -0
- package/dist/locales/ca_ES.js.map +1 -0
- package/dist/locales/en_US.d.ts +81 -0
- package/dist/locales/en_US.d.ts.map +1 -0
- package/dist/locales/en_US.js +82 -0
- package/dist/locales/en_US.js.map +1 -0
- package/dist/locales/es_ES.d.ts +81 -0
- package/dist/locales/es_ES.d.ts.map +1 -0
- package/dist/locales/es_ES.js +82 -0
- package/dist/locales/es_ES.js.map +1 -0
- package/dist/main.css +180 -0
- package/dist/types/index.d.ts +205 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +3 -0
- package/dist/types/index.js.map +1 -0
- package/dist/ui/ActionErrorDialog.d.ts +3 -0
- package/dist/ui/ActionErrorDialog.d.ts.map +1 -0
- package/dist/ui/ActionErrorDialog.js +38 -0
- package/dist/ui/ActionErrorDialog.js.map +1 -0
- package/dist/ui/ConfirmDialog.d.ts +7 -0
- package/dist/ui/ConfirmDialog.d.ts.map +1 -0
- package/dist/ui/ConfirmDialog.js +24 -0
- package/dist/ui/ConfirmDialog.js.map +1 -0
- package/dist/ui/FavouriteButton.d.ts +26 -0
- package/dist/ui/FavouriteButton.d.ts.map +1 -0
- package/dist/ui/FavouriteButton.js +238 -0
- package/dist/ui/FavouriteButton.js.map +1 -0
- package/dist/ui/Fieldset.d.ts +8 -0
- package/dist/ui/Fieldset.d.ts.map +1 -0
- package/dist/ui/Fieldset.js +22 -0
- package/dist/ui/Fieldset.js.map +1 -0
- package/dist/ui/FormErrorsDialog.d.ts +3 -0
- package/dist/ui/FormErrorsDialog.d.ts.map +1 -0
- package/dist/ui/FormErrorsDialog.js +20 -0
- package/dist/ui/FormErrorsDialog.js.map +1 -0
- package/dist/ui/GenericErrorDialog.d.ts +3 -0
- package/dist/ui/GenericErrorDialog.d.ts.map +1 -0
- package/dist/ui/GenericErrorDialog.js +19 -0
- package/dist/ui/GenericErrorDialog.js.map +1 -0
- package/dist/ui/GoToResourceModal.d.ts +10 -0
- package/dist/ui/GoToResourceModal.d.ts.map +1 -0
- package/dist/ui/GoToResourceModal.js +49 -0
- package/dist/ui/GoToResourceModal.js.map +1 -0
- package/dist/ui/InfoDialog.d.ts +3 -0
- package/dist/ui/InfoDialog.d.ts.map +1 -0
- package/dist/ui/InfoDialog.js +13 -0
- package/dist/ui/InfoDialog.js.map +1 -0
- package/dist/ui/RefreshItemDialog.d.ts +7 -0
- package/dist/ui/RefreshItemDialog.d.ts.map +1 -0
- package/dist/ui/RefreshItemDialog.js +25 -0
- package/dist/ui/RefreshItemDialog.js.map +1 -0
- package/dist/ui/RemoveItemDialog.d.ts +6 -0
- package/dist/ui/RemoveItemDialog.d.ts.map +1 -0
- package/dist/ui/RemoveItemDialog.js +24 -0
- package/dist/ui/RemoveItemDialog.js.map +1 -0
- package/dist/ui/TitleHeader.d.ts +7 -0
- package/dist/ui/TitleHeader.d.ts.map +1 -0
- package/dist/ui/TitleHeader.js +93 -0
- package/dist/ui/TitleHeader.js.map +1 -0
- package/dist/ui/UnlinkItemDialog.d.ts +6 -0
- package/dist/ui/UnlinkItemDialog.d.ts.map +1 -0
- package/dist/ui/UnlinkItemDialog.js +24 -0
- package/dist/ui/UnlinkItemDialog.js.map +1 -0
- package/dist/ui/UnsavedChangesDialog.d.ts +7 -0
- package/dist/ui/UnsavedChangesDialog.d.ts.map +1 -0
- package/dist/ui/UnsavedChangesDialog.js +25 -0
- package/dist/ui/UnsavedChangesDialog.js.map +1 -0
- package/dist/ui/WarningDialog.d.ts +3 -0
- package/dist/ui/WarningDialog.d.ts.map +1 -0
- package/dist/ui/WarningDialog.js +20 -0
- package/dist/ui/WarningDialog.js.map +1 -0
- package/dist/views/ActionView.d.ts +24 -0
- package/dist/views/ActionView.d.ts.map +1 -0
- package/dist/views/ActionView.js +376 -0
- package/dist/views/ActionView.js.map +1 -0
- package/dist/views/CurrentTabContent.d.ts +4 -0
- package/dist/views/CurrentTabContent.d.ts.map +1 -0
- package/dist/views/CurrentTabContent.js +35 -0
- package/dist/views/CurrentTabContent.js.map +1 -0
- package/dist/views/RootView.d.ts +14 -0
- package/dist/views/RootView.d.ts.map +1 -0
- package/dist/views/RootView.js +469 -0
- package/dist/views/RootView.js.map +1 -0
- package/dist/views/TabContent.d.ts +8 -0
- package/dist/views/TabContent.d.ts.map +1 -0
- package/dist/views/TabContent.js +34 -0
- package/dist/views/TabContent.js.map +1 -0
- package/dist/views/TabSelector.d.ts +4 -0
- package/dist/views/TabSelector.d.ts.map +1 -0
- package/dist/views/TabSelector.js +34 -0
- package/dist/views/TabSelector.js.map +1 -0
- package/dist/views/Welcome.d.ts +4 -0
- package/dist/views/Welcome.d.ts.map +1 -0
- package/dist/views/Welcome.js +33 -0
- package/dist/views/Welcome.js.map +1 -0
- package/dist/views/tabs/Tab.d.ts +11 -0
- package/dist/views/tabs/Tab.d.ts.map +1 -0
- package/dist/views/tabs/Tab.js +54 -0
- package/dist/views/tabs/Tab.js.map +1 -0
- package/dist/widgets/WidgetFactory.d.ts +4 -0
- package/dist/widgets/WidgetFactory.d.ts.map +1 -0
- package/dist/widgets/WidgetFactory.js +85 -0
- package/dist/widgets/WidgetFactory.js.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/Binary.js +173 -0
- package/dist/widgets/base/Binary.js.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/Boolean.js +53 -0
- package/dist/widgets/base/Boolean.js.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/Button.js +118 -0
- package/dist/widgets/base/Button.js.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/Char.js +145 -0
- package/dist/widgets/base/Char.js.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/Date.js +13 -0
- package/dist/widgets/base/Date.js.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/DateTime.js +13 -0
- package/dist/widgets/base/DateTime.js.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/Email.js +34 -0
- package/dist/widgets/base/Email.js.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/Float.js +54 -0
- package/dist/widgets/base/Float.js.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/FloatTime.js +122 -0
- package/dist/widgets/base/FloatTime.js.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/Image.js +153 -0
- package/dist/widgets/base/Image.js.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/Integer.js +57 -0
- package/dist/widgets/base/Integer.js.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/Label.js +27 -0
- package/dist/widgets/base/Label.js.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/LinkInput.js +70 -0
- package/dist/widgets/base/LinkInput.js.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/MultiSelection.js +69 -0
- package/dist/widgets/base/MultiSelection.js.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/ProgressBar.js +45 -0
- package/dist/widgets/base/ProgressBar.js.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/Reference.js +93 -0
- package/dist/widgets/base/Reference.js.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/Selection.js +51 -0
- package/dist/widgets/base/Selection.js.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/Separator.js +15 -0
- package/dist/widgets/base/Separator.js.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/Text.js +142 -0
- package/dist/widgets/base/Text.js.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/Url.js +34 -0
- package/dist/widgets/base/Url.js.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/Many2one.js +353 -0
- package/dist/widgets/base/many2one/Many2one.js.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/Many2oneSuffix.js +215 -0
- package/dist/widgets/base/many2one/Many2oneSuffix.js.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/Many2oneSuffixModal.js +37 -0
- package/dist/widgets/base/many2one/Many2oneSuffixModal.js.map +1 -0
- package/dist/widgets/base/one2many/One2many.d.ts +9 -0
- package/dist/widgets/base/one2many/One2many.d.ts.map +1 -0
- package/dist/widgets/base/one2many/One2many.js +188 -0
- package/dist/widgets/base/one2many/One2many.js.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/One2manyInput.js +602 -0
- package/dist/widgets/base/one2many/One2manyInput.js.map +1 -0
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts +21 -0
- package/dist/widgets/base/one2many/One2manyTopBar.d.ts.map +1 -0
- package/dist/widgets/base/one2many/One2manyTopBar.js +59 -0
- package/dist/widgets/base/one2many/One2manyTopBar.js.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/Container.js +77 -0
- package/dist/widgets/containers/Container.js.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/Group.js +15 -0
- package/dist/widgets/containers/Group.js.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/containers/Notebook.js +21 -0
- package/dist/widgets/containers/Notebook.js.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/FiberGrid.js +50 -0
- package/dist/widgets/custom/FiberGrid.js.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/Indicator.js +44 -0
- package/dist/widgets/custom/Indicator.js.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/custom/Timeline.js +231 -0
- package/dist/widgets/custom/Timeline.js.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/FormModal.js +174 -0
- package/dist/widgets/modals/FormModal.js.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/SearchModal.js +129 -0
- package/dist/widgets/modals/SearchModal.js.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/modals/TranslationModal.js +254 -0
- package/dist/widgets/modals/TranslationModal.js.map +1 -0
- package/dist/widgets/views/Dashboard/Dashboard.d.ts +7 -0
- package/dist/widgets/views/Dashboard/Dashboard.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/Dashboard.js +368 -0
- package/dist/widgets/views/Dashboard/Dashboard.js.map +1 -0
- package/dist/widgets/views/Dashboard/Dashboard.types.d.ts +8 -0
- package/dist/widgets/views/Dashboard/Dashboard.types.d.ts.map +1 -0
- package/dist/widgets/views/Dashboard/Dashboard.types.js +3 -0
- package/dist/widgets/views/Dashboard/Dashboard.types.js.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/DashboardForm.js +106 -0
- package/dist/widgets/views/Dashboard/DashboardForm.js.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/DashboardTree.js +318 -0
- package/dist/widgets/views/Dashboard/DashboardTree.js.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/Dashboard/dashboardHelper.js +136 -0
- package/dist/widgets/views/Dashboard/dashboardHelper.js.map +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts +6 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts.map +1 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.js +31 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.js.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/DashboardGrid.types.js +3 -0
- package/dist/widgets/views/DashboardGrid/DashboardGrid.types.js.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.js +38 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.js.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/DashboardGridItem.types.js +3 -0
- package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.js.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/DashboardGrid/index.js +17 -0
- package/dist/widgets/views/DashboardGrid/index.js.map +1 -0
- package/dist/widgets/views/Form.d.ts +28 -0
- package/dist/widgets/views/Form.d.ts.map +1 -0
- package/dist/widgets/views/Form.js +933 -0
- package/dist/widgets/views/Form.js.map +1 -0
- package/dist/widgets/views/Graph/Graph.d.ts +10 -0
- package/dist/widgets/views/Graph/Graph.d.ts.map +1 -0
- package/dist/widgets/views/Graph/Graph.js +150 -0
- package/dist/widgets/views/Graph/Graph.js.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/GraphChart.js +104 -0
- package/dist/widgets/views/Graph/GraphChart.js.map +1 -0
- package/dist/widgets/views/Graph/GraphDefaults.d.ts +47 -0
- package/dist/widgets/views/Graph/GraphDefaults.d.ts.map +1 -0
- package/dist/widgets/views/Graph/GraphDefaults.js +62 -0
- package/dist/widgets/views/Graph/GraphDefaults.js.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/GraphIndicator.js +292 -0
- package/dist/widgets/views/Graph/GraphIndicator.js.map +1 -0
- package/dist/widgets/views/Graph/useGraphData.d.ts +18 -0
- package/dist/widgets/views/Graph/useGraphData.d.ts.map +1 -0
- package/dist/widgets/views/Graph/useGraphData.js +163 -0
- package/dist/widgets/views/Graph/useGraphData.js.map +1 -0
- package/dist/widgets/views/SearchTree.d.ts +25 -0
- package/dist/widgets/views/SearchTree.d.ts.map +1 -0
- package/dist/widgets/views/SearchTree.js +495 -0
- package/dist/widgets/views/SearchTree.js.map +1 -0
- package/dist/widgets/views/Tree.d.ts +23 -0
- package/dist/widgets/views/Tree.d.ts.map +1 -0
- package/dist/widgets/views/Tree.js +180 -0
- package/dist/widgets/views/Tree.js.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/DateRangePicker.js +26 -0
- package/dist/widgets/views/searchFilter/DateRangePicker.js.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/DateTimeRangePicker.js +53 -0
- package/dist/widgets/views/searchFilter/DateTimeRangePicker.js.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/PairFields.js +45 -0
- package/dist/widgets/views/searchFilter/PairFields.js.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/SearchBottomBar.js +40 -0
- package/dist/widgets/views/searchFilter/SearchBottomBar.js.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/SearchField.js +84 -0
- package/dist/widgets/views/searchFilter/SearchField.js.map +1 -0
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts +15 -0
- package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +1 -0
- package/dist/widgets/views/searchFilter/SearchFilter.js +78 -0
- package/dist/widgets/views/searchFilter/SearchFilter.js.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/dist/widgets/views/searchFilter/SearchParams.js +44 -0
- package/dist/widgets/views/searchFilter/SearchParams.js.map +1 -0
- package/package.json +89 -0
- package/src/.eslintcache +1 -0
- package/src/Config.ts +4 -0
- package/src/ConnectionProvider.ts +16 -0
- package/src/__tests__/iconMapper.test.ts +15 -0
- package/src/__tests__/searchFilterHelper.spec.ts +386 -0
- package/src/actionbar/ActionButton.tsx +40 -0
- package/src/actionbar/AttachmentsButton.tsx +128 -0
- package/src/actionbar/AttachmentsButtonWrapper.tsx +139 -0
- package/src/actionbar/ButtonWithBadge.tsx +39 -0
- package/src/actionbar/ChangeViewButton.tsx +136 -0
- package/src/actionbar/DashboardActionBar.tsx +67 -0
- package/src/actionbar/DropdownButton.tsx +61 -0
- package/src/actionbar/FormActionBar.tsx +412 -0
- package/src/actionbar/NewButton.tsx +46 -0
- package/src/actionbar/SearchBar.tsx +69 -0
- package/src/actionbar/TreeActionBar.tsx +265 -0
- package/src/common/ButtonWithTooltip.tsx +18 -0
- package/src/common/DatePicker.tsx +93 -0
- package/src/common/Field.tsx +92 -0
- package/src/context/ActionViewContext.tsx +161 -0
- package/src/context/ContentRootContext.tsx +422 -0
- package/src/context/DashboardActionContext.tsx +45 -0
- package/src/context/FormContext.tsx +79 -0
- package/src/context/FormModalContext.tsx +29 -0
- package/src/context/LocaleContext.tsx +50 -0
- package/src/context/One2manyContext.tsx +46 -0
- package/src/context/TabManagerContext.tsx +117 -0
- package/src/helpers/containerHelper.ts +145 -0
- package/src/helpers/dynamicColumnsHelper.ts +73 -0
- package/src/helpers/filesHelper.ts +41 -0
- package/src/helpers/formHelper.ts +225 -0
- package/src/helpers/iconMapper.ts +108 -0
- package/src/helpers/logInfoHelper.tsx +28 -0
- package/src/helpers/one2manyHelper.ts +139 -0
- package/src/helpers/searchFilterHelper.ts +167 -0
- package/src/helpers/timeHelper.ts +58 -0
- package/src/helpers/treeHelper.ts +127 -0
- package/src/hooks/useEffectDebugger.ts +43 -0
- package/src/hooks/useWindowDimensions.ts +33 -0
- package/src/index.ts +136 -0
- package/src/locales/ca_ES.tsx +85 -0
- package/src/locales/en_US.tsx +82 -0
- package/src/locales/es_ES.tsx +86 -0
- package/src/stories/Binary.stories.tsx +23 -0
- package/src/stories/Boolean.stories.tsx +22 -0
- package/src/stories/Button.stories.tsx +120 -0
- package/src/stories/Char.stories.tsx +49 -0
- package/src/stories/FiberGrid.stories.tsx +109 -0
- package/src/stories/Float.stories.tsx +22 -0
- package/src/stories/FloatTime.stories.tsx +32 -0
- package/src/stories/Image.stories.tsx +25 -0
- package/src/stories/Integer.stories.tsx +22 -0
- package/src/stories/Label.stories.tsx +22 -0
- package/src/stories/Many2one.stories.tsx +31 -0
- package/src/stories/One2many.stories.tsx +292 -0
- package/src/stories/ProgressBar.stories.tsx +22 -0
- package/src/stories/Reference.stories.tsx +43 -0
- package/src/stories/Selection.stories.tsx +34 -0
- package/src/stories/Separator.stories.tsx +21 -0
- package/src/stories/Text.stories.tsx +35 -0
- package/src/stories/containers/Group.stories.tsx +63 -0
- package/src/stories/containers/NewLine.stories.tsx +53 -0
- package/src/stories/containers/Notebook.stories.tsx +91 -0
- package/src/stories/custom/Indicator.stories.tsx +41 -0
- package/src/stories/dashboard/Dashboard.stories.tsx +23 -0
- package/src/stories/dashboard/DashboardGrid.stories.tsx +30 -0
- package/src/stories/forms/Attachment.stories.tsx +24 -0
- package/src/stories/forms/CUPSForm.stories.tsx +25 -0
- package/src/stories/forms/Company.stories.tsx +25 -0
- package/src/stories/forms/CrmCaseForm.stories.tsx +25 -0
- package/src/stories/forms/Documents.stories.tsx +25 -0
- package/src/stories/forms/FormWithGridFiber.stories.tsx +25 -0
- package/src/stories/forms/FormWithLinks.stories.tsx +31 -0
- package/src/stories/forms/Lead.stories.tsx +25 -0
- package/src/stories/forms/ModContractForm.stories.tsx +25 -0
- package/src/stories/forms/PartnersForm.stories.tsx +25 -0
- package/src/stories/forms/PolissaForm.stories.tsx +25 -0
- package/src/stories/forms/PreferencesForm.stories.tsx +693 -0
- package/src/stories/forms/Signatures.stories.tsx +25 -0
- package/src/stories/forms/Switching.stories.tsx +25 -0
- package/src/stories/graphs/GraphIndicator.stories.tsx +20 -0
- package/src/stories/graphs/PieGraph.stories.tsx +78 -0
- package/src/stories/mocks/index.ts +42 -0
- package/src/stories/mocks/mockProvider.ts +180 -0
- package/src/stories/mocks/models/attachment.ts +1327 -0
- package/src/stories/mocks/models/butlleti.ts +344 -0
- package/src/stories/mocks/models/company.ts +137 -0
- package/src/stories/mocks/models/crm_case.ts +598 -0
- package/src/stories/mocks/models/cups.ts +910 -0
- package/src/stories/mocks/models/document.ts +225 -0
- package/src/stories/mocks/models/factura.ts +2727 -0
- package/src/stories/mocks/models/form_with_gridfiber.ts +143 -0
- package/src/stories/mocks/models/hist_autoconsum.ts +148 -0
- package/src/stories/mocks/models/lead.ts +2109 -0
- package/src/stories/mocks/models/modcontractual.ts +806 -0
- package/src/stories/mocks/models/partner.ts +1360 -0
- package/src/stories/mocks/models/polissa.ts +3133 -0
- package/src/stories/mocks/models/signatura.ts +618 -0
- package/src/stories/mocks/models/switching.ts +769 -0
- package/src/stories/modals/FormModal.stories.tsx +36 -0
- package/src/stories/modals/SearchModal.stories.tsx +37 -0
- package/src/stories/trees/FacturesTree.stories.tsx +16 -0
- package/src/stories/ui/ActionBar.stories.tsx +23 -0
- package/src/stories/ui/FavouriteButton.stories.tsx +18 -0
- package/src/stories/ui/GoToResourceModal.stories.tsx +26 -0
- package/src/stories/views/ActionView.stories.tsx +28 -0
- package/src/stories/views/SearchTree.stories.tsx +946 -0
- package/src/stories/views/Tab.stories.tsx +94 -0
- package/src/stories/views/TabManager.stories.tsx +15 -0
- package/src/stories/views/TabsAndContent.stories.tsx +89 -0
- package/src/stories/views/Tree.stories.js +166 -0
- package/src/stories/views/searchFilter/DateRangePicker.stories.tsx +23 -0
- package/src/stories/views/searchFilter/DateTimeRangePicker.stories.tsx +23 -0
- package/src/stories/views/searchFilter/PairFields.stories.tsx +23 -0
- package/src/stories/views/searchFilter/SearchFilter.stories.tsx +166 -0
- package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +425 -0
- package/src/tailwind.css +8 -0
- package/src/tailwind.generated.css +168533 -0
- package/src/types/index.ts +275 -0
- package/src/ui/ActionErrorDialog.tsx +41 -0
- package/src/ui/ConfirmDialog.tsx +28 -0
- package/src/ui/FavouriteButton.tsx +261 -0
- package/src/ui/Fieldset.tsx +31 -0
- package/src/ui/FormErrorsDialog.tsx +17 -0
- package/src/ui/GenericErrorDialog.tsx +16 -0
- package/src/ui/GoToResourceModal.tsx +71 -0
- package/src/ui/InfoDialog.tsx +13 -0
- package/src/ui/RefreshItemDialog.tsx +29 -0
- package/src/ui/RemoveItemDialog.tsx +20 -0
- package/src/ui/TitleHeader.tsx +95 -0
- package/src/ui/UnlinkItemDialog.tsx +20 -0
- package/src/ui/UnsavedChangesDialog.tsx +29 -0
- package/src/ui/WarningDialog.tsx +17 -0
- package/src/views/ActionView.tsx +455 -0
- package/src/views/CurrentTabContent.tsx +21 -0
- package/src/views/RootView.tsx +467 -0
- package/src/views/TabContent.tsx +31 -0
- package/src/views/TabSelector.tsx +31 -0
- package/src/views/Welcome.tsx +18 -0
- package/src/views/tabs/Tab.tsx +77 -0
- package/src/widgets/WidgetFactory.tsx +109 -0
- package/src/widgets/base/Binary.tsx +141 -0
- package/src/widgets/base/Boolean.tsx +44 -0
- package/src/widgets/base/Button.tsx +77 -0
- package/src/widgets/base/Char.tsx +155 -0
- package/src/widgets/base/Date.tsx +12 -0
- package/src/widgets/base/DateTime.tsx +12 -0
- package/src/widgets/base/Email.tsx +27 -0
- package/src/widgets/base/Float.tsx +33 -0
- package/src/widgets/base/FloatTime.tsx +69 -0
- package/src/widgets/base/Image.tsx +120 -0
- package/src/widgets/base/Integer.tsx +38 -0
- package/src/widgets/base/Label.tsx +40 -0
- package/src/widgets/base/LinkInput.tsx +96 -0
- package/src/widgets/base/MultiSelection.tsx +82 -0
- package/src/widgets/base/ProgressBar.tsx +38 -0
- package/src/widgets/base/Reference.tsx +105 -0
- package/src/widgets/base/Selection.tsx +61 -0
- package/src/widgets/base/Separator.tsx +18 -0
- package/src/widgets/base/Text.tsx +156 -0
- package/src/widgets/base/Url.tsx +26 -0
- package/src/widgets/base/many2one/Many2one.tsx +331 -0
- package/src/widgets/base/many2one/Many2oneSuffix.tsx +210 -0
- package/src/widgets/base/many2one/Many2oneSuffixModal.tsx +41 -0
- package/src/widgets/base/one2many/One2many.tsx +102 -0
- package/src/widgets/base/one2many/One2manyInput.tsx +635 -0
- package/src/widgets/base/one2many/One2manyTopBar.tsx +143 -0
- package/src/widgets/containers/Container.tsx +97 -0
- package/src/widgets/containers/Group.tsx +34 -0
- package/src/widgets/containers/Notebook.tsx +35 -0
- package/src/widgets/custom/FiberGrid.tsx +51 -0
- package/src/widgets/custom/Indicator.tsx +66 -0
- package/src/widgets/custom/Timeline.tsx +190 -0
- package/src/widgets/modals/FormModal.tsx +127 -0
- package/src/widgets/modals/SearchModal.tsx +131 -0
- package/src/widgets/modals/TranslationModal.tsx +201 -0
- package/src/widgets/views/Dashboard/Dashboard.tsx +371 -0
- package/src/widgets/views/Dashboard/Dashboard.types.ts +8 -0
- package/src/widgets/views/Dashboard/DashboardForm.tsx +30 -0
- package/src/widgets/views/Dashboard/DashboardTree.tsx +287 -0
- package/src/widgets/views/Dashboard/dashboardHelper.ts +71 -0
- package/src/widgets/views/DashboardGrid/DashboardGrid.tsx +53 -0
- package/src/widgets/views/DashboardGrid/DashboardGrid.types.ts +4 -0
- package/src/widgets/views/DashboardGrid/DashboardGridItem.tsx +58 -0
- package/src/widgets/views/DashboardGrid/DashboardGridItem.types.ts +10 -0
- package/src/widgets/views/DashboardGrid/index.ts +4 -0
- package/src/widgets/views/Form.tsx +991 -0
- package/src/widgets/views/Graph/Graph.tsx +108 -0
- package/src/widgets/views/Graph/GraphChart.tsx +102 -0
- package/src/widgets/views/Graph/GraphDefaults.ts +57 -0
- package/src/widgets/views/Graph/GraphIndicator.tsx +360 -0
- package/src/widgets/views/Graph/useGraphData.tsx +142 -0
- package/src/widgets/views/SearchTree.tsx +542 -0
- package/src/widgets/views/Tree.tsx +267 -0
- package/src/widgets/views/searchFilter/DateRangePicker.tsx +16 -0
- package/src/widgets/views/searchFilter/DateTimeRangePicker.tsx +63 -0
- package/src/widgets/views/searchFilter/PairFields.tsx +56 -0
- package/src/widgets/views/searchFilter/SearchBottomBar.tsx +58 -0
- package/src/widgets/views/searchFilter/SearchField.tsx +73 -0
- package/src/widgets/views/searchFilter/SearchFilter.tsx +113 -0
- package/src/widgets/views/searchFilter/SearchParams.tsx +32 -0
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { Field as FieldOoui } from "@gisce/ooui";
|
|
2
|
+
|
|
3
|
+
type Strings = {
|
|
4
|
+
[key: string]: string;
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
type Column = {
|
|
8
|
+
title: string;
|
|
9
|
+
dataIndex: string;
|
|
10
|
+
key: string;
|
|
11
|
+
type?: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
type WidgetProps = {
|
|
15
|
+
ooui: FieldOoui;
|
|
16
|
+
layout?: "horizontal" | "vertical";
|
|
17
|
+
showLabel?: boolean;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
type SearchFields = {
|
|
21
|
+
primary: string[];
|
|
22
|
+
secondary: string[];
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type TreeView = {
|
|
26
|
+
view_id: number;
|
|
27
|
+
arch: string;
|
|
28
|
+
fields: any;
|
|
29
|
+
search_fields?: SearchFields;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
type FormView = TreeView & {
|
|
33
|
+
search_fields?: SearchFields;
|
|
34
|
+
toolbar?: any;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
type SearchResponse = {
|
|
38
|
+
totalItems: number;
|
|
39
|
+
results: any[];
|
|
40
|
+
attrsEvaluated?: any;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
type SearchRequest = {
|
|
44
|
+
params: Array<any>;
|
|
45
|
+
limit?: number;
|
|
46
|
+
offset?: number;
|
|
47
|
+
model: string;
|
|
48
|
+
fields?: any;
|
|
49
|
+
context?: any;
|
|
50
|
+
attrs?: any;
|
|
51
|
+
order?: number | string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
type SearchAllIdsRequest = SearchCountRequest & {
|
|
55
|
+
totalItems?: number;
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
type SearchCountRequest = {
|
|
59
|
+
params: Array<any>;
|
|
60
|
+
model: string;
|
|
61
|
+
context?: any;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
type CreateObjectRequest = {
|
|
65
|
+
model: string;
|
|
66
|
+
values: any;
|
|
67
|
+
fields: any;
|
|
68
|
+
context?: any;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
type UpdateObjectRequest = CreateObjectRequest & {
|
|
72
|
+
id: number;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
type Views = Map<string, any>;
|
|
76
|
+
|
|
77
|
+
type ViewData = {
|
|
78
|
+
views: Views;
|
|
79
|
+
limit: number;
|
|
80
|
+
model: string;
|
|
81
|
+
domain?: any;
|
|
82
|
+
context?: any;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
type ExecuteRequest = {
|
|
86
|
+
model: string;
|
|
87
|
+
action: string;
|
|
88
|
+
payload?: any;
|
|
89
|
+
context?: any;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
type NameSearchRequest = {
|
|
93
|
+
model: string;
|
|
94
|
+
limit?: number;
|
|
95
|
+
payload?: any;
|
|
96
|
+
context?: any;
|
|
97
|
+
attrs?: any;
|
|
98
|
+
operator?: string;
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
type ExecuteOnChangeRequest = {
|
|
102
|
+
model: string;
|
|
103
|
+
action: string;
|
|
104
|
+
payload?: any;
|
|
105
|
+
ids: number[];
|
|
106
|
+
fields: any;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
type ReadObjectsRequest = {
|
|
110
|
+
arch?: string;
|
|
111
|
+
fields?: any;
|
|
112
|
+
model: string;
|
|
113
|
+
ids: number[];
|
|
114
|
+
context?: any;
|
|
115
|
+
fieldsToRetrieve?: any;
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
type GetLogInfoRequest = {
|
|
119
|
+
model: string;
|
|
120
|
+
ids: number[];
|
|
121
|
+
context?: any;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
type ReadEvalUiObjectsRequest = {
|
|
125
|
+
arch?: string;
|
|
126
|
+
fields?: any;
|
|
127
|
+
model: string;
|
|
128
|
+
ids: number[];
|
|
129
|
+
context?: any;
|
|
130
|
+
attrs?: any;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
type ParseConditionRequest = {
|
|
134
|
+
condition: string;
|
|
135
|
+
values: any;
|
|
136
|
+
context?: any;
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
type DeleteObjectsRequest = {
|
|
140
|
+
model: string;
|
|
141
|
+
ids: number[];
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
type CreateReportRequest = {
|
|
145
|
+
name: string;
|
|
146
|
+
model: string;
|
|
147
|
+
ids: number[];
|
|
148
|
+
datas?: any;
|
|
149
|
+
context?: any;
|
|
150
|
+
};
|
|
151
|
+
|
|
152
|
+
type GenerateReportOptions = {
|
|
153
|
+
reportData: any;
|
|
154
|
+
fields: any;
|
|
155
|
+
values: any;
|
|
156
|
+
context?: any;
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
type GetReportRequest = {
|
|
160
|
+
id: number;
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
type GetViewRequest = {
|
|
164
|
+
model: string;
|
|
165
|
+
id?: number;
|
|
166
|
+
type: ViewType;
|
|
167
|
+
context?: any;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
type DefaultGetRequest = {
|
|
171
|
+
model: string;
|
|
172
|
+
fields?: any;
|
|
173
|
+
context?: any;
|
|
174
|
+
extraValues?: any; // For inv_fields many2one's and other fields.
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
type DuplicateRequest = {
|
|
178
|
+
id: number;
|
|
179
|
+
model: string;
|
|
180
|
+
context?: any;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
type EvalDomainRequest = {
|
|
184
|
+
domain: string;
|
|
185
|
+
values: any;
|
|
186
|
+
context?: any;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
type IsShortcutFavoriteOptions = {
|
|
190
|
+
action_id: number;
|
|
191
|
+
action_type: string;
|
|
192
|
+
res_id: number | boolean;
|
|
193
|
+
view_id: number;
|
|
194
|
+
context?: any;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
type ConnectionProviderType = {
|
|
198
|
+
getActionStringForModel: (model: string) => Promise<string>;
|
|
199
|
+
getViewsForAction: ({
|
|
200
|
+
action,
|
|
201
|
+
context,
|
|
202
|
+
}: {
|
|
203
|
+
action: string;
|
|
204
|
+
context?: any;
|
|
205
|
+
}) => Promise<ViewData>;
|
|
206
|
+
getView: (options: GetViewRequest) => Promise<FormView | TreeView>;
|
|
207
|
+
searchAllIds: (options: SearchAllIdsRequest) => Promise<number[]>;
|
|
208
|
+
searchCount: (options: SearchCountRequest) => Promise<number>;
|
|
209
|
+
search: (options: SearchRequest) => Promise<SearchResponse>;
|
|
210
|
+
searchForTree: (options: SearchRequest) => Promise<SearchResponse>;
|
|
211
|
+
update: (options: UpdateObjectRequest) => Promise<any>;
|
|
212
|
+
create: (options: CreateObjectRequest) => Promise<any>;
|
|
213
|
+
delete: (options: DeleteObjectsRequest) => Promise<any>;
|
|
214
|
+
execute: (options: ExecuteRequest) => Promise<any>;
|
|
215
|
+
readObjects: (options: ReadObjectsRequest) => Promise<any>;
|
|
216
|
+
readEvalUiObjects: (options: ReadEvalUiObjectsRequest) => Promise<any>;
|
|
217
|
+
parseCondition: (options: ParseConditionRequest) => Promise<any>;
|
|
218
|
+
executeWorkflow: (options: ExecuteRequest) => Promise<any>;
|
|
219
|
+
createReport: (options: CreateReportRequest) => Promise<any>;
|
|
220
|
+
getReport: (options: GetReportRequest) => Promise<any>;
|
|
221
|
+
executeOnChange: (options: ExecuteOnChangeRequest) => Promise<any>;
|
|
222
|
+
defaultGet: (options: DefaultGetRequest) => Promise<any>;
|
|
223
|
+
getActionData: ({
|
|
224
|
+
action,
|
|
225
|
+
context,
|
|
226
|
+
}: {
|
|
227
|
+
action: string;
|
|
228
|
+
context?: any;
|
|
229
|
+
}) => Promise<any>;
|
|
230
|
+
nameSearch: (options: NameSearchRequest) => Promise<any>;
|
|
231
|
+
duplicate: (options: DuplicateRequest) => Promise<any>;
|
|
232
|
+
evalDomain: (options: EvalDomainRequest) => Promise<any>;
|
|
233
|
+
getLogInfo: (options: GetLogInfoRequest) => Promise<any>;
|
|
234
|
+
isShortcutFavorite: (
|
|
235
|
+
options: IsShortcutFavoriteOptions
|
|
236
|
+
) => Promise<number | boolean>;
|
|
237
|
+
removeFavourite: ({ shortcut_id }: { shortcut_id: number }) => Promise<void>;
|
|
238
|
+
addFavourite: (options: IsShortcutFavoriteOptions) => Promise<void>;
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
type ViewType = "tree" | "form" | "dashboard" | "graph";
|
|
242
|
+
|
|
243
|
+
export type {
|
|
244
|
+
Strings,
|
|
245
|
+
SearchFields,
|
|
246
|
+
TreeView,
|
|
247
|
+
FormView,
|
|
248
|
+
Column,
|
|
249
|
+
WidgetProps,
|
|
250
|
+
SearchRequest,
|
|
251
|
+
SearchResponse,
|
|
252
|
+
ConnectionProviderType,
|
|
253
|
+
UpdateObjectRequest,
|
|
254
|
+
CreateObjectRequest,
|
|
255
|
+
ViewData,
|
|
256
|
+
Views,
|
|
257
|
+
ExecuteRequest,
|
|
258
|
+
ReadObjectsRequest,
|
|
259
|
+
DeleteObjectsRequest,
|
|
260
|
+
CreateReportRequest,
|
|
261
|
+
GetReportRequest,
|
|
262
|
+
ExecuteOnChangeRequest,
|
|
263
|
+
ViewType,
|
|
264
|
+
SearchAllIdsRequest,
|
|
265
|
+
SearchCountRequest,
|
|
266
|
+
GetViewRequest,
|
|
267
|
+
DefaultGetRequest,
|
|
268
|
+
GenerateReportOptions,
|
|
269
|
+
ReadEvalUiObjectsRequest,
|
|
270
|
+
NameSearchRequest,
|
|
271
|
+
DuplicateRequest,
|
|
272
|
+
GetLogInfoRequest,
|
|
273
|
+
IsShortcutFavoriteOptions,
|
|
274
|
+
ParseConditionRequest,
|
|
275
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Modal } from "antd";
|
|
3
|
+
import { ExclamationCircleOutlined, WarningOutlined } from "@ant-design/icons";
|
|
4
|
+
|
|
5
|
+
const { error, warning } = Modal;
|
|
6
|
+
|
|
7
|
+
const showDialog = (err: string) => {
|
|
8
|
+
let message;
|
|
9
|
+
let type;
|
|
10
|
+
let title;
|
|
11
|
+
|
|
12
|
+
if (
|
|
13
|
+
typeof err === "string" &&
|
|
14
|
+
err.indexOf(" -- ") !== -1 &&
|
|
15
|
+
err.indexOf("\n\n") !== -1
|
|
16
|
+
) {
|
|
17
|
+
const splitted = err.split("\n\n");
|
|
18
|
+
message = splitted[1];
|
|
19
|
+
const args = splitted[0].split(" -- ");
|
|
20
|
+
type = args[0];
|
|
21
|
+
title = args[1];
|
|
22
|
+
} else {
|
|
23
|
+
message = err;
|
|
24
|
+
type = "error";
|
|
25
|
+
title = "Error";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const icon =
|
|
29
|
+
type === "error" ? <ExclamationCircleOutlined /> : <WarningOutlined />;
|
|
30
|
+
|
|
31
|
+
const modalType = type === "error" ? error : warning;
|
|
32
|
+
|
|
33
|
+
modalType({
|
|
34
|
+
title,
|
|
35
|
+
icon,
|
|
36
|
+
centered: true,
|
|
37
|
+
content: message,
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export default showDialog;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Modal } from "antd";
|
|
3
|
+
import { ExclamationCircleOutlined } from "@ant-design/icons";
|
|
4
|
+
import { tForLang } from "@/context/LocaleContext";
|
|
5
|
+
|
|
6
|
+
const { confirm } = Modal;
|
|
7
|
+
|
|
8
|
+
const showDialog = ({
|
|
9
|
+
onOk,
|
|
10
|
+
confirmMessage,
|
|
11
|
+
lang
|
|
12
|
+
}: {
|
|
13
|
+
onOk: () => void;
|
|
14
|
+
confirmMessage: string;
|
|
15
|
+
lang: string;
|
|
16
|
+
}) => {
|
|
17
|
+
confirm({
|
|
18
|
+
title: tForLang("confirmation", lang),
|
|
19
|
+
icon: <ExclamationCircleOutlined />,
|
|
20
|
+
centered: true,
|
|
21
|
+
content: confirmMessage,
|
|
22
|
+
okText: tForLang("ok", lang),
|
|
23
|
+
cancelText: tForLang("cancel", lang),
|
|
24
|
+
onOk,
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default showDialog;
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
import React, { useContext, useEffect, useState } from "react";
|
|
2
|
+
import {
|
|
3
|
+
StarOutlined,
|
|
4
|
+
StarFilled,
|
|
5
|
+
DownOutlined,
|
|
6
|
+
TableOutlined,
|
|
7
|
+
FormOutlined,
|
|
8
|
+
EditOutlined,
|
|
9
|
+
} from "@ant-design/icons";
|
|
10
|
+
import { Button, Col, Row, Spin, Tooltip } from "antd";
|
|
11
|
+
import { Menu, Dropdown } from "antd";
|
|
12
|
+
import showErrorDialog from "@/ui/ActionErrorDialog";
|
|
13
|
+
import {
|
|
14
|
+
TabManagerContext,
|
|
15
|
+
TabManagerContextType,
|
|
16
|
+
} from "@/context/TabManagerContext";
|
|
17
|
+
import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
|
|
18
|
+
import { ViewType } from "@/types";
|
|
19
|
+
|
|
20
|
+
export type ShortcutApi = {
|
|
21
|
+
action_id: number;
|
|
22
|
+
action_type: string;
|
|
23
|
+
id?: number;
|
|
24
|
+
name: string;
|
|
25
|
+
res_id: number | boolean;
|
|
26
|
+
res_model: string;
|
|
27
|
+
view_id: number;
|
|
28
|
+
view_type: string;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export type FavouriteOptions = {
|
|
32
|
+
action_id: number;
|
|
33
|
+
action_type: string;
|
|
34
|
+
res_id: number | boolean;
|
|
35
|
+
view_id: number;
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
type Props = {
|
|
39
|
+
onRetrieveShortcuts: () => Promise<ShortcutApi[]>;
|
|
40
|
+
onCheckIsFavourite: (options: FavouriteOptions) => Promise<number | boolean>;
|
|
41
|
+
onAddFavourite: (options: FavouriteOptions) => Promise<number>;
|
|
42
|
+
onRemoveFavourite: (shortcut_id: number) => Promise<void>;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const FavouriteButton = (props: Props) => {
|
|
46
|
+
const {
|
|
47
|
+
onRetrieveShortcuts,
|
|
48
|
+
onCheckIsFavourite,
|
|
49
|
+
onAddFavourite,
|
|
50
|
+
onRemoveFavourite,
|
|
51
|
+
} = props;
|
|
52
|
+
|
|
53
|
+
const [isFavourite, setIsFavourite] = useState(false);
|
|
54
|
+
const [dropdownVisible, setDropdownVisible] = useState(false);
|
|
55
|
+
const [shortcuts, setShortcuts] = useState<ShortcutApi[]>([]);
|
|
56
|
+
const [loading, setLoading] = useState(true);
|
|
57
|
+
const [currentShortcutId, setCurrentShortcutId] = useState<number>();
|
|
58
|
+
const { t } = useContext(LocaleContext) as LocaleContextType;
|
|
59
|
+
|
|
60
|
+
const tabManagerContext = useContext(
|
|
61
|
+
TabManagerContext
|
|
62
|
+
) as TabManagerContextType;
|
|
63
|
+
const {
|
|
64
|
+
openShortcut,
|
|
65
|
+
tabs,
|
|
66
|
+
activeKey,
|
|
67
|
+
currentView,
|
|
68
|
+
currentId,
|
|
69
|
+
openDefaultActionForModel,
|
|
70
|
+
} = tabManagerContext || {};
|
|
71
|
+
|
|
72
|
+
useEffect(() => {
|
|
73
|
+
getShortcuts();
|
|
74
|
+
}, []);
|
|
75
|
+
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
checkFavourite();
|
|
78
|
+
}, [tabs, activeKey, currentView, currentId]);
|
|
79
|
+
|
|
80
|
+
async function getShortcuts() {
|
|
81
|
+
try {
|
|
82
|
+
setLoading(true);
|
|
83
|
+
const shortcuts = await onRetrieveShortcuts();
|
|
84
|
+
setShortcuts(shortcuts);
|
|
85
|
+
} catch (e) {
|
|
86
|
+
showErrorDialog(e);
|
|
87
|
+
} finally {
|
|
88
|
+
setLoading(false);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function handleMenuClick(event: any) {
|
|
93
|
+
const { key } = event;
|
|
94
|
+
const shortcut = shortcuts.find((s) => s.id === Number(key));
|
|
95
|
+
if (shortcut?.action_type === "ir.actions.wizard") {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (shortcut) {
|
|
99
|
+
openShortcut(shortcut);
|
|
100
|
+
}
|
|
101
|
+
setDropdownVisible(false);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function handleVisibleChange(flag: boolean) {
|
|
105
|
+
if (flag) {
|
|
106
|
+
getShortcuts();
|
|
107
|
+
}
|
|
108
|
+
setDropdownVisible(flag);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
async function checkFavourite() {
|
|
112
|
+
if (!currentView) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const currentTab = tabs.find((t) => t.key === activeKey);
|
|
117
|
+
const { id: action_id, type: action_type } = currentTab?.action || {};
|
|
118
|
+
|
|
119
|
+
if (!action_id || !action_type) {
|
|
120
|
+
setIsFavourite(false);
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const view_id = currentView.id;
|
|
125
|
+
let res_id: boolean | number = false;
|
|
126
|
+
|
|
127
|
+
if (currentView.type === "form") {
|
|
128
|
+
res_id = currentId ? (currentId as number) : false;
|
|
129
|
+
}
|
|
130
|
+
const result = await onCheckIsFavourite({
|
|
131
|
+
action_id,
|
|
132
|
+
action_type,
|
|
133
|
+
view_id,
|
|
134
|
+
res_id,
|
|
135
|
+
});
|
|
136
|
+
|
|
137
|
+
if (result !== false) {
|
|
138
|
+
setCurrentShortcutId(result as number);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
setIsFavourite(result !== false);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
async function editFavourites() {
|
|
145
|
+
setDropdownVisible(false);
|
|
146
|
+
openDefaultActionForModel?.({ model: "ir.ui.view_sc" });
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const menu = (
|
|
150
|
+
<Menu onClick={handleMenuClick}>
|
|
151
|
+
<div style={{ width: 300, padding: 5, display: "flex" }}>
|
|
152
|
+
<div style={{ paddingLeft: 15, color: "#ccc" }}>
|
|
153
|
+
{t("favorites").toUpperCase()}
|
|
154
|
+
</div>
|
|
155
|
+
<div style={{ flexGrow: 1, paddingLeft: 10 }}>
|
|
156
|
+
<Tooltip title={t("edit_favorites")}>
|
|
157
|
+
<EditOutlined
|
|
158
|
+
style={{ color: "#1890FF", cursor: "pointer" }}
|
|
159
|
+
onClick={editFavourites}
|
|
160
|
+
/>
|
|
161
|
+
</Tooltip>
|
|
162
|
+
</div>
|
|
163
|
+
</div>
|
|
164
|
+
<Menu.Divider />
|
|
165
|
+
{loading ? (
|
|
166
|
+
<Spin style={{ padding: "1rem" }} />
|
|
167
|
+
) : shortcuts.length > 0 ? (
|
|
168
|
+
<>
|
|
169
|
+
{shortcuts.map((shortcut) => (
|
|
170
|
+
<Menu.Item key={shortcut.id}>
|
|
171
|
+
<FavouriteItem
|
|
172
|
+
title={shortcut.name}
|
|
173
|
+
type={shortcut.view_type as ViewType}
|
|
174
|
+
/>
|
|
175
|
+
</Menu.Item>
|
|
176
|
+
))}
|
|
177
|
+
</>
|
|
178
|
+
) : (
|
|
179
|
+
<div style={{ width: 300, padding: 5, paddingLeft: 15 }}>
|
|
180
|
+
{t("no_favorites")}
|
|
181
|
+
</div>
|
|
182
|
+
)}
|
|
183
|
+
</Menu>
|
|
184
|
+
);
|
|
185
|
+
|
|
186
|
+
function FavouriteItem({ title, type }: { title: string; type: ViewType }) {
|
|
187
|
+
const icon = type === "tree" ? <TableOutlined /> : <FormOutlined />;
|
|
188
|
+
return (
|
|
189
|
+
<Row wrap={false}>
|
|
190
|
+
<Col flex="none" style={{ paddingRight: 20 }}>
|
|
191
|
+
{icon}
|
|
192
|
+
</Col>
|
|
193
|
+
<Col flex="auto">{title}</Col>
|
|
194
|
+
</Row>
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
async function toggleFavourite() {
|
|
199
|
+
if (isFavourite && currentShortcutId) {
|
|
200
|
+
await onRemoveFavourite(currentShortcutId);
|
|
201
|
+
} else {
|
|
202
|
+
if (!currentView) {
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const currentTab = tabs.find((t) => t.key === activeKey);
|
|
207
|
+
const { id: action_id, type: action_type } = currentTab?.action || {};
|
|
208
|
+
const view_id = currentView.id;
|
|
209
|
+
let res_id: boolean | number = false;
|
|
210
|
+
|
|
211
|
+
if (!action_id || !action_type) {
|
|
212
|
+
setIsFavourite(false);
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
if (currentView.type === "form") {
|
|
217
|
+
res_id = currentId ? (currentId as number) : false;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
await onAddFavourite({
|
|
221
|
+
action_id,
|
|
222
|
+
action_type,
|
|
223
|
+
view_id,
|
|
224
|
+
res_id,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
await getShortcuts();
|
|
229
|
+
setIsFavourite(!isFavourite);
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
return (
|
|
233
|
+
<>
|
|
234
|
+
<Button
|
|
235
|
+
type={isFavourite ? "primary" : "default"}
|
|
236
|
+
icon={
|
|
237
|
+
isFavourite ? (
|
|
238
|
+
<StarFilled style={{ color: "white" }} />
|
|
239
|
+
) : (
|
|
240
|
+
<StarOutlined />
|
|
241
|
+
)
|
|
242
|
+
}
|
|
243
|
+
style={{ width: 50 }}
|
|
244
|
+
onClick={toggleFavourite}
|
|
245
|
+
></Button>
|
|
246
|
+
<Dropdown
|
|
247
|
+
overlay={menu}
|
|
248
|
+
onVisibleChange={handleVisibleChange}
|
|
249
|
+
visible={dropdownVisible}
|
|
250
|
+
>
|
|
251
|
+
<Button
|
|
252
|
+
style={{ width: 25 }}
|
|
253
|
+
icon={<DownOutlined style={{ fontSize: "0.5em" }} />}
|
|
254
|
+
onClick={(e) => e.preventDefault()}
|
|
255
|
+
></Button>
|
|
256
|
+
</Dropdown>
|
|
257
|
+
</>
|
|
258
|
+
);
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export default FavouriteButton;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
|
|
3
|
+
type Props = {
|
|
4
|
+
label: string;
|
|
5
|
+
children: any;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
const Fieldset = (props: Props): React.ReactElement => {
|
|
9
|
+
const { label, children } = props;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
// TODO: change in-line styles to TailWind classes
|
|
13
|
+
<fieldset className="p-2 border-gray-400 border border-solid font-sans">
|
|
14
|
+
<legend
|
|
15
|
+
style={{
|
|
16
|
+
all: "initial",
|
|
17
|
+
marginLeft: "1em",
|
|
18
|
+
paddingLeft: "0.5em",
|
|
19
|
+
paddingRight: "0.5em",
|
|
20
|
+
fontFamily:
|
|
21
|
+
"system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji'",
|
|
22
|
+
}}
|
|
23
|
+
>
|
|
24
|
+
{label}
|
|
25
|
+
</legend>
|
|
26
|
+
{children}
|
|
27
|
+
</fieldset>
|
|
28
|
+
);
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export default Fieldset;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Modal } from "antd";
|
|
3
|
+
import { ExclamationCircleOutlined } from "@ant-design/icons";
|
|
4
|
+
import { tForLang } from "@/context/LocaleContext";
|
|
5
|
+
|
|
6
|
+
const { error } = Modal;
|
|
7
|
+
|
|
8
|
+
const showDialog = (lang: string) => {
|
|
9
|
+
error({
|
|
10
|
+
title: tForLang("formHasErrors", lang),
|
|
11
|
+
icon: <ExclamationCircleOutlined />,
|
|
12
|
+
centered: true,
|
|
13
|
+
content: tForLang("fillRequiredFields", lang),
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
export default showDialog;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Modal } from "antd";
|
|
3
|
+
import { ExclamationCircleOutlined } from "@ant-design/icons";
|
|
4
|
+
|
|
5
|
+
const { error } = Modal;
|
|
6
|
+
|
|
7
|
+
const showDialog = (message: string) => {
|
|
8
|
+
error({
|
|
9
|
+
title: "Error",
|
|
10
|
+
icon: <ExclamationCircleOutlined />,
|
|
11
|
+
centered: true,
|
|
12
|
+
content: message,
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default showDialog;
|