@zohodesk/components 1.0.0-temp-217.5 → 1.0.0-temp-199.9
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/README.md +9 -0
- package/es/DropBox/DropBoxElement/DropBoxElement.js +3 -1
- package/es/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +4 -2
- package/es/DropBox/DropBoxElement/css/DropBoxElement.module.css +56 -53
- package/es/DropBox/DropBoxElement/css/cssJSLogic.js +4 -4
- package/es/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +4 -2
- package/es/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +3 -1
- package/es/ListItem/ListItem.js +2 -2
- package/es/ListItem/ListItem.module.css +15 -2
- package/es/ListItem/ListItemWithAvatar.js +3 -3
- package/es/ListItem/ListItemWithIcon.js +2 -2
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +7 -2
- package/es/MultiSelect/MultiSelect.js +7 -2
- package/es/MultiSelect/Suggestions.js +14 -5
- package/es/MultiSelect/props/defaultProps.js +9 -4
- package/es/MultiSelect/props/propTypes.js +9 -3
- package/es/Popup/Popup.js +232 -83
- package/es/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +4 -2
- package/es/Select/GroupSelect.js +5 -1
- package/es/Select/SelectWithAvatar.js +7 -2
- package/es/Select/SelectWithIcon.js +4 -2
- package/es/Select/props/defaultProps.js +2 -1
- package/es/Select/props/propTypes.js +4 -2
- package/es/common/common.module.css +5 -0
- package/es/utils/Common.js +2 -1
- package/es/v1/ListItem/ListItem.js +1 -1
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +2 -1
- package/es/v1/MultiSelect/MultiSelect.js +7 -2
- package/es/v1/MultiSelect/Suggestions.js +8 -4
- package/es/v1/MultiSelect/props/defaultProps.js +4 -2
- package/es/v1/MultiSelect/props/propTypes.js +6 -2
- package/es/v1/Select/GroupSelect.js +7 -2
- package/es/v1/Select/SelectWithAvatar.js +7 -2
- package/es/v1/Select/props/defaultProps.js +4 -2
- package/es/v1/Select/props/propTypes.js +6 -2
- package/lib/DropBox/DropBoxElement/DropBoxElement.js +3 -1
- package/lib/DropBox/DropBoxElement/__tests__/__snapshots__/DropBoxElement.spec.js.snap +4 -2
- package/lib/DropBox/DropBoxElement/css/DropBoxElement.module.css +56 -53
- package/lib/DropBox/DropBoxElement/css/cssJSLogic.js +2 -2
- package/lib/DropBox/__tests__/__snapshots__/DropBox.spec.js.snap +4 -2
- package/lib/DropDown/__tests__/__snapshots__/DropDown.spec.js.snap +3 -1
- package/lib/ListItem/ListItem.js +2 -2
- package/lib/ListItem/ListItem.module.css +15 -2
- package/lib/ListItem/ListItemWithAvatar.js +3 -3
- package/lib/ListItem/ListItemWithIcon.js +2 -2
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +7 -3
- package/lib/MultiSelect/MultiSelect.js +6 -3
- package/lib/MultiSelect/Suggestions.js +12 -5
- package/lib/MultiSelect/props/defaultProps.js +9 -4
- package/lib/MultiSelect/props/propTypes.js +8 -3
- package/lib/Popup/Popup.js +282 -114
- package/lib/ResponsiveDropBox/__tests__/__snapshots__/ResponsiveDropBox.spec.js.snap +4 -2
- package/lib/Select/GroupSelect.js +4 -2
- package/lib/Select/SelectWithAvatar.js +8 -3
- package/lib/Select/SelectWithIcon.js +5 -3
- package/lib/Select/props/defaultProps.js +2 -1
- package/lib/Select/props/propTypes.js +4 -2
- package/lib/common/common.module.css +5 -0
- package/lib/utils/Common.js +5 -1
- package/lib/v1/ListItem/ListItem.js +1 -1
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +3 -1
- package/lib/v1/MultiSelect/MultiSelect.js +8 -3
- package/lib/v1/MultiSelect/Suggestions.js +8 -4
- package/lib/v1/MultiSelect/props/defaultProps.js +4 -2
- package/lib/v1/MultiSelect/props/propTypes.js +6 -2
- package/lib/v1/Select/GroupSelect.js +8 -3
- package/lib/v1/Select/SelectWithAvatar.js +8 -3
- package/lib/v1/Select/props/defaultProps.js +4 -2
- package/lib/v1/Select/props/propTypes.js +6 -2
- package/package.json +2 -2
- package/result.json +1 -1
- package/assets/Appearance/dark/mode/Component_v2_DarkMode.module.css +0 -10
- package/assets/Appearance/light/mode/Component_v2_LightMode.module.css +0 -10
- package/assets/Appearance/pureDark/mode/Component_v2_PureDarkMode.module.css +0 -10
- package/es/components-v2/Switch/Switch.js +0 -124
- package/es/components-v2/Switch/contants/index.js +0 -10
- package/es/components-v2/Switch/css/Switch_v2.module.css +0 -121
- package/es/components-v2/Switch/css/cssJSLogic.js +0 -45
- package/es/components-v2/Switch/props/defaultProps.js +0 -19
- package/es/components-v2/Switch/props/propTypes.js +0 -27
- package/lib/components-v2/Switch/Switch.js +0 -138
- package/lib/components-v2/Switch/contants/index.js +0 -18
- package/lib/components-v2/Switch/css/Switch_v2.module.css +0 -121
- package/lib/components-v2/Switch/css/cssJSLogic.js +0 -36
- package/lib/components-v2/Switch/props/defaultProps.js +0 -26
- package/lib/components-v2/Switch/props/propTypes.js +0 -38
|
@@ -51,6 +51,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
51
51
|
|
|
52
52
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
53
53
|
|
|
54
|
+
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); }
|
|
55
|
+
|
|
54
56
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
55
57
|
|
|
56
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); } }
|
|
@@ -213,7 +215,10 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
213
215
|
needEffect = _this$props.needEffect,
|
|
214
216
|
isLoading = _this$props.isLoading,
|
|
215
217
|
dataSelectorId = _this$props.dataSelectorId,
|
|
216
|
-
getTargetRef = _this$props.getTargetRef
|
|
218
|
+
getTargetRef = _this$props.getTargetRef,
|
|
219
|
+
customProps = _this$props.customProps;
|
|
220
|
+
var _customProps$suggesti = customProps.suggestionsProps,
|
|
221
|
+
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
217
222
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
218
223
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
219
224
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -352,7 +357,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
352
357
|
a11y: {
|
|
353
358
|
role: 'heading'
|
|
354
359
|
}
|
|
355
|
-
})) : null, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
360
|
+
})) : null, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
|
|
356
361
|
dataId: "".concat(dataId, "_Options"),
|
|
357
362
|
activeId: selectedId,
|
|
358
363
|
suggestions: suggestions,
|
|
@@ -369,7 +374,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
369
374
|
ariaParentRole: 'listbox',
|
|
370
375
|
role: 'option'
|
|
371
376
|
}
|
|
372
|
-
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
377
|
+
}, suggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
373
378
|
isLoading: isFetchingOptions,
|
|
374
379
|
options: options,
|
|
375
380
|
searchString: searchStr,
|
|
@@ -440,7 +440,9 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
440
440
|
_customProps$Dropdown = customProps.DropdownSearchTextBoxProps,
|
|
441
441
|
DropdownSearchTextBoxProps = _customProps$Dropdown === void 0 ? {} : _customProps$Dropdown,
|
|
442
442
|
_customProps$TextBoxI = customProps.TextBoxIconProps,
|
|
443
|
-
TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI
|
|
443
|
+
TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI,
|
|
444
|
+
_customProps$listItem = customProps.listItemProps,
|
|
445
|
+
listItemProps = _customProps$listItem === void 0 ? {} : _customProps$listItem;
|
|
444
446
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
445
447
|
className: "".concat(_SelectModule["default"].container, " ").concat(_SelectModule["default"]["box_".concat(size)], " ").concat(isReadOnly ? _SelectModule["default"].readonly : '', " ").concat(borderColor === 'transparent' ? _SelectModule["default"].transparentContainer : ''),
|
|
446
448
|
"data-title": isDisabled ? title : null,
|
|
@@ -573,7 +575,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
573
575
|
var iconName = options.iconName,
|
|
574
576
|
iconSize = options.iconSize,
|
|
575
577
|
iconColor = options.iconColor;
|
|
576
|
-
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], {
|
|
578
|
+
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], _extends({
|
|
577
579
|
key: options[idKey],
|
|
578
580
|
value: options[valueKey],
|
|
579
581
|
size: "medium",
|
|
@@ -597,7 +599,7 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
597
599
|
ariaSelected: selectedId === options[idKey],
|
|
598
600
|
ariaLabel: options[valueKey]
|
|
599
601
|
}
|
|
600
|
-
});
|
|
602
|
+
}, listItemProps));
|
|
601
603
|
})) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
602
604
|
isLoading: isFetchingOptions,
|
|
603
605
|
options: options,
|
|
@@ -110,7 +110,8 @@ var SelectWithAvatar_defaultProps = {
|
|
|
110
110
|
isRestrictScroll: false,
|
|
111
111
|
i18nKeys: {},
|
|
112
112
|
needEffect: true,
|
|
113
|
-
isLoading: false
|
|
113
|
+
isLoading: false,
|
|
114
|
+
customProps: {}
|
|
114
115
|
};
|
|
115
116
|
exports.SelectWithAvatar_defaultProps = SelectWithAvatar_defaultProps;
|
|
116
117
|
var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
@@ -194,7 +194,8 @@ var GroupSelect_propTypes = {
|
|
|
194
194
|
isDefaultSelectValue: _propTypes["default"].bool,
|
|
195
195
|
customProps: _propTypes["default"].shape({
|
|
196
196
|
TextBoxProps: _propTypes["default"].object,
|
|
197
|
-
TextBoxIconProps: _propTypes["default"].object
|
|
197
|
+
TextBoxIconProps: _propTypes["default"].object,
|
|
198
|
+
suggestionsProps: _propTypes["default"].object
|
|
198
199
|
})
|
|
199
200
|
};
|
|
200
201
|
exports.GroupSelect_propTypes = GroupSelect_propTypes;
|
|
@@ -258,7 +259,8 @@ var SelectWithAvatar_propTypes = _objectSpread(_objectSpread({}, Select_propType
|
|
|
258
259
|
htmlId: _propTypes["default"].string,
|
|
259
260
|
needEffect: _propTypes["default"].bool,
|
|
260
261
|
isLoading: _propTypes["default"].bool,
|
|
261
|
-
dataSelectorId: _propTypes["default"].string
|
|
262
|
+
dataSelectorId: _propTypes["default"].string,
|
|
263
|
+
customProps: _propTypes["default"].string
|
|
262
264
|
});
|
|
263
265
|
|
|
264
266
|
exports.SelectWithAvatar_propTypes = SelectWithAvatar_propTypes;
|
package/lib/utils/Common.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.DUMMY_OBJECT = void 0;
|
|
6
7
|
exports.bind = bind;
|
|
7
8
|
exports.bytesToSize = bytesToSize;
|
|
8
9
|
exports.cancelBubblingEffect = cancelBubblingEffect;
|
|
@@ -512,4 +513,7 @@ function isTextSelected() {
|
|
|
512
513
|
}
|
|
513
514
|
|
|
514
515
|
return false;
|
|
515
|
-
}
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
var DUMMY_OBJECT = {};
|
|
519
|
+
exports.DUMMY_OBJECT = DUMMY_OBJECT;
|
|
@@ -96,7 +96,7 @@ var ListItem = function ListItem(props) {
|
|
|
96
96
|
autoHover: autoHover,
|
|
97
97
|
needTick: needTick,
|
|
98
98
|
needBorder: needBorder,
|
|
99
|
-
customClass: customListItem,
|
|
99
|
+
customClass: "".concat(customListItem, " ").concat(needMultiLineText ? _ListItemModule["default"].txtAlignBaseLine + ' ' + _ListItemModule["default"].autoHeight : '', " ").concat(customListItem),
|
|
100
100
|
dataId: dataIdString,
|
|
101
101
|
dataSelectorId: "".concat(dataSelectorId),
|
|
102
102
|
isLink: isLink,
|
|
@@ -611,7 +611,9 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
611
611
|
role: 'option'
|
|
612
612
|
},
|
|
613
613
|
dataId: "".concat(dataIdMultiSelectComp, "_Options")
|
|
614
|
-
}, SuggestionsProps
|
|
614
|
+
}, SuggestionsProps, {
|
|
615
|
+
needMultiLineText: true
|
|
616
|
+
})) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
615
617
|
isLoading: isFetchingOptions,
|
|
616
618
|
options: options,
|
|
617
619
|
searchString: searchStr,
|
|
@@ -57,6 +57,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
57
57
|
|
|
58
58
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
59
59
|
|
|
60
|
+
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); }
|
|
61
|
+
|
|
60
62
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
61
63
|
|
|
62
64
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -1082,7 +1084,10 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1082
1084
|
boxSize = _this$props15.boxSize,
|
|
1083
1085
|
isLoading = _this$props15.isLoading,
|
|
1084
1086
|
selectAllText = _this$props15.selectAllText,
|
|
1085
|
-
needSelectAll = _this$props15.needSelectAll
|
|
1087
|
+
needSelectAll = _this$props15.needSelectAll,
|
|
1088
|
+
customProps = _this$props15.customProps;
|
|
1089
|
+
var _customProps$suggesti = customProps.suggestionsProps,
|
|
1090
|
+
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
1086
1091
|
var _this$state9 = this.state,
|
|
1087
1092
|
selectedOptions = _this$state9.selectedOptions,
|
|
1088
1093
|
searchStr = _this$state9.searchStr,
|
|
@@ -1159,7 +1164,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1159
1164
|
eleRef: this.suggestionContainerRef
|
|
1160
1165
|
}, isSearching ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
1161
1166
|
className: _MultiSelectModule["default"][palette]
|
|
1162
|
-
}, searchText) : suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
1167
|
+
}, searchText) : suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
|
|
1163
1168
|
suggestions: suggestions,
|
|
1164
1169
|
getRef: this.suggestionItemRef,
|
|
1165
1170
|
hoverOption: hoverOption,
|
|
@@ -1172,7 +1177,7 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1172
1177
|
a11y: {
|
|
1173
1178
|
role: 'option'
|
|
1174
1179
|
}
|
|
1175
|
-
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1180
|
+
}, suggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
1176
1181
|
isLoading: isFetchingOptions,
|
|
1177
1182
|
options: options,
|
|
1178
1183
|
searchString: searchStr,
|
|
@@ -83,7 +83,8 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
83
83
|
avatarPalette = _this$props.avatarPalette,
|
|
84
84
|
palette = _this$props.palette,
|
|
85
85
|
htmlId = _this$props.htmlId,
|
|
86
|
-
a11y = _this$props.a11y
|
|
86
|
+
a11y = _this$props.a11y,
|
|
87
|
+
needMultiLineText = _this$props.needMultiLineText;
|
|
87
88
|
var ariaParentRole = a11y.ariaParentRole,
|
|
88
89
|
ariaMultiselectable = a11y.ariaMultiselectable;
|
|
89
90
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
@@ -143,7 +144,8 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
143
144
|
size: listItemSize,
|
|
144
145
|
avatarPalette: avatarPalette,
|
|
145
146
|
palette: palette,
|
|
146
|
-
a11y: list_a11y
|
|
147
|
+
a11y: list_a11y,
|
|
148
|
+
needMultiLineText: needMultiLineText
|
|
147
149
|
}));
|
|
148
150
|
} else if (optionType === 'icon') {
|
|
149
151
|
return /*#__PURE__*/_react["default"].createElement(_ListItemWithIcon["default"], _extends({}, commonProps, {
|
|
@@ -163,7 +165,8 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
163
165
|
iconSize: iconSize,
|
|
164
166
|
size: listItemSize,
|
|
165
167
|
palette: palette,
|
|
166
|
-
a11y: list_a11y
|
|
168
|
+
a11y: list_a11y,
|
|
169
|
+
needMultiLineText: needMultiLineText
|
|
167
170
|
}));
|
|
168
171
|
}
|
|
169
172
|
|
|
@@ -182,7 +185,8 @@ var Suggestions = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
182
185
|
active: isActive,
|
|
183
186
|
size: listItemSize,
|
|
184
187
|
palette: palette,
|
|
185
|
-
a11y: list_a11y
|
|
188
|
+
a11y: list_a11y,
|
|
189
|
+
needMultiLineText: needMultiLineText
|
|
186
190
|
}));
|
|
187
191
|
})));
|
|
188
192
|
}
|
|
@@ -128,7 +128,8 @@ var MultiSelect_defaultProps = {
|
|
|
128
128
|
keepSelectedOptions: false,
|
|
129
129
|
selectedOptionsCount: 0,
|
|
130
130
|
cardHeaderName: '',
|
|
131
|
-
needResponsive: true
|
|
131
|
+
needResponsive: true,
|
|
132
|
+
customProps: {}
|
|
132
133
|
};
|
|
133
134
|
exports.MultiSelect_defaultProps = MultiSelect_defaultProps;
|
|
134
135
|
var MultiSelectHeader_defaultProps = {
|
|
@@ -176,6 +177,7 @@ var SelectedOptions_defaultProps = {
|
|
|
176
177
|
};
|
|
177
178
|
exports.SelectedOptions_defaultProps = SelectedOptions_defaultProps;
|
|
178
179
|
var Suggestions_defaultProps = {
|
|
179
|
-
a11y: {}
|
|
180
|
+
a11y: {},
|
|
181
|
+
needMultiLineText: false
|
|
180
182
|
};
|
|
181
183
|
exports.Suggestions_defaultProps = Suggestions_defaultProps;
|
|
@@ -125,7 +125,10 @@ var MultiSelect_propTypes = {
|
|
|
125
125
|
needSelectAll: _propTypes["default"].bool,
|
|
126
126
|
selectAllText: _propTypes["default"].string,
|
|
127
127
|
setAriaId: _propTypes["default"].string,
|
|
128
|
-
ariaErrorId: _propTypes["default"].string
|
|
128
|
+
ariaErrorId: _propTypes["default"].string,
|
|
129
|
+
customProps: {
|
|
130
|
+
suggestionsProps: _propTypes["default"].object
|
|
131
|
+
}
|
|
129
132
|
};
|
|
130
133
|
exports.MultiSelect_propTypes = MultiSelect_propTypes;
|
|
131
134
|
var MultiSelectHeader_propTypes = {
|
|
@@ -195,7 +198,8 @@ var Suggestions_propTypes = {
|
|
|
195
198
|
logo: _propTypes["default"].string,
|
|
196
199
|
optionType: _propTypes["default"].string,
|
|
197
200
|
listItemProps: _propTypes["default"].object
|
|
198
|
-
}))
|
|
201
|
+
})),
|
|
202
|
+
needMultiLineText: _propTypes["default"].bool
|
|
199
203
|
};
|
|
200
204
|
exports.Suggestions_propTypes = Suggestions_propTypes;
|
|
201
205
|
|
|
@@ -51,6 +51,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
51
51
|
|
|
52
52
|
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; }
|
|
53
53
|
|
|
54
|
+
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); }
|
|
55
|
+
|
|
54
56
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
55
57
|
|
|
56
58
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -666,7 +668,10 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
666
668
|
htmlId = _this$props9.htmlId,
|
|
667
669
|
iconOnHover = _this$props9.iconOnHover,
|
|
668
670
|
isLoading = _this$props9.isLoading,
|
|
669
|
-
dataSelectorId = _this$props9.dataSelectorId
|
|
671
|
+
dataSelectorId = _this$props9.dataSelectorId,
|
|
672
|
+
customProps = _this$props9.customProps;
|
|
673
|
+
var _customProps$suggesti = customProps.suggestionsProps,
|
|
674
|
+
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
670
675
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
671
676
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
672
677
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -839,7 +844,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
839
844
|
a11y: {
|
|
840
845
|
role: 'heading'
|
|
841
846
|
}
|
|
842
|
-
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
847
|
+
})), /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
|
|
843
848
|
activeId: selectedId,
|
|
844
849
|
suggestions: options,
|
|
845
850
|
getRef: _this7.suggestionItemRef,
|
|
@@ -855,7 +860,7 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
855
860
|
role: 'option'
|
|
856
861
|
},
|
|
857
862
|
dataId: "".concat(dataId, "_Options")
|
|
858
|
-
}));
|
|
863
|
+
}, suggestionsProps)));
|
|
859
864
|
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
860
865
|
options: revampedGroups,
|
|
861
866
|
searchString: searchStr,
|
|
@@ -51,6 +51,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
51
51
|
|
|
52
52
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
53
53
|
|
|
54
|
+
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); }
|
|
55
|
+
|
|
54
56
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
55
57
|
|
|
56
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); } }
|
|
@@ -213,7 +215,10 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
213
215
|
needEffect = _this$props.needEffect,
|
|
214
216
|
isLoading = _this$props.isLoading,
|
|
215
217
|
dataSelectorId = _this$props.dataSelectorId,
|
|
216
|
-
getTargetRef = _this$props.getTargetRef
|
|
218
|
+
getTargetRef = _this$props.getTargetRef,
|
|
219
|
+
customProps = _this$props.customProps;
|
|
220
|
+
var _customProps$suggesti = customProps.suggestionsProps,
|
|
221
|
+
suggestionsProps = _customProps$suggesti === void 0 ? {} : _customProps$suggesti;
|
|
217
222
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
218
223
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
219
224
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -352,7 +357,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
352
357
|
a11y: {
|
|
353
358
|
role: 'heading'
|
|
354
359
|
}
|
|
355
|
-
})) : null, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], {
|
|
360
|
+
})) : null, suggestions.length ? /*#__PURE__*/_react["default"].createElement(_Suggestions["default"], _extends({
|
|
356
361
|
dataId: "".concat(dataId, "_Options"),
|
|
357
362
|
activeId: selectedId,
|
|
358
363
|
suggestions: suggestions,
|
|
@@ -369,7 +374,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
369
374
|
ariaParentRole: 'listbox',
|
|
370
375
|
role: 'option'
|
|
371
376
|
}
|
|
372
|
-
}) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
377
|
+
}, suggestionsProps)) : /*#__PURE__*/_react["default"].createElement(_EmptyState["default"], {
|
|
373
378
|
isLoading: isFetchingOptions,
|
|
374
379
|
options: options,
|
|
375
380
|
searchString: searchStr,
|
|
@@ -82,7 +82,8 @@ var GroupSelect_defaultProps = {
|
|
|
82
82
|
isRestrictScroll: false,
|
|
83
83
|
i18nKeys: {},
|
|
84
84
|
iconOnHover: false,
|
|
85
|
-
isLoading: false
|
|
85
|
+
isLoading: false,
|
|
86
|
+
customProps: {}
|
|
86
87
|
};
|
|
87
88
|
exports.GroupSelect_defaultProps = GroupSelect_defaultProps;
|
|
88
89
|
var SelectWithAvatar_defaultProps = {
|
|
@@ -109,7 +110,8 @@ var SelectWithAvatar_defaultProps = {
|
|
|
109
110
|
isRestrictScroll: false,
|
|
110
111
|
i18nKeys: {},
|
|
111
112
|
needEffect: true,
|
|
112
|
-
isLoading: false
|
|
113
|
+
isLoading: false,
|
|
114
|
+
customProps: {}
|
|
113
115
|
};
|
|
114
116
|
exports.SelectWithAvatar_defaultProps = SelectWithAvatar_defaultProps;
|
|
115
117
|
var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
@@ -191,7 +191,10 @@ var GroupSelect_propTypes = {
|
|
|
191
191
|
}),
|
|
192
192
|
isLoading: _propTypes["default"].bool,
|
|
193
193
|
dataSelectorId: _propTypes["default"].string,
|
|
194
|
-
isDefaultSelectValue: _propTypes["default"].bool
|
|
194
|
+
isDefaultSelectValue: _propTypes["default"].bool,
|
|
195
|
+
customProps: _propTypes["default"].shape({
|
|
196
|
+
suggestionsProps: _propTypes["default"].object
|
|
197
|
+
})
|
|
195
198
|
};
|
|
196
199
|
exports.GroupSelect_propTypes = GroupSelect_propTypes;
|
|
197
200
|
|
|
@@ -254,7 +257,8 @@ var SelectWithAvatar_propTypes = _objectSpread(_objectSpread({}, Select_propType
|
|
|
254
257
|
htmlId: _propTypes["default"].string,
|
|
255
258
|
needEffect: _propTypes["default"].bool,
|
|
256
259
|
isLoading: _propTypes["default"].bool,
|
|
257
|
-
dataSelectorId: _propTypes["default"].string
|
|
260
|
+
dataSelectorId: _propTypes["default"].string,
|
|
261
|
+
customProps: _propTypes["default"].object
|
|
258
262
|
});
|
|
259
263
|
|
|
260
264
|
exports.SelectWithAvatar_propTypes = SelectWithAvatar_propTypes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/components",
|
|
3
|
-
"version": "1.0.0-temp-
|
|
3
|
+
"version": "1.0.0-temp-199.9",
|
|
4
4
|
"main": "es/index.js",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"build:css:umd": "npm run clean && npm run init && react-cli build:css:umd",
|
|
39
39
|
"coverage": "react-cli coverage",
|
|
40
40
|
"prepare": "npm run init && npm run build && npm run rtl && npm run cssVariableConvert ",
|
|
41
|
-
"prepublishOnly": "node prePublish.js && npm run
|
|
41
|
+
"prepublishOnly": "node prePublish.js && npm run css:review && npm run review:props ",
|
|
42
42
|
"postpublish": "node postPublish.js",
|
|
43
43
|
"report": "react-cli publish:report",
|
|
44
44
|
"test": "react-cli test",
|