@zohodesk/components 1.2.41 → 1.2.43
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 +17 -0
- package/es/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +1 -1
- package/es/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +1 -1
- package/es/DateTime/__tests__/__snapshots__/YearView.spec.js.snap +1 -1
- package/es/Heading/Heading.js +5 -2
- package/es/Heading/__tests__/Heading.spec.js +9 -0
- package/es/Heading/__tests__/__snapshots__/Heading.spec.js.snap +55 -1
- package/es/Heading/props/propTypes.js +2 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +12 -2
- package/es/MultiSelect/AdvancedMultiSelect.js +9 -1
- package/es/MultiSelect/MultiSelect.js +8 -0
- package/es/MultiSelect/MultiSelectWithAvatar.js +8 -0
- package/es/MultiSelect/props/defaultProps.js +9 -1
- package/es/MultiSelect/props/propTypes.js +8 -0
- package/es/Select/GroupSelect.js +8 -0
- package/es/Select/SelectWithAvatar.js +11 -2
- package/es/Select/SelectWithIcon.js +8 -0
- package/es/Select/props/defaultProps.js +6 -0
- package/es/Select/props/propTypes.js +10 -2
- package/es/Tooltip/Tooltip.js +13 -3
- package/es/Tooltip/Tooltip.module.css +0 -8
- package/es/common/common.module.css +24 -0
- package/es/utils/cssUtils.js +11 -0
- package/es/v1/Heading/Heading.js +5 -2
- package/es/v1/Heading/props/propTypes.js +2 -1
- package/es/v1/MultiSelect/AdvancedGroupMultiSelect.js +8 -2
- package/es/v1/MultiSelect/AdvancedMultiSelect.js +9 -1
- package/es/v1/MultiSelect/MultiSelect.js +8 -0
- package/es/v1/MultiSelect/MultiSelectWithAvatar.js +8 -0
- package/es/v1/MultiSelect/props/defaultProps.js +9 -1
- package/es/v1/MultiSelect/props/propTypes.js +8 -0
- package/es/v1/Select/GroupSelect.js +8 -0
- package/es/v1/Select/SelectWithAvatar.js +11 -2
- package/es/v1/Select/SelectWithIcon.js +8 -0
- package/es/v1/Select/props/defaultProps.js +6 -0
- package/es/v1/Select/props/propTypes.js +9 -1
- package/es/v1/Tooltip/Tooltip.js +13 -3
- package/lib/DateTime/__tests__/__snapshots__/DateTime.spec.js.snap +1 -1
- package/lib/DateTime/__tests__/__snapshots__/DateTimePopupHeader.spec.js.snap +1 -1
- package/lib/DateTime/__tests__/__snapshots__/YearView.spec.js.snap +1 -1
- package/lib/Heading/Heading.js +7 -3
- package/lib/Heading/__tests__/Heading.spec.js +9 -0
- package/lib/Heading/__tests__/__snapshots__/Heading.spec.js.snap +55 -1
- package/lib/Heading/props/propTypes.js +2 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +12 -2
- package/lib/MultiSelect/AdvancedMultiSelect.js +10 -2
- package/lib/MultiSelect/MultiSelect.js +8 -0
- package/lib/MultiSelect/MultiSelectWithAvatar.js +8 -0
- package/lib/MultiSelect/props/defaultProps.js +9 -1
- package/lib/MultiSelect/props/propTypes.js +8 -0
- package/lib/Select/GroupSelect.js +8 -0
- package/lib/Select/SelectWithAvatar.js +11 -2
- package/lib/Select/SelectWithIcon.js +8 -0
- package/lib/Select/props/defaultProps.js +5 -1
- package/lib/Select/props/propTypes.js +10 -2
- package/lib/Tooltip/Tooltip.js +15 -4
- package/lib/Tooltip/Tooltip.module.css +0 -8
- package/lib/common/common.module.css +24 -0
- package/lib/utils/cssUtils.js +22 -0
- package/lib/v1/Heading/Heading.js +7 -3
- package/lib/v1/Heading/props/propTypes.js +2 -1
- package/lib/v1/MultiSelect/AdvancedGroupMultiSelect.js +8 -2
- package/lib/v1/MultiSelect/AdvancedMultiSelect.js +10 -2
- package/lib/v1/MultiSelect/MultiSelect.js +8 -0
- package/lib/v1/MultiSelect/MultiSelectWithAvatar.js +8 -0
- package/lib/v1/MultiSelect/props/defaultProps.js +9 -1
- package/lib/v1/MultiSelect/props/propTypes.js +8 -0
- package/lib/v1/Select/GroupSelect.js +8 -0
- package/lib/v1/Select/SelectWithAvatar.js +11 -2
- package/lib/v1/Select/SelectWithIcon.js +8 -0
- package/lib/v1/Select/props/defaultProps.js +5 -1
- package/lib/v1/Select/props/propTypes.js +9 -1
- package/lib/v1/Tooltip/Tooltip.js +15 -4
- package/package.json +6 -6
- package/result.json +1 -1
|
@@ -183,6 +183,10 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
183
183
|
isPopupOpen = _this$props.isPopupOpen,
|
|
184
184
|
removeClose = _this$props.removeClose,
|
|
185
185
|
isPopupReady = _this$props.isPopupReady,
|
|
186
|
+
isAbsolutePositioningNeeded = _this$props.isAbsolutePositioningNeeded,
|
|
187
|
+
positionsOffset = _this$props.positionsOffset,
|
|
188
|
+
targetOffset = _this$props.targetOffset,
|
|
189
|
+
isRestrictScroll = _this$props.isRestrictScroll,
|
|
186
190
|
animationStyle = _this$props.animationStyle,
|
|
187
191
|
textBoxSize = _this$props.textBoxSize,
|
|
188
192
|
textBoxVariant = _this$props.textBoxVariant,
|
|
@@ -208,7 +212,8 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
208
212
|
htmlId = _this$props.htmlId,
|
|
209
213
|
needEffect = _this$props.needEffect,
|
|
210
214
|
isLoading = _this$props.isLoading,
|
|
211
|
-
dataSelectorId = _this$props.dataSelectorId
|
|
215
|
+
dataSelectorId = _this$props.dataSelectorId,
|
|
216
|
+
getTargetRef = _this$props.getTargetRef;
|
|
212
217
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
213
218
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
214
219
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -239,7 +244,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
239
244
|
align: "vertical",
|
|
240
245
|
alignBox: "row",
|
|
241
246
|
className: "".concat(_MultiSelectModule["default"].container, " ").concat(_MultiSelectModule["default"][size], " ").concat(_MultiSelectModule["default"]["borderColor_".concat(borderColor)], " ").concat(isActive && needBorder ? _MultiSelectModule["default"].active : '', " ").concat(textBoxClass ? textBoxClass : '', " ").concat(needBorder ? _MultiSelectModule["default"].hasBorder : ''),
|
|
242
|
-
eleRef:
|
|
247
|
+
eleRef: getTargetRef,
|
|
243
248
|
onClick: !isDisabled && this.togglePopup
|
|
244
249
|
}, selectedId ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
245
250
|
className: _MultiSelectModule["default"].tag,
|
|
@@ -303,6 +308,10 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
303
308
|
isArrow: false,
|
|
304
309
|
onClick: removeClose,
|
|
305
310
|
needResponsive: needResponsive,
|
|
311
|
+
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
312
|
+
positionsOffset: positionsOffset,
|
|
313
|
+
targetOffset: targetOffset,
|
|
314
|
+
isRestrictScroll: isRestrictScroll,
|
|
306
315
|
isPadding: false,
|
|
307
316
|
isResponsivePadding: true,
|
|
308
317
|
alignBox: "row",
|
|
@@ -396,6 +396,10 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
396
396
|
isPopupReady = _this$props7.isPopupReady,
|
|
397
397
|
position = _this$props7.position,
|
|
398
398
|
getContainerRef = _this$props7.getContainerRef,
|
|
399
|
+
isAbsolutePositioningNeeded = _this$props7.isAbsolutePositioningNeeded,
|
|
400
|
+
positionsOffset = _this$props7.positionsOffset,
|
|
401
|
+
targetOffset = _this$props7.targetOffset,
|
|
402
|
+
isRestrictScroll = _this$props7.isRestrictScroll,
|
|
399
403
|
valueKey = _this$props7.valueKey,
|
|
400
404
|
idKey = _this$props7.idKey,
|
|
401
405
|
needListBorder = _this$props7.needListBorder,
|
|
@@ -521,6 +525,10 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
521
525
|
onClick: removeClose,
|
|
522
526
|
getRef: getContainerRef,
|
|
523
527
|
needResponsive: needResponsive,
|
|
528
|
+
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
529
|
+
positionsOffset: positionsOffset,
|
|
530
|
+
targetOffset: targetOffset,
|
|
531
|
+
isRestrictScroll: isRestrictScroll,
|
|
524
532
|
dataId: "".concat(dataId, "_suggestions"),
|
|
525
533
|
size: boxSize,
|
|
526
534
|
isPadding: false,
|
|
@@ -78,6 +78,8 @@ var GroupSelect_defaultProps = {
|
|
|
78
78
|
needTick: true,
|
|
79
79
|
needLocalSearch: true,
|
|
80
80
|
isSearchClearOnClose: true,
|
|
81
|
+
isAbsolutePositioningNeeded: true,
|
|
82
|
+
isRestrictScroll: false,
|
|
81
83
|
i18nKeys: {},
|
|
82
84
|
iconOnHover: false,
|
|
83
85
|
isLoading: false
|
|
@@ -103,6 +105,8 @@ var SelectWithAvatar_defaultProps = {
|
|
|
103
105
|
dataSelectorId: 'selectWithAvatar',
|
|
104
106
|
borderColor: 'default',
|
|
105
107
|
isSearchClearOnClose: true,
|
|
108
|
+
isAbsolutePositioningNeeded: true,
|
|
109
|
+
isRestrictScroll: false,
|
|
106
110
|
i18nKeys: {},
|
|
107
111
|
needEffect: true,
|
|
108
112
|
isLoading: false
|
|
@@ -117,5 +121,5 @@ var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
|
117
121
|
needListBorder: false,
|
|
118
122
|
needSearch: false,
|
|
119
123
|
boxSize: 'default'
|
|
120
|
-
}, _defineProperty(_SelectWithIcon_defau, "needListBorder", false), _defineProperty(_SelectWithIcon_defau, "needCloseOnSelect", true), _defineProperty(_SelectWithIcon_defau, "borderColor", 'default'), _defineProperty(_SelectWithIcon_defau, "needTick", true), _defineProperty(_SelectWithIcon_defau, "searchBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "size", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxSize", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxVariant", 'default'), _defineProperty(_SelectWithIcon_defau, "dataId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dataSelectorId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dropBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "needIcon", true), _defineProperty(_SelectWithIcon_defau, "iconSize", '14'), _defineProperty(_SelectWithIcon_defau, "i18nKeys", {}), _defineProperty(_SelectWithIcon_defau, "isLoading", false), _defineProperty(_SelectWithIcon_defau, "customProps", {}), _SelectWithIcon_defau);
|
|
124
|
+
}, _defineProperty(_SelectWithIcon_defau, "needListBorder", false), _defineProperty(_SelectWithIcon_defau, "needCloseOnSelect", true), _defineProperty(_SelectWithIcon_defau, "borderColor", 'default'), _defineProperty(_SelectWithIcon_defau, "needTick", true), _defineProperty(_SelectWithIcon_defau, "searchBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "size", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxSize", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxVariant", 'default'), _defineProperty(_SelectWithIcon_defau, "dataId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dataSelectorId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dropBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "needIcon", true), _defineProperty(_SelectWithIcon_defau, "iconSize", '14'), _defineProperty(_SelectWithIcon_defau, "i18nKeys", {}), _defineProperty(_SelectWithIcon_defau, "isLoading", false), _defineProperty(_SelectWithIcon_defau, "isAbsolutePositioningNeeded", true), _defineProperty(_SelectWithIcon_defau, "isRestrictScroll", false), _defineProperty(_SelectWithIcon_defau, "customProps", {}), _SelectWithIcon_defau);
|
|
121
125
|
exports.SelectWithIcon_defaultProps = SelectWithIcon_defaultProps;
|
|
@@ -106,8 +106,8 @@ var Select_propTypes = {
|
|
|
106
106
|
isAbsolutePositioningNeeded: _propTypes["default"].bool,
|
|
107
107
|
openPopupOnly: _propTypes["default"].bool,
|
|
108
108
|
ariaLabelledby: _propTypes["default"].string,
|
|
109
|
-
positionsOffset: _propTypes["default"].
|
|
110
|
-
targetOffset: _propTypes["default"].
|
|
109
|
+
positionsOffset: _propTypes["default"].object,
|
|
110
|
+
targetOffset: _propTypes["default"].object,
|
|
111
111
|
isRestrictScroll: _propTypes["default"].bool,
|
|
112
112
|
dropBoxPortalId: _propTypes["default"].string
|
|
113
113
|
};
|
|
@@ -179,6 +179,10 @@ var GroupSelect_propTypes = {
|
|
|
179
179
|
closePopupOnly: _propTypes["default"].func,
|
|
180
180
|
position: _propTypes["default"].string,
|
|
181
181
|
removeClose: _propTypes["default"].func,
|
|
182
|
+
isAbsolutePositioningNeeded: _propTypes["default"].bool,
|
|
183
|
+
isRestrictScroll: _propTypes["default"].bool,
|
|
184
|
+
positionsOffset: _propTypes["default"].object,
|
|
185
|
+
targetOffset: _propTypes["default"].object,
|
|
182
186
|
i18nKeys: _propTypes["default"].shape({
|
|
183
187
|
loadingText: _propTypes["default"].string,
|
|
184
188
|
emptyText: _propTypes["default"].string,
|
|
@@ -307,6 +311,10 @@ var SelectWithIcon_propTypes = {
|
|
|
307
311
|
needResponsive: _propTypes["default"].bool,
|
|
308
312
|
boxSize: _propTypes["default"].string,
|
|
309
313
|
emptyMessage: _propTypes["default"].string,
|
|
314
|
+
isAbsolutePositioningNeeded: _propTypes["default"].bool,
|
|
315
|
+
isRestrictScroll: _propTypes["default"].bool,
|
|
316
|
+
positionsOffset: _propTypes["default"].object,
|
|
317
|
+
targetOffset: _propTypes["default"].object,
|
|
310
318
|
customProps: _propTypes["default"].shape({
|
|
311
319
|
TextBoxProps: _propTypes["default"].object,
|
|
312
320
|
DropdownSearchTextBoxProps: _propTypes["default"].object,
|
package/lib/Tooltip/Tooltip.js
CHANGED
|
@@ -15,12 +15,14 @@ var _propTypes = require("./props/propTypes");
|
|
|
15
15
|
|
|
16
16
|
var _Config = require("../Provider/Config");
|
|
17
17
|
|
|
18
|
-
var _TooltipModule = _interopRequireDefault(require("./Tooltip.module.css"));
|
|
19
|
-
|
|
20
18
|
var _ResizeObserver = _interopRequireDefault(require("../Responsive/ResizeObserver"));
|
|
21
19
|
|
|
22
20
|
var _selectn = _interopRequireDefault(require("selectn"));
|
|
23
21
|
|
|
22
|
+
var _cssUtils = require("../utils/cssUtils");
|
|
23
|
+
|
|
24
|
+
var _TooltipModule = _interopRequireDefault(require("./Tooltip.module.css"));
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
26
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -251,7 +253,8 @@ var Tooltip = /*#__PURE__*/function (_React$Component) {
|
|
|
251
253
|
|
|
252
254
|
var isHtml = titleDiv.getAttribute('data-ishtml');
|
|
253
255
|
var dataTooltipnoArrow = titleDiv.getAttribute('data-tooltip-noarrow') === 'true' ? true : false;
|
|
254
|
-
var dataTooltipWrap = titleDiv.getAttribute('data-title-wrap')
|
|
256
|
+
var dataTooltipWrap = titleDiv.getAttribute('data-title-wrap') || 'normal'; // values: normal, pre, pre-wrap, pre-line, nowrap, break-spaces
|
|
257
|
+
|
|
255
258
|
var clientRect = titleDiv.getBoundingClientRect();
|
|
256
259
|
var boxLayout = this.getClientRectOfContEl(containerElement);
|
|
257
260
|
this.setState({
|
|
@@ -545,7 +548,15 @@ var Tooltip = /*#__PURE__*/function (_React$Component) {
|
|
|
545
548
|
customClass = _this$props.customClass;
|
|
546
549
|
var arrowStyle = isArrowHorizontal ? isArrowRight ? _TooltipModule["default"].arrowRight : _TooltipModule["default"].arrowLeft : isArrowDown ? _TooltipModule["default"].arrowDown : _TooltipModule["default"].arrowUp;
|
|
547
550
|
title = title ? title.trim() : null;
|
|
548
|
-
var
|
|
551
|
+
var tooltipWhiteSpaceModification = dataTooltipWrap;
|
|
552
|
+
|
|
553
|
+
if (dataTooltipWrap == 'pre') {
|
|
554
|
+
tooltipWhiteSpaceModification = 'pre-wrap';
|
|
555
|
+
} else if (dataTooltipWrap == 'nowrap') {
|
|
556
|
+
tooltipWhiteSpaceModification = 'normal';
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
var tooltipCss = "".concat(_TooltipModule["default"].tooltipcont, " ").concat(_cssUtils.whiteSpaceClassMapping[tooltipWhiteSpaceModification]);
|
|
549
560
|
return title ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
550
561
|
className: "".concat(customClass, " ").concat(_TooltipModule["default"].tooltiptext),
|
|
551
562
|
style: {
|
|
@@ -522,4 +522,28 @@
|
|
|
522
522
|
.fitContHeight {
|
|
523
523
|
height: fit-content ;
|
|
524
524
|
height: -moz-fit-content ;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.whiteSpace_normal {
|
|
528
|
+
white-space: normal;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
.whiteSpace_nowrap {
|
|
532
|
+
white-space: nowrap;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.whiteSpace_pre {
|
|
536
|
+
white-space: pre;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.whiteSpace_preLine {
|
|
540
|
+
white-space: pre-line;
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.whiteSpace_preWrap {
|
|
544
|
+
white-space: pre-wrap;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
.whiteSpace_breakSpaces {
|
|
548
|
+
white-space: break-spaces
|
|
525
549
|
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.whiteSpaceClassMapping = void 0;
|
|
7
|
+
|
|
8
|
+
var _commonModule = _interopRequireDefault(require("../common/common.module.css"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
12
|
+
var whiteSpaceClassMapping = {
|
|
13
|
+
// eslint-disable-next-line dot-notation
|
|
14
|
+
'normal': _commonModule["default"].whiteSpace_normal,
|
|
15
|
+
'pre': _commonModule["default"].whiteSpace_pre,
|
|
16
|
+
'pre-wrap': _commonModule["default"].whiteSpace_preWrap,
|
|
17
|
+
'pre-line': _commonModule["default"].whiteSpace_preLine,
|
|
18
|
+
// eslint-disable-next-line dot-notation
|
|
19
|
+
'nowrap': _commonModule["default"].whiteSpace_nowrap,
|
|
20
|
+
'break-spaces': _commonModule["default"].whiteSpace_breakSpaces
|
|
21
|
+
};
|
|
22
|
+
exports.whiteSpaceClassMapping = whiteSpaceClassMapping;
|
|
@@ -11,6 +11,8 @@ var _defaultProps = require("./props/defaultProps");
|
|
|
11
11
|
|
|
12
12
|
var _propTypes = require("./props/propTypes");
|
|
13
13
|
|
|
14
|
+
var _cssUtils = require("../../utils/cssUtils");
|
|
15
|
+
|
|
14
16
|
var _HeadingModule = _interopRequireDefault(require("../../Heading/Heading.module.css"));
|
|
15
17
|
|
|
16
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -29,14 +31,16 @@ function Heading(props) {
|
|
|
29
31
|
title = props.title,
|
|
30
32
|
dataTitle = props.dataTitle,
|
|
31
33
|
dataId = props.dataId,
|
|
32
|
-
a11y = props.a11y
|
|
34
|
+
a11y = props.a11y,
|
|
35
|
+
whiteSpace = props.whiteSpace;
|
|
33
36
|
return /*#__PURE__*/_react["default"].createElement(tagName, _objectSpread({
|
|
34
|
-
className: "".concat(_HeadingModule["default"].reset, " ").concat(className),
|
|
37
|
+
className: "".concat(_HeadingModule["default"].reset, " ").concat(whiteSpace ? _cssUtils.whiteSpaceClassMapping[whiteSpace] : '', " ").concat(className),
|
|
35
38
|
onClick: onClick,
|
|
36
39
|
onDoubleClick: onDoubleClick,
|
|
37
40
|
'data-title': dataTitle || title,
|
|
38
41
|
'data-id': dataId,
|
|
39
|
-
'data-test-id': dataId
|
|
42
|
+
'data-test-id': dataId,
|
|
43
|
+
'data-title-wrap': whiteSpace
|
|
40
44
|
}, a11y), title);
|
|
41
45
|
}
|
|
42
46
|
|
|
@@ -17,6 +17,7 @@ var propTypes = {
|
|
|
17
17
|
dataTitle: _propTypes["default"].string,
|
|
18
18
|
onClick: _propTypes["default"].func,
|
|
19
19
|
onDoubleClick: _propTypes["default"].func,
|
|
20
|
-
a11y: _propTypes["default"].object
|
|
20
|
+
a11y: _propTypes["default"].object,
|
|
21
|
+
whiteSpace: _propTypes["default"].oneOf(['normal', 'nowrap', 'pre', 'pre-line', 'pre-wrap', 'break-spaces'])
|
|
21
22
|
};
|
|
22
23
|
exports.propTypes = propTypes;
|
|
@@ -943,6 +943,10 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
943
943
|
dropBoxSize = _this$props8.dropBoxSize,
|
|
944
944
|
position = _this$props8.position,
|
|
945
945
|
getContainerRef = _this$props8.getContainerRef,
|
|
946
|
+
isAbsolutePositioningNeeded = _this$props8.isAbsolutePositioningNeeded,
|
|
947
|
+
positionsOffset = _this$props8.positionsOffset,
|
|
948
|
+
targetOffset = _this$props8.targetOffset,
|
|
949
|
+
isRestrictScroll = _this$props8.isRestrictScroll,
|
|
946
950
|
emptyMessage = _this$props8.emptyMessage,
|
|
947
951
|
searchEmptyMessage = _this$props8.searchEmptyMessage,
|
|
948
952
|
title = _this$props8.title,
|
|
@@ -961,7 +965,8 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
961
965
|
a11y = _this$props8.a11y,
|
|
962
966
|
palette = _this$props8.palette,
|
|
963
967
|
needEffect = _this$props8.needEffect,
|
|
964
|
-
autoComplete = _this$props8.autoComplete
|
|
968
|
+
autoComplete = _this$props8.autoComplete,
|
|
969
|
+
getTargetRef = _this$props8.getTargetRef;
|
|
965
970
|
var _i18nKeys = i18nKeys,
|
|
966
971
|
_i18nKeys$clearText = _i18nKeys.clearText,
|
|
967
972
|
clearText = _i18nKeys$clearText === void 0 ? 'Clear all' : _i18nKeys$clearText;
|
|
@@ -1000,7 +1005,8 @@ var AdvancedGroupMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
1000
1005
|
align: "vertical",
|
|
1001
1006
|
alignBox: "row",
|
|
1002
1007
|
onClick: this.togglePopup,
|
|
1003
|
-
className: customClass
|
|
1008
|
+
className: customClass,
|
|
1009
|
+
eleRef: getTargetRef
|
|
1004
1010
|
}, children) : /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
1005
1011
|
align: "vertical",
|
|
1006
1012
|
alignBox: "row",
|
|
@@ -436,7 +436,11 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
436
436
|
disabledOptions = _this$props5.disabledOptions,
|
|
437
437
|
isLoading = _this$props5.isLoading,
|
|
438
438
|
dataSelectorId = _this$props5.dataSelectorId,
|
|
439
|
-
customClass = _this$props5.customClass
|
|
439
|
+
customClass = _this$props5.customClass,
|
|
440
|
+
isAbsolutePositioningNeeded = _this$props5.isAbsolutePositioningNeeded,
|
|
441
|
+
positionsOffset = _this$props5.positionsOffset,
|
|
442
|
+
targetOffset = _this$props5.targetOffset,
|
|
443
|
+
isRestrictScroll = _this$props5.isRestrictScroll;
|
|
440
444
|
var _customProps$Suggesti = customProps.SuggestionsProps,
|
|
441
445
|
SuggestionsProps = _customProps$Suggesti === void 0 ? {} : _customProps$Suggesti,
|
|
442
446
|
_customProps$DropBoxP = customProps.DropBoxProps,
|
|
@@ -569,7 +573,11 @@ var AdvancedMultiSelectComponent = /*#__PURE__*/function (_MultiSelectComponent)
|
|
|
569
573
|
role: 'listbox',
|
|
570
574
|
ariaMultiselectable: true
|
|
571
575
|
},
|
|
572
|
-
dataId: "".concat(dataIdMultiSelectComp, "_dropbox")
|
|
576
|
+
dataId: "".concat(dataIdMultiSelectComp, "_dropbox"),
|
|
577
|
+
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
578
|
+
positionsOffset: positionsOffset,
|
|
579
|
+
targetOffset: targetOffset,
|
|
580
|
+
isRestrictScroll: isRestrictScroll
|
|
573
581
|
}, DropBoxProps, {
|
|
574
582
|
alignBox: "row",
|
|
575
583
|
isResponsivePadding: getFooter ? false : true
|
|
@@ -1065,6 +1065,10 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1065
1065
|
borderColor = _this$props15.borderColor,
|
|
1066
1066
|
disableAction = _this$props15.disableAction,
|
|
1067
1067
|
isBoxPaddingNeed = _this$props15.isBoxPaddingNeed,
|
|
1068
|
+
isAbsolutePositioningNeeded = _this$props15.isAbsolutePositioningNeeded,
|
|
1069
|
+
positionsOffset = _this$props15.positionsOffset,
|
|
1070
|
+
targetOffset = _this$props15.targetOffset,
|
|
1071
|
+
isRestrictScroll = _this$props15.isRestrictScroll,
|
|
1068
1072
|
palette = _this$props15.palette,
|
|
1069
1073
|
i18nKeys = _this$props15.i18nKeys,
|
|
1070
1074
|
getFooter = _this$props15.getFooter,
|
|
@@ -1110,6 +1114,10 @@ var MultiSelectComponent = /*#__PURE__*/function (_React$Component) {
|
|
|
1110
1114
|
needResponsive: needResponsive,
|
|
1111
1115
|
isPadding: false,
|
|
1112
1116
|
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
1117
|
+
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
1118
|
+
positionsOffset: positionsOffset,
|
|
1119
|
+
targetOffset: targetOffset,
|
|
1120
|
+
isRestrictScroll: isRestrictScroll,
|
|
1113
1121
|
palette: palette,
|
|
1114
1122
|
htmlId: setAriaId,
|
|
1115
1123
|
a11y: {
|
|
@@ -126,6 +126,10 @@ var MultiSelectWithAvatarComponent = /*#__PURE__*/function (_MultiSelectComponen
|
|
|
126
126
|
selectAllText = _this$props.selectAllText,
|
|
127
127
|
getContainerRef = _this$props.getContainerRef,
|
|
128
128
|
removeClose = _this$props.removeClose,
|
|
129
|
+
isAbsolutePositioningNeeded = _this$props.isAbsolutePositioningNeeded,
|
|
130
|
+
positionsOffset = _this$props.positionsOffset,
|
|
131
|
+
targetOffset = _this$props.targetOffset,
|
|
132
|
+
isRestrictScroll = _this$props.isRestrictScroll,
|
|
129
133
|
isAnimate = _this$props.isAnimate,
|
|
130
134
|
animationStyle = _this$props.animationStyle,
|
|
131
135
|
isDisabled = _this$props.isDisabled,
|
|
@@ -179,6 +183,10 @@ var MultiSelectWithAvatarComponent = /*#__PURE__*/function (_MultiSelectComponen
|
|
|
179
183
|
needResponsive: needResponsive,
|
|
180
184
|
isPadding: false,
|
|
181
185
|
isBoxPaddingNeed: isBoxPaddingNeed,
|
|
186
|
+
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
187
|
+
positionsOffset: positionsOffset,
|
|
188
|
+
targetOffset: targetOffset,
|
|
189
|
+
isRestrictScroll: isRestrictScroll,
|
|
182
190
|
palette: palette,
|
|
183
191
|
htmlId: setAriaId,
|
|
184
192
|
a11y: {
|
|
@@ -40,6 +40,8 @@ var AdvancedGroupMultiSelect_defaultProps = {
|
|
|
40
40
|
i18nKeys: {},
|
|
41
41
|
a11y: {},
|
|
42
42
|
isSearchClearOnSelect: true,
|
|
43
|
+
isAbsolutePositioningNeeded: true,
|
|
44
|
+
isRestrictScroll: false,
|
|
43
45
|
needEffect: true,
|
|
44
46
|
palette: 'default',
|
|
45
47
|
isLoading: false,
|
|
@@ -76,7 +78,9 @@ var AdvancedMultiSelect_defaultProps = {
|
|
|
76
78
|
needEffect: true,
|
|
77
79
|
isLoading: false,
|
|
78
80
|
dataSelectorId: 'advancedMultiSelect',
|
|
79
|
-
customClass: {}
|
|
81
|
+
customClass: {},
|
|
82
|
+
isAbsolutePositioningNeeded: true,
|
|
83
|
+
isRestrictScroll: false
|
|
80
84
|
};
|
|
81
85
|
exports.AdvancedMultiSelect_defaultProps = AdvancedMultiSelect_defaultProps;
|
|
82
86
|
var EmptyState_defaultProps = {
|
|
@@ -115,6 +119,8 @@ var MultiSelect_defaultProps = {
|
|
|
115
119
|
textBoxClass: '',
|
|
116
120
|
palette: 'default',
|
|
117
121
|
isSearchClearOnSelect: true,
|
|
122
|
+
isAbsolutePositioningNeeded: true,
|
|
123
|
+
isRestrictScroll: false,
|
|
118
124
|
needEffect: true,
|
|
119
125
|
boxSize: 'default',
|
|
120
126
|
isLoading: false,
|
|
@@ -154,6 +160,8 @@ var MultiSelectWithAvatar_defaultProps = {
|
|
|
154
160
|
palette: 'default',
|
|
155
161
|
isBoxPaddingNeed: true,
|
|
156
162
|
isSearchClearOnSelect: true,
|
|
163
|
+
isAbsolutePositioningNeeded: true,
|
|
164
|
+
isRestrictScroll: false,
|
|
157
165
|
needEffect: true,
|
|
158
166
|
isLoading: false,
|
|
159
167
|
dataSelectorId: 'multiSelectWithAvatar',
|
|
@@ -115,6 +115,10 @@ var MultiSelect_propTypes = {
|
|
|
115
115
|
getFooter: _propTypes["default"].func,
|
|
116
116
|
needEffect: _propTypes["default"].bool,
|
|
117
117
|
boxSize: _propTypes["default"].string,
|
|
118
|
+
isAbsolutePositioningNeeded: _propTypes["default"].bool,
|
|
119
|
+
isRestrictScroll: _propTypes["default"].bool,
|
|
120
|
+
positionsOffset: _propTypes["default"].object,
|
|
121
|
+
targetOffset: _propTypes["default"].object,
|
|
118
122
|
isLoading: _propTypes["default"].bool,
|
|
119
123
|
dataSelectorId: _propTypes["default"].string,
|
|
120
124
|
keepSelectedOptions: _propTypes["default"].bool,
|
|
@@ -251,6 +255,10 @@ var AdvancedGroupMultiSelect_propTypes = _defineProperty({
|
|
|
251
255
|
textField: _propTypes["default"].string,
|
|
252
256
|
getTargetRef: _propTypes["default"].func,
|
|
253
257
|
togglePopup: _propTypes["default"].func,
|
|
258
|
+
isAbsolutePositioningNeeded: _propTypes["default"].bool,
|
|
259
|
+
isRestrictScroll: _propTypes["default"].bool,
|
|
260
|
+
positionsOffset: _propTypes["default"].object,
|
|
261
|
+
targetOffset: _propTypes["default"].object,
|
|
254
262
|
needLocalSearch: _propTypes["default"].bool,
|
|
255
263
|
isNextOptions: _propTypes["default"].bool,
|
|
256
264
|
getNextOptions: _propTypes["default"].func,
|
|
@@ -654,6 +654,10 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
654
654
|
getContainerRef = _this$props9.getContainerRef,
|
|
655
655
|
isPopupReady = _this$props9.isPopupReady,
|
|
656
656
|
removeClose = _this$props9.removeClose,
|
|
657
|
+
isAbsolutePositioningNeeded = _this$props9.isAbsolutePositioningNeeded,
|
|
658
|
+
positionsOffset = _this$props9.positionsOffset,
|
|
659
|
+
targetOffset = _this$props9.targetOffset,
|
|
660
|
+
isRestrictScroll = _this$props9.isRestrictScroll,
|
|
657
661
|
borderColor = _this$props9.borderColor,
|
|
658
662
|
needTick = _this$props9.needTick,
|
|
659
663
|
children = _this$props9.children,
|
|
@@ -779,6 +783,10 @@ var GroupSelectComponent = /*#__PURE__*/function (_PureComponent) {
|
|
|
779
783
|
onClick: removeClose,
|
|
780
784
|
needResponsive: needResponsive,
|
|
781
785
|
isPadding: false,
|
|
786
|
+
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
787
|
+
positionsOffset: positionsOffset,
|
|
788
|
+
targetOffset: targetOffset,
|
|
789
|
+
isRestrictScroll: isRestrictScroll,
|
|
782
790
|
isResponsivePadding: getFooter ? false : true,
|
|
783
791
|
alignBox: "row",
|
|
784
792
|
dataId: "".concat(dataId, "_suggestionBox")
|
|
@@ -183,6 +183,10 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
183
183
|
isPopupOpen = _this$props.isPopupOpen,
|
|
184
184
|
removeClose = _this$props.removeClose,
|
|
185
185
|
isPopupReady = _this$props.isPopupReady,
|
|
186
|
+
isAbsolutePositioningNeeded = _this$props.isAbsolutePositioningNeeded,
|
|
187
|
+
positionsOffset = _this$props.positionsOffset,
|
|
188
|
+
targetOffset = _this$props.targetOffset,
|
|
189
|
+
isRestrictScroll = _this$props.isRestrictScroll,
|
|
186
190
|
animationStyle = _this$props.animationStyle,
|
|
187
191
|
textBoxSize = _this$props.textBoxSize,
|
|
188
192
|
textBoxVariant = _this$props.textBoxVariant,
|
|
@@ -208,7 +212,8 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
208
212
|
htmlId = _this$props.htmlId,
|
|
209
213
|
needEffect = _this$props.needEffect,
|
|
210
214
|
isLoading = _this$props.isLoading,
|
|
211
|
-
dataSelectorId = _this$props.dataSelectorId
|
|
215
|
+
dataSelectorId = _this$props.dataSelectorId,
|
|
216
|
+
getTargetRef = _this$props.getTargetRef;
|
|
212
217
|
i18nKeys = Object.assign({}, i18nKeys, {
|
|
213
218
|
emptyText: i18nKeys.emptyText || emptyMessage,
|
|
214
219
|
searchEmptyText: i18nKeys.searchEmptyText || searchEmptyMessage
|
|
@@ -239,7 +244,7 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
239
244
|
align: "vertical",
|
|
240
245
|
alignBox: "row",
|
|
241
246
|
className: "".concat(_MultiSelectModule["default"].container, " ").concat(_MultiSelectModule["default"][size], " ").concat(_MultiSelectModule["default"]["borderColor_".concat(borderColor)], " ").concat(isActive && needBorder ? _MultiSelectModule["default"].active : '', " ").concat(textBoxClass ? textBoxClass : '', " ").concat(needBorder ? _MultiSelectModule["default"].hasBorder : ''),
|
|
242
|
-
eleRef:
|
|
247
|
+
eleRef: getTargetRef,
|
|
243
248
|
onClick: !isDisabled && this.togglePopup
|
|
244
249
|
}, selectedId ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
245
250
|
className: _MultiSelectModule["default"].tag,
|
|
@@ -303,6 +308,10 @@ var SelectWithAvatarComponent = /*#__PURE__*/function (_SelectComponent) {
|
|
|
303
308
|
isArrow: false,
|
|
304
309
|
onClick: removeClose,
|
|
305
310
|
needResponsive: needResponsive,
|
|
311
|
+
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
312
|
+
positionsOffset: positionsOffset,
|
|
313
|
+
targetOffset: targetOffset,
|
|
314
|
+
isRestrictScroll: isRestrictScroll,
|
|
306
315
|
isPadding: false,
|
|
307
316
|
isResponsivePadding: true,
|
|
308
317
|
alignBox: "row",
|
|
@@ -390,6 +390,10 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
390
390
|
isPopupReady = _this$props7.isPopupReady,
|
|
391
391
|
position = _this$props7.position,
|
|
392
392
|
getContainerRef = _this$props7.getContainerRef,
|
|
393
|
+
isAbsolutePositioningNeeded = _this$props7.isAbsolutePositioningNeeded,
|
|
394
|
+
positionsOffset = _this$props7.positionsOffset,
|
|
395
|
+
targetOffset = _this$props7.targetOffset,
|
|
396
|
+
isRestrictScroll = _this$props7.isRestrictScroll,
|
|
393
397
|
valueKey = _this$props7.valueKey,
|
|
394
398
|
idKey = _this$props7.idKey,
|
|
395
399
|
needListBorder = _this$props7.needListBorder,
|
|
@@ -499,6 +503,10 @@ var SelectWithIcon = /*#__PURE__*/function (_Component) {
|
|
|
499
503
|
onClick: removeClose,
|
|
500
504
|
getRef: getContainerRef,
|
|
501
505
|
needResponsive: needResponsive,
|
|
506
|
+
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
507
|
+
positionsOffset: positionsOffset,
|
|
508
|
+
targetOffset: targetOffset,
|
|
509
|
+
isRestrictScroll: isRestrictScroll,
|
|
502
510
|
dataId: "".concat(dataId, "_suggestions"),
|
|
503
511
|
size: boxSize,
|
|
504
512
|
isPadding: false,
|
|
@@ -78,6 +78,8 @@ var GroupSelect_defaultProps = {
|
|
|
78
78
|
needTick: true,
|
|
79
79
|
needLocalSearch: true,
|
|
80
80
|
isSearchClearOnClose: true,
|
|
81
|
+
isAbsolutePositioningNeeded: true,
|
|
82
|
+
isRestrictScroll: false,
|
|
81
83
|
i18nKeys: {},
|
|
82
84
|
iconOnHover: false,
|
|
83
85
|
isLoading: false
|
|
@@ -103,6 +105,8 @@ var SelectWithAvatar_defaultProps = {
|
|
|
103
105
|
dataSelectorId: 'selectWithAvatar',
|
|
104
106
|
borderColor: 'default',
|
|
105
107
|
isSearchClearOnClose: true,
|
|
108
|
+
isAbsolutePositioningNeeded: true,
|
|
109
|
+
isRestrictScroll: false,
|
|
106
110
|
i18nKeys: {},
|
|
107
111
|
needEffect: true,
|
|
108
112
|
isLoading: false
|
|
@@ -117,5 +121,5 @@ var SelectWithIcon_defaultProps = (_SelectWithIcon_defau = {
|
|
|
117
121
|
needListBorder: false,
|
|
118
122
|
needSearch: false,
|
|
119
123
|
boxSize: 'default'
|
|
120
|
-
}, _defineProperty(_SelectWithIcon_defau, "needListBorder", false), _defineProperty(_SelectWithIcon_defau, "needCloseOnSelect", true), _defineProperty(_SelectWithIcon_defau, "borderColor", 'default'), _defineProperty(_SelectWithIcon_defau, "needTick", true), _defineProperty(_SelectWithIcon_defau, "searchBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "size", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxSize", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxVariant", 'default'), _defineProperty(_SelectWithIcon_defau, "dataId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dataSelectorId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dropBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "needIcon", true), _defineProperty(_SelectWithIcon_defau, "iconSize", '14'), _defineProperty(_SelectWithIcon_defau, "i18nKeys", {}), _defineProperty(_SelectWithIcon_defau, "isLoading", false), _SelectWithIcon_defau);
|
|
124
|
+
}, _defineProperty(_SelectWithIcon_defau, "needListBorder", false), _defineProperty(_SelectWithIcon_defau, "needCloseOnSelect", true), _defineProperty(_SelectWithIcon_defau, "borderColor", 'default'), _defineProperty(_SelectWithIcon_defau, "needTick", true), _defineProperty(_SelectWithIcon_defau, "searchBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "size", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxSize", 'medium'), _defineProperty(_SelectWithIcon_defau, "textBoxVariant", 'default'), _defineProperty(_SelectWithIcon_defau, "dataId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dataSelectorId", 'selectWithIcon'), _defineProperty(_SelectWithIcon_defau, "dropBoxSize", 'small'), _defineProperty(_SelectWithIcon_defau, "needIcon", true), _defineProperty(_SelectWithIcon_defau, "iconSize", '14'), _defineProperty(_SelectWithIcon_defau, "i18nKeys", {}), _defineProperty(_SelectWithIcon_defau, "isAbsolutePositioningNeeded", true), _defineProperty(_SelectWithIcon_defau, "isRestrictScroll", false), _defineProperty(_SelectWithIcon_defau, "isLoading", false), _SelectWithIcon_defau);
|
|
121
125
|
exports.SelectWithIcon_defaultProps = SelectWithIcon_defaultProps;
|
|
@@ -179,6 +179,10 @@ var GroupSelect_propTypes = {
|
|
|
179
179
|
closePopupOnly: _propTypes["default"].func,
|
|
180
180
|
position: _propTypes["default"].string,
|
|
181
181
|
removeClose: _propTypes["default"].func,
|
|
182
|
+
isAbsolutePositioningNeeded: _propTypes["default"].bool,
|
|
183
|
+
isRestrictScroll: _propTypes["default"].bool,
|
|
184
|
+
positionsOffset: _propTypes["default"].object,
|
|
185
|
+
targetOffset: _propTypes["default"].object,
|
|
182
186
|
i18nKeys: _propTypes["default"].shape({
|
|
183
187
|
loadingText: _propTypes["default"].string,
|
|
184
188
|
emptyText: _propTypes["default"].string,
|
|
@@ -306,6 +310,10 @@ var SelectWithIcon_propTypes = {
|
|
|
306
310
|
searchBoxSize: _propTypes["default"].string,
|
|
307
311
|
needResponsive: _propTypes["default"].bool,
|
|
308
312
|
boxSize: _propTypes["default"].string,
|
|
309
|
-
emptyMessage: _propTypes["default"].string
|
|
313
|
+
emptyMessage: _propTypes["default"].string,
|
|
314
|
+
isAbsolutePositioningNeeded: _propTypes["default"].bool,
|
|
315
|
+
isRestrictScroll: _propTypes["default"].bool,
|
|
316
|
+
positionsOffset: _propTypes["default"].object,
|
|
317
|
+
targetOffset: _propTypes["default"].object
|
|
310
318
|
};
|
|
311
319
|
exports.SelectWithIcon_propTypes = SelectWithIcon_propTypes;
|
|
@@ -15,12 +15,14 @@ var _propTypes = require("./props/propTypes");
|
|
|
15
15
|
|
|
16
16
|
var _Config = require("../../Provider/Config");
|
|
17
17
|
|
|
18
|
-
var _TooltipModule = _interopRequireDefault(require("../../Tooltip/Tooltip.module.css"));
|
|
19
|
-
|
|
20
18
|
var _ResizeObserver = _interopRequireDefault(require("../../Responsive/ResizeObserver"));
|
|
21
19
|
|
|
22
20
|
var _selectn = _interopRequireDefault(require("selectn"));
|
|
23
21
|
|
|
22
|
+
var _cssUtils = require("../../utils/cssUtils");
|
|
23
|
+
|
|
24
|
+
var _TooltipModule = _interopRequireDefault(require("../../Tooltip/Tooltip.module.css"));
|
|
25
|
+
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
26
28
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
@@ -251,7 +253,8 @@ var Tooltip = /*#__PURE__*/function (_React$Component) {
|
|
|
251
253
|
|
|
252
254
|
var isHtml = titleDiv.getAttribute('data-ishtml');
|
|
253
255
|
var dataTooltipnoArrow = titleDiv.getAttribute('data-tooltip-noarrow') === 'true' ? true : false;
|
|
254
|
-
var dataTooltipWrap = titleDiv.getAttribute('data-title-wrap')
|
|
256
|
+
var dataTooltipWrap = titleDiv.getAttribute('data-title-wrap') || 'normal'; // values: normal, pre, pre-wrap, pre-line, nowrap, break-spaces
|
|
257
|
+
|
|
255
258
|
var clientRect = titleDiv.getBoundingClientRect();
|
|
256
259
|
var boxLayout = this.getClientRectOfContEl(containerElement);
|
|
257
260
|
this.setState({
|
|
@@ -545,7 +548,15 @@ var Tooltip = /*#__PURE__*/function (_React$Component) {
|
|
|
545
548
|
customClass = _this$props.customClass;
|
|
546
549
|
var arrowStyle = isArrowHorizontal ? isArrowRight ? _TooltipModule["default"].arrowRight : _TooltipModule["default"].arrowLeft : isArrowDown ? _TooltipModule["default"].arrowDown : _TooltipModule["default"].arrowUp;
|
|
547
550
|
title = title ? title.trim() : null;
|
|
548
|
-
var
|
|
551
|
+
var tooltipWhiteSpaceModification = dataTooltipWrap;
|
|
552
|
+
|
|
553
|
+
if (dataTooltipWrap == 'pre') {
|
|
554
|
+
tooltipWhiteSpaceModification = 'pre-wrap';
|
|
555
|
+
} else if (dataTooltipWrap == 'nowrap') {
|
|
556
|
+
tooltipWhiteSpaceModification = 'normal';
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
var tooltipCss = "".concat(_TooltipModule["default"].tooltipcont, " ").concat(_cssUtils.whiteSpaceClassMapping[tooltipWhiteSpaceModification]);
|
|
549
560
|
return title ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
550
561
|
className: "".concat(customClass, " ").concat(_TooltipModule["default"].tooltiptext),
|
|
551
562
|
style: {
|