@hipay/hipay-material-ui 1.0.0-beta.18 → 1.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
package/es/HiTable/BodyRow.js
CHANGED
|
@@ -112,7 +112,6 @@ class BodyRow extends React.PureComponent {
|
|
|
112
112
|
theme,
|
|
113
113
|
row,
|
|
114
114
|
columns,
|
|
115
|
-
lookupColumns,
|
|
116
115
|
orderedColumns,
|
|
117
116
|
selectable,
|
|
118
117
|
selected,
|
|
@@ -125,10 +124,11 @@ class BodyRow extends React.PureComponent {
|
|
|
125
124
|
innerRow,
|
|
126
125
|
isDetail
|
|
127
126
|
} = _props,
|
|
128
|
-
other = _objectWithoutProperties(_props, ['classes', 'theme', 'row', 'columns', '
|
|
127
|
+
other = _objectWithoutProperties(_props, ['classes', 'theme', 'row', 'columns', 'orderedColumns', 'selectable', 'selected', 'onClick', 'view', 'dense', 'dateLocale', 'numberLocale', 'sticky', 'innerRow', 'isDetail']);
|
|
129
128
|
|
|
130
129
|
const { style } = this.state;
|
|
131
130
|
|
|
131
|
+
let firstCol = true;
|
|
132
132
|
let unfixedCol = true;
|
|
133
133
|
|
|
134
134
|
const rowStyle = _extends({}, style, {
|
|
@@ -160,82 +160,65 @@ class BodyRow extends React.PureComponent {
|
|
|
160
160
|
key: `${row.rowId}-left-cell`,
|
|
161
161
|
className: patchDivClass
|
|
162
162
|
}),
|
|
163
|
-
orderedColumns.map(
|
|
164
|
-
|
|
165
|
-
// Dynamic column settings (from OrderColumns)
|
|
166
|
-
const {
|
|
167
|
-
colId: colRefId,
|
|
168
|
-
displayed,
|
|
169
|
-
view: colView
|
|
170
|
-
} = colRef,
|
|
163
|
+
orderedColumns.map(colRef => {
|
|
164
|
+
const { colId: colRefId, displayed, view: colView } = colRef,
|
|
171
165
|
colRefProps = _objectWithoutProperties(colRef, ['colId', 'displayed', 'view']);
|
|
166
|
+
if (displayed !== false) {
|
|
167
|
+
// the first column is sticky (except checkbox)
|
|
168
|
+
const first = firstCol;
|
|
169
|
+
firstCol = false;
|
|
170
|
+
const _columns$colRef$colId = columns[colRef.colId],
|
|
171
|
+
{
|
|
172
|
+
colId,
|
|
173
|
+
align,
|
|
174
|
+
datas,
|
|
175
|
+
ellipsis,
|
|
176
|
+
fixedWidth,
|
|
177
|
+
type,
|
|
178
|
+
width
|
|
179
|
+
} = _columns$colRef$colId,
|
|
180
|
+
columnProps = _objectWithoutProperties(_columns$colRef$colId, ['colId', 'align', 'datas', 'ellipsis', 'fixedWidth', 'type', 'width']);
|
|
181
|
+
const data = row.datas[colRef.colId];
|
|
172
182
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
const first = index === 0;
|
|
177
|
-
|
|
178
|
-
// Static column settings
|
|
179
|
-
const _columns$colRefId = columns[colRefId],
|
|
180
|
-
{
|
|
181
|
-
colId,
|
|
182
|
-
align,
|
|
183
|
-
data: colData,
|
|
184
|
-
ellipsis,
|
|
185
|
-
fixedWidth,
|
|
186
|
-
type,
|
|
187
|
-
width
|
|
188
|
-
} = _columns$colRefId,
|
|
189
|
-
columnProps = _objectWithoutProperties(_columns$colRefId, ['colId', 'align', 'data', 'ellipsis', 'fixedWidth', 'type', 'width']);
|
|
190
|
-
|
|
191
|
-
// view define in OrderColumn or table prop view by default
|
|
192
|
-
const effectiveView = colView || view;
|
|
193
|
-
|
|
194
|
-
// add clickable badge in cell to open children
|
|
195
|
-
const isParentAnchor = row.hasOwnProperty('parentAnchorColumn') && row.parentAnchorColumn === colId && row.hasOwnProperty('children') && row.children.length > 0;
|
|
183
|
+
const effectiveView = colView || view;
|
|
184
|
+
// add clickable badge in cell to open children
|
|
185
|
+
const isParentAnchor = row.hasOwnProperty('parentAnchorColumn') && row.parentAnchorColumn === colId && row.hasOwnProperty('children') && row.children.length > 0;
|
|
196
186
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
187
|
+
// the first non fixed column is the only one not fixed
|
|
188
|
+
const unfixed = unfixedCol && fixedWidth !== true;
|
|
189
|
+
unfixedCol = unfixedCol && fixedWidth !== true ? false : unfixedCol;
|
|
200
190
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
// Cell data
|
|
205
|
-
let data = row.datas[colRefId];
|
|
206
|
-
// Get object data for column based on reference datas
|
|
207
|
-
if (data !== undefined && colData !== undefined) {
|
|
208
|
-
const colItem = colData.find(item => item.id === data.value);
|
|
209
|
-
if (colItem) {
|
|
210
|
-
// Hydrate data object with reference item
|
|
211
|
-
data = _extends({}, colItem, data);
|
|
191
|
+
let lookedUp = false;
|
|
192
|
+
if (this.props.lookupColumns && this.props.lookupColumns.includes(colId)) {
|
|
193
|
+
lookedUp = true;
|
|
212
194
|
}
|
|
213
|
-
}
|
|
214
195
|
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
196
|
+
return React.createElement(BodyCellBuilder, _extends({}, other, {
|
|
197
|
+
key: `${row.rowId}-${colId}-cell`,
|
|
198
|
+
ukey: `${row.rowId}-${colId}-cell`,
|
|
199
|
+
checkboxValue: row.rowId,
|
|
200
|
+
type: type,
|
|
201
|
+
datas: data,
|
|
202
|
+
ellipsis: ellipsis,
|
|
203
|
+
align: align,
|
|
204
|
+
view: effectiveView,
|
|
205
|
+
padding: cst.DEFAULT_PADDING[view],
|
|
206
|
+
width: width,
|
|
207
|
+
fixedWidth: !unfixed,
|
|
208
|
+
sticky: sticky && first,
|
|
209
|
+
selectable: selectable && first,
|
|
210
|
+
dateLocale: dateLocale,
|
|
211
|
+
numberLocale: numberLocale,
|
|
212
|
+
dense: dense,
|
|
213
|
+
selected: selected,
|
|
214
|
+
onSelect: this.handleSelect,
|
|
215
|
+
onOpenDetails: this.handleOpenRowDetails,
|
|
216
|
+
childrenCount: isParentAnchor ? row.children.length : null,
|
|
217
|
+
colId: colId,
|
|
218
|
+
lookedUp: lookedUp
|
|
219
|
+
}, columnProps, colRefProps));
|
|
220
|
+
}
|
|
221
|
+
return null;
|
|
239
222
|
}),
|
|
240
223
|
React.createElement(TableCell, {
|
|
241
224
|
style: {
|
|
@@ -258,8 +241,7 @@ BodyRow.defaultProps = {
|
|
|
258
241
|
sticky: false,
|
|
259
242
|
live: false,
|
|
260
243
|
innerRow: false,
|
|
261
|
-
lookupColumns: []
|
|
262
|
-
fixedColumnWidth: true
|
|
244
|
+
lookupColumns: []
|
|
263
245
|
};
|
|
264
246
|
BodyRow.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
265
247
|
/**
|
|
@@ -270,11 +252,6 @@ BodyRow.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
270
252
|
* Densité d'affichage (joue sur la hauteur des lignes)
|
|
271
253
|
*/
|
|
272
254
|
dense: PropTypes.bool,
|
|
273
|
-
/**
|
|
274
|
-
* Fixe la taille des colonnes selon le type de vue
|
|
275
|
-
* Sinon les colonnes s'adaptent à l'espace disponible
|
|
276
|
-
*/
|
|
277
|
-
fixedColumnWidth: PropTypes.bool,
|
|
278
255
|
/**
|
|
279
256
|
* Applique le style d'une ligne intégrée a un sous-tableau
|
|
280
257
|
*/
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import _Set from 'babel-runtime/core-js/set';
|
|
2
1
|
import _extends from 'babel-runtime/helpers/extends';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import Popover from 'material-ui/Popover';
|
|
@@ -143,20 +142,20 @@ class ColumnFilter extends React.Component {
|
|
|
143
142
|
* Sélectionne tous les items filtrés
|
|
144
143
|
*/
|
|
145
144
|
selectAllFilters() {
|
|
146
|
-
this.setState(
|
|
147
|
-
selectedIdList: [...new _Set([...prevState.selectedIdList, ...prevState.suggestions.map(item => item.id)])]
|
|
148
|
-
}));
|
|
145
|
+
this.setState({ selectedIdList: this.state.suggestions.map(item => item.id) });
|
|
149
146
|
}
|
|
150
147
|
|
|
151
148
|
/**
|
|
152
149
|
* Désélectionne tous les items filtrés
|
|
153
150
|
*/
|
|
154
151
|
deselectAllFilters() {
|
|
155
|
-
this.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
152
|
+
const selectedIdList = this.state.selectedIdList;
|
|
153
|
+
this.state.suggestions.map(item => {
|
|
154
|
+
if (this.state.selectedIdList.includes(item.id)) {
|
|
155
|
+
selectedIdList.splice(this.state.selectedIdList.indexOf(item.id), 1);
|
|
156
|
+
}
|
|
159
157
|
});
|
|
158
|
+
this.setState({ selectedIdList });
|
|
160
159
|
}
|
|
161
160
|
|
|
162
161
|
handleSort(direction) {
|
|
@@ -254,11 +253,7 @@ class ColumnFilter extends React.Component {
|
|
|
254
253
|
React.createElement(
|
|
255
254
|
'div',
|
|
256
255
|
{ className: classes.menuItemFilter },
|
|
257
|
-
|
|
258
|
-
'span',
|
|
259
|
-
{ style: { marginRight: 4 } },
|
|
260
|
-
translations.filter
|
|
261
|
-
),
|
|
256
|
+
translations.filter,
|
|
262
257
|
React.createElement(
|
|
263
258
|
HiPins,
|
|
264
259
|
{
|
|
@@ -302,8 +297,7 @@ class ColumnFilter extends React.Component {
|
|
|
302
297
|
itemList: suggestions,
|
|
303
298
|
selectedIdList: selectedIdList,
|
|
304
299
|
onSelect: this.toggleSelectItem,
|
|
305
|
-
leftPadding: 28
|
|
306
|
-
checkbox: type !== 'icon'
|
|
300
|
+
leftPadding: 28
|
|
307
301
|
}),
|
|
308
302
|
React.createElement(
|
|
309
303
|
'div',
|
package/es/HiTable/HeaderCell.js
CHANGED
|
@@ -130,7 +130,6 @@ class HeaderCell extends React.PureComponent {
|
|
|
130
130
|
classes,
|
|
131
131
|
type,
|
|
132
132
|
title,
|
|
133
|
-
smallTitle,
|
|
134
133
|
selectable,
|
|
135
134
|
selected,
|
|
136
135
|
onSelect,
|
|
@@ -142,7 +141,7 @@ class HeaderCell extends React.PureComponent {
|
|
|
142
141
|
view,
|
|
143
142
|
dense,
|
|
144
143
|
width = cst.DEFAULT_WIDTHS[type][view],
|
|
145
|
-
|
|
144
|
+
fixedWidth,
|
|
146
145
|
align = cst.ALIGN_RIGHT_TYPES.includes(type) ? 'right' : 'left',
|
|
147
146
|
sticky,
|
|
148
147
|
padding,
|
|
@@ -179,22 +178,19 @@ class HeaderCell extends React.PureComponent {
|
|
|
179
178
|
|
|
180
179
|
const lookedUpClassName = classNames({ [classes.lookedUp]: lookedUp });
|
|
181
180
|
|
|
182
|
-
const cellStyle = {
|
|
183
|
-
padding: 0,
|
|
184
|
-
zIndex: sticky ? 13 : 12, // la cellule sticky doit être au dessus des autres cellules du header
|
|
185
|
-
backgroundColor: 'inherit',
|
|
186
|
-
textAlign: align
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
if (fixedColumnWidth) {
|
|
190
|
-
cellStyle.maxWidth = _width;
|
|
191
|
-
cellStyle.minWidth = _width;
|
|
192
|
-
cellStyle.width = _width;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
181
|
return React.createElement(
|
|
196
182
|
TableCell,
|
|
197
|
-
{
|
|
183
|
+
{
|
|
184
|
+
style: {
|
|
185
|
+
maxWidth: _width,
|
|
186
|
+
minWidth: _width,
|
|
187
|
+
width: _width,
|
|
188
|
+
padding: 0,
|
|
189
|
+
zIndex: sticky ? 13 : 12, // la cellule sticky doit être au dessus des autres cellules du header
|
|
190
|
+
backgroundColor: 'inherit',
|
|
191
|
+
textAlign: align
|
|
192
|
+
}
|
|
193
|
+
},
|
|
198
194
|
React.createElement(
|
|
199
195
|
'div',
|
|
200
196
|
null,
|
|
@@ -237,7 +233,7 @@ class HeaderCell extends React.PureComponent {
|
|
|
237
233
|
{
|
|
238
234
|
className: classes.labelContainer + (_sorted ? ' ' + classes.labelContainerOrdered : '')
|
|
239
235
|
},
|
|
240
|
-
|
|
236
|
+
title
|
|
241
237
|
),
|
|
242
238
|
align !== 'right' && _icons
|
|
243
239
|
) : React.createElement(
|
|
@@ -254,7 +250,7 @@ class HeaderCell extends React.PureComponent {
|
|
|
254
250
|
React.createElement(
|
|
255
251
|
'span',
|
|
256
252
|
{ className: classes.labelContainer, style: { width: '100%' } },
|
|
257
|
-
|
|
253
|
+
title
|
|
258
254
|
)
|
|
259
255
|
)
|
|
260
256
|
),
|
|
@@ -283,7 +279,7 @@ HeaderCell.defaultProps = {
|
|
|
283
279
|
sortDirection: 'asc',
|
|
284
280
|
view: 'l',
|
|
285
281
|
dense: false,
|
|
286
|
-
|
|
282
|
+
fixedWidth: false,
|
|
287
283
|
sticky: true,
|
|
288
284
|
padding: 8
|
|
289
285
|
};
|
|
@@ -363,7 +359,7 @@ HeaderCell.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
363
359
|
/**
|
|
364
360
|
* La largeur de la cellule est fixé (toutes les colonnes sauf une)
|
|
365
361
|
*/
|
|
366
|
-
|
|
362
|
+
fixedWidth: PropTypes.bool,
|
|
367
363
|
/**
|
|
368
364
|
* Title alignement, est déduit de type par défaut
|
|
369
365
|
*/
|
package/es/HiTable/HiTable.js
CHANGED
|
@@ -5,11 +5,10 @@ import ArrowUp from 'mdi-material-ui/ArrowUp';
|
|
|
5
5
|
import isRequiredIf from 'react-proptype-conditional-require';
|
|
6
6
|
import HiButton from '../HiButton';
|
|
7
7
|
|
|
8
|
-
import { withStyles } from '../styles';
|
|
8
|
+
import { withStyles, withTheme } from '../styles';
|
|
9
9
|
import HiTableHead from './HiTableHead';
|
|
10
10
|
import HiTableBody from './HiTableBody';
|
|
11
11
|
import HiTableFooterScroll from './HiTableFooterScroll';
|
|
12
|
-
import HiTableFooter from './HiTableFooter';
|
|
13
12
|
import * as cst from './constants';
|
|
14
13
|
import HiTableContextMenu from './HiTableContextMenu';
|
|
15
14
|
|
|
@@ -582,24 +581,13 @@ class HiTable extends React.Component {
|
|
|
582
581
|
translations,
|
|
583
582
|
view,
|
|
584
583
|
groupBy,
|
|
585
|
-
lookupColumns
|
|
586
|
-
loading,
|
|
587
|
-
fixedColumnWidth,
|
|
588
|
-
disableContextMenu,
|
|
589
|
-
footerContent
|
|
584
|
+
lookupColumns
|
|
590
585
|
} = this.props;
|
|
591
586
|
|
|
592
587
|
const { dateUpdate, isScrollToBottom, groupByIds } = this.state;
|
|
593
588
|
|
|
594
589
|
const headerHeight = dense ? cst.CELL_HEADER_HEIGHT_DENSE : cst.CELL_HEADER_HEIGHT;
|
|
595
590
|
|
|
596
|
-
let nbColumnsDisplayed = 0;
|
|
597
|
-
orderedColumns.forEach(column => {
|
|
598
|
-
if (column.displayed !== false) {
|
|
599
|
-
nbColumnsDisplayed += 1;
|
|
600
|
-
}
|
|
601
|
-
});
|
|
602
|
-
|
|
603
591
|
return React.createElement(
|
|
604
592
|
'div',
|
|
605
593
|
{ className: classes.root },
|
|
@@ -639,8 +627,7 @@ class HiTable extends React.Component {
|
|
|
639
627
|
sticky: sticky,
|
|
640
628
|
view: view,
|
|
641
629
|
translations: translations,
|
|
642
|
-
lookupColumns: lookupColumns
|
|
643
|
-
fixedColumnWidth: fixedColumnWidth
|
|
630
|
+
lookupColumns: lookupColumns
|
|
644
631
|
}),
|
|
645
632
|
React.createElement(HiTableBody, {
|
|
646
633
|
tabId: tabId,
|
|
@@ -665,10 +652,7 @@ class HiTable extends React.Component {
|
|
|
665
652
|
groupBy: groupBy,
|
|
666
653
|
onClickNext: this.handleNextStickyRow,
|
|
667
654
|
groupByIds: groupByIds,
|
|
668
|
-
lookupColumns: lookupColumns
|
|
669
|
-
loading: loading,
|
|
670
|
-
fixedColumnWidth: fixedColumnWidth,
|
|
671
|
-
disableContextMenu: disableContextMenu
|
|
655
|
+
lookupColumns: lookupColumns
|
|
672
656
|
}),
|
|
673
657
|
infiniteScroll && React.createElement(HiTableFooterScroll, {
|
|
674
658
|
tabId: tabId,
|
|
@@ -677,15 +661,7 @@ class HiTable extends React.Component {
|
|
|
677
661
|
maxAutoRequest: 3,
|
|
678
662
|
isScrollToBottom: isScrollToBottom,
|
|
679
663
|
translations: translations
|
|
680
|
-
})
|
|
681
|
-
!infiniteScroll && footerContent && React.createElement(
|
|
682
|
-
HiTableFooter,
|
|
683
|
-
{
|
|
684
|
-
nbColumnsDisplayed: nbColumnsDisplayed,
|
|
685
|
-
view: view
|
|
686
|
-
},
|
|
687
|
-
footerContent
|
|
688
|
-
)
|
|
664
|
+
})
|
|
689
665
|
),
|
|
690
666
|
React.createElement(HiTableContextMenu, {
|
|
691
667
|
tabId: tabId,
|
|
@@ -698,7 +674,7 @@ class HiTable extends React.Component {
|
|
|
698
674
|
React.createElement(
|
|
699
675
|
HiButton,
|
|
700
676
|
{
|
|
701
|
-
|
|
677
|
+
raised: true,
|
|
702
678
|
color: 'primary',
|
|
703
679
|
className: classes.backToTopButton,
|
|
704
680
|
onClick: () => this.scrollToTop()
|
|
@@ -741,10 +717,7 @@ HiTable.defaultProps = {
|
|
|
741
717
|
}
|
|
742
718
|
},
|
|
743
719
|
view: 'l',
|
|
744
|
-
lookupColumns: []
|
|
745
|
-
loading: false,
|
|
746
|
-
fixedColumnWidth: true,
|
|
747
|
-
disableContextMenu: true
|
|
720
|
+
lookupColumns: []
|
|
748
721
|
};
|
|
749
722
|
HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
750
723
|
/**
|
|
@@ -771,27 +744,10 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
771
744
|
* Densité d'affichage (joue sur la hauteur des lignes)
|
|
772
745
|
*/
|
|
773
746
|
dense: PropTypes.bool,
|
|
774
|
-
/**
|
|
775
|
-
* Active/désactive le menu contextuel au clic droit sur les cellules du tableau
|
|
776
|
-
*/
|
|
777
|
-
disableContextMenu: PropTypes.bool.isRequired,
|
|
778
747
|
/**
|
|
779
748
|
* Active le filtre sur les colonnes filtrables
|
|
780
749
|
*/
|
|
781
750
|
filterable: PropTypes.bool,
|
|
782
|
-
/**
|
|
783
|
-
* Fixe la taille des colonnes selon le type de vue
|
|
784
|
-
* Sinon les colonnes s'adaptent à l'espace disponible
|
|
785
|
-
*/
|
|
786
|
-
fixedColumnWidth: PropTypes.bool,
|
|
787
|
-
/**
|
|
788
|
-
* Ajoute un footer avec le contenu footerContent à l'intérieur
|
|
789
|
-
*/
|
|
790
|
-
footerContent: PropTypes.node,
|
|
791
|
-
/**
|
|
792
|
-
* Id de la colonne par laquelle sont regroupé les éléments
|
|
793
|
-
*/
|
|
794
|
-
groupBy: PropTypes.string,
|
|
795
751
|
/**
|
|
796
752
|
* Ajoute le loader et le requestNextDatas en fin de tableau (si infiniteScroll activé)
|
|
797
753
|
*/
|
|
@@ -804,10 +760,6 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
804
760
|
* Ajoute l'infinite scroll
|
|
805
761
|
*/
|
|
806
762
|
infiniteScroll: PropTypes.bool,
|
|
807
|
-
/**
|
|
808
|
-
* État du tableau en cours de chargement des données
|
|
809
|
-
*/
|
|
810
|
-
loading: PropTypes.bool,
|
|
811
763
|
/**
|
|
812
764
|
* Identifiant de la ou des colonnes sur la/lesquelles il y a une 'lookup' search
|
|
813
765
|
*/
|
|
@@ -860,9 +812,6 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
860
812
|
/**
|
|
861
813
|
* Fonction de callback sur le tri d'une colonne
|
|
862
814
|
* Passe l'id de la colonne et la direction du tri (ou false si tri par défaut)
|
|
863
|
-
*
|
|
864
|
-
* @param {string} column id
|
|
865
|
-
* @param {string} direction
|
|
866
815
|
*/
|
|
867
816
|
onSort: PropTypes.func,
|
|
868
817
|
/**
|
|
@@ -918,6 +867,10 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
918
867
|
* Taille du tableau (L/M/S),
|
|
919
868
|
* définit l'espace entre les cellules et leurs tailles par default
|
|
920
869
|
*/
|
|
921
|
-
view: PropTypes.oneOf(['l', 'm', 's'])
|
|
870
|
+
view: PropTypes.oneOf(['l', 'm', 's']),
|
|
871
|
+
/**
|
|
872
|
+
* Id de la colonne par laquelle sont regroupé les éléments
|
|
873
|
+
*/
|
|
874
|
+
groupBy: PropTypes.string
|
|
922
875
|
} : {};
|
|
923
876
|
export default withStyles(styles, { withTheme: true, name: 'HmuiHiTable' })(HiTable);
|
|
@@ -2,24 +2,23 @@ import _extends from 'babel-runtime/helpers/extends';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { TableBody, TableRow } from 'material-ui/Table';
|
|
5
|
-
import
|
|
6
|
-
import { withStyles } from '../styles';
|
|
5
|
+
import { withStyles, withTheme } from '../styles';
|
|
7
6
|
import BodyRow from './BodyRow';
|
|
8
7
|
import ChildRow from './ChildRow';
|
|
9
8
|
import HiStickyRow from './HiStickyRow';
|
|
10
9
|
import * as cst from './constants';
|
|
10
|
+
import { SORTED_COLUMN_ERROR_MESSAGE } from './HiTableHead';
|
|
11
|
+
import isRequiredIf from 'react-proptype-conditional-require';
|
|
11
12
|
|
|
12
13
|
export const styles = theme => ({
|
|
13
14
|
tbody: {
|
|
14
15
|
position: 'relative',
|
|
15
|
-
|
|
16
|
+
display: 'block' /* seperates the tbody from the header */
|
|
17
|
+
, width: '100%',
|
|
16
18
|
overflowX: 'hidden',
|
|
17
19
|
overflowY: 'auto',
|
|
18
20
|
zIndex: 11
|
|
19
21
|
},
|
|
20
|
-
tbodyFixedWidth: {
|
|
21
|
-
display: 'block' /* seperates the tbody from the header */
|
|
22
|
-
},
|
|
23
22
|
tbodyRows: {
|
|
24
23
|
backgroundColor: theme.palette.background3
|
|
25
24
|
},
|
|
@@ -192,10 +191,7 @@ class HiTableBody extends React.Component {
|
|
|
192
191
|
numberLocale,
|
|
193
192
|
groupByIds,
|
|
194
193
|
sortedColumnId,
|
|
195
|
-
lookupColumns
|
|
196
|
-
loading,
|
|
197
|
-
fixedColumnWidth,
|
|
198
|
-
disableContextMenu
|
|
194
|
+
lookupColumns
|
|
199
195
|
} = this.props;
|
|
200
196
|
|
|
201
197
|
const { openedParentRowId, openedDetailsRowIdList } = this.state;
|
|
@@ -292,9 +288,7 @@ class HiTableBody extends React.Component {
|
|
|
292
288
|
row,
|
|
293
289
|
sticky,
|
|
294
290
|
tabId,
|
|
295
|
-
view
|
|
296
|
-
fixedColumnWidth,
|
|
297
|
-
disableContextMenu
|
|
291
|
+
view
|
|
298
292
|
});
|
|
299
293
|
|
|
300
294
|
if (hasChildren && openedParentRowId === row.rowId) {
|
|
@@ -323,9 +317,7 @@ class HiTableBody extends React.Component {
|
|
|
323
317
|
view,
|
|
324
318
|
dense,
|
|
325
319
|
sticky,
|
|
326
|
-
isDetail: true
|
|
327
|
-
fixedColumnWidth,
|
|
328
|
-
disableContextMenu
|
|
320
|
+
isDetail: true
|
|
329
321
|
};
|
|
330
322
|
|
|
331
323
|
tableRows.push(React.createElement(BodyRow, _extends({ key: `${row.rowId}-${detailRow.rowId}` }, detailRowProps)));
|
|
@@ -333,20 +325,12 @@ class HiTableBody extends React.Component {
|
|
|
333
325
|
}
|
|
334
326
|
});
|
|
335
327
|
|
|
336
|
-
const tBodyClasses = classNames(classes.tbody, {
|
|
337
|
-
[classes.tbodyFixedWidth]: fixedColumnWidth
|
|
338
|
-
});
|
|
339
|
-
|
|
340
328
|
return React.createElement(
|
|
341
329
|
TableBody,
|
|
342
330
|
{
|
|
343
331
|
id: `${tabId}-body`,
|
|
344
|
-
className:
|
|
345
|
-
style:
|
|
346
|
-
height
|
|
347
|
-
}, loading && {
|
|
348
|
-
opacity: 0.6
|
|
349
|
-
}),
|
|
332
|
+
className: classes.tbody,
|
|
333
|
+
style: { height },
|
|
350
334
|
onScroll: onScroll
|
|
351
335
|
},
|
|
352
336
|
tableRows.map(tableRow => {
|
|
@@ -365,9 +349,7 @@ HiTableBody.defaultProps = {
|
|
|
365
349
|
dense: false,
|
|
366
350
|
height: 450,
|
|
367
351
|
sticky: true,
|
|
368
|
-
view: 'l'
|
|
369
|
-
loading: false,
|
|
370
|
-
disableContextMenu: true
|
|
352
|
+
view: 'l'
|
|
371
353
|
};
|
|
372
354
|
HiTableBody.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
373
355
|
/**
|
|
@@ -395,23 +377,10 @@ HiTableBody.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
395
377
|
* Densité d'affichage (joue sur la hauteur des lignes)
|
|
396
378
|
*/
|
|
397
379
|
dense: PropTypes.bool,
|
|
398
|
-
/**
|
|
399
|
-
* Active/désactive le menu contextuel au clic droit sur les cellules du tableau
|
|
400
|
-
*/
|
|
401
|
-
disableContextMenu: PropTypes.bool.isRequired,
|
|
402
|
-
/**
|
|
403
|
-
* Fixe la taille des colonnes selon le type de vue
|
|
404
|
-
* Sinon les colonnes s'adaptent à l'espace disponible
|
|
405
|
-
*/
|
|
406
|
-
fixedColumnWidth: PropTypes.bool,
|
|
407
380
|
/**
|
|
408
381
|
* Hauteur du tableau (px)
|
|
409
382
|
*/
|
|
410
383
|
height: PropTypes.number,
|
|
411
|
-
/**
|
|
412
|
-
* État du tableau en cours de chargement des données
|
|
413
|
-
*/
|
|
414
|
-
loading: PropTypes.bool,
|
|
415
384
|
/**
|
|
416
385
|
* Identifiant de la ou des colonnes sur la/lesquelles il y a une 'lookup' search
|
|
417
386
|
*/
|
|
@@ -39,8 +39,7 @@ class HiTableContextMenu extends React.Component {
|
|
|
39
39
|
super(props);
|
|
40
40
|
|
|
41
41
|
this.state = {
|
|
42
|
-
value: ''
|
|
43
|
-
label: ''
|
|
42
|
+
value: ''
|
|
44
43
|
};
|
|
45
44
|
|
|
46
45
|
this.handleContextMenuOpen = this.handleContextMenuOpen.bind(this);
|
|
@@ -51,10 +50,7 @@ class HiTableContextMenu extends React.Component {
|
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
handleContextMenuOpen(event) {
|
|
54
|
-
this.setState({
|
|
55
|
-
value: event.detail.data.value,
|
|
56
|
-
label: event.detail.data.label
|
|
57
|
-
});
|
|
53
|
+
this.setState({ value: event.detail.data.label });
|
|
58
54
|
}
|
|
59
55
|
|
|
60
56
|
handleClickCopy(event, data) {
|
|
@@ -104,7 +100,7 @@ class HiTableContextMenu extends React.Component {
|
|
|
104
100
|
React.createElement(
|
|
105
101
|
'span',
|
|
106
102
|
{ className: classes.title },
|
|
107
|
-
menuItem.title.replace('%s', this.state.
|
|
103
|
+
menuItem.title.replace('%s', this.state.value)
|
|
108
104
|
)
|
|
109
105
|
);
|
|
110
106
|
})
|