@zohodesk/dot 1.0.0-beta.213 → 1.0.0-beta.216

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 (161) hide show
  1. package/README.md +16 -1
  2. package/es/FreezeLayer/FreezeLayer.js +29 -4
  3. package/es/Provider/Config.js +12 -0
  4. package/es/deprecated/utils/General.js +19 -0
  5. package/es/form/fields/CheckBoxField/CheckBoxField.js +1 -1
  6. package/es/form/fields/CurrencyField/CurrencyField.js +8 -6
  7. package/es/form/fields/DateField/DateField.js +1 -1
  8. package/es/form/fields/MultiSelectField/MultiSelectField.js +1 -1
  9. package/es/form/fields/PhoneField/PhoneField.js +1 -1
  10. package/es/form/fields/RadioField/RadioField.js +1 -1
  11. package/es/form/fields/SelectField/SelectField.js +1 -1
  12. package/es/form/fields/TextBoxField/TextBoxField.js +1 -1
  13. package/es/form/fields/TextEditor/TextEditor.module.css +13 -2
  14. package/es/form/fields/TextareaField/TextareaField.js +1 -1
  15. package/es/list/status/StatusDropdown/StatusDropdown.js +47 -40
  16. package/es/setup/header/Views/Views.js +2 -2
  17. package/es/utils/General.js +0 -19
  18. package/lib/ActionButton/ActionButton.js +1 -1
  19. package/lib/AlphabeticList/AlphabeticList.js +1 -1
  20. package/lib/Attachment/Attachment.js +1 -1
  21. package/lib/ChannelIcon/ChannelIcon.js +1 -1
  22. package/lib/Drawer/Drawer.js +1 -1
  23. package/lib/ExternalLink/ExternalLink.js +1 -1
  24. package/lib/FlipCard/FlipCard.js +1 -1
  25. package/lib/FormAction/FormAction.js +1 -1
  26. package/lib/FreezeLayer/FreezeLayer.js +32 -5
  27. package/lib/IconButton/IconButton.js +1 -1
  28. package/lib/Image/Image.js +1 -1
  29. package/lib/ImportantNotes/ImportantNotes.js +1 -1
  30. package/lib/Link/Link.js +1 -1
  31. package/lib/Loader/Loader.js +1 -1
  32. package/lib/Message/Message.js +1 -1
  33. package/lib/MessageBanner/MessageBanner.js +1 -1
  34. package/lib/NewStar/NewStar.js +1 -1
  35. package/lib/PlusIcon/PlusIcon.js +1 -1
  36. package/lib/Provider/Config.js +21 -0
  37. package/lib/Provider.js +1 -1
  38. package/lib/Upload/Upload.js +1 -1
  39. package/lib/alert/AlertHeader/AlertHeader.js +1 -1
  40. package/lib/alert/AlertLookup/AlertLookup.js +1 -1
  41. package/lib/avatar/AvatarClose/AvatarClose.js +1 -1
  42. package/lib/avatar/AvatarCollision/AvatarCollision.js +1 -1
  43. package/lib/avatar/AvatarIcon/AvatarIcon.js +1 -1
  44. package/lib/avatar/AvatarStatus/AvatarStatus.js +1 -1
  45. package/lib/avatar/AvatarThread/AvatarThread.js +1 -1
  46. package/lib/avatar/AvatarUser/AvatarUser.js +1 -1
  47. package/lib/avatar/AvatarWithTeam/AvatarWithTeam.js +1 -1
  48. package/lib/deprecated/SelectDropdown/SelectDropdown.js +1 -1
  49. package/lib/deprecated/utils/General.js +29 -0
  50. package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +1 -1
  51. package/lib/emptystate/CommonEmptyState/CommonEmptyState.js +1 -1
  52. package/lib/emptystate/EditionPage/EditionPage.js +1 -1
  53. package/lib/errorstate/Inconvenience/Inconvenience.js +1 -1
  54. package/lib/errorstate/LinkText/LinkText.js +1 -1
  55. package/lib/errorstate/NoRequestFound/NoRequestFound.js +1 -1
  56. package/lib/errorstate/PermissionPlay/PermissionPlay.js +1 -1
  57. package/lib/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +1 -1
  58. package/lib/errorstate/UnableToProcess/UnableToProcess.js +1 -1
  59. package/lib/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +1 -1
  60. package/lib/errorstate/WillBack/WillBack.js +1 -1
  61. package/lib/form/fields/CheckBoxField/CheckBoxField.js +2 -2
  62. package/lib/form/fields/CurrencyField/CurrencyField.js +10 -9
  63. package/lib/form/fields/DateField/DateField.js +2 -2
  64. package/lib/form/fields/MultiSelectField/MultiSelectField.js +2 -2
  65. package/lib/form/fields/PhoneField/PhoneField.js +2 -2
  66. package/lib/form/fields/RadioField/RadioField.js +2 -2
  67. package/lib/form/fields/SelectField/SelectField.js +2 -2
  68. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +1 -1
  69. package/lib/form/fields/TextBoxField/TextBoxField.js +2 -2
  70. package/lib/form/fields/TextEditor/TextEditor.js +1 -1
  71. package/lib/form/fields/TextEditor/TextEditor.module.css +13 -2
  72. package/lib/form/fields/TextEditorField/TextEditorField.js +1 -1
  73. package/lib/form/fields/TextEditorWrapper/TextEditorWrapper.js +1 -1
  74. package/lib/form/fields/TextareaField/TextareaField.js +2 -2
  75. package/lib/form/fields/ValidationMessage/ValidationMessage.js +1 -1
  76. package/lib/form/layout/Field/Field.js +1 -1
  77. package/lib/form/layout/Section/Section.js +1 -1
  78. package/lib/layout/SetupDetailLayout/SetupDetailLayout.js +1 -1
  79. package/lib/layout/SubtabLayout/SubtabLayout.js +1 -1
  80. package/lib/list/AvatarFlip/AvatarFlip.js +1 -1
  81. package/lib/list/BluePrintStatus/BluePrintStatus.js +1 -1
  82. package/lib/list/Comment/Comment.js +1 -1
  83. package/lib/list/DepartmentDropDown/DepartmentDropDown.js +1 -1
  84. package/lib/list/Dot/Dot.js +1 -1
  85. package/lib/list/DotNew/DotNew.js +1 -1
  86. package/lib/list/GridStencils/GridStencils.js +1 -1
  87. package/lib/list/Icons/AddNewIcon.js +1 -1
  88. package/lib/list/Icons/CompleteIcon.js +1 -1
  89. package/lib/list/Icons/DeleteIcon.js +1 -1
  90. package/lib/list/Icons/EditIcon.js +1 -1
  91. package/lib/list/Icons/FloatingIcons.js +1 -1
  92. package/lib/list/Icons/ReadUnreadIcon.js +1 -1
  93. package/lib/list/Icons/SmartIcon.js +1 -1
  94. package/lib/list/ListLayout/ListLayout.js +1 -1
  95. package/lib/list/ListStencils/ListStencils.js +1 -1
  96. package/lib/list/SecondaryText/AccountName.js +1 -1
  97. package/lib/list/SecondaryText/ContactName.js +1 -1
  98. package/lib/list/SecondaryText/DepartmentText.js +1 -1
  99. package/lib/list/SecondaryText/Email.js +1 -1
  100. package/lib/list/SecondaryText/HappinessRating.js +1 -1
  101. package/lib/list/SecondaryText/PhoneNumber.js +1 -1
  102. package/lib/list/SecondaryText/PriorityText.js +1 -1
  103. package/lib/list/SecondaryText/SecondaryText.js +1 -1
  104. package/lib/list/SecondaryText/StatusText.js +1 -1
  105. package/lib/list/SecondaryText/TicketId.js +1 -1
  106. package/lib/list/SecondaryText/Website.js +1 -1
  107. package/lib/list/SecondryPanel/SecondryPanel.js +1 -1
  108. package/lib/list/SentimentStatus/SentimentStatus.js +1 -1
  109. package/lib/list/Subject/Subject.js +1 -1
  110. package/lib/list/TagNew/TagNew.js +1 -1
  111. package/lib/list/Thread/Thread.js +1 -1
  112. package/lib/list/UserTime/UserTime.js +1 -1
  113. package/lib/list/status/StatusDropdown/StatusDropdown.js +45 -38
  114. package/lib/list/status/StatusListItem/StatusListItem.js +1 -1
  115. package/lib/lookup/EmptyPage/EmptyPage.js +1 -1
  116. package/lib/lookup/Lookup/Lookup.js +1 -1
  117. package/lib/lookup/Section/Section.js +1 -1
  118. package/lib/lookup/header/Close/Close.js +1 -1
  119. package/lib/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
  120. package/lib/lookup/header/Search/Search.js +1 -1
  121. package/lib/lookup/header/TicketHeader/TicketHeader.js +1 -1
  122. package/lib/lookup/header/Title/Title.js +1 -1
  123. package/lib/lookup/header/ViewDropDown/ViewDropDown.js +1 -1
  124. package/lib/setup/header/Button/Button.js +1 -1
  125. package/lib/setup/header/Link/Link.js +1 -1
  126. package/lib/setup/header/Search/Search.js +1 -1
  127. package/lib/setup/header/Views/Views.js +3 -3
  128. package/lib/setup/helptips/Description/Description.js +1 -1
  129. package/lib/setup/helptips/Link/Link.js +1 -1
  130. package/lib/setup/helptips/ListGroup/ListGroup.js +1 -1
  131. package/lib/setup/helptips/Title/Title.js +1 -1
  132. package/lib/setup/table/Table/Table.js +1 -1
  133. package/lib/setup/table/TableBody/TableBody.js +1 -1
  134. package/lib/setup/table/TableData/TableData.js +1 -1
  135. package/lib/setup/table/TableHead/TableHead.js +1 -1
  136. package/lib/setup/table/TableRow/TableRow.js +1 -1
  137. package/lib/setup/table/Text/Text.js +1 -1
  138. package/lib/svg/PlusIcon.js +1 -1
  139. package/lib/svg/SnippetIcon.js +1 -1
  140. package/lib/svg/TemplateIcon.js +1 -1
  141. package/lib/utils/General.js +0 -24
  142. package/lib/version2/AlertClose/AlertClose.js +1 -1
  143. package/lib/version2/GlobalNotification/GlobalNotification.js +1 -1
  144. package/lib/version2/alertIcons/AlarmAlertIcon.js +1 -1
  145. package/lib/version2/alertIcons/AlertIcons.js +1 -1
  146. package/lib/version2/alertIcons/DangerAlertIcon.js +1 -1
  147. package/lib/version2/alertIcons/ErrorAlertIcon.js +1 -1
  148. package/lib/version2/alertIcons/InfoAlertIcon.js +1 -1
  149. package/lib/version2/alertIcons/NotificationAlertIcon.js +1 -1
  150. package/lib/version2/alertIcons/SuccessAlertIcon.js +1 -1
  151. package/lib/version2/alertIcons/WarningAlertIcon.js +1 -1
  152. package/lib/version2/errorstate/Inconvenience/Inconvenience.js +1 -1
  153. package/lib/version2/errorstate/OopsSomethingMiss/OopsSomethingMiss.js +1 -1
  154. package/lib/version2/errorstate/UnableToProcessRequest/UnableToProcessRequest.js +1 -1
  155. package/lib/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +1 -1
  156. package/lib/version2/errorstate/UrlNotFound/UrlNotFound.js +1 -1
  157. package/lib/version2/errorstate/WillBeRightBack/WillBeRightBack.js +1 -1
  158. package/lib/version2/lookup/AlertHeader/AlertHeader.js +1 -1
  159. package/lib/version2/lookup/AlertLookup/AlertLookup.js +1 -1
  160. package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +1 -1
  161. package/package.json +3 -3
package/README.md CHANGED
@@ -2,13 +2,28 @@
2
2
 
3
3
  In this Library, we Provide Some Basic Components to Build Your Application
4
4
 
5
+ # 1.0.0-beta.216
6
+
7
+ - CurrencyField => formatCurrency call if check fixed (vavlue will formatted when isActive is false)
8
+
9
+ # 1.0.0-beta.215
10
+
11
+ - CheckBoxField, CurrencyField, DateField, MultiSelectField, PhoneField, RadioField, SelectField, TextBoxField, TextareaField, setup/header/Views/Views => Tooltip undefined case solved
12
+ - StatusDropdown => Enter, Down Arrow Shortcut issue solved
13
+ - TextEditor => editor focus issue fix
14
+
15
+ # 1.0.0-beta.214
16
+
17
+ - Dot => Provider Config Added
18
+ - FreezeLayer => freezeLayer config added to control keyboard shortcut
19
+ - CurrencyField => formatCurrency prop added, exist formatCurrency function removed and moved to deprecated
5
20
  # 1.0.0-beta.213
6
21
 
7
22
  - ActionButton => Loader Bg Fix reverted (Directly Fixed in Button Component)
8
23
 
9
24
  # 1.0.0-beta.210
10
25
 
11
- - TextEditor => editor laoding issue fix
26
+ - TextEditor => editor loading issue fix
12
27
 
13
28
  # 1.0.0-beta.209
14
29
 
@@ -2,9 +2,10 @@ import React, { Component } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Container } from '@zohodesk/components/lib/Layout';
4
4
  import VelocityAnimationGroup from '@zohodesk/components/lib/VelocityAnimation/VelocityAnimationGroup/VelocityAnimationGroup';
5
- import style from './FreezeLayer.module.css';
6
- import { Shortcut } from '../utils/KeyboardApi';
5
+ import style from './FreezeLayer.module.css'; //import { Shortcut } from '../utils/KeyboardApi';
6
+
7
7
  import { getZIndex } from '@zohodesk/components/lib/Provider/ZindexProvider';
8
+ import { getDotLibraryConfig } from '../Provider/Config';
8
9
  export default class FreezeLayer extends Component {
9
10
  constructor(props) {
10
11
  super(props);
@@ -13,6 +14,23 @@ export default class FreezeLayer extends Component {
13
14
  isChildActive: false
14
15
  };
15
16
  this.getNextIndex = getZIndex(this);
17
+ this.isFreezeLayerEnabled = false;
18
+ }
19
+
20
+ enableFreeze() {
21
+ if (!this.isFreezeLayerEnabled) {
22
+ this.isFreezeLayerEnabled = true;
23
+ const freezeLayerEnable = (getDotLibraryConfig('freezeLayer') || {}).enable;
24
+ freezeLayerEnable && freezeLayerEnable();
25
+ }
26
+ }
27
+
28
+ disableFreeze() {
29
+ if (this.isFreezeLayerEnabled) {
30
+ this.isFreezeLayerEnabled = false;
31
+ const freezeLayerDisable = (getDotLibraryConfig('freezeLayer') || {}).disable;
32
+ freezeLayerDisable && freezeLayerDisable();
33
+ }
16
34
  }
17
35
 
18
36
  componentDidMount() {
@@ -24,6 +42,7 @@ export default class FreezeLayer extends Component {
24
42
  this.setState({
25
43
  isChildActive: true
26
44
  });
45
+ this.enableFreeze();
27
46
  }
28
47
  }
29
48
 
@@ -34,7 +53,8 @@ export default class FreezeLayer extends Component {
34
53
 
35
54
  if (isActive != prevProps.isActive) {
36
55
  if (isActive) {
37
- Shortcut && Shortcut.setState(false);
56
+ this.enableFreeze(); // Shortcut && Shortcut.setState(false);
57
+
38
58
  this.setState({
39
59
  isActive: true
40
60
  }, () => {
@@ -43,7 +63,8 @@ export default class FreezeLayer extends Component {
43
63
  });
44
64
  });
45
65
  } else {
46
- Shortcut && Shortcut.setState(true);
66
+ this.disableFreeze(); // Shortcut && Shortcut.setState(true);
67
+
47
68
  this.setState({
48
69
  isChildActive: false
49
70
  }, () => {
@@ -55,6 +76,10 @@ export default class FreezeLayer extends Component {
55
76
  }
56
77
  }
57
78
 
79
+ componentWillUnmount() {
80
+ this.disableFreeze();
81
+ }
82
+
58
83
  render() {
59
84
  let {
60
85
  children,
@@ -0,0 +1,12 @@
1
+ let config = {
2
+ freezeLayer: {
3
+ enable: () => {},
4
+ disable: () => {}
5
+ }
6
+ };
7
+ export function getDotLibraryConfig(key) {
8
+ return config[key];
9
+ }
10
+ export function setDotLibraryConfig(configObj) {
11
+ config = Object.assign({}, config, configObj);
12
+ }
@@ -0,0 +1,19 @@
1
+ export function formatCurrency(number, symbol) {
2
+ // format number 1000000 to 1,234,567
3
+ if (number && number != 0) {
4
+ let typeOfData = typeof number;
5
+ let isDecimal = typeOfData == 'string' ? number.indexOf('.') != -1 : !Number.isInteger(number);
6
+
7
+ if (isDecimal) {
8
+ let val = number.toString().split('.');
9
+ let arr1 = `${val[0].replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
10
+ let finalVal = `${symbol}${arr1}.${val[1]}`;
11
+ return finalVal;
12
+ } else {
13
+ let value = `${symbol}${number.toString().replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
14
+ return value;
15
+ }
16
+ }
17
+
18
+ return number;
19
+ }
@@ -105,7 +105,7 @@ export default class CheckBoxField extends PureComponent {
105
105
  }) : null);
106
106
  return /*#__PURE__*/React.createElement("div", {
107
107
  className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
108
- "data-title": isDisabled ? title : ''
108
+ "data-title": isDisabled ? title : null
109
109
  }, isDirectCol && labelElement, /*#__PURE__*/React.createElement("div", {
110
110
  className: `${isDirectCol ? style.fieldContainer : style.checkboxFieldContainer} ${isDirectCol && labelName ? style[`fieldMargin_${fieldSize}`] : ''}`
111
111
  }, /*#__PURE__*/React.createElement(Container, {
@@ -15,7 +15,6 @@ import Icon from '@zohodesk/icons/lib/Icon';
15
15
  /**** CSS ****/
16
16
 
17
17
  import style from '../Fields.module.css';
18
- import { formatCurrency } from '../../../utils/General';
19
18
  export default class CurrencyField extends PureComponent {
20
19
  constructor(props) {
21
20
  super(props);
@@ -99,7 +98,8 @@ export default class CurrencyField extends PureComponent {
99
98
  needReadOnlyStyle,
100
99
  isClickable,
101
100
  userCurrencyType,
102
- customProps
101
+ customProps,
102
+ formatCurrency
103
103
  } = this.props;
104
104
  const {
105
105
  LabelProps = {},
@@ -112,7 +112,7 @@ export default class CurrencyField extends PureComponent {
112
112
  } = this.state;
113
113
  let formatValue = value;
114
114
 
115
- if (!isActive && value != 0) {
115
+ if (!isActive) {
116
116
  formatValue = formatCurrency(value, userCurrencyType);
117
117
  } else {
118
118
  formatValue = value;
@@ -121,7 +121,7 @@ export default class CurrencyField extends PureComponent {
121
121
  let uniqueId = htmlId ? htmlId : this.getNextId();
122
122
  return /*#__PURE__*/React.createElement("div", {
123
123
  className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
124
- "data-title": isDisabled ? title : ''
124
+ "data-title": isDisabled ? title : null
125
125
  }, labelName && /*#__PURE__*/React.createElement("div", {
126
126
  className: style.labelContainer
127
127
  }, /*#__PURE__*/React.createElement(Label, _extends({
@@ -217,7 +217,8 @@ CurrencyField.propTypes = {
217
217
  TextBoxProps: PropTypes.object,
218
218
  ValidationMessageProps1: PropTypes.object,
219
219
  ValidationMessageProps2: PropTypes.object
220
- })
220
+ }),
221
+ formatCurrency: PropTypes.func
221
222
  };
222
223
  CurrencyField.defaultProps = {
223
224
  errorType: 'primary',
@@ -233,7 +234,8 @@ CurrencyField.defaultProps = {
233
234
  labelCustomClass: '',
234
235
  isClickable: false,
235
236
  needReadOnlyStyle: true,
236
- customProps: {}
237
+ customProps: {},
238
+ formatCurrency: () => {}
237
239
  };
238
240
 
239
241
  if (false) {
@@ -125,7 +125,7 @@ export default class DateField extends PureComponent {
125
125
  let getAriaId = htmlId ? htmlId : this.getNextId();
126
126
  return /*#__PURE__*/React.createElement("div", {
127
127
  className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
128
- "data-title": isDisabled ? title : ''
128
+ "data-title": isDisabled ? title : null
129
129
  }, labelName && /*#__PURE__*/React.createElement("div", {
130
130
  className: style.labelContainer
131
131
  }, /*#__PURE__*/React.createElement(Label, _extends({
@@ -137,7 +137,7 @@ export default class MultiSelectField extends PureComponent {
137
137
  let uniqueId = htmlId ? htmlId : this.getNextId();
138
138
  return /*#__PURE__*/React.createElement("div", {
139
139
  className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
140
- "data-title": isDisabled ? title : ''
140
+ "data-title": isDisabled ? title : null
141
141
  }, labelName && /*#__PURE__*/React.createElement("div", {
142
142
  className: style.labelContainer
143
143
  }, /*#__PURE__*/React.createElement(Label, _extends({
@@ -127,7 +127,7 @@ export default class PhoneField extends PureComponent {
127
127
  return /*#__PURE__*/React.createElement(Container, {
128
128
  alignBox: "row",
129
129
  className: `${style.container} ${isDisabled ? style.disabled : ''}`,
130
- "data-title": isDisabled ? title : ''
130
+ "data-title": isDisabled ? title : null
131
131
  }, /*#__PURE__*/React.createElement(Box, {
132
132
  flexible: true
133
133
  }, /*#__PURE__*/React.createElement(TextBoxField, _extends({
@@ -56,7 +56,7 @@ export default class RadioField extends PureComponent {
56
56
  } = customProps;
57
57
  return /*#__PURE__*/React.createElement("div", {
58
58
  className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
59
- "data-title": isDisabled ? title : ''
59
+ "data-title": isDisabled ? title : null
60
60
  }, labelName && /*#__PURE__*/React.createElement(Label, _extends({
61
61
  text: labelName,
62
62
  size: "medium",
@@ -105,7 +105,7 @@ export default class SelectField extends PureComponent {
105
105
  let uniqueId = htmlId ? htmlId : this.getNextId();
106
106
  return /*#__PURE__*/React.createElement("div", {
107
107
  className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
108
- "data-title": isDisabled ? title : ''
108
+ "data-title": isDisabled ? title : null
109
109
  }, labelName && /*#__PURE__*/React.createElement("div", {
110
110
  className: style.labelContainer
111
111
  }, /*#__PURE__*/React.createElement(Label, _extends({
@@ -98,7 +98,7 @@ export default class TextBoxField extends PureComponent {
98
98
  let uniqueId = htmlId ? htmlId : this.getNextId();
99
99
  return /*#__PURE__*/React.createElement("div", {
100
100
  className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
101
- "data-title": isDisabled ? title : ''
101
+ "data-title": isDisabled ? title : null
102
102
  }, labelName && /*#__PURE__*/React.createElement("div", {
103
103
  className: style.labelContainer
104
104
  }, /*#__PURE__*/React.createElement(Label, _extends({
@@ -649,7 +649,18 @@
649
649
  right: 0;
650
650
  left: 0;
651
651
  }
652
- .readOnly :global .KB_Editor_menus,
653
- .editorHide :global .KB_Editor {
652
+ .readOnly :global .KB_Editor_menus {
654
653
  display: none !important;
655
654
  }
655
+ .editorHide :global .KB_Editor {
656
+ position: absolute !important;
657
+ top: 0;
658
+ opacity: 0;
659
+ visibility: hidden;
660
+ }
661
+ [dir=ltr] .editorHide :global .KB_Editor {
662
+ left: 0;
663
+ }
664
+ [dir=rtl] .editorHide :global .KB_Editor {
665
+ right: 0;
666
+ }
@@ -96,7 +96,7 @@ export default class TextareaField extends PureComponent {
96
96
  let uniqueId = htmlId ? htmlId : this.getNextId();
97
97
  return /*#__PURE__*/React.createElement("div", {
98
98
  className: `${style.container} ${isDisabled ? style.disabled : isReadOnly ? style.readonly : ''}`,
99
- "data-title": isDisabled ? title : ''
99
+ "data-title": isDisabled ? title : null
100
100
  }, labelName && /*#__PURE__*/React.createElement("div", {
101
101
  className: style.labelContainer
102
102
  }, /*#__PURE__*/React.createElement(Label, _extends({
@@ -114,7 +114,7 @@ export class StatusDropdown extends React.Component {
114
114
 
115
115
  if (prevProps.isPopupOpen != isPopupOpen) {
116
116
  setTimeout(() => {
117
- isPopupOpen ? isSearch ? this.searchInput && this.searchInput.focus() : this.hiddenInput && this.hiddenInput.focus() : this.hiddenInput && this.hiddenInput.focus();
117
+ isPopupOpen && isSearch ? this.searchInput && this.searchInput.focus() : this.hiddenInput && this.hiddenInput.focus();
118
118
  }, 10);
119
119
  }
120
120
 
@@ -145,55 +145,62 @@ export class StatusDropdown extends React.Component {
145
145
  togglePopup,
146
146
  onClick,
147
147
  boxPosition,
148
- isPopupOpen,
148
+ isPopupReady,
149
149
  isNextOptions,
150
150
  getNextOptions,
151
- onTogglePopup
151
+ onTogglePopup,
152
+ isPopupOpen
152
153
  } = this.props;
153
154
 
154
- if (isPopupOpen && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
155
+ if (isPopupReady && (keyCode === 38 || keyCode === 40) && e.preventDefault) {
155
156
  e.preventDefault(); //prevent body scroll
156
157
  }
157
158
 
158
- switch (keyCode) {
159
- case 40:
160
- if (selectedIndex === totalIndex - 1) {
161
- this.setState({
162
- selectedIndex: 0
163
- });
164
- } else {
165
- if (selectedIndex === totalIndex - 3) {
166
- isNextOptions && getNextOptions && getNextOptions();
159
+ if (isPopupReady) {
160
+ switch (keyCode) {
161
+ case 40:
162
+ if (selectedIndex === totalIndex - 1) {
163
+ this.setState({
164
+ selectedIndex: 0
165
+ });
166
+ } else {
167
+ if (selectedIndex === totalIndex - 3) {
168
+ isNextOptions && getNextOptions && getNextOptions();
169
+ }
170
+
171
+ this.setState({
172
+ selectedIndex: selectedIndex + 1
173
+ });
167
174
  }
168
175
 
169
- this.setState({
170
- selectedIndex: selectedIndex + 1
171
- });
172
- }
173
-
174
- break;
175
-
176
- case 38:
177
- if (selectedIndex === 0) {
178
- this.setState({
179
- selectedIndex: totalIndex - 1
180
- });
181
- } else {
182
- this.setState({
183
- selectedIndex: selectedIndex - 1
184
- });
185
- }
186
-
187
- break;
188
-
189
- case 13:
190
- onClick && onClick(options[selectedIndex].name, e);
191
- onTogglePopup && onTogglePopup(isPopupOpen);
192
- togglePopup(e, boxPosition);
193
- break;
176
+ break;
177
+
178
+ case 38:
179
+ if (selectedIndex === 0) {
180
+ this.setState({
181
+ selectedIndex: totalIndex - 1
182
+ });
183
+ } else {
184
+ this.setState({
185
+ selectedIndex: selectedIndex - 1
186
+ });
187
+ }
194
188
 
195
- default:
196
- break;
189
+ break;
190
+
191
+ case 13:
192
+ onClick && onClick(options[selectedIndex].name, e);
193
+ onTogglePopup && onTogglePopup(isPopupOpen);
194
+ togglePopup(e, boxPosition);
195
+ break;
196
+
197
+ default:
198
+ break;
199
+ }
200
+ } else {
201
+ if (keyCode === 13 || keyCode === 40) {
202
+ togglePopup(e, boxPosition);
203
+ }
197
204
  }
198
205
  }
199
206
 
@@ -20,14 +20,14 @@ export default class Views extends React.Component {
20
20
  className: style.container
21
21
  }, /*#__PURE__*/React.createElement("span", {
22
22
  className: `${style.icon} ${style.first} ${isList ? style.active : ''}`,
23
- "data-title": !isList ? listTitle : '',
23
+ "data-title": !isList ? listTitle : null,
24
24
  onClick: onListClick
25
25
  }, /*#__PURE__*/React.createElement(Icon, {
26
26
  name: "ZD-list22",
27
27
  size: "10"
28
28
  })), /*#__PURE__*/React.createElement("span", {
29
29
  className: `${style.icon} ${style.last} ${isGrid ? style.active : ''}`,
30
- "data-title": !isGrid ? gridTitle : '',
30
+ "data-title": !isGrid ? gridTitle : null,
31
31
  onClick: onGridClick
32
32
  }, /*#__PURE__*/React.createElement(Icon, {
33
33
  name: "ZD-grid",
@@ -42,23 +42,4 @@ export function formatPhoneUrl(phone) {
42
42
  }
43
43
 
44
44
  return phone;
45
- }
46
- export function formatCurrency(number, symbol) {
47
- // format number 1000000 to 1,234,567
48
- if (number && number != 0) {
49
- let typeOfData = typeof number;
50
- let isDecimal = typeOfData == 'string' ? number.indexOf('.') != -1 : !Number.isInteger(number);
51
-
52
- if (isDecimal) {
53
- let val = number.toString().split('.');
54
- let arr1 = `${val[0].replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
55
- let finalVal = `${symbol}${arr1}.${val[1]}`;
56
- return finalVal;
57
- } else {
58
- let value = `${symbol}${number.toString().replace(/\D/g, '').replace(/\B(?=(\d{3})+(?!\d))/g, ',')}`;
59
- return value;
60
- }
61
- }
62
-
63
- return number;
64
45
  }
@@ -33,7 +33,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
33
33
 
34
34
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
35
35
 
36
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
36
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
37
37
 
38
38
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
39
39
 
@@ -35,7 +35,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
35
35
 
36
36
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
37
37
 
38
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
38
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
39
39
 
40
40
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
41
41
 
@@ -27,7 +27,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
27
27
 
28
28
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
29
29
 
30
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
30
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
31
31
 
32
32
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
33
33
 
@@ -33,7 +33,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
33
33
 
34
34
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
35
35
 
36
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
36
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
37
37
 
38
38
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
39
39
 
@@ -39,7 +39,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
39
39
 
40
40
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
41
41
 
42
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
42
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
43
43
 
44
44
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
45
45
 
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
23
 
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
 
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
27
 
28
28
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
@@ -41,7 +41,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
41
41
 
42
42
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
43
43
 
44
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
44
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
45
45
 
46
46
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
47
47
 
@@ -23,7 +23,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
23
23
 
24
24
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
25
25
 
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
26
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
27
 
28
28
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
29
29
 
@@ -17,10 +17,10 @@ var _VelocityAnimationGroup = _interopRequireDefault(require("@zohodesk/componen
17
17
 
18
18
  var _FreezeLayerModule = _interopRequireDefault(require("./FreezeLayer.module.css"));
19
19
 
20
- var _KeyboardApi = require("../utils/KeyboardApi");
21
-
22
20
  var _ZindexProvider = require("@zohodesk/components/lib/Provider/ZindexProvider");
23
21
 
22
+ var _Config = require("../Provider/Config");
23
+
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
25
 
26
26
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
@@ -33,7 +33,7 @@ function _defineProperties(target, props) { for (var i = 0; i < props.length; i+
33
33
 
34
34
  function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
35
35
 
36
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
36
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
37
37
 
38
38
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
39
39
 
@@ -63,10 +63,29 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
63
63
  isChildActive: false
64
64
  };
65
65
  _this.getNextIndex = (0, _ZindexProvider.getZIndex)(_assertThisInitialized(_this));
66
+ _this.isFreezeLayerEnabled = false;
66
67
  return _this;
67
68
  }
68
69
 
69
70
  _createClass(FreezeLayer, [{
71
+ key: "enableFreeze",
72
+ value: function enableFreeze() {
73
+ if (!this.isFreezeLayerEnabled) {
74
+ this.isFreezeLayerEnabled = true;
75
+ var freezeLayerEnable = ((0, _Config.getDotLibraryConfig)('freezeLayer') || {}).enable;
76
+ freezeLayerEnable && freezeLayerEnable();
77
+ }
78
+ }
79
+ }, {
80
+ key: "disableFreeze",
81
+ value: function disableFreeze() {
82
+ if (this.isFreezeLayerEnabled) {
83
+ this.isFreezeLayerEnabled = false;
84
+ var freezeLayerDisable = ((0, _Config.getDotLibraryConfig)('freezeLayer') || {}).disable;
85
+ freezeLayerDisable && freezeLayerDisable();
86
+ }
87
+ }
88
+ }, {
70
89
  key: "componentDidMount",
71
90
  value: function componentDidMount() {
72
91
  var isActive = this.props.isActive;
@@ -75,6 +94,7 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
75
94
  this.setState({
76
95
  isChildActive: true
77
96
  });
97
+ this.enableFreeze();
78
98
  }
79
99
  }
80
100
  }, {
@@ -86,7 +106,8 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
86
106
 
87
107
  if (isActive != prevProps.isActive) {
88
108
  if (isActive) {
89
- _KeyboardApi.Shortcut && _KeyboardApi.Shortcut.setState(false);
109
+ this.enableFreeze(); // Shortcut && Shortcut.setState(false);
110
+
90
111
  this.setState({
91
112
  isActive: true
92
113
  }, function () {
@@ -95,7 +116,8 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
95
116
  });
96
117
  });
97
118
  } else {
98
- _KeyboardApi.Shortcut && _KeyboardApi.Shortcut.setState(true);
119
+ this.disableFreeze(); // Shortcut && Shortcut.setState(true);
120
+
99
121
  this.setState({
100
122
  isChildActive: false
101
123
  }, function () {
@@ -106,6 +128,11 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
106
128
  }
107
129
  }
108
130
  }
131
+ }, {
132
+ key: "componentWillUnmount",
133
+ value: function componentWillUnmount() {
134
+ this.disableFreeze();
135
+ }
109
136
  }, {
110
137
  key: "render",
111
138
  value: function render() {