vgapp 1.4.4 → 1.4.6

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 (123) hide show
  1. package/README.md +270 -270
  2. package/app/langs/en/buttons.json +17 -17
  3. package/app/langs/en/messages.json +36 -36
  4. package/app/langs/ru/buttons.json +17 -17
  5. package/app/langs/ru/messages.json +36 -36
  6. package/app/modules/vgalert/js/vgalert.js +266 -266
  7. package/app/modules/vgalert/scss/_variables.scss +16 -16
  8. package/app/modules/vgalert/scss/vgalert.scss +107 -107
  9. package/app/modules/vgcollapse/scss/_variables.scss +7 -7
  10. package/app/modules/vgcollapse/scss/vgcollapse.scss +5 -5
  11. package/app/modules/vgdropdown/scss/_variables.scss +14 -14
  12. package/app/modules/vgdropdown/scss/vgdropdown.scss +5 -5
  13. package/app/modules/vgdynamictable/index.js +4 -4
  14. package/app/modules/vgdynamictable/js/filters.js +21 -21
  15. package/app/modules/vgdynamictable/js/fixed.js +179 -179
  16. package/app/modules/vgdynamictable/js/options.js +3 -3
  17. package/app/modules/vgdynamictable/js/pagination.js +1 -1
  18. package/app/modules/vgdynamictable/js/search.js +12 -12
  19. package/app/modules/vgdynamictable/js/skeleton.js +27 -19
  20. package/app/modules/vgdynamictable/js/sortable.js +71 -71
  21. package/app/modules/vgdynamictable/js/summary-footer.js +28 -28
  22. package/app/modules/vgdynamictable/js/table-url-state.js +31 -31
  23. package/app/modules/vgdynamictable/js/utils/common.js +48 -48
  24. package/app/modules/vgdynamictable/js/vgdynamictable.js +79 -79
  25. package/app/modules/vgdynamictable/scss/_actions.scss +19 -19
  26. package/app/modules/vgdynamictable/scss/_pagination.scss +5 -5
  27. package/app/modules/vgdynamictable/scss/_skeleton.scss +11 -11
  28. package/app/modules/vgdynamictable/scss/_sortable.scss +28 -28
  29. package/app/modules/vgdynamictable/scss/_table.scss +7 -30
  30. package/app/modules/vgdynamictable/scss/_variables.scss +46 -46
  31. package/app/modules/vgdynamictable/scss/vgdynamictable.scss +28 -36
  32. package/app/modules/vgfilepreview/js/i18n.js +56 -56
  33. package/app/modules/vgfilepreview/js/renderers/image-modal.js +145 -145
  34. package/app/modules/vgfilepreview/js/renderers/image.js +92 -92
  35. package/app/modules/vgfilepreview/js/renderers/index.js +19 -19
  36. package/app/modules/vgfilepreview/js/renderers/office-modal.js +168 -168
  37. package/app/modules/vgfilepreview/js/renderers/office.js +79 -79
  38. package/app/modules/vgfilepreview/js/renderers/pdf-modal.js +260 -260
  39. package/app/modules/vgfilepreview/js/renderers/pdf.js +76 -76
  40. package/app/modules/vgfilepreview/js/renderers/playlist.js +71 -71
  41. package/app/modules/vgfilepreview/js/renderers/text-modal.js +343 -343
  42. package/app/modules/vgfilepreview/js/renderers/text.js +83 -83
  43. package/app/modules/vgfilepreview/js/renderers/video-modal.js +272 -272
  44. package/app/modules/vgfilepreview/js/renderers/video.js +80 -80
  45. package/app/modules/vgfilepreview/js/renderers/zip-modal.js +522 -522
  46. package/app/modules/vgfilepreview/js/renderers/zip.js +89 -89
  47. package/app/modules/vgfilepreview/js/vgfilepreview.js +7 -7
  48. package/app/modules/vgfilepreview/readme.md +68 -68
  49. package/app/modules/vgfilepreview/scss/_variables.scss +115 -115
  50. package/app/modules/vgfilepreview/scss/vgfilepreview.scss +463 -463
  51. package/app/modules/vgfiles/js/droppable.js +20 -9
  52. package/app/modules/vgfiles/js/render.js +153 -153
  53. package/app/modules/vgfiles/js/vgfiles.js +104 -104
  54. package/app/modules/vgfiles/readme.md +123 -123
  55. package/app/modules/vgfiles/scss/_mixins.scss +9 -9
  56. package/app/modules/vgfiles/scss/_variables.scss +41 -41
  57. package/app/modules/vgfiles/scss/vgfiles.scss +161 -161
  58. package/app/modules/vgformsender/js/hideshowpass.js +21 -16
  59. package/app/modules/vgformsender/js/vgformsender.js +4 -6
  60. package/app/modules/vgformsender/readme.md +1 -1
  61. package/app/modules/vgformsender/scss/_variables.scss +5 -5
  62. package/app/modules/vgformsender/scss/vgformsender.scss +42 -42
  63. package/app/modules/vglawcookie/js/vglawcookie.js +11 -8
  64. package/app/modules/vglawcookie/scss/_variables.scss +13 -13
  65. package/app/modules/vglawcookie/scss/vglawcookie.scss +5 -5
  66. package/app/modules/vgmodal/js/vgmodal.interaction.js +216 -216
  67. package/app/modules/vgmodal/js/vgmodal.js +355 -355
  68. package/app/modules/vgmodal/js/vgmodal.minimized.js +227 -227
  69. package/app/modules/vgmodal/scss/_variables.scss +17 -17
  70. package/app/modules/vgmodal/scss/vgmodal.scss +77 -77
  71. package/app/modules/vgnav/js/vgnav.js +180 -180
  72. package/app/modules/vgnav/scss/_breakpoints.scss +36 -36
  73. package/app/modules/vgnav/scss/_hamburger.scss +5 -5
  74. package/app/modules/vgnav/scss/_placement.scss +5 -5
  75. package/app/modules/vgnav/scss/_toggle.scss +5 -5
  76. package/app/modules/vgnav/scss/_variables.scss +26 -26
  77. package/app/modules/vgnav/scss/vgnav.scss +41 -41
  78. package/app/modules/vgnestable/README.md +39 -39
  79. package/app/modules/vgnestable/js/vgnestable.js +358 -358
  80. package/app/modules/vgnestable/scss/_variables.scss +35 -35
  81. package/app/modules/vgnestable/scss/vgnestable.scss +55 -55
  82. package/app/modules/vgrangeslider/js/skins.js +222 -222
  83. package/app/modules/vgrangeslider/js/vgrangeslider.js +704 -704
  84. package/app/modules/vgrangeslider/scss/_variables.scss +55 -55
  85. package/app/modules/vgrangeslider/scss/vgrangeslider.scss +239 -239
  86. package/app/modules/vgrollup/scss/_variables.scss +15 -15
  87. package/app/modules/vgrollup/scss/vgrollup.scss +6 -6
  88. package/app/modules/vgselect/js/vgselect.js +129 -129
  89. package/app/modules/vgselect/readme.md +11 -11
  90. package/app/modules/vgselect/scss/_variables.scss +50 -50
  91. package/app/modules/vgselect/scss/vgselect.scss +48 -48
  92. package/app/modules/vgsidebar/js/vgsidebar.js +79 -79
  93. package/app/modules/vgsidebar/scss/_variables.scss +10 -10
  94. package/app/modules/vgsidebar/scss/vgsidebar.scss +5 -5
  95. package/app/modules/vgtabs/scss/_variables.scss +23 -23
  96. package/app/modules/vgtabs/scss/vgtabs.scss +5 -5
  97. package/app/modules/vgtoast/scss/_variables.scss +13 -13
  98. package/app/modules/vgtoast/scss/vgtoast.scss +5 -5
  99. package/app/modules/vgtooltip/js/vgtooltip.js +107 -51
  100. package/app/modules/vgtooltip/scss/_variables.scss +10 -10
  101. package/app/modules/vgtooltip/scss/vgtooltip.scss +5 -5
  102. package/app/utils/js/components/audio-metadata.js +240 -240
  103. package/app/utils/js/components/backdrop.js +116 -116
  104. package/app/utils/js/components/file-icon.js +109 -109
  105. package/app/utils/js/components/file-preview.js +304 -304
  106. package/app/utils/js/components/sanitize.js +150 -150
  107. package/app/utils/js/components/video-metadata.js +140 -140
  108. package/app/utils/scss/_backdrop.scss +5 -5
  109. package/app/utils/scss/_theme-default.scss +12 -12
  110. package/app/utils/scss/_theme.scss +7 -7
  111. package/app/utils/scss/_tokens.scss +170 -170
  112. package/app/utils/scss/default.scss +9 -9
  113. package/app/utils/scss/functions.scss +21 -21
  114. package/app/utils/scss/index.scss +4 -4
  115. package/app/utils/scss/mixin.scss +16 -16
  116. package/app/utils/scss/variables.scss +105 -105
  117. package/app/vgapp.js +295 -295
  118. package/build/vgapp.css +1 -1
  119. package/build/vgapp.css.map +1 -1
  120. package/build/vgapp.js +1 -1
  121. package/build/vgapp.js.map +1 -1
  122. package/index.scss +20 -20
  123. package/package.json +4 -2
@@ -13,56 +13,56 @@ const fixedColumnsMethods = {
13
13
  return String(raw || '').trim();
14
14
  },
15
15
 
16
- _hasFixedColumnsConfig() {
17
- const attr = this._getFixedColumnsConfigRaw();
18
- if (attr !== '') {
19
- return true;
20
- }
16
+ _hasFixedColumnsConfig() {
17
+ const attr = this._getFixedColumnsConfigRaw();
18
+ if (attr !== '') {
19
+ return true;
20
+ }
21
21
  const headers = this._element && this._element.tHead
22
22
  ? Array.from(this._element.tHead.querySelectorAll('th'))
23
23
  : [];
24
24
  return headers.some((header) => {
25
25
  const fixedAttr = String(header.getAttribute('data-fixed') || '').toLowerCase().trim();
26
26
  const fixedColumnAttr = String(header.getAttribute('data-fixed-column') || '').toLowerCase().trim();
27
- return fixedAttr === 'left' || fixedAttr === 'right' || fixedColumnAttr === 'left' || fixedColumnAttr === 'right';
28
- });
29
- },
30
-
31
- _buildFixedColumnsStateMap(fixed) {
32
- const state = new Map();
33
- const left = Array.isArray(fixed && fixed.left) ? fixed.left : [];
34
- const right = Array.isArray(fixed && fixed.right) ? fixed.right : [];
35
- left.forEach((index) => {
36
- if (Number.isInteger(index) && index >= 0) {
37
- state.set(index, 'left');
38
- }
39
- });
40
- right.forEach((index) => {
41
- if (Number.isInteger(index) && index >= 0 && !state.has(index)) {
42
- state.set(index, 'right');
43
- }
44
- });
45
- return state;
46
- },
47
-
48
- _collectFixedColumnsTransitions(nextState) {
49
- const previousState = this._fixedColumnsLastStateMap instanceof Map
50
- ? this._fixedColumnsLastStateMap
51
- : new Map();
52
- const transitions = [];
53
- nextState.forEach((side, index) => {
54
- if (previousState.get(index) !== side) {
55
- transitions.push({ index, side });
56
- }
57
- });
58
- this._fixedColumnsLastStateMap = nextState;
59
- return transitions;
60
- },
61
-
62
- _applyFixedColumnsLayout() {
63
- if (!this._element) {
64
- return;
65
- }
27
+ return fixedAttr === 'left' || fixedAttr === 'right' || fixedColumnAttr === 'left' || fixedColumnAttr === 'right';
28
+ });
29
+ },
30
+
31
+ _buildFixedColumnsStateMap(fixed) {
32
+ const state = new Map();
33
+ const left = Array.isArray(fixed && fixed.left) ? fixed.left : [];
34
+ const right = Array.isArray(fixed && fixed.right) ? fixed.right : [];
35
+ left.forEach((index) => {
36
+ if (Number.isInteger(index) && index >= 0) {
37
+ state.set(index, 'left');
38
+ }
39
+ });
40
+ right.forEach((index) => {
41
+ if (Number.isInteger(index) && index >= 0 && !state.has(index)) {
42
+ state.set(index, 'right');
43
+ }
44
+ });
45
+ return state;
46
+ },
47
+
48
+ _collectFixedColumnsTransitions(nextState) {
49
+ const previousState = this._fixedColumnsLastStateMap instanceof Map
50
+ ? this._fixedColumnsLastStateMap
51
+ : new Map();
52
+ const transitions = [];
53
+ nextState.forEach((side, index) => {
54
+ if (previousState.get(index) !== side) {
55
+ transitions.push({ index, side });
56
+ }
57
+ });
58
+ this._fixedColumnsLastStateMap = nextState;
59
+ return transitions;
60
+ },
61
+
62
+ _applyFixedColumnsLayout() {
63
+ if (!this._element) {
64
+ return;
65
+ }
66
66
  const suppressFixedColumns = Boolean(this._fixedColumnsSuppressed);
67
67
 
68
68
  const sourceHeaders = this._element.tHead ? Array.from(this._element.tHead.querySelectorAll('th')) : [];
@@ -74,40 +74,40 @@ const fixedColumnsMethods = {
74
74
  ? { left: [], right: [] }
75
75
  : this._applyMobileFixedColumnsGuard(this._element, sourceFixedRaw);
76
76
  const hasSourceFixed = sourceFixed.left.length > 0 || sourceFixed.right.length > 0;
77
- this._element.classList.toggle('table-fixed-cols', hasSourceFixed);
78
- if (this._parent) {
79
- this._parent.classList.toggle('table-fixed-cols', hasSourceFixed);
80
- }
81
- const sourceFixedTransitions = this._collectFixedColumnsTransitions(
82
- this._buildFixedColumnsStateMap(sourceFixed)
83
- );
84
- this._applyFixedColumnsToTable(this._element, sourceFixed, {
85
- includeBody: true,
86
- emitAction: true,
87
- transitionedColumns: sourceFixedTransitions,
88
- });
89
- this._toggleFixedColumnsScrollBinding(hasSourceFixed);
90
-
91
- const cloneTable = this._cloneStickyState && this._cloneStickyState.table
92
- ? this._cloneStickyState.table
93
- : null;
77
+ this._element.classList.toggle('table-fixed-cols', hasSourceFixed);
78
+ if (this._parent) {
79
+ this._parent.classList.toggle('table-fixed-cols', hasSourceFixed);
80
+ }
81
+ const sourceFixedTransitions = this._collectFixedColumnsTransitions(
82
+ this._buildFixedColumnsStateMap(sourceFixed)
83
+ );
84
+ this._applyFixedColumnsToTable(this._element, sourceFixed, {
85
+ includeBody: true,
86
+ emitAction: true,
87
+ transitionedColumns: sourceFixedTransitions,
88
+ });
89
+ this._toggleFixedColumnsScrollBinding(hasSourceFixed);
90
+
91
+ const cloneTable = this._cloneStickyState && this._cloneStickyState.table
92
+ ? this._cloneStickyState.table
93
+ : null;
94
94
  if (cloneTable) {
95
95
  const cloneHeaders = cloneTable.tHead ? Array.from(cloneTable.tHead.querySelectorAll('th')) : [];
96
96
  const cloneFixedRaw = this._getFixedColumnsByHeaders(cloneHeaders, {
97
97
  parseTableAttr: false,
98
98
  fallbackByPosition: false,
99
99
  });
100
- const cloneFixed = hasSourceFixed
101
- ? this._applyMobileFixedColumnsGuard(cloneTable, cloneFixedRaw)
102
- : { left: [], right: [] };
103
- this._applyFixedColumnsToTable(cloneTable, cloneFixed, {
104
- includeBody: false,
105
- emitAction: false,
106
- });
107
- }
108
- this._rebuildFixedColumnsCellsCache();
109
- this._syncFixedColumnsScroll({ immediate: true });
110
- },
100
+ const cloneFixed = hasSourceFixed
101
+ ? this._applyMobileFixedColumnsGuard(cloneTable, cloneFixedRaw)
102
+ : { left: [], right: [] };
103
+ this._applyFixedColumnsToTable(cloneTable, cloneFixed, {
104
+ includeBody: false,
105
+ emitAction: false,
106
+ });
107
+ }
108
+ this._rebuildFixedColumnsCellsCache();
109
+ this._syncFixedColumnsScroll({ immediate: true });
110
+ },
111
111
 
112
112
  _applyMobileFixedColumnsGuard(table, fixed) {
113
113
  const next = {
@@ -234,19 +234,19 @@ const fixedColumnsMethods = {
234
234
  return { left, right };
235
235
  },
236
236
 
237
- _applyFixedColumnsToTable(table, fixed, options = {}) {
238
- if (!table) {
239
- return;
240
- }
241
- const includeBody = options.includeBody !== false;
242
- const shouldEmitAction = options.emitAction !== false;
243
- const transitionedColumns = Array.isArray(options.transitionedColumns)
244
- ? options.transitionedColumns
245
- : [];
246
- const sections = [];
247
- if (table.tHead) {
248
- sections.push(table.tHead);
249
- }
237
+ _applyFixedColumnsToTable(table, fixed, options = {}) {
238
+ if (!table) {
239
+ return;
240
+ }
241
+ const includeBody = options.includeBody !== false;
242
+ const shouldEmitAction = options.emitAction !== false;
243
+ const transitionedColumns = Array.isArray(options.transitionedColumns)
244
+ ? options.transitionedColumns
245
+ : [];
246
+ const sections = [];
247
+ if (table.tHead) {
248
+ sections.push(table.tHead);
249
+ }
250
250
  if (includeBody && table.tBodies && table.tBodies.length) {
251
251
  sections.push(...Array.from(table.tBodies));
252
252
  }
@@ -282,17 +282,17 @@ const fixedColumnsMethods = {
282
282
  ? viewportMetrics.effectiveWidth
283
283
  : tableRect.width;
284
284
  const metrics = {};
285
- headerCells.forEach((cell, index) => {
286
- const rect = cell.getBoundingClientRect();
287
- metrics[index] = {
288
- width: Math.max(0, rect.width),
289
- left: Math.max(0, rect.left - tableRect.left),
290
- height: Math.max(0, rect.height),
291
- top: Math.max(0, rect.top - tableRect.top),
292
- };
293
- });
294
- const leftOffsets = {};
295
- let leftOffset = 0;
285
+ headerCells.forEach((cell, index) => {
286
+ const rect = cell.getBoundingClientRect();
287
+ metrics[index] = {
288
+ width: Math.max(0, rect.width),
289
+ left: Math.max(0, rect.left - tableRect.left),
290
+ height: Math.max(0, rect.height),
291
+ top: Math.max(0, rect.top - tableRect.top),
292
+ };
293
+ });
294
+ const leftOffsets = {};
295
+ let leftOffset = 0;
296
296
  fixed.left.forEach((index) => {
297
297
  const width = metrics[index] ? metrics[index].width : 0;
298
298
  leftOffsets[index] = leftOffset;
@@ -318,10 +318,10 @@ const fixedColumnsMethods = {
318
318
  if (!cell) {
319
319
  return;
320
320
  }
321
- const metric = metrics[index] || { left: 0 };
322
- const baseShift = leftOffsets[index] - metric.left;
323
- cell.setAttribute('data-fixed-side', 'left');
324
- cell.setAttribute('data-fixed-shift', String(baseShift));
321
+ const metric = metrics[index] || { left: 0 };
322
+ const baseShift = leftOffsets[index] - metric.left;
323
+ cell.setAttribute('data-fixed-side', 'left');
324
+ cell.setAttribute('data-fixed-shift', String(baseShift));
325
325
  cell.style.zIndex = String(zIndex);
326
326
  if (index === leftEdgeIndex) {
327
327
  cell.setAttribute('data-fixed-edge', 'right');
@@ -333,83 +333,83 @@ const fixedColumnsMethods = {
333
333
  if (!cell) {
334
334
  return;
335
335
  }
336
- const metric = metrics[index] || { left: 0, width: 0 };
337
- const desiredLeft = viewportWidth - rightOffsets[index] - metric.width;
338
- const baseShift = desiredLeft - metric.left;
339
- cell.setAttribute('data-fixed-side', 'right');
336
+ const metric = metrics[index] || { left: 0, width: 0 };
337
+ const desiredLeft = viewportWidth - rightOffsets[index] - metric.width;
338
+ const baseShift = desiredLeft - metric.left;
339
+ cell.setAttribute('data-fixed-side', 'right');
340
340
  cell.setAttribute('data-fixed-shift', String(baseShift));
341
341
  cell.style.zIndex = String(zIndex);
342
342
  if (index === rightEdgeIndex) {
343
343
  cell.setAttribute('data-fixed-edge', 'left');
344
- }
345
- });
346
- });
347
-
348
- if (!shouldEmitAction || typeof this._emitAction !== 'function' || !transitionedColumns.length) {
349
- return;
350
- }
351
-
352
- transitionedColumns.forEach((entry) => {
353
- const index = Number.isInteger(entry && entry.index) ? entry.index : -1;
354
- const side = entry && (entry.side === 'left' || entry.side === 'right')
355
- ? entry.side
356
- : '';
357
- const headerCell = index >= 0 && index < headerCells.length
358
- ? headerCells[index]
359
- : null;
360
- if (!headerCell || !side) {
361
- return;
362
- }
363
-
364
- const metric = metrics[index] || { left: 0, width: 0, top: 0, height: 0 };
365
- const width = metric.width || 0;
366
- const height = metric.height || 0;
367
- const left = side === 'left'
368
- ? (leftOffsets[index] || 0)
369
- : Math.max(0, viewportWidth - (rightOffsets[index] || 0) - width);
370
- const right = side === 'right'
371
- ? (rightOffsets[index] || 0)
372
- : Math.max(0, viewportWidth - left - width);
373
- const top = metric.top || 0;
374
- const bottom = Math.max(0, tableRect.height - top - height);
375
- const field = String(headerCell.getAttribute('data-field') || '').trim();
376
- const fallbackBaseShift = left - (metric.left || 0);
377
- const attrBaseShift = Number.parseFloat(headerCell.getAttribute('data-fixed-shift') || '');
378
- const baseShift = Number.isFinite(attrBaseShift) ? attrBaseShift : fallbackBaseShift;
379
- const scrollLeft = this._tableViewport ? (this._tableViewport.scrollLeft || 0) : 0;
380
- const fixedAtTs = Date.now();
381
-
382
- this._emitAction('columnfixed', {
383
- columnIndex: index,
384
- side,
385
- phase: 'fixed',
386
- field,
387
- column: {
388
- index,
389
- side,
390
- field,
391
- width,
392
- height,
393
- element: headerCell,
394
- },
395
- offsets: {
396
- left,
397
- right,
398
- top,
399
- bottom,
400
- },
401
- shift: {
402
- base: baseShift,
403
- current: baseShift + scrollLeft,
404
- scrollLeft,
405
- },
406
- fixedAt: {
407
- timestamp: fixedAtTs,
408
- iso: new Date(fixedAtTs).toISOString(),
409
- },
410
- });
411
- });
412
- },
344
+ }
345
+ });
346
+ });
347
+
348
+ if (!shouldEmitAction || typeof this._emitAction !== 'function' || !transitionedColumns.length) {
349
+ return;
350
+ }
351
+
352
+ transitionedColumns.forEach((entry) => {
353
+ const index = Number.isInteger(entry && entry.index) ? entry.index : -1;
354
+ const side = entry && (entry.side === 'left' || entry.side === 'right')
355
+ ? entry.side
356
+ : '';
357
+ const headerCell = index >= 0 && index < headerCells.length
358
+ ? headerCells[index]
359
+ : null;
360
+ if (!headerCell || !side) {
361
+ return;
362
+ }
363
+
364
+ const metric = metrics[index] || { left: 0, width: 0, top: 0, height: 0 };
365
+ const width = metric.width || 0;
366
+ const height = metric.height || 0;
367
+ const left = side === 'left'
368
+ ? (leftOffsets[index] || 0)
369
+ : Math.max(0, viewportWidth - (rightOffsets[index] || 0) - width);
370
+ const right = side === 'right'
371
+ ? (rightOffsets[index] || 0)
372
+ : Math.max(0, viewportWidth - left - width);
373
+ const top = metric.top || 0;
374
+ const bottom = Math.max(0, tableRect.height - top - height);
375
+ const field = String(headerCell.getAttribute('data-field') || '').trim();
376
+ const fallbackBaseShift = left - (metric.left || 0);
377
+ const attrBaseShift = Number.parseFloat(headerCell.getAttribute('data-fixed-shift') || '');
378
+ const baseShift = Number.isFinite(attrBaseShift) ? attrBaseShift : fallbackBaseShift;
379
+ const scrollLeft = this._tableViewport ? (this._tableViewport.scrollLeft || 0) : 0;
380
+ const fixedAtTs = Date.now();
381
+
382
+ this._emitAction('columnfixed', {
383
+ columnIndex: index,
384
+ side,
385
+ phase: 'fixed',
386
+ field,
387
+ column: {
388
+ index,
389
+ side,
390
+ field,
391
+ width,
392
+ height,
393
+ element: headerCell,
394
+ },
395
+ offsets: {
396
+ left,
397
+ right,
398
+ top,
399
+ bottom,
400
+ },
401
+ shift: {
402
+ base: baseShift,
403
+ current: baseShift + scrollLeft,
404
+ scrollLeft,
405
+ },
406
+ fixedAt: {
407
+ timestamp: fixedAtTs,
408
+ iso: new Date(fixedAtTs).toISOString(),
409
+ },
410
+ });
411
+ });
412
+ },
413
413
 
414
414
  _toggleFixedColumnsScrollBinding(enabled) {
415
415
  if (!this._tableViewport) {
@@ -436,12 +436,12 @@ const fixedColumnsMethods = {
436
436
  }
437
437
  this._fixedColumnsSyncFrame = 0;
438
438
  this._fixedColumnsLastScrollLeft = 0;
439
- this._fixedColumnsLastAppliedScrollLeft = Number.NaN;
440
- this._fixedColumnsLastShadowStateKey = '';
441
- this._fixedColumnsCellsCache = [];
442
- this._fixedColumnsShadowTargetsCache = [];
443
- this._fixedColumnsLastStateMap = new Map();
444
- },
439
+ this._fixedColumnsLastAppliedScrollLeft = Number.NaN;
440
+ this._fixedColumnsLastShadowStateKey = '';
441
+ this._fixedColumnsCellsCache = [];
442
+ this._fixedColumnsShadowTargetsCache = [];
443
+ this._fixedColumnsLastStateMap = new Map();
444
+ },
445
445
 
446
446
  _rebuildFixedColumnsCellsCache() {
447
447
  const tables = [this._element];
@@ -359,9 +359,9 @@ const DEFAULT_OPTIONS = {
359
359
  // Canonical key for minimum loading delay.
360
360
  // data-attributes: data-loading-min-delay
361
361
  minDelay: 500,
362
- // Количество skeleton-строк.
363
- // data-атрибуты: data-loading-skeleton | data-loading-skeleton-rows
364
- skeleton: 10,
362
+ // Количество skeleton-строк.
363
+ // data-атрибуты: data-loading-skeleton | data-loading-skeleton-rows
364
+ skeleton: 5,
365
365
  },
366
366
 
367
367
  summary: {
@@ -1,4 +1,4 @@
1
- import VGDropdown from "../../vgdropdown";
1
+ import VGDropdown from "../../vgdropdown";
2
2
 
3
3
  class Pagination {
4
4
  constructor(el, params = {}) {
@@ -1,6 +1,6 @@
1
- import {normalizeNonNegativeInt, safeQuerySelector} from "./utils/common";
2
-
3
- class Search {
1
+ import {normalizeNonNegativeInt, safeQuerySelector} from "./utils/common";
2
+
3
+ class Search {
4
4
  constructor(options = {}) {
5
5
  this._options = Object.assign({
6
6
  enabled: true,
@@ -27,10 +27,10 @@ class Search {
27
27
  return;
28
28
  }
29
29
 
30
- const input = safeQuerySelector(selector);
31
- if (!input) {
32
- return;
33
- }
30
+ const input = safeQuerySelector(selector);
31
+ if (!input) {
32
+ return;
33
+ }
34
34
 
35
35
  this._input = input;
36
36
  this._input.addEventListener('input', this._boundInput);
@@ -50,10 +50,10 @@ class Search {
50
50
  }
51
51
 
52
52
  _handleInput() {
53
- clearTimeout(this._timer);
54
- this._timer = setTimeout(() => {
55
- this._emit();
56
- }, normalizeNonNegativeInt(this._options.debounceMs, 300));
53
+ clearTimeout(this._timer);
54
+ this._timer = setTimeout(() => {
55
+ this._emit();
56
+ }, normalizeNonNegativeInt(this._options.debounceMs, 300));
57
57
  }
58
58
 
59
59
  _handleKeyDown(event) {
@@ -76,7 +76,7 @@ class Search {
76
76
  param: String(this._options.param || 'q'),
77
77
  });
78
78
  }
79
- }
79
+ }
80
80
 
81
81
  export default Search;
82
82
 
@@ -61,24 +61,32 @@ const skeletonMethods = {
61
61
  });
62
62
  },
63
63
 
64
- _getSkeletonRowsCount() {
65
- const fromPerPageControl = this._getPerPageControlValue();
66
- if (Number.isFinite(fromPerPageControl) && fromPerPageControl > 0) {
67
- return fromPerPageControl;
68
- }
69
-
70
- const loadingOptions = this._params.loading || {};
71
- const explicit = Number.parseInt(loadingOptions.skeleton, 10);
72
- if (Number.isFinite(explicit) && explicit > 0) {
73
- return explicit;
74
- }
75
-
76
- const renderedRows = this._getRenderedDataRows();
77
- if (renderedRows.length > 0) {
78
- return renderedRows.length;
79
- }
80
-
81
- const fromState = Number.parseInt(this._pageState && this._pageState.perPage, 10);
64
+ _getSkeletonRowsCount() {
65
+ const renderedRows = this._getRenderedDataRows();
66
+ if (renderedRows.length > 0) {
67
+ return renderedRows.length;
68
+ }
69
+
70
+ const body = this._getBody();
71
+ const currentSkeletonRows = Array.from(body.rows || []).filter((row) => {
72
+ return row && row.classList.contains('skeleton-row');
73
+ });
74
+ if (currentSkeletonRows.length > 0) {
75
+ return currentSkeletonRows.length;
76
+ }
77
+
78
+ const loadingOptions = this._params.loading || {};
79
+ const explicit = Number.parseInt(loadingOptions.skeleton, 10);
80
+ if (Number.isFinite(explicit) && explicit > 0) {
81
+ return explicit;
82
+ }
83
+
84
+ const fromPerPageControl = this._getPerPageControlValue();
85
+ if (Number.isFinite(fromPerPageControl) && fromPerPageControl > 0) {
86
+ return fromPerPageControl;
87
+ }
88
+
89
+ const fromState = Number.parseInt(this._pageState && this._pageState.perPage, 10);
82
90
  if (Number.isFinite(fromState) && fromState > 0) {
83
91
  return fromState;
84
92
  }
@@ -89,7 +97,7 @@ const skeletonMethods = {
89
97
  return fromParams;
90
98
  }
91
99
 
92
- return 10;
100
+ return 5;
93
101
  },
94
102
 
95
103
  _getPerPageControlValue() {