@gridsuite/commons-ui 0.62.0 → 0.63.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (326) 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 +1 -1
  110. package/dist/components/filter/expert/expert-filter-edition-dialog.d.ts +3 -4
  111. package/dist/components/filter/expert/expert-filter-edition-dialog.js +128 -15
  112. package/dist/components/filter/expert/expert-filter-form.d.ts +1 -2
  113. package/dist/components/filter/expert/expert-filter-form.js +141 -20
  114. package/dist/components/filter/expert/expert-filter-utils.d.ts +2 -2
  115. package/dist/components/filter/expert/expert-filter-utils.js +45 -46
  116. package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.d.ts +3 -4
  117. package/dist/components/filter/explicit-naming/explicit-naming-filter-edition-dialog.js +136 -16
  118. package/dist/components/filter/explicit-naming/explicit-naming-filter-form.d.ts +4 -5
  119. package/dist/components/filter/explicit-naming/explicit-naming-filter-form.js +241 -24
  120. package/dist/components/filter/filter-creation-dialog.d.ts +3 -4
  121. package/dist/components/filter/filter-creation-dialog.js +125 -13
  122. package/dist/components/filter/filter-form.d.ts +4 -5
  123. package/dist/components/filter/filter-form.js +73 -14
  124. package/dist/components/filter/utils/filter-api.js +1 -1
  125. package/dist/components/filter/utils/filter-form-utils.js +1 -1
  126. package/dist/components/inputs/react-hook-form/ExpandingTextField.d.ts +1 -2
  127. package/dist/components/inputs/react-hook-form/ExpandingTextField.js +5 -5
  128. package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.d.ts +1 -2
  129. package/dist/components/inputs/react-hook-form/ag-grid-table/bottom-right-buttons.js +102 -13
  130. package/dist/components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.d.ts +7 -6
  131. package/dist/components/inputs/react-hook-form/ag-grid-table/cell-editors/numericEditor.js +13 -15
  132. package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.d.ts +7 -3
  133. package/dist/components/inputs/react-hook-form/ag-grid-table/csv-uploader/csv-uploader.js +220 -61
  134. package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.d.ts +1 -2
  135. package/dist/components/inputs/react-hook-form/ag-grid-table/custom-ag-grid-table.js +243 -11
  136. package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.d.ts +4 -2
  137. package/dist/components/inputs/react-hook-form/autocomplete-inputs/autocomplete-input.js +12 -12
  138. package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.d.ts +1 -1
  139. package/dist/components/inputs/react-hook-form/autocomplete-inputs/multiple-autocomplete-input.js +2 -2
  140. package/dist/components/inputs/react-hook-form/booleans/boolean-input.d.ts +1 -1
  141. package/dist/components/inputs/react-hook-form/booleans/boolean-input.js +2 -2
  142. package/dist/components/inputs/react-hook-form/booleans/checkbox-input.d.ts +1 -1
  143. package/dist/components/inputs/react-hook-form/booleans/checkbox-input.js +3 -3
  144. package/dist/components/inputs/react-hook-form/booleans/switch-input.d.ts +1 -1
  145. package/dist/components/inputs/react-hook-form/booleans/switch-input.js +3 -3
  146. package/dist/components/inputs/react-hook-form/directory-items-input.d.ts +11 -3
  147. package/dist/components/inputs/react-hook-form/directory-items-input.js +11 -11
  148. package/dist/components/inputs/react-hook-form/error-management/error-input.d.ts +2 -2
  149. package/dist/components/inputs/react-hook-form/error-management/error-input.js +7 -9
  150. package/dist/components/inputs/react-hook-form/error-management/field-error-alert.d.ts +2 -2
  151. package/dist/components/inputs/react-hook-form/error-management/field-error-alert.js +2 -4
  152. package/dist/components/inputs/react-hook-form/error-management/mid-form-error.d.ts +2 -2
  153. package/dist/components/inputs/react-hook-form/error-management/mid-form-error.js +2 -2
  154. package/dist/components/inputs/react-hook-form/numbers/float-input.d.ts +1 -2
  155. package/dist/components/inputs/react-hook-form/numbers/float-input.js +6 -5
  156. package/dist/components/inputs/react-hook-form/numbers/integer-input.d.ts +1 -1
  157. package/dist/components/inputs/react-hook-form/numbers/integer-input.js +5 -5
  158. package/dist/components/inputs/react-hook-form/provider/custom-form-provider.d.ts +1 -1
  159. package/dist/components/inputs/react-hook-form/provider/custom-form-provider.js +11 -8
  160. package/dist/components/inputs/react-hook-form/provider/use-custom-form-context.d.ts +2 -1
  161. package/dist/components/inputs/react-hook-form/provider/use-custom-form-context.js +1 -1
  162. package/dist/components/inputs/react-hook-form/radio-input.d.ts +1 -1
  163. package/dist/components/inputs/react-hook-form/radio-input.js +2 -8
  164. package/dist/components/inputs/react-hook-form/range-input.d.ts +1 -2
  165. package/dist/components/inputs/react-hook-form/range-input.js +5 -5
  166. package/dist/components/inputs/react-hook-form/raw-read-only-input.d.ts +2 -1
  167. package/dist/components/inputs/react-hook-form/raw-read-only-input.js +1 -1
  168. package/dist/components/inputs/react-hook-form/select-inputs/countries-input.d.ts +1 -3
  169. package/dist/components/inputs/react-hook-form/select-inputs/countries-input.js +4 -8
  170. package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.d.ts +3 -1
  171. package/dist/components/inputs/react-hook-form/select-inputs/input-with-popup-confirmation.js +4 -4
  172. package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.d.ts +1 -2
  173. package/dist/components/inputs/react-hook-form/select-inputs/mui-select-input.js +11 -10
  174. package/dist/components/inputs/react-hook-form/select-inputs/select-input.d.ts +1 -2
  175. package/dist/components/inputs/react-hook-form/select-inputs/select-input.js +16 -8
  176. package/dist/components/inputs/react-hook-form/slider-input.d.ts +1 -1
  177. package/dist/components/inputs/react-hook-form/slider-input.js +6 -6
  178. package/dist/components/inputs/react-hook-form/text-input.d.ts +6 -2
  179. package/dist/components/inputs/react-hook-form/text-input.js +9 -9
  180. package/dist/components/inputs/react-hook-form/unique-name-input.d.ts +4 -6
  181. package/dist/components/inputs/react-hook-form/unique-name-input.js +12 -12
  182. package/dist/components/inputs/react-hook-form/utils/cancel-button.d.ts +9 -10
  183. package/dist/components/inputs/react-hook-form/utils/cancel-button.js +2 -6
  184. package/dist/components/inputs/react-hook-form/utils/field-label.d.ts +1 -1
  185. package/dist/components/inputs/react-hook-form/utils/field-label.js +3 -3
  186. package/dist/components/inputs/react-hook-form/utils/functions.js +1 -1
  187. package/dist/components/inputs/react-hook-form/utils/submit-button.d.ts +9 -10
  188. package/dist/components/inputs/react-hook-form/utils/submit-button.js +2 -6
  189. package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.d.ts +1 -2
  190. package/dist/components/inputs/react-hook-form/utils/text-field-with-adornment.js +7 -7
  191. package/dist/components/inputs/react-query-builder/add-button.d.ts +1 -2
  192. package/dist/components/inputs/react-query-builder/add-button.js +13 -10
  193. package/dist/components/inputs/react-query-builder/combinator-selector.d.ts +1 -2
  194. package/dist/components/inputs/react-query-builder/combinator-selector.js +7 -6
  195. package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.d.ts +1 -1
  196. package/dist/components/inputs/react-query-builder/composite-rule-editor/group-value-editor.js +2 -2
  197. package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.d.ts +1 -1
  198. package/dist/components/inputs/react-query-builder/composite-rule-editor/rule-value-editor.js +5 -5
  199. package/dist/components/inputs/react-query-builder/country-value-editor.d.ts +1 -2
  200. package/dist/components/inputs/react-query-builder/country-value-editor.js +18 -18
  201. package/dist/components/inputs/react-query-builder/custom-react-query-builder.d.ts +1 -1
  202. package/dist/components/inputs/react-query-builder/custom-react-query-builder.js +92 -19
  203. package/dist/components/inputs/react-query-builder/element-value-editor.d.ts +7 -3
  204. package/dist/components/inputs/react-query-builder/element-value-editor.js +50 -62
  205. package/dist/components/inputs/react-query-builder/property-value-editor.d.ts +1 -2
  206. package/dist/components/inputs/react-query-builder/property-value-editor.js +5 -5
  207. package/dist/components/inputs/react-query-builder/remove-button.d.ts +1 -2
  208. package/dist/components/inputs/react-query-builder/remove-button.js +26 -7
  209. package/dist/components/inputs/react-query-builder/text-value-editor.d.ts +1 -2
  210. package/dist/components/inputs/react-query-builder/text-value-editor.js +17 -17
  211. package/dist/components/inputs/react-query-builder/translated-value-editor.d.ts +1 -2
  212. package/dist/components/inputs/react-query-builder/translated-value-editor.js +22 -26
  213. package/dist/components/inputs/react-query-builder/value-editor.d.ts +1 -2
  214. package/dist/components/inputs/react-query-builder/value-editor.js +119 -18
  215. package/dist/components/inputs/react-query-builder/value-selector.d.ts +1 -1
  216. package/dist/components/inputs/react-query-builder/value-selector.js +2 -2
  217. package/dist/components/inputs/select-clearable.d.ts +1 -2
  218. package/dist/components/inputs/select-clearable.js +6 -5
  219. package/dist/components/translations/card-error-boundary-en.d.ts +2 -2
  220. package/dist/components/translations/card-error-boundary-en.js +2 -2
  221. package/dist/components/translations/card-error-boundary-fr.d.ts +2 -2
  222. package/dist/components/translations/card-error-boundary-fr.js +2 -2
  223. package/dist/components/translations/common-button-en.d.ts +2 -2
  224. package/dist/components/translations/common-button-en.js +2 -2
  225. package/dist/components/translations/common-button-fr.d.ts +2 -2
  226. package/dist/components/translations/common-button-fr.js +2 -2
  227. package/dist/components/translations/directory-items-input-en.d.ts +2 -2
  228. package/dist/components/translations/directory-items-input-en.js +2 -2
  229. package/dist/components/translations/directory-items-input-fr.d.ts +2 -2
  230. package/dist/components/translations/directory-items-input-fr.js +2 -2
  231. package/dist/components/translations/element-search-en.d.ts +2 -2
  232. package/dist/components/translations/element-search-en.js +2 -2
  233. package/dist/components/translations/element-search-fr.d.ts +2 -2
  234. package/dist/components/translations/element-search-fr.js +2 -2
  235. package/dist/components/translations/equipment-search-en.d.ts +2 -2
  236. package/dist/components/translations/equipment-search-en.js +2 -2
  237. package/dist/components/translations/equipment-search-fr.d.ts +2 -2
  238. package/dist/components/translations/equipment-search-fr.js +2 -2
  239. package/dist/components/translations/filter-en.d.ts +3 -2
  240. package/dist/components/translations/filter-en.js +3 -2
  241. package/dist/components/translations/filter-expert-en.d.ts +2 -2
  242. package/dist/components/translations/filter-expert-en.js +2 -2
  243. package/dist/components/translations/filter-expert-fr.d.ts +2 -2
  244. package/dist/components/translations/filter-expert-fr.js +2 -2
  245. package/dist/components/translations/filter-fr.d.ts +3 -2
  246. package/dist/components/translations/filter-fr.js +3 -2
  247. package/dist/components/translations/flat-parameters-en.d.ts +2 -2
  248. package/dist/components/translations/flat-parameters-en.js +2 -2
  249. package/dist/components/translations/flat-parameters-fr.d.ts +2 -2
  250. package/dist/components/translations/flat-parameters-fr.js +2 -2
  251. package/dist/components/translations/inputs-en.d.ts +2 -2
  252. package/dist/components/translations/inputs-en.js +2 -2
  253. package/dist/components/translations/inputs-fr.d.ts +2 -2
  254. package/dist/components/translations/inputs-fr.js +2 -2
  255. package/dist/components/translations/login-en.d.ts +2 -2
  256. package/dist/components/translations/login-en.js +2 -2
  257. package/dist/components/translations/login-fr.d.ts +2 -2
  258. package/dist/components/translations/login-fr.js +2 -2
  259. package/dist/components/translations/multiple-selection-dialog-en.d.ts +2 -2
  260. package/dist/components/translations/multiple-selection-dialog-en.js +2 -2
  261. package/dist/components/translations/multiple-selection-dialog-fr.d.ts +2 -2
  262. package/dist/components/translations/multiple-selection-dialog-fr.js +2 -2
  263. package/dist/components/translations/report-viewer-en.d.ts +2 -2
  264. package/dist/components/translations/report-viewer-en.js +2 -2
  265. package/dist/components/translations/report-viewer-fr.d.ts +2 -2
  266. package/dist/components/translations/report-viewer-fr.js +2 -2
  267. package/dist/components/translations/table-en.d.ts +2 -2
  268. package/dist/components/translations/table-en.js +2 -2
  269. package/dist/components/translations/table-fr.d.ts +2 -2
  270. package/dist/components/translations/table-fr.js +2 -2
  271. package/dist/components/translations/top-bar-en.d.ts +2 -2
  272. package/dist/components/translations/top-bar-en.js +2 -2
  273. package/dist/components/translations/top-bar-fr.d.ts +2 -2
  274. package/dist/components/translations/top-bar-fr.js +2 -2
  275. package/dist/components/translations/treeview-finder-en.d.ts +2 -2
  276. package/dist/components/translations/treeview-finder-en.js +2 -2
  277. package/dist/components/translations/treeview-finder-fr.d.ts +2 -2
  278. package/dist/components/translations/treeview-finder-fr.js +2 -2
  279. package/dist/hooks/localized-countries-hook.js +1 -1
  280. package/dist/hooks/predefined-properties-hook.d.ts +2 -1
  281. package/dist/hooks/predefined-properties-hook.js +2 -2
  282. package/dist/hooks/useDebounce.d.ts +2 -1
  283. package/dist/hooks/useDebounce.js +1 -1
  284. package/dist/hooks/useIntlRef.d.ts +2 -1
  285. package/dist/hooks/useIntlRef.js +1 -1
  286. package/dist/hooks/useSnackMessage.d.ts +2 -2
  287. package/dist/hooks/useSnackMessage.js +36 -36
  288. package/dist/index.d.ts +19 -16
  289. package/dist/index.js +164 -158
  290. package/dist/redux/authActions.d.ts +56 -0
  291. package/dist/redux/commonStore.d.ts +4 -3
  292. package/dist/redux/commonStore.js +2 -1
  293. package/dist/services/apps-metadata.js +1 -1
  294. package/dist/services/directory.js +6 -6
  295. package/dist/services/explore.js +14 -12
  296. package/dist/services/index.d.ts +0 -5
  297. package/dist/services/study.js +2 -2
  298. package/dist/services/utils.d.ts +1 -1
  299. package/dist/services/utils.js +26 -26
  300. package/dist/utils/AuthService.d.ts +9 -8
  301. package/dist/utils/AuthService.js +77 -76
  302. package/dist/utils/ElementIcon.d.ts +3 -2
  303. package/dist/utils/ElementIcon.js +4 -3
  304. package/dist/utils/ElementType.d.ts +3 -6
  305. package/dist/utils/EquipmentType.js +3 -3
  306. package/dist/utils/FetchStatus.d.ts +2 -1
  307. package/dist/utils/FetchStatus.js +1 -1
  308. package/dist/utils/Metadata.d.ts +15 -0
  309. package/dist/utils/Metadata.js +1 -0
  310. package/dist/utils/UserManagerMock.d.ts +50 -25
  311. package/dist/utils/UserManagerMock.js +118 -11
  312. package/dist/utils/algos.d.ts +2 -1
  313. package/dist/utils/algos.js +2 -2
  314. package/dist/utils/equipment-types-for-predefined-properties-mapper.d.ts +2 -1
  315. package/dist/utils/equipment-types-for-predefined-properties-mapper.js +3 -1
  316. package/dist/utils/field-constants.d.ts +2 -1
  317. package/dist/utils/field-constants.js +1 -1
  318. package/dist/utils/functions.js +5 -2
  319. package/dist/utils/types.d.ts +1 -1
  320. package/dist/utils/yup-config.js +1 -2
  321. package/package.json +10 -4
  322. package/dist/chunks/criteria-based-filter-edition-dialog.CAT38SvB.js +0 -1694
  323. package/dist/chunks/filter-properties.B7-q_yPf.js +0 -195
  324. package/dist/redux/actions.d.ts +0 -54
  325. /package/dist/assets/{criteria-based-filter-edition-dialog.css → expert-filter-form.css} +0 -0
  326. /package/dist/redux/{actions.js → authActions.js} +0 -0
@@ -1,29 +1,30 @@
1
+ import { AuthenticationActions } from '../../redux/authActions';
1
2
  import { UserManager } from 'oidc-client';
3
+ import { Location, NavigateFunction } from 'react-router-dom';
2
4
  import { Dispatch } from 'react';
3
5
 
4
- export interface AuthenticationRouterProps {
5
- userManager: {
6
- instance: UserManager;
7
- error: string;
8
- };
9
- signInCallbackError: {
10
- message: string;
6
+ export type AuthenticationRouterErrorState = {
7
+ userName?: string;
8
+ userValidationError?: {
9
+ error: Error;
11
10
  };
12
- authenticationRouterError: {
13
- userName: string;
14
- userValidationError?: {
15
- error: Error;
16
- };
17
- logoutError?: {
18
- error: Error;
19
- };
20
- unauthorizedUserInfo?: string;
21
- error: string;
11
+ logoutError?: {
12
+ error: Error;
22
13
  };
14
+ unauthorizedUserInfo?: string;
15
+ };
16
+ export type UserManagerState = {
17
+ instance: UserManager | null;
18
+ error: string | null;
19
+ };
20
+ export interface AuthenticationRouterProps {
21
+ userManager: UserManagerState;
22
+ signInCallbackError: Error | null;
23
+ authenticationRouterError: AuthenticationRouterErrorState | null;
23
24
  showAuthenticationRouterLogin: boolean;
24
- dispatch: Dispatch<unknown>;
25
- navigate: () => void;
25
+ dispatch: Dispatch<AuthenticationActions>;
26
+ navigate: NavigateFunction;
26
27
  location: Location;
27
28
  }
28
- declare const AuthenticationRouter: ({ userManager, signInCallbackError, authenticationRouterError, showAuthenticationRouterLogin, dispatch, navigate, location, }: AuthenticationRouterProps) => import("react/jsx-runtime").JSX.Element;
29
+ declare function AuthenticationRouter({ userManager, signInCallbackError, authenticationRouterError, showAuthenticationRouterLogin, dispatch, navigate, location, }: Readonly<AuthenticationRouterProps>): import("react/jsx-runtime").JSX.Element;
29
30
  export default AuthenticationRouter;
@@ -1,14 +1,14 @@
1
1
  import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { useCallback } from "react";
3
3
  import { Routes, Route, Navigate } from "react-router-dom";
4
+ import { Grid, Alert, AlertTitle } from "@mui/material";
5
+ import { FormattedMessage } from "react-intl";
4
6
  import SignInCallbackHandler from "../SignInCallbackHandler/SignInCallbackHandler.js";
5
7
  import { handleSigninCallback, handleSilentRenewCallback, login, logout } from "../../utils/AuthService.js";
6
8
  import SilentRenewCallbackHandler from "../SilentRenewCallbackHandler/SilentRenewCallbackHandler.js";
7
9
  import Login from "../Login/Login.js";
8
10
  import Logout from "../Login/Logout.js";
9
- import { Grid, Alert, AlertTitle } from "@mui/material";
10
- import { FormattedMessage } from "react-intl";
11
- const AuthenticationRouter = ({
11
+ function AuthenticationRouter({
12
12
  userManager,
13
13
  signInCallbackError,
14
14
  authenticationRouterError,
@@ -16,15 +16,17 @@ const AuthenticationRouter = ({
16
16
  dispatch,
17
17
  navigate,
18
18
  location
19
- }) => {
20
- const handleSigninCallbackClosure = useCallback(
21
- () => handleSigninCallback(dispatch, navigate, userManager.instance),
22
- [dispatch, navigate, userManager.instance]
23
- );
24
- const handleSilentRenewCallbackClosure = useCallback(
25
- () => handleSilentRenewCallback(userManager.instance),
26
- [userManager.instance]
27
- );
19
+ }) {
20
+ const handleSigninCallbackClosure = useCallback(() => {
21
+ if (userManager.instance != null) {
22
+ handleSigninCallback(dispatch, navigate, userManager.instance);
23
+ }
24
+ }, [dispatch, navigate, userManager.instance]);
25
+ const handleSilentRenewCallbackClosure = useCallback(() => {
26
+ if (userManager.instance != null) {
27
+ handleSilentRenewCallback(userManager.instance);
28
+ }
29
+ }, [userManager.instance]);
28
30
  return /* @__PURE__ */ jsxs(
29
31
  Grid,
30
32
  {
@@ -135,7 +137,7 @@ const AuthenticationRouter = ({
135
137
  ]
136
138
  }
137
139
  );
138
- };
140
+ }
139
141
  export {
140
142
  AuthenticationRouter as default
141
143
  };
@@ -1,7 +1,4 @@
1
- /**
2
- * Copyright (c) 2020, RTE (http://www.rte-france.com)
3
- * This Source Code Form is subject to the terms of the Mozilla Public
4
- * License, v. 2.0. If a copy of the MPL was not distributed with this
5
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
- */
7
- export { default } from './AuthenticationRouter';
1
+ import { default as AuthenticationRouter } from './AuthenticationRouter';
2
+
3
+ export default AuthenticationRouter;
4
+ export type { AuthenticationRouterErrorState, AuthenticationRouterProps, UserManagerState, } from './AuthenticationRouter';
@@ -1,4 +1,4 @@
1
- import { default as default2 } from "./AuthenticationRouter.js";
1
+ import AuthenticationRouter from "./AuthenticationRouter.js";
2
2
  export {
3
- default2 as default
3
+ AuthenticationRouter as default
4
4
  };
@@ -18,7 +18,6 @@ type CardErrorBoundaryState = (CardErrorBoundaryStateError | CardErrorBoundarySt
18
18
  expanded: boolean;
19
19
  };
20
20
  declare class CardErrorBoundary extends Component<Props, CardErrorBoundaryState> {
21
- state: CardErrorBoundaryState;
22
21
  constructor(props: Props);
23
22
  static getDerivedStateFromError(error: Error): {
24
23
  hasError: boolean;
@@ -35,14 +35,16 @@ class CardErrorBoundary extends Component {
35
35
  }));
36
36
  }
37
37
  handleReloadClick() {
38
- this.setState((_) => ({
38
+ this.setState(() => ({
39
39
  hasError: false,
40
40
  expanded: false,
41
41
  error: void 0
42
42
  }));
43
43
  }
44
44
  render() {
45
- if (this.state.hasError) {
45
+ const { hasError } = this.state;
46
+ const { children } = this.props;
47
+ if (hasError) {
46
48
  const { error, expanded } = this.state;
47
49
  return /* @__PURE__ */ jsx(Box, { sx: { p: 4 }, children: /* @__PURE__ */ jsxs(Card, { sx: { mx: "auto", maxWidth: 600 }, children: [
48
50
  /* @__PURE__ */ jsx(
@@ -103,7 +105,7 @@ class CardErrorBoundary extends Component {
103
105
  ] }) })
104
106
  ] }) });
105
107
  }
106
- return this.props.children;
108
+ return children;
107
109
  }
108
110
  }
109
111
  export {
@@ -1,7 +1,3 @@
1
- /**
2
- * Copyright (c) 2022, RTE (http://www.rte-france.com)
3
- * This Source Code Form is subject to the terms of the Mozilla Public
4
- * License, v. 2.0. If a copy of the MPL was not distributed with this
5
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
- */
7
- export { default } from './card-error-boundary';
1
+ import { default as defaultCardErrorBoundary } from './card-error-boundary';
2
+
3
+ export default defaultCardErrorBoundary;
@@ -1,4 +1,4 @@
1
- import { default as default2 } from "./card-error-boundary.js";
1
+ import CardErrorBoundary from "./card-error-boundary.js";
2
2
  export {
3
- default2 as default
3
+ CardErrorBoundary as default
4
4
  };
@@ -5,8 +5,8 @@ import { useIntl } from "react-intl";
5
5
  import "ag-grid-community/styles/ag-grid.css";
6
6
  import "ag-grid-community/styles/ag-theme-alpine.css";
7
7
  import { Box } from "@mui/system";
8
- import { mergeSx } from "../../utils/styles.js";
9
8
  import { useTheme } from "@mui/material";
9
+ import { mergeSx } from "../../utils/styles.js";
10
10
  import { CUSTOM_AGGRID_THEME, styles } from "./custom-aggrid.style.js";
11
11
  const onColumnResized = (params) => {
12
12
  var _a;
@@ -11,19 +11,19 @@ const styles = {
11
11
  },
12
12
  "& .ag-checkbox-input": {
13
13
  cursor: "pointer",
14
- //Enlarge checkbox area to be more permissive when selecting it
14
+ // Enlarge checkbox area to be more permissive when selecting it
15
15
  scale: "2.5"
16
16
  },
17
- //overrides the default computed max height for ag grid default selector editor to make it more usable
18
- //can be removed if a custom selector editor is implemented
17
+ // overrides the default computed max height for ag grid default selector editor to make it more usable
18
+ // can be removed if a custom selector editor is implemented
19
19
  "& .ag-select-list": {
20
20
  maxHeight: "300px !important"
21
21
  },
22
- //allows to hide the scrollbar in the pinned rows section as it is unecessary to our implementation
22
+ // allows to hide the scrollbar in the pinned rows section as it is unecessary to our implementation
23
23
  "& .ag-body-horizontal-scroll:not(.ag-scrollbar-invisible) .ag-horizontal-left-spacer:not(.ag-scroller-corner)": {
24
24
  visibility: "hidden"
25
25
  },
26
- //removes border on focused cell - using "suppressCellFocus" Aggrid option causes side effects and breaks field edition
26
+ // removes border on focused cell - using "suppressCellFocus" Aggrid option causes side effects and breaks field edition
27
27
  "& .ag-cell-focus, .ag-cell": {
28
28
  border: "none !important"
29
29
  }
@@ -1,6 +1,5 @@
1
- import { UUID } from 'crypto';
2
1
  import { TreeViewFinderProps } from '../TreeViewFinder/TreeViewFinder';
3
- import { FunctionComponent } from 'react';
2
+ import { UUID } from 'crypto';
4
3
 
5
4
  interface DirectoryItemSelectorProps extends TreeViewFinderProps {
6
5
  open: boolean;
@@ -18,5 +17,5 @@ interface DirectoryItemSelectorProps extends TreeViewFinderProps {
18
17
  multiselect?: boolean;
19
18
  expanded?: UUID[];
20
19
  }
21
- declare const DirectoryItemSelector: FunctionComponent<DirectoryItemSelectorProps>;
20
+ declare function DirectoryItemSelector({ open, types, equipmentTypes, itemFilter, expanded, ...otherTreeViewFinderProps }: DirectoryItemSelectorProps): import("react/jsx-runtime").JSX.Element;
22
21
  export default DirectoryItemSelector;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { useState, useRef, useCallback, useEffect } from "react";
3
- import { getFileIcon } from "../../utils/ElementIcon.js";
3
+ import getFileIcon from "../../utils/ElementIcon.js";
4
4
  import { ElementType } from "../../utils/ElementType.js";
5
5
  import TreeViewFinder from "../TreeViewFinder/TreeViewFinder.js";
6
6
  import { useSnackMessage } from "../../hooks/useSnackMessage.js";
@@ -13,14 +13,113 @@ const styles = {
13
13
  height: "18px"
14
14
  })
15
15
  };
16
- const DirectoryItemSelector = ({
16
+ function sameRights(a, b) {
17
+ if (!a && !b) {
18
+ return true;
19
+ }
20
+ if (!a || !b) {
21
+ return false;
22
+ }
23
+ return a.isPrivate === b.isPrivate;
24
+ }
25
+ function flattenDownNodes(n, cef) {
26
+ const subs = cef(n);
27
+ if (subs.length === 0) {
28
+ return [n];
29
+ }
30
+ return Array.prototype.concat(
31
+ [n],
32
+ ...subs.map((sn) => flattenDownNodes(sn, cef))
33
+ );
34
+ }
35
+ function refreshedUpNodes(m, nn) {
36
+ if (!(nn == null ? void 0 : nn.elementUuid)) {
37
+ return [];
38
+ }
39
+ if (nn.parentUuid === null) {
40
+ return [nn];
41
+ }
42
+ const parent = m[nn.parentUuid];
43
+ const nextChildren = parent.children.map(
44
+ (c) => c.elementUuid === nn.elementUuid ? nn : c
45
+ );
46
+ const nextParent = { ...parent, children: nextChildren };
47
+ return [nn, ...refreshedUpNodes(m, nextParent)];
48
+ }
49
+ function updatedTree(prevRoots, prevMap, nodeId, children) {
50
+ var _a;
51
+ const nextChildren = children.sort((a, b) => a.elementName.localeCompare(b.elementName)).map((n) => {
52
+ const pn = prevMap[n.elementUuid];
53
+ if (!pn) {
54
+ return { ...n, children: [], parentUuid: nodeId };
55
+ }
56
+ if (n.elementName === pn.elementName && sameRights(n.accessRights, pn.accessRights) && n.subdirectoriesCount === pn.subdirectoriesCount && nodeId === pn.parentUuid) {
57
+ return pn;
58
+ }
59
+ if (pn.parentUuid !== nodeId) {
60
+ console.warn(`reparent ${pn.parentUuid} -> ${nodeId}`);
61
+ }
62
+ return {
63
+ ...pn,
64
+ elementName: n.elementName,
65
+ accessRights: n.accessRights,
66
+ subdirectoriesCount: n.subdirectoriesCount,
67
+ parentUuid: nodeId
68
+ };
69
+ });
70
+ const prevChildren = nodeId ? (_a = prevMap[nodeId]) == null ? void 0 : _a.children : prevRoots;
71
+ if ((prevChildren == null ? void 0 : prevChildren.length) === nextChildren.length && prevChildren.every((e, i) => e === nextChildren[i])) {
72
+ return [prevRoots, prevMap];
73
+ }
74
+ const nextUuids = new Set(
75
+ children ? children.map((n) => n.elementUuid) : []
76
+ );
77
+ const prevUuids = prevChildren ? prevChildren.map((n) => n.elementUuid) : [];
78
+ const mayNodeId = nodeId ? [nodeId] : [];
79
+ const nonCopyUuids = /* @__PURE__ */ new Set([
80
+ ...nextUuids,
81
+ ...mayNodeId,
82
+ ...Array.prototype.concat(
83
+ ...prevUuids.filter((u) => !nextUuids.has(u)).map(
84
+ (u) => flattenDownNodes(prevMap[u], (n) => n.children).map(
85
+ (n) => n.elementUuid
86
+ )
87
+ )
88
+ )
89
+ ]);
90
+ const prevNode = nodeId ? prevMap[nodeId] : {};
91
+ const nextNode = {
92
+ elementUuid: nodeId,
93
+ parentUuid: null,
94
+ ...prevNode,
95
+ children: nextChildren,
96
+ subdirectoriesCount: nextChildren.length
97
+ };
98
+ const nextMap = Object.fromEntries([
99
+ ...Object.entries(prevMap).filter(([k]) => !nonCopyUuids.has(k)),
100
+ ...nextChildren.map((n) => [n.elementUuid, n]),
101
+ ...refreshedUpNodes(prevMap, nextNode).map((n) => [n.elementUuid, n])
102
+ ]);
103
+ const nextRoots = nodeId === null ? nextChildren : prevRoots.map((r) => nextMap[r.elementUuid]);
104
+ return [nextRoots, nextMap];
105
+ }
106
+ function sortHandlingDirectories(a, b) {
107
+ if (a.children && !b.children) {
108
+ return -1;
109
+ }
110
+ if (b.children && !a.children) {
111
+ return 1;
112
+ }
113
+ return a.name.localeCompare(b.name);
114
+ }
115
+ function DirectoryItemSelector({
17
116
  open,
18
117
  types,
19
118
  equipmentTypes,
20
119
  itemFilter,
21
120
  expanded,
22
121
  ...otherTreeViewFinderProps
23
- }) => {
122
+ }) {
24
123
  const [data, setData] = useState([]);
25
124
  const [rootDirectories, setRootDirectories] = useState([]);
26
125
  const nodeMap = useRef({});
@@ -63,7 +162,7 @@ const DirectoryItemSelector = ({
63
162
  );
64
163
  const addToDirectory = useCallback(
65
164
  (nodeId, content) => {
66
- let [nrs, mdr] = updatedTree(
165
+ const [nrs, mdr] = updatedTree(
67
166
  rootsRef.current,
68
167
  nodeMap.current,
69
168
  nodeId,
@@ -76,12 +175,12 @@ const DirectoryItemSelector = ({
76
175
  [convertRoots]
77
176
  );
78
177
  const updateRootDirectories = useCallback(() => {
79
- fetchRootFolders(types).then((data2) => {
80
- let [nrs, mdr] = updatedTree(
178
+ fetchRootFolders(types).then((newData) => {
179
+ const [nrs, mdr] = updatedTree(
81
180
  rootsRef.current,
82
181
  nodeMap.current,
83
182
  null,
84
- data2
183
+ newData
85
184
  );
86
185
  setRootDirectories(nrs);
87
186
  nodeMap.current = mdr;
@@ -106,13 +205,13 @@ const DirectoryItemSelector = ({
106
205
  types,
107
206
  equipmentTypes
108
207
  ).then((childrenWithMetadata) => {
109
- const children2 = itemFilter ? childrenWithMetadata.filter((val) => {
208
+ const filtredChildren = itemFilter ? childrenWithMetadata.filter((val) => {
110
209
  if (val.type === ElementType.DIRECTORY) {
111
210
  return true;
112
211
  }
113
212
  return itemFilter(val);
114
213
  }) : childrenWithMetadata;
115
- addToDirectory(nodeId, children2);
214
+ addToDirectory(nodeId, filtredChildren);
116
215
  });
117
216
  } else {
118
217
  addToDirectory(nodeId, childrenMatchedTypes);
@@ -135,14 +234,6 @@ const DirectoryItemSelector = ({
135
234
  }
136
235
  }
137
236
  }, [open, updateRootDirectories, expanded, fetchDirectory]);
138
- function sortHandlingDirectories(a, b) {
139
- if (a.children && !b.children) {
140
- return -1;
141
- } else if (b.children && !a.children) {
142
- return 1;
143
- }
144
- return a.name.localeCompare(b.name);
145
- }
146
237
  return /* @__PURE__ */ jsx(
147
238
  TreeViewFinder,
148
239
  {
@@ -156,94 +247,6 @@ const DirectoryItemSelector = ({
156
247
  data
157
248
  }
158
249
  );
159
- };
160
- function updatedTree(prevRoots, prevMap, nodeId, children) {
161
- var _a;
162
- const nextChildren = children.sort((a, b) => a.elementName.localeCompare(b.elementName)).map((n) => {
163
- let pn = prevMap[n.elementUuid];
164
- if (!pn) {
165
- return { ...n, children: [], parentUuid: nodeId };
166
- } else if (n.elementName === pn.elementName && sameRights(n.accessRights, pn.accessRights) && n.subdirectoriesCount === pn.subdirectoriesCount && nodeId === pn.parentUuid) {
167
- return pn;
168
- } else {
169
- if (pn.parentUuid !== nodeId) {
170
- console.warn("reparent " + pn.parentUuid + " -> " + nodeId);
171
- }
172
- return {
173
- ...pn,
174
- elementName: n.elementName,
175
- accessRights: n.accessRights,
176
- subdirectoriesCount: n.subdirectoriesCount,
177
- parentUuid: nodeId
178
- };
179
- }
180
- });
181
- const prevChildren = nodeId ? (_a = prevMap[nodeId]) == null ? void 0 : _a.children : prevRoots;
182
- if ((prevChildren == null ? void 0 : prevChildren.length) === nextChildren.length && prevChildren.every((e, i) => e === nextChildren[i])) {
183
- return [prevRoots, prevMap];
184
- }
185
- let nextUuids = new Set(children ? children.map((n) => n.elementUuid) : []);
186
- let prevUuids = prevChildren ? prevChildren.map((n) => n.elementUuid) : [];
187
- let mayNodeId = nodeId ? [nodeId] : [];
188
- let nonCopyUuids = /* @__PURE__ */ new Set([
189
- ...nextUuids,
190
- ...mayNodeId,
191
- ...Array.prototype.concat(
192
- ...prevUuids.filter((u) => !nextUuids.has(u)).map(
193
- (u) => flattenDownNodes(prevMap[u], (n) => n.children).map(
194
- (n) => n.elementUuid
195
- )
196
- )
197
- )
198
- ]);
199
- const prevNode = nodeId ? prevMap[nodeId] : {};
200
- const nextNode = {
201
- elementUuid: nodeId,
202
- parentUuid: null,
203
- ...prevNode,
204
- children: nextChildren,
205
- subdirectoriesCount: nextChildren.length
206
- };
207
- const nextMap = Object.fromEntries([
208
- ...Object.entries(prevMap).filter(([k, v], i) => !nonCopyUuids.has(k)),
209
- ...nextChildren.map((n) => [n.elementUuid, n]),
210
- ...refreshedUpNodes(prevMap, nextNode).map((n) => [n.elementUuid, n])
211
- ]);
212
- const nextRoots = nodeId === null ? nextChildren : prevRoots.map((r) => nextMap[r.elementUuid]);
213
- return [nextRoots, nextMap];
214
- }
215
- function sameRights(a, b) {
216
- if (!a && !b) {
217
- return true;
218
- }
219
- if (!a || !b) {
220
- return false;
221
- }
222
- return a.isPrivate === b.isPrivate;
223
- }
224
- function flattenDownNodes(n, cef) {
225
- const subs = cef(n);
226
- if (subs.length === 0) {
227
- return [n];
228
- }
229
- return Array.prototype.concat(
230
- [n],
231
- ...subs.map((sn) => flattenDownNodes(sn, cef))
232
- );
233
- }
234
- function refreshedUpNodes(m, nn) {
235
- if (!(nn == null ? void 0 : nn.elementUuid)) {
236
- return [];
237
- }
238
- if (nn.parentUuid === null) {
239
- return [nn];
240
- }
241
- const parent = m[nn.parentUuid];
242
- const nextChildren = parent.children.map(
243
- (c) => c.elementUuid === nn.elementUuid ? nn : c
244
- );
245
- const nextParent = { ...parent, children: nextChildren };
246
- return [nn, ...refreshedUpNodes(m, nextParent)];
247
250
  }
248
251
  export {
249
252
  DirectoryItemSelector as default
@@ -4,5 +4,5 @@ export interface ElementSearchDialogProps<T> extends ElementSearchInputProps<T>
4
4
  onClose?: () => void;
5
5
  open: boolean;
6
6
  }
7
- export declare const ElementSearchDialog: <T>(props: ElementSearchDialogProps<T>) => import("react/jsx-runtime").JSX.Element;
7
+ export declare function ElementSearchDialog<T>(props: ElementSearchDialogProps<T>): import("react/jsx-runtime").JSX.Element;
8
8
  export default ElementSearchDialog;
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { useCallback } from "react";
3
3
  import { Dialog, DialogContent } from "@mui/material";
4
4
  import { ElementSearchInput } from "./element-search-input.js";
5
- const ElementSearchDialog = (props) => {
5
+ function ElementSearchDialog(props) {
6
6
  const { open, onClose, onSearchTermChange, ...rest } = props;
7
7
  const handleClose = useCallback(() => {
8
8
  onSearchTermChange("");
@@ -25,7 +25,7 @@ const ElementSearchDialog = (props) => {
25
25
  ) })
26
26
  }
27
27
  );
28
- };
28
+ }
29
29
  export {
30
30
  ElementSearchDialog,
31
31
  ElementSearchDialog as default
@@ -18,4 +18,4 @@ export interface ElementSearchInputProps<T> extends Pick<AutocompleteProps<T, fa
18
18
  searchTermDisableReason?: string;
19
19
  showResults?: boolean;
20
20
  }
21
- export declare const ElementSearchInput: <T>(props: ElementSearchInputProps<T>) => import("react/jsx-runtime").JSX.Element;
21
+ export declare function ElementSearchInput<T>(props: ElementSearchInputProps<T>): import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { jsx } from "react/jsx-runtime";
2
2
  import { Autocomplete } from "@mui/material";
3
3
  import { useMemo } from "react";
4
4
  import { useIntl } from "react-intl";
5
- const ElementSearchInput = (props) => {
5
+ function ElementSearchInput(props) {
6
6
  const {
7
7
  elementsFound,
8
8
  loading,
@@ -27,9 +27,8 @@ const ElementSearchInput = (props) => {
27
27
  return searchTermDisableReason ?? intl.formatMessage({
28
28
  id: "element_search/searchDisabled"
29
29
  });
30
- } else {
31
- return searchTerm ?? "";
32
30
  }
31
+ return searchTerm ?? "";
33
32
  }, [searchTerm, searchTermDisabled, searchTermDisableReason, intl]);
34
33
  return /* @__PURE__ */ jsx(
35
34
  Autocomplete,
@@ -74,14 +73,13 @@ const ElementSearchInput = (props) => {
74
73
  isOptionEqualToValue: (option, value) => {
75
74
  if (typeof option !== "string" && typeof value !== "string") {
76
75
  return isOptionEqualToValue(option, value);
77
- } else {
78
- return option === value;
79
76
  }
77
+ return option === value;
80
78
  },
81
79
  disabled: searchTermDisabled
82
80
  }
83
81
  );
84
- };
82
+ }
85
83
  export {
86
84
  ElementSearchInput
87
85
  };
@@ -1,6 +1,6 @@
1
- import { SxProps, Theme } from '@mui/material';
2
- import { EquipmentInfos } from '../../utils/EquipmentType';
3
1
  import { TagRenderer } from './index';
2
+ import { EquipmentInfos } from '../../utils/EquipmentType';
3
+ import { SxProps, Theme } from '@mui/material';
4
4
 
5
5
  export interface EquipmentItemProps {
6
6
  inputValue: string;
@@ -22,4 +22,4 @@ export interface EquipmentItemProps {
22
22
  equipmentVlTag?: SxProps<Theme>;
23
23
  };
24
24
  }
25
- export declare const EquipmentItem: ({ inputValue, suffixRenderer, element, showsJustText, ...props }: EquipmentItemProps) => import("react/jsx-runtime").JSX.Element;
25
+ export declare function EquipmentItem({ inputValue, suffixRenderer, element, showsJustText, ...props }: EquipmentItemProps): import("react/jsx-runtime").JSX.Element;
@@ -1,28 +1,28 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
- import "react";
3
- import { Box } from "@mui/material";
4
- import { FormattedMessage } from "react-intl";
5
- import { TagRenderer } from "./tag-renderer.js";
6
- import "notistack";
7
2
  import match from "autosuggest-highlight/match";
8
3
  import parse from "autosuggest-highlight/parse";
9
4
  import clsx from "clsx";
5
+ import { FormattedMessage } from "react-intl";
6
+ import { Box } from "@mui/material";
10
7
  import { EQUIPMENT_TYPE } from "../../utils/EquipmentType.js";
8
+ import "react";
9
+ import TagRenderer from "./tag-renderer.js";
10
+ import "notistack";
11
11
  import { OverflowableText } from "../OverflowableText/overflowable-text.js";
12
12
  import { mergeSx } from "../../utils/styles.js";
13
- const EquipmentItem = ({
13
+ function EquipmentItem({
14
14
  inputValue,
15
15
  suffixRenderer = TagRenderer,
16
16
  element,
17
17
  showsJustText = false,
18
18
  ...props
19
- }) => {
19
+ }) {
20
20
  var _a, _b, _c, _d, _e, _f, _g, _h, _i;
21
- let matches = match(element.label, inputValue, {
21
+ const matches = match(element.label, inputValue, {
22
22
  insideWords: true,
23
23
  findAllOccurrences: true
24
24
  });
25
- let parts = parse(element.label, matches);
25
+ const parts = parse(element.label, matches);
26
26
  return /* @__PURE__ */ jsx("li", { ...props, children: /* @__PURE__ */ jsxs(
27
27
  Box,
28
28
  {
@@ -55,7 +55,7 @@ const EquipmentItem = ({
55
55
  text: parts.map((e) => e.text).join(),
56
56
  className: (_h = props.classes) == null ? void 0 : _h.result,
57
57
  sx: (_i = props.styles) == null ? void 0 : _i.result,
58
- children: parts.map((part, index) => /* @__PURE__ */ jsx(
58
+ children: parts.map((part) => /* @__PURE__ */ jsx(
59
59
  "span",
60
60
  {
61
61
  style: {
@@ -63,15 +63,15 @@ const EquipmentItem = ({
63
63
  },
64
64
  children: part.text
65
65
  },
66
- index
66
+ `${part.text}-${part.highlight}`
67
67
  ))
68
68
  }
69
69
  ),
70
- !showsJustText && suffixRenderer({ props, element })
70
+ !showsJustText && suffixRenderer({ element, ...props })
71
71
  ]
72
72
  }
73
73
  ) }, element.key);
74
- };
74
+ }
75
75
  export {
76
76
  EquipmentItem
77
77
  };