@gridsuite/commons-ui 0.61.4 → 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 (322) hide show
  1. package/dist/components/AuthenticationRouter/AuthenticationRouter.d.ts +1 -1
  2. package/dist/components/AuthenticationRouter/AuthenticationRouter.js +5 -5
  3. package/dist/components/AuthenticationRouter/index.d.ts +3 -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 +1 -1
  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 +1 -1
  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 +1 -2
  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 +2 -27
  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 +13 -14
  289. package/dist/index.js +163 -157
  290. package/dist/redux/commonStore.d.ts +1 -1
  291. package/dist/services/apps-metadata.js +1 -1
  292. package/dist/services/directory.js +6 -6
  293. package/dist/services/explore.js +14 -12
  294. package/dist/services/index.d.ts +0 -5
  295. package/dist/services/study.js +2 -2
  296. package/dist/services/utils.d.ts +1 -1
  297. package/dist/services/utils.js +26 -26
  298. package/dist/utils/AuthService.d.ts +21 -12
  299. package/dist/utils/AuthService.js +88 -143
  300. package/dist/utils/ElementIcon.d.ts +3 -2
  301. package/dist/utils/ElementIcon.js +4 -3
  302. package/dist/utils/ElementType.d.ts +3 -6
  303. package/dist/utils/EquipmentType.js +3 -3
  304. package/dist/utils/FetchStatus.d.ts +2 -1
  305. package/dist/utils/FetchStatus.js +1 -1
  306. package/dist/utils/Metadata.d.ts +15 -0
  307. package/dist/utils/Metadata.js +1 -0
  308. package/dist/utils/UserManagerMock.d.ts +50 -25
  309. package/dist/utils/UserManagerMock.js +118 -11
  310. package/dist/utils/algos.d.ts +2 -1
  311. package/dist/utils/algos.js +2 -2
  312. package/dist/utils/equipment-types-for-predefined-properties-mapper.d.ts +2 -1
  313. package/dist/utils/equipment-types-for-predefined-properties-mapper.js +3 -1
  314. package/dist/utils/field-constants.d.ts +2 -1
  315. package/dist/utils/field-constants.js +1 -1
  316. package/dist/utils/functions.js +5 -2
  317. package/dist/utils/types.d.ts +1 -1
  318. package/dist/utils/yup-config.js +1 -2
  319. package/package.json +10 -4
  320. package/dist/chunks/criteria-based-filter-edition-dialog.CAT38SvB.js +0 -1694
  321. package/dist/chunks/filter-properties.B7-q_yPf.js +0 -195
  322. /package/dist/assets/{criteria-based-filter-edition-dialog.css → expert-filter-form.css} +0 -0
@@ -3,7 +3,7 @@ import { useCallback } from "react";
3
3
  import { useIntl } from "react-intl";
4
4
  import { FormControlLabel } from "@mui/material";
5
5
  import { useController } from "react-hook-form";
6
- const BooleanInput = ({ name, label, formProps, Input }) => {
6
+ function BooleanInput({ name, label, formProps, Input }) {
7
7
  const {
8
8
  field: { onChange, value, ref }
9
9
  } = useController({ name });
@@ -36,7 +36,7 @@ const BooleanInput = ({ name, label, formProps, Input }) => {
36
36
  );
37
37
  }
38
38
  return CustomInput;
39
- };
39
+ }
40
40
  export {
41
41
  BooleanInput as default
42
42
  };
@@ -5,5 +5,5 @@ export interface CheckboxInputProps {
5
5
  label?: string;
6
6
  formProps?: CheckboxProps;
7
7
  }
8
- declare const CheckboxInput: ({ name, label, formProps }: CheckboxInputProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare function CheckboxInput({ name, label, formProps }: CheckboxInputProps): import("react/jsx-runtime").JSX.Element;
9
9
  export default CheckboxInput;
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import BooleanInput from "./boolean-input.js";
3
2
  import { Checkbox } from "@mui/material";
4
- const CheckboxInput = ({ name, label, formProps }) => {
3
+ import BooleanInput from "./boolean-input.js";
4
+ function CheckboxInput({ name, label, formProps }) {
5
5
  return /* @__PURE__ */ jsx(
6
6
  BooleanInput,
7
7
  {
@@ -11,7 +11,7 @@ const CheckboxInput = ({ name, label, formProps }) => {
11
11
  Input: Checkbox
12
12
  }
13
13
  );
14
- };
14
+ }
15
15
  export {
16
16
  CheckboxInput as default
17
17
  };
@@ -5,5 +5,5 @@ export interface SwitchInputProps {
5
5
  label?: string;
6
6
  formProps?: SwitchProps;
7
7
  }
8
- declare const SwitchInput: ({ name, label, formProps }: SwitchInputProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare function SwitchInput({ name, label, formProps }: SwitchInputProps): import("react/jsx-runtime").JSX.Element;
9
9
  export default SwitchInput;
@@ -1,7 +1,7 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import BooleanInput from "./boolean-input.js";
3
2
  import { Switch } from "@mui/material";
4
- const SwitchInput = ({ name, label, formProps }) => {
3
+ import BooleanInput from "./boolean-input.js";
4
+ function SwitchInput({ name, label, formProps }) {
5
5
  return /* @__PURE__ */ jsx(
6
6
  BooleanInput,
7
7
  {
@@ -11,7 +11,7 @@ const SwitchInput = ({ name, label, formProps }) => {
11
11
  Input: Switch
12
12
  }
13
13
  );
14
- };
14
+ }
15
15
  export {
16
16
  SwitchInput as default
17
17
  };
@@ -1,5 +1,9 @@
1
- import { FunctionComponent } from 'react';
2
-
1
+ /**
2
+ * Copyright (c) 2023, 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
+ */
3
7
  export declare const NAME = "name";
4
8
  export interface DirectoryItemsInputProps {
5
9
  label: string | undefined;
@@ -14,5 +18,9 @@ export interface DirectoryItemsInputProps {
14
18
  disable?: boolean;
15
19
  labelRequiredFromContext?: boolean;
16
20
  }
17
- declare const DirectoryItemsInput: FunctionComponent<DirectoryItemsInputProps>;
21
+ declare function DirectoryItemsInput({ label, name, elementType, // Used to specify type of element (Filter, Contingency list, ...)
22
+ equipmentTypes, // Mostly used for filters, it allows the user to get elements of specific equipment only
23
+ itemFilter, // Used to further filter the results displayed according to specific requirement
24
+ titleId, // title of directory item selector dialogue
25
+ hideErrorMessage, onRowChanged, onChange, disable, labelRequiredFromContext, }: DirectoryItemsInputProps): import("react/jsx-runtime").JSX.Element;
18
26
  export default DirectoryItemsInput;
@@ -1,12 +1,12 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { FormControl, Chip, Grid, Tooltip, IconButton } from "@mui/material";
3
- import FieldLabel from "./utils/field-label.js";
4
3
  import FolderIcon from "@mui/icons-material/Folder";
5
4
  import { useState, useMemo, useCallback } from "react";
6
5
  import { useFieldArray, useController } from "react-hook-form";
7
6
  import { useIntl } from "react-intl";
8
- import { RawReadOnlyInput } from "./raw-read-only-input.js";
9
- import { useCustomFormContext } from "./provider/use-custom-form-context.js";
7
+ import RawReadOnlyInput from "./raw-read-only-input.js";
8
+ import FieldLabel from "./utils/field-label.js";
9
+ import useCustomFormContext from "./provider/use-custom-form-context.js";
10
10
  import { isFieldRequired } from "./utils/functions.js";
11
11
  import ErrorInput from "./error-management/error-input.js";
12
12
  import { useSnackMessage } from "../../../hooks/useSnackMessage.js";
@@ -43,7 +43,7 @@ const styles = {
43
43
  marginTop: "-5px"
44
44
  }
45
45
  };
46
- const DirectoryItemsInput = ({
46
+ function DirectoryItemsInput({
47
47
  label,
48
48
  name,
49
49
  elementType,
@@ -59,7 +59,7 @@ const DirectoryItemsInput = ({
59
59
  onChange,
60
60
  disable = false,
61
61
  labelRequiredFromContext = true
62
- }) => {
62
+ }) {
63
63
  const { snackError } = useSnackMessage();
64
64
  const intl = useIntl();
65
65
  const [selected, setSelected] = useState([]);
@@ -106,8 +106,8 @@ const DirectoryItemsInput = ({
106
106
  });
107
107
  } else {
108
108
  append(otherElementAttributes);
109
- onRowChanged && onRowChanged(true);
110
- onChange && onChange(getValues(name));
109
+ onRowChanged == null ? void 0 : onRowChanged(true);
110
+ onChange == null ? void 0 : onChange(getValues(name));
111
111
  }
112
112
  });
113
113
  setDirectoryItemSelectorOpen(false);
@@ -127,8 +127,8 @@ const DirectoryItemsInput = ({
127
127
  const removeElements = useCallback(
128
128
  (index) => {
129
129
  remove(index);
130
- onRowChanged && onRowChanged(true);
131
- onChange && onChange(getValues(name));
130
+ onRowChanged == null ? void 0 : onRowChanged(true);
131
+ onChange == null ? void 0 : onChange(getValues(name));
132
132
  },
133
133
  [onRowChanged, remove, getValues, name, onChange]
134
134
  );
@@ -155,7 +155,7 @@ const DirectoryItemsInput = ({
155
155
  {
156
156
  sx: mergeSx(
157
157
  styles.formDirectoryElements1,
158
- //@ts-ignore
158
+ // @ts-ignore
159
159
  (error == null ? void 0 : error.message) && styles.formDirectoryElementsError
160
160
  ),
161
161
  error: !!(error == null ? void 0 : error.message),
@@ -224,7 +224,7 @@ const DirectoryItemsInput = ({
224
224
  }
225
225
  )
226
226
  ] });
227
- };
227
+ }
228
228
  export {
229
229
  NAME,
230
230
  DirectoryItemsInput as default
@@ -1,4 +1,4 @@
1
- import { default as React, FunctionComponent } from 'react';
1
+ import { default as React } from 'react';
2
2
 
3
3
  export type ErrorMessage = {
4
4
  id: string;
@@ -10,5 +10,5 @@ export interface ErrorInputProps {
10
10
  message: string | React.ReactNode;
11
11
  }) => React.ReactNode;
12
12
  }
13
- declare const ErrorInput: FunctionComponent<ErrorInputProps>;
13
+ declare function ErrorInput({ name, InputField }: ErrorInputProps): "" | import("react/jsx-runtime").JSX.Element | undefined;
14
14
  export default ErrorInput;
@@ -1,11 +1,8 @@
1
- import { jsx, Fragment } from "react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useRef, useEffect } from "react";
3
3
  import { FormattedMessage } from "react-intl";
4
4
  import { useController } from "react-hook-form";
5
- const ErrorInput = ({
6
- name,
7
- InputField
8
- }) => {
5
+ function ErrorInput({ name, InputField }) {
9
6
  var _a;
10
7
  const {
11
8
  fieldState: { error },
@@ -19,7 +16,8 @@ const ErrorInput = ({
19
16
  return {
20
17
  id: errorMsg2
21
18
  };
22
- } else if (typeof errorMsg2 === "object") {
19
+ }
20
+ if (typeof errorMsg2 === "object") {
23
21
  return {
24
22
  id: errorMsg2.id,
25
23
  values: {
@@ -35,10 +33,10 @@ const ErrorInput = ({
35
33
  }
36
34
  }, [isSubmitting]);
37
35
  const errorMsg = (error == null ? void 0 : error.message) || ((_a = error == null ? void 0 : error.root) == null ? void 0 : _a.message);
38
- return /* @__PURE__ */ jsx(Fragment, { children: errorMsg && /* @__PURE__ */ jsx("div", { ref: errorRef, children: InputField({
36
+ return errorMsg && /* @__PURE__ */ jsx("div", { ref: errorRef, children: InputField({
39
37
  message: /* @__PURE__ */ jsx(FormattedMessage, { ...errorProps(errorMsg) })
40
- }) }) });
41
- };
38
+ }) });
39
+ }
42
40
  export {
43
41
  ErrorInput as default
44
42
  };
@@ -1,7 +1,7 @@
1
- import { default as React, FunctionComponent } from 'react';
1
+ import { default as React } from 'react';
2
2
 
3
3
  interface FieldErrorAlertProps {
4
4
  message: string | React.ReactNode;
5
5
  }
6
- declare const FieldErrorAlert: FunctionComponent<FieldErrorAlertProps>;
6
+ declare function FieldErrorAlert({ message }: FieldErrorAlertProps): import("react/jsx-runtime").JSX.Element;
7
7
  export default FieldErrorAlert;
@@ -1,10 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Grid, Alert } from "@mui/material";
3
- const FieldErrorAlert = ({
4
- message
5
- }) => {
3
+ function FieldErrorAlert({ message }) {
6
4
  return /* @__PURE__ */ jsx(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx(Alert, { severity: "error", children: message }) });
7
- };
5
+ }
8
6
  export {
9
7
  FieldErrorAlert as default
10
8
  };
@@ -1,6 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
 
3
- declare const MidFormError: ({ message }: {
3
+ declare function MidFormError({ message }: {
4
4
  message: string | ReactNode;
5
- }) => import("react/jsx-runtime").JSX.Element;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
6
  export default MidFormError;
@@ -1,6 +1,6 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { Box } from "@mui/material";
3
- const MidFormError = ({ message }) => {
3
+ function MidFormError({ message }) {
4
4
  return /* @__PURE__ */ jsx(
5
5
  Box,
6
6
  {
@@ -13,7 +13,7 @@ const MidFormError = ({ message }) => {
13
13
  children: message
14
14
  }
15
15
  );
16
- };
16
+ }
17
17
  export {
18
18
  MidFormError as default
19
19
  };
@@ -1,6 +1,5 @@
1
- import { FunctionComponent } from 'react';
2
1
  import { TextInputProps } from '../text-input';
3
2
 
4
3
  export type FloatInputProps = Omit<TextInputProps, 'outputTransform' | 'inputTransform' | 'acceptValue'>;
5
- declare const FloatInput: FunctionComponent<FloatInputProps>;
4
+ declare function FloatInput(props: FloatInputProps): import("react/jsx-runtime").JSX.Element;
6
5
  export default FloatInput;
@@ -7,11 +7,12 @@ const normalizeFixed = (number) => {
7
7
  useGrouping: false
8
8
  });
9
9
  };
10
- const FloatInput = (props) => {
10
+ function FloatInput(props) {
11
11
  const inputTransform = (value) => {
12
- if (typeof value == "number" && !isNaN(value)) {
12
+ if (typeof value === "number" && !Number.isNaN(value)) {
13
13
  return normalizeFixed(value);
14
- } else if (typeof value == "string") {
14
+ }
15
+ if (typeof value === "string") {
15
16
  if (["-", "."].includes(value)) {
16
17
  return value;
17
18
  }
@@ -31,7 +32,7 @@ const FloatInput = (props) => {
31
32
  return tmp;
32
33
  }
33
34
  const parsed = parseFloat(tmp);
34
- return isNaN(parsed) ? null : normalizeFixed(parsed);
35
+ return Number.isNaN(parsed) ? null : normalizeFixed(parsed);
35
36
  };
36
37
  return /* @__PURE__ */ jsx(
37
38
  TextInput,
@@ -42,7 +43,7 @@ const FloatInput = (props) => {
42
43
  ...props
43
44
  }
44
45
  );
45
- };
46
+ }
46
47
  export {
47
48
  FloatInput as default
48
49
  };
@@ -1,4 +1,4 @@
1
1
  import { TextInputProps } from '../text-input';
2
2
 
3
- declare const IntegerInput: (props: TextInputProps) => import("react/jsx-runtime").JSX.Element;
3
+ declare function IntegerInput(props: TextInputProps): import("react/jsx-runtime").JSX.Element;
4
4
  export default IntegerInput;
@@ -1,12 +1,12 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import TextInput from "../text-input.js";
3
3
  import { isIntegerNumber } from "./utils.js";
4
- const IntegerInput = (props) => {
4
+ function IntegerInput(props) {
5
5
  const inputTransform = (value) => {
6
- if ("-" === value) {
6
+ if (value === "-") {
7
7
  return value;
8
8
  }
9
- return value === null || typeof value === "number" && isNaN(value) ? "" : value.toString();
9
+ return value === null || typeof value === "number" && Number.isNaN(value) ? "" : value.toString();
10
10
  };
11
11
  const outputTransform = (value) => {
12
12
  if (value === "-") {
@@ -15,7 +15,7 @@ const IntegerInput = (props) => {
15
15
  if (value === "0") {
16
16
  return 0;
17
17
  }
18
- return parseInt(value) || null;
18
+ return parseInt(value, 10) || null;
19
19
  };
20
20
  return /* @__PURE__ */ jsx(
21
21
  TextInput,
@@ -26,7 +26,7 @@ const IntegerInput = (props) => {
26
26
  ...props
27
27
  }
28
28
  );
29
- };
29
+ }
30
30
  export {
31
31
  IntegerInput as default
32
32
  };
@@ -10,5 +10,5 @@ type CustomFormContextProps = {
10
10
  export type MergedFormContextProps = UseFormReturn<any> & CustomFormContextProps;
11
11
  type CustomFormProviderProps = PropsWithChildren<MergedFormContextProps>;
12
12
  export declare const CustomFormContext: React.Context<CustomFormContextProps>;
13
- declare const CustomFormProvider: (props: CustomFormProviderProps) => import("react/jsx-runtime").JSX.Element;
13
+ declare function CustomFormProvider(props: CustomFormProviderProps): import("react/jsx-runtime").JSX.Element;
14
14
  export default CustomFormProvider;
@@ -1,5 +1,5 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
- import { createContext } from "react";
2
+ import React, { createContext } from "react";
3
3
  import { FormProvider } from "react-hook-form";
4
4
  import * as yup from "yup";
5
5
  import { getSystemLanguage } from "../../../../hooks/localized-countries-hook.js";
@@ -8,7 +8,7 @@ const CustomFormContext = createContext({
8
8
  validationSchema: yup.object(),
9
9
  language: getSystemLanguage()
10
10
  });
11
- const CustomFormProvider = (props) => {
11
+ function CustomFormProvider(props) {
12
12
  const {
13
13
  validationSchema,
14
14
  removeOptional,
@@ -19,15 +19,18 @@ const CustomFormProvider = (props) => {
19
19
  return /* @__PURE__ */ jsx(FormProvider, { ...formMethods, children: /* @__PURE__ */ jsx(
20
20
  CustomFormContext.Provider,
21
21
  {
22
- value: {
23
- validationSchema,
24
- removeOptional,
25
- language
26
- },
22
+ value: React.useMemo(
23
+ () => ({
24
+ validationSchema,
25
+ removeOptional,
26
+ language
27
+ }),
28
+ [validationSchema, removeOptional, language]
29
+ ),
27
30
  children
28
31
  }
29
32
  ) });
30
- };
33
+ }
31
34
  export {
32
35
  CustomFormContext,
33
36
  CustomFormProvider as default
@@ -1,3 +1,4 @@
1
1
  import { MergedFormContextProps } from './custom-form-provider';
2
2
 
3
- export declare const useCustomFormContext: () => MergedFormContextProps;
3
+ declare const useCustomFormContext: () => MergedFormContextProps;
4
+ export default useCustomFormContext;
@@ -7,5 +7,5 @@ const useCustomFormContext = () => {
7
7
  return { ...formMethods, ...customFormMethods };
8
8
  };
9
9
  export {
10
- useCustomFormContext
10
+ useCustomFormContext as default
11
11
  };
@@ -11,5 +11,5 @@ interface RadioInputProps {
11
11
  options: RadioOptions;
12
12
  formProps?: Omit<RadioGroupProps, 'value'>;
13
13
  }
14
- declare const RadioInput: ({ name, label, id, options, formProps, }: RadioInputProps) => import("react/jsx-runtime").JSX.Element;
14
+ declare function RadioInput({ name, label, id, options, formProps }: RadioInputProps): import("react/jsx-runtime").JSX.Element;
15
15
  export default RadioInput;
@@ -3,13 +3,7 @@ import { FormControl, FormLabel, RadioGroup, FormControlLabel, Radio } from "@mu
3
3
  import { FormattedMessage } from "react-intl";
4
4
  import { useController } from "react-hook-form";
5
5
  import FieldLabel from "./utils/field-label.js";
6
- const RadioInput = ({
7
- name,
8
- label,
9
- id,
10
- options,
11
- formProps
12
- }) => {
6
+ function RadioInput({ name, label, id, options, formProps }) {
13
7
  const {
14
8
  field: { onChange, value }
15
9
  } = useController({ name });
@@ -35,7 +29,7 @@ const RadioInput = ({
35
29
  }
36
30
  )
37
31
  ] });
38
- };
32
+ }
39
33
  export {
40
34
  RadioInput as default
41
35
  };
@@ -1,4 +1,3 @@
1
- import { FunctionComponent } from 'react';
2
1
  import { default as yup } from '../../../utils/yup-config';
3
2
 
4
3
  export declare const RangeType: {
@@ -50,5 +49,5 @@ interface RangeInputProps {
50
49
  name: string;
51
50
  label: string;
52
51
  }
53
- declare const RangeInput: FunctionComponent<RangeInputProps>;
52
+ declare function RangeInput({ name, label }: RangeInputProps): import("react/jsx-runtime").JSX.Element;
54
53
  export default RangeInput;
@@ -1,14 +1,14 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useWatch } from "react-hook-form";
3
- import FloatInput from "./numbers/float-input.js";
4
- import "../../../utils/yup-config.js";
5
3
  import { FormattedMessage } from "react-intl";
6
4
  import { useMemo } from "react";
7
5
  import InputLabel from "@mui/material/InputLabel";
8
6
  import { Grid } from "@mui/material";
9
7
  import FormControl from "@mui/material/FormControl";
8
+ import FloatInput from "./numbers/float-input.js";
9
+ import "../../../utils/yup-config.js";
10
10
  import MuiSelectInput from "./select-inputs/mui-select-input.js";
11
- import { FieldConstants } from "../../../utils/field-constants.js";
11
+ import FieldConstants from "../../../utils/field-constants.js";
12
12
  import * as yup from "yup";
13
13
  const style = {
14
14
  inputLegend: (theme) => ({
@@ -51,7 +51,7 @@ const getRangeInputSchema = (name) => ({
51
51
  [[FieldConstants.VALUE_1, FieldConstants.VALUE_2]]
52
52
  )
53
53
  });
54
- const RangeInput = ({ name, label }) => {
54
+ function RangeInput({ name, label }) {
55
55
  const watchOperationType = useWatch({
56
56
  name: `${name}.${FieldConstants.OPERATION_TYPE}`
57
57
  });
@@ -108,7 +108,7 @@ const RangeInput = ({ name, label }) => {
108
108
  isOperationTypeRange && /* @__PURE__ */ jsx(Grid, { item: true, children: secondValueField })
109
109
  ] })
110
110
  ] });
111
- };
111
+ }
112
112
  export {
113
113
  DEFAULT_RANGE_VALUE,
114
114
  RangeType,
@@ -4,6 +4,7 @@
4
4
  * License, v. 2.0. If a copy of the MPL was not distributed with this
5
5
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
  */
7
- export declare function RawReadOnlyInput({ name }: {
7
+ declare function RawReadOnlyInput({ name }: {
8
8
  name: string;
9
9
  }): any;
10
+ export default RawReadOnlyInput;
@@ -6,5 +6,5 @@ function RawReadOnlyInput({ name }) {
6
6
  return value;
7
7
  }
8
8
  export {
9
- RawReadOnlyInput
9
+ RawReadOnlyInput as default
10
10
  };
@@ -1,8 +1,6 @@
1
- import { FunctionComponent } from 'react';
2
-
3
1
  interface CountryInputProps {
4
2
  name: string;
5
3
  label: string;
6
4
  }
7
- declare const CountriesInput: FunctionComponent<CountryInputProps>;
5
+ declare function CountriesInput({ name, label }: CountryInputProps): import("react/jsx-runtime").JSX.Element;
8
6
  export default CountriesInput;
@@ -3,20 +3,16 @@ import { useCallback } from "react";
3
3
  import { Chip } from "@mui/material";
4
4
  import AutocompleteInput from "../autocomplete-inputs/autocomplete-input.js";
5
5
  import { useLocalizedCountries } from "../../../../hooks/localized-countries-hook.js";
6
- import { useCustomFormContext } from "../provider/use-custom-form-context.js";
7
- const CountriesInput = ({
8
- name,
9
- label
10
- }) => {
6
+ import useCustomFormContext from "../provider/use-custom-form-context.js";
7
+ function CountriesInput({ name, label }) {
11
8
  const { language } = useCustomFormContext();
12
9
  const { translate, countryCodes } = useLocalizedCountries(language);
13
10
  const translateOption = useCallback(
14
11
  (option) => {
15
12
  if (typeof option === "string") {
16
13
  return translate(option);
17
- } else {
18
- return translate(option.label);
19
14
  }
15
+ return translate(option.label);
20
16
  },
21
17
  [translate]
22
18
  );
@@ -40,7 +36,7 @@ const CountriesInput = ({
40
36
  ))
41
37
  }
42
38
  );
43
- };
39
+ }
44
40
  export {
45
41
  CountriesInput as default
46
42
  };
@@ -1,2 +1,4 @@
1
- declare const InputWithPopupConfirmation: ({ Input, name, shouldOpenPopup, resetOnConfirmation, message, validateButtonLabel, ...props }: any) => import("react/jsx-runtime").JSX.Element;
1
+ declare function InputWithPopupConfirmation({ Input, name, shouldOpenPopup, // condition to open popup confirmation
2
+ resetOnConfirmation, // function to reset values in your form on confirmation,
3
+ message, validateButtonLabel, ...props }: any): import("react/jsx-runtime").JSX.Element;
2
4
  export default InputWithPopupConfirmation;
@@ -2,7 +2,7 @@ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useController } from "react-hook-form";
3
3
  import { useState } from "react";
4
4
  import PopupConfirmationDialog from "../../../dialogs/popup-confirmation-dialog.js";
5
- const InputWithPopupConfirmation = ({
5
+ function InputWithPopupConfirmation({
6
6
  Input,
7
7
  name,
8
8
  shouldOpenPopup,
@@ -12,7 +12,7 @@ const InputWithPopupConfirmation = ({
12
12
  message,
13
13
  validateButtonLabel,
14
14
  ...props
15
- }) => {
15
+ }) {
16
16
  const [newValue, setNewValue] = useState(null);
17
17
  const [openPopup, setOpenPopup] = useState(false);
18
18
  const {
@@ -29,7 +29,7 @@ const InputWithPopupConfirmation = ({
29
29
  }
30
30
  };
31
31
  const handlePopupConfirmation = () => {
32
- resetOnConfirmation && resetOnConfirmation();
32
+ resetOnConfirmation == null ? void 0 : resetOnConfirmation();
33
33
  onChange(newValue);
34
34
  setOpenPopup(false);
35
35
  };
@@ -55,7 +55,7 @@ const InputWithPopupConfirmation = ({
55
55
  }
56
56
  )
57
57
  ] });
58
- };
58
+ }
59
59
  export {
60
60
  InputWithPopupConfirmation as default
61
61
  };
@@ -1,4 +1,3 @@
1
- import { FunctionComponent } from 'react';
2
1
  import { SelectProps } from '@mui/material';
3
2
 
4
3
  interface MuiSelectInputProps {
@@ -8,5 +7,5 @@ interface MuiSelectInputProps {
8
7
  label: string;
9
8
  }[];
10
9
  }
11
- declare const MuiSelectInput: FunctionComponent<MuiSelectInputProps & SelectProps>;
10
+ declare function MuiSelectInput({ name, options, ...props }: MuiSelectInputProps & SelectProps): import("react/jsx-runtime").JSX.Element;
12
11
  export default MuiSelectInput;