@hipay/hipay-material-ui 1.0.0-beta.26 → 1.0.0-beta.28
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 +37 -0
- package/HiCheckbox/HiCheckbox.js +6 -3
- package/HiColoredLabel/HiColoredLabel.js +2 -2
- package/HiDatePicker/HiDateRangeSelector.js +32 -9
- package/HiForm/HiFormControl.js +4 -4
- package/HiForm/HiSearchField.js +7 -1
- package/HiSelect/HiSelect.js +195 -83
- package/HiSelect/HiSuggestSelect.js +22 -6
- package/HiSelect/SelectInput.js +63 -10
- package/HiSelectableList/HiSelectableListItem.js +2 -1
- package/HiTable/BodyCellBuilder.js +22 -16
- package/HiTable/BodyCells/CellAccount.js +1 -5
- package/HiTable/BodyCells/CellAddress.js +3 -50
- package/HiTable/BodyCells/CellCountry.js +0 -4
- package/HiTable/BodyCells/CellDate.js +4 -13
- package/HiTable/BodyCells/CellIcon.js +10 -27
- package/HiTable/BodyCells/CellImage.js +1 -21
- package/HiTable/BodyCells/CellLayout.js +11 -4
- package/HiTable/BodyCells/CellNumeric.js +3 -23
- package/HiTable/BodyCells/CellRate.js +3 -3
- package/HiTable/BodyCells/CellSentinel.js +20 -49
- package/HiTable/BodyCells/CellStatus.js +11 -19
- package/HiTable/BodyCells/CellText.js +3 -10
- package/HiTable/BodyCells/CellThirdPartySecurity.js +4 -18
- package/HiTable/BodyCells/index.js +0 -9
- package/HiTable/BodyRow.js +15 -17
- package/HiTable/HiTable.js +41 -26
- package/HiTable/HiTableBody.js +2 -1
- package/HiTable/HiTableContextMenu.js +4 -3
- package/HiTable/HiTableFooter.js +5 -6
- package/HiTable/constants.js +2 -2
- package/es/HiCheckbox/HiCheckbox.js +6 -3
- package/es/HiColoredLabel/HiColoredLabel.js +2 -2
- package/es/HiDatePicker/HiDateRangeSelector.js +27 -9
- package/es/HiForm/HiFormControl.js +4 -4
- package/es/HiForm/HiSearchField.js +2 -1
- package/es/HiSelect/HiSelect.js +141 -42
- package/es/HiSelect/HiSuggestSelect.js +22 -7
- package/es/HiSelect/SelectInput.js +50 -10
- package/es/HiSelectableList/HiSelectableListItem.js +2 -1
- package/es/HiTable/BodyCellBuilder.js +21 -19
- package/es/HiTable/BodyCells/CellAccount.js +1 -5
- package/es/HiTable/BodyCells/CellAddress.js +3 -44
- package/es/HiTable/BodyCells/CellCountry.js +0 -2
- package/es/HiTable/BodyCells/CellDate.js +4 -10
- package/es/HiTable/BodyCells/CellIcon.js +10 -24
- package/es/HiTable/BodyCells/CellImage.js +1 -21
- package/es/HiTable/BodyCells/CellLayout.js +10 -4
- package/es/HiTable/BodyCells/CellNumeric.js +3 -16
- package/es/HiTable/BodyCells/CellRate.js +3 -3
- package/es/HiTable/BodyCells/CellSentinel.js +20 -46
- package/es/HiTable/BodyCells/CellStatus.js +11 -16
- package/es/HiTable/BodyCells/CellText.js +3 -7
- package/es/HiTable/BodyCells/CellThirdPartySecurity.js +3 -15
- package/es/HiTable/BodyCells/index.js +0 -2
- package/es/HiTable/BodyRow.js +12 -14
- package/es/HiTable/HiTable.js +41 -26
- package/es/HiTable/HiTableBody.js +2 -1
- package/es/HiTable/HiTableContextMenu.js +4 -3
- package/es/HiTable/HiTableFooter.js +6 -6
- package/es/HiTable/constants.js +7 -7
- package/es/utils/HiIconBuilder.js +12 -4
- package/es/utils/hiHelpers.js +1 -1
- package/index.es.js +1 -1
- package/index.js +1 -1
- package/package.json +1 -1
- package/umd/hipay-material-ui.development.js +9093 -9629
- package/umd/hipay-material-ui.production.min.js +5 -5
- package/utils/HiIconBuilder.js +13 -3
- package/utils/hiHelpers.js +1 -1
- package/HiTable/BodyCells/CellAccountNumber.js +0 -229
- package/es/HiTable/BodyCells/CellAccountNumber.js +0 -171
package/HI-CHANGELOG.md
CHANGED
@@ -1,3 +1,40 @@
|
|
1
|
+
<a name="1.0.0-beta.27"></a>
|
2
|
+
# 1.0.0-beta.27 (2018-08-27)
|
3
|
+
|
4
|
+
|
5
|
+
### Bug Fixes
|
6
|
+
|
7
|
+
* **BodyRow:** add locale vars to child BodyRow ([9252382](https://gitlab.hipay.org/backend/hipay-material-ui/commit/9252382))
|
8
|
+
* **CellDate:** Handle date with moment & use prop format ([7fa8bf5](https://gitlab.hipay.org/backend/hipay-material-ui/commit/7fa8bf5))
|
9
|
+
* **HeaderCell:** set sort icons always on the right of the title ([0704619](https://gitlab.hipay.org/backend/hipay-material-ui/commit/0704619))
|
10
|
+
* **HiDateRangePicker:** Keep focus on change dateTo if user types directly into the input to see date selection into calendar ([e998c60](https://gitlab.hipay.org/backend/hipay-material-ui/commit/e998c60))
|
11
|
+
* **HiDateRangePicker:** Reset date range picker input to ([b1a66f3](https://gitlab.hipay.org/backend/hipay-material-ui/commit/b1a66f3))
|
12
|
+
* **HiDateRangeSelector:** UPD select value from parent component (defaultPreset property) ([90bb994](https://gitlab.hipay.org/backend/hipay-material-ui/commit/90bb994))
|
13
|
+
* **HiFormControl:** add error on disabled fields ([87ef0b6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/87ef0b6))
|
14
|
+
* **HiInput:** Keep focus on reset HiInput ([a84edab](https://gitlab.hipay.org/backend/hipay-material-ui/commit/a84edab))
|
15
|
+
* **HiPins:** Add theme business primary color as default background color for HiPins and fix line-height ([23aa2d9](https://gitlab.hipay.org/backend/hipay-material-ui/commit/23aa2d9))
|
16
|
+
* **HiSelect:** add dynamic prop to handle dynamic select with initial options ([c668b90](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c668b90))
|
17
|
+
* **HiSelect:** Display option label instead of all for selects with 1 option ([e47574a](https://gitlab.hipay.org/backend/hipay-material-ui/commit/e47574a))
|
18
|
+
* **HiSelect:** Don't try to display unique selected options item when still loading ([116a72a](https://gitlab.hipay.org/backend/hipay-material-ui/commit/116a72a))
|
19
|
+
* **HiSelect:** Enable to handle hierarchic padding via options prop level ([dc4e5d8](https://gitlab.hipay.org/backend/hipay-material-ui/commit/dc4e5d8))
|
20
|
+
* **HiSelect:** Handle unique and undefined selected item ([8dbb542](https://gitlab.hipay.org/backend/hipay-material-ui/commit/8dbb542))
|
21
|
+
* **HiSelectableList:** item displayed only if item.displayed != false ([e65b865](https://gitlab.hipay.org/backend/hipay-material-ui/commit/e65b865))
|
22
|
+
* **HiTable:** Add default translations object to HeaderCell ([4ed766f](https://gitlab.hipay.org/backend/hipay-material-ui/commit/4ed766f))
|
23
|
+
* **HiTable:** Performance optimization ([3ca60d3](https://gitlab.hipay.org/backend/hipay-material-ui/commit/3ca60d3))
|
24
|
+
* **HiTable:** remove anchorEls from state to remove circular structure in JSON compares ([c064ce9](https://gitlab.hipay.org/backend/hipay-material-ui/commit/c064ce9))
|
25
|
+
* **SelectInput:** selected choice label not overflowing on right arrow of HiSelect ([a7d7058](https://gitlab.hipay.org/backend/hipay-material-ui/commit/a7d7058))
|
26
|
+
|
27
|
+
|
28
|
+
### Features
|
29
|
+
|
30
|
+
* **CellText:** add color props ([ff2bba8](https://gitlab.hipay.org/backend/hipay-material-ui/commit/ff2bba8))
|
31
|
+
* **HiChip:** enable to display tooltip on HiChip via the prop 'title' ([6b15ca6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/6b15ca6))
|
32
|
+
* **HiDateRangePicker:** Add onBlur prop function to handle date errors properly ([df79494](https://gitlab.hipay.org/backend/hipay-material-ui/commit/df79494))
|
33
|
+
* **HiTableContextMenu:** handle hide lookup/exclude menu item for each column ([03e00cb](https://gitlab.hipay.org/backend/hipay-material-ui/commit/03e00cb))
|
34
|
+
* **workflow:** Add HI-CHANGELOG generation from commits ([edee0f6](https://gitlab.hipay.org/backend/hipay-material-ui/commit/edee0f6))
|
35
|
+
|
36
|
+
|
37
|
+
|
1
38
|
<a name="1.0.0-beta.26"></a>
|
2
39
|
# 1.0.0-beta.26 (2018-08-24)
|
3
40
|
|
package/HiCheckbox/HiCheckbox.js
CHANGED
@@ -70,10 +70,13 @@ var styles = exports.styles = function styles(theme) {
|
|
70
70
|
marginLeft: 12
|
71
71
|
},
|
72
72
|
checked: {
|
73
|
-
color: theme.palette.business.primary.normal
|
73
|
+
color: theme.palette.business.primary.normal,
|
74
|
+
'&$disabled': {
|
75
|
+
color: '#999999'
|
76
|
+
}
|
74
77
|
},
|
75
78
|
disabled: {
|
76
|
-
color: theme.palette.
|
79
|
+
color: theme.palette.placeholder
|
77
80
|
}
|
78
81
|
};
|
79
82
|
}; //
|
@@ -85,7 +88,7 @@ var HiCheckbox = function (_React$Component) {
|
|
85
88
|
function HiCheckbox(props) {
|
86
89
|
(0, _classCallCheck3.default)(this, HiCheckbox);
|
87
90
|
|
88
|
-
var _this = (0, _possibleConstructorReturn3.default)(this, (HiCheckbox.__proto__ || (0, _getPrototypeOf2.default)(HiCheckbox)).call(this));
|
91
|
+
var _this = (0, _possibleConstructorReturn3.default)(this, (HiCheckbox.__proto__ || (0, _getPrototypeOf2.default)(HiCheckbox)).call(this, props));
|
89
92
|
|
90
93
|
_this.handleChange = _this.handleChange.bind(_this);
|
91
94
|
return _this;
|
@@ -32,10 +32,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
32
32
|
var styles = exports.styles = function styles(theme) {
|
33
33
|
return {
|
34
34
|
root: {
|
35
|
-
display: 'inline-
|
35
|
+
display: 'inline-block',
|
36
36
|
alignItems: 'baseline',
|
37
37
|
maxWidth: '100%',
|
38
|
-
padding: '2px
|
38
|
+
padding: '2px 8px',
|
39
39
|
borderRadius: 2,
|
40
40
|
textOverflow: 'ellipsis',
|
41
41
|
overflow: 'hidden',
|
@@ -130,7 +130,7 @@ function buildDateRangeOptionByKey(key, t, format) {
|
|
130
130
|
label = t.previous_quarter;
|
131
131
|
from = (0, _moment2.default)().subtract(1, 'quarter').startOf('quarter');
|
132
132
|
to = (0, _moment2.default)().subtract(1, 'quarter').endOf('quarter');
|
133
|
-
info = from.format('YYYY') + '-
|
133
|
+
info = from.format('YYYY') + '-' + t.short_quarter + from.format('Q') + ', ' + to.diff(from, 'days') + ' ' + t.days;
|
134
134
|
break;
|
135
135
|
case 'cy':
|
136
136
|
label = t.current_year;
|
@@ -193,6 +193,11 @@ var HiDateRangeSelector = function (_React$Component) {
|
|
193
193
|
_this.props.onChange('from', selectedOption.from.toDate());
|
194
194
|
_this.props.onChange('to', selectedOption.to.toDate());
|
195
195
|
}
|
196
|
+
} else {
|
197
|
+
_this.setState({
|
198
|
+
defaultFrom: undefined,
|
199
|
+
defaultTo: undefined
|
200
|
+
});
|
196
201
|
}
|
197
202
|
if (_this.props.returnSelectValue === true) {
|
198
203
|
_this.props.onChange('period', value);
|
@@ -200,17 +205,31 @@ var HiDateRangeSelector = function (_React$Component) {
|
|
200
205
|
};
|
201
206
|
};
|
202
207
|
|
203
|
-
_this.state = {
|
204
|
-
selectedPreset: props.defaultPreset,
|
205
|
-
containerWidth: 0
|
206
|
-
};
|
207
|
-
|
208
208
|
_this.handleReset = _this.handleReset.bind(_this);
|
209
209
|
_this.handleSelectChange = _this.handleSelectChange.bind(_this);
|
210
210
|
|
211
211
|
_this.options = props.availableOptionKeys.map(function (key) {
|
212
212
|
return buildDateRangeOptionByKey(key, props.translations, props.format);
|
213
213
|
});
|
214
|
+
|
215
|
+
var from = void 0;
|
216
|
+
var to = void 0;
|
217
|
+
if (props.defaultPreset !== 'custom') {
|
218
|
+
var selectedOption = _this.options.find(function (option) {
|
219
|
+
return option.id === props.defaultPreset;
|
220
|
+
});
|
221
|
+
if (selectedOption) {
|
222
|
+
from = selectedOption.from.toDate();
|
223
|
+
to = selectedOption.to.toDate();
|
224
|
+
}
|
225
|
+
}
|
226
|
+
|
227
|
+
_this.state = {
|
228
|
+
selectedPreset: props.defaultPreset,
|
229
|
+
containerWidth: 0,
|
230
|
+
defaultFrom: from,
|
231
|
+
defaultTo: to
|
232
|
+
};
|
214
233
|
return _this;
|
215
234
|
}
|
216
235
|
|
@@ -255,7 +274,10 @@ var HiDateRangeSelector = function (_React$Component) {
|
|
255
274
|
selectProps = _props.selectProps,
|
256
275
|
staticPosition = _props.staticPosition,
|
257
276
|
props = (0, _objectWithoutProperties3.default)(_props, ['disabled', 'enableTime', 'error', 'errorText', 'helperIcon', 'helperText', 'idRange', 'idSelect', 'label', 'from', 'onChange', 'required', 'to', 'translations', 'classes', 'selectProps', 'staticPosition']);
|
258
|
-
var
|
277
|
+
var _state = this.state,
|
278
|
+
defaultFrom = _state.defaultFrom,
|
279
|
+
defaultTo = _state.defaultTo,
|
280
|
+
selectedPreset = _state.selectedPreset;
|
259
281
|
|
260
282
|
|
261
283
|
return _react2.default.createElement(
|
@@ -296,8 +318,8 @@ var HiDateRangeSelector = function (_React$Component) {
|
|
296
318
|
_react2.default.createElement(_HiDateRangePicker2.default, (0, _extends3.default)({
|
297
319
|
classes: { root: classes.dateRangePicker },
|
298
320
|
id: idRange,
|
299
|
-
from: from,
|
300
|
-
to: to,
|
321
|
+
from: from || defaultFrom,
|
322
|
+
to: to || defaultTo,
|
301
323
|
enableTime: enableTime,
|
302
324
|
onChange: onChange,
|
303
325
|
onReset: this.handleReset,
|
@@ -338,6 +360,7 @@ HiDateRangeSelector.defaultProps = {
|
|
338
360
|
quarter: 'Quarter',
|
339
361
|
week: 'Week',
|
340
362
|
short_week: 'W',
|
363
|
+
short_quarter: 'Q',
|
341
364
|
year: 'Year',
|
342
365
|
days: 'days',
|
343
366
|
custom_period: 'Custom Period',
|
package/HiForm/HiFormControl.js
CHANGED
@@ -223,7 +223,7 @@ var HiFormControl = function (_React$PureComponent) {
|
|
223
223
|
error: error,
|
224
224
|
ref: rootRef
|
225
225
|
}, others),
|
226
|
-
|
226
|
+
error && errorText && helperOpen && _react2.default.createElement(
|
227
227
|
'div',
|
228
228
|
{ className: classes.errorDiv },
|
229
229
|
_react2.default.createElement('div', {
|
@@ -231,7 +231,7 @@ var HiFormControl = function (_React$PureComponent) {
|
|
231
231
|
}),
|
232
232
|
errorText
|
233
233
|
),
|
234
|
-
|
234
|
+
helperIcon && helperText && !error && helperOpen && _react2.default.createElement(
|
235
235
|
'div',
|
236
236
|
{
|
237
237
|
className: classes.helperDiv
|
@@ -254,11 +254,11 @@ var HiFormControl = function (_React$PureComponent) {
|
|
254
254
|
disabled: disabled,
|
255
255
|
focused: !disabled && (focused || hovered)
|
256
256
|
}, InputLabelProps),
|
257
|
-
|
257
|
+
error && _react2.default.createElement(_mdiMaterialUi.Alert, {
|
258
258
|
className: classes.errorIcon,
|
259
259
|
onClick: this.handleHelperClick
|
260
260
|
}),
|
261
|
-
|
261
|
+
helperIcon && helperText && !error && _react2.default.createElement(_mdiMaterialUi.Information, {
|
262
262
|
className: (0, _classnames2.default)(classes.helperIcon, (0, _defineProperty3.default)({}, classes.helperIconActive, helperOpen)),
|
263
263
|
onClick: this.handleHelperClick
|
264
264
|
})
|
package/HiForm/HiSearchField.js
CHANGED
@@ -40,6 +40,10 @@ var _propTypes = require('prop-types');
|
|
40
40
|
|
41
41
|
var _propTypes2 = _interopRequireDefault(_propTypes);
|
42
42
|
|
43
|
+
var _reactProptypeConditionalRequire = require('react-proptype-conditional-require');
|
44
|
+
|
45
|
+
var _reactProptypeConditionalRequire2 = _interopRequireDefault(_reactProptypeConditionalRequire);
|
46
|
+
|
43
47
|
var _HiInput = require('../HiForm/HiInput');
|
44
48
|
|
45
49
|
var _HiInput2 = _interopRequireDefault(_HiInput);
|
@@ -169,7 +173,9 @@ HiSearchField.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
169
173
|
*
|
170
174
|
* @param {array} suggestions
|
171
175
|
*/
|
172
|
-
callbackFilteredList: _propTypes2.default.func
|
176
|
+
callbackFilteredList: (0, _reactProptypeConditionalRequire2.default)(_propTypes2.default.func, function (props) {
|
177
|
+
return !props.hasOwnProperty('onSearch');
|
178
|
+
}, 'callbackFilteredList required'),
|
173
179
|
/**
|
174
180
|
* Liste des propriété de l'élément sur lesquelles filtrer (par défaut l'item lui même)
|
175
181
|
*/
|