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.
- package/README.md +270 -270
- 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 +36 -36
- package/app/modules/vgalert/js/vgalert.js +266 -266
- package/app/modules/vgalert/scss/_variables.scss +16 -16
- package/app/modules/vgalert/scss/vgalert.scss +107 -107
- 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/vgdynamictable/index.js +4 -4
- package/app/modules/vgdynamictable/js/filters.js +21 -21
- package/app/modules/vgdynamictable/js/fixed.js +179 -179
- package/app/modules/vgdynamictable/js/options.js +3 -3
- package/app/modules/vgdynamictable/js/pagination.js +1 -1
- package/app/modules/vgdynamictable/js/search.js +12 -12
- package/app/modules/vgdynamictable/js/skeleton.js +27 -19
- package/app/modules/vgdynamictable/js/sortable.js +71 -71
- package/app/modules/vgdynamictable/js/summary-footer.js +28 -28
- package/app/modules/vgdynamictable/js/table-url-state.js +31 -31
- package/app/modules/vgdynamictable/js/utils/common.js +48 -48
- package/app/modules/vgdynamictable/js/vgdynamictable.js +79 -79
- package/app/modules/vgdynamictable/scss/_actions.scss +19 -19
- package/app/modules/vgdynamictable/scss/_pagination.scss +5 -5
- package/app/modules/vgdynamictable/scss/_skeleton.scss +11 -11
- package/app/modules/vgdynamictable/scss/_sortable.scss +28 -28
- package/app/modules/vgdynamictable/scss/_table.scss +7 -30
- package/app/modules/vgdynamictable/scss/_variables.scss +46 -46
- package/app/modules/vgdynamictable/scss/vgdynamictable.scss +28 -36
- 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/video-modal.js +272 -272
- package/app/modules/vgfilepreview/js/renderers/video.js +80 -80
- 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/js/vgfilepreview.js +7 -7
- package/app/modules/vgfilepreview/readme.md +68 -68
- package/app/modules/vgfilepreview/scss/_variables.scss +115 -115
- package/app/modules/vgfilepreview/scss/vgfilepreview.scss +463 -463
- package/app/modules/vgfiles/js/droppable.js +20 -9
- package/app/modules/vgfiles/js/render.js +153 -153
- package/app/modules/vgfiles/js/vgfiles.js +104 -104
- package/app/modules/vgfiles/readme.md +123 -123
- package/app/modules/vgfiles/scss/_mixins.scss +9 -9
- package/app/modules/vgfiles/scss/_variables.scss +41 -41
- package/app/modules/vgfiles/scss/vgfiles.scss +161 -161
- package/app/modules/vgformsender/js/hideshowpass.js +21 -16
- package/app/modules/vgformsender/js/vgformsender.js +4 -6
- 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 +11 -8
- 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 +355 -355
- 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 +180 -180
- 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/vgnestable/js/vgnestable.js +358 -358
- package/app/modules/vgnestable/scss/_variables.scss +35 -35
- package/app/modules/vgnestable/scss/vgnestable.scss +55 -55
- package/app/modules/vgrangeslider/js/skins.js +222 -222
- package/app/modules/vgrangeslider/js/vgrangeslider.js +704 -704
- package/app/modules/vgrangeslider/scss/_variables.scss +55 -55
- package/app/modules/vgrangeslider/scss/vgrangeslider.scss +239 -239
- package/app/modules/vgrollup/scss/_variables.scss +15 -15
- package/app/modules/vgrollup/scss/vgrollup.scss +6 -6
- package/app/modules/vgselect/js/vgselect.js +129 -129
- package/app/modules/vgselect/readme.md +11 -11
- package/app/modules/vgselect/scss/_variables.scss +50 -50
- package/app/modules/vgselect/scss/vgselect.scss +48 -48
- package/app/modules/vgsidebar/js/vgsidebar.js +79 -79
- package/app/modules/vgsidebar/scss/_variables.scss +10 -10
- package/app/modules/vgsidebar/scss/vgsidebar.scss +5 -5
- package/app/modules/vgtabs/scss/_variables.scss +23 -23
- package/app/modules/vgtabs/scss/vgtabs.scss +5 -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 +107 -51
- 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 +109 -109
- package/app/utils/js/components/file-preview.js +304 -304
- 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/_tokens.scss +170 -170
- 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 +105 -105
- package/app/vgapp.js +295 -295
- 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.scss +20 -20
- package/package.json +4 -2
|
@@ -6,113 +6,113 @@
|
|
|
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-alert {
|
|
14
14
|
&-modal {
|
|
15
15
|
--vg-modal-padding: 0 !important;
|
|
16
16
|
--vg-modal-width: 520px !important;
|
|
17
17
|
--vg-modal-margin: 65px !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&-overlay {
|
|
21
|
-
@include vg.mix-vars('alert', vars.$alert-map);
|
|
22
|
-
width: 100%;
|
|
23
|
-
height: 100%;
|
|
24
|
-
position: absolute;
|
|
25
|
-
top: 0;
|
|
26
|
-
left: 0;
|
|
27
|
-
z-index: var(--vg-alert-overlay-z-index);
|
|
28
|
-
pointer-events: none;
|
|
29
|
-
|
|
30
|
-
&::before {
|
|
31
|
-
content: '';
|
|
32
|
-
position: absolute;
|
|
33
|
-
inset: 0;
|
|
34
|
-
background-color: var(--vg-alert-overlay-backdrop-bg);
|
|
35
|
-
transition: var(--vg-alert-overlay-backdrop-transition);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&.fade.show {
|
|
39
|
-
pointer-events: auto;
|
|
40
|
-
|
|
41
|
-
&::before {
|
|
42
|
-
background-color: var(--vg-alert-overlay-backdrop-show-bg);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.vg-alert-wrapper {
|
|
46
|
-
transform: var(--vg-alert-overlay-wrapper-show-transform);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
&.closing {
|
|
50
|
-
pointer-events: none;
|
|
51
|
-
|
|
52
|
-
.vg-alert-wrapper {
|
|
53
|
-
transform: var(--vg-alert-overlay-wrapper-transform);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.vg-alert-wrapper {
|
|
59
|
-
background-color: var(--vg-alert-overlay-wrapper-bg);
|
|
60
|
-
width: var(--vg-alert-overlay-wrapper-width);
|
|
61
|
-
position: absolute;
|
|
62
|
-
left: var(--vg-alert-overlay-wrapper-start);
|
|
63
|
-
z-index: 1;
|
|
64
|
-
transform: var(--vg-alert-overlay-wrapper-transform);
|
|
65
|
-
top: var(--vg-alert-overlay-wrapper-top);
|
|
66
|
-
transition: var(--vg-alert-overlay-wrapper-transition);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&-dropdown {
|
|
71
|
-
width: 360px;
|
|
72
|
-
max-width: calc(100vw - 2rem);
|
|
73
|
-
|
|
74
|
-
.vg-dropdown-container {
|
|
75
|
-
overflow: hidden;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.vg-alert-content {
|
|
79
|
-
padding: 1rem;
|
|
80
|
-
gap: .75rem;
|
|
81
|
-
align-items: flex-start;
|
|
82
|
-
|
|
83
|
-
.vg-alert-content--title {
|
|
84
|
-
font-size: 1rem;
|
|
85
|
-
line-height: 1.25;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.vg-alert-content--description {
|
|
89
|
-
font-size: .875rem;
|
|
90
|
-
line-height: 1.4;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
.vg-alert-content--icon {
|
|
94
|
-
svg {
|
|
95
|
-
width: 32px;
|
|
96
|
-
height: 32px;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
.vg-alert-buttons {
|
|
102
|
-
padding: .75rem 1rem;
|
|
103
|
-
|
|
104
|
-
.btn {
|
|
105
|
-
padding: .5rem .875rem;
|
|
106
|
-
font-size: .875rem;
|
|
107
|
-
line-height: 1.25;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&-wrapper {
|
|
113
|
-
@include vg.mix-vars('alert', vars.$alert-map);
|
|
114
|
-
@include vg.mix-alert-color-mode($class: vg-alert);
|
|
115
|
-
border-radius: var(--vg-border-radius, #{vg.$border-radius});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&-overlay {
|
|
21
|
+
@include vg.mix-vars('alert', vars.$alert-map);
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 100%;
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
left: 0;
|
|
27
|
+
z-index: var(--vg-alert-overlay-z-index);
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
|
|
30
|
+
&::before {
|
|
31
|
+
content: '';
|
|
32
|
+
position: absolute;
|
|
33
|
+
inset: 0;
|
|
34
|
+
background-color: var(--vg-alert-overlay-backdrop-bg);
|
|
35
|
+
transition: var(--vg-alert-overlay-backdrop-transition);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.fade.show {
|
|
39
|
+
pointer-events: auto;
|
|
40
|
+
|
|
41
|
+
&::before {
|
|
42
|
+
background-color: var(--vg-alert-overlay-backdrop-show-bg);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.vg-alert-wrapper {
|
|
46
|
+
transform: var(--vg-alert-overlay-wrapper-show-transform);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.closing {
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
|
|
52
|
+
.vg-alert-wrapper {
|
|
53
|
+
transform: var(--vg-alert-overlay-wrapper-transform);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.vg-alert-wrapper {
|
|
59
|
+
background-color: var(--vg-alert-overlay-wrapper-bg);
|
|
60
|
+
width: var(--vg-alert-overlay-wrapper-width);
|
|
61
|
+
position: absolute;
|
|
62
|
+
left: var(--vg-alert-overlay-wrapper-start);
|
|
63
|
+
z-index: 1;
|
|
64
|
+
transform: var(--vg-alert-overlay-wrapper-transform);
|
|
65
|
+
top: var(--vg-alert-overlay-wrapper-top);
|
|
66
|
+
transition: var(--vg-alert-overlay-wrapper-transition);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&-dropdown {
|
|
71
|
+
width: 360px;
|
|
72
|
+
max-width: calc(100vw - 2rem);
|
|
73
|
+
|
|
74
|
+
.vg-dropdown-container {
|
|
75
|
+
overflow: hidden;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.vg-alert-content {
|
|
79
|
+
padding: 1rem;
|
|
80
|
+
gap: .75rem;
|
|
81
|
+
align-items: flex-start;
|
|
82
|
+
|
|
83
|
+
.vg-alert-content--title {
|
|
84
|
+
font-size: 1rem;
|
|
85
|
+
line-height: 1.25;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.vg-alert-content--description {
|
|
89
|
+
font-size: .875rem;
|
|
90
|
+
line-height: 1.4;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.vg-alert-content--icon {
|
|
94
|
+
svg {
|
|
95
|
+
width: 32px;
|
|
96
|
+
height: 32px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.vg-alert-buttons {
|
|
102
|
+
padding: .75rem 1rem;
|
|
103
|
+
|
|
104
|
+
.btn {
|
|
105
|
+
padding: .5rem .875rem;
|
|
106
|
+
font-size: .875rem;
|
|
107
|
+
line-height: 1.25;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&-wrapper {
|
|
113
|
+
@include vg.mix-vars('alert', vars.$alert-map);
|
|
114
|
+
@include vg.mix-alert-color-mode($class: vg-alert);
|
|
115
|
+
border-radius: var(--vg-border-radius, #{vg.$border-radius});
|
|
116
116
|
overflow: hidden;
|
|
117
117
|
|
|
118
118
|
.vg-alert-content {
|
|
@@ -141,12 +141,12 @@
|
|
|
141
141
|
}
|
|
142
142
|
}
|
|
143
143
|
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.vg-alert-buttons {
|
|
147
|
-
background-color: var(--vg-alert-buttons-bg);
|
|
148
|
-
padding: 1rem 1.5rem;
|
|
149
|
-
display: flex;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.vg-alert-buttons {
|
|
147
|
+
background-color: var(--vg-alert-buttons-bg);
|
|
148
|
+
padding: 1rem 1.5rem;
|
|
149
|
+
display: flex;
|
|
150
150
|
align-items: center;
|
|
151
151
|
justify-content: flex-end;
|
|
152
152
|
gap: .5rem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
@use "../../../utils/scss" as vg;
|
|
2
|
-
|
|
3
|
-
$collapse-accordion-map: (
|
|
4
|
-
border: vg.$border-width vg.$border-style var(--vg-border-color, #{vg.$border-color}),
|
|
5
|
-
border-radius: vg.$border-radius,
|
|
6
|
-
padding: 1rem
|
|
7
|
-
) !default;
|
|
1
|
+
@use "../../../utils/scss" as vg;
|
|
2
|
+
|
|
3
|
+
$collapse-accordion-map: (
|
|
4
|
+
border: vg.$border-width vg.$border-style var(--vg-border-color, #{vg.$border-color}),
|
|
5
|
+
border-radius: vg.$border-radius,
|
|
6
|
+
padding: 1rem
|
|
7
|
+
) !default;
|
|
@@ -6,13 +6,13 @@
|
|
|
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
|
|
|
14
14
|
.vg-accordion {
|
|
15
|
-
@include vg.mix-vars('accordion', vars.$collapse-accordion-map);
|
|
15
|
+
@include vg.mix-vars('accordion', vars.$collapse-accordion-map);
|
|
16
16
|
position: relative;
|
|
17
17
|
border: var(--vg-accordion-border);
|
|
18
18
|
border-radius: var(--vg-accordion-border-radius);
|
|
@@ -37,4 +37,4 @@
|
|
|
37
37
|
display: block;
|
|
38
38
|
padding: var(--vg-accordion-padding);
|
|
39
39
|
}
|
|
40
|
-
}
|
|
40
|
+
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
@use "../../../utils/scss" as vg;
|
|
2
|
-
|
|
3
|
-
$dropdown-map: (
|
|
4
|
-
bg-color: var(--vg-surface-bg, #{vg.$surface-bg}),
|
|
5
|
-
color: var(--vg-text-color, #{vg.$color}),
|
|
6
|
-
box-shadow: var(--vg-box-shadow, #{vg.$box-shadow}),
|
|
7
|
-
border-width: vg.$border-width,
|
|
8
|
-
border-style: vg.$border-style,
|
|
9
|
-
border-color: var(--vg-border-color, #{vg.$border-color}),
|
|
10
|
-
border-radius: vg.$border-radius,
|
|
11
|
-
z-index: vg.$dropdown-index,
|
|
12
|
-
transition: vg.$transition-base,
|
|
13
|
-
min-width: 225px
|
|
14
|
-
) !default;
|
|
1
|
+
@use "../../../utils/scss" as vg;
|
|
2
|
+
|
|
3
|
+
$dropdown-map: (
|
|
4
|
+
bg-color: var(--vg-surface-bg, #{vg.$surface-bg}),
|
|
5
|
+
color: var(--vg-text-color, #{vg.$color}),
|
|
6
|
+
box-shadow: var(--vg-box-shadow, #{vg.$box-shadow}),
|
|
7
|
+
border-width: vg.$border-width,
|
|
8
|
+
border-style: vg.$border-style,
|
|
9
|
+
border-color: var(--vg-border-color, #{vg.$border-color}),
|
|
10
|
+
border-radius: vg.$border-radius,
|
|
11
|
+
z-index: vg.$dropdown-index,
|
|
12
|
+
transition: vg.$transition-base,
|
|
13
|
+
min-width: 225px
|
|
14
|
+
) !default;
|
|
@@ -6,13 +6,13 @@
|
|
|
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-dropdown {
|
|
14
14
|
position: relative;
|
|
15
|
-
@include vg.mix-vars('dropdown', vars.$dropdown-map);
|
|
15
|
+
@include vg.mix-vars('dropdown', vars.$dropdown-map);
|
|
16
16
|
|
|
17
17
|
&-content {
|
|
18
18
|
z-index: var(--vg-dropdown-z-index);
|
|
@@ -77,4 +77,4 @@
|
|
|
77
77
|
border-radius: var(--vg-dropdown-border-radius);
|
|
78
78
|
box-shadow: var(--vg-dropdown-box-shadow);
|
|
79
79
|
}
|
|
80
|
-
}
|
|
80
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import VGDynamicTable from "./js/vgdynamictable";
|
|
2
|
-
import Editable from "./js/editable";
|
|
3
|
-
|
|
4
|
-
export {Editable, VGDynamicTable};
|
|
1
|
+
import VGDynamicTable from "./js/vgdynamictable";
|
|
2
|
+
import Editable from "./js/editable";
|
|
3
|
+
|
|
4
|
+
export {Editable, VGDynamicTable};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {normalizeNonNegativeInt, safeQuerySelector} from "./utils/common";
|
|
2
|
-
|
|
3
|
-
class Filters {
|
|
1
|
+
import {normalizeNonNegativeInt, safeQuerySelector} from "./utils/common";
|
|
2
|
+
|
|
3
|
+
class Filters {
|
|
4
4
|
constructor(options = {}) {
|
|
5
5
|
this._options = Object.assign({
|
|
6
6
|
enabled: true,
|
|
@@ -19,12 +19,12 @@ class Filters {
|
|
|
19
19
|
operatorAttr: 'data-filter-operator',
|
|
20
20
|
defaultOperator: 'eq',
|
|
21
21
|
skipEmpty: true,
|
|
22
|
-
trimValues: true,
|
|
23
|
-
emitOnInit: false,
|
|
24
|
-
initialValues: {},
|
|
25
|
-
onChange: null,
|
|
26
|
-
onReset: null,
|
|
27
|
-
}, options);
|
|
22
|
+
trimValues: true,
|
|
23
|
+
emitOnInit: false,
|
|
24
|
+
initialValues: {},
|
|
25
|
+
onChange: null,
|
|
26
|
+
onReset: null,
|
|
27
|
+
}, options);
|
|
28
28
|
|
|
29
29
|
this._form = null;
|
|
30
30
|
this._timer = null;
|
|
@@ -119,7 +119,7 @@ class Filters {
|
|
|
119
119
|
if (!selector) {
|
|
120
120
|
return null;
|
|
121
121
|
}
|
|
122
|
-
return safeQuerySelector(selector);
|
|
122
|
+
return safeQuerySelector(selector);
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
_handleInput(event) {
|
|
@@ -134,8 +134,8 @@ class Filters {
|
|
|
134
134
|
this._emit();
|
|
135
135
|
return;
|
|
136
136
|
}
|
|
137
|
-
clearTimeout(this._timer);
|
|
138
|
-
this._timer = setTimeout(() => this._emit(), normalizeNonNegativeInt(this._options.debounceMs, 300));
|
|
137
|
+
clearTimeout(this._timer);
|
|
138
|
+
this._timer = setTimeout(() => this._emit(), normalizeNonNegativeInt(this._options.debounceMs, 300));
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
_handleChange(event) {
|
|
@@ -169,14 +169,14 @@ class Filters {
|
|
|
169
169
|
if (!resetButton) {
|
|
170
170
|
return;
|
|
171
171
|
}
|
|
172
|
-
event.preventDefault();
|
|
173
|
-
this._reset();
|
|
174
|
-
if (typeof this._options.onReset === 'function') {
|
|
175
|
-
this._options.onReset();
|
|
176
|
-
}
|
|
177
|
-
clearTimeout(this._timer);
|
|
178
|
-
this._emit();
|
|
179
|
-
}
|
|
172
|
+
event.preventDefault();
|
|
173
|
+
this._reset();
|
|
174
|
+
if (typeof this._options.onReset === 'function') {
|
|
175
|
+
this._options.onReset();
|
|
176
|
+
}
|
|
177
|
+
clearTimeout(this._timer);
|
|
178
|
+
this._emit();
|
|
179
|
+
}
|
|
180
180
|
|
|
181
181
|
_handleSubmit(event) {
|
|
182
182
|
if (!this._isManualMode()) {
|
|
@@ -441,7 +441,7 @@ class Filters {
|
|
|
441
441
|
const tag = String(node.tagName || '').toUpperCase();
|
|
442
442
|
return tag === 'INPUT' || tag === 'SELECT' || tag === 'TEXTAREA';
|
|
443
443
|
}
|
|
444
|
-
_isManualMode() {
|
|
444
|
+
_isManualMode() {
|
|
445
445
|
const mode = String(this._options.applyMode || 'auto').toLowerCase().trim();
|
|
446
446
|
return mode === 'manual';
|
|
447
447
|
}
|