@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.
- package/HI-CHANGELOG.md +58 -39
- package/HiChip/HiChip.js +67 -8
- package/HiDatePicker/HiDateRangePicker.js +27 -13
- package/HiDatePicker/HiDateRangeSelector.js +13 -2
- package/HiForm/HiInput.js +1 -0
- package/HiForm/HiPasswordField.js +2 -2
- package/HiPins/HiPins.js +6 -4
- package/HiSelect/HiSelect.js +28 -20
- package/HiSelect/SelectInput.js +3 -8
- package/HiSelectableList/HiSelectableList.js +51 -49
- package/HiSelectableList/HiSelectableListItem.js +7 -5
- package/HiTable/BodyCellBuilder.js +25 -14
- package/HiTable/BodyCells/CellAccount.js +13 -15
- package/HiTable/BodyCells/CellAccountNumber.js +12 -3
- package/HiTable/BodyCells/CellAddress.js +12 -3
- package/HiTable/BodyCells/CellCountry.js +12 -3
- package/HiTable/BodyCells/CellDate.js +56 -52
- package/HiTable/BodyCells/CellIcon.js +12 -3
- package/HiTable/BodyCells/CellImage.js +12 -3
- package/HiTable/BodyCells/CellNumeric.js +12 -3
- package/HiTable/BodyCells/CellRate.js +12 -3
- package/HiTable/BodyCells/CellSentinel.js +17 -7
- package/HiTable/BodyCells/CellStatus.js +12 -3
- package/HiTable/BodyCells/CellText.js +75 -37
- package/HiTable/BodyCells/CellThirdPartySecurity.js +12 -3
- package/HiTable/BodyRow.js +12 -3
- package/HiTable/ColumnFilter.js +1 -4
- package/HiTable/HeaderCell.js +21 -11
- package/HiTable/HiStickyRow.js +27 -16
- package/HiTable/HiTable.js +30 -69
- package/HiTable/HiTableBody.js +99 -29
- package/HiTable/HiTableContextMenu.js +31 -16
- package/HiTable/HiTableFooter.js +9 -0
- package/HiTable/HiTableHead.js +15 -7
- package/HiTopBar/HiTopBar.js +6 -0
- package/README.md +72 -6
- package/es/HiChip/HiChip.js +81 -9
- package/es/HiDatePicker/HiDateRangePicker.js +25 -12
- package/es/HiDatePicker/HiDateRangeSelector.js +12 -2
- package/es/HiForm/HiInput.js +1 -0
- package/es/HiForm/HiPasswordField.js +2 -2
- package/es/HiPins/HiPins.js +4 -4
- package/es/HiSelect/HiSelect.js +25 -16
- package/es/HiSelect/SelectInput.js +3 -8
- package/es/HiSelectableList/HiSelectableList.js +51 -49
- package/es/HiSelectableList/HiSelectableListItem.js +7 -5
- package/es/HiTable/BodyCellBuilder.js +11 -4
- package/es/HiTable/BodyCells/CellAccount.js +7 -5
- package/es/HiTable/BodyCells/CellAccountNumber.js +6 -1
- package/es/HiTable/BodyCells/CellAddress.js +6 -1
- package/es/HiTable/BodyCells/CellCountry.js +6 -1
- package/es/HiTable/BodyCells/CellDate.js +35 -40
- package/es/HiTable/BodyCells/CellIcon.js +6 -1
- package/es/HiTable/BodyCells/CellImage.js +6 -1
- package/es/HiTable/BodyCells/CellNumeric.js +6 -1
- package/es/HiTable/BodyCells/CellRate.js +6 -1
- package/es/HiTable/BodyCells/CellSentinel.js +6 -1
- package/es/HiTable/BodyCells/CellStatus.js +6 -1
- package/es/HiTable/BodyCells/CellText.js +50 -20
- package/es/HiTable/BodyCells/CellThirdPartySecurity.js +6 -1
- package/es/HiTable/BodyRow.js +7 -2
- package/es/HiTable/ColumnFilter.js +1 -4
- package/es/HiTable/HeaderCell.js +16 -9
- package/es/HiTable/HiStickyRow.js +21 -14
- package/es/HiTable/HiTable.js +4 -40
- package/es/HiTable/HiTableBody.js +78 -26
- package/es/HiTable/HiTableContextMenu.js +28 -16
- package/es/HiTable/HiTableFooter.js +5 -0
- package/es/HiTable/HiTableHead.js +11 -6
- package/es/HiTopBar/HiTopBar.js +5 -0
- package/es/svg-icons/Cancel.js +2 -0
- package/es/svg-icons/HiBriefcaseRescue.js +15 -0
- package/es/svg-icons/index.js +2 -1
- package/es/utils/HiIconBuilder.js +6 -2
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +7 -1
- package/svg-icons/Cancel.js +2 -0
- package/svg-icons/HiBriefcaseRescue.js +30 -0
- package/svg-icons/index.js +9 -0
- package/umd/hipay-material-ui.development.js +110915 -119592
- package/umd/hipay-material-ui.production.min.js +5 -5
- 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
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
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
|
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,
|
package/es/HiTopBar/HiTopBar.js
CHANGED
@@ -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,
|
package/es/svg-icons/Cancel.js
CHANGED
@@ -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;
|
package/es/svg-icons/index.js
CHANGED
@@ -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
package/index.js
CHANGED
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.
|
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
|
}
|
package/svg-icons/Cancel.js
CHANGED
@@ -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;
|
package/svg-icons/index.js
CHANGED
@@ -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 }; }
|