@hipay/hipay-material-ui 1.0.0-beta.18 → 1.0.0-beta.2
Sign up to get free protection for your applications and to get access to all the features.
- package/HiCheckbox/HiCheckbox.js +1 -4
- package/HiChip/HiChip.js +4 -4
- package/HiChip/HiChipSwitch.js +4 -11
- package/HiColoredLabel/HiColoredLabel.js +3 -9
- package/HiDatePicker/HiDatePicker.js +30 -34
- package/HiDatePicker/HiDateRangePicker.js +33 -76
- package/HiDatePicker/HiDateRangeSelector.js +13 -33
- package/HiDatePicker/ListPicker.js +7 -32
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +1 -3
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +1 -5
- package/HiDatePicker/Overlays/Overlay.js +4 -22
- package/HiDatePicker/Overlays/YearPickerOverlay.js +1 -2
- package/HiDatePicker/stylesheet.js +0 -7
- package/HiForm/HiFormControl.js +31 -39
- package/HiForm/HiInput.js +18 -39
- package/HiForm/HiSearchField.js +2 -2
- package/HiForm/index.js +0 -18
- package/HiPins/HiPins.js +1 -0
- package/HiSelect/HiSelect.js +353 -400
- package/HiSelect/HiSelectField.js +6 -8
- package/HiSelect/HiSuggestSelect.js +47 -27
- package/HiSelect/HiSuggestSelectField.js +80 -88
- package/HiSelect/SelectInput.js +23 -34
- package/HiSelectableList/HiSelectableList.js +3 -9
- package/HiSelectableList/HiSelectableListItem.js +55 -96
- package/HiSwitch/HiSwitchState.js +1 -1
- package/HiSwitch/index.js +0 -6
- package/HiTable/BodyCellBuilder.js +97 -97
- package/HiTable/BodyCells/CellCountry.js +36 -11
- package/HiTable/BodyCells/CellIcon.js +20 -29
- package/HiTable/BodyCells/CellImage.js +22 -43
- package/HiTable/BodyCells/CellLayout.js +19 -25
- package/HiTable/BodyCells/CellNumeric.js +2 -7
- package/HiTable/BodyCells/CellSentinel.js +17 -26
- package/HiTable/BodyCells/CellStatus.js +2 -6
- package/HiTable/BodyCells/CellText.js +1 -2
- package/HiTable/BodyCells/CellThirdPartySecurity.js +22 -45
- package/HiTable/BodyRow.js +57 -78
- package/HiTable/ColumnFilter.js +15 -28
- package/HiTable/HeaderCell.js +16 -20
- package/HiTable/HiTable.js +11 -61
- package/HiTable/HiTableBody.js +14 -46
- package/HiTable/HiTableContextMenu.js +3 -7
- package/HiTable/HiTableFooterScroll.js +1 -1
- package/HiTable/HiTableHead.js +7 -24
- package/HiTable/OrderColumns.js +2 -6
- package/HiTopBar/HiTopBar.js +117 -37
- package/es/HiCheckbox/HiCheckbox.js +1 -4
- package/es/HiChip/HiChip.js +4 -4
- package/es/HiChip/HiChipSwitch.js +4 -11
- package/es/HiColoredLabel/HiColoredLabel.js +4 -9
- package/es/HiDatePicker/HiDatePicker.js +25 -30
- package/es/HiDatePicker/HiDateRangePicker.js +32 -72
- package/es/HiDatePicker/HiDateRangeSelector.js +14 -34
- package/es/HiDatePicker/ListPicker.js +20 -39
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +1 -3
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +1 -5
- package/es/HiDatePicker/Overlays/Overlay.js +4 -18
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +1 -2
- package/es/HiDatePicker/stylesheet.js +0 -7
- package/es/HiForm/HiFormControl.js +18 -32
- package/es/HiForm/HiInput.js +17 -34
- package/es/HiForm/HiSearchField.js +2 -2
- package/es/HiForm/index.js +1 -3
- package/es/HiPins/HiPins.js +1 -0
- package/es/HiSelect/HiSelect.js +324 -375
- package/es/HiSelect/HiSelectField.js +7 -9
- package/es/HiSelect/HiSuggestSelect.js +39 -26
- package/es/HiSelect/HiSuggestSelectField.js +69 -77
- package/es/HiSelect/SelectInput.js +23 -44
- package/es/HiSelectableList/HiSelectableList.js +4 -10
- package/es/HiSelectableList/HiSelectableListItem.js +55 -91
- package/es/HiSwitch/HiSwitchState.js +1 -1
- package/es/HiSwitch/index.js +0 -1
- package/es/HiTable/BodyCellBuilder.js +98 -96
- package/es/HiTable/BodyCells/CellCountry.js +35 -10
- package/es/HiTable/BodyCells/CellIcon.js +9 -18
- package/es/HiTable/BodyCells/CellImage.js +23 -42
- package/es/HiTable/BodyCells/CellLayout.js +21 -27
- package/es/HiTable/BodyCells/CellNumeric.js +2 -6
- package/es/HiTable/BodyCells/CellSentinel.js +9 -20
- package/es/HiTable/BodyCells/CellStatus.js +2 -6
- package/es/HiTable/BodyCells/CellText.js +1 -2
- package/es/HiTable/BodyCells/CellThirdPartySecurity.js +18 -42
- package/es/HiTable/BodyRow.js +56 -79
- package/es/HiTable/ColumnFilter.js +9 -15
- package/es/HiTable/HeaderCell.js +16 -20
- package/es/HiTable/HiTable.js +12 -59
- package/es/HiTable/HiTableBody.js +11 -42
- package/es/HiTable/HiTableContextMenu.js +3 -7
- package/es/HiTable/HiTableFooterScroll.js +1 -1
- package/es/HiTable/HiTableHead.js +7 -19
- package/es/HiTable/OrderColumns.js +2 -6
- package/es/HiTopBar/HiTopBar.js +108 -40
- package/es/styles/createHiMuiTheme.js +0 -11
- package/es/utils/hiHelpers.js +5 -6
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +44 -45
- package/styles/createHiMuiTheme.js +0 -11
- package/umd/hipay-material-ui.development.js +43603 -87235
- package/umd/hipay-material-ui.production.min.js +5 -5
- package/utils/hiHelpers.js +4 -6
- package/HI-CHANGELOG.md +0 -58
- package/HiAlertModal/HiAlertModal.js +0 -247
- package/HiAlertModal/index.js +0 -16
- package/HiBreadcrumb/HiBreadcrumb.js +0 -149
- package/HiBreadcrumb/HiStep.js +0 -159
- package/HiBreadcrumb/HiStepConnector.js +0 -207
- package/HiBreadcrumb/HiStepContent.js +0 -122
- package/HiBreadcrumb/HiStepIcon.js +0 -191
- package/HiBreadcrumb/HiStepLabel.js +0 -248
- package/HiBreadcrumb/HiStepper.js +0 -106
- package/HiBreadcrumb/index.js +0 -16
- package/HiDotsStepper/HiDot.js +0 -151
- package/HiDotsStepper/HiDotsStepper.js +0 -146
- package/HiDotsStepper/index.js +0 -16
- package/HiExpansionPanel/HiExpansionPanel.js +0 -231
- package/HiExpansionPanel/index.js +0 -16
- package/HiForm/HiAddressField.js +0 -204
- package/HiForm/HiSlider.js +0 -399
- package/HiPdfReader/HiPdfReader.js +0 -282
- package/HiPdfReader/index.js +0 -16
- package/HiTable/HiTableFooter.js +0 -131
- package/es/HiAlertModal/HiAlertModal.js +0 -189
- package/es/HiAlertModal/index.js +0 -1
- package/es/HiBreadcrumb/HiBreadcrumb.js +0 -81
- package/es/HiBreadcrumb/HiStep.js +0 -94
- package/es/HiBreadcrumb/HiStepConnector.js +0 -143
- package/es/HiBreadcrumb/HiStepContent.js +0 -63
- package/es/HiBreadcrumb/HiStepIcon.js +0 -149
- package/es/HiBreadcrumb/HiStepLabel.js +0 -197
- package/es/HiBreadcrumb/HiStepper.js +0 -46
- package/es/HiBreadcrumb/index.js +0 -1
- package/es/HiDotsStepper/HiDot.js +0 -92
- package/es/HiDotsStepper/HiDotsStepper.js +0 -83
- package/es/HiDotsStepper/index.js +0 -1
- package/es/HiExpansionPanel/HiExpansionPanel.js +0 -170
- package/es/HiExpansionPanel/index.js +0 -1
- package/es/HiForm/HiAddressField.js +0 -142
- package/es/HiForm/HiSlider.js +0 -309
- package/es/HiPdfReader/HiPdfReader.js +0 -198
- package/es/HiPdfReader/index.js +0 -1
- package/es/HiTable/HiTableFooter.js +0 -74
- package/hmu/images/countries/ad.svg +0 -151
- package/hmu/images/countries/ae.svg +0 -6
- package/hmu/images/countries/af.svg +0 -83
- package/hmu/images/countries/ag.svg +0 -15
- package/hmu/images/countries/ai.svg +0 -767
- package/hmu/images/countries/al.svg +0 -5
- package/hmu/images/countries/am.svg +0 -5
- package/hmu/images/countries/ao.svg +0 -13
- package/hmu/images/countries/aq.svg +0 -6
- package/hmu/images/countries/ar.svg +0 -32
- package/hmu/images/countries/as.svg +0 -33
- package/hmu/images/countries/at.svg +0 -6
- package/hmu/images/countries/au.svg +0 -9
- package/hmu/images/countries/aw.svg +0 -186
- package/hmu/images/countries/ax.svg +0 -18
- package/hmu/images/countries/az.svg +0 -8
- package/hmu/images/countries/ba.svg +0 -12
- package/hmu/images/countries/bb.svg +0 -6
- package/hmu/images/countries/bd.svg +0 -4
- package/hmu/images/countries/be.svg +0 -7
- package/hmu/images/countries/bf.svg +0 -7
- package/hmu/images/countries/bg.svg +0 -7
- package/hmu/images/countries/bh.svg +0 -11
- package/hmu/images/countries/bi.svg +0 -15
- package/hmu/images/countries/bj.svg +0 -14
- package/hmu/images/countries/bl.svg +0 -7
- package/hmu/images/countries/bm.svg +0 -99
- package/hmu/images/countries/bn.svg +0 -36
- package/hmu/images/countries/bo.svg +0 -686
- package/hmu/images/countries/bq.svg +0 -5
- package/hmu/images/countries/br.svg +0 -45
- package/hmu/images/countries/bs.svg +0 -13
- package/hmu/images/countries/bt.svg +0 -89
- package/hmu/images/countries/bv.svg +0 -13
- package/hmu/images/countries/bw.svg +0 -7
- package/hmu/images/countries/by.svg +0 -61
- package/hmu/images/countries/bz.svg +0 -146
- package/hmu/images/countries/ca.svg +0 -4
- package/hmu/images/countries/cc.svg +0 -19
- package/hmu/images/countries/cd.svg +0 -5
- package/hmu/images/countries/cf.svg +0 -15
- package/hmu/images/countries/cg.svg +0 -12
- package/hmu/images/countries/ch.svg +0 -9
- package/hmu/images/countries/ci.svg +0 -7
- package/hmu/images/countries/ck.svg +0 -9
- package/hmu/images/countries/cl.svg +0 -13
- package/hmu/images/countries/cm.svg +0 -15
- package/hmu/images/countries/cn.svg +0 -11
- package/hmu/images/countries/co.svg +0 -7
- package/hmu/images/countries/cr.svg +0 -7
- package/hmu/images/countries/cu.svg +0 -13
- package/hmu/images/countries/cv.svg +0 -13
- package/hmu/images/countries/cw.svg +0 -14
- package/hmu/images/countries/cx.svg +0 -15
- package/hmu/images/countries/cy.svg +0 -6
- package/hmu/images/countries/cz.svg +0 -12
- package/hmu/images/countries/de.svg +0 -5
- package/hmu/images/countries/dj.svg +0 -13
- package/hmu/images/countries/dk.svg +0 -5
- package/hmu/images/countries/dm.svg +0 -152
- package/hmu/images/countries/do.svg +0 -6745
- package/hmu/images/countries/dz.svg +0 -5
- package/hmu/images/countries/ec.svg +0 -141
- package/hmu/images/countries/ee.svg +0 -7
- package/hmu/images/countries/eg.svg +0 -38
- package/hmu/images/countries/eh.svg +0 -15
- package/hmu/images/countries/er.svg +0 -8
- package/hmu/images/countries/es-ct.svg +0 -4
- package/hmu/images/countries/es.svg +0 -581
- package/hmu/images/countries/et.svg +0 -14
- package/hmu/images/countries/eu.svg +0 -28
- package/hmu/images/countries/fi.svg +0 -5
- package/hmu/images/countries/fj.svg +0 -124
- package/hmu/images/countries/fk.svg +0 -90
- package/hmu/images/countries/fm.svg +0 -11
- package/hmu/images/countries/fo.svg +0 -12
- package/hmu/images/countries/fr.svg +0 -7
- package/hmu/images/countries/ga.svg +0 -7
- package/hmu/images/countries/gb-eng.svg +0 -5
- package/hmu/images/countries/gb-nir.svg +0 -137
- package/hmu/images/countries/gb-sct.svg +0 -4
- package/hmu/images/countries/gb-wls.svg +0 -9
- package/hmu/images/countries/gb.svg +0 -15
- package/hmu/images/countries/gd.svg +0 -27
- package/hmu/images/countries/ge.svg +0 -6
- package/hmu/images/countries/gf.svg +0 -5
- package/hmu/images/countries/gg.svg +0 -9
- package/hmu/images/countries/gh.svg +0 -6
- package/hmu/images/countries/gi.svg +0 -33
- package/hmu/images/countries/gl.svg +0 -4
- package/hmu/images/countries/gm.svg +0 -14
- package/hmu/images/countries/gn.svg +0 -7
- package/hmu/images/countries/gp.svg +0 -7
- package/hmu/images/countries/gq.svg +0 -23
- package/hmu/images/countries/gr.svg +0 -22
- package/hmu/images/countries/gs.svg +0 -205
- package/hmu/images/countries/gt.svg +0 -204
- package/hmu/images/countries/gu.svg +0 -39
- package/hmu/images/countries/gw.svg +0 -13
- package/hmu/images/countries/gy.svg +0 -9
- package/hmu/images/countries/hk.svg +0 -32
- package/hmu/images/countries/hm.svg +0 -9
- package/hmu/images/countries/hn.svg +0 -18
- package/hmu/images/countries/hr.svg +0 -59
- package/hmu/images/countries/ht.svg +0 -122
- package/hmu/images/countries/hu.svg +0 -7
- package/hmu/images/countries/id.svg +0 -6
- package/hmu/images/countries/ie.svg +0 -7
- package/hmu/images/countries/il.svg +0 -14
- package/hmu/images/countries/im.svg +0 -36
- package/hmu/images/countries/in.svg +0 -25
- package/hmu/images/countries/io.svg +0 -148
- package/hmu/images/countries/iq.svg +0 -10
- package/hmu/images/countries/ir.svg +0 -219
- package/hmu/images/countries/is.svg +0 -12
- package/hmu/images/countries/it.svg +0 -7
- package/hmu/images/countries/je.svg +0 -32
- package/hmu/images/countries/jm.svg +0 -8
- package/hmu/images/countries/jo.svg +0 -16
- package/hmu/images/countries/jp.svg +0 -11
- package/hmu/images/countries/ke.svg +0 -23
- package/hmu/images/countries/kg.svg +0 -15
- package/hmu/images/countries/kh.svg +0 -69
- package/hmu/images/countries/ki.svg +0 -36
- package/hmu/images/countries/km.svg +0 -16
- package/hmu/images/countries/kn.svg +0 -14
- package/hmu/images/countries/kp.svg +0 -15
- package/hmu/images/countries/kr.svg +0 -24
- package/hmu/images/countries/kw.svg +0 -13
- package/hmu/images/countries/ky.svg +0 -63
- package/hmu/images/countries/kz.svg +0 -23
- package/hmu/images/countries/la.svg +0 -12
- package/hmu/images/countries/lb.svg +0 -15
- package/hmu/images/countries/lc.svg +0 -8
- package/hmu/images/countries/li.svg +0 -43
- package/hmu/images/countries/lk.svg +0 -22
- package/hmu/images/countries/lr.svg +0 -14
- package/hmu/images/countries/ls.svg +0 -8
- package/hmu/images/countries/lt.svg +0 -7
- package/hmu/images/countries/lu.svg +0 -5
- package/hmu/images/countries/lv.svg +0 -6
- package/hmu/images/countries/ly.svg +0 -13
- package/hmu/images/countries/ma.svg +0 -4
- package/hmu/images/countries/mc.svg +0 -6
- package/hmu/images/countries/md.svg +0 -72
- package/hmu/images/countries/me.svg +0 -118
- package/hmu/images/countries/mf.svg +0 -7
- package/hmu/images/countries/mg.svg +0 -7
- package/hmu/images/countries/mh.svg +0 -7
- package/hmu/images/countries/mk.svg +0 -5
- package/hmu/images/countries/ml.svg +0 -7
- package/hmu/images/countries/mm.svg +0 -16
- package/hmu/images/countries/mn.svg +0 -13
- package/hmu/images/countries/mo.svg +0 -9
- package/hmu/images/countries/mp.svg +0 -86
- package/hmu/images/countries/mq.svg +0 -7
- package/hmu/images/countries/mr.svg +0 -6
- package/hmu/images/countries/ms.svg +0 -39
- package/hmu/images/countries/mt.svg +0 -49
- package/hmu/images/countries/mu.svg +0 -8
- package/hmu/images/countries/mv.svg +0 -6
- package/hmu/images/countries/mw.svg +0 -10
- package/hmu/images/countries/mx.svg +0 -385
- package/hmu/images/countries/my.svg +0 -15
- package/hmu/images/countries/mz.svg +0 -21
- package/hmu/images/countries/na.svg +0 -16
- package/hmu/images/countries/nc.svg +0 -7
- package/hmu/images/countries/ne.svg +0 -6
- package/hmu/images/countries/nf.svg +0 -9
- package/hmu/images/countries/ng.svg +0 -6
- package/hmu/images/countries/ni.svg +0 -131
- package/hmu/images/countries/nl.svg +0 -7
- package/hmu/images/countries/no.svg +0 -7
- package/hmu/images/countries/np.svg +0 -14
- package/hmu/images/countries/nr.svg +0 -12
- package/hmu/images/countries/nu.svg +0 -26
- package/hmu/images/countries/nz.svg +0 -41
- package/hmu/images/countries/om.svg +0 -116
- package/hmu/images/countries/pa.svg +0 -14
- package/hmu/images/countries/pe.svg +0 -279
- package/hmu/images/countries/pf.svg +0 -19
- package/hmu/images/countries/pg.svg +0 -9
- package/hmu/images/countries/ph.svg +0 -28
- package/hmu/images/countries/pk.svg +0 -15
- package/hmu/images/countries/pl.svg +0 -6
- package/hmu/images/countries/pm.svg +0 -7
- package/hmu/images/countries/pn.svg +0 -62
- package/hmu/images/countries/pr.svg +0 -13
- package/hmu/images/countries/ps.svg +0 -15
- package/hmu/images/countries/pt.svg +0 -57
- package/hmu/images/countries/pw.svg +0 -11
- package/hmu/images/countries/py.svg +0 -157
- package/hmu/images/countries/qa.svg +0 -4
- package/hmu/images/countries/re.svg +0 -7
- package/hmu/images/countries/ro.svg +0 -7
- package/hmu/images/countries/rs.svg +0 -292
- package/hmu/images/countries/ru.svg +0 -7
- package/hmu/images/countries/rw.svg +0 -13
- package/hmu/images/countries/sa.svg +0 -26
- package/hmu/images/countries/sb.svg +0 -13
- package/hmu/images/countries/sc.svg +0 -14
- package/hmu/images/countries/sd.svg +0 -13
- package/hmu/images/countries/se.svg +0 -16
- package/hmu/images/countries/sg.svg +0 -13
- package/hmu/images/countries/sh.svg +0 -74
- package/hmu/images/countries/si.svg +0 -18
- package/hmu/images/countries/sj.svg +0 -7
- package/hmu/images/countries/sk.svg +0 -9
- package/hmu/images/countries/sl.svg +0 -7
- package/hmu/images/countries/sm.svg +0 -91
- package/hmu/images/countries/sn.svg +0 -8
- package/hmu/images/countries/so.svg +0 -11
- package/hmu/images/countries/sr.svg +0 -6
- package/hmu/images/countries/ss.svg +0 -8
- package/hmu/images/countries/st.svg +0 -16
- package/hmu/images/countries/sv.svg +0 -618
- package/hmu/images/countries/sx.svg +0 -56
- package/hmu/images/countries/sy.svg +0 -6
- package/hmu/images/countries/sz.svg +0 -45
- package/hmu/images/countries/tc.svg +0 -67
- package/hmu/images/countries/td.svg +0 -7
- package/hmu/images/countries/tf.svg +0 -15
- package/hmu/images/countries/tg.svg +0 -14
- package/hmu/images/countries/th.svg +0 -7
- package/hmu/images/countries/tj.svg +0 -22
- package/hmu/images/countries/tk.svg +0 -5
- package/hmu/images/countries/tl.svg +0 -13
- package/hmu/images/countries/tm.svg +0 -213
- package/hmu/images/countries/tn.svg +0 -13
- package/hmu/images/countries/to.svg +0 -10
- package/hmu/images/countries/tr.svg +0 -8
- package/hmu/images/countries/tt.svg +0 -5
- package/hmu/images/countries/tv.svg +0 -27
- package/hmu/images/countries/tw.svg +0 -14
- package/hmu/images/countries/tz.svg +0 -13
- package/hmu/images/countries/ua.svg +0 -6
- package/hmu/images/countries/ug.svg +0 -30
- package/hmu/images/countries/um.svg +0 -23
- package/hmu/images/countries/un.svg +0 -16
- package/hmu/images/countries/us.svg +0 -12
- package/hmu/images/countries/uy.svg +0 -28
- package/hmu/images/countries/uz.svg +0 -30
- package/hmu/images/countries/va.svg +0 -483
- package/hmu/images/countries/vc.svg +0 -8
- package/hmu/images/countries/ve.svg +0 -26
- package/hmu/images/countries/vg.svg +0 -133
- package/hmu/images/countries/vi.svg +0 -31
- package/hmu/images/countries/vn.svg +0 -11
- package/hmu/images/countries/vu.svg +0 -18
- package/hmu/images/countries/wf.svg +0 -7
- package/hmu/images/countries/ws.svg +0 -7
- package/hmu/images/countries/ye.svg +0 -7
- package/hmu/images/countries/yt.svg +0 -7
- package/hmu/images/countries/za.svg +0 -17
- package/hmu/images/countries/zm.svg +0 -27
- package/hmu/images/countries/zw.svg +0 -21
- package/hmu/images/hipay-white-logo.svg +0 -42
- package/hmu/images/logo_visa_75wx45h.gif +0 -0
@@ -87,8 +87,7 @@ var HiTableContextMenu = function (_React$Component) {
|
|
87
87
|
var _this = (0, _possibleConstructorReturn3.default)(this, (HiTableContextMenu.__proto__ || (0, _getPrototypeOf2.default)(HiTableContextMenu)).call(this, props));
|
88
88
|
|
89
89
|
_this.state = {
|
90
|
-
value: ''
|
91
|
-
label: ''
|
90
|
+
value: ''
|
92
91
|
};
|
93
92
|
|
94
93
|
_this.handleContextMenuOpen = _this.handleContextMenuOpen.bind(_this);
|
@@ -102,10 +101,7 @@ var HiTableContextMenu = function (_React$Component) {
|
|
102
101
|
(0, _createClass3.default)(HiTableContextMenu, [{
|
103
102
|
key: 'handleContextMenuOpen',
|
104
103
|
value: function handleContextMenuOpen(event) {
|
105
|
-
this.setState({
|
106
|
-
value: event.detail.data.value,
|
107
|
-
label: event.detail.data.label
|
108
|
-
});
|
104
|
+
this.setState({ value: event.detail.data.label });
|
109
105
|
}
|
110
106
|
}, {
|
111
107
|
key: 'handleClickCopy',
|
@@ -166,7 +162,7 @@ var HiTableContextMenu = function (_React$Component) {
|
|
166
162
|
_react2.default.createElement(
|
167
163
|
'span',
|
168
164
|
{ className: classes.title },
|
169
|
-
menuItem.title.replace('%s', _this2.state.
|
165
|
+
menuItem.title.replace('%s', _this2.state.value)
|
170
166
|
)
|
171
167
|
);
|
172
168
|
})
|
@@ -138,7 +138,7 @@ var HiTableFooterScroll = function (_React$Component) {
|
|
138
138
|
) : _react2.default.createElement(
|
139
139
|
_HiButton2.default,
|
140
140
|
{
|
141
|
-
|
141
|
+
raised: true,
|
142
142
|
color: 'primary',
|
143
143
|
className: classes.loadMoreButton,
|
144
144
|
onClick: function onClick() {
|
package/HiTable/HiTableHead.js
CHANGED
@@ -5,10 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.SORTED_COLUMN_ERROR_MESSAGE = exports.styles = undefined;
|
7
7
|
|
8
|
-
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
9
|
-
|
10
|
-
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
11
|
-
|
12
8
|
var _extends2 = require('babel-runtime/helpers/extends');
|
13
9
|
|
14
10
|
var _extends3 = _interopRequireDefault(_extends2);
|
@@ -47,10 +43,6 @@ var _reactProptypeConditionalRequire = require('react-proptype-conditional-requi
|
|
47
43
|
|
48
44
|
var _reactProptypeConditionalRequire2 = _interopRequireDefault(_reactProptypeConditionalRequire);
|
49
45
|
|
50
|
-
var _classnames = require('classnames');
|
51
|
-
|
52
|
-
var _classnames2 = _interopRequireDefault(_classnames);
|
53
|
-
|
54
46
|
var _Table = require('material-ui/Table');
|
55
47
|
|
56
48
|
var _PlusCircle = require('mdi-material-ui/PlusCircle');
|
@@ -87,13 +79,11 @@ var styles = exports.styles = function styles(theme) {
|
|
87
79
|
return {
|
88
80
|
thead: {
|
89
81
|
position: 'relative',
|
90
|
-
|
82
|
+
display: 'block' /*seperates the header from the body allowing it to be positioned*/
|
83
|
+
, width: '100%',
|
91
84
|
overflow: 'visible',
|
92
85
|
zIndex: 12
|
93
86
|
},
|
94
|
-
theadFixedWidth: {
|
95
|
-
display: 'block' /*seperates the header from the body allowing it to be positioned*/
|
96
|
-
},
|
97
87
|
theadRow: {
|
98
88
|
backgroundColor: theme.palette.background3,
|
99
89
|
zIndex: 12
|
@@ -236,8 +226,7 @@ var HiTableHead = function (_React$Component) {
|
|
236
226
|
sticky = _props.sticky,
|
237
227
|
translations = _props.translations,
|
238
228
|
view = _props.view,
|
239
|
-
lookupColumns = _props.lookupColumns
|
240
|
-
fixedColumnWidth = _props.fixedColumnWidth;
|
229
|
+
lookupColumns = _props.lookupColumns;
|
241
230
|
var _state = this.state,
|
242
231
|
hovered = _state.hovered,
|
243
232
|
openedOrderColumns = _state.openedOrderColumns,
|
@@ -245,7 +234,7 @@ var HiTableHead = function (_React$Component) {
|
|
245
234
|
|
246
235
|
|
247
236
|
var headerProps = (0, _extends3.default)({
|
248
|
-
className:
|
237
|
+
className: classes.thead
|
249
238
|
}, orderable && { onMouseEnter: this.handleEvent, onMouseLeave: this.handleEvent });
|
250
239
|
|
251
240
|
var unfixedColumnIsSet = false,
|
@@ -292,8 +281,8 @@ var HiTableHead = function (_React$Component) {
|
|
292
281
|
return _react2.default.createElement(_HeaderCell2.default, {
|
293
282
|
key: 'header-' + column.colId,
|
294
283
|
colId: column.colId,
|
295
|
-
type: column['
|
296
|
-
|
284
|
+
type: column['type'],
|
285
|
+
title: column['label'],
|
297
286
|
smallTitle: column['reducedLabel'],
|
298
287
|
selectable: firstColumn && selectable,
|
299
288
|
selected: selectedIdList.length > 0 ? selectedIdList.length === dataSource.length ? true : 'mixed' : false,
|
@@ -312,8 +301,7 @@ var HiTableHead = function (_React$Component) {
|
|
312
301
|
fixedWidth: fixed,
|
313
302
|
align: column['align'],
|
314
303
|
sticky: firstColumn && sticky,
|
315
|
-
lookedUp: lookupColumns.includes(column.colId)
|
316
|
-
fixedColumnWidth: fixedColumnWidth
|
304
|
+
lookedUp: lookupColumns.includes(column.colId)
|
317
305
|
});
|
318
306
|
}
|
319
307
|
}),
|
@@ -423,11 +411,6 @@ HiTableHead.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
423
411
|
* Active le filtre sur les colonnes filtrables
|
424
412
|
*/
|
425
413
|
filterable: _propTypes2.default.bool,
|
426
|
-
/**
|
427
|
-
* Fixe la taille des colonnes selon le type de vue
|
428
|
-
* Sinon les colonnes s'adaptent à l'espace disponible
|
429
|
-
*/
|
430
|
-
fixedColumnWidth: _propTypes2.default.bool,
|
431
414
|
/**
|
432
415
|
* Identifiant de la ou des colonnes sur la/lesquelles il y a une 'lookup' search
|
433
416
|
*/
|
package/HiTable/OrderColumns.js
CHANGED
@@ -141,8 +141,7 @@ var styles = exports.styles = function styles(theme) {
|
|
141
141
|
controlLabelRoot: {
|
142
142
|
marginLeft: 6,
|
143
143
|
marginBottom: 8,
|
144
|
-
fontSize: 15
|
145
|
-
width: 160
|
144
|
+
fontSize: 15
|
146
145
|
},
|
147
146
|
switchLabelRoot: {
|
148
147
|
marginLeft: 15,
|
@@ -151,10 +150,7 @@ var styles = exports.styles = function styles(theme) {
|
|
151
150
|
columnLabel: {
|
152
151
|
position: 'relative',
|
153
152
|
top: 5,
|
154
|
-
left: 5
|
155
|
-
overflow: 'hidden',
|
156
|
-
textOverflow: 'ellipsis',
|
157
|
-
whiteSpace: 'nowrap'
|
153
|
+
left: 5
|
158
154
|
},
|
159
155
|
label: {
|
160
156
|
fontWeight: 'inherit'
|
package/HiTopBar/HiTopBar.js
CHANGED
@@ -83,6 +83,10 @@ var _HiButton = require('../HiButton');
|
|
83
83
|
|
84
84
|
var _HiButton2 = _interopRequireDefault(_HiButton);
|
85
85
|
|
86
|
+
var _HiInput = require('../HiForm/HiInput');
|
87
|
+
|
88
|
+
var _HiInput2 = _interopRequireDefault(_HiInput);
|
89
|
+
|
86
90
|
var _HiColoredLabel = require('../HiColoredLabel');
|
87
91
|
|
88
92
|
var _HiColoredLabel2 = _interopRequireDefault(_HiColoredLabel);
|
@@ -133,9 +137,7 @@ var styles = exports.styles = function styles(theme) {
|
|
133
137
|
marginRight: 1.5 * theme.spacing.unit,
|
134
138
|
borderLeft: 'solid 1px',
|
135
139
|
borderColor: (0, _colorManipulator.fade)('#000', 0.12),
|
136
|
-
display: 'inline-block'
|
137
|
-
minWidth: 144,
|
138
|
-
maxWidth: 288
|
140
|
+
display: 'inline-block'
|
139
141
|
},
|
140
142
|
accountSelectorButtonLabel: {
|
141
143
|
textOverflow: 'ellipsis',
|
@@ -154,9 +156,6 @@ var styles = exports.styles = function styles(theme) {
|
|
154
156
|
color: theme.palette.text.secondary,
|
155
157
|
minWidth: 32
|
156
158
|
},
|
157
|
-
betaWithoutAccountSelector: {
|
158
|
-
marginLeft: 1.5 * theme.spacing.unit
|
159
|
-
},
|
160
159
|
searchInput: {
|
161
160
|
backgroundColor: theme.palette.background1 + ' !important'
|
162
161
|
},
|
@@ -176,9 +175,6 @@ var styles = exports.styles = function styles(theme) {
|
|
176
175
|
textTransform: 'capitalize',
|
177
176
|
fontWeight: theme.typography.fontWeightRegular,
|
178
177
|
minWidth: 50
|
179
|
-
},
|
180
|
-
collapseOverflow: {
|
181
|
-
overflow: 'inherit'
|
182
178
|
}
|
183
179
|
};
|
184
180
|
};
|
@@ -205,14 +201,18 @@ var HiTopBar = function (_React$Component) {
|
|
205
201
|
|
206
202
|
_this.state = {
|
207
203
|
collapsed: false,
|
204
|
+
searchFocus: false,
|
208
205
|
menuAnchor: null
|
209
206
|
};
|
210
207
|
|
211
|
-
_this.
|
208
|
+
_this.toggleCollapse = _this.toggleCollapse.bind(_this);
|
209
|
+
_this.handleFocus = _this.handleFocus.bind(_this);
|
210
|
+
_this.handleBlur = _this.handleBlur.bind(_this);
|
212
211
|
_this.handleClickMenu = _this.handleClickMenu.bind(_this);
|
213
212
|
_this.handleOpenMenu = _this.handleOpenMenu.bind(_this);
|
214
213
|
_this.handleCloseMenu = _this.handleCloseMenu.bind(_this);
|
215
214
|
_this.handleMenuItemClick = _this.handleMenuItemClick.bind(_this);
|
215
|
+
_this.handleClickInputButton = _this.handleClickInputButton.bind(_this);
|
216
216
|
return _this;
|
217
217
|
}
|
218
218
|
|
@@ -233,19 +233,52 @@ var HiTopBar = function (_React$Component) {
|
|
233
233
|
callback();
|
234
234
|
}
|
235
235
|
}, {
|
236
|
-
key: '
|
237
|
-
value: function
|
236
|
+
key: 'toggleCollapse',
|
237
|
+
value: function toggleCollapse() {
|
238
238
|
this.setState({ collapsed: !this.state.collapsed });
|
239
239
|
}
|
240
|
+
}, {
|
241
|
+
key: 'handleFocus',
|
242
|
+
value: function handleFocus() {
|
243
|
+
this.setState({ searchFocus: true });
|
244
|
+
|
245
|
+
if (this.props.onSearchFocus) {
|
246
|
+
this.props.onSearchFocus();
|
247
|
+
}
|
248
|
+
}
|
249
|
+
}, {
|
250
|
+
key: 'handleClickInputButton',
|
251
|
+
value: function handleClickInputButton(event) {
|
252
|
+
this.setState({ searchFocus: true });
|
253
|
+
|
254
|
+
if (this.props.onClickInputButton) {
|
255
|
+
this.props.onClickInputButton();
|
256
|
+
}
|
257
|
+
// Stop propagation to cancel input focus
|
258
|
+
event.stopPropagation();
|
259
|
+
}
|
260
|
+
}, {
|
261
|
+
key: 'handleBlur',
|
262
|
+
value: function handleBlur(event) {
|
263
|
+
if (!this.overlay.contains(event.relatedTarget)) {
|
264
|
+
this.setState({ searchFocus: false });
|
265
|
+
}
|
266
|
+
|
267
|
+
if (this.props.onSearchBlur) {
|
268
|
+
this.props.onSearchBlur();
|
269
|
+
}
|
270
|
+
}
|
240
271
|
}, {
|
241
272
|
key: 'handleClickMenu',
|
242
273
|
value: function handleClickMenu() {
|
243
274
|
this.props.onClickReturn();
|
275
|
+
this.setState({ searchFocus: false });
|
244
276
|
}
|
245
277
|
}, {
|
246
278
|
key: 'render',
|
247
279
|
value: function render() {
|
248
|
-
var
|
280
|
+
var _classNames,
|
281
|
+
_this2 = this;
|
249
282
|
|
250
283
|
var _props = this.props,
|
251
284
|
classes = _props.classes,
|
@@ -258,12 +291,44 @@ var HiTopBar = function (_React$Component) {
|
|
258
291
|
translations = _props.translations,
|
259
292
|
onClickMenu = _props.onClickMenu,
|
260
293
|
accountSelectorContent = _props.accountSelectorContent,
|
261
|
-
refButtons = _props.refButtons,
|
262
294
|
searchInput = _props.searchInput,
|
263
|
-
|
295
|
+
searchValue = _props.searchValue;
|
296
|
+
|
264
297
|
|
298
|
+
var colorPrimaryClass = this.state.searchFocus ? classes.colorPrimaryFocus : classes.colorPrimary;
|
265
299
|
|
266
|
-
var
|
300
|
+
var inputClass = (0, _classnames2.default)((_classNames = {}, (0, _defineProperty3.default)(_classNames, classes.searchInput, !this.state.searchFocus), (0, _defineProperty3.default)(_classNames, classes.searchInputFocused, this.state.searchFocus), _classNames));
|
301
|
+
|
302
|
+
var endAdornment = _react2.default.createElement(
|
303
|
+
_HiButton2.default,
|
304
|
+
{
|
305
|
+
className: classes.endAdornmentButton,
|
306
|
+
onClick: this.handleClickInputButton
|
307
|
+
},
|
308
|
+
_react2.default.createElement(
|
309
|
+
_Hidden2.default,
|
310
|
+
{ smDown: true },
|
311
|
+
_react2.default.createElement(
|
312
|
+
'span',
|
313
|
+
null,
|
314
|
+
translations.all_types
|
315
|
+
)
|
316
|
+
),
|
317
|
+
_react2.default.createElement(_mdiMaterialUi.MenuDown, { style: { color: (0, _colorManipulator.fade)('#000', 0.54) } })
|
318
|
+
);
|
319
|
+
|
320
|
+
var input = searchInput || _react2.default.createElement(_HiInput2.default, {
|
321
|
+
name: 'top-bar-search',
|
322
|
+
placeholder: translations.search,
|
323
|
+
value: searchValue,
|
324
|
+
onChange: this.props.onSearchChange,
|
325
|
+
startAdornment: 'magnify',
|
326
|
+
endAdornment: endAdornment,
|
327
|
+
classes: { root: inputClass },
|
328
|
+
onFocus: this.handleFocus,
|
329
|
+
onBlur: this.handleBlur,
|
330
|
+
onReset: this.props.onSearchReset
|
331
|
+
});
|
267
332
|
|
268
333
|
var notificationButton = notificationValue > 0 ? _react2.default.createElement(
|
269
334
|
_HiButton2.default,
|
@@ -295,17 +360,16 @@ var HiTopBar = function (_React$Component) {
|
|
295
360
|
null,
|
296
361
|
_react2.default.createElement(
|
297
362
|
_Collapse2.default,
|
298
|
-
{
|
299
|
-
'in': !this.state.collapsed,
|
300
|
-
className: (0, _classnames2.default)((0, _defineProperty3.default)({}, classes.collapseOverflow, !hideable))
|
301
|
-
},
|
363
|
+
{ 'in': !this.state.collapsed },
|
302
364
|
_react2.default.createElement(
|
303
365
|
_Toolbar2.default,
|
304
366
|
{ className: classes.toolbar },
|
305
367
|
_react2.default.createElement(
|
306
368
|
'div',
|
307
|
-
{ ref:
|
308
|
-
|
369
|
+
{ ref: function ref(div) {
|
370
|
+
return _this2.overlay = div;
|
371
|
+
} },
|
372
|
+
this.state.searchFocus ? _react2.default.createElement(
|
309
373
|
_HiButton2.default,
|
310
374
|
{
|
311
375
|
className: classes.leftButton,
|
@@ -336,7 +400,7 @@ var HiTopBar = function (_React$Component) {
|
|
336
400
|
_react2.default.createElement(
|
337
401
|
'div',
|
338
402
|
{ className: classes.flex },
|
339
|
-
|
403
|
+
input
|
340
404
|
),
|
341
405
|
notificationButton,
|
342
406
|
hasAccountSelector && _react2.default.createElement(
|
@@ -352,7 +416,6 @@ var HiTopBar = function (_React$Component) {
|
|
352
416
|
accountSelectorContent
|
353
417
|
),
|
354
418
|
beta && _react2.default.createElement(_HiColoredLabel2.default, {
|
355
|
-
className: (0, _classnames2.default)((0, _defineProperty3.default)({}, classes.betaWithoutAccountSelector, !hasAccountSelector)),
|
356
419
|
label: 'BETA',
|
357
420
|
beta: true,
|
358
421
|
color: theme.palette.neutral.dark
|
@@ -360,7 +423,7 @@ var HiTopBar = function (_React$Component) {
|
|
360
423
|
(hideable || hasSettings) && _react2.default.createElement(
|
361
424
|
_IconButton2.default,
|
362
425
|
{ color: 'inherit', className: classes.iconButton },
|
363
|
-
hideable && _react2.default.createElement(_mdiMaterialUi.ChevronDoubleUp, { onClick: this.
|
426
|
+
hideable && _react2.default.createElement(_mdiMaterialUi.ChevronDoubleUp, { onClick: this.toggleCollapse }),
|
364
427
|
hasSettings && _react2.default.createElement(_HiIconBuilder2.default, {
|
365
428
|
onClick: this.props.onClickSettings,
|
366
429
|
icon: 'fa-gear',
|
@@ -372,7 +435,7 @@ var HiTopBar = function (_React$Component) {
|
|
372
435
|
hideable && this.state.collapsed && _react2.default.createElement(
|
373
436
|
_IconButton2.default,
|
374
437
|
{
|
375
|
-
onClick: this.
|
438
|
+
onClick: this.toggleCollapse,
|
376
439
|
color: 'inherit',
|
377
440
|
className: classes.showTopBarButton
|
378
441
|
},
|
@@ -388,8 +451,10 @@ var HiTopBar = function (_React$Component) {
|
|
388
451
|
{ className: classes.toolbar },
|
389
452
|
_react2.default.createElement(
|
390
453
|
'div',
|
391
|
-
{ ref:
|
392
|
-
|
454
|
+
{ ref: function ref(div) {
|
455
|
+
return _this2.overlay = div;
|
456
|
+
} },
|
457
|
+
this.state.searchFocus ? _react2.default.createElement(
|
393
458
|
_IconButton2.default,
|
394
459
|
{ className: classes.leftButtonMobile, color: 'inherit' },
|
395
460
|
_ref4
|
@@ -466,7 +531,6 @@ HiTopBar.defaultProps = {
|
|
466
531
|
hideable: false,
|
467
532
|
hasSettings: false,
|
468
533
|
hasAccountSelector: false,
|
469
|
-
searchFocus: false,
|
470
534
|
translations: {
|
471
535
|
back: 'Back',
|
472
536
|
menu: 'Menu',
|
@@ -507,6 +571,10 @@ HiTopBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
507
571
|
* Fonction de callback au click sur l'accountSelector'
|
508
572
|
*/
|
509
573
|
onClickAccountSelector: _propTypes2.default.func,
|
574
|
+
/**
|
575
|
+
* Fonction de callback au click sur le menu
|
576
|
+
*/
|
577
|
+
onClickInputButton: _propTypes2.default.func.isRequired,
|
510
578
|
/**
|
511
579
|
* Fonction de callback au click sur le menu
|
512
580
|
*/
|
@@ -524,22 +592,34 @@ HiTopBar.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
524
592
|
*/
|
525
593
|
onClickSettings: _propTypes2.default.func,
|
526
594
|
/**
|
527
|
-
*
|
528
|
-
* [here](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
|
595
|
+
* Fonction de callback au blur du champs de recharge (si searchInput vide)
|
529
596
|
*/
|
530
|
-
|
597
|
+
onSearchBlur: _propTypes2.default.func,
|
598
|
+
/**
|
599
|
+
* Fonction de callback au changement du champs input (si searchInput vide)
|
600
|
+
*/
|
601
|
+
onSearchChange: _propTypes2.default.func,
|
602
|
+
/**
|
603
|
+
* Fonction de callback au focus sur le champs de recherche (si searchInput vide)
|
604
|
+
*/
|
605
|
+
onSearchFocus: _propTypes2.default.func,
|
531
606
|
/**
|
532
|
-
*
|
607
|
+
* Fonction de callback au reset du champs de recherche (si searchInput vide)
|
533
608
|
*/
|
534
|
-
|
609
|
+
onSearchReset: _propTypes2.default.func,
|
535
610
|
/**
|
536
|
-
*
|
611
|
+
* Positionement de la topBar. The behavior of the different options is described
|
612
|
+
* [here](https://developer.mozilla.org/en-US/docs/Learn/CSS/CSS_layout/Positioning).
|
537
613
|
*/
|
538
|
-
|
614
|
+
position: _propTypes2.default.oneOf(['fixed', 'absolute', 'sticky', 'static']),
|
539
615
|
/**
|
540
616
|
* Input de recherche
|
541
617
|
*/
|
542
|
-
searchInput: _propTypes2.default.node
|
618
|
+
searchInput: _propTypes2.default.node,
|
619
|
+
/**
|
620
|
+
* Valeur du champs de recherche (si searchInput vide)
|
621
|
+
*/
|
622
|
+
searchValue: _propTypes2.default.node,
|
543
623
|
/**
|
544
624
|
* @ignore
|
545
625
|
*/
|
@@ -12,10 +12,7 @@ import MinusBox from 'mdi-material-ui/MinusBox';
|
|
12
12
|
import withStyles from '../styles/withStyles';
|
13
13
|
|
14
14
|
export const styles = theme => ({
|
15
|
-
root: {
|
16
|
-
marginRight: 12,
|
17
|
-
marginLeft: 12
|
18
|
-
},
|
15
|
+
root: {},
|
19
16
|
checked: {
|
20
17
|
color: theme.palette.business.primary.normal
|
21
18
|
},
|
package/es/HiChip/HiChip.js
CHANGED
@@ -87,12 +87,12 @@ function HiChip(props) {
|
|
87
87
|
})
|
88
88
|
},
|
89
89
|
img && React.createElement('img', { className: classes.badge, src: img, alt: img }),
|
90
|
-
icon && React.createElement(HiIconBuilder, { className: classes.icon, icon: icon
|
90
|
+
icon && React.createElement(HiIconBuilder, { className: classes.icon, icon: icon }),
|
91
91
|
onPrevious && React.createElement(HiIconBuilder, {
|
92
92
|
className: classNames(classes.navigate),
|
93
93
|
icon: 'menuLeft',
|
94
94
|
onClick: onPrevious,
|
95
|
-
size:
|
95
|
+
size: 20
|
96
96
|
}),
|
97
97
|
React.createElement(
|
98
98
|
'span',
|
@@ -103,13 +103,13 @@ function HiChip(props) {
|
|
103
103
|
className: classNames(classes.navigate),
|
104
104
|
icon: 'menuRight',
|
105
105
|
onClick: onNext,
|
106
|
-
size:
|
106
|
+
size: 20
|
107
107
|
}),
|
108
108
|
onDelete && React.createElement(HiIconBuilder, {
|
109
109
|
classes: { root: classes.eraseIcon },
|
110
110
|
icon: 'closeCircle',
|
111
111
|
onClick: onDelete,
|
112
|
-
size:
|
112
|
+
size: 20
|
113
113
|
})
|
114
114
|
);
|
115
115
|
}
|
@@ -144,8 +144,7 @@ class HiChipSwitch extends React.PureComponent {
|
|
144
144
|
active,
|
145
145
|
onClick,
|
146
146
|
onSelectionClick,
|
147
|
-
selection
|
148
|
-
selectionTitle
|
147
|
+
selection
|
149
148
|
} = this.props;
|
150
149
|
let selectionProps = {
|
151
150
|
tabIndex: '-1'
|
@@ -155,8 +154,7 @@ class HiChipSwitch extends React.PureComponent {
|
|
155
154
|
onClick: this.handleClickSelection,
|
156
155
|
role: 'button',
|
157
156
|
tabIndex: '0',
|
158
|
-
onKeyDown: this.handleKeyDownSelection
|
159
|
-
title: selectionTitle
|
157
|
+
onKeyDown: this.handleKeyDownSelection
|
160
158
|
};
|
161
159
|
}
|
162
160
|
|
@@ -207,8 +205,7 @@ class HiChipSwitch extends React.PureComponent {
|
|
207
205
|
HiChipSwitch.defaultProps = {
|
208
206
|
activeIcon: 'check',
|
209
207
|
active: false,
|
210
|
-
selection: null
|
211
|
-
selectionTitle: ''
|
208
|
+
selection: null
|
212
209
|
};
|
213
210
|
HiChipSwitch.propTypes = process.env.NODE_ENV !== "production" ? {
|
214
211
|
/**
|
@@ -242,10 +239,6 @@ HiChipSwitch.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
242
239
|
/**
|
243
240
|
* nombre de valeurs selectionnées.
|
244
241
|
*/
|
245
|
-
selection: PropTypes.number
|
246
|
-
/**
|
247
|
-
* Title de la selection.
|
248
|
-
*/
|
249
|
-
selectionTitle: PropTypes.string
|
242
|
+
selection: PropTypes.number
|
250
243
|
} : {};
|
251
244
|
export default withStyles(styles, { name: 'HmuiHiChipSwitch' })(HiChipSwitch);
|
@@ -32,7 +32,7 @@ export const styles = theme => ({
|
|
32
32
|
* Label with background color & text color
|
33
33
|
*/
|
34
34
|
function HiColoredLabel(props) {
|
35
|
-
const { classes,
|
35
|
+
const { classes, label, color, active, beta } = props;
|
36
36
|
let fontWeight = 400;
|
37
37
|
if (beta) {
|
38
38
|
fontWeight = 600;
|
@@ -42,7 +42,7 @@ function HiColoredLabel(props) {
|
|
42
42
|
return React.createElement(
|
43
43
|
'div',
|
44
44
|
{
|
45
|
-
className: classNames(classes.root, { [classes.beta]: beta }
|
45
|
+
className: classNames(classes.root, { [classes.beta]: beta }),
|
46
46
|
style: {
|
47
47
|
backgroundColor: active ? color : fade(color, 0.08),
|
48
48
|
color: active ? getContrastedTextColor(color, '#4C4C4C', '#FFF') : color,
|
@@ -67,10 +67,6 @@ HiColoredLabel.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
67
67
|
* Surcharge les classes du composant
|
68
68
|
*/
|
69
69
|
classes: PropTypes.object,
|
70
|
-
/**
|
71
|
-
* Surcharge les classes du composant
|
72
|
-
*/
|
73
|
-
className: PropTypes.string,
|
74
70
|
/**
|
75
71
|
* Couleur du text & du background
|
76
72
|
*/
|
@@ -78,12 +74,11 @@ HiColoredLabel.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
78
74
|
/**
|
79
75
|
* Label à afficher
|
80
76
|
*/
|
81
|
-
label: PropTypes.oneOfType([PropTypes.string, PropTypes.number
|
77
|
+
label: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired
|
82
78
|
} : {};
|
83
79
|
|
84
80
|
HiColoredLabel.defaultProps = {
|
85
|
-
active: false
|
86
|
-
color: '#737373'
|
81
|
+
active: false
|
87
82
|
};
|
88
83
|
|
89
84
|
export default withStyles(styles, { name: 'HmuiHiColoredLabel' })(HiColoredLabel);
|
@@ -33,7 +33,6 @@ class HiDatePicker extends React.Component {
|
|
33
33
|
this.handleDayChange = this.handleDayChange.bind(this);
|
34
34
|
this.handleCurrentMonthChange = this.handleCurrentMonthChange.bind(this);
|
35
35
|
this.handleReset = this.handleReset.bind(this);
|
36
|
-
this.handleTimeChange = this.handleTimeChange.bind(this);
|
37
36
|
this.openPanel = this.openPanel.bind(this);
|
38
37
|
this.renderCaption = this.renderCaption.bind(this);
|
39
38
|
this.renderOverlay = this.renderOverlay.bind(this);
|
@@ -52,26 +51,31 @@ class HiDatePicker extends React.Component {
|
|
52
51
|
}
|
53
52
|
|
54
53
|
handleDayChange(day, modifiers) {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
} else {
|
59
|
-
// Keep Time if set
|
60
|
-
if (this.props.enableTime && day !== undefined) {
|
61
|
-
if (this.props.value) {
|
62
|
-
day.setHours(this.props.value.getHours(), this.props.value.getMinutes());
|
63
|
-
} else {
|
64
|
-
day.setHours(0, 0);
|
65
|
-
}
|
54
|
+
this.timeout = setTimeout(() => {
|
55
|
+
if (this.datePickerInput && this.datePickerInput.getInput()) {
|
56
|
+
this.datePickerInput.getInput().focus();
|
66
57
|
}
|
67
|
-
|
58
|
+
}, 0);
|
59
|
+
|
60
|
+
if (modifiers.disabled) {
|
61
|
+
return; // TODO: delete ??
|
68
62
|
}
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
63
|
+
|
64
|
+
if (this.props.onChange) {
|
65
|
+
if (modifiers.selected) {
|
66
|
+
// Deselect day
|
67
|
+
this.props.onChange(undefined);
|
68
|
+
} else {
|
69
|
+
// Keep Time if set
|
70
|
+
if (this.props.enableTime) {
|
71
|
+
if (this.props.value) {
|
72
|
+
day.setHours(this.props.value.getHours(), this.props.value.getMinutes());
|
73
|
+
} else {
|
74
|
+
day.setHours(0, 0);
|
75
|
+
}
|
76
|
+
}
|
77
|
+
this.props.onChange(day);
|
78
|
+
}
|
75
79
|
}
|
76
80
|
}
|
77
81
|
|
@@ -99,13 +103,6 @@ class HiDatePicker extends React.Component {
|
|
99
103
|
});
|
100
104
|
}
|
101
105
|
|
102
|
-
handleTimeChange(date, precision) {
|
103
|
-
this.props.onChange(date);
|
104
|
-
if (date instanceof Date && precision === 'minute') {
|
105
|
-
document.activeElement.blur();
|
106
|
-
}
|
107
|
-
}
|
108
|
-
|
109
106
|
openPanel(panel) {
|
110
107
|
this.setState({
|
111
108
|
openedPanel: panel
|
@@ -147,7 +144,7 @@ class HiDatePicker extends React.Component {
|
|
147
144
|
renderTimePickerOverlay(propsOverlay) {
|
148
145
|
const timePickerProps = {
|
149
146
|
value: this.props.value,
|
150
|
-
onChange: this.
|
147
|
+
onChange: this.props.onChange,
|
151
148
|
onCalendarClick: this.handleCalendarClick
|
152
149
|
};
|
153
150
|
return React.createElement(TimePickerOverlay, _extends({ key: 'time-picker-overlay' }, timePickerProps, propsOverlay));
|
@@ -299,10 +296,8 @@ HiDatePicker.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
299
296
|
minimumDate: PropTypes.instanceOf(Date),
|
300
297
|
/**
|
301
298
|
* Callback à la sélection d'une date
|
302
|
-
*
|
303
|
-
* @param {Date} date sélectionnée
|
304
299
|
*/
|
305
|
-
onChange: PropTypes.func
|
300
|
+
onChange: PropTypes.func,
|
306
301
|
/**
|
307
302
|
* Callback au reset de l'input
|
308
303
|
*/
|