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.
- package/app/langs/en/buttons.json +17 -17
- package/app/langs/en/messages.json +36 -36
- package/app/langs/ru/buttons.json +17 -17
- package/app/langs/ru/messages.json +1 -1
- package/app/modules/vgalert/js/vgalert.js +6 -3
- package/app/modules/vgalert/scss/_variables.scss +16 -16
- package/app/modules/vgcollapse/scss/_variables.scss +7 -7
- package/app/modules/vgcollapse/scss/vgcollapse.scss +5 -5
- package/app/modules/vgdropdown/scss/_variables.scss +14 -14
- package/app/modules/vgdropdown/scss/vgdropdown.scss +5 -5
- package/app/modules/vgfilepreview/js/i18n.js +56 -56
- package/app/modules/vgfilepreview/js/renderers/image-modal.js +145 -145
- package/app/modules/vgfilepreview/js/renderers/image.js +92 -92
- package/app/modules/vgfilepreview/js/renderers/index.js +19 -19
- package/app/modules/vgfilepreview/js/renderers/office-modal.js +168 -168
- package/app/modules/vgfilepreview/js/renderers/office.js +79 -79
- package/app/modules/vgfilepreview/js/renderers/pdf-modal.js +260 -260
- package/app/modules/vgfilepreview/js/renderers/pdf.js +76 -76
- package/app/modules/vgfilepreview/js/renderers/playlist.js +71 -71
- package/app/modules/vgfilepreview/js/renderers/text-modal.js +343 -343
- package/app/modules/vgfilepreview/js/renderers/text.js +83 -83
- package/app/modules/vgfilepreview/js/renderers/zip-modal.js +522 -522
- package/app/modules/vgfilepreview/js/renderers/zip.js +89 -89
- package/app/modules/vgfilepreview/readme.md +68 -68
- package/app/modules/vgfiles/js/base.js +189 -194
- package/app/modules/vgfiles/js/droppable.js +17 -17
- package/app/modules/vgfiles/js/render.js +153 -153
- package/app/modules/vgfiles/js/sortable.js +52 -52
- package/app/modules/vgfiles/js/vgfiles.js +43 -43
- package/app/modules/vgfiles/readme.md +123 -123
- package/app/modules/vgfiles/scss/_mixins.scss +13 -13
- package/app/modules/vgfiles/scss/_variables.scss +10 -10
- package/app/modules/vgfiles/scss/vgfiles.scss +28 -28
- package/app/modules/vgformsender/js/hideshowpass.js +22 -22
- package/app/modules/vgformsender/readme.md +1 -1
- package/app/modules/vgformsender/scss/_variables.scss +5 -5
- package/app/modules/vgformsender/scss/vgformsender.scss +42 -42
- package/app/modules/vglawcookie/js/vglawcookie.js +19 -19
- package/app/modules/vglawcookie/scss/_variables.scss +13 -13
- package/app/modules/vglawcookie/scss/vglawcookie.scss +5 -5
- package/app/modules/vgmodal/js/vgmodal.interaction.js +216 -216
- package/app/modules/vgmodal/js/vgmodal.js +6 -0
- package/app/modules/vgmodal/js/vgmodal.minimized.js +227 -227
- package/app/modules/vgmodal/scss/_variables.scss +17 -17
- package/app/modules/vgmodal/scss/vgmodal.scss +77 -77
- package/app/modules/vgnav/js/vgnav.js +62 -62
- package/app/modules/vgnav/scss/_breakpoints.scss +36 -36
- package/app/modules/vgnav/scss/_hamburger.scss +5 -5
- package/app/modules/vgnav/scss/_placement.scss +5 -5
- package/app/modules/vgnav/scss/_toggle.scss +5 -5
- package/app/modules/vgnav/scss/_variables.scss +26 -26
- package/app/modules/vgnav/scss/vgnav.scss +41 -41
- package/app/modules/vgnestable/README.md +39 -39
- package/app/modules/vgrangeslider/js/skins.js +8 -8
- package/app/modules/vgrangeslider/js/vgrangeslider.js +29 -29
- package/app/modules/vgrangeslider/scss/_variables.scss +55 -55
- package/app/modules/vgrangeslider/scss/vgrangeslider.scss +239 -239
- package/app/modules/vgrollup/js/vgrollup.js +15 -15
- package/app/modules/vgrollup/scss/_variables.scss +15 -15
- package/app/modules/vgrollup/scss/vgrollup.scss +6 -6
- package/app/modules/vgselect/js/handlers.js +5 -52
- package/app/modules/vgselect/js/vgselect.js +128 -40
- package/app/modules/vgselect/readme.md +11 -11
- package/app/modules/vgselect/scss/_variables.scss +51 -51
- package/app/modules/vgselect/scss/vgselect.scss +1 -1
- package/app/modules/vgsidebar/js/vgsidebar.js +16 -5
- package/app/modules/vgsidebar/scss/_variables.scss +10 -10
- package/app/modules/vgsidebar/scss/vgsidebar.scss +5 -5
- package/app/modules/vgspy/js/vgspy.js +28 -7
- package/app/modules/vgtable/js/_filters.js +10 -6
- package/app/modules/vgtable/js/_options.js +16 -16
- package/app/modules/vgtable/js/_pagination.js +118 -118
- package/app/modules/vgtable/js/_responsive.js +79 -79
- package/app/modules/vgtable/js/_sticky-header.js +349 -280
- package/app/modules/vgtable/js/vgtable.js +98 -98
- package/app/modules/vgtable/scss/_sorting.scss +6 -6
- package/app/modules/vgtable/scss/_sticky-header.scss +31 -31
- package/app/modules/vgtable/scss/_variables.scss +6 -4
- package/app/modules/vgtable/scss/vgtable.scss +8 -4
- package/app/modules/vgtabs/js/vgtabs.js +82 -57
- package/app/modules/vgtabs/scss/_variables.scss +23 -23
- package/app/modules/vgtabs/scss/vgtabs.scss +5 -5
- package/app/modules/vgtoast/js/vgtoast.js +11 -5
- package/app/modules/vgtoast/scss/_variables.scss +13 -13
- package/app/modules/vgtoast/scss/vgtoast.scss +5 -5
- package/app/modules/vgtooltip/js/vgtooltip.js +121 -111
- package/app/modules/vgtooltip/scss/_variables.scss +10 -10
- package/app/modules/vgtooltip/scss/vgtooltip.scss +5 -5
- package/app/utils/js/components/audio-metadata.js +240 -240
- package/app/utils/js/components/backdrop.js +116 -116
- package/app/utils/js/components/file-icon.js +5 -0
- package/app/utils/js/components/file-preview.js +304 -304
- package/app/utils/js/components/responsive.js +165 -165
- package/app/utils/js/components/sanitize.js +150 -150
- package/app/utils/js/components/video-metadata.js +140 -140
- package/app/utils/scss/_backdrop.scss +5 -5
- package/app/utils/scss/_theme-default.scss +12 -12
- package/app/utils/scss/_theme.scss +7 -7
- package/app/utils/scss/default.scss +9 -9
- package/app/utils/scss/functions.scss +21 -21
- package/app/utils/scss/index.scss +4 -4
- package/app/utils/scss/mixin.scss +16 -16
- package/app/utils/scss/variables.scss +147 -147
- package/build/vgapp.css +1 -1
- package/build/vgapp.css.map +1 -1
- package/build/vgapp.js +1 -1
- package/build/vgapp.js.map +1 -1
- package/index.js +7 -7
- package/package.json +1 -1
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Описание: адаптер общего Responsive для представления VGTable.
|
|
3
|
-
* Возможности: отбор безопасных параметров пагинации и события таблицы; границы, наследование и подписки делегируются Responsive.
|
|
4
|
-
*/
|
|
5
|
-
import EventHandler from "../../../utils/js/dom/event";
|
|
6
|
-
import {Responsive} from "../../../utils/js/components/responsive";
|
|
7
|
-
|
|
8
|
-
const object = (value) => value && typeof value === 'object' && !Array.isArray(value);
|
|
9
|
-
|
|
10
|
-
// Только представление: page/per, callbacks, storage и параметры запросов не принимаются.
|
|
11
|
-
const paginationProfile = (value) => {
|
|
12
|
-
const result = {};
|
|
13
|
-
if (!object(value)) return result;
|
|
14
|
-
if (value.maxButtons === null || (Number.isInteger(value.maxButtons) && value.maxButtons >= 3)) result.maxButtons = value.maxButtons;
|
|
15
|
-
if (['left', 'center', 'right', 'between'].includes(value.align)) result.align = value.align;
|
|
16
|
-
if (['top', 'bottom', 'both'].includes(value.position)) result.position = value.position;
|
|
17
|
-
if (object(value.size)) {
|
|
18
|
-
result.size = {};
|
|
19
|
-
if (typeof value.size.enabled === 'boolean') result.size.enabled = value.size.enabled;
|
|
20
|
-
if (value.size.label === false || typeof value.size.label === 'string') result.size.label = value.size.label;
|
|
21
|
-
}
|
|
22
|
-
if (object(value.quick) && [true, false, 'auto'].includes(value.quick.enabled)) result.quick = {enabled: value.quick.enabled};
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
class _responsive {
|
|
27
|
-
constructor(table, options, onChange) {
|
|
28
|
-
this._table = table;
|
|
29
|
-
this._onChange = onChange;
|
|
30
|
-
this._responsive = new Responsive({breakpoints: options.breakpoints, window: table.ownerDocument.defaultView});
|
|
31
|
-
this._profiles = Object.fromEntries(Object.keys(this._responsive.breakpoints).map((name) => [name, paginationProfile(options[name]?.pagination)]));
|
|
32
|
-
this._breakpoint = null;
|
|
33
|
-
this._pagination = {};
|
|
34
|
-
this._width = 0;
|
|
35
|
-
this._valid = this._responsive.isValid();
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
init() {
|
|
39
|
-
if (!this._valid) {
|
|
40
|
-
console.warn('VGTable: responsive.breakpoints must start at xs: 0 and increase through xxl.');
|
|
41
|
-
return this;
|
|
42
|
-
}
|
|
43
|
-
this.refresh();
|
|
44
|
-
this._responsive.subscribe(() => this.refresh());
|
|
45
|
-
return this;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
refresh(force = false) {
|
|
49
|
-
if (!this._valid || !this._responsive) return this.getState();
|
|
50
|
-
this._width = this._responsive.viewport().width;
|
|
51
|
-
const breakpoint = this._responsive.getBreakpointKey(this._width);
|
|
52
|
-
if (!force && breakpoint === this._breakpoint) return this.getState();
|
|
53
|
-
const previous = this._breakpoint;
|
|
54
|
-
this._breakpoint = breakpoint;
|
|
55
|
-
this._pagination = this._responsive.resolve(this._profiles, {}, this._width);
|
|
56
|
-
this._onChange();
|
|
57
|
-
if (previous !== null && previous !== breakpoint) {
|
|
58
|
-
EventHandler.trigger(this._table, 'responsivechange.vg.table', {...this.getState(), previous});
|
|
59
|
-
}
|
|
60
|
-
return this.getState();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
getState() {
|
|
64
|
-
return {
|
|
65
|
-
breakpoint: this._breakpoint,
|
|
66
|
-
width: this._responsive?.viewport().width ?? this._width,
|
|
67
|
-
reason: this._valid ? null : 'invalid-breakpoints',
|
|
68
|
-
pagination: {...this._pagination, size: {...this._pagination.size}, quick: {...this._pagination.quick}},
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
dispose() {
|
|
73
|
-
this._width = this._responsive?.viewport().width ?? this._width;
|
|
74
|
-
this._responsive?.dispose();
|
|
75
|
-
this._responsive = null;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export default _responsive;
|
|
1
|
+
/**
|
|
2
|
+
* Описание: адаптер общего Responsive для представления VGTable.
|
|
3
|
+
* Возможности: отбор безопасных параметров пагинации и события таблицы; границы, наследование и подписки делегируются Responsive.
|
|
4
|
+
*/
|
|
5
|
+
import EventHandler from "../../../utils/js/dom/event";
|
|
6
|
+
import {Responsive} from "../../../utils/js/components/responsive";
|
|
7
|
+
|
|
8
|
+
const object = (value) => value && typeof value === 'object' && !Array.isArray(value);
|
|
9
|
+
|
|
10
|
+
// Только представление: page/per, callbacks, storage и параметры запросов не принимаются.
|
|
11
|
+
const paginationProfile = (value) => {
|
|
12
|
+
const result = {};
|
|
13
|
+
if (!object(value)) return result;
|
|
14
|
+
if (value.maxButtons === null || (Number.isInteger(value.maxButtons) && value.maxButtons >= 3)) result.maxButtons = value.maxButtons;
|
|
15
|
+
if (['left', 'center', 'right', 'between'].includes(value.align)) result.align = value.align;
|
|
16
|
+
if (['top', 'bottom', 'both'].includes(value.position)) result.position = value.position;
|
|
17
|
+
if (object(value.size)) {
|
|
18
|
+
result.size = {};
|
|
19
|
+
if (typeof value.size.enabled === 'boolean') result.size.enabled = value.size.enabled;
|
|
20
|
+
if (value.size.label === false || typeof value.size.label === 'string') result.size.label = value.size.label;
|
|
21
|
+
}
|
|
22
|
+
if (object(value.quick) && [true, false, 'auto'].includes(value.quick.enabled)) result.quick = {enabled: value.quick.enabled};
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
class _responsive {
|
|
27
|
+
constructor(table, options, onChange) {
|
|
28
|
+
this._table = table;
|
|
29
|
+
this._onChange = onChange;
|
|
30
|
+
this._responsive = new Responsive({breakpoints: options.breakpoints, window: table.ownerDocument.defaultView});
|
|
31
|
+
this._profiles = Object.fromEntries(Object.keys(this._responsive.breakpoints).map((name) => [name, paginationProfile(options[name]?.pagination)]));
|
|
32
|
+
this._breakpoint = null;
|
|
33
|
+
this._pagination = {};
|
|
34
|
+
this._width = 0;
|
|
35
|
+
this._valid = this._responsive.isValid();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
init() {
|
|
39
|
+
if (!this._valid) {
|
|
40
|
+
console.warn('VGTable: responsive.breakpoints must start at xs: 0 and increase through xxl.');
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
43
|
+
this.refresh();
|
|
44
|
+
this._responsive.subscribe(() => this.refresh());
|
|
45
|
+
return this;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
refresh(force = false) {
|
|
49
|
+
if (!this._valid || !this._responsive) return this.getState();
|
|
50
|
+
this._width = this._responsive.viewport().width;
|
|
51
|
+
const breakpoint = this._responsive.getBreakpointKey(this._width);
|
|
52
|
+
if (!force && breakpoint === this._breakpoint) return this.getState();
|
|
53
|
+
const previous = this._breakpoint;
|
|
54
|
+
this._breakpoint = breakpoint;
|
|
55
|
+
this._pagination = this._responsive.resolve(this._profiles, {}, this._width);
|
|
56
|
+
this._onChange();
|
|
57
|
+
if (previous !== null && previous !== breakpoint) {
|
|
58
|
+
EventHandler.trigger(this._table, 'responsivechange.vg.table', {...this.getState(), previous});
|
|
59
|
+
}
|
|
60
|
+
return this.getState();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
getState() {
|
|
64
|
+
return {
|
|
65
|
+
breakpoint: this._breakpoint,
|
|
66
|
+
width: this._responsive?.viewport().width ?? this._width,
|
|
67
|
+
reason: this._valid ? null : 'invalid-breakpoints',
|
|
68
|
+
pagination: {...this._pagination, size: {...this._pagination.size}, quick: {...this._pagination.quick}},
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
dispose() {
|
|
73
|
+
this._width = this._responsive?.viewport().width ?? this._width;
|
|
74
|
+
this._responsive?.dispose();
|
|
75
|
+
this._responsive = null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export default _responsive;
|