@farris/ui-vue 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/index.esm.js +58 -58
- package/components/accordion/index.umd.cjs +1 -1
- package/components/accordion/package.json +1 -1
- package/components/avatar/index.esm.js +124 -116
- 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/index.esm.js +1 -1
- package/components/capsule/index.umd.cjs +1 -1
- package/components/capsule/package.json +1 -1
- package/components/checkbox/index.esm.js +219 -209
- 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 +36 -28
- 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/index.esm.js +2 -2
- package/components/common/index.umd.cjs +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 +406 -402
- 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 +4439 -4273
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-grid/package.json +1 -1
- package/components/data-view/index.esm.js +2904 -2892
- package/components/data-view/index.umd.cjs +1 -1
- package/components/data-view/package.json +1 -1
- package/components/date-picker/index.esm.js +250 -242
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/date-picker/package.json +1 -1
- package/components/designer-canvas/index.css +1 -0
- package/components/designer-canvas/index.esm.js +24 -21
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-canvas/package.json +1 -1
- package/components/designer-outline/index.esm.js +44 -42
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/designer-outline/package.json +1 -1
- package/components/designer-toolbox/index.esm.js +28 -467
- package/components/designer-toolbox/index.umd.cjs +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 +984 -928
- 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 +281 -277
- 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 +1917 -1901
- 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 +4185 -4023
- 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 +595 -581
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-bar/package.json +1 -1
- package/components/flow-canvas/index.css +1 -0
- package/components/flow-canvas/index.esm.js +38 -35
- 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 +256 -248
- 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 +1522 -1519
- 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 +4629 -4410
- 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 +4454 -4255
- 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/index.esm.js +511 -469
- package/components/nav/index.umd.cjs +2 -2
- package/components/nav/package.json +1 -1
- package/components/notify/package.json +1 -1
- package/components/order/index.esm.js +972 -920
- 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 +917 -893
- package/components/page-header/index.umd.cjs +1 -1
- package/components/page-header/package.json +1 -1
- package/components/pagination/index.esm.js +491 -449
- package/components/pagination/index.umd.cjs +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 +108 -101
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-editor/package.json +1 -1
- package/components/property-panel/index.esm.js +361 -349
- 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 +72 -64
- 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 +452 -439
- 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 +610 -592
- 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 +4041 -3749
- 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 +159 -178
- 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 +1450 -1408
- 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 +86 -78
- 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 +387 -379
- 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 +95 -93
- 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 +4437 -4271
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-grid/package.json +1 -1
- package/components/tree-view/index.esm.js +1989 -1985
- 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 +12989 -12513
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -0
- package/package.json +2 -2
- 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/condition/index.d.ts +60 -1
- 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/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/data-view/components/column-setting/column-setting.component.d.ts +2 -1
- package/types/data-view/composition/types.d.ts +2 -0
- 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/designer/use-designer-rules.d.ts +3 -3
- 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/list-view/src/composition/types.d.ts +1 -1
- package/types/lookup/src/designer/use-lookup-rules.d.ts +3 -0
- package/types/lookup/src/property-config/converters/lookup-property.converter.d.ts +8 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +29 -25
- package/types/mapping-editor/src/mapping-editor.props.d.ts +8 -0
- package/types/message-box/index.d.ts +84 -1
- package/types/modal/src/modal.component.d.ts +3 -3
- package/types/modal/src/modal.props.d.ts +3 -5
- package/types/notify/index.d.ts +84 -1
- 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 -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/types/tree-grid/src/schema/column-resolver.d.ts +3 -0
- package/components/button-edit/style.css +0 -1
- package/components/designer-canvas/style.css +0 -1
- package/components/external-container/style.css +0 -1
- package/components/field-selector/style.css +0 -1
- package/components/flow-canvas/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-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/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
|
|
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,11 +451,11 @@ 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);
|
|
@@ -470,11 +470,11 @@ function pt(e, t) {
|
|
|
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
|
|
477
|
+
function ht(e = {}) {
|
|
478
478
|
function t(r, p, s, c) {
|
|
479
479
|
if (typeof s == "number")
|
|
480
480
|
return c[r].length === s;
|
|
@@ -528,24 +528,24 @@ function mt(e = {}) {
|
|
|
528
528
|
}
|
|
529
529
|
return { parseValueSchema: v };
|
|
530
530
|
}
|
|
531
|
-
const
|
|
532
|
-
|
|
531
|
+
const yt = {}, gt = {};
|
|
532
|
+
ht();
|
|
533
533
|
function K(e, t, n = /* @__PURE__ */ new Map(), a = (d, f, v) => f, o = {}, u = (d) => d) {
|
|
534
|
-
return Ce[t.title] = t, Me[t.title] = a,
|
|
535
|
-
const f =
|
|
534
|
+
return Ce[t.title] = t, Me[t.title] = a, yt[t.title] = o, gt[t.title] = u, (d = {}) => {
|
|
535
|
+
const f = mt(d, t, n), v = Object.keys(e).reduce((r, p) => (r[p] = e[p].default, r), {});
|
|
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,14 +594,14 @@ 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
|
-
|
|
604
|
+
O(() => e.isActive, (d) => {
|
|
605
605
|
a.value = d;
|
|
606
606
|
});
|
|
607
607
|
const o = R(() => ({
|
|
@@ -613,7 +613,7 @@ const Et = /* @__PURE__ */ q({
|
|
|
613
613
|
t.emit("mounted", n, e.value);
|
|
614
614
|
});
|
|
615
615
|
function u(d) {
|
|
616
|
-
t.emit("active", d, {
|
|
616
|
+
e.disabled || t.emit("active", d, {
|
|
617
617
|
name: e.name,
|
|
618
618
|
value: e.value
|
|
619
619
|
});
|
|
@@ -626,7 +626,7 @@ const Et = /* @__PURE__ */ q({
|
|
|
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"],
|
|
@@ -648,30 +648,30 @@ const Et = /* @__PURE__ */ q({
|
|
|
648
648
|
function S(g) {
|
|
649
649
|
var m;
|
|
650
650
|
if (w.has(g.value)) {
|
|
651
|
-
const
|
|
652
|
-
if (
|
|
653
|
-
const A =
|
|
651
|
+
const T = (m = w.get(g.value)) == null ? void 0 : m.value;
|
|
652
|
+
if (T) {
|
|
653
|
+
const A = T.getBoundingClientRect(), H = a.value.getBoundingClientRect();
|
|
654
654
|
s.value = A.left - H.left + o + a.value.scrollLeft, c.value = A.width - 2 * o;
|
|
655
655
|
}
|
|
656
656
|
}
|
|
657
657
|
}
|
|
658
658
|
function k(g, m) {
|
|
659
|
-
const
|
|
660
|
-
u.value =
|
|
659
|
+
const T = g.value;
|
|
660
|
+
u.value = T, t.emit("update:modelValue", T), S(g), m && t.emit("change", T);
|
|
661
661
|
}
|
|
662
662
|
function L(g) {
|
|
663
|
-
const m = n.value.findIndex((
|
|
663
|
+
const m = n.value.findIndex((T) => T.value === g);
|
|
664
664
|
m > -1 && k(n.value[m], !1);
|
|
665
665
|
}
|
|
666
|
-
|
|
666
|
+
O(() => e.modelValue, (g) => {
|
|
667
667
|
u.value = g, L(u.value);
|
|
668
|
-
}),
|
|
669
|
-
const m = g.filter((
|
|
670
|
-
y(m), n.value = m, await ce(), L(u.value), h.value = Array.from(w.values()).reduce((
|
|
668
|
+
}), O(() => e.items, async (g) => {
|
|
669
|
+
const m = g.filter((T) => T.show);
|
|
670
|
+
y(m), n.value = m, await ce(), L(u.value), h.value = Array.from(w.values()).reduce((T, A) => (T += A.value.clientWidth, T), 0);
|
|
671
671
|
}), J(async () => {
|
|
672
672
|
L(u.value), await ce(), d.value = "0.1s ease-out all", h.value = Array.from(w.values()).reduce((g, m) => (g += m.value.clientWidth, g), 0);
|
|
673
673
|
});
|
|
674
|
-
function
|
|
674
|
+
function j(g, m) {
|
|
675
675
|
k(m, !0);
|
|
676
676
|
}
|
|
677
677
|
function W(g, m) {
|
|
@@ -682,8 +682,8 @@ const Et = /* @__PURE__ */ q({
|
|
|
682
682
|
g.find((A) => A.value === m) || w.delete(m);
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return i(
|
|
685
|
+
function E(g, m) {
|
|
686
|
+
return i(Dt, {
|
|
687
687
|
name: g.name,
|
|
688
688
|
value: g.value,
|
|
689
689
|
isActive: g.value === u.value,
|
|
@@ -691,7 +691,7 @@ const Et = /* @__PURE__ */ q({
|
|
|
691
691
|
disabled: g.disabled,
|
|
692
692
|
key: g.value,
|
|
693
693
|
onMounted: W,
|
|
694
|
-
onActive:
|
|
694
|
+
onActive: j
|
|
695
695
|
}, null);
|
|
696
696
|
}
|
|
697
697
|
return () => i("span", {
|
|
@@ -700,7 +700,7 @@ const Et = /* @__PURE__ */ q({
|
|
|
700
700
|
style: r.value
|
|
701
701
|
}, [i("span", {
|
|
702
702
|
class: "f-capsule-pane"
|
|
703
|
-
}, [n.value.map((g, m) =>
|
|
703
|
+
}, [n.value.map((g, m) => E(g, m))]), i("small", {
|
|
704
704
|
class: p.value,
|
|
705
705
|
style: b.value
|
|
706
706
|
}, null), i("div", {
|
|
@@ -708,9 +708,9 @@ const Et = /* @__PURE__ */ q({
|
|
|
708
708
|
style: B.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"],
|
|
@@ -829,7 +829,7 @@ const jt = /* @__PURE__ */ q({
|
|
|
829
829
|
offBackground: f,
|
|
830
830
|
onColor: v,
|
|
831
831
|
offColor: r
|
|
832
|
-
} =
|
|
832
|
+
} = Ye(e), p = l(e.modelValue), s = R(() => ({
|
|
833
833
|
switch: !0,
|
|
834
834
|
"f-cmp-switch": !0,
|
|
835
835
|
checked: p.value,
|
|
@@ -851,8 +851,10 @@ const jt = /* @__PURE__ */ q({
|
|
|
851
851
|
function B() {
|
|
852
852
|
n.value || (p.value = !p.value, t.emit("update:modelValue", p.value));
|
|
853
853
|
}
|
|
854
|
-
return
|
|
854
|
+
return O(p, (w, S) => {
|
|
855
855
|
w !== S && t.emit("modelValueChanged", w);
|
|
856
|
+
}), O(() => e.modelValue, (w, S) => {
|
|
857
|
+
w !== S && (p.value = w);
|
|
856
858
|
}), () => i("span", {
|
|
857
859
|
tabindex: "0",
|
|
858
860
|
role: "button",
|
|
@@ -869,9 +871,9 @@ const jt = /* @__PURE__ */ q({
|
|
|
869
871
|
style: h.value
|
|
870
872
|
}, [t.slots.default && t.slots.default()])]);
|
|
871
873
|
}
|
|
872
|
-
}),
|
|
874
|
+
}), zt = /* @__PURE__ */ q({
|
|
873
875
|
name: "FScreenResolutionSelector",
|
|
874
|
-
props:
|
|
876
|
+
props: lt,
|
|
875
877
|
emits: ["screenNameChanged", "currentScreenResolutionChanged", "switchInStandardModeChanged"],
|
|
876
878
|
setup(e, t) {
|
|
877
879
|
const n = l([{
|
|
@@ -903,12 +905,12 @@ const jt = /* @__PURE__ */ q({
|
|
|
903
905
|
function v() {
|
|
904
906
|
t.emit("switchInStandardModeChanged", d.value);
|
|
905
907
|
}
|
|
906
|
-
|
|
908
|
+
O(d, () => {
|
|
907
909
|
}), fe(() => {
|
|
908
910
|
a.value.mode === "standard" ? (d.value = !0, v()) : d.value = !1;
|
|
909
911
|
});
|
|
910
912
|
function r() {
|
|
911
|
-
return i(
|
|
913
|
+
return i(Tt, {
|
|
912
914
|
class: "f-layout-editor-screen-resolution-selector-frame",
|
|
913
915
|
items: n.value,
|
|
914
916
|
modelValue: o.value,
|
|
@@ -924,7 +926,7 @@ const jt = /* @__PURE__ */ q({
|
|
|
924
926
|
class: "f-layout-editor-screen-resolution-selector-form"
|
|
925
927
|
}, [G("表单布局配置")])]), r(), i("div", {
|
|
926
928
|
class: "f-layout-editor-screen-resolution-selector-switch"
|
|
927
|
-
}, [i(
|
|
929
|
+
}, [i(Vt, {
|
|
928
930
|
class: "f-layout-editor-show-switch",
|
|
929
931
|
modelValue: d.value,
|
|
930
932
|
"onUpdate:modelValue": (p) => d.value = p,
|
|
@@ -935,7 +937,7 @@ const jt = /* @__PURE__ */ q({
|
|
|
935
937
|
class: "f-layout-editor-show-switch-label"
|
|
936
938
|
}, [G("自定义模式")])])]);
|
|
937
939
|
}
|
|
938
|
-
}),
|
|
940
|
+
}), Nt = {
|
|
939
941
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
940
942
|
currentScreenResolution: { type: String, default: "" },
|
|
941
943
|
/** 模式开关 */
|
|
@@ -944,7 +946,7 @@ const jt = /* @__PURE__ */ q({
|
|
|
944
946
|
currentArea: { type: Object, default: [] },
|
|
945
947
|
/** 接受组件列表区传入的二维数组 */
|
|
946
948
|
twoDimensionalArray: { type: Array, default: [] }
|
|
947
|
-
},
|
|
949
|
+
}, Ht = {
|
|
948
950
|
/** 单个组件的预览状态 */
|
|
949
951
|
item: { type: Object, default: {} },
|
|
950
952
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
@@ -953,11 +955,11 @@ const jt = /* @__PURE__ */ q({
|
|
|
953
955
|
switchInStandardMode: { type: Boolean, default: !1 }
|
|
954
956
|
}, Pt = /* @__PURE__ */ q({
|
|
955
957
|
name: "FColumnWidthView",
|
|
956
|
-
props:
|
|
958
|
+
props: Ht,
|
|
957
959
|
emits: [],
|
|
958
960
|
setup(e, t) {
|
|
959
961
|
const n = l(e.item), a = l(e.currentScreenResolution), o = R(() => `col-${n.value[`columnIn${a.value}`]}`);
|
|
960
|
-
return
|
|
962
|
+
return O([() => e.item, () => e.currentScreenResolution], ([u, d], [f, v]) => {
|
|
961
963
|
u !== f && (n.value = u), d !== v && (a.value = d);
|
|
962
964
|
}), () => i("div", {
|
|
963
965
|
class: o.value
|
|
@@ -968,15 +970,15 @@ const jt = /* @__PURE__ */ q({
|
|
|
968
970
|
class: "f-layout-editor-column-width-view-label"
|
|
969
971
|
}, [n.value.label])])]);
|
|
970
972
|
}
|
|
971
|
-
}),
|
|
973
|
+
}), Gt = /* @__PURE__ */ q({
|
|
972
974
|
name: "FPreview",
|
|
973
|
-
props:
|
|
975
|
+
props: Nt,
|
|
974
976
|
emits: ["update:twoDimensionalArray"],
|
|
975
977
|
setup(e, t) {
|
|
976
978
|
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.currentArea), u = l(e.twoDimensionalArray), d = l([]);
|
|
977
|
-
|
|
979
|
+
O([() => e.currentArea, () => e.switchInStandardMode, () => e.currentScreenResolution], ([s, c, h], [b, B, w]) => {
|
|
978
980
|
s !== b && (o.value = s), c !== B && (a.value = c), h !== w && (n.value = h);
|
|
979
|
-
}),
|
|
981
|
+
}), O(() => e.twoDimensionalArray, () => {
|
|
980
982
|
u.value = e.twoDimensionalArray, f();
|
|
981
983
|
}), J(() => {
|
|
982
984
|
f();
|
|
@@ -1033,7 +1035,7 @@ const jt = /* @__PURE__ */ q({
|
|
|
1033
1035
|
}, null))]));
|
|
1034
1036
|
})])])]);
|
|
1035
1037
|
}
|
|
1036
|
-
}),
|
|
1038
|
+
}), qt = {
|
|
1037
1039
|
/** 用户切换屏幕分辨率-缩写-例:MD; */
|
|
1038
1040
|
currentScreenResolution: { type: String, default: "" },
|
|
1039
1041
|
/** 检测用户是否切换模式 */
|
|
@@ -1051,7 +1053,7 @@ const jt = /* @__PURE__ */ q({
|
|
|
1051
1053
|
onOriginalDataChanged: { type: Function, default: () => {
|
|
1052
1054
|
} }
|
|
1053
1055
|
};
|
|
1054
|
-
function
|
|
1056
|
+
function Ut(e, t) {
|
|
1055
1057
|
const n = l(-1), a = l(!1);
|
|
1056
1058
|
function o(s) {
|
|
1057
1059
|
if (s.target.offsetParent) {
|
|
@@ -1094,9 +1096,9 @@ function qt(e, t) {
|
|
|
1094
1096
|
isDragging: a
|
|
1095
1097
|
};
|
|
1096
1098
|
}
|
|
1097
|
-
const
|
|
1099
|
+
const Xt = /* @__PURE__ */ new Map([
|
|
1098
1100
|
["appearance", ee]
|
|
1099
|
-
]),
|
|
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 = {
|
|
1100
1102
|
id: {
|
|
1101
1103
|
description: "The unique identifier for a combo list",
|
|
1102
1104
|
type: "string"
|
|
@@ -1151,7 +1153,7 @@ const Ut = /* @__PURE__ */ new Map([
|
|
|
1151
1153
|
valueField: {
|
|
1152
1154
|
description: "",
|
|
1153
1155
|
type: "string",
|
|
1154
|
-
default: "
|
|
1156
|
+
default: "value"
|
|
1155
1157
|
},
|
|
1156
1158
|
titleField: {
|
|
1157
1159
|
description: "",
|
|
@@ -1207,19 +1209,19 @@ const Ut = /* @__PURE__ */ new Map([
|
|
|
1207
1209
|
type: "sting",
|
|
1208
1210
|
default: ""
|
|
1209
1211
|
}
|
|
1210
|
-
},
|
|
1212
|
+
}, en = [
|
|
1211
1213
|
"id",
|
|
1212
1214
|
"type"
|
|
1213
|
-
],
|
|
1214
|
-
$schema:
|
|
1215
|
-
$id:
|
|
1216
|
-
title:
|
|
1217
|
-
description:
|
|
1218
|
-
type:
|
|
1219
|
-
properties:
|
|
1220
|
-
required:
|
|
1215
|
+
], tn = {
|
|
1216
|
+
$schema: Yt,
|
|
1217
|
+
$id: Jt,
|
|
1218
|
+
title: Qt,
|
|
1219
|
+
description: Zt,
|
|
1220
|
+
type: _t,
|
|
1221
|
+
properties: Kt,
|
|
1222
|
+
required: en
|
|
1221
1223
|
};
|
|
1222
|
-
function
|
|
1224
|
+
function nn(e, t, n) {
|
|
1223
1225
|
return t;
|
|
1224
1226
|
}
|
|
1225
1227
|
const Ee = {
|
|
@@ -1383,8 +1385,8 @@ const Ee = {
|
|
|
1383
1385
|
*/
|
|
1384
1386
|
beforeOpen: { type: Function, default: null }
|
|
1385
1387
|
};
|
|
1386
|
-
K(Ee,
|
|
1387
|
-
const
|
|
1388
|
+
K(Ee, tn, Xt, nn);
|
|
1389
|
+
const an = {
|
|
1388
1390
|
dataSource: { type: Array, default: [] },
|
|
1389
1391
|
enableSearch: { type: Boolean, default: !1 },
|
|
1390
1392
|
idField: { type: String, default: "id" },
|
|
@@ -1399,13 +1401,13 @@ const nn = {
|
|
|
1399
1401
|
/** 值变化事件 */
|
|
1400
1402
|
onSelectionChange: { type: Function, default: () => {
|
|
1401
1403
|
} }
|
|
1402
|
-
},
|
|
1404
|
+
}, ln = /* @__PURE__ */ q({
|
|
1403
1405
|
name: "FComboListContainer",
|
|
1404
|
-
props:
|
|
1406
|
+
props: an,
|
|
1405
1407
|
emits: ["selectionChange"],
|
|
1406
1408
|
setup(e, t) {
|
|
1407
1409
|
const n = l(e.dataSource), a = l([]), o = l(e.separator), u = l(e.width), d = l(e.maxHeight), f = l(String(e.selectedValues).split(o.value));
|
|
1408
|
-
|
|
1410
|
+
O(e.dataSource, () => {
|
|
1409
1411
|
n.value = e.dataSource;
|
|
1410
1412
|
});
|
|
1411
1413
|
const v = R(() => e.enableSearch ? "SearchBar" : "ContentHeader"), r = R(() => {
|
|
@@ -1415,12 +1417,12 @@ const nn = {
|
|
|
1415
1417
|
function p(s) {
|
|
1416
1418
|
a.value = s.map((c) => Object.assign({}, c)), f.value = s.map((c) => c[e.idField]), t.emit("selectionChange", a.value);
|
|
1417
1419
|
}
|
|
1418
|
-
return
|
|
1420
|
+
return O([() => e.selectedValues], ([s]) => {
|
|
1419
1421
|
f.value = s.split(o.value);
|
|
1420
1422
|
}), () => i("div", {
|
|
1421
1423
|
class: "f-combo-list-container pl-3",
|
|
1422
1424
|
style: r.value
|
|
1423
|
-
}, [i(
|
|
1425
|
+
}, [i(tt, {
|
|
1424
1426
|
size: "small",
|
|
1425
1427
|
itemClass: "f-combo-list-item",
|
|
1426
1428
|
header: v.value,
|
|
@@ -1436,7 +1438,7 @@ const nn = {
|
|
|
1436
1438
|
}, null)]);
|
|
1437
1439
|
}
|
|
1438
1440
|
});
|
|
1439
|
-
function
|
|
1441
|
+
function on(e) {
|
|
1440
1442
|
const t = l(""), n = l(e.modelValue), a = l(e.data || []), o = l(e.editable);
|
|
1441
1443
|
function u(s) {
|
|
1442
1444
|
const c = String(s).split(e.separator).map((b) => [b, !0]), h = new Map(c);
|
|
@@ -1463,9 +1465,9 @@ function ln(e) {
|
|
|
1463
1465
|
const { url: s, method: c = "GET", headers: h = {}, body: b = null } = e.remote, B = c.toLowerCase() == "get" ? { method: c, headers: h } : { method: c, headers: h, body: b };
|
|
1464
1466
|
let w = !1;
|
|
1465
1467
|
fetch(s, B).then((S) => {
|
|
1466
|
-
var L,
|
|
1468
|
+
var L, j;
|
|
1467
1469
|
if (S.status === 200)
|
|
1468
|
-
return w = !!((
|
|
1470
|
+
return w = !!((j = (L = S.headers) == null ? void 0 : L.get("content-type")) != null && j.includes("application/json")), w ? S.text() : S.json();
|
|
1469
1471
|
throw new Error(S.statusText);
|
|
1470
1472
|
}).then((S) => {
|
|
1471
1473
|
a.value = w ? JSON.parse(S) : S;
|
|
@@ -1473,18 +1475,18 @@ function ln(e) {
|
|
|
1473
1475
|
console.error(S);
|
|
1474
1476
|
});
|
|
1475
1477
|
}
|
|
1476
|
-
return e.remote && p(),
|
|
1478
|
+
return e.remote && p(), O(() => e.data, () => {
|
|
1477
1479
|
a.value = e.data;
|
|
1478
|
-
}),
|
|
1480
|
+
}), O([a], ([s]) => {
|
|
1479
1481
|
if (e.modelValue) {
|
|
1480
1482
|
const c = s.find((h) => h[e.valueField] === e.modelValue);
|
|
1481
1483
|
c && (t.value = c[e.textField]);
|
|
1482
1484
|
}
|
|
1483
|
-
}),
|
|
1485
|
+
}), O(() => e.modelValue, (s) => {
|
|
1484
1486
|
n.value = s, d(s);
|
|
1485
1487
|
}), d(e.modelValue), { dataSource: a, displayText: t, editable: o, modelValue: n, getItemsByDisplayText: f, getItemsByValue: u, getSelectedItemsByDisplayText: r };
|
|
1486
1488
|
}
|
|
1487
|
-
const
|
|
1489
|
+
const un = /* @__PURE__ */ q({
|
|
1488
1490
|
name: "FComboList",
|
|
1489
1491
|
props: Ee,
|
|
1490
1492
|
emits: ["clear", "update:modelValue", "change", "input"],
|
|
@@ -1495,7 +1497,7 @@ const on = /* @__PURE__ */ q({
|
|
|
1495
1497
|
editable: r,
|
|
1496
1498
|
modelValue: p,
|
|
1497
1499
|
getSelectedItemsByDisplayText: s
|
|
1498
|
-
} =
|
|
1500
|
+
} = on(e), c = R(() => e.multiSelect), h = R(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1499
1501
|
function b() {
|
|
1500
1502
|
!c.value && n.value && n.value.hidePopup();
|
|
1501
1503
|
}
|
|
@@ -1515,14 +1517,14 @@ const on = /* @__PURE__ */ q({
|
|
|
1515
1517
|
function L() {
|
|
1516
1518
|
return v.value;
|
|
1517
1519
|
}
|
|
1518
|
-
function
|
|
1520
|
+
function j(W) {
|
|
1519
1521
|
t.emit("input", W);
|
|
1520
1522
|
}
|
|
1521
1523
|
return t.expose({
|
|
1522
1524
|
getDisplayText: L
|
|
1523
|
-
}),
|
|
1524
|
-
a.value = W, r.value = y, o.value =
|
|
1525
|
-
}), () => i(
|
|
1525
|
+
}), O([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([W, y, E, g, m]) => {
|
|
1526
|
+
a.value = W, r.value = y, o.value = E, u.value = g, d.value = m;
|
|
1527
|
+
}), () => i(nt, {
|
|
1526
1528
|
ref: n,
|
|
1527
1529
|
id: e.id,
|
|
1528
1530
|
disable: a.value,
|
|
@@ -1544,10 +1546,10 @@ const on = /* @__PURE__ */ q({
|
|
|
1544
1546
|
onClear: S,
|
|
1545
1547
|
onClick: w,
|
|
1546
1548
|
onChange: k,
|
|
1547
|
-
onInput:
|
|
1549
|
+
onInput: j,
|
|
1548
1550
|
beforeOpen: e.beforeOpen
|
|
1549
1551
|
}, {
|
|
1550
|
-
default: () => [i(
|
|
1552
|
+
default: () => [i(ln, {
|
|
1551
1553
|
idField: e.idField,
|
|
1552
1554
|
valueField: e.valueField,
|
|
1553
1555
|
textField: e.textField,
|
|
@@ -1562,7 +1564,7 @@ const on = /* @__PURE__ */ q({
|
|
|
1562
1564
|
}, null)]
|
|
1563
1565
|
});
|
|
1564
1566
|
}
|
|
1565
|
-
}),
|
|
1567
|
+
}), sn = {
|
|
1566
1568
|
/** 默认屏幕分辨率对应的英文缩写 */
|
|
1567
1569
|
currentScreenResolution: { type: String, default: "" },
|
|
1568
1570
|
/** 传入的单个控件的响应式列宽值 */
|
|
@@ -1572,13 +1574,13 @@ const on = /* @__PURE__ */ q({
|
|
|
1572
1574
|
/** 列数值变化事件 */
|
|
1573
1575
|
fieldChanged: { type: Function, default: () => {
|
|
1574
1576
|
} }
|
|
1575
|
-
},
|
|
1577
|
+
}, rn = /* @__PURE__ */ new Map([
|
|
1576
1578
|
["appearance", ee]
|
|
1577
1579
|
]);
|
|
1578
|
-
function
|
|
1580
|
+
function cn(e, t, n) {
|
|
1579
1581
|
return t;
|
|
1580
1582
|
}
|
|
1581
|
-
const
|
|
1583
|
+
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 = {
|
|
1582
1584
|
id: {
|
|
1583
1585
|
description: "The unique identifier for radio-button",
|
|
1584
1586
|
type: "string"
|
|
@@ -1640,18 +1642,18 @@ const cn = "https://json-schema.org/draft/2020-12/schema", dn = "https://farris-
|
|
|
1640
1642
|
type: "boolean",
|
|
1641
1643
|
default: !0
|
|
1642
1644
|
}
|
|
1643
|
-
},
|
|
1645
|
+
}, yn = [
|
|
1644
1646
|
"id",
|
|
1645
1647
|
"type"
|
|
1646
|
-
],
|
|
1647
|
-
$schema:
|
|
1648
|
-
$id:
|
|
1649
|
-
title:
|
|
1650
|
-
description:
|
|
1651
|
-
type:
|
|
1652
|
-
properties:
|
|
1653
|
-
required:
|
|
1654
|
-
},
|
|
1648
|
+
], gn = {
|
|
1649
|
+
$schema: dn,
|
|
1650
|
+
$id: fn,
|
|
1651
|
+
title: pn,
|
|
1652
|
+
description: vn,
|
|
1653
|
+
type: mn,
|
|
1654
|
+
properties: hn,
|
|
1655
|
+
required: yn
|
|
1656
|
+
}, bn = "radio-button", wn = "A Farris Component", Sn = "object", Cn = {
|
|
1655
1657
|
basic: {
|
|
1656
1658
|
description: "Basic Infomation",
|
|
1657
1659
|
title: "基本信息",
|
|
@@ -1673,11 +1675,11 @@ const cn = "https://json-schema.org/draft/2020-12/schema", dn = "https://farris-
|
|
|
1673
1675
|
}
|
|
1674
1676
|
}
|
|
1675
1677
|
}
|
|
1676
|
-
},
|
|
1677
|
-
title:
|
|
1678
|
-
description:
|
|
1679
|
-
type:
|
|
1680
|
-
categories:
|
|
1678
|
+
}, Mn = {
|
|
1679
|
+
title: bn,
|
|
1680
|
+
description: wn,
|
|
1681
|
+
type: Sn,
|
|
1682
|
+
categories: Cn
|
|
1681
1683
|
}, De = {
|
|
1682
1684
|
/**
|
|
1683
1685
|
* 单选组枚举数组
|
|
@@ -1693,8 +1695,8 @@ const cn = "https://json-schema.org/draft/2020-12/schema", dn = "https://farris-
|
|
|
1693
1695
|
onSelectedValueChanged: { type: Function, default: () => {
|
|
1694
1696
|
} }
|
|
1695
1697
|
};
|
|
1696
|
-
K(De,
|
|
1697
|
-
const
|
|
1698
|
+
K(De, gn, rn, cn, Mn);
|
|
1699
|
+
const In = /* @__PURE__ */ q({
|
|
1698
1700
|
name: "FRadioButton",
|
|
1699
1701
|
props: De,
|
|
1700
1702
|
emits: ["selectedValueChanged"],
|
|
@@ -1712,26 +1714,26 @@ const Mn = /* @__PURE__ */ q({
|
|
|
1712
1714
|
function o(u) {
|
|
1713
1715
|
return `${u.text}${e.suffixValue}`;
|
|
1714
1716
|
}
|
|
1715
|
-
return
|
|
1717
|
+
return O(() => e.enumData, (u, d) => {
|
|
1716
1718
|
u !== d && (n.value = e.enumData);
|
|
1717
1719
|
}), () => i("div", {
|
|
1718
1720
|
class: "f-radio-button"
|
|
1719
1721
|
}, [i("div", {
|
|
1720
1722
|
class: ["farris-input-wrap"]
|
|
1721
|
-
}, [n.value.map((u, d) => i(
|
|
1723
|
+
}, [n.value.map((u, d) => i(ue, null, [i("label", {
|
|
1722
1724
|
class: u.active ? "btn btn-secondary active" : "btn btn-secondary",
|
|
1723
1725
|
onClick: (f) => a(f, u)
|
|
1724
1726
|
}, [i("span", {
|
|
1725
1727
|
class: "f-radio-button-text"
|
|
1726
1728
|
}, [o(u)])])]))])]);
|
|
1727
1729
|
}
|
|
1728
|
-
}),
|
|
1730
|
+
}), xn = /* @__PURE__ */ new Map([
|
|
1729
1731
|
["appearance", ee]
|
|
1730
1732
|
]);
|
|
1731
|
-
function
|
|
1733
|
+
function En(e, t, n) {
|
|
1732
1734
|
return t;
|
|
1733
1735
|
}
|
|
1734
|
-
const
|
|
1736
|
+
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 = {
|
|
1735
1737
|
id: {
|
|
1736
1738
|
description: "The unique identifier for rate",
|
|
1737
1739
|
type: "string"
|
|
@@ -1793,18 +1795,18 @@ const En = "https://json-schema.org/draft/2020-12/schema", Dn = "https://farris-
|
|
|
1793
1795
|
type: "boolean",
|
|
1794
1796
|
default: !0
|
|
1795
1797
|
}
|
|
1796
|
-
},
|
|
1798
|
+
}, kn = [
|
|
1797
1799
|
"id",
|
|
1798
1800
|
"type"
|
|
1799
|
-
],
|
|
1800
|
-
$schema:
|
|
1801
|
-
$id:
|
|
1802
|
-
title:
|
|
1803
|
-
description:
|
|
1804
|
-
type:
|
|
1805
|
-
properties:
|
|
1806
|
-
required:
|
|
1807
|
-
},
|
|
1801
|
+
], $n = {
|
|
1802
|
+
$schema: Dn,
|
|
1803
|
+
$id: Tn,
|
|
1804
|
+
title: Bn,
|
|
1805
|
+
description: Ln,
|
|
1806
|
+
type: Rn,
|
|
1807
|
+
properties: Fn,
|
|
1808
|
+
required: kn
|
|
1809
|
+
}, Wn = "rate", An = "A Farris Component", On = "object", jn = {
|
|
1808
1810
|
basic: {
|
|
1809
1811
|
description: "Basic Infomation",
|
|
1810
1812
|
title: "基本信息",
|
|
@@ -1826,12 +1828,12 @@ const En = "https://json-schema.org/draft/2020-12/schema", Dn = "https://farris-
|
|
|
1826
1828
|
}
|
|
1827
1829
|
}
|
|
1828
1830
|
}
|
|
1829
|
-
},
|
|
1830
|
-
title:
|
|
1831
|
-
description:
|
|
1832
|
-
type:
|
|
1833
|
-
categories:
|
|
1834
|
-
},
|
|
1831
|
+
}, Vn = {
|
|
1832
|
+
title: Wn,
|
|
1833
|
+
description: An,
|
|
1834
|
+
type: On,
|
|
1835
|
+
categories: jn
|
|
1836
|
+
}, zn = ["很不满意", "不满意", "一般", "满意", "非常满意"], Te = {
|
|
1835
1837
|
/** 星星大小 */
|
|
1836
1838
|
size: { type: String, default: "large" },
|
|
1837
1839
|
/** 启用半颗星模式 */
|
|
@@ -1853,7 +1855,7 @@ const En = "https://json-schema.org/draft/2020-12/schema", Dn = "https://farris-
|
|
|
1853
1855
|
/** 禁用单个星星的文字提示 */
|
|
1854
1856
|
toolTipDisabled: { type: Boolean, default: !0 },
|
|
1855
1857
|
/** 默认的满意度文案 */
|
|
1856
|
-
toolTipContents: { type: Array, default:
|
|
1858
|
+
toolTipContents: { type: Array, default: zn },
|
|
1857
1859
|
/** 启用评分 */
|
|
1858
1860
|
enableScore: { type: Boolean, default: !0 },
|
|
1859
1861
|
/** 启用满意度 */
|
|
@@ -1864,8 +1866,8 @@ const En = "https://json-schema.org/draft/2020-12/schema", Dn = "https://farris-
|
|
|
1864
1866
|
value: { type: Number, default: 0 },
|
|
1865
1867
|
modelValue: { type: Number, default: 0 }
|
|
1866
1868
|
};
|
|
1867
|
-
K(Te,
|
|
1868
|
-
const
|
|
1869
|
+
K(Te, $n, xn, En, Vn);
|
|
1870
|
+
const Nn = /* @__PURE__ */ q({
|
|
1869
1871
|
name: "FRate",
|
|
1870
1872
|
props: Te,
|
|
1871
1873
|
emits: ["selectedValue", "update:modelValue"],
|
|
@@ -1873,21 +1875,21 @@ const zn = /* @__PURE__ */ q({
|
|
|
1873
1875
|
const n = l(e.size), a = l(e.enableHalf), o = l(e.enableClear), u = l(e.disabled), d = l(e.pointSystem), f = l(e.lightColor), v = l(e.darkColor), r = l(e.iconClass), p = l(e.numOfStar), s = l(e.toolTipDisabled), c = l(e.toolTipContents), h = l(e.enableScore), b = l(e.enableSatisfaction);
|
|
1874
1876
|
let B;
|
|
1875
1877
|
const w = l(0), S = l(0), k = l(0), L = l(e.modelValue);
|
|
1876
|
-
let
|
|
1878
|
+
let j = 1, W, y, E;
|
|
1877
1879
|
const g = 4;
|
|
1878
1880
|
J(() => {
|
|
1879
1881
|
});
|
|
1880
1882
|
function m() {
|
|
1881
1883
|
const x = p.value;
|
|
1882
|
-
|
|
1884
|
+
E = [];
|
|
1883
1885
|
for (let $ = 1; $ <= x; $++)
|
|
1884
|
-
|
|
1886
|
+
E.push({
|
|
1885
1887
|
id: $
|
|
1886
1888
|
});
|
|
1887
1889
|
}
|
|
1888
|
-
function
|
|
1890
|
+
function T() {
|
|
1889
1891
|
let x;
|
|
1890
|
-
a.value ? x = Math.ceil(L.value /
|
|
1892
|
+
a.value ? x = Math.ceil(L.value / j) : x = L.value, S.value = (B * L.value + Math.floor(L.value) * g) / j, W = c.value[x - 1];
|
|
1891
1893
|
}
|
|
1892
1894
|
function A() {
|
|
1893
1895
|
switch (n.value) {
|
|
@@ -1904,7 +1906,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
1904
1906
|
B = 24;
|
|
1905
1907
|
break;
|
|
1906
1908
|
}
|
|
1907
|
-
m(), p.value && (
|
|
1909
|
+
m(), p.value && (j = d.value / p.value), L.value && T();
|
|
1908
1910
|
}
|
|
1909
1911
|
A();
|
|
1910
1912
|
function H(x) {
|
|
@@ -1917,7 +1919,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
1917
1919
|
if (x.movementX || x.movementY) {
|
|
1918
1920
|
if (u.value)
|
|
1919
1921
|
return;
|
|
1920
|
-
b.value && (W = c.value[$ - 1]), x.offsetX < B / 2 && a.value === !0 ? (w.value = B * $ - B / 2 + g * ($ - 1), k.value =
|
|
1922
|
+
b.value && (W = c.value[$ - 1]), x.offsetX < B / 2 && a.value === !0 ? (w.value = B * $ - B / 2 + g * ($ - 1), k.value = j * $ - j / 2) : (w.value = B * $ + g * ($ - 1), k.value = j * $);
|
|
1921
1923
|
}
|
|
1922
1924
|
if (N === !0) {
|
|
1923
1925
|
if (X())
|
|
@@ -1928,8 +1930,8 @@ const zn = /* @__PURE__ */ q({
|
|
|
1928
1930
|
function F(x, $) {
|
|
1929
1931
|
var N;
|
|
1930
1932
|
if (H(x.target) && x.target) {
|
|
1931
|
-
const
|
|
1932
|
-
D(x,
|
|
1933
|
+
const te = parseInt((N = x.target) == null ? void 0 : N.id);
|
|
1934
|
+
D(x, te, $);
|
|
1933
1935
|
}
|
|
1934
1936
|
}
|
|
1935
1937
|
const z = R(() => k.value ? k.value + "分" : L.value + "分"), C = R(() => ({
|
|
@@ -1938,18 +1940,18 @@ const zn = /* @__PURE__ */ q({
|
|
|
1938
1940
|
function I() {
|
|
1939
1941
|
w.value = 0;
|
|
1940
1942
|
}
|
|
1941
|
-
return
|
|
1942
|
-
L.value = x,
|
|
1943
|
+
return O(() => e.modelValue, (x) => {
|
|
1944
|
+
L.value = x, T();
|
|
1943
1945
|
}), () => i("div", {
|
|
1944
1946
|
class: "farris-star-rating",
|
|
1945
|
-
onMouseover:
|
|
1946
|
-
onMousemove:
|
|
1947
|
-
onMouseleave:
|
|
1948
|
-
onClick:
|
|
1947
|
+
onMouseover: le((x) => F(x, !1), ["prevent"]),
|
|
1948
|
+
onMousemove: le((x) => F(x, !1), ["prevent"]),
|
|
1949
|
+
onMouseleave: le((x) => I(), ["prevent"]),
|
|
1950
|
+
onClick: le((x) => F(x, !0), ["prevent"])
|
|
1949
1951
|
}, [i("div", {
|
|
1950
1952
|
class: "star-light-area",
|
|
1951
1953
|
style: C.value
|
|
1952
|
-
}, [
|
|
1954
|
+
}, [E.map((x) => i("span", {
|
|
1953
1955
|
class: ["f-icon default-light-color ", r.value, {
|
|
1954
1956
|
"f-star-sm": n.value === "small"
|
|
1955
1957
|
}, {
|
|
@@ -1973,7 +1975,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
1973
1975
|
}, {
|
|
1974
1976
|
large: n.value === "large"
|
|
1975
1977
|
}]
|
|
1976
|
-
}, [
|
|
1978
|
+
}, [E.map((x) => i("span", {
|
|
1977
1979
|
class: ["f-icon default-dark-color", r.value, {
|
|
1978
1980
|
"f-star-sm": n.value === "small"
|
|
1979
1981
|
}, {
|
|
@@ -1999,9 +2001,9 @@ const zn = /* @__PURE__ */ q({
|
|
|
1999
2001
|
}]
|
|
2000
2002
|
}, [h.value && i("span", null, [G(" "), z.value, G(" ")]), b.value && (y || W) && i("span", null, [G(" "), W || y])])]);
|
|
2001
2003
|
}
|
|
2002
|
-
}),
|
|
2004
|
+
}), Hn = /* @__PURE__ */ q({
|
|
2003
2005
|
name: "FColumnWidthEditor",
|
|
2004
|
-
props:
|
|
2006
|
+
props: sn,
|
|
2005
2007
|
emits: ["fieldChanged"],
|
|
2006
2008
|
setup(e, t) {
|
|
2007
2009
|
const n = {
|
|
@@ -2020,19 +2022,19 @@ const zn = /* @__PURE__ */ q({
|
|
|
2020
2022
|
}
|
|
2021
2023
|
function S(m) {
|
|
2022
2024
|
if (u.value === !0) {
|
|
2023
|
-
const
|
|
2024
|
-
v.value =
|
|
2025
|
+
const T = Number(m == null ? void 0 : m.text);
|
|
2026
|
+
v.value = T;
|
|
2025
2027
|
const A = o.value[`columnIn${a.value}`] / o.value[`displayWidthIn${a.value}`];
|
|
2026
|
-
o.value[`columnIn${a.value}`] =
|
|
2028
|
+
o.value[`columnIn${a.value}`] = T * A, o.value[`displayWidthIn${a.value}`] = Number(T), t.emit("fieldChanged", o.value);
|
|
2027
2029
|
}
|
|
2028
2030
|
}
|
|
2029
2031
|
function k(m) {
|
|
2030
2032
|
p.value = m;
|
|
2031
|
-
const
|
|
2032
|
-
o.value[`columnIn${a.value}`] = p.value, o.value[`displayWidthIn${a.value}`] = p.value /
|
|
2033
|
+
const T = o.value[`columnIn${a.value}`] / o.value[`displayWidthIn${a.value}`];
|
|
2034
|
+
o.value[`columnIn${a.value}`] = p.value, o.value[`displayWidthIn${a.value}`] = p.value / T, t.emit("fieldChanged", o.value);
|
|
2033
2035
|
}
|
|
2034
2036
|
function L() {
|
|
2035
|
-
return i(
|
|
2037
|
+
return i(Nn, {
|
|
2036
2038
|
enableHalf: !0,
|
|
2037
2039
|
size: "extraLarge",
|
|
2038
2040
|
pointSystem: 12,
|
|
@@ -2046,21 +2048,21 @@ const zn = /* @__PURE__ */ q({
|
|
|
2046
2048
|
onSelectedValue: () => k(p.value)
|
|
2047
2049
|
}, null);
|
|
2048
2050
|
}
|
|
2049
|
-
function
|
|
2051
|
+
function j() {
|
|
2050
2052
|
const m = [];
|
|
2051
2053
|
d.value = n == null ? void 0 : n[a.value];
|
|
2052
|
-
const
|
|
2054
|
+
const T = o.value[`displayWidthIn${a.value}`];
|
|
2053
2055
|
return d.value.forEach((A) => {
|
|
2054
2056
|
const H = {
|
|
2055
2057
|
text: A,
|
|
2056
|
-
active:
|
|
2058
|
+
active: T.toString() === A
|
|
2057
2059
|
};
|
|
2058
2060
|
m.push(H);
|
|
2059
2061
|
}), m;
|
|
2060
2062
|
}
|
|
2061
2063
|
function W() {
|
|
2062
|
-
const m =
|
|
2063
|
-
return i(
|
|
2064
|
+
const m = j();
|
|
2065
|
+
return i(In, {
|
|
2064
2066
|
enumData: m,
|
|
2065
2067
|
suffixValue: "列",
|
|
2066
2068
|
onSelectedValueChanged: S
|
|
@@ -2081,7 +2083,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2081
2083
|
class: "f-layout-editor-column-width-editor-row-right"
|
|
2082
2084
|
}, null)]);
|
|
2083
2085
|
}
|
|
2084
|
-
function
|
|
2086
|
+
function E() {
|
|
2085
2087
|
return u.value ? i("div", {
|
|
2086
2088
|
class: "f-column-width-editor-switch-standard"
|
|
2087
2089
|
}, [i("div", {
|
|
@@ -2107,10 +2109,10 @@ const zn = /* @__PURE__ */ q({
|
|
|
2107
2109
|
class: "f-layout-editor-column-width-editor-component"
|
|
2108
2110
|
}, [i("div", {
|
|
2109
2111
|
class: "f-layout-editor-column-width-editor-label"
|
|
2110
|
-
}, [(m = o == null ? void 0 : o.value) == null ? void 0 : m.label]),
|
|
2112
|
+
}, [(m = o == null ? void 0 : o.value) == null ? void 0 : m.label]), E()]);
|
|
2111
2113
|
}
|
|
2112
|
-
return
|
|
2113
|
-
A !== D && (a.value = A, d.value = n[a.value], w()),
|
|
2114
|
+
return O(() => [e.field, e.switchInStandardMode, e.currentScreenResolution], ([m, T, A], [H, X, D]) => {
|
|
2115
|
+
A !== D && (a.value = A, d.value = n[a.value], w()), T !== X && (u.value = T), u.value === !1 && w(), m !== H && (o.value = m);
|
|
2114
2116
|
}), J(() => {
|
|
2115
2117
|
w();
|
|
2116
2118
|
}), () => i("div", {
|
|
@@ -2119,7 +2121,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2119
2121
|
}
|
|
2120
2122
|
}), Pn = /* @__PURE__ */ q({
|
|
2121
2123
|
name: "FFieldList",
|
|
2122
|
-
props:
|
|
2124
|
+
props: qt,
|
|
2123
2125
|
emits: ["update:currentArea", "twoDimensionalArrayChanged", "originalDataChanged"],
|
|
2124
2126
|
setup(e, t) {
|
|
2125
2127
|
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.originalData), u = l(e.originalDataCopy), d = l(e.defaultStates), f = l(""), v = l([]), r = l(e.currentArea), p = l(0), s = l(), c = l(0), h = l("1"), b = l([]);
|
|
@@ -2160,7 +2162,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2160
2162
|
D.push(z), c.value = z[z.length - 1].componentRow;
|
|
2161
2163
|
}), y(D);
|
|
2162
2164
|
}
|
|
2163
|
-
function
|
|
2165
|
+
function j() {
|
|
2164
2166
|
k();
|
|
2165
2167
|
let D = [];
|
|
2166
2168
|
return c.value = 0, s.value.forEach((F) => {
|
|
@@ -2182,14 +2184,14 @@ const zn = /* @__PURE__ */ q({
|
|
|
2182
2184
|
F = F.concat(z);
|
|
2183
2185
|
o.value = U(F), c.value = 0;
|
|
2184
2186
|
}
|
|
2185
|
-
function
|
|
2187
|
+
function E() {
|
|
2186
2188
|
return i("div", {
|
|
2187
2189
|
class: "f-layout-editor-field-list-top"
|
|
2188
2190
|
}, [i("div", {
|
|
2189
2191
|
class: "f-layout-editor-field-list-header"
|
|
2190
2192
|
}, [G("组件列表")]), i("div", {
|
|
2191
2193
|
class: "f-layout-editor-choose-group"
|
|
2192
|
-
}, [i(
|
|
2194
|
+
}, [i(un, {
|
|
2193
2195
|
modelValue: h.value,
|
|
2194
2196
|
"onUpdate:modelValue": (D) => h.value = D,
|
|
2195
2197
|
placeholder: "当前可编辑组",
|
|
@@ -2204,7 +2206,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2204
2206
|
function g() {
|
|
2205
2207
|
return i("div", {
|
|
2206
2208
|
class: "f-layout-editor-field-list-content f-utils-overflow-xhya"
|
|
2207
|
-
}, [b.value.map((D) => i(
|
|
2209
|
+
}, [b.value.map((D) => i(Hn, {
|
|
2208
2210
|
key: D.label,
|
|
2209
2211
|
currentScreenResolution: n.value,
|
|
2210
2212
|
field: D,
|
|
@@ -2217,15 +2219,15 @@ const zn = /* @__PURE__ */ q({
|
|
|
2217
2219
|
function m(D) {
|
|
2218
2220
|
b.value.forEach((F) => {
|
|
2219
2221
|
F.label == D.label && Object.assign(F, D);
|
|
2220
|
-
}), L(), A(),
|
|
2222
|
+
}), L(), A(), T();
|
|
2221
2223
|
}
|
|
2222
|
-
function
|
|
2224
|
+
function T() {
|
|
2223
2225
|
b.value = [], o.value.forEach((D) => {
|
|
2224
2226
|
D.group === Number(r.value[0].id) && b.value.push(D);
|
|
2225
2227
|
});
|
|
2226
2228
|
}
|
|
2227
2229
|
function A() {
|
|
2228
|
-
o.value = U(
|
|
2230
|
+
o.value = U(j()), t.emit("originalDataChanged", o.value);
|
|
2229
2231
|
}
|
|
2230
2232
|
function H(D) {
|
|
2231
2233
|
for (let F = 0; F < D.length; F++)
|
|
@@ -2233,52 +2235,52 @@ const zn = /* @__PURE__ */ q({
|
|
|
2233
2235
|
id: D[F].id,
|
|
2234
2236
|
label: D[F].label
|
|
2235
2237
|
}];
|
|
2236
|
-
t.emit("update:currentArea", r.value),
|
|
2238
|
+
t.emit("update:currentArea", r.value), T(), L();
|
|
2237
2239
|
}
|
|
2238
|
-
const X =
|
|
2239
|
-
L(), A(),
|
|
2240
|
+
const X = Ut(b, () => {
|
|
2241
|
+
L(), A(), T();
|
|
2240
2242
|
});
|
|
2241
|
-
return
|
|
2242
|
-
D !== F && (r.value = e.currentArea,
|
|
2243
|
-
}),
|
|
2244
|
-
D !== F &&
|
|
2245
|
-
}),
|
|
2243
|
+
return Je("ResponseLayoutEditorDraggableComposition", X), O(() => e.currentArea, (D, F) => {
|
|
2244
|
+
D !== F && (r.value = e.currentArea, T());
|
|
2245
|
+
}), O(r, (D, F) => {
|
|
2246
|
+
D !== F && T();
|
|
2247
|
+
}), O(() => e.currentGroup, (D, F) => {
|
|
2246
2248
|
D !== F && (f.value = e.currentGroup);
|
|
2247
|
-
}),
|
|
2249
|
+
}), O(() => e.currentScreenResolution, (D, F) => {
|
|
2248
2250
|
D !== F && (n.value = e.currentScreenResolution, A(), k(), r.value[0] && (b.value = U(s.value[Number(r.value[0].id) - 1])));
|
|
2249
|
-
}),
|
|
2251
|
+
}), O(() => e.switchInStandardMode, (D, F) => {
|
|
2250
2252
|
D !== F && (a.value = e.switchInStandardMode, o.value = U(u.value));
|
|
2251
|
-
}),
|
|
2253
|
+
}), O(d, (D, F) => {
|
|
2252
2254
|
D !== F && A();
|
|
2253
2255
|
}), fe(() => {
|
|
2254
|
-
B(),
|
|
2256
|
+
B(), j(), T();
|
|
2255
2257
|
}), () => i("div", {
|
|
2256
2258
|
class: "f-layout-editor-field-list f-utils-fill-flex-column"
|
|
2257
2259
|
}, [a.value ? (
|
|
2258
2260
|
/* 标准模式 */
|
|
2259
2261
|
i("div", {
|
|
2260
2262
|
class: "f-layout-editor-field-list-standard f-utils-fill-flex-column"
|
|
2261
|
-
}, [
|
|
2263
|
+
}, [E(), g()])
|
|
2262
2264
|
) : (
|
|
2263
2265
|
/* 自定义模式 */
|
|
2264
2266
|
i("div", {
|
|
2265
2267
|
class: "f-layout-editor-field-list-customize f-utils-fill-flex-column"
|
|
2266
|
-
}, [
|
|
2268
|
+
}, [E(), g()])
|
|
2267
2269
|
)]);
|
|
2268
2270
|
}
|
|
2269
|
-
}),
|
|
2271
|
+
}), ie = /* @__PURE__ */ q({
|
|
2270
2272
|
name: "FResponseLayoutEditor",
|
|
2271
|
-
props:
|
|
2273
|
+
props: at,
|
|
2272
2274
|
emits: ["close", "submit"],
|
|
2273
2275
|
setup(e, t) {
|
|
2274
2276
|
const n = l(e.initialState), a = l(), o = l(), u = l(""), d = l(""), f = l(!1), v = l([{
|
|
2275
2277
|
id: "1",
|
|
2276
2278
|
label: "区域1"
|
|
2277
2279
|
}]), r = l([]), p = l(), s = l(e.width), c = l(e.height);
|
|
2278
|
-
|
|
2280
|
+
O(() => e.initialState, (m) => {
|
|
2279
2281
|
n.value = m;
|
|
2280
|
-
}),
|
|
2281
|
-
m !== A && (v.value = m),
|
|
2282
|
+
}), O([() => e.currentArea, () => e.switchInStandardMode], ([m, T], [A, H]) => {
|
|
2283
|
+
m !== A && (v.value = m), T !== H && (f.value = T);
|
|
2282
2284
|
});
|
|
2283
2285
|
function h(m) {
|
|
2284
2286
|
u.value = m;
|
|
@@ -2301,7 +2303,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2301
2303
|
function L() {
|
|
2302
2304
|
t.emit("close");
|
|
2303
2305
|
}
|
|
2304
|
-
function
|
|
2306
|
+
function j() {
|
|
2305
2307
|
t.emit("submit", a.value);
|
|
2306
2308
|
}
|
|
2307
2309
|
function W() {
|
|
@@ -2323,7 +2325,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2323
2325
|
}, null);
|
|
2324
2326
|
}
|
|
2325
2327
|
function y() {
|
|
2326
|
-
return i(
|
|
2328
|
+
return i(Gt, {
|
|
2327
2329
|
class: "f-utils-fill-flex-column",
|
|
2328
2330
|
currentArea: v.value,
|
|
2329
2331
|
"onUpdate:currentArea": (m) => v.value = m,
|
|
@@ -2334,7 +2336,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2334
2336
|
"onUpdate:twoDimensionalArray": (m) => r.value = m
|
|
2335
2337
|
}, null);
|
|
2336
2338
|
}
|
|
2337
|
-
const
|
|
2339
|
+
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"), g = R(() => f.value ? "f-layout-editor-right-standard f-utils-fill-flex-column" : "f-layout-editor-right-customize f-utils-fill-flex-column");
|
|
2338
2340
|
return fe(() => {
|
|
2339
2341
|
a.value = U(n.value.importData), p.value = U(n.value.importData), o.value = n.value.defaultState, u.value = "中等屏幕", d.value = "MD";
|
|
2340
2342
|
}), (m) => i("div", {
|
|
@@ -2342,7 +2344,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2342
2344
|
style: "height:" + c.value + "px;width:" + s.value + "px;"
|
|
2343
2345
|
}, [i("div", {
|
|
2344
2346
|
class: "f-layout-editor-top"
|
|
2345
|
-
}, [i(
|
|
2347
|
+
}, [i(zt, {
|
|
2346
2348
|
defaultStates: o.value,
|
|
2347
2349
|
onScreenNameChanged: h,
|
|
2348
2350
|
onCurrentScreenResolutionChanged: b,
|
|
@@ -2352,7 +2354,7 @@ const zn = /* @__PURE__ */ q({
|
|
|
2352
2354
|
}, [i("div", {
|
|
2353
2355
|
class: "f-layout-editor-left f-utils-fill-flex-column"
|
|
2354
2356
|
}, [i("div", {
|
|
2355
|
-
class:
|
|
2357
|
+
class: E.value
|
|
2356
2358
|
}, [W()])]), i("div", {
|
|
2357
2359
|
class: "f-layout-editor-right f-utils-fill-flex-column"
|
|
2358
2360
|
}, [i("div", {
|
|
@@ -2368,30 +2370,30 @@ const zn = /* @__PURE__ */ q({
|
|
|
2368
2370
|
class: "f-layout-editor-text-cancel"
|
|
2369
2371
|
}, [G("取消")])]), i("div", {
|
|
2370
2372
|
class: "f-layout-editor-sure-btn",
|
|
2371
|
-
onClick:
|
|
2373
|
+
onClick: j
|
|
2372
2374
|
}, [i("span", {
|
|
2373
2375
|
class: "f-layout-editor-text-sure"
|
|
2374
2376
|
}, [G("确认")])])])])]);
|
|
2375
2377
|
}
|
|
2376
|
-
}),
|
|
2378
|
+
}), Gn = /* @__PURE__ */ new Map([
|
|
2377
2379
|
["appearance", ee]
|
|
2378
2380
|
]);
|
|
2379
|
-
function
|
|
2381
|
+
function qn(e, t, n, a) {
|
|
2380
2382
|
const o = e.getSchemaByType("section");
|
|
2381
2383
|
return o.id = `${a}-section`, o.appearance = { class: "f-section-form f-section-in-main" }, o.mainTitle = "标题", o.contents = [t], o;
|
|
2382
2384
|
}
|
|
2383
|
-
function
|
|
2385
|
+
function Un(e, t, n, a) {
|
|
2384
2386
|
const o = e.getSchemaByType("component");
|
|
2385
2387
|
return o.id = `${a}-component`, o.componentType = "form-col-1", o.appearance = {
|
|
2386
2388
|
class: "f-struct-form f-struct-wrapper"
|
|
2387
2389
|
}, o.contents = [t], o;
|
|
2388
2390
|
}
|
|
2389
|
-
function
|
|
2391
|
+
function Xn(e, t, n) {
|
|
2390
2392
|
t.appearance = { class: "f-form-layout farris-form farris-form-controls-inline" };
|
|
2391
|
-
const a =
|
|
2392
|
-
return
|
|
2393
|
+
const a = qn(e, t, n, t.id);
|
|
2394
|
+
return Un(e, a, n, t.id);
|
|
2393
2395
|
}
|
|
2394
|
-
const
|
|
2396
|
+
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 = {
|
|
2395
2397
|
id: {
|
|
2396
2398
|
description: "The unique identifier for response layout editor",
|
|
2397
2399
|
type: "string"
|
|
@@ -2419,18 +2421,18 @@ const Xn = "https://json-schema.org/draft/2020-12/schema", Yn = "https://farris-
|
|
|
2419
2421
|
type: "array",
|
|
2420
2422
|
default: []
|
|
2421
2423
|
}
|
|
2422
|
-
},
|
|
2424
|
+
}, ea = [
|
|
2423
2425
|
"id",
|
|
2424
2426
|
"type"
|
|
2425
|
-
],
|
|
2426
|
-
$schema:
|
|
2427
|
-
$id:
|
|
2428
|
-
title:
|
|
2429
|
-
description:
|
|
2430
|
-
type:
|
|
2431
|
-
properties:
|
|
2432
|
-
required:
|
|
2433
|
-
},
|
|
2427
|
+
], ta = {
|
|
2428
|
+
$schema: Yn,
|
|
2429
|
+
$id: Jn,
|
|
2430
|
+
title: Qn,
|
|
2431
|
+
description: Zn,
|
|
2432
|
+
type: _n,
|
|
2433
|
+
properties: Kn,
|
|
2434
|
+
required: ea
|
|
2435
|
+
}, na = "response-form", aa = "A Farris Component", la = "object", oa = {
|
|
2434
2436
|
basic: {
|
|
2435
2437
|
description: "Basic Infomation",
|
|
2436
2438
|
title: "基本信息",
|
|
@@ -2452,11 +2454,11 @@ const Xn = "https://json-schema.org/draft/2020-12/schema", Yn = "https://farris-
|
|
|
2452
2454
|
}
|
|
2453
2455
|
}
|
|
2454
2456
|
}
|
|
2455
|
-
},
|
|
2456
|
-
title:
|
|
2457
|
-
description:
|
|
2458
|
-
type:
|
|
2459
|
-
categories:
|
|
2457
|
+
}, ia = {
|
|
2458
|
+
title: na,
|
|
2459
|
+
description: aa,
|
|
2460
|
+
type: la,
|
|
2461
|
+
categories: oa
|
|
2460
2462
|
}, ve = {
|
|
2461
2463
|
/** 接受传入的原始数据的defaultState */
|
|
2462
2464
|
initialState: { type: Object, default: Se },
|
|
@@ -2465,7 +2467,7 @@ const Xn = "https://json-schema.org/draft/2020-12/schema", Yn = "https://farris-
|
|
|
2465
2467
|
/** 页面宽度 */
|
|
2466
2468
|
width: { type: Number, default: 750 },
|
|
2467
2469
|
modelValue: { type: Object }
|
|
2468
|
-
}, ye = K(ve,
|
|
2470
|
+
}, ye = K(ve, ta, Gn, Xn, ia), ua = {
|
|
2469
2471
|
/**
|
|
2470
2472
|
* 自定义类
|
|
2471
2473
|
*/
|
|
@@ -2517,7 +2519,7 @@ const Xn = "https://json-schema.org/draft/2020-12/schema", Yn = "https://farris-
|
|
|
2517
2519
|
containment: { type: HTMLElement, default: null },
|
|
2518
2520
|
reiszeable: { type: Boolean, default: !1 },
|
|
2519
2521
|
draggable: { type: Boolean, default: !1 },
|
|
2520
|
-
dragHandle: { type:
|
|
2522
|
+
dragHandle: { type: Object, default: null },
|
|
2521
2523
|
closedCallback: { type: Function, default: null },
|
|
2522
2524
|
resizeHandle: { type: Function, default: null },
|
|
2523
2525
|
render: { type: Function, default: null },
|
|
@@ -2608,7 +2610,7 @@ class _ {
|
|
|
2608
2610
|
return this.width = t.width, this.height = t.height, this;
|
|
2609
2611
|
}
|
|
2610
2612
|
}
|
|
2611
|
-
function
|
|
2613
|
+
function sa(e, t) {
|
|
2612
2614
|
const n = l(), a = l(), o = l(), u = l(), d = l(), f = l(), v = l(), r = l(), p = l(), s = l(), c = l(), h = l(), b = l(e.draggable), B = l(!1);
|
|
2613
2615
|
function w() {
|
|
2614
2616
|
const C = a.value || document.body, I = window.getComputedStyle(C);
|
|
@@ -2642,7 +2644,7 @@ function ua(e, t) {
|
|
|
2642
2644
|
const C = e.minHeight ? e.minHeight : 1, I = e.minWidth ? e.minWidth : 1;
|
|
2643
2645
|
f.value && v.value && r.value && u.value && (f.value.height < C && (f.value.height = C, r.value.n && d.value && (v.value.y = d.value.y + (u.value.height - C))), f.value.width < I && (f.value.width = I, r.value.w && d.value && (v.value.x = d.value.x + (u.value.width - I))), e.maxHeight && f.value.height > e.maxHeight && (f.value.height = e.maxHeight, d.value && r.value.n && (v.value.y = d.value.y + (u.value.height - e.maxHeight))), e.maxWidth && f.value.width > e.maxWidth && (f.value.width = e.maxWidth, r.value.w && d.value && (v.value.x = d.value.x + (u.value.width - e.maxWidth))));
|
|
2644
2646
|
}
|
|
2645
|
-
function
|
|
2647
|
+
function j() {
|
|
2646
2648
|
if (a.value) {
|
|
2647
2649
|
const C = s.value;
|
|
2648
2650
|
if (v.value && f.value && r.value && u.value) {
|
|
@@ -2656,7 +2658,7 @@ function ua(e, t) {
|
|
|
2656
2658
|
return;
|
|
2657
2659
|
C.subtract(o.value);
|
|
2658
2660
|
const I = C.x, x = C.y;
|
|
2659
|
-
r.value.n ? (v.value.y = d.value.y + x, f.value.height = u.value.height - x) : r.value.s && (f.value.height = u.value.height + x), r.value.e ? f.value.width = u.value.width + I : r.value.w && (f.value.width = u.value.width - I, v.value.x = d.value.x + I),
|
|
2661
|
+
r.value.n ? (v.value.y = d.value.y + x, f.value.height = u.value.height - x) : r.value.s && (f.value.height = u.value.height + x), r.value.e ? f.value.width = u.value.width + I : r.value.w && (f.value.width = u.value.width - I, v.value.x = d.value.x + I), j(), L(), k();
|
|
2660
2662
|
}
|
|
2661
2663
|
function y(C) {
|
|
2662
2664
|
if (!p.value)
|
|
@@ -2664,7 +2666,7 @@ function ua(e, t) {
|
|
|
2664
2666
|
const I = P.fromEvent(C);
|
|
2665
2667
|
I && W(I);
|
|
2666
2668
|
}
|
|
2667
|
-
function
|
|
2669
|
+
function E() {
|
|
2668
2670
|
if (n.value) {
|
|
2669
2671
|
const {
|
|
2670
2672
|
width: C,
|
|
@@ -2687,7 +2689,7 @@ function ua(e, t) {
|
|
|
2687
2689
|
}
|
|
2688
2690
|
function g(C) {
|
|
2689
2691
|
if (n.value) {
|
|
2690
|
-
const I =
|
|
2692
|
+
const I = E();
|
|
2691
2693
|
c.value = I;
|
|
2692
2694
|
}
|
|
2693
2695
|
o.value = void 0, u.value = null, d.value = null, f.value = null, v.value = null, r.value = null, p.value = null, document.removeEventListener("mousemove", y), document.removeEventListener("mouseup", g);
|
|
@@ -2695,47 +2697,47 @@ function ua(e, t) {
|
|
|
2695
2697
|
function m() {
|
|
2696
2698
|
document.addEventListener("mousemove", y), document.addEventListener("mouseup", g);
|
|
2697
2699
|
}
|
|
2698
|
-
function
|
|
2700
|
+
function T(C) {
|
|
2699
2701
|
C instanceof MouseEvent && C.button === 2 || b.value && (C.stopPropagation(), C.preventDefault(), o.value = P.fromEvent(C), p.value = C.target, S(C), m());
|
|
2700
2702
|
}
|
|
2701
2703
|
function A(C) {
|
|
2702
|
-
return n.value = C, i(
|
|
2704
|
+
return n.value = C, i(ue, null, [i("div", {
|
|
2703
2705
|
class: "ng-resizable-handle ng-resizable-n",
|
|
2704
2706
|
type: "n",
|
|
2705
|
-
onMousedown: (I) =>
|
|
2707
|
+
onMousedown: (I) => T(I)
|
|
2706
2708
|
}, null), i("div", {
|
|
2707
2709
|
class: "ng-resizable-handle ng-resizable-e",
|
|
2708
2710
|
type: "e",
|
|
2709
|
-
onMousedown: (I) =>
|
|
2711
|
+
onMousedown: (I) => T(I)
|
|
2710
2712
|
}, null), i("div", {
|
|
2711
2713
|
class: "ng-resizable-handle ng-resizable-s",
|
|
2712
2714
|
type: "s",
|
|
2713
|
-
onMousedown: (I) =>
|
|
2715
|
+
onMousedown: (I) => T(I)
|
|
2714
2716
|
}, null), i("div", {
|
|
2715
2717
|
class: "ng-resizable-handle ng-resizable-w",
|
|
2716
2718
|
type: "w",
|
|
2717
|
-
onMousedown: (I) =>
|
|
2719
|
+
onMousedown: (I) => T(I)
|
|
2718
2720
|
}, null), i("div", {
|
|
2719
2721
|
class: "ng-resizable-handle ng-resizable-ne",
|
|
2720
2722
|
type: "ne",
|
|
2721
|
-
onMousedown: (I) =>
|
|
2723
|
+
onMousedown: (I) => T(I)
|
|
2722
2724
|
}, null), i("div", {
|
|
2723
2725
|
class: "ng-resizable-handle ng-resizable-se ng-resizable-diagonal",
|
|
2724
2726
|
type: "se",
|
|
2725
|
-
onMousedown: (I) =>
|
|
2727
|
+
onMousedown: (I) => T(I)
|
|
2726
2728
|
}, null), i("div", {
|
|
2727
2729
|
class: "ng-resizable-handle ng-resizable-sw",
|
|
2728
2730
|
type: "sw",
|
|
2729
|
-
onMousedown: (I) =>
|
|
2731
|
+
onMousedown: (I) => T(I)
|
|
2730
2732
|
}, null), i("div", {
|
|
2731
2733
|
class: "ng-resizable-handle ng-resizable-nw",
|
|
2732
2734
|
type: "nw",
|
|
2733
|
-
onMousedown: (I) =>
|
|
2735
|
+
onMousedown: (I) => T(I)
|
|
2734
2736
|
}, null)]);
|
|
2735
2737
|
}
|
|
2736
2738
|
function H(C = !0) {
|
|
2737
2739
|
const I = a.value || document.body, x = _.getCurrent(I), $ = n.value;
|
|
2738
|
-
C && (h.value =
|
|
2740
|
+
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 = "", c.value = {
|
|
2739
2741
|
size: f.value,
|
|
2740
2742
|
position: {
|
|
2741
2743
|
x: 0,
|
|
@@ -2793,35 +2795,35 @@ function ua(e, t) {
|
|
|
2793
2795
|
unWindowResizeHandle: z
|
|
2794
2796
|
};
|
|
2795
2797
|
}
|
|
2796
|
-
function
|
|
2798
|
+
function ra(e, t) {
|
|
2797
2799
|
const n = l(), a = l(e.draggable), o = l(e.lockAxis), u = l(), d = l(), f = l(!1), v = l(new P(0, 0)), r = l(new P(0, 0)), p = l(new P(0, 0)), s = l(new P(0, 0));
|
|
2798
|
-
function c(y,
|
|
2799
|
-
if (
|
|
2800
|
+
function c(y, E) {
|
|
2801
|
+
if (E.tagName === "BUTTON")
|
|
2800
2802
|
return !1;
|
|
2801
|
-
if (
|
|
2803
|
+
if (E === y)
|
|
2802
2804
|
return !0;
|
|
2803
|
-
for (const g in
|
|
2804
|
-
if (
|
|
2805
|
+
for (const g in E.children)
|
|
2806
|
+
if (E.children.hasOwnProperty(g) && c(y, E.children[g]))
|
|
2805
2807
|
return !0;
|
|
2806
2808
|
return !1;
|
|
2807
2809
|
}
|
|
2808
2810
|
function h() {
|
|
2809
|
-
var m,
|
|
2810
|
-
let y = p.value.x + r.value.x,
|
|
2811
|
-
o.value === "x" ? (y = ((m = v.value) == null ? void 0 : m.x) || 0, p.value.x = 0) : o.value === "y" && (
|
|
2812
|
-
const g = `translate3d(${Math.round(y)}px, ${Math.round(
|
|
2813
|
-
n.value && (n.value.style.transform = g), s.value.x = y, s.value.y =
|
|
2811
|
+
var m, T;
|
|
2812
|
+
let y = p.value.x + r.value.x, E = p.value.y + r.value.y;
|
|
2813
|
+
o.value === "x" ? (y = ((m = v.value) == null ? void 0 : m.x) || 0, p.value.x = 0) : o.value === "y" && (E = ((T = v.value) == null ? void 0 : T.y) || 0, p.value.y = 0);
|
|
2814
|
+
const g = `translate3d(${Math.round(y)}px, ${Math.round(E)}px, 0px)`;
|
|
2815
|
+
n.value && (n.value.style.transform = g), s.value.x = y, s.value.y = E;
|
|
2814
2816
|
}
|
|
2815
2817
|
function b() {
|
|
2816
2818
|
if (!d.value || !n.value)
|
|
2817
2819
|
return null;
|
|
2818
|
-
const y = d.value.getBoundingClientRect(),
|
|
2819
|
-
top: y.top <
|
|
2820
|
-
right: y.right >
|
|
2821
|
-
bottom: y.bottom >
|
|
2822
|
-
left: y.left <
|
|
2820
|
+
const y = d.value.getBoundingClientRect(), E = n.value.getBoundingClientRect(), g = {
|
|
2821
|
+
top: y.top < E.top,
|
|
2822
|
+
right: y.right > E.right,
|
|
2823
|
+
bottom: y.bottom > E.bottom,
|
|
2824
|
+
left: y.left < E.left
|
|
2823
2825
|
};
|
|
2824
|
-
return g.top || (p.value.y -=
|
|
2826
|
+
return g.top || (p.value.y -= E.top - y.top), g.bottom || (p.value.y -= E.bottom - y.bottom), g.right || (p.value.x -= E.right - y.right), g.left || (p.value.x -= E.left - y.left), h(), g;
|
|
2825
2827
|
}
|
|
2826
2828
|
function B(y) {
|
|
2827
2829
|
y && (v.value && y.subtract(v.value), p.value.set(y), h(), b());
|
|
@@ -2844,21 +2846,32 @@ function sa(e, t) {
|
|
|
2844
2846
|
}
|
|
2845
2847
|
r.value.reset();
|
|
2846
2848
|
}
|
|
2847
|
-
function
|
|
2849
|
+
function j(y) {
|
|
2848
2850
|
if (y instanceof MouseEvent && y.button === 2)
|
|
2849
2851
|
return;
|
|
2850
|
-
const
|
|
2851
|
-
u.value !== void 0 &&
|
|
2852
|
-
}
|
|
2853
|
-
function W(y,
|
|
2854
|
-
y && a.value &&
|
|
2852
|
+
const E = y.target || y.srcElement;
|
|
2853
|
+
u.value !== void 0 && E && !c(E, u.value) || a.value !== !1 && (y.stopPropagation(), y.preventDefault(), v.value = P.fromEvent(y, n.value), L(), k());
|
|
2854
|
+
}
|
|
2855
|
+
function W(y, E, g) {
|
|
2856
|
+
if (y && a.value && E) {
|
|
2857
|
+
if (e.dragHandle) {
|
|
2858
|
+
if (e.dragHandle instanceof HTMLElement)
|
|
2859
|
+
u.value = e.dragHandle;
|
|
2860
|
+
else if (typeof e.dragHandle == "string") {
|
|
2861
|
+
const m = E.querySelector(e.dragHandle);
|
|
2862
|
+
m && (u.value = m);
|
|
2863
|
+
}
|
|
2864
|
+
} else
|
|
2865
|
+
u.value = y;
|
|
2866
|
+
n.value = E, d.value = g, u.value.classList.add("ng-draggable"), u.value.addEventListener("mousedown", j);
|
|
2867
|
+
}
|
|
2855
2868
|
}
|
|
2856
2869
|
return {
|
|
2857
2870
|
registerDraggle: W,
|
|
2858
2871
|
resetTranslate: L
|
|
2859
2872
|
};
|
|
2860
2873
|
}
|
|
2861
|
-
function
|
|
2874
|
+
function ca(e, t) {
|
|
2862
2875
|
const n = l(e.enableEsc);
|
|
2863
2876
|
function a(o) {
|
|
2864
2877
|
o.key === "Escape" && e.enableEsc && t.emit("esc", { event: o, type: "esc" });
|
|
@@ -2867,123 +2880,122 @@ function ra(e, t) {
|
|
|
2867
2880
|
}
|
|
2868
2881
|
const Be = /* @__PURE__ */ q({
|
|
2869
2882
|
name: "FModal",
|
|
2870
|
-
props:
|
|
2883
|
+
props: ua,
|
|
2871
2884
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc"],
|
|
2872
2885
|
setup(e, t) {
|
|
2873
|
-
const n = l(e.width || 300), a = l(e.height || 200), o = l(e.modelValue), u = l(""), d = l(e.class), f = l(e.fitContent), v = l(e.showHeader), r = l(""), p = l(e.showCloseButton), s = l(e.showMaxButton), c = l(!1), h = l(""), b = l(""), B = l(""), w = l(e.showButtons), S = l(e.title), k = l(e.reiszeable), L = l(e.containment || null);
|
|
2874
|
-
function
|
|
2886
|
+
const n = l(e.width || 300), a = l(e.height || 200), o = l(e.modelValue), u = l(""), d = l(e.class), f = l(e.fitContent), v = l(e.showHeader), r = l(""), p = l(e.showCloseButton), s = l(e.showMaxButton), c = l(!1), h = l(""), b = l(""), B = l(""), w = l(e.showButtons), S = l(e.title), k = l(e.reiszeable), L = l(e.containment || null), j = l();
|
|
2887
|
+
function W(M, V) {
|
|
2875
2888
|
o.value = !1, t.emit("update:modelValue", !1), V != null && t.emit(V ? "accept" : "cancel"), t.emit("closed", M);
|
|
2876
2889
|
}
|
|
2877
|
-
const
|
|
2890
|
+
const y = [{
|
|
2878
2891
|
name: "cancel",
|
|
2879
2892
|
text: "取消",
|
|
2880
2893
|
class: "btn btn-light",
|
|
2881
2894
|
handle: (M) => {
|
|
2882
|
-
|
|
2895
|
+
W(M, !1);
|
|
2883
2896
|
}
|
|
2884
2897
|
}, {
|
|
2885
2898
|
name: "accept",
|
|
2886
2899
|
text: "确定",
|
|
2887
2900
|
class: "btn btn-primary",
|
|
2888
2901
|
handle: (M) => {
|
|
2889
|
-
|
|
2902
|
+
W(M, !0);
|
|
2890
2903
|
}
|
|
2891
|
-
}],
|
|
2892
|
-
renderResizeBar:
|
|
2893
|
-
maximize:
|
|
2894
|
-
restore:
|
|
2895
|
-
boundingElement:
|
|
2896
|
-
resizedEventParam:
|
|
2897
|
-
allowDrag:
|
|
2898
|
-
unWindowResizeHandle:
|
|
2899
|
-
} =
|
|
2900
|
-
registerDraggle:
|
|
2901
|
-
} =
|
|
2902
|
-
|
|
2904
|
+
}], E = l(e.buttons && e.buttons.length ? e.buttons : y), g = R(() => !!r.value), m = R(() => !!w.value && !!E.value), T = l(), A = l(), H = l(!1), {
|
|
2905
|
+
renderResizeBar: X,
|
|
2906
|
+
maximize: D,
|
|
2907
|
+
restore: F,
|
|
2908
|
+
boundingElement: z,
|
|
2909
|
+
resizedEventParam: C,
|
|
2910
|
+
allowDrag: I,
|
|
2911
|
+
unWindowResizeHandle: x
|
|
2912
|
+
} = sa(e), {
|
|
2913
|
+
registerDraggle: $
|
|
2914
|
+
} = ra(e);
|
|
2915
|
+
O(() => e.title, (M, V) => {
|
|
2903
2916
|
M !== V && (S.value = M);
|
|
2904
|
-
}),
|
|
2917
|
+
}), O(() => e.modelValue, (M, V) => {
|
|
2905
2918
|
M !== V && (o.value = M);
|
|
2906
|
-
}),
|
|
2919
|
+
}), O(() => e.showHeader, (M, V) => {
|
|
2907
2920
|
M !== V && (v.value = M);
|
|
2908
|
-
}),
|
|
2921
|
+
}), O(() => e.showButtons, (M, V) => {
|
|
2909
2922
|
M !== V && (w.value = M);
|
|
2910
|
-
}),
|
|
2911
|
-
const
|
|
2912
|
-
JSON.stringify(
|
|
2923
|
+
}), O(() => C.value, (M, V) => {
|
|
2924
|
+
const ne = M || {}, ae = V || {};
|
|
2925
|
+
JSON.stringify(ne) !== JSON.stringify(ae) && t.emit("resize", {
|
|
2913
2926
|
newSize: M,
|
|
2914
2927
|
oldSize: V
|
|
2915
2928
|
});
|
|
2916
2929
|
});
|
|
2917
|
-
function
|
|
2930
|
+
function N() {
|
|
2918
2931
|
const M = document.querySelectorAll(".farris-modal").length;
|
|
2919
|
-
(!M || M - 1 <= 0) && document.body.classList.remove("modal-open");
|
|
2932
|
+
(!M || M - 1 <= 0) && document.body.classList.remove("modal-open"), j.value && j.value.classList.remove("show");
|
|
2920
2933
|
}
|
|
2921
|
-
const
|
|
2934
|
+
const te = R(() => (o.value ? document.body.classList.add("modal-open") : N(), o.value)), Re = R(() => {
|
|
2922
2935
|
const M = {
|
|
2923
2936
|
modal: !0,
|
|
2924
2937
|
"farris-modal": !0,
|
|
2925
|
-
fade: !0
|
|
2926
|
-
show: N.value
|
|
2938
|
+
fade: !0
|
|
2927
2939
|
};
|
|
2928
|
-
return M["f-modal-fitContent"] = !!f.value, M;
|
|
2929
|
-
}),
|
|
2930
|
-
var
|
|
2940
|
+
return M["f-modal-fitContent"] = !!f.value, M.show = !!te.value, M;
|
|
2941
|
+
}), Fe = R(() => {
|
|
2942
|
+
var ne;
|
|
2931
2943
|
const M = {
|
|
2932
2944
|
"modal-dialog": !0
|
|
2933
|
-
}, V = (
|
|
2934
|
-
return V == null || V.reduce((
|
|
2935
|
-
}),
|
|
2945
|
+
}, V = (ne = d.value) == null ? void 0 : ne.split(" ");
|
|
2946
|
+
return V == null || V.reduce((ae, qe) => (ae[qe] = !0, ae), M), M;
|
|
2947
|
+
}), ke = R(() => ({
|
|
2936
2948
|
position: "absolute",
|
|
2937
2949
|
top: `${(window.innerHeight - a.value) / 2}px`,
|
|
2938
2950
|
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
2939
2951
|
width: `${n.value}px`,
|
|
2940
2952
|
height: f.value ? "auto" : `${a.value}px`
|
|
2941
|
-
})),
|
|
2953
|
+
})), $e = R(() => ({
|
|
2942
2954
|
"modal-content": !0,
|
|
2943
2955
|
"modal-content-has-header": v.value
|
|
2944
|
-
})),
|
|
2956
|
+
})), We = R(() => {
|
|
2945
2957
|
const M = {
|
|
2946
2958
|
display: v.value ? "" : "none"
|
|
2947
2959
|
};
|
|
2948
|
-
return M["pointer-events"] =
|
|
2949
|
-
}),
|
|
2960
|
+
return M["pointer-events"] = I.value ? "auto" : "none", M;
|
|
2961
|
+
}), Ae = R(() => ({
|
|
2950
2962
|
"f-icon": !0,
|
|
2951
2963
|
modal_maximize: !0,
|
|
2952
|
-
modalrevert:
|
|
2953
|
-
})),
|
|
2964
|
+
modalrevert: H.value
|
|
2965
|
+
})), Oe = R(() => ({
|
|
2954
2966
|
"modal-body": !0,
|
|
2955
2967
|
"f-utils-flex-column": h.value === "iframe"
|
|
2956
2968
|
}));
|
|
2957
|
-
function
|
|
2969
|
+
function je() {
|
|
2958
2970
|
return {};
|
|
2959
2971
|
}
|
|
2960
|
-
const
|
|
2972
|
+
const Ve = R(() => {
|
|
2961
2973
|
const M = {
|
|
2962
2974
|
textAlgin: B.value
|
|
2963
|
-
}, V =
|
|
2975
|
+
}, V = je();
|
|
2964
2976
|
return Object.assign(M, V);
|
|
2965
2977
|
});
|
|
2966
|
-
function
|
|
2967
|
-
if (M.stopPropagation(),
|
|
2968
|
-
|
|
2978
|
+
function ze(M) {
|
|
2979
|
+
if (M.stopPropagation(), H.value) {
|
|
2980
|
+
H.value = !1, F();
|
|
2969
2981
|
return;
|
|
2970
2982
|
}
|
|
2971
|
-
|
|
2983
|
+
D(), H.value = !0;
|
|
2972
2984
|
}
|
|
2973
|
-
async function
|
|
2985
|
+
async function Ne(M, V) {
|
|
2974
2986
|
M.handle && await M.handle(V, M) && t.emit("closed", V);
|
|
2975
2987
|
}
|
|
2976
|
-
function
|
|
2977
|
-
M.width && (n.value = M.width), M.height && (a.value = M.height), M.buttons && (
|
|
2988
|
+
function He(M) {
|
|
2989
|
+
M.width && (n.value = M.width), M.height && (a.value = M.height), M.buttons && (E.value = M.buttons), M.title && (S.value = M.title);
|
|
2978
2990
|
}
|
|
2979
2991
|
J(() => {
|
|
2980
|
-
|
|
2992
|
+
A.value && !L.value && (L.value = A.value.parentElement, z.value = L.value, $(T.value, A.value, z.value)), te.value && document.body.classList.add("modal-open"), ca(e, t);
|
|
2981
2993
|
}), be(() => {
|
|
2982
|
-
|
|
2994
|
+
N(), x && x();
|
|
2983
2995
|
}), t.expose({
|
|
2984
|
-
modalElementRef:
|
|
2985
|
-
updateModalOptions:
|
|
2986
|
-
close:
|
|
2996
|
+
modalElementRef: A,
|
|
2997
|
+
updateModalOptions: He,
|
|
2998
|
+
close: W
|
|
2987
2999
|
});
|
|
2988
3000
|
function Pe() {
|
|
2989
3001
|
return i("ul", null, [c.value && i("li", {
|
|
@@ -2991,56 +3003,57 @@ const Be = /* @__PURE__ */ q({
|
|
|
2991
3003
|
}, [i("span", {
|
|
2992
3004
|
class: "f-icon modal_minimize"
|
|
2993
3005
|
}, null)]), s.value && i("li", {
|
|
2994
|
-
onClick:
|
|
3006
|
+
onClick: ze,
|
|
2995
3007
|
class: "f-btn-icon f-bare",
|
|
2996
3008
|
style: "pointer-events: auto;"
|
|
2997
3009
|
}, [i("span", {
|
|
2998
|
-
class:
|
|
3010
|
+
class: Ae.value
|
|
2999
3011
|
}, null)]), p.value && i("li", {
|
|
3000
3012
|
class: "f-btn-icon f-bare",
|
|
3001
|
-
onClick: (M) =>
|
|
3013
|
+
onClick: (M) => W(M, !1),
|
|
3002
3014
|
style: "pointer-events: auto;"
|
|
3003
3015
|
}, [i("span", {
|
|
3004
3016
|
class: "f-icon modal_close"
|
|
3005
3017
|
}, null)])]);
|
|
3006
3018
|
}
|
|
3007
|
-
function
|
|
3019
|
+
function Ge() {
|
|
3008
3020
|
return i("div", {
|
|
3009
3021
|
class: "modal-footer",
|
|
3010
|
-
style:
|
|
3011
|
-
}, [
|
|
3022
|
+
style: Ve.value
|
|
3023
|
+
}, [E.value && E.value.map((M) => i("button", {
|
|
3012
3024
|
name: M.name,
|
|
3013
3025
|
type: "button",
|
|
3014
3026
|
class: M.class + (M.iconClass ? " btn-icontext" : ""),
|
|
3015
3027
|
onClick: (V) => {
|
|
3016
|
-
|
|
3028
|
+
Ne(M, V);
|
|
3017
3029
|
}
|
|
3018
3030
|
}, [!!M.iconClass && i("i", {
|
|
3019
3031
|
class: M.iconClass
|
|
3020
3032
|
}, null), M.text]))]);
|
|
3021
3033
|
}
|
|
3022
|
-
return () => i(
|
|
3034
|
+
return () => i(Qe, {
|
|
3023
3035
|
to: "body"
|
|
3024
3036
|
}, {
|
|
3025
3037
|
default: () => {
|
|
3026
3038
|
var M, V;
|
|
3027
|
-
return [
|
|
3028
|
-
class:
|
|
3029
|
-
style: "display: block"
|
|
3039
|
+
return [te.value && i("div", {
|
|
3040
|
+
class: Re.value,
|
|
3041
|
+
style: "display: block",
|
|
3042
|
+
ref: j
|
|
3030
3043
|
}, [i("div", {
|
|
3031
3044
|
id: u.value,
|
|
3032
|
-
class:
|
|
3033
|
-
style:
|
|
3034
|
-
ref:
|
|
3045
|
+
class: Fe.value,
|
|
3046
|
+
style: ke.value,
|
|
3047
|
+
ref: A
|
|
3035
3048
|
}, [i("div", {
|
|
3036
|
-
class:
|
|
3049
|
+
class: $e.value
|
|
3037
3050
|
}, [i("div", {
|
|
3038
|
-
ref:
|
|
3051
|
+
ref: T,
|
|
3039
3052
|
class: "modal-header",
|
|
3040
|
-
style:
|
|
3053
|
+
style: We.value
|
|
3041
3054
|
}, [i("div", {
|
|
3042
3055
|
class: "modal-title"
|
|
3043
|
-
}, [
|
|
3056
|
+
}, [g.value && i("span", {
|
|
3044
3057
|
class: r.value,
|
|
3045
3058
|
style: "margin-right: 8px"
|
|
3046
3059
|
}, null), i("span", {
|
|
@@ -3048,14 +3061,14 @@ const Be = /* @__PURE__ */ q({
|
|
|
3048
3061
|
}, [S.value])]), i("div", {
|
|
3049
3062
|
class: "actions"
|
|
3050
3063
|
}, [Pe()])]), i("div", {
|
|
3051
|
-
class:
|
|
3064
|
+
class: Oe.value
|
|
3052
3065
|
}, [(V = (M = t.slots).default) == null ? void 0 : V.call(M), h.value === "iframe" && i("iframe", {
|
|
3053
3066
|
title: u.value,
|
|
3054
3067
|
class: "f-utils-fill",
|
|
3055
3068
|
width: "100%",
|
|
3056
3069
|
frameborder: "0",
|
|
3057
3070
|
src: b.value
|
|
3058
|
-
}, null)]),
|
|
3071
|
+
}, null)]), m.value && Ge()]), !f.value && k.value && A.value && X(A.value)])])];
|
|
3059
3072
|
}
|
|
3060
3073
|
});
|
|
3061
3074
|
}
|
|
@@ -3066,10 +3079,10 @@ function Le(e) {
|
|
|
3066
3079
|
if (e.render && typeof e.render == "function")
|
|
3067
3080
|
return e.render;
|
|
3068
3081
|
}
|
|
3069
|
-
function
|
|
3082
|
+
function da(e) {
|
|
3070
3083
|
const t = document.createElement("div");
|
|
3071
3084
|
t.style.display = "contents";
|
|
3072
|
-
const n =
|
|
3085
|
+
const n = _e({
|
|
3073
3086
|
setup(a, o) {
|
|
3074
3087
|
be(() => {
|
|
3075
3088
|
document.body.removeChild(t);
|
|
@@ -3128,12 +3141,12 @@ class me {
|
|
|
3128
3141
|
showButtons: !0,
|
|
3129
3142
|
showHeader: !0
|
|
3130
3143
|
}, t);
|
|
3131
|
-
return
|
|
3144
|
+
return da(n);
|
|
3132
3145
|
}
|
|
3133
3146
|
open(t) {
|
|
3134
3147
|
const n = document.createDocumentFragment();
|
|
3135
3148
|
t.showMaxButton && t.fitContent && (t.showMaxButton = !1);
|
|
3136
|
-
const a =
|
|
3149
|
+
const a = Ze(Object.assign({
|
|
3137
3150
|
title: "",
|
|
3138
3151
|
showButtons: !0,
|
|
3139
3152
|
showHeader: !0
|
|
@@ -3173,7 +3186,7 @@ class me {
|
|
|
3173
3186
|
default: () => [p && p()]
|
|
3174
3187
|
});
|
|
3175
3188
|
return r = ((S) => {
|
|
3176
|
-
const k =
|
|
3189
|
+
const k = Ke(b, S);
|
|
3177
3190
|
return k.appContext = this.appContext, se(k, n), k;
|
|
3178
3191
|
})({
|
|
3179
3192
|
...a.value
|
|
@@ -3183,7 +3196,7 @@ class me {
|
|
|
3183
3196
|
a.value = {
|
|
3184
3197
|
...a.value,
|
|
3185
3198
|
...S
|
|
3186
|
-
}, r && se(
|
|
3199
|
+
}, r && se(et(r, {
|
|
3187
3200
|
...a
|
|
3188
3201
|
}), n);
|
|
3189
3202
|
},
|
|
@@ -3192,7 +3205,7 @@ class me {
|
|
|
3192
3205
|
};
|
|
3193
3206
|
}
|
|
3194
3207
|
}
|
|
3195
|
-
function
|
|
3208
|
+
function fa(e, t, n) {
|
|
3196
3209
|
var W;
|
|
3197
3210
|
function a() {
|
|
3198
3211
|
}
|
|
@@ -3214,12 +3227,12 @@ function da(e, t, n) {
|
|
|
3214
3227
|
return null;
|
|
3215
3228
|
if (y.value.schema && y.value.schema.type === "component")
|
|
3216
3229
|
return y.value;
|
|
3217
|
-
const
|
|
3230
|
+
const E = l(y == null ? void 0 : y.value.parent), g = s(E);
|
|
3218
3231
|
return g || null;
|
|
3219
3232
|
}
|
|
3220
3233
|
function c(y = t) {
|
|
3221
|
-
const { componentInstance:
|
|
3222
|
-
return !
|
|
3234
|
+
const { componentInstance: E, designerItemElementRef: g } = y;
|
|
3235
|
+
return !E || !E.value ? null : E.value.canMove ? g : c(y.parent);
|
|
3223
3236
|
}
|
|
3224
3237
|
function h(y) {
|
|
3225
3238
|
return !!n;
|
|
@@ -3229,24 +3242,24 @@ function da(e, t, n) {
|
|
|
3229
3242
|
}
|
|
3230
3243
|
function B() {
|
|
3231
3244
|
}
|
|
3232
|
-
function w(y,
|
|
3245
|
+
function w(y, E) {
|
|
3233
3246
|
}
|
|
3234
3247
|
function S(y) {
|
|
3235
|
-
const { componentType:
|
|
3236
|
-
let g = de(
|
|
3237
|
-
const m =
|
|
3238
|
-
return g && !g.id && g.type ===
|
|
3239
|
-
}
|
|
3240
|
-
function k(y,
|
|
3241
|
-
const g = String(y.getAttribute("data-controltype")), m = y.getAttribute("data-feature"),
|
|
3242
|
-
|
|
3243
|
-
let A = de(g,
|
|
3248
|
+
const { componentType: E } = y;
|
|
3249
|
+
let g = de(E, y);
|
|
3250
|
+
const m = E.toLowerCase().replace("-", "_");
|
|
3251
|
+
return g && !g.id && g.type === E && (g.id = `${m}_${Math.random().toString().slice(2, 6)}`), g;
|
|
3252
|
+
}
|
|
3253
|
+
function k(y, E) {
|
|
3254
|
+
const g = String(y.getAttribute("data-controltype")), m = y.getAttribute("data-feature"), T = m ? JSON.parse(m) : {};
|
|
3255
|
+
T.parentComponentInstance = d.value;
|
|
3256
|
+
let A = de(g, T);
|
|
3244
3257
|
const H = g.toLowerCase().replace("-", "_");
|
|
3245
3258
|
return A && !A.id && A.type === g && (A.id = `${H}_${Math.random().toString().slice(2, 6)}`), A;
|
|
3246
3259
|
}
|
|
3247
3260
|
function L(y) {
|
|
3248
3261
|
}
|
|
3249
|
-
function
|
|
3262
|
+
function j(...y) {
|
|
3250
3263
|
}
|
|
3251
3264
|
return d.value = {
|
|
3252
3265
|
canMove: f(),
|
|
@@ -3263,7 +3276,7 @@ function da(e, t, n) {
|
|
|
3263
3276
|
getBelongedComponentInstance: s,
|
|
3264
3277
|
getDraggableDesignItemElement: c,
|
|
3265
3278
|
getDraggingDisplayText: b,
|
|
3266
|
-
getPropConfig:
|
|
3279
|
+
getPropConfig: j,
|
|
3267
3280
|
getDragScopeElement: B,
|
|
3268
3281
|
onAcceptMovedChildElement: w,
|
|
3269
3282
|
onAcceptNewChildElement: k,
|
|
@@ -3274,19 +3287,19 @@ function da(e, t, n) {
|
|
|
3274
3287
|
triggerBelongedComponentToDeleteWhenDeleted: l(!1)
|
|
3275
3288
|
}, d;
|
|
3276
3289
|
}
|
|
3277
|
-
const
|
|
3290
|
+
const pa = /* @__PURE__ */ q({
|
|
3278
3291
|
name: "FResponseLayoutEditorSettingDesign",
|
|
3279
3292
|
props: ve,
|
|
3280
3293
|
emits: [],
|
|
3281
3294
|
setup(e, t) {
|
|
3282
|
-
const n = l(e.initialState), a = l(e.width), o = l(e.height), u = l(), d = ge("design-item-context"), f =
|
|
3295
|
+
const n = l(e.initialState), a = l(e.width), o = l(e.height), u = l(), d = ge("design-item-context"), f = fa(u, d);
|
|
3283
3296
|
J(() => {
|
|
3284
3297
|
u.value.componentInstance = f;
|
|
3285
3298
|
}), t.expose(f.value);
|
|
3286
3299
|
function v() {
|
|
3287
3300
|
const r = me.show({
|
|
3288
3301
|
// title: '响应式列宽编辑器',
|
|
3289
|
-
render: () => i(
|
|
3302
|
+
render: () => i(ie, {
|
|
3290
3303
|
initialState: n,
|
|
3291
3304
|
width: a,
|
|
3292
3305
|
height: o
|
|
@@ -3322,7 +3335,7 @@ const fa = /* @__PURE__ */ q({
|
|
|
3322
3335
|
class: "f-column-width-setting-button-center"
|
|
3323
3336
|
}, [G("高级设置")])])]);
|
|
3324
3337
|
}
|
|
3325
|
-
}),
|
|
3338
|
+
}), va = {
|
|
3326
3339
|
width: { Type: Number, default: 400 },
|
|
3327
3340
|
type: { Type: String, default: "info" },
|
|
3328
3341
|
title: { Type: String, default: "" },
|
|
@@ -3335,12 +3348,12 @@ const fa = /* @__PURE__ */ q({
|
|
|
3335
3348
|
function he() {
|
|
3336
3349
|
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
3337
3350
|
}
|
|
3338
|
-
async function
|
|
3351
|
+
async function ma(e) {
|
|
3339
3352
|
if (!navigator.clipboard)
|
|
3340
3353
|
throw he();
|
|
3341
3354
|
return navigator.clipboard.writeText(e);
|
|
3342
3355
|
}
|
|
3343
|
-
async function
|
|
3356
|
+
async function ha(e) {
|
|
3344
3357
|
const t = document.createElement("span");
|
|
3345
3358
|
t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
|
|
3346
3359
|
const n = window.getSelection(), a = window.document.createRange();
|
|
@@ -3353,24 +3366,24 @@ async function ma(e) {
|
|
|
3353
3366
|
}
|
|
3354
3367
|
if (!o) throw he();
|
|
3355
3368
|
}
|
|
3356
|
-
async function
|
|
3369
|
+
async function ya(e) {
|
|
3357
3370
|
try {
|
|
3358
|
-
await
|
|
3371
|
+
await ma(e);
|
|
3359
3372
|
} catch (t) {
|
|
3360
3373
|
try {
|
|
3361
|
-
await
|
|
3374
|
+
await ha(e);
|
|
3362
3375
|
} catch (n) {
|
|
3363
3376
|
throw n || t || he();
|
|
3364
3377
|
}
|
|
3365
3378
|
}
|
|
3366
3379
|
}
|
|
3367
|
-
function
|
|
3380
|
+
function ga() {
|
|
3368
3381
|
async function e(t) {
|
|
3369
|
-
await
|
|
3382
|
+
await ya(t);
|
|
3370
3383
|
}
|
|
3371
3384
|
return { onCopy: e };
|
|
3372
3385
|
}
|
|
3373
|
-
function
|
|
3386
|
+
function ba(e, t, n, a) {
|
|
3374
3387
|
const o = l(14), u = l(140), d = l(""), f = l(a.value.length), v = R(() => a.value), r = R(() => ({
|
|
3375
3388
|
"font-size": `${o.value}px`,
|
|
3376
3389
|
height: "100%"
|
|
@@ -3381,7 +3394,7 @@ function ga(e, t, n, a) {
|
|
|
3381
3394
|
f.value = c.length;
|
|
3382
3395
|
}
|
|
3383
3396
|
}
|
|
3384
|
-
return () => i(
|
|
3397
|
+
return () => i(ue, null, [i("textarea", {
|
|
3385
3398
|
title: "promptMessage",
|
|
3386
3399
|
name: "promptMessage",
|
|
3387
3400
|
class: "form-control",
|
|
@@ -3395,14 +3408,14 @@ function ga(e, t, n, a) {
|
|
|
3395
3408
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
3396
3409
|
}, [f.value + " / " + u.value])]);
|
|
3397
3410
|
}
|
|
3398
|
-
function
|
|
3399
|
-
const o =
|
|
3411
|
+
function wa(e, t, n, a) {
|
|
3412
|
+
const o = ba(e, t, n, a), u = /* @__PURE__ */ new Map([["text-area", o]]);
|
|
3400
3413
|
function d(f) {
|
|
3401
3414
|
return u.get(f) || null;
|
|
3402
3415
|
}
|
|
3403
3416
|
return { getEditorRender: d };
|
|
3404
3417
|
}
|
|
3405
|
-
function
|
|
3418
|
+
function Sa() {
|
|
3406
3419
|
const e = l(!1), t = l("复制成功");
|
|
3407
3420
|
return {
|
|
3408
3421
|
feedbackStyle: R(() => {
|
|
@@ -3428,11 +3441,11 @@ function wa() {
|
|
|
3428
3441
|
toShowFeedback: e
|
|
3429
3442
|
};
|
|
3430
3443
|
}
|
|
3431
|
-
function
|
|
3444
|
+
function Ca(e, t) {
|
|
3432
3445
|
const n = t.getEditorRender(e.promptEditorType);
|
|
3433
3446
|
return () => n && n();
|
|
3434
3447
|
}
|
|
3435
|
-
function
|
|
3448
|
+
function Ma(e) {
|
|
3436
3449
|
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), d = R(() => {
|
|
3437
3450
|
const w = `${n.value}px`;
|
|
3438
3451
|
return {
|
|
@@ -3477,13 +3490,13 @@ function Ca(e) {
|
|
|
3477
3490
|
style: "cursor: pointer;"
|
|
3478
3491
|
}, [p.value])])]);
|
|
3479
3492
|
}
|
|
3480
|
-
function
|
|
3493
|
+
function Ia(e) {
|
|
3481
3494
|
return () => i("p", {
|
|
3482
3495
|
class: "toast-msg-detail",
|
|
3483
3496
|
innerHTML: e.value
|
|
3484
3497
|
}, null);
|
|
3485
3498
|
}
|
|
3486
|
-
function
|
|
3499
|
+
function xa(e, t, n, a) {
|
|
3487
3500
|
const o = l(e.exceptionInfo), u = R(() => {
|
|
3488
3501
|
const c = {
|
|
3489
3502
|
"f-icon": !0
|
|
@@ -3491,10 +3504,10 @@ function Ia(e, t, n, a) {
|
|
|
3491
3504
|
return c[h] = !0, c;
|
|
3492
3505
|
}), d = R(() => n.value || o.value && o.value.message), f = R(() => a.value), v = R(() => !!a.value), r = R(() => !!o.value);
|
|
3493
3506
|
function p() {
|
|
3494
|
-
return r.value ?
|
|
3507
|
+
return r.value ? Ma(o) : v.value ? Ia(f) : () => null;
|
|
3495
3508
|
}
|
|
3496
3509
|
const s = p();
|
|
3497
|
-
return () => i(
|
|
3510
|
+
return () => i(ue, null, [i("div", {
|
|
3498
3511
|
class: "float-left modal-tips-iconwrap"
|
|
3499
3512
|
}, [i("span", {
|
|
3500
3513
|
class: u.value
|
|
@@ -3505,7 +3518,7 @@ function Ia(e, t, n, a) {
|
|
|
3505
3518
|
innerHTML: d.value
|
|
3506
3519
|
}, null), s()])]);
|
|
3507
3520
|
}
|
|
3508
|
-
function
|
|
3521
|
+
function Ea(e, t, n) {
|
|
3509
3522
|
const {
|
|
3510
3523
|
onCopy: a
|
|
3511
3524
|
} = t, {
|
|
@@ -3531,8 +3544,8 @@ function xa(e, t, n) {
|
|
|
3531
3544
|
style: "cursor: pointer;"
|
|
3532
3545
|
}, [d.value])]);
|
|
3533
3546
|
}
|
|
3534
|
-
function
|
|
3535
|
-
const o = l(e.type), u = l([]), d = l(e.exceptionInfo), f = l(e.okButtonText), v = l(e.cancelButtonText), r = l(!0), p = l(!0), s = R(() => !!(u.value && u.value.length)), c = R(() => d.value && d.value.date && d.value.message && d.value.detail), h = R(() => !(u.value && u.value.length) && (f.value || v.value)), b = R(() => p.value && f.value), B = R(() => r.value && v.value), w =
|
|
3547
|
+
function Da(e, t, n, a) {
|
|
3548
|
+
const o = l(e.type), u = l([]), d = l(e.exceptionInfo), f = l(e.okButtonText), v = l(e.cancelButtonText), r = l(!0), p = l(!0), s = R(() => !!(u.value && u.value.length)), c = R(() => d.value && d.value.date && d.value.message && d.value.detail), h = R(() => !(u.value && u.value.length) && (f.value || v.value)), b = R(() => p.value && f.value), B = R(() => r.value && v.value), w = Ea(e, n, a);
|
|
3536
3549
|
function S(L) {
|
|
3537
3550
|
o.value === "question" && t.emit("reject"), t.emit("close");
|
|
3538
3551
|
}
|
|
@@ -3557,9 +3570,9 @@ function Ea(e, t, n, a) {
|
|
|
3557
3570
|
class: L.iconClass
|
|
3558
3571
|
}, null), L.text]))]);
|
|
3559
3572
|
}
|
|
3560
|
-
const
|
|
3573
|
+
const oe = /* @__PURE__ */ q({
|
|
3561
3574
|
name: "FMessageBox",
|
|
3562
|
-
props:
|
|
3575
|
+
props: va,
|
|
3563
3576
|
emits: ["accept", "reject", "close"],
|
|
3564
3577
|
setup(e, t) {
|
|
3565
3578
|
const n = l(e.type), a = l(e.title), o = l(e.detail), u = R(() => {
|
|
@@ -3572,7 +3585,7 @@ const le = /* @__PURE__ */ q({
|
|
|
3572
3585
|
}), d = R(() => {
|
|
3573
3586
|
const w = {};
|
|
3574
3587
|
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;
|
|
3575
|
-
}), f =
|
|
3588
|
+
}), f = ga(), v = wa(e, n, a, o), r = Sa(), {
|
|
3576
3589
|
feedbackStyle: p,
|
|
3577
3590
|
feedbackMessage: s
|
|
3578
3591
|
} = r;
|
|
@@ -3584,12 +3597,12 @@ const le = /* @__PURE__ */ q({
|
|
|
3584
3597
|
function h() {
|
|
3585
3598
|
switch (n.value) {
|
|
3586
3599
|
case "prompt":
|
|
3587
|
-
return
|
|
3600
|
+
return Ca(e, v);
|
|
3588
3601
|
default:
|
|
3589
|
-
return
|
|
3602
|
+
return xa(e, n, a, o);
|
|
3590
3603
|
}
|
|
3591
3604
|
}
|
|
3592
|
-
const b = h(), B =
|
|
3605
|
+
const b = h(), B = Da(e, t, f, r);
|
|
3593
3606
|
return () => i("div", {
|
|
3594
3607
|
class: "farris-messager"
|
|
3595
3608
|
}, [i("section", {
|
|
@@ -3618,7 +3631,7 @@ class Y {
|
|
|
3618
3631
|
width: a.width || 400,
|
|
3619
3632
|
fitContent: !0,
|
|
3620
3633
|
showMaxButton: !1,
|
|
3621
|
-
render: () => i(
|
|
3634
|
+
render: () => i(oe, we(a, {
|
|
3622
3635
|
onAccept: f,
|
|
3623
3636
|
onReject: v,
|
|
3624
3637
|
onClose: p
|
|
@@ -3692,8 +3705,8 @@ class Y {
|
|
|
3692
3705
|
Y.show(u);
|
|
3693
3706
|
}
|
|
3694
3707
|
}
|
|
3695
|
-
|
|
3696
|
-
e.component(
|
|
3708
|
+
oe.install = (e) => {
|
|
3709
|
+
e.component(oe.name, oe), e.provide("FMessageBoxService", Y);
|
|
3697
3710
|
};
|
|
3698
3711
|
const re = /* @__PURE__ */ q({
|
|
3699
3712
|
name: "FResponseLayoutEditorSetting",
|
|
@@ -3701,7 +3714,7 @@ const re = /* @__PURE__ */ q({
|
|
|
3701
3714
|
emits: ["change"],
|
|
3702
3715
|
setup(e, t) {
|
|
3703
3716
|
const n = l(e.modelValue), a = l(e.width), o = l(e.height);
|
|
3704
|
-
|
|
3717
|
+
O(() => e.modelValue, (v) => {
|
|
3705
3718
|
n.value = v;
|
|
3706
3719
|
});
|
|
3707
3720
|
function u(v, r) {
|
|
@@ -3717,7 +3730,7 @@ const re = /* @__PURE__ */ q({
|
|
|
3717
3730
|
return;
|
|
3718
3731
|
}
|
|
3719
3732
|
me.show({
|
|
3720
|
-
render: (v) => i(
|
|
3733
|
+
render: (v) => i(ie, {
|
|
3721
3734
|
initialState: n,
|
|
3722
3735
|
width: a.value,
|
|
3723
3736
|
height: o.value,
|
|
@@ -3742,19 +3755,19 @@ const re = /* @__PURE__ */ q({
|
|
|
3742
3755
|
class: "f-column-width-setting-button-center"
|
|
3743
3756
|
}, [G("高级设置")])])]);
|
|
3744
3757
|
}
|
|
3745
|
-
}),
|
|
3758
|
+
}), ka = {
|
|
3746
3759
|
install(e) {
|
|
3747
|
-
e.component(
|
|
3760
|
+
e.component(ie.name, ie), e.component(re.name, re);
|
|
3748
3761
|
},
|
|
3749
3762
|
register(e, t, n, a) {
|
|
3750
3763
|
e["response-layout-editor-setting"] = re, t["response-layout-editor-setting"] = ye;
|
|
3751
3764
|
},
|
|
3752
3765
|
registerDesigner(e, t, n) {
|
|
3753
|
-
e["response-layout-editor-setting"] =
|
|
3766
|
+
e["response-layout-editor-setting"] = pa, t["response-layout-editor-setting"] = ye;
|
|
3754
3767
|
}
|
|
3755
3768
|
};
|
|
3756
3769
|
export {
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
|
|
3770
|
+
ie as ResponseLayoutEditor,
|
|
3771
|
+
ka as default,
|
|
3772
|
+
at as responseLayoutEditorProps
|
|
3760
3773
|
};
|