@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
@@ -76,7 +76,7 @@ type SearchResponse = {
76
76
  };
77
77
 
78
78
  type SearchRequest = {
79
- params: any[];
79
+ params: Array<any>;
80
80
  limit?: number;
81
81
  offset?: number;
82
82
  model: string;
@@ -84,7 +84,6 @@ type SearchRequest = {
84
84
  context?: any;
85
85
  attrs?: any;
86
86
  order?: number | string | null;
87
- fieldsToRetrieve?: string[];
88
87
  };
89
88
 
90
89
  type SearchAllIdsRequest = SearchCountRequest & {
@@ -92,7 +91,7 @@ type SearchAllIdsRequest = SearchCountRequest & {
92
91
  };
93
92
 
94
93
  type SearchCountRequest = {
95
- params: any[];
94
+ params: Array<any>;
96
95
  model: string;
97
96
  context?: any;
98
97
  };
@@ -252,102 +251,52 @@ type ExportDataOptions = {
252
251
  };
253
252
 
254
253
  type ConnectionProviderType = {
255
- getActionStringForModel: (
256
- model: string,
257
- requestConfig?: any,
258
- ) => Promise<string>;
259
- getViewsForAction: (
260
- {
261
- action,
262
- context,
263
- }: {
264
- action: string;
265
- context?: any;
266
- },
267
- requestConfig?: any,
268
- ) => Promise<ViewData>;
254
+ getActionStringForModel: (model: string) => Promise<string>;
255
+ getViewsForAction: ({
256
+ action,
257
+ context,
258
+ }: {
259
+ action: string;
260
+ context?: any;
261
+ }) => Promise<ViewData>;
269
262
  getView: (
270
- options: GetViewRequest,
271
- requestConfig?: any,
263
+ options: GetViewRequest
272
264
  ) => Promise<FormView | TreeView | GraphView>;
273
- getFields: (options: GetFieldsRequest, requestConfig?: any) => Promise<any>;
274
- searchAllIds: (
275
- options: SearchAllIdsRequest,
276
- requestConfig?: any,
277
- ) => Promise<number[]>;
278
- searchCount: (
279
- options: SearchCountRequest,
280
- requestConfig?: any,
281
- ) => Promise<number>;
265
+ getFields: (options: GetFieldsRequest) => Promise<any>;
266
+ searchAllIds: (options: SearchAllIdsRequest) => Promise<number[]>;
267
+ searchCount: (options: SearchCountRequest) => Promise<number>;
282
268
  search: (options: SearchRequest) => Promise<any[]>;
283
- searchForTree: (
284
- options: SearchRequest,
285
- requestConfig?: any,
286
- ) => Promise<SearchResponse>;
287
- update: (options: UpdateObjectRequest, requestConfig?: any) => Promise<any>;
288
- create: (options: CreateObjectRequest, requestConfig?: any) => Promise<any>;
289
- deleteObjects: (
290
- options: DeleteObjectsRequest,
291
- requestConfig?: any,
292
- ) => Promise<any>;
293
- execute: (options: ExecuteRequest, requestConfig?: any) => Promise<any>;
294
- readObjects: (
295
- options: ReadObjectsRequest,
296
- requestConfig?: any,
297
- ) => Promise<any>;
298
- readEvalUiObjects: (
299
- options: ReadEvalUiObjectsRequest,
300
- requestConfig?: any,
301
- ) => Promise<any>;
302
- parseCondition: (
303
- options: ParseConditionRequest,
304
- requestConfig?: any,
305
- ) => Promise<any>;
306
- executeWorkflow: (
307
- options: ExecuteRequest,
308
- requestConfig?: any,
309
- ) => Promise<any>;
310
- createReport: (
311
- options: CreateReportRequest,
312
- requestConfig?: any,
313
- ) => Promise<any>;
314
- getReport: (options: GetReportRequest, requestConfig?: any) => Promise<any>;
315
- executeOnChange: (
316
- options: ExecuteOnChangeRequest,
317
- requestConfig?: any,
318
- ) => Promise<any>;
319
- defaultGet: (options: DefaultGetRequest, requestConfig?: any) => Promise<any>;
320
- getActionData: (
321
- {
322
- action,
323
- context,
324
- }: {
325
- action: string;
326
- context?: any;
327
- },
328
- requestConfig?: any,
329
- ) => Promise<any>;
330
- nameSearch: (options: NameSearchRequest, requestConfig?: any) => Promise<any>;
331
- duplicate: (options: DuplicateRequest, requestConfig?: any) => Promise<any>;
332
- evalDomain: (options: EvalDomainRequest, requestConfig?: any) => Promise<any>;
333
- getLogInfo: (options: GetLogInfoRequest, requestConfig?: any) => Promise<any>;
269
+ searchForTree: (options: SearchRequest) => Promise<SearchResponse>;
270
+ update: (options: UpdateObjectRequest) => Promise<any>;
271
+ create: (options: CreateObjectRequest) => Promise<any>;
272
+ delete: (options: DeleteObjectsRequest) => Promise<any>;
273
+ execute: (options: ExecuteRequest) => Promise<any>;
274
+ readObjects: (options: ReadObjectsRequest) => Promise<any>;
275
+ readEvalUiObjects: (options: ReadEvalUiObjectsRequest) => Promise<any>;
276
+ parseCondition: (options: ParseConditionRequest) => Promise<any>;
277
+ executeWorkflow: (options: ExecuteRequest) => Promise<any>;
278
+ createReport: (options: CreateReportRequest) => Promise<any>;
279
+ getReport: (options: GetReportRequest) => Promise<any>;
280
+ executeOnChange: (options: ExecuteOnChangeRequest) => Promise<any>;
281
+ defaultGet: (options: DefaultGetRequest) => Promise<any>;
282
+ getActionData: ({
283
+ action,
284
+ context,
285
+ }: {
286
+ action: string;
287
+ context?: any;
288
+ }) => Promise<any>;
289
+ nameSearch: (options: NameSearchRequest) => Promise<any>;
290
+ duplicate: (options: DuplicateRequest) => Promise<any>;
291
+ evalDomain: (options: EvalDomainRequest) => Promise<any>;
292
+ getLogInfo: (options: GetLogInfoRequest) => Promise<any>;
334
293
  isShortcutFavorite: (
335
- options: IsShortcutFavoriteOptions,
336
- requestConfig?: any,
294
+ options: IsShortcutFavoriteOptions
337
295
  ) => Promise<number | boolean>;
338
- removeFavourite: (
339
- { shortcut_id }: { shortcut_id: number },
340
- requestConfig?: any,
341
- ) => Promise<void>;
342
- addFavourite: (
343
- options: IsShortcutFavoriteOptions,
344
- requestConfig?: any,
345
- ) => Promise<void>;
346
- treeButOpen: (
347
- options: TreeButOpenOptions,
348
- requestConfig?: any,
349
- ) => Promise<any>;
350
- exportData: (options: ExportDataOptions, requestConfig?: any) => Promise<any>;
296
+ removeFavourite: ({ shortcut_id }: { shortcut_id: number }) => Promise<void>;
297
+ addFavourite: (options: IsShortcutFavoriteOptions) => Promise<void>;
298
+ treeButOpen: (options: TreeButOpenOptions) => Promise<any>;
299
+ exportData: (options: ExportDataOptions) => Promise<any>;
351
300
  };
352
301
 
353
302
  type ViewType = "tree" | "form" | "dashboard" | "graph" | "calendar";
@@ -7,7 +7,8 @@ import {
7
7
  FormOutlined,
8
8
  EditOutlined,
9
9
  } from "@ant-design/icons";
10
- import { Button, Col, Row, Spin, Tooltip, theme, Menu, Dropdown } from "antd";
10
+ import { Button, Col, Row, Spin, Tooltip, theme } from "antd";
11
+ import { Menu, Dropdown } from "antd";
11
12
  import showErrorDialog from "@/ui/ActionErrorDialog";
12
13
  import {
13
14
  TabManagerContext,
@@ -60,7 +61,7 @@ const FavouriteButton = (props: Props) => {
60
61
  const { token } = useToken();
61
62
 
62
63
  const tabManagerContext = useContext(
63
- TabManagerContext,
64
+ TabManagerContext
64
65
  ) as TabManagerContextType;
65
66
  const {
66
67
  openShortcut,
@@ -82,9 +82,8 @@ function ActionView(props: Props, ref: any) {
82
82
  ? (res_id as number)
83
83
  : undefined;
84
84
 
85
- const [currentId, setCurrentIdInternal] = useState<number | undefined>(
86
- res_id_parsed,
87
- );
85
+ const [currentId, setCurrentIdInternal] =
86
+ useState<number | undefined>(res_id_parsed);
88
87
  const [selectedRowItems, setSelectedRowItems] = useState<any[]>([]);
89
88
  const [currentItemIndex, setCurrentItemIndex] = useState<number>();
90
89
  const [results, setResults] = useState<any>([]);
@@ -96,13 +95,13 @@ function ActionView(props: Props, ref: any) {
96
95
  useState<boolean>(false);
97
96
  const [searchTreeNameSearch, setSearchTreeNameSearch] = useState<string>();
98
97
 
99
- const { t } = (useContext(LocaleContext) as LocaleContextType) || {};
98
+ const { t } = useContext(LocaleContext) as LocaleContextType;
100
99
 
101
100
  const formRef = useRef();
102
101
  const searchTreeRef = useRef();
103
102
 
104
103
  const tabManagerContext = useContext(
105
- TabManagerContext,
104
+ TabManagerContext
106
105
  ) as TabManagerContextType;
107
106
  const {
108
107
  setCurrentView: setCurrentViewTabContext,
@@ -119,7 +118,7 @@ function ActionView(props: Props, ref: any) {
119
118
  event.preventDefault();
120
119
  handleGoToRecordShortcut();
121
120
  },
122
- [activeKey, tabs, currentView, currentItemIndex, results],
121
+ [activeKey, tabs, currentView, currentItemIndex, results]
123
122
  );
124
123
 
125
124
  function setCurrentId(id?: number) {
@@ -171,7 +170,7 @@ function ActionView(props: Props, ref: any) {
171
170
 
172
171
  const [, viewType] = view.viewTuple;
173
172
 
174
- const viewInfo = view.info;
173
+ let viewInfo = view.info;
175
174
 
176
175
  switch (viewType) {
177
176
  case "dashboard": {
@@ -229,16 +228,16 @@ function ActionView(props: Props, ref: any) {
229
228
  break;
230
229
  }
231
230
  }
232
- let currentViewToAssign;
231
+ let currentViewToAssign = undefined;
233
232
 
234
233
  if (!initialView && viewDataRetrieved.find((v) => v.type === "tree")) {
235
234
  const treeView: TreeView = viewDataRetrieved.find(
236
- (v) => v.type === "tree",
235
+ (v) => v.type === "tree"
237
236
  ) as TreeView;
238
237
  currentViewToAssign = treeView;
239
238
  } else if (!initialView) {
240
239
  const formView: TreeView = viewDataRetrieved.find(
241
- (v) => v.type === "form",
240
+ (v) => v.type === "form"
242
241
  ) as TreeView;
243
242
  currentViewToAssign = formView;
244
243
  } else {
@@ -254,7 +253,7 @@ function ActionView(props: Props, ref: any) {
254
253
 
255
254
  if (!currentViewToAssign) {
256
255
  showErrorDialog(
257
- `Error determining the first view to show for model ${model}.\nPlease, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`,
256
+ `Error determining the first view to show for model ${model}.\nPlease, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`
258
257
  );
259
258
  onRemoveTab?.(tabKey);
260
259
  }
@@ -458,7 +457,7 @@ function ActionView(props: Props, ref: any) {
458
457
  } else {
459
458
  setCurrentId(undefined);
460
459
  const formView: FormView = availableViews.find(
461
- (v) => v.type === "form",
460
+ (v) => v.type === "form"
462
461
  ) as FormView;
463
462
  setCurrentView(formView);
464
463
  }
@@ -10,7 +10,8 @@ import Welcome from "./Welcome";
10
10
  import TabManagerProvider from "@/context/TabManagerContext";
11
11
  import ActionView from "./ActionView";
12
12
  import { parseContext } from "@gisce/ooui";
13
- import LocaleContextProvider, { tForLang } from "@/context/LocaleContext";
13
+ import LocaleContextProvider from "@/context/LocaleContext";
14
+ import { tForLang } from "@/context/LocaleContext";
14
15
  import { ShortcutApi } from "@/ui/FavouriteButton";
15
16
  import showErrorDialog from "@/ui/ActionErrorDialog";
16
17
  import { InitialViewData, ViewType } from "@/types";
@@ -153,7 +154,7 @@ function RootView(props: RootViewProps, ref: any) {
153
154
 
154
155
  if (initialViewType) {
155
156
  const [id, type] = finalViews.find(
156
- ([_, type]) => type === initialViewType,
157
+ ([_, type]) => type === initialViewType
157
158
  );
158
159
  initialView = { id, type };
159
160
  } else {
@@ -244,7 +245,7 @@ function RootView(props: RootViewProps, ref: any) {
244
245
 
245
246
  const parsedDomain = domain
246
247
  ? await ConnectionProvider.getHandler().evalDomain({
247
- domain,
248
+ domain: domain,
248
249
  values: transformPlainMany2Ones({
249
250
  fields,
250
251
  values: { ...values, ...globalValues },
@@ -402,7 +403,7 @@ function RootView(props: RootViewProps, ref: any) {
402
403
  domain: any;
403
404
  context: any;
404
405
  model: string;
405
- views: any[];
406
+ views: Array<any>;
406
407
  title: string;
407
408
  target: string;
408
409
  initialView: InitialViewData;
@@ -483,7 +484,7 @@ function RootView(props: RootViewProps, ref: any) {
483
484
  activeKey={activeKey}
484
485
  onRemoveTab={async (key: string) => {
485
486
  const canWeCloseFn = tabViewsCloseFunctions.current.get(
486
- key as string,
487
+ key as string
487
488
  );
488
489
  const canWeClose = await canWeCloseFn?.();
489
490
 
@@ -2,6 +2,7 @@ import React, { useRef, useContext } from "react";
2
2
  import { Row, Col, Button, Input, Space, theme } from "antd";
3
3
  import Field from "@/common/Field";
4
4
  import { Binary as BinaryOoui } from "@gisce/ooui";
5
+ const { useToken } = theme;
5
6
  import ButtonWithTooltip from "@/common/ButtonWithTooltip";
6
7
  import {
7
8
  FolderOpenOutlined,
@@ -18,7 +19,6 @@ import {
18
19
  openBase64InNewTab,
19
20
  toBase64,
20
21
  } from "@/helpers/filesHelper";
21
- const { useToken } = theme;
22
22
 
23
23
  type Props = {
24
24
  ooui: BinaryOoui;
@@ -68,7 +68,7 @@ export const BinaryInput = (props: BinaryInputProps) => {
68
68
  const name = getFieldValue("name");
69
69
 
70
70
  downloadLink.href = linkSource;
71
- downloadLink.download = fileName || name;
71
+ downloadLink.download = fileName || name;
72
72
  downloadLink.click();
73
73
  }
74
74
 
@@ -1,9 +1,10 @@
1
1
  import React from "react";
2
- import { Checkbox as AntCheckbox, theme } from "antd";
2
+ import { Checkbox as AntCheckbox } from "antd";
3
3
  import styled from "styled-components";
4
4
 
5
5
  import Field from "@/common/Field";
6
6
  import { WidgetProps } from "@/types";
7
+ import { theme } from "antd";
7
8
 
8
9
  const { defaultAlgorithm, defaultSeed } = theme;
9
10
 
@@ -3,9 +3,9 @@ import { InputNumber, theme } from "antd";
3
3
  import Field from "@/common/Field";
4
4
  import { Float as FloatOoui } from "@gisce/ooui";
5
5
  import { WidgetProps } from "@/types";
6
+ const { useToken } = theme;
6
7
 
7
8
  import { FormContext, FormContextType } from "@/context/FormContext";
8
- const { useToken } = theme;
9
9
 
10
10
  export const Float = (props: WidgetProps) => {
11
11
  const { ooui } = props;
@@ -33,10 +33,10 @@ export const Integer = (props: IntegerProps) => {
33
33
  }
34
34
 
35
35
  if (typeof value === "string" && !isNaN(parseFloat(value))) {
36
- const truncatedValue = Math.trunc(parseFloat(value));
36
+ let truncatedValue = Math.trunc(parseFloat(value));
37
37
  return `${truncatedValue}`.replace(/[^0-9\-]+/g, "");
38
38
  } else if (typeof value === "number") {
39
- const truncatedValue = Math.trunc(value);
39
+ let truncatedValue = Math.trunc(value);
40
40
  return `${truncatedValue}`.replace(/[^0-9\-]+/g, "");
41
41
  }
42
42
 
@@ -22,10 +22,10 @@ const Label = (props: Props) => {
22
22
  const { ooui, align, responsiveBehaviour } = props;
23
23
  const { label, tooltip, fieldForLabel, labelSize, labelType } =
24
24
  ooui as LabelOoui;
25
- const addColon = fieldForLabel !== null;
25
+ const addColon = fieldForLabel !== null ? true : false;
26
26
  const labelText = addColon && label.length > 1 ? label + " :" : label;
27
27
  const responsiveAlign = responsiveBehaviour ? "left" : "right";
28
- const labelAlgin = align || (fieldForLabel ? responsiveAlign : "left");
28
+ const labelAlgin = align ? align : fieldForLabel ? responsiveAlign : "left";
29
29
  const { token } = useToken();
30
30
 
31
31
  const TextType = labelSize === undefined ? Text : Title;
@@ -36,16 +36,16 @@ const Label = (props: Props) => {
36
36
  >
37
37
  {tooltip && (
38
38
  <Tooltip title={tooltip}>
39
- <QuestionCircleOutlined
40
- className="pr-1 text-xs"
41
- style={{
42
- color: token.colorPrimary,
43
- }}
44
- />
39
+ <QuestionCircleOutlined className="pr-1 text-xs" style={{
40
+ color: token.colorPrimary
41
+ }} />
45
42
  </Tooltip>
46
43
  )}
47
44
  <span className="pr-2">
48
- <TextType level={labelSize} type={labelType as any}>
45
+ <TextType
46
+ level={labelSize}
47
+ type={labelType as any}
48
+ >
49
49
  <Interweave content={labelText} />
50
50
  </TextType>
51
51
  </span>
@@ -74,11 +74,7 @@ export const LinkInput = (props: LinkInputProps) => {
74
74
  <Col flex="auto">
75
75
  {showInput ? (
76
76
  <Input
77
- style={{
78
- borderTopLeftRadius: 0,
79
- borderBottomLeftRadius: 0,
80
- ...requiredStyle,
81
- }}
77
+ style={{ borderTopLeftRadius: 0, borderBottomLeftRadius: 0, ...requiredStyle }}
82
78
  id={id}
83
79
  onChange={onValueStringChange}
84
80
  value={value}
@@ -95,7 +91,6 @@ export const LinkInput = (props: LinkInputProps) => {
95
91
  href={`${linkPrefix}${value}`}
96
92
  style={{ color: token.colorPrimary, paddingRight: 15 }}
97
93
  target="_blank"
98
- rel="noreferrer"
99
94
  >
100
95
  {value}
101
96
  </a>
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
- import { Select, theme } from "antd";
2
+ import { Select } from "antd";
3
3
  import styled from "styled-components";
4
4
 
5
5
  import Field from "@/common/Field";
6
6
  import { Selection as SelectionOoui } from "@gisce/ooui";
7
7
  import { WidgetProps } from "@/types";
8
+ import { theme } from "antd";
8
9
 
9
10
  const { defaultAlgorithm, defaultSeed } = theme;
10
11
 
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
- import { Select, theme } from "antd";
2
+ import { Select } from "antd";
3
3
  import styled from "styled-components";
4
4
 
5
5
  import Field from "@/common/Field";
6
6
  import { Selection as SelectionOoui } from "@gisce/ooui";
7
7
  import { WidgetProps } from "@/types";
8
+ import { theme } from "antd";
8
9
 
9
10
  const { defaultAlgorithm, defaultSeed } = theme;
10
11
 
@@ -49,16 +50,9 @@ export const SelectionInput = (props: SelectionInputProps) => {
49
50
  const CustomSelect: any = required && !readOnly ? RequiredSelect : Select;
50
51
 
51
52
  return (
52
- <CustomSelect
53
- disabled={readOnly}
54
- onChange={onChange}
55
- value={value}
56
- optionFilterProp="children"
57
- filterOption={(input: string, option: any) =>
58
- option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
59
- }
60
- showSearch
61
- >
53
+ <CustomSelect disabled={readOnly} onChange={onChange} value={value} optionFilterProp="children" filterOption={
54
+ (input: string, option: any) => option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
55
+ } showSearch>
62
56
  {options}
63
57
  </CustomSelect>
64
58
  );
@@ -3,10 +3,12 @@ import { TimePicker, theme } from "antd";
3
3
  import Field from "@/common/Field";
4
4
  import { Time as TimeOoui } from "@gisce/ooui";
5
5
  import { WidgetProps } from "@/types";
6
- import dayjs, { Dayjs } from "dayjs";
7
- import customParseFormat from "dayjs/plugin/customParseFormat";
6
+ import dayjs from "dayjs";
7
+ import { Dayjs } from 'dayjs';
8
+ import customParseFormat from 'dayjs/plugin/customParseFormat'
8
9
 
9
- dayjs.extend(customParseFormat);
10
+
11
+ dayjs.extend(customParseFormat)
10
12
 
11
13
  const Time = (props: WidgetProps) => {
12
14
  const { ooui } = props;
@@ -22,21 +24,18 @@ type TimeInputProps = {
22
24
  ooui: TimeOoui;
23
25
  value?: string;
24
26
  onChange?: (value?: string) => void;
25
- };
27
+ }
26
28
 
27
29
  export const TimeInput = (props: TimeInputProps) => {
30
+
28
31
  const onChange = (time: Dayjs | null, timestring: string) => {
29
32
  if (props.onChange) {
30
- props.onChange(timestring);
33
+ props.onChange(timestring)
31
34
  }
32
- };
35
+ }
33
36
 
34
- return (
35
- <TimePicker
36
- onChange={onChange}
37
- value={props.value ? dayjs(props.value, "HH:mm:ss") : undefined}
38
- />
39
- );
40
- };
37
+ return <TimePicker onChange={onChange} value={props.value ? dayjs(props.value, 'HH:mm:ss') : undefined} />
38
+
39
+ }
41
40
 
42
41
  export default Time;
@@ -1,11 +1,16 @@
1
1
  import React, { useState, useRef, useEffect, useContext } from "react";
2
- import { Input, Button, Row, Col, theme } from "antd";
2
+ import { Input, Button, Row, Col } from "antd";
3
3
  import {
4
4
  SearchOutlined,
5
5
  FolderOpenOutlined,
6
6
  LoadingOutlined,
7
7
  } from "@ant-design/icons";
8
8
  import styled from "styled-components";
9
+ import { theme } from "antd";
10
+
11
+ const { defaultAlgorithm, defaultSeed } = theme;
12
+
13
+ const mapToken = defaultAlgorithm(defaultSeed);
9
14
 
10
15
  import {
11
16
  Many2one as Many2oneOoui,
@@ -20,10 +25,6 @@ import showErrorDialog from "@/ui/GenericErrorDialog";
20
25
  import { FormContext, FormContextType } from "@/context/FormContext";
21
26
  import { transformPlainMany2Ones } from "@/helpers/formHelper";
22
27
 
23
- const { defaultAlgorithm, defaultSeed } = theme;
24
-
25
- const mapToken = defaultAlgorithm(defaultSeed);
26
-
27
28
  type Props = {
28
29
  ooui: Many2oneOoui;
29
30
  onOpenDetailClick?:
@@ -57,7 +58,7 @@ interface Many2oneInputProps {
57
58
  }
58
59
 
59
60
  export const Many2oneInput: React.FC<Many2oneInputProps> = (
60
- props: Many2oneInputProps,
61
+ props: Many2oneInputProps
61
62
  ) => {
62
63
  const { value, onChange, ooui } = props;
63
64
  const {
@@ -215,7 +216,7 @@ export const Many2oneInput: React.FC<Many2oneInputProps> = (
215
216
  transformDomainForChildWidget({
216
217
  domain,
217
218
  widgetFieldName: fieldName,
218
- }),
219
+ })
219
220
  );
220
221
  }
221
222
 
@@ -38,12 +38,12 @@ export const Many2oneSuffix = (props: Props) => {
38
38
  const { t } = useContext(LocaleContext) as LocaleContextType;
39
39
 
40
40
  const tabManagerContext = useContext(
41
- TabManagerContext,
41
+ TabManagerContext
42
42
  ) as TabManagerContextType;
43
43
  const { openRelate } = tabManagerContext || {};
44
44
 
45
45
  const contentRootContext = useContext(
46
- ContentRootContext,
46
+ ContentRootContext
47
47
  ) as ContentRootContextType;
48
48
  const { processAction } = contentRootContext || {};
49
49
 
@@ -55,34 +55,22 @@ export const Many2oneSuffix = (props: Props) => {
55
55
  setIsLoading(true);
56
56
 
57
57
  try {
58
- const formView = (await ConnectionProvider.getHandler().getView({
58
+ const formView = await ConnectionProvider.getHandler().getView({
59
59
  model,
60
60
  type: "form",
61
61
  context,
62
- })) as FormView;
62
+ }) as FormView;
63
63
  setFormView(formView);
64
64
  let fields: string[] = [];
65
65
  const { toolbar } = formView;
66
- toolbar.action
67
- ?.filter((item: any) => item.hasOwnProperty("context"))
68
- .map((item: any) => fields.push(...parseContextFields(item.context)));
69
- toolbar.action
70
- ?.filter((item: any) => item.hasOwnProperty("domain"))
71
- .map((item: any) => fields.push(...parseDomainFields(item.domain)));
72
- toolbar.relate
73
- ?.filter((item: any) => item.hasOwnProperty("context"))
74
- .map((item: any) => fields.push(...parseContextFields(item.context)));
75
- toolbar.relate
76
- ?.filter((item: any) => item.hasOwnProperty("domain"))
77
- .map((item: any) => fields.push(...parseDomainFields(item.domain)));
78
- toolbar.print
79
- ?.filter((item: any) => item.hasOwnProperty("context"))
80
- .map((item: any) => fields.push(...parseContextFields(item.context)));
81
- fields = fields.filter(
82
- (i) => Object.keys(formView.fields).indexOf(i) > -1,
83
- );
66
+ toolbar.action?.filter((item: any) => item.hasOwnProperty('context')).map((item: any) => fields.push(...parseContextFields(item.context)));
67
+ toolbar.action?.filter((item: any) => item.hasOwnProperty('domain')).map((item: any) => fields.push(...parseDomainFields(item.domain)));
68
+ toolbar.relate?.filter((item: any) => item.hasOwnProperty('context')).map((item: any) => fields.push(...parseContextFields(item.context)));
69
+ toolbar.relate?.filter((item: any) => item.hasOwnProperty('domain')).map((item: any) => fields.push(...parseDomainFields(item.domain)));
70
+ toolbar.print?.filter((item: any) => item.hasOwnProperty('context')).map((item: any) => fields.push(...parseContextFields(item.context)));
71
+ fields = fields.filter((i) => Object.keys(formView.fields).indexOf(i) > -1)
84
72
 
85
- let values = {};
73
+ let values = {}
86
74
 
87
75
  if (fields.length > 0) {
88
76
  values = (
@@ -101,6 +89,7 @@ export const Many2oneSuffix = (props: Props) => {
101
89
  } catch (err) {
102
90
  setIsLoading(false);
103
91
  showErrorDialog(err);
92
+ return;
104
93
  }
105
94
  }
106
95