@zohodesk/dot 1.0.0-temp-220 → 1.0.0-temp-221

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.
Files changed (26) hide show
  1. package/README.md +0 -5
  2. package/es/form/fields/CheckBoxField/CheckBoxField.js +6 -9
  3. package/es/form/fields/CurrencyField/CurrencyField.js +5 -5
  4. package/es/form/fields/DateField/DateField.js +7 -8
  5. package/es/form/fields/MultiSelectField/MultiSelectField.js +5 -6
  6. package/es/form/fields/SelectField/SelectField.js +5 -6
  7. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +6 -8
  8. package/es/form/fields/TextBoxField/TextBoxField.js +7 -7
  9. package/es/form/fields/TextareaField/TextareaField.js +6 -6
  10. package/es/version2/GlobalNotification/GlobalNotification.js +7 -46
  11. package/es/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +0 -9
  12. package/es/version2/GlobalNotification/props/propTypes.js +1 -2
  13. package/lib/form/fields/CheckBoxField/CheckBoxField.js +6 -10
  14. package/lib/form/fields/CurrencyField/CurrencyField.js +4 -5
  15. package/lib/form/fields/DateField/DateField.js +6 -9
  16. package/lib/form/fields/MultiSelectField/MultiSelectField.js +5 -7
  17. package/lib/form/fields/SelectField/SelectField.js +5 -7
  18. package/lib/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +5 -8
  19. package/lib/form/fields/TextBoxField/TextBoxField.js +6 -8
  20. package/lib/form/fields/TextareaField/TextareaField.js +5 -6
  21. package/lib/version2/GlobalNotification/GlobalNotification.js +18 -68
  22. package/lib/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +0 -10
  23. package/lib/version2/GlobalNotification/props/propTypes.js +1 -2
  24. package/package.json +5 -5
  25. package/es/version2/GlobalNotification/utils/constants.js +0 -6
  26. package/lib/version2/GlobalNotification/utils/constants.js +0 -13
package/README.md CHANGED
@@ -2,11 +2,6 @@
2
2
 
3
3
  In this Library, we Provide Some Basic Components to Build Your Application
4
4
 
5
- # 1.7.27
6
-
7
- - **GlobalNotification**
8
- - `onStatusChange` prop added.
9
-
10
5
  # 1.7.26
11
6
 
12
7
  - `list/SecondaryText/PhoneNumber.js`
@@ -3,8 +3,9 @@ import React, { PureComponent } from 'react';
3
3
  import { defaultProps } from "./props/defaultProps";
4
4
  import { propTypes } from "./props/propTypes";
5
5
  /**** Components ****/
6
+ // import Label from '@zohodesk/components/es/Label/Label';
6
7
 
7
- import Label from '@zohodesk/components/es/Label/Label';
8
+ import Label from '@zohodesk/components/es/v1/Label/Label';
8
9
  import CheckBox from '@zohodesk/components/es/CheckBox/CheckBox';
9
10
  import ValidationMessage from "../ValidationMessage/ValidationMessage";
10
11
  import { Container, Box } from '@zohodesk/components/es/Layout';
@@ -87,15 +88,11 @@ export default class CheckBoxField extends PureComponent {
87
88
  renderProps: renderLabelProps
88
89
  }, /*#__PURE__*/React.createElement(Label, {
89
90
  text: labelName,
90
- id: id,
91
- size: fieldSize === 'small' ? 'small' : 'medium',
92
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
93
- infoText: infoText,
94
- customClass: `${!isDirectCol ? style.checkboxText : ''} ${!isDirectCol ? style[`lineClamp_${lineClamp}`] : ''} ${isReadOnly || isDisabled ? style.cbTextReadonly : style.cbTextPointer} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}`,
95
- title: labelName,
91
+ isRequired: isMandatory,
92
+ customStyle: labelCustomClass,
93
+ testId: id,
94
+ customId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
96
95
  onClick: !removeEvent ? this.handleLabelClick : null,
97
- variant: isDirectCol ? 'default' : 'primary',
98
- dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
99
96
  ...LabelProps
100
97
  }));
101
98
  return /*#__PURE__*/React.createElement("div", {
@@ -3,8 +3,9 @@ import React, { PureComponent } from 'react';
3
3
  import { defaultProps } from "./props/defaultProps";
4
4
  import { propTypes } from "./props/propTypes";
5
5
  /**** Components ****/
6
+ // import Label from '@zohodesk/components/es/Label/Label';
6
7
 
7
- import Label from '@zohodesk/components/es/Label/Label';
8
+ import Label from '@zohodesk/components/es/v1/Label/Label';
8
9
  import TextBoxIcon from '@zohodesk/components/es/TextBoxIcon/TextBoxIcon';
9
10
  import ValidationMessage from "../ValidationMessage/ValidationMessage";
10
11
  import { getUniqueId } from '@zohodesk/components/es/Provider/IdProvider';
@@ -129,11 +130,10 @@ export default class CurrencyField extends PureComponent {
129
130
  renderProps: renderLabelProps
130
131
  }, /*#__PURE__*/React.createElement(Label, {
131
132
  text: labelName,
132
- size: fieldSize === 'small' ? 'small' : 'medium',
133
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
134
- customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}`,
133
+ isRequired: isMandatory,
134
+ customStyle: labelCustomClass,
135
135
  htmlFor: uniqueId,
136
- dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
136
+ customId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
137
137
  ...LabelProps
138
138
  })), /*#__PURE__*/React.createElement("div", {
139
139
  className: `${style.fieldContainer} ${labelName ? style[`fieldMargin_${fieldSize}`] : ''}`
@@ -3,8 +3,9 @@ import React, { PureComponent } from 'react';
3
3
  import { defaultProps } from "./props/defaultProps";
4
4
  import { propTypes } from "./props/propTypes";
5
5
  /**** Components ****/
6
+ // import Label from '@zohodesk/components/es/Label/Label';
6
7
 
7
- import Label from '@zohodesk/components/es/Label/Label';
8
+ import Label from '@zohodesk/components/es/v1/Label/Label';
8
9
  import DateWidget from '@zohodesk/components/es/DateTime/DateWidget';
9
10
  import ValidationMessage from "../ValidationMessage/ValidationMessage";
10
11
  import { getUniqueId } from '@zohodesk/components/es/Provider/IdProvider';
@@ -133,14 +134,12 @@ export default class DateField extends PureComponent {
133
134
  renderProps: renderLabelProps
134
135
  }, /*#__PURE__*/React.createElement(Label, {
135
136
  text: labelName,
137
+ isRequired: isMandatory,
138
+ customStyle: labelCustomClass,
136
139
  htmlFor: getAriaId,
137
- size: fieldSize === 'small' ? 'small' : 'medium',
138
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
139
- onClick: isDisabled || isReadOnly ? null : this.handleLabelClick,
140
- customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}`,
141
- dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
142
- ...LabelProps,
143
- id: labelName
140
+ testId: labelName,
141
+ customId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
142
+ ...LabelProps
144
143
  })), /*#__PURE__*/React.createElement("div", {
145
144
  className: `${style.fieldContainer} ${labelName ? style[`fieldMargin_${fieldSize}`] : ''}`
146
145
  }, isLocked && lockedValueText ? /*#__PURE__*/React.createElement("div", {
@@ -3,8 +3,9 @@ import React, { PureComponent } from 'react';
3
3
  import { defaultProps } from "./props/defaultProps";
4
4
  import { propTypes } from "./props/propTypes";
5
5
  /**** Components ****/
6
+ // import Label from '@zohodesk/components/es/Label/Label';
6
7
 
7
- import Label from '@zohodesk/components/es/Label/Label';
8
+ import Label from '@zohodesk/components/es/v1/Label/Label';
8
9
  import MultiSelect from '@zohodesk/components/es/MultiSelect/MultiSelect';
9
10
  import ValidationMessage from "../ValidationMessage/ValidationMessage";
10
11
  import { getUniqueId } from '@zohodesk/components/es/Provider/IdProvider';
@@ -145,13 +146,11 @@ export default class MultiSelectField extends PureComponent {
145
146
  renderProps: renderLabelProps
146
147
  }, /*#__PURE__*/React.createElement(Label, {
147
148
  text: labelName,
148
- id: id,
149
- size: fieldSize === 'small' ? 'small' : 'medium',
150
- palette: isDarkPalette ? 'dark' : isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette // onClick={this.handleLabelClick}
149
+ isRequired: isMandatory // customStyle={style.fieldLabel}
151
150
  ,
152
- customClass: `${style.fieldLabel} ${isMandatory ? style.labelMandatory : ''}`,
153
- dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
154
151
  htmlFor: uniqueId,
152
+ testId: id,
153
+ customId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
155
154
  ...LabelProps
156
155
  })), /*#__PURE__*/React.createElement(MultiSelect, {
157
156
  options: options,
@@ -3,8 +3,9 @@ import React, { PureComponent } from 'react';
3
3
  import { defaultProps } from "./props/defaultProps";
4
4
  import { propTypes } from "./props/propTypes";
5
5
  /**** Components ****/
6
+ // import Label from '@zohodesk/components/es/Label/Label';
6
7
 
7
- import Label from '@zohodesk/components/es/Label/Label';
8
+ import Label from '@zohodesk/components/es/v1/Label/Label';
8
9
  import Select from '@zohodesk/components/es/Select/Select';
9
10
  import ValidationMessage from "../ValidationMessage/ValidationMessage";
10
11
  import { getUniqueId } from '@zohodesk/components/es/Provider/IdProvider';
@@ -115,13 +116,11 @@ export default class SelectField extends PureComponent {
115
116
  renderProps: renderLabelProps
116
117
  }, /*#__PURE__*/React.createElement(Label, {
117
118
  text: labelName,
118
- size: fieldSize === 'small' ? 'small' : 'medium',
119
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
120
- customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}`,
119
+ isRequired: isMandatory,
121
120
  htmlFor: uniqueId,
122
- dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
123
121
  ...LabelProps,
124
- id: uniqueId
122
+ testId: uniqueId,
123
+ customId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`
125
124
  })), /*#__PURE__*/React.createElement("div", {
126
125
  className: `${style.fieldContainer} ${labelName ? style[`fieldMargin_${fieldSize}`] : ''} ${fieldClass ? fieldClass : ''}`
127
126
  }, /*#__PURE__*/React.createElement(Select, {
@@ -1,8 +1,9 @@
1
1
  import React, { useState, useEffect } from 'react';
2
2
  import { defaultProps } from "./props/defaultProps";
3
3
  import { propTypes } from "./props/propTypes";
4
- import { Box } from '@zohodesk/components/es/Layout';
5
- import Label from '@zohodesk/components/es/Label/Label';
4
+ import { Box } from '@zohodesk/components/es/Layout'; // import Label from '@zohodesk/components/es/Label/Label';
5
+
6
+ import Label from '@zohodesk/components/es/v1/Label/Label';
6
7
  import Popup from '@zohodesk/components/es/Popup/Popup';
7
8
  import ValidationMessage from "../ValidationMessage/ValidationMessage";
8
9
  import TagsMultiSelect from "../TagsMultiSelect/TagsMultiSelect";
@@ -206,13 +207,10 @@ const TagsMultiSelectField = props => {
206
207
  }
207
208
  }, /*#__PURE__*/React.createElement(Label, {
208
209
  text: labelName,
209
- title: labelName,
210
- id: id,
211
- size: labelSize,
212
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
213
- customClass: `${fieldStyle.fieldLabel} ${isMandatory ? fieldStyle.labelMandatory : ''} ${labelClass ? labelClass : ''}`,
214
- dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
210
+ isRequired: isMandatory,
215
211
  htmlFor: htmlId,
212
+ testId: id,
213
+ customId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
216
214
  ...LabelProps
217
215
  }), selectedValueCount ? /*#__PURE__*/React.createElement(Box, {
218
216
  dataId: `${dataId}_tagCount`,
@@ -3,8 +3,9 @@ import React, { PureComponent } from 'react';
3
3
  import { defaultProps } from "./props/defaultProps";
4
4
  import { propTypes } from "./props/propTypes";
5
5
  /**** Components ****/
6
+ // import Label from '@zohodesk/components/es/Label/Label';
6
7
 
7
- import Label from '@zohodesk/components/es/Label/Label';
8
+ import Label from '@zohodesk/components/es/v1/Label/Label';
8
9
  import TextBoxIcon from '@zohodesk/components/es/TextBoxIcon/TextBoxIcon';
9
10
  import ValidationMessage from "../ValidationMessage/ValidationMessage";
10
11
  import { getUniqueId } from '@zohodesk/components/es/Provider/IdProvider';
@@ -103,13 +104,12 @@ export default class TextBoxField extends PureComponent {
103
104
  renderProps: renderLabelProps
104
105
  }, /*#__PURE__*/React.createElement(Label, {
105
106
  text: labelName,
106
- size: fieldSize === 'small' ? 'small' : 'medium',
107
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
108
- customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}`,
107
+ isRequired: isMandatory,
108
+ customStyle: labelCustomClass,
109
+ testId: labelName,
109
110
  htmlFor: uniqueId,
110
- dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
111
- ...LabelProps,
112
- id: labelName
111
+ customId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
112
+ ...LabelProps
113
113
  })), /*#__PURE__*/React.createElement("div", {
114
114
  className: `${style.fieldContainer} ${labelName ? style[`fieldMargin_${fieldSize}`] : ''}`
115
115
  }, /*#__PURE__*/React.createElement(TextBoxIcon, {
@@ -3,8 +3,9 @@ import React, { PureComponent } from 'react';
3
3
  import { defaultProps } from "./props/defaultProps";
4
4
  import { propTypes } from "./props/propTypes";
5
5
  /**** Components ****/
6
+ // import Label from '@zohodesk/components/es/Label/Label';
6
7
 
7
- import Label from '@zohodesk/components/es/Label/Label';
8
+ import Label from '@zohodesk/components/es/v1/Label/Label';
8
9
  import Textarea from '@zohodesk/components/es/Textarea/Textarea';
9
10
  import ValidationMessage from "../ValidationMessage/ValidationMessage";
10
11
  import { getUniqueId } from '@zohodesk/components/es/Provider/IdProvider';
@@ -131,12 +132,11 @@ export default class TextareaField extends PureComponent {
131
132
  renderProps: renderLabelProps
132
133
  }, /*#__PURE__*/React.createElement(Label, {
133
134
  text: labelName,
134
- id: id,
135
- size: fieldSize === 'small' ? 'small' : 'medium',
136
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
137
- customClass: `${style.fieldLabel} ${labelCustomClass} ${isMandatory ? style.labelMandatory : ''}`,
135
+ isRequired: isMandatory,
136
+ customStyle: labelCustomClass,
137
+ testId: id,
138
138
  htmlFor: uniqueId,
139
- dataId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
139
+ customId: isDisabled ? `${dataId}_label_disabled` : isMandatory ? `${dataId}_label_mandatory` : `${dataId}_label`,
140
140
  ...LabelProps
141
141
  })), /*#__PURE__*/React.createElement("div", {
142
142
  className: `${style.fieldContainer} ${labelName ? style[`fieldMargin_${fieldSize}`] : ''}`
@@ -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
- const notificationData = this.getNotiifcationData();
116
- return /*#__PURE__*/React.createElement(GlobalNotificationUI, { ...notificationData,
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,
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _CheckBox = _interopRequireDefault(require("@zohodesk/components/es/CheckBox/CheckBox"));
19
19
 
@@ -140,15 +140,11 @@ var CheckBoxField = /*#__PURE__*/function (_PureComponent) {
140
140
  renderProps: renderLabelProps
141
141
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
142
142
  text: labelName,
143
- id: id,
144
- size: fieldSize === 'small' ? 'small' : 'medium',
145
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
146
- infoText: infoText,
147
- customClass: "".concat(!isDirectCol ? _FieldsModule["default"].checkboxText : '', " ").concat(!isDirectCol ? _FieldsModule["default"]["lineClamp_".concat(lineClamp)] : '', " ").concat(isReadOnly || isDisabled ? _FieldsModule["default"].cbTextReadonly : _FieldsModule["default"].cbTextPointer, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
148
- title: labelName,
149
- onClick: !removeEvent ? this.handleLabelClick : null,
150
- variant: isDirectCol ? 'default' : 'primary',
151
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
143
+ isRequired: isMandatory,
144
+ customStyle: labelCustomClass,
145
+ testId: id,
146
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
147
+ onClick: !removeEvent ? this.handleLabelClick : null
152
148
  }, LabelProps)));
153
149
 
154
150
  return /*#__PURE__*/_react["default"].createElement("div", {
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _TextBoxIcon = _interopRequireDefault(require("@zohodesk/components/es/TextBoxIcon/TextBoxIcon"));
19
19
 
@@ -178,11 +178,10 @@ var CurrencyField = /*#__PURE__*/function (_PureComponent) {
178
178
  renderProps: renderLabelProps
179
179
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
180
180
  text: labelName,
181
- size: fieldSize === 'small' ? 'small' : 'medium',
182
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
183
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
181
+ isRequired: isMandatory,
182
+ customStyle: labelCustomClass,
184
183
  htmlFor: uniqueId,
185
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
184
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
186
185
  }, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
187
186
  className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
188
187
  }, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], _extends({
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _DateWidget = _interopRequireDefault(require("@zohodesk/components/es/DateTime/DateWidget"));
19
19
 
@@ -185,15 +185,12 @@ var DateField = /*#__PURE__*/function (_PureComponent) {
185
185
  renderProps: renderLabelProps
186
186
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
187
187
  text: labelName,
188
+ isRequired: isMandatory,
189
+ customStyle: labelCustomClass,
188
190
  htmlFor: getAriaId,
189
- size: fieldSize === 'small' ? 'small' : 'medium',
190
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
191
- onClick: isDisabled || isReadOnly ? null : this.handleLabelClick,
192
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
193
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
194
- }, LabelProps, {
195
- id: labelName
196
- }))), /*#__PURE__*/_react["default"].createElement("div", {
191
+ testId: labelName,
192
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
193
+ }, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
197
194
  className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
198
195
  }, isLocked && lockedValueText ? /*#__PURE__*/_react["default"].createElement("div", {
199
196
  className: _FieldsModule["default"].lockText
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _MultiSelect = _interopRequireDefault(require("@zohodesk/components/es/MultiSelect/MultiSelect"));
19
19
 
@@ -198,13 +198,11 @@ var MultiSelectField = /*#__PURE__*/function (_PureComponent) {
198
198
  renderProps: renderLabelProps
199
199
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
200
200
  text: labelName,
201
- id: id,
202
- size: fieldSize === 'small' ? 'small' : 'medium',
203
- palette: isDarkPalette ? 'dark' : isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette // onClick={this.handleLabelClick}
201
+ isRequired: isMandatory // customStyle={style.fieldLabel}
204
202
  ,
205
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
206
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
207
- htmlFor: uniqueId
203
+ htmlFor: uniqueId,
204
+ testId: id,
205
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
208
206
  }, LabelProps))), /*#__PURE__*/_react["default"].createElement(_MultiSelect["default"], _extends({
209
207
  options: options,
210
208
  onChange: this.handleChange,
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _Select = _interopRequireDefault(require("@zohodesk/components/es/Select/Select"));
19
19
 
@@ -166,13 +166,11 @@ var SelectField = /*#__PURE__*/function (_PureComponent) {
166
166
  renderProps: renderLabelProps
167
167
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
168
168
  text: labelName,
169
- size: fieldSize === 'small' ? 'small' : 'medium',
170
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
171
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
172
- htmlFor: uniqueId,
173
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
169
+ isRequired: isMandatory,
170
+ htmlFor: uniqueId
174
171
  }, LabelProps, {
175
- id: uniqueId
172
+ testId: uniqueId,
173
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
176
174
  }))), /*#__PURE__*/_react["default"].createElement("div", {
177
175
  className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '', " ").concat(fieldClass ? fieldClass : '')
178
176
  }, /*#__PURE__*/_react["default"].createElement(_Select["default"], _extends({
@@ -15,7 +15,7 @@ var _propTypes = require("./props/propTypes");
15
15
 
16
16
  var _Layout = require("@zohodesk/components/es/Layout");
17
17
 
18
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
18
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
19
19
 
20
20
  var _Popup = _interopRequireDefault(require("@zohodesk/components/es/Popup/Popup"));
21
21
 
@@ -247,13 +247,10 @@ var TagsMultiSelectField = function TagsMultiSelectField(props) {
247
247
  }
248
248
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
249
249
  text: labelName,
250
- title: labelName,
251
- id: id,
252
- size: labelSize,
253
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
254
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : '', " ").concat(labelClass ? labelClass : ''),
255
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label"),
256
- htmlFor: htmlId
250
+ isRequired: isMandatory,
251
+ htmlFor: htmlId,
252
+ testId: id,
253
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
257
254
  }, LabelProps)), selectedValueCount ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
258
255
  dataId: "".concat(dataId, "_tagCount"),
259
256
  className: _TagsMultiSelectFieldModule["default"].count
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _TextBoxIcon = _interopRequireDefault(require("@zohodesk/components/es/TextBoxIcon/TextBoxIcon"));
19
19
 
@@ -156,14 +156,12 @@ var TextBoxField = /*#__PURE__*/function (_PureComponent) {
156
156
  renderProps: renderLabelProps
157
157
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
158
158
  text: labelName,
159
- size: fieldSize === 'small' ? 'small' : 'medium',
160
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
161
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
159
+ isRequired: isMandatory,
160
+ customStyle: labelCustomClass,
161
+ testId: labelName,
162
162
  htmlFor: uniqueId,
163
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
164
- }, LabelProps, {
165
- id: labelName
166
- }))), /*#__PURE__*/_react["default"].createElement("div", {
163
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
164
+ }, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
167
165
  className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
168
166
  }, /*#__PURE__*/_react["default"].createElement(_TextBoxIcon["default"], _extends({
169
167
  htmlId: uniqueId,
@@ -13,7 +13,7 @@ var _defaultProps = require("./props/defaultProps");
13
13
 
14
14
  var _propTypes = require("./props/propTypes");
15
15
 
16
- var _Label = _interopRequireDefault(require("@zohodesk/components/es/Label/Label"));
16
+ var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
17
17
 
18
18
  var _Textarea = _interopRequireDefault(require("@zohodesk/components/es/Textarea/Textarea"));
19
19
 
@@ -185,12 +185,11 @@ var TextareaField = /*#__PURE__*/function (_PureComponent) {
185
185
  renderProps: renderLabelProps
186
186
  }, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
187
187
  text: labelName,
188
- id: id,
189
- size: fieldSize === 'small' ? 'small' : 'medium',
190
- palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
191
- customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
188
+ isRequired: isMandatory,
189
+ customStyle: labelCustomClass,
190
+ testId: id,
192
191
  htmlFor: uniqueId,
193
- dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
192
+ customId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
194
193
  }, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
195
194
  className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
196
195
  }, !renderRightPlaceholderNode ? textAreaContent : /*#__PURE__*/_react["default"].createElement("div", {
@@ -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$props4 = this.props,
167
- hideMessage = _this$props4.hideMessage,
168
- onClick = _this$props4.onClick,
169
- _this$props4$i18nKeys = _this$props4.i18nKeys,
170
- i18nKeys = _this$props4$i18nKeys === void 0 ? {} : _this$props4$i18nKeys,
171
- customProps = _this$props4.customProps,
172
- dataSelectorId = _this$props4.dataSelectorId,
173
- needShadow = _this$props4.needShadow,
174
- shadowCount = _this$props4.shadowCount,
175
- eleRef = _this$props4.eleRef;
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
- var notificationData = this.getNotiifcationData();
180
- return /*#__PURE__*/_react["default"].createElement(GlobalNotificationUI, _extends({}, notificationData, {
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-220",
3
+ "version": "1.0.0-temp-221",
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 downloadOnly && npm run css:review && npm run review:props",
42
+ "prepublishOnly": "node prePublish.js && npm run downloadOnly",
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",
@@ -78,12 +78,12 @@
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.0.0-temp-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.0-temp-1.3",
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.0.0-temp-1",
98
+ "@zohodesk/utils": "1.3.15",
99
99
  "@zohodesk/a11y": "2.3.8",
100
100
  "@zohodesk/layout": "3.1.0"
101
101
  }
@@ -1,6 +0,0 @@
1
- export const STATUS = {
2
- MOUNTED: 'mounted',
3
- UNMOUNTED: 'unmounted',
4
- UPDATED: 'updated',
5
- DISMISSING: 'dismissing'
6
- };
@@ -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;