@zohodesk/dot 1.0.0-beta.225 → 1.0.0-beta.226

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 (135) hide show
  1. package/README.md +7 -0
  2. package/assets/Appearance/dark/mode/dotDarkMode.module.css +2 -0
  3. package/assets/Appearance/dark/themes/blue/blueDarkDotTheme.module.css +1 -1
  4. package/assets/Appearance/default/mode/dotDefaultMode.module.css +2 -0
  5. package/assets/Appearance/default/themes/blue/blueDefaultDotTheme.module.css +1 -1
  6. package/assets/Appearance/pureDark/mode/dotPureDarkMode.module.css +533 -0
  7. package/assets/Appearance/pureDark/themes/blue/bluePureDarkDotTheme.module.css +16 -0
  8. package/assets/Appearance/pureDark/themes/green/greenPureDarkDotTheme.module.css +16 -0
  9. package/assets/Appearance/pureDark/themes/orange/orangePureDarkDotTheme.module.css +16 -0
  10. package/assets/Appearance/pureDark/themes/red/redPureDarkDotTheme.module.css +16 -0
  11. package/assets/Appearance/pureDark/themes/yellow/yellowPureDarkDotTheme.module.css +16 -0
  12. package/es/ActionButton/ActionButton.module.css +25 -9
  13. package/es/AlphabeticList/AlphabeticList.module.css +7 -4
  14. package/es/Attachment/Attachment.module.css +20 -9
  15. package/es/AttachmentViewer/AttachmentImage.js +5 -1
  16. package/es/AttachmentViewer/AttachmentViewer.js +3 -2
  17. package/es/AttachmentViewer/AttachmentViewer.module.css +90 -27
  18. package/es/ChannelIcon/ChannelIcon.module.css +30 -21
  19. package/es/Drawer/Drawer.module.css +59 -11
  20. package/es/FlipCard/FlipCard.module.css +14 -5
  21. package/es/FormAction/FormAction.module.css +34 -9
  22. package/es/FreezeLayer/FreezeLayer.module.css +6 -2
  23. package/es/IconButton/IconButton.module.css +1 -1
  24. package/es/ImportantNotes/ImportantNotes.module.css +7 -2
  25. package/es/Loader/Loader.module.css +25 -4
  26. package/es/Message/Message.module.css +42 -9
  27. package/es/MessageBanner/MessageBanner.module.css +12 -4
  28. package/es/NewStar/NewStar.module.css +42 -5
  29. package/es/Provider.js +88 -35
  30. package/es/ToastMessage/ToastMessage.module.css +96 -25
  31. package/es/Upload/Upload.module.css +27 -8
  32. package/es/alert/AlertHeader/AlertHeader.module.css +21 -3
  33. package/es/alert/AlertLookup/AlertLookup.module.css +6 -2
  34. package/es/avatar/AvatarClose/AvatarClose.module.css +9 -3
  35. package/es/avatar/AvatarCollision/AvatarCollision.module.css +18 -4
  36. package/es/avatar/AvatarIcon/AvatarIcon.module.css +3 -4
  37. package/es/avatar/AvatarStatus/AvatarStatus.module.css +59 -9
  38. package/es/avatar/AvatarThread/AvatarThread.module.css +55 -5
  39. package/es/avatar/AvatarUser/AvatarUser.module.css +81 -10
  40. package/es/avatar/AvatarWithTeam/AvatarWithTeam.module.css +10 -3
  41. package/es/common/dot_animation.module.css +16 -3
  42. package/es/deprecated/SelectDropdown/SelectDropdown.module.css +11 -3
  43. package/es/dropdown/ToggleDropDown/ToggleDropDown.module.css +19 -6
  44. package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +12 -4
  45. package/es/emptystate/EditionPage/EditionPage.css +9 -3
  46. package/es/errorstate/EmptyStates.module.css +13 -10
  47. package/es/errorstate/Inconvenience/Inconvenience.module.css +3 -0
  48. package/es/errorstate/LinkText/LinkText.module.css +1 -1
  49. package/es/errorstate/PermissionPlay/PermissionPlay.module.css +2 -2
  50. package/es/errorstate/WillBack/WillBack.module.css +1 -3
  51. package/es/form/fields/Fields.module.css +49 -14
  52. package/es/form/fields/TagsMultiSelect/TagsMultiSelect.module.css +19 -7
  53. package/es/form/fields/TagsMultiSelectField/TagsMultiSelectField.module.css +4 -1
  54. package/es/form/fields/TextEditor/TextEditor.module.css +149 -72
  55. package/es/form/fields/TextEditorWrapper/TextEditorWrapper.module.css +13 -2
  56. package/es/form/fields/ValidationMessage/ValidationMessage.module.css +9 -4
  57. package/es/layout/SetupDetailLayout/SetupDetailLayout.module.css +52 -16
  58. package/es/layout/SubtabLayout/SubtabLayout.module.css +55 -29
  59. package/es/list/BluePrintStatus/BluePrintStatus.module.css +4 -1
  60. package/es/list/Comment/Comment.module.css +5 -0
  61. package/es/list/DotNew/DotNew.module.css +3 -3
  62. package/es/list/GridStencils/GridStencils.module.css +71 -17
  63. package/es/list/Icons/Icons.module.css +1 -1
  64. package/es/list/ListLayout/ListLayout.module.css +22 -14
  65. package/es/list/ListStencils/ListStencils.module.css +11 -6
  66. package/es/list/SecondaryText/SecondaryText.module.css +14 -4
  67. package/es/list/SentimentStatus/SentimentStatus.module.css +4 -1
  68. package/es/list/TagNew/TagNew.module.css +14 -7
  69. package/es/list/Thread/Thread.module.css +13 -1
  70. package/es/list/UserTime/UserTime.module.css +6 -0
  71. package/es/list/listCommon.module.css +9 -1
  72. package/es/list/status/StatusDropdown/StatusDropdown.module.css +19 -6
  73. package/es/list/status/StatusListItem/StatusListItem.module.css +38 -15
  74. package/es/lookup/Lookup/Lookup.module.css +2 -2
  75. package/es/lookup/Section/LookupSection.module.css +2 -2
  76. package/es/lookup/header/Close/LookupClose.module.css +4 -4
  77. package/es/lookup/header/Search/LookupSearch.module.css +21 -12
  78. package/es/lookup/header/TicketHeader/TicketHeader.module.css +5 -2
  79. package/es/lookup/header/ViewDropDown/ViewDropDown.module.css +8 -3
  80. package/es/lookup/header/lookupHeaderCommon.module.css +15 -5
  81. package/es/lookup/header/lookupHeaderCommonResponsive.module.css +12 -3
  82. package/es/setup/header/Button/HeaderButton.module.css +3 -1
  83. package/es/setup/header/Link/HeaderLink.module.css +7 -1
  84. package/es/setup/header/Search/Search.module.css +19 -8
  85. package/es/setup/header/Views/Views.module.css +15 -5
  86. package/es/setup/helptips/Link/HelpTipsLink.module.css +1 -0
  87. package/es/setup/helptips/ListGroup/ListGroup.module.css +6 -1
  88. package/es/setup/table/TableData/SetupTableData.module.css +11 -3
  89. package/es/setup/table/TableHead/SetupTableHead.module.css +4 -0
  90. package/es/setup/table/TableRow/SetupTableRow.module.css +6 -2
  91. package/es/version2/AlertClose/AlertClose.module.css +1 -1
  92. package/es/version2/GlobalNotification/GlobalNotification.module.css +44 -9
  93. package/es/version2/lookup/AlertHeader/AlertHeaderNew.module.css +25 -2
  94. package/es/version2/lookup/AlertLookup/AlertLookupNew.module.css +7 -3
  95. package/es/version2/lookup/alertLookupCommonNew.module.css +8 -1
  96. package/es/version2/notification/DesktopNotification/DesktopNotification.module.css +26 -10
  97. package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +47 -10
  98. package/lib/ActionButton/ActionButton.module.css +0 -1
  99. package/lib/AttachmentViewer/Attachment.js +28 -0
  100. package/lib/AttachmentViewer/AttachmentImage.js +133 -0
  101. package/lib/AttachmentViewer/AttachmentViewer.js +646 -0
  102. package/lib/AttachmentViewer/AttachmentViewer.module.css +354 -0
  103. package/lib/AttachmentViewer/utils.js +134 -0
  104. package/lib/FreezeLayer/FreezeLayer.js +29 -4
  105. package/lib/ImportantNotes/ImportantNotes.js +5 -3
  106. package/lib/Provider/Config.js +21 -0
  107. package/lib/Provider.js +112 -37
  108. package/lib/common/dot_animation.module.css +27 -0
  109. package/lib/common/dot_common.module.css +4 -0
  110. package/lib/deprecated/utils/General.js +29 -0
  111. package/lib/{utils → deprecated/utils}/KeyboardApi.js +0 -0
  112. package/lib/dropdown/ToggleDropDown/ToggleDropDown.js +1 -1
  113. package/lib/form/fields/CheckBoxField/CheckBoxField.js +1 -1
  114. package/lib/form/fields/CurrencyField/CurrencyField.js +9 -8
  115. package/lib/form/fields/DateField/DateField.js +1 -1
  116. package/lib/form/fields/MultiSelectField/MultiSelectField.js +1 -1
  117. package/lib/form/fields/PhoneField/PhoneField.js +1 -1
  118. package/lib/form/fields/RadioField/RadioField.js +1 -1
  119. package/lib/form/fields/SelectField/SelectField.js +1 -1
  120. package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +27 -13
  121. package/lib/form/fields/TextBoxField/TextBoxField.js +1 -1
  122. package/lib/form/fields/TextEditor/TextEditor.js +4 -1
  123. package/lib/form/fields/TextEditor/TextEditor.module.css +13 -2
  124. package/lib/form/fields/TextareaField/TextareaField.js +1 -1
  125. package/lib/list/DepartmentDropDown/DepartmentDropDown.js +1 -1
  126. package/lib/list/GridStencils/GridStencils.module.css +3 -1
  127. package/lib/list/SecondaryText/SecondaryText.module.css +1 -1
  128. package/lib/list/status/StatusDropdown/StatusDropdown.js +45 -38
  129. package/lib/lookup/header/ModuleHeader/ModuleHeader.js +8 -3
  130. package/lib/lookup/header/TicketHeader/TicketHeader.js +7 -4
  131. package/lib/lookup/header/lookupHeaderCommon.module.css +8 -2
  132. package/lib/setup/header/Views/Views.js +2 -2
  133. package/lib/utils/General.js +0 -24
  134. package/package.json +7 -7
  135. package/es/utils/KeyboardApi.js +0 -294
@@ -0,0 +1,354 @@
1
+ .header {
2
+ height: var(--zd_size40);
3
+ position: relative;
4
+ z-index: 1;
5
+ composes: alignVertical from '~@zohodesk/components/lib/common/common.module.css';
6
+ background-color: var(--zdt_attachmentviewer_header_bg);
7
+ padding: 0 var(--zd_size15);
8
+ border-bottom: 1px solid var(--zdt_attachmentviewer_header_border);
9
+ }
10
+
11
+ .title {
12
+ max-width: 50%;
13
+ composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
14
+ }
15
+
16
+ [dir=ltr] .title {
17
+ padding-right: var(--zd_size15);
18
+ }
19
+
20
+ [dir=rtl] .title {
21
+ padding-left: var(--zd_size15);
22
+ }
23
+
24
+ .count {
25
+ position: absolute;
26
+ composes: xMiddle from '~@zohodesk/components/lib/common/common.module.css';
27
+ padding: 0 var(--zd_size10);
28
+ }
29
+
30
+ .title,
31
+ .count {
32
+ color: var(--zdt_attachmentviewer_title_text);
33
+ font-size: var(--zd_font_size15);
34
+ }
35
+
36
+ [dir=ltr] .menuBar {
37
+ padding-left: var(--zd_size5);
38
+ }
39
+
40
+ [dir=rtl] .menuBar {
41
+ padding-right: var(--zd_size5);
42
+ }
43
+
44
+ .mbleMenuBar {
45
+ align-self: baseline;
46
+ margin-top: var(--zd_size8);
47
+ }
48
+
49
+ [dir=ltr] .menu+.menu {
50
+ margin-left: var(--zd_size22);
51
+ }
52
+
53
+ [dir=rtl] .menu+.menu {
54
+ margin-right: var(--zd_size22);
55
+ }
56
+
57
+ .mobileMenu+.mobileMenu {
58
+ margin-bottom: var(--zd_size22);
59
+ }
60
+
61
+ .menuIcon {
62
+ --iconColor: var(--zdt_attachmentviewer_title_text);
63
+ }
64
+
65
+ .nrmlArrowBox {
66
+ width: var(--zd_size80);
67
+ }
68
+
69
+ .mbleArrowBox {
70
+ width: var(--zd_size50);
71
+ }
72
+
73
+ .arrowBox:hover {
74
+ background-color: var(--zdt_attachmentviewer_arrow_bg_hover);
75
+ }
76
+
77
+ .arrow {
78
+ color: var(--zdt_attachmentviewer_title_text);
79
+ font-size: var(--zd_font_size22);
80
+ height: var(--zd_size38);
81
+ width: var(--zd_size38);
82
+ line-height: var(--zd_size36);
83
+ border-radius: 50%;
84
+ cursor: pointer;
85
+ }
86
+
87
+ .preview {
88
+ composes: posrel from '~@zohodesk/components/lib/common/common.module.css';
89
+ text-align: center;
90
+ margin: var(--zd_size20) 0;
91
+ }
92
+
93
+ .zoomIn {
94
+ max-height: 100%;
95
+ max-width: 90%;
96
+ position: absolute;
97
+ composes: middleBoth from '~@zohodesk/components/lib/common/common.module.css';
98
+ }
99
+
100
+ .zoomOut {
101
+ cursor: zoom-out;
102
+ }
103
+
104
+ .button {
105
+ position: absolute;
106
+ bottom: var(--zd_size23);
107
+ z-index: 3;
108
+ border: 1px solid var(--zdt_attachmentviewer_button_border);
109
+ }
110
+
111
+ [dir=ltr] .button {
112
+ right: var(--zd_size20);
113
+ }
114
+
115
+ [dir=rtl] .button {
116
+ left: var(--zd_size20);
117
+ }
118
+
119
+ .visible {
120
+ visibility: visible;
121
+ }
122
+
123
+ .hidden {
124
+ visibility: hidden;
125
+ }
126
+
127
+ .footer {
128
+ width: 100%;
129
+ overflow: hidden;
130
+ transition: height var(--zd_transition3);
131
+ background-color: var(--zdt_attachmentviewer_footer_bg)
132
+ }
133
+
134
+ [dir=ltr] .footer {
135
+ padding-right:var(--zd_size68)
136
+ }
137
+
138
+ [dir=rtl] .footer {
139
+ padding-left:var(--zd_size68)
140
+ }
141
+
142
+ .footerHeight {
143
+ height: var(--zd_size75);
144
+ }
145
+
146
+ .footerHide {
147
+ height: 0;
148
+ }
149
+
150
+ .listContainer {
151
+ padding: 0 var(--zd_size18);
152
+ }
153
+
154
+ .imgItem {
155
+ height: var(--zd_size60);
156
+ min-width: var(--zd_size40);
157
+ position: relative;
158
+ transition: border var(--zd_transition3);
159
+ border-width: 2px;
160
+ border-style: solid;
161
+ border-color: var(--dot_mirror);
162
+ border-radius: 3px;
163
+ padding: var(--zd_size2);
164
+ }
165
+
166
+ .imgItem:hover {
167
+ border-color: var(--zdt_attachmentviewer_hover_border);
168
+ }
169
+
170
+ [dir=ltr] .imgItem+.imgItem {
171
+ margin-left: var(--zd_size12);
172
+ }
173
+
174
+ [dir=rtl] .imgItem+.imgItem {
175
+ margin-right: var(--zd_size12);
176
+ }
177
+
178
+ .image {
179
+ cursor: pointer;
180
+ }
181
+
182
+ .selected, .selected:hover {
183
+ border-color: var(--zdt_attachmentviewer_selected_border);
184
+ }
185
+
186
+ .selected::after {
187
+ content: '';
188
+ position: absolute;
189
+ top: 0;
190
+ width: 100%;
191
+ height: 100%;
192
+ opacity: 0.3;
193
+ background-color: var(--zdt_attachmentviewer_selected_after_bg);
194
+ box-shadow: 0 0 4px 2px var(--zdt_attachmentviewer_selected_box_shadow) inset;
195
+ }
196
+
197
+ [dir=ltr] .selected::after {
198
+ left: 0;
199
+ }
200
+
201
+ [dir=rtl] .selected::after {
202
+ right: 0;
203
+ }
204
+
205
+ .zoomIcon {
206
+ font-size: var(--zd_font_size15);
207
+ }
208
+
209
+ .newTabIcon {
210
+ font-size: var(--zd_font_size12);
211
+ }
212
+
213
+ .appIcon {
214
+ font-size: var(--zd_font_size9);
215
+ }
216
+
217
+ .thumpIcon {
218
+ color: var(--zdt_attachmentviewer_title_text);
219
+ transition: transform var(--zd_transition3);
220
+ transform: rotateX(180deg);
221
+ }
222
+
223
+ .thumpIconActive {
224
+ transform: rotateX(0deg);
225
+ }
226
+
227
+ .isAudio {
228
+ composes: audioImage from '../common/dot_common.module.css';
229
+ width: var(--zd_size100);
230
+ background-size: 100% 100%;
231
+ }
232
+
233
+ .isAudio .image {
234
+ opacity: 0;
235
+ }
236
+
237
+ .video {
238
+ position: absolute;
239
+ top: 0;
240
+ bottom: 0;
241
+ margin: auto;
242
+ }
243
+
244
+ [dir=ltr] .video {
245
+ left: 0;
246
+ right: 0;
247
+ }
248
+
249
+ [dir=rtl] .video {
250
+ right: 0;
251
+ left: 0;
252
+ }
253
+
254
+ .imgBox {
255
+ position: absolute;
256
+ transition: var(--zd_transition3) ease-in-out;
257
+ opacity: 0;
258
+ overflow: auto;
259
+ }
260
+
261
+ .imgBox>img {
262
+ object-fit: contain;
263
+ }
264
+
265
+ .imgRef {
266
+ width: 100%;
267
+ height: 100%;
268
+ max-width: 100%;
269
+ max-height: 100%;
270
+ composes: dflex from '~@zohodesk/components/lib/common/common.module.css';
271
+ }
272
+
273
+ .img {
274
+ transition: var(--zd_transition3) ease-in-out;
275
+ margin: auto;
276
+ cursor: zoom-in;
277
+ }
278
+
279
+ .imgRef .normalImg {
280
+ max-width: inherit;
281
+ max-height: inherit;
282
+ cursor: zoom-in;
283
+ }
284
+
285
+ .imgRef .zoomedImg {
286
+ max-width: initial;
287
+ max-height: initial;
288
+ cursor: zoom-out;
289
+ }
290
+
291
+ .previewBox {
292
+ position: relative;
293
+ overflow: hidden;
294
+ }
295
+
296
+ .spinLoad {
297
+ position: absolute;
298
+ composes: middleBoth from '~@zohodesk/components/lib/common/common.module.css';
299
+ height: var(--zd_font_size18);
300
+ width: var(--zd_font_size18);
301
+ }
302
+
303
+ .loader {
304
+ height: 100%;
305
+ width: 100%;
306
+ composes: rotate from '../common/dot_animation.module.css';
307
+ composes: infinite from '~@zohodesk/components/lib/common/animation.module.css';
308
+ border: 2px solid var(--zdt_attachmentviewer_loader_border);
309
+ border-top-color: var(--zdt_attachmentviewer_loader_border_top);
310
+ border-radius: 50%;
311
+ }
312
+
313
+ [dir=ltr] .loader {
314
+ animation-duration: var(--zd_transition8);
315
+ animation-timing-function: linear;
316
+ }
317
+
318
+ [dir=rtl] .loader {
319
+ animation-duration: var(--zd_transition8);
320
+ animation-timing-function: linear;
321
+ }
322
+
323
+ .hide {
324
+ opacity: 0;
325
+ visibility: hidden;
326
+ }
327
+
328
+ .author {
329
+ max-width: var(--zd_size200);
330
+ }
331
+
332
+ [dir=ltr] .author {
333
+ padding-left: var(--zd_size15);
334
+ }
335
+
336
+ [dir=rtl] .author {
337
+ padding-right: var(--zd_size15);
338
+ }
339
+
340
+ .authorName {
341
+ font-size: var(--zd_font_size15);
342
+ color: var(--zdt_attachmentviewer_title_text);
343
+ composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
344
+ margin: 0 var(--zd_size10);
345
+ }
346
+
347
+ .btn {
348
+ height: 100%;
349
+ width: 100%;
350
+ background-color: var(--dot_mirror);
351
+ border: 0;
352
+ cursor: pointer;
353
+ }
354
+
@@ -0,0 +1,134 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ZoomEvent = exports.Zoom = void 0;
7
+
8
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9
+
10
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
11
+
12
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
13
+
14
+ var Zoom = /*#__PURE__*/function () {
15
+ function Zoom() {
16
+ _classCallCheck(this, Zoom);
17
+
18
+ var matrix = [1, 0, 0, 1, 0, 0]; // current view transform
19
+
20
+ this.m = matrix; // alias
21
+
22
+ this.scale = 1; // current scale
23
+
24
+ this.pos = {
25
+ x: 0,
26
+ y: 0
27
+ }; // current position of origin
28
+
29
+ this.dirty = true;
30
+ }
31
+
32
+ _createClass(Zoom, [{
33
+ key: "applyTo",
34
+ value: function applyTo(el) {
35
+ var dirty = this.dirty,
36
+ m = this.m;
37
+
38
+ if (dirty) {
39
+ this.update();
40
+ }
41
+
42
+ el.style.transform = "matrix(".concat(m[0], ",").concat(m[1], ",").concat(m[2], ",").concat(m[3], ",").concat(m[4], ",").concat(m[5], ")");
43
+ el.style.transformOrigin = '0 0';
44
+ }
45
+ }, {
46
+ key: "update",
47
+ value: function update() {
48
+ // m[4], m[5] - need to set transforms based on positions. Currently set to 0 to zoom based on center
49
+ var m = this.m,
50
+ scale = this.scale,
51
+ pos = this.pos;
52
+ this.dirty = false;
53
+ m[3] = m[0] = scale;
54
+ m[2] = m[1] = 0;
55
+ m[4] = pos.x;
56
+ m[5] = pos.y;
57
+ }
58
+ }, {
59
+ key: "pan",
60
+ value: function pan(amount) {
61
+ if (this.dirty) {
62
+ this.update();
63
+ }
64
+
65
+ this.pos.x += amount.x;
66
+ this.pos.y += amount.y;
67
+ this.dirty = true;
68
+ }
69
+ }, {
70
+ key: "scaleAt",
71
+ value: function scaleAt(at, amount) {
72
+ // at in screen coords
73
+ var dirty = this.dirty,
74
+ pos = this.pos;
75
+
76
+ if (dirty) {
77
+ this.update();
78
+ }
79
+
80
+ this.scale *= amount;
81
+ this.pos.x = at.x - (at.x - pos.x) * amount;
82
+ this.pos.y = at.y - (at.y - pos.y) * amount;
83
+ this.dirty = true;
84
+ }
85
+ }]);
86
+
87
+ return Zoom;
88
+ }();
89
+
90
+ exports.Zoom = Zoom;
91
+ ;
92
+
93
+ var ZoomEvent = /*#__PURE__*/function () {
94
+ function ZoomEvent() {
95
+ _classCallCheck(this, ZoomEvent);
96
+
97
+ this.pos = [];
98
+ }
99
+
100
+ _createClass(ZoomEvent, [{
101
+ key: "on",
102
+ value: function on(dir, ele, zoom, event) {
103
+ if (dir === 'in') {
104
+ var x = event.pageX - ele.width / 2;
105
+ var y = event.pageY - ele.height / 2;
106
+ this.pos.push({
107
+ x: x,
108
+ y: y
109
+ });
110
+ zoom.scaleAt({
111
+ x: x,
112
+ y: y
113
+ }, 1.6);
114
+ zoom.applyTo(ele);
115
+ } else if (this.pos.length) {
116
+ var _this$pos$pop = this.pos.pop(),
117
+ _x = _this$pos$pop.x,
118
+ _y = _this$pos$pop.y;
119
+
120
+ zoom.scaleAt({
121
+ x: _x,
122
+ y: _y
123
+ }, 1 / 1.6);
124
+ zoom.applyTo(ele);
125
+ }
126
+
127
+ event.preventDefault();
128
+ }
129
+ }]);
130
+
131
+ return ZoomEvent;
132
+ }();
133
+
134
+ exports.ZoomEvent = ZoomEvent;
@@ -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); }
@@ -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,7 @@ 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();
90
110
  this.setState({
91
111
  isActive: true
92
112
  }, function () {
@@ -95,7 +115,7 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
95
115
  });
96
116
  });
97
117
  } else {
98
- _KeyboardApi.Shortcut && _KeyboardApi.Shortcut.setState(true);
118
+ this.disableFreeze();
99
119
  this.setState({
100
120
  isChildActive: false
101
121
  }, function () {
@@ -106,6 +126,11 @@ var FreezeLayer = /*#__PURE__*/function (_Component) {
106
126
  }
107
127
  }
108
128
  }
129
+ }, {
130
+ key: "componentWillUnmount",
131
+ value: function componentWillUnmount() {
132
+ this.disableFreeze();
133
+ }
109
134
  }, {
110
135
  key: "render",
111
136
  value: function render() {
@@ -59,13 +59,14 @@ var ImportantNotes = /*#__PURE__*/function (_React$Component) {
59
59
  iconSize = _this$props.iconSize,
60
60
  children = _this$props.children,
61
61
  iconClass = _this$props.iconClass,
62
- isCover = _this$props.isCover;
62
+ isCover = _this$props.isCover,
63
+ className = _this$props.className;
63
64
  return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
64
65
  isInline: !isCover,
65
66
  isCover: false,
66
67
  alignBox: "row",
67
68
  align: "top",
68
- className: _ImportantNotesModule["default"].section
69
+ className: "".concat(_ImportantNotesModule["default"].section, " ").concat(className || '')
69
70
  }, iconName ? /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
70
71
  className: _ImportantNotesModule["default"].icon,
71
72
  align: "start"
@@ -90,7 +91,8 @@ ImportantNotes.propTypes = {
90
91
  iconName: _propTypes["default"].string,
91
92
  iconSize: _propTypes["default"].string,
92
93
  isCover: _propTypes["default"].bool,
93
- text: _propTypes["default"].string
94
+ text: _propTypes["default"].string,
95
+ className: _propTypes["default"].string
94
96
  };
95
97
  ImportantNotes.defaultProps = {
96
98
  iconName: 'ZD-helpCentre',
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getDotLibraryConfig = getDotLibraryConfig;
7
+ exports.setDotLibraryConfig = setDotLibraryConfig;
8
+ var config = {
9
+ freezeLayer: {
10
+ enable: function enable() {},
11
+ disable: function disable() {}
12
+ }
13
+ };
14
+
15
+ function getDotLibraryConfig(key) {
16
+ return config[key];
17
+ }
18
+
19
+ function setDotLibraryConfig(configObj) {
20
+ config = Object.assign({}, config, configObj);
21
+ }