@farris/ui-vue 1.2.7 → 1.2.8
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/index.esm.js +79 -79
- package/components/avatar/index.esm.js +393 -440
- package/components/border-editor/index.esm.js +4 -4
- package/components/button/index.esm.js +1 -1
- package/components/button-edit/index.esm.js +353 -444
- package/components/button-group/index.esm.js +5 -5
- package/components/calendar/index.esm.js +176 -176
- package/components/capsule/index.esm.js +93 -93
- package/components/checkbox/index.esm.js +496 -542
- package/components/color-picker/index.esm.js +1 -1
- package/components/combo-list/index.esm.js +437 -483
- package/components/combo-tree/index.esm.js +8 -8
- package/components/component/index.esm.js +89 -89
- package/components/condition/index.esm.js +839 -726
- package/components/content-container/index.esm.js +61 -61
- package/components/data-grid/index.esm.js +4702 -4972
- package/components/data-view/index.esm.js +2999 -2875
- package/components/date-picker/index.esm.js +2626 -2672
- package/components/dependent-base/style.js +1 -0
- package/components/dependent-fluid/style.js +1 -0
- package/components/dependent-icon/style.js +1 -0
- package/components/dependent-input/style.js +1 -0
- package/components/dependent-table/style.js +1 -0
- package/components/designer-canvas/index.esm.js +478 -475
- package/components/designer-outline/index.esm.js +173 -131
- package/components/discussion-editor/index.esm.js +1 -1
- package/components/dropdown/index.esm.js +73 -73
- package/components/dynamic-form/index.esm.js +934 -976
- package/components/dynamic-resolver/index.esm.js +67 -35
- package/components/dynamic-view/index.esm.js +258 -249
- package/components/enum-editor/index.esm.js +3 -3
- package/components/events-editor/index.esm.js +178 -178
- package/components/expression-editor/index.esm.js +105 -105
- package/components/external-container/index.esm.js +1892 -1775
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5245 -5514
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1483 -1556
- package/components/flow-canvas/index.esm.js +678 -675
- package/components/image-cropper/index.esm.js +266 -266
- package/components/input-group/index.esm.js +668 -714
- package/components/layout/index.esm.js +148 -148
- package/components/list-nav/index.esm.js +109 -109
- package/components/list-view/index.esm.js +1679 -1563
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +6596 -6865
- package/components/mapping-editor/index.esm.js +5592 -5862
- package/components/message-box/index.esm.js +1 -1
- package/components/modal/index.esm.js +1 -1
- package/components/nav/index.esm.js +86 -86
- package/components/number-range/index.esm.js +1120 -0
- package/components/number-range/package.json +8 -0
- package/components/number-range/style.js +6 -0
- package/components/number-spinner/index.esm.js +1146 -0
- package/components/number-spinner/package.json +8 -0
- package/components/number-spinner/style.js +4 -0
- package/components/order/index.esm.js +988 -1034
- package/components/page-footer/index.esm.js +106 -106
- package/components/page-header/index.esm.js +1088 -1296
- package/components/pagination/index.esm.js +252 -252
- package/components/progress/index.esm.js +37 -37
- package/components/property-editor/index.esm.js +1416 -1462
- package/components/property-panel/index.css +1 -1
- package/components/property-panel/index.esm.js +757 -830
- package/components/query-solution/index.css +1 -0
- package/components/query-solution/index.esm.js +6935 -0
- package/components/query-solution/package.json +8 -0
- package/components/query-solution/style.js +2 -0
- package/components/radio-button/index.esm.js +64 -64
- package/components/radio-group/index.esm.js +452 -498
- package/components/rate/index.esm.js +92 -92
- package/components/response-layout/index.esm.js +33 -33
- package/components/response-layout-editor/index.esm.js +117 -117
- package/components/response-toolbar/index.esm.js +1021 -1238
- package/components/schema-selector/index.esm.js +3215 -3308
- package/components/search-box/index.esm.js +143 -143
- package/components/section/index.esm.js +209 -209
- package/components/smoke-detector/index.esm.js +22 -22
- package/components/spacing-editor/index.esm.js +2 -2
- package/components/splitter/index.esm.js +1097 -394
- package/components/step/index.esm.js +153 -153
- package/components/switch/index.esm.js +442 -488
- package/components/tabs/index.esm.js +1835 -2004
- package/components/tags/index.esm.js +215 -215
- package/components/text/index.esm.js +53 -53
- package/components/textarea/index.esm.js +451 -482
- package/components/time-picker/index.esm.js +1345 -1392
- package/components/transfer/index.esm.js +135 -135
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5761 -6020
- package/components/tree-view/index.esm.js +2380 -2253
- package/components/uploader/index.esm.js +1 -1
- package/components/verify-detail/index.esm.js +232 -232
- package/components/video/index.esm.js +136 -136
- package/components/weather/index.esm.js +2 -2
- package/farris.all.esm.js +31630 -31224
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/checkbox/index.d.ts +1 -0
- package/types/data-grid/src/designer/column-header.design.component.d.ts +1 -1
- package/types/data-grid/src/designer/data-grid-column.props.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +16 -350
- package/types/designer-canvas/src/types.d.ts +1 -1
- package/types/dynamic-form/index.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/binding-resolver.d.ts +1 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +1 -1
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -1
- package/types/modal/src/modal.props.d.ts +1 -4
- package/types/property-panel/src/composition/entity/base-property.d.ts +0 -12
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +11 -26
- package/types/property-panel/src/composition/entity/schema-dom-mapping.d.ts +10 -8
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +19 -0
- package/types/tabs/src/property-config/tabs.property-config.d.ts +6 -6
- package/types/tree-grid/src/designer/use-designer-rules.d.ts +3 -0
- package/types/tree-grid/src/property-config/tree-grid.property-config.d.ts +11 -0
- package/types/tree-grid/src/schema/column-resolver.d.ts +1 -1
- package/types/tree-grid/src/tree-grid.props.d.ts +8 -0
- package/components/accordion/index.umd.cjs +0 -1
- package/components/avatar/index.umd.cjs +0 -1
- package/components/border-editor/index.umd.cjs +0 -1
- package/components/button/index.umd.cjs +0 -1
- package/components/button-edit/index.umd.cjs +0 -1
- package/components/button-group/index.umd.cjs +0 -1
- package/components/calculator/index.umd.cjs +0 -1
- package/components/calendar/index.umd.cjs +0 -1
- package/components/capsule/index.umd.cjs +0 -1
- package/components/checkbox/index.umd.cjs +0 -1
- package/components/color-picker/index.umd.cjs +0 -3
- package/components/combo-list/index.umd.cjs +0 -1
- package/components/combo-tree/index.umd.cjs +0 -1
- package/components/common/index.umd.cjs +0 -1
- package/components/component/index.umd.cjs +0 -1
- package/components/condition/index.umd.cjs +0 -1
- package/components/content-container/index.umd.cjs +0 -1
- package/components/data-grid/index.umd.cjs +0 -1
- package/components/data-view/index.umd.cjs +0 -1
- package/components/date-picker/index.umd.cjs +0 -1
- package/components/designer-canvas/index.umd.cjs +0 -1
- package/components/designer-outline/index.umd.cjs +0 -1
- package/components/designer-toolbox/index.umd.cjs +0 -1
- package/components/discussion-editor/index.umd.cjs +0 -3
- package/components/discussion-list/index.umd.cjs +0 -1
- package/components/drawer/index.umd.cjs +0 -1
- package/components/dropdown/index.umd.cjs +0 -2
- package/components/dynamic-form/index.umd.cjs +0 -1
- package/components/dynamic-resolver/index.umd.cjs +0 -1
- package/components/dynamic-view/index.umd.cjs +0 -1
- package/components/enum-editor/index.umd.cjs +0 -1
- package/components/events-editor/index.umd.cjs +0 -1
- package/components/expression-editor/index.umd.cjs +0 -1
- package/components/external-container/index.umd.cjs +0 -1
- package/components/field-selector/index.umd.cjs +0 -1
- package/components/filter-bar/index.umd.cjs +0 -1
- package/components/flow-canvas/index.umd.cjs +0 -1
- package/components/image-cropper/index.umd.cjs +0 -1
- package/components/input-group/index.umd.cjs +0 -1
- package/components/layout/index.umd.cjs +0 -1
- package/components/list-nav/index.umd.cjs +0 -1
- package/components/list-view/index.umd.cjs +0 -1
- package/components/loading/index.umd.cjs +0 -8
- package/components/locale/index.umd.cjs +0 -1
- package/components/lookup/index.umd.cjs +0 -1
- package/components/mapping-editor/index.umd.cjs +0 -1
- package/components/message-box/index.umd.cjs +0 -1
- package/components/modal/index.umd.cjs +0 -1
- package/components/nav/index.umd.cjs +0 -3
- package/components/notify/index.umd.cjs +0 -1
- package/components/order/index.umd.cjs +0 -1
- package/components/page-footer/index.umd.cjs +0 -1
- package/components/page-header/index.umd.cjs +0 -1
- package/components/pagination/index.umd.cjs +0 -1
- package/components/popover/index.umd.cjs +0 -1
- package/components/progress/index.umd.cjs +0 -3
- package/components/property-editor/index.umd.cjs +0 -3
- package/components/property-panel/index.umd.cjs +0 -1
- package/components/radio-button/index.umd.cjs +0 -1
- package/components/radio-group/index.umd.cjs +0 -1
- package/components/rate/index.umd.cjs +0 -1
- package/components/response-layout/index.umd.cjs +0 -1
- package/components/response-layout-editor/index.umd.cjs +0 -1
- package/components/response-toolbar/index.umd.cjs +0 -1
- package/components/schema-selector/index.umd.cjs +0 -8
- package/components/search-box/index.umd.cjs +0 -1
- package/components/section/index.umd.cjs +0 -1
- package/components/smoke-detector/index.umd.cjs +0 -1
- package/components/spacing-editor/index.umd.cjs +0 -1
- package/components/splitter/index.umd.cjs +0 -1
- package/components/step/index.umd.cjs +0 -1
- package/components/switch/index.umd.cjs +0 -1
- package/components/tabs/index.umd.cjs +0 -1
- package/components/tags/index.umd.cjs +0 -1
- package/components/text/index.umd.cjs +0 -1
- package/components/textarea/index.umd.cjs +0 -1
- package/components/time-picker/index.umd.cjs +0 -1
- package/components/tooltip/index.umd.cjs +0 -1
- package/components/transfer/index.umd.cjs +0 -1
- package/components/tree-grid/index.umd.cjs +0 -1
- package/components/tree-view/index.umd.cjs +0 -1
- package/components/uploader/index.umd.cjs +0 -2
- package/components/verify-detail/index.umd.cjs +0 -1
- package/components/video/index.umd.cjs +0 -1
- package/components/weather/index.umd.cjs +0 -16
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var ae = (n, e, t) => e in n ?
|
|
3
|
-
var
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { cloneDeep as
|
|
6
|
-
import { CHECKBOX_CONTEXT as
|
|
7
|
-
|
|
1
|
+
var ie = Object.defineProperty;
|
|
2
|
+
var ae = (n, e, t) => e in n ? ie(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
|
|
3
|
+
var V = (n, e, t) => ae(n, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { defineComponent as j, inject as E, ref as h, computed as O, watch as A, onMounted as q, createVNode as v, Fragment as ce, provide as le } from "vue";
|
|
5
|
+
import { cloneDeep as se } from "lodash-es";
|
|
6
|
+
import { CHECKBOX_CONTEXT as J, useCheck as pe } from "../common/index.esm.js";
|
|
7
|
+
import { getSchemaByType as X } from "../dynamic-resolver/index.esm.js";
|
|
8
|
+
const ue = "https://json-schema.org/draft/2020-12/schema", de = "https://farris-design.gitee.io/check-box.schema.json", me = "check-box", fe = "A Farris Input Component", ye = "object", he = {
|
|
8
9
|
id: {
|
|
9
10
|
description: "The unique identifier for a check box",
|
|
10
11
|
type: "string"
|
|
@@ -12,7 +13,7 @@ const se = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
|
|
|
12
13
|
type: {
|
|
13
14
|
description: "The type string of check box component",
|
|
14
15
|
type: "string",
|
|
15
|
-
default: "
|
|
16
|
+
default: "check-box"
|
|
16
17
|
},
|
|
17
18
|
appearance: {
|
|
18
19
|
description: "",
|
|
@@ -76,115 +77,113 @@ const se = "https://json-schema.org/draft/2020-12/schema", pe = "https://farris-
|
|
|
76
77
|
type: "boolean",
|
|
77
78
|
default: !0
|
|
78
79
|
}
|
|
79
|
-
},
|
|
80
|
+
}, ge = [
|
|
80
81
|
"id",
|
|
81
82
|
"type"
|
|
82
|
-
],
|
|
83
|
-
$schema:
|
|
84
|
-
$id:
|
|
85
|
-
title:
|
|
86
|
-
description:
|
|
87
|
-
type:
|
|
88
|
-
properties:
|
|
89
|
-
required:
|
|
90
|
-
}, H = {},
|
|
91
|
-
function
|
|
92
|
-
const { properties: e, title: t } = n, o = Object.keys(e).reduce((
|
|
83
|
+
], ve = {
|
|
84
|
+
$schema: ue,
|
|
85
|
+
$id: de,
|
|
86
|
+
title: me,
|
|
87
|
+
description: fe,
|
|
88
|
+
type: ye,
|
|
89
|
+
properties: he,
|
|
90
|
+
required: ge
|
|
91
|
+
}, H = {}, Q = {};
|
|
92
|
+
function z(n) {
|
|
93
|
+
const { properties: e, title: t } = n, o = Object.keys(e).reduce((r, l) => (r[l] = e[l].type === "object" && e[l].properties ? z(e[l]) : se(e[l].default), r), {});
|
|
93
94
|
return o.id = `${t}-${Date.now()}`, o;
|
|
94
95
|
}
|
|
95
|
-
function
|
|
96
|
+
function G(n, e = {}) {
|
|
96
97
|
const t = H[n];
|
|
97
98
|
if (t) {
|
|
98
|
-
let o =
|
|
99
|
-
const
|
|
100
|
-
return o =
|
|
99
|
+
let o = z(t);
|
|
100
|
+
const r = Q[n];
|
|
101
|
+
return o = r ? r({ getSchemaByType: G }, o, e) : o, o;
|
|
101
102
|
}
|
|
102
103
|
return null;
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
-
const t =
|
|
106
|
-
return Object.keys(n).reduce((o,
|
|
105
|
+
function be(n, e) {
|
|
106
|
+
const t = z(e);
|
|
107
|
+
return Object.keys(n).reduce((o, r) => (o[r] && typeof o[r] == "object" ? Object.assign(o[r], n[r]) : o[r] = n[r], o), t), t;
|
|
107
108
|
}
|
|
108
|
-
function
|
|
109
|
-
return Object.keys(n).filter((o) => n[o] != null).reduce((o,
|
|
110
|
-
if (e.has(
|
|
111
|
-
const
|
|
112
|
-
if (typeof
|
|
113
|
-
o[
|
|
109
|
+
function ke(n, e) {
|
|
110
|
+
return Object.keys(n).filter((o) => n[o] != null).reduce((o, r) => {
|
|
111
|
+
if (e.has(r)) {
|
|
112
|
+
const l = e.get(r);
|
|
113
|
+
if (typeof l == "string")
|
|
114
|
+
o[l] = n[r];
|
|
114
115
|
else {
|
|
115
|
-
const m =
|
|
116
|
+
const m = l(r, n[r], n);
|
|
116
117
|
Object.assign(o, m);
|
|
117
118
|
}
|
|
118
119
|
} else
|
|
119
|
-
o[
|
|
120
|
+
o[r] = n[r];
|
|
120
121
|
return o;
|
|
121
122
|
}, {});
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
-
const o =
|
|
125
|
-
return
|
|
124
|
+
function Ce(n, e, t = /* @__PURE__ */ new Map()) {
|
|
125
|
+
const o = be(n, e);
|
|
126
|
+
return ke(o, t);
|
|
126
127
|
}
|
|
127
|
-
function
|
|
128
|
-
function e(
|
|
129
|
-
if (typeof
|
|
130
|
-
return p[
|
|
131
|
-
if (typeof
|
|
132
|
-
const
|
|
133
|
-
if (
|
|
134
|
-
return Number(p[
|
|
135
|
-
if (
|
|
136
|
-
return Number(p[
|
|
137
|
-
if (
|
|
138
|
-
return Number(p[
|
|
128
|
+
function Me(n = {}) {
|
|
129
|
+
function e(a, u, i, p) {
|
|
130
|
+
if (typeof i == "number")
|
|
131
|
+
return p[a].length === i;
|
|
132
|
+
if (typeof i == "object") {
|
|
133
|
+
const c = Object.keys(i)[0], y = i[c];
|
|
134
|
+
if (c === "not")
|
|
135
|
+
return Number(p[a].length) !== Number(y);
|
|
136
|
+
if (c === "moreThan")
|
|
137
|
+
return Number(p[a].length) >= Number(y);
|
|
138
|
+
if (c === "lessThan")
|
|
139
|
+
return Number(p[a].length) <= Number(y);
|
|
139
140
|
}
|
|
140
141
|
return !1;
|
|
141
142
|
}
|
|
142
|
-
function t(
|
|
143
|
-
return p[
|
|
143
|
+
function t(a, u, i, p) {
|
|
144
|
+
return p[a] && p[a].propertyValue && String(p[a].propertyValue.value) === String(i);
|
|
144
145
|
}
|
|
145
146
|
const o = /* @__PURE__ */ new Map([
|
|
146
147
|
["length", e],
|
|
147
148
|
["getProperty", t]
|
|
148
149
|
]);
|
|
149
|
-
Object.keys(n).reduce((
|
|
150
|
-
function
|
|
151
|
-
const
|
|
152
|
-
return typeof u == "number" ? [{ target:
|
|
150
|
+
Object.keys(n).reduce((a, u) => (a.set(u, n[u]), a), o);
|
|
151
|
+
function r(a, u) {
|
|
152
|
+
const i = a;
|
|
153
|
+
return typeof u == "number" ? [{ target: i, operator: "length", param: null, value: Number(u) }] : typeof u == "boolean" ? [{ target: i, operator: "getProperty", param: a, value: !!u }] : typeof u == "object" ? Object.keys(u).map((p) => {
|
|
153
154
|
if (p === "length")
|
|
154
|
-
return { target:
|
|
155
|
-
const
|
|
156
|
-
return { target:
|
|
155
|
+
return { target: i, operator: "length", param: null, value: u[p] };
|
|
156
|
+
const c = p, y = u[p];
|
|
157
|
+
return { target: i, operator: "getProperty", param: c, value: y };
|
|
157
158
|
}) : [];
|
|
158
159
|
}
|
|
159
|
-
function
|
|
160
|
-
return Object.keys(
|
|
161
|
-
const
|
|
162
|
-
return
|
|
160
|
+
function l(a) {
|
|
161
|
+
return Object.keys(a).reduce((i, p) => {
|
|
162
|
+
const c = r(p, a[p]);
|
|
163
|
+
return i.push(...c), i;
|
|
163
164
|
}, []);
|
|
164
165
|
}
|
|
165
|
-
function m(
|
|
166
|
-
if (o.has(
|
|
167
|
-
const
|
|
168
|
-
return
|
|
166
|
+
function m(a, u) {
|
|
167
|
+
if (o.has(a.operator)) {
|
|
168
|
+
const i = o.get(a.operator);
|
|
169
|
+
return i && i(a.target, a.param, a.value, u) || !1;
|
|
169
170
|
}
|
|
170
171
|
return !1;
|
|
171
172
|
}
|
|
172
|
-
function d(
|
|
173
|
-
return
|
|
173
|
+
function d(a, u) {
|
|
174
|
+
return l(a).reduce((c, y) => c && m(y, u), !0);
|
|
174
175
|
}
|
|
175
|
-
function f(
|
|
176
|
-
const
|
|
176
|
+
function f(a, u) {
|
|
177
|
+
const i = Object.keys(a), p = i.includes("allOf"), c = i.includes("anyOf"), y = p || c, b = (y ? a[y ? p ? "allOf" : "anyOf" : "allOf"] : [a]).map((B) => d(B, u));
|
|
177
178
|
return p ? !b.includes(!1) : b.includes(!0);
|
|
178
179
|
}
|
|
179
180
|
return { parseValueSchema: f };
|
|
180
181
|
}
|
|
181
|
-
const
|
|
182
|
-
|
|
183
|
-
ButtonGroup: { type: "ButtonGroup", name: "按钮组", icon: "ButtonGroup" },
|
|
182
|
+
const s = {
|
|
183
|
+
button: { type: "button", name: "按钮", icon: "Button" },
|
|
184
184
|
"response-toolbar": { type: "response-toolbar", name: "工具栏", icon: "ButtonGroup" },
|
|
185
|
-
"response-toolbar-item": { type: "response-toolbar-item", name: "
|
|
185
|
+
"response-toolbar-item": { type: "response-toolbar-item", name: "按钮", icon: "Button" },
|
|
186
186
|
"content-container": { type: "content-container", name: "容器", icon: "ContentContainer" },
|
|
187
|
-
DisplayField: { type: "DisplayField", name: "标签", icon: "DisplayField" },
|
|
188
187
|
"input-group": { type: "input-group", name: "文本", icon: "TextBox" },
|
|
189
188
|
textarea: { type: "textarea", name: "多行文本", icon: "MultiTextBox" },
|
|
190
189
|
lookup: { type: "lookup", name: "帮助", icon: "LookupEdit" },
|
|
@@ -195,118 +194,47 @@ const l = {
|
|
|
195
194
|
"check-box": { type: "check-box", name: "复选框", icon: "CheckBox" },
|
|
196
195
|
"check-group": { type: "check-group", name: "复选框组", icon: "CheckGroup" },
|
|
197
196
|
"combo-list": { type: "combo-list", name: "下拉列表", icon: "EnumField" },
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
FlowLayout: { type: "FlowLayout", name: "流布局" },
|
|
202
|
-
ResponseLayout: { type: "ResponseLayout", name: "布局容器", icon: "ResponseLayout3" },
|
|
203
|
-
ResponseLayoutItem: { type: "ResponseLayoutItem", name: "布局", icon: "ResponseLayout1" },
|
|
197
|
+
"response-form": { type: "response-form", name: "卡片面板", icon: "Form" },
|
|
198
|
+
"response-layout": { type: "response-layout", name: "布局容器", icon: "ResponseLayout3" },
|
|
199
|
+
"response-layout-item": { type: "response-layout-item", name: "布局", icon: "ResponseLayout1" },
|
|
204
200
|
"tree-grid": { type: "tree-grid", name: "树表格", icon: "TreeGrid" },
|
|
205
|
-
|
|
206
|
-
FieldSet: { type: "FieldSet", name: "分组", icon: "FieldSet" },
|
|
207
|
-
Form: { type: "Form", name: "卡片面板", icon: "Form" },
|
|
208
|
-
QueryForm: { type: "QueryForm", name: "查询面板", icon: "Form" },
|
|
201
|
+
"tree-grid-column": { type: "tree-grid-column", name: "树表格列" },
|
|
209
202
|
"data-grid": { type: "data-grid", name: "表格", icon: "DataGrid" },
|
|
210
203
|
"data-grid-column": { type: "data-grid-column", name: "表格列" },
|
|
211
|
-
|
|
212
|
-
Module: { type: "Module", name: "模块", icon: "Module" },
|
|
204
|
+
module: { type: "Module", name: "模块", icon: "Module" },
|
|
213
205
|
component: { type: "component", name: "组件", icon: "Component" },
|
|
214
|
-
ExternalContainer: { type: "ExternalContainer", name: "外部容器", icon: "ContentContainer" },
|
|
215
|
-
Image: { type: "Image", name: "图像", icon: "Image" },
|
|
216
|
-
ImageUpload: { type: "ImageUpload", name: "图片上传", icon: "imageupload" },
|
|
217
|
-
HiddenContainer: { type: "HiddenContainer", name: "隐藏区域", icon: "ContentContainer" },
|
|
218
|
-
ModalContainer: { type: "ModalContainer", name: "弹窗容器", icon: "ContentContainer" },
|
|
219
|
-
RouteContainer: { type: "RouteContainer", name: "路由区域", icon: "ContentContainer" },
|
|
220
206
|
tabs: { type: "tabs", name: "标签页", icon: "Tab" },
|
|
221
207
|
"tab-page": { type: "tab-page", name: "标签页项", dependentParentControl: "Tab" },
|
|
222
208
|
"tab-toolbar-item": { type: "tab-toolbar-item", name: "标签页工具栏按钮", icon: "Button" },
|
|
223
|
-
|
|
224
|
-
Sidebar: { type: "Sidebar", name: "侧边栏", icon: "Sidebar" },
|
|
225
|
-
HtmlTemplate: { type: "HtmlTemplate", name: "模版容器", icon: "HtmlTemplate" },
|
|
226
|
-
ListView: { type: "ListView", name: "列表", icon: "ListView" },
|
|
227
|
-
RichTextBox: { type: "RichTextBox", name: "富文本", icon: "RichTextBox" },
|
|
228
|
-
TimeSpinner: { type: "TimeSpinner", name: "时间调节器", icon: "TimePicker" },
|
|
229
|
-
TimePicker: { type: "TimePicker", name: "时间选择", icon: "TimePicker" },
|
|
209
|
+
"time-picker": { type: "time-picker", name: "时间选择", icon: "TimePicker" },
|
|
230
210
|
section: { type: "section", name: "分组面板", icon: "Section" },
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
WizardDetail: { type: "WizardDetail", name: "向导详情页" },
|
|
238
|
-
WizardDetailContainer: { type: "WizardDetailContainer", name: "向导详情容器" },
|
|
239
|
-
Wizard: { type: "Wizard", name: "向导", icon: "Wizard" },
|
|
240
|
-
MultiSelect: { type: "MultiSelect", name: "数据分配", icon: "MultiSelect" },
|
|
241
|
-
Steps: { type: "Steps", name: "步骤条", icon: "Steps" },
|
|
242
|
-
avatar: { type: "avatar", name: "头像", icon: "Avatar" },
|
|
243
|
-
ListFilter: { type: "ListFilter", name: "筛选条", icon: "ListFilter" },
|
|
244
|
-
ListNav: { type: "ListNav", name: "列表导航", icon: "ListNav" },
|
|
245
|
-
NumberRange: { type: "NumberRange", name: "数字区间选择", icon: "NumericBox" },
|
|
246
|
-
Scrollspy: { type: "Scrollspy", name: "滚动监听", icon: "Scrollspy" },
|
|
247
|
-
LanguageTextBox: { type: "LanguageTextBox", name: "多语言输入框", icon: "LanguageTextBox" },
|
|
248
|
-
ComponentRef: { type: "ComponentRef", name: "组件引用节点" },
|
|
249
|
-
FileUpload: { type: "FileUpload", name: "附件上传", icon: "FileUpload" },
|
|
250
|
-
FilePreview: { type: "FilePreview", name: "附件预览", icon: "FilePreview" },
|
|
251
|
-
ViewChange: { type: "ViewChange", name: "多视图切换", icon: "Button" },
|
|
252
|
-
MultiViewContainer: { type: "MultiViewContainer", name: "多视图", icon: "MultiViewContainer" },
|
|
253
|
-
MultiViewItem: { type: "MultiViewItem", name: "多视图项", dependentParentControl: "MultiViewContainer" },
|
|
254
|
-
Footer: { type: "Footer", name: "页脚" },
|
|
255
|
-
DiscussionEditor: { type: "DiscussionEditor", name: "评论编辑区", icon: "DiscussionEditor" },
|
|
256
|
-
DiscussionList: { type: "DiscussionList", name: "评论列表", icon: "DiscussionList" },
|
|
257
|
-
NavTab: { type: "NavTab", name: "标签类导航", icon: "NavTab" },
|
|
258
|
-
Tags: { type: "Tags", name: "标记组", icon: "Tags" },
|
|
259
|
-
Portlet: { type: "Portlet", name: "小部件", icon: "dingzhi" },
|
|
211
|
+
"section-toolbar": { type: "section-toolbar", name: "分组面板工具栏" },
|
|
212
|
+
"section-toolbar-item": { type: "section-toolbar-item", name: "分组面板按钮" },
|
|
213
|
+
splitter: { type: "splitter", name: "分栏面板", icon: "Splitter" },
|
|
214
|
+
"splitter-pane": { type: "splitter-pane", name: "分栏面板项", dependentParentControl: "Splitter" },
|
|
215
|
+
"component-ref": { type: "component-ref", name: "组件引用节点" },
|
|
216
|
+
uploader: { type: "uploader", name: "附件上传", icon: "FileUpload" },
|
|
260
217
|
"page-header": { type: "page-header", name: "页头", icon: "Header" },
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
DynamicAreaItem: { type: "DynamicAreaItem", name: "动态区域项", icon: "ContentContainer" },
|
|
269
|
-
TabToolbar: { type: "TabToolbar", name: "标签页工具栏", icon: "TabToolbar" },
|
|
270
|
-
HeaderToolBar: { type: "HeaderToolBar", name: "头部组件工具栏", icon: "HeaderToolBar" },
|
|
271
|
-
ModalFooterToolBar: { type: "ModalFooterToolBar", name: "底部组件工具栏", icon: "ModalFooterToolBar" },
|
|
272
|
-
HeaderToolBarItem: { type: "HeaderToolBarItem", name: "头部组件工具栏按钮", icon: "HeaderToolBarItem" },
|
|
273
|
-
ModalFooterToolBarItem: { type: "ModalFooterToolBarItem", name: "底部组件工具栏按钮", icon: "ModalFooterToolBarItem" },
|
|
274
|
-
OrganizationSelector: { type: "OrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
275
|
-
AdminOrganizationSelector: { type: "AdminOrganizationSelector", name: "组织选择", icon: "OrganizationSelector" },
|
|
276
|
-
EmployeeSelector: { type: "EmployeeSelector", name: "人员选择", icon: "PersonnelSelector" },
|
|
277
|
-
OaRelation: { type: "OaRelation", name: "关联行政审批", icon: "TextBox" },
|
|
278
|
-
CitySelector: { type: "CitySelector", name: "城市选择", icon: "CitySelector" },
|
|
279
|
-
ExtIntergration: { type: "ExtIntergration", name: "外部服务集成", icon: "ViewModel" },
|
|
280
|
-
AppointmentCalendar: { type: "AppointmentCalendar", name: "预约日历", icon: "DateBox" },
|
|
281
|
-
/** 查询类 start */
|
|
282
|
-
Charts: { type: "Charts", name: "图表", icon: "Charts" },
|
|
283
|
-
QdpFramework: { type: "QdpFramework", name: "查询结果工具栏", icon: "QdpFramework" },
|
|
284
|
-
SpreadSheet: { type: "SpreadSheet", name: "查询表格控件", icon: "Charts" },
|
|
285
|
-
QdpConditionDialog: { type: "QdpConditionDialog", name: "查询筛选对话框", icon: "ContentContainer" },
|
|
286
|
-
QdpConditionDialogTab: { type: "QdpConditionDialogTab", name: "查询筛选标签页", icon: "Tab" },
|
|
287
|
-
/** 查询类 end */
|
|
288
|
-
/** 审批类 start */
|
|
289
|
-
ApprovalLogs: { type: "ApprovalLogs", name: "审批记录", icon: "ApprovalLogs" },
|
|
290
|
-
ApprovalComments: { type: "ApprovalComments", name: "审批意见", icon: "shenpiyijian" }
|
|
291
|
-
/** 审批类 end */
|
|
292
|
-
}, ke = {}, Te = {};
|
|
293
|
-
Ce();
|
|
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), {});
|
|
218
|
+
"page-footer": { type: "page-footer", name: "页脚", icon: "ModalFooter" },
|
|
219
|
+
"tab-toolbar": { type: "tab-toolbar", name: "标签页工具栏", icon: "TabToolbar" }
|
|
220
|
+
}, Te = {}, Ve = {};
|
|
221
|
+
Me();
|
|
222
|
+
function Y(n, e, t = /* @__PURE__ */ new Map(), o = (m, d, f) => d, r = {}, l = (m) => m) {
|
|
223
|
+
return H[e.title] = e, Q[e.title] = o, Te[e.title] = r, Ve[e.title] = l, (m = {}) => {
|
|
224
|
+
const d = Ce(m, e, t), f = Object.keys(n).reduce((a, u) => (a[u] = n[u].default, a), {});
|
|
297
225
|
return Object.assign(f, d);
|
|
298
226
|
};
|
|
299
227
|
}
|
|
300
|
-
function
|
|
228
|
+
function we(n, e) {
|
|
301
229
|
return { customClass: e.class, customStyle: e.style };
|
|
302
230
|
}
|
|
303
|
-
const
|
|
304
|
-
["appearance",
|
|
231
|
+
const Z = /* @__PURE__ */ new Map([
|
|
232
|
+
["appearance", we]
|
|
305
233
|
]);
|
|
306
|
-
function
|
|
234
|
+
function I(n, e, t) {
|
|
307
235
|
return e;
|
|
308
236
|
}
|
|
309
|
-
const
|
|
237
|
+
const W = {
|
|
310
238
|
/** 组件唯一标识 */
|
|
311
239
|
id: { Type: String, default: "" },
|
|
312
240
|
/** 自定义样式 */
|
|
@@ -329,67 +257,67 @@ const G = {
|
|
|
329
257
|
label: { type: String, default: "" },
|
|
330
258
|
/** 标识是否被选中 */
|
|
331
259
|
checked: { type: Boolean, default: !1 }
|
|
332
|
-
},
|
|
260
|
+
}, K = Y(W, ve, Z, I), U = /* @__PURE__ */ j({
|
|
333
261
|
name: "FCheckBox",
|
|
334
|
-
props:
|
|
262
|
+
props: W,
|
|
335
263
|
emits: ["change", "changeValue", "update:modelValue", "update:checked"],
|
|
336
264
|
setup(n, e) {
|
|
337
|
-
const t =
|
|
265
|
+
const t = E(J, null), {
|
|
338
266
|
buttonClass: o,
|
|
339
|
-
disabled:
|
|
340
|
-
name:
|
|
267
|
+
disabled: r,
|
|
268
|
+
name: l,
|
|
341
269
|
shouldRenderButton: m,
|
|
342
270
|
shouldRenderNative: d,
|
|
343
271
|
shouldRenderTag: f,
|
|
344
|
-
tagClass:
|
|
272
|
+
tagClass: a,
|
|
345
273
|
checked: u,
|
|
346
|
-
onClickCheckBox:
|
|
347
|
-
} =
|
|
348
|
-
|
|
349
|
-
const p =
|
|
350
|
-
return
|
|
351
|
-
const
|
|
274
|
+
onClickCheckBox: i
|
|
275
|
+
} = pe(n, e, t == null ? void 0 : t.parentProps, t == null ? void 0 : t.parentContext);
|
|
276
|
+
h();
|
|
277
|
+
const p = h(n.id), c = h(n.customClass), y = h(n.modelValue), C = h(n.indeterminate);
|
|
278
|
+
return O(() => {
|
|
279
|
+
const k = {
|
|
352
280
|
"custom-control": !0,
|
|
353
281
|
"custom-checkbox": !0
|
|
354
282
|
};
|
|
355
|
-
return
|
|
356
|
-
}),
|
|
357
|
-
y.value =
|
|
358
|
-
}),
|
|
359
|
-
|
|
360
|
-
}),
|
|
283
|
+
return c.value && c.value.split(" ").reduce((b, w) => (b[w] = !0, b), k), k;
|
|
284
|
+
}), A(() => n.modelValue, (k) => {
|
|
285
|
+
y.value = k;
|
|
286
|
+
}), A(() => n.indeterminate, (k) => {
|
|
287
|
+
C.value = k;
|
|
288
|
+
}), q(() => {
|
|
361
289
|
}), () => {
|
|
362
|
-
var
|
|
363
|
-
return v(
|
|
290
|
+
var k, b, w, B, D, x;
|
|
291
|
+
return v(ce, null, [m.value && v("div", {
|
|
364
292
|
class: o.value,
|
|
365
293
|
style: "border-radius:0;border: 1px solid #E8EBF2;",
|
|
366
|
-
onClick:
|
|
367
|
-
}, [(b = (
|
|
368
|
-
class:
|
|
369
|
-
onClick:
|
|
294
|
+
onClick: i
|
|
295
|
+
}, [(b = (k = e.slots).default) == null ? void 0 : b.call(k)]), f.value && v("div", {
|
|
296
|
+
class: a.value,
|
|
297
|
+
onClick: i
|
|
370
298
|
}, [v("div", {
|
|
371
299
|
class: "title"
|
|
372
|
-
}, [(B = (
|
|
300
|
+
}, [(B = (w = e.slots).default) == null ? void 0 : B.call(w)]), v("div", {
|
|
373
301
|
class: "tip"
|
|
374
302
|
}, null), v("span", {
|
|
375
303
|
class: "f-icon f-icon-check f-radio-icon"
|
|
376
304
|
}, null)]), d.value && v("div", {
|
|
377
305
|
class: "custom-control custom-checkbox",
|
|
378
|
-
onClick:
|
|
306
|
+
onClick: i
|
|
379
307
|
}, [v("input", {
|
|
380
308
|
type: "checkbox",
|
|
381
309
|
class: "custom-control-input",
|
|
382
|
-
name:
|
|
310
|
+
name: l.value,
|
|
383
311
|
id: p,
|
|
384
312
|
value: n.value,
|
|
385
313
|
checked: u.value,
|
|
386
|
-
disabled:
|
|
314
|
+
disabled: r.value
|
|
387
315
|
}, null), v("div", {
|
|
388
316
|
class: "custom-control-label"
|
|
389
|
-
}, [(
|
|
317
|
+
}, [(x = (D = e.slots).default) == null ? void 0 : x.call(D)])])]);
|
|
390
318
|
};
|
|
391
319
|
}
|
|
392
|
-
}),
|
|
320
|
+
}), Be = "https://json-schema.org/draft/2020-12/schema", Pe = "https://farris-design.gitee.io/check-box.schema.json", De = "check-group", Se = "A Farris Input Component", Fe = "object", xe = {
|
|
393
321
|
id: {
|
|
394
322
|
description: "The unique identifier for a check box",
|
|
395
323
|
type: "string"
|
|
@@ -456,18 +384,18 @@ const G = {
|
|
|
456
384
|
type: "boolean",
|
|
457
385
|
default: !0
|
|
458
386
|
}
|
|
459
|
-
},
|
|
387
|
+
}, Ee = [
|
|
460
388
|
"id",
|
|
461
389
|
"type"
|
|
462
|
-
],
|
|
463
|
-
$schema:
|
|
464
|
-
$id:
|
|
465
|
-
title:
|
|
466
|
-
description:
|
|
467
|
-
type:
|
|
468
|
-
properties:
|
|
469
|
-
required:
|
|
470
|
-
},
|
|
390
|
+
], Ae = {
|
|
391
|
+
$schema: Be,
|
|
392
|
+
$id: Pe,
|
|
393
|
+
title: De,
|
|
394
|
+
description: Se,
|
|
395
|
+
type: Fe,
|
|
396
|
+
properties: xe,
|
|
397
|
+
required: Ee
|
|
398
|
+
}, $e = {
|
|
471
399
|
/**
|
|
472
400
|
* 是否被选中
|
|
473
401
|
*/
|
|
@@ -484,8 +412,8 @@ const G = {
|
|
|
484
412
|
* type为button或者tag时的尺寸
|
|
485
413
|
*/
|
|
486
414
|
size: { type: String, default: "middle" }
|
|
487
|
-
},
|
|
488
|
-
|
|
415
|
+
}, L = {
|
|
416
|
+
...$e,
|
|
489
417
|
/**
|
|
490
418
|
* 组件标识
|
|
491
419
|
*/
|
|
@@ -541,184 +469,184 @@ const G = {
|
|
|
541
469
|
* 枚举数组中枚举值的key值。
|
|
542
470
|
*/
|
|
543
471
|
valueField: { type: String, default: "value" }
|
|
544
|
-
},
|
|
545
|
-
function
|
|
546
|
-
const o =
|
|
547
|
-
function
|
|
548
|
-
return
|
|
472
|
+
}, R = Y(L, Ae, Z, I);
|
|
473
|
+
function ee(n, e, t) {
|
|
474
|
+
const o = O(() => !n.disabled), r = h(n.enumData);
|
|
475
|
+
function l(i) {
|
|
476
|
+
return i[n.valueField];
|
|
549
477
|
}
|
|
550
|
-
function m(
|
|
551
|
-
return
|
|
478
|
+
function m(i) {
|
|
479
|
+
return i[n.textField];
|
|
552
480
|
}
|
|
553
|
-
function d(
|
|
554
|
-
return
|
|
481
|
+
function d(i) {
|
|
482
|
+
return i ? n.isStringValue ? i.split(n.separator) : i : [];
|
|
555
483
|
}
|
|
556
|
-
function f(
|
|
557
|
-
const
|
|
558
|
-
return n.isStringValue ?
|
|
484
|
+
function f(i) {
|
|
485
|
+
const c = r.value.map((y) => l(y)).filter((y) => i.some((C) => C === String(y)));
|
|
486
|
+
return n.isStringValue ? c.join(n.separator) : c;
|
|
559
487
|
}
|
|
560
|
-
function
|
|
561
|
-
const p = String(
|
|
488
|
+
function a(i) {
|
|
489
|
+
const p = String(l(i));
|
|
562
490
|
return d(t.value).some((y) => y === p);
|
|
563
491
|
}
|
|
564
|
-
function u(
|
|
492
|
+
function u(i, p) {
|
|
565
493
|
if (o.value) {
|
|
566
|
-
let
|
|
567
|
-
const y = String(
|
|
568
|
-
!
|
|
494
|
+
let c = d(t.value) || [];
|
|
495
|
+
const y = String(l(i));
|
|
496
|
+
!c || !c.length ? c.push(y) : c.some((C) => C === y) ? c = c.filter((C) => C !== y) : c.push(y), t.value = f(c), e.emit("changeValue", t.value), e.emit("update:modelValue", t.value);
|
|
569
497
|
}
|
|
570
498
|
p.stopPropagation();
|
|
571
499
|
}
|
|
572
500
|
return {
|
|
573
|
-
enumData:
|
|
574
|
-
getValue:
|
|
501
|
+
enumData: r,
|
|
502
|
+
getValue: l,
|
|
575
503
|
getText: m,
|
|
576
|
-
checked:
|
|
504
|
+
checked: a,
|
|
577
505
|
onClickCheckbox: u
|
|
578
506
|
};
|
|
579
507
|
}
|
|
580
|
-
const
|
|
508
|
+
const F = /* @__PURE__ */ j({
|
|
581
509
|
name: "FCheckGroup",
|
|
582
|
-
props:
|
|
510
|
+
props: L,
|
|
583
511
|
emits: ["changeValue", "update:modelValue"],
|
|
584
512
|
setup(n, e) {
|
|
585
|
-
const t =
|
|
513
|
+
const t = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex), l = h(n.name), {
|
|
586
514
|
enumData: m,
|
|
587
515
|
onClickCheckbox: d,
|
|
588
516
|
getValue: f,
|
|
589
|
-
getText:
|
|
517
|
+
getText: a,
|
|
590
518
|
checked: u
|
|
591
|
-
} =
|
|
519
|
+
} = ee(n, e, t), i = O(() => ({
|
|
592
520
|
"farris-checkradio-hor": o.value
|
|
593
521
|
}));
|
|
594
|
-
|
|
595
|
-
t.value =
|
|
522
|
+
A(() => n.modelValue, (c) => {
|
|
523
|
+
t.value = c;
|
|
596
524
|
});
|
|
597
|
-
const p =
|
|
598
|
-
return
|
|
525
|
+
const p = h([]);
|
|
526
|
+
return le(J, {
|
|
599
527
|
values: p,
|
|
600
528
|
parentProps: n,
|
|
601
529
|
parentContext: e
|
|
602
530
|
}), () => v("div", {
|
|
603
|
-
class: ["farris-input-wrap",
|
|
604
|
-
}, [e.slots.default ? e.slots.default() : m.value.map((
|
|
605
|
-
const
|
|
531
|
+
class: ["farris-input-wrap", i.value]
|
|
532
|
+
}, [e.slots.default ? e.slots.default() : m.value.map((c, y) => {
|
|
533
|
+
const C = "checkbox_" + l.value + y;
|
|
606
534
|
return v("div", {
|
|
607
535
|
class: "custom-control custom-checkbox"
|
|
608
536
|
}, [v("input", {
|
|
609
537
|
type: "checkbox",
|
|
610
538
|
class: "custom-control-input",
|
|
611
|
-
name:
|
|
612
|
-
id:
|
|
613
|
-
value: f(
|
|
614
|
-
checked: u(
|
|
539
|
+
name: l.value,
|
|
540
|
+
id: C,
|
|
541
|
+
value: f(c),
|
|
542
|
+
checked: u(c),
|
|
615
543
|
disabled: n.disabled,
|
|
616
|
-
tabindex:
|
|
617
|
-
onClick: (
|
|
544
|
+
tabindex: r.value,
|
|
545
|
+
onClick: (k) => d(c, k)
|
|
618
546
|
}, null), v("label", {
|
|
619
547
|
class: "custom-control-label",
|
|
620
|
-
for:
|
|
621
|
-
title:
|
|
622
|
-
}, [
|
|
548
|
+
for: C,
|
|
549
|
+
title: a(c)
|
|
550
|
+
}, [a(c)])]);
|
|
623
551
|
})]);
|
|
624
552
|
}
|
|
625
553
|
});
|
|
626
|
-
function
|
|
627
|
-
var
|
|
554
|
+
function te(n, e, t) {
|
|
555
|
+
var x;
|
|
628
556
|
function o() {
|
|
629
557
|
t != null && t.resolveComponentContext && t.resolveComponentContext();
|
|
630
558
|
}
|
|
631
559
|
o();
|
|
632
|
-
const
|
|
560
|
+
const r = t && t.getStyles && t.getStyles() || "", l = t && t.getDesignerClass && t.getDesignerClass() || "", m = h();
|
|
633
561
|
function d() {
|
|
634
562
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanMoveComponent ? t.checkCanMoveComponent() : !0;
|
|
635
563
|
}
|
|
636
564
|
function f() {
|
|
637
565
|
return !1;
|
|
638
566
|
}
|
|
639
|
-
function
|
|
567
|
+
function a() {
|
|
640
568
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : t && t.checkCanDeleteComponent ? t.checkCanDeleteComponent() : !0;
|
|
641
569
|
}
|
|
642
570
|
function u() {
|
|
643
571
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !0 : t && t.hideNestedPaddingInDesginerView ? t.hideNestedPaddingInDesginerView() : !1;
|
|
644
572
|
}
|
|
645
|
-
function
|
|
646
|
-
if (!
|
|
573
|
+
function i(g) {
|
|
574
|
+
if (!g || !g.value)
|
|
647
575
|
return null;
|
|
648
|
-
if (
|
|
649
|
-
return
|
|
650
|
-
const
|
|
651
|
-
return
|
|
576
|
+
if (g.value.schema && g.value.schema.type === "component")
|
|
577
|
+
return g.value;
|
|
578
|
+
const T = h(g == null ? void 0 : g.value.parent), M = i(T);
|
|
579
|
+
return M || null;
|
|
652
580
|
}
|
|
653
|
-
function p(
|
|
654
|
-
const { componentInstance:
|
|
655
|
-
return !
|
|
581
|
+
function p(g = e) {
|
|
582
|
+
const { componentInstance: T, designerItemElementRef: M } = g;
|
|
583
|
+
return !T || !T.value ? null : T.value.canMove ? M : p(g.parent);
|
|
656
584
|
}
|
|
657
|
-
function
|
|
658
|
-
return !!t && t.canAccepts(
|
|
585
|
+
function c(g) {
|
|
586
|
+
return !!t && t.canAccepts(g);
|
|
659
587
|
}
|
|
660
588
|
function y() {
|
|
661
589
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
662
590
|
}
|
|
663
|
-
function
|
|
591
|
+
function C() {
|
|
664
592
|
}
|
|
665
|
-
function
|
|
666
|
-
|
|
593
|
+
function k(g, T) {
|
|
594
|
+
T && t != null && t.onAcceptMovedChildElement && t.onAcceptMovedChildElement(T);
|
|
667
595
|
}
|
|
668
|
-
function b(
|
|
669
|
-
const { componentType:
|
|
670
|
-
let
|
|
671
|
-
t && t.onResolveNewComponentSchema && (
|
|
672
|
-
const
|
|
673
|
-
return
|
|
596
|
+
function b(g) {
|
|
597
|
+
const { componentType: T } = g;
|
|
598
|
+
let M = G(T, g);
|
|
599
|
+
t && t.onResolveNewComponentSchema && (M = t.onResolveNewComponentSchema(g, M));
|
|
600
|
+
const $ = T.toLowerCase().replace("-", "_");
|
|
601
|
+
return M && !M.id && M.type === T && (M.id = `${$}_${Math.random().toString().slice(2, 6)}`), M;
|
|
674
602
|
}
|
|
675
|
-
function
|
|
676
|
-
const
|
|
677
|
-
|
|
678
|
-
let
|
|
679
|
-
t && t.onAcceptNewChildElement && (
|
|
680
|
-
const
|
|
681
|
-
return
|
|
603
|
+
function w(g, T) {
|
|
604
|
+
const M = String(g.getAttribute("data-controltype")), $ = g.getAttribute("data-feature"), _ = $ ? JSON.parse($) : {};
|
|
605
|
+
_.parentComponentInstance = m.value;
|
|
606
|
+
let P = G(M, _);
|
|
607
|
+
t && t.onAcceptNewChildElement && (P = t.onAcceptNewChildElement(g, T, P));
|
|
608
|
+
const re = M.toLowerCase().replace("-", "_");
|
|
609
|
+
return P && !P.id && P.type === M && (P.id = `${re}_${Math.random().toString().slice(2, 6)}`), P;
|
|
682
610
|
}
|
|
683
|
-
function B(
|
|
611
|
+
function B(g) {
|
|
684
612
|
}
|
|
685
|
-
function
|
|
613
|
+
function D(...g) {
|
|
686
614
|
if (t && t.getPropsConfig)
|
|
687
|
-
return t.getPropsConfig(...
|
|
615
|
+
return t.getPropsConfig(...g);
|
|
688
616
|
}
|
|
689
617
|
return m.value = {
|
|
690
618
|
canMove: d(),
|
|
691
619
|
canSelectParent: f(),
|
|
692
|
-
canDelete:
|
|
620
|
+
canDelete: a(),
|
|
693
621
|
canNested: !u(),
|
|
694
622
|
contents: e == null ? void 0 : e.schema.contents,
|
|
695
623
|
elementRef: n,
|
|
696
|
-
parent: (
|
|
624
|
+
parent: (x = e == null ? void 0 : e.parent) == null ? void 0 : x.componentInstance,
|
|
697
625
|
schema: e == null ? void 0 : e.schema,
|
|
698
|
-
styles:
|
|
699
|
-
designerClass:
|
|
700
|
-
canAccepts:
|
|
701
|
-
getBelongedComponentInstance:
|
|
626
|
+
styles: r,
|
|
627
|
+
designerClass: l,
|
|
628
|
+
canAccepts: c,
|
|
629
|
+
getBelongedComponentInstance: i,
|
|
702
630
|
getDraggableDesignItemElement: p,
|
|
703
631
|
getDraggingDisplayText: y,
|
|
704
|
-
getPropConfig:
|
|
705
|
-
getDragScopeElement:
|
|
706
|
-
onAcceptMovedChildElement:
|
|
707
|
-
onAcceptNewChildElement:
|
|
632
|
+
getPropConfig: D,
|
|
633
|
+
getDragScopeElement: C,
|
|
634
|
+
onAcceptMovedChildElement: k,
|
|
635
|
+
onAcceptNewChildElement: w,
|
|
708
636
|
onChildElementMovedOut: B,
|
|
709
637
|
addNewChildComponentSchema: b,
|
|
710
638
|
updateDragAndDropRules: o,
|
|
711
|
-
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved ||
|
|
712
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
639
|
+
triggerBelongedComponentToMoveWhenMoved: !!t && t.triggerBelongedComponentToMoveWhenMoved || h(!1),
|
|
640
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!t && t.triggerBelongedComponentToDeleteWhenDeleted || h(!1)
|
|
713
641
|
}, m;
|
|
714
642
|
}
|
|
715
|
-
function
|
|
643
|
+
function ne(n, e) {
|
|
716
644
|
n.schema;
|
|
717
|
-
const t =
|
|
718
|
-
function i
|
|
645
|
+
const t = h(!0), o = h(!0);
|
|
646
|
+
function r(i) {
|
|
719
647
|
return !1;
|
|
720
648
|
}
|
|
721
|
-
function
|
|
649
|
+
function l() {
|
|
722
650
|
return !1;
|
|
723
651
|
}
|
|
724
652
|
function m() {
|
|
@@ -727,129 +655,191 @@ function K(n, e) {
|
|
|
727
655
|
function d() {
|
|
728
656
|
return !0;
|
|
729
657
|
}
|
|
730
|
-
function f(
|
|
658
|
+
function f(i) {
|
|
731
659
|
}
|
|
732
|
-
function
|
|
660
|
+
function a() {
|
|
733
661
|
}
|
|
734
|
-
function u(
|
|
662
|
+
function u(i) {
|
|
735
663
|
return null;
|
|
736
664
|
}
|
|
737
665
|
return {
|
|
738
|
-
canAccepts:
|
|
739
|
-
checkCanDeleteComponent:
|
|
666
|
+
canAccepts: r,
|
|
667
|
+
checkCanDeleteComponent: l,
|
|
740
668
|
checkCanMoveComponent: m,
|
|
741
669
|
hideNestedPaddingInDesginerView: d,
|
|
742
670
|
onAcceptMovedChildElement: f,
|
|
743
|
-
resolveComponentContext:
|
|
671
|
+
resolveComponentContext: a,
|
|
744
672
|
triggerBelongedComponentToMoveWhenMoved: t,
|
|
745
673
|
triggerBelongedComponentToDeleteWhenDeleted: o,
|
|
746
674
|
getPropsConfig: u
|
|
747
675
|
};
|
|
748
676
|
}
|
|
749
|
-
class
|
|
677
|
+
class Ne {
|
|
678
|
+
constructor(e, t) {
|
|
679
|
+
V(this, "componentId");
|
|
680
|
+
V(this, "viewModelId");
|
|
681
|
+
V(this, "eventsEditorUtils");
|
|
682
|
+
V(this, "formSchemaUtils");
|
|
683
|
+
V(this, "formMetadataConverter");
|
|
684
|
+
V(this, "designViewModelUtils");
|
|
685
|
+
V(this, "designViewModelField");
|
|
686
|
+
V(this, "controlCreatorUtils");
|
|
687
|
+
V(this, "designerHostService");
|
|
688
|
+
V(this, "schemaService", null);
|
|
689
|
+
V(this, "metadataService", null);
|
|
690
|
+
V(this, "propertyConfig", {
|
|
691
|
+
type: "object",
|
|
692
|
+
categories: {}
|
|
693
|
+
});
|
|
694
|
+
var o;
|
|
695
|
+
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;
|
|
696
|
+
}
|
|
697
|
+
getTableInfo() {
|
|
698
|
+
var e;
|
|
699
|
+
return (e = this.schemaService) == null ? void 0 : e.getTableInfoByViewModelId(this.viewModelId);
|
|
700
|
+
}
|
|
701
|
+
setDesignViewModelField(e) {
|
|
702
|
+
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
703
|
+
if (t) {
|
|
704
|
+
if (!this.designViewModelField) {
|
|
705
|
+
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
706
|
+
this.designViewModelField = o.fields.find((r) => r.id === t);
|
|
707
|
+
}
|
|
708
|
+
e.updateOn = this.designViewModelField.updateOn;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
changeFieldEditorType(e, t) {
|
|
712
|
+
}
|
|
713
|
+
getBasicPropConfig(e) {
|
|
714
|
+
return {
|
|
715
|
+
description: "Basic Information",
|
|
716
|
+
title: "基本信息",
|
|
717
|
+
properties: {
|
|
718
|
+
id: {
|
|
719
|
+
description: "组件标识",
|
|
720
|
+
title: "标识",
|
|
721
|
+
type: "string",
|
|
722
|
+
readonly: !0
|
|
723
|
+
},
|
|
724
|
+
type: {
|
|
725
|
+
description: "组件类型",
|
|
726
|
+
title: "控件类型",
|
|
727
|
+
type: "select",
|
|
728
|
+
editor: {
|
|
729
|
+
type: "combo-list",
|
|
730
|
+
textField: "name",
|
|
731
|
+
valueField: "value",
|
|
732
|
+
data: [{ value: e.type, name: s[e.type].name }]
|
|
733
|
+
}
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
getAppearanceConfig(e = null) {
|
|
739
|
+
return {
|
|
740
|
+
title: "样式",
|
|
741
|
+
description: "Appearance",
|
|
742
|
+
properties: {
|
|
743
|
+
class: {
|
|
744
|
+
title: "class样式",
|
|
745
|
+
type: "string",
|
|
746
|
+
description: "组件的CSS样式",
|
|
747
|
+
$converter: "/converter/appearance.converter"
|
|
748
|
+
},
|
|
749
|
+
style: {
|
|
750
|
+
title: "style样式",
|
|
751
|
+
type: "string",
|
|
752
|
+
description: "组件的样式",
|
|
753
|
+
$converter: "/converter/appearance.converter"
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
const S = class S {
|
|
760
|
+
/**
|
|
761
|
+
* 根据绑定字段类型获取可用的输入类控件
|
|
762
|
+
*/
|
|
750
763
|
static getEditorTypesByMDataType(e) {
|
|
751
|
-
const t =
|
|
764
|
+
const t = S.fieldControlTypeMapping[e];
|
|
752
765
|
return t || [{ key: "", value: "" }];
|
|
753
766
|
}
|
|
754
|
-
|
|
767
|
+
/**
|
|
768
|
+
* 获取所有输入类控件
|
|
769
|
+
*/
|
|
770
|
+
static getAllInputTypes() {
|
|
771
|
+
const e = [];
|
|
772
|
+
for (let t in S.fieldControlTypeMapping)
|
|
773
|
+
S.fieldControlTypeMapping[t].forEach((o) => {
|
|
774
|
+
e.find((r) => r.key === o.key && r.value === o.value) || e.push({ key: o.key, value: o.value });
|
|
775
|
+
});
|
|
776
|
+
return e;
|
|
777
|
+
}
|
|
778
|
+
};
|
|
755
779
|
/**
|
|
756
780
|
* <字段类型,可配置的控件类型列表>的映射
|
|
757
781
|
*/
|
|
758
|
-
|
|
782
|
+
V(S, "fieldControlTypeMapping", {
|
|
759
783
|
String: [
|
|
760
|
-
{ key:
|
|
761
|
-
{ key:
|
|
762
|
-
{ key:
|
|
763
|
-
{ key:
|
|
764
|
-
{ key:
|
|
765
|
-
{ key:
|
|
766
|
-
{ key:
|
|
767
|
-
{ key: l.textarea.type, value: l.textarea.name }
|
|
768
|
-
// { key: DgControl.Tags.type, value: DgControl.Tags.name },
|
|
784
|
+
{ key: s["input-group"].type, value: s["input-group"].name },
|
|
785
|
+
{ key: s.lookup.type, value: s.lookup.name },
|
|
786
|
+
{ key: s["date-picker"].type, value: s["date-picker"].name },
|
|
787
|
+
{ key: s["check-box"].type, value: s["check-box"].name },
|
|
788
|
+
{ key: s["radio-group"].type, value: s["radio-group"].name },
|
|
789
|
+
{ key: s["combo-list"].type, value: s["combo-list"].name },
|
|
790
|
+
{ key: s.textarea.type, value: s.textarea.name }
|
|
769
791
|
],
|
|
770
792
|
Text: [
|
|
771
|
-
{ key:
|
|
772
|
-
{ key:
|
|
773
|
-
{ key: l.lookup.type, value: l.lookup.name }
|
|
793
|
+
{ key: s.textarea.type, value: s.textarea.name },
|
|
794
|
+
{ key: s.lookup.type, value: s.lookup.name }
|
|
774
795
|
],
|
|
775
796
|
Decimal: [
|
|
776
|
-
{ key:
|
|
797
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
777
798
|
],
|
|
778
799
|
Integer: [
|
|
779
|
-
{ key:
|
|
800
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
780
801
|
],
|
|
781
802
|
Number: [
|
|
782
|
-
{ key:
|
|
803
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
783
804
|
],
|
|
784
805
|
BigNumber: [
|
|
785
|
-
{ key:
|
|
806
|
+
{ key: s["number-spinner"].type, value: s["number-spinner"].name }
|
|
786
807
|
],
|
|
787
808
|
Date: [
|
|
788
|
-
{ key:
|
|
809
|
+
{ key: s["date-picker"].type, value: s["date-picker"].name }
|
|
789
810
|
],
|
|
790
811
|
DateTime: [
|
|
791
|
-
{ key:
|
|
812
|
+
{ key: s["date-picker"].type, value: s["date-picker"].name }
|
|
792
813
|
],
|
|
793
814
|
Boolean: [
|
|
794
|
-
{ key:
|
|
795
|
-
{ key:
|
|
815
|
+
{ key: s.switch.type, value: s.switch.name },
|
|
816
|
+
{ key: s["check-box"].type, value: s["check-box"].name }
|
|
796
817
|
],
|
|
797
818
|
Enum: [
|
|
798
|
-
{ key:
|
|
799
|
-
{ key:
|
|
819
|
+
{ key: s["combo-list"].type, value: s["combo-list"].name },
|
|
820
|
+
{ key: s["radio-group"].type, value: s["radio-group"].name }
|
|
800
821
|
],
|
|
801
822
|
Object: [
|
|
802
|
-
{ key:
|
|
803
|
-
{ key:
|
|
804
|
-
{ key:
|
|
805
|
-
],
|
|
806
|
-
EmployeeSelector: [
|
|
807
|
-
{ key: l.EmployeeSelector.type, value: l.EmployeeSelector.name }
|
|
808
|
-
],
|
|
809
|
-
AdminOrganizationSelector: [
|
|
810
|
-
{ key: l.AdminOrganizationSelector.type, value: l.AdminOrganizationSelector.name }
|
|
823
|
+
{ key: s.lookup.type, value: s.lookup.name },
|
|
824
|
+
{ key: s["combo-list"].type, value: s["combo-list"].name },
|
|
825
|
+
{ key: s["radio-group"].type, value: s["radio-group"].name }
|
|
811
826
|
]
|
|
812
827
|
});
|
|
813
|
-
|
|
828
|
+
let N = S;
|
|
829
|
+
const je = h(0);
|
|
830
|
+
class oe extends Ne {
|
|
814
831
|
constructor(e, t) {
|
|
815
|
-
|
|
816
|
-
F(this, "viewModelId");
|
|
817
|
-
F(this, "eventsEditorUtils");
|
|
818
|
-
F(this, "formSchemaUtils");
|
|
819
|
-
F(this, "formMetadataConverter");
|
|
820
|
-
F(this, "designViewModelUtils");
|
|
821
|
-
F(this, "designViewModelField");
|
|
822
|
-
F(this, "controlCreatorUtils");
|
|
823
|
-
F(this, "designerHostService");
|
|
824
|
-
F(this, "schemaService", null);
|
|
825
|
-
F(this, "metadataService", null);
|
|
826
|
-
F(this, "propertyConfig", {
|
|
827
|
-
type: "object",
|
|
828
|
-
categories: {}
|
|
829
|
-
});
|
|
830
|
-
var o;
|
|
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);
|
|
836
|
-
}
|
|
837
|
-
setDesignViewModelField(e) {
|
|
838
|
-
const t = e.binding && e.binding.type === "Form" && e.binding.field;
|
|
839
|
-
if (t) {
|
|
840
|
-
if (!this.designViewModelField) {
|
|
841
|
-
const o = this.designViewModelUtils.getDgViewModel(this.viewModelId);
|
|
842
|
-
this.designViewModelField = o.fields.find((i) => i.id === t);
|
|
843
|
-
}
|
|
844
|
-
e.updateOn = this.designViewModelField.updateOn;
|
|
845
|
-
}
|
|
832
|
+
super(e, t);
|
|
846
833
|
}
|
|
847
|
-
|
|
834
|
+
getPropertyConfig(e, t) {
|
|
835
|
+
return this.propertyConfig.categories.basic = this.getBasicProperties(e, t), this.propertyConfig.categories.appearance = this.getAppearanceProperties(e), this.propertyConfig.categories.editor = this.getEditorProperties(e), this.propertyConfig;
|
|
848
836
|
}
|
|
849
|
-
|
|
850
|
-
var
|
|
851
|
-
var
|
|
852
|
-
|
|
837
|
+
getBasicProperties(e, t) {
|
|
838
|
+
var m;
|
|
839
|
+
var o = this;
|
|
840
|
+
this.setDesignViewModelField(e);
|
|
841
|
+
const r = this.formSchemaUtils.getFormMetadataBasicInfo(), l = this.designViewModelUtils.getAllFields2TreeByVMId(this.viewModelId);
|
|
842
|
+
return {
|
|
853
843
|
description: "Basic Information",
|
|
854
844
|
title: "基本信息",
|
|
855
845
|
properties: {
|
|
@@ -869,63 +859,48 @@ class Ae {
|
|
|
869
859
|
type: "combo-list",
|
|
870
860
|
textField: "value",
|
|
871
861
|
valueField: "key",
|
|
872
|
-
|
|
873
|
-
|
|
862
|
+
editable: !1,
|
|
863
|
+
data: o.designViewModelField ? N.getEditorTypesByMDataType((m = o.designViewModelField.type) == null ? void 0 : m.name) : N.getAllInputTypes()
|
|
874
864
|
}
|
|
875
865
|
},
|
|
876
866
|
label: {
|
|
877
867
|
title: "标签",
|
|
878
868
|
type: "string",
|
|
879
869
|
$converter: "/converter/form-group-label.converter"
|
|
870
|
+
},
|
|
871
|
+
binding: {
|
|
872
|
+
description: "绑定的表单字段",
|
|
873
|
+
title: "绑定",
|
|
874
|
+
$converter: "/converter/field-selector.converter",
|
|
875
|
+
editor: {
|
|
876
|
+
type: "field-selector",
|
|
877
|
+
bindingType: { enable: !1 },
|
|
878
|
+
editorParams: {
|
|
879
|
+
propertyData: e,
|
|
880
|
+
formBasicInfo: r
|
|
881
|
+
},
|
|
882
|
+
columns: [
|
|
883
|
+
{ field: "name", title: "字段名称" },
|
|
884
|
+
{ field: "bindingField", title: "绑定字段" },
|
|
885
|
+
{ field: "fieldType", title: "字段类型" }
|
|
886
|
+
],
|
|
887
|
+
textField: "bindingField",
|
|
888
|
+
data: l
|
|
889
|
+
}
|
|
880
890
|
}
|
|
881
891
|
},
|
|
882
|
-
setPropertyRelates(
|
|
883
|
-
if (
|
|
884
|
-
switch (
|
|
892
|
+
setPropertyRelates(d, f) {
|
|
893
|
+
if (d)
|
|
894
|
+
switch (d && d.propertyID) {
|
|
885
895
|
case "type": {
|
|
886
|
-
|
|
896
|
+
o.changeControlType(e, d, t);
|
|
887
897
|
break;
|
|
888
898
|
}
|
|
889
899
|
}
|
|
890
900
|
}
|
|
891
901
|
};
|
|
892
902
|
}
|
|
893
|
-
|
|
894
|
-
* 卡片控件:切换控件类型后事件
|
|
895
|
-
* @param propertyData 控件DOM属性
|
|
896
|
-
* @param newControlType 新控件类型
|
|
897
|
-
*/
|
|
898
|
-
changeControlType(e, t) {
|
|
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)
|
|
903
|
-
return;
|
|
904
|
-
const m = c.contents.findIndex((y) => y.id === e.id), d = c.contents[m];
|
|
905
|
-
let f;
|
|
906
|
-
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
907
|
-
editor: {
|
|
908
|
-
$type: o
|
|
909
|
-
},
|
|
910
|
-
name: this.designViewModelField.name,
|
|
911
|
-
require: this.designViewModelField.require,
|
|
912
|
-
readonly: this.designViewModelField.readonly
|
|
913
|
-
}, !1), f = this.controlCreatorUtils.setFormFieldProperty("Form", this.designViewModelField, null, o)), Object.assign(f, {
|
|
914
|
-
id: d.id,
|
|
915
|
-
appearance: d.appearance,
|
|
916
|
-
size: d.size,
|
|
917
|
-
label: d.label
|
|
918
|
-
}), Object.assign(f.editor, {
|
|
919
|
-
isTextArea: f.isTextArea && d.isTextArea,
|
|
920
|
-
type: o || "",
|
|
921
|
-
placeHolder: (r = d.editor) == null ? void 0 : r.placeHolder,
|
|
922
|
-
holdPlace: (u = d.editor) == null ? void 0 : u.holdPlace,
|
|
923
|
-
readonly: (a = d.editor) == null ? void 0 : a.readonly,
|
|
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);
|
|
927
|
-
}
|
|
928
|
-
getAppearanceConfig(e = null) {
|
|
903
|
+
getAppearanceProperties(e) {
|
|
929
904
|
return {
|
|
930
905
|
title: "样式",
|
|
931
906
|
description: "Appearance",
|
|
@@ -955,73 +930,52 @@ class Ae {
|
|
|
955
930
|
}
|
|
956
931
|
};
|
|
957
932
|
}
|
|
958
|
-
/**
|
|
959
|
-
* 获取控件:以contents为节点进行定位
|
|
960
|
-
* @param controlId 控件ID
|
|
961
|
-
* @param domJson 容器
|
|
962
|
-
*/
|
|
963
|
-
getControlParentContainer(e, t) {
|
|
964
|
-
let o;
|
|
965
|
-
if (!t || !t.contents || t.contents.length === 0)
|
|
966
|
-
return null;
|
|
967
|
-
for (const i of t.contents) {
|
|
968
|
-
if (i.id === e)
|
|
969
|
-
return o = t, t;
|
|
970
|
-
if (o = this.getControlParentContainer(e, i), o)
|
|
971
|
-
return o;
|
|
972
|
-
}
|
|
973
|
-
}
|
|
974
|
-
}
|
|
975
|
-
class te extends Ae {
|
|
976
|
-
constructor(e, t) {
|
|
977
|
-
super(e, t);
|
|
978
|
-
}
|
|
979
|
-
getBasicProperties(e) {
|
|
980
|
-
let t = this.getBasicPropConfig(e);
|
|
981
|
-
return t.properties.binding = this.getFieldSelectorOptions(e), t;
|
|
982
|
-
}
|
|
983
|
-
getAppearanceProperties(e) {
|
|
984
|
-
return this.getAppearanceConfig(e);
|
|
985
|
-
}
|
|
986
933
|
getEditorProperties(e) {
|
|
987
934
|
return this.getComponentConfig(e);
|
|
988
935
|
}
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
936
|
+
/**
|
|
937
|
+
* 卡片控件:切换控件类型后事件
|
|
938
|
+
* @param propertyData 控件DOM属性
|
|
939
|
+
* @param newControlType 新控件类型
|
|
940
|
+
*/
|
|
941
|
+
changeControlType(e, t, o) {
|
|
942
|
+
var a, u, i, p;
|
|
943
|
+
const r = t.propertyValue, l = o && o.parent && o.parent.schema;
|
|
944
|
+
if (!l)
|
|
945
|
+
return;
|
|
946
|
+
const m = l.contents.findIndex((c) => c.id === e.id), d = l.contents[m];
|
|
947
|
+
let f;
|
|
948
|
+
this.designViewModelField && (this.designViewModelUtils.getDgViewModel(this.viewModelId).changeField(this.designViewModelField.id, {
|
|
998
949
|
editor: {
|
|
999
|
-
type:
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
950
|
+
$type: r
|
|
951
|
+
},
|
|
952
|
+
name: this.designViewModelField.name,
|
|
953
|
+
require: this.designViewModelField.require,
|
|
954
|
+
readonly: this.designViewModelField.readonly
|
|
955
|
+
}, !1), f = this.controlCreatorUtils.setFormFieldProperty(this.designViewModelField, r)), f || (f = X("form-group") || {}, f.editor = X(r) || {}, delete f.editor.id, delete f.editor.binding, delete f.editor.appearance), Object.assign(f, {
|
|
956
|
+
id: d.id,
|
|
957
|
+
appearance: d.appearance,
|
|
958
|
+
size: d.size,
|
|
959
|
+
label: d.label,
|
|
960
|
+
binding: d.binding,
|
|
961
|
+
visible: d.visible
|
|
962
|
+
}), Object.assign(f.editor, {
|
|
963
|
+
isTextArea: f.isTextArea && d.isTextArea,
|
|
964
|
+
placeholder: (a = d.editor) == null ? void 0 : a.placeholder,
|
|
965
|
+
holdPlace: (u = d.editor) == null ? void 0 : u.holdPlace,
|
|
966
|
+
readonly: (i = d.editor) == null ? void 0 : i.readonly,
|
|
967
|
+
require: (p = d.editor) == null ? void 0 : p.require
|
|
968
|
+
}), l.contents.splice(m, 1), l.contents.splice(m, 0, f), o.schema = Object.assign(d, f), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach(
|
|
969
|
+
(c) => c.classList.remove("dgComponentSelected")
|
|
970
|
+
), je.value++;
|
|
1017
971
|
}
|
|
1018
972
|
getComponentConfig(e, t = {}, o = {}) {
|
|
1019
|
-
const
|
|
973
|
+
const r = Object.assign({
|
|
1020
974
|
description: "组件信息",
|
|
1021
975
|
title: "组件信息",
|
|
1022
976
|
type: "input-group",
|
|
1023
977
|
$converter: "/converter/property-editor.converter"
|
|
1024
|
-
}, t),
|
|
978
|
+
}, t), l = Object.assign({
|
|
1025
979
|
readonly: {
|
|
1026
980
|
description: "",
|
|
1027
981
|
title: "只读",
|
|
@@ -1043,10 +997,10 @@ class te extends Ae {
|
|
|
1043
997
|
type: "string"
|
|
1044
998
|
}
|
|
1045
999
|
}, o);
|
|
1046
|
-
return { ...
|
|
1000
|
+
return { ...r, properties: { ...l } };
|
|
1047
1001
|
}
|
|
1048
1002
|
}
|
|
1049
|
-
class Oe extends
|
|
1003
|
+
class Oe extends oe {
|
|
1050
1004
|
constructor(e, t) {
|
|
1051
1005
|
super(e, t);
|
|
1052
1006
|
}
|
|
@@ -1073,7 +1027,7 @@ class Oe extends te {
|
|
|
1073
1027
|
});
|
|
1074
1028
|
}
|
|
1075
1029
|
}
|
|
1076
|
-
class
|
|
1030
|
+
class Ge extends oe {
|
|
1077
1031
|
constructor(e, t) {
|
|
1078
1032
|
super(e, t);
|
|
1079
1033
|
}
|
|
@@ -1095,93 +1049,93 @@ class Ne extends te {
|
|
|
1095
1049
|
});
|
|
1096
1050
|
}
|
|
1097
1051
|
}
|
|
1098
|
-
function
|
|
1052
|
+
function Ue(n, e) {
|
|
1099
1053
|
const {
|
|
1100
1054
|
canAccepts: t,
|
|
1101
1055
|
checkCanDeleteComponent: o,
|
|
1102
|
-
checkCanMoveComponent:
|
|
1103
|
-
hideNestedPaddingInDesginerView:
|
|
1056
|
+
checkCanMoveComponent: r,
|
|
1057
|
+
hideNestedPaddingInDesginerView: l,
|
|
1104
1058
|
onAcceptMovedChildElement: m,
|
|
1105
1059
|
resolveComponentContext: d,
|
|
1106
1060
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1107
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1108
|
-
} =
|
|
1109
|
-
function
|
|
1110
|
-
return new Oe(p, e).getPropertyConfig(u);
|
|
1061
|
+
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
1062
|
+
} = ne(n), u = n.schema;
|
|
1063
|
+
function i(p, c) {
|
|
1064
|
+
return new Oe(p, e).getPropertyConfig(u, c);
|
|
1111
1065
|
}
|
|
1112
1066
|
return {
|
|
1113
1067
|
canAccepts: t,
|
|
1114
1068
|
checkCanDeleteComponent: o,
|
|
1115
|
-
checkCanMoveComponent:
|
|
1116
|
-
hideNestedPaddingInDesginerView:
|
|
1069
|
+
checkCanMoveComponent: r,
|
|
1070
|
+
hideNestedPaddingInDesginerView: l,
|
|
1117
1071
|
onAcceptMovedChildElement: m,
|
|
1118
1072
|
resolveComponentContext: d,
|
|
1119
1073
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1120
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1121
|
-
getPropsConfig:
|
|
1074
|
+
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
1075
|
+
getPropsConfig: i
|
|
1122
1076
|
};
|
|
1123
1077
|
}
|
|
1124
|
-
function
|
|
1078
|
+
function qe(n, e) {
|
|
1125
1079
|
const {
|
|
1126
1080
|
canAccepts: t,
|
|
1127
1081
|
checkCanDeleteComponent: o,
|
|
1128
|
-
checkCanMoveComponent:
|
|
1129
|
-
hideNestedPaddingInDesginerView:
|
|
1082
|
+
checkCanMoveComponent: r,
|
|
1083
|
+
hideNestedPaddingInDesginerView: l,
|
|
1130
1084
|
onAcceptMovedChildElement: m,
|
|
1131
1085
|
resolveComponentContext: d,
|
|
1132
1086
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1133
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1134
|
-
} =
|
|
1135
|
-
function
|
|
1136
|
-
return new
|
|
1087
|
+
triggerBelongedComponentToDeleteWhenDeleted: a
|
|
1088
|
+
} = ne(n), u = n.schema;
|
|
1089
|
+
function i(p, c) {
|
|
1090
|
+
return new Ge(p, e).getPropertyConfig(u, c);
|
|
1137
1091
|
}
|
|
1138
1092
|
return {
|
|
1139
1093
|
canAccepts: t,
|
|
1140
1094
|
checkCanDeleteComponent: o,
|
|
1141
|
-
checkCanMoveComponent:
|
|
1142
|
-
hideNestedPaddingInDesginerView:
|
|
1095
|
+
checkCanMoveComponent: r,
|
|
1096
|
+
hideNestedPaddingInDesginerView: l,
|
|
1143
1097
|
onAcceptMovedChildElement: m,
|
|
1144
1098
|
resolveComponentContext: d,
|
|
1145
1099
|
triggerBelongedComponentToMoveWhenMoved: f,
|
|
1146
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
1147
|
-
getPropsConfig:
|
|
1100
|
+
triggerBelongedComponentToDeleteWhenDeleted: a,
|
|
1101
|
+
getPropsConfig: i
|
|
1148
1102
|
};
|
|
1149
1103
|
}
|
|
1150
|
-
const ze = /* @__PURE__ */
|
|
1104
|
+
const ze = /* @__PURE__ */ j({
|
|
1151
1105
|
name: "FCheckboxGroupDesign",
|
|
1152
|
-
props:
|
|
1106
|
+
props: L,
|
|
1153
1107
|
emits: ["changeValue", "update:modelValue"],
|
|
1154
1108
|
setup(n, e) {
|
|
1155
|
-
const t =
|
|
1109
|
+
const t = h(n.modelValue), o = h(n.horizontal), r = h(n.tabIndex), l = h(n.name), m = O(() => ({
|
|
1156
1110
|
"farris-checkradio-hor": o.value
|
|
1157
1111
|
})), {
|
|
1158
1112
|
enumData: d,
|
|
1159
1113
|
onClickCheckbox: f,
|
|
1160
|
-
getValue:
|
|
1114
|
+
getValue: a,
|
|
1161
1115
|
getText: u,
|
|
1162
|
-
checked:
|
|
1163
|
-
} =
|
|
1164
|
-
return
|
|
1165
|
-
p.value.componentInstance =
|
|
1166
|
-
}), e.expose(
|
|
1116
|
+
checked: i
|
|
1117
|
+
} = ee(n, e, t), p = h(), c = E("designer-host-service"), y = E("design-item-context"), C = Ue(y, c), k = te(p, y, C);
|
|
1118
|
+
return q(() => {
|
|
1119
|
+
p.value.componentInstance = k;
|
|
1120
|
+
}), e.expose(k.value), A(() => n.modelValue, (b) => {
|
|
1167
1121
|
t.value = b, e.emit("changeValue", t.value);
|
|
1168
1122
|
}), () => v("div", {
|
|
1169
1123
|
ref: p,
|
|
1170
1124
|
class: ["farris-input-wrap", m.value]
|
|
1171
|
-
}, [d.value.map((b,
|
|
1172
|
-
const B = "checkbox_" +
|
|
1125
|
+
}, [d.value.map((b, w) => {
|
|
1126
|
+
const B = "checkbox_" + l.value + w;
|
|
1173
1127
|
return v("div", {
|
|
1174
1128
|
class: "custom-control custom-checkbox"
|
|
1175
1129
|
}, [v("input", {
|
|
1176
1130
|
type: "checkbox",
|
|
1177
1131
|
class: "custom-control-input",
|
|
1178
|
-
name:
|
|
1132
|
+
name: l.value,
|
|
1179
1133
|
id: B,
|
|
1180
|
-
value:
|
|
1181
|
-
checked:
|
|
1134
|
+
value: a(b),
|
|
1135
|
+
checked: i(b),
|
|
1182
1136
|
disabled: n.disabled,
|
|
1183
|
-
tabindex:
|
|
1184
|
-
onClick: (
|
|
1137
|
+
tabindex: r.value,
|
|
1138
|
+
onClick: (D) => f(b, D)
|
|
1185
1139
|
}, null), v("label", {
|
|
1186
1140
|
class: "custom-control-label",
|
|
1187
1141
|
for: B,
|
|
@@ -1189,16 +1143,16 @@ const ze = /* @__PURE__ */ O({
|
|
|
1189
1143
|
}, [u(b)])]);
|
|
1190
1144
|
})]);
|
|
1191
1145
|
}
|
|
1192
|
-
}),
|
|
1146
|
+
}), We = /* @__PURE__ */ j({
|
|
1193
1147
|
name: "FCheckBoxDesign",
|
|
1194
|
-
props:
|
|
1148
|
+
props: W,
|
|
1195
1149
|
emits: [],
|
|
1196
1150
|
setup(n, e) {
|
|
1197
|
-
const t =
|
|
1198
|
-
return
|
|
1151
|
+
const t = h(), o = h(n.id), r = h(n.indeterminate), l = E("designer-host-service"), m = E("design-item-context"), d = qe(m, l), f = te(t, m, d);
|
|
1152
|
+
return q(() => {
|
|
1199
1153
|
t.value.componentInstance = f;
|
|
1200
|
-
}),
|
|
1201
|
-
|
|
1154
|
+
}), A(() => n.indeterminate, (a) => {
|
|
1155
|
+
r.value = a;
|
|
1202
1156
|
}), e.expose(f.value), () => v("div", {
|
|
1203
1157
|
ref: t,
|
|
1204
1158
|
dragref: `${m.schema.id}-container`,
|
|
@@ -1215,21 +1169,21 @@ const ze = /* @__PURE__ */ O({
|
|
|
1215
1169
|
}, null)]);
|
|
1216
1170
|
}
|
|
1217
1171
|
});
|
|
1218
|
-
|
|
1219
|
-
n.component(
|
|
1172
|
+
F.install = (n) => {
|
|
1173
|
+
n.component(F.name, F), n.component(U.name, U);
|
|
1220
1174
|
};
|
|
1221
|
-
|
|
1222
|
-
n["check-box"] =
|
|
1175
|
+
F.register = (n, e, t, o) => {
|
|
1176
|
+
n["check-box"] = U, e["check-box"] = K, n["check-group"] = F, e["check-group"] = R;
|
|
1223
1177
|
};
|
|
1224
|
-
|
|
1225
|
-
n["check-box"] =
|
|
1178
|
+
F.registerDesigner = (n, e, t) => {
|
|
1179
|
+
n["check-box"] = We, e["check-box"] = K, n["check-group"] = ze, e["check-group"] = R;
|
|
1226
1180
|
};
|
|
1227
1181
|
export {
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1182
|
+
U as FCheckBox,
|
|
1183
|
+
F as FCheckBoxGroup,
|
|
1184
|
+
R as checkBoxGroupPropsResolver,
|
|
1185
|
+
W as checkBoxProps,
|
|
1186
|
+
K as checkBoxPropsResolver,
|
|
1187
|
+
L as checkboxGroupProps,
|
|
1188
|
+
F as default
|
|
1235
1189
|
};
|