@sepveneto/dnde-core 0.4.0 → 0.4.2

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.
Files changed (46) hide show
  1. package/dist/{Widget-BXpoxMwR.d.cts → Widget-Dfw3PnBq.d.cts} +26 -5
  2. package/dist/{Widget-BXpoxMwR.d.ts → Widget-Dfw3PnBq.d.ts} +26 -5
  3. package/dist/{chunk-N5D6Y2DY.js → chunk-6MWWYHG2.js} +5 -6
  4. package/dist/{chunk-6FNC3XMI.js → chunk-HJO26HIQ.js} +0 -4
  5. package/dist/{chunk-SIPKDBVZ.js → chunk-ZH4BREEZ.js} +24 -1
  6. package/dist/class/Container.d.cts +1 -1
  7. package/dist/class/Container.d.ts +1 -1
  8. package/dist/class/Container.js +1 -1
  9. package/dist/class/Node.cjs +4 -7
  10. package/dist/class/Node.d.cts +1 -1
  11. package/dist/class/Node.d.ts +1 -1
  12. package/dist/class/Node.js +2 -2
  13. package/dist/class/Widget.d.cts +1 -1
  14. package/dist/class/Widget.d.ts +1 -1
  15. package/dist/class/Widget.js +1 -1
  16. package/dist/class/index.cjs +4 -7
  17. package/dist/class/index.d.cts +1 -1
  18. package/dist/class/index.d.ts +1 -1
  19. package/dist/class/index.js +2 -2
  20. package/dist/helper/EventEmitter.js +1 -1
  21. package/dist/helper/index.cjs +24 -1
  22. package/dist/helper/index.d.cts +1 -1
  23. package/dist/helper/index.d.ts +1 -1
  24. package/dist/helper/index.js +2 -2
  25. package/dist/helper/schema.cjs +24 -1
  26. package/dist/helper/schema.d.cts +10 -3
  27. package/dist/helper/schema.d.ts +10 -3
  28. package/dist/helper/schema.js +2 -2
  29. package/dist/helper/widget.d.cts +1 -1
  30. package/dist/helper/widget.d.ts +1 -1
  31. package/dist/helper/widget.js +1 -1
  32. package/dist/index.cjs +24 -1
  33. package/dist/index.d.cts +1 -1
  34. package/dist/index.d.ts +1 -1
  35. package/dist/index.js +2 -2
  36. package/dist/internal.d.cts +1 -1
  37. package/dist/internal.d.ts +1 -1
  38. package/dist/internal.js +1 -1
  39. package/dist/tokens.d.cts +1 -1
  40. package/dist/tokens.d.ts +1 -1
  41. package/dist/tokens.js +1 -1
  42. package/dist/types.d.cts +1 -1
  43. package/dist/types.d.ts +1 -1
  44. package/dist/types.js +1 -1
  45. package/dist/utils.js +1 -1
  46. package/package.json +1 -2
@@ -1,4 +1,4 @@
1
- import { FormItemRule, UploadRequestOptions, InputInstance, ElOption, SelectInstance, InputNumberInstance, SwitchInstance, ImageInstance } from 'element-plus';
1
+ import { FormItemRule, UploadRequestOptions, InputInstance, ElOption, SelectInstance, InputNumberInstance, SwitchInstance, ImageInstance, RadioGroupInstance, ElRadio, ElRadioButton, DatePickerInstance, ColorPickerInstance } from 'element-plus';
2
2
  import * as vue from 'vue';
3
3
  import { CSSProperties } from 'vue';
4
4
  import Validator from 'async-validator';
@@ -131,12 +131,14 @@ interface EditorData {
131
131
  }
132
132
 
133
133
  type Option = InstanceType<typeof ElOption>;
134
+ type RadioOption = InstanceType<typeof ElRadio>;
135
+ type RadioButtonOption = InstanceType<typeof ElRadioButton>;
134
136
  interface SchemaItemBase {
135
137
  label: string;
136
138
  key: string;
137
139
  rules?: FormItemRule | FormItemRule[];
138
140
  }
139
- interface ShcemaItemInput extends SchemaItemBase {
141
+ interface SchemaItemInput extends SchemaItemBase {
140
142
  type: 'input';
141
143
  attrs?: InputInstance['$props'];
142
144
  }
@@ -157,14 +159,33 @@ interface SchemaItemImage extends SchemaItemBase {
157
159
  type: 'image';
158
160
  attrs?: ImageInstance['$props'];
159
161
  }
162
+ interface SchemaItemDatetimePicker extends SchemaItemBase {
163
+ type: 'datetimePicker';
164
+ attrs?: Partial<DatePickerInstance['$props']>;
165
+ }
166
+ interface SchemaItemColorPicker extends SchemaItemBase {
167
+ type: 'colorPicker';
168
+ attrs?: ColorPickerInstance['$props'];
169
+ }
160
170
  interface SchemaItemCustom extends SchemaItemBase {
161
- type: string;
171
+ type: 'custom';
172
+ name: string;
162
173
  attrs?: Record<string, any>;
163
174
  }
164
175
  interface SchemaItemStyleNumber extends SchemaItemBase {
165
176
  type: 'styleNumber';
166
177
  }
167
- type SchemaItem = ShcemaItemInput | SchemaItemSelect | SchemaItemNumber | SchemaItemSwitch | SchemaItemImage | SchemaItemCustom | SchemaItemStyleNumber;
178
+ interface SchemaItemRadio extends SchemaItemBase {
179
+ type: 'radio';
180
+ attrs?: RadioGroupInstance['$props'];
181
+ options?: RadioOption['$props'][];
182
+ }
183
+ interface SchemaItemRadioButton extends SchemaItemBase {
184
+ type: 'radioButton';
185
+ attrs?: RadioGroupInstance['$props'];
186
+ options?: RadioButtonOption['$props'][];
187
+ }
188
+ type SchemaItem = SchemaItemInput | SchemaItemSelect | SchemaItemNumber | SchemaItemSwitch | SchemaItemImage | SchemaItemCustom | SchemaItemStyleNumber | SchemaItemRadio | SchemaItemRadioButton | SchemaItemDatetimePicker | SchemaItemColorPicker;
168
189
  declare class Widget {
169
190
  name: string;
170
191
  view: string;
@@ -184,4 +205,4 @@ declare class Widget {
184
205
  get validatorStyle(): Validator;
185
206
  }
186
207
 
187
- export { type Base as B, type DisabledItemFn as D, type EditorConfig as E, type IWidget as I, type SchemaOther as S, type WidgetPos as W, type SchemaBox as a, type ISchema as b, type EditorSchema as c, type EditorWidget as d, type EditorRoute as e, type EditorWidgets as f, type EditorSettings as g, type EditorData as h, isBox as i, type SchemaItem as j, Widget as k };
208
+ export { type Base as B, type DisabledItemFn as D, type EditorConfig as E, type IWidget as I, type Option as O, type RadioOption as R, type SchemaOther as S, type WidgetPos as W, type SchemaBox as a, type ISchema as b, type EditorSchema as c, type EditorWidget as d, type EditorRoute as e, type EditorWidgets as f, type EditorSettings as g, type EditorData as h, isBox as i, type RadioButtonOption as j, type SchemaItem as k, Widget as l };
@@ -1,4 +1,4 @@
1
- import { FormItemRule, UploadRequestOptions, InputInstance, ElOption, SelectInstance, InputNumberInstance, SwitchInstance, ImageInstance } from 'element-plus';
1
+ import { FormItemRule, UploadRequestOptions, InputInstance, ElOption, SelectInstance, InputNumberInstance, SwitchInstance, ImageInstance, RadioGroupInstance, ElRadio, ElRadioButton, DatePickerInstance, ColorPickerInstance } from 'element-plus';
2
2
  import * as vue from 'vue';
3
3
  import { CSSProperties } from 'vue';
4
4
  import Validator from 'async-validator';
@@ -131,12 +131,14 @@ interface EditorData {
131
131
  }
132
132
 
133
133
  type Option = InstanceType<typeof ElOption>;
134
+ type RadioOption = InstanceType<typeof ElRadio>;
135
+ type RadioButtonOption = InstanceType<typeof ElRadioButton>;
134
136
  interface SchemaItemBase {
135
137
  label: string;
136
138
  key: string;
137
139
  rules?: FormItemRule | FormItemRule[];
138
140
  }
139
- interface ShcemaItemInput extends SchemaItemBase {
141
+ interface SchemaItemInput extends SchemaItemBase {
140
142
  type: 'input';
141
143
  attrs?: InputInstance['$props'];
142
144
  }
@@ -157,14 +159,33 @@ interface SchemaItemImage extends SchemaItemBase {
157
159
  type: 'image';
158
160
  attrs?: ImageInstance['$props'];
159
161
  }
162
+ interface SchemaItemDatetimePicker extends SchemaItemBase {
163
+ type: 'datetimePicker';
164
+ attrs?: Partial<DatePickerInstance['$props']>;
165
+ }
166
+ interface SchemaItemColorPicker extends SchemaItemBase {
167
+ type: 'colorPicker';
168
+ attrs?: ColorPickerInstance['$props'];
169
+ }
160
170
  interface SchemaItemCustom extends SchemaItemBase {
161
- type: string;
171
+ type: 'custom';
172
+ name: string;
162
173
  attrs?: Record<string, any>;
163
174
  }
164
175
  interface SchemaItemStyleNumber extends SchemaItemBase {
165
176
  type: 'styleNumber';
166
177
  }
167
- type SchemaItem = ShcemaItemInput | SchemaItemSelect | SchemaItemNumber | SchemaItemSwitch | SchemaItemImage | SchemaItemCustom | SchemaItemStyleNumber;
178
+ interface SchemaItemRadio extends SchemaItemBase {
179
+ type: 'radio';
180
+ attrs?: RadioGroupInstance['$props'];
181
+ options?: RadioOption['$props'][];
182
+ }
183
+ interface SchemaItemRadioButton extends SchemaItemBase {
184
+ type: 'radioButton';
185
+ attrs?: RadioGroupInstance['$props'];
186
+ options?: RadioButtonOption['$props'][];
187
+ }
188
+ type SchemaItem = SchemaItemInput | SchemaItemSelect | SchemaItemNumber | SchemaItemSwitch | SchemaItemImage | SchemaItemCustom | SchemaItemStyleNumber | SchemaItemRadio | SchemaItemRadioButton | SchemaItemDatetimePicker | SchemaItemColorPicker;
168
189
  declare class Widget {
169
190
  name: string;
170
191
  view: string;
@@ -184,4 +205,4 @@ declare class Widget {
184
205
  get validatorStyle(): Validator;
185
206
  }
186
207
 
187
- export { type Base as B, type DisabledItemFn as D, type EditorConfig as E, type IWidget as I, type SchemaOther as S, type WidgetPos as W, type SchemaBox as a, type ISchema as b, type EditorSchema as c, type EditorWidget as d, type EditorRoute as e, type EditorWidgets as f, type EditorSettings as g, type EditorData as h, isBox as i, type SchemaItem as j, Widget as k };
208
+ export { type Base as B, type DisabledItemFn as D, type EditorConfig as E, type IWidget as I, type Option as O, type RadioOption as R, type SchemaOther as S, type WidgetPos as W, type SchemaBox as a, type ISchema as b, type EditorSchema as c, type EditorWidget as d, type EditorRoute as e, type EditorWidgets as f, type EditorSettings as g, type EditorData as h, isBox as i, type RadioButtonOption as j, type SchemaItem as k, Widget as l };
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  __async,
3
- __spreadProps,
4
3
  __spreadValues
5
- } from "./chunk-6FNC3XMI.js";
4
+ } from "./chunk-HJO26HIQ.js";
6
5
 
7
6
  // src/class/Node.ts
8
7
  import { v4 } from "uuid";
@@ -86,16 +85,16 @@ var Node = class _Node {
86
85
  }
87
86
  parse() {
88
87
  var _a;
89
- const res = __spreadProps(__spreadValues({
88
+ const res = {
90
89
  _uuid: this.wid,
91
90
  _name: this.name,
92
91
  _view: this.type,
93
92
  // TODO
94
- isShow: true
95
- }, this.data), {
93
+ isShow: true,
94
+ data: this.data,
96
95
  style: this.style,
97
96
  list: (_a = this.list) == null ? void 0 : _a.map((item) => item.parse())
98
- });
97
+ };
99
98
  return res;
100
99
  }
101
100
  };
@@ -1,6 +1,4 @@
1
1
  var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
2
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
3
  var __hasOwnProp = Object.prototype.hasOwnProperty;
6
4
  var __propIsEnum = Object.prototype.propertyIsEnumerable;
@@ -16,7 +14,6 @@ var __spreadValues = (a, b) => {
16
14
  }
17
15
  return a;
18
16
  };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
17
  var __async = (__this, __arguments, generator) => {
21
18
  return new Promise((resolve, reject) => {
22
19
  var fulfilled = (value) => {
@@ -40,6 +37,5 @@ var __async = (__this, __arguments, generator) => {
40
37
 
41
38
  export {
42
39
  __spreadValues,
43
- __spreadProps,
44
40
  __async
45
41
  };
@@ -33,6 +33,28 @@ var schema = {
33
33
  options: config.options
34
34
  };
35
35
  },
36
+ radio(config) {
37
+ const base = {
38
+ label: config.label,
39
+ key: config.key,
40
+ type: "radio",
41
+ rules: normalizeRules(config),
42
+ attrs: config.attrs,
43
+ options: config.options
44
+ };
45
+ return base;
46
+ },
47
+ radioButton(config) {
48
+ const base = {
49
+ label: config.label,
50
+ key: config.key,
51
+ type: "radioButton",
52
+ rules: normalizeRules(config),
53
+ attrs: config.attrs,
54
+ options: config.options
55
+ };
56
+ return base;
57
+ },
36
58
  switch(config) {
37
59
  return {
38
60
  label: config.label,
@@ -73,7 +95,8 @@ var schema = {
73
95
  return {
74
96
  label: config.label,
75
97
  key: config.key,
76
- type: config.type,
98
+ name: config.type,
99
+ type: "custom",
77
100
  attrs: config.attrs,
78
101
  rules: normalizeRules(config)
79
102
  };
@@ -1,4 +1,4 @@
1
- import { k as Widget, I as IWidget } from '../Widget-BXpoxMwR.cjs';
1
+ import { l as Widget, I as IWidget } from '../Widget-Dfw3PnBq.cjs';
2
2
  import 'element-plus';
3
3
  import 'vue';
4
4
  import 'async-validator';
@@ -1,4 +1,4 @@
1
- import { k as Widget, I as IWidget } from '../Widget-BXpoxMwR.js';
1
+ import { l as Widget, I as IWidget } from '../Widget-Dfw3PnBq.js';
2
2
  import 'element-plus';
3
3
  import 'vue';
4
4
  import 'async-validator';
@@ -2,7 +2,7 @@ import {
2
2
  Container
3
3
  } from "../chunk-ZNYRMDSU.js";
4
4
  import "../chunk-KHPFRVKB.js";
5
- import "../chunk-6FNC3XMI.js";
5
+ import "../chunk-HJO26HIQ.js";
6
6
  export {
7
7
  Container
8
8
  };
@@ -1,8 +1,6 @@
1
1
  "use strict";
2
2
  var __defProp = Object.defineProperty;
3
- var __defProps = Object.defineProperties;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
7
5
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
8
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
@@ -19,7 +17,6 @@ var __spreadValues = (a, b) => {
19
17
  }
20
18
  return a;
21
19
  };
22
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
23
20
  var __export = (target, all) => {
24
21
  for (var name in all)
25
22
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -142,16 +139,16 @@ var Node = class _Node {
142
139
  }
143
140
  parse() {
144
141
  var _a;
145
- const res = __spreadProps(__spreadValues({
142
+ const res = {
146
143
  _uuid: this.wid,
147
144
  _name: this.name,
148
145
  _view: this.type,
149
146
  // TODO
150
- isShow: true
151
- }, this.data), {
147
+ isShow: true,
148
+ data: this.data,
152
149
  style: this.style,
153
150
  list: (_a = this.list) == null ? void 0 : _a.map((item) => item.parse())
154
- });
151
+ };
155
152
  return res;
156
153
  }
157
154
  };
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties } from 'vue';
2
- import { k as Widget } from '../Widget-BXpoxMwR.cjs';
2
+ import { l as Widget } from '../Widget-Dfw3PnBq.cjs';
3
3
  import 'element-plus';
4
4
  import 'async-validator';
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { CSSProperties } from 'vue';
2
- import { k as Widget } from '../Widget-BXpoxMwR.js';
2
+ import { l as Widget } from '../Widget-Dfw3PnBq.js';
3
3
  import 'element-plus';
4
4
  import 'async-validator';
5
5
 
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  Node,
3
3
  RootNode
4
- } from "../chunk-N5D6Y2DY.js";
5
- import "../chunk-6FNC3XMI.js";
4
+ } from "../chunk-6MWWYHG2.js";
5
+ import "../chunk-HJO26HIQ.js";
6
6
  export {
7
7
  Node,
8
8
  RootNode
@@ -1,4 +1,4 @@
1
- export { j as SchemaItem, k as Widget } from '../Widget-BXpoxMwR.cjs';
1
+ export { O as Option, j as RadioButtonOption, R as RadioOption, k as SchemaItem, l as Widget } from '../Widget-Dfw3PnBq.cjs';
2
2
  import 'vue';
3
3
  import 'element-plus';
4
4
  import 'async-validator';
@@ -1,4 +1,4 @@
1
- export { j as SchemaItem, k as Widget } from '../Widget-BXpoxMwR.js';
1
+ export { O as Option, j as RadioButtonOption, R as RadioOption, k as SchemaItem, l as Widget } from '../Widget-Dfw3PnBq.js';
2
2
  import 'vue';
3
3
  import 'element-plus';
4
4
  import 'async-validator';
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Widget
3
3
  } from "../chunk-KHPFRVKB.js";
4
- import "../chunk-6FNC3XMI.js";
4
+ import "../chunk-HJO26HIQ.js";
5
5
  export {
6
6
  Widget
7
7
  };
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
2
  var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
8
6
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
7
  var __getProtoOf = Object.getPrototypeOf;
@@ -21,7 +19,6 @@ var __spreadValues = (a, b) => {
21
19
  }
22
20
  return a;
23
21
  };
24
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
25
22
  var __export = (target, all) => {
26
23
  for (var name in all)
27
24
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -225,16 +222,16 @@ var Node = class _Node {
225
222
  }
226
223
  parse() {
227
224
  var _a;
228
- const res = __spreadProps(__spreadValues({
225
+ const res = {
229
226
  _uuid: this.wid,
230
227
  _name: this.name,
231
228
  _view: this.type,
232
229
  // TODO
233
- isShow: true
234
- }, this.data), {
230
+ isShow: true,
231
+ data: this.data,
235
232
  style: this.style,
236
233
  list: (_a = this.list) == null ? void 0 : _a.map((item) => item.parse())
237
- });
234
+ };
238
235
  return res;
239
236
  }
240
237
  };
@@ -1,6 +1,6 @@
1
1
  export { Container } from './Container.cjs';
2
2
  export { Node, RootNode } from './Node.cjs';
3
- export { j as SchemaItem, k as Widget } from '../Widget-BXpoxMwR.cjs';
3
+ export { O as Option, j as RadioButtonOption, R as RadioOption, k as SchemaItem, l as Widget } from '../Widget-Dfw3PnBq.cjs';
4
4
  import 'vue';
5
5
  import 'element-plus';
6
6
  import 'async-validator';
@@ -1,6 +1,6 @@
1
1
  export { Container } from './Container.js';
2
2
  export { Node, RootNode } from './Node.js';
3
- export { j as SchemaItem, k as Widget } from '../Widget-BXpoxMwR.js';
3
+ export { O as Option, j as RadioButtonOption, R as RadioOption, k as SchemaItem, l as Widget } from '../Widget-Dfw3PnBq.js';
4
4
  import 'vue';
5
5
  import 'element-plus';
6
6
  import 'async-validator';
@@ -4,11 +4,11 @@ import {
4
4
  import {
5
5
  Node,
6
6
  RootNode
7
- } from "../chunk-N5D6Y2DY.js";
7
+ } from "../chunk-6MWWYHG2.js";
8
8
  import {
9
9
  Widget
10
10
  } from "../chunk-KHPFRVKB.js";
11
- import "../chunk-6FNC3XMI.js";
11
+ import "../chunk-HJO26HIQ.js";
12
12
  export {
13
13
  Container,
14
14
  Node,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  EventEmitter
3
3
  } from "../chunk-W776G2UQ.js";
4
- import "../chunk-6FNC3XMI.js";
4
+ import "../chunk-HJO26HIQ.js";
5
5
  export {
6
6
  EventEmitter
7
7
  };
@@ -96,6 +96,28 @@ var schema = {
96
96
  options: config.options
97
97
  };
98
98
  },
99
+ radio(config) {
100
+ const base = {
101
+ label: config.label,
102
+ key: config.key,
103
+ type: "radio",
104
+ rules: normalizeRules(config),
105
+ attrs: config.attrs,
106
+ options: config.options
107
+ };
108
+ return base;
109
+ },
110
+ radioButton(config) {
111
+ const base = {
112
+ label: config.label,
113
+ key: config.key,
114
+ type: "radioButton",
115
+ rules: normalizeRules(config),
116
+ attrs: config.attrs,
117
+ options: config.options
118
+ };
119
+ return base;
120
+ },
99
121
  switch(config) {
100
122
  return {
101
123
  label: config.label,
@@ -136,7 +158,8 @@ var schema = {
136
158
  return {
137
159
  label: config.label,
138
160
  key: config.key,
139
- type: config.type,
161
+ name: config.type,
162
+ type: "custom",
140
163
  attrs: config.attrs,
141
164
  rules: normalizeRules(config)
142
165
  };
@@ -2,6 +2,6 @@ export { EventEmitter } from './EventEmitter.cjs';
2
2
  export { schema } from './schema.cjs';
3
3
  export { widget, widgetType } from './widget.cjs';
4
4
  import 'element-plus';
5
- import '../Widget-BXpoxMwR.cjs';
5
+ import '../Widget-Dfw3PnBq.cjs';
6
6
  import 'vue';
7
7
  import 'async-validator';
@@ -2,6 +2,6 @@ export { EventEmitter } from './EventEmitter.js';
2
2
  export { schema } from './schema.js';
3
3
  export { widget, widgetType } from './widget.js';
4
4
  import 'element-plus';
5
- import '../Widget-BXpoxMwR.js';
5
+ import '../Widget-Dfw3PnBq.js';
6
6
  import 'vue';
7
7
  import 'async-validator';
@@ -4,13 +4,13 @@ import {
4
4
  } from "../chunk-W776G2UQ.js";
5
5
  import {
6
6
  schema
7
- } from "../chunk-SIPKDBVZ.js";
7
+ } from "../chunk-ZH4BREEZ.js";
8
8
  import {
9
9
  widget,
10
10
  widgetType
11
11
  } from "../chunk-VRAKS4JU.js";
12
12
  import "../chunk-XJ2IJHKH.js";
13
- import "../chunk-6FNC3XMI.js";
13
+ import "../chunk-HJO26HIQ.js";
14
14
  export {
15
15
  EventEmitter,
16
16
  schema,
@@ -60,6 +60,28 @@ var schema = {
60
60
  options: config.options
61
61
  };
62
62
  },
63
+ radio(config) {
64
+ const base = {
65
+ label: config.label,
66
+ key: config.key,
67
+ type: "radio",
68
+ rules: normalizeRules(config),
69
+ attrs: config.attrs,
70
+ options: config.options
71
+ };
72
+ return base;
73
+ },
74
+ radioButton(config) {
75
+ const base = {
76
+ label: config.label,
77
+ key: config.key,
78
+ type: "radioButton",
79
+ rules: normalizeRules(config),
80
+ attrs: config.attrs,
81
+ options: config.options
82
+ };
83
+ return base;
84
+ },
63
85
  switch(config) {
64
86
  return {
65
87
  label: config.label,
@@ -100,7 +122,8 @@ var schema = {
100
122
  return {
101
123
  label: config.label,
102
124
  key: config.key,
103
- type: config.type,
125
+ name: config.type,
126
+ type: "custom",
104
127
  attrs: config.attrs,
105
128
  rules: normalizeRules(config)
106
129
  };
@@ -1,9 +1,8 @@
1
- import { InputInstance, InputNumberInstance, SelectInstance, ElOption, SwitchInstance, ImageInstance, DatePickerInstance, ColorPickerInstance } from 'element-plus';
2
- import { j as SchemaItem } from '../Widget-BXpoxMwR.cjs';
1
+ import { InputInstance, InputNumberInstance, SelectInstance, RadioInstance, SwitchInstance, ImageInstance, DatePickerInstance, ColorPickerInstance } from 'element-plus';
2
+ import { k as SchemaItem, O as Option, R as RadioOption, j as RadioButtonOption } from '../Widget-Dfw3PnBq.cjs';
3
3
  import 'vue';
4
4
  import 'async-validator';
5
5
 
6
- type Option = InstanceType<typeof ElOption>;
7
6
  interface BaseConfig {
8
7
  label: SchemaItem['label'];
9
8
  key: SchemaItem['key'];
@@ -22,6 +21,14 @@ declare const schema: {
22
21
  attrs?: SelectInstance["$props"];
23
22
  options?: Option["$props"][];
24
23
  }): SchemaItem;
24
+ radio(config: BaseConfig & {
25
+ attrs?: RadioInstance["$props"];
26
+ options?: RadioOption["$props"][];
27
+ }): SchemaItem;
28
+ radioButton(config: BaseConfig & {
29
+ attrs?: RadioInstance["$props"];
30
+ options?: RadioButtonOption["$props"][];
31
+ }): SchemaItem;
25
32
  switch(config: BaseConfig & {
26
33
  attrs?: SwitchInstance["$props"];
27
34
  }): SchemaItem;
@@ -1,9 +1,8 @@
1
- import { InputInstance, InputNumberInstance, SelectInstance, ElOption, SwitchInstance, ImageInstance, DatePickerInstance, ColorPickerInstance } from 'element-plus';
2
- import { j as SchemaItem } from '../Widget-BXpoxMwR.js';
1
+ import { InputInstance, InputNumberInstance, SelectInstance, RadioInstance, SwitchInstance, ImageInstance, DatePickerInstance, ColorPickerInstance } from 'element-plus';
2
+ import { k as SchemaItem, O as Option, R as RadioOption, j as RadioButtonOption } from '../Widget-Dfw3PnBq.js';
3
3
  import 'vue';
4
4
  import 'async-validator';
5
5
 
6
- type Option = InstanceType<typeof ElOption>;
7
6
  interface BaseConfig {
8
7
  label: SchemaItem['label'];
9
8
  key: SchemaItem['key'];
@@ -22,6 +21,14 @@ declare const schema: {
22
21
  attrs?: SelectInstance["$props"];
23
22
  options?: Option["$props"][];
24
23
  }): SchemaItem;
24
+ radio(config: BaseConfig & {
25
+ attrs?: RadioInstance["$props"];
26
+ options?: RadioOption["$props"][];
27
+ }): SchemaItem;
28
+ radioButton(config: BaseConfig & {
29
+ attrs?: RadioInstance["$props"];
30
+ options?: RadioButtonOption["$props"][];
31
+ }): SchemaItem;
25
32
  switch(config: BaseConfig & {
26
33
  attrs?: SwitchInstance["$props"];
27
34
  }): SchemaItem;
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  schema
3
- } from "../chunk-SIPKDBVZ.js";
3
+ } from "../chunk-ZH4BREEZ.js";
4
4
  import "../chunk-XJ2IJHKH.js";
5
- import "../chunk-6FNC3XMI.js";
5
+ import "../chunk-HJO26HIQ.js";
6
6
  export {
7
7
  schema
8
8
  };
@@ -1,4 +1,4 @@
1
- import { I as IWidget, j as SchemaItem, W as WidgetPos, B as Base } from '../Widget-BXpoxMwR.cjs';
1
+ import { I as IWidget, k as SchemaItem, W as WidgetPos, B as Base } from '../Widget-Dfw3PnBq.cjs';
2
2
  import * as vue from 'vue';
3
3
  import 'element-plus';
4
4
  import 'async-validator';
@@ -1,4 +1,4 @@
1
- import { I as IWidget, j as SchemaItem, W as WidgetPos, B as Base } from '../Widget-BXpoxMwR.js';
1
+ import { I as IWidget, k as SchemaItem, W as WidgetPos, B as Base } from '../Widget-Dfw3PnBq.js';
2
2
  import * as vue from 'vue';
3
3
  import 'element-plus';
4
4
  import 'async-validator';
@@ -2,7 +2,7 @@ import {
2
2
  widget,
3
3
  widgetType
4
4
  } from "../chunk-VRAKS4JU.js";
5
- import "../chunk-6FNC3XMI.js";
5
+ import "../chunk-HJO26HIQ.js";
6
6
  export {
7
7
  widget,
8
8
  widgetType
package/dist/index.cjs CHANGED
@@ -100,6 +100,28 @@ var schema = {
100
100
  options: config.options
101
101
  };
102
102
  },
103
+ radio(config) {
104
+ const base = {
105
+ label: config.label,
106
+ key: config.key,
107
+ type: "radio",
108
+ rules: normalizeRules(config),
109
+ attrs: config.attrs,
110
+ options: config.options
111
+ };
112
+ return base;
113
+ },
114
+ radioButton(config) {
115
+ const base = {
116
+ label: config.label,
117
+ key: config.key,
118
+ type: "radioButton",
119
+ rules: normalizeRules(config),
120
+ attrs: config.attrs,
121
+ options: config.options
122
+ };
123
+ return base;
124
+ },
103
125
  switch(config) {
104
126
  return {
105
127
  label: config.label,
@@ -140,7 +162,8 @@ var schema = {
140
162
  return {
141
163
  label: config.label,
142
164
  key: config.key,
143
- type: config.type,
165
+ name: config.type,
166
+ type: "custom",
144
167
  attrs: config.attrs,
145
168
  rules: normalizeRules(config)
146
169
  };
package/dist/index.d.cts CHANGED
@@ -3,7 +3,7 @@ export { schema } from './helper/schema.cjs';
3
3
  export { widget, widgetType } from './helper/widget.cjs';
4
4
  export { createCopy, createDelete } from './internal.cjs';
5
5
  export { EditorContext, editorContextKey } from './tokens.cjs';
6
- export { B as Base, D as DisabledItemFn, E as EditorConfig, h as EditorData, e as EditorRoute, c as EditorSchema, g as EditorSettings, d as EditorWidget, f as EditorWidgets, b as ISchema, I as IWidget, a as SchemaBox, S as SchemaOther, W as WidgetPos, i as isBox } from './Widget-BXpoxMwR.cjs';
6
+ export { B as Base, D as DisabledItemFn, E as EditorConfig, h as EditorData, e as EditorRoute, c as EditorSchema, g as EditorSettings, d as EditorWidget, f as EditorWidgets, b as ISchema, I as IWidget, a as SchemaBox, S as SchemaOther, W as WidgetPos, i as isBox } from './Widget-Dfw3PnBq.cjs';
7
7
  import 'element-plus';
8
8
  import 'vue';
9
9
  import './class/Node.cjs';
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { schema } from './helper/schema.js';
3
3
  export { widget, widgetType } from './helper/widget.js';
4
4
  export { createCopy, createDelete } from './internal.js';
5
5
  export { EditorContext, editorContextKey } from './tokens.js';
6
- export { B as Base, D as DisabledItemFn, E as EditorConfig, h as EditorData, e as EditorRoute, c as EditorSchema, g as EditorSettings, d as EditorWidget, f as EditorWidgets, b as ISchema, I as IWidget, a as SchemaBox, S as SchemaOther, W as WidgetPos, i as isBox } from './Widget-BXpoxMwR.js';
6
+ export { B as Base, D as DisabledItemFn, E as EditorConfig, h as EditorData, e as EditorRoute, c as EditorSchema, g as EditorSettings, d as EditorWidget, f as EditorWidgets, b as ISchema, I as IWidget, a as SchemaBox, S as SchemaOther, W as WidgetPos, i as isBox } from './Widget-Dfw3PnBq.js';
7
7
  import 'element-plus';
8
8
  import 'vue';
9
9
  import './class/Node.js';
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-SIPKDBVZ.js";
7
+ } from "./chunk-ZH4BREEZ.js";
8
8
  import {
9
9
  widget,
10
10
  widgetType
@@ -20,7 +20,7 @@ import {
20
20
  isBox
21
21
  } from "./chunk-4QIIKQ6B.js";
22
22
  import "./chunk-XJ2IJHKH.js";
23
- import "./chunk-6FNC3XMI.js";
23
+ import "./chunk-HJO26HIQ.js";
24
24
  export {
25
25
  EventEmitter,
26
26
  createCopy,
@@ -1,6 +1,6 @@
1
1
  import { Node } from './class/Node.cjs';
2
2
  import 'vue';
3
- import './Widget-BXpoxMwR.cjs';
3
+ import './Widget-Dfw3PnBq.cjs';
4
4
  import 'element-plus';
5
5
  import 'async-validator';
6
6
 
@@ -1,6 +1,6 @@
1
1
  import { Node } from './class/Node.js';
2
2
  import 'vue';
3
- import './Widget-BXpoxMwR.js';
3
+ import './Widget-Dfw3PnBq.js';
4
4
  import 'element-plus';
5
5
  import 'async-validator';
6
6
 
package/dist/internal.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  createCopy,
3
3
  createDelete
4
4
  } from "./chunk-TM53N6AZ.js";
5
- import "./chunk-6FNC3XMI.js";
5
+ import "./chunk-HJO26HIQ.js";
6
6
  export {
7
7
  createCopy,
8
8
  createDelete
package/dist/tokens.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { InjectionKey } from 'vue';
2
2
  import { EventEmitter } from './helper/EventEmitter.cjs';
3
3
  import { Node } from './class/Node.cjs';
4
- import './Widget-BXpoxMwR.cjs';
4
+ import './Widget-Dfw3PnBq.cjs';
5
5
  import 'element-plus';
6
6
  import 'async-validator';
7
7
 
package/dist/tokens.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { InjectionKey } from 'vue';
2
2
  import { EventEmitter } from './helper/EventEmitter.js';
3
3
  import { Node } from './class/Node.js';
4
- import './Widget-BXpoxMwR.js';
4
+ import './Widget-Dfw3PnBq.js';
5
5
  import 'element-plus';
6
6
  import 'async-validator';
7
7
 
package/dist/tokens.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  editorContextKey
3
3
  } from "./chunk-D2MSIUE2.js";
4
- import "./chunk-6FNC3XMI.js";
4
+ import "./chunk-HJO26HIQ.js";
5
5
  export {
6
6
  editorContextKey
7
7
  };
package/dist/types.d.cts CHANGED
@@ -1,4 +1,4 @@
1
1
  import 'element-plus';
2
2
  import 'vue';
3
- export { B as Base, D as DisabledItemFn, E as EditorConfig, h as EditorData, e as EditorRoute, c as EditorSchema, g as EditorSettings, d as EditorWidget, f as EditorWidgets, b as ISchema, I as IWidget, a as SchemaBox, S as SchemaOther, W as WidgetPos, i as isBox } from './Widget-BXpoxMwR.cjs';
3
+ export { B as Base, D as DisabledItemFn, E as EditorConfig, h as EditorData, e as EditorRoute, c as EditorSchema, g as EditorSettings, d as EditorWidget, f as EditorWidgets, b as ISchema, I as IWidget, a as SchemaBox, S as SchemaOther, W as WidgetPos, i as isBox } from './Widget-Dfw3PnBq.cjs';
4
4
  import 'async-validator';
package/dist/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import 'element-plus';
2
2
  import 'vue';
3
- export { B as Base, D as DisabledItemFn, E as EditorConfig, h as EditorData, e as EditorRoute, c as EditorSchema, g as EditorSettings, d as EditorWidget, f as EditorWidgets, b as ISchema, I as IWidget, a as SchemaBox, S as SchemaOther, W as WidgetPos, i as isBox } from './Widget-BXpoxMwR.js';
3
+ export { B as Base, D as DisabledItemFn, E as EditorConfig, h as EditorData, e as EditorRoute, c as EditorSchema, g as EditorSettings, d as EditorWidget, f as EditorWidgets, b as ISchema, I as IWidget, a as SchemaBox, S as SchemaOther, W as WidgetPos, i as isBox } from './Widget-Dfw3PnBq.js';
4
4
  import 'async-validator';
package/dist/types.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  isBox
3
3
  } from "./chunk-4QIIKQ6B.js";
4
- import "./chunk-6FNC3XMI.js";
4
+ import "./chunk-HJO26HIQ.js";
5
5
  export {
6
6
  isBox
7
7
  };
package/dist/utils.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  likeArray
3
3
  } from "./chunk-XJ2IJHKH.js";
4
- import "./chunk-6FNC3XMI.js";
4
+ import "./chunk-HJO26HIQ.js";
5
5
  export {
6
6
  likeArray
7
7
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sepveneto/dnde-core",
3
3
  "type": "module",
4
- "version": "0.4.0",
4
+ "version": "0.4.2",
5
5
  "description": "",
6
6
  "author": "sepveneto",
7
7
  "license": "MIT",
@@ -40,7 +40,6 @@
40
40
  "uuid": "^11.1.0"
41
41
  },
42
42
  "devDependencies": {
43
- "element-plus": "^2.9.11",
44
43
  "tsup": "^8.4.0",
45
44
  "vite": "^4.5.5",
46
45
  "vitest": "^0.28.5",