@sepveneto/dnde-core 0.3.1 → 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.
@@ -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
 
@@ -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:
@@ -4,11 +4,11 @@ import {
4
4
  } from "../chunk-W776G2UQ.js";
5
5
  import {
6
6
  schema
7
- } from "../chunk-KTDOAEEU.js";
7
+ } from "../chunk-SIPKDBVZ.js";
8
8
  import {
9
9
  widget,
10
10
  widgetType
11
- } from "../chunk-VY2Z4X4S.js";
11
+ } from "../chunk-VRAKS4JU.js";
12
12
  import "../chunk-XJ2IJHKH.js";
13
13
  import "../chunk-6FNC3XMI.js";
14
14
  export {
@@ -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,
@@ -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;
@@ -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;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  schema
3
- } from "../chunk-KTDOAEEU.js";
3
+ } from "../chunk-SIPKDBVZ.js";
4
4
  import "../chunk-XJ2IJHKH.js";
5
5
  import "../chunk-6FNC3XMI.js";
6
6
  export {
@@ -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:
@@ -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 };
@@ -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 };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  widget,
3
3
  widgetType
4
- } from "../chunk-VY2Z4X4S.js";
4
+ } from "../chunk-VRAKS4JU.js";
5
5
  import "../chunk-6FNC3XMI.js";
6
6
  export {
7
7
  widget,
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-KTDOAEEU.js";
7
+ } from "./chunk-SIPKDBVZ.js";
8
8
  import {
9
9
  widget,
10
10
  widgetType
11
- } from "./chunk-VY2Z4X4S.js";
11
+ } from "./chunk-VRAKS4JU.js";
12
12
  import {
13
13
  createCopy,
14
14
  createDelete
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sepveneto/dnde-core",
3
3
  "type": "module",
4
- "version": "0.3.1",
4
+ "version": "0.4.0",
5
5
  "description": "",
6
6
  "author": "sepveneto",
7
7
  "license": "MIT",