@zohodesk/dot 1.0.0-temp-191 → 1.0.0-temp-189.1
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/ActionButton/ActionButton.js +2 -4
- package/es/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +2 -2
- package/es/Attachment/Attachment.js +1 -2
- package/es/AttachmentViewer/AttachmentViewer.js +6 -13
- package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +2 -4
- package/es/AttachmentViewer/props/defaultProps.js +1 -2
- package/es/AttachmentViewer/props/propTypes.js +1 -2
- package/es/ChannelIcon/ChannelIcon.js +0 -1
- package/es/MessageBanner/MessageBanner.js +3 -5
- package/es/alert/AlertHeader/AlertHeader.js +1 -2
- package/es/alert/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +2 -2
- package/es/avatar/AvatarClose/AvatarClose.js +2 -7
- package/es/avatar/AvatarClose/__tests__/__snapshots__/AvatarClose.spec.js.snap +0 -2
- package/es/avatar/AvatarClose/props/defaultProps.js +1 -2
- package/es/avatar/AvatarClose/props/propTypes.js +1 -2
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +0 -2
- package/es/list/Subject/Subject.js +7 -3
- package/es/list/Subject/Subject.module.css +20 -0
- package/es/list/Subject/__tests__/Subject.spec.js +9 -0
- package/es/list/Subject/__tests__/__snapshots__/Subject.spec.js.snap +38 -1
- package/es/list/Subject/props/defaultProps.js +2 -1
- package/es/list/Subject/props/propTypes.js +2 -1
- package/es/list/status/StatusDropdown/StatusDropdown.js +1 -3
- package/es/lookup/header/ViewDropDown/ViewDropDown.js +5 -11
- package/es/lookup/header/ViewDropDown/__test__/__snapshots__/ViewDropDown.spec.js.snap +0 -2
- package/es/lookup/header/ViewDropDown/props/defaultProps.js +1 -2
- package/es/lookup/header/ViewDropDown/props/propTypes.js +0 -1
- package/es/setup/header/Search/Search.js +3 -8
- package/es/setup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +0 -2
- package/es/setup/header/Search/props/defaultProps.js +1 -2
- package/es/setup/header/Search/props/propTypes.js +1 -2
- package/es/v1/ActionButton/ActionButton.js +2 -4
- package/es/v1/Attachment/Attachment.js +1 -2
- package/es/v1/AttachmentViewer/AttachmentViewer.js +6 -13
- package/es/v1/AttachmentViewer/props/defaultProps.js +1 -2
- package/es/v1/AttachmentViewer/props/propTypes.js +1 -2
- package/es/v1/ChannelIcon/ChannelIcon.js +0 -1
- package/es/v1/MessageBanner/MessageBanner.js +2 -4
- package/es/v1/alert/AlertHeader/AlertHeader.js +1 -2
- package/es/v1/avatar/AvatarClose/AvatarClose.js +2 -7
- package/es/v1/avatar/AvatarClose/props/defaultProps.js +1 -2
- package/es/v1/avatar/AvatarClose/props/propTypes.js +1 -2
- package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +0 -2
- package/es/v1/errorstate/Inconvenience/Inconvenience.js +1 -2
- package/es/v1/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -2
- package/es/v1/errorstate/UrlNotFound/UrlNotFound.js +1 -2
- package/es/v1/errorstate/WillBeRightBack/WillBeRightBack.js +1 -2
- package/es/v1/list/Subject/Subject.js +7 -3
- package/es/v1/list/Subject/props/defaultProps.js +2 -1
- package/es/v1/list/Subject/props/propTypes.js +2 -1
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +1 -3
- package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +5 -11
- package/es/v1/lookup/header/ViewDropDown/props/defaultProps.js +1 -2
- package/es/v1/lookup/header/ViewDropDown/props/propTypes.js +0 -1
- package/es/v1/setup/header/Search/Search.js +3 -8
- package/es/v1/setup/header/Search/props/defaultProps.js +1 -2
- package/es/v1/setup/header/Search/props/propTypes.js +1 -2
- package/es/version2/errorstate/Inconvenience/Inconvenience.js +1 -2
- package/es/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -2
- package/es/version2/errorstate/UrlNotFound/UrlNotFound.js +1 -2
- package/es/version2/errorstate/WillBeRightBack/WillBeRightBack.js +1 -2
- package/lib/ActionButton/ActionButton.js +2 -4
- package/lib/ActionButton/__tests__/__snapshots__/ActionButton.spec.js.snap +2 -2
- package/lib/Attachment/Attachment.js +1 -2
- package/lib/AttachmentViewer/AttachmentViewer.js +10 -18
- package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +2 -4
- package/lib/AttachmentViewer/props/defaultProps.js +1 -2
- package/lib/AttachmentViewer/props/propTypes.js +1 -2
- package/lib/ChannelIcon/ChannelIcon.js +0 -1
- package/lib/MessageBanner/MessageBanner.js +3 -5
- package/lib/alert/AlertHeader/AlertHeader.js +1 -2
- package/lib/alert/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +2 -2
- package/lib/avatar/AvatarClose/AvatarClose.js +3 -8
- package/lib/avatar/AvatarClose/__tests__/__snapshots__/AvatarClose.spec.js.snap +0 -2
- package/lib/avatar/AvatarClose/props/defaultProps.js +1 -2
- package/lib/avatar/AvatarClose/props/propTypes.js +1 -2
- package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +1 -3
- package/lib/list/Subject/Subject.js +9 -5
- package/lib/list/Subject/Subject.module.css +20 -0
- package/lib/list/Subject/__tests__/Subject.spec.js +9 -0
- package/lib/list/Subject/__tests__/__snapshots__/Subject.spec.js.snap +38 -1
- package/lib/list/Subject/props/defaultProps.js +2 -1
- package/lib/list/Subject/props/propTypes.js +2 -1
- package/lib/list/status/StatusDropdown/StatusDropdown.js +1 -3
- package/lib/lookup/header/ViewDropDown/ViewDropDown.js +5 -11
- package/lib/lookup/header/ViewDropDown/__test__/__snapshots__/ViewDropDown.spec.js.snap +0 -2
- package/lib/lookup/header/ViewDropDown/props/defaultProps.js +1 -2
- package/lib/lookup/header/ViewDropDown/props/propTypes.js +0 -1
- package/lib/setup/header/Search/Search.js +3 -8
- package/lib/setup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +0 -2
- package/lib/setup/header/Search/props/defaultProps.js +1 -2
- package/lib/setup/header/Search/props/propTypes.js +1 -2
- package/lib/v1/ActionButton/ActionButton.js +2 -4
- package/lib/v1/Attachment/Attachment.js +1 -2
- package/lib/v1/AttachmentViewer/AttachmentViewer.js +10 -18
- package/lib/v1/AttachmentViewer/props/defaultProps.js +1 -2
- package/lib/v1/AttachmentViewer/props/propTypes.js +1 -2
- package/lib/v1/ChannelIcon/ChannelIcon.js +0 -1
- package/lib/v1/MessageBanner/MessageBanner.js +2 -4
- package/lib/v1/alert/AlertHeader/AlertHeader.js +1 -2
- package/lib/v1/avatar/AvatarClose/AvatarClose.js +3 -8
- package/lib/v1/avatar/AvatarClose/props/defaultProps.js +1 -2
- package/lib/v1/avatar/AvatarClose/props/propTypes.js +1 -2
- package/lib/v1/dropdown/ToggleDropDown/ToggleDropDown.js +1 -3
- package/lib/v1/errorstate/Inconvenience/Inconvenience.js +1 -2
- package/lib/v1/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -2
- package/lib/v1/errorstate/UrlNotFound/UrlNotFound.js +1 -2
- package/lib/v1/errorstate/WillBeRightBack/WillBeRightBack.js +1 -2
- package/lib/v1/list/Subject/Subject.js +9 -5
- package/lib/v1/list/Subject/props/defaultProps.js +2 -1
- package/lib/v1/list/Subject/props/propTypes.js +2 -1
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +1 -3
- package/lib/v1/lookup/header/ViewDropDown/ViewDropDown.js +5 -11
- package/lib/v1/lookup/header/ViewDropDown/props/defaultProps.js +1 -2
- package/lib/v1/lookup/header/ViewDropDown/props/propTypes.js +0 -1
- package/lib/v1/setup/header/Search/Search.js +3 -8
- package/lib/v1/setup/header/Search/props/defaultProps.js +1 -2
- package/lib/v1/setup/header/Search/props/propTypes.js +1 -2
- package/lib/version2/errorstate/Inconvenience/Inconvenience.js +1 -2
- package/lib/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -2
- package/lib/version2/errorstate/UrlNotFound/UrlNotFound.js +1 -2
- package/lib/version2/errorstate/WillBeRightBack/WillBeRightBack.js +1 -2
- package/package.json +3 -3
- package/result.json +1 -1
- package/unittest/index.html +18 -2
|
@@ -20,7 +20,6 @@ var propTypes = {
|
|
|
20
20
|
AvatarCloseProps: _propTypes["default"].object,
|
|
21
21
|
AvatarProps: _propTypes["default"].object
|
|
22
22
|
}),
|
|
23
|
-
dataSelectorId: _propTypes["default"].string
|
|
24
|
-
dataId: _propTypes["default"].string
|
|
23
|
+
dataSelectorId: _propTypes["default"].string
|
|
25
24
|
};
|
|
26
25
|
exports.propTypes = propTypes;
|
|
@@ -705,8 +705,7 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
705
705
|
searchValue: searchValue,
|
|
706
706
|
isFetchingOptions: isFetchingOptions
|
|
707
707
|
}
|
|
708
|
-
}
|
|
709
|
-
dataId: "".concat(dataId, "_dropbox")
|
|
708
|
+
}
|
|
710
709
|
}, DropBoxProps, {
|
|
711
710
|
onClose: _this5.handleTogglePopup
|
|
712
711
|
}), /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isSearch ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
@@ -725,7 +724,6 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
725
724
|
} //search
|
|
726
725
|
// onKeyDown={this.handleKeyDown}
|
|
727
726
|
,
|
|
728
|
-
dataId: "".concat(dataId, "_search"),
|
|
729
727
|
a11y: {
|
|
730
728
|
role: 'combobox',
|
|
731
729
|
ariaOwns: ariaTitleId,
|
|
@@ -72,25 +72,29 @@ var Subject = /*#__PURE__*/function (_Component) {
|
|
|
72
72
|
className = _this$props.className,
|
|
73
73
|
isDotted = _this$props.isDotted,
|
|
74
74
|
children = _this$props.children,
|
|
75
|
-
customProps = _this$props.customProps
|
|
75
|
+
customProps = _this$props.customProps,
|
|
76
|
+
whiteSpace = _this$props.whiteSpace;
|
|
76
77
|
var _customProps$LinkProp = customProps.LinkProps,
|
|
77
78
|
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp,
|
|
78
79
|
_customProps$TextProp = customProps.TextProps,
|
|
79
80
|
TextProps = _customProps$TextProp === void 0 ? {} : _customProps$TextProp;
|
|
81
|
+
var isTooltipWrap = whiteSpace === 'pre' || whiteSpace === 'preWrap';
|
|
80
82
|
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isLink ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
|
|
81
83
|
urlName: urlName,
|
|
82
84
|
href: href,
|
|
83
85
|
urlData: urlData,
|
|
84
86
|
onClick: onClick,
|
|
85
|
-
className: "".concat(_SubjectModule["default"].subject, " ").concat(isDotted ? _SubjectModule["default"].dotted : '', " ").concat(className, " ").concat(_SubjectModule["default"]["font_".concat(fontWeight)], " ").concat(_SubjectModule["default"].cursorPointer),
|
|
87
|
+
className: "".concat(_SubjectModule["default"].subject, " ").concat(isDotted ? _SubjectModule["default"].dotted : '', " ").concat(_SubjectModule["default"]["whiteSpace_".concat(whiteSpace)], " ").concat(className, " ").concat(_SubjectModule["default"]["font_".concat(fontWeight)], " ").concat(_SubjectModule["default"].cursorPointer),
|
|
86
88
|
dataId: dataId,
|
|
87
89
|
title: text,
|
|
88
|
-
target: target
|
|
90
|
+
target: target,
|
|
91
|
+
"data-title-wrap": isTooltipWrap
|
|
89
92
|
}, LinkProps), children ? children : text) : /*#__PURE__*/_react["default"].createElement("span", _extends({
|
|
90
|
-
className: "".concat(_SubjectModule["default"].subject, " ").concat(isDotted ? _SubjectModule["default"].dotted : '', " ").concat(className, " ").concat(_SubjectModule["default"]["font_".concat(fontWeight)]),
|
|
93
|
+
className: "".concat(_SubjectModule["default"].subject, " ").concat(isDotted ? _SubjectModule["default"].dotted : '', " ").concat(_SubjectModule["default"]["whiteSpace_".concat(whiteSpace)], " ").concat(className, " ").concat(_SubjectModule["default"]["font_".concat(fontWeight)]),
|
|
91
94
|
"data-title": text,
|
|
92
95
|
"data-id": dataId,
|
|
93
|
-
"data-test-id": dataId
|
|
96
|
+
"data-test-id": dataId,
|
|
97
|
+
"data-title-wrap": isTooltipWrap
|
|
94
98
|
}, TextProps), text));
|
|
95
99
|
}
|
|
96
100
|
}]);
|
|
@@ -32,4 +32,24 @@
|
|
|
32
32
|
|
|
33
33
|
.cursorPointer {
|
|
34
34
|
cursor: pointer;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.whiteSpace_normal {
|
|
38
|
+
white-space: normal;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.whiteSpace_noWrap {
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.whiteSpace_pre {
|
|
46
|
+
white-space: pre;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.whiteSpace_preLine {
|
|
50
|
+
white-space: pre-line;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.whiteSpace_preWrap {
|
|
54
|
+
white-space: pre-wrap;
|
|
35
55
|
}
|
|
@@ -15,4 +15,13 @@ describe('Subject', function () {
|
|
|
15
15
|
|
|
16
16
|
expect(asFragment()).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
|
+
var whiteSpace = ['normal', 'noWrap', 'preLine', 'preWrap'];
|
|
19
|
+
test.each(whiteSpace)('rendering the whiteSpace of -%s', function (whiteSpace) {
|
|
20
|
+
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_Subject["default"], {
|
|
21
|
+
whiteSpace: whiteSpace
|
|
22
|
+
})),
|
|
23
|
+
asFragment = _render2.asFragment;
|
|
24
|
+
|
|
25
|
+
expect(asFragment()).toMatchSnapshot();
|
|
26
|
+
});
|
|
18
27
|
});
|
|
@@ -3,7 +3,44 @@
|
|
|
3
3
|
exports[`Subject rendering the defult props 1`] = `
|
|
4
4
|
<DocumentFragment>
|
|
5
5
|
<span
|
|
6
|
-
class="subject dotted font_regular"
|
|
6
|
+
class="subject dotted whiteSpace_pre font_regular"
|
|
7
|
+
data-title-wrap="true"
|
|
8
|
+
/>
|
|
9
|
+
</DocumentFragment>
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
exports[`Subject rendering the whiteSpace of -noWrap 1`] = `
|
|
13
|
+
<DocumentFragment>
|
|
14
|
+
<span
|
|
15
|
+
class="subject dotted whiteSpace_noWrap font_regular"
|
|
16
|
+
data-title-wrap="false"
|
|
17
|
+
/>
|
|
18
|
+
</DocumentFragment>
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
exports[`Subject rendering the whiteSpace of -normal 1`] = `
|
|
22
|
+
<DocumentFragment>
|
|
23
|
+
<span
|
|
24
|
+
class="subject dotted whiteSpace_normal font_regular"
|
|
25
|
+
data-title-wrap="false"
|
|
26
|
+
/>
|
|
27
|
+
</DocumentFragment>
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
exports[`Subject rendering the whiteSpace of -preLine 1`] = `
|
|
31
|
+
<DocumentFragment>
|
|
32
|
+
<span
|
|
33
|
+
class="subject dotted whiteSpace_preLine font_regular"
|
|
34
|
+
data-title-wrap="false"
|
|
35
|
+
/>
|
|
36
|
+
</DocumentFragment>
|
|
37
|
+
`;
|
|
38
|
+
|
|
39
|
+
exports[`Subject rendering the whiteSpace of -preWrap 1`] = `
|
|
40
|
+
<DocumentFragment>
|
|
41
|
+
<span
|
|
42
|
+
class="subject dotted whiteSpace_preWrap font_regular"
|
|
43
|
+
data-title-wrap="true"
|
|
7
44
|
/>
|
|
8
45
|
</DocumentFragment>
|
|
9
46
|
`;
|
|
@@ -25,6 +25,7 @@ var propTypes = {
|
|
|
25
25
|
customProps: _propTypes["default"].shape({
|
|
26
26
|
LinkProps: _propTypes["default"].object,
|
|
27
27
|
TextProps: _propTypes["default"].object
|
|
28
|
-
})
|
|
28
|
+
}),
|
|
29
|
+
whiteSpace: _propTypes["default"].oneOf(['normal', 'noWrap', 'pre', 'preLine', 'preWrap'])
|
|
29
30
|
};
|
|
30
31
|
exports.propTypes = propTypes;
|
|
@@ -305,7 +305,6 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
305
305
|
isResponsivePadding: true,
|
|
306
306
|
needFocusScope: true,
|
|
307
307
|
onClose: _this2.handleTogglePopup,
|
|
308
|
-
dataId: "".concat(dataId, "_dropbox"),
|
|
309
308
|
customProps: {
|
|
310
309
|
focusScopeProps: {
|
|
311
310
|
loadNextOptions: getNextOptions,
|
|
@@ -332,8 +331,7 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
332
331
|
role: 'combobox',
|
|
333
332
|
ariaActivedescendant: isPopupReady ? value : '',
|
|
334
333
|
ariaOwns: ariaTitleId
|
|
335
|
-
}
|
|
336
|
-
dataId: "".concat(dataId, "_search")
|
|
334
|
+
}
|
|
337
335
|
})) : null, title && options.length != 0 && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
338
336
|
className: _StatusDropdownModule["default"].title
|
|
339
337
|
}, /*#__PURE__*/_react["default"].createElement(_DropDownHeading["default"], {
|
|
@@ -117,8 +117,7 @@ var DropDown = /*#__PURE__*/function (_SelectComponent) {
|
|
|
117
117
|
searchBoxSize = _this$props.searchBoxSize,
|
|
118
118
|
searchBoxVariant = _this$props.searchBoxVariant,
|
|
119
119
|
searchBoxPlaceHolder = _this$props.searchBoxPlaceHolder,
|
|
120
|
-
maxLength = _this$props.maxLength
|
|
121
|
-
dataId = _this$props.dataId;
|
|
120
|
+
maxLength = _this$props.maxLength;
|
|
122
121
|
var _this$state = this.state,
|
|
123
122
|
hoverIndex = _this$state.hoverIndex,
|
|
124
123
|
selected = _this$state.selected,
|
|
@@ -127,9 +126,7 @@ var DropDown = /*#__PURE__*/function (_SelectComponent) {
|
|
|
127
126
|
selectedId = _this$state.selectedId;
|
|
128
127
|
var suggestions = this.handleFilterSuggestions();
|
|
129
128
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
130
|
-
className: _ViewDropDownModule["default"].container
|
|
131
|
-
"data-id": dataId,
|
|
132
|
-
"data-test-id": dataId
|
|
129
|
+
className: _ViewDropDownModule["default"].container
|
|
133
130
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
134
131
|
onClick: this.togglePopup,
|
|
135
132
|
ref: getTargetRef
|
|
@@ -157,8 +154,7 @@ var DropDown = /*#__PURE__*/function (_SelectComponent) {
|
|
|
157
154
|
animationStyle: animationStyle,
|
|
158
155
|
size: "large",
|
|
159
156
|
alignBox: "row",
|
|
160
|
-
isResponsivePadding: true
|
|
161
|
-
dataId: "".concat(dataId, "_dropbox")
|
|
157
|
+
isResponsivePadding: true
|
|
162
158
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
163
159
|
flexible: true
|
|
164
160
|
}, /*#__PURE__*/_react["default"].createElement(_Card.Card, null, needSearch ? /*#__PURE__*/_react["default"].createElement(_Card.CardHeader, null, /*#__PURE__*/_react["default"].createElement(_DropDownSearch["default"], {
|
|
@@ -169,15 +165,13 @@ var DropDown = /*#__PURE__*/function (_SelectComponent) {
|
|
|
169
165
|
size: searchBoxSize,
|
|
170
166
|
variant: searchBoxVariant,
|
|
171
167
|
placeHolder: searchBoxPlaceHolder,
|
|
172
|
-
maxLength: maxLength
|
|
173
|
-
dataId: "".concat(dataId, "_search")
|
|
168
|
+
maxLength: maxLength
|
|
174
169
|
})) : null, /*#__PURE__*/_react["default"].createElement(_Card.CardContent, {
|
|
175
170
|
shrink: true,
|
|
176
171
|
eleRef: _this2.suggestionContainerRef,
|
|
177
172
|
customClass: !tabletMode && dropBoxSize ? _ViewDropDownModule["default"][dropBoxSize] : ''
|
|
178
173
|
}, suggestions.length ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
179
|
-
className: _ViewDropDownModule["default"].listItemContainer
|
|
180
|
-
"data-id": "".concat(dataId, "_Options")
|
|
174
|
+
className: _ViewDropDownModule["default"].listItemContainer
|
|
181
175
|
}, suggestions.map(function () {
|
|
182
176
|
var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
183
177
|
var index = arguments.length > 1 ? arguments[1] : undefined;
|
|
@@ -15,7 +15,6 @@ var propTypes = {
|
|
|
15
15
|
searchBoxPlaceHolder: _propTypes["default"].string,
|
|
16
16
|
searchEmptyMessage: _propTypes["default"].string,
|
|
17
17
|
dropBoxSize: _propTypes["default"].oneOf(['small', 'medium', 'large']),
|
|
18
|
-
dataId: _propTypes["default"].string,
|
|
19
18
|
|
|
20
19
|
/**** Popup props ****/
|
|
21
20
|
isPopupOpen: _propTypes["default"].bool,
|
|
@@ -89,13 +89,10 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
89
89
|
value = _this$props.value,
|
|
90
90
|
onChange = _this$props.onChange,
|
|
91
91
|
onKeyPress = _this$props.onKeyPress,
|
|
92
|
-
customClass = _this$props.customClass
|
|
93
|
-
dataId = _this$props.dataId;
|
|
92
|
+
customClass = _this$props.customClass;
|
|
94
93
|
var isFocus = this.state.isFocus;
|
|
95
94
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
96
|
-
className: "".concat(_SearchModule["default"].container, " ").concat(isFocus ? _SearchModule["default"].active : '', " ").concat(customClass)
|
|
97
|
-
"data-id": "".concat(dataId, "_search"),
|
|
98
|
-
"data-test-id": "".concat(dataId, "_search")
|
|
95
|
+
className: "".concat(_SearchModule["default"].container, " ").concat(isFocus ? _SearchModule["default"].active : '', " ").concat(customClass)
|
|
99
96
|
}, /*#__PURE__*/_react["default"].createElement(_TextBox["default"], {
|
|
100
97
|
placeHolder: placeHolder,
|
|
101
98
|
customClass: _SearchModule["default"].input,
|
|
@@ -108,9 +105,7 @@ var Search = /*#__PURE__*/function (_React$Component) {
|
|
|
108
105
|
onBlur: this.onBlur
|
|
109
106
|
}), value != '' && value ? /*#__PURE__*/_react["default"].createElement("span", {
|
|
110
107
|
className: _SearchModule["default"].icon,
|
|
111
|
-
onClick: this.onBlur
|
|
112
|
-
"data-id": "".concat(dataId, "_clear"),
|
|
113
|
-
"data-test-id": "".concat(dataId, "_clear")
|
|
108
|
+
onClick: this.onBlur
|
|
114
109
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
115
110
|
name: "ZD-close",
|
|
116
111
|
size: "19"
|
|
@@ -17,7 +17,6 @@ var propTypes = {
|
|
|
17
17
|
onFocus: _propTypes["default"].func,
|
|
18
18
|
onKeyPress: _propTypes["default"].func,
|
|
19
19
|
placeHolder: _propTypes["default"].string,
|
|
20
|
-
value: _propTypes["default"].string
|
|
21
|
-
dataId: _propTypes["default"].string
|
|
20
|
+
value: _propTypes["default"].string
|
|
22
21
|
};
|
|
23
22
|
exports.propTypes = propTypes;
|
|
@@ -77,8 +77,7 @@ function ActionButton(props) {
|
|
|
77
77
|
onMouseEnter: !onClick ? onHover && handleTogglePopup : undefined,
|
|
78
78
|
onMouseLeave: !onClick ? onHover && handleTogglePopup : undefined,
|
|
79
79
|
eleRef: getTargetRef,
|
|
80
|
-
dataSelectorId: dataSelectorId
|
|
81
|
-
dataId: "".concat(dataId, "_actionButton")
|
|
80
|
+
dataSelectorId: dataSelectorId
|
|
82
81
|
}, isLoading ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
83
82
|
flexible: true
|
|
84
83
|
}, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
|
|
@@ -144,8 +143,7 @@ function ActionButton(props) {
|
|
|
144
143
|
getRef: getContainerRef,
|
|
145
144
|
popupGroup: popupGroup,
|
|
146
145
|
needFocusScope: true,
|
|
147
|
-
onClose: handleTogglePopup
|
|
148
|
-
dataId: "".concat(dataId, "_dropbox")
|
|
146
|
+
onClose: handleTogglePopup
|
|
149
147
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
150
148
|
flexible: true,
|
|
151
149
|
shrink: true,
|
|
@@ -88,8 +88,7 @@ var Attachment = function Attachment(props) {
|
|
|
88
88
|
href: downloadLink,
|
|
89
89
|
className: _AttachmentModule["default"].attachDownload,
|
|
90
90
|
title: downloadTitle,
|
|
91
|
-
hasReload: true
|
|
92
|
-
dataId: "".concat(dataId, "_download")
|
|
91
|
+
hasReload: true
|
|
93
92
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
94
93
|
name: "ZD-downloadNew",
|
|
95
94
|
iconClass: _AttachmentModule["default"].downIcon
|
|
@@ -298,9 +298,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
298
298
|
dataList = _this$state2.dataList,
|
|
299
299
|
selectedIndex = _this$state2.selectedIndex,
|
|
300
300
|
isZoomed = _this$state2.isZoomed;
|
|
301
|
-
var
|
|
302
|
-
maintainZoom = _this$props.maintainZoom,
|
|
303
|
-
dataId = _this$props.dataId;
|
|
301
|
+
var maintainZoom = this.props.maintainZoom;
|
|
304
302
|
|
|
305
303
|
var getImgStyle = function getImgStyle(i) {
|
|
306
304
|
var position;
|
|
@@ -344,9 +342,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
344
342
|
}, (0, _Attachment.isAudioFile)(data.name) ? selectedIndex == i ? /*#__PURE__*/_react["default"].createElement("video", {
|
|
345
343
|
autoPlay: true,
|
|
346
344
|
controls: true,
|
|
347
|
-
className: _AttachmentViewerModule["default"].zoomIn
|
|
348
|
-
"data-id": "".concat(dataId, "_videoPreview"),
|
|
349
|
-
"data-test-id": "".concat(dataId, "_videoPreview")
|
|
345
|
+
className: _AttachmentViewerModule["default"].zoomIn
|
|
350
346
|
}, /*#__PURE__*/_react["default"].createElement("source", {
|
|
351
347
|
src: data.viewUrl,
|
|
352
348
|
type: "audio/".concat((0, _Attachment.getExtensionFromFileName)(data.name))
|
|
@@ -374,12 +370,11 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
374
370
|
selectedIndex = _this$state3.selectedIndex,
|
|
375
371
|
data = _this$state3.data,
|
|
376
372
|
isZoomed = _this$state3.isZoomed;
|
|
377
|
-
var _this$
|
|
378
|
-
responsiveId = _this$
|
|
379
|
-
needDownload = _this$
|
|
380
|
-
i18nKeys = _this$
|
|
381
|
-
isActive = _this$
|
|
382
|
-
dataId = _this$props2.dataId;
|
|
373
|
+
var _this$props = this.props,
|
|
374
|
+
responsiveId = _this$props.responsiveId,
|
|
375
|
+
needDownload = _this$props.needDownload,
|
|
376
|
+
i18nKeys = _this$props.i18nKeys,
|
|
377
|
+
isActive = _this$props.isActive;
|
|
383
378
|
var totalLen = data.length;
|
|
384
379
|
var selectedAttachment = data[selectedIndex] || {};
|
|
385
380
|
var selectedImgUrl = selectedAttachment.viewUrl;
|
|
@@ -484,8 +479,7 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
484
479
|
target: "_parent",
|
|
485
480
|
hasReload: true,
|
|
486
481
|
download: true,
|
|
487
|
-
title: i18nKeys.downloadText
|
|
488
|
-
dataId: "".concat(dataId, "_downloadAttach")
|
|
482
|
+
title: i18nKeys.downloadText
|
|
489
483
|
}, /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
490
484
|
iconName: "ZD-GN-download",
|
|
491
485
|
className: _AttachmentViewerModule["default"].menuIcon,
|
|
@@ -552,15 +546,13 @@ var AttachmentViewer = /*#__PURE__*/function (_Component) {
|
|
|
552
546
|
dataId: "rightAttachNav",
|
|
553
547
|
isBold: true
|
|
554
548
|
}))))), /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
555
|
-
className: "".concat(_AttachmentViewerModule["default"].footer, " ").concat(isPViewListOpen && totalLen !== 1 ? _AttachmentViewerModule["default"].footerHeight : _AttachmentViewerModule["default"].footerHide, " ")
|
|
556
|
-
dataId: "".concat(dataId, "_attachPreviewFooter")
|
|
549
|
+
className: "".concat(_AttachmentViewerModule["default"].footer, " ").concat(isPViewListOpen && totalLen !== 1 ? _AttachmentViewerModule["default"].footerHeight : _AttachmentViewerModule["default"].footerHide, " ")
|
|
557
550
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
558
551
|
align: "vertical",
|
|
559
552
|
alignBox: "row",
|
|
560
553
|
className: _AttachmentViewerModule["default"].footerHeight
|
|
561
554
|
}, author && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
562
|
-
className: _AttachmentViewerModule["default"].author
|
|
563
|
-
dataId: "".concat(dataId, "_authorName")
|
|
555
|
+
className: _AttachmentViewerModule["default"].author
|
|
564
556
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
565
557
|
alignBox: "row",
|
|
566
558
|
align: "both"
|
|
@@ -38,7 +38,6 @@ var AttachmentViewer_propTypes = {
|
|
|
38
38
|
previewObj: _propTypes["default"].object,
|
|
39
39
|
responsiveId: _propTypes["default"].string,
|
|
40
40
|
maintainZoom: _propTypes["default"].bool,
|
|
41
|
-
isActive: _propTypes["default"].bool
|
|
42
|
-
dataId: _propTypes["default"].string
|
|
41
|
+
isActive: _propTypes["default"].bool
|
|
43
42
|
};
|
|
44
43
|
exports.AttachmentViewer_propTypes = AttachmentViewer_propTypes;
|
|
@@ -53,12 +53,10 @@ function MessageBanner(props) {
|
|
|
53
53
|
href: href,
|
|
54
54
|
onClick: onClick,
|
|
55
55
|
className: _MessageBannerModule["default"].link,
|
|
56
|
-
target: "_blank"
|
|
57
|
-
dataId: "".concat(dataId, "_link")
|
|
56
|
+
target: "_blank"
|
|
58
57
|
}, urlText)))), onClose ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
59
58
|
className: _MessageBannerModule["default"].close,
|
|
60
|
-
onClick: onClose
|
|
61
|
-
dataId: "".concat(dataId, "_close")
|
|
59
|
+
onClick: onClose
|
|
62
60
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
63
61
|
align: "both"
|
|
64
62
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
@@ -73,8 +73,7 @@ function AlertHeader(props) {
|
|
|
73
73
|
isCover: false,
|
|
74
74
|
wrap: "wrap",
|
|
75
75
|
"data-drag-hook": "true",
|
|
76
|
-
eleRef: dragRef
|
|
77
|
-
dataId: "".concat(dataId, "_alertHeader")
|
|
76
|
+
eleRef: dragRef
|
|
78
77
|
}, needIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
78
|
className: finalStyle.iconContainer
|
|
80
79
|
}, renderAlertIcon ? renderAlertIcon() : /*#__PURE__*/_react["default"].createElement(_AlertIcons["default"], {
|
|
@@ -29,17 +29,14 @@ function AvatarClose(props) {
|
|
|
29
29
|
isClose = props.isClose,
|
|
30
30
|
onClick = props.onClick,
|
|
31
31
|
customProps = props.customProps,
|
|
32
|
-
dataSelectorId = props.dataSelectorId
|
|
33
|
-
dataId = props.dataId;
|
|
32
|
+
dataSelectorId = props.dataSelectorId;
|
|
34
33
|
var _customProps$AvatarCl = customProps.AvatarCloseProps,
|
|
35
34
|
AvatarCloseProps = _customProps$AvatarCl === void 0 ? {} : _customProps$AvatarCl,
|
|
36
35
|
_customProps$AvatarPr = customProps.AvatarProps,
|
|
37
36
|
AvatarProps = _customProps$AvatarPr === void 0 ? {} : _customProps$AvatarPr;
|
|
38
37
|
return /*#__PURE__*/_react["default"].createElement("div", _extends({
|
|
39
38
|
className: _AvatarCloseModule["default"].container,
|
|
40
|
-
"data-selector-id": dataSelectorId
|
|
41
|
-
"data-id": dataId,
|
|
42
|
-
"data-test-id": dataId
|
|
39
|
+
"data-selector-id": dataSelectorId
|
|
43
40
|
}, AvatarCloseProps), /*#__PURE__*/_react["default"].createElement(_Avatar["default"], _extends({
|
|
44
41
|
src: src,
|
|
45
42
|
name: name,
|
|
@@ -47,9 +44,7 @@ function AvatarClose(props) {
|
|
|
47
44
|
size: size
|
|
48
45
|
}, AvatarProps)), isClose && /*#__PURE__*/_react["default"].createElement("span", {
|
|
49
46
|
className: _AvatarCloseModule["default"].pop,
|
|
50
|
-
onClick: onClick
|
|
51
|
-
"data-id": "".concat(dataId, "_close"),
|
|
52
|
-
"data-test-id": "".concat(dataId, "_close")
|
|
47
|
+
onClick: onClick
|
|
53
48
|
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
54
49
|
className: _AvatarCloseModule["default"].icon
|
|
55
50
|
}, /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
@@ -20,7 +20,6 @@ var propTypes = {
|
|
|
20
20
|
AvatarCloseProps: _propTypes["default"].object,
|
|
21
21
|
AvatarProps: _propTypes["default"].object
|
|
22
22
|
}),
|
|
23
|
-
dataSelectorId: _propTypes["default"].string
|
|
24
|
-
dataId: _propTypes["default"].string
|
|
23
|
+
dataSelectorId: _propTypes["default"].string
|
|
25
24
|
};
|
|
26
25
|
exports.propTypes = propTypes;
|
|
@@ -705,8 +705,7 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
705
705
|
searchValue: searchValue,
|
|
706
706
|
isFetchingOptions: isFetchingOptions
|
|
707
707
|
}
|
|
708
|
-
}
|
|
709
|
-
dataId: "".concat(dataId, "_dropbox")
|
|
708
|
+
}
|
|
710
709
|
}, DropBoxProps, {
|
|
711
710
|
onClose: _this5.handleTogglePopup
|
|
712
711
|
}), /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, isSearch ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
@@ -725,7 +724,6 @@ var ToggleDropDown = /*#__PURE__*/function (_Component) {
|
|
|
725
724
|
} //search
|
|
726
725
|
// onKeyDown={this.handleKeyDown}
|
|
727
726
|
,
|
|
728
|
-
dataId: "".concat(dataId, "_search"),
|
|
729
727
|
a11y: {
|
|
730
728
|
role: 'combobox',
|
|
731
729
|
ariaOwns: ariaTitleId,
|