@hipay/hipay-material-ui 2.3.0-rc.4 → 2.3.0-rc.PSYCHE-2530
Sign up to get free protection for your applications and to get access to all the features.
- package/HiAlertModal/HiAlertModal.js +18 -80
- package/HiAlertModal/index.js +1 -1
- package/HiAppBar/HiAppBar.js +12 -56
- package/HiAppBar/index.js +1 -1
- package/HiBadge/HiBadge.js +4 -32
- package/HiBadge/index.js +1 -1
- package/HiBreadcrumb/HiBreadcrumb.js +15 -46
- package/HiBreadcrumb/HiStep.js +17 -72
- package/HiBreadcrumb/HiStepConnector.js +18 -57
- package/HiBreadcrumb/HiStepContent.js +10 -20
- package/HiBreadcrumb/HiStepIcon.js +11 -34
- package/HiBreadcrumb/HiStepLabel.js +28 -80
- package/HiBreadcrumb/HiStepper.js +12 -28
- package/HiBreadcrumb/index.js +1 -1
- package/HiButton/HiButton.js +58 -205
- package/HiButton/index.js +6 -8
- package/HiCell/CellAddress.js +10 -51
- package/HiCell/CellDate.js +13 -43
- package/HiCell/CellIcon.js +10 -52
- package/HiCell/CellImage.js +10 -51
- package/HiCell/CellNumeric.js +10 -41
- package/HiCell/CellPinToAction.js +6 -25
- package/HiCell/CellRate.js +9 -47
- package/HiCell/CellSentinel.js +10 -20
- package/HiCell/CellSentinelScore.js +10 -16
- package/HiCell/CellText.js +12 -34
- package/HiCell/CellTextStyled.js +1 -39
- package/HiCell/index.js +1 -1
- package/HiCheckbox/HiCheckbox.js +16 -64
- package/HiCheckbox/index.js +1 -1
- package/HiChip/HiChip.js +15 -115
- package/HiChip/HiChipSwitch.js +22 -76
- package/HiChip/index.js +1 -1
- package/HiColoredLabel/HiColoredLabel.js +13 -55
- package/HiColoredLabel/index.js +1 -1
- package/HiDatePicker/Caption.js +3 -39
- package/HiDatePicker/HiDatePicker.js +56 -150
- package/HiDatePicker/HiDatePickerMobile.js +11 -32
- package/HiDatePicker/HiDateRangePicker.js +71 -226
- package/HiDatePicker/HiDateRangeSelector.js +57 -179
- package/HiDatePicker/ListPicker.js +13 -44
- package/HiDatePicker/NavBar.js +1 -49
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +7 -27
- package/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +7 -27
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +15 -46
- package/HiDatePicker/Overlays/Overlay.js +5 -47
- package/HiDatePicker/Overlays/TimePickerOverlay.js +21 -55
- package/HiDatePicker/Overlays/YearPickerOverlay.js +15 -61
- package/HiDatePicker/Overlays/index.js +1 -1
- package/HiDatePicker/Weekday.js +1 -24
- package/HiDatePicker/index.js +15 -0
- package/HiDatePicker/stylesheet.js +6 -6
- package/HiDotsStepper/HiDot.js +12 -18
- package/HiDotsStepper/HiDotsStepper.js +15 -25
- package/HiDotsStepper/index.js +23 -0
- package/HiExpansionPanel/HiExpansionPanel.js +24 -73
- package/HiExpansionPanel/index.js +6 -8
- package/HiForm/HiAddressField.js +18 -41
- package/HiForm/HiEmailField.js +14 -47
- package/HiForm/HiFormControl.js +28 -125
- package/HiForm/HiFormLabel.js +15 -59
- package/HiForm/HiInput.js +29 -209
- package/HiForm/HiPasswordField.js +14 -26
- package/HiForm/HiSearchField.js +16 -46
- package/HiForm/HiSlider.js +15 -86
- package/HiForm/HiTextField.js +17 -156
- package/HiForm/HiUpload.js +29 -91
- package/HiForm/HiUploadField.js +12 -73
- package/HiForm/HiUploadInput.js +33 -113
- package/HiForm/index.js +1 -1
- package/HiIcon/HiIcon.js +36 -114
- package/HiIcon/index.js +1 -1
- package/HiIconButton/HiIconButton.js +4 -22
- package/HiIconButton/index.js +1 -1
- package/HiLoader/HiLoader.js +7 -27
- package/HiLoader/index.js +1 -1
- package/HiMap/HiMap.js +18 -39
- package/HiMap/HiMapExpand.js +15 -43
- package/HiMap/index.js +1 -1
- package/HiNotice/HiKPI.js +13 -83
- package/HiNotice/HiKPINotice.js +1 -29
- package/HiNotice/index.js +1 -1
- package/HiPaymentMeans/HiPaymentMeans.js +17 -112
- package/HiPaymentMeans/index.js +1 -1
- package/HiPdfReader/HiPdfReader.js +24 -48
- package/HiPdfReader/index.js +1 -1
- package/HiPin/HiPin.js +3 -16
- package/HiPin/index.js +1 -1
- package/HiRadio/HiRadio.js +1 -13
- package/HiRadio/index.js +1 -1
- package/HiSelect/HiDynamicSelect.js +28 -99
- package/HiSelect/HiDynamicSelectField.js +8 -56
- package/HiSelect/HiNestedSelect.js +33 -124
- package/HiSelect/HiNestedSelectContent.js +31 -109
- package/HiSelect/HiNestedSelectField.js +8 -56
- package/HiSelect/HiSelect.js +73 -275
- package/HiSelect/HiSelectContent.js +51 -176
- package/HiSelect/HiSelectField.js +8 -61
- package/HiSelect/HiSelectInput.js +29 -130
- package/HiSelect/HiSelectMobile.js +23 -54
- package/HiSelect/HiSuggestSelect.js +25 -105
- package/HiSelect/HiSuggestSelectField.js +8 -56
- package/HiSelect/index.js +2 -2
- package/HiSelectableList/HiSelectableList.js +24 -122
- package/HiSelectableList/HiSelectableListHierarchic.js +18 -78
- package/HiSelectableList/HiSelectableListItem.js +22 -161
- package/HiSelectableList/index.js +1 -1
- package/HiSwitch/HiSwitch.js +4 -40
- package/HiSwitch/HiSwitchState.js +2 -58
- package/HiSwitch/index.js +1 -1
- package/HiTable/HiCellBuilder.js +13 -34
- package/HiTable/HiTable.js +12 -66
- package/HiTable/HiTableBody.js +6 -34
- package/HiTable/HiTableHeader.js +13 -50
- package/HiTable/HiTableRow.js +12 -50
- package/HiTable/constants.js +2 -2
- package/HiTable/index.js +1 -1
- package/README.md +11 -38
- package/es/HiAlertModal/HiAlertModal.js +211 -220
- package/es/HiAlertModal/index.js +15 -1
- package/es/HiAppBar/HiAppBar.js +120 -118
- package/es/HiAppBar/index.js +15 -1
- package/es/HiBadge/HiBadge.js +85 -100
- package/es/HiBadge/index.js +15 -1
- package/es/HiBreadcrumb/HiBreadcrumb.js +98 -83
- package/es/HiBreadcrumb/HiStep.js +113 -113
- package/es/HiBreadcrumb/HiStepConnector.js +144 -137
- package/es/HiBreadcrumb/HiStepContent.js +90 -58
- package/es/HiBreadcrumb/HiStepIcon.js +144 -141
- package/es/HiBreadcrumb/HiStepLabel.js +161 -184
- package/es/HiBreadcrumb/HiStepper.js +73 -46
- package/es/HiBreadcrumb/index.js +15 -1
- package/es/HiButton/HiButton.js +77 -217
- package/es/HiButton/index.js +13 -1
- package/es/HiCell/CellAddress.js +85 -83
- package/es/HiCell/CellDate.js +87 -71
- package/es/HiCell/CellIcon.js +94 -96
- package/es/HiCell/CellImage.js +99 -98
- package/es/HiCell/CellNumeric.js +79 -68
- package/es/HiCell/CellPinToAction.js +61 -41
- package/es/HiCell/CellRate.js +137 -133
- package/es/HiCell/CellSentinel.js +75 -46
- package/es/HiCell/CellSentinelScore.js +69 -35
- package/es/HiCell/CellText.js +190 -160
- package/es/HiCell/CellTextStyled.js +37 -59
- package/es/HiCell/index.js +79 -9
- package/es/HiCheckbox/HiCheckbox.js +154 -162
- package/es/HiCheckbox/index.js +15 -1
- package/es/HiChip/HiChip.js +172 -245
- package/es/HiChip/HiChipSwitch.js +208 -223
- package/es/HiChip/index.js +23 -2
- package/es/HiColoredLabel/HiColoredLabel.js +157 -185
- package/es/HiColoredLabel/index.js +15 -1
- package/es/HiDatePicker/Caption.js +46 -61
- package/es/HiDatePicker/HiDatePicker.js +283 -323
- package/es/HiDatePicker/HiDatePickerMobile.js +104 -87
- package/es/HiDatePicker/HiDateRangePicker.js +500 -570
- package/es/HiDatePicker/HiDateRangeSelector.js +328 -375
- package/es/HiDatePicker/ListPicker.js +125 -101
- package/es/HiDatePicker/NavBar.js +94 -112
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +93 -96
- package/es/HiDatePicker/Overlays/CustomOverlayLayoutWithoutFooter.js +86 -89
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +80 -75
- package/es/HiDatePicker/Overlays/Overlay.js +62 -87
- package/es/HiDatePicker/Overlays/TimePickerOverlay.js +202 -188
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +90 -95
- package/es/HiDatePicker/Overlays/index.js +47 -5
- package/es/HiDatePicker/Weekday.js +19 -32
- package/es/HiDatePicker/hiLocaleUtils.js +41 -28
- package/es/HiDatePicker/index.js +15 -0
- package/es/HiDatePicker/stylesheet.js +259 -244
- package/es/HiDotsStepper/HiDot.js +86 -50
- package/es/HiDotsStepper/HiDotsStepper.js +96 -58
- package/es/HiDotsStepper/index.js +23 -0
- package/es/HiExpansionPanel/HiExpansionPanel.js +198 -204
- package/es/HiExpansionPanel/index.js +13 -1
- package/es/HiForm/HiAddressField.js +125 -106
- package/es/HiForm/HiEmailField.js +69 -66
- package/es/HiForm/HiFormControl.js +266 -309
- package/es/HiForm/HiFormLabel.js +110 -112
- package/es/HiForm/HiInput.js +397 -530
- package/es/HiForm/HiPasswordField.js +101 -67
- package/es/HiForm/HiSearchField.js +130 -121
- package/es/HiForm/HiSlider.js +251 -272
- package/es/HiForm/HiTextField.js +145 -244
- package/es/HiForm/HiUpload.js +288 -300
- package/es/HiForm/HiUploadField.js +82 -109
- package/es/HiForm/HiUploadInput.js +295 -325
- package/es/HiForm/index.js +95 -11
- package/es/HiIcon/HiIcon.js +75 -132
- package/es/HiIcon/index.js +15 -1
- package/es/HiIconButton/HiIconButton.js +82 -80
- package/es/HiIconButton/index.js +15 -1
- package/es/HiLoader/HiLoader.js +30 -37
- package/es/HiLoader/index.js +15 -1
- package/es/HiMap/HiMap.js +281 -245
- package/es/HiMap/HiMapExpand.js +182 -162
- package/es/HiMap/index.js +23 -2
- package/es/HiNotice/HiKPI.js +173 -201
- package/es/HiNotice/HiKPINotice.js +42 -52
- package/es/HiNotice/index.js +23 -2
- package/es/HiPaymentMeans/HiPaymentMeans.js +453 -500
- package/es/HiPaymentMeans/index.js +15 -1
- package/es/HiPdfReader/HiPdfReader.js +215 -184
- package/es/HiPdfReader/index.js +15 -1
- package/es/HiPin/HiPin.js +82 -79
- package/es/HiPin/index.js +15 -1
- package/es/HiRadio/HiRadio.js +47 -40
- package/es/HiRadio/index.js +15 -1
- package/es/HiSelect/HiDynamicSelect.js +110 -146
- package/es/HiSelect/HiDynamicSelectField.js +91 -104
- package/es/HiSelect/HiNestedSelect.js +235 -260
- package/es/HiSelect/HiNestedSelectContent.js +186 -197
- package/es/HiSelect/HiNestedSelectField.js +91 -104
- package/es/HiSelect/HiSelect.js +564 -684
- package/es/HiSelect/HiSelectContent.js +283 -338
- package/es/HiSelect/HiSelectField.js +93 -111
- package/es/HiSelect/HiSelectInput.js +266 -321
- package/es/HiSelect/HiSelectMobile.js +118 -100
- package/es/HiSelect/HiSuggestSelect.js +237 -256
- package/es/HiSelect/HiSuggestSelectField.js +80 -93
- package/es/HiSelect/index.js +85 -8
- package/es/HiSelectableList/HiSelectableList.js +195 -219
- package/es/HiSelectableList/HiSelectableListHierarchic.js +148 -150
- package/es/HiSelectableList/HiSelectableListItem.js +378 -475
- package/es/HiSelectableList/index.js +31 -3
- package/es/HiSwitch/HiSwitch.js +172 -185
- package/es/HiSwitch/HiSwitchState.js +134 -171
- package/es/HiSwitch/index.js +23 -2
- package/es/HiTable/HiCellBuilder.js +106 -72
- package/es/HiTable/HiTable.js +92 -105
- package/es/HiTable/HiTableBody.js +59 -53
- package/es/HiTable/HiTableHeader.js +133 -116
- package/es/HiTable/HiTableRow.js +126 -110
- package/es/HiTable/constants.js +97 -138
- package/es/HiTable/index.js +15 -1
- package/es/hi-svg-icons/HiAccount.js +41 -21
- package/es/hi-svg-icons/HiActivity.js +40 -20
- package/es/hi-svg-icons/HiAll.js +44 -24
- package/es/hi-svg-icons/HiBilling.js +41 -21
- package/es/hi-svg-icons/HiBriefcaseRescue.js +29 -10
- package/es/hi-svg-icons/HiCatalog.js +41 -21
- package/es/hi-svg-icons/HiCustomer.js +41 -21
- package/es/hi-svg-icons/HiDownload.js +29 -12
- package/es/hi-svg-icons/HiFinance.js +41 -21
- package/es/hi-svg-icons/HiPermission.js +40 -20
- package/es/hi-svg-icons/HiRoute.js +41 -21
- package/es/hi-svg-icons/HiSettlement.js +41 -21
- package/es/hi-svg-icons/HiSizeLarge.js +28 -15
- package/es/hi-svg-icons/HiSizeMedium.js +26 -15
- package/es/hi-svg-icons/HiSizeSmall.js +26 -15
- package/es/hi-svg-icons/HiTransaction.js +41 -21
- package/es/hi-svg-icons/HiUser.js +41 -21
- package/es/hi-svg-icons/HiWidget.js +44 -24
- package/es/hi-svg-icons/index.js +151 -18
- package/es/hi-svg-icons/index.text.js +27 -17
- package/es/styleguide/Wrapper.js +51 -0
- package/es/styles/MuiThemeProvider.js +131 -111
- package/es/styles/colorManipulator.js +89 -52
- package/es/styles/createBreakpoints.js +48 -35
- package/es/styles/createGenerateClassName.js +34 -22
- package/es/styles/createMixins.js +31 -20
- package/es/styles/createMuiTheme.js +67 -44
- package/es/styles/createPalette.js +135 -102
- package/es/styles/createStyles.js +8 -1
- package/es/styles/createTypography.js +86 -75
- package/es/styles/getStylesCreator.js +31 -18
- package/es/styles/getThemeProps.js +11 -5
- package/es/styles/index.js +47 -7
- package/es/styles/jssPreset.js +25 -9
- package/es/styles/mergeClasses.js +28 -16
- package/es/styles/shadows.js +14 -7
- package/es/styles/shape.js +9 -2
- package/es/styles/spacing.js +13 -2
- package/es/styles/themeListener.js +22 -10
- package/es/styles/transitions.js +61 -31
- package/es/styles/zIndex.js +9 -2
- package/es/test-utils/createMount.js +31 -18
- package/es/test-utils/createRender.js +25 -12
- package/es/test-utils/createShallow.js +34 -19
- package/es/test-utils/getClasses.js +11 -2
- package/es/test-utils/index.js +47 -5
- package/es/test-utils/until.js +25 -12
- package/es/test-utils/unwrap.js +8 -1
- package/es/theme/palette.js +106 -0
- package/es/theme/typography.js +170 -0
- package/es/theme.js +22 -0
- package/es/transitions/utils.js +18 -6
- package/es/utils/helpers.js +99 -39
- package/es/withMobileDialog/index.js +15 -1
- package/es/withMobileDialog/withMobileDialog.js +32 -20
- package/hi-svg-icons/HiAccount.js +16 -10
- package/hi-svg-icons/HiActivity.js +16 -10
- package/hi-svg-icons/HiAll.js +16 -10
- package/hi-svg-icons/HiBilling.js +16 -10
- package/hi-svg-icons/HiBriefcaseRescue.js +15 -9
- package/hi-svg-icons/HiCatalog.js +16 -10
- package/hi-svg-icons/HiCustomer.js +16 -10
- package/hi-svg-icons/HiDownload.js +13 -5
- package/hi-svg-icons/HiFinance.js +16 -10
- package/hi-svg-icons/HiPermission.js +16 -10
- package/hi-svg-icons/HiRoute.js +16 -10
- package/hi-svg-icons/HiSettlement.js +16 -10
- package/hi-svg-icons/HiSizeLarge.js +5 -3
- package/hi-svg-icons/HiSizeMedium.js +3 -3
- package/hi-svg-icons/HiSizeSmall.js +3 -3
- package/hi-svg-icons/HiTransaction.js +16 -10
- package/hi-svg-icons/HiUser.js +16 -10
- package/hi-svg-icons/HiWidget.js +16 -10
- package/hi-svg-icons/index.js +1 -1
- package/hi-svg-icons/index.text.js +1 -1
- package/package.json +37 -57
- package/styleguide/Wrapper.js +51 -0
- package/styles/MuiThemeProvider.js +17 -44
- package/styles/colorManipulator.js +1 -1
- package/styles/createBreakpoints.js +4 -4
- package/styles/createGenerateClassName.js +1 -1
- package/styles/createMixins.js +6 -6
- package/styles/createMuiTheme.js +4 -4
- package/styles/createPalette.js +5 -5
- package/styles/createTypography.js +15 -15
- package/styles/getStylesCreator.js +4 -4
- package/styles/index.js +2 -18
- package/styles/jssPreset.js +1 -1
- package/styles/mergeClasses.js +3 -3
- package/styles/themeListener.js +2 -2
- package/styles/transitions.js +2 -2
- package/test-utils/createMount.js +5 -5
- package/test-utils/createRender.js +4 -4
- package/test-utils/createShallow.js +5 -5
- package/test-utils/index.js +1 -1
- package/test-utils/until.js +5 -5
- package/theme/palette.js +106 -0
- package/theme/typography.js +170 -0
- package/theme.js +22 -0
- package/utils/helpers.js +4 -4
- package/withMobileDialog/index.js +1 -1
- package/withMobileDialog/withMobileDialog.js +3 -8
- package/CHANGELOG.md +0 -8486
- package/LICENSE +0 -21
- package/es/index.js +0 -26
- package/es/styles/withStyles.js +0 -317
- package/es/styles/withTheme.js +0 -84
- package/es/utils/exactProp.js +0 -28
- package/es/utils/ownerDocument.js +0 -5
- package/es/utils/ownerWindow.js +0 -8
- package/es/utils/reactHelpers.js +0 -19
- package/es/utils/requirePropFactory.js +0 -20
- package/es/utils/unsupportedProp.js +0 -16
- package/index.es.js +0 -31
- package/index.js +0 -256
- package/styles/withStyles.js +0 -378
- package/styles/withTheme.js +0 -126
- package/utils/exactProp.js +0 -43
- package/utils/ownerDocument.js +0 -13
- package/utils/ownerWindow.js +0 -19
- package/utils/reactHelpers.js +0 -36
- package/utils/requirePropFactory.js +0 -32
- package/utils/unsupportedProp.js +0 -24
@@ -1,44 +1,82 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
import HiInput from '../HiForm/HiInput';
|
8
|
-
import { withStyles } from '@material-ui/core/styles';
|
9
|
-
import { getNextItemSelectable, foldAccents } from '../utils/helpers';
|
10
|
-
import keycode from 'keycode';
|
11
|
-
export const styles = theme => ({
|
12
|
-
labelIcon: {
|
13
|
-
marginRight: 10
|
14
|
-
},
|
15
|
-
labelImg: {
|
16
|
-
height: 18,
|
17
|
-
width: 'auto',
|
18
|
-
margin: '0 4px',
|
19
|
-
verticalAlign: 'middle'
|
20
|
-
},
|
21
|
-
selectIconLabel: _objectSpread({
|
22
|
-
whiteSpace: 'nowrap',
|
23
|
-
overflow: 'hidden',
|
24
|
-
textOverflow: 'ellipsis',
|
25
|
-
paddingRight: 16
|
26
|
-
}, theme.typography.b1, {
|
27
|
-
display: 'inline-flex',
|
28
|
-
width: '100%'
|
29
|
-
}),
|
30
|
-
selectImgLabel: _objectSpread({
|
31
|
-
whiteSpace: 'nowrap',
|
32
|
-
overflow: 'hidden',
|
33
|
-
textOverflow: 'ellipsis',
|
34
|
-
paddingRight: 16
|
35
|
-
}, theme.typography.b1, {
|
36
|
-
display: 'inline-flex',
|
37
|
-
width: '100%'
|
38
|
-
})
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
var _interopRequireDefault = require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/interopRequireDefault");
|
4
|
+
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
6
|
+
value: true
|
39
7
|
});
|
40
|
-
|
41
|
-
|
8
|
+
exports.default = exports.filterValue = exports.styles = void 0;
|
9
|
+
|
10
|
+
var _extends2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/extends"));
|
11
|
+
|
12
|
+
var _toConsumableArray2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/toConsumableArray"));
|
13
|
+
|
14
|
+
var _classCallCheck2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/classCallCheck"));
|
15
|
+
|
16
|
+
var _createClass2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/createClass"));
|
17
|
+
|
18
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
19
|
+
|
20
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/getPrototypeOf"));
|
21
|
+
|
22
|
+
var _assertThisInitialized2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/assertThisInitialized"));
|
23
|
+
|
24
|
+
var _inherits2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/inherits"));
|
25
|
+
|
26
|
+
var _defineProperty2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/defineProperty"));
|
27
|
+
|
28
|
+
var _objectSpread2 = _interopRequireDefault(require("/home/mfazio/dev/projects/hipay-material-ui/node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/objectSpread2"));
|
29
|
+
|
30
|
+
var _react = _interopRequireDefault(require("react"));
|
31
|
+
|
32
|
+
var _reactCustomScrollbars = _interopRequireDefault(require("react-custom-scrollbars"));
|
33
|
+
|
34
|
+
var _HiSelectableList = _interopRequireDefault(require("../HiSelectableList"));
|
35
|
+
|
36
|
+
var _HiInput = _interopRequireDefault(require("../HiForm/HiInput"));
|
37
|
+
|
38
|
+
var _styles = require("@material-ui/core/styles");
|
39
|
+
|
40
|
+
var _helpers = require("../utils/helpers");
|
41
|
+
|
42
|
+
var _keycode = _interopRequireDefault(require("keycode"));
|
43
|
+
|
44
|
+
var styles = function styles(theme) {
|
45
|
+
return {
|
46
|
+
labelIcon: {
|
47
|
+
marginRight: 10
|
48
|
+
},
|
49
|
+
labelImg: {
|
50
|
+
height: 18,
|
51
|
+
width: 'auto',
|
52
|
+
margin: '0 4px',
|
53
|
+
verticalAlign: 'middle'
|
54
|
+
},
|
55
|
+
selectIconLabel: (0, _objectSpread2.default)({
|
56
|
+
whiteSpace: 'nowrap',
|
57
|
+
overflow: 'hidden',
|
58
|
+
textOverflow: 'ellipsis',
|
59
|
+
paddingRight: 16
|
60
|
+
}, theme.typography.b1, {
|
61
|
+
display: 'inline-flex',
|
62
|
+
width: '100%'
|
63
|
+
}),
|
64
|
+
selectImgLabel: (0, _objectSpread2.default)({
|
65
|
+
whiteSpace: 'nowrap',
|
66
|
+
overflow: 'hidden',
|
67
|
+
textOverflow: 'ellipsis',
|
68
|
+
paddingRight: 16
|
69
|
+
}, theme.typography.b1, {
|
70
|
+
display: 'inline-flex',
|
71
|
+
width: '100%'
|
72
|
+
})
|
73
|
+
};
|
74
|
+
};
|
75
|
+
|
76
|
+
exports.styles = styles;
|
77
|
+
|
78
|
+
var filterValue = function filterValue(item, searchValue) {
|
79
|
+
return searchValue === '' || (0, _helpers.foldAccents)(item.label.toString().toLowerCase()).search((0, _helpers.foldAccents)(searchValue.toLowerCase())) !== -1;
|
42
80
|
};
|
43
81
|
/**
|
44
82
|
*
|
@@ -55,61 +93,74 @@ export const filterValue = function (item, searchValue) {
|
|
55
93
|
* - HiSelectableList : affiche la liste des suggestions selon le type des éléments
|
56
94
|
*/
|
57
95
|
|
58
|
-
class HiSelectContent extends React.PureComponent {
|
59
|
-
constructor(props) {
|
60
|
-
super(props);
|
61
96
|
|
62
|
-
|
63
|
-
|
64
|
-
|
97
|
+
exports.filterValue = filterValue;
|
98
|
+
|
99
|
+
var HiSelectContent =
|
100
|
+
/*#__PURE__*/
|
101
|
+
function (_React$PureComponent) {
|
102
|
+
(0, _inherits2.default)(HiSelectContent, _React$PureComponent);
|
103
|
+
|
104
|
+
function HiSelectContent(props) {
|
105
|
+
var _this;
|
106
|
+
|
107
|
+
(0, _classCallCheck2.default)(this, HiSelectContent);
|
108
|
+
_this = (0, _possibleConstructorReturn2.default)(this, (0, _getPrototypeOf2.default)(HiSelectContent).call(this, props));
|
109
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleKeyDown", function (event) {
|
110
|
+
var nextItem;
|
111
|
+
var key = (0, _keycode.default)(event);
|
65
112
|
|
66
113
|
if (key === 'down') {
|
67
114
|
event.preventDefault();
|
68
|
-
nextItem = getNextItemSelectable(document.activeElement, 'down');
|
115
|
+
nextItem = (0, _helpers.getNextItemSelectable)(document.activeElement, 'down');
|
69
116
|
} else if (key === 'up') {
|
70
117
|
event.preventDefault();
|
71
|
-
nextItem = getNextItemSelectable(document.activeElement, 'up');
|
118
|
+
nextItem = (0, _helpers.getNextItemSelectable)(document.activeElement, 'up');
|
72
119
|
} else if (key === 'tab' || key === 'esc') {
|
73
|
-
|
120
|
+
_this.setState({
|
74
121
|
open: false
|
75
122
|
});
|
76
|
-
} else if (key === 'space' || key === 'enter' && !
|
123
|
+
} else if (key === 'space' || key === 'enter' && !_this.props.multiple) {
|
77
124
|
event.preventDefault();
|
78
|
-
|
79
|
-
|
80
|
-
|
125
|
+
|
126
|
+
var item = _this.props.options.find(function (elem) {
|
127
|
+
return String(elem.id) === event.target.id;
|
128
|
+
});
|
129
|
+
|
130
|
+
_this.handleSelect(null, item);
|
131
|
+
} else if (key === 'enter' && _this.props.multiple) {
|
81
132
|
event.preventDefault();
|
82
|
-
|
133
|
+
|
134
|
+
_this.handleClose();
|
83
135
|
}
|
84
136
|
|
85
137
|
if (nextItem) {
|
86
138
|
nextItem.focus();
|
87
139
|
}
|
88
|
-
};
|
140
|
+
});
|
141
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleKeyDownSearch", function (event) {
|
142
|
+
var key = (0, _keycode.default)(event);
|
89
143
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
if (this.overlay && (key === 'down' || key === 'up')) {
|
94
|
-
this.focusOnFirstItem();
|
95
|
-
} else if (this.overlay && key === 'esc' || key === 'enter') {
|
144
|
+
if (_this.overlay && (key === 'down' || key === 'up')) {
|
145
|
+
_this.focusOnFirstItem();
|
146
|
+
} else if (_this.overlay && (key === 'esc' || key === 'enter')) {
|
96
147
|
event.preventDefault();
|
97
|
-
this.handleClose();
|
98
|
-
}
|
99
|
-
};
|
100
148
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
149
|
+
_this.handleClose();
|
150
|
+
}
|
151
|
+
});
|
152
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleSelect", function (event, item) {
|
153
|
+
var _this$props = _this.props,
|
154
|
+
hasAll = _this$props.hasAll,
|
155
|
+
multiple = _this$props.multiple,
|
156
|
+
onChange = _this$props.onChange,
|
157
|
+
options = _this$props.options,
|
158
|
+
value = _this$props.value;
|
109
159
|
|
110
160
|
if (!multiple) {
|
111
161
|
// single value
|
112
|
-
|
162
|
+
_this.handleClose();
|
163
|
+
|
113
164
|
onChange(event, item.id, item);
|
114
165
|
} else if (hasAll && item.id === '_all') {
|
115
166
|
if (value.length === options.length) {
|
@@ -117,205 +168,212 @@ class HiSelectContent extends React.PureComponent {
|
|
117
168
|
onChange(event, [], item);
|
118
169
|
} else {
|
119
170
|
// select _all options
|
120
|
-
onChange(event, options.map(
|
171
|
+
onChange(event, options.map(function (option) {
|
172
|
+
return option.id;
|
173
|
+
}), item);
|
121
174
|
}
|
122
175
|
} else if (value.includes(item.id)) {
|
123
176
|
// unselect item
|
124
|
-
onChange(event, value.filter(
|
177
|
+
onChange(event, value.filter(function (id) {
|
178
|
+
return id !== item.id;
|
179
|
+
}), item);
|
125
180
|
} else {
|
126
|
-
onChange(event, [
|
181
|
+
onChange(event, [].concat((0, _toConsumableArray2.default)(value), [item.id]), item);
|
127
182
|
}
|
128
|
-
};
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
iconAll,
|
138
|
-
translations
|
139
|
-
} = this.props;
|
183
|
+
});
|
184
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleClose", function () {
|
185
|
+
if (_this.props.onClose) _this.props.onClose();
|
186
|
+
});
|
187
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleSuggestions", function (suggestions) {
|
188
|
+
var _this$props2 = _this.props,
|
189
|
+
hasAll = _this$props2.hasAll,
|
190
|
+
iconAll = _this$props2.iconAll,
|
191
|
+
translations = _this$props2.translations;
|
140
192
|
|
141
193
|
if (suggestions.length === 0) {
|
142
194
|
// Add '_no_result' suggestion
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
195
|
+
_this.setState(function (prevState) {
|
196
|
+
return (0, _objectSpread2.default)({}, prevState, {
|
197
|
+
suggestions: [{
|
198
|
+
id: '_no_result',
|
199
|
+
type: 'text',
|
200
|
+
disabled: true,
|
201
|
+
centered: true,
|
202
|
+
hideCheckbox: true,
|
203
|
+
label: translations.no_result_match
|
204
|
+
}]
|
205
|
+
});
|
206
|
+
});
|
153
207
|
} else {
|
154
|
-
|
155
|
-
suggestions: [
|
156
|
-
...(hasAll ? [_objectSpread({
|
208
|
+
_this.setState({
|
209
|
+
suggestions: [].concat((0, _toConsumableArray2.default)(hasAll ? [(0, _objectSpread2.default)({
|
157
210
|
id: '_all',
|
158
211
|
label: translations.all
|
159
212
|
}, iconAll && {
|
160
213
|
type: 'icon',
|
161
214
|
icon: iconAll
|
162
|
-
})] : []),
|
215
|
+
})] : []), (0, _toConsumableArray2.default)(suggestions))
|
163
216
|
});
|
164
217
|
}
|
165
|
-
};
|
166
|
-
|
167
|
-
this.handleScroll = e => {
|
218
|
+
});
|
219
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleScroll", function (e) {
|
168
220
|
if (e.target.scrollHeight - e.target.clientHeight - e.target.scrollTop < 15) {
|
169
|
-
|
221
|
+
_this.props.onScrollReachBottom();
|
170
222
|
}
|
171
|
-
};
|
172
|
-
|
173
|
-
|
174
|
-
const searchValue = inputValue && e.target.value ? inputValue : e.target.value;
|
223
|
+
});
|
224
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleSearch", function (e, inputValue) {
|
225
|
+
var searchValue = inputValue && e.target.value ? inputValue : e.target.value;
|
175
226
|
|
176
|
-
if (
|
177
|
-
|
227
|
+
if (_this.props.onSearch) {
|
228
|
+
_this.props.onSearch(e, searchValue);
|
178
229
|
} else {
|
179
|
-
|
180
|
-
searchValue
|
230
|
+
_this.setState({
|
231
|
+
searchValue: searchValue
|
181
232
|
});
|
182
233
|
}
|
183
|
-
};
|
184
|
-
|
185
|
-
|
186
|
-
this.handleSearch({
|
234
|
+
});
|
235
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "handleSearchReset", function () {
|
236
|
+
_this.handleSearch({
|
187
237
|
target: {
|
188
238
|
value: ''
|
189
239
|
}
|
190
240
|
}, '');
|
191
|
-
};
|
192
|
-
|
193
|
-
|
241
|
+
});
|
242
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "buildSelectProps", function (options) {
|
243
|
+
var value = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
244
|
+
var search = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
|
245
|
+
var loading = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
194
246
|
// build item list
|
195
|
-
|
247
|
+
var itemList = [].concat((0, _toConsumableArray2.default)(loading ? [{
|
196
248
|
id: '_loading',
|
197
249
|
type: 'loader',
|
198
250
|
disabled: true,
|
199
251
|
centered: true,
|
200
252
|
hideCheckbox: true,
|
201
253
|
label: 'loading'
|
202
|
-
}] : []),
|
203
|
-
|
254
|
+
}] : []), (0, _toConsumableArray2.default)(search !== '' ? (0, _toConsumableArray2.default)(options.filter(function (item) {
|
255
|
+
return item.label && _this.props.filterFunc(item, search);
|
256
|
+
})) : [].concat((0, _toConsumableArray2.default)(_this.props.hasAll ? [(0, _objectSpread2.default)({
|
204
257
|
id: '_all',
|
205
|
-
label:
|
206
|
-
},
|
258
|
+
label: _this.props.translations.all
|
259
|
+
}, _this.props.iconAll && {
|
207
260
|
type: 'icon',
|
208
|
-
icon:
|
209
|
-
})] : []),
|
261
|
+
icon: _this.props.iconAll
|
262
|
+
})] : []), (0, _toConsumableArray2.default)(options))));
|
210
263
|
return {
|
211
|
-
itemList
|
264
|
+
itemList: itemList
|
212
265
|
};
|
213
|
-
};
|
214
|
-
|
215
|
-
|
216
|
-
this.searchField = el;
|
266
|
+
});
|
267
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getInputElement", function (el) {
|
268
|
+
_this.searchField = el;
|
217
269
|
|
218
|
-
if (
|
219
|
-
|
270
|
+
if (_this.props.inputRef) {
|
271
|
+
_this.props.inputRef(_this.searchField);
|
220
272
|
}
|
221
|
-
};
|
222
|
-
|
223
|
-
this.state = {
|
273
|
+
});
|
274
|
+
_this.state = {
|
224
275
|
open: false,
|
225
276
|
focused: false,
|
226
277
|
searchValue: props.searchValue ? undefined : '',
|
227
278
|
suggestions: props.options
|
228
279
|
};
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
280
|
+
_this.handleSearch = _this.handleSearch.bind((0, _assertThisInitialized2.default)(_this));
|
281
|
+
_this.handleSearchReset = _this.handleSearchReset.bind((0, _assertThisInitialized2.default)(_this));
|
282
|
+
_this.handleSelect = _this.handleSelect.bind((0, _assertThisInitialized2.default)(_this));
|
283
|
+
_this.handleSuggestions = _this.handleSuggestions.bind((0, _assertThisInitialized2.default)(_this));
|
284
|
+
return _this;
|
233
285
|
}
|
234
286
|
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
height
|
263
|
-
} = this.props;
|
264
|
-
|
265
|
-
if (multiple) {
|
266
|
-
if (!Array.isArray(value)) {
|
267
|
-
throw new Error('HiPay Material-UI: the `value` property must be an array ' + 'when using the `HiSelect` component with `multiple`.');
|
287
|
+
(0, _createClass2.default)(HiSelectContent, [{
|
288
|
+
key: "render",
|
289
|
+
value: function render() {
|
290
|
+
var _this2 = this;
|
291
|
+
|
292
|
+
var _this$props3 = this.props,
|
293
|
+
loading = _this$props3.loading,
|
294
|
+
options = _this$props3.options,
|
295
|
+
searchable = _this$props3.searchable,
|
296
|
+
type = _this$props3.type,
|
297
|
+
value = _this$props3.value,
|
298
|
+
multiple = _this$props3.multiple,
|
299
|
+
translations = _this$props3.translations,
|
300
|
+
hiSelectableListProps = _this$props3.hiSelectableListProps,
|
301
|
+
onScrollReachBottom = _this$props3.onScrollReachBottom,
|
302
|
+
startAdornment = _this$props3.startAdornment,
|
303
|
+
_this$props3$searchVa = _this$props3.searchValue,
|
304
|
+
searchValue = _this$props3$searchVa === void 0 ? this.state.searchValue : _this$props3$searchVa,
|
305
|
+
_this$props3$buildSel = _this$props3.buildSelectProps,
|
306
|
+
buildSelectProps = _this$props3$buildSel === void 0 ? this.buildSelectProps : _this$props3$buildSel,
|
307
|
+
autoHeight = _this$props3.autoHeight,
|
308
|
+
height = _this$props3.height;
|
309
|
+
|
310
|
+
if (multiple) {
|
311
|
+
if (!Array.isArray(value)) {
|
312
|
+
throw new Error('HiPay Material-UI: the `value` property must be an array ' + 'when using the `HiSelect` component with `multiple`.');
|
313
|
+
}
|
268
314
|
}
|
269
|
-
}
|
270
315
|
|
271
|
-
|
316
|
+
var selectedItemIdList = [];
|
272
317
|
|
273
|
-
|
274
|
-
|
275
|
-
|
318
|
+
if (value) {
|
319
|
+
selectedItemIdList = multiple ? (0, _toConsumableArray2.default)(value) : [value];
|
320
|
+
}
|
276
321
|
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
322
|
+
var _buildSelectProps = buildSelectProps(options, selectedItemIdList, searchValue, loading),
|
323
|
+
itemList = _buildSelectProps.itemList;
|
324
|
+
|
325
|
+
return _react.default.createElement(_react.default.Fragment, null, !!searchable && _react.default.createElement(_HiInput.default, {
|
326
|
+
value: searchValue,
|
327
|
+
autoFocus: true,
|
328
|
+
inputRef: this.getInputElement,
|
329
|
+
onKeyDown: this.handleKeyDownSearch,
|
330
|
+
onChange: this.handleSearch,
|
331
|
+
onReset: this.handleSearchReset,
|
332
|
+
placeholder: translations.search,
|
333
|
+
startAdornment: 'search',
|
334
|
+
tabIndex: 0
|
335
|
+
}), startAdornment, _react.default.createElement(_reactCustomScrollbars.default, (0, _extends2.default)({
|
336
|
+
ref: function ref(contentEl) {
|
337
|
+
_this2.optionsContent = contentEl;
|
338
|
+
}
|
339
|
+
}, autoHeight ? {
|
340
|
+
autoHeight: true,
|
341
|
+
autoHeightMax: height
|
342
|
+
} : {
|
343
|
+
autoHeightMax: height,
|
344
|
+
autoHeightMin: height
|
345
|
+
}, {
|
346
|
+
autoHeight: true,
|
347
|
+
autoHeightMax: height // TODO ?
|
348
|
+
|
349
|
+
}, onScrollReachBottom && {
|
350
|
+
onScroll: this.handleScroll
|
351
|
+
}), _react.default.createElement(_HiSelectableList.default, (0, _extends2.default)({
|
352
|
+
type: type,
|
353
|
+
itemList: itemList,
|
354
|
+
onKeyDown: this.handleKeyDown,
|
355
|
+
onSelect: this.handleSelect,
|
356
|
+
selectedItemIdList: selectedItemIdList,
|
357
|
+
fallbackImage: this.props.fallbackImage
|
358
|
+
}, hiSelectableListProps))));
|
359
|
+
}
|
360
|
+
}], [{
|
361
|
+
key: "getDerivedStateFromProps",
|
362
|
+
value: function getDerivedStateFromProps(nextProps, prevState) {
|
363
|
+
if (nextProps.options !== prevState.suggestions) {
|
364
|
+
return (0, _objectSpread2.default)({}, prevState, {
|
365
|
+
suggestions: nextProps.options
|
366
|
+
});
|
293
367
|
}
|
294
|
-
}, autoHeight ? {
|
295
|
-
autoHeight: true,
|
296
|
-
autoHeightMax: height
|
297
|
-
} : {
|
298
|
-
autoHeightMax: height,
|
299
|
-
autoHeightMin: height
|
300
|
-
}, {
|
301
|
-
autoHeight: true,
|
302
|
-
autoHeightMax: height // TODO ?
|
303
|
-
|
304
|
-
}, onScrollReachBottom && {
|
305
|
-
onScroll: this.handleScroll
|
306
|
-
}), React.createElement(HiSelectableList, _extends({
|
307
|
-
type: type,
|
308
|
-
itemList: itemList,
|
309
|
-
onKeyDown: this.handleKeyDown,
|
310
|
-
onSelect: this.handleSelect,
|
311
|
-
selectedItemIdList: selectedItemIdList,
|
312
|
-
fallbackImage: this.props.fallbackImage
|
313
|
-
}, hiSelectableListProps))));
|
314
|
-
}
|
315
368
|
|
316
|
-
|
369
|
+
return null;
|
370
|
+
} // Key down on list items
|
371
|
+
|
372
|
+
}]);
|
373
|
+
return HiSelectContent;
|
374
|
+
}(_react.default.PureComponent);
|
317
375
|
|
318
|
-
HiSelectContent
|
376
|
+
(0, _defineProperty2.default)(HiSelectContent, "defaultProps", {
|
319
377
|
autoHeight: true,
|
320
378
|
height: 400,
|
321
379
|
disabled: false,
|
@@ -336,124 +394,11 @@ HiSelectContent.defaultProps = {
|
|
336
394
|
},
|
337
395
|
type: 'text',
|
338
396
|
filterFunc: filterValue
|
339
|
-
};
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
/**
|
344
|
-
* Useful to extend the style applied to components.
|
345
|
-
*/
|
346
|
-
classes: PropTypes.object,
|
347
|
-
|
348
|
-
/**
|
349
|
-
* Inactif
|
350
|
-
*/
|
351
|
-
disabled: PropTypes.bool,
|
352
|
-
|
353
|
-
/**
|
354
|
-
* Applique le style error
|
355
|
-
*/
|
356
|
-
error: PropTypes.bool,
|
357
|
-
|
358
|
-
/**
|
359
|
-
* Chemin vers l'image à afficher par défaut si une image n'est pas trouvée
|
360
|
-
*/
|
361
|
-
fallbackImage: PropTypes.string,
|
362
|
-
|
363
|
-
/*
|
364
|
-
* Fonction de filtrage custom
|
365
|
-
*/
|
366
|
-
filterFunc: PropTypes.func,
|
367
|
-
|
368
|
-
/**
|
369
|
-
* Affiche l'élément 'All'
|
370
|
-
*/
|
371
|
-
hasAll: PropTypes.bool,
|
372
|
-
|
373
|
-
/**
|
374
|
-
* Hauteur du container scrollable
|
375
|
-
*/
|
376
|
-
height: PropTypes.number,
|
377
|
-
|
378
|
-
/**
|
379
|
-
* Override HiSelectableList props (
|
380
|
-
*/
|
381
|
-
hiSelectableListProps: PropTypes.object,
|
382
|
-
|
383
|
-
/**
|
384
|
-
* Override HiSelectInput props
|
385
|
-
*/
|
386
|
-
hiSelectInputProps: PropTypes.object,
|
387
|
-
|
388
|
-
/**
|
389
|
-
* Nom de l'icône
|
390
|
-
*/
|
391
|
-
iconAll: PropTypes.string,
|
392
|
-
|
393
|
-
/**
|
394
|
-
* id du select
|
395
|
-
*/
|
396
|
-
id: PropTypes.string,
|
397
|
-
|
398
|
-
/**
|
399
|
-
* Ajoute un loader
|
400
|
-
*/
|
401
|
-
loading: PropTypes.bool,
|
402
|
-
|
403
|
-
/**
|
404
|
-
* Autorise la sélection de plusieurs valeurs
|
405
|
-
*/
|
406
|
-
multiple: PropTypes.bool,
|
407
|
-
|
408
|
-
/**
|
409
|
-
* Fonction de callback qui renvoit la/les valeurs sélectionnées
|
410
|
-
*
|
411
|
-
* @param {object} event
|
412
|
-
* @param {string || array} value
|
413
|
-
*/
|
414
|
-
onChange: PropTypes.func.isRequired,
|
415
|
-
|
416
|
-
/**
|
417
|
-
* Fonction de callback appelée lorsque le scroll atteint le bas de la liste
|
418
|
-
*/
|
419
|
-
onScrollReachBottom: PropTypes.func,
|
420
|
-
|
421
|
-
/**
|
422
|
-
* Fonction de callback appelée lorsque le champs de recherche est utilisé
|
423
|
-
*/
|
424
|
-
onSearch: PropTypes.func,
|
425
|
-
|
426
|
-
/**
|
427
|
-
* Listes des options du select
|
428
|
-
*/
|
429
|
-
options: PropTypes.array.isRequired,
|
430
|
-
|
431
|
-
/**
|
432
|
-
* Affiche un input de recherche permettant de filtrer les options
|
433
|
-
*/
|
434
|
-
searchable: PropTypes.bool,
|
435
|
-
|
436
|
-
/**
|
437
|
-
* Node qui s'ajoute entre la barre de recherche et la liste de résultats
|
438
|
-
*/
|
439
|
-
startAdornment: PropTypes.object,
|
440
|
-
|
441
|
-
/**
|
442
|
-
* Traductions (par défaut en anglais)
|
443
|
-
*/
|
444
|
-
translations: PropTypes.object,
|
445
|
-
|
446
|
-
/**
|
447
|
-
* Type des éléments du select, définit le rendu d'un élément
|
448
|
-
*/
|
449
|
-
type: PropTypes.oneOf(['icon', 'text', 'image', 'primary-highlight']),
|
450
|
-
|
451
|
-
/**
|
452
|
-
* Value(s) du select
|
453
|
-
*/
|
454
|
-
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.array])
|
455
|
-
} : {};
|
456
|
-
export default withStyles(styles, {
|
397
|
+
});
|
398
|
+
|
399
|
+
var _default = (0, _styles.withStyles)(styles, {
|
457
400
|
hiComponent: true,
|
458
401
|
name: 'HmuiHiSelectContent'
|
459
|
-
})(HiSelectContent);
|
402
|
+
})(HiSelectContent);
|
403
|
+
|
404
|
+
exports.default = _default;
|