@farris/ui-vue 1.6.5-beta.7 → 1.6.5
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 +65 -65
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +360 -361
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +524 -520
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +134 -134
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +192 -192
- package/components/capsule/index.umd.cjs +1 -1
- package/components/code-editor/index.esm.js +8 -8
- package/components/code-editor/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +72 -72
- package/components/collection-property-editor/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +291 -289
- package/components/color-picker/index.umd.cjs +1 -1
- package/components/combo-list/index.esm.js +190 -181
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +113 -112
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +3 -1
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +309 -309
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +1125 -1124
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +472 -472
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +99 -99
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3387 -3321
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1604 -1601
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +1082 -1079
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/discussion-editor/index.esm.js +973 -1040
- package/components/discussion-editor/index.umd.cjs +6 -6
- package/components/dropdown/index.esm.js +335 -330
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +177 -177
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +6 -6
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +344 -344
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +644 -644
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +1773 -1760
- package/components/expression-editor/index.umd.cjs +4 -4
- package/components/fieldset/index.esm.js +55 -55
- package/components/fieldset/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +879 -869
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/filter-condition-editor/index.esm.js +1091 -1077
- package/components/filter-condition-editor/index.umd.cjs +3 -3
- package/components/flow-canvas/index.esm.js +215 -215
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/html-template/index.esm.js +164 -164
- package/components/html-template/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +198 -198
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/json-editor/index.esm.js +64 -64
- package/components/json-editor/index.umd.cjs +1 -1
- package/components/language-textbox/index.esm.js +140 -140
- package/components/language-textbox/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +111 -111
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +90 -90
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +139 -141
- package/components/list-view/index.umd.cjs +3 -3
- package/components/locale/index.esm.js +833 -901
- package/components/locale/index.umd.cjs +6 -6
- package/components/lookup/index.esm.js +1352 -1351
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +1387 -1383
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/menu-lookup/index.esm.js +1059 -1127
- package/components/menu-lookup/index.umd.cjs +6 -6
- package/components/message-box/index.esm.js +217 -217
- package/components/message-box/index.umd.cjs +1 -1
- package/components/modal/index.esm.js +283 -283
- package/components/modal/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +106 -106
- package/components/nav/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +194 -194
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +463 -462
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +883 -876
- package/components/order/index.umd.cjs +4 -4
- package/components/page-footer/index.esm.js +94 -94
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +942 -939
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +82 -82
- package/components/pagination/index.umd.cjs +1 -1
- package/components/popover/index.esm.js +59 -57
- package/components/popover/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +113 -113
- package/components/progress/index.umd.cjs +2 -2
- package/components/property-editor/index.esm.js +151 -150
- package/components/property-editor/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +739 -739
- package/components/property-panel/index.umd.cjs +2 -2
- package/components/query-solution/index.esm.js +4142 -4190
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/radio-button/index.esm.js +182 -182
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +106 -106
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +535 -535
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +1456 -1443
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +779 -776
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +1875 -1866
- package/components/schema-selector/index.umd.cjs +7 -7
- package/components/search-box/index.esm.js +151 -147
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +1236 -1233
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +163 -163
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/sort-condition-editor/index.esm.js +1097 -1083
- package/components/sort-condition-editor/index.umd.cjs +3 -3
- package/components/splitter/index.esm.js +3 -3
- package/components/splitter/index.umd.cjs +1 -1
- package/components/step/index.esm.js +133 -133
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +103 -98
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +1596 -1593
- package/components/tabs/index.umd.cjs +2 -2
- package/components/tags/index.esm.js +93 -93
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +138 -138
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +684 -684
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +935 -929
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/tooltip/index.esm.js +173 -171
- package/components/tooltip/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +190 -192
- package/components/transfer/index.umd.cjs +4 -4
- package/components/tree-grid/index.esm.js +124 -124
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2363 -2278
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +170 -170
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +196 -196
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +227 -227
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +9 -9
- package/components/weather/index.umd.cjs +2 -2
- package/designer/button-edit/index.esm.js +353 -353
- package/designer/button-edit/index.umd.cjs +1 -1
- package/designer/checkbox/index.esm.js +7 -3
- package/designer/checkbox/index.umd.cjs +1 -1
- package/designer/checkbox-group/index.esm.js +38 -33
- package/designer/checkbox-group/index.umd.cjs +1 -1
- package/designer/data-grid/index.esm.js +3562 -3536
- package/designer/data-grid/index.umd.cjs +6 -6
- package/designer/data-view/index.esm.js +3 -3
- package/designer/data-view/index.umd.cjs +3 -3
- package/designer/farris-designer.all.esm.js +4203 -4193
- package/designer/farris-designer.all.umd.cjs +9 -9
- package/designer/input-group/index.esm.js +97 -97
- package/designer/input-group/index.umd.cjs +1 -1
- package/designer/list-view/index.esm.js +1868 -1854
- package/designer/list-view/index.umd.cjs +8 -8
- package/designer/radio-group/index.esm.js +954 -949
- package/designer/radio-group/index.umd.cjs +1 -1
- package/farris.all.esm.js +16195 -16126
- package/farris.all.umd.cjs +30 -30
- package/locales/data-grid/ui/en.json +2 -2
- package/locales/designer/en.json +7 -6
- package/locales/designer/zh-CHS.json +2 -1
- package/locales/designer/zh-CHT.json +2 -1
- package/locales/ui/en.json +7 -6
- package/locales/ui/zh-CHS.json +2 -1
- package/locales/ui/zh-CHT.json +2 -1
- package/package.json +1 -1
- package/types/combo-list/src/property-config/combo-list.property-config.d.ts +0 -6
- package/types/data-view/composition/types.d.ts +10 -4
- package/types/lookup/src/composition/use-dialog.d.ts +2 -0
- package/types/lookup/src/composition/use-input-change.d.ts +1 -0
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var Xn = Object.defineProperty;
|
|
2
2
|
var Jn = (t, e, n) => e in t ? Xn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
3
|
var ee = (t, e, n) => Jn(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
-
import { ref as
|
|
5
|
-
import {
|
|
4
|
+
import { ref as E, computed as H, createVNode as w, defineComponent as Pe, watch as xe, onMounted as Oe, Fragment as ft, reactive as He, createApp as an, onUnmounted as pt, Transition as sn, mergeProps as Lt, nextTick as Ke, createTextVNode as ln, onBeforeMount as Qn, Teleport as Zn, shallowRef as Kn, render as $t, h as eo, cloneVNode as to, inject as Se, provide as cn, onBeforeUnmount as no, withModifiers as oo } from "vue";
|
|
5
|
+
import { cloneDeep as Je, isPlainObject as Zt, isUndefined as Ve } from "lodash-es";
|
|
6
6
|
import io from "../response-toolbar/index.esm.js";
|
|
7
7
|
import { LocaleService as rt } from "../locale/index.esm.js";
|
|
8
8
|
import { getCustomClass as ge, withInstall as un, FormSchemaEntityField$Type as Kt, FormSchemaEntityFieldTypeName as en, getMaxZIndex as ro } from "../common/index.esm.js";
|
|
9
9
|
import { useI18n as Vt } from "vue-i18n";
|
|
10
10
|
import { useResizeObserver as ao } from "@vueuse/core";
|
|
11
|
-
import { getHierarchyRow as so, useIdentify as lo, useGroupData as co, useFilter as uo, useHierarchy as fo, useLoading as po, useDataView as mo, useSelection as vo, useSelectHierarchyItem as ho, usePagination as go, useDataViewContainerStyle as yo, useCommandColumn as bo, useSettingColumn as Co, useColumn as wo, useSort as xo, useGroupColumn as
|
|
11
|
+
import { getHierarchyRow as so, useIdentify as lo, useGroupData as co, useFilter as uo, useHierarchy as fo, useLoading as po, useDataView as mo, useSelection as vo, useSelectHierarchyItem as ho, usePagination as go, useDataViewContainerStyle as yo, useCommandColumn as bo, useSettingColumn as Co, useColumn as wo, useSort as xo, useGroupColumn as So, useRow as To, useEdit as Mo, useVisualDataBound as Bo, useVisualDataCell as Eo, useVisualDataRow as ko, useVisualData as Io, useCellPosition as Po, useSidebar as Fo, useVirtualScroll as Do, useFitColumn as Ro, useFilterHistory as Oo, useColumnFilter as $o, useDragColumn as No, getColumnHeader as jo, getSidebar as Ao, getDisableMask as Lo, getHorizontalScrollbar as Vo, getVerticalScrollbar as zo, getEmpty as Ho, getPagination as qo, getSummary as _o } from "../data-view/index.esm.js";
|
|
12
12
|
import { getSchemaByTypeForDesigner as dn, createPropsResolver as fn, resolveAppearance as Uo } from "../dynamic-resolver/index.esm.js";
|
|
13
13
|
import { useDesignerInnerComponent as Wo, useDesignerComponent as Go } from "../designer-canvas/index.esm.js";
|
|
14
14
|
import "../property-panel/index.esm.js";
|
|
@@ -90,22 +90,22 @@ import "../notify/index.esm.js";
|
|
|
90
90
|
function pn(t, e) {
|
|
91
91
|
let n;
|
|
92
92
|
function o(u) {
|
|
93
|
-
const { properties: m, title: d, ignore: f } = u,
|
|
94
|
-
if (d && (!
|
|
95
|
-
const
|
|
96
|
-
g.id = `${
|
|
93
|
+
const { properties: m, title: d, ignore: f } = u, h = f && Array.isArray(f), g = Object.keys(m).reduce((B, S) => ((!h || !f.find((k) => k === S)) && (B[S] = m[S].type === "object" && m[S].properties ? o(m[S]) : Je(m[S].default)), B), {});
|
|
94
|
+
if (d && (!h || !f.find((B) => B === "id"))) {
|
|
95
|
+
const B = d.toLowerCase().replace(/-/g, "_");
|
|
96
|
+
g.id = `${B}_${Math.random().toString().slice(2, 6)}`;
|
|
97
97
|
}
|
|
98
98
|
return g;
|
|
99
99
|
}
|
|
100
100
|
function i(u) {
|
|
101
101
|
const { properties: m, title: d, required: f } = u;
|
|
102
102
|
if (f && Array.isArray(f)) {
|
|
103
|
-
const
|
|
103
|
+
const h = f.reduce((g, B) => (g[B] = m[B].type === "object" && m[B].properties ? o(m[B]) : Je(m[B].default), g), {});
|
|
104
104
|
if (d && f.find((g) => g === "id")) {
|
|
105
105
|
const g = d.toLowerCase().replace(/-/g, "_");
|
|
106
|
-
|
|
106
|
+
h.id = `${g}_${Math.random().toString().slice(2, 6)}`;
|
|
107
107
|
}
|
|
108
|
-
return
|
|
108
|
+
return h;
|
|
109
109
|
}
|
|
110
110
|
return {
|
|
111
111
|
type: d
|
|
@@ -114,28 +114,28 @@ function pn(t, e) {
|
|
|
114
114
|
function r(u, m = {}, d) {
|
|
115
115
|
const f = t[u];
|
|
116
116
|
if (f) {
|
|
117
|
-
let
|
|
117
|
+
let h = i(f);
|
|
118
118
|
const g = e[u];
|
|
119
|
-
return
|
|
119
|
+
return h = g ? g({ getSchemaByType: r }, h, m, d) : h, n != null && n.appendIdentifyForNewControl && n.appendIdentifyForNewControl(h), h;
|
|
120
120
|
}
|
|
121
121
|
return null;
|
|
122
122
|
}
|
|
123
123
|
function a(u, m) {
|
|
124
124
|
const d = o(m);
|
|
125
|
-
return Object.keys(d).reduce((f,
|
|
125
|
+
return Object.keys(d).reduce((f, h) => (Object.prototype.hasOwnProperty.call(u, h) && (f[h] && Zt(f[h]) && Zt(u[h] || !u[h]) ? Object.assign(f[h], u[h] || {}) : f[h] = u[h]), f), d), d;
|
|
126
126
|
}
|
|
127
127
|
function c(u, m) {
|
|
128
|
-
return Object.keys(u).filter((f) => u[f] != null).reduce((f,
|
|
129
|
-
if (m.has(
|
|
130
|
-
const g = m.get(
|
|
128
|
+
return Object.keys(u).filter((f) => u[f] != null).reduce((f, h) => {
|
|
129
|
+
if (m.has(h)) {
|
|
130
|
+
const g = m.get(h);
|
|
131
131
|
if (typeof g == "string")
|
|
132
|
-
f[g] = u[
|
|
132
|
+
f[g] = u[h];
|
|
133
133
|
else {
|
|
134
|
-
const
|
|
135
|
-
Object.assign(f,
|
|
134
|
+
const B = g(h, u[h], u);
|
|
135
|
+
Object.assign(f, B);
|
|
136
136
|
}
|
|
137
137
|
} else
|
|
138
|
-
f[
|
|
138
|
+
f[h] = u[h];
|
|
139
139
|
return f;
|
|
140
140
|
}, {});
|
|
141
141
|
}
|
|
@@ -150,12 +150,12 @@ function pn(t, e) {
|
|
|
150
150
|
const f = t[m];
|
|
151
151
|
if (!f)
|
|
152
152
|
return u;
|
|
153
|
-
const
|
|
153
|
+
const h = a(u, f), g = ((d = u.editor) == null ? void 0 : d.type) || "";
|
|
154
154
|
if (g) {
|
|
155
|
-
const
|
|
156
|
-
|
|
155
|
+
const B = t[g], S = a(u.editor, B);
|
|
156
|
+
h.editor = S;
|
|
157
157
|
}
|
|
158
|
-
return
|
|
158
|
+
return h;
|
|
159
159
|
}
|
|
160
160
|
return u;
|
|
161
161
|
}
|
|
@@ -164,7 +164,7 @@ function pn(t, e) {
|
|
|
164
164
|
}
|
|
165
165
|
return { getSchemaByType: r, resolveSchemaWithDefaultValue: l, resolveSchemaToProps: s, mappingSchemaToProps: c, setDesignerContext: p };
|
|
166
166
|
}
|
|
167
|
-
const mn = {}, vn = {}, { getSchemaByType: zt, resolveSchemaWithDefaultValue: Yo, resolveSchemaToProps: Xo, mappingSchemaToProps: Jo } = pn(mn, vn);
|
|
167
|
+
const mn = {}, vn = {}, { getSchemaByType: zt, resolveSchemaWithDefaultValue: Yo, resolveSchemaToProps: Xo, mappingSchemaToProps: Jo, setDesignerContext: mc } = pn(mn, vn);
|
|
168
168
|
function Qo(t = {}) {
|
|
169
169
|
function e(l, p, u, m) {
|
|
170
170
|
if (typeof u == "number")
|
|
@@ -214,8 +214,8 @@ function Qo(t = {}) {
|
|
|
214
214
|
return r(l).reduce((d, f) => d && a(f, p), !0);
|
|
215
215
|
}
|
|
216
216
|
function s(l, p) {
|
|
217
|
-
const u = Object.keys(l), m = u.includes("allOf"), d = u.includes("anyOf"), f = m || d,
|
|
218
|
-
return m ? !
|
|
217
|
+
const u = Object.keys(l), m = u.includes("allOf"), d = u.includes("anyOf"), f = m || d, B = (f ? l[f ? m ? "allOf" : "anyOf" : "allOf"] : [l]).map((k) => c(k, p));
|
|
218
|
+
return m ? !B.includes(!1) : B.includes(!0);
|
|
219
219
|
}
|
|
220
220
|
return { parseValueSchema: s };
|
|
221
221
|
}
|
|
@@ -508,75 +508,75 @@ function hn(t, e, n) {
|
|
|
508
508
|
["number", { type: "number-spinner", placeholder: "" }],
|
|
509
509
|
["events-editor", { type: "events-editor", hide: !0 }]
|
|
510
510
|
]), r = Qo();
|
|
511
|
-
function a(f,
|
|
512
|
-
return () => r.parseValueSchema(f,
|
|
511
|
+
function a(f, h) {
|
|
512
|
+
return () => r.parseValueSchema(f, h);
|
|
513
513
|
}
|
|
514
|
-
function c(f,
|
|
515
|
-
return f.includes("visible") &&
|
|
514
|
+
function c(f, h, g) {
|
|
515
|
+
return f.includes("visible") && h.visible !== void 0 ? typeof h.visible == "boolean" ? () => !!h.visible : h.visible === void 0 ? !0 : a(h.visible, g) : () => !0;
|
|
516
516
|
}
|
|
517
|
-
function s(f,
|
|
518
|
-
return f.includes("readonly") &&
|
|
517
|
+
function s(f, h, g) {
|
|
518
|
+
return f.includes("readonly") && h.readonly !== void 0 ? typeof h.readonly == "boolean" ? () => !!h.readonly : a(h.readonly, g) : () => !1;
|
|
519
519
|
}
|
|
520
|
-
function l(f,
|
|
521
|
-
const g = f.$converter ||
|
|
520
|
+
function l(f, h) {
|
|
521
|
+
const g = f.$converter || h;
|
|
522
522
|
return typeof g == "string" && g && o.has(g) ? o.get(g) || null : g || null;
|
|
523
523
|
}
|
|
524
|
-
function p(f,
|
|
525
|
-
return Object.keys(f).map((
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
let
|
|
524
|
+
function p(f, h, g, B, S, k = "", b = "") {
|
|
525
|
+
return Object.keys(f).map((x) => {
|
|
526
|
+
const R = E(1), $ = x, N = f[x], j = Object.keys(N), M = N.title, y = N.type, v = i.get(y) || { type: "input-group", enableClear: !1 }, T = N.editor ? Object.assign({}, v, N.editor) : Object.assign({}, v), F = c(j, N, h), P = s(j, N, h);
|
|
527
|
+
T.readonly = T.readonly === void 0 ? P() : T.readonly;
|
|
528
|
+
const A = N.type === "cascade" ? p(N.properties, h, g, B, S, k, b) : [], I = !0;
|
|
529
|
+
let O = l(N, b);
|
|
530
530
|
const z = H({
|
|
531
531
|
get() {
|
|
532
|
-
if (
|
|
533
|
-
if (["class", "style"].find((ue) => ue ===
|
|
534
|
-
return
|
|
535
|
-
const ae = g[
|
|
536
|
-
return Object.prototype.hasOwnProperty.call(
|
|
532
|
+
if (R.value) {
|
|
533
|
+
if (["class", "style"].find((ue) => ue === $) && !O && (O = o.get("/converter/appearance.converter") || null), O && O.convertFrom)
|
|
534
|
+
return O.convertFrom(g, x, S, k);
|
|
535
|
+
const ae = g[x];
|
|
536
|
+
return Object.prototype.hasOwnProperty.call(N, "defaultValue") && (ae === void 0 || typeof ae == "string" && ae === "") ? N.type === "boolean" ? N.defaultValue : N.defaultValue || "" : ae;
|
|
537
537
|
}
|
|
538
538
|
return null;
|
|
539
539
|
},
|
|
540
540
|
set(ae) {
|
|
541
|
-
|
|
541
|
+
R.value += 1, O && O.convertTo ? (O.convertTo(B, x, ae, S, k), O.convertTo(g, x, ae, S, k)) : (B[x] = ae, g[x] = ae);
|
|
542
542
|
}
|
|
543
|
-
}), { refreshPanelAfterChanged: L, description: J, isExpand: K, parentPropertyID: te } =
|
|
544
|
-
return
|
|
543
|
+
}), { refreshPanelAfterChanged: L, description: J, isExpand: K, parentPropertyID: te } = N, Y = { propertyID: $, propertyName: M, propertyType: y, propertyValue: z, editor: T, visible: F, readonly: P, cascadeConfig: A, hideCascadeTitle: I, refreshPanelAfterChanged: L, description: J, isExpand: K, parentPropertyID: te };
|
|
544
|
+
return h[$] = Y, Y;
|
|
545
545
|
});
|
|
546
546
|
}
|
|
547
|
-
function u(f,
|
|
548
|
-
const
|
|
549
|
-
return
|
|
550
|
-
const C =
|
|
551
|
-
return { categoryId: b, categoryName:
|
|
547
|
+
function u(f, h, g = {}) {
|
|
548
|
+
const B = {}, S = t[f];
|
|
549
|
+
return S && S.categories ? Object.keys(S.categories).map((b) => {
|
|
550
|
+
const C = S.categories[b], x = C == null ? void 0 : C.title, R = p(C.properties || {}, B, {}, g, h);
|
|
551
|
+
return { categoryId: b, categoryName: x, properties: R };
|
|
552
552
|
}) : [];
|
|
553
553
|
}
|
|
554
|
-
function m(f,
|
|
555
|
-
const
|
|
556
|
-
if (
|
|
557
|
-
const
|
|
558
|
-
b && Object.keys(
|
|
559
|
-
|
|
554
|
+
function m(f, h, g, B, S = "") {
|
|
555
|
+
const k = h.$ref.schema, b = h.$ref.converter, C = g[k], x = C.type, R = n(C), $ = {}, N = t[x];
|
|
556
|
+
if (N && N.categories) {
|
|
557
|
+
const j = N.categories[f], M = j == null ? void 0 : j.title;
|
|
558
|
+
b && Object.keys(j.properties).forEach((T) => {
|
|
559
|
+
j.properties[T].$converter = b;
|
|
560
560
|
});
|
|
561
|
-
const y = (
|
|
562
|
-
return { categoryId: f, categoryName:
|
|
561
|
+
const y = (j == null ? void 0 : j.properties) || {}, v = p(y, $, R, C, B, S);
|
|
562
|
+
return { categoryId: f, categoryName: M, properties: v };
|
|
563
563
|
}
|
|
564
564
|
return { categoryId: f, categoryName: "", properties: [] };
|
|
565
565
|
}
|
|
566
|
-
function d(f,
|
|
567
|
-
const
|
|
568
|
-
let
|
|
569
|
-
if (
|
|
570
|
-
const
|
|
571
|
-
return Object.keys(
|
|
572
|
-
const
|
|
573
|
-
if (
|
|
574
|
-
|
|
566
|
+
function d(f, h, g, B, S) {
|
|
567
|
+
const k = f.type, b = n(f), C = {};
|
|
568
|
+
let x = S || t[k];
|
|
569
|
+
if (x && Object.keys(x).length === 0 && g && g.getPropConfig && (x = g.getPropConfig(B)), x && x.categories) {
|
|
570
|
+
const R = [];
|
|
571
|
+
return Object.keys(x.categories).map(($) => {
|
|
572
|
+
const N = x.categories[$];
|
|
573
|
+
if (N.$ref) {
|
|
574
|
+
R.push(m($, N, f, h, B));
|
|
575
575
|
return;
|
|
576
576
|
}
|
|
577
|
-
const
|
|
578
|
-
|
|
579
|
-
}),
|
|
577
|
+
const j = N == null ? void 0 : N.title, M = N == null ? void 0 : N.tabId, y = N == null ? void 0 : N.tabName, v = N == null ? void 0 : N.hide, T = N == null ? void 0 : N.hideTitle, F = p(N.properties || {}, C, b, f, h, B, N.$converter), { setPropertyRelates: P } = N, A = N == null ? void 0 : N.parentPropertyID;
|
|
578
|
+
R.push({ categoryId: $, categoryName: j, tabId: M, tabName: y, hide: v, properties: F, hideTitle: T, setPropertyRelates: P, parentPropertyID: A });
|
|
579
|
+
}), R;
|
|
580
580
|
}
|
|
581
581
|
return [];
|
|
582
582
|
}
|
|
@@ -588,9 +588,9 @@ function hn(t, e, n) {
|
|
|
588
588
|
}
|
|
589
589
|
const gn = {}, yn = {};
|
|
590
590
|
hn(gn, yn, Yo);
|
|
591
|
-
const bn = {}, Cn = {}, { getSchemaByType: bi, resolveSchemaWithDefaultValue: Ci } = pn(bn, Cn), wn = {}, xn = {};
|
|
591
|
+
const bn = {}, Cn = {}, { getSchemaByType: bi, resolveSchemaWithDefaultValue: Ci, resolveSchemaToProps: vc, mappingSchemaToProps: hc, setDesignerContext: gc } = pn(bn, Cn), wn = {}, xn = {};
|
|
592
592
|
hn(wn, xn, Ci);
|
|
593
|
-
function
|
|
593
|
+
function Fe(t, e, n = /* @__PURE__ */ new Map(), o = (a, c, s, l) => c, i = {}, r = (a) => a) {
|
|
594
594
|
return mn[e.title] = e, vn[e.title] = o, gn[e.title] = i, yn[e.title] = r, bn[e.title] = e, Cn[e.title] = o, wn[e.title] = i, xn[e.title] = r, (a = {}, c = !0) => {
|
|
595
595
|
if (!c)
|
|
596
596
|
return Jo(a, n);
|
|
@@ -628,10 +628,10 @@ function xi() {
|
|
|
628
628
|
resolve: t
|
|
629
629
|
};
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function Si(t, e, n) {
|
|
632
632
|
return e ? { enableAccordion: n.accordionMode } : { enableAccordion: "" };
|
|
633
633
|
}
|
|
634
|
-
function
|
|
634
|
+
function Ti(t, e) {
|
|
635
635
|
var n;
|
|
636
636
|
return {
|
|
637
637
|
buttons: e.buttons,
|
|
@@ -643,8 +643,8 @@ function Si(t, e) {
|
|
|
643
643
|
const Ht = /* @__PURE__ */ new Map([
|
|
644
644
|
["appearance", wt],
|
|
645
645
|
["expanded", "expandStatus"],
|
|
646
|
-
["enableAccordion",
|
|
647
|
-
["toolbar",
|
|
646
|
+
["enableAccordion", Si],
|
|
647
|
+
["toolbar", Ti]
|
|
648
648
|
]);
|
|
649
649
|
function Mi(t, e) {
|
|
650
650
|
const n = Math.random().toString().slice(2, 6), o = e.parentComponentInstance, i = t.getSchemaByType("section");
|
|
@@ -673,10 +673,10 @@ function Mi(t, e) {
|
|
|
673
673
|
const c = o.elementRef, s = window.getComputedStyle(c);
|
|
674
674
|
return s && s.display === "flex" && (r.appearance.class += " d-block"), r;
|
|
675
675
|
}
|
|
676
|
-
function
|
|
676
|
+
function Sn(t, e, n) {
|
|
677
677
|
return n.parentComponentInstance ? Mi(t, n) : e;
|
|
678
678
|
}
|
|
679
|
-
const Bi = "https://json-schema.org/draft/2020-12/schema", Ei = "https://farris-design.gitee.io/section.schema.json", ki = "section", Ii = "A Farris Container Component",
|
|
679
|
+
const Bi = "https://json-schema.org/draft/2020-12/schema", Ei = "https://farris-design.gitee.io/section.schema.json", ki = "section", Ii = "A Farris Container Component", Pi = "object", Fi = {
|
|
680
680
|
id: {
|
|
681
681
|
description: "The unique identifier for a Section",
|
|
682
682
|
type: "string"
|
|
@@ -860,13 +860,13 @@ const Bi = "https://json-schema.org/draft/2020-12/schema", Ei = "https://farris-
|
|
|
860
860
|
"id",
|
|
861
861
|
"type",
|
|
862
862
|
"contents"
|
|
863
|
-
],
|
|
863
|
+
], Tn = {
|
|
864
864
|
$schema: Bi,
|
|
865
865
|
$id: Ei,
|
|
866
866
|
title: ki,
|
|
867
867
|
description: Ii,
|
|
868
|
-
type:
|
|
869
|
-
properties:
|
|
868
|
+
type: Pi,
|
|
869
|
+
properties: Fi,
|
|
870
870
|
required: Di
|
|
871
871
|
}, Ri = "https://json-schema.org/draft/2020-12/schema", Oi = "https://farris-design.gitee.io/section-toolbar.schema.json", $i = "section-toolbar", Ni = "A Farris Toolbar Component", ji = "object", Ai = {
|
|
872
872
|
id: {
|
|
@@ -1082,7 +1082,7 @@ const qi = "https://json-schema.org/draft/2020-12/schema", _i = "https://farris-
|
|
|
1082
1082
|
}, sr = Object.assign({}, _t, {
|
|
1083
1083
|
componentId: { type: String, default: "" }
|
|
1084
1084
|
});
|
|
1085
|
-
|
|
1085
|
+
Fe(
|
|
1086
1086
|
_t,
|
|
1087
1087
|
Qi,
|
|
1088
1088
|
Hi,
|
|
@@ -1107,7 +1107,7 @@ const Mn = {
|
|
|
1107
1107
|
// 是否下拉项
|
|
1108
1108
|
isDPItem: { type: Boolean, default: !1 }
|
|
1109
1109
|
};
|
|
1110
|
-
|
|
1110
|
+
Fe(
|
|
1111
1111
|
Mn,
|
|
1112
1112
|
ar,
|
|
1113
1113
|
void 0,
|
|
@@ -1172,7 +1172,7 @@ const Ut = {
|
|
|
1172
1172
|
// toolbarPosition: { type: String, default: '' },
|
|
1173
1173
|
// toolbarButtons: { type: Array<object>, default: [] },
|
|
1174
1174
|
// toolbar: { type: Object as PropType<ToolbarConfig>, default: {} }
|
|
1175
|
-
}, lr =
|
|
1175
|
+
}, lr = Fe(Ut, Tn, Ht, Sn), cr = xi(), Bn = Object.assign(
|
|
1176
1176
|
{},
|
|
1177
1177
|
Ut,
|
|
1178
1178
|
{
|
|
@@ -1182,12 +1182,12 @@ const Ut = {
|
|
|
1182
1182
|
headerContentHtml: { type: String, default: "" },
|
|
1183
1183
|
toolbarHtml: { type: String, default: "" }
|
|
1184
1184
|
}
|
|
1185
|
-
), ur =
|
|
1185
|
+
), ur = Fe(
|
|
1186
1186
|
_t,
|
|
1187
1187
|
zi,
|
|
1188
1188
|
Ht,
|
|
1189
1189
|
qt
|
|
1190
|
-
), dr =
|
|
1190
|
+
), dr = Fe(Bn, Tn, Ht, Sn);
|
|
1191
1191
|
function En(t, e, n) {
|
|
1192
1192
|
let o;
|
|
1193
1193
|
function i(s = 1) {
|
|
@@ -1225,7 +1225,7 @@ function En(t, e, n) {
|
|
|
1225
1225
|
return { onClickMaxMinIcon: c };
|
|
1226
1226
|
}
|
|
1227
1227
|
function kn(t, e) {
|
|
1228
|
-
const n =
|
|
1228
|
+
const n = E(t.buttons), o = H(() => t.buttonPosition === "inHead" ? "right" : "left"), i = H(() => "f-section-toolbar col-6" + (t.buttonPosition === "inHead" ? " f-toolbar f-section-header--toolbar" : " f-section-content--toolbar") + (t.buttonsClass ? " " + t.buttonsClass : "")), r = H(() => t.buttons && t.buttons.length > 0 && t.buttonPosition === "inHead");
|
|
1229
1229
|
function a(l, p) {
|
|
1230
1230
|
e.emit("click", l, p);
|
|
1231
1231
|
}
|
|
@@ -1258,7 +1258,7 @@ function fr(t, e, n, o, i, r) {
|
|
|
1258
1258
|
const b = {
|
|
1259
1259
|
"f-section-header": !0
|
|
1260
1260
|
};
|
|
1261
|
-
return e.slots.header && t.headerClass.split(" ").reduce((
|
|
1261
|
+
return e.slots.header && t.headerClass.split(" ").reduce((x, R) => (x[R] = !0, x), b), b;
|
|
1262
1262
|
});
|
|
1263
1263
|
function d(b) {
|
|
1264
1264
|
b.stopPropagation(), t.enableAccordion !== "" && (n.value = !n.value);
|
|
@@ -1284,7 +1284,7 @@ function fr(t, e, n, o, i, r) {
|
|
|
1284
1284
|
onClick: d
|
|
1285
1285
|
}, [w("span", null, [n.value ? a.collapseLabel : a.expandLabel])]) : ""]);
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function h() {
|
|
1288
1288
|
return w("div", {
|
|
1289
1289
|
class: "f-title"
|
|
1290
1290
|
}, [w("h4", {
|
|
@@ -1296,7 +1296,7 @@ function fr(t, e, n, o, i, r) {
|
|
|
1296
1296
|
const C = {
|
|
1297
1297
|
"f-content": !0
|
|
1298
1298
|
};
|
|
1299
|
-
return t.headerContentClass && t.headerContentClass.split(" ").reduce((
|
|
1299
|
+
return t.headerContentClass && t.headerContentClass.split(" ").reduce((R, $) => (R[$] = !0, R), C), C;
|
|
1300
1300
|
});
|
|
1301
1301
|
return e.slots.headerContent ? w("div", {
|
|
1302
1302
|
class: b.value
|
|
@@ -1304,29 +1304,29 @@ function fr(t, e, n, o, i, r) {
|
|
|
1304
1304
|
class: b.value
|
|
1305
1305
|
}, [t.headerContentRenderFunction()]) : null;
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1308
|
-
return e.slots.headerTitle ? e.slots.headerTitle() : t.headerTitleRenderFunction ? t.headerTitleRenderFunction() :
|
|
1307
|
+
function B() {
|
|
1308
|
+
return e.slots.headerTitle ? e.slots.headerTitle() : t.headerTitleRenderFunction ? t.headerTitleRenderFunction() : h();
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function S() {
|
|
1311
1311
|
return w("div", {
|
|
1312
1312
|
class: m.value
|
|
1313
|
-
}, [
|
|
1313
|
+
}, [B(), g(), c.value === "inHead" && s(), (p.value || u.value) && f()]);
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1315
|
+
function k() {
|
|
1316
1316
|
return e.slots.header ? w("div", {
|
|
1317
1317
|
class: m.value
|
|
1318
1318
|
}, [e.slots.header()]) : t.headerRenderFunction ? w("div", {
|
|
1319
1319
|
class: m.value
|
|
1320
|
-
}, [t.headerRenderFunction()]) :
|
|
1320
|
+
}, [t.headerRenderFunction()]) : S();
|
|
1321
1321
|
}
|
|
1322
|
-
return () => t.showHeader &&
|
|
1322
|
+
return () => t.showHeader && k();
|
|
1323
1323
|
}
|
|
1324
|
-
const bt = /* @__PURE__ */
|
|
1324
|
+
const bt = /* @__PURE__ */ Pe({
|
|
1325
1325
|
name: "FSection",
|
|
1326
1326
|
props: Ut,
|
|
1327
1327
|
emits: ["click"],
|
|
1328
1328
|
setup(t, e) {
|
|
1329
|
-
const n =
|
|
1329
|
+
const n = E(), o = E(), i = E(t.customClass), r = H(() => t.enableAccordion), a = E(t.expandStatus), c = H(() => t.buttonPosition), s = E(!1), l = fr(t, e, a, n, o, s), p = kn(t, e), u = H(() => {
|
|
1330
1330
|
const g = {
|
|
1331
1331
|
"f-section": !0,
|
|
1332
1332
|
"f-section-accordion": r.value === "default",
|
|
@@ -1346,20 +1346,20 @@ const bt = /* @__PURE__ */ Fe({
|
|
|
1346
1346
|
class: d.value
|
|
1347
1347
|
}, [e.slots.extend()]);
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function h() {
|
|
1350
1350
|
return w("div", {
|
|
1351
1351
|
class: m.value
|
|
1352
1352
|
}, [c.value === "inContent" && p(), e.slots.default && e.slots.default()]);
|
|
1353
1353
|
}
|
|
1354
|
-
return xe(() => t.expandStatus, (g,
|
|
1355
|
-
g !==
|
|
1354
|
+
return xe(() => t.expandStatus, (g, B) => {
|
|
1355
|
+
g !== B && (a.value = g);
|
|
1356
1356
|
}), Oe(() => {
|
|
1357
1357
|
n.value && n.value && (o.value = n.value.parentElement);
|
|
1358
1358
|
}), () => t.visible ? w("div", {
|
|
1359
1359
|
class: u.value,
|
|
1360
1360
|
ref: n,
|
|
1361
1361
|
style: t.customStyle
|
|
1362
|
-
}, [l(), f(),
|
|
1362
|
+
}, [l(), f(), h()]) : null;
|
|
1363
1363
|
}
|
|
1364
1364
|
});
|
|
1365
1365
|
function pr() {
|
|
@@ -1377,7 +1377,7 @@ function pr() {
|
|
|
1377
1377
|
basalDragulaRuleForContainer: t
|
|
1378
1378
|
};
|
|
1379
1379
|
}
|
|
1380
|
-
const Ze =
|
|
1380
|
+
const Ze = E(0);
|
|
1381
1381
|
function mr(t, e) {
|
|
1382
1382
|
const n = e.getBoundingClientRect(), o = t.getBoundingClientRect(), i = o.top >= n.top, r = o.top <= n.bottom;
|
|
1383
1383
|
return i && r;
|
|
@@ -1446,7 +1446,7 @@ function gr(t) {
|
|
|
1446
1446
|
r.top !== 0 && a && Wt(e);
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
|
-
const yr =
|
|
1449
|
+
const yr = E(0);
|
|
1450
1450
|
function br() {
|
|
1451
1451
|
yr.value++;
|
|
1452
1452
|
}
|
|
@@ -1989,9 +1989,9 @@ class xt {
|
|
|
1989
1989
|
const { expressions: d } = m;
|
|
1990
1990
|
let f = d.find((g) => g.target === c);
|
|
1991
1991
|
f || (f = { target: c, rules: [], targetType: s }, d.push(f));
|
|
1992
|
-
const
|
|
1993
|
-
if (
|
|
1994
|
-
|
|
1992
|
+
const h = f.rules.find((g) => g.type === l);
|
|
1993
|
+
if (h)
|
|
1994
|
+
h.value = p, h.message = u;
|
|
1995
1995
|
else {
|
|
1996
1996
|
const g = { id: r, type: l, value: p, message: u };
|
|
1997
1997
|
f.rules.push(g);
|
|
@@ -2210,7 +2210,7 @@ class xr extends xt {
|
|
|
2210
2210
|
};
|
|
2211
2211
|
}
|
|
2212
2212
|
}
|
|
2213
|
-
class
|
|
2213
|
+
class Sr {
|
|
2214
2214
|
getTemplateRule(e, n) {
|
|
2215
2215
|
const o = n == null ? void 0 : n.formSchemaUtils, i = o == null ? void 0 : o.getFormTemplateRule(), r = { canAccept: !0, canDelete: !0, canMove: !0 };
|
|
2216
2216
|
if (!i)
|
|
@@ -2297,8 +2297,8 @@ class Tr {
|
|
|
2297
2297
|
return !i;
|
|
2298
2298
|
}
|
|
2299
2299
|
getComponentContext(e) {
|
|
2300
|
-
var
|
|
2301
|
-
const n = e.schema, o = n.appearance && n.appearance.class || "", i = o.split(" ") || [], r = n.contents || [], a = r.length ? r[0] : null, c = a && a.appearance ? a.appearance.class : "", s = c ? c.split(" ") : [], l = (
|
|
2300
|
+
var h, g, B, S;
|
|
2301
|
+
const n = e.schema, o = n.appearance && n.appearance.class || "", i = o.split(" ") || [], r = n.contents || [], a = r.length ? r[0] : null, c = a && a.appearance ? a.appearance.class : "", s = c ? c.split(" ") : [], l = (h = a == null ? void 0 : a.contents) != null && h.length ? a == null ? void 0 : a.contents[0] : null, p = l && l.appearance ? l.appearance.class : "", u = p ? p.split(" ") : [], m = n.type === "component" ? (B = (g = e.parent) == null ? void 0 : g.parent) == null ? void 0 : B.schema : (S = e.parent) == null ? void 0 : S.schema, d = m && m.appearance && m.appearance.class || "", f = d ? d.split(" ") : [];
|
|
2302
2302
|
return {
|
|
2303
2303
|
componentClass: o,
|
|
2304
2304
|
componentClassList: i,
|
|
@@ -2317,13 +2317,13 @@ class Tr {
|
|
|
2317
2317
|
}
|
|
2318
2318
|
}
|
|
2319
2319
|
var ze = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2320
|
-
function
|
|
2320
|
+
function Tr(t) {
|
|
2321
2321
|
return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
|
|
2322
2322
|
}
|
|
2323
2323
|
function ht(t) {
|
|
2324
2324
|
throw new Error('Could not dynamically require "' + t + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
2325
2325
|
}
|
|
2326
|
-
var
|
|
2326
|
+
var Pn = { exports: {} };
|
|
2327
2327
|
(function(t, e) {
|
|
2328
2328
|
(function(n) {
|
|
2329
2329
|
t.exports = n();
|
|
@@ -2341,8 +2341,8 @@ var Fn = { exports: {} };
|
|
|
2341
2341
|
}
|
|
2342
2342
|
var d = i[l] = { exports: {} };
|
|
2343
2343
|
o[l][0].call(d.exports, function(f) {
|
|
2344
|
-
var
|
|
2345
|
-
return a(
|
|
2344
|
+
var h = o[l][1][f];
|
|
2345
|
+
return a(h || f);
|
|
2346
2346
|
}, d, d.exports, n, o, i, r);
|
|
2347
2347
|
}
|
|
2348
2348
|
return i[l].exports;
|
|
@@ -2373,11 +2373,11 @@ var Fn = { exports: {} };
|
|
|
2373
2373
|
2: [function(n, o, i) {
|
|
2374
2374
|
(function(r) {
|
|
2375
2375
|
var a = n("contra/emitter"), c = n("crossvent"), s = n("./classes"), l = document, p = l.documentElement;
|
|
2376
|
-
function u(
|
|
2377
|
-
var
|
|
2378
|
-
|
|
2379
|
-
var
|
|
2380
|
-
G.moves === void 0 && (G.moves =
|
|
2376
|
+
function u(M, y) {
|
|
2377
|
+
var v = arguments.length;
|
|
2378
|
+
v === 1 && Array.isArray(M) === !1 && (y = M, M = []);
|
|
2379
|
+
var T, F, P, A, I, O, z, L, J, K = null, te, Y, ae = !1, ue = 0, ie, G = y || {};
|
|
2380
|
+
G.moves === void 0 && (G.moves = S), G.accepts === void 0 && (G.accepts = S), G.invalid === void 0 && (G.invalid = st), G.containers === void 0 && (G.containers = M || []), G.isContainer === void 0 && (G.isContainer = B), G.copy === void 0 && (G.copy = !1), G.copySortSource === void 0 && (G.copySortSource = !1), G.revertOnSpill === void 0 && (G.revertOnSpill = !1), G.removeOnSpill === void 0 && (G.removeOnSpill = !1), G.direction === void 0 && (G.direction = "vertical"), G.ignoreInputTextSelection === void 0 && (G.ignoreInputTextSelection = !0), G.mirrorContainer === void 0 && (G.mirrorContainer = l.body);
|
|
2381
2381
|
var re = a({
|
|
2382
2382
|
containers: G.containers,
|
|
2383
2383
|
start: Be,
|
|
@@ -2388,143 +2388,143 @@ var Fn = { exports: {} };
|
|
|
2388
2388
|
canMove: je,
|
|
2389
2389
|
dragging: !1
|
|
2390
2390
|
});
|
|
2391
|
-
return G.removeOnSpill === !0 && re.on("over",
|
|
2392
|
-
function qe(
|
|
2393
|
-
return re.containers.indexOf(
|
|
2391
|
+
return G.removeOnSpill === !0 && re.on("over", Tt).on("out", Mt), $e(), re;
|
|
2392
|
+
function qe(D) {
|
|
2393
|
+
return re.containers.indexOf(D) !== -1 || G.isContainer(D);
|
|
2394
2394
|
}
|
|
2395
|
-
function $e(
|
|
2396
|
-
var _ =
|
|
2395
|
+
function $e(D) {
|
|
2396
|
+
var _ = D ? "remove" : "add";
|
|
2397
2397
|
f(p, _, "mousedown", le), f(p, _, "mouseup", Le);
|
|
2398
2398
|
}
|
|
2399
|
-
function Me(
|
|
2400
|
-
var _ =
|
|
2399
|
+
function Me(D) {
|
|
2400
|
+
var _ = D ? "remove" : "add";
|
|
2401
2401
|
f(p, _, "mousemove", at);
|
|
2402
2402
|
}
|
|
2403
|
-
function et(
|
|
2404
|
-
var _ =
|
|
2403
|
+
function et(D) {
|
|
2404
|
+
var _ = D ? "remove" : "add";
|
|
2405
2405
|
c[_](p, "selectstart", tt), c[_](p, "click", tt);
|
|
2406
2406
|
}
|
|
2407
2407
|
function _e() {
|
|
2408
2408
|
$e(!0), Le({});
|
|
2409
2409
|
}
|
|
2410
|
-
function tt(
|
|
2411
|
-
te &&
|
|
2410
|
+
function tt(D) {
|
|
2411
|
+
te && D.preventDefault();
|
|
2412
2412
|
}
|
|
2413
|
-
function le(
|
|
2414
|
-
|
|
2415
|
-
var _ =
|
|
2413
|
+
function le(D) {
|
|
2414
|
+
A = D.clientX, I = D.clientY;
|
|
2415
|
+
var _ = h(D) !== 1 || D.metaKey || D.ctrlKey;
|
|
2416
2416
|
if (!_) {
|
|
2417
|
-
var U =
|
|
2418
|
-
X && (te = X, Me(),
|
|
2417
|
+
var U = D.target, X = Ne(U);
|
|
2418
|
+
X && (te = X, Me(), D.type === "mousedown" && (x(U) ? U.focus() : D.preventDefault()));
|
|
2419
2419
|
}
|
|
2420
2420
|
}
|
|
2421
|
-
function at(
|
|
2421
|
+
function at(D) {
|
|
2422
2422
|
if (te) {
|
|
2423
|
-
if (
|
|
2423
|
+
if (h(D) === 0) {
|
|
2424
2424
|
Le({});
|
|
2425
2425
|
return;
|
|
2426
2426
|
}
|
|
2427
|
-
if (!(
|
|
2427
|
+
if (!(D.clientX !== void 0 && Math.abs(D.clientX - A) <= (G.slideFactorX || 0) && D.clientY !== void 0 && Math.abs(D.clientY - I) <= (G.slideFactorY || 0))) {
|
|
2428
2428
|
if (G.ignoreInputTextSelection) {
|
|
2429
|
-
var _ =
|
|
2430
|
-
if (
|
|
2429
|
+
var _ = j("clientX", D) || 0, U = j("clientY", D) || 0, X = l.elementFromPoint(_, U);
|
|
2430
|
+
if (x(X))
|
|
2431
2431
|
return;
|
|
2432
2432
|
}
|
|
2433
2433
|
var ne = te;
|
|
2434
|
-
Me(!0), et(), Ue(), Ae(ne), s.add(L ||
|
|
2434
|
+
Me(!0), et(), Ue(), Ae(ne), s.add(L || P, "gu-transit"), Et(), Bt(), ue = 0, Re(D);
|
|
2435
2435
|
}
|
|
2436
2436
|
}
|
|
2437
2437
|
}
|
|
2438
|
-
function Ne(
|
|
2439
|
-
if (!(re.dragging &&
|
|
2440
|
-
for (var _ =
|
|
2441
|
-
if (G.invalid(
|
|
2438
|
+
function Ne(D) {
|
|
2439
|
+
if (!(re.dragging && T) && !qe(D)) {
|
|
2440
|
+
for (var _ = D; C(D) && qe(C(D)) === !1; )
|
|
2441
|
+
if (G.invalid(D, _) || (D = C(D), !D))
|
|
2442
2442
|
return;
|
|
2443
|
-
var U = C(
|
|
2444
|
-
if (U && !G.invalid(
|
|
2445
|
-
var X = G.moves(
|
|
2443
|
+
var U = C(D);
|
|
2444
|
+
if (U && !G.invalid(D, _)) {
|
|
2445
|
+
var X = G.moves(D, U, _, $(D));
|
|
2446
2446
|
if (X)
|
|
2447
2447
|
return {
|
|
2448
|
-
item:
|
|
2448
|
+
item: D,
|
|
2449
2449
|
source: U
|
|
2450
2450
|
};
|
|
2451
2451
|
}
|
|
2452
2452
|
}
|
|
2453
2453
|
}
|
|
2454
|
-
function je(
|
|
2455
|
-
return !!Ne(
|
|
2454
|
+
function je(D) {
|
|
2455
|
+
return !!Ne(D);
|
|
2456
2456
|
}
|
|
2457
|
-
function Be(
|
|
2458
|
-
var _ = Ne(
|
|
2457
|
+
function Be(D) {
|
|
2458
|
+
var _ = Ne(D);
|
|
2459
2459
|
_ && Ae(_);
|
|
2460
2460
|
}
|
|
2461
|
-
function Ae(
|
|
2462
|
-
Ot(
|
|
2461
|
+
function Ae(D) {
|
|
2462
|
+
Ot(D.item, D.source) && (L = D.item.cloneNode(!0), re.emit("cloned", L, D.item, "copy")), F = D.source, P = D.item, O = z = $(D.item), re.dragging = !0, re.emit("drag", P, F);
|
|
2463
2463
|
}
|
|
2464
2464
|
function st() {
|
|
2465
2465
|
return !1;
|
|
2466
2466
|
}
|
|
2467
2467
|
function Ue() {
|
|
2468
2468
|
if (re.dragging) {
|
|
2469
|
-
var
|
|
2470
|
-
nt(
|
|
2469
|
+
var D = L || P;
|
|
2470
|
+
nt(D, C(D));
|
|
2471
2471
|
}
|
|
2472
2472
|
}
|
|
2473
2473
|
function De() {
|
|
2474
2474
|
te = !1, Me(!0), et(!0);
|
|
2475
2475
|
}
|
|
2476
|
-
function Le(
|
|
2476
|
+
function Le(D) {
|
|
2477
2477
|
if (De(), !!re.dragging) {
|
|
2478
|
-
var _ = L ||
|
|
2479
|
-
oe && (L && G.copySortSource || !L || oe !==
|
|
2478
|
+
var _ = L || P, U = j("clientX", D) || 0, X = j("clientY", D) || 0, ne = g(T, U, X), oe = de(ne, U, X);
|
|
2479
|
+
oe && (L && G.copySortSource || !L || oe !== F) ? nt(_, oe) : G.removeOnSpill ? ot() : q();
|
|
2480
2480
|
}
|
|
2481
2481
|
}
|
|
2482
|
-
function nt(
|
|
2483
|
-
var U = C(
|
|
2484
|
-
L && G.copySortSource && _ ===
|
|
2482
|
+
function nt(D, _) {
|
|
2483
|
+
var U = C(D);
|
|
2484
|
+
L && G.copySortSource && _ === F && U.removeChild(P), ce(_) ? re.emit("cancel", D, F) : re.emit("drop", D, _, F, z), Z();
|
|
2485
2485
|
}
|
|
2486
2486
|
function ot() {
|
|
2487
2487
|
if (re.dragging) {
|
|
2488
|
-
var
|
|
2489
|
-
_ && _.removeChild(
|
|
2488
|
+
var D = L || P, _ = C(D);
|
|
2489
|
+
_ && _.removeChild(D), re.emit(L ? "cancel" : "remove", D, _, F), Z();
|
|
2490
2490
|
}
|
|
2491
2491
|
}
|
|
2492
|
-
function q(
|
|
2492
|
+
function q(D) {
|
|
2493
2493
|
if (re.dragging) {
|
|
2494
|
-
var _ = arguments.length > 0 ?
|
|
2495
|
-
ne === !1 && _ && (L ? X && X.removeChild(L) :
|
|
2494
|
+
var _ = arguments.length > 0 ? D : G.revertOnSpill, U = L || P, X = C(U), ne = ce(X);
|
|
2495
|
+
ne === !1 && _ && (L ? X && X.removeChild(L) : F.insertBefore(U, O)), ne || _ ? re.emit("cancel", U, F, F) : re.emit("drop", U, X, F, z), Z();
|
|
2496
2496
|
}
|
|
2497
2497
|
}
|
|
2498
2498
|
function Z() {
|
|
2499
|
-
var
|
|
2500
|
-
De(), kt(), It(),
|
|
2499
|
+
var D = L || P;
|
|
2500
|
+
De(), kt(), It(), D && s.rm(D, "gu-transit"), J && clearTimeout(J), re.dragging = !1, K && re.emit("out", D, K, F), re.emit("dragend", D, ue), F = P = L = O = z = J = K = null;
|
|
2501
2501
|
}
|
|
2502
|
-
function ce(
|
|
2502
|
+
function ce(D, _) {
|
|
2503
2503
|
var U;
|
|
2504
|
-
return _ !== void 0 ? U = _ :
|
|
2504
|
+
return _ !== void 0 ? U = _ : T ? U = z : U = $(L || P), D === F && U === O;
|
|
2505
2505
|
}
|
|
2506
|
-
function de(
|
|
2507
|
-
for (var X =
|
|
2506
|
+
function de(D, _, U) {
|
|
2507
|
+
for (var X = D; X && !ne(); )
|
|
2508
2508
|
X = C(X);
|
|
2509
2509
|
return X;
|
|
2510
2510
|
function ne() {
|
|
2511
2511
|
var oe = qe(X);
|
|
2512
2512
|
if (oe === !1)
|
|
2513
2513
|
return !1;
|
|
2514
|
-
var
|
|
2515
|
-
return be ? !0 : G.accepts(
|
|
2514
|
+
var Te = mt(X, D), ye = vt(X, Te, _, U), be = ce(X, ye);
|
|
2515
|
+
return be ? !0 : G.accepts(P, X, F, ye);
|
|
2516
2516
|
}
|
|
2517
2517
|
}
|
|
2518
|
-
function Re(
|
|
2519
|
-
if (!
|
|
2518
|
+
function Re(D) {
|
|
2519
|
+
if (!T)
|
|
2520
2520
|
return;
|
|
2521
|
-
|
|
2522
|
-
var _ =
|
|
2523
|
-
|
|
2524
|
-
var X = L ||
|
|
2525
|
-
(
|
|
2521
|
+
D.preventDefault();
|
|
2522
|
+
var _ = j("clientX", D) || 0, U = j("clientY", D) || 0;
|
|
2523
|
+
T.style.left = _ - 2 + "px", T.style.top = U - 2 + "px";
|
|
2524
|
+
var X = L || P, ne = g(T, _, U), oe = de(ne, _, U), Te = oe !== null && oe !== K;
|
|
2525
|
+
(Te || oe === null) && (Ce(), K = oe, ke()), Rt(ne, U);
|
|
2526
2526
|
var ye = C(X);
|
|
2527
|
-
if (oe ===
|
|
2527
|
+
if (oe === F && L && !G.copySortSource) {
|
|
2528
2528
|
ye && ye.removeChild(X);
|
|
2529
2529
|
return;
|
|
2530
2530
|
}
|
|
@@ -2532,76 +2532,76 @@ var Fn = { exports: {} };
|
|
|
2532
2532
|
if (ae = lt(Ee, oe), Ee !== null)
|
|
2533
2533
|
be = vt(oe, Ee, _, U);
|
|
2534
2534
|
else if (G.revertOnSpill === !0 && !L)
|
|
2535
|
-
be =
|
|
2535
|
+
be = O, oe = F;
|
|
2536
2536
|
else {
|
|
2537
2537
|
L && ye && ye.removeChild(X), L && Y && (Y.style.display = "none");
|
|
2538
2538
|
return;
|
|
2539
2539
|
}
|
|
2540
|
-
Y.style.display = "block",
|
|
2540
|
+
Y.style.display = "block", St(be, X, Te), be ? Ft(Ee, be) : Dt(oe);
|
|
2541
2541
|
function fe(ve) {
|
|
2542
|
-
re.emit(ve, X, K,
|
|
2542
|
+
re.emit(ve, X, K, F);
|
|
2543
2543
|
}
|
|
2544
2544
|
function ke() {
|
|
2545
|
-
|
|
2545
|
+
Te && fe("over");
|
|
2546
2546
|
}
|
|
2547
2547
|
function Ce() {
|
|
2548
2548
|
K && fe("out");
|
|
2549
2549
|
}
|
|
2550
2550
|
}
|
|
2551
|
-
function
|
|
2552
|
-
(
|
|
2551
|
+
function St(D, _, U) {
|
|
2552
|
+
(D === _ || D === $(_)) && (z = $(_)), (D === null && U || D !== _ && D !== $(_)) && (z = D);
|
|
2553
2553
|
}
|
|
2554
|
-
function
|
|
2555
|
-
s.rm(
|
|
2554
|
+
function Tt(D) {
|
|
2555
|
+
s.rm(D, "gu-hide");
|
|
2556
2556
|
}
|
|
2557
|
-
function Mt(
|
|
2558
|
-
re.dragging && s.add(
|
|
2557
|
+
function Mt(D) {
|
|
2558
|
+
re.dragging && s.add(D, "gu-hide");
|
|
2559
2559
|
}
|
|
2560
2560
|
function Bt() {
|
|
2561
|
-
|
|
2561
|
+
T || (T = document.createElement("div"), T.style = "background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;", T.innerHTML = G.getMirrorText && G.getMirrorText(P) || "控件", s.add(T, "gu-mirror"), G.mirrorContainer.appendChild(T), f(p, "add", "mousemove", Re), s.add(G.mirrorContainer, "gu-unselectable"), re.emit("cloned", T, P, "mirror"));
|
|
2562
2562
|
}
|
|
2563
2563
|
function Et() {
|
|
2564
|
-
if (Y = document.createElement("div"), s.add(Y, "gu-insertion"),
|
|
2565
|
-
var
|
|
2566
|
-
Y.style.left =
|
|
2564
|
+
if (Y = document.createElement("div"), s.add(Y, "gu-insertion"), P) {
|
|
2565
|
+
var D = P.getBoundingClientRect();
|
|
2566
|
+
Y.style.left = D.left + "px", Y.style.top = D.top + "px";
|
|
2567
2567
|
}
|
|
2568
2568
|
ae = !1, G.mirrorContainer.appendChild(Y);
|
|
2569
2569
|
}
|
|
2570
2570
|
function kt() {
|
|
2571
|
-
|
|
2571
|
+
T && (s.rm(G.mirrorContainer, "gu-unselectable"), f(p, "remove", "mousemove", Re), C(T).removeChild(T), T = null);
|
|
2572
2572
|
}
|
|
2573
2573
|
function It() {
|
|
2574
2574
|
Y && (C(Y).removeChild(Y), Y = null);
|
|
2575
2575
|
}
|
|
2576
|
-
function mt(
|
|
2577
|
-
for (var U = _; U !==
|
|
2576
|
+
function mt(D, _) {
|
|
2577
|
+
for (var U = _; U !== D && C(U) !== D; )
|
|
2578
2578
|
U = C(U);
|
|
2579
2579
|
return U === p ? null : U;
|
|
2580
2580
|
}
|
|
2581
|
-
function lt(
|
|
2581
|
+
function lt(D, _) {
|
|
2582
2582
|
if (!_)
|
|
2583
2583
|
return ae;
|
|
2584
|
-
var U =
|
|
2584
|
+
var U = D || _ && _.lastElementChild;
|
|
2585
2585
|
if (!U)
|
|
2586
2586
|
return !0;
|
|
2587
|
-
var X = getComputedStyle(
|
|
2587
|
+
var X = getComputedStyle(D), ne = /^inline/.test(X.getPropertyValue("display")) || /^(left|right)$/.test(X.getPropertyValue("float"));
|
|
2588
2588
|
if (ne)
|
|
2589
2589
|
return !0;
|
|
2590
2590
|
if (_) {
|
|
2591
|
-
var oe = getComputedStyle(_),
|
|
2592
|
-
if (/flex$/.test(
|
|
2591
|
+
var oe = getComputedStyle(_), Te = oe.getPropertyValue("display");
|
|
2592
|
+
if (/flex$/.test(Te)) {
|
|
2593
2593
|
var ye = oe.getPropertyValue("flex-direction") || "row";
|
|
2594
2594
|
if (ye === "row" || ye === "row-reverse")
|
|
2595
|
-
return !
|
|
2595
|
+
return !Pt(_);
|
|
2596
2596
|
}
|
|
2597
2597
|
return !1;
|
|
2598
2598
|
}
|
|
2599
2599
|
return !0;
|
|
2600
2600
|
}
|
|
2601
|
-
function
|
|
2602
|
-
if (!
|
|
2601
|
+
function Pt(D) {
|
|
2602
|
+
if (!D.children || !D.children.length)
|
|
2603
2603
|
return !1;
|
|
2604
|
-
for (const _ of Array.from(
|
|
2604
|
+
for (const _ of Array.from(D.children)) {
|
|
2605
2605
|
const X = (_.className && _.className.split(" ") || []).filter((ne) => /^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(ne));
|
|
2606
2606
|
if (!X.length)
|
|
2607
2607
|
return !1;
|
|
@@ -2613,30 +2613,30 @@ var Fn = { exports: {} };
|
|
|
2613
2613
|
}
|
|
2614
2614
|
return !0;
|
|
2615
2615
|
}
|
|
2616
|
-
function
|
|
2616
|
+
function Ft(D, _) {
|
|
2617
2617
|
const U = _.getBoundingClientRect();
|
|
2618
2618
|
if (Y.style.left = U.left + "px", Y.style.top = U.top + "px", ae) {
|
|
2619
|
-
if (Y.style.height = U.height + "px", Y.style.width = "4px",
|
|
2620
|
-
const X =
|
|
2619
|
+
if (Y.style.height = U.height + "px", Y.style.width = "4px", D) {
|
|
2620
|
+
const X = D.getBoundingClientRect();
|
|
2621
2621
|
X.top !== U.top && (Y.style.left = X.right + "px", Y.style.top = X.top + "px", Y.style.height = X.height + "px");
|
|
2622
2622
|
}
|
|
2623
2623
|
} else if (Y.style.height = "4px", Y.style.width = U.width + "px", ie) {
|
|
2624
2624
|
const X = ie.getBoundingClientRect();
|
|
2625
2625
|
U.top < X.top && (Y.style.display = "none");
|
|
2626
2626
|
}
|
|
2627
|
-
_ ===
|
|
2627
|
+
_ === P && P && (Y.style.display = "none");
|
|
2628
2628
|
}
|
|
2629
|
-
function Dt(
|
|
2629
|
+
function Dt(D) {
|
|
2630
2630
|
z = null;
|
|
2631
|
-
var _ =
|
|
2631
|
+
var _ = D.lastElementChild;
|
|
2632
2632
|
if (_) {
|
|
2633
2633
|
var U = _.getBoundingClientRect();
|
|
2634
|
-
ae ? (Y.style.left = U.right + "px", Y.style.top = U.top + "px", Y.style.height = U.height + "px", Y.style.width = "4px") : (Y.style.left = U.left + "px", Y.style.top = U.bottom + "px", Y.style.height = "4px", Y.style.width = U.width + "px"), _ ===
|
|
2634
|
+
ae ? (Y.style.left = U.right + "px", Y.style.top = U.top + "px", Y.style.height = U.height + "px", Y.style.width = "4px") : (Y.style.left = U.left + "px", Y.style.top = U.bottom + "px", Y.style.height = "4px", Y.style.width = U.width + "px"), _ === P && P && (Y.style.display = "none");
|
|
2635
2635
|
} else
|
|
2636
2636
|
Y.style.display = "none";
|
|
2637
2637
|
}
|
|
2638
|
-
function Rt(
|
|
2639
|
-
if (!G.mirrorContainer.contains(
|
|
2638
|
+
function Rt(D, _) {
|
|
2639
|
+
if (!G.mirrorContainer.contains(D) || !window.scrollContainerList || !Array.from(window.scrollContainerList).length || (ie = m(D), !ie || !ie.contains(D)))
|
|
2640
2640
|
return;
|
|
2641
2641
|
const U = document.querySelector(".dgComponentSelected"), X = ie.getBoundingClientRect();
|
|
2642
2642
|
if (_ - 30 < X.top && ie.scrollTop > 0) {
|
|
@@ -2649,13 +2649,13 @@ var Fn = { exports: {} };
|
|
|
2649
2649
|
ie.scrollBy(0, oe), U && ie.contains(U) && (ue = ue + oe);
|
|
2650
2650
|
}
|
|
2651
2651
|
}
|
|
2652
|
-
function vt(
|
|
2653
|
-
var ne = G.direction === "horizontal", oe = G.direction === "mixed",
|
|
2654
|
-
return
|
|
2652
|
+
function vt(D, _, U, X) {
|
|
2653
|
+
var ne = G.direction === "horizontal", oe = G.direction === "mixed", Te = _ !== D ? be() : ye();
|
|
2654
|
+
return Te;
|
|
2655
2655
|
function ye() {
|
|
2656
|
-
var fe =
|
|
2656
|
+
var fe = D.children.length, ke, Ce, ve;
|
|
2657
2657
|
for (ke = 0; ke < fe; ke++)
|
|
2658
|
-
if (Ce =
|
|
2658
|
+
if (Ce = D.children[ke], ve = Ce.getBoundingClientRect(), ne && ve.left + ve.width / 2 > U || !oe && !ne && ve.top + ve.height / 2 > X || oe && ve.left + ve.width > U && ve.top + ve.height > X)
|
|
2659
2659
|
return Ce;
|
|
2660
2660
|
return null;
|
|
2661
2661
|
}
|
|
@@ -2665,109 +2665,109 @@ var Fn = { exports: {} };
|
|
|
2665
2665
|
var ke = X - fe.top, Ce = U - fe.left, ve = fe.bottom - X, ct = fe.right - U, ut = Math.min(Ce, ct, ke, ve), dt;
|
|
2666
2666
|
return ae ? dt = ct < Ce : dt = ve === ut || ct === ut || Ce === ut, Ee(dt);
|
|
2667
2667
|
}
|
|
2668
|
-
return Ee(ne ? U > fe.left +
|
|
2668
|
+
return Ee(ne ? U > fe.left + k(fe) / 2 : X > fe.top + b(fe) / 2);
|
|
2669
2669
|
}
|
|
2670
2670
|
function Ee(fe) {
|
|
2671
|
-
return fe ?
|
|
2671
|
+
return fe ? $(_) : _;
|
|
2672
2672
|
}
|
|
2673
2673
|
}
|
|
2674
|
-
function Ot(
|
|
2675
|
-
return typeof G.copy == "boolean" ? G.copy : G.copy(
|
|
2674
|
+
function Ot(D, _) {
|
|
2675
|
+
return typeof G.copy == "boolean" ? G.copy : G.copy(D, _);
|
|
2676
2676
|
}
|
|
2677
2677
|
}
|
|
2678
|
-
function m(
|
|
2678
|
+
function m(M) {
|
|
2679
2679
|
const y = Array.from(window.scrollContainerList);
|
|
2680
2680
|
if (y.length === 1) {
|
|
2681
|
-
const
|
|
2682
|
-
return document.getElementById(
|
|
2681
|
+
const T = Array.from(window.scrollContainerList)[0];
|
|
2682
|
+
return document.getElementById(T);
|
|
2683
2683
|
}
|
|
2684
|
-
const
|
|
2685
|
-
for (const
|
|
2686
|
-
if (
|
|
2687
|
-
return
|
|
2684
|
+
const v = d(y);
|
|
2685
|
+
for (const T of v)
|
|
2686
|
+
if (T.contains(M))
|
|
2687
|
+
return T;
|
|
2688
2688
|
return null;
|
|
2689
2689
|
}
|
|
2690
|
-
function d(
|
|
2690
|
+
function d(M) {
|
|
2691
2691
|
const y = [];
|
|
2692
|
-
return
|
|
2693
|
-
const
|
|
2694
|
-
|
|
2695
|
-
}), y.sort((
|
|
2692
|
+
return M.forEach((v) => {
|
|
2693
|
+
const T = document.getElementById(v);
|
|
2694
|
+
T && y.push(T);
|
|
2695
|
+
}), y.sort((v, T) => v.contains(T) ? 1 : T.contains(v) ? -1 : 0), y;
|
|
2696
2696
|
}
|
|
2697
|
-
function f(
|
|
2698
|
-
var
|
|
2697
|
+
function f(M, y, v, T) {
|
|
2698
|
+
var F = {
|
|
2699
2699
|
mouseup: "touchend",
|
|
2700
2700
|
mousedown: "touchstart",
|
|
2701
2701
|
mousemove: "touchmove"
|
|
2702
|
-
},
|
|
2702
|
+
}, P = {
|
|
2703
2703
|
mouseup: "pointerup",
|
|
2704
2704
|
mousedown: "pointerdown",
|
|
2705
2705
|
mousemove: "pointermove"
|
|
2706
|
-
},
|
|
2706
|
+
}, A = {
|
|
2707
2707
|
mouseup: "MSPointerUp",
|
|
2708
2708
|
mousedown: "MSPointerDown",
|
|
2709
2709
|
mousemove: "MSPointerMove"
|
|
2710
2710
|
};
|
|
2711
|
-
r.navigator.pointerEnabled ? c[y](
|
|
2711
|
+
r.navigator.pointerEnabled ? c[y](M, P[v], T) : r.navigator.msPointerEnabled ? c[y](M, A[v], T) : (c[y](M, F[v], T), c[y](M, v, T));
|
|
2712
2712
|
}
|
|
2713
|
-
function
|
|
2714
|
-
if (
|
|
2715
|
-
return
|
|
2716
|
-
if (
|
|
2717
|
-
return
|
|
2718
|
-
if (
|
|
2719
|
-
return
|
|
2720
|
-
var y =
|
|
2713
|
+
function h(M) {
|
|
2714
|
+
if (M.touches !== void 0)
|
|
2715
|
+
return M.touches.length;
|
|
2716
|
+
if (M.which !== void 0 && M.which !== 0)
|
|
2717
|
+
return M.which;
|
|
2718
|
+
if (M.buttons !== void 0)
|
|
2719
|
+
return M.buttons;
|
|
2720
|
+
var y = M.button;
|
|
2721
2721
|
if (y !== void 0)
|
|
2722
2722
|
return y & 1 ? 1 : y & 2 ? 3 : y & 4 ? 2 : 0;
|
|
2723
2723
|
}
|
|
2724
|
-
function g(
|
|
2725
|
-
|
|
2726
|
-
var
|
|
2727
|
-
return
|
|
2724
|
+
function g(M, y, v) {
|
|
2725
|
+
M = M || {};
|
|
2726
|
+
var T = M.className || "", F;
|
|
2727
|
+
return M.className += " gu-hide", F = l.elementFromPoint(y, v), M.className = T, F;
|
|
2728
2728
|
}
|
|
2729
|
-
function
|
|
2729
|
+
function B() {
|
|
2730
2730
|
return !1;
|
|
2731
2731
|
}
|
|
2732
|
-
function
|
|
2732
|
+
function S() {
|
|
2733
2733
|
return !0;
|
|
2734
2734
|
}
|
|
2735
|
-
function
|
|
2736
|
-
return
|
|
2735
|
+
function k(M) {
|
|
2736
|
+
return M.width || M.right - M.left;
|
|
2737
2737
|
}
|
|
2738
|
-
function b(
|
|
2739
|
-
return
|
|
2738
|
+
function b(M) {
|
|
2739
|
+
return M.height || M.bottom - M.top;
|
|
2740
2740
|
}
|
|
2741
|
-
function C(
|
|
2742
|
-
return
|
|
2741
|
+
function C(M) {
|
|
2742
|
+
return M.parentNode === l ? null : M.parentNode;
|
|
2743
2743
|
}
|
|
2744
|
-
function
|
|
2745
|
-
return
|
|
2744
|
+
function x(M) {
|
|
2745
|
+
return M.tagName === "INPUT" || M.tagName === "TEXTAREA" || M.tagName === "SELECT" || R(M);
|
|
2746
2746
|
}
|
|
2747
|
-
function
|
|
2748
|
-
return !
|
|
2747
|
+
function R(M) {
|
|
2748
|
+
return !M || M.contentEditable === "false" ? !1 : M.contentEditable === "true" ? !0 : R(C(M));
|
|
2749
2749
|
}
|
|
2750
|
-
function
|
|
2751
|
-
return
|
|
2750
|
+
function $(M) {
|
|
2751
|
+
return M.nextElementSibling || y();
|
|
2752
2752
|
function y() {
|
|
2753
|
-
var
|
|
2753
|
+
var v = M;
|
|
2754
2754
|
do
|
|
2755
|
-
|
|
2756
|
-
while (
|
|
2757
|
-
return
|
|
2755
|
+
v = v.nextSibling;
|
|
2756
|
+
while (v && v.nodeType !== 1);
|
|
2757
|
+
return v;
|
|
2758
2758
|
}
|
|
2759
2759
|
}
|
|
2760
|
-
function
|
|
2761
|
-
return
|
|
2760
|
+
function N(M) {
|
|
2761
|
+
return M.targetTouches && M.targetTouches.length ? M.targetTouches[0] : M.changedTouches && M.changedTouches.length ? M.changedTouches[0] : M;
|
|
2762
2762
|
}
|
|
2763
|
-
function
|
|
2764
|
-
var
|
|
2763
|
+
function j(M, y) {
|
|
2764
|
+
var v = N(y), T = {
|
|
2765
2765
|
pageX: "clientX",
|
|
2766
2766
|
// IE8
|
|
2767
2767
|
pageY: "clientY"
|
|
2768
2768
|
// IE8
|
|
2769
2769
|
};
|
|
2770
|
-
return
|
|
2770
|
+
return M in T && !(M in v) && T[M] in v && (M = T[M]), v[M];
|
|
2771
2771
|
}
|
|
2772
2772
|
o.exports = u;
|
|
2773
2773
|
}).call(this, typeof ze < "u" ? ze : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
@@ -2800,10 +2800,10 @@ var Fn = { exports: {} };
|
|
|
2800
2800
|
else if (f === 0)
|
|
2801
2801
|
u = {};
|
|
2802
2802
|
else {
|
|
2803
|
-
var
|
|
2804
|
-
if (!
|
|
2803
|
+
var h = u[m];
|
|
2804
|
+
if (!h)
|
|
2805
2805
|
return s;
|
|
2806
|
-
|
|
2806
|
+
h.splice(h.indexOf(d), 1);
|
|
2807
2807
|
}
|
|
2808
2808
|
return s;
|
|
2809
2809
|
}, s.emit = function() {
|
|
@@ -2812,11 +2812,11 @@ var Fn = { exports: {} };
|
|
|
2812
2812
|
}, s.emitterSnapshot = function(m) {
|
|
2813
2813
|
var d = (u[m] || []).slice(0);
|
|
2814
2814
|
return function() {
|
|
2815
|
-
var f = r(arguments),
|
|
2815
|
+
var f = r(arguments), h = this || s;
|
|
2816
2816
|
if (m === "error" && p.throws !== !1 && !d.length)
|
|
2817
2817
|
throw f.length === 1 ? f[0] : f;
|
|
2818
|
-
return d.forEach(function(
|
|
2819
|
-
p.async ? a(
|
|
2818
|
+
return d.forEach(function(B) {
|
|
2819
|
+
p.async ? a(B, f, h) : B.apply(h, f), B._once && s.off(m, B);
|
|
2820
2820
|
}), s;
|
|
2821
2821
|
};
|
|
2822
2822
|
}, s;
|
|
@@ -2825,67 +2825,67 @@ var Fn = { exports: {} };
|
|
|
2825
2825
|
6: [function(n, o, i) {
|
|
2826
2826
|
(function(r) {
|
|
2827
2827
|
var a = n("custom-event"), c = n("./eventmap"), s = r.document, l = m, p = f, u = [];
|
|
2828
|
-
r.addEventListener || (l = d, p =
|
|
2828
|
+
r.addEventListener || (l = d, p = h), o.exports = {
|
|
2829
2829
|
add: l,
|
|
2830
2830
|
remove: p,
|
|
2831
2831
|
fabricate: g
|
|
2832
2832
|
};
|
|
2833
|
-
function m(C,
|
|
2834
|
-
return C.addEventListener(
|
|
2833
|
+
function m(C, x, R, $) {
|
|
2834
|
+
return C.addEventListener(x, R, $);
|
|
2835
2835
|
}
|
|
2836
|
-
function d(C,
|
|
2837
|
-
return C.attachEvent("on" +
|
|
2836
|
+
function d(C, x, R) {
|
|
2837
|
+
return C.attachEvent("on" + x, S(C, x, R));
|
|
2838
2838
|
}
|
|
2839
|
-
function f(C,
|
|
2840
|
-
return C.removeEventListener(
|
|
2839
|
+
function f(C, x, R, $) {
|
|
2840
|
+
return C.removeEventListener(x, R, $);
|
|
2841
2841
|
}
|
|
2842
|
-
function
|
|
2843
|
-
var
|
|
2844
|
-
if (
|
|
2845
|
-
return C.detachEvent("on" +
|
|
2842
|
+
function h(C, x, R) {
|
|
2843
|
+
var $ = k(C, x, R);
|
|
2844
|
+
if ($)
|
|
2845
|
+
return C.detachEvent("on" + x, $);
|
|
2846
2846
|
}
|
|
2847
|
-
function g(C,
|
|
2848
|
-
var
|
|
2849
|
-
C.dispatchEvent ? C.dispatchEvent(
|
|
2850
|
-
function
|
|
2851
|
-
var
|
|
2852
|
-
return s.createEvent ? (
|
|
2847
|
+
function g(C, x, R) {
|
|
2848
|
+
var $ = c.indexOf(x) === -1 ? j() : N();
|
|
2849
|
+
C.dispatchEvent ? C.dispatchEvent($) : C.fireEvent("on" + x, $);
|
|
2850
|
+
function N() {
|
|
2851
|
+
var M;
|
|
2852
|
+
return s.createEvent ? (M = s.createEvent("Event"), M.initEvent(x, !0, !0)) : s.createEventObject && (M = s.createEventObject()), M;
|
|
2853
2853
|
}
|
|
2854
|
-
function
|
|
2855
|
-
return new a(
|
|
2854
|
+
function j() {
|
|
2855
|
+
return new a(x, { detail: R });
|
|
2856
2856
|
}
|
|
2857
2857
|
}
|
|
2858
|
-
function
|
|
2859
|
-
return function(
|
|
2860
|
-
var
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
},
|
|
2864
|
-
|
|
2865
|
-
},
|
|
2858
|
+
function B(C, x, R) {
|
|
2859
|
+
return function(N) {
|
|
2860
|
+
var j = N || r.event;
|
|
2861
|
+
j.target = j.target || j.srcElement, j.preventDefault = j.preventDefault || function() {
|
|
2862
|
+
j.returnValue = !1;
|
|
2863
|
+
}, j.stopPropagation = j.stopPropagation || function() {
|
|
2864
|
+
j.cancelBubble = !0;
|
|
2865
|
+
}, j.which = j.which || j.keyCode, R.call(C, j);
|
|
2866
2866
|
};
|
|
2867
2867
|
}
|
|
2868
|
-
function
|
|
2869
|
-
var
|
|
2868
|
+
function S(C, x, R) {
|
|
2869
|
+
var $ = k(C, x, R) || B(C, x, R);
|
|
2870
2870
|
return u.push({
|
|
2871
|
-
wrapper:
|
|
2871
|
+
wrapper: $,
|
|
2872
2872
|
element: C,
|
|
2873
|
-
type:
|
|
2874
|
-
fn:
|
|
2875
|
-
}),
|
|
2873
|
+
type: x,
|
|
2874
|
+
fn: R
|
|
2875
|
+
}), $;
|
|
2876
2876
|
}
|
|
2877
|
-
function
|
|
2878
|
-
var
|
|
2879
|
-
if (
|
|
2880
|
-
var
|
|
2881
|
-
return u.splice(
|
|
2877
|
+
function k(C, x, R) {
|
|
2878
|
+
var $ = b(C, x, R);
|
|
2879
|
+
if ($) {
|
|
2880
|
+
var N = u[$].wrapper;
|
|
2881
|
+
return u.splice($, 1), N;
|
|
2882
2882
|
}
|
|
2883
2883
|
}
|
|
2884
|
-
function b(C,
|
|
2885
|
-
var N
|
|
2886
|
-
for (
|
|
2887
|
-
if (
|
|
2888
|
-
return
|
|
2884
|
+
function b(C, x, R) {
|
|
2885
|
+
var $, N;
|
|
2886
|
+
for ($ = 0; $ < u.length; $++)
|
|
2887
|
+
if (N = u[$], N.element === C && N.type === x && N.fn === R)
|
|
2888
|
+
return $;
|
|
2889
2889
|
}
|
|
2890
2890
|
}).call(this, typeof ze < "u" ? ze : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
2891
2891
|
}, { "./eventmap": 7, "custom-event": 8 }],
|
|
@@ -2973,18 +2973,18 @@ var Fn = { exports: {} };
|
|
|
2973
2973
|
}
|
|
2974
2974
|
}
|
|
2975
2975
|
}
|
|
2976
|
-
var m = [], d = !1, f,
|
|
2976
|
+
var m = [], d = !1, f, h = -1;
|
|
2977
2977
|
function g() {
|
|
2978
|
-
!d || !f || (d = !1, f.length ? m = f.concat(m) :
|
|
2978
|
+
!d || !f || (d = !1, f.length ? m = f.concat(m) : h = -1, m.length && B());
|
|
2979
2979
|
}
|
|
2980
|
-
function
|
|
2980
|
+
function B() {
|
|
2981
2981
|
if (!d) {
|
|
2982
2982
|
var b = p(g);
|
|
2983
2983
|
d = !0;
|
|
2984
2984
|
for (var C = m.length; C; ) {
|
|
2985
|
-
for (f = m, m = []; ++
|
|
2986
|
-
f && f[
|
|
2987
|
-
|
|
2985
|
+
for (f = m, m = []; ++h < C; )
|
|
2986
|
+
f && f[h].run();
|
|
2987
|
+
h = -1, C = m.length;
|
|
2988
2988
|
}
|
|
2989
2989
|
f = null, d = !1, u(b);
|
|
2990
2990
|
}
|
|
@@ -2992,19 +2992,19 @@ var Fn = { exports: {} };
|
|
|
2992
2992
|
r.nextTick = function(b) {
|
|
2993
2993
|
var C = new Array(arguments.length - 1);
|
|
2994
2994
|
if (arguments.length > 1)
|
|
2995
|
-
for (var
|
|
2996
|
-
C[
|
|
2997
|
-
m.push(new
|
|
2995
|
+
for (var x = 1; x < arguments.length; x++)
|
|
2996
|
+
C[x - 1] = arguments[x];
|
|
2997
|
+
m.push(new S(b, C)), m.length === 1 && !d && p(B);
|
|
2998
2998
|
};
|
|
2999
|
-
function
|
|
2999
|
+
function S(b, C) {
|
|
3000
3000
|
this.fun = b, this.array = C;
|
|
3001
3001
|
}
|
|
3002
|
-
|
|
3002
|
+
S.prototype.run = function() {
|
|
3003
3003
|
this.fun.apply(null, this.array);
|
|
3004
3004
|
}, r.title = "browser", r.browser = !0, r.env = {}, r.argv = [], r.version = "", r.versions = {};
|
|
3005
|
-
function
|
|
3005
|
+
function k() {
|
|
3006
3006
|
}
|
|
3007
|
-
r.on =
|
|
3007
|
+
r.on = k, r.addListener = k, r.once = k, r.off = k, r.removeListener = k, r.removeAllListeners = k, r.emit = k, r.prependListener = k, r.prependOnceListener = k, r.listeners = function(b) {
|
|
3008
3008
|
return [];
|
|
3009
3009
|
}, r.binding = function(b) {
|
|
3010
3010
|
throw new Error("process.binding is not supported");
|
|
@@ -3053,9 +3053,9 @@ var Fn = { exports: {} };
|
|
|
3053
3053
|
d._onTimeout && d._onTimeout();
|
|
3054
3054
|
}, f));
|
|
3055
3055
|
}, i.setImmediate = typeof r == "function" ? r : function(d) {
|
|
3056
|
-
var f = u++,
|
|
3056
|
+
var f = u++, h = arguments.length < 2 ? !1 : l.call(arguments, 1);
|
|
3057
3057
|
return p[f] = !0, c(function() {
|
|
3058
|
-
p[f] && (
|
|
3058
|
+
p[f] && (h ? d.apply(null, h) : d.call(null), i.clearImmediate(f));
|
|
3059
3059
|
}), f;
|
|
3060
3060
|
}, i.clearImmediate = typeof a == "function" ? a : function(d) {
|
|
3061
3061
|
delete p[d];
|
|
@@ -3064,9 +3064,9 @@ var Fn = { exports: {} };
|
|
|
3064
3064
|
}, { "process/browser.js": 9, timers: 11 }]
|
|
3065
3065
|
}, {}, [2])(2);
|
|
3066
3066
|
});
|
|
3067
|
-
})(
|
|
3068
|
-
var Mr =
|
|
3069
|
-
const tn = /* @__PURE__ */
|
|
3067
|
+
})(Pn);
|
|
3068
|
+
var Mr = Pn.exports;
|
|
3069
|
+
const tn = /* @__PURE__ */ Tr(Mr), Br = {
|
|
3070
3070
|
showCloseButton: { type: Boolean, default: !0 },
|
|
3071
3071
|
position: { type: String, default: "top-center" },
|
|
3072
3072
|
timeout: { type: Number, default: 3e3 },
|
|
@@ -3083,7 +3083,7 @@ const tn = /* @__PURE__ */ Sr(Mr), Br = {
|
|
|
3083
3083
|
showCloseButton: { type: Boolean, default: !0 },
|
|
3084
3084
|
animate: { type: String, default: "fadeIn" },
|
|
3085
3085
|
options: { type: Object }
|
|
3086
|
-
}, Nt = /* @__PURE__ */
|
|
3086
|
+
}, Nt = /* @__PURE__ */ Pe({
|
|
3087
3087
|
name: "Toast",
|
|
3088
3088
|
props: Er,
|
|
3089
3089
|
emits: ["close", "click"],
|
|
@@ -3091,7 +3091,7 @@ const tn = /* @__PURE__ */ Sr(Mr), Br = {
|
|
|
3091
3091
|
const {
|
|
3092
3092
|
locale: n,
|
|
3093
3093
|
t: o
|
|
3094
|
-
} = Vt(), i =
|
|
3094
|
+
} = Vt(), i = E(t.animate), r = "fadeOut", a = H(() => t.options), c = E(!1), s = H(() => a.value.title && a.value.message), l = H(() => !a.value.title && a.value.message), p = H(() => {
|
|
3095
3095
|
const b = {
|
|
3096
3096
|
animated: c.value,
|
|
3097
3097
|
toast: !0,
|
|
@@ -3099,11 +3099,11 @@ const tn = /* @__PURE__ */ Sr(Mr), Br = {
|
|
|
3099
3099
|
};
|
|
3100
3100
|
return b[t.animate] = !1, b[r] = c.value, b["toasty-type-" + a.value.type] = !0, a.value.theme && (b[a.value.theme] = !0), b;
|
|
3101
3101
|
}), u = H(() => {
|
|
3102
|
-
const
|
|
3102
|
+
const x = `f-icon-${a.value && a.value.type ? a.value.type.replace("toasty-type-", "") : "default"}`, R = {
|
|
3103
3103
|
"f-icon": !0
|
|
3104
3104
|
};
|
|
3105
|
-
return
|
|
3106
|
-
}), m = H(() => a.value.title || a.value.message), d = H(() => t.showCloseButton), f = H(() => !!a.value.buttons || !!e.slots.default),
|
|
3105
|
+
return R[x] = !0, R;
|
|
3106
|
+
}), m = H(() => a.value.title || a.value.message), d = H(() => t.showCloseButton), f = H(() => !!a.value.buttons || !!e.slots.default), h = H(() => n.value === "en" ? {
|
|
3107
3107
|
wordBreak: "keep-all",
|
|
3108
3108
|
overflowWrap: "break-word"
|
|
3109
3109
|
} : {});
|
|
@@ -3112,21 +3112,21 @@ const tn = /* @__PURE__ */ Sr(Mr), Br = {
|
|
|
3112
3112
|
e.emit("close", a.value);
|
|
3113
3113
|
}, 200);
|
|
3114
3114
|
}
|
|
3115
|
-
function
|
|
3115
|
+
function B(b, C) {
|
|
3116
3116
|
}
|
|
3117
|
-
function
|
|
3117
|
+
function S(b) {
|
|
3118
3118
|
return `f-preten-link ${b.customClass ? b.customClass : ""}`;
|
|
3119
3119
|
}
|
|
3120
3120
|
xe(i, () => {
|
|
3121
3121
|
i.value;
|
|
3122
3122
|
});
|
|
3123
|
-
const
|
|
3123
|
+
const k = () => {
|
|
3124
3124
|
var b;
|
|
3125
3125
|
return w(ft, null, [w("div", {
|
|
3126
3126
|
class: "after-toast-msg text-right"
|
|
3127
3127
|
}, [!e.slots.default && ((b = a.value.buttons) == null ? void 0 : b.map((C) => w("span", {
|
|
3128
|
-
class:
|
|
3129
|
-
onClick: (
|
|
3128
|
+
class: S(C),
|
|
3129
|
+
onClick: (x) => void 0
|
|
3130
3130
|
}, [C.text]))), e.slots.default && e.slots.default()])]);
|
|
3131
3131
|
};
|
|
3132
3132
|
return () => w("div", {
|
|
@@ -3152,22 +3152,22 @@ const tn = /* @__PURE__ */ Sr(Mr), Br = {
|
|
|
3152
3152
|
}, null), w("p", {
|
|
3153
3153
|
class: "toast-msg",
|
|
3154
3154
|
innerHTML: a.value.message,
|
|
3155
|
-
style:
|
|
3156
|
-
}, null), f.value &&
|
|
3155
|
+
style: h.value
|
|
3156
|
+
}, null), f.value && k()]), l.value && (a.value.buttons ? w("div", {
|
|
3157
3157
|
class: "toast-title-btns-wrapper d-flex"
|
|
3158
3158
|
}, [w("h5", {
|
|
3159
3159
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
3160
|
-
style:
|
|
3160
|
+
style: h.value,
|
|
3161
3161
|
innerHTML: a.value.message
|
|
3162
3162
|
}, null), w("div", {
|
|
3163
3163
|
class: "after-toast-title text-right ml-auto"
|
|
3164
|
-
}, [
|
|
3164
|
+
}, [k()])]) : w("h5", {
|
|
3165
3165
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
3166
|
-
style:
|
|
3166
|
+
style: h.value,
|
|
3167
3167
|
innerHTML: a.value.message
|
|
3168
3168
|
}, null))])])]);
|
|
3169
3169
|
}
|
|
3170
|
-
}), gt = /* @__PURE__ */
|
|
3170
|
+
}), gt = /* @__PURE__ */ Pe({
|
|
3171
3171
|
name: "Notify",
|
|
3172
3172
|
props: Br,
|
|
3173
3173
|
emits: ["close", "empty"],
|
|
@@ -3179,7 +3179,7 @@ const tn = /* @__PURE__ */ Sr(Mr), Br = {
|
|
|
3179
3179
|
right: 12,
|
|
3180
3180
|
top: 20,
|
|
3181
3181
|
bottom: 12
|
|
3182
|
-
}, i =
|
|
3182
|
+
}, i = E(), r = E(t.options), a = E(t.showCloseButton), c = H(() => t.position || "bottom-right"), s = H(() => t.timeout != null ? t.timeout : 3e3), l = H(() => {
|
|
3183
3183
|
const m = t.bottom ? t.bottom : o.bottom, d = t.top ? t.top : o.top, f = {
|
|
3184
3184
|
transition: "all 0.2s ease",
|
|
3185
3185
|
left: c.value.indexOf("left") > -1 ? `${t.left ? t.left : o.left}px` : "",
|
|
@@ -3238,7 +3238,7 @@ class kr {
|
|
|
3238
3238
|
const a = an({
|
|
3239
3239
|
setup() {
|
|
3240
3240
|
var l;
|
|
3241
|
-
const c =
|
|
3241
|
+
const c = E();
|
|
3242
3242
|
function s() {
|
|
3243
3243
|
c.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
3244
3244
|
n.updateNotifyPositionForClose(i, c), a.unmount();
|
|
@@ -3340,7 +3340,7 @@ gt.install = (t) => {
|
|
|
3340
3340
|
t.provide(Ir, e), t.provide("FNotifyService", e);
|
|
3341
3341
|
};
|
|
3342
3342
|
`${rt.getLocaleValue("datagrid.loadingMessage")}`;
|
|
3343
|
-
const
|
|
3343
|
+
const Pr = {
|
|
3344
3344
|
/** 自定义样式 */
|
|
3345
3345
|
customClass: { type: String, default: "" },
|
|
3346
3346
|
/** 排序配置 */
|
|
@@ -3489,32 +3489,32 @@ const Fr = {
|
|
|
3489
3489
|
}
|
|
3490
3490
|
}
|
|
3491
3491
|
};
|
|
3492
|
-
function
|
|
3492
|
+
function Fr(t, e, n, o, i, r, a, c, s, l, p, u, m, d, f, h, g) {
|
|
3493
3493
|
const {
|
|
3494
|
-
calculateCellPositionInRow:
|
|
3494
|
+
calculateCellPositionInRow: B
|
|
3495
3495
|
} = r, {
|
|
3496
|
-
columnContext:
|
|
3497
|
-
hasLeftFixedColumn:
|
|
3496
|
+
columnContext: S,
|
|
3497
|
+
hasLeftFixedColumn: k,
|
|
3498
3498
|
hasRightFixedColumn: b
|
|
3499
3499
|
} = a, {
|
|
3500
3500
|
gridDataStyle: C,
|
|
3501
|
-
leftFixedGridDataStyle:
|
|
3502
|
-
rightFixedGridDataStyle:
|
|
3501
|
+
leftFixedGridDataStyle: x,
|
|
3502
|
+
rightFixedGridDataStyle: R
|
|
3503
3503
|
} = d, {
|
|
3504
|
-
renderDataRow:
|
|
3505
|
-
} = so(t, e,
|
|
3506
|
-
function
|
|
3507
|
-
const
|
|
3508
|
-
return g.value.filter((I) => I.visible !== !1).map((I,
|
|
3504
|
+
renderDataRow: $
|
|
3505
|
+
} = so(t, e, S, g, c, s, l, p, u, m, d, f, h), N = [$];
|
|
3506
|
+
function j(F, P) {
|
|
3507
|
+
const A = B(F);
|
|
3508
|
+
return g.value.filter((I) => I.visible !== !1).map((I, O) => N[I.type](I, A, P, O));
|
|
3509
3509
|
}
|
|
3510
|
-
function
|
|
3510
|
+
function M() {
|
|
3511
3511
|
return w("div", {
|
|
3512
3512
|
ref: o,
|
|
3513
3513
|
class: "fv-grid-content-left-fixed"
|
|
3514
3514
|
}, [w("div", {
|
|
3515
3515
|
class: "fv-grid-data",
|
|
3516
|
-
style:
|
|
3517
|
-
}, [
|
|
3516
|
+
style: x.value
|
|
3517
|
+
}, [j(S.value.leftColumns.filter((F) => F.visible), "left")])]);
|
|
3518
3518
|
}
|
|
3519
3519
|
function y() {
|
|
3520
3520
|
return w("div", {
|
|
@@ -3523,67 +3523,67 @@ function Pr(t, e, n, o, i, r, a, c, s, l, p, u, m, d, f, v, g) {
|
|
|
3523
3523
|
}, [w("div", {
|
|
3524
3524
|
class: "fv-grid-data",
|
|
3525
3525
|
style: C.value
|
|
3526
|
-
}, [
|
|
3526
|
+
}, [j(S.value.primaryColumns.filter((F) => F.visible), "primary")])]);
|
|
3527
3527
|
}
|
|
3528
|
-
function
|
|
3528
|
+
function v() {
|
|
3529
3529
|
return w("div", {
|
|
3530
3530
|
ref: i,
|
|
3531
3531
|
class: "fv-grid-content-right-fixed"
|
|
3532
3532
|
}, [w("div", {
|
|
3533
3533
|
class: "fv-grid-data",
|
|
3534
|
-
style:
|
|
3535
|
-
}, [
|
|
3534
|
+
style: R.value
|
|
3535
|
+
}, [j(S.value.rightColumns.filter((F) => F.visible), "right")])]);
|
|
3536
3536
|
}
|
|
3537
|
-
function
|
|
3538
|
-
const
|
|
3539
|
-
return
|
|
3537
|
+
function T() {
|
|
3538
|
+
const F = [];
|
|
3539
|
+
return k.value && F.push(M()), F.push(y()), b.value && F.push(v()), F;
|
|
3540
3540
|
}
|
|
3541
3541
|
return {
|
|
3542
|
-
renderDataArea:
|
|
3542
|
+
renderDataArea: T
|
|
3543
3543
|
};
|
|
3544
3544
|
}
|
|
3545
|
-
const Dr = /* @__PURE__ */
|
|
3545
|
+
const Dr = /* @__PURE__ */ Pe({
|
|
3546
3546
|
name: "FTreeGrid",
|
|
3547
|
-
props:
|
|
3547
|
+
props: Pr,
|
|
3548
3548
|
emits: ["selectionChange", "clickRow", "expandNode", "unSelectItem", "dblclickNode", "doubleClickRow", "unSelectItem", "selectItem", "filterChanged", "sortChanged", "selectionUpdate"],
|
|
3549
3549
|
setup(t, e) {
|
|
3550
3550
|
var Xt, Jt;
|
|
3551
|
-
const o = ((Xt = t.rowOption) == null ? void 0 : Xt.height) || 28, i =
|
|
3551
|
+
const o = ((Xt = t.rowOption) == null ? void 0 : Xt.height) || 28, i = E(20), r = E(t.columns), a = lo(t), {
|
|
3552
3552
|
idField: c
|
|
3553
|
-
} = a, s =
|
|
3554
|
-
collapseField:
|
|
3555
|
-
} =
|
|
3553
|
+
} = a, s = E(), l = E(), p = E(), u = E(), m = E(), d = E([]), f = E(!1), h = E(((Jt = t.rowOption) == null ? void 0 : Jt.wrapContent) || !1), g = co(t, a), B = uo(t, e), S = fo(t), {
|
|
3554
|
+
collapseField: k
|
|
3555
|
+
} = S, {
|
|
3556
3556
|
showLoading: b,
|
|
3557
3557
|
renderLoading: C
|
|
3558
|
-
} = po(t, s),
|
|
3559
|
-
dataView:
|
|
3560
|
-
} =
|
|
3561
|
-
showSelection:
|
|
3562
|
-
selectedValues:
|
|
3563
|
-
} =
|
|
3564
|
-
shouldRenderPagination:
|
|
3565
|
-
} =
|
|
3566
|
-
containerStyleObject:
|
|
3567
|
-
} = yo(t),
|
|
3558
|
+
} = po(t, s), x = mo(t, /* @__PURE__ */ new Map(), B, S, a), {
|
|
3559
|
+
dataView: R
|
|
3560
|
+
} = x, $ = vo(t, x, a, d, e), {
|
|
3561
|
+
showSelection: N,
|
|
3562
|
+
selectedValues: j
|
|
3563
|
+
} = $, M = ho(t, d, x, a, $, e), y = H(() => t.disabled), v = H(() => t.virtualized ? Math.min(x.dataView.value.length, i.value) : x.dataView.value.length), T = go(t, x), {
|
|
3564
|
+
shouldRenderPagination: F
|
|
3565
|
+
} = T, {
|
|
3566
|
+
containerStyleObject: P
|
|
3567
|
+
} = yo(t), A = bo(t), {
|
|
3568
3568
|
applyCommands: I
|
|
3569
|
-
} =
|
|
3569
|
+
} = A;
|
|
3570
3570
|
I(r);
|
|
3571
3571
|
const {
|
|
3572
|
-
applyColumnSetting:
|
|
3572
|
+
applyColumnSetting: O,
|
|
3573
3573
|
removeColumnSetting: z
|
|
3574
3574
|
} = Co(t);
|
|
3575
|
-
t.showSetting &&
|
|
3575
|
+
t.showSetting && O(r);
|
|
3576
3576
|
const L = wo(t, e), J = xo(t), {
|
|
3577
3577
|
applyColumnSorter: K,
|
|
3578
3578
|
columnContext: te,
|
|
3579
3579
|
updateColumnRenderContext: Y
|
|
3580
3580
|
} = L;
|
|
3581
|
-
K(
|
|
3582
|
-
const ae =
|
|
3581
|
+
K(x, J);
|
|
3582
|
+
const ae = So(t, te), ue = To(t, e, $, a), ie = Mo(t, e, a, ue, d), G = Bo(t), re = Eo(t, ie, G), qe = ko(t, x, ie, S, a, G, re), $e = Io(t, r, x, v, 0, qe), {
|
|
3583
3583
|
getVisualData: Me
|
|
3584
|
-
} = $e, et =
|
|
3584
|
+
} = $e, et = Po(t, te), _e = Fo(t, $), {
|
|
3585
3585
|
sidebarWidth: tt
|
|
3586
|
-
} = _e, le = Do(t,
|
|
3586
|
+
} = _e, le = Do(t, x, d, te, $e, v, 0, tt), {
|
|
3587
3587
|
onWheel: at,
|
|
3588
3588
|
dataGridWidth: Ne,
|
|
3589
3589
|
viewPortHeight: je,
|
|
@@ -3592,7 +3592,7 @@ const Dr = /* @__PURE__ */ Fe({
|
|
|
3592
3592
|
updateVisibleRowsOnLatestVisibleScope: st
|
|
3593
3593
|
} = le, Ue = Ro(t, te, l, Be, ae), {
|
|
3594
3594
|
calculateColumnsSize: De
|
|
3595
|
-
} = Ue, Le = Oo(), nt = $o(l, m,
|
|
3595
|
+
} = Ue, Le = Oo(), nt = $o(l, m, x, Le, le), ot = No(t, e, L, x, ae, g, le), q = H(() => {
|
|
3596
3596
|
const W = {
|
|
3597
3597
|
"fv-grid": !0,
|
|
3598
3598
|
"fv-grid-bordered": t.showBorder,
|
|
@@ -3603,16 +3603,16 @@ const Dr = /* @__PURE__ */ Fe({
|
|
|
3603
3603
|
}), Z = H(() => ({
|
|
3604
3604
|
"fv-grid-content": !0,
|
|
3605
3605
|
"fv-grid-content-hover": f.value,
|
|
3606
|
-
"fv-grid-wrap-content":
|
|
3606
|
+
"fv-grid-wrap-content": h.value
|
|
3607
3607
|
})), {
|
|
3608
3608
|
renderDataArea: ce
|
|
3609
|
-
} =
|
|
3609
|
+
} = Fr(t, e, p, u, m, et, L, x, ie, S, ue, $, M, le, $e, G, d), {
|
|
3610
3610
|
renderGridHeader: de,
|
|
3611
3611
|
renderGridColumnResizeOverlay: Re,
|
|
3612
|
-
shouldShowHeader:
|
|
3613
|
-
} = jo(t, e, l, u, m, L,
|
|
3614
|
-
renderDataGridSidebar:
|
|
3615
|
-
} = Ao(t, ue,
|
|
3612
|
+
shouldShowHeader: St
|
|
3613
|
+
} = jo(t, e, l, u, m, L, x, ot, nt, B, Le, Ue, ae, $, _e, J, le, Be, d), {
|
|
3614
|
+
renderDataGridSidebar: Tt
|
|
3615
|
+
} = Ao(t, ue, $, _e, le), {
|
|
3616
3616
|
renderDisableMask: Mt
|
|
3617
3617
|
} = Lo(), {
|
|
3618
3618
|
renderHorizontalScrollbar: Bt
|
|
@@ -3627,7 +3627,7 @@ const Dr = /* @__PURE__ */ Fe({
|
|
|
3627
3627
|
}
|
|
3628
3628
|
}
|
|
3629
3629
|
Oe(() => {
|
|
3630
|
-
l.value && (i.value = Math.max(Math.ceil(l.value.clientHeight / o), i.value), d.value = Me(0,
|
|
3630
|
+
l.value && (i.value = Math.max(Math.ceil(l.value.clientHeight / o), i.value), d.value = Me(0, v.value + 0 - 1), ao(l.value, kt), De(), Ke(() => {
|
|
3631
3631
|
l.value && (Ne.value = l.value.clientWidth), p.value && (Be.value = p.value.clientWidth, je.value = p.value.clientHeight);
|
|
3632
3632
|
})), b.value && C();
|
|
3633
3633
|
}), pt(() => {
|
|
@@ -3635,30 +3635,30 @@ const Dr = /* @__PURE__ */ Fe({
|
|
|
3635
3635
|
l.value && De();
|
|
3636
3636
|
});
|
|
3637
3637
|
function It(W) {
|
|
3638
|
-
|
|
3638
|
+
x.collapseTo(W), x.reOrderVisibleIndex(), Ae();
|
|
3639
3639
|
}
|
|
3640
3640
|
function mt(W) {
|
|
3641
|
-
|
|
3641
|
+
x.expandTo(W), x.reOrderVisibleIndex(), Ae();
|
|
3642
3642
|
}
|
|
3643
3643
|
function lt() {
|
|
3644
|
-
const W =
|
|
3644
|
+
const W = $.getSelectionRow();
|
|
3645
3645
|
return W ? W.dataIndex - 1 : -1;
|
|
3646
3646
|
}
|
|
3647
|
-
function
|
|
3647
|
+
function Pt() {
|
|
3648
3648
|
const W = lt();
|
|
3649
|
-
|
|
3649
|
+
x.insertNewDataItem(W), d.value = Me(0, v.value + 0 - 1);
|
|
3650
3650
|
}
|
|
3651
|
-
function
|
|
3651
|
+
function Ft() {
|
|
3652
3652
|
const W = lt();
|
|
3653
|
-
|
|
3653
|
+
x.insertNewChildDataItem(W), d.value = Me(0, v.value + 0 - 1);
|
|
3654
3654
|
}
|
|
3655
3655
|
function Dt(W, Q) {
|
|
3656
3656
|
const pe = d.value.find((we) => we.raw[c.value] === Q), he = pe ? pe.dataIndex - 1 : -1;
|
|
3657
|
-
|
|
3657
|
+
x.insertNewChildDataItems(W, he);
|
|
3658
3658
|
}
|
|
3659
3659
|
function Rt() {
|
|
3660
|
-
const W = lt(), Q =
|
|
3661
|
-
|
|
3660
|
+
const W = lt(), Q = M.getNextSelectableHierarchyItemId(W);
|
|
3661
|
+
x.removeHierarchyDataItem(W), d.value = Me(0, v.value + 0 - 1), Q && M.selectItemById(Q);
|
|
3662
3662
|
}
|
|
3663
3663
|
function vt(W) {
|
|
3664
3664
|
ie.onEditingRow(W);
|
|
@@ -3666,20 +3666,20 @@ const Dr = /* @__PURE__ */ Fe({
|
|
|
3666
3666
|
function Ot(W) {
|
|
3667
3667
|
ie.acceptEditingRow(W);
|
|
3668
3668
|
}
|
|
3669
|
-
function
|
|
3669
|
+
function D(W) {
|
|
3670
3670
|
ie.cancelEditingRow(W);
|
|
3671
3671
|
}
|
|
3672
3672
|
function _(W) {
|
|
3673
|
-
W && (r.value = W, I(r), Y(r.value), K(
|
|
3673
|
+
W && (r.value = W, I(r), Y(r.value), K(x, J), De());
|
|
3674
3674
|
}
|
|
3675
3675
|
xe(() => t.columns, (W) => {
|
|
3676
3676
|
_(W);
|
|
3677
3677
|
});
|
|
3678
3678
|
function U(W, Q) {
|
|
3679
|
-
W && (
|
|
3679
|
+
W && (x.load(W), x.reOrderVisibleIndex(), Q != null && Q.keepScrollPosition ? le.scrollTo(le.offsetY.value) : Ae());
|
|
3680
3680
|
}
|
|
3681
3681
|
function X(W) {
|
|
3682
|
-
|
|
3682
|
+
M.selectItemById(W);
|
|
3683
3683
|
}
|
|
3684
3684
|
function ne(W) {
|
|
3685
3685
|
const Q = d.value.find((pe) => pe.raw[a.idField.value] === W);
|
|
@@ -3688,29 +3688,29 @@ const Dr = /* @__PURE__ */ Fe({
|
|
|
3688
3688
|
function oe(W) {
|
|
3689
3689
|
ue.activeRowById(W);
|
|
3690
3690
|
}
|
|
3691
|
-
function
|
|
3692
|
-
|
|
3691
|
+
function Te(W) {
|
|
3692
|
+
M.selectItemByIds(W);
|
|
3693
3693
|
}
|
|
3694
3694
|
function ye() {
|
|
3695
|
-
return
|
|
3695
|
+
return $.getSelectedItems();
|
|
3696
3696
|
}
|
|
3697
3697
|
function be() {
|
|
3698
|
-
|
|
3698
|
+
$.clearSelection();
|
|
3699
3699
|
}
|
|
3700
3700
|
const Ee = H(() => !d.value || !d.value.length), {
|
|
3701
3701
|
renderEmpty: fe
|
|
3702
3702
|
} = Ho(t, e);
|
|
3703
3703
|
function ke() {
|
|
3704
|
-
return
|
|
3704
|
+
return $.getSelectionRow();
|
|
3705
3705
|
}
|
|
3706
3706
|
function Ce(W) {
|
|
3707
|
-
|
|
3707
|
+
M.unSelectItemByIds(W);
|
|
3708
3708
|
}
|
|
3709
3709
|
function ve() {
|
|
3710
|
-
return
|
|
3710
|
+
return $.currentSelectedDataId.value;
|
|
3711
3711
|
}
|
|
3712
3712
|
function ct(W, Q, pe) {
|
|
3713
|
-
const he =
|
|
3713
|
+
const he = R.value.find((we) => we[c.value] === W);
|
|
3714
3714
|
if (he) {
|
|
3715
3715
|
if (Object.keys(he).forEach((me) => {
|
|
3716
3716
|
Object.prototype.hasOwnProperty.call(Q, me) && (he[me] = Q[me]);
|
|
@@ -3736,22 +3736,22 @@ const Dr = /* @__PURE__ */ Fe({
|
|
|
3736
3736
|
} = pe;
|
|
3737
3737
|
me && !Ve(Q[me]) && (we.collapse = Q[me]), Ge && !Ve(Q[Ge]) && (we.checked = Q[Ge]), We && !Ve(Q[We]) && (we.disabled = Q[We]), Ye && !Ve(Q[Ye]) && (we.visible = Q[Ye]);
|
|
3738
3738
|
}
|
|
3739
|
-
d.value = [...d.value.slice(0, Qt), we, ...d.value.slice(Qt + 1)],
|
|
3739
|
+
d.value = [...d.value.slice(0, Qt), we, ...d.value.slice(Qt + 1)], x.updateSummary();
|
|
3740
3740
|
}
|
|
3741
3741
|
}
|
|
3742
3742
|
}
|
|
3743
3743
|
function ut(W) {
|
|
3744
|
-
return Object.prototype.hasOwnProperty.call(W, "raw") ?
|
|
3744
|
+
return Object.prototype.hasOwnProperty.call(W, "raw") ? x.hasRealChildren(W.raw) : x.hasRealChildren(W);
|
|
3745
3745
|
}
|
|
3746
3746
|
function dt(W) {
|
|
3747
|
-
const Q =
|
|
3748
|
-
return Q ? Q[
|
|
3747
|
+
const Q = x.dataView.value.find((pe) => pe[c.value] === W);
|
|
3748
|
+
return Q ? Q[k.value] : "";
|
|
3749
3749
|
}
|
|
3750
3750
|
function Vn() {
|
|
3751
|
-
return
|
|
3751
|
+
return k.value;
|
|
3752
3752
|
}
|
|
3753
3753
|
xe(() => t.showSetting, (W, Q) => {
|
|
3754
|
-
W !== Q && (W ?
|
|
3754
|
+
W !== Q && (W ? O(r) : z(r), _(r.value));
|
|
3755
3755
|
});
|
|
3756
3756
|
function zn(W) {
|
|
3757
3757
|
return d.value.filter((Q) => W.includes(Q.raw[t.idField]));
|
|
@@ -3761,23 +3761,23 @@ const Dr = /* @__PURE__ */ Fe({
|
|
|
3761
3761
|
pe && ue.changeRow(pe);
|
|
3762
3762
|
}
|
|
3763
3763
|
function qn() {
|
|
3764
|
-
|
|
3764
|
+
$.keepSelectingOnPaging.value || be(), x.updateVisibleDataSummary(d.value);
|
|
3765
3765
|
}
|
|
3766
3766
|
e.expose({
|
|
3767
3767
|
activeRowById: oe,
|
|
3768
|
-
addNewDataItem:
|
|
3769
|
-
addNewChildDataItem:
|
|
3768
|
+
addNewDataItem: Pt,
|
|
3769
|
+
addNewChildDataItem: Ft,
|
|
3770
3770
|
addChildrenToNode: Dt,
|
|
3771
3771
|
collapseTo: It,
|
|
3772
3772
|
expandTo: mt,
|
|
3773
3773
|
removeDataItem: Rt,
|
|
3774
3774
|
editDataItem: vt,
|
|
3775
3775
|
acceptDataItem: Ot,
|
|
3776
|
-
cancelDataItem:
|
|
3776
|
+
cancelDataItem: D,
|
|
3777
3777
|
updateColumns: _,
|
|
3778
3778
|
updateDataSource: U,
|
|
3779
3779
|
selectItemById: X,
|
|
3780
|
-
selectItemByIds:
|
|
3780
|
+
selectItemByIds: Te,
|
|
3781
3781
|
getSelectedItems: ye,
|
|
3782
3782
|
clearSelection: be,
|
|
3783
3783
|
getSelectionRow: ke,
|
|
@@ -3796,37 +3796,37 @@ const Dr = /* @__PURE__ */ Fe({
|
|
|
3796
3796
|
const W = {};
|
|
3797
3797
|
return le.shouldShowHorizontalScrollbar.value && (W.paddingBottom = "10px"), le.shouldShowVirticalScrollbar.value && (W.paddingRight = "10px"), W;
|
|
3798
3798
|
}), Un = H(() => ({
|
|
3799
|
-
...
|
|
3799
|
+
...P.value,
|
|
3800
3800
|
borderRadius: "5px"
|
|
3801
|
-
}))
|
|
3802
|
-
|
|
3803
|
-
|
|
3801
|
+
}));
|
|
3802
|
+
qo(t, e, x, le, T, $);
|
|
3803
|
+
const Wn = H(() => ({
|
|
3804
3804
|
"d-flex": !0,
|
|
3805
|
-
"justify-content-between":
|
|
3806
|
-
"justify-content-end":
|
|
3805
|
+
"justify-content-between": F.value && N.value,
|
|
3806
|
+
"justify-content-end": F.value && !N.value,
|
|
3807
3807
|
"position-relative": !0
|
|
3808
3808
|
})), Gn = H(() => ({
|
|
3809
3809
|
"d-flex": !0,
|
|
3810
3810
|
"align-items-center": !0
|
|
3811
3811
|
})), {
|
|
3812
3812
|
renderDataGridSummary: Yn
|
|
3813
|
-
} = _o(t,
|
|
3813
|
+
} = _o(t, x, L);
|
|
3814
3814
|
return () => w("div", {
|
|
3815
3815
|
ref: s,
|
|
3816
3816
|
class: q.value,
|
|
3817
3817
|
style: Un.value,
|
|
3818
3818
|
onWheel: at
|
|
3819
|
-
}, [l.value &&
|
|
3819
|
+
}, [l.value && St.value && de(), w("div", {
|
|
3820
3820
|
ref: l,
|
|
3821
3821
|
class: Z.value,
|
|
3822
3822
|
onMouseover: () => f.value = !0,
|
|
3823
3823
|
onMouseleave: () => f.value = !1,
|
|
3824
3824
|
style: _n.value
|
|
3825
|
-
}, [l.value &&
|
|
3825
|
+
}, [l.value && Tt(d), l.value && ce(), l.value && Ee.value && fe(), l.value && Bt(), l.value && Et()]), l.value && Yn(), N.value && w("div", {
|
|
3826
3826
|
class: Wn.value
|
|
3827
|
-
}, [
|
|
3827
|
+
}, [N.value && w("div", {
|
|
3828
3828
|
class: Gn.value
|
|
3829
|
-
}, [w("div", null, ["已选:" +
|
|
3829
|
+
}, [w("div", null, ["已选:" + j.value.length, ln(" 条")])])]), Re(), y.value && Mt()]);
|
|
3830
3830
|
}
|
|
3831
3831
|
});
|
|
3832
3832
|
un(Dr);
|
|
@@ -3967,10 +3967,10 @@ const $r = "https://json-schema.org/draft/2020-12/schema", Nr = "https://farris-
|
|
|
3967
3967
|
onClick: { type: Function, default: () => {
|
|
3968
3968
|
} }
|
|
3969
3969
|
};
|
|
3970
|
-
|
|
3970
|
+
Fe(Yr, Hr, Rr, Or, Gr);
|
|
3971
3971
|
function Xr(t, e, n) {
|
|
3972
|
-
var
|
|
3973
|
-
const o = n && n.getStyles && n.getStyles() || "", i = n && n.getDesignerClass && n.getDesignerClass() || "", r =
|
|
3972
|
+
var M;
|
|
3973
|
+
const o = n && n.getStyles && n.getStyles() || "", i = n && n.getDesignerClass && n.getDesignerClass() || "", r = E();
|
|
3974
3974
|
let a;
|
|
3975
3975
|
function c() {
|
|
3976
3976
|
return (e == null ? void 0 : e.schema.componentType) === "frame" ? !1 : n && n.checkCanMoveComponent ? n.checkCanMoveComponent() : !0;
|
|
@@ -3989,18 +3989,18 @@ function Xr(t, e, n) {
|
|
|
3989
3989
|
return null;
|
|
3990
3990
|
if (y.value.schema && y.value.schema.type === "component")
|
|
3991
3991
|
return y.value;
|
|
3992
|
-
const
|
|
3993
|
-
return
|
|
3992
|
+
const v = E(y == null ? void 0 : y.value.parent), T = u(v);
|
|
3993
|
+
return T || null;
|
|
3994
3994
|
}
|
|
3995
3995
|
function m(y = e) {
|
|
3996
|
-
var
|
|
3996
|
+
var P;
|
|
3997
3997
|
if (n != null && n.getDraggableDesignItemElement)
|
|
3998
3998
|
return n.getDraggableDesignItemElement(y);
|
|
3999
|
-
const { componentInstance:
|
|
4000
|
-
if (!
|
|
3999
|
+
const { componentInstance: v, designerItemElementRef: T } = y;
|
|
4000
|
+
if (!v || !v.value)
|
|
4001
4001
|
return null;
|
|
4002
|
-
const { getCustomButtons:
|
|
4003
|
-
return
|
|
4002
|
+
const { getCustomButtons: F } = v.value;
|
|
4003
|
+
return v.value.canMove || F && ((P = F()) != null && P.length) ? T : m(y.parent);
|
|
4004
4004
|
}
|
|
4005
4005
|
function d(y) {
|
|
4006
4006
|
return !!n && n.canAccepts(y);
|
|
@@ -4008,92 +4008,92 @@ function Xr(t, e, n) {
|
|
|
4008
4008
|
function f() {
|
|
4009
4009
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
4010
4010
|
}
|
|
4011
|
-
function
|
|
4011
|
+
function h() {
|
|
4012
4012
|
}
|
|
4013
|
-
function g(y,
|
|
4014
|
-
var
|
|
4015
|
-
!y || !
|
|
4013
|
+
function g(y, v) {
|
|
4014
|
+
var T;
|
|
4015
|
+
!y || !v || (n != null && n.onAcceptMovedChildElement && n.onAcceptMovedChildElement(y, v), (T = e == null ? void 0 : e.setupContext) == null || T.emit("dragEnd"));
|
|
4016
4016
|
}
|
|
4017
|
-
function
|
|
4018
|
-
const { componentType:
|
|
4019
|
-
let
|
|
4020
|
-
n && n.onResolveNewComponentSchema && (
|
|
4021
|
-
const
|
|
4022
|
-
return
|
|
4017
|
+
function B(y, v) {
|
|
4018
|
+
const { componentType: T } = y;
|
|
4019
|
+
let F = dn(T, y, v);
|
|
4020
|
+
n && n.onResolveNewComponentSchema && (F = n.onResolveNewComponentSchema(y, F));
|
|
4021
|
+
const P = T.toLowerCase().replace(/-/g, "_");
|
|
4022
|
+
return F && !F.id && F.type === T && (F.id = `${P}_${Math.random().toString().slice(2, 6)}`), F;
|
|
4023
4023
|
}
|
|
4024
|
-
function
|
|
4024
|
+
function S(y) {
|
|
4025
4025
|
y && n != null && n.onChildElementMovedOut && n.onChildElementMovedOut(y);
|
|
4026
4026
|
}
|
|
4027
|
-
function
|
|
4027
|
+
function k(...y) {
|
|
4028
4028
|
if (n && n.getPropsConfig)
|
|
4029
4029
|
return n.getPropsConfig(...y);
|
|
4030
4030
|
}
|
|
4031
4031
|
function b(y) {
|
|
4032
4032
|
if (!y)
|
|
4033
4033
|
return;
|
|
4034
|
-
const
|
|
4035
|
-
if (
|
|
4036
|
-
const
|
|
4037
|
-
|
|
4034
|
+
const v = e == null ? void 0 : e.schema, { formSchemaUtils: T } = y;
|
|
4035
|
+
if (v && T.getExpressions().length) {
|
|
4036
|
+
const F = T.getExpressions().findIndex((P) => P.target === v.id);
|
|
4037
|
+
F > -1 && T.getExpressions().splice(F, 1);
|
|
4038
4038
|
}
|
|
4039
4039
|
}
|
|
4040
4040
|
function C(y) {
|
|
4041
4041
|
if (!y || !(e != null && e.schema))
|
|
4042
4042
|
return;
|
|
4043
|
-
const
|
|
4044
|
-
|
|
4045
|
-
}
|
|
4046
|
-
function
|
|
4047
|
-
n && n.onRemoveComponent && n.onRemoveComponent(), b(y), C(y), e != null && e.schema.contents && e.schema.contents.map((
|
|
4048
|
-
let
|
|
4049
|
-
|
|
4050
|
-
const
|
|
4051
|
-
|
|
4052
|
-
var
|
|
4053
|
-
(
|
|
4043
|
+
const v = e.schema, { formSchemaUtils: T } = y;
|
|
4044
|
+
T.removeCommunicationInComponent(v);
|
|
4045
|
+
}
|
|
4046
|
+
function x(y) {
|
|
4047
|
+
n && n.onRemoveComponent && n.onRemoveComponent(), b(y), C(y), e != null && e.schema.contents && e.schema.contents.map((v) => {
|
|
4048
|
+
let T = v.id;
|
|
4049
|
+
v.type === "component-ref" && (T = v.component);
|
|
4050
|
+
const F = t.value.querySelectorAll(`#${T}-design-item`);
|
|
4051
|
+
F != null && F.length && Array.from(F).map((P) => {
|
|
4052
|
+
var A;
|
|
4053
|
+
(A = P == null ? void 0 : P.componentInstance) != null && A.value.onRemoveComponent && P.componentInstance.value.onRemoveComponent(y);
|
|
4054
4054
|
});
|
|
4055
4055
|
});
|
|
4056
4056
|
}
|
|
4057
|
-
function
|
|
4057
|
+
function R() {
|
|
4058
4058
|
if (n && n.getCustomButtons)
|
|
4059
4059
|
return n.getCustomButtons();
|
|
4060
4060
|
}
|
|
4061
|
-
function
|
|
4062
|
-
var
|
|
4063
|
-
if (!((
|
|
4061
|
+
function $(y) {
|
|
4062
|
+
var T, F;
|
|
4063
|
+
if (!((T = e == null ? void 0 : e.schema) != null && T.id))
|
|
4064
4064
|
return;
|
|
4065
4065
|
if (!a && y && (a = y.formSchemaUtils), n != null && n.setComponentBasicInfoMap) {
|
|
4066
4066
|
n.setComponentBasicInfoMap();
|
|
4067
4067
|
return;
|
|
4068
4068
|
}
|
|
4069
|
-
let
|
|
4069
|
+
let v = "";
|
|
4070
4070
|
if (n != null && n.getComponentTitle)
|
|
4071
|
-
|
|
4071
|
+
v = n.getComponentTitle();
|
|
4072
4072
|
else {
|
|
4073
|
-
const { text:
|
|
4074
|
-
|
|
4073
|
+
const { text: P, title: A, label: I, mainTitle: O, name: z, type: L } = e.schema;
|
|
4074
|
+
v = P || A || I || O || z || ((F = V[L]) == null ? void 0 : F.name);
|
|
4075
4075
|
}
|
|
4076
|
-
|
|
4077
|
-
componentTitle:
|
|
4078
|
-
parentPathName:
|
|
4076
|
+
v && a.getControlBasicInfoMap().set(e.schema.id, {
|
|
4077
|
+
componentTitle: v,
|
|
4078
|
+
parentPathName: v
|
|
4079
4079
|
});
|
|
4080
4080
|
}
|
|
4081
|
-
function
|
|
4082
|
-
var
|
|
4083
|
-
const { changeObject:
|
|
4084
|
-
if (["text", "title", "label", "name", "mainTitle"].includes((
|
|
4085
|
-
const
|
|
4081
|
+
function N(y) {
|
|
4082
|
+
var P;
|
|
4083
|
+
const { changeObject: v } = y, { propertyID: T, propertyValue: F } = v;
|
|
4084
|
+
if (["text", "title", "label", "name", "mainTitle"].includes((P = y == null ? void 0 : y.changeObject) == null ? void 0 : P.propertyID) && T && F && ($(), a)) {
|
|
4085
|
+
const A = a.getControlBasicInfoMap(), I = A.keys().toArray().filter((O) => {
|
|
4086
4086
|
var z, L;
|
|
4087
|
-
return ((z =
|
|
4087
|
+
return ((z = A.get(O)) == null ? void 0 : z.reliedComponentId) === ((L = e == null ? void 0 : e.schema) == null ? void 0 : L.id);
|
|
4088
4088
|
});
|
|
4089
|
-
I != null && I.length && I.forEach((
|
|
4090
|
-
const z =
|
|
4091
|
-
z[0] =
|
|
4089
|
+
I != null && I.length && I.forEach((O) => {
|
|
4090
|
+
const z = A.get(O).parentPathName.split(" > ");
|
|
4091
|
+
z[0] = F, A.get(O).parentPathName = z.join(" > ");
|
|
4092
4092
|
});
|
|
4093
4093
|
}
|
|
4094
4094
|
}
|
|
4095
|
-
function
|
|
4096
|
-
if (
|
|
4095
|
+
function j(y) {
|
|
4096
|
+
if (N(y), n && n.onPropertyChanged)
|
|
4097
4097
|
return n.onPropertyChanged(y);
|
|
4098
4098
|
}
|
|
4099
4099
|
return r.value = {
|
|
@@ -4103,7 +4103,7 @@ function Xr(t, e, n) {
|
|
|
4103
4103
|
canNested: !p(),
|
|
4104
4104
|
contents: e == null ? void 0 : e.schema.contents,
|
|
4105
4105
|
elementRef: t,
|
|
4106
|
-
parent: (
|
|
4106
|
+
parent: (M = e == null ? void 0 : e.parent) == null ? void 0 : M.componentInstance,
|
|
4107
4107
|
schema: e == null ? void 0 : e.schema,
|
|
4108
4108
|
styles: o,
|
|
4109
4109
|
designerClass: i,
|
|
@@ -4111,17 +4111,17 @@ function Xr(t, e, n) {
|
|
|
4111
4111
|
getBelongedComponentInstance: u,
|
|
4112
4112
|
getDraggableDesignItemElement: m,
|
|
4113
4113
|
getDraggingDisplayText: f,
|
|
4114
|
-
getPropConfig:
|
|
4115
|
-
getDragScopeElement:
|
|
4114
|
+
getPropConfig: k,
|
|
4115
|
+
getDragScopeElement: h,
|
|
4116
4116
|
onAcceptMovedChildElement: g,
|
|
4117
|
-
onChildElementMovedOut:
|
|
4118
|
-
addNewChildComponentSchema:
|
|
4119
|
-
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved ||
|
|
4120
|
-
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted ||
|
|
4121
|
-
onRemoveComponent:
|
|
4122
|
-
getCustomButtons:
|
|
4123
|
-
onPropertyChanged:
|
|
4124
|
-
setComponentBasicInfoMap:
|
|
4117
|
+
onChildElementMovedOut: S,
|
|
4118
|
+
addNewChildComponentSchema: B,
|
|
4119
|
+
triggerBelongedComponentToMoveWhenMoved: !!n && n.triggerBelongedComponentToMoveWhenMoved || E(!1),
|
|
4120
|
+
triggerBelongedComponentToDeleteWhenDeleted: !!n && n.triggerBelongedComponentToDeleteWhenDeleted || E(!1),
|
|
4121
|
+
onRemoveComponent: x,
|
|
4122
|
+
getCustomButtons: R,
|
|
4123
|
+
onPropertyChanged: j,
|
|
4124
|
+
setComponentBasicInfoMap: $,
|
|
4125
4125
|
updateContextSchema: e == null ? void 0 : e.updateContextSchema
|
|
4126
4126
|
}, r;
|
|
4127
4127
|
}
|
|
@@ -4336,7 +4336,7 @@ const ta = "https://json-schema.org/draft/2020-12/schema", na = "https://farris-
|
|
|
4336
4336
|
/** 内部控件布局是否响应国际化 */
|
|
4337
4337
|
adaptForLanguage: { type: Boolean, default: !0 }
|
|
4338
4338
|
};
|
|
4339
|
-
|
|
4339
|
+
Fe(ca, la, Gt, Kr);
|
|
4340
4340
|
const ua = "https://json-schema.org/draft/2020-12/schema", da = "https://farris-design.gitee.io/form-group.schema.json", fa = "form-group", pa = "A Farris Input Component", ma = "object", va = {
|
|
4341
4341
|
id: {
|
|
4342
4342
|
description: "The unique identifier for a form group",
|
|
@@ -4413,7 +4413,7 @@ const ua = "https://json-schema.org/draft/2020-12/schema", da = "https://farris-
|
|
|
4413
4413
|
"id",
|
|
4414
4414
|
"type",
|
|
4415
4415
|
"editor"
|
|
4416
|
-
],
|
|
4416
|
+
], Fn = {
|
|
4417
4417
|
$schema: ua,
|
|
4418
4418
|
$id: da,
|
|
4419
4419
|
title: fa,
|
|
@@ -4442,9 +4442,9 @@ const ua = "https://json-schema.org/draft/2020-12/schema", da = "https://farris-
|
|
|
4442
4442
|
componentId: { type: String, default: "" },
|
|
4443
4443
|
errors: { type: Object, default: null }
|
|
4444
4444
|
};
|
|
4445
|
-
|
|
4445
|
+
Fe(
|
|
4446
4446
|
ga,
|
|
4447
|
-
|
|
4447
|
+
Fn,
|
|
4448
4448
|
Gt,
|
|
4449
4449
|
void 0
|
|
4450
4450
|
);
|
|
@@ -4553,13 +4553,13 @@ const ya = {
|
|
|
4553
4553
|
*/
|
|
4554
4554
|
selectOnCreated: { type: Boolean, default: !1 }
|
|
4555
4555
|
};
|
|
4556
|
-
|
|
4556
|
+
Fe(
|
|
4557
4557
|
ya,
|
|
4558
|
-
|
|
4558
|
+
Fn,
|
|
4559
4559
|
Gt,
|
|
4560
4560
|
void 0
|
|
4561
4561
|
);
|
|
4562
|
-
const ba = "https://json-schema.org/draft/2020-12/schema", Ca = "https://farris-design.gitee.io/grid-field-editor.schema.json", wa = "response-form-layout-setting", xa = "A Farris Data Grid Component",
|
|
4562
|
+
const ba = "https://json-schema.org/draft/2020-12/schema", Ca = "https://farris-design.gitee.io/grid-field-editor.schema.json", wa = "response-form-layout-setting", xa = "A Farris Data Grid Component", Sa = "object", Ta = {
|
|
4563
4563
|
id: {
|
|
4564
4564
|
description: "The unique identifier for a Input Group",
|
|
4565
4565
|
type: "string"
|
|
@@ -4581,8 +4581,8 @@ const ba = "https://json-schema.org/draft/2020-12/schema", Ca = "https://farris-
|
|
|
4581
4581
|
$id: Ca,
|
|
4582
4582
|
title: wa,
|
|
4583
4583
|
description: xa,
|
|
4584
|
-
type:
|
|
4585
|
-
properties:
|
|
4584
|
+
type: Sa,
|
|
4585
|
+
properties: Ta,
|
|
4586
4586
|
required: Ma
|
|
4587
4587
|
}, Ea = {
|
|
4588
4588
|
initialState: {
|
|
@@ -4617,7 +4617,7 @@ async function Ia(t) {
|
|
|
4617
4617
|
throw Yt();
|
|
4618
4618
|
return navigator.clipboard.writeText(t);
|
|
4619
4619
|
}
|
|
4620
|
-
async function
|
|
4620
|
+
async function Pa(t) {
|
|
4621
4621
|
const e = document.createElement("span");
|
|
4622
4622
|
e.textContent = t, e.style.whiteSpace = "pre", e.style.webkitUserSelect = "auto", e.style.userSelect = "all", document.body.appendChild(e);
|
|
4623
4623
|
const n = window.getSelection(), o = window.document.createRange();
|
|
@@ -4631,12 +4631,12 @@ async function Fa(t) {
|
|
|
4631
4631
|
if (!i)
|
|
4632
4632
|
throw Yt();
|
|
4633
4633
|
}
|
|
4634
|
-
async function
|
|
4634
|
+
async function Fa(t) {
|
|
4635
4635
|
try {
|
|
4636
4636
|
await Ia(t);
|
|
4637
4637
|
} catch (e) {
|
|
4638
4638
|
try {
|
|
4639
|
-
await
|
|
4639
|
+
await Pa(t);
|
|
4640
4640
|
} catch (n) {
|
|
4641
4641
|
throw n || e || Yt();
|
|
4642
4642
|
}
|
|
@@ -4644,12 +4644,12 @@ async function Pa(t) {
|
|
|
4644
4644
|
}
|
|
4645
4645
|
function Da() {
|
|
4646
4646
|
async function t(e) {
|
|
4647
|
-
await
|
|
4647
|
+
await Fa(e);
|
|
4648
4648
|
}
|
|
4649
4649
|
return { onCopy: t };
|
|
4650
4650
|
}
|
|
4651
4651
|
function Ra(t, e, n, o) {
|
|
4652
|
-
const i =
|
|
4652
|
+
const i = E(14), r = E(140), a = E(""), c = E(o.value.length), s = H(() => o.value), l = H(() => ({
|
|
4653
4653
|
"font-size": `${i.value}px`,
|
|
4654
4654
|
height: "100%"
|
|
4655
4655
|
}));
|
|
@@ -4681,7 +4681,7 @@ function Oa(t, e, n, o) {
|
|
|
4681
4681
|
return { getEditorRender: a };
|
|
4682
4682
|
}
|
|
4683
4683
|
function $a() {
|
|
4684
|
-
const t =
|
|
4684
|
+
const t = E(!1), e = E("复制成功");
|
|
4685
4685
|
return {
|
|
4686
4686
|
feedbackStyle: H(() => {
|
|
4687
4687
|
const o = {
|
|
@@ -4716,8 +4716,8 @@ function ja(t, e) {
|
|
|
4716
4716
|
if (d == null)
|
|
4717
4717
|
return 0;
|
|
4718
4718
|
let f = 0;
|
|
4719
|
-
for (let
|
|
4720
|
-
const g = d.charCodeAt(
|
|
4719
|
+
for (let h = 0; h < d.length; h++) {
|
|
4720
|
+
const g = d.charCodeAt(h);
|
|
4721
4721
|
g >= 0 && g <= 128 ? f++ : f = f + 2;
|
|
4722
4722
|
}
|
|
4723
4723
|
return f;
|
|
@@ -4725,14 +4725,14 @@ function ja(t, e) {
|
|
|
4725
4725
|
function o(d, f) {
|
|
4726
4726
|
if (d !== "" && d !== void 0 && d !== null) {
|
|
4727
4727
|
d = "" + d;
|
|
4728
|
-
const
|
|
4729
|
-
let g = "",
|
|
4730
|
-
for (let
|
|
4731
|
-
const
|
|
4732
|
-
if (
|
|
4728
|
+
const h = d.length;
|
|
4729
|
+
let g = "", B = 0;
|
|
4730
|
+
for (let S = 0; S < h; S++) {
|
|
4731
|
+
const k = d.charAt(S);
|
|
4732
|
+
if (B++, encodeURI(k).length > 4 && B++, g = g.concat(k), B >= f)
|
|
4733
4733
|
return g = g.concat("..."), g;
|
|
4734
4734
|
}
|
|
4735
|
-
if (
|
|
4735
|
+
if (B < f)
|
|
4736
4736
|
return d;
|
|
4737
4737
|
}
|
|
4738
4738
|
return "";
|
|
@@ -4740,7 +4740,7 @@ function ja(t, e) {
|
|
|
4740
4740
|
const i = H(() => !!t.value && !!t.value.date), r = H(() => {
|
|
4741
4741
|
const d = t.value && t.value.date || "";
|
|
4742
4742
|
return `${e.exception.happend} : ${d}`;
|
|
4743
|
-
}), a = H(() => !!t.value && !!t.value.detail), c = H(() => t.value ? n(t.value.detail) > 160 : !1), s =
|
|
4743
|
+
}), a = H(() => !!t.value && !!t.value.detail), c = H(() => t.value ? n(t.value.detail) > 160 : !1), s = E(!1), l = H(() => s.value ? e.exception.collapse : e.exception.expand), p = H(() => {
|
|
4744
4744
|
const d = e.exception.detail + " : " + (t.value && t.value.detail) || "";
|
|
4745
4745
|
return s.value ? d : o(d, 160);
|
|
4746
4746
|
}), u = H(() => ({
|
|
@@ -4773,11 +4773,11 @@ function Aa(t) {
|
|
|
4773
4773
|
}, null);
|
|
4774
4774
|
}
|
|
4775
4775
|
function La(t, e, n, o, i) {
|
|
4776
|
-
const r =
|
|
4777
|
-
const f = e.value === "question" ? "warning" : e.value,
|
|
4776
|
+
const r = E(t.exceptionInfo), a = H(() => {
|
|
4777
|
+
const f = e.value === "question" ? "warning" : e.value, h = {
|
|
4778
4778
|
"f-icon": !0
|
|
4779
4779
|
}, g = `f-icon-${f}`;
|
|
4780
|
-
return
|
|
4780
|
+
return h[g] = !0, h;
|
|
4781
4781
|
}), c = H(() => n.value || r.value && r.value.message), s = H(() => o.value), l = H(() => !!o.value), p = H(() => !!r.value);
|
|
4782
4782
|
function u() {
|
|
4783
4783
|
return p.value ? ja(r, i) : l.value ? Aa(s) : () => null;
|
|
@@ -4803,7 +4803,7 @@ function Va(t, e, n, o) {
|
|
|
4803
4803
|
onCopy: i
|
|
4804
4804
|
} = e, {
|
|
4805
4805
|
toShowFeedback: r
|
|
4806
|
-
} = n, a =
|
|
4806
|
+
} = n, a = E(o.exception.copySuccess || "复制成功"), c = E(o.exception.copy || "复制详细信息"), s = E(t.exceptionInfo || {
|
|
4807
4807
|
date: "",
|
|
4808
4808
|
message: "",
|
|
4809
4809
|
detail: ""
|
|
@@ -4825,31 +4825,31 @@ function Va(t, e, n, o) {
|
|
|
4825
4825
|
}, [c.value])]);
|
|
4826
4826
|
}
|
|
4827
4827
|
function za(t, e, n, o, i) {
|
|
4828
|
-
const r =
|
|
4828
|
+
const r = E(t.type), a = E(t.buttons), c = E(t.exceptionInfo), s = E(i.ok || t.okButtonText), l = E(i.cancel || t.cancelButtonText), p = E(t.showCancelButton), u = E(t.showOkButton), m = H(() => !!(a.value && a.value.length)), d = H(() => c.value && c.value.message && c.value.detail), f = H(() => !(a.value && a.value.length) && (u.value || p.value)), h = Va(t, n, o, i);
|
|
4829
4829
|
s.value === "关闭" ? s.value = i.close : s.value === "知道了" && (s.value = i.exception.roger);
|
|
4830
|
-
function g(
|
|
4830
|
+
function g(S) {
|
|
4831
4831
|
r.value === "question" && e.emit("reject"), e.emit("close");
|
|
4832
4832
|
}
|
|
4833
|
-
function
|
|
4833
|
+
function B(S) {
|
|
4834
4834
|
r.value === "question" && e.emit("accept"), e.emit("close");
|
|
4835
4835
|
}
|
|
4836
4836
|
return () => w("div", {
|
|
4837
4837
|
class: "modal-footer"
|
|
4838
|
-
}, [d.value &&
|
|
4838
|
+
}, [d.value && h(), f.value && p.value && w("button", {
|
|
4839
4839
|
type: "button",
|
|
4840
4840
|
class: "btn btn-secondary btn-lg",
|
|
4841
4841
|
onClick: g
|
|
4842
4842
|
}, [l.value]), f.value && u.value && w("button", {
|
|
4843
4843
|
type: "button",
|
|
4844
4844
|
class: "btn btn-primary btn-lg",
|
|
4845
|
-
onClick:
|
|
4846
|
-
}, [s.value]), m.value && a.value.length && a.value.map((
|
|
4845
|
+
onClick: B
|
|
4846
|
+
}, [s.value]), m.value && a.value.length && a.value.map((S) => w("button", {
|
|
4847
4847
|
type: "button",
|
|
4848
|
-
onClick:
|
|
4849
|
-
class:
|
|
4850
|
-
}, [
|
|
4851
|
-
class:
|
|
4852
|
-
}, null),
|
|
4848
|
+
onClick: S.handle,
|
|
4849
|
+
class: S.class
|
|
4850
|
+
}, [S.iconClass && w("span", {
|
|
4851
|
+
class: S.iconClass
|
|
4852
|
+
}, null), S.text]))]);
|
|
4853
4853
|
}
|
|
4854
4854
|
function Ha(t) {
|
|
4855
4855
|
const { t: e, locale: n } = Vt();
|
|
@@ -4877,23 +4877,23 @@ function Ha(t) {
|
|
|
4877
4877
|
locale: n.value
|
|
4878
4878
|
};
|
|
4879
4879
|
}
|
|
4880
|
-
const yt = /* @__PURE__ */
|
|
4880
|
+
const yt = /* @__PURE__ */ Pe({
|
|
4881
4881
|
name: "FMessageBox",
|
|
4882
4882
|
props: ka,
|
|
4883
4883
|
emits: ["accept", "reject", "close"],
|
|
4884
4884
|
setup(t, e) {
|
|
4885
|
-
const n = Ha(t), o =
|
|
4886
|
-
const
|
|
4885
|
+
const n = Ha(t), o = E(t.type), i = E(t.title), r = E(t.detail), a = H(() => {
|
|
4886
|
+
const B = {
|
|
4887
4887
|
"modal-tips": !0,
|
|
4888
4888
|
"d-flex": !0,
|
|
4889
4889
|
"flex-row": !0
|
|
4890
|
-
},
|
|
4891
|
-
return
|
|
4890
|
+
}, S = `messager-type-${o.value}`;
|
|
4891
|
+
return B[S] = !0, B;
|
|
4892
4892
|
}), c = H(() => {
|
|
4893
|
-
const
|
|
4893
|
+
const B = {
|
|
4894
4894
|
cursor: "default"
|
|
4895
4895
|
};
|
|
4896
|
-
return o.value === "prompt" ?
|
|
4896
|
+
return o.value === "prompt" ? B.padding = "0.5rem 0.5rem 1rem 1.5rem" : o.value === "error" && (B.padding = "0.5rem 1.5rem 1rem 1.5rem"), B;
|
|
4897
4897
|
}), s = Da(), l = Oa(t, o, i, r), p = $a(), {
|
|
4898
4898
|
feedbackStyle: u,
|
|
4899
4899
|
feedbackMessage: m
|
|
@@ -4912,7 +4912,7 @@ const yt = /* @__PURE__ */ Fe({
|
|
|
4912
4912
|
return La(t, o, i, r, n);
|
|
4913
4913
|
}
|
|
4914
4914
|
}
|
|
4915
|
-
const
|
|
4915
|
+
const h = f(), g = za(t, e, s, p, n);
|
|
4916
4916
|
return () => w("div", {
|
|
4917
4917
|
class: "farris-messager"
|
|
4918
4918
|
}, [!t.exceptionInfo && w("div", {
|
|
@@ -4921,7 +4921,7 @@ const yt = /* @__PURE__ */ Fe({
|
|
|
4921
4921
|
}, null), w("section", {
|
|
4922
4922
|
class: a.value,
|
|
4923
4923
|
style: c.value
|
|
4924
|
-
}, [
|
|
4924
|
+
}, [h()]), g(), d()]);
|
|
4925
4925
|
}
|
|
4926
4926
|
}), qa = "https://json-schema.org/draft/2020-12/schema", _a = "https://farris-design.gitee.io/modal.schema.json", Ua = "modal", Wa = "弹窗组件", Ga = "object", Ya = {
|
|
4927
4927
|
id: {
|
|
@@ -5226,73 +5226,73 @@ class Xe {
|
|
|
5226
5226
|
}
|
|
5227
5227
|
}
|
|
5228
5228
|
function os(t, e) {
|
|
5229
|
-
const n =
|
|
5230
|
-
function
|
|
5231
|
-
const I = o.value || document.body,
|
|
5232
|
-
if (
|
|
5229
|
+
const n = E(), o = E(), i = E(), r = E(), a = E(), c = E(), s = E(), l = E(), p = E(), u = E(), m = E(), d = E(t.resizeable), f = E(), h = E(t.draggable), g = E(!1);
|
|
5230
|
+
function B() {
|
|
5231
|
+
const I = o.value || document.body, O = window.getComputedStyle(I);
|
|
5232
|
+
if (!O || !n.value)
|
|
5233
5233
|
return;
|
|
5234
5234
|
const z = se.getTransformInfo(n.value), L = {};
|
|
5235
5235
|
s.value && (L.deltaL = n.value.offsetLeft - s.value.x, L.deltaT = n.value.offsetTop - s.value.y);
|
|
5236
|
-
const J =
|
|
5237
|
-
L.width = I.clientWidth, L.height = I.clientHeight, L.pr = parseInt(
|
|
5236
|
+
const J = O.getPropertyValue("position");
|
|
5237
|
+
L.width = I.clientWidth, L.height = I.clientHeight, L.pr = parseInt(O.getPropertyValue("padding-right"), 10), L.pb = parseInt(O.getPropertyValue("padding-bottom"), 10), L.position = O.getPropertyValue("position"), J === "static" && (I.style.position = "relative"), L.translateX = z.x, L.translateY = z.y, u.value = L;
|
|
5238
5238
|
}
|
|
5239
|
-
function
|
|
5239
|
+
function S(I) {
|
|
5240
5240
|
if (n.value) {
|
|
5241
|
-
r.value = Xe.getCurrent(n.value), a.value = se.getCurrent(n.value), c.value = r.value ? Xe.copy(r.value) : null, s.value = a.value ? se.copy(a.value) : null,
|
|
5242
|
-
const
|
|
5241
|
+
r.value = Xe.getCurrent(n.value), a.value = se.getCurrent(n.value), c.value = r.value ? Xe.copy(r.value) : null, s.value = a.value ? se.copy(a.value) : null, B();
|
|
5242
|
+
const O = I.target.getAttribute("type") || "";
|
|
5243
5243
|
l.value = {
|
|
5244
|
-
n:
|
|
5245
|
-
s:
|
|
5246
|
-
w:
|
|
5247
|
-
e:
|
|
5244
|
+
n: !!O.match(/n/),
|
|
5245
|
+
s: !!O.match(/s/),
|
|
5246
|
+
w: !!O.match(/w/),
|
|
5247
|
+
e: !!O.match(/e/)
|
|
5248
5248
|
};
|
|
5249
5249
|
}
|
|
5250
5250
|
}
|
|
5251
|
-
function
|
|
5252
|
-
var I,
|
|
5251
|
+
function k() {
|
|
5252
|
+
var I, O, z, L;
|
|
5253
5253
|
if (n.value) {
|
|
5254
5254
|
const J = n.value;
|
|
5255
|
-
l.value && ((l.value.n || l.value.s) && ((I = c.value) != null && I.height) && (J.style.height = c.value.height + "px"), (l.value.w || l.value.e) && ((
|
|
5255
|
+
l.value && ((l.value.n || l.value.s) && ((I = c.value) != null && I.height) && (J.style.height = c.value.height + "px"), (l.value.w || l.value.e) && ((O = c.value) != null && O.width) && (J.style.width = c.value.width + "px"), s.value && ((z = s.value) != null && z.x && (J.style.left = s.value.x + "px"), (L = s.value) != null && L.y && (J.style.top = s.value.y + "px")));
|
|
5256
5256
|
}
|
|
5257
5257
|
}
|
|
5258
5258
|
function b() {
|
|
5259
|
-
const I = t.minHeight ? t.minHeight : 1,
|
|
5260
|
-
c.value && s.value && l.value && r.value && (c.value.height < I && (c.value.height = I, l.value.n && a.value && (s.value.y = a.value.y + (r.value.height - I))), c.value.width <
|
|
5259
|
+
const I = t.minHeight ? t.minHeight : 1, O = t.minWidth ? t.minWidth : 1;
|
|
5260
|
+
c.value && s.value && l.value && r.value && (c.value.height < I && (c.value.height = I, l.value.n && a.value && (s.value.y = a.value.y + (r.value.height - I))), c.value.width < O && (c.value.width = O, l.value.w && a.value && (s.value.x = a.value.x + (r.value.width - O))), t.maxHeight && c.value.height > t.maxHeight && (c.value.height = t.maxHeight, a.value && l.value.n && (s.value.y = a.value.y + (r.value.height - t.maxHeight))), t.maxWidth && c.value.width > t.maxWidth && (c.value.width = t.maxWidth, l.value.w && a.value && (s.value.x = a.value.x + (r.value.width - t.maxWidth))));
|
|
5261
5261
|
}
|
|
5262
5262
|
function C() {
|
|
5263
5263
|
if (o.value) {
|
|
5264
5264
|
const I = u.value;
|
|
5265
5265
|
if (s.value && c.value && l.value && r.value) {
|
|
5266
|
-
const
|
|
5267
|
-
l.value.n && s.value.y + I.translateY < 0 && a.value && (s.value.y = -I.translateY, c.value.height = r.value.height + a.value.y + I.translateY), l.value.w && s.value.x + I.translateX < 0 && a.value && (s.value.x = -I.translateX, c.value.width = r.value.width + a.value.x + I.translateX), c.value.width >
|
|
5266
|
+
const O = I.width - I.pr - I.deltaL - I.translateX - s.value.x, z = I.height - I.pb - I.deltaT - I.translateY - s.value.y;
|
|
5267
|
+
l.value.n && s.value.y + I.translateY < 0 && a.value && (s.value.y = -I.translateY, c.value.height = r.value.height + a.value.y + I.translateY), l.value.w && s.value.x + I.translateX < 0 && a.value && (s.value.x = -I.translateX, c.value.width = r.value.width + a.value.x + I.translateX), c.value.width > O && (c.value.width = O), c.value.height > z && (c.value.height = z);
|
|
5268
5268
|
}
|
|
5269
5269
|
}
|
|
5270
5270
|
}
|
|
5271
|
-
function
|
|
5271
|
+
function x(I) {
|
|
5272
5272
|
if (!i.value || !r.value || !a.value || !l.value)
|
|
5273
5273
|
return;
|
|
5274
5274
|
I.subtract(i.value);
|
|
5275
|
-
const
|
|
5276
|
-
l.value.n ? (s.value.y = a.value.y + z, c.value.height = r.value.height - z) : l.value.s && (c.value.height = r.value.height + z), l.value.e ? c.value.width = r.value.width +
|
|
5275
|
+
const O = I.x, z = I.y;
|
|
5276
|
+
l.value.n ? (s.value.y = a.value.y + z, c.value.height = r.value.height - z) : l.value.s && (c.value.height = r.value.height + z), l.value.e ? c.value.width = r.value.width + O : l.value.w && (c.value.width = r.value.width - O, s.value.x = a.value.x + O), C(), b(), k();
|
|
5277
5277
|
}
|
|
5278
|
-
function
|
|
5278
|
+
function R(I) {
|
|
5279
5279
|
if (!p.value)
|
|
5280
5280
|
return;
|
|
5281
|
-
const
|
|
5282
|
-
|
|
5281
|
+
const O = se.fromEvent(I);
|
|
5282
|
+
O && x(O);
|
|
5283
5283
|
}
|
|
5284
|
-
function
|
|
5284
|
+
function $() {
|
|
5285
5285
|
if (n.value) {
|
|
5286
5286
|
const {
|
|
5287
5287
|
width: I,
|
|
5288
|
-
height:
|
|
5288
|
+
height: O,
|
|
5289
5289
|
x: z,
|
|
5290
5290
|
y: L
|
|
5291
5291
|
} = n.value.getBoundingClientRect(), J = se.getTransformInfo(n.value);
|
|
5292
5292
|
return {
|
|
5293
5293
|
size: {
|
|
5294
5294
|
width: I,
|
|
5295
|
-
height:
|
|
5295
|
+
height: O
|
|
5296
5296
|
},
|
|
5297
5297
|
position: {
|
|
5298
5298
|
x: z - J.x,
|
|
@@ -5302,67 +5302,67 @@ function os(t, e) {
|
|
|
5302
5302
|
}
|
|
5303
5303
|
return null;
|
|
5304
5304
|
}
|
|
5305
|
-
function
|
|
5305
|
+
function N(I) {
|
|
5306
5306
|
if (n.value) {
|
|
5307
|
-
const
|
|
5308
|
-
m.value =
|
|
5307
|
+
const O = $();
|
|
5308
|
+
m.value = O;
|
|
5309
5309
|
}
|
|
5310
|
-
i.value = void 0, r.value = null, a.value = null, c.value = null, s.value = null, l.value = null, p.value = null, document.removeEventListener("mousemove",
|
|
5310
|
+
i.value = void 0, r.value = null, a.value = null, c.value = null, s.value = null, l.value = null, p.value = null, document.removeEventListener("mousemove", R), document.removeEventListener("mouseup", N);
|
|
5311
5311
|
}
|
|
5312
|
-
function
|
|
5313
|
-
document.addEventListener("mousemove",
|
|
5312
|
+
function j() {
|
|
5313
|
+
document.addEventListener("mousemove", R), document.addEventListener("mouseup", N);
|
|
5314
5314
|
}
|
|
5315
|
-
function
|
|
5316
|
-
I instanceof MouseEvent && I.button === 2 ||
|
|
5315
|
+
function M(I) {
|
|
5316
|
+
I instanceof MouseEvent && I.button === 2 || h.value && (document.body.click(), I.stopPropagation(), I.preventDefault(), i.value = se.fromEvent(I), p.value = I.target, S(I), j());
|
|
5317
5317
|
}
|
|
5318
5318
|
function y(I) {
|
|
5319
5319
|
return n.value = I, d.value && w(ft, null, [w("div", {
|
|
5320
5320
|
class: "fv-resizable-handle fv-resizable-n",
|
|
5321
5321
|
type: "n",
|
|
5322
|
-
onMousedown: (
|
|
5322
|
+
onMousedown: (O) => M(O)
|
|
5323
5323
|
}, null), w("div", {
|
|
5324
5324
|
class: "fv-resizable-handle fv-resizable-e",
|
|
5325
5325
|
type: "e",
|
|
5326
|
-
onMousedown: (
|
|
5326
|
+
onMousedown: (O) => M(O)
|
|
5327
5327
|
}, null), w("div", {
|
|
5328
5328
|
class: "fv-resizable-handle fv-resizable-s",
|
|
5329
5329
|
type: "s",
|
|
5330
|
-
onMousedown: (
|
|
5330
|
+
onMousedown: (O) => M(O)
|
|
5331
5331
|
}, null), w("div", {
|
|
5332
5332
|
class: "fv-resizable-handle fv-resizable-w",
|
|
5333
5333
|
type: "w",
|
|
5334
|
-
onMousedown: (
|
|
5334
|
+
onMousedown: (O) => M(O)
|
|
5335
5335
|
}, null), w("div", {
|
|
5336
5336
|
class: "fv-resizable-handle fv-resizable-ne",
|
|
5337
5337
|
type: "ne",
|
|
5338
|
-
onMousedown: (
|
|
5338
|
+
onMousedown: (O) => M(O)
|
|
5339
5339
|
}, null), w("div", {
|
|
5340
5340
|
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
5341
5341
|
type: "se",
|
|
5342
|
-
onMousedown: (
|
|
5342
|
+
onMousedown: (O) => M(O)
|
|
5343
5343
|
}, null), w("div", {
|
|
5344
5344
|
class: "fv-resizable-handle fv-resizable-sw",
|
|
5345
5345
|
type: "sw",
|
|
5346
|
-
onMousedown: (
|
|
5346
|
+
onMousedown: (O) => M(O)
|
|
5347
5347
|
}, null), w("div", {
|
|
5348
5348
|
class: "fv-resizable-handle fv-resizable-nw",
|
|
5349
5349
|
type: "nw",
|
|
5350
|
-
onMousedown: (
|
|
5350
|
+
onMousedown: (O) => M(O)
|
|
5351
5351
|
}, null)]);
|
|
5352
5352
|
}
|
|
5353
|
-
function
|
|
5353
|
+
function v(I = !0) {
|
|
5354
5354
|
document.body.click();
|
|
5355
|
-
const
|
|
5356
|
-
I && L && (f.value =
|
|
5355
|
+
const O = o.value || document.body, z = Xe.getCurrent(O), L = n.value;
|
|
5356
|
+
I && L && (f.value = $(), f.value.transform = L.style.transform), z && L && (c.value = z, c.value.height -= 14, c.value.width -= 14, L.style.height = c.value.height + "px", L.style.width = c.value.width + "px", L.style.left = "7px", L.style.top = "7px", L.style.transform = "", m.value = {
|
|
5357
5357
|
size: c.value,
|
|
5358
5358
|
position: {
|
|
5359
5359
|
x: 0,
|
|
5360
5360
|
y: 0
|
|
5361
5361
|
}
|
|
5362
|
-
},
|
|
5362
|
+
}, h.value = !1, g.value = !0);
|
|
5363
5363
|
}
|
|
5364
|
-
function
|
|
5365
|
-
var I,
|
|
5364
|
+
function T() {
|
|
5365
|
+
var I, O;
|
|
5366
5366
|
if (document.body.click(), f.value) {
|
|
5367
5367
|
const z = {
|
|
5368
5368
|
width: f.value.size.width || 0,
|
|
@@ -5371,124 +5371,124 @@ function os(t, e) {
|
|
|
5371
5371
|
x: (window.innerWidth - z.width) / 2,
|
|
5372
5372
|
y: (window.innerHeight - z.height) / 2
|
|
5373
5373
|
};
|
|
5374
|
-
(I = c.value) == null || I.set(z), (
|
|
5374
|
+
(I = c.value) == null || I.set(z), (O = s.value) == null || O.set(L);
|
|
5375
5375
|
const J = n.value;
|
|
5376
5376
|
J.style.height = z.height + "px", J.style.width = z.width + "px", J.style.left = `${L.x}px`, J.style.top = `${L.y}px`, J.style.transform = "", m.value = {
|
|
5377
5377
|
size: z,
|
|
5378
5378
|
position: L
|
|
5379
|
-
},
|
|
5379
|
+
}, h.value = t.draggable, g.value = !1;
|
|
5380
5380
|
}
|
|
5381
5381
|
}
|
|
5382
|
-
function
|
|
5382
|
+
function F() {
|
|
5383
5383
|
if (n.value) {
|
|
5384
5384
|
const I = Xe.getCurrent(n.value);
|
|
5385
5385
|
if (I) {
|
|
5386
5386
|
const {
|
|
5387
|
-
width:
|
|
5387
|
+
width: O,
|
|
5388
5388
|
height: z
|
|
5389
5389
|
} = I;
|
|
5390
|
-
n.value.style.left = `${(window.innerWidth -
|
|
5390
|
+
n.value.style.left = `${(window.innerWidth - O) / 2}px`, n.value.style.top = `${(window.innerHeight - z) / 2}px`, n.value.style.transform = "";
|
|
5391
5391
|
}
|
|
5392
5392
|
}
|
|
5393
5393
|
}
|
|
5394
|
-
function
|
|
5394
|
+
function P() {
|
|
5395
5395
|
const I = () => {
|
|
5396
|
-
g.value ?
|
|
5396
|
+
g.value ? v(!1) : F(), document.body.click();
|
|
5397
5397
|
};
|
|
5398
5398
|
return window.addEventListener("resize", I), () => {
|
|
5399
5399
|
window.removeEventListener("resize", I);
|
|
5400
5400
|
};
|
|
5401
5401
|
}
|
|
5402
|
-
const
|
|
5402
|
+
const A = P();
|
|
5403
5403
|
return {
|
|
5404
5404
|
renderResizeBar: y,
|
|
5405
5405
|
boundingElement: o,
|
|
5406
5406
|
resizedEventParam: m,
|
|
5407
|
-
maximize:
|
|
5408
|
-
restore:
|
|
5409
|
-
allowDrag:
|
|
5407
|
+
maximize: v,
|
|
5408
|
+
restore: T,
|
|
5409
|
+
allowDrag: h,
|
|
5410
5410
|
isMaximized: g,
|
|
5411
|
-
unWindowResizeHandle:
|
|
5412
|
-
moveToCenter:
|
|
5411
|
+
unWindowResizeHandle: A,
|
|
5412
|
+
moveToCenter: F
|
|
5413
5413
|
};
|
|
5414
5414
|
}
|
|
5415
5415
|
function is(t, e, n) {
|
|
5416
|
-
const o =
|
|
5417
|
-
xe(() => n.value, (
|
|
5418
|
-
a.value.style.cursor =
|
|
5416
|
+
const o = E(), i = E(t.draggable), r = E(t.lockAxis), a = E(), c = E(), s = E(!1), l = E(new se(0, 0)), p = E(new se(0, 0)), u = E(new se(0, 0)), m = E(new se(0, 0));
|
|
5417
|
+
xe(() => n.value, (R) => {
|
|
5418
|
+
a.value.style.cursor = R ? "move" : "default";
|
|
5419
5419
|
});
|
|
5420
|
-
function d(
|
|
5421
|
-
if (
|
|
5420
|
+
function d(R, $) {
|
|
5421
|
+
if ($.tagName === "BUTTON")
|
|
5422
5422
|
return !1;
|
|
5423
|
-
if (
|
|
5423
|
+
if ($ === R)
|
|
5424
5424
|
return !0;
|
|
5425
|
-
for (const
|
|
5426
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
5425
|
+
for (const N in $.children)
|
|
5426
|
+
if (Object.prototype.hasOwnProperty.call($.children, N) && d(R, $.children[N]))
|
|
5427
5427
|
return !0;
|
|
5428
5428
|
return !1;
|
|
5429
5429
|
}
|
|
5430
5430
|
function f() {
|
|
5431
|
-
var
|
|
5432
|
-
let
|
|
5433
|
-
r.value === "x" ? (
|
|
5434
|
-
const
|
|
5435
|
-
o.value && (o.value.style.transform =
|
|
5431
|
+
var j, M;
|
|
5432
|
+
let R = u.value.x + p.value.x, $ = u.value.y + p.value.y;
|
|
5433
|
+
r.value === "x" ? (R = ((j = l.value) == null ? void 0 : j.x) || 0, u.value.x = 0) : r.value === "y" && ($ = ((M = l.value) == null ? void 0 : M.y) || 0, u.value.y = 0);
|
|
5434
|
+
const N = `translate3d(${Math.round(R)}px, ${Math.round($)}px, 0px)`;
|
|
5435
|
+
o.value && (o.value.style.transform = N), m.value.x = R, m.value.y = $;
|
|
5436
5436
|
}
|
|
5437
|
-
function
|
|
5437
|
+
function h() {
|
|
5438
5438
|
if (!c.value || !o.value)
|
|
5439
5439
|
return null;
|
|
5440
|
-
const
|
|
5441
|
-
top:
|
|
5442
|
-
right:
|
|
5443
|
-
bottom:
|
|
5444
|
-
left:
|
|
5440
|
+
const R = c.value.getBoundingClientRect(), $ = o.value.getBoundingClientRect(), N = {
|
|
5441
|
+
top: R.top < $.top,
|
|
5442
|
+
right: R.right > $.right,
|
|
5443
|
+
bottom: R.bottom > $.bottom,
|
|
5444
|
+
left: R.left < $.left
|
|
5445
5445
|
};
|
|
5446
|
-
return
|
|
5446
|
+
return N.top || (u.value.y -= $.top - R.top), N.bottom || (u.value.y -= $.bottom - R.bottom), N.right || (u.value.x -= $.right - R.right), N.left || (u.value.x -= $.left - R.left), f(), N;
|
|
5447
5447
|
}
|
|
5448
|
-
function g(
|
|
5449
|
-
|
|
5448
|
+
function g(R) {
|
|
5449
|
+
R && (l.value && R.subtract(l.value), u.value.set(R), f(), h());
|
|
5450
5450
|
}
|
|
5451
|
-
function
|
|
5452
|
-
s.value && i.value && (
|
|
5451
|
+
function B(R) {
|
|
5452
|
+
s.value && i.value && (R.stopPropagation(), R.preventDefault(), g(se.fromEvent(R, a.value)));
|
|
5453
5453
|
}
|
|
5454
|
-
function
|
|
5455
|
-
var
|
|
5456
|
-
s.value && (s.value = !1, p.value.add(u.value), u.value.reset(), (
|
|
5454
|
+
function S() {
|
|
5455
|
+
var R;
|
|
5456
|
+
s.value && (s.value = !1, p.value.add(u.value), u.value.reset(), (R = o.value) == null || R.classList.remove("ng-dragging"), e.emit("stopMove"), document.removeEventListener("mousemove", B), document.removeEventListener("mouseup", S));
|
|
5457
5457
|
}
|
|
5458
|
-
function
|
|
5459
|
-
!s.value && a.value && (s.value = !0, a.value.classList.add("ng-dragging"), document.addEventListener("mousemove",
|
|
5458
|
+
function k() {
|
|
5459
|
+
!s.value && a.value && (s.value = !0, a.value.classList.add("ng-dragging"), document.addEventListener("mousemove", B), document.addEventListener("mouseup", S));
|
|
5460
5460
|
}
|
|
5461
5461
|
function b() {
|
|
5462
5462
|
if (o.value) {
|
|
5463
|
-
const
|
|
5464
|
-
p.value.set(
|
|
5463
|
+
const R = se.getTransformInfo(o.value);
|
|
5464
|
+
p.value.set(R);
|
|
5465
5465
|
return;
|
|
5466
5466
|
}
|
|
5467
5467
|
p.value.reset();
|
|
5468
5468
|
}
|
|
5469
|
-
function C(
|
|
5470
|
-
if (!n.value ||
|
|
5469
|
+
function C(R) {
|
|
5470
|
+
if (!n.value || R instanceof MouseEvent && R.button === 2)
|
|
5471
5471
|
return;
|
|
5472
|
-
const
|
|
5473
|
-
a.value !== void 0 &&
|
|
5472
|
+
const $ = R.target || R.srcElement;
|
|
5473
|
+
a.value !== void 0 && $ && !d($, a.value) || i.value !== !1 && (document.body.click(), R.stopPropagation(), R.preventDefault(), l.value = se.fromEvent(R, o.value), b(), k());
|
|
5474
5474
|
}
|
|
5475
|
-
function
|
|
5476
|
-
if (i.value &&
|
|
5477
|
-
if (
|
|
5478
|
-
a.value =
|
|
5475
|
+
function x(R, $, N) {
|
|
5476
|
+
if (i.value && $) {
|
|
5477
|
+
if (R)
|
|
5478
|
+
a.value = R;
|
|
5479
5479
|
else if (t.dragHandle) {
|
|
5480
5480
|
if (t.dragHandle instanceof HTMLElement)
|
|
5481
5481
|
a.value = t.dragHandle;
|
|
5482
5482
|
else if (typeof t.dragHandle == "string") {
|
|
5483
|
-
const
|
|
5484
|
-
|
|
5483
|
+
const j = $.querySelector(t.dragHandle);
|
|
5484
|
+
j && (a.value = j);
|
|
5485
5485
|
}
|
|
5486
5486
|
}
|
|
5487
|
-
o.value =
|
|
5487
|
+
o.value = $, c.value = N, a.value ? (a.value.classList.add("ng-draggable"), a.value.addEventListener("mousedown", C)) : i.value = !1;
|
|
5488
5488
|
}
|
|
5489
5489
|
}
|
|
5490
5490
|
return {
|
|
5491
|
-
registerDraggle:
|
|
5491
|
+
registerDraggle: x,
|
|
5492
5492
|
resetTranslate: b
|
|
5493
5493
|
};
|
|
5494
5494
|
}
|
|
@@ -5503,7 +5503,7 @@ function Rn(t, e) {
|
|
|
5503
5503
|
}
|
|
5504
5504
|
}
|
|
5505
5505
|
function rs(t, e) {
|
|
5506
|
-
const n =
|
|
5506
|
+
const n = E(t.enableEsc);
|
|
5507
5507
|
let o = null;
|
|
5508
5508
|
return n.value ? (o = Rn("Escape", (i) => {
|
|
5509
5509
|
e.emit("esc", { event: i.event, type: "esc" });
|
|
@@ -5512,7 +5512,7 @@ function rs(t, e) {
|
|
|
5512
5512
|
}) : null;
|
|
5513
5513
|
}
|
|
5514
5514
|
function as(t, e) {
|
|
5515
|
-
const n =
|
|
5515
|
+
const n = E(t.enableEnter);
|
|
5516
5516
|
let o = null;
|
|
5517
5517
|
return n.value ? (o = Rn("Enter", (i) => {
|
|
5518
5518
|
e.emit("enter", { event: i.event, type: "enter" });
|
|
@@ -5520,17 +5520,17 @@ function as(t, e) {
|
|
|
5520
5520
|
remove: o
|
|
5521
5521
|
}) : null;
|
|
5522
5522
|
}
|
|
5523
|
-
const Qe = /* @__PURE__ */
|
|
5523
|
+
const Qe = /* @__PURE__ */ Pe({
|
|
5524
5524
|
name: "FModal",
|
|
5525
5525
|
props: Dn,
|
|
5526
5526
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter", "stopMove"],
|
|
5527
5527
|
setup(t, e) {
|
|
5528
|
-
const n =
|
|
5528
|
+
const n = E(t.width || 300), o = E(t.height || 200), i = E(t.modelValue), r = E(""), a = E(t.class), c = E(t.fitContent), s = E(t.showHeader), l = E(""), p = E(t.showCloseButton), u = E(t.showMaxButton), m = E(!1), d = E(t.dialogType), f = E(t.src), h = E(""), g = E(t.showButtons), B = E(t.title), S = E(t.containment || null), k = E(), {
|
|
5529
5529
|
t: b
|
|
5530
5530
|
} = Vt();
|
|
5531
|
-
|
|
5532
|
-
const C =
|
|
5533
|
-
function
|
|
5531
|
+
B.value === "错误提示" && (B.value = b("messageBox.errorTitle"));
|
|
5532
|
+
const C = E(!1);
|
|
5533
|
+
function x(q, Z) {
|
|
5534
5534
|
const ce = Z ? "accept" : "cancel";
|
|
5535
5535
|
Promise.resolve().then(() => {
|
|
5536
5536
|
var de;
|
|
@@ -5541,45 +5541,45 @@ const Qe = /* @__PURE__ */ Fe({
|
|
|
5541
5541
|
de && (i.value = !1, e.emit("update:modelValue", !1), Z != null && e.emit(Z ? "accept" : "cancel"), e.emit("closed", q));
|
|
5542
5542
|
});
|
|
5543
5543
|
}
|
|
5544
|
-
const
|
|
5544
|
+
const R = [{
|
|
5545
5545
|
name: "cancel",
|
|
5546
5546
|
text: b("messageBox.cancel") || "取消",
|
|
5547
5547
|
class: "btn btn-secondary",
|
|
5548
5548
|
handle: (q) => {
|
|
5549
|
-
|
|
5549
|
+
x(q, !1);
|
|
5550
5550
|
}
|
|
5551
5551
|
}, {
|
|
5552
5552
|
name: "accept",
|
|
5553
5553
|
text: b("messageBox.ok") || "确定",
|
|
5554
5554
|
class: "btn btn-primary",
|
|
5555
5555
|
handle: (q) => {
|
|
5556
|
-
|
|
5556
|
+
x(q, !0);
|
|
5557
5557
|
}
|
|
5558
|
-
}],
|
|
5559
|
-
renderResizeBar:
|
|
5560
|
-
maximize:
|
|
5561
|
-
restore:
|
|
5562
|
-
boundingElement:
|
|
5558
|
+
}], $ = E(t.buttons && t.buttons.length ? t.buttons : R), N = H(() => !!l.value), j = H(() => !!g.value && !!$.value), M = E(), y = E(), v = E(!1), {
|
|
5559
|
+
renderResizeBar: T,
|
|
5560
|
+
maximize: F,
|
|
5561
|
+
restore: P,
|
|
5562
|
+
boundingElement: A,
|
|
5563
5563
|
resizedEventParam: I,
|
|
5564
|
-
allowDrag:
|
|
5564
|
+
allowDrag: O,
|
|
5565
5565
|
unWindowResizeHandle: z,
|
|
5566
5566
|
moveToCenter: L
|
|
5567
5567
|
} = os(t), {
|
|
5568
5568
|
registerDraggle: J
|
|
5569
|
-
} = is(t, e,
|
|
5569
|
+
} = is(t, e, O);
|
|
5570
5570
|
function K() {
|
|
5571
5571
|
return !!document.querySelectorAll(".farris-modal").length && document.body.classList.contains("modal-open");
|
|
5572
5572
|
}
|
|
5573
5573
|
function te() {
|
|
5574
5574
|
const q = document.querySelectorAll(".farris-modal").length;
|
|
5575
|
-
(!q || q - 1 <= 0) && document.body.classList.remove("modal-open"),
|
|
5575
|
+
(!q || q - 1 <= 0) && document.body.classList.remove("modal-open"), k.value && k.value.classList.remove("show");
|
|
5576
5576
|
}
|
|
5577
5577
|
xe(() => t.title, (q, Z) => {
|
|
5578
|
-
q !== Z && (
|
|
5578
|
+
q !== Z && (B.value = q);
|
|
5579
5579
|
}), xe(() => t.modelValue, (q, Z) => {
|
|
5580
5580
|
q !== Z && (i.value = q, i.value && t.draggable && Ke(() => {
|
|
5581
|
-
y.value && !
|
|
5582
|
-
}), q || (
|
|
5581
|
+
y.value && !S.value && (S.value = y.value.parentElement, A.value = S.value, J(M.value, y.value, A.value), L());
|
|
5582
|
+
}), q || (S.value && (S.value = null), te())), i.value ? C.value = K() : (v.value = !1, O.value = t.draggable);
|
|
5583
5583
|
}), xe(() => t.showHeader, (q, Z) => {
|
|
5584
5584
|
q !== Z && (s.value = q);
|
|
5585
5585
|
}), xe(() => t.showButtons, (q, Z) => {
|
|
@@ -5589,7 +5589,7 @@ const Qe = /* @__PURE__ */ Fe({
|
|
|
5589
5589
|
JSON.stringify(ce) !== JSON.stringify(de) && e.emit("resize", {
|
|
5590
5590
|
newSize: q,
|
|
5591
5591
|
oldSize: Z,
|
|
5592
|
-
isMaximized:
|
|
5592
|
+
isMaximized: v.value
|
|
5593
5593
|
});
|
|
5594
5594
|
});
|
|
5595
5595
|
const Y = H(() => (i.value && document.body.classList.add("modal-open"), i.value)), ae = H(() => {
|
|
@@ -5630,11 +5630,11 @@ const Qe = /* @__PURE__ */ Fe({
|
|
|
5630
5630
|
const q = {
|
|
5631
5631
|
display: s.value ? "" : "none"
|
|
5632
5632
|
};
|
|
5633
|
-
return q["pointer-events"] =
|
|
5633
|
+
return q["pointer-events"] = O.value ? "auto" : "none", q;
|
|
5634
5634
|
}), Me = H(() => ({
|
|
5635
5635
|
"f-icon": !0,
|
|
5636
5636
|
modal_maximize: !0,
|
|
5637
|
-
modalrevert:
|
|
5637
|
+
modalrevert: v.value
|
|
5638
5638
|
})), et = H(() => ({
|
|
5639
5639
|
"modal-body": !0,
|
|
5640
5640
|
"f-utils-flex-column": d.value === "iframe",
|
|
@@ -5647,36 +5647,36 @@ const Qe = /* @__PURE__ */ Fe({
|
|
|
5647
5647
|
}
|
|
5648
5648
|
const tt = H(() => {
|
|
5649
5649
|
const q = {
|
|
5650
|
-
textAlgin:
|
|
5650
|
+
textAlgin: h.value
|
|
5651
5651
|
}, Z = _e();
|
|
5652
5652
|
return Object.assign(q, Z);
|
|
5653
5653
|
});
|
|
5654
5654
|
function le(q) {
|
|
5655
|
-
if (q == null || q.stopPropagation(),
|
|
5656
|
-
|
|
5655
|
+
if (q == null || q.stopPropagation(), v.value) {
|
|
5656
|
+
v.value = !1, P();
|
|
5657
5657
|
return;
|
|
5658
5658
|
}
|
|
5659
|
-
|
|
5659
|
+
F(), v.value = !0;
|
|
5660
5660
|
}
|
|
5661
5661
|
async function at(q, Z) {
|
|
5662
5662
|
q.handle && await q.handle(Z, q) && e.emit("closed", Z);
|
|
5663
5663
|
}
|
|
5664
5664
|
function Ne(q) {
|
|
5665
|
-
q.width && (n.value = q.width), q.height && (o.value = q.height), q.buttons && (
|
|
5665
|
+
q.width && (n.value = q.width), q.height && (o.value = q.height), q.buttons && ($.value = q.buttons), q.title && (B.value = q.title);
|
|
5666
5666
|
}
|
|
5667
5667
|
let je = null, Be = null;
|
|
5668
5668
|
Qn(() => {
|
|
5669
5669
|
C.value = K();
|
|
5670
5670
|
}), Oe(() => {
|
|
5671
|
-
y.value && !
|
|
5671
|
+
y.value && !S.value && (S.value = y.value.parentElement, A.value = S.value, J(M.value, y.value, A.value)), Y.value && document.body.classList.add("modal-open"), je = rs(t, e), Be = as(t, e);
|
|
5672
5672
|
}), pt(() => {
|
|
5673
5673
|
z && z(), je && je.remove(), Be && Be.remove();
|
|
5674
5674
|
}), e.expose({
|
|
5675
5675
|
modalElementRef: y,
|
|
5676
5676
|
updateModalOptions: Ne,
|
|
5677
|
-
close:
|
|
5677
|
+
close: x,
|
|
5678
5678
|
maxDialog: le,
|
|
5679
|
-
isMaximized:
|
|
5679
|
+
isMaximized: v
|
|
5680
5680
|
});
|
|
5681
5681
|
function Ae() {
|
|
5682
5682
|
return w("ul", null, [m.value && w("li", {
|
|
@@ -5691,7 +5691,7 @@ const Qe = /* @__PURE__ */ Fe({
|
|
|
5691
5691
|
class: Me.value
|
|
5692
5692
|
}, null)]), p.value && w("li", {
|
|
5693
5693
|
class: "f-btn-icon f-bare",
|
|
5694
|
-
onClick: (q) =>
|
|
5694
|
+
onClick: (q) => x(q, !1),
|
|
5695
5695
|
style: "pointer-events: auto;"
|
|
5696
5696
|
}, [w("span", {
|
|
5697
5697
|
class: "f-icon modal_close"
|
|
@@ -5701,8 +5701,8 @@ const Qe = /* @__PURE__ */ Fe({
|
|
|
5701
5701
|
return w("div", {
|
|
5702
5702
|
class: "modal-footer",
|
|
5703
5703
|
style: tt.value
|
|
5704
|
-
}, [
|
|
5705
|
-
const Z =
|
|
5704
|
+
}, [$.value && $.value.map((q) => {
|
|
5705
|
+
const Z = E(q.disabled);
|
|
5706
5706
|
return w("button", {
|
|
5707
5707
|
name: q.name,
|
|
5708
5708
|
type: "button",
|
|
@@ -5718,28 +5718,28 @@ const Qe = /* @__PURE__ */ Fe({
|
|
|
5718
5718
|
}
|
|
5719
5719
|
function Ue() {
|
|
5720
5720
|
return w("div", {
|
|
5721
|
-
ref:
|
|
5721
|
+
ref: M,
|
|
5722
5722
|
class: "modal-header",
|
|
5723
5723
|
style: $e.value
|
|
5724
5724
|
}, [e.slots.headerTemplate ? e.slots.headerTemplate() : w("div", {
|
|
5725
5725
|
class: "modal-title"
|
|
5726
|
-
}, [
|
|
5726
|
+
}, [N.value && w("span", {
|
|
5727
5727
|
class: l.value,
|
|
5728
5728
|
style: "margin-right: 8px"
|
|
5729
5729
|
}, null), w("span", {
|
|
5730
5730
|
class: "modal-title-label"
|
|
5731
|
-
}, [
|
|
5731
|
+
}, [B.value])]), w("div", {
|
|
5732
5732
|
class: "actions"
|
|
5733
5733
|
}, [Ae()])]);
|
|
5734
5734
|
}
|
|
5735
5735
|
function De() {
|
|
5736
|
-
return e.slots.footerTemplate ? e.slots.footerTemplate() :
|
|
5736
|
+
return e.slots.footerTemplate ? e.slots.footerTemplate() : j.value && st();
|
|
5737
5737
|
}
|
|
5738
5738
|
function Le(q) {
|
|
5739
5739
|
if (q.stopPropagation(), t.allowClickMaskToClose) {
|
|
5740
|
-
if (q.target !==
|
|
5740
|
+
if (q.target !== k.value)
|
|
5741
5741
|
return;
|
|
5742
|
-
|
|
5742
|
+
x(q, !1);
|
|
5743
5743
|
}
|
|
5744
5744
|
}
|
|
5745
5745
|
function nt() {
|
|
@@ -5759,7 +5759,7 @@ const Qe = /* @__PURE__ */ Fe({
|
|
|
5759
5759
|
width: "100%",
|
|
5760
5760
|
frameborder: "0",
|
|
5761
5761
|
src: f.value
|
|
5762
|
-
}, null)]), De()]), !c.value && y.value && !
|
|
5762
|
+
}, null)]), De()]), !c.value && y.value && !v.value && T(y.value)]);
|
|
5763
5763
|
}
|
|
5764
5764
|
function ot(q) {
|
|
5765
5765
|
return q || "body";
|
|
@@ -5772,7 +5772,7 @@ const Qe = /* @__PURE__ */ Fe({
|
|
|
5772
5772
|
appear: !0
|
|
5773
5773
|
}, {
|
|
5774
5774
|
default: () => [w("div", {
|
|
5775
|
-
ref:
|
|
5775
|
+
ref: k,
|
|
5776
5776
|
class: ae.value,
|
|
5777
5777
|
style: re.value,
|
|
5778
5778
|
onClick: Le
|
|
@@ -5795,13 +5795,13 @@ function ss(t) {
|
|
|
5795
5795
|
pt(() => {
|
|
5796
5796
|
document.body.removeChild(e);
|
|
5797
5797
|
});
|
|
5798
|
-
const r =
|
|
5798
|
+
const r = E(), a = E(t.class || ""), c = E(!!t.showButtons), s = E(!!t.showHeader), l = E(t.showCloseButton == null ? !0 : t.showCloseButton), p = E(!0), u = E(t.title || ""), m = t.acceptCallback || (() => {
|
|
5799
5799
|
}), d = t.rejectCallback || (() => {
|
|
5800
|
-
}), f = t.closedCallback || ((
|
|
5801
|
-
}),
|
|
5802
|
-
}), g = t.stopMoveHandle || ((
|
|
5803
|
-
}),
|
|
5804
|
-
p.value = !1, n.unmount(), f(
|
|
5800
|
+
}), f = t.closedCallback || ((k) => {
|
|
5801
|
+
}), h = t.resizeHandle || ((k) => {
|
|
5802
|
+
}), g = t.stopMoveHandle || ((k) => {
|
|
5803
|
+
}), B = On(t), S = (k) => {
|
|
5804
|
+
p.value = !1, n.unmount(), f(k);
|
|
5805
5805
|
};
|
|
5806
5806
|
return Oe(() => {
|
|
5807
5807
|
}), i.expose({
|
|
@@ -5810,7 +5810,7 @@ function ss(t) {
|
|
|
5810
5810
|
ref: r,
|
|
5811
5811
|
class: a.value,
|
|
5812
5812
|
modelValue: p.value,
|
|
5813
|
-
"onUpdate:modelValue": (
|
|
5813
|
+
"onUpdate:modelValue": (k) => p.value = k,
|
|
5814
5814
|
title: u.value,
|
|
5815
5815
|
width: t.width,
|
|
5816
5816
|
height: t.height,
|
|
@@ -5822,11 +5822,11 @@ function ss(t) {
|
|
|
5822
5822
|
onAccept: m,
|
|
5823
5823
|
onCancel: d,
|
|
5824
5824
|
fitContent: t.fitContent == null ? !0 : t.fitContent,
|
|
5825
|
-
onClosed:
|
|
5826
|
-
onResize:
|
|
5825
|
+
onClosed: S,
|
|
5826
|
+
onResize: h,
|
|
5827
5827
|
onStopMove: g
|
|
5828
5828
|
}, {
|
|
5829
|
-
default: () => [
|
|
5829
|
+
default: () => [B && B(n)]
|
|
5830
5830
|
});
|
|
5831
5831
|
}
|
|
5832
5832
|
});
|
|
@@ -5835,10 +5835,10 @@ function ss(t) {
|
|
|
5835
5835
|
class $n {
|
|
5836
5836
|
constructor(e) {
|
|
5837
5837
|
ee(this, "appContext", null);
|
|
5838
|
-
ee(this, "modalRef",
|
|
5839
|
-
ee(this, "activeModalIndex",
|
|
5838
|
+
ee(this, "modalRef", E());
|
|
5839
|
+
ee(this, "activeModalIndex", E(0));
|
|
5840
5840
|
ee(this, "modalRefs", {});
|
|
5841
|
-
ee(this, "isUseEscCloseModal",
|
|
5841
|
+
ee(this, "isUseEscCloseModal", E(!1));
|
|
5842
5842
|
ee(this, "activeModalInstance", H(() => this.modalRefs[this.activeModalIndex.value]));
|
|
5843
5843
|
this.app = e, this.appContext = e ? e._context : null;
|
|
5844
5844
|
}
|
|
@@ -5877,35 +5877,35 @@ class $n {
|
|
|
5877
5877
|
title: "",
|
|
5878
5878
|
showButtons: !0,
|
|
5879
5879
|
showHeader: !0
|
|
5880
|
-
}, e)), i =
|
|
5880
|
+
}, e)), i = E(!0), r = o.value.acceptCallback || (() => {
|
|
5881
5881
|
}), a = o.value.rejectCallback || (() => {
|
|
5882
|
-
}), c = o.value.closedCallback || ((C,
|
|
5882
|
+
}), c = o.value.closedCallback || ((C, x) => {
|
|
5883
5883
|
}), s = o.value.resizeHandle || ((C) => {
|
|
5884
5884
|
}), l = e.stopMoveHandle || ((C) => {
|
|
5885
5885
|
});
|
|
5886
5886
|
let p;
|
|
5887
5887
|
const u = On(o.value), m = (C) => {
|
|
5888
|
-
var
|
|
5888
|
+
var R;
|
|
5889
5889
|
i.value = !1;
|
|
5890
|
-
const
|
|
5891
|
-
c(C, this.isUseEscCloseModal.value ? "esc" :
|
|
5890
|
+
const x = (R = C == null ? void 0 : C.target) == null ? void 0 : R.classList.contains("modal_close");
|
|
5891
|
+
c(C, this.isUseEscCloseModal.value ? "esc" : x ? "icon" : "button");
|
|
5892
5892
|
}, d = (C) => {
|
|
5893
5893
|
m(C), p && Ke(() => {
|
|
5894
5894
|
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], $t(null, n), p = null, this.modalRef.value = null, this.modalRefs) {
|
|
5895
|
-
const
|
|
5896
|
-
|
|
5895
|
+
const x = Object.keys(this.modalRefs).map((R) => Number(R));
|
|
5896
|
+
x.length > 0 ? this.activeModalIndex.value = Math.max(...x) : this.activeModalIndex.value = 0;
|
|
5897
5897
|
}
|
|
5898
5898
|
this.isUseEscCloseModal.value = !1;
|
|
5899
5899
|
});
|
|
5900
5900
|
}, f = (C) => {
|
|
5901
|
-
var
|
|
5902
|
-
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((
|
|
5901
|
+
var x;
|
|
5902
|
+
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((x = this.activeModalInstance.value) == null || x.close(C == null ? void 0 : C.event));
|
|
5903
5903
|
}, {
|
|
5904
|
-
width:
|
|
5904
|
+
width: h,
|
|
5905
5905
|
height: g
|
|
5906
|
-
} = o.value,
|
|
5907
|
-
Object.assign(o.value,
|
|
5908
|
-
const
|
|
5906
|
+
} = o.value, B = this.adaptToWindow(h || 500, g || 320);
|
|
5907
|
+
Object.assign(o.value, B);
|
|
5908
|
+
const S = () => w(Qe, Lt({
|
|
5909
5909
|
ref: this.modalRef,
|
|
5910
5910
|
modelValue: i.value,
|
|
5911
5911
|
"onUpdate:modelValue": (C) => i.value = C
|
|
@@ -5920,8 +5920,8 @@ class $n {
|
|
|
5920
5920
|
default: () => [u && u(this.app)]
|
|
5921
5921
|
});
|
|
5922
5922
|
return p = ((C) => {
|
|
5923
|
-
const
|
|
5924
|
-
return
|
|
5923
|
+
const x = eo(S, C);
|
|
5924
|
+
return x.appContext = this.appContext, $t(x, n), x;
|
|
5925
5925
|
})({
|
|
5926
5926
|
...o.value
|
|
5927
5927
|
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
@@ -6065,7 +6065,7 @@ const cs = {
|
|
|
6065
6065
|
};
|
|
6066
6066
|
function us(t, e, n) {
|
|
6067
6067
|
var N;
|
|
6068
|
-
const o = "", i =
|
|
6068
|
+
const o = "", i = E();
|
|
6069
6069
|
let r;
|
|
6070
6070
|
function a() {
|
|
6071
6071
|
return !0;
|
|
@@ -6079,172 +6079,175 @@ function us(t, e, n) {
|
|
|
6079
6079
|
function l() {
|
|
6080
6080
|
return !0;
|
|
6081
6081
|
}
|
|
6082
|
-
function p(
|
|
6083
|
-
|
|
6082
|
+
function p() {
|
|
6083
|
+
return !0;
|
|
6084
|
+
}
|
|
6085
|
+
function u(j) {
|
|
6086
|
+
if (!j || !j.value)
|
|
6084
6087
|
return null;
|
|
6085
|
-
const
|
|
6086
|
-
return
|
|
6088
|
+
const M = E(j == null ? void 0 : j.value.parent), y = u(M);
|
|
6089
|
+
return y || null;
|
|
6087
6090
|
}
|
|
6088
|
-
function
|
|
6089
|
-
var
|
|
6090
|
-
const { componentInstance:
|
|
6091
|
-
if (!
|
|
6091
|
+
function m(j = e) {
|
|
6092
|
+
var T;
|
|
6093
|
+
const { componentInstance: M, designerItemElementRef: y } = j;
|
|
6094
|
+
if (!M || !M.value)
|
|
6092
6095
|
return null;
|
|
6093
|
-
const { getCustomButtons:
|
|
6094
|
-
return
|
|
6096
|
+
const { getCustomButtons: v } = M.value;
|
|
6097
|
+
return M.value.canMove || M.value.canAdd || M.value.canDelete || v && ((T = v()) != null && T.length) ? y : m(j.parent);
|
|
6095
6098
|
}
|
|
6096
|
-
function
|
|
6099
|
+
function d() {
|
|
6097
6100
|
}
|
|
6098
|
-
function
|
|
6099
|
-
return
|
|
6101
|
+
function f(j) {
|
|
6102
|
+
return !!n;
|
|
6100
6103
|
}
|
|
6101
|
-
function
|
|
6104
|
+
function h() {
|
|
6102
6105
|
return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
|
|
6103
6106
|
}
|
|
6104
|
-
function
|
|
6107
|
+
function g() {
|
|
6105
6108
|
}
|
|
6106
|
-
function
|
|
6109
|
+
function B(j, M) {
|
|
6107
6110
|
}
|
|
6108
|
-
function
|
|
6109
|
-
const { componentType:
|
|
6110
|
-
let
|
|
6111
|
-
const
|
|
6112
|
-
return
|
|
6111
|
+
function S(j) {
|
|
6112
|
+
const { componentType: M } = j, y = Se("designer-host-service");
|
|
6113
|
+
let v = dn(M, j, y);
|
|
6114
|
+
const T = M.toLowerCase().replace(/-/g, "_");
|
|
6115
|
+
return v && !v.id && v.type === M && (v.id = `${T}_${Math.random().toString().slice(2, 6)}`), v;
|
|
6113
6116
|
}
|
|
6114
|
-
function
|
|
6117
|
+
function k(j) {
|
|
6115
6118
|
}
|
|
6116
|
-
function
|
|
6119
|
+
function b(...j) {
|
|
6117
6120
|
return [];
|
|
6118
6121
|
}
|
|
6119
|
-
function
|
|
6122
|
+
function C() {
|
|
6120
6123
|
}
|
|
6121
|
-
function
|
|
6122
|
-
var
|
|
6124
|
+
function x(j) {
|
|
6125
|
+
var y;
|
|
6123
6126
|
if (!(e != null && e.schema))
|
|
6124
6127
|
return;
|
|
6125
|
-
let
|
|
6128
|
+
let M = "";
|
|
6126
6129
|
{
|
|
6127
|
-
const { text:
|
|
6128
|
-
|
|
6130
|
+
const { text: v, title: T, label: F, mainTitle: P, name: A, type: I } = e.schema;
|
|
6131
|
+
M = v || T || F || P || A || ((y = V[I]) == null ? void 0 : y.name);
|
|
6129
6132
|
}
|
|
6130
|
-
|
|
6131
|
-
componentTitle:
|
|
6132
|
-
parentPathName:
|
|
6133
|
+
M && (!r && j && (r = j.formSchemaUtils), r.getControlBasicInfoMap().set(e.schema.id, {
|
|
6134
|
+
componentTitle: M,
|
|
6135
|
+
parentPathName: M
|
|
6133
6136
|
}));
|
|
6134
6137
|
}
|
|
6135
|
-
function
|
|
6136
|
-
var
|
|
6137
|
-
const { changeObject:
|
|
6138
|
-
["text", "title", "label", "name", "mainTitle"].includes((
|
|
6138
|
+
function R(j) {
|
|
6139
|
+
var T;
|
|
6140
|
+
const { changeObject: M } = j, { propertyID: y, propertyValue: v } = M;
|
|
6141
|
+
["text", "title", "label", "name", "mainTitle"].includes((T = j == null ? void 0 : j.changeObject) == null ? void 0 : T.propertyID) && y && v && x();
|
|
6139
6142
|
}
|
|
6140
|
-
function
|
|
6141
|
-
|
|
6143
|
+
function $(j) {
|
|
6144
|
+
R(j);
|
|
6142
6145
|
}
|
|
6143
6146
|
return i.value = {
|
|
6144
6147
|
canMove: a(),
|
|
6145
6148
|
canSelectParent: c(),
|
|
6146
6149
|
canAdd: l(),
|
|
6147
6150
|
canDelete: s(),
|
|
6148
|
-
canNested: !
|
|
6151
|
+
canNested: !p(),
|
|
6149
6152
|
contents: [],
|
|
6150
6153
|
elementRef: t,
|
|
6151
6154
|
parent: (N = e.parent) == null ? void 0 : N.componentInstance,
|
|
6152
6155
|
schema: e.schema,
|
|
6153
6156
|
styles: o,
|
|
6154
|
-
canAccepts:
|
|
6155
|
-
getBelongedComponentInstance:
|
|
6156
|
-
getDraggableDesignItemElement:
|
|
6157
|
-
getDraggingDisplayText:
|
|
6158
|
-
getPropConfig:
|
|
6159
|
-
getDragScopeElement:
|
|
6160
|
-
onAcceptMovedChildElement:
|
|
6161
|
-
onChildElementMovedOut:
|
|
6162
|
-
addNewChildComponentSchema:
|
|
6163
|
-
onRemoveComponent:
|
|
6164
|
-
triggerBelongedComponentToMoveWhenMoved:
|
|
6165
|
-
triggerBelongedComponentToDeleteWhenDeleted:
|
|
6166
|
-
onPropertyChanged:
|
|
6167
|
-
getCustomButtons:
|
|
6168
|
-
setComponentBasicInfoMap:
|
|
6157
|
+
canAccepts: f,
|
|
6158
|
+
getBelongedComponentInstance: u,
|
|
6159
|
+
getDraggableDesignItemElement: m,
|
|
6160
|
+
getDraggingDisplayText: h,
|
|
6161
|
+
getPropConfig: b,
|
|
6162
|
+
getDragScopeElement: g,
|
|
6163
|
+
onAcceptMovedChildElement: B,
|
|
6164
|
+
onChildElementMovedOut: k,
|
|
6165
|
+
addNewChildComponentSchema: S,
|
|
6166
|
+
onRemoveComponent: C,
|
|
6167
|
+
triggerBelongedComponentToMoveWhenMoved: E(!1),
|
|
6168
|
+
triggerBelongedComponentToDeleteWhenDeleted: E(!1),
|
|
6169
|
+
onPropertyChanged: $,
|
|
6170
|
+
getCustomButtons: d,
|
|
6171
|
+
setComponentBasicInfoMap: x
|
|
6169
6172
|
}, i;
|
|
6170
6173
|
}
|
|
6171
|
-
const Nn = /* @__PURE__ */
|
|
6174
|
+
const Nn = /* @__PURE__ */ Pe({
|
|
6172
6175
|
name: "FDesignerInnerItem",
|
|
6173
6176
|
props: cs,
|
|
6174
6177
|
emits: ["selectionChange", "addComponent", "removeComponent", "clickButton"],
|
|
6175
6178
|
setup(t, e) {
|
|
6176
|
-
const n =
|
|
6179
|
+
const n = E(t.canMove), o = E(t.canAdd), i = E(t.canDelete), r = E(!1), a = E(t.contentKey), c = E(t.childType), s = E(t.childLabel), l = E(t.modelValue), p = E(""), u = E(), m = Se("canvas-dragula"), d = E(), f = Se("design-item-context"), h = {
|
|
6177
6180
|
designerItemElementRef: u,
|
|
6178
6181
|
componentInstance: d,
|
|
6179
6182
|
schema: l.value,
|
|
6180
6183
|
parent: f,
|
|
6181
6184
|
setupContext: e
|
|
6182
6185
|
};
|
|
6183
|
-
cn("design-item-context",
|
|
6184
|
-
const g =
|
|
6186
|
+
cn("design-item-context", h);
|
|
6187
|
+
const g = Se("designer-host-service"), B = Se("external-container-id"), S = H(() => {
|
|
6185
6188
|
var I;
|
|
6186
|
-
const
|
|
6189
|
+
const P = ((I = d.value) == null ? void 0 : I.getCustomButtons) && d.value.getCustomButtons();
|
|
6187
6190
|
return {
|
|
6188
6191
|
"farris-component": !0,
|
|
6189
6192
|
// 受position-relative影响,整个容器的高度不能被撑起
|
|
6190
6193
|
"flex-fill": t.id === "root-component",
|
|
6191
|
-
"position-relative": n.value || i.value || (
|
|
6194
|
+
"position-relative": n.value || i.value || (P == null ? void 0 : P.length),
|
|
6192
6195
|
"farris-nested": r.value,
|
|
6193
6196
|
"can-move": n.value,
|
|
6194
6197
|
"d-none": u.value && u.value.classList.contains("d-none")
|
|
6195
6198
|
};
|
|
6196
|
-
}),
|
|
6197
|
-
const
|
|
6198
|
-
return p.value && p.value.split(";").reduce((
|
|
6199
|
-
const [
|
|
6200
|
-
return
|
|
6201
|
-
},
|
|
6199
|
+
}), k = H(() => {
|
|
6200
|
+
const P = {};
|
|
6201
|
+
return p.value && p.value.split(";").reduce((A, I) => {
|
|
6202
|
+
const [O, z] = I.split(":");
|
|
6203
|
+
return O && (A[O] = z), A;
|
|
6204
|
+
}, P), P;
|
|
6202
6205
|
});
|
|
6203
|
-
function b(
|
|
6206
|
+
function b(P, A) {
|
|
6204
6207
|
if (f && f.schema[a.value]) {
|
|
6205
|
-
const I = f.schema[a.value].findIndex((
|
|
6208
|
+
const I = f.schema[a.value].findIndex((O) => O.id === A.id);
|
|
6206
6209
|
if (I > -1) {
|
|
6207
|
-
const
|
|
6210
|
+
const O = f.schema[a.value].length, z = f.schema[a.value][I % O];
|
|
6208
6211
|
f.designerItemElementRef.value.querySelector(`#${z.id}-design-item`), f.schema[a.value].splice(I, 1), Ze.value++, e.emit("removeComponent"), e.emit("selectionChange");
|
|
6209
6212
|
}
|
|
6210
6213
|
}
|
|
6211
6214
|
}
|
|
6212
|
-
function C(
|
|
6215
|
+
function C(P) {
|
|
6213
6216
|
if (d.value.addNewChildComponentSchema) {
|
|
6214
|
-
const
|
|
6217
|
+
const A = {
|
|
6215
6218
|
componentType: c.value,
|
|
6216
6219
|
label: s.value,
|
|
6217
6220
|
parentComponentInstance: d.value,
|
|
6218
6221
|
targetPosition: -1
|
|
6219
|
-
}, I = d.value.addNewChildComponentSchema(
|
|
6222
|
+
}, I = d.value.addNewChildComponentSchema(A);
|
|
6220
6223
|
l.value[a.value].push(I), e.emit("addComponent");
|
|
6221
6224
|
}
|
|
6222
6225
|
}
|
|
6223
|
-
function
|
|
6226
|
+
function x() {
|
|
6224
6227
|
return o.value && w("div", {
|
|
6225
6228
|
role: "button",
|
|
6226
6229
|
class: "btn component-settings-button",
|
|
6227
6230
|
title: "新增",
|
|
6228
6231
|
ref: "removeComponent",
|
|
6229
|
-
onClick: (
|
|
6232
|
+
onClick: (P) => {
|
|
6230
6233
|
C();
|
|
6231
6234
|
}
|
|
6232
6235
|
}, [w("i", {
|
|
6233
6236
|
class: "f-icon f-icon-plus-circle"
|
|
6234
6237
|
}, null)]);
|
|
6235
6238
|
}
|
|
6236
|
-
function
|
|
6239
|
+
function R(P) {
|
|
6237
6240
|
return i.value && w("div", {
|
|
6238
6241
|
role: "button",
|
|
6239
6242
|
class: "btn component-settings-button",
|
|
6240
6243
|
title: "删除",
|
|
6241
6244
|
ref: "removeComponent",
|
|
6242
|
-
onClick: oo((
|
|
6245
|
+
onClick: oo((A) => b(A, P), ["stop"])
|
|
6243
6246
|
}, [w("i", {
|
|
6244
6247
|
class: "f-icon f-icon-yxs_delete"
|
|
6245
6248
|
}, null)]);
|
|
6246
6249
|
}
|
|
6247
|
-
function
|
|
6250
|
+
function $() {
|
|
6248
6251
|
return n.value && w("div", {
|
|
6249
6252
|
role: "button",
|
|
6250
6253
|
class: "btn component-settings-button",
|
|
@@ -6255,109 +6258,109 @@ const Nn = /* @__PURE__ */ Fe({
|
|
|
6255
6258
|
class: "cmp_move f-icon f-icon-yxs_move"
|
|
6256
6259
|
}, null)]);
|
|
6257
6260
|
}
|
|
6258
|
-
function
|
|
6259
|
-
var
|
|
6260
|
-
const
|
|
6261
|
-
return
|
|
6261
|
+
function N() {
|
|
6262
|
+
var A;
|
|
6263
|
+
const P = ((A = d.value) == null ? void 0 : A.getCustomButtons) && d.value.getCustomButtons();
|
|
6264
|
+
return P && !!P.length && P.map((I) => w("div", {
|
|
6262
6265
|
role: "button",
|
|
6263
6266
|
class: `btn component-settings-button ${I.class || ""} ${I.text ? "settings-button-extend" : ""}`,
|
|
6264
6267
|
title: I.title,
|
|
6265
6268
|
ref: I.id,
|
|
6266
|
-
onClick: (
|
|
6269
|
+
onClick: (O) => I.onClick && I.onClick(O)
|
|
6267
6270
|
}, [w("i", {
|
|
6268
6271
|
class: "f-icon " + I.icon
|
|
6269
6272
|
}, null), I.text && w("span", {
|
|
6270
6273
|
class: "icon-text"
|
|
6271
6274
|
}, [I.text])]));
|
|
6272
6275
|
}
|
|
6273
|
-
function
|
|
6276
|
+
function j(P) {
|
|
6274
6277
|
return w("div", {
|
|
6275
6278
|
class: "component-btn-group",
|
|
6276
6279
|
"data-noattach": "true"
|
|
6277
|
-
}, [w("div", null, [
|
|
6280
|
+
}, [w("div", null, [x(), $(), R(P), N()])]);
|
|
6278
6281
|
}
|
|
6279
|
-
xe(() => t.modelValue, (
|
|
6280
|
-
l.value =
|
|
6282
|
+
xe(() => t.modelValue, (P) => {
|
|
6283
|
+
l.value = P, h.schema = P;
|
|
6281
6284
|
});
|
|
6282
|
-
function
|
|
6285
|
+
function M(P) {
|
|
6283
6286
|
window.scrollContainerList || (window.scrollContainerList = /* @__PURE__ */ new Set());
|
|
6284
|
-
const
|
|
6285
|
-
|
|
6287
|
+
const A = P.getAttribute("id");
|
|
6288
|
+
A && window.scrollContainerList.add(A);
|
|
6286
6289
|
}
|
|
6287
|
-
function y(
|
|
6288
|
-
const
|
|
6289
|
-
|
|
6290
|
+
function y(P) {
|
|
6291
|
+
const A = P.target;
|
|
6292
|
+
M(A), hr(A);
|
|
6290
6293
|
}
|
|
6291
|
-
function
|
|
6292
|
-
var
|
|
6293
|
-
(
|
|
6294
|
+
function v() {
|
|
6295
|
+
var P, A;
|
|
6296
|
+
(A = (P = l.value) == null ? void 0 : P.contents) != null && A.length && u.value && u.value.addEventListener("scroll", y);
|
|
6294
6297
|
}
|
|
6295
|
-
function
|
|
6296
|
-
const
|
|
6297
|
-
return us(
|
|
6298
|
+
function T() {
|
|
6299
|
+
const P = u.value, A = E(P.children[1]);
|
|
6300
|
+
return us(A, h).value;
|
|
6298
6301
|
}
|
|
6299
6302
|
Oe(() => {
|
|
6300
6303
|
if (u.value) {
|
|
6301
|
-
const
|
|
6302
|
-
d.value =
|
|
6304
|
+
const P = u.value.querySelector(`[data-dragref='${l.value.id}-container']`);
|
|
6305
|
+
d.value = P && P.componentInstance ? P.componentInstance.value : T(), m && P && m.attachComponents(P, l.value), r.value = d.value.canNested !== void 0 ? d.value.canNested : r.value, o.value = d.value.canAdd !== void 0 ? d.value.canAdd : o.value, i.value = d.value.canDelete !== void 0 ? d.value.canDelete : i.value, n.value = d.value.canMove !== void 0 ? d.value.canMove : n.value, p.value = d.value.styles || "", u.value && (u.value.componentInstance = d, u.value.designItemContext = h), d.value.setComponentBasicInfoMap(g);
|
|
6303
6306
|
}
|
|
6304
|
-
|
|
6307
|
+
v(), Ze.value++;
|
|
6305
6308
|
}), no(() => {
|
|
6306
6309
|
u.value && u.value.removeEventListener("scroll", y);
|
|
6307
6310
|
});
|
|
6308
|
-
function
|
|
6309
|
-
if (
|
|
6310
|
-
const
|
|
6311
|
-
|
|
6311
|
+
function F(P) {
|
|
6312
|
+
if (P && (P.preventDefault(), P.stopPropagation()), B) {
|
|
6313
|
+
const O = document.getElementById(`${B}-design-item`);
|
|
6314
|
+
O && O.click();
|
|
6312
6315
|
return;
|
|
6313
6316
|
}
|
|
6314
|
-
let
|
|
6317
|
+
let A = h.designerItemElementRef;
|
|
6315
6318
|
const I = u.value;
|
|
6316
6319
|
if (I) {
|
|
6317
|
-
const
|
|
6318
|
-
|
|
6320
|
+
const O = document.getElementsByClassName("dgComponentFocused");
|
|
6321
|
+
O && O.length === 1 && O[0] === u.value && u.value.classList.contains("dgComponentSelected") || (Array.from(O).forEach((L) => L.classList.remove("dgComponentFocused")), Array.from(document.getElementsByClassName("dgComponentSelected")).forEach((L) => L.classList.remove("dgComponentSelected")), I.classList.add("dgComponentFocused"), e.emit("selectionChange", l.value.type, l.value, t.componentId, d.value), d.value.getDraggableDesignItemElement && (A = d.value.getDraggableDesignItemElement(h), A && A.value && A.value.classList.add("dgComponentSelected")));
|
|
6319
6322
|
}
|
|
6320
|
-
In(
|
|
6323
|
+
In(A == null ? void 0 : A.value);
|
|
6321
6324
|
}
|
|
6322
6325
|
return () => w("div", {
|
|
6323
6326
|
id: `${t.id}-design-item`,
|
|
6324
6327
|
ref: u,
|
|
6325
|
-
class:
|
|
6326
|
-
style:
|
|
6327
|
-
onClick:
|
|
6328
|
-
}, [
|
|
6328
|
+
class: S.value,
|
|
6329
|
+
style: k.value,
|
|
6330
|
+
onClick: F
|
|
6331
|
+
}, [j(l.value), e.slots.default && e.slots.default()]);
|
|
6329
6332
|
}
|
|
6330
6333
|
});
|
|
6331
6334
|
function ds(t, e) {
|
|
6332
|
-
const n = new
|
|
6335
|
+
const n = new Sr(), o = t.schema;
|
|
6333
6336
|
function i(g) {
|
|
6334
6337
|
return new xr(g, e).getPropertyConfig(o);
|
|
6335
6338
|
}
|
|
6336
6339
|
function r(g) {
|
|
6337
6340
|
var b;
|
|
6338
|
-
const { componentType:
|
|
6339
|
-
return !!(
|
|
6341
|
+
const { componentType: B, sourceType: S, sourceElement: k } = g;
|
|
6342
|
+
return !!(S === "control" && B === V["filter-bar"].type || S === "move" && B === V["content-container"].type && ((b = k == null ? void 0 : k.className) != null && b.includes("f-filter-container")));
|
|
6340
6343
|
}
|
|
6341
6344
|
function a(g) {
|
|
6342
|
-
var
|
|
6345
|
+
var R;
|
|
6343
6346
|
if (!e)
|
|
6344
6347
|
return !1;
|
|
6345
|
-
const
|
|
6346
|
-
if (!(
|
|
6348
|
+
const B = (R = o.appearance) == null ? void 0 : R.class, { sourceType: S } = g, { formSchemaUtils: k } = e;
|
|
6349
|
+
if (!(B && B.includes("f-section-grid")))
|
|
6347
6350
|
return !1;
|
|
6348
|
-
const C =
|
|
6349
|
-
if (
|
|
6351
|
+
const C = k.getViewModelIdByComponentId(t.componentInstance.value.belongedComponentId), x = k.getViewModelById(C);
|
|
6352
|
+
if (x && x.bindTo !== "/")
|
|
6350
6353
|
return !1;
|
|
6351
|
-
if (
|
|
6354
|
+
if (S === "move")
|
|
6352
6355
|
return !0;
|
|
6353
|
-
if (
|
|
6354
|
-
if (o.contents && o.contents.find((
|
|
6355
|
-
var
|
|
6356
|
-
return
|
|
6356
|
+
if (S === "control") {
|
|
6357
|
+
if (o.contents && o.contents.find((j) => {
|
|
6358
|
+
var M, y;
|
|
6359
|
+
return j.type === V["content-container"].type && ((y = (M = j.appearance) == null ? void 0 : M.class) == null ? void 0 : y.includes("f-filter-container"));
|
|
6357
6360
|
}))
|
|
6358
6361
|
return !1;
|
|
6359
|
-
const
|
|
6360
|
-
if (
|
|
6362
|
+
const N = k.getComponentById("root-component");
|
|
6363
|
+
if (N && k.selectNode(N, (M) => M.type === V["query-solution"].type))
|
|
6361
6364
|
return !1;
|
|
6362
6365
|
}
|
|
6363
6366
|
return !0;
|
|
@@ -6367,8 +6370,8 @@ function ds(t, e) {
|
|
|
6367
6370
|
return a(g);
|
|
6368
6371
|
if (!pr().basalDragulaRuleForContainer(g, e))
|
|
6369
6372
|
return !1;
|
|
6370
|
-
const { canAccept:
|
|
6371
|
-
return
|
|
6373
|
+
const { canAccept: S } = n.getTemplateRule(t, e);
|
|
6374
|
+
return S;
|
|
6372
6375
|
}
|
|
6373
6376
|
function s() {
|
|
6374
6377
|
const { canDelete: g } = n.getTemplateRule(t, e);
|
|
@@ -6379,23 +6382,23 @@ function ds(t, e) {
|
|
|
6379
6382
|
return g;
|
|
6380
6383
|
}
|
|
6381
6384
|
function p() {
|
|
6382
|
-
const { canMove: g, canDelete:
|
|
6383
|
-
return !g && !
|
|
6385
|
+
const { canMove: g, canDelete: B } = n.getTemplateRule(t, e);
|
|
6386
|
+
return !g && !B;
|
|
6384
6387
|
}
|
|
6385
6388
|
function u(g) {
|
|
6386
6389
|
g && (g.stopPropagation(), g.preventDefault());
|
|
6387
|
-
const { schema:
|
|
6388
|
-
(!
|
|
6389
|
-
const
|
|
6390
|
-
|
|
6390
|
+
const { schema: B } = t;
|
|
6391
|
+
(!B.toolbar || !B.toolbar.buttons) && (B.toolbar = { id: `${B.id}_toolbar`, type: "section-toolbar", buttons: [] });
|
|
6392
|
+
const S = zt("section-toolbar-item");
|
|
6393
|
+
S.id = `section_toolbar_item_${Math.random().toString().slice(2, 6)}`, B.toolbar.buttons.push(S);
|
|
6391
6394
|
}
|
|
6392
6395
|
function m() {
|
|
6393
6396
|
var b;
|
|
6394
|
-
const { schema: g } = t,
|
|
6395
|
-
if (g.showHeader === !1 || !
|
|
6397
|
+
const { schema: g } = t, B = e == null ? void 0 : e.formSchemaUtils;
|
|
6398
|
+
if (g.showHeader === !1 || !B)
|
|
6396
6399
|
return;
|
|
6397
|
-
const
|
|
6398
|
-
if (!
|
|
6400
|
+
const S = B.selectNode(g, (C) => C.type === V["response-form"].type), k = ((b = g.toolbar) == null ? void 0 : b.buttons) || [];
|
|
6401
|
+
if (!S && k.length === 0)
|
|
6399
6402
|
return [{
|
|
6400
6403
|
id: "appendToolbar",
|
|
6401
6404
|
title: "新增按钮",
|
|
@@ -6404,42 +6407,42 @@ function ds(t, e) {
|
|
|
6404
6407
|
}];
|
|
6405
6408
|
}
|
|
6406
6409
|
function d() {
|
|
6407
|
-
var
|
|
6410
|
+
var k, b;
|
|
6408
6411
|
if (!e)
|
|
6409
6412
|
return;
|
|
6410
6413
|
const g = e.formSchemaUtils.getExpressions();
|
|
6411
6414
|
if (!g || !g.length)
|
|
6412
6415
|
return;
|
|
6413
|
-
const { schema:
|
|
6414
|
-
if (!((b = (
|
|
6416
|
+
const { schema: B } = t;
|
|
6417
|
+
if (!((b = (k = B.toolbar) == null ? void 0 : k.buttons) != null && b.length))
|
|
6415
6418
|
return;
|
|
6416
|
-
const
|
|
6417
|
-
C.forEach((
|
|
6418
|
-
const
|
|
6419
|
-
|
|
6419
|
+
const S = (C) => {
|
|
6420
|
+
C.forEach((x) => {
|
|
6421
|
+
const R = g.findIndex(($) => $.target === x.id);
|
|
6422
|
+
R > -1 && g.splice(R, 1), x.children && x.children.length && S(x.children);
|
|
6420
6423
|
});
|
|
6421
6424
|
};
|
|
6422
|
-
|
|
6425
|
+
S(B.toolbar.buttons);
|
|
6423
6426
|
}
|
|
6424
6427
|
function f() {
|
|
6425
6428
|
d();
|
|
6426
6429
|
}
|
|
6427
|
-
function
|
|
6428
|
-
var g,
|
|
6430
|
+
function h() {
|
|
6431
|
+
var g, B;
|
|
6429
6432
|
if (t && e) {
|
|
6430
|
-
const { formSchemaUtils:
|
|
6431
|
-
|
|
6433
|
+
const { formSchemaUtils: S } = e, k = S.getControlBasicInfoMap(), { schema: b } = t;
|
|
6434
|
+
k.set(b.id, {
|
|
6432
6435
|
componentTitle: b.mainTitle,
|
|
6433
6436
|
parentPathName: b.mainTitle
|
|
6434
|
-
}), (
|
|
6435
|
-
var
|
|
6436
|
-
|
|
6437
|
+
}), (B = (g = b.toolbar) == null ? void 0 : g.buttons) != null && B.length && b.toolbar.buttons.map((C) => {
|
|
6438
|
+
var x;
|
|
6439
|
+
k.set(C.id, {
|
|
6437
6440
|
componentTitle: C.text,
|
|
6438
6441
|
parentPathName: `${b.mainTitle} > ${C.text}`
|
|
6439
|
-
}), (
|
|
6440
|
-
|
|
6441
|
-
componentTitle:
|
|
6442
|
-
parentPathName: `${b.mainTitle} > ${
|
|
6442
|
+
}), (x = C.children) != null && x.length && C.children.map((R) => {
|
|
6443
|
+
k.set(R.id, {
|
|
6444
|
+
componentTitle: R.text,
|
|
6445
|
+
parentPathName: `${b.mainTitle} > ${R.text}`
|
|
6443
6446
|
});
|
|
6444
6447
|
});
|
|
6445
6448
|
});
|
|
@@ -6453,7 +6456,7 @@ function ds(t, e) {
|
|
|
6453
6456
|
getPropsConfig: i,
|
|
6454
6457
|
getCustomButtons: m,
|
|
6455
6458
|
onRemoveComponent: f,
|
|
6456
|
-
setComponentBasicInfoMap:
|
|
6459
|
+
setComponentBasicInfoMap: h
|
|
6457
6460
|
};
|
|
6458
6461
|
}
|
|
6459
6462
|
class fs extends xt {
|
|
@@ -6517,16 +6520,16 @@ class fs extends xt {
|
|
|
6517
6520
|
function ps(t, e, n) {
|
|
6518
6521
|
const o = t.schema;
|
|
6519
6522
|
function i() {
|
|
6520
|
-
var
|
|
6521
|
-
let f = ((
|
|
6523
|
+
var h;
|
|
6524
|
+
let f = ((h = t.parent) == null ? void 0 : h.schema.type) || "";
|
|
6522
6525
|
["page-header", "tabs", "section"].findIndex((g) => g === f) === -1 && (f = ""), n.toolbarPosition = f;
|
|
6523
6526
|
}
|
|
6524
6527
|
i();
|
|
6525
6528
|
function r(f) {
|
|
6526
6529
|
return !1;
|
|
6527
6530
|
}
|
|
6528
|
-
function a(f,
|
|
6529
|
-
return
|
|
6531
|
+
function a(f, h) {
|
|
6532
|
+
return h.text = f.label, h;
|
|
6530
6533
|
}
|
|
6531
6534
|
function c() {
|
|
6532
6535
|
return !1;
|
|
@@ -6544,19 +6547,19 @@ function ps(t, e, n) {
|
|
|
6544
6547
|
return new fs(f, e, o.type).getPropertyConfig(o);
|
|
6545
6548
|
}
|
|
6546
6549
|
function m(f) {
|
|
6547
|
-
var
|
|
6550
|
+
var S;
|
|
6548
6551
|
f && (f.stopPropagation(), f.preventDefault());
|
|
6549
|
-
const { schema:
|
|
6550
|
-
|
|
6552
|
+
const { schema: h } = t;
|
|
6553
|
+
h.buttons || (h.buttons = []);
|
|
6551
6554
|
let g = "";
|
|
6552
|
-
if (
|
|
6553
|
-
g =
|
|
6555
|
+
if (h.type)
|
|
6556
|
+
g = h.type + "-item";
|
|
6554
6557
|
else {
|
|
6555
|
-
const
|
|
6556
|
-
g =
|
|
6558
|
+
const k = (S = t.parent) == null ? void 0 : S.schema.type;
|
|
6559
|
+
g = k === "tabs" ? "tab-toolbar-item" : k === "section" ? "section-toolbar-item" : "response-toolbar-item";
|
|
6557
6560
|
}
|
|
6558
|
-
const
|
|
6559
|
-
|
|
6561
|
+
const B = zt(g);
|
|
6562
|
+
B.id = `toolbar_item_${Math.random().toString().slice(2, 6)}`, h.buttons.push(B), n.updateToolbarItems(), n.changeSelectedId("");
|
|
6560
6563
|
}
|
|
6561
6564
|
function d() {
|
|
6562
6565
|
return [
|
|
@@ -6623,175 +6626,175 @@ function vs(t, e, n) {
|
|
|
6623
6626
|
actionHandlers: i
|
|
6624
6627
|
} = n;
|
|
6625
6628
|
let r;
|
|
6626
|
-
function a(
|
|
6627
|
-
r =
|
|
6629
|
+
function a(S) {
|
|
6630
|
+
r = S;
|
|
6628
6631
|
}
|
|
6629
|
-
function c(
|
|
6630
|
-
const b = e.value.find((C) => C.id ===
|
|
6632
|
+
function c(S, k = null) {
|
|
6633
|
+
const b = e.value.find((C) => C.id === S.id);
|
|
6631
6634
|
if (b.isDP)
|
|
6632
|
-
if (document.body.click(), typeof
|
|
6633
|
-
b.expanded =
|
|
6635
|
+
if (document.body.click(), typeof k == "boolean")
|
|
6636
|
+
b.expanded = k;
|
|
6634
6637
|
else {
|
|
6635
|
-
const C =
|
|
6638
|
+
const C = S.expanded;
|
|
6636
6639
|
b.expanded = !C;
|
|
6637
6640
|
}
|
|
6638
6641
|
}
|
|
6639
6642
|
i.toggleDropdownMenu = c;
|
|
6640
|
-
function s(
|
|
6643
|
+
function s(S) {
|
|
6641
6644
|
var b;
|
|
6642
|
-
const
|
|
6645
|
+
const k = {
|
|
6643
6646
|
"dropdown-menu": !0
|
|
6644
6647
|
};
|
|
6645
|
-
if (
|
|
6646
|
-
const C = (b =
|
|
6647
|
-
C && C.length && C.reduce((
|
|
6648
|
+
if (S.class) {
|
|
6649
|
+
const C = (b = S.menuClass) == null ? void 0 : b.split(" ");
|
|
6650
|
+
C && C.length && C.reduce((x, R) => (x[R] = !0, x), k);
|
|
6648
6651
|
}
|
|
6649
|
-
return
|
|
6652
|
+
return k;
|
|
6650
6653
|
}
|
|
6651
|
-
function l(
|
|
6654
|
+
function l(S) {
|
|
6652
6655
|
var C;
|
|
6653
|
-
const
|
|
6654
|
-
disabled:
|
|
6656
|
+
const k = {
|
|
6657
|
+
disabled: S.disabled === !1,
|
|
6655
6658
|
"dropdown-submenu": !0,
|
|
6656
6659
|
"f-rt-dropdown": !0,
|
|
6657
6660
|
"text-truncate": !0
|
|
6658
|
-
}, b = (C =
|
|
6659
|
-
return b && b.length && b.reduce((
|
|
6661
|
+
}, b = (C = S.dropdownClass) == null ? void 0 : C.split(" ");
|
|
6662
|
+
return b && b.length && b.reduce((x, R) => (x[R] = !0, x), k), k;
|
|
6660
6663
|
}
|
|
6661
|
-
function p(
|
|
6662
|
-
const
|
|
6664
|
+
function p(S) {
|
|
6665
|
+
const k = {
|
|
6663
6666
|
disabled: !1,
|
|
6664
6667
|
"dropdown-item": !0,
|
|
6665
6668
|
"f-rt-btn": !0,
|
|
6666
6669
|
"position-relative": !0,
|
|
6667
6670
|
"farris-component": !0,
|
|
6668
6671
|
"text-truncate": !0
|
|
6669
|
-
}, b = (
|
|
6670
|
-
return b && b.length && b.reduce((C,
|
|
6672
|
+
}, b = (S.class || "").split(" ");
|
|
6673
|
+
return b && b.length && b.reduce((C, x) => (C[x] = !0, C), k), k;
|
|
6671
6674
|
}
|
|
6672
6675
|
let u;
|
|
6673
6676
|
const m = /* @__PURE__ */ new Map();
|
|
6674
|
-
function d(
|
|
6675
|
-
|
|
6677
|
+
function d(S, k, b) {
|
|
6678
|
+
S.stopPropagation();
|
|
6676
6679
|
const C = b ? b.id : "__top_item__";
|
|
6677
|
-
if (
|
|
6678
|
-
if (m.has(C) && m.get(C) !==
|
|
6679
|
-
const
|
|
6680
|
-
|
|
6680
|
+
if (k.children && k.children.length && (k.expanded = !k.expanded, k.expanded)) {
|
|
6681
|
+
if (m.has(C) && m.get(C) !== k) {
|
|
6682
|
+
const x = m.get(C);
|
|
6683
|
+
x && (x.expanded = !1, m.delete(C));
|
|
6681
6684
|
}
|
|
6682
|
-
m.set(C,
|
|
6685
|
+
m.set(C, k);
|
|
6683
6686
|
}
|
|
6684
6687
|
}
|
|
6685
|
-
function f(
|
|
6686
|
-
var
|
|
6687
|
-
return (
|
|
6688
|
+
function f(S) {
|
|
6689
|
+
var k;
|
|
6690
|
+
return (k = S.children) == null ? void 0 : k.map((b, C) => b.children && b.children.length ? w("li", {
|
|
6688
6691
|
class: l(b),
|
|
6689
6692
|
id: b.id
|
|
6690
6693
|
}, [w("span", {
|
|
6691
6694
|
class: p(b),
|
|
6692
|
-
onClick: (
|
|
6695
|
+
onClick: (x) => d(x, b, S)
|
|
6693
6696
|
}, [b.text, w("i", {
|
|
6694
6697
|
class: "f-icon f-icon-arrow-chevron-right",
|
|
6695
6698
|
style: "display: inline-block;float: right;line-height: 1.25rem;"
|
|
6696
6699
|
}, null)]), u(b, b)]) : o(b, C, !0));
|
|
6697
6700
|
}
|
|
6698
|
-
function
|
|
6701
|
+
function h(S, k, b, C) {
|
|
6699
6702
|
const {
|
|
6700
|
-
height:
|
|
6701
|
-
left:
|
|
6702
|
-
top:
|
|
6703
|
+
height: $,
|
|
6704
|
+
left: N,
|
|
6705
|
+
top: j
|
|
6703
6706
|
} = C[0], {
|
|
6704
|
-
width:
|
|
6707
|
+
width: M,
|
|
6705
6708
|
height: y
|
|
6706
6709
|
} = b.getBoundingClientRect(), {
|
|
6707
|
-
marginTop:
|
|
6708
|
-
marginBottom:
|
|
6709
|
-
} = getComputedStyle(b),
|
|
6710
|
+
marginTop: v,
|
|
6711
|
+
marginBottom: T
|
|
6712
|
+
} = getComputedStyle(b), F = Math.ceil(parseFloat(v)) + Math.ceil(parseFloat(T)), P = j + $, A = k == null ? void 0 : k.getBoundingClientRect();
|
|
6710
6713
|
function I() {
|
|
6711
6714
|
let J = 0, K = "left";
|
|
6712
|
-
const te =
|
|
6713
|
-
return J = te -
|
|
6715
|
+
const te = A ? A.right : window.innerWidth, Y = A ? A.left : 0;
|
|
6716
|
+
return J = te - N - 10, te - N < M && N - Y > te - N && (K = "right", J = N - Y - 10), {
|
|
6714
6717
|
hposition: K,
|
|
6715
6718
|
maxWidth: Math.min(J, 300)
|
|
6716
6719
|
};
|
|
6717
6720
|
}
|
|
6718
|
-
let
|
|
6719
|
-
if (
|
|
6720
|
-
|
|
6721
|
+
let O = 0, z = "bottom";
|
|
6722
|
+
if (S === "tabs" || S === "section")
|
|
6723
|
+
O = k.getBoundingClientRect().bottom - P - F - 10;
|
|
6721
6724
|
else {
|
|
6722
|
-
const J =
|
|
6723
|
-
|
|
6725
|
+
const J = A ? A.bottom : window.innerHeight;
|
|
6726
|
+
O = S === "page-header" ? J - P : j, O = O - F - 10, z = S === "page-header" ? "bottom" : "top";
|
|
6724
6727
|
}
|
|
6725
6728
|
const L = I();
|
|
6726
6729
|
return {
|
|
6727
6730
|
position: z + "-" + L.hposition,
|
|
6728
6731
|
maxWidth: L.maxWidth,
|
|
6729
|
-
maxHeight:
|
|
6732
|
+
maxHeight: O
|
|
6730
6733
|
};
|
|
6731
6734
|
}
|
|
6732
|
-
function g(
|
|
6733
|
-
var
|
|
6734
|
-
const
|
|
6735
|
-
display:
|
|
6735
|
+
function g(S) {
|
|
6736
|
+
var R, $, N;
|
|
6737
|
+
const k = "300px", b = {
|
|
6738
|
+
display: S.expanded === !0 ? "block" : "none",
|
|
6736
6739
|
position: "absolute",
|
|
6737
|
-
maxWidth:
|
|
6740
|
+
maxWidth: k,
|
|
6738
6741
|
minWidth: "120px"
|
|
6739
6742
|
};
|
|
6740
6743
|
if (!(r != null && r.value))
|
|
6741
6744
|
return b;
|
|
6742
|
-
const C = r.value.querySelector("#" +
|
|
6743
|
-
if (C &&
|
|
6744
|
-
const
|
|
6745
|
-
if (!
|
|
6745
|
+
const C = r.value.querySelector("#" + S.id), x = C == null ? void 0 : C.getClientRects();
|
|
6746
|
+
if (C && x && x.length > 0) {
|
|
6747
|
+
const j = C ? C.querySelector("#" + S.id + "_menu") : null;
|
|
6748
|
+
if (!j || S.expanded !== !0)
|
|
6746
6749
|
return b;
|
|
6747
|
-
|
|
6748
|
-
let
|
|
6750
|
+
j.style.visibility = "hidden", j.style.display = "block", j.style.maxHeight = "auto", j.style.maxWidth = k;
|
|
6751
|
+
let M;
|
|
6749
6752
|
switch (i.toolbarPosition) {
|
|
6750
6753
|
case "tabs":
|
|
6751
|
-
|
|
6754
|
+
M = (R = r.value) == null ? void 0 : R.closest(".farris-tabs");
|
|
6752
6755
|
break;
|
|
6753
6756
|
case "section":
|
|
6754
|
-
|
|
6757
|
+
M = ($ = r.value) == null ? void 0 : $.closest(".f-section");
|
|
6755
6758
|
break;
|
|
6756
6759
|
default:
|
|
6757
|
-
|
|
6760
|
+
M = (N = r.value) == null ? void 0 : N.closest(".f-page");
|
|
6758
6761
|
}
|
|
6759
|
-
const y =
|
|
6760
|
-
position:
|
|
6761
|
-
maxHeight:
|
|
6762
|
-
maxWidth:
|
|
6762
|
+
const y = h(i.toolbarPosition, M, j, x), {
|
|
6763
|
+
position: v,
|
|
6764
|
+
maxHeight: T,
|
|
6765
|
+
maxWidth: F
|
|
6763
6766
|
} = y;
|
|
6764
|
-
|
|
6765
|
-
const
|
|
6766
|
-
left:
|
|
6767
|
-
right:
|
|
6768
|
-
bottom:
|
|
6769
|
-
top:
|
|
6770
|
-
maxWidth:
|
|
6771
|
-
maxHeight:
|
|
6772
|
-
overflowY:
|
|
6767
|
+
j.style.visibility = "visible";
|
|
6768
|
+
const P = {
|
|
6769
|
+
left: v.indexOf("left") > -1 ? 0 : "unset",
|
|
6770
|
+
right: v.indexOf("left") > -1 ? "unset" : 0,
|
|
6771
|
+
bottom: v.indexOf("bottom") > -1 ? "unset" : "100%",
|
|
6772
|
+
top: v.indexOf("bottom") > -1 ? "!00%" : "unset",
|
|
6773
|
+
maxWidth: F ? F + "px" : "300px",
|
|
6774
|
+
maxHeight: T ? T + "px" : "auto",
|
|
6775
|
+
overflowY: T ? "auto" : "unset"
|
|
6773
6776
|
};
|
|
6774
|
-
Object.assign(b,
|
|
6777
|
+
Object.assign(b, P);
|
|
6775
6778
|
}
|
|
6776
6779
|
return b;
|
|
6777
6780
|
}
|
|
6778
|
-
i.changeMenuPosition = g, u = function(
|
|
6781
|
+
i.changeMenuPosition = g, u = function(S, k) {
|
|
6779
6782
|
return w("ul", {
|
|
6780
|
-
class: s(
|
|
6781
|
-
style: g(
|
|
6782
|
-
id:
|
|
6783
|
-
}, [f(
|
|
6783
|
+
class: s(S),
|
|
6784
|
+
style: g(S),
|
|
6785
|
+
id: S.id + "_menu"
|
|
6786
|
+
}, [f(S)]);
|
|
6784
6787
|
};
|
|
6785
|
-
function
|
|
6786
|
-
|
|
6787
|
-
b !==
|
|
6788
|
-
}) : (m.forEach((
|
|
6789
|
-
|
|
6788
|
+
function B(S = "") {
|
|
6789
|
+
S && m.has(S) ? m.forEach((k, b) => {
|
|
6790
|
+
b !== S && (k.expanded = !1, m.delete(b));
|
|
6791
|
+
}) : (m.forEach((k) => {
|
|
6792
|
+
k.expanded = !1;
|
|
6790
6793
|
}), m.clear());
|
|
6791
6794
|
}
|
|
6792
6795
|
return {
|
|
6793
6796
|
renderDropdownMenu: u,
|
|
6794
|
-
clearAllDropDownMenu:
|
|
6797
|
+
clearAllDropDownMenu: B,
|
|
6795
6798
|
setResponseToolbarRef: a
|
|
6796
6799
|
};
|
|
6797
6800
|
}
|
|
@@ -7032,165 +7035,165 @@ function bs(t, e, n) {
|
|
|
7032
7035
|
function c() {
|
|
7033
7036
|
return n.toolbarContext.schema.buttons || [];
|
|
7034
7037
|
}
|
|
7035
|
-
function s(y,
|
|
7038
|
+
function s(y, v = "") {
|
|
7036
7039
|
setTimeout(() => {
|
|
7037
|
-
var
|
|
7038
|
-
const
|
|
7039
|
-
let
|
|
7040
|
-
|
|
7041
|
-
const
|
|
7042
|
-
|
|
7040
|
+
var A, I;
|
|
7041
|
+
const T = (A = t.parent) == null ? void 0 : A.designerItemElementRef.value;
|
|
7042
|
+
let F;
|
|
7043
|
+
v && (F = T == null ? void 0 : T.querySelector("#" + v));
|
|
7044
|
+
const P = (I = F || T) == null ? void 0 : I.querySelector("#" + y);
|
|
7045
|
+
P == null || P.click();
|
|
7043
7046
|
}, 0);
|
|
7044
7047
|
}
|
|
7045
|
-
function l(y,
|
|
7046
|
-
|
|
7047
|
-
const
|
|
7048
|
-
if (!
|
|
7048
|
+
function l(y, v) {
|
|
7049
|
+
v.disabled && v.disabled.expressionId && (v.disabled.expressionId = `${v.id}_disabled`), v.visible && v.visible.expressionId && (v.visible.expressionId = `${v.id}_visible`);
|
|
7050
|
+
const T = e.formSchemaUtils.getExpressions(), F = T.find((A) => A.target === y.id);
|
|
7051
|
+
if (!F || !F.rules || !F.rules.length)
|
|
7049
7052
|
return;
|
|
7050
|
-
const
|
|
7051
|
-
target:
|
|
7053
|
+
const P = {
|
|
7054
|
+
target: v.id,
|
|
7052
7055
|
rules: [],
|
|
7053
7056
|
targetType: "Button"
|
|
7054
7057
|
};
|
|
7055
|
-
|
|
7056
|
-
const I = Object.assign(Je(
|
|
7057
|
-
id: `${
|
|
7058
|
+
F.rules.forEach((A) => {
|
|
7059
|
+
const I = Object.assign(Je(A), {
|
|
7060
|
+
id: `${v.id}_${A.type}`
|
|
7058
7061
|
});
|
|
7059
|
-
|
|
7060
|
-
}),
|
|
7062
|
+
P.rules.push(I);
|
|
7063
|
+
}), T.push(P);
|
|
7061
7064
|
}
|
|
7062
7065
|
function p() {
|
|
7063
|
-
var
|
|
7064
|
-
const y = t.schema,
|
|
7066
|
+
var F;
|
|
7067
|
+
const y = t.schema, v = Object.assign(
|
|
7065
7068
|
Je(y),
|
|
7066
7069
|
{
|
|
7067
7070
|
id: `${t.schema.type}-cloned-${Math.random().toString(36).slice(2, 6)}`,
|
|
7068
7071
|
onClick: null
|
|
7069
7072
|
}
|
|
7070
7073
|
);
|
|
7071
|
-
(
|
|
7072
|
-
let
|
|
7073
|
-
return
|
|
7074
|
+
(F = e == null ? void 0 : e.designerContext) != null && F.appendIdentifyForNewControl && e.designerContext.appendIdentifyForNewControl(v);
|
|
7075
|
+
let T = [];
|
|
7076
|
+
return v.children && v.children.length && (T = v.children.map((P) => {
|
|
7074
7077
|
var I;
|
|
7075
|
-
const
|
|
7078
|
+
const A = Je(P);
|
|
7076
7079
|
return Object.assign(
|
|
7077
|
-
|
|
7080
|
+
A,
|
|
7078
7081
|
{
|
|
7079
7082
|
id: `${t.schema.type}-cloned-${Math.random().toString(36).slice(2, 6)}`,
|
|
7080
7083
|
onClick: null
|
|
7081
7084
|
}
|
|
7082
|
-
), (I = e == null ? void 0 : e.designerContext) != null && I.appendIdentifyForNewControl && e.designerContext.appendIdentifyForNewControl(
|
|
7083
|
-
}),
|
|
7085
|
+
), (I = e == null ? void 0 : e.designerContext) != null && I.appendIdentifyForNewControl && e.designerContext.appendIdentifyForNewControl(A), l(P, A), A;
|
|
7086
|
+
}), v.children = T), l(y, v), v;
|
|
7084
7087
|
}
|
|
7085
7088
|
function u() {
|
|
7086
|
-
const y = t.schema.type || "response-toolbar-item",
|
|
7087
|
-
return
|
|
7089
|
+
const y = t.schema.type || "response-toolbar-item", v = bi(y), T = y.toLowerCase().replace("-", "_");
|
|
7090
|
+
return v && !v.id && v.type === y && (v.id = `${T}_${Math.random().toString().slice(2, 6)}`, v.text = "按钮"), v;
|
|
7088
7091
|
}
|
|
7089
7092
|
function m(y) {
|
|
7090
|
-
const
|
|
7091
|
-
return { index:
|
|
7093
|
+
const v = c(), T = v == null ? void 0 : v.findIndex((P) => P.id === y), F = T === -1 ? null : v[T];
|
|
7094
|
+
return { index: T, toolbarItem: F };
|
|
7092
7095
|
}
|
|
7093
7096
|
function d() {
|
|
7094
|
-
const y = t.schema.id,
|
|
7095
|
-
return jt(y,
|
|
7097
|
+
const y = t.schema.id, v = c();
|
|
7098
|
+
return jt(y, v);
|
|
7096
7099
|
}
|
|
7097
7100
|
function f(y) {
|
|
7098
|
-
const
|
|
7099
|
-
if (!
|
|
7101
|
+
const v = e.formSchemaUtils.getExpressions();
|
|
7102
|
+
if (!v || !v.length)
|
|
7100
7103
|
return;
|
|
7101
|
-
const
|
|
7102
|
-
const
|
|
7103
|
-
|
|
7104
|
+
const T = (F) => {
|
|
7105
|
+
const P = v && v.findIndex((A) => A.target === F.id);
|
|
7106
|
+
P > -1 && v.splice(P, 1);
|
|
7104
7107
|
};
|
|
7105
|
-
|
|
7106
|
-
|
|
7108
|
+
T(y), y.children && y.children.length && y.children.forEach((F) => {
|
|
7109
|
+
T(F);
|
|
7107
7110
|
});
|
|
7108
7111
|
}
|
|
7109
|
-
function
|
|
7112
|
+
function h(y) {
|
|
7110
7113
|
n.changeSelectedId(y);
|
|
7111
7114
|
}
|
|
7112
7115
|
function g(y) {
|
|
7113
|
-
e.formSchemaUtils.removeCommunicationInComponent(y), y.children && y.children.length && y.children.forEach((
|
|
7114
|
-
e.formSchemaUtils.removeCommunicationInComponent(
|
|
7116
|
+
e.formSchemaUtils.removeCommunicationInComponent(y), y.children && y.children.length && y.children.forEach((v) => {
|
|
7117
|
+
e.formSchemaUtils.removeCommunicationInComponent(v);
|
|
7115
7118
|
});
|
|
7116
7119
|
}
|
|
7117
|
-
function
|
|
7118
|
-
var
|
|
7119
|
-
if ((
|
|
7120
|
+
function B() {
|
|
7121
|
+
var F, P, A;
|
|
7122
|
+
if ((F = e == null ? void 0 : e.designerContext) != null && F.checkCanDeleteControl && !e.designerContext.checkCanDeleteControl(t.schema))
|
|
7120
7123
|
return;
|
|
7121
|
-
const y = c(), { parentIndex:
|
|
7122
|
-
|
|
7124
|
+
const y = c(), { parentIndex: v, itemIndex: T } = on(t.schema.id, y);
|
|
7125
|
+
v === -1 || T === -1 || (f(t.schema), g(t.schema), y[v].children.splice(T, 1), n.updateToolbarItems(), (P = t.setupContext) == null || P.emit("removeComponent"), (A = t.setupContext) == null || A.emit("selectionChange"), Ze.value++);
|
|
7123
7126
|
}
|
|
7124
|
-
function
|
|
7125
|
-
var
|
|
7126
|
-
if ((
|
|
7127
|
+
function S() {
|
|
7128
|
+
var F, P, A;
|
|
7129
|
+
if ((F = e == null ? void 0 : e.designerContext) != null && F.checkCanDeleteControl && !e.designerContext.checkCanDeleteControl(t.schema))
|
|
7127
7130
|
return;
|
|
7128
|
-
const y = t.schema.id,
|
|
7129
|
-
|
|
7131
|
+
const y = t.schema.id, v = c(), T = v == null ? void 0 : v.findIndex((I) => I.id === y);
|
|
7132
|
+
T !== -1 && (f(v[T]), g(v[T]), v == null || v.splice(T, 1), n.updateToolbarItems(), (P = t.setupContext) == null || P.emit("removeComponent"), (A = t.setupContext) == null || A.emit("selectionChange"), Ze.value++);
|
|
7130
7133
|
}
|
|
7131
|
-
function
|
|
7134
|
+
function k(y = "Append") {
|
|
7132
7135
|
var I;
|
|
7133
|
-
const
|
|
7134
|
-
if (
|
|
7136
|
+
const v = c(), { parentIndex: T, itemIndex: F } = on(t.schema.id, v);
|
|
7137
|
+
if (T === -1 || F === -1)
|
|
7135
7138
|
return;
|
|
7136
|
-
const
|
|
7137
|
-
|
|
7139
|
+
const P = u(), A = y === "Copy" ? p() : Object.assign({}, P);
|
|
7140
|
+
v[T].children.splice(F + 1, 0, A), n.updateToolbarItems(), h(A.id), (I = t.setupContext) == null || I.emit("addComponent");
|
|
7138
7141
|
}
|
|
7139
|
-
function b(y,
|
|
7140
|
-
const { index:
|
|
7141
|
-
if (
|
|
7142
|
-
return { index:
|
|
7143
|
-
const
|
|
7144
|
-
return { index:
|
|
7142
|
+
function b(y, v) {
|
|
7143
|
+
const { index: T } = m(v);
|
|
7144
|
+
if (T === -1)
|
|
7145
|
+
return { index: T, schema: null };
|
|
7146
|
+
const F = u(), P = y === "Copy" ? p() : Object.assign({}, F);
|
|
7147
|
+
return { index: T, schema: P };
|
|
7145
7148
|
}
|
|
7146
7149
|
function C() {
|
|
7147
|
-
var
|
|
7148
|
-
const y = t.schema.id, { index:
|
|
7149
|
-
|
|
7150
|
+
var F;
|
|
7151
|
+
const y = t.schema.id, { index: v, schema: T } = b("Copy", y);
|
|
7152
|
+
T && (c().splice(v + 1, 0, T), n.updateToolbarItems(), s(T.id), (F = t.setupContext) == null || F.emit("addComponent"));
|
|
7150
7153
|
}
|
|
7151
|
-
function
|
|
7152
|
-
var
|
|
7153
|
-
const y = t.schema.id, { index:
|
|
7154
|
-
if (
|
|
7155
|
-
const
|
|
7156
|
-
|
|
7154
|
+
function x() {
|
|
7155
|
+
var F;
|
|
7156
|
+
const y = t.schema.id, { index: v, schema: T } = b("Append", y);
|
|
7157
|
+
if (T && t.parent) {
|
|
7158
|
+
const A = c()[v].children || [];
|
|
7159
|
+
A.push(T);
|
|
7157
7160
|
const I = c();
|
|
7158
|
-
I[
|
|
7161
|
+
I[v].children = A, n.updateToolbarItems(), h(T.id), (F = t.setupContext) == null || F.emit("addComponent");
|
|
7159
7162
|
}
|
|
7160
7163
|
}
|
|
7161
|
-
function
|
|
7162
|
-
let
|
|
7164
|
+
function R(y) {
|
|
7165
|
+
let v;
|
|
7163
7166
|
switch (t.schema.type) {
|
|
7164
7167
|
case "tab-toolbar-item":
|
|
7165
|
-
|
|
7168
|
+
v = new hs(y, e);
|
|
7166
7169
|
break;
|
|
7167
7170
|
default:
|
|
7168
|
-
|
|
7171
|
+
v = new gs(y, e, t.schema.type);
|
|
7169
7172
|
}
|
|
7170
|
-
return
|
|
7173
|
+
return v.getPropertyConfig(t.schema, d());
|
|
7171
7174
|
}
|
|
7172
|
-
function
|
|
7175
|
+
function $(y) {
|
|
7173
7176
|
y.stopPropagation(), y.stopImmediatePropagation();
|
|
7174
7177
|
}
|
|
7175
|
-
function
|
|
7178
|
+
function N() {
|
|
7176
7179
|
const y = [{
|
|
7177
7180
|
id: "delete",
|
|
7178
7181
|
title: "删除",
|
|
7179
7182
|
text: "",
|
|
7180
7183
|
icon: "f-icon-yxs_delete",
|
|
7181
|
-
onClick: (
|
|
7182
|
-
|
|
7184
|
+
onClick: (v) => {
|
|
7185
|
+
$(v), d() ? B() : S();
|
|
7183
7186
|
}
|
|
7184
7187
|
}, {
|
|
7185
7188
|
id: "copy",
|
|
7186
7189
|
title: "复制",
|
|
7187
7190
|
icon: "f-icon-yxs_copy",
|
|
7188
|
-
onClick: (
|
|
7189
|
-
|
|
7190
|
-
const { activeElement:
|
|
7191
|
-
|
|
7192
|
-
d() ?
|
|
7193
|
-
})) : d() ?
|
|
7191
|
+
onClick: (v) => {
|
|
7192
|
+
$(v);
|
|
7193
|
+
const { activeElement: T } = document, F = T ? T.tagName.toLowerCase() : "";
|
|
7194
|
+
F && F === "input" || F === "textarea" ? (T == null || T.blur(), Ke(() => {
|
|
7195
|
+
d() ? k("Copy") : C();
|
|
7196
|
+
})) : d() ? k("Copy") : C();
|
|
7194
7197
|
}
|
|
7195
7198
|
}];
|
|
7196
7199
|
return y.push(d() ? {
|
|
@@ -7198,40 +7201,40 @@ function bs(t, e, n) {
|
|
|
7198
7201
|
title: "",
|
|
7199
7202
|
text: "新增同级",
|
|
7200
7203
|
icon: "f-icon-plus-circle",
|
|
7201
|
-
onClick: (
|
|
7202
|
-
|
|
7204
|
+
onClick: (v) => {
|
|
7205
|
+
$(v), k();
|
|
7203
7206
|
}
|
|
7204
7207
|
} : {
|
|
7205
7208
|
id: "appendChildButton",
|
|
7206
7209
|
title: "",
|
|
7207
7210
|
text: "新增子级",
|
|
7208
7211
|
icon: "f-icon-plus-circle",
|
|
7209
|
-
onClick: (
|
|
7210
|
-
|
|
7212
|
+
onClick: (v) => {
|
|
7213
|
+
$(v), x();
|
|
7211
7214
|
}
|
|
7212
7215
|
}), y;
|
|
7213
7216
|
}
|
|
7214
|
-
function
|
|
7217
|
+
function j() {
|
|
7215
7218
|
const { schema: y } = t;
|
|
7216
7219
|
f(y);
|
|
7217
7220
|
}
|
|
7218
|
-
function
|
|
7219
|
-
var y,
|
|
7221
|
+
function M() {
|
|
7222
|
+
var y, v, T, F;
|
|
7220
7223
|
if (t && e) {
|
|
7221
|
-
const { formSchemaUtils:
|
|
7222
|
-
switch (
|
|
7224
|
+
const { formSchemaUtils: P } = e, { schema: A } = t;
|
|
7225
|
+
switch (A.type) {
|
|
7223
7226
|
case "response-toolbar-item": {
|
|
7224
|
-
|
|
7225
|
-
componentTitle:
|
|
7226
|
-
parentPathName:
|
|
7227
|
+
P.getControlBasicInfoMap().set(A.id, {
|
|
7228
|
+
componentTitle: A.text,
|
|
7229
|
+
parentPathName: A.text
|
|
7227
7230
|
});
|
|
7228
7231
|
break;
|
|
7229
7232
|
}
|
|
7230
7233
|
case "tab-toolbar-item":
|
|
7231
7234
|
case "section-toolbar-item": {
|
|
7232
7235
|
let I;
|
|
7233
|
-
const
|
|
7234
|
-
(
|
|
7236
|
+
const O = (y = t.parent) == null ? void 0 : y.parent;
|
|
7237
|
+
(O == null ? void 0 : O.schema.type) === "tabs" || (O == null ? void 0 : O.schema.type) === "section" ? I = (v = O.componentInstance) == null ? void 0 : v.value : I = (F = (T = O == null ? void 0 : O.parent) == null ? void 0 : T.componentInstance) == null ? void 0 : F.value, I != null && I.setComponentBasicInfoMap && I.setComponentBasicInfoMap();
|
|
7235
7238
|
}
|
|
7236
7239
|
}
|
|
7237
7240
|
}
|
|
@@ -7241,18 +7244,18 @@ function bs(t, e, n) {
|
|
|
7241
7244
|
checkCanMoveComponent: i,
|
|
7242
7245
|
checkCanDeleteComponent: r,
|
|
7243
7246
|
checkCanAddComponent: a,
|
|
7244
|
-
getPropsConfig:
|
|
7245
|
-
getCustomButtons:
|
|
7246
|
-
onRemoveComponent:
|
|
7247
|
-
setComponentBasicInfoMap:
|
|
7247
|
+
getPropsConfig: R,
|
|
7248
|
+
getCustomButtons: N,
|
|
7249
|
+
onRemoveComponent: j,
|
|
7250
|
+
setComponentBasicInfoMap: M
|
|
7248
7251
|
};
|
|
7249
7252
|
}
|
|
7250
|
-
const Cs = /* @__PURE__ */
|
|
7253
|
+
const Cs = /* @__PURE__ */ Pe({
|
|
7251
7254
|
name: "FResponseToolbarItemDesign",
|
|
7252
7255
|
props: Mn,
|
|
7253
7256
|
emits: ["Click", "dropdown", "clearAll"],
|
|
7254
7257
|
setup(t, e) {
|
|
7255
|
-
const n =
|
|
7258
|
+
const n = E(t.alignment), o = jn(), i = E(), r = Se("designer-host-service"), a = Se("design-item-context"), c = Se("toolbar-item-action"), s = bs(a, r, c), l = Wo(i, a, s);
|
|
7256
7259
|
Oe(() => {
|
|
7257
7260
|
i.value.componentInstance = l;
|
|
7258
7261
|
}), e.expose(l.value);
|
|
@@ -7297,7 +7300,7 @@ const Cs = /* @__PURE__ */ Fe({
|
|
|
7297
7300
|
"no-drag": !0
|
|
7298
7301
|
};
|
|
7299
7302
|
return ge(b, t.class);
|
|
7300
|
-
}),
|
|
7303
|
+
}), h = H(() => {
|
|
7301
7304
|
let b = {
|
|
7302
7305
|
btn: !t.isDPItem,
|
|
7303
7306
|
// 不是下拉按钮,不是下拉项
|
|
@@ -7318,7 +7321,7 @@ const Cs = /* @__PURE__ */ Fe({
|
|
|
7318
7321
|
isDP: t.isDP
|
|
7319
7322
|
});
|
|
7320
7323
|
}
|
|
7321
|
-
function
|
|
7324
|
+
function B() {
|
|
7322
7325
|
return {
|
|
7323
7326
|
"btn-group": !0,
|
|
7324
7327
|
"no-drag": !0,
|
|
@@ -7327,14 +7330,14 @@ const Cs = /* @__PURE__ */ Fe({
|
|
|
7327
7330
|
"f-btn-mr": n.value === "left"
|
|
7328
7331
|
};
|
|
7329
7332
|
}
|
|
7330
|
-
function
|
|
7333
|
+
function S() {
|
|
7331
7334
|
return w("div", {
|
|
7332
7335
|
ref: i,
|
|
7333
7336
|
"data-dragref": `${a.schema.id}-container`,
|
|
7334
7337
|
class: "farris-component position-relative",
|
|
7335
7338
|
style: "display:inline-block!important;"
|
|
7336
7339
|
}, [w("div", {
|
|
7337
|
-
class:
|
|
7340
|
+
class: B(),
|
|
7338
7341
|
id: t.id
|
|
7339
7342
|
}, [w("div", {
|
|
7340
7343
|
class: m.value,
|
|
@@ -7352,17 +7355,17 @@ const Cs = /* @__PURE__ */ Fe({
|
|
|
7352
7355
|
onClick: (b) => g("dropdown", b)
|
|
7353
7356
|
}, null), c.renderDropdownMenu(t.item, t.item)])]);
|
|
7354
7357
|
}
|
|
7355
|
-
function
|
|
7358
|
+
function k() {
|
|
7356
7359
|
return w("li", {
|
|
7357
7360
|
ref: i,
|
|
7358
7361
|
"data-dragref": `${a.schema.id}-container`,
|
|
7359
7362
|
id: t.id,
|
|
7360
|
-
class:
|
|
7363
|
+
class: h.value
|
|
7361
7364
|
}, [o.shouldShowIcon(t) && w("i", {
|
|
7362
7365
|
class: o.iconClass(t)
|
|
7363
7366
|
}, null), t.text]);
|
|
7364
7367
|
}
|
|
7365
|
-
return () => t.isDP ?
|
|
7368
|
+
return () => t.isDP ? S() : t.isDPItem ? k() : w("div", {
|
|
7366
7369
|
ref: i,
|
|
7367
7370
|
"data-dragref": `${a.schema.id}-container`,
|
|
7368
7371
|
class: "farris-component position-relative",
|
|
@@ -7378,8 +7381,8 @@ const Cs = /* @__PURE__ */ Fe({
|
|
|
7378
7381
|
}
|
|
7379
7382
|
});
|
|
7380
7383
|
function ws(t, e, n, o) {
|
|
7381
|
-
function i(m, d, f,
|
|
7382
|
-
o.changeSelectedId((d == null ? void 0 : d.id) || ""), n && n.setupContext && n.setupContext.emit("selectionChange", m, d, f,
|
|
7384
|
+
function i(m, d, f, h) {
|
|
7385
|
+
o.changeSelectedId((d == null ? void 0 : d.id) || ""), n && n.setupContext && n.setupContext.emit("selectionChange", m, d, f, h);
|
|
7383
7386
|
}
|
|
7384
7387
|
function r() {
|
|
7385
7388
|
}
|
|
@@ -7391,8 +7394,8 @@ function ws(t, e, n, o) {
|
|
|
7391
7394
|
o.clearAllDropdown(m.isDP ? m.id : "");
|
|
7392
7395
|
}
|
|
7393
7396
|
function s(m, d = "") {
|
|
7394
|
-
const f = t.items || [],
|
|
7395
|
-
return d ? g.children.find((
|
|
7397
|
+
const f = t.items || [], h = d || m, g = f.find((B) => B.id === h);
|
|
7398
|
+
return d ? g.children.find((B) => B.id === m) : g;
|
|
7396
7399
|
}
|
|
7397
7400
|
function l(m, d = !1) {
|
|
7398
7401
|
if (!d)
|
|
@@ -7407,38 +7410,38 @@ function ws(t, e, n, o) {
|
|
|
7407
7410
|
f != null && f.classList.contains("dgComponentFocused") && (f == null || f.classList.remove("dgComponentSelected"));
|
|
7408
7411
|
}
|
|
7409
7412
|
function u(m, d, f = !1) {
|
|
7410
|
-
const
|
|
7413
|
+
const h = s(m.id, m.parent), g = E(h);
|
|
7411
7414
|
return w(Nn, {
|
|
7412
|
-
key:
|
|
7415
|
+
key: h.id,
|
|
7413
7416
|
class: ["p-0", f ? "d-block no-drag" : "d-inline-block"],
|
|
7414
7417
|
modelValue: g.value,
|
|
7415
|
-
"onUpdate:modelValue": (
|
|
7418
|
+
"onUpdate:modelValue": (B) => g.value = B,
|
|
7416
7419
|
canMove: !1,
|
|
7417
7420
|
childType: "response-toolbar-item",
|
|
7418
7421
|
childLabel: "按钮",
|
|
7419
7422
|
contentKey: "buttons",
|
|
7420
7423
|
componentId: t.componentId,
|
|
7421
|
-
id:
|
|
7424
|
+
id: h.id,
|
|
7422
7425
|
onSelectionChange: i,
|
|
7423
7426
|
onRemoveComponent: r,
|
|
7424
|
-
onMouseenter: (
|
|
7425
|
-
onMouseleave: (
|
|
7427
|
+
onMouseenter: (B) => l(B, f),
|
|
7428
|
+
onMouseleave: (B) => p(B, f)
|
|
7426
7429
|
}, {
|
|
7427
7430
|
default: () => {
|
|
7428
|
-
var
|
|
7431
|
+
var B;
|
|
7429
7432
|
return [w(Cs, {
|
|
7430
|
-
id:
|
|
7431
|
-
disabled:
|
|
7432
|
-
text:
|
|
7433
|
-
icon:
|
|
7433
|
+
id: h.id,
|
|
7434
|
+
disabled: h.disabled,
|
|
7435
|
+
text: h.text,
|
|
7436
|
+
icon: h.icon,
|
|
7434
7437
|
isDP: m.isDP,
|
|
7435
7438
|
item: m,
|
|
7436
|
-
split:
|
|
7439
|
+
split: h.split,
|
|
7437
7440
|
isDPItem: m.isDPItem,
|
|
7438
|
-
class: ((
|
|
7441
|
+
class: ((B = m.appearance) == null ? void 0 : B.class) || "btn-secondary",
|
|
7439
7442
|
alignment: t.alignment || "right",
|
|
7440
7443
|
onDropdown: () => a(m),
|
|
7441
|
-
onClearAll: (
|
|
7444
|
+
onClearAll: (S) => c(S),
|
|
7442
7445
|
componentId: t.componentId
|
|
7443
7446
|
}, null)];
|
|
7444
7447
|
}
|
|
@@ -7470,14 +7473,14 @@ function At(t, e = !1, n = "") {
|
|
|
7470
7473
|
return i;
|
|
7471
7474
|
}, o), o;
|
|
7472
7475
|
}
|
|
7473
|
-
const An = /* @__PURE__ */
|
|
7476
|
+
const An = /* @__PURE__ */ Pe({
|
|
7474
7477
|
name: "FResponseToolbarDesign",
|
|
7475
7478
|
props: sr,
|
|
7476
7479
|
emits: ["Click"],
|
|
7477
7480
|
setup(t, e) {
|
|
7478
|
-
const n =
|
|
7481
|
+
const n = E(At(t.items)), o = E(), i = E(), r = E(), a = E("");
|
|
7479
7482
|
let c = 0;
|
|
7480
|
-
const s = 15, l =
|
|
7483
|
+
const s = 15, l = Se("designer-host-service"), p = Se("design-item-context"), u = {
|
|
7481
7484
|
clearAllDropdown: (z) => {
|
|
7482
7485
|
},
|
|
7483
7486
|
toggleDropdownMenu: (z) => {
|
|
@@ -7492,24 +7495,24 @@ const An = /* @__PURE__ */ Fe({
|
|
|
7492
7495
|
toolbarContext: p,
|
|
7493
7496
|
changeMenuPosition: (z, L, J) => ({}),
|
|
7494
7497
|
toolbarPosition: ""
|
|
7495
|
-
}, m = ps(p, l, u), d = Go(r, p, m), f =
|
|
7496
|
-
initDragula:
|
|
7498
|
+
}, m = ps(p, l, u), d = Go(r, p, m), f = Se("toolbar-item-handler"), {
|
|
7499
|
+
initDragula: h,
|
|
7497
7500
|
dragulaInstance: g
|
|
7498
|
-
} = ms(p),
|
|
7501
|
+
} = ms(p), B = jn(), S = ws(t, i, p, u), k = vs(B, n, S), {
|
|
7499
7502
|
renderToolbarItemDesigner: b
|
|
7500
|
-
} =
|
|
7503
|
+
} = S, {
|
|
7501
7504
|
clearAllDropDownMenu: C,
|
|
7502
|
-
renderDropdownMenu:
|
|
7503
|
-
setResponseToolbarRef:
|
|
7504
|
-
} =
|
|
7505
|
-
cn("toolbar-item-action", u), u.renderDropdownMenu =
|
|
7505
|
+
renderDropdownMenu: x,
|
|
7506
|
+
setResponseToolbarRef: R
|
|
7507
|
+
} = k;
|
|
7508
|
+
cn("toolbar-item-action", u), u.renderDropdownMenu = x, R(r), f && (f.changeSelectedId = function(z) {
|
|
7506
7509
|
a.value = z;
|
|
7507
7510
|
});
|
|
7508
|
-
function
|
|
7511
|
+
function $() {
|
|
7509
7512
|
const z = i.value.querySelector(".dgComponentSelected");
|
|
7510
7513
|
z && Wt(z);
|
|
7511
7514
|
}
|
|
7512
|
-
function
|
|
7515
|
+
function N() {
|
|
7513
7516
|
if (a.value)
|
|
7514
7517
|
if (jt(a.value, n.value)) {
|
|
7515
7518
|
const {
|
|
@@ -7522,18 +7525,18 @@ const An = /* @__PURE__ */ Fe({
|
|
|
7522
7525
|
(((te = K == null ? void 0 : K.parentElement) == null ? void 0 : te.className) || "").indexOf("dgComponentFocused") < 0 && (K == null || K.click());
|
|
7523
7526
|
}, 0));
|
|
7524
7527
|
} else
|
|
7525
|
-
|
|
7528
|
+
$();
|
|
7526
7529
|
}
|
|
7527
|
-
function
|
|
7530
|
+
function j(z = "") {
|
|
7528
7531
|
n.value.filter((L) => L.id !== z && L.children && L.children.length > 0).forEach((L) => {
|
|
7529
7532
|
L.expanded = !1;
|
|
7530
7533
|
}), C(z);
|
|
7531
7534
|
}
|
|
7532
|
-
u.clearAllDropdown =
|
|
7533
|
-
function
|
|
7535
|
+
u.clearAllDropdown = j;
|
|
7536
|
+
function M() {
|
|
7534
7537
|
f && f.updateToolbarItems && f.updateToolbarItems();
|
|
7535
7538
|
}
|
|
7536
|
-
u.updateToolbarItems =
|
|
7539
|
+
u.updateToolbarItems = M;
|
|
7537
7540
|
function y(z) {
|
|
7538
7541
|
if (z) {
|
|
7539
7542
|
const L = r.value.querySelector("#" + z.id), J = L.querySelector("#" + z.id + "_menu"), K = u.changeMenuPosition(z, L);
|
|
@@ -7542,7 +7545,7 @@ const An = /* @__PURE__ */ Fe({
|
|
|
7542
7545
|
});
|
|
7543
7546
|
}
|
|
7544
7547
|
}
|
|
7545
|
-
function
|
|
7548
|
+
function v() {
|
|
7546
7549
|
const J = i.value.clientWidth, K = i.value.querySelectorAll(".farris-component>.f-rt-btn");
|
|
7547
7550
|
K && K.forEach((Y) => {
|
|
7548
7551
|
Y.style.maxWidth = J - 12 + "px";
|
|
@@ -7552,7 +7555,7 @@ const An = /* @__PURE__ */ Fe({
|
|
|
7552
7555
|
Y.querySelector(".dropdown-toggle-split") ? Y.querySelector(".f-rt-btn").style.maxWidth = J - 38 + "px" : Y.style.maxWidth = J - 12 + "px";
|
|
7553
7556
|
});
|
|
7554
7557
|
}
|
|
7555
|
-
const
|
|
7558
|
+
const T = new ResizeObserver((z) => {
|
|
7556
7559
|
var L;
|
|
7557
7560
|
if (z.length) {
|
|
7558
7561
|
const K = z[0].contentRect.width;
|
|
@@ -7571,17 +7574,17 @@ const An = /* @__PURE__ */ Fe({
|
|
|
7571
7574
|
const te = (L = n.value) == null ? void 0 : L.find((Y) => Y.id === a.value);
|
|
7572
7575
|
y(te);
|
|
7573
7576
|
} else
|
|
7574
|
-
|
|
7575
|
-
|
|
7577
|
+
j();
|
|
7578
|
+
v();
|
|
7576
7579
|
}
|
|
7577
7580
|
}
|
|
7578
7581
|
});
|
|
7579
7582
|
Oe(() => {
|
|
7580
|
-
|
|
7583
|
+
T.observe(r.value), c = r.value.clientWidth, r.value.componentInstance = d, h(i.value, o.value, M);
|
|
7581
7584
|
}), pt(() => {
|
|
7582
|
-
|
|
7585
|
+
T.disconnect(), g && g.destroy && g.destroy();
|
|
7583
7586
|
}), e.expose(d.value);
|
|
7584
|
-
const
|
|
7587
|
+
const F = H(() => {
|
|
7585
7588
|
const z = {
|
|
7586
7589
|
"f-toolbar": !0,
|
|
7587
7590
|
"f-response-toolbar": !0,
|
|
@@ -7590,7 +7593,7 @@ const An = /* @__PURE__ */ Fe({
|
|
|
7590
7593
|
"f-response-toolbar-lg": t.buttonSize === "lg"
|
|
7591
7594
|
};
|
|
7592
7595
|
return ge(z, t.customClass);
|
|
7593
|
-
}),
|
|
7596
|
+
}), P = H(() => ({
|
|
7594
7597
|
"text-left": t.alignment === "left",
|
|
7595
7598
|
"text-right": t.alignment === "right",
|
|
7596
7599
|
"justify-content-end": t.alignment === "right",
|
|
@@ -7601,12 +7604,12 @@ const An = /* @__PURE__ */ Fe({
|
|
|
7601
7604
|
}));
|
|
7602
7605
|
xe(() => t.items, () => {
|
|
7603
7606
|
n.value = At(t.items), Ke(() => {
|
|
7604
|
-
|
|
7607
|
+
N(), v();
|
|
7605
7608
|
});
|
|
7606
7609
|
}, {
|
|
7607
7610
|
deep: !0
|
|
7608
7611
|
});
|
|
7609
|
-
function
|
|
7612
|
+
function A(z) {
|
|
7610
7613
|
z && (z.stopPropagation(), z.preventDefault());
|
|
7611
7614
|
const {
|
|
7612
7615
|
schema: L
|
|
@@ -7620,7 +7623,7 @@ const An = /* @__PURE__ */ Fe({
|
|
|
7620
7623
|
function I() {
|
|
7621
7624
|
return w("li", {
|
|
7622
7625
|
style: "border-width: 1px;border-style: dashed;display: inline-block;padding: 0 8px;line-height: 24px; border-radius: 3px; cursor: default;color: #B4BCCC;",
|
|
7623
|
-
onClick:
|
|
7626
|
+
onClick: A
|
|
7624
7627
|
}, [w("span", {
|
|
7625
7628
|
class: "f-icon f-icon-amplification mr-1",
|
|
7626
7629
|
style: "font-size: 12px;"
|
|
@@ -7628,7 +7631,7 @@ const An = /* @__PURE__ */ Fe({
|
|
|
7628
7631
|
class: "farris-tag-add-text"
|
|
7629
7632
|
}, [ln("添加按钮")])]);
|
|
7630
7633
|
}
|
|
7631
|
-
function
|
|
7634
|
+
function O() {
|
|
7632
7635
|
return n.value.map((z, L) => b(z, L));
|
|
7633
7636
|
}
|
|
7634
7637
|
return () => {
|
|
@@ -7636,27 +7639,27 @@ const An = /* @__PURE__ */ Fe({
|
|
|
7636
7639
|
return w("div", {
|
|
7637
7640
|
ref: r,
|
|
7638
7641
|
"data-dragref": `${p.schema.id}-container`,
|
|
7639
|
-
class:
|
|
7642
|
+
class: F.value,
|
|
7640
7643
|
id: t.id
|
|
7641
7644
|
}, [w("div", {
|
|
7642
7645
|
ref: o,
|
|
7643
|
-
class:
|
|
7644
|
-
onClick: (L) =>
|
|
7646
|
+
class: P.value,
|
|
7647
|
+
onClick: (L) => j(L)
|
|
7645
7648
|
}, [w("div", {
|
|
7646
7649
|
ref: i,
|
|
7647
7650
|
class: "d-block f-response-content"
|
|
7648
|
-
}, [(z = n.value) != null && z.length ?
|
|
7651
|
+
}, [(z = n.value) != null && z.length ? O() : I()])])]);
|
|
7649
7652
|
};
|
|
7650
7653
|
}
|
|
7651
7654
|
});
|
|
7652
7655
|
function Ln(t, e) {
|
|
7653
7656
|
var u;
|
|
7654
|
-
const n = H(() => "f-section-toolbar col-6" + (t.buttonPosition === "inHead" ? " f-toolbar f-section-header--toolbar" : " f-section-content--toolbar") + (t.buttonsClass ? " " + t.buttonsClass : "")), o =
|
|
7657
|
+
const n = H(() => "f-section-toolbar col-6" + (t.buttonPosition === "inHead" ? " f-toolbar f-section-header--toolbar" : " f-section-content--toolbar") + (t.buttonsClass ? " " + t.buttonsClass : "")), o = E(t.buttons), i = E(e.schema.toolbar);
|
|
7655
7658
|
i.value && !i.value.type && (i.value.type = "section-toolbar");
|
|
7656
7659
|
const r = t.componentId, a = `${r}-toolbar`, c = H(() => t.buttonPosition === "inHead" ? "right" : "left");
|
|
7657
|
-
function s(m, d, f,
|
|
7660
|
+
function s(m, d, f, h) {
|
|
7658
7661
|
var g;
|
|
7659
|
-
(g = e.setupContext) == null || g.emit("selectionChange", m, d, f,
|
|
7662
|
+
(g = e.setupContext) == null || g.emit("selectionChange", m, d, f, h);
|
|
7660
7663
|
}
|
|
7661
7664
|
function l() {
|
|
7662
7665
|
var m, d;
|
|
@@ -7700,18 +7703,18 @@ function xs(t, e, n, o, i, r, a) {
|
|
|
7700
7703
|
const c = H(() => t.buttonPosition), {
|
|
7701
7704
|
onClickMaxMinIcon: s
|
|
7702
7705
|
} = En(o, i, r), l = H(() => t.enableMaximize), p = H(() => t.enableAccordion !== ""), u = H(() => {
|
|
7703
|
-
let
|
|
7706
|
+
let k = {
|
|
7704
7707
|
"f-section-header": !0
|
|
7705
7708
|
};
|
|
7706
|
-
return e.slots.header && (
|
|
7709
|
+
return e.slots.header && (k = ge(k, t.headerClass)), k;
|
|
7707
7710
|
});
|
|
7708
|
-
function m(
|
|
7709
|
-
|
|
7711
|
+
function m(k) {
|
|
7712
|
+
k.stopPropagation(), t.enableAccordion !== "" && (n.value = !n.value, Ke(() => {
|
|
7710
7713
|
gr(a.designerItemElementRef.value);
|
|
7711
7714
|
}));
|
|
7712
7715
|
}
|
|
7713
7716
|
function d() {
|
|
7714
|
-
const
|
|
7717
|
+
const k = H(() => ({
|
|
7715
7718
|
btn: !0,
|
|
7716
7719
|
"f-btn-collapse-expand": !0,
|
|
7717
7720
|
"f-btn-mx": !0,
|
|
@@ -7727,7 +7730,7 @@ function xs(t, e, n, o, i, r, a) {
|
|
|
7727
7730
|
class: b.value,
|
|
7728
7731
|
onClick: s
|
|
7729
7732
|
}, null) : "", p.value ? w("button", {
|
|
7730
|
-
class:
|
|
7733
|
+
class: k.value,
|
|
7731
7734
|
onClick: m
|
|
7732
7735
|
}, [w("span", null, [n.value ? t.collapseLabel : t.expandLabel])]) : ""]);
|
|
7733
7736
|
}
|
|
@@ -7738,14 +7741,14 @@ function xs(t, e, n, o, i, r, a) {
|
|
|
7738
7741
|
class: "f-title-text"
|
|
7739
7742
|
}, [t.mainTitle]), t.subTitle && w("span", null, [t.subTitle])]);
|
|
7740
7743
|
}
|
|
7741
|
-
function
|
|
7742
|
-
const
|
|
7744
|
+
function h() {
|
|
7745
|
+
const k = H(() => ge({
|
|
7743
7746
|
"f-content": !0
|
|
7744
7747
|
}, t.headerContentClass));
|
|
7745
7748
|
return e.slots.headerContent ? w("div", {
|
|
7746
|
-
class:
|
|
7749
|
+
class: k.value
|
|
7747
7750
|
}, [e.slots.headerContent()]) : t.headerContentHtml ? w("div", {
|
|
7748
|
-
class:
|
|
7751
|
+
class: k.value,
|
|
7749
7752
|
innerHTML: t.headerContentHtml
|
|
7750
7753
|
}, null) : null;
|
|
7751
7754
|
}
|
|
@@ -7754,31 +7757,31 @@ function xs(t, e, n, o, i, r, a) {
|
|
|
7754
7757
|
innerHTML: t.headerTitleHtml
|
|
7755
7758
|
}, null) : f();
|
|
7756
7759
|
}
|
|
7757
|
-
function
|
|
7760
|
+
function B() {
|
|
7758
7761
|
return w("div", {
|
|
7759
7762
|
class: u.value
|
|
7760
|
-
}, [g(),
|
|
7763
|
+
}, [g(), h(), c.value === "inHead" && Ln(t, a), (l.value || p.value) && d()]);
|
|
7761
7764
|
}
|
|
7762
|
-
function
|
|
7765
|
+
function S() {
|
|
7763
7766
|
return e.slots.header ? w("div", {
|
|
7764
7767
|
class: u.value
|
|
7765
7768
|
}, [e.slots.header()]) : t.headerHtml ? w("div", {
|
|
7766
7769
|
class: u.value,
|
|
7767
7770
|
innerHTML: t.headerHtml
|
|
7768
|
-
}, null) :
|
|
7771
|
+
}, null) : B();
|
|
7769
7772
|
}
|
|
7770
|
-
return () => t.showHeader &&
|
|
7773
|
+
return () => t.showHeader && S();
|
|
7771
7774
|
}
|
|
7772
|
-
const
|
|
7775
|
+
const Ss = /* @__PURE__ */ Pe({
|
|
7773
7776
|
name: "FSectionDesign",
|
|
7774
7777
|
props: Bn,
|
|
7775
7778
|
emits: [],
|
|
7776
7779
|
setup(t, e) {
|
|
7777
|
-
const n =
|
|
7780
|
+
const n = E(), o = E(), i = E(), r = Se("designer-host-service"), a = Se("design-item-context"), c = ds(a, r), s = Xr(n, a, c);
|
|
7778
7781
|
s.value.styles = "display: inherit;", Oe(() => {
|
|
7779
7782
|
n.value.componentInstance = s;
|
|
7780
7783
|
}), e.expose(s.value);
|
|
7781
|
-
const l =
|
|
7784
|
+
const l = E(t.customClass), p = H(() => t.enableAccordion), u = E(!0), m = H(() => t.buttonPosition), d = E(!1), f = xs(t, e, u, o, i, d, a), h = H(() => {
|
|
7782
7785
|
const C = {
|
|
7783
7786
|
"f-section": !0,
|
|
7784
7787
|
"f-section-accordion": p.value === "default",
|
|
@@ -7793,14 +7796,14 @@ const Ts = /* @__PURE__ */ Fe({
|
|
|
7793
7796
|
}), g = H(() => ge({
|
|
7794
7797
|
"f-section-content": !0,
|
|
7795
7798
|
"drag-container": !0
|
|
7796
|
-
}, t.contentClass)),
|
|
7799
|
+
}, t.contentClass)), B = H(() => ({
|
|
7797
7800
|
visibility: (p.value === "default" || p.value === "custom") && !u.value ? "hidden" : "visible"
|
|
7798
|
-
})),
|
|
7801
|
+
})), S = H(() => ge({
|
|
7799
7802
|
"f-section-extend": !0
|
|
7800
|
-
},
|
|
7801
|
-
function
|
|
7803
|
+
}, S.value));
|
|
7804
|
+
function k() {
|
|
7802
7805
|
return e.slots.extend && w("div", {
|
|
7803
|
-
class:
|
|
7806
|
+
class: S.value
|
|
7804
7807
|
}, [e.slots.extend()]);
|
|
7805
7808
|
}
|
|
7806
7809
|
function b() {
|
|
@@ -7808,16 +7811,16 @@ const Ts = /* @__PURE__ */ Fe({
|
|
|
7808
7811
|
class: g.value,
|
|
7809
7812
|
ref: n,
|
|
7810
7813
|
"data-dragref": `${a.schema.id}-container`,
|
|
7811
|
-
style:
|
|
7814
|
+
style: B.value
|
|
7812
7815
|
}, [m.value === "inContent" && Ln(t, a), e.slots.default && e.slots.default()]);
|
|
7813
7816
|
}
|
|
7814
7817
|
return () => w("div", {
|
|
7815
|
-
class:
|
|
7818
|
+
class: h.value,
|
|
7816
7819
|
ref: o,
|
|
7817
7820
|
style: t.customStyle
|
|
7818
|
-
}, [f(),
|
|
7821
|
+
}, [f(), k(), b()]);
|
|
7819
7822
|
}
|
|
7820
|
-
}),
|
|
7823
|
+
}), Ts = "https://json-schema.org/draft/2020-12/schema", Ms = "https://farris-design.gitee.io/section-toolbar-item.schema.json", Bs = "section-toolbar-item", Es = "A Farris Toolbar Item Component", ks = "object", Is = {
|
|
7821
7824
|
id: {
|
|
7822
7825
|
description: "The unique identifier for a Response Toolbar",
|
|
7823
7826
|
type: "string"
|
|
@@ -7885,21 +7888,21 @@ const Ts = /* @__PURE__ */ Fe({
|
|
|
7885
7888
|
type: "boolean",
|
|
7886
7889
|
default: !1
|
|
7887
7890
|
}
|
|
7888
|
-
},
|
|
7891
|
+
}, Ps = [
|
|
7889
7892
|
"id",
|
|
7890
7893
|
"type",
|
|
7891
7894
|
"text"
|
|
7892
|
-
],
|
|
7895
|
+
], Fs = {
|
|
7893
7896
|
onClick: "点击事件"
|
|
7894
7897
|
}, Ds = {
|
|
7895
|
-
$schema:
|
|
7898
|
+
$schema: Ts,
|
|
7896
7899
|
$id: Ms,
|
|
7897
7900
|
title: Bs,
|
|
7898
7901
|
description: Es,
|
|
7899
7902
|
type: ks,
|
|
7900
7903
|
properties: Is,
|
|
7901
|
-
required:
|
|
7902
|
-
events:
|
|
7904
|
+
required: Ps,
|
|
7905
|
+
events: Fs
|
|
7903
7906
|
}, Rs = {
|
|
7904
7907
|
id: { type: String, default: "" },
|
|
7905
7908
|
items: { type: Object, default: {} },
|
|
@@ -7916,17 +7919,17 @@ const Ts = /* @__PURE__ */ Fe({
|
|
|
7916
7919
|
isDP: { type: Boolean, default: !1 },
|
|
7917
7920
|
// 是否下拉项
|
|
7918
7921
|
isDPItem: { type: Boolean, default: !1 }
|
|
7919
|
-
}, Os =
|
|
7922
|
+
}, Os = Fe(Rs, Ds);
|
|
7920
7923
|
bt.register = (t, e, n, o) => {
|
|
7921
7924
|
t.section = bt, e.section = lr, o.section = { eventHandlerResolver: cr };
|
|
7922
7925
|
};
|
|
7923
7926
|
bt.registerDesigner = (t, e, n) => {
|
|
7924
|
-
t.section =
|
|
7927
|
+
t.section = Ss, e.section = dr, e["section-toolbar-item"] = Os, t["section-toolbar"] = An, e["section-toolbar"] = ur;
|
|
7925
7928
|
};
|
|
7926
|
-
const
|
|
7929
|
+
const yc = un(bt);
|
|
7927
7930
|
export {
|
|
7928
7931
|
bt as Section,
|
|
7929
|
-
|
|
7932
|
+
yc as default,
|
|
7930
7933
|
cr as eventHandlerResolver,
|
|
7931
7934
|
dr as propsDesignResolver,
|
|
7932
7935
|
lr as propsResolver,
|