@gisce/react-ooui 2.0.0-alpha.3 → 2.0.0-alpha.30

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 (397) 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 +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 +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 +9872 -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 +257 -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 +2 -2
  310. package/src/actionbar/NewButton.tsx +1 -1
  311. package/src/actionbar/TreeActionBar.tsx +2 -2
  312. package/src/context/ActionViewContext.tsx +8 -4
  313. package/src/context/DashboardActionContext.tsx +2 -3
  314. package/src/context/FormModalContext.tsx +2 -3
  315. package/src/context/LocaleContext.tsx +1 -1
  316. package/src/context/One2manyContext.tsx +3 -4
  317. package/src/helpers/containerHelper.ts +1 -1
  318. package/src/helpers/dynamicColumnsHelper.ts +2 -2
  319. package/src/helpers/iconMapper.ts +5 -5
  320. package/src/helpers/logInfoHelper.tsx +8 -6
  321. package/src/helpers/timeHelper.ts +2 -2
  322. package/src/hooks/useEffectDebugger.ts +2 -2
  323. package/src/hooks/useExport.ts +8 -8
  324. package/src/hooks/useWindowDimensions.ts +1 -1
  325. package/src/locales/ca_ES.tsx +1 -0
  326. package/src/locales/en_US.tsx +1 -0
  327. package/src/locales/es_ES.tsx +2 -0
  328. package/src/stories/Time.stories.tsx +2 -3
  329. package/src/stories/Utils.stories.tsx +1 -3
  330. package/src/stories/containers/Group.stories.tsx +2 -3
  331. package/src/stories/containers/Notebook.stories.tsx +0 -6
  332. package/src/stories/custom/Avatar.stories.tsx +2 -6
  333. package/src/stories/custom/Comments.stories.tsx +32 -25
  334. package/src/stories/forms/FormWithLinks.stories.tsx +1 -2
  335. package/src/stories/forms/ModContractForm.stories.tsx +1 -0
  336. package/src/stories/forms/PreferencesForm.stories.tsx +1 -2
  337. package/src/stories/mocks/mockProvider.ts +5 -2
  338. package/src/stories/mocks/models/attachment.ts +1 -2
  339. package/src/stories/mocks/models/butlleti.ts +249 -297
  340. package/src/stories/mocks/models/company.ts +2 -4
  341. package/src/stories/mocks/models/cups.ts +18 -1
  342. package/src/stories/mocks/models/document.ts +2 -4
  343. package/src/stories/mocks/models/factura.ts +14 -28
  344. package/src/stories/mocks/models/form_with_gridfiber.ts +2 -4
  345. package/src/stories/mocks/models/hist_autoconsum.ts +2 -4
  346. package/src/stories/mocks/models/lead.ts +8 -16
  347. package/src/stories/mocks/models/modcontractual.ts +229 -83
  348. package/src/stories/mocks/models/partner.ts +20 -40
  349. package/src/stories/mocks/models/polissa.ts +6 -12
  350. package/src/stories/mocks/models/res_partner_category.ts +3 -3
  351. package/src/stories/mocks/models/signatura.ts +135 -195
  352. package/src/stories/mocks/models/switching.ts +2 -4
  353. package/src/stories/ui/GoToResourceModal.stories.tsx +3 -2
  354. package/src/stories/views/Tree.stories.jsx +3 -5
  355. package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +15 -30
  356. package/src/types/index.ts +1 -1
  357. package/src/ui/ConfirmDialog.tsx +1 -1
  358. package/src/ui/GoToResourceModal.tsx +8 -7
  359. package/src/views/ActionView.tsx +37 -30
  360. package/src/views/CurrentTabContent.tsx +1 -1
  361. package/src/views/TabContent.tsx +1 -1
  362. package/src/views/TabSelector.tsx +1 -1
  363. package/src/views/actionViews/DashboardActionView.tsx +1 -1
  364. package/src/views/actionViews/GraphActionView.tsx +1 -1
  365. package/src/views/actionViews/TreeActionView.tsx +2 -2
  366. package/src/widgets/WidgetFactory.tsx +1 -1
  367. package/src/widgets/base/Button.tsx +1 -1
  368. package/src/widgets/base/Float.tsx +0 -1
  369. package/src/widgets/base/FloatTime.tsx +1 -1
  370. package/src/widgets/base/Integer.tsx +0 -1
  371. package/src/widgets/base/Reference.tsx +1 -1
  372. package/src/widgets/base/ReferenceTree.tsx +1 -1
  373. package/src/widgets/base/Separator.tsx +3 -4
  374. package/src/widgets/base/many2one/Many2oneSuffixModal.tsx +2 -2
  375. package/src/widgets/base/one2many/One2many.tsx +2 -2
  376. package/src/widgets/base/one2many/One2manyInput.tsx +1 -1
  377. package/src/widgets/custom/Avatar.tsx +15 -7
  378. package/src/widgets/custom/Markdown.tsx +18 -8
  379. package/src/widgets/custom/MultiCheckbox.tsx +1 -1
  380. package/src/widgets/custom/Radio.tsx +2 -4
  381. package/src/widgets/custom/Steps.tsx +10 -9
  382. package/src/widgets/custom/Switch.tsx +1 -5
  383. package/src/widgets/custom/Tags.tsx +1 -1
  384. package/src/widgets/modals/SearchModal.tsx +31 -29
  385. package/src/widgets/modals/TranslationModal.tsx +3 -3
  386. package/src/widgets/views/Dashboard/Dashboard.tsx +3 -3
  387. package/src/widgets/views/DashboardGrid/DashboardGrid.tsx +3 -3
  388. package/src/widgets/views/Form.tsx +2 -2
  389. package/src/widgets/views/Graph/Graph.tsx +1 -1
  390. package/src/widgets/views/Graph/GraphChart.tsx +1 -1
  391. package/src/widgets/views/Graph/GraphDefaults.ts +2 -2
  392. package/src/widgets/views/Graph/useGraphData.tsx +1 -1
  393. package/src/widgets/views/SearchTree.tsx +2 -2
  394. package/src/widgets/views/searchFilter/SearchBottomBar.tsx +2 -6
  395. package/src/widgets/views/searchFilter/SearchField.tsx +5 -1
  396. package/src/widgets/views/searchFilter/SearchFilter.tsx +1 -1
  397. 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.3",
3
+ "version": "2.0.0-alpha.30",
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.5",
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
 
@@ -16,7 +16,7 @@ function NewButton(props: Props) {
16
16
  const { disabled = false } = props;
17
17
 
18
18
  const { formHasChanges, onNewClicked: onNewClickedProps } = useContext(
19
- ActionViewContext
19
+ ActionViewContext,
20
20
  ) as ActionViewContextType;
21
21
  const { t, lang } = useContext(LocaleContext) as LocaleContextType;
22
22
 
@@ -69,7 +69,7 @@ function TreeActionBar(props: Props) {
69
69
  const { previewFeatures } = useContext(ConfigContext);
70
70
  const { t, lang } = useContext(LocaleContext) as LocaleContextType;
71
71
  const contentRootContext = useContext(
72
- ContentRootContext
72
+ ContentRootContext,
73
73
  ) as ContentRootContextType;
74
74
  const { processAction } = contentRootContext || {};
75
75
  const [exportModalVisible, setExportModalVisible] = useState(false);
@@ -357,7 +357,7 @@ function TreeActionBar(props: Props) {
357
357
  model={currentModel!}
358
358
  domain={mergeParams(
359
359
  searchTreeRef?.current?.getDomain() || [],
360
- searchParams || []
360
+ searchParams || [],
361
361
  )}
362
362
  limit={limit}
363
363
  totalRegisters={totalItems || 0}
@@ -48,7 +48,7 @@ export type ActionViewContextType = {
48
48
  setSearchTreeNameSearch?: (searchString?: string) => void;
49
49
  previousView?: View;
50
50
  setPreviousView?: (view: View) => void;
51
- goToResourceId?: (id: number) => Promise<void>;
51
+ goToResourceId?: (ids: number[]) => Promise<void>;
52
52
  searchValues?: any;
53
53
  setSearchValues?: (value: any) => void;
54
54
  limit?: number;
@@ -105,7 +105,7 @@ const ActionViewProvider = (props: ActionViewProviderProps): any => {
105
105
  const [previousView, setPreviousView] = useState<View>();
106
106
  const [searchValues, setSearchValues] = useState<any>({});
107
107
  const [limit, setLimit] = useState<number>(
108
- limitProps !== undefined ? limitProps : DEFAULT_SEARCH_LIMIT
108
+ limitProps !== undefined ? limitProps : DEFAULT_SEARCH_LIMIT,
109
109
  );
110
110
  const [title, setTitle] = useState<string>(titleProps);
111
111
 
@@ -125,7 +125,9 @@ const ActionViewProvider = (props: ActionViewProviderProps): any => {
125
125
  setPreviousView(availableViews[0]);
126
126
  } else if (availableViews.length > 1) {
127
127
  setPreviousView(
128
- availableViews.filter((view) => view.view_id !== currentView.view_id)[0]
128
+ availableViews.filter(
129
+ (view) => view.view_id !== currentView.view_id,
130
+ )[0],
129
131
  );
130
132
  }
131
133
  }, [availableViews]);
@@ -136,7 +138,9 @@ const ActionViewProvider = (props: ActionViewProviderProps): any => {
136
138
  availableViews.length > 1
137
139
  ) {
138
140
  setPreviousView(
139
- availableViews.filter((view) => view.view_id !== currentView.view_id)[0]
141
+ availableViews.filter(
142
+ (view) => view.view_id !== currentView.view_id,
143
+ )[0],
140
144
  );
141
145
  }
142
146
  }, [currentView]);
@@ -10,9 +10,8 @@ export type DashboardActionContextType = {
10
10
  setMoveItemsEnabled: (value: boolean) => void;
11
11
  };
12
12
 
13
- export const DashboardActionContext = React.createContext<DashboardActionContextType | null>(
14
- null
15
- );
13
+ export const DashboardActionContext =
14
+ React.createContext<DashboardActionContextType | null>(null);
16
15
 
17
16
  type DashboardActionProviderProps = {
18
17
  children: React.ReactNode;
@@ -4,9 +4,8 @@ export type FormModalContextType = {
4
4
  setTitle?: (title: string) => void;
5
5
  };
6
6
 
7
- export const FormModalContext = React.createContext<FormModalContextType | null>(
8
- null
9
- );
7
+ export const FormModalContext =
8
+ React.createContext<FormModalContextType | null>(null);
10
9
 
11
10
  type FormModalProviderProps = FormModalContextType & {
12
11
  children: React.ReactNode;
@@ -15,7 +15,7 @@ export type LocaleContextType = {
15
15
  };
16
16
 
17
17
  export const LocaleContext = React.createContext<LocaleContextType | null>(
18
- null
18
+ null,
19
19
  );
20
20
 
21
21
  type LocaleContextProps = {
@@ -11,7 +11,7 @@ export type One2manyContextType = {
11
11
  };
12
12
 
13
13
  export const One2manyContext = React.createContext<One2manyContextType | null>(
14
- null
14
+ null,
15
15
  );
16
16
 
17
17
  const One2manyProvider = ({
@@ -23,9 +23,8 @@ const One2manyProvider = ({
23
23
  }): any => {
24
24
  const [currentView, setCurrentView] = useState<ViewType>(initialView);
25
25
  const [itemIndex, setItemIndex] = useState<number>(0);
26
- const [manualTriggerChange, setManualTriggerChange] = useState<boolean>(
27
- false
28
- );
26
+ const [manualTriggerChange, setManualTriggerChange] =
27
+ useState<boolean>(false);
29
28
 
30
29
  return (
31
30
  <One2manyContext.Provider
@@ -72,7 +72,7 @@ const expandWidgetsIfNeeded = ({
72
72
 
73
73
  const getSingleRowTemplateColumns = (
74
74
  row: Widget[],
75
- numberOfColumns: number
75
+ numberOfColumns: number,
76
76
  ) => {
77
77
  const gridOptions = row.map((item: Widget) => {
78
78
  if (item instanceof Label && (item as Label).fieldForLabel) {
@@ -20,7 +20,7 @@ const getTextWidth = (text: string, font = "14px -apple-system") => {
20
20
  export const calculateColumnsWidth = (
21
21
  columns: any,
22
22
  source: any,
23
- maxWidthPerCell = 500
23
+ maxWidthPerCell = 500,
24
24
  ) => {
25
25
  if (columns.length === 0) {
26
26
  return { columns };
@@ -32,7 +32,7 @@ export const calculateColumnsWidth = (
32
32
  const columnsWithWidth = columns.map((column: any) =>
33
33
  Object.assign(column, {
34
34
  width: getTextWidth(column.title),
35
- })
35
+ }),
36
36
  );
37
37
 
38
38
  // Since we have a minimum width (column's width already calculated),
@@ -102,7 +102,7 @@ const iconMapping: { [key: string]: string } = {
102
102
 
103
103
  export default (
104
104
  key: string,
105
- props?: { className?: any; style: CSSProperties }
105
+ props?: { className?: any; style: CSSProperties },
106
106
  ) => {
107
107
  if (key.indexOf("gtk-") !== -1) {
108
108
  const rootIcon = key.replace("gtk-", "").replace(/\-/g, "_");
@@ -122,15 +122,15 @@ function toCamelCase(key: string): string {
122
122
  .map((word) =>
123
123
  word.replace(
124
124
  /\w\S*/g,
125
- (w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()
126
- )
125
+ (w) => w.charAt(0).toUpperCase() + w.slice(1).toLowerCase(),
126
+ ),
127
127
  )
128
128
  .join("")}`;
129
129
  }
130
130
 
131
131
  function getIconForKey(
132
132
  key: string,
133
- props?: { className?: any; style: CSSProperties }
133
+ props?: { className?: any; style: CSSProperties },
134
134
  ) {
135
135
  let IconCamelCase = key.charAt(0).toUpperCase() + key.slice(1); // Capitalize first letter
136
136
  if (IconCamelCase.indexOf("-") !== -1) {
@@ -150,7 +150,7 @@ function getIconForKey(
150
150
  const TablerIcon = () =>
151
151
  React.createElement(TablerIcons[tablerKey] as any, {
152
152
  fill: "transparent",
153
- size: props?.style?.fontSize || 17
153
+ size: props?.style?.fontSize || 17,
154
154
  });
155
155
  const CustomIcon = () =>
156
156
  React.createElement(Icon, {
@@ -5,12 +5,14 @@ import showInfo from "@/ui/InfoDialog";
5
5
  async function showLogInfo(
6
6
  model: string,
7
7
  currentId: number,
8
- translateFn: Function
8
+ translateFn: Function,
9
9
  ) {
10
- const logInfo = ((await ConnectionProvider.getHandler().getLogInfo({
11
- model,
12
- ids: [currentId],
13
- })) as any)[0];
10
+ const logInfo = (
11
+ (await ConnectionProvider.getHandler().getLogInfo({
12
+ model,
13
+ ids: [currentId],
14
+ })) as any
15
+ )[0];
14
16
 
15
17
  const { create_date, create_uid, id, write_date, write_uid } = logInfo;
16
18
 
@@ -21,7 +23,7 @@ async function showLogInfo(
21
23
  {translateFn("creationDate") + ": " + create_date} <br />
22
24
  {translateFn("lastUpdatedBy") + ": " + write_uid[1]} <br />
23
25
  {translateFn("lastUpdatedDate") + ": " + write_date}
24
- </div>
26
+ </div>,
25
27
  );
26
28
  }
27
29
 
@@ -8,7 +8,7 @@ function parseStringToFloat(text?: string) {
8
8
  const splitted = text.trim().split(":");
9
9
  return (
10
10
  Math.round(
11
- (parseInt(splitted[0]) + parseInt(splitted[1]) / 60.0) * 10000
11
+ (parseInt(splitted[0]) + parseInt(splitted[1]) / 60.0) * 10000,
12
12
  ) / 10000
13
13
  );
14
14
  } else {
@@ -55,4 +55,4 @@ function parseFloatToString(num?: number) {
55
55
  return finalString;
56
56
  }
57
57
 
58
- export { parseStringToFloat, parseFloatToString };
58
+ export { parseStringToFloat, parseFloatToString };