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