mechanica 1.0.5 → 1.0.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.
- package/dist/editor.js +948 -369
- package/dist/editor.js.map +1 -1
- package/dist/main.d.ts +133 -49
- package/dist/main.js +82 -40
- package/dist/main.js.map +1 -1
- package/dist/plugin.js +230 -77
- package/dist/plugin.js.map +1 -1
- package/dist/style.css +134 -3
- package/package.json +1 -1
package/dist/editor.js
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
+
import { defineComponent, ref, watch, createElementBlock, openBlock, normalizeStyle, createElementVNode, reactive, computed, shallowRef, onMounted, onBeforeUnmount, triggerRef, inject, normalizeClass, createCommentVNode, renderSlot, createVNode, createTextVNode, toDisplayString, Transition, withCtx, getCurrentScope, onScopeDispose, toRef as toRef$1, readonly, customRef, toValue as toValue$1, getCurrentInstance, nextTick, unref, createBlock, createSlots, withDirectives, vModelText, vModelDynamic, Fragment, renderList, h, TransitionGroup, useSlots, Teleport, mergeProps, withModifiers, mergeModels, useModel, createStaticVNode, resolveDynamicComponent, isRef, vShow, shallowReactive, vModelCheckbox, isProxy, toRaw, resolveComponent, normalizeProps, guardReactiveProps, provide, createApp } from "vue";
|
|
2
5
|
import { g as getDefaultValue, d as defaultImageSrc, r as registerAliases, p as passDefaultValue } from "./schemaAliases-jUlXWmB3.js";
|
|
3
6
|
import { blocksList as blocksList$1, addUpdateListener } from "virtual:builder-blocks";
|
|
4
7
|
import { unfoldSchema } from "compact-json-schema";
|
|
5
|
-
const _sfc_main$
|
|
8
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
6
9
|
__name: "HoverFrame",
|
|
7
10
|
props: {
|
|
8
11
|
element: {},
|
|
@@ -44,7 +47,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
44
47
|
};
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
|
-
const _sfc_main$
|
|
50
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
48
51
|
__name: "InsertedPlace",
|
|
49
52
|
props: {
|
|
50
53
|
top: {}
|
|
@@ -65,40 +68,40 @@ const _export_sfc = (sfc, props) => {
|
|
|
65
68
|
}
|
|
66
69
|
return target;
|
|
67
70
|
};
|
|
68
|
-
const _sfc_main$
|
|
69
|
-
const _hoisted_1$
|
|
71
|
+
const _sfc_main$L = {};
|
|
72
|
+
const _hoisted_1$B = {
|
|
70
73
|
width: "16",
|
|
71
74
|
height: "16",
|
|
72
75
|
viewBox: "0 0 16 16",
|
|
73
76
|
fill: "none",
|
|
74
77
|
xmlns: "http://www.w3.org/2000/svg"
|
|
75
78
|
};
|
|
76
|
-
function _sfc_render$
|
|
77
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
79
|
+
function _sfc_render$g(_ctx, _cache) {
|
|
80
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$B, _cache[0] || (_cache[0] = [
|
|
78
81
|
createElementVNode("path", {
|
|
79
82
|
d: "M10.707 14.364C10.8945 14.1764 10.9998 13.9221 10.9998 13.657C10.9998 13.3918 10.8945 13.1375 10.707 12.95L5.75705 7.99995L10.707 3.04995C10.8892 2.86135 10.99 2.60875 10.9877 2.34655C10.9854 2.08435 10.8803 1.83354 10.6949 1.64813C10.5095 1.46272 10.2586 1.35756 9.99645 1.35528C9.73425 1.353 9.48165 1.45379 9.29305 1.63595L3.63605 7.29295C3.44858 7.48048 3.34326 7.73479 3.34326 7.99995C3.34326 8.26512 3.44858 8.51942 3.63605 8.70695L9.29305 14.364C9.48058 14.5514 9.73488 14.6567 10 14.6567C10.2652 14.6567 10.5195 14.5514 10.707 14.364Z",
|
|
80
83
|
fill: "currentColor"
|
|
81
84
|
}, null, -1)
|
|
82
85
|
]));
|
|
83
86
|
}
|
|
84
|
-
const ChevronLeftIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
85
|
-
const _sfc_main$
|
|
86
|
-
const _hoisted_1$
|
|
87
|
+
const ChevronLeftIcon = /* @__PURE__ */ _export_sfc(_sfc_main$L, [["render", _sfc_render$g]]);
|
|
88
|
+
const _sfc_main$K = {};
|
|
89
|
+
const _hoisted_1$A = {
|
|
87
90
|
width: "16",
|
|
88
91
|
height: "16",
|
|
89
92
|
viewBox: "0 0 16 16",
|
|
90
93
|
fill: "none",
|
|
91
94
|
xmlns: "http://www.w3.org/2000/svg"
|
|
92
95
|
};
|
|
93
|
-
function _sfc_render$
|
|
94
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
96
|
+
function _sfc_render$f(_ctx, _cache) {
|
|
97
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$A, _cache[0] || (_cache[0] = [
|
|
95
98
|
createElementVNode("path", {
|
|
96
99
|
d: "M5.29295 1.63605C5.10548 1.82358 5.00017 2.07788 5.00017 2.34305C5.00017 2.60821 5.10548 2.86252 5.29295 3.05005L10.243 8.00005L5.29295 12.95C5.11079 13.1387 5.01 13.3913 5.01228 13.6534C5.01456 13.9156 5.11972 14.1665 5.30513 14.3519C5.49054 14.5373 5.74135 14.6424 6.00355 14.6447C6.26575 14.647 6.51835 14.5462 6.70695 14.364L12.364 8.70705C12.5514 8.51952 12.6567 8.26521 12.6567 8.00005C12.6567 7.73488 12.5514 7.48058 12.364 7.29305L6.70695 1.63605C6.51942 1.44858 6.26512 1.34326 5.99995 1.34326C5.73479 1.34326 5.48048 1.44858 5.29295 1.63605Z",
|
|
97
100
|
fill: "currentColor"
|
|
98
101
|
}, null, -1)
|
|
99
102
|
]));
|
|
100
103
|
}
|
|
101
|
-
const ChevronRightIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
104
|
+
const ChevronRightIcon = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$f]]);
|
|
102
105
|
const findParent$1 = (el, callback) => {
|
|
103
106
|
if (callback(el)) return el;
|
|
104
107
|
if (!el.parentElement) return null;
|
|
@@ -273,6 +276,134 @@ const cloneDeep = (obj) => {
|
|
|
273
276
|
}
|
|
274
277
|
return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, cloneDeep(value)]));
|
|
275
278
|
};
|
|
279
|
+
const isEqual$1 = (a, b) => {
|
|
280
|
+
if (a === b) return true;
|
|
281
|
+
if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) return false;
|
|
282
|
+
if (Array.isArray(a)) {
|
|
283
|
+
if (!Array.isArray(b) || a.length !== b.length) return false;
|
|
284
|
+
for (let i = 0; i < a.length; i++) {
|
|
285
|
+
if (!isEqual$1(a[i], b[i])) return false;
|
|
286
|
+
}
|
|
287
|
+
return true;
|
|
288
|
+
}
|
|
289
|
+
for (let key in a) {
|
|
290
|
+
if (!isEqual$1(a[key], b[key])) return false;
|
|
291
|
+
}
|
|
292
|
+
return true;
|
|
293
|
+
};
|
|
294
|
+
let globalErrorHandler = (_error, _errors) => {
|
|
295
|
+
};
|
|
296
|
+
const setUseFormErrorHandler = (handler) => {
|
|
297
|
+
globalErrorHandler = handler;
|
|
298
|
+
};
|
|
299
|
+
const useForm = (defaultValues, options = {}) => {
|
|
300
|
+
const pending = ref(false);
|
|
301
|
+
const values = reactive(cloneDeep(defaultValues));
|
|
302
|
+
const errors = reactive({});
|
|
303
|
+
const oldValues = {};
|
|
304
|
+
watch(values, () => {
|
|
305
|
+
for (let [key, value] of Object.entries(values)) {
|
|
306
|
+
if (key in errors && value !== oldValues[key]) {
|
|
307
|
+
delete errors[key];
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
Object.assign(oldValues, values);
|
|
311
|
+
});
|
|
312
|
+
const requiredSet = computed(() => {
|
|
313
|
+
return new Set(options.required);
|
|
314
|
+
});
|
|
315
|
+
const setError = (key, error) => {
|
|
316
|
+
errors[key] = error;
|
|
317
|
+
};
|
|
318
|
+
const register = (key) => {
|
|
319
|
+
return {
|
|
320
|
+
modelValue: values[key],
|
|
321
|
+
"onUpdate:modelValue": (value) => values[key] = value,
|
|
322
|
+
error: errors[key],
|
|
323
|
+
name: key,
|
|
324
|
+
required: requiredSet.value.has(key)
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
const checkRequired = (keys) => {
|
|
328
|
+
for (let key of keys ?? options.required ?? []) {
|
|
329
|
+
const val = values[key];
|
|
330
|
+
if (val === null || (typeof val === "string" && !val.trim() || Array.isArray(val) && val.length === 0)) {
|
|
331
|
+
setError(key, { code: "required" });
|
|
332
|
+
return false;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
return true;
|
|
336
|
+
};
|
|
337
|
+
const requiredFilled = computed(() => {
|
|
338
|
+
for (let key of options.required ?? []) {
|
|
339
|
+
const val = values[key];
|
|
340
|
+
if (val === null || typeof val === "string" && !val.trim() || Array.isArray(val) && val.length === 0) {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
return true;
|
|
345
|
+
});
|
|
346
|
+
const handleError = (e) => {
|
|
347
|
+
globalErrorHandler(e, errors);
|
|
348
|
+
for (let key in errors) {
|
|
349
|
+
if (!(key in values) && key !== "_global") {
|
|
350
|
+
delete errors[key];
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
};
|
|
354
|
+
const handleSubmit = (submit) => async (e) => {
|
|
355
|
+
e.preventDefault();
|
|
356
|
+
if (!checkRequired()) return;
|
|
357
|
+
delete errors["_global"];
|
|
358
|
+
pending.value = true;
|
|
359
|
+
try {
|
|
360
|
+
await submit(values);
|
|
361
|
+
} catch (e2) {
|
|
362
|
+
handleError(e2);
|
|
363
|
+
throw e2;
|
|
364
|
+
} finally {
|
|
365
|
+
pending.value = false;
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
const updateDefaultValues = (newValues) => {
|
|
369
|
+
for (let [key, value] of Object.entries(newValues)) {
|
|
370
|
+
if (key in values) {
|
|
371
|
+
values[key] = cloneDeep(value);
|
|
372
|
+
defaultValues[key] = value;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
changeFlag.value = true;
|
|
376
|
+
changeFlag.value = false;
|
|
377
|
+
};
|
|
378
|
+
const updateDefaultValuesWatch = (data, map) => {
|
|
379
|
+
watch(data, (data2) => {
|
|
380
|
+
if (!data2) return;
|
|
381
|
+
updateDefaultValues(map ? map(data2) : data2);
|
|
382
|
+
}, { immediate: true });
|
|
383
|
+
};
|
|
384
|
+
const changeFlag = ref(false);
|
|
385
|
+
const setChange = () => {
|
|
386
|
+
changeFlag.value = true;
|
|
387
|
+
};
|
|
388
|
+
const hasChange = computed(() => {
|
|
389
|
+
if (changeFlag.value) return true;
|
|
390
|
+
return !isEqual$1(values, defaultValues);
|
|
391
|
+
});
|
|
392
|
+
return {
|
|
393
|
+
handleSubmit,
|
|
394
|
+
register,
|
|
395
|
+
setError,
|
|
396
|
+
errors,
|
|
397
|
+
checkRequired,
|
|
398
|
+
updateDefaultValues,
|
|
399
|
+
updateDefaultValuesWatch,
|
|
400
|
+
pending,
|
|
401
|
+
values,
|
|
402
|
+
hasChange,
|
|
403
|
+
setChange,
|
|
404
|
+
requiredFilled
|
|
405
|
+
};
|
|
406
|
+
};
|
|
276
407
|
class MultiMap {
|
|
277
408
|
constructor() {
|
|
278
409
|
this._map = /* @__PURE__ */ new Map();
|
|
@@ -352,14 +483,14 @@ const events = new MultiMap();
|
|
|
352
483
|
const getArgKey = (args) => {
|
|
353
484
|
return args.length === 0 ? "" : JSON.stringify(args);
|
|
354
485
|
};
|
|
355
|
-
const getEntryOrCreate = (
|
|
356
|
-
const existsValue = dataMap.get(
|
|
486
|
+
const getEntryOrCreate = (request2, argKey, defaultValue) => {
|
|
487
|
+
const existsValue = dataMap.get(request2, argKey);
|
|
357
488
|
if (existsValue) return existsValue;
|
|
358
|
-
dataMap.set(
|
|
489
|
+
dataMap.set(request2, argKey, defaultValue);
|
|
359
490
|
return defaultValue;
|
|
360
491
|
};
|
|
361
|
-
const useRequestExt = (options,
|
|
362
|
-
const defaultValue = dataMap.get(
|
|
492
|
+
const useRequestExt = (options, request2, ...args) => {
|
|
493
|
+
const defaultValue = dataMap.get(request2, getArgKey(args));
|
|
363
494
|
const pending = shallowRef(defaultValue === null);
|
|
364
495
|
const data = shallowRef((defaultValue == null ? void 0 : defaultValue.data) ?? null);
|
|
365
496
|
const error = shallowRef(null);
|
|
@@ -375,7 +506,7 @@ const useRequestExt = (options, request, ...args) => {
|
|
|
375
506
|
data.value = returnDataValue;
|
|
376
507
|
return;
|
|
377
508
|
}
|
|
378
|
-
const entry = getEntryOrCreate(
|
|
509
|
+
const entry = getEntryOrCreate(request2, argKey, { data: null, lastUpdate: -1, updatedManually: false });
|
|
379
510
|
data.value = entry.data;
|
|
380
511
|
pending.value = entry.data === null;
|
|
381
512
|
lastArgs = args2;
|
|
@@ -384,7 +515,7 @@ const useRequestExt = (options, request, ...args) => {
|
|
|
384
515
|
return;
|
|
385
516
|
}
|
|
386
517
|
try {
|
|
387
|
-
const resp = await makeRequestWithoutCache(entry,
|
|
518
|
+
const resp = await makeRequestWithoutCache(entry, request2, ...args2);
|
|
388
519
|
if (currentArgKey === argKey) {
|
|
389
520
|
data.value = resp;
|
|
390
521
|
}
|
|
@@ -398,7 +529,7 @@ const useRequestExt = (options, request, ...args) => {
|
|
|
398
529
|
const lazyMutate = async (...args2) => {
|
|
399
530
|
const argKey = getArgKey(args2);
|
|
400
531
|
currentArgKey = argKey;
|
|
401
|
-
const entry = dataMap.get(
|
|
532
|
+
const entry = dataMap.get(request2, argKey);
|
|
402
533
|
if (entry !== null && entry.lastUpdate > 0 && Date.now() < entry.lastUpdate + 1e3 * 30) {
|
|
403
534
|
data.value = entry.data;
|
|
404
535
|
error.value = null;
|
|
@@ -416,18 +547,24 @@ const useRequestExt = (options, request, ...args) => {
|
|
|
416
547
|
lazyMutate(...args);
|
|
417
548
|
});
|
|
418
549
|
onMounted(() => {
|
|
419
|
-
events.add(
|
|
550
|
+
events.add(request2, mutateWithLastArgs);
|
|
420
551
|
});
|
|
421
552
|
onBeforeUnmount(() => {
|
|
422
|
-
events.remove(
|
|
553
|
+
events.remove(request2, mutateWithLastArgs);
|
|
423
554
|
});
|
|
424
555
|
return { data, error, pending, mutate, lazyMutate, setReturnData };
|
|
425
556
|
};
|
|
426
|
-
const useRequest = (
|
|
427
|
-
const
|
|
557
|
+
const useRequest = (request2, ...args) => useRequestExt({}, request2, ...args);
|
|
558
|
+
const mutateRequest = async (request2, ...args) => {
|
|
559
|
+
dataMap.delete(request2, getArgKey(args));
|
|
560
|
+
if (events.get(request2).length > 0) {
|
|
561
|
+
await Promise.all((events.get(request2) ?? []).map((callback) => callback()));
|
|
562
|
+
}
|
|
563
|
+
};
|
|
564
|
+
const makeRequestWithoutCache = async (entry, request2, ...args) => {
|
|
428
565
|
if (!entry.promise) {
|
|
429
566
|
const promise = (async () => {
|
|
430
|
-
const resp = await
|
|
567
|
+
const resp = await request2(...args);
|
|
431
568
|
entry.data = resp;
|
|
432
569
|
entry.lastUpdate = Date.now();
|
|
433
570
|
delete entry.promise;
|
|
@@ -505,15 +642,15 @@ class BlockDropEvent extends Event {
|
|
|
505
642
|
this.content = content;
|
|
506
643
|
}
|
|
507
644
|
}
|
|
508
|
-
const _hoisted_1$
|
|
645
|
+
const _hoisted_1$z = {
|
|
509
646
|
key: 0,
|
|
510
647
|
class: "v-form-control__label"
|
|
511
648
|
};
|
|
512
|
-
const _hoisted_2$
|
|
649
|
+
const _hoisted_2$b = {
|
|
513
650
|
key: 0,
|
|
514
651
|
class: "v-form-control__required-marker"
|
|
515
652
|
};
|
|
516
|
-
const _hoisted_3$
|
|
653
|
+
const _hoisted_3$8 = {
|
|
517
654
|
key: 1,
|
|
518
655
|
class: "v-form-control__outline"
|
|
519
656
|
};
|
|
@@ -525,7 +662,7 @@ const _hoisted_5$2 = {
|
|
|
525
662
|
key: 0,
|
|
526
663
|
class: "v-form-control__error"
|
|
527
664
|
};
|
|
528
|
-
const _sfc_main$
|
|
665
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
529
666
|
__name: "VFormControl",
|
|
530
667
|
props: {
|
|
531
668
|
error: {},
|
|
@@ -550,11 +687,11 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
550
687
|
return openBlock(), createElementBlock("div", {
|
|
551
688
|
class: normalizeClass(["v-form-control", { error: !!props.error, disabled: props.disabled }])
|
|
552
689
|
}, [
|
|
553
|
-
!!props.label ? (openBlock(), createElementBlock("label", _hoisted_1$
|
|
690
|
+
!!props.label ? (openBlock(), createElementBlock("label", _hoisted_1$z, [
|
|
554
691
|
createTextVNode(toDisplayString(props.label), 1),
|
|
555
|
-
props.required ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
692
|
+
props.required ? (openBlock(), createElementBlock("span", _hoisted_2$b, "*")) : createCommentVNode("", true)
|
|
556
693
|
])) : createCommentVNode("", true),
|
|
557
|
-
props.outline ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
694
|
+
props.outline ? (openBlock(), createElementBlock("div", _hoisted_3$8, [
|
|
558
695
|
renderSlot(_ctx.$slots, "default")
|
|
559
696
|
])) : renderSlot(_ctx.$slots, "default", { key: 2 }),
|
|
560
697
|
_ctx.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_4$5, [
|
|
@@ -1005,17 +1142,17 @@ function useVModel(props, key, emit, options = {}) {
|
|
|
1005
1142
|
});
|
|
1006
1143
|
}
|
|
1007
1144
|
}
|
|
1008
|
-
const _hoisted_1$
|
|
1145
|
+
const _hoisted_1$y = {
|
|
1009
1146
|
key: 0,
|
|
1010
1147
|
class: "v-input__start-adornment"
|
|
1011
1148
|
};
|
|
1012
|
-
const _hoisted_2$
|
|
1013
|
-
const _hoisted_3$
|
|
1149
|
+
const _hoisted_2$a = ["placeholder", "rows", "name"];
|
|
1150
|
+
const _hoisted_3$7 = ["placeholder", "type", "name"];
|
|
1014
1151
|
const _hoisted_4$4 = {
|
|
1015
1152
|
key: 3,
|
|
1016
1153
|
class: "v-input__max-length"
|
|
1017
1154
|
};
|
|
1018
|
-
const _sfc_main$
|
|
1155
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
1019
1156
|
__name: "VInput",
|
|
1020
1157
|
props: {
|
|
1021
1158
|
modelValue: {},
|
|
@@ -1086,7 +1223,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
1086
1223
|
useTextareaAutosize({ element: inputRef, input: model });
|
|
1087
1224
|
}
|
|
1088
1225
|
return (_ctx, _cache) => {
|
|
1089
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1226
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
1090
1227
|
class: normalizeClass(["v-input", { large: _ctx.large, multiline: _ctx.multiline }]),
|
|
1091
1228
|
error: error.value,
|
|
1092
1229
|
label: _ctx.label,
|
|
@@ -1096,7 +1233,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
1096
1233
|
}, createSlots({
|
|
1097
1234
|
default: withCtx(() => [
|
|
1098
1235
|
renderSlot(_ctx.$slots, "start-adornment"),
|
|
1099
|
-
props.prefix ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1236
|
+
props.prefix ? (openBlock(), createElementBlock("div", _hoisted_1$y, toDisplayString(props.prefix), 1)) : createCommentVNode("", true),
|
|
1100
1237
|
props.multiline ? withDirectives((openBlock(), createElementBlock("textarea", {
|
|
1101
1238
|
key: 1,
|
|
1102
1239
|
ref_key: "inputRef",
|
|
@@ -1106,7 +1243,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
1106
1243
|
rows: props.rows,
|
|
1107
1244
|
class: "scroll",
|
|
1108
1245
|
name: props.name
|
|
1109
|
-
}, null, 8, _hoisted_2$
|
|
1246
|
+
}, null, 8, _hoisted_2$a)), [
|
|
1110
1247
|
[vModelText, model.value]
|
|
1111
1248
|
]) : withDirectives((openBlock(), createElementBlock("input", {
|
|
1112
1249
|
key: 2,
|
|
@@ -1116,7 +1253,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
1116
1253
|
placeholder: props.placeholder,
|
|
1117
1254
|
type: inputType.value,
|
|
1118
1255
|
name: props.name
|
|
1119
|
-
}, null, 8, _hoisted_3$
|
|
1256
|
+
}, null, 8, _hoisted_3$7)), [
|
|
1120
1257
|
[vModelDynamic, model.value]
|
|
1121
1258
|
]),
|
|
1122
1259
|
props.maxLength ? (openBlock(), createElementBlock("div", _hoisted_4$4, toDisplayString(model.value.length) + " / " + toDisplayString(props.maxLength), 1)) : createCommentVNode("", true),
|
|
@@ -1135,16 +1272,16 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
1135
1272
|
};
|
|
1136
1273
|
}
|
|
1137
1274
|
});
|
|
1138
|
-
const _hoisted_1$
|
|
1139
|
-
const _hoisted_2$
|
|
1140
|
-
const _hoisted_3$
|
|
1275
|
+
const _hoisted_1$x = { class: "blocks-list" };
|
|
1276
|
+
const _hoisted_2$9 = { class: "page-editor-blocks__group" };
|
|
1277
|
+
const _hoisted_3$6 = { class: "title" };
|
|
1141
1278
|
const _hoisted_4$3 = { class: "blocks-list__blocks" };
|
|
1142
1279
|
const _hoisted_5$1 = ["onMousedown"];
|
|
1143
1280
|
const _hoisted_6$1 = {
|
|
1144
1281
|
key: 0,
|
|
1145
1282
|
class: "page-editor__nothing-found"
|
|
1146
1283
|
};
|
|
1147
|
-
const _sfc_main$
|
|
1284
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
1148
1285
|
__name: "BlocksList",
|
|
1149
1286
|
props: {
|
|
1150
1287
|
blocks: {}
|
|
@@ -1193,16 +1330,16 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
1193
1330
|
});
|
|
1194
1331
|
};
|
|
1195
1332
|
return (_ctx, _cache) => {
|
|
1196
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1197
|
-
createVNode(_sfc_main$
|
|
1333
|
+
return openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
1334
|
+
createVNode(_sfc_main$I, {
|
|
1198
1335
|
modelValue: searchValue.value,
|
|
1199
1336
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event),
|
|
1200
1337
|
placeholder: "Поиск...",
|
|
1201
1338
|
class: "page-editor-blocks__search"
|
|
1202
1339
|
}, null, 8, ["modelValue"]),
|
|
1203
1340
|
(openBlock(true), createElementBlock(Fragment, null, renderList(groupBlocks.value, (group) => {
|
|
1204
|
-
return openBlock(), createElementBlock("div", _hoisted_2$
|
|
1205
|
-
createElementVNode("div", _hoisted_3$
|
|
1341
|
+
return openBlock(), createElementBlock("div", _hoisted_2$9, [
|
|
1342
|
+
createElementVNode("div", _hoisted_3$6, toDisplayString(groupNames[group.name] ?? group.name), 1),
|
|
1206
1343
|
createElementVNode("div", _hoisted_4$3, [
|
|
1207
1344
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.blocks, (item) => {
|
|
1208
1345
|
return openBlock(), createElementBlock("button", {
|
|
@@ -1497,8 +1634,8 @@ const deleteFromArray = (arr, item) => {
|
|
|
1497
1634
|
const uid$1 = () => {
|
|
1498
1635
|
return Math.trunc(Math.random() * 1e5).toString(16);
|
|
1499
1636
|
};
|
|
1500
|
-
const _hoisted_1$
|
|
1501
|
-
const _sfc_main$
|
|
1637
|
+
const _hoisted_1$w = ["onClick"];
|
|
1638
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
1502
1639
|
__name: "VTabs",
|
|
1503
1640
|
props: {
|
|
1504
1641
|
items: {},
|
|
@@ -1552,7 +1689,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
1552
1689
|
key: item.id,
|
|
1553
1690
|
class: normalizeClass(["v-tabs__tab", { active: unref(model) === item.id }]),
|
|
1554
1691
|
onClick: ($event) => model.value = item.id
|
|
1555
|
-
}, toDisplayString(item.title), 11, _hoisted_1$
|
|
1692
|
+
}, toDisplayString(item.title), 11, _hoisted_1$w);
|
|
1556
1693
|
}), 128))
|
|
1557
1694
|
]),
|
|
1558
1695
|
_: 1
|
|
@@ -1565,8 +1702,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
|
|
|
1565
1702
|
};
|
|
1566
1703
|
}
|
|
1567
1704
|
});
|
|
1568
|
-
const
|
|
1569
|
-
const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
1705
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
1570
1706
|
__name: "VTabsPages",
|
|
1571
1707
|
props: {
|
|
1572
1708
|
page: {},
|
|
@@ -1575,6 +1711,7 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
1575
1711
|
setup(__props) {
|
|
1576
1712
|
const props = __props;
|
|
1577
1713
|
const slots = useSlots();
|
|
1714
|
+
const containerRef = ref();
|
|
1578
1715
|
const transitionClass = ref("slide-right");
|
|
1579
1716
|
watch(() => props.page, (value, lastValue) => {
|
|
1580
1717
|
const keys = Object.keys(slots);
|
|
@@ -1584,9 +1721,31 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
1584
1721
|
transitionClass.value = "slide-right";
|
|
1585
1722
|
}
|
|
1586
1723
|
});
|
|
1724
|
+
const onBeforeLeave = (el) => {
|
|
1725
|
+
var _a;
|
|
1726
|
+
containerRef.value.style.height = el.scrollHeight + "px";
|
|
1727
|
+
(_a = containerRef.value) == null ? void 0 : _a.classList.add("transition-active");
|
|
1728
|
+
};
|
|
1729
|
+
const onEnter = (el) => {
|
|
1730
|
+
containerRef.value.style.height = el.scrollHeight + "px";
|
|
1731
|
+
};
|
|
1732
|
+
const onAfterEnter = () => {
|
|
1733
|
+
var _a;
|
|
1734
|
+
containerRef.value.style.height = "";
|
|
1735
|
+
(_a = containerRef.value) == null ? void 0 : _a.classList.remove("transition-active");
|
|
1736
|
+
};
|
|
1587
1737
|
return (_ctx, _cache) => {
|
|
1588
|
-
return openBlock(), createElementBlock("div",
|
|
1589
|
-
|
|
1738
|
+
return openBlock(), createElementBlock("div", {
|
|
1739
|
+
ref_key: "containerRef",
|
|
1740
|
+
ref: containerRef,
|
|
1741
|
+
class: "v-tabs-pages"
|
|
1742
|
+
}, [
|
|
1743
|
+
createVNode(Transition, {
|
|
1744
|
+
name: transitionClass.value,
|
|
1745
|
+
onBeforeLeave,
|
|
1746
|
+
onEnter,
|
|
1747
|
+
onAfterEnter
|
|
1748
|
+
}, {
|
|
1590
1749
|
default: withCtx(() => [
|
|
1591
1750
|
(openBlock(), createElementBlock("div", {
|
|
1592
1751
|
key: props.page,
|
|
@@ -1597,20 +1756,20 @@ const _sfc_main$A = /* @__PURE__ */ defineComponent({
|
|
|
1597
1756
|
]),
|
|
1598
1757
|
_: 3
|
|
1599
1758
|
}, 8, ["name"])
|
|
1600
|
-
]);
|
|
1759
|
+
], 512);
|
|
1601
1760
|
};
|
|
1602
1761
|
}
|
|
1603
1762
|
});
|
|
1604
|
-
const _sfc_main$
|
|
1605
|
-
const _hoisted_1$
|
|
1763
|
+
const _sfc_main$E = {};
|
|
1764
|
+
const _hoisted_1$v = {
|
|
1606
1765
|
width: "20",
|
|
1607
1766
|
height: "20",
|
|
1608
1767
|
viewBox: "0 0 20 20",
|
|
1609
1768
|
fill: "none",
|
|
1610
1769
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1611
1770
|
};
|
|
1612
|
-
function _sfc_render$
|
|
1613
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
1771
|
+
function _sfc_render$e(_ctx, _cache) {
|
|
1772
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$v, _cache[0] || (_cache[0] = [
|
|
1614
1773
|
createElementVNode("path", {
|
|
1615
1774
|
"fill-rule": "evenodd",
|
|
1616
1775
|
"clip-rule": "evenodd",
|
|
@@ -1619,8 +1778,8 @@ function _sfc_render$d(_ctx, _cache) {
|
|
|
1619
1778
|
}, null, -1)
|
|
1620
1779
|
]));
|
|
1621
1780
|
}
|
|
1622
|
-
const CollapseArrowIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1623
|
-
const _sfc_main$
|
|
1781
|
+
const CollapseArrowIcon = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$e]]);
|
|
1782
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
1624
1783
|
__name: "VCollapse",
|
|
1625
1784
|
props: {
|
|
1626
1785
|
open: { type: Boolean },
|
|
@@ -1708,7 +1867,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
1708
1867
|
}
|
|
1709
1868
|
});
|
|
1710
1869
|
const margin = 8;
|
|
1711
|
-
const _sfc_main$
|
|
1870
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
1712
1871
|
...{
|
|
1713
1872
|
inheritAttrs: false
|
|
1714
1873
|
},
|
|
@@ -1876,54 +2035,54 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
1876
2035
|
};
|
|
1877
2036
|
}
|
|
1878
2037
|
});
|
|
1879
|
-
const _sfc_main$
|
|
1880
|
-
const _hoisted_1$
|
|
2038
|
+
const _sfc_main$B = {};
|
|
2039
|
+
const _hoisted_1$u = {
|
|
1881
2040
|
width: "16",
|
|
1882
2041
|
height: "16",
|
|
1883
2042
|
viewBox: "0 0 16 16",
|
|
1884
2043
|
fill: "none",
|
|
1885
2044
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1886
2045
|
};
|
|
1887
|
-
function _sfc_render$
|
|
1888
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2046
|
+
function _sfc_render$d(_ctx, _cache) {
|
|
2047
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$u, _cache[0] || (_cache[0] = [
|
|
1889
2048
|
createElementVNode("path", {
|
|
1890
2049
|
d: "M14.364 5.293C14.1764 5.10553 13.9221 5.00021 13.657 5.00021C13.3918 5.00021 13.1375 5.10553 12.95 5.293L7.99995 10.243L3.04995 5.293C2.86135 5.11084 2.60875 5.01005 2.34655 5.01232C2.08435 5.0146 1.83354 5.11977 1.64813 5.30518C1.46272 5.49059 1.35756 5.7414 1.35528 6.0036C1.353 6.26579 1.45379 6.5184 1.63595 6.707L7.29295 12.364C7.48048 12.5515 7.73479 12.6568 7.99995 12.6568C8.26512 12.6568 8.51942 12.5515 8.70695 12.364L14.364 6.707C14.5514 6.51947 14.6567 6.26516 14.6567 6C14.6567 5.73483 14.5514 5.48053 14.364 5.293Z",
|
|
1891
2050
|
fill: "currentColor"
|
|
1892
2051
|
}, null, -1)
|
|
1893
2052
|
]));
|
|
1894
2053
|
}
|
|
1895
|
-
const ArrowDownIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1896
|
-
const _sfc_main$
|
|
1897
|
-
const _hoisted_1$
|
|
1898
|
-
function _sfc_render$
|
|
1899
|
-
return openBlock(), createElementBlock("button", _hoisted_1$
|
|
2054
|
+
const ArrowDownIcon = /* @__PURE__ */ _export_sfc(_sfc_main$B, [["render", _sfc_render$d]]);
|
|
2055
|
+
const _sfc_main$A = {};
|
|
2056
|
+
const _hoisted_1$t = { class: "v-icon-button" };
|
|
2057
|
+
function _sfc_render$c(_ctx, _cache) {
|
|
2058
|
+
return openBlock(), createElementBlock("button", _hoisted_1$t, [
|
|
1900
2059
|
renderSlot(_ctx.$slots, "default")
|
|
1901
2060
|
]);
|
|
1902
2061
|
}
|
|
1903
|
-
const VIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1904
|
-
const _sfc_main$
|
|
1905
|
-
const _hoisted_1$
|
|
2062
|
+
const VIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$A, [["render", _sfc_render$c]]);
|
|
2063
|
+
const _sfc_main$z = {};
|
|
2064
|
+
const _hoisted_1$s = {
|
|
1906
2065
|
width: "16",
|
|
1907
2066
|
height: "16",
|
|
1908
2067
|
viewBox: "0 0 16 16",
|
|
1909
2068
|
fill: "none",
|
|
1910
2069
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1911
2070
|
};
|
|
1912
|
-
function _sfc_render$
|
|
1913
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2071
|
+
function _sfc_render$b(_ctx, _cache) {
|
|
2072
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$s, _cache[0] || (_cache[0] = [
|
|
1914
2073
|
createElementVNode("path", {
|
|
1915
2074
|
d: "M9.31382 7.9L12.8488 4.364C12.9443 4.27176 13.0205 4.16141 13.0729 4.03941C13.1253 3.9174 13.1529 3.78618 13.1541 3.6534C13.1552 3.52062 13.1299 3.38894 13.0796 3.26605C13.0294 3.14315 12.9551 3.0315 12.8612 2.93761C12.7673 2.84371 12.6557 2.76946 12.5328 2.71918C12.4099 2.6689 12.2782 2.6436 12.1454 2.64475C12.0126 2.64591 11.8814 2.67349 11.7594 2.7259C11.6374 2.77831 11.5271 2.85449 11.4348 2.95L7.89882 6.485L4.36382 2.95C4.27157 2.85449 4.16123 2.77831 4.03922 2.7259C3.91722 2.67349 3.786 2.64591 3.65322 2.64475C3.52044 2.6436 3.38876 2.6689 3.26587 2.71918C3.14297 2.76946 3.03132 2.84371 2.93742 2.93761C2.84353 3.0315 2.76928 3.14315 2.719 3.26605C2.66872 3.38894 2.64342 3.52062 2.64457 3.6534C2.64572 3.78618 2.67331 3.9174 2.72572 4.03941C2.77813 4.16141 2.85431 4.27176 2.94982 4.364L6.48482 7.899L2.94982 11.435C2.85431 11.5273 2.77813 11.6376 2.72572 11.7596C2.67331 11.8816 2.64572 12.0128 2.64457 12.1456C2.64342 12.2784 2.66872 12.4101 2.719 12.533C2.76928 12.6559 2.84353 12.7675 2.93742 12.8614C3.03132 12.9553 3.14297 13.0295 3.26587 13.0798C3.38876 13.1301 3.52044 13.1554 3.65322 13.1543C3.786 13.1531 3.91722 13.1255 4.03922 13.0731C4.16123 13.0207 4.27157 12.9445 4.36382 12.849L7.89882 9.314L11.4348 12.849C11.5271 12.9445 11.6374 13.0207 11.7594 13.0731C11.8814 13.1255 12.0126 13.1531 12.1454 13.1543C12.2782 13.1554 12.4099 13.1301 12.5328 13.0798C12.6557 13.0295 12.7673 12.9553 12.8612 12.8614C12.9551 12.7675 13.0294 12.6559 13.0796 12.533C13.1299 12.4101 13.1552 12.2784 13.1541 12.1456C13.1529 12.0128 13.1253 11.8816 13.0729 11.7596C13.0205 11.6376 12.9443 11.5273 12.8488 11.435L9.31382 7.9Z",
|
|
1916
2075
|
fill: "currentColor"
|
|
1917
2076
|
}, null, -1)
|
|
1918
2077
|
]));
|
|
1919
2078
|
}
|
|
1920
|
-
const CloseMinIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1921
|
-
const _hoisted_1$
|
|
1922
|
-
const _hoisted_2$
|
|
2079
|
+
const CloseMinIcon = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["render", _sfc_render$b]]);
|
|
2080
|
+
const _hoisted_1$r = { key: 0 };
|
|
2081
|
+
const _hoisted_2$8 = {
|
|
1923
2082
|
key: 1,
|
|
1924
2083
|
class: "v-select__placeholder"
|
|
1925
2084
|
};
|
|
1926
|
-
const _hoisted_3$
|
|
2085
|
+
const _hoisted_3$5 = { class: "v-select__actions" };
|
|
1927
2086
|
const _hoisted_4$2 = { class: "v-select__menu" };
|
|
1928
2087
|
const _hoisted_5 = {
|
|
1929
2088
|
key: 0,
|
|
@@ -1934,11 +2093,10 @@ const _hoisted_6 = {
|
|
|
1934
2093
|
class: "group-title"
|
|
1935
2094
|
};
|
|
1936
2095
|
const _hoisted_7 = ["onClick"];
|
|
1937
|
-
const _sfc_main$
|
|
2096
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
1938
2097
|
__name: "VSelect",
|
|
1939
|
-
props: {
|
|
2098
|
+
props: /* @__PURE__ */ mergeModels({
|
|
1940
2099
|
items: {},
|
|
1941
|
-
modelValue: {},
|
|
1942
2100
|
placeholder: {},
|
|
1943
2101
|
nullable: { type: Boolean },
|
|
1944
2102
|
visualValue: {},
|
|
@@ -1946,12 +2104,14 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1946
2104
|
label: {},
|
|
1947
2105
|
required: { type: Boolean },
|
|
1948
2106
|
disabled: { type: Boolean }
|
|
1949
|
-
},
|
|
2107
|
+
}, {
|
|
2108
|
+
"modelValue": { default: null },
|
|
2109
|
+
"modelModifiers": {}
|
|
2110
|
+
}),
|
|
1950
2111
|
emits: ["update:modelValue"],
|
|
1951
|
-
setup(__props
|
|
2112
|
+
setup(__props) {
|
|
1952
2113
|
const props = __props;
|
|
1953
|
-
const
|
|
1954
|
-
const model = useVModel(props, "modelValue", emit, { passive: true, defaultValue: null });
|
|
2114
|
+
const model = useModel(__props, "modelValue");
|
|
1955
2115
|
const currentItem = computed(() => {
|
|
1956
2116
|
if (model.value === null) return null;
|
|
1957
2117
|
return props.items.find((item) => typeof item !== "string" && item.id === model.value) ?? null;
|
|
@@ -1969,7 +2129,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1969
2129
|
opened.value = false;
|
|
1970
2130
|
};
|
|
1971
2131
|
return (_ctx, _cache) => {
|
|
1972
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2132
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
1973
2133
|
outline: "",
|
|
1974
2134
|
class: "v-select",
|
|
1975
2135
|
label: props.label,
|
|
@@ -1978,7 +2138,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1978
2138
|
required: props.required
|
|
1979
2139
|
}, {
|
|
1980
2140
|
default: withCtx(() => [
|
|
1981
|
-
createVNode(_sfc_main$
|
|
2141
|
+
createVNode(_sfc_main$C, {
|
|
1982
2142
|
open: opened.value,
|
|
1983
2143
|
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => opened.value = $event),
|
|
1984
2144
|
placement: "bottom",
|
|
@@ -1989,12 +2149,12 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
1989
2149
|
createElementVNode("button", mergeProps({
|
|
1990
2150
|
class: ["v-select__activator", { opened: opened.value }]
|
|
1991
2151
|
}, activatorProps), [
|
|
1992
|
-
currentItem.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2152
|
+
currentItem.value ? (openBlock(), createElementBlock("div", _hoisted_1$r, toDisplayString(currentItem.value.title), 1)) : (openBlock(), createElementBlock("div", _hoisted_2$8, toDisplayString(props.placeholder ?? "Выберите значение"), 1)),
|
|
1993
2153
|
createVNode(ArrowDownIcon)
|
|
1994
2154
|
], 16),
|
|
1995
|
-
createElementVNode("div", _hoisted_3$
|
|
2155
|
+
createElementVNode("div", _hoisted_3$5, [
|
|
1996
2156
|
renderSlot(_ctx.$slots, "default"),
|
|
1997
|
-
_ctx.nullable &&
|
|
2157
|
+
_ctx.nullable && model.value ? (openBlock(), createBlock(VIconButton, {
|
|
1998
2158
|
key: 0,
|
|
1999
2159
|
title: "Очистить значение",
|
|
2000
2160
|
class: "v-select__delete-button",
|
|
@@ -2013,7 +2173,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
2013
2173
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2014
2174
|
item === "" ? (openBlock(), createElementBlock("div", _hoisted_5)) : typeof item === "string" ? (openBlock(), createElementBlock("div", _hoisted_6, toDisplayString(item), 1)) : (openBlock(), createElementBlock("button", {
|
|
2015
2175
|
key: 2,
|
|
2016
|
-
class: normalizeClass({ active: item.id ===
|
|
2176
|
+
class: normalizeClass({ active: item.id === model.value }),
|
|
2017
2177
|
onClick: ($event) => onItemClick(item)
|
|
2018
2178
|
}, [
|
|
2019
2179
|
renderSlot(_ctx.$slots, "item", { item }, () => [
|
|
@@ -2032,8 +2192,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
2032
2192
|
};
|
|
2033
2193
|
}
|
|
2034
2194
|
});
|
|
2035
|
-
const _hoisted_1$
|
|
2036
|
-
const _sfc_main$
|
|
2195
|
+
const _hoisted_1$q = { class: "json-editor__array" };
|
|
2196
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
2037
2197
|
__name: "JsonEditorArray",
|
|
2038
2198
|
props: {
|
|
2039
2199
|
label: {},
|
|
@@ -2041,7 +2201,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
2041
2201
|
modelValue: {},
|
|
2042
2202
|
expanded: { type: Boolean }
|
|
2043
2203
|
},
|
|
2044
|
-
emits: ["update:modelValue"],
|
|
2204
|
+
emits: ["update:modelValue", "edit"],
|
|
2045
2205
|
setup(__props, { emit: __emit }) {
|
|
2046
2206
|
var _a;
|
|
2047
2207
|
const props = __props;
|
|
@@ -2066,27 +2226,28 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
2066
2226
|
return `${props.label} (${length.value})`;
|
|
2067
2227
|
});
|
|
2068
2228
|
return (_ctx, _cache) => {
|
|
2069
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2070
|
-
createVNode(_sfc_main$
|
|
2229
|
+
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
2230
|
+
createVNode(_sfc_main$D, {
|
|
2071
2231
|
label: label.value,
|
|
2072
2232
|
open: props.expanded
|
|
2073
2233
|
}, {
|
|
2074
2234
|
default: withCtx(() => [
|
|
2075
|
-
createVNode(_sfc_main$
|
|
2235
|
+
createVNode(_sfc_main$I, {
|
|
2076
2236
|
label: "Количество элементов",
|
|
2077
2237
|
modelValue: length.value,
|
|
2078
2238
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => length.value = $event),
|
|
2079
2239
|
type: "number"
|
|
2080
2240
|
}, null, 8, ["modelValue"]),
|
|
2081
2241
|
(openBlock(true), createElementBlock(Fragment, null, renderList(length.value, (index) => {
|
|
2082
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2242
|
+
return openBlock(), createBlock(_sfc_main$b, {
|
|
2083
2243
|
key: index,
|
|
2084
2244
|
schema: props.schema.items,
|
|
2085
2245
|
name: `${props.schema.itemName ?? "Элемент"} ${index}`,
|
|
2086
2246
|
modelValue: tempArray.value[index - 1],
|
|
2087
2247
|
"onUpdate:modelValue": ($event) => tempArray.value[index - 1] = $event,
|
|
2088
|
-
expanded: unref(childExpanded)
|
|
2089
|
-
|
|
2248
|
+
expanded: unref(childExpanded),
|
|
2249
|
+
onEdit: ($event) => emit("edit", unref(join)(index - 1, $event))
|
|
2250
|
+
}, null, 8, ["schema", "name", "modelValue", "onUpdate:modelValue", "expanded", "onEdit"]);
|
|
2090
2251
|
}), 128))
|
|
2091
2252
|
]),
|
|
2092
2253
|
_: 1
|
|
@@ -2095,38 +2256,38 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
2095
2256
|
};
|
|
2096
2257
|
}
|
|
2097
2258
|
});
|
|
2098
|
-
const _sfc_main$
|
|
2099
|
-
const _hoisted_1$
|
|
2259
|
+
const _sfc_main$w = {};
|
|
2260
|
+
const _hoisted_1$p = {
|
|
2100
2261
|
width: "46",
|
|
2101
2262
|
height: "28",
|
|
2102
2263
|
viewBox: "0 0 46 28",
|
|
2103
2264
|
fill: "none",
|
|
2104
2265
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2105
2266
|
};
|
|
2106
|
-
function _sfc_render$
|
|
2107
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2267
|
+
function _sfc_render$a(_ctx, _cache) {
|
|
2268
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$p, _cache[0] || (_cache[0] = [
|
|
2108
2269
|
createStaticVNode('<mask id="mask0_1044_6" style="mask-type:luminance;" maskUnits="userSpaceOnUse" x="0" y="0" width="46" height="28"><path d="M45.5 0H0.5V28H45.5V0Z" fill="white"></path></mask><g mask="url(#mask0_1044_6)"><path d="M23.5 27.8537C35.9264 27.8537 46 25.6664 46 22.9683C46 20.2702 35.9264 18.083 23.5 18.083C11.0736 18.083 1 20.2702 1 22.9683C1 25.6664 11.0736 27.8537 23.5 27.8537Z" fill="#D7D7D7"></path><path d="M39.6719 9.5459L32.538 1.51859C32.1955 0.971432 31.6956 0.640625 31.169 0.640625H15.831C15.3044 0.640625 14.8045 0.971432 14.462 1.51789L7.32812 9.5466V15.9946H39.6719V9.5459Z" stroke="#A0A0A0" stroke-width="0.703125"></path><path d="M30.2591 11.7594C30.2591 10.6393 30.958 9.71457 31.825 9.71387H39.6719V22.3718C39.6719 23.8534 38.7437 25.0678 37.5977 25.0678H9.40234C8.25625 25.0678 7.32812 23.8527 7.32812 22.3718V9.71387H15.175C16.042 9.71387 16.7409 10.6372 16.7409 11.7573V11.7727C16.7409 12.8928 17.4475 13.7973 18.3138 13.7973H28.6862C29.5525 13.7973 30.2591 12.8845 30.2591 11.7643V11.7594Z" fill="#FAFAFA" stroke="#A0A0A0" stroke-width="0.703125"></path></g>', 2)
|
|
2109
2270
|
]));
|
|
2110
2271
|
}
|
|
2111
|
-
const EmptyFileIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2112
|
-
const _sfc_main$
|
|
2113
|
-
const _hoisted_1$
|
|
2272
|
+
const EmptyFileIcon = /* @__PURE__ */ _export_sfc(_sfc_main$w, [["render", _sfc_render$a]]);
|
|
2273
|
+
const _sfc_main$v = {};
|
|
2274
|
+
const _hoisted_1$o = {
|
|
2114
2275
|
width: "24",
|
|
2115
2276
|
height: "24",
|
|
2116
2277
|
viewBox: "0 0 24 24",
|
|
2117
2278
|
fill: "none",
|
|
2118
2279
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2119
2280
|
};
|
|
2120
|
-
function _sfc_render$
|
|
2121
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2281
|
+
function _sfc_render$9(_ctx, _cache) {
|
|
2282
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$o, _cache[0] || (_cache[0] = [
|
|
2122
2283
|
createElementVNode("path", {
|
|
2123
2284
|
d: "M14 18C14 18.5304 13.7893 19.0391 13.4142 19.4142C13.0391 19.7893 12.5304 20 12 20C11.4696 20 10.9609 19.7893 10.5858 19.4142C10.2107 19.0391 10 18.5304 10 18C10 17.4696 10.2107 16.9609 10.5858 16.5858C10.9609 16.2107 11.4696 16 12 16C12.5304 16 13.0391 16.2107 13.4142 16.5858C13.7893 16.9609 14 17.4696 14 18ZM14 12C14 12.5304 13.7893 13.0391 13.4142 13.4142C13.0391 13.7893 12.5304 14 12 14C11.4696 14 10.9609 13.7893 10.5858 13.4142C10.2107 13.0391 10 12.5304 10 12C10 11.4696 10.2107 10.9609 10.5858 10.5858C10.9609 10.2107 11.4696 10 12 10C12.5304 10 13.0391 10.2107 13.4142 10.5858C13.7893 10.9609 14 11.4696 14 12ZM12 8C12.5304 8 13.0391 7.78929 13.4142 7.41421C13.7893 7.03914 14 6.53043 14 6C14 5.46957 13.7893 4.96086 13.4142 4.58579C13.0391 4.21071 12.5304 4 12 4C11.4696 4 10.9609 4.21071 10.5858 4.58579C10.2107 4.96086 10 5.46957 10 6C10 6.53043 10.2107 7.03914 10.5858 7.41421C10.9609 7.78929 11.4696 8 12 8Z",
|
|
2124
2285
|
fill: "currentColor"
|
|
2125
2286
|
}, null, -1)
|
|
2126
2287
|
]));
|
|
2127
2288
|
}
|
|
2128
|
-
const MoreIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2129
|
-
const _sfc_main$
|
|
2289
|
+
const MoreIcon = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$9]]);
|
|
2290
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
2130
2291
|
__name: "VButton",
|
|
2131
2292
|
props: {
|
|
2132
2293
|
component: {},
|
|
@@ -2179,13 +2340,14 @@ const useContextMenu = (creator) => {
|
|
|
2179
2340
|
open
|
|
2180
2341
|
};
|
|
2181
2342
|
};
|
|
2182
|
-
const _sfc_main$
|
|
2343
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
2183
2344
|
__name: "VContextMenu",
|
|
2184
2345
|
props: {
|
|
2185
2346
|
open: { type: Boolean },
|
|
2186
2347
|
placement: {},
|
|
2187
2348
|
anchorPosition: {},
|
|
2188
2349
|
offset: {},
|
|
2350
|
+
fitAnchor: { type: Boolean },
|
|
2189
2351
|
items: { type: [Array, Function] }
|
|
2190
2352
|
},
|
|
2191
2353
|
emits: ["update:open"],
|
|
@@ -2219,18 +2381,19 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2219
2381
|
return (_ctx, _cache) => {
|
|
2220
2382
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2221
2383
|
renderSlot(_ctx.$slots, "activator", { props: activatorProps }),
|
|
2222
|
-
createVNode(_sfc_main$
|
|
2384
|
+
createVNode(_sfc_main$C, {
|
|
2223
2385
|
open: unref(open),
|
|
2224
2386
|
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => isRef(open) ? open.value = $event : null),
|
|
2225
2387
|
element: activatorElement.value,
|
|
2226
2388
|
anchorPosition: props.anchorPosition,
|
|
2227
2389
|
placement: props.placement ?? "bottom-start",
|
|
2228
2390
|
offset: _ctx.offset,
|
|
2391
|
+
fitAnchor: props.fitAnchor,
|
|
2229
2392
|
class: "v-context-menu"
|
|
2230
2393
|
}, {
|
|
2231
2394
|
default: withCtx(() => [
|
|
2232
2395
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item) => {
|
|
2233
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2396
|
+
return openBlock(), createBlock(_sfc_main$u, mergeProps({ ref_for: true }, item.props, {
|
|
2234
2397
|
class: "v-context-menu__item",
|
|
2235
2398
|
onClick: ($event) => onItemClick(item)
|
|
2236
2399
|
}), {
|
|
@@ -2242,7 +2405,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2242
2405
|
}), 256))
|
|
2243
2406
|
]),
|
|
2244
2407
|
_: 1
|
|
2245
|
-
}, 8, ["open", "element", "anchorPosition", "placement", "offset"])
|
|
2408
|
+
}, 8, ["open", "element", "anchorPosition", "placement", "offset", "fitAnchor"])
|
|
2246
2409
|
], 64);
|
|
2247
2410
|
};
|
|
2248
2411
|
}
|
|
@@ -2271,7 +2434,7 @@ const createDialogSystem = () => {
|
|
|
2271
2434
|
};
|
|
2272
2435
|
};
|
|
2273
2436
|
const useDialog = () => inject("dialogStore");
|
|
2274
|
-
const _sfc_main$
|
|
2437
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
2275
2438
|
__name: "VDialogProvider",
|
|
2276
2439
|
setup(__props) {
|
|
2277
2440
|
const dialogStore = inject("dialogStore");
|
|
@@ -2308,7 +2471,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2308
2471
|
default: withCtx(() => [
|
|
2309
2472
|
unref(dialogStore).isOpen.value ? (openBlock(), createElementBlock("div", {
|
|
2310
2473
|
key: 0,
|
|
2311
|
-
class: "v-dialog-backdrop",
|
|
2474
|
+
class: "v-dialog-backdrop editor-component",
|
|
2312
2475
|
onMousedown: onMouseDown,
|
|
2313
2476
|
onMouseup: onMouseUp
|
|
2314
2477
|
}, [
|
|
@@ -2328,15 +2491,15 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
|
2328
2491
|
};
|
|
2329
2492
|
}
|
|
2330
2493
|
});
|
|
2331
|
-
const _hoisted_1$
|
|
2494
|
+
const _hoisted_1$n = {
|
|
2332
2495
|
key: 0,
|
|
2333
2496
|
class: "v-dialog__header heading"
|
|
2334
2497
|
};
|
|
2335
|
-
const _hoisted_2$
|
|
2498
|
+
const _hoisted_2$7 = {
|
|
2336
2499
|
key: 1,
|
|
2337
2500
|
class: "v-dialog__actions"
|
|
2338
2501
|
};
|
|
2339
|
-
const _sfc_main$
|
|
2502
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
2340
2503
|
__name: "VDialog",
|
|
2341
2504
|
props: {
|
|
2342
2505
|
"content:class": {},
|
|
@@ -2352,7 +2515,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2352
2515
|
role: "dialog"
|
|
2353
2516
|
}, {
|
|
2354
2517
|
default: withCtx(() => [
|
|
2355
|
-
unref(slots).header ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2518
|
+
unref(slots).header ? (openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
2356
2519
|
renderSlot(_ctx.$slots, "header"),
|
|
2357
2520
|
createVNode(VIconButton, {
|
|
2358
2521
|
role: "button",
|
|
@@ -2370,7 +2533,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2370
2533
|
}, [
|
|
2371
2534
|
renderSlot(_ctx.$slots, "default")
|
|
2372
2535
|
], 2),
|
|
2373
|
-
unref(slots).actions ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
2536
|
+
unref(slots).actions ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
2374
2537
|
renderSlot(_ctx.$slots, "actions")
|
|
2375
2538
|
])) : createCommentVNode("", true)
|
|
2376
2539
|
]),
|
|
@@ -2379,13 +2542,13 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2379
2542
|
};
|
|
2380
2543
|
}
|
|
2381
2544
|
});
|
|
2382
|
-
const _hoisted_1$
|
|
2545
|
+
const _hoisted_1$m = {
|
|
2383
2546
|
key: 0,
|
|
2384
2547
|
class: "project-images__grid"
|
|
2385
2548
|
};
|
|
2386
|
-
const _hoisted_2$
|
|
2387
|
-
const _hoisted_3$
|
|
2388
|
-
const _sfc_main$
|
|
2549
|
+
const _hoisted_2$6 = ["onClick"];
|
|
2550
|
+
const _hoisted_3$4 = ["src"];
|
|
2551
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
2389
2552
|
__name: "ProjectImagesDialog",
|
|
2390
2553
|
props: {
|
|
2391
2554
|
fileRequest: { type: Function },
|
|
@@ -2400,20 +2563,20 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2400
2563
|
dialog.back();
|
|
2401
2564
|
};
|
|
2402
2565
|
return (_ctx, _cache) => {
|
|
2403
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2566
|
+
return openBlock(), createBlock(_sfc_main$r, { style: { "width": "900px" } }, {
|
|
2404
2567
|
header: withCtx(() => _cache[0] || (_cache[0] = [
|
|
2405
2568
|
createTextVNode("Изображения проекта")
|
|
2406
2569
|
])),
|
|
2407
2570
|
default: withCtx(() => [
|
|
2408
|
-
unref(data) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2571
|
+
unref(data) ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
2409
2572
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(data), (item) => {
|
|
2410
2573
|
return openBlock(), createElementBlock("button", {
|
|
2411
2574
|
onClick: ($event) => openImage(item)
|
|
2412
2575
|
}, [
|
|
2413
2576
|
createElementVNode("img", {
|
|
2414
2577
|
src: item.previewSrc ?? item.src
|
|
2415
|
-
}, null, 8, _hoisted_3$
|
|
2416
|
-
], 8, _hoisted_2$
|
|
2578
|
+
}, null, 8, _hoisted_3$4)
|
|
2579
|
+
], 8, _hoisted_2$6);
|
|
2417
2580
|
}), 256))
|
|
2418
2581
|
])) : createCommentVNode("", true)
|
|
2419
2582
|
]),
|
|
@@ -2422,14 +2585,14 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
2422
2585
|
};
|
|
2423
2586
|
}
|
|
2424
2587
|
});
|
|
2425
|
-
const _hoisted_1$
|
|
2588
|
+
const _hoisted_1$l = {
|
|
2426
2589
|
key: 0,
|
|
2427
2590
|
class: "v-image-uploader__drag-label"
|
|
2428
2591
|
};
|
|
2429
|
-
const _hoisted_2$
|
|
2430
|
-
const _hoisted_3$
|
|
2592
|
+
const _hoisted_2$5 = { class: "v-image-uploader__image-preview" };
|
|
2593
|
+
const _hoisted_3$3 = ["src"];
|
|
2431
2594
|
const _hoisted_4$1 = { class: "v-image-uploader__image-info" };
|
|
2432
|
-
const _sfc_main$
|
|
2595
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
2433
2596
|
__name: "VImageUploader",
|
|
2434
2597
|
props: {
|
|
2435
2598
|
accept: {},
|
|
@@ -2495,10 +2658,10 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2495
2658
|
emit("update:modelValue", image);
|
|
2496
2659
|
};
|
|
2497
2660
|
if (fileRequest) {
|
|
2498
|
-
contextMenuItems.push({ title: "Выбрать из файлов проекта", onClick: () => dialog.open(_sfc_main$
|
|
2661
|
+
contextMenuItems.push({ title: "Выбрать из файлов проекта", onClick: () => dialog.open(_sfc_main$q, { fileRequest, onOpenImage }) });
|
|
2499
2662
|
}
|
|
2500
2663
|
return (_ctx, _cache) => {
|
|
2501
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2664
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
2502
2665
|
class: normalizeClass(["v-image-uploader", { drag: drag.value }]),
|
|
2503
2666
|
error: _ctx.error,
|
|
2504
2667
|
label: _ctx.label,
|
|
@@ -2510,7 +2673,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2510
2673
|
onDragleave: onDragLeave
|
|
2511
2674
|
}, {
|
|
2512
2675
|
default: withCtx(() => [
|
|
2513
|
-
drag.value ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2676
|
+
drag.value ? (openBlock(), createElementBlock("div", _hoisted_1$l, "Отпустите файл здесь")) : !props.modelValue || props.modelValue.src === unref(defaultImageSrc) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
2514
2677
|
createVNode(EmptyFileIcon),
|
|
2515
2678
|
createElementVNode("div", null, [
|
|
2516
2679
|
createElementVNode("a", {
|
|
@@ -2518,7 +2681,7 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2518
2681
|
}, "Загрузите изображение"),
|
|
2519
2682
|
_cache[1] || (_cache[1] = createElementVNode("br", null, null, -1)),
|
|
2520
2683
|
_cache[2] || (_cache[2] = createTextVNode("или перетащите сюда ")),
|
|
2521
|
-
contextMenuItems.length > 0 ? (openBlock(), createBlock(_sfc_main$
|
|
2684
|
+
contextMenuItems.length > 0 ? (openBlock(), createBlock(_sfc_main$t, {
|
|
2522
2685
|
key: 0,
|
|
2523
2686
|
items: contextMenuItems,
|
|
2524
2687
|
placement: "bottom-end"
|
|
@@ -2535,11 +2698,11 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2535
2698
|
})) : createCommentVNode("", true)
|
|
2536
2699
|
])
|
|
2537
2700
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2538
|
-
createElementVNode("div", _hoisted_2$
|
|
2701
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
2539
2702
|
createElementVNode("img", {
|
|
2540
2703
|
src: props.modelValue.previewSrc ?? props.modelValue.src,
|
|
2541
2704
|
alt: "Preview Image"
|
|
2542
|
-
}, null, 8, _hoisted_3$
|
|
2705
|
+
}, null, 8, _hoisted_3$3),
|
|
2543
2706
|
createVNode(VIconButton, {
|
|
2544
2707
|
class: "v-image-uploader__delete-button",
|
|
2545
2708
|
onClick: removeImage
|
|
@@ -2560,33 +2723,33 @@ const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
|
2560
2723
|
};
|
|
2561
2724
|
}
|
|
2562
2725
|
});
|
|
2563
|
-
const _sfc_main$
|
|
2564
|
-
const _hoisted_1$
|
|
2726
|
+
const _sfc_main$o = {};
|
|
2727
|
+
const _hoisted_1$k = {
|
|
2565
2728
|
width: "18",
|
|
2566
2729
|
height: "18",
|
|
2567
2730
|
viewBox: "0 0 18 18",
|
|
2568
2731
|
fill: "none",
|
|
2569
2732
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2570
2733
|
};
|
|
2571
|
-
function _sfc_render$
|
|
2572
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2734
|
+
function _sfc_render$8(_ctx, _cache) {
|
|
2735
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$k, _cache[0] || (_cache[0] = [
|
|
2573
2736
|
createElementVNode("path", {
|
|
2574
2737
|
d: "M14.0326 5.40749C13.9629 5.33719 13.8799 5.28139 13.7885 5.24332C13.6971 5.20524 13.5991 5.18564 13.5001 5.18564C13.4011 5.18564 13.303 5.20524 13.2117 5.24332C13.1203 5.28139 13.0373 5.33719 12.9676 5.40749L7.38008 11.0025L5.03258 8.64749C4.96019 8.57756 4.87474 8.52257 4.7811 8.48567C4.68745 8.44877 4.58746 8.43067 4.48683 8.43241C4.38619 8.43415 4.28688 8.4557 4.19457 8.49582C4.10227 8.53594 4.01876 8.59385 3.94883 8.66624C3.87891 8.73863 3.82392 8.82408 3.78702 8.91773C3.75011 9.01137 3.73202 9.11136 3.73376 9.212C3.7355 9.31263 3.75704 9.41194 3.79716 9.50425C3.83728 9.59656 3.89519 9.68006 3.96758 9.74999L6.84758 12.63C6.91731 12.7003 7.00026 12.7561 7.09165 12.7942C7.18305 12.8322 7.28108 12.8518 7.38008 12.8518C7.47909 12.8518 7.57712 12.8322 7.66852 12.7942C7.75991 12.7561 7.84286 12.7003 7.91258 12.63L14.0326 6.50999C14.1087 6.43976 14.1695 6.35452 14.211 6.25964C14.2526 6.16477 14.274 6.06231 14.274 5.95874C14.274 5.85516 14.2526 5.75271 14.211 5.65783C14.1695 5.56296 14.1087 5.47772 14.0326 5.40749Z",
|
|
2575
2738
|
fill: "currentColor"
|
|
2576
2739
|
}, null, -1)
|
|
2577
2740
|
]));
|
|
2578
2741
|
}
|
|
2579
|
-
const CheckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2580
|
-
const _hoisted_1$
|
|
2742
|
+
const CheckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$8]]);
|
|
2743
|
+
const _hoisted_1$j = {
|
|
2581
2744
|
key: 0,
|
|
2582
2745
|
class: "v-checkbox__label left"
|
|
2583
2746
|
};
|
|
2584
|
-
const _hoisted_2$
|
|
2585
|
-
const _hoisted_3$
|
|
2747
|
+
const _hoisted_2$4 = ["name"];
|
|
2748
|
+
const _hoisted_3$2 = {
|
|
2586
2749
|
key: 1,
|
|
2587
2750
|
class: "v-checkbox__label"
|
|
2588
2751
|
};
|
|
2589
|
-
const _sfc_main$
|
|
2752
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
2590
2753
|
__name: "VCheckbox",
|
|
2591
2754
|
props: /* @__PURE__ */ mergeModels({
|
|
2592
2755
|
label: {},
|
|
@@ -2618,7 +2781,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2618
2781
|
onClick,
|
|
2619
2782
|
onKeydown: onClick
|
|
2620
2783
|
}, [
|
|
2621
|
-
labelPosition.value === "left" ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2784
|
+
labelPosition.value === "left" ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
2622
2785
|
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
2623
2786
|
createTextVNode(toDisplayString(props.label), 1)
|
|
2624
2787
|
])
|
|
@@ -2632,10 +2795,10 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
2632
2795
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
2633
2796
|
type: "checkbox",
|
|
2634
2797
|
name: props.name
|
|
2635
|
-
}, null, 8, _hoisted_2$
|
|
2798
|
+
}, null, 8, _hoisted_2$4), [
|
|
2636
2799
|
[vModelCheckbox, model.value]
|
|
2637
2800
|
]),
|
|
2638
|
-
labelPosition.value === "right" ? (openBlock(), createElementBlock("div", _hoisted_3$
|
|
2801
|
+
labelPosition.value === "right" ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
2639
2802
|
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
2640
2803
|
createTextVNode(toDisplayString(props.label), 1)
|
|
2641
2804
|
])
|
|
@@ -2655,16 +2818,16 @@ const capitalize = (text) => {
|
|
|
2655
2818
|
const spaceCamelCase = (str) => {
|
|
2656
2819
|
return capitalize(str.replace(/([A-Z])/g, " $1").trimStart());
|
|
2657
2820
|
};
|
|
2658
|
-
const _sfc_main$
|
|
2659
|
-
const _hoisted_1$
|
|
2821
|
+
const _sfc_main$m = {};
|
|
2822
|
+
const _hoisted_1$i = {
|
|
2660
2823
|
width: "24",
|
|
2661
2824
|
height: "24",
|
|
2662
2825
|
viewBox: "0 0 24 24",
|
|
2663
2826
|
fill: "none",
|
|
2664
2827
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2665
2828
|
};
|
|
2666
|
-
function _sfc_render$
|
|
2667
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2829
|
+
function _sfc_render$7(_ctx, _cache) {
|
|
2830
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$i, _cache[0] || (_cache[0] = [
|
|
2668
2831
|
createElementVNode("path", {
|
|
2669
2832
|
"fill-rule": "evenodd",
|
|
2670
2833
|
"clip-rule": "evenodd",
|
|
@@ -2673,9 +2836,9 @@ function _sfc_render$6(_ctx, _cache) {
|
|
|
2673
2836
|
}, null, -1)
|
|
2674
2837
|
]));
|
|
2675
2838
|
}
|
|
2676
|
-
const EditIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2677
|
-
const _hoisted_1$
|
|
2678
|
-
const _sfc_main$
|
|
2839
|
+
const EditIcon = /* @__PURE__ */ _export_sfc(_sfc_main$m, [["render", _sfc_render$7]]);
|
|
2840
|
+
const _hoisted_1$h = { class: "v-link-editor__custom" };
|
|
2841
|
+
const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
2679
2842
|
__name: "VLinkEditor",
|
|
2680
2843
|
props: /* @__PURE__ */ mergeModels({
|
|
2681
2844
|
nullable: { type: Boolean }
|
|
@@ -2730,7 +2893,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2730
2893
|
return arr;
|
|
2731
2894
|
});
|
|
2732
2895
|
return (_ctx, _cache) => {
|
|
2733
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2896
|
+
return openBlock(), createBlock(_sfc_main$y, {
|
|
2734
2897
|
class: "v-link-editor",
|
|
2735
2898
|
modelValue: linkType.value,
|
|
2736
2899
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => linkType.value = $event),
|
|
@@ -2738,7 +2901,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2738
2901
|
nullable: props.nullable
|
|
2739
2902
|
}, {
|
|
2740
2903
|
default: withCtx(() => [
|
|
2741
|
-
model.value && model.value.id ? (openBlock(), createBlock(_sfc_main$
|
|
2904
|
+
model.value && model.value.id ? (openBlock(), createBlock(_sfc_main$C, {
|
|
2742
2905
|
key: 0,
|
|
2743
2906
|
offset: 4,
|
|
2744
2907
|
placement: "bottom-end"
|
|
@@ -2754,27 +2917,27 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2754
2917
|
default: withCtx(() => {
|
|
2755
2918
|
var _a;
|
|
2756
2919
|
return [
|
|
2757
|
-
createElementVNode("div", _hoisted_1$
|
|
2758
|
-
model.value.id === "_external" ? (openBlock(), createBlock(_sfc_main$
|
|
2920
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
2921
|
+
model.value.id === "_external" ? (openBlock(), createBlock(_sfc_main$I, {
|
|
2759
2922
|
key: 0,
|
|
2760
2923
|
modelValue: model.value.url,
|
|
2761
2924
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value.url = $event),
|
|
2762
2925
|
label: "URL ссылки",
|
|
2763
2926
|
autofocus: ""
|
|
2764
2927
|
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
2765
|
-
model.value.id !== "_external" ? (openBlock(), createBlock(_sfc_main$
|
|
2928
|
+
model.value.id !== "_external" ? (openBlock(), createBlock(_sfc_main$I, {
|
|
2766
2929
|
key: 1,
|
|
2767
2930
|
modelValue: model.value.query,
|
|
2768
2931
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => model.value.query = $event),
|
|
2769
2932
|
label: "Якорь",
|
|
2770
2933
|
prefix: (_a = model.value) == null ? void 0 : _a.url
|
|
2771
2934
|
}, null, 8, ["modelValue", "prefix"])) : createCommentVNode("", true),
|
|
2772
|
-
createVNode(_sfc_main$
|
|
2935
|
+
createVNode(_sfc_main$I, {
|
|
2773
2936
|
modelValue: model.value.title,
|
|
2774
2937
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => model.value.title = $event),
|
|
2775
2938
|
label: "Заголовок"
|
|
2776
2939
|
}, null, 8, ["modelValue"]),
|
|
2777
|
-
createVNode(_sfc_main$
|
|
2940
|
+
createVNode(_sfc_main$n, {
|
|
2778
2941
|
modelValue: model.value.openNewTab,
|
|
2779
2942
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => model.value.openNewTab = $event),
|
|
2780
2943
|
label: "Открывать в новой вкладке"
|
|
@@ -2790,10 +2953,10 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
2790
2953
|
};
|
|
2791
2954
|
}
|
|
2792
2955
|
});
|
|
2793
|
-
var
|
|
2794
|
-
var
|
|
2795
|
-
var
|
|
2796
|
-
|
|
2956
|
+
var __defProp2 = Object.defineProperty;
|
|
2957
|
+
var __defNormalProp2 = (obj, key, value) => key in obj ? __defProp2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
2958
|
+
var __publicField2 = (obj, key, value) => {
|
|
2959
|
+
__defNormalProp2(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
2797
2960
|
return value;
|
|
2798
2961
|
};
|
|
2799
2962
|
function tryOnScopeDispose(fn) {
|
|
@@ -2933,12 +3096,12 @@ const isEqual = (a, b) => {
|
|
|
2933
3096
|
};
|
|
2934
3097
|
class TextEditorHistory {
|
|
2935
3098
|
constructor(store) {
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
3099
|
+
__publicField2(this, "actions", []);
|
|
3100
|
+
__publicField2(this, "currentCursor", 0);
|
|
3101
|
+
__publicField2(this, "blocksIds", "");
|
|
3102
|
+
__publicField2(this, "cachedBlocksJson", "");
|
|
3103
|
+
__publicField2(this, "store");
|
|
3104
|
+
__publicField2(this, "tickStarted", false);
|
|
2942
3105
|
this.store = store;
|
|
2943
3106
|
window.showHistory = () => console.log(this.actions);
|
|
2944
3107
|
}
|
|
@@ -3019,22 +3182,22 @@ class TextEditorHistory {
|
|
|
3019
3182
|
}
|
|
3020
3183
|
class TextEditorStore {
|
|
3021
3184
|
constructor() {
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3185
|
+
__publicField2(this, "history", new TextEditorHistory(this));
|
|
3186
|
+
__publicField2(this, "blocks", reactive([{ id: uid(), text: "", styles: [] }]));
|
|
3187
|
+
__publicField2(this, "selection", reactive({
|
|
3025
3188
|
anchor: { blockId: this.blocks[0].id, offset: 0 },
|
|
3026
3189
|
focus: { blockId: this.blocks[0].id, offset: 0 }
|
|
3027
3190
|
}));
|
|
3028
|
-
|
|
3191
|
+
__publicField2(this, "_isCollapsed", computed(() => {
|
|
3029
3192
|
return this.selection.anchor.blockId === this.selection.focus.blockId && this.selection.anchor.offset === this.selection.focus.offset;
|
|
3030
3193
|
}));
|
|
3031
|
-
|
|
3032
|
-
|
|
3194
|
+
__publicField2(this, "isFocused", ref(false));
|
|
3195
|
+
__publicField2(this, "_currentBlock", computed(() => {
|
|
3033
3196
|
if (this.selection.anchor.blockId !== this.selection.focus.blockId)
|
|
3034
3197
|
return null;
|
|
3035
3198
|
return this.blocks.find((item) => item.id === this.selection.anchor.blockId) ?? null;
|
|
3036
3199
|
}));
|
|
3037
|
-
|
|
3200
|
+
__publicField2(this, "_selectedText", computed(() => {
|
|
3038
3201
|
if (this.isCollapsed)
|
|
3039
3202
|
return "";
|
|
3040
3203
|
const [start, end, startIndex, endIndex] = this.startAndEnd;
|
|
@@ -3046,7 +3209,7 @@ class TextEditorStore {
|
|
|
3046
3209
|
const arr = [startText, ...this.blocks.slice(startIndex + 1, endIndex).map((block) => block.text), endText];
|
|
3047
3210
|
return arr.join("\n");
|
|
3048
3211
|
}));
|
|
3049
|
-
|
|
3212
|
+
__publicField2(this, "_currentStyles", computed(() => {
|
|
3050
3213
|
const [start, end, startIndex, endIndex] = this.startAndEnd;
|
|
3051
3214
|
const styles = /* @__PURE__ */ new Map();
|
|
3052
3215
|
if (startIndex < 0)
|
|
@@ -4012,11 +4175,11 @@ const codeParser = (text) => {
|
|
|
4012
4175
|
}
|
|
4013
4176
|
return arr;
|
|
4014
4177
|
};
|
|
4015
|
-
const _hoisted_1$
|
|
4178
|
+
const _hoisted_1$g = {
|
|
4016
4179
|
class: "code-editor",
|
|
4017
4180
|
contenteditable: false
|
|
4018
4181
|
};
|
|
4019
|
-
const _sfc_main$
|
|
4182
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
4020
4183
|
__name: "RichTextEditorCode",
|
|
4021
4184
|
props: {
|
|
4022
4185
|
modelValue: {}
|
|
@@ -4044,7 +4207,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
4044
4207
|
}
|
|
4045
4208
|
};
|
|
4046
4209
|
return (_ctx, _cache) => {
|
|
4047
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4210
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
4048
4211
|
createVNode(unref(_sfc_main$1$1), {
|
|
4049
4212
|
modelValue: model.value,
|
|
4050
4213
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
@@ -4059,113 +4222,113 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
4059
4222
|
};
|
|
4060
4223
|
}
|
|
4061
4224
|
});
|
|
4062
|
-
const _sfc_main$
|
|
4063
|
-
const _hoisted_1$
|
|
4225
|
+
const _sfc_main$j = {};
|
|
4226
|
+
const _hoisted_1$f = {
|
|
4064
4227
|
width: "16",
|
|
4065
4228
|
height: "16",
|
|
4066
4229
|
viewBox: "0 0 16 16",
|
|
4067
4230
|
fill: "none",
|
|
4068
4231
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4069
4232
|
};
|
|
4070
|
-
function _sfc_render$
|
|
4071
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4233
|
+
function _sfc_render$6(_ctx, _cache) {
|
|
4234
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$f, _cache[0] || (_cache[0] = [
|
|
4072
4235
|
createElementVNode("path", {
|
|
4073
4236
|
d: "M4 2H8.5C9.14255 2.0002 9.77266 2.17723 10.3213 2.51171C10.8699 2.84618 11.3159 3.32519 11.6105 3.89627C11.905 4.46734 12.0367 5.10846 11.9911 5.7494C11.9455 6.39033 11.7244 7.00636 11.352 7.53C11.9979 7.93183 12.4953 8.53322 12.7688 9.24307C13.0423 9.95292 13.077 10.7326 12.8676 11.4639C12.6583 12.1952 12.2163 12.8384 11.6086 13.2961C11.001 13.7537 10.2607 14.0008 9.5 14H4C3.73478 14 3.48043 13.8946 3.29289 13.7071C3.10536 13.5196 3 13.2652 3 13V3C3 2.73478 3.10536 2.48043 3.29289 2.29289C3.48043 2.10536 3.73478 2 4 2ZM5 9V12H9.5C9.89782 12 10.2794 11.842 10.5607 11.5607C10.842 11.2794 11 10.8978 11 10.5C11 10.1022 10.842 9.72064 10.5607 9.43934C10.2794 9.15804 9.89782 9 9.5 9H5ZM8.5 7C8.89782 7 9.27936 6.84196 9.56066 6.56066C9.84196 6.27936 10 5.89782 10 5.5C10 5.10218 9.84196 4.72064 9.56066 4.43934C9.27936 4.15804 8.89782 4 8.5 4H5V7H8.5Z",
|
|
4074
4237
|
fill: "currentColor"
|
|
4075
4238
|
}, null, -1)
|
|
4076
4239
|
]));
|
|
4077
4240
|
}
|
|
4078
|
-
const TextBoldIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4079
|
-
const _sfc_main$
|
|
4080
|
-
const _hoisted_1$
|
|
4241
|
+
const TextBoldIcon = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["render", _sfc_render$6]]);
|
|
4242
|
+
const _sfc_main$i = {};
|
|
4243
|
+
const _hoisted_1$e = {
|
|
4081
4244
|
width: "16",
|
|
4082
4245
|
height: "16",
|
|
4083
4246
|
viewBox: "0 0 16 16",
|
|
4084
4247
|
fill: "none",
|
|
4085
4248
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4086
4249
|
};
|
|
4087
|
-
function _sfc_render$
|
|
4088
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4250
|
+
function _sfc_render$5(_ctx, _cache) {
|
|
4251
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$e, _cache[0] || (_cache[0] = [
|
|
4089
4252
|
createElementVNode("path", {
|
|
4090
4253
|
d: "M6 2.75C6 2.55109 6.07902 2.36032 6.21967 2.21967C6.36032 2.07902 6.55109 2 6.75 2H13.25C13.4489 2 13.6397 2.07902 13.7803 2.21967C13.921 2.36032 14 2.55109 14 2.75C14 2.94891 13.921 3.13968 13.7803 3.28033C13.6397 3.42098 13.4489 3.5 13.25 3.5H10.745L6.887 12.5H9.25C9.44891 12.5 9.63968 12.579 9.78033 12.7197C9.92098 12.8603 10 13.0511 10 13.25C10 13.4489 9.92098 13.6397 9.78033 13.7803C9.63968 13.921 9.44891 14 9.25 14H2.75C2.55109 14 2.36032 13.921 2.21967 13.7803C2.07902 13.6397 2 13.4489 2 13.25C2 13.0511 2.07902 12.8603 2.21967 12.7197C2.36032 12.579 2.55109 12.5 2.75 12.5H5.255L9.113 3.5H6.75C6.55109 3.5 6.36032 3.42098 6.21967 3.28033C6.07902 3.13968 6 2.94891 6 2.75Z",
|
|
4091
4254
|
fill: "currentColor"
|
|
4092
4255
|
}, null, -1)
|
|
4093
4256
|
]));
|
|
4094
4257
|
}
|
|
4095
|
-
const TextItalicIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4096
|
-
const _sfc_main$
|
|
4097
|
-
const _hoisted_1$
|
|
4258
|
+
const TextItalicIcon = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["render", _sfc_render$5]]);
|
|
4259
|
+
const _sfc_main$h = {};
|
|
4260
|
+
const _hoisted_1$d = {
|
|
4098
4261
|
width: "16",
|
|
4099
4262
|
height: "16",
|
|
4100
4263
|
viewBox: "0 0 16 16",
|
|
4101
4264
|
fill: "none",
|
|
4102
4265
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4103
4266
|
};
|
|
4104
|
-
function _sfc_render$
|
|
4105
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4267
|
+
function _sfc_render$4(_ctx, _cache) {
|
|
4268
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$d, _cache[0] || (_cache[0] = [
|
|
4106
4269
|
createElementVNode("path", {
|
|
4107
4270
|
d: "M8 11.0625C9.16032 11.0625 10.2731 10.6016 11.0936 9.78109C11.9141 8.96062 12.375 7.84782 12.375 6.6875V2.3125C12.375 2.08044 12.2828 1.85788 12.1187 1.69378C11.9546 1.52969 11.7321 1.4375 11.5 1.4375C11.2679 1.4375 11.0454 1.52969 10.8813 1.69378C10.7172 1.85788 10.625 2.08044 10.625 2.3125V6.6875C10.625 7.38369 10.3484 8.05137 9.85616 8.54366C9.36387 9.03594 8.69619 9.3125 8 9.3125C7.30381 9.3125 6.63613 9.03594 6.14384 8.54366C5.65156 8.05137 5.375 7.38369 5.375 6.6875V2.3125C5.375 2.08044 5.28281 1.85788 5.11872 1.69378C4.95462 1.52969 4.73206 1.4375 4.5 1.4375C4.26794 1.4375 4.04538 1.52969 3.88128 1.69378C3.71719 1.85788 3.625 2.08044 3.625 2.3125V6.6875C3.625 7.84782 4.08594 8.96062 4.90641 9.78109C5.72688 10.6016 6.83968 11.0625 8 11.0625ZM12.375 12.8125H3.625C3.39294 12.8125 3.17038 12.9047 3.00628 13.0688C2.84219 13.2329 2.75 13.4554 2.75 13.6875C2.75 13.9196 2.84219 14.1421 3.00628 14.3062C3.17038 14.4703 3.39294 14.5625 3.625 14.5625H12.375C12.6071 14.5625 12.8296 14.4703 12.9937 14.3062C13.1578 14.1421 13.25 13.9196 13.25 13.6875C13.25 13.4554 13.1578 13.2329 12.9937 13.0688C12.8296 12.9047 12.6071 12.8125 12.375 12.8125Z",
|
|
4108
4271
|
fill: "currentColor"
|
|
4109
4272
|
}, null, -1)
|
|
4110
4273
|
]));
|
|
4111
4274
|
}
|
|
4112
|
-
const TextUnderlineIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4113
|
-
const _sfc_main$
|
|
4114
|
-
const _hoisted_1$
|
|
4275
|
+
const TextUnderlineIcon = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["render", _sfc_render$4]]);
|
|
4276
|
+
const _sfc_main$g = {};
|
|
4277
|
+
const _hoisted_1$c = {
|
|
4115
4278
|
width: "16",
|
|
4116
4279
|
height: "16",
|
|
4117
4280
|
viewBox: "0 0 16 16",
|
|
4118
4281
|
fill: "none",
|
|
4119
4282
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4120
4283
|
};
|
|
4121
|
-
function _sfc_render$
|
|
4122
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4284
|
+
function _sfc_render$3(_ctx, _cache) {
|
|
4285
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$c, _cache[0] || (_cache[0] = [
|
|
4123
4286
|
createElementVNode("path", {
|
|
4124
4287
|
d: "M11.055 8.5C11.579 9.036 11.87 9.757 11.866 10.507C11.8673 10.9659 11.7676 11.4195 11.574 11.8357C11.3805 12.2518 11.0978 12.6203 10.746 12.915C9.948 13.597 8.748 14 7.096 14C5.39 14 3.992 13.393 3.194 12.623C3.06263 12.4823 2.99028 12.2966 2.99188 12.1041C2.99349 11.9117 3.06893 11.7272 3.20264 11.5887C3.33634 11.4503 3.5181 11.3684 3.7104 11.3601C3.90269 11.3518 4.09084 11.4176 4.236 11.544C4.716 12.007 5.723 12.5 7.096 12.5C8.518 12.5 9.328 12.154 9.772 11.774C10.207 11.402 10.366 10.935 10.366 10.507C10.366 10.035 10.158 9.65 9.719 9.31C9.271 8.964 8.603 8.687 7.768 8.5H1.75C1.55109 8.5 1.36032 8.42098 1.21967 8.28033C1.07902 8.13968 1 7.94891 1 7.75C1 7.55109 1.07902 7.36032 1.21967 7.21967C1.36032 7.07902 1.55109 7 1.75 7H14.25C14.4489 7 14.6397 7.07902 14.7803 7.21967C14.921 7.36032 15 7.55109 15 7.75C15 7.94891 14.921 8.13968 14.7803 8.28033C14.6397 8.42098 14.4489 8.5 14.25 8.5H11.055ZM7.581 3.25C5.545 3.25 4.803 4.332 4.803 5.036C4.803 5.09067 4.805 5.143 4.809 5.193C4.82412 5.39138 4.75981 5.58764 4.63022 5.73861C4.50063 5.88958 4.31638 5.98288 4.118 5.998C3.91962 6.01312 3.72336 5.94881 3.57239 5.81922C3.42142 5.68963 3.32812 5.50538 3.313 5.307C3.3066 5.21681 3.30327 5.12642 3.303 5.036C3.303 3.204 5.053 1.75 7.581 1.75C8.999 1.75 10.302 2.33 11.095 2.843C11.1777 2.89645 11.2491 2.96567 11.3051 3.04671C11.3611 3.12775 11.4006 3.21902 11.4213 3.31532C11.442 3.41161 11.4435 3.51104 11.4258 3.60793C11.4081 3.70482 11.3714 3.79727 11.318 3.88C11.2646 3.96273 11.1953 4.03413 11.1143 4.09011C11.0333 4.14609 10.942 4.18556 10.8457 4.20627C10.7494 4.22698 10.65 4.22852 10.5531 4.2108C10.4562 4.19308 10.3637 4.15645 10.281 4.103C9.641 3.689 8.619 3.25 7.581 3.25Z",
|
|
4125
4288
|
fill: "currentColor"
|
|
4126
4289
|
}, null, -1)
|
|
4127
4290
|
]));
|
|
4128
4291
|
}
|
|
4129
|
-
const TextStrikethroughIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4130
|
-
const _sfc_main$
|
|
4131
|
-
const _hoisted_1$
|
|
4292
|
+
const TextStrikethroughIcon = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["render", _sfc_render$3]]);
|
|
4293
|
+
const _sfc_main$f = {};
|
|
4294
|
+
const _hoisted_1$b = {
|
|
4132
4295
|
width: "16",
|
|
4133
4296
|
height: "16",
|
|
4134
4297
|
viewBox: "0 0 16 16",
|
|
4135
4298
|
fill: "none",
|
|
4136
4299
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4137
4300
|
};
|
|
4138
|
-
function _sfc_render$
|
|
4139
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4301
|
+
function _sfc_render$2(_ctx, _cache) {
|
|
4302
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$b, _cache[0] || (_cache[0] = [
|
|
4140
4303
|
createElementVNode("path", {
|
|
4141
4304
|
d: "M14.8574 13.3334V2.66669C14.8574 1.8286 14.1716 1.14288 13.3335 1.14288H2.66688C1.82878 1.14288 1.14307 1.8286 1.14307 2.66669V13.3334C1.14307 14.1715 1.82878 14.8572 2.66688 14.8572H13.3335C14.1716 14.8572 14.8574 14.1715 14.8574 13.3334ZM5.33354 9.14288L7.2383 11.4362L9.90497 8.00003L13.3335 12.5715H2.66688L5.33354 9.14288Z",
|
|
4142
4305
|
fill: "currentColor"
|
|
4143
4306
|
}, null, -1)
|
|
4144
4307
|
]));
|
|
4145
4308
|
}
|
|
4146
|
-
const ImageSolidIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4147
|
-
const _sfc_main$
|
|
4148
|
-
const _hoisted_1$
|
|
4309
|
+
const ImageSolidIcon = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["render", _sfc_render$2]]);
|
|
4310
|
+
const _sfc_main$e = {};
|
|
4311
|
+
const _hoisted_1$a = {
|
|
4149
4312
|
width: "16",
|
|
4150
4313
|
height: "16",
|
|
4151
4314
|
viewBox: "0 0 16 16",
|
|
4152
4315
|
fill: "none",
|
|
4153
4316
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4154
4317
|
};
|
|
4155
|
-
function _sfc_render(_ctx, _cache) {
|
|
4156
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4318
|
+
function _sfc_render$1(_ctx, _cache) {
|
|
4319
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$a, _cache[0] || (_cache[0] = [
|
|
4157
4320
|
createElementVNode("path", {
|
|
4158
4321
|
d: "M10.189 2.04806C10.605 2.19806 10.8186 2.65181 10.6674 3.06281L6.83704 13.4788C6.68504 13.8898 6.22664 14.1013 5.81144 13.9521C5.39544 13.8021 5.18184 13.3483 5.33304 12.9373L9.16344 2.52131C9.31544 2.11031 9.77384 1.89881 10.189 2.04806ZM1.93144 8.19206L4.76024 10.9926C5.07224 11.3016 5.07224 11.8026 4.76024 12.1116C4.68811 12.1847 4.60063 12.243 4.50329 12.2829C4.40596 12.3228 4.30087 12.3434 4.19464 12.3434C4.08841 12.3434 3.98332 12.3228 3.88599 12.2829C3.78865 12.243 3.70117 12.1847 3.62904 12.1116L0.234639 8.75231C0.084409 8.59988 0.000976562 8.39997 0.000976562 8.19244C0.000976562 7.9849 0.084409 7.78499 0.234639 7.63256L3.62904 4.27256C3.70117 4.19944 3.78865 4.1411 3.88599 4.1012C3.98332 4.0613 4.08841 4.0407 4.19464 4.0407C4.30087 4.0407 4.40596 4.0613 4.50329 4.1012C4.60063 4.1411 4.68811 4.19944 4.76024 4.27256C4.9107 4.42503 4.99427 4.6251 4.99427 4.83281C4.99427 5.04052 4.9107 5.24059 4.76024 5.39306L1.93144 8.19206ZM14.069 8.19206L11.2402 5.39306C11.09 5.24063 11.0066 5.04072 11.0066 4.83319C11.0066 4.62565 11.09 4.42574 11.2402 4.27331C11.3124 4.20019 11.3998 4.14185 11.4972 4.10195C11.5945 4.06205 11.6996 4.04145 11.8058 4.04145C11.9121 4.04145 12.0172 4.06205 12.1145 4.10195C12.2118 4.14185 12.2993 4.20019 12.3714 4.27331L15.7658 7.63256C16.0778 7.94156 16.0778 8.44256 15.7658 8.75231L12.3714 12.1108C12.2993 12.1839 12.2118 12.2423 12.1145 12.2822C12.0172 12.3221 11.9121 12.3427 11.8058 12.3427C11.6996 12.3427 11.5945 12.3221 11.4972 12.2822C11.3998 12.2423 11.3124 12.1839 11.2402 12.1108C11.0902 11.9584 11.0069 11.7587 11.0069 11.5513C11.0069 11.344 11.0902 11.1442 11.2402 10.9918L14.069 8.19206Z",
|
|
4159
4322
|
fill: "currentColor"
|
|
4160
4323
|
}, null, -1)
|
|
4161
4324
|
]));
|
|
4162
4325
|
}
|
|
4163
|
-
const CodeIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4164
|
-
const _hoisted_1$
|
|
4165
|
-
const _hoisted_2$
|
|
4166
|
-
const _hoisted_3 = ["onClick"];
|
|
4326
|
+
const CodeIcon = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["render", _sfc_render$1]]);
|
|
4327
|
+
const _hoisted_1$9 = { class: "rich-text-editor__controls" };
|
|
4328
|
+
const _hoisted_2$3 = { class: "rich-text-editor__actions-group" };
|
|
4329
|
+
const _hoisted_3$1 = ["onClick"];
|
|
4167
4330
|
const _hoisted_4 = { class: "rich-text-editor__actions-group" };
|
|
4168
|
-
const _sfc_main$
|
|
4331
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
4169
4332
|
__name: "RichTextEditorDialog",
|
|
4170
4333
|
props: /* @__PURE__ */ mergeModels({
|
|
4171
4334
|
label: {}
|
|
@@ -4254,26 +4417,26 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
4254
4417
|
(_a = textEditorRef.value) == null ? void 0 : _a.insertBlock({ type: "image", editable: false, text: "" });
|
|
4255
4418
|
};
|
|
4256
4419
|
return (_ctx, _cache) => {
|
|
4257
|
-
return openBlock(), createBlock(_sfc_main$
|
|
4420
|
+
return openBlock(), createBlock(_sfc_main$r, { class: "rich-text-editor__dialog" }, {
|
|
4258
4421
|
header: withCtx(() => [
|
|
4259
4422
|
createTextVNode(toDisplayString(props.label ?? "Редактирование текста"), 1)
|
|
4260
4423
|
]),
|
|
4261
4424
|
default: withCtx(() => [
|
|
4262
|
-
createElementVNode("div", _hoisted_1$
|
|
4263
|
-
createVNode(_sfc_main$
|
|
4425
|
+
createElementVNode("div", _hoisted_1$9, [
|
|
4426
|
+
createVNode(_sfc_main$y, {
|
|
4264
4427
|
modelValue: blockType.value,
|
|
4265
4428
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => blockType.value = $event),
|
|
4266
4429
|
items: blockTypes,
|
|
4267
4430
|
style: { "width": "200px" }
|
|
4268
4431
|
}, null, 8, ["modelValue"]),
|
|
4269
|
-
createElementVNode("div", _hoisted_2$
|
|
4432
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
4270
4433
|
(openBlock(true), createElementBlock(Fragment, null, renderList(styles.value, (item) => {
|
|
4271
4434
|
return openBlock(), createElementBlock("button", {
|
|
4272
4435
|
class: normalizeClass({ active: item.active }),
|
|
4273
4436
|
onClick: item.onClick
|
|
4274
4437
|
}, [
|
|
4275
4438
|
(openBlock(), createBlock(resolveDynamicComponent(item.icon)))
|
|
4276
|
-
], 10, _hoisted_3);
|
|
4439
|
+
], 10, _hoisted_3$1);
|
|
4277
4440
|
}), 256))
|
|
4278
4441
|
]),
|
|
4279
4442
|
createElementVNode("div", _hoisted_4, [
|
|
@@ -4302,7 +4465,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
4302
4465
|
onKeydown: onKeyDown
|
|
4303
4466
|
}, {
|
|
4304
4467
|
code: withCtx(({ props: props2, block }) => [
|
|
4305
|
-
createVNode(_sfc_main$
|
|
4468
|
+
createVNode(_sfc_main$k, mergeProps({
|
|
4306
4469
|
modelValue: block.text,
|
|
4307
4470
|
"onUpdate:modelValue": ($event) => block.text = $event
|
|
4308
4471
|
}, props2, {
|
|
@@ -4319,7 +4482,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
4319
4482
|
image: withCtx(({ props: props2, block }) => {
|
|
4320
4483
|
var _a;
|
|
4321
4484
|
return [
|
|
4322
|
-
createVNode(_sfc_main$
|
|
4485
|
+
createVNode(_sfc_main$p, mergeProps({
|
|
4323
4486
|
modelValue: block.image,
|
|
4324
4487
|
"onUpdate:modelValue": ($event) => block.image = $event
|
|
4325
4488
|
}, props2, {
|
|
@@ -4343,8 +4506,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
4343
4506
|
};
|
|
4344
4507
|
}
|
|
4345
4508
|
});
|
|
4346
|
-
const _hoisted_1$
|
|
4347
|
-
const _sfc_main$
|
|
4509
|
+
const _hoisted_1$8 = { class: "v-form-control__outline" };
|
|
4510
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
4348
4511
|
__name: "VRichTextEditor",
|
|
4349
4512
|
props: /* @__PURE__ */ mergeModels({
|
|
4350
4513
|
label: {}
|
|
@@ -4358,26 +4521,26 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
4358
4521
|
const model = useModel(__props, "modelValue");
|
|
4359
4522
|
const dialog = useDialog();
|
|
4360
4523
|
const openTextEditor = () => {
|
|
4361
|
-
dialog.open(_sfc_main$
|
|
4524
|
+
dialog.open(_sfc_main$d, {
|
|
4362
4525
|
label: props.label,
|
|
4363
4526
|
modelValue: model.value,
|
|
4364
4527
|
["onUpdate:modelValue"]: (val) => model.value = val
|
|
4365
4528
|
});
|
|
4366
4529
|
};
|
|
4367
4530
|
return (_ctx, _cache) => {
|
|
4368
|
-
return openBlock(), createBlock(_sfc_main$
|
|
4531
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
4369
4532
|
label: props.label,
|
|
4370
4533
|
class: "rich-text-editor"
|
|
4371
4534
|
}, {
|
|
4372
4535
|
default: withCtx(() => [
|
|
4373
|
-
createElementVNode("div", _hoisted_1$
|
|
4536
|
+
createElementVNode("div", _hoisted_1$8, [
|
|
4374
4537
|
createVNode(unref(_sfc_main$1$1), {
|
|
4375
4538
|
modelValue: model.value,
|
|
4376
4539
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
4377
4540
|
class: "rich-text-editor__editor"
|
|
4378
4541
|
}, null, 8, ["modelValue"])
|
|
4379
4542
|
]),
|
|
4380
|
-
createVNode(_sfc_main$
|
|
4543
|
+
createVNode(_sfc_main$u, { onClick: openTextEditor }, {
|
|
4381
4544
|
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
4382
4545
|
createTextVNode("Редактировать")
|
|
4383
4546
|
])),
|
|
@@ -4390,11 +4553,27 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
4390
4553
|
};
|
|
4391
4554
|
}
|
|
4392
4555
|
});
|
|
4393
|
-
const _hoisted_1$
|
|
4556
|
+
const _hoisted_1$7 = {
|
|
4394
4557
|
key: 3,
|
|
4395
4558
|
class: "json-editor__object"
|
|
4396
4559
|
};
|
|
4397
|
-
const
|
|
4560
|
+
const getItems = (schema) => {
|
|
4561
|
+
return schema.enum.map((item, index) => {
|
|
4562
|
+
var _a;
|
|
4563
|
+
return {
|
|
4564
|
+
id: item,
|
|
4565
|
+
title: ((_a = schema.enumAlias) == null ? void 0 : _a[index]) ?? spaceCamelCase(item)
|
|
4566
|
+
};
|
|
4567
|
+
});
|
|
4568
|
+
};
|
|
4569
|
+
const join = (baseKey, key) => {
|
|
4570
|
+
if (key) {
|
|
4571
|
+
return `${baseKey}.${key}`;
|
|
4572
|
+
} else {
|
|
4573
|
+
return baseKey.toString();
|
|
4574
|
+
}
|
|
4575
|
+
};
|
|
4576
|
+
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
4398
4577
|
__name: "JsonEditor",
|
|
4399
4578
|
props: /* @__PURE__ */ mergeModels({
|
|
4400
4579
|
schema: {},
|
|
@@ -4406,9 +4585,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
4406
4585
|
"modelValue": {},
|
|
4407
4586
|
"modelModifiers": {}
|
|
4408
4587
|
}),
|
|
4409
|
-
emits: ["update:modelValue"],
|
|
4410
|
-
setup(__props) {
|
|
4588
|
+
emits: /* @__PURE__ */ mergeModels(["edit"], ["update:modelValue"]),
|
|
4589
|
+
setup(__props, { emit: __emit }) {
|
|
4411
4590
|
const props = __props;
|
|
4591
|
+
const emit = __emit;
|
|
4412
4592
|
const childExpanded = props.schema.type === "object" && Object.keys(props.schema.properties).length < 2;
|
|
4413
4593
|
const vModel = useModel(__props, "modelValue");
|
|
4414
4594
|
if (vModel.value !== null && vModel.value !== void 0) {
|
|
@@ -4416,37 +4596,29 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
4416
4596
|
vModel.value = getDefaultValue(props.schema);
|
|
4417
4597
|
}
|
|
4418
4598
|
}
|
|
4419
|
-
|
|
4420
|
-
return schema.enum.map((item, index) => {
|
|
4421
|
-
var _a;
|
|
4422
|
-
return {
|
|
4423
|
-
id: item,
|
|
4424
|
-
title: ((_a = schema.enumAlias) == null ? void 0 : _a[index]) ?? spaceCamelCase(item)
|
|
4425
|
-
};
|
|
4426
|
-
});
|
|
4427
|
-
};
|
|
4599
|
+
watch(vModel, () => emit("edit"));
|
|
4428
4600
|
return (_ctx, _cache) => {
|
|
4429
4601
|
const _component_JsonEditor = resolveComponent("JsonEditor", true);
|
|
4430
|
-
return props.schema.type === "object" && props.schema.format === "image" ? (openBlock(), createBlock(_sfc_main$
|
|
4602
|
+
return props.schema.type === "object" && props.schema.format === "image" ? (openBlock(), createBlock(_sfc_main$p, {
|
|
4431
4603
|
key: 0,
|
|
4432
4604
|
modelValue: vModel.value,
|
|
4433
4605
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vModel.value = $event),
|
|
4434
4606
|
label: props.schema.name ?? props.name,
|
|
4435
4607
|
schema: props.schema
|
|
4436
|
-
}, null, 8, ["modelValue", "label", "schema"])) : props.schema.type === "object" && props.schema.format === "smartLink" ? (openBlock(), createBlock(_sfc_main$
|
|
4608
|
+
}, null, 8, ["modelValue", "label", "schema"])) : props.schema.type === "object" && props.schema.format === "smartLink" ? (openBlock(), createBlock(_sfc_main$l, {
|
|
4437
4609
|
key: 1,
|
|
4438
4610
|
modelValue: vModel.value,
|
|
4439
4611
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vModel.value = $event),
|
|
4440
4612
|
label: props.schema.name ?? props.name,
|
|
4441
4613
|
schema: props.schema,
|
|
4442
4614
|
nullable: props.schema.nullable || props.nullable
|
|
4443
|
-
}, null, 8, ["modelValue", "label", "schema", "nullable"])) : props.schema.type === "array" && props.schema.format === "richText" ? (openBlock(), createBlock(_sfc_main$
|
|
4615
|
+
}, null, 8, ["modelValue", "label", "schema", "nullable"])) : props.schema.type === "array" && props.schema.format === "richText" ? (openBlock(), createBlock(_sfc_main$c, {
|
|
4444
4616
|
key: 2,
|
|
4445
4617
|
modelValue: vModel.value,
|
|
4446
4618
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vModel.value = $event),
|
|
4447
4619
|
label: props.schema.name ?? props.name,
|
|
4448
4620
|
schema: props.schema
|
|
4449
|
-
}, null, 8, ["modelValue", "label", "schema"])) : props.schema.type === "object" ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4621
|
+
}, null, 8, ["modelValue", "label", "schema"])) : props.schema.type === "object" ? (openBlock(), createElementBlock("div", _hoisted_1$7, [
|
|
4450
4622
|
props.flat ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.schema.properties, (item, key) => {
|
|
4451
4623
|
var _a;
|
|
4452
4624
|
return openBlock(), createBlock(_component_JsonEditor, {
|
|
@@ -4456,9 +4628,10 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
4456
4628
|
schema: item,
|
|
4457
4629
|
expanded: unref(childExpanded),
|
|
4458
4630
|
name: unref(spaceCamelCase)(key),
|
|
4459
|
-
nullable: !((_a = props.schema.required) == null ? void 0 : _a.includes(key))
|
|
4460
|
-
|
|
4461
|
-
|
|
4631
|
+
nullable: !((_a = props.schema.required) == null ? void 0 : _a.includes(key)),
|
|
4632
|
+
onEdit: ($event) => emit("edit", join(key, $event))
|
|
4633
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "expanded", "name", "nullable", "onEdit"]);
|
|
4634
|
+
}), 128)) : (openBlock(), createBlock(_sfc_main$D, {
|
|
4462
4635
|
key: 1,
|
|
4463
4636
|
label: props.schema.name ?? props.name,
|
|
4464
4637
|
open: props.expanded
|
|
@@ -4473,43 +4646,46 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
4473
4646
|
schema: item,
|
|
4474
4647
|
expanded: unref(childExpanded),
|
|
4475
4648
|
name: unref(spaceCamelCase)(key),
|
|
4476
|
-
nullable: !((_a = props.schema.required) == null ? void 0 : _a.includes(key))
|
|
4477
|
-
|
|
4649
|
+
nullable: !((_a = props.schema.required) == null ? void 0 : _a.includes(key)),
|
|
4650
|
+
onEdit: ($event) => emit("edit", join(key, $event))
|
|
4651
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "schema", "expanded", "name", "nullable", "onEdit"]);
|
|
4478
4652
|
}), 128))
|
|
4479
4653
|
]),
|
|
4480
4654
|
_: 1
|
|
4481
4655
|
}, 8, ["label", "open"]))
|
|
4482
|
-
])) : props.schema.type === "array" ? (openBlock(), createBlock(_sfc_main$
|
|
4656
|
+
])) : props.schema.type === "array" ? (openBlock(), createBlock(_sfc_main$x, {
|
|
4483
4657
|
key: 4,
|
|
4484
4658
|
modelValue: vModel.value,
|
|
4485
4659
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vModel.value = $event),
|
|
4486
4660
|
schema: props.schema,
|
|
4487
4661
|
label: props.schema.name ?? props.name,
|
|
4488
|
-
expanded: props.expanded
|
|
4489
|
-
|
|
4662
|
+
expanded: props.expanded,
|
|
4663
|
+
onEdit: _cache[4] || (_cache[4] = ($event) => emit("edit", $event))
|
|
4664
|
+
}, null, 8, ["modelValue", "schema", "label", "expanded"])) : props.schema.type === "string" && props.schema.enum ? (openBlock(), createBlock(_sfc_main$y, {
|
|
4490
4665
|
key: 5,
|
|
4491
4666
|
nullable: props.schema.nullable || props.nullable,
|
|
4492
4667
|
items: getItems(props.schema),
|
|
4493
4668
|
modelValue: vModel.value,
|
|
4494
|
-
"onUpdate:modelValue": _cache[
|
|
4669
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vModel.value = $event),
|
|
4495
4670
|
label: props.schema.name ?? props.name
|
|
4496
|
-
}, null, 8, ["nullable", "items", "modelValue", "label"])) : props.schema.type === "boolean" ? (openBlock(), createBlock(_sfc_main$
|
|
4671
|
+
}, null, 8, ["nullable", "items", "modelValue", "label"])) : props.schema.type === "boolean" ? (openBlock(), createBlock(_sfc_main$n, {
|
|
4497
4672
|
key: 6,
|
|
4498
4673
|
modelValue: vModel.value,
|
|
4499
|
-
"onUpdate:modelValue": _cache[
|
|
4674
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vModel.value = $event),
|
|
4500
4675
|
label: props.schema.name ?? props.name
|
|
4501
|
-
}, null, 8, ["modelValue", "label"])) : (openBlock(), createBlock(_sfc_main$
|
|
4676
|
+
}, null, 8, ["modelValue", "label"])) : (openBlock(), createBlock(_sfc_main$I, {
|
|
4502
4677
|
key: 7,
|
|
4503
4678
|
modelValue: vModel.value,
|
|
4504
|
-
"onUpdate:modelValue": _cache[
|
|
4679
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vModel.value = $event),
|
|
4505
4680
|
label: props.schema.name ?? props.name,
|
|
4506
|
-
multiline: props.schema.multiline
|
|
4507
|
-
|
|
4681
|
+
multiline: props.schema.multiline,
|
|
4682
|
+
placeholder: props.schema.placeholder
|
|
4683
|
+
}, null, 8, ["modelValue", "label", "multiline", "placeholder"]));
|
|
4508
4684
|
};
|
|
4509
4685
|
}
|
|
4510
4686
|
});
|
|
4511
|
-
const _hoisted_1$
|
|
4512
|
-
const _sfc_main$
|
|
4687
|
+
const _hoisted_1$6 = { key: 2 };
|
|
4688
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
4513
4689
|
__name: "BlocksEditor",
|
|
4514
4690
|
props: {
|
|
4515
4691
|
blocksList: {},
|
|
@@ -4579,24 +4755,24 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4579
4755
|
}, ["stop"]))
|
|
4580
4756
|
}, [
|
|
4581
4757
|
renderSlot(_ctx.$slots, "default"),
|
|
4582
|
-
createVNode(_sfc_main$
|
|
4758
|
+
createVNode(_sfc_main$G, {
|
|
4583
4759
|
modelValue: currentTab.value,
|
|
4584
4760
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentTab.value = $event),
|
|
4585
4761
|
items: tabs.value
|
|
4586
4762
|
}, null, 8, ["modelValue", "items"]),
|
|
4587
|
-
createVNode(_sfc_main$
|
|
4763
|
+
createVNode(_sfc_main$F, { page: currentTab.value }, {
|
|
4588
4764
|
blocks: withCtx(() => [
|
|
4589
|
-
createVNode(_sfc_main$
|
|
4765
|
+
createVNode(_sfc_main$H, { blocks: _ctx.blocksList }, null, 8, ["blocks"])
|
|
4590
4766
|
]),
|
|
4591
4767
|
blockEdit: withCtx(() => [
|
|
4592
|
-
currentBlock.value && currentContentBlock.value ? (openBlock(), createBlock(_sfc_main$
|
|
4768
|
+
currentBlock.value && currentContentBlock.value ? (openBlock(), createBlock(_sfc_main$b, {
|
|
4593
4769
|
key: currentContentBlock.value.id,
|
|
4594
4770
|
schema: currentBlock.value.props,
|
|
4595
4771
|
modelValue: currentContentBlock.value.data,
|
|
4596
4772
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => currentContentBlock.value.data = $event),
|
|
4597
4773
|
flat: ""
|
|
4598
4774
|
}, null, 8, ["schema", "modelValue"])) : currentDataEntry.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4599
|
-
props.dataEntryScopes ? (openBlock(), createBlock(_sfc_main$
|
|
4775
|
+
props.dataEntryScopes ? (openBlock(), createBlock(_sfc_main$y, {
|
|
4600
4776
|
key: 0,
|
|
4601
4777
|
modelValue: props.dataEntryScopes[currentDataEntry.value.id],
|
|
4602
4778
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => props.dataEntryScopes[currentDataEntry.value.id] = $event),
|
|
@@ -4604,14 +4780,14 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4604
4780
|
label: "Применить настройки",
|
|
4605
4781
|
items: settingSelectItems
|
|
4606
4782
|
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
4607
|
-
(openBlock(), createBlock(_sfc_main$
|
|
4783
|
+
(openBlock(), createBlock(_sfc_main$b, {
|
|
4608
4784
|
key: currentDataEntry.value.id,
|
|
4609
4785
|
schema: currentDataEntry.value.props,
|
|
4610
4786
|
modelValue: _ctx.state.data[currentDataEntry.value.id],
|
|
4611
4787
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.state.data[currentDataEntry.value.id] = $event),
|
|
4612
4788
|
flat: ""
|
|
4613
4789
|
}, null, 8, ["schema", "modelValue"]))
|
|
4614
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4790
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$6, "Схема для блока не найдена"))
|
|
4615
4791
|
]),
|
|
4616
4792
|
_: 1
|
|
4617
4793
|
}, 8, ["page"])
|
|
@@ -4619,9 +4795,9 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
4619
4795
|
};
|
|
4620
4796
|
}
|
|
4621
4797
|
});
|
|
4622
|
-
const _hoisted_1$
|
|
4623
|
-
const _hoisted_2$
|
|
4624
|
-
const _sfc_main$
|
|
4798
|
+
const _hoisted_1$5 = ["onBlockdrop", "onMousedown", "onMouseenter", "onClick", "onContextmenu"];
|
|
4799
|
+
const _hoisted_2$2 = ["onBlockdrop"];
|
|
4800
|
+
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
4625
4801
|
__name: "ContentHierarchy",
|
|
4626
4802
|
props: {
|
|
4627
4803
|
contentBlocks: {},
|
|
@@ -4855,48 +5031,21 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
4855
5031
|
onMouseleave: _cache[0] || (_cache[0] = ($event) => emit("update:hoverBlockId", null)),
|
|
4856
5032
|
onClick: ($event) => emit("update:activeBlockId", item.content.id),
|
|
4857
5033
|
onContextmenu: withModifiers(($event) => unref(contextMenu).open($event, item.content), ["stop"])
|
|
4858
|
-
}, toDisplayString(item.block.name), 47, _hoisted_1$
|
|
5034
|
+
}, toDisplayString(item.block.name), 47, _hoisted_1$5);
|
|
4859
5035
|
}), 256)),
|
|
4860
5036
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(places), (item) => {
|
|
4861
5037
|
return openBlock(), createElementBlock("div", {
|
|
4862
5038
|
class: "page-editor-hierarhy__place",
|
|
4863
5039
|
style: normalizeStyle(item.style),
|
|
4864
5040
|
onBlockdrop: ($event) => onPlaceBlockDrop($event, item.index)
|
|
4865
|
-
}, null, 44, _hoisted_2$
|
|
5041
|
+
}, null, 44, _hoisted_2$2);
|
|
4866
5042
|
}), 256)),
|
|
4867
|
-
createVNode(_sfc_main$
|
|
5043
|
+
createVNode(_sfc_main$t, normalizeProps(guardReactiveProps(unref(contextMenu).props)), null, 16)
|
|
4868
5044
|
], 512);
|
|
4869
5045
|
};
|
|
4870
5046
|
}
|
|
4871
5047
|
});
|
|
4872
|
-
const
|
|
4873
|
-
const _hoisted_2 = ["onClick"];
|
|
4874
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
4875
|
-
__name: "ContentSettings",
|
|
4876
|
-
props: /* @__PURE__ */ mergeModels({
|
|
4877
|
-
dataEntries: {}
|
|
4878
|
-
}, {
|
|
4879
|
-
"modelValue": {},
|
|
4880
|
-
"modelModifiers": {}
|
|
4881
|
-
}),
|
|
4882
|
-
emits: ["update:modelValue"],
|
|
4883
|
-
setup(__props) {
|
|
4884
|
-
const props = __props;
|
|
4885
|
-
const model = useModel(__props, "modelValue");
|
|
4886
|
-
return (_ctx, _cache) => {
|
|
4887
|
-
return props.dataEntries.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
|
|
4888
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(props.dataEntries, (item) => {
|
|
4889
|
-
var _a;
|
|
4890
|
-
return openBlock(), createElementBlock("div", {
|
|
4891
|
-
class: normalizeClass(["page-editor-hierarchy__item", { active: ((_a = model.value) == null ? void 0 : _a.slice(5)) === item.id }]),
|
|
4892
|
-
onClick: ($event) => model.value = "data:" + item.id
|
|
4893
|
-
}, toDisplayString(item.title ?? item.id), 11, _hoisted_2);
|
|
4894
|
-
}), 256))
|
|
4895
|
-
])) : createCommentVNode("", true);
|
|
4896
|
-
};
|
|
4897
|
-
}
|
|
4898
|
-
});
|
|
4899
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
5048
|
+
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
4900
5049
|
__name: "HierarchySidebar",
|
|
4901
5050
|
props: {
|
|
4902
5051
|
state: {},
|
|
@@ -4909,22 +5058,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
4909
5058
|
return (_ctx, _cache) => {
|
|
4910
5059
|
return openBlock(), createElementBlock("div", {
|
|
4911
5060
|
class: "editor-hierarchy",
|
|
4912
|
-
onBlockdrop: _cache[
|
|
5061
|
+
onBlockdrop: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
4913
5062
|
}, ["stop"]))
|
|
4914
5063
|
}, [
|
|
4915
5064
|
renderSlot(_ctx.$slots, "default"),
|
|
4916
|
-
_cache[
|
|
4917
|
-
createVNode(_sfc_main$
|
|
4918
|
-
modelValue: props.control.activeBlockId.value,
|
|
4919
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => props.control.activeBlockId.value = $event),
|
|
4920
|
-
dataEntries: props.dataEntries
|
|
4921
|
-
}, null, 8, ["modelValue", "dataEntries"]),
|
|
4922
|
-
_cache[5] || (_cache[5] = createElementVNode("div", { class: "title" }, "Блоки", -1)),
|
|
4923
|
-
createVNode(_sfc_main$4, {
|
|
5065
|
+
_cache[3] || (_cache[3] = createElementVNode("div", { class: "title" }, "Блоки", -1)),
|
|
5066
|
+
createVNode(_sfc_main$9, {
|
|
4924
5067
|
"hover-block-id": props.control.hoverBlockId.value,
|
|
4925
|
-
"onUpdate:hoverBlockId": _cache[
|
|
5068
|
+
"onUpdate:hoverBlockId": _cache[0] || (_cache[0] = ($event) => props.control.hoverBlockId.value = $event),
|
|
4926
5069
|
"active-block-id": props.control.activeBlockId.value,
|
|
4927
|
-
"onUpdate:activeBlockId": _cache[
|
|
5070
|
+
"onUpdate:activeBlockId": _cache[1] || (_cache[1] = ($event) => props.control.activeBlockId.value = $event),
|
|
4928
5071
|
"content-blocks": props.state.content,
|
|
4929
5072
|
"blocks-map": props.blocksMap
|
|
4930
5073
|
}, null, 8, ["hover-block-id", "active-block-id", "content-blocks", "blocks-map"])
|
|
@@ -5088,6 +5231,473 @@ const useControlComponent = (_activeBlockId) => {
|
|
|
5088
5231
|
onScroll
|
|
5089
5232
|
};
|
|
5090
5233
|
};
|
|
5234
|
+
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
5235
|
+
__name: "FormColumn",
|
|
5236
|
+
props: {
|
|
5237
|
+
spacing: {},
|
|
5238
|
+
size: {}
|
|
5239
|
+
},
|
|
5240
|
+
setup(__props) {
|
|
5241
|
+
const props = __props;
|
|
5242
|
+
return (_ctx, _cache) => {
|
|
5243
|
+
return openBlock(), createElementBlock("div", {
|
|
5244
|
+
class: normalizeClass(["form-column", [
|
|
5245
|
+
props.spacing ? `spacing-${props.spacing}` : void 0,
|
|
5246
|
+
props.size ? `size-${props.size}` : void 0
|
|
5247
|
+
]])
|
|
5248
|
+
}, [
|
|
5249
|
+
renderSlot(_ctx.$slots, "default")
|
|
5250
|
+
], 2);
|
|
5251
|
+
};
|
|
5252
|
+
}
|
|
5253
|
+
});
|
|
5254
|
+
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
5255
|
+
__name: "CreatePageDialog",
|
|
5256
|
+
props: {
|
|
5257
|
+
folders: {},
|
|
5258
|
+
folderId: {},
|
|
5259
|
+
item: {},
|
|
5260
|
+
onCreate: { type: Function }
|
|
5261
|
+
},
|
|
5262
|
+
setup(__props) {
|
|
5263
|
+
const props = __props;
|
|
5264
|
+
const { register, handleSubmit, pending, values, updateDefaultValues } = useForm({
|
|
5265
|
+
name: "",
|
|
5266
|
+
path: "/",
|
|
5267
|
+
folderId: props.folderId ?? null
|
|
5268
|
+
});
|
|
5269
|
+
if (props.item) {
|
|
5270
|
+
updateDefaultValues(props.item);
|
|
5271
|
+
}
|
|
5272
|
+
const folders = computed(() => {
|
|
5273
|
+
const arr = props.folders ? props.folders.map((item) => ({ id: item.id, title: item.name })) : [];
|
|
5274
|
+
return arr;
|
|
5275
|
+
});
|
|
5276
|
+
const currentFoler = computed(() => {
|
|
5277
|
+
if (!values.folderId) return null;
|
|
5278
|
+
return props.folders.find((item) => item.id === values.folderId);
|
|
5279
|
+
});
|
|
5280
|
+
const dialog = useDialog();
|
|
5281
|
+
const apply = handleSubmit(async (values2) => {
|
|
5282
|
+
await props.onCreate(values2);
|
|
5283
|
+
dialog.close();
|
|
5284
|
+
});
|
|
5285
|
+
return (_ctx, _cache) => {
|
|
5286
|
+
return openBlock(), createBlock(_sfc_main$r, { style: { "width": "500px" } }, {
|
|
5287
|
+
header: withCtx(() => [
|
|
5288
|
+
createTextVNode(toDisplayString(props.item ? "Редактировать" : "Создать") + " страницу", 1)
|
|
5289
|
+
]),
|
|
5290
|
+
actions: withCtx(() => [
|
|
5291
|
+
createVNode(_sfc_main$u, {
|
|
5292
|
+
disabled: unref(pending),
|
|
5293
|
+
large: "",
|
|
5294
|
+
onClick: unref(apply)
|
|
5295
|
+
}, {
|
|
5296
|
+
default: withCtx(() => [
|
|
5297
|
+
createTextVNode(toDisplayString(props.item ? "Сохранить" : "Создать"), 1)
|
|
5298
|
+
]),
|
|
5299
|
+
_: 1
|
|
5300
|
+
}, 8, ["disabled", "onClick"])
|
|
5301
|
+
]),
|
|
5302
|
+
default: withCtx(() => [
|
|
5303
|
+
createVNode(_sfc_main$7, null, {
|
|
5304
|
+
default: withCtx(() => {
|
|
5305
|
+
var _a;
|
|
5306
|
+
return [
|
|
5307
|
+
createVNode(_sfc_main$I, mergeProps(unref(register)("name"), {
|
|
5308
|
+
label: "Название страницы",
|
|
5309
|
+
autofocus: ""
|
|
5310
|
+
}), null, 16),
|
|
5311
|
+
createVNode(_sfc_main$I, mergeProps(unref(register)("path"), {
|
|
5312
|
+
prefix: (_a = currentFoler.value) == null ? void 0 : _a.path,
|
|
5313
|
+
label: "URL адрес"
|
|
5314
|
+
}), null, 16, ["prefix"]),
|
|
5315
|
+
folders.value.length > 0 ? (openBlock(), createBlock(_sfc_main$y, mergeProps({
|
|
5316
|
+
key: 0,
|
|
5317
|
+
nullable: ""
|
|
5318
|
+
}, unref(register)("folderId"), {
|
|
5319
|
+
items: folders.value,
|
|
5320
|
+
label: "Папка"
|
|
5321
|
+
}), null, 16, ["items"])) : createCommentVNode("", true)
|
|
5322
|
+
];
|
|
5323
|
+
}),
|
|
5324
|
+
_: 1
|
|
5325
|
+
})
|
|
5326
|
+
]),
|
|
5327
|
+
_: 1
|
|
5328
|
+
});
|
|
5329
|
+
};
|
|
5330
|
+
}
|
|
5331
|
+
});
|
|
5332
|
+
const _hoisted_1$4 = { class: "v-table__header" };
|
|
5333
|
+
const _hoisted_2$1 = { key: 0 };
|
|
5334
|
+
const _hoisted_3 = {
|
|
5335
|
+
key: 0,
|
|
5336
|
+
class: "v-table__group-label"
|
|
5337
|
+
};
|
|
5338
|
+
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
5339
|
+
__name: "VTable",
|
|
5340
|
+
props: /* @__PURE__ */ mergeModels({
|
|
5341
|
+
data: {},
|
|
5342
|
+
clickable: { type: Boolean },
|
|
5343
|
+
checkable: { type: Boolean },
|
|
5344
|
+
to: { type: Function },
|
|
5345
|
+
useHref: { type: Boolean },
|
|
5346
|
+
groupBy: {},
|
|
5347
|
+
columns: {}
|
|
5348
|
+
}, {
|
|
5349
|
+
"modelValue": { default: /* @__PURE__ */ new Set() },
|
|
5350
|
+
"modelModifiers": {}
|
|
5351
|
+
}),
|
|
5352
|
+
emits: /* @__PURE__ */ mergeModels(["itemclick", "itemcontext"], ["update:modelValue"]),
|
|
5353
|
+
setup(__props, { emit: __emit }) {
|
|
5354
|
+
const props = __props;
|
|
5355
|
+
const emit = __emit;
|
|
5356
|
+
const modelValue = useModel(__props, "modelValue");
|
|
5357
|
+
const is = (item) => {
|
|
5358
|
+
var _a;
|
|
5359
|
+
const to = (_a = props.to) == null ? void 0 : _a.call(props, item);
|
|
5360
|
+
if (to) {
|
|
5361
|
+
return props.useHref ? "a" : "router-link";
|
|
5362
|
+
}
|
|
5363
|
+
if (props.clickable) return "button";
|
|
5364
|
+
return "div";
|
|
5365
|
+
};
|
|
5366
|
+
const bind = (item) => {
|
|
5367
|
+
var _a;
|
|
5368
|
+
const to = (_a = props.to) == null ? void 0 : _a.call(props, item);
|
|
5369
|
+
if (to) {
|
|
5370
|
+
return props.useHref ? { href: to } : { to };
|
|
5371
|
+
} else {
|
|
5372
|
+
return {};
|
|
5373
|
+
}
|
|
5374
|
+
};
|
|
5375
|
+
const gridStyle = computed(() => {
|
|
5376
|
+
const arr = Object.values(props.columns).map((item) => item.width ?? "1fr");
|
|
5377
|
+
if (props.checkable) {
|
|
5378
|
+
arr.unshift("52px");
|
|
5379
|
+
}
|
|
5380
|
+
return {
|
|
5381
|
+
gridTemplateColumns: arr.join(" ")
|
|
5382
|
+
};
|
|
5383
|
+
});
|
|
5384
|
+
const checkboxClick = (e) => {
|
|
5385
|
+
var _a;
|
|
5386
|
+
if (e.target === e.currentTarget) {
|
|
5387
|
+
(_a = e.target.querySelector(".v-checkbox")) == null ? void 0 : _a.dispatchEvent(new MouseEvent("click"));
|
|
5388
|
+
}
|
|
5389
|
+
};
|
|
5390
|
+
return (_ctx, _cache) => {
|
|
5391
|
+
return openBlock(), createElementBlock("div", {
|
|
5392
|
+
class: "v-table",
|
|
5393
|
+
style: normalizeStyle(gridStyle.value)
|
|
5394
|
+
}, [
|
|
5395
|
+
createElementVNode("div", _hoisted_1$4, [
|
|
5396
|
+
props.checkable ? (openBlock(), createElementBlock("div", _hoisted_2$1)) : createCommentVNode("", true),
|
|
5397
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (item) => {
|
|
5398
|
+
return openBlock(), createElementBlock("div", null, toDisplayString(item.title), 1);
|
|
5399
|
+
}), 256))
|
|
5400
|
+
]),
|
|
5401
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.data, (item, index) => {
|
|
5402
|
+
var _a;
|
|
5403
|
+
return openBlock(), createBlock(resolveDynamicComponent(is(item)), mergeProps({ key: index }, { ref_for: true }, bind(item), {
|
|
5404
|
+
class: ["v-table__row", { hasGroup: props.groupBy && item[props.groupBy] && item[props.groupBy] !== ((_a = _ctx.data[index - 1]) == null ? void 0 : _a[props.groupBy]) }],
|
|
5405
|
+
onClick: ($event) => emit("itemclick", item),
|
|
5406
|
+
onContextmenu: ($event) => emit("itemcontext", $event, item)
|
|
5407
|
+
}), {
|
|
5408
|
+
default: withCtx(() => {
|
|
5409
|
+
var _a2;
|
|
5410
|
+
return [
|
|
5411
|
+
props.groupBy && item[props.groupBy] && item[props.groupBy] !== ((_a2 = _ctx.data[index - 1]) == null ? void 0 : _a2[props.groupBy]) ? (openBlock(), createElementBlock("div", _hoisted_3, " Папка " + toDisplayString(item[props.groupBy]), 1)) : createCommentVNode("", true),
|
|
5412
|
+
props.checkable ? (openBlock(), createElementBlock("div", {
|
|
5413
|
+
key: 1,
|
|
5414
|
+
class: "v-table__check",
|
|
5415
|
+
onClick: withModifiers(checkboxClick, ["prevent", "stop"])
|
|
5416
|
+
}, [
|
|
5417
|
+
createVNode(_sfc_main$n, {
|
|
5418
|
+
modelValue: modelValue.value.has(item),
|
|
5419
|
+
"onUpdate:modelValue": ($event) => modelValue.value.has(item) ? modelValue.value.delete(item) : modelValue.value.add(item)
|
|
5420
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
5421
|
+
])) : createCommentVNode("", true),
|
|
5422
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.columns, (column, key) => {
|
|
5423
|
+
return openBlock(), createElementBlock("div", {
|
|
5424
|
+
key,
|
|
5425
|
+
class: normalizeClass(column.class)
|
|
5426
|
+
}, [
|
|
5427
|
+
renderSlot(_ctx.$slots, key, {
|
|
5428
|
+
item,
|
|
5429
|
+
cell: item[key]
|
|
5430
|
+
}, () => [
|
|
5431
|
+
createTextVNode(toDisplayString(column.map ? column.map(item) : item[key]), 1)
|
|
5432
|
+
])
|
|
5433
|
+
], 2);
|
|
5434
|
+
}), 128))
|
|
5435
|
+
];
|
|
5436
|
+
}),
|
|
5437
|
+
_: 2
|
|
5438
|
+
}, 1040, ["class", "onClick", "onContextmenu"]);
|
|
5439
|
+
}), 128))
|
|
5440
|
+
], 4);
|
|
5441
|
+
};
|
|
5442
|
+
}
|
|
5443
|
+
});
|
|
5444
|
+
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
5445
|
+
__name: "OpenPageDialog",
|
|
5446
|
+
setup(__props) {
|
|
5447
|
+
const pagesRequest = inject("pagesRequest");
|
|
5448
|
+
const { data } = useRequest(pagesRequest);
|
|
5449
|
+
const columns = {
|
|
5450
|
+
name: { title: "Название страницы" },
|
|
5451
|
+
path: { title: "Путь" }
|
|
5452
|
+
};
|
|
5453
|
+
return (_ctx, _cache) => {
|
|
5454
|
+
return openBlock(), createBlock(_sfc_main$r, { class: "standart" }, {
|
|
5455
|
+
header: withCtx(() => _cache[0] || (_cache[0] = [
|
|
5456
|
+
createTextVNode(" Страницы проекта ")
|
|
5457
|
+
])),
|
|
5458
|
+
default: withCtx(() => [
|
|
5459
|
+
unref(data) ? (openBlock(), createBlock(_sfc_main$5, {
|
|
5460
|
+
key: 0,
|
|
5461
|
+
data: unref(data),
|
|
5462
|
+
columns,
|
|
5463
|
+
"group-by": "folderPath",
|
|
5464
|
+
class: "open-page-dialog__table",
|
|
5465
|
+
useHref: "",
|
|
5466
|
+
to: (item) => item.path
|
|
5467
|
+
}, null, 8, ["data", "to"])) : createCommentVNode("", true)
|
|
5468
|
+
]),
|
|
5469
|
+
_: 1
|
|
5470
|
+
});
|
|
5471
|
+
};
|
|
5472
|
+
}
|
|
5473
|
+
});
|
|
5474
|
+
const _hoisted_1$3 = { class: "form-row" };
|
|
5475
|
+
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
5476
|
+
__name: "PageSettingsDialog",
|
|
5477
|
+
props: {
|
|
5478
|
+
page: {},
|
|
5479
|
+
onConfirm: { type: Function }
|
|
5480
|
+
},
|
|
5481
|
+
setup(__props) {
|
|
5482
|
+
const props = __props;
|
|
5483
|
+
const { register, handleSubmit } = useForm({
|
|
5484
|
+
name: props.page.name,
|
|
5485
|
+
path: props.page.path
|
|
5486
|
+
// title: props.page.meta?.title ?? "",
|
|
5487
|
+
// description: props.page.meta?.description ?? "",
|
|
5488
|
+
});
|
|
5489
|
+
const dataEntries2 = inject("dataEntries");
|
|
5490
|
+
const currentTab = shallowRef("_main");
|
|
5491
|
+
const tabs = computed(() => {
|
|
5492
|
+
return [
|
|
5493
|
+
{ id: "_main", title: "Основное" },
|
|
5494
|
+
...dataEntries2.map((item) => ({ id: item.id, title: item.title ?? item.id, order: item.order ?? 0, props: item.props })).sort((a, b) => a.order - b.order)
|
|
5495
|
+
];
|
|
5496
|
+
});
|
|
5497
|
+
const state = inject("state");
|
|
5498
|
+
const onEdit = (key) => {
|
|
5499
|
+
if (!state.dataEntryScopes[currentTab.value]) {
|
|
5500
|
+
state.dataEntryScopes[currentTab.value] = "page";
|
|
5501
|
+
}
|
|
5502
|
+
};
|
|
5503
|
+
const dialog = useDialog();
|
|
5504
|
+
const apply = handleSubmit(async (values) => {
|
|
5505
|
+
await props.onConfirm(values);
|
|
5506
|
+
dialog.close();
|
|
5507
|
+
});
|
|
5508
|
+
return (_ctx, _cache) => {
|
|
5509
|
+
return openBlock(), createBlock(_sfc_main$r, { class: "standart" }, {
|
|
5510
|
+
header: withCtx(() => _cache[1] || (_cache[1] = [
|
|
5511
|
+
createTextVNode("Настройки страницы")
|
|
5512
|
+
])),
|
|
5513
|
+
actions: withCtx(() => [
|
|
5514
|
+
createVNode(_sfc_main$u, {
|
|
5515
|
+
large: "",
|
|
5516
|
+
onClick: unref(apply)
|
|
5517
|
+
}, {
|
|
5518
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
5519
|
+
createTextVNode("Сохранить")
|
|
5520
|
+
])),
|
|
5521
|
+
_: 1,
|
|
5522
|
+
__: [2]
|
|
5523
|
+
}, 8, ["onClick"])
|
|
5524
|
+
]),
|
|
5525
|
+
default: withCtx(() => [
|
|
5526
|
+
createVNode(_sfc_main$G, {
|
|
5527
|
+
modelValue: currentTab.value,
|
|
5528
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentTab.value = $event),
|
|
5529
|
+
items: tabs.value,
|
|
5530
|
+
style: { "margin-bottom": "12px" }
|
|
5531
|
+
}, null, 8, ["modelValue", "items"]),
|
|
5532
|
+
createVNode(_sfc_main$F, { page: currentTab.value }, createSlots({
|
|
5533
|
+
_main: withCtx(() => [
|
|
5534
|
+
createVNode(_sfc_main$7, null, {
|
|
5535
|
+
default: withCtx(() => [
|
|
5536
|
+
createElementVNode("div", _hoisted_1$3, [
|
|
5537
|
+
createVNode(_sfc_main$I, mergeProps(unref(register)("name"), { label: "Название страницы" }), null, 16),
|
|
5538
|
+
createVNode(_sfc_main$I, mergeProps(unref(register)("path"), { label: "Путь к странице" }), null, 16)
|
|
5539
|
+
])
|
|
5540
|
+
]),
|
|
5541
|
+
_: 1
|
|
5542
|
+
})
|
|
5543
|
+
]),
|
|
5544
|
+
_: 2
|
|
5545
|
+
}, [
|
|
5546
|
+
renderList(tabs.value.slice(1), (tab) => {
|
|
5547
|
+
return {
|
|
5548
|
+
name: tab.id,
|
|
5549
|
+
fn: withCtx(() => [
|
|
5550
|
+
createVNode(_sfc_main$b, {
|
|
5551
|
+
schema: tab.props,
|
|
5552
|
+
modelValue: unref(state).data[tab.id],
|
|
5553
|
+
"onUpdate:modelValue": ($event) => unref(state).data[tab.id] = $event,
|
|
5554
|
+
flat: "",
|
|
5555
|
+
onEdit
|
|
5556
|
+
}, null, 8, ["schema", "modelValue", "onUpdate:modelValue"])
|
|
5557
|
+
])
|
|
5558
|
+
};
|
|
5559
|
+
})
|
|
5560
|
+
]), 1032, ["page"])
|
|
5561
|
+
]),
|
|
5562
|
+
_: 1
|
|
5563
|
+
});
|
|
5564
|
+
};
|
|
5565
|
+
}
|
|
5566
|
+
});
|
|
5567
|
+
const _sfc_main$2 = {};
|
|
5568
|
+
const _hoisted_1$2 = {
|
|
5569
|
+
width: "24",
|
|
5570
|
+
height: "24",
|
|
5571
|
+
viewBox: "0 0 24 24",
|
|
5572
|
+
fill: "none",
|
|
5573
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
5574
|
+
};
|
|
5575
|
+
function _sfc_render(_ctx, _cache) {
|
|
5576
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$2, _cache[0] || (_cache[0] = [
|
|
5577
|
+
createElementVNode("path", {
|
|
5578
|
+
d: "M8 15L12 19L16 15M16 9L12 5L8 9",
|
|
5579
|
+
stroke: "currentColor",
|
|
5580
|
+
"stroke-width": "2",
|
|
5581
|
+
"stroke-linecap": "round",
|
|
5582
|
+
"stroke-linejoin": "round"
|
|
5583
|
+
}, null, -1)
|
|
5584
|
+
]));
|
|
5585
|
+
}
|
|
5586
|
+
const SortIcon = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render]]);
|
|
5587
|
+
class HTTPError extends Error {
|
|
5588
|
+
constructor(body, statusCode = 401) {
|
|
5589
|
+
super();
|
|
5590
|
+
__publicField(this, "body");
|
|
5591
|
+
__publicField(this, "statusCode");
|
|
5592
|
+
this.body = body;
|
|
5593
|
+
this.statusCode = statusCode;
|
|
5594
|
+
}
|
|
5595
|
+
}
|
|
5596
|
+
setUseFormErrorHandler((e, errors) => {
|
|
5597
|
+
var _a;
|
|
5598
|
+
if (e instanceof HTTPError && typeof ((_a = e.body) == null ? void 0 : _a.error) === "object") {
|
|
5599
|
+
for (let [key, error] of Object.entries(e.body.error)) {
|
|
5600
|
+
if (typeof error === "string") {
|
|
5601
|
+
errors[key] = error;
|
|
5602
|
+
} else if (typeof error === "object" && error) {
|
|
5603
|
+
errors[key] = error;
|
|
5604
|
+
}
|
|
5605
|
+
}
|
|
5606
|
+
} else {
|
|
5607
|
+
errors["_global"] = e.body ?? "Error";
|
|
5608
|
+
}
|
|
5609
|
+
});
|
|
5610
|
+
const request = async (url, body, options = {}) => {
|
|
5611
|
+
var _a, _b;
|
|
5612
|
+
const headers = {};
|
|
5613
|
+
if (body && !(body instanceof FormData)) {
|
|
5614
|
+
headers["Content-Type"] = "application/json";
|
|
5615
|
+
}
|
|
5616
|
+
const resp = await fetch(url, {
|
|
5617
|
+
method: options.method || (body ? "POST" : "GET"),
|
|
5618
|
+
body: !body || body instanceof FormData || typeof body === "string" ? body : JSON.stringify(body),
|
|
5619
|
+
headers
|
|
5620
|
+
});
|
|
5621
|
+
let response = null;
|
|
5622
|
+
if ((_a = resp.headers.get("content-type")) == null ? void 0 : _a.startsWith("application/json")) {
|
|
5623
|
+
response = await resp.json();
|
|
5624
|
+
}
|
|
5625
|
+
if ((_b = resp.headers.get("content-type")) == null ? void 0 : _b.startsWith("text/plain")) {
|
|
5626
|
+
response = await resp.text();
|
|
5627
|
+
}
|
|
5628
|
+
if (resp.status >= 400) {
|
|
5629
|
+
throw new HTTPError(response, resp.status);
|
|
5630
|
+
}
|
|
5631
|
+
if (options.responseContentType === "blob") {
|
|
5632
|
+
response = await resp.blob();
|
|
5633
|
+
}
|
|
5634
|
+
return response;
|
|
5635
|
+
};
|
|
5636
|
+
const _hoisted_1$1 = ["onClick"];
|
|
5637
|
+
const _hoisted_2 = { class: "pages-selector__title" };
|
|
5638
|
+
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
5639
|
+
...{
|
|
5640
|
+
inheritAttrs: false
|
|
5641
|
+
},
|
|
5642
|
+
__name: "PageSelector",
|
|
5643
|
+
props: {
|
|
5644
|
+
state: {}
|
|
5645
|
+
},
|
|
5646
|
+
setup(__props) {
|
|
5647
|
+
const props = __props;
|
|
5648
|
+
const pagesRequest = inject("pagesRequest");
|
|
5649
|
+
const foldersRequest = inject("foldersRequest");
|
|
5650
|
+
useRequest(pagesRequest);
|
|
5651
|
+
const { data: folders } = useRequest(foldersRequest);
|
|
5652
|
+
const currentPage = computed(() => {
|
|
5653
|
+
return props.state.currentPage;
|
|
5654
|
+
});
|
|
5655
|
+
const dialog = useDialog();
|
|
5656
|
+
const createNewPage = () => {
|
|
5657
|
+
dialog.open(_sfc_main$6, { folders: folders.value, onCreate: async (values) => {
|
|
5658
|
+
await request("/@mechanica/pages", values);
|
|
5659
|
+
mutateRequest(pagesRequest);
|
|
5660
|
+
} });
|
|
5661
|
+
};
|
|
5662
|
+
const openPage = () => {
|
|
5663
|
+
dialog.open(_sfc_main$4);
|
|
5664
|
+
};
|
|
5665
|
+
const openPageSettingsDialog = () => {
|
|
5666
|
+
dialog.open(_sfc_main$3, { page: props.state.currentPage, onConfirm: async (values) => {
|
|
5667
|
+
await request(`/@mechanica/pages?path=${encodeURIComponent(props.state.currentPage.path)}`, values);
|
|
5668
|
+
props.state.currentPage.name = values.name;
|
|
5669
|
+
} });
|
|
5670
|
+
};
|
|
5671
|
+
const menuItems = computed(() => [
|
|
5672
|
+
{ title: "Настройки страницы", onClick: openPageSettingsDialog },
|
|
5673
|
+
{ title: "Открыть страницу...", onClick: openPage },
|
|
5674
|
+
{ title: "Новая страница...", onClick: createNewPage }
|
|
5675
|
+
]);
|
|
5676
|
+
return (_ctx, _cache) => {
|
|
5677
|
+
return openBlock(), createBlock(_sfc_main$t, {
|
|
5678
|
+
placement: "bottom",
|
|
5679
|
+
fitAnchor: "",
|
|
5680
|
+
offset: 4,
|
|
5681
|
+
items: menuItems.value
|
|
5682
|
+
}, {
|
|
5683
|
+
activator: withCtx(({ props: props2 }) => {
|
|
5684
|
+
var _a;
|
|
5685
|
+
return [
|
|
5686
|
+
createElementVNode("button", mergeProps(_ctx.$attrs, {
|
|
5687
|
+
class: "pages-selector",
|
|
5688
|
+
onClick: props2.onClick
|
|
5689
|
+
}), [
|
|
5690
|
+
createElementVNode("div", _hoisted_2, toDisplayString((_a = currentPage.value) == null ? void 0 : _a.name), 1),
|
|
5691
|
+
_cache[0] || (_cache[0] = createElementVNode("div", { class: "pages-selector__subtitle" }, "Текущая страница", -1)),
|
|
5692
|
+
createVNode(SortIcon)
|
|
5693
|
+
], 16, _hoisted_1$1)
|
|
5694
|
+
];
|
|
5695
|
+
}),
|
|
5696
|
+
_: 1
|
|
5697
|
+
}, 8, ["items"]);
|
|
5698
|
+
};
|
|
5699
|
+
}
|
|
5700
|
+
});
|
|
5091
5701
|
registerAliases();
|
|
5092
5702
|
const blocksList = shallowRef(blocksList$1.map((file) => ({
|
|
5093
5703
|
...file.blockSchema,
|
|
@@ -5110,34 +5720,6 @@ const processState = (state) => {
|
|
|
5110
5720
|
processBlocks(state.content, blocksMap.value);
|
|
5111
5721
|
return state;
|
|
5112
5722
|
};
|
|
5113
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
5114
|
-
__name: "PageSelector",
|
|
5115
|
-
setup(__props) {
|
|
5116
|
-
const pagesRequest = inject("pagesRequest");
|
|
5117
|
-
const { data } = useRequest(pagesRequest);
|
|
5118
|
-
const currentPage = ref();
|
|
5119
|
-
const pages = computed(() => {
|
|
5120
|
-
return data.value ?? [];
|
|
5121
|
-
});
|
|
5122
|
-
watch(currentPage, async (newPage) => {
|
|
5123
|
-
var _a;
|
|
5124
|
-
const resp = await fetch(`/${newPage}`);
|
|
5125
|
-
const html = await resp.text();
|
|
5126
|
-
const _state = (_a = html.match(/window\.state=({.+})/)) == null ? void 0 : _a[1];
|
|
5127
|
-
const state = _state && JSON.parse(_state);
|
|
5128
|
-
processState(state);
|
|
5129
|
-
Object.assign(window.state, state);
|
|
5130
|
-
window.history.pushState({}, "", newPage === "index" ? "/" : `/${newPage}`);
|
|
5131
|
-
});
|
|
5132
|
-
return (_ctx, _cache) => {
|
|
5133
|
-
return openBlock(), createBlock(_sfc_main$t, {
|
|
5134
|
-
modelValue: currentPage.value,
|
|
5135
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentPage.value = $event),
|
|
5136
|
-
items: pages.value
|
|
5137
|
-
}, null, 8, ["modelValue", "items"]);
|
|
5138
|
-
};
|
|
5139
|
-
}
|
|
5140
|
-
});
|
|
5141
5723
|
const _hoisted_1 = { class: "editor-hierarchy__header" };
|
|
5142
5724
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5143
5725
|
__name: "EditorApp",
|
|
@@ -5146,6 +5728,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5146
5728
|
const dragMode = ref(false);
|
|
5147
5729
|
provide("dragMode", dragMode);
|
|
5148
5730
|
const state = reactive(processState(JSON.parse(JSON.stringify(window.state))));
|
|
5731
|
+
provide("state", state);
|
|
5149
5732
|
const contentBlocks = computed(() => state.content);
|
|
5150
5733
|
useEventListener$1(document, "blockdrop", (e) => {
|
|
5151
5734
|
var _a;
|
|
@@ -5173,14 +5756,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5173
5756
|
}
|
|
5174
5757
|
const state2 = cloneDeep(newState);
|
|
5175
5758
|
const scopedData = splitData(state2.data, dataEntryScopes.value);
|
|
5176
|
-
console.log(state2.data);
|
|
5177
5759
|
state2.data = scopedData["page"];
|
|
5178
5760
|
saveBlocks(state2.content, blocksMap.value);
|
|
5179
|
-
|
|
5180
|
-
method: "POST",
|
|
5181
|
-
body: JSON.stringify(state2),
|
|
5182
|
-
headers: { "content-type": "application-json" }
|
|
5183
|
-
});
|
|
5761
|
+
request(`/@mechanica/save?path=${window.location.pathname}`, state2);
|
|
5184
5762
|
}, { debounce: 500 });
|
|
5185
5763
|
provide("fileUploader", async (file) => {
|
|
5186
5764
|
const resp = await fetch("/@mechanica/upload", {
|
|
@@ -5192,12 +5770,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5192
5770
|
return obj;
|
|
5193
5771
|
});
|
|
5194
5772
|
provide("fileRequest", async () => {
|
|
5195
|
-
|
|
5196
|
-
return await resp.json();
|
|
5773
|
+
return await request("/@mechanica/images");
|
|
5197
5774
|
});
|
|
5198
5775
|
provide("pagesRequest", async () => {
|
|
5199
|
-
|
|
5200
|
-
|
|
5776
|
+
return await request("/@mechanica/pages");
|
|
5777
|
+
});
|
|
5778
|
+
provide("foldersRequest", async () => {
|
|
5779
|
+
return await request("/@mechanica/folders");
|
|
5201
5780
|
});
|
|
5202
5781
|
const dataEntries2 = inject("dataEntries");
|
|
5203
5782
|
const dataEntryScopes = ref(state.dataEntryScopes ?? {});
|
|
@@ -5214,7 +5793,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5214
5793
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
5215
5794
|
createVNode(Transition, null, {
|
|
5216
5795
|
default: withCtx(() => [
|
|
5217
|
-
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$
|
|
5796
|
+
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$8, {
|
|
5218
5797
|
key: 0,
|
|
5219
5798
|
control: unref(control),
|
|
5220
5799
|
state,
|
|
@@ -5224,7 +5803,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5224
5803
|
}, {
|
|
5225
5804
|
default: withCtx(() => [
|
|
5226
5805
|
createElementVNode("div", _hoisted_1, [
|
|
5227
|
-
createVNode(_sfc_main$1, {
|
|
5806
|
+
createVNode(_sfc_main$1, { state }, null, 8, ["state"])
|
|
5228
5807
|
]),
|
|
5229
5808
|
createElementVNode("button", {
|
|
5230
5809
|
class: "editor-sidebar__close-button",
|
|
@@ -5238,22 +5817,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5238
5817
|
]),
|
|
5239
5818
|
_: 1
|
|
5240
5819
|
}),
|
|
5241
|
-
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$
|
|
5820
|
+
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$N, {
|
|
5242
5821
|
key: 0,
|
|
5243
5822
|
element: unref(control).hoverBlockElement.value
|
|
5244
5823
|
}, null, 8, ["element"])) : createCommentVNode("", true),
|
|
5245
|
-
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$
|
|
5824
|
+
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$N, {
|
|
5246
5825
|
key: 1,
|
|
5247
5826
|
element: unref(control).activeBlockElement.value,
|
|
5248
5827
|
resizable: ""
|
|
5249
5828
|
}, null, 8, ["element"])) : createCommentVNode("", true),
|
|
5250
|
-
unref(control).insertedPlace.value ? (openBlock(), createBlock(_sfc_main$
|
|
5829
|
+
unref(control).insertedPlace.value ? (openBlock(), createBlock(_sfc_main$M, {
|
|
5251
5830
|
key: 2,
|
|
5252
5831
|
top: unref(control).insertedPlace.value.top
|
|
5253
5832
|
}, null, 8, ["top"])) : createCommentVNode("", true),
|
|
5254
5833
|
createVNode(Transition, null, {
|
|
5255
5834
|
default: withCtx(() => [
|
|
5256
|
-
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$
|
|
5835
|
+
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$a, {
|
|
5257
5836
|
key: 0,
|
|
5258
5837
|
class: "editor-sidebar-right editor-component",
|
|
5259
5838
|
onBlockdrop: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
@@ -5302,7 +5881,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5302
5881
|
]),
|
|
5303
5882
|
_: 1
|
|
5304
5883
|
}),
|
|
5305
|
-
createVNode(_sfc_main$
|
|
5884
|
+
createVNode(_sfc_main$s)
|
|
5306
5885
|
], 64);
|
|
5307
5886
|
};
|
|
5308
5887
|
}
|