@zohodesk/components 1.0.0-temp-192 → 1.0.0-temp-193
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/.cli/propValidation_report.html +1 -1
- package/es/DateTime/DateTime.js +8 -2
- package/es/DateTime/DateWidget.js +14 -3
- package/es/DateTime/Time.js +30 -13
- package/es/DateTime/props/defaultProps.js +4 -2
- package/es/DateTime/props/propTypes.js +6 -3
- package/es/ListItem/ListItem.js +2 -2
- package/es/ListItem/ListItem.module.css +18 -85
- package/es/ListItem/ListItemWithAvatar.js +3 -3
- package/es/ListItem/ListItemWithIcon.js +2 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +3 -9
- package/es/MultiSelect/MultiSelect.js +3 -9
- package/es/MultiSelect/MultiSelectWithAvatar.js +1 -3
- package/es/MultiSelect/Suggestions.js +4 -8
- package/es/MultiSelect/props/defaultProps.js +5 -9
- package/es/MultiSelect/props/propTypes.js +3 -7
- package/es/Select/GroupSelect.js +3 -9
- package/es/Select/SelectWithAvatar.js +3 -9
- package/es/Select/SelectWithIcon.js +3 -9
- package/es/Select/props/defaultProps.js +3 -6
- package/es/Select/props/propTypes.js +3 -6
- package/lib/DateTime/DateTime.js +13 -2
- package/lib/DateTime/DateWidget.js +19 -3
- package/lib/DateTime/Time.js +35 -13
- package/lib/DateTime/props/defaultProps.js +4 -2
- package/lib/DateTime/props/propTypes.js +6 -3
- package/lib/ListItem/ListItem.js +2 -2
- package/lib/ListItem/ListItem.module.css +18 -85
- package/lib/ListItem/ListItemWithAvatar.js +3 -3
- package/lib/ListItem/ListItemWithIcon.js +2 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +3 -7
- package/lib/MultiSelect/MultiSelect.js +3 -8
- package/lib/MultiSelect/MultiSelectWithAvatar.js +1 -3
- package/lib/MultiSelect/Suggestions.js +4 -8
- package/lib/MultiSelect/props/defaultProps.js +5 -9
- package/lib/MultiSelect/props/propTypes.js +6 -9
- package/lib/Select/GroupSelect.js +3 -8
- package/lib/Select/SelectWithAvatar.js +3 -8
- package/lib/Select/SelectWithIcon.js +3 -8
- package/lib/Select/props/defaultProps.js +3 -5
- package/lib/Select/props/propTypes.js +3 -6
- package/package.json +3 -3
- package/result.json +1 -1
|
@@ -35,8 +35,7 @@ export const AdvancedGroupMultiSelect_defaultProps = {
|
|
|
35
35
|
needEffect: true,
|
|
36
36
|
palette: 'default',
|
|
37
37
|
isLoading: false,
|
|
38
|
-
dataSelectorId: 'advancedGroupMultiSelect'
|
|
39
|
-
customProps: {}
|
|
38
|
+
dataSelectorId: 'advancedGroupMultiSelect'
|
|
40
39
|
};
|
|
41
40
|
export const AdvancedMultiSelect_defaultProps = {
|
|
42
41
|
animationStyle: 'bounce',
|
|
@@ -111,8 +110,7 @@ export const MultiSelect_defaultProps = {
|
|
|
111
110
|
keepSelectedOptions: false,
|
|
112
111
|
selectedOptionsCount: 0,
|
|
113
112
|
cardHeaderName: '',
|
|
114
|
-
needResponsive: true
|
|
115
|
-
customProps: {}
|
|
113
|
+
needResponsive: true
|
|
116
114
|
};
|
|
117
115
|
export const MultiSelectHeader_defaultProps = {
|
|
118
116
|
dataId: 'MultiSelectHeader'
|
|
@@ -146,14 +144,12 @@ export const MultiSelectWithAvatar_defaultProps = {
|
|
|
146
144
|
isLoading: false,
|
|
147
145
|
dataSelectorId: 'multiSelectWithAvatar',
|
|
148
146
|
keepSelectedOptions: false,
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
customProps: {}
|
|
147
|
+
customProps: {},
|
|
148
|
+
needResponsive: true
|
|
152
149
|
};
|
|
153
150
|
export const SelectedOptions_defaultProps = {
|
|
154
151
|
size: 'medium'
|
|
155
152
|
};
|
|
156
153
|
export const Suggestions_defaultProps = {
|
|
157
|
-
a11y: {}
|
|
158
|
-
needMultiLineText: false
|
|
154
|
+
a11y: {}
|
|
159
155
|
};
|
|
@@ -104,8 +104,7 @@ export const MultiSelect_propTypes = {
|
|
|
104
104
|
needSelectAll: PropTypes.bool,
|
|
105
105
|
selectAllText: PropTypes.string,
|
|
106
106
|
setAriaId: PropTypes.string,
|
|
107
|
-
ariaErrorId: PropTypes.string
|
|
108
|
-
customProps: PropTypes.string
|
|
107
|
+
ariaErrorId: PropTypes.string
|
|
109
108
|
};
|
|
110
109
|
export const MultiSelectHeader_propTypes = {
|
|
111
110
|
dataId: PropTypes.string,
|
|
@@ -120,7 +119,6 @@ export const MultiSelectWithAvatar_propTypes = {
|
|
|
120
119
|
photoURL: PropTypes.string
|
|
121
120
|
}))]).isRequired,
|
|
122
121
|
imageField: PropTypes.string,
|
|
123
|
-
needMultiLineText: PropTypes.string,
|
|
124
122
|
customProps: PropTypes.shape({
|
|
125
123
|
SuggestionsProps: PropTypes.object,
|
|
126
124
|
DropBoxProps: PropTypes.object
|
|
@@ -170,8 +168,7 @@ export const Suggestions_propTypes = {
|
|
|
170
168
|
logo: PropTypes.string,
|
|
171
169
|
optionType: PropTypes.string,
|
|
172
170
|
listItemProps: PropTypes.object
|
|
173
|
-
}))
|
|
174
|
-
needMultiLineText: PropTypes.bool
|
|
171
|
+
}))
|
|
175
172
|
};
|
|
176
173
|
export const AdvancedGroupMultiSelect_propTypes = {
|
|
177
174
|
animationStyle: PropTypes.string,
|
|
@@ -237,8 +234,7 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
237
234
|
needToCloseOnSelect: PropTypes.func,
|
|
238
235
|
searchStr: PropTypes.string,
|
|
239
236
|
children: PropTypes.node,
|
|
240
|
-
dataSelectorId: PropTypes.string
|
|
241
|
-
customProps: PropTypes.string
|
|
237
|
+
dataSelectorId: PropTypes.string
|
|
242
238
|
};
|
|
243
239
|
export const AdvancedMultiSelect_propTypes = { ...MultiSelect_propTypes,
|
|
244
240
|
selectedOptionDetails: PropTypes.string,
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React, { PureComponent } from 'react';
|
|
5
3
|
import { GroupSelect_defaultProps } from './props/defaultProps';
|
|
@@ -586,12 +584,8 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
586
584
|
htmlId,
|
|
587
585
|
iconOnHover,
|
|
588
586
|
isLoading,
|
|
589
|
-
dataSelectorId
|
|
590
|
-
customProps
|
|
587
|
+
dataSelectorId
|
|
591
588
|
} = this.props;
|
|
592
|
-
const {
|
|
593
|
-
suggestionsProps = {}
|
|
594
|
-
} = customProps;
|
|
595
589
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
596
590
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
597
591
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -756,7 +750,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
756
750
|
a11y: {
|
|
757
751
|
role: 'heading'
|
|
758
752
|
}
|
|
759
|
-
})), /*#__PURE__*/React.createElement(Suggestions,
|
|
753
|
+
})), /*#__PURE__*/React.createElement(Suggestions, {
|
|
760
754
|
activeId: selectedId,
|
|
761
755
|
suggestions: options,
|
|
762
756
|
getRef: this.suggestionItemRef,
|
|
@@ -771,7 +765,7 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
771
765
|
ariaParentRole: 'listbox',
|
|
772
766
|
role: 'option'
|
|
773
767
|
}
|
|
774
|
-
}
|
|
768
|
+
}));
|
|
775
769
|
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
776
770
|
options: revampedGroups,
|
|
777
771
|
searchString: searchStr,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
/**** Libraries ****/
|
|
4
2
|
import React from 'react';
|
|
5
3
|
import { SelectWithAvatar_defaultProps } from './props/defaultProps';
|
|
@@ -160,12 +158,8 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
160
158
|
htmlId,
|
|
161
159
|
needEffect,
|
|
162
160
|
isLoading,
|
|
163
|
-
dataSelectorId
|
|
164
|
-
customProps
|
|
161
|
+
dataSelectorId
|
|
165
162
|
} = this.props;
|
|
166
|
-
const {
|
|
167
|
-
suggestionsProps = {}
|
|
168
|
-
} = customProps;
|
|
169
163
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
170
164
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
171
165
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -300,7 +294,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
300
294
|
a11y: {
|
|
301
295
|
role: 'heading'
|
|
302
296
|
}
|
|
303
|
-
})) : null, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions,
|
|
297
|
+
})) : null, suggestions.length ? /*#__PURE__*/React.createElement(Suggestions, {
|
|
304
298
|
activeId: selectedId,
|
|
305
299
|
suggestions: suggestions,
|
|
306
300
|
getRef: this.suggestionItemRef,
|
|
@@ -316,7 +310,7 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
316
310
|
ariaParentRole: 'listbox',
|
|
317
311
|
role: 'option'
|
|
318
312
|
}
|
|
319
|
-
}
|
|
313
|
+
}) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
320
314
|
isLoading: isFetchingOptions,
|
|
321
315
|
options: options,
|
|
322
316
|
searchString: searchStr,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
1
|
import React, { Component } from 'react';
|
|
4
2
|
import { SelectWithIcon_defaultProps } from './props/defaultProps';
|
|
5
3
|
import { SelectWithIcon_propTypes } from './props/propTypes';
|
|
@@ -347,12 +345,8 @@ class SelectWithIcon extends Component {
|
|
|
347
345
|
i18nKeys,
|
|
348
346
|
htmlId,
|
|
349
347
|
isLoading,
|
|
350
|
-
dataSelectorId
|
|
351
|
-
customProps
|
|
348
|
+
dataSelectorId
|
|
352
349
|
} = this.props;
|
|
353
|
-
const {
|
|
354
|
-
listItemProps = {}
|
|
355
|
-
} = customProps;
|
|
356
350
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
357
351
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
358
352
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -483,7 +477,7 @@ class SelectWithIcon extends Component {
|
|
|
483
477
|
iconSize,
|
|
484
478
|
iconColor
|
|
485
479
|
} = options;
|
|
486
|
-
return /*#__PURE__*/React.createElement(ListItemWithIcon,
|
|
480
|
+
return /*#__PURE__*/React.createElement(ListItemWithIcon, {
|
|
487
481
|
key: options[idKey],
|
|
488
482
|
value: options[valueKey],
|
|
489
483
|
size: "medium",
|
|
@@ -507,7 +501,7 @@ class SelectWithIcon extends Component {
|
|
|
507
501
|
ariaSelected: selectedId === options[idKey],
|
|
508
502
|
ariaLabel: options[valueKey]
|
|
509
503
|
}
|
|
510
|
-
}
|
|
504
|
+
});
|
|
511
505
|
})) : /*#__PURE__*/React.createElement(EmptyState, {
|
|
512
506
|
isLoading: isFetchingOptions,
|
|
513
507
|
options: options,
|
|
@@ -66,8 +66,7 @@ export const GroupSelect_defaultProps = {
|
|
|
66
66
|
isSearchClearOnClose: true,
|
|
67
67
|
i18nKeys: {},
|
|
68
68
|
iconOnHover: false,
|
|
69
|
-
isLoading: false
|
|
70
|
-
customProps: {}
|
|
69
|
+
isLoading: false
|
|
71
70
|
};
|
|
72
71
|
export const SelectWithAvatar_defaultProps = {
|
|
73
72
|
animationStyle: 'bounce',
|
|
@@ -91,8 +90,7 @@ export const SelectWithAvatar_defaultProps = {
|
|
|
91
90
|
isSearchClearOnClose: true,
|
|
92
91
|
i18nKeys: {},
|
|
93
92
|
needEffect: true,
|
|
94
|
-
isLoading: false
|
|
95
|
-
customProps: {}
|
|
93
|
+
isLoading: false
|
|
96
94
|
};
|
|
97
95
|
export const SelectWithIcon_defaultProps = {
|
|
98
96
|
isReadOnly: false,
|
|
@@ -117,6 +115,5 @@ export const SelectWithIcon_defaultProps = {
|
|
|
117
115
|
needIcon: true,
|
|
118
116
|
iconSize: '14',
|
|
119
117
|
i18nKeys: {},
|
|
120
|
-
isLoading: false
|
|
121
|
-
customProps: {}
|
|
118
|
+
isLoading: false
|
|
122
119
|
};
|
|
@@ -169,8 +169,7 @@ export const GroupSelect_propTypes = {
|
|
|
169
169
|
}),
|
|
170
170
|
isLoading: PropTypes.bool,
|
|
171
171
|
dataSelectorId: PropTypes.string,
|
|
172
|
-
isDefaultSelectValue: PropTypes.bool
|
|
173
|
-
customProps: PropTypes.string
|
|
172
|
+
isDefaultSelectValue: PropTypes.bool
|
|
174
173
|
};
|
|
175
174
|
export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
176
175
|
textBoxClass: PropTypes.string,
|
|
@@ -231,8 +230,7 @@ export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
|
231
230
|
htmlId: PropTypes.string,
|
|
232
231
|
needEffect: PropTypes.bool,
|
|
233
232
|
isLoading: PropTypes.bool,
|
|
234
|
-
dataSelectorId: PropTypes.string
|
|
235
|
-
customProps: PropTypes.string
|
|
233
|
+
dataSelectorId: PropTypes.string
|
|
236
234
|
};
|
|
237
235
|
export const SelectWithIcon_propTypes = {
|
|
238
236
|
animationStyle: PropTypes.oneOf(['default', 'bounce']),
|
|
@@ -286,6 +284,5 @@ export const SelectWithIcon_propTypes = {
|
|
|
286
284
|
searchBoxSize: PropTypes.string,
|
|
287
285
|
needResponsive: PropTypes.bool,
|
|
288
286
|
boxSize: PropTypes.string,
|
|
289
|
-
emptyMessage: PropTypes.string
|
|
290
|
-
customProps: PropTypes.string
|
|
287
|
+
emptyMessage: PropTypes.string
|
|
291
288
|
};
|
package/lib/DateTime/DateTime.js
CHANGED
|
@@ -43,6 +43,12 @@ var _dateFormat = require("./dateFormatUtils/dateFormat");
|
|
|
43
43
|
|
|
44
44
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
45
45
|
|
|
46
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
47
|
+
|
|
48
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
49
|
+
|
|
50
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
51
|
+
|
|
46
52
|
function _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
|
|
47
53
|
|
|
48
54
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
@@ -724,7 +730,11 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
724
730
|
positionsOffset = _this$props7.positionsOffset,
|
|
725
731
|
targetOffset = _this$props7.targetOffset,
|
|
726
732
|
isRestrictScroll = _this$props7.isRestrictScroll,
|
|
727
|
-
dropBoxPortalId = _this$props7.dropBoxPortalId
|
|
733
|
+
dropBoxPortalId = _this$props7.dropBoxPortalId,
|
|
734
|
+
_this$props7$customPr = _this$props7.customProps,
|
|
735
|
+
customProps = _this$props7$customPr === void 0 ? {} : _this$props7$customPr;
|
|
736
|
+
var _customProps$TimeProp = customProps.TimeProps,
|
|
737
|
+
TimeProps = _customProps$TimeProp === void 0 ? {} : _customProps$TimeProp;
|
|
728
738
|
var _i18nKeys$timeText = i18nKeys.timeText,
|
|
729
739
|
timeText = _i18nKeys$timeText === void 0 ? 'Time' : _i18nKeys$timeText,
|
|
730
740
|
_i18nKeys$submitText = i18nKeys.submitText,
|
|
@@ -790,7 +800,8 @@ var DateTime = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
790
800
|
ampmSuggestions: this.ampmSuggestions,
|
|
791
801
|
onAmPmSelect: this.amPmSelect,
|
|
792
802
|
amPm: amPm,
|
|
793
|
-
is24Hour: is24Hour
|
|
803
|
+
is24Hour: is24Hour,
|
|
804
|
+
customProps: _objectSpread({}, TimeProps)
|
|
794
805
|
}) : null, needAction ? /*#__PURE__*/_react["default"].createElement(_DateTimePopupFooter["default"], {
|
|
795
806
|
submitText: submitText,
|
|
796
807
|
onSubmit: this.handleSelect,
|
|
@@ -47,6 +47,12 @@ var _constants = require("./constants");
|
|
|
47
47
|
|
|
48
48
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
49
49
|
|
|
50
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
51
|
+
|
|
52
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
53
|
+
|
|
54
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
55
|
+
|
|
50
56
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
51
57
|
|
|
52
58
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -1013,7 +1019,13 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1013
1019
|
dropBoxPortalId = _this$props11.dropBoxPortalId,
|
|
1014
1020
|
a11y = _this$props11.a11y,
|
|
1015
1021
|
boxSize = _this$props11.boxSize,
|
|
1016
|
-
onError = _this$props11.onError
|
|
1022
|
+
onError = _this$props11.onError,
|
|
1023
|
+
_this$props11$customP = _this$props11.customProps,
|
|
1024
|
+
customProps = _this$props11$customP === void 0 ? {} : _this$props11$customP;
|
|
1025
|
+
var _customProps$DateTime = customProps.DateTimeProps,
|
|
1026
|
+
DateTimeProps = _customProps$DateTime === void 0 ? {} : _customProps$DateTime,
|
|
1027
|
+
_customProps$TextBoxP = customProps.TextBoxProps,
|
|
1028
|
+
TextBoxProps = _customProps$TextBoxP === void 0 ? {} : _customProps$TextBoxP;
|
|
1017
1029
|
var _this$state6 = this.state,
|
|
1018
1030
|
_this$state6$selected = _this$state6.selected,
|
|
1019
1031
|
value = _this$state6$selected === void 0 ? '' : _this$state6$selected,
|
|
@@ -1065,7 +1077,10 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1065
1077
|
iconOnHover: iconOnHover,
|
|
1066
1078
|
isFocus: isPopupReady,
|
|
1067
1079
|
autoComplete: false,
|
|
1068
|
-
a11y: a11y
|
|
1080
|
+
a11y: a11y,
|
|
1081
|
+
customProps: {
|
|
1082
|
+
TextBoxProps: _objectSpread({}, TextBoxProps)
|
|
1083
|
+
}
|
|
1069
1084
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
1070
1085
|
align: "both",
|
|
1071
1086
|
onClick: isDisabled || isReadOnly ? null : this.handleDateIconClick
|
|
@@ -1102,7 +1117,8 @@ var DateWidgetComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1102
1117
|
isRestrictScroll: isRestrictScroll,
|
|
1103
1118
|
dropBoxPortalId: dropBoxPortalId,
|
|
1104
1119
|
boxSize: boxSize,
|
|
1105
|
-
onError: onError
|
|
1120
|
+
onError: onError,
|
|
1121
|
+
customProps: _objectSpread({}, DateTimeProps)
|
|
1106
1122
|
}));
|
|
1107
1123
|
}
|
|
1108
1124
|
}]);
|
package/lib/DateTime/Time.js
CHANGED
|
@@ -25,6 +25,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
33
|
+
|
|
34
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
35
|
+
|
|
28
36
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
37
|
|
|
30
38
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -74,7 +82,15 @@ var Time = /*#__PURE__*/function (_PureComponent) {
|
|
|
74
82
|
ampmSuggestions = _this$props.ampmSuggestions,
|
|
75
83
|
onAmPmSelect = _this$props.onAmPmSelect,
|
|
76
84
|
amPm = _this$props.amPm,
|
|
77
|
-
is24Hour = _this$props.is24Hour
|
|
85
|
+
is24Hour = _this$props.is24Hour,
|
|
86
|
+
_this$props$customPro = _this$props.customProps,
|
|
87
|
+
customProps = _this$props$customPro === void 0 ? {} : _this$props$customPro;
|
|
88
|
+
var _customProps$HourComp = customProps.HourCompProps,
|
|
89
|
+
HourCompProps = _customProps$HourComp === void 0 ? {} : _customProps$HourComp,
|
|
90
|
+
_customProps$MinuteCo = customProps.MinuteCompProps,
|
|
91
|
+
MinuteCompProps = _customProps$MinuteCo === void 0 ? {} : _customProps$MinuteCo,
|
|
92
|
+
_customProps$AmPmComp = customProps.AmPmCompProps,
|
|
93
|
+
AmPmCompProps = _customProps$AmPmComp === void 0 ? {} : _customProps$AmPmComp;
|
|
78
94
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("span", {
|
|
79
95
|
className: _DateTimeModule["default"].text
|
|
80
96
|
}, timeText), /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
@@ -91,7 +107,8 @@ var Time = /*#__PURE__*/function (_PureComponent) {
|
|
|
91
107
|
onHourSelect: onHourSelect,
|
|
92
108
|
hours: hours,
|
|
93
109
|
needResponsive: needResponsive,
|
|
94
|
-
hourEmptyText: hourEmptyText
|
|
110
|
+
hourEmptyText: hourEmptyText,
|
|
111
|
+
customProps: _objectSpread({}, HourCompProps)
|
|
95
112
|
})), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
96
113
|
flexible: true,
|
|
97
114
|
className: _DateTimeModule["default"].dropDownContainer
|
|
@@ -100,7 +117,8 @@ var Time = /*#__PURE__*/function (_PureComponent) {
|
|
|
100
117
|
onMinutesSelect: onMinutesSelect,
|
|
101
118
|
mins: mins,
|
|
102
119
|
minuteEmptyText: minuteEmptyText,
|
|
103
|
-
needResponsive: needResponsive
|
|
120
|
+
needResponsive: needResponsive,
|
|
121
|
+
customProps: _objectSpread({}, MinuteCompProps)
|
|
104
122
|
})), !is24Hour ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
105
123
|
flexible: true,
|
|
106
124
|
className: _DateTimeModule["default"].dropDownContainer
|
|
@@ -108,7 +126,8 @@ var Time = /*#__PURE__*/function (_PureComponent) {
|
|
|
108
126
|
ampmSuggestions: ampmSuggestions,
|
|
109
127
|
onAmPmSelect: onAmPmSelect,
|
|
110
128
|
amPm: amPm,
|
|
111
|
-
needResponsive: needResponsive
|
|
129
|
+
needResponsive: needResponsive,
|
|
130
|
+
customProps: _objectSpread({}, AmPmCompProps)
|
|
112
131
|
})) : null));
|
|
113
132
|
}
|
|
114
133
|
}]);
|
|
@@ -139,8 +158,9 @@ var Hour = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
139
158
|
onHourSelect = _this$props2.onHourSelect,
|
|
140
159
|
hours = _this$props2.hours,
|
|
141
160
|
needResponsive = _this$props2.needResponsive,
|
|
142
|
-
hourEmptyText = _this$props2.hourEmptyText
|
|
143
|
-
|
|
161
|
+
hourEmptyText = _this$props2.hourEmptyText,
|
|
162
|
+
customProps = _this$props2.customProps;
|
|
163
|
+
return /*#__PURE__*/_react["default"].createElement(_Select["default"], _extends({
|
|
144
164
|
options: hourSuggestions,
|
|
145
165
|
onChange: onHourSelect,
|
|
146
166
|
selectedValue: hours,
|
|
@@ -159,7 +179,7 @@ var Hour = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
159
179
|
needListBorder: true,
|
|
160
180
|
needTick: false,
|
|
161
181
|
listItemSize: "small"
|
|
162
|
-
});
|
|
182
|
+
}, customProps));
|
|
163
183
|
}
|
|
164
184
|
}]);
|
|
165
185
|
|
|
@@ -185,8 +205,9 @@ var Minute = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
185
205
|
onMinutesSelect = _this$props3.onMinutesSelect,
|
|
186
206
|
mins = _this$props3.mins,
|
|
187
207
|
minuteEmptyText = _this$props3.minuteEmptyText,
|
|
188
|
-
needResponsive = _this$props3.needResponsive
|
|
189
|
-
|
|
208
|
+
needResponsive = _this$props3.needResponsive,
|
|
209
|
+
customProps = _this$props3.customProps;
|
|
210
|
+
return /*#__PURE__*/_react["default"].createElement(_Select["default"], _extends({
|
|
190
211
|
options: minSuggestions,
|
|
191
212
|
onChange: onMinutesSelect,
|
|
192
213
|
selectedValue: mins,
|
|
@@ -205,7 +226,7 @@ var Minute = /*#__PURE__*/function (_React$PureComponent2) {
|
|
|
205
226
|
needListBorder: true,
|
|
206
227
|
needTick: false,
|
|
207
228
|
listItemSize: "small"
|
|
208
|
-
});
|
|
229
|
+
}, customProps));
|
|
209
230
|
}
|
|
210
231
|
}]);
|
|
211
232
|
|
|
@@ -230,8 +251,9 @@ var AmPm = /*#__PURE__*/function (_React$PureComponent3) {
|
|
|
230
251
|
ampmSuggestions = _this$props4.ampmSuggestions,
|
|
231
252
|
onAmPmSelect = _this$props4.onAmPmSelect,
|
|
232
253
|
amPm = _this$props4.amPm,
|
|
233
|
-
needResponsive = _this$props4.needResponsive
|
|
234
|
-
|
|
254
|
+
needResponsive = _this$props4.needResponsive,
|
|
255
|
+
customProps = _this$props4.customProps;
|
|
256
|
+
return /*#__PURE__*/_react["default"].createElement(_Select["default"], _extends({
|
|
235
257
|
options: ampmSuggestions,
|
|
236
258
|
onChange: onAmPmSelect,
|
|
237
259
|
selectedValue: amPm,
|
|
@@ -246,7 +268,7 @@ var AmPm = /*#__PURE__*/function (_React$PureComponent3) {
|
|
|
246
268
|
needListBorder: true,
|
|
247
269
|
needTick: false,
|
|
248
270
|
listItemSize: "small"
|
|
249
|
-
});
|
|
271
|
+
}, customProps));
|
|
250
272
|
}
|
|
251
273
|
}]);
|
|
252
274
|
|
|
@@ -28,7 +28,8 @@ var DateTime_defaultProps = {
|
|
|
28
28
|
i18nKeys: {},
|
|
29
29
|
is24Hour: false,
|
|
30
30
|
isDefaultPosition: false,
|
|
31
|
-
customDateFormat: null
|
|
31
|
+
customDateFormat: null,
|
|
32
|
+
customProps: {}
|
|
32
33
|
};
|
|
33
34
|
exports.DateTime_defaultProps = DateTime_defaultProps;
|
|
34
35
|
var DateWidget_defaultProps = {
|
|
@@ -65,6 +66,7 @@ var DateTimePopupFooter_defaultProps = {
|
|
|
65
66
|
};
|
|
66
67
|
exports.DateTimePopupFooter_defaultProps = DateTimePopupFooter_defaultProps;
|
|
67
68
|
var Time_defaultProps = {
|
|
68
|
-
dataId: 'Time'
|
|
69
|
+
dataId: 'Time',
|
|
70
|
+
customProps: {}
|
|
69
71
|
};
|
|
70
72
|
exports.Time_defaultProps = Time_defaultProps;
|
|
@@ -97,7 +97,8 @@ var DateTime_propTypes = {
|
|
|
97
97
|
positionsOffset: _propTypes["default"].array,
|
|
98
98
|
targetOffset: _propTypes["default"].string,
|
|
99
99
|
isRestrictScroll: _propTypes["default"].bool,
|
|
100
|
-
dropBoxPortalId: _propTypes["default"].string
|
|
100
|
+
dropBoxPortalId: _propTypes["default"].string,
|
|
101
|
+
customProps: _propTypes["default"].object
|
|
101
102
|
};
|
|
102
103
|
exports.DateTime_propTypes = DateTime_propTypes;
|
|
103
104
|
var DateWidget_propTypes = {
|
|
@@ -165,7 +166,8 @@ var DateWidget_propTypes = {
|
|
|
165
166
|
targetOffset: _propTypes["default"].array,
|
|
166
167
|
isRestrictScroll: _propTypes["default"].bool,
|
|
167
168
|
dropBoxPortalId: _propTypes["default"].string,
|
|
168
|
-
a11y: _propTypes["default"].object
|
|
169
|
+
a11y: _propTypes["default"].object,
|
|
170
|
+
customProps: _propTypes["default"].object
|
|
169
171
|
};
|
|
170
172
|
exports.DateWidget_propTypes = DateWidget_propTypes;
|
|
171
173
|
var YearView_propTypes = {
|
|
@@ -214,6 +216,7 @@ var Time_propTypes = {
|
|
|
214
216
|
ampmSuggestions: _propTypes["default"].array,
|
|
215
217
|
onAmPmSelect: _propTypes["default"].func,
|
|
216
218
|
amPm: _propTypes["default"].string,
|
|
217
|
-
is24Hour: _propTypes["default"].bool
|
|
219
|
+
is24Hour: _propTypes["default"].bool,
|
|
220
|
+
customProps: _propTypes["default"].object
|
|
218
221
|
};
|
|
219
222
|
exports.Time_propTypes = Time_propTypes;
|
package/lib/ListItem/ListItem.js
CHANGED
|
@@ -150,7 +150,7 @@ var ListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
150
150
|
autoHover: autoHover,
|
|
151
151
|
needTick: needTick,
|
|
152
152
|
needBorder: needBorder,
|
|
153
|
-
customClass:
|
|
153
|
+
customClass: customListItem,
|
|
154
154
|
dataId: dataIdString,
|
|
155
155
|
dataSelectorId: "".concat(dataSelectorId),
|
|
156
156
|
isLink: isLink,
|
|
@@ -171,7 +171,7 @@ var ListItem = /*#__PURE__*/function (_React$Component) {
|
|
|
171
171
|
adjust: true,
|
|
172
172
|
className: _ListItemModule["default"].children
|
|
173
173
|
}, children) : null, needTick && active ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
174
|
-
className: "".concat(_ListItemModule["default"].tickIcon, " ").concat(tickIconPalette, " ").concat(customTickIcon
|
|
174
|
+
className: "".concat(_ListItemModule["default"].tickIcon, " ").concat(tickIconPalette, " ").concat(customTickIcon),
|
|
175
175
|
"aria-hidden": ariaHidden,
|
|
176
176
|
dataId: "".concat(dataIdString, "_tickIcon"),
|
|
177
177
|
dataSelectorId: "".concat(dataSelectorId, "_tickIcon")
|