@zohodesk/dot 1.0.0-temp-220 → 1.0.0-temp-187.17
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/README.md +0 -5
- package/es/form/fields/Fields.module.css +4 -1
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +10 -6
- package/es/form/fields/TagsMultiSelect/props/propTypes.js +2 -1
- package/es/list/DepartmentDropDown/DepartmentDropDown.js +6 -2
- package/es/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/es/list/DepartmentDropDown/props/propTypes.js +3 -0
- package/es/list/status/StatusDropdown/StatusDropdown.js +7 -2
- package/es/list/status/StatusDropdown/props/defaultProps.js +2 -1
- package/es/list/status/StatusDropdown/props/propTypes.js +4 -1
- package/es/list/status/StatusListItem/StatusListItem.module.css +6 -3
- package/es/version2/GlobalNotification/GlobalNotification.js +7 -46
- package/es/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +0 -9
- package/es/version2/GlobalNotification/props/propTypes.js +1 -2
- package/lib/form/fields/Fields.module.css +4 -1
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +12 -7
- package/lib/form/fields/TagsMultiSelect/props/propTypes.js +2 -1
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +8 -3
- package/lib/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/lib/list/DepartmentDropDown/props/propTypes.js +2 -0
- package/lib/list/status/StatusDropdown/StatusDropdown.js +6 -2
- package/lib/list/status/StatusDropdown/props/defaultProps.js +2 -1
- package/lib/list/status/StatusDropdown/props/propTypes.js +3 -1
- package/lib/list/status/StatusListItem/StatusListItem.module.css +6 -3
- package/lib/version2/GlobalNotification/GlobalNotification.js +18 -68
- package/lib/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +0 -10
- package/lib/version2/GlobalNotification/props/propTypes.js +1 -2
- package/package.json +6 -6
- package/es/version2/GlobalNotification/utils/constants.js +0 -6
- package/lib/version2/GlobalNotification/utils/constants.js +0 -13
package/README.md
CHANGED
|
@@ -221,7 +221,10 @@ position: relative;
|
|
|
221
221
|
[dir=rtl] .rightPlaceholder{
|
|
222
222
|
left:var(--zd_size15)
|
|
223
223
|
}
|
|
224
|
-
|
|
225
224
|
.phoneField{
|
|
226
225
|
composes: ltr-zone from '~@zohodesk/components/es/common/common.module.css';
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.lineClampPickListItem{
|
|
229
|
+
--line-clamp: var(--picklist-field-line-clamp,3);
|
|
227
230
|
}
|
|
@@ -160,12 +160,14 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
160
160
|
let {
|
|
161
161
|
tagCustomClass = '',
|
|
162
162
|
listItemClass = '',
|
|
163
|
-
textBoxIconWrapperClass = ''
|
|
163
|
+
textBoxIconWrapperClass = '',
|
|
164
|
+
dropBoxClass = ''
|
|
164
165
|
} = customClass;
|
|
165
166
|
const {
|
|
166
167
|
TextBoxIconProps = {},
|
|
167
168
|
TagWrapperProps = {},
|
|
168
|
-
TagProps = {}
|
|
169
|
+
TagProps = {},
|
|
170
|
+
ListItemProps = {}
|
|
169
171
|
} = customProps;
|
|
170
172
|
const isEditable = !isReadOnly;
|
|
171
173
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -254,7 +256,8 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
254
256
|
boxPosition: boxPosition,
|
|
255
257
|
isPadding: false,
|
|
256
258
|
customClass: {
|
|
257
|
-
customDropBoxWrap: style.dropdown
|
|
259
|
+
customDropBoxWrap: style.dropdown,
|
|
260
|
+
customDropBox: dropBoxClass
|
|
258
261
|
},
|
|
259
262
|
dataId: `${dataId}_dropbox`,
|
|
260
263
|
isResponsivePadding: true,
|
|
@@ -286,7 +289,7 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
286
289
|
let {
|
|
287
290
|
name,
|
|
288
291
|
isNew,
|
|
289
|
-
|
|
292
|
+
listProps
|
|
290
293
|
} = item;
|
|
291
294
|
return /*#__PURE__*/React.createElement(React.Fragment, null, searchList.length > 1 && isNew ? /*#__PURE__*/React.createElement(DropDownSeparator, null) : null, /*#__PURE__*/React.createElement(ListItem, {
|
|
292
295
|
key: index,
|
|
@@ -299,8 +302,9 @@ export default class TagsMultiSelect extends React.Component {
|
|
|
299
302
|
highlight: selectSearchIndex === index,
|
|
300
303
|
getRef: this.getSelectedItemRef,
|
|
301
304
|
isDisabled: listDisabled,
|
|
302
|
-
customProps:
|
|
303
|
-
customClass: listItemClass
|
|
305
|
+
customProps: listProps,
|
|
306
|
+
customClass: listItemClass,
|
|
307
|
+
...ListItemProps
|
|
304
308
|
}, isNew ? /*#__PURE__*/React.createElement(Container, {
|
|
305
309
|
alignBox: "row",
|
|
306
310
|
align: "vertical"
|
|
@@ -52,7 +52,8 @@ export const propTypes = {
|
|
|
52
52
|
customProps: PropTypes.shape({
|
|
53
53
|
TextBoxIconProps: PropTypes.object,
|
|
54
54
|
TagWrapperProps: PropTypes.object,
|
|
55
|
-
TagProps: PropTypes.object
|
|
55
|
+
TagProps: PropTypes.object,
|
|
56
|
+
ListItemProps: PropTypes.object
|
|
56
57
|
}),
|
|
57
58
|
isFocus: PropTypes.bool
|
|
58
59
|
};
|
|
@@ -48,15 +48,19 @@ class DepartmentDropDown extends Component {
|
|
|
48
48
|
onSearch,
|
|
49
49
|
needSearchFetching,
|
|
50
50
|
searchStr,
|
|
51
|
-
i18nKeys
|
|
51
|
+
i18nKeys,
|
|
52
|
+
customProps
|
|
52
53
|
} = this.props;
|
|
54
|
+
const {
|
|
55
|
+
ToggleDropDownProps = {}
|
|
56
|
+
} = customProps;
|
|
53
57
|
let {
|
|
54
58
|
title = 'Move Department',
|
|
55
59
|
searchEmptyText = 'No results found',
|
|
56
60
|
searchErrorText = 'No results',
|
|
57
61
|
placeholder = 'Search Department'
|
|
58
62
|
} = i18nKeys;
|
|
59
|
-
return /*#__PURE__*/React.createElement(ToggleDropDown, {
|
|
63
|
+
return /*#__PURE__*/React.createElement(ToggleDropDown, { ...ToggleDropDownProps,
|
|
60
64
|
title: title,
|
|
61
65
|
options: departmentList,
|
|
62
66
|
value: /*#__PURE__*/React.createElement(DepartmentText, {
|
|
@@ -178,8 +178,12 @@ export class StatusDropdown extends React.Component {
|
|
|
178
178
|
targetOffset,
|
|
179
179
|
renderTargetElement,
|
|
180
180
|
renderFooterElement,
|
|
181
|
-
a11y = {}
|
|
181
|
+
a11y = {},
|
|
182
|
+
customClass
|
|
182
183
|
} = this.props;
|
|
184
|
+
const {
|
|
185
|
+
dropBoxClass = ''
|
|
186
|
+
} = customClass;
|
|
183
187
|
const {
|
|
184
188
|
tabIndex = 0,
|
|
185
189
|
ariaLabelledby,
|
|
@@ -247,7 +251,8 @@ export class StatusDropdown extends React.Component {
|
|
|
247
251
|
isAnimate: true,
|
|
248
252
|
getRef: getContainerRef,
|
|
249
253
|
customClass: {
|
|
250
|
-
customDropBoxWrap: style.dropBoxContainer
|
|
254
|
+
customDropBoxWrap: style.dropBoxContainer,
|
|
255
|
+
customDropBox: dropBoxClass
|
|
251
256
|
},
|
|
252
257
|
needResponsive: needResponsive,
|
|
253
258
|
isResponsivePadding: true,
|
|
@@ -56,5 +56,8 @@ export const propTypes = {
|
|
|
56
56
|
positionsOffset: PropTypes.object,
|
|
57
57
|
renderTargetElement: PropTypes.func,
|
|
58
58
|
renderFooterElement: PropTypes.node,
|
|
59
|
-
targetOffset: PropTypes.object
|
|
59
|
+
targetOffset: PropTypes.object,
|
|
60
|
+
customClass: PropTypes.shape({
|
|
61
|
+
dropBoxClass: PropTypes.string
|
|
62
|
+
})
|
|
60
63
|
};
|
|
@@ -36,9 +36,8 @@
|
|
|
36
36
|
.value {
|
|
37
37
|
composes: dotted from '~@zohodesk/components/es/common/common.module.css';
|
|
38
38
|
}
|
|
39
|
-
.multiLineValue{
|
|
40
|
-
|
|
41
|
-
composes: clamp from '~@zohodesk/components/es/common/common.module.css';
|
|
39
|
+
.multiLineValue {
|
|
40
|
+
composes: lineClamp from '~@zohodesk/components/es/common/common.module.css';
|
|
42
41
|
}
|
|
43
42
|
[dir=ltr] .withBorder.active {
|
|
44
43
|
border-left-color: var(--zdt_statuslistitem_default_active_border);
|
|
@@ -90,6 +89,10 @@
|
|
|
90
89
|
}
|
|
91
90
|
/* Status Type */
|
|
92
91
|
.statusType {
|
|
92
|
+
--status_listitem_bullet_min_height: var(--zd_size8);
|
|
93
|
+
--status_listitem_bullet_min_width: var(--zd_size8);
|
|
94
|
+
min-height: var(--status_listitem_bullet_min_height);
|
|
95
|
+
min-width: var(--status_listitem_bullet_min_width);
|
|
93
96
|
width: var(--zd_size8) ;
|
|
94
97
|
height: var(--zd_size8) ;
|
|
95
98
|
border-radius: 50%;
|
|
@@ -7,8 +7,6 @@ import AlertClose from "../AlertClose/AlertClose";
|
|
|
7
7
|
import style from "./GlobalNotification.module.css";
|
|
8
8
|
import { Container, Box } from '@zohodesk/components/es/Layout';
|
|
9
9
|
import { cancelBubblingEffect } from '@zohodesk/components/es/utils/Common';
|
|
10
|
-
import getCurrentTime from "../../utils/getCurrentTime";
|
|
11
|
-
import { STATUS } from "./utils/constants";
|
|
12
10
|
export default class GlobalNotification extends React.Component {
|
|
13
11
|
constructor(props) {
|
|
14
12
|
super(props);
|
|
@@ -17,8 +15,6 @@ export default class GlobalNotification extends React.Component {
|
|
|
17
15
|
shadowClose: true
|
|
18
16
|
};
|
|
19
17
|
this.onClose = this.onClose.bind(this);
|
|
20
|
-
this.getNotiifcationData = this.getNotiifcationData.bind(this);
|
|
21
|
-
this.handleStatusChange = this.handleStatusChange.bind(this);
|
|
22
18
|
}
|
|
23
19
|
|
|
24
20
|
componentDidMount() {
|
|
@@ -28,44 +24,18 @@ export default class GlobalNotification extends React.Component {
|
|
|
28
24
|
id,
|
|
29
25
|
needAutoClose
|
|
30
26
|
} = this.props;
|
|
31
|
-
this.handleStatusChange(STATUS.MOUNTED);
|
|
32
27
|
|
|
33
28
|
if (needAutoClose) {
|
|
34
29
|
this.hideMessageTimer = setTimeout(() => {
|
|
35
30
|
hideMessage(id);
|
|
36
|
-
this.handleStatusChange(STATUS.DISMISSING);
|
|
37
31
|
}, hideTime);
|
|
38
32
|
}
|
|
39
33
|
}
|
|
40
34
|
|
|
41
|
-
componentDidUpdate(prevProps) {
|
|
42
|
-
if (prevProps.id === this.props.id && (prevProps.message !== this.props.message || prevProps.type !== this.props.type)) {
|
|
43
|
-
this.handleStatusChange(STATUS.UPDATED);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
35
|
componentWillUnmount() {
|
|
48
36
|
if (this.hideMessageTimer) {
|
|
49
37
|
clearTimeout(this.hideMessageTimer);
|
|
50
38
|
}
|
|
51
|
-
|
|
52
|
-
this.handleStatusChange(STATUS.UNMOUNTED);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
handleStatusChange(status) {
|
|
56
|
-
const {
|
|
57
|
-
onStatusChange
|
|
58
|
-
} = this.props;
|
|
59
|
-
|
|
60
|
-
if (typeof onStatusChange == 'function') {
|
|
61
|
-
const notificationData = this.getNotiifcationData();
|
|
62
|
-
const currentTime = getCurrentTime();
|
|
63
|
-
onStatusChange({
|
|
64
|
-
status,
|
|
65
|
-
...notificationData,
|
|
66
|
-
time: currentTime
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
39
|
}
|
|
70
40
|
|
|
71
41
|
onClose(e) {
|
|
@@ -77,31 +47,20 @@ export default class GlobalNotification extends React.Component {
|
|
|
77
47
|
this.setState({
|
|
78
48
|
shadowClose: false
|
|
79
49
|
});
|
|
80
|
-
this.handleStatusChange(STATUS.DISMISSING);
|
|
81
50
|
hideMessage && hideMessage(id);
|
|
82
51
|
onClose && onClose(e);
|
|
83
52
|
}
|
|
84
53
|
|
|
85
|
-
getNotiifcationData() {
|
|
86
|
-
const {
|
|
87
|
-
id,
|
|
88
|
-
type,
|
|
89
|
-
message
|
|
90
|
-
} = this.props;
|
|
91
|
-
return {
|
|
92
|
-
id,
|
|
93
|
-
type,
|
|
94
|
-
message
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
54
|
render() {
|
|
99
55
|
let {
|
|
56
|
+
type,
|
|
57
|
+
message,
|
|
100
58
|
hideMessage,
|
|
101
59
|
onClick,
|
|
102
60
|
i18nKeys = {},
|
|
103
61
|
customProps,
|
|
104
62
|
dataSelectorId,
|
|
63
|
+
id,
|
|
105
64
|
needShadow,
|
|
106
65
|
shadowCount,
|
|
107
66
|
eleRef
|
|
@@ -112,13 +71,15 @@ export default class GlobalNotification extends React.Component {
|
|
|
112
71
|
let {
|
|
113
72
|
closeTitle = 'Close'
|
|
114
73
|
} = i18nKeys;
|
|
115
|
-
|
|
116
|
-
|
|
74
|
+
return /*#__PURE__*/React.createElement(GlobalNotificationUI, {
|
|
75
|
+
type: type,
|
|
76
|
+
message: message,
|
|
117
77
|
hideMessage: hideMessage,
|
|
118
78
|
onClick: onClick,
|
|
119
79
|
closeTitle: closeTitle,
|
|
120
80
|
customProps: customProps,
|
|
121
81
|
dataSelectorId: dataSelectorId,
|
|
82
|
+
id: id,
|
|
122
83
|
shadowCount: shadowCount,
|
|
123
84
|
onClose: this.onClose,
|
|
124
85
|
needShadow: shadowClose && needShadow,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
3
|
import GlobalNotification from "../GlobalNotification";
|
|
4
|
-
import { STATUS } from "../utils/constants";
|
|
5
4
|
describe('GlobalNotification', () => {
|
|
6
5
|
test('rendering the defult props', () => {
|
|
7
6
|
const {
|
|
@@ -9,12 +8,4 @@ describe('GlobalNotification', () => {
|
|
|
9
8
|
} = render( /*#__PURE__*/React.createElement(GlobalNotification, null));
|
|
10
9
|
expect(asFragment()).toMatchSnapshot();
|
|
11
10
|
});
|
|
12
|
-
});
|
|
13
|
-
describe('GlobalNotification Constants', () => {
|
|
14
|
-
test('should have correct constant values', () => {
|
|
15
|
-
expect(STATUS.MOUNTED).toBe('mounted');
|
|
16
|
-
expect(STATUS.UPDATED).toBe('updated');
|
|
17
|
-
expect(STATUS.DISMISSING).toBe('dismissing');
|
|
18
|
-
expect(STATUS.UNMOUNTED).toBe('unmounted');
|
|
19
|
-
});
|
|
20
11
|
});
|
|
@@ -15,8 +15,7 @@ export const propTypes = {
|
|
|
15
15
|
needAutoClose: PropTypes.bool,
|
|
16
16
|
isCollapseView: PropTypes.bool,
|
|
17
17
|
shadowCount: PropTypes.number,
|
|
18
|
-
needShadow: PropTypes.bool
|
|
19
|
-
onStatusChange: PropTypes.func
|
|
18
|
+
needShadow: PropTypes.bool
|
|
20
19
|
};
|
|
21
20
|
export const UI_propTypes = {
|
|
22
21
|
dataSelectorId: PropTypes.string,
|
|
@@ -221,7 +221,10 @@ position: relative;
|
|
|
221
221
|
[dir=rtl] .rightPlaceholder{
|
|
222
222
|
left:var(--zd_size15)
|
|
223
223
|
}
|
|
224
|
-
|
|
225
224
|
.phoneField{
|
|
226
225
|
composes: ltr-zone from '~@zohodesk/components/es/common/common.module.css';
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.lineClampPickListItem{
|
|
229
|
+
--line-clamp: var(--picklist-field-line-clamp,3);
|
|
227
230
|
}
|
|
@@ -222,13 +222,17 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
222
222
|
_customClass$listItem = customClass.listItemClass,
|
|
223
223
|
listItemClass = _customClass$listItem === void 0 ? '' : _customClass$listItem,
|
|
224
224
|
_customClass$textBoxI = customClass.textBoxIconWrapperClass,
|
|
225
|
-
textBoxIconWrapperClass = _customClass$textBoxI === void 0 ? '' : _customClass$textBoxI
|
|
225
|
+
textBoxIconWrapperClass = _customClass$textBoxI === void 0 ? '' : _customClass$textBoxI,
|
|
226
|
+
_customClass$dropBoxC = customClass.dropBoxClass,
|
|
227
|
+
dropBoxClass = _customClass$dropBoxC === void 0 ? '' : _customClass$dropBoxC;
|
|
226
228
|
var _customProps$TextBoxI = customProps.TextBoxIconProps,
|
|
227
229
|
TextBoxIconProps = _customProps$TextBoxI === void 0 ? {} : _customProps$TextBoxI,
|
|
228
230
|
_customProps$TagWrapp = customProps.TagWrapperProps,
|
|
229
231
|
TagWrapperProps = _customProps$TagWrapp === void 0 ? {} : _customProps$TagWrapp,
|
|
230
232
|
_customProps$TagProps = customProps.TagProps,
|
|
231
|
-
TagProps = _customProps$TagProps === void 0 ? {} : _customProps$TagProps
|
|
233
|
+
TagProps = _customProps$TagProps === void 0 ? {} : _customProps$TagProps,
|
|
234
|
+
_customProps$ListItem = customProps.ListItemProps,
|
|
235
|
+
ListItemProps = _customProps$ListItem === void 0 ? {} : _customProps$ListItem;
|
|
232
236
|
var isEditable = !isReadOnly;
|
|
233
237
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
234
238
|
className: "".concat(_TagsMultiSelectModule["default"].container, " ").concat(!isReadOnly ? " ".concat(needBorder ? _TagsMultiSelectModule["default"].hasBorder : '', "\n ").concat(needBorder ? _TagsMultiSelectModule["default"]["borderColor_".concat(borderColor)] : _TagsMultiSelectModule["default"].borderColor_transparent, " ").concat(isPopupReady && needBorder || isEditable && isFocus ? _TagsMultiSelectModule["default"].active : '') : '', " ").concat(className),
|
|
@@ -306,7 +310,8 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
306
310
|
boxPosition: boxPosition,
|
|
307
311
|
isPadding: false,
|
|
308
312
|
customClass: {
|
|
309
|
-
customDropBoxWrap: _TagsMultiSelectModule["default"].dropdown
|
|
313
|
+
customDropBoxWrap: _TagsMultiSelectModule["default"].dropdown,
|
|
314
|
+
customDropBox: dropBoxClass
|
|
310
315
|
},
|
|
311
316
|
dataId: "".concat(dataId, "_dropbox"),
|
|
312
317
|
isResponsivePadding: true,
|
|
@@ -337,8 +342,8 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
337
342
|
}, searchList.map(function (item, index) {
|
|
338
343
|
var name = item.name,
|
|
339
344
|
isNew = item.isNew,
|
|
340
|
-
|
|
341
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, searchList.length > 1 && isNew ? /*#__PURE__*/_react["default"].createElement(_DropDownSeparator["default"], null) : null, /*#__PURE__*/_react["default"].createElement(_ListItem["default"], {
|
|
345
|
+
listProps = item.listProps;
|
|
346
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, searchList.length > 1 && isNew ? /*#__PURE__*/_react["default"].createElement(_DropDownSeparator["default"], null) : null, /*#__PURE__*/_react["default"].createElement(_ListItem["default"], _extends({
|
|
342
347
|
key: index,
|
|
343
348
|
index: index,
|
|
344
349
|
autoHover: true,
|
|
@@ -349,9 +354,9 @@ var TagsMultiSelect = /*#__PURE__*/function (_React$Component) {
|
|
|
349
354
|
highlight: selectSearchIndex === index,
|
|
350
355
|
getRef: _this3.getSelectedItemRef,
|
|
351
356
|
isDisabled: listDisabled,
|
|
352
|
-
customProps:
|
|
357
|
+
customProps: listProps,
|
|
353
358
|
customClass: listItemClass
|
|
354
|
-
}, isNew ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
359
|
+
}, ListItemProps), isNew ? /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
355
360
|
alignBox: "row",
|
|
356
361
|
align: "vertical"
|
|
357
362
|
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
@@ -62,7 +62,8 @@ var propTypes = {
|
|
|
62
62
|
customProps: _propTypes["default"].shape({
|
|
63
63
|
TextBoxIconProps: _propTypes["default"].object,
|
|
64
64
|
TagWrapperProps: _propTypes["default"].object,
|
|
65
|
-
TagProps: _propTypes["default"].object
|
|
65
|
+
TagProps: _propTypes["default"].object,
|
|
66
|
+
ListItemProps: _propTypes["default"].object
|
|
66
67
|
}),
|
|
67
68
|
isFocus: _propTypes["default"].bool
|
|
68
69
|
};
|
|
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
28
30
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
29
31
|
|
|
30
32
|
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); } }
|
|
@@ -100,7 +102,10 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
100
102
|
onSearch = _this$props3.onSearch,
|
|
101
103
|
needSearchFetching = _this$props3.needSearchFetching,
|
|
102
104
|
searchStr = _this$props3.searchStr,
|
|
103
|
-
i18nKeys = _this$props3.i18nKeys
|
|
105
|
+
i18nKeys = _this$props3.i18nKeys,
|
|
106
|
+
customProps = _this$props3.customProps;
|
|
107
|
+
var _customProps$ToggleDr = customProps.ToggleDropDownProps,
|
|
108
|
+
ToggleDropDownProps = _customProps$ToggleDr === void 0 ? {} : _customProps$ToggleDr;
|
|
104
109
|
var _i18nKeys$title = i18nKeys.title,
|
|
105
110
|
title = _i18nKeys$title === void 0 ? 'Move Department' : _i18nKeys$title,
|
|
106
111
|
_i18nKeys$searchEmpty = i18nKeys.searchEmptyText,
|
|
@@ -109,7 +114,7 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
109
114
|
searchErrorText = _i18nKeys$searchError === void 0 ? 'No results' : _i18nKeys$searchError,
|
|
110
115
|
_i18nKeys$placeholder = i18nKeys.placeholder,
|
|
111
116
|
placeholder = _i18nKeys$placeholder === void 0 ? 'Search Department' : _i18nKeys$placeholder;
|
|
112
|
-
return /*#__PURE__*/_react["default"].createElement(_ToggleDropDown["default"], {
|
|
117
|
+
return /*#__PURE__*/_react["default"].createElement(_ToggleDropDown["default"], _extends({}, ToggleDropDownProps, {
|
|
113
118
|
title: title,
|
|
114
119
|
options: departmentList,
|
|
115
120
|
value: /*#__PURE__*/_react["default"].createElement(_SecondaryText.DepartmentText, {
|
|
@@ -138,7 +143,7 @@ var DepartmentDropDown = /*#__PURE__*/function (_Component) {
|
|
|
138
143
|
isNextOptions: isNextOptions,
|
|
139
144
|
onSearch: onSearch,
|
|
140
145
|
needSearchFetching: needSearchFetching
|
|
141
|
-
});
|
|
146
|
+
}));
|
|
142
147
|
}
|
|
143
148
|
}]);
|
|
144
149
|
|
|
@@ -31,5 +31,7 @@ var propTypes = (_propTypes = {
|
|
|
31
31
|
searchEmptyText: _propTypes2["default"].string,
|
|
32
32
|
searchErrorText: _propTypes2["default"].string,
|
|
33
33
|
placeholder: _propTypes2["default"].string
|
|
34
|
+
})), _defineProperty(_propTypes, "customProps", _propTypes2["default"].shape({
|
|
35
|
+
ToggleDropDownProps: _propTypes2["default"].object
|
|
34
36
|
})), _propTypes);
|
|
35
37
|
exports.propTypes = propTypes;
|
|
@@ -247,7 +247,10 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
247
247
|
renderTargetElement = _this$props4.renderTargetElement,
|
|
248
248
|
renderFooterElement = _this$props4.renderFooterElement,
|
|
249
249
|
_this$props4$a11y = _this$props4.a11y,
|
|
250
|
-
a11y = _this$props4$a11y === void 0 ? {} : _this$props4$a11y
|
|
250
|
+
a11y = _this$props4$a11y === void 0 ? {} : _this$props4$a11y,
|
|
251
|
+
customClass = _this$props4.customClass;
|
|
252
|
+
var _customClass$dropBoxC = customClass.dropBoxClass,
|
|
253
|
+
dropBoxClass = _customClass$dropBoxC === void 0 ? '' : _customClass$dropBoxC;
|
|
251
254
|
var _a11y$tabIndex = a11y.tabIndex,
|
|
252
255
|
tabIndex = _a11y$tabIndex === void 0 ? 0 : _a11y$tabIndex,
|
|
253
256
|
ariaLabelledby = a11y.ariaLabelledby,
|
|
@@ -310,7 +313,8 @@ var StatusDropdown = /*#__PURE__*/function (_React$Component) {
|
|
|
310
313
|
isAnimate: true,
|
|
311
314
|
getRef: getContainerRef,
|
|
312
315
|
customClass: {
|
|
313
|
-
customDropBoxWrap: _StatusDropdownModule["default"].dropBoxContainer
|
|
316
|
+
customDropBoxWrap: _StatusDropdownModule["default"].dropBoxContainer,
|
|
317
|
+
customDropBox: dropBoxClass
|
|
314
318
|
},
|
|
315
319
|
needResponsive: needResponsive,
|
|
316
320
|
isResponsivePadding: true,
|
|
@@ -30,5 +30,7 @@ var propTypes = (_propTypes = {
|
|
|
30
30
|
idName: _propTypes2["default"].string,
|
|
31
31
|
isArrow: _propTypes2["default"].bool,
|
|
32
32
|
isDataLoaded: _propTypes2["default"].bool
|
|
33
|
-
}, _defineProperty(_propTypes, "isDataLoaded", _propTypes2["default"].bool), _defineProperty(_propTypes, "isDisabled", _propTypes2["default"].bool), _defineProperty(_propTypes, "isEditable", _propTypes2["default"].bool), _defineProperty(_propTypes, "isFetchingOptions", _propTypes2["default"].bool), _defineProperty(_propTypes, "isPopupActive", _propTypes2["default"].bool), _defineProperty(_propTypes, "isPopupOpen", _propTypes2["default"].bool), _defineProperty(_propTypes, "isPopupReady", _propTypes2["default"].bool), _defineProperty(_propTypes, "isReadOnly", _propTypes2["default"].bool), _defineProperty(_propTypes, "isSearch", _propTypes2["default"].bool), _defineProperty(_propTypes, "keyName", _propTypes2["default"].string), _defineProperty(_propTypes, "left", _propTypes2["default"].number), _defineProperty(_propTypes, "needExternalPopupState", _propTypes2["default"].bool), _defineProperty(_propTypes, "needResponsive", _propTypes2["default"].bool), _defineProperty(_propTypes, "needTick", _propTypes2["default"].bool), _defineProperty(_propTypes, "onClick", _propTypes2["default"].func), _defineProperty(_propTypes, "onTogglePopup", _propTypes2["default"].func), _defineProperty(_propTypes, "options", _propTypes2["default"].array.isRequired), _defineProperty(_propTypes, "placeHolderText", _propTypes2["default"].string), _defineProperty(_propTypes, "position", _propTypes2["default"].string), _defineProperty(_propTypes, "removeClose", _propTypes2["default"].func), _defineProperty(_propTypes, "right", _propTypes2["default"].number), _defineProperty(_propTypes, "searchBoxSize", _propTypes2["default"].oneOf(['small', 'medium', 'xmedium'])), _defineProperty(_propTypes, "searchEmptyHint", _propTypes2["default"].string), _defineProperty(_propTypes, "searchErrorText", _propTypes2["default"].string), _defineProperty(_propTypes, "showIconOnHover", _propTypes2["default"].bool), _defineProperty(_propTypes, "showOnHover", _propTypes2["default"].bool), _defineProperty(_propTypes, "statusColor", _propTypes2["default"].string), _defineProperty(_propTypes, "targetAlign", _propTypes2["default"].oneOf(['vertical', 'horizontal', 'both', 'top', 'right', 'bottom', 'left', 'between', 'around'])), _defineProperty(_propTypes, "title", _propTypes2["default"].string), _defineProperty(_propTypes, "togglePopup", _propTypes2["default"].func), _defineProperty(_propTypes, "value", _propTypes2["default"].node), _defineProperty(_propTypes, "needMultiLineText", _propTypes2["default"].bool), _defineProperty(_propTypes, "onSelectLabel", _propTypes2["default"].func), _defineProperty(_propTypes, "top", _propTypes2["default"].number), _defineProperty(_propTypes, "a11y", _propTypes2["default"].object), _defineProperty(_propTypes, "isAbsolutePositioningNeeded", _propTypes2["default"].bool), _defineProperty(_propTypes, "isRestrictScroll", _propTypes2["default"].bool), _defineProperty(_propTypes, "positionsOffset", _propTypes2["default"].object), _defineProperty(_propTypes, "renderTargetElement", _propTypes2["default"].func), _defineProperty(_propTypes, "renderFooterElement", _propTypes2["default"].node), _defineProperty(_propTypes, "targetOffset", _propTypes2["default"].object), _propTypes
|
|
33
|
+
}, _defineProperty(_propTypes, "isDataLoaded", _propTypes2["default"].bool), _defineProperty(_propTypes, "isDisabled", _propTypes2["default"].bool), _defineProperty(_propTypes, "isEditable", _propTypes2["default"].bool), _defineProperty(_propTypes, "isFetchingOptions", _propTypes2["default"].bool), _defineProperty(_propTypes, "isPopupActive", _propTypes2["default"].bool), _defineProperty(_propTypes, "isPopupOpen", _propTypes2["default"].bool), _defineProperty(_propTypes, "isPopupReady", _propTypes2["default"].bool), _defineProperty(_propTypes, "isReadOnly", _propTypes2["default"].bool), _defineProperty(_propTypes, "isSearch", _propTypes2["default"].bool), _defineProperty(_propTypes, "keyName", _propTypes2["default"].string), _defineProperty(_propTypes, "left", _propTypes2["default"].number), _defineProperty(_propTypes, "needExternalPopupState", _propTypes2["default"].bool), _defineProperty(_propTypes, "needResponsive", _propTypes2["default"].bool), _defineProperty(_propTypes, "needTick", _propTypes2["default"].bool), _defineProperty(_propTypes, "onClick", _propTypes2["default"].func), _defineProperty(_propTypes, "onTogglePopup", _propTypes2["default"].func), _defineProperty(_propTypes, "options", _propTypes2["default"].array.isRequired), _defineProperty(_propTypes, "placeHolderText", _propTypes2["default"].string), _defineProperty(_propTypes, "position", _propTypes2["default"].string), _defineProperty(_propTypes, "removeClose", _propTypes2["default"].func), _defineProperty(_propTypes, "right", _propTypes2["default"].number), _defineProperty(_propTypes, "searchBoxSize", _propTypes2["default"].oneOf(['small', 'medium', 'xmedium'])), _defineProperty(_propTypes, "searchEmptyHint", _propTypes2["default"].string), _defineProperty(_propTypes, "searchErrorText", _propTypes2["default"].string), _defineProperty(_propTypes, "showIconOnHover", _propTypes2["default"].bool), _defineProperty(_propTypes, "showOnHover", _propTypes2["default"].bool), _defineProperty(_propTypes, "statusColor", _propTypes2["default"].string), _defineProperty(_propTypes, "targetAlign", _propTypes2["default"].oneOf(['vertical', 'horizontal', 'both', 'top', 'right', 'bottom', 'left', 'between', 'around'])), _defineProperty(_propTypes, "title", _propTypes2["default"].string), _defineProperty(_propTypes, "togglePopup", _propTypes2["default"].func), _defineProperty(_propTypes, "value", _propTypes2["default"].node), _defineProperty(_propTypes, "needMultiLineText", _propTypes2["default"].bool), _defineProperty(_propTypes, "onSelectLabel", _propTypes2["default"].func), _defineProperty(_propTypes, "top", _propTypes2["default"].number), _defineProperty(_propTypes, "a11y", _propTypes2["default"].object), _defineProperty(_propTypes, "isAbsolutePositioningNeeded", _propTypes2["default"].bool), _defineProperty(_propTypes, "isRestrictScroll", _propTypes2["default"].bool), _defineProperty(_propTypes, "positionsOffset", _propTypes2["default"].object), _defineProperty(_propTypes, "renderTargetElement", _propTypes2["default"].func), _defineProperty(_propTypes, "renderFooterElement", _propTypes2["default"].node), _defineProperty(_propTypes, "targetOffset", _propTypes2["default"].object), _defineProperty(_propTypes, "customClass", _propTypes2["default"].shape({
|
|
34
|
+
dropBoxClass: _propTypes2["default"].string
|
|
35
|
+
})), _propTypes);
|
|
34
36
|
exports.propTypes = propTypes;
|
|
@@ -36,9 +36,8 @@
|
|
|
36
36
|
.value {
|
|
37
37
|
composes: dotted from '~@zohodesk/components/es/common/common.module.css';
|
|
38
38
|
}
|
|
39
|
-
.multiLineValue{
|
|
40
|
-
|
|
41
|
-
composes: clamp from '~@zohodesk/components/es/common/common.module.css';
|
|
39
|
+
.multiLineValue {
|
|
40
|
+
composes: lineClamp from '~@zohodesk/components/es/common/common.module.css';
|
|
42
41
|
}
|
|
43
42
|
[dir=ltr] .withBorder.active {
|
|
44
43
|
border-left-color: var(--zdt_statuslistitem_default_active_border);
|
|
@@ -90,6 +89,10 @@
|
|
|
90
89
|
}
|
|
91
90
|
/* Status Type */
|
|
92
91
|
.statusType {
|
|
92
|
+
--status_listitem_bullet_min_height: var(--zd_size8);
|
|
93
|
+
--status_listitem_bullet_min_width: var(--zd_size8);
|
|
94
|
+
min-height: var(--status_listitem_bullet_min_height);
|
|
95
|
+
min-width: var(--status_listitem_bullet_min_width);
|
|
93
96
|
width: var(--zd_size8) ;
|
|
94
97
|
height: var(--zd_size8) ;
|
|
95
98
|
border-radius: 50%;
|
|
@@ -27,20 +27,10 @@ var _Layout = require("@zohodesk/components/es/Layout");
|
|
|
27
27
|
|
|
28
28
|
var _Common = require("@zohodesk/components/es/utils/Common");
|
|
29
29
|
|
|
30
|
-
var _getCurrentTime = _interopRequireDefault(require("../../utils/getCurrentTime"));
|
|
31
|
-
|
|
32
|
-
var _constants = require("./utils/constants");
|
|
33
|
-
|
|
34
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
35
31
|
|
|
36
32
|
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); }
|
|
37
33
|
|
|
38
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
39
|
-
|
|
40
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
41
|
-
|
|
42
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
43
|
-
|
|
44
34
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
45
35
|
|
|
46
36
|
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); } }
|
|
@@ -77,61 +67,30 @@ var GlobalNotification = /*#__PURE__*/function (_React$Component) {
|
|
|
77
67
|
shadowClose: true
|
|
78
68
|
};
|
|
79
69
|
_this.onClose = _this.onClose.bind(_assertThisInitialized(_this));
|
|
80
|
-
_this.getNotiifcationData = _this.getNotiifcationData.bind(_assertThisInitialized(_this));
|
|
81
|
-
_this.handleStatusChange = _this.handleStatusChange.bind(_assertThisInitialized(_this));
|
|
82
70
|
return _this;
|
|
83
71
|
}
|
|
84
72
|
|
|
85
73
|
_createClass(GlobalNotification, [{
|
|
86
74
|
key: "componentDidMount",
|
|
87
75
|
value: function componentDidMount() {
|
|
88
|
-
var _this2 = this;
|
|
89
|
-
|
|
90
76
|
var _this$props = this.props,
|
|
91
77
|
hideMessage = _this$props.hideMessage,
|
|
92
78
|
hideTime = _this$props.hideTime,
|
|
93
79
|
id = _this$props.id,
|
|
94
80
|
needAutoClose = _this$props.needAutoClose;
|
|
95
|
-
this.handleStatusChange(_constants.STATUS.MOUNTED);
|
|
96
81
|
|
|
97
82
|
if (needAutoClose) {
|
|
98
83
|
this.hideMessageTimer = setTimeout(function () {
|
|
99
84
|
hideMessage(id);
|
|
100
|
-
|
|
101
|
-
_this2.handleStatusChange(_constants.STATUS.DISMISSING);
|
|
102
85
|
}, hideTime);
|
|
103
86
|
}
|
|
104
87
|
}
|
|
105
|
-
}, {
|
|
106
|
-
key: "componentDidUpdate",
|
|
107
|
-
value: function componentDidUpdate(prevProps) {
|
|
108
|
-
if (prevProps.id === this.props.id && (prevProps.message !== this.props.message || prevProps.type !== this.props.type)) {
|
|
109
|
-
this.handleStatusChange(_constants.STATUS.UPDATED);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
88
|
}, {
|
|
113
89
|
key: "componentWillUnmount",
|
|
114
90
|
value: function componentWillUnmount() {
|
|
115
91
|
if (this.hideMessageTimer) {
|
|
116
92
|
clearTimeout(this.hideMessageTimer);
|
|
117
93
|
}
|
|
118
|
-
|
|
119
|
-
this.handleStatusChange(_constants.STATUS.UNMOUNTED);
|
|
120
|
-
}
|
|
121
|
-
}, {
|
|
122
|
-
key: "handleStatusChange",
|
|
123
|
-
value: function handleStatusChange(status) {
|
|
124
|
-
var onStatusChange = this.props.onStatusChange;
|
|
125
|
-
|
|
126
|
-
if (typeof onStatusChange == 'function') {
|
|
127
|
-
var notificationData = this.getNotiifcationData();
|
|
128
|
-
var currentTime = (0, _getCurrentTime["default"])();
|
|
129
|
-
onStatusChange(_objectSpread(_objectSpread({
|
|
130
|
-
status: status
|
|
131
|
-
}, notificationData), {}, {
|
|
132
|
-
time: currentTime
|
|
133
|
-
}));
|
|
134
|
-
}
|
|
135
94
|
}
|
|
136
95
|
}, {
|
|
137
96
|
key: "onClose",
|
|
@@ -143,51 +102,42 @@ var GlobalNotification = /*#__PURE__*/function (_React$Component) {
|
|
|
143
102
|
this.setState({
|
|
144
103
|
shadowClose: false
|
|
145
104
|
});
|
|
146
|
-
this.handleStatusChange(_constants.STATUS.DISMISSING);
|
|
147
105
|
hideMessage && hideMessage(id);
|
|
148
106
|
onClose && onClose(e);
|
|
149
107
|
}
|
|
150
|
-
}, {
|
|
151
|
-
key: "getNotiifcationData",
|
|
152
|
-
value: function getNotiifcationData() {
|
|
153
|
-
var _this$props3 = this.props,
|
|
154
|
-
id = _this$props3.id,
|
|
155
|
-
type = _this$props3.type,
|
|
156
|
-
message = _this$props3.message;
|
|
157
|
-
return {
|
|
158
|
-
id: id,
|
|
159
|
-
type: type,
|
|
160
|
-
message: message
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
108
|
}, {
|
|
164
109
|
key: "render",
|
|
165
110
|
value: function render() {
|
|
166
|
-
var _this$
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
111
|
+
var _this$props3 = this.props,
|
|
112
|
+
type = _this$props3.type,
|
|
113
|
+
message = _this$props3.message,
|
|
114
|
+
hideMessage = _this$props3.hideMessage,
|
|
115
|
+
onClick = _this$props3.onClick,
|
|
116
|
+
_this$props3$i18nKeys = _this$props3.i18nKeys,
|
|
117
|
+
i18nKeys = _this$props3$i18nKeys === void 0 ? {} : _this$props3$i18nKeys,
|
|
118
|
+
customProps = _this$props3.customProps,
|
|
119
|
+
dataSelectorId = _this$props3.dataSelectorId,
|
|
120
|
+
id = _this$props3.id,
|
|
121
|
+
needShadow = _this$props3.needShadow,
|
|
122
|
+
shadowCount = _this$props3.shadowCount,
|
|
123
|
+
eleRef = _this$props3.eleRef;
|
|
176
124
|
var shadowClose = this.state.shadowClose;
|
|
177
125
|
var _i18nKeys$closeTitle = i18nKeys.closeTitle,
|
|
178
126
|
closeTitle = _i18nKeys$closeTitle === void 0 ? 'Close' : _i18nKeys$closeTitle;
|
|
179
|
-
|
|
180
|
-
|
|
127
|
+
return /*#__PURE__*/_react["default"].createElement(GlobalNotificationUI, {
|
|
128
|
+
type: type,
|
|
129
|
+
message: message,
|
|
181
130
|
hideMessage: hideMessage,
|
|
182
131
|
onClick: onClick,
|
|
183
132
|
closeTitle: closeTitle,
|
|
184
133
|
customProps: customProps,
|
|
185
134
|
dataSelectorId: dataSelectorId,
|
|
135
|
+
id: id,
|
|
186
136
|
shadowCount: shadowCount,
|
|
187
137
|
onClose: this.onClose,
|
|
188
138
|
needShadow: shadowClose && needShadow,
|
|
189
139
|
eleRef: eleRef
|
|
190
|
-
})
|
|
140
|
+
});
|
|
191
141
|
}
|
|
192
142
|
}]);
|
|
193
143
|
|
|
@@ -6,8 +6,6 @@ var _react2 = require("@testing-library/react");
|
|
|
6
6
|
|
|
7
7
|
var _GlobalNotification = _interopRequireDefault(require("../GlobalNotification"));
|
|
8
8
|
|
|
9
|
-
var _constants = require("../utils/constants");
|
|
10
|
-
|
|
11
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
10
|
|
|
13
11
|
describe('GlobalNotification', function () {
|
|
@@ -17,12 +15,4 @@ describe('GlobalNotification', function () {
|
|
|
17
15
|
|
|
18
16
|
expect(asFragment()).toMatchSnapshot();
|
|
19
17
|
});
|
|
20
|
-
});
|
|
21
|
-
describe('GlobalNotification Constants', function () {
|
|
22
|
-
test('should have correct constant values', function () {
|
|
23
|
-
expect(_constants.STATUS.MOUNTED).toBe('mounted');
|
|
24
|
-
expect(_constants.STATUS.UPDATED).toBe('updated');
|
|
25
|
-
expect(_constants.STATUS.DISMISSING).toBe('dismissing');
|
|
26
|
-
expect(_constants.STATUS.UNMOUNTED).toBe('unmounted');
|
|
27
|
-
});
|
|
28
18
|
});
|
|
@@ -25,8 +25,7 @@ var propTypes = {
|
|
|
25
25
|
needAutoClose: _propTypes["default"].bool,
|
|
26
26
|
isCollapseView: _propTypes["default"].bool,
|
|
27
27
|
shadowCount: _propTypes["default"].number,
|
|
28
|
-
needShadow: _propTypes["default"].bool
|
|
29
|
-
onStatusChange: _propTypes["default"].func
|
|
28
|
+
needShadow: _propTypes["default"].bool
|
|
30
29
|
};
|
|
31
30
|
exports.propTypes = propTypes;
|
|
32
31
|
var UI_propTypes = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/dot",
|
|
3
|
-
"version": "1.0.0-temp-
|
|
3
|
+
"version": "1.0.0-temp-187.17",
|
|
4
4
|
"main": "lib/index",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"sstest": "react-cli sstest",
|
|
40
40
|
"common_package_build": "cd ../common && npm run build && cd ../dot",
|
|
41
41
|
"docs": "npm run css:review && review:props && react-cli docs",
|
|
42
|
-
"prepublishOnly": "node prePublish.js && npm run
|
|
42
|
+
"prepublishOnly": "node prePublish.js && npm run css:review && npm run review:props",
|
|
43
43
|
"postpublish": "node postPublish.js",
|
|
44
44
|
"test-clean": "react-cli clean ./coverage && react-cli clean ./unittest react-cli clean ./es && react-cli clean ./lib && react-cli clean ./package-lock.json && react-cli clean ./result.json",
|
|
45
45
|
"download": "npm run downloadOnly && cd ../ && npm run download",
|
|
@@ -73,17 +73,17 @@
|
|
|
73
73
|
"@zohodesk-private/node-plugins": "1.1.13",
|
|
74
74
|
"@zohodesk-private/react-prop-validator": "1.2.3",
|
|
75
75
|
"@zohodesk/a11y": "2.3.8",
|
|
76
|
-
"@zohodesk/components": "
|
|
76
|
+
"@zohodesk/components": "../components",
|
|
77
77
|
"@zohodesk/hooks": "2.0.6",
|
|
78
78
|
"@zohodesk/icons": "1.1.3",
|
|
79
79
|
"@zohodesk/layout": "^3.1.0",
|
|
80
80
|
"@zohodesk/svg": "1.2.3",
|
|
81
|
-
"@zohodesk/utils": "1.
|
|
81
|
+
"@zohodesk/utils": "1.3.15",
|
|
82
82
|
"@zohodesk/variables": "1.1.0",
|
|
83
83
|
"@zohodesk/virtualizer": "1.0.13",
|
|
84
84
|
"react-sortable-hoc": "^0.8.3",
|
|
85
85
|
"velocity-react": "1.4.3",
|
|
86
|
-
"@zohodesk/dotkit": "1.0.
|
|
86
|
+
"@zohodesk/dotkit": "1.0.3",
|
|
87
87
|
"@zohodesk/react-cli": "1.1.27"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"@zohodesk/virtualizer": "1.0.13",
|
|
96
96
|
"react-sortable-hoc": "^0.8.3",
|
|
97
97
|
"@zohodesk/hooks": "2.0.6",
|
|
98
|
-
"@zohodesk/utils": "1.
|
|
98
|
+
"@zohodesk/utils": "1.3.15",
|
|
99
99
|
"@zohodesk/a11y": "2.3.8",
|
|
100
100
|
"@zohodesk/layout": "3.1.0"
|
|
101
101
|
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.STATUS = void 0;
|
|
7
|
-
var STATUS = {
|
|
8
|
-
MOUNTED: 'mounted',
|
|
9
|
-
UNMOUNTED: 'unmounted',
|
|
10
|
-
UPDATED: 'updated',
|
|
11
|
-
DISMISSING: 'dismissing'
|
|
12
|
-
};
|
|
13
|
-
exports.STATUS = STATUS;
|