vgapp 1.3.8 → 1.4.0

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 (90) 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 +36 -36
  5. package/app/modules/base-module.js +111 -111
  6. package/app/modules/vgalert/js/vgalert.js +37 -37
  7. package/app/modules/vgalert/readme.md +105 -105
  8. package/app/modules/vgdynamictable/index.js +4 -5
  9. package/app/modules/vgdynamictable/js/editable.js +19 -19
  10. package/app/modules/vgdynamictable/js/filters.js +21 -21
  11. package/app/modules/vgdynamictable/js/fixed.js +179 -179
  12. package/app/modules/vgdynamictable/js/options.js +8 -4
  13. package/app/modules/vgdynamictable/js/pagination.js +1 -1
  14. package/app/modules/vgdynamictable/js/search.js +12 -12
  15. package/app/modules/vgdynamictable/js/sortable.js +71 -71
  16. package/app/modules/vgdynamictable/js/summary-footer.js +28 -28
  17. package/app/modules/vgdynamictable/js/table-remote.js +79 -79
  18. package/app/modules/vgdynamictable/js/table-url-state.js +31 -31
  19. package/app/modules/vgdynamictable/js/utils/common.js +48 -48
  20. package/app/modules/vgdynamictable/js/vgdynamictable.js +352 -311
  21. package/app/modules/vgdynamictable/readme.md +250 -250
  22. package/app/modules/vgdynamictable/scss/_skeleton.scss +6 -6
  23. package/app/modules/vgdynamictable/scss/_sortable.scss +24 -24
  24. package/app/modules/vgdynamictable/scss/_table.scss +4 -4
  25. package/app/modules/vgdynamictable/scss/_variables.scss +79 -79
  26. package/app/modules/vgdynamictable/scss/vgdynamictable.scss +40 -37
  27. package/app/modules/vgfilepreview/js/i18n.js +56 -56
  28. package/app/modules/vgfilepreview/js/renderers/image-modal.js +145 -145
  29. package/app/modules/vgfilepreview/js/renderers/image.js +92 -92
  30. package/app/modules/vgfilepreview/js/renderers/index.js +19 -19
  31. package/app/modules/vgfilepreview/js/renderers/office-modal.js +168 -168
  32. package/app/modules/vgfilepreview/js/renderers/office.js +79 -79
  33. package/app/modules/vgfilepreview/js/renderers/pdf-modal.js +260 -260
  34. package/app/modules/vgfilepreview/js/renderers/pdf.js +76 -76
  35. package/app/modules/vgfilepreview/js/renderers/playlist.js +71 -71
  36. package/app/modules/vgfilepreview/js/renderers/text-modal.js +343 -343
  37. package/app/modules/vgfilepreview/js/renderers/text.js +83 -83
  38. package/app/modules/vgfilepreview/js/renderers/video-modal.js +272 -272
  39. package/app/modules/vgfilepreview/js/renderers/video.js +80 -80
  40. package/app/modules/vgfilepreview/js/renderers/zip-modal.js +522 -522
  41. package/app/modules/vgfilepreview/js/renderers/zip.js +89 -89
  42. package/app/modules/vgfilepreview/js/vgfilepreview.js +7 -7
  43. package/app/modules/vgfilepreview/readme.md +68 -68
  44. package/app/modules/vgfilepreview/scss/_variables.scss +113 -113
  45. package/app/modules/vgfilepreview/scss/vgfilepreview.scss +464 -464
  46. package/app/modules/vgfiles/js/base.js +26 -26
  47. package/app/modules/vgfiles/js/droppable.js +260 -260
  48. package/app/modules/vgfiles/js/render.js +153 -153
  49. package/app/modules/vgfiles/js/vgfiles.js +104 -104
  50. package/app/modules/vgfiles/readme.md +123 -123
  51. package/app/modules/vgfiles/scss/_variables.scss +18 -18
  52. package/app/modules/vgfiles/scss/vgfiles.scss +148 -148
  53. package/app/modules/vgformsender/js/hideshowpass.js +16 -16
  54. package/app/modules/vgformsender/readme.md +41 -41
  55. package/app/modules/vgformsender/scss/vgformsender.scss +34 -34
  56. package/app/modules/vgmodal/js/vgmodal.drag.js +332 -332
  57. package/app/modules/vgmodal/js/vgmodal.js +188 -188
  58. package/app/modules/vgmodal/js/vgmodal.resize.js +27 -27
  59. package/app/modules/vgmodal/scss/vgmodal.scss +14 -14
  60. package/app/modules/vgnav/js/vgnav.js +135 -135
  61. package/app/modules/vgnav/readme.md +67 -67
  62. package/app/modules/vgnestable/README.md +307 -307
  63. package/app/modules/vgnestable/scss/_variables.scss +60 -60
  64. package/app/modules/vgnestable/scss/vgnestable.scss +163 -163
  65. package/app/modules/vgrangeslider/js/skins.js +222 -222
  66. package/app/modules/vgrangeslider/js/vgrangeslider.js +704 -704
  67. package/app/modules/vgrangeslider/readme.md +523 -523
  68. package/app/modules/vgrangeslider/scss/_variables.scss +53 -53
  69. package/app/modules/vgrangeslider/scss/vgrangeslider.scss +240 -240
  70. package/app/modules/vgselect/js/vgselect.js +39 -39
  71. package/app/modules/vgselect/scss/vgselect.scss +22 -22
  72. package/app/modules/vgspy/readme.md +28 -28
  73. package/app/modules/vgtoast/readme.md +18 -18
  74. package/app/modules/vgtoast/scss/vgtoast.scss +48 -48
  75. package/app/modules/vgtooltip/js/vgtooltip.js +89 -89
  76. package/app/modules/vgtooltip/readme.md +181 -181
  77. package/app/utils/js/components/ajax.js +117 -117
  78. package/app/utils/js/components/audio-metadata.js +240 -240
  79. package/app/utils/js/components/backdrop.js +17 -17
  80. package/app/utils/js/components/file-icon.js +109 -109
  81. package/app/utils/js/components/file-preview.js +304 -304
  82. package/app/utils/js/components/sanitize.js +150 -150
  83. package/app/utils/js/components/video-metadata.js +140 -140
  84. package/app/vgapp.js +295 -130
  85. package/build/vgapp.css +1 -1
  86. package/build/vgapp.css.map +1 -1
  87. package/build/vgapp.js +1 -1
  88. package/build/vgapp.js.map +1 -1
  89. package/index.js +14 -14
  90. package/package.json +1 -1
@@ -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];
@@ -401,10 +401,14 @@ const DEFAULT_OPTIONS = {
401
401
  // Отступ сверху для sticky-header (px).
402
402
  // data-атрибуты: data-sticky-header-top-offset | data-stickyHeader-top
403
403
  top: 0,
404
- // Максимальная высота viewport таблицы.
405
- // data-атрибуты: data-sticky-header-max-height | data-stickyHeader-max
406
- max: 0,
407
- },
404
+ // Максимальная высота viewport таблицы.
405
+ // data-атрибуты: data-sticky-header-max-height | data-stickyHeader-max
406
+ max: 0,
407
+ // Рендерить отдельный sticky clone вместо sticky th.
408
+ // По умолчанию наследует stickyHeader.enable.
409
+ // data-attributes: data-sticky-header-clone
410
+ clone: null,
411
+ },
408
412
 
409
413
  search: {
410
414
  // Canonical key for enable flag.
@@ -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