@farris/ui-vue 1.7.4 → 1.7.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 +2 -2
- package/components/avatar/index.umd.cjs +1 -1
- package/components/component/index.esm.js +102 -102
- package/components/component/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4 -2
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +393 -392
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +102 -102
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +2 -2
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/image/index.esm.js +2 -2
- package/components/image/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4 -2
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +156 -156
- package/components/number-range/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +2 -2
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1 -1
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +1 -1
- package/components/tree-grid/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +62 -61
- package/designer/data-grid/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +351 -349
- package/designer/farris-designer.all.umd.cjs +4 -4
- package/designer/radio-group/index.esm.js +2 -2
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +1 -1
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +142 -142
- package/designer/tabs/index.umd.cjs +1 -1
- package/designer/time-picker/index.esm.js +2 -2
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +1 -1
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +2821 -2819
- package/farris.all.umd.cjs +25 -25
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +2 -14
- package/types/data-view/composition/types.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var ie = Object.defineProperty;
|
|
2
|
-
var ne = (
|
|
3
|
-
var y = (
|
|
2
|
+
var ne = (o, n, e) => n in o ? ie(o, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[n] = e;
|
|
3
|
+
var y = (o, n, e) => ne(o, typeof n != "symbol" ? n + "" : n, e);
|
|
4
4
|
import { computed as M, ref as N, createVNode as E, defineComponent as _, onMounted as H, watch as G, createTextVNode as J, nextTick as re, inject as D } from "vue";
|
|
5
5
|
import { resolveAppearance as se, createPropsResolver as oe } from "../dynamic-resolver/index.esm.js";
|
|
6
6
|
import I from "bignumber.js";
|
|
@@ -8,7 +8,7 @@ import { useNumberLocales as le } from "../number-spinner/index.esm.js";
|
|
|
8
8
|
import { DgControl as p, canvasChanged as R, refreshCanvas as ae, useDesignerComponent as de } from "../designer-canvas/index.esm.js";
|
|
9
9
|
import { cloneDeep as ue } from "lodash-es";
|
|
10
10
|
import { FormSchemaEntityField$Type as K, FormSchemaEntityFieldType$Type as ce, withInstall as pe } from "../common/index.esm.js";
|
|
11
|
-
function ge(
|
|
11
|
+
function ge(o, n, e) {
|
|
12
12
|
return n;
|
|
13
13
|
}
|
|
14
14
|
const me = /* @__PURE__ */ new Map([
|
|
@@ -242,8 +242,8 @@ const me = /* @__PURE__ */ new Map([
|
|
|
242
242
|
*/
|
|
243
243
|
useThousands: { type: Boolean, default: !0 }
|
|
244
244
|
}, Q = oe(W, xe, me, ge);
|
|
245
|
-
function Y(
|
|
246
|
-
const e = M(() => Number(
|
|
245
|
+
function Y(o, n) {
|
|
246
|
+
const e = M(() => Number(o.precision) || 0);
|
|
247
247
|
function t(l) {
|
|
248
248
|
return l.toFixed(e.value);
|
|
249
249
|
}
|
|
@@ -251,22 +251,22 @@ function Y(s, n) {
|
|
|
251
251
|
return isNaN(l) || l === null || l === void 0 || l === "";
|
|
252
252
|
}
|
|
253
253
|
function r(l) {
|
|
254
|
-
const d = i(
|
|
254
|
+
const d = i(o.max) ? null : new I(String(o.max), 10), u = i(o.min) ? null : new I(String(o.min), 10);
|
|
255
255
|
return d && l.gt(d) ? d : u && l.lt(u) ? u : l;
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function s(l, d, u, a) {
|
|
258
258
|
const g = new I(l, 10), f = i(u && u.value) ? null : new I(String(u.value), 10), m = i(d && d.value) ? null : new I(String(d.value), 10);
|
|
259
259
|
let h;
|
|
260
260
|
return a ? h = f && g.gt(f) ? f : g : h = m && g.lt(m) ? m : g, h.toString();
|
|
261
261
|
}
|
|
262
262
|
function c(l, d = !0) {
|
|
263
|
-
if (
|
|
264
|
-
return isNaN(Number(l)) ?
|
|
263
|
+
if (o.parser)
|
|
264
|
+
return isNaN(Number(l)) ? o.parser(l) : l;
|
|
265
265
|
let u = new I(l, 10);
|
|
266
266
|
if (d && (u = r(u)), u.isNaN()) {
|
|
267
|
-
if (
|
|
267
|
+
if (o.nullable)
|
|
268
268
|
return null;
|
|
269
|
-
const g = new I("" +
|
|
269
|
+
const g = new I("" + o.min, 10), f = new I("" + o.max, 10);
|
|
270
270
|
if (!g.isNaN())
|
|
271
271
|
u = g;
|
|
272
272
|
else if (!f.isNaN())
|
|
@@ -276,48 +276,48 @@ function Y(s, n) {
|
|
|
276
276
|
}
|
|
277
277
|
return t(u);
|
|
278
278
|
}
|
|
279
|
-
return { getRealValue: c, isEmpty: i, precision: e, getValidNumberObject: r, getValidNumberInRange:
|
|
279
|
+
return { getRealValue: c, isEmpty: i, precision: e, getValidNumberObject: r, getValidNumberInRange: s };
|
|
280
280
|
}
|
|
281
|
-
function ee(
|
|
281
|
+
function ee(o, n, e) {
|
|
282
282
|
const t = M(() => ({
|
|
283
|
-
prefix:
|
|
284
|
-
suffix:
|
|
285
|
-
decimalSeparator:
|
|
286
|
-
groupSeparator:
|
|
287
|
-
groupSize:
|
|
283
|
+
prefix: o.prefix,
|
|
284
|
+
suffix: o.suffix,
|
|
285
|
+
decimalSeparator: o.decimalSeparator,
|
|
286
|
+
groupSeparator: o.useThousands ? o.groupSeparator : "",
|
|
287
|
+
groupSize: o.groupSize
|
|
288
288
|
})), { getValidNumberObject: i, precision: r } = e;
|
|
289
|
-
function
|
|
290
|
-
return d = d == null || d === "" ? "" : String(d), d = d.replace(new RegExp(
|
|
289
|
+
function s(d) {
|
|
290
|
+
return d = d == null || d === "" ? "" : String(d), d = d.replace(new RegExp(o.prefix, "g"), "").replace(new RegExp(o.suffix, "g"), "").replace(/,/g, ""), o.groupSeparator && o.groupSeparator !== "," && (d = d.replace(new RegExp(`\\${o.groupSeparator}`, "g"), "")), o.decimalSeparator && o.decimalSeparator !== "." && (d = d.replace(new RegExp(`\\${o.decimalSeparator}`, "g"), ".")), d;
|
|
291
291
|
}
|
|
292
292
|
function c(d, u) {
|
|
293
|
-
return
|
|
293
|
+
return o.precision !== null && o.precision !== void 0 ? d.toFormat(r.value, u) : d.toFormat(u);
|
|
294
294
|
}
|
|
295
295
|
function l(d, u = !0) {
|
|
296
|
-
const a =
|
|
296
|
+
const a = s(d), g = new I(a, 10);
|
|
297
297
|
let f = g;
|
|
298
|
-
return u && (f = i(g)), f.valueOf() === "0" && !
|
|
298
|
+
return u && (f = i(g)), f.valueOf() === "0" && !o.showZero || f.isNaN() ? "" : o.formatter ? o.formatter(f.toNumber()) : c(f, t.value);
|
|
299
299
|
}
|
|
300
|
-
return { cleanFormat:
|
|
300
|
+
return { cleanFormat: s, format: l };
|
|
301
301
|
}
|
|
302
|
-
function A(
|
|
302
|
+
function A(o, n, e, t, i, r, s, c, l, d) {
|
|
303
303
|
const { format: u } = i, { getRealValue: a, getValidNumberInRange: g } = r;
|
|
304
304
|
function f() {
|
|
305
305
|
const v = new I(t.value || 0);
|
|
306
|
-
return !((
|
|
306
|
+
return !((o.max || o.max === 0) && !new I(o.max).isNaN() && v.gte(new I(o.max)) && (t.value || t.value === 0));
|
|
307
307
|
}
|
|
308
308
|
function m() {
|
|
309
309
|
const v = new I(t.value || 0);
|
|
310
|
-
return !((
|
|
310
|
+
return !((o.min || o.min === 0) && !new I(o.min).isNaN() && v.lte(new I(o.min)) && (t.value || t.value === 0));
|
|
311
311
|
}
|
|
312
312
|
function h(v) {
|
|
313
|
-
if (
|
|
313
|
+
if (o.readonly || o.disabled)
|
|
314
314
|
return;
|
|
315
315
|
const k = v === "up" ? f : m, F = v === "up" ? "plus" : "minus";
|
|
316
316
|
if (k()) {
|
|
317
|
-
let P = new I(t.value || 0)[F](Number(
|
|
317
|
+
let P = new I(t.value || 0)[F](Number(o.step)).toFixed();
|
|
318
318
|
P = g(P, c, l, d);
|
|
319
319
|
const T = a(P);
|
|
320
|
-
e.value = u(P), t.value !== T && (t.value = T,
|
|
320
|
+
e.value = u(P), t.value !== T && (t.value = T, s(t.value));
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
function b() {
|
|
@@ -334,28 +334,28 @@ function A(s, n, e, t, i, r, o, c, l, d) {
|
|
|
334
334
|
}
|
|
335
335
|
return { canDownward: m, canUpward: f, downward: C, onClickDownButton: V, onClickUpButton: w, upward: b };
|
|
336
336
|
}
|
|
337
|
-
function O(
|
|
338
|
-
const { cleanFormat: a, format: g } = i, { getRealValue: f, isEmpty: m, getValidNumberInRange: h } = r, { downward: b, upward: C } =
|
|
337
|
+
function O(o, n, e, t, i, r, s, c, l, d, u) {
|
|
338
|
+
const { cleanFormat: a, format: g } = i, { getRealValue: f, isEmpty: m, getValidNumberInRange: h } = r, { downward: b, upward: C } = s, w = M(() => e.value), V = N(!1);
|
|
339
339
|
function v(x) {
|
|
340
340
|
var z;
|
|
341
|
-
if (x.stopPropagation(),
|
|
341
|
+
if (x.stopPropagation(), o.readonly || o.disabled)
|
|
342
342
|
return;
|
|
343
343
|
V.value = !1;
|
|
344
344
|
let P = (z = x.target) == null ? void 0 : z.value;
|
|
345
|
-
|
|
345
|
+
o.nullable || (P = P || 0);
|
|
346
346
|
let T = a(P);
|
|
347
347
|
T = h(T, l, d, u);
|
|
348
348
|
const U = f(T);
|
|
349
349
|
e.value = g(T), t.value !== U && (t.value = U, c(t.value)), n.emit("blur", { event: x, formatted: e.value, value: t.value });
|
|
350
350
|
}
|
|
351
351
|
function k(x) {
|
|
352
|
-
x.stopPropagation(), !(
|
|
352
|
+
x.stopPropagation(), !(o.readonly || o.disabled) && (V.value = !0, e.value = m(t.value) || !o.showZero && t.value === "0" ? "" : String(t.value), n.emit("focus", { event: x, formatted: e.value, value: t.value }));
|
|
353
353
|
}
|
|
354
354
|
function F(x) {
|
|
355
355
|
var U;
|
|
356
356
|
x.stopPropagation();
|
|
357
357
|
let P = (U = x.target) == null ? void 0 : U.value;
|
|
358
|
-
|
|
358
|
+
o.nullable || (P = P || 0);
|
|
359
359
|
const T = a(P);
|
|
360
360
|
e.value = T, t.value = f(T), c(t.value);
|
|
361
361
|
}
|
|
@@ -364,18 +364,18 @@ function O(s, n, e, t, i, r, o, c, l, d, u) {
|
|
|
364
364
|
}
|
|
365
365
|
return { textBoxValue: w, onBlurTextBox: v, onFocusTextBox: k, onInput: F, onKeyDown: S, isTextBoxFocused: V };
|
|
366
366
|
}
|
|
367
|
-
function Z(
|
|
367
|
+
function Z(o, n, e, t, i) {
|
|
368
368
|
const {
|
|
369
369
|
onBlurTextBox: r,
|
|
370
|
-
onFocusTextBox:
|
|
370
|
+
onFocusTextBox: s,
|
|
371
371
|
onInput: c,
|
|
372
372
|
onKeyDown: l,
|
|
373
373
|
textBoxValue: d
|
|
374
|
-
} = e, u = M(() =>
|
|
374
|
+
} = e, u = M(() => o.disabled || o.readonly || !o.editable ? "" : t ? i.range.begin : i.range.end), a = M(() => ({
|
|
375
375
|
"form-control": !0,
|
|
376
376
|
"sub-input": !0
|
|
377
377
|
})), g = M(() => ({
|
|
378
|
-
"text-align":
|
|
378
|
+
"text-align": o.textAlign
|
|
379
379
|
}));
|
|
380
380
|
function f(m) {
|
|
381
381
|
m.stopPropagation();
|
|
@@ -385,22 +385,22 @@ function Z(s, n, e, t, i) {
|
|
|
385
385
|
style: g.value,
|
|
386
386
|
type: "text",
|
|
387
387
|
value: d.value,
|
|
388
|
-
disabled:
|
|
389
|
-
readonly:
|
|
388
|
+
disabled: o.disabled,
|
|
389
|
+
readonly: o.readonly || !o.editable,
|
|
390
390
|
placeholder: u.value,
|
|
391
391
|
onBlur: r,
|
|
392
392
|
onChange: f,
|
|
393
|
-
onFocus:
|
|
393
|
+
onFocus: s,
|
|
394
394
|
onInput: c,
|
|
395
395
|
onKeydown: l
|
|
396
396
|
}, null);
|
|
397
397
|
}
|
|
398
|
-
function q(
|
|
398
|
+
function q(o, n, e) {
|
|
399
399
|
const {
|
|
400
400
|
canDownward: t,
|
|
401
401
|
canUpward: i,
|
|
402
402
|
onClickDownButton: r,
|
|
403
|
-
onClickUpButton:
|
|
403
|
+
onClickUpButton: s
|
|
404
404
|
} = e, c = M(() => ({
|
|
405
405
|
"input-group-append": !0,
|
|
406
406
|
"btn-group": !0,
|
|
@@ -422,7 +422,7 @@ function q(s, n, e) {
|
|
|
422
422
|
}, [E("button", {
|
|
423
423
|
class: l.value,
|
|
424
424
|
style: d.value,
|
|
425
|
-
onClick:
|
|
425
|
+
onClick: s,
|
|
426
426
|
disabled: !i()
|
|
427
427
|
}, [E("span", {
|
|
428
428
|
class: "f-icon f-icon-arrow-chevron-up number-arrow-chevron"
|
|
@@ -439,30 +439,30 @@ const $ = /* @__PURE__ */ _({
|
|
|
439
439
|
name: "FNumberRange",
|
|
440
440
|
props: W,
|
|
441
441
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
442
|
-
setup(
|
|
443
|
-
const e = N(
|
|
442
|
+
setup(o, n) {
|
|
443
|
+
const e = N(o.beginValue), t = N(""), i = N(o.endValue), r = N(""), s = Y(o), c = ee(o, n, s), l = le(o), d = (F) => {
|
|
444
444
|
n.emit("beginValueChange", F);
|
|
445
|
-
}, u = A(
|
|
445
|
+
}, u = A(o, n, t, e, c, s, d, e, i, !0), a = O(o, n, t, e, c, s, u, d, e, i, !0), g = q(o, n, u), f = Z(o, n, a, !0, l), m = (F) => {
|
|
446
446
|
n.emit("endValueChange", F);
|
|
447
|
-
}, h = A(
|
|
447
|
+
}, h = A(o, n, r, i, c, s, m, e, i, !1), b = O(o, n, r, i, c, s, h, m, e, i, !1), C = q(o, n, h), w = Z(o, n, b, !1, l), {
|
|
448
448
|
getRealValue: V
|
|
449
|
-
} =
|
|
449
|
+
} = s, {
|
|
450
450
|
format: v
|
|
451
|
-
} = c, k = M(() => !
|
|
451
|
+
} = c, k = M(() => !o.disabled && !o.readonly && o.showButton);
|
|
452
452
|
return H(() => {
|
|
453
|
-
const F = V(
|
|
453
|
+
const F = V(o.beginValue, !1), S = V(o.endValue, !1);
|
|
454
454
|
t.value = v(F, !1), r.value = v(S, !1);
|
|
455
|
-
}), G(() => [
|
|
455
|
+
}), G(() => [o.beginValue], ([F]) => {
|
|
456
456
|
if (!a.isTextBoxFocused.value) {
|
|
457
457
|
const S = V(F, !1);
|
|
458
458
|
e.value = S, t.value = v(S, !1);
|
|
459
459
|
}
|
|
460
|
-
}), G(() => [
|
|
460
|
+
}), G(() => [o.endValue], ([F]) => {
|
|
461
461
|
if (!b.isTextBoxFocused.value) {
|
|
462
462
|
const S = V(F, !1);
|
|
463
463
|
i.value = S, r.value = v(S, !1);
|
|
464
464
|
}
|
|
465
|
-
}), G(() => [
|
|
465
|
+
}), G(() => [o.precision, o.useThousands, o.prefix, o.suffix, o.showZero], () => {
|
|
466
466
|
t.value = v(e.value), r.value = v(i.value);
|
|
467
467
|
}), () => E("div", {
|
|
468
468
|
class: "input-group number-range f-cmp-number-spinner"
|
|
@@ -477,18 +477,18 @@ const $ = /* @__PURE__ */ _({
|
|
|
477
477
|
}, [w(), k.value && C()])])]);
|
|
478
478
|
}
|
|
479
479
|
});
|
|
480
|
-
function X(
|
|
480
|
+
function X(o, n, e, t) {
|
|
481
481
|
const {
|
|
482
482
|
onBlurTextBox: i,
|
|
483
483
|
onFocusTextBox: r,
|
|
484
|
-
onInput:
|
|
484
|
+
onInput: s,
|
|
485
485
|
onKeyDown: c,
|
|
486
486
|
textBoxValue: l
|
|
487
|
-
} = e, d = M(() => t ?
|
|
487
|
+
} = e, d = M(() => t ? o.beginPlaceholder : o.endPlaceholder), u = M(() => ({
|
|
488
488
|
"form-control": !0,
|
|
489
489
|
"sub-input": !0
|
|
490
490
|
})), a = M(() => ({
|
|
491
|
-
"text-align":
|
|
491
|
+
"text-align": o.textAlign
|
|
492
492
|
}));
|
|
493
493
|
function g(f) {
|
|
494
494
|
f.stopPropagation();
|
|
@@ -498,18 +498,18 @@ function X(s, n, e, t) {
|
|
|
498
498
|
style: a.value,
|
|
499
499
|
type: "text",
|
|
500
500
|
value: l.value,
|
|
501
|
-
disabled:
|
|
502
|
-
readonly:
|
|
501
|
+
disabled: o.disabled,
|
|
502
|
+
readonly: o.readonly || !o.editable,
|
|
503
503
|
placeholder: d.value,
|
|
504
504
|
onBlur: i,
|
|
505
505
|
onChange: g,
|
|
506
506
|
onFocus: r,
|
|
507
|
-
onInput:
|
|
507
|
+
onInput: s,
|
|
508
508
|
onKeydown: c
|
|
509
509
|
}, null);
|
|
510
510
|
}
|
|
511
|
-
function Ve(
|
|
512
|
-
const { formSchemaUtils: n, formStateMachineUtils: e } =
|
|
511
|
+
function Ve(o) {
|
|
512
|
+
const { formSchemaUtils: n, formStateMachineUtils: e } = o;
|
|
513
513
|
function t(l, d = "") {
|
|
514
514
|
return {
|
|
515
515
|
path: d + l.code,
|
|
@@ -528,13 +528,13 @@ function Ve(s) {
|
|
|
528
528
|
const a = i(d, "root-component.");
|
|
529
529
|
return [...u, ...a];
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function s(l) {
|
|
532
532
|
return l.binding && l.binding.path || l.id || "";
|
|
533
533
|
}
|
|
534
534
|
function c() {
|
|
535
535
|
return e && e.getRenderStates() || [];
|
|
536
536
|
}
|
|
537
|
-
return { getVariables: r, getControlName:
|
|
537
|
+
return { getVariables: r, getControlName: s, getStateMachines: c };
|
|
538
538
|
}
|
|
539
539
|
class te {
|
|
540
540
|
constructor(n) {
|
|
@@ -585,11 +585,11 @@ class te {
|
|
|
585
585
|
required: "必填表达式"
|
|
586
586
|
});
|
|
587
587
|
y(this, "getExpressionConverter", (n, e) => ({
|
|
588
|
-
convertFrom: (t, i, r,
|
|
588
|
+
convertFrom: (t, i, r, s) => {
|
|
589
589
|
const c = r.getExpressionRuleValue(n, e || i);
|
|
590
590
|
return c && c.value || "";
|
|
591
591
|
},
|
|
592
|
-
convertTo: (t, i, r,
|
|
592
|
+
convertTo: (t, i, r, s, c) => {
|
|
593
593
|
var l;
|
|
594
594
|
if (i === "dataPicking" && (r != null && r.target)) {
|
|
595
595
|
const d = `${r.target}_dataPicking`;
|
|
@@ -597,7 +597,7 @@ class te {
|
|
|
597
597
|
(a) => a.id === d && a.value
|
|
598
598
|
)) ? t.dictPickingExpressionId = d : delete t.dictPickingExpressionId;
|
|
599
599
|
}
|
|
600
|
-
|
|
600
|
+
s.updateExpression(r);
|
|
601
601
|
}
|
|
602
602
|
}));
|
|
603
603
|
this.formSchemaService = n;
|
|
@@ -606,10 +606,10 @@ class te {
|
|
|
606
606
|
const t = this.formSchemaService.getExpressions();
|
|
607
607
|
if (!t)
|
|
608
608
|
return "";
|
|
609
|
-
const i = t.find((
|
|
609
|
+
const i = t.find((s) => s.target === n);
|
|
610
610
|
if (!i)
|
|
611
611
|
return "";
|
|
612
|
-
const r = i.rules.find((
|
|
612
|
+
const r = i.rules.find((s) => s.type === e);
|
|
613
613
|
return r || "";
|
|
614
614
|
}
|
|
615
615
|
// 获取上下文表单变量
|
|
@@ -644,10 +644,10 @@ class te {
|
|
|
644
644
|
return n == null || n.forEach((i) => {
|
|
645
645
|
var c;
|
|
646
646
|
const r = this.createTreeNode(i, e);
|
|
647
|
-
let
|
|
648
|
-
(c = i.type) != null && c.fields && (
|
|
647
|
+
let s = [];
|
|
648
|
+
(c = i.type) != null && c.fields && (s = this.buildEntityFieldsTreeData(i.type.fields, [...e, i.label])), t.push({
|
|
649
649
|
data: r,
|
|
650
|
-
children:
|
|
650
|
+
children: s,
|
|
651
651
|
expanded: !0
|
|
652
652
|
});
|
|
653
653
|
}), t;
|
|
@@ -658,10 +658,10 @@ class te {
|
|
|
658
658
|
var l, d;
|
|
659
659
|
const r = this.createTreeNode(i, e);
|
|
660
660
|
r.type = "entity";
|
|
661
|
-
const
|
|
662
|
-
c != null && c.length && (
|
|
661
|
+
const s = this.buildEntityFieldsTreeData((l = i.type) == null ? void 0 : l.fields, [...e, i.label]), c = this.buildChildEntityTreeData((d = i.type) == null ? void 0 : d.entities, [...e, i.label]);
|
|
662
|
+
c != null && c.length && (s == null || s.push(...c)), t.push({
|
|
663
663
|
data: r,
|
|
664
|
-
children:
|
|
664
|
+
children: s || [],
|
|
665
665
|
// 空值回退
|
|
666
666
|
expanded: !0
|
|
667
667
|
});
|
|
@@ -701,70 +701,70 @@ class te {
|
|
|
701
701
|
};
|
|
702
702
|
}
|
|
703
703
|
onBeforeOpenExpression(n, e, t) {
|
|
704
|
-
const i = t === "Field" ? n.binding.field : n.id, r = this.getExpressionRule(i, e),
|
|
704
|
+
const i = t === "Field" ? n.binding.field : n.id, r = this.getExpressionRule(i, e), s = this.getEntitiesAndVariables(), c = {
|
|
705
705
|
message: ["validate", "required", "dataPicking"].includes(e) && r ? r.message : "",
|
|
706
|
-
...
|
|
706
|
+
...s
|
|
707
707
|
};
|
|
708
708
|
return r.messageType != null && (c.messageType = r.messageType), c;
|
|
709
709
|
}
|
|
710
710
|
buildRule(n, e, t, i) {
|
|
711
|
-
const { expression: r, message:
|
|
711
|
+
const { expression: r, message: s, messageType: c } = e, l = {
|
|
712
712
|
id: `${n}_${t}`,
|
|
713
713
|
type: t,
|
|
714
714
|
value: r
|
|
715
715
|
};
|
|
716
|
-
return (t === "validate" || t === "dataPicking" || t === "required") && (l.message =
|
|
716
|
+
return (t === "validate" || t === "dataPicking" || t === "required") && (l.message = s), t === "dataPicking" && (l.messageType = c), t === "validate" && i && (l.elementId = i), l;
|
|
717
717
|
}
|
|
718
718
|
getExpressionData() {
|
|
719
719
|
const { expressions: n } = this.formSchemaService.getFormSchema().module;
|
|
720
720
|
return n || [];
|
|
721
721
|
}
|
|
722
722
|
updateExpression(n, e, t, i) {
|
|
723
|
-
const r = e === "Field" ? n.binding.field : n.id,
|
|
723
|
+
const r = e === "Field" ? n.binding.field : n.id, s = this.buildRule(r, t, i, n.type === "form-group" ? n.id : "");
|
|
724
724
|
let l = this.getExpressionData().find((u) => u.targetType === e && u.target === r);
|
|
725
725
|
const d = (u) => u.value.trim() === "";
|
|
726
726
|
if (l) {
|
|
727
|
-
const u = l.rules.find((a) => a.id ===
|
|
727
|
+
const u = l.rules.find((a) => a.id === s.id);
|
|
728
728
|
if (u)
|
|
729
|
-
d(
|
|
729
|
+
d(s) ? l.rules = l.rules.filter((a) => a.id !== s.id) : (Object.assign(u, s), i === "validate" && n.type === "form-group" && (u.elementId = n.id));
|
|
730
730
|
else {
|
|
731
|
-
if (d(
|
|
731
|
+
if (d(s))
|
|
732
732
|
return null;
|
|
733
|
-
l.rules = l.rules || [], l.rules.push(
|
|
733
|
+
l.rules = l.rules || [], l.rules.push(s);
|
|
734
734
|
}
|
|
735
735
|
} else {
|
|
736
|
-
if (d(
|
|
736
|
+
if (d(s))
|
|
737
737
|
return null;
|
|
738
738
|
l = {
|
|
739
739
|
target: `${r}`,
|
|
740
|
-
rules: [
|
|
740
|
+
rules: [s],
|
|
741
741
|
targetType: e
|
|
742
742
|
};
|
|
743
743
|
}
|
|
744
744
|
return l;
|
|
745
745
|
}
|
|
746
746
|
getExpressionEditorOptions(n, e, t, i) {
|
|
747
|
-
return t.reduce((r,
|
|
747
|
+
return t.reduce((r, s) => {
|
|
748
748
|
var l, d;
|
|
749
749
|
const c = e === "Field" ? (l = n == null ? void 0 : n.binding) == null ? void 0 : l.field : n.id;
|
|
750
|
-
return r[
|
|
750
|
+
return r[s] = {
|
|
751
751
|
hide: e === "Field" ? !!((d = n == null ? void 0 : n.binding) != null && d.field) : !1,
|
|
752
752
|
description: "",
|
|
753
|
-
title: this.expressionNames[
|
|
753
|
+
title: this.expressionNames[s],
|
|
754
754
|
type: "string",
|
|
755
755
|
$converter: this.getExpressionConverter(c),
|
|
756
756
|
refreshPanelAfterChanged: !0,
|
|
757
757
|
editor: {
|
|
758
758
|
type: "expression-editor",
|
|
759
759
|
singleExpand: !1,
|
|
760
|
-
dialogTitle: `${this.expressionNames[
|
|
761
|
-
showMessage:
|
|
762
|
-
showMessageType:
|
|
763
|
-
beforeOpen: () => this.onBeforeOpenExpression(n,
|
|
760
|
+
dialogTitle: `${this.expressionNames[s]}编辑器`,
|
|
761
|
+
showMessage: s === "validate" || s === "dataPicking" || s === "required",
|
|
762
|
+
showMessageType: s === "dataPicking",
|
|
763
|
+
beforeOpen: () => this.onBeforeOpenExpression(n, s, e),
|
|
764
764
|
onSubmitModal: (u) => {
|
|
765
|
-
const a = this.updateExpression(n, e, u,
|
|
765
|
+
const a = this.updateExpression(n, e, u, s);
|
|
766
766
|
if (i) {
|
|
767
|
-
const g = this.buildRule(c, u,
|
|
767
|
+
const g = this.buildRule(c, u, s);
|
|
768
768
|
i(g);
|
|
769
769
|
}
|
|
770
770
|
return a;
|
|
@@ -774,13 +774,13 @@ class te {
|
|
|
774
774
|
}, {});
|
|
775
775
|
}
|
|
776
776
|
getExpressionInfo(n, e, t) {
|
|
777
|
-
const i = e === "Field" ? n.binding.field : n.id, r = this.getExpressionRule(i, t),
|
|
777
|
+
const i = e === "Field" ? n.binding.field : n.id, r = this.getExpressionRule(i, t), s = {
|
|
778
778
|
value: r && r.value,
|
|
779
779
|
targetId: i,
|
|
780
780
|
targetType: e,
|
|
781
781
|
expressionType: t
|
|
782
782
|
};
|
|
783
|
-
return r && r.message && (
|
|
783
|
+
return r && r.message && (s.message = r.message), s;
|
|
784
784
|
}
|
|
785
785
|
getExpressionConfig(n, e, t = ["compute", "dependency", "validate"], i) {
|
|
786
786
|
return {
|
|
@@ -890,21 +890,21 @@ class Fe {
|
|
|
890
890
|
parentPropertyID: "appearance"
|
|
891
891
|
}
|
|
892
892
|
};
|
|
893
|
-
for (const
|
|
894
|
-
r[
|
|
893
|
+
for (const s in e)
|
|
894
|
+
r[s] = Object.assign(r[s] || {}, e[s]);
|
|
895
895
|
return {
|
|
896
896
|
...i,
|
|
897
897
|
properties: { ...r },
|
|
898
|
-
setPropertyRelates(
|
|
899
|
-
if (
|
|
900
|
-
switch (
|
|
898
|
+
setPropertyRelates(s, c) {
|
|
899
|
+
if (s) {
|
|
900
|
+
switch (s && s.propertyID) {
|
|
901
901
|
case "class":
|
|
902
902
|
case "style": {
|
|
903
903
|
R.value++;
|
|
904
904
|
break;
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
|
-
t && t(
|
|
907
|
+
t && t(s, n, c);
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
910
|
};
|
|
@@ -919,7 +919,7 @@ class Fe {
|
|
|
919
919
|
* @param expressionType 指定表达式类型,存在属性和表达式类型不一致的情况
|
|
920
920
|
* @returns
|
|
921
921
|
*/
|
|
922
|
-
getPropertyEditorParams(n, e = [], t = "visible", i = {}, r = {},
|
|
922
|
+
getPropertyEditorParams(n, e = [], t = "visible", i = {}, r = {}, s = "") {
|
|
923
923
|
const { getVariables: c, getControlName: l, getStateMachines: d } = Ve(this.designerHostService), u = this.getRealTargetType(n), a = e && e.length > 0 ? e : ["Const", "Variable", "StateMachine", "Expression"], g = {
|
|
924
924
|
type: "property-editor",
|
|
925
925
|
propertyTypes: a
|
|
@@ -933,7 +933,7 @@ class Fe {
|
|
|
933
933
|
}, i);
|
|
934
934
|
break;
|
|
935
935
|
case "Expression":
|
|
936
|
-
g.expressionConfig = this.getExpressionOptions(n, u,
|
|
936
|
+
g.expressionConfig = this.getExpressionOptions(n, u, s || t);
|
|
937
937
|
break;
|
|
938
938
|
case "StateMachine":
|
|
939
939
|
g.stateMachines = d();
|
|
@@ -975,13 +975,13 @@ class Fe {
|
|
|
975
975
|
const r = {
|
|
976
976
|
title: "行为",
|
|
977
977
|
description: ""
|
|
978
|
-
},
|
|
978
|
+
}, s = this.getVisibleProperty(n, e);
|
|
979
979
|
for (const l in t)
|
|
980
|
-
|
|
980
|
+
s[l] = Object.assign(s[l] || {}, t[l]);
|
|
981
981
|
const c = this;
|
|
982
982
|
return {
|
|
983
983
|
...r,
|
|
984
|
-
properties: { ...
|
|
984
|
+
properties: { ...s },
|
|
985
985
|
setPropertyRelates(l, d) {
|
|
986
986
|
if (l) {
|
|
987
987
|
switch (l.propertyID) {
|
|
@@ -1014,7 +1014,7 @@ class Fe {
|
|
|
1014
1014
|
const t = e && e.parent && e.parent.schema;
|
|
1015
1015
|
if (!t)
|
|
1016
1016
|
return;
|
|
1017
|
-
const i = t.contents.findIndex((
|
|
1017
|
+
const i = t.contents.findIndex((s) => s.id === n), r = ue(t.contents[i]);
|
|
1018
1018
|
t.contents.splice(i, 1), t.contents.splice(i, 0, r), ae();
|
|
1019
1019
|
}
|
|
1020
1020
|
/**
|
|
@@ -1027,7 +1027,7 @@ class Fe {
|
|
|
1027
1027
|
const t = n.propertyValue;
|
|
1028
1028
|
if (!(t && typeof t == "object") || !(t.type === "Variable" && t.isNewVariable))
|
|
1029
1029
|
return;
|
|
1030
|
-
const
|
|
1030
|
+
const s = {
|
|
1031
1031
|
id: t.field,
|
|
1032
1032
|
category: "locale",
|
|
1033
1033
|
code: t.fullPath,
|
|
@@ -1035,7 +1035,7 @@ class Fe {
|
|
|
1035
1035
|
type: t.newVariableType || "String",
|
|
1036
1036
|
isRtcVariable: this.designerContext.designerMode === "PC_RTC" ? !0 : void 0
|
|
1037
1037
|
};
|
|
1038
|
-
delete t.newVariableType, delete t.isNewVariable, this.formSchemaUtils.getVariableByCode(
|
|
1038
|
+
delete t.newVariableType, delete t.isNewVariable, this.formSchemaUtils.getVariableByCode(s.code) || this.formSchemaUtils.getViewModelById("root-viewmodel").states.push(s);
|
|
1039
1039
|
}
|
|
1040
1040
|
/**
|
|
1041
1041
|
* 更新表达式到expressions节点
|
|
@@ -1045,7 +1045,7 @@ class Fe {
|
|
|
1045
1045
|
const e = n.propertyValue;
|
|
1046
1046
|
if (!((e && e.type) === "Expression" && e.expressionInfo))
|
|
1047
1047
|
return;
|
|
1048
|
-
const { expressionId: r, expressionInfo:
|
|
1048
|
+
const { expressionId: r, expressionInfo: s } = e, { targetId: c, targetType: l, expressionType: d, value: u, message: a } = s, g = this.formSchemaUtils.getModule();
|
|
1049
1049
|
g.expressions = g.expressions || [];
|
|
1050
1050
|
const { expressions: f } = g;
|
|
1051
1051
|
let m = f.find((b) => b.target === c);
|
|
@@ -1069,7 +1069,7 @@ class Fe {
|
|
|
1069
1069
|
const t = n.propertyValue;
|
|
1070
1070
|
if (t && t.type === "Expression")
|
|
1071
1071
|
return;
|
|
1072
|
-
const r = n.propertyID,
|
|
1072
|
+
const r = n.propertyID, s = this.formSchemaUtils.getExpressions(), c = e.binding ? e.binding.field : e.id, l = s.find((d) => d.target === c);
|
|
1073
1073
|
!l || !l.rules || (l.rules = l.rules.filter((d) => d.type !== r));
|
|
1074
1074
|
}
|
|
1075
1075
|
getExpressionOptions(n, e, t) {
|
|
@@ -1102,7 +1102,7 @@ const B = class B {
|
|
|
1102
1102
|
let i = B.fieldControlTypeMapping[n];
|
|
1103
1103
|
if (t === "data-grid-column" && (i != null && i.length)) {
|
|
1104
1104
|
const r = [p["check-group"].type, p["radio-group"].type, p.image.type, p["rich-text-editor"].type];
|
|
1105
|
-
i = i.filter((
|
|
1105
|
+
i = i.filter((s) => !r.includes(s.key));
|
|
1106
1106
|
}
|
|
1107
1107
|
return i;
|
|
1108
1108
|
}
|
|
@@ -1185,7 +1185,7 @@ y(B, "fieldControlTypeMapping", {
|
|
|
1185
1185
|
]
|
|
1186
1186
|
});
|
|
1187
1187
|
let j = B;
|
|
1188
|
-
var L = /* @__PURE__ */ ((
|
|
1188
|
+
var L = /* @__PURE__ */ ((o) => (o.Form = "Form", o.Variable = "Variable", o))(L || {});
|
|
1189
1189
|
class Ee {
|
|
1190
1190
|
constructor() {
|
|
1191
1191
|
/** 控件标题 */
|
|
@@ -1216,7 +1216,7 @@ class Ee {
|
|
|
1216
1216
|
y(this, "fieldSetId", "");
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
|
-
function Ie(
|
|
1219
|
+
function Ie(o) {
|
|
1220
1220
|
let n, e;
|
|
1221
1221
|
const t = /* @__PURE__ */ new Map();
|
|
1222
1222
|
let i = [];
|
|
@@ -1229,11 +1229,11 @@ function Ie(s) {
|
|
|
1229
1229
|
let m = f.find((w) => /^col-([1-9]|10|11|12)$/.test(w)), h = f.find((w) => /^col-md-([1-9]|10|11|12)$/.test(w)), b = f.find((w) => /^col-xl-([1-9]|10|11|12)$/.test(w)), C = f.find((w) => /^col-el-([1-9]|10|11|12)$/.test(w));
|
|
1230
1230
|
m = m || "col-12", a.columnInSM = parseInt(m.replace("col-", ""), 10), a.displayWidthInSM = a.columnInSM / 12, a.displayWidthInSM !== 1 && (a.isSupportedClass = !1), h = h || "col-md-" + a.columnInSM, a.columnInMD = parseInt(h.replace("col-md-", ""), 10), a.displayWidthInMD = a.columnInMD / 6, [1, 2].includes(a.displayWidthInMD) || (a.isSupportedClass = !1), b = b || "col-xl-" + a.columnInMD, a.columnInLG = parseInt(b.replace("col-xl-", ""), 10), a.displayWidthInLG = a.columnInLG / 3, [1, 2, 3, 4].includes(a.displayWidthInLG) || (a.isSupportedClass = !1), C = C || "col-el-" + a.columnInLG, a.columnInEL = parseInt(C.replace("col-el-", ""), 10), a.displayWidthInEL = a.columnInEL / 2, [1, 2, 3, 4, 5, 6].includes(a.displayWidthInEL) || (a.isSupportedClass = !1);
|
|
1231
1231
|
}
|
|
1232
|
-
function
|
|
1232
|
+
function s(u, a, g, f = !1) {
|
|
1233
1233
|
let m = !1;
|
|
1234
1234
|
u.contents.forEach((h) => {
|
|
1235
1235
|
if (h.type === "fieldset") {
|
|
1236
|
-
g += 1,
|
|
1236
|
+
g += 1, s(h, a, g, !0), m = !0;
|
|
1237
1237
|
return;
|
|
1238
1238
|
}
|
|
1239
1239
|
m && (g += 1, m = !1);
|
|
@@ -1242,10 +1242,10 @@ function Ie(s) {
|
|
|
1242
1242
|
});
|
|
1243
1243
|
}
|
|
1244
1244
|
function c(u) {
|
|
1245
|
-
const a =
|
|
1245
|
+
const a = o.getComponentById(u);
|
|
1246
1246
|
if (!a || !a.componentType || !a.componentType.startsWith("form"))
|
|
1247
1247
|
return { result: !1, message: "只可以在响应式表单组件中调整响应式布局配置" };
|
|
1248
|
-
const g =
|
|
1248
|
+
const g = o.selectNode(a, (f) => f.type === p["response-form"].type);
|
|
1249
1249
|
return !g || !g.contents || g.contents.length === 0 ? { result: !1, message: "Form区域内没有控件,请先添加控件" } : { result: !0, message: "", formNode: g };
|
|
1250
1250
|
}
|
|
1251
1251
|
function l(u, a) {
|
|
@@ -1255,7 +1255,7 @@ function Ie(s) {
|
|
|
1255
1255
|
return { result: g, message: f };
|
|
1256
1256
|
e = u.id, i = [], t.clear();
|
|
1257
1257
|
const h = m.contents[0].type === p.fieldset.type ? 0 : 1;
|
|
1258
|
-
|
|
1258
|
+
s(m, i, h);
|
|
1259
1259
|
const b = i.find((w) => !w.isSupportedClass);
|
|
1260
1260
|
return {
|
|
1261
1261
|
defaultState: {
|
|
@@ -1289,7 +1289,7 @@ function Ie(s) {
|
|
|
1289
1289
|
checkCanFindFormNode: c,
|
|
1290
1290
|
checkCanOpenLayoutEditor: l,
|
|
1291
1291
|
changeFormControlsByResponseLayoutConfig: d,
|
|
1292
|
-
getResonseFormLayoutConfig:
|
|
1292
|
+
getResonseFormLayoutConfig: s
|
|
1293
1293
|
};
|
|
1294
1294
|
}
|
|
1295
1295
|
class Se extends Fe {
|
|
@@ -1319,7 +1319,7 @@ class Se extends Fe {
|
|
|
1319
1319
|
var d;
|
|
1320
1320
|
const r = this;
|
|
1321
1321
|
this.setDesignViewModelField(e);
|
|
1322
|
-
const { canChangeControlType:
|
|
1322
|
+
const { canChangeControlType: s, editorTypeList: c } = this.getAvailableEditorType(e), l = {
|
|
1323
1323
|
description: "Basic Information",
|
|
1324
1324
|
title: "基本信息",
|
|
1325
1325
|
properties: {
|
|
@@ -1342,7 +1342,7 @@ class Se extends Fe {
|
|
|
1342
1342
|
idField: "key",
|
|
1343
1343
|
editable: !1,
|
|
1344
1344
|
data: c,
|
|
1345
|
-
readonly: !
|
|
1345
|
+
readonly: !s
|
|
1346
1346
|
}
|
|
1347
1347
|
},
|
|
1348
1348
|
label: {
|
|
@@ -1416,7 +1416,7 @@ class Se extends Fe {
|
|
|
1416
1416
|
* 获取可选的编辑器类型
|
|
1417
1417
|
*/
|
|
1418
1418
|
getAvailableEditorType(e) {
|
|
1419
|
-
var r;
|
|
1419
|
+
var r, s;
|
|
1420
1420
|
const t = this.checkCanChangeControlType(e, this.viewModelId);
|
|
1421
1421
|
if (!t)
|
|
1422
1422
|
return {
|
|
@@ -1427,7 +1427,7 @@ class Se extends Fe {
|
|
|
1427
1427
|
}]
|
|
1428
1428
|
};
|
|
1429
1429
|
let i = [];
|
|
1430
|
-
return this.designViewModelField && this.designViewModelField.$type === K.SimpleField ? i = j.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (i = j.getEditorTypesByMDataType(this.bindingVarible.type, this.designViewModelField.multiLanguage)), { canChangeControlType: t, editorTypeList: i };
|
|
1430
|
+
return this.designViewModelField && this.designViewModelField.$type === K.SimpleField ? i = j.getEditorTypesByMDataType(this.designViewModelField.type.name, this.designViewModelField.multiLanguage) : this.bindingVarible && (i = j.getEditorTypesByMDataType(this.bindingVarible.type, !!((s = this.designViewModelField) != null && s.multiLanguage))), { canChangeControlType: t, editorTypeList: i };
|
|
1431
1431
|
}
|
|
1432
1432
|
changeBindingField(e, t, i) {
|
|
1433
1433
|
t.needRefreshEntityTree = !0;
|
|
@@ -1471,7 +1471,7 @@ class Se extends Fe {
|
|
|
1471
1471
|
}
|
|
1472
1472
|
}
|
|
1473
1473
|
},
|
|
1474
|
-
setPropertyRelates(r,
|
|
1474
|
+
setPropertyRelates(r, s) {
|
|
1475
1475
|
if (r)
|
|
1476
1476
|
switch (r && r.propertyID) {
|
|
1477
1477
|
case "responseLayout":
|
|
@@ -1497,13 +1497,13 @@ class Se extends Fe {
|
|
|
1497
1497
|
* @param newControlType 新控件类型
|
|
1498
1498
|
*/
|
|
1499
1499
|
changeControlType(e, t, i) {
|
|
1500
|
-
const r = t.propertyValue,
|
|
1501
|
-
if (!
|
|
1500
|
+
const r = t.propertyValue, s = i && i.parent && i.parent.schema;
|
|
1501
|
+
if (!s)
|
|
1502
1502
|
return;
|
|
1503
|
-
const c =
|
|
1503
|
+
const c = s.contents.findIndex((u) => u.id === e.id);
|
|
1504
1504
|
if (c === -1)
|
|
1505
1505
|
return;
|
|
1506
|
-
const l =
|
|
1506
|
+
const l = s.contents[c];
|
|
1507
1507
|
let d;
|
|
1508
1508
|
if (this.designViewModelField) {
|
|
1509
1509
|
const g = this.formSchemaUtils.getViewModelById(this.viewModelId).fields.find((m) => m.id === this.designViewModelField.id).fieldSchema || {};
|
|
@@ -1527,7 +1527,7 @@ class Se extends Fe {
|
|
|
1527
1527
|
}
|
|
1528
1528
|
getComponentConfig(e, t = {}, i = {}, r) {
|
|
1529
1529
|
var g, f;
|
|
1530
|
-
const
|
|
1530
|
+
const s = Object.assign({
|
|
1531
1531
|
description: "编辑器",
|
|
1532
1532
|
title: "编辑器",
|
|
1533
1533
|
type: "input-group",
|
|
@@ -1556,7 +1556,7 @@ class Se extends Fe {
|
|
|
1556
1556
|
u[m] = Object.assign(u[m] || {}, i[m]);
|
|
1557
1557
|
const a = this;
|
|
1558
1558
|
return {
|
|
1559
|
-
...
|
|
1559
|
+
...s,
|
|
1560
1560
|
properties: { ...u },
|
|
1561
1561
|
setPropertyRelates(m, h) {
|
|
1562
1562
|
if (m) {
|
|
@@ -1579,11 +1579,11 @@ class Se extends Fe {
|
|
|
1579
1579
|
*/
|
|
1580
1580
|
updateUnifiedLayoutAfterControlChanged(e, t, i) {
|
|
1581
1581
|
const r = e.split(" ");
|
|
1582
|
-
let
|
|
1583
|
-
|
|
1582
|
+
let s = r.find((a) => /^col-([1-9]|10|11|12)$/.test(a)), c = r.find((a) => /^col-md-([1-9]|10|11|12)$/.test(a)), l = r.find((a) => /^col-xl-([1-9]|10|11|12)$/.test(a)), d = r.find((a) => /^col-el-([1-9]|10|11|12)$/.test(a));
|
|
1583
|
+
s = s || "col-12", c = c || "col-md-" + s.replace("col-", ""), l = l || "col-xl-" + c.replace("col-md-", ""), d = d || "col-el-" + l.replace("col-xl-", "");
|
|
1584
1584
|
const u = {
|
|
1585
1585
|
id: t,
|
|
1586
|
-
columnInSM: parseInt(
|
|
1586
|
+
columnInSM: parseInt(s.replace("col-", ""), 10),
|
|
1587
1587
|
columnInMD: parseInt(c.replace("col-md-", ""), 10),
|
|
1588
1588
|
columnInLG: parseInt(l.replace("col-xl-", ""), 10),
|
|
1589
1589
|
columnInEL: parseInt(d.replace("col-el-", ""), 10)
|
|
@@ -1604,7 +1604,7 @@ class Se extends Fe {
|
|
|
1604
1604
|
const m = r.find((h) => h.id === t.id);
|
|
1605
1605
|
Object.assign(m || {}, t);
|
|
1606
1606
|
}
|
|
1607
|
-
const
|
|
1607
|
+
const s = r.map((m) => m.columnInSM), c = r.map((m) => m.columnInMD), l = r.map((m) => m.columnInLG), d = r.map((m) => m.columnInEL), u = this.checkIsUniqueColumn(s) ? s[0] : null, a = this.checkIsUniqueColumn(c) ? c[0] : null, g = this.checkIsUniqueColumn(l) ? l[0] : null, f = this.checkIsUniqueColumn(d) ? d[0] : null;
|
|
1608
1608
|
Object.assign(i.unifiedLayout, {
|
|
1609
1609
|
uniqueColClassInSM: u,
|
|
1610
1610
|
uniqueColClassInMD: a,
|
|
@@ -1678,7 +1678,7 @@ class Se extends Fe {
|
|
|
1678
1678
|
* @param customEvent 输入控件特有的事件配置
|
|
1679
1679
|
*/
|
|
1680
1680
|
getEventPropertyConfig(e, t = "card", i, r) {
|
|
1681
|
-
const
|
|
1681
|
+
const s = this;
|
|
1682
1682
|
let c = [];
|
|
1683
1683
|
if (i && (c = c.concat(i)), c.length === 0)
|
|
1684
1684
|
return {
|
|
@@ -1690,18 +1690,18 @@ class Se extends Fe {
|
|
|
1690
1690
|
hide: !0
|
|
1691
1691
|
};
|
|
1692
1692
|
this.appendFieldValueChangeEvents(e, c);
|
|
1693
|
-
const l =
|
|
1693
|
+
const l = s.eventsEditorUtils.formProperties(e, s.viewModelId, c);
|
|
1694
1694
|
return {
|
|
1695
1695
|
title: "事件",
|
|
1696
1696
|
hideTitle: !0,
|
|
1697
|
-
properties:
|
|
1697
|
+
properties: s.createBaseEventProperty(l),
|
|
1698
1698
|
tabId: "commands",
|
|
1699
1699
|
tabName: "交互",
|
|
1700
1700
|
setPropertyRelates(a, g) {
|
|
1701
1701
|
const f = a.propertyValue;
|
|
1702
|
-
delete e[
|
|
1703
|
-
const m =
|
|
1704
|
-
m &&
|
|
1702
|
+
delete e[s.viewModelId], f && (f.setPropertyRelates = this.setPropertyRelates, f.controlInfo = { type: s.getControlMethodType(e), name: e.title }, s.eventsEditorUtils.saveRelatedParameters(e, s.viewModelId, f.events, f)), r && r(a, g, f);
|
|
1703
|
+
const m = s.designViewModelUtils.getDgViewModel(s.viewModelId);
|
|
1704
|
+
m && s.designViewModelField && m.changeField(s.designViewModelField.id, { valueChanging: e.fieldValueChanging, valueChanged: e.fieldValueChanged });
|
|
1705
1705
|
}
|
|
1706
1706
|
};
|
|
1707
1707
|
}
|
|
@@ -1752,8 +1752,8 @@ class Me extends Se {
|
|
|
1752
1752
|
});
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
|
-
function ke(
|
|
1756
|
-
const e =
|
|
1755
|
+
function ke(o, n) {
|
|
1756
|
+
const e = o.schema;
|
|
1757
1757
|
function t(i, r) {
|
|
1758
1758
|
return new Me(i, n).getPropertyConfig(e, r);
|
|
1759
1759
|
}
|
|
@@ -1763,16 +1763,16 @@ const Pe = /* @__PURE__ */ _({
|
|
|
1763
1763
|
name: "FNumberRangeDesign",
|
|
1764
1764
|
props: W,
|
|
1765
1765
|
emits: ["valueChange", "blur", "focus", "click", "input", "beginValueChange", "endValueChange"],
|
|
1766
|
-
setup(
|
|
1767
|
-
const e = N(
|
|
1766
|
+
setup(o, n) {
|
|
1767
|
+
const e = N(o.beginValue), t = N(""), i = N(o.endValue), r = N(""), s = Y(o), c = ee(o, n, s), l = (x) => {
|
|
1768
1768
|
n.emit("beginValueChange", x);
|
|
1769
1769
|
}, d = N(), u = D("designer-host-service"), a = D("design-item-context"), g = ke(a, u), f = de(d, a, g);
|
|
1770
1770
|
H(() => {
|
|
1771
1771
|
d.value.componentInstance = f;
|
|
1772
1772
|
}), n.expose(f.value);
|
|
1773
|
-
const m = A(
|
|
1773
|
+
const m = A(o, n, t, e, c, s, l, e, i, !0), h = O(o, n, t, e, c, s, m, l, e, i, !0), b = q(o, n, m), C = X(o, n, h, !0), w = (x) => {
|
|
1774
1774
|
n.emit("endValueChange", x);
|
|
1775
|
-
}, V = A(
|
|
1775
|
+
}, V = A(o, n, r, i, c, s, w, e, i, !1), v = O(o, n, r, i, c, s, V, w, e, i, !1), k = q(o, n, V), F = X(o, n, v, !1), S = M(() => o.showButton);
|
|
1776
1776
|
return () => E("div", {
|
|
1777
1777
|
ref: d,
|
|
1778
1778
|
class: "input-group number-range f-cmp-number-spinner"
|
|
@@ -1787,11 +1787,11 @@ const Pe = /* @__PURE__ */ _({
|
|
|
1787
1787
|
}, [F(), S.value && k()])])]);
|
|
1788
1788
|
}
|
|
1789
1789
|
});
|
|
1790
|
-
$.register = (
|
|
1791
|
-
|
|
1790
|
+
$.register = (o, n, e, t) => {
|
|
1791
|
+
o["number-range"] = $, n["number-range"] = Q;
|
|
1792
1792
|
};
|
|
1793
|
-
$.registerDesigner = (
|
|
1794
|
-
|
|
1793
|
+
$.registerDesigner = (o, n, e) => {
|
|
1794
|
+
o["number-range"] = Pe, n["number-range"] = Q;
|
|
1795
1795
|
};
|
|
1796
1796
|
const qe = pe($);
|
|
1797
1797
|
export {
|