@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
@@ -0,0 +1,285 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import { withStyles } from '../styles';
|
4
|
+
import HiButton from '../HiButton';
|
5
|
+
import HiIconBuilder from '../utils/HiIconBuilder';
|
6
|
+
import HiLoader from '../HiLoader';
|
7
|
+
|
8
|
+
// The original CSS can be found here : https://unpkg.com/leaflet@1.3.1/dist/leaflet.css
|
9
|
+
export const styles = theme => ({
|
10
|
+
map: {
|
11
|
+
height: '100%',
|
12
|
+
overflow: 'hidden',
|
13
|
+
'& .leaflet-pane, & .leaflet-tile, & .leaflet-marker-icon, & .leaflet-marker-shadow, & .leaflet-tile-container, & .leaflet-pane > svg, & .leaflet-pane > canvas, & .leaflet-zoom-box, & .leaflet-image-layer, & .leaflet-layer': {
|
14
|
+
position: 'absolute',
|
15
|
+
left: 0,
|
16
|
+
top: 0
|
17
|
+
},
|
18
|
+
'& .leaflet-container': {
|
19
|
+
overflow: 'hidden',
|
20
|
+
height: '100%'
|
21
|
+
},
|
22
|
+
'& .leaflet-tile, & .leaflet-marker-icon, & .leaflet-marker-shadow': {
|
23
|
+
'-webkit-user-select': 'none',
|
24
|
+
'-moz-user-select': 'none',
|
25
|
+
userSelect: 'none',
|
26
|
+
'-webkit-user-drag': 'none'
|
27
|
+
},
|
28
|
+
'& .leaflet-control': {
|
29
|
+
display: 'none'
|
30
|
+
},
|
31
|
+
'& .map_marker': {
|
32
|
+
fill: theme.palette.business.primary.normal
|
33
|
+
}
|
34
|
+
},
|
35
|
+
controlButtons: {
|
36
|
+
position: 'absolute',
|
37
|
+
bottom: 16,
|
38
|
+
right: 16
|
39
|
+
},
|
40
|
+
centerIcon: {
|
41
|
+
fontSize: 14
|
42
|
+
},
|
43
|
+
centerButtonContainer: {
|
44
|
+
backgroundColor: theme.palette.business.primary.contrast,
|
45
|
+
borderRadius: 3,
|
46
|
+
padding: 3,
|
47
|
+
boxShadow: '1px 1px 5px rgba(0, 0, 0, .16)',
|
48
|
+
marginBottom: 4,
|
49
|
+
height: 32,
|
50
|
+
minHeight: 32,
|
51
|
+
width: 32,
|
52
|
+
minWidth: 32
|
53
|
+
},
|
54
|
+
centerButton: {
|
55
|
+
color: theme.palette.neutral.normal,
|
56
|
+
padding: '1px !important',
|
57
|
+
height: 26,
|
58
|
+
minHeight: 26,
|
59
|
+
width: 26,
|
60
|
+
minWidth: 26
|
61
|
+
},
|
62
|
+
zoomButtons: {
|
63
|
+
backgroundColor: theme.palette.global.background1,
|
64
|
+
borderRadius: 3,
|
65
|
+
padding: 3,
|
66
|
+
fontFamily: theme.typography.fontFamily,
|
67
|
+
boxShadow: '1px 1px 5px rgba(0, 0, 0, .16)',
|
68
|
+
color: theme.palette.neutral.normal,
|
69
|
+
'&>button:first-child': {
|
70
|
+
borderBottom: `1px solid ${theme.palette.neutral.normal}`
|
71
|
+
}
|
72
|
+
},
|
73
|
+
zoomButton: {
|
74
|
+
paddingTop: '0px !important',
|
75
|
+
paddingBottom: 0,
|
76
|
+
paddingRight: 6,
|
77
|
+
paddingLeft: 6,
|
78
|
+
minWidth: 0,
|
79
|
+
minHeight: 0,
|
80
|
+
borderRadius: 0,
|
81
|
+
display: 'block',
|
82
|
+
fontSize: 24,
|
83
|
+
fontWeight: 'bold',
|
84
|
+
lineHeight: '26px',
|
85
|
+
'&>span': {
|
86
|
+
width: 14
|
87
|
+
}
|
88
|
+
}
|
89
|
+
});
|
90
|
+
|
91
|
+
let L, Map, TileLayer, Marker, Popup;
|
92
|
+
|
93
|
+
var _ref = React.createElement(TileLayer, { url: 'https://{s}.tile.openstreetmap.se/hydda/full/{z}/{x}/{y}.png' });
|
94
|
+
|
95
|
+
var _ref2 = React.createElement(HiLoader, { loading: true });
|
96
|
+
|
97
|
+
class HiMap extends React.PureComponent {
|
98
|
+
|
99
|
+
constructor(props) {
|
100
|
+
super(props);
|
101
|
+
|
102
|
+
this.state = {
|
103
|
+
lat: 0,
|
104
|
+
lng: 0,
|
105
|
+
notFound: false,
|
106
|
+
loaded: false,
|
107
|
+
zoom: 16
|
108
|
+
};
|
109
|
+
|
110
|
+
this.xhr = null;
|
111
|
+
this.handleClickZoomIn = this.handleClickZoomIn.bind(this);
|
112
|
+
this.handleScrollZoom = this.handleScrollZoom.bind(this);
|
113
|
+
this.handleClickZoomOut = this.handleClickZoomOut.bind(this);
|
114
|
+
this.handleCenter = this.handleCenter.bind(this);
|
115
|
+
}
|
116
|
+
|
117
|
+
// Loads the libraries once the component mounted to avoid error caused by server-cli rendering.
|
118
|
+
componentDidMount() {
|
119
|
+
this.findCoords();
|
120
|
+
L = require('leaflet');
|
121
|
+
Map = require('react-leaflet').Map;
|
122
|
+
Popup = require('react-leaflet').Popup;
|
123
|
+
Marker = require('react-leaflet').Marker;
|
124
|
+
TileLayer = require('react-leaflet').TileLayer;
|
125
|
+
}
|
126
|
+
|
127
|
+
// Avoids a warning when cleanup() is called at the end of the test by stopping the async call.
|
128
|
+
componentWillUnmount() {
|
129
|
+
this.xhr.abort();
|
130
|
+
}
|
131
|
+
|
132
|
+
handleScrollZoom(event) {
|
133
|
+
this.setState({ zoom: event.zoom });
|
134
|
+
}
|
135
|
+
|
136
|
+
handleClickZoomIn() {
|
137
|
+
this.setState(prevState => {
|
138
|
+
return { zoom: prevState.zoom + 1 };
|
139
|
+
});
|
140
|
+
}
|
141
|
+
|
142
|
+
handleClickZoomOut() {
|
143
|
+
this.setState(prevState => {
|
144
|
+
return { zoom: prevState.zoom - 1 };
|
145
|
+
});
|
146
|
+
}
|
147
|
+
|
148
|
+
handleCenter() {
|
149
|
+
// trick to center the map.
|
150
|
+
this.setState(prevState => {
|
151
|
+
return { lat: prevState.lat + 0.0000000001 };
|
152
|
+
});
|
153
|
+
}
|
154
|
+
|
155
|
+
// Call to the geocoding API.
|
156
|
+
findCoords() {
|
157
|
+
this.xhr = new XMLHttpRequest();
|
158
|
+
this.xhr.onreadystatechange = () => {
|
159
|
+
if (this.xhr.readyState === XMLHttpRequest.DONE && this.xhr.status === 200) {
|
160
|
+
const response = JSON.parse(this.xhr.responseText);
|
161
|
+
if (response.length === 0) {
|
162
|
+
this.setState({ notFound: true });
|
163
|
+
this.props.onAddressNotFound();
|
164
|
+
} else {
|
165
|
+
this.setState({
|
166
|
+
lat: parseFloat(response[0].lat),
|
167
|
+
lng: parseFloat(response[0].lon),
|
168
|
+
notFound: false,
|
169
|
+
loaded: true
|
170
|
+
});
|
171
|
+
}
|
172
|
+
}
|
173
|
+
};
|
174
|
+
this.xhr.open('GET', `https://nominatim.openstreetmap.org/search?q=${this.props.address}&format=jsonv2&limit=5&bounded=1&dedupe=1&namedetails=1`, true);
|
175
|
+
this.xhr.setRequestHeader('Content-type', 'application/json');
|
176
|
+
this.xhr.send();
|
177
|
+
}
|
178
|
+
|
179
|
+
render() {
|
180
|
+
const { zoom, lng, lat, notFound, loaded } = this.state;
|
181
|
+
|
182
|
+
const { translations, classes } = this.props;
|
183
|
+
|
184
|
+
const position = [lat, lng];
|
185
|
+
|
186
|
+
let element;
|
187
|
+
|
188
|
+
let myIcon;
|
189
|
+
if (notFound) {
|
190
|
+
element = translations.notFound;
|
191
|
+
} else if (loaded) {
|
192
|
+
myIcon = L.divIcon({
|
193
|
+
html: '<svg x="0px" y="0px" viewBox="0 0 365 560" enable-background="new 0 0 365 560" xml:space="preserve">\n' + '<path class="map_marker" d="M182.9,551.7c0,0.1,0.2,0.3,0.2,0.3S358.3,283,358.3,194.6c0-130.1-88.8-186.7-175.4-186.9 C96.3,7.9,7.5,64.5,7.5,194.6c0,88.4,175.3,357.4,175.3,357.4S182.9,551.7,182.9,551.7z M122.2,187.2c0-33.6,27.2-60.8,60.8-60.8 c33.6,0,60.8,27.2,60.8,60.8S216.5,248,182.9,248C149.4,248,122.2,220.8,122.2,187.2z"/>\n' + '</svg>',
|
194
|
+
iconSize: [24, 36],
|
195
|
+
iconAnchor: [11, 36]
|
196
|
+
});
|
197
|
+
element = React.createElement(
|
198
|
+
Map,
|
199
|
+
{
|
200
|
+
zoom: zoom,
|
201
|
+
center: position,
|
202
|
+
className: classes.map,
|
203
|
+
onViewportChange: this.handleScrollZoom
|
204
|
+
},
|
205
|
+
_ref,
|
206
|
+
React.createElement(Marker, { position: position, icon: myIcon }),
|
207
|
+
React.createElement(
|
208
|
+
'div',
|
209
|
+
{ className: classes.controlButtons },
|
210
|
+
React.createElement(
|
211
|
+
'div',
|
212
|
+
{ className: classes.centerButtonContainer },
|
213
|
+
React.createElement(
|
214
|
+
HiButton,
|
215
|
+
{ className: classes.centerButton, onClick: this.handleCenter },
|
216
|
+
React.createElement(HiIconBuilder, {
|
217
|
+
className: classes.centerIcon,
|
218
|
+
icon: 'crosshairs_gps',
|
219
|
+
size: 24
|
220
|
+
})
|
221
|
+
)
|
222
|
+
),
|
223
|
+
React.createElement(
|
224
|
+
'div',
|
225
|
+
{ className: classes.zoomButtons },
|
226
|
+
React.createElement(
|
227
|
+
HiButton,
|
228
|
+
{
|
229
|
+
onClick: this.handleClickZoomIn,
|
230
|
+
className: classes.zoomButton
|
231
|
+
},
|
232
|
+
'+'
|
233
|
+
),
|
234
|
+
React.createElement(
|
235
|
+
HiButton,
|
236
|
+
{
|
237
|
+
onClick: this.handleClickZoomOut,
|
238
|
+
className: classes.zoomButton
|
239
|
+
},
|
240
|
+
'-'
|
241
|
+
)
|
242
|
+
)
|
243
|
+
)
|
244
|
+
);
|
245
|
+
} else {
|
246
|
+
element = React.createElement(
|
247
|
+
'div',
|
248
|
+
{ style: { top: '50%', left: '50%', position: 'absolute' } },
|
249
|
+
_ref2
|
250
|
+
);
|
251
|
+
}
|
252
|
+
|
253
|
+
return React.createElement(
|
254
|
+
'div',
|
255
|
+
{ style: { height: '352px', width: '100%', position: 'relative' } },
|
256
|
+
element
|
257
|
+
);
|
258
|
+
}
|
259
|
+
}
|
260
|
+
|
261
|
+
HiMap.defaultProps = {
|
262
|
+
translations: {
|
263
|
+
notFound: 'Address not found'
|
264
|
+
}
|
265
|
+
};
|
266
|
+
HiMap.propTypes = process.env.NODE_ENV !== "production" ? {
|
267
|
+
/**
|
268
|
+
* The address to see in the Map component.
|
269
|
+
*/
|
270
|
+
address: PropTypes.string.isRequired,
|
271
|
+
/**
|
272
|
+
* Useful to extend the style applied to components.
|
273
|
+
*/
|
274
|
+
classes: PropTypes.object.isRequired,
|
275
|
+
/**
|
276
|
+
* Function to tell the parent composant that the address was not found by the API.
|
277
|
+
*/
|
278
|
+
onAddressNotFound: PropTypes.func,
|
279
|
+
/**
|
280
|
+
* Traductions
|
281
|
+
*/
|
282
|
+
translations: PropTypes.object
|
283
|
+
} : {};
|
284
|
+
|
285
|
+
export default withStyles(styles, { name: 'HmuiHiMap' })(HiMap);
|
@@ -0,0 +1,145 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import PropTypes from 'prop-types';
|
3
|
+
import classNames from 'classnames';
|
4
|
+
import ExpansionPanel, { ExpansionPanelSummary, ExpansionPanelDetails } from 'material-ui/ExpansionPanel';
|
5
|
+
import Typography from 'material-ui/Typography';
|
6
|
+
import { withStyles } from '../styles';
|
7
|
+
import HiMap from '../HiMap';
|
8
|
+
import HiIconBuilder from '../utils/HiIconBuilder';
|
9
|
+
|
10
|
+
const styles = theme => ({
|
11
|
+
column: {
|
12
|
+
flexBasis: '33.33%'
|
13
|
+
},
|
14
|
+
root: {
|
15
|
+
flexGrow: 1,
|
16
|
+
boxShadow: 'none'
|
17
|
+
},
|
18
|
+
imgListItem: {
|
19
|
+
width: 24,
|
20
|
+
height: 'auto',
|
21
|
+
marginRight: 8,
|
22
|
+
verticalAlign: 'middle'
|
23
|
+
},
|
24
|
+
expandMoreIcon: {
|
25
|
+
margin: 0,
|
26
|
+
fontSize: 18,
|
27
|
+
width: 20
|
28
|
+
},
|
29
|
+
disabledIcon: {
|
30
|
+
color: theme.palette.action.disabled
|
31
|
+
},
|
32
|
+
panelSummaryExpanded: {
|
33
|
+
minHeight: 0
|
34
|
+
},
|
35
|
+
expandIconExpanded: {
|
36
|
+
transform: 'translateY(-50%) rotate(0)',
|
37
|
+
color: theme.palette.business.primary.light
|
38
|
+
},
|
39
|
+
panelSummary: {
|
40
|
+
'&>div:first-child': {
|
41
|
+
margin: '12px 0'
|
42
|
+
}
|
43
|
+
}
|
44
|
+
});
|
45
|
+
|
46
|
+
class HiMapExpand extends React.PureComponent {
|
47
|
+
|
48
|
+
constructor(props) {
|
49
|
+
super(props);
|
50
|
+
this.state = {
|
51
|
+
addressNotFound: false,
|
52
|
+
expanded: false
|
53
|
+
};
|
54
|
+
this.handleAddressNotFound = this.handleAddressNotFound.bind(this);
|
55
|
+
this.handleExpand = this.handleExpand.bind(this);
|
56
|
+
}
|
57
|
+
|
58
|
+
handleExpand() {
|
59
|
+
this.setState({ expanded: !this.state.addressNotFound && !this.state.expanded });
|
60
|
+
}
|
61
|
+
|
62
|
+
handleAddressNotFound() {
|
63
|
+
this.setState({ addressNotFound: true });
|
64
|
+
}
|
65
|
+
|
66
|
+
render() {
|
67
|
+
const { classes, address, countryFlagPath } = this.props;
|
68
|
+
|
69
|
+
const { addressNotFound, expanded } = this.state;
|
70
|
+
|
71
|
+
const flag = countryFlagPath ? React.createElement('img', { src: countryFlagPath, className: classes.imgListItem, alt: 'country flag' }) : '';
|
72
|
+
|
73
|
+
return React.createElement(
|
74
|
+
ExpansionPanel,
|
75
|
+
{
|
76
|
+
className: classes.root,
|
77
|
+
defaultExpanded: false,
|
78
|
+
expanded: expanded,
|
79
|
+
onChange: this.handleExpand
|
80
|
+
},
|
81
|
+
React.createElement(
|
82
|
+
ExpansionPanelSummary,
|
83
|
+
{
|
84
|
+
classes: {
|
85
|
+
root: classes.panelSummary,
|
86
|
+
expanded: classes.panelSummaryExpanded,
|
87
|
+
expandIconExpanded: classes.expandIconExpanded
|
88
|
+
},
|
89
|
+
expandIcon: React.createElement(HiIconBuilder, {
|
90
|
+
icon: 'map_marker',
|
91
|
+
style: { position: 'relative', top: 2, marginRight: 5 },
|
92
|
+
className: classNames({
|
93
|
+
root: classes.expandMoreIcon,
|
94
|
+
[classes.disabledIcon]: addressNotFound
|
95
|
+
})
|
96
|
+
})
|
97
|
+
},
|
98
|
+
React.createElement(
|
99
|
+
'div',
|
100
|
+
{ className: classes.column },
|
101
|
+
React.createElement(
|
102
|
+
Typography,
|
103
|
+
{ className: classes.heading },
|
104
|
+
'Adresse'
|
105
|
+
)
|
106
|
+
),
|
107
|
+
React.createElement(
|
108
|
+
'div',
|
109
|
+
null,
|
110
|
+
React.createElement(
|
111
|
+
Typography,
|
112
|
+
{ className: classes.secondaryHeading },
|
113
|
+
flag,
|
114
|
+
address
|
115
|
+
)
|
116
|
+
)
|
117
|
+
),
|
118
|
+
React.createElement(
|
119
|
+
ExpansionPanelDetails,
|
120
|
+
{ style: { padding: 0 } },
|
121
|
+
React.createElement(HiMap, { address: address, onAddressNotFound: this.handleAddressNotFound })
|
122
|
+
)
|
123
|
+
);
|
124
|
+
}
|
125
|
+
}
|
126
|
+
|
127
|
+
HiMapExpand.defaultProps = {
|
128
|
+
countryFlagPath: ''
|
129
|
+
};
|
130
|
+
HiMapExpand.propTypes = process.env.NODE_ENV !== "production" ? {
|
131
|
+
/**
|
132
|
+
* The address to see in the Map component.
|
133
|
+
*/
|
134
|
+
address: PropTypes.string.isRequired,
|
135
|
+
/**
|
136
|
+
* Useful to extend the style applied to components.
|
137
|
+
*/
|
138
|
+
classes: PropTypes.object.isRequired,
|
139
|
+
/**
|
140
|
+
* The path to the country flag image.
|
141
|
+
*/
|
142
|
+
countryFlagPath: PropTypes.string
|
143
|
+
} : {};
|
144
|
+
|
145
|
+
export default withStyles(styles, { name: 'HmuiHiMapExpand' })(HiMapExpand);
|
@@ -0,0 +1,198 @@
|
|
1
|
+
import _extends from 'babel-runtime/helpers/extends';
|
2
|
+
import _objectWithoutProperties from 'babel-runtime/helpers/objectWithoutProperties';
|
3
|
+
import React from 'react';
|
4
|
+
import PropTypes from 'prop-types';
|
5
|
+
import { Document, Page } from 'react-pdf';
|
6
|
+
import HiButton from '../HiButton';
|
7
|
+
import ChevronRightIcon from 'mdi-material-ui/ChevronRight';
|
8
|
+
import ChevronLeftIcon from 'mdi-material-ui/ChevronLeft';
|
9
|
+
import { CircularProgress } from 'material-ui/Progress';
|
10
|
+
import { withStyles } from '../styles';
|
11
|
+
|
12
|
+
export const styles = theme => ({
|
13
|
+
root: {
|
14
|
+
position: 'relative'
|
15
|
+
},
|
16
|
+
pageNumber: {
|
17
|
+
position: 'absolute',
|
18
|
+
bottom: 16,
|
19
|
+
left: -24,
|
20
|
+
backgroundColor: '#FFFFFF',
|
21
|
+
borderRadius: 4,
|
22
|
+
paddingTop: 7,
|
23
|
+
paddingBottom: 7,
|
24
|
+
paddingRight: 8,
|
25
|
+
paddingLeft: 8,
|
26
|
+
fontSize: 15,
|
27
|
+
fontFamily: theme.typography.fontFamily,
|
28
|
+
boxShadow: '1px 1px 5px rgba(0, 0, 0, .16)',
|
29
|
+
color: '#737373'
|
30
|
+
},
|
31
|
+
pagesNavigation: {
|
32
|
+
position: 'absolute',
|
33
|
+
top: 16,
|
34
|
+
right: -30,
|
35
|
+
backgroundColor: '#FFFFFF',
|
36
|
+
borderRadius: 3,
|
37
|
+
paddingTop: 4,
|
38
|
+
paddingBottom: 4,
|
39
|
+
paddingRight: 3,
|
40
|
+
paddingLeft: 3,
|
41
|
+
fontFamily: theme.typography.fontFamily,
|
42
|
+
boxShadow: '1px 1px 5px rgba(0, 0, 0, .16)',
|
43
|
+
color: '#737373',
|
44
|
+
'&>button:first-child': {
|
45
|
+
marginRight: 6
|
46
|
+
}
|
47
|
+
},
|
48
|
+
navigationButton: {
|
49
|
+
padding: 0,
|
50
|
+
minWidth: 0,
|
51
|
+
minHeight: 0
|
52
|
+
}
|
53
|
+
});
|
54
|
+
|
55
|
+
// Constantes utilisées pour le redimentionnement du PDF (format mobile par exemple)
|
56
|
+
const maxWindowWidth = 900;
|
57
|
+
const maxPdfWidth = 600;
|
58
|
+
|
59
|
+
var _ref = React.createElement(CircularProgress, null);
|
60
|
+
|
61
|
+
var _ref2 = React.createElement(ChevronLeftIcon, null);
|
62
|
+
|
63
|
+
var _ref3 = React.createElement(ChevronRightIcon, null);
|
64
|
+
|
65
|
+
class HiPdfReader extends React.PureComponent {
|
66
|
+
constructor(...args) {
|
67
|
+
var _temp;
|
68
|
+
|
69
|
+
return _temp = super(...args), this.state = {
|
70
|
+
numPages: null,
|
71
|
+
pageNumber: 1,
|
72
|
+
error: false,
|
73
|
+
width: 600
|
74
|
+
}, this.handleLoadSuccess = ({ numPages }) => {
|
75
|
+
this.setState({ numPages, error: false });
|
76
|
+
}, this.handleLoadError = () => {
|
77
|
+
this.setState({ error: true });
|
78
|
+
}, this.handleClickNextPage = () => {
|
79
|
+
this.setState({ pageNumber: this.state.pageNumber + 1 });
|
80
|
+
}, this.handleClickPreviousPage = () => {
|
81
|
+
this.setState({ pageNumber: this.state.pageNumber - 1 });
|
82
|
+
}, _temp;
|
83
|
+
}
|
84
|
+
|
85
|
+
// Calculate & Update state of new dimensions
|
86
|
+
updateDimensions() {
|
87
|
+
if (window.innerWidth < maxWindowWidth) {
|
88
|
+
let updateWidth = Math.round(window.innerWidth * 100 / maxWindowWidth / 100 * maxPdfWidth);
|
89
|
+
this.setState({ width: updateWidth });
|
90
|
+
} else {
|
91
|
+
this.setState({ width: maxPdfWidth });
|
92
|
+
}
|
93
|
+
}
|
94
|
+
|
95
|
+
componentDidMount() {
|
96
|
+
this.updateDimensions();
|
97
|
+
window.addEventListener('resize', this.updateDimensions.bind(this));
|
98
|
+
}
|
99
|
+
|
100
|
+
componentWillUnmount() {
|
101
|
+
window.removeEventListener('resize', this.updateDimensions.bind(this));
|
102
|
+
}
|
103
|
+
|
104
|
+
// Fonction appelée une fois le pdf correctement chargé
|
105
|
+
|
106
|
+
|
107
|
+
// Fonction appelée en cas d'erreur de chargement du pdf
|
108
|
+
|
109
|
+
|
110
|
+
// Fonction appelée au clic du bouton pour visualiser la page suivante du pdf
|
111
|
+
|
112
|
+
|
113
|
+
// Fonction appelée au clic du bouton pour visualiser la page précédente du pdf
|
114
|
+
|
115
|
+
|
116
|
+
// Render
|
117
|
+
render() {
|
118
|
+
const { pageNumber, numPages, error } = this.state;
|
119
|
+
const _props = this.props,
|
120
|
+
{ classes, file, displayPagination, displayNavigationButtons } = _props,
|
121
|
+
props = _objectWithoutProperties(_props, ['classes', 'file', 'displayPagination', 'displayNavigationButtons']);
|
122
|
+
|
123
|
+
return React.createElement(
|
124
|
+
'div',
|
125
|
+
{ className: classes.root },
|
126
|
+
React.createElement(
|
127
|
+
Document,
|
128
|
+
_extends({
|
129
|
+
className: classes.style,
|
130
|
+
file: file,
|
131
|
+
onLoadSuccess: this.handleLoadSuccess,
|
132
|
+
onLoadError: this.handleLoadError,
|
133
|
+
loading: _ref
|
134
|
+
}, props),
|
135
|
+
React.createElement(Page, {
|
136
|
+
pageNumber: pageNumber,
|
137
|
+
renderAnnotations: false,
|
138
|
+
renderTextLayer: false,
|
139
|
+
width: this.state.width
|
140
|
+
})
|
141
|
+
),
|
142
|
+
!error && numPages > 1 && displayPagination && React.createElement(
|
143
|
+
'span',
|
144
|
+
{ className: classes.pageNumber },
|
145
|
+
'Page ',
|
146
|
+
pageNumber,
|
147
|
+
' sur ',
|
148
|
+
numPages
|
149
|
+
),
|
150
|
+
!error && numPages > 1 && displayNavigationButtons && React.createElement(
|
151
|
+
'span',
|
152
|
+
{ className: classes.pagesNavigation },
|
153
|
+
React.createElement(
|
154
|
+
HiButton,
|
155
|
+
{
|
156
|
+
onClick: this.handleClickPreviousPage,
|
157
|
+
disabled: pageNumber === 1,
|
158
|
+
className: classes.navigationButton
|
159
|
+
},
|
160
|
+
_ref2
|
161
|
+
),
|
162
|
+
React.createElement(
|
163
|
+
HiButton,
|
164
|
+
{
|
165
|
+
onClick: this.handleClickNextPage,
|
166
|
+
disabled: pageNumber === numPages,
|
167
|
+
className: classes.navigationButton
|
168
|
+
},
|
169
|
+
_ref3
|
170
|
+
)
|
171
|
+
)
|
172
|
+
);
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
HiPdfReader.defaultProps = {
|
177
|
+
displayPagination: true,
|
178
|
+
displayNavigationButtons: true
|
179
|
+
};
|
180
|
+
HiPdfReader.propTypes = process.env.NODE_ENV !== "production" ? {
|
181
|
+
/**
|
182
|
+
* Surcharge les classes du composant
|
183
|
+
*/
|
184
|
+
classes: PropTypes.object,
|
185
|
+
/**
|
186
|
+
* Chemin vers le fichier PDF
|
187
|
+
*/
|
188
|
+
file: PropTypes.string.isRequired,
|
189
|
+
/**
|
190
|
+
* On affiche la pagination si le PDF contient plusieurs pages
|
191
|
+
*/
|
192
|
+
displayPagination: PropTypes.bool,
|
193
|
+
/**
|
194
|
+
* On affiche les boutons de navigation entre les pages si le PDF contient plusieurs pages
|
195
|
+
*/
|
196
|
+
displayNavigationButtons: PropTypes.bool
|
197
|
+
} : {};
|
198
|
+
export default withStyles(styles, { name: 'HmuiHiPdfReader', index: 51 })(HiPdfReader);
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './HiPdfReader';
|
package/es/HiPins/HiPins.js
CHANGED