@gridsuite/commons-ui 0.62.0 → 0.63.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 (330) hide show
  1. package/dist/components/AuthenticationRouter/AuthenticationRouter.d.ts +21 -20
  2. package/dist/components/AuthenticationRouter/AuthenticationRouter.js +15 -13
  3. package/dist/components/AuthenticationRouter/index.d.ts +4 -7
  4. package/dist/components/AuthenticationRouter/index.js +2 -2
  5. package/dist/components/CardErrorBoundary/card-error-boundary.d.ts +0 -1
  6. package/dist/components/CardErrorBoundary/card-error-boundary.js +5 -3
  7. package/dist/components/CardErrorBoundary/index.d.ts +3 -7
  8. package/dist/components/CardErrorBoundary/index.js +2 -2
  9. package/dist/components/CustomAGGrid/custom-aggrid.js +1 -1
  10. package/dist/components/CustomAGGrid/custom-aggrid.style.js +5 -5
  11. package/dist/components/DirectoryItemSelector/directory-item-selector.d.ts +2 -3
  12. package/dist/components/DirectoryItemSelector/directory-item-selector.js +108 -105
  13. package/dist/components/ElementSearchDialog/element-search-dialog.d.ts +1 -1
  14. package/dist/components/ElementSearchDialog/element-search-dialog.js +2 -2
  15. package/dist/components/ElementSearchDialog/element-search-input.d.ts +1 -1
  16. package/dist/components/ElementSearchDialog/element-search-input.js +4 -6
  17. package/dist/components/ElementSearchDialog/equipment-item.d.ts +3 -3
  18. package/dist/components/ElementSearchDialog/equipment-item.js +13 -13
  19. package/dist/components/ElementSearchDialog/index.d.ts +3 -3
  20. package/dist/components/ElementSearchDialog/index.js +5 -5
  21. package/dist/components/ElementSearchDialog/tag-renderer.d.ts +11 -12
  22. package/dist/components/ElementSearchDialog/tag-renderer.js +5 -6
  23. package/dist/components/ElementSearchDialog/use-element-search.d.ts +2 -2
  24. package/dist/components/ElementSearchDialog/use-element-search.js +2 -2
  25. package/dist/components/ExpandableGroup/expandable-group.d.ts +3 -3
  26. package/dist/components/ExpandableGroup/expandable-group.js +6 -6
  27. package/dist/components/ExpandableGroup/index.d.ts +3 -7
  28. package/dist/components/ExpandableGroup/index.js +2 -2
  29. package/dist/components/FlatParameters/FlatParameters.d.ts +1 -1
  30. package/dist/components/FlatParameters/FlatParameters.js +46 -46
  31. package/dist/components/FlatParameters/index.d.ts +3 -7
  32. package/dist/components/Login/Login.d.ts +1 -7
  33. package/dist/components/Login/Login.js +3 -9
  34. package/dist/components/Login/Logout.d.ts +1 -1
  35. package/dist/components/Login/Logout.js +11 -11
  36. package/dist/components/Login/index.d.ts +3 -7
  37. package/dist/components/Login/index.js +2 -2
  38. package/dist/components/MuiVirtualizedTable/ColumnHeader.js +9 -8
  39. package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.d.ts +24 -9
  40. package/dist/components/MuiVirtualizedTable/KeyedColumnsRowIndexer.js +200 -205
  41. package/dist/components/MuiVirtualizedTable/MuiVirtualizedTable.js +6 -6
  42. package/dist/components/MuiVirtualizedTable/index.d.ts +2 -2
  43. package/dist/components/MuiVirtualizedTable/index.js +3 -3
  44. package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.d.ts +1 -1
  45. package/dist/components/MultipleSelectionDialog/MultipleSelectionDialog.js +5 -15
  46. package/dist/components/MultipleSelectionDialog/index.d.ts +3 -7
  47. package/dist/components/MultipleSelectionDialog/index.js +2 -2
  48. package/dist/components/OverflowableText/index.d.ts +3 -7
  49. package/dist/components/OverflowableText/overflowable-text.js +2 -2
  50. package/dist/components/ReportViewer/filter-button.d.ts +1 -1
  51. package/dist/components/ReportViewer/filter-button.js +3 -3
  52. package/dist/components/ReportViewer/index.d.ts +3 -7
  53. package/dist/components/ReportViewer/index.js +2 -2
  54. package/dist/components/ReportViewer/log-report-item.d.ts +1 -1
  55. package/dist/components/ReportViewer/log-report-item.js +12 -9
  56. package/dist/components/ReportViewer/log-report.js +3 -3
  57. package/dist/components/ReportViewer/log-table.d.ts +2 -1
  58. package/dist/components/ReportViewer/log-table.js +6 -5
  59. package/dist/components/ReportViewer/multi-select-list.d.ts +1 -1
  60. package/dist/components/ReportViewer/multi-select-list.js +3 -3
  61. package/dist/components/ReportViewer/report-item.js +4 -3
  62. package/dist/components/ReportViewer/report-viewer.js +11 -12
  63. package/dist/components/ReportViewerDialog/index.d.ts +3 -7
  64. package/dist/components/ReportViewerDialog/index.js +2 -2
  65. package/dist/components/SignInCallbackHandler/SignInCallbackHandler.d.ts +2 -2
  66. package/dist/components/SignInCallbackHandler/SignInCallbackHandler.js +3 -3
  67. package/dist/components/SignInCallbackHandler/index.d.ts +3 -7
  68. package/dist/components/SignInCallbackHandler/index.js +2 -2
  69. package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.d.ts +2 -2
  70. package/dist/components/SilentRenewCallbackHandler/SilentRenewCallbackHandler.js +3 -3
  71. package/dist/components/SilentRenewCallbackHandler/index.d.ts +3 -7
  72. package/dist/components/SilentRenewCallbackHandler/index.js +2 -2
  73. package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +1 -1
  74. package/dist/components/SnackbarProvider/SnackbarProvider.js +14 -13
  75. package/dist/components/SnackbarProvider/index.d.ts +3 -7
  76. package/dist/components/SnackbarProvider/index.js +2 -2
  77. package/dist/components/TopBar/AboutDialog.d.ts +2 -3
  78. package/dist/components/TopBar/AboutDialog.js +151 -153
  79. package/dist/components/TopBar/GridLogo.d.ts +2 -2
  80. package/dist/components/TopBar/GridLogo.js +24 -24
  81. package/dist/components/TopBar/TopBar.d.ts +5 -29
  82. package/dist/components/TopBar/TopBar.js +9 -33
  83. package/dist/components/TopBar/index.d.ts +1 -1
  84. package/dist/components/TopBar/index.js +1 -1
  85. package/dist/components/TreeViewFinder/TreeViewFinder.js +51 -45
  86. package/dist/components/TreeViewFinder/index.d.ts +1 -1
  87. package/dist/components/TreeViewFinder/index.js +1 -1
  88. package/dist/components/dialogs/custom-mui-dialog.d.ts +2 -2
  89. package/dist/components/dialogs/custom-mui-dialog.js +5 -5
  90. package/dist/components/dialogs/description-modification-dialog.d.ts +7 -3
  91. package/dist/components/dialogs/description-modification-dialog.js +11 -5
  92. package/dist/components/dialogs/modify-element-selection.d.ts +1 -2
  93. package/dist/components/dialogs/modify-element-selection.js +21 -13
  94. package/dist/components/dialogs/popup-confirmation-dialog.d.ts +7 -3
  95. package/dist/components/dialogs/popup-confirmation-dialog.js +3 -6
  96. package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.d.ts +4 -5
  97. package/dist/components/filter/criteria-based/criteria-based-filter-edition-dialog.js +123 -16
  98. package/dist/components/filter/criteria-based/criteria-based-filter-form.d.ts +1 -2
  99. package/dist/components/filter/criteria-based/criteria-based-filter-form.js +6 -5
  100. package/dist/components/filter/criteria-based/criteria-based-filter-utils.js +27 -20
  101. package/dist/components/filter/criteria-based/criteria-based-form.d.ts +1 -2
  102. package/dist/components/filter/criteria-based/criteria-based-form.js +17 -6
  103. package/dist/components/filter/criteria-based/filter-free-properties.d.ts +5 -3
  104. package/dist/components/filter/criteria-based/filter-free-properties.js +69 -13
  105. package/dist/components/filter/criteria-based/filter-properties.d.ts +1 -6
  106. package/dist/components/filter/criteria-based/filter-properties.js +124 -16
  107. package/dist/components/filter/criteria-based/filter-property.d.ts +1 -2
  108. package/dist/components/filter/criteria-based/filter-property.js +16 -16
  109. package/dist/components/filter/expert/expert-filter-constants.d.ts +8 -1
  110. package/dist/components/filter/expert/expert-filter-constants.js +7 -0
  111. package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +3 -4
  112. package/dist/components/filter/expert/expert-filter-edition-dialog.js +128 -15
  113. package/dist/components/filter/expert/expert-filter-form.d.ts +2 -2
  114. package/dist/components/filter/expert/expert-filter-form.js +115 -20
  115. package/dist/components/filter/expert/expert-filter-utils.d.ts +2 -2
  116. package/dist/components/filter/expert/expert-filter-utils.js +58 -46
  117. package/dist/components/filter/expert/expert-filter.type.d.ts +4 -0
  118. package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.d.ts +3 -4
  119. package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +136 -16
  120. package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +4 -5
  121. package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +241 -24
  122. package/dist/components/filter/filter-creation-dialog.d.ts +3 -4
  123. package/dist/components/filter/filter-creation-dialog.js +125 -13
  124. package/dist/components/filter/filter-form.d.ts +4 -5
  125. package/dist/components/filter/filter-form.js +73 -14
  126. package/dist/components/filter/utils/filter-api.js +1 -1
  127. package/dist/components/filter/utils/filter-form-utils.js +1 -1
  128. package/dist/components/inputs/react-hook-form/ExpandingTextField.d.ts +1 -2
  129. package/dist/components/inputs/react-hook-form/ExpandingTextField.js +5 -5
  130. package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.d.ts +1 -2
  131. package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +102 -13
  132. package/dist/components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.d.ts +7 -6
  133. package/dist/components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.js +13 -15
  134. package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.d.ts +7 -3
  135. package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +220 -61
  136. package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.d.ts +1 -2
  137. package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +243 -11
  138. package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.d.ts +4 -2
  139. package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js +12 -12
  140. package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.d.ts +1 -1
  141. package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js +2 -2
  142. package/dist/components/inputs/react-hook-form/booleans/boolean-input.d.ts +1 -1
  143. package/dist/components/inputs/react-hook-form/booleans/boolean-input.js +2 -2
  144. package/dist/components/inputs/react-hook-form/booleans/checkbox-input.d.ts +1 -1
  145. package/dist/components/inputs/react-hook-form/booleans/checkbox-input.js +3 -3
  146. package/dist/components/inputs/react-hook-form/booleans/switch-input.d.ts +1 -1
  147. package/dist/components/inputs/react-hook-form/booleans/switch-input.js +3 -3
  148. package/dist/components/inputs/react-hook-form/directory-items-input.d.ts +11 -3
  149. package/dist/components/inputs/react-hook-form/directory-items-input.js +11 -11
  150. package/dist/components/inputs/react-hook-form/error-management/error-input.d.ts +2 -2
  151. package/dist/components/inputs/react-hook-form/error-management/error-input.js +7 -9
  152. package/dist/components/inputs/react-hook-form/error-management/field-error-alert.d.ts +2 -2
  153. package/dist/components/inputs/react-hook-form/error-management/field-error-alert.js +2 -4
  154. package/dist/components/inputs/react-hook-form/error-management/mid-form-error.d.ts +2 -2
  155. package/dist/components/inputs/react-hook-form/error-management/mid-form-error.js +2 -2
  156. package/dist/components/inputs/react-hook-form/numbers/float-input.d.ts +1 -2
  157. package/dist/components/inputs/react-hook-form/numbers/float-input.js +6 -5
  158. package/dist/components/inputs/react-hook-form/numbers/integer-input.d.ts +1 -1
  159. package/dist/components/inputs/react-hook-form/numbers/integer-input.js +5 -5
  160. package/dist/components/inputs/react-hook-form/provider/custom-form-provider.d.ts +1 -1
  161. package/dist/components/inputs/react-hook-form/provider/custom-form-provider.js +11 -8
  162. package/dist/components/inputs/react-hook-form/provider/use-custom-form-context.d.ts +2 -1
  163. package/dist/components/inputs/react-hook-form/provider/use-custom-form-context.js +1 -1
  164. package/dist/components/inputs/react-hook-form/radio-input.d.ts +1 -1
  165. package/dist/components/inputs/react-hook-form/radio-input.js +2 -8
  166. package/dist/components/inputs/react-hook-form/range-input.d.ts +1 -2
  167. package/dist/components/inputs/react-hook-form/range-input.js +5 -5
  168. package/dist/components/inputs/react-hook-form/raw-read-only-input.d.ts +2 -1
  169. package/dist/components/inputs/react-hook-form/raw-read-only-input.js +1 -1
  170. package/dist/components/inputs/react-hook-form/select-inputs/countries-input.d.ts +1 -3
  171. package/dist/components/inputs/react-hook-form/select-inputs/countries-input.js +4 -8
  172. package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.d.ts +3 -1
  173. package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js +4 -4
  174. package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.d.ts +1 -2
  175. package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.js +11 -10
  176. package/dist/components/inputs/react-hook-form/select-inputs/select-input.d.ts +1 -2
  177. package/dist/components/inputs/react-hook-form/select-inputs/select-input.js +16 -8
  178. package/dist/components/inputs/react-hook-form/slider-input.d.ts +1 -1
  179. package/dist/components/inputs/react-hook-form/slider-input.js +6 -6
  180. package/dist/components/inputs/react-hook-form/text-input.d.ts +6 -2
  181. package/dist/components/inputs/react-hook-form/text-input.js +9 -9
  182. package/dist/components/inputs/react-hook-form/unique-name-input.d.ts +4 -6
  183. package/dist/components/inputs/react-hook-form/unique-name-input.js +12 -12
  184. package/dist/components/inputs/react-hook-form/utils/cancel-button.d.ts +9 -10
  185. package/dist/components/inputs/react-hook-form/utils/cancel-button.js +2 -6
  186. package/dist/components/inputs/react-hook-form/utils/field-label.d.ts +1 -1
  187. package/dist/components/inputs/react-hook-form/utils/field-label.js +3 -3
  188. package/dist/components/inputs/react-hook-form/utils/functions.js +1 -1
  189. package/dist/components/inputs/react-hook-form/utils/submit-button.d.ts +9 -10
  190. package/dist/components/inputs/react-hook-form/utils/submit-button.js +2 -6
  191. package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.d.ts +1 -2
  192. package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.js +7 -7
  193. package/dist/components/inputs/react-query-builder/add-button.d.ts +1 -2
  194. package/dist/components/inputs/react-query-builder/add-button.js +13 -10
  195. package/dist/components/inputs/react-query-builder/combinator-selector.d.ts +1 -2
  196. package/dist/components/inputs/react-query-builder/combinator-selector.js +7 -6
  197. package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.d.ts +1 -1
  198. package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.js +2 -2
  199. package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.d.ts +1 -1
  200. package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.js +5 -5
  201. package/dist/components/inputs/react-query-builder/country-value-editor.d.ts +1 -2
  202. package/dist/components/inputs/react-query-builder/country-value-editor.js +18 -18
  203. package/dist/components/inputs/react-query-builder/custom-react-query-builder.d.ts +1 -1
  204. package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +92 -19
  205. package/dist/components/inputs/react-query-builder/element-value-editor.d.ts +7 -3
  206. package/dist/components/inputs/react-query-builder/element-value-editor.js +50 -62
  207. package/dist/components/inputs/react-query-builder/property-value-editor.d.ts +1 -2
  208. package/dist/components/inputs/react-query-builder/property-value-editor.js +5 -5
  209. package/dist/components/inputs/react-query-builder/remove-button.d.ts +1 -2
  210. package/dist/components/inputs/react-query-builder/remove-button.js +26 -7
  211. package/dist/components/inputs/react-query-builder/text-value-editor.d.ts +1 -2
  212. package/dist/components/inputs/react-query-builder/text-value-editor.js +17 -17
  213. package/dist/components/inputs/react-query-builder/translated-value-editor.d.ts +1 -2
  214. package/dist/components/inputs/react-query-builder/translated-value-editor.js +22 -26
  215. package/dist/components/inputs/react-query-builder/value-editor.d.ts +1 -2
  216. package/dist/components/inputs/react-query-builder/value-editor.js +119 -18
  217. package/dist/components/inputs/react-query-builder/value-selector.d.ts +1 -1
  218. package/dist/components/inputs/react-query-builder/value-selector.js +2 -2
  219. package/dist/components/inputs/select-clearable.d.ts +1 -2
  220. package/dist/components/inputs/select-clearable.js +6 -5
  221. package/dist/components/translations/card-error-boundary-en.d.ts +2 -2
  222. package/dist/components/translations/card-error-boundary-en.js +2 -2
  223. package/dist/components/translations/card-error-boundary-fr.d.ts +2 -2
  224. package/dist/components/translations/card-error-boundary-fr.js +2 -2
  225. package/dist/components/translations/common-button-en.d.ts +2 -2
  226. package/dist/components/translations/common-button-en.js +2 -2
  227. package/dist/components/translations/common-button-fr.d.ts +2 -2
  228. package/dist/components/translations/common-button-fr.js +2 -2
  229. package/dist/components/translations/directory-items-input-en.d.ts +2 -2
  230. package/dist/components/translations/directory-items-input-en.js +2 -2
  231. package/dist/components/translations/directory-items-input-fr.d.ts +2 -2
  232. package/dist/components/translations/directory-items-input-fr.js +2 -2
  233. package/dist/components/translations/element-search-en.d.ts +2 -2
  234. package/dist/components/translations/element-search-en.js +2 -2
  235. package/dist/components/translations/element-search-fr.d.ts +2 -2
  236. package/dist/components/translations/element-search-fr.js +2 -2
  237. package/dist/components/translations/equipment-search-en.d.ts +2 -2
  238. package/dist/components/translations/equipment-search-en.js +2 -2
  239. package/dist/components/translations/equipment-search-fr.d.ts +2 -2
  240. package/dist/components/translations/equipment-search-fr.js +2 -2
  241. package/dist/components/translations/filter-en.d.ts +3 -2
  242. package/dist/components/translations/filter-en.js +3 -2
  243. package/dist/components/translations/filter-expert-en.d.ts +2 -2
  244. package/dist/components/translations/filter-expert-en.js +2 -2
  245. package/dist/components/translations/filter-expert-fr.d.ts +2 -2
  246. package/dist/components/translations/filter-expert-fr.js +2 -2
  247. package/dist/components/translations/filter-fr.d.ts +3 -2
  248. package/dist/components/translations/filter-fr.js +3 -2
  249. package/dist/components/translations/flat-parameters-en.d.ts +2 -2
  250. package/dist/components/translations/flat-parameters-en.js +2 -2
  251. package/dist/components/translations/flat-parameters-fr.d.ts +2 -2
  252. package/dist/components/translations/flat-parameters-fr.js +2 -2
  253. package/dist/components/translations/inputs-en.d.ts +2 -2
  254. package/dist/components/translations/inputs-en.js +2 -2
  255. package/dist/components/translations/inputs-fr.d.ts +2 -2
  256. package/dist/components/translations/inputs-fr.js +2 -2
  257. package/dist/components/translations/login-en.d.ts +2 -2
  258. package/dist/components/translations/login-en.js +2 -2
  259. package/dist/components/translations/login-fr.d.ts +2 -2
  260. package/dist/components/translations/login-fr.js +2 -2
  261. package/dist/components/translations/multiple-selection-dialog-en.d.ts +2 -2
  262. package/dist/components/translations/multiple-selection-dialog-en.js +2 -2
  263. package/dist/components/translations/multiple-selection-dialog-fr.d.ts +2 -2
  264. package/dist/components/translations/multiple-selection-dialog-fr.js +2 -2
  265. package/dist/components/translations/report-viewer-en.d.ts +2 -2
  266. package/dist/components/translations/report-viewer-en.js +2 -2
  267. package/dist/components/translations/report-viewer-fr.d.ts +2 -2
  268. package/dist/components/translations/report-viewer-fr.js +2 -2
  269. package/dist/components/translations/table-en.d.ts +2 -2
  270. package/dist/components/translations/table-en.js +2 -2
  271. package/dist/components/translations/table-fr.d.ts +2 -2
  272. package/dist/components/translations/table-fr.js +2 -2
  273. package/dist/components/translations/top-bar-en.d.ts +2 -2
  274. package/dist/components/translations/top-bar-en.js +2 -2
  275. package/dist/components/translations/top-bar-fr.d.ts +2 -2
  276. package/dist/components/translations/top-bar-fr.js +2 -2
  277. package/dist/components/translations/treeview-finder-en.d.ts +2 -2
  278. package/dist/components/translations/treeview-finder-en.js +2 -2
  279. package/dist/components/translations/treeview-finder-fr.d.ts +2 -2
  280. package/dist/components/translations/treeview-finder-fr.js +2 -2
  281. package/dist/hooks/localized-countries-hook.js +1 -1
  282. package/dist/hooks/predefined-properties-hook.d.ts +2 -1
  283. package/dist/hooks/predefined-properties-hook.js +2 -2
  284. package/dist/hooks/useDebounce.d.ts +2 -1
  285. package/dist/hooks/useDebounce.js +1 -1
  286. package/dist/hooks/useIntlRef.d.ts +2 -1
  287. package/dist/hooks/useIntlRef.js +1 -1
  288. package/dist/hooks/usePrevious.d.ts +2 -0
  289. package/dist/hooks/usePrevious.js +12 -0
  290. package/dist/hooks/useSnackMessage.d.ts +2 -2
  291. package/dist/hooks/useSnackMessage.js +36 -36
  292. package/dist/index.d.ts +27 -16
  293. package/dist/index.js +183 -159
  294. package/dist/redux/authActions.d.ts +56 -0
  295. package/dist/redux/commonStore.d.ts +4 -3
  296. package/dist/redux/commonStore.js +2 -1
  297. package/dist/services/apps-metadata.js +1 -1
  298. package/dist/services/directory.js +6 -6
  299. package/dist/services/explore.js +14 -12
  300. package/dist/services/index.d.ts +0 -5
  301. package/dist/services/study.js +2 -2
  302. package/dist/services/utils.d.ts +1 -1
  303. package/dist/services/utils.js +26 -26
  304. package/dist/utils/AuthService.d.ts +9 -8
  305. package/dist/utils/AuthService.js +77 -76
  306. package/dist/utils/ElementIcon.d.ts +3 -2
  307. package/dist/utils/ElementIcon.js +4 -3
  308. package/dist/utils/ElementType.d.ts +3 -6
  309. package/dist/utils/EquipmentType.js +3 -3
  310. package/dist/utils/FetchStatus.d.ts +2 -1
  311. package/dist/utils/FetchStatus.js +1 -1
  312. package/dist/utils/Metadata.d.ts +15 -0
  313. package/dist/utils/Metadata.js +1 -0
  314. package/dist/utils/UserManagerMock.d.ts +50 -25
  315. package/dist/utils/UserManagerMock.js +118 -11
  316. package/dist/utils/algos.d.ts +2 -1
  317. package/dist/utils/algos.js +2 -2
  318. package/dist/utils/equipment-types-for-predefined-properties-mapper.d.ts +2 -1
  319. package/dist/utils/equipment-types-for-predefined-properties-mapper.js +3 -1
  320. package/dist/utils/field-constants.d.ts +2 -1
  321. package/dist/utils/field-constants.js +1 -1
  322. package/dist/utils/functions.js +5 -2
  323. package/dist/utils/types.d.ts +1 -1
  324. package/dist/utils/yup-config.js +1 -2
  325. package/package.json +10 -4
  326. package/dist/chunks/criteria-based-filter-edition-dialog.CAT38SvB.js +0 -1694
  327. package/dist/chunks/filter-properties.B7-q_yPf.js +0 -195
  328. package/dist/redux/actions.d.ts +0 -54
  329. /package/dist/assets/{criteria-based-filter-edition-dialog.css → expert-filter-form.css} +0 -0
  330. /package/dist/redux/{actions.js → authActions.js} +0 -0
@@ -1,63 +1,222 @@
1
- import "react/jsx-runtime";
2
- import "@mui/material/Dialog";
3
- import "@mui/material/DialogTitle";
4
- import "@mui/material/DialogContent";
5
- import "@mui/material/DialogActions";
6
- import "react-papaparse";
7
- import "@mui/material/Button";
8
- import "react";
9
- import "@mui/material/Grid";
10
- import "react-intl";
11
- import "react-csv-downloader";
12
- import "@mui/material/Alert";
13
- import "@mui/material";
14
- import "react-hook-form";
15
- import "../../../../TreeViewFinder/TreeViewFinder.js";
16
- import "../../../../TopBar/TopBar.js";
17
- import "@mui/icons-material";
18
- import "@mui/lab";
19
- import "notistack";
20
- import "react-router-dom";
21
- import "../../../../../utils/AuthService.js";
22
- import "../../../../MuiVirtualizedTable/MuiVirtualizedTable.js";
23
- import "../../../../ReportViewer/report-item.js";
24
- import "uuid";
25
- import "../../../../ReportViewer/log-table.js";
26
- import "../../../../ReportViewer/report-tree-view-context.js";
27
- import "@mui/x-tree-view";
28
- import "../../../../OverflowableText/overflowable-text.js";
29
- import "clsx";
30
- import "../../utils/submit-button.js";
31
- import "../../utils/cancel-button.js";
32
- import "../../provider/custom-form-provider.js";
33
- import "../../../../dialogs/description-modification-dialog.js";
34
- import "../../../../../utils/field-constants.js";
35
- import "yup";
36
- import "../../../../dialogs/popup-confirmation-dialog.js";
37
- import { c } from "../../../../../chunks/criteria-based-filter-edition-dialog.CAT38SvB.js";
38
- import "ag-grid-react";
39
- import "ag-grid-community/styles/ag-grid.css";
40
- import "ag-grid-community/styles/ag-theme-alpine.css";
41
- import "autosuggest-highlight/match";
42
- import "autosuggest-highlight/parse";
43
- import "../../../../CardErrorBoundary/card-error-boundary.js";
44
- import "@mui/icons-material/Folder";
45
- import "../../../../CustomAGGrid/custom-aggrid.js";
46
- import "../../../../../chunks/filter-properties.B7-q_yPf.js";
47
- import "@mui/icons-material/Delete";
48
- import "@mui/material/IconButton";
49
- import "../../../../../utils/yup-config.js";
50
- import "../../range-input.js";
51
- import "../../../../filter/expert/expert-filter-utils.js";
52
- import "../../select-inputs/mui-select-input.js";
53
- import "localized-countries";
54
- import "localized-countries/data/fr";
55
- import "localized-countries/data/en";
56
- import "@mui/icons-material/Check";
57
- import "@mui/material/CircularProgress";
58
- import "@mui/material/TextField";
59
- import "../../../../filter/utils/filter-form-utils.js";
60
- import "papaparse";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
+ import Dialog from "@mui/material/Dialog";
3
+ import DialogTitle from "@mui/material/DialogTitle";
4
+ import DialogContent from "@mui/material/DialogContent";
5
+ import DialogActions from "@mui/material/DialogActions";
6
+ import { useCSVReader } from "react-papaparse";
7
+ import Button from "@mui/material/Button";
8
+ import React, { useState, useMemo } from "react";
9
+ import Grid from "@mui/material/Grid";
10
+ import { useIntl, FormattedMessage } from "react-intl";
11
+ import CsvDownloader from "react-csv-downloader";
12
+ import Alert from "@mui/material/Alert";
13
+ import { DialogContentText } from "@mui/material";
14
+ import { useWatch } from "react-hook-form";
15
+ import { RECORD_SEP, UNIT_SEP } from "papaparse";
16
+ import FieldConstants from "../../../../../utils/field-constants.js";
17
+ import CancelButton from "../../utils/cancel-button.js";
18
+ function CsvUploader({
19
+ name,
20
+ onClose,
21
+ open,
22
+ title,
23
+ fileHeaders,
24
+ fileName,
25
+ csvData,
26
+ validateData = () => true,
27
+ getDataFromCsv,
28
+ useFieldArrayOutput
29
+ }) {
30
+ const watchTableValues = useWatch({ name });
31
+ const { append, replace } = useFieldArrayOutput;
32
+ const [createError, setCreateError] = React.useState("");
33
+ const intl = useIntl();
34
+ const { CSVReader } = useCSVReader();
35
+ const [importedData, setImportedData] = useState([]);
36
+ const [isConfirmationPopupOpen, setIsConfirmationPopupOpen] = useState(false);
37
+ const data = useMemo(() => {
38
+ const newData = [...[fileHeaders]];
39
+ if (Array.isArray(csvData)) {
40
+ csvData.forEach((row) => newData.push([row]));
41
+ }
42
+ return newData;
43
+ }, [csvData, fileHeaders]);
44
+ const handleClose = () => {
45
+ onClose();
46
+ setCreateError("");
47
+ };
48
+ const validateCsvFile = (rows) => {
49
+ if (rows.length === 0) {
50
+ setCreateError(intl.formatMessage({ id: "noDataInCsvFile" }));
51
+ return false;
52
+ }
53
+ for (let i = 0; i < fileHeaders.length; i++) {
54
+ if (fileHeaders[i] !== "" && rows[0][i] !== fileHeaders[i]) {
55
+ setCreateError(
56
+ intl.formatMessage({ id: "wrongCsvHeadersError" })
57
+ );
58
+ return false;
59
+ }
60
+ }
61
+ return validateData(rows);
62
+ };
63
+ const getResultsFromImportedData = () => {
64
+ return importedData.filter((row) => {
65
+ if (row[0].startsWith("#")) {
66
+ return false;
67
+ }
68
+ return row.some((column) => !!(column == null ? void 0 : column.trim()));
69
+ });
70
+ };
71
+ const handleFileSubmit = (keepTableValues) => {
72
+ if (importedData.length !== 0) {
73
+ const result = getResultsFromImportedData();
74
+ if (validateCsvFile(result)) {
75
+ result.splice(0, 1);
76
+ const dataFromCsv = getDataFromCsv(result);
77
+ if (keepTableValues) {
78
+ append(dataFromCsv);
79
+ } else {
80
+ replace(dataFromCsv);
81
+ }
82
+ handleClose();
83
+ }
84
+ } else {
85
+ setCreateError(intl.formatMessage({ id: "noDataInCsvFile" }));
86
+ }
87
+ };
88
+ const handleOpenCSVConfirmationDataDialog = () => {
89
+ const isValuesInTable = Array.isArray(watchTableValues) && watchTableValues.some(
90
+ (val) => val && Object.keys(val).filter(
91
+ (key) => key !== FieldConstants.AG_GRID_ROW_UUID
92
+ ).some(
93
+ (e) => val[e] !== void 0 && val[e] !== null && String(val[e]).trim().length > 0
94
+ )
95
+ );
96
+ if (isValuesInTable && getResultsFromImportedData().length > 0) {
97
+ setIsConfirmationPopupOpen(true);
98
+ } else {
99
+ setIsConfirmationPopupOpen(false);
100
+ handleFileSubmit(false);
101
+ }
102
+ };
103
+ const handleAddPopupConfirmation = () => {
104
+ handleFileSubmit(true);
105
+ setIsConfirmationPopupOpen(false);
106
+ };
107
+ const handleReplacePopupConfirmation = () => {
108
+ handleFileSubmit(false);
109
+ setIsConfirmationPopupOpen(false);
110
+ };
111
+ const handleCancelDialog = () => {
112
+ setIsConfirmationPopupOpen(false);
113
+ };
114
+ const renderConfirmationCsvData = () => {
115
+ return /* @__PURE__ */ jsxs(
116
+ Dialog,
117
+ {
118
+ open: isConfirmationPopupOpen,
119
+ "aria-labelledby": "dialog-confirmation-csv-data",
120
+ children: [
121
+ /* @__PURE__ */ jsx(DialogTitle, { id: "dialog-confirmation-csv-data", children: "Confirmation" }),
122
+ /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsx(DialogContentText, { children: intl.formatMessage({ id: "keepCSVDataMessage" }) }) }),
123
+ /* @__PURE__ */ jsxs(DialogActions, { children: [
124
+ /* @__PURE__ */ jsx(CancelButton, { onClick: handleCancelDialog }),
125
+ /* @__PURE__ */ jsx(
126
+ Button,
127
+ {
128
+ onClick: () => handleReplacePopupConfirmation(),
129
+ variant: "outlined",
130
+ children: /* @__PURE__ */ jsx(FormattedMessage, { id: "replace" })
131
+ }
132
+ ),
133
+ /* @__PURE__ */ jsx(
134
+ Button,
135
+ {
136
+ onClick: () => handleAddPopupConfirmation(),
137
+ variant: "outlined",
138
+ children: /* @__PURE__ */ jsx(FormattedMessage, { id: "add" })
139
+ }
140
+ )
141
+ ] })
142
+ ]
143
+ }
144
+ );
145
+ };
146
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
147
+ /* @__PURE__ */ jsxs(Dialog, { open, onClose: handleClose, fullWidth: true, children: [
148
+ /* @__PURE__ */ jsx(DialogTitle, { children: title }),
149
+ /* @__PURE__ */ jsx(DialogContent, { children: /* @__PURE__ */ jsxs("div", { children: [
150
+ /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
151
+ /* @__PURE__ */ jsx(Grid, { container: true, item: true, children: /* @__PURE__ */ jsx(Grid, { item: true, xs: 6, children: /* @__PURE__ */ jsx(
152
+ CsvDownloader,
153
+ {
154
+ datas: data,
155
+ filename: fileName,
156
+ separator: ",",
157
+ children: /* @__PURE__ */ jsx(Button, { variant: "contained", children: /* @__PURE__ */ jsx(FormattedMessage, { id: "GenerateCSV" }) })
158
+ }
159
+ ) }) }),
160
+ /* @__PURE__ */ jsx(Grid, { container: true, item: true, spacing: 3, children: /* @__PURE__ */ jsx(
161
+ CSVReader,
162
+ {
163
+ onUploadAccepted: (results) => {
164
+ setImportedData([...results.data]);
165
+ setCreateError("");
166
+ },
167
+ config: {
168
+ // We use | for multi values in one cell, then we remove it from the default value for this config, to avoid delimiter autodetection
169
+ delimitersToGuess: [
170
+ ",",
171
+ " ",
172
+ ";",
173
+ RECORD_SEP,
174
+ UNIT_SEP
175
+ ]
176
+ },
177
+ children: ({ getRootProps, acceptedFile }) => /* @__PURE__ */ jsxs(Grid, { item: true, children: [
178
+ /* @__PURE__ */ jsx(
179
+ Button,
180
+ {
181
+ ...getRootProps(),
182
+ variant: "contained",
183
+ children: /* @__PURE__ */ jsx(FormattedMessage, { id: "UploadCSV" })
184
+ }
185
+ ),
186
+ /* @__PURE__ */ jsx(
187
+ "span",
188
+ {
189
+ style: {
190
+ marginLeft: "10px",
191
+ fontWeight: "bold"
192
+ },
193
+ children: acceptedFile ? acceptedFile.name : intl.formatMessage({
194
+ id: "uploadMessage"
195
+ })
196
+ }
197
+ )
198
+ ] })
199
+ }
200
+ ) })
201
+ ] }),
202
+ createError !== "" && /* @__PURE__ */ jsx(Alert, { severity: "error", children: createError })
203
+ ] }) }),
204
+ /* @__PURE__ */ jsxs(DialogActions, { children: [
205
+ /* @__PURE__ */ jsx(CancelButton, { onClick: handleClose }),
206
+ /* @__PURE__ */ jsx(
207
+ Button,
208
+ {
209
+ variant: "outlined",
210
+ onClick: () => handleOpenCSVConfirmationDataDialog(),
211
+ disabled: createError !== "",
212
+ children: /* @__PURE__ */ jsx(FormattedMessage, { id: "validate" })
213
+ }
214
+ )
215
+ ] })
216
+ ] }),
217
+ renderConfirmationCsvData()
218
+ ] });
219
+ }
61
220
  export {
62
- c as default
221
+ CsvUploader as default
63
222
  };
@@ -1,4 +1,3 @@
1
- import { FunctionComponent } from 'react';
2
1
 
3
2
  export declare const ROW_DRAGGING_SELECTION_COLUMN_DEF: {
4
3
  rowDrag: boolean;
@@ -19,5 +18,5 @@ export interface CustomAgGridTableProps {
19
18
  alwaysShowVerticalScroll: boolean;
20
19
  stopEditingWhenCellsLoseFocus: boolean;
21
20
  }
22
- export declare const CustomAgGridTable: FunctionComponent<CustomAgGridTableProps>;
21
+ declare function CustomAgGridTable({ name, columnDefs, makeDefaultRowData, csvProps, cssProps, defaultColDef, pagination, paginationPageSize, suppressRowClickSelection, alwaysShowVerticalScroll, stopEditingWhenCellsLoseFocus, ...props }: CustomAgGridTableProps): import("react/jsx-runtime").JSX.Element;
23
22
  export default CustomAgGridTable;
@@ -1,15 +1,247 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "react-hook-form";
4
- import "ag-grid-react";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState, useCallback, useEffect } from "react";
3
+ import { useFormContext, useFieldArray } from "react-hook-form";
4
+ import { AgGridReact } from "ag-grid-react";
5
5
  import "ag-grid-community/styles/ag-grid.css";
6
6
  import "ag-grid-community/styles/ag-theme-alpine.css";
7
- import "@mui/material";
8
- import { C, R, C as C2 } from "../../../../chunks/criteria-based-filter-edition-dialog.CAT38SvB.js";
9
- import "react-intl";
10
- import "../../../../utils/field-constants.js";
7
+ import { useTheme, Grid } from "@mui/material";
8
+ import { useIntl } from "react-intl";
9
+ import BottomRightButtons from "./bottom-right-buttons.js";
10
+ import FieldConstants from "../../../../utils/field-constants.js";
11
+ const ROW_DRAGGING_SELECTION_COLUMN_DEF = [
12
+ {
13
+ rowDrag: true,
14
+ headerCheckboxSelection: true,
15
+ checkboxSelection: true,
16
+ maxWidth: 50
17
+ }
18
+ ];
19
+ const style = (customProps) => ({
20
+ grid: (theme) => ({
21
+ width: "auto",
22
+ height: "100%",
23
+ position: "relative",
24
+ // - AG Grid colors override -
25
+ // It shouldn't be exactly like this, but I couldn't make it works otherwise
26
+ // https://www.ag-grid.com/react-data-grid/global-style-customisation/
27
+ "--ag-alpine-active-color": `${theme.palette.primary.main} !important`,
28
+ "--ag-checkbox-indeterminate-color": `${theme.palette.primary.main} !important`,
29
+ "--ag-background-color": `${theme.agGridBackground.color} !important`,
30
+ "--ag-header-background-color": `${theme.agGridBackground.color} !important`,
31
+ "--ag-odd-row-background-color": `${theme.agGridBackground.color} !important`,
32
+ "--ag-modal-overlay-background-color": `${theme.agGridBackground.color} !important`,
33
+ "--ag-selected-row-background-color": "transparent !important",
34
+ "--ag-range-selection-border-color": "transparent !important",
35
+ // overrides the default computed max height for ag grid default selector editor to make it more usable
36
+ // can be removed if a custom selector editor is implemented
37
+ "& .ag-select-list": {
38
+ maxHeight: "300px !important"
39
+ },
40
+ "& .ag-root-wrapper-body": {
41
+ maxHeight: "500px"
42
+ },
43
+ "& .ag-cell": {
44
+ boxShadow: "none"
45
+ },
46
+ "& .ag-cell-edit-wrapper": {
47
+ height: "inherit"
48
+ },
49
+ "& .ag-row-hover": {
50
+ cursor: "text"
51
+ },
52
+ "& .ag-overlay-loading-center": {
53
+ border: "none",
54
+ boxShadow: "none"
55
+ },
56
+ "& .numeric-input": {
57
+ fontSize: "calc(var(--ag-font-size) + 1px)",
58
+ paddingLeft: "calc(var(--ag-cell-horizontal-padding) - 1px)",
59
+ width: "100%",
60
+ height: "100%",
61
+ border: "inherit",
62
+ outline: "inherit",
63
+ backgroundColor: theme.agGridBackground.color
64
+ },
65
+ "& .Mui-focused .MuiOutlinedInput-root": {
66
+ // borders moves row height
67
+ outline: "var(--ag-borders-input) var(--ag-input-focus-border-color)",
68
+ outlineOffset: "-1px",
69
+ backgroundColor: theme.agGridBackground.color
70
+ },
71
+ ...customProps
72
+ })
73
+ });
74
+ function CustomAgGridTable({
75
+ name,
76
+ columnDefs,
77
+ makeDefaultRowData,
78
+ csvProps,
79
+ cssProps,
80
+ defaultColDef,
81
+ pagination,
82
+ paginationPageSize,
83
+ suppressRowClickSelection,
84
+ alwaysShowVerticalScroll,
85
+ stopEditingWhenCellsLoseFocus,
86
+ ...props
87
+ }) {
88
+ var _a, _b;
89
+ const theme = useTheme();
90
+ const [gridApi, setGridApi] = useState(null);
91
+ const [selectedRows, setSelectedRows] = useState([]);
92
+ const [newRowAdded, setNewRowAdded] = useState(false);
93
+ const [isSortApplied, setIsSortApplied] = useState(false);
94
+ const { control, getValues, watch } = useFormContext();
95
+ const useFieldArrayOutput = useFieldArray({
96
+ control,
97
+ name
98
+ });
99
+ const { append, remove, update, swap, move } = useFieldArrayOutput;
100
+ const rowData = watch(name);
101
+ const isFirstSelected = Boolean(
102
+ (rowData == null ? void 0 : rowData.length) && ((_a = gridApi == null ? void 0 : gridApi.api.getRowNode(rowData[0][FieldConstants.AG_GRID_ROW_UUID])) == null ? void 0 : _a.isSelected())
103
+ );
104
+ const isLastSelected = Boolean(
105
+ (rowData == null ? void 0 : rowData.length) && ((_b = gridApi == null ? void 0 : gridApi.api.getRowNode(
106
+ rowData[rowData.length - 1][FieldConstants.AG_GRID_ROW_UUID]
107
+ )) == null ? void 0 : _b.isSelected())
108
+ );
109
+ const noRowSelected = selectedRows.length === 0;
110
+ const getIndex = useCallback(
111
+ (val) => {
112
+ return getValues(name).findIndex(
113
+ (row) => row[FieldConstants.AG_GRID_ROW_UUID] === val[FieldConstants.AG_GRID_ROW_UUID]
114
+ );
115
+ },
116
+ [getValues, name]
117
+ );
118
+ const handleMoveRowUp = () => {
119
+ selectedRows.map((row) => getIndex(row)).sort().forEach((idx) => {
120
+ swap(idx, idx - 1);
121
+ });
122
+ };
123
+ const handleMoveRowDown = () => {
124
+ selectedRows.map((row) => getIndex(row)).sort().reverse().forEach((idx) => {
125
+ swap(idx, idx + 1);
126
+ });
127
+ };
128
+ const handleDeleteRows = () => {
129
+ if (selectedRows.length === rowData.length) {
130
+ remove();
131
+ } else {
132
+ selectedRows.forEach((val) => {
133
+ const idx = getIndex(val);
134
+ remove(idx);
135
+ });
136
+ }
137
+ };
138
+ useEffect(() => {
139
+ if (gridApi) {
140
+ gridApi.api.refreshCells({
141
+ force: true
142
+ });
143
+ }
144
+ }, [gridApi, rowData]);
145
+ const handleAddRow = () => {
146
+ append(makeDefaultRowData());
147
+ setNewRowAdded(true);
148
+ };
149
+ useEffect(() => {
150
+ if (gridApi) {
151
+ gridApi.api.sizeColumnsToFit();
152
+ }
153
+ }, [columnDefs, gridApi]);
154
+ const intl = useIntl();
155
+ const getLocaleText = useCallback(
156
+ (params) => {
157
+ const key = `agGrid.${params.key}`;
158
+ return intl.messages[key] || params.defaultValue;
159
+ },
160
+ [intl]
161
+ );
162
+ const onGridReady = (params) => {
163
+ setGridApi(params);
164
+ };
165
+ const onRowDataUpdated = () => {
166
+ setNewRowAdded(false);
167
+ if (gridApi == null ? void 0 : gridApi.api) {
168
+ const lastIndex = rowData.length - 1;
169
+ gridApi.api.paginationGoToLastPage();
170
+ gridApi.api.ensureIndexVisible(lastIndex, "bottom");
171
+ }
172
+ };
173
+ const onCellEditingStopped = useCallback(
174
+ (event) => {
175
+ const rowIndex = getIndex(event.data);
176
+ if (rowIndex === -1) {
177
+ return;
178
+ }
179
+ update(rowIndex, event.data);
180
+ },
181
+ [getIndex, update]
182
+ );
183
+ const onSortChanged = useCallback((event) => {
184
+ const isAnycolumnhasSort = event.api.getColumnState().some((col) => col.sort);
185
+ setIsSortApplied(isAnycolumnhasSort);
186
+ }, []);
187
+ return /* @__PURE__ */ jsxs(Grid, { container: true, spacing: 2, children: [
188
+ /* @__PURE__ */ jsx(
189
+ Grid,
190
+ {
191
+ item: true,
192
+ xs: 12,
193
+ className: theme.aggrid.theme,
194
+ sx: style(cssProps).grid,
195
+ children: /* @__PURE__ */ jsx(
196
+ AgGridReact,
197
+ {
198
+ rowData,
199
+ onGridReady,
200
+ getLocaleText,
201
+ cacheOverflowSize: 10,
202
+ rowSelection: "multiple",
203
+ domLayout: "autoHeight",
204
+ rowDragEntireRow: true,
205
+ rowDragManaged: true,
206
+ onRowDragEnd: (e) => move(getIndex(e.node.data), e.overIndex),
207
+ suppressBrowserResizeObserver: true,
208
+ columnDefs,
209
+ detailRowAutoHeight: true,
210
+ onSelectionChanged: () => {
211
+ setSelectedRows(gridApi.api.getSelectedRows());
212
+ },
213
+ onRowDataUpdated: newRowAdded ? onRowDataUpdated : void 0,
214
+ onCellEditingStopped,
215
+ onSortChanged,
216
+ getRowId: (row) => row.data[FieldConstants.AG_GRID_ROW_UUID],
217
+ pagination,
218
+ paginationPageSize,
219
+ suppressRowClickSelection,
220
+ alwaysShowVerticalScroll,
221
+ stopEditingWhenCellsLoseFocus,
222
+ ...props
223
+ }
224
+ )
225
+ }
226
+ ),
227
+ /* @__PURE__ */ jsx(
228
+ BottomRightButtons,
229
+ {
230
+ name,
231
+ handleAddRow,
232
+ handleDeleteRows,
233
+ handleMoveRowDown,
234
+ handleMoveRowUp,
235
+ disableUp: noRowSelected || isFirstSelected || isSortApplied,
236
+ disableDown: noRowSelected || isLastSelected || isSortApplied,
237
+ disableDelete: noRowSelected,
238
+ csvProps,
239
+ useFieldArrayOutput
240
+ }
241
+ )
242
+ ] });
243
+ }
11
244
  export {
12
- C as CustomAgGridTable,
13
- R as ROW_DRAGGING_SELECTION_COLUMN_DEF,
14
- C2 as default
245
+ ROW_DRAGGING_SELECTION_COLUMN_DEF,
246
+ CustomAgGridTable as default
15
247
  };
@@ -1,5 +1,4 @@
1
1
  import { Option } from '../../../../utils/types';
2
- import { FunctionComponent } from 'react';
3
2
  import { AutocompleteProps, TextFieldProps } from '@mui/material';
4
3
 
5
4
  export interface AutocompleteInputProps extends Omit<AutocompleteProps<Option, boolean | undefined, boolean | undefined, boolean | undefined>, 'value' | 'onChange' | 'renderInput'> {
@@ -14,5 +13,8 @@ export interface AutocompleteInputProps extends Omit<AutocompleteProps<Option, b
14
13
  onChangeCallback?: () => void;
15
14
  formProps?: Omit<TextFieldProps, 'value' | 'onChange' | 'inputRef' | 'inputProps' | 'InputProps'>;
16
15
  }
17
- declare const AutocompleteInput: FunctionComponent<AutocompleteInputProps>;
16
+ declare function AutocompleteInput({ name, label, options, outputTransform, // transform materialUi input value before sending it to react hook form, mostly used to deal with select fields that need to return a string
17
+ inputTransform, // transform react hook form value before sending it to materialUi input, mostly used to deal with select fields that need to return a string
18
+ readOnly, previousValue, allowNewValue, onChangeCallback, // method called when input value is changing
19
+ formProps, ...props }: AutocompleteInputProps): import("react/jsx-runtime").JSX.Element;
18
20
  export default AutocompleteInput;
@@ -3,15 +3,15 @@ import { Autocomplete, TextField } from "@mui/material";
3
3
  import { useController } from "react-hook-form";
4
4
  import { isFieldRequired, genHelperPreviousValue, genHelperError, identity } from "../utils/functions.js";
5
5
  import FieldLabel from "../utils/field-label.js";
6
- import { useCustomFormContext } from "../provider/use-custom-form-context.js";
7
- const AutocompleteInput = ({
6
+ import useCustomFormContext from "../provider/use-custom-form-context.js";
7
+ function AutocompleteInput({
8
8
  name,
9
9
  label,
10
10
  options,
11
11
  outputTransform = identity,
12
- //transform materialUi input value before sending it to react hook form, mostly used to deal with select fields that need to return a string
12
+ // transform materialUi input value before sending it to react hook form, mostly used to deal with select fields that need to return a string
13
13
  inputTransform = identity,
14
- //transform react hook form value before sending it to materialUi input, mostly used to deal with select fields that need to return a string
14
+ // transform react hook form value before sending it to materialUi input, mostly used to deal with select fields that need to return a string
15
15
  readOnly = false,
16
16
  previousValue,
17
17
  allowNewValue,
@@ -19,26 +19,26 @@ const AutocompleteInput = ({
19
19
  // method called when input value is changing
20
20
  formProps,
21
21
  ...props
22
- }) => {
22
+ }) {
23
23
  const { validationSchema, getValues, removeOptional } = useCustomFormContext();
24
24
  const {
25
25
  field: { onChange, value, ref },
26
26
  fieldState: { error }
27
27
  } = useController({ name });
28
- const handleChange = (value2) => {
29
- onChangeCallback && onChangeCallback();
30
- if (!allowNewValue || typeof value2 !== "string") {
31
- onChange(outputTransform(value2));
28
+ const handleChange = (newValue) => {
29
+ onChangeCallback == null ? void 0 : onChangeCallback();
30
+ if (!allowNewValue || typeof newValue !== "string") {
31
+ onChange(outputTransform(newValue));
32
32
  return;
33
33
  }
34
34
  const matchingOption = options.find(
35
- (option) => typeof option !== "string" && option.id === value2
35
+ (option) => typeof option !== "string" && option.id === newValue
36
36
  );
37
37
  if (matchingOption) {
38
38
  onChange(outputTransform(matchingOption));
39
39
  return;
40
40
  }
41
- onChange(outputTransform(value2));
41
+ onChange(outputTransform(newValue));
42
42
  };
43
43
  return /* @__PURE__ */ jsx(
44
44
  Autocomplete,
@@ -79,7 +79,7 @@ const AutocompleteInput = ({
79
79
  ...props
80
80
  }
81
81
  );
82
- };
82
+ }
83
83
  export {
84
84
  AutocompleteInput as default
85
85
  };
@@ -1,2 +1,2 @@
1
- declare const MultipleAutocompleteInput: ({ name, ...props }: any) => import("react/jsx-runtime").JSX.Element;
1
+ declare function MultipleAutocompleteInput({ name, ...props }: any): import("react/jsx-runtime").JSX.Element;
2
2
  export default MultipleAutocompleteInput;
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { useWatch, useFieldArray } from "react-hook-form";
4
4
  import AutocompleteInput from "./autocomplete-input.js";
5
- const MultipleAutocompleteInput = ({ name, ...props }) => {
5
+ function MultipleAutocompleteInput({ name, ...props }) {
6
6
  const [unsavedInput, setUnsavedInput] = useState("");
7
7
  const watchAutocompleteValues = useWatch({
8
8
  name
@@ -40,7 +40,7 @@ const MultipleAutocompleteInput = ({ name, ...props }) => {
40
40
  ...props
41
41
  }
42
42
  );
43
- };
43
+ }
44
44
  export {
45
45
  MultipleAutocompleteInput as default
46
46
  };
@@ -6,5 +6,5 @@ export interface BooleanInputProps {
6
6
  formProps?: any;
7
7
  Input: typeof Switch | typeof Checkbox;
8
8
  }
9
- declare const BooleanInput: ({ name, label, formProps, Input }: BooleanInputProps) => import("react/jsx-runtime").JSX.Element;
9
+ declare function BooleanInput({ name, label, formProps, Input }: BooleanInputProps): import("react/jsx-runtime").JSX.Element;
10
10
  export default BooleanInput;