@farris/ui-vue 1.2.5 → 1.2.6
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/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +124 -116
- package/components/avatar/index.umd.cjs +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/index.css +1 -0
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +219 -209
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +36 -28
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +340 -107
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/package.json +1 -1
- package/components/component/index.esm.js +36 -29
- package/components/component/index.umd.cjs +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +318 -316
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/index.esm.js +9 -13
- package/components/content-container/index.umd.cjs +1 -1
- package/components/content-container/package.json +1 -1
- package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
- package/components/data-grid/index.esm.js +3771 -3622
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2408 -2405
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +250 -242
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +23 -20
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/drawer/package.json +1 -1
- package/components/dropdown/index.esm.js +86 -86
- package/components/dropdown/index.umd.cjs +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +575 -565
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/index.esm.js +56 -47
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +281 -277
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.css +1 -0
- package/components/external-container/index.esm.js +1795 -1783
- package/components/external-container/index.umd.cjs +1 -1
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.css +1 -0
- package/components/field-selector/index.esm.js +3914 -3769
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/{style.css → index.css} +1 -1
- package/components/filter-bar/index.esm.js +475 -465
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.esm.js +37 -34
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/index.esm.js +256 -248
- package/components/input-group/index.umd.cjs +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +1445 -1446
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.css +1 -0
- package/components/lookup/index.esm.js +4347 -4145
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.css +1 -0
- package/components/mapping-editor/index.esm.js +4657 -4475
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/index.css +1 -0
- package/components/message-box/index.esm.js +397 -386
- package/components/message-box/index.umd.cjs +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/index.css +1 -0
- package/components/modal/index.esm.js +308 -297
- package/components/modal/index.umd.cjs +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +353 -345
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/index.esm.js +917 -893
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +108 -101
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +394 -384
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/index.esm.js +72 -64
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/{style.css → index.css} +1 -1
- package/components/response-layout-editor/index.esm.js +404 -393
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/index.esm.js +610 -592
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.css +1 -0
- package/components/schema-selector/index.esm.js +3654 -3408
- package/components/schema-selector/index.umd.cjs +8 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/index.esm.js +21 -14
- package/components/section/index.umd.cjs +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/index.esm.js +79 -71
- package/components/switch/index.umd.cjs +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.css +1 -0
- package/components/tabs/index.esm.js +1448 -1406
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/textarea/index.esm.js +86 -78
- package/components/textarea/index.umd.cjs +1 -1
- package/components/textarea/package.json +1 -1
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +387 -379
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/package.json +1 -1
- package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
- package/components/tree-grid/index.esm.js +3769 -3620
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +2041 -2038
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +12423 -11981
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
- package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
- package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
- package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
- package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -5
- package/types/data-grid/src/data-grid.component.d.ts +2 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
- package/types/designer-canvas/src/composition/types.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
- package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +8 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +29 -25
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/page-header/src/page-header.props.d.ts +7 -0
- package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +2 -0
- package/types/response-toolbar/index.d.ts +9 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
- package/types/schema-selector/src/composition/types.d.ts +3 -1
- package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
- package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
- package/types/tabs/src/tabs.props.d.ts +8 -0
- package/components/button-edit/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/lookup/style.css +0 -1
- package/components/mapping-editor/style.css +0 -1
- package/components/message-box/style.css +0 -1
- package/components/modal/style.css +0 -1
- package/components/schema-selector/style.css +0 -1
- package/components/tabs/style.css +0 -1
- package/components/time-picker/style.css +0 -1
- package/style.css +0 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
- /package/components/border-editor/{style.css → index.css} +0 -0
- /package/components/checkbox/{style.css → index.css} +0 -0
- /package/components/date-picker/{style.css → index.css} +0 -0
- /package/components/designer-canvas/{style.css → index.css} +0 -0
- /package/components/designer-outline/{style.css → index.css} +0 -0
- /package/components/designer-toolbox/{style.css → index.css} +0 -0
- /package/components/discussion-editor/{style.css → index.css} +0 -0
- /package/components/discussion-list/{style.css → index.css} +0 -0
- /package/components/drawer/{style.css → index.css} +0 -0
- /package/components/events-editor/{style.css → index.css} +0 -0
- /package/components/flow-canvas/{style.css → index.css} +0 -0
- /package/components/list-view/{style.css → index.css} +0 -0
- /package/components/order/{style.css → index.css} +0 -0
- /package/components/property-editor/{style.css → index.css} +0 -0
- /package/components/property-panel/{style.css → index.css} +0 -0
- /package/components/radio-button/{style.css → index.css} +0 -0
- /package/components/radio-group/{style.css → index.css} +0 -0
- /package/components/smoke-detector/{style.css → index.css} +0 -0
- /package/components/spacing-editor/{style.css → index.css} +0 -0
- /package/components/splitter/{style.css → index.css} +0 -0
- /package/components/switch/{style.css → index.css} +0 -0
- /package/components/transfer/{style.css → index.css} +0 -0
- /package/components/uploader/{style.css → index.css} +0 -0
- /package/components/weather/{style.css → index.css} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
var oe = Object.defineProperty;
|
|
2
2
|
var ae = (n, e, t) => e in n ? oe(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
3
|
var F = (n, e, t) => ae(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
-
import { defineComponent as O, inject as x, ref as
|
|
4
|
+
import { defineComponent as O, inject as x, ref as g, computed as N, watch as E, onMounted as U, createVNode as v, Fragment as ie, provide as re } from "vue";
|
|
5
5
|
import { cloneDeep as le } from "lodash-es";
|
|
6
|
-
import { CHECKBOX_CONTEXT as
|
|
6
|
+
import { CHECKBOX_CONTEXT as W, useCheck as ce } from "@farris/ui-vue/components/common";
|
|
7
7
|
const se = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-design.gitee.io/check-box.schema.json", ue = "check-box", de = "A Farris Input Component", me = "object", ye = {
|
|
8
8
|
id: {
|
|
9
9
|
description: "The unique identifier for a check box",
|
|
@@ -79,7 +79,7 @@ const se = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
|
|
|
79
79
|
}, fe = [
|
|
80
80
|
"id",
|
|
81
81
|
"type"
|
|
82
|
-
],
|
|
82
|
+
], he = {
|
|
83
83
|
$schema: se,
|
|
84
84
|
$id: pe,
|
|
85
85
|
title: ue,
|
|
@@ -87,103 +87,103 @@ const se = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
|
|
|
87
87
|
type: me,
|
|
88
88
|
properties: ye,
|
|
89
89
|
required: fe
|
|
90
|
-
},
|
|
90
|
+
}, H = {}, q = {};
|
|
91
91
|
function z(n) {
|
|
92
|
-
const { properties: e, title: t } = n, o = Object.keys(e).reduce((
|
|
92
|
+
const { properties: e, title: t } = n, o = Object.keys(e).reduce((i, c) => (i[c] = e[c].type === "object" && e[c].properties ? z(e[c]) : le(e[c].default), i), {});
|
|
93
93
|
return o.id = `${t}-${Date.now()}`, o;
|
|
94
94
|
}
|
|
95
95
|
function L(n, e = {}) {
|
|
96
|
-
const t =
|
|
96
|
+
const t = H[n];
|
|
97
97
|
if (t) {
|
|
98
98
|
let o = z(t);
|
|
99
|
-
const
|
|
100
|
-
return o =
|
|
99
|
+
const i = q[n];
|
|
100
|
+
return o = i ? i({ getSchemaByType: L }, o, e) : o, o;
|
|
101
101
|
}
|
|
102
102
|
return null;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function ge(n, e) {
|
|
105
105
|
const t = z(e);
|
|
106
|
-
return Object.keys(n).reduce((o,
|
|
106
|
+
return Object.keys(n).reduce((o, i) => (o[i] = n[i], o), t), t;
|
|
107
107
|
}
|
|
108
108
|
function ve(n, e) {
|
|
109
|
-
return Object.keys(n).filter((o) => n[o] != null).reduce((o,
|
|
110
|
-
if (e.has(
|
|
111
|
-
const
|
|
112
|
-
if (typeof
|
|
113
|
-
o[
|
|
109
|
+
return Object.keys(n).filter((o) => n[o] != null).reduce((o, i) => {
|
|
110
|
+
if (e.has(i)) {
|
|
111
|
+
const c = e.get(i);
|
|
112
|
+
if (typeof c == "string")
|
|
113
|
+
o[c] = n[i];
|
|
114
114
|
else {
|
|
115
|
-
const m =
|
|
115
|
+
const m = c(i, n[i], n);
|
|
116
116
|
Object.assign(o, m);
|
|
117
117
|
}
|
|
118
118
|
} else
|
|
119
|
-
o[
|
|
119
|
+
o[i] = n[i];
|
|
120
120
|
return o;
|
|
121
121
|
}, {});
|
|
122
122
|
}
|
|
123
123
|
function be(n, e, t = /* @__PURE__ */ new Map()) {
|
|
124
|
-
const o =
|
|
124
|
+
const o = ge(n, e);
|
|
125
125
|
return ve(o, t);
|
|
126
126
|
}
|
|
127
127
|
function Ce(n = {}) {
|
|
128
|
-
function e(
|
|
128
|
+
function e(r, u, a, p) {
|
|
129
129
|
if (typeof a == "number")
|
|
130
|
-
return
|
|
130
|
+
return p[r].length === a;
|
|
131
131
|
if (typeof a == "object") {
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
134
|
-
return Number(
|
|
135
|
-
if (
|
|
136
|
-
return Number(
|
|
137
|
-
if (
|
|
138
|
-
return Number(
|
|
132
|
+
const s = Object.keys(a)[0], y = a[s];
|
|
133
|
+
if (s === "not")
|
|
134
|
+
return Number(p[r].length) !== Number(y);
|
|
135
|
+
if (s === "moreThan")
|
|
136
|
+
return Number(p[r].length) >= Number(y);
|
|
137
|
+
if (s === "lessThan")
|
|
138
|
+
return Number(p[r].length) <= Number(y);
|
|
139
139
|
}
|
|
140
140
|
return !1;
|
|
141
141
|
}
|
|
142
|
-
function t(
|
|
143
|
-
return
|
|
142
|
+
function t(r, u, a, p) {
|
|
143
|
+
return p[r] && p[r].propertyValue && String(p[r].propertyValue.value) === String(a);
|
|
144
144
|
}
|
|
145
145
|
const o = /* @__PURE__ */ new Map([
|
|
146
146
|
["length", e],
|
|
147
147
|
["getProperty", t]
|
|
148
148
|
]);
|
|
149
|
-
Object.keys(n).reduce((
|
|
150
|
-
function r
|
|
151
|
-
const a =
|
|
152
|
-
return typeof u == "number" ? [{ target: a, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: a, operator: "getProperty", param:
|
|
153
|
-
if (
|
|
154
|
-
return { target: a, operator: "length", param: null, value: u[
|
|
155
|
-
const
|
|
156
|
-
return { target: a, operator: "getProperty", param:
|
|
149
|
+
Object.keys(n).reduce((r, u) => (r.set(u, n[u]), r), o);
|
|
150
|
+
function i(r, u) {
|
|
151
|
+
const a = r;
|
|
152
|
+
return typeof u == "number" ? [{ target: a, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: a, operator: "getProperty", param: r, value: !!u }] : typeof u == "object" ? Object.keys(u).map((p) => {
|
|
153
|
+
if (p === "length")
|
|
154
|
+
return { target: a, operator: "length", param: null, value: u[p] };
|
|
155
|
+
const s = p, y = u[p];
|
|
156
|
+
return { target: a, operator: "getProperty", param: s, value: y };
|
|
157
157
|
}) : [];
|
|
158
158
|
}
|
|
159
|
-
function
|
|
160
|
-
return Object.keys(
|
|
161
|
-
const
|
|
162
|
-
return a.push(...
|
|
159
|
+
function c(r) {
|
|
160
|
+
return Object.keys(r).reduce((a, p) => {
|
|
161
|
+
const s = i(p, r[p]);
|
|
162
|
+
return a.push(...s), a;
|
|
163
163
|
}, []);
|
|
164
164
|
}
|
|
165
|
-
function m(
|
|
166
|
-
if (o.has(
|
|
167
|
-
const a = o.get(
|
|
168
|
-
return a && a(
|
|
165
|
+
function m(r, u) {
|
|
166
|
+
if (o.has(r.operator)) {
|
|
167
|
+
const a = o.get(r.operator);
|
|
168
|
+
return a && a(r.target, r.param, r.value, u) || !1;
|
|
169
169
|
}
|
|
170
170
|
return !1;
|
|
171
171
|
}
|
|
172
|
-
function d(
|
|
173
|
-
return
|
|
172
|
+
function d(r, u) {
|
|
173
|
+
return c(r).reduce((s, y) => s && m(y, u), !0);
|
|
174
174
|
}
|
|
175
|
-
function f(
|
|
176
|
-
const a = Object.keys(
|
|
177
|
-
return
|
|
175
|
+
function f(r, u) {
|
|
176
|
+
const a = Object.keys(r), p = a.includes("allOf"), s = a.includes("anyOf"), y = p || s, b = (y ? r[y ? p ? "allOf" : "anyOf" : "allOf"] : [r]).map((B) => d(B, u));
|
|
177
|
+
return p ? !b.includes(!1) : b.includes(!0);
|
|
178
178
|
}
|
|
179
179
|
return { parseValueSchema: f };
|
|
180
180
|
}
|
|
181
181
|
const l = {
|
|
182
182
|
Button: { type: "Button", name: "按钮", icon: "Button" },
|
|
183
183
|
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
185
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "工具栏项", icon: "Button" },
|
|
186
|
+
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
187
187
|
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
188
188
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
189
189
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
@@ -210,15 +210,15 @@ const l = {
|
|
|
210
210
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
211
211
|
Panel: { type: "Panel", name: "面板", icon: "ContentContainer" },
|
|
212
212
|
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
213
|
-
|
|
213
|
+
component: { type: "component", name: "组件", icon: "Component" },
|
|
214
214
|
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
215
215
|
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
216
216
|
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
217
217
|
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
218
218
|
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
219
219
|
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
220
|
-
|
|
221
|
-
|
|
220
|
+
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
221
|
+
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
222
222
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
223
223
|
Tag: { type: "Tag", name: "Tag", icon: "Tag" },
|
|
224
224
|
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
@@ -227,7 +227,7 @@ const l = {
|
|
|
227
227
|
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
228
228
|
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
229
229
|
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
230
|
-
|
|
230
|
+
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
231
231
|
SectionToolbar: { type: "SectionToolbar", name: "分组面板工具栏" },
|
|
232
232
|
SectionToolbarItem: { type: "SectionToolbarItem", name: "分组面板按钮" },
|
|
233
233
|
QueryScheme: { type: "QueryScheme", name: "筛选方案", icon: "QueryScheme" },
|
|
@@ -257,7 +257,7 @@ const l = {
|
|
|
257
257
|
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
258
258
|
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
259
259
|
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
260
|
-
|
|
260
|
+
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
261
261
|
ModalFooter: { type: "ModalFooter", name: "弹窗页脚", icon: "ModalFooter" },
|
|
262
262
|
ScrollCollapsibleArea: { type: "ScrollCollapsibleArea", name: "滚动收折区域", icon: "ScrollCollapsibleArea" },
|
|
263
263
|
PersonnelSelector: { type: "PersonnelSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
@@ -291,9 +291,9 @@ const l = {
|
|
|
291
291
|
/** 审批类 end */
|
|
292
292
|
}, ke = {}, Te = {};
|
|
293
293
|
Ce();
|
|
294
|
-
function Q(n, e, t = /* @__PURE__ */ new Map(), o = (m, d, f) => d,
|
|
295
|
-
return
|
|
296
|
-
const d = be(m, e, t), f = Object.keys(n).reduce((
|
|
294
|
+
function Q(n, e, t = /* @__PURE__ */ new Map(), o = (m, d, f) => d, i = {}, c = (m) => m) {
|
|
295
|
+
return H[e.title] = e, q[e.title] = o, ke[e.title] = i, Te[e.title] = c, (m = {}) => {
|
|
296
|
+
const d = be(m, e, t), f = Object.keys(n).reduce((r, u) => (r[u] = n[u].default, r), {});
|
|
297
297
|
return Object.assign(f, d);
|
|
298
298
|
};
|
|
299
299
|
}
|
|
@@ -329,43 +329,43 @@ const G = {
|
|
|
329
329
|
label: { type: String, default: "" },
|
|
330
330
|
/** 标识是否被选中 */
|
|
331
331
|
checked: { type: Boolean, default: !1 }
|
|
332
|
-
}, R = Q(G,
|
|
332
|
+
}, R = Q(G, he, _, X), $ = /* @__PURE__ */ O({
|
|
333
333
|
name: "FCheckBox",
|
|
334
334
|
props: G,
|
|
335
335
|
emits: ["change", "changeValue", "update:modelValue", "update:checked"],
|
|
336
336
|
setup(n, e) {
|
|
337
|
-
const t = x(
|
|
337
|
+
const t = x(W, null), {
|
|
338
338
|
buttonClass: o,
|
|
339
|
-
disabled:
|
|
340
|
-
name:
|
|
339
|
+
disabled: i,
|
|
340
|
+
name: c,
|
|
341
341
|
shouldRenderButton: m,
|
|
342
342
|
shouldRenderNative: d,
|
|
343
343
|
shouldRenderTag: f,
|
|
344
|
-
tagClass:
|
|
344
|
+
tagClass: r,
|
|
345
345
|
checked: u,
|
|
346
346
|
onClickCheckBox: a
|
|
347
347
|
} = ce(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
|
|
348
|
-
|
|
349
|
-
const
|
|
348
|
+
g();
|
|
349
|
+
const p = g(n.id), s = g(n.customClass), y = g(n.modelValue), k = g(n.indeterminate);
|
|
350
350
|
return N(() => {
|
|
351
351
|
const C = {
|
|
352
352
|
"custom-control": !0,
|
|
353
353
|
"custom-checkbox": !0
|
|
354
354
|
};
|
|
355
|
-
return
|
|
355
|
+
return s.value && s.value.split(" ").reduce((b, M) => (b[M] = !0, b), C), C;
|
|
356
356
|
}), E(() => n.modelValue, (C) => {
|
|
357
357
|
y.value = C;
|
|
358
358
|
}), E(() => n.indeterminate, (C) => {
|
|
359
359
|
k.value = C;
|
|
360
360
|
}), U(() => {
|
|
361
361
|
}), () => {
|
|
362
|
-
var C, b, M, B,
|
|
362
|
+
var C, b, M, B, D, V;
|
|
363
363
|
return v(ie, null, [m.value && v("div", {
|
|
364
364
|
class: o.value,
|
|
365
365
|
style: "border-radius:0;border: 1px solid #E8EBF2;",
|
|
366
366
|
onClick: a
|
|
367
367
|
}, [(b = (C = e.slots).default) == null ? void 0 : b.call(C)]), f.value && v("div", {
|
|
368
|
-
class:
|
|
368
|
+
class: r.value,
|
|
369
369
|
onClick: a
|
|
370
370
|
}, [v("div", {
|
|
371
371
|
class: "title"
|
|
@@ -379,17 +379,17 @@ const G = {
|
|
|
379
379
|
}, [v("input", {
|
|
380
380
|
type: "checkbox",
|
|
381
381
|
class: "custom-control-input",
|
|
382
|
-
name:
|
|
383
|
-
id:
|
|
382
|
+
name: c.value,
|
|
383
|
+
id: p,
|
|
384
384
|
value: n.value,
|
|
385
385
|
checked: u.value,
|
|
386
|
-
disabled:
|
|
386
|
+
disabled: i.value
|
|
387
387
|
}, null), v("div", {
|
|
388
388
|
class: "custom-control-label"
|
|
389
|
-
}, [(V = (
|
|
389
|
+
}, [(V = (D = e.slots).default) == null ? void 0 : V.call(D)])])]);
|
|
390
390
|
};
|
|
391
391
|
}
|
|
392
|
-
}), Fe = "https://json-schema.org/draft/2020-12/schema", Me = "https://farris-design.gitee.io/check-box.schema.json", Be = "check-group", we = "A Farris Input Component",
|
|
392
|
+
}), Fe = "https://json-schema.org/draft/2020-12/schema", Me = "https://farris-design.gitee.io/check-box.schema.json", Be = "check-group", we = "A Farris Input Component", De = "object", Pe = {
|
|
393
393
|
id: {
|
|
394
394
|
description: "The unique identifier for a check box",
|
|
395
395
|
type: "string"
|
|
@@ -464,8 +464,8 @@ const G = {
|
|
|
464
464
|
$id: Me,
|
|
465
465
|
title: Be,
|
|
466
466
|
description: we,
|
|
467
|
-
type:
|
|
468
|
-
properties:
|
|
467
|
+
type: De,
|
|
468
|
+
properties: Pe,
|
|
469
469
|
required: Ve
|
|
470
470
|
}, Ee = {
|
|
471
471
|
/**
|
|
@@ -543,8 +543,8 @@ const G = {
|
|
|
543
543
|
valueField: { type: String, default: "value" }
|
|
544
544
|
}, Y = Q(j, xe, _, X);
|
|
545
545
|
function Z(n, e, t) {
|
|
546
|
-
const o = N(() => !n.disabled),
|
|
547
|
-
function
|
|
546
|
+
const o = N(() => !n.disabled), i = g(n.enumData);
|
|
547
|
+
function c(a) {
|
|
548
548
|
return a[n.valueField];
|
|
549
549
|
}
|
|
550
550
|
function m(a) {
|
|
@@ -554,72 +554,72 @@ function Z(n, e, t) {
|
|
|
554
554
|
return a ? n.isStringValue ? a.split(n.separator) : a : [];
|
|
555
555
|
}
|
|
556
556
|
function f(a) {
|
|
557
|
-
const
|
|
558
|
-
return n.isStringValue ?
|
|
557
|
+
const s = i.value.map((y) => c(y)).filter((y) => a.some((k) => k === String(y)));
|
|
558
|
+
return n.isStringValue ? s.join(n.separator) : s;
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
const
|
|
562
|
-
return d(t.value).some((y) => y ===
|
|
560
|
+
function r(a) {
|
|
561
|
+
const p = String(c(a));
|
|
562
|
+
return d(t.value).some((y) => y === p);
|
|
563
563
|
}
|
|
564
|
-
function u(a,
|
|
564
|
+
function u(a, p) {
|
|
565
565
|
if (o.value) {
|
|
566
|
-
let
|
|
567
|
-
const y = String(
|
|
568
|
-
!
|
|
566
|
+
let s = d(t.value) || [];
|
|
567
|
+
const y = String(c(a));
|
|
568
|
+
!s || !s.length ? s.push(y) : s.some((k) => k === y) ? s = s.filter((k) => k !== y) : s.push(y), t.value = f(s), e.emit("changeValue", t.value), e.emit("update:modelValue", t.value);
|
|
569
569
|
}
|
|
570
|
-
|
|
570
|
+
p.stopPropagation();
|
|
571
571
|
}
|
|
572
572
|
return {
|
|
573
|
-
enumData:
|
|
574
|
-
getValue:
|
|
573
|
+
enumData: i,
|
|
574
|
+
getValue: c,
|
|
575
575
|
getText: m,
|
|
576
|
-
checked:
|
|
576
|
+
checked: r,
|
|
577
577
|
onClickCheckbox: u
|
|
578
578
|
};
|
|
579
579
|
}
|
|
580
|
-
const
|
|
580
|
+
const P = /* @__PURE__ */ O({
|
|
581
581
|
name: "FCheckGroup",
|
|
582
582
|
props: j,
|
|
583
583
|
emits: ["changeValue", "update:modelValue"],
|
|
584
584
|
setup(n, e) {
|
|
585
|
-
const t =
|
|
585
|
+
const t = g(n.modelValue), o = g(n.horizontal), i = g(n.tabIndex), c = g(n.name), {
|
|
586
586
|
enumData: m,
|
|
587
587
|
onClickCheckbox: d,
|
|
588
588
|
getValue: f,
|
|
589
|
-
getText:
|
|
589
|
+
getText: r,
|
|
590
590
|
checked: u
|
|
591
591
|
} = Z(n, e, t), a = N(() => ({
|
|
592
592
|
"farris-checkradio-hor": o.value
|
|
593
593
|
}));
|
|
594
|
-
E(() => n.modelValue, (
|
|
595
|
-
t.value =
|
|
594
|
+
E(() => n.modelValue, (s) => {
|
|
595
|
+
t.value = s;
|
|
596
596
|
});
|
|
597
|
-
const
|
|
598
|
-
return re(
|
|
599
|
-
values:
|
|
597
|
+
const p = g([]);
|
|
598
|
+
return re(W, {
|
|
599
|
+
values: p,
|
|
600
600
|
parentProps: n,
|
|
601
601
|
parentContext: e
|
|
602
602
|
}), () => v("div", {
|
|
603
603
|
class: ["farris-input-wrap", a.value]
|
|
604
|
-
}, [e.slots.default ? e.slots.default() : m.value.map((
|
|
605
|
-
const k = "checkbox_" +
|
|
604
|
+
}, [e.slots.default ? e.slots.default() : m.value.map((s, y) => {
|
|
605
|
+
const k = "checkbox_" + c.value + y;
|
|
606
606
|
return v("div", {
|
|
607
607
|
class: "custom-control custom-checkbox"
|
|
608
608
|
}, [v("input", {
|
|
609
609
|
type: "checkbox",
|
|
610
610
|
class: "custom-control-input",
|
|
611
|
-
name:
|
|
611
|
+
name: c.value,
|
|
612
612
|
id: k,
|
|
613
|
-
value: f(
|
|
614
|
-
checked: u(
|
|
613
|
+
value: f(s),
|
|
614
|
+
checked: u(s),
|
|
615
615
|
disabled: n.disabled,
|
|
616
|
-
tabindex:
|
|
617
|
-
onClick: (C) => d(
|
|
616
|
+
tabindex: i.value,
|
|
617
|
+
onClick: (C) => d(s, C)
|
|
618
618
|
}, null), v("label", {
|
|
619
619
|
class: "custom-control-label",
|
|
620
620
|
for: k,
|
|
621
|
-
title:
|
|
622
|
-
}, [
|
|
621
|
+
title: r(s)
|
|
622
|
+
}, [r(s)])]);
|
|
623
623
|
})]);
|
|
624
624
|
}
|
|
625
625
|
});
|
|
@@ -629,96 +629,96 @@ function J(n, e, t) {
|
|
|
629
629
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
630
630
|
}
|
|
631
631
|
o();
|
|
632
|
-
const
|
|
632
|
+
const i = t && t.getStyles && t.getStyles() || "", c = t && t.getDesignerClass && t.getDesignerClass() || "", m = g();
|
|
633
633
|
function d() {
|
|
634
634
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
635
635
|
}
|
|
636
636
|
function f() {
|
|
637
637
|
return !1;
|
|
638
638
|
}
|
|
639
|
-
function
|
|
639
|
+
function r() {
|
|
640
640
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
641
641
|
}
|
|
642
642
|
function u() {
|
|
643
643
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
644
644
|
}
|
|
645
|
-
function a(
|
|
646
|
-
if (!
|
|
645
|
+
function a(h) {
|
|
646
|
+
if (!h || !h.value)
|
|
647
647
|
return null;
|
|
648
|
-
if (
|
|
649
|
-
return
|
|
650
|
-
const S = h
|
|
648
|
+
if (h.value.schema && h.value.schema.type === "component")
|
|
649
|
+
return h.value;
|
|
650
|
+
const S = g(h == null ? void 0 : h.value.parent), T = a(S);
|
|
651
651
|
return T || null;
|
|
652
652
|
}
|
|
653
|
-
function
|
|
654
|
-
const { componentInstance: S, designerItemElementRef: T } =
|
|
655
|
-
return !S || !S.value ? null : S.value.canMove ? T :
|
|
653
|
+
function p(h = e) {
|
|
654
|
+
const { componentInstance: S, designerItemElementRef: T } = h;
|
|
655
|
+
return !S || !S.value ? null : S.value.canMove ? T : p(h.parent);
|
|
656
656
|
}
|
|
657
|
-
function
|
|
658
|
-
return !!t && t.canAccepts(
|
|
657
|
+
function s(h) {
|
|
658
|
+
return !!t && t.canAccepts(h);
|
|
659
659
|
}
|
|
660
660
|
function y() {
|
|
661
661
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
662
662
|
}
|
|
663
663
|
function k() {
|
|
664
664
|
}
|
|
665
|
-
function C(
|
|
665
|
+
function C(h, S) {
|
|
666
666
|
S && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(S);
|
|
667
667
|
}
|
|
668
|
-
function b(
|
|
669
|
-
const { componentType: S } =
|
|
670
|
-
let T = L(S,
|
|
671
|
-
t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(
|
|
668
|
+
function b(h) {
|
|
669
|
+
const { componentType: S } = h;
|
|
670
|
+
let T = L(S, h);
|
|
671
|
+
t && t.onResolveNewComponentSchema && (T = t.onResolveNewComponentSchema(h, T));
|
|
672
672
|
const A = S.toLowerCase().replace("-", "_");
|
|
673
673
|
return T && !T.id && T.type === S && (T.id = `${A}_${Math.random().toString().slice(2, 6)}`), T;
|
|
674
674
|
}
|
|
675
|
-
function M(
|
|
676
|
-
const T = String(
|
|
675
|
+
function M(h, S) {
|
|
676
|
+
const T = String(h.getAttribute("data-controltype")), A = h.getAttribute("data-feature"), I = A ? JSON.parse(A) : {};
|
|
677
677
|
I.parentComponentInstance = m.value;
|
|
678
678
|
let w = L(T, I);
|
|
679
|
-
t && t.onAcceptNewChildElement && (w = t.onAcceptNewChildElement(
|
|
679
|
+
t && t.onAcceptNewChildElement && (w = t.onAcceptNewChildElement(h, S, w));
|
|
680
680
|
const ne = T.toLowerCase().replace("-", "_");
|
|
681
681
|
return w && !w.id && w.type === T && (w.id = `${ne}_${Math.random().toString().slice(2, 6)}`), w;
|
|
682
682
|
}
|
|
683
|
-
function B(
|
|
683
|
+
function B(h) {
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function D(...h) {
|
|
686
686
|
if (t && t.getPropsConfig)
|
|
687
|
-
return t.getPropsConfig(...
|
|
687
|
+
return t.getPropsConfig(...h);
|
|
688
688
|
}
|
|
689
689
|
return m.value = {
|
|
690
690
|
canMove: d(),
|
|
691
691
|
canSelectParent: f(),
|
|
692
|
-
canDelete:
|
|
692
|
+
canDelete: r(),
|
|
693
693
|
canNested: !u(),
|
|
694
694
|
contents: e == null ? void 0 : e.schema.contents,
|
|
695
695
|
elementRef: n,
|
|
696
696
|
parent: (V = e == null ? void 0 : e.parent) == null ? void 0 : V.componentInstance,
|
|
697
697
|
schema: e == null ? void 0 : e.schema,
|
|
698
|
-
styles:
|
|
699
|
-
designerClass:
|
|
700
|
-
canAccepts:
|
|
698
|
+
styles: i,
|
|
699
|
+
designerClass: c,
|
|
700
|
+
canAccepts: s,
|
|
701
701
|
getBelongedComponentInstance: a,
|
|
702
|
-
getDraggableDesignItemElement:
|
|
702
|
+
getDraggableDesignItemElement: p,
|
|
703
703
|
getDraggingDisplayText: y,
|
|
704
|
-
getPropConfig:
|
|
704
|
+
getPropConfig: D,
|
|
705
705
|
getDragScopeElement: k,
|
|
706
706
|
onAcceptMovedChildElement: C,
|
|
707
707
|
onAcceptNewChildElement: M,
|
|
708
708
|
onChildElementMovedOut: B,
|
|
709
709
|
addNewChildComponentSchema: b,
|
|
710
710
|
updateDragAndDropRules: o,
|
|
711
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
712
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
711
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || g(!1),
|
|
712
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || g(!1)
|
|
713
713
|
}, m;
|
|
714
714
|
}
|
|
715
715
|
function K(n, e) {
|
|
716
716
|
n.schema;
|
|
717
|
-
const t =
|
|
718
|
-
function
|
|
717
|
+
const t = g(!0), o = g(!0);
|
|
718
|
+
function i(a) {
|
|
719
719
|
return !1;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function c() {
|
|
722
722
|
return !1;
|
|
723
723
|
}
|
|
724
724
|
function m() {
|
|
@@ -729,18 +729,18 @@ function K(n, e) {
|
|
|
729
729
|
}
|
|
730
730
|
function f(a) {
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function r() {
|
|
733
733
|
}
|
|
734
734
|
function u(a) {
|
|
735
735
|
return null;
|
|
736
736
|
}
|
|
737
737
|
return {
|
|
738
|
-
canAccepts:
|
|
739
|
-
checkCanDeleteComponent:
|
|
738
|
+
canAccepts: i,
|
|
739
|
+
checkCanDeleteComponent: c,
|
|
740
740
|
checkCanMoveComponent: m,
|
|
741
741
|
hideNestedPaddingInDesginerView: d,
|
|
742
742
|
onAcceptMovedChildElement: f,
|
|
743
|
-
resolveComponentContext:
|
|
743
|
+
resolveComponentContext: r,
|
|
744
744
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
745
745
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
746
746
|
getPropsConfig: u
|
|
@@ -748,7 +748,8 @@ function K(n, e) {
|
|
|
748
748
|
}
|
|
749
749
|
class ee {
|
|
750
750
|
static getEditorTypesByMDataType(e) {
|
|
751
|
-
|
|
751
|
+
const t = this.fieldControlTypeMapping[e];
|
|
752
|
+
return t || [{ key: "", value: "" }];
|
|
752
753
|
}
|
|
753
754
|
}
|
|
754
755
|
/**
|
|
@@ -820,20 +821,25 @@ class Ae {
|
|
|
820
821
|
F(this, "designViewModelField");
|
|
821
822
|
F(this, "controlCreatorUtils");
|
|
822
823
|
F(this, "designerHostService");
|
|
824
|
+
F(this, "schemaService", null);
|
|
823
825
|
F(this, "metadataService", null);
|
|
824
826
|
F(this, "propertyConfig", {
|
|
825
827
|
type: "object",
|
|
826
828
|
categories: {}
|
|
827
829
|
});
|
|
828
830
|
var o;
|
|
829
|
-
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService;
|
|
831
|
+
this.componentId = e, this.designerHostService = t, this.eventsEditorUtils = t.eventsEditorUtils, this.formSchemaUtils = t.formSchemaUtils, this.formMetadataConverter = t.formMetadataConverter, this.viewModelId = ((o = this.formSchemaUtils) == null ? void 0 : o.getViewModelIdByComponentId(e)) || "", this.designViewModelUtils = t.designViewModelUtils, this.controlCreatorUtils = t.controlCreatorUtils, this.metadataService = t.metadataService, this.schemaService = t.schemaService;
|
|
832
|
+
}
|
|
833
|
+
getTableInfo() {
|
|
834
|
+
var e;
|
|
835
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
830
836
|
}
|
|
831
837
|
setDesignViewModelField(e) {
|
|
832
838
|
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
833
839
|
if (t) {
|
|
834
840
|
if (!this.designViewModelField) {
|
|
835
841
|
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
836
|
-
this.designViewModelField = o.fields.find((
|
|
842
|
+
this.designViewModelField = o.fields.find((i) => i.id === t);
|
|
837
843
|
}
|
|
838
844
|
e.updateOn = this.designViewModelField.updateOn;
|
|
839
845
|
}
|
|
@@ -841,6 +847,7 @@ class Ae {
|
|
|
841
847
|
changeFieldEditorType(e, t) {
|
|
842
848
|
}
|
|
843
849
|
getBasicPropConfig(e) {
|
|
850
|
+
var o, i;
|
|
844
851
|
var t = this;
|
|
845
852
|
return this.setDesignViewModelField(e), {
|
|
846
853
|
description: "Basic Information",
|
|
@@ -862,7 +869,8 @@ class Ae {
|
|
|
862
869
|
type: "combo-list",
|
|
863
870
|
textField: "value",
|
|
864
871
|
valueField: "key",
|
|
865
|
-
data: ee.getEditorTypesByMDataType(t.designViewModelField.type.name)
|
|
872
|
+
data: ee.getEditorTypesByMDataType(((i = (o = t.designViewModelField) == null ? void 0 : o.type) == null ? void 0 : i.name) || ""),
|
|
873
|
+
editable: !1
|
|
866
874
|
}
|
|
867
875
|
},
|
|
868
876
|
label: {
|
|
@@ -871,11 +879,11 @@ class Ae {
|
|
|
871
879
|
$converter: "/converter/form-group-label.converter"
|
|
872
880
|
}
|
|
873
881
|
},
|
|
874
|
-
setPropertyRelates(
|
|
875
|
-
if (
|
|
876
|
-
switch (
|
|
882
|
+
setPropertyRelates(c, m) {
|
|
883
|
+
if (c)
|
|
884
|
+
switch (c && c.propertyID) {
|
|
877
885
|
case "type": {
|
|
878
|
-
t.changeControlType(e,
|
|
886
|
+
t.changeControlType(e, c);
|
|
879
887
|
break;
|
|
880
888
|
}
|
|
881
889
|
}
|
|
@@ -888,12 +896,12 @@ class Ae {
|
|
|
888
896
|
* @param newControlType 新控件类型
|
|
889
897
|
*/
|
|
890
898
|
changeControlType(e, t) {
|
|
891
|
-
var
|
|
892
|
-
const o = t.propertyValue,
|
|
893
|
-
let
|
|
894
|
-
if (!
|
|
899
|
+
var r, u, a, p, s;
|
|
900
|
+
const o = t.propertyValue, i = this.formSchemaUtils.getComponentById(this.componentId);
|
|
901
|
+
let c = this.getControlParentContainer(e.id, i);
|
|
902
|
+
if (!c)
|
|
895
903
|
return;
|
|
896
|
-
const m =
|
|
904
|
+
const m = c.contents.findIndex((y) => y.id === e.id), d = c.contents[m];
|
|
897
905
|
let f;
|
|
898
906
|
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
899
907
|
editor: {
|
|
@@ -910,12 +918,12 @@ class Ae {
|
|
|
910
918
|
}), Object.assign(f.editor, {
|
|
911
919
|
isTextArea: f.isTextArea && d.isTextArea,
|
|
912
920
|
type: o || "",
|
|
913
|
-
placeHolder: (
|
|
921
|
+
placeHolder: (r = d.editor) == null ? void 0 : r.placeHolder,
|
|
914
922
|
holdPlace: (u = d.editor) == null ? void 0 : u.holdPlace,
|
|
915
923
|
readonly: (a = d.editor) == null ? void 0 : a.readonly,
|
|
916
|
-
require: (
|
|
917
|
-
visible: (
|
|
918
|
-
}),
|
|
924
|
+
require: (p = d.editor) == null ? void 0 : p.require,
|
|
925
|
+
visible: (s = d.editor) == null ? void 0 : s.visible
|
|
926
|
+
}), c.contents.splice(m, 1, f);
|
|
919
927
|
}
|
|
920
928
|
getAppearanceConfig(e = null) {
|
|
921
929
|
return {
|
|
@@ -956,10 +964,10 @@ class Ae {
|
|
|
956
964
|
let o;
|
|
957
965
|
if (!t || !t.contents || t.contents.length === 0)
|
|
958
966
|
return null;
|
|
959
|
-
for (const
|
|
960
|
-
if (
|
|
967
|
+
for (const i of t.contents) {
|
|
968
|
+
if (i.id === e)
|
|
961
969
|
return o = t, t;
|
|
962
|
-
if (o = this.getControlParentContainer(e,
|
|
970
|
+
if (o = this.getControlParentContainer(e, i), o)
|
|
963
971
|
return o;
|
|
964
972
|
}
|
|
965
973
|
}
|
|
@@ -978,8 +986,8 @@ class Ae {
|
|
|
978
986
|
{ field: "fieldType", title: "字段类型" }
|
|
979
987
|
],
|
|
980
988
|
beforeOpenDialog: (o) => {
|
|
981
|
-
const
|
|
982
|
-
o.instance.loadData(
|
|
989
|
+
const i = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
990
|
+
o.instance.loadData(i);
|
|
983
991
|
},
|
|
984
992
|
textField: "bindingField"
|
|
985
993
|
};
|
|
@@ -1025,12 +1033,12 @@ class te extends Ae {
|
|
|
1025
1033
|
};
|
|
1026
1034
|
}
|
|
1027
1035
|
getComponentConfig(e, t = {}, o = {}) {
|
|
1028
|
-
const
|
|
1036
|
+
const i = Object.assign({
|
|
1029
1037
|
description: "组件信息",
|
|
1030
1038
|
title: "组件信息",
|
|
1031
1039
|
type: "input-group",
|
|
1032
1040
|
$converter: "/converter/property-editor.converter"
|
|
1033
|
-
}, t),
|
|
1041
|
+
}, t), c = Object.assign({
|
|
1034
1042
|
readonly: {
|
|
1035
1043
|
description: "",
|
|
1036
1044
|
title: "只读",
|
|
@@ -1052,7 +1060,7 @@ class te extends Ae {
|
|
|
1052
1060
|
type: "string"
|
|
1053
1061
|
}
|
|
1054
1062
|
}, o);
|
|
1055
|
-
return { ...
|
|
1063
|
+
return { ...i, properties: { ...c } };
|
|
1056
1064
|
}
|
|
1057
1065
|
}
|
|
1058
1066
|
class Oe extends te {
|
|
@@ -1108,25 +1116,25 @@ function Le(n, e) {
|
|
|
1108
1116
|
const {
|
|
1109
1117
|
canAccepts: t,
|
|
1110
1118
|
checkCanDeleteComponent: o,
|
|
1111
|
-
checkCanMoveComponent:
|
|
1112
|
-
hideNestedPaddingInDesginerView:
|
|
1119
|
+
checkCanMoveComponent: i,
|
|
1120
|
+
hideNestedPaddingInDesginerView: c,
|
|
1113
1121
|
onAcceptMovedChildElement: m,
|
|
1114
1122
|
resolveComponentContext: d,
|
|
1115
1123
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1116
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1124
|
+
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
1117
1125
|
} = K(n), u = n.schema;
|
|
1118
|
-
function a(
|
|
1119
|
-
return new Oe(
|
|
1126
|
+
function a(p) {
|
|
1127
|
+
return new Oe(p, e).getPropertyConfig(u);
|
|
1120
1128
|
}
|
|
1121
1129
|
return {
|
|
1122
1130
|
canAccepts: t,
|
|
1123
1131
|
checkCanDeleteComponent: o,
|
|
1124
|
-
checkCanMoveComponent:
|
|
1125
|
-
hideNestedPaddingInDesginerView:
|
|
1132
|
+
checkCanMoveComponent: i,
|
|
1133
|
+
hideNestedPaddingInDesginerView: c,
|
|
1126
1134
|
onAcceptMovedChildElement: m,
|
|
1127
1135
|
resolveComponentContext: d,
|
|
1128
1136
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1129
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1137
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1130
1138
|
getPropsConfig: a
|
|
1131
1139
|
};
|
|
1132
1140
|
}
|
|
@@ -1134,25 +1142,25 @@ function $e(n, e) {
|
|
|
1134
1142
|
const {
|
|
1135
1143
|
canAccepts: t,
|
|
1136
1144
|
checkCanDeleteComponent: o,
|
|
1137
|
-
checkCanMoveComponent:
|
|
1138
|
-
hideNestedPaddingInDesginerView:
|
|
1145
|
+
checkCanMoveComponent: i,
|
|
1146
|
+
hideNestedPaddingInDesginerView: c,
|
|
1139
1147
|
onAcceptMovedChildElement: m,
|
|
1140
1148
|
resolveComponentContext: d,
|
|
1141
1149
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1142
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1150
|
+
triggerBelongedComponentToDeleteWhenDeleted: r
|
|
1143
1151
|
} = K(n), u = n.schema;
|
|
1144
|
-
function a(
|
|
1145
|
-
return new Ne(
|
|
1152
|
+
function a(p) {
|
|
1153
|
+
return new Ne(p, e).getPropertyConfig(u);
|
|
1146
1154
|
}
|
|
1147
1155
|
return {
|
|
1148
1156
|
canAccepts: t,
|
|
1149
1157
|
checkCanDeleteComponent: o,
|
|
1150
|
-
checkCanMoveComponent:
|
|
1151
|
-
hideNestedPaddingInDesginerView:
|
|
1158
|
+
checkCanMoveComponent: i,
|
|
1159
|
+
hideNestedPaddingInDesginerView: c,
|
|
1152
1160
|
onAcceptMovedChildElement: m,
|
|
1153
1161
|
resolveComponentContext: d,
|
|
1154
1162
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1155
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1163
|
+
triggerBelongedComponentToDeleteWhenDeleted: r,
|
|
1156
1164
|
getPropsConfig: a
|
|
1157
1165
|
};
|
|
1158
1166
|
}
|
|
@@ -1161,36 +1169,36 @@ const Ue = /* @__PURE__ */ O({
|
|
|
1161
1169
|
props: j,
|
|
1162
1170
|
emits: ["changeValue", "update:modelValue"],
|
|
1163
1171
|
setup(n, e) {
|
|
1164
|
-
const t =
|
|
1172
|
+
const t = g(n.modelValue), o = g(n.horizontal), i = g(n.tabIndex), c = g(n.name), m = N(() => ({
|
|
1165
1173
|
"farris-checkradio-hor": o.value
|
|
1166
1174
|
})), {
|
|
1167
1175
|
enumData: d,
|
|
1168
1176
|
onClickCheckbox: f,
|
|
1169
|
-
getValue:
|
|
1177
|
+
getValue: r,
|
|
1170
1178
|
getText: u,
|
|
1171
1179
|
checked: a
|
|
1172
|
-
} = Z(n, e, t),
|
|
1180
|
+
} = Z(n, e, t), p = g(), s = x("designer-host-service"), y = x("design-item-context"), k = Le(y, s), C = J(p, y, k);
|
|
1173
1181
|
return U(() => {
|
|
1174
|
-
|
|
1182
|
+
p.value.componentInstance = C;
|
|
1175
1183
|
}), e.expose(C.value), E(() => n.modelValue, (b) => {
|
|
1176
1184
|
t.value = b, e.emit("changeValue", t.value);
|
|
1177
1185
|
}), () => v("div", {
|
|
1178
|
-
ref:
|
|
1186
|
+
ref: p,
|
|
1179
1187
|
class: ["farris-input-wrap", m.value]
|
|
1180
1188
|
}, [d.value.map((b, M) => {
|
|
1181
|
-
const B = "checkbox_" +
|
|
1189
|
+
const B = "checkbox_" + c.value + M;
|
|
1182
1190
|
return v("div", {
|
|
1183
1191
|
class: "custom-control custom-checkbox"
|
|
1184
1192
|
}, [v("input", {
|
|
1185
1193
|
type: "checkbox",
|
|
1186
1194
|
class: "custom-control-input",
|
|
1187
|
-
name:
|
|
1195
|
+
name: c.value,
|
|
1188
1196
|
id: B,
|
|
1189
|
-
value:
|
|
1197
|
+
value: r(b),
|
|
1190
1198
|
checked: a(b),
|
|
1191
1199
|
disabled: n.disabled,
|
|
1192
|
-
tabindex:
|
|
1193
|
-
onClick: (
|
|
1200
|
+
tabindex: i.value,
|
|
1201
|
+
onClick: (D) => f(b, D)
|
|
1194
1202
|
}, null), v("label", {
|
|
1195
1203
|
class: "custom-control-label",
|
|
1196
1204
|
for: B,
|
|
@@ -1203,11 +1211,11 @@ const Ue = /* @__PURE__ */ O({
|
|
|
1203
1211
|
props: G,
|
|
1204
1212
|
emits: [],
|
|
1205
1213
|
setup(n, e) {
|
|
1206
|
-
const t =
|
|
1214
|
+
const t = g(), o = g(n.id), i = g(n.indeterminate), c = x("designer-host-service"), m = x("design-item-context"), d = $e(m, c), f = J(t, m, d);
|
|
1207
1215
|
return U(() => {
|
|
1208
1216
|
t.value.componentInstance = f;
|
|
1209
|
-
}), E(() => n.indeterminate, (
|
|
1210
|
-
|
|
1217
|
+
}), E(() => n.indeterminate, (r) => {
|
|
1218
|
+
i.value = r;
|
|
1211
1219
|
}), e.expose(f.value), () => v("div", {
|
|
1212
1220
|
ref: t,
|
|
1213
1221
|
dragref: `${m.schema.id}-container`,
|
|
@@ -1219,24 +1227,26 @@ const Ue = /* @__PURE__ */ O({
|
|
|
1219
1227
|
value: n.value,
|
|
1220
1228
|
checked: n.modelValue,
|
|
1221
1229
|
disabled: n.disabled
|
|
1230
|
+
}, null), v("div", {
|
|
1231
|
+
class: "custom-control-label"
|
|
1222
1232
|
}, null)]);
|
|
1223
1233
|
}
|
|
1224
1234
|
});
|
|
1225
|
-
|
|
1226
|
-
n.component(
|
|
1235
|
+
P.install = (n) => {
|
|
1236
|
+
n.component(P.name, P), n.component($.name, $);
|
|
1227
1237
|
};
|
|
1228
|
-
|
|
1229
|
-
n["check-box"] = $, e["check-box"] = R, n["check-group"] =
|
|
1238
|
+
P.register = (n, e, t, o) => {
|
|
1239
|
+
n["check-box"] = $, e["check-box"] = R, n["check-group"] = P, e["check-group"] = Y;
|
|
1230
1240
|
};
|
|
1231
|
-
|
|
1241
|
+
P.registerDesigner = (n, e, t) => {
|
|
1232
1242
|
n["check-box"] = ze, e["check-box"] = R, n["check-group"] = Ue, e["check-group"] = Y;
|
|
1233
1243
|
};
|
|
1234
1244
|
export {
|
|
1235
1245
|
$ as FCheckBox,
|
|
1236
|
-
|
|
1246
|
+
P as FCheckBoxGroup,
|
|
1237
1247
|
Y as checkBoxGroupPropsResolver,
|
|
1238
1248
|
G as checkBoxProps,
|
|
1239
1249
|
R as checkBoxPropsResolver,
|
|
1240
1250
|
j as checkboxGroupProps,
|
|
1241
|
-
|
|
1251
|
+
P as default
|
|
1242
1252
|
};
|