@hipay/hipay-material-ui 3.15.2 → 3.15.3-beta.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (435) hide show
  1. package/HiAccordion/HiAccordion.js +5 -22
  2. package/HiAccordion/index.js +0 -3
  3. package/HiAccordionActions/HiAccordionActions.js +0 -12
  4. package/HiAccordionActions/index.js +0 -3
  5. package/HiAccordionSummary/HiAccordionSummary.js +0 -13
  6. package/HiAccordionSummary/index.js +0 -3
  7. package/HiAlertModal/HiAlertModal.js +4 -18
  8. package/HiAlertModal/index.js +0 -3
  9. package/HiAppBar/HiAppBar.js +8 -37
  10. package/HiAppBar/index.js +0 -2
  11. package/HiAvatar/HiAvatar.js +2 -10
  12. package/HiAvatar/index.js +0 -2
  13. package/HiBadge/HiBadge.js +14 -27
  14. package/HiBadge/index.js +0 -2
  15. package/HiBreadcrumb/HiBreadcrumb.js +5 -28
  16. package/HiBreadcrumb/HiStep.js +10 -40
  17. package/HiBreadcrumb/HiStepConnector.js +11 -43
  18. package/HiBreadcrumb/HiStepContent.js +3 -25
  19. package/HiBreadcrumb/HiStepIcon.js +11 -33
  20. package/HiBreadcrumb/HiStepLabel.js +12 -39
  21. package/HiBreadcrumb/HiStepper.js +3 -25
  22. package/HiBreadcrumb/index.js +0 -2
  23. package/HiButton/HiButton.js +8 -31
  24. package/HiButton/index.js +0 -3
  25. package/HiCell/CellAddress.js +9 -28
  26. package/HiCell/CellDate.js +7 -31
  27. package/HiCell/CellHiddenContent.js +4 -24
  28. package/HiCell/CellIcon.js +9 -31
  29. package/HiCell/CellImage.js +9 -29
  30. package/HiCell/CellNumeric.js +10 -35
  31. package/HiCell/CellPinToAction.js +6 -28
  32. package/HiCell/CellRate.js +14 -45
  33. package/HiCell/CellSentinel.js +9 -28
  34. package/HiCell/CellSentinelScore.js +5 -24
  35. package/HiCell/CellText.js +13 -47
  36. package/HiCell/CellTextStyled.js +12 -22
  37. package/HiCell/index.js +0 -10
  38. package/HiCheckbox/HiCheckbox.js +16 -50
  39. package/HiCheckbox/index.js +0 -2
  40. package/HiChip/HiChip.js +22 -43
  41. package/HiChip/HiChipSwitch.js +12 -52
  42. package/HiChip/index.js +0 -3
  43. package/HiColoredLabel/HiColoredLabel.js +37 -56
  44. package/HiColoredLabel/index.js +0 -2
  45. package/HiDatePicker/Caption.js +6 -16
  46. package/HiDatePicker/HiDatePicker.js +14 -85
  47. package/HiDatePicker/HiDatePickerMobile.js +17 -41
  48. package/HiDatePicker/HiDateRangePicker.js +35 -129
  49. package/HiDatePicker/HiDateRangeSelector.js +45 -123
  50. package/HiDatePicker/ListPicker.js +5 -33
  51. package/HiDatePicker/NavBar.js +9 -26
  52. package/HiDatePicker/Overlays/CustomOverlayLayout.js +7 -21
  53. package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +7 -21
  54. package/HiDatePicker/Overlays/MonthPickerOverlay.js +3 -24
  55. package/HiDatePicker/Overlays/Overlay.js +4 -18
  56. package/HiDatePicker/Overlays/TimePickerOverlay.js +5 -34
  57. package/HiDatePicker/Overlays/YearPickerOverlay.js +7 -29
  58. package/HiDatePicker/Overlays/index.js +0 -6
  59. package/HiDatePicker/Weekday.js +3 -7
  60. package/HiDatePicker/hiLocaleUtils.js +7 -18
  61. package/HiDatePicker/index.js +0 -2
  62. package/HiDatePicker/stylesheet.js +5 -10
  63. package/HiDialog/HiDialog.js +4 -15
  64. package/HiDialog/index.js +0 -2
  65. package/HiDotsStepper/HiDot.js +6 -33
  66. package/HiDotsStepper/HiDotsStepper.js +7 -32
  67. package/HiDotsStepper/index.js +0 -3
  68. package/HiExpansionPanel/HiExpansionPanel.js +13 -34
  69. package/HiExpansionPanel/index.js +0 -3
  70. package/HiForm/HiAddressField.js +9 -34
  71. package/HiForm/HiEmailField.js +4 -27
  72. package/HiForm/HiFormControl.js +27 -70
  73. package/HiForm/HiFormLabel.js +13 -37
  74. package/HiForm/HiInput.js +28 -80
  75. package/HiForm/HiPasswordField.js +5 -31
  76. package/HiForm/HiSearchField.js +2 -32
  77. package/HiForm/HiSlider.js +19 -52
  78. package/HiForm/HiTextField.js +21 -45
  79. package/HiForm/HiUpload.js +31 -87
  80. package/HiForm/HiUploadField.js +9 -30
  81. package/HiForm/HiUploadInput.js +20 -70
  82. package/HiForm/index.js +0 -12
  83. package/HiIcon/HiIcon.js +5 -28
  84. package/HiIcon/index.js +0 -2
  85. package/HiIconButton/HiIconButton.js +5 -18
  86. package/HiIconButton/index.js +0 -2
  87. package/HiListItemLink/HiListItemLink.js +6 -17
  88. package/HiListItemLink/index.js +0 -2
  89. package/HiLoader/HiLoader.js +4 -13
  90. package/HiLoader/index.js +0 -2
  91. package/HiNotice/HiKPI.js +14 -42
  92. package/HiNotice/HiKPINotice.js +4 -13
  93. package/HiNotice/index.js +0 -3
  94. package/HiPagination/HiPagination.js +0 -9
  95. package/HiPagination/index.js +0 -2
  96. package/HiPaymentMeans/HiPaymentMeans.js +24 -60
  97. package/HiPaymentMeans/index.js +0 -2
  98. package/HiPdfReader/HiPdfReader.js +21 -52
  99. package/HiPdfReader/index.js +0 -2
  100. package/HiPin/HiPin.js +14 -23
  101. package/HiPin/index.js +0 -2
  102. package/HiRadio/HiRadio.js +9 -18
  103. package/HiRadio/index.js +0 -2
  104. package/HiScrollStepper/HiScrollStepper.js +26 -63
  105. package/HiScrollStepper/index.js +0 -2
  106. package/HiSelect/HiDynamicSelect.js +31 -40
  107. package/HiSelect/HiDynamicSelectField.js +22 -44
  108. package/HiSelect/HiNestedSelect.js +61 -104
  109. package/HiSelect/HiNestedSelectContent.js +58 -82
  110. package/HiSelect/HiNestedSelectField.js +22 -44
  111. package/HiSelect/HiSelect.js +85 -180
  112. package/HiSelect/HiSelectContent.js +58 -90
  113. package/HiSelect/HiSelectField.js +23 -45
  114. package/HiSelect/HiSelectInput.js +20 -69
  115. package/HiSelect/HiSelectMobile.js +5 -40
  116. package/HiSelect/HiSuggestSelect.js +22 -76
  117. package/HiSelect/HiSuggestSelectField.js +13 -35
  118. package/HiSelect/index.js +0 -12
  119. package/HiSelectableList/HiSelectableList.js +29 -83
  120. package/HiSelectableList/HiSelectableListHierarchic.js +31 -55
  121. package/HiSelectableList/HiSelectableListItem.js +37 -76
  122. package/HiSelectableList/index.js +0 -4
  123. package/HiStepper/DefaultIndicator.js +0 -8
  124. package/HiStepper/HiStep.js +18 -47
  125. package/HiStepper/HiStepper.js +1 -13
  126. package/HiStepper/index.js +0 -3
  127. package/HiSwitch/HiSwitch.js +15 -36
  128. package/HiSwitch/HiSwitchState.js +17 -31
  129. package/HiSwitch/index.js +0 -3
  130. package/HiTable/HiCellBuilder.js +7 -61
  131. package/HiTable/HiTable.js +17 -44
  132. package/HiTable/HiTableBody.js +6 -22
  133. package/HiTable/HiTableHeader.js +14 -46
  134. package/HiTable/HiTableRow.js +7 -39
  135. package/HiTable/constants.js +9 -14
  136. package/HiTable/index.js +0 -2
  137. package/es/HiAccordion/HiAccordion.js +5 -22
  138. package/es/HiAccordion/index.js +0 -3
  139. package/es/HiAccordionActions/HiAccordionActions.js +0 -12
  140. package/es/HiAccordionActions/index.js +0 -3
  141. package/es/HiAccordionSummary/HiAccordionSummary.js +0 -13
  142. package/es/HiAccordionSummary/index.js +0 -3
  143. package/es/HiAlertModal/HiAlertModal.js +4 -18
  144. package/es/HiAlertModal/index.js +0 -3
  145. package/es/HiAppBar/HiAppBar.js +8 -37
  146. package/es/HiAppBar/index.js +0 -2
  147. package/es/HiAvatar/HiAvatar.js +2 -10
  148. package/es/HiAvatar/index.js +0 -2
  149. package/es/HiBadge/HiBadge.js +14 -27
  150. package/es/HiBadge/index.js +0 -2
  151. package/es/HiBreadcrumb/HiBreadcrumb.js +5 -28
  152. package/es/HiBreadcrumb/HiStep.js +10 -40
  153. package/es/HiBreadcrumb/HiStepConnector.js +11 -43
  154. package/es/HiBreadcrumb/HiStepContent.js +3 -25
  155. package/es/HiBreadcrumb/HiStepIcon.js +11 -33
  156. package/es/HiBreadcrumb/HiStepLabel.js +12 -39
  157. package/es/HiBreadcrumb/HiStepper.js +3 -25
  158. package/es/HiBreadcrumb/index.js +0 -2
  159. package/es/HiButton/HiButton.js +8 -31
  160. package/es/HiButton/index.js +0 -3
  161. package/es/HiCell/CellAddress.js +9 -28
  162. package/es/HiCell/CellDate.js +7 -31
  163. package/es/HiCell/CellHiddenContent.js +4 -24
  164. package/es/HiCell/CellIcon.js +9 -31
  165. package/es/HiCell/CellImage.js +9 -29
  166. package/es/HiCell/CellNumeric.js +10 -35
  167. package/es/HiCell/CellPinToAction.js +6 -28
  168. package/es/HiCell/CellRate.js +14 -45
  169. package/es/HiCell/CellSentinel.js +9 -28
  170. package/es/HiCell/CellSentinelScore.js +5 -24
  171. package/es/HiCell/CellText.js +13 -47
  172. package/es/HiCell/CellTextStyled.js +12 -22
  173. package/es/HiCell/index.js +0 -10
  174. package/es/HiCheckbox/HiCheckbox.js +16 -50
  175. package/es/HiCheckbox/index.js +0 -2
  176. package/es/HiChip/HiChip.js +22 -43
  177. package/es/HiChip/HiChipSwitch.js +12 -52
  178. package/es/HiChip/index.js +0 -3
  179. package/es/HiColoredLabel/HiColoredLabel.js +37 -56
  180. package/es/HiColoredLabel/index.js +0 -2
  181. package/es/HiDatePicker/Caption.js +6 -16
  182. package/es/HiDatePicker/HiDatePicker.js +14 -85
  183. package/es/HiDatePicker/HiDatePickerMobile.js +17 -41
  184. package/es/HiDatePicker/HiDateRangePicker.js +35 -129
  185. package/es/HiDatePicker/HiDateRangeSelector.js +45 -123
  186. package/es/HiDatePicker/ListPicker.js +5 -33
  187. package/es/HiDatePicker/NavBar.js +9 -26
  188. package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +7 -21
  189. package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +7 -21
  190. package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +3 -24
  191. package/es/HiDatePicker/Overlays/Overlay.js +4 -18
  192. package/es/HiDatePicker/Overlays/TimePickerOverlay.js +5 -34
  193. package/es/HiDatePicker/Overlays/YearPickerOverlay.js +7 -29
  194. package/es/HiDatePicker/Overlays/index.js +0 -6
  195. package/es/HiDatePicker/Weekday.js +3 -7
  196. package/es/HiDatePicker/hiLocaleUtils.js +7 -18
  197. package/es/HiDatePicker/index.js +0 -2
  198. package/es/HiDatePicker/stylesheet.js +5 -10
  199. package/es/HiDialog/HiDialog.js +4 -15
  200. package/es/HiDialog/index.js +0 -2
  201. package/es/HiDotsStepper/HiDot.js +6 -33
  202. package/es/HiDotsStepper/HiDotsStepper.js +7 -32
  203. package/es/HiDotsStepper/index.js +0 -3
  204. package/es/HiExpansionPanel/HiExpansionPanel.js +13 -34
  205. package/es/HiExpansionPanel/index.js +0 -3
  206. package/es/HiForm/HiAddressField.js +9 -34
  207. package/es/HiForm/HiEmailField.js +4 -27
  208. package/es/HiForm/HiFormControl.js +27 -70
  209. package/es/HiForm/HiFormLabel.js +13 -37
  210. package/es/HiForm/HiInput.js +28 -80
  211. package/es/HiForm/HiPasswordField.js +5 -31
  212. package/es/HiForm/HiSearchField.js +2 -32
  213. package/es/HiForm/HiSlider.js +19 -52
  214. package/es/HiForm/HiTextField.js +21 -45
  215. package/es/HiForm/HiUpload.js +31 -87
  216. package/es/HiForm/HiUploadField.js +9 -30
  217. package/es/HiForm/HiUploadInput.js +20 -70
  218. package/es/HiForm/index.js +0 -12
  219. package/es/HiIcon/HiIcon.js +5 -28
  220. package/es/HiIcon/index.js +0 -2
  221. package/es/HiIconButton/HiIconButton.js +5 -18
  222. package/es/HiIconButton/index.js +0 -2
  223. package/es/HiListItemLink/HiListItemLink.js +6 -17
  224. package/es/HiListItemLink/index.js +0 -2
  225. package/es/HiLoader/HiLoader.js +4 -13
  226. package/es/HiLoader/index.js +0 -2
  227. package/es/HiNotice/HiKPI.js +14 -42
  228. package/es/HiNotice/HiKPINotice.js +4 -13
  229. package/es/HiNotice/index.js +0 -3
  230. package/es/HiPagination/HiPagination.js +0 -9
  231. package/es/HiPagination/index.js +0 -2
  232. package/es/HiPaymentMeans/HiPaymentMeans.js +24 -60
  233. package/es/HiPaymentMeans/index.js +0 -2
  234. package/es/HiPdfReader/HiPdfReader.js +21 -52
  235. package/es/HiPdfReader/index.js +0 -2
  236. package/es/HiPin/HiPin.js +14 -23
  237. package/es/HiPin/index.js +0 -2
  238. package/es/HiRadio/HiRadio.js +9 -18
  239. package/es/HiRadio/index.js +0 -2
  240. package/es/HiScrollStepper/HiScrollStepper.js +26 -63
  241. package/es/HiScrollStepper/index.js +0 -2
  242. package/es/HiSelect/HiDynamicSelect.js +31 -40
  243. package/es/HiSelect/HiDynamicSelectField.js +22 -44
  244. package/es/HiSelect/HiNestedSelect.js +61 -104
  245. package/es/HiSelect/HiNestedSelectContent.js +58 -82
  246. package/es/HiSelect/HiNestedSelectField.js +22 -44
  247. package/es/HiSelect/HiSelect.js +85 -180
  248. package/es/HiSelect/HiSelectContent.js +58 -90
  249. package/es/HiSelect/HiSelectField.js +23 -45
  250. package/es/HiSelect/HiSelectInput.js +20 -69
  251. package/es/HiSelect/HiSelectMobile.js +5 -40
  252. package/es/HiSelect/HiSuggestSelect.js +22 -76
  253. package/es/HiSelect/HiSuggestSelectField.js +13 -35
  254. package/es/HiSelect/index.js +0 -12
  255. package/es/HiSelectableList/HiSelectableList.js +29 -83
  256. package/es/HiSelectableList/HiSelectableListHierarchic.js +31 -55
  257. package/es/HiSelectableList/HiSelectableListItem.js +37 -76
  258. package/es/HiSelectableList/index.js +0 -4
  259. package/es/HiStepper/DefaultIndicator.js +0 -8
  260. package/es/HiStepper/HiStep.js +18 -47
  261. package/es/HiStepper/HiStepper.js +1 -13
  262. package/es/HiStepper/index.js +0 -3
  263. package/es/HiSwitch/HiSwitch.js +15 -36
  264. package/es/HiSwitch/HiSwitchState.js +17 -31
  265. package/es/HiSwitch/index.js +0 -3
  266. package/es/HiTable/HiCellBuilder.js +7 -61
  267. package/es/HiTable/HiTable.js +17 -44
  268. package/es/HiTable/HiTableBody.js +6 -22
  269. package/es/HiTable/HiTableHeader.js +14 -46
  270. package/es/HiTable/HiTableRow.js +7 -39
  271. package/es/HiTable/constants.js +9 -14
  272. package/es/HiTable/index.js +0 -2
  273. package/es/hi-svg-icons/HiAccount.js +3 -12
  274. package/es/hi-svg-icons/HiActivity.js +3 -12
  275. package/es/hi-svg-icons/HiAll.js +6 -16
  276. package/es/hi-svg-icons/HiBilling.js +3 -12
  277. package/es/hi-svg-icons/HiBriefcaseRescue.js +3 -12
  278. package/es/hi-svg-icons/HiBusiness.js +3 -12
  279. package/es/hi-svg-icons/HiCatalog.js +3 -12
  280. package/es/hi-svg-icons/HiCustomer.js +3 -12
  281. package/es/hi-svg-icons/HiDownload.js +3 -12
  282. package/es/hi-svg-icons/HiFinance.js +3 -12
  283. package/es/hi-svg-icons/HiFinanceMenu.js +3 -12
  284. package/es/hi-svg-icons/HiHostedPaymentPage.js +3 -12
  285. package/es/hi-svg-icons/HiHostedPaymentPageMenu.js +3 -12
  286. package/es/hi-svg-icons/HiIntegration.js +3 -12
  287. package/es/hi-svg-icons/HiIntegrationMenu.js +3 -12
  288. package/es/hi-svg-icons/HiIntelligence.js +3 -12
  289. package/es/hi-svg-icons/HiIntelligenceMenu.js +3 -12
  290. package/es/hi-svg-icons/HiInvoice.js +3 -12
  291. package/es/hi-svg-icons/HiInvoiceMenu.js +3 -12
  292. package/es/hi-svg-icons/HiLogoRounded.js +5 -15
  293. package/es/hi-svg-icons/HiOrder.js +3 -12
  294. package/es/hi-svg-icons/HiPaymentOrder.js +3 -12
  295. package/es/hi-svg-icons/HiPermission.js +3 -12
  296. package/es/hi-svg-icons/HiPriceGrid.js +3 -12
  297. package/es/hi-svg-icons/HiPrivate.js +3 -12
  298. package/es/hi-svg-icons/HiRoute.js +3 -12
  299. package/es/hi-svg-icons/HiRouteMenu.js +3 -12
  300. package/es/hi-svg-icons/HiRouteSwitch.js +6 -17
  301. package/es/hi-svg-icons/HiRouteSwitchMenu.js +6 -17
  302. package/es/hi-svg-icons/HiSettlement.js +3 -12
  303. package/es/hi-svg-icons/HiSizeLarge.js +3 -12
  304. package/es/hi-svg-icons/HiSizeMedium.js +3 -12
  305. package/es/hi-svg-icons/HiSizeSmall.js +3 -12
  306. package/es/hi-svg-icons/HiStore.js +3 -12
  307. package/es/hi-svg-icons/HiStoreMenu.js +3 -12
  308. package/es/hi-svg-icons/HiTransaction.js +3 -12
  309. package/es/hi-svg-icons/HiTransactionMenu.js +3 -12
  310. package/es/hi-svg-icons/HiUser.js +3 -12
  311. package/es/hi-svg-icons/HiVendor.js +3 -12
  312. package/es/hi-svg-icons/HiWidget.js +3 -12
  313. package/es/hi-svg-icons/index.js +0 -41
  314. package/es/hi-svg-images/HiLogo.js +3 -10
  315. package/es/hi-svg-images/HiLogoWhite.js +3 -10
  316. package/es/hi-svg-images/index.js +0 -3
  317. package/es/setupTest.js +2 -13
  318. package/es/styleguide/Wrapper.js +0 -6
  319. package/es/styles/MuiThemeProvider.js +11 -43
  320. package/es/styles/colorManipulator.js +15 -50
  321. package/es/styles/createBreakpoints.js +14 -28
  322. package/es/styles/createGenerateClassName.js +14 -24
  323. package/es/styles/createMixins.js +0 -5
  324. package/es/styles/createMuiTheme.js +10 -26
  325. package/es/styles/createPalette.js +65 -85
  326. package/es/styles/createStyles.js +0 -1
  327. package/es/styles/createTypography.js +15 -24
  328. package/es/styles/getStylesCreator.js +0 -12
  329. package/es/styles/getThemeProps.js +1 -5
  330. package/es/styles/index.js +0 -6
  331. package/es/styles/jssPreset.js +0 -9
  332. package/es/styles/makeStyles.js +0 -6
  333. package/es/styles/mergeClasses.js +4 -14
  334. package/es/styles/shadows.js +0 -2
  335. package/es/styles/spacing.js +0 -2
  336. package/es/styles/themeListener.js +0 -6
  337. package/es/styles/transitions.js +13 -22
  338. package/es/styles/withStyles.js +0 -6
  339. package/es/test-utils/createMount.js +2 -12
  340. package/es/test-utils/createRender.js +2 -9
  341. package/es/test-utils/createShallow.js +6 -17
  342. package/es/test-utils/getClasses.js +0 -2
  343. package/es/test-utils/index.js +0 -6
  344. package/es/test-utils/until.js +3 -14
  345. package/es/test-utils/unwrap.js +0 -1
  346. package/es/theme/palette.js +0 -4
  347. package/es/theme/typography.js +5 -12
  348. package/es/theme.js +0 -5
  349. package/es/transitions/utils.js +2 -5
  350. package/es/utils/exactProp.js +1 -9
  351. package/es/utils/helpers.js +19 -58
  352. package/es/withMobileDialog/index.js +0 -2
  353. package/es/withMobileDialog/withMobileDialog.js +2 -10
  354. package/hi-svg-icons/HiAccount.js +3 -12
  355. package/hi-svg-icons/HiActivity.js +3 -12
  356. package/hi-svg-icons/HiAll.js +6 -16
  357. package/hi-svg-icons/HiBilling.js +3 -12
  358. package/hi-svg-icons/HiBriefcaseRescue.js +3 -12
  359. package/hi-svg-icons/HiBusiness.js +3 -12
  360. package/hi-svg-icons/HiCatalog.js +3 -12
  361. package/hi-svg-icons/HiCustomer.js +3 -12
  362. package/hi-svg-icons/HiDownload.js +3 -12
  363. package/hi-svg-icons/HiFinance.js +3 -12
  364. package/hi-svg-icons/HiFinanceMenu.js +3 -12
  365. package/hi-svg-icons/HiHostedPaymentPage.js +3 -12
  366. package/hi-svg-icons/HiHostedPaymentPageMenu.js +3 -12
  367. package/hi-svg-icons/HiIntegration.js +3 -12
  368. package/hi-svg-icons/HiIntegrationMenu.js +3 -12
  369. package/hi-svg-icons/HiIntelligence.js +3 -12
  370. package/hi-svg-icons/HiIntelligenceMenu.js +3 -12
  371. package/hi-svg-icons/HiInvoice.js +3 -12
  372. package/hi-svg-icons/HiInvoiceMenu.js +3 -12
  373. package/hi-svg-icons/HiLogoRounded.js +5 -15
  374. package/hi-svg-icons/HiOrder.js +3 -12
  375. package/hi-svg-icons/HiPaymentOrder.js +3 -12
  376. package/hi-svg-icons/HiPermission.js +3 -12
  377. package/hi-svg-icons/HiPriceGrid.js +3 -12
  378. package/hi-svg-icons/HiPrivate.js +3 -12
  379. package/hi-svg-icons/HiRoute.js +3 -12
  380. package/hi-svg-icons/HiRouteMenu.js +3 -12
  381. package/hi-svg-icons/HiRouteSwitch.js +6 -17
  382. package/hi-svg-icons/HiRouteSwitchMenu.js +6 -17
  383. package/hi-svg-icons/HiSettlement.js +3 -12
  384. package/hi-svg-icons/HiSizeLarge.js +3 -12
  385. package/hi-svg-icons/HiSizeMedium.js +3 -12
  386. package/hi-svg-icons/HiSizeSmall.js +3 -12
  387. package/hi-svg-icons/HiStore.js +3 -12
  388. package/hi-svg-icons/HiStoreMenu.js +3 -12
  389. package/hi-svg-icons/HiTransaction.js +3 -12
  390. package/hi-svg-icons/HiTransactionMenu.js +3 -12
  391. package/hi-svg-icons/HiUser.js +3 -12
  392. package/hi-svg-icons/HiVendor.js +3 -12
  393. package/hi-svg-icons/HiWidget.js +3 -12
  394. package/hi-svg-icons/index.js +0 -41
  395. package/hi-svg-images/HiLogo.js +3 -10
  396. package/hi-svg-images/HiLogoWhite.js +3 -10
  397. package/hi-svg-images/index.js +0 -3
  398. package/package.json +2 -2
  399. package/setupTest.js +2 -13
  400. package/styleguide/Wrapper.js +0 -6
  401. package/styles/MuiThemeProvider.js +11 -43
  402. package/styles/colorManipulator.js +15 -50
  403. package/styles/createBreakpoints.js +14 -28
  404. package/styles/createGenerateClassName.js +14 -24
  405. package/styles/createMixins.js +0 -5
  406. package/styles/createMuiTheme.js +10 -26
  407. package/styles/createPalette.js +65 -85
  408. package/styles/createStyles.js +0 -1
  409. package/styles/createTypography.js +15 -24
  410. package/styles/getStylesCreator.js +0 -12
  411. package/styles/getThemeProps.js +1 -5
  412. package/styles/index.js +0 -6
  413. package/styles/jssPreset.js +0 -9
  414. package/styles/makeStyles.js +0 -6
  415. package/styles/mergeClasses.js +4 -14
  416. package/styles/shadows.js +0 -2
  417. package/styles/spacing.js +0 -2
  418. package/styles/themeListener.js +0 -6
  419. package/styles/transitions.js +13 -22
  420. package/styles/withStyles.js +0 -6
  421. package/test-utils/createMount.js +2 -12
  422. package/test-utils/createRender.js +2 -9
  423. package/test-utils/createShallow.js +6 -17
  424. package/test-utils/getClasses.js +0 -2
  425. package/test-utils/index.js +0 -6
  426. package/test-utils/until.js +3 -14
  427. package/test-utils/unwrap.js +0 -1
  428. package/theme/palette.js +0 -4
  429. package/theme/typography.js +5 -12
  430. package/theme.js +0 -5
  431. package/transitions/utils.js +2 -5
  432. package/utils/exactProp.js +1 -9
  433. package/utils/helpers.js +19 -58
  434. package/withMobileDialog/index.js +0 -2
  435. package/withMobileDialog/withMobileDialog.js +2 -10
@@ -1,40 +1,24 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.default = void 0;
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
11
-
12
9
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
13
-
14
10
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
15
-
16
11
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
17
-
18
12
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
19
-
20
13
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
21
-
22
14
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
23
-
24
15
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
25
-
26
16
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
27
-
28
17
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
29
-
30
18
  var _react = _interopRequireDefault(require("react"));
31
-
32
19
  var _HiSelect = _interopRequireDefault(require("./HiSelect"));
33
-
34
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
35
-
36
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
37
-
21
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // @inheritedComponent HiSelect
38
22
  /**
39
23
  * HiDynamicSelect hérite du composant HiSelect
40
24
  *
@@ -48,31 +32,33 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Re
48
32
  */
49
33
  var HiDynamicSelect = /*#__PURE__*/function (_React$PureComponent) {
50
34
  (0, _inherits2.default)(HiDynamicSelect, _React$PureComponent);
51
-
52
35
  var _super = _createSuper(HiDynamicSelect);
53
-
54
36
  function HiDynamicSelect(props) {
55
37
  var _this;
56
-
57
38
  (0, _classCallCheck2.default)(this, HiDynamicSelect);
58
39
  _this = _super.call(this, props);
59
-
60
40
  _this.handleScrollReachBottom = function () {
61
41
  if (!_this.props.loading && _this.props.nextPage === 'auto' && _this.props.onNextPage) {
62
42
  _this.props.onNextPage();
63
43
  }
64
44
  };
65
-
45
+ /**
46
+ * Call onChange with the updated value
47
+ *
48
+ * - handle single value
49
+ * - handle multiple value
50
+ *
51
+ * @param event
52
+ * @param item
53
+ */
66
54
  _this.handleSelect = function (event, item) {
67
55
  var _this$props = _this.props,
68
- multiple = _this$props.multiple,
69
- onChange = _this$props.onChange,
70
- value = _this$props.value;
71
-
56
+ multiple = _this$props.multiple,
57
+ onChange = _this$props.onChange,
58
+ value = _this$props.value;
72
59
  if (item.id === '_next_page' && !_this.props.loading && _this.props.nextPage === 'manual' && _this.props.onNextPage) {
73
60
  _this.props.onNextPage();
74
61
  }
75
-
76
62
  if (!multiple) {
77
63
  // single value
78
64
  onChange(event, item.id, item);
@@ -85,14 +71,22 @@ var HiDynamicSelect = /*#__PURE__*/function (_React$PureComponent) {
85
71
  onChange(event, [].concat((0, _toConsumableArray2.default)(value), [item.id]), item);
86
72
  }
87
73
  };
88
-
74
+ /**
75
+ * Build itemList & inputValue from select props
76
+ * @param options
77
+ * @param value
78
+ * @param search
79
+ * @param loading
80
+ * @returns {{itemList: *[], inputValue: *}}
81
+ */
82
+ // eslint-disable-next-line no-unused-vars
89
83
  _this.buildSelectProps = function (options) {
90
84
  var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
91
85
  var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
92
86
  var loading = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
93
87
  var _this$props2 = _this.props,
94
- nextPage = _this$props2.nextPage,
95
- translations = _this$props2.translations;
88
+ nextPage = _this$props2.nextPage,
89
+ translations = _this$props2.translations;
96
90
  var itemList = [].concat((0, _toConsumableArray2.default)(options.length === 0 && !loading ? [{
97
91
  id: '_no_result',
98
92
  type: 'text',
@@ -118,23 +112,21 @@ var HiDynamicSelect = /*#__PURE__*/function (_React$PureComponent) {
118
112
  itemList: itemList
119
113
  };
120
114
  };
121
-
122
115
  _this.handleScrollReachBottom = _this.handleScrollReachBottom.bind((0, _assertThisInitialized2.default)(_this));
123
116
  _this.handleSelect = _this.handleSelect.bind((0, _assertThisInitialized2.default)(_this));
124
117
  return _this;
125
118
  }
126
-
127
119
  (0, _createClass2.default)(HiDynamicSelect, [{
128
120
  key: "render",
129
121
  value: function render() {
130
122
  var _this$props3 = this.props,
131
- hiSelectableListProps = _this$props3.hiSelectableListProps,
132
- multiple = _this$props3.multiple,
133
- nextPage = _this$props3.nextPage,
134
- options = _this$props3.options,
135
- translations = _this$props3.translations,
136
- value = _this$props3.value,
137
- other = (0, _objectWithoutProperties2.default)(_this$props3, ["hiSelectableListProps", "multiple", "nextPage", "options", "translations", "value"]);
123
+ hiSelectableListProps = _this$props3.hiSelectableListProps,
124
+ multiple = _this$props3.multiple,
125
+ nextPage = _this$props3.nextPage,
126
+ options = _this$props3.options,
127
+ translations = _this$props3.translations,
128
+ value = _this$props3.value,
129
+ other = (0, _objectWithoutProperties2.default)(_this$props3, ["hiSelectableListProps", "multiple", "nextPage", "options", "translations", "value"]);
138
130
  return /*#__PURE__*/_react.default.createElement(_HiSelect.default, (0, _extends2.default)({
139
131
  buildSelectProps: this.buildSelectProps,
140
132
  hiSelectableListProps: (0, _objectSpread2.default)({}, hiSelectableListProps),
@@ -150,7 +142,6 @@ var HiDynamicSelect = /*#__PURE__*/function (_React$PureComponent) {
150
142
  }]);
151
143
  return HiDynamicSelect;
152
144
  }(_react.default.PureComponent);
153
-
154
145
  HiDynamicSelect.defaultProps = {
155
146
  loading: false,
156
147
  multiple: false,
@@ -1,85 +1,65 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.styles = exports.default = void 0;
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
11
-
12
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
13
-
14
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
15
-
16
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
17
-
18
12
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
19
-
20
13
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
21
-
22
14
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
23
-
24
15
  var _react = _interopRequireDefault(require("react"));
25
-
26
16
  var _HiFormControl = _interopRequireDefault(require("../HiForm/HiFormControl"));
27
-
28
17
  var _HiDynamicSelect = _interopRequireDefault(require("./HiDynamicSelect"));
29
-
30
18
  var _classnames = _interopRequireDefault(require("classnames"));
31
-
32
19
  var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
33
-
34
20
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
35
-
36
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
37
-
21
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // @inheritedComponent HiDynamicSelect
38
22
  var styles = {
39
23
  root: {
40
24
  maxWidth: 500
41
25
  }
42
26
  };
27
+
43
28
  /**
44
29
  * Champs input pour formulaire
45
30
  */
46
-
47
31
  exports.styles = styles;
48
-
49
32
  var HiDynamicSelectField = /*#__PURE__*/function (_React$PureComponent) {
50
33
  (0, _inherits2.default)(HiDynamicSelectField, _React$PureComponent);
51
-
52
34
  var _super = _createSuper(HiDynamicSelectField);
53
-
54
35
  function HiDynamicSelectField() {
55
36
  (0, _classCallCheck2.default)(this, HiDynamicSelectField);
56
37
  return _super.apply(this, arguments);
57
38
  }
58
-
59
39
  (0, _createClass2.default)(HiDynamicSelectField, [{
60
40
  key: "render",
61
41
  value: function render() {
62
42
  var _this$props = this.props,
63
- label = _this$props.label,
64
- required = _this$props.required,
65
- disabled = _this$props.disabled,
66
- error = _this$props.error,
67
- errorText = _this$props.errorText,
68
- helperText = _this$props.helperText,
69
- helperIcon = _this$props.helperIcon,
70
- id = _this$props.id,
71
- name = _this$props.name,
72
- value = _this$props.value,
73
- options = _this$props.options,
74
- type = _this$props.type,
75
- multiple = _this$props.multiple,
76
- iconAll = _this$props.iconAll,
77
- checkbox = _this$props.checkbox,
78
- searchable = _this$props.searchable,
79
- translations = _this$props.translations,
80
- className = _this$props.className,
81
- classes = _this$props.classes,
82
- others = (0, _objectWithoutProperties2.default)(_this$props, ["label", "required", "disabled", "error", "errorText", "helperText", "helperIcon", "id", "name", "value", "options", "type", "multiple", "iconAll", "checkbox", "searchable", "translations", "className", "classes"]);
43
+ label = _this$props.label,
44
+ required = _this$props.required,
45
+ disabled = _this$props.disabled,
46
+ error = _this$props.error,
47
+ errorText = _this$props.errorText,
48
+ helperText = _this$props.helperText,
49
+ helperIcon = _this$props.helperIcon,
50
+ id = _this$props.id,
51
+ name = _this$props.name,
52
+ value = _this$props.value,
53
+ options = _this$props.options,
54
+ type = _this$props.type,
55
+ multiple = _this$props.multiple,
56
+ iconAll = _this$props.iconAll,
57
+ checkbox = _this$props.checkbox,
58
+ searchable = _this$props.searchable,
59
+ translations = _this$props.translations,
60
+ className = _this$props.className,
61
+ classes = _this$props.classes,
62
+ others = (0, _objectWithoutProperties2.default)(_this$props, ["label", "required", "disabled", "error", "errorText", "helperText", "helperIcon", "id", "name", "value", "options", "type", "multiple", "iconAll", "checkbox", "searchable", "translations", "className", "classes"]);
83
63
  return /*#__PURE__*/_react.default.createElement(_HiFormControl.default, {
84
64
  id: id,
85
65
  label: label,
@@ -108,7 +88,5 @@ var HiDynamicSelectField = /*#__PURE__*/function (_React$PureComponent) {
108
88
  }]);
109
89
  return HiDynamicSelectField;
110
90
  }(_react.default.PureComponent);
111
-
112
91
  var _default = (0, _withStyles.default)(styles)(HiDynamicSelectField);
113
-
114
92
  exports.default = _default;
@@ -1,46 +1,27 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
8
7
  exports.styles = exports.filterValue = exports.default = void 0;
9
-
10
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/extends"));
11
-
12
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
13
-
14
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
15
-
16
11
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
17
-
18
12
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/assertThisInitialized"));
19
-
20
13
  var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
21
-
22
14
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
23
-
24
15
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
25
-
26
16
  var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
27
-
28
17
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/toConsumableArray"));
29
-
30
18
  var _react = _interopRequireDefault(require("react"));
31
-
32
19
  var _HiSelect = _interopRequireDefault(require("./HiSelect"));
33
-
34
20
  var _HiIcon = _interopRequireDefault(require("../HiIcon"));
35
-
36
21
  var _withStyles = _interopRequireDefault(require("@mui/styles/withStyles"));
37
-
38
22
  var _helpers = require("../utils/helpers");
39
-
40
23
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
41
-
42
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
-
24
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } // @inheritedComponent HiSelect
44
25
  /**
45
26
  * Return array of final item id in nested list (via props chlidren)
46
27
  * @param itemList
@@ -53,18 +34,16 @@ function getRecursiveFinalItemIdList(itemList) {
53
34
  if (item.children) {
54
35
  return getRecursiveFinalItemIdList(item.children, memo);
55
36
  }
56
-
57
37
  return [].concat((0, _toConsumableArray2.default)(memo), [item.id]);
58
38
  }, [])));
59
39
  }
40
+
60
41
  /**
61
42
  * Find item by id in nested list (via props children)
62
43
  * @param itemList
63
44
  * @param searchId
64
45
  * @returns {boolean}
65
46
  */
66
-
67
-
68
47
  function findFinalItemRecursively(itemList, searchId) {
69
48
  var foundItem = false;
70
49
  itemList.some(function (item) {
@@ -73,15 +52,14 @@ function findFinalItemRecursively(itemList, searchId) {
73
52
  } else if (item.children && !foundItem) {
74
53
  foundItem = findFinalItemRecursively(item.children, searchId);
75
54
  }
76
-
77
55
  return foundItem !== false;
78
56
  });
79
57
  return foundItem;
80
58
  }
81
-
82
59
  var filterValue = function filterValue(item, searchValue) {
83
60
  return searchValue === '' || (0, _helpers.foldAccents)(item.label.toString().toLowerCase()).search((0, _helpers.foldAccents)(searchValue.toLowerCase())) !== -1;
84
61
  };
62
+
85
63
  /**
86
64
  * Build item list by settings item props relative to the nested parent/child situation
87
65
  * Reduce the item list to build specified items (displayed, pinned, disabled, selected, indeterminate)
@@ -98,10 +76,7 @@ var filterValue = function filterValue(item, searchValue) {
98
76
  * @param translations - Translations
99
77
  * @returns {*}
100
78
  */
101
-
102
-
103
79
  exports.filterValue = filterValue;
104
-
105
80
  function buildFilteredItemList(itemList) {
106
81
  var selectedItemIdList = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
107
82
  var searchValue = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
@@ -113,27 +88,24 @@ function buildFilteredItemList(itemList) {
113
88
  var filterFunc = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : filterValue;
114
89
  return itemList.reduce(function (_ref, item) {
115
90
  var memoItemList = _ref.l,
116
- memoSelected = _ref.s,
117
- memoUnselected = _ref.u,
118
- memoVisible = _ref.v;
119
- var itemVisible = filterFunc(item, searchValue); // Parent item
120
-
91
+ memoSelected = _ref.s,
92
+ memoUnselected = _ref.u,
93
+ memoVisible = _ref.v;
94
+ var itemVisible = filterFunc(item, searchValue);
95
+ // Parent item
121
96
  if (item.children) {
122
97
  var _buildFilteredItemLis = buildFilteredItemList(item.children, selectedItemIdList, searchValue, itemVisible, pinnedParent, disabledParent, nbChildrenAsInfo, translations, filterFunc),
123
- customizedChildren = _buildFilteredItemLis.l,
124
- selected = _buildFilteredItemLis.s,
125
- unselected = _buildFilteredItemLis.u,
126
- visible = _buildFilteredItemLis.v;
127
-
98
+ customizedChildren = _buildFilteredItemLis.l,
99
+ selected = _buildFilteredItemLis.s,
100
+ unselected = _buildFilteredItemLis.u,
101
+ visible = _buildFilteredItemLis.v;
128
102
  if (nbChildrenAsInfo) {
129
103
  item.info = translations.n_children.replace('%s', item.children.length);
130
104
  }
131
-
132
105
  return {
133
106
  l: [].concat((0, _toConsumableArray2.default)(memoItemList), [(0, _objectSpread2.default)({}, item, {}, disabledParent && {
134
107
  disabled: true,
135
108
  hideCheckbox: true // don't display checkbox on disabled parent
136
-
137
109
  }, {
138
110
  pinned: pinnedParent,
139
111
  children: customizedChildren,
@@ -146,7 +118,6 @@ function buildFilteredItemList(itemList) {
146
118
  v: memoVisible || itemVisible || visible
147
119
  };
148
120
  }
149
-
150
121
  var itemSelected = selectedItemIdList.includes(item.id);
151
122
  return {
152
123
  l: [].concat((0, _toConsumableArray2.default)(memoItemList), [(0, _objectSpread2.default)({
@@ -163,7 +134,6 @@ function buildFilteredItemList(itemList) {
163
134
  v: visibleParent
164
135
  });
165
136
  }
166
-
167
137
  var styles = function styles(theme) {
168
138
  return {
169
139
  root: {
@@ -206,6 +176,7 @@ var styles = function styles(theme) {
206
176
  })
207
177
  };
208
178
  };
179
+
209
180
  /**
210
181
  * HiNestedSelect hérite du composant HiSelect
211
182
  *
@@ -218,36 +189,37 @@ var styles = function styles(theme) {
218
189
  * - si une partie des enfants sont sélectionné, le parent est affiché "indeterminate".
219
190
  * - si aucun enfant n'est sélectionné, le parent est affiché "unselected".
220
191
  */
221
-
222
-
223
192
  exports.styles = styles;
224
-
225
193
  var HiNestedSelect = /*#__PURE__*/function (_React$PureComponent) {
226
194
  (0, _inherits2.default)(HiNestedSelect, _React$PureComponent);
227
-
228
195
  var _super = _createSuper(HiNestedSelect);
229
-
230
196
  function HiNestedSelect(props) {
231
197
  var _this;
232
-
233
198
  (0, _classCallCheck2.default)(this, HiNestedSelect);
234
199
  _this = _super.call(this, props);
235
-
200
+ /**
201
+ * Call onChange with the updated value
202
+ *
203
+ * - handle single value
204
+ * - handle multiple value
205
+ * - handle '_all' id
206
+ *
207
+ * @param event
208
+ * @param item
209
+ */
236
210
  _this.handleSelect = function (event, item) {
237
211
  var _this$props = _this.props,
238
- hasAll = _this$props.hasAll,
239
- multiple = _this$props.multiple,
240
- onChange = _this$props.onChange,
241
- options = _this$props.options,
242
- value = _this$props.value;
243
-
212
+ hasAll = _this$props.hasAll,
213
+ multiple = _this$props.multiple,
214
+ onChange = _this$props.onChange,
215
+ options = _this$props.options,
216
+ value = _this$props.value;
244
217
  if (!multiple) {
245
218
  // single value
246
219
  onChange(event, item.id, item);
247
220
  } else if (hasAll && item.id === '_all') {
248
221
  // ALL
249
222
  var selectableItemIdList = getRecursiveFinalItemIdList(options);
250
-
251
223
  if (value.length === selectableItemIdList.length) {
252
224
  // unselect _all options
253
225
  onChange(event, [], item);
@@ -257,8 +229,8 @@ var HiNestedSelect = /*#__PURE__*/function (_React$PureComponent) {
257
229
  }
258
230
  } else if (item.children) {
259
231
  // PARENT
260
- var parentSelectableItemIdList = getRecursiveFinalItemIdList(item.children); // deselect parent if every selectable child id is includes in value.
261
-
232
+ var parentSelectableItemIdList = getRecursiveFinalItemIdList(item.children);
233
+ // deselect parent if every selectable child id is includes in value.
262
234
  if (parentSelectableItemIdList.every(function (pid) {
263
235
  return value.includes(pid);
264
236
  })) {
@@ -280,28 +252,33 @@ var HiNestedSelect = /*#__PURE__*/function (_React$PureComponent) {
280
252
  onChange(event, [].concat((0, _toConsumableArray2.default)(value), [item.id]), item);
281
253
  }
282
254
  };
283
-
255
+ /**
256
+ * Build itemList & inputValue from select props
257
+ * @param options
258
+ * @param value
259
+ * @param search
260
+ * @param loading
261
+ * @returns {{itemList: *[], inputValue: *}}
262
+ */
284
263
  _this.buildSelectProps = function (options) {
285
264
  var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
286
265
  var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
287
266
  var loading = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
288
267
  var _this$props2 = _this.props,
289
- classes = _this$props2.classes,
290
- disabledParent = _this$props2.disabledParent,
291
- hasAll = _this$props2.hasAll,
292
- iconAll = _this$props2.iconAll,
293
- multiple = _this$props2.multiple,
294
- nbChildrenAsInfo = _this$props2.nbChildrenAsInfo,
295
- pinnedParent = _this$props2.pinnedParent,
296
- translations = _this$props2.translations,
297
- filterFunc = _this$props2.filterFunc; // build item list
298
-
268
+ classes = _this$props2.classes,
269
+ disabledParent = _this$props2.disabledParent,
270
+ hasAll = _this$props2.hasAll,
271
+ iconAll = _this$props2.iconAll,
272
+ multiple = _this$props2.multiple,
273
+ nbChildrenAsInfo = _this$props2.nbChildrenAsInfo,
274
+ pinnedParent = _this$props2.pinnedParent,
275
+ translations = _this$props2.translations,
276
+ filterFunc = _this$props2.filterFunc; // build item list
299
277
  var _buildFilteredItemLis2 = buildFilteredItemList(options, value, search, false, pinnedParent, disabledParent || !multiple, nbChildrenAsInfo, translations, filterFunc),
300
- filteredItemList = _buildFilteredItemLis2.l,
301
- allSelected = _buildFilteredItemLis2.s,
302
- allUnselected = _buildFilteredItemLis2.u,
303
- visible = _buildFilteredItemLis2.v;
304
-
278
+ filteredItemList = _buildFilteredItemLis2.l,
279
+ allSelected = _buildFilteredItemLis2.s,
280
+ allUnselected = _buildFilteredItemLis2.u,
281
+ visible = _buildFilteredItemLis2.v;
305
282
  var itemList = !visible ? (0, _toConsumableArray2.default)(loading ? [{
306
283
  id: '_loading',
307
284
  type: 'loader',
@@ -330,17 +307,16 @@ var HiNestedSelect = /*#__PURE__*/function (_React$PureComponent) {
330
307
  selected: allSelected,
331
308
  indeterminate: !allSelected && !allUnselected,
332
309
  displayed: search === ''
333
- }] : []), (0, _toConsumableArray2.default)(filteredItemList)); // build input value
310
+ }] : []), (0, _toConsumableArray2.default)(filteredItemList));
334
311
 
312
+ // build input value
335
313
  var inputValue = '';
336
-
337
314
  if (allSelected) {
338
315
  inputValue = translations.all;
339
316
  } else if (value.length > 1) {
340
317
  inputValue = translations.n_items_selected.replace('%s', value.length);
341
318
  } else if (value.length === 1) {
342
319
  var selectedItem = findFinalItemRecursively(options, value[0]);
343
-
344
320
  if (selectedItem === false) {
345
321
  inputValue = translations.one_item_selected;
346
322
  } else if (selectedItem.type === 'icon') {
@@ -362,47 +338,31 @@ var HiNestedSelect = /*#__PURE__*/function (_React$PureComponent) {
362
338
  inputValue = selectedItem.label;
363
339
  }
364
340
  }
365
-
366
341
  return {
367
342
  itemList: itemList,
368
343
  inputValue: inputValue
369
344
  };
370
345
  };
371
-
372
346
  _this.handleSelect = _this.handleSelect.bind((0, _assertThisInitialized2.default)(_this));
373
347
  return _this;
374
348
  }
375
- /**
376
- * Call onChange with the updated value
377
- *
378
- * - handle single value
379
- * - handle multiple value
380
- * - handle '_all' id
381
- *
382
- * @param event
383
- * @param item
384
- */
385
-
386
-
387
349
  (0, _createClass2.default)(HiNestedSelect, [{
388
350
  key: "render",
389
351
  value: function render() {
390
352
  var _this$props3 = this.props,
391
- hasAll = _this$props3.hasAll,
392
- hiSelectableListProps = _this$props3.hiSelectableListProps,
393
- multiple = _this$props3.multiple,
394
- options = _this$props3.options,
395
- searchable = _this$props3.searchable,
396
- translations = _this$props3.translations,
397
- value = _this$props3.value,
398
- other = (0, _objectWithoutProperties2.default)(_this$props3, ["hasAll", "hiSelectableListProps", "multiple", "options", "searchable", "translations", "value"]);
399
-
353
+ hasAll = _this$props3.hasAll,
354
+ hiSelectableListProps = _this$props3.hiSelectableListProps,
355
+ multiple = _this$props3.multiple,
356
+ options = _this$props3.options,
357
+ searchable = _this$props3.searchable,
358
+ translations = _this$props3.translations,
359
+ value = _this$props3.value,
360
+ other = (0, _objectWithoutProperties2.default)(_this$props3, ["hasAll", "hiSelectableListProps", "multiple", "options", "searchable", "translations", "value"]);
400
361
  if (multiple) {
401
362
  if (!Array.isArray(value)) {
402
363
  throw new Error('HiPay Material-UI: the `value` property must be an array ' + 'when using the `HiSelect` component with `multiple`.');
403
364
  }
404
365
  }
405
-
406
366
  return /*#__PURE__*/_react.default.createElement(_HiSelect.default, (0, _extends2.default)({
407
367
  buildSelectProps: this.buildSelectProps,
408
368
  hasAll: hasAll,
@@ -419,7 +379,6 @@ var HiNestedSelect = /*#__PURE__*/function (_React$PureComponent) {
419
379
  }]);
420
380
  return HiNestedSelect;
421
381
  }(_react.default.PureComponent);
422
-
423
382
  HiNestedSelect.defaultProps = {
424
383
  disabledParent: false,
425
384
  displayAsChip: false,
@@ -438,10 +397,8 @@ HiNestedSelect.defaultProps = {
438
397
  },
439
398
  filterFunc: filterValue
440
399
  };
441
-
442
400
  var _default = (0, _withStyles.default)(styles, {
443
401
  hiComponent: true,
444
402
  name: 'HmuiHiNestedSelect'
445
403
  })(HiNestedSelect);
446
-
447
404
  exports.default = _default;