@sepveneto/dnde-core 0.3.0 → 0.4.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/{chunk-QWT3TZVQ.js → chunk-N5D6Y2DY.js} +0 -13
- package/dist/{chunk-KTDOAEEU.js → chunk-SIPKDBVZ.js} +9 -0
- package/dist/{chunk-VY2Z4X4S.js → chunk-VRAKS4JU.js} +18 -0
- package/dist/class/Node.cjs +0 -13
- package/dist/class/Node.d.cts +0 -1
- package/dist/class/Node.d.ts +0 -1
- package/dist/class/Node.js +1 -1
- package/dist/class/index.cjs +0 -13
- package/dist/class/index.js +1 -1
- package/dist/helper/index.cjs +27 -0
- package/dist/helper/index.js +2 -2
- package/dist/helper/schema.cjs +9 -0
- package/dist/helper/schema.d.cts +4 -1
- package/dist/helper/schema.d.ts +4 -1
- package/dist/helper/schema.js +1 -1
- package/dist/helper/widget.cjs +18 -0
- package/dist/helper/widget.d.cts +29 -0
- package/dist/helper/widget.d.ts +29 -0
- package/dist/helper/widget.js +1 -1
- package/dist/index.cjs +27 -0
- package/dist/index.js +2 -2
- package/package.json +1 -1
|
@@ -112,19 +112,6 @@ var RootNode = class {
|
|
|
112
112
|
this.data = (info == null ? void 0 : info.props) || {};
|
|
113
113
|
this.style = (info == null ? void 0 : info.style) || {};
|
|
114
114
|
}
|
|
115
|
-
validate(only = false) {
|
|
116
|
-
return __async(this, null, function* () {
|
|
117
|
-
if (only || !this.list) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
for (const item of this.list) {
|
|
121
|
-
const invalid = yield item.validate();
|
|
122
|
-
if (invalid) {
|
|
123
|
-
return invalid;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
115
|
};
|
|
129
116
|
|
|
130
117
|
export {
|
|
@@ -60,6 +60,15 @@ var schema = {
|
|
|
60
60
|
rules: normalizeRules(config)
|
|
61
61
|
};
|
|
62
62
|
},
|
|
63
|
+
color(config) {
|
|
64
|
+
return {
|
|
65
|
+
label: config.label,
|
|
66
|
+
key: config.key,
|
|
67
|
+
type: "colorPicker",
|
|
68
|
+
attrs: config.attrs,
|
|
69
|
+
rules: normalizeRules(config)
|
|
70
|
+
};
|
|
71
|
+
},
|
|
63
72
|
custom(config) {
|
|
64
73
|
return {
|
|
65
74
|
label: config.label,
|
|
@@ -40,6 +40,24 @@ var widget = {
|
|
|
40
40
|
name,
|
|
41
41
|
list
|
|
42
42
|
};
|
|
43
|
+
},
|
|
44
|
+
widget(name, list) {
|
|
45
|
+
return {
|
|
46
|
+
type: 0 /* WIDGET */,
|
|
47
|
+
name,
|
|
48
|
+
list
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
root(config) {
|
|
52
|
+
return this.create({
|
|
53
|
+
name: config.name || "\u9875\u9762",
|
|
54
|
+
type: "page",
|
|
55
|
+
config: { visible: false },
|
|
56
|
+
defaultData: config.defaultData,
|
|
57
|
+
defaultStyle: config.defaultStyle,
|
|
58
|
+
attributes: config.attributes,
|
|
59
|
+
stylesheet: config.stylesheet
|
|
60
|
+
});
|
|
43
61
|
}
|
|
44
62
|
};
|
|
45
63
|
|
package/dist/class/Node.cjs
CHANGED
|
@@ -168,19 +168,6 @@ var RootNode = class {
|
|
|
168
168
|
this.data = (info == null ? void 0 : info.props) || {};
|
|
169
169
|
this.style = (info == null ? void 0 : info.style) || {};
|
|
170
170
|
}
|
|
171
|
-
validate(only = false) {
|
|
172
|
-
return __async(this, null, function* () {
|
|
173
|
-
if (only || !this.list) {
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
for (const item of this.list) {
|
|
177
|
-
const invalid = yield item.validate();
|
|
178
|
-
if (invalid) {
|
|
179
|
-
return invalid;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
171
|
};
|
|
185
172
|
// Annotate the CommonJS export names for ESM import in node:
|
|
186
173
|
0 && (module.exports = {
|
package/dist/class/Node.d.cts
CHANGED
package/dist/class/Node.d.ts
CHANGED
package/dist/class/Node.js
CHANGED
package/dist/class/index.cjs
CHANGED
|
@@ -251,19 +251,6 @@ var RootNode = class {
|
|
|
251
251
|
this.data = (info == null ? void 0 : info.props) || {};
|
|
252
252
|
this.style = (info == null ? void 0 : info.style) || {};
|
|
253
253
|
}
|
|
254
|
-
validate(only = false) {
|
|
255
|
-
return __async(this, null, function* () {
|
|
256
|
-
if (only || !this.list) {
|
|
257
|
-
return;
|
|
258
|
-
}
|
|
259
|
-
for (const item of this.list) {
|
|
260
|
-
const invalid = yield item.validate();
|
|
261
|
-
if (invalid) {
|
|
262
|
-
return invalid;
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
});
|
|
266
|
-
}
|
|
267
254
|
};
|
|
268
255
|
// Annotate the CommonJS export names for ESM import in node:
|
|
269
256
|
0 && (module.exports = {
|
package/dist/class/index.js
CHANGED
package/dist/helper/index.cjs
CHANGED
|
@@ -123,6 +123,15 @@ var schema = {
|
|
|
123
123
|
rules: normalizeRules(config)
|
|
124
124
|
};
|
|
125
125
|
},
|
|
126
|
+
color(config) {
|
|
127
|
+
return {
|
|
128
|
+
label: config.label,
|
|
129
|
+
key: config.key,
|
|
130
|
+
type: "colorPicker",
|
|
131
|
+
attrs: config.attrs,
|
|
132
|
+
rules: normalizeRules(config)
|
|
133
|
+
};
|
|
134
|
+
},
|
|
126
135
|
custom(config) {
|
|
127
136
|
return {
|
|
128
137
|
label: config.label,
|
|
@@ -201,6 +210,24 @@ var widget = {
|
|
|
201
210
|
name,
|
|
202
211
|
list
|
|
203
212
|
};
|
|
213
|
+
},
|
|
214
|
+
widget(name, list) {
|
|
215
|
+
return {
|
|
216
|
+
type: 0 /* WIDGET */,
|
|
217
|
+
name,
|
|
218
|
+
list
|
|
219
|
+
};
|
|
220
|
+
},
|
|
221
|
+
root(config) {
|
|
222
|
+
return this.create({
|
|
223
|
+
name: config.name || "\u9875\u9762",
|
|
224
|
+
type: "page",
|
|
225
|
+
config: { visible: false },
|
|
226
|
+
defaultData: config.defaultData,
|
|
227
|
+
defaultStyle: config.defaultStyle,
|
|
228
|
+
attributes: config.attributes,
|
|
229
|
+
stylesheet: config.stylesheet
|
|
230
|
+
});
|
|
204
231
|
}
|
|
205
232
|
};
|
|
206
233
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/helper/index.js
CHANGED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "../chunk-W776G2UQ.js";
|
|
5
5
|
import {
|
|
6
6
|
schema
|
|
7
|
-
} from "../chunk-
|
|
7
|
+
} from "../chunk-SIPKDBVZ.js";
|
|
8
8
|
import {
|
|
9
9
|
widget,
|
|
10
10
|
widgetType
|
|
11
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-VRAKS4JU.js";
|
|
12
12
|
import "../chunk-XJ2IJHKH.js";
|
|
13
13
|
import "../chunk-6FNC3XMI.js";
|
|
14
14
|
export {
|
package/dist/helper/schema.cjs
CHANGED
|
@@ -87,6 +87,15 @@ var schema = {
|
|
|
87
87
|
rules: normalizeRules(config)
|
|
88
88
|
};
|
|
89
89
|
},
|
|
90
|
+
color(config) {
|
|
91
|
+
return {
|
|
92
|
+
label: config.label,
|
|
93
|
+
key: config.key,
|
|
94
|
+
type: "colorPicker",
|
|
95
|
+
attrs: config.attrs,
|
|
96
|
+
rules: normalizeRules(config)
|
|
97
|
+
};
|
|
98
|
+
},
|
|
90
99
|
custom(config) {
|
|
91
100
|
return {
|
|
92
101
|
label: config.label,
|
package/dist/helper/schema.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputInstance, InputNumberInstance, SelectInstance, ElOption, SwitchInstance, ImageInstance, DatePickerInstance } from 'element-plus';
|
|
1
|
+
import { InputInstance, InputNumberInstance, SelectInstance, ElOption, SwitchInstance, ImageInstance, DatePickerInstance, ColorPickerInstance } from 'element-plus';
|
|
2
2
|
import { j as SchemaItem } from '../Widget-BXpoxMwR.cjs';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import 'async-validator';
|
|
@@ -31,6 +31,9 @@ declare const schema: {
|
|
|
31
31
|
time(config: BaseConfig & {
|
|
32
32
|
attrs?: Partial<DatePickerInstance["$props"]>;
|
|
33
33
|
}): SchemaItem;
|
|
34
|
+
color(config: BaseConfig & {
|
|
35
|
+
attrs?: ColorPickerInstance["$props"];
|
|
36
|
+
}): SchemaItem;
|
|
34
37
|
custom(config: BaseConfig & {
|
|
35
38
|
attrs?: Record<string, any>;
|
|
36
39
|
type: string;
|
package/dist/helper/schema.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InputInstance, InputNumberInstance, SelectInstance, ElOption, SwitchInstance, ImageInstance, DatePickerInstance } from 'element-plus';
|
|
1
|
+
import { InputInstance, InputNumberInstance, SelectInstance, ElOption, SwitchInstance, ImageInstance, DatePickerInstance, ColorPickerInstance } from 'element-plus';
|
|
2
2
|
import { j as SchemaItem } from '../Widget-BXpoxMwR.js';
|
|
3
3
|
import 'vue';
|
|
4
4
|
import 'async-validator';
|
|
@@ -31,6 +31,9 @@ declare const schema: {
|
|
|
31
31
|
time(config: BaseConfig & {
|
|
32
32
|
attrs?: Partial<DatePickerInstance["$props"]>;
|
|
33
33
|
}): SchemaItem;
|
|
34
|
+
color(config: BaseConfig & {
|
|
35
|
+
attrs?: ColorPickerInstance["$props"];
|
|
36
|
+
}): SchemaItem;
|
|
34
37
|
custom(config: BaseConfig & {
|
|
35
38
|
attrs?: Record<string, any>;
|
|
36
39
|
type: string;
|
package/dist/helper/schema.js
CHANGED
package/dist/helper/widget.cjs
CHANGED
|
@@ -65,6 +65,24 @@ var widget = {
|
|
|
65
65
|
name,
|
|
66
66
|
list
|
|
67
67
|
};
|
|
68
|
+
},
|
|
69
|
+
widget(name, list) {
|
|
70
|
+
return {
|
|
71
|
+
type: 0 /* WIDGET */,
|
|
72
|
+
name,
|
|
73
|
+
list
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
root(config) {
|
|
77
|
+
return this.create({
|
|
78
|
+
name: config.name || "\u9875\u9762",
|
|
79
|
+
type: "page",
|
|
80
|
+
config: { visible: false },
|
|
81
|
+
defaultData: config.defaultData,
|
|
82
|
+
defaultStyle: config.defaultStyle,
|
|
83
|
+
attributes: config.attributes,
|
|
84
|
+
stylesheet: config.stylesheet
|
|
85
|
+
});
|
|
68
86
|
}
|
|
69
87
|
};
|
|
70
88
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/helper/widget.d.cts
CHANGED
|
@@ -18,6 +18,13 @@ interface CWidget {
|
|
|
18
18
|
attributes?: SchemaItem[];
|
|
19
19
|
stylesheet?: SchemaItem[];
|
|
20
20
|
}
|
|
21
|
+
interface RootWidget {
|
|
22
|
+
name?: IWidget['_name'];
|
|
23
|
+
defaultData?: IWidget['data'];
|
|
24
|
+
defaultStyle?: IWidget['style'];
|
|
25
|
+
attributes?: SchemaItem[];
|
|
26
|
+
stylesheet?: SchemaItem[];
|
|
27
|
+
}
|
|
21
28
|
interface ColumnContainerWidget {
|
|
22
29
|
name?: IWidget['_name'];
|
|
23
30
|
icon?: IWidget['_icon'];
|
|
@@ -50,6 +57,28 @@ declare const widget: {
|
|
|
50
57
|
name: string;
|
|
51
58
|
list: Base[];
|
|
52
59
|
};
|
|
60
|
+
widget(name: string, list: IWidget[]): {
|
|
61
|
+
type: widgetType;
|
|
62
|
+
name: string;
|
|
63
|
+
list: Base[];
|
|
64
|
+
};
|
|
65
|
+
root(config: RootWidget): {
|
|
66
|
+
_name: string;
|
|
67
|
+
_view: string;
|
|
68
|
+
_icon: string | undefined;
|
|
69
|
+
container: boolean | undefined;
|
|
70
|
+
meta: {
|
|
71
|
+
draggable?: boolean;
|
|
72
|
+
visible?: boolean;
|
|
73
|
+
fixed?: boolean;
|
|
74
|
+
} | undefined;
|
|
75
|
+
schema: {
|
|
76
|
+
props: SchemaItem[] | undefined;
|
|
77
|
+
style: SchemaItem[] | undefined;
|
|
78
|
+
};
|
|
79
|
+
style: (vue.CSSProperties & WidgetPos) | undefined;
|
|
80
|
+
data: Record<string, any> | undefined;
|
|
81
|
+
};
|
|
53
82
|
};
|
|
54
83
|
|
|
55
84
|
export { widget, widgetType };
|
package/dist/helper/widget.d.ts
CHANGED
|
@@ -18,6 +18,13 @@ interface CWidget {
|
|
|
18
18
|
attributes?: SchemaItem[];
|
|
19
19
|
stylesheet?: SchemaItem[];
|
|
20
20
|
}
|
|
21
|
+
interface RootWidget {
|
|
22
|
+
name?: IWidget['_name'];
|
|
23
|
+
defaultData?: IWidget['data'];
|
|
24
|
+
defaultStyle?: IWidget['style'];
|
|
25
|
+
attributes?: SchemaItem[];
|
|
26
|
+
stylesheet?: SchemaItem[];
|
|
27
|
+
}
|
|
21
28
|
interface ColumnContainerWidget {
|
|
22
29
|
name?: IWidget['_name'];
|
|
23
30
|
icon?: IWidget['_icon'];
|
|
@@ -50,6 +57,28 @@ declare const widget: {
|
|
|
50
57
|
name: string;
|
|
51
58
|
list: Base[];
|
|
52
59
|
};
|
|
60
|
+
widget(name: string, list: IWidget[]): {
|
|
61
|
+
type: widgetType;
|
|
62
|
+
name: string;
|
|
63
|
+
list: Base[];
|
|
64
|
+
};
|
|
65
|
+
root(config: RootWidget): {
|
|
66
|
+
_name: string;
|
|
67
|
+
_view: string;
|
|
68
|
+
_icon: string | undefined;
|
|
69
|
+
container: boolean | undefined;
|
|
70
|
+
meta: {
|
|
71
|
+
draggable?: boolean;
|
|
72
|
+
visible?: boolean;
|
|
73
|
+
fixed?: boolean;
|
|
74
|
+
} | undefined;
|
|
75
|
+
schema: {
|
|
76
|
+
props: SchemaItem[] | undefined;
|
|
77
|
+
style: SchemaItem[] | undefined;
|
|
78
|
+
};
|
|
79
|
+
style: (vue.CSSProperties & WidgetPos) | undefined;
|
|
80
|
+
data: Record<string, any> | undefined;
|
|
81
|
+
};
|
|
53
82
|
};
|
|
54
83
|
|
|
55
84
|
export { widget, widgetType };
|
package/dist/helper/widget.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -127,6 +127,15 @@ var schema = {
|
|
|
127
127
|
rules: normalizeRules(config)
|
|
128
128
|
};
|
|
129
129
|
},
|
|
130
|
+
color(config) {
|
|
131
|
+
return {
|
|
132
|
+
label: config.label,
|
|
133
|
+
key: config.key,
|
|
134
|
+
type: "colorPicker",
|
|
135
|
+
attrs: config.attrs,
|
|
136
|
+
rules: normalizeRules(config)
|
|
137
|
+
};
|
|
138
|
+
},
|
|
130
139
|
custom(config) {
|
|
131
140
|
return {
|
|
132
141
|
label: config.label,
|
|
@@ -205,6 +214,24 @@ var widget = {
|
|
|
205
214
|
name,
|
|
206
215
|
list
|
|
207
216
|
};
|
|
217
|
+
},
|
|
218
|
+
widget(name, list) {
|
|
219
|
+
return {
|
|
220
|
+
type: 0 /* WIDGET */,
|
|
221
|
+
name,
|
|
222
|
+
list
|
|
223
|
+
};
|
|
224
|
+
},
|
|
225
|
+
root(config) {
|
|
226
|
+
return this.create({
|
|
227
|
+
name: config.name || "\u9875\u9762",
|
|
228
|
+
type: "page",
|
|
229
|
+
config: { visible: false },
|
|
230
|
+
defaultData: config.defaultData,
|
|
231
|
+
defaultStyle: config.defaultStyle,
|
|
232
|
+
attributes: config.attributes,
|
|
233
|
+
stylesheet: config.stylesheet
|
|
234
|
+
});
|
|
208
235
|
}
|
|
209
236
|
};
|
|
210
237
|
|
package/dist/index.js
CHANGED
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./chunk-W776G2UQ.js";
|
|
5
5
|
import {
|
|
6
6
|
schema
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-SIPKDBVZ.js";
|
|
8
8
|
import {
|
|
9
9
|
widget,
|
|
10
10
|
widgetType
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-VRAKS4JU.js";
|
|
12
12
|
import {
|
|
13
13
|
createCopy,
|
|
14
14
|
createDelete
|