vgapp 0.6.7 → 0.6.9
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/CHANGELOG.md +13 -0
- package/app/modules/vgmodal/js/vgmodal.js +21 -20
- package/app/modules/vgsidebar/js/vgsidebar.js +24 -22
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,25 @@
|
|
|
1
|
+
# VEGAS-APP 0.6.6 - 0.6.8 (Ноябрь, 17, 2025)
|
|
2
|
+
* isLeaveBackDrop (boolean) - для методов .hide() модулей VGModal и VGSidebar. Если программно нужно сменить модалки или сайдбары и/или одно на другое при этом не будет затронут задний фон Backdrop
|
|
3
|
+
* Исправлены ошибки в разных модулях
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# VEGAS-APP 0.6.2 - 0.6.5 (Ноябрь, 10, 2025)
|
|
2
8
|
* Исправлены ошибки в разных модулях
|
|
3
9
|
|
|
10
|
+
---
|
|
11
|
+
|
|
4
12
|
# VEGAS-APP 0.5.6 - 0.6.1 (Август, 21, 2025)
|
|
5
13
|
* Разделение JS и CSS
|
|
6
14
|
* Исправлены ошибки в разных модулях
|
|
7
15
|
|
|
16
|
+
---
|
|
17
|
+
|
|
8
18
|
# VEGAS-APP 0.4.6 - 0.5.5 (Июнь, 21, 2025)
|
|
9
19
|
* Исправлены ошибки в разных модулях
|
|
10
20
|
|
|
21
|
+
---
|
|
22
|
+
|
|
11
23
|
# VEGAS-APP 0.4.3 - 0.4.6 (Июнь, 3, 2025)
|
|
12
24
|
* Исправлены ошибки в разных модулях
|
|
13
25
|
* Во все модули, где есть группа параметров ajax, добавлен параметр output (boolean),
|
|
@@ -15,6 +27,7 @@
|
|
|
15
27
|
* Во все модули, где есть группа параметров ajax, добавлен параметр once (boolean),
|
|
16
28
|
разовый запрос на сервер
|
|
17
29
|
|
|
30
|
+
---
|
|
18
31
|
## Модуль VGRollup
|
|
19
32
|
* Исправлено, последовательное открытие свернутого контента
|
|
20
33
|
|
|
@@ -149,7 +149,7 @@ class VGModal extends BaseModule {
|
|
|
149
149
|
show(relatedTarget) {
|
|
150
150
|
if (isDisabled(this._element)) return;
|
|
151
151
|
|
|
152
|
-
if (this._params.ajax.route && this._params.ajax.target) {
|
|
152
|
+
if (this._params.ajax.route && this._params.ajax.target && !this._params.ajax.once) {
|
|
153
153
|
const ajaxTargetContent = Selectors.find(this._params.ajax.target, this._element);
|
|
154
154
|
if (ajaxTargetContent) ajaxTargetContent.innerHTML = '';
|
|
155
155
|
}
|
|
@@ -178,7 +178,7 @@ class VGModal extends BaseModule {
|
|
|
178
178
|
Backdrop.show(() => this._showElement(relatedTarget));
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
-
hide(openedModals = []) {
|
|
181
|
+
hide(openedModals = [], isLeaveBackDrop = false) {
|
|
182
182
|
if (!this._isShown || this._isTransitioning) return;
|
|
183
183
|
|
|
184
184
|
const hideEvent = EventHandler.trigger(this._element, EVENT_KEY_HIDE);
|
|
@@ -187,32 +187,34 @@ class VGModal extends BaseModule {
|
|
|
187
187
|
this._isShown = false;
|
|
188
188
|
this._isTransitioning = true;
|
|
189
189
|
|
|
190
|
+
document.body.classList.remove(CLASS_NAME_OPEN);
|
|
191
|
+
|
|
190
192
|
setTimeout(() => {
|
|
191
193
|
this._element.classList.remove(CLASS_NAME_SHOW);
|
|
192
|
-
this._queueCallback(() => this._hideModal(openedModals), this._element, this._isAnimatedFade());
|
|
194
|
+
this._queueCallback(() => this._hideModal(openedModals, isLeaveBackDrop), this._element, this._isAnimatedFade());
|
|
193
195
|
}, this._params.animation.delay);
|
|
194
196
|
}
|
|
195
197
|
|
|
196
|
-
_hideModal(openedModals) {
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
198
|
+
_hideModal(openedModals, isLeaveBackDrop) {
|
|
199
|
+
if (!isLeaveBackDrop) {
|
|
200
|
+
this._element.style.display = 'none';
|
|
201
|
+
this._element.removeAttribute('aria-modal');
|
|
202
|
+
this._element.removeAttribute('role');
|
|
203
|
+
this._isTransitioning = false;
|
|
202
204
|
|
|
203
|
-
|
|
205
|
+
if (openedModals.length) return;
|
|
204
206
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
207
|
+
if (this._params.hash) {
|
|
208
|
+
history.pushState("", document.title, window.location.pathname + window.location.search);
|
|
209
|
+
}
|
|
208
210
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
this._scrollBar.reset();
|
|
211
|
+
Backdrop.hide(() => {
|
|
212
|
+
this._resetAdjustments();
|
|
213
|
+
this._scrollBar.reset();
|
|
213
214
|
|
|
214
|
-
|
|
215
|
-
|
|
215
|
+
EventHandler.trigger(this._element, EVENT_KEY_HIDDEN);
|
|
216
|
+
})
|
|
217
|
+
}
|
|
216
218
|
}
|
|
217
219
|
|
|
218
220
|
_showElement(relatedTarget) {
|
|
@@ -221,7 +223,6 @@ class VGModal extends BaseModule {
|
|
|
221
223
|
}
|
|
222
224
|
|
|
223
225
|
this._element.style.display = 'block';
|
|
224
|
-
//this._element.removeAttribute('aria-hidden');
|
|
225
226
|
this._element.setAttribute('aria-modal', true);
|
|
226
227
|
this._element.setAttribute('role', 'dialog');
|
|
227
228
|
this._element.scrollTop = 0;
|
|
@@ -114,36 +114,38 @@ class VGSidebar extends BaseModule {
|
|
|
114
114
|
_this._queueCallback(completeCallBack, _this._element, true, 50)
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
hide() {
|
|
118
|
-
|
|
119
|
-
if (isDisabled(_this._element)) return;
|
|
117
|
+
hide(isLeaveBackDrop = false) {
|
|
118
|
+
if (isDisabled(this._element)) return;
|
|
120
119
|
|
|
121
120
|
const hideEvent = EventHandler.trigger(this._element, EVENT_KEY_HIDE);
|
|
122
121
|
if (hideEvent.defaultPrevented) return;
|
|
123
122
|
|
|
123
|
+
document.body.classList.remove(CLASS_NAME_OPEN);
|
|
124
|
+
|
|
124
125
|
setTimeout(() => {
|
|
125
|
-
|
|
126
|
-
|
|
126
|
+
this._element.setAttribute('aria-expanded', false);
|
|
127
|
+
this._element.classList.remove(CLASS_NAME_SHOW);
|
|
127
128
|
|
|
128
129
|
const completeCallback = () => {
|
|
129
|
-
if (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
130
|
+
if (!isLeaveBackDrop) {
|
|
131
|
+
if (this._params.backdrop) {
|
|
132
|
+
Backdrop.hide(() => {
|
|
133
|
+
if (this._params.overflow) {
|
|
134
|
+
Overflow.destroy();
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
if (this._params.overflow) {
|
|
140
|
+
Overflow.destroy();
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
if (this._params.hash) {
|
|
144
|
+
history.pushState("", document.title, window.location.pathname + window.location.search);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
EventHandler.trigger(this._element, EVENT_KEY_HIDDEN);
|
|
143
148
|
}
|
|
144
|
-
|
|
145
|
-
document.body.classList.remove(CLASS_NAME_OPEN);
|
|
146
|
-
EventHandler.trigger(this._element, EVENT_KEY_HIDDEN);
|
|
147
149
|
}
|
|
148
150
|
this._queueCallback(completeCallback, this._element, true);
|
|
149
151
|
}, this._params.animation.delay);
|