@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,143 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import ButtonWithTooltip from "@/common/ButtonWithTooltip";
|
|
3
|
+
import { ViewModes } from "@/widgets/base/one2many/One2many";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
FileAddOutlined,
|
|
7
|
+
DeleteOutlined,
|
|
8
|
+
LeftOutlined,
|
|
9
|
+
RightOutlined,
|
|
10
|
+
AlignLeftOutlined,
|
|
11
|
+
SearchOutlined,
|
|
12
|
+
ApiOutlined,
|
|
13
|
+
} from "@ant-design/icons";
|
|
14
|
+
|
|
15
|
+
type One2manyTopBarProps = {
|
|
16
|
+
title: string;
|
|
17
|
+
mode: ViewModes;
|
|
18
|
+
isMany2Many: boolean;
|
|
19
|
+
readOnly: boolean;
|
|
20
|
+
formHasChanges: boolean;
|
|
21
|
+
onToggleViewMode: () => void;
|
|
22
|
+
onCreateItem: () => void;
|
|
23
|
+
onDelete: () => void;
|
|
24
|
+
totalItems: number;
|
|
25
|
+
currentItemIndex: number;
|
|
26
|
+
onPreviousItem: () => void;
|
|
27
|
+
onNextItem: () => void;
|
|
28
|
+
onSearchItem: () => void;
|
|
29
|
+
selectedRowKeys: string[];
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export const One2manyTopBar = (props: One2manyTopBarProps) => {
|
|
33
|
+
const {
|
|
34
|
+
title: titleString,
|
|
35
|
+
readOnly,
|
|
36
|
+
onCreateItem,
|
|
37
|
+
onToggleViewMode,
|
|
38
|
+
mode,
|
|
39
|
+
onDelete,
|
|
40
|
+
totalItems,
|
|
41
|
+
currentItemIndex,
|
|
42
|
+
onPreviousItem,
|
|
43
|
+
onNextItem,
|
|
44
|
+
isMany2Many,
|
|
45
|
+
onSearchItem,
|
|
46
|
+
selectedRowKeys,
|
|
47
|
+
} = props;
|
|
48
|
+
|
|
49
|
+
function separator() {
|
|
50
|
+
return <div className="inline-block w-3" />;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function title() {
|
|
54
|
+
return (
|
|
55
|
+
<div className="h-8 flex flex-grow bg-gray-700 text-gray-200">
|
|
56
|
+
<div className="h-full flex flex-col justify-center items-center">
|
|
57
|
+
<span className="pl-2 font-bold">{titleString}</span>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function deleteButton() {
|
|
64
|
+
return (
|
|
65
|
+
<ButtonWithTooltip
|
|
66
|
+
tooltip={isMany2Many ? "Unlink" : "Delete"}
|
|
67
|
+
icon={isMany2Many ? <ApiOutlined /> : <DeleteOutlined />}
|
|
68
|
+
onClick={onDelete}
|
|
69
|
+
disabled={
|
|
70
|
+
totalItems === 0 ||
|
|
71
|
+
readOnly ||
|
|
72
|
+
(mode !== "form" && selectedRowKeys.length === 0)
|
|
73
|
+
}
|
|
74
|
+
/>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function index() {
|
|
79
|
+
let itemToShow = "_";
|
|
80
|
+
if (totalItems === 0) {
|
|
81
|
+
itemToShow = "_";
|
|
82
|
+
} else {
|
|
83
|
+
itemToShow = (currentItemIndex + 1).toString();
|
|
84
|
+
}
|
|
85
|
+
return (
|
|
86
|
+
<span className="pl-1 pr-1">
|
|
87
|
+
({itemToShow}/{totalItems})
|
|
88
|
+
</span>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function itemBrowser() {
|
|
93
|
+
return (
|
|
94
|
+
<>
|
|
95
|
+
{separator()}
|
|
96
|
+
<ButtonWithTooltip
|
|
97
|
+
tooltip={"Previous item"}
|
|
98
|
+
icon={<LeftOutlined />}
|
|
99
|
+
onClick={onPreviousItem}
|
|
100
|
+
/>
|
|
101
|
+
{index()}
|
|
102
|
+
<ButtonWithTooltip
|
|
103
|
+
tooltip={"Next item"}
|
|
104
|
+
icon={<RightOutlined />}
|
|
105
|
+
onClick={onNextItem}
|
|
106
|
+
/>
|
|
107
|
+
</>
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return (
|
|
112
|
+
<div className="flex mb-2">
|
|
113
|
+
{title()}
|
|
114
|
+
<div className="h-8 flex-none pl-2">
|
|
115
|
+
{mode !== "graph" && (
|
|
116
|
+
<ButtonWithTooltip
|
|
117
|
+
tooltip={"Create new item"}
|
|
118
|
+
icon={<FileAddOutlined />}
|
|
119
|
+
disabled={readOnly}
|
|
120
|
+
onClick={onCreateItem}
|
|
121
|
+
/>
|
|
122
|
+
)}
|
|
123
|
+
{isMany2Many && (
|
|
124
|
+
<ButtonWithTooltip
|
|
125
|
+
tooltip={"Search existing item"}
|
|
126
|
+
icon={<SearchOutlined />}
|
|
127
|
+
disabled={readOnly}
|
|
128
|
+
onClick={onSearchItem}
|
|
129
|
+
/>
|
|
130
|
+
)}
|
|
131
|
+
{mode !== "graph" && separator()}
|
|
132
|
+
{mode !== "graph" && deleteButton()}
|
|
133
|
+
{mode === "form" && itemBrowser()}
|
|
134
|
+
{separator()}
|
|
135
|
+
<ButtonWithTooltip
|
|
136
|
+
tooltip={"Toggle view mode"}
|
|
137
|
+
icon={<AlignLeftOutlined />}
|
|
138
|
+
onClick={onToggleViewMode}
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
141
|
+
</div>
|
|
142
|
+
);
|
|
143
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Container as ContainerOoui, Widget, Label } from "@gisce/ooui";
|
|
3
|
+
import { createReactWidget } from "@/widgets/WidgetFactory";
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
getTemplateColumns,
|
|
7
|
+
fillRowWithEmptiesToFit,
|
|
8
|
+
getSpanStyleForItem,
|
|
9
|
+
expandWidgetsIfNeeded,
|
|
10
|
+
getMaxColspanForRows,
|
|
11
|
+
getSingleRowTemplateColumns,
|
|
12
|
+
} from "@/helpers/containerHelper";
|
|
13
|
+
|
|
14
|
+
type Props = {
|
|
15
|
+
container: ContainerOoui;
|
|
16
|
+
responsiveBehaviour: boolean;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const Container = (props: Props): React.ReactElement => {
|
|
20
|
+
const { container, responsiveBehaviour } = props;
|
|
21
|
+
const { rows } = container;
|
|
22
|
+
let { columns } = container;
|
|
23
|
+
|
|
24
|
+
// We check for the largest colspan for each row
|
|
25
|
+
// And if the value is smaller than the columns value
|
|
26
|
+
// We adjust the columns value
|
|
27
|
+
const maxColspanForRows = getMaxColspanForRows(rows);
|
|
28
|
+
if (maxColspanForRows < columns) {
|
|
29
|
+
columns = maxColspanForRows;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
let fieldInRows = false;
|
|
33
|
+
let firstRow: Widget[] = [];
|
|
34
|
+
|
|
35
|
+
const content = rows.map((row: Widget[], i) => {
|
|
36
|
+
const rowWithoutInvisibleFields = row.filter((widget) => {
|
|
37
|
+
return !widget.invisible;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const rowWithExpandedItems = expandWidgetsIfNeeded({
|
|
41
|
+
row: rowWithoutInvisibleFields,
|
|
42
|
+
numberOfColumns: columns,
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const rowWithEmptiesToFit = fillRowWithEmptiesToFit({
|
|
46
|
+
row: rowWithExpandedItems,
|
|
47
|
+
numberOfColumns: columns,
|
|
48
|
+
mustFillWithEmpties: responsiveBehaviour,
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
if (i === 0) {
|
|
52
|
+
firstRow = firstRow.concat(rowWithEmptiesToFit);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return rowWithEmptiesToFit.map((item: Widget, j: number) => {
|
|
56
|
+
// We check if we have any label+field inside the container.
|
|
57
|
+
// In this scenario, we must format the grid accordingly
|
|
58
|
+
// Otherwise, the grid will divide uniformly
|
|
59
|
+
if (item instanceof Label && (item as Label).fieldForLabel) {
|
|
60
|
+
fieldInRows = true;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const itemRowIndex = row.indexOf(item);
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<div
|
|
67
|
+
key={`${i.toString()}-${itemRowIndex.toString()}`}
|
|
68
|
+
style={{
|
|
69
|
+
...getSpanStyleForItem({ item, responsiveBehaviour }),
|
|
70
|
+
minWidth: 0,
|
|
71
|
+
}}
|
|
72
|
+
>
|
|
73
|
+
{createReactWidget({
|
|
74
|
+
ooui: item,
|
|
75
|
+
responsiveBehaviour,
|
|
76
|
+
})}
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
const templateColumns =
|
|
83
|
+
rows.length === 1
|
|
84
|
+
? getSingleRowTemplateColumns(firstRow, columns)
|
|
85
|
+
: getTemplateColumns(columns, fieldInRows);
|
|
86
|
+
const gridStyle = {
|
|
87
|
+
display: "grid",
|
|
88
|
+
gridTemplateColumns: responsiveBehaviour ? "auto" : templateColumns,
|
|
89
|
+
gap: "1rem",
|
|
90
|
+
minHeight: 0,
|
|
91
|
+
minWidth: 0,
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
return <div style={gridStyle}>{content}</div>;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
export default Container;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Group as GroupOoui } from "@gisce/ooui";
|
|
3
|
+
import Container from "./Container";
|
|
4
|
+
import Fieldset from "@/ui/Fieldset";
|
|
5
|
+
|
|
6
|
+
type Props = {
|
|
7
|
+
ooui: GroupOoui;
|
|
8
|
+
showLabel?: boolean;
|
|
9
|
+
responsiveBehaviour: boolean;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
function Group(props: Props): React.ReactElement {
|
|
13
|
+
const { ooui, showLabel = true, responsiveBehaviour } = props;
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<>
|
|
17
|
+
{ooui.label && showLabel ? (
|
|
18
|
+
<Fieldset label={ooui.label}>
|
|
19
|
+
<Container
|
|
20
|
+
container={ooui!.container}
|
|
21
|
+
responsiveBehaviour={responsiveBehaviour}
|
|
22
|
+
/>
|
|
23
|
+
</Fieldset>
|
|
24
|
+
) : (
|
|
25
|
+
<Container
|
|
26
|
+
container={ooui!.container}
|
|
27
|
+
responsiveBehaviour={responsiveBehaviour}
|
|
28
|
+
/>
|
|
29
|
+
)}
|
|
30
|
+
</>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default Group;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Tabs } from "antd";
|
|
3
|
+
const { TabPane } = Tabs;
|
|
4
|
+
|
|
5
|
+
import { Notebook as NotebookOoui, Group as GroupOoui } from "@gisce/ooui";
|
|
6
|
+
import { Group } from "@/index";
|
|
7
|
+
|
|
8
|
+
type Props = {
|
|
9
|
+
ooui: NotebookOoui;
|
|
10
|
+
responsiveBehaviour: boolean;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function Notebook(props: Props): React.ReactElement {
|
|
14
|
+
const { ooui, responsiveBehaviour } = props;
|
|
15
|
+
const tabs = [].concat.apply([], ooui!.container.rows);
|
|
16
|
+
return (
|
|
17
|
+
<Tabs defaultActiveKey="1">
|
|
18
|
+
{tabs
|
|
19
|
+
.filter((page: any) => !page.invisible)
|
|
20
|
+
.map((page: any) => {
|
|
21
|
+
return (
|
|
22
|
+
<TabPane tab={page.label} key={page.label}>
|
|
23
|
+
<Group
|
|
24
|
+
ooui={page as GroupOoui}
|
|
25
|
+
showLabel={false}
|
|
26
|
+
responsiveBehaviour={responsiveBehaviour}
|
|
27
|
+
/>
|
|
28
|
+
</TabPane>
|
|
29
|
+
);
|
|
30
|
+
})}
|
|
31
|
+
</Tabs>
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default Notebook;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Field from "@/common/Field";
|
|
3
|
+
import { Char as CharOoui } from "@gisce/ooui";
|
|
4
|
+
import { WidgetProps } from "@/types";
|
|
5
|
+
import Config from "@/Config";
|
|
6
|
+
import { GridUi } from "fiber-diagram";
|
|
7
|
+
|
|
8
|
+
export const FiberGrid = (props: WidgetProps) => {
|
|
9
|
+
const { ooui } = props;
|
|
10
|
+
const { id, readOnly, required } = ooui as CharOoui;
|
|
11
|
+
// const requiredClass =
|
|
12
|
+
// required && !readOnly ? Config.requiredClass : undefined;
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<Field required={required} {...props}>
|
|
16
|
+
<FiberGridInput />
|
|
17
|
+
</Field>
|
|
18
|
+
);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
interface FiberGridInputProps {
|
|
22
|
+
value?: string;
|
|
23
|
+
onChange?: (value: string) => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export const FiberGridInput = (props: FiberGridInputProps) => {
|
|
27
|
+
const { value, onChange } = props;
|
|
28
|
+
|
|
29
|
+
if (!value) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Validate string json
|
|
34
|
+
try {
|
|
35
|
+
JSON.parse(value);
|
|
36
|
+
} catch (e) {
|
|
37
|
+
console.log(e);
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<GridUi
|
|
43
|
+
inputJson={value}
|
|
44
|
+
onChange={(newValue) => {
|
|
45
|
+
if (onChange) {
|
|
46
|
+
onChange(newValue);
|
|
47
|
+
}
|
|
48
|
+
}}
|
|
49
|
+
/>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Tooltip } from "antd";
|
|
3
|
+
import { Statistic, Card } from "antd";
|
|
4
|
+
import { Indicator as IndicatorOoui } from "@gisce/ooui";
|
|
5
|
+
import { WidgetProps } from "@/types";
|
|
6
|
+
import Field from "@/common/Field";
|
|
7
|
+
import {QuestionCircleOutlined} from "@ant-design/icons";
|
|
8
|
+
import iconMapper from "@/helpers/iconMapper";
|
|
9
|
+
|
|
10
|
+
type IndicatorProps = WidgetProps & {
|
|
11
|
+
ooui: IndicatorOoui
|
|
12
|
+
value?: number;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const Indicator = (props: IndicatorProps) => {
|
|
16
|
+
const { ooui } = props;
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<Field ooui={ooui}>
|
|
20
|
+
<IndicatorInput ooui={ooui} />
|
|
21
|
+
</Field>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
type IndicatorInputProps = {
|
|
26
|
+
ooui: IndicatorOoui;
|
|
27
|
+
value?: any;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const IndicatorInput = (props: IndicatorInputProps) => {
|
|
31
|
+
const { ooui, value } = props;
|
|
32
|
+
const title = (
|
|
33
|
+
<>
|
|
34
|
+
<span>{ooui.label} </span>
|
|
35
|
+
{ooui.tooltip &&
|
|
36
|
+
<Tooltip title={ooui.tooltip}>
|
|
37
|
+
<QuestionCircleOutlined className="text-xs text-blue-400 pr-1"/>
|
|
38
|
+
</Tooltip>
|
|
39
|
+
}
|
|
40
|
+
</>
|
|
41
|
+
);
|
|
42
|
+
const Icon: React.ElementType = iconMapper(ooui.icon);
|
|
43
|
+
let formattedValue = value;
|
|
44
|
+
if (ooui.selectionValues.size) {
|
|
45
|
+
formattedValue = ooui.selectionValues.get(value);
|
|
46
|
+
} else if (Array.isArray(value)) {
|
|
47
|
+
formattedValue = value[1];
|
|
48
|
+
}
|
|
49
|
+
const field = (
|
|
50
|
+
<Statistic
|
|
51
|
+
title={title}
|
|
52
|
+
prefix={Icon && <Icon/>}
|
|
53
|
+
suffix={ooui.suffix}
|
|
54
|
+
value={formattedValue}
|
|
55
|
+
/>
|
|
56
|
+
)
|
|
57
|
+
if (ooui.card) {
|
|
58
|
+
return (
|
|
59
|
+
<Card>
|
|
60
|
+
{field}
|
|
61
|
+
</Card>
|
|
62
|
+
);
|
|
63
|
+
} else {
|
|
64
|
+
return field;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import React, { useContext, useState } from "react";
|
|
2
|
+
import { Timeline as TimelineOoui } from "@gisce/ooui";
|
|
3
|
+
import Field from "@/common/Field";
|
|
4
|
+
import { One2manyItem, One2manyValue } from "../base/one2many/One2manyInput";
|
|
5
|
+
import useDeepCompareEffect from "use-deep-compare-effect";
|
|
6
|
+
import { Views, ViewType } from "@/types";
|
|
7
|
+
import { FormContext, FormContextType } from "@/context/FormContext";
|
|
8
|
+
import ConnectionProvider from "@/ConnectionProvider";
|
|
9
|
+
import { Spin, Alert, Timeline as AntTimeline } from "antd";
|
|
10
|
+
import { readObjectValues } from "@/helpers/one2manyHelper";
|
|
11
|
+
import { FormModal } from "../modals/FormModal";
|
|
12
|
+
|
|
13
|
+
type TimelineProps = {
|
|
14
|
+
ooui: TimelineOoui;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
type TimelineInputProps = TimelineProps & {
|
|
18
|
+
value?: One2manyValue;
|
|
19
|
+
onChange?: (value: One2manyValue) => void;
|
|
20
|
+
views: Views;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export const Timeline = (props: TimelineProps) => {
|
|
24
|
+
const { ooui } = props;
|
|
25
|
+
const { relation, context, views: oouiViews } = ooui;
|
|
26
|
+
const [isLoading, setIsLoading] = useState<boolean>(true);
|
|
27
|
+
const [error, setError] = useState<string>();
|
|
28
|
+
const [views, setViews] = useState<Views>(new Map<string, any>());
|
|
29
|
+
const formContext = useContext(FormContext) as FormContextType;
|
|
30
|
+
const { getContext } = formContext || {};
|
|
31
|
+
|
|
32
|
+
useDeepCompareEffect(() => {
|
|
33
|
+
fetchData();
|
|
34
|
+
}, [ooui]);
|
|
35
|
+
|
|
36
|
+
const getViewData = async (type: ViewType) => {
|
|
37
|
+
if (oouiViews && oouiViews[type]) {
|
|
38
|
+
return oouiViews[type];
|
|
39
|
+
}
|
|
40
|
+
return await ConnectionProvider.getHandler().getView({
|
|
41
|
+
model: relation,
|
|
42
|
+
type,
|
|
43
|
+
context: { ...getContext?.(), ...context },
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const fetchData = async () => {
|
|
48
|
+
setIsLoading(true);
|
|
49
|
+
setError(undefined);
|
|
50
|
+
|
|
51
|
+
try {
|
|
52
|
+
const formView = await getViewData("form");
|
|
53
|
+
const treeView = await getViewData("tree");
|
|
54
|
+
views.set("form", formView);
|
|
55
|
+
views.set("tree", treeView);
|
|
56
|
+
setViews(views);
|
|
57
|
+
} catch (err) {
|
|
58
|
+
setError(err as any);
|
|
59
|
+
} finally {
|
|
60
|
+
setIsLoading(false);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
if (isLoading) {
|
|
65
|
+
return <Spin />;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
if (error) {
|
|
69
|
+
return <Alert className="mt-10" message={error} type="error" banner />;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return (
|
|
73
|
+
<Field type={"array"} {...props}>
|
|
74
|
+
<TimelineInput ooui={ooui} views={views} />
|
|
75
|
+
</Field>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
export const TimelineInput = (props: TimelineInputProps) => {
|
|
80
|
+
const { value, views, ooui, onChange } = props;
|
|
81
|
+
const { items = [] } = value || {};
|
|
82
|
+
|
|
83
|
+
const [isLoading, setIsLoading] = useState<boolean>(false);
|
|
84
|
+
const [error, setError] = useState<string>();
|
|
85
|
+
const [showFormModal, setShowFormModal] = useState<boolean>(false);
|
|
86
|
+
const [modalItem, setModalItem] = useState<One2manyItem>();
|
|
87
|
+
const { relation, context, readOnly, summaryField, titleField } = ooui;
|
|
88
|
+
const itemsToShow = items.filter((item) => item.values);
|
|
89
|
+
|
|
90
|
+
const formContext = useContext(FormContext) as FormContextType;
|
|
91
|
+
const { getContext } = formContext || {};
|
|
92
|
+
|
|
93
|
+
useDeepCompareEffect(() => {
|
|
94
|
+
fetchData();
|
|
95
|
+
}, [items]);
|
|
96
|
+
|
|
97
|
+
const triggerChange = (changedValue: Array<One2manyItem>) => {
|
|
98
|
+
onChange?.({
|
|
99
|
+
items: changedValue,
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
async function fetchData() {
|
|
104
|
+
setIsLoading(true);
|
|
105
|
+
setError(undefined);
|
|
106
|
+
|
|
107
|
+
try {
|
|
108
|
+
const itemsWithValues = await readObjectValues({
|
|
109
|
+
treeFields: views.get("tree").fields,
|
|
110
|
+
formFields: views.get("form").fields,
|
|
111
|
+
model: relation,
|
|
112
|
+
items,
|
|
113
|
+
context: { ...getContext?.(), ...context },
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
triggerChange(itemsWithValues);
|
|
117
|
+
} catch (err) {
|
|
118
|
+
setError(err as any);
|
|
119
|
+
} finally {
|
|
120
|
+
setIsLoading(false);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
if (error) {
|
|
125
|
+
return <Alert className="mt-10" message={error} type="error" banner />;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
if (isLoading) {
|
|
129
|
+
return <Spin />;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<>
|
|
134
|
+
<AntTimeline style={{ padding: "1rem" }}>
|
|
135
|
+
{itemsToShow.map((item, index) => {
|
|
136
|
+
return (
|
|
137
|
+
<div key={index}>
|
|
138
|
+
<AntTimeline.Item key={index}>
|
|
139
|
+
<div
|
|
140
|
+
style={{ display: "inline-block", cursor: "pointer" }}
|
|
141
|
+
onClick={() => {
|
|
142
|
+
setModalItem(
|
|
143
|
+
itemsToShow.find(
|
|
144
|
+
(searchItem) => item.id === searchItem.id
|
|
145
|
+
)
|
|
146
|
+
);
|
|
147
|
+
setShowFormModal(true);
|
|
148
|
+
}}
|
|
149
|
+
>
|
|
150
|
+
<strong>{item.values?.[titleField]}</strong>
|
|
151
|
+
</div>
|
|
152
|
+
<br />
|
|
153
|
+
<div
|
|
154
|
+
style={{ display: "inline-block", cursor: "pointer" }}
|
|
155
|
+
onClick={() => {
|
|
156
|
+
setModalItem(
|
|
157
|
+
itemsToShow.find(
|
|
158
|
+
(searchItem) => item.id === searchItem.id
|
|
159
|
+
)
|
|
160
|
+
);
|
|
161
|
+
setShowFormModal(true);
|
|
162
|
+
}}
|
|
163
|
+
>
|
|
164
|
+
{item.values?.[summaryField]}
|
|
165
|
+
</div>
|
|
166
|
+
</AntTimeline.Item>
|
|
167
|
+
</div>
|
|
168
|
+
);
|
|
169
|
+
})}
|
|
170
|
+
</AntTimeline>
|
|
171
|
+
<FormModal
|
|
172
|
+
formView={views.get("form")}
|
|
173
|
+
model={relation}
|
|
174
|
+
id={modalItem?.id}
|
|
175
|
+
values={modalItem?.values}
|
|
176
|
+
defaultValues={modalItem?.defaultValues}
|
|
177
|
+
visible={showFormModal}
|
|
178
|
+
onSubmitSucceed={() => {
|
|
179
|
+
setShowFormModal(false);
|
|
180
|
+
}}
|
|
181
|
+
parentContext={{ ...getContext?.(), ...context }}
|
|
182
|
+
onCancel={() => {
|
|
183
|
+
setShowFormModal(false);
|
|
184
|
+
}}
|
|
185
|
+
readOnly={readOnly}
|
|
186
|
+
postSaveAction={fetchData}
|
|
187
|
+
/>
|
|
188
|
+
</>
|
|
189
|
+
);
|
|
190
|
+
};
|