@farris/ui-vue 1.2.5 → 1.2.7
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 +147 -139
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +122 -131
- package/components/avatar/index.umd.cjs +1 -1
- package/components/avatar/package.json +1 -1
- package/components/border-editor/package.json +1 -1
- package/components/button/package.json +1 -1
- package/components/button-edit/index.css +1 -0
- package/components/button-edit/package.json +1 -1
- package/components/button-group/package.json +1 -1
- package/components/calculator/package.json +1 -1
- package/components/calendar/package.json +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +216 -223
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/checkbox/package.json +1 -1
- package/components/color-picker/package.json +1 -1
- package/components/combo-list/index.esm.js +201 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-list/package.json +1 -1
- package/components/combo-tree/index.esm.js +340 -107
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/combo-tree/package.json +1 -1
- package/components/common/package.json +1 -1
- package/components/component/index.esm.js +36 -29
- package/components/component/index.umd.cjs +1 -1
- package/components/component/package.json +1 -1
- package/components/condition/index.esm.js +341 -338
- package/components/condition/index.umd.cjs +1 -1
- package/components/condition/package.json +1 -1
- package/components/content-container/index.esm.js +9 -13
- package/components/content-container/index.umd.cjs +1 -1
- package/components/content-container/package.json +1 -1
- package/components/{tree-grid/style.css → data-grid/index.css} +1 -1
- package/components/data-grid/index.esm.js +3415 -3295
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2719 -2717
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +31 -40
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.esm.js +23 -20
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/package.json +1 -1
- package/components/discussion-editor/package.json +1 -1
- package/components/discussion-list/package.json +1 -1
- package/components/drawer/package.json +1 -1
- package/components/dropdown/index.esm.js +86 -86
- package/components/dropdown/index.umd.cjs +1 -1
- package/components/dropdown/package.json +1 -1
- package/components/dynamic-form/index.esm.js +578 -584
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-form/package.json +1 -1
- package/components/dynamic-resolver/index.esm.js +56 -47
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-resolver/package.json +1 -1
- package/components/dynamic-view/index.esm.js +287 -278
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/dynamic-view/package.json +1 -1
- package/components/enum-editor/package.json +1 -1
- package/components/events-editor/package.json +1 -1
- package/components/expression-editor/package.json +1 -1
- package/components/external-container/index.css +1 -0
- package/components/external-container/index.esm.js +1923 -1908
- package/components/external-container/index.umd.cjs +1 -1
- package/components/external-container/package.json +1 -1
- package/components/field-selector/index.css +1 -0
- package/components/field-selector/index.esm.js +3719 -3604
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/field-selector/package.json +1 -1
- package/components/filter-bar/{style.css → index.css} +1 -1
- package/components/filter-bar/index.esm.js +483 -470
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.esm.js +37 -34
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/flow-canvas/package.json +1 -1
- package/components/image-cropper/package.json +1 -1
- package/components/input-group/index.esm.js +258 -267
- package/components/input-group/index.umd.cjs +1 -1
- package/components/input-group/package.json +1 -1
- package/components/layout/package.json +1 -1
- package/components/list-nav/package.json +1 -1
- package/components/list-view/index.esm.js +1452 -1450
- package/components/list-view/index.umd.cjs +1 -1
- package/components/list-view/package.json +1 -1
- package/components/loading/package.json +1 -1
- package/components/locale/package.json +1 -1
- package/components/lookup/index.css +1 -0
- package/components/lookup/index.esm.js +4860 -4657
- package/components/lookup/index.umd.cjs +1 -1
- package/components/lookup/package.json +1 -1
- package/components/mapping-editor/index.css +1 -0
- package/components/mapping-editor/index.esm.js +4411 -4259
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/mapping-editor/package.json +1 -1
- package/components/message-box/index.css +1 -0
- package/components/message-box/index.esm.js +397 -386
- package/components/message-box/index.umd.cjs +1 -1
- package/components/message-box/package.json +1 -1
- package/components/modal/index.css +1 -0
- package/components/modal/index.esm.js +308 -297
- package/components/modal/index.umd.cjs +1 -1
- package/components/modal/package.json +1 -1
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +763 -741
- package/components/order/index.umd.cjs +1 -1
- package/components/order/package.json +1 -1
- package/components/page-footer/package.json +1 -1
- package/components/page-header/index.esm.js +948 -945
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/package.json +1 -1
- package/components/popover/package.json +1 -1
- package/components/progress/package.json +1 -1
- package/components/property-editor/index.esm.js +485 -466
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +437 -426
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/property-panel/package.json +1 -1
- package/components/radio-button/package.json +1 -1
- package/components/radio-group/index.esm.js +98 -107
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/radio-group/package.json +1 -1
- package/components/rate/package.json +1 -1
- package/components/response-layout/package.json +1 -1
- package/components/response-layout-editor/{style.css → index.css} +1 -1
- package/components/response-layout-editor/index.esm.js +840 -800
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-layout-editor/package.json +1 -1
- package/components/response-toolbar/index.esm.js +757 -760
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/response-toolbar/package.json +1 -1
- package/components/schema-selector/index.css +1 -0
- package/components/schema-selector/index.esm.js +3659 -3432
- package/components/schema-selector/index.umd.cjs +8 -1
- package/components/schema-selector/package.json +1 -1
- package/components/search-box/package.json +1 -1
- package/components/section/index.esm.js +21 -14
- package/components/section/index.umd.cjs +1 -1
- package/components/section/package.json +1 -1
- package/components/smoke-detector/package.json +1 -1
- package/components/spacing-editor/package.json +1 -1
- package/components/splitter/package.json +1 -1
- package/components/step/package.json +1 -1
- package/components/switch/index.esm.js +126 -135
- package/components/switch/index.umd.cjs +1 -1
- package/components/switch/package.json +1 -1
- package/components/tabs/index.css +1 -0
- package/components/tabs/index.esm.js +1400 -1379
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tabs/package.json +1 -1
- package/components/tags/package.json +1 -1
- package/components/text/package.json +1 -1
- package/components/textarea/index.esm.js +97 -106
- package/components/textarea/index.umd.cjs +1 -1
- package/components/textarea/package.json +1 -1
- package/components/time-picker/index.css +1 -0
- package/components/time-picker/index.esm.js +393 -402
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/time-picker/package.json +1 -1
- package/components/tooltip/package.json +1 -1
- package/components/transfer/index.esm.js +124 -122
- package/components/transfer/index.umd.cjs +1 -1
- package/components/transfer/package.json +1 -1
- package/components/{data-grid/style.css → tree-grid/index.css} +1 -1
- package/components/tree-grid/index.esm.js +3531 -3412
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +2046 -2044
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/tree-view/package.json +1 -1
- package/components/uploader/package.json +1 -1
- package/components/verify-detail/package.json +1 -1
- package/components/video/package.json +1 -1
- package/components/weather/package.json +1 -1
- package/farris.all.esm.js +12370 -11917
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- package/types/combo-list/src/components/list-container.component.d.ts +6 -0
- package/types/combo-list/src/components/list-container.props.d.ts +9 -1
- package/types/combo-tree/src/combo-tree.props.d.ts +4 -0
- package/types/combo-tree/src/components/tree-container.component.d.ts +13 -3
- package/types/combo-tree/src/components/tree-container.props.d.ts +15 -1
- package/types/combo-tree/src/schema/schema-mapper.d.ts +2 -0
- package/types/combo-tree/src/schema/schema-resolver.d.ts +2 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +5 -5
- package/types/data-grid/src/data-grid.component.d.ts +2 -2
- package/types/data-grid/src/data-grid.props.d.ts +1 -0
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +1 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +8 -8
- package/types/designer-canvas/src/composition/types.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/converter/pagination.converter.d.ts +6 -0
- package/types/dynamic-resolver/src/visible-prop-resolver.d.ts +3 -0
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +7 -3
- package/types/lookup/src/property-config/lookup.property-config.d.ts +31 -27
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/page-header/src/page-header.props.d.ts +7 -0
- package/types/page-header/src/property-config/page-header.property-config.d.ts +1 -1
- package/types/property-panel/src/composition/entity/base-property.d.ts +2 -16
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +21 -0
- package/types/response-toolbar/index.d.ts +9 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.component.d.ts +4 -2
- package/types/response-toolbar/src/response-toolbar.props.d.ts +9 -2
- package/types/schema-selector/src/composition/types.d.ts +3 -1
- package/types/schema-selector/src/schema-selector-editor.component.d.ts +5 -1
- package/types/tabs/src/designer/tab-toolbar.design.component.d.ts +1 -1
- package/types/tabs/src/tabs.props.d.ts +8 -0
- package/components/button-edit/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/lookup/style.css +0 -1
- package/components/mapping-editor/style.css +0 -1
- package/components/message-box/style.css +0 -1
- package/components/modal/style.css +0 -1
- package/components/schema-selector/style.css +0 -1
- package/components/tabs/style.css +0 -1
- package/components/time-picker/style.css +0 -1
- package/style.css +0 -1
- package/types/tabs/src/designer/tab-toolbar-item.props.d.ts +0 -19
- /package/components/border-editor/{style.css → index.css} +0 -0
- /package/components/checkbox/{style.css → index.css} +0 -0
- /package/components/date-picker/{style.css → index.css} +0 -0
- /package/components/designer-canvas/{style.css → index.css} +0 -0
- /package/components/designer-outline/{style.css → index.css} +0 -0
- /package/components/designer-toolbox/{style.css → index.css} +0 -0
- /package/components/discussion-editor/{style.css → index.css} +0 -0
- /package/components/discussion-list/{style.css → index.css} +0 -0
- /package/components/drawer/{style.css → index.css} +0 -0
- /package/components/events-editor/{style.css → index.css} +0 -0
- /package/components/flow-canvas/{style.css → index.css} +0 -0
- /package/components/list-view/{style.css → index.css} +0 -0
- /package/components/order/{style.css → index.css} +0 -0
- /package/components/property-editor/{style.css → index.css} +0 -0
- /package/components/property-panel/{style.css → index.css} +0 -0
- /package/components/radio-button/{style.css → index.css} +0 -0
- /package/components/radio-group/{style.css → index.css} +0 -0
- /package/components/smoke-detector/{style.css → index.css} +0 -0
- /package/components/spacing-editor/{style.css → index.css} +0 -0
- /package/components/splitter/{style.css → index.css} +0 -0
- /package/components/switch/{style.css → index.css} +0 -0
- /package/components/transfer/{style.css → index.css} +0 -0
- /package/components/uploader/{style.css → index.css} +0 -0
- /package/components/weather/{style.css → index.css} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var Q = (e, t, n) =>
|
|
4
|
-
import { defineComponent as q, ref as l, watch as O, computed as R, onMounted as J, createVNode as i, nextTick as ce, toRefs as
|
|
1
|
+
var Ue = Object.defineProperty;
|
|
2
|
+
var Xe = (e, t, n) => t in e ? Ue(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var Q = (e, t, n) => Xe(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as q, ref as l, watch as O, computed as R, onMounted as J, createVNode as i, nextTick as ce, toRefs as Ye, onBeforeMount as fe, createTextVNode as G, Fragment as ue, withModifiers as le, inject as ge, provide as Je, onUnmounted as be, Teleport as Qe, shallowRef as Ze, createApp as _e, render as se, h as Ke, cloneVNode as et, mergeProps as we, reactive as Z } from "vue";
|
|
5
5
|
import { cloneDeep as U } from "lodash-es";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import tt from "@farris/ui-vue/components/list-view";
|
|
7
|
+
import nt from "@farris/ui-vue/components/button-edit";
|
|
8
8
|
const Se = {
|
|
9
9
|
/** 当前控件组别及样式 */
|
|
10
10
|
defaultState: {
|
|
@@ -345,14 +345,14 @@ const Se = {
|
|
|
345
345
|
group: 4
|
|
346
346
|
}
|
|
347
347
|
]
|
|
348
|
-
},
|
|
348
|
+
}, at = {
|
|
349
349
|
/** 接受传入的原始数据的defaultState */
|
|
350
350
|
initialState: { type: Object, default: Se },
|
|
351
351
|
/** 页面高度 */
|
|
352
352
|
height: { type: Number, default: 700 },
|
|
353
353
|
/** 页面宽度 */
|
|
354
354
|
width: { type: Number, default: 750 }
|
|
355
|
-
},
|
|
355
|
+
}, lt = {
|
|
356
356
|
/** 记录默认模式及分组状态 */
|
|
357
357
|
defaultStates: { type: Object, default: { mode: "" } },
|
|
358
358
|
/** 当前开关模式 */
|
|
@@ -364,7 +364,7 @@ const Se = {
|
|
|
364
364
|
/** 用户设置的屏幕分辨率缩写变化-例:中等屏幕 */
|
|
365
365
|
onScreenNameChanged: { type: Function, default: () => {
|
|
366
366
|
} }
|
|
367
|
-
},
|
|
367
|
+
}, ot = "https://json-schema.org/draft/2020-12/schema", it = "https://farris-design.gitee.io/capsule.schema.json", ut = "capsule", st = "A Farris Component", rt = "object", ct = {
|
|
368
368
|
id: {
|
|
369
369
|
description: "The unique identifier for a capsule",
|
|
370
370
|
type: "string"
|
|
@@ -426,17 +426,17 @@ const Se = {
|
|
|
426
426
|
type: "boolean",
|
|
427
427
|
default: !0
|
|
428
428
|
}
|
|
429
|
-
},
|
|
429
|
+
}, dt = [
|
|
430
430
|
"id",
|
|
431
431
|
"type"
|
|
432
|
-
],
|
|
433
|
-
$schema:
|
|
434
|
-
$id:
|
|
435
|
-
title:
|
|
436
|
-
description:
|
|
437
|
-
type:
|
|
438
|
-
properties:
|
|
439
|
-
required:
|
|
432
|
+
], ft = {
|
|
433
|
+
$schema: ot,
|
|
434
|
+
$id: it,
|
|
435
|
+
title: ut,
|
|
436
|
+
description: st,
|
|
437
|
+
type: rt,
|
|
438
|
+
properties: ct,
|
|
439
|
+
required: dt
|
|
440
440
|
}, Ce = {}, Me = {};
|
|
441
441
|
function pe(e) {
|
|
442
442
|
const { properties: t, title: n } = e, a = Object.keys(t).reduce((o, u) => (o[u] = t[u].type === "object" && t[u].properties ? pe(t[u]) : U(t[u].default), o), {});
|
|
@@ -451,101 +451,101 @@ function de(e, t = {}) {
|
|
|
451
451
|
}
|
|
452
452
|
return null;
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function pt(e, t) {
|
|
455
455
|
const n = pe(t);
|
|
456
456
|
return Object.keys(e).reduce((a, o) => (a[o] = e[o], a), n), n;
|
|
457
457
|
}
|
|
458
|
-
function
|
|
458
|
+
function vt(e, t) {
|
|
459
459
|
return Object.keys(e).filter((a) => e[a] != null).reduce((a, o) => {
|
|
460
460
|
if (t.has(o)) {
|
|
461
461
|
const u = t.get(o);
|
|
462
462
|
if (typeof u == "string")
|
|
463
463
|
a[u] = e[o];
|
|
464
464
|
else {
|
|
465
|
-
const
|
|
466
|
-
Object.assign(a,
|
|
465
|
+
const c = u(o, e[o], e);
|
|
466
|
+
Object.assign(a, c);
|
|
467
467
|
}
|
|
468
468
|
} else
|
|
469
469
|
a[o] = e[o];
|
|
470
470
|
return a;
|
|
471
471
|
}, {});
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
const a =
|
|
475
|
-
return
|
|
473
|
+
function mt(e, t, n = /* @__PURE__ */ new Map()) {
|
|
474
|
+
const a = pt(e, t);
|
|
475
|
+
return vt(a, n);
|
|
476
476
|
}
|
|
477
|
-
function
|
|
478
|
-
function t(
|
|
479
|
-
if (typeof
|
|
480
|
-
return
|
|
481
|
-
if (typeof
|
|
482
|
-
const h = Object.keys(
|
|
477
|
+
function ht(e = {}) {
|
|
478
|
+
function t(s, p, r, d) {
|
|
479
|
+
if (typeof r == "number")
|
|
480
|
+
return d[s].length === r;
|
|
481
|
+
if (typeof r == "object") {
|
|
482
|
+
const h = Object.keys(r)[0], g = r[h];
|
|
483
483
|
if (h === "not")
|
|
484
|
-
return Number(
|
|
484
|
+
return Number(d[s].length) !== Number(g);
|
|
485
485
|
if (h === "moreThan")
|
|
486
|
-
return Number(
|
|
486
|
+
return Number(d[s].length) >= Number(g);
|
|
487
487
|
if (h === "lessThan")
|
|
488
|
-
return Number(
|
|
488
|
+
return Number(d[s].length) <= Number(g);
|
|
489
489
|
}
|
|
490
490
|
return !1;
|
|
491
491
|
}
|
|
492
|
-
function n(
|
|
493
|
-
return
|
|
492
|
+
function n(s, p, r, d) {
|
|
493
|
+
return d[s] && d[s].propertyValue && String(d[s].propertyValue.value) === String(r);
|
|
494
494
|
}
|
|
495
495
|
const a = /* @__PURE__ */ new Map([
|
|
496
496
|
["length", t],
|
|
497
497
|
["getProperty", n]
|
|
498
498
|
]);
|
|
499
|
-
Object.keys(e).reduce((
|
|
500
|
-
function o(
|
|
501
|
-
const
|
|
502
|
-
return typeof p == "number" ? [{ target:
|
|
503
|
-
if (
|
|
504
|
-
return { target:
|
|
505
|
-
const h =
|
|
506
|
-
return { target:
|
|
499
|
+
Object.keys(e).reduce((s, p) => (s.set(p, e[p]), s), a);
|
|
500
|
+
function o(s, p) {
|
|
501
|
+
const r = s;
|
|
502
|
+
return typeof p == "number" ? [{ target: r, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: r, operator: "getProperty", param: s, value: !!p }] : typeof p == "object" ? Object.keys(p).map((d) => {
|
|
503
|
+
if (d === "length")
|
|
504
|
+
return { target: r, operator: "length", param: null, value: p[d] };
|
|
505
|
+
const h = d, g = p[d];
|
|
506
|
+
return { target: r, operator: "getProperty", param: h, value: g };
|
|
507
507
|
}) : [];
|
|
508
508
|
}
|
|
509
|
-
function u(
|
|
510
|
-
return Object.keys(
|
|
511
|
-
const h = o(
|
|
512
|
-
return
|
|
509
|
+
function u(s) {
|
|
510
|
+
return Object.keys(s).reduce((r, d) => {
|
|
511
|
+
const h = o(d, s[d]);
|
|
512
|
+
return r.push(...h), r;
|
|
513
513
|
}, []);
|
|
514
514
|
}
|
|
515
|
-
function
|
|
516
|
-
if (a.has(
|
|
517
|
-
const
|
|
518
|
-
return
|
|
515
|
+
function c(s, p) {
|
|
516
|
+
if (a.has(s.operator)) {
|
|
517
|
+
const r = a.get(s.operator);
|
|
518
|
+
return r && r(s.target, s.param, s.value, p) || !1;
|
|
519
519
|
}
|
|
520
520
|
return !1;
|
|
521
521
|
}
|
|
522
|
-
function f(
|
|
523
|
-
return u(
|
|
522
|
+
function f(s, p) {
|
|
523
|
+
return u(s).reduce((h, g) => h && c(g, p), !0);
|
|
524
524
|
}
|
|
525
|
-
function v(
|
|
526
|
-
const
|
|
527
|
-
return
|
|
525
|
+
function v(s, p) {
|
|
526
|
+
const r = Object.keys(s), d = r.includes("allOf"), h = r.includes("anyOf"), g = d || h, S = (g ? s[g ? d ? "allOf" : "anyOf" : "allOf"] : [s]).map((L) => f(L, p));
|
|
527
|
+
return d ? !S.includes(!1) : S.includes(!0);
|
|
528
528
|
}
|
|
529
529
|
return { parseValueSchema: v };
|
|
530
530
|
}
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
function K(e, t, n = /* @__PURE__ */ new Map(), a = (
|
|
534
|
-
return Ce[t.title] = t, Me[t.title] = a,
|
|
535
|
-
const f =
|
|
531
|
+
const yt = {}, gt = {};
|
|
532
|
+
ht();
|
|
533
|
+
function K(e, t, n = /* @__PURE__ */ new Map(), a = (c, f, v) => f, o = {}, u = (c) => c) {
|
|
534
|
+
return Ce[t.title] = t, Me[t.title] = a, yt[t.title] = o, gt[t.title] = u, (c = {}) => {
|
|
535
|
+
const f = mt(c, t, n), v = Object.keys(e).reduce((s, p) => (s[p] = e[p].default, s), {});
|
|
536
536
|
return Object.assign(v, f);
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
539
|
function ee(e, t) {
|
|
540
540
|
return { customClass: t.class, customStyle: t.style };
|
|
541
541
|
}
|
|
542
|
-
const
|
|
542
|
+
const bt = /* @__PURE__ */ new Map([
|
|
543
543
|
["appearance", ee]
|
|
544
544
|
]);
|
|
545
|
-
function
|
|
545
|
+
function wt(e, t, n) {
|
|
546
546
|
return t;
|
|
547
547
|
}
|
|
548
|
-
const
|
|
548
|
+
const St = "capsule", Ct = "A Farris Component", Mt = "object", It = {
|
|
549
549
|
basic: {
|
|
550
550
|
description: "Basic Infomation",
|
|
551
551
|
title: "基本信息",
|
|
@@ -567,11 +567,11 @@ const wt = "capsule", St = "A Farris Component", Ct = "object", Mt = {
|
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
},
|
|
571
|
-
title:
|
|
572
|
-
description:
|
|
573
|
-
type:
|
|
574
|
-
categories:
|
|
570
|
+
}, xt = {
|
|
571
|
+
title: St,
|
|
572
|
+
description: Ct,
|
|
573
|
+
type: Mt,
|
|
574
|
+
categories: It
|
|
575
575
|
}, Ie = {
|
|
576
576
|
items: {
|
|
577
577
|
Type: Array,
|
|
@@ -585,7 +585,7 @@ const wt = "capsule", St = "A Farris Component", Ct = "object", Mt = {
|
|
|
585
585
|
*/
|
|
586
586
|
modelValue: { type: String, default: "" },
|
|
587
587
|
type: { type: String, default: "primary" }
|
|
588
|
-
},
|
|
588
|
+
}, Et = {
|
|
589
589
|
name: { type: String, default: "" },
|
|
590
590
|
value: { type: String, default: "" },
|
|
591
591
|
isActive: { type: Boolean, default: !1 },
|
|
@@ -594,15 +594,15 @@ const wt = "capsule", St = "A Farris Component", Ct = "object", Mt = {
|
|
|
594
594
|
show: { type: Boolean, default: !0 },
|
|
595
595
|
disabled: { type: Boolean, default: !1 }
|
|
596
596
|
};
|
|
597
|
-
K(Ie,
|
|
598
|
-
const
|
|
597
|
+
K(Ie, ft, bt, wt, xt);
|
|
598
|
+
const Dt = /* @__PURE__ */ q({
|
|
599
599
|
name: "FCapsuleItem",
|
|
600
|
-
props:
|
|
600
|
+
props: Et,
|
|
601
601
|
emits: ["mounted", "active"],
|
|
602
602
|
setup(e, t) {
|
|
603
603
|
const n = l(), a = l(e.isActive);
|
|
604
|
-
O(() => e.isActive, (
|
|
605
|
-
a.value =
|
|
604
|
+
O(() => e.isActive, (c) => {
|
|
605
|
+
a.value = c;
|
|
606
606
|
});
|
|
607
607
|
const o = R(() => ({
|
|
608
608
|
"f-capsule-item": !0,
|
|
@@ -612,8 +612,8 @@ const Et = /* @__PURE__ */ q({
|
|
|
612
612
|
J(() => {
|
|
613
613
|
t.emit("mounted", n, e.value);
|
|
614
614
|
});
|
|
615
|
-
function u(
|
|
616
|
-
e.disabled || t.emit("active",
|
|
615
|
+
function u(c) {
|
|
616
|
+
e.disabled || t.emit("active", c, {
|
|
617
617
|
name: e.name,
|
|
618
618
|
value: e.value
|
|
619
619
|
});
|
|
@@ -621,75 +621,75 @@ const Et = /* @__PURE__ */ q({
|
|
|
621
621
|
return () => i("div", {
|
|
622
622
|
ref: n,
|
|
623
623
|
class: o.value,
|
|
624
|
-
onClick: (
|
|
624
|
+
onClick: (c) => u(c)
|
|
625
625
|
}, [e.icon && i("i", {
|
|
626
626
|
class: e.icon
|
|
627
627
|
}, null), e.name]);
|
|
628
628
|
}
|
|
629
|
-
}),
|
|
629
|
+
}), Tt = /* @__PURE__ */ q({
|
|
630
630
|
name: "FCapsule",
|
|
631
631
|
props: Ie,
|
|
632
632
|
emits: ["change", "update:modelValue"],
|
|
633
633
|
setup(e, t) {
|
|
634
|
-
const n = l(e.items), a = l(), o = 2, u = l(e.modelValue),
|
|
635
|
-
const
|
|
634
|
+
const n = l(e.items), a = l(), o = 2, u = l(e.modelValue), c = l("none"), f = l(e.type), v = R(() => {
|
|
635
|
+
const b = {
|
|
636
636
|
"f-capsule-container": !0
|
|
637
637
|
};
|
|
638
|
-
return f.value && (
|
|
639
|
-
}),
|
|
638
|
+
return f.value && (b[f.value] = !0), b;
|
|
639
|
+
}), s = R(() => ({})), p = R(() => ({
|
|
640
640
|
"f-capsule": !0
|
|
641
|
-
})),
|
|
642
|
-
left: `${
|
|
643
|
-
width: `${
|
|
644
|
-
transition:
|
|
645
|
-
})),
|
|
641
|
+
})), r = l(o), d = l(0), h = l(0), g = R(() => ({
|
|
642
|
+
left: `${r.value}px`,
|
|
643
|
+
width: `${d.value}px`,
|
|
644
|
+
transition: c.value
|
|
645
|
+
})), T = R(() => ({
|
|
646
646
|
width: `${h.value}px`
|
|
647
647
|
})), w = /* @__PURE__ */ new Map();
|
|
648
|
-
function S(
|
|
648
|
+
function S(b) {
|
|
649
649
|
var m;
|
|
650
|
-
if (w.has(
|
|
651
|
-
const
|
|
652
|
-
if (
|
|
653
|
-
const A =
|
|
654
|
-
|
|
650
|
+
if (w.has(b.value)) {
|
|
651
|
+
const B = (m = w.get(b.value)) == null ? void 0 : m.value;
|
|
652
|
+
if (B) {
|
|
653
|
+
const A = B.getBoundingClientRect(), N = a.value.getBoundingClientRect();
|
|
654
|
+
r.value = A.left - N.left + o + a.value.scrollLeft, d.value = A.width - 2 * o;
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
|
-
function k(
|
|
659
|
-
const
|
|
660
|
-
u.value =
|
|
658
|
+
function k(b, m) {
|
|
659
|
+
const B = b.value;
|
|
660
|
+
u.value = B, t.emit("update:modelValue", B), S(b), m && t.emit("change", B);
|
|
661
661
|
}
|
|
662
|
-
function L(
|
|
663
|
-
const m = n.value.findIndex((
|
|
662
|
+
function L(b) {
|
|
663
|
+
const m = n.value.findIndex((B) => B.value === b);
|
|
664
664
|
m > -1 && k(n.value[m], !1);
|
|
665
665
|
}
|
|
666
|
-
O(() => e.modelValue, (
|
|
667
|
-
u.value =
|
|
668
|
-
}), O(() => e.items, async (
|
|
669
|
-
const m =
|
|
670
|
-
y(m), n.value = m, await ce(), L(u.value), h.value = Array.from(w.values()).reduce((
|
|
666
|
+
O(() => e.modelValue, (b) => {
|
|
667
|
+
u.value = b, L(u.value);
|
|
668
|
+
}), O(() => e.items, async (b) => {
|
|
669
|
+
const m = b.filter((B) => B.show);
|
|
670
|
+
y(m), n.value = m, await ce(), L(u.value), h.value = Array.from(w.values()).reduce((B, A) => (B += A.value.clientWidth, B), 0);
|
|
671
671
|
}), J(async () => {
|
|
672
|
-
L(u.value), await ce(),
|
|
672
|
+
L(u.value), await ce(), c.value = "0.1s ease-out all", h.value = Array.from(w.values()).reduce((b, m) => (b += m.value.clientWidth, b), 0);
|
|
673
673
|
});
|
|
674
|
-
function j(
|
|
674
|
+
function j(b, m) {
|
|
675
675
|
k(m, !0);
|
|
676
676
|
}
|
|
677
|
-
function W(
|
|
678
|
-
w.set(m,
|
|
677
|
+
function W(b, m) {
|
|
678
|
+
w.set(m, b);
|
|
679
679
|
}
|
|
680
|
-
function y(
|
|
680
|
+
function y(b) {
|
|
681
681
|
Array.from(w.keys()).forEach((m) => {
|
|
682
|
-
|
|
682
|
+
b.find((A) => A.value === m) || w.delete(m);
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return i(
|
|
687
|
-
name:
|
|
688
|
-
value:
|
|
689
|
-
isActive:
|
|
685
|
+
function E(b, m) {
|
|
686
|
+
return i(Dt, {
|
|
687
|
+
name: b.name,
|
|
688
|
+
value: b.value,
|
|
689
|
+
isActive: b.value === u.value,
|
|
690
690
|
index: m,
|
|
691
|
-
disabled:
|
|
692
|
-
key:
|
|
691
|
+
disabled: b.disabled,
|
|
692
|
+
key: b.value,
|
|
693
693
|
onMounted: W,
|
|
694
694
|
onActive: j
|
|
695
695
|
}, null);
|
|
@@ -697,20 +697,20 @@ const Et = /* @__PURE__ */ q({
|
|
|
697
697
|
return () => i("span", {
|
|
698
698
|
ref: a,
|
|
699
699
|
class: v.value,
|
|
700
|
-
style:
|
|
700
|
+
style: s.value
|
|
701
701
|
}, [i("span", {
|
|
702
702
|
class: "f-capsule-pane"
|
|
703
|
-
}, [n.value.map((
|
|
703
|
+
}, [n.value.map((b, m) => E(b, m))]), i("small", {
|
|
704
704
|
class: p.value,
|
|
705
|
-
style:
|
|
705
|
+
style: g.value
|
|
706
706
|
}, null), i("div", {
|
|
707
707
|
class: "f-capsule-board",
|
|
708
|
-
style:
|
|
708
|
+
style: T.value
|
|
709
709
|
}, null)]);
|
|
710
710
|
}
|
|
711
|
-
}),
|
|
711
|
+
}), Bt = /* @__PURE__ */ new Map([
|
|
712
712
|
["appearance", ee]
|
|
713
|
-
]),
|
|
713
|
+
]), Lt = "https://json-schema.org/draft/2020-12/schema", Rt = "https://farris-design.gitee.io/switch.schema.json", Ft = "switch", kt = "A Farris Component", $t = "object", Wt = {
|
|
714
714
|
id: {
|
|
715
715
|
description: "The unique identifier for a switch",
|
|
716
716
|
type: "string"
|
|
@@ -782,19 +782,19 @@ const Et = /* @__PURE__ */ q({
|
|
|
782
782
|
type: "enum",
|
|
783
783
|
default: "medium"
|
|
784
784
|
}
|
|
785
|
-
},
|
|
785
|
+
}, At = [
|
|
786
786
|
"id",
|
|
787
787
|
"type"
|
|
788
|
-
],
|
|
789
|
-
$schema:
|
|
790
|
-
$id:
|
|
791
|
-
title:
|
|
792
|
-
description:
|
|
793
|
-
type:
|
|
794
|
-
properties:
|
|
795
|
-
required:
|
|
788
|
+
], Ot = {
|
|
789
|
+
$schema: Lt,
|
|
790
|
+
$id: Rt,
|
|
791
|
+
title: Ft,
|
|
792
|
+
description: kt,
|
|
793
|
+
type: $t,
|
|
794
|
+
properties: Wt,
|
|
795
|
+
required: At
|
|
796
796
|
};
|
|
797
|
-
function
|
|
797
|
+
function jt(e, t, n) {
|
|
798
798
|
return t;
|
|
799
799
|
}
|
|
800
800
|
const xe = {
|
|
@@ -814,8 +814,8 @@ const xe = {
|
|
|
814
814
|
onModelValueChanged: { type: Function, default: () => {
|
|
815
815
|
} }
|
|
816
816
|
};
|
|
817
|
-
K(xe,
|
|
818
|
-
const
|
|
817
|
+
K(xe, Ot, Bt, jt);
|
|
818
|
+
const Vt = /* @__PURE__ */ q({
|
|
819
819
|
name: "FSwitch",
|
|
820
820
|
props: xe,
|
|
821
821
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
@@ -825,11 +825,11 @@ const jt = /* @__PURE__ */ q({
|
|
|
825
825
|
size: a,
|
|
826
826
|
onLabel: o,
|
|
827
827
|
offLabel: u,
|
|
828
|
-
onBackground:
|
|
828
|
+
onBackground: c,
|
|
829
829
|
offBackground: f,
|
|
830
830
|
onColor: v,
|
|
831
|
-
offColor:
|
|
832
|
-
} =
|
|
831
|
+
offColor: s
|
|
832
|
+
} = Ye(e), p = l(e.modelValue), r = R(() => ({
|
|
833
833
|
switch: !0,
|
|
834
834
|
"f-cmp-switch": !0,
|
|
835
835
|
checked: p.value,
|
|
@@ -837,18 +837,18 @@ const jt = /* @__PURE__ */ q({
|
|
|
837
837
|
"switch-large": a.value === "large",
|
|
838
838
|
"switch-medium": a.value === "medium",
|
|
839
839
|
"switch-small": a.value === "small"
|
|
840
|
-
})),
|
|
840
|
+
})), d = R(() => p.value ? {
|
|
841
841
|
outline: "none",
|
|
842
|
-
background:
|
|
842
|
+
background: c.value
|
|
843
843
|
} : {
|
|
844
844
|
outline: "none",
|
|
845
845
|
backgroundColor: f.value
|
|
846
846
|
}), h = R(() => p.value ? {
|
|
847
847
|
background: v.value
|
|
848
848
|
} : {
|
|
849
|
-
backgroundColor:
|
|
850
|
-
}),
|
|
851
|
-
function
|
|
849
|
+
backgroundColor: s.value
|
|
850
|
+
}), g = R(() => (o == null ? void 0 : o.value) || (u == null ? void 0 : u.value));
|
|
851
|
+
function T() {
|
|
852
852
|
n.value || (p.value = !p.value, t.emit("update:modelValue", p.value));
|
|
853
853
|
}
|
|
854
854
|
return O(p, (w, S) => {
|
|
@@ -858,10 +858,10 @@ const jt = /* @__PURE__ */ q({
|
|
|
858
858
|
}), () => i("span", {
|
|
859
859
|
tabindex: "0",
|
|
860
860
|
role: "button",
|
|
861
|
-
class:
|
|
862
|
-
style:
|
|
863
|
-
onClick:
|
|
864
|
-
}, [
|
|
861
|
+
class: r.value,
|
|
862
|
+
style: d.value,
|
|
863
|
+
onClick: T
|
|
864
|
+
}, [g.value && i("span", {
|
|
865
865
|
class: "switch-pane"
|
|
866
866
|
}, [i("span", {
|
|
867
867
|
class: "switch-label-checked"
|
|
@@ -871,9 +871,9 @@ const jt = /* @__PURE__ */ q({
|
|
|
871
871
|
style: h.value
|
|
872
872
|
}, [t.slots.default && t.slots.default()])]);
|
|
873
873
|
}
|
|
874
|
-
}),
|
|
874
|
+
}), zt = /* @__PURE__ */ q({
|
|
875
875
|
name: "FScreenResolutionSelector",
|
|
876
|
-
props:
|
|
876
|
+
props: lt,
|
|
877
877
|
emits: ["screenNameChanged", "currentScreenResolutionChanged", "switchInStandardModeChanged"],
|
|
878
878
|
setup(e, t) {
|
|
879
879
|
const n = l([{
|
|
@@ -896,21 +896,21 @@ const jt = /* @__PURE__ */ q({
|
|
|
896
896
|
code: "EL",
|
|
897
897
|
value: "EL",
|
|
898
898
|
active: !1
|
|
899
|
-
}]), a = l(e.defaultStates), o = l("MD"), u = l("中等屏幕"),
|
|
899
|
+
}]), a = l(e.defaultStates), o = l("MD"), u = l("中等屏幕"), c = l(!1);
|
|
900
900
|
function f(p) {
|
|
901
|
-
n.value.forEach((
|
|
902
|
-
|
|
901
|
+
n.value.forEach((r) => {
|
|
902
|
+
r.active = r.code === p, r.active && (o.value = r.code, u.value = r.name, t.emit("screenNameChanged", u.value), t.emit("currentScreenResolutionChanged", o.value));
|
|
903
903
|
});
|
|
904
904
|
}
|
|
905
905
|
function v() {
|
|
906
|
-
t.emit("switchInStandardModeChanged",
|
|
906
|
+
t.emit("switchInStandardModeChanged", c.value);
|
|
907
907
|
}
|
|
908
|
-
O(
|
|
908
|
+
O(c, () => {
|
|
909
909
|
}), fe(() => {
|
|
910
|
-
a.value.mode === "standard" ? (
|
|
910
|
+
a.value.mode === "standard" ? (c.value = !0, v()) : c.value = !1;
|
|
911
911
|
});
|
|
912
|
-
function
|
|
913
|
-
return i(
|
|
912
|
+
function s() {
|
|
913
|
+
return i(Tt, {
|
|
914
914
|
class: "f-layout-editor-screen-resolution-selector-frame",
|
|
915
915
|
items: n.value,
|
|
916
916
|
modelValue: o.value,
|
|
@@ -924,20 +924,20 @@ const jt = /* @__PURE__ */ q({
|
|
|
924
924
|
class: "f-layout-editor-screen-resolution-selector-header"
|
|
925
925
|
}, [i("div", {
|
|
926
926
|
class: "f-layout-editor-screen-resolution-selector-form"
|
|
927
|
-
}, [G("表单布局配置")])]),
|
|
927
|
+
}, [G("表单布局配置")])]), s(), i("div", {
|
|
928
928
|
class: "f-layout-editor-screen-resolution-selector-switch"
|
|
929
|
-
}, [i(
|
|
929
|
+
}, [i(Vt, {
|
|
930
930
|
class: "f-layout-editor-show-switch",
|
|
931
|
-
modelValue:
|
|
932
|
-
"onUpdate:modelValue": (p) =>
|
|
931
|
+
modelValue: c.value,
|
|
932
|
+
"onUpdate:modelValue": (p) => c.value = p,
|
|
933
933
|
onModelValueChanged: v
|
|
934
|
-
}, null),
|
|
934
|
+
}, null), c.value ? i("div", {
|
|
935
935
|
class: "f-layout-editor-show-switch-label"
|
|
936
936
|
}, [G("标准模式")]) : i("div", {
|
|
937
937
|
class: "f-layout-editor-show-switch-label"
|
|
938
938
|
}, [G("自定义模式")])])]);
|
|
939
939
|
}
|
|
940
|
-
}),
|
|
940
|
+
}), Ht = {
|
|
941
941
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
942
942
|
currentScreenResolution: { type: String, default: "" },
|
|
943
943
|
/** 模式开关 */
|
|
@@ -959,8 +959,8 @@ const jt = /* @__PURE__ */ q({
|
|
|
959
959
|
emits: [],
|
|
960
960
|
setup(e, t) {
|
|
961
961
|
const n = l(e.item), a = l(e.currentScreenResolution), o = R(() => `col-${n.value[`columnIn${a.value}`]}`);
|
|
962
|
-
return O([() => e.item, () => e.currentScreenResolution], ([u,
|
|
963
|
-
u !== f && (n.value = u),
|
|
962
|
+
return O([() => e.item, () => e.currentScreenResolution], ([u, c], [f, v]) => {
|
|
963
|
+
u !== f && (n.value = u), c !== v && (a.value = c);
|
|
964
964
|
}), () => i("div", {
|
|
965
965
|
class: o.value
|
|
966
966
|
}, [i("div", {
|
|
@@ -970,41 +970,41 @@ const jt = /* @__PURE__ */ q({
|
|
|
970
970
|
class: "f-layout-editor-column-width-view-label"
|
|
971
971
|
}, [n.value.label])])]);
|
|
972
972
|
}
|
|
973
|
-
}),
|
|
973
|
+
}), Gt = /* @__PURE__ */ q({
|
|
974
974
|
name: "FPreview",
|
|
975
|
-
props:
|
|
975
|
+
props: Ht,
|
|
976
976
|
emits: ["update:twoDimensionalArray"],
|
|
977
977
|
setup(e, t) {
|
|
978
|
-
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.currentArea), u = l(e.twoDimensionalArray),
|
|
979
|
-
O([() => e.currentArea, () => e.switchInStandardMode, () => e.currentScreenResolution], ([
|
|
980
|
-
|
|
978
|
+
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.currentArea), u = l(e.twoDimensionalArray), c = l([]);
|
|
979
|
+
O([() => e.currentArea, () => e.switchInStandardMode, () => e.currentScreenResolution], ([r, d, h], [g, T, w]) => {
|
|
980
|
+
r !== g && (o.value = r), d !== T && (a.value = d), h !== w && (n.value = h);
|
|
981
981
|
}), O(() => e.twoDimensionalArray, () => {
|
|
982
982
|
u.value = e.twoDimensionalArray, f();
|
|
983
983
|
}), J(() => {
|
|
984
984
|
f();
|
|
985
985
|
});
|
|
986
986
|
function f() {
|
|
987
|
-
|
|
987
|
+
c.value = U(u.value), c.value = v();
|
|
988
988
|
}
|
|
989
989
|
function v() {
|
|
990
|
-
const
|
|
991
|
-
let
|
|
992
|
-
return
|
|
993
|
-
const
|
|
994
|
-
|
|
995
|
-
}),
|
|
996
|
-
}
|
|
997
|
-
function r
|
|
990
|
+
const r = [];
|
|
991
|
+
let d = 1;
|
|
992
|
+
return c.value.forEach((h) => {
|
|
993
|
+
const g = s(h, d);
|
|
994
|
+
d += g.length, r.push(g);
|
|
995
|
+
}), r;
|
|
996
|
+
}
|
|
997
|
+
function s(r, d) {
|
|
998
998
|
const h = [];
|
|
999
|
-
let
|
|
1000
|
-
return
|
|
1001
|
-
|
|
1002
|
-
}), h.push(
|
|
999
|
+
let g = [];
|
|
1000
|
+
return r.forEach((T) => {
|
|
1001
|
+
d !== T.componentRow && (d += 1, h.push(g), g = []), g.push(T);
|
|
1002
|
+
}), h.push(g), h;
|
|
1003
1003
|
}
|
|
1004
1004
|
function p() {
|
|
1005
1005
|
if (a.value)
|
|
1006
1006
|
return "";
|
|
1007
|
-
const
|
|
1007
|
+
const r = Array.from({
|
|
1008
1008
|
length: 12
|
|
1009
1009
|
}, () => i("div", {
|
|
1010
1010
|
class: "col-1"
|
|
@@ -1013,7 +1013,7 @@ const jt = /* @__PURE__ */ q({
|
|
|
1013
1013
|
}, [G(" ")])]));
|
|
1014
1014
|
return i("div", {
|
|
1015
1015
|
class: "f-layout-editor-preview-customize-whole-background"
|
|
1016
|
-
}, [
|
|
1016
|
+
}, [r]);
|
|
1017
1017
|
}
|
|
1018
1018
|
return () => i("div", {
|
|
1019
1019
|
class: "f-layout-editor-preview f-utils-fill-flex-column"
|
|
@@ -1023,19 +1023,19 @@ const jt = /* @__PURE__ */ q({
|
|
|
1023
1023
|
class: "f-layout-editor-preview-view f-utils-overflow-xhya"
|
|
1024
1024
|
}, [i("div", {
|
|
1025
1025
|
class: "f-layout-editor-preview-row-group"
|
|
1026
|
-
}, [
|
|
1027
|
-
var
|
|
1028
|
-
return ((
|
|
1026
|
+
}, [c.value.map((r) => {
|
|
1027
|
+
var d, h;
|
|
1028
|
+
return ((d = r[0][0]) == null ? void 0 : d.group.toString()) === ((h = o.value[0]) == null ? void 0 : h.id) && r.map((g) => i("div", {
|
|
1029
1029
|
class: "f-layout-editor-row"
|
|
1030
|
-
}, [
|
|
1031
|
-
item:
|
|
1032
|
-
"onUpdate:item": (w) =>
|
|
1030
|
+
}, [g.map((T) => i(Pt, {
|
|
1031
|
+
item: T,
|
|
1032
|
+
"onUpdate:item": (w) => T = w,
|
|
1033
1033
|
currentScreenResolution: n.value,
|
|
1034
1034
|
switchInStandardMode: a.value
|
|
1035
1035
|
}, null))]));
|
|
1036
1036
|
})])])]);
|
|
1037
1037
|
}
|
|
1038
|
-
}),
|
|
1038
|
+
}), qt = {
|
|
1039
1039
|
/** 用户切换屏幕分辨率-缩写-例:MD; */
|
|
1040
1040
|
currentScreenResolution: { type: String, default: "" },
|
|
1041
1041
|
/** 检测用户是否切换模式 */
|
|
@@ -1053,52 +1053,52 @@ const jt = /* @__PURE__ */ q({
|
|
|
1053
1053
|
onOriginalDataChanged: { type: Function, default: () => {
|
|
1054
1054
|
} }
|
|
1055
1055
|
};
|
|
1056
|
-
function
|
|
1056
|
+
function Ut(e, t) {
|
|
1057
1057
|
const n = l(-1), a = l(!1);
|
|
1058
|
-
function o(
|
|
1059
|
-
if (
|
|
1060
|
-
const
|
|
1061
|
-
|
|
1058
|
+
function o(r) {
|
|
1059
|
+
if (r.target.offsetParent) {
|
|
1060
|
+
const d = r.target.offsetParent, h = d.offsetWidth - r.target.offsetWidth / 2 - 4, g = d.offsetHeight / 2;
|
|
1061
|
+
r.dataTransfer && r.dataTransfer.setDragImage(d, h, g);
|
|
1062
1062
|
}
|
|
1063
1063
|
}
|
|
1064
|
-
function u(
|
|
1065
|
-
if (
|
|
1066
|
-
const
|
|
1064
|
+
function u(r) {
|
|
1065
|
+
if (r) {
|
|
1066
|
+
const d = e.value.findIndex((h) => h.label === r.label);
|
|
1067
1067
|
setTimeout(() => {
|
|
1068
|
-
n.value =
|
|
1068
|
+
n.value = d, a.value = !0, r.moving = !0;
|
|
1069
1069
|
});
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
|
|
1072
|
+
function c(r, d) {
|
|
1073
|
+
r.stopPropagation(), o(r), u(d);
|
|
1074
1074
|
}
|
|
1075
|
-
function f(
|
|
1076
|
-
const
|
|
1077
|
-
if (n.value !==
|
|
1078
|
-
const h = e.value[n.value],
|
|
1079
|
-
|
|
1075
|
+
function f(r) {
|
|
1076
|
+
const d = e.value.findIndex((h) => h.label === r.label);
|
|
1077
|
+
if (n.value !== d) {
|
|
1078
|
+
const h = e.value[n.value], g = e.value;
|
|
1079
|
+
g.splice(n.value, 1), g.splice(d, 0, h), n.value = d, t && t();
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
|
-
function v(
|
|
1083
|
-
|
|
1082
|
+
function v(r, d) {
|
|
1083
|
+
r.preventDefault(), f(d);
|
|
1084
1084
|
}
|
|
1085
|
-
function r
|
|
1086
|
-
|
|
1085
|
+
function s(r) {
|
|
1086
|
+
r.preventDefault(), r.dataTransfer && (r.dataTransfer.dropEffect = "move");
|
|
1087
1087
|
}
|
|
1088
|
-
function p(
|
|
1089
|
-
|
|
1088
|
+
function p(r, d) {
|
|
1089
|
+
d && (d.moving = !1), a.value = !1;
|
|
1090
1090
|
}
|
|
1091
1091
|
return {
|
|
1092
|
-
dragstart:
|
|
1092
|
+
dragstart: c,
|
|
1093
1093
|
dragenter: v,
|
|
1094
|
-
dragover:
|
|
1094
|
+
dragover: s,
|
|
1095
1095
|
dragend: p,
|
|
1096
1096
|
isDragging: a
|
|
1097
1097
|
};
|
|
1098
1098
|
}
|
|
1099
|
-
const
|
|
1099
|
+
const Xt = /* @__PURE__ */ new Map([
|
|
1100
1100
|
["appearance", ee]
|
|
1101
|
-
]),
|
|
1101
|
+
]), Yt = "https://json-schema.org/draft/2020-12/schema", Jt = "https://farris-design.gitee.io/combo-list.schema.json", Qt = "combo-list", Zt = "A Farris Input Component", _t = "object", Kt = {
|
|
1102
1102
|
id: {
|
|
1103
1103
|
description: "The unique identifier for a combo list",
|
|
1104
1104
|
type: "string"
|
|
@@ -1153,7 +1153,7 @@ const Ut = /* @__PURE__ */ new Map([
|
|
|
1153
1153
|
valueField: {
|
|
1154
1154
|
description: "",
|
|
1155
1155
|
type: "string",
|
|
1156
|
-
default: "
|
|
1156
|
+
default: "value"
|
|
1157
1157
|
},
|
|
1158
1158
|
titleField: {
|
|
1159
1159
|
description: "",
|
|
@@ -1209,19 +1209,19 @@ const Ut = /* @__PURE__ */ new Map([
|
|
|
1209
1209
|
type: "sting",
|
|
1210
1210
|
default: ""
|
|
1211
1211
|
}
|
|
1212
|
-
},
|
|
1212
|
+
}, en = [
|
|
1213
1213
|
"id",
|
|
1214
1214
|
"type"
|
|
1215
|
-
],
|
|
1216
|
-
$schema:
|
|
1217
|
-
$id:
|
|
1218
|
-
title:
|
|
1219
|
-
description:
|
|
1220
|
-
type:
|
|
1221
|
-
properties:
|
|
1222
|
-
required:
|
|
1215
|
+
], tn = {
|
|
1216
|
+
$schema: Yt,
|
|
1217
|
+
$id: Jt,
|
|
1218
|
+
title: Qt,
|
|
1219
|
+
description: Zt,
|
|
1220
|
+
type: _t,
|
|
1221
|
+
properties: Kt,
|
|
1222
|
+
required: en
|
|
1223
1223
|
};
|
|
1224
|
-
function
|
|
1224
|
+
function nn(e, t, n) {
|
|
1225
1225
|
return t;
|
|
1226
1226
|
}
|
|
1227
1227
|
const Ee = {
|
|
@@ -1383,10 +1383,16 @@ const Ee = {
|
|
|
1383
1383
|
/**
|
|
1384
1384
|
* 打开前
|
|
1385
1385
|
*/
|
|
1386
|
-
beforeOpen: { type: Function, default: null }
|
|
1386
|
+
beforeOpen: { type: Function, default: null },
|
|
1387
|
+
searchOption: {
|
|
1388
|
+
type: Object,
|
|
1389
|
+
default: !1
|
|
1390
|
+
},
|
|
1391
|
+
// 搜索启用高亮
|
|
1392
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1387
1393
|
};
|
|
1388
|
-
K(Ee,
|
|
1389
|
-
const
|
|
1394
|
+
K(Ee, tn, Xt, nn);
|
|
1395
|
+
const an = {
|
|
1390
1396
|
dataSource: { type: Array, default: [] },
|
|
1391
1397
|
enableSearch: { type: Boolean, default: !1 },
|
|
1392
1398
|
idField: { type: String, default: "id" },
|
|
@@ -1400,71 +1406,93 @@ const nn = {
|
|
|
1400
1406
|
valueField: { type: String, default: "id" },
|
|
1401
1407
|
/** 值变化事件 */
|
|
1402
1408
|
onSelectionChange: { type: Function, default: () => {
|
|
1403
|
-
} }
|
|
1404
|
-
|
|
1409
|
+
} },
|
|
1410
|
+
searchOption: {
|
|
1411
|
+
type: Object,
|
|
1412
|
+
default: !1
|
|
1413
|
+
},
|
|
1414
|
+
// 搜索启用高亮
|
|
1415
|
+
enableHighlightSearch: { type: Boolean, default: !0 }
|
|
1416
|
+
}, ln = /* @__PURE__ */ q({
|
|
1405
1417
|
name: "FComboListContainer",
|
|
1406
|
-
props:
|
|
1418
|
+
props: an,
|
|
1407
1419
|
emits: ["selectionChange"],
|
|
1408
1420
|
setup(e, t) {
|
|
1409
|
-
const n = l(e.dataSource),
|
|
1421
|
+
const n = l(), a = l(e.dataSource), o = l([]), u = l(e.separator), c = l(e.width), f = l(e.maxHeight), v = l(String(e.selectedValues).split(u.value));
|
|
1410
1422
|
O(e.dataSource, () => {
|
|
1411
|
-
|
|
1423
|
+
a.value = e.dataSource;
|
|
1412
1424
|
});
|
|
1413
|
-
const
|
|
1414
|
-
const
|
|
1415
|
-
return
|
|
1425
|
+
const s = R(() => e.enableSearch ? "SearchBar" : "ContentHeader"), p = R(() => {
|
|
1426
|
+
const h = {};
|
|
1427
|
+
return c.value !== void 0 && (h.width = `${c.value}px`), f.value !== void 0 && f.value > 0 && (h.maxHeight = `${f.value}px`), h;
|
|
1416
1428
|
});
|
|
1417
|
-
function
|
|
1418
|
-
|
|
1429
|
+
function r(h) {
|
|
1430
|
+
o.value = h.map((g) => Object.assign({}, g)), v.value = h.map((g) => g[e.idField]), t.emit("selectionChange", o.value);
|
|
1431
|
+
}
|
|
1432
|
+
function d(h) {
|
|
1433
|
+
if (e.enableHighlightSearch)
|
|
1434
|
+
return;
|
|
1435
|
+
let g = [];
|
|
1436
|
+
typeof e.searchOption == "function" ? g = a.value.filter((T) => e.searchOption(h, T)) : g = a.value.filter((T) => T[e.valueField].indexOf(h) > -1 || T[e.textField].indexOf(h) > -1), n.value.updateDataSource(g);
|
|
1419
1437
|
}
|
|
1420
|
-
return O([() => e.selectedValues], ([
|
|
1421
|
-
|
|
1438
|
+
return O([() => e.selectedValues], ([h]) => {
|
|
1439
|
+
v.value = h.split(u.value);
|
|
1422
1440
|
}), () => i("div", {
|
|
1423
1441
|
class: "f-combo-list-container pl-3",
|
|
1424
|
-
style:
|
|
1425
|
-
}, [i(
|
|
1442
|
+
style: p.value
|
|
1443
|
+
}, [i(tt, {
|
|
1444
|
+
ref: n,
|
|
1426
1445
|
size: "small",
|
|
1427
1446
|
itemClass: "f-combo-list-item",
|
|
1428
|
-
header:
|
|
1447
|
+
header: s.value,
|
|
1429
1448
|
headerClass: "f-combo-list-search-box",
|
|
1430
|
-
data:
|
|
1449
|
+
data: a.value,
|
|
1431
1450
|
idField: e.idField,
|
|
1432
1451
|
textField: e.textField,
|
|
1433
1452
|
titleField: e.titleField,
|
|
1434
1453
|
multiSelect: e.multiSelect,
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1454
|
+
selection: {
|
|
1455
|
+
enableSelectRow: !0,
|
|
1456
|
+
multiSelect: !0,
|
|
1457
|
+
multiSelectMode: "OnCheckAndClick",
|
|
1458
|
+
showCheckbox: !0,
|
|
1459
|
+
showSelectAll: !1,
|
|
1460
|
+
showSelection: !0
|
|
1461
|
+
},
|
|
1462
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
1463
|
+
selectionValues: v.value,
|
|
1464
|
+
onSelectionChange: r,
|
|
1465
|
+
onAfterSearch: d
|
|
1438
1466
|
}, null)]);
|
|
1439
1467
|
}
|
|
1440
1468
|
});
|
|
1441
|
-
function
|
|
1469
|
+
function on(e) {
|
|
1442
1470
|
const t = l(""), n = l(e.modelValue), a = l(e.data || []), o = l(e.editable);
|
|
1443
|
-
function u(
|
|
1444
|
-
const
|
|
1445
|
-
return a.value.filter((
|
|
1471
|
+
function u(r) {
|
|
1472
|
+
const d = String(r).split(e.separator).map((g) => [g, !0]), h = new Map(d);
|
|
1473
|
+
return a.value.filter((g) => h.has(String(g[e.valueField])));
|
|
1446
1474
|
}
|
|
1447
|
-
function
|
|
1448
|
-
const
|
|
1449
|
-
t.value = o.value ?
|
|
1475
|
+
function c(r) {
|
|
1476
|
+
const d = u(r).map((h) => h[e.textField]).join(e.separator);
|
|
1477
|
+
t.value = o.value ? d || r : d;
|
|
1450
1478
|
}
|
|
1451
|
-
function f(
|
|
1452
|
-
const
|
|
1453
|
-
return a.value.filter((
|
|
1479
|
+
function f(r) {
|
|
1480
|
+
const d = r.split(e.separator).map((g) => [g, !0]), h = new Map(d);
|
|
1481
|
+
return a.value.filter((g) => h.has(g[e.textField]));
|
|
1454
1482
|
}
|
|
1455
|
-
function v(
|
|
1456
|
-
const
|
|
1457
|
-
return
|
|
1483
|
+
function v(r) {
|
|
1484
|
+
const d = {};
|
|
1485
|
+
return d[e.idField] = r, d[e.textField] = r, [d];
|
|
1458
1486
|
}
|
|
1459
|
-
function r
|
|
1460
|
-
let
|
|
1461
|
-
const h =
|
|
1462
|
-
return o.value && !h && (
|
|
1487
|
+
function s(r) {
|
|
1488
|
+
let d = f(r);
|
|
1489
|
+
const h = d && d.length > 0;
|
|
1490
|
+
return o.value && !h && (d = v(r)), d;
|
|
1463
1491
|
}
|
|
1464
1492
|
function p() {
|
|
1465
|
-
const { url:
|
|
1493
|
+
const { url: r, method: d = "GET", headers: h = {}, body: g = null } = e.remote, T = d.toLowerCase() == "get" ? { method: d, headers: h } : { method: d, headers: h, body: g };
|
|
1466
1494
|
let w = !1;
|
|
1467
|
-
fetch(
|
|
1495
|
+
fetch(r, T).then((S) => {
|
|
1468
1496
|
var L, j;
|
|
1469
1497
|
if (S.status === 200)
|
|
1470
1498
|
return w = !!((j = (L = S.headers) == null ? void 0 : L.get("content-type")) != null && j.includes("application/json")), w ? S.text() : S.json();
|
|
@@ -1477,42 +1505,42 @@ function ln(e) {
|
|
|
1477
1505
|
}
|
|
1478
1506
|
return e.remote && p(), O(() => e.data, () => {
|
|
1479
1507
|
a.value = e.data;
|
|
1480
|
-
}), O([a], ([
|
|
1508
|
+
}), O([a], ([r]) => {
|
|
1481
1509
|
if (e.modelValue) {
|
|
1482
|
-
const
|
|
1483
|
-
|
|
1510
|
+
const d = r.find((h) => h[e.valueField] === e.modelValue);
|
|
1511
|
+
d && (t.value = d[e.textField]);
|
|
1484
1512
|
}
|
|
1485
|
-
}), O(() => e.modelValue, (
|
|
1486
|
-
n.value =
|
|
1487
|
-
}),
|
|
1513
|
+
}), O(() => e.modelValue, (r) => {
|
|
1514
|
+
n.value = r, c(r);
|
|
1515
|
+
}), c(e.modelValue), { dataSource: a, displayText: t, editable: o, modelValue: n, getItemsByDisplayText: f, getItemsByValue: u, getSelectedItemsByDisplayText: s };
|
|
1488
1516
|
}
|
|
1489
|
-
const
|
|
1517
|
+
const un = /* @__PURE__ */ q({
|
|
1490
1518
|
name: "FComboList",
|
|
1491
1519
|
props: Ee,
|
|
1492
1520
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
1493
1521
|
setup(e, t) {
|
|
1494
|
-
const n = l(), a = l(e.disabled), o = l(e.enableClear), u = l(e.enableSearch),
|
|
1522
|
+
const n = l(), a = l(e.disabled), o = l(e.enableClear), u = l(e.enableSearch), c = l(e.readonly), {
|
|
1495
1523
|
dataSource: f,
|
|
1496
1524
|
displayText: v,
|
|
1497
|
-
editable:
|
|
1525
|
+
editable: s,
|
|
1498
1526
|
modelValue: p,
|
|
1499
|
-
getSelectedItemsByDisplayText:
|
|
1500
|
-
} =
|
|
1501
|
-
function
|
|
1502
|
-
!
|
|
1527
|
+
getSelectedItemsByDisplayText: r
|
|
1528
|
+
} = on(e), d = R(() => e.multiSelect), h = R(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1529
|
+
function g() {
|
|
1530
|
+
!d.value && n.value && n.value.hidePopup();
|
|
1503
1531
|
}
|
|
1504
|
-
function
|
|
1505
|
-
v.value = W.map((y) => y[e.textField]).join(e.separator), W.length === 1 ? p.value = W[0][e.valueField] : p.value = W.map((y) => y[e.valueField]).join(e.separator), t.emit("update:modelValue", p.value), t.emit("change", W, p.value),
|
|
1532
|
+
function T(W) {
|
|
1533
|
+
v.value = W.map((y) => y[e.textField]).join(e.separator), W.length === 1 ? p.value = W[0][e.valueField] : p.value = W.map((y) => y[e.valueField]).join(e.separator), t.emit("update:modelValue", p.value), t.emit("change", W, p.value), g();
|
|
1506
1534
|
}
|
|
1507
1535
|
function w() {
|
|
1508
|
-
|
|
1536
|
+
c.value || n.value.togglePopup();
|
|
1509
1537
|
}
|
|
1510
1538
|
function S(W) {
|
|
1511
1539
|
p.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1512
1540
|
}
|
|
1513
1541
|
function k(W) {
|
|
1514
|
-
const y =
|
|
1515
|
-
|
|
1542
|
+
const y = r(W);
|
|
1543
|
+
T(y);
|
|
1516
1544
|
}
|
|
1517
1545
|
function L() {
|
|
1518
1546
|
return v.value;
|
|
@@ -1522,15 +1550,15 @@ const on = /* @__PURE__ */ q({
|
|
|
1522
1550
|
}
|
|
1523
1551
|
return t.expose({
|
|
1524
1552
|
getDisplayText: L
|
|
1525
|
-
}), O([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([W, y,
|
|
1526
|
-
a.value = W,
|
|
1527
|
-
}), () => i(
|
|
1553
|
+
}), O([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([W, y, E, b, m]) => {
|
|
1554
|
+
a.value = W, s.value = y, o.value = E, u.value = b, c.value = m;
|
|
1555
|
+
}), () => i(nt, {
|
|
1528
1556
|
ref: n,
|
|
1529
1557
|
id: e.id,
|
|
1530
1558
|
disable: a.value,
|
|
1531
|
-
readonly:
|
|
1559
|
+
readonly: c.value,
|
|
1532
1560
|
forcePlaceholder: e.forcePlaceholder,
|
|
1533
|
-
editable:
|
|
1561
|
+
editable: s.value,
|
|
1534
1562
|
buttonContent: e.dropDownIcon,
|
|
1535
1563
|
placeholder: e.placeholder,
|
|
1536
1564
|
enableClear: o.value,
|
|
@@ -1549,7 +1577,7 @@ const on = /* @__PURE__ */ q({
|
|
|
1549
1577
|
onInput: j,
|
|
1550
1578
|
beforeOpen: e.beforeOpen
|
|
1551
1579
|
}, {
|
|
1552
|
-
default: () => [i(
|
|
1580
|
+
default: () => [i(ln, {
|
|
1553
1581
|
idField: e.idField,
|
|
1554
1582
|
valueField: e.valueField,
|
|
1555
1583
|
textField: e.textField,
|
|
@@ -1559,12 +1587,13 @@ const on = /* @__PURE__ */ q({
|
|
|
1559
1587
|
multiSelect: e.multiSelect,
|
|
1560
1588
|
enableSearch: u.value,
|
|
1561
1589
|
maxHeight: e.maxHeight,
|
|
1590
|
+
enableHighlightSearch: e.enableHighlightSearch,
|
|
1562
1591
|
width: e.fitEditor ? h.value : void 0,
|
|
1563
|
-
onSelectionChange:
|
|
1592
|
+
onSelectionChange: T
|
|
1564
1593
|
}, null)]
|
|
1565
1594
|
});
|
|
1566
1595
|
}
|
|
1567
|
-
}),
|
|
1596
|
+
}), sn = {
|
|
1568
1597
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
1569
1598
|
currentScreenResolution: { type: String, default: "" },
|
|
1570
1599
|
/** 传入的单个控件的响应式列宽值 */
|
|
@@ -1574,13 +1603,13 @@ const on = /* @__PURE__ */ q({
|
|
|
1574
1603
|
/** 列数值变化事件 */
|
|
1575
1604
|
fieldChanged: { type: Function, default: () => {
|
|
1576
1605
|
} }
|
|
1577
|
-
},
|
|
1606
|
+
}, rn = /* @__PURE__ */ new Map([
|
|
1578
1607
|
["appearance", ee]
|
|
1579
1608
|
]);
|
|
1580
|
-
function
|
|
1609
|
+
function cn(e, t, n) {
|
|
1581
1610
|
return t;
|
|
1582
1611
|
}
|
|
1583
|
-
const
|
|
1612
|
+
const dn = "https://json-schema.org/draft/2020-12/schema", fn = "https://farris-design.gitee.io/radio-button.schema.json", pn = "radio-button", vn = "A Farris Component", mn = "object", hn = {
|
|
1584
1613
|
id: {
|
|
1585
1614
|
description: "The unique identifier for radio-button",
|
|
1586
1615
|
type: "string"
|
|
@@ -1642,18 +1671,18 @@ const cn = "https://json-schema.org/draft/2020-12/schema", dn = "https://farris-
|
|
|
1642
1671
|
type: "boolean",
|
|
1643
1672
|
default: !0
|
|
1644
1673
|
}
|
|
1645
|
-
},
|
|
1674
|
+
}, yn = [
|
|
1646
1675
|
"id",
|
|
1647
1676
|
"type"
|
|
1648
|
-
],
|
|
1649
|
-
$schema:
|
|
1650
|
-
$id:
|
|
1651
|
-
title:
|
|
1652
|
-
description:
|
|
1653
|
-
type:
|
|
1654
|
-
properties:
|
|
1655
|
-
required:
|
|
1656
|
-
},
|
|
1677
|
+
], gn = {
|
|
1678
|
+
$schema: dn,
|
|
1679
|
+
$id: fn,
|
|
1680
|
+
title: pn,
|
|
1681
|
+
description: vn,
|
|
1682
|
+
type: mn,
|
|
1683
|
+
properties: hn,
|
|
1684
|
+
required: yn
|
|
1685
|
+
}, bn = "radio-button", wn = "A Farris Component", Sn = "object", Cn = {
|
|
1657
1686
|
basic: {
|
|
1658
1687
|
description: "Basic Infomation",
|
|
1659
1688
|
title: "基本信息",
|
|
@@ -1675,11 +1704,11 @@ const cn = "https://json-schema.org/draft/2020-12/schema", dn = "https://farris-
|
|
|
1675
1704
|
}
|
|
1676
1705
|
}
|
|
1677
1706
|
}
|
|
1678
|
-
},
|
|
1679
|
-
title:
|
|
1680
|
-
description:
|
|
1681
|
-
type:
|
|
1682
|
-
categories:
|
|
1707
|
+
}, Mn = {
|
|
1708
|
+
title: bn,
|
|
1709
|
+
description: wn,
|
|
1710
|
+
type: Sn,
|
|
1711
|
+
categories: Cn
|
|
1683
1712
|
}, De = {
|
|
1684
1713
|
/**
|
|
1685
1714
|
* 单选组枚举数组
|
|
@@ -1695,45 +1724,45 @@ const cn = "https://json-schema.org/draft/2020-12/schema", dn = "https://farris-
|
|
|
1695
1724
|
onSelectedValueChanged: { type: Function, default: () => {
|
|
1696
1725
|
} }
|
|
1697
1726
|
};
|
|
1698
|
-
K(De,
|
|
1699
|
-
const
|
|
1727
|
+
K(De, gn, rn, cn, Mn);
|
|
1728
|
+
const In = /* @__PURE__ */ q({
|
|
1700
1729
|
name: "FRadioButton",
|
|
1701
1730
|
props: De,
|
|
1702
1731
|
emits: ["selectedValueChanged"],
|
|
1703
1732
|
setup(e, t) {
|
|
1704
1733
|
const n = l(e.enumData);
|
|
1705
|
-
function a(u,
|
|
1734
|
+
function a(u, c) {
|
|
1706
1735
|
if (u.currentTarget.classList.value = "btn btn-secondary active", u.currentTarget.tagName.toLowerCase() === "label") {
|
|
1707
1736
|
const {
|
|
1708
1737
|
currentTarget: f
|
|
1709
1738
|
} = u, v = f.parentElement;
|
|
1710
1739
|
Array.from(v.querySelectorAll("label")).filter((p) => p !== f).forEach((p) => p.classList.remove("active"));
|
|
1711
1740
|
}
|
|
1712
|
-
t.emit("selectedValueChanged",
|
|
1741
|
+
t.emit("selectedValueChanged", c);
|
|
1713
1742
|
}
|
|
1714
1743
|
function o(u) {
|
|
1715
1744
|
return `${u.text}${e.suffixValue}`;
|
|
1716
1745
|
}
|
|
1717
|
-
return O(() => e.enumData, (u,
|
|
1718
|
-
u !==
|
|
1746
|
+
return O(() => e.enumData, (u, c) => {
|
|
1747
|
+
u !== c && (n.value = e.enumData);
|
|
1719
1748
|
}), () => i("div", {
|
|
1720
1749
|
class: "f-radio-button"
|
|
1721
1750
|
}, [i("div", {
|
|
1722
1751
|
class: ["farris-input-wrap"]
|
|
1723
|
-
}, [n.value.map((u,
|
|
1752
|
+
}, [n.value.map((u, c) => i(ue, null, [i("label", {
|
|
1724
1753
|
class: u.active ? "btn btn-secondary active" : "btn btn-secondary",
|
|
1725
1754
|
onClick: (f) => a(f, u)
|
|
1726
1755
|
}, [i("span", {
|
|
1727
1756
|
class: "f-radio-button-text"
|
|
1728
1757
|
}, [o(u)])])]))])]);
|
|
1729
1758
|
}
|
|
1730
|
-
}),
|
|
1759
|
+
}), xn = /* @__PURE__ */ new Map([
|
|
1731
1760
|
["appearance", ee]
|
|
1732
1761
|
]);
|
|
1733
|
-
function
|
|
1762
|
+
function En(e, t, n) {
|
|
1734
1763
|
return t;
|
|
1735
1764
|
}
|
|
1736
|
-
const
|
|
1765
|
+
const Dn = "https://json-schema.org/draft/2020-12/schema", Tn = "https://farris-design.gitee.io/rate.schema.json", Bn = "rate", Ln = "A Farris Component", Rn = "object", Fn = {
|
|
1737
1766
|
id: {
|
|
1738
1767
|
description: "The unique identifier for rate",
|
|
1739
1768
|
type: "string"
|
|
@@ -1795,18 +1824,18 @@ const En = "https://json-schema.org/draft/2020-12/schema", Dn = "https://farris-
|
|
|
1795
1824
|
type: "boolean",
|
|
1796
1825
|
default: !0
|
|
1797
1826
|
}
|
|
1798
|
-
},
|
|
1827
|
+
}, kn = [
|
|
1799
1828
|
"id",
|
|
1800
1829
|
"type"
|
|
1801
|
-
],
|
|
1802
|
-
$schema:
|
|
1803
|
-
$id:
|
|
1804
|
-
title:
|
|
1805
|
-
description:
|
|
1806
|
-
type:
|
|
1807
|
-
properties:
|
|
1808
|
-
required:
|
|
1809
|
-
},
|
|
1830
|
+
], $n = {
|
|
1831
|
+
$schema: Dn,
|
|
1832
|
+
$id: Tn,
|
|
1833
|
+
title: Bn,
|
|
1834
|
+
description: Ln,
|
|
1835
|
+
type: Rn,
|
|
1836
|
+
properties: Fn,
|
|
1837
|
+
required: kn
|
|
1838
|
+
}, Wn = "rate", An = "A Farris Component", On = "object", jn = {
|
|
1810
1839
|
basic: {
|
|
1811
1840
|
description: "Basic Infomation",
|
|
1812
1841
|
title: "基本信息",
|
|
@@ -1828,12 +1857,12 @@ const En = "https://json-schema.org/draft/2020-12/schema", Dn = "https://farris-
|
|
|
1828
1857
|
}
|
|
1829
1858
|
}
|
|
1830
1859
|
}
|
|
1831
|
-
},
|
|
1832
|
-
title:
|
|
1833
|
-
description:
|
|
1834
|
-
type:
|
|
1835
|
-
categories:
|
|
1836
|
-
},
|
|
1860
|
+
}, Vn = {
|
|
1861
|
+
title: Wn,
|
|
1862
|
+
description: An,
|
|
1863
|
+
type: On,
|
|
1864
|
+
categories: jn
|
|
1865
|
+
}, zn = ["很不满意", "不满意", "一般", "满意", "非常满意"], Te = {
|
|
1837
1866
|
/** 星星大小 */
|
|
1838
1867
|
size: { type: String, default: "large" },
|
|
1839
1868
|
/** 启用半颗星模式 */
|
|
@@ -1855,7 +1884,7 @@ const En = "https://json-schema.org/draft/2020-12/schema", Dn = "https://farris-
|
|
|
1855
1884
|
/** 禁用单个星星的文字提示 */
|
|
1856
1885
|
toolTipDisabled: { type: Boolean, default: !0 },
|
|
1857
1886
|
/** 默认的满意度文案 */
|
|
1858
|
-
toolTipContents: { type: Array, default:
|
|
1887
|
+
toolTipContents: { type: Array, default: zn },
|
|
1859
1888
|
/** 启用评分 */
|
|
1860
1889
|
enableScore: { type: Boolean, default: !0 },
|
|
1861
1890
|
/** 启用满意度 */
|
|
@@ -1866,72 +1895,72 @@ const En = "https://json-schema.org/draft/2020-12/schema", Dn = "https://farris-
|
|
|
1866
1895
|
value: { type: Number, default: 0 },
|
|
1867
1896
|
modelValue: { type: Number, default: 0 }
|
|
1868
1897
|
};
|
|
1869
|
-
K(Te,
|
|
1870
|
-
const
|
|
1898
|
+
K(Te, $n, xn, En, Vn);
|
|
1899
|
+
const Hn = /* @__PURE__ */ q({
|
|
1871
1900
|
name: "FRate",
|
|
1872
1901
|
props: Te,
|
|
1873
1902
|
emits: ["selectedValue", "update:modelValue"],
|
|
1874
1903
|
setup(e, t) {
|
|
1875
|
-
const n = l(e.size), a = l(e.enableHalf), o = l(e.enableClear), u = l(e.disabled),
|
|
1876
|
-
let
|
|
1904
|
+
const n = l(e.size), a = l(e.enableHalf), o = l(e.enableClear), u = l(e.disabled), c = l(e.pointSystem), f = l(e.lightColor), v = l(e.darkColor), s = l(e.iconClass), p = l(e.numOfStar), r = l(e.toolTipDisabled), d = l(e.toolTipContents), h = l(e.enableScore), g = l(e.enableSatisfaction);
|
|
1905
|
+
let T;
|
|
1877
1906
|
const w = l(0), S = l(0), k = l(0), L = l(e.modelValue);
|
|
1878
|
-
let j = 1, W, y,
|
|
1879
|
-
const
|
|
1907
|
+
let j = 1, W, y, E;
|
|
1908
|
+
const b = 4;
|
|
1880
1909
|
J(() => {
|
|
1881
1910
|
});
|
|
1882
1911
|
function m() {
|
|
1883
1912
|
const x = p.value;
|
|
1884
|
-
|
|
1913
|
+
E = [];
|
|
1885
1914
|
for (let $ = 1; $ <= x; $++)
|
|
1886
|
-
|
|
1915
|
+
E.push({
|
|
1887
1916
|
id: $
|
|
1888
1917
|
});
|
|
1889
1918
|
}
|
|
1890
|
-
function
|
|
1919
|
+
function B() {
|
|
1891
1920
|
let x;
|
|
1892
|
-
a.value ? x = Math.ceil(L.value / j) : x = L.value, S.value = (
|
|
1921
|
+
a.value ? x = Math.ceil(L.value / j) : x = L.value, S.value = (T * L.value + Math.floor(L.value) * b) / j, W = d.value[x - 1];
|
|
1893
1922
|
}
|
|
1894
1923
|
function A() {
|
|
1895
1924
|
switch (n.value) {
|
|
1896
1925
|
case "small":
|
|
1897
|
-
|
|
1926
|
+
T = 14;
|
|
1898
1927
|
break;
|
|
1899
1928
|
case "middle":
|
|
1900
|
-
|
|
1929
|
+
T = 16;
|
|
1901
1930
|
break;
|
|
1902
1931
|
case "large":
|
|
1903
|
-
|
|
1932
|
+
T = 18;
|
|
1904
1933
|
break;
|
|
1905
1934
|
case "extraLarge":
|
|
1906
|
-
|
|
1935
|
+
T = 24;
|
|
1907
1936
|
break;
|
|
1908
1937
|
}
|
|
1909
|
-
m(), p.value && (j =
|
|
1938
|
+
m(), p.value && (j = c.value / p.value), L.value && B();
|
|
1910
1939
|
}
|
|
1911
1940
|
A();
|
|
1912
|
-
function
|
|
1941
|
+
function N(x) {
|
|
1913
1942
|
return x.className.indexOf("f-icon") !== -1;
|
|
1914
1943
|
}
|
|
1915
1944
|
function X() {
|
|
1916
1945
|
return w.value === S.value && o.value && S.value !== 0 ? (S.value = 0, L.value = 0, y = null, w.value = 0, k.value = 0, t.emit("selectedValue", L.value), t.emit("update:modelValue", L.value), !0) : !1;
|
|
1917
1946
|
}
|
|
1918
|
-
function D(x, $,
|
|
1947
|
+
function D(x, $, H) {
|
|
1919
1948
|
if (x.movementX || x.movementY) {
|
|
1920
1949
|
if (u.value)
|
|
1921
1950
|
return;
|
|
1922
|
-
|
|
1951
|
+
g.value && (W = d.value[$ - 1]), x.offsetX < T / 2 && a.value === !0 ? (w.value = T * $ - T / 2 + b * ($ - 1), k.value = j * $ - j / 2) : (w.value = T * $ + b * ($ - 1), k.value = j * $);
|
|
1923
1952
|
}
|
|
1924
|
-
if (
|
|
1953
|
+
if (H === !0) {
|
|
1925
1954
|
if (X())
|
|
1926
1955
|
return;
|
|
1927
1956
|
L.value = k.value, S.value = w.value, y = W, t.emit("update:modelValue", L.value), t.emit("selectedValue", L.value);
|
|
1928
1957
|
}
|
|
1929
1958
|
}
|
|
1930
1959
|
function F(x, $) {
|
|
1931
|
-
var
|
|
1932
|
-
if (
|
|
1933
|
-
const
|
|
1934
|
-
D(x,
|
|
1960
|
+
var H;
|
|
1961
|
+
if (N(x.target) && x.target) {
|
|
1962
|
+
const te = parseInt((H = x.target) == null ? void 0 : H.id);
|
|
1963
|
+
D(x, te, $);
|
|
1935
1964
|
}
|
|
1936
1965
|
}
|
|
1937
1966
|
const z = R(() => k.value ? k.value + "分" : L.value + "分"), C = R(() => ({
|
|
@@ -1941,18 +1970,18 @@ const zn = /* @__PURE__ */ q({
|
|
|
1941
1970
|
w.value = 0;
|
|
1942
1971
|
}
|
|
1943
1972
|
return O(() => e.modelValue, (x) => {
|
|
1944
|
-
L.value = x,
|
|
1973
|
+
L.value = x, B();
|
|
1945
1974
|
}), () => i("div", {
|
|
1946
1975
|
class: "farris-star-rating",
|
|
1947
|
-
onMouseover:
|
|
1948
|
-
onMousemove:
|
|
1949
|
-
onMouseleave:
|
|
1950
|
-
onClick:
|
|
1976
|
+
onMouseover: le((x) => F(x, !1), ["prevent"]),
|
|
1977
|
+
onMousemove: le((x) => F(x, !1), ["prevent"]),
|
|
1978
|
+
onMouseleave: le((x) => I(), ["prevent"]),
|
|
1979
|
+
onClick: le((x) => F(x, !0), ["prevent"])
|
|
1951
1980
|
}, [i("div", {
|
|
1952
1981
|
class: "star-light-area",
|
|
1953
1982
|
style: C.value
|
|
1954
|
-
}, [
|
|
1955
|
-
class: ["f-icon default-light-color ",
|
|
1983
|
+
}, [E.map((x) => i("span", {
|
|
1984
|
+
class: ["f-icon default-light-color ", s.value, {
|
|
1956
1985
|
"f-star-sm": n.value === "small"
|
|
1957
1986
|
}, {
|
|
1958
1987
|
"f-star-md": n.value === "middle"
|
|
@@ -1961,7 +1990,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
1961
1990
|
}, {
|
|
1962
1991
|
"f-star-exlarge": n.value === "extraLarge"
|
|
1963
1992
|
}, {
|
|
1964
|
-
disabled:
|
|
1993
|
+
disabled: r.value
|
|
1965
1994
|
}],
|
|
1966
1995
|
id: x.id,
|
|
1967
1996
|
style: {
|
|
@@ -1975,8 +2004,8 @@ const zn = /* @__PURE__ */ q({
|
|
|
1975
2004
|
}, {
|
|
1976
2005
|
large: n.value === "large"
|
|
1977
2006
|
}]
|
|
1978
|
-
}, [
|
|
1979
|
-
class: ["f-icon default-dark-color",
|
|
2007
|
+
}, [E.map((x) => i("span", {
|
|
2008
|
+
class: ["f-icon default-dark-color", s.value, {
|
|
1980
2009
|
"f-star-sm": n.value === "small"
|
|
1981
2010
|
}, {
|
|
1982
2011
|
"f-star-md": n.value === "middle"
|
|
@@ -1999,11 +2028,11 @@ const zn = /* @__PURE__ */ q({
|
|
|
1999
2028
|
}, {
|
|
2000
2029
|
"font-exlarge": n.value === "extraLarge"
|
|
2001
2030
|
}]
|
|
2002
|
-
}, [h.value && i("span", null, [G(" "), z.value, G(" ")]),
|
|
2031
|
+
}, [h.value && i("span", null, [G(" "), z.value, G(" ")]), g.value && (y || W) && i("span", null, [G(" "), W || y])])]);
|
|
2003
2032
|
}
|
|
2004
2033
|
}), Nn = /* @__PURE__ */ q({
|
|
2005
2034
|
name: "FColumnWidthEditor",
|
|
2006
|
-
props:
|
|
2035
|
+
props: sn,
|
|
2007
2036
|
emits: ["fieldChanged"],
|
|
2008
2037
|
setup(e, t) {
|
|
2009
2038
|
const n = {
|
|
@@ -2011,30 +2040,30 @@ const zn = /* @__PURE__ */ q({
|
|
|
2011
2040
|
MD: ["1", "2"],
|
|
2012
2041
|
LG: ["1", "2", "3", "4"],
|
|
2013
2042
|
EL: ["1", "2", "3", "4", "5", "6"]
|
|
2014
|
-
}, a = l(e.currentScreenResolution), o = l(e.field), u = l(e.switchInStandardMode),
|
|
2015
|
-
dragstart:
|
|
2043
|
+
}, a = l(e.currentScreenResolution), o = l(e.field), u = l(e.switchInStandardMode), c = l(), f = l(""), v = l(), s = l("customize"), p = l(), r = ge("ResponseLayoutEditorDraggableComposition"), {
|
|
2044
|
+
dragstart: d,
|
|
2016
2045
|
dragenter: h,
|
|
2017
|
-
dragover:
|
|
2018
|
-
dragend:
|
|
2019
|
-
} =
|
|
2046
|
+
dragover: g,
|
|
2047
|
+
dragend: T
|
|
2048
|
+
} = r;
|
|
2020
2049
|
function w() {
|
|
2021
|
-
|
|
2050
|
+
c.value = n == null ? void 0 : n[a.value], u.value ? (f.value = `displayWidthIn${a.value}`, s.value = `${o.value[f.value]}`) : (f.value = `columnIn${a.value}`, p.value = o.value[f.value]);
|
|
2022
2051
|
}
|
|
2023
2052
|
function S(m) {
|
|
2024
2053
|
if (u.value === !0) {
|
|
2025
|
-
const
|
|
2026
|
-
v.value =
|
|
2054
|
+
const B = Number(m == null ? void 0 : m.text);
|
|
2055
|
+
v.value = B;
|
|
2027
2056
|
const A = o.value[`columnIn${a.value}`] / o.value[`displayWidthIn${a.value}`];
|
|
2028
|
-
o.value[`columnIn${a.value}`] =
|
|
2057
|
+
o.value[`columnIn${a.value}`] = B * A, o.value[`displayWidthIn${a.value}`] = Number(B), t.emit("fieldChanged", o.value);
|
|
2029
2058
|
}
|
|
2030
2059
|
}
|
|
2031
2060
|
function k(m) {
|
|
2032
2061
|
p.value = m;
|
|
2033
|
-
const
|
|
2034
|
-
o.value[`columnIn${a.value}`] = p.value, o.value[`displayWidthIn${a.value}`] = p.value /
|
|
2062
|
+
const B = o.value[`columnIn${a.value}`] / o.value[`displayWidthIn${a.value}`];
|
|
2063
|
+
o.value[`columnIn${a.value}`] = p.value, o.value[`displayWidthIn${a.value}`] = p.value / B, t.emit("fieldChanged", o.value);
|
|
2035
2064
|
}
|
|
2036
2065
|
function L() {
|
|
2037
|
-
return i(
|
|
2066
|
+
return i(Hn, {
|
|
2038
2067
|
enableHalf: !0,
|
|
2039
2068
|
size: "extraLarge",
|
|
2040
2069
|
pointSystem: 12,
|
|
@@ -2050,19 +2079,19 @@ const zn = /* @__PURE__ */ q({
|
|
|
2050
2079
|
}
|
|
2051
2080
|
function j() {
|
|
2052
2081
|
const m = [];
|
|
2053
|
-
|
|
2054
|
-
const
|
|
2055
|
-
return
|
|
2056
|
-
const
|
|
2082
|
+
c.value = n == null ? void 0 : n[a.value];
|
|
2083
|
+
const B = o.value[`displayWidthIn${a.value}`];
|
|
2084
|
+
return c.value.forEach((A) => {
|
|
2085
|
+
const N = {
|
|
2057
2086
|
text: A,
|
|
2058
|
-
active:
|
|
2087
|
+
active: B.toString() === A
|
|
2059
2088
|
};
|
|
2060
|
-
m.push(
|
|
2089
|
+
m.push(N);
|
|
2061
2090
|
}), m;
|
|
2062
2091
|
}
|
|
2063
2092
|
function W() {
|
|
2064
2093
|
const m = j();
|
|
2065
|
-
return i(
|
|
2094
|
+
return i(In, {
|
|
2066
2095
|
enumData: m,
|
|
2067
2096
|
suffixValue: "列",
|
|
2068
2097
|
onSelectedValueChanged: S
|
|
@@ -2083,7 +2112,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2083
2112
|
class: "f-layout-editor-column-width-editor-row-right"
|
|
2084
2113
|
}, null)]);
|
|
2085
2114
|
}
|
|
2086
|
-
function
|
|
2115
|
+
function E() {
|
|
2087
2116
|
return u.value ? i("div", {
|
|
2088
2117
|
class: "f-column-width-editor-switch-standard"
|
|
2089
2118
|
}, [i("div", {
|
|
@@ -2091,8 +2120,8 @@ const zn = /* @__PURE__ */ q({
|
|
|
2091
2120
|
}, [W()])]) : i("div", {
|
|
2092
2121
|
class: "f-column-width-editor-switch-customize",
|
|
2093
2122
|
onDragenter: (m) => h(m, o.value),
|
|
2094
|
-
onDragend: (m) =>
|
|
2095
|
-
onDragover: (m) =>
|
|
2123
|
+
onDragend: (m) => T(m, o.value),
|
|
2124
|
+
onDragover: (m) => g(m)
|
|
2096
2125
|
}, [i("div", {
|
|
2097
2126
|
class: "f-layout-editor-column-width-editor-rectangle"
|
|
2098
2127
|
}, [L(), i("div", {
|
|
@@ -2100,32 +2129,32 @@ const zn = /* @__PURE__ */ q({
|
|
|
2100
2129
|
}, [p.value, G("列")]), i("span", {
|
|
2101
2130
|
class: "f-layout-editor-drag-handler f-icon f-icon-drag-vertical",
|
|
2102
2131
|
draggable: "true",
|
|
2103
|
-
onDragstart: (m) =>
|
|
2132
|
+
onDragstart: (m) => d(m, o.value)
|
|
2104
2133
|
}, null)])]);
|
|
2105
2134
|
}
|
|
2106
|
-
function
|
|
2135
|
+
function b() {
|
|
2107
2136
|
var m;
|
|
2108
2137
|
return i("div", {
|
|
2109
2138
|
class: "f-layout-editor-column-width-editor-component"
|
|
2110
2139
|
}, [i("div", {
|
|
2111
2140
|
class: "f-layout-editor-column-width-editor-label"
|
|
2112
|
-
}, [(m = o == null ? void 0 : o.value) == null ? void 0 : m.label]),
|
|
2141
|
+
}, [(m = o == null ? void 0 : o.value) == null ? void 0 : m.label]), E()]);
|
|
2113
2142
|
}
|
|
2114
|
-
return O(() => [e.field, e.switchInStandardMode, e.currentScreenResolution], ([m,
|
|
2115
|
-
A !== D && (a.value = A,
|
|
2143
|
+
return O(() => [e.field, e.switchInStandardMode, e.currentScreenResolution], ([m, B, A], [N, X, D]) => {
|
|
2144
|
+
A !== D && (a.value = A, c.value = n[a.value], w()), B !== X && (u.value = B), u.value === !1 && w(), m !== N && (o.value = m);
|
|
2116
2145
|
}), J(() => {
|
|
2117
2146
|
w();
|
|
2118
2147
|
}), () => i("div", {
|
|
2119
2148
|
class: "f-layout-editor-column-width-editor"
|
|
2120
|
-
}, [y(),
|
|
2149
|
+
}, [y(), b()]);
|
|
2121
2150
|
}
|
|
2122
2151
|
}), Pn = /* @__PURE__ */ q({
|
|
2123
2152
|
name: "FFieldList",
|
|
2124
|
-
props:
|
|
2153
|
+
props: qt,
|
|
2125
2154
|
emits: ["update:currentArea", "twoDimensionalArrayChanged", "originalDataChanged"],
|
|
2126
2155
|
setup(e, t) {
|
|
2127
|
-
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.originalData), u = l(e.originalDataCopy),
|
|
2128
|
-
function
|
|
2156
|
+
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.originalData), u = l(e.originalDataCopy), c = l(e.defaultStates), f = l(""), v = l([]), s = l(e.currentArea), p = l(0), r = l(), d = l(0), h = l("1"), g = l([]);
|
|
2157
|
+
function T() {
|
|
2129
2158
|
var F;
|
|
2130
2159
|
let D = w();
|
|
2131
2160
|
for (let z = 0; z < D.length; z++) {
|
|
@@ -2144,31 +2173,31 @@ const zn = /* @__PURE__ */ q({
|
|
|
2144
2173
|
}), D;
|
|
2145
2174
|
}
|
|
2146
2175
|
function S() {
|
|
2147
|
-
h.value =
|
|
2176
|
+
h.value = c.value.defaultGroupNumber.toString(), f.value = `区域${h.value}`, s.value = [v.value[Number(h.value) - 1]], t.emit("update:currentArea", s.value);
|
|
2148
2177
|
}
|
|
2149
2178
|
function k() {
|
|
2150
2179
|
let D = [];
|
|
2151
|
-
|
|
2180
|
+
r.value = [];
|
|
2152
2181
|
let F = 1;
|
|
2153
2182
|
o.value.forEach((z) => {
|
|
2154
|
-
z.group === F || (F += 1,
|
|
2155
|
-
}),
|
|
2183
|
+
z.group === F || (F += 1, r.value.push(D), D = []), D.push(z);
|
|
2184
|
+
}), r.value.push(D);
|
|
2156
2185
|
}
|
|
2157
2186
|
function L() {
|
|
2158
|
-
|
|
2187
|
+
r.value[s.value[0].id - 1] = U(g.value);
|
|
2159
2188
|
let D = [];
|
|
2160
|
-
|
|
2161
|
-
let z = W(F,
|
|
2162
|
-
D.push(z),
|
|
2189
|
+
d.value = 0, r.value.forEach((F) => {
|
|
2190
|
+
let z = W(F, d.value);
|
|
2191
|
+
D.push(z), d.value = z[z.length - 1].componentRow;
|
|
2163
2192
|
}), y(D);
|
|
2164
2193
|
}
|
|
2165
2194
|
function j() {
|
|
2166
2195
|
k();
|
|
2167
2196
|
let D = [];
|
|
2168
|
-
return
|
|
2169
|
-
let z = W(F,
|
|
2170
|
-
D.push(z),
|
|
2171
|
-
}), t.emit("twoDimensionalArrayChanged",
|
|
2197
|
+
return d.value = 0, r.value.forEach((F) => {
|
|
2198
|
+
let z = W(F, d.value);
|
|
2199
|
+
D.push(z), d.value = z[z.length - 1].componentRow;
|
|
2200
|
+
}), t.emit("twoDimensionalArrayChanged", r.value), y(D), o.value;
|
|
2172
2201
|
}
|
|
2173
2202
|
function W(D, F) {
|
|
2174
2203
|
let C = 12;
|
|
@@ -2182,16 +2211,16 @@ const zn = /* @__PURE__ */ q({
|
|
|
2182
2211
|
let F = [];
|
|
2183
2212
|
for (let z of D)
|
|
2184
2213
|
F = F.concat(z);
|
|
2185
|
-
o.value = U(F),
|
|
2214
|
+
o.value = U(F), d.value = 0;
|
|
2186
2215
|
}
|
|
2187
|
-
function
|
|
2216
|
+
function E() {
|
|
2188
2217
|
return i("div", {
|
|
2189
2218
|
class: "f-layout-editor-field-list-top"
|
|
2190
2219
|
}, [i("div", {
|
|
2191
2220
|
class: "f-layout-editor-field-list-header"
|
|
2192
2221
|
}, [G("组件列表")]), i("div", {
|
|
2193
2222
|
class: "f-layout-editor-choose-group"
|
|
2194
|
-
}, [i(
|
|
2223
|
+
}, [i(un, {
|
|
2195
2224
|
modelValue: h.value,
|
|
2196
2225
|
"onUpdate:modelValue": (D) => h.value = D,
|
|
2197
2226
|
placeholder: "当前可编辑组",
|
|
@@ -2200,13 +2229,13 @@ const zn = /* @__PURE__ */ q({
|
|
|
2200
2229
|
"text-field": "label",
|
|
2201
2230
|
data: v.value,
|
|
2202
2231
|
editable: !1,
|
|
2203
|
-
onChange:
|
|
2232
|
+
onChange: N
|
|
2204
2233
|
}, null)])]);
|
|
2205
2234
|
}
|
|
2206
|
-
function
|
|
2235
|
+
function b() {
|
|
2207
2236
|
return i("div", {
|
|
2208
2237
|
class: "f-layout-editor-field-list-content f-utils-overflow-xhya"
|
|
2209
|
-
}, [
|
|
2238
|
+
}, [g.value.map((D) => i(Nn, {
|
|
2210
2239
|
key: D.label,
|
|
2211
2240
|
currentScreenResolution: n.value,
|
|
2212
2241
|
field: D,
|
|
@@ -2217,78 +2246,78 @@ const zn = /* @__PURE__ */ q({
|
|
|
2217
2246
|
}, null))]);
|
|
2218
2247
|
}
|
|
2219
2248
|
function m(D) {
|
|
2220
|
-
|
|
2249
|
+
g.value.forEach((F) => {
|
|
2221
2250
|
F.label == D.label && Object.assign(F, D);
|
|
2222
|
-
}), L(), A(),
|
|
2251
|
+
}), L(), A(), B();
|
|
2223
2252
|
}
|
|
2224
|
-
function
|
|
2225
|
-
|
|
2226
|
-
D.group === Number(
|
|
2253
|
+
function B() {
|
|
2254
|
+
g.value = [], o.value.forEach((D) => {
|
|
2255
|
+
D.group === Number(s.value[0].id) && g.value.push(D);
|
|
2227
2256
|
});
|
|
2228
2257
|
}
|
|
2229
2258
|
function A() {
|
|
2230
2259
|
o.value = U(j()), t.emit("originalDataChanged", o.value);
|
|
2231
2260
|
}
|
|
2232
|
-
function
|
|
2261
|
+
function N(D) {
|
|
2233
2262
|
for (let F = 0; F < D.length; F++)
|
|
2234
|
-
|
|
2263
|
+
s.value = [{
|
|
2235
2264
|
id: D[F].id,
|
|
2236
2265
|
label: D[F].label
|
|
2237
2266
|
}];
|
|
2238
|
-
t.emit("update:currentArea",
|
|
2267
|
+
t.emit("update:currentArea", s.value), B(), L();
|
|
2239
2268
|
}
|
|
2240
|
-
const X =
|
|
2241
|
-
L(), A(),
|
|
2269
|
+
const X = Ut(g, () => {
|
|
2270
|
+
L(), A(), B();
|
|
2242
2271
|
});
|
|
2243
|
-
return
|
|
2244
|
-
D !== F && (
|
|
2245
|
-
}), O(
|
|
2246
|
-
D !== F &&
|
|
2272
|
+
return Je("ResponseLayoutEditorDraggableComposition", X), O(() => e.currentArea, (D, F) => {
|
|
2273
|
+
D !== F && (s.value = e.currentArea, B());
|
|
2274
|
+
}), O(s, (D, F) => {
|
|
2275
|
+
D !== F && B();
|
|
2247
2276
|
}), O(() => e.currentGroup, (D, F) => {
|
|
2248
2277
|
D !== F && (f.value = e.currentGroup);
|
|
2249
2278
|
}), O(() => e.currentScreenResolution, (D, F) => {
|
|
2250
|
-
D !== F && (n.value = e.currentScreenResolution, A(), k(),
|
|
2279
|
+
D !== F && (n.value = e.currentScreenResolution, A(), k(), s.value[0] && (g.value = U(r.value[Number(s.value[0].id) - 1])));
|
|
2251
2280
|
}), O(() => e.switchInStandardMode, (D, F) => {
|
|
2252
2281
|
D !== F && (a.value = e.switchInStandardMode, o.value = U(u.value));
|
|
2253
|
-
}), O(
|
|
2282
|
+
}), O(c, (D, F) => {
|
|
2254
2283
|
D !== F && A();
|
|
2255
2284
|
}), fe(() => {
|
|
2256
|
-
|
|
2285
|
+
T(), j(), B();
|
|
2257
2286
|
}), () => i("div", {
|
|
2258
2287
|
class: "f-layout-editor-field-list f-utils-fill-flex-column"
|
|
2259
2288
|
}, [a.value ? (
|
|
2260
2289
|
/* 标准模式 */
|
|
2261
2290
|
i("div", {
|
|
2262
2291
|
class: "f-layout-editor-field-list-standard f-utils-fill-flex-column"
|
|
2263
|
-
}, [
|
|
2292
|
+
}, [E(), b()])
|
|
2264
2293
|
) : (
|
|
2265
2294
|
/* 自定义模式 */
|
|
2266
2295
|
i("div", {
|
|
2267
2296
|
class: "f-layout-editor-field-list-customize f-utils-fill-flex-column"
|
|
2268
|
-
}, [
|
|
2297
|
+
}, [E(), b()])
|
|
2269
2298
|
)]);
|
|
2270
2299
|
}
|
|
2271
|
-
}),
|
|
2300
|
+
}), ie = /* @__PURE__ */ q({
|
|
2272
2301
|
name: "FResponseLayoutEditor",
|
|
2273
|
-
props:
|
|
2302
|
+
props: at,
|
|
2274
2303
|
emits: ["close", "submit"],
|
|
2275
2304
|
setup(e, t) {
|
|
2276
|
-
const n = l(e.initialState), a = l(), o = l(), u = l(""),
|
|
2305
|
+
const n = l(e.initialState), a = l(), o = l(), u = l(""), c = l(""), f = l(!1), v = l([{
|
|
2277
2306
|
id: "1",
|
|
2278
2307
|
label: "区域1"
|
|
2279
|
-
}]),
|
|
2308
|
+
}]), s = l([]), p = l(), r = l(e.width), d = l(e.height);
|
|
2280
2309
|
O(() => e.initialState, (m) => {
|
|
2281
2310
|
n.value = m;
|
|
2282
|
-
}), O([() => e.currentArea, () => e.switchInStandardMode], ([m,
|
|
2283
|
-
m !== A && (v.value = m),
|
|
2311
|
+
}), O([() => e.currentArea, () => e.switchInStandardMode], ([m, B], [A, N]) => {
|
|
2312
|
+
m !== A && (v.value = m), B !== N && (f.value = B);
|
|
2284
2313
|
});
|
|
2285
2314
|
function h(m) {
|
|
2286
2315
|
u.value = m;
|
|
2287
2316
|
}
|
|
2288
|
-
function
|
|
2289
|
-
|
|
2317
|
+
function g(m) {
|
|
2318
|
+
c.value = m;
|
|
2290
2319
|
}
|
|
2291
|
-
function
|
|
2320
|
+
function T(m) {
|
|
2292
2321
|
f.value = m;
|
|
2293
2322
|
}
|
|
2294
2323
|
function w(m) {
|
|
@@ -2298,7 +2327,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2298
2327
|
a.value = U(m);
|
|
2299
2328
|
}
|
|
2300
2329
|
function k(m) {
|
|
2301
|
-
|
|
2330
|
+
s.value = m;
|
|
2302
2331
|
}
|
|
2303
2332
|
function L() {
|
|
2304
2333
|
t.emit("close");
|
|
@@ -2311,8 +2340,8 @@ const zn = /* @__PURE__ */ q({
|
|
|
2311
2340
|
class: "f-utils-fill-flex-column",
|
|
2312
2341
|
defaultStates: o.value,
|
|
2313
2342
|
originalDataCopy: p.value,
|
|
2314
|
-
currentScreenResolution:
|
|
2315
|
-
"onUpdate:currentScreenResolution": (m) =>
|
|
2343
|
+
currentScreenResolution: c.value,
|
|
2344
|
+
"onUpdate:currentScreenResolution": (m) => c.value = m,
|
|
2316
2345
|
originalData: a.value,
|
|
2317
2346
|
"onUpdate:originalData": (m) => a.value = m,
|
|
2318
2347
|
switchInStandardMode: f.value,
|
|
@@ -2325,40 +2354,40 @@ const zn = /* @__PURE__ */ q({
|
|
|
2325
2354
|
}, null);
|
|
2326
2355
|
}
|
|
2327
2356
|
function y() {
|
|
2328
|
-
return i(
|
|
2357
|
+
return i(Gt, {
|
|
2329
2358
|
class: "f-utils-fill-flex-column",
|
|
2330
2359
|
currentArea: v.value,
|
|
2331
2360
|
"onUpdate:currentArea": (m) => v.value = m,
|
|
2332
|
-
currentScreenResolution:
|
|
2333
|
-
"onUpdate:currentScreenResolution": (m) =>
|
|
2361
|
+
currentScreenResolution: c.value,
|
|
2362
|
+
"onUpdate:currentScreenResolution": (m) => c.value = m,
|
|
2334
2363
|
switchInStandardMode: f.value,
|
|
2335
|
-
twoDimensionalArray:
|
|
2336
|
-
"onUpdate:twoDimensionalArray": (m) =>
|
|
2364
|
+
twoDimensionalArray: s.value,
|
|
2365
|
+
"onUpdate:twoDimensionalArray": (m) => s.value = m
|
|
2337
2366
|
}, null);
|
|
2338
2367
|
}
|
|
2339
|
-
const
|
|
2368
|
+
const E = R(() => f.value ? "f-layout-editor-left-standard f-utils-fill-flex-column" : "f-layout-editor-left-customize f-utils-fill-flex-column"), b = R(() => f.value ? "f-layout-editor-right-standard f-utils-fill-flex-column" : "f-layout-editor-right-customize f-utils-fill-flex-column");
|
|
2340
2369
|
return fe(() => {
|
|
2341
|
-
a.value = U(n.value.importData), p.value = U(n.value.importData), o.value = n.value.defaultState, u.value = "中等屏幕",
|
|
2370
|
+
a.value = U(n.value.importData), p.value = U(n.value.importData), o.value = n.value.defaultState, u.value = "中等屏幕", c.value = "MD";
|
|
2342
2371
|
}), (m) => i("div", {
|
|
2343
2372
|
class: "f-layout-editor f-utils-flex-column",
|
|
2344
|
-
style: "height:" +
|
|
2373
|
+
style: "height:" + d.value + "px;width:" + r.value + "px;"
|
|
2345
2374
|
}, [i("div", {
|
|
2346
2375
|
class: "f-layout-editor-top"
|
|
2347
|
-
}, [i(
|
|
2376
|
+
}, [i(zt, {
|
|
2348
2377
|
defaultStates: o.value,
|
|
2349
2378
|
onScreenNameChanged: h,
|
|
2350
|
-
onCurrentScreenResolutionChanged:
|
|
2351
|
-
onSwitchInStandardModeChanged:
|
|
2379
|
+
onCurrentScreenResolutionChanged: g,
|
|
2380
|
+
onSwitchInStandardModeChanged: T
|
|
2352
2381
|
}, null)]), i("div", {
|
|
2353
2382
|
class: "f-layout-editor-content f-utils-fill"
|
|
2354
2383
|
}, [i("div", {
|
|
2355
2384
|
class: "f-layout-editor-left f-utils-fill-flex-column"
|
|
2356
2385
|
}, [i("div", {
|
|
2357
|
-
class:
|
|
2386
|
+
class: E.value
|
|
2358
2387
|
}, [W()])]), i("div", {
|
|
2359
2388
|
class: "f-layout-editor-right f-utils-fill-flex-column"
|
|
2360
2389
|
}, [i("div", {
|
|
2361
|
-
class:
|
|
2390
|
+
class: b.value
|
|
2362
2391
|
}, [y()])])]), i("div", {
|
|
2363
2392
|
class: "f-layout-editor-bottom"
|
|
2364
2393
|
}, [i("div", {
|
|
@@ -2375,25 +2404,25 @@ const zn = /* @__PURE__ */ q({
|
|
|
2375
2404
|
class: "f-layout-editor-text-sure"
|
|
2376
2405
|
}, [G("确认")])])])])]);
|
|
2377
2406
|
}
|
|
2378
|
-
}),
|
|
2407
|
+
}), Gn = /* @__PURE__ */ new Map([
|
|
2379
2408
|
["appearance", ee]
|
|
2380
2409
|
]);
|
|
2381
|
-
function
|
|
2410
|
+
function qn(e, t, n, a) {
|
|
2382
2411
|
const o = e.getSchemaByType("section");
|
|
2383
2412
|
return o.id = `${a}-section`, o.appearance = { class: "f-section-form f-section-in-main" }, o.mainTitle = "标题", o.contents = [t], o;
|
|
2384
2413
|
}
|
|
2385
|
-
function
|
|
2414
|
+
function Un(e, t, n, a) {
|
|
2386
2415
|
const o = e.getSchemaByType("component");
|
|
2387
2416
|
return o.id = `${a}-component`, o.componentType = "form-col-1", o.appearance = {
|
|
2388
2417
|
class: "f-struct-form f-struct-wrapper"
|
|
2389
2418
|
}, o.contents = [t], o;
|
|
2390
2419
|
}
|
|
2391
|
-
function
|
|
2420
|
+
function Xn(e, t, n) {
|
|
2392
2421
|
t.appearance = { class: "f-form-layout farris-form farris-form-controls-inline" };
|
|
2393
|
-
const a =
|
|
2394
|
-
return
|
|
2422
|
+
const a = qn(e, t, n, t.id);
|
|
2423
|
+
return Un(e, a, n, t.id);
|
|
2395
2424
|
}
|
|
2396
|
-
const
|
|
2425
|
+
const Yn = "https://json-schema.org/draft/2020-12/schema", Jn = "https://farris-design.gitee.io/response-layout-editor-setting.schema.json", Qn = "response-layout-editor-setting", Zn = "A Farris Data Collection Component", _n = "object", Kn = {
|
|
2397
2426
|
id: {
|
|
2398
2427
|
description: "The unique identifier for response layout editor",
|
|
2399
2428
|
type: "string"
|
|
@@ -2421,18 +2450,18 @@ const Xn = "https://json-schema.org/draft/2020-12/schema", Yn = "https://farris-
|
|
|
2421
2450
|
type: "array",
|
|
2422
2451
|
default: []
|
|
2423
2452
|
}
|
|
2424
|
-
},
|
|
2453
|
+
}, ea = [
|
|
2425
2454
|
"id",
|
|
2426
2455
|
"type"
|
|
2427
|
-
],
|
|
2428
|
-
$schema:
|
|
2429
|
-
$id:
|
|
2430
|
-
title:
|
|
2431
|
-
description:
|
|
2432
|
-
type:
|
|
2433
|
-
properties:
|
|
2434
|
-
required:
|
|
2435
|
-
},
|
|
2456
|
+
], ta = {
|
|
2457
|
+
$schema: Yn,
|
|
2458
|
+
$id: Jn,
|
|
2459
|
+
title: Qn,
|
|
2460
|
+
description: Zn,
|
|
2461
|
+
type: _n,
|
|
2462
|
+
properties: Kn,
|
|
2463
|
+
required: ea
|
|
2464
|
+
}, na = "response-form", aa = "A Farris Component", la = "object", oa = {
|
|
2436
2465
|
basic: {
|
|
2437
2466
|
description: "Basic Infomation",
|
|
2438
2467
|
title: "基本信息",
|
|
@@ -2454,11 +2483,11 @@ const Xn = "https://json-schema.org/draft/2020-12/schema", Yn = "https://farris-
|
|
|
2454
2483
|
}
|
|
2455
2484
|
}
|
|
2456
2485
|
}
|
|
2457
|
-
},
|
|
2458
|
-
title:
|
|
2459
|
-
description:
|
|
2460
|
-
type:
|
|
2461
|
-
categories:
|
|
2486
|
+
}, ia = {
|
|
2487
|
+
title: na,
|
|
2488
|
+
description: aa,
|
|
2489
|
+
type: la,
|
|
2490
|
+
categories: oa
|
|
2462
2491
|
}, ve = {
|
|
2463
2492
|
/** 接受传入的原始数据的defaultState */
|
|
2464
2493
|
initialState: { type: Object, default: Se },
|
|
@@ -2467,7 +2496,7 @@ const Xn = "https://json-schema.org/draft/2020-12/schema", Yn = "https://farris-
|
|
|
2467
2496
|
/** 页面宽度 */
|
|
2468
2497
|
width: { type: Number, default: 750 },
|
|
2469
2498
|
modelValue: { type: Object }
|
|
2470
|
-
}, ye = K(ve,
|
|
2499
|
+
}, ye = K(ve, ta, Gn, Xn, ia), ua = {
|
|
2471
2500
|
/**
|
|
2472
2501
|
* 自定义类
|
|
2473
2502
|
*/
|
|
@@ -2519,7 +2548,7 @@ const Xn = "https://json-schema.org/draft/2020-12/schema", Yn = "https://farris-
|
|
|
2519
2548
|
containment: { type: HTMLElement, default: null },
|
|
2520
2549
|
reiszeable: { type: Boolean, default: !1 },
|
|
2521
2550
|
draggable: { type: Boolean, default: !1 },
|
|
2522
|
-
dragHandle: { type:
|
|
2551
|
+
dragHandle: { type: Object, default: null },
|
|
2523
2552
|
closedCallback: { type: Function, default: null },
|
|
2524
2553
|
resizeHandle: { type: Function, default: null },
|
|
2525
2554
|
render: { type: Function, default: null },
|
|
@@ -2610,22 +2639,22 @@ class _ {
|
|
|
2610
2639
|
return this.width = t.width, this.height = t.height, this;
|
|
2611
2640
|
}
|
|
2612
2641
|
}
|
|
2613
|
-
function
|
|
2614
|
-
const n = l(), a = l(), o = l(), u = l(),
|
|
2642
|
+
function sa(e, t) {
|
|
2643
|
+
const n = l(), a = l(), o = l(), u = l(), c = l(), f = l(), v = l(), s = l(), p = l(), r = l(), d = l(), h = l(), g = l(e.draggable), T = l(!1);
|
|
2615
2644
|
function w() {
|
|
2616
2645
|
const C = a.value || document.body, I = window.getComputedStyle(C);
|
|
2617
2646
|
if (!I || !n.value)
|
|
2618
2647
|
return;
|
|
2619
2648
|
const x = P.getTransformInfo(n.value), $ = {};
|
|
2620
2649
|
v.value && ($.deltaL = n.value.offsetLeft - v.value.x, $.deltaT = n.value.offsetTop - v.value.y);
|
|
2621
|
-
const
|
|
2622
|
-
$.width = C.clientWidth, $.height = C.clientHeight, $.pr = parseInt(I.getPropertyValue("padding-right"), 10), $.pb = parseInt(I.getPropertyValue("padding-bottom"), 10), $.position = I.getPropertyValue("position"),
|
|
2650
|
+
const H = I.getPropertyValue("position");
|
|
2651
|
+
$.width = C.clientWidth, $.height = C.clientHeight, $.pr = parseInt(I.getPropertyValue("padding-right"), 10), $.pb = parseInt(I.getPropertyValue("padding-bottom"), 10), $.position = I.getPropertyValue("position"), H === "static" && (C.style.position = "relative"), $.translateX = x.x, $.translateY = x.y, r.value = $;
|
|
2623
2652
|
}
|
|
2624
2653
|
function S(C) {
|
|
2625
2654
|
if (n.value) {
|
|
2626
|
-
u.value = _.getCurrent(n.value),
|
|
2655
|
+
u.value = _.getCurrent(n.value), c.value = P.getCurrent(n.value), f.value = u.value ? _.copy(u.value) : null, v.value = c.value ? P.copy(c.value) : null, w();
|
|
2627
2656
|
const I = C.target.getAttribute("type") || "";
|
|
2628
|
-
|
|
2657
|
+
s.value = {
|
|
2629
2658
|
n: !!I.match(/n/),
|
|
2630
2659
|
s: !!I.match(/s/),
|
|
2631
2660
|
w: !!I.match(/w/),
|
|
@@ -2636,29 +2665,29 @@ function ua(e, t) {
|
|
|
2636
2665
|
function k() {
|
|
2637
2666
|
var C, I, x, $;
|
|
2638
2667
|
if (n.value) {
|
|
2639
|
-
const
|
|
2640
|
-
|
|
2668
|
+
const H = n.value;
|
|
2669
|
+
s.value && ((s.value.n || s.value.s) && ((C = f.value) != null && C.height) && (H.style.height = f.value.height + "px"), (s.value.w || s.value.e) && ((I = f.value) != null && I.width) && (H.style.width = f.value.width + "px"), v.value && ((x = v.value) != null && x.x && (H.style.left = v.value.x + "px"), ($ = v.value) != null && $.y && (H.style.top = v.value.y + "px")));
|
|
2641
2670
|
}
|
|
2642
2671
|
}
|
|
2643
2672
|
function L() {
|
|
2644
2673
|
const C = e.minHeight ? e.minHeight : 1, I = e.minWidth ? e.minWidth : 1;
|
|
2645
|
-
f.value && v.value &&
|
|
2674
|
+
f.value && v.value && s.value && u.value && (f.value.height < C && (f.value.height = C, s.value.n && c.value && (v.value.y = c.value.y + (u.value.height - C))), f.value.width < I && (f.value.width = I, s.value.w && c.value && (v.value.x = c.value.x + (u.value.width - I))), e.maxHeight && f.value.height > e.maxHeight && (f.value.height = e.maxHeight, c.value && s.value.n && (v.value.y = c.value.y + (u.value.height - e.maxHeight))), e.maxWidth && f.value.width > e.maxWidth && (f.value.width = e.maxWidth, s.value.w && c.value && (v.value.x = c.value.x + (u.value.width - e.maxWidth))));
|
|
2646
2675
|
}
|
|
2647
2676
|
function j() {
|
|
2648
2677
|
if (a.value) {
|
|
2649
|
-
const C =
|
|
2650
|
-
if (v.value && f.value &&
|
|
2678
|
+
const C = r.value;
|
|
2679
|
+
if (v.value && f.value && s.value && u.value) {
|
|
2651
2680
|
const I = C.width - C.pr - C.deltaL - C.translateX - v.value.x, x = C.height - C.pb - C.deltaT - C.translateY - v.value.y;
|
|
2652
|
-
|
|
2681
|
+
s.value.n && v.value.y + C.translateY < 0 && c.value && (v.value.y = -C.translateY, f.value.height = u.value.height + c.value.y + C.translateY), s.value.w && v.value.x + C.translateX < 0 && c.value && (v.value.x = -C.translateX, f.value.width = u.value.width + c.value.x + C.translateX), f.value.width > I && (f.value.width = I), f.value.height > x && (f.value.height = x);
|
|
2653
2682
|
}
|
|
2654
2683
|
}
|
|
2655
2684
|
}
|
|
2656
2685
|
function W(C) {
|
|
2657
|
-
if (!o.value || !u.value || !
|
|
2686
|
+
if (!o.value || !u.value || !c.value || !s.value)
|
|
2658
2687
|
return;
|
|
2659
2688
|
C.subtract(o.value);
|
|
2660
2689
|
const I = C.x, x = C.y;
|
|
2661
|
-
|
|
2690
|
+
s.value.n ? (v.value.y = c.value.y + x, f.value.height = u.value.height - x) : s.value.s && (f.value.height = u.value.height + x), s.value.e ? f.value.width = u.value.width + I : s.value.w && (f.value.width = u.value.width - I, v.value.x = c.value.x + I), j(), L(), k();
|
|
2662
2691
|
}
|
|
2663
2692
|
function y(C) {
|
|
2664
2693
|
if (!p.value)
|
|
@@ -2666,84 +2695,84 @@ function ua(e, t) {
|
|
|
2666
2695
|
const I = P.fromEvent(C);
|
|
2667
2696
|
I && W(I);
|
|
2668
2697
|
}
|
|
2669
|
-
function
|
|
2698
|
+
function E() {
|
|
2670
2699
|
if (n.value) {
|
|
2671
2700
|
const {
|
|
2672
2701
|
width: C,
|
|
2673
2702
|
height: I,
|
|
2674
2703
|
x,
|
|
2675
2704
|
y: $
|
|
2676
|
-
} = n.value.getBoundingClientRect(),
|
|
2705
|
+
} = n.value.getBoundingClientRect(), H = P.getTransformInfo(n.value);
|
|
2677
2706
|
return {
|
|
2678
2707
|
size: {
|
|
2679
2708
|
width: C,
|
|
2680
2709
|
height: I
|
|
2681
2710
|
},
|
|
2682
2711
|
position: {
|
|
2683
|
-
x: x -
|
|
2684
|
-
y: $ -
|
|
2712
|
+
x: x - H.x,
|
|
2713
|
+
y: $ - H.y
|
|
2685
2714
|
}
|
|
2686
2715
|
};
|
|
2687
2716
|
}
|
|
2688
2717
|
return null;
|
|
2689
2718
|
}
|
|
2690
|
-
function
|
|
2719
|
+
function b(C) {
|
|
2691
2720
|
if (n.value) {
|
|
2692
|
-
const I =
|
|
2693
|
-
|
|
2721
|
+
const I = E();
|
|
2722
|
+
d.value = I;
|
|
2694
2723
|
}
|
|
2695
|
-
o.value = void 0, u.value = null,
|
|
2724
|
+
o.value = void 0, u.value = null, c.value = null, f.value = null, v.value = null, s.value = null, p.value = null, document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", b);
|
|
2696
2725
|
}
|
|
2697
2726
|
function m() {
|
|
2698
|
-
document.addEventListener("mousemove", y), document.addEventListener("mouseup",
|
|
2727
|
+
document.addEventListener("mousemove", y), document.addEventListener("mouseup", b);
|
|
2699
2728
|
}
|
|
2700
|
-
function
|
|
2701
|
-
C instanceof MouseEvent && C.button === 2 ||
|
|
2729
|
+
function B(C) {
|
|
2730
|
+
C instanceof MouseEvent && C.button === 2 || g.value && (C.stopPropagation(), C.preventDefault(), o.value = P.fromEvent(C), p.value = C.target, S(C), m());
|
|
2702
2731
|
}
|
|
2703
2732
|
function A(C) {
|
|
2704
|
-
return n.value = C, i(
|
|
2733
|
+
return n.value = C, i(ue, null, [i("div", {
|
|
2705
2734
|
class: "ng-resizable-handle ng-resizable-n",
|
|
2706
2735
|
type: "n",
|
|
2707
|
-
onMousedown: (I) =>
|
|
2736
|
+
onMousedown: (I) => B(I)
|
|
2708
2737
|
}, null), i("div", {
|
|
2709
2738
|
class: "ng-resizable-handle ng-resizable-e",
|
|
2710
2739
|
type: "e",
|
|
2711
|
-
onMousedown: (I) =>
|
|
2740
|
+
onMousedown: (I) => B(I)
|
|
2712
2741
|
}, null), i("div", {
|
|
2713
2742
|
class: "ng-resizable-handle ng-resizable-s",
|
|
2714
2743
|
type: "s",
|
|
2715
|
-
onMousedown: (I) =>
|
|
2744
|
+
onMousedown: (I) => B(I)
|
|
2716
2745
|
}, null), i("div", {
|
|
2717
2746
|
class: "ng-resizable-handle ng-resizable-w",
|
|
2718
2747
|
type: "w",
|
|
2719
|
-
onMousedown: (I) =>
|
|
2748
|
+
onMousedown: (I) => B(I)
|
|
2720
2749
|
}, null), i("div", {
|
|
2721
2750
|
class: "ng-resizable-handle ng-resizable-ne",
|
|
2722
2751
|
type: "ne",
|
|
2723
|
-
onMousedown: (I) =>
|
|
2752
|
+
onMousedown: (I) => B(I)
|
|
2724
2753
|
}, null), i("div", {
|
|
2725
2754
|
class: "ng-resizable-handle ng-resizable-se ng-resizable-diagonal",
|
|
2726
2755
|
type: "se",
|
|
2727
|
-
onMousedown: (I) =>
|
|
2756
|
+
onMousedown: (I) => B(I)
|
|
2728
2757
|
}, null), i("div", {
|
|
2729
2758
|
class: "ng-resizable-handle ng-resizable-sw",
|
|
2730
2759
|
type: "sw",
|
|
2731
|
-
onMousedown: (I) =>
|
|
2760
|
+
onMousedown: (I) => B(I)
|
|
2732
2761
|
}, null), i("div", {
|
|
2733
2762
|
class: "ng-resizable-handle ng-resizable-nw",
|
|
2734
2763
|
type: "nw",
|
|
2735
|
-
onMousedown: (I) =>
|
|
2764
|
+
onMousedown: (I) => B(I)
|
|
2736
2765
|
}, null)]);
|
|
2737
2766
|
}
|
|
2738
|
-
function
|
|
2767
|
+
function N(C = !0) {
|
|
2739
2768
|
const I = a.value || document.body, x = _.getCurrent(I), $ = n.value;
|
|
2740
|
-
C && (h.value =
|
|
2769
|
+
C && (h.value = E(), h.value.transform = $.style.transform), x && $ && (f.value = x, $.style.height = f.value.height - 14 + "px", $.style.width = f.value.width - 14 + "px", $.style.left = "7px", $.style.top = "7px", $.style.transform = "", d.value = {
|
|
2741
2770
|
size: f.value,
|
|
2742
2771
|
position: {
|
|
2743
2772
|
x: 0,
|
|
2744
2773
|
y: 0
|
|
2745
2774
|
}
|
|
2746
|
-
},
|
|
2775
|
+
}, g.value = !1, T.value = !0);
|
|
2747
2776
|
}
|
|
2748
2777
|
function X() {
|
|
2749
2778
|
var C, I;
|
|
@@ -2756,11 +2785,11 @@ function ua(e, t) {
|
|
|
2756
2785
|
y: (window.innerHeight - x.height) / 2
|
|
2757
2786
|
};
|
|
2758
2787
|
(C = f.value) == null || C.set(x), (I = v.value) == null || I.set($);
|
|
2759
|
-
const
|
|
2760
|
-
|
|
2788
|
+
const H = n.value;
|
|
2789
|
+
H.style.height = x.height + "px", H.style.width = x.width + "px", H.style.left = `${$.x}px`, H.style.top = `${$.y}px`, H.style.transform = "", d.value = {
|
|
2761
2790
|
size: x,
|
|
2762
2791
|
position: $
|
|
2763
|
-
},
|
|
2792
|
+
}, g.value = e.draggable, T.value = !1;
|
|
2764
2793
|
}
|
|
2765
2794
|
}
|
|
2766
2795
|
function D() {
|
|
@@ -2777,7 +2806,7 @@ function ua(e, t) {
|
|
|
2777
2806
|
}
|
|
2778
2807
|
function F() {
|
|
2779
2808
|
const C = () => {
|
|
2780
|
-
|
|
2809
|
+
T.value ? N(!1) : D();
|
|
2781
2810
|
};
|
|
2782
2811
|
return window.addEventListener("resize", C), () => {
|
|
2783
2812
|
window.removeEventListener("resize", C);
|
|
@@ -2787,53 +2816,53 @@ function ua(e, t) {
|
|
|
2787
2816
|
return {
|
|
2788
2817
|
renderResizeBar: A,
|
|
2789
2818
|
boundingElement: a,
|
|
2790
|
-
resizedEventParam:
|
|
2791
|
-
maximize:
|
|
2819
|
+
resizedEventParam: d,
|
|
2820
|
+
maximize: N,
|
|
2792
2821
|
restore: X,
|
|
2793
|
-
allowDrag:
|
|
2794
|
-
isMaximized:
|
|
2822
|
+
allowDrag: g,
|
|
2823
|
+
isMaximized: T,
|
|
2795
2824
|
unWindowResizeHandle: z
|
|
2796
2825
|
};
|
|
2797
2826
|
}
|
|
2798
|
-
function
|
|
2799
|
-
const n = l(), a = l(e.draggable), o = l(e.lockAxis), u = l(),
|
|
2800
|
-
function
|
|
2801
|
-
if (
|
|
2827
|
+
function ra(e, t) {
|
|
2828
|
+
const n = l(), a = l(e.draggable), o = l(e.lockAxis), u = l(), c = l(), f = l(!1), v = l(new P(0, 0)), s = l(new P(0, 0)), p = l(new P(0, 0)), r = l(new P(0, 0));
|
|
2829
|
+
function d(y, E) {
|
|
2830
|
+
if (E.tagName === "BUTTON")
|
|
2802
2831
|
return !1;
|
|
2803
|
-
if (
|
|
2832
|
+
if (E === y)
|
|
2804
2833
|
return !0;
|
|
2805
|
-
for (const
|
|
2806
|
-
if (
|
|
2834
|
+
for (const b in E.children)
|
|
2835
|
+
if (E.children.hasOwnProperty(b) && d(y, E.children[b]))
|
|
2807
2836
|
return !0;
|
|
2808
2837
|
return !1;
|
|
2809
2838
|
}
|
|
2810
2839
|
function h() {
|
|
2811
|
-
var m,
|
|
2812
|
-
let y = p.value.x +
|
|
2813
|
-
o.value === "x" ? (y = ((m = v.value) == null ? void 0 : m.x) || 0, p.value.x = 0) : o.value === "y" && (
|
|
2814
|
-
const
|
|
2815
|
-
n.value && (n.value.style.transform =
|
|
2816
|
-
}
|
|
2817
|
-
function
|
|
2818
|
-
if (!
|
|
2840
|
+
var m, B;
|
|
2841
|
+
let y = p.value.x + s.value.x, E = p.value.y + s.value.y;
|
|
2842
|
+
o.value === "x" ? (y = ((m = v.value) == null ? void 0 : m.x) || 0, p.value.x = 0) : o.value === "y" && (E = ((B = v.value) == null ? void 0 : B.y) || 0, p.value.y = 0);
|
|
2843
|
+
const b = `translate3d(${Math.round(y)}px, ${Math.round(E)}px, 0px)`;
|
|
2844
|
+
n.value && (n.value.style.transform = b), r.value.x = y, r.value.y = E;
|
|
2845
|
+
}
|
|
2846
|
+
function g() {
|
|
2847
|
+
if (!c.value || !n.value)
|
|
2819
2848
|
return null;
|
|
2820
|
-
const y =
|
|
2821
|
-
top: y.top <
|
|
2822
|
-
right: y.right >
|
|
2823
|
-
bottom: y.bottom >
|
|
2824
|
-
left: y.left <
|
|
2849
|
+
const y = c.value.getBoundingClientRect(), E = n.value.getBoundingClientRect(), b = {
|
|
2850
|
+
top: y.top < E.top,
|
|
2851
|
+
right: y.right > E.right,
|
|
2852
|
+
bottom: y.bottom > E.bottom,
|
|
2853
|
+
left: y.left < E.left
|
|
2825
2854
|
};
|
|
2826
|
-
return
|
|
2855
|
+
return b.top || (p.value.y -= E.top - y.top), b.bottom || (p.value.y -= E.bottom - y.bottom), b.right || (p.value.x -= E.right - y.right), b.left || (p.value.x -= E.left - y.left), h(), b;
|
|
2827
2856
|
}
|
|
2828
|
-
function
|
|
2829
|
-
y && (v.value && y.subtract(v.value), p.value.set(y), h(),
|
|
2857
|
+
function T(y) {
|
|
2858
|
+
y && (v.value && y.subtract(v.value), p.value.set(y), h(), g());
|
|
2830
2859
|
}
|
|
2831
2860
|
function w(y) {
|
|
2832
|
-
f.value && a.value && (y.stopPropagation(), y.preventDefault(),
|
|
2861
|
+
f.value && a.value && (y.stopPropagation(), y.preventDefault(), T(P.fromEvent(y, u.value)));
|
|
2833
2862
|
}
|
|
2834
2863
|
function S() {
|
|
2835
2864
|
var y;
|
|
2836
|
-
f.value && (f.value = !1,
|
|
2865
|
+
f.value && (f.value = !1, s.value.add(p.value), p.value.reset(), (y = n.value) == null || y.classList.remove("ng-dragging"), document.removeEventListener("mousemove", w), document.removeEventListener("mouseup", S));
|
|
2837
2866
|
}
|
|
2838
2867
|
function k() {
|
|
2839
2868
|
!f.value && u.value && (f.value = !0, u.value.classList.add("ng-dragging"), document.addEventListener("mousemove", w), document.addEventListener("mouseup", S));
|
|
@@ -2841,26 +2870,37 @@ function sa(e, t) {
|
|
|
2841
2870
|
function L() {
|
|
2842
2871
|
if (n.value) {
|
|
2843
2872
|
const y = P.getTransformInfo(n.value);
|
|
2844
|
-
|
|
2873
|
+
s.value.set(y);
|
|
2845
2874
|
return;
|
|
2846
2875
|
}
|
|
2847
|
-
|
|
2876
|
+
s.value.reset();
|
|
2848
2877
|
}
|
|
2849
2878
|
function j(y) {
|
|
2850
2879
|
if (y instanceof MouseEvent && y.button === 2)
|
|
2851
2880
|
return;
|
|
2852
|
-
const
|
|
2853
|
-
u.value !== void 0 &&
|
|
2854
|
-
}
|
|
2855
|
-
function W(y,
|
|
2856
|
-
y && a.value &&
|
|
2881
|
+
const E = y.target || y.srcElement;
|
|
2882
|
+
u.value !== void 0 && E && !d(E, u.value) || a.value !== !1 && (y.stopPropagation(), y.preventDefault(), v.value = P.fromEvent(y, n.value), L(), k());
|
|
2883
|
+
}
|
|
2884
|
+
function W(y, E, b) {
|
|
2885
|
+
if (y && a.value && E) {
|
|
2886
|
+
if (e.dragHandle) {
|
|
2887
|
+
if (e.dragHandle instanceof HTMLElement)
|
|
2888
|
+
u.value = e.dragHandle;
|
|
2889
|
+
else if (typeof e.dragHandle == "string") {
|
|
2890
|
+
const m = E.querySelector(e.dragHandle);
|
|
2891
|
+
m && (u.value = m);
|
|
2892
|
+
}
|
|
2893
|
+
} else
|
|
2894
|
+
u.value = y;
|
|
2895
|
+
n.value = E, c.value = b, u.value.classList.add("ng-draggable"), u.value.addEventListener("mousedown", j);
|
|
2896
|
+
}
|
|
2857
2897
|
}
|
|
2858
2898
|
return {
|
|
2859
2899
|
registerDraggle: W,
|
|
2860
2900
|
resetTranslate: L
|
|
2861
2901
|
};
|
|
2862
2902
|
}
|
|
2863
|
-
function
|
|
2903
|
+
function ca(e, t) {
|
|
2864
2904
|
const n = l(e.enableEsc);
|
|
2865
2905
|
function a(o) {
|
|
2866
2906
|
o.key === "Escape" && e.enableEsc && t.emit("esc", { event: o, type: "esc" });
|
|
@@ -2869,38 +2909,38 @@ function ra(e, t) {
|
|
|
2869
2909
|
}
|
|
2870
2910
|
const Be = /* @__PURE__ */ q({
|
|
2871
2911
|
name: "FModal",
|
|
2872
|
-
props:
|
|
2912
|
+
props: ua,
|
|
2873
2913
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc"],
|
|
2874
2914
|
setup(e, t) {
|
|
2875
|
-
const n = l(e.width || 300), a = l(e.height || 200), o = l(e.modelValue), u = l(""),
|
|
2876
|
-
function
|
|
2915
|
+
const n = l(e.width || 300), a = l(e.height || 200), o = l(e.modelValue), u = l(""), c = l(e.class), f = l(e.fitContent), v = l(e.showHeader), s = l(""), p = l(e.showCloseButton), r = l(e.showMaxButton), d = l(!1), h = l(""), g = l(""), T = l(""), w = l(e.showButtons), S = l(e.title), k = l(e.reiszeable), L = l(e.containment || null), j = l();
|
|
2916
|
+
function W(M, V) {
|
|
2877
2917
|
o.value = !1, t.emit("update:modelValue", !1), V != null && t.emit(V ? "accept" : "cancel"), t.emit("closed", M);
|
|
2878
2918
|
}
|
|
2879
|
-
const
|
|
2919
|
+
const y = [{
|
|
2880
2920
|
name: "cancel",
|
|
2881
2921
|
text: "取消",
|
|
2882
2922
|
class: "btn btn-light",
|
|
2883
2923
|
handle: (M) => {
|
|
2884
|
-
|
|
2924
|
+
W(M, !1);
|
|
2885
2925
|
}
|
|
2886
2926
|
}, {
|
|
2887
2927
|
name: "accept",
|
|
2888
2928
|
text: "确定",
|
|
2889
2929
|
class: "btn btn-primary",
|
|
2890
2930
|
handle: (M) => {
|
|
2891
|
-
|
|
2931
|
+
W(M, !0);
|
|
2892
2932
|
}
|
|
2893
|
-
}],
|
|
2894
|
-
renderResizeBar:
|
|
2895
|
-
maximize:
|
|
2896
|
-
restore:
|
|
2897
|
-
boundingElement:
|
|
2898
|
-
resizedEventParam:
|
|
2899
|
-
allowDrag:
|
|
2900
|
-
unWindowResizeHandle:
|
|
2901
|
-
} =
|
|
2902
|
-
registerDraggle:
|
|
2903
|
-
} =
|
|
2933
|
+
}], E = l(e.buttons && e.buttons.length ? e.buttons : y), b = R(() => !!s.value), m = R(() => !!w.value && !!E.value), B = l(), A = l(), N = l(!1), {
|
|
2934
|
+
renderResizeBar: X,
|
|
2935
|
+
maximize: D,
|
|
2936
|
+
restore: F,
|
|
2937
|
+
boundingElement: z,
|
|
2938
|
+
resizedEventParam: C,
|
|
2939
|
+
allowDrag: I,
|
|
2940
|
+
unWindowResizeHandle: x
|
|
2941
|
+
} = sa(e), {
|
|
2942
|
+
registerDraggle: $
|
|
2943
|
+
} = ra(e);
|
|
2904
2944
|
O(() => e.title, (M, V) => {
|
|
2905
2945
|
M !== V && (S.value = M);
|
|
2906
2946
|
}), O(() => e.modelValue, (M, V) => {
|
|
@@ -2909,155 +2949,155 @@ const Be = /* @__PURE__ */ q({
|
|
|
2909
2949
|
M !== V && (v.value = M);
|
|
2910
2950
|
}), O(() => e.showButtons, (M, V) => {
|
|
2911
2951
|
M !== V && (w.value = M);
|
|
2912
|
-
}), O(() =>
|
|
2913
|
-
const
|
|
2914
|
-
JSON.stringify(
|
|
2952
|
+
}), O(() => C.value, (M, V) => {
|
|
2953
|
+
const ne = M || {}, ae = V || {};
|
|
2954
|
+
JSON.stringify(ne) !== JSON.stringify(ae) && t.emit("resize", {
|
|
2915
2955
|
newSize: M,
|
|
2916
2956
|
oldSize: V
|
|
2917
2957
|
});
|
|
2918
2958
|
});
|
|
2919
|
-
function
|
|
2959
|
+
function H() {
|
|
2920
2960
|
const M = document.querySelectorAll(".farris-modal").length;
|
|
2921
|
-
(!M || M - 1 <= 0) && document.body.classList.remove("modal-open");
|
|
2961
|
+
(!M || M - 1 <= 0) && document.body.classList.remove("modal-open"), j.value && j.value.classList.remove("show");
|
|
2922
2962
|
}
|
|
2923
|
-
const
|
|
2963
|
+
const te = R(() => (o.value ? document.body.classList.add("modal-open") : H(), o.value)), Re = R(() => {
|
|
2924
2964
|
const M = {
|
|
2925
2965
|
modal: !0,
|
|
2926
2966
|
"farris-modal": !0,
|
|
2927
|
-
fade: !0
|
|
2928
|
-
show: N.value
|
|
2967
|
+
fade: !0
|
|
2929
2968
|
};
|
|
2930
|
-
return M["f-modal-fitContent"] = !!f.value, M;
|
|
2931
|
-
}),
|
|
2932
|
-
var
|
|
2969
|
+
return M["f-modal-fitContent"] = !!f.value, M.show = !!te.value, M;
|
|
2970
|
+
}), Fe = R(() => {
|
|
2971
|
+
var ne;
|
|
2933
2972
|
const M = {
|
|
2934
2973
|
"modal-dialog": !0
|
|
2935
|
-
}, V = (
|
|
2936
|
-
return V == null || V.reduce((
|
|
2937
|
-
}),
|
|
2974
|
+
}, V = (ne = c.value) == null ? void 0 : ne.split(" ");
|
|
2975
|
+
return V == null || V.reduce((ae, qe) => (ae[qe] = !0, ae), M), M;
|
|
2976
|
+
}), ke = R(() => ({
|
|
2938
2977
|
position: "absolute",
|
|
2939
2978
|
top: `${(window.innerHeight - a.value) / 2}px`,
|
|
2940
2979
|
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
2941
2980
|
width: `${n.value}px`,
|
|
2942
2981
|
height: f.value ? "auto" : `${a.value}px`
|
|
2943
|
-
})),
|
|
2982
|
+
})), $e = R(() => ({
|
|
2944
2983
|
"modal-content": !0,
|
|
2945
2984
|
"modal-content-has-header": v.value
|
|
2946
|
-
})),
|
|
2985
|
+
})), We = R(() => {
|
|
2947
2986
|
const M = {
|
|
2948
2987
|
display: v.value ? "" : "none"
|
|
2949
2988
|
};
|
|
2950
|
-
return M["pointer-events"] =
|
|
2951
|
-
}),
|
|
2989
|
+
return M["pointer-events"] = I.value ? "auto" : "none", M;
|
|
2990
|
+
}), Ae = R(() => ({
|
|
2952
2991
|
"f-icon": !0,
|
|
2953
2992
|
modal_maximize: !0,
|
|
2954
|
-
modalrevert:
|
|
2955
|
-
})),
|
|
2993
|
+
modalrevert: N.value
|
|
2994
|
+
})), Oe = R(() => ({
|
|
2956
2995
|
"modal-body": !0,
|
|
2957
2996
|
"f-utils-flex-column": h.value === "iframe"
|
|
2958
2997
|
}));
|
|
2959
|
-
function
|
|
2998
|
+
function je() {
|
|
2960
2999
|
return {};
|
|
2961
3000
|
}
|
|
2962
|
-
const
|
|
3001
|
+
const Ve = R(() => {
|
|
2963
3002
|
const M = {
|
|
2964
|
-
textAlgin:
|
|
2965
|
-
}, V =
|
|
3003
|
+
textAlgin: T.value
|
|
3004
|
+
}, V = je();
|
|
2966
3005
|
return Object.assign(M, V);
|
|
2967
3006
|
});
|
|
2968
|
-
function
|
|
2969
|
-
if (M.stopPropagation(),
|
|
2970
|
-
|
|
3007
|
+
function ze(M) {
|
|
3008
|
+
if (M.stopPropagation(), N.value) {
|
|
3009
|
+
N.value = !1, F();
|
|
2971
3010
|
return;
|
|
2972
3011
|
}
|
|
2973
|
-
|
|
3012
|
+
D(), N.value = !0;
|
|
2974
3013
|
}
|
|
2975
|
-
async function
|
|
3014
|
+
async function He(M, V) {
|
|
2976
3015
|
M.handle && await M.handle(V, M) && t.emit("closed", V);
|
|
2977
3016
|
}
|
|
2978
3017
|
function Ne(M) {
|
|
2979
|
-
M.width && (n.value = M.width), M.height && (a.value = M.height), M.buttons && (
|
|
3018
|
+
M.width && (n.value = M.width), M.height && (a.value = M.height), M.buttons && (E.value = M.buttons), M.title && (S.value = M.title);
|
|
2980
3019
|
}
|
|
2981
3020
|
J(() => {
|
|
2982
|
-
|
|
3021
|
+
A.value && !L.value && (L.value = A.value.parentElement, z.value = L.value, $(B.value, A.value, z.value)), te.value && document.body.classList.add("modal-open"), ca(e, t);
|
|
2983
3022
|
}), be(() => {
|
|
2984
|
-
|
|
3023
|
+
H(), x && x();
|
|
2985
3024
|
}), t.expose({
|
|
2986
|
-
modalElementRef:
|
|
3025
|
+
modalElementRef: A,
|
|
2987
3026
|
updateModalOptions: Ne,
|
|
2988
|
-
close:
|
|
3027
|
+
close: W
|
|
2989
3028
|
});
|
|
2990
3029
|
function Pe() {
|
|
2991
|
-
return i("ul", null, [
|
|
3030
|
+
return i("ul", null, [d.value && i("li", {
|
|
2992
3031
|
class: "f-btn-icon f-bare"
|
|
2993
3032
|
}, [i("span", {
|
|
2994
3033
|
class: "f-icon modal_minimize"
|
|
2995
|
-
}, null)]),
|
|
2996
|
-
onClick:
|
|
3034
|
+
}, null)]), r.value && i("li", {
|
|
3035
|
+
onClick: ze,
|
|
2997
3036
|
class: "f-btn-icon f-bare",
|
|
2998
3037
|
style: "pointer-events: auto;"
|
|
2999
3038
|
}, [i("span", {
|
|
3000
|
-
class:
|
|
3039
|
+
class: Ae.value
|
|
3001
3040
|
}, null)]), p.value && i("li", {
|
|
3002
3041
|
class: "f-btn-icon f-bare",
|
|
3003
|
-
onClick: (M) =>
|
|
3042
|
+
onClick: (M) => W(M, !1),
|
|
3004
3043
|
style: "pointer-events: auto;"
|
|
3005
3044
|
}, [i("span", {
|
|
3006
3045
|
class: "f-icon modal_close"
|
|
3007
3046
|
}, null)])]);
|
|
3008
3047
|
}
|
|
3009
|
-
function
|
|
3048
|
+
function Ge() {
|
|
3010
3049
|
return i("div", {
|
|
3011
3050
|
class: "modal-footer",
|
|
3012
|
-
style:
|
|
3013
|
-
}, [
|
|
3051
|
+
style: Ve.value
|
|
3052
|
+
}, [E.value && E.value.map((M) => i("button", {
|
|
3014
3053
|
name: M.name,
|
|
3015
3054
|
type: "button",
|
|
3016
3055
|
class: M.class + (M.iconClass ? " btn-icontext" : ""),
|
|
3017
3056
|
onClick: (V) => {
|
|
3018
|
-
|
|
3057
|
+
He(M, V);
|
|
3019
3058
|
}
|
|
3020
3059
|
}, [!!M.iconClass && i("i", {
|
|
3021
3060
|
class: M.iconClass
|
|
3022
3061
|
}, null), M.text]))]);
|
|
3023
3062
|
}
|
|
3024
|
-
return () => i(
|
|
3063
|
+
return () => i(Qe, {
|
|
3025
3064
|
to: "body"
|
|
3026
3065
|
}, {
|
|
3027
3066
|
default: () => {
|
|
3028
3067
|
var M, V;
|
|
3029
|
-
return [
|
|
3030
|
-
class:
|
|
3031
|
-
style: "display: block"
|
|
3068
|
+
return [te.value && i("div", {
|
|
3069
|
+
class: Re.value,
|
|
3070
|
+
style: "display: block",
|
|
3071
|
+
ref: j
|
|
3032
3072
|
}, [i("div", {
|
|
3033
3073
|
id: u.value,
|
|
3034
|
-
class:
|
|
3035
|
-
style:
|
|
3036
|
-
ref:
|
|
3074
|
+
class: Fe.value,
|
|
3075
|
+
style: ke.value,
|
|
3076
|
+
ref: A
|
|
3037
3077
|
}, [i("div", {
|
|
3038
|
-
class:
|
|
3078
|
+
class: $e.value
|
|
3039
3079
|
}, [i("div", {
|
|
3040
|
-
ref:
|
|
3080
|
+
ref: B,
|
|
3041
3081
|
class: "modal-header",
|
|
3042
|
-
style:
|
|
3082
|
+
style: We.value
|
|
3043
3083
|
}, [i("div", {
|
|
3044
3084
|
class: "modal-title"
|
|
3045
|
-
}, [
|
|
3046
|
-
class:
|
|
3085
|
+
}, [b.value && i("span", {
|
|
3086
|
+
class: s.value,
|
|
3047
3087
|
style: "margin-right: 8px"
|
|
3048
3088
|
}, null), i("span", {
|
|
3049
3089
|
class: "modal-title-label"
|
|
3050
3090
|
}, [S.value])]), i("div", {
|
|
3051
3091
|
class: "actions"
|
|
3052
3092
|
}, [Pe()])]), i("div", {
|
|
3053
|
-
class:
|
|
3093
|
+
class: Oe.value
|
|
3054
3094
|
}, [(V = (M = t.slots).default) == null ? void 0 : V.call(M), h.value === "iframe" && i("iframe", {
|
|
3055
3095
|
title: u.value,
|
|
3056
3096
|
class: "f-utils-fill",
|
|
3057
3097
|
width: "100%",
|
|
3058
3098
|
frameborder: "0",
|
|
3059
|
-
src:
|
|
3060
|
-
}, null)]),
|
|
3099
|
+
src: g.value
|
|
3100
|
+
}, null)]), m.value && Ge()]), !f.value && k.value && A.value && X(A.value)])])];
|
|
3061
3101
|
}
|
|
3062
3102
|
});
|
|
3063
3103
|
}
|
|
@@ -3068,42 +3108,42 @@ function Le(e) {
|
|
|
3068
3108
|
if (e.render && typeof e.render == "function")
|
|
3069
3109
|
return e.render;
|
|
3070
3110
|
}
|
|
3071
|
-
function
|
|
3111
|
+
function da(e) {
|
|
3072
3112
|
const t = document.createElement("div");
|
|
3073
3113
|
t.style.display = "contents";
|
|
3074
|
-
const n =
|
|
3114
|
+
const n = _e({
|
|
3075
3115
|
setup(a, o) {
|
|
3076
3116
|
be(() => {
|
|
3077
3117
|
document.body.removeChild(t);
|
|
3078
3118
|
});
|
|
3079
|
-
const u = l(),
|
|
3119
|
+
const u = l(), c = l(e.class || ""), f = l(!!e.showButtons), v = l(!!e.showHeader), s = l(e.showCloseButton == null ? !0 : e.showCloseButton), p = l(!0), r = l(e.title || ""), d = e.acceptCallback || (() => {
|
|
3080
3120
|
}), h = e.rejectCallback || (() => {
|
|
3081
|
-
}),
|
|
3082
|
-
}),
|
|
3121
|
+
}), g = e.closedCallback || ((k) => {
|
|
3122
|
+
}), T = e.resizeHandle || ((k) => {
|
|
3083
3123
|
}), w = Le(e), S = (k) => {
|
|
3084
|
-
p.value = !1, n.unmount(),
|
|
3124
|
+
p.value = !1, n.unmount(), g(k);
|
|
3085
3125
|
};
|
|
3086
3126
|
return J(() => {
|
|
3087
3127
|
}), o.expose({
|
|
3088
3128
|
modalRef: u
|
|
3089
3129
|
}), () => i(Be, {
|
|
3090
3130
|
ref: u,
|
|
3091
|
-
class:
|
|
3131
|
+
class: c.value,
|
|
3092
3132
|
modelValue: p.value,
|
|
3093
3133
|
"onUpdate:modelValue": (k) => p.value = k,
|
|
3094
|
-
title:
|
|
3134
|
+
title: r.value,
|
|
3095
3135
|
width: e.width,
|
|
3096
3136
|
height: e.height,
|
|
3097
3137
|
buttons: e.buttons,
|
|
3098
3138
|
"show-header": v.value,
|
|
3099
3139
|
"show-buttons": f.value,
|
|
3100
|
-
"show-close-button":
|
|
3140
|
+
"show-close-button": s.value,
|
|
3101
3141
|
"show-max-button": !1,
|
|
3102
|
-
onAccept:
|
|
3142
|
+
onAccept: d,
|
|
3103
3143
|
onCancel: h,
|
|
3104
3144
|
fitContent: e.fitContent == null ? !0 : e.fitContent,
|
|
3105
3145
|
onClosed: S,
|
|
3106
|
-
onResize:
|
|
3146
|
+
onResize: T
|
|
3107
3147
|
}, {
|
|
3108
3148
|
default: () => [w && w(n)]
|
|
3109
3149
|
});
|
|
@@ -3130,29 +3170,29 @@ class me {
|
|
|
3130
3170
|
showButtons: !0,
|
|
3131
3171
|
showHeader: !0
|
|
3132
3172
|
}, t);
|
|
3133
|
-
return
|
|
3173
|
+
return da(n);
|
|
3134
3174
|
}
|
|
3135
3175
|
open(t) {
|
|
3136
3176
|
const n = document.createDocumentFragment();
|
|
3137
3177
|
t.showMaxButton && t.fitContent && (t.showMaxButton = !1);
|
|
3138
|
-
const a =
|
|
3178
|
+
const a = Ze(Object.assign({
|
|
3139
3179
|
title: "",
|
|
3140
3180
|
showButtons: !0,
|
|
3141
3181
|
showHeader: !0
|
|
3142
3182
|
}, t)), o = l(!0), u = a.value.acceptCallback || (() => {
|
|
3143
|
-
}),
|
|
3183
|
+
}), c = a.value.rejectCallback || (() => {
|
|
3144
3184
|
}), f = a.value.closedCallback || ((S, k) => {
|
|
3145
3185
|
}), v = a.value.resizeHandle || ((S) => {
|
|
3146
3186
|
});
|
|
3147
|
-
let
|
|
3148
|
-
const p = Le(a.value),
|
|
3187
|
+
let s;
|
|
3188
|
+
const p = Le(a.value), r = (S) => {
|
|
3149
3189
|
var L;
|
|
3150
3190
|
o.value = !1;
|
|
3151
3191
|
const k = (L = S == null ? void 0 : S.target) == null ? void 0 : L.classList.contains("modal_close");
|
|
3152
3192
|
f(S, this.isUseEscCloseModal.value ? "esc" : k ? "icon" : "button");
|
|
3153
|
-
},
|
|
3154
|
-
|
|
3155
|
-
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], se(null, n),
|
|
3193
|
+
}, d = (S) => {
|
|
3194
|
+
r(S), s && ce(() => {
|
|
3195
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], se(null, n), s = null, this.modalRef.value = null, this.modalRefs) {
|
|
3156
3196
|
const k = Object.keys(this.modalRefs);
|
|
3157
3197
|
k.length > 0 ? this.activeModalIndex.value = Math.max(...k) : this.activeModalIndex.value = 0;
|
|
3158
3198
|
}
|
|
@@ -3161,21 +3201,21 @@ class me {
|
|
|
3161
3201
|
}, h = (S) => {
|
|
3162
3202
|
var k;
|
|
3163
3203
|
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((k = this.activeModalInstance.value) == null || k.close(S == null ? void 0 : S.event));
|
|
3164
|
-
},
|
|
3204
|
+
}, g = () => i(Be, we({
|
|
3165
3205
|
ref: this.modalRef,
|
|
3166
3206
|
modelValue: o.value,
|
|
3167
3207
|
"onUpdate:modelValue": (S) => o.value = S
|
|
3168
3208
|
}, a.value, {
|
|
3169
3209
|
onAccept: u,
|
|
3170
|
-
onCancel:
|
|
3171
|
-
onClosed:
|
|
3210
|
+
onCancel: c,
|
|
3211
|
+
onClosed: d,
|
|
3172
3212
|
onResize: v,
|
|
3173
3213
|
onEsc: h
|
|
3174
3214
|
}), {
|
|
3175
3215
|
default: () => [p && p()]
|
|
3176
3216
|
});
|
|
3177
|
-
return
|
|
3178
|
-
const k =
|
|
3217
|
+
return s = ((S) => {
|
|
3218
|
+
const k = Ke(g, S);
|
|
3179
3219
|
return k.appContext = this.appContext, se(k, n), k;
|
|
3180
3220
|
})({
|
|
3181
3221
|
...a.value
|
|
@@ -3185,75 +3225,75 @@ class me {
|
|
|
3185
3225
|
a.value = {
|
|
3186
3226
|
...a.value,
|
|
3187
3227
|
...S
|
|
3188
|
-
},
|
|
3228
|
+
}, s && se(et(s, {
|
|
3189
3229
|
...a
|
|
3190
3230
|
}), n);
|
|
3191
3231
|
},
|
|
3192
|
-
destroy:
|
|
3232
|
+
destroy: d,
|
|
3193
3233
|
modalRef: this.activeModalInstance
|
|
3194
3234
|
};
|
|
3195
3235
|
}
|
|
3196
3236
|
}
|
|
3197
|
-
function
|
|
3237
|
+
function fa(e, t, n) {
|
|
3198
3238
|
var W;
|
|
3199
3239
|
function a() {
|
|
3200
3240
|
}
|
|
3201
|
-
const o = "", u = "",
|
|
3241
|
+
const o = "", u = "", c = l();
|
|
3202
3242
|
function f() {
|
|
3203
3243
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
3204
3244
|
}
|
|
3205
3245
|
function v() {
|
|
3206
3246
|
return !1;
|
|
3207
3247
|
}
|
|
3208
|
-
function
|
|
3248
|
+
function s() {
|
|
3209
3249
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
3210
3250
|
}
|
|
3211
3251
|
function p() {
|
|
3212
3252
|
return (t == null ? void 0 : t.schema.componentType) === "frame";
|
|
3213
3253
|
}
|
|
3214
|
-
function
|
|
3254
|
+
function r(y) {
|
|
3215
3255
|
if (!y || !y.value)
|
|
3216
3256
|
return null;
|
|
3217
3257
|
if (y.value.schema && y.value.schema.type === "component")
|
|
3218
3258
|
return y.value;
|
|
3219
|
-
const
|
|
3220
|
-
return
|
|
3259
|
+
const E = l(y == null ? void 0 : y.value.parent), b = r(E);
|
|
3260
|
+
return b || null;
|
|
3221
3261
|
}
|
|
3222
|
-
function
|
|
3223
|
-
const { componentInstance:
|
|
3224
|
-
return !
|
|
3262
|
+
function d(y = t) {
|
|
3263
|
+
const { componentInstance: E, designerItemElementRef: b } = y;
|
|
3264
|
+
return !E || !E.value ? null : E.value.canMove ? b : d(y.parent);
|
|
3225
3265
|
}
|
|
3226
3266
|
function h(y) {
|
|
3227
3267
|
return !!n;
|
|
3228
3268
|
}
|
|
3229
|
-
function
|
|
3269
|
+
function g() {
|
|
3230
3270
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
3231
3271
|
}
|
|
3232
|
-
function
|
|
3272
|
+
function T() {
|
|
3233
3273
|
}
|
|
3234
|
-
function w(y,
|
|
3274
|
+
function w(y, E) {
|
|
3235
3275
|
}
|
|
3236
3276
|
function S(y) {
|
|
3237
|
-
const { componentType:
|
|
3238
|
-
let
|
|
3239
|
-
const m =
|
|
3240
|
-
return
|
|
3241
|
-
}
|
|
3242
|
-
function k(y,
|
|
3243
|
-
const
|
|
3244
|
-
|
|
3245
|
-
let A = de(
|
|
3246
|
-
const
|
|
3247
|
-
return A && !A.id && A.type ===
|
|
3277
|
+
const { componentType: E } = y;
|
|
3278
|
+
let b = de(E, y);
|
|
3279
|
+
const m = E.toLowerCase().replace("-", "_");
|
|
3280
|
+
return b && !b.id && b.type === E && (b.id = `${m}_${Math.random().toString().slice(2, 6)}`), b;
|
|
3281
|
+
}
|
|
3282
|
+
function k(y, E) {
|
|
3283
|
+
const b = String(y.getAttribute("data-controltype")), m = y.getAttribute("data-feature"), B = m ? JSON.parse(m) : {};
|
|
3284
|
+
B.parentComponentInstance = c.value;
|
|
3285
|
+
let A = de(b, B);
|
|
3286
|
+
const N = b.toLowerCase().replace("-", "_");
|
|
3287
|
+
return A && !A.id && A.type === b && (A.id = `${N}_${Math.random().toString().slice(2, 6)}`), A;
|
|
3248
3288
|
}
|
|
3249
3289
|
function L(y) {
|
|
3250
3290
|
}
|
|
3251
3291
|
function j(...y) {
|
|
3252
3292
|
}
|
|
3253
|
-
return
|
|
3293
|
+
return c.value = {
|
|
3254
3294
|
canMove: f(),
|
|
3255
3295
|
canSelectParent: v(),
|
|
3256
|
-
canDelete:
|
|
3296
|
+
canDelete: s(),
|
|
3257
3297
|
canNested: !p(),
|
|
3258
3298
|
contents: t == null ? void 0 : t.schema.contents,
|
|
3259
3299
|
elementRef: e,
|
|
@@ -3262,11 +3302,11 @@ function da(e, t, n) {
|
|
|
3262
3302
|
styles: o,
|
|
3263
3303
|
designerClass: u,
|
|
3264
3304
|
canAccepts: h,
|
|
3265
|
-
getBelongedComponentInstance:
|
|
3266
|
-
getDraggableDesignItemElement:
|
|
3267
|
-
getDraggingDisplayText:
|
|
3305
|
+
getBelongedComponentInstance: r,
|
|
3306
|
+
getDraggableDesignItemElement: d,
|
|
3307
|
+
getDraggingDisplayText: g,
|
|
3268
3308
|
getPropConfig: j,
|
|
3269
|
-
getDragScopeElement:
|
|
3309
|
+
getDragScopeElement: T,
|
|
3270
3310
|
onAcceptMovedChildElement: w,
|
|
3271
3311
|
onAcceptNewChildElement: k,
|
|
3272
3312
|
onChildElementMovedOut: L,
|
|
@@ -3274,21 +3314,21 @@ function da(e, t, n) {
|
|
|
3274
3314
|
updateDragAndDropRules: a,
|
|
3275
3315
|
triggerBelongedComponentToMoveWhenMoved: l(!1),
|
|
3276
3316
|
triggerBelongedComponentToDeleteWhenDeleted: l(!1)
|
|
3277
|
-
},
|
|
3317
|
+
}, c;
|
|
3278
3318
|
}
|
|
3279
|
-
const
|
|
3319
|
+
const pa = /* @__PURE__ */ q({
|
|
3280
3320
|
name: "FResponseLayoutEditorSettingDesign",
|
|
3281
3321
|
props: ve,
|
|
3282
3322
|
emits: [],
|
|
3283
3323
|
setup(e, t) {
|
|
3284
|
-
const n = l(e.initialState), a = l(e.width), o = l(e.height), u = l(),
|
|
3324
|
+
const n = l(e.initialState), a = l(e.width), o = l(e.height), u = l(), c = ge("design-item-context"), f = fa(u, c);
|
|
3285
3325
|
J(() => {
|
|
3286
3326
|
u.value.componentInstance = f;
|
|
3287
3327
|
}), t.expose(f.value);
|
|
3288
3328
|
function v() {
|
|
3289
|
-
const
|
|
3329
|
+
const s = me.show({
|
|
3290
3330
|
// title: '响应式列宽编辑器',
|
|
3291
|
-
render: () => i(
|
|
3331
|
+
render: () => i(ie, {
|
|
3292
3332
|
initialState: n,
|
|
3293
3333
|
width: a,
|
|
3294
3334
|
height: o
|
|
@@ -3300,14 +3340,14 @@ const fa = /* @__PURE__ */ q({
|
|
|
3300
3340
|
text: "确定",
|
|
3301
3341
|
iconClass: "f-icon f-icon-check",
|
|
3302
3342
|
handle: () => {
|
|
3303
|
-
|
|
3343
|
+
s.destroy();
|
|
3304
3344
|
}
|
|
3305
3345
|
}, {
|
|
3306
3346
|
class: "btn btn-light",
|
|
3307
3347
|
text: "取消",
|
|
3308
3348
|
iconClass: "f-icon f-icon-close",
|
|
3309
3349
|
handle: () => {
|
|
3310
|
-
|
|
3350
|
+
s.destroy();
|
|
3311
3351
|
}
|
|
3312
3352
|
}]
|
|
3313
3353
|
});
|
|
@@ -3324,7 +3364,7 @@ const fa = /* @__PURE__ */ q({
|
|
|
3324
3364
|
class: "f-column-width-setting-button-center"
|
|
3325
3365
|
}, [G("高级设置")])])]);
|
|
3326
3366
|
}
|
|
3327
|
-
}),
|
|
3367
|
+
}), va = {
|
|
3328
3368
|
width: { Type: Number, default: 400 },
|
|
3329
3369
|
type: { Type: String, default: "info" },
|
|
3330
3370
|
title: { Type: String, default: "" },
|
|
@@ -3337,12 +3377,12 @@ const fa = /* @__PURE__ */ q({
|
|
|
3337
3377
|
function he() {
|
|
3338
3378
|
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
3339
3379
|
}
|
|
3340
|
-
async function
|
|
3380
|
+
async function ma(e) {
|
|
3341
3381
|
if (!navigator.clipboard)
|
|
3342
3382
|
throw he();
|
|
3343
3383
|
return navigator.clipboard.writeText(e);
|
|
3344
3384
|
}
|
|
3345
|
-
async function
|
|
3385
|
+
async function ha(e) {
|
|
3346
3386
|
const t = document.createElement("span");
|
|
3347
3387
|
t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
|
|
3348
3388
|
const n = window.getSelection(), a = window.document.createRange();
|
|
@@ -3355,56 +3395,56 @@ async function ma(e) {
|
|
|
3355
3395
|
}
|
|
3356
3396
|
if (!o) throw he();
|
|
3357
3397
|
}
|
|
3358
|
-
async function
|
|
3398
|
+
async function ya(e) {
|
|
3359
3399
|
try {
|
|
3360
|
-
await
|
|
3400
|
+
await ma(e);
|
|
3361
3401
|
} catch (t) {
|
|
3362
3402
|
try {
|
|
3363
|
-
await
|
|
3403
|
+
await ha(e);
|
|
3364
3404
|
} catch (n) {
|
|
3365
3405
|
throw n || t || he();
|
|
3366
3406
|
}
|
|
3367
3407
|
}
|
|
3368
3408
|
}
|
|
3369
|
-
function
|
|
3409
|
+
function ga() {
|
|
3370
3410
|
async function e(t) {
|
|
3371
|
-
await
|
|
3411
|
+
await ya(t);
|
|
3372
3412
|
}
|
|
3373
3413
|
return { onCopy: e };
|
|
3374
3414
|
}
|
|
3375
|
-
function
|
|
3376
|
-
const o = l(14), u = l(140),
|
|
3415
|
+
function ba(e, t, n, a) {
|
|
3416
|
+
const o = l(14), u = l(140), c = l(""), f = l(a.value.length), v = R(() => a.value), s = R(() => ({
|
|
3377
3417
|
"font-size": `${o.value}px`,
|
|
3378
3418
|
height: "100%"
|
|
3379
3419
|
}));
|
|
3380
|
-
function p(
|
|
3381
|
-
if (
|
|
3382
|
-
const
|
|
3383
|
-
f.value =
|
|
3420
|
+
function p(r) {
|
|
3421
|
+
if (r.currentTarget) {
|
|
3422
|
+
const d = r.currentTarget.value || "";
|
|
3423
|
+
f.value = d.length;
|
|
3384
3424
|
}
|
|
3385
3425
|
}
|
|
3386
|
-
return () => i(
|
|
3426
|
+
return () => i(ue, null, [i("textarea", {
|
|
3387
3427
|
title: "promptMessage",
|
|
3388
3428
|
name: "promptMessage",
|
|
3389
3429
|
class: "form-control",
|
|
3390
|
-
style:
|
|
3430
|
+
style: s.value,
|
|
3391
3431
|
rows: "4",
|
|
3392
3432
|
maxlength: u.value,
|
|
3393
|
-
onInput: (
|
|
3433
|
+
onInput: (r) => p(r)
|
|
3394
3434
|
}, [v.value]), i("span", {
|
|
3395
3435
|
class: "textarea-wordcount",
|
|
3396
|
-
title:
|
|
3436
|
+
title: c.value,
|
|
3397
3437
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
3398
3438
|
}, [f.value + " / " + u.value])]);
|
|
3399
3439
|
}
|
|
3400
|
-
function
|
|
3401
|
-
const o =
|
|
3402
|
-
function
|
|
3440
|
+
function wa(e, t, n, a) {
|
|
3441
|
+
const o = ba(e, t, n, a), u = /* @__PURE__ */ new Map([["text-area", o]]);
|
|
3442
|
+
function c(f) {
|
|
3403
3443
|
return u.get(f) || null;
|
|
3404
3444
|
}
|
|
3405
|
-
return { getEditorRender:
|
|
3445
|
+
return { getEditorRender: c };
|
|
3406
3446
|
}
|
|
3407
|
-
function
|
|
3447
|
+
function Sa() {
|
|
3408
3448
|
const e = l(!1), t = l("复制成功");
|
|
3409
3449
|
return {
|
|
3410
3450
|
feedbackStyle: R(() => {
|
|
@@ -3430,12 +3470,12 @@ function wa() {
|
|
|
3430
3470
|
toShowFeedback: e
|
|
3431
3471
|
};
|
|
3432
3472
|
}
|
|
3433
|
-
function
|
|
3473
|
+
function Ca(e, t) {
|
|
3434
3474
|
const n = t.getEditorRender(e.promptEditorType);
|
|
3435
3475
|
return () => n && n();
|
|
3436
3476
|
}
|
|
3437
|
-
function
|
|
3438
|
-
const t = l(3), n = l(480), a = R(() => !!e.value && !!e.value.date), o = R(() => `发生时间 : ${e.value && e.value.date || ""}`), u = R(() => !!e.value && !!e.value.detail),
|
|
3477
|
+
function Ma(e) {
|
|
3478
|
+
const t = l(3), n = l(480), a = R(() => !!e.value && !!e.value.date), o = R(() => `发生时间 : ${e.value && e.value.date || ""}`), u = R(() => !!e.value && !!e.value.detail), c = R(() => {
|
|
3439
3479
|
const w = `${n.value}px`;
|
|
3440
3480
|
return {
|
|
3441
3481
|
overflow: "hidden",
|
|
@@ -3445,20 +3485,20 @@ function Ca(e) {
|
|
|
3445
3485
|
"-webkit-line-clamp": t.value,
|
|
3446
3486
|
"max-height": w
|
|
3447
3487
|
};
|
|
3448
|
-
}), f = R(() => e.value && e.value.detail || ""), v = R(() => !0),
|
|
3488
|
+
}), f = R(() => e.value && e.value.detail || ""), v = R(() => !0), s = l(!1), p = l("展开"), r = l("收起"), d = R(() => {
|
|
3449
3489
|
const w = {
|
|
3450
3490
|
display: "block",
|
|
3451
3491
|
color: "#2A87FF"
|
|
3452
3492
|
};
|
|
3453
|
-
return w["text-align"] =
|
|
3493
|
+
return w["text-align"] = s.value ? "" : "right", w;
|
|
3454
3494
|
});
|
|
3455
3495
|
function h(w, S) {
|
|
3456
|
-
|
|
3496
|
+
s.value = !s.value, t.value = s.value ? 20 : 3;
|
|
3457
3497
|
}
|
|
3458
|
-
function
|
|
3498
|
+
function g(w) {
|
|
3459
3499
|
return h();
|
|
3460
3500
|
}
|
|
3461
|
-
function
|
|
3501
|
+
function T(w) {
|
|
3462
3502
|
return h();
|
|
3463
3503
|
}
|
|
3464
3504
|
return () => i("div", {
|
|
@@ -3466,37 +3506,37 @@ function Ca(e) {
|
|
|
3466
3506
|
}, [a.value && i("div", null, [o.value]), u.value && i("div", {
|
|
3467
3507
|
id: "exception_error_msg",
|
|
3468
3508
|
ref: "exceptionMessageRef",
|
|
3469
|
-
style:
|
|
3509
|
+
style: c.value
|
|
3470
3510
|
}, [G("详细信息 : "), i("span", {
|
|
3471
3511
|
innerHTML: f.value
|
|
3472
3512
|
}, null)]), v.value && i("span", {
|
|
3473
|
-
style:
|
|
3474
|
-
}, [
|
|
3475
|
-
onClick:
|
|
3513
|
+
style: d.value
|
|
3514
|
+
}, [s.value && i("span", {
|
|
3515
|
+
onClick: g,
|
|
3476
3516
|
style: "cursor: pointer;"
|
|
3477
|
-
}, [
|
|
3478
|
-
onClick:
|
|
3517
|
+
}, [r.value]), !s.value && i("span", {
|
|
3518
|
+
onClick: T,
|
|
3479
3519
|
style: "cursor: pointer;"
|
|
3480
3520
|
}, [p.value])])]);
|
|
3481
3521
|
}
|
|
3482
|
-
function
|
|
3522
|
+
function Ia(e) {
|
|
3483
3523
|
return () => i("p", {
|
|
3484
3524
|
class: "toast-msg-detail",
|
|
3485
3525
|
innerHTML: e.value
|
|
3486
3526
|
}, null);
|
|
3487
3527
|
}
|
|
3488
|
-
function
|
|
3528
|
+
function xa(e, t, n, a) {
|
|
3489
3529
|
const o = l(e.exceptionInfo), u = R(() => {
|
|
3490
|
-
const
|
|
3530
|
+
const d = {
|
|
3491
3531
|
"f-icon": !0
|
|
3492
3532
|
}, h = `f-icon-${t.value}`;
|
|
3493
|
-
return
|
|
3494
|
-
}),
|
|
3533
|
+
return d[h] = !0, d;
|
|
3534
|
+
}), c = R(() => n.value || o.value && o.value.message), f = R(() => a.value), v = R(() => !!a.value), s = R(() => !!o.value);
|
|
3495
3535
|
function p() {
|
|
3496
|
-
return
|
|
3536
|
+
return s.value ? Ma(o) : v.value ? Ia(f) : () => null;
|
|
3497
3537
|
}
|
|
3498
|
-
const
|
|
3499
|
-
return () => i(
|
|
3538
|
+
const r = p();
|
|
3539
|
+
return () => i(ue, null, [i("div", {
|
|
3500
3540
|
class: "float-left modal-tips-iconwrap"
|
|
3501
3541
|
}, [i("span", {
|
|
3502
3542
|
class: u.value
|
|
@@ -3504,21 +3544,21 @@ function Ia(e, t, n, a) {
|
|
|
3504
3544
|
class: "modal-tips-content"
|
|
3505
3545
|
}, [i("p", {
|
|
3506
3546
|
class: "toast-msg-title",
|
|
3507
|
-
innerHTML:
|
|
3508
|
-
}, null),
|
|
3547
|
+
innerHTML: c.value
|
|
3548
|
+
}, null), r()])]);
|
|
3509
3549
|
}
|
|
3510
|
-
function
|
|
3550
|
+
function Ea(e, t, n) {
|
|
3511
3551
|
const {
|
|
3512
3552
|
onCopy: a
|
|
3513
3553
|
} = t, {
|
|
3514
3554
|
toShowFeedback: o
|
|
3515
|
-
} = n, u = l("复制成功"),
|
|
3555
|
+
} = n, u = l("复制成功"), c = l("复制详细信息"), f = l(e.exceptionInfo || {
|
|
3516
3556
|
date: "",
|
|
3517
3557
|
message: "",
|
|
3518
3558
|
detail: ""
|
|
3519
3559
|
}), v = R(() => f.value && f.value.detail || "");
|
|
3520
|
-
function
|
|
3521
|
-
a(v.value).catch((
|
|
3560
|
+
function s(p) {
|
|
3561
|
+
a(v.value).catch((r) => {
|
|
3522
3562
|
u.value = "复制失败";
|
|
3523
3563
|
}).finally(() => {
|
|
3524
3564
|
o.value = !0, setTimeout(() => {
|
|
@@ -3529,12 +3569,12 @@ function xa(e, t, n) {
|
|
|
3529
3569
|
return () => i("span", {
|
|
3530
3570
|
style: "width: 100%;color: #2A87FF;padding-left: 37px;"
|
|
3531
3571
|
}, [i("span", {
|
|
3532
|
-
onClick:
|
|
3572
|
+
onClick: s,
|
|
3533
3573
|
style: "cursor: pointer;"
|
|
3534
|
-
}, [
|
|
3574
|
+
}, [c.value])]);
|
|
3535
3575
|
}
|
|
3536
|
-
function
|
|
3537
|
-
const o = l(e.type), u = l([]),
|
|
3576
|
+
function Da(e, t, n, a) {
|
|
3577
|
+
const o = l(e.type), u = l([]), c = l(e.exceptionInfo), f = l(e.okButtonText), v = l(e.cancelButtonText), s = l(!0), p = l(!0), r = R(() => !!(u.value && u.value.length)), d = R(() => c.value && c.value.date && c.value.message && c.value.detail), h = R(() => !(u.value && u.value.length) && (f.value || v.value)), g = R(() => p.value && f.value), T = R(() => s.value && v.value), w = Ea(e, n, a);
|
|
3538
3578
|
function S(L) {
|
|
3539
3579
|
o.value === "question" && t.emit("reject"), t.emit("close");
|
|
3540
3580
|
}
|
|
@@ -3543,15 +3583,15 @@ function Ea(e, t, n, a) {
|
|
|
3543
3583
|
}
|
|
3544
3584
|
return () => i("div", {
|
|
3545
3585
|
class: "modal-footer"
|
|
3546
|
-
}, [
|
|
3586
|
+
}, [d.value && w(), h.value && T.value && i("button", {
|
|
3547
3587
|
type: "button",
|
|
3548
3588
|
class: "btn btn-secondary btn-lg",
|
|
3549
3589
|
onClick: S
|
|
3550
|
-
}, [v.value]), h.value &&
|
|
3590
|
+
}, [v.value]), h.value && g.value && i("button", {
|
|
3551
3591
|
type: "button",
|
|
3552
3592
|
class: "btn btn-primary btn-lg",
|
|
3553
3593
|
onClick: k
|
|
3554
|
-
}, [f.value]),
|
|
3594
|
+
}, [f.value]), r.value && u.value.length && u.value.map((L) => i("button", {
|
|
3555
3595
|
type: "button",
|
|
3556
3596
|
onClick: L.handle,
|
|
3557
3597
|
class: L.class
|
|
@@ -3559,9 +3599,9 @@ function Ea(e, t, n, a) {
|
|
|
3559
3599
|
class: L.iconClass
|
|
3560
3600
|
}, null), L.text]))]);
|
|
3561
3601
|
}
|
|
3562
|
-
const
|
|
3602
|
+
const oe = /* @__PURE__ */ q({
|
|
3563
3603
|
name: "FMessageBox",
|
|
3564
|
-
props:
|
|
3604
|
+
props: va,
|
|
3565
3605
|
emits: ["accept", "reject", "close"],
|
|
3566
3606
|
setup(e, t) {
|
|
3567
3607
|
const n = l(e.type), a = l(e.title), o = l(e.detail), u = R(() => {
|
|
@@ -3571,33 +3611,33 @@ const le = /* @__PURE__ */ q({
|
|
|
3571
3611
|
"flex-row": !0
|
|
3572
3612
|
}, S = `messager-type-${n.value}`;
|
|
3573
3613
|
return w[S] = !0, w;
|
|
3574
|
-
}),
|
|
3614
|
+
}), c = R(() => {
|
|
3575
3615
|
const w = {};
|
|
3576
3616
|
return n.value === "prompt" ? w.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (w.padding = "0.5rem 1.5rem 1rem 1.5rem"), w;
|
|
3577
|
-
}), f =
|
|
3617
|
+
}), f = ga(), v = wa(e, n, a, o), s = Sa(), {
|
|
3578
3618
|
feedbackStyle: p,
|
|
3579
|
-
feedbackMessage:
|
|
3580
|
-
} =
|
|
3581
|
-
function
|
|
3619
|
+
feedbackMessage: r
|
|
3620
|
+
} = s;
|
|
3621
|
+
function d() {
|
|
3582
3622
|
return i("div", {
|
|
3583
3623
|
style: p.value
|
|
3584
|
-
}, [
|
|
3624
|
+
}, [r.value]);
|
|
3585
3625
|
}
|
|
3586
3626
|
function h() {
|
|
3587
3627
|
switch (n.value) {
|
|
3588
3628
|
case "prompt":
|
|
3589
|
-
return
|
|
3629
|
+
return Ca(e, v);
|
|
3590
3630
|
default:
|
|
3591
|
-
return
|
|
3631
|
+
return xa(e, n, a, o);
|
|
3592
3632
|
}
|
|
3593
3633
|
}
|
|
3594
|
-
const
|
|
3634
|
+
const g = h(), T = Da(e, t, f, s);
|
|
3595
3635
|
return () => i("div", {
|
|
3596
3636
|
class: "farris-messager"
|
|
3597
3637
|
}, [i("section", {
|
|
3598
3638
|
class: u.value,
|
|
3599
|
-
style:
|
|
3600
|
-
}, [
|
|
3639
|
+
style: c.value
|
|
3640
|
+
}, [g()]), T(), d()]);
|
|
3601
3641
|
}
|
|
3602
3642
|
});
|
|
3603
3643
|
class Y {
|
|
@@ -3605,22 +3645,22 @@ class Y {
|
|
|
3605
3645
|
let n = new me();
|
|
3606
3646
|
const a = Z({
|
|
3607
3647
|
...t
|
|
3608
|
-
}), o = !1, u = a.type === "error" || a.type === "prompt",
|
|
3648
|
+
}), o = !1, u = a.type === "error" || a.type === "prompt", c = a.type === "error" ? "错误提示" : a.type === "prompt" && a.title || "", f = a.acceptCallback || (() => {
|
|
3609
3649
|
}), v = a.rejectCallback || (() => {
|
|
3610
3650
|
});
|
|
3611
|
-
let
|
|
3651
|
+
let s = null;
|
|
3612
3652
|
const p = () => {
|
|
3613
|
-
|
|
3653
|
+
s && (s == null || s.destroy(), n = null);
|
|
3614
3654
|
};
|
|
3615
|
-
|
|
3655
|
+
s = n == null ? void 0 : n.open({
|
|
3616
3656
|
class: "modal-message modal-message-type-info",
|
|
3617
|
-
title:
|
|
3657
|
+
title: c,
|
|
3618
3658
|
showButtons: o,
|
|
3619
3659
|
showHeader: u,
|
|
3620
3660
|
width: a.width || 400,
|
|
3621
3661
|
fitContent: !0,
|
|
3622
3662
|
showMaxButton: !1,
|
|
3623
|
-
render: () => i(
|
|
3663
|
+
render: () => i(oe, we(a, {
|
|
3624
3664
|
onAccept: f,
|
|
3625
3665
|
onReject: v,
|
|
3626
3666
|
onClose: p
|
|
@@ -3694,8 +3734,8 @@ class Y {
|
|
|
3694
3734
|
Y.show(u);
|
|
3695
3735
|
}
|
|
3696
3736
|
}
|
|
3697
|
-
|
|
3698
|
-
e.component(
|
|
3737
|
+
oe.install = (e) => {
|
|
3738
|
+
e.component(oe.name, oe), e.provide("FMessageBoxService", Y);
|
|
3699
3739
|
};
|
|
3700
3740
|
const re = /* @__PURE__ */ q({
|
|
3701
3741
|
name: "FResponseLayoutEditorSetting",
|
|
@@ -3706,10 +3746,10 @@ const re = /* @__PURE__ */ q({
|
|
|
3706
3746
|
O(() => e.modelValue, (v) => {
|
|
3707
3747
|
n.value = v;
|
|
3708
3748
|
});
|
|
3709
|
-
function u(v,
|
|
3710
|
-
t.emit("change",
|
|
3749
|
+
function u(v, s) {
|
|
3750
|
+
t.emit("change", s), v && v.unmount();
|
|
3711
3751
|
}
|
|
3712
|
-
function
|
|
3752
|
+
function c(v) {
|
|
3713
3753
|
v && v.unmount();
|
|
3714
3754
|
}
|
|
3715
3755
|
function f() {
|
|
@@ -3719,12 +3759,12 @@ const re = /* @__PURE__ */ q({
|
|
|
3719
3759
|
return;
|
|
3720
3760
|
}
|
|
3721
3761
|
me.show({
|
|
3722
|
-
render: (v) => i(
|
|
3762
|
+
render: (v) => i(ie, {
|
|
3723
3763
|
initialState: n,
|
|
3724
3764
|
width: a.value,
|
|
3725
3765
|
height: o.value,
|
|
3726
|
-
onClose: () =>
|
|
3727
|
-
onSubmit: (
|
|
3766
|
+
onClose: () => c(v),
|
|
3767
|
+
onSubmit: (s) => u(v, s)
|
|
3728
3768
|
}, null),
|
|
3729
3769
|
width: 900,
|
|
3730
3770
|
height: 500,
|
|
@@ -3744,19 +3784,19 @@ const re = /* @__PURE__ */ q({
|
|
|
3744
3784
|
class: "f-column-width-setting-button-center"
|
|
3745
3785
|
}, [G("高级设置")])])]);
|
|
3746
3786
|
}
|
|
3747
|
-
}),
|
|
3787
|
+
}), ka = {
|
|
3748
3788
|
install(e) {
|
|
3749
|
-
e.component(
|
|
3789
|
+
e.component(ie.name, ie), e.component(re.name, re);
|
|
3750
3790
|
},
|
|
3751
3791
|
register(e, t, n, a) {
|
|
3752
3792
|
e["response-layout-editor-setting"] = re, t["response-layout-editor-setting"] = ye;
|
|
3753
3793
|
},
|
|
3754
3794
|
registerDesigner(e, t, n) {
|
|
3755
|
-
e["response-layout-editor-setting"] =
|
|
3795
|
+
e["response-layout-editor-setting"] = pa, t["response-layout-editor-setting"] = ye;
|
|
3756
3796
|
}
|
|
3757
3797
|
};
|
|
3758
3798
|
export {
|
|
3759
|
-
|
|
3760
|
-
|
|
3761
|
-
|
|
3799
|
+
ie as ResponseLayoutEditor,
|
|
3800
|
+
ka as default,
|
|
3801
|
+
at as responseLayoutEditorProps
|
|
3762
3802
|
};
|