@zohodesk/dot 1.9.12 → 1.9.14

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 (167) hide show
  1. package/README.md +19 -6
  2. package/assets/Appearance/dark/mode/Dot_DarkMode.module.css +7 -7
  3. package/assets/Appearance/dark/themes/blue/blue_DotCTA_DarkModifyCategory.module.css +13 -0
  4. package/assets/Appearance/dark/themes/green/green_DotCTA_DarkModifyCategory.module.css +13 -0
  5. package/assets/Appearance/dark/themes/orange/orange_DotCTA_DarkModifyCategory.module.css +13 -0
  6. package/assets/Appearance/dark/themes/red/red_DotCTA_DarkModifyCategory.module.css +13 -0
  7. package/assets/Appearance/dark/themes/yellow/yellow_DotCTA_DarkModifyCategory.module.css +13 -0
  8. package/assets/Appearance/light/mode/Dot_LightMode.module.css +13 -13
  9. package/assets/Appearance/light/themes/blue/blue_DotCTA_LightModifyCategory.module.css +13 -0
  10. package/assets/Appearance/light/themes/green/green_DotCTA_LightModifyCategory.module.css +13 -0
  11. package/assets/Appearance/light/themes/orange/orange_DotCTA_LightModifyCategory.module.css +13 -0
  12. package/assets/Appearance/light/themes/red/red_DotCTA_LightModifyCategory.module.css +13 -0
  13. package/assets/Appearance/light/themes/yellow/yellow_DotCTA_LightModifyCategory.module.css +13 -0
  14. package/assets/Appearance/pureDark/mode/Dot_PureDarkMode.module.css +5 -5
  15. package/assets/Appearance/pureDark/themes/blue/blue_DotCTA_PureDarkModifyCategory.module.css +13 -0
  16. package/assets/Appearance/pureDark/themes/green/green_DotCTA_PureDarkModifyCategory.module.css +13 -0
  17. package/assets/Appearance/pureDark/themes/orange/orange_DotCTA_PureDarkModifyCategory.module.css +13 -0
  18. package/assets/Appearance/pureDark/themes/red/red_DotCTA_PureDarkModifyCategory.module.css +13 -0
  19. package/assets/Appearance/pureDark/themes/yellow/yellow_DotCTA_PureDarkModifyCategory.module.css +13 -0
  20. package/cbt.config.js +12 -3
  21. package/es/ActionButton/__tests__/ActionButton.spec.js +4 -5
  22. package/es/AttachmentViewer/AttachmentImage.js +3 -1
  23. package/es/AttachmentViewer/AttachmentViewer.js +340 -273
  24. package/es/AttachmentViewer/AttachmentViewer.module.css +8 -15
  25. package/es/AttachmentViewer/__tests__/AttachmentViewer.spec.js +104 -100
  26. package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
  27. package/es/AttachmentViewer/props/defaultProps.js +4 -2
  28. package/es/AttachmentViewer/props/propTypes.js +9 -2
  29. package/es/AttachmentViewer/utils.js +6 -7
  30. package/es/AudioPlayer/utils/utils.js +2 -5
  31. package/es/DotProvider/hooks/useDotProvider.js +14 -15
  32. package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +12 -13
  33. package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +2 -1
  34. package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +2 -1
  35. package/es/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +2 -1
  36. package/es/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +2 -1
  37. package/es/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +2 -1
  38. package/es/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +2 -1
  39. package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +2 -1
  40. package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +2 -1
  41. package/es/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +2 -1
  42. package/es/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +2 -1
  43. package/es/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +2 -1
  44. package/es/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +2 -1
  45. package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +2 -1
  46. package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +2 -1
  47. package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +2 -1
  48. package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +1 -0
  49. package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +1 -0
  50. package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +1 -0
  51. package/es/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +1 -0
  52. package/es/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +1 -0
  53. package/es/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +1 -0
  54. package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +1 -0
  55. package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +1 -0
  56. package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +1 -0
  57. package/es/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +1 -0
  58. package/es/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +1 -0
  59. package/es/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +1 -0
  60. package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +1 -0
  61. package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +1 -0
  62. package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +1 -0
  63. package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_Dark_Variables.js +1 -2
  64. package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_Light_Variables.js +1 -2
  65. package/es/DotProvider/libraryChunks/themes/variables/blue/Blue_PureDark_Variables.js +1 -2
  66. package/es/DotProvider/libraryChunks/themes/variables/green/Green_Dark_Variables.js +1 -2
  67. package/es/DotProvider/libraryChunks/themes/variables/green/Green_Light_Variables.js +1 -2
  68. package/es/DotProvider/libraryChunks/themes/variables/green/Green_PureDark_Variables.js +1 -2
  69. package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_Dark_Variables.js +1 -2
  70. package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_Light_Variables.js +1 -2
  71. package/es/DotProvider/libraryChunks/themes/variables/orange/Orange_PureDark_Variables.js +1 -2
  72. package/es/DotProvider/libraryChunks/themes/variables/red/Red_Dark_Variables.js +1 -2
  73. package/es/DotProvider/libraryChunks/themes/variables/red/Red_Light_Variables.js +1 -2
  74. package/es/DotProvider/libraryChunks/themes/variables/red/Red_PureDark_Variables.js +1 -2
  75. package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Dark_Variables.js +1 -2
  76. package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Light_Variables.js +1 -2
  77. package/es/DotProvider/libraryChunks/themes/variables/yellow/Yellow_PureDark_Variables.js +1 -2
  78. package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +3 -4
  79. package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +4 -5
  80. package/es/DotProvider/utils/errorValidation.js +5 -6
  81. package/es/DotProvider/utils/getAssetsImportPromises.js +4 -5
  82. package/es/Drawer/Drawer.js +6 -8
  83. package/es/FreezeLayer/css/cssJSLogic.js +4 -5
  84. package/es/Hooks/Dragger/useDragger.js +5 -6
  85. package/es/Hooks/Dragger/utils/DraggerUtil.js +7 -8
  86. package/es/Hooks/useFreezeLayer.js +4 -5
  87. package/es/Link/Link.js +4 -3
  88. package/es/Link/props/propTypes.js +1 -0
  89. package/es/Onboarding/CarouselDots/CarouselDots.js +29 -32
  90. package/es/Onboarding/Onboarding.js +23 -24
  91. package/es/Onboarding/hooks/useOnboarding.js +4 -5
  92. package/es/Onboarding/hooks/useOnboardingSlider.js +5 -6
  93. package/es/deprecated/SelectDropdown/SelectDropdown.js +43 -47
  94. package/es/dropdown/ToggleDropDown/ToggleDropDown.js +214 -225
  95. package/es/errorstate/Inconvenience/Inconvenience.js +32 -36
  96. package/es/errorstate/NoRequestFound/NoRequestFound.js +32 -36
  97. package/es/errorstate/PermissionPlay/PermissionPlay.js +31 -35
  98. package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +32 -36
  99. package/es/errorstate/UnableToProcess/UnableToProcess.js +32 -36
  100. package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +32 -36
  101. package/es/errorstate/WillBack/WillBack.js +30 -34
  102. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +81 -85
  103. package/es/list/status/StatusDropdown/StatusDropdown.js +109 -113
  104. package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +3 -4
  105. package/es/lookup/header/Search/Search.js +4 -5
  106. package/es/lookup/header/Search/__tests__/Search.spec.js +3 -4
  107. package/es/lookup/header/ViewDropDown/ViewDropDown.js +67 -75
  108. package/es/utils/General.js +2 -7
  109. package/es/utils/editorUtils.js +1 -5
  110. package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +4 -5
  111. package/es/version2/notification/DesktopNotification/DesktopNotification.js +59 -63
  112. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +40 -44
  113. package/lib/AttachmentViewer/AttachmentImage.js +3 -1
  114. package/lib/AttachmentViewer/AttachmentViewer.js +158 -82
  115. package/lib/AttachmentViewer/AttachmentViewer.module.css +8 -15
  116. package/lib/AttachmentViewer/__tests__/AttachmentViewer.spec.js +100 -100
  117. package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
  118. package/lib/AttachmentViewer/props/defaultProps.js +6 -2
  119. package/lib/AttachmentViewer/props/propTypes.js +9 -2
  120. package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +3 -1
  121. package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +3 -1
  122. package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +3 -1
  123. package/lib/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +3 -1
  124. package/lib/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +3 -1
  125. package/lib/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +3 -1
  126. package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +3 -1
  127. package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +3 -1
  128. package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +3 -1
  129. package/lib/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +3 -1
  130. package/lib/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +3 -1
  131. package/lib/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +3 -1
  132. package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +3 -1
  133. package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +3 -1
  134. package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +3 -1
  135. package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +2 -0
  136. package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +2 -0
  137. package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +2 -0
  138. package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +2 -0
  139. package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +2 -0
  140. package/lib/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +2 -0
  141. package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +2 -0
  142. package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +2 -0
  143. package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +2 -0
  144. package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +2 -0
  145. package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +2 -0
  146. package/lib/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +2 -0
  147. package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +2 -0
  148. package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +2 -0
  149. package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +2 -0
  150. package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_Dark_Variables.js +1 -3
  151. package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_Light_Variables.js +1 -3
  152. package/lib/DotProvider/libraryChunks/themes/variables/blue/Blue_PureDark_Variables.js +1 -3
  153. package/lib/DotProvider/libraryChunks/themes/variables/green/Green_Dark_Variables.js +1 -3
  154. package/lib/DotProvider/libraryChunks/themes/variables/green/Green_Light_Variables.js +1 -3
  155. package/lib/DotProvider/libraryChunks/themes/variables/green/Green_PureDark_Variables.js +1 -3
  156. package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_Dark_Variables.js +1 -3
  157. package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_Light_Variables.js +1 -3
  158. package/lib/DotProvider/libraryChunks/themes/variables/orange/Orange_PureDark_Variables.js +1 -3
  159. package/lib/DotProvider/libraryChunks/themes/variables/red/Red_Dark_Variables.js +1 -3
  160. package/lib/DotProvider/libraryChunks/themes/variables/red/Red_Light_Variables.js +1 -3
  161. package/lib/DotProvider/libraryChunks/themes/variables/red/Red_PureDark_Variables.js +1 -3
  162. package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Dark_Variables.js +1 -3
  163. package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_Light_Variables.js +1 -3
  164. package/lib/DotProvider/libraryChunks/themes/variables/yellow/Yellow_PureDark_Variables.js +1 -3
  165. package/lib/Link/Link.js +4 -3
  166. package/lib/Link/props/propTypes.js +1 -0
  167. package/package.json +12 -11
@@ -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) {