@gisce/react-ooui 1.5.2-alpha.1 → 1.5.2-rc.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.
Files changed (392) 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 +13 -0
  4. package/dist/actionbar/ActionButton.d.ts.map +1 -0
  5. package/dist/actionbar/AttachmentsButton.d.ts +12 -0
  6. package/dist/actionbar/AttachmentsButton.d.ts.map +1 -0
  7. package/dist/actionbar/AttachmentsButtonWrapper.d.ts +19 -0
  8. package/dist/actionbar/AttachmentsButtonWrapper.d.ts.map +1 -0
  9. package/dist/actionbar/ButtonWithBadge.d.ts +8 -0
  10. package/dist/actionbar/ButtonWithBadge.d.ts.map +1 -0
  11. package/dist/actionbar/ChangeViewButton.d.ts +13 -0
  12. package/dist/actionbar/ChangeViewButton.d.ts.map +1 -0
  13. package/dist/actionbar/DashboardActionBar.d.ts +4 -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 +6 -0
  18. package/dist/actionbar/FormActionBar.d.ts.map +1 -0
  19. package/dist/actionbar/GraphActionBar.d.ts +6 -0
  20. package/dist/actionbar/GraphActionBar.d.ts.map +1 -0
  21. package/dist/actionbar/NewButton.d.ts +7 -0
  22. package/dist/actionbar/NewButton.d.ts.map +1 -0
  23. package/dist/actionbar/SearchBar.d.ts +9 -0
  24. package/dist/actionbar/SearchBar.d.ts.map +1 -0
  25. package/dist/actionbar/TreeActionBar.d.ts +9 -0
  26. package/dist/actionbar/TreeActionBar.d.ts.map +1 -0
  27. package/dist/common/ButtonWithTooltip.d.ts +8 -0
  28. package/dist/common/ButtonWithTooltip.d.ts.map +1 -0
  29. package/dist/common/DatePicker.d.ts +20 -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 +10 -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 +7 -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 +8 -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/useExport.d.ts +44 -0
  78. package/dist/hooks/useExport.d.ts.map +1 -0
  79. package/dist/hooks/useSearch.d.ts +56 -0
  80. package/dist/hooks/useSearch.d.ts.map +1 -0
  81. package/dist/hooks/useWindowDimensions.d.ts +7 -0
  82. package/dist/hooks/useWindowDimensions.d.ts.map +1 -0
  83. package/dist/index.d.ts +57 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/locales/ca_ES.d.ts +93 -0
  86. package/dist/locales/ca_ES.d.ts.map +1 -0
  87. package/dist/locales/en_US.d.ts +93 -0
  88. package/dist/locales/en_US.d.ts.map +1 -0
  89. package/dist/locales/es_ES.d.ts +93 -0
  90. package/dist/locales/es_ES.d.ts.map +1 -0
  91. package/dist/react-ooui.es.js +11763 -0
  92. package/dist/react-ooui.es.js.map +1 -0
  93. package/dist/react-ooui.umd.js +42 -0
  94. package/dist/react-ooui.umd.js.map +1 -0
  95. package/dist/style.css +1 -0
  96. package/dist/types/index.d.ts +256 -0
  97. package/dist/types/index.d.ts.map +1 -0
  98. package/dist/ui/ActionErrorDialog.d.ts +3 -0
  99. package/dist/ui/ActionErrorDialog.d.ts.map +1 -0
  100. package/dist/ui/ConfirmDialog.d.ts +7 -0
  101. package/dist/ui/ConfirmDialog.d.ts.map +1 -0
  102. package/dist/ui/ErrorAlert.d.ts +6 -0
  103. package/dist/ui/ErrorAlert.d.ts.map +1 -0
  104. package/dist/ui/FavouriteButton.d.ts +26 -0
  105. package/dist/ui/FavouriteButton.d.ts.map +1 -0
  106. package/dist/ui/FormErrorsDialog.d.ts +3 -0
  107. package/dist/ui/FormErrorsDialog.d.ts.map +1 -0
  108. package/dist/ui/GenericErrorDialog.d.ts +3 -0
  109. package/dist/ui/GenericErrorDialog.d.ts.map +1 -0
  110. package/dist/ui/GoToResourceModal.d.ts +10 -0
  111. package/dist/ui/GoToResourceModal.d.ts.map +1 -0
  112. package/dist/ui/InfoDialog.d.ts +3 -0
  113. package/dist/ui/InfoDialog.d.ts.map +1 -0
  114. package/dist/ui/RefreshItemDialog.d.ts +7 -0
  115. package/dist/ui/RefreshItemDialog.d.ts.map +1 -0
  116. package/dist/ui/RemoveItemDialog.d.ts +6 -0
  117. package/dist/ui/RemoveItemDialog.d.ts.map +1 -0
  118. package/dist/ui/TitleHeader.d.ts +8 -0
  119. package/dist/ui/TitleHeader.d.ts.map +1 -0
  120. package/dist/ui/UnlinkItemDialog.d.ts +6 -0
  121. package/dist/ui/UnlinkItemDialog.d.ts.map +1 -0
  122. package/dist/ui/UnsavedChangesDialog.d.ts +7 -0
  123. package/dist/ui/UnsavedChangesDialog.d.ts.map +1 -0
  124. package/dist/ui/WarningDialog.d.ts +3 -0
  125. package/dist/ui/WarningDialog.d.ts.map +1 -0
  126. package/dist/views/ActionView.d.ts +22 -0
  127. package/dist/views/ActionView.d.ts.map +1 -0
  128. package/dist/views/CurrentTabContent.d.ts +4 -0
  129. package/dist/views/CurrentTabContent.d.ts.map +1 -0
  130. package/dist/views/RootView.d.ts +14 -0
  131. package/dist/views/RootView.d.ts.map +1 -0
  132. package/dist/views/TabContent.d.ts +8 -0
  133. package/dist/views/TabContent.d.ts.map +1 -0
  134. package/dist/views/TabSelector.d.ts +4 -0
  135. package/dist/views/TabSelector.d.ts.map +1 -0
  136. package/dist/views/Welcome.d.ts +4 -0
  137. package/dist/views/Welcome.d.ts.map +1 -0
  138. package/dist/views/actionViews/DashboardActionView.d.ts +7 -0
  139. package/dist/views/actionViews/DashboardActionView.d.ts.map +1 -0
  140. package/dist/views/actionViews/FormActionView.d.ts +18 -0
  141. package/dist/views/actionViews/FormActionView.d.ts.map +1 -0
  142. package/dist/views/actionViews/GraphActionView.d.ts +13 -0
  143. package/dist/views/actionViews/GraphActionView.d.ts.map +1 -0
  144. package/dist/views/actionViews/TreeActionView.d.ts +20 -0
  145. package/dist/views/actionViews/TreeActionView.d.ts.map +1 -0
  146. package/dist/views/tabs/Tab.d.ts +11 -0
  147. package/dist/views/tabs/Tab.d.ts.map +1 -0
  148. package/dist/widgets/WidgetFactory.d.ts +4 -0
  149. package/dist/widgets/WidgetFactory.d.ts.map +1 -0
  150. package/dist/widgets/base/Binary.d.ts +14 -0
  151. package/dist/widgets/base/Binary.d.ts.map +1 -0
  152. package/dist/widgets/base/Boolean.d.ts +4 -0
  153. package/dist/widgets/base/Boolean.d.ts.map +1 -0
  154. package/dist/widgets/base/Button.d.ts +8 -0
  155. package/dist/widgets/base/Button.d.ts.map +1 -0
  156. package/dist/widgets/base/Char.d.ts +8 -0
  157. package/dist/widgets/base/Char.d.ts.map +1 -0
  158. package/dist/widgets/base/Date.d.ts +5 -0
  159. package/dist/widgets/base/Date.d.ts.map +1 -0
  160. package/dist/widgets/base/DateTime.d.ts +5 -0
  161. package/dist/widgets/base/DateTime.d.ts.map +1 -0
  162. package/dist/widgets/base/Email.d.ts +4 -0
  163. package/dist/widgets/base/Email.d.ts.map +1 -0
  164. package/dist/widgets/base/Float.d.ts +4 -0
  165. package/dist/widgets/base/Float.d.ts.map +1 -0
  166. package/dist/widgets/base/FloatTime.d.ts +12 -0
  167. package/dist/widgets/base/FloatTime.d.ts.map +1 -0
  168. package/dist/widgets/base/Image.d.ts +14 -0
  169. package/dist/widgets/base/Image.d.ts.map +1 -0
  170. package/dist/widgets/base/Integer.d.ts +8 -0
  171. package/dist/widgets/base/Integer.d.ts.map +1 -0
  172. package/dist/widgets/base/Label.d.ts +9 -0
  173. package/dist/widgets/base/Label.d.ts.map +1 -0
  174. package/dist/widgets/base/LinkInput.d.ts +12 -0
  175. package/dist/widgets/base/LinkInput.d.ts.map +1 -0
  176. package/dist/widgets/base/MultiSelection.d.ts +10 -0
  177. package/dist/widgets/base/MultiSelection.d.ts.map +1 -0
  178. package/dist/widgets/base/ProgressBar.d.ts +7 -0
  179. package/dist/widgets/base/ProgressBar.d.ts.map +1 -0
  180. package/dist/widgets/base/Reference.d.ts +16 -0
  181. package/dist/widgets/base/Reference.d.ts.map +1 -0
  182. package/dist/widgets/base/ReferenceTree.d.ts +8 -0
  183. package/dist/widgets/base/ReferenceTree.d.ts.map +1 -0
  184. package/dist/widgets/base/Selection.d.ts +10 -0
  185. package/dist/widgets/base/Selection.d.ts.map +1 -0
  186. package/dist/widgets/base/Separator.d.ts +8 -0
  187. package/dist/widgets/base/Separator.d.ts.map +1 -0
  188. package/dist/widgets/base/Text.d.ts +8 -0
  189. package/dist/widgets/base/Text.d.ts.map +1 -0
  190. package/dist/widgets/base/Time.d.ts +12 -0
  191. package/dist/widgets/base/Time.d.ts.map +1 -0
  192. package/dist/widgets/base/Url.d.ts +4 -0
  193. package/dist/widgets/base/Url.d.ts.map +1 -0
  194. package/dist/widgets/base/many2one/Many2one.d.ts +16 -0
  195. package/dist/widgets/base/many2one/Many2one.d.ts.map +1 -0
  196. package/dist/widgets/base/many2one/Many2oneSuffix.d.ts +9 -0
  197. package/dist/widgets/base/many2one/Many2oneSuffix.d.ts.map +1 -0
  198. package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts +10 -0
  199. package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts.map +1 -0
  200. package/dist/widgets/base/many2one/Many2oneTree.d.ts +6 -0
  201. package/dist/widgets/base/many2one/Many2oneTree.d.ts.map +1 -0
  202. package/dist/widgets/base/one2many/One2many.d.ts +8 -0
  203. package/dist/widgets/base/one2many/One2many.d.ts.map +1 -0
  204. package/dist/widgets/base/one2many/One2manyInput.d.ts +23 -0
  205. package/dist/widgets/base/one2many/One2manyInput.d.ts.map +1 -0
  206. package/dist/widgets/base/one2many/One2manyTopBar.d.ts +23 -0
  207. package/dist/widgets/base/one2many/One2manyTopBar.d.ts.map +1 -0
  208. package/dist/widgets/containers/Container.d.ts +9 -0
  209. package/dist/widgets/containers/Container.d.ts.map +1 -0
  210. package/dist/widgets/containers/Group.d.ts +10 -0
  211. package/dist/widgets/containers/Group.d.ts.map +1 -0
  212. package/dist/widgets/containers/Notebook.d.ts +9 -0
  213. package/dist/widgets/containers/Notebook.d.ts.map +1 -0
  214. package/dist/widgets/custom/Avatar.d.ts +10 -0
  215. package/dist/widgets/custom/Avatar.d.ts.map +1 -0
  216. package/dist/widgets/custom/ButtonGroup.d.ts +8 -0
  217. package/dist/widgets/custom/ButtonGroup.d.ts.map +1 -0
  218. package/dist/widgets/custom/CodeEditor.d.ts +9 -0
  219. package/dist/widgets/custom/CodeEditor.d.ts.map +1 -0
  220. package/dist/widgets/custom/Comments.d.ts +35 -0
  221. package/dist/widgets/custom/Comments.d.ts.map +1 -0
  222. package/dist/widgets/custom/FiberGrid.d.ts +10 -0
  223. package/dist/widgets/custom/FiberGrid.d.ts.map +1 -0
  224. package/dist/widgets/custom/Indicator.d.ts +10 -0
  225. package/dist/widgets/custom/Indicator.d.ts.map +1 -0
  226. package/dist/widgets/custom/Markdown.d.ts +5 -0
  227. package/dist/widgets/custom/Markdown.d.ts.map +1 -0
  228. package/dist/widgets/custom/MultiCheckbox.d.ts +14 -0
  229. package/dist/widgets/custom/MultiCheckbox.d.ts.map +1 -0
  230. package/dist/widgets/custom/Radio.d.ts +10 -0
  231. package/dist/widgets/custom/Radio.d.ts.map +1 -0
  232. package/dist/widgets/custom/Steps.d.ts +13 -0
  233. package/dist/widgets/custom/Steps.d.ts.map +1 -0
  234. package/dist/widgets/custom/Switch.d.ts +4 -0
  235. package/dist/widgets/custom/Switch.d.ts.map +1 -0
  236. package/dist/widgets/custom/Tag.d.ts +7 -0
  237. package/dist/widgets/custom/Tag.d.ts.map +1 -0
  238. package/dist/widgets/custom/Tags.d.ts +15 -0
  239. package/dist/widgets/custom/Tags.d.ts.map +1 -0
  240. package/dist/widgets/custom/Timeline.d.ts +16 -0
  241. package/dist/widgets/custom/Timeline.d.ts.map +1 -0
  242. package/dist/widgets/modals/ExportModal.d.ts +15 -0
  243. package/dist/widgets/modals/ExportModal.d.ts.map +1 -0
  244. package/dist/widgets/modals/FormModal.d.ts +12 -0
  245. package/dist/widgets/modals/FormModal.d.ts.map +1 -0
  246. package/dist/widgets/modals/SearchModal.d.ts +13 -0
  247. package/dist/widgets/modals/SearchModal.d.ts.map +1 -0
  248. package/dist/widgets/modals/TranslationModal.d.ts +12 -0
  249. package/dist/widgets/modals/TranslationModal.d.ts.map +1 -0
  250. package/dist/widgets/views/Dashboard/Dashboard.d.ts +5 -0
  251. package/dist/widgets/views/Dashboard/Dashboard.d.ts.map +1 -0
  252. package/dist/widgets/views/Dashboard/DashboardForm.d.ts +4 -0
  253. package/dist/widgets/views/Dashboard/DashboardForm.d.ts.map +1 -0
  254. package/dist/widgets/views/Dashboard/DashboardTree.d.ts +19 -0
  255. package/dist/widgets/views/Dashboard/DashboardTree.d.ts.map +1 -0
  256. package/dist/widgets/views/Dashboard/dashboardHelper.d.ts +6 -0
  257. package/dist/widgets/views/Dashboard/dashboardHelper.d.ts.map +1 -0
  258. package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts +4 -0
  259. package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts.map +1 -0
  260. package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts +6 -0
  261. package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts.map +1 -0
  262. package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts +4 -0
  263. package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts.map +1 -0
  264. package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts +11 -0
  265. package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts.map +1 -0
  266. package/dist/widgets/views/DashboardGrid/index.d.ts +5 -0
  267. package/dist/widgets/views/DashboardGrid/index.d.ts.map +1 -0
  268. package/dist/widgets/views/Form.d.ts +29 -0
  269. package/dist/widgets/views/Form.d.ts.map +1 -0
  270. package/dist/widgets/views/Graph/Graph.d.ts +11 -0
  271. package/dist/widgets/views/Graph/Graph.d.ts.map +1 -0
  272. package/dist/widgets/views/Graph/GraphChart.d.ts +11 -0
  273. package/dist/widgets/views/Graph/GraphChart.d.ts.map +1 -0
  274. package/dist/widgets/views/Graph/GraphDefaults.d.ts +83 -0
  275. package/dist/widgets/views/Graph/GraphDefaults.d.ts.map +1 -0
  276. package/dist/widgets/views/Graph/GraphIndicator.d.ts +17 -0
  277. package/dist/widgets/views/Graph/GraphIndicator.d.ts.map +1 -0
  278. package/dist/widgets/views/Graph/useGraphData.d.ts +20 -0
  279. package/dist/widgets/views/Graph/useGraphData.d.ts.map +1 -0
  280. package/dist/widgets/views/SearchTree.d.ts +24 -0
  281. package/dist/widgets/views/SearchTree.d.ts.map +1 -0
  282. package/dist/widgets/views/Tree.d.ts +32 -0
  283. package/dist/widgets/views/Tree.d.ts.map +1 -0
  284. package/dist/widgets/views/searchFilter/DateRangePicker.d.ts +4 -0
  285. package/dist/widgets/views/searchFilter/DateRangePicker.d.ts.map +1 -0
  286. package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts +4 -0
  287. package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts.map +1 -0
  288. package/dist/widgets/views/searchFilter/PairFields.d.ts +4 -0
  289. package/dist/widgets/views/searchFilter/PairFields.d.ts.map +1 -0
  290. package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts +10 -0
  291. package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts.map +1 -0
  292. package/dist/widgets/views/searchFilter/SearchField.d.ts +8 -0
  293. package/dist/widgets/views/searchFilter/SearchField.d.ts.map +1 -0
  294. package/dist/widgets/views/searchFilter/SearchFilter.d.ts +20 -0
  295. package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +1 -0
  296. package/dist/widgets/views/searchFilter/SearchParams.d.ts +7 -0
  297. package/dist/widgets/views/searchFilter/SearchParams.d.ts.map +1 -0
  298. package/package.json +43 -74
  299. package/src/actionbar/FormActionBar.tsx +1 -1
  300. package/src/actionbar/TreeActionBar.tsx +1 -1
  301. package/src/common/DatePicker.tsx +2 -2
  302. package/src/common/SelectAllRecordsRow.tsx +5 -4
  303. package/src/context/ContentRootContext.tsx +54 -61
  304. package/src/context/TabManagerContext.tsx +4 -3
  305. package/src/helpers/dynamicColumnsHelper.ts +1 -1
  306. package/src/helpers/filesHelper.ts +7 -7
  307. package/src/helpers/formHelper.ts +24 -23
  308. package/src/helpers/one2manyHelper.ts +6 -6
  309. package/src/helpers/searchHelper.ts +5 -8
  310. package/src/helpers/treeHelper.ts +7 -7
  311. package/src/helpers/viewHelper.ts +2 -2
  312. package/src/hooks/useExport.ts +3 -2
  313. package/src/hooks/useSearch.ts +8 -8
  314. package/src/index.ts +0 -4
  315. package/src/stories/Binary.stories.tsx +3 -0
  316. package/src/stories/Boolean.stories.tsx +3 -0
  317. package/src/stories/Button.stories.tsx +14 -8
  318. package/src/stories/Char.stories.tsx +3 -0
  319. package/src/stories/FiberGrid.stories.tsx +3 -0
  320. package/src/stories/Float.stories.tsx +3 -0
  321. package/src/stories/FloatTime.stories.tsx +3 -0
  322. package/src/stories/Image.stories.tsx +3 -0
  323. package/src/stories/Integer.stories.tsx +3 -0
  324. package/src/stories/Label.stories.tsx +3 -0
  325. package/src/stories/Many2one.stories.tsx +3 -0
  326. package/src/stories/One2many.stories.tsx +11 -4
  327. package/src/stories/ProgressBar.stories.tsx +3 -0
  328. package/src/stories/Reference.stories.tsx +3 -0
  329. package/src/stories/Selection.stories.tsx +3 -0
  330. package/src/stories/Separator.stories.tsx +7 -3
  331. package/src/stories/Text.stories.tsx +3 -0
  332. package/src/stories/containers/Group.stories.tsx +5 -0
  333. package/src/stories/containers/NewLine.stories.tsx +4 -0
  334. package/src/stories/containers/Notebook.stories.tsx +5 -0
  335. package/src/stories/custom/Avatar.stories.tsx +1 -0
  336. package/src/stories/custom/ButtonGroup.stories.tsx +23 -36
  337. package/src/stories/custom/CodeEditor.stories.tsx +4 -1
  338. package/src/stories/custom/Indicator.stories.tsx +11 -3
  339. package/src/stories/custom/Markdown.stories.tsx +6 -2
  340. package/src/stories/custom/MultiCheckbox.stories.tsx +15 -20
  341. package/src/stories/custom/Radio.stories.tsx +16 -13
  342. package/src/stories/custom/Steps.stories.tsx +5 -7
  343. package/src/stories/custom/Switch.stories.tsx +3 -0
  344. package/src/stories/custom/Tag.stories.tsx +11 -17
  345. package/src/stories/custom/Tags.stories.tsx +16 -20
  346. package/src/stories/forms/PreferencesForm.stories.tsx +4 -0
  347. package/src/stories/ui/ActionBar.stories.tsx +3 -0
  348. package/src/stories/ui/FavouriteButton.stories.tsx +3 -0
  349. package/src/stories/ui/GoToResourceModal.stories.tsx +3 -0
  350. package/src/stories/views/SearchTree.stories.tsx +89 -43
  351. package/src/stories/views/Tab.stories.tsx +3 -0
  352. package/src/stories/views/TabsAndContent.stories.tsx +3 -0
  353. package/src/stories/views/Tree.stories.jsx +4 -0
  354. package/src/stories/views/searchFilter/DateRangePicker.stories.tsx +3 -0
  355. package/src/stories/views/searchFilter/DateTimeRangePicker.stories.tsx +3 -0
  356. package/src/stories/views/searchFilter/PairFields.stories.tsx +3 -0
  357. package/src/stories/views/searchFilter/SearchFilter.stories.tsx +4 -0
  358. package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +4 -0
  359. package/src/tailwind.css +8 -0
  360. package/src/tailwind.generated.css +168533 -0
  361. package/src/types/index.ts +43 -94
  362. package/src/ui/FavouriteButton.tsx +3 -2
  363. package/src/views/ActionView.tsx +11 -12
  364. package/src/views/RootView.tsx +6 -5
  365. package/src/widgets/base/Binary.tsx +2 -2
  366. package/src/widgets/base/Boolean.tsx +2 -1
  367. package/src/widgets/base/Float.tsx +1 -1
  368. package/src/widgets/base/Integer.tsx +2 -2
  369. package/src/widgets/base/Label.tsx +9 -9
  370. package/src/widgets/base/LinkInput.tsx +1 -6
  371. package/src/widgets/base/MultiSelection.tsx +2 -1
  372. package/src/widgets/base/Selection.tsx +5 -11
  373. package/src/widgets/base/Time.tsx +12 -13
  374. package/src/widgets/base/many2one/Many2one.tsx +8 -7
  375. package/src/widgets/base/many2one/Many2oneSuffix.tsx +12 -23
  376. package/src/widgets/base/one2many/One2manyInput.tsx +15 -14
  377. package/src/widgets/containers/Notebook.tsx +2 -9
  378. package/src/widgets/custom/ButtonGroup.tsx +10 -13
  379. package/src/widgets/custom/CodeEditor.tsx +3 -7
  380. package/src/widgets/custom/Comments.tsx +70 -76
  381. package/src/widgets/custom/Indicator.tsx +2 -1
  382. package/src/widgets/custom/MultiCheckbox.tsx +2 -2
  383. package/src/widgets/custom/Tag.tsx +16 -20
  384. package/src/widgets/custom/Tags.tsx +3 -3
  385. package/src/widgets/custom/Timeline.tsx +6 -6
  386. package/src/widgets/views/Dashboard/DashboardTree.tsx +2 -2
  387. package/src/widgets/views/DashboardGrid/DashboardGrid.types.ts +1 -1
  388. package/src/widgets/views/Form.tsx +11 -10
  389. package/src/widgets/views/Graph/GraphIndicator.tsx +7 -7
  390. package/src/widgets/views/SearchTree.tsx +2 -2
  391. package/src/widgets/views/Tree.tsx +16 -15
  392. package/src/widgets/views/searchFilter/DateTimeRangePicker.tsx +3 -1
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { WidgetProps } from '../../../types';
3
+ export declare const DateTimeRangePicker: (props: WidgetProps) => React.JSX.Element;
4
+ //# sourceMappingURL=DateTimeRangePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DateTimeRangePicker.d.ts","sourceRoot":"","sources":["DateTimeRangePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAKtC,eAAO,MAAM,mBAAmB,UAAW,WAAW,sBAoDrD,CAAC"}
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import { WidgetProps } from '../../../types';
3
+ export declare function PairFields(props: WidgetProps): React.ReactElement;
4
+ //# sourceMappingURL=PairFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PairFields.d.ts","sourceRoot":"","sources":["PairFields.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAMtC,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,KAAK,CAAC,YAAY,CA2CjE"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ declare type Props = {
3
+ advancedFilter: boolean;
4
+ isSearching: boolean;
5
+ onAdvancedFilterToggle: () => void;
6
+ onClear: () => void;
7
+ };
8
+ export declare function SearchBottomBar(props: Props): React.ReactElement;
9
+ export {};
10
+ //# sourceMappingURL=SearchBottomBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchBottomBar.d.ts","sourceRoot":"","sources":["SearchBottomBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAY1C,aAAK,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,CAsChE"}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Field } from "@gisce/ooui";
3
+ declare type Props = {
4
+ field: Field;
5
+ };
6
+ export declare function SearchField(props: Props): React.JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=SearchField.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchField.d.ts","sourceRoot":"","sources":["SearchField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAU1C,OAAO,EAAE,KAAK,EAAgD,MAAM,aAAa,CAAC;AAGlF,aAAK,KAAK,GAAG;IACX,KAAK,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,wBAAgB,WAAW,CAAC,KAAK,EAAE,KAAK,qBAyCvC"}
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import { SearchFields } from '../../../types';
3
+ declare type Props = {
4
+ fields: any;
5
+ searchFields: SearchFields;
6
+ onClear: () => void;
7
+ onSubmit: (values: any) => void;
8
+ isSearching: boolean;
9
+ limit: number;
10
+ offset: number;
11
+ onLimitChange?: (limit: number) => void;
12
+ searchVisible?: boolean;
13
+ setSearchFilterHeight?: (height: number) => void;
14
+ searchError?: string;
15
+ searchValues?: any;
16
+ showLimitOptions?: boolean;
17
+ };
18
+ declare function SearchFilter(props: Props): React.JSX.Element;
19
+ export default SearchFilter;
20
+ //# sourceMappingURL=SearchFilter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchFilter.d.ts","sourceRoot":"","sources":["SearchFilter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAY3D,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAOvC,aAAK,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,qBAyHjC;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare 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":["SearchParams.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAQ1C,aAAK,iBAAiB,GAAG;IACvB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC,CAAA;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,KAAK,CAAC,YAAY,CAmBzE"}
package/package.json CHANGED
@@ -1,38 +1,39 @@
1
1
  {
2
2
  "name": "@gisce/react-ooui",
3
- "version": "1.5.2-alpha.1",
4
- "engines": {
5
- "node": "20.5.0"
6
- },
7
- "publishConfig": {
8
- "access": "public"
9
- },
3
+ "version": "1.5.2-rc.0",
10
4
  "files": [
11
5
  "dist",
12
6
  "src",
13
7
  "README.md"
14
8
  ],
9
+ "main": "./dist/react-ooui.umd.js",
15
10
  "module": "./dist/react-ooui.es.js",
16
11
  "types": "./dist/index.d.ts",
17
12
  "exports": {
18
13
  ".": {
19
- "import": "./dist/react-ooui.es.js"
14
+ "import": "./dist/react-ooui.es.js",
15
+ "require": "./dist/react-ooui.umd.js"
20
16
  }
21
17
  },
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
22
21
  "scripts": {
23
- "preinstall": "npx only-allow npm",
24
- "build": "tsc --noEmit && vite build",
25
- "preview": "npm run build && vite preview",
26
- "dev:vite": "while :; do tsc && vite build --watch --force; done",
27
- "dev:tsc": "tsc --noEmit --watch",
28
- "prepare": "husky install",
29
- "start": "concurrently npm:dev:*",
30
- "check": "lint-staged"
22
+ "preminor": "npm version preminor --preid rc",
23
+ "prerelease": "npm version prerelease --preid rc",
24
+ "prepatch": "npm version prepatch --preid rc",
25
+ "premajor": "npm version premajor --preid rc",
26
+ "start": "while :; do tsc && vite build --watch --force; done",
27
+ "build:tailwind": "postcss src/tailwind.css -o src/tailwind.generated.css",
28
+ "build": "tsc && vite build",
29
+ "test": "jest",
30
+ "storybook": "start-storybook -p 6006",
31
+ "build-storybook": "build-storybook"
31
32
  },
32
33
  "dependencies": {
33
34
  "@ant-design/plots": "^1.0.9",
34
35
  "@gisce/fiber-diagram": "^1.1.0-rc.3",
35
- "@gisce/ooui": "^0.22.3",
36
+ "@gisce/ooui": "^0.22.4-rc.0",
36
37
  "@gisce/react-formiga-components": "^1.0.9-rc.21",
37
38
  "@gisce/react-formiga-table": "^0.8.6",
38
39
  "@monaco-editor/react": "^4.4.5",
@@ -48,83 +49,51 @@
48
49
  "react-hotkeys-hook": "^3.4.4",
49
50
  "react-markdown": "^8.0.7",
50
51
  "react-measure": "^2.5.2",
51
- "styled-components": "5.3.5",
52
52
  "use-deep-compare-effect": "^1.8.1",
53
53
  "uuid": "^3.4.0",
54
54
  "validator": "^13.6.0"
55
55
  },
56
56
  "devDependencies": {
57
- "@semantic-release/exec": "6.0.3",
58
- "@semantic-release/git": "10.0.1",
59
- "@semantic-release/npm": "10.0.4",
57
+ "@babel/core": "^7.19.1",
58
+ "@storybook/addon-actions": "^6.5.12",
59
+ "@storybook/addon-essentials": "^6.5.12",
60
+ "@storybook/addon-interactions": "^6.5.12",
61
+ "@storybook/addon-knobs": "^6.4.0",
62
+ "@storybook/addon-links": "^6.5.12",
63
+ "@storybook/builder-vite": "^0.2.2",
64
+ "@storybook/react": "^6.5.12",
65
+ "@storybook/testing-library": "^0.0.13",
66
+ "@tailwindcss/postcss7-compat": "^2.0.2",
67
+ "@types/jest": "^26.0.15",
60
68
  "@types/lodash": "^4.14.170",
61
69
  "@types/md5": "^2.3.2",
70
+ "@types/node": "^12.0.0",
62
71
  "@types/react": "^17.0.1",
63
72
  "@types/react-dom": "^17.0.1",
64
73
  "@types/react-grid-layout": "^1.3.2",
65
74
  "@types/react-measure": "^2.0.7",
66
75
  "@types/react-responsive": "^8.0.2",
67
- "@types/rollup-plugin-peer-deps-external": "^2.2.2",
68
76
  "@types/scroll-into-view": "^1.16.0",
69
77
  "@types/styled-components": "^5.1.7",
70
78
  "@types/uuid": "^8.3.1",
71
79
  "@types/validator": "^13.6.3",
72
- "@typescript-eslint/eslint-plugin": "5.59.0",
73
- "@typescript-eslint/parser": "5.59.0",
74
- "@vitejs/plugin-react-swc": "3.3.2",
75
- "concurrently": "8.2.0",
76
- "eslint": "8.51.0",
77
- "eslint-config-prettier": "8.5.0",
78
- "eslint-config-standard-with-typescript": "24.0.0",
79
- "eslint-plugin-import": "2.28.0",
80
- "eslint-plugin-n": "15.6.0",
81
- "eslint-plugin-promise": "6.1.1",
82
- "eslint-plugin-react": "7.33.1",
83
- "eslint-plugin-react-hooks": "4.6.0",
84
- "husky": "8.0.3",
85
- "lint-staged": "13.2.3",
86
- "only-allow": "1.1.1",
87
- "prettier": "3.0.1",
80
+ "@vitejs/plugin-react": "^2.1.0",
81
+ "autoprefixer": "^9.8.6",
82
+ "babel-loader": "^8.2.5",
83
+ "jest": "^26.6.3",
84
+ "jest-enzyme": "^7.1.2",
85
+ "postcss": "^7.0.35",
86
+ "postcss-cli": "^7.1.0",
88
87
  "rollup-plugin-peer-deps-external": "^2.2.4",
89
- "semantic-release": "21.0.7",
90
- "typescript": "^5.0.4",
91
- "vite": "4.4.8",
92
- "vite-plugin-dts": "^3.6.0",
93
- "vite-plugin-package-version": "1.0.2",
94
- "vite-tsconfig-paths": "3.5.0"
88
+ "tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.0.2",
89
+ "ts-jest": "^26.4.4",
90
+ "typescript": "^4.0.3",
91
+ "vite": "^3.1.0",
92
+ "vite-plugin-dts": "^1.0.3"
95
93
  },
96
94
  "peerDependencies": {
97
95
  "react": "^17.0.1",
98
96
  "react-dom": "^17.0.1",
99
- "styled-components": "5.3.5"
100
- },
101
- "lint-staged": {
102
- "src/**/*.{js,jsx,ts,tsx}": "eslint --fix",
103
- "src/**/*.{js,jsx,ts,tsx,json,css,md}": "prettier --write"
104
- },
105
- "release": {
106
- "branches": [
107
- "master",
108
- {
109
- "name": "develop",
110
- "prerelease": "rc"
111
- },
112
- {
113
- "name": "alpha",
114
- "prerelease": true
115
- }
116
- ],
117
- "plugins": [
118
- "@semantic-release/commit-analyzer",
119
- "@semantic-release/release-notes-generator",
120
- [
121
- "@semantic-release/npm",
122
- {
123
- "npmPublish": true
124
- }
125
- ],
126
- "@semantic-release/github",
127
- "@semantic-release/git"
128
- ]
97
+ "styled-components": "^5.2.1"
129
98
  }
130
99
  }
@@ -141,7 +141,7 @@ function FormActionBar({ toolbar }: { toolbar: any }) {
141
141
  try {
142
142
  setRemovingItem?.(true);
143
143
 
144
- await ConnectionProvider.getHandler().deleteObjects({
144
+ await ConnectionProvider.getHandler().delete({
145
145
  model: currentModel!,
146
146
  ids: [currentId!],
147
147
  });
@@ -92,7 +92,7 @@ function TreeActionBar(props: Props) {
92
92
  try {
93
93
  setRemovingItem?.(true);
94
94
 
95
- await ConnectionProvider.getHandler().deleteObjects({
95
+ await ConnectionProvider.getHandler().delete({
96
96
  model: currentModel!,
97
97
  ids: selectedRowItems!.map((item) => item.id),
98
98
  });
@@ -5,9 +5,9 @@ import Field from "@/common/Field";
5
5
  import { WidgetProps } from "@/types";
6
6
  import { Date as DateOoui } from "@gisce/ooui";
7
7
  import dayjs from "dayjs";
8
+ const { useToken } = theme;
8
9
  import weekday from "dayjs/plugin/weekday";
9
10
  import localeData from "dayjs/plugin/localeData";
10
- const { useToken } = theme;
11
11
  dayjs.extend(weekday);
12
12
  dayjs.extend(localeData);
13
13
 
@@ -47,7 +47,7 @@ interface DatePickerInputProps {
47
47
  }
48
48
 
49
49
  const DatePickerInput: React.FC<DatePickerInputProps> = (
50
- props: DatePickerInputProps,
50
+ props: DatePickerInputProps
51
51
  ) => {
52
52
  const { value, onChange, ooui, showTime } = props;
53
53
  const { id, readOnly, required } = ooui as DateOoui;
@@ -1,5 +1,6 @@
1
1
  import styled from "styled-components";
2
- import React, { useContext, useState } from "react";
2
+ import { useContext, useState } from "react";
3
+ import React from "react";
3
4
  import { Spin } from "antd";
4
5
  import { LocaleContext, LocaleContextType } from "@/context/LocaleContext";
5
6
  import Link from "antd/es/typography/Link";
@@ -59,7 +60,7 @@ export const SelectAllRecordsRow = ({
59
60
  <span>
60
61
  {translations.recordsSelected.replace(
61
62
  "{numberOfSelectedRows}",
62
- numberOfVisibleSelectedRows.toString(),
63
+ numberOfVisibleSelectedRows.toString()
63
64
  ) + " "}
64
65
 
65
66
  {loading ? (
@@ -68,7 +69,7 @@ export const SelectAllRecordsRow = ({
68
69
  <Link onClick={handleClick} style={{ fontWeight: 600 }}>
69
70
  {translations.selectAllRecords.replace(
70
71
  "{totalRecords}",
71
- totalRecords.toString(),
72
+ totalRecords.toString()
72
73
  )}
73
74
  </Link>
74
75
  )}
@@ -79,7 +80,7 @@ export const SelectAllRecordsRow = ({
79
80
  <span style={{ fontWeight: 600 }}>
80
81
  {translations.allRecordsSelected.replace(
81
82
  "{totalRecords}",
82
- numberOfRealSelectedRows.toString(),
83
+ numberOfRealSelectedRows.toString()
83
84
  ) + " "}
84
85
  </span>
85
86
  );
@@ -59,14 +59,14 @@ const callRefreshValues = async (fns: any[]) => {
59
59
 
60
60
  const ContentRootProvider = (
61
61
  props: ContentRootProviderProps,
62
- ref: any,
62
+ ref: any
63
63
  ): any => {
64
64
  const { children, globalValues = {} } = props;
65
65
  const reportInProgressInterval = useRef<any>();
66
66
  const waitingForReport = useRef<boolean>();
67
67
  const [reportGenerating, setReportGenerating] = useState<boolean>(false);
68
68
  const tabManagerContext = useContext(
69
- TabManagerContext,
69
+ TabManagerContext
70
70
  ) as TabManagerContextType;
71
71
  const { openAction } = tabManagerContext || {};
72
72
  const onRefreshParentValues = useRef<any>([]);
@@ -82,7 +82,7 @@ const ContentRootProvider = (
82
82
  const [actionModalOptions, setActionModalOptions] = useState<ActionModalOpts>(
83
83
  {
84
84
  context: {},
85
- },
85
+ }
86
86
  );
87
87
 
88
88
  async function generateReport(options: GenerateReportOptions) {
@@ -103,7 +103,7 @@ const ContentRootProvider = (
103
103
 
104
104
  const { ids } = datas || {};
105
105
 
106
- const idsToExecute = ids || [];
106
+ let idsToExecute = ids || [];
107
107
 
108
108
  const reportContextParsed =
109
109
  typeof reportContext === "string"
@@ -182,12 +182,9 @@ const ContentRootProvider = (
182
182
  context,
183
183
  });
184
184
  } else if (type === "ir.actions.act_window") {
185
- return await runAction({ actionData, fields, values, context });
185
+ return await runAction({actionData, fields, values, context});
186
186
  } else if (type === "ir.actions.act_url") {
187
- window.open(
188
- stringFormat(actionData.url, { ...values, context }),
189
- "_blank",
190
- );
187
+ window.open(stringFormat(actionData.url, {...values, context}), "_blank");
191
188
  } else {
192
189
  showErrorDialog(`${type} action not supported`);
193
190
  return {};
@@ -278,7 +275,7 @@ const ContentRootProvider = (
278
275
  context: mergedContext,
279
276
  domain: parsedDomain,
280
277
  model: actionData.res_model,
281
- views,
278
+ views: views,
282
279
  title: actionData.name,
283
280
  initialView,
284
281
  action_id: actionData.id,
@@ -349,54 +346,52 @@ const ContentRootProvider = (
349
346
  });
350
347
  }
351
348
 
352
- return (
353
- <>
354
- <ContentRootContext.Provider
355
- value={{
356
- processAction,
357
- globalValues,
358
- }}
359
- >
360
- <>
361
- {children}
362
- <Modal
363
- title={t("generatingReport")}
364
- open={reportGenerating}
365
- footer={null}
366
- closable={false}
367
- centered
368
- maskClosable={false}
369
- >
370
- <Spin />
371
- </Modal>
372
- <FormModal
373
- buttonModal
374
- parentContext={actionModalOptions.context}
375
- model={actionModalOptions.model!}
376
- formView={actionModalOptions.formView}
377
- visible={actionModalVisible}
378
- onSubmitSucceed={onFormModalSucceed}
379
- onCancel={() => {
380
- callRefreshValues(onRefreshParentValues.current);
381
- onRefreshParentValues.current = [];
382
- setActionModalVisible(false);
383
- setActionModalOptions({
384
- domain: undefined,
385
- model: undefined,
386
- context: {},
387
- formView: undefined,
388
- actionData: undefined,
389
- });
390
- }}
391
- showFooter={false}
392
- actionDomain={actionModalOptions.domain}
393
- isMenuAction={actionModalOptions?.actionData !== undefined}
394
- actionData={actionModalOptions?.actionData}
395
- />
396
- </>
397
- </ContentRootContext.Provider>
398
- </>
399
- );
349
+ return (<>
350
+ <ContentRootContext.Provider
351
+ value={{
352
+ processAction,
353
+ globalValues,
354
+ }}
355
+ >
356
+ <>
357
+ {children}
358
+ <Modal
359
+ title={t("generatingReport")}
360
+ open={reportGenerating}
361
+ footer={null}
362
+ closable={false}
363
+ centered
364
+ maskClosable={false}
365
+ >
366
+ <Spin />
367
+ </Modal>
368
+ <FormModal
369
+ buttonModal
370
+ parentContext={actionModalOptions.context}
371
+ model={actionModalOptions.model!}
372
+ formView={actionModalOptions.formView}
373
+ visible={actionModalVisible}
374
+ onSubmitSucceed={onFormModalSucceed}
375
+ onCancel={() => {
376
+ callRefreshValues(onRefreshParentValues.current);
377
+ onRefreshParentValues.current = [];
378
+ setActionModalVisible(false);
379
+ setActionModalOptions({
380
+ domain: undefined,
381
+ model: undefined,
382
+ context: {},
383
+ formView: undefined,
384
+ actionData: undefined,
385
+ });
386
+ }}
387
+ showFooter={false}
388
+ actionDomain={actionModalOptions.domain}
389
+ isMenuAction={actionModalOptions?.actionData !== undefined}
390
+ actionData={actionModalOptions?.actionData}
391
+ />
392
+ </>
393
+ </ContentRootContext.Provider>
394
+ </>);
400
395
  };
401
396
 
402
397
  async function getViewsAndInitialView({
@@ -444,9 +439,7 @@ async function getViewsAndInitialView({
444
439
  };
445
440
  } else if (!view_id) {
446
441
  const type = view_mode.split(",")[0];
447
- const [retrievedViewId] = retriedViewData.find(
448
- ([_, viewType]) => viewType === type,
449
- )!;
442
+ const [retrievedViewId] = retriedViewData.find(([_, viewType]) => viewType === type)!;
450
443
  initialView = { id: retrievedViewId, type };
451
444
  } else {
452
445
  initialView = {
@@ -20,7 +20,7 @@ export type TabManagerContextType = {
20
20
  domain: any;
21
21
  context: any;
22
22
  model: string;
23
- views: any[];
23
+ views: Array<any>;
24
24
  title: string;
25
25
  target: string;
26
26
  initialView: InitialViewData;
@@ -69,8 +69,9 @@ export type TabManagerContextType = {
69
69
  setCurrentId?: (id?: number) => void;
70
70
  };
71
71
 
72
- export const TabManagerContext =
73
- React.createContext<TabManagerContextType | null>(null);
72
+ export const TabManagerContext = React.createContext<TabManagerContextType | null>(
73
+ null
74
+ );
74
75
 
75
76
  type TabManagerProviderProps = TabManagerContextType & {
76
77
  children: React.ReactNode;
@@ -23,7 +23,7 @@ export const calculateColumnsWidth = (
23
23
  maxWidthPerCell = 500
24
24
  ) => {
25
25
  if (columns.length === 0) {
26
- return { columns };
26
+ return columns;
27
27
  }
28
28
 
29
29
  // First we calculate the width for each column
@@ -8,7 +8,7 @@ export function getFilesize(base64string: string) {
8
8
 
9
9
  export async function getMimeType(base64string: string) {
10
10
  const mimeInfo = await fileTypeFromBuffer(
11
- Buffer.from(base64string, "base64"),
11
+ Buffer.from(base64string, "base64")
12
12
  );
13
13
  if (!mimeInfo) {
14
14
  return {
@@ -29,13 +29,13 @@ export const toBase64 = (file: File): Promise<string> =>
29
29
  });
30
30
 
31
31
  export function openBase64InNewTab(data: string, mimeType: string) {
32
- const byteCharacters = atob(data);
33
- const byteNumbers = new Array(byteCharacters.length);
34
- for (let i = 0; i < byteCharacters.length; i++) {
32
+ var byteCharacters = atob(data);
33
+ var byteNumbers = new Array(byteCharacters.length);
34
+ for (var i = 0; i < byteCharacters.length; i++) {
35
35
  byteNumbers[i] = byteCharacters.charCodeAt(i);
36
36
  }
37
- const byteArray = new Uint8Array(byteNumbers);
38
- const file = new Blob([byteArray], { type: mimeType + ";base64" });
39
- const fileURL = URL.createObjectURL(file);
37
+ var byteArray = new Uint8Array(byteNumbers);
38
+ var file = new Blob([byteArray], { type: mimeType + ";base64" });
39
+ var fileURL = URL.createObjectURL(file);
40
40
  window.open(fileURL);
41
41
  }