@hipay/hipay-material-ui 2.0.0-beta.69 → 2.0.0-beta.70

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- /** @license HiPay-Material-UI v2.0.0-beta.69
1
+ /** @license HiPay-Material-UI v2.0.0-beta.70
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -15625,6 +15625,68 @@
15625
15625
  withTheme: true
15626
15626
  })(HiWidget);
15627
15627
 
15628
+ /**
15629
+ * @ignore - internal component.
15630
+ */
15631
+
15632
+ var HiActivity = pure(function (props) {
15633
+ var classes = props.classes,
15634
+ _props$color = props.color,
15635
+ color = _props$color === void 0 ? props.theme.palette.neutral.main : _props$color,
15636
+ theme = props.theme,
15637
+ other = objectWithoutProperties(props, ["classes", "color", "theme"]);
15638
+
15639
+ return React.createElement("svg", _extends_1({
15640
+ viewBox: "0 0 22.75 20.75"
15641
+ }, other), React.createElement("circle", {
15642
+ cx: "9",
15643
+ cy: "11.05",
15644
+ r: "9",
15645
+ opacity: 0.16,
15646
+ fill: color
15647
+ }), React.createElement("g", null, React.createElement("path", {
15648
+ // eslint-disable-next-line max-len
15649
+ d: "M7.33,1.41A7.75,7.75,0,0,0,5.64,3.94,7.91,7.91,0,0,0,5,7.05a7.91,7.91,0,0,0,2.3,5.65L5.92,14.11A10.06,10.06,0,0,1,3.79,11,9.73,9.73,0,0,1,3,7.05a9.72,9.72,0,0,1,.77-3.89A10.06,10.06,0,0,1,5.92,0ZM14,11.06v4h1a1,1,0,0,1,1,1h7v2H16a1,1,0,0,1-1,1H11a1,1,0,0,1-1-1H3V16h7a1,1,0,0,1,1-1h1v-4ZM10.19,4.22A3.84,3.84,0,0,0,9.06,7.05a3.84,3.84,0,0,0,1.13,2.84L8.78,11.3A6.36,6.36,0,0,1,7.47,9.38,5.84,5.84,0,0,1,7,7.05a6,6,0,0,1,.47-2.34,5.62,5.62,0,0,1,1.31-1.9Zm4.22,1.4A2,2,0,0,1,15,7a2,2,0,0,1-.56,1.43,2,2,0,0,1-2.82,0A2,2,0,0,1,11,7a2,2,0,0,1,3.38-1.41Zm4.12-.91A6,6,0,0,1,19,7.05a5.84,5.84,0,0,1-.47,2.33,6.36,6.36,0,0,1-1.31,1.92L15.81,9.89a3.84,3.84,0,0,0,1.13-2.84,3.84,3.84,0,0,0-1.13-2.83l1.41-1.41A5.62,5.62,0,0,1,18.53,4.71Zm3.68-1.55A9.72,9.72,0,0,1,23,7.05a9.73,9.73,0,0,1-.77,3.9,10.06,10.06,0,0,1-2.13,3.16L18.67,12.7A7.91,7.91,0,0,0,21,7.05a7.91,7.91,0,0,0-.61-3.11,7.75,7.75,0,0,0-1.69-2.53L20.08,0A10.06,10.06,0,0,1,22.21,3.16Z",
15650
+ fill: color
15651
+ })));
15652
+ });
15653
+ HiActivity.muiName = 'SvgIcon';
15654
+ var HiActivity$1 = withStyles({}, {
15655
+ hiComponent: true,
15656
+ withTheme: true
15657
+ })(HiActivity);
15658
+
15659
+ /**
15660
+ * @ignore - internal component.
15661
+ */
15662
+
15663
+ var HiPermission = pure(function (props) {
15664
+ var classes = props.classes,
15665
+ _props$color = props.color,
15666
+ color = _props$color === void 0 ? props.theme.palette.neutral.main : _props$color,
15667
+ theme = props.theme,
15668
+ other = objectWithoutProperties(props, ["classes", "color", "theme"]);
15669
+
15670
+ return React.createElement("svg", _extends_1({
15671
+ viewBox: "0 0 22.98 20.05"
15672
+ }, other), React.createElement("circle", {
15673
+ cx: "9",
15674
+ cy: "11.75",
15675
+ r: "9",
15676
+ opacity: 0.16,
15677
+ fill: color
15678
+ }), React.createElement("g", null, React.createElement("path", {
15679
+ // eslint-disable-next-line max-len
15680
+ d: "M11.24,2a6.69,6.69,0,0,1,9.52,0,6.5,6.5,0,0,1,2,4.76,6.5,6.5,0,0,1-2,4.76,6.5,6.5,0,0,1-4.76,2,6.66,6.66,0,0,1-3-.75V15H10.75v2.25H8.5V19.5H3.25V14l.19-.28,5.9-5.86a10.31,10.31,0,0,1-.09-1.08A6.5,6.5,0,0,1,11.24,2ZM19.7,3.05a5.19,5.19,0,0,0-7.4,0,5,5,0,0,0-1.55,3.7A9,9,0,0,0,10.89,8l0,.37-.28.28-5.91,6V18H7V15.75H9.25V13.5H11.5V11.25h1.78l.19.09a5.19,5.19,0,0,0,6.23-.89,5,5,0,0,0,1.55-3.7A5,5,0,0,0,19.7,3.05ZM16.45,4.2a1.45,1.45,0,0,1,2.1,0,1.45,1.45,0,0,1,0,2.1,1.45,1.45,0,0,1-2.1,0,1.45,1.45,0,0,1,0-2.1Z",
15681
+ fill: color
15682
+ })));
15683
+ });
15684
+ HiPermission.muiName = 'SvgIcon';
15685
+ var HiPermission$1 = withStyles({}, {
15686
+ hiComponent: true,
15687
+ withTheme: true
15688
+ })(HiPermission);
15689
+
15628
15690
 
15629
15691
 
15630
15692
  var hiSvgIcons = /*#__PURE__*/Object.freeze({
@@ -15642,7 +15704,9 @@
15642
15704
  HiSizeSmall: HiSizeSmall,
15643
15705
  HiTransaction: HiTransaction$1,
15644
15706
  HiUser: HiUser$1,
15645
- HiWidget: HiWidget$1
15707
+ HiWidget: HiWidget$1,
15708
+ HiActivity: HiActivity$1,
15709
+ HiPermission: HiPermission$1
15646
15710
  });
15647
15711
 
15648
15712
  var createIcon = createCommonjsModule(function (module, exports) {
@@ -71197,7 +71261,7 @@
71197
71261
  }(React.PureComponent);
71198
71262
 
71199
71263
  HiChipSwitch.defaultProps = {
71200
- active: true,
71264
+ active: false,
71201
71265
  activeIcon: 'check',
71202
71266
  selection: null,
71203
71267
  selectionTitle: ''
@@ -72635,7 +72699,7 @@
72635
72699
  },
72636
72700
  width: '100%',
72637
72701
  // Ajout d'1px pour ne pas avoir de décalage en mode error avec le border top
72638
- '&:not($error)': {
72702
+ '&:$error': {
72639
72703
  marginTop: 1
72640
72704
  }
72641
72705
  }),
@@ -77882,8 +77946,6 @@
77882
77946
  var KEYS = 'keys';
77883
77947
  var VALUES = 'values';
77884
77948
 
77885
- var returnThis = function () { return this; };
77886
-
77887
77949
  var _iterDefine = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {
77888
77950
  _iterCreate(Constructor, NAME, next);
77889
77951
  var getMethod = function (kind) {
@@ -77908,8 +77970,6 @@
77908
77970
  if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {
77909
77971
  // Set @@toStringTag to native iterators
77910
77972
  _setToStringTag(IteratorPrototype, TAG, true);
77911
- // fix for some old engines
77912
- if (!_library && typeof IteratorPrototype[ITERATOR] != 'function') _hide(IteratorPrototype, ITERATOR, returnThis);
77913
77973
  }
77914
77974
  }
77915
77975
  // fix Array#{values, @@iterator}.name in V8 / FF
@@ -77918,7 +77978,7 @@
77918
77978
  $default = function values() { return $native.call(this); };
77919
77979
  }
77920
77980
  // Define iterator
77921
- if ((!_library || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
77981
+ if ((FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {
77922
77982
  _hide(proto, ITERATOR, $default);
77923
77983
  }
77924
77984
  if (DEFAULT) {
@@ -83861,7 +83921,8 @@
83861
83921
  onSearch = _this$props.onSearch,
83862
83922
  translations = _this$props.translations,
83863
83923
  align = _this$props.align,
83864
- otherProps = objectWithoutProperties(_this$props, ["classes", "id", "loading", "showMinLength", "showNoResults", "onSearch", "translations", "align"]);
83924
+ inputClasses = _this$props.inputClasses,
83925
+ otherProps = objectWithoutProperties(_this$props, ["classes", "id", "loading", "showMinLength", "showNoResults", "onSearch", "translations", "align", "inputClasses"]);
83865
83926
 
83866
83927
  var _this$state = this.state,
83867
83928
  focused = _this$state.focused,
@@ -83902,7 +83963,8 @@
83902
83963
  onChange: onSearch,
83903
83964
  onKeyDown: this.handleKeyDownSearch,
83904
83965
  onBlur: this.handleBlur,
83905
- onFocus: this.handleFocus
83966
+ onFocus: this.handleFocus,
83967
+ classes: inputClasses
83906
83968
  })), open && React.createElement(Popper$3, {
83907
83969
  disablePortal: true,
83908
83970
  anchorEl: this.textInput,
@@ -83957,6 +84019,11 @@
83957
84019
  */
83958
84020
  id: propTypes.string,
83959
84021
 
84022
+ /**
84023
+ * Object that contains the style for Input component
84024
+ */
84025
+ inputClasses: propTypes.object,
84026
+
83960
84027
  /**
83961
84028
  * Passe une ref callback au composant input
83962
84029
  */
@@ -91820,13 +91887,21 @@
91820
91887
 
91821
91888
  var ALIGN_RIGHT_TYPES = [TYPE_NUMERIC, TYPE_RATE, TYPE_SENTINEL, TYPE_SENTINEL_SCORE];
91822
91889
 
91823
- var styles$l = {
91824
- icon: {
91825
- color: '#00ADE9'
91826
- },
91827
- headerRoot: {
91828
- cursor: 'inherit'
91829
- }
91890
+ var styles$l = function styles(theme) {
91891
+ return {
91892
+ head: {
91893
+ cursor: 'inherit',
91894
+ borderBottom: "solid 1px ".concat(theme.palette.divider)
91895
+ },
91896
+ cell: {
91897
+ border: 'none',
91898
+ paddingRight: '13px',
91899
+ paddingLeft: '13px'
91900
+ },
91901
+ icon: {
91902
+ color: '#00ADE9'
91903
+ }
91904
+ };
91830
91905
  };
91831
91906
 
91832
91907
  var HiTableHeader =
@@ -91868,7 +91943,9 @@
91868
91943
  orderBy = _this$props.orderBy,
91869
91944
  sortable = _this$props.sortable,
91870
91945
  dense = _this$props.dense;
91871
- return React.createElement(TableHead$2, null, React.createElement(TableRow$4, {
91946
+ return React.createElement(TableHead$2, {
91947
+ className: classes.head
91948
+ }, React.createElement(TableRow$4, {
91872
91949
  style: {
91873
91950
  height: dense ? CELL_HEADER_HEIGHT_DENSE : CELL_HEADER_HEIGHT,
91874
91951
  whiteSpace: 'nowrap'
@@ -91884,13 +91961,8 @@
91884
91961
  var finalLabel = view === 's' ? smallLabel : label;
91885
91962
  return React.createElement(TableCell$2, {
91886
91963
  key: colId,
91964
+ className: classes.cell,
91887
91965
  sortDirection: orderBy === colId ? order : false,
91888
- style: {
91889
- border: 'none',
91890
- borderBottom: orderBy === colId ? 'solid 1px #00ADE9' : 'none',
91891
- paddingRight: '13px',
91892
- paddingLeft: '13px'
91893
- },
91894
91966
  numeric: ALIGN_RIGHT_TYPES.includes(type),
91895
91967
  title: headerTooltip
91896
91968
  }, sortable ? React.createElement(TableSortLabel$2, {
@@ -96907,12 +96979,35 @@
96907
96979
  color = _this$props.color,
96908
96980
  icon = _this$props.icon,
96909
96981
  label = _this$props.label,
96910
- view = _this$props.view,
96911
- size = _this$props.size;
96982
+ onClick = _this$props.onClick,
96983
+ size = _this$props.size,
96984
+ view = _this$props.view;
96985
+
96986
+ if (onClick) {
96987
+ return React.createElement("div", {
96988
+ className: classes.wrapper,
96989
+ title: label
96990
+ }, React.createElement(HiIconButton$1, {
96991
+ color: 'inherit',
96992
+ style: {
96993
+ color: color,
96994
+ fontSize: size || 24,
96995
+ maxHeight: 31,
96996
+ maxWidth: 31
96997
+ },
96998
+ onClick: onClick
96999
+ }, React.createElement(HiIcon$1, {
97000
+ className: classes.icon,
97001
+ icon: icon
97002
+ }), view !== 's' && label && React.createElement("span", {
97003
+ className: classes.label
97004
+ }, label)));
97005
+ }
97006
+
96912
97007
  return React.createElement("div", {
96913
97008
  className: classes.wrapper,
96914
97009
  title: label
96915
- }, icon && React.createElement(HiIcon$1, {
97010
+ }, React.createElement(HiIcon$1, {
96916
97011
  color: 'inherit',
96917
97012
  style: {
96918
97013
  color: color,
@@ -96955,6 +97050,11 @@
96955
97050
  */
96956
97051
  label: propTypes.string,
96957
97052
 
97053
+ /**
97054
+ * Fonction déclenchée lors du clic
97055
+ */
97056
+ onClick: propTypes.func,
97057
+
96958
97058
  /**
96959
97059
  * View (L/M/S)
96960
97060
  */
@@ -97352,12 +97452,18 @@
97352
97452
  whiteSpace: 'pre',
97353
97453
  width: '100%'
97354
97454
  };
97455
+ var styleButton = {
97456
+ padding: '1px 5px',
97457
+ minHeight: '18px',
97458
+ maxHeight: '18px'
97459
+ };
97355
97460
  /**
97356
97461
  * CellText functional component
97357
97462
  * (don't includes complex ellipsis: middle, after-first-word...)
97358
97463
  *
97359
97464
  * @param label
97360
97465
  * @param color
97466
+ * @param isButton
97361
97467
  * @param value
97362
97468
  * @param active
97363
97469
  * @param title
@@ -97368,6 +97474,8 @@
97368
97474
  var CellTextStyled = function CellTextStyled(_ref) {
97369
97475
  var label = _ref.label,
97370
97476
  color = _ref.color,
97477
+ isButton = _ref.isButton,
97478
+ onClick = _ref.onClick,
97371
97479
  _ref$value = _ref.value,
97372
97480
  value = _ref$value === void 0 ? '' : _ref$value,
97373
97481
  _ref$active = _ref.active,
@@ -97375,6 +97483,17 @@
97375
97483
  _ref$title = _ref.title,
97376
97484
  title$$1 = _ref$title === void 0 ? '' : _ref$title;
97377
97485
  var valueString = label ? label.toString() : value.toString();
97486
+
97487
+ if (isButton) {
97488
+ return React.createElement(HiButton$1, {
97489
+ color: color,
97490
+ onClick: onClick,
97491
+ size: "small",
97492
+ style: styleButton,
97493
+ variant: "raised"
97494
+ }, valueString);
97495
+ }
97496
+
97378
97497
  return React.createElement("div", {
97379
97498
  style: styleRoot,
97380
97499
  title: title$$1 || valueString
@@ -97399,11 +97518,21 @@
97399
97518
  */
97400
97519
  color: propTypes.string,
97401
97520
 
97521
+ /**
97522
+ * Définit si la cellule de text
97523
+ */
97524
+ isButton: propTypes.bool,
97525
+
97402
97526
  /**
97403
97527
  * Label
97404
97528
  */
97405
97529
  label: propTypes.oneOfType([propTypes.string, propTypes.number]),
97406
97530
 
97531
+ /**
97532
+ * Fonction déclenchée lors du clic
97533
+ */
97534
+ onClick: propTypes.func,
97535
+
97407
97536
  /**
97408
97537
  * Tooltip
97409
97538
  */
@@ -97424,7 +97553,7 @@
97424
97553
  overflow: 'hidden',
97425
97554
  position: 'relative',
97426
97555
  textAlign: 'right',
97427
- paddingTop: 10
97556
+ maxHeight: '32px'
97428
97557
  },
97429
97558
  trendChipIcon: {
97430
97559
  width: 14,
@@ -97571,9 +97700,9 @@
97571
97700
  return {
97572
97701
  root: {
97573
97702
  display: 'inline-block',
97574
- padding: '1px 9px',
97575
- height: 16,
97576
- lineHeight: '16px',
97703
+ padding: '0px 9px',
97704
+ height: 17,
97705
+ lineHeight: '17px',
97577
97706
  minWidth: 25,
97578
97707
  textAlign: 'center',
97579
97708
  borderRadius: '45px',
@@ -97823,6 +97952,7 @@
97823
97952
  color: datacell.color,
97824
97953
  icon: datacell.icon,
97825
97954
  label: datacell.label,
97955
+ onClick: datacell.handleClick,
97826
97956
  view: cell.view ? cell.view : DEFAULT_VIEWS[cell.type],
97827
97957
  size: cell.size
97828
97958
  });
@@ -97867,6 +97997,8 @@
97867
97997
  active: datacell.active,
97868
97998
  color: datacell.color,
97869
97999
  label: datacell.label,
98000
+ isButton: datacell.isButton,
98001
+ onClick: datacell.handleClick,
97870
98002
  title: cell.title ? cell.title(datacell, cell) : datacell.title,
97871
98003
  value: datacell.value
97872
98004
  });
@@ -97884,15 +98016,12 @@
97884
98016
  key: "render",
97885
98017
  value: function render() {
97886
98018
  var _this$props = this.props,
98019
+ className = _this$props.className,
97887
98020
  column = _this$props.column,
97888
98021
  data = _this$props.data,
97889
98022
  locale = _this$props.locale;
97890
98023
  return React.createElement(TableCell$2, {
97891
- style: {
97892
- border: 'none',
97893
- paddingRight: '13px',
97894
- paddingLeft: '13px'
97895
- }
98024
+ className: className
97896
98025
  }, this.createCell(column, data, locale));
97897
98026
  }
97898
98027
  }]);
@@ -97901,6 +98030,11 @@
97901
98030
  }(React.PureComponent);
97902
98031
 
97903
98032
  HiCellBuilder.propTypes = {
98033
+ /**
98034
+ * Override TableCell style
98035
+ */
98036
+ className: propTypes.object,
98037
+
97904
98038
  /**
97905
98039
  * Propriétés de la colonne
97906
98040
  */
@@ -97923,15 +98057,18 @@
97923
98057
  '&:last-child': {
97924
98058
  borderBottom: 'solid 1px #E4E7E8'
97925
98059
  },
97926
- '&:first-child': {
97927
- borderTop: 'solid 1px #E4E7E8'
97928
- },
97929
98060
  '&:hover, &:focus': {
97930
98061
  backgroundColor: "".concat(theme.palette.action.hover, " !important")
97931
98062
  }
97932
98063
  },
97933
98064
  clickableRow: {
97934
98065
  cursor: 'pointer'
98066
+ },
98067
+ cell: {
98068
+ border: 'none',
98069
+ padding: '0px 13px',
98070
+ minHeight: '32px',
98071
+ maxHeight: '40px'
97935
98072
  }
97936
98073
  };
97937
98074
  };
@@ -97991,6 +98128,7 @@
97991
98128
  }, Object.keys(columns).map(function (column) {
97992
98129
  return React.createElement(HiCellBuilder, {
97993
98130
  key: columns[column].colId,
98131
+ className: classes.cell,
97994
98132
  column: columns[column],
97995
98133
  data: rowdata,
97996
98134
  locale: locale
@@ -108225,8 +108363,9 @@
108225
108363
  overflow: 'hidden',
108226
108364
  textOverflow: 'ellipsis'
108227
108365
  }, theme.typography.b1, {
108228
- display: 'inline-flex',
108229
- width: '100%'
108366
+ display: 'inline-block',
108367
+ width: '100%',
108368
+ maxWidth: 500
108230
108369
  }),
108231
108370
  placeholder: {
108232
108371
  color: theme.palette.grey[400]
@@ -108535,13 +108674,14 @@
108535
108674
  transition: 'none !important'
108536
108675
  },
108537
108676
  labelIcon: {
108538
- marginRight: 10
108677
+ marginRight: 10,
108678
+ verticalAlign: 'text-bottom'
108539
108679
  },
108540
108680
  labelImg: {
108541
108681
  height: 18,
108542
108682
  width: 'auto',
108543
108683
  margin: '0 4px',
108544
- verticalAlign: 'middle'
108684
+ verticalAlign: 'text-bottom'
108545
108685
  },
108546
108686
  selectIconLabel: _extends_1({
108547
108687
  whiteSpace: 'nowrap',
@@ -108549,7 +108689,7 @@
108549
108689
  textOverflow: 'ellipsis',
108550
108690
  paddingRight: 16
108551
108691
  }, theme.typography.b1, {
108552
- display: 'inline-flex',
108692
+ display: 'inline-block',
108553
108693
  width: '100%'
108554
108694
  }),
108555
108695
  selectImgLabel: _extends_1({