layerpro 2.1.5 → 2.2.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/index.cjs +188 -183
- package/index.js +195 -190
- package/package.json +1 -1
- package/types/layerpro.d.ts +1 -1
package/index.cjs
CHANGED
|
@@ -28,19 +28,22 @@ h({}, {
|
|
|
28
28
|
mouseCoord: () => i
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
var b, _, f, v, g, w, y, z, k, x, C, M, N, T,
|
|
31
|
+
var b, _, f, v, g, w, y, z, k, x, C, E, S, M, N, T, O, I, A, L, P, j, H, R, W, q, D, X, Y, U, K, B, F, J, Q, G, V, Z, ee = l({
|
|
32
32
|
"core/mouseCoords.ts"() {
|
|
33
33
|
i = e => [ e.clientX, e.clientY, e.screenX, e.screenY, e.pageX, e.pageY ], n = 0,
|
|
34
34
|
p = "", s = 0, r = 0, c = e => (n = s < e.pageX ? 1 : 0, p = r < e.pageY ? "down" : "up",
|
|
35
35
|
s = e.pageX, r = e.pageY, [ n, p ]);
|
|
36
36
|
}
|
|
37
|
-
}),
|
|
37
|
+
}), oe = l({
|
|
38
38
|
"core/message.ts"() {
|
|
39
|
-
b =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
b = {
|
|
40
|
+
"&": "&",
|
|
41
|
+
"<": "<",
|
|
42
|
+
">": ">",
|
|
43
|
+
'"': """,
|
|
44
|
+
"'": "'"
|
|
45
|
+
}, _ = e => e.replace(/[&<>"']/g, e => b[e]), f = e => {
|
|
46
|
+
const o = _(String(e)), t = window.layerpro.popup.open({
|
|
44
47
|
id: "__alert",
|
|
45
48
|
name: "Warning",
|
|
46
49
|
icon: "⚠",
|
|
@@ -58,8 +61,8 @@ var b, _, f, v, g, w, y, z, k, x, C, M, N, T, E, I, O, S, L, A, P, j, H, R, W, D
|
|
|
58
61
|
$(".popup_body_" + t.id).html(i), $("#a_" + t.id).on("click", () => {
|
|
59
62
|
window.layerpro.popup.close(t);
|
|
60
63
|
});
|
|
61
|
-
},
|
|
62
|
-
const t =
|
|
64
|
+
}, v = (e, o) => {
|
|
65
|
+
const t = _(String(e)), i = window.layerpro.popup.open({
|
|
63
66
|
id: "__message",
|
|
64
67
|
name: "Message",
|
|
65
68
|
icon: "⛭",
|
|
@@ -77,9 +80,9 @@ var b, _, f, v, g, w, y, z, k, x, C, M, N, T, E, I, O, S, L, A, P, j, H, R, W, D
|
|
|
77
80
|
$(".popup_body_" + i.id).html(n), $("#a_" + i.id).on("click", () => {
|
|
78
81
|
o && o(), window.layerpro.popup.close(i);
|
|
79
82
|
});
|
|
80
|
-
},
|
|
83
|
+
}, g = (e, o, t) => {
|
|
81
84
|
if (0 === $(".confirm").length) {
|
|
82
|
-
const i =
|
|
85
|
+
const i = _(String(e)), n = window.layerpro.popup.open({
|
|
83
86
|
id: "__confirm",
|
|
84
87
|
name: "Confirm",
|
|
85
88
|
icon: "☑",
|
|
@@ -100,8 +103,8 @@ var b, _, f, v, g, w, y, z, k, x, C, M, N, T, E, I, O, S, L, A, P, j, H, R, W, D
|
|
|
100
103
|
t && t(), window.layerpro.popup.close(n);
|
|
101
104
|
});
|
|
102
105
|
}
|
|
103
|
-
},
|
|
104
|
-
const t = o || "_prompt", i =
|
|
106
|
+
}, w = (e, o) => {
|
|
107
|
+
const t = o || "_prompt", i = _(String(e)), n = window.layerpro.popup.open({
|
|
105
108
|
id: "__prompt",
|
|
106
109
|
name: "Prompt",
|
|
107
110
|
icon: "✎",
|
|
@@ -141,31 +144,36 @@ var b, _, f, v, g, w, y, z, k, x, C, M, N, T, E, I, O, S, L, A, P, j, H, R, W, D
|
|
|
141
144
|
enumerable: !1
|
|
142
145
|
}), Object.defineProperties(window.layerpro, {
|
|
143
146
|
prompt: {
|
|
144
|
-
value:
|
|
147
|
+
value: w
|
|
145
148
|
},
|
|
146
149
|
alert: {
|
|
147
|
-
value:
|
|
150
|
+
value: f
|
|
148
151
|
},
|
|
149
152
|
message: {
|
|
150
|
-
value:
|
|
153
|
+
value: v
|
|
151
154
|
},
|
|
152
155
|
confirm: {
|
|
153
|
-
value:
|
|
156
|
+
value: g
|
|
154
157
|
}
|
|
155
158
|
});
|
|
156
159
|
}
|
|
157
|
-
}),
|
|
160
|
+
}), te = l({
|
|
158
161
|
"core/genLayer.ts"() {
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
162
|
+
oe(), y = new Map, z = new Map, k = {
|
|
163
|
+
"&": "&",
|
|
164
|
+
"<": "<",
|
|
165
|
+
">": ">",
|
|
166
|
+
'"': """,
|
|
167
|
+
"'": "'"
|
|
168
|
+
}, x = e => e.replace(/[&<>"']/g, e => k[e]), C = o => {
|
|
163
169
|
if ("function" == typeof o.body) return;
|
|
164
|
-
const t = !0 === o.raised ? ".popup_raised_" + o.id : "#popup";
|
|
165
|
-
|
|
166
|
-
|
|
170
|
+
const t = !0 === o.raised ? ".popup_raised_" + o.id : "#popup", i = "#popup" === t ? document.querySelector("#popup") : document.querySelector(t);
|
|
171
|
+
i?.querySelectorAll('[class^="popup_window_"]').forEach(e => e.classList.remove("zHigh")),
|
|
172
|
+
i?.querySelectorAll('[class^="popup_bar_"]').forEach(e => e.classList.remove("popup_bar_selected")),
|
|
173
|
+
i?.querySelectorAll('[class^="icon_"]').forEach(e => e.classList.remove("popup_bar_selected")),
|
|
174
|
+
!0 === o.raised && $('<div class="popup_raised_' + o.id + '">', t).appendTo("#popup").css({
|
|
167
175
|
"pointer-events": "auto",
|
|
168
|
-
"z-index":
|
|
176
|
+
"z-index": layerpro.popup.zIndex() + 1e3
|
|
169
177
|
}), $('<div class="popup_overflow_' + o.id + '">', t).appendTo(t).css({
|
|
170
178
|
top: o.top,
|
|
171
179
|
left: o.left,
|
|
@@ -178,68 +186,68 @@ var b, _, f, v, g, w, y, z, k, x, C, M, N, T, E, I, O, S, L, A, P, j, H, R, W, D
|
|
|
178
186
|
maxWidth: o.maxWidth,
|
|
179
187
|
maxHeight: o.maxHeight,
|
|
180
188
|
pointerEvents: "auto",
|
|
181
|
-
zIndex:
|
|
189
|
+
zIndex: layerpro.popup.zIndex()
|
|
182
190
|
}).on("mousedown", e => {
|
|
183
191
|
layerpro.popup.index(o);
|
|
184
192
|
}).hide().fadeIn(o.fadeIn);
|
|
185
|
-
const
|
|
193
|
+
const n = $('<div class="popup_window_' + o.id + '">', t).appendTo(".popup_overflow_" + o.id).css({
|
|
186
194
|
"pointer-events": "auto"
|
|
187
195
|
}).addClass("zHigh").addClass(o.class);
|
|
188
196
|
0 === [ o.top, o.left, o.bottom, o.right ].reduce((e, o) => "number" == typeof o && isFinite(o) ? Number(e) + o : e, 0) && layerpro.popup.center(o),
|
|
189
197
|
layerpro.popup.unmount = e => {
|
|
190
|
-
const o = w.get(e);
|
|
191
|
-
o && (o.unmount(), w.delete(e));
|
|
192
|
-
}, layerpro.popup.cleanupEvents = e => {
|
|
193
198
|
const o = y.get(e);
|
|
199
|
+
o && (o.unmount(), y.delete(e));
|
|
200
|
+
}, layerpro.popup.cleanupEvents = e => {
|
|
201
|
+
const o = z.get(e);
|
|
194
202
|
o && (o.iconClick && $(".icon_" + e, "#popup_dock").find("span").off("click"), o.iconClose && $(".icon_close_" + e, "#popup_dock").off("click"),
|
|
195
203
|
o.buttonIconize && $(".button_iconize_" + e).off("click"), o.buttonMaximize && $(".button_maximize_" + e).off("click"),
|
|
196
204
|
o.buttonClose && $(".button_close_" + e).off("click"), o.escKey && $(document).off("keydown"),
|
|
197
|
-
|
|
198
|
-
}, layerpro.popup.getReactRoot = e =>
|
|
205
|
+
z.delete(e));
|
|
206
|
+
}, layerpro.popup.getReactRoot = e => y.get(e), $('<div class="popup_bar_' + o.id + '">', t).appendTo(n).addClass("popup_bar_selected"),
|
|
199
207
|
o.icon && $('<div class="popup_icon_' + o.id + '">' + o.icon + "</div>", t).appendTo(".popup_bar_" + o.id);
|
|
200
|
-
const
|
|
201
|
-
if ($('<div class="popup_drag_' + o.id + '">' +
|
|
208
|
+
const p = x(String(o.name));
|
|
209
|
+
if ($('<div class="popup_drag_' + o.id + '">' + p + "</div>", t).appendTo(".popup_bar_" + o.id),
|
|
202
210
|
$('<div class="popup_option_' + o.id + '">', t).appendTo(".popup_bar_" + o.id),
|
|
203
211
|
!0 === o.iconize && 0 === $("#popup_dock").length) {
|
|
204
212
|
$("#root").css("margin", "0 0 var( --dock-height ) 0");
|
|
205
213
|
$('\n <div id="popup_dock">\n <div id="popup_dock_icon"></div>\n <div id="popup_dock_list"></div>\n <div id="popup_dock_options"></div>\n </div>\n ').appendTo("#popup").css({
|
|
206
214
|
pointerEvents: "auto",
|
|
207
|
-
zIndex:
|
|
215
|
+
zIndex: layerpro.popup.zIndex() + 1e3
|
|
208
216
|
});
|
|
209
217
|
}
|
|
210
218
|
if ($("#popup_dock").length > 0 && !0 === o.dockable) {
|
|
211
|
-
const e = String(o.id), t = `\n <div class="icon_${o.id}">\n <span>${o.icon ? o.icon : ""}</span>\n <span>${
|
|
219
|
+
const e = String(o.id), t = `\n <div class="icon_${o.id}">\n <span>${o.icon ? o.icon : ""}</span>\n <span>${p}</span>\n `, i = function(e) {
|
|
212
220
|
$(".popup_overflow_" + o.id + ":hidden") ? (layerpro.popup.iconize(o), layerpro.popup.index(o)) : layerpro.popup.iconize(o),
|
|
213
221
|
layerpro.popup.index(o);
|
|
214
|
-
},
|
|
222
|
+
}, n = function(e) {
|
|
215
223
|
o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
|
|
216
224
|
};
|
|
217
|
-
|
|
225
|
+
z.set(e, {
|
|
218
226
|
iconClick: !0,
|
|
219
227
|
iconClose: !0
|
|
220
228
|
}), $(t, "#popup_dock").appendTo("#popup_dock_list").addClass("popup_bar_selected").find("span").on("click", i),
|
|
221
|
-
$(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click",
|
|
229
|
+
$(`<button class="icon_close_${o.id}">X</button>`, "#popup_dock").appendTo(`.icon_${o.id}`).on("click", n);
|
|
222
230
|
}
|
|
223
231
|
if (!0 === o.iconize) {
|
|
224
232
|
const e = String(o.id), t = function(e) {
|
|
225
233
|
layerpro.popup.iconize(o);
|
|
226
|
-
}, i =
|
|
227
|
-
i.buttonIconize = !0,
|
|
234
|
+
}, i = z.get(e) || {};
|
|
235
|
+
i.buttonIconize = !0, z.set(e, i), $('<button class="button_iconize_' + o.id + ' iconize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
|
|
228
236
|
}
|
|
229
237
|
if (!0 === o.maximize) {
|
|
230
238
|
const e = String(o.id), t = function(e) {
|
|
231
239
|
layerpro.popup.maximize(o);
|
|
232
|
-
}, i =
|
|
233
|
-
i.buttonMaximize = !0,
|
|
240
|
+
}, i = z.get(e) || {};
|
|
241
|
+
i.buttonMaximize = !0, z.set(e, i), $('<button class="button_maximize_' + o.id + ' maximize">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
|
|
234
242
|
}
|
|
235
243
|
if (!0 === o.close) {
|
|
236
244
|
const e = String(o.id), t = function(e) {
|
|
237
245
|
o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(), layerpro.popup.close(o);
|
|
238
|
-
}, i =
|
|
239
|
-
i.buttonClose = !0,
|
|
246
|
+
}, i = z.get(e) || {};
|
|
247
|
+
i.buttonClose = !0, z.set(e, i), $('<button class="button_close_' + o.id + ' close">', "#popup").appendTo(".popup_option_" + o.id).on("click", t);
|
|
240
248
|
}
|
|
241
|
-
const
|
|
242
|
-
if (
|
|
249
|
+
const s = String(o.id), r = z.get(s) || {};
|
|
250
|
+
if (r.escKey = !0, z.set(s, r), $(document).on("keydown", function(e) {
|
|
243
251
|
"Escape" !== e.key && 27 !== e.keyCode || (o?.buttons?.cancel?.cb && o?.buttons?.cancel?.cb(),
|
|
244
252
|
layerpro.popup.close(o));
|
|
245
253
|
}), o.timer > 0) {
|
|
@@ -262,14 +270,14 @@ var b, _, f, v, g, w, y, z, k, x, C, M, N, T, E, I, O, S, L, A, P, j, H, R, W, D
|
|
|
262
270
|
if ((e.headers.get("content-type") || "").includes("text/html"), !e.ok) throw new Error(`HTTP error! status: ${e.status}`);
|
|
263
271
|
return e.text();
|
|
264
272
|
}).then(t => {
|
|
265
|
-
const i =
|
|
273
|
+
const i = x(t);
|
|
266
274
|
e.hide().html(i).fadeIn(o.fadeIn);
|
|
267
275
|
}).catch(e => {});
|
|
268
276
|
}
|
|
269
277
|
o.movable && layerpro.popup.movable(o), o.resizable && layerpro.popup.resizable(o),
|
|
270
278
|
o.isMaximize && layerpro.popup.maximize(o);
|
|
271
|
-
const
|
|
272
|
-
$('<div class="popup_internal_' + o.id + '">',
|
|
279
|
+
const c = $('<div class="popup_overflow_' + o.id + '">', "#popup");
|
|
280
|
+
$('<div class="popup_internal_' + o.id + '">', c).appendTo(n), $('<div class="popup_body_' + o.id + '">', c).appendTo(".popup_internal_" + o.id).hide().fadeIn(o.fadeIn, function() {
|
|
273
281
|
(() => {
|
|
274
282
|
if (o.body && !o.source) {
|
|
275
283
|
const t = o.body, i = "object" == typeof t && null !== t && void 0 !== t.type && "object" == typeof t.props && null !== t.props;
|
|
@@ -279,16 +287,16 @@ var b, _, f, v, g, w, y, z, k, x, C, M, N, T, E, I, O, S, L, A, P, j, H, R, W, D
|
|
|
279
287
|
if (!t) return;
|
|
280
288
|
try {
|
|
281
289
|
const i = e.createRoot(t);
|
|
282
|
-
i.render(o.body),
|
|
290
|
+
i.render(o.body), y.set(String(o.id), i);
|
|
283
291
|
} catch (e) {
|
|
284
292
|
const o = e?.message || String(e);
|
|
285
293
|
o.includes("Invalid hook call") || o.includes("hooks");
|
|
286
294
|
}
|
|
287
295
|
} else if ("string" == typeof o.body && o.body.trim().startsWith("<")) {
|
|
288
|
-
const e =
|
|
296
|
+
const e = x(o.body);
|
|
289
297
|
$(".popup_body_" + o.id).html(e).fadeIn(o.fadeIn);
|
|
290
298
|
} else {
|
|
291
|
-
const e =
|
|
299
|
+
const e = x(String(o.body));
|
|
292
300
|
$(".popup_body_" + o.id).text(e).fadeIn(o.fadeIn);
|
|
293
301
|
}
|
|
294
302
|
}
|
|
@@ -308,20 +316,20 @@ var b, _, f, v, g, w, y, z, k, x, C, M, N, T, E, I, O, S, L, A, P, j, H, R, W, D
|
|
|
308
316
|
});
|
|
309
317
|
};
|
|
310
318
|
}
|
|
311
|
-
}),
|
|
319
|
+
}), ie = l({
|
|
312
320
|
"core/mobile.ts"() {
|
|
313
|
-
if (
|
|
314
|
-
|
|
321
|
+
if (E = () => "undefined" != typeof window && window.matchMedia("(max-width: 1024px)").matches,
|
|
322
|
+
S = () => {
|
|
315
323
|
if ("undefined" == typeof navigator) return !1;
|
|
316
324
|
const e = navigator.userAgent;
|
|
317
325
|
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(e);
|
|
318
326
|
}, M = () => "ontouchstart" in window || navigator.maxTouchPoints > 0, (N = () => {
|
|
319
327
|
if (!0 === window.__FORCE_TOUCH_MODE__) return "touch";
|
|
320
|
-
const e =
|
|
328
|
+
const e = S() || E();
|
|
321
329
|
return M() && e ? "touch" : "mouse";
|
|
322
|
-
})(), T = !
|
|
330
|
+
})(), T = !E(), "undefined" != typeof window) {
|
|
323
331
|
const e = window.matchMedia("(max-width: 1024px)"), o = () => {
|
|
324
|
-
const e = N(), o = !
|
|
332
|
+
const e = N(), o = !E();
|
|
325
333
|
T !== o && (T = o);
|
|
326
334
|
};
|
|
327
335
|
let t;
|
|
@@ -329,19 +337,19 @@ var b, _, f, v, g, w, y, z, k, x, C, M, N, T, E, I, O, S, L, A, P, j, H, R, W, D
|
|
|
329
337
|
clearTimeout(t), t = setTimeout(o, 150);
|
|
330
338
|
});
|
|
331
339
|
}
|
|
332
|
-
|
|
333
|
-
|
|
340
|
+
O = () => "pointerdown", I = () => "pointermove", A = () => "pointerup", L = e => void 0 !== e.clientX ? e.clientX : e.touches && e.touches.length > 0 ? e.touches[0].clientX : e.clientX,
|
|
341
|
+
P = e => void 0 !== e.clientY ? e.clientY : e.touches && e.touches.length > 0 ? e.touches[0].clientY : e.clientY;
|
|
334
342
|
}
|
|
335
343
|
});
|
|
336
344
|
|
|
337
345
|
h({}, {
|
|
338
|
-
popup: () =>
|
|
346
|
+
popup: () => Z
|
|
339
347
|
});
|
|
340
348
|
|
|
341
|
-
var
|
|
349
|
+
var ne, pe = l({
|
|
342
350
|
"core/properties.ts"() {
|
|
343
|
-
|
|
344
|
-
|
|
351
|
+
te(), ie(), j = 250, H = 150, W = 1e3, J = new Map, Q = new Map, G = $(window),
|
|
352
|
+
V = $("body"), Z = {
|
|
345
353
|
open: e => {
|
|
346
354
|
if (e) return e.id = e.id || Math.round(1e3 * Math.random()), e.body = e.body || "",
|
|
347
355
|
e.class = e.class || "", e.width = e.width || 300, e.height = e.height || 200, e.minWidth = e.minWidth || 340,
|
|
@@ -351,12 +359,12 @@ var te, ie = l({
|
|
|
351
359
|
e.raised = e.raised || null, e.movable = e.movable || null, e.resizable = e.resizable || null,
|
|
352
360
|
e.store = e.store || !1, e.top = e.top ? e.top : "auto", e.left = e.left ? e.left : "auto",
|
|
353
361
|
e.right = e.right ? e.right : "auto", e.bottom = e.bottom ? e.bottom : "auto", e.fadeIn = e.fadeIn || 100,
|
|
354
|
-
e.fadeOut = e.fadeOut || 100,
|
|
362
|
+
e.fadeOut = e.fadeOut || 100, j = e.minWidth, H = e.minHeight, e.width < e.minWidth && (e.width = e.minWidth),
|
|
355
363
|
e.height < e.minHeight && (e.height = e.minHeight), "auto" === e.width && (e.width = "100%"),
|
|
356
364
|
"auto" === e.height && (e.height = "100%"), 0 === $("#popup").length && $('<div id="popup">', "#popup").appendTo("body").css({
|
|
357
365
|
"pointer-events": "none",
|
|
358
|
-
"z-index":
|
|
359
|
-
}), 0 === $(".popup_window_" + e.id, "#popup").length &&
|
|
366
|
+
"z-index": Z.zIndex($("*")) + 1
|
|
367
|
+
}), 0 === $(".popup_window_" + e.id, "#popup").length && C(e), layerpro.purge(document),
|
|
360
368
|
e;
|
|
361
369
|
},
|
|
362
370
|
dispatch: e => {
|
|
@@ -375,29 +383,29 @@ var te, ie = l({
|
|
|
375
383
|
},
|
|
376
384
|
center: e => {
|
|
377
385
|
const o = $(".popup_overflow_" + e.id, "#popup");
|
|
378
|
-
o.css("top", Math.max(0, (
|
|
386
|
+
o.css("top", Math.max(0, (G.height() - o.outerHeight()) / 2 + G.scrollTop())), o.css("left", Math.max(0, (G.width() - o.outerWidth()) / 2 + G.scrollLeft()));
|
|
379
387
|
},
|
|
380
|
-
checkArea: e => [
|
|
388
|
+
checkArea: e => [ L(e), P(e), G.scrollLeft(), G.scrollTop(), G.height(), G.width() ],
|
|
381
389
|
close: e => {
|
|
382
390
|
let o;
|
|
383
391
|
if (e) {
|
|
384
392
|
o = "object" == typeof e ? e.id : e, layerpro.popup.unmount && layerpro.popup.unmount(String(o)),
|
|
385
393
|
layerpro.popup.cleanupEvents && layerpro.popup.cleanupEvents(String(o));
|
|
386
|
-
const t =
|
|
394
|
+
const t = J.get(String(o));
|
|
387
395
|
if (t) {
|
|
388
396
|
const e = {
|
|
389
397
|
passive: !1
|
|
390
398
|
};
|
|
391
|
-
t.move && document.removeEventListener(I(), t.move, e), t.up && document.removeEventListener(
|
|
392
|
-
|
|
399
|
+
t.move && document.removeEventListener(I(), t.move, e), t.up && document.removeEventListener(A(), t.up, e),
|
|
400
|
+
J.delete(String(o));
|
|
393
401
|
}
|
|
394
|
-
const i =
|
|
402
|
+
const i = Q.get(String(o));
|
|
395
403
|
if (i) {
|
|
396
404
|
const e = {
|
|
397
405
|
passive: !1
|
|
398
406
|
};
|
|
399
|
-
i.move && document.removeEventListener(I(), i.move, e), i.up && document.removeEventListener(
|
|
400
|
-
|
|
407
|
+
i.move && document.removeEventListener(I(), i.move, e), i.up && document.removeEventListener(A(), i.up, e),
|
|
408
|
+
Q.delete(String(o));
|
|
401
409
|
}
|
|
402
410
|
!0 === e.raised ? $(".popup_raised_" + o).fadeOut(e.fadeOut || 500, e => {
|
|
403
411
|
$(".popup_raised_" + o).remove();
|
|
@@ -409,7 +417,7 @@ var te, ie = l({
|
|
|
409
417
|
} else $("#popup").fadeOut(() => {
|
|
410
418
|
$(void 0).remove();
|
|
411
419
|
});
|
|
412
|
-
layerpro.purge(document), setTimeout(() =>
|
|
420
|
+
layerpro.purge(document), setTimeout(() => Z.removeDock(e), 300);
|
|
413
421
|
},
|
|
414
422
|
removeDock: e => {
|
|
415
423
|
$(".icon_" + e.id).remove(), $('[class^="popup_overflow_"]', "#popup").length < 1 && ($("#root").css("margin", "0"),
|
|
@@ -417,7 +425,7 @@ var te, ie = l({
|
|
|
417
425
|
},
|
|
418
426
|
iconize: e => {
|
|
419
427
|
const o = $(".popup_overflow_" + e.id, "#popup");
|
|
420
|
-
if (!1 !== o.find("[class^=popup_window_]").hasClass("zHigh")) if (
|
|
428
|
+
if (!1 !== o.find("[class^=popup_window_]").hasClass("zHigh")) if (Z.vfx(o, !1, !0),
|
|
421
429
|
o.data("iconize")) {
|
|
422
430
|
if (o.data("iconize")) {
|
|
423
431
|
const e = o.data("iconize");
|
|
@@ -427,7 +435,7 @@ var te, ie = l({
|
|
|
427
435
|
width: e.w,
|
|
428
436
|
height: e.h,
|
|
429
437
|
opacity: 1
|
|
430
|
-
}, () =>
|
|
438
|
+
}, () => Z.vfx(o, !0)), o.removeData("iconize");
|
|
431
439
|
}
|
|
432
440
|
} else o.animate({
|
|
433
441
|
top: "100%",
|
|
@@ -435,7 +443,7 @@ var te, ie = l({
|
|
|
435
443
|
width: 0,
|
|
436
444
|
height: 0,
|
|
437
445
|
opacity: 0
|
|
438
|
-
}, 200, () =>
|
|
446
|
+
}, 200, () => Z.vfx(o, !0)), o.data("iconize", {
|
|
439
447
|
y: o.offset().top,
|
|
440
448
|
x: o.offset().left,
|
|
441
449
|
w: o.width(),
|
|
@@ -444,7 +452,7 @@ var te, ie = l({
|
|
|
444
452
|
},
|
|
445
453
|
maximize: e => {
|
|
446
454
|
const o = $(".popup_overflow_" + e.id, "#popup"), t = $('[class^="resize_"]', o), i = $('[class^="popup_drag_"]', o);
|
|
447
|
-
if (
|
|
455
|
+
if (Z.vfx(o, !1, !0), o.data("store")) {
|
|
448
456
|
if (o.data("store")) {
|
|
449
457
|
const n = o.data("store");
|
|
450
458
|
o.animate({
|
|
@@ -453,9 +461,9 @@ var te, ie = l({
|
|
|
453
461
|
width: n.w,
|
|
454
462
|
height: n.h
|
|
455
463
|
}, () => {
|
|
456
|
-
i.css("pointer-events", "auto"), t.on(
|
|
457
|
-
|
|
458
|
-
}),
|
|
464
|
+
i.css("pointer-events", "auto"), t.on(O(), function(o) {
|
|
465
|
+
Z.resizeModals(o, this, e);
|
|
466
|
+
}), G.off("layerProResize.eventItem"), Z.vfx(o, !0);
|
|
459
467
|
}), o.removeData("store");
|
|
460
468
|
}
|
|
461
469
|
} else o.data("store", {
|
|
@@ -469,15 +477,15 @@ var te, ie = l({
|
|
|
469
477
|
left: -6,
|
|
470
478
|
right: -6,
|
|
471
479
|
bottom: -6,
|
|
472
|
-
width:
|
|
473
|
-
height:
|
|
480
|
+
width: G.width() + 12,
|
|
481
|
+
height: G.height() + 12 - 45
|
|
474
482
|
}, () => {
|
|
475
|
-
|
|
483
|
+
G.on("layerProResize.eventItem", e => {
|
|
476
484
|
o.css({
|
|
477
|
-
width:
|
|
478
|
-
height:
|
|
485
|
+
width: G.width() + 12,
|
|
486
|
+
height: G.height() + 12 - 40
|
|
479
487
|
});
|
|
480
|
-
}), i.css("pointer-events", "none"), t.off(
|
|
488
|
+
}), i.css("pointer-events", "none"), t.off(O()), Z.vfx(o, !0, !0);
|
|
481
489
|
});
|
|
482
490
|
},
|
|
483
491
|
movable: e => {
|
|
@@ -487,33 +495,33 @@ var te, ie = l({
|
|
|
487
495
|
let p = 0, s = 0, r = 0, c = 0;
|
|
488
496
|
const a = e => {
|
|
489
497
|
e.preventDefault();
|
|
490
|
-
const o =
|
|
491
|
-
p = r - o, s = c - i, r = o, c = i,
|
|
492
|
-
|
|
498
|
+
const o = L(e), i = P(e);
|
|
499
|
+
p = r - o, s = c - i, r = o, c = i, Z.checkArea(e)[1] < Z.checkArea(e)[4] && 1 === Math.sign(Z.checkArea(e)[1]) && t.css("top", t.offset().top - s),
|
|
500
|
+
Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.css("left", t.offset().left - p);
|
|
493
501
|
}, d = e => {
|
|
494
502
|
const i = {
|
|
495
503
|
passive: !1
|
|
496
504
|
};
|
|
497
|
-
document.removeEventListener(I(), a, i), document.removeEventListener(
|
|
498
|
-
|
|
505
|
+
document.removeEventListener(I(), a, i), document.removeEventListener(A(), d, i),
|
|
506
|
+
J.delete(o), n.css("pointer-events", "auto"), Z.vfx(t, !0);
|
|
499
507
|
};
|
|
500
|
-
|
|
508
|
+
J.set(o, {
|
|
501
509
|
move: a,
|
|
502
510
|
up: d
|
|
503
511
|
});
|
|
504
|
-
i[0].addEventListener(
|
|
505
|
-
e.preventDefault(), n.css("pointer-events", "none"), u(e),
|
|
512
|
+
i[0].addEventListener(O(), e => {
|
|
513
|
+
e.preventDefault(), n.css("pointer-events", "none"), u(e), Z.vfx(t, !1);
|
|
506
514
|
}, {
|
|
507
515
|
passive: !1
|
|
508
516
|
}), e.maximize && i.on("dblclick", o => {
|
|
509
517
|
layerpro.popup.maximize(e);
|
|
510
518
|
});
|
|
511
519
|
const u = e => {
|
|
512
|
-
r =
|
|
520
|
+
r = L(e), c = P(e);
|
|
513
521
|
const o = {
|
|
514
522
|
passive: !1
|
|
515
523
|
};
|
|
516
|
-
document.addEventListener(I(), a, o), document.addEventListener(
|
|
524
|
+
document.addEventListener(I(), a, o), document.addEventListener(A(), d, o);
|
|
517
525
|
};
|
|
518
526
|
},
|
|
519
527
|
resizable: e => {
|
|
@@ -521,112 +529,112 @@ var te, ie = l({
|
|
|
521
529
|
const o = String(e.id), t = $(".popup_overflow_" + e.id, "#popup");
|
|
522
530
|
for (let e = 4; e--; ) $(`<div class='resize_${e}'>`, t).appendTo(t).css("touch-action", "none"),
|
|
523
531
|
$(`<div class='resize_corner_${e}'>`, t).appendTo(t).css("touch-action", "none");
|
|
524
|
-
const i =
|
|
532
|
+
const i = Q.get(o) || {};
|
|
525
533
|
i.down = function(o) {
|
|
526
|
-
|
|
527
|
-
},
|
|
534
|
+
Z.resizeModals(o, this, e);
|
|
535
|
+
}, Q.set(o, i);
|
|
528
536
|
const n = {
|
|
529
537
|
passive: !1
|
|
530
538
|
};
|
|
531
539
|
$("[class^=resize_]").each((o, t) => {
|
|
532
|
-
t.addEventListener(
|
|
533
|
-
o.preventDefault(),
|
|
540
|
+
t.addEventListener(O(), o => {
|
|
541
|
+
o.preventDefault(), Z.resizeModals(o, t, e);
|
|
534
542
|
}, n);
|
|
535
543
|
});
|
|
536
544
|
},
|
|
537
545
|
resizeModals: (e, o, t) => {
|
|
538
|
-
const i = $(o).parent(), n = String(t.id), p =
|
|
539
|
-
t.minWidth,
|
|
546
|
+
const i = $(o).parent(), n = String(t.id), p = L(e), s = P(e), r = [ p - G.scrollLeft(), s - G.scrollTop() ];
|
|
547
|
+
t.minWidth, V.css("pointer-events", "none"), i.css("pointer-events", "none"), Z.vfx(i, !1);
|
|
540
548
|
const c = e => {
|
|
541
|
-
|
|
549
|
+
Z.doRes(e, o);
|
|
542
550
|
}, a = e => {
|
|
543
|
-
|
|
544
|
-
}, d =
|
|
545
|
-
d.move = c, d.up = a,
|
|
551
|
+
Z.stopRes(o);
|
|
552
|
+
}, d = Q.get(n) || {};
|
|
553
|
+
d.move = c, d.up = a, Q.set(n, d);
|
|
546
554
|
const u = {
|
|
547
555
|
passive: !1
|
|
548
556
|
};
|
|
549
|
-
document.addEventListener(I(), c, u), document.addEventListener(
|
|
550
|
-
|
|
551
|
-
|
|
557
|
+
document.addEventListener(I(), c, u), document.addEventListener(A(), a, u), q = r[0],
|
|
558
|
+
D = r[1], X = i.width(), Y = i.height(), U = i.position().left, K = i.position().top,
|
|
559
|
+
B = K + Y + 1, F = U + X + 1, R = o;
|
|
552
560
|
},
|
|
553
561
|
doRes: (e, o) => {
|
|
554
562
|
dispatchEvent(new Event("layerProResize"));
|
|
555
|
-
const t = $(o), i = t.parent(), n =
|
|
556
|
-
if (o ===
|
|
557
|
-
let o =
|
|
558
|
-
const p =
|
|
559
|
-
o <= 0 && (o = 0), n <= 0 && (n = 0),
|
|
560
|
-
height: Number(
|
|
561
|
-
}), i.height() >
|
|
562
|
-
top: Number(
|
|
563
|
+
const t = $(o), i = t.parent(), n = L(e), p = P(e), s = [ n - G.scrollLeft(), p - G.scrollTop() ];
|
|
564
|
+
if (o === R) {
|
|
565
|
+
let o = X + s[0] - q, n = Y + s[1] - D;
|
|
566
|
+
const p = X - s[0] + q, r = Y - s[1] + D;
|
|
567
|
+
o <= 0 && (o = 0), n <= 0 && (n = 0), Z.checkArea(e)[1] < Z.checkArea(e)[4] && 1 === Math.sign(Z.checkArea(e)[1]) && t.hasClass("resize_0") && (i.height() <= H && r > H && i.css({
|
|
568
|
+
height: Number(H + 1)
|
|
569
|
+
}), i.height() > H && H <= r && i.css({
|
|
570
|
+
top: Number(B - r),
|
|
563
571
|
height: parseInt(r)
|
|
564
|
-
})),
|
|
572
|
+
})), Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.hasClass("resize_1") && (i.width() >= j && i.css({
|
|
565
573
|
width: Number(o),
|
|
566
|
-
right: Number(
|
|
567
|
-
}), i.width() <=
|
|
568
|
-
width: Number(
|
|
569
|
-
})),
|
|
574
|
+
right: Number(U - o)
|
|
575
|
+
}), i.width() <= j && i.css({
|
|
576
|
+
width: Number(j + 1)
|
|
577
|
+
})), Z.checkArea(e)[1] < Z.checkArea(e)[4] && 1 === Math.sign(Z.checkArea(e)[1]) && t.hasClass("resize_2") && (i.height() >= H && i.css({
|
|
570
578
|
height: Number(n)
|
|
571
|
-
}), i.height() <=
|
|
572
|
-
height: Number(
|
|
573
|
-
})),
|
|
574
|
-
width: Number(
|
|
575
|
-
}), i.width() >
|
|
579
|
+
}), i.height() <= H && n > H && i.css({
|
|
580
|
+
height: Number(H + 1)
|
|
581
|
+
})), Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && t.hasClass("resize_3") && (i.width() <= j && p > j && i.css({
|
|
582
|
+
width: Number(j + 1)
|
|
583
|
+
}), i.width() > j && j <= p && i.css({
|
|
576
584
|
width: parseInt(p),
|
|
577
|
-
left: Number(
|
|
578
|
-
})),
|
|
579
|
-
top: Number(
|
|
585
|
+
left: Number(F - p)
|
|
586
|
+
})), Z.checkArea(e)[1] < Z.checkArea(e)[4] && Z.checkArea(e)[0] < Z.checkArea(e)[5] && 1 === Math.sign(Z.checkArea(e)[0]) && 1 === Math.sign(Z.checkArea(e)[1]) && (t.hasClass("resize_corner_0") && (i.height() >= H && r > H && i.css({
|
|
587
|
+
top: Number(B - r),
|
|
580
588
|
height: parseInt(r)
|
|
581
|
-
}), i.height() <=
|
|
582
|
-
height: Number(
|
|
583
|
-
}), i.width() >=
|
|
589
|
+
}), i.height() <= H && r > H && i.css({
|
|
590
|
+
height: Number(H + 1)
|
|
591
|
+
}), i.width() >= j && p > j && i.css({
|
|
584
592
|
width: parseInt(p),
|
|
585
|
-
left: Number(
|
|
586
|
-
}), i.width() <=
|
|
587
|
-
width: Number(
|
|
588
|
-
})), t.hasClass("resize_corner_1") && (i.height() >=
|
|
589
|
-
top: Number(
|
|
593
|
+
left: Number(F - p)
|
|
594
|
+
}), i.width() <= j && p > j && i.css({
|
|
595
|
+
width: Number(j + 1)
|
|
596
|
+
})), t.hasClass("resize_corner_1") && (i.height() >= H && r > H && i.css({
|
|
597
|
+
top: Number(B - r),
|
|
590
598
|
height: Number(r)
|
|
591
|
-
}), i.height() <=
|
|
592
|
-
height: Number(
|
|
593
|
-
}), i.width() >=
|
|
599
|
+
}), i.height() <= H && r > H && i.css({
|
|
600
|
+
height: Number(H + 1)
|
|
601
|
+
}), i.width() >= j && i.css({
|
|
594
602
|
width: Number(o),
|
|
595
|
-
right: Number(
|
|
596
|
-
}), i.width() <=
|
|
597
|
-
width: Number(
|
|
598
|
-
})), t.hasClass("resize_corner_2") && (i.height() >=
|
|
603
|
+
right: Number(U - o)
|
|
604
|
+
}), i.width() <= j && p > j && i.css({
|
|
605
|
+
width: Number(j + 1)
|
|
606
|
+
})), t.hasClass("resize_corner_2") && (i.height() >= H && i.css({
|
|
599
607
|
height: Number(n)
|
|
600
|
-
}), i.height() <=
|
|
601
|
-
height: Number(
|
|
602
|
-
}), i.width() >=
|
|
608
|
+
}), i.height() <= H && n > H && i.css({
|
|
609
|
+
height: Number(H + 1)
|
|
610
|
+
}), i.width() >= j && i.css({
|
|
603
611
|
width: Number(o),
|
|
604
|
-
right: Number(
|
|
605
|
-
}), i.width() <=
|
|
606
|
-
width: Number(
|
|
607
|
-
})), t.hasClass("resize_corner_3") && (i.height() >=
|
|
612
|
+
right: Number(U - o)
|
|
613
|
+
}), i.width() <= j && i.css({
|
|
614
|
+
width: Number(j + 1)
|
|
615
|
+
})), t.hasClass("resize_corner_3") && (i.height() >= H && n > H && i.css({
|
|
608
616
|
height: Number(n)
|
|
609
|
-
}), i.height() <=
|
|
610
|
-
height: Number(
|
|
611
|
-
}), i.width() >=
|
|
617
|
+
}), i.height() <= H && n > H && i.css({
|
|
618
|
+
height: Number(H + 1)
|
|
619
|
+
}), i.width() >= j && p > j && i.css({
|
|
612
620
|
width: Number(p),
|
|
613
|
-
left: Number(
|
|
614
|
-
}), i.width() <=
|
|
615
|
-
width: Number(
|
|
621
|
+
left: Number(F - p)
|
|
622
|
+
}), i.width() <= j && p > j && i.css({
|
|
623
|
+
width: Number(j + 1)
|
|
616
624
|
})));
|
|
617
625
|
}
|
|
618
626
|
},
|
|
619
627
|
stopRes: e => {
|
|
620
628
|
const o = $(e).parent();
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
const t =
|
|
629
|
+
V.css("pointer-events", "auto"), o.css("pointer-events", "auto"), Z.vfx(o, !0),
|
|
630
|
+
R = !1;
|
|
631
|
+
const t = Q.get(String(e));
|
|
624
632
|
if (t) {
|
|
625
633
|
const o = {
|
|
626
634
|
passive: !1
|
|
627
635
|
};
|
|
628
|
-
t.move && document.removeEventListener(I(), t.move, o), t.up && document.removeEventListener(
|
|
629
|
-
|
|
636
|
+
t.move && document.removeEventListener(I(), t.move, o), t.up && document.removeEventListener(A(), t.up, o),
|
|
637
|
+
Q.delete(String(e));
|
|
630
638
|
}
|
|
631
639
|
},
|
|
632
640
|
index: e => {
|
|
@@ -634,32 +642,29 @@ var te, ie = l({
|
|
|
634
642
|
$('[class^="popup_window_"]', "#popup").removeClass("zHigh"), $('[class^="popup_bar_"]', "#popup").removeClass("popup_bar_selected"),
|
|
635
643
|
$('[class^="icon_"]', "#popup").removeClass("popup_bar_selected"), o.each(function() {
|
|
636
644
|
$(this, "#popup").css("zIndex", $(this, "#popup")[0].style.zIndex - 1);
|
|
637
|
-
}), $(".icon_" + e.id, "#popup").addClass("popup_bar_selected"), $(".popup_overflow_" + e.id, "#popup").css("zIndex",
|
|
645
|
+
}), $(".icon_" + e.id, "#popup").addClass("popup_bar_selected"), $(".popup_overflow_" + e.id, "#popup").css("zIndex", Z.zIndex(o)),
|
|
638
646
|
$(".popup_bar_" + e.id, "#popup").addClass("popup_bar_selected"), $(".popup_window_" + e.id, "#popup").addClass("zHigh");
|
|
639
647
|
},
|
|
640
|
-
zIndex: e =>
|
|
641
|
-
const e = parseInt($(this, "#popup").css("zIndex"), 10);
|
|
642
|
-
e > H && (H = e);
|
|
643
|
-
}), H + 1)
|
|
648
|
+
zIndex: e => ++W
|
|
644
649
|
}, Object.defineProperty(layerpro, "popup", {
|
|
645
|
-
value:
|
|
650
|
+
value: Z,
|
|
646
651
|
writable: !1,
|
|
647
652
|
configurable: !1
|
|
648
653
|
});
|
|
649
654
|
}
|
|
650
|
-
}),
|
|
655
|
+
}), se = l({
|
|
651
656
|
"core/purge.ts"() {
|
|
652
|
-
|
|
653
|
-
let o, t, i
|
|
654
|
-
if (
|
|
655
|
-
if (
|
|
657
|
+
ne = e => {
|
|
658
|
+
let o, t, i = e.attributes;
|
|
659
|
+
if (i) for (t = i.length, o = 0; o < t; o += 1) i[o].name;
|
|
660
|
+
if (i = e.childNodes, i) for (t = i.length, o = 0; o < t; o += 1) layerpro.purge(e.childNodes[o]);
|
|
656
661
|
}, Object.defineProperty(layerpro, "purge", {
|
|
657
|
-
value: new Proxy(
|
|
662
|
+
value: new Proxy(ne, {}),
|
|
658
663
|
writable: !1,
|
|
659
664
|
configurable: !1
|
|
660
665
|
});
|
|
661
666
|
}
|
|
662
|
-
}),
|
|
667
|
+
}), re = l({
|
|
663
668
|
"core/window.ts"() {
|
|
664
669
|
window.offScreenBuffering = !0, addEventListener("wheel", e => {}, {
|
|
665
670
|
capture: !0,
|
|
@@ -675,7 +680,7 @@ window.layerpro || (Object.defineProperty(window, "layerpro", {
|
|
|
675
680
|
writable: !1,
|
|
676
681
|
configurable: !1,
|
|
677
682
|
enumerable: !1
|
|
678
|
-
}), m(),
|
|
683
|
+
}), m(), ee(), pe(), se(), re(), layerpro.setProps = (e, o) => {
|
|
679
684
|
Reflect.ownKeys(e).forEach(t => {
|
|
680
685
|
const i = Object.getOwnPropertyDescriptor(e, t);
|
|
681
686
|
i && (i.enumerable = o?.enumerable || !1, i.configurable = o?.enumerable || !1,
|