@sepveneto/dnde-core 0.2.0 → 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.
@@ -51,6 +51,15 @@ var schema = {
51
51
  rules: normalizeRules(config)
52
52
  };
53
53
  },
54
+ time(config) {
55
+ return {
56
+ label: config.label,
57
+ key: config.key,
58
+ type: "datetimePicker",
59
+ attrs: config.attrs,
60
+ rules: normalizeRules(config)
61
+ };
62
+ },
54
63
  custom(config) {
55
64
  return {
56
65
  label: config.label,
@@ -112,6 +112,19 @@ 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
+ }
115
128
  };
116
129
 
117
130
  export {
@@ -168,6 +168,19 @@ 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
+ }
171
184
  };
172
185
  // Annotate the CommonJS export names for ESM import in node:
173
186
  0 && (module.exports = {
@@ -48,6 +48,7 @@ declare class RootNode {
48
48
  style?: Node['style'];
49
49
  list?: Node['list'];
50
50
  });
51
+ validate(only?: boolean): Promise<any>;
51
52
  }
52
53
 
53
54
  export { Node, RootNode };
@@ -48,6 +48,7 @@ declare class RootNode {
48
48
  style?: Node['style'];
49
49
  list?: Node['list'];
50
50
  });
51
+ validate(only?: boolean): Promise<any>;
51
52
  }
52
53
 
53
54
  export { Node, RootNode };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Node,
3
3
  RootNode
4
- } from "../chunk-N5D6Y2DY.js";
4
+ } from "../chunk-QWT3TZVQ.js";
5
5
  import "../chunk-6FNC3XMI.js";
6
6
  export {
7
7
  Node,
@@ -251,6 +251,19 @@ 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
+ }
254
267
  };
255
268
  // Annotate the CommonJS export names for ESM import in node:
256
269
  0 && (module.exports = {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  Node,
6
6
  RootNode
7
- } from "../chunk-N5D6Y2DY.js";
7
+ } from "../chunk-QWT3TZVQ.js";
8
8
  import {
9
9
  Widget
10
10
  } from "../chunk-KHPFRVKB.js";
@@ -114,6 +114,15 @@ var schema = {
114
114
  rules: normalizeRules(config)
115
115
  };
116
116
  },
117
+ time(config) {
118
+ return {
119
+ label: config.label,
120
+ key: config.key,
121
+ type: "datetimePicker",
122
+ attrs: config.attrs,
123
+ rules: normalizeRules(config)
124
+ };
125
+ },
117
126
  custom(config) {
118
127
  return {
119
128
  label: config.label,
@@ -4,7 +4,7 @@ import {
4
4
  } from "../chunk-W776G2UQ.js";
5
5
  import {
6
6
  schema
7
- } from "../chunk-5TEJAPQD.js";
7
+ } from "../chunk-KTDOAEEU.js";
8
8
  import {
9
9
  widget,
10
10
  widgetType
@@ -78,6 +78,15 @@ var schema = {
78
78
  rules: normalizeRules(config)
79
79
  };
80
80
  },
81
+ time(config) {
82
+ return {
83
+ label: config.label,
84
+ key: config.key,
85
+ type: "datetimePicker",
86
+ attrs: config.attrs,
87
+ rules: normalizeRules(config)
88
+ };
89
+ },
81
90
  custom(config) {
82
91
  return {
83
92
  label: config.label,
@@ -1,4 +1,4 @@
1
- import { InputInstance, InputNumberInstance, SelectInstance, ElOption, SwitchInstance, ImageInstance } from 'element-plus';
1
+ import { InputInstance, InputNumberInstance, SelectInstance, ElOption, SwitchInstance, ImageInstance, DatePickerInstance } from 'element-plus';
2
2
  import { j as SchemaItem } from '../Widget-BXpoxMwR.cjs';
3
3
  import 'vue';
4
4
  import 'async-validator';
@@ -28,6 +28,9 @@ declare const schema: {
28
28
  image(config: BaseConfig & {
29
29
  attrs?: ImageInstance["$props"];
30
30
  }): SchemaItem;
31
+ time(config: BaseConfig & {
32
+ attrs?: Partial<DatePickerInstance["$props"]>;
33
+ }): SchemaItem;
31
34
  custom(config: BaseConfig & {
32
35
  attrs?: Record<string, any>;
33
36
  type: string;
@@ -1,4 +1,4 @@
1
- import { InputInstance, InputNumberInstance, SelectInstance, ElOption, SwitchInstance, ImageInstance } from 'element-plus';
1
+ import { InputInstance, InputNumberInstance, SelectInstance, ElOption, SwitchInstance, ImageInstance, DatePickerInstance } from 'element-plus';
2
2
  import { j as SchemaItem } from '../Widget-BXpoxMwR.js';
3
3
  import 'vue';
4
4
  import 'async-validator';
@@ -28,6 +28,9 @@ declare const schema: {
28
28
  image(config: BaseConfig & {
29
29
  attrs?: ImageInstance["$props"];
30
30
  }): SchemaItem;
31
+ time(config: BaseConfig & {
32
+ attrs?: Partial<DatePickerInstance["$props"]>;
33
+ }): SchemaItem;
31
34
  custom(config: BaseConfig & {
32
35
  attrs?: Record<string, any>;
33
36
  type: string;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  schema
3
- } from "../chunk-5TEJAPQD.js";
3
+ } from "../chunk-KTDOAEEU.js";
4
4
  import "../chunk-XJ2IJHKH.js";
5
5
  import "../chunk-6FNC3XMI.js";
6
6
  export {
package/dist/index.cjs CHANGED
@@ -118,6 +118,15 @@ var schema = {
118
118
  rules: normalizeRules(config)
119
119
  };
120
120
  },
121
+ time(config) {
122
+ return {
123
+ label: config.label,
124
+ key: config.key,
125
+ type: "datetimePicker",
126
+ attrs: config.attrs,
127
+ rules: normalizeRules(config)
128
+ };
129
+ },
121
130
  custom(config) {
122
131
  return {
123
132
  label: config.label,
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk-W776G2UQ.js";
5
5
  import {
6
6
  schema
7
- } from "./chunk-5TEJAPQD.js";
7
+ } from "./chunk-KTDOAEEU.js";
8
8
  import {
9
9
  widget,
10
10
  widgetType
package/dist/tokens.d.cts CHANGED
@@ -9,6 +9,7 @@ interface EditorContext {
9
9
  node?: Node;
10
10
  plugins?: any;
11
11
  bus: EventEmitter;
12
+ extra: Record<string, any>;
12
13
  }
13
14
  declare const editorContextKey: InjectionKey<EditorContext>;
14
15
 
package/dist/tokens.d.ts CHANGED
@@ -9,6 +9,7 @@ interface EditorContext {
9
9
  node?: Node;
10
10
  plugins?: any;
11
11
  bus: EventEmitter;
12
+ extra: Record<string, any>;
12
13
  }
13
14
  declare const editorContextKey: InjectionKey<EditorContext>;
14
15
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sepveneto/dnde-core",
3
3
  "type": "module",
4
- "version": "0.2.0",
4
+ "version": "0.3.0",
5
5
  "description": "",
6
6
  "author": "sepveneto",
7
7
  "license": "MIT",
@@ -17,11 +17,6 @@
17
17
  "import": "./dist/index.js",
18
18
  "require": "./dist/index.cjs"
19
19
  },
20
- "./vue": {
21
- "types": "./dist/vue/index.d.ts",
22
- "import": "./dist/vue/index.js",
23
- "require": "./dist/vue/index.cjs"
24
- },
25
20
  "./class": {
26
21
  "types": "./dist/class/index.d.ts",
27
22
  "import": "./dist/class/index.js",