@sepveneto/dnde 0.2.2 → 0.3.0
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 +217 -92
- package/global.d.ts +3 -1
- package/package.json +5 -3
- package/dist/App.ce.vue.d.ts +0 -51
- package/dist/Editor.vue.d.ts +0 -142
- package/dist/assets/container.vue.d.ts +0 -2
- package/dist/assets/puzzle.vue.d.ts +0 -2
- package/dist/assets/widget.vue.d.ts +0 -2
- package/dist/components/ConfigForm.vue.d.ts +0 -14
- package/dist/components/ConfigRender.vue.d.ts +0 -17
- package/dist/components/NodeContainer.vue.d.ts +0 -6
- package/dist/components/NodeOperate.vue.d.ts +0 -6
- package/dist/components/NodePlugin.vue.d.ts +0 -93
- package/dist/components/NodeWrap.vue.d.ts +0 -16
- package/dist/components/StyleNumber.vue.d.ts +0 -9
- package/dist/layout/configPanel.vue.d.ts +0 -4
- package/dist/layout/treePanel.item.vue.d.ts +0 -6
- package/dist/layout/treePanel.vue.d.ts +0 -2
- package/dist/layout/widgetsMenu.vue.d.ts +0 -24
- package/dist/main.d.ts +0 -25
- package/dist/props.d.ts +0 -25
- package/dist/store/app.d.ts +0 -25
- package/dist/store/editor.d.ts +0 -86
- package/dist/store/index.d.ts +0 -2
- package/dist/utils.d.ts +0 -14
package/dist/editor.js
CHANGED
|
@@ -80501,6 +80501,17 @@ function watchImmediate(source, cb, options) {
|
|
|
80501
80501
|
);
|
|
80502
80502
|
}
|
|
80503
80503
|
|
|
80504
|
+
function watchOnce(source, cb, options) {
|
|
80505
|
+
return watch(
|
|
80506
|
+
source,
|
|
80507
|
+
cb,
|
|
80508
|
+
{
|
|
80509
|
+
...options,
|
|
80510
|
+
once: true
|
|
80511
|
+
}
|
|
80512
|
+
);
|
|
80513
|
+
}
|
|
80514
|
+
|
|
80504
80515
|
const defaultWindow = isClient ? window : void 0;
|
|
80505
80516
|
|
|
80506
80517
|
function unrefElement(elRef) {
|
|
@@ -103508,6 +103519,33 @@ class WidgetPlugin {
|
|
|
103508
103519
|
this.list.push(panel);
|
|
103509
103520
|
}
|
|
103510
103521
|
}
|
|
103522
|
+
class ConfigPlugin {
|
|
103523
|
+
list = [];
|
|
103524
|
+
constructor(_ctx) {
|
|
103525
|
+
}
|
|
103526
|
+
get defaultPane() {
|
|
103527
|
+
if (!this.list.length)
|
|
103528
|
+
return "";
|
|
103529
|
+
return this.list[0].name;
|
|
103530
|
+
}
|
|
103531
|
+
addPanel(panel) {
|
|
103532
|
+
this.list.push(panel);
|
|
103533
|
+
}
|
|
103534
|
+
async validate(data) {
|
|
103535
|
+
for (const pane of this.list) {
|
|
103536
|
+
if (!data[pane.name])
|
|
103537
|
+
continue;
|
|
103538
|
+
const _rules = pane.attributes.reduce((all, curr) => {
|
|
103539
|
+
all[curr.key] = curr.rules || [];
|
|
103540
|
+
return all;
|
|
103541
|
+
}, {}) || {};
|
|
103542
|
+
const valid = await new Schema(_rules).validate(data[pane.name]).catch(() => {
|
|
103543
|
+
return false;
|
|
103544
|
+
});
|
|
103545
|
+
return !!valid;
|
|
103546
|
+
}
|
|
103547
|
+
}
|
|
103548
|
+
}
|
|
103511
103549
|
const useEditor = defineStore("editor", () => {
|
|
103512
103550
|
const app = useApp();
|
|
103513
103551
|
const shadowRoot = shallowRef();
|
|
@@ -103537,14 +103575,15 @@ const useEditor = defineStore("editor", () => {
|
|
|
103537
103575
|
type: "page",
|
|
103538
103576
|
defaultData: { list: [] }
|
|
103539
103577
|
}));
|
|
103540
|
-
const rootNode =
|
|
103541
|
-
const selected = ref(rootNode.wid);
|
|
103578
|
+
const rootNode = ref(new Node$1(defaultPage));
|
|
103542
103579
|
const hovering = ref();
|
|
103543
103580
|
const nodeMap = /* @__PURE__ */ new Map();
|
|
103544
|
-
nodeMap.set(rootNode.wid, rootNode);
|
|
103581
|
+
nodeMap.set(rootNode.value.wid, rootNode.value);
|
|
103582
|
+
const selected = ref(rootNode.value.wid);
|
|
103545
103583
|
const plugins = {
|
|
103546
103584
|
helper: new HelperPlugin({ addNode, delNode }),
|
|
103547
|
-
widget: new WidgetPlugin({ addPanel })
|
|
103585
|
+
widget: new WidgetPlugin({ addPanel }),
|
|
103586
|
+
config: new ConfigPlugin()
|
|
103548
103587
|
};
|
|
103549
103588
|
const selectedNode = computed(() => {
|
|
103550
103589
|
const node = nodeMap.get(selected.value);
|
|
@@ -103571,7 +103610,7 @@ const useEditor = defineStore("editor", () => {
|
|
|
103571
103610
|
});
|
|
103572
103611
|
function addPanel() {
|
|
103573
103612
|
}
|
|
103574
|
-
function addNode(node, pNode = rootNode, manual = false) {
|
|
103613
|
+
function addNode(node, pNode = rootNode.value, manual = false) {
|
|
103575
103614
|
node.level = pNode.level + 1;
|
|
103576
103615
|
nodeMap.set(node.wid, node);
|
|
103577
103616
|
node.parent = pNode;
|
|
@@ -103585,15 +103624,15 @@ const useEditor = defineStore("editor", () => {
|
|
|
103585
103624
|
}
|
|
103586
103625
|
node?.parent?.list.splice(index, 1);
|
|
103587
103626
|
nodeMap.delete(wid);
|
|
103588
|
-
selected.value = rootNode.wid;
|
|
103627
|
+
selected.value = rootNode.value.wid;
|
|
103589
103628
|
}
|
|
103590
103629
|
function selectNode(wid) {
|
|
103591
|
-
selected.value = wid || rootNode.wid;
|
|
103630
|
+
selected.value = wid || rootNode.value.wid;
|
|
103592
103631
|
}
|
|
103593
103632
|
function getData() {
|
|
103594
|
-
return rootNode.parse();
|
|
103633
|
+
return rootNode.value.parse();
|
|
103595
103634
|
}
|
|
103596
|
-
function
|
|
103635
|
+
function createNodes(data, parent = rootNode.value) {
|
|
103597
103636
|
data.forEach((item) => {
|
|
103598
103637
|
const widget2 = app.widgetMap.get(item._view);
|
|
103599
103638
|
if (!widget2)
|
|
@@ -103606,10 +103645,27 @@ const useEditor = defineStore("editor", () => {
|
|
|
103606
103645
|
};
|
|
103607
103646
|
const node = new Node$1(widget2, info);
|
|
103608
103647
|
addNode(node, parent, true);
|
|
103648
|
+
if (list && list.length > 0) {
|
|
103649
|
+
createNodes(list, node);
|
|
103650
|
+
}
|
|
103609
103651
|
});
|
|
103610
103652
|
}
|
|
103653
|
+
function setData(data) {
|
|
103654
|
+
const widget2 = app.widgetMap.get(data._view) || defaultPage;
|
|
103655
|
+
const { _uuid, _name, _view, style, list, ...props } = data;
|
|
103656
|
+
const info = {
|
|
103657
|
+
props,
|
|
103658
|
+
style,
|
|
103659
|
+
list: []
|
|
103660
|
+
};
|
|
103661
|
+
rootNode.value = new Node$1(widget2, info);
|
|
103662
|
+
nodeMap.delete(selected.value);
|
|
103663
|
+
selected.value = rootNode.value.wid;
|
|
103664
|
+
nodeMap.set(rootNode.value.wid, rootNode.value);
|
|
103665
|
+
createNodes(list);
|
|
103666
|
+
}
|
|
103611
103667
|
function setSchema(schema) {
|
|
103612
|
-
rootNode.widget._data.schema = schema;
|
|
103668
|
+
rootNode.value.widget._data.schema = schema;
|
|
103613
103669
|
}
|
|
103614
103670
|
return {
|
|
103615
103671
|
rootNode,
|
|
@@ -103959,7 +104015,7 @@ const NodeWrap = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["styles", [_style_0$
|
|
|
103959
104015
|
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
103960
104016
|
__name: "StyleNumber",
|
|
103961
104017
|
props: {
|
|
103962
|
-
modelValue: { type:
|
|
104018
|
+
modelValue: { type: null }
|
|
103963
104019
|
},
|
|
103964
104020
|
emits: ["update:modelValue"],
|
|
103965
104021
|
setup(__props, { emit: __emit }) {
|
|
@@ -103991,7 +104047,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
103991
104047
|
};
|
|
103992
104048
|
});
|
|
103993
104049
|
watch(() => props.modelValue, (val) => {
|
|
103994
|
-
value.value = val;
|
|
104050
|
+
value.value = val || "";
|
|
103995
104051
|
}, { immediate: true });
|
|
103996
104052
|
return (_ctx, _cache) => {
|
|
103997
104053
|
const _component_ElInputNumber = resolveComponent("ElInputNumber");
|
|
@@ -104019,12 +104075,19 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
104019
104075
|
setup(__props) {
|
|
104020
104076
|
const model = useModel(__props, "modelValue");
|
|
104021
104077
|
const configRender = loadFromRemote("widgets", "configRender");
|
|
104078
|
+
const editor = useEditor();
|
|
104079
|
+
const appendTo = shallowRef();
|
|
104080
|
+
onMounted(() => {
|
|
104081
|
+
const parent = editor.shadowRoot.querySelector(".mpd-editor");
|
|
104082
|
+
appendTo.value = parent;
|
|
104083
|
+
});
|
|
104022
104084
|
return (_ctx, _cache) => {
|
|
104023
104085
|
const _component_ElInput = resolveComponent("ElInput");
|
|
104024
104086
|
const _component_ElOption = resolveComponent("ElOption");
|
|
104025
104087
|
const _component_ElSelect = resolveComponent("ElSelect");
|
|
104026
104088
|
const _component_ElInputNumber = resolveComponent("ElInputNumber");
|
|
104027
104089
|
const _component_ElSwitch = resolveComponent("ElSwitch");
|
|
104090
|
+
const _component_ElDatePicker = resolveComponent("ElDatePicker");
|
|
104028
104091
|
return _ctx.config.type === "input" ? (openBlock(), createBlock(_component_ElInput, mergeProps({
|
|
104029
104092
|
key: 0,
|
|
104030
104093
|
modelValue: model.value,
|
|
@@ -104032,7 +104095,8 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
104032
104095
|
}, _ctx.config.attrs), null, 16, ["modelValue"])) : _ctx.config.type === "select" ? (openBlock(), createBlock(_component_ElSelect, mergeProps({
|
|
104033
104096
|
key: 1,
|
|
104034
104097
|
modelValue: model.value,
|
|
104035
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => model.value = $event)
|
|
104098
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => model.value = $event),
|
|
104099
|
+
"append-to": appendTo.value
|
|
104036
104100
|
}, _ctx.config.attrs), {
|
|
104037
104101
|
default: withCtx(() => [
|
|
104038
104102
|
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.config.options, (item, index) => {
|
|
@@ -104040,7 +104104,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
104040
104104
|
}), 128))
|
|
104041
104105
|
]),
|
|
104042
104106
|
_: 1
|
|
104043
|
-
}, 16, ["modelValue"])) : _ctx.config.type === "number" ? (openBlock(), createBlock(_component_ElInputNumber, mergeProps({
|
|
104107
|
+
}, 16, ["modelValue", "append-to"])) : _ctx.config.type === "number" ? (openBlock(), createBlock(_component_ElInputNumber, mergeProps({
|
|
104044
104108
|
key: 2,
|
|
104045
104109
|
modelValue: model.value,
|
|
104046
104110
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => model.value = $event),
|
|
@@ -104053,10 +104117,15 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
|
104053
104117
|
key: 4,
|
|
104054
104118
|
modelValue: model.value,
|
|
104055
104119
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => model.value = $event)
|
|
104056
|
-
}, _ctx.config.attrs), null, 16, ["modelValue"])) : (openBlock(), createBlock(
|
|
104120
|
+
}, _ctx.config.attrs), null, 16, ["modelValue"])) : _ctx.config.type === "datetimePicker" ? (openBlock(), createBlock(_component_ElDatePicker, mergeProps({
|
|
104057
104121
|
key: 5,
|
|
104058
104122
|
modelValue: model.value,
|
|
104059
104123
|
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => model.value = $event),
|
|
104124
|
+
"append-to": appendTo.value
|
|
104125
|
+
}, _ctx.config.attrs), null, 16, ["modelValue", "append-to"])) : (openBlock(), createBlock(resolveDynamicComponent(unref(configRender)), mergeProps({
|
|
104126
|
+
key: 6,
|
|
104127
|
+
modelValue: model.value,
|
|
104128
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => model.value = $event),
|
|
104060
104129
|
config: model.value,
|
|
104061
104130
|
type: _ctx.config.type
|
|
104062
104131
|
}, _ctx.config.attrs), null, 16, ["modelValue", "config", "type"]));
|
|
@@ -104068,7 +104137,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
104068
104137
|
__name: "ConfigForm",
|
|
104069
104138
|
props: {
|
|
104070
104139
|
list: { type: Array },
|
|
104071
|
-
modelValue: { type:
|
|
104140
|
+
modelValue: { type: null }
|
|
104072
104141
|
},
|
|
104073
104142
|
emits: ["update:modelValue"],
|
|
104074
104143
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -104081,18 +104150,23 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
104081
104150
|
});
|
|
104082
104151
|
const form = ref({});
|
|
104083
104152
|
watch(() => props.modelValue, () => {
|
|
104084
|
-
form.value = props.modelValue;
|
|
104153
|
+
form.value = props.modelValue || {};
|
|
104085
104154
|
}, { immediate: true });
|
|
104086
104155
|
function updateData(key, val) {
|
|
104087
104156
|
const path = key.split(".");
|
|
104088
104157
|
const _path = path.slice(0, -1);
|
|
104089
|
-
const parent = path.length === 1 ? form.value : _path.reduce((obj, curr) => {
|
|
104158
|
+
const parent = (path.length === 1 ? form.value : _path.reduce((obj, curr) => {
|
|
104159
|
+
if (!obj) {
|
|
104160
|
+
obj = {};
|
|
104161
|
+
}
|
|
104090
104162
|
return obj[curr];
|
|
104091
|
-
}, form.value);
|
|
104163
|
+
}, form.value)) || {};
|
|
104092
104164
|
parent[path.slice(-1)[0]] = val;
|
|
104093
104165
|
emit("update:modelValue", form.value);
|
|
104094
104166
|
}
|
|
104095
104167
|
function getData(data, key) {
|
|
104168
|
+
if (!data)
|
|
104169
|
+
return null;
|
|
104096
104170
|
const path = key.split(".");
|
|
104097
104171
|
if (path.length === 1) {
|
|
104098
104172
|
return data[key];
|
|
@@ -104103,7 +104177,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
104103
104177
|
}
|
|
104104
104178
|
return obj[curr] == null ? "" : obj[curr];
|
|
104105
104179
|
}, data);
|
|
104106
|
-
return res;
|
|
104180
|
+
return res || null;
|
|
104107
104181
|
}
|
|
104108
104182
|
return (_ctx, _cache) => {
|
|
104109
104183
|
const _component_ElFormItem = resolveComponent("ElFormItem");
|
|
@@ -104153,16 +104227,33 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
104153
104227
|
const propSchema = computed(() => editor.selectedNode?.widget.props);
|
|
104154
104228
|
const refProp = useTemplateRef("propRef");
|
|
104155
104229
|
const refStyle = useTemplateRef("styleRef");
|
|
104230
|
+
const refPageConfig = shallowRef([]);
|
|
104231
|
+
const pageActive = ref();
|
|
104156
104232
|
const active = ref("props");
|
|
104233
|
+
watchOnce(() => editor.plugins.config.defaultPane, (name) => {
|
|
104234
|
+
pageActive.value = name;
|
|
104235
|
+
});
|
|
104157
104236
|
watch(() => editor.selected, () => {
|
|
104237
|
+
refPageConfig.value = [];
|
|
104238
|
+
pageActive.value = editor.plugins.config.defaultPane;
|
|
104158
104239
|
active.value = "props";
|
|
104159
104240
|
nextTick().then(() => {
|
|
104241
|
+
refPageConfig.value?.forEach((item) => {
|
|
104242
|
+
item?.ref?.clearValidate();
|
|
104243
|
+
});
|
|
104160
104244
|
refProp.value?.clearValidate();
|
|
104161
104245
|
refStyle.value?.clearValidate();
|
|
104162
104246
|
});
|
|
104163
104247
|
});
|
|
104164
104248
|
__expose({
|
|
104165
104249
|
async validate() {
|
|
104250
|
+
if (refPageConfig.value) {
|
|
104251
|
+
for (const pane of refPageConfig.value) {
|
|
104252
|
+
await pane.ref.validate()?.catch(() => {
|
|
104253
|
+
pageActive.value = pane.name;
|
|
104254
|
+
});
|
|
104255
|
+
}
|
|
104256
|
+
}
|
|
104166
104257
|
const propValid = await refProp.value?.validate()?.catch(() => {
|
|
104167
104258
|
active.value = "props";
|
|
104168
104259
|
});
|
|
@@ -104178,66 +104269,87 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
104178
104269
|
const _component_ElBreadcrumb = resolveComponent("ElBreadcrumb");
|
|
104179
104270
|
const _component_ElTabPane = resolveComponent("ElTabPane");
|
|
104180
104271
|
const _component_ElTabs = resolveComponent("ElTabs");
|
|
104181
|
-
|
|
104182
|
-
|
|
104183
|
-
|
|
104272
|
+
return openBlock(), createElementBlock("div", null, [
|
|
104273
|
+
createVNode(_component_ElBreadcrumb, { "separator-icon": unref(arrow_right_default) }, {
|
|
104274
|
+
default: withCtx(() => [
|
|
104275
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(list.value, (item) => {
|
|
104276
|
+
return openBlock(), createBlock(_component_ElBreadcrumbItem, {
|
|
104277
|
+
key: item.wid,
|
|
104278
|
+
onClick: ($event) => unref(editor).selected = item.wid
|
|
104279
|
+
}, {
|
|
104280
|
+
default: withCtx(() => [
|
|
104281
|
+
createBaseVNode("span", _hoisted_1$3, toDisplayString(item.name), 1)
|
|
104282
|
+
]),
|
|
104283
|
+
_: 2
|
|
104284
|
+
}, 1032, ["onClick"]);
|
|
104285
|
+
}), 128))
|
|
104286
|
+
]),
|
|
104287
|
+
_: 1
|
|
104288
|
+
}, 8, ["separator-icon"]),
|
|
104289
|
+
unref(editor).selected === unref(editor).rootNode.wid ? (openBlock(), createBlock(_component_ElTabs, {
|
|
104290
|
+
key: 0,
|
|
104291
|
+
modelValue: pageActive.value,
|
|
104292
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => pageActive.value = $event)
|
|
104293
|
+
}, {
|
|
104184
104294
|
default: withCtx(() => [
|
|
104185
|
-
|
|
104295
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(editor).plugins.config.list, (pane) => {
|
|
104296
|
+
return openBlock(), createBlock(_component_ElTabPane, {
|
|
104297
|
+
key: pane.name,
|
|
104298
|
+
label: pane.label,
|
|
104299
|
+
name: pane.name
|
|
104300
|
+
}, {
|
|
104301
|
+
default: withCtx(() => [
|
|
104302
|
+
createVNode(_sfc_main$7, {
|
|
104303
|
+
ref_for: true,
|
|
104304
|
+
ref: (ref2) => refPageConfig.value.push({ ref: ref2, name: pane.name }),
|
|
104305
|
+
modelValue: unref(editor).selectedNode.data[pane.name],
|
|
104306
|
+
"onUpdate:modelValue": ($event) => unref(editor).selectedNode.data[pane.name] = $event,
|
|
104307
|
+
list: pane.attributes
|
|
104308
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "list"])
|
|
104309
|
+
]),
|
|
104310
|
+
_: 2
|
|
104311
|
+
}, 1032, ["label", "name"]);
|
|
104312
|
+
}), 128))
|
|
104313
|
+
]),
|
|
104314
|
+
_: 1
|
|
104315
|
+
}, 8, ["modelValue"])) : (openBlock(), createBlock(_component_ElTabs, {
|
|
104316
|
+
key: 1,
|
|
104317
|
+
modelValue: active.value,
|
|
104318
|
+
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => active.value = $event)
|
|
104319
|
+
}, {
|
|
104320
|
+
default: withCtx(() => [
|
|
104321
|
+
createVNode(_component_ElTabPane, {
|
|
104322
|
+
label: "属性",
|
|
104323
|
+
name: "props"
|
|
104324
|
+
}, {
|
|
104186
104325
|
default: withCtx(() => [
|
|
104187
|
-
(
|
|
104188
|
-
|
|
104189
|
-
|
|
104190
|
-
|
|
104191
|
-
|
|
104192
|
-
|
|
104193
|
-
createBaseVNode("span", _hoisted_1$3, toDisplayString(item.name), 1)
|
|
104194
|
-
]),
|
|
104195
|
-
_: 2
|
|
104196
|
-
}, 1032, ["onClick"]);
|
|
104197
|
-
}), 128))
|
|
104326
|
+
createVNode(_sfc_main$7, {
|
|
104327
|
+
ref: "propRef",
|
|
104328
|
+
modelValue: unref(editor).selectedNode.data,
|
|
104329
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(editor).selectedNode.data = $event),
|
|
104330
|
+
list: propSchema.value
|
|
104331
|
+
}, null, 8, ["modelValue", "list"])
|
|
104198
104332
|
]),
|
|
104199
104333
|
_: 1
|
|
104200
|
-
}
|
|
104201
|
-
|
|
104202
|
-
|
|
104203
|
-
|
|
104334
|
+
}),
|
|
104335
|
+
styleSchema.value.length > 0 ? (openBlock(), createBlock(_component_ElTabPane, {
|
|
104336
|
+
key: 0,
|
|
104337
|
+
label: "样式",
|
|
104338
|
+
name: "style"
|
|
104204
104339
|
}, {
|
|
104205
104340
|
default: withCtx(() => [
|
|
104206
|
-
createVNode(
|
|
104207
|
-
|
|
104208
|
-
|
|
104209
|
-
|
|
104210
|
-
|
|
104211
|
-
|
|
104212
|
-
ref: "propRef",
|
|
104213
|
-
modelValue: unref(editor).selectedNode.data,
|
|
104214
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(editor).selectedNode.data = $event),
|
|
104215
|
-
list: propSchema.value
|
|
104216
|
-
}, null, 8, ["modelValue", "list"])
|
|
104217
|
-
]),
|
|
104218
|
-
_: 1
|
|
104219
|
-
}),
|
|
104220
|
-
styleSchema.value.length > 0 ? (openBlock(), createBlock(_component_ElTabPane, {
|
|
104221
|
-
key: 0,
|
|
104222
|
-
label: "样式",
|
|
104223
|
-
name: "style"
|
|
104224
|
-
}, {
|
|
104225
|
-
default: withCtx(() => [
|
|
104226
|
-
createVNode(_sfc_main$7, {
|
|
104227
|
-
ref: "styleRef",
|
|
104228
|
-
modelValue: unref(editor).selectedNode.style,
|
|
104229
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => unref(editor).selectedNode.style = $event),
|
|
104230
|
-
list: styleSchema.value
|
|
104231
|
-
}, null, 8, ["modelValue", "list"])
|
|
104232
|
-
]),
|
|
104233
|
-
_: 1
|
|
104234
|
-
})) : createCommentVNode("", true)
|
|
104341
|
+
createVNode(_sfc_main$7, {
|
|
104342
|
+
ref: "styleRef",
|
|
104343
|
+
modelValue: unref(editor).selectedNode.style,
|
|
104344
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => unref(editor).selectedNode.style = $event),
|
|
104345
|
+
list: styleSchema.value
|
|
104346
|
+
}, null, 8, ["modelValue", "list"])
|
|
104235
104347
|
]),
|
|
104236
104348
|
_: 1
|
|
104237
|
-
}
|
|
104349
|
+
})) : createCommentVNode("", true)
|
|
104238
104350
|
]),
|
|
104239
104351
|
_: 1
|
|
104240
|
-
})
|
|
104352
|
+
}, 8, ["modelValue"]))
|
|
104241
104353
|
]);
|
|
104242
104354
|
};
|
|
104243
104355
|
}
|
|
@@ -104429,9 +104541,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
104429
104541
|
}
|
|
104430
104542
|
});
|
|
104431
104543
|
|
|
104432
|
-
const _style_0$2 = "\n.tree-panel-container[data-v-
|
|
104544
|
+
const _style_0$2 = "\n.tree-panel-container[data-v-2dd120c0] {\n min-height: 500px;\n box-sizing: border-box;\n}\n.tree-panel-container[data-v-2dd120c0]:hover {\n box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);\n transition: all 0.3s ease;\n}\n\n/* 拖拽列表动画 */\n.flip-list-move[data-v-2dd120c0] {\n transition: transform 0.3s ease;\n}\n.flip-list-enter-active[data-v-2dd120c0],\n.flip-list-leave-active[data-v-2dd120c0] {\n transition: all 0.3s ease;\n}\n.flip-list-enter-from[data-v-2dd120c0],\n.flip-list-leave-to[data-v-2dd120c0] {\n opacity: 0;\n transform: translateX(30px);\n}\n\n/* 拖拽时的幽灵元素样式 */\n.dragging-ghost[data-v-2dd120c0] {\n opacity: 0.7;\n background-color: #f5f7fa;\n border: 1px dashed #409eff;\n border-radius: 4px;\n transform: scale(0.98);\n}\n";
|
|
104433
104545
|
|
|
104434
|
-
const TreePanel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["styles", [_style_0$2]], ["__scopeId", "data-v-
|
|
104546
|
+
const TreePanel = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["styles", [_style_0$2]], ["__scopeId", "data-v-2dd120c0"]]);
|
|
104435
104547
|
|
|
104436
104548
|
const _sfc_main$3 = { };
|
|
104437
104549
|
|
|
@@ -104579,33 +104691,27 @@ const _sfc_main$2 = {
|
|
|
104579
104691
|
render() {
|
|
104580
104692
|
return h$1(
|
|
104581
104693
|
"aside",
|
|
104582
|
-
{
|
|
104694
|
+
{
|
|
104695
|
+
style: { padding: "1rem", border: "1px solid var(--mpd-border-color)" }
|
|
104696
|
+
},
|
|
104583
104697
|
this.tabRenderer()
|
|
104584
104698
|
);
|
|
104585
104699
|
}
|
|
104586
104700
|
};
|
|
104587
104701
|
|
|
104588
|
-
const _style_0$1 = ".widgets-menu[data-v-
|
|
104702
|
+
const _style_0$1 = ".widgets-menu[data-v-5da571e4] {\n width: 300px;\n height: 100%;\n background-color: #ffffff;\n border-right: 1px solid #ebeef5;\n}\n.widgets-menu .widgets-tabs[data-v-5da571e4] {\n height: 100%;\n}\n.widgets-menu .widgets-tabs[data-v-5da571e4] .el-tabs__header {\n margin-bottom: 0;\n background: white;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);\n}\n.widgets-menu .widgets-tabs[data-v-5da571e4] .el-tabs__header .el-tabs__nav-wrap::after {\n background-color: #e4e7ed;\n}\n.widgets-menu .widgets-tabs[data-v-5da571e4] .el-tabs__header .el-tabs__item {\n color: #606266;\n transition: all 0.3s;\n position: relative;\n padding: 0 20px;\n}\n.widgets-menu .widgets-tabs[data-v-5da571e4] .el-tabs__header .el-tabs__item.is-active {\n color: #409eff;\n}\n.widgets-menu .widgets-tabs[data-v-5da571e4] .el-tabs__content {\n flex: 1;\n overflow: hidden;\n}\n.widgets-menu .widgets-card[data-v-5da571e4] {\n height: 100%;\n border: none;\n background: transparent;\n}\n.widgets-menu .widgets-card[data-v-5da571e4] .el-card__header {\n background: white;\n border-bottom: 1px solid #ebeef5;\n padding: 15px 20px;\n}\n.widgets-menu .widgets-card .card-header[data-v-5da571e4] {\n font-size: 16px;\n font-weight: 500;\n color: #303133;\n}\n.widgets-menu .widgets-scrollbar[data-v-5da571e4] .el-scrollbar__bar {\n opacity: 0;\n transition: opacity 0.3s;\n}\n.widgets-menu .widgets-scrollbar[data-v-5da571e4]:hover .el-scrollbar__bar {\n opacity: 1;\n}\n.widgets-menu .widgets-grid[data-v-5da571e4] {\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n gap: 12px;\n padding: 12px;\n}\n.widgets-menu .widgets-list[data-v-5da571e4] {\n padding: 12px;\n}\n.widgets-menu .widget-item[data-v-5da571e4] {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n background: white;\n border-radius: 4px;\n padding: 12px 6px;\n cursor: grab;\n transition: all 0.3s;\n border: 1px solid #ebeef5;\n}\n.widgets-menu .widget-item[data-v-5da571e4]:hover {\n border-color: #409eff;\n box-shadow: 0 0 6px rgba(64, 158, 255, 0.2);\n}\n.widgets-menu .widget-item .widget-icon[data-v-5da571e4] {\n font-size: 20px;\n margin-bottom: 6px;\n color: #606266;\n}\n.widgets-menu .widget-item .widget-name[data-v-5da571e4] {\n font-size: 12px;\n color: #606266;\n text-align: center;\n line-height: 1.4;\n}\n.widgets-menu .widget-item-simple[data-v-5da571e4] {\n padding: 10px 12px;\n background: white;\n border-radius: 4px;\n margin-bottom: 6px;\n cursor: grab;\n transition: all 0.2s;\n border: 1px solid #ebeef5;\n}\n.widgets-menu .widget-item-simple[data-v-5da571e4]:hover {\n border-color: #409eff;\n background: #ecf5ff;\n}";
|
|
104589
104703
|
|
|
104590
|
-
const WidgetsMenu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["styles", [_style_0$1]], ["__scopeId", "data-v-
|
|
104704
|
+
const WidgetsMenu = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["styles", [_style_0$1]], ["__scopeId", "data-v-5da571e4"]]);
|
|
104591
104705
|
|
|
104592
104706
|
const editorProps = {
|
|
104593
104707
|
remoteUrl: {
|
|
104594
104708
|
type: String,
|
|
104595
104709
|
required: true
|
|
104596
104710
|
},
|
|
104597
|
-
root: {
|
|
104598
|
-
type: Object,
|
|
104599
|
-
default: () => ({})
|
|
104600
|
-
},
|
|
104601
104711
|
widgets: {
|
|
104602
104712
|
type: Array,
|
|
104603
104713
|
default: () => []
|
|
104604
104714
|
},
|
|
104605
|
-
settings: {
|
|
104606
|
-
type: Object,
|
|
104607
|
-
default: () => ({})
|
|
104608
|
-
},
|
|
104609
104715
|
extra: {
|
|
104610
104716
|
type: Object,
|
|
104611
104717
|
default: () => ({})
|
|
@@ -104617,7 +104723,7 @@ const _hoisted_1 = {
|
|
|
104617
104723
|
class: "mpd-editor mpd-flex mpd-gap-x-2 mpd-justify-between"
|
|
104618
104724
|
};
|
|
104619
104725
|
const _hoisted_2 = { class: "phone-wrap mpd-relative" };
|
|
104620
|
-
const _hoisted_3 = { style: { "width": "500px" } };
|
|
104726
|
+
const _hoisted_3 = { style: { "width": "500px", "border": "1px solid var(--mpd-border-color)", "padding": "1rem" } };
|
|
104621
104727
|
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
104622
104728
|
__name: "App.ce",
|
|
104623
104729
|
props: editorProps,
|
|
@@ -104636,7 +104742,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
104636
104742
|
provide(editorContextKey, {
|
|
104637
104743
|
node: editor.selectedNode,
|
|
104638
104744
|
plugins: editor.plugins,
|
|
104639
|
-
bus
|
|
104745
|
+
bus,
|
|
104746
|
+
extra: props.extra || {}
|
|
104640
104747
|
});
|
|
104641
104748
|
function onEnd() {
|
|
104642
104749
|
editor.dragging = null;
|
|
@@ -104691,7 +104798,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
104691
104798
|
namespace: "mpd"
|
|
104692
104799
|
}, {
|
|
104693
104800
|
default: withCtx(() => [
|
|
104694
|
-
createBaseVNode("div", null, toDisplayString(unref(editor).selected), 1),
|
|
104695
104801
|
createBaseVNode("div", _hoisted_1, [
|
|
104696
104802
|
createVNode(WidgetsMenu, { class: "mpd-flex-shrink-0" }),
|
|
104697
104803
|
createBaseVNode("div", _hoisted_2, [
|
|
@@ -104737,12 +104843,24 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
104737
104843
|
}, 8, ["style"])
|
|
104738
104844
|
]),
|
|
104739
104845
|
createBaseVNode("aside", _hoisted_3, [
|
|
104740
|
-
|
|
104741
|
-
|
|
104742
|
-
|
|
104743
|
-
|
|
104744
|
-
|
|
104745
|
-
|
|
104846
|
+
createVNode(_component_ElScrollbar, {
|
|
104847
|
+
"wrap-style": "height: 700px;",
|
|
104848
|
+
noresize: ""
|
|
104849
|
+
}, {
|
|
104850
|
+
default: withCtx(() => [
|
|
104851
|
+
withDirectives(createVNode(_sfc_main$6, {
|
|
104852
|
+
ref: "configPanelRef",
|
|
104853
|
+
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
104854
|
+
}, ["stop"]))
|
|
104855
|
+
}, null, 512), [
|
|
104856
|
+
[vShow, !unref(editor).dragging]
|
|
104857
|
+
]),
|
|
104858
|
+
withDirectives(createVNode(TreePanel, null, null, 512), [
|
|
104859
|
+
[vShow, unref(editor).dragging]
|
|
104860
|
+
])
|
|
104861
|
+
]),
|
|
104862
|
+
_: 1
|
|
104863
|
+
})
|
|
104746
104864
|
])
|
|
104747
104865
|
], 512)
|
|
104748
104866
|
]),
|
|
@@ -104810,6 +104928,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
104810
104928
|
pluginConstructor.init();
|
|
104811
104929
|
},
|
|
104812
104930
|
async validate() {
|
|
104931
|
+
const validConfig = await editor.plugins.config.validate(editor.rootNode.data);
|
|
104932
|
+
if (!validConfig) {
|
|
104933
|
+
editor.selectNode();
|
|
104934
|
+
await nextTick();
|
|
104935
|
+
refApp.value?.validate();
|
|
104936
|
+
return;
|
|
104937
|
+
}
|
|
104813
104938
|
const invalidNode = await editor.rootNode.validate();
|
|
104814
104939
|
if (invalidNode) {
|
|
104815
104940
|
editor.selectNode(invalidNode);
|
package/global.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sepveneto/dnde",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.3.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "GPL",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"./core": {
|
|
17
17
|
"types": "./dist/main.d.ts",
|
|
18
18
|
"imports": "./dist/editor.js",
|
|
19
|
-
"require": "./dist/editor.js"
|
|
19
|
+
"require": "./dist/editor.js",
|
|
20
|
+
"default": "./dist/editor.js"
|
|
20
21
|
},
|
|
21
22
|
".": {
|
|
22
23
|
"types": "./dist/main.d.ts",
|
|
@@ -36,6 +37,7 @@
|
|
|
36
37
|
"@sepveneto/basic-comp": "^0.9.6",
|
|
37
38
|
"@sepveneto/free-dom": "^0.14.7",
|
|
38
39
|
"@vueuse/core": "^13.3.0",
|
|
40
|
+
"async-validator": "^4.2.5",
|
|
39
41
|
"element-plus": "^2.9.11",
|
|
40
42
|
"lodash-es": "^4.17.21",
|
|
41
43
|
"pinia": "^3.0.2",
|
|
@@ -60,7 +62,7 @@
|
|
|
60
62
|
},
|
|
61
63
|
"scripts": {
|
|
62
64
|
"dev": "vite",
|
|
63
|
-
"build": "vite build
|
|
65
|
+
"build": "vite build",
|
|
64
66
|
"gen": "vue-tsc -p tsconfig.build.json",
|
|
65
67
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
66
68
|
}
|
package/dist/App.ce.vue.d.ts
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
2
|
-
readonly remoteUrl: {
|
|
3
|
-
readonly type: StringConstructor;
|
|
4
|
-
readonly required: true;
|
|
5
|
-
};
|
|
6
|
-
readonly root: {
|
|
7
|
-
readonly type: import("vue").PropType<import("@sepveneto/dnde-core").EditorSchema>;
|
|
8
|
-
readonly default: () => {};
|
|
9
|
-
};
|
|
10
|
-
readonly widgets: {
|
|
11
|
-
readonly type: import("vue").PropType<import("./store").LikeWidget[]>;
|
|
12
|
-
readonly default: () => never[];
|
|
13
|
-
};
|
|
14
|
-
readonly settings: {
|
|
15
|
-
readonly type: import("vue").PropType<import("@sepveneto/dnde-core").EditorSettings>;
|
|
16
|
-
readonly default: () => {};
|
|
17
|
-
};
|
|
18
|
-
readonly extra: {
|
|
19
|
-
readonly type: import("vue").PropType<Record<string, any>>;
|
|
20
|
-
readonly default: () => {};
|
|
21
|
-
};
|
|
22
|
-
}>, {
|
|
23
|
-
validate(): Promise<void> | undefined;
|
|
24
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
|
-
readonly remoteUrl: {
|
|
26
|
-
readonly type: StringConstructor;
|
|
27
|
-
readonly required: true;
|
|
28
|
-
};
|
|
29
|
-
readonly root: {
|
|
30
|
-
readonly type: import("vue").PropType<import("@sepveneto/dnde-core").EditorSchema>;
|
|
31
|
-
readonly default: () => {};
|
|
32
|
-
};
|
|
33
|
-
readonly widgets: {
|
|
34
|
-
readonly type: import("vue").PropType<import("./store").LikeWidget[]>;
|
|
35
|
-
readonly default: () => never[];
|
|
36
|
-
};
|
|
37
|
-
readonly settings: {
|
|
38
|
-
readonly type: import("vue").PropType<import("@sepveneto/dnde-core").EditorSettings>;
|
|
39
|
-
readonly default: () => {};
|
|
40
|
-
};
|
|
41
|
-
readonly extra: {
|
|
42
|
-
readonly type: import("vue").PropType<Record<string, any>>;
|
|
43
|
-
readonly default: () => {};
|
|
44
|
-
};
|
|
45
|
-
}>> & Readonly<{}>, {
|
|
46
|
-
readonly widgets: import("./store").LikeWidget[];
|
|
47
|
-
readonly root: import("@sepveneto/dnde-core").EditorSchema;
|
|
48
|
-
readonly settings: import("@sepveneto/dnde-core").EditorSettings;
|
|
49
|
-
readonly extra: Record<string, any>;
|
|
50
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
51
|
-
export default _default;
|
package/dist/Editor.vue.d.ts
DELETED
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import * as Vue from 'vue';
|
|
2
|
-
declare const editor: import("pinia").Store<"editor", Pick<{
|
|
3
|
-
rootNode: Vue.Reactive<Vue.Raw<import("@sepveneto/dnde-core/class").Node>>;
|
|
4
|
-
nodeMap: Map<string, import("@sepveneto/dnde-core/class").Node>;
|
|
5
|
-
shadowRoot: Vue.ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
6
|
-
elementRoot: Vue.ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
7
|
-
selectNode: (wid?: string) => void;
|
|
8
|
-
selected: Vue.Ref<string, string>;
|
|
9
|
-
hovering: Vue.Ref<string | undefined, string | undefined>;
|
|
10
|
-
selectedNode: Vue.ComputedRef<import("@sepveneto/dnde-core/class").Node>;
|
|
11
|
-
selectedNodes: Vue.ComputedRef<import("@sepveneto/dnde-core/class").Node[]>;
|
|
12
|
-
selectedNodeOperates: Vue.ComputedRef<import("./type.js").HelperAction[]>;
|
|
13
|
-
addNode: (node: import("@sepveneto/dnde-core/class").Node, pNode?: import("@sepveneto/dnde-core/class").Node, manual?: boolean) => void;
|
|
14
|
-
delNode: (wid: string) => void;
|
|
15
|
-
isPreview: Vue.Ref<boolean, boolean>;
|
|
16
|
-
dragging: Vue.Ref<import("@sepveneto/dnde-core/class").Node | null, import("@sepveneto/dnde-core/class").Node | null>;
|
|
17
|
-
plugins: {
|
|
18
|
-
helper: {
|
|
19
|
-
list: import("./type.js").HelperAction[];
|
|
20
|
-
addBuiltin(config: import("./type.js").HelperAction): void;
|
|
21
|
-
};
|
|
22
|
-
widget: {
|
|
23
|
-
list: import("./store").PanelInfo[];
|
|
24
|
-
addPanel(panel: import("./store").PanelInfo): void;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
getData: () => Record<string, any>;
|
|
28
|
-
setData: (data: any[], parent?: import("@sepveneto/dnde-core/class").Node) => void;
|
|
29
|
-
setSchema: (schema: import("@sepveneto/dnde-core").IWidget["schema"]) => void;
|
|
30
|
-
}, "hovering" | "dragging" | "rootNode" | "nodeMap" | "shadowRoot" | "elementRoot" | "selected" | "isPreview" | "plugins">, Pick<{
|
|
31
|
-
rootNode: Vue.Reactive<Vue.Raw<import("@sepveneto/dnde-core/class").Node>>;
|
|
32
|
-
nodeMap: Map<string, import("@sepveneto/dnde-core/class").Node>;
|
|
33
|
-
shadowRoot: Vue.ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
34
|
-
elementRoot: Vue.ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
35
|
-
selectNode: (wid?: string) => void;
|
|
36
|
-
selected: Vue.Ref<string, string>;
|
|
37
|
-
hovering: Vue.Ref<string | undefined, string | undefined>;
|
|
38
|
-
selectedNode: Vue.ComputedRef<import("@sepveneto/dnde-core/class").Node>;
|
|
39
|
-
selectedNodes: Vue.ComputedRef<import("@sepveneto/dnde-core/class").Node[]>;
|
|
40
|
-
selectedNodeOperates: Vue.ComputedRef<import("./type.js").HelperAction[]>;
|
|
41
|
-
addNode: (node: import("@sepveneto/dnde-core/class").Node, pNode?: import("@sepveneto/dnde-core/class").Node, manual?: boolean) => void;
|
|
42
|
-
delNode: (wid: string) => void;
|
|
43
|
-
isPreview: Vue.Ref<boolean, boolean>;
|
|
44
|
-
dragging: Vue.Ref<import("@sepveneto/dnde-core/class").Node | null, import("@sepveneto/dnde-core/class").Node | null>;
|
|
45
|
-
plugins: {
|
|
46
|
-
helper: {
|
|
47
|
-
list: import("./type.js").HelperAction[];
|
|
48
|
-
addBuiltin(config: import("./type.js").HelperAction): void;
|
|
49
|
-
};
|
|
50
|
-
widget: {
|
|
51
|
-
list: import("./store").PanelInfo[];
|
|
52
|
-
addPanel(panel: import("./store").PanelInfo): void;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
getData: () => Record<string, any>;
|
|
56
|
-
setData: (data: any[], parent?: import("@sepveneto/dnde-core/class").Node) => void;
|
|
57
|
-
setSchema: (schema: import("@sepveneto/dnde-core").IWidget["schema"]) => void;
|
|
58
|
-
}, "selectedNode" | "selectedNodes" | "selectedNodeOperates">, Pick<{
|
|
59
|
-
rootNode: Vue.Reactive<Vue.Raw<import("@sepveneto/dnde-core/class").Node>>;
|
|
60
|
-
nodeMap: Map<string, import("@sepveneto/dnde-core/class").Node>;
|
|
61
|
-
shadowRoot: Vue.ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
62
|
-
elementRoot: Vue.ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
63
|
-
selectNode: (wid?: string) => void;
|
|
64
|
-
selected: Vue.Ref<string, string>;
|
|
65
|
-
hovering: Vue.Ref<string | undefined, string | undefined>;
|
|
66
|
-
selectedNode: Vue.ComputedRef<import("@sepveneto/dnde-core/class").Node>;
|
|
67
|
-
selectedNodes: Vue.ComputedRef<import("@sepveneto/dnde-core/class").Node[]>;
|
|
68
|
-
selectedNodeOperates: Vue.ComputedRef<import("./type.js").HelperAction[]>;
|
|
69
|
-
addNode: (node: import("@sepveneto/dnde-core/class").Node, pNode?: import("@sepveneto/dnde-core/class").Node, manual?: boolean) => void;
|
|
70
|
-
delNode: (wid: string) => void;
|
|
71
|
-
isPreview: Vue.Ref<boolean, boolean>;
|
|
72
|
-
dragging: Vue.Ref<import("@sepveneto/dnde-core/class").Node | null, import("@sepveneto/dnde-core/class").Node | null>;
|
|
73
|
-
plugins: {
|
|
74
|
-
helper: {
|
|
75
|
-
list: import("./type.js").HelperAction[];
|
|
76
|
-
addBuiltin(config: import("./type.js").HelperAction): void;
|
|
77
|
-
};
|
|
78
|
-
widget: {
|
|
79
|
-
list: import("./store").PanelInfo[];
|
|
80
|
-
addPanel(panel: import("./store").PanelInfo): void;
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
getData: () => Record<string, any>;
|
|
84
|
-
setData: (data: any[], parent?: import("@sepveneto/dnde-core/class").Node) => void;
|
|
85
|
-
setSchema: (schema: import("@sepveneto/dnde-core").IWidget["schema"]) => void;
|
|
86
|
-
}, "selectNode" | "addNode" | "delNode" | "getData" | "setData" | "setSchema">>;
|
|
87
|
-
declare const _default: Vue.DefineComponent<Vue.ExtractPropTypes<{
|
|
88
|
-
readonly remoteUrl: {
|
|
89
|
-
readonly type: StringConstructor;
|
|
90
|
-
readonly required: true;
|
|
91
|
-
};
|
|
92
|
-
readonly root: {
|
|
93
|
-
readonly type: Vue.PropType<import("@sepveneto/dnde-core").EditorSchema>;
|
|
94
|
-
readonly default: () => {};
|
|
95
|
-
};
|
|
96
|
-
readonly widgets: {
|
|
97
|
-
readonly type: Vue.PropType<import("./store").LikeWidget[]>;
|
|
98
|
-
readonly default: () => never[];
|
|
99
|
-
};
|
|
100
|
-
readonly settings: {
|
|
101
|
-
readonly type: Vue.PropType<import("@sepveneto/dnde-core").EditorSettings>;
|
|
102
|
-
readonly default: () => {};
|
|
103
|
-
};
|
|
104
|
-
readonly extra: {
|
|
105
|
-
readonly type: Vue.PropType<Record<string, any>>;
|
|
106
|
-
readonly default: () => {};
|
|
107
|
-
};
|
|
108
|
-
}>, {
|
|
109
|
-
register(fn: (ctx: typeof editor) => {
|
|
110
|
-
init: () => void;
|
|
111
|
-
}): void;
|
|
112
|
-
validate(): Promise<void>;
|
|
113
|
-
getData(): Record<string, any>;
|
|
114
|
-
setData(data: any[]): void;
|
|
115
|
-
}, {}, {}, {}, Vue.ComponentOptionsMixin, Vue.ComponentOptionsMixin, {}, string, Vue.PublicProps, Readonly<Vue.ExtractPropTypes<{
|
|
116
|
-
readonly remoteUrl: {
|
|
117
|
-
readonly type: StringConstructor;
|
|
118
|
-
readonly required: true;
|
|
119
|
-
};
|
|
120
|
-
readonly root: {
|
|
121
|
-
readonly type: Vue.PropType<import("@sepveneto/dnde-core").EditorSchema>;
|
|
122
|
-
readonly default: () => {};
|
|
123
|
-
};
|
|
124
|
-
readonly widgets: {
|
|
125
|
-
readonly type: Vue.PropType<import("./store").LikeWidget[]>;
|
|
126
|
-
readonly default: () => never[];
|
|
127
|
-
};
|
|
128
|
-
readonly settings: {
|
|
129
|
-
readonly type: Vue.PropType<import("@sepveneto/dnde-core").EditorSettings>;
|
|
130
|
-
readonly default: () => {};
|
|
131
|
-
};
|
|
132
|
-
readonly extra: {
|
|
133
|
-
readonly type: Vue.PropType<Record<string, any>>;
|
|
134
|
-
readonly default: () => {};
|
|
135
|
-
};
|
|
136
|
-
}>> & Readonly<{}>, {
|
|
137
|
-
readonly widgets: import("./store").LikeWidget[];
|
|
138
|
-
readonly root: import("@sepveneto/dnde-core").EditorSchema;
|
|
139
|
-
readonly settings: import("@sepveneto/dnde-core").EditorSettings;
|
|
140
|
-
readonly extra: Record<string, any>;
|
|
141
|
-
}, {}, {}, {}, string, Vue.ComponentProvideOptions, true, {}, any>;
|
|
142
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { SchemaItem } from '@sepveneto/dnde-core/class';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
list: SchemaItem[];
|
|
4
|
-
modelValue: Record<string, any>;
|
|
5
|
-
};
|
|
6
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {
|
|
7
|
-
validate: () => import("element-plus").FormValidationResult | undefined;
|
|
8
|
-
clearValidate: () => void | undefined;
|
|
9
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
10
|
-
"update:modelValue": (...args: any[]) => void;
|
|
11
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
13
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
-
export default _default;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { SchemaItem } from '@sepveneto/dnde-core/class';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
config: SchemaItem & {
|
|
4
|
-
attrs?: any;
|
|
5
|
-
options?: any[];
|
|
6
|
-
};
|
|
7
|
-
stylesheet: boolean;
|
|
8
|
-
};
|
|
9
|
-
type __VLS_PublicProps = __VLS_Props & {
|
|
10
|
-
modelValue: any;
|
|
11
|
-
};
|
|
12
|
-
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
13
|
-
"update:modelValue": (value: any) => any;
|
|
14
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
-
"onUpdate:modelValue"?: ((value: any) => any) | undefined;
|
|
16
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Node } from '@sepveneto/dnde-core/class';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
node: Node;
|
|
4
|
-
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Node } from '@sepveneto/dnde-core/class';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
node: Node;
|
|
4
|
-
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
-
export default _default;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import type { HelperAction } from '@/type';
|
|
2
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
3
|
-
editor: import("pinia").Store<"editor", Pick<{
|
|
4
|
-
rootNode: import("vue").Reactive<import("vue").Raw<import("@sepveneto/dnde-core/class").Node>>;
|
|
5
|
-
nodeMap: Map<string, import("@sepveneto/dnde-core/class").Node>;
|
|
6
|
-
shadowRoot: import("vue").ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
7
|
-
elementRoot: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
8
|
-
selectNode: (wid?: string) => void;
|
|
9
|
-
selected: import("vue").Ref<string, string>;
|
|
10
|
-
hovering: import("vue").Ref<string | undefined, string | undefined>;
|
|
11
|
-
selectedNode: import("vue").ComputedRef<import("@sepveneto/dnde-core/class").Node>;
|
|
12
|
-
selectedNodes: import("vue").ComputedRef<import("@sepveneto/dnde-core/class").Node[]>;
|
|
13
|
-
selectedNodeOperates: import("vue").ComputedRef<HelperAction[]>;
|
|
14
|
-
addNode: (node: import("@sepveneto/dnde-core/class").Node, pNode?: import("@sepveneto/dnde-core/class").Node, manual?: boolean) => void;
|
|
15
|
-
delNode: (wid: string) => void;
|
|
16
|
-
isPreview: import("vue").Ref<boolean, boolean>;
|
|
17
|
-
dragging: import("vue").Ref<import("@sepveneto/dnde-core/class").Node | null, import("@sepveneto/dnde-core/class").Node | null>;
|
|
18
|
-
plugins: {
|
|
19
|
-
helper: {
|
|
20
|
-
list: HelperAction[];
|
|
21
|
-
addBuiltin(config: HelperAction): void;
|
|
22
|
-
};
|
|
23
|
-
widget: {
|
|
24
|
-
list: import("@/store").PanelInfo[];
|
|
25
|
-
addPanel(panel: import("@/store").PanelInfo): void;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
getData: () => Record<string, any>;
|
|
29
|
-
setData: (data: any[], parent?: import("@sepveneto/dnde-core/class").Node) => void;
|
|
30
|
-
setSchema: (schema: import("@sepveneto/dnde-core").IWidget["schema"]) => void;
|
|
31
|
-
}, "hovering" | "dragging" | "rootNode" | "nodeMap" | "shadowRoot" | "elementRoot" | "selected" | "isPreview" | "plugins">, Pick<{
|
|
32
|
-
rootNode: import("vue").Reactive<import("vue").Raw<import("@sepveneto/dnde-core/class").Node>>;
|
|
33
|
-
nodeMap: Map<string, import("@sepveneto/dnde-core/class").Node>;
|
|
34
|
-
shadowRoot: import("vue").ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
35
|
-
elementRoot: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
36
|
-
selectNode: (wid?: string) => void;
|
|
37
|
-
selected: import("vue").Ref<string, string>;
|
|
38
|
-
hovering: import("vue").Ref<string | undefined, string | undefined>;
|
|
39
|
-
selectedNode: import("vue").ComputedRef<import("@sepveneto/dnde-core/class").Node>;
|
|
40
|
-
selectedNodes: import("vue").ComputedRef<import("@sepveneto/dnde-core/class").Node[]>;
|
|
41
|
-
selectedNodeOperates: import("vue").ComputedRef<HelperAction[]>;
|
|
42
|
-
addNode: (node: import("@sepveneto/dnde-core/class").Node, pNode?: import("@sepveneto/dnde-core/class").Node, manual?: boolean) => void;
|
|
43
|
-
delNode: (wid: string) => void;
|
|
44
|
-
isPreview: import("vue").Ref<boolean, boolean>;
|
|
45
|
-
dragging: import("vue").Ref<import("@sepveneto/dnde-core/class").Node | null, import("@sepveneto/dnde-core/class").Node | null>;
|
|
46
|
-
plugins: {
|
|
47
|
-
helper: {
|
|
48
|
-
list: HelperAction[];
|
|
49
|
-
addBuiltin(config: HelperAction): void;
|
|
50
|
-
};
|
|
51
|
-
widget: {
|
|
52
|
-
list: import("@/store").PanelInfo[];
|
|
53
|
-
addPanel(panel: import("@/store").PanelInfo): void;
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
getData: () => Record<string, any>;
|
|
57
|
-
setData: (data: any[], parent?: import("@sepveneto/dnde-core/class").Node) => void;
|
|
58
|
-
setSchema: (schema: import("@sepveneto/dnde-core").IWidget["schema"]) => void;
|
|
59
|
-
}, "selectedNode" | "selectedNodes" | "selectedNodeOperates">, Pick<{
|
|
60
|
-
rootNode: import("vue").Reactive<import("vue").Raw<import("@sepveneto/dnde-core/class").Node>>;
|
|
61
|
-
nodeMap: Map<string, import("@sepveneto/dnde-core/class").Node>;
|
|
62
|
-
shadowRoot: import("vue").ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
63
|
-
elementRoot: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
64
|
-
selectNode: (wid?: string) => void;
|
|
65
|
-
selected: import("vue").Ref<string, string>;
|
|
66
|
-
hovering: import("vue").Ref<string | undefined, string | undefined>;
|
|
67
|
-
selectedNode: import("vue").ComputedRef<import("@sepveneto/dnde-core/class").Node>;
|
|
68
|
-
selectedNodes: import("vue").ComputedRef<import("@sepveneto/dnde-core/class").Node[]>;
|
|
69
|
-
selectedNodeOperates: import("vue").ComputedRef<HelperAction[]>;
|
|
70
|
-
addNode: (node: import("@sepveneto/dnde-core/class").Node, pNode?: import("@sepveneto/dnde-core/class").Node, manual?: boolean) => void;
|
|
71
|
-
delNode: (wid: string) => void;
|
|
72
|
-
isPreview: import("vue").Ref<boolean, boolean>;
|
|
73
|
-
dragging: import("vue").Ref<import("@sepveneto/dnde-core/class").Node | null, import("@sepveneto/dnde-core/class").Node | null>;
|
|
74
|
-
plugins: {
|
|
75
|
-
helper: {
|
|
76
|
-
list: HelperAction[];
|
|
77
|
-
addBuiltin(config: HelperAction): void;
|
|
78
|
-
};
|
|
79
|
-
widget: {
|
|
80
|
-
list: import("@/store").PanelInfo[];
|
|
81
|
-
addPanel(panel: import("@/store").PanelInfo): void;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
|
-
getData: () => Record<string, any>;
|
|
85
|
-
setData: (data: any[], parent?: import("@sepveneto/dnde-core/class").Node) => void;
|
|
86
|
-
setSchema: (schema: import("@sepveneto/dnde-core").IWidget["schema"]) => void;
|
|
87
|
-
}, "selectNode" | "addNode" | "delNode" | "getData" | "setData" | "setSchema">>;
|
|
88
|
-
ctx: import("@sepveneto/dnde-core").EditorContext;
|
|
89
|
-
actionWrap: (action: HelperAction) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
90
|
-
[key: string]: any;
|
|
91
|
-
}>;
|
|
92
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
93
|
-
export default _default;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { Node } from '@sepveneto/dnde-core/class';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
node: Node;
|
|
4
|
-
};
|
|
5
|
-
declare var __VLS_5: {};
|
|
6
|
-
type __VLS_Slots = {} & {
|
|
7
|
-
default?: (props: typeof __VLS_5) => any;
|
|
8
|
-
};
|
|
9
|
-
declare const __VLS_component: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
-
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
11
|
-
export default _default;
|
|
12
|
-
type __VLS_WithSlots<T, S> = T & {
|
|
13
|
-
new (): {
|
|
14
|
-
$slots: S;
|
|
15
|
-
};
|
|
16
|
-
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type __VLS_Props = {
|
|
2
|
-
modelValue: string | number;
|
|
3
|
-
};
|
|
4
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
-
"update:modelValue": (...args: any[]) => void;
|
|
6
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
7
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
8
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
-
export default _default;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
2
|
-
validate(): Promise<void>;
|
|
3
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
4
|
-
export default _default;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Node } from '@sepveneto/dnde-core/class';
|
|
2
|
-
type __VLS_Props = {
|
|
3
|
-
node: Node;
|
|
4
|
-
};
|
|
5
|
-
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
6
|
-
export default _default;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
-
export default _default;
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import type { WidgetGroup } from '@/store/app';
|
|
2
|
-
import { Node, Widget } from '@sepveneto/dnde-core/class';
|
|
3
|
-
declare const _default: import("vue").DefineComponent<{}, {
|
|
4
|
-
app: import("pinia").Store<"app", Pick<{
|
|
5
|
-
setWidgets: (data: import("@/store").LikeWidget[]) => void;
|
|
6
|
-
widgets: import("vue").ShallowRef<(WidgetGroup | Widget)[] | undefined, (WidgetGroup | Widget)[] | undefined>;
|
|
7
|
-
widgetMap: Map<string, Widget>;
|
|
8
|
-
}, "widgets" | "widgetMap">, Pick<{
|
|
9
|
-
setWidgets: (data: import("@/store").LikeWidget[]) => void;
|
|
10
|
-
widgets: import("vue").ShallowRef<(WidgetGroup | Widget)[] | undefined, (WidgetGroup | Widget)[] | undefined>;
|
|
11
|
-
widgetMap: Map<string, Widget>;
|
|
12
|
-
}, never>, Pick<{
|
|
13
|
-
setWidgets: (data: import("@/store").LikeWidget[]) => void;
|
|
14
|
-
widgets: import("vue").ShallowRef<(WidgetGroup | Widget)[] | undefined, (WidgetGroup | Widget)[] | undefined>;
|
|
15
|
-
widgetMap: Map<string, Widget>;
|
|
16
|
-
}, "setWidgets">>;
|
|
17
|
-
hasGroup: (list?: (Widget | WidgetGroup)[]) => list is WidgetGroup[];
|
|
18
|
-
handleClone: (original: Widget) => Node;
|
|
19
|
-
handleEnd: () => void;
|
|
20
|
-
tabRenderer: () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}>;
|
|
23
|
-
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
24
|
-
export default _default;
|
package/dist/main.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import Main from './Editor.vue';
|
|
2
|
-
export declare const Editor: import("vue").VueElementConstructor<import("vue").ExtractPropTypes<{
|
|
3
|
-
readonly remoteUrl: {
|
|
4
|
-
readonly type: StringConstructor;
|
|
5
|
-
readonly required: true;
|
|
6
|
-
};
|
|
7
|
-
readonly root: {
|
|
8
|
-
readonly type: import("vue").PropType<import("@sepveneto/dnde-core").EditorSchema>;
|
|
9
|
-
readonly default: () => {};
|
|
10
|
-
};
|
|
11
|
-
readonly widgets: {
|
|
12
|
-
readonly type: import("vue").PropType<import("./store/app.js").LikeWidget[]>;
|
|
13
|
-
readonly default: () => never[];
|
|
14
|
-
};
|
|
15
|
-
readonly settings: {
|
|
16
|
-
readonly type: import("vue").PropType<import("@sepveneto/dnde-core").EditorSettings>;
|
|
17
|
-
readonly default: () => {};
|
|
18
|
-
};
|
|
19
|
-
readonly extra: {
|
|
20
|
-
readonly type: import("vue").PropType<Record<string, any>>;
|
|
21
|
-
readonly default: () => {};
|
|
22
|
-
};
|
|
23
|
-
}>>;
|
|
24
|
-
export type EditorInstance = InstanceType<typeof Main>;
|
|
25
|
-
export declare function register(): void;
|
package/dist/props.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { EditorSchema, EditorSettings } from '@sepveneto/dnde-core';
|
|
2
|
-
import type { PropType } from 'vue';
|
|
3
|
-
import type { LikeWidget } from './store';
|
|
4
|
-
export declare const editorProps: {
|
|
5
|
-
readonly remoteUrl: {
|
|
6
|
-
readonly type: StringConstructor;
|
|
7
|
-
readonly required: true;
|
|
8
|
-
};
|
|
9
|
-
readonly root: {
|
|
10
|
-
readonly type: PropType<EditorSchema>;
|
|
11
|
-
readonly default: () => {};
|
|
12
|
-
};
|
|
13
|
-
readonly widgets: {
|
|
14
|
-
readonly type: PropType<LikeWidget[]>;
|
|
15
|
-
readonly default: () => never[];
|
|
16
|
-
};
|
|
17
|
-
readonly settings: {
|
|
18
|
-
readonly type: PropType<EditorSettings>;
|
|
19
|
-
readonly default: () => {};
|
|
20
|
-
};
|
|
21
|
-
readonly extra: {
|
|
22
|
-
readonly type: PropType<Record<string, any>>;
|
|
23
|
-
readonly default: () => {};
|
|
24
|
-
};
|
|
25
|
-
};
|
package/dist/store/app.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { IWidget } from '@sepveneto/dnde-core';
|
|
2
|
-
import { widgetType } from '@sepveneto/dnde-core';
|
|
3
|
-
import { Widget } from '@sepveneto/dnde-core/class';
|
|
4
|
-
export interface WidgetGroup {
|
|
5
|
-
name: string;
|
|
6
|
-
list: Widget[];
|
|
7
|
-
}
|
|
8
|
-
export type LikeWidget = IWidget | {
|
|
9
|
-
name: string;
|
|
10
|
-
list: IWidget[];
|
|
11
|
-
type: widgetType;
|
|
12
|
-
};
|
|
13
|
-
export declare const useApp: import("pinia").StoreDefinition<"app", Pick<{
|
|
14
|
-
setWidgets: (data: LikeWidget[]) => void;
|
|
15
|
-
widgets: import("vue").ShallowRef<(WidgetGroup | Widget)[] | undefined, (WidgetGroup | Widget)[] | undefined>;
|
|
16
|
-
widgetMap: Map<string, Widget>;
|
|
17
|
-
}, "widgets" | "widgetMap">, Pick<{
|
|
18
|
-
setWidgets: (data: LikeWidget[]) => void;
|
|
19
|
-
widgets: import("vue").ShallowRef<(WidgetGroup | Widget)[] | undefined, (WidgetGroup | Widget)[] | undefined>;
|
|
20
|
-
widgetMap: Map<string, Widget>;
|
|
21
|
-
}, never>, Pick<{
|
|
22
|
-
setWidgets: (data: LikeWidget[]) => void;
|
|
23
|
-
widgets: import("vue").ShallowRef<(WidgetGroup | Widget)[] | undefined, (WidgetGroup | Widget)[] | undefined>;
|
|
24
|
-
widgetMap: Map<string, Widget>;
|
|
25
|
-
}, "setWidgets">>;
|
package/dist/store/editor.d.ts
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import type { IWidget } from '@sepveneto/dnde-core';
|
|
2
|
-
import type { Raw } from 'vue';
|
|
3
|
-
import type { HelperAction } from '@/type';
|
|
4
|
-
import { Node } from '@sepveneto/dnde-core/class';
|
|
5
|
-
declare class HelperPlugin {
|
|
6
|
-
list: HelperAction[];
|
|
7
|
-
constructor(ctx: any);
|
|
8
|
-
addBuiltin(config: HelperAction): void;
|
|
9
|
-
}
|
|
10
|
-
export interface PanelInfo {
|
|
11
|
-
label: string;
|
|
12
|
-
name: string;
|
|
13
|
-
}
|
|
14
|
-
declare class WidgetPlugin {
|
|
15
|
-
list: PanelInfo[];
|
|
16
|
-
constructor(_ctx: any);
|
|
17
|
-
addPanel(panel: PanelInfo): void;
|
|
18
|
-
}
|
|
19
|
-
export declare const useEditor: import("pinia").StoreDefinition<"editor", Pick<{
|
|
20
|
-
rootNode: import("vue").Reactive<Raw<Node>>;
|
|
21
|
-
nodeMap: Map<string, Node>;
|
|
22
|
-
shadowRoot: import("vue").ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
23
|
-
elementRoot: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
24
|
-
selectNode: (wid?: string) => void;
|
|
25
|
-
selected: import("vue").Ref<string, string>;
|
|
26
|
-
hovering: import("vue").Ref<string | undefined, string | undefined>;
|
|
27
|
-
selectedNode: import("vue").ComputedRef<Node>;
|
|
28
|
-
selectedNodes: import("vue").ComputedRef<Node[]>;
|
|
29
|
-
selectedNodeOperates: import("vue").ComputedRef<HelperAction[]>;
|
|
30
|
-
addNode: (node: Node, pNode?: Node, manual?: boolean) => void;
|
|
31
|
-
delNode: (wid: string) => void;
|
|
32
|
-
isPreview: import("vue").Ref<boolean, boolean>;
|
|
33
|
-
dragging: import("vue").Ref<Node | null, Node | null>;
|
|
34
|
-
plugins: {
|
|
35
|
-
helper: HelperPlugin;
|
|
36
|
-
widget: WidgetPlugin;
|
|
37
|
-
};
|
|
38
|
-
getData: () => Record<string, any>;
|
|
39
|
-
setData: (data: any[], parent?: Node) => void;
|
|
40
|
-
setSchema: (schema: IWidget["schema"]) => void;
|
|
41
|
-
}, "hovering" | "dragging" | "rootNode" | "nodeMap" | "shadowRoot" | "elementRoot" | "selected" | "isPreview" | "plugins">, Pick<{
|
|
42
|
-
rootNode: import("vue").Reactive<Raw<Node>>;
|
|
43
|
-
nodeMap: Map<string, Node>;
|
|
44
|
-
shadowRoot: import("vue").ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
45
|
-
elementRoot: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
46
|
-
selectNode: (wid?: string) => void;
|
|
47
|
-
selected: import("vue").Ref<string, string>;
|
|
48
|
-
hovering: import("vue").Ref<string | undefined, string | undefined>;
|
|
49
|
-
selectedNode: import("vue").ComputedRef<Node>;
|
|
50
|
-
selectedNodes: import("vue").ComputedRef<Node[]>;
|
|
51
|
-
selectedNodeOperates: import("vue").ComputedRef<HelperAction[]>;
|
|
52
|
-
addNode: (node: Node, pNode?: Node, manual?: boolean) => void;
|
|
53
|
-
delNode: (wid: string) => void;
|
|
54
|
-
isPreview: import("vue").Ref<boolean, boolean>;
|
|
55
|
-
dragging: import("vue").Ref<Node | null, Node | null>;
|
|
56
|
-
plugins: {
|
|
57
|
-
helper: HelperPlugin;
|
|
58
|
-
widget: WidgetPlugin;
|
|
59
|
-
};
|
|
60
|
-
getData: () => Record<string, any>;
|
|
61
|
-
setData: (data: any[], parent?: Node) => void;
|
|
62
|
-
setSchema: (schema: IWidget["schema"]) => void;
|
|
63
|
-
}, "selectedNode" | "selectedNodes" | "selectedNodeOperates">, Pick<{
|
|
64
|
-
rootNode: import("vue").Reactive<Raw<Node>>;
|
|
65
|
-
nodeMap: Map<string, Node>;
|
|
66
|
-
shadowRoot: import("vue").ShallowRef<ShadowRoot | undefined, ShadowRoot | undefined>;
|
|
67
|
-
elementRoot: import("vue").ShallowRef<HTMLElement | undefined, HTMLElement | undefined>;
|
|
68
|
-
selectNode: (wid?: string) => void;
|
|
69
|
-
selected: import("vue").Ref<string, string>;
|
|
70
|
-
hovering: import("vue").Ref<string | undefined, string | undefined>;
|
|
71
|
-
selectedNode: import("vue").ComputedRef<Node>;
|
|
72
|
-
selectedNodes: import("vue").ComputedRef<Node[]>;
|
|
73
|
-
selectedNodeOperates: import("vue").ComputedRef<HelperAction[]>;
|
|
74
|
-
addNode: (node: Node, pNode?: Node, manual?: boolean) => void;
|
|
75
|
-
delNode: (wid: string) => void;
|
|
76
|
-
isPreview: import("vue").Ref<boolean, boolean>;
|
|
77
|
-
dragging: import("vue").Ref<Node | null, Node | null>;
|
|
78
|
-
plugins: {
|
|
79
|
-
helper: HelperPlugin;
|
|
80
|
-
widget: WidgetPlugin;
|
|
81
|
-
};
|
|
82
|
-
getData: () => Record<string, any>;
|
|
83
|
-
setData: (data: any[], parent?: Node) => void;
|
|
84
|
-
setSchema: (schema: IWidget["schema"]) => void;
|
|
85
|
-
}, "selectNode" | "addNode" | "delNode" | "getData" | "setData" | "setSchema">>;
|
|
86
|
-
export {};
|
package/dist/store/index.d.ts
DELETED
package/dist/utils.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { AppContext, CSSProperties, VNode } from 'vue';
|
|
2
|
-
import debug from 'debug';
|
|
3
|
-
export declare function loadFromRemote(scope: string, module: string): new () => import("vue").ComponentPublicInstance;
|
|
4
|
-
type RemovePopperFn = (() => void) & {
|
|
5
|
-
trigger?: HTMLElement;
|
|
6
|
-
vm?: VNode;
|
|
7
|
-
};
|
|
8
|
-
export declare let removePopper: RemovePopperFn | null;
|
|
9
|
-
export declare function createPopper(ctx: AppContext, trigger: HTMLElement, content: string, parent?: HTMLElement): void;
|
|
10
|
-
type Style = Partial<Record<keyof CSSProperties, string | number>>;
|
|
11
|
-
export declare function format(style: Style, excludes?: string[]): Partial<CSSProperties>;
|
|
12
|
-
export declare function normalizeStyle(customStyle: Record<string, any>, mode?: 'grid' | 'free'): Partial<CSSProperties>;
|
|
13
|
-
export declare function createDebug(namespace: string): debug.Debugger;
|
|
14
|
-
export {};
|