@gisce/react-ooui 1.5.1 → 1.5.2-alpha.1

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/package.json +73 -42
  2. package/src/actionbar/FormActionBar.tsx +1 -1
  3. package/src/actionbar/TreeActionBar.tsx +1 -1
  4. package/src/common/DatePicker.tsx +2 -2
  5. package/src/common/SelectAllRecordsRow.tsx +4 -5
  6. package/src/context/ContentRootContext.tsx +61 -54
  7. package/src/context/TabManagerContext.tsx +3 -4
  8. package/src/helpers/dynamicColumnsHelper.ts +1 -1
  9. package/src/helpers/filesHelper.ts +7 -7
  10. package/src/helpers/formHelper.ts +23 -24
  11. package/src/helpers/one2manyHelper.ts +6 -6
  12. package/src/helpers/searchHelper.ts +8 -5
  13. package/src/helpers/treeHelper.ts +7 -7
  14. package/src/helpers/viewHelper.ts +2 -2
  15. package/src/hooks/useExport.ts +2 -3
  16. package/src/hooks/useSearch.ts +8 -8
  17. package/src/index.ts +4 -0
  18. package/src/stories/Binary.stories.tsx +0 -3
  19. package/src/stories/Boolean.stories.tsx +0 -3
  20. package/src/stories/Button.stories.tsx +8 -14
  21. package/src/stories/Char.stories.tsx +0 -3
  22. package/src/stories/FiberGrid.stories.tsx +0 -3
  23. package/src/stories/Float.stories.tsx +0 -3
  24. package/src/stories/FloatTime.stories.tsx +0 -3
  25. package/src/stories/Image.stories.tsx +0 -3
  26. package/src/stories/Integer.stories.tsx +0 -3
  27. package/src/stories/Label.stories.tsx +0 -3
  28. package/src/stories/Many2one.stories.tsx +0 -3
  29. package/src/stories/One2many.stories.tsx +4 -11
  30. package/src/stories/ProgressBar.stories.tsx +0 -3
  31. package/src/stories/Reference.stories.tsx +0 -3
  32. package/src/stories/Selection.stories.tsx +0 -3
  33. package/src/stories/Separator.stories.tsx +3 -7
  34. package/src/stories/Text.stories.tsx +0 -3
  35. package/src/stories/containers/Group.stories.tsx +0 -5
  36. package/src/stories/containers/NewLine.stories.tsx +0 -4
  37. package/src/stories/containers/Notebook.stories.tsx +0 -5
  38. package/src/stories/custom/Avatar.stories.tsx +0 -1
  39. package/src/stories/custom/ButtonGroup.stories.tsx +36 -23
  40. package/src/stories/custom/CodeEditor.stories.tsx +1 -4
  41. package/src/stories/custom/Indicator.stories.tsx +3 -11
  42. package/src/stories/custom/Markdown.stories.tsx +2 -6
  43. package/src/stories/custom/MultiCheckbox.stories.tsx +20 -15
  44. package/src/stories/custom/Radio.stories.tsx +13 -16
  45. package/src/stories/custom/Steps.stories.tsx +7 -5
  46. package/src/stories/custom/Switch.stories.tsx +0 -3
  47. package/src/stories/custom/Tag.stories.tsx +17 -11
  48. package/src/stories/custom/Tags.stories.tsx +20 -16
  49. package/src/stories/forms/PreferencesForm.stories.tsx +0 -4
  50. package/src/stories/ui/ActionBar.stories.tsx +0 -3
  51. package/src/stories/ui/FavouriteButton.stories.tsx +0 -3
  52. package/src/stories/ui/GoToResourceModal.stories.tsx +0 -3
  53. package/src/stories/views/SearchTree.stories.tsx +43 -89
  54. package/src/stories/views/Tab.stories.tsx +0 -3
  55. package/src/stories/views/TabsAndContent.stories.tsx +0 -3
  56. package/src/stories/views/Tree.stories.jsx +0 -4
  57. package/src/stories/views/searchFilter/DateRangePicker.stories.tsx +0 -3
  58. package/src/stories/views/searchFilter/DateTimeRangePicker.stories.tsx +0 -3
  59. package/src/stories/views/searchFilter/PairFields.stories.tsx +0 -3
  60. package/src/stories/views/searchFilter/SearchFilter.stories.tsx +0 -4
  61. package/src/stories/views/searchFilter/examples/PartnersSearchFilter.stories.tsx +0 -4
  62. package/src/types/index.ts +94 -43
  63. package/src/ui/FavouriteButton.tsx +2 -3
  64. package/src/views/ActionView.tsx +12 -11
  65. package/src/views/RootView.tsx +5 -6
  66. package/src/widgets/base/Binary.tsx +2 -2
  67. package/src/widgets/base/Boolean.tsx +1 -2
  68. package/src/widgets/base/Float.tsx +1 -1
  69. package/src/widgets/base/Integer.tsx +2 -2
  70. package/src/widgets/base/Label.tsx +9 -9
  71. package/src/widgets/base/LinkInput.tsx +6 -1
  72. package/src/widgets/base/MultiSelection.tsx +1 -2
  73. package/src/widgets/base/Selection.tsx +11 -5
  74. package/src/widgets/base/Time.tsx +13 -12
  75. package/src/widgets/base/many2one/Many2one.tsx +7 -8
  76. package/src/widgets/base/many2one/Many2oneSuffix.tsx +23 -12
  77. package/src/widgets/base/one2many/One2manyInput.tsx +13 -14
  78. package/src/widgets/containers/Notebook.tsx +9 -2
  79. package/src/widgets/custom/ButtonGroup.tsx +13 -10
  80. package/src/widgets/custom/CodeEditor.tsx +7 -3
  81. package/src/widgets/custom/Comments.tsx +76 -70
  82. package/src/widgets/custom/Indicator.tsx +1 -2
  83. package/src/widgets/custom/MultiCheckbox.tsx +2 -2
  84. package/src/widgets/custom/Tag.tsx +20 -16
  85. package/src/widgets/custom/Tags.tsx +3 -3
  86. package/src/widgets/custom/Timeline.tsx +6 -6
  87. package/src/widgets/views/Dashboard/DashboardTree.tsx +2 -2
  88. package/src/widgets/views/DashboardGrid/DashboardGrid.types.ts +1 -1
  89. package/src/widgets/views/Form.tsx +9 -10
  90. package/src/widgets/views/Graph/GraphIndicator.tsx +7 -7
  91. package/src/widgets/views/SearchTree.tsx +2 -2
  92. package/src/widgets/views/Tree.tsx +15 -16
  93. package/src/widgets/views/searchFilter/DateTimeRangePicker.tsx +1 -3
  94. package/dist/ConnectionProvider.d.ts +0 -7
  95. package/dist/ConnectionProvider.d.ts.map +0 -1
  96. package/dist/actionbar/ActionButton.d.ts +0 -13
  97. package/dist/actionbar/ActionButton.d.ts.map +0 -1
  98. package/dist/actionbar/AttachmentsButton.d.ts +0 -12
  99. package/dist/actionbar/AttachmentsButton.d.ts.map +0 -1
  100. package/dist/actionbar/AttachmentsButtonWrapper.d.ts +0 -19
  101. package/dist/actionbar/AttachmentsButtonWrapper.d.ts.map +0 -1
  102. package/dist/actionbar/ButtonWithBadge.d.ts +0 -8
  103. package/dist/actionbar/ButtonWithBadge.d.ts.map +0 -1
  104. package/dist/actionbar/ChangeViewButton.d.ts +0 -13
  105. package/dist/actionbar/ChangeViewButton.d.ts.map +0 -1
  106. package/dist/actionbar/DashboardActionBar.d.ts +0 -4
  107. package/dist/actionbar/DashboardActionBar.d.ts.map +0 -1
  108. package/dist/actionbar/DropdownButton.d.ts +0 -12
  109. package/dist/actionbar/DropdownButton.d.ts.map +0 -1
  110. package/dist/actionbar/FormActionBar.d.ts +0 -6
  111. package/dist/actionbar/FormActionBar.d.ts.map +0 -1
  112. package/dist/actionbar/GraphActionBar.d.ts +0 -6
  113. package/dist/actionbar/GraphActionBar.d.ts.map +0 -1
  114. package/dist/actionbar/NewButton.d.ts +0 -7
  115. package/dist/actionbar/NewButton.d.ts.map +0 -1
  116. package/dist/actionbar/SearchBar.d.ts +0 -9
  117. package/dist/actionbar/SearchBar.d.ts.map +0 -1
  118. package/dist/actionbar/TreeActionBar.d.ts +0 -9
  119. package/dist/actionbar/TreeActionBar.d.ts.map +0 -1
  120. package/dist/common/ButtonWithTooltip.d.ts +0 -8
  121. package/dist/common/ButtonWithTooltip.d.ts.map +0 -1
  122. package/dist/common/DatePicker.d.ts +0 -20
  123. package/dist/common/DatePicker.d.ts.map +0 -1
  124. package/dist/common/Field.d.ts +0 -14
  125. package/dist/common/Field.d.ts.map +0 -1
  126. package/dist/common/SelectAllRecordsRow.d.ts +0 -10
  127. package/dist/common/SelectAllRecordsRow.d.ts.map +0 -1
  128. package/dist/context/ActionViewContext.d.ts +0 -65
  129. package/dist/context/ActionViewContext.d.ts.map +0 -1
  130. package/dist/context/ConfigContext.d.ts +0 -7
  131. package/dist/context/ConfigContext.d.ts.map +0 -1
  132. package/dist/context/ContentRootContext.d.ts +0 -19
  133. package/dist/context/ContentRootContext.d.ts.map +0 -1
  134. package/dist/context/DashboardActionContext.d.ts +0 -19
  135. package/dist/context/DashboardActionContext.d.ts.map +0 -1
  136. package/dist/context/FormContext.d.ts +0 -35
  137. package/dist/context/FormContext.d.ts.map +0 -1
  138. package/dist/context/FormModalContext.d.ts +0 -11
  139. package/dist/context/FormModalContext.d.ts.map +0 -1
  140. package/dist/context/LocaleContext.d.ts +0 -14
  141. package/dist/context/LocaleContext.d.ts.map +0 -1
  142. package/dist/context/One2manyContext.d.ts +0 -17
  143. package/dist/context/One2manyContext.d.ts.map +0 -1
  144. package/dist/context/TabManagerContext.d.ts +0 -50
  145. package/dist/context/TabManagerContext.d.ts.map +0 -1
  146. package/dist/helpers/containerHelper.d.ts +0 -22
  147. package/dist/helpers/containerHelper.d.ts.map +0 -1
  148. package/dist/helpers/dynamicColumnsHelper.d.ts +0 -8
  149. package/dist/helpers/dynamicColumnsHelper.d.ts.map +0 -1
  150. package/dist/helpers/errorHelper.d.ts +0 -6
  151. package/dist/helpers/errorHelper.d.ts.map +0 -1
  152. package/dist/helpers/filesHelper.d.ts +0 -8
  153. package/dist/helpers/filesHelper.d.ts.map +0 -1
  154. package/dist/helpers/formHelper.d.ts +0 -36
  155. package/dist/helpers/formHelper.d.ts.map +0 -1
  156. package/dist/helpers/iconMapper.d.ts +0 -13
  157. package/dist/helpers/iconMapper.d.ts.map +0 -1
  158. package/dist/helpers/logInfoHelper.d.ts +0 -3
  159. package/dist/helpers/logInfoHelper.d.ts.map +0 -1
  160. package/dist/helpers/one2manyHelper.d.ts +0 -37
  161. package/dist/helpers/one2manyHelper.d.ts.map +0 -1
  162. package/dist/helpers/searchHelper.d.ts +0 -6
  163. package/dist/helpers/searchHelper.d.ts.map +0 -1
  164. package/dist/helpers/timeHelper.d.ts +0 -4
  165. package/dist/helpers/timeHelper.d.ts.map +0 -1
  166. package/dist/helpers/treeHelper.d.ts +0 -23
  167. package/dist/helpers/treeHelper.d.ts.map +0 -1
  168. package/dist/helpers/viewHelper.d.ts +0 -10
  169. package/dist/helpers/viewHelper.d.ts.map +0 -1
  170. package/dist/hooks/useExport.d.ts +0 -44
  171. package/dist/hooks/useExport.d.ts.map +0 -1
  172. package/dist/hooks/useSearch.d.ts +0 -56
  173. package/dist/hooks/useSearch.d.ts.map +0 -1
  174. package/dist/hooks/useWindowDimensions.d.ts +0 -7
  175. package/dist/hooks/useWindowDimensions.d.ts.map +0 -1
  176. package/dist/index.d.ts +0 -57
  177. package/dist/index.d.ts.map +0 -1
  178. package/dist/locales/ca_ES.d.ts +0 -93
  179. package/dist/locales/ca_ES.d.ts.map +0 -1
  180. package/dist/locales/en_US.d.ts +0 -93
  181. package/dist/locales/en_US.d.ts.map +0 -1
  182. package/dist/locales/es_ES.d.ts +0 -93
  183. package/dist/locales/es_ES.d.ts.map +0 -1
  184. package/dist/react-ooui.es.js +0 -11763
  185. package/dist/react-ooui.es.js.map +0 -1
  186. package/dist/react-ooui.umd.js +0 -42
  187. package/dist/react-ooui.umd.js.map +0 -1
  188. package/dist/style.css +0 -1
  189. package/dist/types/index.d.ts +0 -256
  190. package/dist/types/index.d.ts.map +0 -1
  191. package/dist/ui/ActionErrorDialog.d.ts +0 -3
  192. package/dist/ui/ActionErrorDialog.d.ts.map +0 -1
  193. package/dist/ui/ConfirmDialog.d.ts +0 -7
  194. package/dist/ui/ConfirmDialog.d.ts.map +0 -1
  195. package/dist/ui/ErrorAlert.d.ts +0 -6
  196. package/dist/ui/ErrorAlert.d.ts.map +0 -1
  197. package/dist/ui/FavouriteButton.d.ts +0 -26
  198. package/dist/ui/FavouriteButton.d.ts.map +0 -1
  199. package/dist/ui/FormErrorsDialog.d.ts +0 -3
  200. package/dist/ui/FormErrorsDialog.d.ts.map +0 -1
  201. package/dist/ui/GenericErrorDialog.d.ts +0 -3
  202. package/dist/ui/GenericErrorDialog.d.ts.map +0 -1
  203. package/dist/ui/GoToResourceModal.d.ts +0 -10
  204. package/dist/ui/GoToResourceModal.d.ts.map +0 -1
  205. package/dist/ui/InfoDialog.d.ts +0 -3
  206. package/dist/ui/InfoDialog.d.ts.map +0 -1
  207. package/dist/ui/RefreshItemDialog.d.ts +0 -7
  208. package/dist/ui/RefreshItemDialog.d.ts.map +0 -1
  209. package/dist/ui/RemoveItemDialog.d.ts +0 -6
  210. package/dist/ui/RemoveItemDialog.d.ts.map +0 -1
  211. package/dist/ui/TitleHeader.d.ts +0 -8
  212. package/dist/ui/TitleHeader.d.ts.map +0 -1
  213. package/dist/ui/UnlinkItemDialog.d.ts +0 -6
  214. package/dist/ui/UnlinkItemDialog.d.ts.map +0 -1
  215. package/dist/ui/UnsavedChangesDialog.d.ts +0 -7
  216. package/dist/ui/UnsavedChangesDialog.d.ts.map +0 -1
  217. package/dist/ui/WarningDialog.d.ts +0 -3
  218. package/dist/ui/WarningDialog.d.ts.map +0 -1
  219. package/dist/views/ActionView.d.ts +0 -22
  220. package/dist/views/ActionView.d.ts.map +0 -1
  221. package/dist/views/CurrentTabContent.d.ts +0 -4
  222. package/dist/views/CurrentTabContent.d.ts.map +0 -1
  223. package/dist/views/RootView.d.ts +0 -14
  224. package/dist/views/RootView.d.ts.map +0 -1
  225. package/dist/views/TabContent.d.ts +0 -8
  226. package/dist/views/TabContent.d.ts.map +0 -1
  227. package/dist/views/TabSelector.d.ts +0 -4
  228. package/dist/views/TabSelector.d.ts.map +0 -1
  229. package/dist/views/Welcome.d.ts +0 -4
  230. package/dist/views/Welcome.d.ts.map +0 -1
  231. package/dist/views/actionViews/DashboardActionView.d.ts +0 -7
  232. package/dist/views/actionViews/DashboardActionView.d.ts.map +0 -1
  233. package/dist/views/actionViews/FormActionView.d.ts +0 -18
  234. package/dist/views/actionViews/FormActionView.d.ts.map +0 -1
  235. package/dist/views/actionViews/GraphActionView.d.ts +0 -13
  236. package/dist/views/actionViews/GraphActionView.d.ts.map +0 -1
  237. package/dist/views/actionViews/TreeActionView.d.ts +0 -20
  238. package/dist/views/actionViews/TreeActionView.d.ts.map +0 -1
  239. package/dist/views/tabs/Tab.d.ts +0 -11
  240. package/dist/views/tabs/Tab.d.ts.map +0 -1
  241. package/dist/widgets/WidgetFactory.d.ts +0 -4
  242. package/dist/widgets/WidgetFactory.d.ts.map +0 -1
  243. package/dist/widgets/base/Binary.d.ts +0 -14
  244. package/dist/widgets/base/Binary.d.ts.map +0 -1
  245. package/dist/widgets/base/Boolean.d.ts +0 -4
  246. package/dist/widgets/base/Boolean.d.ts.map +0 -1
  247. package/dist/widgets/base/Button.d.ts +0 -8
  248. package/dist/widgets/base/Button.d.ts.map +0 -1
  249. package/dist/widgets/base/Char.d.ts +0 -8
  250. package/dist/widgets/base/Char.d.ts.map +0 -1
  251. package/dist/widgets/base/Date.d.ts +0 -5
  252. package/dist/widgets/base/Date.d.ts.map +0 -1
  253. package/dist/widgets/base/DateTime.d.ts +0 -5
  254. package/dist/widgets/base/DateTime.d.ts.map +0 -1
  255. package/dist/widgets/base/Email.d.ts +0 -4
  256. package/dist/widgets/base/Email.d.ts.map +0 -1
  257. package/dist/widgets/base/Float.d.ts +0 -4
  258. package/dist/widgets/base/Float.d.ts.map +0 -1
  259. package/dist/widgets/base/FloatTime.d.ts +0 -12
  260. package/dist/widgets/base/FloatTime.d.ts.map +0 -1
  261. package/dist/widgets/base/Image.d.ts +0 -14
  262. package/dist/widgets/base/Image.d.ts.map +0 -1
  263. package/dist/widgets/base/Integer.d.ts +0 -8
  264. package/dist/widgets/base/Integer.d.ts.map +0 -1
  265. package/dist/widgets/base/Label.d.ts +0 -9
  266. package/dist/widgets/base/Label.d.ts.map +0 -1
  267. package/dist/widgets/base/LinkInput.d.ts +0 -12
  268. package/dist/widgets/base/LinkInput.d.ts.map +0 -1
  269. package/dist/widgets/base/MultiSelection.d.ts +0 -10
  270. package/dist/widgets/base/MultiSelection.d.ts.map +0 -1
  271. package/dist/widgets/base/ProgressBar.d.ts +0 -7
  272. package/dist/widgets/base/ProgressBar.d.ts.map +0 -1
  273. package/dist/widgets/base/Reference.d.ts +0 -16
  274. package/dist/widgets/base/Reference.d.ts.map +0 -1
  275. package/dist/widgets/base/ReferenceTree.d.ts +0 -8
  276. package/dist/widgets/base/ReferenceTree.d.ts.map +0 -1
  277. package/dist/widgets/base/Selection.d.ts +0 -10
  278. package/dist/widgets/base/Selection.d.ts.map +0 -1
  279. package/dist/widgets/base/Separator.d.ts +0 -8
  280. package/dist/widgets/base/Separator.d.ts.map +0 -1
  281. package/dist/widgets/base/Text.d.ts +0 -8
  282. package/dist/widgets/base/Text.d.ts.map +0 -1
  283. package/dist/widgets/base/Time.d.ts +0 -12
  284. package/dist/widgets/base/Time.d.ts.map +0 -1
  285. package/dist/widgets/base/Url.d.ts +0 -4
  286. package/dist/widgets/base/Url.d.ts.map +0 -1
  287. package/dist/widgets/base/many2one/Many2one.d.ts +0 -16
  288. package/dist/widgets/base/many2one/Many2one.d.ts.map +0 -1
  289. package/dist/widgets/base/many2one/Many2oneSuffix.d.ts +0 -9
  290. package/dist/widgets/base/many2one/Many2oneSuffix.d.ts.map +0 -1
  291. package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts +0 -10
  292. package/dist/widgets/base/many2one/Many2oneSuffixModal.d.ts.map +0 -1
  293. package/dist/widgets/base/many2one/Many2oneTree.d.ts +0 -6
  294. package/dist/widgets/base/many2one/Many2oneTree.d.ts.map +0 -1
  295. package/dist/widgets/base/one2many/One2many.d.ts +0 -8
  296. package/dist/widgets/base/one2many/One2many.d.ts.map +0 -1
  297. package/dist/widgets/base/one2many/One2manyInput.d.ts +0 -23
  298. package/dist/widgets/base/one2many/One2manyInput.d.ts.map +0 -1
  299. package/dist/widgets/base/one2many/One2manyTopBar.d.ts +0 -23
  300. package/dist/widgets/base/one2many/One2manyTopBar.d.ts.map +0 -1
  301. package/dist/widgets/containers/Container.d.ts +0 -9
  302. package/dist/widgets/containers/Container.d.ts.map +0 -1
  303. package/dist/widgets/containers/Group.d.ts +0 -10
  304. package/dist/widgets/containers/Group.d.ts.map +0 -1
  305. package/dist/widgets/containers/Notebook.d.ts +0 -9
  306. package/dist/widgets/containers/Notebook.d.ts.map +0 -1
  307. package/dist/widgets/custom/Avatar.d.ts +0 -10
  308. package/dist/widgets/custom/Avatar.d.ts.map +0 -1
  309. package/dist/widgets/custom/ButtonGroup.d.ts +0 -8
  310. package/dist/widgets/custom/ButtonGroup.d.ts.map +0 -1
  311. package/dist/widgets/custom/CodeEditor.d.ts +0 -9
  312. package/dist/widgets/custom/CodeEditor.d.ts.map +0 -1
  313. package/dist/widgets/custom/Comments.d.ts +0 -35
  314. package/dist/widgets/custom/Comments.d.ts.map +0 -1
  315. package/dist/widgets/custom/FiberGrid.d.ts +0 -10
  316. package/dist/widgets/custom/FiberGrid.d.ts.map +0 -1
  317. package/dist/widgets/custom/Indicator.d.ts +0 -10
  318. package/dist/widgets/custom/Indicator.d.ts.map +0 -1
  319. package/dist/widgets/custom/Markdown.d.ts +0 -5
  320. package/dist/widgets/custom/Markdown.d.ts.map +0 -1
  321. package/dist/widgets/custom/MultiCheckbox.d.ts +0 -14
  322. package/dist/widgets/custom/MultiCheckbox.d.ts.map +0 -1
  323. package/dist/widgets/custom/Radio.d.ts +0 -10
  324. package/dist/widgets/custom/Radio.d.ts.map +0 -1
  325. package/dist/widgets/custom/Steps.d.ts +0 -13
  326. package/dist/widgets/custom/Steps.d.ts.map +0 -1
  327. package/dist/widgets/custom/Switch.d.ts +0 -4
  328. package/dist/widgets/custom/Switch.d.ts.map +0 -1
  329. package/dist/widgets/custom/Tag.d.ts +0 -7
  330. package/dist/widgets/custom/Tag.d.ts.map +0 -1
  331. package/dist/widgets/custom/Tags.d.ts +0 -15
  332. package/dist/widgets/custom/Tags.d.ts.map +0 -1
  333. package/dist/widgets/custom/Timeline.d.ts +0 -16
  334. package/dist/widgets/custom/Timeline.d.ts.map +0 -1
  335. package/dist/widgets/modals/ExportModal.d.ts +0 -15
  336. package/dist/widgets/modals/ExportModal.d.ts.map +0 -1
  337. package/dist/widgets/modals/FormModal.d.ts +0 -12
  338. package/dist/widgets/modals/FormModal.d.ts.map +0 -1
  339. package/dist/widgets/modals/SearchModal.d.ts +0 -13
  340. package/dist/widgets/modals/SearchModal.d.ts.map +0 -1
  341. package/dist/widgets/modals/TranslationModal.d.ts +0 -12
  342. package/dist/widgets/modals/TranslationModal.d.ts.map +0 -1
  343. package/dist/widgets/views/Dashboard/Dashboard.d.ts +0 -5
  344. package/dist/widgets/views/Dashboard/Dashboard.d.ts.map +0 -1
  345. package/dist/widgets/views/Dashboard/DashboardForm.d.ts +0 -4
  346. package/dist/widgets/views/Dashboard/DashboardForm.d.ts.map +0 -1
  347. package/dist/widgets/views/Dashboard/DashboardTree.d.ts +0 -19
  348. package/dist/widgets/views/Dashboard/DashboardTree.d.ts.map +0 -1
  349. package/dist/widgets/views/Dashboard/dashboardHelper.d.ts +0 -6
  350. package/dist/widgets/views/Dashboard/dashboardHelper.d.ts.map +0 -1
  351. package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts +0 -4
  352. package/dist/widgets/views/DashboardGrid/DashboardGrid.d.ts.map +0 -1
  353. package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts +0 -6
  354. package/dist/widgets/views/DashboardGrid/DashboardGrid.types.d.ts.map +0 -1
  355. package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts +0 -4
  356. package/dist/widgets/views/DashboardGrid/DashboardGridItem.d.ts.map +0 -1
  357. package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts +0 -11
  358. package/dist/widgets/views/DashboardGrid/DashboardGridItem.types.d.ts.map +0 -1
  359. package/dist/widgets/views/DashboardGrid/index.d.ts +0 -5
  360. package/dist/widgets/views/DashboardGrid/index.d.ts.map +0 -1
  361. package/dist/widgets/views/Form.d.ts +0 -29
  362. package/dist/widgets/views/Form.d.ts.map +0 -1
  363. package/dist/widgets/views/Graph/Graph.d.ts +0 -11
  364. package/dist/widgets/views/Graph/Graph.d.ts.map +0 -1
  365. package/dist/widgets/views/Graph/GraphChart.d.ts +0 -11
  366. package/dist/widgets/views/Graph/GraphChart.d.ts.map +0 -1
  367. package/dist/widgets/views/Graph/GraphDefaults.d.ts +0 -83
  368. package/dist/widgets/views/Graph/GraphDefaults.d.ts.map +0 -1
  369. package/dist/widgets/views/Graph/GraphIndicator.d.ts +0 -17
  370. package/dist/widgets/views/Graph/GraphIndicator.d.ts.map +0 -1
  371. package/dist/widgets/views/Graph/useGraphData.d.ts +0 -20
  372. package/dist/widgets/views/Graph/useGraphData.d.ts.map +0 -1
  373. package/dist/widgets/views/SearchTree.d.ts +0 -24
  374. package/dist/widgets/views/SearchTree.d.ts.map +0 -1
  375. package/dist/widgets/views/Tree.d.ts +0 -32
  376. package/dist/widgets/views/Tree.d.ts.map +0 -1
  377. package/dist/widgets/views/searchFilter/DateRangePicker.d.ts +0 -4
  378. package/dist/widgets/views/searchFilter/DateRangePicker.d.ts.map +0 -1
  379. package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts +0 -4
  380. package/dist/widgets/views/searchFilter/DateTimeRangePicker.d.ts.map +0 -1
  381. package/dist/widgets/views/searchFilter/PairFields.d.ts +0 -4
  382. package/dist/widgets/views/searchFilter/PairFields.d.ts.map +0 -1
  383. package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts +0 -10
  384. package/dist/widgets/views/searchFilter/SearchBottomBar.d.ts.map +0 -1
  385. package/dist/widgets/views/searchFilter/SearchField.d.ts +0 -8
  386. package/dist/widgets/views/searchFilter/SearchField.d.ts.map +0 -1
  387. package/dist/widgets/views/searchFilter/SearchFilter.d.ts +0 -20
  388. package/dist/widgets/views/searchFilter/SearchFilter.d.ts.map +0 -1
  389. package/dist/widgets/views/searchFilter/SearchParams.d.ts +0 -7
  390. package/dist/widgets/views/searchFilter/SearchParams.d.ts.map +0 -1
  391. package/src/tailwind.css +0 -8
  392. package/src/tailwind.generated.css +0 -168533
@@ -76,7 +76,7 @@ type SearchResponse = {
76
76
  };
77
77
 
78
78
  type SearchRequest = {
79
- params: Array<any>;
79
+ params: any[];
80
80
  limit?: number;
81
81
  offset?: number;
82
82
  model: string;
@@ -84,6 +84,7 @@ type SearchRequest = {
84
84
  context?: any;
85
85
  attrs?: any;
86
86
  order?: number | string | null;
87
+ fieldsToRetrieve?: string[];
87
88
  };
88
89
 
89
90
  type SearchAllIdsRequest = SearchCountRequest & {
@@ -91,7 +92,7 @@ type SearchAllIdsRequest = SearchCountRequest & {
91
92
  };
92
93
 
93
94
  type SearchCountRequest = {
94
- params: Array<any>;
95
+ params: any[];
95
96
  model: string;
96
97
  context?: any;
97
98
  };
@@ -251,52 +252,102 @@ type ExportDataOptions = {
251
252
  };
252
253
 
253
254
  type ConnectionProviderType = {
254
- getActionStringForModel: (model: string) => Promise<string>;
255
- getViewsForAction: ({
256
- action,
257
- context,
258
- }: {
259
- action: string;
260
- context?: any;
261
- }) => Promise<ViewData>;
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>;
262
269
  getView: (
263
- options: GetViewRequest
270
+ options: GetViewRequest,
271
+ requestConfig?: any,
264
272
  ) => Promise<FormView | TreeView | GraphView>;
265
- getFields: (options: GetFieldsRequest) => Promise<any>;
266
- searchAllIds: (options: SearchAllIdsRequest) => Promise<number[]>;
267
- searchCount: (options: SearchCountRequest) => Promise<number>;
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>;
268
282
  search: (options: SearchRequest) => 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>;
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>;
293
334
  isShortcutFavorite: (
294
- options: IsShortcutFavoriteOptions
335
+ options: IsShortcutFavoriteOptions,
336
+ requestConfig?: any,
295
337
  ) => Promise<number | boolean>;
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>;
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>;
300
351
  };
301
352
 
302
353
  type ViewType = "tree" | "form" | "dashboard" | "graph" | "calendar";
@@ -7,8 +7,7 @@ import {
7
7
  FormOutlined,
8
8
  EditOutlined,
9
9
  } from "@ant-design/icons";
10
- import { Button, Col, Row, Spin, Tooltip, theme } from "antd";
11
- import { Menu, Dropdown } from "antd";
10
+ import { Button, Col, Row, Spin, Tooltip, theme, Menu, Dropdown } from "antd";
12
11
  import showErrorDialog from "@/ui/ActionErrorDialog";
13
12
  import {
14
13
  TabManagerContext,
@@ -61,7 +60,7 @@ const FavouriteButton = (props: Props) => {
61
60
  const { token } = useToken();
62
61
 
63
62
  const tabManagerContext = useContext(
64
- TabManagerContext
63
+ TabManagerContext,
65
64
  ) as TabManagerContextType;
66
65
  const {
67
66
  openShortcut,
@@ -82,8 +82,9 @@ function ActionView(props: Props, ref: any) {
82
82
  ? (res_id as number)
83
83
  : undefined;
84
84
 
85
- const [currentId, setCurrentIdInternal] =
86
- useState<number | undefined>(res_id_parsed);
85
+ const [currentId, setCurrentIdInternal] = useState<number | undefined>(
86
+ res_id_parsed,
87
+ );
87
88
  const [selectedRowItems, setSelectedRowItems] = useState<any[]>([]);
88
89
  const [currentItemIndex, setCurrentItemIndex] = useState<number>();
89
90
  const [results, setResults] = useState<any>([]);
@@ -95,13 +96,13 @@ function ActionView(props: Props, ref: any) {
95
96
  useState<boolean>(false);
96
97
  const [searchTreeNameSearch, setSearchTreeNameSearch] = useState<string>();
97
98
 
98
- const { t } = useContext(LocaleContext) as LocaleContextType;
99
+ const { t } = (useContext(LocaleContext) as LocaleContextType) || {};
99
100
 
100
101
  const formRef = useRef();
101
102
  const searchTreeRef = useRef();
102
103
 
103
104
  const tabManagerContext = useContext(
104
- TabManagerContext
105
+ TabManagerContext,
105
106
  ) as TabManagerContextType;
106
107
  const {
107
108
  setCurrentView: setCurrentViewTabContext,
@@ -118,7 +119,7 @@ function ActionView(props: Props, ref: any) {
118
119
  event.preventDefault();
119
120
  handleGoToRecordShortcut();
120
121
  },
121
- [activeKey, tabs, currentView, currentItemIndex, results]
122
+ [activeKey, tabs, currentView, currentItemIndex, results],
122
123
  );
123
124
 
124
125
  function setCurrentId(id?: number) {
@@ -170,7 +171,7 @@ function ActionView(props: Props, ref: any) {
170
171
 
171
172
  const [, viewType] = view.viewTuple;
172
173
 
173
- let viewInfo = view.info;
174
+ const viewInfo = view.info;
174
175
 
175
176
  switch (viewType) {
176
177
  case "dashboard": {
@@ -228,16 +229,16 @@ function ActionView(props: Props, ref: any) {
228
229
  break;
229
230
  }
230
231
  }
231
- let currentViewToAssign = undefined;
232
+ let currentViewToAssign;
232
233
 
233
234
  if (!initialView && viewDataRetrieved.find((v) => v.type === "tree")) {
234
235
  const treeView: TreeView = viewDataRetrieved.find(
235
- (v) => v.type === "tree"
236
+ (v) => v.type === "tree",
236
237
  ) as TreeView;
237
238
  currentViewToAssign = treeView;
238
239
  } else if (!initialView) {
239
240
  const formView: TreeView = viewDataRetrieved.find(
240
- (v) => v.type === "form"
241
+ (v) => v.type === "form",
241
242
  ) as TreeView;
242
243
  currentViewToAssign = formView;
243
244
  } else {
@@ -253,7 +254,7 @@ function ActionView(props: Props, ref: any) {
253
254
 
254
255
  if (!currentViewToAssign) {
255
256
  showErrorDialog(
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`
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`,
257
258
  );
258
259
  onRemoveTab?.(tabKey);
259
260
  }
@@ -457,7 +458,7 @@ function ActionView(props: Props, ref: any) {
457
458
  } else {
458
459
  setCurrentId(undefined);
459
460
  const formView: FormView = availableViews.find(
460
- (v) => v.type === "form"
461
+ (v) => v.type === "form",
461
462
  ) as FormView;
462
463
  setCurrentView(formView);
463
464
  }
@@ -10,8 +10,7 @@ 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 from "@/context/LocaleContext";
14
- import { tForLang } from "@/context/LocaleContext";
13
+ import LocaleContextProvider, { tForLang } from "@/context/LocaleContext";
15
14
  import { ShortcutApi } from "@/ui/FavouriteButton";
16
15
  import showErrorDialog from "@/ui/ActionErrorDialog";
17
16
  import { InitialViewData, ViewType } from "@/types";
@@ -154,7 +153,7 @@ function RootView(props: RootViewProps, ref: any) {
154
153
 
155
154
  if (initialViewType) {
156
155
  const [id, type] = finalViews.find(
157
- ([_, type]) => type === initialViewType
156
+ ([_, type]) => type === initialViewType,
158
157
  );
159
158
  initialView = { id, type };
160
159
  } else {
@@ -245,7 +244,7 @@ function RootView(props: RootViewProps, ref: any) {
245
244
 
246
245
  const parsedDomain = domain
247
246
  ? await ConnectionProvider.getHandler().evalDomain({
248
- domain: domain,
247
+ domain,
249
248
  values: transformPlainMany2Ones({
250
249
  fields,
251
250
  values: { ...values, ...globalValues },
@@ -403,7 +402,7 @@ function RootView(props: RootViewProps, ref: any) {
403
402
  domain: any;
404
403
  context: any;
405
404
  model: string;
406
- views: Array<any>;
405
+ views: any[];
407
406
  title: string;
408
407
  target: string;
409
408
  initialView: InitialViewData;
@@ -484,7 +483,7 @@ function RootView(props: RootViewProps, ref: any) {
484
483
  activeKey={activeKey}
485
484
  onRemoveTab={async (key: string) => {
486
485
  const canWeCloseFn = tabViewsCloseFunctions.current.get(
487
- key as string
486
+ key as string,
488
487
  );
489
488
  const canWeClose = await canWeCloseFn?.();
490
489
 
@@ -2,7 +2,6 @@ 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;
6
5
  import ButtonWithTooltip from "@/common/ButtonWithTooltip";
7
6
  import {
8
7
  FolderOpenOutlined,
@@ -19,6 +18,7 @@ import {
19
18
  openBase64InNewTab,
20
19
  toBase64,
21
20
  } 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,10 +1,9 @@
1
1
  import React from "react";
2
- import { Checkbox as AntCheckbox } from "antd";
2
+ import { Checkbox as AntCheckbox, theme } 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";
8
7
 
9
8
  const { defaultAlgorithm, defaultSeed } = theme;
10
9
 
@@ -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;
7
6
 
8
7
  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
- let truncatedValue = Math.trunc(parseFloat(value));
36
+ const truncatedValue = Math.trunc(parseFloat(value));
37
37
  return `${truncatedValue}`.replace(/[^0-9\-]+/g, "");
38
38
  } else if (typeof value === "number") {
39
- let truncatedValue = Math.trunc(value);
39
+ const 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 ? true : false;
25
+ const addColon = fieldForLabel !== null;
26
26
  const labelText = addColon && label.length > 1 ? label + " :" : label;
27
27
  const responsiveAlign = responsiveBehaviour ? "left" : "right";
28
- const labelAlgin = align ? align : fieldForLabel ? responsiveAlign : "left";
28
+ const labelAlgin = 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 className="pr-1 text-xs" style={{
40
- color: token.colorPrimary
41
- }} />
39
+ <QuestionCircleOutlined
40
+ className="pr-1 text-xs"
41
+ style={{
42
+ color: token.colorPrimary,
43
+ }}
44
+ />
42
45
  </Tooltip>
43
46
  )}
44
47
  <span className="pr-2">
45
- <TextType
46
- level={labelSize}
47
- type={labelType as any}
48
- >
48
+ <TextType level={labelSize} type={labelType as any}>
49
49
  <Interweave content={labelText} />
50
50
  </TextType>
51
51
  </span>
@@ -74,7 +74,11 @@ export const LinkInput = (props: LinkInputProps) => {
74
74
  <Col flex="auto">
75
75
  {showInput ? (
76
76
  <Input
77
- style={{ borderTopLeftRadius: 0, borderBottomLeftRadius: 0, ...requiredStyle }}
77
+ style={{
78
+ borderTopLeftRadius: 0,
79
+ borderBottomLeftRadius: 0,
80
+ ...requiredStyle,
81
+ }}
78
82
  id={id}
79
83
  onChange={onValueStringChange}
80
84
  value={value}
@@ -91,6 +95,7 @@ export const LinkInput = (props: LinkInputProps) => {
91
95
  href={`${linkPrefix}${value}`}
92
96
  style={{ color: token.colorPrimary, paddingRight: 15 }}
93
97
  target="_blank"
98
+ rel="noreferrer"
94
99
  >
95
100
  {value}
96
101
  </a>
@@ -1,11 +1,10 @@
1
1
  import React from "react";
2
- import { Select } from "antd";
2
+ import { Select, theme } 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";
9
8
 
10
9
  const { defaultAlgorithm, defaultSeed } = theme;
11
10
 
@@ -1,11 +1,10 @@
1
1
  import React from "react";
2
- import { Select } from "antd";
2
+ import { Select, theme } 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";
9
8
 
10
9
  const { defaultAlgorithm, defaultSeed } = theme;
11
10
 
@@ -50,9 +49,16 @@ export const SelectionInput = (props: SelectionInputProps) => {
50
49
  const CustomSelect: any = required && !readOnly ? RequiredSelect : Select;
51
50
 
52
51
  return (
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>
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
+ >
56
62
  {options}
57
63
  </CustomSelect>
58
64
  );
@@ -3,12 +3,10 @@ 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 from "dayjs";
7
- import { Dayjs } from 'dayjs';
8
- import customParseFormat from 'dayjs/plugin/customParseFormat'
6
+ import dayjs, { Dayjs } from "dayjs";
7
+ import customParseFormat from "dayjs/plugin/customParseFormat";
9
8
 
10
-
11
- dayjs.extend(customParseFormat)
9
+ dayjs.extend(customParseFormat);
12
10
 
13
11
  const Time = (props: WidgetProps) => {
14
12
  const { ooui } = props;
@@ -24,18 +22,21 @@ type TimeInputProps = {
24
22
  ooui: TimeOoui;
25
23
  value?: string;
26
24
  onChange?: (value?: string) => void;
27
- }
25
+ };
28
26
 
29
27
  export const TimeInput = (props: TimeInputProps) => {
30
-
31
28
  const onChange = (time: Dayjs | null, timestring: string) => {
32
29
  if (props.onChange) {
33
- props.onChange(timestring)
30
+ props.onChange(timestring);
34
31
  }
35
- }
36
-
37
- return <TimePicker onChange={onChange} value={props.value ? dayjs(props.value, 'HH:mm:ss') : undefined} />
32
+ };
38
33
 
39
- }
34
+ return (
35
+ <TimePicker
36
+ onChange={onChange}
37
+ value={props.value ? dayjs(props.value, "HH:mm:ss") : undefined}
38
+ />
39
+ );
40
+ };
40
41
 
41
42
  export default Time;
@@ -1,16 +1,11 @@
1
1
  import React, { useState, useRef, useEffect, useContext } from "react";
2
- import { Input, Button, Row, Col } from "antd";
2
+ import { Input, Button, Row, Col, theme } 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);
14
9
 
15
10
  import {
16
11
  Many2one as Many2oneOoui,
@@ -25,6 +20,10 @@ import showErrorDialog from "@/ui/GenericErrorDialog";
25
20
  import { FormContext, FormContextType } from "@/context/FormContext";
26
21
  import { transformPlainMany2Ones } from "@/helpers/formHelper";
27
22
 
23
+ const { defaultAlgorithm, defaultSeed } = theme;
24
+
25
+ const mapToken = defaultAlgorithm(defaultSeed);
26
+
28
27
  type Props = {
29
28
  ooui: Many2oneOoui;
30
29
  onOpenDetailClick?:
@@ -58,7 +57,7 @@ interface Many2oneInputProps {
58
57
  }
59
58
 
60
59
  export const Many2oneInput: React.FC<Many2oneInputProps> = (
61
- props: Many2oneInputProps
60
+ props: Many2oneInputProps,
62
61
  ) => {
63
62
  const { value, onChange, ooui } = props;
64
63
  const {
@@ -216,7 +215,7 @@ export const Many2oneInput: React.FC<Many2oneInputProps> = (
216
215
  transformDomainForChildWidget({
217
216
  domain,
218
217
  widgetFieldName: fieldName,
219
- })
218
+ }),
220
219
  );
221
220
  }
222
221
 
@@ -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,22 +55,34 @@ 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?.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)
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
+ );
72
84
 
73
- let values = {}
85
+ let values = {};
74
86
 
75
87
  if (fields.length > 0) {
76
88
  values = (
@@ -89,7 +101,6 @@ export const Many2oneSuffix = (props: Props) => {
89
101
  } catch (err) {
90
102
  setIsLoading(false);
91
103
  showErrorDialog(err);
92
- return;
93
104
  }
94
105
  }
95
106