vgapp 0.8.6 → 0.8.7

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.
@@ -10,6 +10,7 @@ import {lang_buttons, lang_messages} from "../../../utils/js/components/lang";
10
10
  import VGAlert from "../../vgalert";
11
11
  import VGToast from "../../vgtoast";
12
12
  import VGFilesTemplateRender from "./render";
13
+ import VGFilesSortable from "./sortable";
13
14
 
14
15
  const NAME = 'files';
15
16
  const NAME_KEY = 'vg.files';
@@ -168,11 +169,7 @@ class VGFiles extends VGFilesBase {
168
169
 
169
170
  // Если нужно — запустить sortable
170
171
  if (this._params.sortable?.enabled && this._params.sortable.route && !this._sortable) {
171
- import('./sortable.js').then(module => {
172
- this._sortable = new module.default(this, this._params.sortable);
173
- }).catch(err => {
174
- console.error('Ошибка загрузки VGFilesSortable:', err);
175
- });
172
+ this._sortable = new VGFilesSortable(this, this._params.sortable)
176
173
  }
177
174
 
178
175
  // Триггерим изменение
@@ -25,7 +25,20 @@ class Backdrop {
25
25
  * @param {Function} callback - вызывается после отображения
26
26
  */
27
27
  static show(callback) {
28
+ // Проверяем, существует ли бэкдроп в DOM, даже если _backdrop === null
28
29
  if (!this._backdrop) {
30
+ this._backdrop = this._rootEl.querySelector(`.${CLASS_NAME}`);
31
+ }
32
+
33
+ // Если найден в DOM — используем его
34
+ if (this._backdrop) {
35
+ // Убеждаемся, что классы корректны
36
+ Classes.add(this._backdrop, CLASS_NAME_SHOW);
37
+ setTimeout(() => {
38
+ Classes.add(this._backdrop, CLASS_NAME_FADE);
39
+ }, backdropDelay);
40
+ } else {
41
+ // Создаём новый, если не найден
29
42
  this._append();
30
43
  }
31
44
 
@@ -37,6 +50,11 @@ class Backdrop {
37
50
  * @param {Function} callback - вызывается после скрытия
38
51
  */
39
52
  static hide(callback) {
53
+ if (!this._backdrop) {
54
+ // На всякий случай проверим, есть ли элемент в DOM
55
+ this._backdrop = this._rootEl.querySelector(`.${CLASS_NAME}`);
56
+ }
57
+
40
58
  if (!this._backdrop) return;
41
59
 
42
60
  this._destroy().then(execute.bind(null, callback));
@@ -142,7 +142,7 @@ class ScrollBarHelper {
142
142
  // Важно: сохраняем даже пустую строку (если inline-стиля не было)
143
143
  // чтобы reset() мог корректно восстановить "как было".
144
144
  if (value !== null) {
145
- Manipulator.set(element, property, value);
145
+ //Manipulator.set(element, property, value);
146
146
  }
147
147
  }
148
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vgapp",
3
- "version": "0.8.6",
3
+ "version": "0.8.7",
4
4
  "description": "",
5
5
  "author": {
6
6
  "name": "Vegas Studio",