@hipay/hipay-material-ui 1.0.0-beta.23 → 1.0.0-beta.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/HI-CHANGELOG.md +58 -39
  2. package/HiChip/HiChip.js +67 -8
  3. package/HiDatePicker/HiDateRangePicker.js +27 -13
  4. package/HiDatePicker/HiDateRangeSelector.js +13 -2
  5. package/HiForm/HiInput.js +1 -0
  6. package/HiForm/HiPasswordField.js +2 -2
  7. package/HiPins/HiPins.js +6 -4
  8. package/HiSelect/HiSelect.js +28 -20
  9. package/HiSelect/SelectInput.js +3 -8
  10. package/HiSelectableList/HiSelectableList.js +51 -49
  11. package/HiSelectableList/HiSelectableListItem.js +7 -5
  12. package/HiTable/BodyCellBuilder.js +25 -14
  13. package/HiTable/BodyCells/CellAccount.js +13 -15
  14. package/HiTable/BodyCells/CellAccountNumber.js +12 -3
  15. package/HiTable/BodyCells/CellAddress.js +12 -3
  16. package/HiTable/BodyCells/CellCountry.js +12 -3
  17. package/HiTable/BodyCells/CellDate.js +56 -52
  18. package/HiTable/BodyCells/CellIcon.js +12 -3
  19. package/HiTable/BodyCells/CellImage.js +12 -3
  20. package/HiTable/BodyCells/CellNumeric.js +12 -3
  21. package/HiTable/BodyCells/CellRate.js +12 -3
  22. package/HiTable/BodyCells/CellSentinel.js +17 -7
  23. package/HiTable/BodyCells/CellStatus.js +12 -3
  24. package/HiTable/BodyCells/CellText.js +75 -37
  25. package/HiTable/BodyCells/CellThirdPartySecurity.js +12 -3
  26. package/HiTable/BodyRow.js +12 -3
  27. package/HiTable/ColumnFilter.js +1 -4
  28. package/HiTable/HeaderCell.js +21 -11
  29. package/HiTable/HiStickyRow.js +27 -16
  30. package/HiTable/HiTable.js +30 -69
  31. package/HiTable/HiTableBody.js +99 -29
  32. package/HiTable/HiTableContextMenu.js +31 -16
  33. package/HiTable/HiTableFooter.js +9 -0
  34. package/HiTable/HiTableHead.js +15 -7
  35. package/HiTopBar/HiTopBar.js +6 -0
  36. package/README.md +72 -6
  37. package/es/HiChip/HiChip.js +81 -9
  38. package/es/HiDatePicker/HiDateRangePicker.js +25 -12
  39. package/es/HiDatePicker/HiDateRangeSelector.js +12 -2
  40. package/es/HiForm/HiInput.js +1 -0
  41. package/es/HiForm/HiPasswordField.js +2 -2
  42. package/es/HiPins/HiPins.js +4 -4
  43. package/es/HiSelect/HiSelect.js +25 -16
  44. package/es/HiSelect/SelectInput.js +3 -8
  45. package/es/HiSelectableList/HiSelectableList.js +51 -49
  46. package/es/HiSelectableList/HiSelectableListItem.js +7 -5
  47. package/es/HiTable/BodyCellBuilder.js +11 -4
  48. package/es/HiTable/BodyCells/CellAccount.js +7 -5
  49. package/es/HiTable/BodyCells/CellAccountNumber.js +6 -1
  50. package/es/HiTable/BodyCells/CellAddress.js +6 -1
  51. package/es/HiTable/BodyCells/CellCountry.js +6 -1
  52. package/es/HiTable/BodyCells/CellDate.js +35 -40
  53. package/es/HiTable/BodyCells/CellIcon.js +6 -1
  54. package/es/HiTable/BodyCells/CellImage.js +6 -1
  55. package/es/HiTable/BodyCells/CellNumeric.js +6 -1
  56. package/es/HiTable/BodyCells/CellRate.js +6 -1
  57. package/es/HiTable/BodyCells/CellSentinel.js +6 -1
  58. package/es/HiTable/BodyCells/CellStatus.js +6 -1
  59. package/es/HiTable/BodyCells/CellText.js +50 -20
  60. package/es/HiTable/BodyCells/CellThirdPartySecurity.js +6 -1
  61. package/es/HiTable/BodyRow.js +7 -2
  62. package/es/HiTable/ColumnFilter.js +1 -4
  63. package/es/HiTable/HeaderCell.js +16 -9
  64. package/es/HiTable/HiStickyRow.js +21 -14
  65. package/es/HiTable/HiTable.js +4 -40
  66. package/es/HiTable/HiTableBody.js +78 -26
  67. package/es/HiTable/HiTableContextMenu.js +28 -16
  68. package/es/HiTable/HiTableFooter.js +5 -0
  69. package/es/HiTable/HiTableHead.js +11 -6
  70. package/es/HiTopBar/HiTopBar.js +5 -0
  71. package/es/svg-icons/Cancel.js +2 -0
  72. package/es/svg-icons/HiBriefcaseRescue.js +15 -0
  73. package/es/svg-icons/index.js +2 -1
  74. package/es/utils/HiIconBuilder.js +6 -2
  75. package/index.es.js +1 -1
  76. package/index.js +1 -1
  77. package/package.json +7 -1
  78. package/svg-icons/Cancel.js +2 -0
  79. package/svg-icons/HiBriefcaseRescue.js +30 -0
  80. package/svg-icons/index.js +9 -0
  81. package/umd/hipay-material-ui.development.js +110915 -119592
  82. package/umd/hipay-material-ui.production.min.js +5 -5
  83. package/utils/HiIconBuilder.js +6 -2
@@ -40,7 +40,9 @@ class HiTableContextMenu extends React.Component {
40
40
 
41
41
  this.state = {
42
42
  value: '',
43
- label: ''
43
+ label: '',
44
+ lookup: true,
45
+ exclude: true
44
46
  };
45
47
 
46
48
  this.handleContextMenuOpen = this.handleContextMenuOpen.bind(this);
@@ -51,9 +53,12 @@ class HiTableContextMenu extends React.Component {
51
53
  }
52
54
 
53
55
  handleContextMenuOpen(event) {
56
+ const { columns } = this.props;
54
57
  this.setState({
55
58
  value: event.detail.data.value,
56
- label: event.detail.data.label
59
+ label: event.detail.data.label,
60
+ lookup: columns[event.detail.data.column].lookup !== false,
61
+ exclude: columns[event.detail.data.column].exclude !== false
57
62
  });
58
63
  }
59
64
 
@@ -83,8 +88,9 @@ class HiTableContextMenu extends React.Component {
83
88
 
84
89
  render() {
85
90
  const { classes, tabId, translations } = this.props;
91
+ const { lookup, exclude } = this.state;
86
92
 
87
- const contextMenuItems = [{ id: 'copy', icon: 'contentDuplicate', title: translations.copy, action: this.handleClickCopy }, { id: 'lookup', icon: 'crosshairsGps', title: translations.lookUp, action: this.handleClickLookup }, { id: 'exclude', icon: 'closeCircleOutline', title: translations.exclude, action: this.handleClickExclude }, { id: 'open', icon: 'openInNew', title: translations.openInNewTab, action: this.handleClickOpenNewTab }];
93
+ const contextMenuItems = [{ id: 'copy', icon: 'contentDuplicate', title: translations.copy, action: this.handleClickCopy }, { id: 'lookup', displayed: lookup, icon: 'crosshairsGps', title: translations.lookUp, action: this.handleClickLookup }, { id: 'exclude', displayed: exclude, icon: 'closeCircleOutline', title: translations.exclude, action: this.handleClickExclude }, { id: 'open', icon: 'openInNew', title: translations.openInNewTab, action: this.handleClickOpenNewTab }];
88
94
 
89
95
  return React.createElement(
90
96
  ContextMenu,
@@ -94,19 +100,21 @@ class HiTableContextMenu extends React.Component {
94
100
  onShow: this.handleContextMenuOpen
95
101
  },
96
102
  contextMenuItems.map(menuItem => {
97
- return React.createElement(
98
- MenuItem,
99
- {
100
- attributes: { className: classes.contextMenuItem },
101
- key: `hitable_context_menu_${tabId}_${menuItem.id}`,
102
- onClick: menuItem.action },
103
- React.createElement(HiIconBuilder, { icon: menuItem.icon }),
104
- React.createElement(
105
- 'span',
106
- { className: classes.title },
107
- menuItem.title.replace('%s', this.state.label)
108
- )
109
- );
103
+ if (menuItem.displayed !== false) {
104
+ return React.createElement(
105
+ MenuItem,
106
+ {
107
+ attributes: { className: classes.contextMenuItem },
108
+ key: `hitable_context_menu_${tabId}_${menuItem.id}`,
109
+ onClick: menuItem.action },
110
+ React.createElement(HiIconBuilder, { icon: menuItem.icon }),
111
+ React.createElement(
112
+ 'span',
113
+ { className: classes.title },
114
+ menuItem.title.replace('%s', this.state.label)
115
+ )
116
+ );
117
+ }
110
118
  })
111
119
  );
112
120
  }
@@ -125,6 +133,10 @@ HiTableContextMenu.propTypes = process.env.NODE_ENV !== "production" ? {
125
133
  * Surcharge le style du composant
126
134
  */
127
135
  classes: PropTypes.object,
136
+ /**
137
+ * Liste des objets colonnes utilisé pour savoir quels items du context menu sont affichés
138
+ */
139
+ columns: PropTypes.object.isRequired,
128
140
  /**
129
141
  * Fonction de callback appelée au clic sur l'item redirection
130
142
  * du menu contextuel ouvert au clic droit
@@ -1,3 +1,4 @@
1
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
1
2
  import React from 'react';
2
3
  import { TableCell, TableFooter, TableRow } from 'material-ui/Table';
3
4
  import { withStyles } from '../styles';
@@ -28,6 +29,10 @@ export const styles = theme => ({
28
29
 
29
30
  class HiTableFooter extends React.Component {
30
31
 
32
+ shouldComponentUpdate(nextProps, nextState) {
33
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
34
+ }
35
+
31
36
  render() {
32
37
  const { classes, nbColumnsDisplayed, view } = this.props;
33
38
 
@@ -1,4 +1,5 @@
1
1
  import _extends from 'babel-runtime/helpers/extends';
2
+ import _JSON$stringify from 'babel-runtime/core-js/json/stringify';
2
3
  import React from 'react';
3
4
  import { findDOMNode } from 'react-dom';
4
5
  import PropTypes from 'prop-types';
@@ -90,11 +91,11 @@ class HiTableHead extends React.Component {
90
91
  constructor(props) {
91
92
  super();
92
93
 
94
+ this.orderColumnsAnchorEl = null;
93
95
  this.orderColumnsButton = null;
94
96
  this.state = {
95
97
  hovered: false,
96
- openedOrderColumns: false,
97
- orderColumnsAnchorEl: null
98
+ openedOrderColumns: false
98
99
  };
99
100
 
100
101
  this.handleEvent = this.handleEvent.bind(this);
@@ -102,6 +103,10 @@ class HiTableHead extends React.Component {
102
103
  this.handleCloseOrderColumns = this.handleCloseOrderColumns.bind(this);
103
104
  }
104
105
 
106
+ shouldComponentUpdate(nextProps, nextState) {
107
+ return _JSON$stringify(this.props) !== _JSON$stringify(nextProps) || _JSON$stringify(this.state) !== _JSON$stringify(nextState);
108
+ }
109
+
105
110
  handleEvent({ type }) {
106
111
  switch (type) {
107
112
  case 'mouseenter':
@@ -115,9 +120,9 @@ class HiTableHead extends React.Component {
115
120
 
116
121
  handleOpenOrderColumns() {
117
122
  this.setState({
118
- openedOrderColumns: true,
119
- orderColumnsAnchorEl: findDOMNode(this.orderColumnsButton)
123
+ openedOrderColumns: true
120
124
  });
125
+ this.orderColumnsAnchorEl = findDOMNode(this.orderColumnsButton);
121
126
  }
122
127
 
123
128
  handleCloseOrderColumns() {
@@ -155,7 +160,7 @@ class HiTableHead extends React.Component {
155
160
  fixedColumnWidth
156
161
  } = this.props;
157
162
 
158
- const { hovered, openedOrderColumns, orderColumnsAnchorEl } = this.state;
163
+ const { hovered, openedOrderColumns } = this.state;
159
164
 
160
165
  let headerProps = _extends({
161
166
  className: classNames(classes.thead, {
@@ -258,7 +263,7 @@ class HiTableHead extends React.Component {
258
263
  orderable && React.createElement(OrderColumns, {
259
264
  isOpen: openedOrderColumns,
260
265
  onClose: this.handleCloseOrderColumns,
261
- anchorEl: orderColumnsAnchorEl,
266
+ anchorEl: this.orderColumnsAnchorEl,
262
267
  updateOrderedColumns: onColumnsOrderUpdate,
263
268
  columns: columns,
264
269
  orderedColumns: orderedColumns,
@@ -158,6 +158,11 @@ class HiTopBar extends React.Component {
158
158
  this.props.onClickReturn();
159
159
  }
160
160
 
161
+ //TODO : Cyclic reference passed.
162
+ /*shouldComponentUpdate(nextProps, nextState){
163
+ return JSON.stringify(this.props) !== JSON.stringify(nextProps);
164
+ }*/
165
+
161
166
  render() {
162
167
  const {
163
168
  classes,
@@ -1,3 +1,5 @@
1
+ messageAlert;
2
+
1
3
  import React from 'react';
2
4
  import pure from 'recompose/pure';
3
5
  import SvgIcon from '../SvgIcon';
@@ -0,0 +1,15 @@
1
+ import _extends from "babel-runtime/helpers/extends";
2
+ import React from "react";
3
+
4
+ var _ref = React.createElement("path", {
5
+ d: "M486 108H378V27a27 27 0 0 0-27-27H189a27 27 0 0 0-27 27v81H54a54.06 54.06 0 0 0-54 54v270a54.06 54.06 0 0 0 54 54h432a54.06 54.06 0 0 0 54-54V162a54.06 54.06 0 0 0-54-54zM216 54h108v54H216zm162 270h-81v81h-54v-81h-81v-54h81v-81h54v81h81z",
6
+ fill: "#767676"
7
+ });
8
+
9
+ const HiBriefcaseRescue = props => React.createElement(
10
+ "svg",
11
+ _extends({ viewBox: "0 0 540 486" }, props),
12
+ _ref
13
+ );
14
+
15
+ export default HiBriefcaseRescue;
@@ -8,4 +8,5 @@ export { default as HiRoute } from './HiRoute';
8
8
  export { default as HiSettlement } from './HiSettlement';
9
9
  export { default as HiTransaction } from './HiTransaction';
10
10
  export { default as HiUser } from './HiUser';
11
- export { default as HiWidget } from './HiWidget';
11
+ export { default as HiWidget } from './HiWidget';
12
+ export { default as HiBriefcaseRescue } from './HiBriefcaseRescue';
@@ -65,7 +65,7 @@ class HiIconBuilder extends PureComponent {
65
65
  style: _extends({
66
66
  height: size,
67
67
  width: size
68
- }, color && { color }, backgroundColor && { backgroundColor, padding: 2, borderRadius: size }, style),
68
+ }, color && { color, fill: color }, backgroundColor && { backgroundColor, padding: 2, borderRadius: size }, style),
69
69
  onClick: onClick
70
70
  }, props, others));
71
71
  }
@@ -102,6 +102,10 @@ HiIconBuilder.propTypes = process.env.NODE_ENV !== "production" ? {
102
102
  /**
103
103
  * Style surchargé
104
104
  */
105
- style: PropTypes.object
105
+ style: PropTypes.object,
106
+ /**
107
+ * Titre de l'icône
108
+ */
109
+ title: PropTypes.string
106
110
  } : {};
107
111
  export default HiIconBuilder;
package/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Material-UI v1.0.0-beta.23
1
+ /** @license Material-UI v1.0.0-beta.26
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.
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license Material-UI v1.0.0-beta.23
1
+ /** @license Material-UI v1.0.0-beta.26
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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@hipay/hipay-material-ui",
3
3
  "private": false,
4
4
  "author": "HiPay PSYCHE Team",
5
- "version": "1.0.0-beta.23",
5
+ "version": "1.0.0-beta.26",
6
6
  "description": "HiPay Material-UI Style Guide - React components that implement Google's Material Design from Material-UI.",
7
7
  "main": "./index.js",
8
8
  "repository": {
@@ -23,6 +23,7 @@
23
23
  "babel-runtime": "^6.26.0",
24
24
  "brcast": "^3.0.1",
25
25
  "classnames": "^2.2.5",
26
+ "commitizen": "^2.10.1",
26
27
  "deepmerge": "^2.0.1",
27
28
  "dom-helpers": "^3.2.1",
28
29
  "hoist-non-react-statics": "^2.5.0",
@@ -76,5 +77,10 @@
76
77
  "test": "test"
77
78
  },
78
79
  "license": "ISC",
80
+ "config": {
81
+ "commitizen": {
82
+ "path": "./node_modules/cz-conventional-changelog"
83
+ }
84
+ },
79
85
  "module": "./index.es.js"
80
86
  }
@@ -18,6 +18,8 @@ var _SvgIcon2 = _interopRequireDefault(_SvgIcon);
18
18
 
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
20
 
21
+ messageAlert;
22
+
21
23
  /**
22
24
  * @ignore - internal component.
23
25
  */
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _extends2 = require("babel-runtime/helpers/extends");
8
+
9
+ var _extends3 = _interopRequireDefault(_extends2);
10
+
11
+ var _react = require("react");
12
+
13
+ var _react2 = _interopRequireDefault(_react);
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+
17
+ var _ref = _react2.default.createElement("path", {
18
+ d: "M486 108H378V27a27 27 0 0 0-27-27H189a27 27 0 0 0-27 27v81H54a54.06 54.06 0 0 0-54 54v270a54.06 54.06 0 0 0 54 54h432a54.06 54.06 0 0 0 54-54V162a54.06 54.06 0 0 0-54-54zM216 54h108v54H216zm162 270h-81v81h-54v-81h-81v-54h81v-81h54v81h81z",
19
+ fill: "#767676"
20
+ });
21
+
22
+ var HiBriefcaseRescue = function HiBriefcaseRescue(props) {
23
+ return _react2.default.createElement(
24
+ "svg",
25
+ (0, _extends3.default)({ viewBox: "0 0 540 486" }, props),
26
+ _ref
27
+ );
28
+ };
29
+
30
+ exports.default = HiBriefcaseRescue;
@@ -103,4 +103,13 @@ Object.defineProperty(exports, 'HiWidget', {
103
103
  }
104
104
  });
105
105
 
106
+ var _HiBriefcaseRescue = require('./HiBriefcaseRescue');
107
+
108
+ Object.defineProperty(exports, 'HiBriefcaseRescue', {
109
+ enumerable: true,
110
+ get: function get() {
111
+ return _interopRequireDefault(_HiBriefcaseRescue).default;
112
+ }
113
+ });
114
+
106
115
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }