@duxweb/dvha-pro 1.0.40 → 1.0.42
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/cjs/components/formEditor/components/date.cjs +1 -1
- package/dist/cjs/components/formEditor/renderer.cjs +1 -1
- package/dist/cjs/theme/uno.css.cjs +1 -1
- package/dist/esm/components/formEditor/components/date.js +85 -57
- package/dist/esm/components/formEditor/renderer.js +24 -24
- package/dist/esm/theme/uno.css.js +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("@duxweb/dvha-core"),s=require("@vueuse/core"),n=require("naive-ui");require("clsx");require("vue-router");require("@overlastic/vue");require("vue-echarts");require("vue3-ace-editor");require("ace-builds/src-noconflict/mode-vue");require("ace-builds/src-noconflict/mode-javascript");require("ace-builds/src-noconflict/mode-html");require("ace-builds/src-noconflict/mode-json");require("ace-builds/src-noconflict/mode-json5");require("ace-builds/src-noconflict/theme-tomorrow_night");require("ace-builds/src-noconflict/theme-tomorrow");require("ace-builds/src-noconflict/ext-searchbox");require("ace-builds/src-noconflict/ext-language_tools");require("ace-builds/src-noconflict/mode-snippets");require("vue-cropper");require("jinrishici");require("lodash-es");require("vue-draggable-plus");require("aieditor");const l=require("../../form/formItem.cjs");require("@vee-validate/i18n");require("colorizr");require("echarts");require("highlight.js/lib/core");require("highlight.js/lib/languages/bash");require("highlight.js/lib/languages/css");require("highlight.js/lib/languages/go");require("highlight.js/lib/languages/java");require("highlight.js/lib/languages/javascript");require("highlight.js/lib/languages/json");require("highlight.js/lib/languages/markdown");require("highlight.js/lib/languages/php");require("highlight.js/lib/languages/python");require("highlight.js/lib/languages/shell");require("highlight.js/lib/languages/sql");require("highlight.js/lib/languages/typescript");require("highlight.js/lib/languages/xml");require("@ant-design/colors");require("@unocss/preset-icons/browser");require("@unocss/preset-typography");require("unocss/preset-wind4");require("@vee-validate/i18n/dist/locale/en.json");require("@vee-validate/i18n/dist/locale/zh_CN.json");require("vee-validate");require("vue-command-palette");require("@duxweb/dvha-naiveui");require("../../../pages/page404.cjs");const i=require("../base/base.cjs"),q=require("../../designEditor/editor/setting.cjs");require("mime");require("@iconify-json/tabler/icons.json");require("../../posterEditor/elements/index.cjs");require("fabric");require("dayjs");require("@tanstack/vue-query");require("pinia");require("short-unique-id");const y=e.defineComponent({name:"FormEditorDate",props:{options:Object},setup(a){const t=a.options?.attr;return()=>e.createVNode(l.DuxFormItem,{label:a.options?.label,description:a.options?.desc},{default:()=>[e.createVNode("div",{class:"flex-1"},[e.createVNode(n.NDatePicker,t,null)])]})}});function f(a){const{options:t,model:u}=a||{},r=c=>{switch(c){case"date":return"yyyy-MM-dd";case"datetime":return"yyyy-MM-dd HH:mm:ss";case"daterange":return"yyyy-MM-dd";case"datetimerange":return"yyyy-MM-dd HH:mm:ss";case"month":return"yyyy-MM";case"monthrange":return"yyyy-MM";case"year":return"yyyy";case"yearrange":return"yyyy";case"quarter":return"yyyy-[Q]Q";case"quarterrange":return"yyyy-[Q]Q";case"week":return"yyyy-[W]WW";default:return"yyyy-MM-dd"}},o=t?.attr?.type||"date",d=r(o);return{tag:"dux-form-item",attrs:{label:t?.label,description:t?.desc},children:[{tag:"n-date-picker",attrs:{...t?.attr,"v-model:formatted-value":[u,t?.name],"value-format":d}}]}}const v=e.defineComponent({name:"FormEditorDateSetting",props:{value:{type:Object,default:{}}},setup(a,{emit:t}){const u=s.useVModel(a,"value",t),{t:r}=m.useI18n();return()=>e.createVNode("div",{class:""},[e.createVNode(i.DuxFormEditorItem,{value:a.value,"onUpdate:value":o=>a.value=o},null),e.createVNode(q.WidgetEditorSettingCard,{title:r("components.formEditor.common.componentConfig")},{default:()=>[e.createVNode(l.DuxFormItem,{label:r("components.formEditor.date.dateType")},{default:()=>[e.createVNode(n.NSelect,{value:u.value.attr.type,"onUpdate:value":o=>u.value.attr.type=o,options:[{label:r("components.formEditor.date.date"),value:"date"},{label:r("components.formEditor.date.daterange"),value:"daterange"},{label:r("components.formEditor.date.datetime"),value:"datetime"},{label:r("components.formEditor.date.datetimerange"),value:"datetimerange"},{label:r("components.formEditor.date.month"),value:"month"},{label:r("components.formEditor.date.monthrange"),value:"monthrange"},{label:r("components.formEditor.date.year"),value:"year"},{label:r("components.formEditor.date.yearrange"),value:"yearrange"},{label:r("components.formEditor.date.quarter"),value:"quarter"},{label:r("components.formEditor.date.quarterrange"),value:"quarterrange"},{label:r("components.formEditor.date.week"),value:"week"}]},null)]}),e.createVNode(l.DuxFormItem,{label:r("components.formEditor.common.disabled"),labelPlacement:"left"},{default:()=>[e.createVNode("div",{class:"flex flex-1 justify-end"},[e.createVNode(n.NSwitch,{value:u.value.attr.disabled,"onUpdate:value":o=>u.value.attr.disabled=o},null)])]}),e.createVNode(l.DuxFormItem,{label:r("components.formEditor.common.clearable"),labelPlacement:"left"},{default:()=>[e.createVNode("div",{class:"flex flex-1 justify-end"},[e.createVNode(n.NSwitch,{value:u.value.attr.clearable,"onUpdate:value":o=>u.value.attr.clearable=o},null)])]})]}),e.createVNode(i.DuxFormEditorRule,{value:u.value.rule,"onUpdate:value":o=>u.value.rule=o},null)])}});function p(a){return{name:"dux-date",icon:"i-tabler:calendar-due",label:a("components.formEditor.date.label"),group:"form",component:t=>e.createVNode(y,t,null),setting:t=>e.createVNode(v,t,null),settingDefault:{label:a("components.formEditor.date.label"),name:"date",attr:{type:"date"},rule:[]},json:f}}exports.duxFormEditorDate=p;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("vue"),m=require("@duxweb/dvha-core"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("vue"),m=require("@duxweb/dvha-core"),E=require("@vueuse/core"),p=require("../designEditor/components/grid.cjs");require("clsx");require("lodash-es");require("naive-ui");require("short-unique-id");require("vue-draggable-plus");require("vue-echarts");require("vue-router");require("@overlastic/vue");require("dayjs");require("mime");require("@tanstack/vue-query");require("@duxweb/dvha-naiveui");require("pinia");require("vue3-ace-editor");require("ace-builds/src-noconflict/mode-vue");require("ace-builds/src-noconflict/mode-javascript");require("ace-builds/src-noconflict/mode-html");require("ace-builds/src-noconflict/mode-json");require("ace-builds/src-noconflict/mode-json5");require("ace-builds/src-noconflict/theme-tomorrow_night");require("ace-builds/src-noconflict/theme-tomorrow");require("ace-builds/src-noconflict/ext-searchbox");require("ace-builds/src-noconflict/ext-language_tools");require("ace-builds/src-noconflict/mode-snippets");require("vue-cropper");require("jinrishici");require("aieditor");require("vee-validate");require("@vee-validate/i18n");require("colorizr");require("echarts");require("highlight.js/lib/core");require("highlight.js/lib/languages/bash");require("highlight.js/lib/languages/css");require("highlight.js/lib/languages/go");require("highlight.js/lib/languages/java");require("highlight.js/lib/languages/javascript");require("highlight.js/lib/languages/json");require("highlight.js/lib/languages/markdown");require("highlight.js/lib/languages/php");require("highlight.js/lib/languages/python");require("highlight.js/lib/languages/shell");require("highlight.js/lib/languages/sql");require("highlight.js/lib/languages/typescript");require("highlight.js/lib/languages/xml");require("@ant-design/colors");require("@unocss/preset-icons/browser");require("@unocss/preset-typography");require("unocss/preset-wind4");require("@vee-validate/i18n/dist/locale/en.json");require("@vee-validate/i18n/dist/locale/zh_CN.json");require("vue-command-palette");require("../../pages/page404.cjs");const g=require("./components/cascader.cjs"),h=require("./components/cascaderAsync.cjs"),A=require("./components/checkbox.cjs"),b=require("./components/color.cjs"),S=require("./components/date.cjs"),v=require("./components/dynamicInput.cjs"),T=require("./components/dynamicTags.cjs"),j=require("./components/editor.cjs"),D=require("./components/fileUpload.cjs"),I=require("./components/imageUpload.cjs"),C=require("./components/input.cjs"),M=require("./components/inputNumber.cjs"),R=require("./components/mentionAsync.cjs"),V=require("./components/radio.cjs"),N=require("./components/region.cjs"),O=require("./components/select.cjs"),U=require("./components/selectAsync.cjs"),w=require("./components/sider.cjs"),J=require("./components/switch.cjs"),P=require("./components/time.cjs"),k=require("./components/transferAsync.cjs"),B=require("./components/treeSelect.cjs"),G=require("./components/treeSelectAsync.cjs");require("@iconify-json/tabler/icons.json");require("../posterEditor/elements/index.cjs");require("fabric");const _=d.defineComponent({name:"DuxFormRenderer",props:{data:{type:Array,default:()=>[]},value:{type:Object,default:()=>({})},config:{type:Object,default:()=>({})},readonly:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1}},setup(o,{emit:x}){const{t:e}=m.useI18n(),f=d.computed(()=>{const i=[p.duxFormEditorGrid(e),C.duxFormEditorInput(e),M.duxFormEditorInputNumber(e),j.duxFormEditorAIEditor(e),w.duxFormEditorSider(e),S.duxFormEditorDate(e),P.duxFormEditorTime(e),b.duxFormEditorColor(e),A.duxFormEditorCheckbox(e),V.duxFormEditorRadio(e),J.duxFormEditorSwitch(e),v.duxFormEditorDynamicInput(e),T.duxFormEditorDynamicTags(e),I.duxFormEditorImageUpload(e),D.duxFormEditorFileUpload(e),O.duxFormEditorSelect(e),g.duxFormEditorCascader(e),B.duxFormEditorTreeSelect(e),N.duxFormEditorRegion(e),U.duxFormEditorSelectAsync(e),h.duxFormEditorCascaderAsync(e),G.duxFormEditorTreeSelectAsync(e),k.duxFormEditorTransferAsync(e),R.duxFormEditorMentionAsync(e)],u=new Map;return i.forEach(r=>{u.set(r.name,r)}),u}),a=E.useVModel(o,"value",x,{defaultValue:{},deep:!0}),n=(i,u=a.value)=>i.length>0&&Array.isArray(i[0])?i.flatMap(r=>Array.isArray(r)?n(r,u):[]):i.map(r=>{const{name:c,options:t={}}=r,s=f.value.get(c),q={...t,attr:{...t.attr,readonly:o.readonly||t.attr?.readonly,disabled:o.disabled||t.attr?.disabled}};if(t.name&&t.attr?.defaultValue!==void 0&&(u[t.name]===void 0||u[t.name]===null)&&(u[t.name]=t.attr.defaultValue),s?.json)return s.json({options:q,children:r.children,model:u,convertToJsonSchema:n});const l={tag:c,attrs:q.attr||{}};return r.children?.length&&(l.children=n(r.children,u)),l}),y=d.computed(()=>{const i=n(o.data,a.value);return[{tag:"dux-form-layout",attrs:{labelPlacement:o.config?.labelPlacement||"left"},children:i}]}),{render:F}=m.useJsonSchema({data:y,context:{form:a.value}});return()=>d.createVNode(F,null,null)}});exports.DuxFormRenderer=_;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=`/* layer: properties */
|
|
2
|
-
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-text-opacity:100%;--un-bg-opacity:100%;--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-shadow-opacity:100%;--un-ease:initial;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-
|
|
2
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-text-opacity:100%;--un-bg-opacity:100%;--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-shadow-opacity:100%;--un-border-opacity:100%;--un-ease:initial;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-to-opacity:100%;--un-outline-style:solid;--un-fill-opacity:100%;}}
|
|
3
3
|
@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
|
|
4
4
|
@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid;}
|
|
5
5
|
@property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createVNode as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
import { useVModel as
|
|
4
|
-
import { NSelect as
|
|
1
|
+
import { createVNode as e, defineComponent as i } from "vue";
|
|
2
|
+
import { useI18n as u } from "@duxweb/dvha-core";
|
|
3
|
+
import { useVModel as s } from "@vueuse/core";
|
|
4
|
+
import { NSelect as c, NSwitch as n, NDatePicker as y } from "naive-ui";
|
|
5
5
|
import "clsx";
|
|
6
6
|
import "vue-router";
|
|
7
7
|
import "@overlastic/vue";
|
|
@@ -50,8 +50,8 @@ import "vee-validate";
|
|
|
50
50
|
import "vue-command-palette";
|
|
51
51
|
import "@duxweb/dvha-naiveui";
|
|
52
52
|
import "../../../pages/page404.js";
|
|
53
|
-
import { DuxFormEditorItem as
|
|
54
|
-
import { WidgetEditorSettingCard as
|
|
53
|
+
import { DuxFormEditorItem as f, DuxFormEditorRule as v } from "../base/base.js";
|
|
54
|
+
import { WidgetEditorSettingCard as b } from "../../designEditor/editor/setting.js";
|
|
55
55
|
import "mime";
|
|
56
56
|
import "@iconify-json/tabler/icons.json";
|
|
57
57
|
import "../../posterEditor/elements/index.js";
|
|
@@ -60,28 +60,55 @@ import "dayjs";
|
|
|
60
60
|
import "@tanstack/vue-query";
|
|
61
61
|
import "pinia";
|
|
62
62
|
import "short-unique-id";
|
|
63
|
-
const
|
|
63
|
+
const g = /* @__PURE__ */ i({
|
|
64
64
|
name: "FormEditorDate",
|
|
65
65
|
props: {
|
|
66
66
|
options: Object
|
|
67
67
|
},
|
|
68
68
|
setup(o) {
|
|
69
69
|
const r = o.options?.attr;
|
|
70
|
-
return () =>
|
|
70
|
+
return () => e(l, {
|
|
71
71
|
label: o.options?.label,
|
|
72
72
|
description: o.options?.desc
|
|
73
73
|
}, {
|
|
74
|
-
default: () => [
|
|
74
|
+
default: () => [e("div", {
|
|
75
75
|
class: "flex-1"
|
|
76
|
-
}, [
|
|
76
|
+
}, [e(y, r, null)])]
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
function E(o) {
|
|
81
81
|
const {
|
|
82
82
|
options: r,
|
|
83
|
-
model:
|
|
84
|
-
} = o || {}
|
|
83
|
+
model: m
|
|
84
|
+
} = o || {}, t = (p) => {
|
|
85
|
+
switch (p) {
|
|
86
|
+
case "date":
|
|
87
|
+
return "yyyy-MM-dd";
|
|
88
|
+
case "datetime":
|
|
89
|
+
return "yyyy-MM-dd HH:mm:ss";
|
|
90
|
+
case "daterange":
|
|
91
|
+
return "yyyy-MM-dd";
|
|
92
|
+
case "datetimerange":
|
|
93
|
+
return "yyyy-MM-dd HH:mm:ss";
|
|
94
|
+
case "month":
|
|
95
|
+
return "yyyy-MM";
|
|
96
|
+
case "monthrange":
|
|
97
|
+
return "yyyy-MM";
|
|
98
|
+
case "year":
|
|
99
|
+
return "yyyy";
|
|
100
|
+
case "yearrange":
|
|
101
|
+
return "yyyy";
|
|
102
|
+
case "quarter":
|
|
103
|
+
return "yyyy-[Q]Q";
|
|
104
|
+
case "quarterrange":
|
|
105
|
+
return "yyyy-[Q]Q";
|
|
106
|
+
case "week":
|
|
107
|
+
return "yyyy-[W]WW";
|
|
108
|
+
default:
|
|
109
|
+
return "yyyy-MM-dd";
|
|
110
|
+
}
|
|
111
|
+
}, a = r?.attr?.type || "date", d = t(a);
|
|
85
112
|
return {
|
|
86
113
|
tag: "dux-form-item",
|
|
87
114
|
attrs: {
|
|
@@ -92,12 +119,13 @@ function E(o) {
|
|
|
92
119
|
tag: "n-date-picker",
|
|
93
120
|
attrs: {
|
|
94
121
|
...r?.attr,
|
|
95
|
-
"v-model:value": [
|
|
122
|
+
"v-model:formatted-value": [m, r?.name],
|
|
123
|
+
"value-format": d
|
|
96
124
|
}
|
|
97
125
|
}]
|
|
98
126
|
};
|
|
99
127
|
}
|
|
100
|
-
const
|
|
128
|
+
const M = /* @__PURE__ */ i({
|
|
101
129
|
name: "FormEditorDateSetting",
|
|
102
130
|
props: {
|
|
103
131
|
value: {
|
|
@@ -108,93 +136,93 @@ const g = /* @__PURE__ */ n({
|
|
|
108
136
|
setup(o, {
|
|
109
137
|
emit: r
|
|
110
138
|
}) {
|
|
111
|
-
const
|
|
112
|
-
t
|
|
113
|
-
} =
|
|
114
|
-
return () =>
|
|
139
|
+
const m = s(o, "value", r), {
|
|
140
|
+
t
|
|
141
|
+
} = u();
|
|
142
|
+
return () => e("div", {
|
|
115
143
|
class: ""
|
|
116
|
-
}, [
|
|
144
|
+
}, [e(f, {
|
|
117
145
|
value: o.value,
|
|
118
|
-
"onUpdate:value": (
|
|
119
|
-
}, null),
|
|
120
|
-
title:
|
|
146
|
+
"onUpdate:value": (a) => o.value = a
|
|
147
|
+
}, null), e(b, {
|
|
148
|
+
title: t("components.formEditor.common.componentConfig")
|
|
121
149
|
}, {
|
|
122
|
-
default: () => [
|
|
123
|
-
label:
|
|
150
|
+
default: () => [e(l, {
|
|
151
|
+
label: t("components.formEditor.date.dateType")
|
|
124
152
|
}, {
|
|
125
|
-
default: () => [
|
|
126
|
-
value:
|
|
127
|
-
"onUpdate:value": (
|
|
153
|
+
default: () => [e(c, {
|
|
154
|
+
value: m.value.attr.type,
|
|
155
|
+
"onUpdate:value": (a) => m.value.attr.type = a,
|
|
128
156
|
options: [{
|
|
129
|
-
label:
|
|
157
|
+
label: t("components.formEditor.date.date"),
|
|
130
158
|
value: "date"
|
|
131
159
|
}, {
|
|
132
|
-
label:
|
|
160
|
+
label: t("components.formEditor.date.daterange"),
|
|
133
161
|
value: "daterange"
|
|
134
162
|
}, {
|
|
135
|
-
label:
|
|
163
|
+
label: t("components.formEditor.date.datetime"),
|
|
136
164
|
value: "datetime"
|
|
137
165
|
}, {
|
|
138
|
-
label:
|
|
166
|
+
label: t("components.formEditor.date.datetimerange"),
|
|
139
167
|
value: "datetimerange"
|
|
140
168
|
}, {
|
|
141
|
-
label:
|
|
169
|
+
label: t("components.formEditor.date.month"),
|
|
142
170
|
value: "month"
|
|
143
171
|
}, {
|
|
144
|
-
label:
|
|
172
|
+
label: t("components.formEditor.date.monthrange"),
|
|
145
173
|
value: "monthrange"
|
|
146
174
|
}, {
|
|
147
|
-
label:
|
|
175
|
+
label: t("components.formEditor.date.year"),
|
|
148
176
|
value: "year"
|
|
149
177
|
}, {
|
|
150
|
-
label:
|
|
178
|
+
label: t("components.formEditor.date.yearrange"),
|
|
151
179
|
value: "yearrange"
|
|
152
180
|
}, {
|
|
153
|
-
label:
|
|
181
|
+
label: t("components.formEditor.date.quarter"),
|
|
154
182
|
value: "quarter"
|
|
155
183
|
}, {
|
|
156
|
-
label:
|
|
184
|
+
label: t("components.formEditor.date.quarterrange"),
|
|
157
185
|
value: "quarterrange"
|
|
158
186
|
}, {
|
|
159
|
-
label:
|
|
187
|
+
label: t("components.formEditor.date.week"),
|
|
160
188
|
value: "week"
|
|
161
189
|
}]
|
|
162
190
|
}, null)]
|
|
163
|
-
}),
|
|
164
|
-
label:
|
|
191
|
+
}), e(l, {
|
|
192
|
+
label: t("components.formEditor.common.disabled"),
|
|
165
193
|
labelPlacement: "left"
|
|
166
194
|
}, {
|
|
167
|
-
default: () => [
|
|
195
|
+
default: () => [e("div", {
|
|
168
196
|
class: "flex flex-1 justify-end"
|
|
169
|
-
}, [
|
|
170
|
-
value:
|
|
171
|
-
"onUpdate:value": (
|
|
197
|
+
}, [e(n, {
|
|
198
|
+
value: m.value.attr.disabled,
|
|
199
|
+
"onUpdate:value": (a) => m.value.attr.disabled = a
|
|
172
200
|
}, null)])]
|
|
173
|
-
}),
|
|
174
|
-
label:
|
|
201
|
+
}), e(l, {
|
|
202
|
+
label: t("components.formEditor.common.clearable"),
|
|
175
203
|
labelPlacement: "left"
|
|
176
204
|
}, {
|
|
177
|
-
default: () => [
|
|
205
|
+
default: () => [e("div", {
|
|
178
206
|
class: "flex flex-1 justify-end"
|
|
179
|
-
}, [
|
|
180
|
-
value:
|
|
181
|
-
"onUpdate:value": (
|
|
207
|
+
}, [e(n, {
|
|
208
|
+
value: m.value.attr.clearable,
|
|
209
|
+
"onUpdate:value": (a) => m.value.attr.clearable = a
|
|
182
210
|
}, null)])]
|
|
183
211
|
})]
|
|
184
|
-
}),
|
|
185
|
-
value:
|
|
186
|
-
"onUpdate:value": (
|
|
212
|
+
}), e(v, {
|
|
213
|
+
value: m.value.rule,
|
|
214
|
+
"onUpdate:value": (a) => m.value.rule = a
|
|
187
215
|
}, null)]);
|
|
188
216
|
}
|
|
189
217
|
});
|
|
190
|
-
function
|
|
218
|
+
function St(o) {
|
|
191
219
|
return {
|
|
192
220
|
name: "dux-date",
|
|
193
221
|
icon: "i-tabler:calendar-due",
|
|
194
222
|
label: o("components.formEditor.date.label"),
|
|
195
223
|
group: "form",
|
|
196
|
-
component: (r) =>
|
|
197
|
-
setting: (r) =>
|
|
224
|
+
component: (r) => e(g, r, null),
|
|
225
|
+
setting: (r) => e(M, r, null),
|
|
198
226
|
settingDefault: {
|
|
199
227
|
label: o("components.formEditor.date.label"),
|
|
200
228
|
name: "date",
|
|
@@ -207,5 +235,5 @@ function kt(o) {
|
|
|
207
235
|
};
|
|
208
236
|
}
|
|
209
237
|
export {
|
|
210
|
-
|
|
238
|
+
St as duxFormEditorDate
|
|
211
239
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as E, computed as
|
|
1
|
+
import { defineComponent as E, computed as f, createVNode as y } from "vue";
|
|
2
2
|
import { useI18n as h, useJsonSchema as g } from "@duxweb/dvha-core";
|
|
3
3
|
import { useVModel as b } from "@vueuse/core";
|
|
4
4
|
import { duxFormEditorGrid as A } from "../designEditor/components/grid.js";
|
|
@@ -64,10 +64,10 @@ import { duxFormEditorDynamicInput as T } from "./components/dynamicInput.js";
|
|
|
64
64
|
import { duxFormEditorDynamicTags as C } from "./components/dynamicTags.js";
|
|
65
65
|
import { duxFormEditorAIEditor as M } from "./components/editor.js";
|
|
66
66
|
import { duxFormEditorFileUpload as R } from "./components/fileUpload.js";
|
|
67
|
-
import { duxFormEditorImageUpload as
|
|
68
|
-
import { duxFormEditorInput as
|
|
69
|
-
import { duxFormEditorInputNumber as
|
|
70
|
-
import { duxFormEditorMentionAsync as
|
|
67
|
+
import { duxFormEditorImageUpload as V } from "./components/imageUpload.js";
|
|
68
|
+
import { duxFormEditorInput as J } from "./components/input.js";
|
|
69
|
+
import { duxFormEditorInputNumber as N } from "./components/inputNumber.js";
|
|
70
|
+
import { duxFormEditorMentionAsync as O } from "./components/mentionAsync.js";
|
|
71
71
|
import { duxFormEditorRadio as w } from "./components/radio.js";
|
|
72
72
|
import { duxFormEditorRegion as B } from "./components/region.js";
|
|
73
73
|
import { duxFormEditorSelect as P } from "./components/select.js";
|
|
@@ -105,51 +105,51 @@ const Ao = /* @__PURE__ */ E({
|
|
|
105
105
|
default: !1
|
|
106
106
|
}
|
|
107
107
|
},
|
|
108
|
-
setup(
|
|
109
|
-
emit:
|
|
108
|
+
setup(e, {
|
|
109
|
+
emit: c
|
|
110
110
|
}) {
|
|
111
111
|
const {
|
|
112
112
|
t: r
|
|
113
|
-
} = h(), s =
|
|
114
|
-
const
|
|
115
|
-
return
|
|
113
|
+
} = h(), s = f(() => {
|
|
114
|
+
const i = [A(r), J(r), N(r), M(r), k(r), I(r), q(r), D(r), j(r), w(r), G(r), T(r), C(r), V(r), R(r), P(r), S(r), H(r), B(r), U(r), v(r), K(r), z(r), O(r)], m = /* @__PURE__ */ new Map();
|
|
115
|
+
return i.forEach((o) => {
|
|
116
116
|
m.set(o.name, o);
|
|
117
117
|
}), m;
|
|
118
|
-
}), d = b(
|
|
118
|
+
}), d = b(e, "value", c, {
|
|
119
119
|
defaultValue: {},
|
|
120
120
|
deep: !0
|
|
121
|
-
}),
|
|
121
|
+
}), p = (i, m = d.value) => i.length > 0 && Array.isArray(i[0]) ? i.flatMap((o) => Array.isArray(o) ? p(o, m) : []) : i.map((o) => {
|
|
122
122
|
const {
|
|
123
123
|
name: n,
|
|
124
|
-
options:
|
|
124
|
+
options: t = {}
|
|
125
125
|
} = o, a = s.value.get(n), u = {
|
|
126
|
-
...
|
|
126
|
+
...t,
|
|
127
127
|
attr: {
|
|
128
|
-
...
|
|
129
|
-
readonly:
|
|
130
|
-
disabled:
|
|
128
|
+
...t.attr,
|
|
129
|
+
readonly: e.readonly || t.attr?.readonly,
|
|
130
|
+
disabled: e.disabled || t.attr?.disabled
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
|
-
if (a?.json)
|
|
133
|
+
if (t.name && t.attr?.defaultValue !== void 0 && (m[t.name] === void 0 || m[t.name] === null) && (m[t.name] = t.attr.defaultValue), a?.json)
|
|
134
134
|
return a.json({
|
|
135
135
|
options: u,
|
|
136
136
|
children: o.children,
|
|
137
137
|
model: m,
|
|
138
|
-
convertToJsonSchema:
|
|
138
|
+
convertToJsonSchema: p
|
|
139
139
|
});
|
|
140
140
|
const l = {
|
|
141
141
|
tag: n,
|
|
142
142
|
attrs: u.attr || {}
|
|
143
143
|
};
|
|
144
|
-
return o.children?.length && (l.children =
|
|
145
|
-
}), x =
|
|
146
|
-
const
|
|
144
|
+
return o.children?.length && (l.children = p(o.children, m)), l;
|
|
145
|
+
}), x = f(() => {
|
|
146
|
+
const i = p(e.data, d.value);
|
|
147
147
|
return [{
|
|
148
148
|
tag: "dux-form-layout",
|
|
149
149
|
attrs: {
|
|
150
|
-
labelPlacement:
|
|
150
|
+
labelPlacement: e.config?.labelPlacement || "left"
|
|
151
151
|
},
|
|
152
|
-
children:
|
|
152
|
+
children: i
|
|
153
153
|
}];
|
|
154
154
|
}), {
|
|
155
155
|
render: F
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const r = `/* layer: properties */
|
|
2
|
-
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-text-opacity:100%;--un-bg-opacity:100%;--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-shadow-opacity:100%;--un-ease:initial;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-
|
|
2
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*, ::before, ::after, ::backdrop{--un-text-opacity:100%;--un-bg-opacity:100%;--un-from-opacity:100%;--un-divide-y-reverse:initial;--un-border-style:solid;--un-divide-x-reverse:initial;--un-divide-opacity:100%;--un-shadow-opacity:100%;--un-border-opacity:100%;--un-ease:initial;--un-translate-x:initial;--un-translate-y:initial;--un-translate-z:initial;--un-to-opacity:100%;--un-outline-style:solid;--un-fill-opacity:100%;}}
|
|
3
3
|
@property --un-text-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
|
|
4
4
|
@property --un-outline-style{syntax:"*";inherits:false;initial-value:solid;}
|
|
5
5
|
@property --un-border-opacity{syntax:"<percentage>";inherits:false;initial-value:100%;}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@duxweb/dvha-pro",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.42",
|
|
5
5
|
"author": "DuxWeb",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@ant-design/colors": "^7.2.1",
|
|
36
|
-
"@duxweb/dvha-core": "^1.0.
|
|
37
|
-
"@duxweb/dvha-naiveui": "^1.0.
|
|
36
|
+
"@duxweb/dvha-core": "^1.0.42",
|
|
37
|
+
"@duxweb/dvha-naiveui": "^1.0.42",
|
|
38
38
|
"@iconify-json/tabler": "^1.2.18",
|
|
39
39
|
"@overlastic/vue": "^0.8.1",
|
|
40
40
|
"@tanstack/vue-query": "^5.80.7",
|