vgapp 1.5.7 → 1.5.9

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 (111) hide show
  1. package/app/langs/en/buttons.json +17 -17
  2. package/app/langs/en/messages.json +36 -36
  3. package/app/langs/ru/buttons.json +17 -17
  4. package/app/langs/ru/messages.json +1 -1
  5. package/app/modules/vgalert/js/vgalert.js +15 -12
  6. package/app/modules/vgalert/scss/_variables.scss +16 -16
  7. package/app/modules/vgalert/scss/vgalert.scss +13 -6
  8. package/app/modules/vgcollapse/scss/_variables.scss +7 -7
  9. package/app/modules/vgcollapse/scss/vgcollapse.scss +5 -5
  10. package/app/modules/vgdropdown/scss/_variables.scss +14 -14
  11. package/app/modules/vgdropdown/scss/vgdropdown.scss +5 -5
  12. package/app/modules/vgfilepreview/js/i18n.js +56 -56
  13. package/app/modules/vgfilepreview/js/renderers/image-modal.js +145 -145
  14. package/app/modules/vgfilepreview/js/renderers/image.js +92 -92
  15. package/app/modules/vgfilepreview/js/renderers/index.js +19 -19
  16. package/app/modules/vgfilepreview/js/renderers/office-modal.js +168 -168
  17. package/app/modules/vgfilepreview/js/renderers/office.js +79 -79
  18. package/app/modules/vgfilepreview/js/renderers/pdf-modal.js +260 -260
  19. package/app/modules/vgfilepreview/js/renderers/pdf.js +76 -76
  20. package/app/modules/vgfilepreview/js/renderers/playlist.js +71 -71
  21. package/app/modules/vgfilepreview/js/renderers/text-modal.js +343 -343
  22. package/app/modules/vgfilepreview/js/renderers/text.js +83 -83
  23. package/app/modules/vgfilepreview/js/renderers/zip-modal.js +522 -522
  24. package/app/modules/vgfilepreview/js/renderers/zip.js +89 -89
  25. package/app/modules/vgfilepreview/readme.md +68 -68
  26. package/app/modules/vgfiles/js/base.js +198 -198
  27. package/app/modules/vgfiles/js/droppable.js +17 -17
  28. package/app/modules/vgfiles/js/render.js +153 -153
  29. package/app/modules/vgfiles/js/sortable.js +52 -52
  30. package/app/modules/vgfiles/js/vgfiles.js +43 -43
  31. package/app/modules/vgfiles/readme.md +123 -123
  32. package/app/modules/vgfiles/scss/_mixins.scss +13 -13
  33. package/app/modules/vgfiles/scss/_variables.scss +10 -10
  34. package/app/modules/vgfiles/scss/vgfiles.scss +28 -28
  35. package/app/modules/vgformsender/js/hideshowpass.js +22 -22
  36. package/app/modules/vgformsender/readme.md +1 -1
  37. package/app/modules/vgformsender/scss/_variables.scss +5 -5
  38. package/app/modules/vgformsender/scss/vgformsender.scss +42 -42
  39. package/app/modules/vglawcookie/js/vglawcookie.js +19 -19
  40. package/app/modules/vglawcookie/scss/_variables.scss +13 -13
  41. package/app/modules/vglawcookie/scss/vglawcookie.scss +5 -5
  42. package/app/modules/vgmodal/js/vgmodal.interaction.js +216 -216
  43. package/app/modules/vgmodal/js/vgmodal.js +9 -9
  44. package/app/modules/vgmodal/js/vgmodal.minimized.js +227 -227
  45. package/app/modules/vgmodal/scss/_variables.scss +17 -17
  46. package/app/modules/vgmodal/scss/vgmodal.scss +77 -77
  47. package/app/modules/vgnav/js/vgnav.js +137 -84
  48. package/app/modules/vgnav/scss/_breakpoints.scss +36 -36
  49. package/app/modules/vgnav/scss/_hamburger.scss +5 -5
  50. package/app/modules/vgnav/scss/_placement.scss +5 -5
  51. package/app/modules/vgnav/scss/_toggle.scss +5 -5
  52. package/app/modules/vgnav/scss/_variables.scss +26 -26
  53. package/app/modules/vgnav/scss/vgnav.scss +41 -41
  54. package/app/modules/vgnestable/README.md +39 -39
  55. package/app/modules/vgrangeslider/js/skins.js +8 -8
  56. package/app/modules/vgrangeslider/js/vgrangeslider.js +29 -29
  57. package/app/modules/vgrangeslider/scss/_variables.scss +55 -55
  58. package/app/modules/vgrangeslider/scss/vgrangeslider.scss +239 -239
  59. package/app/modules/vgrollup/js/vgrollup.js +15 -15
  60. package/app/modules/vgrollup/scss/_variables.scss +15 -15
  61. package/app/modules/vgrollup/scss/vgrollup.scss +6 -6
  62. package/app/modules/vgselect/js/handlers.js +6 -6
  63. package/app/modules/vgselect/js/vgselect.js +167 -123
  64. package/app/modules/vgselect/readme.md +11 -11
  65. package/app/modules/vgselect/scss/_variables.scss +51 -51
  66. package/app/modules/vgselect/scss/vgselect.scss +1 -1
  67. package/app/modules/vgsidebar/js/vgsidebar.js +21 -21
  68. package/app/modules/vgsidebar/scss/_variables.scss +10 -10
  69. package/app/modules/vgsidebar/scss/vgsidebar.scss +5 -5
  70. package/app/modules/vgspy/js/vgspy.js +43 -43
  71. package/app/modules/vgtable/js/_filters.js +10 -6
  72. package/app/modules/vgtable/js/_options.js +16 -16
  73. package/app/modules/vgtable/js/_pagination.js +118 -118
  74. package/app/modules/vgtable/js/_responsive.js +79 -79
  75. package/app/modules/vgtable/js/_sticky-header.js +349 -280
  76. package/app/modules/vgtable/js/vgtable.js +98 -98
  77. package/app/modules/vgtable/scss/_fixed-columns.scss +23 -25
  78. package/app/modules/vgtable/scss/_sorting.scss +6 -6
  79. package/app/modules/vgtable/scss/_sticky-header.scss +31 -31
  80. package/app/modules/vgtable/scss/_variables.scss +6 -4
  81. package/app/modules/vgtable/scss/vgtable.scss +8 -4
  82. package/app/modules/vgtabs/js/vgtabs.js +91 -91
  83. package/app/modules/vgtabs/scss/_variables.scss +23 -23
  84. package/app/modules/vgtabs/scss/vgtabs.scss +5 -5
  85. package/app/modules/vgtoast/js/vgtoast.js +4 -4
  86. package/app/modules/vgtoast/scss/_variables.scss +13 -13
  87. package/app/modules/vgtoast/scss/vgtoast.scss +5 -5
  88. package/app/modules/vgtooltip/js/vgtooltip.js +127 -127
  89. package/app/modules/vgtooltip/scss/_variables.scss +10 -10
  90. package/app/modules/vgtooltip/scss/vgtooltip.scss +5 -5
  91. package/app/utils/js/components/audio-metadata.js +240 -240
  92. package/app/utils/js/components/backdrop.js +116 -116
  93. package/app/utils/js/components/file-icon.js +7 -7
  94. package/app/utils/js/components/file-preview.js +304 -304
  95. package/app/utils/js/components/responsive.js +165 -165
  96. package/app/utils/js/components/sanitize.js +150 -150
  97. package/app/utils/js/components/video-metadata.js +140 -140
  98. package/app/utils/scss/_backdrop.scss +5 -5
  99. package/app/utils/scss/_theme-default.scss +12 -12
  100. package/app/utils/scss/_theme.scss +7 -7
  101. package/app/utils/scss/default.scss +9 -9
  102. package/app/utils/scss/functions.scss +21 -21
  103. package/app/utils/scss/index.scss +4 -4
  104. package/app/utils/scss/mixin.scss +16 -16
  105. package/app/utils/scss/variables.scss +147 -147
  106. package/build/vgapp.css +1 -1
  107. package/build/vgapp.css.map +1 -1
  108. package/build/vgapp.js +1 -1
  109. package/build/vgapp.js.map +1 -1
  110. package/index.js +7 -7
  111. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- /**
2
- * Описание: всплывающие подсказки и информационные popover VGApp.
3
- * Возможности: Data API, позиционирование, события и очистка при удалении триггера.
4
- */
5
- import BaseModule from "../../base-module";
1
+ /**
2
+ * Описание: всплывающие подсказки и информационные popover VGApp.
3
+ * Возможности: Data API, позиционирование, события и очистка при удалении триггера.
4
+ */
5
+ import BaseModule from "../../base-module";
6
6
  import {isDisabled, makeRandomString, mergeDeepObject} from "../../../utils/js/functions";
7
7
  import EventHandler from "../../../utils/js/dom/event";
8
8
  import Selectors from "../../../utils/js/dom/selectors";
@@ -84,29 +84,29 @@ class VGTooltip extends BaseModule {
84
84
  constructor(element, params = {}) {
85
85
  super(element, params);
86
86
 
87
- this._params = this._getParams(element, mergeDeepObject(defaultParams, params));
88
- // Геометрические массивы заменяются целиком, а не дополняют defaults.
89
- const dataParams = this._getParams(element, {});
90
- ['offset', 'fallbackPlacements'].forEach(key => {
91
- this._params[key] = [...(dataParams[key] ?? params[key] ?? defaultParams[key])];
92
- });
93
- this._tooltip = null;
94
- this._isHiding = false;
95
- this._showTimeout = null;
96
- this._hideTimeout = null;
97
- this._triggerObserver = null;
87
+ this._params = this._getParams(element, mergeDeepObject(defaultParams, params));
88
+ // Геометрические массивы заменяются целиком, а не дополняют defaults.
89
+ const dataParams = this._getParams(element, {});
90
+ ['offset', 'fallbackPlacements'].forEach(key => {
91
+ this._params[key] = [...(dataParams[key] ?? params[key] ?? defaultParams[key])];
92
+ });
93
+ this._tooltip = null;
94
+ this._isHiding = false;
95
+ this._showTimeout = null;
96
+ this._hideTimeout = null;
97
+ this._triggerObserver = null;
98
98
 
99
99
  this._fixTitle();
100
100
 
101
- this._handleUpdate = () => {
102
- if (!this._element?.isConnected) {
103
- this.dispose();
104
- return;
105
- }
106
-
107
- if (this._isShown()) {
108
- this._setPlacement();
109
- }
101
+ this._handleUpdate = () => {
102
+ if (!this._element?.isConnected) {
103
+ this.dispose();
104
+ return;
105
+ }
106
+
107
+ if (this._isShown()) {
108
+ this._setPlacement();
109
+ }
110
110
  };
111
111
  }
112
112
 
@@ -127,14 +127,14 @@ class VGTooltip extends BaseModule {
127
127
 
128
128
  this._clearTimeouts();
129
129
 
130
- this._showTimeout = setTimeout(() => {
131
- this._showTimeout = null;
132
- if (!this._element?.isConnected) {
133
- this.dispose();
134
- return;
135
- }
136
-
137
- const showEvent = EventHandler.trigger(this._element, EVENT_KEY_SHOW, { relatedTarget });
130
+ this._showTimeout = setTimeout(() => {
131
+ this._showTimeout = null;
132
+ if (!this._element?.isConnected) {
133
+ this.dispose();
134
+ return;
135
+ }
136
+
137
+ const showEvent = EventHandler.trigger(this._element, EVENT_KEY_SHOW, { relatedTarget });
138
138
  if (showEvent.defaultPrevented) return;
139
139
 
140
140
  if (this._params.closeOther) {
@@ -148,11 +148,11 @@ class VGTooltip extends BaseModule {
148
148
 
149
149
  this._tooltip.classList.remove(CLASS_NAME_SHOWN);
150
150
  this._tooltip.classList.add(CLASS_NAME_SHOW);
151
- this._element.classList.add(CLASS_NAME_SHOW);
152
- document.body.classList.add(CLASS_NAME_OPEN);
153
-
154
- this._addWindowListeners();
155
- this._observeTrigger();
151
+ this._element.classList.add(CLASS_NAME_SHOW);
152
+ document.body.classList.add(CLASS_NAME_OPEN);
153
+
154
+ this._addWindowListeners();
155
+ this._observeTrigger();
156
156
 
157
157
  requestAnimationFrame(() => {
158
158
  if (!this._tooltip) return;
@@ -169,21 +169,21 @@ class VGTooltip extends BaseModule {
169
169
  }, this._params.delay.show);
170
170
  }
171
171
 
172
- hide() {
173
- this._clearTimeouts();
174
-
175
- if (!this._isShown() || this._isHiding || !this._tooltip) return;
176
-
177
- this._disconnectTriggerObserver();
172
+ hide() {
173
+ this._clearTimeouts();
174
+
175
+ if (!this._isShown() || this._isHiding || !this._tooltip) return;
176
+
177
+ this._disconnectTriggerObserver();
178
178
 
179
179
  this._hideTimeout = setTimeout(() => {
180
180
  this._hideTimeout = null;
181
181
 
182
- const hideEvent = EventHandler.trigger(this._element, EVENT_KEY_HIDE);
183
- if (hideEvent.defaultPrevented) {
184
- this._observeTrigger();
185
- return;
186
- }
182
+ const hideEvent = EventHandler.trigger(this._element, EVENT_KEY_HIDE);
183
+ if (hideEvent.defaultPrevented) {
184
+ this._observeTrigger();
185
+ return;
186
+ }
187
187
 
188
188
  this._removeWindowListeners();
189
189
 
@@ -210,31 +210,31 @@ class VGTooltip extends BaseModule {
210
210
  }, this._params.delay.hide);
211
211
  }
212
212
 
213
- dispose() {
214
- this._clearTimeouts();
215
- this._removeWindowListeners();
216
- this._disconnectTriggerObserver();
217
-
218
- if (this._tooltip) {
219
- this._tooltip.remove();
220
- this._tooltip = null;
221
- }
222
-
223
- if (this._element) {
224
- this._element.classList.remove(CLASS_NAME_SHOW, CLASS_NAME_SHOWN);
225
- this._element.removeAttribute('aria-describedby');
226
-
227
- if (Object.prototype.hasOwnProperty.call(this._element.dataset, 'vgOriginalTitle')) {
228
- this._element.setAttribute('title', this._element.dataset.vgOriginalTitle);
229
- this._element.removeAttribute('data-vg-original-title');
230
- }
231
- }
232
-
233
- if (!Selectors.find('.vg-tooltip.show')) {
234
- document.body.classList.remove(CLASS_NAME_OPEN);
235
- }
236
-
237
- super.dispose();
213
+ dispose() {
214
+ this._clearTimeouts();
215
+ this._removeWindowListeners();
216
+ this._disconnectTriggerObserver();
217
+
218
+ if (this._tooltip) {
219
+ this._tooltip.remove();
220
+ this._tooltip = null;
221
+ }
222
+
223
+ if (this._element) {
224
+ this._element.classList.remove(CLASS_NAME_SHOW, CLASS_NAME_SHOWN);
225
+ this._element.removeAttribute('aria-describedby');
226
+
227
+ if (Object.prototype.hasOwnProperty.call(this._element.dataset, 'vgOriginalTitle')) {
228
+ this._element.setAttribute('title', this._element.dataset.vgOriginalTitle);
229
+ this._element.removeAttribute('data-vg-original-title');
230
+ }
231
+ }
232
+
233
+ if (!Selectors.find('.vg-tooltip.show')) {
234
+ document.body.classList.remove(CLASS_NAME_OPEN);
235
+ }
236
+
237
+ super.dispose();
238
238
  }
239
239
 
240
240
  _isShown() {
@@ -258,11 +258,11 @@ class VGTooltip extends BaseModule {
258
258
  tooltip.classList.add('vg-tooltip-popover');
259
259
  }
260
260
 
261
- const inner = document.createElement('div');
262
- inner.classList.add('vg-tooltip-inner');
263
- const content = this._params.content || this._element.dataset.vgContent || '';
264
-
265
- if (content) {
261
+ const inner = document.createElement('div');
262
+ inner.classList.add('vg-tooltip-inner');
263
+ const content = this._params.content || this._element.dataset.vgContent || '';
264
+
265
+ if (content) {
266
266
  const titleBlock = document.createElement('div');
267
267
  titleBlock.classList.add('vg-tooltip-inner--title');
268
268
 
@@ -271,10 +271,10 @@ class VGTooltip extends BaseModule {
271
271
 
272
272
  if (this._params.html) {
273
273
  titleBlock.innerHTML = title;
274
- contentBlock.innerHTML = content;
274
+ contentBlock.innerHTML = content;
275
275
  } else {
276
276
  titleBlock.textContent = title;
277
- contentBlock.textContent = content;
277
+ contentBlock.textContent = content;
278
278
  }
279
279
 
280
280
  inner.append(titleBlock);
@@ -316,10 +316,10 @@ class VGTooltip extends BaseModule {
316
316
  );
317
317
  }
318
318
 
319
- _fixTitle() {
320
- const title = this._element.getAttribute('title');
321
-
322
- if (title === null) return;
319
+ _fixTitle() {
320
+ const title = this._element.getAttribute('title');
321
+
322
+ if (title === null) return;
323
323
 
324
324
  this._element.setAttribute('data-vg-original-title', title);
325
325
  this._element.removeAttribute('title');
@@ -418,48 +418,48 @@ class VGTooltip extends BaseModule {
418
418
  }
419
419
  }
420
420
 
421
- _hideOpenedTooltips() {
422
- Selectors.findAll('.vg-tooltip.show').forEach(tooltip => {
423
- const id = tooltip.id;
424
- const trigger = Selectors.find(`[aria-describedby="${id}"]`);
425
-
426
- if (!trigger) {
427
- tooltip.remove();
428
- return;
429
- }
430
-
431
- if (trigger === this._element) return;
432
-
433
- const instance = VGTooltip.getInstance(trigger);
434
- instance?.hide();
435
- });
436
-
437
- if (!Selectors.find('.vg-tooltip.show')) {
438
- document.body.classList.remove(CLASS_NAME_OPEN);
439
- }
440
- }
441
-
442
- _observeTrigger() {
443
- if (this._triggerObserver || !this._element?.isConnected) return;
444
-
445
- this._triggerObserver = new MutationObserver(() => {
446
- if (!this._element?.isConnected) {
447
- this.dispose();
448
- }
449
- });
450
-
451
- this._triggerObserver.observe(document.body, {
452
- childList: true,
453
- subtree: true
454
- });
455
- }
456
-
457
- _disconnectTriggerObserver() {
458
- if (!this._triggerObserver) return;
459
-
460
- this._triggerObserver.disconnect();
461
- this._triggerObserver = null;
462
- }
421
+ _hideOpenedTooltips() {
422
+ Selectors.findAll('.vg-tooltip.show').forEach(tooltip => {
423
+ const id = tooltip.id;
424
+ const trigger = Selectors.find(`[aria-describedby="${id}"]`);
425
+
426
+ if (!trigger) {
427
+ tooltip.remove();
428
+ return;
429
+ }
430
+
431
+ if (trigger === this._element) return;
432
+
433
+ const instance = VGTooltip.getInstance(trigger);
434
+ instance?.hide();
435
+ });
436
+
437
+ if (!Selectors.find('.vg-tooltip.show')) {
438
+ document.body.classList.remove(CLASS_NAME_OPEN);
439
+ }
440
+ }
441
+
442
+ _observeTrigger() {
443
+ if (this._triggerObserver || !this._element?.isConnected) return;
444
+
445
+ this._triggerObserver = new MutationObserver(() => {
446
+ if (!this._element?.isConnected) {
447
+ this.dispose();
448
+ }
449
+ });
450
+
451
+ this._triggerObserver.observe(document.body, {
452
+ childList: true,
453
+ subtree: true
454
+ });
455
+ }
456
+
457
+ _disconnectTriggerObserver() {
458
+ if (!this._triggerObserver) return;
459
+
460
+ this._triggerObserver.disconnect();
461
+ this._triggerObserver = null;
462
+ }
463
463
 
464
464
  _addWindowListeners() {
465
465
  window.addEventListener('resize', this._handleUpdate);
@@ -1,17 +1,17 @@
1
- @use "../../../utils/scss" as vg;
2
-
3
- $tooltip-map: (
4
- zindex: 1080,
1
+ @use "../../../utils/scss" as vg;
2
+
3
+ $tooltip-map: (
4
+ zindex: 1080,
5
5
  max-width: 260px,
6
6
  padding: 8px 12px,
7
7
  font-size: 13px,
8
8
  line-height: 1.4,
9
- color: var(--vg-text-inverse-color, #ffffff),
10
- background: var(--vg-surface-inverse-bg, rgba(30, 30, 30, .95)),
11
- border-radius: 6px,
12
- box-shadow: 0 6px 20px var(--vg-shadow-soft-color, rgba(0, 0, 0, .18)),
9
+ color: var(--vg-text-inverse-color, #ffffff),
10
+ background: var(--vg-surface-inverse-bg, rgba(30, 30, 30, .95)),
11
+ border-radius: 6px,
12
+ box-shadow: 0 6px 20px var(--vg-shadow-soft-color, rgba(0, 0, 0, .18)),
13
13
  word-break: break-word,
14
14
  arrow-width: 8px,
15
15
  arrow-height: 8px,
16
- border-color: var(--vg-border-color, #{vg.$border-color}),
17
- ) !default;
16
+ border-color: var(--vg-border-color, #{vg.$border-color}),
17
+ ) !default;
@@ -6,12 +6,12 @@
6
6
  *--------------------------------------------------------------------------
7
7
  **/
8
8
 
9
- @forward "variables";
10
- @use "../../../utils/scss" as vg;
11
- @use "variables" as vars;
9
+ @forward "variables";
10
+ @use "../../../utils/scss" as vg;
11
+ @use "variables" as vars;
12
12
 
13
13
  .vg-tooltip {
14
- @include vg.mix-vars('tooltip', vars.$tooltip-map);
14
+ @include vg.mix-vars('tooltip', vars.$tooltip-map);
15
15
  position: absolute;
16
16
  z-index: var(--vg-tooltip-zindex);
17
17
  pointer-events: none;
@@ -60,4 +60,4 @@
60
60
  }
61
61
  }
62
62
  }
63
- }
63
+ }