@hipay/hipay-material-ui 1.0.0-beta.2 → 1.0.0-beta.21
Sign up to get free protection for your applications and to get access to all the features.
- package/HI-CHANGELOG.md +58 -0
- package/HiAlertModal/HiAlertModal.js +247 -0
- package/HiAlertModal/index.js +16 -0
- package/HiBreadcrumb/HiBreadcrumb.js +149 -0
- package/HiBreadcrumb/HiStep.js +159 -0
- package/HiBreadcrumb/HiStepConnector.js +207 -0
- package/HiBreadcrumb/HiStepContent.js +122 -0
- package/HiBreadcrumb/HiStepIcon.js +191 -0
- package/HiBreadcrumb/HiStepLabel.js +248 -0
- package/HiBreadcrumb/HiStepper.js +106 -0
- package/HiBreadcrumb/index.js +16 -0
- package/HiCheckbox/HiCheckbox.js +4 -1
- package/HiChip/HiChip.js +16 -6
- package/HiChip/HiChipSwitch.js +11 -4
- package/HiColoredLabel/HiColoredLabel.js +9 -3
- package/HiDatePicker/HiDatePicker.js +34 -30
- package/HiDatePicker/HiDateRangePicker.js +77 -34
- package/HiDatePicker/HiDateRangeSelector.js +38 -17
- package/HiDatePicker/ListPicker.js +32 -7
- package/HiDatePicker/Overlays/CustomOverlayLayout.js +3 -1
- package/HiDatePicker/Overlays/MonthPickerOverlay.js +5 -1
- package/HiDatePicker/Overlays/Overlay.js +22 -4
- package/HiDatePicker/Overlays/YearPickerOverlay.js +2 -1
- package/HiDatePicker/stylesheet.js +11 -0
- package/HiDotsStepper/HiDot.js +151 -0
- package/HiDotsStepper/HiDotsStepper.js +146 -0
- package/HiDotsStepper/index.js +16 -0
- package/HiExpansionPanel/HiExpansionPanel.js +231 -0
- package/HiExpansionPanel/index.js +16 -0
- package/HiForm/HiAddressField.js +187 -0
- package/HiForm/HiFormControl.js +39 -31
- package/HiForm/HiInput.js +48 -22
- package/HiForm/HiSearchField.js +2 -2
- package/HiForm/HiSlider.js +399 -0
- package/HiForm/HiUpload.js +280 -0
- package/HiForm/HiUploadField.js +456 -0
- package/HiForm/index.js +36 -0
- package/HiMap/HiMap.js +367 -0
- package/HiMap/HiMapExpand.js +217 -0
- package/HiMap/index.js +25 -0
- package/HiPdfReader/HiPdfReader.js +282 -0
- package/HiPdfReader/index.js +16 -0
- package/HiPins/HiPins.js +0 -1
- package/HiSelect/HiSelect.js +431 -354
- package/HiSelect/HiSelectField.js +8 -6
- package/HiSelect/HiSuggestSelect.js +60 -50
- package/HiSelect/HiSuggestSelectField.js +88 -80
- package/HiSelect/SelectInput.js +34 -23
- package/HiSelectableList/HiSelectableList.js +9 -3
- package/HiSelectableList/HiSelectableListItem.js +126 -92
- package/HiSwitch/HiSwitchState.js +1 -1
- package/HiSwitch/index.js +6 -0
- package/HiTable/BodyCellBuilder.js +116 -101
- package/HiTable/BodyCells/CellCountry.js +11 -36
- package/HiTable/BodyCells/CellIcon.js +29 -20
- package/HiTable/BodyCells/CellImage.js +44 -23
- package/HiTable/BodyCells/CellLayout.js +50 -21
- package/HiTable/BodyCells/CellNumeric.js +7 -2
- package/HiTable/BodyCells/CellSentinel.js +26 -17
- package/HiTable/BodyCells/CellStatus.js +7 -3
- package/HiTable/BodyCells/CellText.js +2 -1
- package/HiTable/BodyCells/CellThirdPartySecurity.js +45 -22
- package/HiTable/BodyRow.js +106 -62
- package/HiTable/ChildRow.js +3 -9
- package/HiTable/ColumnFilter.js +28 -15
- package/HiTable/HeaderCell.js +25 -20
- package/HiTable/HiTable.js +75 -11
- package/HiTable/HiTableBody.js +80 -36
- package/HiTable/HiTableContextMenu.js +7 -3
- package/HiTable/HiTableFooter.js +132 -0
- package/HiTable/HiTableFooterScroll.js +1 -1
- package/HiTable/HiTableHead.js +24 -7
- package/HiTable/OrderColumns.js +6 -2
- package/HiTopBar/HiTopBar.js +49 -120
- package/es/HiAlertModal/HiAlertModal.js +189 -0
- package/es/HiAlertModal/index.js +1 -0
- package/es/HiBreadcrumb/HiBreadcrumb.js +81 -0
- package/es/HiBreadcrumb/HiStep.js +94 -0
- package/es/HiBreadcrumb/HiStepConnector.js +143 -0
- package/es/HiBreadcrumb/HiStepContent.js +63 -0
- package/es/HiBreadcrumb/HiStepIcon.js +149 -0
- package/es/HiBreadcrumb/HiStepLabel.js +197 -0
- package/es/HiBreadcrumb/HiStepper.js +46 -0
- package/es/HiBreadcrumb/index.js +1 -0
- package/es/HiCheckbox/HiCheckbox.js +4 -1
- package/es/HiChip/HiChip.js +15 -6
- package/es/HiChip/HiChipSwitch.js +11 -4
- package/es/HiColoredLabel/HiColoredLabel.js +9 -4
- package/es/HiDatePicker/HiDatePicker.js +30 -25
- package/es/HiDatePicker/HiDateRangePicker.js +73 -33
- package/es/HiDatePicker/HiDateRangeSelector.js +39 -18
- package/es/HiDatePicker/ListPicker.js +39 -20
- package/es/HiDatePicker/Overlays/CustomOverlayLayout.js +3 -1
- package/es/HiDatePicker/Overlays/MonthPickerOverlay.js +5 -1
- package/es/HiDatePicker/Overlays/Overlay.js +18 -4
- package/es/HiDatePicker/Overlays/YearPickerOverlay.js +2 -1
- package/es/HiDatePicker/stylesheet.js +11 -0
- package/es/HiDotsStepper/HiDot.js +92 -0
- package/es/HiDotsStepper/HiDotsStepper.js +83 -0
- package/es/HiDotsStepper/index.js +1 -0
- package/es/HiExpansionPanel/HiExpansionPanel.js +170 -0
- package/es/HiExpansionPanel/index.js +1 -0
- package/es/HiForm/HiAddressField.js +127 -0
- package/es/HiForm/HiFormControl.js +32 -18
- package/es/HiForm/HiInput.js +43 -21
- package/es/HiForm/HiSearchField.js +2 -2
- package/es/HiForm/HiSlider.js +309 -0
- package/es/HiForm/HiUpload.js +194 -0
- package/es/HiForm/HiUploadField.js +368 -0
- package/es/HiForm/index.js +5 -1
- package/es/HiMap/HiMap.js +285 -0
- package/es/HiMap/HiMapExpand.js +145 -0
- package/es/HiMap/index.js +2 -0
- package/es/HiPdfReader/HiPdfReader.js +198 -0
- package/es/HiPdfReader/index.js +1 -0
- package/es/HiPins/HiPins.js +0 -1
- package/es/HiSelect/HiSelect.js +403 -326
- package/es/HiSelect/HiSelectField.js +9 -7
- package/es/HiSelect/HiSuggestSelect.js +57 -42
- package/es/HiSelect/HiSuggestSelectField.js +77 -69
- package/es/HiSelect/SelectInput.js +44 -23
- package/es/HiSelectableList/HiSelectableList.js +10 -4
- package/es/HiSelectableList/HiSelectableListItem.js +121 -92
- package/es/HiSwitch/HiSwitchState.js +1 -1
- package/es/HiSwitch/index.js +1 -0
- package/es/HiTable/BodyCellBuilder.js +112 -102
- package/es/HiTable/BodyCells/CellCountry.js +10 -35
- package/es/HiTable/BodyCells/CellIcon.js +18 -9
- package/es/HiTable/BodyCells/CellImage.js +43 -24
- package/es/HiTable/BodyCells/CellLayout.js +51 -24
- package/es/HiTable/BodyCells/CellNumeric.js +6 -2
- package/es/HiTable/BodyCells/CellSentinel.js +20 -9
- package/es/HiTable/BodyCells/CellStatus.js +7 -3
- package/es/HiTable/BodyCells/CellText.js +2 -1
- package/es/HiTable/BodyCells/CellThirdPartySecurity.js +42 -18
- package/es/HiTable/BodyRow.js +106 -61
- package/es/HiTable/ChildRow.js +3 -10
- package/es/HiTable/ColumnFilter.js +15 -9
- package/es/HiTable/HeaderCell.js +25 -19
- package/es/HiTable/HiTable.js +73 -12
- package/es/HiTable/HiTableBody.js +71 -32
- package/es/HiTable/HiTableContextMenu.js +7 -3
- package/es/HiTable/HiTableFooter.js +75 -0
- package/es/HiTable/HiTableFooterScroll.js +1 -1
- package/es/HiTable/HiTableHead.js +19 -7
- package/es/HiTable/OrderColumns.js +6 -2
- package/es/HiTopBar/HiTopBar.js +52 -111
- package/es/styles/createHiMuiTheme.js +13 -0
- package/es/utils/hiHelpers.js +9 -8
- package/hmu/images/countries/ad.svg +151 -0
- package/hmu/images/countries/ae.svg +6 -0
- package/hmu/images/countries/af.svg +83 -0
- package/hmu/images/countries/ag.svg +15 -0
- package/hmu/images/countries/ai.svg +767 -0
- package/hmu/images/countries/al.svg +5 -0
- package/hmu/images/countries/am.svg +5 -0
- package/hmu/images/countries/ao.svg +13 -0
- package/hmu/images/countries/aq.svg +6 -0
- package/hmu/images/countries/ar.svg +32 -0
- package/hmu/images/countries/as.svg +33 -0
- package/hmu/images/countries/at.svg +6 -0
- package/hmu/images/countries/au.svg +9 -0
- package/hmu/images/countries/aw.svg +186 -0
- package/hmu/images/countries/ax.svg +18 -0
- package/hmu/images/countries/az.svg +8 -0
- package/hmu/images/countries/ba.svg +12 -0
- package/hmu/images/countries/bb.svg +6 -0
- package/hmu/images/countries/bd.svg +4 -0
- package/hmu/images/countries/be.svg +7 -0
- package/hmu/images/countries/bf.svg +7 -0
- package/hmu/images/countries/bg.svg +7 -0
- package/hmu/images/countries/bh.svg +11 -0
- package/hmu/images/countries/bi.svg +15 -0
- package/hmu/images/countries/bj.svg +14 -0
- package/hmu/images/countries/bl.svg +7 -0
- package/hmu/images/countries/bm.svg +99 -0
- package/hmu/images/countries/bn.svg +36 -0
- package/hmu/images/countries/bo.svg +686 -0
- package/hmu/images/countries/bq.svg +5 -0
- package/hmu/images/countries/br.svg +45 -0
- package/hmu/images/countries/bs.svg +13 -0
- package/hmu/images/countries/bt.svg +89 -0
- package/hmu/images/countries/bv.svg +13 -0
- package/hmu/images/countries/bw.svg +7 -0
- package/hmu/images/countries/by.svg +61 -0
- package/hmu/images/countries/bz.svg +146 -0
- package/hmu/images/countries/ca.svg +4 -0
- package/hmu/images/countries/cc.svg +19 -0
- package/hmu/images/countries/cd.svg +5 -0
- package/hmu/images/countries/cf.svg +15 -0
- package/hmu/images/countries/cg.svg +12 -0
- package/hmu/images/countries/ch.svg +9 -0
- package/hmu/images/countries/ci.svg +7 -0
- package/hmu/images/countries/ck.svg +9 -0
- package/hmu/images/countries/cl.svg +13 -0
- package/hmu/images/countries/cm.svg +15 -0
- package/hmu/images/countries/cn.svg +11 -0
- package/hmu/images/countries/co.svg +7 -0
- package/hmu/images/countries/cr.svg +7 -0
- package/hmu/images/countries/cu.svg +13 -0
- package/hmu/images/countries/cv.svg +13 -0
- package/hmu/images/countries/cw.svg +14 -0
- package/hmu/images/countries/cx.svg +15 -0
- package/hmu/images/countries/cy.svg +6 -0
- package/hmu/images/countries/cz.svg +12 -0
- package/hmu/images/countries/de.svg +5 -0
- package/hmu/images/countries/dj.svg +13 -0
- package/hmu/images/countries/dk.svg +5 -0
- package/hmu/images/countries/dm.svg +152 -0
- package/hmu/images/countries/do.svg +6745 -0
- package/hmu/images/countries/dz.svg +5 -0
- package/hmu/images/countries/ec.svg +141 -0
- package/hmu/images/countries/ee.svg +7 -0
- package/hmu/images/countries/eg.svg +38 -0
- package/hmu/images/countries/eh.svg +15 -0
- package/hmu/images/countries/er.svg +8 -0
- package/hmu/images/countries/es-ct.svg +4 -0
- package/hmu/images/countries/es.svg +581 -0
- package/hmu/images/countries/et.svg +14 -0
- package/hmu/images/countries/eu.svg +28 -0
- package/hmu/images/countries/fi.svg +5 -0
- package/hmu/images/countries/fj.svg +124 -0
- package/hmu/images/countries/fk.svg +90 -0
- package/hmu/images/countries/fm.svg +11 -0
- package/hmu/images/countries/fo.svg +12 -0
- package/hmu/images/countries/fr.svg +7 -0
- package/hmu/images/countries/ga.svg +7 -0
- package/hmu/images/countries/gb-eng.svg +5 -0
- package/hmu/images/countries/gb-nir.svg +137 -0
- package/hmu/images/countries/gb-sct.svg +4 -0
- package/hmu/images/countries/gb-wls.svg +9 -0
- package/hmu/images/countries/gb.svg +15 -0
- package/hmu/images/countries/gd.svg +27 -0
- package/hmu/images/countries/ge.svg +6 -0
- package/hmu/images/countries/gf.svg +5 -0
- package/hmu/images/countries/gg.svg +9 -0
- package/hmu/images/countries/gh.svg +6 -0
- package/hmu/images/countries/gi.svg +33 -0
- package/hmu/images/countries/gl.svg +4 -0
- package/hmu/images/countries/gm.svg +14 -0
- package/hmu/images/countries/gn.svg +7 -0
- package/hmu/images/countries/gp.svg +7 -0
- package/hmu/images/countries/gq.svg +23 -0
- package/hmu/images/countries/gr.svg +22 -0
- package/hmu/images/countries/gs.svg +205 -0
- package/hmu/images/countries/gt.svg +204 -0
- package/hmu/images/countries/gu.svg +39 -0
- package/hmu/images/countries/gw.svg +13 -0
- package/hmu/images/countries/gy.svg +9 -0
- package/hmu/images/countries/hk.svg +32 -0
- package/hmu/images/countries/hm.svg +9 -0
- package/hmu/images/countries/hn.svg +18 -0
- package/hmu/images/countries/hr.svg +59 -0
- package/hmu/images/countries/ht.svg +122 -0
- package/hmu/images/countries/hu.svg +7 -0
- package/hmu/images/countries/id.svg +6 -0
- package/hmu/images/countries/ie.svg +7 -0
- package/hmu/images/countries/il.svg +14 -0
- package/hmu/images/countries/im.svg +36 -0
- package/hmu/images/countries/in.svg +25 -0
- package/hmu/images/countries/io.svg +148 -0
- package/hmu/images/countries/iq.svg +10 -0
- package/hmu/images/countries/ir.svg +219 -0
- package/hmu/images/countries/is.svg +12 -0
- package/hmu/images/countries/it.svg +7 -0
- package/hmu/images/countries/je.svg +32 -0
- package/hmu/images/countries/jm.svg +8 -0
- package/hmu/images/countries/jo.svg +16 -0
- package/hmu/images/countries/jp.svg +11 -0
- package/hmu/images/countries/ke.svg +23 -0
- package/hmu/images/countries/kg.svg +15 -0
- package/hmu/images/countries/kh.svg +69 -0
- package/hmu/images/countries/ki.svg +36 -0
- package/hmu/images/countries/km.svg +16 -0
- package/hmu/images/countries/kn.svg +14 -0
- package/hmu/images/countries/kp.svg +15 -0
- package/hmu/images/countries/kr.svg +24 -0
- package/hmu/images/countries/kw.svg +13 -0
- package/hmu/images/countries/ky.svg +63 -0
- package/hmu/images/countries/kz.svg +23 -0
- package/hmu/images/countries/la.svg +12 -0
- package/hmu/images/countries/lb.svg +15 -0
- package/hmu/images/countries/lc.svg +8 -0
- package/hmu/images/countries/li.svg +43 -0
- package/hmu/images/countries/lk.svg +22 -0
- package/hmu/images/countries/lr.svg +14 -0
- package/hmu/images/countries/ls.svg +8 -0
- package/hmu/images/countries/lt.svg +7 -0
- package/hmu/images/countries/lu.svg +5 -0
- package/hmu/images/countries/lv.svg +6 -0
- package/hmu/images/countries/ly.svg +13 -0
- package/hmu/images/countries/ma.svg +4 -0
- package/hmu/images/countries/mc.svg +6 -0
- package/hmu/images/countries/md.svg +72 -0
- package/hmu/images/countries/me.svg +118 -0
- package/hmu/images/countries/mf.svg +7 -0
- package/hmu/images/countries/mg.svg +7 -0
- package/hmu/images/countries/mh.svg +7 -0
- package/hmu/images/countries/mk.svg +5 -0
- package/hmu/images/countries/ml.svg +7 -0
- package/hmu/images/countries/mm.svg +16 -0
- package/hmu/images/countries/mn.svg +13 -0
- package/hmu/images/countries/mo.svg +9 -0
- package/hmu/images/countries/mp.svg +86 -0
- package/hmu/images/countries/mq.svg +7 -0
- package/hmu/images/countries/mr.svg +6 -0
- package/hmu/images/countries/ms.svg +39 -0
- package/hmu/images/countries/mt.svg +49 -0
- package/hmu/images/countries/mu.svg +8 -0
- package/hmu/images/countries/mv.svg +6 -0
- package/hmu/images/countries/mw.svg +10 -0
- package/hmu/images/countries/mx.svg +385 -0
- package/hmu/images/countries/my.svg +15 -0
- package/hmu/images/countries/mz.svg +21 -0
- package/hmu/images/countries/na.svg +16 -0
- package/hmu/images/countries/nc.svg +7 -0
- package/hmu/images/countries/ne.svg +6 -0
- package/hmu/images/countries/nf.svg +9 -0
- package/hmu/images/countries/ng.svg +6 -0
- package/hmu/images/countries/ni.svg +131 -0
- package/hmu/images/countries/nl.svg +7 -0
- package/hmu/images/countries/no.svg +7 -0
- package/hmu/images/countries/np.svg +14 -0
- package/hmu/images/countries/nr.svg +12 -0
- package/hmu/images/countries/nu.svg +26 -0
- package/hmu/images/countries/nz.svg +41 -0
- package/hmu/images/countries/om.svg +116 -0
- package/hmu/images/countries/pa.svg +14 -0
- package/hmu/images/countries/pe.svg +279 -0
- package/hmu/images/countries/pf.svg +19 -0
- package/hmu/images/countries/pg.svg +9 -0
- package/hmu/images/countries/ph.svg +28 -0
- package/hmu/images/countries/pk.svg +15 -0
- package/hmu/images/countries/pl.svg +6 -0
- package/hmu/images/countries/pm.svg +7 -0
- package/hmu/images/countries/pn.svg +62 -0
- package/hmu/images/countries/pr.svg +13 -0
- package/hmu/images/countries/ps.svg +15 -0
- package/hmu/images/countries/pt.svg +57 -0
- package/hmu/images/countries/pw.svg +11 -0
- package/hmu/images/countries/py.svg +157 -0
- package/hmu/images/countries/qa.svg +4 -0
- package/hmu/images/countries/re.svg +7 -0
- package/hmu/images/countries/ro.svg +7 -0
- package/hmu/images/countries/rs.svg +292 -0
- package/hmu/images/countries/ru.svg +7 -0
- package/hmu/images/countries/rw.svg +13 -0
- package/hmu/images/countries/sa.svg +26 -0
- package/hmu/images/countries/sb.svg +13 -0
- package/hmu/images/countries/sc.svg +14 -0
- package/hmu/images/countries/sd.svg +13 -0
- package/hmu/images/countries/se.svg +16 -0
- package/hmu/images/countries/sg.svg +13 -0
- package/hmu/images/countries/sh.svg +74 -0
- package/hmu/images/countries/si.svg +18 -0
- package/hmu/images/countries/sj.svg +7 -0
- package/hmu/images/countries/sk.svg +9 -0
- package/hmu/images/countries/sl.svg +7 -0
- package/hmu/images/countries/sm.svg +91 -0
- package/hmu/images/countries/sn.svg +8 -0
- package/hmu/images/countries/so.svg +11 -0
- package/hmu/images/countries/sr.svg +6 -0
- package/hmu/images/countries/ss.svg +8 -0
- package/hmu/images/countries/st.svg +16 -0
- package/hmu/images/countries/sv.svg +618 -0
- package/hmu/images/countries/sx.svg +56 -0
- package/hmu/images/countries/sy.svg +6 -0
- package/hmu/images/countries/sz.svg +45 -0
- package/hmu/images/countries/tc.svg +67 -0
- package/hmu/images/countries/td.svg +7 -0
- package/hmu/images/countries/tf.svg +15 -0
- package/hmu/images/countries/tg.svg +14 -0
- package/hmu/images/countries/th.svg +7 -0
- package/hmu/images/countries/tj.svg +22 -0
- package/hmu/images/countries/tk.svg +5 -0
- package/hmu/images/countries/tl.svg +13 -0
- package/hmu/images/countries/tm.svg +213 -0
- package/hmu/images/countries/tn.svg +13 -0
- package/hmu/images/countries/to.svg +10 -0
- package/hmu/images/countries/tr.svg +8 -0
- package/hmu/images/countries/tt.svg +5 -0
- package/hmu/images/countries/tv.svg +27 -0
- package/hmu/images/countries/tw.svg +14 -0
- package/hmu/images/countries/tz.svg +13 -0
- package/hmu/images/countries/ua.svg +6 -0
- package/hmu/images/countries/ug.svg +30 -0
- package/hmu/images/countries/um.svg +23 -0
- package/hmu/images/countries/un.svg +16 -0
- package/hmu/images/countries/us.svg +12 -0
- package/hmu/images/countries/uy.svg +28 -0
- package/hmu/images/countries/uz.svg +30 -0
- package/hmu/images/countries/va.svg +483 -0
- package/hmu/images/countries/vc.svg +8 -0
- package/hmu/images/countries/ve.svg +26 -0
- package/hmu/images/countries/vg.svg +133 -0
- package/hmu/images/countries/vi.svg +31 -0
- package/hmu/images/countries/vn.svg +11 -0
- package/hmu/images/countries/vu.svg +18 -0
- package/hmu/images/countries/wf.svg +7 -0
- package/hmu/images/countries/ws.svg +7 -0
- package/hmu/images/countries/ye.svg +7 -0
- package/hmu/images/countries/yt.svg +7 -0
- package/hmu/images/countries/za.svg +17 -0
- package/hmu/images/countries/zm.svg +27 -0
- package/hmu/images/countries/zw.svg +21 -0
- package/hmu/images/hipay-white-logo.svg +42 -0
- package/hmu/images/logo_visa_75wx45h.gif +0 -0
- package/hmu/images/map_marker.svg +8 -0
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +8 -5
- package/styles/createHiMuiTheme.js +13 -0
- package/umd/hipay-material-ui.development.js +12997 -11186
- package/umd/hipay-material-ui.production.min.js +5 -5
- package/utils/hiHelpers.js +9 -7
@@ -28,6 +28,10 @@ export const styles = theme => ({
|
|
28
28
|
lookedUp: {
|
29
29
|
background: `linear-gradient(0deg, transparent 25%, #FFFF8D 10%, #FFFF8D 75%, transparent 30%)`,
|
30
30
|
borderRadius: '45%'
|
31
|
+
},
|
32
|
+
pins: {
|
33
|
+
position: 'relative',
|
34
|
+
top: 3
|
31
35
|
}
|
32
36
|
});
|
33
37
|
|
@@ -57,34 +61,35 @@ class CellLayout extends React.Component {
|
|
57
61
|
const {
|
58
62
|
classes, type, children,
|
59
63
|
align = cst.ALIGN_RIGHT_TYPES.includes(type) ? 'right' : 'left',
|
60
|
-
view, dense, width = cst.DEFAULT_WIDTHS[type][view],
|
61
|
-
selectable, selected, onSelect, childrenCount, theme, padding,
|
64
|
+
view, dense, width = cst.DEFAULT_WIDTHS[type][view], fixedColumnWidth, sticky,
|
65
|
+
selectable, selected, onSelect, childrenCount, detailInfos, onOpenDetails, theme, padding,
|
62
66
|
lookedUp
|
63
67
|
} = this.props;
|
64
68
|
|
65
|
-
|
69
|
+
const offset = selectable ? dense ? 32 : 40 : 0;
|
66
70
|
|
67
71
|
// Inclus le padding et/ou la checkbox dans la largeur de la cellule
|
68
|
-
|
72
|
+
const _width = width + offset + (selectable ? padding : 2 * padding);
|
69
73
|
|
70
74
|
const lookedUpClassName = classNames(classes.flexContent, { [classes.lookedUp]: lookedUp });
|
71
75
|
|
76
|
+
const cellStyle = {
|
77
|
+
zIndex: sticky ? 12 : 11,
|
78
|
+
textAlign: align,
|
79
|
+
position: sticky ? 'relative' : 'inherit',
|
80
|
+
border: 'none',
|
81
|
+
height: dense ? cst.CELL_HEIGHT_DENSE : cst.CELL_HEIGHT
|
82
|
+
};
|
83
|
+
|
84
|
+
if (fixedColumnWidth) {
|
85
|
+
cellStyle.maxWidth = _width;
|
86
|
+
cellStyle.minWidth = _width;
|
87
|
+
cellStyle.width = _width;
|
88
|
+
}
|
89
|
+
|
72
90
|
return React.createElement(
|
73
91
|
TableCell,
|
74
|
-
{
|
75
|
-
className: classes.root,
|
76
|
-
style: {
|
77
|
-
maxWidth: _width,
|
78
|
-
minWidth: _width,
|
79
|
-
width: _width,
|
80
|
-
// la cellule sticky doit être au dessus des autres cellules du body
|
81
|
-
zIndex: sticky ? 12 : 11,
|
82
|
-
textAlign: align,
|
83
|
-
position: sticky ? 'relative' : 'inherit',
|
84
|
-
border: 'none',
|
85
|
-
height: dense ? cst.CELL_HEIGHT_DENSE : cst.CELL_HEIGHT
|
86
|
-
}
|
87
|
-
},
|
92
|
+
{ className: classes.root, style: cellStyle },
|
88
93
|
!!selectable && React.createElement(HiCheckbox, {
|
89
94
|
classes: { root: classes.checkbox },
|
90
95
|
style: { margin: dense ? 6 : 10 },
|
@@ -115,9 +120,25 @@ class CellLayout extends React.Component {
|
|
115
120
|
},
|
116
121
|
React.createElement(
|
117
122
|
HiPins,
|
118
|
-
{ color: theme.palette.business.primary.normal },
|
123
|
+
{ color: theme.palette.business.primary.normal, className: classes.pins },
|
119
124
|
childrenCount
|
120
125
|
)
|
126
|
+
),
|
127
|
+
detailInfos && React.createElement(
|
128
|
+
'div',
|
129
|
+
{
|
130
|
+
style: {
|
131
|
+
position: 'absolute',
|
132
|
+
top: dense ? 2 : 6,
|
133
|
+
right: 0
|
134
|
+
},
|
135
|
+
onClick: onOpenDetails
|
136
|
+
},
|
137
|
+
React.createElement(
|
138
|
+
HiPins,
|
139
|
+
{ color: theme.palette.business.secondary.normal, className: classes.pins },
|
140
|
+
detailInfos.total
|
141
|
+
)
|
121
142
|
)
|
122
143
|
)
|
123
144
|
);
|
@@ -129,9 +150,10 @@ CellLayout.defaultProps = {
|
|
129
150
|
selectable: false,
|
130
151
|
selected: false,
|
131
152
|
dense: false,
|
132
|
-
|
153
|
+
fixedColumnWidth: true,
|
133
154
|
sticky: false,
|
134
|
-
padding: 8
|
155
|
+
padding: 8,
|
156
|
+
detailInfos: null
|
135
157
|
};
|
136
158
|
CellLayout.propTypes = process.env.NODE_ENV !== "production" ? {
|
137
159
|
/**
|
@@ -146,6 +168,10 @@ CellLayout.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
146
168
|
* Densité, défini la hauteur de la ligne
|
147
169
|
*/
|
148
170
|
dense: PropTypes.bool,
|
171
|
+
/**
|
172
|
+
* Ajoute un Chip affichant le nombre de ligne de détails de la ligne et permettant de les affichés via onOpenDetails
|
173
|
+
*/
|
174
|
+
detailInfos: PropTypes.object,
|
149
175
|
/**
|
150
176
|
* Recherche lookup sur cette colonne
|
151
177
|
*/
|
@@ -161,11 +187,12 @@ CellLayout.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
161
187
|
/**
|
162
188
|
* Largeur de la cellule (hors padding), est déduit de view par défaut
|
163
189
|
*/
|
164
|
-
width: PropTypes.number,
|
190
|
+
width: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
165
191
|
/**
|
166
|
-
*
|
192
|
+
* Fixe la taille des colonnes selon le type de vue
|
193
|
+
* Sinon les colonnes s'adaptent à l'espace disponible
|
167
194
|
*/
|
168
|
-
|
195
|
+
fixedColumnWidth: PropTypes.bool,
|
169
196
|
/**
|
170
197
|
* Title alignement, est déduit de type par défaut
|
171
198
|
*/
|
@@ -18,7 +18,7 @@ export const styles = theme => ({
|
|
18
18
|
class CellNumeric extends React.PureComponent {
|
19
19
|
|
20
20
|
render() {
|
21
|
-
const { classes, value, locale, currency, view } = this.props;
|
21
|
+
const { classes, value, locale, currency, view, precision } = this.props;
|
22
22
|
|
23
23
|
let displayedValue = '';
|
24
24
|
let titleValue = '';
|
@@ -31,7 +31,7 @@ class CellNumeric extends React.PureComponent {
|
|
31
31
|
titleValue = formatCurrencyAmount(value, cst.VIEWS.LARGE, locale, currency);
|
32
32
|
}
|
33
33
|
} else {
|
34
|
-
displayedValue = formatNumber(value, view, locale);
|
34
|
+
displayedValue = formatNumber(value, view, locale, precision);
|
35
35
|
}
|
36
36
|
|
37
37
|
return React.createElement(
|
@@ -63,6 +63,10 @@ CellNumeric.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
63
63
|
* Code de la devise (ISO 4217)
|
64
64
|
*/
|
65
65
|
currency: PropTypes.string,
|
66
|
+
/**
|
67
|
+
* Nombre de chiffres après la virgule
|
68
|
+
*/
|
69
|
+
precision: PropTypes.number,
|
66
70
|
/**
|
67
71
|
* View (L/M/S)
|
68
72
|
*/
|
@@ -5,15 +5,18 @@ import HiColoredLabel from '../../HiColoredLabel';
|
|
5
5
|
import { withStyles } from '../../styles';
|
6
6
|
import * as cst from '../constants';
|
7
7
|
|
8
|
-
export const styles =
|
8
|
+
export const styles = {
|
9
9
|
smartDecision: {
|
10
10
|
display: 'inline-block',
|
11
11
|
minWidth: 18
|
12
12
|
},
|
13
13
|
label: {
|
14
14
|
marginLeft: 2
|
15
|
+
},
|
16
|
+
nowrap: {
|
17
|
+
whiteSpace: 'nowrap'
|
15
18
|
}
|
16
|
-
}
|
19
|
+
};
|
17
20
|
|
18
21
|
/**
|
19
22
|
* Cette cellule permet d'afficher le résultat de Sentinel (score & fraudResult & smartDecision)
|
@@ -21,7 +24,7 @@ export const styles = theme => ({
|
|
21
24
|
class CellSentinel extends React.PureComponent {
|
22
25
|
|
23
26
|
constructor(props) {
|
24
|
-
super();
|
27
|
+
super(props);
|
25
28
|
|
26
29
|
this.getColorFromFraudResult = this.getColorFromFraudResult.bind(this);
|
27
30
|
}
|
@@ -66,7 +69,8 @@ class CellSentinel extends React.PureComponent {
|
|
66
69
|
fraudResult,
|
67
70
|
automaticFraudReviewResult,
|
68
71
|
pendingManualAction,
|
69
|
-
smartDecision
|
72
|
+
smartDecision,
|
73
|
+
hideFraudResult
|
70
74
|
} = this.props;
|
71
75
|
|
72
76
|
const scoreLabel = score > 0 ? `+${score}` : `${score}`;
|
@@ -76,17 +80,17 @@ class CellSentinel extends React.PureComponent {
|
|
76
80
|
null,
|
77
81
|
React.createElement(
|
78
82
|
'div',
|
79
|
-
|
83
|
+
{ className: classes.nowrap },
|
80
84
|
scoreLabel
|
81
85
|
),
|
82
86
|
React.createElement(
|
83
87
|
'div',
|
84
|
-
|
88
|
+
{ className: classes.nowrap },
|
85
89
|
fraudResult
|
86
90
|
),
|
87
91
|
!!smartDecision && automaticFraudReviewResult && React.createElement(
|
88
92
|
'div',
|
89
|
-
|
93
|
+
{ className: classes.nowrap },
|
90
94
|
'SD: ',
|
91
95
|
automaticFraudReviewResult
|
92
96
|
)
|
@@ -97,14 +101,14 @@ class CellSentinel extends React.PureComponent {
|
|
97
101
|
{ title: tooltipContent, placement: this.props.sticky ? 'right' : 'bottom' },
|
98
102
|
React.createElement(
|
99
103
|
'div',
|
100
|
-
|
104
|
+
{ style: { textAlign: 'right' } },
|
101
105
|
React.createElement(HiColoredLabel, {
|
102
106
|
label: scoreLabel,
|
103
107
|
color: this.getColorFromFraudResult(fraudResult.toLowerCase()),
|
104
108
|
classes: { root: classes.label },
|
105
109
|
active: pendingManualAction
|
106
110
|
}),
|
107
|
-
React.createElement(HiColoredLabel, {
|
111
|
+
!hideFraudResult && React.createElement(HiColoredLabel, {
|
108
112
|
label: fraudResult.toUpperCase().substr(0, 1),
|
109
113
|
color: this.getColorFromFraudResult(fraudResult),
|
110
114
|
classes: { root: classes.label },
|
@@ -124,6 +128,9 @@ class CellSentinel extends React.PureComponent {
|
|
124
128
|
}
|
125
129
|
}
|
126
130
|
|
131
|
+
CellSentinel.defaultProps = {
|
132
|
+
hideFraudResult: false
|
133
|
+
};
|
127
134
|
CellSentinel.propTypes = process.env.NODE_ENV !== "production" ? {
|
128
135
|
/**
|
129
136
|
* Résultat de l'automaticFraudReview si la transaction est passée par SmartDecision
|
@@ -137,6 +144,10 @@ CellSentinel.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
137
144
|
* Résultat de la fraude
|
138
145
|
*/
|
139
146
|
fraudResult: PropTypes.string.isRequired,
|
147
|
+
/**
|
148
|
+
* Si true le fraudResult ne sera pas affiché
|
149
|
+
*/
|
150
|
+
hideFraudResult: PropTypes.bool.isRequired,
|
140
151
|
/**
|
141
152
|
* Signal qu'il attend une réponse manuelle
|
142
153
|
*/
|
@@ -11,6 +11,10 @@ export const styles = theme => ({
|
|
11
11
|
display: 'inline-flex',
|
12
12
|
alignItems: 'baseline',
|
13
13
|
maxWidth: 'calc(100% - 36px)'
|
14
|
+
},
|
15
|
+
pins: {
|
16
|
+
position: 'relative',
|
17
|
+
bottom: 1
|
14
18
|
}
|
15
19
|
});
|
16
20
|
|
@@ -33,7 +37,7 @@ class CellStatus extends React.PureComponent {
|
|
33
37
|
React.createElement(HiColoredLabel, { label: value, color: color }),
|
34
38
|
React.createElement(
|
35
39
|
HiPins,
|
36
|
-
{ color: color, onClick: onOpenDetails },
|
40
|
+
{ color: color, onClick: onOpenDetails, className: classes.pins },
|
37
41
|
nbOperations
|
38
42
|
)
|
39
43
|
) : React.createElement(HiColoredLabel, { label: value, color: color })
|
@@ -56,11 +60,11 @@ CellStatus.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
56
60
|
/**
|
57
61
|
* Nombre d'opérations financières
|
58
62
|
*/
|
59
|
-
nbOperations: PropTypes.number
|
63
|
+
nbOperations: PropTypes.number,
|
60
64
|
/**
|
61
65
|
* Statut courant de la transaction
|
62
66
|
*/
|
63
|
-
value: PropTypes.string.isRequired,
|
67
|
+
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
|
64
68
|
/**
|
65
69
|
* Code du statut courant de la transaction (détermine la couleur du label)
|
66
70
|
*/
|
@@ -2,17 +2,19 @@
|
|
2
2
|
|
3
3
|
import React from 'react';
|
4
4
|
import PropTypes from 'prop-types';
|
5
|
-
|
6
|
-
import Tooltip from '../../Tooltip';
|
7
|
-
import { withStyles, withTheme } from '../../styles';
|
8
5
|
import { Lock, LockOpen, LockOpenOutline } from 'mdi-material-ui';
|
6
|
+
import Tooltip from '../../Tooltip';
|
7
|
+
import { withStyles } from '../../styles';
|
9
8
|
|
10
|
-
export const styles =
|
9
|
+
export const styles = {
|
11
10
|
icon: {
|
12
11
|
width: 18,
|
13
12
|
height: 18
|
13
|
+
},
|
14
|
+
nowrap: {
|
15
|
+
whiteSpace: 'nowrap'
|
14
16
|
}
|
15
|
-
}
|
17
|
+
};
|
16
18
|
|
17
19
|
/**
|
18
20
|
* Cette cellule permet d'afficher une icône représentant le statut du 3DS.
|
@@ -20,8 +22,7 @@ export const styles = theme => ({
|
|
20
22
|
class CellThirdPartySecurity extends React.PureComponent {
|
21
23
|
|
22
24
|
render() {
|
23
|
-
const { classes, theme,
|
24
|
-
|
25
|
+
const { classes, theme, label, value } = this.props;
|
25
26
|
const ECI_5 = 0; // authenticated
|
26
27
|
const ECI_6 = 1; // cardholder not enrolled
|
27
28
|
const ECI_7 = 2; //
|
@@ -30,28 +31,47 @@ class CellThirdPartySecurity extends React.PureComponent {
|
|
30
31
|
const AUTH_2 = 5; // force 3DS
|
31
32
|
|
32
33
|
let icon = null;
|
33
|
-
switch (
|
34
|
+
switch (value) {
|
34
35
|
case ECI_5:
|
35
|
-
icon = React.createElement(Lock, {
|
36
|
+
icon = React.createElement(Lock, {
|
37
|
+
className: classes.icon,
|
38
|
+
style: { color: theme.palette.positive.normal }
|
39
|
+
});
|
36
40
|
break;
|
37
41
|
case ECI_6:
|
38
|
-
icon = React.createElement(LockOpen, {
|
42
|
+
icon = React.createElement(LockOpen, {
|
43
|
+
className: classes.icon,
|
44
|
+
style: { color: theme.palette.middle.normal }
|
45
|
+
});
|
39
46
|
break;
|
40
47
|
case AUTH_1:
|
41
|
-
icon = React.createElement(LockOpenOutline, {
|
48
|
+
icon = React.createElement(LockOpenOutline, {
|
49
|
+
className: classes.icon,
|
50
|
+
style: { color: theme.palette.neutral.light }
|
51
|
+
});
|
42
52
|
break;
|
43
53
|
case AUTH_2:
|
44
|
-
icon = React.createElement(LockOpen, {
|
54
|
+
icon = React.createElement(LockOpen, {
|
55
|
+
className: classes.icon,
|
56
|
+
style: { color: theme.palette.neutral.light }
|
57
|
+
});
|
45
58
|
break;
|
46
59
|
case ECI_7:
|
47
60
|
case AUTH_0:
|
61
|
+
default:
|
48
62
|
icon = null;
|
49
63
|
break;
|
50
64
|
}
|
51
65
|
|
66
|
+
const tooltipContent = React.createElement(
|
67
|
+
'div',
|
68
|
+
{ className: classes.nowrap },
|
69
|
+
label
|
70
|
+
);
|
71
|
+
|
52
72
|
return React.createElement(
|
53
73
|
Tooltip,
|
54
|
-
{ title:
|
74
|
+
{ title: tooltipContent, placement: this.props.sticky ? 'right' : 'bottom' },
|
55
75
|
React.createElement(
|
56
76
|
'div',
|
57
77
|
null,
|
@@ -66,6 +86,14 @@ CellThirdPartySecurity.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
66
86
|
* Useful to extend the style applied to components.
|
67
87
|
*/
|
68
88
|
classes: PropTypes.object,
|
89
|
+
/**
|
90
|
+
* Label
|
91
|
+
*/
|
92
|
+
label: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
93
|
+
/**
|
94
|
+
* True si la colonne est sticky
|
95
|
+
*/
|
96
|
+
sticky: PropTypes.bool,
|
69
97
|
/**
|
70
98
|
* Useful to extend the theme applied to components.
|
71
99
|
* Used theme props positive.normal, middle.normal, neutral.light
|
@@ -80,10 +108,6 @@ CellThirdPartySecurity.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
80
108
|
* AUTH_1 = 4; // ask for 3DS
|
81
109
|
* AUTH_2 = 5; // force 3DS
|
82
110
|
*/
|
83
|
-
|
84
|
-
/**
|
85
|
-
* Label
|
86
|
-
*/
|
87
|
-
value: PropTypes.string
|
111
|
+
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string])
|
88
112
|
} : {};
|
89
113
|
export default withStyles(styles, { withTheme: true, name: 'HmuiCellThirdPartySecurity' })(CellThirdPartySecurity);
|
package/es/HiTable/BodyRow.js
CHANGED
@@ -50,6 +50,10 @@ class BodyRow extends React.PureComponent {
|
|
50
50
|
constructor(props) {
|
51
51
|
super();
|
52
52
|
|
53
|
+
this.handleOpenRowDetails = type => () => {
|
54
|
+
this.props.onOpenRowDetails(this.props.row.rowId, type);
|
55
|
+
};
|
56
|
+
|
53
57
|
this.state = {
|
54
58
|
live: props.live,
|
55
59
|
style: {
|
@@ -97,10 +101,6 @@ class BodyRow extends React.PureComponent {
|
|
97
101
|
}
|
98
102
|
}
|
99
103
|
|
100
|
-
handleOpenRowDetails() {
|
101
|
-
this.props.onOpenRowDetails(this.props.row.rowId);
|
102
|
-
}
|
103
|
-
|
104
104
|
handleSelect() {
|
105
105
|
this.props.onSelect(this.props.row);
|
106
106
|
}
|
@@ -112,6 +112,7 @@ class BodyRow extends React.PureComponent {
|
|
112
112
|
theme,
|
113
113
|
row,
|
114
114
|
columns,
|
115
|
+
lookupColumns,
|
115
116
|
orderedColumns,
|
116
117
|
selectable,
|
117
118
|
selected,
|
@@ -122,13 +123,13 @@ class BodyRow extends React.PureComponent {
|
|
122
123
|
numberLocale,
|
123
124
|
sticky,
|
124
125
|
innerRow,
|
125
|
-
isDetail
|
126
|
+
isDetail,
|
127
|
+
detailRowsOptions
|
126
128
|
} = _props,
|
127
|
-
other = _objectWithoutProperties(_props, ['classes', 'theme', 'row', 'columns', 'orderedColumns', 'selectable', 'selected', 'onClick', 'view', 'dense', 'dateLocale', 'numberLocale', 'sticky', 'innerRow', 'isDetail']);
|
129
|
+
other = _objectWithoutProperties(_props, ['classes', 'theme', 'row', 'columns', 'lookupColumns', 'orderedColumns', 'selectable', 'selected', 'onClick', 'view', 'dense', 'dateLocale', 'numberLocale', 'sticky', 'innerRow', 'isDetail', 'detailRowsOptions']);
|
128
130
|
|
129
131
|
const { style } = this.state;
|
130
132
|
|
131
|
-
let firstCol = true;
|
132
133
|
let unfixedCol = true;
|
133
134
|
|
134
135
|
const rowStyle = _extends({}, style, {
|
@@ -143,6 +144,19 @@ class BodyRow extends React.PureComponent {
|
|
143
144
|
// If there is no datas don't display the row
|
144
145
|
if (!row.hasOwnProperty('datas')) return false;
|
145
146
|
|
147
|
+
let detailsInfos = {};
|
148
|
+
if (row.details && row.details.length > 0) {
|
149
|
+
detailsInfos = row.details.reduce((memo, item) => {
|
150
|
+
if (item.rows.length > 0 && detailRowsOptions[item.type] && detailRowsOptions[item.type].anchor) {
|
151
|
+
memo[detailRowsOptions[item.type].anchor] = _extends({
|
152
|
+
type: item.type,
|
153
|
+
total: item.rows.length
|
154
|
+
}, detailRowsOptions[item.type]);
|
155
|
+
}
|
156
|
+
return memo;
|
157
|
+
}, {});
|
158
|
+
}
|
159
|
+
|
146
160
|
return React.createElement(
|
147
161
|
TableRow,
|
148
162
|
{
|
@@ -160,65 +174,85 @@ class BodyRow extends React.PureComponent {
|
|
160
174
|
key: `${row.rowId}-left-cell`,
|
161
175
|
className: patchDivClass
|
162
176
|
}),
|
163
|
-
orderedColumns.map(colRef => {
|
164
|
-
|
177
|
+
orderedColumns.map((colRef, index) => {
|
178
|
+
|
179
|
+
// Dynamic column settings (from OrderColumns)
|
180
|
+
const {
|
181
|
+
colId: colRefId,
|
182
|
+
displayed,
|
183
|
+
view: colView
|
184
|
+
} = colRef,
|
165
185
|
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];
|
182
186
|
|
183
|
-
|
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;
|
187
|
+
if (displayed === false) return null;
|
186
188
|
|
187
|
-
|
188
|
-
|
189
|
-
unfixedCol = unfixedCol && fixedWidth !== true ? false : unfixedCol;
|
189
|
+
// the first column is sticky (except checkbox)
|
190
|
+
const first = index === 0;
|
190
191
|
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
192
|
+
// Static column settings
|
193
|
+
const _columns$colRefId = columns[colRefId],
|
194
|
+
{
|
195
|
+
colId,
|
196
|
+
align,
|
197
|
+
data: colData,
|
198
|
+
ellipsis,
|
199
|
+
fixedWidth,
|
200
|
+
type,
|
201
|
+
width
|
202
|
+
} = _columns$colRefId,
|
203
|
+
columnProps = _objectWithoutProperties(_columns$colRefId, ['colId', 'align', 'data', 'ellipsis', 'fixedWidth', 'type', 'width']);
|
204
|
+
|
205
|
+
// view define in OrderColumn or table prop view by default
|
206
|
+
const effectiveView = colView || view;
|
195
207
|
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
onOpenDetails: this.handleOpenRowDetails,
|
216
|
-
childrenCount: isParentAnchor ? row.children.length : null,
|
217
|
-
colId: colId,
|
218
|
-
lookedUp: lookedUp
|
219
|
-
}, columnProps, colRefProps));
|
208
|
+
// add clickable badge in cell to open children
|
209
|
+
const isParentAnchor = row.hasOwnProperty('parentAnchorColumn') && row.parentAnchorColumn === colId && row.hasOwnProperty('children') && row.children.length > 0;
|
210
|
+
|
211
|
+
// the first non fixed column is the only one not fixed
|
212
|
+
const unfixed = unfixedCol && fixedWidth !== true;
|
213
|
+
unfixedCol = unfixed ? false : unfixedCol;
|
214
|
+
|
215
|
+
// add lookedUp style
|
216
|
+
const lookedUp = Array.isArray(lookupColumns) && lookupColumns.includes(colId);
|
217
|
+
|
218
|
+
// Cell data
|
219
|
+
let data = row.datas[colRefId];
|
220
|
+
// Get object data for column based on reference datas
|
221
|
+
if (data !== undefined && colData !== undefined) {
|
222
|
+
const colItem = colData.find(item => item.id === data.value);
|
223
|
+
if (colItem) {
|
224
|
+
// Hydrate data object with reference item
|
225
|
+
data = _extends({}, colItem, data);
|
226
|
+
}
|
220
227
|
}
|
221
|
-
|
228
|
+
|
229
|
+
return React.createElement(BodyCellBuilder, _extends({}, other, {
|
230
|
+
key: `${row.rowId}-${colId}-cell`,
|
231
|
+
ukey: `${row.rowId}-${colId}-cell`,
|
232
|
+
checkboxValue: row.rowId,
|
233
|
+
type: type,
|
234
|
+
data: data,
|
235
|
+
ellipsis: ellipsis,
|
236
|
+
align: align,
|
237
|
+
view: effectiveView,
|
238
|
+
padding: cst.DEFAULT_PADDING[view],
|
239
|
+
width: width,
|
240
|
+
fixedWidth: !unfixed,
|
241
|
+
sticky: sticky && first,
|
242
|
+
selectable: selectable && first,
|
243
|
+
dateLocale: dateLocale,
|
244
|
+
numberLocale: numberLocale,
|
245
|
+
dense: dense,
|
246
|
+
selected: selected,
|
247
|
+
onSelect: this.handleSelect
|
248
|
+
}, detailsInfos[colId] && {
|
249
|
+
onOpenDetails: this.handleOpenRowDetails(detailsInfos[colId].type),
|
250
|
+
detailInfos: detailsInfos[colId]
|
251
|
+
}, {
|
252
|
+
childrenCount: isParentAnchor ? row.children.length : null,
|
253
|
+
colId: colId,
|
254
|
+
lookedUp: lookedUp
|
255
|
+
}, columnProps, colRefProps));
|
222
256
|
}),
|
223
257
|
React.createElement(TableCell, {
|
224
258
|
style: {
|
@@ -241,7 +275,9 @@ BodyRow.defaultProps = {
|
|
241
275
|
sticky: false,
|
242
276
|
live: false,
|
243
277
|
innerRow: false,
|
244
|
-
lookupColumns: []
|
278
|
+
lookupColumns: [],
|
279
|
+
fixedColumnWidth: true,
|
280
|
+
detailRowsOptions: {}
|
245
281
|
};
|
246
282
|
BodyRow.propTypes = process.env.NODE_ENV !== "production" ? {
|
247
283
|
/**
|
@@ -252,6 +288,15 @@ BodyRow.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
252
288
|
* Densité d'affichage (joue sur la hauteur des lignes)
|
253
289
|
*/
|
254
290
|
dense: PropTypes.bool,
|
291
|
+
/**
|
292
|
+
* Options utilisées pour décrire le comportement de lignes de détails
|
293
|
+
*/
|
294
|
+
detailRowsOptions: PropTypes.object,
|
295
|
+
/**
|
296
|
+
* Fixe la taille des colonnes selon le type de vue
|
297
|
+
* Sinon les colonnes s'adaptent à l'espace disponible
|
298
|
+
*/
|
299
|
+
fixedColumnWidth: PropTypes.bool,
|
255
300
|
/**
|
256
301
|
* Applique le style d'une ligne intégrée a un sous-tableau
|
257
302
|
*/
|