@hipay/hipay-material-ui 1.0.0-beta.7 → 1.0.0-beta.8
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/HiBreadcrumb/HiBreadcrumb.js +143 -0
- package/HiBreadcrumb/HiStep.js +123 -0
- package/HiBreadcrumb/HiStepConnector.js +142 -0
- package/HiBreadcrumb/HiStepIcon.js +134 -0
- package/HiBreadcrumb/HiStepLabel.js +182 -0
- package/HiBreadcrumb/HiStepper.js +125 -0
- package/HiBreadcrumb/index.js +16 -0
- package/HiDatePicker/HiDateRangeSelector.js +1 -1
- package/HiForm/HiFormControl.js +19 -27
- package/HiForm/HiSearchField.js +1 -1
- package/HiPins/HiPins.js +0 -1
- package/HiSelectableList/HiSelectableListItem.js +22 -9
- package/HiTable/BodyCells/CellLayout.js +5 -1
- package/HiTable/BodyCells/CellStatus.js +5 -1
- package/HiTable/BodyCells/CellText.js +2 -1
- package/HiTable/ColumnFilter.js +5 -1
- package/HiTable/HiTable.js +15 -8
- package/HiTable/HiTableBody.js +13 -3
- package/HiTable/OrderColumns.js +6 -2
- package/es/HiBreadcrumb/HiBreadcrumb.js +73 -0
- package/es/HiBreadcrumb/HiStep.js +93 -0
- package/es/HiBreadcrumb/HiStepConnector.js +83 -0
- package/es/HiBreadcrumb/HiStepIcon.js +81 -0
- package/es/HiBreadcrumb/HiStepLabel.js +154 -0
- package/es/HiBreadcrumb/HiStepper.js +62 -0
- package/es/HiBreadcrumb/index.js +1 -0
- package/es/HiDatePicker/HiDateRangeSelector.js +1 -1
- package/es/HiForm/HiFormControl.js +15 -15
- package/es/HiForm/HiSearchField.js +1 -1
- package/es/HiPins/HiPins.js +0 -1
- package/es/HiSelectableList/HiSelectableListItem.js +21 -9
- package/es/HiTable/BodyCells/CellLayout.js +5 -1
- package/es/HiTable/BodyCells/CellStatus.js +5 -1
- package/es/HiTable/BodyCells/CellText.js +2 -1
- package/es/HiTable/ColumnFilter.js +5 -1
- package/es/HiTable/HiTable.js +15 -8
- package/es/HiTable/HiTableBody.js +13 -3
- package/es/HiTable/OrderColumns.js +6 -2
- package/package.json +1 -1
- package/umd/hipay-material-ui.development.js +104 -66
- package/umd/hipay-material-ui.production.min.js +2 -2
@@ -0,0 +1,182 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.styles = undefined;
|
7
|
+
|
8
|
+
var _defineProperty2 = require('babel-runtime/helpers/defineProperty');
|
9
|
+
|
10
|
+
var _defineProperty3 = _interopRequireDefault(_defineProperty2);
|
11
|
+
|
12
|
+
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
13
|
+
|
14
|
+
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
15
|
+
|
16
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
17
|
+
|
18
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
19
|
+
|
20
|
+
var _react = require('react');
|
21
|
+
|
22
|
+
var _react2 = _interopRequireDefault(_react);
|
23
|
+
|
24
|
+
var _propTypes = require('prop-types');
|
25
|
+
|
26
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
27
|
+
|
28
|
+
var _classnames = require('classnames');
|
29
|
+
|
30
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
31
|
+
|
32
|
+
var _styles = require('../styles');
|
33
|
+
|
34
|
+
var _HiStepIcon = require('./HiStepIcon');
|
35
|
+
|
36
|
+
var _HiStepIcon2 = _interopRequireDefault(_HiStepIcon);
|
37
|
+
|
38
|
+
var _HiPins = require('../HiPins');
|
39
|
+
|
40
|
+
var _HiPins2 = _interopRequireDefault(_HiPins);
|
41
|
+
|
42
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
43
|
+
|
44
|
+
var styles = exports.styles = function styles(theme) {
|
45
|
+
return {
|
46
|
+
root: {
|
47
|
+
display: 'flex',
|
48
|
+
alignItems: 'center'
|
49
|
+
},
|
50
|
+
test: {
|
51
|
+
marginLeft: '0 '
|
52
|
+
},
|
53
|
+
vertical: {
|
54
|
+
marginTop: -10,
|
55
|
+
marginBottom: -6
|
56
|
+
},
|
57
|
+
label: (0, _extends3.default)({
|
58
|
+
display: 'inline-block',
|
59
|
+
marginLeft: 4,
|
60
|
+
fontWeight: theme.typography.fontWeightRegular,
|
61
|
+
color: theme.palette.neutral.normal,
|
62
|
+
marginBottom: -4
|
63
|
+
}, theme.typography.body3),
|
64
|
+
labelContainer: {
|
65
|
+
marginBottom: 4,
|
66
|
+
maxWidth: 160
|
67
|
+
},
|
68
|
+
validated: {
|
69
|
+
color: theme.palette.status[116]
|
70
|
+
},
|
71
|
+
refused: {
|
72
|
+
color: theme.palette.negative.normal
|
73
|
+
},
|
74
|
+
active: {
|
75
|
+
fontWeight: theme.typography.fontWeightMedium
|
76
|
+
},
|
77
|
+
warning: {
|
78
|
+
color: theme.palette.middle.normal
|
79
|
+
},
|
80
|
+
pin: {
|
81
|
+
marginLeft: 4
|
82
|
+
},
|
83
|
+
shortEllipsis: {
|
84
|
+
display: 'inline-block',
|
85
|
+
overflow: 'hidden',
|
86
|
+
textOverflow: 'ellipsis',
|
87
|
+
whiteSpace: 'pre',
|
88
|
+
maxWidth: 51
|
89
|
+
},
|
90
|
+
longEllipsis: {
|
91
|
+
display: 'inline-block',
|
92
|
+
overflow: 'hidden',
|
93
|
+
textOverflow: 'ellipsis',
|
94
|
+
whiteSpace: 'pre',
|
95
|
+
maxWidth: 90
|
96
|
+
}
|
97
|
+
};
|
98
|
+
};
|
99
|
+
|
100
|
+
function HiStepLabel(props) {
|
101
|
+
var _classNames2;
|
102
|
+
|
103
|
+
var active = props.active,
|
104
|
+
children = props.children,
|
105
|
+
classes = props.classes,
|
106
|
+
classNameProp = props.className,
|
107
|
+
icon = props.icon,
|
108
|
+
notificationNumber = props.notificationNumber,
|
109
|
+
orientation = props.orientation,
|
110
|
+
status = props.status,
|
111
|
+
other = (0, _objectWithoutProperties3.default)(props, ['active', 'children', 'classes', 'className', 'icon', 'notificationNumber', 'orientation', 'status']);
|
112
|
+
|
113
|
+
|
114
|
+
return _react2.default.createElement(
|
115
|
+
'span',
|
116
|
+
(0, _extends3.default)({
|
117
|
+
className: (0, _classnames2.default)(classes.root, (0, _defineProperty3.default)({}, classes.vertical, orientation === 'vertical'), classNameProp)
|
118
|
+
}, other),
|
119
|
+
icon && _react2.default.createElement(
|
120
|
+
'span',
|
121
|
+
{ className: classes.iconContainer },
|
122
|
+
_react2.default.createElement(_HiStepIcon2.default, { active: active, status: status })
|
123
|
+
),
|
124
|
+
_react2.default.createElement(
|
125
|
+
'span',
|
126
|
+
{ className: classes.labelContainer },
|
127
|
+
_react2.default.createElement(
|
128
|
+
'div',
|
129
|
+
{
|
130
|
+
className: (0, _classnames2.default)(classes.label, (_classNames2 = {}, (0, _defineProperty3.default)(_classNames2, classes.validated, status === 'validated'), (0, _defineProperty3.default)(_classNames2, classes.refused, status === 'refused'), (0, _defineProperty3.default)(_classNames2, classes.warning, status === 'warning'), (0, _defineProperty3.default)(_classNames2, classes.active, active), (0, _defineProperty3.default)(_classNames2, classes.shortEllipsis, notificationNumber > 0), (0, _defineProperty3.default)(_classNames2, classes.longEllipsis, notificationNumber === 0), _classNames2))
|
131
|
+
},
|
132
|
+
children
|
133
|
+
),
|
134
|
+
notificationNumber > 0 && _react2.default.createElement(
|
135
|
+
'span',
|
136
|
+
{ className: classes.pin },
|
137
|
+
_react2.default.createElement(
|
138
|
+
_HiPins2.default,
|
139
|
+
{
|
140
|
+
color: props.theme.palette.business.primary.normal,
|
141
|
+
className: classes.test
|
142
|
+
},
|
143
|
+
notificationNumber
|
144
|
+
)
|
145
|
+
)
|
146
|
+
)
|
147
|
+
);
|
148
|
+
}
|
149
|
+
|
150
|
+
HiStepLabel.propTypes = process.env.NODE_ENV !== "production" ? {
|
151
|
+
/**
|
152
|
+
* @ignore
|
153
|
+
* Sets the step as active. Is passed to child components.
|
154
|
+
*/
|
155
|
+
active: _propTypes2.default.bool,
|
156
|
+
/**
|
157
|
+
* In most cases will simply be a string containing a title for the label.
|
158
|
+
*/
|
159
|
+
children: _propTypes2.default.node,
|
160
|
+
/**
|
161
|
+
* Custom styles for component.
|
162
|
+
*/
|
163
|
+
classes: _propTypes2.default.object.isRequired,
|
164
|
+
/**
|
165
|
+
* @ignore
|
166
|
+
*/
|
167
|
+
className: _propTypes2.default.string,
|
168
|
+
/**
|
169
|
+
* @ignore
|
170
|
+
*/
|
171
|
+
orientation: _propTypes2.default.oneOf(['horizontal', 'vertical']),
|
172
|
+
|
173
|
+
status: _propTypes2.default.oneOf(['unreviewed', 'refused', 'validated', 'warning'])
|
174
|
+
} : {};
|
175
|
+
|
176
|
+
HiStepLabel.defaultProps = {
|
177
|
+
active: false,
|
178
|
+
status: 'unreviewed',
|
179
|
+
orientation: 'vertical'
|
180
|
+
};
|
181
|
+
|
182
|
+
exports.default = (0, _styles.withStyles)(styles, { name: 'MuiHiStepLabel', withTheme: true })(HiStepLabel);
|
@@ -0,0 +1,125 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.styles = undefined;
|
7
|
+
|
8
|
+
var _extends2 = require('babel-runtime/helpers/extends');
|
9
|
+
|
10
|
+
var _extends3 = _interopRequireDefault(_extends2);
|
11
|
+
|
12
|
+
var _objectWithoutProperties2 = require('babel-runtime/helpers/objectWithoutProperties');
|
13
|
+
|
14
|
+
var _objectWithoutProperties3 = _interopRequireDefault(_objectWithoutProperties2);
|
15
|
+
|
16
|
+
var _getPrototypeOf = require('babel-runtime/core-js/object/get-prototype-of');
|
17
|
+
|
18
|
+
var _getPrototypeOf2 = _interopRequireDefault(_getPrototypeOf);
|
19
|
+
|
20
|
+
var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck');
|
21
|
+
|
22
|
+
var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
|
23
|
+
|
24
|
+
var _createClass2 = require('babel-runtime/helpers/createClass');
|
25
|
+
|
26
|
+
var _createClass3 = _interopRequireDefault(_createClass2);
|
27
|
+
|
28
|
+
var _possibleConstructorReturn2 = require('babel-runtime/helpers/possibleConstructorReturn');
|
29
|
+
|
30
|
+
var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
|
31
|
+
|
32
|
+
var _inherits2 = require('babel-runtime/helpers/inherits');
|
33
|
+
|
34
|
+
var _inherits3 = _interopRequireDefault(_inherits2);
|
35
|
+
|
36
|
+
var _react = require('react');
|
37
|
+
|
38
|
+
var _react2 = _interopRequireDefault(_react);
|
39
|
+
|
40
|
+
var _propTypes = require('prop-types');
|
41
|
+
|
42
|
+
var _propTypes2 = _interopRequireDefault(_propTypes);
|
43
|
+
|
44
|
+
var _classnames = require('classnames');
|
45
|
+
|
46
|
+
var _classnames2 = _interopRequireDefault(_classnames);
|
47
|
+
|
48
|
+
var _styles = require('../styles');
|
49
|
+
|
50
|
+
var _Paper = require('../Paper');
|
51
|
+
|
52
|
+
var _Paper2 = _interopRequireDefault(_Paper);
|
53
|
+
|
54
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
55
|
+
|
56
|
+
var styles = exports.styles = function styles(theme) {
|
57
|
+
return {
|
58
|
+
root: {
|
59
|
+
display: 'flex',
|
60
|
+
padding: theme.spacing.unit * 3,
|
61
|
+
maxWidth: 160,
|
62
|
+
flexDirection: 'column'
|
63
|
+
}
|
64
|
+
};
|
65
|
+
};
|
66
|
+
|
67
|
+
var HiStepper = function (_React$PureComponent) {
|
68
|
+
(0, _inherits3.default)(HiStepper, _React$PureComponent);
|
69
|
+
|
70
|
+
function HiStepper() {
|
71
|
+
(0, _classCallCheck3.default)(this, HiStepper);
|
72
|
+
return (0, _possibleConstructorReturn3.default)(this, (HiStepper.__proto__ || (0, _getPrototypeOf2.default)(HiStepper)).apply(this, arguments));
|
73
|
+
}
|
74
|
+
|
75
|
+
(0, _createClass3.default)(HiStepper, [{
|
76
|
+
key: 'render',
|
77
|
+
value: function render() {
|
78
|
+
var _props = this.props,
|
79
|
+
activeStep = _props.activeStep,
|
80
|
+
children = _props.children,
|
81
|
+
classes = _props.classes,
|
82
|
+
classNameProp = _props.className,
|
83
|
+
other = (0, _objectWithoutProperties3.default)(_props, ['activeStep', 'children', 'classes', 'className']);
|
84
|
+
|
85
|
+
|
86
|
+
var className = (0, _classnames2.default)(classes.root, classNameProp);
|
87
|
+
|
88
|
+
var childrenArray = _react2.default.Children.toArray(children.props.children);
|
89
|
+
|
90
|
+
var steps = childrenArray.map(function (step, index) {
|
91
|
+
return _react2.default.cloneElement(step, (0, _extends3.default)({ index: index, active: activeStep === index }, step.props));
|
92
|
+
});
|
93
|
+
|
94
|
+
return _react2.default.createElement(
|
95
|
+
_Paper2.default,
|
96
|
+
(0, _extends3.default)({ square: true, elevation: 0, className: className }, other),
|
97
|
+
steps
|
98
|
+
);
|
99
|
+
}
|
100
|
+
}]);
|
101
|
+
return HiStepper;
|
102
|
+
}(_react2.default.PureComponent);
|
103
|
+
|
104
|
+
HiStepper.defaultProps = {
|
105
|
+
activeStep: 0
|
106
|
+
};
|
107
|
+
HiStepper.propTypes = process.env.NODE_ENV !== "production" ? {
|
108
|
+
/**
|
109
|
+
* Set the active step (zero based index).
|
110
|
+
*/
|
111
|
+
activeStep: _propTypes2.default.number,
|
112
|
+
/**
|
113
|
+
* Two or more `<Step />` components.
|
114
|
+
*/
|
115
|
+
children: _propTypes2.default.node.isRequired,
|
116
|
+
/**
|
117
|
+
* Useful to extend the style applied to components.
|
118
|
+
*/
|
119
|
+
classes: _propTypes2.default.object.isRequired,
|
120
|
+
/**
|
121
|
+
* @ignore
|
122
|
+
*/
|
123
|
+
className: _propTypes2.default.string
|
124
|
+
} : {};
|
125
|
+
exports.default = (0, _styles.withStyles)(styles, { name: 'MuiHiStepper' })(HiStepper);
|
@@ -0,0 +1,16 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
|
7
|
+
var _HiBreadcrumb = require('./HiBreadcrumb');
|
8
|
+
|
9
|
+
Object.defineProperty(exports, 'default', {
|
10
|
+
enumerable: true,
|
11
|
+
get: function get() {
|
12
|
+
return _interopRequireDefault(_HiBreadcrumb).default;
|
13
|
+
}
|
14
|
+
});
|
15
|
+
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
@@ -85,7 +85,7 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
85
85
|
type = 'primary-highlight';
|
86
86
|
break;
|
87
87
|
case 'cd':
|
88
|
-
label = t.
|
88
|
+
label = t.today;
|
89
89
|
from = (0, _moment2.default)().subtract(1, 'day');
|
90
90
|
to = (0, _moment2.default)();
|
91
91
|
info = from.calendar() + ' ' + t.to_now;
|
package/HiForm/HiFormControl.js
CHANGED
@@ -149,6 +149,21 @@ var HiFormControl = function (_React$PureComponent) {
|
|
149
149
|
|
150
150
|
var _this = (0, _possibleConstructorReturn3.default)(this, (HiFormControl.__proto__ || (0, _getPrototypeOf2.default)(HiFormControl)).call(this, props));
|
151
151
|
|
152
|
+
_this.handleFocus = function (value) {
|
153
|
+
return function () {
|
154
|
+
_this.setState({ focused: value });
|
155
|
+
if (value === false && _this.state.hovered) {
|
156
|
+
_this.setState({ hovered: false });
|
157
|
+
}
|
158
|
+
};
|
159
|
+
};
|
160
|
+
|
161
|
+
_this.handleHover = function (value) {
|
162
|
+
return function () {
|
163
|
+
_this.setState({ hovered: value });
|
164
|
+
};
|
165
|
+
};
|
166
|
+
|
152
167
|
_this.state = {
|
153
168
|
helperOpen: false,
|
154
169
|
focused: false,
|
@@ -171,24 +186,9 @@ var HiFormControl = function (_React$PureComponent) {
|
|
171
186
|
event.preventDefault();
|
172
187
|
}
|
173
188
|
}
|
174
|
-
}, {
|
175
|
-
key: 'handleFocus',
|
176
|
-
value: function handleFocus(value) {
|
177
|
-
this.setState({ focused: value });
|
178
|
-
if (value === false && this.state.hovered) {
|
179
|
-
this.setState({ hovered: false });
|
180
|
-
}
|
181
|
-
}
|
182
|
-
}, {
|
183
|
-
key: 'handleHover',
|
184
|
-
value: function handleHover(value) {
|
185
|
-
this.setState({ hovered: value });
|
186
|
-
}
|
187
189
|
}, {
|
188
190
|
key: 'render',
|
189
191
|
value: function render() {
|
190
|
-
var _this2 = this;
|
191
|
-
|
192
192
|
var _props = this.props,
|
193
193
|
children = _props.children,
|
194
194
|
classes = _props.classes,
|
@@ -266,18 +266,10 @@ var HiFormControl = function (_React$PureComponent) {
|
|
266
266
|
_react2.default.createElement(
|
267
267
|
'div',
|
268
268
|
{
|
269
|
-
onMouseEnter:
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
return _this2.handleHover(false);
|
274
|
-
},
|
275
|
-
onFocus: function onFocus() {
|
276
|
-
return _this2.handleFocus(true);
|
277
|
-
},
|
278
|
-
onBlur: function onBlur() {
|
279
|
-
return _this2.handleFocus(false);
|
280
|
-
}
|
269
|
+
onMouseEnter: this.handleHover(true),
|
270
|
+
onMouseLeave: this.handleHover(false),
|
271
|
+
onFocus: this.handleFocus(true),
|
272
|
+
onBlur: this.handleFocus(false)
|
281
273
|
},
|
282
274
|
children
|
283
275
|
),
|
package/HiForm/HiSearchField.js
CHANGED
@@ -137,7 +137,7 @@ var HiSearchField = function (_React$Component) {
|
|
137
137
|
if (typeof this.props.onSearch === 'undefined') {
|
138
138
|
this.props.callbackFilteredList(this.props.itemList);
|
139
139
|
} else {
|
140
|
-
this.props.onSearch('');
|
140
|
+
this.props.onSearch(undefined, '');
|
141
141
|
}
|
142
142
|
}
|
143
143
|
}, {
|
package/HiPins/HiPins.js
CHANGED
@@ -42,7 +42,6 @@ var styles = exports.styles = function styles(theme) {
|
|
42
42
|
textAlign: 'center',
|
43
43
|
borderRadius: '45px',
|
44
44
|
verticalAlign: 'middle',
|
45
|
-
margin: 0.5 * theme.spacing.unit,
|
46
45
|
fontSize: 11,
|
47
46
|
fontWeight: theme.typography.fontWeightMedium,
|
48
47
|
fontFamily: theme.typography.fontFamily
|
@@ -79,7 +79,8 @@ var styles = exports.styles = function styles(theme) {
|
|
79
79
|
return {
|
80
80
|
listItem: {
|
81
81
|
padding: 9 + 'px 0px',
|
82
|
-
fontWeight: theme.typography.fontWeightRegular
|
82
|
+
fontWeight: theme.typography.fontWeightRegular,
|
83
|
+
maxHeight: 40
|
83
84
|
},
|
84
85
|
listItemTitle: {
|
85
86
|
padding: 9 + 'px 0px',
|
@@ -170,6 +171,11 @@ var styles = exports.styles = function styles(theme) {
|
|
170
171
|
color: '#000000'
|
171
172
|
}
|
172
173
|
},
|
174
|
+
labelHighlightColored: {
|
175
|
+
'&>strong': {
|
176
|
+
fontWeight: theme.typography.fontWeightMedium
|
177
|
+
}
|
178
|
+
},
|
173
179
|
primaryHighlight: {
|
174
180
|
fontWeight: theme.typography.fontWeightMedium,
|
175
181
|
color: theme.palette.business.primary.normal,
|
@@ -261,13 +267,7 @@ var HiSelectableListItem = function (_React$Component) {
|
|
261
267
|
return _react2.default.createElement(
|
262
268
|
'div',
|
263
269
|
{ className: itemTextClass, 'data-id': item.id },
|
264
|
-
|
265
|
-
className: classes.labelHighlight,
|
266
|
-
dangerouslySetInnerHTML: {
|
267
|
-
__html: (0, _hiHelpers.escapeHTML)(item.labelHighlight)
|
268
|
-
}
|
269
|
-
}),
|
270
|
-
!item.labelHighlight && _this.getItemLabel(item),
|
270
|
+
_this.getItemLabel(item),
|
271
271
|
_react2.default.createElement(
|
272
272
|
'span',
|
273
273
|
{ className: classes.listItemSecondaryText },
|
@@ -295,8 +295,21 @@ var HiSelectableListItem = function (_React$Component) {
|
|
295
295
|
}, {
|
296
296
|
key: 'getItemLabel',
|
297
297
|
value: function getItemLabel(item) {
|
298
|
-
|
298
|
+
var classes = this.props.classes;
|
299
|
+
|
300
|
+
if (!item.labelHighlight && item.color && this.props.selected) {
|
299
301
|
return _react2.default.createElement(_HiColoredLabel2.default, { color: item.color, label: item.label });
|
302
|
+
} else if (item.labelHighlight) {
|
303
|
+
var mLabel = _react2.default.createElement('span', {
|
304
|
+
className: item.color ? classes.labelHighlightColored : classes.labelHighlight,
|
305
|
+
dangerouslySetInnerHTML: {
|
306
|
+
__html: (0, _hiHelpers.escapeHTML)(item.labelHighlight)
|
307
|
+
}
|
308
|
+
});
|
309
|
+
if (item.color && this.props.selected) {
|
310
|
+
return _react2.default.createElement(_HiColoredLabel2.default, { color: item.color, label: mLabel });
|
311
|
+
}
|
312
|
+
return mLabel;
|
300
313
|
}
|
301
314
|
return item.label;
|
302
315
|
}
|
@@ -83,6 +83,10 @@ var styles = exports.styles = function styles(theme) {
|
|
83
83
|
lookedUp: {
|
84
84
|
background: 'linear-gradient(0deg, transparent 25%, #FFFF8D 10%, #FFFF8D 75%, transparent 30%)',
|
85
85
|
borderRadius: '45%'
|
86
|
+
},
|
87
|
+
pins: {
|
88
|
+
position: 'relative',
|
89
|
+
top: 3
|
86
90
|
}
|
87
91
|
};
|
88
92
|
};
|
@@ -196,7 +200,7 @@ var CellLayout = function (_React$Component) {
|
|
196
200
|
},
|
197
201
|
_react2.default.createElement(
|
198
202
|
_HiPins2.default,
|
199
|
-
{ color: theme.palette.business.primary.normal },
|
203
|
+
{ color: theme.palette.business.primary.normal, className: classes.pins },
|
200
204
|
childrenCount
|
201
205
|
)
|
202
206
|
)
|
@@ -55,6 +55,10 @@ var styles = exports.styles = function styles(theme) {
|
|
55
55
|
display: 'inline-flex',
|
56
56
|
alignItems: 'baseline',
|
57
57
|
maxWidth: 'calc(100% - 36px)'
|
58
|
+
},
|
59
|
+
pins: {
|
60
|
+
position: 'relative',
|
61
|
+
bottom: 1
|
58
62
|
}
|
59
63
|
};
|
60
64
|
};
|
@@ -93,7 +97,7 @@ var CellStatus = function (_React$PureComponent) {
|
|
93
97
|
_react2.default.createElement(_HiColoredLabel2.default, { label: value, color: color }),
|
94
98
|
_react2.default.createElement(
|
95
99
|
_HiPins2.default,
|
96
|
-
{ color: color, onClick: onOpenDetails },
|
100
|
+
{ color: color, onClick: onOpenDetails, className: classes.pins },
|
97
101
|
nbOperations
|
98
102
|
)
|
99
103
|
) : _react2.default.createElement(_HiColoredLabel2.default, { label: value, color: color })
|
package/HiTable/ColumnFilter.js
CHANGED
@@ -345,7 +345,11 @@ var ColumnFilter = function (_React$Component) {
|
|
345
345
|
_react2.default.createElement(
|
346
346
|
'div',
|
347
347
|
{ className: classes.menuItemFilter },
|
348
|
-
|
348
|
+
_react2.default.createElement(
|
349
|
+
'span',
|
350
|
+
{ style: { marginRight: 4 } },
|
351
|
+
translations.filter
|
352
|
+
),
|
349
353
|
_react2.default.createElement(
|
350
354
|
_HiPins2.default,
|
351
355
|
{
|
package/HiTable/HiTable.js
CHANGED
@@ -705,7 +705,8 @@ var HiTable = function (_React$Component) {
|
|
705
705
|
translations = _props.translations,
|
706
706
|
view = _props.view,
|
707
707
|
groupBy = _props.groupBy,
|
708
|
-
lookupColumns = _props.lookupColumns
|
708
|
+
lookupColumns = _props.lookupColumns,
|
709
|
+
loading = _props.loading;
|
709
710
|
var _state = this.state,
|
710
711
|
dateUpdate = _state.dateUpdate,
|
711
712
|
isScrollToBottom = _state.isScrollToBottom,
|
@@ -780,7 +781,8 @@ var HiTable = function (_React$Component) {
|
|
780
781
|
groupBy: groupBy,
|
781
782
|
onClickNext: this.handleNextStickyRow,
|
782
783
|
groupByIds: groupByIds,
|
783
|
-
lookupColumns: lookupColumns
|
784
|
+
lookupColumns: lookupColumns,
|
785
|
+
loading: loading
|
784
786
|
}),
|
785
787
|
infiniteScroll && _react2.default.createElement(_HiTableFooterScroll2.default, {
|
786
788
|
tabId: tabId,
|
@@ -849,7 +851,8 @@ HiTable.defaultProps = {
|
|
849
851
|
}
|
850
852
|
},
|
851
853
|
view: 'l',
|
852
|
-
lookupColumns: []
|
854
|
+
lookupColumns: [],
|
855
|
+
loading: false
|
853
856
|
};
|
854
857
|
HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
855
858
|
/**
|
@@ -880,6 +883,10 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
880
883
|
* Active le filtre sur les colonnes filtrables
|
881
884
|
*/
|
882
885
|
filterable: _propTypes2.default.bool,
|
886
|
+
/**
|
887
|
+
* Id de la colonne par laquelle sont regroupé les éléments
|
888
|
+
*/
|
889
|
+
groupBy: _propTypes2.default.string,
|
883
890
|
/**
|
884
891
|
* Ajoute le loader et le requestNextDatas en fin de tableau (si infiniteScroll activé)
|
885
892
|
*/
|
@@ -892,6 +899,10 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
892
899
|
* Ajoute l'infinite scroll
|
893
900
|
*/
|
894
901
|
infiniteScroll: _propTypes2.default.bool,
|
902
|
+
/**
|
903
|
+
* État du tableau en cours de chargement des données
|
904
|
+
*/
|
905
|
+
loading: _propTypes2.default.bool,
|
895
906
|
/**
|
896
907
|
* Identifiant de la ou des colonnes sur la/lesquelles il y a une 'lookup' search
|
897
908
|
*/
|
@@ -1003,10 +1014,6 @@ HiTable.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
1003
1014
|
* Taille du tableau (L/M/S),
|
1004
1015
|
* définit l'espace entre les cellules et leurs tailles par default
|
1005
1016
|
*/
|
1006
|
-
view: _propTypes2.default.oneOf(['l', 'm', 's'])
|
1007
|
-
/**
|
1008
|
-
* Id de la colonne par laquelle sont regroupé les éléments
|
1009
|
-
*/
|
1010
|
-
groupBy: _propTypes2.default.string
|
1017
|
+
view: _propTypes2.default.oneOf(['l', 'm', 's'])
|
1011
1018
|
} : {};
|
1012
1019
|
exports.default = (0, _styles.withStyles)(styles, { withTheme: true, name: 'HmuiHiTable' })(HiTable);
|
package/HiTable/HiTableBody.js
CHANGED
@@ -281,7 +281,8 @@ var HiTableBody = function (_React$Component) {
|
|
281
281
|
numberLocale = _props.numberLocale,
|
282
282
|
groupByIds = _props.groupByIds,
|
283
283
|
sortedColumnId = _props.sortedColumnId,
|
284
|
-
lookupColumns = _props.lookupColumns
|
284
|
+
lookupColumns = _props.lookupColumns,
|
285
|
+
loading = _props.loading;
|
285
286
|
var _state = this.state,
|
286
287
|
openedParentRowId = _state.openedParentRowId,
|
287
288
|
openedDetailsRowIdList = _state.openedDetailsRowIdList;
|
@@ -421,7 +422,11 @@ var HiTableBody = function (_React$Component) {
|
|
421
422
|
{
|
422
423
|
id: tabId + '-body',
|
423
424
|
className: classes.tbody,
|
424
|
-
style: {
|
425
|
+
style: (0, _extends3.default)({
|
426
|
+
height: height
|
427
|
+
}, loading && {
|
428
|
+
opacity: 0.6
|
429
|
+
}),
|
425
430
|
onScroll: onScroll
|
426
431
|
},
|
427
432
|
tableRows.map(function (tableRow) {
|
@@ -442,7 +447,8 @@ HiTableBody.defaultProps = {
|
|
442
447
|
dense: false,
|
443
448
|
height: 450,
|
444
449
|
sticky: true,
|
445
|
-
view: 'l'
|
450
|
+
view: 'l',
|
451
|
+
loading: false
|
446
452
|
};
|
447
453
|
HiTableBody.propTypes = process.env.NODE_ENV !== "production" ? {
|
448
454
|
/**
|
@@ -474,6 +480,10 @@ HiTableBody.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
474
480
|
* Hauteur du tableau (px)
|
475
481
|
*/
|
476
482
|
height: _propTypes2.default.number,
|
483
|
+
/**
|
484
|
+
* État du tableau en cours de chargement des données
|
485
|
+
*/
|
486
|
+
loading: _propTypes2.default.bool,
|
477
487
|
/**
|
478
488
|
* Identifiant de la ou des colonnes sur la/lesquelles il y a une 'lookup' search
|
479
489
|
*/
|
package/HiTable/OrderColumns.js
CHANGED
@@ -141,7 +141,8 @@ var styles = exports.styles = function styles(theme) {
|
|
141
141
|
controlLabelRoot: {
|
142
142
|
marginLeft: 6,
|
143
143
|
marginBottom: 8,
|
144
|
-
fontSize: 15
|
144
|
+
fontSize: 15,
|
145
|
+
width: 160
|
145
146
|
},
|
146
147
|
switchLabelRoot: {
|
147
148
|
marginLeft: 15,
|
@@ -150,7 +151,10 @@ var styles = exports.styles = function styles(theme) {
|
|
150
151
|
columnLabel: {
|
151
152
|
position: 'relative',
|
152
153
|
top: 5,
|
153
|
-
left: 5
|
154
|
+
left: 5,
|
155
|
+
overflow: 'hidden',
|
156
|
+
textOverflow: 'ellipsis',
|
157
|
+
whiteSpace: 'nowrap'
|
154
158
|
},
|
155
159
|
label: {
|
156
160
|
fontWeight: 'inherit'
|