vgapp 1.5.6 → 1.5.8

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 (109) 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 +6 -3
  6. package/app/modules/vgalert/scss/_variables.scss +16 -16
  7. package/app/modules/vgcollapse/scss/_variables.scss +7 -7
  8. package/app/modules/vgcollapse/scss/vgcollapse.scss +5 -5
  9. package/app/modules/vgdropdown/scss/_variables.scss +14 -14
  10. package/app/modules/vgdropdown/scss/vgdropdown.scss +5 -5
  11. package/app/modules/vgfilepreview/js/i18n.js +56 -56
  12. package/app/modules/vgfilepreview/js/renderers/image-modal.js +145 -145
  13. package/app/modules/vgfilepreview/js/renderers/image.js +92 -92
  14. package/app/modules/vgfilepreview/js/renderers/index.js +19 -19
  15. package/app/modules/vgfilepreview/js/renderers/office-modal.js +168 -168
  16. package/app/modules/vgfilepreview/js/renderers/office.js +79 -79
  17. package/app/modules/vgfilepreview/js/renderers/pdf-modal.js +260 -260
  18. package/app/modules/vgfilepreview/js/renderers/pdf.js +76 -76
  19. package/app/modules/vgfilepreview/js/renderers/playlist.js +71 -71
  20. package/app/modules/vgfilepreview/js/renderers/text-modal.js +343 -343
  21. package/app/modules/vgfilepreview/js/renderers/text.js +83 -83
  22. package/app/modules/vgfilepreview/js/renderers/zip-modal.js +522 -522
  23. package/app/modules/vgfilepreview/js/renderers/zip.js +89 -89
  24. package/app/modules/vgfilepreview/readme.md +68 -68
  25. package/app/modules/vgfiles/js/base.js +189 -194
  26. package/app/modules/vgfiles/js/droppable.js +17 -17
  27. package/app/modules/vgfiles/js/render.js +153 -153
  28. package/app/modules/vgfiles/js/sortable.js +52 -52
  29. package/app/modules/vgfiles/js/vgfiles.js +43 -43
  30. package/app/modules/vgfiles/readme.md +123 -123
  31. package/app/modules/vgfiles/scss/_mixins.scss +13 -13
  32. package/app/modules/vgfiles/scss/_variables.scss +10 -10
  33. package/app/modules/vgfiles/scss/vgfiles.scss +28 -28
  34. package/app/modules/vgformsender/js/hideshowpass.js +22 -22
  35. package/app/modules/vgformsender/readme.md +1 -1
  36. package/app/modules/vgformsender/scss/_variables.scss +5 -5
  37. package/app/modules/vgformsender/scss/vgformsender.scss +42 -42
  38. package/app/modules/vglawcookie/js/vglawcookie.js +19 -19
  39. package/app/modules/vglawcookie/scss/_variables.scss +13 -13
  40. package/app/modules/vglawcookie/scss/vglawcookie.scss +5 -5
  41. package/app/modules/vgmodal/js/vgmodal.interaction.js +216 -216
  42. package/app/modules/vgmodal/js/vgmodal.js +6 -0
  43. package/app/modules/vgmodal/js/vgmodal.minimized.js +227 -227
  44. package/app/modules/vgmodal/scss/_variables.scss +17 -17
  45. package/app/modules/vgmodal/scss/vgmodal.scss +77 -77
  46. package/app/modules/vgnav/js/vgnav.js +62 -62
  47. package/app/modules/vgnav/scss/_breakpoints.scss +36 -36
  48. package/app/modules/vgnav/scss/_hamburger.scss +5 -5
  49. package/app/modules/vgnav/scss/_placement.scss +5 -5
  50. package/app/modules/vgnav/scss/_toggle.scss +5 -5
  51. package/app/modules/vgnav/scss/_variables.scss +26 -26
  52. package/app/modules/vgnav/scss/vgnav.scss +41 -41
  53. package/app/modules/vgnestable/README.md +39 -39
  54. package/app/modules/vgrangeslider/js/skins.js +8 -8
  55. package/app/modules/vgrangeslider/js/vgrangeslider.js +29 -29
  56. package/app/modules/vgrangeslider/scss/_variables.scss +55 -55
  57. package/app/modules/vgrangeslider/scss/vgrangeslider.scss +239 -239
  58. package/app/modules/vgrollup/js/vgrollup.js +15 -15
  59. package/app/modules/vgrollup/scss/_variables.scss +15 -15
  60. package/app/modules/vgrollup/scss/vgrollup.scss +6 -6
  61. package/app/modules/vgselect/js/handlers.js +5 -52
  62. package/app/modules/vgselect/js/vgselect.js +128 -40
  63. package/app/modules/vgselect/readme.md +11 -11
  64. package/app/modules/vgselect/scss/_variables.scss +51 -51
  65. package/app/modules/vgselect/scss/vgselect.scss +1 -1
  66. package/app/modules/vgsidebar/js/vgsidebar.js +16 -5
  67. package/app/modules/vgsidebar/scss/_variables.scss +10 -10
  68. package/app/modules/vgsidebar/scss/vgsidebar.scss +5 -5
  69. package/app/modules/vgspy/js/vgspy.js +28 -7
  70. package/app/modules/vgtable/js/_filters.js +10 -6
  71. package/app/modules/vgtable/js/_options.js +16 -16
  72. package/app/modules/vgtable/js/_pagination.js +118 -118
  73. package/app/modules/vgtable/js/_responsive.js +79 -79
  74. package/app/modules/vgtable/js/_sticky-header.js +349 -280
  75. package/app/modules/vgtable/js/vgtable.js +98 -98
  76. package/app/modules/vgtable/scss/_sorting.scss +6 -6
  77. package/app/modules/vgtable/scss/_sticky-header.scss +31 -31
  78. package/app/modules/vgtable/scss/_variables.scss +6 -4
  79. package/app/modules/vgtable/scss/vgtable.scss +8 -4
  80. package/app/modules/vgtabs/js/vgtabs.js +82 -57
  81. package/app/modules/vgtabs/scss/_variables.scss +23 -23
  82. package/app/modules/vgtabs/scss/vgtabs.scss +5 -5
  83. package/app/modules/vgtoast/js/vgtoast.js +11 -5
  84. package/app/modules/vgtoast/scss/_variables.scss +13 -13
  85. package/app/modules/vgtoast/scss/vgtoast.scss +5 -5
  86. package/app/modules/vgtooltip/js/vgtooltip.js +121 -111
  87. package/app/modules/vgtooltip/scss/_variables.scss +10 -10
  88. package/app/modules/vgtooltip/scss/vgtooltip.scss +5 -5
  89. package/app/utils/js/components/audio-metadata.js +240 -240
  90. package/app/utils/js/components/backdrop.js +116 -116
  91. package/app/utils/js/components/file-icon.js +5 -0
  92. package/app/utils/js/components/file-preview.js +304 -304
  93. package/app/utils/js/components/responsive.js +165 -165
  94. package/app/utils/js/components/sanitize.js +150 -150
  95. package/app/utils/js/components/video-metadata.js +140 -140
  96. package/app/utils/scss/_backdrop.scss +5 -5
  97. package/app/utils/scss/_theme-default.scss +12 -12
  98. package/app/utils/scss/_theme.scss +7 -7
  99. package/app/utils/scss/default.scss +9 -9
  100. package/app/utils/scss/functions.scss +21 -21
  101. package/app/utils/scss/index.scss +4 -4
  102. package/app/utils/scss/mixin.scss +16 -16
  103. package/app/utils/scss/variables.scss +147 -147
  104. package/build/vgapp.css +1 -1
  105. package/build/vgapp.css.map +1 -1
  106. package/build/vgapp.js +1 -1
  107. package/build/vgapp.js.map +1 -1
  108. package/index.js +7 -7
  109. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Описание: основной модуль базовых таблиц VGTable.
3
- * Возможности: i18n, wrapper/container, состояния и URL state, local/remote, sticky, колонки и строки, сортировка, дерево, responsive-пагинация, выбор и panning.
3
+ * Возможности: i18n, wrapper/container, состояния и URL state, local/remote, sticky, колонки и строки, сортировка, дерево, responsive-пагинация, выбор и panning.
4
4
  */
5
5
  import BaseModule from "../../base-module";
6
6
  import {mergeDeepObject} from "../../../utils/js/functions";
@@ -9,8 +9,8 @@ import Selectors from "../../../utils/js/dom/selectors";
9
9
  import _sorting from "./_sorting.js";
10
10
  import _panning from "./_panning.js";
11
11
  import _selection from "./_selection.js";
12
- import _pagination from "./_pagination.js";
13
- import _responsive from "./_responsive.js";
12
+ import _pagination from "./_pagination.js";
13
+ import _responsive from "./_responsive.js";
14
14
  import _expandable from "./_expandable.js";
15
15
  import _stickyHeader from "./_sticky-header.js";
16
16
  import _fixedColumns from "./_fixed-columns.js";
@@ -35,8 +35,8 @@ import {
35
35
  WRAPPER_SELECTOR,
36
36
  } from "./_options.js";
37
37
 
38
- const FILTER_HIDDEN_ATTRIBUTE = 'data-vg-table-filter-hidden';
39
- const NOT_SPLITTER_CLASS = 'not-splitter';
38
+ const FILTER_HIDDEN_ATTRIBUTE = 'data-vg-table-filter-hidden';
39
+ const NOT_SPLITTER_CLASS = 'not-splitter';
40
40
 
41
41
  class VGTable extends BaseModule {
42
42
  constructor(element, params = {}) {
@@ -64,8 +64,8 @@ class VGTable extends BaseModule {
64
64
  this._panning = null;
65
65
  this._selection = null;
66
66
  this._expandable = null;
67
- this._pagination = null;
68
- this._responsive = null;
67
+ this._pagination = null;
68
+ this._responsive = null;
69
69
  this._filters = null;
70
70
  this._search = null;
71
71
  this._skeleton = null;
@@ -80,11 +80,11 @@ class VGTable extends BaseModule {
80
80
  this._fixedColumns = null;
81
81
  this._columns = null;
82
82
  this._rowReorder = null;
83
- this._remote = null;
84
- this._autoNotSplitterHeaders = new Set();
85
- this._emptyHeaderSortOptions = new Map();
86
- this._emptyHeaderSplittersSynced = false;
87
- this._isRemote = Boolean(String(this._params.request.route || '').trim());
83
+ this._remote = null;
84
+ this._autoNotSplitterHeaders = new Set();
85
+ this._emptyHeaderSortOptions = new Map();
86
+ this._emptyHeaderSplittersSynced = false;
87
+ this._isRemote = Boolean(String(this._params.request.route || '').trim());
88
88
  this._complex = false;
89
89
  this._wrapper = null;
90
90
  this._ownsWrapper = false;
@@ -114,9 +114,9 @@ class VGTable extends BaseModule {
114
114
  */
115
115
  init() {
116
116
  this._ensureWrapper();
117
- this._ensureTableContainer();
118
- this._syncComplexState();
119
- this._syncEmptyHeaderSplitters();
117
+ this._ensureTableContainer();
118
+ this._syncComplexState();
119
+ this._syncEmptyHeaderSplitters();
120
120
 
121
121
  // Включаем нативный sticky-заголовок без клонирования DOM
122
122
  if (!this._stickyHeader && this._params.stickyHeader.enabled === true) {
@@ -148,12 +148,12 @@ class VGTable extends BaseModule {
148
148
  if (!this._complex && !this._sorting && this._params.sort.enabled === true && this._params.rowReorder.enabled !== true) {
149
149
  this._sorting = new _sorting(this._element, Object.assign({}, this._params.sort, {remote: this._isRemote}), this._stickyHeader?.getHeaderTable());
150
150
  this._sorting.init();
151
- this._element.addEventListener(
152
- 'sortchange.vg.table',
153
- this._isRemote ? this._boundRemoteSortChange : this._boundLocalSortChange
154
- );
155
- }
156
- this._stickyHeader?.refreshIntrinsicMinimums?.();
151
+ this._element.addEventListener(
152
+ 'sortchange.vg.table',
153
+ this._isRemote ? this._boundRemoteSortChange : this._boundLocalSortChange
154
+ );
155
+ }
156
+ this._stickyHeader?.refreshIntrinsicMinimums?.();
157
157
 
158
158
  // Фиксируем настоящие ячейки через native sticky, включая отдельный слой Fixed Header
159
159
  if (!this._complex && !this._fixedColumns && this._params.fixedColumns.enabled === true) {
@@ -189,17 +189,17 @@ class VGTable extends BaseModule {
189
189
  this._expandable.init();
190
190
  }
191
191
 
192
- if (!this._responsive && this._params.responsive?.enabled === true) {
193
- this._responsive = new _responsive(this._element, this._params.responsive, () => {
194
- this._pagination?.updatePresentation(this._paginationOptions());
195
- });
196
- this._responsive.init();
197
- }
198
-
199
- // Включаем локальную или серверную пагинацию
200
- if (!this._pagination && this._params.pagination.enabled === true) {
201
- this._pagination = new _pagination(this._element, Object.assign({}, this._paginationOptions(), {
202
- responsive: this._responsive?.getState().reason === null,
192
+ if (!this._responsive && this._params.responsive?.enabled === true) {
193
+ this._responsive = new _responsive(this._element, this._params.responsive, () => {
194
+ this._pagination?.updatePresentation(this._paginationOptions());
195
+ });
196
+ this._responsive.init();
197
+ }
198
+
199
+ // Включаем локальную или серверную пагинацию
200
+ if (!this._pagination && this._params.pagination.enabled === true) {
201
+ this._pagination = new _pagination(this._element, Object.assign({}, this._paginationOptions(), {
202
+ responsive: this._responsive?.getState().reason === null,
203
203
  remote: this._isRemote,
204
204
  onChange: (state) => this._handlePaginationChange(state),
205
205
  }));
@@ -310,27 +310,27 @@ class VGTable extends BaseModule {
310
310
  this._normalizeColumnsDataOptions();
311
311
  this._normalizeRowReorderDataOptions();
312
312
  if (this._remote) this._remote._options.labels = this._dictionary.remote || {};
313
- this._pagination?.updatePresentation(this._paginationOptions());
313
+ this._pagination?.updatePresentation(this._paginationOptions());
314
314
  this._expandable?.refresh?.();
315
315
  this._columns?.refresh?.();
316
316
  this._rowReorder?.refresh?.();
317
317
  const state = this._states?.getState?.();
318
318
  if (state) this._states.render(state.type);
319
319
  EventHandler.trigger(this._element, 'localechange.vg.table', {locale: normalized});
320
- return normalized;
321
- }
322
-
323
- /** Текущий брейкпоинт и накопленные переопределения; null при выключенном responsive. */
324
- getResponsiveState() { return this._responsive?.getState() || null; }
325
-
326
- /** Принудительно обновляет только адаптивное представление, без загрузки данных. */
327
- refreshResponsive() { return this._responsive?.refresh(true) || null; }
328
-
329
- _paginationOptions() {
330
- const base = this._params.pagination;
331
- const profile = this._responsive?.getState().pagination || {};
332
- return {...base, ...profile, size: {...base.size, ...profile.size}, quick: {...base.quick, ...profile.quick}};
333
- }
320
+ return normalized;
321
+ }
322
+
323
+ /** Текущий брейкпоинт и накопленные переопределения; null при выключенном responsive. */
324
+ getResponsiveState() { return this._responsive?.getState() || null; }
325
+
326
+ /** Принудительно обновляет только адаптивное представление, без загрузки данных. */
327
+ refreshResponsive() { return this._responsive?.refresh(true) || null; }
328
+
329
+ _paginationOptions() {
330
+ const base = this._params.pagination;
331
+ const profile = this._responsive?.getState().pagination || {};
332
+ return {...base, ...profile, size: {...base.size, ...profile.size}, quick: {...base.quick, ...profile.quick}};
333
+ }
334
334
 
335
335
  _mergeLocale(target, source) {
336
336
  if (!target || !source || typeof source !== 'object') return target;
@@ -473,38 +473,38 @@ class VGTable extends BaseModule {
473
473
  * Определяет таблицу с многострочным thead, colspan или rowspan.
474
474
  * @private
475
475
  */
476
- _syncComplexState() {
476
+ _syncComplexState() {
477
477
  const rows = this._isRemote
478
478
  ? Array.from(this._element.tHead?.rows || [])
479
479
  : Array.from(this._element.rows || []);
480
480
  const hasSpans = rows.some((row) => Array.from(row.cells || []).some((cell) => cell.colSpan > 1 || cell.rowSpan > 1));
481
481
  this._complex = Boolean((this._element.tHead?.rows.length || 0) > 1 || hasSpans);
482
482
  this._element.classList.toggle('vg-table-complex', this._complex);
483
- this._element.toggleAttribute('data-vg-table-complex', this._complex);
484
- }
485
-
486
- /**
487
- * Скрывает разделитель и отключает сортировку у пустых заголовочных ячеек.
488
- * @private
489
- */
490
- _syncEmptyHeaderSplitters() {
491
- if (this._emptyHeaderSplittersSynced) return;
492
-
493
- Array.from(this._element.tHead?.querySelectorAll('th') || []).forEach((header) => {
494
- const isEmpty = header.childElementCount === 0 && String(header.textContent || '').trim() === '';
495
- if (!isEmpty) return;
496
-
497
- if (!header.classList.contains(NOT_SPLITTER_CLASS)) {
498
- header.classList.add(NOT_SPLITTER_CLASS);
499
- this._autoNotSplitterHeaders.add(header);
500
- }
501
- if (String(header.getAttribute('data-sort-enabled')).toLowerCase() !== 'false') {
502
- this._emptyHeaderSortOptions.set(header, header.getAttribute('data-sort-enabled'));
503
- header.setAttribute('data-sort-enabled', 'false');
504
- }
505
- });
506
- this._emptyHeaderSplittersSynced = true;
507
- }
483
+ this._element.toggleAttribute('data-vg-table-complex', this._complex);
484
+ }
485
+
486
+ /**
487
+ * Скрывает разделитель и отключает сортировку у пустых заголовочных ячеек.
488
+ * @private
489
+ */
490
+ _syncEmptyHeaderSplitters() {
491
+ if (this._emptyHeaderSplittersSynced) return;
492
+
493
+ Array.from(this._element.tHead?.querySelectorAll('th') || []).forEach((header) => {
494
+ const isEmpty = header.childElementCount === 0 && String(header.textContent || '').trim() === '';
495
+ if (!isEmpty) return;
496
+
497
+ if (!header.classList.contains(NOT_SPLITTER_CLASS)) {
498
+ header.classList.add(NOT_SPLITTER_CLASS);
499
+ this._autoNotSplitterHeaders.add(header);
500
+ }
501
+ if (String(header.getAttribute('data-sort-enabled')).toLowerCase() !== 'false') {
502
+ this._emptyHeaderSortOptions.set(header, header.getAttribute('data-sort-enabled'));
503
+ header.setAttribute('data-sort-enabled', 'false');
504
+ }
505
+ });
506
+ this._emptyHeaderSplittersSynced = true;
507
+ }
508
508
 
509
509
  /**
510
510
  * Подготовка переменных для пагинации
@@ -546,11 +546,11 @@ class VGTable extends BaseModule {
546
546
  assign('ellipsis', (value) => { pagination.ellipsis = boolean(value); });
547
547
  assign('ellipsis-hover', (value) => { pagination.ellipsisHover = boolean(value); });
548
548
  assign('ellipsis-after', (value) => { pagination.threshold = number(value, pagination.threshold); });
549
- assign('max-visible-pages', (value) => { pagination.visible = number(value, pagination.visible); });
550
- assign('max-buttons', (value) => {
551
- const parsed = Number(value);
552
- pagination.maxButtons = Number.isInteger(parsed) && parsed >= 3 ? parsed : null;
553
- });
549
+ assign('max-visible-pages', (value) => { pagination.visible = number(value, pagination.visible); });
550
+ assign('max-buttons', (value) => {
551
+ const parsed = Number(value);
552
+ pagination.maxButtons = Number.isInteger(parsed) && parsed >= 3 ? parsed : null;
553
+ });
554
554
  assign('show-per-page', (value) => { pagination.size.enabled = boolean(value); });
555
555
  assign('show-per-page-label', (value) => { pagination.size.label = boolean(value) ? 'Строк на странице' : false; });
556
556
  assign('per-page-label', (value) => { pagination.size.label = value; });
@@ -1080,9 +1080,9 @@ class VGTable extends BaseModule {
1080
1080
  return this._remote ? this._remote.export(format, options) : '';
1081
1081
  }
1082
1082
 
1083
- refreshStickyHeader() {
1084
- return this._stickyHeader ? this._stickyHeader.refresh() : null;
1085
- }
1083
+ refreshStickyHeader() {
1084
+ return this._stickyHeader ? this._stickyHeader.refreshIntrinsicMinimums() : null;
1085
+ }
1086
1086
 
1087
1087
  refreshFixedColumns() {
1088
1088
  return this._fixedColumns ? this._fixedColumns.refresh() : null;
@@ -1163,7 +1163,7 @@ class VGTable extends BaseModule {
1163
1163
 
1164
1164
  _refreshColumnsLayout(structure = false) {
1165
1165
  this._sorting?.refresh?.(structure);
1166
- this._stickyHeader?.refreshIntrinsicMinimums?.();
1166
+ this._stickyHeader?.refreshIntrinsicMinimums?.();
1167
1167
  this._fixedColumns?.refresh?.();
1168
1168
  }
1169
1169
 
@@ -1452,18 +1452,18 @@ class VGTable extends BaseModule {
1452
1452
  _afterRemoteRender(detail = {}) {
1453
1453
  if (detail.renderedCount > 0) this._states?.clear();
1454
1454
  this._columns?.refresh?.();
1455
- this._sorting?.refresh?.();
1456
- this._expandable?.refresh?.();
1457
- this._rowReorder?.refresh?.();
1458
- this._stickyHeader?.refreshIntrinsicMinimums?.();
1459
- this._fixedColumns?.refresh?.();
1455
+ this._sorting?.refresh?.();
1456
+ this._expandable?.refresh?.();
1457
+ this._rowReorder?.refresh?.();
1458
+ this._stickyHeader?.refreshIntrinsicMinimums?.();
1459
+ this._fixedColumns?.refresh?.();
1460
1460
  }
1461
1461
 
1462
1462
  /**
1463
1463
  * Очистка ресурсов
1464
1464
  */
1465
- dispose() {
1466
- this._responsive?.dispose();
1465
+ dispose() {
1466
+ this._responsive?.dispose();
1467
1467
  if (this._remote) this._remote.dispose();
1468
1468
  if (this._skeleton) this._skeleton.dispose();
1469
1469
  if (this._urlState) this._urlState.dispose();
@@ -1482,15 +1482,15 @@ class VGTable extends BaseModule {
1482
1482
  this._element.removeEventListener('sortchange.vg.table', this._boundPaginationRefresh);
1483
1483
  this._element.removeEventListener('sortchange.vg.table', this._boundLocalSortChange);
1484
1484
  this._element.removeEventListener('sortchange.vg.table', this._boundRemoteSortChange);
1485
- if (this._pagination) this._pagination.dispose();
1486
- this._autoNotSplitterHeaders.forEach((header) => header.classList.remove(NOT_SPLITTER_CLASS));
1487
- this._autoNotSplitterHeaders.clear();
1488
- this._emptyHeaderSortOptions.forEach((value, header) => {
1489
- if (value === null) header.removeAttribute('data-sort-enabled');
1490
- else header.setAttribute('data-sort-enabled', value);
1491
- });
1492
- this._emptyHeaderSortOptions.clear();
1493
- this._element.classList.remove('vg-table-complex');
1485
+ if (this._pagination) this._pagination.dispose();
1486
+ this._autoNotSplitterHeaders.forEach((header) => header.classList.remove(NOT_SPLITTER_CLASS));
1487
+ this._autoNotSplitterHeaders.clear();
1488
+ this._emptyHeaderSortOptions.forEach((value, header) => {
1489
+ if (value === null) header.removeAttribute('data-sort-enabled');
1490
+ else header.setAttribute('data-sort-enabled', value);
1491
+ });
1492
+ this._emptyHeaderSortOptions.clear();
1493
+ this._element.classList.remove('vg-table-complex');
1494
1494
  this._element.removeAttribute('data-vg-table-complex');
1495
1495
  this._removeGeneratedTableContainer();
1496
1496
  this._removeGeneratedWrapper();
@@ -1,7 +1,7 @@
1
1
  @mixin styles {
2
- tr {
3
- > th.vg-table-sortable {
4
- padding-inline-end: var(--vg-table-sort-padding-inline-end);
2
+ tr {
3
+ > th.vg-table-sortable {
4
+ padding-inline-end: calc(var(--vg-table-sort-padding-inline-end) + var(--vg-table-sort-controls-space));
5
5
  cursor: var(--vg-table-sort-cursor);
6
6
  user-select: var(--vg-table-sort-user-select);
7
7
 
@@ -68,9 +68,9 @@
68
68
  }
69
69
  }
70
70
 
71
- &.vg-table-sort-multiple tr > th.vg-table-sortable {
72
- padding-inline-end: var(--vg-table-sort-multiple-padding-inline-end);
73
- }
71
+ &.vg-table-sort-multiple tr > th.vg-table-sortable {
72
+ padding-inline-end: calc(var(--vg-table-sort-multiple-padding-inline-end) + var(--vg-table-sort-multiple-controls-space));
73
+ }
74
74
 
75
75
  &.vg-table-sort-hover {
76
76
  .vg-table-sortable:not([data-sort-direction]) {
@@ -23,18 +23,18 @@
23
23
  border-radius: var(--vg-table-sticky-radius);
24
24
  background: var(--vg-table-sticky-bg);
25
25
 
26
- .vg-table-header,
27
- .vg-table-body {
28
- width: 100%;
29
- }
30
-
31
- .vg-table-header {
32
- position: relative;
33
- z-index: var(--vg-table-sticky-z-index);
34
- overflow: hidden;
35
- background: var(--vg-table-thead-bg);
36
- border-start-start-radius: var(--vg-table-sticky-inner-radius);
37
- border-start-end-radius: var(--vg-table-sticky-inner-radius);
26
+ .vg-table-header,
27
+ .vg-table-body {
28
+ width: 100%;
29
+ }
30
+
31
+ .vg-table-header {
32
+ position: relative;
33
+ z-index: var(--vg-table-sticky-z-index);
34
+ overflow: hidden;
35
+ background: var(--vg-table-thead-bg);
36
+ border-start-start-radius: var(--vg-table-sticky-inner-radius);
37
+ border-start-end-radius: var(--vg-table-sticky-inner-radius);
38
38
 
39
39
  &--scrollbar::after {
40
40
  content: "";
@@ -47,19 +47,19 @@
47
47
  border-bottom: var(--vg-table-sticky-border-width) var(--vg-table-sticky-border-style) var(--vg-table-sticky-border-color);
48
48
  background: var(--vg-table-fixed-header-bg, var(--vg-table-thead-bg));
49
49
  pointer-events: none;
50
- }
51
- }
52
-
53
- .vg-table-body {
54
- position: relative;
55
- z-index: 0;
56
- }
57
-
58
- .vg-table-header__table,
59
- .vg-table-body > .vg-table {
60
- width: 100%;
61
- min-width: max(100%, var(--vg-table-sticky-content-min-width, 0px));
62
- table-layout: fixed;
50
+ }
51
+ }
52
+
53
+ .vg-table-body {
54
+ position: relative;
55
+ z-index: 0;
56
+ }
57
+
58
+ .vg-table-header__table,
59
+ .vg-table-body > .vg-table {
60
+ width: 100%;
61
+ min-width: max(100%, var(--vg-table-sticky-content-min-width, 0px));
62
+ table-layout: fixed;
63
63
  overflow: visible;
64
64
  border: 0;
65
65
  border-radius: 0;
@@ -120,9 +120,9 @@
120
120
  }
121
121
  }
122
122
 
123
- .vg-table-body {
124
- overflow-x: auto;
125
- overflow-y: hidden;
126
- }
127
- }
128
- }
123
+ .vg-table-body {
124
+ overflow-x: auto;
125
+ overflow-y: hidden;
126
+ }
127
+ }
128
+ }
@@ -79,10 +79,12 @@ $table-sizing: (
79
79
 
80
80
  // Локальная сортировка: зона заголовка, шевроны, focus-состояние и подсветка колонки.
81
81
  // Формирует переменные --vg-table-sort-*.
82
- $table-sort: (
83
- padding-inline-end: calc(var(--vg-table-cell-padding-inline) + 1.25rem),
84
- multiple-padding-inline-end: calc(var(--vg-table-cell-padding-inline) + 2.5rem),
85
- cursor: pointer,
82
+ $table-sort: (
83
+ padding-inline-end: var(--vg-table-cell-padding-inline),
84
+ multiple-padding-inline-end: var(--vg-table-sort-padding-inline-end),
85
+ controls-space: 1.25rem,
86
+ multiple-controls-space: 2.5rem,
87
+ cursor: pointer,
86
88
  user-select: none,
87
89
  controls-position: absolute,
88
90
  controls-inset-inline-end: .75rem,
@@ -25,7 +25,9 @@
25
25
  @include vg.mix-vars('table', table.$table-prop);
26
26
  @include vg.mix-vars('table-wrapper', table.$table-wrapper);
27
27
  @include vg.mix-vars('table-container', table.$table-container);
28
- @include vg.mix-vars('table-sort', table.$table-sort);
28
+ // Размерные padding-переменные сортировки объявляются ниже на .vg-table:
29
+ // wrapper не может ссылаться на --vg-table-cell-padding-inline дочерней таблицы.
30
+ @include vg.mix-vars('table-sort', map.remove(table.$table-sort, 'padding-inline-end', 'multiple-padding-inline-end'));
29
31
  @include vg.mix-vars('table-columns', table.$table-columns);
30
32
  @include vg.mix-vars('table-row-reorder', table.$table-row-reorder);
31
33
  @include vg.mix-vars('table-pan', table.$table-pan);
@@ -61,9 +63,11 @@
61
63
  }
62
64
  }
63
65
 
64
- .vg-table {
65
- @include vg.mix-vars('table', map.get(table.$table-sizing, md));
66
- @include vg.mix-vars('table-skeleton', table.$table-skeleton);
66
+ .vg-table {
67
+ @include vg.mix-vars('table', map.get(table.$table-sizing, md));
68
+ @include vg.mix-vars('table-skeleton', table.$table-skeleton);
69
+ --vg-table-sort-padding-inline-end: #{map.get(table.$table-sort, 'padding-inline-end')};
70
+ --vg-table-sort-multiple-padding-inline-end: #{map.get(table.$table-sort, 'multiple-padding-inline-end')};
67
71
  border: 0;
68
72
  border-radius: 0;
69
73
  background: var(--vg-table-bg);