mechanica 1.0.6 → 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 +328 -285
- package/dist/editor.js.map +1 -1
- package/dist/main.d.ts +18 -12
- package/dist/main.js +6 -1
- package/dist/main.js.map +1 -1
- package/dist/plugin.js +63 -12
- package/dist/plugin.js.map +1 -1
- package/dist/style.css +9 -3
- package/package.json +1 -1
package/dist/editor.js
CHANGED
|
@@ -5,7 +5,7 @@ import { defineComponent, ref, watch, createElementBlock, openBlock, normalizeSt
|
|
|
5
5
|
import { g as getDefaultValue, d as defaultImageSrc, r as registerAliases, p as passDefaultValue } from "./schemaAliases-jUlXWmB3.js";
|
|
6
6
|
import { blocksList as blocksList$1, addUpdateListener } from "virtual:builder-blocks";
|
|
7
7
|
import { unfoldSchema } from "compact-json-schema";
|
|
8
|
-
const _sfc_main$
|
|
8
|
+
const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "HoverFrame",
|
|
10
10
|
props: {
|
|
11
11
|
element: {},
|
|
@@ -47,7 +47,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
|
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
-
const _sfc_main$
|
|
50
|
+
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
51
51
|
__name: "InsertedPlace",
|
|
52
52
|
props: {
|
|
53
53
|
top: {}
|
|
@@ -68,8 +68,8 @@ const _export_sfc = (sfc, props) => {
|
|
|
68
68
|
}
|
|
69
69
|
return target;
|
|
70
70
|
};
|
|
71
|
-
const _sfc_main$
|
|
72
|
-
const _hoisted_1$
|
|
71
|
+
const _sfc_main$L = {};
|
|
72
|
+
const _hoisted_1$B = {
|
|
73
73
|
width: "16",
|
|
74
74
|
height: "16",
|
|
75
75
|
viewBox: "0 0 16 16",
|
|
@@ -77,16 +77,16 @@ const _hoisted_1$D = {
|
|
|
77
77
|
xmlns: "http://www.w3.org/2000/svg"
|
|
78
78
|
};
|
|
79
79
|
function _sfc_render$g(_ctx, _cache) {
|
|
80
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
80
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$B, _cache[0] || (_cache[0] = [
|
|
81
81
|
createElementVNode("path", {
|
|
82
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",
|
|
83
83
|
fill: "currentColor"
|
|
84
84
|
}, null, -1)
|
|
85
85
|
]));
|
|
86
86
|
}
|
|
87
|
-
const ChevronLeftIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
88
|
-
const _sfc_main$
|
|
89
|
-
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 = {
|
|
90
90
|
width: "16",
|
|
91
91
|
height: "16",
|
|
92
92
|
viewBox: "0 0 16 16",
|
|
@@ -94,14 +94,14 @@ const _hoisted_1$C = {
|
|
|
94
94
|
xmlns: "http://www.w3.org/2000/svg"
|
|
95
95
|
};
|
|
96
96
|
function _sfc_render$f(_ctx, _cache) {
|
|
97
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
97
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$A, _cache[0] || (_cache[0] = [
|
|
98
98
|
createElementVNode("path", {
|
|
99
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",
|
|
100
100
|
fill: "currentColor"
|
|
101
101
|
}, null, -1)
|
|
102
102
|
]));
|
|
103
103
|
}
|
|
104
|
-
const ChevronRightIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
104
|
+
const ChevronRightIcon = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$f]]);
|
|
105
105
|
const findParent$1 = (el, callback) => {
|
|
106
106
|
if (callback(el)) return el;
|
|
107
107
|
if (!el.parentElement) return null;
|
|
@@ -555,6 +555,12 @@ const useRequestExt = (options, request2, ...args) => {
|
|
|
555
555
|
return { data, error, pending, mutate, lazyMutate, setReturnData };
|
|
556
556
|
};
|
|
557
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
|
+
};
|
|
558
564
|
const makeRequestWithoutCache = async (entry, request2, ...args) => {
|
|
559
565
|
if (!entry.promise) {
|
|
560
566
|
const promise = (async () => {
|
|
@@ -636,11 +642,11 @@ class BlockDropEvent extends Event {
|
|
|
636
642
|
this.content = content;
|
|
637
643
|
}
|
|
638
644
|
}
|
|
639
|
-
const _hoisted_1$
|
|
645
|
+
const _hoisted_1$z = {
|
|
640
646
|
key: 0,
|
|
641
647
|
class: "v-form-control__label"
|
|
642
648
|
};
|
|
643
|
-
const _hoisted_2$
|
|
649
|
+
const _hoisted_2$b = {
|
|
644
650
|
key: 0,
|
|
645
651
|
class: "v-form-control__required-marker"
|
|
646
652
|
};
|
|
@@ -656,7 +662,7 @@ const _hoisted_5$2 = {
|
|
|
656
662
|
key: 0,
|
|
657
663
|
class: "v-form-control__error"
|
|
658
664
|
};
|
|
659
|
-
const _sfc_main$
|
|
665
|
+
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
660
666
|
__name: "VFormControl",
|
|
661
667
|
props: {
|
|
662
668
|
error: {},
|
|
@@ -681,9 +687,9 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
681
687
|
return openBlock(), createElementBlock("div", {
|
|
682
688
|
class: normalizeClass(["v-form-control", { error: !!props.error, disabled: props.disabled }])
|
|
683
689
|
}, [
|
|
684
|
-
!!props.label ? (openBlock(), createElementBlock("label", _hoisted_1$
|
|
690
|
+
!!props.label ? (openBlock(), createElementBlock("label", _hoisted_1$z, [
|
|
685
691
|
createTextVNode(toDisplayString(props.label), 1),
|
|
686
|
-
props.required ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
692
|
+
props.required ? (openBlock(), createElementBlock("span", _hoisted_2$b, "*")) : createCommentVNode("", true)
|
|
687
693
|
])) : createCommentVNode("", true),
|
|
688
694
|
props.outline ? (openBlock(), createElementBlock("div", _hoisted_3$8, [
|
|
689
695
|
renderSlot(_ctx.$slots, "default")
|
|
@@ -1136,17 +1142,17 @@ function useVModel(props, key, emit, options = {}) {
|
|
|
1136
1142
|
});
|
|
1137
1143
|
}
|
|
1138
1144
|
}
|
|
1139
|
-
const _hoisted_1$
|
|
1145
|
+
const _hoisted_1$y = {
|
|
1140
1146
|
key: 0,
|
|
1141
1147
|
class: "v-input__start-adornment"
|
|
1142
1148
|
};
|
|
1143
|
-
const _hoisted_2$
|
|
1149
|
+
const _hoisted_2$a = ["placeholder", "rows", "name"];
|
|
1144
1150
|
const _hoisted_3$7 = ["placeholder", "type", "name"];
|
|
1145
1151
|
const _hoisted_4$4 = {
|
|
1146
1152
|
key: 3,
|
|
1147
1153
|
class: "v-input__max-length"
|
|
1148
1154
|
};
|
|
1149
|
-
const _sfc_main$
|
|
1155
|
+
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
1150
1156
|
__name: "VInput",
|
|
1151
1157
|
props: {
|
|
1152
1158
|
modelValue: {},
|
|
@@ -1217,7 +1223,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
1217
1223
|
useTextareaAutosize({ element: inputRef, input: model });
|
|
1218
1224
|
}
|
|
1219
1225
|
return (_ctx, _cache) => {
|
|
1220
|
-
return openBlock(), createBlock(_sfc_main$
|
|
1226
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
1221
1227
|
class: normalizeClass(["v-input", { large: _ctx.large, multiline: _ctx.multiline }]),
|
|
1222
1228
|
error: error.value,
|
|
1223
1229
|
label: _ctx.label,
|
|
@@ -1227,7 +1233,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
1227
1233
|
}, createSlots({
|
|
1228
1234
|
default: withCtx(() => [
|
|
1229
1235
|
renderSlot(_ctx.$slots, "start-adornment"),
|
|
1230
|
-
props.prefix ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
1236
|
+
props.prefix ? (openBlock(), createElementBlock("div", _hoisted_1$y, toDisplayString(props.prefix), 1)) : createCommentVNode("", true),
|
|
1231
1237
|
props.multiline ? withDirectives((openBlock(), createElementBlock("textarea", {
|
|
1232
1238
|
key: 1,
|
|
1233
1239
|
ref_key: "inputRef",
|
|
@@ -1237,7 +1243,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
1237
1243
|
rows: props.rows,
|
|
1238
1244
|
class: "scroll",
|
|
1239
1245
|
name: props.name
|
|
1240
|
-
}, null, 8, _hoisted_2$
|
|
1246
|
+
}, null, 8, _hoisted_2$a)), [
|
|
1241
1247
|
[vModelText, model.value]
|
|
1242
1248
|
]) : withDirectives((openBlock(), createElementBlock("input", {
|
|
1243
1249
|
key: 2,
|
|
@@ -1266,8 +1272,8 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
1266
1272
|
};
|
|
1267
1273
|
}
|
|
1268
1274
|
});
|
|
1269
|
-
const _hoisted_1$
|
|
1270
|
-
const _hoisted_2$
|
|
1275
|
+
const _hoisted_1$x = { class: "blocks-list" };
|
|
1276
|
+
const _hoisted_2$9 = { class: "page-editor-blocks__group" };
|
|
1271
1277
|
const _hoisted_3$6 = { class: "title" };
|
|
1272
1278
|
const _hoisted_4$3 = { class: "blocks-list__blocks" };
|
|
1273
1279
|
const _hoisted_5$1 = ["onMousedown"];
|
|
@@ -1275,7 +1281,7 @@ const _hoisted_6$1 = {
|
|
|
1275
1281
|
key: 0,
|
|
1276
1282
|
class: "page-editor__nothing-found"
|
|
1277
1283
|
};
|
|
1278
|
-
const _sfc_main$
|
|
1284
|
+
const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
1279
1285
|
__name: "BlocksList",
|
|
1280
1286
|
props: {
|
|
1281
1287
|
blocks: {}
|
|
@@ -1324,15 +1330,15 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
1324
1330
|
});
|
|
1325
1331
|
};
|
|
1326
1332
|
return (_ctx, _cache) => {
|
|
1327
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
1328
|
-
createVNode(_sfc_main$
|
|
1333
|
+
return openBlock(), createElementBlock("div", _hoisted_1$x, [
|
|
1334
|
+
createVNode(_sfc_main$I, {
|
|
1329
1335
|
modelValue: searchValue.value,
|
|
1330
1336
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => searchValue.value = $event),
|
|
1331
1337
|
placeholder: "Поиск...",
|
|
1332
1338
|
class: "page-editor-blocks__search"
|
|
1333
1339
|
}, null, 8, ["modelValue"]),
|
|
1334
1340
|
(openBlock(true), createElementBlock(Fragment, null, renderList(groupBlocks.value, (group) => {
|
|
1335
|
-
return openBlock(), createElementBlock("div", _hoisted_2$
|
|
1341
|
+
return openBlock(), createElementBlock("div", _hoisted_2$9, [
|
|
1336
1342
|
createElementVNode("div", _hoisted_3$6, toDisplayString(groupNames[group.name] ?? group.name), 1),
|
|
1337
1343
|
createElementVNode("div", _hoisted_4$3, [
|
|
1338
1344
|
(openBlock(true), createElementBlock(Fragment, null, renderList(group.blocks, (item) => {
|
|
@@ -1628,8 +1634,8 @@ const deleteFromArray = (arr, item) => {
|
|
|
1628
1634
|
const uid$1 = () => {
|
|
1629
1635
|
return Math.trunc(Math.random() * 1e5).toString(16);
|
|
1630
1636
|
};
|
|
1631
|
-
const _hoisted_1$
|
|
1632
|
-
const _sfc_main$
|
|
1637
|
+
const _hoisted_1$w = ["onClick"];
|
|
1638
|
+
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
1633
1639
|
__name: "VTabs",
|
|
1634
1640
|
props: {
|
|
1635
1641
|
items: {},
|
|
@@ -1683,7 +1689,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
1683
1689
|
key: item.id,
|
|
1684
1690
|
class: normalizeClass(["v-tabs__tab", { active: unref(model) === item.id }]),
|
|
1685
1691
|
onClick: ($event) => model.value = item.id
|
|
1686
|
-
}, toDisplayString(item.title), 11, _hoisted_1$
|
|
1692
|
+
}, toDisplayString(item.title), 11, _hoisted_1$w);
|
|
1687
1693
|
}), 128))
|
|
1688
1694
|
]),
|
|
1689
1695
|
_: 1
|
|
@@ -1696,8 +1702,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
1696
1702
|
};
|
|
1697
1703
|
}
|
|
1698
1704
|
});
|
|
1699
|
-
const
|
|
1700
|
-
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
1705
|
+
const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
1701
1706
|
__name: "VTabsPages",
|
|
1702
1707
|
props: {
|
|
1703
1708
|
page: {},
|
|
@@ -1706,6 +1711,7 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
1706
1711
|
setup(__props) {
|
|
1707
1712
|
const props = __props;
|
|
1708
1713
|
const slots = useSlots();
|
|
1714
|
+
const containerRef = ref();
|
|
1709
1715
|
const transitionClass = ref("slide-right");
|
|
1710
1716
|
watch(() => props.page, (value, lastValue) => {
|
|
1711
1717
|
const keys = Object.keys(slots);
|
|
@@ -1715,9 +1721,31 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
1715
1721
|
transitionClass.value = "slide-right";
|
|
1716
1722
|
}
|
|
1717
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
|
+
};
|
|
1718
1737
|
return (_ctx, _cache) => {
|
|
1719
|
-
return openBlock(), createElementBlock("div",
|
|
1720
|
-
|
|
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
|
+
}, {
|
|
1721
1749
|
default: withCtx(() => [
|
|
1722
1750
|
(openBlock(), createElementBlock("div", {
|
|
1723
1751
|
key: props.page,
|
|
@@ -1728,12 +1756,12 @@ const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
|
1728
1756
|
]),
|
|
1729
1757
|
_: 3
|
|
1730
1758
|
}, 8, ["name"])
|
|
1731
|
-
]);
|
|
1759
|
+
], 512);
|
|
1732
1760
|
};
|
|
1733
1761
|
}
|
|
1734
1762
|
});
|
|
1735
|
-
const _sfc_main$
|
|
1736
|
-
const _hoisted_1$
|
|
1763
|
+
const _sfc_main$E = {};
|
|
1764
|
+
const _hoisted_1$v = {
|
|
1737
1765
|
width: "20",
|
|
1738
1766
|
height: "20",
|
|
1739
1767
|
viewBox: "0 0 20 20",
|
|
@@ -1741,7 +1769,7 @@ const _hoisted_1$w = {
|
|
|
1741
1769
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1742
1770
|
};
|
|
1743
1771
|
function _sfc_render$e(_ctx, _cache) {
|
|
1744
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
1772
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$v, _cache[0] || (_cache[0] = [
|
|
1745
1773
|
createElementVNode("path", {
|
|
1746
1774
|
"fill-rule": "evenodd",
|
|
1747
1775
|
"clip-rule": "evenodd",
|
|
@@ -1750,8 +1778,8 @@ function _sfc_render$e(_ctx, _cache) {
|
|
|
1750
1778
|
}, null, -1)
|
|
1751
1779
|
]));
|
|
1752
1780
|
}
|
|
1753
|
-
const CollapseArrowIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
1754
|
-
const _sfc_main$
|
|
1781
|
+
const CollapseArrowIcon = /* @__PURE__ */ _export_sfc(_sfc_main$E, [["render", _sfc_render$e]]);
|
|
1782
|
+
const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
1755
1783
|
__name: "VCollapse",
|
|
1756
1784
|
props: {
|
|
1757
1785
|
open: { type: Boolean },
|
|
@@ -1839,7 +1867,7 @@ const _sfc_main$E = /* @__PURE__ */ defineComponent({
|
|
|
1839
1867
|
}
|
|
1840
1868
|
});
|
|
1841
1869
|
const margin = 8;
|
|
1842
|
-
const _sfc_main$
|
|
1870
|
+
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
1843
1871
|
...{
|
|
1844
1872
|
inheritAttrs: false
|
|
1845
1873
|
},
|
|
@@ -2007,8 +2035,8 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
2007
2035
|
};
|
|
2008
2036
|
}
|
|
2009
2037
|
});
|
|
2010
|
-
const _sfc_main$
|
|
2011
|
-
const _hoisted_1$
|
|
2038
|
+
const _sfc_main$B = {};
|
|
2039
|
+
const _hoisted_1$u = {
|
|
2012
2040
|
width: "16",
|
|
2013
2041
|
height: "16",
|
|
2014
2042
|
viewBox: "0 0 16 16",
|
|
@@ -2016,24 +2044,24 @@ const _hoisted_1$v = {
|
|
|
2016
2044
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2017
2045
|
};
|
|
2018
2046
|
function _sfc_render$d(_ctx, _cache) {
|
|
2019
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2047
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$u, _cache[0] || (_cache[0] = [
|
|
2020
2048
|
createElementVNode("path", {
|
|
2021
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",
|
|
2022
2050
|
fill: "currentColor"
|
|
2023
2051
|
}, null, -1)
|
|
2024
2052
|
]));
|
|
2025
2053
|
}
|
|
2026
|
-
const ArrowDownIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2027
|
-
const _sfc_main$
|
|
2028
|
-
const _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" };
|
|
2029
2057
|
function _sfc_render$c(_ctx, _cache) {
|
|
2030
|
-
return openBlock(), createElementBlock("button", _hoisted_1$
|
|
2058
|
+
return openBlock(), createElementBlock("button", _hoisted_1$t, [
|
|
2031
2059
|
renderSlot(_ctx.$slots, "default")
|
|
2032
2060
|
]);
|
|
2033
2061
|
}
|
|
2034
|
-
const VIconButton = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2035
|
-
const _sfc_main$
|
|
2036
|
-
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 = {
|
|
2037
2065
|
width: "16",
|
|
2038
2066
|
height: "16",
|
|
2039
2067
|
viewBox: "0 0 16 16",
|
|
@@ -2041,16 +2069,16 @@ const _hoisted_1$t = {
|
|
|
2041
2069
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2042
2070
|
};
|
|
2043
2071
|
function _sfc_render$b(_ctx, _cache) {
|
|
2044
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2072
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$s, _cache[0] || (_cache[0] = [
|
|
2045
2073
|
createElementVNode("path", {
|
|
2046
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",
|
|
2047
2075
|
fill: "currentColor"
|
|
2048
2076
|
}, null, -1)
|
|
2049
2077
|
]));
|
|
2050
2078
|
}
|
|
2051
|
-
const CloseMinIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2052
|
-
const _hoisted_1$
|
|
2053
|
-
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 = {
|
|
2054
2082
|
key: 1,
|
|
2055
2083
|
class: "v-select__placeholder"
|
|
2056
2084
|
};
|
|
@@ -2065,7 +2093,7 @@ const _hoisted_6 = {
|
|
|
2065
2093
|
class: "group-title"
|
|
2066
2094
|
};
|
|
2067
2095
|
const _hoisted_7 = ["onClick"];
|
|
2068
|
-
const _sfc_main$
|
|
2096
|
+
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
2069
2097
|
__name: "VSelect",
|
|
2070
2098
|
props: /* @__PURE__ */ mergeModels({
|
|
2071
2099
|
items: {},
|
|
@@ -2101,7 +2129,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
2101
2129
|
opened.value = false;
|
|
2102
2130
|
};
|
|
2103
2131
|
return (_ctx, _cache) => {
|
|
2104
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2132
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
2105
2133
|
outline: "",
|
|
2106
2134
|
class: "v-select",
|
|
2107
2135
|
label: props.label,
|
|
@@ -2110,7 +2138,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
2110
2138
|
required: props.required
|
|
2111
2139
|
}, {
|
|
2112
2140
|
default: withCtx(() => [
|
|
2113
|
-
createVNode(_sfc_main$
|
|
2141
|
+
createVNode(_sfc_main$C, {
|
|
2114
2142
|
open: opened.value,
|
|
2115
2143
|
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => opened.value = $event),
|
|
2116
2144
|
placement: "bottom",
|
|
@@ -2121,7 +2149,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
2121
2149
|
createElementVNode("button", mergeProps({
|
|
2122
2150
|
class: ["v-select__activator", { opened: opened.value }]
|
|
2123
2151
|
}, activatorProps), [
|
|
2124
|
-
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)),
|
|
2125
2153
|
createVNode(ArrowDownIcon)
|
|
2126
2154
|
], 16),
|
|
2127
2155
|
createElementVNode("div", _hoisted_3$5, [
|
|
@@ -2164,8 +2192,8 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
2164
2192
|
};
|
|
2165
2193
|
}
|
|
2166
2194
|
});
|
|
2167
|
-
const _hoisted_1$
|
|
2168
|
-
const _sfc_main$
|
|
2195
|
+
const _hoisted_1$q = { class: "json-editor__array" };
|
|
2196
|
+
const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
2169
2197
|
__name: "JsonEditorArray",
|
|
2170
2198
|
props: {
|
|
2171
2199
|
label: {},
|
|
@@ -2173,7 +2201,7 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
2173
2201
|
modelValue: {},
|
|
2174
2202
|
expanded: { type: Boolean }
|
|
2175
2203
|
},
|
|
2176
|
-
emits: ["update:modelValue"],
|
|
2204
|
+
emits: ["update:modelValue", "edit"],
|
|
2177
2205
|
setup(__props, { emit: __emit }) {
|
|
2178
2206
|
var _a;
|
|
2179
2207
|
const props = __props;
|
|
@@ -2198,27 +2226,28 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
2198
2226
|
return `${props.label} (${length.value})`;
|
|
2199
2227
|
});
|
|
2200
2228
|
return (_ctx, _cache) => {
|
|
2201
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
2202
|
-
createVNode(_sfc_main$
|
|
2229
|
+
return openBlock(), createElementBlock("div", _hoisted_1$q, [
|
|
2230
|
+
createVNode(_sfc_main$D, {
|
|
2203
2231
|
label: label.value,
|
|
2204
2232
|
open: props.expanded
|
|
2205
2233
|
}, {
|
|
2206
2234
|
default: withCtx(() => [
|
|
2207
|
-
createVNode(_sfc_main$
|
|
2235
|
+
createVNode(_sfc_main$I, {
|
|
2208
2236
|
label: "Количество элементов",
|
|
2209
2237
|
modelValue: length.value,
|
|
2210
2238
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => length.value = $event),
|
|
2211
2239
|
type: "number"
|
|
2212
2240
|
}, null, 8, ["modelValue"]),
|
|
2213
2241
|
(openBlock(true), createElementBlock(Fragment, null, renderList(length.value, (index) => {
|
|
2214
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2242
|
+
return openBlock(), createBlock(_sfc_main$b, {
|
|
2215
2243
|
key: index,
|
|
2216
2244
|
schema: props.schema.items,
|
|
2217
2245
|
name: `${props.schema.itemName ?? "Элемент"} ${index}`,
|
|
2218
2246
|
modelValue: tempArray.value[index - 1],
|
|
2219
2247
|
"onUpdate:modelValue": ($event) => tempArray.value[index - 1] = $event,
|
|
2220
|
-
expanded: unref(childExpanded)
|
|
2221
|
-
|
|
2248
|
+
expanded: unref(childExpanded),
|
|
2249
|
+
onEdit: ($event) => emit("edit", unref(join)(index - 1, $event))
|
|
2250
|
+
}, null, 8, ["schema", "name", "modelValue", "onUpdate:modelValue", "expanded", "onEdit"]);
|
|
2222
2251
|
}), 128))
|
|
2223
2252
|
]),
|
|
2224
2253
|
_: 1
|
|
@@ -2227,8 +2256,8 @@ const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
|
2227
2256
|
};
|
|
2228
2257
|
}
|
|
2229
2258
|
});
|
|
2230
|
-
const _sfc_main$
|
|
2231
|
-
const _hoisted_1$
|
|
2259
|
+
const _sfc_main$w = {};
|
|
2260
|
+
const _hoisted_1$p = {
|
|
2232
2261
|
width: "46",
|
|
2233
2262
|
height: "28",
|
|
2234
2263
|
viewBox: "0 0 46 28",
|
|
@@ -2236,13 +2265,13 @@ const _hoisted_1$q = {
|
|
|
2236
2265
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2237
2266
|
};
|
|
2238
2267
|
function _sfc_render$a(_ctx, _cache) {
|
|
2239
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2268
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$p, _cache[0] || (_cache[0] = [
|
|
2240
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)
|
|
2241
2270
|
]));
|
|
2242
2271
|
}
|
|
2243
|
-
const EmptyFileIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2244
|
-
const _sfc_main$
|
|
2245
|
-
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 = {
|
|
2246
2275
|
width: "24",
|
|
2247
2276
|
height: "24",
|
|
2248
2277
|
viewBox: "0 0 24 24",
|
|
@@ -2250,15 +2279,15 @@ const _hoisted_1$p = {
|
|
|
2250
2279
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2251
2280
|
};
|
|
2252
2281
|
function _sfc_render$9(_ctx, _cache) {
|
|
2253
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2282
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$o, _cache[0] || (_cache[0] = [
|
|
2254
2283
|
createElementVNode("path", {
|
|
2255
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",
|
|
2256
2285
|
fill: "currentColor"
|
|
2257
2286
|
}, null, -1)
|
|
2258
2287
|
]));
|
|
2259
2288
|
}
|
|
2260
|
-
const MoreIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2261
|
-
const _sfc_main$
|
|
2289
|
+
const MoreIcon = /* @__PURE__ */ _export_sfc(_sfc_main$v, [["render", _sfc_render$9]]);
|
|
2290
|
+
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
2262
2291
|
__name: "VButton",
|
|
2263
2292
|
props: {
|
|
2264
2293
|
component: {},
|
|
@@ -2311,7 +2340,7 @@ const useContextMenu = (creator) => {
|
|
|
2311
2340
|
open
|
|
2312
2341
|
};
|
|
2313
2342
|
};
|
|
2314
|
-
const _sfc_main$
|
|
2343
|
+
const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
2315
2344
|
__name: "VContextMenu",
|
|
2316
2345
|
props: {
|
|
2317
2346
|
open: { type: Boolean },
|
|
@@ -2352,7 +2381,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
2352
2381
|
return (_ctx, _cache) => {
|
|
2353
2382
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
2354
2383
|
renderSlot(_ctx.$slots, "activator", { props: activatorProps }),
|
|
2355
|
-
createVNode(_sfc_main$
|
|
2384
|
+
createVNode(_sfc_main$C, {
|
|
2356
2385
|
open: unref(open),
|
|
2357
2386
|
"onUpdate:open": _cache[0] || (_cache[0] = ($event) => isRef(open) ? open.value = $event : null),
|
|
2358
2387
|
element: activatorElement.value,
|
|
@@ -2364,7 +2393,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
2364
2393
|
}, {
|
|
2365
2394
|
default: withCtx(() => [
|
|
2366
2395
|
(openBlock(true), createElementBlock(Fragment, null, renderList(items.value, (item) => {
|
|
2367
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2396
|
+
return openBlock(), createBlock(_sfc_main$u, mergeProps({ ref_for: true }, item.props, {
|
|
2368
2397
|
class: "v-context-menu__item",
|
|
2369
2398
|
onClick: ($event) => onItemClick(item)
|
|
2370
2399
|
}), {
|
|
@@ -2405,7 +2434,7 @@ const createDialogSystem = () => {
|
|
|
2405
2434
|
};
|
|
2406
2435
|
};
|
|
2407
2436
|
const useDialog = () => inject("dialogStore");
|
|
2408
|
-
const _sfc_main$
|
|
2437
|
+
const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
2409
2438
|
__name: "VDialogProvider",
|
|
2410
2439
|
setup(__props) {
|
|
2411
2440
|
const dialogStore = inject("dialogStore");
|
|
@@ -2462,15 +2491,15 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
2462
2491
|
};
|
|
2463
2492
|
}
|
|
2464
2493
|
});
|
|
2465
|
-
const _hoisted_1$
|
|
2494
|
+
const _hoisted_1$n = {
|
|
2466
2495
|
key: 0,
|
|
2467
2496
|
class: "v-dialog__header heading"
|
|
2468
2497
|
};
|
|
2469
|
-
const _hoisted_2$
|
|
2498
|
+
const _hoisted_2$7 = {
|
|
2470
2499
|
key: 1,
|
|
2471
2500
|
class: "v-dialog__actions"
|
|
2472
2501
|
};
|
|
2473
|
-
const _sfc_main$
|
|
2502
|
+
const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
2474
2503
|
__name: "VDialog",
|
|
2475
2504
|
props: {
|
|
2476
2505
|
"content:class": {},
|
|
@@ -2486,7 +2515,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
2486
2515
|
role: "dialog"
|
|
2487
2516
|
}, {
|
|
2488
2517
|
default: withCtx(() => [
|
|
2489
|
-
unref(slots).header ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2518
|
+
unref(slots).header ? (openBlock(), createElementBlock("div", _hoisted_1$n, [
|
|
2490
2519
|
renderSlot(_ctx.$slots, "header"),
|
|
2491
2520
|
createVNode(VIconButton, {
|
|
2492
2521
|
role: "button",
|
|
@@ -2504,7 +2533,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
2504
2533
|
}, [
|
|
2505
2534
|
renderSlot(_ctx.$slots, "default")
|
|
2506
2535
|
], 2),
|
|
2507
|
-
unref(slots).actions ? (openBlock(), createElementBlock("div", _hoisted_2$
|
|
2536
|
+
unref(slots).actions ? (openBlock(), createElementBlock("div", _hoisted_2$7, [
|
|
2508
2537
|
renderSlot(_ctx.$slots, "actions")
|
|
2509
2538
|
])) : createCommentVNode("", true)
|
|
2510
2539
|
]),
|
|
@@ -2513,13 +2542,13 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
|
|
|
2513
2542
|
};
|
|
2514
2543
|
}
|
|
2515
2544
|
});
|
|
2516
|
-
const _hoisted_1$
|
|
2545
|
+
const _hoisted_1$m = {
|
|
2517
2546
|
key: 0,
|
|
2518
2547
|
class: "project-images__grid"
|
|
2519
2548
|
};
|
|
2520
|
-
const _hoisted_2$
|
|
2549
|
+
const _hoisted_2$6 = ["onClick"];
|
|
2521
2550
|
const _hoisted_3$4 = ["src"];
|
|
2522
|
-
const _sfc_main$
|
|
2551
|
+
const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
2523
2552
|
__name: "ProjectImagesDialog",
|
|
2524
2553
|
props: {
|
|
2525
2554
|
fileRequest: { type: Function },
|
|
@@ -2534,12 +2563,12 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
2534
2563
|
dialog.back();
|
|
2535
2564
|
};
|
|
2536
2565
|
return (_ctx, _cache) => {
|
|
2537
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2566
|
+
return openBlock(), createBlock(_sfc_main$r, { style: { "width": "900px" } }, {
|
|
2538
2567
|
header: withCtx(() => _cache[0] || (_cache[0] = [
|
|
2539
2568
|
createTextVNode("Изображения проекта")
|
|
2540
2569
|
])),
|
|
2541
2570
|
default: withCtx(() => [
|
|
2542
|
-
unref(data) ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2571
|
+
unref(data) ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
|
|
2543
2572
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(data), (item) => {
|
|
2544
2573
|
return openBlock(), createElementBlock("button", {
|
|
2545
2574
|
onClick: ($event) => openImage(item)
|
|
@@ -2547,7 +2576,7 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
2547
2576
|
createElementVNode("img", {
|
|
2548
2577
|
src: item.previewSrc ?? item.src
|
|
2549
2578
|
}, null, 8, _hoisted_3$4)
|
|
2550
|
-
], 8, _hoisted_2$
|
|
2579
|
+
], 8, _hoisted_2$6);
|
|
2551
2580
|
}), 256))
|
|
2552
2581
|
])) : createCommentVNode("", true)
|
|
2553
2582
|
]),
|
|
@@ -2556,14 +2585,14 @@ const _sfc_main$r = /* @__PURE__ */ defineComponent({
|
|
|
2556
2585
|
};
|
|
2557
2586
|
}
|
|
2558
2587
|
});
|
|
2559
|
-
const _hoisted_1$
|
|
2588
|
+
const _hoisted_1$l = {
|
|
2560
2589
|
key: 0,
|
|
2561
2590
|
class: "v-image-uploader__drag-label"
|
|
2562
2591
|
};
|
|
2563
|
-
const _hoisted_2$
|
|
2592
|
+
const _hoisted_2$5 = { class: "v-image-uploader__image-preview" };
|
|
2564
2593
|
const _hoisted_3$3 = ["src"];
|
|
2565
2594
|
const _hoisted_4$1 = { class: "v-image-uploader__image-info" };
|
|
2566
|
-
const _sfc_main$
|
|
2595
|
+
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
2567
2596
|
__name: "VImageUploader",
|
|
2568
2597
|
props: {
|
|
2569
2598
|
accept: {},
|
|
@@ -2629,10 +2658,10 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
2629
2658
|
emit("update:modelValue", image);
|
|
2630
2659
|
};
|
|
2631
2660
|
if (fileRequest) {
|
|
2632
|
-
contextMenuItems.push({ title: "Выбрать из файлов проекта", onClick: () => dialog.open(_sfc_main$
|
|
2661
|
+
contextMenuItems.push({ title: "Выбрать из файлов проекта", onClick: () => dialog.open(_sfc_main$q, { fileRequest, onOpenImage }) });
|
|
2633
2662
|
}
|
|
2634
2663
|
return (_ctx, _cache) => {
|
|
2635
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2664
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
2636
2665
|
class: normalizeClass(["v-image-uploader", { drag: drag.value }]),
|
|
2637
2666
|
error: _ctx.error,
|
|
2638
2667
|
label: _ctx.label,
|
|
@@ -2644,7 +2673,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
2644
2673
|
onDragleave: onDragLeave
|
|
2645
2674
|
}, {
|
|
2646
2675
|
default: withCtx(() => [
|
|
2647
|
-
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 }, [
|
|
2648
2677
|
createVNode(EmptyFileIcon),
|
|
2649
2678
|
createElementVNode("div", null, [
|
|
2650
2679
|
createElementVNode("a", {
|
|
@@ -2652,7 +2681,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
2652
2681
|
}, "Загрузите изображение"),
|
|
2653
2682
|
_cache[1] || (_cache[1] = createElementVNode("br", null, null, -1)),
|
|
2654
2683
|
_cache[2] || (_cache[2] = createTextVNode("или перетащите сюда ")),
|
|
2655
|
-
contextMenuItems.length > 0 ? (openBlock(), createBlock(_sfc_main$
|
|
2684
|
+
contextMenuItems.length > 0 ? (openBlock(), createBlock(_sfc_main$t, {
|
|
2656
2685
|
key: 0,
|
|
2657
2686
|
items: contextMenuItems,
|
|
2658
2687
|
placement: "bottom-end"
|
|
@@ -2669,7 +2698,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
2669
2698
|
})) : createCommentVNode("", true)
|
|
2670
2699
|
])
|
|
2671
2700
|
], 64)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
2672
|
-
createElementVNode("div", _hoisted_2$
|
|
2701
|
+
createElementVNode("div", _hoisted_2$5, [
|
|
2673
2702
|
createElementVNode("img", {
|
|
2674
2703
|
src: props.modelValue.previewSrc ?? props.modelValue.src,
|
|
2675
2704
|
alt: "Preview Image"
|
|
@@ -2694,8 +2723,8 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
|
|
|
2694
2723
|
};
|
|
2695
2724
|
}
|
|
2696
2725
|
});
|
|
2697
|
-
const _sfc_main$
|
|
2698
|
-
const _hoisted_1$
|
|
2726
|
+
const _sfc_main$o = {};
|
|
2727
|
+
const _hoisted_1$k = {
|
|
2699
2728
|
width: "18",
|
|
2700
2729
|
height: "18",
|
|
2701
2730
|
viewBox: "0 0 18 18",
|
|
@@ -2703,24 +2732,24 @@ const _hoisted_1$l = {
|
|
|
2703
2732
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2704
2733
|
};
|
|
2705
2734
|
function _sfc_render$8(_ctx, _cache) {
|
|
2706
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2735
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$k, _cache[0] || (_cache[0] = [
|
|
2707
2736
|
createElementVNode("path", {
|
|
2708
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",
|
|
2709
2738
|
fill: "currentColor"
|
|
2710
2739
|
}, null, -1)
|
|
2711
2740
|
]));
|
|
2712
2741
|
}
|
|
2713
|
-
const CheckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2714
|
-
const _hoisted_1$
|
|
2742
|
+
const CheckIcon = /* @__PURE__ */ _export_sfc(_sfc_main$o, [["render", _sfc_render$8]]);
|
|
2743
|
+
const _hoisted_1$j = {
|
|
2715
2744
|
key: 0,
|
|
2716
2745
|
class: "v-checkbox__label left"
|
|
2717
2746
|
};
|
|
2718
|
-
const _hoisted_2$
|
|
2747
|
+
const _hoisted_2$4 = ["name"];
|
|
2719
2748
|
const _hoisted_3$2 = {
|
|
2720
2749
|
key: 1,
|
|
2721
2750
|
class: "v-checkbox__label"
|
|
2722
2751
|
};
|
|
2723
|
-
const _sfc_main$
|
|
2752
|
+
const _sfc_main$n = /* @__PURE__ */ defineComponent({
|
|
2724
2753
|
__name: "VCheckbox",
|
|
2725
2754
|
props: /* @__PURE__ */ mergeModels({
|
|
2726
2755
|
label: {},
|
|
@@ -2752,7 +2781,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2752
2781
|
onClick,
|
|
2753
2782
|
onKeydown: onClick
|
|
2754
2783
|
}, [
|
|
2755
|
-
labelPosition.value === "left" ? (openBlock(), createElementBlock("div", _hoisted_1$
|
|
2784
|
+
labelPosition.value === "left" ? (openBlock(), createElementBlock("div", _hoisted_1$j, [
|
|
2756
2785
|
renderSlot(_ctx.$slots, "label", {}, () => [
|
|
2757
2786
|
createTextVNode(toDisplayString(props.label), 1)
|
|
2758
2787
|
])
|
|
@@ -2766,7 +2795,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
2766
2795
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
2767
2796
|
type: "checkbox",
|
|
2768
2797
|
name: props.name
|
|
2769
|
-
}, null, 8, _hoisted_2$
|
|
2798
|
+
}, null, 8, _hoisted_2$4), [
|
|
2770
2799
|
[vModelCheckbox, model.value]
|
|
2771
2800
|
]),
|
|
2772
2801
|
labelPosition.value === "right" ? (openBlock(), createElementBlock("div", _hoisted_3$2, [
|
|
@@ -2789,8 +2818,8 @@ const capitalize = (text) => {
|
|
|
2789
2818
|
const spaceCamelCase = (str) => {
|
|
2790
2819
|
return capitalize(str.replace(/([A-Z])/g, " $1").trimStart());
|
|
2791
2820
|
};
|
|
2792
|
-
const _sfc_main$
|
|
2793
|
-
const _hoisted_1$
|
|
2821
|
+
const _sfc_main$m = {};
|
|
2822
|
+
const _hoisted_1$i = {
|
|
2794
2823
|
width: "24",
|
|
2795
2824
|
height: "24",
|
|
2796
2825
|
viewBox: "0 0 24 24",
|
|
@@ -2798,7 +2827,7 @@ const _hoisted_1$j = {
|
|
|
2798
2827
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2799
2828
|
};
|
|
2800
2829
|
function _sfc_render$7(_ctx, _cache) {
|
|
2801
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
2830
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$i, _cache[0] || (_cache[0] = [
|
|
2802
2831
|
createElementVNode("path", {
|
|
2803
2832
|
"fill-rule": "evenodd",
|
|
2804
2833
|
"clip-rule": "evenodd",
|
|
@@ -2807,9 +2836,9 @@ function _sfc_render$7(_ctx, _cache) {
|
|
|
2807
2836
|
}, null, -1)
|
|
2808
2837
|
]));
|
|
2809
2838
|
}
|
|
2810
|
-
const EditIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
2811
|
-
const _hoisted_1$
|
|
2812
|
-
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({
|
|
2813
2842
|
__name: "VLinkEditor",
|
|
2814
2843
|
props: /* @__PURE__ */ mergeModels({
|
|
2815
2844
|
nullable: { type: Boolean }
|
|
@@ -2864,7 +2893,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2864
2893
|
return arr;
|
|
2865
2894
|
});
|
|
2866
2895
|
return (_ctx, _cache) => {
|
|
2867
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2896
|
+
return openBlock(), createBlock(_sfc_main$y, {
|
|
2868
2897
|
class: "v-link-editor",
|
|
2869
2898
|
modelValue: linkType.value,
|
|
2870
2899
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => linkType.value = $event),
|
|
@@ -2872,7 +2901,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2872
2901
|
nullable: props.nullable
|
|
2873
2902
|
}, {
|
|
2874
2903
|
default: withCtx(() => [
|
|
2875
|
-
model.value && model.value.id ? (openBlock(), createBlock(_sfc_main$
|
|
2904
|
+
model.value && model.value.id ? (openBlock(), createBlock(_sfc_main$C, {
|
|
2876
2905
|
key: 0,
|
|
2877
2906
|
offset: 4,
|
|
2878
2907
|
placement: "bottom-end"
|
|
@@ -2888,27 +2917,27 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
2888
2917
|
default: withCtx(() => {
|
|
2889
2918
|
var _a;
|
|
2890
2919
|
return [
|
|
2891
|
-
createElementVNode("div", _hoisted_1$
|
|
2892
|
-
model.value.id === "_external" ? (openBlock(), createBlock(_sfc_main$
|
|
2920
|
+
createElementVNode("div", _hoisted_1$h, [
|
|
2921
|
+
model.value.id === "_external" ? (openBlock(), createBlock(_sfc_main$I, {
|
|
2893
2922
|
key: 0,
|
|
2894
2923
|
modelValue: model.value.url,
|
|
2895
2924
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value.url = $event),
|
|
2896
2925
|
label: "URL ссылки",
|
|
2897
2926
|
autofocus: ""
|
|
2898
2927
|
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
2899
|
-
model.value.id !== "_external" ? (openBlock(), createBlock(_sfc_main$
|
|
2928
|
+
model.value.id !== "_external" ? (openBlock(), createBlock(_sfc_main$I, {
|
|
2900
2929
|
key: 1,
|
|
2901
2930
|
modelValue: model.value.query,
|
|
2902
2931
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => model.value.query = $event),
|
|
2903
2932
|
label: "Якорь",
|
|
2904
2933
|
prefix: (_a = model.value) == null ? void 0 : _a.url
|
|
2905
2934
|
}, null, 8, ["modelValue", "prefix"])) : createCommentVNode("", true),
|
|
2906
|
-
createVNode(_sfc_main$
|
|
2935
|
+
createVNode(_sfc_main$I, {
|
|
2907
2936
|
modelValue: model.value.title,
|
|
2908
2937
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => model.value.title = $event),
|
|
2909
2938
|
label: "Заголовок"
|
|
2910
2939
|
}, null, 8, ["modelValue"]),
|
|
2911
|
-
createVNode(_sfc_main$
|
|
2940
|
+
createVNode(_sfc_main$n, {
|
|
2912
2941
|
modelValue: model.value.openNewTab,
|
|
2913
2942
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => model.value.openNewTab = $event),
|
|
2914
2943
|
label: "Открывать в новой вкладке"
|
|
@@ -4146,11 +4175,11 @@ const codeParser = (text) => {
|
|
|
4146
4175
|
}
|
|
4147
4176
|
return arr;
|
|
4148
4177
|
};
|
|
4149
|
-
const _hoisted_1$
|
|
4178
|
+
const _hoisted_1$g = {
|
|
4150
4179
|
class: "code-editor",
|
|
4151
4180
|
contenteditable: false
|
|
4152
4181
|
};
|
|
4153
|
-
const _sfc_main$
|
|
4182
|
+
const _sfc_main$k = /* @__PURE__ */ defineComponent({
|
|
4154
4183
|
__name: "RichTextEditorCode",
|
|
4155
4184
|
props: {
|
|
4156
4185
|
modelValue: {}
|
|
@@ -4178,7 +4207,7 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4178
4207
|
}
|
|
4179
4208
|
};
|
|
4180
4209
|
return (_ctx, _cache) => {
|
|
4181
|
-
return openBlock(), createElementBlock("div", _hoisted_1$
|
|
4210
|
+
return openBlock(), createElementBlock("div", _hoisted_1$g, [
|
|
4182
4211
|
createVNode(unref(_sfc_main$1$1), {
|
|
4183
4212
|
modelValue: model.value,
|
|
4184
4213
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
@@ -4193,8 +4222,8 @@ const _sfc_main$l = /* @__PURE__ */ defineComponent({
|
|
|
4193
4222
|
};
|
|
4194
4223
|
}
|
|
4195
4224
|
});
|
|
4196
|
-
const _sfc_main$
|
|
4197
|
-
const _hoisted_1$
|
|
4225
|
+
const _sfc_main$j = {};
|
|
4226
|
+
const _hoisted_1$f = {
|
|
4198
4227
|
width: "16",
|
|
4199
4228
|
height: "16",
|
|
4200
4229
|
viewBox: "0 0 16 16",
|
|
@@ -4202,16 +4231,16 @@ const _hoisted_1$g = {
|
|
|
4202
4231
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4203
4232
|
};
|
|
4204
4233
|
function _sfc_render$6(_ctx, _cache) {
|
|
4205
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4234
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$f, _cache[0] || (_cache[0] = [
|
|
4206
4235
|
createElementVNode("path", {
|
|
4207
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",
|
|
4208
4237
|
fill: "currentColor"
|
|
4209
4238
|
}, null, -1)
|
|
4210
4239
|
]));
|
|
4211
4240
|
}
|
|
4212
|
-
const TextBoldIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4213
|
-
const _sfc_main$
|
|
4214
|
-
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 = {
|
|
4215
4244
|
width: "16",
|
|
4216
4245
|
height: "16",
|
|
4217
4246
|
viewBox: "0 0 16 16",
|
|
@@ -4219,16 +4248,16 @@ const _hoisted_1$f = {
|
|
|
4219
4248
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4220
4249
|
};
|
|
4221
4250
|
function _sfc_render$5(_ctx, _cache) {
|
|
4222
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4251
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$e, _cache[0] || (_cache[0] = [
|
|
4223
4252
|
createElementVNode("path", {
|
|
4224
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",
|
|
4225
4254
|
fill: "currentColor"
|
|
4226
4255
|
}, null, -1)
|
|
4227
4256
|
]));
|
|
4228
4257
|
}
|
|
4229
|
-
const TextItalicIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4230
|
-
const _sfc_main$
|
|
4231
|
-
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 = {
|
|
4232
4261
|
width: "16",
|
|
4233
4262
|
height: "16",
|
|
4234
4263
|
viewBox: "0 0 16 16",
|
|
@@ -4236,16 +4265,16 @@ const _hoisted_1$e = {
|
|
|
4236
4265
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4237
4266
|
};
|
|
4238
4267
|
function _sfc_render$4(_ctx, _cache) {
|
|
4239
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4268
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$d, _cache[0] || (_cache[0] = [
|
|
4240
4269
|
createElementVNode("path", {
|
|
4241
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",
|
|
4242
4271
|
fill: "currentColor"
|
|
4243
4272
|
}, null, -1)
|
|
4244
4273
|
]));
|
|
4245
4274
|
}
|
|
4246
|
-
const TextUnderlineIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4247
|
-
const _sfc_main$
|
|
4248
|
-
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 = {
|
|
4249
4278
|
width: "16",
|
|
4250
4279
|
height: "16",
|
|
4251
4280
|
viewBox: "0 0 16 16",
|
|
@@ -4253,16 +4282,16 @@ const _hoisted_1$d = {
|
|
|
4253
4282
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4254
4283
|
};
|
|
4255
4284
|
function _sfc_render$3(_ctx, _cache) {
|
|
4256
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4285
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$c, _cache[0] || (_cache[0] = [
|
|
4257
4286
|
createElementVNode("path", {
|
|
4258
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",
|
|
4259
4288
|
fill: "currentColor"
|
|
4260
4289
|
}, null, -1)
|
|
4261
4290
|
]));
|
|
4262
4291
|
}
|
|
4263
|
-
const TextStrikethroughIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4264
|
-
const _sfc_main$
|
|
4265
|
-
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 = {
|
|
4266
4295
|
width: "16",
|
|
4267
4296
|
height: "16",
|
|
4268
4297
|
viewBox: "0 0 16 16",
|
|
@@ -4270,16 +4299,16 @@ const _hoisted_1$c = {
|
|
|
4270
4299
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4271
4300
|
};
|
|
4272
4301
|
function _sfc_render$2(_ctx, _cache) {
|
|
4273
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4302
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$b, _cache[0] || (_cache[0] = [
|
|
4274
4303
|
createElementVNode("path", {
|
|
4275
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",
|
|
4276
4305
|
fill: "currentColor"
|
|
4277
4306
|
}, null, -1)
|
|
4278
4307
|
]));
|
|
4279
4308
|
}
|
|
4280
|
-
const ImageSolidIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4281
|
-
const _sfc_main$
|
|
4282
|
-
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 = {
|
|
4283
4312
|
width: "16",
|
|
4284
4313
|
height: "16",
|
|
4285
4314
|
viewBox: "0 0 16 16",
|
|
@@ -4287,19 +4316,19 @@ const _hoisted_1$b = {
|
|
|
4287
4316
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4288
4317
|
};
|
|
4289
4318
|
function _sfc_render$1(_ctx, _cache) {
|
|
4290
|
-
return openBlock(), createElementBlock("svg", _hoisted_1$
|
|
4319
|
+
return openBlock(), createElementBlock("svg", _hoisted_1$a, _cache[0] || (_cache[0] = [
|
|
4291
4320
|
createElementVNode("path", {
|
|
4292
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",
|
|
4293
4322
|
fill: "currentColor"
|
|
4294
4323
|
}, null, -1)
|
|
4295
4324
|
]));
|
|
4296
4325
|
}
|
|
4297
|
-
const CodeIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
4298
|
-
const _hoisted_1$
|
|
4299
|
-
const _hoisted_2$
|
|
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" };
|
|
4300
4329
|
const _hoisted_3$1 = ["onClick"];
|
|
4301
4330
|
const _hoisted_4 = { class: "rich-text-editor__actions-group" };
|
|
4302
|
-
const _sfc_main$
|
|
4331
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
4303
4332
|
__name: "RichTextEditorDialog",
|
|
4304
4333
|
props: /* @__PURE__ */ mergeModels({
|
|
4305
4334
|
label: {}
|
|
@@ -4388,19 +4417,19 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4388
4417
|
(_a = textEditorRef.value) == null ? void 0 : _a.insertBlock({ type: "image", editable: false, text: "" });
|
|
4389
4418
|
};
|
|
4390
4419
|
return (_ctx, _cache) => {
|
|
4391
|
-
return openBlock(), createBlock(_sfc_main$
|
|
4420
|
+
return openBlock(), createBlock(_sfc_main$r, { class: "rich-text-editor__dialog" }, {
|
|
4392
4421
|
header: withCtx(() => [
|
|
4393
4422
|
createTextVNode(toDisplayString(props.label ?? "Редактирование текста"), 1)
|
|
4394
4423
|
]),
|
|
4395
4424
|
default: withCtx(() => [
|
|
4396
|
-
createElementVNode("div", _hoisted_1$
|
|
4397
|
-
createVNode(_sfc_main$
|
|
4425
|
+
createElementVNode("div", _hoisted_1$9, [
|
|
4426
|
+
createVNode(_sfc_main$y, {
|
|
4398
4427
|
modelValue: blockType.value,
|
|
4399
4428
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => blockType.value = $event),
|
|
4400
4429
|
items: blockTypes,
|
|
4401
4430
|
style: { "width": "200px" }
|
|
4402
4431
|
}, null, 8, ["modelValue"]),
|
|
4403
|
-
createElementVNode("div", _hoisted_2$
|
|
4432
|
+
createElementVNode("div", _hoisted_2$3, [
|
|
4404
4433
|
(openBlock(true), createElementBlock(Fragment, null, renderList(styles.value, (item) => {
|
|
4405
4434
|
return openBlock(), createElementBlock("button", {
|
|
4406
4435
|
class: normalizeClass({ active: item.active }),
|
|
@@ -4436,7 +4465,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4436
4465
|
onKeydown: onKeyDown
|
|
4437
4466
|
}, {
|
|
4438
4467
|
code: withCtx(({ props: props2, block }) => [
|
|
4439
|
-
createVNode(_sfc_main$
|
|
4468
|
+
createVNode(_sfc_main$k, mergeProps({
|
|
4440
4469
|
modelValue: block.text,
|
|
4441
4470
|
"onUpdate:modelValue": ($event) => block.text = $event
|
|
4442
4471
|
}, props2, {
|
|
@@ -4453,7 +4482,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4453
4482
|
image: withCtx(({ props: props2, block }) => {
|
|
4454
4483
|
var _a;
|
|
4455
4484
|
return [
|
|
4456
|
-
createVNode(_sfc_main$
|
|
4485
|
+
createVNode(_sfc_main$p, mergeProps({
|
|
4457
4486
|
modelValue: block.image,
|
|
4458
4487
|
"onUpdate:modelValue": ($event) => block.image = $event
|
|
4459
4488
|
}, props2, {
|
|
@@ -4477,8 +4506,8 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
4477
4506
|
};
|
|
4478
4507
|
}
|
|
4479
4508
|
});
|
|
4480
|
-
const _hoisted_1$
|
|
4481
|
-
const _sfc_main$
|
|
4509
|
+
const _hoisted_1$8 = { class: "v-form-control__outline" };
|
|
4510
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
4482
4511
|
__name: "VRichTextEditor",
|
|
4483
4512
|
props: /* @__PURE__ */ mergeModels({
|
|
4484
4513
|
label: {}
|
|
@@ -4492,26 +4521,26 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4492
4521
|
const model = useModel(__props, "modelValue");
|
|
4493
4522
|
const dialog = useDialog();
|
|
4494
4523
|
const openTextEditor = () => {
|
|
4495
|
-
dialog.open(_sfc_main$
|
|
4524
|
+
dialog.open(_sfc_main$d, {
|
|
4496
4525
|
label: props.label,
|
|
4497
4526
|
modelValue: model.value,
|
|
4498
4527
|
["onUpdate:modelValue"]: (val) => model.value = val
|
|
4499
4528
|
});
|
|
4500
4529
|
};
|
|
4501
4530
|
return (_ctx, _cache) => {
|
|
4502
|
-
return openBlock(), createBlock(_sfc_main$
|
|
4531
|
+
return openBlock(), createBlock(_sfc_main$J, {
|
|
4503
4532
|
label: props.label,
|
|
4504
4533
|
class: "rich-text-editor"
|
|
4505
4534
|
}, {
|
|
4506
4535
|
default: withCtx(() => [
|
|
4507
|
-
createElementVNode("div", _hoisted_1$
|
|
4536
|
+
createElementVNode("div", _hoisted_1$8, [
|
|
4508
4537
|
createVNode(unref(_sfc_main$1$1), {
|
|
4509
4538
|
modelValue: model.value,
|
|
4510
4539
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
4511
4540
|
class: "rich-text-editor__editor"
|
|
4512
4541
|
}, null, 8, ["modelValue"])
|
|
4513
4542
|
]),
|
|
4514
|
-
createVNode(_sfc_main$
|
|
4543
|
+
createVNode(_sfc_main$u, { onClick: openTextEditor }, {
|
|
4515
4544
|
default: withCtx(() => _cache[1] || (_cache[1] = [
|
|
4516
4545
|
createTextVNode("Редактировать")
|
|
4517
4546
|
])),
|
|
@@ -4524,11 +4553,27 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
4524
4553
|
};
|
|
4525
4554
|
}
|
|
4526
4555
|
});
|
|
4527
|
-
const _hoisted_1$
|
|
4556
|
+
const _hoisted_1$7 = {
|
|
4528
4557
|
key: 3,
|
|
4529
4558
|
class: "json-editor__object"
|
|
4530
4559
|
};
|
|
4531
|
-
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({
|
|
4532
4577
|
__name: "JsonEditor",
|
|
4533
4578
|
props: /* @__PURE__ */ mergeModels({
|
|
4534
4579
|
schema: {},
|
|
@@ -4540,9 +4585,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
4540
4585
|
"modelValue": {},
|
|
4541
4586
|
"modelModifiers": {}
|
|
4542
4587
|
}),
|
|
4543
|
-
emits: ["update:modelValue"],
|
|
4544
|
-
setup(__props) {
|
|
4588
|
+
emits: /* @__PURE__ */ mergeModels(["edit"], ["update:modelValue"]),
|
|
4589
|
+
setup(__props, { emit: __emit }) {
|
|
4545
4590
|
const props = __props;
|
|
4591
|
+
const emit = __emit;
|
|
4546
4592
|
const childExpanded = props.schema.type === "object" && Object.keys(props.schema.properties).length < 2;
|
|
4547
4593
|
const vModel = useModel(__props, "modelValue");
|
|
4548
4594
|
if (vModel.value !== null && vModel.value !== void 0) {
|
|
@@ -4550,37 +4596,29 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
4550
4596
|
vModel.value = getDefaultValue(props.schema);
|
|
4551
4597
|
}
|
|
4552
4598
|
}
|
|
4553
|
-
|
|
4554
|
-
return schema.enum.map((item, index) => {
|
|
4555
|
-
var _a;
|
|
4556
|
-
return {
|
|
4557
|
-
id: item,
|
|
4558
|
-
title: ((_a = schema.enumAlias) == null ? void 0 : _a[index]) ?? spaceCamelCase(item)
|
|
4559
|
-
};
|
|
4560
|
-
});
|
|
4561
|
-
};
|
|
4599
|
+
watch(vModel, () => emit("edit"));
|
|
4562
4600
|
return (_ctx, _cache) => {
|
|
4563
4601
|
const _component_JsonEditor = resolveComponent("JsonEditor", true);
|
|
4564
|
-
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, {
|
|
4565
4603
|
key: 0,
|
|
4566
4604
|
modelValue: vModel.value,
|
|
4567
4605
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vModel.value = $event),
|
|
4568
4606
|
label: props.schema.name ?? props.name,
|
|
4569
4607
|
schema: props.schema
|
|
4570
|
-
}, 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, {
|
|
4571
4609
|
key: 1,
|
|
4572
4610
|
modelValue: vModel.value,
|
|
4573
4611
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => vModel.value = $event),
|
|
4574
4612
|
label: props.schema.name ?? props.name,
|
|
4575
4613
|
schema: props.schema,
|
|
4576
4614
|
nullable: props.schema.nullable || props.nullable
|
|
4577
|
-
}, 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, {
|
|
4578
4616
|
key: 2,
|
|
4579
4617
|
modelValue: vModel.value,
|
|
4580
4618
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => vModel.value = $event),
|
|
4581
4619
|
label: props.schema.name ?? props.name,
|
|
4582
4620
|
schema: props.schema
|
|
4583
|
-
}, 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, [
|
|
4584
4622
|
props.flat ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(props.schema.properties, (item, key) => {
|
|
4585
4623
|
var _a;
|
|
4586
4624
|
return openBlock(), createBlock(_component_JsonEditor, {
|
|
@@ -4590,9 +4628,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
4590
4628
|
schema: item,
|
|
4591
4629
|
expanded: unref(childExpanded),
|
|
4592
4630
|
name: unref(spaceCamelCase)(key),
|
|
4593
|
-
nullable: !((_a = props.schema.required) == null ? void 0 : _a.includes(key))
|
|
4594
|
-
|
|
4595
|
-
|
|
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, {
|
|
4596
4635
|
key: 1,
|
|
4597
4636
|
label: props.schema.name ?? props.name,
|
|
4598
4637
|
open: props.expanded
|
|
@@ -4607,43 +4646,46 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
4607
4646
|
schema: item,
|
|
4608
4647
|
expanded: unref(childExpanded),
|
|
4609
4648
|
name: unref(spaceCamelCase)(key),
|
|
4610
|
-
nullable: !((_a = props.schema.required) == null ? void 0 : _a.includes(key))
|
|
4611
|
-
|
|
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"]);
|
|
4612
4652
|
}), 128))
|
|
4613
4653
|
]),
|
|
4614
4654
|
_: 1
|
|
4615
4655
|
}, 8, ["label", "open"]))
|
|
4616
|
-
])) : props.schema.type === "array" ? (openBlock(), createBlock(_sfc_main$
|
|
4656
|
+
])) : props.schema.type === "array" ? (openBlock(), createBlock(_sfc_main$x, {
|
|
4617
4657
|
key: 4,
|
|
4618
4658
|
modelValue: vModel.value,
|
|
4619
4659
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => vModel.value = $event),
|
|
4620
4660
|
schema: props.schema,
|
|
4621
4661
|
label: props.schema.name ?? props.name,
|
|
4622
|
-
expanded: props.expanded
|
|
4623
|
-
|
|
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, {
|
|
4624
4665
|
key: 5,
|
|
4625
4666
|
nullable: props.schema.nullable || props.nullable,
|
|
4626
4667
|
items: getItems(props.schema),
|
|
4627
4668
|
modelValue: vModel.value,
|
|
4628
|
-
"onUpdate:modelValue": _cache[
|
|
4669
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => vModel.value = $event),
|
|
4629
4670
|
label: props.schema.name ?? props.name
|
|
4630
|
-
}, 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, {
|
|
4631
4672
|
key: 6,
|
|
4632
4673
|
modelValue: vModel.value,
|
|
4633
|
-
"onUpdate:modelValue": _cache[
|
|
4674
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => vModel.value = $event),
|
|
4634
4675
|
label: props.schema.name ?? props.name
|
|
4635
|
-
}, null, 8, ["modelValue", "label"])) : (openBlock(), createBlock(_sfc_main$
|
|
4676
|
+
}, null, 8, ["modelValue", "label"])) : (openBlock(), createBlock(_sfc_main$I, {
|
|
4636
4677
|
key: 7,
|
|
4637
4678
|
modelValue: vModel.value,
|
|
4638
|
-
"onUpdate:modelValue": _cache[
|
|
4679
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => vModel.value = $event),
|
|
4639
4680
|
label: props.schema.name ?? props.name,
|
|
4640
|
-
multiline: props.schema.multiline
|
|
4641
|
-
|
|
4681
|
+
multiline: props.schema.multiline,
|
|
4682
|
+
placeholder: props.schema.placeholder
|
|
4683
|
+
}, null, 8, ["modelValue", "label", "multiline", "placeholder"]));
|
|
4642
4684
|
};
|
|
4643
4685
|
}
|
|
4644
4686
|
});
|
|
4645
|
-
const _hoisted_1$
|
|
4646
|
-
const _sfc_main$
|
|
4687
|
+
const _hoisted_1$6 = { key: 2 };
|
|
4688
|
+
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
4647
4689
|
__name: "BlocksEditor",
|
|
4648
4690
|
props: {
|
|
4649
4691
|
blocksList: {},
|
|
@@ -4713,24 +4755,24 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
4713
4755
|
}, ["stop"]))
|
|
4714
4756
|
}, [
|
|
4715
4757
|
renderSlot(_ctx.$slots, "default"),
|
|
4716
|
-
createVNode(_sfc_main$
|
|
4758
|
+
createVNode(_sfc_main$G, {
|
|
4717
4759
|
modelValue: currentTab.value,
|
|
4718
4760
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => currentTab.value = $event),
|
|
4719
4761
|
items: tabs.value
|
|
4720
4762
|
}, null, 8, ["modelValue", "items"]),
|
|
4721
|
-
createVNode(_sfc_main$
|
|
4763
|
+
createVNode(_sfc_main$F, { page: currentTab.value }, {
|
|
4722
4764
|
blocks: withCtx(() => [
|
|
4723
|
-
createVNode(_sfc_main$
|
|
4765
|
+
createVNode(_sfc_main$H, { blocks: _ctx.blocksList }, null, 8, ["blocks"])
|
|
4724
4766
|
]),
|
|
4725
4767
|
blockEdit: withCtx(() => [
|
|
4726
|
-
currentBlock.value && currentContentBlock.value ? (openBlock(), createBlock(_sfc_main$
|
|
4768
|
+
currentBlock.value && currentContentBlock.value ? (openBlock(), createBlock(_sfc_main$b, {
|
|
4727
4769
|
key: currentContentBlock.value.id,
|
|
4728
4770
|
schema: currentBlock.value.props,
|
|
4729
4771
|
modelValue: currentContentBlock.value.data,
|
|
4730
4772
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => currentContentBlock.value.data = $event),
|
|
4731
4773
|
flat: ""
|
|
4732
4774
|
}, null, 8, ["schema", "modelValue"])) : currentDataEntry.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
4733
|
-
props.dataEntryScopes ? (openBlock(), createBlock(_sfc_main$
|
|
4775
|
+
props.dataEntryScopes ? (openBlock(), createBlock(_sfc_main$y, {
|
|
4734
4776
|
key: 0,
|
|
4735
4777
|
modelValue: props.dataEntryScopes[currentDataEntry.value.id],
|
|
4736
4778
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => props.dataEntryScopes[currentDataEntry.value.id] = $event),
|
|
@@ -4738,14 +4780,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
4738
4780
|
label: "Применить настройки",
|
|
4739
4781
|
items: settingSelectItems
|
|
4740
4782
|
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
4741
|
-
(openBlock(), createBlock(_sfc_main$
|
|
4783
|
+
(openBlock(), createBlock(_sfc_main$b, {
|
|
4742
4784
|
key: currentDataEntry.value.id,
|
|
4743
4785
|
schema: currentDataEntry.value.props,
|
|
4744
4786
|
modelValue: _ctx.state.data[currentDataEntry.value.id],
|
|
4745
4787
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => _ctx.state.data[currentDataEntry.value.id] = $event),
|
|
4746
4788
|
flat: ""
|
|
4747
4789
|
}, null, 8, ["schema", "modelValue"]))
|
|
4748
|
-
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$
|
|
4790
|
+
], 64)) : (openBlock(), createElementBlock("div", _hoisted_1$6, "Схема для блока не найдена"))
|
|
4749
4791
|
]),
|
|
4750
4792
|
_: 1
|
|
4751
4793
|
}, 8, ["page"])
|
|
@@ -4753,9 +4795,9 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
4753
4795
|
};
|
|
4754
4796
|
}
|
|
4755
4797
|
});
|
|
4756
|
-
const _hoisted_1$
|
|
4757
|
-
const _hoisted_2$
|
|
4758
|
-
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({
|
|
4759
4801
|
__name: "ContentHierarchy",
|
|
4760
4802
|
props: {
|
|
4761
4803
|
contentBlocks: {},
|
|
@@ -4989,47 +5031,20 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
4989
5031
|
onMouseleave: _cache[0] || (_cache[0] = ($event) => emit("update:hoverBlockId", null)),
|
|
4990
5032
|
onClick: ($event) => emit("update:activeBlockId", item.content.id),
|
|
4991
5033
|
onContextmenu: withModifiers(($event) => unref(contextMenu).open($event, item.content), ["stop"])
|
|
4992
|
-
}, toDisplayString(item.block.name), 47, _hoisted_1$
|
|
5034
|
+
}, toDisplayString(item.block.name), 47, _hoisted_1$5);
|
|
4993
5035
|
}), 256)),
|
|
4994
5036
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(places), (item) => {
|
|
4995
5037
|
return openBlock(), createElementBlock("div", {
|
|
4996
5038
|
class: "page-editor-hierarhy__place",
|
|
4997
5039
|
style: normalizeStyle(item.style),
|
|
4998
5040
|
onBlockdrop: ($event) => onPlaceBlockDrop($event, item.index)
|
|
4999
|
-
}, null, 44, _hoisted_2$
|
|
5041
|
+
}, null, 44, _hoisted_2$2);
|
|
5000
5042
|
}), 256)),
|
|
5001
|
-
createVNode(_sfc_main$
|
|
5043
|
+
createVNode(_sfc_main$t, normalizeProps(guardReactiveProps(unref(contextMenu).props)), null, 16)
|
|
5002
5044
|
], 512);
|
|
5003
5045
|
};
|
|
5004
5046
|
}
|
|
5005
5047
|
});
|
|
5006
|
-
const _hoisted_1$5 = { key: 0 };
|
|
5007
|
-
const _hoisted_2$2 = ["onClick"];
|
|
5008
|
-
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
5009
|
-
__name: "ContentSettings",
|
|
5010
|
-
props: /* @__PURE__ */ mergeModels({
|
|
5011
|
-
dataEntries: {}
|
|
5012
|
-
}, {
|
|
5013
|
-
"modelValue": {},
|
|
5014
|
-
"modelModifiers": {}
|
|
5015
|
-
}),
|
|
5016
|
-
emits: ["update:modelValue"],
|
|
5017
|
-
setup(__props) {
|
|
5018
|
-
const props = __props;
|
|
5019
|
-
const model = useModel(__props, "modelValue");
|
|
5020
|
-
return (_ctx, _cache) => {
|
|
5021
|
-
return props.dataEntries.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_1$5, [
|
|
5022
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(props.dataEntries, (item) => {
|
|
5023
|
-
var _a;
|
|
5024
|
-
return openBlock(), createElementBlock("div", {
|
|
5025
|
-
class: normalizeClass(["page-editor-hierarchy__item", { active: ((_a = model.value) == null ? void 0 : _a.slice(5)) === item.id }]),
|
|
5026
|
-
onClick: ($event) => model.value = "data:" + item.id
|
|
5027
|
-
}, toDisplayString(item.title ?? item.id), 11, _hoisted_2$2);
|
|
5028
|
-
}), 256))
|
|
5029
|
-
])) : createCommentVNode("", true);
|
|
5030
|
-
};
|
|
5031
|
-
}
|
|
5032
|
-
});
|
|
5033
5048
|
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
5034
5049
|
__name: "HierarchySidebar",
|
|
5035
5050
|
props: {
|
|
@@ -5043,22 +5058,16 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
5043
5058
|
return (_ctx, _cache) => {
|
|
5044
5059
|
return openBlock(), createElementBlock("div", {
|
|
5045
5060
|
class: "editor-hierarchy",
|
|
5046
|
-
onBlockdrop: _cache[
|
|
5061
|
+
onBlockdrop: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
5047
5062
|
}, ["stop"]))
|
|
5048
5063
|
}, [
|
|
5049
5064
|
renderSlot(_ctx.$slots, "default"),
|
|
5050
|
-
_cache[
|
|
5065
|
+
_cache[3] || (_cache[3] = createElementVNode("div", { class: "title" }, "Блоки", -1)),
|
|
5051
5066
|
createVNode(_sfc_main$9, {
|
|
5052
|
-
modelValue: props.control.activeBlockId.value,
|
|
5053
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => props.control.activeBlockId.value = $event),
|
|
5054
|
-
dataEntries: props.dataEntries
|
|
5055
|
-
}, null, 8, ["modelValue", "dataEntries"]),
|
|
5056
|
-
_cache[5] || (_cache[5] = createElementVNode("div", { class: "title" }, "Блоки", -1)),
|
|
5057
|
-
createVNode(_sfc_main$a, {
|
|
5058
5067
|
"hover-block-id": props.control.hoverBlockId.value,
|
|
5059
|
-
"onUpdate:hoverBlockId": _cache[
|
|
5068
|
+
"onUpdate:hoverBlockId": _cache[0] || (_cache[0] = ($event) => props.control.hoverBlockId.value = $event),
|
|
5060
5069
|
"active-block-id": props.control.activeBlockId.value,
|
|
5061
|
-
"onUpdate:activeBlockId": _cache[
|
|
5070
|
+
"onUpdate:activeBlockId": _cache[1] || (_cache[1] = ($event) => props.control.activeBlockId.value = $event),
|
|
5062
5071
|
"content-blocks": props.state.content,
|
|
5063
5072
|
"blocks-map": props.blocksMap
|
|
5064
5073
|
}, null, 8, ["hover-block-id", "active-block-id", "content-blocks", "blocks-map"])
|
|
@@ -5274,12 +5283,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
5274
5283
|
dialog.close();
|
|
5275
5284
|
});
|
|
5276
5285
|
return (_ctx, _cache) => {
|
|
5277
|
-
return openBlock(), createBlock(_sfc_main$
|
|
5286
|
+
return openBlock(), createBlock(_sfc_main$r, { style: { "width": "500px" } }, {
|
|
5278
5287
|
header: withCtx(() => [
|
|
5279
5288
|
createTextVNode(toDisplayString(props.item ? "Редактировать" : "Создать") + " страницу", 1)
|
|
5280
5289
|
]),
|
|
5281
5290
|
actions: withCtx(() => [
|
|
5282
|
-
createVNode(_sfc_main$
|
|
5291
|
+
createVNode(_sfc_main$u, {
|
|
5283
5292
|
disabled: unref(pending),
|
|
5284
5293
|
large: "",
|
|
5285
5294
|
onClick: unref(apply)
|
|
@@ -5295,15 +5304,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
5295
5304
|
default: withCtx(() => {
|
|
5296
5305
|
var _a;
|
|
5297
5306
|
return [
|
|
5298
|
-
createVNode(_sfc_main$
|
|
5307
|
+
createVNode(_sfc_main$I, mergeProps(unref(register)("name"), {
|
|
5299
5308
|
label: "Название страницы",
|
|
5300
5309
|
autofocus: ""
|
|
5301
5310
|
}), null, 16),
|
|
5302
|
-
createVNode(_sfc_main$
|
|
5311
|
+
createVNode(_sfc_main$I, mergeProps(unref(register)("path"), {
|
|
5303
5312
|
prefix: (_a = currentFoler.value) == null ? void 0 : _a.path,
|
|
5304
5313
|
label: "URL адрес"
|
|
5305
5314
|
}), null, 16, ["prefix"]),
|
|
5306
|
-
folders.value.length > 0 ? (openBlock(), createBlock(_sfc_main$
|
|
5315
|
+
folders.value.length > 0 ? (openBlock(), createBlock(_sfc_main$y, mergeProps({
|
|
5307
5316
|
key: 0,
|
|
5308
5317
|
nullable: ""
|
|
5309
5318
|
}, unref(register)("folderId"), {
|
|
@@ -5405,7 +5414,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
5405
5414
|
class: "v-table__check",
|
|
5406
5415
|
onClick: withModifiers(checkboxClick, ["prevent", "stop"])
|
|
5407
5416
|
}, [
|
|
5408
|
-
createVNode(_sfc_main$
|
|
5417
|
+
createVNode(_sfc_main$n, {
|
|
5409
5418
|
modelValue: modelValue.value.has(item),
|
|
5410
5419
|
"onUpdate:modelValue": ($event) => modelValue.value.has(item) ? modelValue.value.delete(item) : modelValue.value.add(item)
|
|
5411
5420
|
}, null, 8, ["modelValue", "onUpdate:modelValue"])
|
|
@@ -5442,7 +5451,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
5442
5451
|
path: { title: "Путь" }
|
|
5443
5452
|
};
|
|
5444
5453
|
return (_ctx, _cache) => {
|
|
5445
|
-
return openBlock(), createBlock(_sfc_main$
|
|
5454
|
+
return openBlock(), createBlock(_sfc_main$r, { class: "standart" }, {
|
|
5446
5455
|
header: withCtx(() => _cache[0] || (_cache[0] = [
|
|
5447
5456
|
createTextVNode(" Страницы проекта ")
|
|
5448
5457
|
])),
|
|
@@ -5470,51 +5479,85 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5470
5479
|
onConfirm: { type: Function }
|
|
5471
5480
|
},
|
|
5472
5481
|
setup(__props) {
|
|
5473
|
-
var _a, _b;
|
|
5474
5482
|
const props = __props;
|
|
5475
5483
|
const { register, handleSubmit } = useForm({
|
|
5476
5484
|
name: props.page.name,
|
|
5477
|
-
path: props.page.path
|
|
5478
|
-
title:
|
|
5479
|
-
description:
|
|
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
|
+
];
|
|
5480
5496
|
});
|
|
5497
|
+
const state = inject("state");
|
|
5498
|
+
const onEdit = (key) => {
|
|
5499
|
+
if (!state.dataEntryScopes[currentTab.value]) {
|
|
5500
|
+
state.dataEntryScopes[currentTab.value] = "page";
|
|
5501
|
+
}
|
|
5502
|
+
};
|
|
5481
5503
|
const dialog = useDialog();
|
|
5482
5504
|
const apply = handleSubmit(async (values) => {
|
|
5483
5505
|
await props.onConfirm(values);
|
|
5484
5506
|
dialog.close();
|
|
5485
5507
|
});
|
|
5486
5508
|
return (_ctx, _cache) => {
|
|
5487
|
-
return openBlock(), createBlock(_sfc_main$
|
|
5488
|
-
header: withCtx(() => _cache[
|
|
5509
|
+
return openBlock(), createBlock(_sfc_main$r, { class: "standart" }, {
|
|
5510
|
+
header: withCtx(() => _cache[1] || (_cache[1] = [
|
|
5489
5511
|
createTextVNode("Настройки страницы")
|
|
5490
5512
|
])),
|
|
5491
5513
|
actions: withCtx(() => [
|
|
5492
|
-
createVNode(_sfc_main$
|
|
5514
|
+
createVNode(_sfc_main$u, {
|
|
5493
5515
|
large: "",
|
|
5494
5516
|
onClick: unref(apply)
|
|
5495
5517
|
}, {
|
|
5496
|
-
default: withCtx(() => _cache[
|
|
5518
|
+
default: withCtx(() => _cache[2] || (_cache[2] = [
|
|
5497
5519
|
createTextVNode("Сохранить")
|
|
5498
5520
|
])),
|
|
5499
5521
|
_: 1,
|
|
5500
|
-
__: [
|
|
5522
|
+
__: [2]
|
|
5501
5523
|
}, 8, ["onClick"])
|
|
5502
5524
|
]),
|
|
5503
5525
|
default: withCtx(() => [
|
|
5504
|
-
createVNode(_sfc_main$
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
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
|
+
})
|
|
5515
5543
|
]),
|
|
5516
|
-
_:
|
|
5517
|
-
}
|
|
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"])
|
|
5518
5561
|
]),
|
|
5519
5562
|
_: 1
|
|
5520
5563
|
});
|
|
@@ -5613,6 +5656,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5613
5656
|
const createNewPage = () => {
|
|
5614
5657
|
dialog.open(_sfc_main$6, { folders: folders.value, onCreate: async (values) => {
|
|
5615
5658
|
await request("/@mechanica/pages", values);
|
|
5659
|
+
mutateRequest(pagesRequest);
|
|
5616
5660
|
} });
|
|
5617
5661
|
};
|
|
5618
5662
|
const openPage = () => {
|
|
@@ -5621,8 +5665,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5621
5665
|
const openPageSettingsDialog = () => {
|
|
5622
5666
|
dialog.open(_sfc_main$3, { page: props.state.currentPage, onConfirm: async (values) => {
|
|
5623
5667
|
await request(`/@mechanica/pages?path=${encodeURIComponent(props.state.currentPage.path)}`, values);
|
|
5624
|
-
props.state.currentPage.meta.title = values.title;
|
|
5625
|
-
props.state.currentPage.meta.description = values.description;
|
|
5626
5668
|
props.state.currentPage.name = values.name;
|
|
5627
5669
|
} });
|
|
5628
5670
|
};
|
|
@@ -5632,7 +5674,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
5632
5674
|
{ title: "Новая страница...", onClick: createNewPage }
|
|
5633
5675
|
]);
|
|
5634
5676
|
return (_ctx, _cache) => {
|
|
5635
|
-
return openBlock(), createBlock(_sfc_main$
|
|
5677
|
+
return openBlock(), createBlock(_sfc_main$t, {
|
|
5636
5678
|
placement: "bottom",
|
|
5637
5679
|
fitAnchor: "",
|
|
5638
5680
|
offset: 4,
|
|
@@ -5686,6 +5728,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5686
5728
|
const dragMode = ref(false);
|
|
5687
5729
|
provide("dragMode", dragMode);
|
|
5688
5730
|
const state = reactive(processState(JSON.parse(JSON.stringify(window.state))));
|
|
5731
|
+
provide("state", state);
|
|
5689
5732
|
const contentBlocks = computed(() => state.content);
|
|
5690
5733
|
useEventListener$1(document, "blockdrop", (e) => {
|
|
5691
5734
|
var _a;
|
|
@@ -5774,22 +5817,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5774
5817
|
]),
|
|
5775
5818
|
_: 1
|
|
5776
5819
|
}),
|
|
5777
|
-
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$
|
|
5820
|
+
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$N, {
|
|
5778
5821
|
key: 0,
|
|
5779
5822
|
element: unref(control).hoverBlockElement.value
|
|
5780
5823
|
}, null, 8, ["element"])) : createCommentVNode("", true),
|
|
5781
|
-
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$
|
|
5824
|
+
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$N, {
|
|
5782
5825
|
key: 1,
|
|
5783
5826
|
element: unref(control).activeBlockElement.value,
|
|
5784
5827
|
resizable: ""
|
|
5785
5828
|
}, null, 8, ["element"])) : createCommentVNode("", true),
|
|
5786
|
-
unref(control).insertedPlace.value ? (openBlock(), createBlock(_sfc_main$
|
|
5829
|
+
unref(control).insertedPlace.value ? (openBlock(), createBlock(_sfc_main$M, {
|
|
5787
5830
|
key: 2,
|
|
5788
5831
|
top: unref(control).insertedPlace.value.top
|
|
5789
5832
|
}, null, 8, ["top"])) : createCommentVNode("", true),
|
|
5790
5833
|
createVNode(Transition, null, {
|
|
5791
5834
|
default: withCtx(() => [
|
|
5792
|
-
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$
|
|
5835
|
+
controlsOpened.value ? (openBlock(), createBlock(_sfc_main$a, {
|
|
5793
5836
|
key: 0,
|
|
5794
5837
|
class: "editor-sidebar-right editor-component",
|
|
5795
5838
|
onBlockdrop: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
@@ -5838,7 +5881,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
5838
5881
|
]),
|
|
5839
5882
|
_: 1
|
|
5840
5883
|
}),
|
|
5841
|
-
createVNode(_sfc_main$
|
|
5884
|
+
createVNode(_sfc_main$s)
|
|
5842
5885
|
], 64);
|
|
5843
5886
|
};
|
|
5844
5887
|
}
|