vgapp 1.3.3 → 1.3.5
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 +5 -12
- 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/base-module.js +111 -111
- package/app/modules/vgalert/js/vgalert.js +52 -52
- package/app/modules/vgalert/readme.md +105 -105
- package/app/modules/vgdynamictable/index.js +5 -5
- package/app/modules/vgdynamictable/js/editable.js +19 -19
- package/app/modules/vgdynamictable/js/filters.js +21 -21
- package/app/modules/vgdynamictable/js/fixed.js +179 -179
- package/app/modules/vgdynamictable/js/pagination.js +1 -1
- package/app/modules/vgdynamictable/js/search.js +12 -12
- 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-remote.js +79 -79
- 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 +268 -268
- package/app/modules/vgdynamictable/readme.md +250 -250
- package/app/modules/vgdynamictable/scss/_skeleton.scss +6 -6
- package/app/modules/vgdynamictable/scss/_sortable.scss +24 -24
- package/app/modules/vgdynamictable/scss/_table.scss +4 -4
- package/app/modules/vgdynamictable/scss/_variables.scss +79 -79
- package/app/modules/vgdynamictable/scss/vgdynamictable.scss +27 -27
- 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 +113 -113
- package/app/modules/vgfilepreview/scss/vgfilepreview.scss +464 -464
- package/app/modules/vgfiles/js/base.js +26 -26
- package/app/modules/vgfiles/js/droppable.js +260 -260
- 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/_variables.scss +18 -18
- package/app/modules/vgfiles/scss/vgfiles.scss +148 -148
- package/app/modules/vgformsender/js/hideshowpass.js +16 -16
- package/app/modules/vgformsender/scss/vgformsender.scss +34 -34
- package/app/modules/vgmodal/js/vgmodal.drag.js +332 -332
- package/app/modules/vgmodal/js/vgmodal.js +188 -188
- package/app/modules/vgmodal/js/vgmodal.resize.js +27 -27
- package/app/modules/vgmodal/scss/vgmodal.scss +14 -14
- package/app/modules/vgnav/js/vgnav.js +135 -135
- package/app/modules/vgnav/readme.md +67 -67
- package/app/modules/vgnestable/README.md +307 -307
- package/app/modules/vgnestable/scss/_variables.scss +60 -60
- package/app/modules/vgnestable/scss/vgnestable.scss +163 -163
- package/app/modules/vgrangeslider/js/skins.js +222 -222
- package/app/modules/vgrangeslider/js/vgrangeslider.js +704 -704
- package/app/modules/vgrangeslider/readme.md +523 -523
- package/app/modules/vgrangeslider/scss/_variables.scss +53 -53
- package/app/modules/vgrangeslider/scss/vgrangeslider.scss +240 -240
- package/app/modules/vgselect/js/vgselect.js +39 -39
- package/app/modules/vgselect/scss/vgselect.scss +22 -22
- package/app/modules/vgspy/readme.md +28 -28
- package/app/modules/vgtoast/readme.md +18 -18
- package/app/modules/vgtoast/scss/vgtoast.scss +48 -48
- package/app/modules/vgtooltip/js/vgtooltip.js +89 -89
- package/app/modules/vgtooltip/readme.md +181 -181
- package/app/utils/js/components/ajax.js +117 -117
- package/app/utils/js/components/audio-metadata.js +240 -240
- package/app/utils/js/components/backdrop.js +17 -17
- 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/vgapp.js +21 -21
- 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 +14 -14
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -11,15 +11,6 @@ VGApp — набор фронтенд‑модулей (UI‑компонент
|
|
|
11
11
|
npm i vgapp
|
|
12
12
|
```
|
|
13
13
|
|
|
14
|
-
Локально из соседнего репозитория:
|
|
15
|
-
```json
|
|
16
|
-
{
|
|
17
|
-
"dependencies": {
|
|
18
|
-
"vgapp": "file:../vegas-app"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
```
|
|
22
|
-
|
|
23
14
|
## API
|
|
24
15
|
```js
|
|
25
16
|
import vgapp from 'vgapp';
|
|
@@ -28,7 +19,7 @@ vgapp.boot();
|
|
|
28
19
|
```
|
|
29
20
|
|
|
30
21
|
- `vgapp` экспортируется как singleton app.
|
|
31
|
-
- `vgapp.register()`
|
|
22
|
+
- `vgapp.register()` использует единый контракт: `register(name, Module)`.
|
|
32
23
|
- `vgapp.boot()` вызывает общий boot-контракт модуля.
|
|
33
24
|
- У модулей со своим `initAll()` boot использует его автоматически.
|
|
34
25
|
|
|
@@ -39,7 +30,8 @@ import { VGApp, VGModal, VGTooltip } from 'vgapp';
|
|
|
39
30
|
const app = new VGApp();
|
|
40
31
|
|
|
41
32
|
app
|
|
42
|
-
.register(VGModal,
|
|
33
|
+
.register(VGModal.NAME, VGModal)
|
|
34
|
+
.register(VGTooltip.NAME, VGTooltip)
|
|
43
35
|
.boot();
|
|
44
36
|
```
|
|
45
37
|
|
|
@@ -116,7 +108,8 @@ import 'vgapp/build/vgapp.css';
|
|
|
116
108
|
const app = new VGApp();
|
|
117
109
|
|
|
118
110
|
app
|
|
119
|
-
.register(VGModal,
|
|
111
|
+
.register(VGModal.NAME, VGModal)
|
|
112
|
+
.register(VGTooltip.NAME, VGTooltip)
|
|
120
113
|
.boot();
|
|
121
114
|
```
|
|
122
115
|
|
|
@@ -7,22 +7,22 @@
|
|
|
7
7
|
"agree": "Yeah, I agree",
|
|
8
8
|
"cancel": "Cancel"
|
|
9
9
|
},
|
|
10
|
-
"filepreview": {
|
|
11
|
-
"open_audio": "Open player",
|
|
12
|
-
"open_image": "Open image",
|
|
13
|
-
"open_text": "Open text",
|
|
14
|
-
"open_video": "Open video",
|
|
15
|
-
"open_archive": "Open archive",
|
|
16
|
-
"open_pdf": "Open PDF",
|
|
17
|
-
"open_office": "Open document",
|
|
18
|
-
"download": "Download",
|
|
19
|
-
"preview": "Preview",
|
|
20
|
-
"prev": "Prev",
|
|
21
|
-
"next": "Next",
|
|
22
|
-
"zoom_in": "Zoom +",
|
|
23
|
-
"zoom_out": "Zoom -"
|
|
24
|
-
},
|
|
25
|
-
"loadmore": {
|
|
10
|
+
"filepreview": {
|
|
11
|
+
"open_audio": "Open player",
|
|
12
|
+
"open_image": "Open image",
|
|
13
|
+
"open_text": "Open text",
|
|
14
|
+
"open_video": "Open video",
|
|
15
|
+
"open_archive": "Open archive",
|
|
16
|
+
"open_pdf": "Open PDF",
|
|
17
|
+
"open_office": "Open document",
|
|
18
|
+
"download": "Download",
|
|
19
|
+
"preview": "Preview",
|
|
20
|
+
"prev": "Prev",
|
|
21
|
+
"next": "Next",
|
|
22
|
+
"zoom_in": "Zoom +",
|
|
23
|
+
"zoom_out": "Zoom -"
|
|
24
|
+
},
|
|
25
|
+
"loadmore": {
|
|
26
26
|
"send": "Uploading...",
|
|
27
27
|
"show": "I'm showing you...",
|
|
28
28
|
"text-ajax": "Upload more",
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
"select": {
|
|
37
37
|
"load-more": "Upload more"
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
}
|
|
@@ -25,42 +25,42 @@
|
|
|
25
25
|
"description": "It will not be possible to return it",
|
|
26
26
|
"drop-active": "Release to upload"
|
|
27
27
|
},
|
|
28
|
-
"filepreview": {
|
|
29
|
-
"audio_title": "Audio file",
|
|
30
|
-
"image_title": "Image preview",
|
|
31
|
-
"image_thumbnail_alt": "Image thumbnail",
|
|
32
|
-
"text_title": "Text preview",
|
|
33
|
-
"video_title": "Video preview",
|
|
34
|
-
"pdf_title": "PDF preview",
|
|
35
|
-
"office_title": "Office preview",
|
|
36
|
-
"archive_title": "Archive preview",
|
|
37
|
-
"loading_text": "Loading...",
|
|
38
|
-
"loading_archive": "Loading archive...",
|
|
39
|
-
"loading_entry": "Loading entry...",
|
|
40
|
-
"cannot_open_file": "Cannot open file",
|
|
41
|
-
"cannot_open_archive": "Cannot open archive",
|
|
42
|
-
"cannot_preview_entry": "Cannot preview entry",
|
|
43
|
-
"office_fallback": "If embedded preview is unavailable, download the file.",
|
|
44
|
-
"invalid_zip": "Invalid ZIP file",
|
|
45
|
-
"central_directory_not_found": "Central directory not found",
|
|
46
|
-
"archive_buffer_missing": "Archive buffer is missing",
|
|
47
|
-
"entry_corrupted": "Archive entry is corrupted",
|
|
48
|
-
"compression_not_supported": "Compression method is not supported",
|
|
49
|
-
"deflate_not_supported": "Deflate decompression is not supported by the browser",
|
|
50
|
-
"unknown_error": "Unknown error",
|
|
51
|
-
"empty_file": "(empty file)",
|
|
52
|
-
"archive_empty_unsupported": "Archive is empty or unsupported.",
|
|
53
|
-
"archive_type_dir": "dir",
|
|
54
|
-
"archive_type_file": "file",
|
|
55
|
-
"archive_table_name": "Name",
|
|
56
|
-
"archive_table_type": "Type",
|
|
57
|
-
"archive_table_packed": "Packed",
|
|
58
|
-
"archive_table_size": "Size",
|
|
59
|
-
"archive_table_preview": "Preview",
|
|
60
|
-
"pdf_page": "Page",
|
|
61
|
-
"pdf_zoom": "Zoom"
|
|
62
|
-
},
|
|
63
|
-
"alert": {
|
|
28
|
+
"filepreview": {
|
|
29
|
+
"audio_title": "Audio file",
|
|
30
|
+
"image_title": "Image preview",
|
|
31
|
+
"image_thumbnail_alt": "Image thumbnail",
|
|
32
|
+
"text_title": "Text preview",
|
|
33
|
+
"video_title": "Video preview",
|
|
34
|
+
"pdf_title": "PDF preview",
|
|
35
|
+
"office_title": "Office preview",
|
|
36
|
+
"archive_title": "Archive preview",
|
|
37
|
+
"loading_text": "Loading...",
|
|
38
|
+
"loading_archive": "Loading archive...",
|
|
39
|
+
"loading_entry": "Loading entry...",
|
|
40
|
+
"cannot_open_file": "Cannot open file",
|
|
41
|
+
"cannot_open_archive": "Cannot open archive",
|
|
42
|
+
"cannot_preview_entry": "Cannot preview entry",
|
|
43
|
+
"office_fallback": "If embedded preview is unavailable, download the file.",
|
|
44
|
+
"invalid_zip": "Invalid ZIP file",
|
|
45
|
+
"central_directory_not_found": "Central directory not found",
|
|
46
|
+
"archive_buffer_missing": "Archive buffer is missing",
|
|
47
|
+
"entry_corrupted": "Archive entry is corrupted",
|
|
48
|
+
"compression_not_supported": "Compression method is not supported",
|
|
49
|
+
"deflate_not_supported": "Deflate decompression is not supported by the browser",
|
|
50
|
+
"unknown_error": "Unknown error",
|
|
51
|
+
"empty_file": "(empty file)",
|
|
52
|
+
"archive_empty_unsupported": "Archive is empty or unsupported.",
|
|
53
|
+
"archive_type_dir": "dir",
|
|
54
|
+
"archive_type_file": "file",
|
|
55
|
+
"archive_table_name": "Name",
|
|
56
|
+
"archive_table_type": "Type",
|
|
57
|
+
"archive_table_packed": "Packed",
|
|
58
|
+
"archive_table_size": "Size",
|
|
59
|
+
"archive_table_preview": "Preview",
|
|
60
|
+
"pdf_page": "Page",
|
|
61
|
+
"pdf_zoom": "Zoom"
|
|
62
|
+
},
|
|
63
|
+
"alert": {
|
|
64
64
|
"title": "Default header",
|
|
65
65
|
"description": "Description of the current action",
|
|
66
66
|
"reason": "Alert already open"
|
|
@@ -7,22 +7,22 @@
|
|
|
7
7
|
"agree": "Да",
|
|
8
8
|
"cancel": "Нет"
|
|
9
9
|
},
|
|
10
|
-
"filepreview": {
|
|
11
|
-
"open_audio": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043b\u0435\u0435\u0440",
|
|
12
|
-
"open_image": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
|
|
13
|
-
"open_text": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u043a\u0441\u0442",
|
|
14
|
-
"open_video": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432\u0438\u0434\u0435\u043e",
|
|
15
|
-
"open_archive": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0430\u0440\u0445\u0438\u0432",
|
|
16
|
-
"open_pdf": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c PDF",
|
|
17
|
-
"open_office": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442",
|
|
18
|
-
"download": "\u0421\u043a\u0430\u0447\u0430\u0442\u044c",
|
|
19
|
-
"preview": "\u041f\u0440\u0435\u0432\u044c\u044e",
|
|
20
|
-
"prev": "\u041d\u0430\u0437\u0430\u0434",
|
|
21
|
-
"next": "\u0412\u043f\u0435\u0440\u0435\u0434",
|
|
22
|
-
"zoom_in": "\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c",
|
|
23
|
-
"zoom_out": "\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c"
|
|
24
|
-
},
|
|
25
|
-
"loadmore": {
|
|
10
|
+
"filepreview": {
|
|
11
|
+
"open_audio": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u043b\u0435\u0435\u0440",
|
|
12
|
+
"open_image": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435",
|
|
13
|
+
"open_text": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0442\u0435\u043a\u0441\u0442",
|
|
14
|
+
"open_video": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432\u0438\u0434\u0435\u043e",
|
|
15
|
+
"open_archive": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0430\u0440\u0445\u0438\u0432",
|
|
16
|
+
"open_pdf": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c PDF",
|
|
17
|
+
"open_office": "\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442",
|
|
18
|
+
"download": "\u0421\u043a\u0430\u0447\u0430\u0442\u044c",
|
|
19
|
+
"preview": "\u041f\u0440\u0435\u0432\u044c\u044e",
|
|
20
|
+
"prev": "\u041d\u0430\u0437\u0430\u0434",
|
|
21
|
+
"next": "\u0412\u043f\u0435\u0440\u0435\u0434",
|
|
22
|
+
"zoom_in": "\u0423\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c",
|
|
23
|
+
"zoom_out": "\u0423\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c"
|
|
24
|
+
},
|
|
25
|
+
"loadmore": {
|
|
26
26
|
"send": "Загружаю...",
|
|
27
27
|
"show": "Показываю...",
|
|
28
28
|
"text-ajax": "Загрузить еще",
|
|
@@ -36,4 +36,4 @@
|
|
|
36
36
|
"select": {
|
|
37
37
|
"load-more": "Загрузить еще"
|
|
38
38
|
}
|
|
39
|
-
}
|
|
39
|
+
}
|
|
@@ -25,42 +25,42 @@
|
|
|
25
25
|
"description": "Вернуть будет невозможно",
|
|
26
26
|
"drop-active": "Отпустите, чтобы загрузить"
|
|
27
27
|
},
|
|
28
|
-
"filepreview": {
|
|
29
|
-
"audio_title": "\u0410\u0443\u0434\u0438\u043e \u0444\u0430\u0439\u043b",
|
|
30
|
-
"image_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
|
|
31
|
-
"image_thumbnail_alt": "\u041c\u0438\u043d\u0438\u0430\u0442\u044e\u0440\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
|
|
32
|
-
"text_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0442\u0435\u043a\u0441\u0442\u0430",
|
|
33
|
-
"video_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0438\u0434\u0435\u043e",
|
|
34
|
-
"pdf_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 PDF",
|
|
35
|
-
"office_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",
|
|
36
|
-
"archive_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0430\u0440\u0445\u0438\u0432\u0430",
|
|
37
|
-
"loading_text": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430...",
|
|
38
|
-
"loading_archive": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0430\u0440\u0445\u0438\u0432\u0430...",
|
|
39
|
-
"loading_entry": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430...",
|
|
40
|
-
"cannot_open_file": "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b",
|
|
41
|
-
"cannot_open_archive": "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0430\u0440\u0445\u0438\u0432",
|
|
42
|
-
"cannot_preview_entry": "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0435",
|
|
43
|
-
"office_fallback": "\u0415\u0441\u043b\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0432\u044c\u044e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b.",
|
|
44
|
-
"invalid_zip": "\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 ZIP-\u0444\u0430\u0439\u043b",
|
|
45
|
-
"central_directory_not_found": "\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d",
|
|
46
|
-
"archive_buffer_missing": "\u0411\u0443\u0444\u0435\u0440 \u0430\u0440\u0445\u0438\u0432\u0430 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d",
|
|
47
|
-
"entry_corrupted": "\u0424\u0430\u0439\u043b \u0432 \u0430\u0440\u0445\u0438\u0432\u0435 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d",
|
|
48
|
-
"compression_not_supported": "\u041c\u0435\u0442\u043e\u0434 \u0441\u0436\u0430\u0442\u0438\u044f \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f",
|
|
49
|
-
"deflate_not_supported": "\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0443 Deflate",
|
|
50
|
-
"unknown_error": "\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430",
|
|
51
|
-
"empty_file": "(\u043f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b)",
|
|
52
|
-
"archive_empty_unsupported": "\u0410\u0440\u0445\u0438\u0432 \u043f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f.",
|
|
53
|
-
"archive_type_dir": "\u043f\u0430\u043f\u043a\u0430",
|
|
54
|
-
"archive_type_file": "\u0444\u0430\u0439\u043b",
|
|
55
|
-
"archive_table_name": "\u0418\u043c\u044f",
|
|
56
|
-
"archive_table_type": "\u0422\u0438\u043f",
|
|
57
|
-
"archive_table_packed": "\u0421\u0436\u0430\u0442\u044b\u0439",
|
|
58
|
-
"archive_table_size": "\u0420\u0430\u0437\u043c\u0435\u0440",
|
|
59
|
-
"archive_table_preview": "\u041f\u0440\u0435\u0432\u044c\u044e",
|
|
60
|
-
"pdf_page": "\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430",
|
|
61
|
-
"pdf_zoom": "\u041c\u0430\u0441\u0448\u0442\u0430\u0431"
|
|
62
|
-
},
|
|
63
|
-
"alert": {
|
|
28
|
+
"filepreview": {
|
|
29
|
+
"audio_title": "\u0410\u0443\u0434\u0438\u043e \u0444\u0430\u0439\u043b",
|
|
30
|
+
"image_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
|
|
31
|
+
"image_thumbnail_alt": "\u041c\u0438\u043d\u0438\u0430\u0442\u044e\u0440\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f",
|
|
32
|
+
"text_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0442\u0435\u043a\u0441\u0442\u0430",
|
|
33
|
+
"video_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0432\u0438\u0434\u0435\u043e",
|
|
34
|
+
"pdf_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 PDF",
|
|
35
|
+
"office_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430",
|
|
36
|
+
"archive_title": "\u041f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 \u0430\u0440\u0445\u0438\u0432\u0430",
|
|
37
|
+
"loading_text": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430...",
|
|
38
|
+
"loading_archive": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0430\u0440\u0445\u0438\u0432\u0430...",
|
|
39
|
+
"loading_entry": "\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0444\u0430\u0439\u043b\u0430 \u0438\u0437 \u0430\u0440\u0445\u0438\u0432\u0430...",
|
|
40
|
+
"cannot_open_file": "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0444\u0430\u0439\u043b",
|
|
41
|
+
"cannot_open_archive": "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0430\u0440\u0445\u0438\u0432",
|
|
42
|
+
"cannot_preview_entry": "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0432\u043b\u043e\u0436\u0435\u043d\u0438\u0435",
|
|
43
|
+
"office_fallback": "\u0415\u0441\u043b\u0438 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u0435\u0432\u044c\u044e \u043d\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u0441\u043a\u0430\u0447\u0430\u0439\u0442\u0435 \u0444\u0430\u0439\u043b.",
|
|
44
|
+
"invalid_zip": "\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 ZIP-\u0444\u0430\u0439\u043b",
|
|
45
|
+
"central_directory_not_found": "\u0426\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d",
|
|
46
|
+
"archive_buffer_missing": "\u0411\u0443\u0444\u0435\u0440 \u0430\u0440\u0445\u0438\u0432\u0430 \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d",
|
|
47
|
+
"entry_corrupted": "\u0424\u0430\u0439\u043b \u0432 \u0430\u0440\u0445\u0438\u0432\u0435 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0435\u043d",
|
|
48
|
+
"compression_not_supported": "\u041c\u0435\u0442\u043e\u0434 \u0441\u0436\u0430\u0442\u0438\u044f \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f",
|
|
49
|
+
"deflate_not_supported": "\u0411\u0440\u0430\u0443\u0437\u0435\u0440 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0440\u0430\u0441\u043f\u0430\u043a\u043e\u0432\u043a\u0443 Deflate",
|
|
50
|
+
"unknown_error": "\u041d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430",
|
|
51
|
+
"empty_file": "(\u043f\u0443\u0441\u0442\u043e\u0439 \u0444\u0430\u0439\u043b)",
|
|
52
|
+
"archive_empty_unsupported": "\u0410\u0440\u0445\u0438\u0432 \u043f\u0443\u0441\u0442\u043e\u0439 \u0438\u043b\u0438 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f.",
|
|
53
|
+
"archive_type_dir": "\u043f\u0430\u043f\u043a\u0430",
|
|
54
|
+
"archive_type_file": "\u0444\u0430\u0439\u043b",
|
|
55
|
+
"archive_table_name": "\u0418\u043c\u044f",
|
|
56
|
+
"archive_table_type": "\u0422\u0438\u043f",
|
|
57
|
+
"archive_table_packed": "\u0421\u0436\u0430\u0442\u044b\u0439",
|
|
58
|
+
"archive_table_size": "\u0420\u0430\u0437\u043c\u0435\u0440",
|
|
59
|
+
"archive_table_preview": "\u041f\u0440\u0435\u0432\u044c\u044e",
|
|
60
|
+
"pdf_page": "\u0421\u0442\u0440\u0430\u043d\u0438\u0446\u0430",
|
|
61
|
+
"pdf_zoom": "\u041c\u0430\u0441\u0448\u0442\u0430\u0431"
|
|
62
|
+
},
|
|
63
|
+
"alert": {
|
|
64
64
|
"title": "Заголовок по умолчанию",
|
|
65
65
|
"description": "Описание текущего действия",
|
|
66
66
|
"reason": "Алерт уже открыт"
|
|
@@ -15,8 +15,8 @@ import Animation from "../utils/js/components/animation";
|
|
|
15
15
|
import Ajax from "../utils/js/components/ajax";
|
|
16
16
|
import Html from "../utils/js/components/templater";
|
|
17
17
|
|
|
18
|
-
class BaseModule {
|
|
19
|
-
constructor(element) {
|
|
18
|
+
class BaseModule {
|
|
19
|
+
constructor(element) {
|
|
20
20
|
if (!element) return
|
|
21
21
|
|
|
22
22
|
this._element = Selectors.find(element);
|
|
@@ -54,13 +54,13 @@ class BaseModule {
|
|
|
54
54
|
* - timeout = задержка перед отправкой, по умолчанию 0
|
|
55
55
|
* @param callback
|
|
56
56
|
*/
|
|
57
|
-
_route(callback) {
|
|
58
|
-
if (typeof callback !== 'function') {
|
|
59
|
-
return this._requestRoute(callback);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
let $content = null,
|
|
63
|
-
timeout = this._params.ajax.timeout || 0;
|
|
57
|
+
_route(callback) {
|
|
58
|
+
if (typeof callback !== 'function') {
|
|
59
|
+
return this._requestRoute(callback);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
let $content = null,
|
|
63
|
+
timeout = this._params.ajax.timeout || 0;
|
|
64
64
|
|
|
65
65
|
if (this._isLoaded) return;
|
|
66
66
|
|
|
@@ -137,83 +137,83 @@ class BaseModule {
|
|
|
137
137
|
if (this._params.ajax.method.toLowerCase() === 'delete') {
|
|
138
138
|
ajax.delete(this._params.ajax.route, ajaxData);
|
|
139
139
|
}
|
|
140
|
-
}, timeout);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
_requestRoute(options = {}) {
|
|
144
|
-
const config = this._normalizeRouteRequestOptions(options);
|
|
145
|
-
return Ajax.requestRoute(config);
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
_buildRouteUrl(params = {}, endpoint = '', options = {}) {
|
|
149
|
-
const config = this._normalizeRouteRequestOptions(Object.assign({}, options, {
|
|
150
|
-
params,
|
|
151
|
-
route: endpoint || options.route || '',
|
|
152
|
-
}));
|
|
153
|
-
return Ajax.buildRouteUrl(config.route, {
|
|
154
|
-
params: config.params,
|
|
155
|
-
baseParams: config.baseParams,
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
_normalizeRouteRequestOptions(options = {}) {
|
|
160
|
-
const requestOptions = this._params && isObject(this._params.request)
|
|
161
|
-
? this._params.request
|
|
162
|
-
: {};
|
|
163
|
-
const ajaxOptions = this._params && isObject(this._params.ajax)
|
|
164
|
-
? this._params.ajax
|
|
165
|
-
: {};
|
|
166
|
-
const source = isObject(options) ? options : {};
|
|
167
|
-
const route = String(
|
|
168
|
-
source.route
|
|
169
|
-
|| source.endpoint
|
|
170
|
-
|| requestOptions.route
|
|
171
|
-
|| ajaxOptions.route
|
|
172
|
-
|| ''
|
|
173
|
-
).trim();
|
|
174
|
-
const method = String(
|
|
175
|
-
source.method
|
|
176
|
-
|| requestOptions.method
|
|
177
|
-
|| ajaxOptions.method
|
|
178
|
-
|| 'GET'
|
|
179
|
-
).toUpperCase().trim() || 'GET';
|
|
180
|
-
const credentials = String(
|
|
181
|
-
source.credentials
|
|
182
|
-
|| requestOptions.credentials
|
|
183
|
-
|| 'same-origin'
|
|
184
|
-
).trim() || 'same-origin';
|
|
185
|
-
const headers = mergeDeepObject(
|
|
186
|
-
{
|
|
187
|
-
'Accept': 'application/json',
|
|
188
|
-
'X-Requested-With': 'XMLHttpRequest',
|
|
189
|
-
},
|
|
190
|
-
isObject(requestOptions.headers) ? requestOptions.headers : {},
|
|
191
|
-
isObject(source.headers) ? source.headers : {}
|
|
192
|
-
);
|
|
193
|
-
const baseParams = mergeDeepObject(
|
|
194
|
-
{},
|
|
195
|
-
isObject(requestOptions.params) ? requestOptions.params : {},
|
|
196
|
-
isObject(source.baseParams) ? source.baseParams : {},
|
|
197
|
-
isObject(source.paramsBase) ? source.paramsBase : {}
|
|
198
|
-
);
|
|
199
|
-
const params = isObject(source.params) ? source.params : {};
|
|
200
|
-
const body = source.body !== undefined
|
|
201
|
-
? source.body
|
|
202
|
-
: (source.data !== undefined ? source.data : null);
|
|
203
|
-
return {
|
|
204
|
-
route,
|
|
205
|
-
method,
|
|
206
|
-
credentials,
|
|
207
|
-
headers,
|
|
208
|
-
baseParams,
|
|
209
|
-
params,
|
|
210
|
-
body,
|
|
211
|
-
signal: source.signal || null,
|
|
212
|
-
responseType: String(source.responseType || source.parse || 'auto').toLowerCase().trim() || 'auto',
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
_dismissElement() {
|
|
140
|
+
}, timeout);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
_requestRoute(options = {}) {
|
|
144
|
+
const config = this._normalizeRouteRequestOptions(options);
|
|
145
|
+
return Ajax.requestRoute(config);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
_buildRouteUrl(params = {}, endpoint = '', options = {}) {
|
|
149
|
+
const config = this._normalizeRouteRequestOptions(Object.assign({}, options, {
|
|
150
|
+
params,
|
|
151
|
+
route: endpoint || options.route || '',
|
|
152
|
+
}));
|
|
153
|
+
return Ajax.buildRouteUrl(config.route, {
|
|
154
|
+
params: config.params,
|
|
155
|
+
baseParams: config.baseParams,
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
_normalizeRouteRequestOptions(options = {}) {
|
|
160
|
+
const requestOptions = this._params && isObject(this._params.request)
|
|
161
|
+
? this._params.request
|
|
162
|
+
: {};
|
|
163
|
+
const ajaxOptions = this._params && isObject(this._params.ajax)
|
|
164
|
+
? this._params.ajax
|
|
165
|
+
: {};
|
|
166
|
+
const source = isObject(options) ? options : {};
|
|
167
|
+
const route = String(
|
|
168
|
+
source.route
|
|
169
|
+
|| source.endpoint
|
|
170
|
+
|| requestOptions.route
|
|
171
|
+
|| ajaxOptions.route
|
|
172
|
+
|| ''
|
|
173
|
+
).trim();
|
|
174
|
+
const method = String(
|
|
175
|
+
source.method
|
|
176
|
+
|| requestOptions.method
|
|
177
|
+
|| ajaxOptions.method
|
|
178
|
+
|| 'GET'
|
|
179
|
+
).toUpperCase().trim() || 'GET';
|
|
180
|
+
const credentials = String(
|
|
181
|
+
source.credentials
|
|
182
|
+
|| requestOptions.credentials
|
|
183
|
+
|| 'same-origin'
|
|
184
|
+
).trim() || 'same-origin';
|
|
185
|
+
const headers = mergeDeepObject(
|
|
186
|
+
{
|
|
187
|
+
'Accept': 'application/json',
|
|
188
|
+
'X-Requested-With': 'XMLHttpRequest',
|
|
189
|
+
},
|
|
190
|
+
isObject(requestOptions.headers) ? requestOptions.headers : {},
|
|
191
|
+
isObject(source.headers) ? source.headers : {}
|
|
192
|
+
);
|
|
193
|
+
const baseParams = mergeDeepObject(
|
|
194
|
+
{},
|
|
195
|
+
isObject(requestOptions.params) ? requestOptions.params : {},
|
|
196
|
+
isObject(source.baseParams) ? source.baseParams : {},
|
|
197
|
+
isObject(source.paramsBase) ? source.paramsBase : {}
|
|
198
|
+
);
|
|
199
|
+
const params = isObject(source.params) ? source.params : {};
|
|
200
|
+
const body = source.body !== undefined
|
|
201
|
+
? source.body
|
|
202
|
+
: (source.data !== undefined ? source.data : null);
|
|
203
|
+
return {
|
|
204
|
+
route,
|
|
205
|
+
method,
|
|
206
|
+
credentials,
|
|
207
|
+
headers,
|
|
208
|
+
baseParams,
|
|
209
|
+
params,
|
|
210
|
+
body,
|
|
211
|
+
signal: source.signal || null,
|
|
212
|
+
responseType: String(source.responseType || source.parse || 'auto').toLowerCase().trim() || 'auto',
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
_dismissElement() {
|
|
217
217
|
let cross = getSVG('cross'),
|
|
218
218
|
button = this._element.querySelector('.vg-btn-close');
|
|
219
219
|
|
|
@@ -235,34 +235,34 @@ class BaseModule {
|
|
|
235
235
|
return Data.get(Selectors.find(element), this.NAME_KEY)
|
|
236
236
|
}
|
|
237
237
|
|
|
238
|
-
static getOrCreateInstance(element, params = {}) {
|
|
239
|
-
return this.getInstance(element) || new this(element, !isEmptyObj(params) ? params : {})
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
static boot(params = {}) {
|
|
243
|
-
if (typeof this.initAll === 'function') {
|
|
244
|
-
return this.initAll(params);
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
if (typeof this.init !== 'function') {
|
|
248
|
-
return null;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
if (params && Object.prototype.hasOwnProperty.call(params, 'element')) {
|
|
252
|
-
const { element, ...options } = params;
|
|
253
|
-
return this.init(element, options);
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
return null;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
static get DATA_KEY() {
|
|
260
|
-
return `vg.${this.NAME}`
|
|
261
|
-
}
|
|
238
|
+
static getOrCreateInstance(element, params = {}) {
|
|
239
|
+
return this.getInstance(element) || new this(element, !isEmptyObj(params) ? params : {})
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
static boot(params = {}) {
|
|
243
|
+
if (typeof this.initAll === 'function') {
|
|
244
|
+
return this.initAll(params);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
if (typeof this.init !== 'function') {
|
|
248
|
+
return null;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (params && Object.prototype.hasOwnProperty.call(params, 'element')) {
|
|
252
|
+
const { element, ...options } = params;
|
|
253
|
+
return this.init(element, options);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
return null;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
static get DATA_KEY() {
|
|
260
|
+
return `vg.${this.NAME}`
|
|
261
|
+
}
|
|
262
262
|
|
|
263
263
|
static get EVENT_KEY() {
|
|
264
264
|
return `.${this.DATA_KEY}`
|
|
265
265
|
}
|
|
266
266
|
}
|
|
267
267
|
|
|
268
|
-
export default BaseModule;
|
|
268
|
+
export default BaseModule;
|