@zohodesk/dot 1.9.12 → 1.9.13

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 (58) hide show
  1. package/README.md +14 -0
  2. package/es/ActionButton/__tests__/ActionButton.spec.js +4 -5
  3. package/es/AttachmentViewer/AttachmentImage.js +3 -1
  4. package/es/AttachmentViewer/AttachmentViewer.js +340 -273
  5. package/es/AttachmentViewer/AttachmentViewer.module.css +8 -15
  6. package/es/AttachmentViewer/__tests__/AttachmentViewer.spec.js +104 -100
  7. package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
  8. package/es/AttachmentViewer/props/defaultProps.js +4 -2
  9. package/es/AttachmentViewer/props/propTypes.js +9 -2
  10. package/es/AttachmentViewer/utils.js +6 -7
  11. package/es/AudioPlayer/utils/utils.js +2 -5
  12. package/es/DotProvider/hooks/useDotProvider.js +14 -15
  13. package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +12 -13
  14. package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +3 -4
  15. package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +4 -5
  16. package/es/DotProvider/utils/errorValidation.js +5 -6
  17. package/es/DotProvider/utils/getAssetsImportPromises.js +4 -5
  18. package/es/Drawer/Drawer.js +6 -8
  19. package/es/FreezeLayer/css/cssJSLogic.js +4 -5
  20. package/es/Hooks/Dragger/useDragger.js +5 -6
  21. package/es/Hooks/Dragger/utils/DraggerUtil.js +7 -8
  22. package/es/Hooks/useFreezeLayer.js +4 -5
  23. package/es/Link/Link.js +4 -3
  24. package/es/Link/props/propTypes.js +1 -0
  25. package/es/Onboarding/CarouselDots/CarouselDots.js +29 -32
  26. package/es/Onboarding/Onboarding.js +23 -24
  27. package/es/Onboarding/hooks/useOnboarding.js +4 -5
  28. package/es/Onboarding/hooks/useOnboardingSlider.js +5 -6
  29. package/es/deprecated/SelectDropdown/SelectDropdown.js +43 -47
  30. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +214 -225
  31. package/es/errorstate/Inconvenience/Inconvenience.js +32 -36
  32. package/es/errorstate/NoRequestFound/NoRequestFound.js +32 -36
  33. package/es/errorstate/PermissionPlay/PermissionPlay.js +31 -35
  34. package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +32 -36
  35. package/es/errorstate/UnableToProcess/UnableToProcess.js +32 -36
  36. package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +32 -36
  37. package/es/errorstate/WillBack/WillBack.js +30 -34
  38. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +81 -85
  39. package/es/list/status/StatusDropdown/StatusDropdown.js +109 -113
  40. package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +3 -4
  41. package/es/lookup/header/Search/Search.js +4 -5
  42. package/es/lookup/header/Search/__tests__/Search.spec.js +3 -4
  43. package/es/lookup/header/ViewDropDown/ViewDropDown.js +67 -75
  44. package/es/utils/General.js +2 -7
  45. package/es/utils/editorUtils.js +1 -5
  46. package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +4 -5
  47. package/es/version2/notification/DesktopNotification/DesktopNotification.js +59 -63
  48. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +40 -44
  49. package/lib/AttachmentViewer/AttachmentImage.js +3 -1
  50. package/lib/AttachmentViewer/AttachmentViewer.js +158 -82
  51. package/lib/AttachmentViewer/AttachmentViewer.module.css +8 -15
  52. package/lib/AttachmentViewer/__tests__/AttachmentViewer.spec.js +100 -100
  53. package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
  54. package/lib/AttachmentViewer/props/defaultProps.js +6 -2
  55. package/lib/AttachmentViewer/props/propTypes.js +9 -2
  56. package/lib/Link/Link.js +4 -3
  57. package/lib/Link/props/propTypes.js +1 -0
  58. package/package.json +4 -4
@@ -113,10 +113,9 @@ export class StatusDropdown extends React.Component {
113
113
  }
114
114
  }
115
115
 
116
- responsiveFunc(_ref) {
117
- let {
118
- mediaQueryOR
119
- } = _ref;
116
+ responsiveFunc({
117
+ mediaQueryOR
118
+ }) {
120
119
  return {
121
120
  tabletMode: mediaQueryOR([{
122
121
  maxWidth: 700
@@ -234,118 +233,115 @@ export class StatusDropdown extends React.Component {
234
233
  }) : null), isPopupOpen && isEditable ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
235
234
  query: this.responsiveFunc,
236
235
  responsiveId: "Helmet"
237
- }, _ref2 => {
238
- let {
239
- tabletMode
240
- } = _ref2;
241
- return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
242
- boxPosition: position,
243
- isActive: isPopupReady,
244
- onClick: removeClose,
245
- size: boxSize,
246
- right: right,
247
- left: left,
248
- top: top,
249
- bottom: bottom,
250
- isArrow: isArrow,
251
- isAnimate: true,
252
- getRef: getContainerRef,
253
- customClass: {
254
- customDropBoxWrap: style.dropBoxContainer,
255
- customDropBox: dropBoxClass
256
- },
257
- needResponsive: needResponsive,
258
- isResponsivePadding: true,
259
- needFocusScope: true,
260
- onClose: this.handleTogglePopup,
261
- dataId: `${dataId}_dropbox`,
262
- isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
263
- isRestrictScroll: isRestrictScroll,
264
- positionsOffset: positionsOffset,
265
- targetOffset: targetOffset,
266
- customProps: {
267
- focusScopeProps: {
268
- loadNextOptions: getNextOptions,
269
- searchValue: searchString,
270
- isFetchingOptions: isFetchingOptions
271
- }
236
+ }, ({
237
+ tabletMode
238
+ }) => /*#__PURE__*/React.createElement(ResponsiveDropBox, {
239
+ boxPosition: position,
240
+ isActive: isPopupReady,
241
+ onClick: removeClose,
242
+ size: boxSize,
243
+ right: right,
244
+ left: left,
245
+ top: top,
246
+ bottom: bottom,
247
+ isArrow: isArrow,
248
+ isAnimate: true,
249
+ getRef: getContainerRef,
250
+ customClass: {
251
+ customDropBoxWrap: style.dropBoxContainer,
252
+ customDropBox: dropBoxClass
253
+ },
254
+ needResponsive: needResponsive,
255
+ isResponsivePadding: true,
256
+ needFocusScope: true,
257
+ onClose: this.handleTogglePopup,
258
+ dataId: `${dataId}_dropbox`,
259
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
260
+ isRestrictScroll: isRestrictScroll,
261
+ positionsOffset: positionsOffset,
262
+ targetOffset: targetOffset,
263
+ customProps: {
264
+ focusScopeProps: {
265
+ loadNextOptions: getNextOptions,
266
+ searchValue: searchString,
267
+ isFetchingOptions: isFetchingOptions
272
268
  }
273
- }, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
274
- className: style.search
275
- }, /*#__PURE__*/React.createElement(TextBoxIcon, {
276
- placeHolder: placeHolderText,
277
- onChange: this.handleChange,
278
- value: searchString,
279
- onClear: this.onSearchClear,
280
- size: searchBoxSize,
281
- customProps: {
282
- TextBoxProps: {
283
- 'data-a11y-autofocus': true
284
- }
285
- },
286
- a11y: {
287
- ariaHaspopup: isSearch ? 'listbox' : 'menu',
288
- ariaExpanded: isPopupReady,
289
- role: 'combobox',
290
- ariaActivedescendant: isPopupReady ? value : '',
291
- ariaOwns: ariaTitleId
292
- },
293
- dataId: `${dataId}_search`
294
- })) : null, title && options.length != 0 && /*#__PURE__*/React.createElement(Box, {
295
- className: style.title
296
- }, /*#__PURE__*/React.createElement(DropDownHeading, {
297
- htmlId: ariaTitleId,
298
- text: title,
269
+ }
270
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
271
+ className: style.search
272
+ }, /*#__PURE__*/React.createElement(TextBoxIcon, {
273
+ placeHolder: placeHolderText,
274
+ onChange: this.handleChange,
275
+ value: searchString,
276
+ onClear: this.onSearchClear,
277
+ size: searchBoxSize,
278
+ customProps: {
279
+ TextBoxProps: {
280
+ 'data-a11y-autofocus': true
281
+ }
282
+ },
283
+ a11y: {
284
+ ariaHaspopup: isSearch ? 'listbox' : 'menu',
285
+ ariaExpanded: isPopupReady,
286
+ role: 'combobox',
287
+ ariaActivedescendant: isPopupReady ? value : '',
288
+ ariaOwns: ariaTitleId
289
+ },
290
+ dataId: `${dataId}_search`
291
+ })) : null, title && options.length != 0 && /*#__PURE__*/React.createElement(Box, {
292
+ className: style.title
293
+ }, /*#__PURE__*/React.createElement(DropDownHeading, {
294
+ htmlId: ariaTitleId,
295
+ text: title,
296
+ a11y: {
297
+ role: 'heading'
298
+ }
299
+ })), /*#__PURE__*/React.createElement(Box, {
300
+ scroll: "vertical",
301
+ flexible: true,
302
+ shrink: true,
303
+ dataId: `${dataId}_list`,
304
+ preventParentScroll: "vertical",
305
+ className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
306
+ onScroll: this.handleScroll,
307
+ role: isSearch ? 'listbox' : 'menu',
308
+ tabindex: "-1",
309
+ isScrollAttribute: true
310
+ }, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => {
311
+ const listItemText = item[keyName];
312
+ const isActive = value === listItemText;
313
+ return /*#__PURE__*/React.createElement(StatusListItem, {
314
+ key: i,
315
+ dataId: `dataid_${i}`,
316
+ value: listItemText,
317
+ id: item[idName],
318
+ active: isActive,
319
+ onClick: this.onSelect.bind(this, item),
320
+ index: i,
321
+ needTick: needTick,
322
+ needBorder: false,
323
+ bulletColor: item[statusColor],
324
+ title: listItemText,
325
+ needMultiLineText: needMultiLineText,
326
+ autoHover: true,
299
327
  a11y: {
300
- role: 'heading'
328
+ role: isSearch ? 'option' : 'menuitem',
329
+ ariaSelected: isActive,
330
+ ariaLabel: listItemText
301
331
  }
302
- })), /*#__PURE__*/React.createElement(Box, {
303
- scroll: "vertical",
304
- flexible: true,
305
- shrink: true,
306
- dataId: `${dataId}_list`,
307
- preventParentScroll: "vertical",
308
- className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
309
- onScroll: this.handleScroll,
310
- role: isSearch ? 'listbox' : 'menu',
311
- tabindex: "-1",
312
- isScrollAttribute: true
313
- }, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => {
314
- const listItemText = item[keyName];
315
- const isActive = value === listItemText;
316
- return /*#__PURE__*/React.createElement(StatusListItem, {
317
- key: i,
318
- dataId: `dataid_${i}`,
319
- value: listItemText,
320
- id: item[idName],
321
- active: isActive,
322
- onClick: this.onSelect.bind(this, item),
323
- index: i,
324
- needTick: needTick,
325
- needBorder: false,
326
- bulletColor: item[statusColor],
327
- title: listItemText,
328
- needMultiLineText: needMultiLineText,
329
- autoHover: true,
330
- a11y: {
331
- role: isSearch ? 'option' : 'menuitem',
332
- ariaSelected: isActive,
333
- ariaLabel: listItemText
334
- }
335
- });
336
- }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
337
- isCover: false,
338
- align: "both"
339
- }, /*#__PURE__*/React.createElement(Loader, null))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
340
- className: style.svgWrapper,
341
- title: searchErrorText || 'No results',
342
- description: searchEmptyHint,
343
- size: "small",
344
- getEmptyState: this.emptySearchSVG
345
- }) : /*#__PURE__*/React.createElement("div", {
346
- className: style.loader
347
- }, /*#__PURE__*/React.createElement(Loader, null))), renderFooterElement ? renderFooterElement : null));
348
- }) : null);
332
+ });
333
+ }), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
334
+ isCover: false,
335
+ align: "both"
336
+ }, /*#__PURE__*/React.createElement(Loader, null))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
337
+ className: style.svgWrapper,
338
+ title: searchErrorText || 'No results',
339
+ description: searchEmptyHint,
340
+ size: "small",
341
+ getEmptyState: this.emptySearchSVG
342
+ }) : /*#__PURE__*/React.createElement("div", {
343
+ className: style.loader
344
+ }, /*#__PURE__*/React.createElement(Loader, null))), renderFooterElement ? renderFooterElement : null))) : null);
349
345
  }
350
346
 
351
347
  } // if (__DOCS__) {
@@ -8,10 +8,9 @@ describe('StatusDropdown', () => {
8
8
  } = render( /*#__PURE__*/React.createElement(StatusDropdown, null));
9
9
  expect(asFragment()).toMatchSnapshot();
10
10
  }), test('rendering target element', () => {
11
- const renderTargetElement = _ref => {
12
- let {
13
- isPopupOpen
14
- } = _ref;
11
+ const renderTargetElement = ({
12
+ isPopupOpen
13
+ }) => {
15
14
  return /*#__PURE__*/React.createElement("div", {
16
15
  className: isPopupOpen ? 'popupOpened' : 'popupClosed'
17
16
  }, "Target Element");
@@ -60,11 +60,10 @@ export default class Search extends Component {
60
60
  getRef && getRef(el);
61
61
  }
62
62
 
63
- handleRenderChildren(_ref) {
64
- let {
65
- isActive,
66
- isFocus
67
- } = _ref;
63
+ handleRenderChildren({
64
+ isActive,
65
+ isFocus
66
+ }) {
68
67
  const {
69
68
  value,
70
69
  selectedId,
@@ -48,10 +48,9 @@ describe('Search', () => {
48
48
  id: '5'
49
49
  }];
50
50
 
51
- function renderChildren(_ref) {
52
- let {
53
- value
54
- } = _ref;
51
+ function renderChildren({
52
+ value
53
+ }) {
55
54
  return /*#__PURE__*/React.createElement("div", null, value);
56
55
  }
57
56
 
@@ -39,10 +39,9 @@ class DropDown extends SelectComponent {
39
39
  }
40
40
  }
41
41
 
42
- responsiveFunc(_ref) {
43
- let {
44
- mediaQueryOR
45
- } = _ref;
42
+ responsiveFunc({
43
+ mediaQueryOR
44
+ }) {
46
45
  return {
47
46
  tabletMode: mediaQueryOR([{
48
47
  maxWidth: 700
@@ -51,8 +50,6 @@ class DropDown extends SelectComponent {
51
50
  }
52
51
 
53
52
  render() {
54
- var _this = this;
55
-
56
53
  const {
57
54
  needSearch,
58
55
  dropBoxSize,
@@ -106,75 +103,70 @@ class DropDown extends SelectComponent {
106
103
  }))), isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
107
104
  query: this.responsiveFunc,
108
105
  responsiveId: "Helmet"
109
- }, _ref2 => {
110
- let {
111
- tabletMode
112
- } = _ref2;
113
- return /*#__PURE__*/React.createElement(ResponsiveDropBox, {
114
- isAnimate: true,
115
- isArrow: false,
116
- isActive: isPopupReady,
117
- boxPosition: position || `${defaultDropBoxPosition}Center`,
118
- getRef: getContainerRef,
119
- onClick: removeClose,
120
- animationStyle: animationStyle,
121
- size: "large",
122
- alignBox: "row",
123
- isResponsivePadding: true,
124
- dataId: `${dataId}_dropbox`,
125
- isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
126
- isRestrictScroll: isRestrictScroll,
127
- positionsOffset: positionsOffset,
128
- targetOffset: targetOffset
129
- }, /*#__PURE__*/React.createElement(Box, {
130
- flexible: true
131
- }, /*#__PURE__*/React.createElement(Card, null, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(DropDownSearch, {
132
- value: searchStr,
133
- onChange: this.handleSearch,
134
- onKeyDown: this.onSearchKeyDown,
135
- getRef: this.searchInputRef,
136
- size: searchBoxSize,
137
- variant: searchBoxVariant,
138
- placeHolder: searchBoxPlaceHolder,
139
- maxLength: maxLength,
140
- dataId: `${dataId}_search`
141
- })) : null, /*#__PURE__*/React.createElement(CardContent, {
142
- shrink: true,
143
- eleRef: this.suggestionContainerRef,
144
- customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : ''
145
- }, suggestions.length ? /*#__PURE__*/React.createElement("div", {
146
- className: style.listItemContainer,
147
- "data-id": `${dataId}_Options`
148
- }, suggestions.map(function () {
149
- let option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
150
- let index = arguments.length > 1 ? arguments[1] : undefined;
151
- const {
152
- id,
153
- value
154
- } = option;
155
- return /*#__PURE__*/React.createElement(ListItem, {
156
- active: id === selectedId,
157
- getRef: _this.suggestionItemRef,
158
- highlight: hoverIndex === index ? true : false,
159
- id: id,
160
- key: `${id}dropDown`,
161
- onClick: _this.handleChange,
162
- onMouseEnter: _this.handleMouseEnter,
163
- size: "medium",
164
- value: value,
165
- index: index,
166
- needTick: true,
167
- needBorder: false
168
- });
169
- })) : isFetchingOptions ? /*#__PURE__*/React.createElement(Container, {
170
- align: "both",
171
- className: style.loader
172
- }, /*#__PURE__*/React.createElement(Loader, null)) : searchStr ? /*#__PURE__*/React.createElement("div", {
173
- className: style.emptyState
174
- }, searchEmptyMessage || emptyMessage) : /*#__PURE__*/React.createElement("div", {
175
- className: style.emptyState
176
- }, emptyMessage)))));
177
- }) : null);
106
+ }, ({
107
+ tabletMode
108
+ }) => /*#__PURE__*/React.createElement(ResponsiveDropBox, {
109
+ isAnimate: true,
110
+ isArrow: false,
111
+ isActive: isPopupReady,
112
+ boxPosition: position || `${defaultDropBoxPosition}Center`,
113
+ getRef: getContainerRef,
114
+ onClick: removeClose,
115
+ animationStyle: animationStyle,
116
+ size: "large",
117
+ alignBox: "row",
118
+ isResponsivePadding: true,
119
+ dataId: `${dataId}_dropbox`,
120
+ isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
121
+ isRestrictScroll: isRestrictScroll,
122
+ positionsOffset: positionsOffset,
123
+ targetOffset: targetOffset
124
+ }, /*#__PURE__*/React.createElement(Box, {
125
+ flexible: true
126
+ }, /*#__PURE__*/React.createElement(Card, null, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(DropDownSearch, {
127
+ value: searchStr,
128
+ onChange: this.handleSearch,
129
+ onKeyDown: this.onSearchKeyDown,
130
+ getRef: this.searchInputRef,
131
+ size: searchBoxSize,
132
+ variant: searchBoxVariant,
133
+ placeHolder: searchBoxPlaceHolder,
134
+ maxLength: maxLength,
135
+ dataId: `${dataId}_search`
136
+ })) : null, /*#__PURE__*/React.createElement(CardContent, {
137
+ shrink: true,
138
+ eleRef: this.suggestionContainerRef,
139
+ customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : ''
140
+ }, suggestions.length ? /*#__PURE__*/React.createElement("div", {
141
+ className: style.listItemContainer,
142
+ "data-id": `${dataId}_Options`
143
+ }, suggestions.map((option = {}, index) => {
144
+ const {
145
+ id,
146
+ value
147
+ } = option;
148
+ return /*#__PURE__*/React.createElement(ListItem, {
149
+ active: id === selectedId,
150
+ getRef: this.suggestionItemRef,
151
+ highlight: hoverIndex === index ? true : false,
152
+ id: id,
153
+ key: `${id}dropDown`,
154
+ onClick: this.handleChange,
155
+ onMouseEnter: this.handleMouseEnter,
156
+ size: "medium",
157
+ value: value,
158
+ index: index,
159
+ needTick: true,
160
+ needBorder: false
161
+ });
162
+ })) : isFetchingOptions ? /*#__PURE__*/React.createElement(Container, {
163
+ align: "both",
164
+ className: style.loader
165
+ }, /*#__PURE__*/React.createElement(Loader, null)) : searchStr ? /*#__PURE__*/React.createElement("div", {
166
+ className: style.emptyState
167
+ }, searchEmptyMessage || emptyMessage) : /*#__PURE__*/React.createElement("div", {
168
+ className: style.emptyState
169
+ }, emptyMessage)))))) : null);
178
170
  }
179
171
 
180
172
  }
@@ -3,9 +3,7 @@ export function stopBubbling(event) {
3
3
  event.stopPropagation && event.stopPropagation();
4
4
  event.nativeEvent && event.nativeEvent.stopImmediatePropagation && event.nativeEvent.stopImmediatePropagation();
5
5
  }
6
- export function getFullName() {
7
- let firstName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
8
- let lastName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
6
+ export function getFullName(firstName = '', lastName = '') {
9
7
  let fullName = '';
10
8
 
11
9
  if (firstName !== null && firstName !== '') {
@@ -18,10 +16,7 @@ export function getFullName() {
18
16
 
19
17
  return fullName;
20
18
  }
21
- export function shallowDiff() {
22
- let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
23
- let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
24
-
19
+ export function shallowDiff(a = {}, b = {}) {
25
20
  for (let i in a) {
26
21
  if (!(i in b)) {
27
22
  return true;
@@ -176,11 +176,7 @@ export function loadResource(url, type, id, callback) {
176
176
  });
177
177
  } // bind
178
178
 
179
- export function bind() {
180
- for (var _len = arguments.length, handlers = new Array(_len), _key = 0; _key < _len; _key++) {
181
- handlers[_key] = arguments[_key];
182
- }
183
-
179
+ export function bind(...handlers) {
184
180
  handlers.forEach(handler => {
185
181
  if (__DEVELOPMENT__) {
186
182
  if (!this[handler]) {
@@ -1,9 +1,8 @@
1
1
  import { compileClassNames } from '@zohodesk/utils';
2
- export default function cssJSLogic(_ref) {
3
- let {
4
- props,
5
- style
6
- } = _ref;
2
+ export default function cssJSLogic({
3
+ props,
4
+ style
5
+ }) {
7
6
  let {
8
7
  children,
9
8
  type,
@@ -95,10 +95,9 @@ export function DesktopNotificationUI(props) {
95
95
  let uiVariantOne = title && (info || secondaryInfo);
96
96
  let uiVariantTwo = title && !(info || secondaryInfo) && !getSectionContainer;
97
97
 
98
- function responsiveFunc(_ref) {
99
- let {
100
- mediaQueryOR
101
- } = _ref;
98
+ function responsiveFunc({
99
+ mediaQueryOR
100
+ }) {
102
101
  return {
103
102
  uptoTablet: mediaQueryOR([{
104
103
  maxWidth: 760
@@ -115,66 +114,63 @@ export function DesktopNotificationUI(props) {
115
114
  }, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
116
115
  query: responsiveFunc,
117
116
  responsiveId: responsiveId
118
- }, _ref2 => {
119
- let {
120
- uptoTablet
121
- } = _ref2;
122
- return /*#__PURE__*/React.createElement(Container, _extends({
123
- className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass}
117
+ }, ({
118
+ uptoTablet
119
+ }) => /*#__PURE__*/React.createElement(Container, _extends({
120
+ className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass}
124
121
  ${isShrinkView ? style.globalNotify : ''} ${containerClass} ${uptoTablet ? style.tapWidth : style[`${size}`]}`,
125
- isCover: false,
126
- dataId: dataId,
127
- isInline: uiVariantTwo
128
- }, ExtraProps), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
129
- type: type,
130
- title: title,
131
- variant: titleVariant,
132
- needIcon: needIcon,
133
- onClose: onClose,
134
- closeTitle: closeTitle,
135
- dataId: `${dataId}_close`,
136
- needClose: needClose
137
- })), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Container, {
138
- alignBox: "column"
139
- }, uiVariantOne && /*#__PURE__*/React.createElement(Box, {
140
- flexible: true
141
- }, /*#__PURE__*/React.createElement("div", {
142
- className: `${style.section} ${style.infoText}`
143
- }, subTitle && /*#__PURE__*/React.createElement("div", {
144
- className: `${style.subTitle} ${info || secondaryInfo ? style.subTitleMargin : ''}`
145
- }, subTitle), info && /*#__PURE__*/React.createElement("div", null, info), secondaryInfo && /*#__PURE__*/React.createElement("div", {
146
- className: `${info ? style.secondaryInfo : ''}`
147
- }, secondaryInfo))), getSectionContainer && /*#__PURE__*/React.createElement(Box, {
148
- flexible: true
149
- }, getSectionContainer()), submitText || cancelText ? /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement("div", {
150
- className: style.footer
151
- }, isMore ? /*#__PURE__*/React.createElement("div", {
152
- className: `${style.message}`,
153
- tagName: "p"
154
- }, message) : null, /*#__PURE__*/React.createElement(FormAction, {
155
- size: "small",
156
- paddingLeftSize: "xmedium"
157
- }, submitText ? /*#__PURE__*/React.createElement("div", {
158
- onClick: onClickSubmit,
159
- "data-id": `${dataId}_submitButton`,
160
- "data-test-id": `${dataId}_submitButton`
161
- }, /*#__PURE__*/React.createElement(Container, {
162
- align: "vertical",
163
- alignBox: "row"
164
- }, getSubmitContainer ? /*#__PURE__*/React.createElement(Box, {
165
- flexible: true
166
- }, getSubmitContainer()) : /*#__PURE__*/React.createElement(Box, {
167
- flexible: true
168
- }, /*#__PURE__*/React.createElement(Button, {
169
- text: submitText,
170
- palette: submitType ? submitType : buttonPalette
171
- })))) : null, cancelText ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
172
- text: cancelText,
173
- palette: "secondary",
174
- dataId: `${dataId}_cancelButton`,
175
- onClick: onClickCancel
176
- })) : null))) : null)), getBottomContainer ? /*#__PURE__*/React.createElement(Box, null, getBottomContainer()) : null);
177
- }));
122
+ isCover: false,
123
+ dataId: dataId,
124
+ isInline: uiVariantTwo
125
+ }, ExtraProps), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
126
+ type: type,
127
+ title: title,
128
+ variant: titleVariant,
129
+ needIcon: needIcon,
130
+ onClose: onClose,
131
+ closeTitle: closeTitle,
132
+ dataId: `${dataId}_close`,
133
+ needClose: needClose
134
+ })), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Container, {
135
+ alignBox: "column"
136
+ }, uiVariantOne && /*#__PURE__*/React.createElement(Box, {
137
+ flexible: true
138
+ }, /*#__PURE__*/React.createElement("div", {
139
+ className: `${style.section} ${style.infoText}`
140
+ }, subTitle && /*#__PURE__*/React.createElement("div", {
141
+ className: `${style.subTitle} ${info || secondaryInfo ? style.subTitleMargin : ''}`
142
+ }, subTitle), info && /*#__PURE__*/React.createElement("div", null, info), secondaryInfo && /*#__PURE__*/React.createElement("div", {
143
+ className: `${info ? style.secondaryInfo : ''}`
144
+ }, secondaryInfo))), getSectionContainer && /*#__PURE__*/React.createElement(Box, {
145
+ flexible: true
146
+ }, getSectionContainer()), submitText || cancelText ? /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement("div", {
147
+ className: style.footer
148
+ }, isMore ? /*#__PURE__*/React.createElement("div", {
149
+ className: `${style.message}`,
150
+ tagName: "p"
151
+ }, message) : null, /*#__PURE__*/React.createElement(FormAction, {
152
+ size: "small",
153
+ paddingLeftSize: "xmedium"
154
+ }, submitText ? /*#__PURE__*/React.createElement("div", {
155
+ onClick: onClickSubmit,
156
+ "data-id": `${dataId}_submitButton`,
157
+ "data-test-id": `${dataId}_submitButton`
158
+ }, /*#__PURE__*/React.createElement(Container, {
159
+ align: "vertical",
160
+ alignBox: "row"
161
+ }, getSubmitContainer ? /*#__PURE__*/React.createElement(Box, {
162
+ flexible: true
163
+ }, getSubmitContainer()) : /*#__PURE__*/React.createElement(Box, {
164
+ flexible: true
165
+ }, /*#__PURE__*/React.createElement(Button, {
166
+ text: submitText,
167
+ palette: submitType ? submitType : buttonPalette
168
+ })))) : null, cancelText ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
169
+ text: cancelText,
170
+ palette: "secondary",
171
+ dataId: `${dataId}_cancelButton`,
172
+ onClick: onClickCancel
173
+ })) : null))) : null)), getBottomContainer ? /*#__PURE__*/React.createElement(Box, null, getBottomContainer()) : null)));
178
174
  }
179
175
  DesktopNotificationUI.propTypes = DesktopNotificationUI_propTypes;
180
176
  export default function DesktopNotification(props) {