@farris/ui-vue 1.3.1 → 1.3.3
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 +103 -99
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +301 -351
- package/components/avatar/index.umd.cjs +1 -1
- package/components/binding-selector/index.esm.js +444 -0
- package/components/binding-selector/index.umd.cjs +1 -0
- package/components/binding-selector/package.json +8 -0
- package/components/border-editor/index.esm.js +5 -3
- package/components/border-editor/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +143 -139
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +407 -396
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +266 -255
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +628 -641
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +379 -374
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +471 -471
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +155 -148
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +487 -478
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +330 -279
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1171 -1277
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +220 -204
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4743 -4641
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +2916 -3019
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2375 -2590
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +9518 -1198
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/designer-outline/index.esm.js +2 -1
- package/components/designer-outline/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +34 -38
- package/components/drawer/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +149 -138
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1602 -1740
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +159 -151
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +218 -218
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/event-parameter/index.esm.js +311 -0
- package/components/event-parameter/index.umd.cjs +1 -0
- package/components/event-parameter/package.json +8 -0
- package/components/events-editor/index.css +1 -1
- package/components/events-editor/index.esm.js +533 -563
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +95 -91
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2356 -2455
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +3048 -3308
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +10537 -3249
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +9781 -1327
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +353 -341
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +510 -827
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +278 -268
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +144 -136
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +2139 -2237
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +6414 -6367
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +5216 -5114
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/message-box/index.esm.js +252 -252
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +70 -70
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +486 -984
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +446 -498
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +363 -388
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1050 -1308
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +134 -131
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1072 -1082
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +412 -910
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +214 -203
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1361 -1536
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +650 -677
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +12344 -5048
- package/components/query-solution/index.umd.cjs +6 -1
- package/components/radio-button/index.esm.js +97 -97
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.css +1 -1
- package/components/radio-group/index.esm.js +1821 -565
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +251 -244
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +151 -140
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +707 -676
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +719 -740
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4977 -5249
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +145 -134
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +348 -337
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +141 -130
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +311 -301
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +231 -220
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +385 -432
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1932 -1914
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +351 -340
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +209 -199
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +388 -415
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +619 -666
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +493 -486
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3169 -3278
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2320 -2418
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +563 -554
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +287 -276
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +368 -324
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -487
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +51302 -47651
- package/farris.all.umd.cjs +14 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/binding-selector/index.d.ts +55 -0
- package/types/binding-selector/src/binding-selector.component.d.ts +11 -0
- package/types/binding-selector/src/binding-selector.props.d.ts +52 -0
- package/types/binding-selector/src/components/binding-selector-container.component.d.ts +13 -0
- package/types/binding-selector/src/composition/use-field-selection.d.ts +9 -0
- package/types/combo-list/src/components/list-container.component.d.ts +6 -6
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/combo-tree/src/components/tree-container.component.d.ts +5 -5
- package/types/common/entity/entity-schema.d.ts +26 -11
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +2 -2
- package/types/condition/src/condition-fields.design.component.d.ts +18 -0
- package/types/condition/src/types.d.ts +6 -6
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +20 -0
- package/types/data-grid/src/{designer/data-grid-column.props.d.ts → data-grid-column.props.d.ts} +1 -1
- package/types/data-grid/src/data-grid.props.d.ts +2 -2
- package/types/data-grid/src/designer/grid-field-editor.component.d.ts +14 -14
- package/types/data-grid/src/schema/schema-resolver.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +2 -2
- package/types/date-picker/src/components/calendar/calendar.component.d.ts +3 -3
- package/types/date-picker/src/components/month/month.component.d.ts +3 -3
- package/types/date-picker/src/components/year/year.component.d.ts +3 -3
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/drag-resolve.d.ts +5 -0
- package/types/designer-canvas/src/composition/types.d.ts +49 -40
- package/types/designer-canvas/src/types.d.ts +8 -20
- package/types/dynamic-form/index.d.ts +1 -1
- package/types/dynamic-form/src/designer/form-group-use-designer-rules.d.ts +3 -0
- package/types/dynamic-form/src/schema/{schema-resolver.d.ts → response-form-schema-resolver.d.ts} +1 -1
- package/types/dynamic-form/src/types.d.ts +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +5 -0
- package/types/dynamic-resolver/src/converter/row-number.converter.d.ts +3 -0
- package/types/entity-binding-selector/composition/use-entity-tree.d.ts +7 -0
- package/types/entity-binding-selector/entity-binding-selector.component.d.ts +11 -0
- package/types/entity-binding-selector/entity-binding-selector.props.d.ts +3 -0
- package/types/enum-editor/src/components/enum-editor-container.component.d.ts +3 -3
- package/types/enum-editor/src/enum-editor.component.d.ts +3 -3
- package/types/event-parameter/index.d.ts +31 -0
- package/types/event-parameter/src/composition/type.d.ts +77 -0
- package/types/event-parameter/src/composition/use-editor-combotree.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-input.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-select.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor-switch.d.ts +3 -0
- package/types/event-parameter/src/composition/use-editor.d.ts +3 -0
- package/types/event-parameter/src/event-parameter.component.d.ts +8 -0
- package/types/event-parameter/src/event-parameter.props.d.ts +34 -0
- package/types/external-container/src/designer/import-external-schema.component.d.ts +1 -1
- package/types/field-selector/src/field-selector.component.d.ts +1 -2
- package/types/field-selector/src/field-selector.props.d.ts +0 -9
- package/types/input-group/src/designer/use-input-group-rules.d.ts +1 -2
- package/types/list-view/src/designer/list-view-table.design.component.d.ts +15 -0
- package/types/list-view/src/list-view-table.component.d.ts +15 -0
- package/types/lookup/src/composition/use-user-data.d.ts +2 -2
- package/types/lookup/src/property-config/lookup.property-config.d.ts +2 -6
- package/types/modal/src/composition/modal.service.d.ts +2 -1
- package/types/page-header/src/designer/page-header.design.component.d.ts +1 -1
- package/types/page-header/src/page-header.component.d.ts +1 -1
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/property-entity.d.ts +1 -1
- package/types/property-panel/src/composition/type.d.ts +0 -13
- package/types/query-solution/src/composition/types.d.ts +35 -4
- package/types/query-solution/src/composition/use-header.d.ts +21 -0
- package/types/query-solution/src/composition/{use-filter.d.ts → use-http.d.ts} +2 -2
- package/types/query-solution/src/composition/use-solution.d.ts +20 -0
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +17 -16
- package/types/query-solution/src/designer/query-solution-config/query-solution-config.props.d.ts +14 -14
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +3 -51
- package/types/query-solution/src/query-solution.d.ts +10 -2
- package/types/radio-group/src/designer/item-collection-editor-inner.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.component.d.ts +29 -0
- package/types/radio-group/src/designer/item-collection-editor.props.d.ts +21 -0
- package/types/radio-group/src/schema/schema-mapper.d.ts +1 -0
- package/types/radio-group/src/schema/schema-resolver.d.ts +1 -0
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -0
- package/types/section/src/property-config/section.property-config.d.ts +17 -17
- package/types/section/src/schema/schema-resolver.d.ts +1 -2
- package/types/section/src/schema/toolbar-resolver.d.ts +1 -1
- package/types/tabs/src/composition/types.d.ts +4 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +9 -59
- package/types/tabs/src/property-config/tabs.property-config.d.ts +8 -71
- package/types/tabs/src/schema/schema-resolver.d.ts +1 -2
- package/types/text/src/composition/types.d.ts +4 -4
- package/types/textarea/src/property-config/textarea.property-config.d.ts +23 -0
- package/types/weather/src/composition/use-weather-charts.d.ts +15 -0
- package/types/weather/src/composition/use-weather-color.d.ts +15 -0
- package/types/weather/src/composition/use-weather-data.d.ts +15 -0
- package/types/weather/src/composition/use-weather-format-number.d.ts +15 -0
- package/types/property-panel/src/composition/entity/use-input-rules.d.ts +0 -3
- package/types/tree-grid/src/schema/column-resolver.d.ts +0 -3
- package/types/weather/src/composition/types.d.ts +0 -2
- /package/types/dynamic-form/src/designer/{use-designer-rules.d.ts → response-form-use-designer-rules.d.ts} +0 -0
- /package/types/dynamic-form/src/property-config/{form.property-config.d.ts → response-form.property-config.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Ze = Object.defineProperty;
|
|
2
2
|
var _e = (e, t, n) => t in e ? Ze(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var N = (e, t, n) => _e(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { defineComponent as U, ref as l, watch as A, computed as
|
|
4
|
+
import { defineComponent as U, ref as l, watch as A, computed as R, onMounted as Q, createVNode as i, nextTick as fe, toRefs as Ke, onBeforeMount as ve, createTextVNode as q, Fragment as ue, withModifiers as le, inject as Se, provide as et, onUnmounted as Ce, Teleport as tt, Transition as nt, shallowRef as at, createApp as lt, render as ce, h as ot, cloneVNode as it, mergeProps as Me, reactive as Z } from "vue";
|
|
5
5
|
import { isPlainObject as be, cloneDeep as X } from "lodash-es";
|
|
6
6
|
import ut from "../list-view/index.esm.js";
|
|
7
7
|
import st from "../button-edit/index.esm.js";
|
|
@@ -437,13 +437,17 @@ const rt = {
|
|
|
437
437
|
type: ht,
|
|
438
438
|
properties: yt,
|
|
439
439
|
required: gt
|
|
440
|
-
},
|
|
440
|
+
}, Ie = {}, xe = {};
|
|
441
441
|
function pe(e) {
|
|
442
|
-
const { properties: t, title: n, ignore: a } = e, o = a && Array.isArray(a), r = Object.keys(t).reduce((c, d) => ((!o || !a.find((v) => v
|
|
443
|
-
|
|
442
|
+
const { properties: t, title: n, ignore: a } = e, o = a && Array.isArray(a), r = Object.keys(t).reduce((c, d) => ((!o || !a.find((v) => v === d)) && (c[d] = t[d].type === "object" && t[d].properties ? pe(t[d]) : X(t[d].default)), c), {});
|
|
443
|
+
if (n && (!o || !a.find((c) => c === "id"))) {
|
|
444
|
+
const c = n.toLowerCase().replace(/-/g, "_");
|
|
445
|
+
r.id = `${c}_${Math.random().toString().slice(2, 6)}`;
|
|
446
|
+
}
|
|
447
|
+
return r;
|
|
444
448
|
}
|
|
445
449
|
function Ee(e, t = {}, n) {
|
|
446
|
-
const a =
|
|
450
|
+
const a = Ie[e];
|
|
447
451
|
if (a) {
|
|
448
452
|
let o = pe(a);
|
|
449
453
|
const r = xe[e];
|
|
@@ -453,7 +457,7 @@ function Ee(e, t = {}, n) {
|
|
|
453
457
|
}
|
|
454
458
|
function wt(e, t) {
|
|
455
459
|
const n = pe(t);
|
|
456
|
-
return Object.keys(
|
|
460
|
+
return Object.keys(n).reduce((a, o) => (a[o] && be(a[o]) && be(e[o] || !e[o]) ? Object.assign(a[o], e[o] || {}) : a[o] = e[o], a), n), n;
|
|
457
461
|
}
|
|
458
462
|
function St(e, t) {
|
|
459
463
|
return Object.keys(e).filter((a) => e[a] != null).reduce((a, o) => {
|
|
@@ -474,36 +478,36 @@ function Ct(e, t, n = /* @__PURE__ */ new Map()) {
|
|
|
474
478
|
const a = wt(e, t);
|
|
475
479
|
return St(a, n);
|
|
476
480
|
}
|
|
477
|
-
function
|
|
478
|
-
function t(s,
|
|
481
|
+
function Mt(e = {}) {
|
|
482
|
+
function t(s, m, u, f) {
|
|
479
483
|
if (typeof u == "number")
|
|
480
484
|
return f[s].length === u;
|
|
481
485
|
if (typeof u == "object") {
|
|
482
|
-
const h = Object.keys(u)[0],
|
|
486
|
+
const h = Object.keys(u)[0], w = u[h];
|
|
483
487
|
if (h === "not")
|
|
484
|
-
return Number(f[s].length) !== Number(
|
|
488
|
+
return Number(f[s].length) !== Number(w);
|
|
485
489
|
if (h === "moreThan")
|
|
486
|
-
return Number(f[s].length) >= Number(
|
|
490
|
+
return Number(f[s].length) >= Number(w);
|
|
487
491
|
if (h === "lessThan")
|
|
488
|
-
return Number(f[s].length) <= Number(
|
|
492
|
+
return Number(f[s].length) <= Number(w);
|
|
489
493
|
}
|
|
490
494
|
return !1;
|
|
491
495
|
}
|
|
492
|
-
function n(s,
|
|
496
|
+
function n(s, m, u, f) {
|
|
493
497
|
return f[s] && f[s].propertyValue && String(f[s].propertyValue.value) === String(u);
|
|
494
498
|
}
|
|
495
499
|
const a = /* @__PURE__ */ new Map([
|
|
496
500
|
["length", t],
|
|
497
501
|
["getProperty", n]
|
|
498
502
|
]);
|
|
499
|
-
Object.keys(e).reduce((s,
|
|
500
|
-
function o(s,
|
|
503
|
+
Object.keys(e).reduce((s, m) => (s.set(m, e[m]), s), a);
|
|
504
|
+
function o(s, m) {
|
|
501
505
|
const u = s;
|
|
502
|
-
return typeof
|
|
506
|
+
return typeof m == "number" ? [{ target: u, operator: "length", param: null, value: Number(m) }] : typeof m == "boolean" ? [{ target: u, operator: "getProperty", param: s, value: !!m }] : typeof m == "object" ? Object.keys(m).map((f) => {
|
|
503
507
|
if (f === "length")
|
|
504
|
-
return { target: u, operator: "length", param: null, value:
|
|
505
|
-
const h = f,
|
|
506
|
-
return { target: u, operator: "getProperty", param: h, value:
|
|
508
|
+
return { target: u, operator: "length", param: null, value: m[f] };
|
|
509
|
+
const h = f, w = m[f];
|
|
510
|
+
return { target: u, operator: "getProperty", param: h, value: w };
|
|
507
511
|
}) : [];
|
|
508
512
|
}
|
|
509
513
|
function r(s) {
|
|
@@ -512,27 +516,27 @@ function It(e = {}) {
|
|
|
512
516
|
return u.push(...h), u;
|
|
513
517
|
}, []);
|
|
514
518
|
}
|
|
515
|
-
function c(s,
|
|
519
|
+
function c(s, m) {
|
|
516
520
|
if (a.has(s.operator)) {
|
|
517
521
|
const u = a.get(s.operator);
|
|
518
|
-
return u && u(s.target, s.param, s.value,
|
|
522
|
+
return u && u(s.target, s.param, s.value, m) || !1;
|
|
519
523
|
}
|
|
520
524
|
return !1;
|
|
521
525
|
}
|
|
522
|
-
function d(s,
|
|
523
|
-
return r(s).reduce((h,
|
|
526
|
+
function d(s, m) {
|
|
527
|
+
return r(s).reduce((h, w) => h && c(w, m), !0);
|
|
524
528
|
}
|
|
525
|
-
function v(s,
|
|
526
|
-
const u = Object.keys(s), f = u.includes("allOf"), h = u.includes("anyOf"),
|
|
527
|
-
return f ? !
|
|
529
|
+
function v(s, m) {
|
|
530
|
+
const u = Object.keys(s), f = u.includes("allOf"), h = u.includes("anyOf"), w = f || h, S = (w ? s[w ? f ? "allOf" : "anyOf" : "allOf"] : [s]).map((L) => d(L, m));
|
|
531
|
+
return f ? !S.includes(!1) : S.includes(!0);
|
|
528
532
|
}
|
|
529
533
|
return { parseValueSchema: v };
|
|
530
534
|
}
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
function K(e, t, n = /* @__PURE__ */ new Map(), a = (c, d, v) => d, o = {}, r = (c) => c) {
|
|
534
|
-
return
|
|
535
|
-
const d = Ct(c, t, n), v = Object.keys(e).reduce((s,
|
|
535
|
+
const It = {}, xt = {};
|
|
536
|
+
Mt();
|
|
537
|
+
function K(e, t, n = /* @__PURE__ */ new Map(), a = (c, d, v, s) => d, o = {}, r = (c) => c) {
|
|
538
|
+
return Ie[t.title] = t, xe[t.title] = a, It[t.title] = o, xt[t.title] = r, (c = {}) => {
|
|
539
|
+
const d = Ct(c, t, n), v = Object.keys(e).reduce((s, m) => (s[m] = e[m].default, s), {});
|
|
536
540
|
return Object.assign(v, d);
|
|
537
541
|
};
|
|
538
542
|
}
|
|
@@ -542,10 +546,10 @@ function ee(e, t) {
|
|
|
542
546
|
const Et = /* @__PURE__ */ new Map([
|
|
543
547
|
["appearance", ee]
|
|
544
548
|
]);
|
|
545
|
-
function
|
|
549
|
+
function Bt(e, t, n) {
|
|
546
550
|
return t;
|
|
547
551
|
}
|
|
548
|
-
const
|
|
552
|
+
const Dt = "capsule", Tt = "A Farris Component", Lt = "object", Rt = {
|
|
549
553
|
basic: {
|
|
550
554
|
description: "Basic Infomation",
|
|
551
555
|
title: "基本信息",
|
|
@@ -568,11 +572,11 @@ const Bt = "capsule", Tt = "A Farris Component", Lt = "object", Rt = {
|
|
|
568
572
|
}
|
|
569
573
|
}
|
|
570
574
|
}, Ft = {
|
|
571
|
-
title:
|
|
575
|
+
title: Dt,
|
|
572
576
|
description: Tt,
|
|
573
577
|
type: Lt,
|
|
574
578
|
categories: Rt
|
|
575
|
-
},
|
|
579
|
+
}, Be = {
|
|
576
580
|
items: {
|
|
577
581
|
Type: Array,
|
|
578
582
|
default: [
|
|
@@ -594,7 +598,7 @@ const Bt = "capsule", Tt = "A Farris Component", Lt = "object", Rt = {
|
|
|
594
598
|
show: { type: Boolean, default: !0 },
|
|
595
599
|
disabled: { type: Boolean, default: !1 }
|
|
596
600
|
};
|
|
597
|
-
K(
|
|
601
|
+
K(Be, bt, Et, Bt, Ft);
|
|
598
602
|
const Wt = /* @__PURE__ */ U({
|
|
599
603
|
name: "FCapsuleItem",
|
|
600
604
|
props: kt,
|
|
@@ -604,7 +608,7 @@ const Wt = /* @__PURE__ */ U({
|
|
|
604
608
|
A(() => e.isActive, (c) => {
|
|
605
609
|
a.value = c;
|
|
606
610
|
});
|
|
607
|
-
const o =
|
|
611
|
+
const o = R(() => ({
|
|
608
612
|
"f-capsule-item": !0,
|
|
609
613
|
"f-capsule-active-item": a.value,
|
|
610
614
|
"f-capsule-disabled": e.disabled
|
|
@@ -628,84 +632,84 @@ const Wt = /* @__PURE__ */ U({
|
|
|
628
632
|
}
|
|
629
633
|
}), $t = /* @__PURE__ */ U({
|
|
630
634
|
name: "FCapsule",
|
|
631
|
-
props:
|
|
635
|
+
props: Be,
|
|
632
636
|
emits: ["change", "update:modelValue"],
|
|
633
637
|
setup(e, t) {
|
|
634
|
-
const n = l(e.items), a = l(), o = 2, r = l(e.modelValue), c = l("none"), d = l(e.type), v =
|
|
635
|
-
const
|
|
638
|
+
const n = l(e.items), a = l(), o = 2, r = l(e.modelValue), c = l("none"), d = l(e.type), v = R(() => {
|
|
639
|
+
const y = {
|
|
636
640
|
"f-capsule-container": !0
|
|
637
641
|
};
|
|
638
|
-
return d.value && (
|
|
639
|
-
}), s =
|
|
642
|
+
return d.value && (y[d.value] = !0), y;
|
|
643
|
+
}), s = R(() => ({})), m = R(() => ({
|
|
640
644
|
"f-capsule": !0
|
|
641
|
-
})), u = l(o), f = l(0), h = l(0),
|
|
645
|
+
})), u = l(o), f = l(0), h = l(0), w = R(() => ({
|
|
642
646
|
left: `${u.value}px`,
|
|
643
647
|
width: `${f.value}px`,
|
|
644
648
|
transition: c.value
|
|
645
|
-
})),
|
|
649
|
+
})), M = R(() => ({
|
|
646
650
|
width: `${h.value}px`
|
|
647
|
-
})),
|
|
648
|
-
function
|
|
649
|
-
var
|
|
650
|
-
if (
|
|
651
|
-
const
|
|
652
|
-
if (
|
|
653
|
-
const O =
|
|
651
|
+
})), b = /* @__PURE__ */ new Map();
|
|
652
|
+
function S(y) {
|
|
653
|
+
var p;
|
|
654
|
+
if (b.has(y.value)) {
|
|
655
|
+
const F = (p = b.get(y.value)) == null ? void 0 : p.value;
|
|
656
|
+
if (F) {
|
|
657
|
+
const O = F.getBoundingClientRect(), P = a.value.getBoundingClientRect();
|
|
654
658
|
u.value = O.left - P.left + o + a.value.scrollLeft, f.value = O.width - 2 * o;
|
|
655
659
|
}
|
|
656
660
|
}
|
|
657
661
|
}
|
|
658
|
-
function
|
|
659
|
-
const
|
|
660
|
-
r.value =
|
|
662
|
+
function D(y, p) {
|
|
663
|
+
const F = y.value;
|
|
664
|
+
r.value = F, t.emit("update:modelValue", F), S(y), p && t.emit("change", F);
|
|
661
665
|
}
|
|
662
|
-
function
|
|
663
|
-
const
|
|
664
|
-
|
|
666
|
+
function L(y) {
|
|
667
|
+
const p = n.value.findIndex((F) => F.value === y);
|
|
668
|
+
p > -1 && D(n.value[p], !1);
|
|
665
669
|
}
|
|
666
|
-
A(() => e.modelValue, (
|
|
667
|
-
r.value =
|
|
668
|
-
}), A(() => e.items, async (g) => {
|
|
669
|
-
const m = g.filter((T) => T.show);
|
|
670
|
-
$(m), n.value = m, await fe(), R(r.value), h.value = Array.from(y.values()).reduce((T, O) => (T += O.value.clientWidth, T), 0);
|
|
670
|
+
A(() => e.modelValue, (y) => {
|
|
671
|
+
r.value = y, L(r.value);
|
|
671
672
|
}), Q(async () => {
|
|
672
|
-
|
|
673
|
+
L(r.value), await fe(), c.value = "0.1s ease-out all", h.value = Array.from(b.values()).reduce((y, p) => (y += p.value.clientWidth, y), 0);
|
|
673
674
|
});
|
|
674
|
-
function j(
|
|
675
|
-
|
|
675
|
+
function j(y, p) {
|
|
676
|
+
D(p, !0);
|
|
676
677
|
}
|
|
677
|
-
function B(
|
|
678
|
-
|
|
678
|
+
function B(y, p) {
|
|
679
|
+
b.set(p, y);
|
|
679
680
|
}
|
|
680
|
-
function $(
|
|
681
|
-
Array.from(
|
|
682
|
-
|
|
681
|
+
function $(y) {
|
|
682
|
+
Array.from(b.keys()).forEach((p) => {
|
|
683
|
+
y.find((O) => O.value === p) || b.delete(p);
|
|
683
684
|
});
|
|
684
685
|
}
|
|
685
|
-
function
|
|
686
|
+
function g(y, p) {
|
|
686
687
|
return i(Wt, {
|
|
687
|
-
name:
|
|
688
|
-
value:
|
|
689
|
-
isActive:
|
|
690
|
-
index:
|
|
691
|
-
disabled:
|
|
692
|
-
key:
|
|
688
|
+
name: y.name,
|
|
689
|
+
value: y.value,
|
|
690
|
+
isActive: y.value === r.value,
|
|
691
|
+
index: p,
|
|
692
|
+
disabled: y.disabled,
|
|
693
|
+
key: y.value,
|
|
693
694
|
onMounted: B,
|
|
694
695
|
onActive: j
|
|
695
696
|
}, null);
|
|
696
697
|
}
|
|
697
|
-
return () =>
|
|
698
|
+
return A(() => e.items, async (y) => {
|
|
699
|
+
const p = y.filter((F) => F.show);
|
|
700
|
+
$(p), n.value = p, await fe(), L(r.value), h.value = Array.from(b.values()).reduce((F, O) => (F += O.value.clientWidth, F), 0);
|
|
701
|
+
}), () => i("span", {
|
|
698
702
|
ref: a,
|
|
699
703
|
class: v.value,
|
|
700
704
|
style: s.value
|
|
701
705
|
}, [i("span", {
|
|
702
706
|
class: "f-capsule-pane"
|
|
703
|
-
}, [n.value.map((
|
|
704
|
-
class:
|
|
705
|
-
style:
|
|
707
|
+
}, [n.value.map((y, p) => g(y, p))]), i("small", {
|
|
708
|
+
class: m.value,
|
|
709
|
+
style: w.value
|
|
706
710
|
}, null), i("div", {
|
|
707
711
|
class: "f-capsule-board",
|
|
708
|
-
style:
|
|
712
|
+
style: M.value
|
|
709
713
|
}, null)]);
|
|
710
714
|
}
|
|
711
715
|
}), Ot = /* @__PURE__ */ new Map([
|
|
@@ -802,11 +806,15 @@ const Wt = /* @__PURE__ */ U({
|
|
|
802
806
|
function Ut(e, t, n) {
|
|
803
807
|
return t;
|
|
804
808
|
}
|
|
805
|
-
const
|
|
809
|
+
const De = {
|
|
806
810
|
/** 组件值*/
|
|
807
811
|
modelValue: { type: Boolean, default: !1 },
|
|
808
812
|
/** 禁用 */
|
|
809
|
-
disabled: { type: Boolean },
|
|
813
|
+
disabled: { type: Boolean, default: !1 },
|
|
814
|
+
/**
|
|
815
|
+
* 同disabled
|
|
816
|
+
*/
|
|
817
|
+
readonly: { type: Boolean, default: !1 },
|
|
810
818
|
onBackground: { type: String },
|
|
811
819
|
offBackground: { type: String },
|
|
812
820
|
onColor: { type: String },
|
|
@@ -819,10 +827,10 @@ const Be = {
|
|
|
819
827
|
onModelValueChanged: { type: Function, default: () => {
|
|
820
828
|
} }
|
|
821
829
|
};
|
|
822
|
-
K(
|
|
830
|
+
K(De, qt, Ot, Ut);
|
|
823
831
|
const Xt = /* @__PURE__ */ U({
|
|
824
832
|
name: "FSwitch",
|
|
825
|
-
props:
|
|
833
|
+
props: De,
|
|
826
834
|
emits: ["update:modelValue", "modelValueChanged"],
|
|
827
835
|
setup(e, t) {
|
|
828
836
|
const {
|
|
@@ -833,47 +841,48 @@ const Xt = /* @__PURE__ */ U({
|
|
|
833
841
|
onBackground: c,
|
|
834
842
|
offBackground: d,
|
|
835
843
|
onColor: v,
|
|
836
|
-
offColor: s
|
|
837
|
-
|
|
844
|
+
offColor: s,
|
|
845
|
+
readonly: m
|
|
846
|
+
} = Ke(e), u = l(e.modelValue), f = R(() => ({
|
|
838
847
|
switch: !0,
|
|
839
848
|
"f-cmp-switch": !0,
|
|
840
|
-
checked:
|
|
841
|
-
disabled: n.value,
|
|
849
|
+
checked: u.value,
|
|
850
|
+
disabled: m.value || n.value,
|
|
842
851
|
"switch-large": a.value === "large",
|
|
843
852
|
"switch-medium": a.value === "medium",
|
|
844
853
|
"switch-small": a.value === "small"
|
|
845
|
-
})),
|
|
854
|
+
})), h = R(() => u.value ? {
|
|
846
855
|
outline: "none",
|
|
847
856
|
background: c.value
|
|
848
857
|
} : {
|
|
849
858
|
outline: "none",
|
|
850
859
|
backgroundColor: d.value
|
|
851
|
-
}),
|
|
860
|
+
}), w = R(() => u.value ? {
|
|
852
861
|
background: v.value
|
|
853
862
|
} : {
|
|
854
863
|
backgroundColor: s.value
|
|
855
|
-
}),
|
|
856
|
-
function
|
|
857
|
-
n.value || (
|
|
858
|
-
}
|
|
859
|
-
return A(
|
|
860
|
-
|
|
861
|
-
}), A(() => e.modelValue, (
|
|
862
|
-
|
|
864
|
+
}), M = R(() => (o == null ? void 0 : o.value) || (r == null ? void 0 : r.value));
|
|
865
|
+
function b() {
|
|
866
|
+
m.value || n.value || (u.value = !u.value, t.emit("update:modelValue", u.value));
|
|
867
|
+
}
|
|
868
|
+
return A(u, (S, D) => {
|
|
869
|
+
S !== D && t.emit("modelValueChanged", S);
|
|
870
|
+
}), A(() => e.modelValue, (S, D) => {
|
|
871
|
+
S !== D && (u.value = S);
|
|
863
872
|
}), () => i("span", {
|
|
864
873
|
tabindex: "0",
|
|
865
874
|
role: "button",
|
|
866
|
-
class:
|
|
867
|
-
style:
|
|
868
|
-
onClick:
|
|
869
|
-
}, [
|
|
875
|
+
class: f.value,
|
|
876
|
+
style: h.value,
|
|
877
|
+
onClick: b
|
|
878
|
+
}, [M.value && i("span", {
|
|
870
879
|
class: "switch-pane"
|
|
871
880
|
}, [i("span", {
|
|
872
881
|
class: "switch-label-checked"
|
|
873
882
|
}, [o == null ? void 0 : o.value]), i("span", {
|
|
874
883
|
class: "switch-label-unchecked"
|
|
875
884
|
}, [r == null ? void 0 : r.value])]), i("small", {
|
|
876
|
-
style:
|
|
885
|
+
style: w.value
|
|
877
886
|
}, [t.slots.default && t.slots.default()])]);
|
|
878
887
|
}
|
|
879
888
|
}), Yt = /* @__PURE__ */ U({
|
|
@@ -902,9 +911,9 @@ const Xt = /* @__PURE__ */ U({
|
|
|
902
911
|
value: "EL",
|
|
903
912
|
active: !1
|
|
904
913
|
}]), a = l(e.defaultStates), o = l("MD"), r = l("中等屏幕"), c = l(!0);
|
|
905
|
-
function d(
|
|
914
|
+
function d(m) {
|
|
906
915
|
n.value.forEach((u) => {
|
|
907
|
-
u.active = u.code ===
|
|
916
|
+
u.active = u.code === m, u.active && (o.value = u.code, r.value = u.name, t.emit("screenNameChanged", r.value), t.emit("currentScreenResolutionChanged", o.value));
|
|
908
917
|
});
|
|
909
918
|
}
|
|
910
919
|
function v() {
|
|
@@ -919,7 +928,7 @@ const Xt = /* @__PURE__ */ U({
|
|
|
919
928
|
class: "f-layout-editor-screen-resolution-selector-frame",
|
|
920
929
|
items: n.value,
|
|
921
930
|
modelValue: o.value,
|
|
922
|
-
"onUpdate:modelValue": (
|
|
931
|
+
"onUpdate:modelValue": (m) => o.value = m,
|
|
923
932
|
onChange: d
|
|
924
933
|
}, null);
|
|
925
934
|
}
|
|
@@ -934,7 +943,7 @@ const Xt = /* @__PURE__ */ U({
|
|
|
934
943
|
}, [i(Xt, {
|
|
935
944
|
class: "f-layout-editor-show-switch",
|
|
936
945
|
modelValue: c.value,
|
|
937
|
-
"onUpdate:modelValue": (
|
|
946
|
+
"onUpdate:modelValue": (m) => c.value = m,
|
|
938
947
|
onModelValueChanged: v
|
|
939
948
|
}, null), c.value ? i("div", {
|
|
940
949
|
class: "f-layout-editor-show-switch-label"
|
|
@@ -963,7 +972,7 @@ const Xt = /* @__PURE__ */ U({
|
|
|
963
972
|
props: Qt,
|
|
964
973
|
emits: [],
|
|
965
974
|
setup(e, t) {
|
|
966
|
-
const n = l(e.item), a = l(e.currentScreenResolution), o =
|
|
975
|
+
const n = l(e.item), a = l(e.currentScreenResolution), o = R(() => `col-${n.value[`columnIn${a.value}`]}`);
|
|
967
976
|
return A([() => e.item, () => e.currentScreenResolution], ([r, c], [d, v]) => {
|
|
968
977
|
r !== d && (n.value = r), c !== v && (a.value = c);
|
|
969
978
|
}), () => i("div", {
|
|
@@ -981,32 +990,33 @@ const Xt = /* @__PURE__ */ U({
|
|
|
981
990
|
emits: ["update:twoDimensionalArray"],
|
|
982
991
|
setup(e, t) {
|
|
983
992
|
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.currentArea), r = l(e.twoDimensionalArray), c = l([]);
|
|
984
|
-
A([() => e.currentArea, () => e.switchInStandardMode, () => e.currentScreenResolution], ([u, f, h], [
|
|
985
|
-
u !==
|
|
986
|
-
}), A(() => e.twoDimensionalArray, () => {
|
|
987
|
-
r.value = e.twoDimensionalArray, d();
|
|
988
|
-
}), Q(() => {
|
|
989
|
-
d();
|
|
993
|
+
A([() => e.currentArea, () => e.switchInStandardMode, () => e.currentScreenResolution], ([u, f, h], [w, M, b]) => {
|
|
994
|
+
u !== w && (o.value = u), f !== M && (a.value = f), h !== b && (n.value = h);
|
|
990
995
|
});
|
|
991
|
-
function d() {
|
|
992
|
-
|
|
996
|
+
function d(u, f) {
|
|
997
|
+
const h = [];
|
|
998
|
+
let w = [];
|
|
999
|
+
return u.forEach((M) => {
|
|
1000
|
+
f !== M.componentRow && (f += 1, h.push(w), w = []), w.push(M);
|
|
1001
|
+
}), h.push(w), h;
|
|
993
1002
|
}
|
|
994
1003
|
function v() {
|
|
995
1004
|
const u = [];
|
|
996
1005
|
let f = 1;
|
|
997
1006
|
return c.value.forEach((h) => {
|
|
998
|
-
const
|
|
999
|
-
f +=
|
|
1007
|
+
const w = d(h, f);
|
|
1008
|
+
f += w.length, u.push(w);
|
|
1000
1009
|
}), u;
|
|
1001
1010
|
}
|
|
1002
|
-
function s(
|
|
1003
|
-
|
|
1004
|
-
let b = [];
|
|
1005
|
-
return u.forEach((I) => {
|
|
1006
|
-
f !== I.componentRow && (f += 1, h.push(b), b = []), b.push(I);
|
|
1007
|
-
}), h.push(b), h;
|
|
1011
|
+
function s() {
|
|
1012
|
+
c.value = X(r.value), c.value = v();
|
|
1008
1013
|
}
|
|
1009
|
-
|
|
1014
|
+
A(() => e.twoDimensionalArray, () => {
|
|
1015
|
+
r.value = e.twoDimensionalArray, s();
|
|
1016
|
+
}), Q(() => {
|
|
1017
|
+
s();
|
|
1018
|
+
});
|
|
1019
|
+
function m() {
|
|
1010
1020
|
if (a.value)
|
|
1011
1021
|
return "";
|
|
1012
1022
|
const u = Array.from({
|
|
@@ -1024,17 +1034,17 @@ const Xt = /* @__PURE__ */ U({
|
|
|
1024
1034
|
class: "f-layout-editor-preview f-utils-fill-flex-column"
|
|
1025
1035
|
}, [i("div", {
|
|
1026
1036
|
class: "f-layout-editor-preview-header"
|
|
1027
|
-
}, [q("预览区")]),
|
|
1037
|
+
}, [q("预览区")]), m(), i("div", {
|
|
1028
1038
|
class: "f-layout-editor-preview-view f-utils-overflow-xhya"
|
|
1029
1039
|
}, [i("div", {
|
|
1030
1040
|
class: "f-layout-editor-preview-row-group"
|
|
1031
1041
|
}, [c.value.map((u) => {
|
|
1032
1042
|
var f, h;
|
|
1033
|
-
return ((f = u[0][0]) == null ? void 0 : f.group.toString()) === ((h = o.value[0]) == null ? void 0 : h.id) && u.map((
|
|
1043
|
+
return ((f = u[0][0]) == null ? void 0 : f.group.toString()) === ((h = o.value[0]) == null ? void 0 : h.id) && u.map((w) => i("div", {
|
|
1034
1044
|
class: "f-layout-editor-row"
|
|
1035
|
-
}, [
|
|
1036
|
-
item:
|
|
1037
|
-
"onUpdate:item": (
|
|
1045
|
+
}, [w.map((M) => i(Zt, {
|
|
1046
|
+
item: M,
|
|
1047
|
+
"onUpdate:item": (b) => M = b,
|
|
1038
1048
|
currentScreenResolution: n.value,
|
|
1039
1049
|
switchInStandardMode: a.value
|
|
1040
1050
|
}, null))]));
|
|
@@ -1062,8 +1072,8 @@ function en(e, t) {
|
|
|
1062
1072
|
const n = l(-1), a = l(!1);
|
|
1063
1073
|
function o(u) {
|
|
1064
1074
|
if (u.target.offsetParent) {
|
|
1065
|
-
const f = u.target.offsetParent, h = f.offsetWidth - u.target.offsetWidth / 2 - 4,
|
|
1066
|
-
u.dataTransfer && u.dataTransfer.setDragImage(f, h,
|
|
1075
|
+
const f = u.target.offsetParent, h = f.offsetWidth - u.target.offsetWidth / 2 - 4, w = f.offsetHeight / 2;
|
|
1076
|
+
u.dataTransfer && u.dataTransfer.setDragImage(f, h, w);
|
|
1067
1077
|
}
|
|
1068
1078
|
}
|
|
1069
1079
|
function r(u) {
|
|
@@ -1080,8 +1090,8 @@ function en(e, t) {
|
|
|
1080
1090
|
function d(u) {
|
|
1081
1091
|
const f = e.value.findIndex((h) => h.label === u.label);
|
|
1082
1092
|
if (n.value !== f) {
|
|
1083
|
-
const h = e.value[n.value],
|
|
1084
|
-
|
|
1093
|
+
const h = e.value[n.value], w = e.value;
|
|
1094
|
+
w.splice(n.value, 1), w.splice(f, 0, h), n.value = f, t && t();
|
|
1085
1095
|
}
|
|
1086
1096
|
}
|
|
1087
1097
|
function v(u, f) {
|
|
@@ -1090,14 +1100,14 @@ function en(e, t) {
|
|
|
1090
1100
|
function s(u) {
|
|
1091
1101
|
u.preventDefault(), u.dataTransfer && (u.dataTransfer.dropEffect = "move");
|
|
1092
1102
|
}
|
|
1093
|
-
function
|
|
1103
|
+
function m(u, f) {
|
|
1094
1104
|
f && (f.moving = !1), a.value = !1;
|
|
1095
1105
|
}
|
|
1096
1106
|
return {
|
|
1097
1107
|
dragstart: c,
|
|
1098
1108
|
dragenter: v,
|
|
1099
1109
|
dragover: s,
|
|
1100
|
-
dragend:
|
|
1110
|
+
dragend: m,
|
|
1101
1111
|
isDragging: a
|
|
1102
1112
|
};
|
|
1103
1113
|
}
|
|
@@ -1136,6 +1146,11 @@ const tn = /* @__PURE__ */ new Map([
|
|
|
1136
1146
|
type: "boolean",
|
|
1137
1147
|
default: !1
|
|
1138
1148
|
},
|
|
1149
|
+
enableClear: {
|
|
1150
|
+
description: "",
|
|
1151
|
+
type: "boolean",
|
|
1152
|
+
default: !0
|
|
1153
|
+
},
|
|
1139
1154
|
editable: {
|
|
1140
1155
|
description: "",
|
|
1141
1156
|
type: "boolean",
|
|
@@ -1160,6 +1175,11 @@ const tn = /* @__PURE__ */ new Map([
|
|
|
1160
1175
|
type: "string",
|
|
1161
1176
|
default: ""
|
|
1162
1177
|
},
|
|
1178
|
+
idField: {
|
|
1179
|
+
description: "",
|
|
1180
|
+
type: "string",
|
|
1181
|
+
default: "id"
|
|
1182
|
+
},
|
|
1163
1183
|
valueField: {
|
|
1164
1184
|
description: "",
|
|
1165
1185
|
type: "string",
|
|
@@ -1225,7 +1245,8 @@ const tn = /* @__PURE__ */ new Map([
|
|
|
1225
1245
|
], cn = [
|
|
1226
1246
|
"id",
|
|
1227
1247
|
"appearance",
|
|
1228
|
-
"binding"
|
|
1248
|
+
"binding",
|
|
1249
|
+
"visible"
|
|
1229
1250
|
], dn = {
|
|
1230
1251
|
$schema: nn,
|
|
1231
1252
|
$id: an,
|
|
@@ -1400,7 +1421,7 @@ const Te = {
|
|
|
1400
1421
|
*/
|
|
1401
1422
|
beforeOpen: { type: Function, default: null },
|
|
1402
1423
|
searchOption: {
|
|
1403
|
-
type:
|
|
1424
|
+
type: [Boolean, Function],
|
|
1404
1425
|
default: !1
|
|
1405
1426
|
},
|
|
1406
1427
|
// 搜索启用高亮
|
|
@@ -1423,7 +1444,7 @@ const vn = {
|
|
|
1423
1444
|
onSelectionChange: { type: Function, default: () => {
|
|
1424
1445
|
} },
|
|
1425
1446
|
searchOption: {
|
|
1426
|
-
type:
|
|
1447
|
+
type: [Boolean, Function],
|
|
1427
1448
|
default: !1
|
|
1428
1449
|
},
|
|
1429
1450
|
// 搜索启用高亮
|
|
@@ -1433,7 +1454,7 @@ const vn = {
|
|
|
1433
1454
|
props: vn,
|
|
1434
1455
|
emits: ["selectionChange"],
|
|
1435
1456
|
setup(e, t) {
|
|
1436
|
-
const n = l(), a = l(e.dataSource), o = l([]), r = l(e.separator), c = l(e.width), d = l(e.maxHeight), v = l(String(e.selectedValues).split(r.value)), s =
|
|
1457
|
+
const n = l(), a = l(e.dataSource), o = l([]), r = l(e.separator), c = l(e.width), d = l(e.maxHeight), v = l(String(e.selectedValues).split(r.value)), s = R(() => e.multiSelect), m = R(() => ({
|
|
1437
1458
|
enableSelectRow: !0,
|
|
1438
1459
|
multiSelect: e.multiSelect,
|
|
1439
1460
|
multiSelectMode: "OnCheckAndClick",
|
|
@@ -1444,21 +1465,24 @@ const vn = {
|
|
|
1444
1465
|
A(e.dataSource, () => {
|
|
1445
1466
|
a.value = e.dataSource;
|
|
1446
1467
|
});
|
|
1447
|
-
const u =
|
|
1448
|
-
const
|
|
1449
|
-
return c.value !== void 0 && (
|
|
1468
|
+
const u = R(() => e.enableSearch ? "SearchBar" : "ContentHeader"), f = R(() => {
|
|
1469
|
+
const M = {};
|
|
1470
|
+
return c.value !== void 0 && (M.width = `${c.value}px`), d.value !== void 0 && d.value > 0 && (M.maxHeight = `${d.value}px`), M;
|
|
1450
1471
|
});
|
|
1451
|
-
function h(
|
|
1452
|
-
o.value =
|
|
1472
|
+
function h(M) {
|
|
1473
|
+
o.value = M.map((b) => Object.assign({}, b)), v.value = M.map((b) => b[e.idField]), t.emit("selectionChange", o.value);
|
|
1453
1474
|
}
|
|
1454
|
-
function
|
|
1475
|
+
function w(M) {
|
|
1455
1476
|
if (e.enableHighlightSearch)
|
|
1456
1477
|
return;
|
|
1457
|
-
let
|
|
1458
|
-
|
|
1478
|
+
let b = [];
|
|
1479
|
+
const {
|
|
1480
|
+
searchOption: S
|
|
1481
|
+
} = e;
|
|
1482
|
+
typeof S == "function" ? b = a.value.filter((D) => S(M, D)) : b = a.value.filter((D) => D[e.valueField].indexOf(M) > -1 || D[e.textField].indexOf(M) > -1), n.value.updateDataSource(b);
|
|
1459
1483
|
}
|
|
1460
|
-
return A([() => e.selectedValues], ([
|
|
1461
|
-
v.value =
|
|
1484
|
+
return A([() => e.selectedValues], ([M]) => {
|
|
1485
|
+
v.value = M.split(r.value);
|
|
1462
1486
|
}), () => i("div", {
|
|
1463
1487
|
class: "f-combo-list-container pl-1",
|
|
1464
1488
|
style: f.value
|
|
@@ -1473,21 +1497,21 @@ const vn = {
|
|
|
1473
1497
|
textField: e.textField,
|
|
1474
1498
|
titleField: e.titleField,
|
|
1475
1499
|
multiSelect: e.multiSelect,
|
|
1476
|
-
selection:
|
|
1500
|
+
selection: m.value,
|
|
1477
1501
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1478
1502
|
selectionValues: v.value,
|
|
1479
1503
|
onSelectionChange: h,
|
|
1480
|
-
onAfterSearch:
|
|
1504
|
+
onAfterSearch: w
|
|
1481
1505
|
}, null)]);
|
|
1482
1506
|
}
|
|
1483
1507
|
});
|
|
1484
1508
|
function mn(e) {
|
|
1485
1509
|
const t = l(""), n = l(e.modelValue), a = l(e.data || []), o = l(e.editable);
|
|
1486
1510
|
function r(u) {
|
|
1487
|
-
const f = String(u).split(e.separator), h = f.map((
|
|
1488
|
-
return a.value.filter((
|
|
1489
|
-
const
|
|
1490
|
-
return
|
|
1511
|
+
const f = String(u).split(e.separator), h = f.map((b) => [b, !0]), w = new Map(h);
|
|
1512
|
+
return a.value.filter((b) => w.has(String(b[e.valueField]))).sort((b, S) => {
|
|
1513
|
+
const D = f.indexOf(b[e.valueField]), L = f.indexOf(S[e.valueField]);
|
|
1514
|
+
return D - L;
|
|
1491
1515
|
});
|
|
1492
1516
|
}
|
|
1493
1517
|
function c(u) {
|
|
@@ -1495,8 +1519,8 @@ function mn(e) {
|
|
|
1495
1519
|
t.value = o.value ? f || u : f;
|
|
1496
1520
|
}
|
|
1497
1521
|
function d(u) {
|
|
1498
|
-
const f = u.split(e.separator).map((
|
|
1499
|
-
return a.value.filter((
|
|
1522
|
+
const f = u.split(e.separator).map((w) => [w, !0]), h = new Map(f);
|
|
1523
|
+
return a.value.filter((w) => h.has(w[e.textField]));
|
|
1500
1524
|
}
|
|
1501
1525
|
function v(u) {
|
|
1502
1526
|
const f = {};
|
|
@@ -1507,21 +1531,21 @@ function mn(e) {
|
|
|
1507
1531
|
const h = f && f.length > 0;
|
|
1508
1532
|
return o.value && !h && (f = v(u)), f;
|
|
1509
1533
|
}
|
|
1510
|
-
function
|
|
1511
|
-
const { url: u, method: f = "GET", headers: h = {}, body:
|
|
1512
|
-
let
|
|
1513
|
-
fetch(u,
|
|
1514
|
-
var
|
|
1515
|
-
if (
|
|
1516
|
-
return
|
|
1517
|
-
throw new Error(
|
|
1518
|
-
}).then((
|
|
1519
|
-
a.value =
|
|
1520
|
-
}).catch((
|
|
1521
|
-
console.error(
|
|
1534
|
+
function m() {
|
|
1535
|
+
const { url: u, method: f = "GET", headers: h = {}, body: w = null } = e.remote, M = f.toLowerCase() === "get" ? { method: f, headers: h } : { method: f, headers: h, body: w };
|
|
1536
|
+
let b = !1;
|
|
1537
|
+
fetch(u, M).then((S) => {
|
|
1538
|
+
var L, j;
|
|
1539
|
+
if (S.status === 200)
|
|
1540
|
+
return b = !!((j = (L = S.headers) == null ? void 0 : L.get("content-type")) != null && j.includes("application/json")), b ? S.text() : S.json();
|
|
1541
|
+
throw new Error(S.statusText);
|
|
1542
|
+
}).then((S) => {
|
|
1543
|
+
a.value = b ? JSON.parse(S) : S;
|
|
1544
|
+
}).catch((S) => {
|
|
1545
|
+
console.error(S);
|
|
1522
1546
|
});
|
|
1523
1547
|
}
|
|
1524
|
-
return e.remote &&
|
|
1548
|
+
return e.remote && m(), A(() => e.data, () => {
|
|
1525
1549
|
a.value = e.data;
|
|
1526
1550
|
}), A([a], ([u]) => {
|
|
1527
1551
|
if (e.modelValue != null) {
|
|
@@ -1541,35 +1565,35 @@ const hn = /* @__PURE__ */ U({
|
|
|
1541
1565
|
dataSource: d,
|
|
1542
1566
|
displayText: v,
|
|
1543
1567
|
editable: s,
|
|
1544
|
-
modelValue:
|
|
1568
|
+
modelValue: m,
|
|
1545
1569
|
getSelectedItemsByDisplayText: u
|
|
1546
|
-
} = mn(e), f =
|
|
1547
|
-
function
|
|
1570
|
+
} = mn(e), f = R(() => e.multiSelect), h = R(() => n.value ? n.value.elementRef.getBoundingClientRect().width : 0);
|
|
1571
|
+
function w() {
|
|
1548
1572
|
!f.value && n.value && n.value.hidePopup();
|
|
1549
1573
|
}
|
|
1550
|
-
function
|
|
1551
|
-
v.value = B.map(($) => $[e.textField]).join(e.separator), B.length === 1 ?
|
|
1574
|
+
function M(B) {
|
|
1575
|
+
v.value = B.map(($) => $[e.textField]).join(e.separator), B.length === 1 ? m.value = B[0][e.valueField] : m.value = B.map(($) => $[e.valueField]).join(e.separator), t.emit("update:modelValue", m.value), t.emit("change", B, m.value), w();
|
|
1552
1576
|
}
|
|
1553
|
-
function
|
|
1577
|
+
function b() {
|
|
1554
1578
|
c.value || n.value.togglePopup();
|
|
1555
1579
|
}
|
|
1556
|
-
function
|
|
1557
|
-
|
|
1580
|
+
function S(B) {
|
|
1581
|
+
m.value = "", t.emit("update:modelValue", ""), t.emit("clear");
|
|
1558
1582
|
}
|
|
1559
|
-
function
|
|
1583
|
+
function D(B) {
|
|
1560
1584
|
const $ = u(B);
|
|
1561
|
-
|
|
1585
|
+
M($);
|
|
1562
1586
|
}
|
|
1563
|
-
function
|
|
1587
|
+
function L() {
|
|
1564
1588
|
return v.value;
|
|
1565
1589
|
}
|
|
1566
1590
|
function j(B) {
|
|
1567
1591
|
t.emit("input", B);
|
|
1568
1592
|
}
|
|
1569
1593
|
return t.expose({
|
|
1570
|
-
getDisplayText:
|
|
1571
|
-
}), A([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([B, $,
|
|
1572
|
-
a.value = B, s.value = $, o.value =
|
|
1594
|
+
getDisplayText: L
|
|
1595
|
+
}), A([() => e.disabled, () => e.editable, () => e.enableClear, () => e.enableSearch, () => e.readonly], ([B, $, g, y, p]) => {
|
|
1596
|
+
a.value = B, s.value = $, o.value = g, r.value = y, c.value = p;
|
|
1573
1597
|
}), () => i(st, {
|
|
1574
1598
|
ref: n,
|
|
1575
1599
|
id: e.id,
|
|
@@ -1589,9 +1613,9 @@ const hn = /* @__PURE__ */ U({
|
|
|
1589
1613
|
"onUpdate:modelValue": (B) => v.value = B,
|
|
1590
1614
|
focusOnCreated: e.focusOnCreated,
|
|
1591
1615
|
selectOnCreated: e.selectOnCreated,
|
|
1592
|
-
onClear:
|
|
1593
|
-
onClick:
|
|
1594
|
-
onChange:
|
|
1616
|
+
onClear: S,
|
|
1617
|
+
onClick: b,
|
|
1618
|
+
onChange: D,
|
|
1595
1619
|
onInput: j,
|
|
1596
1620
|
beforeOpen: e.beforeOpen
|
|
1597
1621
|
}, {
|
|
@@ -1601,13 +1625,13 @@ const hn = /* @__PURE__ */ U({
|
|
|
1601
1625
|
textField: e.textField,
|
|
1602
1626
|
titleField: e.titleField,
|
|
1603
1627
|
dataSource: d.value,
|
|
1604
|
-
selectedValues:
|
|
1628
|
+
selectedValues: m.value,
|
|
1605
1629
|
multiSelect: e.multiSelect,
|
|
1606
1630
|
enableSearch: r.value,
|
|
1607
1631
|
maxHeight: e.maxHeight,
|
|
1608
1632
|
enableHighlightSearch: e.enableHighlightSearch,
|
|
1609
1633
|
width: e.fitEditor ? h.value : void 0,
|
|
1610
|
-
onSelectionChange:
|
|
1634
|
+
onSelectionChange: M
|
|
1611
1635
|
}, null)]
|
|
1612
1636
|
});
|
|
1613
1637
|
}
|
|
@@ -1627,7 +1651,7 @@ const hn = /* @__PURE__ */ U({
|
|
|
1627
1651
|
function bn(e, t, n) {
|
|
1628
1652
|
return t;
|
|
1629
1653
|
}
|
|
1630
|
-
const wn = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-design.gitee.io/radio-button.schema.json", Cn = "radio-button",
|
|
1654
|
+
const wn = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-design.gitee.io/radio-button.schema.json", Cn = "radio-button", Mn = "A Farris Component", In = "object", xn = {
|
|
1631
1655
|
id: {
|
|
1632
1656
|
description: "The unique identifier for radio-button",
|
|
1633
1657
|
type: "string"
|
|
@@ -1692,15 +1716,15 @@ const wn = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-
|
|
|
1692
1716
|
}, En = [
|
|
1693
1717
|
"id",
|
|
1694
1718
|
"type"
|
|
1695
|
-
],
|
|
1719
|
+
], Bn = {
|
|
1696
1720
|
$schema: wn,
|
|
1697
1721
|
$id: Sn,
|
|
1698
1722
|
title: Cn,
|
|
1699
|
-
description:
|
|
1700
|
-
type:
|
|
1723
|
+
description: Mn,
|
|
1724
|
+
type: In,
|
|
1701
1725
|
properties: xn,
|
|
1702
1726
|
required: En
|
|
1703
|
-
},
|
|
1727
|
+
}, Dn = "radio-button", Tn = "A Farris Component", Ln = "object", Rn = {
|
|
1704
1728
|
basic: {
|
|
1705
1729
|
description: "Basic Infomation",
|
|
1706
1730
|
title: "基本信息",
|
|
@@ -1723,7 +1747,7 @@ const wn = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-
|
|
|
1723
1747
|
}
|
|
1724
1748
|
}
|
|
1725
1749
|
}, Fn = {
|
|
1726
|
-
title:
|
|
1750
|
+
title: Dn,
|
|
1727
1751
|
description: Tn,
|
|
1728
1752
|
type: Ln,
|
|
1729
1753
|
categories: Rn
|
|
@@ -1742,7 +1766,7 @@ const wn = "https://json-schema.org/draft/2020-12/schema", Sn = "https://farris-
|
|
|
1742
1766
|
onSelectedValueChanged: { type: Function, default: () => {
|
|
1743
1767
|
} }
|
|
1744
1768
|
};
|
|
1745
|
-
K(Le,
|
|
1769
|
+
K(Le, Bn, gn, bn, Fn);
|
|
1746
1770
|
const kn = /* @__PURE__ */ U({
|
|
1747
1771
|
name: "FRadioButton",
|
|
1748
1772
|
props: Le,
|
|
@@ -1754,7 +1778,7 @@ const kn = /* @__PURE__ */ U({
|
|
|
1754
1778
|
const {
|
|
1755
1779
|
currentTarget: d
|
|
1756
1780
|
} = r, v = d.parentElement;
|
|
1757
|
-
Array.from(v.querySelectorAll("label")).filter((
|
|
1781
|
+
Array.from(v.querySelectorAll("label")).filter((m) => m !== d).forEach((m) => m.classList.remove("active"));
|
|
1758
1782
|
}
|
|
1759
1783
|
t.emit("selectedValueChanged", c);
|
|
1760
1784
|
}
|
|
@@ -1924,76 +1948,76 @@ const Zn = /* @__PURE__ */ U({
|
|
|
1924
1948
|
props: Re,
|
|
1925
1949
|
emits: ["selectedValue", "update:modelValue"],
|
|
1926
1950
|
setup(e, t) {
|
|
1927
|
-
const n = l(e.size), a = l(e.enableHalf), o = l(e.enableClear), r = l(e.disabled), c = l(e.pointSystem), d = l(e.lightColor), v = l(e.darkColor), s = l(e.iconClass),
|
|
1928
|
-
let
|
|
1929
|
-
const
|
|
1930
|
-
let j = 1, B, $,
|
|
1931
|
-
const
|
|
1951
|
+
const n = l(e.size), a = l(e.enableHalf), o = l(e.enableClear), r = l(e.disabled), c = l(e.pointSystem), d = l(e.lightColor), v = l(e.darkColor), s = l(e.iconClass), m = l(e.numOfStar), u = l(e.toolTipDisabled), f = l(e.toolTipContents), h = l(e.enableScore), w = l(e.enableSatisfaction);
|
|
1952
|
+
let M;
|
|
1953
|
+
const b = l(0), S = l(0), D = l(0), L = l(e.modelValue);
|
|
1954
|
+
let j = 1, B, $, g;
|
|
1955
|
+
const y = 4;
|
|
1932
1956
|
Q(() => {
|
|
1933
1957
|
});
|
|
1934
|
-
function
|
|
1935
|
-
const E =
|
|
1936
|
-
|
|
1958
|
+
function p() {
|
|
1959
|
+
const E = m.value;
|
|
1960
|
+
g = [];
|
|
1937
1961
|
for (let W = 1; W <= E; W++)
|
|
1938
|
-
|
|
1962
|
+
g.push({
|
|
1939
1963
|
id: W
|
|
1940
1964
|
});
|
|
1941
1965
|
}
|
|
1942
|
-
function
|
|
1966
|
+
function F() {
|
|
1943
1967
|
let E;
|
|
1944
|
-
a.value ? E = Math.ceil(
|
|
1968
|
+
a.value ? E = Math.ceil(L.value / j) : E = L.value, S.value = (M * L.value + Math.floor(L.value) * y) / j, B = f.value[E - 1];
|
|
1945
1969
|
}
|
|
1946
1970
|
function O() {
|
|
1947
1971
|
switch (n.value) {
|
|
1948
1972
|
case "small":
|
|
1949
|
-
|
|
1973
|
+
M = 14;
|
|
1950
1974
|
break;
|
|
1951
1975
|
case "middle":
|
|
1952
|
-
|
|
1976
|
+
M = 16;
|
|
1953
1977
|
break;
|
|
1954
1978
|
case "large":
|
|
1955
|
-
|
|
1979
|
+
M = 18;
|
|
1956
1980
|
break;
|
|
1957
1981
|
case "extraLarge":
|
|
1958
|
-
|
|
1982
|
+
M = 24;
|
|
1959
1983
|
break;
|
|
1960
1984
|
}
|
|
1961
|
-
|
|
1985
|
+
p(), m.value && (j = c.value / m.value), L.value && F();
|
|
1962
1986
|
}
|
|
1963
1987
|
O();
|
|
1964
1988
|
function P(E) {
|
|
1965
1989
|
return E.className.indexOf("f-icon") !== -1;
|
|
1966
1990
|
}
|
|
1967
1991
|
function Y() {
|
|
1968
|
-
return
|
|
1992
|
+
return b.value === S.value && o.value && S.value !== 0 ? (S.value = 0, L.value = 0, $ = null, b.value = 0, D.value = 0, t.emit("selectedValue", L.value), t.emit("update:modelValue", L.value), !0) : !1;
|
|
1969
1993
|
}
|
|
1970
|
-
function
|
|
1994
|
+
function T(E, W, H) {
|
|
1971
1995
|
if (E.movementX || E.movementY) {
|
|
1972
1996
|
if (r.value)
|
|
1973
1997
|
return;
|
|
1974
|
-
|
|
1998
|
+
w.value && (B = f.value[W - 1]), E.offsetX < M / 2 && a.value === !0 ? (b.value = M * W - M / 2 + y * (W - 1), D.value = j * W - j / 2) : (b.value = M * W + y * (W - 1), D.value = j * W);
|
|
1975
1999
|
}
|
|
1976
2000
|
if (H === !0) {
|
|
1977
2001
|
if (Y())
|
|
1978
2002
|
return;
|
|
1979
|
-
|
|
2003
|
+
L.value = D.value, S.value = b.value, $ = B, t.emit("update:modelValue", L.value), t.emit("selectedValue", L.value);
|
|
1980
2004
|
}
|
|
1981
2005
|
}
|
|
1982
2006
|
function k(E, W) {
|
|
1983
2007
|
var H;
|
|
1984
2008
|
if (P(E.target) && E.target) {
|
|
1985
2009
|
const te = parseInt((H = E.target) == null ? void 0 : H.id);
|
|
1986
|
-
|
|
2010
|
+
T(E, te, W);
|
|
1987
2011
|
}
|
|
1988
2012
|
}
|
|
1989
|
-
const z =
|
|
1990
|
-
width: (
|
|
2013
|
+
const z = R(() => D.value ? D.value + "分" : L.value + "分"), I = R(() => ({
|
|
2014
|
+
width: (b.value || S.value) + "px"
|
|
1991
2015
|
}));
|
|
1992
2016
|
function x() {
|
|
1993
|
-
|
|
2017
|
+
b.value = 0;
|
|
1994
2018
|
}
|
|
1995
2019
|
return A(() => e.modelValue, (E) => {
|
|
1996
|
-
|
|
2020
|
+
L.value = E, F();
|
|
1997
2021
|
}), () => i("div", {
|
|
1998
2022
|
class: "farris-star-rating",
|
|
1999
2023
|
onMouseover: le((E) => k(E, !1), ["prevent"]),
|
|
@@ -2002,8 +2026,8 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2002
2026
|
onClick: le((E) => k(E, !0), ["prevent"])
|
|
2003
2027
|
}, [i("div", {
|
|
2004
2028
|
class: "star-light-area",
|
|
2005
|
-
style:
|
|
2006
|
-
}, [
|
|
2029
|
+
style: I.value
|
|
2030
|
+
}, [g.map((E) => i("span", {
|
|
2007
2031
|
class: ["f-icon default-light-color ", s.value, {
|
|
2008
2032
|
"f-star-sm": n.value === "small"
|
|
2009
2033
|
}, {
|
|
@@ -2027,7 +2051,7 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2027
2051
|
}, {
|
|
2028
2052
|
large: n.value === "large"
|
|
2029
2053
|
}]
|
|
2030
|
-
}, [
|
|
2054
|
+
}, [g.map((E) => i("span", {
|
|
2031
2055
|
class: ["f-icon default-dark-color", s.value, {
|
|
2032
2056
|
"f-star-sm": n.value === "small"
|
|
2033
2057
|
}, {
|
|
@@ -2051,7 +2075,7 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2051
2075
|
}, {
|
|
2052
2076
|
"font-exlarge": n.value === "extraLarge"
|
|
2053
2077
|
}]
|
|
2054
|
-
}, [h.value && i("span", null, [q(" "), z.value, q(" ")]),
|
|
2078
|
+
}, [h.value && i("span", null, [q(" "), z.value, q(" ")]), w.value && ($ || B) && i("span", null, [q(" "), B || $])])]);
|
|
2055
2079
|
}
|
|
2056
2080
|
}), _n = /* @__PURE__ */ U({
|
|
2057
2081
|
name: "FColumnWidthEditor",
|
|
@@ -2063,29 +2087,29 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2063
2087
|
MD: ["1", "2"],
|
|
2064
2088
|
LG: ["1", "2", "3", "4"],
|
|
2065
2089
|
EL: ["1", "2", "3", "4", "5", "6"]
|
|
2066
|
-
}, a = l(e.currentScreenResolution), o = l(e.field), r = l(e.switchInStandardMode), c = l(), d = l(""), v = l(), s = l("customize"),
|
|
2090
|
+
}, a = l(e.currentScreenResolution), o = l(e.field), r = l(e.switchInStandardMode), c = l(), d = l(""), v = l(), s = l("customize"), m = l(), u = Se("ResponseLayoutEditorDraggableComposition"), {
|
|
2067
2091
|
dragstart: f,
|
|
2068
2092
|
dragenter: h,
|
|
2069
|
-
dragover:
|
|
2070
|
-
dragend:
|
|
2093
|
+
dragover: w,
|
|
2094
|
+
dragend: M
|
|
2071
2095
|
} = u;
|
|
2072
|
-
function
|
|
2073
|
-
c.value = n == null ? void 0 : n[a.value], r.value ? (d.value = `displayWidthIn${a.value}`, s.value = `${o.value[d.value]}`) : (d.value = `columnIn${a.value}`,
|
|
2096
|
+
function b() {
|
|
2097
|
+
c.value = n == null ? void 0 : n[a.value], r.value ? (d.value = `displayWidthIn${a.value}`, s.value = `${o.value[d.value]}`) : (d.value = `columnIn${a.value}`, m.value = o.value[d.value]);
|
|
2074
2098
|
}
|
|
2075
|
-
function
|
|
2099
|
+
function S(p) {
|
|
2076
2100
|
if (r.value === !0) {
|
|
2077
|
-
const
|
|
2078
|
-
v.value =
|
|
2101
|
+
const F = Number(p == null ? void 0 : p.text);
|
|
2102
|
+
v.value = F;
|
|
2079
2103
|
const O = o.value[`columnIn${a.value}`] / o.value[`displayWidthIn${a.value}`];
|
|
2080
|
-
o.value[`columnIn${a.value}`] =
|
|
2104
|
+
o.value[`columnIn${a.value}`] = F * O, o.value[`displayWidthIn${a.value}`] = Number(F), t.emit("fieldChanged", o.value);
|
|
2081
2105
|
}
|
|
2082
2106
|
}
|
|
2083
|
-
function
|
|
2084
|
-
|
|
2085
|
-
const
|
|
2086
|
-
o.value[`columnIn${a.value}`] =
|
|
2107
|
+
function D(p) {
|
|
2108
|
+
m.value = p;
|
|
2109
|
+
const F = o.value[`columnIn${a.value}`] / o.value[`displayWidthIn${a.value}`];
|
|
2110
|
+
o.value[`columnIn${a.value}`] = m.value, o.value[`displayWidthIn${a.value}`] = m.value / F, t.emit("fieldChanged", o.value);
|
|
2087
2111
|
}
|
|
2088
|
-
function
|
|
2112
|
+
function L() {
|
|
2089
2113
|
return i(Zn, {
|
|
2090
2114
|
enableHalf: !0,
|
|
2091
2115
|
size: "extraLarge",
|
|
@@ -2094,37 +2118,37 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2094
2118
|
lightColor: "#5D89FE",
|
|
2095
2119
|
darkColor: "#e7e9f3",
|
|
2096
2120
|
iconClass: "f-icon-column-rectangle",
|
|
2097
|
-
modelValue:
|
|
2098
|
-
"onUpdate:modelValue": (
|
|
2121
|
+
modelValue: m.value,
|
|
2122
|
+
"onUpdate:modelValue": (p) => m.value = p,
|
|
2099
2123
|
enableScore: !1,
|
|
2100
|
-
onSelectedValue: () =>
|
|
2124
|
+
onSelectedValue: () => D(m.value)
|
|
2101
2125
|
}, null);
|
|
2102
2126
|
}
|
|
2103
2127
|
function j() {
|
|
2104
|
-
const
|
|
2128
|
+
const p = [];
|
|
2105
2129
|
c.value = n == null ? void 0 : n[a.value];
|
|
2106
|
-
const
|
|
2130
|
+
const F = o.value[`displayWidthIn${a.value}`];
|
|
2107
2131
|
return c.value.forEach((O) => {
|
|
2108
2132
|
const P = {
|
|
2109
2133
|
text: O,
|
|
2110
|
-
active:
|
|
2134
|
+
active: F.toString() === O
|
|
2111
2135
|
};
|
|
2112
|
-
|
|
2113
|
-
}),
|
|
2136
|
+
p.push(P);
|
|
2137
|
+
}), p;
|
|
2114
2138
|
}
|
|
2115
2139
|
function B() {
|
|
2116
|
-
const
|
|
2140
|
+
const p = j();
|
|
2117
2141
|
return i(kn, {
|
|
2118
|
-
enumData:
|
|
2142
|
+
enumData: p,
|
|
2119
2143
|
suffixValue: "列",
|
|
2120
|
-
onSelectedValueChanged:
|
|
2144
|
+
onSelectedValueChanged: S
|
|
2121
2145
|
}, {
|
|
2122
2146
|
default: () => [q(" ")]
|
|
2123
2147
|
});
|
|
2124
2148
|
}
|
|
2125
2149
|
function $() {
|
|
2126
|
-
var
|
|
2127
|
-
if (((
|
|
2150
|
+
var p;
|
|
2151
|
+
if (((p = o == null ? void 0 : o.value) == null ? void 0 : p.showTopBorder) === 1)
|
|
2128
2152
|
return i("div", {
|
|
2129
2153
|
class: "f-layout-editor-column-width-editor-row"
|
|
2130
2154
|
}, [i("span", {
|
|
@@ -2135,108 +2159,129 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2135
2159
|
class: "f-layout-editor-column-width-editor-row-right"
|
|
2136
2160
|
}, null)]);
|
|
2137
2161
|
}
|
|
2138
|
-
function
|
|
2162
|
+
function g() {
|
|
2139
2163
|
return r.value ? i("div", {
|
|
2140
2164
|
class: "f-column-width-editor-switch-standard"
|
|
2141
2165
|
}, [i("div", {
|
|
2142
2166
|
class: "f-layout-editor-column-width-editor-click-button"
|
|
2143
2167
|
}, [B()])]) : i("div", {
|
|
2144
2168
|
class: "f-column-width-editor-switch-customize",
|
|
2145
|
-
onDragenter: (
|
|
2146
|
-
onDragend: (
|
|
2147
|
-
onDragover: (
|
|
2169
|
+
onDragenter: (p) => h(p, o.value),
|
|
2170
|
+
onDragend: (p) => M(p, o.value),
|
|
2171
|
+
onDragover: (p) => w(p)
|
|
2148
2172
|
}, [i("div", {
|
|
2149
2173
|
class: "f-layout-editor-column-width-editor-rectangle"
|
|
2150
|
-
}, [
|
|
2174
|
+
}, [L(), i("div", {
|
|
2151
2175
|
class: "f-layout-editor-rate-show-column"
|
|
2152
|
-
}, [
|
|
2176
|
+
}, [m.value, q("列")]), i("span", {
|
|
2153
2177
|
class: "f-layout-editor-drag-handler f-icon f-icon-drag-vertical",
|
|
2154
2178
|
draggable: "true",
|
|
2155
|
-
onDragstart: (
|
|
2179
|
+
onDragstart: (p) => f(p, o.value)
|
|
2156
2180
|
}, null)])]);
|
|
2157
2181
|
}
|
|
2158
|
-
function
|
|
2159
|
-
var
|
|
2182
|
+
function y() {
|
|
2183
|
+
var p;
|
|
2160
2184
|
return i("div", {
|
|
2161
2185
|
class: "f-layout-editor-column-width-editor-component"
|
|
2162
2186
|
}, [i("div", {
|
|
2163
2187
|
class: "f-layout-editor-column-width-editor-label"
|
|
2164
|
-
}, [(
|
|
2188
|
+
}, [(p = o == null ? void 0 : o.value) == null ? void 0 : p.label]), g()]);
|
|
2165
2189
|
}
|
|
2166
|
-
return A(() => [e.field, e.switchInStandardMode, e.currentScreenResolution], ([
|
|
2167
|
-
O !==
|
|
2190
|
+
return A(() => [e.field, e.switchInStandardMode, e.currentScreenResolution], ([p, F, O], [P, Y, T]) => {
|
|
2191
|
+
O !== T && (a.value = O, c.value = n[a.value], b()), F !== Y && (r.value = F), r.value === !1 && b(), p !== P && (o.value = p);
|
|
2168
2192
|
}), Q(() => {
|
|
2169
|
-
|
|
2193
|
+
b();
|
|
2170
2194
|
}), () => i("div", {
|
|
2171
2195
|
class: "f-layout-editor-column-width-editor"
|
|
2172
|
-
}, [$(),
|
|
2196
|
+
}, [$(), y()]);
|
|
2173
2197
|
}
|
|
2174
2198
|
}), Kn = /* @__PURE__ */ U({
|
|
2175
2199
|
name: "FFieldList",
|
|
2176
2200
|
props: Kt,
|
|
2177
2201
|
emits: ["update:currentArea", "twoDimensionalArrayChanged", "originalDataChanged"],
|
|
2178
2202
|
setup(e, t) {
|
|
2179
|
-
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.originalData), r = l(e.originalDataCopy), c = l(e.defaultStates), d = l(""), v = l([]), s = l(e.currentArea),
|
|
2180
|
-
function
|
|
2181
|
-
|
|
2182
|
-
let D = y();
|
|
2183
|
-
for (let z = 0; z < D.length; z++) {
|
|
2184
|
-
const M = {
|
|
2185
|
-
id: (k = D[z]) == null ? void 0 : k.toString(),
|
|
2186
|
-
label: "区域" + D[z]
|
|
2187
|
-
};
|
|
2188
|
-
v.value.push(M);
|
|
2189
|
-
}
|
|
2190
|
-
w();
|
|
2191
|
-
}
|
|
2192
|
-
function y() {
|
|
2193
|
-
let D = [];
|
|
2203
|
+
const n = l(e.currentScreenResolution), a = l(e.switchInStandardMode), o = l(e.originalData), r = l(e.originalDataCopy), c = l(e.defaultStates), d = l(""), v = l([]), s = l(e.currentArea), m = l(0), u = l(), f = l(0), h = l("1"), w = l([]);
|
|
2204
|
+
function M() {
|
|
2205
|
+
const T = [];
|
|
2194
2206
|
return o.value.forEach((k) => {
|
|
2195
|
-
|
|
2196
|
-
}),
|
|
2207
|
+
T.indexOf(k.group) === -1 && T.push(k.group);
|
|
2208
|
+
}), T;
|
|
2197
2209
|
}
|
|
2198
|
-
function
|
|
2210
|
+
function b() {
|
|
2199
2211
|
h.value = c.value.defaultGroupNumber.toString(), d.value = `区域${h.value}`, s.value = [v.value[Number(h.value) - 1]], t.emit("update:currentArea", s.value);
|
|
2200
2212
|
}
|
|
2201
|
-
function
|
|
2202
|
-
|
|
2213
|
+
function S() {
|
|
2214
|
+
var k;
|
|
2215
|
+
const T = M();
|
|
2216
|
+
for (let z = 0; z < T.length; z++) {
|
|
2217
|
+
const I = {
|
|
2218
|
+
id: (k = T[z]) == null ? void 0 : k.toString(),
|
|
2219
|
+
label: "区域" + T[z]
|
|
2220
|
+
};
|
|
2221
|
+
v.value.push(I);
|
|
2222
|
+
}
|
|
2223
|
+
b();
|
|
2224
|
+
}
|
|
2225
|
+
function D() {
|
|
2226
|
+
let T = [];
|
|
2203
2227
|
u.value = [];
|
|
2204
2228
|
let k = 1;
|
|
2205
2229
|
o.value.forEach((z) => {
|
|
2206
|
-
z.group === k || (k += 1, u.value.push(
|
|
2207
|
-
}), u.value.push(
|
|
2208
|
-
}
|
|
2209
|
-
function R() {
|
|
2210
|
-
u.value[s.value[0].id - 1] = X(b.value);
|
|
2211
|
-
let D = [];
|
|
2212
|
-
f.value = 0, u.value.forEach((k) => {
|
|
2213
|
-
let z = B(k, f.value);
|
|
2214
|
-
D.push(z), f.value = z[z.length - 1].componentRow;
|
|
2215
|
-
}), $(D);
|
|
2216
|
-
}
|
|
2217
|
-
function j() {
|
|
2218
|
-
F();
|
|
2219
|
-
let D = [];
|
|
2220
|
-
return f.value = 0, u.value.forEach((k) => {
|
|
2221
|
-
let z = B(k, f.value);
|
|
2222
|
-
D.push(z), f.value = z[z.length - 1].componentRow;
|
|
2223
|
-
}), t.emit("twoDimensionalArrayChanged", u.value), $(D), o.value;
|
|
2230
|
+
z.group === k || (k += 1, u.value.push(T), T = []), T.push(z);
|
|
2231
|
+
}), u.value.push(T);
|
|
2224
2232
|
}
|
|
2225
|
-
function
|
|
2226
|
-
let
|
|
2227
|
-
return
|
|
2233
|
+
function L(T, k) {
|
|
2234
|
+
let I = 12;
|
|
2235
|
+
return m.value = 1 + k, T.forEach((x) => {
|
|
2228
2236
|
x.showTopBorder = 0;
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
}),
|
|
2237
|
+
const E = x[`columnIn${n.value}`];
|
|
2238
|
+
I >= E ? (x.componentRow = m.value, I -= E) : (m.value += 1, x.componentRow = m.value, I = 12 - E, x.showTopBorder = 1);
|
|
2239
|
+
}), T[0].showTopBorder = 1, T;
|
|
2232
2240
|
}
|
|
2233
|
-
function
|
|
2241
|
+
function j(T) {
|
|
2234
2242
|
let k = [];
|
|
2235
|
-
for (
|
|
2243
|
+
for (const z of T)
|
|
2236
2244
|
k = k.concat(z);
|
|
2237
2245
|
o.value = X(k), f.value = 0;
|
|
2238
2246
|
}
|
|
2239
|
-
function
|
|
2247
|
+
function B() {
|
|
2248
|
+
u.value[s.value[0].id - 1] = X(w.value);
|
|
2249
|
+
const T = [];
|
|
2250
|
+
f.value = 0, u.value.forEach((k) => {
|
|
2251
|
+
const z = L(k, f.value);
|
|
2252
|
+
T.push(z), f.value = z[z.length - 1].componentRow;
|
|
2253
|
+
}), j(T);
|
|
2254
|
+
}
|
|
2255
|
+
function $() {
|
|
2256
|
+
D();
|
|
2257
|
+
const T = [];
|
|
2258
|
+
return f.value = 0, u.value.forEach((k) => {
|
|
2259
|
+
const z = L(k, f.value);
|
|
2260
|
+
T.push(z), f.value = z[z.length - 1].componentRow;
|
|
2261
|
+
}), t.emit("twoDimensionalArrayChanged", u.value), j(T), o.value;
|
|
2262
|
+
}
|
|
2263
|
+
function g() {
|
|
2264
|
+
w.value = [], o.value.forEach((T) => {
|
|
2265
|
+
T.group === Number(s.value[0].id) && w.value.push(T);
|
|
2266
|
+
});
|
|
2267
|
+
}
|
|
2268
|
+
function y() {
|
|
2269
|
+
o.value = X($()), t.emit("originalDataChanged", o.value);
|
|
2270
|
+
}
|
|
2271
|
+
function p(T) {
|
|
2272
|
+
w.value.forEach((k) => {
|
|
2273
|
+
k.label === T.label && Object.assign(k, T);
|
|
2274
|
+
}), B(), y(), g();
|
|
2275
|
+
}
|
|
2276
|
+
function F(T) {
|
|
2277
|
+
for (let k = 0; k < T.length; k++)
|
|
2278
|
+
s.value = [{
|
|
2279
|
+
id: T[k].id,
|
|
2280
|
+
label: T[k].label
|
|
2281
|
+
}];
|
|
2282
|
+
t.emit("update:currentArea", s.value), g(), B();
|
|
2283
|
+
}
|
|
2284
|
+
function O() {
|
|
2240
2285
|
return i("div", {
|
|
2241
2286
|
class: "f-layout-editor-field-list-top"
|
|
2242
2287
|
}, [i("div", {
|
|
@@ -2245,79 +2290,58 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2245
2290
|
class: "f-layout-editor-choose-group"
|
|
2246
2291
|
}, [i(hn, {
|
|
2247
2292
|
modelValue: h.value,
|
|
2248
|
-
"onUpdate:modelValue": (
|
|
2293
|
+
"onUpdate:modelValue": (T) => h.value = T,
|
|
2249
2294
|
placeholder: "当前可编辑组",
|
|
2250
2295
|
enableClear: !1,
|
|
2251
2296
|
"id-field": "id",
|
|
2252
2297
|
"text-field": "label",
|
|
2253
2298
|
data: v.value,
|
|
2254
2299
|
editable: !1,
|
|
2255
|
-
onChange:
|
|
2300
|
+
onChange: F
|
|
2256
2301
|
}, null)])]);
|
|
2257
2302
|
}
|
|
2258
|
-
function
|
|
2303
|
+
function P() {
|
|
2259
2304
|
return i("div", {
|
|
2260
2305
|
class: "f-layout-editor-field-list-content f-utils-overflow-xhya"
|
|
2261
|
-
}, [
|
|
2262
|
-
key:
|
|
2306
|
+
}, [w.value.map((T) => i(_n, {
|
|
2307
|
+
key: T.label,
|
|
2263
2308
|
currentScreenResolution: n.value,
|
|
2264
|
-
field:
|
|
2265
|
-
"onUpdate:field": (k) =>
|
|
2309
|
+
field: T,
|
|
2310
|
+
"onUpdate:field": (k) => T = k,
|
|
2266
2311
|
switchInStandardMode: a.value,
|
|
2267
2312
|
"onUpdate:switchInStandardMode": (k) => a.value = k,
|
|
2268
|
-
onFieldChanged:
|
|
2313
|
+
onFieldChanged: p
|
|
2269
2314
|
}, null))]);
|
|
2270
2315
|
}
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
k.label == D.label && Object.assign(k, D);
|
|
2274
|
-
}), R(), O(), T();
|
|
2275
|
-
}
|
|
2276
|
-
function T() {
|
|
2277
|
-
b.value = [], o.value.forEach((D) => {
|
|
2278
|
-
D.group === Number(s.value[0].id) && b.value.push(D);
|
|
2279
|
-
});
|
|
2280
|
-
}
|
|
2281
|
-
function O() {
|
|
2282
|
-
o.value = X(j()), t.emit("originalDataChanged", o.value);
|
|
2283
|
-
}
|
|
2284
|
-
function P(D) {
|
|
2285
|
-
for (let k = 0; k < D.length; k++)
|
|
2286
|
-
s.value = [{
|
|
2287
|
-
id: D[k].id,
|
|
2288
|
-
label: D[k].label
|
|
2289
|
-
}];
|
|
2290
|
-
t.emit("update:currentArea", s.value), T(), R();
|
|
2291
|
-
}
|
|
2292
|
-
const Y = en(b, () => {
|
|
2293
|
-
R(), O(), T();
|
|
2316
|
+
const Y = en(w, () => {
|
|
2317
|
+
B(), y(), g();
|
|
2294
2318
|
});
|
|
2295
|
-
return et("ResponseLayoutEditorDraggableComposition", Y), A(() => e.currentArea, (
|
|
2296
|
-
|
|
2297
|
-
}), A(s, (
|
|
2298
|
-
|
|
2299
|
-
}), A(() => e.currentGroup, (
|
|
2300
|
-
|
|
2301
|
-
}), A(() => e.currentScreenResolution, (
|
|
2302
|
-
|
|
2303
|
-
}), A(() => e.switchInStandardMode, (
|
|
2304
|
-
|
|
2305
|
-
}), A(c, (
|
|
2306
|
-
|
|
2319
|
+
return et("ResponseLayoutEditorDraggableComposition", Y), A(() => e.currentArea, (T, k) => {
|
|
2320
|
+
T !== k && (s.value = e.currentArea, g());
|
|
2321
|
+
}), A(s, (T, k) => {
|
|
2322
|
+
T !== k && g();
|
|
2323
|
+
}), A(() => e.currentGroup, (T, k) => {
|
|
2324
|
+
T !== k && (d.value = e.currentGroup);
|
|
2325
|
+
}), A(() => e.currentScreenResolution, (T, k) => {
|
|
2326
|
+
T !== k && (n.value = e.currentScreenResolution, y(), D(), s.value[0] && (w.value = X(u.value[Number(s.value[0].id) - 1])));
|
|
2327
|
+
}), A(() => e.switchInStandardMode, (T, k) => {
|
|
2328
|
+
T !== k && (a.value = e.switchInStandardMode, o.value = X(r.value));
|
|
2329
|
+
}), A(c, (T, k) => {
|
|
2330
|
+
T !== k && y();
|
|
2307
2331
|
}), ve(() => {
|
|
2308
|
-
|
|
2332
|
+
S(), $(), g();
|
|
2309
2333
|
}), () => i("div", {
|
|
2310
2334
|
class: "f-layout-editor-field-list f-utils-fill-flex-column"
|
|
2311
2335
|
}, [a.value ? (
|
|
2312
2336
|
/* 标准模式 */
|
|
2313
2337
|
i("div", {
|
|
2314
2338
|
class: "f-layout-editor-field-list-standard f-utils-fill-flex-column"
|
|
2315
|
-
}, [
|
|
2339
|
+
}, [O(), P()])
|
|
2316
2340
|
) : (
|
|
2317
2341
|
/* 自定义模式 */
|
|
2318
2342
|
i("div", {
|
|
2319
2343
|
class: "f-layout-editor-field-list-customize f-utils-fill-flex-column"
|
|
2320
|
-
}, [
|
|
2344
|
+
}, [O(), P()])
|
|
2321
2345
|
)]);
|
|
2322
2346
|
}
|
|
2323
2347
|
}), ie = /* @__PURE__ */ U({
|
|
@@ -2328,31 +2352,31 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2328
2352
|
const n = l(e.initialState), a = l(), o = l(), r = l(""), c = l(""), d = l(!0), v = l([{
|
|
2329
2353
|
id: "1",
|
|
2330
2354
|
label: "区域1"
|
|
2331
|
-
}]), s = l([]),
|
|
2332
|
-
A(() => e.initialState, (
|
|
2333
|
-
n.value =
|
|
2334
|
-
}), A([() => e.currentArea, () => e.switchInStandardMode], ([
|
|
2335
|
-
|
|
2355
|
+
}]), s = l([]), m = l(), u = l(e.width), f = l(e.height);
|
|
2356
|
+
A(() => e.initialState, (p) => {
|
|
2357
|
+
n.value = p;
|
|
2358
|
+
}), A([() => e.currentArea, () => e.switchInStandardMode], ([p, F], [O, P]) => {
|
|
2359
|
+
p !== O && (v.value = p), F !== P && (d.value = F);
|
|
2336
2360
|
});
|
|
2337
|
-
function h(
|
|
2338
|
-
r.value =
|
|
2361
|
+
function h(p) {
|
|
2362
|
+
r.value = p;
|
|
2339
2363
|
}
|
|
2340
|
-
function
|
|
2341
|
-
c.value =
|
|
2364
|
+
function w(p) {
|
|
2365
|
+
c.value = p;
|
|
2342
2366
|
}
|
|
2343
|
-
function
|
|
2344
|
-
d.value =
|
|
2367
|
+
function M(p) {
|
|
2368
|
+
d.value = p;
|
|
2345
2369
|
}
|
|
2346
|
-
function
|
|
2347
|
-
v.value = [].concat(
|
|
2370
|
+
function b(p) {
|
|
2371
|
+
v.value = [].concat(p);
|
|
2348
2372
|
}
|
|
2349
|
-
function
|
|
2350
|
-
a.value = X(
|
|
2373
|
+
function S(p) {
|
|
2374
|
+
a.value = X(p);
|
|
2351
2375
|
}
|
|
2352
|
-
function
|
|
2353
|
-
s.value =
|
|
2376
|
+
function D(p) {
|
|
2377
|
+
s.value = p;
|
|
2354
2378
|
}
|
|
2355
|
-
function
|
|
2379
|
+
function L() {
|
|
2356
2380
|
t.emit("close");
|
|
2357
2381
|
}
|
|
2358
2382
|
function j() {
|
|
@@ -2362,36 +2386,36 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2362
2386
|
return i(Kn, {
|
|
2363
2387
|
class: "f-utils-fill-flex-column",
|
|
2364
2388
|
defaultStates: o.value,
|
|
2365
|
-
originalDataCopy:
|
|
2389
|
+
originalDataCopy: m.value,
|
|
2366
2390
|
currentScreenResolution: c.value,
|
|
2367
|
-
"onUpdate:currentScreenResolution": (
|
|
2391
|
+
"onUpdate:currentScreenResolution": (p) => c.value = p,
|
|
2368
2392
|
originalData: a.value,
|
|
2369
|
-
"onUpdate:originalData": (
|
|
2393
|
+
"onUpdate:originalData": (p) => a.value = p,
|
|
2370
2394
|
switchInStandardMode: d.value,
|
|
2371
|
-
"onUpdate:switchInStandardMode": (
|
|
2395
|
+
"onUpdate:switchInStandardMode": (p) => d.value = p,
|
|
2372
2396
|
currentArea: v.value,
|
|
2373
|
-
"onUpdate:currentArea": (
|
|
2374
|
-
onCurrentAreaChanged:
|
|
2375
|
-
onTwoDimensionalArrayChanged:
|
|
2376
|
-
onOriginalDataChanged:
|
|
2397
|
+
"onUpdate:currentArea": (p) => v.value = p,
|
|
2398
|
+
onCurrentAreaChanged: b,
|
|
2399
|
+
onTwoDimensionalArrayChanged: D,
|
|
2400
|
+
onOriginalDataChanged: S
|
|
2377
2401
|
}, null);
|
|
2378
2402
|
}
|
|
2379
2403
|
function $() {
|
|
2380
2404
|
return i(_t, {
|
|
2381
2405
|
class: "f-utils-fill-flex-column",
|
|
2382
2406
|
currentArea: v.value,
|
|
2383
|
-
"onUpdate:currentArea": (
|
|
2407
|
+
"onUpdate:currentArea": (p) => v.value = p,
|
|
2384
2408
|
currentScreenResolution: c.value,
|
|
2385
|
-
"onUpdate:currentScreenResolution": (
|
|
2409
|
+
"onUpdate:currentScreenResolution": (p) => c.value = p,
|
|
2386
2410
|
switchInStandardMode: d.value,
|
|
2387
2411
|
twoDimensionalArray: s.value,
|
|
2388
|
-
"onUpdate:twoDimensionalArray": (
|
|
2412
|
+
"onUpdate:twoDimensionalArray": (p) => s.value = p
|
|
2389
2413
|
}, null);
|
|
2390
2414
|
}
|
|
2391
|
-
const
|
|
2415
|
+
const g = R(() => d.value ? "f-layout-editor-left-standard f-utils-fill-flex-column" : "f-layout-editor-left-customize f-utils-fill-flex-column"), y = R(() => d.value ? "f-layout-editor-right-standard f-utils-fill-flex-column" : "f-layout-editor-right-customize f-utils-fill-flex-column");
|
|
2392
2416
|
return ve(() => {
|
|
2393
|
-
a.value = X(n.value.importData),
|
|
2394
|
-
}), (
|
|
2417
|
+
a.value = X(n.value.importData), m.value = X(n.value.importData), o.value = n.value.defaultState, r.value = "中等屏幕", c.value = "MD";
|
|
2418
|
+
}), (p) => i("div", {
|
|
2395
2419
|
class: "f-layout-editor f-utils-flex-column",
|
|
2396
2420
|
style: "height:" + f.value + "px;width:" + u.value + "px;"
|
|
2397
2421
|
}, [i("div", {
|
|
@@ -2399,25 +2423,25 @@ const Zn = /* @__PURE__ */ U({
|
|
|
2399
2423
|
}, [i(Yt, {
|
|
2400
2424
|
defaultStates: o.value,
|
|
2401
2425
|
onScreenNameChanged: h,
|
|
2402
|
-
onCurrentScreenResolutionChanged:
|
|
2403
|
-
onSwitchInStandardModeChanged:
|
|
2426
|
+
onCurrentScreenResolutionChanged: w,
|
|
2427
|
+
onSwitchInStandardModeChanged: M
|
|
2404
2428
|
}, null)]), i("div", {
|
|
2405
2429
|
class: "f-layout-editor-content f-utils-fill"
|
|
2406
2430
|
}, [i("div", {
|
|
2407
2431
|
class: "f-layout-editor-left f-utils-fill-flex-column"
|
|
2408
2432
|
}, [i("div", {
|
|
2409
|
-
class:
|
|
2433
|
+
class: g.value
|
|
2410
2434
|
}, [B()])]), i("div", {
|
|
2411
2435
|
class: "f-layout-editor-right f-utils-fill-flex-column"
|
|
2412
2436
|
}, [i("div", {
|
|
2413
|
-
class:
|
|
2437
|
+
class: y.value
|
|
2414
2438
|
}, [$()])])]), i("div", {
|
|
2415
2439
|
class: "f-layout-editor-bottom"
|
|
2416
2440
|
}, [i("div", {
|
|
2417
2441
|
class: "f-layout-editor-button"
|
|
2418
2442
|
}, [i("div", {
|
|
2419
2443
|
class: "f-layout-editor-cancel-btn",
|
|
2420
|
-
onClick:
|
|
2444
|
+
onClick: L
|
|
2421
2445
|
}, [i("span", {
|
|
2422
2446
|
class: "f-layout-editor-text-cancel"
|
|
2423
2447
|
}, [q("取消")])]), i("div", {
|
|
@@ -2664,20 +2688,20 @@ class _ {
|
|
|
2664
2688
|
}
|
|
2665
2689
|
}
|
|
2666
2690
|
function ga(e, t) {
|
|
2667
|
-
const n = l(), a = l(), o = l(), r = l(), c = l(), d = l(), v = l(), s = l(),
|
|
2668
|
-
function
|
|
2669
|
-
const
|
|
2691
|
+
const n = l(), a = l(), o = l(), r = l(), c = l(), d = l(), v = l(), s = l(), m = l(), u = l(), f = l(), h = l(), w = l(e.draggable), M = l(!1);
|
|
2692
|
+
function b() {
|
|
2693
|
+
const I = a.value || document.body, x = window.getComputedStyle(I);
|
|
2670
2694
|
if (!x || !n.value)
|
|
2671
2695
|
return;
|
|
2672
2696
|
const E = G.getTransformInfo(n.value), W = {};
|
|
2673
2697
|
v.value && (W.deltaL = n.value.offsetLeft - v.value.x, W.deltaT = n.value.offsetTop - v.value.y);
|
|
2674
2698
|
const H = x.getPropertyValue("position");
|
|
2675
|
-
W.width =
|
|
2699
|
+
W.width = I.clientWidth, W.height = I.clientHeight, W.pr = parseInt(x.getPropertyValue("padding-right"), 10), W.pb = parseInt(x.getPropertyValue("padding-bottom"), 10), W.position = x.getPropertyValue("position"), H === "static" && (I.style.position = "relative"), W.translateX = E.x, W.translateY = E.y, u.value = W;
|
|
2676
2700
|
}
|
|
2677
|
-
function
|
|
2701
|
+
function S(I) {
|
|
2678
2702
|
if (n.value) {
|
|
2679
|
-
r.value = _.getCurrent(n.value), c.value = G.getCurrent(n.value), d.value = r.value ? _.copy(r.value) : null, v.value = c.value ? G.copy(c.value) : null,
|
|
2680
|
-
const x =
|
|
2703
|
+
r.value = _.getCurrent(n.value), c.value = G.getCurrent(n.value), d.value = r.value ? _.copy(r.value) : null, v.value = c.value ? G.copy(c.value) : null, b();
|
|
2704
|
+
const x = I.target.getAttribute("type") || "";
|
|
2681
2705
|
s.value = {
|
|
2682
2706
|
n: !!x.match(/n/),
|
|
2683
2707
|
s: !!x.match(/s/),
|
|
@@ -2686,50 +2710,50 @@ function ga(e, t) {
|
|
|
2686
2710
|
};
|
|
2687
2711
|
}
|
|
2688
2712
|
}
|
|
2689
|
-
function
|
|
2690
|
-
var
|
|
2713
|
+
function D() {
|
|
2714
|
+
var I, x, E, W;
|
|
2691
2715
|
if (n.value) {
|
|
2692
2716
|
const H = n.value;
|
|
2693
|
-
s.value && ((s.value.n || s.value.s) && ((
|
|
2717
|
+
s.value && ((s.value.n || s.value.s) && ((I = d.value) != null && I.height) && (H.style.height = d.value.height + "px"), (s.value.w || s.value.e) && ((x = d.value) != null && x.width) && (H.style.width = d.value.width + "px"), v.value && ((E = v.value) != null && E.x && (H.style.left = v.value.x + "px"), (W = v.value) != null && W.y && (H.style.top = v.value.y + "px")));
|
|
2694
2718
|
}
|
|
2695
2719
|
}
|
|
2696
|
-
function
|
|
2697
|
-
const
|
|
2698
|
-
d.value && v.value && s.value && r.value && (d.value.height <
|
|
2720
|
+
function L() {
|
|
2721
|
+
const I = e.minHeight ? e.minHeight : 1, x = e.minWidth ? e.minWidth : 1;
|
|
2722
|
+
d.value && v.value && s.value && r.value && (d.value.height < I && (d.value.height = I, s.value.n && c.value && (v.value.y = c.value.y + (r.value.height - I))), d.value.width < x && (d.value.width = x, s.value.w && c.value && (v.value.x = c.value.x + (r.value.width - x))), e.maxHeight && d.value.height > e.maxHeight && (d.value.height = e.maxHeight, c.value && s.value.n && (v.value.y = c.value.y + (r.value.height - e.maxHeight))), e.maxWidth && d.value.width > e.maxWidth && (d.value.width = e.maxWidth, s.value.w && c.value && (v.value.x = c.value.x + (r.value.width - e.maxWidth))));
|
|
2699
2723
|
}
|
|
2700
2724
|
function j() {
|
|
2701
2725
|
if (a.value) {
|
|
2702
|
-
const
|
|
2726
|
+
const I = u.value;
|
|
2703
2727
|
if (v.value && d.value && s.value && r.value) {
|
|
2704
|
-
const x =
|
|
2705
|
-
s.value.n && v.value.y +
|
|
2728
|
+
const x = I.width - I.pr - I.deltaL - I.translateX - v.value.x, E = I.height - I.pb - I.deltaT - I.translateY - v.value.y;
|
|
2729
|
+
s.value.n && v.value.y + I.translateY < 0 && c.value && (v.value.y = -I.translateY, d.value.height = r.value.height + c.value.y + I.translateY), s.value.w && v.value.x + I.translateX < 0 && c.value && (v.value.x = -I.translateX, d.value.width = r.value.width + c.value.x + I.translateX), d.value.width > x && (d.value.width = x), d.value.height > E && (d.value.height = E);
|
|
2706
2730
|
}
|
|
2707
2731
|
}
|
|
2708
2732
|
}
|
|
2709
|
-
function B(
|
|
2733
|
+
function B(I) {
|
|
2710
2734
|
if (!o.value || !r.value || !c.value || !s.value)
|
|
2711
2735
|
return;
|
|
2712
|
-
|
|
2713
|
-
const x =
|
|
2714
|
-
s.value.n ? (v.value.y = c.value.y + E, d.value.height = r.value.height - E) : s.value.s && (d.value.height = r.value.height + E), s.value.e ? d.value.width = r.value.width + x : s.value.w && (d.value.width = r.value.width - x, v.value.x = c.value.x + x), j(),
|
|
2736
|
+
I.subtract(o.value);
|
|
2737
|
+
const x = I.x, E = I.y;
|
|
2738
|
+
s.value.n ? (v.value.y = c.value.y + E, d.value.height = r.value.height - E) : s.value.s && (d.value.height = r.value.height + E), s.value.e ? d.value.width = r.value.width + x : s.value.w && (d.value.width = r.value.width - x, v.value.x = c.value.x + x), j(), L(), D();
|
|
2715
2739
|
}
|
|
2716
|
-
function $(
|
|
2717
|
-
if (!
|
|
2740
|
+
function $(I) {
|
|
2741
|
+
if (!m.value)
|
|
2718
2742
|
return;
|
|
2719
|
-
const x = G.fromEvent(
|
|
2743
|
+
const x = G.fromEvent(I);
|
|
2720
2744
|
x && B(x);
|
|
2721
2745
|
}
|
|
2722
|
-
function
|
|
2746
|
+
function g() {
|
|
2723
2747
|
if (n.value) {
|
|
2724
2748
|
const {
|
|
2725
|
-
width:
|
|
2749
|
+
width: I,
|
|
2726
2750
|
height: x,
|
|
2727
2751
|
x: E,
|
|
2728
2752
|
y: W
|
|
2729
2753
|
} = n.value.getBoundingClientRect(), H = G.getTransformInfo(n.value);
|
|
2730
2754
|
return {
|
|
2731
2755
|
size: {
|
|
2732
|
-
width:
|
|
2756
|
+
width: I,
|
|
2733
2757
|
height: x
|
|
2734
2758
|
},
|
|
2735
2759
|
position: {
|
|
@@ -2740,66 +2764,66 @@ function ga(e, t) {
|
|
|
2740
2764
|
}
|
|
2741
2765
|
return null;
|
|
2742
2766
|
}
|
|
2743
|
-
function
|
|
2767
|
+
function y(I) {
|
|
2744
2768
|
if (n.value) {
|
|
2745
|
-
const x =
|
|
2769
|
+
const x = g();
|
|
2746
2770
|
f.value = x;
|
|
2747
2771
|
}
|
|
2748
|
-
o.value = void 0, r.value = null, c.value = null, d.value = null, v.value = null, s.value = null,
|
|
2772
|
+
o.value = void 0, r.value = null, c.value = null, d.value = null, v.value = null, s.value = null, m.value = null, document.removeEventListener("mousemove", $), document.removeEventListener("mouseup", y);
|
|
2749
2773
|
}
|
|
2750
|
-
function
|
|
2751
|
-
document.addEventListener("mousemove", $), document.addEventListener("mouseup",
|
|
2774
|
+
function p() {
|
|
2775
|
+
document.addEventListener("mousemove", $), document.addEventListener("mouseup", y);
|
|
2752
2776
|
}
|
|
2753
|
-
function
|
|
2754
|
-
|
|
2777
|
+
function F(I) {
|
|
2778
|
+
I instanceof MouseEvent && I.button === 2 || w.value && (I.stopPropagation(), I.preventDefault(), o.value = G.fromEvent(I), m.value = I.target, S(I), p());
|
|
2755
2779
|
}
|
|
2756
|
-
function O(
|
|
2757
|
-
return n.value =
|
|
2780
|
+
function O(I) {
|
|
2781
|
+
return n.value = I, i(ue, null, [i("div", {
|
|
2758
2782
|
class: "fv-resizable-handle fv-resizable-n",
|
|
2759
2783
|
type: "n",
|
|
2760
|
-
onMousedown: (x) =>
|
|
2784
|
+
onMousedown: (x) => F(x)
|
|
2761
2785
|
}, null), i("div", {
|
|
2762
2786
|
class: "fv-resizable-handle fv-resizable-e",
|
|
2763
2787
|
type: "e",
|
|
2764
|
-
onMousedown: (x) =>
|
|
2788
|
+
onMousedown: (x) => F(x)
|
|
2765
2789
|
}, null), i("div", {
|
|
2766
2790
|
class: "fv-resizable-handle fv-resizable-s",
|
|
2767
2791
|
type: "s",
|
|
2768
|
-
onMousedown: (x) =>
|
|
2792
|
+
onMousedown: (x) => F(x)
|
|
2769
2793
|
}, null), i("div", {
|
|
2770
2794
|
class: "fv-resizable-handle fv-resizable-w",
|
|
2771
2795
|
type: "w",
|
|
2772
|
-
onMousedown: (x) =>
|
|
2796
|
+
onMousedown: (x) => F(x)
|
|
2773
2797
|
}, null), i("div", {
|
|
2774
2798
|
class: "fv-resizable-handle fv-resizable-ne",
|
|
2775
2799
|
type: "ne",
|
|
2776
|
-
onMousedown: (x) =>
|
|
2800
|
+
onMousedown: (x) => F(x)
|
|
2777
2801
|
}, null), i("div", {
|
|
2778
2802
|
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
2779
2803
|
type: "se",
|
|
2780
|
-
onMousedown: (x) =>
|
|
2804
|
+
onMousedown: (x) => F(x)
|
|
2781
2805
|
}, null), i("div", {
|
|
2782
2806
|
class: "fv-resizable-handle fv-resizable-sw",
|
|
2783
2807
|
type: "sw",
|
|
2784
|
-
onMousedown: (x) =>
|
|
2808
|
+
onMousedown: (x) => F(x)
|
|
2785
2809
|
}, null), i("div", {
|
|
2786
2810
|
class: "fv-resizable-handle fv-resizable-nw",
|
|
2787
2811
|
type: "nw",
|
|
2788
|
-
onMousedown: (x) =>
|
|
2812
|
+
onMousedown: (x) => F(x)
|
|
2789
2813
|
}, null)]);
|
|
2790
2814
|
}
|
|
2791
|
-
function P(
|
|
2815
|
+
function P(I = !0) {
|
|
2792
2816
|
const x = a.value || document.body, E = _.getCurrent(x), W = n.value;
|
|
2793
|
-
|
|
2817
|
+
I && (h.value = g(), h.value.transform = W.style.transform), E && W && (d.value = E, W.style.height = d.value.height - 14 + "px", W.style.width = d.value.width - 14 + "px", W.style.left = "7px", W.style.top = "7px", W.style.transform = "", f.value = {
|
|
2794
2818
|
size: d.value,
|
|
2795
2819
|
position: {
|
|
2796
2820
|
x: 0,
|
|
2797
2821
|
y: 0
|
|
2798
2822
|
}
|
|
2799
|
-
},
|
|
2823
|
+
}, w.value = !1, M.value = !0);
|
|
2800
2824
|
}
|
|
2801
2825
|
function Y() {
|
|
2802
|
-
var
|
|
2826
|
+
var I, x;
|
|
2803
2827
|
if (h.value) {
|
|
2804
2828
|
const E = {
|
|
2805
2829
|
width: h.value.size.width || 0,
|
|
@@ -2808,32 +2832,32 @@ function ga(e, t) {
|
|
|
2808
2832
|
x: (window.innerWidth - E.width) / 2,
|
|
2809
2833
|
y: (window.innerHeight - E.height) / 2
|
|
2810
2834
|
};
|
|
2811
|
-
(
|
|
2835
|
+
(I = d.value) == null || I.set(E), (x = v.value) == null || x.set(W);
|
|
2812
2836
|
const H = n.value;
|
|
2813
2837
|
H.style.height = E.height + "px", H.style.width = E.width + "px", H.style.left = `${W.x}px`, H.style.top = `${W.y}px`, H.style.transform = "", f.value = {
|
|
2814
2838
|
size: E,
|
|
2815
2839
|
position: W
|
|
2816
|
-
},
|
|
2840
|
+
}, w.value = e.draggable, M.value = !1;
|
|
2817
2841
|
}
|
|
2818
2842
|
}
|
|
2819
|
-
function
|
|
2843
|
+
function T() {
|
|
2820
2844
|
if (n.value) {
|
|
2821
|
-
const
|
|
2822
|
-
if (
|
|
2845
|
+
const I = _.getCurrent(n.value);
|
|
2846
|
+
if (I) {
|
|
2823
2847
|
const {
|
|
2824
2848
|
width: x,
|
|
2825
2849
|
height: E
|
|
2826
|
-
} =
|
|
2850
|
+
} = I;
|
|
2827
2851
|
n.value.style.left = `${(window.innerWidth - x) / 2}px`, n.value.style.top = `${(window.innerHeight - E) / 2}px`, n.value.style.transform = "";
|
|
2828
2852
|
}
|
|
2829
2853
|
}
|
|
2830
2854
|
}
|
|
2831
2855
|
function k() {
|
|
2832
|
-
const
|
|
2833
|
-
|
|
2856
|
+
const I = () => {
|
|
2857
|
+
M.value ? P(!1) : T();
|
|
2834
2858
|
};
|
|
2835
|
-
return window.addEventListener("resize",
|
|
2836
|
-
window.removeEventListener("resize",
|
|
2859
|
+
return window.addEventListener("resize", I), () => {
|
|
2860
|
+
window.removeEventListener("resize", I);
|
|
2837
2861
|
};
|
|
2838
2862
|
}
|
|
2839
2863
|
const z = k();
|
|
@@ -2843,84 +2867,84 @@ function ga(e, t) {
|
|
|
2843
2867
|
resizedEventParam: f,
|
|
2844
2868
|
maximize: P,
|
|
2845
2869
|
restore: Y,
|
|
2846
|
-
allowDrag:
|
|
2847
|
-
isMaximized:
|
|
2870
|
+
allowDrag: w,
|
|
2871
|
+
isMaximized: M,
|
|
2848
2872
|
unWindowResizeHandle: z
|
|
2849
2873
|
};
|
|
2850
2874
|
}
|
|
2851
2875
|
function ba(e, t, n) {
|
|
2852
|
-
const a = l(), o = l(e.draggable), r = l(e.lockAxis), c = l(), d = l(), v = l(!1), s = l(new G(0, 0)),
|
|
2853
|
-
A(() => n.value, (
|
|
2854
|
-
c.value.style.cursor =
|
|
2876
|
+
const a = l(), o = l(e.draggable), r = l(e.lockAxis), c = l(), d = l(), v = l(!1), s = l(new G(0, 0)), m = l(new G(0, 0)), u = l(new G(0, 0)), f = l(new G(0, 0));
|
|
2877
|
+
A(() => n.value, (g) => {
|
|
2878
|
+
c.value.style.cursor = g ? "move" : "default";
|
|
2855
2879
|
});
|
|
2856
|
-
function h(
|
|
2857
|
-
if (
|
|
2880
|
+
function h(g, y) {
|
|
2881
|
+
if (y.tagName === "BUTTON")
|
|
2858
2882
|
return !1;
|
|
2859
|
-
if (
|
|
2883
|
+
if (y === g)
|
|
2860
2884
|
return !0;
|
|
2861
|
-
for (const
|
|
2862
|
-
if (
|
|
2885
|
+
for (const p in y.children)
|
|
2886
|
+
if (Object.prototype.hasOwnProperty.call(y.children, p) && h(g, y.children[p]))
|
|
2863
2887
|
return !0;
|
|
2864
2888
|
return !1;
|
|
2865
2889
|
}
|
|
2866
|
-
function
|
|
2867
|
-
var
|
|
2868
|
-
let
|
|
2869
|
-
r.value === "x" ? (
|
|
2870
|
-
const
|
|
2871
|
-
a.value && (a.value.style.transform =
|
|
2890
|
+
function w() {
|
|
2891
|
+
var F, O;
|
|
2892
|
+
let g = u.value.x + m.value.x, y = u.value.y + m.value.y;
|
|
2893
|
+
r.value === "x" ? (g = ((F = s.value) == null ? void 0 : F.x) || 0, u.value.x = 0) : r.value === "y" && (y = ((O = s.value) == null ? void 0 : O.y) || 0, u.value.y = 0);
|
|
2894
|
+
const p = `translate3d(${Math.round(g)}px, ${Math.round(y)}px, 0px)`;
|
|
2895
|
+
a.value && (a.value.style.transform = p), f.value.x = g, f.value.y = y;
|
|
2872
2896
|
}
|
|
2873
|
-
function
|
|
2897
|
+
function M() {
|
|
2874
2898
|
if (!d.value || !a.value)
|
|
2875
2899
|
return null;
|
|
2876
|
-
const
|
|
2877
|
-
top:
|
|
2878
|
-
right:
|
|
2879
|
-
bottom:
|
|
2880
|
-
left:
|
|
2900
|
+
const g = d.value.getBoundingClientRect(), y = a.value.getBoundingClientRect(), p = {
|
|
2901
|
+
top: g.top < y.top,
|
|
2902
|
+
right: g.right > y.right,
|
|
2903
|
+
bottom: g.bottom > y.bottom,
|
|
2904
|
+
left: g.left < y.left
|
|
2881
2905
|
};
|
|
2882
|
-
return
|
|
2906
|
+
return p.top || (u.value.y -= y.top - g.top), p.bottom || (u.value.y -= y.bottom - g.bottom), p.right || (u.value.x -= y.right - g.right), p.left || (u.value.x -= y.left - g.left), w(), p;
|
|
2883
2907
|
}
|
|
2884
|
-
function
|
|
2885
|
-
|
|
2908
|
+
function b(g) {
|
|
2909
|
+
g && (s.value && g.subtract(s.value), u.value.set(g), w(), M());
|
|
2886
2910
|
}
|
|
2887
|
-
function
|
|
2888
|
-
v.value && o.value && (
|
|
2911
|
+
function S(g) {
|
|
2912
|
+
v.value && o.value && (g.stopPropagation(), g.preventDefault(), b(G.fromEvent(g, c.value)));
|
|
2889
2913
|
}
|
|
2890
|
-
function
|
|
2891
|
-
var
|
|
2892
|
-
v.value && (v.value = !1,
|
|
2914
|
+
function D() {
|
|
2915
|
+
var g;
|
|
2916
|
+
v.value && (v.value = !1, m.value.add(u.value), u.value.reset(), (g = a.value) == null || g.classList.remove("ng-dragging"), document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", D));
|
|
2893
2917
|
}
|
|
2894
|
-
function
|
|
2895
|
-
!v.value && c.value && (v.value = !0, c.value.classList.add("ng-dragging"), document.addEventListener("mousemove",
|
|
2918
|
+
function L() {
|
|
2919
|
+
!v.value && c.value && (v.value = !0, c.value.classList.add("ng-dragging"), document.addEventListener("mousemove", S), document.addEventListener("mouseup", D));
|
|
2896
2920
|
}
|
|
2897
2921
|
function j() {
|
|
2898
2922
|
if (a.value) {
|
|
2899
|
-
const
|
|
2900
|
-
|
|
2923
|
+
const g = G.getTransformInfo(a.value);
|
|
2924
|
+
m.value.set(g);
|
|
2901
2925
|
return;
|
|
2902
2926
|
}
|
|
2903
|
-
|
|
2927
|
+
m.value.reset();
|
|
2904
2928
|
}
|
|
2905
|
-
function B(
|
|
2906
|
-
if (!n.value ||
|
|
2929
|
+
function B(g) {
|
|
2930
|
+
if (!n.value || g instanceof MouseEvent && g.button === 2)
|
|
2907
2931
|
return;
|
|
2908
|
-
const
|
|
2909
|
-
c.value !== void 0 &&
|
|
2932
|
+
const y = g.target || g.srcElement;
|
|
2933
|
+
c.value !== void 0 && y && !h(y, c.value) || o.value !== !1 && (document.body.click(), g.stopPropagation(), g.preventDefault(), s.value = G.fromEvent(g, a.value), j(), L());
|
|
2910
2934
|
}
|
|
2911
|
-
function $(
|
|
2912
|
-
if (o.value &&
|
|
2913
|
-
if (
|
|
2914
|
-
c.value =
|
|
2935
|
+
function $(g, y, p) {
|
|
2936
|
+
if (o.value && y) {
|
|
2937
|
+
if (g)
|
|
2938
|
+
c.value = g;
|
|
2915
2939
|
else if (e.dragHandle) {
|
|
2916
2940
|
if (e.dragHandle instanceof HTMLElement)
|
|
2917
2941
|
c.value = e.dragHandle;
|
|
2918
2942
|
else if (typeof e.dragHandle == "string") {
|
|
2919
|
-
const
|
|
2920
|
-
|
|
2943
|
+
const F = y.querySelector(e.dragHandle);
|
|
2944
|
+
F && (c.value = F);
|
|
2921
2945
|
}
|
|
2922
2946
|
}
|
|
2923
|
-
a.value =
|
|
2947
|
+
a.value = y, d.value = p, c.value.classList.add("ng-draggable"), c.value.addEventListener("mousedown", B);
|
|
2924
2948
|
}
|
|
2925
2949
|
}
|
|
2926
2950
|
return {
|
|
@@ -2961,7 +2985,7 @@ const ke = /* @__PURE__ */ U({
|
|
|
2961
2985
|
props: ya,
|
|
2962
2986
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter"],
|
|
2963
2987
|
setup(e, t) {
|
|
2964
|
-
const n = l(e.width || 300), a = l(e.height || 200), o = l(e.modelValue), r = l(""), c = l(e.class), d = l(e.fitContent), v = l(e.showHeader), s = l(""),
|
|
2988
|
+
const n = l(e.width || 300), a = l(e.height || 200), o = l(e.modelValue), r = l(""), c = l(e.class), d = l(e.fitContent), v = l(e.showHeader), s = l(""), m = l(e.showCloseButton), u = l(e.showMaxButton), f = l(!1), h = l(""), w = l(""), M = l(""), b = l(e.showButtons), S = l(e.title), D = l(e.reiszeable), L = l(e.containment || null), j = l();
|
|
2965
2989
|
function B(C, V) {
|
|
2966
2990
|
o.value = !1, t.emit("update:modelValue", !1), V != null && t.emit(V ? "accept" : "cancel"), t.emit("closed", C);
|
|
2967
2991
|
}
|
|
@@ -2979,26 +3003,26 @@ const ke = /* @__PURE__ */ U({
|
|
|
2979
3003
|
handle: (C) => {
|
|
2980
3004
|
B(C, !0);
|
|
2981
3005
|
}
|
|
2982
|
-
}],
|
|
3006
|
+
}], g = l(e.buttons && e.buttons.length ? e.buttons : $), y = R(() => !!s.value), p = R(() => !!b.value && !!g.value), F = l(), O = l(), P = l(!1), {
|
|
2983
3007
|
renderResizeBar: Y,
|
|
2984
|
-
maximize:
|
|
3008
|
+
maximize: T,
|
|
2985
3009
|
restore: k,
|
|
2986
3010
|
boundingElement: z,
|
|
2987
|
-
resizedEventParam:
|
|
3011
|
+
resizedEventParam: I,
|
|
2988
3012
|
allowDrag: x,
|
|
2989
3013
|
unWindowResizeHandle: E
|
|
2990
3014
|
} = ga(e), {
|
|
2991
3015
|
registerDraggle: W
|
|
2992
3016
|
} = ba(e, t, x);
|
|
2993
3017
|
A(() => e.title, (C, V) => {
|
|
2994
|
-
C !== V && (
|
|
3018
|
+
C !== V && (S.value = C);
|
|
2995
3019
|
}), A(() => e.modelValue, (C, V) => {
|
|
2996
3020
|
C !== V && (o.value = C);
|
|
2997
3021
|
}), A(() => e.showHeader, (C, V) => {
|
|
2998
3022
|
C !== V && (v.value = C);
|
|
2999
3023
|
}), A(() => e.showButtons, (C, V) => {
|
|
3000
|
-
C !== V && (
|
|
3001
|
-
}), A(() =>
|
|
3024
|
+
C !== V && (b.value = C);
|
|
3025
|
+
}), A(() => I.value, (C, V) => {
|
|
3002
3026
|
const ne = C || {}, ae = V || {};
|
|
3003
3027
|
JSON.stringify(ne) !== JSON.stringify(ae) && t.emit("resize", {
|
|
3004
3028
|
newSize: C,
|
|
@@ -3009,47 +3033,47 @@ const ke = /* @__PURE__ */ U({
|
|
|
3009
3033
|
const C = document.querySelectorAll(".farris-modal").length;
|
|
3010
3034
|
(!C || C - 1 <= 0) && document.body.classList.remove("modal-open"), j.value && j.value.classList.remove("show");
|
|
3011
3035
|
}
|
|
3012
|
-
const te =
|
|
3036
|
+
const te = R(() => (o.value ? document.body.classList.add("modal-open") : H(), o.value)), $e = R(() => {
|
|
3013
3037
|
const C = {
|
|
3014
3038
|
modal: !0,
|
|
3015
3039
|
"farris-modal": !0,
|
|
3016
3040
|
fade: !0
|
|
3017
3041
|
};
|
|
3018
3042
|
return C["f-modal-fitContent"] = !!d.value, C.show = !!te.value, C;
|
|
3019
|
-
}), Oe =
|
|
3043
|
+
}), Oe = R(() => {
|
|
3020
3044
|
var ne;
|
|
3021
3045
|
const C = {
|
|
3022
3046
|
"modal-dialog": !0
|
|
3023
3047
|
}, V = (ne = c.value) == null ? void 0 : ne.split(" ");
|
|
3024
3048
|
return V == null || V.reduce((ae, Qe) => (ae[Qe] = !0, ae), C), C;
|
|
3025
|
-
}), Ae =
|
|
3049
|
+
}), Ae = R(() => ({
|
|
3026
3050
|
position: "absolute",
|
|
3027
3051
|
top: `${(window.innerHeight - a.value) / 2}px`,
|
|
3028
3052
|
left: `${(window.innerWidth - n.value) / 2}px`,
|
|
3029
3053
|
width: `${n.value}px`,
|
|
3030
3054
|
height: d.value ? "auto" : `${a.value}px`
|
|
3031
|
-
})), je =
|
|
3055
|
+
})), je = R(() => ({
|
|
3032
3056
|
"modal-content": !0,
|
|
3033
3057
|
"modal-content-has-header": v.value
|
|
3034
|
-
})), Ve =
|
|
3058
|
+
})), Ve = R(() => {
|
|
3035
3059
|
const C = {
|
|
3036
3060
|
display: v.value ? "" : "none"
|
|
3037
3061
|
};
|
|
3038
3062
|
return C["pointer-events"] = x.value ? "auto" : "none", C;
|
|
3039
|
-
}), ze =
|
|
3063
|
+
}), ze = R(() => ({
|
|
3040
3064
|
"f-icon": !0,
|
|
3041
3065
|
modal_maximize: !0,
|
|
3042
3066
|
modalrevert: P.value
|
|
3043
|
-
})), He =
|
|
3067
|
+
})), He = R(() => ({
|
|
3044
3068
|
"modal-body": !0,
|
|
3045
3069
|
"f-utils-flex-column": h.value === "iframe"
|
|
3046
3070
|
}));
|
|
3047
3071
|
function Ne() {
|
|
3048
3072
|
return {};
|
|
3049
3073
|
}
|
|
3050
|
-
const Pe =
|
|
3074
|
+
const Pe = R(() => {
|
|
3051
3075
|
const C = {
|
|
3052
|
-
textAlgin:
|
|
3076
|
+
textAlgin: M.value
|
|
3053
3077
|
}, V = Ne();
|
|
3054
3078
|
return Object.assign(C, V);
|
|
3055
3079
|
});
|
|
@@ -3058,17 +3082,17 @@ const ke = /* @__PURE__ */ U({
|
|
|
3058
3082
|
P.value = !1, k();
|
|
3059
3083
|
return;
|
|
3060
3084
|
}
|
|
3061
|
-
|
|
3085
|
+
T(), P.value = !0;
|
|
3062
3086
|
}
|
|
3063
3087
|
async function Ge(C, V) {
|
|
3064
3088
|
C.handle && await C.handle(V, C) && t.emit("closed", V);
|
|
3065
3089
|
}
|
|
3066
3090
|
function qe(C) {
|
|
3067
|
-
C.width && (n.value = C.width), C.height && (a.value = C.height), C.buttons && (
|
|
3091
|
+
C.width && (n.value = C.width), C.height && (a.value = C.height), C.buttons && (g.value = C.buttons), C.title && (S.value = C.title);
|
|
3068
3092
|
}
|
|
3069
3093
|
let se = null, re = null;
|
|
3070
3094
|
Q(() => {
|
|
3071
|
-
O.value && !
|
|
3095
|
+
O.value && !L.value && (L.value = O.value.parentElement, z.value = L.value, W(F.value, O.value, z.value)), te.value && document.body.classList.add("modal-open"), se = wa(e, t), re = Sa(e, t);
|
|
3072
3096
|
}), Ce(() => {
|
|
3073
3097
|
H(), E && E(), se && se.remove(), re && re.remove();
|
|
3074
3098
|
}), t.expose({
|
|
@@ -3088,7 +3112,7 @@ const ke = /* @__PURE__ */ U({
|
|
|
3088
3112
|
style: "pointer-events: auto;"
|
|
3089
3113
|
}, [i("span", {
|
|
3090
3114
|
class: ze.value
|
|
3091
|
-
}, null)]),
|
|
3115
|
+
}, null)]), m.value && i("li", {
|
|
3092
3116
|
class: "f-btn-icon f-bare",
|
|
3093
3117
|
onClick: (C) => B(C, !1),
|
|
3094
3118
|
style: "pointer-events: auto;"
|
|
@@ -3100,7 +3124,7 @@ const ke = /* @__PURE__ */ U({
|
|
|
3100
3124
|
return i("div", {
|
|
3101
3125
|
class: "modal-footer",
|
|
3102
3126
|
style: Pe.value
|
|
3103
|
-
}, [
|
|
3127
|
+
}, [g.value && g.value.map((C) => i("button", {
|
|
3104
3128
|
name: C.name,
|
|
3105
3129
|
type: "button",
|
|
3106
3130
|
class: C.class + (C.iconClass ? " btn-icontext" : ""),
|
|
@@ -3113,17 +3137,17 @@ const ke = /* @__PURE__ */ U({
|
|
|
3113
3137
|
}
|
|
3114
3138
|
function Ye() {
|
|
3115
3139
|
return i("div", {
|
|
3116
|
-
ref:
|
|
3140
|
+
ref: F,
|
|
3117
3141
|
class: "modal-header",
|
|
3118
3142
|
style: Ve.value
|
|
3119
3143
|
}, [i("div", {
|
|
3120
3144
|
class: "modal-title"
|
|
3121
|
-
}, [
|
|
3145
|
+
}, [y.value && i("span", {
|
|
3122
3146
|
class: s.value,
|
|
3123
3147
|
style: "margin-right: 8px"
|
|
3124
3148
|
}, null), i("span", {
|
|
3125
3149
|
class: "modal-title-label"
|
|
3126
|
-
}, [
|
|
3150
|
+
}, [S.value])]), i("div", {
|
|
3127
3151
|
class: "actions"
|
|
3128
3152
|
}, [Ue()])]);
|
|
3129
3153
|
}
|
|
@@ -3158,8 +3182,8 @@ const ke = /* @__PURE__ */ U({
|
|
|
3158
3182
|
class: "f-utils-fill",
|
|
3159
3183
|
width: "100%",
|
|
3160
3184
|
frameborder: "0",
|
|
3161
|
-
src:
|
|
3162
|
-
}, null)]),
|
|
3185
|
+
src: w.value
|
|
3186
|
+
}, null)]), p.value && Xe()]), !d.value && D.value && O.value && Y(O.value)])])];
|
|
3163
3187
|
}
|
|
3164
3188
|
})]
|
|
3165
3189
|
});
|
|
@@ -3179,12 +3203,12 @@ function Ca(e) {
|
|
|
3179
3203
|
Ce(() => {
|
|
3180
3204
|
document.body.removeChild(t);
|
|
3181
3205
|
});
|
|
3182
|
-
const r = l(), c = l(e.class || ""), d = l(!!e.showButtons), v = l(!!e.showHeader), s = l(e.showCloseButton == null ? !0 : e.showCloseButton),
|
|
3206
|
+
const r = l(), c = l(e.class || ""), d = l(!!e.showButtons), v = l(!!e.showHeader), s = l(e.showCloseButton == null ? !0 : e.showCloseButton), m = l(!0), u = l(e.title || ""), f = e.acceptCallback || (() => {
|
|
3183
3207
|
}), h = e.rejectCallback || (() => {
|
|
3184
|
-
}),
|
|
3185
|
-
}),
|
|
3186
|
-
}),
|
|
3187
|
-
|
|
3208
|
+
}), w = e.closedCallback || ((D) => {
|
|
3209
|
+
}), M = e.resizeHandle || ((D) => {
|
|
3210
|
+
}), b = We(e), S = (D) => {
|
|
3211
|
+
m.value = !1, n.unmount(), w(D);
|
|
3188
3212
|
};
|
|
3189
3213
|
return Q(() => {
|
|
3190
3214
|
}), o.expose({
|
|
@@ -3192,8 +3216,8 @@ function Ca(e) {
|
|
|
3192
3216
|
}), () => i(ke, {
|
|
3193
3217
|
ref: r,
|
|
3194
3218
|
class: c.value,
|
|
3195
|
-
modelValue:
|
|
3196
|
-
"onUpdate:modelValue": (
|
|
3219
|
+
modelValue: m.value,
|
|
3220
|
+
"onUpdate:modelValue": (D) => m.value = D,
|
|
3197
3221
|
title: u.value,
|
|
3198
3222
|
width: e.width,
|
|
3199
3223
|
height: e.height,
|
|
@@ -3205,10 +3229,10 @@ function Ca(e) {
|
|
|
3205
3229
|
onAccept: f,
|
|
3206
3230
|
onCancel: h,
|
|
3207
3231
|
fitContent: e.fitContent == null ? !0 : e.fitContent,
|
|
3208
|
-
onClosed:
|
|
3209
|
-
onResize:
|
|
3232
|
+
onClosed: S,
|
|
3233
|
+
onResize: M
|
|
3210
3234
|
}, {
|
|
3211
|
-
default: () => [
|
|
3235
|
+
default: () => [b && b(n)]
|
|
3212
3236
|
});
|
|
3213
3237
|
}
|
|
3214
3238
|
});
|
|
@@ -3221,8 +3245,8 @@ class he {
|
|
|
3221
3245
|
N(this, "activeModalIndex", l(0));
|
|
3222
3246
|
N(this, "modalRefs", {});
|
|
3223
3247
|
N(this, "isUseEscCloseModal", l(!1));
|
|
3224
|
-
N(this, "activeModalInstance",
|
|
3225
|
-
this.appContext = t ? t._context : null;
|
|
3248
|
+
N(this, "activeModalInstance", R(() => this.modalRefs[this.activeModalIndex.value]));
|
|
3249
|
+
this.app = t, this.appContext = t ? t._context : null;
|
|
3226
3250
|
}
|
|
3227
3251
|
getCurrentModal() {
|
|
3228
3252
|
return this.activeModalInstance.value;
|
|
@@ -3244,30 +3268,30 @@ class he {
|
|
|
3244
3268
|
showHeader: !0
|
|
3245
3269
|
}, t)), o = l(!0), r = a.value.acceptCallback || (() => {
|
|
3246
3270
|
}), c = a.value.rejectCallback || (() => {
|
|
3247
|
-
}), d = a.value.closedCallback || ((
|
|
3248
|
-
}), v = a.value.resizeHandle || ((
|
|
3271
|
+
}), d = a.value.closedCallback || ((S, D) => {
|
|
3272
|
+
}), v = a.value.resizeHandle || ((S) => {
|
|
3249
3273
|
});
|
|
3250
3274
|
let s;
|
|
3251
|
-
const
|
|
3252
|
-
var
|
|
3275
|
+
const m = We(a.value), u = (S) => {
|
|
3276
|
+
var L;
|
|
3253
3277
|
o.value = !1;
|
|
3254
|
-
const
|
|
3255
|
-
d(
|
|
3256
|
-
}, f = (
|
|
3257
|
-
u(
|
|
3278
|
+
const D = (L = S == null ? void 0 : S.target) == null ? void 0 : L.classList.contains("modal_close");
|
|
3279
|
+
d(S, this.isUseEscCloseModal.value ? "esc" : D ? "icon" : "button");
|
|
3280
|
+
}, f = (S) => {
|
|
3281
|
+
u(S), s && fe(() => {
|
|
3258
3282
|
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], ce(null, n), s = null, this.modalRef.value = null, this.modalRefs) {
|
|
3259
|
-
const
|
|
3260
|
-
|
|
3283
|
+
const D = Object.keys(this.modalRefs).map((L) => Number(L));
|
|
3284
|
+
D.length > 0 ? this.activeModalIndex.value = Math.max(...D) : this.activeModalIndex.value = 0;
|
|
3261
3285
|
}
|
|
3262
3286
|
this.isUseEscCloseModal.value = !1;
|
|
3263
3287
|
});
|
|
3264
|
-
}, h = (
|
|
3265
|
-
var
|
|
3266
|
-
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((
|
|
3267
|
-
},
|
|
3288
|
+
}, h = (S) => {
|
|
3289
|
+
var D;
|
|
3290
|
+
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((D = this.activeModalInstance.value) == null || D.close(S == null ? void 0 : S.event));
|
|
3291
|
+
}, w = () => i(ke, Me({
|
|
3268
3292
|
ref: this.modalRef,
|
|
3269
3293
|
modelValue: o.value,
|
|
3270
|
-
"onUpdate:modelValue": (
|
|
3294
|
+
"onUpdate:modelValue": (S) => o.value = S
|
|
3271
3295
|
}, a.value, {
|
|
3272
3296
|
onAccept: r,
|
|
3273
3297
|
onCancel: c,
|
|
@@ -3275,19 +3299,19 @@ class he {
|
|
|
3275
3299
|
onResize: v,
|
|
3276
3300
|
onEsc: h
|
|
3277
3301
|
}), {
|
|
3278
|
-
default: () => [
|
|
3302
|
+
default: () => [m && m(this.app)]
|
|
3279
3303
|
});
|
|
3280
|
-
return s = ((
|
|
3281
|
-
const
|
|
3282
|
-
return
|
|
3304
|
+
return s = ((S) => {
|
|
3305
|
+
const D = ot(w, S);
|
|
3306
|
+
return D.appContext = this.appContext, ce(D, n), D;
|
|
3283
3307
|
})({
|
|
3284
3308
|
...a.value
|
|
3285
3309
|
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
3286
3310
|
}), this.activeModalIndex.value++, this.modalRefs[this.activeModalIndex.value] = this.modalRef.value, {
|
|
3287
|
-
update: (
|
|
3311
|
+
update: (S) => {
|
|
3288
3312
|
a.value = {
|
|
3289
3313
|
...a.value,
|
|
3290
|
-
...
|
|
3314
|
+
...S
|
|
3291
3315
|
}, s && ce(it(s, {
|
|
3292
3316
|
...a
|
|
3293
3317
|
}), n);
|
|
@@ -3297,86 +3321,93 @@ class he {
|
|
|
3297
3321
|
};
|
|
3298
3322
|
}
|
|
3299
3323
|
}
|
|
3300
|
-
function
|
|
3324
|
+
function Ma(e, t, n) {
|
|
3301
3325
|
var j;
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
const o = "", r = "", c = l();
|
|
3305
|
-
function d() {
|
|
3326
|
+
const a = "", o = "", r = l();
|
|
3327
|
+
function c() {
|
|
3306
3328
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
3307
3329
|
}
|
|
3308
|
-
function
|
|
3330
|
+
function d() {
|
|
3309
3331
|
return !1;
|
|
3310
3332
|
}
|
|
3311
|
-
function
|
|
3333
|
+
function v() {
|
|
3312
3334
|
return (t == null ? void 0 : t.schema.componentType) !== "frame";
|
|
3313
3335
|
}
|
|
3314
|
-
function
|
|
3336
|
+
function s() {
|
|
3315
3337
|
return (t == null ? void 0 : t.schema.componentType) === "frame";
|
|
3316
3338
|
}
|
|
3317
|
-
function
|
|
3339
|
+
function m(B) {
|
|
3318
3340
|
if (!B || !B.value)
|
|
3319
3341
|
return null;
|
|
3320
3342
|
if (B.value.schema && B.value.schema.type === "component")
|
|
3321
3343
|
return B.value;
|
|
3322
|
-
const $ = l(B == null ? void 0 : B.value.parent),
|
|
3323
|
-
return
|
|
3344
|
+
const $ = l(B == null ? void 0 : B.value.parent), g = m($);
|
|
3345
|
+
return g || null;
|
|
3324
3346
|
}
|
|
3325
|
-
function
|
|
3326
|
-
const { componentInstance: $, designerItemElementRef:
|
|
3327
|
-
return !$ || !$.value ? null : $.value.canMove ?
|
|
3347
|
+
function u(B = t) {
|
|
3348
|
+
const { componentInstance: $, designerItemElementRef: g } = B;
|
|
3349
|
+
return !$ || !$.value ? null : $.value.canMove ? g : u(B.parent);
|
|
3328
3350
|
}
|
|
3329
|
-
function
|
|
3351
|
+
function f(B) {
|
|
3330
3352
|
return !!n;
|
|
3331
3353
|
}
|
|
3332
|
-
function
|
|
3354
|
+
function h() {
|
|
3333
3355
|
return (t == null ? void 0 : t.schema.label) || (t == null ? void 0 : t.schema.title) || (t == null ? void 0 : t.schema.name);
|
|
3334
3356
|
}
|
|
3335
|
-
function
|
|
3357
|
+
function w() {
|
|
3336
3358
|
}
|
|
3337
|
-
function
|
|
3359
|
+
function M(B, $) {
|
|
3338
3360
|
}
|
|
3339
|
-
function
|
|
3340
|
-
const { componentType:
|
|
3341
|
-
let
|
|
3342
|
-
const
|
|
3343
|
-
return
|
|
3361
|
+
function b(B, $) {
|
|
3362
|
+
const { componentType: g } = B;
|
|
3363
|
+
let y = Ee(g, B, $);
|
|
3364
|
+
const p = g.toLowerCase().replace(/-/g, "_");
|
|
3365
|
+
return y && !y.id && y.type === g && (y.id = `${p}_${Math.random().toString().slice(2, 6)}`), y;
|
|
3344
3366
|
}
|
|
3345
|
-
function
|
|
3367
|
+
function S(B) {
|
|
3346
3368
|
}
|
|
3347
|
-
function
|
|
3369
|
+
function D(...B) {
|
|
3348
3370
|
}
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3371
|
+
function L() {
|
|
3372
|
+
t != null && t.schema.contents && t.schema.contents.map((B) => {
|
|
3373
|
+
var y;
|
|
3374
|
+
let $ = B.id;
|
|
3375
|
+
B.type === "component-ref" && ($ = B.component);
|
|
3376
|
+
const g = e.value.querySelector(`#${$}-design-item`);
|
|
3377
|
+
(y = g == null ? void 0 : g.componentInstance) != null && y.value.onRemoveComponent && g.componentInstance.value.onRemoveComponent();
|
|
3378
|
+
});
|
|
3379
|
+
}
|
|
3380
|
+
return r.value = {
|
|
3381
|
+
canMove: c(),
|
|
3382
|
+
canSelectParent: d(),
|
|
3383
|
+
canDelete: v(),
|
|
3384
|
+
canNested: !s(),
|
|
3354
3385
|
contents: t == null ? void 0 : t.schema.contents,
|
|
3355
3386
|
elementRef: e,
|
|
3356
3387
|
parent: (j = t == null ? void 0 : t.parent) == null ? void 0 : j.componentInstance,
|
|
3357
3388
|
schema: t == null ? void 0 : t.schema,
|
|
3358
|
-
styles:
|
|
3359
|
-
designerClass:
|
|
3360
|
-
canAccepts:
|
|
3361
|
-
getBelongedComponentInstance:
|
|
3362
|
-
getDraggableDesignItemElement:
|
|
3363
|
-
getDraggingDisplayText:
|
|
3364
|
-
getPropConfig:
|
|
3365
|
-
getDragScopeElement:
|
|
3366
|
-
onAcceptMovedChildElement:
|
|
3367
|
-
onChildElementMovedOut:
|
|
3368
|
-
addNewChildComponentSchema:
|
|
3369
|
-
updateDragAndDropRules: a,
|
|
3389
|
+
styles: a,
|
|
3390
|
+
designerClass: o,
|
|
3391
|
+
canAccepts: f,
|
|
3392
|
+
getBelongedComponentInstance: m,
|
|
3393
|
+
getDraggableDesignItemElement: u,
|
|
3394
|
+
getDraggingDisplayText: h,
|
|
3395
|
+
getPropConfig: D,
|
|
3396
|
+
getDragScopeElement: w,
|
|
3397
|
+
onAcceptMovedChildElement: M,
|
|
3398
|
+
onChildElementMovedOut: S,
|
|
3399
|
+
addNewChildComponentSchema: b,
|
|
3370
3400
|
triggerBelongedComponentToMoveWhenMoved: l(!1),
|
|
3371
|
-
triggerBelongedComponentToDeleteWhenDeleted: l(!1)
|
|
3372
|
-
|
|
3401
|
+
triggerBelongedComponentToDeleteWhenDeleted: l(!1),
|
|
3402
|
+
onRemoveComponent: L
|
|
3403
|
+
}, r;
|
|
3373
3404
|
}
|
|
3374
|
-
const
|
|
3405
|
+
const Ia = /* @__PURE__ */ U({
|
|
3375
3406
|
name: "FResponseLayoutEditorSettingDesign",
|
|
3376
3407
|
props: me,
|
|
3377
3408
|
emits: [],
|
|
3378
3409
|
setup(e, t) {
|
|
3379
|
-
const n = l(e.initialState), a = l(e.width), o = l(e.height), r = l(), c = Se("design-item-context"), d =
|
|
3410
|
+
const n = l(e.initialState), a = l(e.width), o = l(e.height), r = l(), c = Se("design-item-context"), d = Ma(r, c);
|
|
3380
3411
|
Q(() => {
|
|
3381
3412
|
r.value.componentInstance = d;
|
|
3382
3413
|
}), t.expose(d.value);
|
|
@@ -3437,7 +3468,7 @@ async function Ea(e) {
|
|
|
3437
3468
|
throw ye();
|
|
3438
3469
|
return navigator.clipboard.writeText(e);
|
|
3439
3470
|
}
|
|
3440
|
-
async function
|
|
3471
|
+
async function Ba(e) {
|
|
3441
3472
|
const t = document.createElement("span");
|
|
3442
3473
|
t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
|
|
3443
3474
|
const n = window.getSelection(), a = window.document.createRange();
|
|
@@ -3448,14 +3479,15 @@ async function Da(e) {
|
|
|
3448
3479
|
} finally {
|
|
3449
3480
|
n == null || n.removeAllRanges(), window.document.body.removeChild(t);
|
|
3450
3481
|
}
|
|
3451
|
-
if (!o)
|
|
3482
|
+
if (!o)
|
|
3483
|
+
throw ye();
|
|
3452
3484
|
}
|
|
3453
|
-
async function
|
|
3485
|
+
async function Da(e) {
|
|
3454
3486
|
try {
|
|
3455
3487
|
await Ea(e);
|
|
3456
3488
|
} catch (t) {
|
|
3457
3489
|
try {
|
|
3458
|
-
await
|
|
3490
|
+
await Ba(e);
|
|
3459
3491
|
} catch (n) {
|
|
3460
3492
|
throw n || t || ye();
|
|
3461
3493
|
}
|
|
@@ -3463,16 +3495,16 @@ async function Ba(e) {
|
|
|
3463
3495
|
}
|
|
3464
3496
|
function Ta() {
|
|
3465
3497
|
async function e(t) {
|
|
3466
|
-
await
|
|
3498
|
+
await Da(t);
|
|
3467
3499
|
}
|
|
3468
3500
|
return { onCopy: e };
|
|
3469
3501
|
}
|
|
3470
3502
|
function La(e, t, n, a) {
|
|
3471
|
-
const o = l(14), r = l(140), c = l(""), d = l(a.value.length), v =
|
|
3503
|
+
const o = l(14), r = l(140), c = l(""), d = l(a.value.length), v = R(() => a.value), s = R(() => ({
|
|
3472
3504
|
"font-size": `${o.value}px`,
|
|
3473
3505
|
height: "100%"
|
|
3474
3506
|
}));
|
|
3475
|
-
function
|
|
3507
|
+
function m(u) {
|
|
3476
3508
|
if (u.currentTarget) {
|
|
3477
3509
|
const f = u.currentTarget.value || "";
|
|
3478
3510
|
d.value = f.length;
|
|
@@ -3485,7 +3517,7 @@ function La(e, t, n, a) {
|
|
|
3485
3517
|
style: s.value,
|
|
3486
3518
|
rows: "4",
|
|
3487
3519
|
maxlength: r.value,
|
|
3488
|
-
onInput: (u) =>
|
|
3520
|
+
onInput: (u) => m(u)
|
|
3489
3521
|
}, [v.value]), i("span", {
|
|
3490
3522
|
class: "textarea-wordcount",
|
|
3491
3523
|
title: c.value,
|
|
@@ -3502,7 +3534,7 @@ function Ra(e, t, n, a) {
|
|
|
3502
3534
|
function Fa() {
|
|
3503
3535
|
const e = l(!1), t = l("复制成功");
|
|
3504
3536
|
return {
|
|
3505
|
-
feedbackStyle:
|
|
3537
|
+
feedbackStyle: R(() => {
|
|
3506
3538
|
const a = {
|
|
3507
3539
|
position: "absolute",
|
|
3508
3540
|
left: "50%",
|
|
@@ -3530,30 +3562,30 @@ function ka(e, t) {
|
|
|
3530
3562
|
return () => n && n();
|
|
3531
3563
|
}
|
|
3532
3564
|
function Wa(e) {
|
|
3533
|
-
const t = l(3), n = l(480), a =
|
|
3534
|
-
const
|
|
3565
|
+
const t = l(3), n = l(480), a = R(() => !!e.value && !!e.value.date), o = R(() => `发生时间 : ${e.value && e.value.date || ""}`), r = R(() => !!e.value && !!e.value.detail), c = R(() => {
|
|
3566
|
+
const b = `${n.value}px`;
|
|
3535
3567
|
return {
|
|
3536
3568
|
overflow: "hidden",
|
|
3537
3569
|
"text-overflow": "ellipsis",
|
|
3538
3570
|
display: "-webkit-box",
|
|
3539
3571
|
"-webkit-box-orient": "vertical",
|
|
3540
3572
|
"-webkit-line-clamp": t.value,
|
|
3541
|
-
"max-height":
|
|
3573
|
+
"max-height": b
|
|
3542
3574
|
};
|
|
3543
|
-
}), d =
|
|
3544
|
-
const
|
|
3575
|
+
}), d = R(() => e.value && e.value.detail || ""), v = R(() => !0), s = l(!1), m = l("展开"), u = l("收起"), f = R(() => {
|
|
3576
|
+
const b = {
|
|
3545
3577
|
display: "block",
|
|
3546
3578
|
color: "#2A87FF"
|
|
3547
3579
|
};
|
|
3548
|
-
return
|
|
3580
|
+
return b["text-align"] = s.value ? "" : "right", b;
|
|
3549
3581
|
});
|
|
3550
|
-
function h(
|
|
3582
|
+
function h(b, S) {
|
|
3551
3583
|
s.value = !s.value, t.value = s.value ? 20 : 3;
|
|
3552
3584
|
}
|
|
3553
|
-
function b
|
|
3585
|
+
function w(b) {
|
|
3554
3586
|
return h();
|
|
3555
3587
|
}
|
|
3556
|
-
function
|
|
3588
|
+
function M(b) {
|
|
3557
3589
|
return h();
|
|
3558
3590
|
}
|
|
3559
3591
|
return () => i("div", {
|
|
@@ -3567,12 +3599,12 @@ function Wa(e) {
|
|
|
3567
3599
|
}, null)]), v.value && i("span", {
|
|
3568
3600
|
style: f.value
|
|
3569
3601
|
}, [s.value && i("span", {
|
|
3570
|
-
onClick:
|
|
3602
|
+
onClick: w,
|
|
3571
3603
|
style: "cursor: pointer;"
|
|
3572
3604
|
}, [u.value]), !s.value && i("span", {
|
|
3573
|
-
onClick:
|
|
3605
|
+
onClick: M,
|
|
3574
3606
|
style: "cursor: pointer;"
|
|
3575
|
-
}, [
|
|
3607
|
+
}, [m.value])])]);
|
|
3576
3608
|
}
|
|
3577
3609
|
function $a(e) {
|
|
3578
3610
|
return () => i("p", {
|
|
@@ -3581,16 +3613,16 @@ function $a(e) {
|
|
|
3581
3613
|
}, null);
|
|
3582
3614
|
}
|
|
3583
3615
|
function Oa(e, t, n, a) {
|
|
3584
|
-
const o = l(e.exceptionInfo), r =
|
|
3616
|
+
const o = l(e.exceptionInfo), r = R(() => {
|
|
3585
3617
|
const f = {
|
|
3586
3618
|
"f-icon": !0
|
|
3587
3619
|
}, h = `f-icon-${t.value}`;
|
|
3588
3620
|
return f[h] = !0, f;
|
|
3589
|
-
}), c =
|
|
3590
|
-
function
|
|
3621
|
+
}), c = R(() => n.value || o.value && o.value.message), d = R(() => a.value), v = R(() => !!a.value), s = R(() => !!o.value);
|
|
3622
|
+
function m() {
|
|
3591
3623
|
return s.value ? Wa(o) : v.value ? $a(d) : () => null;
|
|
3592
3624
|
}
|
|
3593
|
-
const u =
|
|
3625
|
+
const u = m();
|
|
3594
3626
|
return () => i(ue, null, [i("div", {
|
|
3595
3627
|
class: "float-left modal-tips-iconwrap"
|
|
3596
3628
|
}, [i("span", {
|
|
@@ -3611,8 +3643,8 @@ function Aa(e, t, n) {
|
|
|
3611
3643
|
date: "",
|
|
3612
3644
|
message: "",
|
|
3613
3645
|
detail: ""
|
|
3614
|
-
}), v =
|
|
3615
|
-
function s(
|
|
3646
|
+
}), v = R(() => d.value && d.value.detail || "");
|
|
3647
|
+
function s(m) {
|
|
3616
3648
|
a(v.value).catch((u) => {
|
|
3617
3649
|
r.value = "复制失败";
|
|
3618
3650
|
}).finally(() => {
|
|
@@ -3629,53 +3661,53 @@ function Aa(e, t, n) {
|
|
|
3629
3661
|
}, [c.value])]);
|
|
3630
3662
|
}
|
|
3631
3663
|
function ja(e, t, n, a) {
|
|
3632
|
-
const o = l(e.type), r = l([]), c = l(e.exceptionInfo), d = l(e.okButtonText), v = l(e.cancelButtonText), s = l(!0),
|
|
3633
|
-
function
|
|
3664
|
+
const o = l(e.type), r = l([]), c = l(e.exceptionInfo), d = l(e.okButtonText), v = l(e.cancelButtonText), s = l(!0), m = l(!0), u = R(() => !!(r.value && r.value.length)), f = R(() => c.value && c.value.date && c.value.message && c.value.detail), h = R(() => !(r.value && r.value.length) && (d.value || v.value)), w = R(() => m.value && d.value), M = R(() => s.value && v.value), b = Aa(e, n, a);
|
|
3665
|
+
function S(L) {
|
|
3634
3666
|
o.value === "question" && t.emit("reject"), t.emit("close");
|
|
3635
3667
|
}
|
|
3636
|
-
function
|
|
3668
|
+
function D(L) {
|
|
3637
3669
|
o.value === "question" && t.emit("accept"), t.emit("close");
|
|
3638
3670
|
}
|
|
3639
3671
|
return () => i("div", {
|
|
3640
3672
|
class: "modal-footer"
|
|
3641
|
-
}, [f.value &&
|
|
3673
|
+
}, [f.value && b(), h.value && M.value && i("button", {
|
|
3642
3674
|
type: "button",
|
|
3643
3675
|
class: "btn btn-secondary btn-lg",
|
|
3644
|
-
onClick:
|
|
3645
|
-
}, [v.value]), h.value &&
|
|
3676
|
+
onClick: S
|
|
3677
|
+
}, [v.value]), h.value && w.value && i("button", {
|
|
3646
3678
|
type: "button",
|
|
3647
3679
|
class: "btn btn-primary btn-lg",
|
|
3648
|
-
onClick:
|
|
3649
|
-
}, [d.value]), u.value && r.value.length && r.value.map((
|
|
3680
|
+
onClick: D
|
|
3681
|
+
}, [d.value]), u.value && r.value.length && r.value.map((L) => i("button", {
|
|
3650
3682
|
type: "button",
|
|
3651
|
-
onClick:
|
|
3652
|
-
class:
|
|
3653
|
-
}, [
|
|
3654
|
-
class:
|
|
3655
|
-
}, null),
|
|
3683
|
+
onClick: L.handle,
|
|
3684
|
+
class: L.class
|
|
3685
|
+
}, [L.iconClass && i("span", {
|
|
3686
|
+
class: L.iconClass
|
|
3687
|
+
}, null), L.text]))]);
|
|
3656
3688
|
}
|
|
3657
3689
|
const oe = /* @__PURE__ */ U({
|
|
3658
3690
|
name: "FMessageBox",
|
|
3659
3691
|
props: xa,
|
|
3660
3692
|
emits: ["accept", "reject", "close"],
|
|
3661
3693
|
setup(e, t) {
|
|
3662
|
-
const n = l(e.type), a = l(e.title), o = l(e.detail), r =
|
|
3663
|
-
const
|
|
3694
|
+
const n = l(e.type), a = l(e.title), o = l(e.detail), r = R(() => {
|
|
3695
|
+
const b = {
|
|
3664
3696
|
"modal-tips": !0,
|
|
3665
3697
|
"d-flex": !0,
|
|
3666
3698
|
"flex-row": !0
|
|
3667
|
-
},
|
|
3668
|
-
return
|
|
3669
|
-
}), c =
|
|
3670
|
-
const
|
|
3671
|
-
return n.value === "prompt" ?
|
|
3699
|
+
}, S = `messager-type-${n.value}`;
|
|
3700
|
+
return b[S] = !0, b;
|
|
3701
|
+
}), c = R(() => {
|
|
3702
|
+
const b = {};
|
|
3703
|
+
return n.value === "prompt" ? b.padding = "0.5rem 0.5rem 1rem 1.5rem" : n.value === "error" && (b.padding = "0.5rem 1.5rem 1rem 1.5rem"), b;
|
|
3672
3704
|
}), d = Ta(), v = Ra(e, n, a, o), s = Fa(), {
|
|
3673
|
-
feedbackStyle:
|
|
3705
|
+
feedbackStyle: m,
|
|
3674
3706
|
feedbackMessage: u
|
|
3675
3707
|
} = s;
|
|
3676
3708
|
function f() {
|
|
3677
3709
|
return i("div", {
|
|
3678
|
-
style:
|
|
3710
|
+
style: m.value
|
|
3679
3711
|
}, [u.value]);
|
|
3680
3712
|
}
|
|
3681
3713
|
function h() {
|
|
@@ -3686,39 +3718,38 @@ const oe = /* @__PURE__ */ U({
|
|
|
3686
3718
|
return Oa(e, n, a, o);
|
|
3687
3719
|
}
|
|
3688
3720
|
}
|
|
3689
|
-
const
|
|
3721
|
+
const w = h(), M = ja(e, t, d, s);
|
|
3690
3722
|
return () => i("div", {
|
|
3691
3723
|
class: "farris-messager"
|
|
3692
3724
|
}, [i("section", {
|
|
3693
3725
|
class: r.value,
|
|
3694
3726
|
style: c.value
|
|
3695
|
-
}, [
|
|
3727
|
+
}, [w()]), M(), f()]);
|
|
3696
3728
|
}
|
|
3697
3729
|
});
|
|
3698
3730
|
class J {
|
|
3699
3731
|
static show(t) {
|
|
3700
|
-
|
|
3701
|
-
const a = Z({
|
|
3732
|
+
const n = Z({
|
|
3702
3733
|
...t
|
|
3703
|
-
}),
|
|
3704
|
-
}),
|
|
3734
|
+
}), a = !1, o = n.type === "error" || n.type === "prompt", r = n.type === "error" ? "错误提示" : n.type === "prompt" && n.title || "", c = n.acceptCallback || (() => {
|
|
3735
|
+
}), d = n.rejectCallback || (() => {
|
|
3705
3736
|
});
|
|
3706
|
-
let s =
|
|
3707
|
-
const
|
|
3708
|
-
|
|
3737
|
+
let v = null, s = new he(v);
|
|
3738
|
+
const m = () => {
|
|
3739
|
+
v && (v == null || v.destroy(), s = null);
|
|
3709
3740
|
};
|
|
3710
|
-
|
|
3741
|
+
v = s == null ? void 0 : s.open({
|
|
3711
3742
|
class: "modal-message modal-message-type-info",
|
|
3712
|
-
title:
|
|
3713
|
-
showButtons:
|
|
3714
|
-
showHeader:
|
|
3715
|
-
width:
|
|
3743
|
+
title: r,
|
|
3744
|
+
showButtons: a,
|
|
3745
|
+
showHeader: o,
|
|
3746
|
+
width: n.width || 400,
|
|
3716
3747
|
fitContent: !0,
|
|
3717
3748
|
showMaxButton: !1,
|
|
3718
|
-
render: () => i(oe,
|
|
3719
|
-
onAccept:
|
|
3720
|
-
onReject:
|
|
3721
|
-
onClose:
|
|
3749
|
+
render: () => i(oe, Me(n, {
|
|
3750
|
+
onAccept: c,
|
|
3751
|
+
onReject: d,
|
|
3752
|
+
onClose: m
|
|
3722
3753
|
}), null)
|
|
3723
3754
|
});
|
|
3724
3755
|
}
|
|
@@ -3878,7 +3909,7 @@ const qa = {
|
|
|
3878
3909
|
e["response-layout-editor-setting"] = de, t["response-layout-editor-setting"] = we;
|
|
3879
3910
|
},
|
|
3880
3911
|
registerDesigner(e, t, n) {
|
|
3881
|
-
e["response-layout-editor-setting"] =
|
|
3912
|
+
e["response-layout-editor-setting"] = Ia, t["response-layout-editor-setting"] = we;
|
|
3882
3913
|
}
|
|
3883
3914
|
};
|
|
3884
3915
|
export {
|