@farris/ui-vue 1.6.5-beta.8 → 1.6.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +335 -335
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +6 -6
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +139 -134
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/common/index.esm.js +1 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +300 -300
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +7 -6
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +295 -295
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3407 -3338
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +833 -832
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +5 -5
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +173 -172
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +637 -637
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +737 -732
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/filter-bar/index.esm.js +728 -706
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +670 -665
- package/components/filter-condition-editor/index.umd.cjs +2 -2
- package/components/flow-canvas/index.esm.js +205 -205
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +77 -76
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +4 -2
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +42 -40
- package/components/list-view/index.umd.cjs +2 -2
- package/components/lookup/index.esm.js +118 -118
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +482 -483
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +424 -424
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +276 -276
- package/components/modal/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +161 -161
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +322 -316
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +541 -534
- package/components/order/index.umd.cjs +2 -2
- package/components/page-header/index.esm.js +1 -1
- package/components/page-header/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +58 -56
- package/components/popover/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +216 -216
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +489 -467
- package/components/query-solution/index.umd.cjs +3 -3
- package/components/radio-group/index.esm.js +30 -30
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +282 -282
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +875 -873
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +1 -1
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +504 -496
- package/components/schema-selector/index.umd.cjs +6 -6
- package/components/search-box/index.esm.js +76 -72
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +212 -212
- package/components/section/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +382 -377
- package/components/sort-condition-editor/index.umd.cjs +2 -2
- package/components/tabs/index.esm.js +584 -582
- package/components/tabs/index.umd.cjs +2 -2
- package/components/textarea/index.esm.js +362 -362
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +9799 -0
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/time-picker/package.json +8 -0
- package/components/time-picker/style.js +6 -0
- package/components/transfer/index.esm.js +81 -79
- package/components/transfer/index.umd.cjs +2 -2
- package/components/tree-grid/index.esm.js +100 -100
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2361 -2279
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/video/index.esm.js +220 -220
- package/components/video/index.umd.cjs +1 -1
- package/designer/button-edit/index.css +1 -0
- package/designer/button-edit/index.esm.js +4856 -0
- package/designer/button-edit/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +254 -0
- package/designer/checkbox/index.umd.cjs +1 -0
- package/designer/checkbox-group/index.esm.js +381 -0
- package/designer/checkbox-group/index.umd.cjs +1 -0
- package/designer/data-grid/index.css +1 -0
- package/designer/data-grid/index.esm.js +15445 -0
- package/designer/data-grid/index.umd.cjs +23 -0
- package/designer/data-view/index.esm.js +854 -0
- package/designer/data-view/index.umd.cjs +38 -0
- package/designer/drawer/index.css +1 -0
- package/designer/drawer/index.esm.js +525 -0
- package/designer/drawer/index.umd.cjs +1 -0
- package/designer/farris-designer.all.esm.js +22331 -0
- package/designer/farris-designer.all.umd.cjs +34 -0
- package/designer/index.css +1 -0
- package/designer/input-group/index.esm.js +1099 -0
- package/designer/input-group/index.umd.cjs +1 -0
- package/designer/list-view/index.css +1 -0
- package/designer/list-view/index.esm.js +4685 -0
- package/designer/list-view/index.umd.cjs +40 -0
- package/designer/radio-group/index.css +1 -0
- package/designer/radio-group/index.esm.js +6989 -0
- package/designer/radio-group/index.umd.cjs +1 -0
- package/designer/tree-grid/index.esm.js +1099 -0
- package/designer/tree-grid/index.umd.cjs +1 -0
- package/farris.all.esm.js +13299 -13177
- package/farris.all.umd.cjs +25 -25
- package/locales/data-grid/ui/en.json +4 -3
- package/locales/data-grid/ui/zh-CHS.json +2 -1
- package/locales/data-grid/ui/zh-CHT.json +2 -1
- package/locales/designer/en.json +9 -7
- package/locales/designer/zh-CHS.json +4 -2
- package/locales/designer/zh-CHT.json +4 -2
- package/locales/ui/en.json +9 -7
- package/locales/ui/zh-CHS.json +4 -2
- package/locales/ui/zh-CHT.json +4 -2
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
import { radioCheckboxCommonProps as F, withInstall as V } from "../../components/common/index.esm.js";
|
|
2
|
+
import { resolveAppearance as P, createPropsResolver as T } from "../../components/dynamic-resolver/index.esm.js";
|
|
3
|
+
import G, { checkboxGroupProps as I } from "../../components/checkbox-group/index.esm.js";
|
|
4
|
+
import { computed as k, ref as y, watch as x, defineComponent as R, inject as S, onMounted as A, createVNode as h } from "vue";
|
|
5
|
+
import { useDesignerComponent as w } from "../../components/designer-canvas/index.esm.js";
|
|
6
|
+
import { InputBaseProperty as B } from "../../components/property-panel/index.esm.js";
|
|
7
|
+
const M = {
|
|
8
|
+
...F,
|
|
9
|
+
/**
|
|
10
|
+
* 组件标识
|
|
11
|
+
*/
|
|
12
|
+
id: String,
|
|
13
|
+
/**
|
|
14
|
+
* 禁用组件,不允许切换单选值
|
|
15
|
+
*/
|
|
16
|
+
disabled: { type: Boolean, default: !1 },
|
|
17
|
+
/**
|
|
18
|
+
* 同disabled
|
|
19
|
+
*/
|
|
20
|
+
readonly: { type: Boolean, default: !1 },
|
|
21
|
+
/**
|
|
22
|
+
* 单选组枚举数组---废弃
|
|
23
|
+
*/
|
|
24
|
+
enumData: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: []
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* 单选组枚举数组
|
|
30
|
+
*/
|
|
31
|
+
data: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: []
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* 值类型是否为字符串
|
|
37
|
+
*/
|
|
38
|
+
isStringValue: { type: Boolean, default: !0 },
|
|
39
|
+
/**
|
|
40
|
+
* 异步获取枚举数组方法
|
|
41
|
+
*/
|
|
42
|
+
// loadData: () => Observable < { data: Array<Checkbox> } >
|
|
43
|
+
loadData: { type: Function },
|
|
44
|
+
/**
|
|
45
|
+
* 组件值,字符串或者数组
|
|
46
|
+
*/
|
|
47
|
+
modelValue: [String, Array],
|
|
48
|
+
/**
|
|
49
|
+
* 组件名称
|
|
50
|
+
*/
|
|
51
|
+
name: { type: String, default: "" },
|
|
52
|
+
/**
|
|
53
|
+
* 分隔符,默认逗号
|
|
54
|
+
*/
|
|
55
|
+
separator: { type: String, default: "," },
|
|
56
|
+
/**
|
|
57
|
+
* 输入框Tab键索引
|
|
58
|
+
*/
|
|
59
|
+
tabIndex: { type: Number, default: 0 },
|
|
60
|
+
/**
|
|
61
|
+
* 枚举数组中展示文本的key值。
|
|
62
|
+
*/
|
|
63
|
+
textField: { type: String, default: "name" },
|
|
64
|
+
/**
|
|
65
|
+
* 枚举数组中枚举值的key值。
|
|
66
|
+
*/
|
|
67
|
+
valueField: { type: String, default: "value" }
|
|
68
|
+
};
|
|
69
|
+
function j(e, t, n) {
|
|
70
|
+
const l = k(() => !(e.readonly && e.disabled)), o = y(e.data || e.enumData || e.options);
|
|
71
|
+
function s(r) {
|
|
72
|
+
return r[e.valueField];
|
|
73
|
+
}
|
|
74
|
+
function f(r) {
|
|
75
|
+
return r[e.textField];
|
|
76
|
+
}
|
|
77
|
+
function p(r) {
|
|
78
|
+
return r ? e.isStringValue ? r.split(e.separator) : r : [];
|
|
79
|
+
}
|
|
80
|
+
function m(r) {
|
|
81
|
+
const i = o.value.map((a) => s(a)).filter((a) => r.some((c) => c === String(a)));
|
|
82
|
+
return e.isStringValue ? i.join(e.separator) : i;
|
|
83
|
+
}
|
|
84
|
+
function b(r) {
|
|
85
|
+
const u = String(s(r));
|
|
86
|
+
return p(n.value).some((a) => a === u);
|
|
87
|
+
}
|
|
88
|
+
function g(r, u) {
|
|
89
|
+
if (l.value) {
|
|
90
|
+
let i = p(n.value) || [];
|
|
91
|
+
const a = String(s(r));
|
|
92
|
+
!i || !i.length ? i.push(a) : i.some((c) => c === a) ? i = i.filter((c) => c !== a) : i.push(a), n.value = m(i), t.emit("changeValue", n.value), t.emit("update:modelValue", n.value);
|
|
93
|
+
}
|
|
94
|
+
u.stopPropagation();
|
|
95
|
+
}
|
|
96
|
+
return x(() => e.data, () => {
|
|
97
|
+
o.value = e.data;
|
|
98
|
+
}), x(() => e.enumData, () => {
|
|
99
|
+
o.value = e.enumData;
|
|
100
|
+
}), {
|
|
101
|
+
enumData: o,
|
|
102
|
+
getValue: s,
|
|
103
|
+
getText: f,
|
|
104
|
+
checked: b,
|
|
105
|
+
onClickCheckbox: g
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
class D extends B {
|
|
109
|
+
constructor(t, n) {
|
|
110
|
+
super(t, n);
|
|
111
|
+
}
|
|
112
|
+
getEditorProperties(t) {
|
|
113
|
+
const n = this;
|
|
114
|
+
return n.getComponentConfig(t, { type: "check-group" }, {
|
|
115
|
+
placeholder: {
|
|
116
|
+
visible: !1
|
|
117
|
+
},
|
|
118
|
+
disabled: {
|
|
119
|
+
visible: !1
|
|
120
|
+
},
|
|
121
|
+
direction: {
|
|
122
|
+
description: "",
|
|
123
|
+
title: "排列方向",
|
|
124
|
+
type: "enum",
|
|
125
|
+
editor: {
|
|
126
|
+
data: [
|
|
127
|
+
{ id: "horizontal", name: "横向" },
|
|
128
|
+
{ id: "vertical", name: "纵向" }
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
dataSourceType: {
|
|
133
|
+
description: "",
|
|
134
|
+
title: "数据源类型",
|
|
135
|
+
type: "enum",
|
|
136
|
+
visible: !1,
|
|
137
|
+
editor: {
|
|
138
|
+
default: "static",
|
|
139
|
+
data: [
|
|
140
|
+
{ id: "static", name: "静态" },
|
|
141
|
+
{ id: "dynamic", name: "动态" }
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
refreshPanelAfterChanged: !0
|
|
145
|
+
},
|
|
146
|
+
data: {
|
|
147
|
+
description: "",
|
|
148
|
+
title: "数据",
|
|
149
|
+
type: "array",
|
|
150
|
+
visible: !t.editor.dataSourceType || t.editor.dataSourceType === "static",
|
|
151
|
+
...n.getItemCollectionEditor(t, t.editor.valueField, t.editor.textField),
|
|
152
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
153
|
+
refreshPanelAfterChanged: !0
|
|
154
|
+
},
|
|
155
|
+
bindDataSource: {
|
|
156
|
+
description: "",
|
|
157
|
+
title: "绑定数据源",
|
|
158
|
+
type: "string",
|
|
159
|
+
visible: t.editor.dataSourceType === "dynamic"
|
|
160
|
+
},
|
|
161
|
+
textField: {
|
|
162
|
+
description: "",
|
|
163
|
+
title: "文本字段",
|
|
164
|
+
type: "string",
|
|
165
|
+
readonly: t.editor.dataSourceType !== "dynamic"
|
|
166
|
+
},
|
|
167
|
+
valueField: {
|
|
168
|
+
description: "",
|
|
169
|
+
title: "值字段",
|
|
170
|
+
type: "string",
|
|
171
|
+
readonly: t.editor.dataSourceType !== "dynamic"
|
|
172
|
+
}
|
|
173
|
+
}, (o, s) => {
|
|
174
|
+
if (o)
|
|
175
|
+
switch (o.propertyID) {
|
|
176
|
+
case "dataSourceType": {
|
|
177
|
+
o.propertyValue === "static" && (t.editor.valueField = "value", t.editor.textField = "name");
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
case "data": {
|
|
181
|
+
t.formatter && (t.formatter.data = [...o.propertyValue]);
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function E(e, t) {
|
|
189
|
+
const n = e.schema;
|
|
190
|
+
function l(o, s) {
|
|
191
|
+
return new D(o, t).getPropertyConfig(n, s);
|
|
192
|
+
}
|
|
193
|
+
return { getPropsConfig: l };
|
|
194
|
+
}
|
|
195
|
+
const v = /* @__PURE__ */ R({
|
|
196
|
+
name: "FCheckboxGroupDesign",
|
|
197
|
+
props: M,
|
|
198
|
+
emits: ["changeValue", "update:modelValue"],
|
|
199
|
+
setup(e, t) {
|
|
200
|
+
const n = y(e.modelValue), l = y(e.name), o = k(() => ({
|
|
201
|
+
"farris-checkradio-hor": e.direction === "horizontal"
|
|
202
|
+
})), {
|
|
203
|
+
enumData: s,
|
|
204
|
+
getValue: f,
|
|
205
|
+
getText: p
|
|
206
|
+
} = j(e, t, n), m = y(), b = S("designer-host-service"), g = S("design-item-context"), r = E(g, b), u = w(m, g, r);
|
|
207
|
+
A(() => {
|
|
208
|
+
m.value.componentInstance = u;
|
|
209
|
+
});
|
|
210
|
+
const i = k(() => {
|
|
211
|
+
if (!s.value || s.value.length === 0) {
|
|
212
|
+
const a = [];
|
|
213
|
+
return [{
|
|
214
|
+
value: "example1",
|
|
215
|
+
name: "示例一"
|
|
216
|
+
}, {
|
|
217
|
+
value: "example2",
|
|
218
|
+
name: "示例二"
|
|
219
|
+
}].map((c) => {
|
|
220
|
+
const d = {};
|
|
221
|
+
d[e.valueField] = c.value, d[e.textField] = c.name, a.push(d);
|
|
222
|
+
}), a;
|
|
223
|
+
}
|
|
224
|
+
return s.value;
|
|
225
|
+
});
|
|
226
|
+
return t.expose(u.value), x(() => e.modelValue, (a) => {
|
|
227
|
+
n.value = a, t.emit("changeValue", n.value);
|
|
228
|
+
}), () => h("div", {
|
|
229
|
+
ref: m,
|
|
230
|
+
class: ["farris-input-wrap", o.value]
|
|
231
|
+
}, [i.value.map((a, c) => {
|
|
232
|
+
const d = "checkbox_" + l.value + c;
|
|
233
|
+
return h("div", {
|
|
234
|
+
class: "custom-control custom-checkbox"
|
|
235
|
+
}, [h("input", {
|
|
236
|
+
type: "checkbox",
|
|
237
|
+
class: "custom-control-input",
|
|
238
|
+
name: l.value,
|
|
239
|
+
id: d,
|
|
240
|
+
value: f(a),
|
|
241
|
+
checked: !1,
|
|
242
|
+
readonly: !0,
|
|
243
|
+
disabled: !0
|
|
244
|
+
}, null), h("label", {
|
|
245
|
+
class: "custom-control-label",
|
|
246
|
+
for: d,
|
|
247
|
+
title: p(a)
|
|
248
|
+
}, [p(a)])]);
|
|
249
|
+
})]);
|
|
250
|
+
}
|
|
251
|
+
}), $ = /* @__PURE__ */ new Map([
|
|
252
|
+
["appearance", P]
|
|
253
|
+
]);
|
|
254
|
+
function q(e, t, n) {
|
|
255
|
+
return t;
|
|
256
|
+
}
|
|
257
|
+
const z = "https://json-schema.org/draft/2020-12/schema", N = "https://farris-design.gitee.io/check-box.schema.json", H = "check-group", U = "A Farris Input Component", _ = "object", J = {
|
|
258
|
+
id: {
|
|
259
|
+
description: "The unique identifier for a check box",
|
|
260
|
+
type: "string"
|
|
261
|
+
},
|
|
262
|
+
type: {
|
|
263
|
+
description: "The type string of check box component",
|
|
264
|
+
type: "string",
|
|
265
|
+
default: "check-group"
|
|
266
|
+
},
|
|
267
|
+
appearance: {
|
|
268
|
+
description: "",
|
|
269
|
+
type: "object",
|
|
270
|
+
properties: {
|
|
271
|
+
class: {
|
|
272
|
+
type: "string"
|
|
273
|
+
},
|
|
274
|
+
style: {
|
|
275
|
+
type: "string"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
default: {}
|
|
279
|
+
},
|
|
280
|
+
binding: {
|
|
281
|
+
description: "",
|
|
282
|
+
type: "object",
|
|
283
|
+
default: {}
|
|
284
|
+
},
|
|
285
|
+
disabled: {
|
|
286
|
+
description: "",
|
|
287
|
+
type: "boolean",
|
|
288
|
+
default: !1
|
|
289
|
+
},
|
|
290
|
+
textField: {
|
|
291
|
+
description: "",
|
|
292
|
+
type: "string",
|
|
293
|
+
default: "name"
|
|
294
|
+
},
|
|
295
|
+
valueField: {
|
|
296
|
+
description: "",
|
|
297
|
+
type: "string",
|
|
298
|
+
default: "value"
|
|
299
|
+
},
|
|
300
|
+
dataSourceType: {
|
|
301
|
+
description: "",
|
|
302
|
+
type: "string",
|
|
303
|
+
default: "static"
|
|
304
|
+
},
|
|
305
|
+
data: {
|
|
306
|
+
description: "",
|
|
307
|
+
type: "array"
|
|
308
|
+
},
|
|
309
|
+
bindDataSource: {
|
|
310
|
+
description: "",
|
|
311
|
+
type: "string",
|
|
312
|
+
default: ""
|
|
313
|
+
},
|
|
314
|
+
readonly: {
|
|
315
|
+
description: "",
|
|
316
|
+
type: "boolean",
|
|
317
|
+
default: !1
|
|
318
|
+
},
|
|
319
|
+
tabindex: {
|
|
320
|
+
description: "",
|
|
321
|
+
type: "number",
|
|
322
|
+
default: -1
|
|
323
|
+
},
|
|
324
|
+
separator: {
|
|
325
|
+
description: "",
|
|
326
|
+
type: "string",
|
|
327
|
+
default: ","
|
|
328
|
+
},
|
|
329
|
+
name: {
|
|
330
|
+
description: "",
|
|
331
|
+
type: "string",
|
|
332
|
+
default: ""
|
|
333
|
+
},
|
|
334
|
+
required: {
|
|
335
|
+
description: "",
|
|
336
|
+
type: "boolean",
|
|
337
|
+
default: !1
|
|
338
|
+
},
|
|
339
|
+
direction: {
|
|
340
|
+
description: "",
|
|
341
|
+
type: "string",
|
|
342
|
+
default: "horizontal"
|
|
343
|
+
},
|
|
344
|
+
"onUpdate:modelValue": {
|
|
345
|
+
description: "",
|
|
346
|
+
type: "object"
|
|
347
|
+
}
|
|
348
|
+
}, K = [
|
|
349
|
+
"type"
|
|
350
|
+
], L = [
|
|
351
|
+
"id",
|
|
352
|
+
"appearance",
|
|
353
|
+
"binding",
|
|
354
|
+
"visible"
|
|
355
|
+
], Q = {
|
|
356
|
+
$schema: z,
|
|
357
|
+
$id: N,
|
|
358
|
+
title: H,
|
|
359
|
+
description: U,
|
|
360
|
+
type: _,
|
|
361
|
+
properties: J,
|
|
362
|
+
required: K,
|
|
363
|
+
ignore: L
|
|
364
|
+
}, C = T(
|
|
365
|
+
I,
|
|
366
|
+
Q,
|
|
367
|
+
$,
|
|
368
|
+
q
|
|
369
|
+
);
|
|
370
|
+
v.register = (e, t, n, l) => {
|
|
371
|
+
e["check-group"] = G, t["check-group"] = C;
|
|
372
|
+
};
|
|
373
|
+
v.registerDesigner = (e, t, n) => {
|
|
374
|
+
e["check-group"] = v, t["check-group"] = C;
|
|
375
|
+
};
|
|
376
|
+
const te = V(v);
|
|
377
|
+
export {
|
|
378
|
+
v as FCheckboxGroupDesigner,
|
|
379
|
+
C as checkBoxGroupPropsResolver,
|
|
380
|
+
te as default
|
|
381
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(a,m){typeof exports=="object"&&typeof module<"u"?m(exports,require("../../components/common/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js"),require("../../components/checkbox-group/index.umd.js"),require("vue"),require("../../components/designer-canvas/index.umd.js"),require("../../components/property-panel/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/common/index.umd.js","../../components/dynamic-resolver/index.umd.js","../../components/checkbox-group/index.umd.js","vue","../../components/designer-canvas/index.umd.js","../../components/property-panel/index.umd.js"],m):(a=typeof globalThis<"u"?globalThis:a||self,m(a["checkbox-group"]={},a.common,a.dynamicResolver,a.FCheckboxGroup,a.Vue,a.designerCanvas,a.propertyPanel))})(this,function(a,m,S,C,r,V,P){"use strict";const F={...m.radioCheckboxCommonProps,id:String,disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},enumData:{type:Array,default:[]},data:{type:Array,default:[]},isStringValue:{type:Boolean,default:!0},loadData:{type:Function},modelValue:[String,Array],name:{type:String,default:""},separator:{type:String,default:","},tabIndex:{type:Number,default:0},textField:{type:String,default:"name"},valueField:{type:String,default:"value"}};function j(e,t,n){const l=r.computed(()=>!(e.readonly&&e.disabled)),c=r.ref(e.data||e.enumData||e.options);function d(o){return o[e.valueField]}function v(o){return o[e.textField]}function h(o){return o?e.isStringValue?o.split(e.separator):o:[]}function y(o){const s=c.value.map(i=>d(i)).filter(i=>o.some(u=>u===String(i)));return e.isStringValue?s.join(e.separator):s}function k(o){const p=String(d(o));return h(n.value).some(i=>i===p)}function x(o,p){if(l.value){let s=h(n.value)||[];const i=String(d(o));!s||!s.length?s.push(i):s.some(u=>u===i)?s=s.filter(u=>u!==i):s.push(i),n.value=y(s),t.emit("changeValue",n.value),t.emit("update:modelValue",n.value)}p.stopPropagation()}return r.watch(()=>e.data,()=>{c.value=e.data}),r.watch(()=>e.enumData,()=>{c.value=e.enumData}),{enumData:c,getValue:d,getText:v,checked:k,onClickCheckbox:x}}class T extends P.InputBaseProperty{constructor(t,n){super(t,n)}getEditorProperties(t){const n=this;return n.getComponentConfig(t,{type:"check-group"},{placeholder:{visible:!1},disabled:{visible:!1},direction:{description:"",title:"排列方向",type:"enum",editor:{data:[{id:"horizontal",name:"横向"},{id:"vertical",name:"纵向"}]}},dataSourceType:{description:"",title:"数据源类型",type:"enum",visible:!1,editor:{default:"static",data:[{id:"static",name:"静态"},{id:"dynamic",name:"动态"}]},refreshPanelAfterChanged:!0},data:{description:"",title:"数据",type:"array",visible:!t.editor.dataSourceType||t.editor.dataSourceType==="static",...n.getItemCollectionEditor(t,t.editor.valueField,t.editor.textField),refreshPanelAfterChanged:!0},bindDataSource:{description:"",title:"绑定数据源",type:"string",visible:t.editor.dataSourceType==="dynamic"},textField:{description:"",title:"文本字段",type:"string",readonly:t.editor.dataSourceType!=="dynamic"},valueField:{description:"",title:"值字段",type:"string",readonly:t.editor.dataSourceType!=="dynamic"}},(c,d)=>{if(c)switch(c.propertyID){case"dataSourceType":{c.propertyValue==="static"&&(t.editor.valueField="value",t.editor.textField="name");break}case"data":{t.formatter&&(t.formatter.data=[...c.propertyValue]);break}}})}}function G(e,t){const n=e.schema;function l(c,d){return new T(c,t).getPropertyConfig(n,d)}return{getPropsConfig:l}}const g=r.defineComponent({name:"FCheckboxGroupDesign",props:F,emits:["changeValue","update:modelValue"],setup(e,t){const n=r.ref(e.modelValue),l=r.ref(e.name),c=r.computed(()=>({"farris-checkradio-hor":e.direction==="horizontal"})),{enumData:d,getValue:v,getText:h}=j(e,t,n),y=r.ref(),k=r.inject("designer-host-service"),x=r.inject("design-item-context"),o=G(x,k),p=V.useDesignerComponent(y,x,o);r.onMounted(()=>{y.value.componentInstance=p});const s=r.computed(()=>{if(!d.value||d.value.length===0){const i=[];return[{value:"example1",name:"示例一"},{value:"example2",name:"示例二"}].map(u=>{const f={};f[e.valueField]=u.value,f[e.textField]=u.name,i.push(f)}),i}return d.value});return t.expose(p.value),r.watch(()=>e.modelValue,i=>{n.value=i,t.emit("changeValue",n.value)}),()=>r.createVNode("div",{ref:y,class:["farris-input-wrap",c.value]},[s.value.map((i,u)=>{const f="checkbox_"+l.value+u;return r.createVNode("div",{class:"custom-control custom-checkbox"},[r.createVNode("input",{type:"checkbox",class:"custom-control-input",name:l.value,id:f,value:v(i),checked:!1,readonly:!0,disabled:!0},null),r.createVNode("label",{class:"custom-control-label",for:f,title:h(i)},[h(i)])])})])}}),q=new Map([["appearance",S.resolveAppearance]]);function R(e,t,n){return t}const I={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/check-box.schema.json",title:"check-group",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a check box",type:"string"},type:{description:"The type string of check box component",type:"string",default:"check-group"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disabled:{description:"",type:"boolean",default:!1},textField:{description:"",type:"string",default:"name"},valueField:{description:"",type:"string",default:"value"},dataSourceType:{description:"",type:"string",default:"static"},data:{description:"",type:"array"},bindDataSource:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},separator:{description:"",type:"string",default:","},name:{description:"",type:"string",default:""},required:{description:"",type:"boolean",default:!1},direction:{description:"",type:"string",default:"horizontal"},"onUpdate:modelValue":{description:"",type:"object"}},required:["type"],ignore:["id","appearance","binding","visible"]},b=S.createPropsResolver(C.checkboxGroupProps,I,q,R);g.register=(e,t,n,l)=>{e["check-group"]=C,t["check-group"]=b},g.registerDesigner=(e,t,n)=>{e["check-group"]=g,t["check-group"]=b};const w=m.withInstall(g);a.FCheckboxGroupDesigner=g,a.checkBoxGroupPropsResolver=b,a.default=w,Object.defineProperties(a,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.fade-enter-active,.fade-leave-active{transition:opacity .5s ease}.fade-enter-from,.fade-leave-to{opacity:0}.fv-resizable-handle{position:absolute;font-size:.1px;display:block;touch-action:none}.fv-resizable-handle:hover{background:transparent}.fv-resizable-handle.fv-resizable-n{cursor:n-resize;height:.4375rem;width:100%;top:-.3125rem;left:0}.fv-resizable-handle.fv-resizable-e{cursor:e-resize;width:.4375rem;right:-.3125rem;height:100%;top:0}.fv-resizable-handle.fv-resizable-s{cursor:s-resize;height:.4375rem;width:100%;bottom:-.3125rem;left:0}.fv-resizable-handle.fv-resizable-w{cursor:w-resize;height:100%;width:.4375rem;left:-.3125rem;top:0}.fv-resizable-handle.fv-resizable-ne{cursor:ne-resize;width:.75rem;height:.75rem;right:1px;top:1px}.fv-resizable-handle.fv-resizable-se{cursor:se-resize;width:.75rem;height:.75rem;right:1px;bottom:1px}.fv-resizable-handle.fv-resizable-nw{cursor:nw-resize;width:.75rem;height:.75rem;left:1px;top:1px}.fv-resizable-handle.fv-resizable-sw{cursor:sw-resize;width:.75rem;height:.75rem;left:1px;bottom:1px}.property-item .form-group{margin-bottom:2px}.property-item .col-form-label{line-height:26px}.property-item .row-item{align-items:center}.wide-panel .row-item{display:flex}.wide-panel .row-item .component{flex:1 1 0}.wide-panel .row-item label{width:89px;text-align:right;padding-right:10px}.wrap{overflow:hidden;text-overflow:ellipsis}.propertyCascadeItem{background-color:transparent!important;border:none!important}.propertyCascadeItem .card-header{background-color:transparent!important;padding:4px 0!important;color:inherit!important}.propertyCascadeItem .card-header .panel-item-title{width:100%;position:relative;font-size:inherit!important}.propertyCascadeItem .card-header .panel-item-title .farris-input-wrap{margin-left:-5px;margin-right:-5px}.propertyCascadeItem .form-group .col-form-label .f-icon{color:#a3a3a3!important}.propertyCascadeItem .f-accordion-collapse,.propertyCascadeItem .f-accordion-expand{right:0;left:auto!important;top:6px;color:#6b94ec!important;position:absolute}.propertyCascadeItem .card-body{padding:3px 12px!important;background:#fffc;border-radius:8px;margin:4px 0}.propertyCascadeItem .card-body.hidden{display:none}.landscape{display:none;flex-shrink:0;align-items:center;justify-content:flex-end}.wide-panel .vertical{display:none}.wide-panel .landscape{display:block;padding:0;overflow:hidden}.wide-panel .line-item{display:flex}.wide-panel .line-item .f-header{margin-bottom:0}.wide-panel .line-item .f-section-formgroup-legend{width:89px;text-align:right;padding-right:13px}.wide-panel .line-item .farris-input-wrap{flex:1 1 0}:host{width:inherit;height:inherit}.property-panel{position:relative}.property-panel .switcher{position:absolute;top:9px;right:0;width:40px;text-align:center}.property-panel .switcher i{color:#4190ff;font-size:12px;cursor:pointer}.property-panel .side-panel{width:41px;background-color:#fff;padding-top:45px;text-align:center}.property-panel .side-panel .icon{display:block;text-align:center;color:#4190ff;margin-bottom:10px}.property-panel .side-panel span{writing-mode:vertical-rl;font-size:14px}.propertyPanel{width:300px;height:100%;color:#000000bf;background:#f3f8ff!important;border-color:#d8dbe2!important;display:flex}.propertyPanel .title{position:relative;background:#d0d8e9!important;flex-wrap:wrap;border:0}.propertyPanel .title.p-right{padding-right:40px}.propertyPanel .title>.title-label{line-height:34px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:12px;padding-right:12px;color:#333;font-size:13px;font-weight:600;cursor:pointer}.propertyPanel .title>.title-label.active{background:#8fb1df!important}.propertyPanel .title .title-actions{position:absolute;right:10px;top:0;padding-left:35px;height:35px;-ms-flex:1;flex:1;box-sizing:border-box}.propertyPanel .title .title-actions{position:absolute;right:10px;top:0}.propertyPanel .property-grid .group-label{line-height:30px;display:block;padding-left:13px;cursor:pointer;background:#e2e9f6!important;color:#435069!important;font-weight:600!important;border-radius:6px}.propertyPanel .search .textbox{padding-left:10px}.propertyPanel .search .input-group{border-radius:0}.propertyPanel .panel-body{overflow:auto;height:100%}.propertyPanel .property-grid{list-style:none;margin:0 10px;padding:0}.propertyPanel .property-grid li{padding:2px 0}.propertyPanel .panel-body .property-grid .group-label+div{padding-bottom:14px!important;padding-top:.25rem!important}.propertyPanel .action-item{cursor:pointer;display:inline-block;transition:transform 50ms ease;position:relative;padding:0}.propertyPanel .action-item>.f-icon{color:#424242bf;line-height:35px;font-weight:600}.propertyPanel .search .input-group-clear{border-radius:0!important}.white-theme .propertyPanel{background:#fff!important;border:1px solid #D8DCE6!important}.white-theme .propertyPanel .title{overflow:visible;background:#fff!important;justify-content:space-around}.white-theme .propertyPanel{background:#fff!important}.white-theme .propertyPanel .title{overflow:visible;background:#fff!important;flex-wrap:wrap;text-align:center}.white-theme .propertyPanel .title>.title-label{font-weight:400!important;border-bottom:0;background:#fff!important;flex:1;color:#83849b}.white-theme .propertyPanel .title>.title-label>span{padding:0 14px 7px}.white-theme .propertyPanel .title>.title-label.active>span{border-bottom:2px solid #5b89fe;color:#5b89fe;border-radius:1.5px}.white-theme .propertyPanel .title.only{text-align:left}.white-theme .propertyPanel .property-grid .group-label{background:#fff!important;line-height:30px;font-weight:400!important;font-size:13px;color:#3f4764!important;border-radius:6px;background:#eef4ff!important;color:#435069!important}.white-theme .propertyPanel .property-grid .group-label .f-icon{color:#5d89fe;font-size:13px}.fv-grid-disabled{color:#0000004d}.fv-grid-header-cell.fv-grid-header-cell-border:after{background-color:transparent}.exception_wrap{max-width:750px;display:flex;overflow:hidden;position:relative}.exception_error_msg{line-height:1.5;overflow:hidden;min-height:66px}.screenGroup{background:#ffffffe6;box-shadow:0 0 3px #024bc133;border-radius:8px;padding:2px 14px;margin:5px auto;flex:1 1 0!important}.screenGroup .screenName{width:90px;font-family:PingFangSC-Regular;font-size:14px;line-height:24px;color:#2a87ff;height:32px;padding:4px;text-align:left}.screenGroup .screen-input{flex:1 1 0}.screenGroup farris-combo-list{width:84px}.screenGroup .columnText{line-height:26px}.applyBtn{margin-top:5px;display:flex;justify-content:center}.applyBtn .btn{width:110px}.en .screenGroup{width:100%;flex-direction:column;align-items:flex-start}.en .screenGroup>div{width:100%;padding:0 10px 10px 0;margin-left:0!important}.en .screenGroup .screenName{width:auto}.en .screenGroup farris-combo-list{flex:1}.en .screenGroup .columnText{width:50px}.form-group-in-canvas .f-cmp-inputgroup .f-state-readonly .input-group-append{display:flex!important}.component-btn-group{flex-direction:row-reverse;position:absolute;z-index:800;background:#fff;display:none;top:-26px;right:0}.component-btn-group>div{position:fixed}.farris-component.farris-nested{padding-top:10px!important;padding-bottom:10px!important;border:dotted 2px #e8e8e8}.farris-component.farris-nested:not(.px-0){padding-right:10px!important;padding-left:10px!important}.farris-component.farris-nested.dgComponentFocused{border:dotted 2px #388fff}.farris-component.can-move{padding:2px}.farris-component.dgComponentSelected>.component-btn-group{display:flex}.component-btn-group .component-settings-button{display:flex;cursor:pointer;float:right;margin-left:4px;padding:0!important;font-size:10px;line-height:1.2em;border-radius:2px 2px 0 0;width:24px!important;height:24px!important;color:#fff!important;background:#388fff!important}.component-btn-group .component-settings-button+.component-settings-button{margin-left:4px!important}.component-btn-group .component-settings-button:last-child{margin-left:0!important}.component-btn-group .component-settings-button .f-icon{font-size:18px;margin:0 auto;line-height:20px}.component-btn-group .component-settings-button .f-icon.f-icon-yxs_move{cursor:move}.farris-component-content-container .drag-container{display:inherit;flex-direction:inherit;flex-shrink:1;flex-grow:1;flex-basis:0%;flex-wrap:inherit;justify-content:inherit;align-items:inherit;width:100%;overflow:inherit;height:inherit}.gu-mirror{position:fixed!important;margin:0!important;z-index:9999!important;opacity:.8;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)";filter:alpha(opacity=80)}.gu-mirror.undroppable .component-settings-button .f-icon-yxs_move{cursor:no-drop}.component-btn-group .component-settings-button .f-icon.f-icon-yxs_delete{color:#fff!important;background:#388fff!important}.gu-hide{display:none!important}.gu-unselectable{-webkit-user-select:none!important;-moz-user-select:none!important;-ms-user-select:none!important;user-select:none!important}.gu-transit{opacity:.2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)";filter:alpha(opacity=20)}.drag-over:not(.no-drop){background-color:#f3f8ff!important}.gu-unselectable .farris-component.dgComponentSelected>.component-btn-group{display:none}.gu-unselectable .gu-mirror.farris-component.dgComponentSelected>.component-btn-group{display:flex}.gu-transit.farris-component.dgComponentSelected>.component-btn-group{display:none}.gu-mirror.farris-component.dgComponentSelected{position:fixed!important}.gu-mirror.farris-component.dgComponentSelected>.component-btn-group>div{position:relative;top:0!important;left:0!important}.gu-mirror.farris-component.dgComponentSelected>.component-btn-group{width:max-content}.dgComponentFocused{border-top:2px dotted #388fff!important;border-left:2px dotted #388fff!important;border-right:2px dotted #388fff!important;border-bottom:2px dotted #388fff!important}.dgComponentSelected{border-top:2px solid #388fff!important;border-left:2px solid #388fff!important;border-right:2px solid #388fff!important;border-bottom:2px solid #388fff!important}.editorDiv{background-color:#dbe6f7;overflow-x:auto}.editorPanel{position:relative;height:100%;min-width:900px}.editorDiv .editorPanel.Mobile{min-width:414px;width:414px;margin:20px auto;height:calc(100% - 40px)}.editorDiv .f-struct-like-card{display:block}.editorDiv .farris-tabs.f-tabs-content-fill .f-struct-is-subgrid .f-grid-is-sub{width:100%}.ide-framework .cdk-overlay-container{z-index:1100}.editorDiv .f-struct-wrapper{margin-bottom:15px}.f-struct-wrapper+.f-struct-wrapper{position:relative;display:inherit;margin-bottom:15px}.f-page-is-mainsubcard .f-page-main .f-struct-wrapper{background:#fff}.editorDiv .f-page-navigate .f-page{position:absolute!important}.editorDiv .f-page-navigate .f-page.f-page-card .f-page-main>.drag-container{display:block;overflow:unset}.editorDiv .f-page.f-page-navigate.f-page-is-listnav-with-header .f-page-main .f-page-content-main{display:block}.editorDiv .f-page-has-scheme .f-page-main.farris-component{margin-top:0}.f-struct-subsub-wrapper{padding-top:0!important}.gu-mirror.undroppable{cursor:no-drop}.gu-insertion{position:fixed;z-index:840!important;pointer-events:none!important;background-color:#388fff;height:4px;overflow:hidden}.editorPanel .f-page .f-page-main{margin-right:.5rem!important;margin-left:.5rem!important;margin-bottom:.5rem!important}.editorPanel .f-page.f-page-is-listnav .f-page-main{margin-top:.5rem!important}.editorPanel .f-page .f-page-main .f-page-main{margin:0!important}.editorPanel .f-page.f-page-has-scheme .f-page-header{margin:0 .5rem}.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child{overflow:hidden}.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section-in-mainsubcard,.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section-in-main{height:100%}.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section.f-section-fill>.f-section-content{flex-basis:0%}.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section .f-component-tabs .f-tabs-content-fill{overflow:hidden}.f-page-child-fill .f-struct-wrapper.f-struct-wrapper-child .f-section .f-component-tabs .f-tabs-content-fill .farris-tabs-body>.farris-component-component{flex:1}.component-btn-group .settings-button-extend{padding:0 0 0 2px!important;width:auto!important;display:flex;align-items:center}.settings-button-extend .icon-text{margin:0 4px;font-size:13px;line-height:unset}.f-section-scheme{background:#fff;margin:.5625rem .5rem 0}.farris-component-tabs .farris-tabs-content.f-utils-fill-flex-column .farris-component-tab-page:has(.farris-tab-page-active){display:flex!important;overflow:hidden;flex-shrink:1;flex-grow:1;flex-basis:0;flex-direction:column!important}.response-layout{border:dotted 2px #e8e8e8}.response-layout .response-layout-item{border-right:dotted 2px #e8e8e8}.response-layout .response-layout-item:not(:last-child){padding-right:8px!important}.f-navlookup-recommandLabel{height:18px;font-family:PingFangSC-Regular;font-size:13px;color:#3d4c6b;font-weight:400;cursor:pointer}.f-navlookup-recentHeader{height:32px;background:#fafaff;width:100%;display:flex;align-items:center;padding-left:10px;cursor:pointer;border:1px solid rgba(233,236,243,1)}
|