@gisce/react-ooui 2.0.0-alpha.4 → 2.0.0-alpha.41

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.
Files changed (398) hide show
  1. package/dist/ConnectionProvider.d.ts +7 -0
  2. package/dist/ConnectionProvider.d.ts.map +1 -0
  3. package/dist/actionbar/ActionButton.d.ts +12 -0
  4. package/dist/actionbar/ActionButton.d.ts.map +1 -0
  5. package/dist/actionbar/AttachmentsButton.d.ts +11 -0
  6. package/dist/actionbar/AttachmentsButton.d.ts.map +1 -0
  7. package/dist/actionbar/AttachmentsButtonWrapper.d.ts +18 -0
  8. package/dist/actionbar/AttachmentsButtonWrapper.d.ts.map +1 -0
  9. package/dist/actionbar/ButtonWithBadge.d.ts +7 -0
  10. package/dist/actionbar/ButtonWithBadge.d.ts.map +1 -0
  11. package/dist/actionbar/ChangeViewButton.d.ts +12 -0
  12. package/dist/actionbar/ChangeViewButton.d.ts.map +1 -0
  13. package/dist/actionbar/DashboardActionBar.d.ts +3 -0
  14. package/dist/actionbar/DashboardActionBar.d.ts.map +1 -0
  15. package/dist/actionbar/DropdownButton.d.ts +12 -0
  16. package/dist/actionbar/DropdownButton.d.ts.map +1 -0
  17. package/dist/actionbar/FormActionBar.d.ts +5 -0
  18. package/dist/actionbar/FormActionBar.d.ts.map +1 -0
  19. package/dist/actionbar/GraphActionBar.d.ts +5 -0
  20. package/dist/actionbar/GraphActionBar.d.ts.map +1 -0
  21. package/dist/actionbar/NewButton.d.ts +6 -0
  22. package/dist/actionbar/NewButton.d.ts.map +1 -0
  23. package/dist/actionbar/SearchBar.d.ts +8 -0
  24. package/dist/actionbar/SearchBar.d.ts.map +1 -0
  25. package/dist/actionbar/TreeActionBar.d.ts +8 -0
  26. package/dist/actionbar/TreeActionBar.d.ts.map +1 -0
  27. package/dist/common/ButtonWithTooltip.d.ts +7 -0
  28. package/dist/common/ButtonWithTooltip.d.ts.map +1 -0
  29. package/dist/common/DatePicker.d.ts +19 -0
  30. package/dist/common/DatePicker.d.ts.map +1 -0
  31. package/dist/common/Field.d.ts +14 -0
  32. package/dist/common/Field.d.ts.map +1 -0
  33. package/dist/common/SelectAllRecordsRow.d.ts +9 -0
  34. package/dist/common/SelectAllRecordsRow.d.ts.map +1 -0
  35. package/dist/context/ActionViewContext.d.ts +65 -0
  36. package/dist/context/ActionViewContext.d.ts.map +1 -0
  37. package/dist/context/ConfigContext.d.ts +15 -0
  38. package/dist/context/ConfigContext.d.ts.map +1 -0
  39. package/dist/context/ContentRootContext.d.ts +19 -0
  40. package/dist/context/ContentRootContext.d.ts.map +1 -0
  41. package/dist/context/DashboardActionContext.d.ts +19 -0
  42. package/dist/context/DashboardActionContext.d.ts.map +1 -0
  43. package/dist/context/FormContext.d.ts +35 -0
  44. package/dist/context/FormContext.d.ts.map +1 -0
  45. package/dist/context/FormModalContext.d.ts +11 -0
  46. package/dist/context/FormModalContext.d.ts.map +1 -0
  47. package/dist/context/LocaleContext.d.ts +14 -0
  48. package/dist/context/LocaleContext.d.ts.map +1 -0
  49. package/dist/context/One2manyContext.d.ts +17 -0
  50. package/dist/context/One2manyContext.d.ts.map +1 -0
  51. package/dist/context/TabManagerContext.d.ts +50 -0
  52. package/dist/context/TabManagerContext.d.ts.map +1 -0
  53. package/dist/helpers/containerHelper.d.ts +22 -0
  54. package/dist/helpers/containerHelper.d.ts.map +1 -0
  55. package/dist/helpers/dynamicColumnsHelper.d.ts +16 -0
  56. package/dist/helpers/dynamicColumnsHelper.d.ts.map +1 -0
  57. package/dist/helpers/errorHelper.d.ts +6 -0
  58. package/dist/helpers/errorHelper.d.ts.map +1 -0
  59. package/dist/helpers/filesHelper.d.ts +8 -0
  60. package/dist/helpers/filesHelper.d.ts.map +1 -0
  61. package/dist/helpers/formHelper.d.ts +36 -0
  62. package/dist/helpers/formHelper.d.ts.map +1 -0
  63. package/dist/helpers/iconMapper.d.ts +13 -0
  64. package/dist/helpers/iconMapper.d.ts.map +1 -0
  65. package/dist/helpers/logInfoHelper.d.ts +3 -0
  66. package/dist/helpers/logInfoHelper.d.ts.map +1 -0
  67. package/dist/helpers/one2manyHelper.d.ts +37 -0
  68. package/dist/helpers/one2manyHelper.d.ts.map +1 -0
  69. package/dist/helpers/searchHelper.d.ts +6 -0
  70. package/dist/helpers/searchHelper.d.ts.map +1 -0
  71. package/dist/helpers/timeHelper.d.ts +4 -0
  72. package/dist/helpers/timeHelper.d.ts.map +1 -0
  73. package/dist/helpers/treeHelper.d.ts +23 -0
  74. package/dist/helpers/treeHelper.d.ts.map +1 -0
  75. package/dist/helpers/viewHelper.d.ts +10 -0
  76. package/dist/helpers/viewHelper.d.ts.map +1 -0
  77. package/dist/hooks/useEffectDebugger.d.ts +3 -0
  78. package/dist/hooks/useEffectDebugger.d.ts.map +1 -0
  79. package/dist/hooks/useExport.d.ts +44 -0
  80. package/dist/hooks/useExport.d.ts.map +1 -0
  81. package/dist/hooks/useFetchViews.d.ts +1 -0
  82. package/dist/hooks/useFetchViews.d.ts.map +1 -0
  83. package/dist/hooks/useSearch.d.ts +56 -0
  84. package/dist/hooks/useSearch.d.ts.map +1 -0
  85. package/dist/hooks/useWindowDimensions.d.ts +7 -0
  86. package/dist/hooks/useWindowDimensions.d.ts.map +1 -0
  87. package/dist/index.d.ts +59 -0
  88. package/dist/index.d.ts.map +1 -0
  89. package/dist/locales/ca_ES.d.ts +94 -0
  90. package/dist/locales/ca_ES.d.ts.map +1 -0
  91. package/dist/locales/en_US.d.ts +94 -0
  92. package/dist/locales/en_US.d.ts.map +1 -0
  93. package/dist/locales/es_ES.d.ts +94 -0
  94. package/dist/locales/es_ES.d.ts.map +1 -0
  95. package/dist/react-ooui.es.js +9882 -0
  96. package/dist/react-ooui.es.js.map +1 -0
  97. package/dist/style.css +1 -0
  98. package/dist/types/index.d.ts +258 -0
  99. package/dist/types/index.d.ts.map +1 -0
  100. package/dist/ui/ActionErrorDialog.d.ts +3 -0
  101. package/dist/ui/ActionErrorDialog.d.ts.map +1 -0
  102. package/dist/ui/ConfirmDialog.d.ts +7 -0
  103. package/dist/ui/ConfirmDialog.d.ts.map +1 -0
  104. package/dist/ui/ErrorAlert.d.ts +5 -0
  105. package/dist/ui/ErrorAlert.d.ts.map +1 -0
  106. package/dist/ui/FavouriteButton.d.ts +25 -0
  107. package/dist/ui/FavouriteButton.d.ts.map +1 -0
  108. package/dist/ui/FormErrorsDialog.d.ts +3 -0
  109. package/dist/ui/FormErrorsDialog.d.ts.map +1 -0
  110. package/dist/ui/GenericErrorDialog.d.ts +3 -0
  111. package/dist/ui/GenericErrorDialog.d.ts.map +1 -0
  112. package/dist/ui/GoToResourceModal.d.ts +9 -0
  113. package/dist/ui/GoToResourceModal.d.ts.map +1 -0
  114. package/dist/ui/InfoDialog.d.ts +3 -0
  115. package/dist/ui/InfoDialog.d.ts.map +1 -0
  116. package/dist/ui/RefreshItemDialog.d.ts +7 -0
  117. package/dist/ui/RefreshItemDialog.d.ts.map +1 -0
  118. package/dist/ui/RemoveItemDialog.d.ts +6 -0
  119. package/dist/ui/RemoveItemDialog.d.ts.map +1 -0
  120. package/dist/ui/TitleHeader.d.ts +7 -0
  121. package/dist/ui/TitleHeader.d.ts.map +1 -0
  122. package/dist/ui/UnlinkItemDialog.d.ts +6 -0
  123. package/dist/ui/UnlinkItemDialog.d.ts.map +1 -0
  124. package/dist/ui/UnsavedChangesDialog.d.ts +7 -0
  125. package/dist/ui/UnsavedChangesDialog.d.ts.map +1 -0
  126. package/dist/ui/WarningDialog.d.ts +3 -0
  127. package/dist/ui/WarningDialog.d.ts.map +1 -0
  128. package/dist/views/ActionView.d.ts +22 -0
  129. package/dist/views/ActionView.d.ts.map +1 -0
  130. package/dist/views/CurrentTabContent.d.ts +3 -0
  131. package/dist/views/CurrentTabContent.d.ts.map +1 -0
  132. package/dist/views/RootView.d.ts +14 -0
  133. package/dist/views/RootView.d.ts.map +1 -0
  134. package/dist/views/TabContent.d.ts +8 -0
  135. package/dist/views/TabContent.d.ts.map +1 -0
  136. package/dist/views/TabSelector.d.ts +3 -0
  137. package/dist/views/TabSelector.d.ts.map +1 -0
  138. package/dist/views/Welcome.d.ts +4 -0
  139. package/dist/views/Welcome.d.ts.map +1 -0
  140. package/dist/views/actionViews/DashboardActionView.d.ts +6 -0
  141. package/dist/views/actionViews/DashboardActionView.d.ts.map +1 -0
  142. package/dist/views/actionViews/FormActionView.d.ts +17 -0
  143. package/dist/views/actionViews/FormActionView.d.ts.map +1 -0
  144. package/dist/views/actionViews/GraphActionView.d.ts +12 -0
  145. package/dist/views/actionViews/GraphActionView.d.ts.map +1 -0
  146. package/dist/views/actionViews/TreeActionView.d.ts +19 -0
  147. package/dist/views/actionViews/TreeActionView.d.ts.map +1 -0
  148. package/dist/views/tabs/Tab.d.ts +10 -0
  149. package/dist/views/tabs/Tab.d.ts.map +1 -0
  150. package/dist/widgets/WidgetFactory.d.ts +4 -0
  151. package/dist/widgets/WidgetFactory.d.ts.map +1 -0
  152. package/dist/widgets/base/Binary.d.ts +13 -0
  153. package/dist/widgets/base/Binary.d.ts.map +1 -0
  154. package/dist/widgets/base/Boolean.d.ts +3 -0
  155. package/dist/widgets/base/Boolean.d.ts.map +1 -0
  156. package/dist/widgets/base/Button.d.ts +7 -0
  157. package/dist/widgets/base/Button.d.ts.map +1 -0
  158. package/dist/widgets/base/Char.d.ts +7 -0
  159. package/dist/widgets/base/Char.d.ts.map +1 -0
  160. package/dist/widgets/base/Date.d.ts +4 -0
  161. package/dist/widgets/base/Date.d.ts.map +1 -0
  162. package/dist/widgets/base/DateTime.d.ts +4 -0
  163. package/dist/widgets/base/DateTime.d.ts.map +1 -0
  164. package/dist/widgets/base/Email.d.ts +3 -0
  165. package/dist/widgets/base/Email.d.ts.map +1 -0
  166. package/dist/widgets/base/Float.d.ts +3 -0
  167. package/dist/widgets/base/Float.d.ts.map +1 -0
  168. package/dist/widgets/base/FloatTime.d.ts +12 -0
  169. package/dist/widgets/base/FloatTime.d.ts.map +1 -0
  170. package/dist/widgets/base/Image.d.ts +13 -0
  171. package/dist/widgets/base/Image.d.ts.map +1 -0
  172. package/dist/widgets/base/Integer.d.ts +7 -0
  173. package/dist/widgets/base/Integer.d.ts.map +1 -0
  174. package/dist/widgets/base/Label.d.ts +8 -0
  175. package/dist/widgets/base/Label.d.ts.map +1 -0
  176. package/dist/widgets/base/LinkInput.d.ts +11 -0
  177. package/dist/widgets/base/LinkInput.d.ts.map +1 -0
  178. package/dist/widgets/base/MultiSelection.d.ts +9 -0
  179. package/dist/widgets/base/MultiSelection.d.ts.map +1 -0
  180. package/dist/widgets/base/ProgressBar.d.ts +6 -0
  181. package/dist/widgets/base/ProgressBar.d.ts.map +1 -0
  182. package/dist/widgets/base/Reference.d.ts +16 -0
  183. package/dist/widgets/base/Reference.d.ts.map +1 -0
  184. package/dist/widgets/base/ReferenceTree.d.ts +8 -0
  185. package/dist/widgets/base/ReferenceTree.d.ts.map +1 -0
  186. package/dist/widgets/base/Selection.d.ts +9 -0
  187. package/dist/widgets/base/Selection.d.ts.map +1 -0
  188. package/dist/widgets/base/Separator.d.ts +7 -0
  189. package/dist/widgets/base/Separator.d.ts.map +1 -0
  190. package/dist/widgets/base/Text.d.ts +7 -0
  191. package/dist/widgets/base/Text.d.ts.map +1 -0
  192. package/dist/widgets/base/Time.d.ts +11 -0
  193. package/dist/widgets/base/Time.d.ts.map +1 -0
  194. package/dist/widgets/base/Url.d.ts +3 -0
  195. package/dist/widgets/base/Url.d.ts.map +1 -0
  196. package/dist/widgets/base/many2one/Many2one.d.ts +16 -0
  197. package/dist/widgets/base/many2one/Many2one.d.ts.map +1 -0
  198. package/dist/widgets/base/many2one/Many2oneSuffix.d.ts +8 -0
  199. package/dist/widgets/base/many2one/Many2oneSuffix.d.ts.map +1 -0
  200. package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts +9 -0
  201. package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts.map +1 -0
  202. package/dist/widgets/base/many2one/Many2oneTree.d.ts +6 -0
  203. package/dist/widgets/base/many2one/Many2oneTree.d.ts.map +1 -0
  204. package/dist/widgets/base/one2many/One2many.d.ts +7 -0
  205. package/dist/widgets/base/one2many/One2many.d.ts.map +1 -0
  206. package/dist/widgets/base/one2many/One2manyInput.d.ts +23 -0
  207. package/dist/widgets/base/one2many/One2manyInput.d.ts.map +1 -0
  208. package/dist/widgets/base/one2many/One2manyTopBar.d.ts +22 -0
  209. package/dist/widgets/base/one2many/One2manyTopBar.d.ts.map +1 -0
  210. package/dist/widgets/containers/Container.d.ts +9 -0
  211. package/dist/widgets/containers/Container.d.ts.map +1 -0
  212. package/dist/widgets/containers/Group.d.ts +10 -0
  213. package/dist/widgets/containers/Group.d.ts.map +1 -0
  214. package/dist/widgets/containers/Notebook.d.ts +9 -0
  215. package/dist/widgets/containers/Notebook.d.ts.map +1 -0
  216. package/dist/widgets/custom/Avatar.d.ts +10 -0
  217. package/dist/widgets/custom/Avatar.d.ts.map +1 -0
  218. package/dist/widgets/custom/ButtonGroup.d.ts +7 -0
  219. package/dist/widgets/custom/ButtonGroup.d.ts.map +1 -0
  220. package/dist/widgets/custom/CodeEditor.d.ts +8 -0
  221. package/dist/widgets/custom/CodeEditor.d.ts.map +1 -0
  222. package/dist/widgets/custom/Comments.d.ts +34 -0
  223. package/dist/widgets/custom/Comments.d.ts.map +1 -0
  224. package/dist/widgets/custom/FiberGrid.d.ts +9 -0
  225. package/dist/widgets/custom/FiberGrid.d.ts.map +1 -0
  226. package/dist/widgets/custom/Indicator.d.ts +9 -0
  227. package/dist/widgets/custom/Indicator.d.ts.map +1 -0
  228. package/dist/widgets/custom/Markdown.d.ts +4 -0
  229. package/dist/widgets/custom/Markdown.d.ts.map +1 -0
  230. package/dist/widgets/custom/MultiCheckbox.d.ts +13 -0
  231. package/dist/widgets/custom/MultiCheckbox.d.ts.map +1 -0
  232. package/dist/widgets/custom/Radio.d.ts +9 -0
  233. package/dist/widgets/custom/Radio.d.ts.map +1 -0
  234. package/dist/widgets/custom/Steps.d.ts +12 -0
  235. package/dist/widgets/custom/Steps.d.ts.map +1 -0
  236. package/dist/widgets/custom/Switch.d.ts +3 -0
  237. package/dist/widgets/custom/Switch.d.ts.map +1 -0
  238. package/dist/widgets/custom/Tag.d.ts +6 -0
  239. package/dist/widgets/custom/Tag.d.ts.map +1 -0
  240. package/dist/widgets/custom/Tags.d.ts +14 -0
  241. package/dist/widgets/custom/Tags.d.ts.map +1 -0
  242. package/dist/widgets/custom/Timeline.d.ts +15 -0
  243. package/dist/widgets/custom/Timeline.d.ts.map +1 -0
  244. package/dist/widgets/modals/ExportModal.d.ts +14 -0
  245. package/dist/widgets/modals/ExportModal.d.ts.map +1 -0
  246. package/dist/widgets/modals/FormModal.d.ts +11 -0
  247. package/dist/widgets/modals/FormModal.d.ts.map +1 -0
  248. package/dist/widgets/modals/SearchModal.d.ts +12 -0
  249. package/dist/widgets/modals/SearchModal.d.ts.map +1 -0
  250. package/dist/widgets/modals/TranslationModal.d.ts +11 -0
  251. package/dist/widgets/modals/TranslationModal.d.ts.map +1 -0
  252. package/dist/widgets/views/Dashboard/Dashboard.d.ts +5 -0
  253. package/dist/widgets/views/Dashboard/Dashboard.d.ts.map +1 -0
  254. package/dist/widgets/views/Dashboard/DashboardForm.d.ts +3 -0
  255. package/dist/widgets/views/Dashboard/DashboardForm.d.ts.map +1 -0
  256. package/dist/widgets/views/Dashboard/DashboardTree.d.ts +18 -0
  257. package/dist/widgets/views/Dashboard/DashboardTree.d.ts.map +1 -0
  258. package/dist/widgets/views/Dashboard/dashboardHelper.d.ts +6 -0
  259. package/dist/widgets/views/Dashboard/dashboardHelper.d.ts.map +1 -0
  260. package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts +3 -0
  261. package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts.map +1 -0
  262. package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts +6 -0
  263. package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts.map +1 -0
  264. package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts +3 -0
  265. package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts.map +1 -0
  266. package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts +11 -0
  267. package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts.map +1 -0
  268. package/dist/widgets/views/DashboardGrid/index.d.ts +5 -0
  269. package/dist/widgets/views/DashboardGrid/index.d.ts.map +1 -0
  270. package/dist/widgets/views/Form.d.ts +29 -0
  271. package/dist/widgets/views/Form.d.ts.map +1 -0
  272. package/dist/widgets/views/Graph/Graph.d.ts +11 -0
  273. package/dist/widgets/views/Graph/Graph.d.ts.map +1 -0
  274. package/dist/widgets/views/Graph/GraphChart.d.ts +10 -0
  275. package/dist/widgets/views/Graph/GraphChart.d.ts.map +1 -0
  276. package/dist/widgets/views/Graph/GraphDefaults.d.ts +83 -0
  277. package/dist/widgets/views/Graph/GraphDefaults.d.ts.map +1 -0
  278. package/dist/widgets/views/Graph/GraphIndicator.d.ts +16 -0
  279. package/dist/widgets/views/Graph/GraphIndicator.d.ts.map +1 -0
  280. package/dist/widgets/views/Graph/useGraphData.d.ts +20 -0
  281. package/dist/widgets/views/Graph/useGraphData.d.ts.map +1 -0
  282. package/dist/widgets/views/SearchTree.d.ts +24 -0
  283. package/dist/widgets/views/SearchTree.d.ts.map +1 -0
  284. package/dist/widgets/views/Tree.d.ts +32 -0
  285. package/dist/widgets/views/Tree.d.ts.map +1 -0
  286. package/dist/widgets/views/searchFilter/DateRangePicker.d.ts +3 -0
  287. package/dist/widgets/views/searchFilter/DateRangePicker.d.ts.map +1 -0
  288. package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts +3 -0
  289. package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts.map +1 -0
  290. package/dist/widgets/views/searchFilter/PairFields.d.ts +4 -0
  291. package/dist/widgets/views/searchFilter/PairFields.d.ts.map +1 -0
  292. package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts +10 -0
  293. package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts.map +1 -0
  294. package/dist/widgets/views/searchFilter/SearchField.d.ts +7 -0
  295. package/dist/widgets/views/searchFilter/SearchField.d.ts.map +1 -0
  296. package/dist/widgets/views/searchFilter/SearchFilter.d.ts +19 -0
  297. package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +1 -0
  298. package/dist/widgets/views/searchFilter/SearchParams.d.ts +7 -0
  299. package/dist/widgets/views/searchFilter/SearchParams.d.ts.map +1 -0
  300. package/package.json +38 -14
  301. package/src/ConnectionProvider.ts +1 -1
  302. package/src/__tests__/iconMapper.test.ts +4 -4
  303. package/src/actionbar/AttachmentsButton.tsx +25 -23
  304. package/src/actionbar/AttachmentsButtonWrapper.tsx +2 -2
  305. package/src/actionbar/ButtonWithBadge.tsx +4 -2
  306. package/src/actionbar/ChangeViewButton.tsx +1 -1
  307. package/src/actionbar/DashboardActionBar.tsx +2 -6
  308. package/src/actionbar/DropdownButton.tsx +44 -3
  309. package/src/actionbar/FormActionBar.tsx +4 -3
  310. package/src/actionbar/NewButton.tsx +1 -1
  311. package/src/actionbar/TreeActionBar.tsx +86 -79
  312. package/src/context/ActionViewContext.tsx +8 -4
  313. package/src/context/ConfigContext.tsx +22 -3
  314. package/src/context/DashboardActionContext.tsx +2 -3
  315. package/src/context/FormModalContext.tsx +2 -3
  316. package/src/context/LocaleContext.tsx +1 -1
  317. package/src/context/One2manyContext.tsx +3 -4
  318. package/src/helpers/containerHelper.ts +1 -1
  319. package/src/helpers/dynamicColumnsHelper.ts +2 -2
  320. package/src/helpers/iconMapper.ts +5 -5
  321. package/src/helpers/logInfoHelper.tsx +8 -6
  322. package/src/helpers/timeHelper.ts +2 -2
  323. package/src/hooks/useEffectDebugger.ts +2 -2
  324. package/src/hooks/useExport.ts +9 -8
  325. package/src/hooks/useWindowDimensions.ts +1 -1
  326. package/src/locales/ca_ES.tsx +1 -0
  327. package/src/locales/en_US.tsx +1 -0
  328. package/src/locales/es_ES.tsx +2 -0
  329. package/src/stories/Time.stories.tsx +2 -3
  330. package/src/stories/Utils.stories.tsx +1 -3
  331. package/src/stories/containers/Group.stories.tsx +2 -3
  332. package/src/stories/containers/Notebook.stories.tsx +0 -6
  333. package/src/stories/custom/Avatar.stories.tsx +2 -6
  334. package/src/stories/custom/Comments.stories.tsx +32 -25
  335. package/src/stories/forms/FormWithLinks.stories.tsx +1 -2
  336. package/src/stories/forms/ModContractForm.stories.tsx +1 -0
  337. package/src/stories/forms/PreferencesForm.stories.tsx +1 -2
  338. package/src/stories/mocks/mockProvider.ts +5 -2
  339. package/src/stories/mocks/models/attachment.ts +1 -2
  340. package/src/stories/mocks/models/butlleti.ts +249 -297
  341. package/src/stories/mocks/models/company.ts +2 -4
  342. package/src/stories/mocks/models/cups.ts +18 -1
  343. package/src/stories/mocks/models/document.ts +2 -4
  344. package/src/stories/mocks/models/factura.ts +14 -28
  345. package/src/stories/mocks/models/form_with_gridfiber.ts +2 -4
  346. package/src/stories/mocks/models/hist_autoconsum.ts +2 -4
  347. package/src/stories/mocks/models/lead.ts +8 -16
  348. package/src/stories/mocks/models/modcontractual.ts +229 -83
  349. package/src/stories/mocks/models/partner.ts +20 -40
  350. package/src/stories/mocks/models/polissa.ts +6 -12
  351. package/src/stories/mocks/models/res_partner_category.ts +3 -3
  352. package/src/stories/mocks/models/signatura.ts +135 -195
  353. package/src/stories/mocks/models/switching.ts +2 -4
  354. package/src/stories/ui/GoToResourceModal.stories.tsx +3 -2
  355. package/src/stories/views/Tree.stories.jsx +3 -5
  356. package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +15 -30
  357. package/src/types/index.ts +2 -1
  358. package/src/ui/ConfirmDialog.tsx +1 -1
  359. package/src/ui/GoToResourceModal.tsx +8 -7
  360. package/src/views/ActionView.tsx +37 -30
  361. package/src/views/CurrentTabContent.tsx +1 -1
  362. package/src/views/TabContent.tsx +1 -1
  363. package/src/views/TabSelector.tsx +1 -1
  364. package/src/views/actionViews/DashboardActionView.tsx +1 -1
  365. package/src/views/actionViews/GraphActionView.tsx +1 -1
  366. package/src/views/actionViews/TreeActionView.tsx +2 -2
  367. package/src/widgets/WidgetFactory.tsx +1 -1
  368. package/src/widgets/base/Button.tsx +1 -1
  369. package/src/widgets/base/Float.tsx +0 -1
  370. package/src/widgets/base/FloatTime.tsx +1 -1
  371. package/src/widgets/base/Integer.tsx +0 -1
  372. package/src/widgets/base/Reference.tsx +1 -1
  373. package/src/widgets/base/ReferenceTree.tsx +1 -1
  374. package/src/widgets/base/Separator.tsx +3 -4
  375. package/src/widgets/base/many2one/Many2oneSuffixModal.tsx +2 -2
  376. package/src/widgets/base/one2many/One2many.tsx +2 -2
  377. package/src/widgets/base/one2many/One2manyInput.tsx +1 -1
  378. package/src/widgets/custom/Avatar.tsx +15 -7
  379. package/src/widgets/custom/Markdown.tsx +18 -8
  380. package/src/widgets/custom/MultiCheckbox.tsx +1 -1
  381. package/src/widgets/custom/Radio.tsx +2 -4
  382. package/src/widgets/custom/Steps.tsx +10 -9
  383. package/src/widgets/custom/Switch.tsx +1 -5
  384. package/src/widgets/custom/Tags.tsx +1 -1
  385. package/src/widgets/modals/SearchModal.tsx +31 -29
  386. package/src/widgets/modals/TranslationModal.tsx +3 -3
  387. package/src/widgets/views/Dashboard/Dashboard.tsx +3 -3
  388. package/src/widgets/views/DashboardGrid/DashboardGrid.tsx +3 -3
  389. package/src/widgets/views/Form.tsx +2 -2
  390. package/src/widgets/views/Graph/Graph.tsx +1 -1
  391. package/src/widgets/views/Graph/GraphChart.tsx +1 -1
  392. package/src/widgets/views/Graph/GraphDefaults.ts +2 -2
  393. package/src/widgets/views/Graph/useGraphData.tsx +1 -1
  394. package/src/widgets/views/SearchTree.tsx +2 -2
  395. package/src/widgets/views/searchFilter/SearchBottomBar.tsx +2 -6
  396. package/src/widgets/views/searchFilter/SearchField.tsx +5 -1
  397. package/src/widgets/views/searchFilter/SearchFilter.tsx +1 -1
  398. package/src/widgets/views/searchFilter/SearchParams.tsx +7 -4
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchBottomBar.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchBottomBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAY1C,KAAK,KAAK,GAAG;IACX,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,sBAAsB,EAAE,MAAM,IAAI,CAAC;IACnC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AAEF,wBAAgB,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAkChE"}
@@ -0,0 +1,7 @@
1
+ import { Field } from "@gisce/ooui";
2
+ type Props = {
3
+ field: Field;
4
+ };
5
+ export declare function SearchField(props: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
7
+ //# sourceMappingURL=SearchField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchField.tsx"],"names":[],"mappings":"AAUA,OAAO,EACL,KAAK,EAGN,MAAM,aAAa,CAAC;AAGrB,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,2CAyCvC"}
@@ -0,0 +1,19 @@
1
+ import { SearchFields } from '../../../*/types';
2
+ type Props = {
3
+ fields: any;
4
+ searchFields: SearchFields;
5
+ onClear: () => void;
6
+ onSubmit: (values: any) => void;
7
+ isSearching: boolean;
8
+ limit: number;
9
+ offset: number;
10
+ onLimitChange?: (limit: number) => void;
11
+ searchVisible?: boolean;
12
+ setSearchFilterHeight?: (height: number) => void;
13
+ searchError?: string;
14
+ searchValues?: any;
15
+ showLimitOptions?: boolean;
16
+ };
17
+ declare function SearchFilter(props: Props): import("react/jsx-runtime").JSX.Element;
18
+ export default SearchFilter;
19
+ //# sourceMappingURL=SearchFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchFilter.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchFilter.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC,KAAK,KAAK,GAAG;IACX,MAAM,EAAE,GAAG,CAAC;IACZ,YAAY,EAAE,YAAY,CAAC;IAC3B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,iBAAS,YAAY,CAAC,KAAK,EAAE,KAAK,2CAyHjC;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ type SearchParamsProps = {
3
+ onLimitChange?: (limit: number) => void;
4
+ };
5
+ export declare function SearchParams(props: SearchParamsProps): React.ReactElement;
6
+ export {};
7
+ //# sourceMappingURL=SearchParams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchParams.d.ts","sourceRoot":"","sources":["../../../../src/widgets/views/searchFilter/SearchParams.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,KAAK,iBAAiB,GAAG;IACvB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAC;AAEF,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAsBzE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "2.0.0-alpha.4",
3
+ "version": "2.0.0-alpha.41",
4
4
  "engines": {
5
5
  "node": "20.5.0"
6
6
  },
@@ -20,19 +20,21 @@
20
20
  }
21
21
  },
22
22
  "scripts": {
23
- "preinstall": "npx only-allow npm",
24
23
  "build": "tsc --noEmit && vite build",
25
24
  "preview": "npm run build && vite preview",
26
- "dev:vite": "while :; do tsc && vite build --watch --force; done",
25
+ "dev:vite": "vite build --watch --force",
27
26
  "dev:tsc": "tsc --noEmit --watch",
28
27
  "prepare": "husky install",
29
28
  "start": "concurrently npm:dev:*",
30
- "check": "lint-staged"
29
+ "check": "lint-staged",
30
+ "storybook": "storybook dev -p 6006",
31
+ "build-storybook": "storybook build",
32
+ "analyze": "npx vite-bundle-visualizer"
31
33
  },
32
34
  "dependencies": {
33
35
  "@ant-design/plots": "^1.0.9",
34
36
  "@gisce/fiber-diagram": "^1.1.0-rc.3",
35
- "@gisce/ooui": "^0.22.3",
37
+ "@gisce/ooui": "1.0.0-alpha.15",
36
38
  "@gisce/react-formiga-components": "^1.0.9-rc.21",
37
39
  "@gisce/react-formiga-table": "^0.8.6",
38
40
  "@monaco-editor/react": "^4.4.5",
@@ -42,25 +44,35 @@
42
44
  "file-type-buffer-browser": "git+ssh://git@github.com/mguellsegarra/file-type-buffer-browser.git",
43
45
  "interweave": "^13.0.0",
44
46
  "md5": "^2.3.0",
45
- "react": "^17.0.1",
46
- "react-dom": "^17.0.1",
47
+ "react": "18.2.0",
48
+ "react-dom": "18.2.0",
47
49
  "react-grid-layout": "^1.3.4",
48
50
  "react-hotkeys-hook": "^3.4.4",
49
- "react-markdown": "^8.0.7",
51
+ "react-markdown": "^9.0.0",
50
52
  "react-measure": "^2.5.2",
53
+ "remark-gfm": "^4.0.0",
51
54
  "styled-components": "5.3.5",
52
55
  "use-deep-compare-effect": "^1.8.1",
53
- "uuid": "^3.4.0",
56
+ "uuid": "^9.0.1",
54
57
  "validator": "^13.6.0"
55
58
  },
56
59
  "devDependencies": {
57
60
  "@semantic-release/exec": "6.0.3",
58
61
  "@semantic-release/git": "10.0.1",
59
62
  "@semantic-release/npm": "10.0.4",
63
+ "@storybook/addon-essentials": "^7.4.6",
64
+ "@storybook/addon-interactions": "^7.4.6",
65
+ "@storybook/addon-knobs": "^7.0.2",
66
+ "@storybook/addon-links": "^7.4.6",
67
+ "@storybook/addon-onboarding": "^1.0.8",
68
+ "@storybook/blocks": "^7.4.6",
69
+ "@storybook/react": "^7.4.6",
70
+ "@storybook/react-vite": "^7.4.6",
71
+ "@storybook/testing-library": "^0.2.2",
60
72
  "@types/lodash": "^4.14.170",
61
73
  "@types/md5": "^2.3.2",
62
- "@types/react": "^17.0.1",
63
- "@types/react-dom": "^17.0.1",
74
+ "@types/react": "18.2.18",
75
+ "@types/react-dom": "18.2.7",
64
76
  "@types/react-grid-layout": "^1.3.2",
65
77
  "@types/react-measure": "^2.0.7",
66
78
  "@types/react-responsive": "^8.0.2",
@@ -83,19 +95,20 @@
83
95
  "eslint-plugin-react-hooks": "4.6.0",
84
96
  "husky": "8.0.3",
85
97
  "lint-staged": "13.2.3",
86
- "only-allow": "1.1.1",
87
98
  "prettier": "3.0.1",
88
99
  "rollup-plugin-peer-deps-external": "^2.2.4",
89
100
  "semantic-release": "21.0.7",
101
+ "storybook": "^7.4.6",
90
102
  "typescript": "^5.0.4",
91
103
  "vite": "4.4.8",
104
+ "vite-bundle-visualizer": "^0.10.0",
92
105
  "vite-plugin-dts": "^3.6.0",
93
106
  "vite-plugin-package-version": "1.0.2",
94
107
  "vite-tsconfig-paths": "3.5.0"
95
108
  },
96
109
  "peerDependencies": {
97
- "react": "^17.0.1",
98
- "react-dom": "^17.0.1",
110
+ "react": "18.2.0",
111
+ "react-dom": "18.2.0",
99
112
  "styled-components": "5.3.5"
100
113
  },
101
114
  "lint-staged": {
@@ -117,6 +130,12 @@
117
130
  "plugins": [
118
131
  "@semantic-release/commit-analyzer",
119
132
  "@semantic-release/release-notes-generator",
133
+ [
134
+ "@semantic-release/exec",
135
+ {
136
+ "prepareCmd": "npm run build"
137
+ }
138
+ ],
120
139
  [
121
140
  "@semantic-release/npm",
122
141
  {
@@ -126,5 +145,10 @@
126
145
  "@semantic-release/github",
127
146
  "@semantic-release/git"
128
147
  ]
148
+ },
149
+ "overrides": {
150
+ "rc-dropdown": "3.2.0",
151
+ "react": "18.2.0",
152
+ "react-dom": "18.2.0"
129
153
  }
130
154
  }
@@ -9,7 +9,7 @@ export default class ConnectionProvider {
9
9
 
10
10
  public static getHandler(): ConnectionProviderType {
11
11
  if (!ConnectionProvider.handler) {
12
- throw 'Must call init() first with a valid ConnectionProvider instance';
12
+ throw "Must call init() first with a valid ConnectionProvider instance";
13
13
  }
14
14
  return ConnectionProvider.handler;
15
15
  }
@@ -15,16 +15,16 @@ describe("A IconMapper instance", () => {
15
15
  const findAndReplaceIcon = Icons.FileSearchOutlined;
16
16
  const icon = iconMapper("gtk-find-and-replace");
17
17
  expect(icon).toBe(findAndReplaceIcon);
18
- })
18
+ });
19
19
  test("should return gtk-go", () => {
20
20
  const findAndReplaceIcon = Icons.FileSearchOutlined;
21
21
  const icon = iconMapper("gtk-find-and-replace");
22
22
  expect(icon).toBe(findAndReplaceIcon);
23
- })
23
+ });
24
24
  describe("If key doesn't exist in iconMapper", () => {
25
25
  test("should return undefined", () => {
26
26
  const icon = iconMapper("gtk-foo-bar");
27
27
  expect(icon).toBe(undefined);
28
- })
29
- })
28
+ });
29
+ });
30
30
  });
@@ -52,7 +52,7 @@ function AttachmentsButton(props: AttachmentsButtonProps) {
52
52
  name: r.name,
53
53
  datas_fname: r.datas_fname,
54
54
  link: r.link,
55
- }))
55
+ })),
56
56
  );
57
57
  } catch (error) {
58
58
  showErrorDialog(error as any);
@@ -103,28 +103,30 @@ function AttachmentsButton(props: AttachmentsButtonProps) {
103
103
  preloadAttachments();
104
104
  }, [preloadAttachments]);
105
105
 
106
- return (<>
107
- <AttachmentsButtonWrapper
108
- numberOfAttachments={attachments.length}
109
- attachments={preloadedAttachments}
110
- disabled={disabled}
111
- loading={preloading}
112
- onAddNewAttachment={onAddNewAttachment}
113
- onListAllAttachments={onListAllAttachments}
114
- onopenAttachmentLink={openAttachmentLink}
115
- onOpenAttachmentDetail={openAttachmentDetail}
116
- />
117
- <Modal
118
- title={t("downloadingAttachment")}
119
- open={downloading}
120
- footer={null}
121
- closable={false}
122
- centered
123
- maskClosable={false}
124
- >
125
- <Spin />
126
- </Modal>
127
- </>);
106
+ return (
107
+ <>
108
+ <AttachmentsButtonWrapper
109
+ numberOfAttachments={attachments.length}
110
+ attachments={preloadedAttachments}
111
+ disabled={disabled}
112
+ loading={preloading}
113
+ onAddNewAttachment={onAddNewAttachment}
114
+ onListAllAttachments={onListAllAttachments}
115
+ onopenAttachmentLink={openAttachmentLink}
116
+ onOpenAttachmentDetail={openAttachmentDetail}
117
+ />
118
+ <Modal
119
+ title={t("downloadingAttachment")}
120
+ open={downloading}
121
+ footer={null}
122
+ closable={false}
123
+ centered
124
+ maskClosable={false}
125
+ >
126
+ <Spin />
127
+ </Modal>
128
+ </>
129
+ );
128
130
  }
129
131
 
130
132
  export default AttachmentsButton;
@@ -33,7 +33,7 @@ export type AttachmentsButtonWrapperProps = {
33
33
  };
34
34
 
35
35
  export const AttachmentsButtonWrapper = (
36
- props: AttachmentsButtonWrapperProps
36
+ props: AttachmentsButtonWrapperProps,
37
37
  ) => {
38
38
  const { numberOfAttachments, disabled } = props;
39
39
  const { t, lang } = useContext(LocaleContext) as LocaleContextType;
@@ -68,7 +68,7 @@ export const AttachmentsButtonWrapper = (
68
68
  const Content = (
69
69
  props: AttachmentsButtonWrapperProps,
70
70
  setPopoverVisible: (visible: boolean) => void,
71
- locale: string
71
+ locale: string,
72
72
  ) => {
73
73
  const {
74
74
  attachments = [],
@@ -1,6 +1,8 @@
1
1
  import React from "react";
2
- import ButtonWithTooltip, {Props as ButtonWithTooltipProps } from "@/common/ButtonWithTooltip";
3
- import { theme } from 'antd';
2
+ import ButtonWithTooltip, {
3
+ Props as ButtonWithTooltipProps,
4
+ } from "@/common/ButtonWithTooltip";
5
+ import { theme } from "antd";
4
6
  const { useToken } = theme;
5
7
 
6
8
  type Props = ButtonWithTooltipProps & {
@@ -95,7 +95,7 @@ function ChangeViewButton(props: Props) {
95
95
  function handleMenuClick(event: any) {
96
96
  tryNavigate(() => {
97
97
  const selectedView = availableViews.find(
98
- (view) => view.view_id === parseInt(event.key)
98
+ (view) => view.view_id === parseInt(event.key),
99
99
  );
100
100
  onChangeView(selectedView!);
101
101
  });
@@ -13,12 +13,8 @@ import {
13
13
  import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
14
14
 
15
15
  function DashboardActionBar() {
16
- const {
17
- isLoading,
18
- dashboardRef,
19
- moveItemsEnabled,
20
- setMoveItemsEnabled,
21
- } = useContext(DashboardActionContext) as DashboardActionContextType;
16
+ const { isLoading, dashboardRef, moveItemsEnabled, setMoveItemsEnabled } =
17
+ useContext(DashboardActionContext) as DashboardActionContextType;
22
18
  const { t } = useContext(LocaleContext) as LocaleContextType;
23
19
 
24
20
  return (
@@ -1,7 +1,9 @@
1
- import React from "react";
2
- import { Menu, Dropdown, Button } from "antd";
1
+ import React, { useState } from "react";
2
+ import { Menu, Dropdown, Button, Input } from "antd";
3
3
  import { DownOutlined } from "@ant-design/icons";
4
4
 
5
+ const { Search } = Input;
6
+
5
7
  type Props = {
6
8
  onItemClick: (event: any) => void;
7
9
  items: any[];
@@ -9,6 +11,7 @@ type Props = {
9
11
  icon: any;
10
12
  label?: string;
11
13
  disabled?: boolean;
14
+ searchable?: true | false | "auto";
12
15
  };
13
16
 
14
17
  function DropdownButton(props: Props) {
@@ -19,18 +22,56 @@ function DropdownButton(props: Props) {
19
22
  onItemClick,
20
23
  label,
21
24
  disabled = false,
25
+ searchable = "auto",
22
26
  } = props;
27
+ const [searchValue, setSearchValue] = useState<string>();
28
+
29
+ const onSearch = (value?: string) => {
30
+ if (!value) {
31
+ setSearchValue(undefined);
32
+ return;
33
+ }
34
+
35
+ const sanitizedValue = value.trim();
36
+
37
+ if (sanitizedValue.length === 0) {
38
+ setSearchValue(undefined);
39
+ return;
40
+ }
41
+
42
+ setSearchValue(sanitizedValue);
43
+ };
23
44
 
24
45
  function getMenu() {
25
- const menuItems = items?.map((item, idx) => {
46
+ let itemsData = [];
47
+ if (searchValue) {
48
+ itemsData = items.filter((item) => {
49
+ return item.name.toLowerCase().includes(searchValue.toLowerCase());
50
+ });
51
+ } else {
52
+ itemsData = items;
53
+ }
54
+
55
+ const menuItems = itemsData.map((item, idx) => {
26
56
  if (item.name === "divider") {
27
57
  return <Menu.Divider key={"divider" + idx} />;
28
58
  }
29
59
  return <Menu.Item key={item.id}>{item.name}</Menu.Item>;
30
60
  });
31
61
 
62
+ const mustShowSearch =
63
+ searchable === true || (searchable === "auto" && items.length > 3);
64
+
32
65
  return (
33
66
  <Menu onClick={handleMenuClick}>
67
+ {mustShowSearch && (
68
+ <Search
69
+ onChange={(e: any) => onSearch(e.target.value)}
70
+ onSearch={onSearch}
71
+ allowClear
72
+ style={{ padding: 5 }}
73
+ />
74
+ )}
34
75
  <Menu.ItemGroup title={tooltip}>{menuItems}</Menu.ItemGroup>
35
76
  </Menu>
36
77
  );
@@ -70,12 +70,12 @@ function FormActionBar({ toolbar }: { toolbar: any }) {
70
70
  const { t, lang } = useContext(LocaleContext) as LocaleContextType;
71
71
 
72
72
  const contentRootContext = useContext(
73
- ContentRootContext
73
+ ContentRootContext,
74
74
  ) as ContentRootContextType;
75
75
  const { processAction } = contentRootContext || {};
76
76
 
77
77
  const tabManagerContext = useContext(
78
- TabManagerContext
78
+ TabManagerContext,
79
79
  ) as TabManagerContextType;
80
80
  const { openRelate, openDefaultActionForModel } = tabManagerContext || {};
81
81
 
@@ -144,6 +144,7 @@ function FormActionBar({ toolbar }: { toolbar: any }) {
144
144
  await ConnectionProvider.getHandler().deleteObjects({
145
145
  model: currentModel!,
146
146
  ids: [currentId!],
147
+ context: (formRef.current as any).getContext(),
147
148
  });
148
149
 
149
150
  const filteredResults = results?.filter((item: any) => {
@@ -182,7 +183,7 @@ function FormActionBar({ toolbar }: { toolbar: any }) {
182
183
  });
183
184
 
184
185
  if (newId) {
185
- await goToResourceId?.(newId);
186
+ await goToResourceId?.([newId]);
186
187
  }
187
188
  } catch (e) {
188
189
  showErrorDialog(JSON.stringify(e));
@@ -16,7 +16,7 @@ function NewButton(props: Props) {
16
16
  const { disabled = false } = props;
17
17
 
18
18
  const { formHasChanges, onNewClicked: onNewClickedProps } = useContext(
19
- ActionViewContext
19
+ ActionViewContext,
20
20
  ) as ActionViewContextType;
21
21
  const { t, lang } = useContext(LocaleContext) as LocaleContextType;
22
22
 
@@ -30,7 +30,7 @@ import { showLogInfo } from "@/helpers/logInfoHelper";
30
30
  import SearchBar from "./SearchBar";
31
31
  import { ExportModal } from "..";
32
32
  import { mergeParams } from "@/helpers/searchHelper";
33
- import { ConfigContext } from "@/context/ConfigContext";
33
+ import { ErpFeatureKeys, useFeatureIsEnabled } from "@/context/ConfigContext";
34
34
 
35
35
  type Props = {
36
36
  parentContext?: any;
@@ -66,10 +66,12 @@ function TreeActionBar(props: Props) {
66
66
  } = useContext(ActionViewContext) as ActionViewContextType;
67
67
 
68
68
  const { parentContext = {}, treeExpandable, toolbar } = props;
69
- const { previewFeatures } = useContext(ConfigContext);
69
+ const advancedExportEnabled = useFeatureIsEnabled(
70
+ ErpFeatureKeys.FEATURE_ADVANCED_EXPORT,
71
+ );
70
72
  const { t, lang } = useContext(LocaleContext) as LocaleContextType;
71
73
  const contentRootContext = useContext(
72
- ContentRootContext
74
+ ContentRootContext,
73
75
  ) as ContentRootContextType;
74
76
  const { processAction } = contentRootContext || {};
75
77
  const [exportModalVisible, setExportModalVisible] = useState(false);
@@ -95,6 +97,7 @@ function TreeActionBar(props: Props) {
95
97
  await ConnectionProvider.getHandler().deleteObjects({
96
98
  model: currentModel!,
97
99
  ids: selectedRowItems!.map((item) => item.id),
100
+ context: { ...parentContext },
98
101
  });
99
102
 
100
103
  setCurrentId?.(undefined);
@@ -286,85 +289,89 @@ function TreeActionBar(props: Props) {
286
289
  });
287
290
  }}
288
291
  />
289
-
290
- {separator()}
291
- <DropdownButton
292
- icon={
293
- <Icon
294
- component={() => (
295
- <svg
296
- xmlns="http://www.w3.org/2000/svg"
297
- className="icon icon-tabler icon-tabler-database-export"
298
- width="1em"
299
- height="1em"
300
- viewBox="0 0 24 24"
301
- strokeWidth="1.5"
302
- fill="none"
303
- stroke="currentColor"
304
- strokeLinecap="round"
305
- strokeLinejoin="round"
306
- >
307
- <path stroke="none" d="M0 0h24v24H0z" fill="none" />
308
- <ellipse cx="12" cy="6" rx="8" ry="3" />
309
- <path d="M4 6v6c0 1.657 3.582 3 8 3a19.84 19.84 0 0 0 3.302 -.267m4.698 -2.733v-6" />
310
- <path d="M4 12v6c0 1.599 3.335 2.905 7.538 2.995m8.462 -6.995v-2m-6 7h7m-3 -3l3 3l-3 3" />
311
- </svg>
312
- )}
313
- />
314
- }
315
- tooltip={t("export")}
316
- items={[
317
- {
318
- id: "print_screen",
319
- name: t("printScreen"),
320
- },
321
- {
322
- id: "export",
323
- name: t("advancedExport"),
324
- },
325
- ]}
326
- onItemClick={(itemClicked: any) => {
327
- if (itemClicked.id === "print_screen") {
328
- let idsToExport = selectedRowItems?.map((item) => item.id) || [];
329
-
330
- if (idsToExport.length === 0) {
331
- idsToExport = results?.map((item) => item.id) || [];
292
+ {advancedExportEnabled && (
293
+ <>
294
+ {separator()}
295
+ <DropdownButton
296
+ icon={
297
+ <Icon
298
+ component={() => (
299
+ <svg
300
+ xmlns="http://www.w3.org/2000/svg"
301
+ className="icon icon-tabler icon-tabler-database-export"
302
+ width="1em"
303
+ height="1em"
304
+ viewBox="0 0 24 24"
305
+ strokeWidth="1.5"
306
+ fill="none"
307
+ stroke="currentColor"
308
+ strokeLinecap="round"
309
+ strokeLinejoin="round"
310
+ >
311
+ <path stroke="none" d="M0 0h24v24H0z" fill="none" />
312
+ <ellipse cx="12" cy="6" rx="8" ry="3" />
313
+ <path d="M4 6v6c0 1.657 3.582 3 8 3a19.84 19.84 0 0 0 3.302 -.267m4.698 -2.733v-6" />
314
+ <path d="M4 12v6c0 1.599 3.335 2.905 7.538 2.995m8.462 -6.995v-2m-6 7h7m-3 -3l3 3l-3 3" />
315
+ </svg>
316
+ )}
317
+ />
332
318
  }
333
-
334
- runAction({
335
- id: -1,
336
- model: currentModel,
337
- report_name: "printscreen.list",
338
- type: "ir.actions.report.xml",
339
- datas: {
340
- model: currentModel,
341
- ids: idsToExport,
319
+ tooltip={t("export")}
320
+ items={[
321
+ {
322
+ id: "print_screen",
323
+ name: t("printScreen"),
342
324
  },
343
- });
344
- return;
345
- }
325
+ {
326
+ id: "export",
327
+ name: t("advancedExport"),
328
+ },
329
+ ]}
330
+ onItemClick={(itemClicked: any) => {
331
+ if (itemClicked.id === "print_screen") {
332
+ let idsToExport =
333
+ selectedRowItems?.map((item) => item.id) || [];
346
334
 
347
- setExportModalVisible(true);
348
- }}
349
- disabled={
350
- duplicatingItem || removingItem || treeIsLoading || hasNameSearch
351
- }
352
- />
353
- <ExportModal
354
- visible={exportModalVisible}
355
- locale={lang}
356
- onClose={() => setExportModalVisible(false)}
357
- model={currentModel!}
358
- domain={mergeParams(
359
- searchTreeRef?.current?.getDomain() || [],
360
- searchParams || []
361
- )}
362
- limit={limit}
363
- totalRegisters={totalItems || 0}
364
- selectedRegistersToExport={selectedRowItems}
365
- visibleRegisters={results?.length || 0}
366
- context={parentContext}
367
- />
335
+ if (idsToExport.length === 0) {
336
+ idsToExport = results?.map((item) => item.id) || [];
337
+ }
338
+
339
+ runAction({
340
+ id: -1,
341
+ model: currentModel,
342
+ report_name: "printscreen.list",
343
+ type: "ir.actions.report.xml",
344
+ datas: {
345
+ model: currentModel,
346
+ ids: idsToExport,
347
+ },
348
+ });
349
+ return;
350
+ }
351
+
352
+ setExportModalVisible(true);
353
+ }}
354
+ disabled={
355
+ duplicatingItem || removingItem || treeIsLoading || hasNameSearch
356
+ }
357
+ />
358
+ <ExportModal
359
+ visible={exportModalVisible}
360
+ locale={lang}
361
+ onClose={() => setExportModalVisible(false)}
362
+ model={currentModel!}
363
+ domain={mergeParams(
364
+ searchTreeRef?.current?.getDomain() || [],
365
+ searchParams || [],
366
+ )}
367
+ limit={limit}
368
+ totalRegisters={totalItems || 0}
369
+ selectedRegistersToExport={selectedRowItems}
370
+ visibleRegisters={results?.length || 0}
371
+ context={parentContext}
372
+ />
373
+ </>
374
+ )}
368
375
  </Space>
369
376
  );
370
377
  }