@zohodesk/dot 1.7.26 → 1.8.2

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 (74) hide show
  1. package/README.md +9 -0
  2. package/es/ActionButton/ActionButton.module.css +1 -1
  3. package/es/AlphabeticList/AlphabeticList.module.css +1 -1
  4. package/es/AudioPlayer/AudioPlayer.module.css +1 -1
  5. package/es/DotProvider/hooks/useDotProvider.js +1 -0
  6. package/es/Drawer/Drawer.module.css +1 -1
  7. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
  8. package/es/emptystate/EditionPage/EditionPage.css +2 -2
  9. package/es/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
  10. package/es/form/fields/CurrencyField/__tests__/__snapshots__/CurrencyField.spec.js.snap +1 -6
  11. package/es/form/fields/DateField/__tests__/__snapshots__/DateField.spec.js.snap +1 -6
  12. package/es/form/fields/MultiSelectField/__tests__/__snapshots__/MultiSelectField.spec.js.snap +1 -3
  13. package/es/form/fields/PhoneField/__tests__/__snapshots__/PhoneField.spec.js.snap +1 -6
  14. package/es/form/fields/SelectField/__tests__/__snapshots__/SelectField.spec.js.snap +1 -6
  15. package/es/form/fields/TagsMultiSelect/__tests__/__snapshots__/TagsMultiSelect.spec.js.snap +1 -3
  16. package/es/form/fields/TagsMultiSelectField/__tests__/__snapshots__/TagsMultiSelectField.spec.js.snap +1 -3
  17. package/es/form/fields/TextBoxField/__tests__/__snapshots__/TextBoxField.spec.js.snap +1 -6
  18. package/es/form/fields/TextEditor/TextEditor.js +2 -1
  19. package/es/form/fields/TextEditor/TextEditor.module.css +2 -2
  20. package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +1 -1
  21. package/es/list/SecondaryText/SecondaryText.module.css +6 -6
  22. package/es/list/Subject/Subject.module.css +3 -3
  23. package/es/lookup/EmptyPage/LookupEmptyPage.module.css +4 -2
  24. package/es/lookup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +6 -18
  25. package/es/lookup/header/Title/LookupTitle.module.css +7 -3
  26. package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +13 -2
  27. package/es/setup/header/Search/Search.module.css +1 -1
  28. package/es/v1/form/fields/TextEditor/TextEditor.js +2 -1
  29. package/es/version2/GlobalNotification/GlobalNotification.js +46 -7
  30. package/es/version2/GlobalNotification/GlobalNotification.module.css +3 -2
  31. package/es/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +9 -0
  32. package/es/version2/GlobalNotification/props/propTypes.js +4 -3
  33. package/es/version2/GlobalNotification/utils/constants.js +6 -0
  34. package/es/version2/errorstate/V2_ErrorStates.module.css +1 -1
  35. package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +9 -3
  36. package/es/version2/lookup/alertLookupCommonNew.module.css +1 -1
  37. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +4 -3
  38. package/lib/ActionButton/ActionButton.module.css +1 -1
  39. package/lib/AlphabeticList/AlphabeticList.module.css +1 -1
  40. package/lib/AudioPlayer/AudioPlayer.module.css +1 -1
  41. package/lib/DotProvider/hooks/useDotProvider.js +2 -0
  42. package/lib/Drawer/Drawer.module.css +1 -1
  43. package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +1 -1
  44. package/lib/emptystate/EditionPage/EditionPage.css +2 -2
  45. package/lib/errorstate/PermissionPlay/PermissionPlay.module.css +1 -1
  46. package/lib/form/fields/CurrencyField/__tests__/__snapshots__/CurrencyField.spec.js.snap +1 -6
  47. package/lib/form/fields/DateField/__tests__/__snapshots__/DateField.spec.js.snap +1 -6
  48. package/lib/form/fields/MultiSelectField/__tests__/__snapshots__/MultiSelectField.spec.js.snap +1 -3
  49. package/lib/form/fields/PhoneField/__tests__/__snapshots__/PhoneField.spec.js.snap +1 -6
  50. package/lib/form/fields/SelectField/__tests__/__snapshots__/SelectField.spec.js.snap +1 -6
  51. package/lib/form/fields/TagsMultiSelect/__tests__/__snapshots__/TagsMultiSelect.spec.js.snap +1 -3
  52. package/lib/form/fields/TagsMultiSelectField/__tests__/__snapshots__/TagsMultiSelectField.spec.js.snap +1 -3
  53. package/lib/form/fields/TextBoxField/__tests__/__snapshots__/TextBoxField.spec.js.snap +1 -6
  54. package/lib/form/fields/TextEditor/TextEditor.js +1 -1
  55. package/lib/form/fields/TextEditor/TextEditor.module.css +2 -2
  56. package/lib/layout/SetupDetailLayout/SetupDetailLayout.module.css +1 -1
  57. package/lib/list/SecondaryText/SecondaryText.module.css +6 -6
  58. package/lib/list/Subject/Subject.module.css +3 -3
  59. package/lib/lookup/EmptyPage/LookupEmptyPage.module.css +4 -2
  60. package/lib/lookup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +6 -18
  61. package/lib/lookup/header/Title/LookupTitle.module.css +7 -3
  62. package/lib/lookup/header/ViewDropDown/ViewDropDown.module.css +13 -2
  63. package/lib/setup/header/Search/Search.module.css +1 -1
  64. package/lib/v1/form/fields/TextEditor/TextEditor.js +1 -1
  65. package/lib/version2/GlobalNotification/GlobalNotification.js +68 -18
  66. package/lib/version2/GlobalNotification/GlobalNotification.module.css +3 -2
  67. package/lib/version2/GlobalNotification/__tests__/GlobalNotification.spec.js +10 -0
  68. package/lib/version2/GlobalNotification/props/propTypes.js +4 -3
  69. package/lib/version2/GlobalNotification/utils/constants.js +13 -0
  70. package/lib/version2/errorstate/V2_ErrorStates.module.css +1 -1
  71. package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +9 -3
  72. package/lib/version2/lookup/alertLookupCommonNew.module.css +1 -1
  73. package/lib/version2/notification/DesktopNotification/DesktopNotification.module.css +4 -3
  74. package/package.json +12 -12
@@ -18,10 +18,8 @@ exports[`Search rendering the customized style search 1`] = `
18
18
  data-test-id="boxComponent"
19
19
  >
20
20
  <div
21
- class="container effect flex rowdir"
22
- data-id="containerComponent"
21
+ class="varClass customContainer effect container flex rowdir"
23
22
  data-selector-id="textBoxIcon"
24
- data-test-id="containerComponent"
25
23
  >
26
24
  <div
27
25
  class="grow basis shrinkOff"
@@ -77,10 +75,8 @@ exports[`Search rendering the defult props 1`] = `
77
75
  data-test-id="boxComponent"
78
76
  >
79
77
  <div
80
- class="container effect flex rowdir"
81
- data-id="containerComponent"
78
+ class="varClass customContainer effect container flex rowdir"
82
79
  data-selector-id="textBoxIcon"
83
- data-test-id="containerComponent"
84
80
  >
85
81
  <div
86
82
  class="grow basis shrinkOff"
@@ -136,10 +132,8 @@ exports[`Search rendering the prop hasSeparator is false 1`] = `
136
132
  data-test-id="boxComponent"
137
133
  >
138
134
  <div
139
- class="container effect flex rowdir"
140
- data-id="containerComponent"
135
+ class="varClass customContainer effect container flex rowdir"
141
136
  data-selector-id="textBoxIcon"
142
- data-test-id="containerComponent"
143
137
  >
144
138
  <div
145
139
  class="grow basis shrinkOff"
@@ -198,10 +192,8 @@ exports[`Search rendering the prop hasSeparator is true 1`] = `
198
192
  data-test-id="boxComponent"
199
193
  >
200
194
  <div
201
- class="container effect flex rowdir"
202
- data-id="containerComponent"
195
+ class="varClass customContainer effect container flex rowdir"
203
196
  data-selector-id="textBoxIcon"
204
- data-test-id="containerComponent"
205
197
  >
206
198
  <div
207
199
  class="grow basis shrinkOff"
@@ -270,10 +262,8 @@ exports[`Search rendering the renderChildren props via function 1`] = `
270
262
  data-test-id="boxComponent"
271
263
  >
272
264
  <div
273
- class="container effect flex rowdir"
274
- data-id="containerComponent"
265
+ class="varClass customContainer effect container flex rowdir"
275
266
  data-selector-id="textBoxIcon"
276
- data-test-id="containerComponent"
277
267
  >
278
268
  <div
279
269
  class="grow basis shrinkOff"
@@ -331,10 +321,8 @@ exports[`Search rendering the search active 1`] = `
331
321
  data-test-id="boxComponent"
332
322
  >
333
323
  <div
334
- class="container effect effectFocused flex rowdir"
335
- data-id="containerComponent"
324
+ class="varClass customContainer effect active container flex rowdir"
336
325
  data-selector-id="textBoxIcon"
337
- data-test-id="containerComponent"
338
326
  >
339
327
  <div
340
328
  class="grow basis shrinkOff"
@@ -1,21 +1,25 @@
1
1
  .title {
2
2
  font-size: var(--zd_font_size16) ;
3
- font-family: var(--zd_semibold);
3
+ font-weight: var(--zd-fw-semibold);
4
4
  composes: ftsmooth from '~@zohodesk/components/es/common/common.module.css';
5
5
  vertical-align: middle;
6
6
  word-break: break-all;
7
7
  cursor: initial;
8
8
  }
9
+
9
10
  .bold {
10
- font-family: var(--zd_semibold);
11
+ font-weight: var(--zd-fw-semibold);
11
12
  }
13
+
12
14
  /* Palette */
13
15
  .default {
14
16
  color: var(--zdt_lookuptitle_default_text);
15
17
  }
18
+
16
19
  .primary {
17
20
  color: var(--zdt_lookuptitle_primary_text);
18
21
  }
22
+
19
23
  .danger {
20
24
  color: var(--zdt_lookuptitle_danger_text);
21
- }
25
+ }
@@ -1,28 +1,35 @@
1
1
  .small {
2
2
  max-height: var(--zd_size200) ;
3
3
  }
4
+
4
5
  .medium {
5
6
  max-height: var(--zd_size348) ;
6
7
  }
8
+
7
9
  .large {
8
10
  max-height: var(--zd_size400) ;
9
11
  }
12
+
10
13
  .emptyState {
11
14
  font-size: var(--zd_font_size14) ;
12
15
  color: var(--zdt_viewdropdown_empty_text);
13
- font-family: var(--zd_semibold);
16
+ font-weight: var(--zd-fw-semibold);
14
17
  composes: ftsmooth from '~@zohodesk/components/es/common/common.module.css';
15
18
  padding: var(--zd_size12) var(--zd_size15) ;
16
19
  }
20
+
17
21
  .hide {
18
22
  composes: vishidden from '~@zohodesk/components/es/common/common.module.css';
19
23
  }
24
+
20
25
  .container {
21
26
  position: relative;
22
27
  }
28
+
23
29
  .listItemContainer {
24
30
  padding: var(--zd_size10) 0 ;
25
31
  }
32
+
26
33
  /* Label Style */
27
34
  .labelCnt {
28
35
  composes: dInflex alignVertical from '~@zohodesk/components/es/common/common.module.css';
@@ -30,21 +37,25 @@
30
37
  color: var(--zdt_viewdropdown_label_text);
31
38
  cursor: pointer;
32
39
  }
40
+
33
41
  .labelText {
34
42
  font-size: var(--zd_font_size12) ;
35
43
  max-width: var(--zd_size180) ;
36
44
  composes: dotted from '~@zohodesk/components/es/common/common.module.css';
37
45
  }
46
+
38
47
  [dir=ltr] .labelText {
39
48
  margin-right: var(--zd_size5) ;
40
49
  }
50
+
41
51
  [dir=rtl] .labelText {
42
52
  margin-left: var(--zd_size5) ;
43
53
  }
54
+
44
55
  .labelCnt:hover .arrowIcon {
45
56
  color: var(--zdt_viewdropdown_hover_label_text);
46
57
  }
47
58
 
48
59
  .loader {
49
60
  padding: var(--zd_size12) var(--zd_size15) ;
50
- }
61
+ }
@@ -38,7 +38,7 @@
38
38
  letter-spacing: 0.2px;
39
39
  transition: all var(--zd_transition3) ease;
40
40
  color: var(--zdt_search_input_text);
41
- font-family: var(--zd_regular);
41
+ font-weight: var(--zd-fw-normal);
42
42
  -webkit-appearance: none;
43
43
  -moz-appearance: none;
44
44
  appearance: none;
@@ -290,7 +290,7 @@ var TextEditor = /*#__PURE__*/function (_Component) {
290
290
  var customStyleTag = document.createElement('style');
291
291
  customStyleTag.type = 'text/css';
292
292
  var customizedCSS = "pre {white-space: pre-wrap} ".concat(customCSS);
293
- var fontCSS = "@font-face {font-family: 'ZohoPuviRegular';src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Regular.woff2') format('woff2');font-style: normal;font-weight: normal;text-rendering: optimizeLegibility;font-display: swap}@font-face {font-family: Regular;src: url('https://static.zohocdn.com/webfonts/lato2regular/font.woff2') format('woff2');font-weight: 400;font-style: normal;font-display: swap}@font-face {font-family: 'RobotoRegular';font-weight: 400;font-style: normal;font-display: swa;src: url('https://static.zohocdn.com/webfonts/robotoregular/font.woff2')}";
293
+ var fontCSS = "@font-face {font-family: 'ZohoPuviRegular';src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Regular.woff2') format('woff2');font-style: normal;font-weight: 400;text-rendering: optimizeLegibility;font-display: swap}@font-face {font-family: Regular;src: url('https://static.zohocdn.com/webfonts/lato2regular/font.woff2') format('woff2');font-weight: 400;font-style: normal;font-display: swap}@font-face {font-family: 'RobotoRegular';font-weight: 400;font-style: normal;font-display: swap;src: url('https://static.zohocdn.com/webfonts/robotoregular/font.woff2')}\n @font-face {font-family: 'ZohoPuvi';src: url('https://static.zohocdn.com/zohofonts/zohopuvi/4.0/Zoho_Puvi_Regular.woff2') format('woff2');font-style: normal;font-weight: 400;text-rendering: optimizeLegibility;font-display: swap}@font-face {font-family: ZDLato;src: url('https://static.zohocdn.com/webfonts/lato2regular/font.woff2') format('woff2');font-weight: 400;font-style: normal;font-display: swap}@font-face {font-family: 'Roboto';font-weight: 400;font-style: normal;font-display: swap;src: url('https://static.zohocdn.com/webfonts/robotoregular/font.woff2')}";
294
294
  customStyleTag.textContent = "".concat(customizedCSS, " ").concat(fontCSS);
295
295
  iframeHead.appendChild(customStyleTag);
296
296
  }
@@ -27,10 +27,20 @@ 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("@zohodesk/utils/es/getCurrentTime"));
31
+
32
+ var _constants = require("./utils/constants");
33
+
30
34
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
31
35
 
32
36
  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); }
33
37
 
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
+
34
44
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
35
45
 
36
46
  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); } }
@@ -67,30 +77,61 @@ var GlobalNotification = /*#__PURE__*/function (_React$Component) {
67
77
  shadowClose: true
68
78
  };
69
79
  _this.onClose = _this.onClose.bind(_assertThisInitialized(_this));
80
+ _this.getNotificationData = _this.getNotificationData.bind(_assertThisInitialized(_this));
81
+ _this.handleStatusChange = _this.handleStatusChange.bind(_assertThisInitialized(_this));
70
82
  return _this;
71
83
  }
72
84
 
73
85
  _createClass(GlobalNotification, [{
74
86
  key: "componentDidMount",
75
87
  value: function componentDidMount() {
88
+ var _this2 = this;
89
+
76
90
  var _this$props = this.props,
77
91
  hideMessage = _this$props.hideMessage,
78
92
  hideTime = _this$props.hideTime,
79
93
  id = _this$props.id,
80
94
  needAutoClose = _this$props.needAutoClose;
95
+ this.handleStatusChange(_constants.STATUS.MOUNTED);
81
96
 
82
97
  if (needAutoClose) {
83
98
  this.hideMessageTimer = setTimeout(function () {
84
99
  hideMessage(id);
100
+
101
+ _this2.handleStatusChange(_constants.STATUS.DISMISSING);
85
102
  }, hideTime);
86
103
  }
87
104
  }
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
+ }
88
112
  }, {
89
113
  key: "componentWillUnmount",
90
114
  value: function componentWillUnmount() {
91
115
  if (this.hideMessageTimer) {
92
116
  clearTimeout(this.hideMessageTimer);
93
117
  }
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.getNotificationData();
128
+ var currentTime = (0, _getCurrentTime["default"])();
129
+ onStatusChange(_objectSpread(_objectSpread({
130
+ status: status
131
+ }, notificationData), {}, {
132
+ time: currentTime
133
+ }));
134
+ }
94
135
  }
95
136
  }, {
96
137
  key: "onClose",
@@ -102,42 +143,51 @@ var GlobalNotification = /*#__PURE__*/function (_React$Component) {
102
143
  this.setState({
103
144
  shadowClose: false
104
145
  });
146
+ this.handleStatusChange(_constants.STATUS.DISMISSING);
105
147
  hideMessage && hideMessage(id);
106
148
  onClose && onClose(e);
107
149
  }
108
150
  }, {
109
- key: "render",
110
- value: function render() {
151
+ key: "getNotificationData",
152
+ value: function getNotificationData() {
111
153
  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
154
  id = _this$props3.id,
121
- needShadow = _this$props3.needShadow,
122
- shadowCount = _this$props3.shadowCount,
123
- eleRef = _this$props3.eleRef;
155
+ type = _this$props3.type,
156
+ message = _this$props3.message;
157
+ return {
158
+ id: id,
159
+ type: type,
160
+ message: message
161
+ };
162
+ }
163
+ }, {
164
+ key: "render",
165
+ 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;
124
176
  var shadowClose = this.state.shadowClose;
125
177
  var _i18nKeys$closeTitle = i18nKeys.closeTitle,
126
178
  closeTitle = _i18nKeys$closeTitle === void 0 ? 'Close' : _i18nKeys$closeTitle;
127
- return /*#__PURE__*/_react["default"].createElement(GlobalNotificationUI, {
128
- type: type,
129
- message: message,
179
+ var notificationData = this.getNotificationData();
180
+ return /*#__PURE__*/_react["default"].createElement(GlobalNotificationUI, _extends({}, notificationData, {
130
181
  hideMessage: hideMessage,
131
182
  onClick: onClick,
132
183
  closeTitle: closeTitle,
133
184
  customProps: customProps,
134
185
  dataSelectorId: dataSelectorId,
135
- id: id,
136
186
  shadowCount: shadowCount,
137
187
  onClose: this.onClose,
138
188
  needShadow: shadowClose && needShadow,
139
189
  eleRef: eleRef
140
- });
190
+ }));
141
191
  }
142
192
  }]);
143
193
 
@@ -126,7 +126,8 @@
126
126
  --globalnotification_text_color: var(--zdt_globalnotification_info_text);
127
127
  }
128
128
 
129
- .danger,.error {
129
+ .danger,
130
+ .error {
130
131
  --commonalert_border_color: var(--zdt_commonalert_danger_border);
131
132
  --globalnotification_bg_color: var(--zdt_globalnotification_danger_bg);
132
133
  --globalnotification_text_color: var(--zdt_globalnotification_danger_text);
@@ -148,7 +149,7 @@
148
149
 
149
150
  .text {
150
151
  font-size: var(--zd_font_size14) ;
151
- font-family: var(--zd_semibold);
152
+ font-weight: var(--zd-fw-semibold);
152
153
  composes: ftsmooth from '~@zohodesk/components/es/common/common.module.css';
153
154
  line-height: 1.4286;
154
155
  overflow: hidden;
@@ -6,6 +6,8 @@ var _react2 = require("@testing-library/react");
6
6
 
7
7
  var _GlobalNotification = _interopRequireDefault(require("../GlobalNotification"));
8
8
 
9
+ var _constants = require("../utils/constants");
10
+
9
11
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
10
12
 
11
13
  describe('GlobalNotification', function () {
@@ -15,4 +17,12 @@ describe('GlobalNotification', function () {
15
17
 
16
18
  expect(asFragment()).toMatchSnapshot();
17
19
  });
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
+ });
18
28
  });
@@ -20,12 +20,13 @@ var propTypes = {
20
20
  customProps: _propTypes["default"].shape({
21
21
  ExtraProps: _propTypes["default"].object
22
22
  }),
23
- id: _propTypes["default"].number,
23
+ id: _propTypes["default"].string,
24
24
  hideTime: _propTypes["default"].number,
25
25
  needAutoClose: _propTypes["default"].bool,
26
26
  isCollapseView: _propTypes["default"].bool,
27
27
  shadowCount: _propTypes["default"].number,
28
- needShadow: _propTypes["default"].bool
28
+ needShadow: _propTypes["default"].bool,
29
+ onStatusChange: _propTypes["default"].func
29
30
  };
30
31
  exports.propTypes = propTypes;
31
32
  var UI_propTypes = {
@@ -39,7 +40,7 @@ var UI_propTypes = {
39
40
  }),
40
41
  needShadow: _propTypes["default"].bool,
41
42
  shadowCount: _propTypes["default"].number,
42
- id: _propTypes["default"].number,
43
+ id: _propTypes["default"].string,
43
44
  onClose: _propTypes["default"].func
44
45
  };
45
46
  exports.UI_propTypes = UI_propTypes;
@@ -0,0 +1,13 @@
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;
@@ -5,7 +5,7 @@
5
5
  margin-top: var(--zd_size15) ;
6
6
  }
7
7
  .title {
8
- font-family: var(--zd_bold);
8
+ font-weight: var(--zd-fw-bold);
9
9
  }
10
10
  .desc {
11
11
  line-height: 1.5714;
@@ -1,6 +1,7 @@
1
1
  .varClass {
2
2
  --commonalert_border_color: var(--zdt_commonalert_default_border);
3
3
  }
4
+
4
5
  .container {
5
6
  composes: varClass;
6
7
  position: relative;
@@ -9,12 +10,15 @@
9
10
  border-color: var(--commonalert_border_color);
10
11
  border-width: 2px 0 0 0;
11
12
  }
13
+
12
14
  .headerLayout {
13
15
  min-height: var(--zd_size54) ;
14
16
  }
17
+
15
18
  [dir=ltr] .headerLayout {
16
19
  padding: var(--zd_size15) var(--zd_size45) 0 var(--zd_size20) ;
17
20
  }
21
+
18
22
  [dir=rtl] .headerLayout {
19
23
  padding: var(--zd_size15) var(--zd_size20) 0 var(--zd_size45) ;
20
24
  }
@@ -23,11 +27,13 @@
23
27
  --commonalert_border_color: var(--zdt_commonalert_success_border);
24
28
  }
25
29
 
26
- .info,.notification {
30
+ .info,
31
+ .notification {
27
32
  --commonalert_border_color: var(--zdt_commonalert_info_border);
28
33
  }
29
34
 
30
- .danger,.error {
35
+ .danger,
36
+ .error {
31
37
  --commonalert_border_color: var(--zdt_commonalert_danger_border);
32
38
  }
33
39
 
@@ -52,7 +58,7 @@
52
58
  color: var(--zdt_alertlookupnew_text);
53
59
  font-size: var(--zd_font_size18) ;
54
60
  line-height: 1.2222;
55
- font-family: var(--zd_bold);
61
+ font-weight: var(--zd-fw-bold);
56
62
  composes: ftsmooth wbreak from '~@zohodesk/components/es/common/common.module.css';
57
63
  vertical-align: middle;
58
64
  cursor: default;
@@ -14,7 +14,7 @@
14
14
 
15
15
  .noteTitle {
16
16
  font-size: var(--zd_font_size13) ;
17
- font-family: var(--zd_semibold);
17
+ font-weight: var(--zd-fw-semibold);
18
18
  composes: ftsmooth from '~@zohodesk/components/es/common/common.module.css';
19
19
  }
20
20
 
@@ -36,7 +36,8 @@
36
36
  .large {
37
37
  width: var(--zd_size580) ;
38
38
  }
39
- .tapWidth{
39
+
40
+ .tapWidth {
40
41
  max-width: 100% ;
41
42
  min-width: 100% ;
42
43
  }
@@ -109,7 +110,7 @@
109
110
  .subTitle {
110
111
  font-size: var(--zd_font_size15) ;
111
112
  line-height: 1.3333;
112
- font-family: var(--zd_semibold);
113
+ font-weight: var(--zd-fw-semibold);
113
114
  composes: ftsmooth wbreak from '~@zohodesk/components/es/common/common.module.css';
114
115
  }
115
116
 
@@ -130,4 +131,4 @@
130
131
  .footer {
131
132
  overflow: hidden;
132
133
  border-radius: 0 0 var(--zd_size10) var(--zd_size10);
133
- }
134
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zohodesk/dot",
3
- "version": "1.7.26",
3
+ "version": "1.8.2",
4
4
  "main": "lib/index",
5
5
  "module": "es/index.js",
6
6
  "private": false,
@@ -73,29 +73,29 @@
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": "1.4.21",
76
+ "@zohodesk/components": "1.5.2",
77
77
  "@zohodesk/hooks": "2.0.6",
78
- "@zohodesk/icons": "1.1.1",
78
+ "@zohodesk/icons": "1.1.4",
79
79
  "@zohodesk/layout": "^3.1.0",
80
- "@zohodesk/svg": "1.2.2",
81
- "@zohodesk/utils": "1.3.15",
82
- "@zohodesk/variables": "1.1.0",
80
+ "@zohodesk/svg": "1.2.5",
81
+ "@zohodesk/utils": "1.3.16",
82
+ "@zohodesk/variables": "1.2.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.3",
86
+ "@zohodesk/dotkit": "1.0.4",
87
87
  "@zohodesk/react-cli": "1.1.27"
88
88
  },
89
89
  "peerDependencies": {
90
90
  "velocity-react": "1.4.3",
91
- "@zohodesk/variables": "1.1.0",
92
- "@zohodesk/components": "1.4.21",
93
- "@zohodesk/icons": "1.1.1",
94
- "@zohodesk/svg": "1.2.2",
91
+ "@zohodesk/variables": "1.2.0",
92
+ "@zohodesk/components": "1.5.2",
93
+ "@zohodesk/icons": "1.1.4",
94
+ "@zohodesk/svg": "1.2.5",
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.3.15",
98
+ "@zohodesk/utils": "1.3.16",
99
99
  "@zohodesk/a11y": "2.3.8",
100
100
  "@zohodesk/layout": "3.1.0"
101
101
  }