@farris/ui-vue 1.7.2-beta.1 → 1.7.2-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +155 -148
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +226 -224
- package/components/calendar/index.umd.cjs +3 -3
- package/components/collection-property-editor/index.esm.js +225 -223
- package/components/collection-property-editor/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +76 -71
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/comment/index.esm.js +169 -167
- package/components/comment/index.umd.cjs +6 -6
- package/components/component/index.esm.js +3691 -3043
- package/components/component/index.umd.cjs +2 -2
- package/components/condition/index.esm.js +2015 -1352
- package/components/condition/index.umd.cjs +2 -2
- package/components/data-grid/index.esm.js +407 -430
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3082 -3196
- package/components/data-view/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +3364 -2713
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/drawer/index.esm.js +66 -64
- package/components/drawer/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1176 -524
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +182 -180
- package/components/dynamic-resolver/index.umd.cjs +2 -2
- package/components/dynamic-view/index.esm.js +531 -455
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +2352 -1700
- package/components/events-editor/index.umd.cjs +3 -3
- package/components/expression-editor/index.esm.js +8 -3
- package/components/expression-editor/index.umd.cjs +2 -2
- package/components/filter-bar/index.esm.js +422 -413
- package/components/filter-bar/index.umd.cjs +2 -2
- package/components/filter-condition-editor/index.esm.js +8 -3
- package/components/filter-condition-editor/index.umd.cjs +1 -1
- package/components/image/index.esm.js +363 -354
- package/components/image/index.umd.cjs +2 -2
- package/components/language-textbox/index.esm.js +189 -187
- package/components/language-textbox/index.umd.cjs +2 -2
- package/components/list-view/index.esm.js +388 -389
- package/components/list-view/index.umd.cjs +5 -5
- package/components/mapping-editor/index.esm.js +1465 -1488
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +180 -173
- package/components/number-range/index.umd.cjs +1 -1
- package/components/order/index.esm.js +815 -811
- package/components/order/index.umd.cjs +5 -5
- package/components/property-panel/index.esm.js +429 -420
- package/components/property-panel/index.umd.cjs +3 -3
- package/components/query-solution/index.esm.js +4746 -4085
- package/components/query-solution/index.umd.cjs +7 -7
- package/components/schema-selector/index.esm.js +1401 -1402
- package/components/schema-selector/index.umd.cjs +5 -5
- package/components/section/index.esm.js +102 -100
- package/components/section/index.umd.cjs +2 -2
- package/components/sort-condition-editor/index.esm.js +8 -3
- package/components/sort-condition-editor/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +537 -538
- package/components/transfer/index.umd.cjs +5 -5
- package/components/tree-grid/index.esm.js +280 -283
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +200 -202
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +533 -519
- package/components/uploader/index.umd.cjs +2 -2
- package/designer/data-grid/index.esm.js +3806 -3905
- package/designer/data-grid/index.umd.cjs +9 -9
- package/designer/drawer/index.esm.js +188 -186
- package/designer/drawer/index.umd.cjs +2 -2
- package/designer/dynamic-form/index.esm.js +1562 -1073
- package/designer/dynamic-form/index.umd.cjs +2 -2
- package/designer/farris-designer.all.esm.js +9793 -8613
- package/designer/farris-designer.all.umd.cjs +8 -8
- package/designer/list-view/index.esm.js +564 -564
- package/designer/list-view/index.umd.cjs +6 -6
- package/designer/radio-group/index.esm.js +236 -229
- package/designer/radio-group/index.umd.cjs +1 -1
- package/designer/response-layout-editor/index.esm.js +178 -171
- package/designer/response-layout-editor/index.umd.cjs +1 -1
- package/designer/tabs/index.esm.js +3154 -2508
- package/designer/tabs/index.umd.cjs +2 -2
- package/designer/time-picker/index.esm.js +193 -186
- package/designer/time-picker/index.umd.cjs +1 -1
- package/designer/tree-grid/index.esm.js +444 -447
- package/designer/tree-grid/index.umd.cjs +1 -1
- package/farris.all.esm.js +60126 -59649
- package/farris.all.umd.cjs +30 -30
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/components.d.ts +1 -1
- package/types/condition/src/composition/condition-value/dropdown-value.d.ts +4 -0
- package/types/data-grid/index.d.ts +2 -5
- package/types/data-grid/src/data-grid.component.d.ts +1 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/appearance/use-cell-position.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +0 -4
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +2 -2
- package/types/data-view/composition/visualization/use-visual-data-bound.d.ts +2 -3
- package/types/data-view/composition/visualization/use-visual-data-row.d.ts +1 -2
- package/types/designer-canvas/src/composition/dg-control.d.ts +24 -0
- package/types/dynamic-form/designer.d.ts +0 -1
- package/types/dynamic-form/index.d.ts +4 -3
- package/types/dynamic-form/src/designer/dynamic-form.design.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form.design.props.d.ts +14 -0
- package/types/dynamic-form/src/designer/use-dynamic-form-rules.d.ts +2 -0
- package/types/dynamic-form/src/dynamic-form.component.d.ts +8 -0
- package/types/dynamic-form/src/response-form.props.d.ts +13 -1
- package/types/dynamic-form/src/schema/response-form-schema-resolver.d.ts +1 -0
- package/types/dynamic-form/src/types.d.ts +1 -0
- package/types/dynamic-resolver/src/types.d.ts +1 -0
- package/types/dynamic-view/index.d.ts +43 -3
- package/types/dynamic-view/src/components/maps.d.ts +6 -6
- package/types/dynamic-view/src/composition/index.d.ts +5 -0
- package/types/dynamic-view/src/composition/use-utils.d.ts +12 -0
- package/types/dynamic-view/src/dynamic-view.component.d.ts +6 -6
- package/types/language-textbox/index.d.ts +3 -3
- package/types/language-textbox/src/components/language-contents.component.d.ts +1 -1
- package/types/language-textbox/src/language-textbox.component.d.ts +1 -1
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +1 -1
- package/types/lookup/src/components/popup-container.component.d.ts +3 -3
- package/types/property-panel/src/property-panel.component.d.ts +3 -3
- package/types/tree-grid/src/components/data/data-area.component.d.ts +2 -2
- package/types/tree-grid/src/tree-grid.props.d.ts +0 -1
- package/types/tree-view/src/components/data/tree-area.component.d.ts +1 -1
- package/types/tree-view/src/tree-view.props.d.ts +0 -1
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var me = (e, t, n) =>
|
|
4
|
-
import { defineComponent as Se, ref as
|
|
5
|
-
import { LocaleService as
|
|
6
|
-
import { isMobilePhone as
|
|
1
|
+
var wn = Object.defineProperty;
|
|
2
|
+
var xn = (e, t, n) => t in e ? wn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
|
+
var me = (e, t, n) => xn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
+
import { defineComponent as Se, ref as r, computed as y, createVNode as l, Teleport as Bt, createApp as rt, onUnmounted as Xe, Fragment as pe, watch as Z, nextTick as Ne, onBeforeMount as Bn, onMounted as ze, watchEffect as Sn, Transition as St, shallowRef as Tn, render as lt, h as Mn, cloneVNode as kn, mergeProps as tt, inject as Ze, withDirectives as On, vShow as Fn, onUpdated as In, onBeforeUnmount as En, createTextVNode as Be, reactive as ge, isVNode as Tt, Comment as Pn, provide as Rn } from "vue";
|
|
5
|
+
import { LocaleService as Ce } from "../locale/index.esm.js";
|
|
6
|
+
import { isMobilePhone as Dn, getMaxZIndex as bt, useGuid as Hn, withInstall as Mt, useCommonUtils as jn, getCustomClass as Vn } from "../common/index.esm.js";
|
|
7
7
|
import "../property-panel/index.esm.js";
|
|
8
|
-
import
|
|
9
|
-
import { debounce as
|
|
10
|
-
import
|
|
11
|
-
import { useResizeObserver as
|
|
12
|
-
import { CellMode as
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { createPropsResolver as
|
|
17
|
-
const
|
|
8
|
+
import Nn from "../tags/index.esm.js";
|
|
9
|
+
import { debounce as zn, cloneDeep as Ln } from "lodash-es";
|
|
10
|
+
import An from "../popover/index.esm.js";
|
|
11
|
+
import { useResizeObserver as Wn } from "@vueuse/core";
|
|
12
|
+
import { CellMode as Gn, useMobile as $n, useIdentify as Un, useGroupData as Kn, useFilter as _n, useHierarchy as Yn, useLoading as qn, useDataView as Xn, usePagination as Jn, useSelection as Zn, useDataViewContainerStyle as Qn, useCommandColumn as ea, useSettingColumn as ta, useColumn as na, useSort as aa, useGroupColumn as oa, useRow as la, useEdit as sa, useVisualDataBound as ua, useVisualDataCell as ia, useVisualDataRow as ra, useVisualGroupRow as ca, useVisualSummaryRow as da, useVisualData as fa, useCellContentStyle as va, useCellPosition as ma, useSidebar as ha, useVirtualScroll as ga, useFitColumn as pa, useFilterHistory as ya, useColumnFilter as ba, useDragColumn as Ca, getColumnHeader as wa, getPagination as xa, getSidebar as Ba, getDisableMask as Sa, getSummary as Ta, getHorizontalScrollbar as Ma, getVerticalScrollbar as ka, getFilterPanel as Oa, getGroupPanel as Fa, useNavigation as Ia, getEmpty as Ea, COMMAND_COLUMN_DATA_TYPE as Ct, SETTING_COLUMN_DATA_TYPE as wt } from "../data-view/index.esm.js";
|
|
13
|
+
import xt from "../button/index.esm.js";
|
|
14
|
+
import Pa from "../drawer/index.esm.js";
|
|
15
|
+
import Ra, { FDynamicFormLabel as Da } from "../dynamic-form/index.esm.js";
|
|
16
|
+
import { createPropsResolver as Ha } from "../dynamic-resolver/index.esm.js";
|
|
17
|
+
const ja = {
|
|
18
18
|
/**
|
|
19
19
|
* 组件标识
|
|
20
20
|
*/
|
|
@@ -134,65 +134,65 @@ const za = {
|
|
|
134
134
|
*/
|
|
135
135
|
limitContentBySpace: { type: Boolean, default: !1 },
|
|
136
136
|
beforeClosePopup: { type: Function, default: null }
|
|
137
|
-
},
|
|
137
|
+
}, Va = {
|
|
138
138
|
popupContentPosition: { type: Object, default: { left: 0, top: 0 } },
|
|
139
139
|
host: { type: Object },
|
|
140
140
|
backgroundColor: { type: String, default: "" }
|
|
141
|
-
},
|
|
141
|
+
}, Na = /* @__PURE__ */ Se({
|
|
142
142
|
name: "FOverlay",
|
|
143
|
-
props:
|
|
143
|
+
props: Va,
|
|
144
144
|
emits: ["click"],
|
|
145
145
|
setup(e, t) {
|
|
146
|
-
const n =
|
|
146
|
+
const n = r(e.popupContentPosition), a = r(e.host), o = y(() => ({
|
|
147
147
|
backgroundColor: e.backgroundColor || "",
|
|
148
148
|
pointerEvents: "auto"
|
|
149
149
|
}));
|
|
150
|
-
function u
|
|
151
|
-
t.emit("click"),
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
156
|
-
const
|
|
157
|
-
left:
|
|
158
|
-
top:
|
|
159
|
-
height:
|
|
160
|
-
} =
|
|
150
|
+
function s(u) {
|
|
151
|
+
t.emit("click"), u.preventDefault(), u.stopPropagation();
|
|
152
|
+
}
|
|
153
|
+
y(() => {
|
|
154
|
+
const u = a.value;
|
|
155
|
+
if (u) {
|
|
156
|
+
const v = u.getBoundingClientRect(), {
|
|
157
|
+
left: f,
|
|
158
|
+
top: p,
|
|
159
|
+
height: w
|
|
160
|
+
} = v;
|
|
161
161
|
return {
|
|
162
|
-
left:
|
|
163
|
-
top:
|
|
162
|
+
left: f,
|
|
163
|
+
top: p + w
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
166
|
return n.value;
|
|
167
167
|
});
|
|
168
|
-
const
|
|
168
|
+
const i = y(() => ({
|
|
169
169
|
// position: 'relative',
|
|
170
170
|
// left: `${position.value.left}px`,
|
|
171
171
|
// top: `${position.value.top}px`
|
|
172
172
|
}));
|
|
173
|
-
return () => l(
|
|
173
|
+
return () => l(Bt, {
|
|
174
174
|
to: "body"
|
|
175
175
|
}, {
|
|
176
176
|
default: () => {
|
|
177
|
-
var
|
|
177
|
+
var u, v;
|
|
178
178
|
return [l("div", {
|
|
179
179
|
class: "overlay-container",
|
|
180
|
-
onClick: (
|
|
180
|
+
onClick: (f) => s(f),
|
|
181
181
|
style: o.value
|
|
182
182
|
}, [l("div", {
|
|
183
|
-
style:
|
|
184
|
-
}, [(
|
|
183
|
+
style: i.value
|
|
184
|
+
}, [(v = (u = t.slots).default) == null ? void 0 : v.call(u)])])];
|
|
185
185
|
}
|
|
186
186
|
});
|
|
187
187
|
}
|
|
188
188
|
});
|
|
189
|
-
function
|
|
189
|
+
function za(e) {
|
|
190
190
|
if (e.content && e.content.render)
|
|
191
191
|
return e.content.render;
|
|
192
192
|
if (e.render && typeof e.render == "function")
|
|
193
193
|
return e.render;
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function La(e) {
|
|
196
196
|
const t = document.createElement("div");
|
|
197
197
|
t.style.display = "contents";
|
|
198
198
|
let n;
|
|
@@ -200,29 +200,29 @@ function Ga(e) {
|
|
|
200
200
|
}), o = () => {
|
|
201
201
|
a(), n && n.unmount();
|
|
202
202
|
};
|
|
203
|
-
return n =
|
|
203
|
+
return n = rt({
|
|
204
204
|
setup() {
|
|
205
205
|
Xe(() => {
|
|
206
206
|
document.body.removeChild(t);
|
|
207
207
|
});
|
|
208
|
-
const
|
|
209
|
-
return () => l(
|
|
208
|
+
const s = za(e);
|
|
209
|
+
return () => l(Na, {
|
|
210
210
|
"popup-content-position": e.popupPosition,
|
|
211
211
|
host: e.host,
|
|
212
212
|
onClick: o,
|
|
213
213
|
backgroundColor: e.backgroundColor
|
|
214
214
|
}, {
|
|
215
|
-
default: () => [
|
|
215
|
+
default: () => [s && s()]
|
|
216
216
|
});
|
|
217
217
|
}
|
|
218
218
|
}), document.body.appendChild(t), n.mount(t), n;
|
|
219
219
|
}
|
|
220
|
-
class
|
|
220
|
+
class Aa {
|
|
221
221
|
static show(t) {
|
|
222
|
-
return
|
|
222
|
+
return La(t);
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
|
-
const
|
|
225
|
+
const Wa = {
|
|
226
226
|
/**
|
|
227
227
|
* 允许点击遮罩关闭对话框
|
|
228
228
|
*/
|
|
@@ -311,8 +311,8 @@ class ne {
|
|
|
311
311
|
static getTransformInfo(t) {
|
|
312
312
|
const a = window.getComputedStyle(t).getPropertyValue("transform").replace(/[^-\d,]/g, "").split(",");
|
|
313
313
|
if (a.length >= 6) {
|
|
314
|
-
const o = parseInt(a[4], 10),
|
|
315
|
-
return { x: o, y:
|
|
314
|
+
const o = parseInt(a[4], 10), s = parseInt(a[5], 10);
|
|
315
|
+
return { x: o, y: s };
|
|
316
316
|
}
|
|
317
317
|
return { x: 0, y: 0 };
|
|
318
318
|
}
|
|
@@ -336,8 +336,8 @@ class ne {
|
|
|
336
336
|
if (window) {
|
|
337
337
|
const a = window.getComputedStyle(t);
|
|
338
338
|
if (a) {
|
|
339
|
-
const o = parseInt(a.getPropertyValue("left"), 10),
|
|
340
|
-
n.x = isNaN(o) ? 0 : o, n.y = isNaN(
|
|
339
|
+
const o = parseInt(a.getPropertyValue("left"), 10), s = parseInt(a.getPropertyValue("top"), 10);
|
|
340
|
+
n.x = isNaN(o) ? 0 : o, n.y = isNaN(s) ? 0 : s;
|
|
341
341
|
}
|
|
342
342
|
return n;
|
|
343
343
|
}
|
|
@@ -368,12 +368,12 @@ class ne {
|
|
|
368
368
|
return this.x = t.x, this.y = t.y, this;
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
|
-
class
|
|
371
|
+
class Re {
|
|
372
372
|
constructor(t, n) {
|
|
373
373
|
this.width = t, this.height = n;
|
|
374
374
|
}
|
|
375
375
|
static getCurrent(t) {
|
|
376
|
-
const n = new
|
|
376
|
+
const n = new Re(0, 0);
|
|
377
377
|
if (window) {
|
|
378
378
|
const a = window.getComputedStyle(t);
|
|
379
379
|
return a && (n.width = parseInt(a.getPropertyValue("width"), 10), n.height = parseInt(a.getPropertyValue("height"), 10)), n;
|
|
@@ -381,280 +381,280 @@ class Pe {
|
|
|
381
381
|
return null;
|
|
382
382
|
}
|
|
383
383
|
static copy(t) {
|
|
384
|
-
return new
|
|
384
|
+
return new Re(0, 0).set(t);
|
|
385
385
|
}
|
|
386
386
|
set(t) {
|
|
387
387
|
return this.width = t.width, this.height = t.height, this;
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
function
|
|
391
|
-
const n =
|
|
392
|
-
function
|
|
393
|
-
const d = a.value || document.body,
|
|
394
|
-
if (!
|
|
390
|
+
function Ga(e, t) {
|
|
391
|
+
const n = r(), a = r(), o = r(), s = r(), i = r(), u = r(), v = r(), f = r(), p = r(), w = r(), T = r(), h = r(e.resizeable), g = r(), F = r(e.draggable), E = r(!1);
|
|
392
|
+
function P() {
|
|
393
|
+
const d = a.value || document.body, x = window.getComputedStyle(d);
|
|
394
|
+
if (!x || !n.value)
|
|
395
395
|
return;
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
const A =
|
|
399
|
-
|
|
396
|
+
const R = ne.getTransformInfo(n.value), D = {};
|
|
397
|
+
v.value && (D.deltaL = n.value.offsetLeft - v.value.x, D.deltaT = n.value.offsetTop - v.value.y);
|
|
398
|
+
const A = x.getPropertyValue("position");
|
|
399
|
+
D.width = d.clientWidth, D.height = d.clientHeight, D.pr = parseInt(x.getPropertyValue("padding-right"), 10), D.pb = parseInt(x.getPropertyValue("padding-bottom"), 10), D.position = x.getPropertyValue("position"), A === "static" && (d.style.position = "relative"), D.translateX = R.x, D.translateY = R.y, w.value = D;
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function C(d) {
|
|
402
402
|
if (n.value) {
|
|
403
|
-
|
|
404
|
-
const
|
|
405
|
-
|
|
406
|
-
n: !!
|
|
407
|
-
s: !!
|
|
408
|
-
w: !!
|
|
409
|
-
e: !!
|
|
403
|
+
s.value = Re.getCurrent(n.value), i.value = ne.getCurrent(n.value), u.value = s.value ? Re.copy(s.value) : null, v.value = i.value ? ne.copy(i.value) : null, P();
|
|
404
|
+
const x = d.target.getAttribute("type") || "";
|
|
405
|
+
f.value = {
|
|
406
|
+
n: !!x.match(/n/),
|
|
407
|
+
s: !!x.match(/s/),
|
|
408
|
+
w: !!x.match(/w/),
|
|
409
|
+
e: !!x.match(/e/)
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
var d,
|
|
413
|
+
function N() {
|
|
414
|
+
var d, x, R, D;
|
|
415
415
|
if (n.value) {
|
|
416
416
|
const A = n.value;
|
|
417
|
-
|
|
417
|
+
f.value && ((f.value.n || f.value.s) && ((d = u.value) != null && d.height) && (A.style.height = u.value.height + "px"), (f.value.w || f.value.e) && ((x = u.value) != null && x.width) && (A.style.width = u.value.width + "px"), v.value && ((R = v.value) != null && R.x && (A.style.left = v.value.x + "px"), (D = v.value) != null && D.y && (A.style.top = v.value.y + "px")));
|
|
418
418
|
}
|
|
419
419
|
}
|
|
420
|
-
function
|
|
421
|
-
const d = e.minHeight ? e.minHeight : 1,
|
|
422
|
-
|
|
420
|
+
function U() {
|
|
421
|
+
const d = e.minHeight ? e.minHeight : 1, x = e.minWidth ? e.minWidth : 1;
|
|
422
|
+
u.value && v.value && f.value && s.value && (u.value.height < d && (u.value.height = d, f.value.n && i.value && (v.value.y = i.value.y + (s.value.height - d))), u.value.width < x && (u.value.width = x, f.value.w && i.value && (v.value.x = i.value.x + (s.value.width - x))), e.maxHeight && u.value.height > e.maxHeight && (u.value.height = e.maxHeight, i.value && f.value.n && (v.value.y = i.value.y + (s.value.height - e.maxHeight))), e.maxWidth && u.value.width > e.maxWidth && (u.value.width = e.maxWidth, f.value.w && i.value && (v.value.x = i.value.x + (s.value.width - e.maxWidth))));
|
|
423
423
|
}
|
|
424
|
-
function
|
|
424
|
+
function B() {
|
|
425
425
|
if (a.value) {
|
|
426
|
-
const d =
|
|
427
|
-
if (
|
|
428
|
-
const
|
|
429
|
-
|
|
426
|
+
const d = w.value;
|
|
427
|
+
if (v.value && u.value && f.value && s.value) {
|
|
428
|
+
const x = d.width - d.pr - d.deltaL - d.translateX - v.value.x, R = d.height - d.pb - d.deltaT - d.translateY - v.value.y;
|
|
429
|
+
f.value.n && v.value.y + d.translateY < 0 && i.value && (v.value.y = -d.translateY, u.value.height = s.value.height + i.value.y + d.translateY), f.value.w && v.value.x + d.translateX < 0 && i.value && (v.value.x = -d.translateX, u.value.width = s.value.width + i.value.x + d.translateX), u.value.width > x && (u.value.width = x), u.value.height > R && (u.value.height = R);
|
|
430
430
|
}
|
|
431
431
|
}
|
|
432
432
|
}
|
|
433
|
-
function
|
|
434
|
-
if (!o.value || !
|
|
433
|
+
function L(d) {
|
|
434
|
+
if (!o.value || !s.value || !i.value || !f.value)
|
|
435
435
|
return;
|
|
436
436
|
d.subtract(o.value);
|
|
437
|
-
const
|
|
438
|
-
|
|
437
|
+
const x = d.x, R = d.y;
|
|
438
|
+
f.value.n ? (v.value.y = i.value.y + R, u.value.height = s.value.height - R) : f.value.s && (u.value.height = s.value.height + R), f.value.e ? u.value.width = s.value.width + x : f.value.w && (u.value.width = s.value.width - x, v.value.x = i.value.x + x), B(), U(), N();
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
if (!
|
|
440
|
+
function b(d) {
|
|
441
|
+
if (!p.value)
|
|
442
442
|
return;
|
|
443
|
-
const
|
|
444
|
-
|
|
443
|
+
const x = ne.fromEvent(d);
|
|
444
|
+
x && L(x);
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function k() {
|
|
447
447
|
if (n.value) {
|
|
448
448
|
const {
|
|
449
449
|
width: d,
|
|
450
|
-
height:
|
|
451
|
-
x:
|
|
452
|
-
y:
|
|
450
|
+
height: x,
|
|
451
|
+
x: R,
|
|
452
|
+
y: D
|
|
453
453
|
} = n.value.getBoundingClientRect(), A = ne.getTransformInfo(n.value);
|
|
454
454
|
return {
|
|
455
455
|
size: {
|
|
456
456
|
width: d,
|
|
457
|
-
height:
|
|
457
|
+
height: x
|
|
458
458
|
},
|
|
459
459
|
position: {
|
|
460
|
-
x:
|
|
461
|
-
y:
|
|
460
|
+
x: R - A.x,
|
|
461
|
+
y: D - A.y
|
|
462
462
|
}
|
|
463
463
|
};
|
|
464
464
|
}
|
|
465
465
|
return null;
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function W(d) {
|
|
468
468
|
if (n.value) {
|
|
469
|
-
const
|
|
470
|
-
|
|
469
|
+
const x = k();
|
|
470
|
+
T.value = x;
|
|
471
471
|
}
|
|
472
|
-
o.value = void 0,
|
|
472
|
+
o.value = void 0, s.value = null, i.value = null, u.value = null, v.value = null, f.value = null, p.value = null, document.removeEventListener("mousemove", b), document.removeEventListener("mouseup", W);
|
|
473
473
|
}
|
|
474
|
-
function
|
|
475
|
-
document.addEventListener("mousemove",
|
|
474
|
+
function K() {
|
|
475
|
+
document.addEventListener("mousemove", b), document.addEventListener("mouseup", W);
|
|
476
476
|
}
|
|
477
|
-
function
|
|
478
|
-
d instanceof MouseEvent && d.button === 2 ||
|
|
477
|
+
function O(d) {
|
|
478
|
+
d instanceof MouseEvent && d.button === 2 || F.value && (document.body.click(), d.stopPropagation(), d.preventDefault(), o.value = ne.fromEvent(d), p.value = d.target, C(d), K());
|
|
479
479
|
}
|
|
480
480
|
function G(d) {
|
|
481
|
-
return n.value = d,
|
|
481
|
+
return n.value = d, h.value && l(pe, null, [l("div", {
|
|
482
482
|
class: "fv-resizable-handle fv-resizable-n",
|
|
483
483
|
type: "n",
|
|
484
|
-
onMousedown: (
|
|
484
|
+
onMousedown: (x) => O(x)
|
|
485
485
|
}, null), l("div", {
|
|
486
486
|
class: "fv-resizable-handle fv-resizable-e",
|
|
487
487
|
type: "e",
|
|
488
|
-
onMousedown: (
|
|
488
|
+
onMousedown: (x) => O(x)
|
|
489
489
|
}, null), l("div", {
|
|
490
490
|
class: "fv-resizable-handle fv-resizable-s",
|
|
491
491
|
type: "s",
|
|
492
|
-
onMousedown: (
|
|
492
|
+
onMousedown: (x) => O(x)
|
|
493
493
|
}, null), l("div", {
|
|
494
494
|
class: "fv-resizable-handle fv-resizable-w",
|
|
495
495
|
type: "w",
|
|
496
|
-
onMousedown: (
|
|
496
|
+
onMousedown: (x) => O(x)
|
|
497
497
|
}, null), l("div", {
|
|
498
498
|
class: "fv-resizable-handle fv-resizable-ne",
|
|
499
499
|
type: "ne",
|
|
500
|
-
onMousedown: (
|
|
500
|
+
onMousedown: (x) => O(x)
|
|
501
501
|
}, null), l("div", {
|
|
502
502
|
class: "fv-resizable-handle fv-resizable-se fv-resizable-diagonal",
|
|
503
503
|
type: "se",
|
|
504
|
-
onMousedown: (
|
|
504
|
+
onMousedown: (x) => O(x)
|
|
505
505
|
}, null), l("div", {
|
|
506
506
|
class: "fv-resizable-handle fv-resizable-sw",
|
|
507
507
|
type: "sw",
|
|
508
|
-
onMousedown: (
|
|
508
|
+
onMousedown: (x) => O(x)
|
|
509
509
|
}, null), l("div", {
|
|
510
510
|
class: "fv-resizable-handle fv-resizable-nw",
|
|
511
511
|
type: "nw",
|
|
512
|
-
onMousedown: (
|
|
512
|
+
onMousedown: (x) => O(x)
|
|
513
513
|
}, null)]);
|
|
514
514
|
}
|
|
515
515
|
function se(d = !0) {
|
|
516
516
|
document.body.click();
|
|
517
|
-
const
|
|
518
|
-
d &&
|
|
519
|
-
size:
|
|
517
|
+
const x = a.value || document.body, R = Re.getCurrent(x), D = n.value;
|
|
518
|
+
d && D && (g.value = k(), g.value.transform = D.style.transform), R && D && (u.value = R, u.value.height -= 14, u.value.width -= 14, D.style.height = u.value.height + "px", D.style.width = u.value.width + "px", D.style.left = "7px", D.style.top = "7px", D.style.transform = "", T.value = {
|
|
519
|
+
size: u.value,
|
|
520
520
|
position: {
|
|
521
521
|
x: 0,
|
|
522
522
|
y: 0
|
|
523
523
|
}
|
|
524
|
-
},
|
|
525
|
-
}
|
|
526
|
-
function
|
|
527
|
-
var d,
|
|
528
|
-
if (document.body.click(),
|
|
529
|
-
const
|
|
530
|
-
width:
|
|
531
|
-
height:
|
|
532
|
-
},
|
|
533
|
-
x: (window.innerWidth -
|
|
534
|
-
y: (window.innerHeight -
|
|
524
|
+
}, F.value = !1, E.value = !0);
|
|
525
|
+
}
|
|
526
|
+
function X() {
|
|
527
|
+
var d, x;
|
|
528
|
+
if (document.body.click(), g.value) {
|
|
529
|
+
const R = {
|
|
530
|
+
width: g.value.size.width || 0,
|
|
531
|
+
height: g.value.size.height || 0
|
|
532
|
+
}, D = {
|
|
533
|
+
x: (window.innerWidth - R.width) / 2,
|
|
534
|
+
y: (window.innerHeight - R.height) / 2
|
|
535
535
|
};
|
|
536
|
-
(d =
|
|
536
|
+
(d = u.value) == null || d.set(R), (x = v.value) == null || x.set(D);
|
|
537
537
|
const A = n.value;
|
|
538
|
-
A.style.height =
|
|
539
|
-
size:
|
|
540
|
-
position:
|
|
541
|
-
},
|
|
538
|
+
A.style.height = R.height + "px", A.style.width = R.width + "px", A.style.left = `${D.x}px`, A.style.top = `${D.y}px`, A.style.transform = "", T.value = {
|
|
539
|
+
size: R,
|
|
540
|
+
position: D
|
|
541
|
+
}, F.value = e.draggable, E.value = !1;
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function ue() {
|
|
545
545
|
if (n.value) {
|
|
546
|
-
const d =
|
|
546
|
+
const d = Re.getCurrent(n.value);
|
|
547
547
|
if (d) {
|
|
548
548
|
const {
|
|
549
|
-
width:
|
|
550
|
-
height:
|
|
549
|
+
width: x,
|
|
550
|
+
height: R
|
|
551
551
|
} = d;
|
|
552
|
-
n.value.style.left = `${(window.innerWidth -
|
|
552
|
+
n.value.style.left = `${(window.innerWidth - x) / 2}px`, n.value.style.top = `${(window.innerHeight - R) / 2}px`, n.value.style.transform = "";
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
555
|
}
|
|
556
|
-
function
|
|
556
|
+
function z() {
|
|
557
557
|
const d = () => {
|
|
558
|
-
|
|
558
|
+
E.value ? se(!1) : ue(), document.body.click();
|
|
559
559
|
};
|
|
560
560
|
return window.addEventListener("resize", d), () => {
|
|
561
561
|
window.removeEventListener("resize", d);
|
|
562
562
|
};
|
|
563
563
|
}
|
|
564
|
-
const M =
|
|
564
|
+
const M = z();
|
|
565
565
|
return {
|
|
566
566
|
renderResizeBar: G,
|
|
567
567
|
boundingElement: a,
|
|
568
|
-
resizedEventParam:
|
|
568
|
+
resizedEventParam: T,
|
|
569
569
|
maximize: se,
|
|
570
|
-
restore:
|
|
571
|
-
allowDrag:
|
|
572
|
-
isMaximized:
|
|
570
|
+
restore: X,
|
|
571
|
+
allowDrag: F,
|
|
572
|
+
isMaximized: E,
|
|
573
573
|
unWindowResizeHandle: M,
|
|
574
|
-
moveToCenter:
|
|
574
|
+
moveToCenter: ue
|
|
575
575
|
};
|
|
576
576
|
}
|
|
577
|
-
function
|
|
578
|
-
const a =
|
|
579
|
-
|
|
580
|
-
|
|
577
|
+
function $a(e, t, n) {
|
|
578
|
+
const a = r(), o = r(e.draggable), s = r(e.lockAxis), i = r(), u = r(), v = r(!1), f = r(new ne(0, 0)), p = r(new ne(0, 0)), w = r(new ne(0, 0)), T = r(new ne(0, 0));
|
|
579
|
+
Z(() => n.value, (b) => {
|
|
580
|
+
i.value.style.cursor = b ? "move" : "default";
|
|
581
581
|
});
|
|
582
|
-
function b
|
|
583
|
-
if (
|
|
582
|
+
function h(b, k) {
|
|
583
|
+
if (k.tagName === "BUTTON")
|
|
584
584
|
return !1;
|
|
585
|
-
if (
|
|
585
|
+
if (k === b)
|
|
586
586
|
return !0;
|
|
587
|
-
for (const
|
|
588
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
587
|
+
for (const W in k.children)
|
|
588
|
+
if (Object.prototype.hasOwnProperty.call(k.children, W) && h(b, k.children[W]))
|
|
589
589
|
return !0;
|
|
590
590
|
return !1;
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
var
|
|
594
|
-
let
|
|
595
|
-
|
|
596
|
-
const
|
|
597
|
-
a.value && (a.value.style.transform =
|
|
592
|
+
function g() {
|
|
593
|
+
var K, O;
|
|
594
|
+
let b = w.value.x + p.value.x, k = w.value.y + p.value.y;
|
|
595
|
+
s.value === "x" ? (b = ((K = f.value) == null ? void 0 : K.x) || 0, w.value.x = 0) : s.value === "y" && (k = ((O = f.value) == null ? void 0 : O.y) || 0, w.value.y = 0);
|
|
596
|
+
const W = `translate3d(${Math.round(b)}px, ${Math.round(k)}px, 0px)`;
|
|
597
|
+
a.value && (a.value.style.transform = W), T.value.x = b, T.value.y = k;
|
|
598
598
|
}
|
|
599
|
-
function
|
|
600
|
-
if (!
|
|
599
|
+
function F() {
|
|
600
|
+
if (!u.value || !a.value)
|
|
601
601
|
return null;
|
|
602
|
-
const
|
|
603
|
-
top:
|
|
604
|
-
right:
|
|
605
|
-
bottom:
|
|
606
|
-
left:
|
|
602
|
+
const b = u.value.getBoundingClientRect(), k = a.value.getBoundingClientRect(), W = {
|
|
603
|
+
top: b.top < k.top,
|
|
604
|
+
right: b.right > k.right,
|
|
605
|
+
bottom: b.bottom > k.bottom,
|
|
606
|
+
left: b.left < k.left
|
|
607
607
|
};
|
|
608
|
-
return
|
|
608
|
+
return W.top || (w.value.y -= k.top - b.top), W.bottom || (w.value.y -= k.bottom - b.bottom), W.right || (w.value.x -= k.right - b.right), W.left || (w.value.x -= k.left - b.left), g(), W;
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
|
|
610
|
+
function E(b) {
|
|
611
|
+
b && (f.value && b.subtract(f.value), w.value.set(b), g(), F());
|
|
612
612
|
}
|
|
613
|
-
function
|
|
614
|
-
|
|
613
|
+
function P(b) {
|
|
614
|
+
v.value && o.value && (b.stopPropagation(), b.preventDefault(), E(ne.fromEvent(b, i.value)));
|
|
615
615
|
}
|
|
616
|
-
function
|
|
617
|
-
var
|
|
618
|
-
|
|
616
|
+
function C() {
|
|
617
|
+
var b;
|
|
618
|
+
v.value && (v.value = !1, p.value.add(w.value), w.value.reset(), (b = a.value) == null || b.classList.remove("ng-dragging"), t.emit("stopMove"), document.removeEventListener("mousemove", P), document.removeEventListener("mouseup", C));
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
!
|
|
620
|
+
function N() {
|
|
621
|
+
!v.value && i.value && (v.value = !0, i.value.classList.add("ng-dragging"), document.addEventListener("mousemove", P), document.addEventListener("mouseup", C));
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function U() {
|
|
624
624
|
if (a.value) {
|
|
625
|
-
const
|
|
626
|
-
|
|
625
|
+
const b = ne.getTransformInfo(a.value);
|
|
626
|
+
p.value.set(b);
|
|
627
627
|
return;
|
|
628
628
|
}
|
|
629
|
-
|
|
629
|
+
p.value.reset();
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
if (!n.value ||
|
|
631
|
+
function B(b) {
|
|
632
|
+
if (!n.value || b instanceof MouseEvent && b.button === 2)
|
|
633
633
|
return;
|
|
634
|
-
const
|
|
635
|
-
|
|
634
|
+
const k = b.target || b.srcElement;
|
|
635
|
+
i.value !== void 0 && k && !h(k, i.value) || o.value !== !1 && (document.body.click(), b.stopPropagation(), b.preventDefault(), f.value = ne.fromEvent(b, a.value), U(), N());
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
if (o.value &&
|
|
639
|
-
if (
|
|
640
|
-
|
|
637
|
+
function L(b, k, W) {
|
|
638
|
+
if (o.value && k) {
|
|
639
|
+
if (b)
|
|
640
|
+
i.value = b;
|
|
641
641
|
else if (e.dragHandle) {
|
|
642
642
|
if (e.dragHandle instanceof HTMLElement)
|
|
643
|
-
|
|
643
|
+
i.value = e.dragHandle;
|
|
644
644
|
else if (typeof e.dragHandle == "string") {
|
|
645
|
-
const
|
|
646
|
-
|
|
645
|
+
const K = k.querySelector(e.dragHandle);
|
|
646
|
+
K && (i.value = K);
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
a.value =
|
|
649
|
+
a.value = k, u.value = W, i.value ? (i.value.classList.add("ng-draggable"), i.value.addEventListener("mousedown", B)) : o.value = !1;
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
652
|
return {
|
|
653
|
-
registerDraggle:
|
|
654
|
-
resetTranslate:
|
|
653
|
+
registerDraggle: L,
|
|
654
|
+
resetTranslate: U
|
|
655
655
|
};
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function kt(e, t) {
|
|
658
658
|
if (e) {
|
|
659
659
|
const n = (a) => {
|
|
660
660
|
a.key.toLowerCase() === e.toLowerCase() && t({ event: a, key: e });
|
|
@@ -664,19 +664,19 @@ function Ft(e, t) {
|
|
|
664
664
|
};
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
function
|
|
668
|
-
const n =
|
|
667
|
+
function Ua(e, t) {
|
|
668
|
+
const n = r(e.enableEsc);
|
|
669
669
|
let a = null;
|
|
670
|
-
return n.value ? (a =
|
|
670
|
+
return n.value ? (a = kt("Escape", (o) => {
|
|
671
671
|
t.emit("esc", { event: o.event, type: "esc" });
|
|
672
672
|
}), {
|
|
673
673
|
remove: a
|
|
674
674
|
}) : null;
|
|
675
675
|
}
|
|
676
|
-
function
|
|
677
|
-
const n =
|
|
676
|
+
function Ka(e, t) {
|
|
677
|
+
const n = r(e.enableEnter);
|
|
678
678
|
let a = null;
|
|
679
|
-
return n.value ? (a =
|
|
679
|
+
return n.value ? (a = kt("Enter", (o) => {
|
|
680
680
|
t.emit("enter", { event: o.event, type: "enter" });
|
|
681
681
|
}), {
|
|
682
682
|
remove: a
|
|
@@ -684,266 +684,266 @@ function qa(e, t) {
|
|
|
684
684
|
}
|
|
685
685
|
const Ye = /* @__PURE__ */ Se({
|
|
686
686
|
name: "FModal",
|
|
687
|
-
props:
|
|
687
|
+
props: Wa,
|
|
688
688
|
emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter", "stopMove"],
|
|
689
689
|
setup(e, t) {
|
|
690
|
-
const n =
|
|
691
|
-
|
|
692
|
-
const
|
|
693
|
-
function
|
|
694
|
-
const
|
|
690
|
+
const n = r(e.width || 300), a = r(e.height || 200), o = r(e.modelValue), s = r(""), i = r(e.class), u = r(e.fitContent), v = r(e.showHeader), f = r(""), p = r(e.showCloseButton), w = r(e.showMaxButton), T = r(!1), h = r(e.dialogType), g = r(e.src), F = r(""), E = r(e.showButtons), P = r(e.title), C = r(e.containment || null), N = r();
|
|
691
|
+
P.value === "错误提示" && (P.value = Ce.getLocaleValue("messageBox.errorTitle"));
|
|
692
|
+
const U = r(!1);
|
|
693
|
+
function B(m, j) {
|
|
694
|
+
const Q = j ? "accept" : "cancel";
|
|
695
695
|
Promise.resolve().then(() => {
|
|
696
|
-
var
|
|
697
|
-
return (
|
|
698
|
-
closeType:
|
|
696
|
+
var ee;
|
|
697
|
+
return (ee = e.beforeClose) == null ? void 0 : ee.call(e, {
|
|
698
|
+
closeType: Q
|
|
699
699
|
});
|
|
700
|
-
}).then((
|
|
701
|
-
|
|
700
|
+
}).then((ee) => {
|
|
701
|
+
ee && (o.value = !1, t.emit("update:modelValue", !1), j != null && t.emit(j ? "accept" : "cancel"), t.emit("closed", m));
|
|
702
702
|
});
|
|
703
703
|
}
|
|
704
|
-
const
|
|
704
|
+
const L = [{
|
|
705
705
|
name: "cancel",
|
|
706
|
-
text:
|
|
706
|
+
text: Ce.getLocaleValue("messageBox.cancel") || "取消",
|
|
707
707
|
class: "btn btn-secondary",
|
|
708
|
-
handle: (
|
|
709
|
-
|
|
708
|
+
handle: (m) => {
|
|
709
|
+
B(m, !1);
|
|
710
710
|
}
|
|
711
711
|
}, {
|
|
712
712
|
name: "accept",
|
|
713
|
-
text:
|
|
713
|
+
text: Ce.getLocaleValue("messageBox.ok") || "确定",
|
|
714
714
|
class: "btn btn-primary",
|
|
715
|
-
handle: (
|
|
716
|
-
|
|
715
|
+
handle: (m) => {
|
|
716
|
+
B(m, !0);
|
|
717
717
|
}
|
|
718
|
-
}],
|
|
718
|
+
}], b = r(e.buttons && e.buttons.length ? e.buttons : L), k = y(() => !!f.value), W = y(() => !!E.value && !!b.value), K = r(), O = r(), G = r(!1), {
|
|
719
719
|
renderResizeBar: se,
|
|
720
|
-
maximize:
|
|
721
|
-
restore:
|
|
722
|
-
boundingElement:
|
|
720
|
+
maximize: X,
|
|
721
|
+
restore: ue,
|
|
722
|
+
boundingElement: z,
|
|
723
723
|
resizedEventParam: M,
|
|
724
724
|
allowDrag: d,
|
|
725
|
-
unWindowResizeHandle:
|
|
726
|
-
moveToCenter:
|
|
727
|
-
} =
|
|
728
|
-
registerDraggle:
|
|
729
|
-
} =
|
|
725
|
+
unWindowResizeHandle: x,
|
|
726
|
+
moveToCenter: R
|
|
727
|
+
} = Ga(e), {
|
|
728
|
+
registerDraggle: D
|
|
729
|
+
} = $a(e, t, d);
|
|
730
730
|
function A() {
|
|
731
731
|
return !!document.querySelectorAll(".farris-modal").length && document.body.classList.contains("modal-open");
|
|
732
732
|
}
|
|
733
|
-
function
|
|
734
|
-
const
|
|
735
|
-
(!
|
|
736
|
-
}
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
}),
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
}),
|
|
743
|
-
}),
|
|
744
|
-
|
|
745
|
-
}),
|
|
746
|
-
|
|
747
|
-
}),
|
|
748
|
-
const
|
|
749
|
-
JSON.stringify(
|
|
750
|
-
newSize:
|
|
751
|
-
oldSize:
|
|
733
|
+
function q() {
|
|
734
|
+
const m = document.querySelectorAll(".farris-modal").length;
|
|
735
|
+
(!m || m - 1 <= 0) && document.body.classList.remove("modal-open"), N.value && N.value.classList.remove("show");
|
|
736
|
+
}
|
|
737
|
+
Z(() => e.title, (m, j) => {
|
|
738
|
+
m !== j && (P.value = m);
|
|
739
|
+
}), Z(() => e.modelValue, (m, j) => {
|
|
740
|
+
m !== j && (o.value = m, o.value && e.draggable && Ne(() => {
|
|
741
|
+
O.value && !C.value && (C.value = O.value.parentElement, z.value = C.value, D(K.value, O.value, z.value), R());
|
|
742
|
+
}), m || (C.value && (C.value = null), q())), o.value ? U.value = A() : (G.value = !1, d.value = e.draggable);
|
|
743
|
+
}), Z(() => e.showHeader, (m, j) => {
|
|
744
|
+
m !== j && (v.value = m);
|
|
745
|
+
}), Z(() => e.showButtons, (m, j) => {
|
|
746
|
+
m !== j && (E.value = m);
|
|
747
|
+
}), Z(() => M.value, (m, j) => {
|
|
748
|
+
const Q = m || {}, ee = j || {};
|
|
749
|
+
JSON.stringify(Q) !== JSON.stringify(ee) && t.emit("resize", {
|
|
750
|
+
newSize: m,
|
|
751
|
+
oldSize: j,
|
|
752
752
|
isMaximized: G.value
|
|
753
753
|
});
|
|
754
|
-
}),
|
|
755
|
-
(
|
|
756
|
-
}),
|
|
757
|
-
|
|
754
|
+
}), Z([() => e.width, () => e.height], (m, j) => {
|
|
755
|
+
(m[0] !== j[0] || m[1] !== j[1]) && (n.value = m[0] || 500, a.value = m[1] || 600);
|
|
756
|
+
}), Z(() => e.class, (m, j) => {
|
|
757
|
+
i.value = m;
|
|
758
758
|
});
|
|
759
|
-
const
|
|
760
|
-
var
|
|
761
|
-
const
|
|
759
|
+
const oe = y(() => (o.value && document.body.classList.add("modal-open"), o.value)), re = y(() => {
|
|
760
|
+
var Q;
|
|
761
|
+
const m = {
|
|
762
762
|
modal: !0,
|
|
763
763
|
"farris-modal": !0,
|
|
764
764
|
fade: !0
|
|
765
765
|
};
|
|
766
|
-
|
|
767
|
-
const
|
|
768
|
-
return
|
|
769
|
-
}),
|
|
770
|
-
var
|
|
771
|
-
const
|
|
766
|
+
m["f-modal-fitContent"] = !!u.value, m.show = !!oe.value;
|
|
767
|
+
const j = (Q = e.maskClass) == null ? void 0 : Q.split(" ");
|
|
768
|
+
return j == null || j.reduce((ee, le) => (ee[le] = !0, ee), m), m;
|
|
769
|
+
}), de = y(() => {
|
|
770
|
+
var Q;
|
|
771
|
+
const m = {
|
|
772
772
|
"modal-dialog": !0
|
|
773
|
-
},
|
|
774
|
-
return
|
|
775
|
-
}),
|
|
776
|
-
const
|
|
773
|
+
}, j = (Q = i.value) == null ? void 0 : Q.split(" ");
|
|
774
|
+
return j == null || j.reduce((ee, le) => (ee[le] = !0, ee), m), m;
|
|
775
|
+
}), te = () => Dn() && !e.isMessager, Te = y(() => {
|
|
776
|
+
const m = document.documentElement.clientWidth, j = document.documentElement.clientHeight, Q = Math.min(n.value, m), ee = u.value ? "auto" : `${Math.min(a.value, j - 10)}px`, le = {
|
|
777
777
|
position: "absolute",
|
|
778
|
-
top: `${(window.innerHeight - parseInt(
|
|
779
|
-
left: `${(window.innerWidth -
|
|
780
|
-
width: `${
|
|
781
|
-
height:
|
|
778
|
+
top: `${(window.innerHeight - parseInt(ee === "auto" ? "0" : ee)) / 2}px`,
|
|
779
|
+
left: `${(window.innerWidth - Q) / 2}px`,
|
|
780
|
+
width: `${Q}px`,
|
|
781
|
+
height: ee
|
|
782
782
|
};
|
|
783
|
-
return
|
|
784
|
-
}),
|
|
785
|
-
const
|
|
783
|
+
return te() && (le.top = "0px", le.left = "0px", le.width = `${window.innerWidth}px`, le.height = `${window.innerHeight}px`), e.mask || (le.pointerEvents = "auto"), le;
|
|
784
|
+
}), fe = r(bt() || 1050), ye = y(() => {
|
|
785
|
+
const m = {
|
|
786
786
|
display: "block",
|
|
787
787
|
overflow: "hidden"
|
|
788
788
|
};
|
|
789
|
-
return e.mask || (
|
|
790
|
-
}),
|
|
789
|
+
return e.mask || (m.pointerEvents = "none", m.backgroundColor = "transparent"), U.value && (m.backgroundColor = "transparent"), m.zIndex = fe.value, m;
|
|
790
|
+
}), Me = y(() => ({
|
|
791
791
|
"modal-content": !0,
|
|
792
|
-
"modal-content-has-header":
|
|
793
|
-
"is-mobile":
|
|
794
|
-
})), Le =
|
|
795
|
-
const
|
|
796
|
-
display:
|
|
792
|
+
"modal-content-has-header": v.value,
|
|
793
|
+
"is-mobile": te()
|
|
794
|
+
})), Le = y(() => {
|
|
795
|
+
const m = {
|
|
796
|
+
display: v.value ? "" : "none"
|
|
797
797
|
};
|
|
798
|
-
return
|
|
799
|
-
}),
|
|
798
|
+
return m["pointer-events"] = d.value ? "auto" : "none", m;
|
|
799
|
+
}), ke = y(() => ({
|
|
800
800
|
"f-icon": !0,
|
|
801
801
|
modal_maximize: !0,
|
|
802
802
|
modalrevert: G.value
|
|
803
|
-
})),
|
|
803
|
+
})), De = y(() => ({
|
|
804
804
|
"modal-body": !0,
|
|
805
|
-
"f-utils-flex-column":
|
|
805
|
+
"f-utils-flex-column": h.value === "iframe",
|
|
806
806
|
"f-utils-fill": !0
|
|
807
807
|
}));
|
|
808
|
-
function
|
|
808
|
+
function Ae() {
|
|
809
809
|
return {
|
|
810
810
|
height: `${e.footerHeight || 60}px`
|
|
811
811
|
};
|
|
812
812
|
}
|
|
813
|
-
const We =
|
|
814
|
-
const
|
|
815
|
-
textAlgin:
|
|
816
|
-
},
|
|
817
|
-
return Object.assign(
|
|
813
|
+
const We = y(() => {
|
|
814
|
+
const m = {
|
|
815
|
+
textAlgin: F.value
|
|
816
|
+
}, j = Ae();
|
|
817
|
+
return Object.assign(m, j);
|
|
818
818
|
});
|
|
819
|
-
function
|
|
820
|
-
if (
|
|
821
|
-
G.value = !1,
|
|
819
|
+
function we(m) {
|
|
820
|
+
if (m == null || m.stopPropagation(), G.value) {
|
|
821
|
+
G.value = !1, ue();
|
|
822
822
|
return;
|
|
823
823
|
}
|
|
824
|
-
|
|
824
|
+
X(), G.value = !0;
|
|
825
825
|
}
|
|
826
|
-
async function
|
|
827
|
-
|
|
826
|
+
async function Ge(m, j) {
|
|
827
|
+
m.handle && await m.handle(j, m) && t.emit("closed", j);
|
|
828
828
|
}
|
|
829
|
-
function
|
|
830
|
-
|
|
829
|
+
function $e(m) {
|
|
830
|
+
m.width && (n.value = m.width), m.height && (a.value = m.height), m.buttons && (b.value = m.buttons), m.title && (P.value = m.title);
|
|
831
831
|
}
|
|
832
|
-
let
|
|
833
|
-
|
|
834
|
-
|
|
832
|
+
let _ = null, Oe = null;
|
|
833
|
+
Bn(() => {
|
|
834
|
+
U.value = A();
|
|
835
835
|
}), ze(() => {
|
|
836
|
-
|
|
836
|
+
O.value && !C.value && (C.value = O.value.parentElement, z.value = C.value, D(K.value, O.value, z.value)), oe.value && document.body.classList.add("modal-open"), _ = Ua(e, t), Oe = Ka(e, t);
|
|
837
837
|
}), Xe(() => {
|
|
838
|
-
|
|
838
|
+
x && x(), _ && _.remove(), Oe && Oe.remove();
|
|
839
839
|
}), t.expose({
|
|
840
|
-
modalElementRef:
|
|
841
|
-
updateModalOptions:
|
|
842
|
-
close:
|
|
843
|
-
maxDialog:
|
|
840
|
+
modalElementRef: O,
|
|
841
|
+
updateModalOptions: $e,
|
|
842
|
+
close: B,
|
|
843
|
+
maxDialog: we,
|
|
844
844
|
isMaximized: G
|
|
845
845
|
});
|
|
846
|
-
function
|
|
847
|
-
return l("ul", null, [
|
|
846
|
+
function He() {
|
|
847
|
+
return l("ul", null, [T.value && l("li", {
|
|
848
848
|
class: "f-btn-icon f-bare"
|
|
849
849
|
}, [l("span", {
|
|
850
850
|
class: "f-icon modal_minimize"
|
|
851
|
-
}, null)]),
|
|
852
|
-
onClick:
|
|
851
|
+
}, null)]), w.value && l("li", {
|
|
852
|
+
onClick: we,
|
|
853
853
|
class: "f-btn-icon f-bare",
|
|
854
854
|
style: "pointer-events: auto;"
|
|
855
855
|
}, [l("span", {
|
|
856
|
-
class:
|
|
857
|
-
}, null)]),
|
|
856
|
+
class: ke.value
|
|
857
|
+
}, null)]), p.value && l("li", {
|
|
858
858
|
class: "f-btn-icon f-bare",
|
|
859
|
-
onClick: (
|
|
859
|
+
onClick: (m) => B(m, !1),
|
|
860
860
|
style: "pointer-events: auto;"
|
|
861
861
|
}, [l("span", {
|
|
862
862
|
class: "f-icon modal_close"
|
|
863
863
|
}, null)])]);
|
|
864
864
|
}
|
|
865
|
-
function
|
|
865
|
+
function je() {
|
|
866
866
|
return l("div", {
|
|
867
867
|
class: "modal-footer",
|
|
868
868
|
style: We.value
|
|
869
|
-
}, [
|
|
870
|
-
const
|
|
869
|
+
}, [b.value && b.value.map((m) => {
|
|
870
|
+
const j = r(m.disabled);
|
|
871
871
|
return l("button", {
|
|
872
|
-
name:
|
|
872
|
+
name: m.name,
|
|
873
873
|
type: "button",
|
|
874
|
-
disabled:
|
|
875
|
-
class:
|
|
876
|
-
onClick: (
|
|
877
|
-
|
|
874
|
+
disabled: j.value,
|
|
875
|
+
class: m.class + (m.iconClass ? " btn-icontext" : ""),
|
|
876
|
+
onClick: (Q) => {
|
|
877
|
+
Ge(m, Q);
|
|
878
878
|
}
|
|
879
|
-
}, [!!
|
|
880
|
-
class:
|
|
881
|
-
}, null),
|
|
879
|
+
}, [!!m.iconClass && l("i", {
|
|
880
|
+
class: m.iconClass
|
|
881
|
+
}, null), m.text]);
|
|
882
882
|
})]);
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function xe() {
|
|
885
885
|
return l("div", {
|
|
886
|
-
ref:
|
|
886
|
+
ref: K,
|
|
887
887
|
class: "modal-header",
|
|
888
888
|
style: Le.value
|
|
889
889
|
}, [t.slots.headerTemplate ? t.slots.headerTemplate() : l("div", {
|
|
890
890
|
class: "modal-title"
|
|
891
|
-
}, [
|
|
892
|
-
class:
|
|
891
|
+
}, [k.value && l("span", {
|
|
892
|
+
class: f.value,
|
|
893
893
|
style: "margin-right: 8px"
|
|
894
894
|
}, null), l("span", {
|
|
895
895
|
class: "modal-title-label"
|
|
896
|
-
}, [
|
|
896
|
+
}, [P.value])]), l("div", {
|
|
897
897
|
class: "actions"
|
|
898
|
-
}, [
|
|
898
|
+
}, [He()])]);
|
|
899
899
|
}
|
|
900
|
-
function
|
|
901
|
-
return t.slots.footerTemplate ? t.slots.footerTemplate() :
|
|
900
|
+
function ve() {
|
|
901
|
+
return t.slots.footerTemplate ? t.slots.footerTemplate() : W.value && je();
|
|
902
902
|
}
|
|
903
|
-
function
|
|
904
|
-
if (
|
|
905
|
-
if (
|
|
903
|
+
function Ue(m) {
|
|
904
|
+
if (m.stopPropagation(), e.allowClickMaskToClose) {
|
|
905
|
+
if (m.target !== N.value)
|
|
906
906
|
return;
|
|
907
|
-
|
|
907
|
+
B(m, !1);
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
var
|
|
910
|
+
function Fe() {
|
|
911
|
+
var m, j;
|
|
912
912
|
return l("div", {
|
|
913
|
-
id:
|
|
914
|
-
class:
|
|
915
|
-
style:
|
|
916
|
-
ref:
|
|
913
|
+
id: s.value,
|
|
914
|
+
class: de.value,
|
|
915
|
+
style: Te.value,
|
|
916
|
+
ref: O
|
|
917
917
|
}, [l("div", {
|
|
918
|
-
class: ye.value
|
|
919
|
-
}, [f.value && je(), l("div", {
|
|
920
918
|
class: Me.value
|
|
921
|
-
}, [
|
|
922
|
-
|
|
919
|
+
}, [v.value && xe(), l("div", {
|
|
920
|
+
class: De.value
|
|
921
|
+
}, [(j = (m = t.slots).default) == null ? void 0 : j.call(m), h.value === "iframe" && l("iframe", {
|
|
922
|
+
title: s.value,
|
|
923
923
|
class: "f-utils-fill",
|
|
924
924
|
width: "100%",
|
|
925
925
|
frameborder: "0",
|
|
926
|
-
src:
|
|
927
|
-
}, null)]),
|
|
926
|
+
src: g.value
|
|
927
|
+
}, null)]), ve()]), !u.value && O.value && !G.value && se(O.value)]);
|
|
928
928
|
}
|
|
929
|
-
function
|
|
930
|
-
return
|
|
929
|
+
function Ie(m) {
|
|
930
|
+
return m || "body";
|
|
931
931
|
}
|
|
932
|
-
return
|
|
933
|
-
|
|
934
|
-
}), () => l(
|
|
935
|
-
to:
|
|
932
|
+
return Sn(() => {
|
|
933
|
+
oe.value && (fe.value = bt() || 1050);
|
|
934
|
+
}), () => l(Bt, {
|
|
935
|
+
to: Ie(e.host)
|
|
936
936
|
}, {
|
|
937
|
-
default: () => [
|
|
937
|
+
default: () => [oe.value && l(St, {
|
|
938
938
|
name: "fade",
|
|
939
939
|
appear: !0
|
|
940
940
|
}, {
|
|
941
941
|
default: () => [l("div", {
|
|
942
|
-
ref:
|
|
943
|
-
class:
|
|
944
|
-
style:
|
|
945
|
-
onClick:
|
|
946
|
-
}, [
|
|
942
|
+
ref: N,
|
|
943
|
+
class: re.value,
|
|
944
|
+
style: ye.value,
|
|
945
|
+
onClick: Ue
|
|
946
|
+
}, [Fe()])]
|
|
947
947
|
})]
|
|
948
948
|
});
|
|
949
949
|
}
|
|
@@ -954,59 +954,59 @@ function Ot(e) {
|
|
|
954
954
|
if (e.render && typeof e.render == "function")
|
|
955
955
|
return e.render;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function _a(e) {
|
|
958
958
|
const t = document.createElement("div");
|
|
959
959
|
t.style.display = "contents";
|
|
960
|
-
const n =
|
|
960
|
+
const n = rt({
|
|
961
961
|
setup(a, o) {
|
|
962
962
|
Xe(() => {
|
|
963
963
|
document.body.removeChild(t);
|
|
964
964
|
});
|
|
965
|
-
const
|
|
966
|
-
}),
|
|
967
|
-
}),
|
|
968
|
-
}),
|
|
969
|
-
}),
|
|
970
|
-
}),
|
|
971
|
-
|
|
965
|
+
const s = r(), i = r(e.class || ""), u = r(!!e.showButtons), v = r(!!e.showHeader), f = r(e.showCloseButton == null ? !0 : e.showCloseButton), p = r(!0), w = r(e.title || ""), T = e.acceptCallback || (() => {
|
|
966
|
+
}), h = e.rejectCallback || (() => {
|
|
967
|
+
}), g = e.closedCallback || ((N) => {
|
|
968
|
+
}), F = e.resizeHandle || ((N) => {
|
|
969
|
+
}), E = e.stopMoveHandle || ((N) => {
|
|
970
|
+
}), P = Ot(e), C = (N) => {
|
|
971
|
+
p.value = !1, n.unmount(), g(N);
|
|
972
972
|
};
|
|
973
973
|
return ze(() => {
|
|
974
974
|
}), o.expose({
|
|
975
|
-
modalRef:
|
|
975
|
+
modalRef: s
|
|
976
976
|
}), () => l(Ye, {
|
|
977
|
-
ref:
|
|
978
|
-
class:
|
|
979
|
-
modelValue:
|
|
980
|
-
"onUpdate:modelValue": (
|
|
981
|
-
title:
|
|
977
|
+
ref: s,
|
|
978
|
+
class: i.value,
|
|
979
|
+
modelValue: p.value,
|
|
980
|
+
"onUpdate:modelValue": (N) => p.value = N,
|
|
981
|
+
title: w.value,
|
|
982
982
|
width: e.width,
|
|
983
983
|
height: e.height,
|
|
984
984
|
buttons: e.buttons,
|
|
985
|
-
"show-header":
|
|
986
|
-
"show-buttons":
|
|
987
|
-
"show-close-button":
|
|
985
|
+
"show-header": v.value,
|
|
986
|
+
"show-buttons": u.value,
|
|
987
|
+
"show-close-button": f.value,
|
|
988
988
|
"show-max-button": !1,
|
|
989
|
-
onAccept:
|
|
990
|
-
onCancel:
|
|
989
|
+
onAccept: T,
|
|
990
|
+
onCancel: h,
|
|
991
991
|
fitContent: e.fitContent == null ? !0 : e.fitContent,
|
|
992
|
-
onClosed:
|
|
993
|
-
onResize:
|
|
994
|
-
onStopMove:
|
|
992
|
+
onClosed: C,
|
|
993
|
+
onResize: F,
|
|
994
|
+
onStopMove: E
|
|
995
995
|
}, {
|
|
996
|
-
default: () => [
|
|
996
|
+
default: () => [P && P(n)]
|
|
997
997
|
});
|
|
998
998
|
}
|
|
999
999
|
});
|
|
1000
|
-
return document.body.appendChild(t), n.use(
|
|
1000
|
+
return document.body.appendChild(t), n.use(Ce.i18n), n.mount(t), n;
|
|
1001
1001
|
}
|
|
1002
|
-
class
|
|
1002
|
+
class Ft {
|
|
1003
1003
|
constructor(t) {
|
|
1004
1004
|
me(this, "appContext", null);
|
|
1005
|
-
me(this, "modalRef",
|
|
1006
|
-
me(this, "activeModalIndex",
|
|
1005
|
+
me(this, "modalRef", r());
|
|
1006
|
+
me(this, "activeModalIndex", r(0));
|
|
1007
1007
|
me(this, "modalRefs", {});
|
|
1008
|
-
me(this, "isUseEscCloseModal",
|
|
1009
|
-
me(this, "activeModalInstance",
|
|
1008
|
+
me(this, "isUseEscCloseModal", r(!1));
|
|
1009
|
+
me(this, "activeModalInstance", y(() => this.modalRefs[this.activeModalIndex.value]));
|
|
1010
1010
|
this.app = t, this.appContext = t ? t._context : null;
|
|
1011
1011
|
}
|
|
1012
1012
|
getCurrentModal() {
|
|
@@ -1031,7 +1031,7 @@ class It {
|
|
|
1031
1031
|
showButtons: !0,
|
|
1032
1032
|
showHeader: !0
|
|
1033
1033
|
}, t);
|
|
1034
|
-
return
|
|
1034
|
+
return _a(n);
|
|
1035
1035
|
}
|
|
1036
1036
|
close(t) {
|
|
1037
1037
|
var n, a;
|
|
@@ -1040,432 +1040,432 @@ class It {
|
|
|
1040
1040
|
open(t) {
|
|
1041
1041
|
const n = document.createDocumentFragment();
|
|
1042
1042
|
t.showMaxButton && t.fitContent && (t.showMaxButton = !1);
|
|
1043
|
-
const a =
|
|
1043
|
+
const a = Tn(Object.assign({
|
|
1044
1044
|
title: "",
|
|
1045
1045
|
showButtons: !0,
|
|
1046
1046
|
showHeader: !0
|
|
1047
|
-
}, t)), o =
|
|
1048
|
-
}),
|
|
1049
|
-
}),
|
|
1050
|
-
}),
|
|
1051
|
-
}),
|
|
1047
|
+
}, t)), o = r(!0), s = a.value.acceptCallback || (() => {
|
|
1048
|
+
}), i = a.value.rejectCallback || (() => {
|
|
1049
|
+
}), u = a.value.closedCallback || ((B, L) => {
|
|
1050
|
+
}), v = a.value.resizeHandle || ((B) => {
|
|
1051
|
+
}), f = t.stopMoveHandle || ((B) => {
|
|
1052
1052
|
});
|
|
1053
|
-
let
|
|
1054
|
-
const
|
|
1055
|
-
var
|
|
1053
|
+
let p;
|
|
1054
|
+
const w = Ot(a.value), T = (B) => {
|
|
1055
|
+
var b;
|
|
1056
1056
|
o.value = !1;
|
|
1057
|
-
const
|
|
1058
|
-
|
|
1059
|
-
},
|
|
1060
|
-
|
|
1061
|
-
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value],
|
|
1062
|
-
const
|
|
1063
|
-
|
|
1057
|
+
const L = (b = B == null ? void 0 : B.target) == null ? void 0 : b.classList.contains("modal_close");
|
|
1058
|
+
u(B, this.isUseEscCloseModal.value ? "esc" : L ? "icon" : "button");
|
|
1059
|
+
}, h = (B) => {
|
|
1060
|
+
T(B), p && Ne(() => {
|
|
1061
|
+
if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], lt(null, n), p = null, this.modalRef.value = null, this.modalRefs) {
|
|
1062
|
+
const L = Object.keys(this.modalRefs).map((b) => Number(b));
|
|
1063
|
+
L.length > 0 ? this.activeModalIndex.value = Math.max(...L) : this.activeModalIndex.value = 0;
|
|
1064
1064
|
}
|
|
1065
1065
|
this.isUseEscCloseModal.value = !1;
|
|
1066
1066
|
});
|
|
1067
|
-
},
|
|
1068
|
-
var
|
|
1069
|
-
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((
|
|
1067
|
+
}, g = (B) => {
|
|
1068
|
+
var L;
|
|
1069
|
+
this.isUseEscCloseModal.value = !0, this.activeModalInstance && ((L = this.activeModalInstance.value) == null || L.close(B == null ? void 0 : B.event));
|
|
1070
1070
|
}, {
|
|
1071
|
-
width:
|
|
1072
|
-
height:
|
|
1073
|
-
} = a.value,
|
|
1074
|
-
Object.assign(a.value,
|
|
1075
|
-
const
|
|
1071
|
+
width: F,
|
|
1072
|
+
height: E
|
|
1073
|
+
} = a.value, P = this.adaptToWindow(F || 500, E || 320);
|
|
1074
|
+
Object.assign(a.value, P);
|
|
1075
|
+
const C = () => l(Ye, tt({
|
|
1076
1076
|
ref: this.modalRef,
|
|
1077
1077
|
modelValue: o.value,
|
|
1078
|
-
"onUpdate:modelValue": (
|
|
1078
|
+
"onUpdate:modelValue": (B) => o.value = B
|
|
1079
1079
|
}, a.value, {
|
|
1080
1080
|
isMessager: a.value.class && a.value.class.indexOf("modal-message") > -1,
|
|
1081
|
-
onAccept:
|
|
1082
|
-
onCancel:
|
|
1083
|
-
onClosed:
|
|
1084
|
-
onResize:
|
|
1085
|
-
onEsc:
|
|
1086
|
-
onStopMove:
|
|
1081
|
+
onAccept: s,
|
|
1082
|
+
onCancel: i,
|
|
1083
|
+
onClosed: h,
|
|
1084
|
+
onResize: v,
|
|
1085
|
+
onEsc: g,
|
|
1086
|
+
onStopMove: f
|
|
1087
1087
|
}), {
|
|
1088
|
-
default: () => [
|
|
1088
|
+
default: () => [w && w(this.app)]
|
|
1089
1089
|
});
|
|
1090
|
-
return
|
|
1091
|
-
const
|
|
1092
|
-
return
|
|
1090
|
+
return p = ((B) => {
|
|
1091
|
+
const L = Mn(C, B);
|
|
1092
|
+
return L.appContext = this.appContext, lt(L, n), L;
|
|
1093
1093
|
})({
|
|
1094
1094
|
...a.value
|
|
1095
1095
|
// 'onUpdate:modelValue': onUpdateModelValue,
|
|
1096
1096
|
}), this.activeModalIndex.value++, this.modalRefs[this.activeModalIndex.value] = this.modalRef.value, {
|
|
1097
|
-
update: (
|
|
1097
|
+
update: (B) => {
|
|
1098
1098
|
a.value = {
|
|
1099
1099
|
...a.value,
|
|
1100
|
-
...
|
|
1101
|
-
},
|
|
1100
|
+
...B
|
|
1101
|
+
}, p && lt(kn(p, {
|
|
1102
1102
|
...a
|
|
1103
1103
|
}), n);
|
|
1104
1104
|
},
|
|
1105
|
-
destroy:
|
|
1105
|
+
destroy: h,
|
|
1106
1106
|
modalRef: this.activeModalInstance,
|
|
1107
1107
|
close: () => this.close()
|
|
1108
1108
|
};
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
|
-
const
|
|
1111
|
+
const It = Symbol("FModalService");
|
|
1112
1112
|
Ye.install = (e) => {
|
|
1113
1113
|
e.component(Ye.name, Ye);
|
|
1114
|
-
const t = new
|
|
1115
|
-
e.provide(
|
|
1114
|
+
const t = new Ft(e);
|
|
1115
|
+
e.provide(It, t), e.provide("FModalService", t);
|
|
1116
1116
|
};
|
|
1117
|
-
function
|
|
1117
|
+
function Et(e, t) {
|
|
1118
1118
|
function n() {
|
|
1119
1119
|
const a = e.beforeOpen || e.beforeClickButton || null;
|
|
1120
1120
|
let o = Promise.resolve(!0);
|
|
1121
1121
|
if (a) {
|
|
1122
|
-
const
|
|
1123
|
-
if (typeof
|
|
1122
|
+
const s = a(t.value);
|
|
1123
|
+
if (typeof s > "u")
|
|
1124
1124
|
return o;
|
|
1125
|
-
typeof
|
|
1125
|
+
typeof s == "boolean" ? o = Promise.resolve(s) : o = s;
|
|
1126
1126
|
}
|
|
1127
1127
|
return o;
|
|
1128
1128
|
}
|
|
1129
1129
|
return { judgeCanOpen: n };
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1132
|
-
const
|
|
1131
|
+
function Ya(e, t, n, a, o) {
|
|
1132
|
+
const s = r(e.buttonBehavior), i = r(e.popupOnInput), u = y(() => ({
|
|
1133
1133
|
"input-group-append": !0,
|
|
1134
1134
|
"append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
|
|
1135
|
-
})), { judgeCanOpen:
|
|
1136
|
-
async function
|
|
1137
|
-
if (await
|
|
1138
|
-
const
|
|
1139
|
-
if (
|
|
1140
|
-
const
|
|
1141
|
-
...
|
|
1135
|
+
})), { judgeCanOpen: v } = Et(e, o), f = y(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), p = Ze(It, null), w = r();
|
|
1136
|
+
async function T(F) {
|
|
1137
|
+
if (await v() && f.value) {
|
|
1138
|
+
const E = !!t.slots.default;
|
|
1139
|
+
if (s.value === "Modal") {
|
|
1140
|
+
const P = e.modalOptions, C = p == null ? void 0 : p.open({
|
|
1141
|
+
...P,
|
|
1142
1142
|
render: () => t.slots.default && t.slots.default()
|
|
1143
1143
|
});
|
|
1144
|
-
|
|
1144
|
+
w.value = C == null ? void 0 : C.modalRef;
|
|
1145
1145
|
}
|
|
1146
|
-
|
|
1146
|
+
s.value === "Overlay" && Aa.show({
|
|
1147
1147
|
// host: buttonEditRef.value,
|
|
1148
1148
|
host: document.body,
|
|
1149
1149
|
backgroundColor: "rgba(0,0,0,.15)",
|
|
1150
1150
|
render: () => t.slots.default && t.slots.default()
|
|
1151
|
-
}),
|
|
1151
|
+
}), E && s.value === "Popup" && a.togglePopup(!0), E && i.value && a.hidePopup(), t.emit("clickButton", { origin: F, value: e.modelValue });
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1155
|
-
t.emit("mouseEnterIcon",
|
|
1154
|
+
function h(F) {
|
|
1155
|
+
t.emit("mouseEnterIcon", F);
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1158
|
-
t.emit("mouseLeaveIcon",
|
|
1157
|
+
function g(F) {
|
|
1158
|
+
t.emit("mouseLeaveIcon", F);
|
|
1159
1159
|
}
|
|
1160
1160
|
return {
|
|
1161
|
-
buttonGroupClass:
|
|
1162
|
-
onClickButton:
|
|
1163
|
-
onMouseEnterButton:
|
|
1164
|
-
onMouseLeaveButton:
|
|
1165
|
-
modalRef:
|
|
1161
|
+
buttonGroupClass: u,
|
|
1162
|
+
onClickButton: T,
|
|
1163
|
+
onMouseEnterButton: h,
|
|
1164
|
+
onMouseLeaveButton: g,
|
|
1165
|
+
modalRef: w
|
|
1166
1166
|
};
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1169
|
-
const
|
|
1170
|
-
function
|
|
1171
|
-
|
|
1168
|
+
function qa(e, t, n, a, o, s) {
|
|
1169
|
+
const i = r(!1), u = y(() => e.enableClear && !e.readonly && !e.disable), { changeTextBoxValue: v, hasClearClass: f } = s;
|
|
1170
|
+
function p(g) {
|
|
1171
|
+
i.value = g, f.value = g;
|
|
1172
1172
|
}
|
|
1173
|
-
|
|
1174
|
-
|
|
1173
|
+
Z(o, () => {
|
|
1174
|
+
p(!!o.value);
|
|
1175
1175
|
});
|
|
1176
|
-
function
|
|
1177
|
-
const
|
|
1178
|
-
|
|
1176
|
+
function w(g) {
|
|
1177
|
+
const F = !e.readonly && !e.disable && e.editable, E = !e.editable;
|
|
1178
|
+
g.stopPropagation(), (F || E) && (v(""), o.value = "", p(!i.value), t.emit("clear"));
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
if (
|
|
1180
|
+
function T(g) {
|
|
1181
|
+
if (u.value) {
|
|
1182
1182
|
if (!n.value) {
|
|
1183
|
-
|
|
1183
|
+
p(!1);
|
|
1184
1184
|
return;
|
|
1185
1185
|
}
|
|
1186
|
-
!e.disable && !e.readonly &&
|
|
1186
|
+
!e.disable && !e.readonly && p(!0);
|
|
1187
1187
|
}
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1190
|
-
|
|
1189
|
+
function h(g) {
|
|
1190
|
+
u.value && p(!1);
|
|
1191
1191
|
}
|
|
1192
1192
|
return {
|
|
1193
|
-
enableClearButton:
|
|
1194
|
-
showClearButton:
|
|
1195
|
-
onClearValue:
|
|
1196
|
-
onMouseEnterTextBox:
|
|
1197
|
-
onMouseLeaveTextBox:
|
|
1193
|
+
enableClearButton: u,
|
|
1194
|
+
showClearButton: i,
|
|
1195
|
+
onClearValue: w,
|
|
1196
|
+
onMouseEnterTextBox: T,
|
|
1197
|
+
onMouseLeaveTextBox: h
|
|
1198
1198
|
};
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1201
|
-
const
|
|
1200
|
+
function Xa(e, t, n, a, o) {
|
|
1201
|
+
const s = y(() => e.popupOnInput), i = y(() => e.popupOnFocus), { shouldPopupContent: u, closeAllPopover: v } = o, f = r(!1), p = y(() => e.enableTitle ? n.value : ""), w = y(() => (e.disable || e.readonly) && !e.forcePlaceholder ? "" : e.placeholder), T = y(() => e.readonly || !e.editable), h = r(!1), g = y(() => !e.disable && h.value), F = y(() => ({
|
|
1202
1202
|
"text-left": e.textAlign === "left",
|
|
1203
1203
|
"text-center": e.textAlign === "center",
|
|
1204
1204
|
"text-right": e.textAlign === "right",
|
|
1205
1205
|
"form-control": !0,
|
|
1206
1206
|
"f-utils-fill": !0
|
|
1207
|
-
})),
|
|
1207
|
+
})), E = y(() => ({
|
|
1208
1208
|
"input-group": !0,
|
|
1209
1209
|
"f-state-disabled": e.disable,
|
|
1210
1210
|
"f-state-editable": e.editable && !e.disable && !e.readonly,
|
|
1211
1211
|
"f-state-readonly": e.readonly,
|
|
1212
|
-
"f-state-focus":
|
|
1213
|
-
"input-group--has-clear": e.enableClear &&
|
|
1212
|
+
"f-state-focus": g.value,
|
|
1213
|
+
"input-group--has-clear": e.enableClear && f.value
|
|
1214
1214
|
}));
|
|
1215
|
-
function
|
|
1216
|
-
n.value =
|
|
1215
|
+
function P(O, G = !0) {
|
|
1216
|
+
n.value = O, G && (t.emit("change", O), t.emit("update:modelValue", O));
|
|
1217
1217
|
}
|
|
1218
|
-
function
|
|
1219
|
-
|
|
1218
|
+
function C(O) {
|
|
1219
|
+
u.value = !1, P(O, !0);
|
|
1220
1220
|
}
|
|
1221
|
-
|
|
1221
|
+
Z(
|
|
1222
1222
|
() => e.modelValue,
|
|
1223
|
-
(
|
|
1224
|
-
n.value =
|
|
1223
|
+
(O) => {
|
|
1224
|
+
n.value = O;
|
|
1225
1225
|
}
|
|
1226
1226
|
);
|
|
1227
|
-
function
|
|
1228
|
-
|
|
1227
|
+
function N(O) {
|
|
1228
|
+
h.value = !1, t.emit("blur", O), O.stopPropagation();
|
|
1229
1229
|
}
|
|
1230
|
-
function
|
|
1231
|
-
t.emit("click",
|
|
1230
|
+
function U(O) {
|
|
1231
|
+
t.emit("click", O), v(), t.slots.default && !e.disable && !e.readonly && e.popupOnClick && o.togglePopup();
|
|
1232
1232
|
}
|
|
1233
|
-
function
|
|
1234
|
-
!e.disable && !e.readonly && (
|
|
1233
|
+
function B(O) {
|
|
1234
|
+
!e.disable && !e.readonly && (h.value = !0, T.value || (t.emit("focus", O), i.value && !u.value && o.popup()));
|
|
1235
1235
|
}
|
|
1236
|
-
function
|
|
1237
|
-
t.emit("input",
|
|
1238
|
-
const G =
|
|
1239
|
-
a.value = G, n.value !== G &&
|
|
1236
|
+
function L(O) {
|
|
1237
|
+
t.emit("input", O);
|
|
1238
|
+
const G = O.target.value;
|
|
1239
|
+
a.value = G, n.value !== G && P(G, e.updateOn === "change"), s.value && !u.value && o.popup();
|
|
1240
1240
|
}
|
|
1241
|
-
function
|
|
1242
|
-
|
|
1241
|
+
function b(O) {
|
|
1242
|
+
O.target.tagName !== "INPUT" && O.preventDefault(), O.stopPropagation();
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
t.emit("keydown",
|
|
1244
|
+
function k(O) {
|
|
1245
|
+
t.emit("keydown", O);
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1248
|
-
|
|
1247
|
+
function W(O) {
|
|
1248
|
+
O.key === "Enter" && (s.value || i.value) && o.hidePopup(), t.emit("keyup", O);
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1251
|
-
const G =
|
|
1252
|
-
|
|
1250
|
+
function K(O) {
|
|
1251
|
+
const G = O.target.value;
|
|
1252
|
+
O.stopPropagation(), P(G);
|
|
1253
1253
|
}
|
|
1254
1254
|
return {
|
|
1255
|
-
hasFocusedTextBox:
|
|
1256
|
-
isTextBoxReadonly:
|
|
1257
|
-
textBoxClass:
|
|
1258
|
-
textBoxPlaceholder:
|
|
1259
|
-
textBoxTitle:
|
|
1260
|
-
inputGroupClass:
|
|
1261
|
-
hasClearClass:
|
|
1262
|
-
changeTextBoxValue:
|
|
1263
|
-
commitValue:
|
|
1264
|
-
onBlurTextBox:
|
|
1265
|
-
onClickTextBox:
|
|
1266
|
-
onFocusTextBox:
|
|
1267
|
-
onInput:
|
|
1268
|
-
onKeyDownTextBox:
|
|
1269
|
-
onKeyUpTextBox:
|
|
1270
|
-
onMouseDownTextBox:
|
|
1271
|
-
onTextBoxValueChange:
|
|
1255
|
+
hasFocusedTextBox: g,
|
|
1256
|
+
isTextBoxReadonly: T,
|
|
1257
|
+
textBoxClass: F,
|
|
1258
|
+
textBoxPlaceholder: w,
|
|
1259
|
+
textBoxTitle: p,
|
|
1260
|
+
inputGroupClass: E,
|
|
1261
|
+
hasClearClass: f,
|
|
1262
|
+
changeTextBoxValue: P,
|
|
1263
|
+
commitValue: C,
|
|
1264
|
+
onBlurTextBox: N,
|
|
1265
|
+
onClickTextBox: U,
|
|
1266
|
+
onFocusTextBox: B,
|
|
1267
|
+
onInput: L,
|
|
1268
|
+
onKeyDownTextBox: k,
|
|
1269
|
+
onKeyUpTextBox: W,
|
|
1270
|
+
onMouseDownTextBox: b,
|
|
1271
|
+
onTextBoxValueChange: K
|
|
1272
1272
|
};
|
|
1273
1273
|
}
|
|
1274
|
-
const
|
|
1275
|
-
function
|
|
1276
|
-
const o =
|
|
1277
|
-
|
|
1278
|
-
window[
|
|
1274
|
+
const Pe = "FarrisVue_PopoverInstancesKey";
|
|
1275
|
+
function Ja(e, t, n, a) {
|
|
1276
|
+
const o = r(), s = r(!1), { judgeCanOpen: i } = Et(e, a);
|
|
1277
|
+
Z(() => o.value, (h, g) => {
|
|
1278
|
+
window[Pe] = window[Pe] || /* @__PURE__ */ new WeakMap(), h ? window[Pe].set(n.value, h) : window[Pe].delete(n.value);
|
|
1279
1279
|
});
|
|
1280
|
-
function
|
|
1281
|
-
if (window[
|
|
1282
|
-
const
|
|
1283
|
-
document.querySelectorAll(".f-button-edit,.v-popover").forEach((
|
|
1284
|
-
const
|
|
1285
|
-
|
|
1280
|
+
function u() {
|
|
1281
|
+
if (window[Pe]) {
|
|
1282
|
+
const h = window[Pe];
|
|
1283
|
+
document.querySelectorAll(".f-button-edit,.v-popover").forEach((g) => {
|
|
1284
|
+
const F = h.get(g);
|
|
1285
|
+
F && g !== n.value && !n.value.closest(".popover-fitcontent") && F.hide();
|
|
1286
1286
|
});
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1290
|
-
const
|
|
1291
|
-
|
|
1289
|
+
function v() {
|
|
1290
|
+
const h = o.value;
|
|
1291
|
+
h && h.show(n.value);
|
|
1292
1292
|
}
|
|
1293
|
-
async function
|
|
1293
|
+
async function f(h = !1) {
|
|
1294
1294
|
if (!!t.slots.default) {
|
|
1295
|
-
if (!
|
|
1295
|
+
if (!h && !s.value && !await i())
|
|
1296
1296
|
return;
|
|
1297
|
-
|
|
1297
|
+
s.value = !s.value, s.value && (await Ne(), v());
|
|
1298
1298
|
}
|
|
1299
1299
|
}
|
|
1300
|
-
async function
|
|
1300
|
+
async function p(h = !1) {
|
|
1301
1301
|
if (!!t.slots.default) {
|
|
1302
|
-
if (!
|
|
1302
|
+
if (!h && !await i())
|
|
1303
1303
|
return;
|
|
1304
|
-
|
|
1304
|
+
s.value = !0, await Ne(), v();
|
|
1305
1305
|
}
|
|
1306
1306
|
}
|
|
1307
|
-
function
|
|
1308
|
-
|
|
1307
|
+
function w() {
|
|
1308
|
+
s.value = !1;
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1311
|
-
|
|
1312
|
-
|
|
1310
|
+
function T() {
|
|
1311
|
+
s.value = !0, Ne(() => {
|
|
1312
|
+
v();
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
1315
|
-
return { hidePopup:
|
|
1315
|
+
return { hidePopup: w, showPopup: T, popup: p, shouldPopupContent: s, togglePopup: f, popoverRef: o, closeAllPopover: u };
|
|
1316
1316
|
}
|
|
1317
|
-
function
|
|
1318
|
-
const a =
|
|
1317
|
+
function Za(e, t, n) {
|
|
1318
|
+
const a = r(), {
|
|
1319
1319
|
isTextBoxReadonly: o,
|
|
1320
|
-
textBoxClass:
|
|
1321
|
-
textBoxPlaceholder:
|
|
1322
|
-
textBoxTitle:
|
|
1323
|
-
onBlurTextBox:
|
|
1324
|
-
onClickTextBox:
|
|
1325
|
-
onFocusTextBox:
|
|
1326
|
-
onInput:
|
|
1327
|
-
onKeyDownTextBox:
|
|
1328
|
-
onKeyUpTextBox:
|
|
1329
|
-
onMouseDownTextBox:
|
|
1330
|
-
onTextBoxValueChange:
|
|
1331
|
-
} = n,
|
|
1332
|
-
uuid:
|
|
1333
|
-
} =
|
|
1320
|
+
textBoxClass: s,
|
|
1321
|
+
textBoxPlaceholder: i,
|
|
1322
|
+
textBoxTitle: u,
|
|
1323
|
+
onBlurTextBox: v,
|
|
1324
|
+
onClickTextBox: f,
|
|
1325
|
+
onFocusTextBox: p,
|
|
1326
|
+
onInput: w,
|
|
1327
|
+
onKeyDownTextBox: T,
|
|
1328
|
+
onKeyUpTextBox: h,
|
|
1329
|
+
onMouseDownTextBox: g,
|
|
1330
|
+
onTextBoxValueChange: F
|
|
1331
|
+
} = n, E = r(e.id), {
|
|
1332
|
+
uuid: P
|
|
1333
|
+
} = Hn(), C = y(() => ({
|
|
1334
1334
|
// 'border-top-right-radius': '6px',
|
|
1335
1335
|
// 'border-bottom-right-radius': '6px'
|
|
1336
1336
|
}));
|
|
1337
1337
|
ze(() => {
|
|
1338
|
-
var
|
|
1339
|
-
e.selectOnCreated && ((
|
|
1338
|
+
var b, k;
|
|
1339
|
+
e.selectOnCreated && ((b = a.value) == null || b.select()), e.focusOnCreated && ((k = a.value) == null || k.focus({
|
|
1340
1340
|
preventScroll: !0
|
|
1341
|
-
})),
|
|
1341
|
+
})), E.value || (E.value = "button-edit_" + P(8)), E.value = E.value + "-textbox";
|
|
1342
1342
|
});
|
|
1343
|
-
const
|
|
1344
|
-
|
|
1345
|
-
},
|
|
1346
|
-
|
|
1343
|
+
const N = r(!1), U = (b) => {
|
|
1344
|
+
b.preventDefault(), N.value = !0;
|
|
1345
|
+
}, B = (b) => {
|
|
1346
|
+
b.preventDefault(), N.value = !1, w(b);
|
|
1347
1347
|
};
|
|
1348
|
-
function
|
|
1349
|
-
|
|
1348
|
+
function L(b) {
|
|
1349
|
+
N.value || w(b);
|
|
1350
1350
|
}
|
|
1351
1351
|
return () => l("input", {
|
|
1352
1352
|
id: e.id ? e.id + "-textbox" : void 0,
|
|
1353
1353
|
ref: a,
|
|
1354
1354
|
name: "input-group-value",
|
|
1355
1355
|
autocomplete: e.autoComplete ? "on" : "off",
|
|
1356
|
-
class:
|
|
1357
|
-
style:
|
|
1356
|
+
class: s.value,
|
|
1357
|
+
style: C.value,
|
|
1358
1358
|
disabled: e.disable,
|
|
1359
1359
|
maxlength: e.maxLength,
|
|
1360
1360
|
minlength: e.minLength,
|
|
1361
|
-
placeholder:
|
|
1361
|
+
placeholder: i.value,
|
|
1362
1362
|
readonly: o.value,
|
|
1363
1363
|
tabindex: e.tabIndex,
|
|
1364
|
-
title:
|
|
1364
|
+
title: u.value,
|
|
1365
1365
|
type: e.inputType,
|
|
1366
1366
|
value: t.value,
|
|
1367
|
-
onBlur:
|
|
1368
|
-
onChange:
|
|
1369
|
-
onClick:
|
|
1370
|
-
onFocus:
|
|
1371
|
-
onInput:
|
|
1372
|
-
onKeydown:
|
|
1373
|
-
onKeyup:
|
|
1374
|
-
onMousedown:
|
|
1375
|
-
onCompositionend:
|
|
1376
|
-
onCompositionstart:
|
|
1367
|
+
onBlur: v,
|
|
1368
|
+
onChange: F,
|
|
1369
|
+
onClick: f,
|
|
1370
|
+
onFocus: p,
|
|
1371
|
+
onInput: L,
|
|
1372
|
+
onKeydown: T,
|
|
1373
|
+
onKeyup: h,
|
|
1374
|
+
onMousedown: g,
|
|
1375
|
+
onCompositionend: B,
|
|
1376
|
+
onCompositionstart: U
|
|
1377
1377
|
}, null);
|
|
1378
1378
|
}
|
|
1379
|
-
function
|
|
1380
|
-
const a =
|
|
1381
|
-
changeTextBoxValue:
|
|
1382
|
-
onFocusTextBox:
|
|
1383
|
-
onBlurTextBox:
|
|
1384
|
-
onClickTextBox:
|
|
1385
|
-
textBoxPlaceholder:
|
|
1386
|
-
} = n,
|
|
1387
|
-
name:
|
|
1379
|
+
function Qa(e, t, n) {
|
|
1380
|
+
const a = r(e.separator), o = y(() => e.readonly || e.disable), {
|
|
1381
|
+
changeTextBoxValue: s,
|
|
1382
|
+
onFocusTextBox: i,
|
|
1383
|
+
onBlurTextBox: u,
|
|
1384
|
+
onClickTextBox: v,
|
|
1385
|
+
textBoxPlaceholder: f
|
|
1386
|
+
} = n, p = y(() => t.value ? t.value.split(a.value).map((g) => ({
|
|
1387
|
+
name: g,
|
|
1388
1388
|
selectable: !0
|
|
1389
1389
|
})) : []);
|
|
1390
|
-
function
|
|
1391
|
-
|
|
1390
|
+
function w(g) {
|
|
1391
|
+
s(g.map((F) => F.name).join(a.value), !0);
|
|
1392
1392
|
}
|
|
1393
|
-
|
|
1394
|
-
a.value =
|
|
1393
|
+
Z(() => e.separator, (g) => {
|
|
1394
|
+
a.value = g;
|
|
1395
1395
|
});
|
|
1396
|
-
const
|
|
1397
|
-
|
|
1398
|
-
|
|
1396
|
+
const T = r(!e.disable && !e.readonly);
|
|
1397
|
+
Z([() => e.disable, () => e.readonly], ([g, F], [E, P]) => {
|
|
1398
|
+
T.value = !g && !F;
|
|
1399
1399
|
});
|
|
1400
|
-
function
|
|
1401
|
-
|
|
1400
|
+
function h(g) {
|
|
1401
|
+
v(g);
|
|
1402
1402
|
}
|
|
1403
|
-
return () => l(
|
|
1403
|
+
return () => l(Nn, {
|
|
1404
1404
|
tabindex: e.tabIndex,
|
|
1405
|
-
onFocus:
|
|
1406
|
-
onBlur:
|
|
1405
|
+
onFocus: i,
|
|
1406
|
+
onBlur: u,
|
|
1407
1407
|
id: `${e.id}-tag-editor`,
|
|
1408
1408
|
class: "form-control",
|
|
1409
|
-
placeholder:
|
|
1410
|
-
data:
|
|
1409
|
+
placeholder: f.value,
|
|
1410
|
+
data: p.value,
|
|
1411
1411
|
showClose: !o.value,
|
|
1412
1412
|
showInput: !0,
|
|
1413
1413
|
disable: o.value,
|
|
1414
|
-
onChange:
|
|
1415
|
-
onClick:
|
|
1414
|
+
onChange: w,
|
|
1415
|
+
onClick: h
|
|
1416
1416
|
}, null);
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function eo(e, t, n, a) {
|
|
1419
1419
|
const {
|
|
1420
1420
|
buttonGroupClass: o,
|
|
1421
|
-
onClickButton:
|
|
1422
|
-
onMouseEnterButton:
|
|
1423
|
-
onMouseLeaveButton:
|
|
1421
|
+
onClickButton: s,
|
|
1422
|
+
onMouseEnterButton: i,
|
|
1423
|
+
onMouseLeaveButton: u
|
|
1424
1424
|
} = n, {
|
|
1425
|
-
enableClearButton:
|
|
1426
|
-
showClearButton:
|
|
1427
|
-
onClearValue:
|
|
1428
|
-
} = a,
|
|
1429
|
-
|
|
1430
|
-
}, e.buttonBehavior === "Modal" ? 0 : 200),
|
|
1425
|
+
enableClearButton: v,
|
|
1426
|
+
showClearButton: f,
|
|
1427
|
+
onClearValue: p
|
|
1428
|
+
} = a, w = r(), T = zn((g) => {
|
|
1429
|
+
s(g);
|
|
1430
|
+
}, e.buttonBehavior === "Modal" ? 0 : 200), h = () => {
|
|
1431
1431
|
t.emit("beforeClearValue");
|
|
1432
1432
|
};
|
|
1433
1433
|
return {
|
|
1434
1434
|
renderButtonGroup: () => l("div", {
|
|
1435
1435
|
id: e.id ? `${e.id}-button-group` : void 0,
|
|
1436
1436
|
class: o.value
|
|
1437
|
-
}, [
|
|
1437
|
+
}, [v.value && On(l("span", {
|
|
1438
1438
|
class: "input-group-text input-group-clear",
|
|
1439
|
-
onClick:
|
|
1440
|
-
onMousedown:
|
|
1439
|
+
onClick: p,
|
|
1440
|
+
onMousedown: h
|
|
1441
1441
|
}, [l("i", {
|
|
1442
1442
|
class: "f-icon modal_close"
|
|
1443
|
-
}, null)]), [[
|
|
1443
|
+
}, null)]), [[Fn, f.value]]), t.slots.buttonContent ? l("span", {
|
|
1444
1444
|
class: "input-group-text input-group-append-button",
|
|
1445
|
-
onClick:
|
|
1446
|
-
onMouseenter:
|
|
1447
|
-
onMouseleave:
|
|
1445
|
+
onClick: T,
|
|
1446
|
+
onMouseenter: i,
|
|
1447
|
+
onMouseleave: u
|
|
1448
1448
|
}, [t.slots.buttonContent()]) : e.buttonContent ? l("span", {
|
|
1449
1449
|
class: "input-group-text input-group-append-button",
|
|
1450
1450
|
innerHTML: e.buttonContent,
|
|
1451
|
-
ref:
|
|
1452
|
-
onClick: (
|
|
1453
|
-
onMouseenter:
|
|
1454
|
-
onMouseleave:
|
|
1451
|
+
ref: w,
|
|
1452
|
+
onClick: (g) => T(g),
|
|
1453
|
+
onMouseenter: i,
|
|
1454
|
+
onMouseleave: u
|
|
1455
1455
|
}, null) : null]),
|
|
1456
|
-
buttonHandleElement:
|
|
1456
|
+
buttonHandleElement: w
|
|
1457
1457
|
};
|
|
1458
1458
|
}
|
|
1459
|
-
function
|
|
1460
|
-
const a =
|
|
1459
|
+
function to(e, t, n) {
|
|
1460
|
+
const a = r(e.popupMinWidth), {
|
|
1461
1461
|
hidePopup: o,
|
|
1462
|
-
popoverRef:
|
|
1463
|
-
} = n,
|
|
1462
|
+
popoverRef: s
|
|
1463
|
+
} = n, i = () => {
|
|
1464
1464
|
t.emit("shown");
|
|
1465
1465
|
};
|
|
1466
|
-
return () => l(
|
|
1466
|
+
return () => l(An, {
|
|
1467
1467
|
id: `${e.id}-popover`,
|
|
1468
|
-
ref:
|
|
1468
|
+
ref: s,
|
|
1469
1469
|
placement: e.placement,
|
|
1470
1470
|
host: e.popupHost,
|
|
1471
1471
|
"keep-width-with-reference": e.keepWidthWithReference,
|
|
@@ -1475,137 +1475,137 @@ function oo(e, t, n) {
|
|
|
1475
1475
|
class: e.popupClass,
|
|
1476
1476
|
offsetX: e.popupOffsetX,
|
|
1477
1477
|
onHidden: o,
|
|
1478
|
-
onShown:
|
|
1478
|
+
onShown: i,
|
|
1479
1479
|
beforeClose: e.beforeClosePopup,
|
|
1480
1480
|
limitContentBySpace: e.limitContentBySpace
|
|
1481
1481
|
}, {
|
|
1482
1482
|
default: () => {
|
|
1483
|
-
var
|
|
1484
|
-
return [(
|
|
1483
|
+
var u, v;
|
|
1484
|
+
return [(v = (u = t.slots).default) == null ? void 0 : v.call(u)];
|
|
1485
1485
|
}
|
|
1486
1486
|
});
|
|
1487
1487
|
}
|
|
1488
|
-
const
|
|
1488
|
+
const Pt = /* @__PURE__ */ Se({
|
|
1489
1489
|
name: "FButtonEdit",
|
|
1490
|
-
props:
|
|
1491
|
-
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue", "beforeClearValue"],
|
|
1490
|
+
props: ja,
|
|
1491
|
+
emits: ["updateExtendInfo", "clear", "change", "click", "clickButton", "blur", "focus", "mouseEnterIcon", "mouseLeaveIcon", "keyup", "keydown", "inputClick", "input", "update:modelValue", "beforeClearValue", "shown"],
|
|
1492
1492
|
setup(e, t) {
|
|
1493
|
-
const n =
|
|
1494
|
-
shouldPopupContent:
|
|
1495
|
-
hidePopup:
|
|
1496
|
-
showPopup:
|
|
1497
|
-
togglePopup:
|
|
1498
|
-
} =
|
|
1499
|
-
hasFocusedTextBox:
|
|
1500
|
-
commitValue:
|
|
1501
|
-
inputGroupClass:
|
|
1502
|
-
} =
|
|
1503
|
-
onMouseEnterTextBox:
|
|
1504
|
-
onMouseLeaveTextBox:
|
|
1505
|
-
} =
|
|
1506
|
-
const
|
|
1493
|
+
const n = r(), a = r(e.customClass), o = r(e.modelValue), s = Ja(e, t, n, o), {
|
|
1494
|
+
shouldPopupContent: i,
|
|
1495
|
+
hidePopup: u,
|
|
1496
|
+
showPopup: v,
|
|
1497
|
+
togglePopup: f
|
|
1498
|
+
} = s, p = Ya(e, t, n, s, o), w = r(""), T = Xa(e, t, o, w, s), {
|
|
1499
|
+
hasFocusedTextBox: h,
|
|
1500
|
+
commitValue: g,
|
|
1501
|
+
inputGroupClass: F
|
|
1502
|
+
} = T, E = qa(e, t, o, h, w, T), {
|
|
1503
|
+
onMouseEnterTextBox: P,
|
|
1504
|
+
onMouseLeaveTextBox: C
|
|
1505
|
+
} = E, N = r(!1), U = y(() => {
|
|
1506
|
+
const z = {
|
|
1507
1507
|
"f-button-edit": !0,
|
|
1508
1508
|
"f-cmp-inputgroup": !0,
|
|
1509
1509
|
"f-button-edit-nowrap": !e.wrapText
|
|
1510
1510
|
};
|
|
1511
|
-
return a.value && a.value.split(" ").reduce((M, d) => (M[d] = !0, M),
|
|
1512
|
-
}),
|
|
1511
|
+
return a.value && a.value.split(" ").reduce((M, d) => (M[d] = !0, M), z), z;
|
|
1512
|
+
}), B = y(() => ({
|
|
1513
1513
|
overflow: e.wrapText ? "hidden" : ""
|
|
1514
|
-
})),
|
|
1514
|
+
})), L = y(() => ({
|
|
1515
1515
|
// paddingLeft: '3px',
|
|
1516
1516
|
// backgroundColor: '#fff'
|
|
1517
1517
|
}));
|
|
1518
|
-
function
|
|
1518
|
+
function b() {
|
|
1519
1519
|
if (!e.multiSelect || e.inputType !== "tag" || !n.value)
|
|
1520
1520
|
return 0;
|
|
1521
|
-
let
|
|
1521
|
+
let z = 0;
|
|
1522
1522
|
const M = Array.from(n.value.querySelectorAll(".farris-tag-item"));
|
|
1523
|
-
return M && M.length && (
|
|
1523
|
+
return M && M.length && (z = M.map((d) => d.offsetTop).filter((d) => d > 20).length), z;
|
|
1524
1524
|
}
|
|
1525
|
-
const
|
|
1526
|
-
|
|
1527
|
-
|
|
1525
|
+
const k = r(b());
|
|
1526
|
+
In(() => {
|
|
1527
|
+
k.value = b();
|
|
1528
1528
|
});
|
|
1529
|
-
function
|
|
1530
|
-
return e.multiSelect && e.inputType === "tag" ? () => l(
|
|
1529
|
+
function W() {
|
|
1530
|
+
return e.multiSelect && e.inputType === "tag" ? () => l(pe, null, [Qa(e, o, T)(), !!k.value && l("div", {
|
|
1531
1531
|
class: "d-flex flex-row mr-2 more-tags",
|
|
1532
1532
|
"more-tags": !0
|
|
1533
1533
|
}, [l("span", {
|
|
1534
1534
|
class: "multi--more-text"
|
|
1535
|
-
}, [Be("+"),
|
|
1535
|
+
}, [Be("+"), k.value])])]) : Za(e, o, T);
|
|
1536
1536
|
}
|
|
1537
|
-
let
|
|
1538
|
-
|
|
1539
|
-
|
|
1537
|
+
let K = W();
|
|
1538
|
+
Z([() => e.multiSelect, () => e.inputType], () => {
|
|
1539
|
+
K = W();
|
|
1540
1540
|
});
|
|
1541
1541
|
const {
|
|
1542
|
-
renderButtonGroup:
|
|
1542
|
+
renderButtonGroup: O,
|
|
1543
1543
|
buttonHandleElement: G
|
|
1544
|
-
} =
|
|
1545
|
-
displayText:
|
|
1546
|
-
commitValue:
|
|
1544
|
+
} = eo(e, t, p, E), se = to(e, t, s), X = r(i.value), ue = {
|
|
1545
|
+
displayText: w,
|
|
1546
|
+
commitValue: g,
|
|
1547
1547
|
elementRef: n,
|
|
1548
|
-
hidePopup:
|
|
1549
|
-
showPopup:
|
|
1550
|
-
popoverRef:
|
|
1551
|
-
shouldPopupContent:
|
|
1552
|
-
togglePopup:
|
|
1548
|
+
hidePopup: u,
|
|
1549
|
+
showPopup: v,
|
|
1550
|
+
popoverRef: s.popoverRef,
|
|
1551
|
+
shouldPopupContent: i,
|
|
1552
|
+
togglePopup: f,
|
|
1553
1553
|
openDialog: () => {
|
|
1554
1554
|
G.value && e.buttonBehavior === "Modal" && G.value.click();
|
|
1555
1555
|
},
|
|
1556
1556
|
getModal: () => {
|
|
1557
|
-
var
|
|
1558
|
-
return e.buttonBehavior === "Modal" ? (
|
|
1557
|
+
var z;
|
|
1558
|
+
return e.buttonBehavior === "Modal" ? (z = p.modalRef.value) == null ? void 0 : z.value : null;
|
|
1559
1559
|
},
|
|
1560
1560
|
getTextbox: () => {
|
|
1561
|
-
var
|
|
1562
|
-
return (
|
|
1561
|
+
var z;
|
|
1562
|
+
return (z = n.value) == null ? void 0 : z.querySelector("input");
|
|
1563
1563
|
},
|
|
1564
1564
|
forceClosePopup: () => {
|
|
1565
|
-
|
|
1565
|
+
X.value = !1, N.value = !0, i.value = !1;
|
|
1566
1566
|
}
|
|
1567
1567
|
};
|
|
1568
1568
|
return ze(() => {
|
|
1569
|
-
n.value.componentInstance =
|
|
1569
|
+
n.value.componentInstance = ue, window.onresize = () => {
|
|
1570
1570
|
document.body.click();
|
|
1571
1571
|
};
|
|
1572
|
-
}),
|
|
1573
|
-
var
|
|
1574
|
-
window.onresize = null, (
|
|
1575
|
-
}), t.expose(
|
|
1576
|
-
if (
|
|
1577
|
-
|
|
1572
|
+
}), En(() => {
|
|
1573
|
+
var z;
|
|
1574
|
+
window.onresize = null, (z = window[Pe]) == null || z.delete(n.value);
|
|
1575
|
+
}), t.expose(ue), Z(() => i.value, async (z, M) => {
|
|
1576
|
+
if (N.value) {
|
|
1577
|
+
X.value = z, N.value = !1;
|
|
1578
1578
|
return;
|
|
1579
1579
|
}
|
|
1580
|
-
if (!
|
|
1580
|
+
if (!z && e.beforeClosePopup && typeof e.beforeClosePopup == "function") {
|
|
1581
1581
|
try {
|
|
1582
1582
|
const d = await e.beforeClosePopup();
|
|
1583
|
-
|
|
1583
|
+
X.value = !d, (!d || e.readonly) && (i.value = !0);
|
|
1584
1584
|
} catch (d) {
|
|
1585
|
-
console.error("Error in beforeClosePopup:", d),
|
|
1585
|
+
console.error("Error in beforeClosePopup:", d), X.value = M, i.value = M;
|
|
1586
1586
|
}
|
|
1587
1587
|
return;
|
|
1588
1588
|
}
|
|
1589
|
-
|
|
1589
|
+
X.value = z;
|
|
1590
1590
|
}), () => {
|
|
1591
|
-
var
|
|
1592
|
-
return l(
|
|
1591
|
+
var z, M;
|
|
1592
|
+
return l(pe, null, [l("div", tt(t.attrs, {
|
|
1593
1593
|
ref: n,
|
|
1594
|
-
class:
|
|
1594
|
+
class: U.value,
|
|
1595
1595
|
id: e.id ? e.id : void 0,
|
|
1596
|
-
style:
|
|
1596
|
+
style: B.value
|
|
1597
1597
|
}), [l("div", {
|
|
1598
1598
|
id: e.id ? `${e.id}-input-group` : void 0,
|
|
1599
|
-
class:
|
|
1600
|
-
style:
|
|
1601
|
-
onMouseenter:
|
|
1602
|
-
onMouseleave:
|
|
1603
|
-
}, [(M = (
|
|
1599
|
+
class: F.value,
|
|
1600
|
+
style: L.value,
|
|
1601
|
+
onMouseenter: P,
|
|
1602
|
+
onMouseleave: C
|
|
1603
|
+
}, [(M = (z = t.slots).precontent) == null ? void 0 : M.call(z), K(), O()])]), X.value && se()]);
|
|
1604
1604
|
};
|
|
1605
1605
|
}
|
|
1606
1606
|
});
|
|
1607
|
-
|
|
1608
|
-
const
|
|
1607
|
+
Mt(Pt);
|
|
1608
|
+
const no = {
|
|
1609
1609
|
/** 自定义样式 */
|
|
1610
1610
|
customClass: { type: String, default: "" },
|
|
1611
1611
|
/** 允许在最后一个单元回车新增一行 */
|
|
@@ -1734,638 +1734,615 @@ const lo = {
|
|
|
1734
1734
|
width: { type: Number, default: -1 },
|
|
1735
1735
|
/** 空数据模板 */
|
|
1736
1736
|
emptyTemplate: { type: Object },
|
|
1737
|
-
beforeUpdate: { type: Function }
|
|
1738
|
-
/** 绑定动态字段的解析器 */
|
|
1739
|
-
fieldsResolver: { type: Function, default: (e, t) => e },
|
|
1740
|
-
/** 绑定动态字段的值*/
|
|
1741
|
-
displayType: { type: String, default: "List" },
|
|
1742
|
-
fieldsCallback: { type: Function, default: () => {
|
|
1743
|
-
} }
|
|
1737
|
+
beforeUpdate: { type: Function }
|
|
1744
1738
|
};
|
|
1745
|
-
function
|
|
1739
|
+
function ao(e, t, n, a, o, s, i, u, v, f, p, w, T, h, g, F) {
|
|
1746
1740
|
const {
|
|
1747
|
-
isNull:
|
|
1748
|
-
isUndefined:
|
|
1749
|
-
} =
|
|
1750
|
-
totalItems:
|
|
1751
|
-
rawView:
|
|
1752
|
-
} =
|
|
1753
|
-
calculateCellPositionInRow:
|
|
1754
|
-
cellKey:
|
|
1755
|
-
cellPosition:
|
|
1756
|
-
rowKey:
|
|
1757
|
-
rowPosition:
|
|
1758
|
-
rowSpanCellPosition:
|
|
1759
|
-
groupCellPosition:
|
|
1760
|
-
summaryCellPosition:
|
|
1761
|
-
} =
|
|
1741
|
+
isNull: E,
|
|
1742
|
+
isUndefined: P
|
|
1743
|
+
} = jn(), {
|
|
1744
|
+
totalItems: C,
|
|
1745
|
+
rawView: N
|
|
1746
|
+
} = F, {
|
|
1747
|
+
calculateCellPositionInRow: U,
|
|
1748
|
+
cellKey: B,
|
|
1749
|
+
cellPosition: L,
|
|
1750
|
+
rowKey: b,
|
|
1751
|
+
rowPosition: k,
|
|
1752
|
+
rowSpanCellPosition: W,
|
|
1753
|
+
groupCellPosition: K,
|
|
1754
|
+
summaryCellPosition: O
|
|
1755
|
+
} = i, {
|
|
1762
1756
|
cellContentClass: G,
|
|
1763
1757
|
cellContentPosition: se,
|
|
1764
|
-
cellContentClassWithEllipsis:
|
|
1765
|
-
} =
|
|
1766
|
-
collpaseGroupIconClass:
|
|
1767
|
-
} =
|
|
1768
|
-
gridCellClass:
|
|
1758
|
+
cellContentClassWithEllipsis: X
|
|
1759
|
+
} = s, {
|
|
1760
|
+
collpaseGroupIconClass: ue
|
|
1761
|
+
} = f, {
|
|
1762
|
+
gridCellClass: z,
|
|
1769
1763
|
gridRowClass: M,
|
|
1770
1764
|
onClickRow: d,
|
|
1771
|
-
onMouseoverRow:
|
|
1772
|
-
onMouseoutRow:
|
|
1773
|
-
} =
|
|
1774
|
-
onClickCell:
|
|
1775
|
-
} =
|
|
1765
|
+
onMouseoverRow: x,
|
|
1766
|
+
onMouseoutRow: R
|
|
1767
|
+
} = w, {
|
|
1768
|
+
onClickCell: D
|
|
1769
|
+
} = v, {
|
|
1776
1770
|
toggleGroupRow: A
|
|
1777
|
-
} =
|
|
1778
|
-
columnContext:
|
|
1779
|
-
hasLeftFixedColumn:
|
|
1780
|
-
hasRightFixedColumn:
|
|
1781
|
-
} =
|
|
1782
|
-
navigateOnKeyUp:
|
|
1783
|
-
navigateOnKeyDown:
|
|
1784
|
-
} =
|
|
1785
|
-
var
|
|
1786
|
-
return (($ = (
|
|
1771
|
+
} = T, {
|
|
1772
|
+
columnContext: q,
|
|
1773
|
+
hasLeftFixedColumn: oe,
|
|
1774
|
+
hasRightFixedColumn: re
|
|
1775
|
+
} = u, {
|
|
1776
|
+
navigateOnKeyUp: de,
|
|
1777
|
+
navigateOnKeyDown: te
|
|
1778
|
+
} = p, Te = (c) => (c || []).some((V) => Tt(V) ? !(V.type === Pn || V.type === pe && !Te(V.children)) : !0) ? c : null, fe = (c) => {
|
|
1779
|
+
var V, $, I;
|
|
1780
|
+
return (($ = (V = c.column) == null ? void 0 : V.editor) == null ? void 0 : $.type) === "switch" || ((I = c.column) == null ? void 0 : I.dataType) === "boolean" ? {
|
|
1787
1781
|
display: "flex",
|
|
1788
1782
|
flexGrow: "1",
|
|
1789
1783
|
overflow: "hidden"
|
|
1790
1784
|
} : {
|
|
1791
1785
|
flexGrow: "1"
|
|
1792
1786
|
};
|
|
1793
|
-
},
|
|
1787
|
+
}, ye = ge({
|
|
1794
1788
|
"fv-grid-content-left-fixed": !0
|
|
1795
|
-
}),
|
|
1789
|
+
}), Me = ge({
|
|
1796
1790
|
"fv-grid-content-right-fixed": !0
|
|
1797
1791
|
});
|
|
1798
|
-
|
|
1799
|
-
!c[0] && !c[1].length ? (
|
|
1792
|
+
Z([C, N], (c) => {
|
|
1793
|
+
!c[0] && !c[1].length ? (ye["fv-grid-content-left-fixed"] = !1, Me["fv-grid-content-right-fixed"] = !1) : (ye["fv-grid-content-left-fixed"] = !0, Me["fv-grid-content-right-fixed"] = !0);
|
|
1800
1794
|
});
|
|
1801
1795
|
const {
|
|
1802
1796
|
gridDataStyle: Le,
|
|
1803
|
-
gridMergedDataStyle:
|
|
1804
|
-
leftFixedGridDataStyle:
|
|
1805
|
-
leftFixedGridMergedDataStyle:
|
|
1797
|
+
gridMergedDataStyle: ke,
|
|
1798
|
+
leftFixedGridDataStyle: De,
|
|
1799
|
+
leftFixedGridMergedDataStyle: Ae,
|
|
1806
1800
|
rightFixedGridDataStyle: We,
|
|
1807
|
-
rightFixedGridMergedDataStyle:
|
|
1808
|
-
} =
|
|
1809
|
-
function
|
|
1810
|
-
|
|
1801
|
+
rightFixedGridMergedDataStyle: we
|
|
1802
|
+
} = h;
|
|
1803
|
+
function Ge(c, V) {
|
|
1804
|
+
V.collapse = !V.collapse, g.value = A(V.collapse ? "collapse" : "expand", V, g.value);
|
|
1811
1805
|
}
|
|
1812
|
-
function
|
|
1806
|
+
function $e(c, V) {
|
|
1813
1807
|
const $ = [];
|
|
1814
|
-
if (c.groupField &&
|
|
1815
|
-
for (let
|
|
1808
|
+
if (c.groupField && V[c.groupField]) {
|
|
1809
|
+
for (let J = 0; J <= c.layer; J++)
|
|
1816
1810
|
$.push(l("div", {
|
|
1817
1811
|
class: "fv-grid-group-row-icon",
|
|
1818
|
-
onClick: (Ve) =>
|
|
1812
|
+
onClick: (Ve) => Ge(Ve, c)
|
|
1819
1813
|
}, [l("span", {
|
|
1820
|
-
class:
|
|
1814
|
+
class: ue(c)
|
|
1821
1815
|
}, null)]));
|
|
1822
|
-
const
|
|
1816
|
+
const I = c.data[c.groupField];
|
|
1823
1817
|
$.push(l("div", {
|
|
1824
|
-
ref:
|
|
1825
|
-
key:
|
|
1818
|
+
ref: I.setRef,
|
|
1819
|
+
key: B(c, c.layer + 1),
|
|
1826
1820
|
class: "fv-grid-cell",
|
|
1827
|
-
style:
|
|
1828
|
-
}, [
|
|
1821
|
+
style: K(I, V, c.layer)
|
|
1822
|
+
}, [I.data])), Object.values(c.data).filter((J) => J.field !== c.groupField && J.colSpan !== 0).forEach((J) => {
|
|
1829
1823
|
$.push(l("div", {
|
|
1830
|
-
ref:
|
|
1831
|
-
key:
|
|
1824
|
+
ref: J.setRef,
|
|
1825
|
+
key: B(c, J.index),
|
|
1832
1826
|
class: "fv-grid-cell",
|
|
1833
|
-
style:
|
|
1834
|
-
}, [
|
|
1827
|
+
style: L(c, J, V)
|
|
1828
|
+
}, [J.data]));
|
|
1835
1829
|
});
|
|
1836
1830
|
}
|
|
1837
1831
|
return $;
|
|
1838
1832
|
}
|
|
1839
|
-
function
|
|
1833
|
+
function _(c, V, $) {
|
|
1840
1834
|
return c.layer > -1 && l("div", {
|
|
1841
1835
|
ref: c.setRef,
|
|
1842
|
-
key:
|
|
1836
|
+
key: b(c),
|
|
1843
1837
|
class: M(c, $),
|
|
1844
|
-
style:
|
|
1845
|
-
onClick: (
|
|
1846
|
-
onMouseover: (
|
|
1847
|
-
}, [
|
|
1838
|
+
style: k(c),
|
|
1839
|
+
onClick: (I) => d(I, c),
|
|
1840
|
+
onMouseover: (I) => x(I, c)
|
|
1841
|
+
}, [$e(c, V)]);
|
|
1848
1842
|
}
|
|
1849
|
-
function
|
|
1843
|
+
function Oe(c, V) {
|
|
1850
1844
|
const $ = [];
|
|
1851
|
-
if (c.groupField &&
|
|
1852
|
-
const
|
|
1845
|
+
if (c.groupField && V[c.groupField]) {
|
|
1846
|
+
const I = c.data[c.groupField];
|
|
1853
1847
|
$.push(l("div", {
|
|
1854
|
-
ref:
|
|
1855
|
-
key:
|
|
1848
|
+
ref: I.setRef,
|
|
1849
|
+
key: B(c, c.layer + 1),
|
|
1856
1850
|
class: "fv-grid-cell",
|
|
1857
|
-
style:
|
|
1858
|
-
}, [
|
|
1851
|
+
style: O(I, V, c.layer)
|
|
1852
|
+
}, [I.data]));
|
|
1859
1853
|
}
|
|
1860
1854
|
return $;
|
|
1861
1855
|
}
|
|
1862
|
-
function
|
|
1856
|
+
function He(c, V, $) {
|
|
1863
1857
|
return c.layer > -1 && l("div", {
|
|
1864
1858
|
ref: c.setRef,
|
|
1865
|
-
key:
|
|
1859
|
+
key: b(c),
|
|
1866
1860
|
class: M(c, $),
|
|
1867
|
-
style:
|
|
1868
|
-
onClick: (
|
|
1869
|
-
onMouseover: (
|
|
1870
|
-
}, [
|
|
1871
|
-
}
|
|
1872
|
-
function
|
|
1873
|
-
var $,
|
|
1874
|
-
return c.showTips && typeof (($ = c.column) == null ? void 0 : $.formatter) != "function" && ((
|
|
1875
|
-
class:
|
|
1876
|
-
title: c.formatter(c,
|
|
1877
|
-
}, [c.formatter(c,
|
|
1878
|
-
class:
|
|
1879
|
-
}, [c.formatter(c,
|
|
1880
|
-
}
|
|
1881
|
-
function
|
|
1861
|
+
style: k(c),
|
|
1862
|
+
onClick: (I) => d(I, c),
|
|
1863
|
+
onMouseover: (I) => x(I, c)
|
|
1864
|
+
}, [Oe(c, V)]);
|
|
1865
|
+
}
|
|
1866
|
+
function je(c, V) {
|
|
1867
|
+
var $, I, J;
|
|
1868
|
+
return c.showTips && typeof (($ = c.column) == null ? void 0 : $.formatter) != "function" && ((I = c.column) == null ? void 0 : I.dataType) !== "commands" && ((J = c.column) == null ? void 0 : J.dataType) !== "setting" ? l("div", {
|
|
1869
|
+
class: X(c),
|
|
1870
|
+
title: c.formatter(c, V)
|
|
1871
|
+
}, [c.formatter(c, V)]) : l("div", {
|
|
1872
|
+
class: X(c)
|
|
1873
|
+
}, [c.formatter(c, V)]);
|
|
1874
|
+
}
|
|
1875
|
+
function xe() {
|
|
1882
1876
|
return l("div", null, [Be("******")]);
|
|
1883
1877
|
}
|
|
1884
|
-
function
|
|
1885
|
-
var
|
|
1886
|
-
const
|
|
1887
|
-
return ((
|
|
1888
|
-
class:
|
|
1889
|
-
title:
|
|
1890
|
-
}, [
|
|
1891
|
-
class:
|
|
1892
|
-
}, [
|
|
1893
|
-
}
|
|
1894
|
-
function
|
|
1895
|
-
return c.mode ===
|
|
1896
|
-
style:
|
|
1897
|
-
}, [c.getEditor(c)]) : c.column.columnTemplate ? c.column.columnTemplate(c,
|
|
1898
|
-
}
|
|
1899
|
-
function
|
|
1900
|
-
return l(de, null, null);
|
|
1901
|
-
}
|
|
1902
|
-
function Oe(c, z, $) {
|
|
1878
|
+
function ve(c) {
|
|
1879
|
+
var I, J;
|
|
1880
|
+
const V = !E(c.data) && !P(c.data) ? c.data.toString() : c.data;
|
|
1881
|
+
return ((J = (I = c.column) == null ? void 0 : I.editor) == null ? void 0 : J.showType) === "password" ? xe() : c.showTips ? l("div", {
|
|
1882
|
+
class: X(c),
|
|
1883
|
+
title: V
|
|
1884
|
+
}, [V]) : l("div", {
|
|
1885
|
+
class: X(c)
|
|
1886
|
+
}, [V]);
|
|
1887
|
+
}
|
|
1888
|
+
function Ue(c, V) {
|
|
1889
|
+
return c.mode === Gn.editing ? l("div", {
|
|
1890
|
+
style: fe(c)
|
|
1891
|
+
}, [c.getEditor(c)]) : c.column.columnTemplate ? c.column.columnTemplate(c, V) : c.formatter ? je(c, V) : ve(c);
|
|
1892
|
+
}
|
|
1893
|
+
function Fe(c, V, $) {
|
|
1903
1894
|
return l("div", {
|
|
1904
1895
|
ref: c.setRef,
|
|
1905
|
-
key:
|
|
1896
|
+
key: b(c),
|
|
1906
1897
|
class: M(c, $),
|
|
1907
|
-
style:
|
|
1908
|
-
onClick: (
|
|
1909
|
-
onMouseover: (
|
|
1910
|
-
onMouseout: (
|
|
1911
|
-
}, [
|
|
1898
|
+
style: k(c),
|
|
1899
|
+
onClick: (I) => d(I, c),
|
|
1900
|
+
onMouseover: (I) => x(I, c),
|
|
1901
|
+
onMouseout: (I) => R(I, c)
|
|
1902
|
+
}, [Object.values(c.data).filter((I) => V[I.field] && I.rowSpan === 1).map((I) => {
|
|
1912
1903
|
var Ve, Je;
|
|
1913
|
-
const
|
|
1914
|
-
cell:
|
|
1904
|
+
const J = t.slots.cellTemplate && Te(t.slots.cellTemplate({
|
|
1905
|
+
cell: I,
|
|
1915
1906
|
row: c
|
|
1916
1907
|
}));
|
|
1917
1908
|
return l("div", {
|
|
1918
|
-
ref:
|
|
1919
|
-
key:
|
|
1920
|
-
class:
|
|
1921
|
-
style:
|
|
1922
|
-
onClick: (
|
|
1923
|
-
|
|
1924
|
-
},
|
|
1925
|
-
onKeydown: (_e) => Te(_e, O)
|
|
1909
|
+
ref: I.setRef,
|
|
1910
|
+
key: B(c, I.index),
|
|
1911
|
+
class: z(I, c),
|
|
1912
|
+
style: L(c, I, V),
|
|
1913
|
+
onClick: (Ke) => D(Ke, I, c, I.column),
|
|
1914
|
+
onKeydown: (Ke) => de(Ke, I)
|
|
1926
1915
|
}, [l("div", {
|
|
1927
|
-
class: G(
|
|
1928
|
-
style: se(
|
|
1929
|
-
}, [
|
|
1930
|
-
cell:
|
|
1916
|
+
class: G(I),
|
|
1917
|
+
style: se(I)
|
|
1918
|
+
}, [J ? (Je = (Ve = t.slots).cellTemplate) == null ? void 0 : Je.call(Ve, {
|
|
1919
|
+
cell: I,
|
|
1931
1920
|
row: c
|
|
1932
|
-
}) :
|
|
1921
|
+
}) : Ue(I, c)])]);
|
|
1933
1922
|
})]);
|
|
1934
1923
|
}
|
|
1935
|
-
const
|
|
1936
|
-
function
|
|
1937
|
-
const $ =
|
|
1938
|
-
return
|
|
1924
|
+
const Ie = [Fe, _, He];
|
|
1925
|
+
function m(c, V) {
|
|
1926
|
+
const $ = U(c);
|
|
1927
|
+
return g.value.map((I, J) => Ie[I.type](I, $, J));
|
|
1939
1928
|
}
|
|
1940
|
-
function
|
|
1941
|
-
const
|
|
1942
|
-
return
|
|
1943
|
-
key:
|
|
1929
|
+
function j(c) {
|
|
1930
|
+
const V = U(c);
|
|
1931
|
+
return g.value.map(($) => Object.values($.data).filter((I) => V[I.field] && I.rowSpan > 1).map((I) => l("div", {
|
|
1932
|
+
key: B($, I.index),
|
|
1944
1933
|
class: "fv-grid-cell fv-grid-merged-cell",
|
|
1945
|
-
style:
|
|
1946
|
-
}, [
|
|
1934
|
+
style: W($, I, V)
|
|
1935
|
+
}, [I.data])));
|
|
1947
1936
|
}
|
|
1948
1937
|
function Q() {
|
|
1949
1938
|
return l("div", {
|
|
1950
1939
|
ref: a,
|
|
1951
|
-
class:
|
|
1940
|
+
class: ye
|
|
1952
1941
|
}, [l("div", {
|
|
1953
1942
|
class: "fv-grid-data",
|
|
1954
|
-
style:
|
|
1955
|
-
}, [
|
|
1943
|
+
style: De.value
|
|
1944
|
+
}, [m(q.value.leftColumns.filter((c) => c.visible))]), l("div", {
|
|
1956
1945
|
class: "fv-grid-merge-date",
|
|
1957
|
-
style:
|
|
1958
|
-
}, [
|
|
1946
|
+
style: Ae.value
|
|
1947
|
+
}, [j(q.value.leftColumns.filter((c) => c.visible))])]);
|
|
1959
1948
|
}
|
|
1960
|
-
function
|
|
1949
|
+
function ee() {
|
|
1961
1950
|
return l("div", {
|
|
1962
1951
|
ref: n,
|
|
1963
1952
|
class: "fv-grid-content-primary"
|
|
1964
1953
|
}, [l("div", {
|
|
1965
1954
|
class: "fv-grid-data",
|
|
1966
1955
|
style: Le.value
|
|
1967
|
-
}, [
|
|
1956
|
+
}, [m(q.value.primaryColumns.filter((c) => c.visible))]), l("div", {
|
|
1968
1957
|
class: "fv-grid-merge-date",
|
|
1969
|
-
style:
|
|
1970
|
-
}, [
|
|
1958
|
+
style: ke.value
|
|
1959
|
+
}, [j(q.value.primaryColumns.filter((c) => c.visible))])]);
|
|
1971
1960
|
}
|
|
1972
|
-
function
|
|
1961
|
+
function le() {
|
|
1973
1962
|
return l("div", {
|
|
1974
1963
|
ref: o,
|
|
1975
|
-
class:
|
|
1964
|
+
class: Me
|
|
1976
1965
|
}, [l("div", {
|
|
1977
1966
|
class: "fv-grid-data",
|
|
1978
1967
|
style: We.value
|
|
1979
|
-
}, [
|
|
1968
|
+
}, [m(q.value.rightColumns.filter((c) => c.visible))]), l("div", {
|
|
1980
1969
|
class: "fv-grid-merge-date",
|
|
1981
|
-
style:
|
|
1982
|
-
}, [
|
|
1970
|
+
style: we.value
|
|
1971
|
+
}, [j(q.value.rightColumns.filter((c) => c.visible))])]);
|
|
1983
1972
|
}
|
|
1984
|
-
function
|
|
1973
|
+
function nt() {
|
|
1985
1974
|
const c = [];
|
|
1986
|
-
return
|
|
1975
|
+
return oe.value && c.push(Q()), c.push(ee()), re.value && c.push(le()), c;
|
|
1987
1976
|
}
|
|
1988
1977
|
return {
|
|
1989
|
-
renderDataArea:
|
|
1978
|
+
renderDataArea: nt
|
|
1990
1979
|
};
|
|
1991
1980
|
}
|
|
1992
|
-
function
|
|
1993
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1981
|
+
function oo(e) {
|
|
1982
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Tt(e);
|
|
1994
1983
|
}
|
|
1995
|
-
const
|
|
1984
|
+
const Rt = /* @__PURE__ */ Se({
|
|
1996
1985
|
name: "FDataGrid",
|
|
1997
|
-
props:
|
|
1998
|
-
emits: ["changed", "clickRow", "doubleClickRow", "selectionChange", "unSelectItem", "selectItem", "enterUpInLastCell", "selectAll", "unSelectAll", "pageIndexChanged", "pageSizeChanged", "beginEditCell", "endEditCell", "filterChanged", "sortChanged", "selectionUpdate", "endEditRow"
|
|
1986
|
+
props: no,
|
|
1987
|
+
emits: ["changed", "clickRow", "doubleClickRow", "selectionChange", "unSelectItem", "selectItem", "enterUpInLastCell", "selectAll", "unSelectAll", "pageIndexChanged", "pageSizeChanged", "beginEditCell", "endEditCell", "filterChanged", "sortChanged", "selectionUpdate", "endEditRow"],
|
|
1999
1988
|
setup(e, t) {
|
|
2000
|
-
var
|
|
1989
|
+
var mt, ht;
|
|
2001
1990
|
const {
|
|
2002
1991
|
isMobilePhone: n
|
|
2003
|
-
} =
|
|
2004
|
-
|
|
2005
|
-
const a = 0, o =
|
|
2006
|
-
showLoading:
|
|
2007
|
-
renderLoading:
|
|
2008
|
-
} =
|
|
2009
|
-
shouldRenderPagination:
|
|
2010
|
-
} =
|
|
2011
|
-
showSelectAll:
|
|
2012
|
-
showSelection:
|
|
2013
|
-
selectedValues:
|
|
2014
|
-
updateSelectAllStatus:
|
|
2015
|
-
} =
|
|
2016
|
-
|
|
1992
|
+
} = $n();
|
|
1993
|
+
r();
|
|
1994
|
+
const a = 0, o = ((mt = e.rowOption) == null ? void 0 : mt.height) || 28, s = r(20), i = r(e.columns), u = Un(e), v = r(), f = r(), p = r(), w = r(), T = r(), h = r([]), g = r(!1), F = r(((ht = e.rowOption) == null ? void 0 : ht.wrapContent) || !1), E = Kn(e, u), P = _n(e, t), C = Yn(e), {
|
|
1995
|
+
showLoading: N,
|
|
1996
|
+
renderLoading: U
|
|
1997
|
+
} = qn(e, v), B = Xn(e, /* @__PURE__ */ new Map(), P, C, u), L = Jn(e, B), {
|
|
1998
|
+
shouldRenderPagination: b
|
|
1999
|
+
} = L, k = Zn(e, B, u, h, t), {
|
|
2000
|
+
showSelectAll: W,
|
|
2001
|
+
showSelection: K,
|
|
2002
|
+
selectedValues: O,
|
|
2003
|
+
updateSelectAllStatus: G
|
|
2004
|
+
} = k, se = y(() => e.disabled), X = y(() => e.virtualized ? Math.min(B.dataView.value.length, s.value) : B.dataView.value.length);
|
|
2005
|
+
y(() => e.loadingConfig.message);
|
|
2017
2006
|
const {
|
|
2018
|
-
containerStyleObject:
|
|
2019
|
-
} =
|
|
2020
|
-
applyCommands:
|
|
2021
|
-
} =
|
|
2022
|
-
|
|
2007
|
+
containerStyleObject: ue
|
|
2008
|
+
} = Qn(e), z = ea(e), {
|
|
2009
|
+
applyCommands: M
|
|
2010
|
+
} = z;
|
|
2011
|
+
M(i);
|
|
2023
2012
|
const {
|
|
2024
|
-
applyColumnSetting:
|
|
2025
|
-
removeColumnSetting:
|
|
2026
|
-
} =
|
|
2027
|
-
e.showSetting &&
|
|
2028
|
-
const
|
|
2029
|
-
applyColumnSorter:
|
|
2030
|
-
columnContext:
|
|
2031
|
-
updateColumnRenderContext:
|
|
2032
|
-
} =
|
|
2033
|
-
|
|
2034
|
-
const
|
|
2035
|
-
getVisualData:
|
|
2036
|
-
} =
|
|
2013
|
+
applyColumnSetting: d,
|
|
2014
|
+
removeColumnSetting: x
|
|
2015
|
+
} = ta(e);
|
|
2016
|
+
e.showSetting && d(i);
|
|
2017
|
+
const R = na(e, t), D = aa(e), {
|
|
2018
|
+
applyColumnSorter: A,
|
|
2019
|
+
columnContext: q,
|
|
2020
|
+
updateColumnRenderContext: oe
|
|
2021
|
+
} = R;
|
|
2022
|
+
A(B, D);
|
|
2023
|
+
const re = oa(e, q), de = la(e, t, k, u), te = sa(e, t, u, de, h), Te = ua(e), fe = ia(e, te, Te), ye = ra(e, B, te, C, u, Te, fe), Me = ca(e, u, fe, ye), Le = da(e, u, fe, ye), ke = fa(e, i, B, X, a, ye, Me, Le), {
|
|
2024
|
+
getVisualData: De
|
|
2025
|
+
} = ke, Ae = va(q), We = ma(e, q), we = ha(e, k), {
|
|
2037
2026
|
sidebarWidth: Ge,
|
|
2038
|
-
showSidebarCheckBox:
|
|
2039
|
-
} =
|
|
2040
|
-
onWheel:
|
|
2027
|
+
showSidebarCheckBox: $e
|
|
2028
|
+
} = we, _ = ga(e, B, h, q, ke, X, a, Ge, te), {
|
|
2029
|
+
onWheel: Oe,
|
|
2041
2030
|
dataGridWidth: He,
|
|
2042
2031
|
viewPortHeight: je,
|
|
2043
2032
|
viewPortWidth: xe,
|
|
2044
2033
|
resetScroll: ve,
|
|
2045
2034
|
updateVisibleRowsOnLatestVisibleScope: Ue
|
|
2046
|
-
} =
|
|
2047
|
-
calculateColumnsSize:
|
|
2048
|
-
} =
|
|
2049
|
-
const
|
|
2035
|
+
} = _, Fe = pa(e, q, f, xe, re), {
|
|
2036
|
+
calculateColumnsSize: Ie
|
|
2037
|
+
} = Fe, m = ya(), j = ba(f, T, B, m, _), Q = Ca(e, t, R, B, re, E, _), ee = y(() => {
|
|
2038
|
+
const S = {
|
|
2050
2039
|
"fv-grid": !0,
|
|
2051
2040
|
"fv-grid-bordered": e.showBorder,
|
|
2052
2041
|
"fv-grid-horizontal-bordered": e.showHorizontalLines,
|
|
2053
2042
|
"fv-datagrid-strip": e.showStripe
|
|
2054
2043
|
};
|
|
2055
|
-
return
|
|
2056
|
-
}),
|
|
2044
|
+
return Vn(S, e.customClass);
|
|
2045
|
+
}), le = y(() => ({
|
|
2057
2046
|
"fv-grid-content": !0,
|
|
2058
|
-
"fv-grid-content-hover":
|
|
2059
|
-
"fv-grid-wrap-content":
|
|
2060
|
-
})),
|
|
2061
|
-
const
|
|
2062
|
-
return
|
|
2047
|
+
"fv-grid-content-hover": g.value,
|
|
2048
|
+
"fv-grid-wrap-content": F.value
|
|
2049
|
+
})), nt = y(() => {
|
|
2050
|
+
const S = {};
|
|
2051
|
+
return _.shouldShowHorizontalScrollbar.value && (S.paddingBottom = "10px"), _.shouldShowVirticalScrollbar.value && (S.paddingRight = "10px"), S;
|
|
2063
2052
|
}), {
|
|
2064
2053
|
renderGridHeader: c,
|
|
2065
|
-
renderGridColumnResizeOverlay:
|
|
2054
|
+
renderGridColumnResizeOverlay: V,
|
|
2066
2055
|
shouldShowHeader: $
|
|
2067
|
-
} =
|
|
2068
|
-
renderDataGridPagination:
|
|
2069
|
-
} =
|
|
2070
|
-
renderDataGridSidebar:
|
|
2071
|
-
} =
|
|
2056
|
+
} = wa(e, t, f, w, T, R, B, Q, j, P, m, Fe, re, k, we, D, _, xe, h), {
|
|
2057
|
+
renderDataGridPagination: I
|
|
2058
|
+
} = xa(e, t, B, _, L, k), {
|
|
2059
|
+
renderDataGridSidebar: J
|
|
2060
|
+
} = Ba(e, de, k, we, _), {
|
|
2072
2061
|
renderDisableMask: Ve
|
|
2073
|
-
} =
|
|
2062
|
+
} = Sa(), {
|
|
2074
2063
|
renderDataGridSummary: Je
|
|
2075
|
-
} =
|
|
2076
|
-
renderHorizontalScrollbar:
|
|
2077
|
-
} =
|
|
2078
|
-
renderVerticalScrollbar:
|
|
2079
|
-
} =
|
|
2080
|
-
renderFilterPanel:
|
|
2081
|
-
} =
|
|
2082
|
-
renderGroupPanel:
|
|
2083
|
-
} =
|
|
2084
|
-
function
|
|
2085
|
-
var
|
|
2086
|
-
const
|
|
2087
|
-
|
|
2064
|
+
} = Ta(e, B, R), {
|
|
2065
|
+
renderHorizontalScrollbar: Ke
|
|
2066
|
+
} = Ma(e, f, _), {
|
|
2067
|
+
renderVerticalScrollbar: jt
|
|
2068
|
+
} = ka(e, f, _), {
|
|
2069
|
+
renderFilterPanel: Vt
|
|
2070
|
+
} = Oa(e, R, B, P, _), {
|
|
2071
|
+
renderGroupPanel: Nt
|
|
2072
|
+
} = Fa(e, B, Q, E, _);
|
|
2073
|
+
function zt() {
|
|
2074
|
+
var H, Y;
|
|
2075
|
+
const S = Math.ceil(f.value.clientHeight / o);
|
|
2076
|
+
S > s.value && (s.value = S, Ue()), je.value = ((H = p.value) == null ? void 0 : H.clientHeight) || 0, He.value = ((Y = f.value) == null ? void 0 : Y.clientWidth) || 0, Ie();
|
|
2088
2077
|
}
|
|
2089
2078
|
ze(() => {
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
var U;
|
|
2094
|
-
R.height = ((U = R.ref) == null ? void 0 : U.getBoundingClientRect().height) || 0, R.raw.__fv_data_height__ = R.height, we.updateRowPosition(R, R.raw);
|
|
2095
|
-
});
|
|
2096
|
-
})), _.value && H();
|
|
2079
|
+
f.value && (s.value = Math.max(Math.ceil(f.value.clientHeight / o), s.value), h.value = De(0, X.value + a - 1), Wn(f.value, zt), Ie(), Ne(() => {
|
|
2080
|
+
f.value && (He.value = f.value.clientWidth), p.value && (xe.value = p.value.clientWidth, je.value = p.value.clientHeight);
|
|
2081
|
+
})), N.value && U();
|
|
2097
2082
|
}), Xe(() => {
|
|
2098
|
-
}),
|
|
2083
|
+
}), Z(xe, () => {
|
|
2099
2084
|
});
|
|
2100
|
-
function
|
|
2101
|
-
const
|
|
2102
|
-
return ve(),
|
|
2085
|
+
function Lt() {
|
|
2086
|
+
const S = B.insertNewDataItem();
|
|
2087
|
+
return ve(), S;
|
|
2103
2088
|
}
|
|
2104
|
-
function
|
|
2105
|
-
const
|
|
2106
|
-
return ve(),
|
|
2089
|
+
function At() {
|
|
2090
|
+
const S = B.insertNewDataItem(h.value.length);
|
|
2091
|
+
return ve(), S;
|
|
2107
2092
|
}
|
|
2108
|
-
function
|
|
2109
|
-
|
|
2093
|
+
function Wt(S) {
|
|
2094
|
+
te.onEditingRow(S);
|
|
2110
2095
|
}
|
|
2111
|
-
function
|
|
2112
|
-
|
|
2096
|
+
function Gt(S) {
|
|
2097
|
+
B.removeDataItem(S), ve();
|
|
2113
2098
|
}
|
|
2114
|
-
function
|
|
2115
|
-
|
|
2099
|
+
function $t(S) {
|
|
2100
|
+
B.removeDataItemById(S), ve();
|
|
2116
2101
|
}
|
|
2117
|
-
function
|
|
2118
|
-
|
|
2102
|
+
function Ut(S) {
|
|
2103
|
+
te.acceptEditingRow(S);
|
|
2119
2104
|
}
|
|
2120
|
-
function Kt(
|
|
2121
|
-
|
|
2105
|
+
function Kt(S) {
|
|
2106
|
+
te.cancelEditingRow(S);
|
|
2122
2107
|
}
|
|
2123
|
-
function
|
|
2124
|
-
|
|
2125
|
-
const
|
|
2126
|
-
|
|
2127
|
-
|
|
2108
|
+
function _t(S) {
|
|
2109
|
+
h.value.forEach((H, Y) => {
|
|
2110
|
+
const ae = B.visibleDataItems.value.findIndex((ie) => ie === H.raw), ce = h.value[Y - 1];
|
|
2111
|
+
S.forEach((ie) => {
|
|
2112
|
+
H.data[ie.field] ? fe.updateCellByColumn(H.data[ie.field], ie, ce, H.raw) : H.data[ie.field] = fe.createCellByColumn(ie, ae, H.raw, H, ce);
|
|
2128
2113
|
});
|
|
2129
2114
|
});
|
|
2130
2115
|
}
|
|
2131
|
-
function
|
|
2132
|
-
|
|
2116
|
+
function at(S) {
|
|
2117
|
+
S && (i.value = S, _t(i.value), M(i), e.showSetting && d(i), oe(i.value), A(B, D), Ie());
|
|
2133
2118
|
}
|
|
2134
|
-
function
|
|
2135
|
-
|
|
2119
|
+
function Yt() {
|
|
2120
|
+
k.emptyCurrentRowId();
|
|
2136
2121
|
}
|
|
2137
|
-
|
|
2138
|
-
|
|
2122
|
+
Z(() => e.showSetting, (S, H) => {
|
|
2123
|
+
S !== H && at(i.value);
|
|
2139
2124
|
});
|
|
2140
|
-
function
|
|
2141
|
-
|
|
2125
|
+
function dt(S) {
|
|
2126
|
+
L.updatePagination(S);
|
|
2142
2127
|
}
|
|
2143
|
-
function
|
|
2144
|
-
|
|
2128
|
+
function qt(S, H) {
|
|
2129
|
+
S && (B.load(S), h.value = De(0, X.value + a - 1), H != null && H.keepScrollTop ? _.scrollTo(_.offsetY.value) : ve(), h.value.length || (O.value = []), $e.value && W.value && G()), te.clear();
|
|
2145
2130
|
}
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
}),
|
|
2149
|
-
|
|
2131
|
+
Z(B.shouldGroupingData, (S, H) => {
|
|
2132
|
+
S !== H && (B.updateDataView(), ve());
|
|
2133
|
+
}), Z(() => e.columns, (S) => {
|
|
2134
|
+
at(S);
|
|
2150
2135
|
});
|
|
2151
|
-
function
|
|
2152
|
-
|
|
2136
|
+
function ot(S) {
|
|
2137
|
+
de.activeRowById(S);
|
|
2153
2138
|
}
|
|
2154
|
-
function
|
|
2139
|
+
function Xt(S, H = {
|
|
2155
2140
|
isCurrent: !0
|
|
2156
2141
|
}) {
|
|
2157
|
-
|
|
2142
|
+
H != null && H.isCurrent && ot(S), k.selectItemById(S);
|
|
2158
2143
|
}
|
|
2159
|
-
function
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2144
|
+
function Jt(S) {
|
|
2145
|
+
const H = u.idField.value, Y = h.value.find((ae) => ae.raw[H] === S);
|
|
2146
|
+
Y && de.clickRowItem(Y);
|
|
2162
2147
|
}
|
|
2163
|
-
function
|
|
2164
|
-
const
|
|
2165
|
-
|
|
2148
|
+
function Zt(S) {
|
|
2149
|
+
const H = u.idField.value, Y = h.value.find((ae) => ae.raw[H] === S);
|
|
2150
|
+
Y && de.changeRow(Y);
|
|
2166
2151
|
}
|
|
2167
|
-
function
|
|
2168
|
-
|
|
2152
|
+
function Qt(S) {
|
|
2153
|
+
k.selectItemByIds(S);
|
|
2169
2154
|
}
|
|
2170
|
-
function
|
|
2171
|
-
return
|
|
2155
|
+
function en() {
|
|
2156
|
+
return h.value;
|
|
2172
2157
|
}
|
|
2173
|
-
function
|
|
2174
|
-
return
|
|
2158
|
+
function tn(S) {
|
|
2159
|
+
return h.value.filter((H) => S.includes(H.raw[e.idField]));
|
|
2160
|
+
}
|
|
2161
|
+
function nn() {
|
|
2162
|
+
return k.getSelectedItems();
|
|
2175
2163
|
}
|
|
2176
2164
|
function an() {
|
|
2177
|
-
return
|
|
2165
|
+
return k.getSelectionRow();
|
|
2178
2166
|
}
|
|
2179
2167
|
function on() {
|
|
2180
|
-
|
|
2181
|
-
}
|
|
2182
|
-
function ln() {
|
|
2183
|
-
ee.endEditCell();
|
|
2168
|
+
te.endEditCell();
|
|
2184
2169
|
}
|
|
2185
|
-
function
|
|
2170
|
+
function ln(S, H = {
|
|
2186
2171
|
clearCurrent: !0
|
|
2187
2172
|
}) {
|
|
2188
|
-
|
|
2173
|
+
H != null && H.clearCurrent && ot(""), k.unSelectItemByIds(S);
|
|
2189
2174
|
}
|
|
2190
|
-
function
|
|
2191
|
-
|
|
2175
|
+
function ft() {
|
|
2176
|
+
k.clearSelection();
|
|
2192
2177
|
}
|
|
2193
2178
|
function sn() {
|
|
2194
|
-
return
|
|
2179
|
+
return k.currentSelectedDataId.value;
|
|
2195
2180
|
}
|
|
2196
|
-
function
|
|
2197
|
-
|
|
2181
|
+
function un() {
|
|
2182
|
+
_.scrollToBottom();
|
|
2198
2183
|
}
|
|
2199
|
-
function
|
|
2200
|
-
|
|
2184
|
+
function rn(S) {
|
|
2185
|
+
_.scrollToRowByIndex(S);
|
|
2201
2186
|
}
|
|
2202
|
-
function
|
|
2203
|
-
|
|
2204
|
-
total:
|
|
2187
|
+
function cn() {
|
|
2188
|
+
k.keepSelectingOnPaging.value || ft(), B.updateVisibleDataSummary(h.value), dt({
|
|
2189
|
+
total: B.dataView.value.length,
|
|
2205
2190
|
index: 1
|
|
2206
2191
|
});
|
|
2207
2192
|
}
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
addNewDataItem: At,
|
|
2218
|
-
addNewDataItemAtLast: Wt,
|
|
2219
|
-
removeDataItem: $t,
|
|
2220
|
-
removeDataItemById: Ut,
|
|
2221
|
-
editDataItem: Gt,
|
|
2222
|
-
acceptDataItem: _t,
|
|
2193
|
+
const vt = {
|
|
2194
|
+
activeRowById: ot,
|
|
2195
|
+
selectRowById: Zt,
|
|
2196
|
+
addNewDataItem: Lt,
|
|
2197
|
+
addNewDataItemAtLast: At,
|
|
2198
|
+
removeDataItem: Gt,
|
|
2199
|
+
removeDataItemById: $t,
|
|
2200
|
+
editDataItem: Wt,
|
|
2201
|
+
acceptDataItem: Ut,
|
|
2223
2202
|
cancelDataItem: Kt,
|
|
2224
|
-
selectItemById:
|
|
2225
|
-
selectItemByIds:
|
|
2226
|
-
updateColumns:
|
|
2227
|
-
updateDataSource:
|
|
2228
|
-
updatePagination:
|
|
2229
|
-
getVisibleData:
|
|
2230
|
-
getVisibleDataByIds:
|
|
2231
|
-
getSelectedItems:
|
|
2232
|
-
getSelectionRow:
|
|
2203
|
+
selectItemById: Xt,
|
|
2204
|
+
selectItemByIds: Qt,
|
|
2205
|
+
updateColumns: at,
|
|
2206
|
+
updateDataSource: qt,
|
|
2207
|
+
updatePagination: dt,
|
|
2208
|
+
getVisibleData: en,
|
|
2209
|
+
getVisibleDataByIds: tn,
|
|
2210
|
+
getSelectedItems: nn,
|
|
2211
|
+
getSelectionRow: an,
|
|
2233
2212
|
getCurrentRowId: sn,
|
|
2234
|
-
endEditCell:
|
|
2235
|
-
clickRowItemById:
|
|
2236
|
-
clearSelection:
|
|
2237
|
-
unSelectItemByIds:
|
|
2238
|
-
scrollToBottom:
|
|
2239
|
-
scrollToRowByIndex:
|
|
2240
|
-
updateDerivedData:
|
|
2241
|
-
emptyCurrentRowId:
|
|
2242
|
-
updateSelectedValues: fn,
|
|
2243
|
-
removeSelectedValues: vn
|
|
2213
|
+
endEditCell: on,
|
|
2214
|
+
clickRowItemById: Jt,
|
|
2215
|
+
clearSelection: ft,
|
|
2216
|
+
unSelectItemByIds: ln,
|
|
2217
|
+
scrollToBottom: un,
|
|
2218
|
+
scrollToRowByIndex: rn,
|
|
2219
|
+
updateDerivedData: cn,
|
|
2220
|
+
emptyCurrentRowId: Yt
|
|
2244
2221
|
};
|
|
2245
|
-
t.expose(
|
|
2246
|
-
const
|
|
2247
|
-
renderDataArea:
|
|
2248
|
-
} =
|
|
2249
|
-
renderEmpty:
|
|
2250
|
-
} =
|
|
2222
|
+
t.expose(vt);
|
|
2223
|
+
const dn = Ia(e, t, vt, R, te, h), {
|
|
2224
|
+
renderDataArea: fn
|
|
2225
|
+
} = ao(e, t, p, w, T, Ae, We, R, te, E, dn, de, ke, _, h, B), vn = y(() => !h.value || !h.value.length), {
|
|
2226
|
+
renderEmpty: mn
|
|
2227
|
+
} = Ea(e, t), hn = y(() => ({
|
|
2251
2228
|
"d-flex": !0,
|
|
2252
|
-
"justify-content-between":
|
|
2253
|
-
"justify-content-end":
|
|
2229
|
+
"justify-content-between": b.value && K.value,
|
|
2230
|
+
"justify-content-end": b.value && !K.value,
|
|
2254
2231
|
"position-relative": !0,
|
|
2255
2232
|
"fv-datagrid-pagination": !0
|
|
2256
|
-
})),
|
|
2233
|
+
})), gn = y(() => ({
|
|
2257
2234
|
"flex-direction": "row"
|
|
2258
|
-
})),
|
|
2235
|
+
})), pn = y(() => ({
|
|
2259
2236
|
"d-flex": !0,
|
|
2260
2237
|
"align-items-center": !0
|
|
2261
2238
|
}));
|
|
2262
|
-
|
|
2263
|
-
useColumnComposition:
|
|
2264
|
-
dataView:
|
|
2265
|
-
useFilterComposition:
|
|
2266
|
-
useFitColumnComposition:
|
|
2267
|
-
useSortComposition:
|
|
2268
|
-
useVirtualScrollComposition:
|
|
2239
|
+
Rn("dataGridContext", {
|
|
2240
|
+
useColumnComposition: R,
|
|
2241
|
+
dataView: B,
|
|
2242
|
+
useFilterComposition: P,
|
|
2243
|
+
useFitColumnComposition: Fe,
|
|
2244
|
+
useSortComposition: D,
|
|
2245
|
+
useVirtualScrollComposition: _
|
|
2269
2246
|
});
|
|
2270
|
-
function
|
|
2271
|
-
let
|
|
2272
|
-
return l(
|
|
2247
|
+
function yn(S) {
|
|
2248
|
+
let H;
|
|
2249
|
+
return l(Ra, {
|
|
2273
2250
|
class: "f-form-layout farris-form farris-form-controls-inline col-12 col-md-6 col-xl-3 col-el-2"
|
|
2274
|
-
},
|
|
2275
|
-
var
|
|
2276
|
-
return ((
|
|
2277
|
-
}).map((
|
|
2251
|
+
}, oo(H = Object.keys(S.data).filter((Y) => {
|
|
2252
|
+
var ae, ce;
|
|
2253
|
+
return ((ae = S.data[Y].column) == null ? void 0 : ae.dataType) !== Ct && ((ce = S.data[Y].column) == null ? void 0 : ce.dataType) !== wt;
|
|
2254
|
+
}).map((Y) => {
|
|
2278
2255
|
var ce, ie;
|
|
2279
|
-
const
|
|
2256
|
+
const ae = S.data[Y];
|
|
2280
2257
|
return l("div", {
|
|
2281
2258
|
class: "farris-group-wrap w-100"
|
|
2282
2259
|
}, [l("div", {
|
|
2283
2260
|
class: "form-group farris-form-group common-group"
|
|
2284
|
-
}, [l(
|
|
2285
|
-
text: (ce =
|
|
2286
|
-
title: (ie =
|
|
2261
|
+
}, [l(Da, {
|
|
2262
|
+
text: (ce = ae.column) == null ? void 0 : ce.title,
|
|
2263
|
+
title: (ie = ae.column) == null ? void 0 : ie.title
|
|
2287
2264
|
}, null), l("div", {
|
|
2288
2265
|
class: "farris-input-wrap"
|
|
2289
|
-
}, [
|
|
2290
|
-
})) ?
|
|
2291
|
-
default: () => [
|
|
2266
|
+
}, [ae.getEditor(ae)])])]);
|
|
2267
|
+
})) ? H : {
|
|
2268
|
+
default: () => [H]
|
|
2292
2269
|
});
|
|
2293
2270
|
}
|
|
2294
|
-
function
|
|
2295
|
-
const
|
|
2296
|
-
Object.keys(
|
|
2297
|
-
var
|
|
2298
|
-
return ((
|
|
2299
|
-
}).forEach((
|
|
2300
|
-
var
|
|
2301
|
-
const
|
|
2302
|
-
|
|
2271
|
+
function bn(S, H) {
|
|
2272
|
+
const Y = {}, ae = {}, ce = [], ie = [], gt = {};
|
|
2273
|
+
Object.keys(H.data).filter((Ee) => {
|
|
2274
|
+
var be, _e;
|
|
2275
|
+
return ((be = H.data[Ee].column) == null ? void 0 : be.dataType) !== Ct && ((_e = H.data[Ee].column) == null ? void 0 : _e.dataType) !== wt;
|
|
2276
|
+
}).forEach((Ee) => {
|
|
2277
|
+
var _e, pt, yt;
|
|
2278
|
+
const be = H.data[Ee];
|
|
2279
|
+
Y[Ee] = be.data, te.endEditByCell(be), ae[Ee] = be.data, ce.push(be.column), ie.push(be), gt[Ee] = (yt = (pt = (_e = be.column) == null ? void 0 : _e.editor) == null ? void 0 : pt.context) == null ? void 0 : yt.editor;
|
|
2303
2280
|
}), t.emit("endEditRow", {
|
|
2304
|
-
row:
|
|
2281
|
+
row: H,
|
|
2305
2282
|
cells: ie,
|
|
2306
2283
|
columns: ce,
|
|
2307
|
-
oldValues:
|
|
2308
|
-
newValues:
|
|
2309
|
-
editors:
|
|
2310
|
-
}),
|
|
2311
|
-
}
|
|
2312
|
-
function
|
|
2313
|
-
const
|
|
2314
|
-
return
|
|
2284
|
+
oldValues: Y,
|
|
2285
|
+
newValues: ae,
|
|
2286
|
+
editors: gt
|
|
2287
|
+
}), te.showRowEditPanel.value = !1;
|
|
2288
|
+
}
|
|
2289
|
+
function Cn() {
|
|
2290
|
+
const S = k.currentSelectedDataId.value, H = h.value.find((Y) => Y.raw[e.idField] === S);
|
|
2291
|
+
return H ? l(Pa, {
|
|
2315
2292
|
showHeader: !1,
|
|
2316
|
-
modelValue:
|
|
2317
|
-
"onUpdate:modelValue": (
|
|
2293
|
+
modelValue: te.showRowEditPanel.value,
|
|
2294
|
+
"onUpdate:modelValue": (Y) => te.showRowEditPanel.value = Y,
|
|
2318
2295
|
width: 600
|
|
2319
2296
|
}, {
|
|
2320
|
-
default: () =>
|
|
2321
|
-
footerTemplate: () => l(
|
|
2297
|
+
default: () => yn(H),
|
|
2298
|
+
footerTemplate: () => l(pe, null, [l(xt, {
|
|
2322
2299
|
class: "mr-3",
|
|
2323
2300
|
type: "secondary",
|
|
2324
|
-
onClick: (
|
|
2325
|
-
|
|
2301
|
+
onClick: (Y) => {
|
|
2302
|
+
te.showRowEditPanel.value = !1;
|
|
2326
2303
|
}
|
|
2327
2304
|
}, {
|
|
2328
2305
|
default: () => [Be("取消")]
|
|
2329
|
-
}), l(
|
|
2330
|
-
onClick: (
|
|
2331
|
-
|
|
2306
|
+
}), l(xt, {
|
|
2307
|
+
onClick: (Y) => {
|
|
2308
|
+
bn(Y, H);
|
|
2332
2309
|
}
|
|
2333
2310
|
}, {
|
|
2334
2311
|
default: () => [Be("确定")]
|
|
2335
2312
|
})])
|
|
2336
2313
|
}) : null;
|
|
2337
2314
|
}
|
|
2338
|
-
return () => l(
|
|
2339
|
-
ref:
|
|
2340
|
-
class:
|
|
2341
|
-
style:
|
|
2342
|
-
onWheel:
|
|
2343
|
-
}, [
|
|
2344
|
-
ref:
|
|
2345
|
-
class:
|
|
2346
|
-
style:
|
|
2347
|
-
onTouchstart: (
|
|
2348
|
-
|
|
2315
|
+
return () => l(pe, null, [l("div", {
|
|
2316
|
+
ref: v,
|
|
2317
|
+
class: ee.value,
|
|
2318
|
+
style: ue.value,
|
|
2319
|
+
onWheel: Oe
|
|
2320
|
+
}, [f.value && e.enableFilter && Vt(), f.value && Nt(), f.value && $.value && c(), l("div", {
|
|
2321
|
+
ref: f,
|
|
2322
|
+
class: le.value,
|
|
2323
|
+
style: nt.value,
|
|
2324
|
+
onTouchstart: (S) => {
|
|
2325
|
+
S.stopPropagation(), g.value = !0, _.onTouchstartScrollThumb(S, f);
|
|
2349
2326
|
},
|
|
2350
|
-
onTouchend: (
|
|
2351
|
-
|
|
2327
|
+
onTouchend: (S) => {
|
|
2328
|
+
g.value = !1;
|
|
2352
2329
|
},
|
|
2353
|
-
onMouseover: (
|
|
2354
|
-
|
|
2330
|
+
onMouseover: (S) => {
|
|
2331
|
+
S.stopPropagation(), g.value = !0;
|
|
2355
2332
|
},
|
|
2356
|
-
onMouseleave: (
|
|
2357
|
-
|
|
2333
|
+
onMouseleave: (S) => {
|
|
2334
|
+
S.stopPropagation(), g.value = !1;
|
|
2358
2335
|
}
|
|
2359
|
-
}, [
|
|
2360
|
-
class:
|
|
2361
|
-
style:
|
|
2362
|
-
}, [
|
|
2363
|
-
class:
|
|
2364
|
-
}, [l("div", null, ["已选:" +
|
|
2336
|
+
}, [f.value && J(h), f.value && fn(), f.value && vn.value && mn(), f.value && Ke(), f.value && jt()]), f.value && Je(), (b.value || K.value) && l("div", {
|
|
2337
|
+
class: hn.value,
|
|
2338
|
+
style: gn.value
|
|
2339
|
+
}, [K.value && l("div", {
|
|
2340
|
+
class: pn.value
|
|
2341
|
+
}, [l("div", null, ["已选:" + O.value.length, Be(" 条")])]), b.value && I()]), V(), se.value && Ve()]), n() && Cn()]);
|
|
2365
2342
|
}
|
|
2366
2343
|
});
|
|
2367
|
-
|
|
2368
|
-
const
|
|
2344
|
+
Mt(Rt);
|
|
2345
|
+
const lo = {
|
|
2369
2346
|
width: { Type: Number, default: 400 },
|
|
2370
2347
|
type: { Type: String, default: "info" },
|
|
2371
2348
|
title: { Type: String, default: "" },
|
|
@@ -2378,15 +2355,15 @@ const io = {
|
|
|
2378
2355
|
promptEditorType: { Type: String, default: "text-area" },
|
|
2379
2356
|
buttons: { type: Object, default: [] }
|
|
2380
2357
|
};
|
|
2381
|
-
function
|
|
2358
|
+
function ct() {
|
|
2382
2359
|
return new DOMException("The request is not allowed", "NotAllowedError");
|
|
2383
2360
|
}
|
|
2384
|
-
async function
|
|
2361
|
+
async function so(e) {
|
|
2385
2362
|
if (!navigator.clipboard)
|
|
2386
|
-
throw
|
|
2363
|
+
throw ct();
|
|
2387
2364
|
return navigator.clipboard.writeText(e);
|
|
2388
2365
|
}
|
|
2389
|
-
async function
|
|
2366
|
+
async function uo(e) {
|
|
2390
2367
|
const t = document.createElement("span");
|
|
2391
2368
|
t.textContent = e, t.style.whiteSpace = "pre", t.style.webkitUserSelect = "auto", t.style.userSelect = "all", document.body.appendChild(t);
|
|
2392
2369
|
const n = window.getSelection(), a = window.document.createRange();
|
|
@@ -2398,61 +2375,61 @@ async function co(e) {
|
|
|
2398
2375
|
n == null || n.removeAllRanges(), window.document.body.removeChild(t);
|
|
2399
2376
|
}
|
|
2400
2377
|
if (!o)
|
|
2401
|
-
throw
|
|
2378
|
+
throw ct();
|
|
2402
2379
|
}
|
|
2403
|
-
async function
|
|
2380
|
+
async function io(e) {
|
|
2404
2381
|
try {
|
|
2405
|
-
await
|
|
2382
|
+
await so(e);
|
|
2406
2383
|
} catch (t) {
|
|
2407
2384
|
try {
|
|
2408
|
-
await
|
|
2385
|
+
await uo(e);
|
|
2409
2386
|
} catch (n) {
|
|
2410
|
-
throw n || t ||
|
|
2387
|
+
throw n || t || ct();
|
|
2411
2388
|
}
|
|
2412
2389
|
}
|
|
2413
2390
|
}
|
|
2414
|
-
function
|
|
2391
|
+
function ro() {
|
|
2415
2392
|
async function e(t) {
|
|
2416
|
-
await
|
|
2393
|
+
await io(t);
|
|
2417
2394
|
}
|
|
2418
2395
|
return { onCopy: e };
|
|
2419
2396
|
}
|
|
2420
|
-
function
|
|
2421
|
-
const o =
|
|
2397
|
+
function co(e, t, n, a) {
|
|
2398
|
+
const o = r(14), s = r(140), i = r(""), u = r(a.value.length), v = y(() => a.value), f = y(() => ({
|
|
2422
2399
|
"font-size": `${o.value}px`,
|
|
2423
2400
|
height: "100%"
|
|
2424
2401
|
}));
|
|
2425
|
-
function
|
|
2426
|
-
if (
|
|
2427
|
-
const
|
|
2428
|
-
|
|
2402
|
+
function p(w) {
|
|
2403
|
+
if (w.currentTarget) {
|
|
2404
|
+
const T = w.currentTarget.value || "";
|
|
2405
|
+
u.value = T.length;
|
|
2429
2406
|
}
|
|
2430
2407
|
}
|
|
2431
|
-
return () => l(
|
|
2408
|
+
return () => l(pe, null, [l("textarea", {
|
|
2432
2409
|
title: "promptMessage",
|
|
2433
2410
|
name: "promptMessage",
|
|
2434
2411
|
class: "form-control",
|
|
2435
|
-
style:
|
|
2412
|
+
style: f.value,
|
|
2436
2413
|
rows: "4",
|
|
2437
|
-
maxlength:
|
|
2438
|
-
onInput: (
|
|
2439
|
-
}, [
|
|
2414
|
+
maxlength: s.value,
|
|
2415
|
+
onInput: (w) => p(w)
|
|
2416
|
+
}, [v.value]), l("span", {
|
|
2440
2417
|
class: "textarea-wordcount",
|
|
2441
|
-
title:
|
|
2418
|
+
title: i.value,
|
|
2442
2419
|
style: "position: absolute; bottom: 76px; right: 32px; cursor: pointer; text-align: right;"
|
|
2443
|
-
}, [
|
|
2420
|
+
}, [u.value + " / " + s.value])]);
|
|
2444
2421
|
}
|
|
2445
|
-
function
|
|
2446
|
-
const o =
|
|
2447
|
-
function
|
|
2448
|
-
return
|
|
2422
|
+
function fo(e, t, n, a) {
|
|
2423
|
+
const o = co(e, t, n, a), s = /* @__PURE__ */ new Map([["text-area", o]]);
|
|
2424
|
+
function i(u) {
|
|
2425
|
+
return s.get(u) || null;
|
|
2449
2426
|
}
|
|
2450
|
-
return { getEditorRender:
|
|
2427
|
+
return { getEditorRender: i };
|
|
2451
2428
|
}
|
|
2452
|
-
function
|
|
2453
|
-
const e =
|
|
2429
|
+
function vo() {
|
|
2430
|
+
const e = r(!1), t = r("复制成功");
|
|
2454
2431
|
return {
|
|
2455
|
-
feedbackStyle:
|
|
2432
|
+
feedbackStyle: y(() => {
|
|
2456
2433
|
const a = {
|
|
2457
2434
|
position: "absolute",
|
|
2458
2435
|
left: "50%",
|
|
@@ -2476,153 +2453,153 @@ function go() {
|
|
|
2476
2453
|
toShowFeedback: e
|
|
2477
2454
|
};
|
|
2478
2455
|
}
|
|
2479
|
-
function
|
|
2456
|
+
function mo(e, t) {
|
|
2480
2457
|
const n = t.getEditorRender(e.promptEditorType);
|
|
2481
2458
|
return () => n && n();
|
|
2482
2459
|
}
|
|
2483
|
-
function
|
|
2484
|
-
function n(
|
|
2485
|
-
if (
|
|
2460
|
+
function ho(e, t) {
|
|
2461
|
+
function n(h) {
|
|
2462
|
+
if (h == null)
|
|
2486
2463
|
return 0;
|
|
2487
|
-
let
|
|
2488
|
-
for (let
|
|
2489
|
-
const
|
|
2490
|
-
|
|
2491
|
-
}
|
|
2492
|
-
return
|
|
2493
|
-
}
|
|
2494
|
-
function a(
|
|
2495
|
-
if (
|
|
2496
|
-
|
|
2497
|
-
const
|
|
2498
|
-
let
|
|
2499
|
-
for (let
|
|
2500
|
-
const
|
|
2501
|
-
if (
|
|
2502
|
-
return
|
|
2464
|
+
let g = 0;
|
|
2465
|
+
for (let F = 0; F < h.length; F++) {
|
|
2466
|
+
const E = h.charCodeAt(F);
|
|
2467
|
+
E >= 0 && E <= 128 ? g++ : g = g + 2;
|
|
2468
|
+
}
|
|
2469
|
+
return g;
|
|
2470
|
+
}
|
|
2471
|
+
function a(h, g) {
|
|
2472
|
+
if (h !== "" && h !== void 0 && h !== null) {
|
|
2473
|
+
h = "" + h;
|
|
2474
|
+
const F = h.length;
|
|
2475
|
+
let E = "", P = 0;
|
|
2476
|
+
for (let C = 0; C < F; C++) {
|
|
2477
|
+
const N = h.charAt(C);
|
|
2478
|
+
if (P++, encodeURI(N).length > 4 && P++, E = E.concat(N), P >= g)
|
|
2479
|
+
return E = E.concat("..."), E;
|
|
2503
2480
|
}
|
|
2504
|
-
if (
|
|
2505
|
-
return
|
|
2481
|
+
if (P < g)
|
|
2482
|
+
return h;
|
|
2506
2483
|
}
|
|
2507
2484
|
return "";
|
|
2508
2485
|
}
|
|
2509
|
-
const o =
|
|
2510
|
-
const
|
|
2511
|
-
return `${t.exception.happend} : ${
|
|
2512
|
-
}),
|
|
2513
|
-
const
|
|
2514
|
-
return
|
|
2515
|
-
}),
|
|
2516
|
-
bottom:
|
|
2486
|
+
const o = y(() => !!e.value && !!e.value.date), s = y(() => {
|
|
2487
|
+
const h = e.value && e.value.date || "";
|
|
2488
|
+
return `${t.exception.happend} : ${h}`;
|
|
2489
|
+
}), i = y(() => !!e.value && !!e.value.detail), u = y(() => e.value ? n(e.value.detail) > 160 : !1), v = r(!1), f = y(() => v.value ? t.exception.collapse : t.exception.expand), p = y(() => {
|
|
2490
|
+
const h = t.exception.detail + " : " + (e.value && e.value.detail) || "";
|
|
2491
|
+
return v.value ? h : a(h, 160);
|
|
2492
|
+
}), w = y(() => ({
|
|
2493
|
+
bottom: v.value ? 0 : "2px"
|
|
2517
2494
|
}));
|
|
2518
|
-
function
|
|
2519
|
-
|
|
2495
|
+
function T() {
|
|
2496
|
+
v.value = !v.value;
|
|
2520
2497
|
}
|
|
2521
2498
|
return () => l("div", {
|
|
2522
2499
|
class: "toast-msg-detail",
|
|
2523
2500
|
style: "max-height: calc(100vh - 200px);overflow: auto;"
|
|
2524
|
-
}, [o.value && l("div", null, [
|
|
2501
|
+
}, [o.value && l("div", null, [s.value]), i.value && l("div", {
|
|
2525
2502
|
class: "exception_wrap"
|
|
2526
2503
|
}, [l("div", {
|
|
2527
2504
|
class: "exception_error_msg"
|
|
2528
2505
|
}, [l("div", {
|
|
2529
|
-
innerHTML:
|
|
2530
|
-
}, null),
|
|
2506
|
+
innerHTML: p.value
|
|
2507
|
+
}, null), u.value && l("span", {
|
|
2531
2508
|
class: "exception_toggle_detail",
|
|
2532
|
-
style:
|
|
2533
|
-
onClick:
|
|
2534
|
-
}, [
|
|
2509
|
+
style: w.value,
|
|
2510
|
+
onClick: T
|
|
2511
|
+
}, [f.value])])])]);
|
|
2535
2512
|
}
|
|
2536
|
-
function
|
|
2513
|
+
function go(e) {
|
|
2537
2514
|
return () => l("p", {
|
|
2538
2515
|
class: "toast-msg-detail",
|
|
2539
2516
|
innerHTML: e.value,
|
|
2540
2517
|
style: "max-height: calc(100vh - 200px);overflow: auto;"
|
|
2541
2518
|
}, null);
|
|
2542
2519
|
}
|
|
2543
|
-
function
|
|
2544
|
-
const
|
|
2545
|
-
const
|
|
2520
|
+
function po(e, t, n, a, o) {
|
|
2521
|
+
const s = r(e.exceptionInfo), i = y(() => {
|
|
2522
|
+
const g = t.value === "question" ? "warning" : t.value, F = {
|
|
2546
2523
|
"f-icon": !0
|
|
2547
|
-
},
|
|
2548
|
-
return
|
|
2549
|
-
}),
|
|
2550
|
-
function
|
|
2551
|
-
return
|
|
2524
|
+
}, E = `f-icon-${g}`;
|
|
2525
|
+
return F[E] = !0, F;
|
|
2526
|
+
}), u = y(() => n.value || s.value && s.value.message), v = y(() => a.value), f = y(() => !!a.value), p = y(() => !!s.value);
|
|
2527
|
+
function w() {
|
|
2528
|
+
return p.value ? ho(s, o) : f.value ? go(v) : () => null;
|
|
2552
2529
|
}
|
|
2553
|
-
const
|
|
2530
|
+
const T = w(), h = y(() => o.locale === "en" ? {
|
|
2554
2531
|
wordBreak: "keep-all",
|
|
2555
2532
|
overflowWrap: "break-word"
|
|
2556
2533
|
} : {});
|
|
2557
|
-
return () => l(
|
|
2534
|
+
return () => l(pe, null, [l("div", {
|
|
2558
2535
|
class: "float-left modal-tips-iconwrap"
|
|
2559
2536
|
}, [l("span", {
|
|
2560
|
-
class:
|
|
2537
|
+
class: i.value
|
|
2561
2538
|
}, null)]), l("div", {
|
|
2562
2539
|
class: "modal-tips-content"
|
|
2563
2540
|
}, [l("p", {
|
|
2564
2541
|
class: "toast-msg-title",
|
|
2565
|
-
innerHTML:
|
|
2566
|
-
style:
|
|
2567
|
-
}, null),
|
|
2542
|
+
innerHTML: u.value,
|
|
2543
|
+
style: h.value
|
|
2544
|
+
}, null), T()])]);
|
|
2568
2545
|
}
|
|
2569
|
-
function
|
|
2546
|
+
function yo(e, t, n, a) {
|
|
2570
2547
|
const {
|
|
2571
2548
|
onCopy: o
|
|
2572
2549
|
} = t, {
|
|
2573
|
-
toShowFeedback:
|
|
2574
|
-
} = n,
|
|
2550
|
+
toShowFeedback: s
|
|
2551
|
+
} = n, i = r(a.exception.copySuccess || "复制成功"), u = r(a.exception.copy || "复制详细信息"), v = r(e.exceptionInfo || {
|
|
2575
2552
|
date: "",
|
|
2576
2553
|
message: "",
|
|
2577
2554
|
detail: ""
|
|
2578
|
-
}),
|
|
2579
|
-
function
|
|
2580
|
-
o(
|
|
2581
|
-
|
|
2555
|
+
}), f = y(() => v.value && v.value.detail || "");
|
|
2556
|
+
function p(w) {
|
|
2557
|
+
o(f.value).catch((T) => {
|
|
2558
|
+
i.value = a.exception.copyFailed || "复制失败";
|
|
2582
2559
|
}).finally(() => {
|
|
2583
|
-
|
|
2584
|
-
|
|
2560
|
+
s.value = !0, setTimeout(() => {
|
|
2561
|
+
s.value = !1;
|
|
2585
2562
|
}, 700);
|
|
2586
2563
|
});
|
|
2587
2564
|
}
|
|
2588
2565
|
return () => l("span", {
|
|
2589
2566
|
class: "copy-exception-info"
|
|
2590
2567
|
}, [l("span", {
|
|
2591
|
-
onClick:
|
|
2568
|
+
onClick: p,
|
|
2592
2569
|
style: "cursor: pointer;"
|
|
2593
|
-
}, [
|
|
2570
|
+
}, [u.value])]);
|
|
2594
2571
|
}
|
|
2595
|
-
function
|
|
2596
|
-
const
|
|
2597
|
-
|
|
2598
|
-
function
|
|
2599
|
-
|
|
2572
|
+
function bo(e, t, n, a, o) {
|
|
2573
|
+
const s = r(e.type), i = r(e.buttons), u = r(e.exceptionInfo), v = r(o.ok || e.okButtonText), f = r(o.cancel || e.cancelButtonText), p = r(e.showCancelButton), w = r(e.showOkButton), T = y(() => !!(i.value && i.value.length)), h = y(() => !!(u.value && u.value.detail)), g = y(() => !(i.value && i.value.length) && (w.value || p.value)), F = yo(e, n, a, o);
|
|
2574
|
+
v.value === "关闭" ? v.value = o.close : v.value === "知道了" && (v.value = o.exception.roger);
|
|
2575
|
+
function E(C) {
|
|
2576
|
+
s.value === "question" && t.emit("reject"), t.emit("close");
|
|
2600
2577
|
}
|
|
2601
|
-
function
|
|
2602
|
-
|
|
2578
|
+
function P(C) {
|
|
2579
|
+
s.value === "question" && t.emit("accept"), t.emit("close");
|
|
2603
2580
|
}
|
|
2604
2581
|
return () => l("div", {
|
|
2605
2582
|
class: "modal-footer"
|
|
2606
|
-
}, [
|
|
2583
|
+
}, [h.value && F(), g.value && p.value && l("button", {
|
|
2607
2584
|
type: "button",
|
|
2608
2585
|
class: "btn btn-secondary btn-lg",
|
|
2609
|
-
onClick:
|
|
2610
|
-
}, [
|
|
2586
|
+
onClick: E
|
|
2587
|
+
}, [f.value]), g.value && w.value && l("button", {
|
|
2611
2588
|
type: "button",
|
|
2612
2589
|
class: "btn btn-primary btn-lg",
|
|
2613
|
-
onClick:
|
|
2614
|
-
}, [
|
|
2590
|
+
onClick: P
|
|
2591
|
+
}, [v.value]), T.value && i.value.length && i.value.map((C) => l("button", {
|
|
2615
2592
|
type: "button",
|
|
2616
|
-
onClick:
|
|
2617
|
-
class:
|
|
2618
|
-
}, [
|
|
2619
|
-
class:
|
|
2620
|
-
}, null),
|
|
2593
|
+
onClick: C.handle,
|
|
2594
|
+
class: C.class
|
|
2595
|
+
}, [C.iconClass && l("span", {
|
|
2596
|
+
class: C.iconClass
|
|
2597
|
+
}, null), C.text]))]);
|
|
2621
2598
|
}
|
|
2622
|
-
function
|
|
2623
|
-
const { getLocaleValue: t } =
|
|
2624
|
-
function a(o,
|
|
2625
|
-
return
|
|
2599
|
+
function Co(e) {
|
|
2600
|
+
const { getLocaleValue: t } = Ce, n = Ce.getLocale();
|
|
2601
|
+
function a(o, s, i) {
|
|
2602
|
+
return s === i ? t(o) : s;
|
|
2626
2603
|
}
|
|
2627
2604
|
return {
|
|
2628
2605
|
yes: a("messageBox.yes") || "是",
|
|
@@ -2647,64 +2624,64 @@ function Bo(e) {
|
|
|
2647
2624
|
}
|
|
2648
2625
|
const Qe = /* @__PURE__ */ Se({
|
|
2649
2626
|
name: "FMessageBox",
|
|
2650
|
-
props:
|
|
2627
|
+
props: lo,
|
|
2651
2628
|
emits: ["accept", "reject", "close"],
|
|
2652
2629
|
setup(e, t) {
|
|
2653
|
-
const n =
|
|
2654
|
-
const
|
|
2630
|
+
const n = Co(e), a = r(e.type), o = r(e.title), s = r(e.detail), i = y(() => {
|
|
2631
|
+
const P = {
|
|
2655
2632
|
"modal-tips": !0,
|
|
2656
2633
|
"d-flex": !0,
|
|
2657
2634
|
"flex-row": !0
|
|
2658
|
-
},
|
|
2659
|
-
return
|
|
2660
|
-
}),
|
|
2661
|
-
const
|
|
2635
|
+
}, C = `messager-type-${a.value}`;
|
|
2636
|
+
return P[C] = !0, P;
|
|
2637
|
+
}), u = y(() => {
|
|
2638
|
+
const P = {
|
|
2662
2639
|
cursor: "default"
|
|
2663
2640
|
};
|
|
2664
|
-
return a.value === "prompt" ?
|
|
2665
|
-
}),
|
|
2666
|
-
feedbackStyle:
|
|
2667
|
-
feedbackMessage:
|
|
2668
|
-
} =
|
|
2669
|
-
|
|
2670
|
-
function
|
|
2641
|
+
return a.value === "prompt" ? P.padding = "0.5rem 0.5rem 1rem 1.5rem" : a.value === "error" && (P.padding = "0.5rem 1.5rem 1rem 1.5rem"), P;
|
|
2642
|
+
}), v = ro(), f = fo(e, a, o, s), p = vo(), {
|
|
2643
|
+
feedbackStyle: w,
|
|
2644
|
+
feedbackMessage: T
|
|
2645
|
+
} = p;
|
|
2646
|
+
T.value = n.exception.copySuccess;
|
|
2647
|
+
function h() {
|
|
2671
2648
|
return l("div", {
|
|
2672
|
-
style:
|
|
2673
|
-
}, [
|
|
2649
|
+
style: w.value
|
|
2650
|
+
}, [T.value]);
|
|
2674
2651
|
}
|
|
2675
|
-
function
|
|
2652
|
+
function g() {
|
|
2676
2653
|
switch (a.value) {
|
|
2677
2654
|
case "prompt":
|
|
2678
|
-
return
|
|
2655
|
+
return mo(e, f);
|
|
2679
2656
|
default:
|
|
2680
|
-
return
|
|
2657
|
+
return po(e, a, o, s, n);
|
|
2681
2658
|
}
|
|
2682
2659
|
}
|
|
2683
|
-
const
|
|
2660
|
+
const F = g(), E = bo(e, t, v, p, n);
|
|
2684
2661
|
return () => l("div", {
|
|
2685
2662
|
class: "farris-messager"
|
|
2686
2663
|
}, [!e.exceptionInfo && l("div", {
|
|
2687
2664
|
style: "height: 30px;width: 100%;position: absolute;",
|
|
2688
2665
|
class: "messager-draggable"
|
|
2689
2666
|
}, null), l("section", {
|
|
2690
|
-
class:
|
|
2691
|
-
style:
|
|
2692
|
-
}, [
|
|
2667
|
+
class: i.value,
|
|
2668
|
+
style: u.value
|
|
2669
|
+
}, [F()]), E(), h()]);
|
|
2693
2670
|
}
|
|
2694
2671
|
}), he = class he {
|
|
2695
2672
|
static show(t) {
|
|
2696
2673
|
const n = ge({
|
|
2697
2674
|
...t
|
|
2698
|
-
}), a = !1, o = n.type === "error" || n.type === "prompt",
|
|
2699
|
-
}),
|
|
2675
|
+
}), a = !1, o = n.type === "error" || n.type === "prompt", s = n.type === "error" ? "错误提示" : n.type === "prompt" && n.title || "", i = n.acceptCallback || (() => {
|
|
2676
|
+
}), u = n.rejectCallback || (() => {
|
|
2700
2677
|
});
|
|
2701
|
-
let
|
|
2702
|
-
const
|
|
2703
|
-
|
|
2678
|
+
let v = null, f = new Ft(he.app);
|
|
2679
|
+
const p = () => {
|
|
2680
|
+
v && (v == null || v.destroy(), f = null);
|
|
2704
2681
|
};
|
|
2705
|
-
return
|
|
2682
|
+
return v = f == null ? void 0 : f.open({
|
|
2706
2683
|
class: "modal-message modal-message-type-info",
|
|
2707
|
-
title:
|
|
2684
|
+
title: s,
|
|
2708
2685
|
showButtons: a,
|
|
2709
2686
|
showHeader: o,
|
|
2710
2687
|
width: n.width || 400,
|
|
@@ -2713,11 +2690,11 @@ const Qe = /* @__PURE__ */ Se({
|
|
|
2713
2690
|
draggable: !0,
|
|
2714
2691
|
dragHandle: ".messager-draggable",
|
|
2715
2692
|
render: () => l(Qe, tt(n, {
|
|
2716
|
-
onAccept:
|
|
2717
|
-
onReject:
|
|
2718
|
-
onClose:
|
|
2693
|
+
onAccept: i,
|
|
2694
|
+
onReject: u,
|
|
2695
|
+
onClose: p
|
|
2719
2696
|
}), null)
|
|
2720
|
-
}),
|
|
2697
|
+
}), f == null ? void 0 : f.getCurrentModal();
|
|
2721
2698
|
}
|
|
2722
2699
|
static info(t, n) {
|
|
2723
2700
|
const a = ge({
|
|
@@ -2774,7 +2751,7 @@ const Qe = /* @__PURE__ */ Se({
|
|
|
2774
2751
|
he.show(a);
|
|
2775
2752
|
}
|
|
2776
2753
|
static question(t, n, a, o) {
|
|
2777
|
-
const
|
|
2754
|
+
const s = ge({
|
|
2778
2755
|
type: "question",
|
|
2779
2756
|
title: t,
|
|
2780
2757
|
detail: n,
|
|
@@ -2783,7 +2760,7 @@ const Qe = /* @__PURE__ */ Se({
|
|
|
2783
2760
|
acceptCallback: a,
|
|
2784
2761
|
rejectCallback: o
|
|
2785
2762
|
});
|
|
2786
|
-
he.show(
|
|
2763
|
+
he.show(s);
|
|
2787
2764
|
}
|
|
2788
2765
|
};
|
|
2789
2766
|
me(he, "app", null);
|
|
@@ -2791,7 +2768,7 @@ let qe = he;
|
|
|
2791
2768
|
Qe.install = (e) => {
|
|
2792
2769
|
e.component(Qe.name, Qe), qe.app = e, e.provide("FMessageBoxService", qe);
|
|
2793
2770
|
};
|
|
2794
|
-
const
|
|
2771
|
+
const wo = "https://json-schema.org/draft/2020-12/schema", xo = "https://farris-design.gitee.io/mapping-editor.schema.json", Bo = "mapping-editor", So = "A Farris Input Component", To = "object", Mo = {
|
|
2795
2772
|
fromData: {
|
|
2796
2773
|
type: "object",
|
|
2797
2774
|
default: null
|
|
@@ -2832,14 +2809,14 @@ const So = "https://json-schema.org/draft/2020-12/schema", To = "https://farris-
|
|
|
2832
2809
|
type: "object",
|
|
2833
2810
|
default: null
|
|
2834
2811
|
}
|
|
2835
|
-
},
|
|
2836
|
-
$schema:
|
|
2837
|
-
$id:
|
|
2838
|
-
title:
|
|
2839
|
-
description:
|
|
2840
|
-
type:
|
|
2841
|
-
properties:
|
|
2842
|
-
},
|
|
2812
|
+
}, ko = {
|
|
2813
|
+
$schema: wo,
|
|
2814
|
+
$id: xo,
|
|
2815
|
+
title: Bo,
|
|
2816
|
+
description: So,
|
|
2817
|
+
type: To,
|
|
2818
|
+
properties: Mo
|
|
2819
|
+
}, Dt = {
|
|
2843
2820
|
fromData: { type: Object, default: {} },
|
|
2844
2821
|
toData: { type: Object, default: {} },
|
|
2845
2822
|
disabled: { type: Boolean, default: !1 },
|
|
@@ -2851,7 +2828,7 @@ const So = "https://json-schema.org/draft/2020-12/schema", To = "https://farris-
|
|
|
2851
2828
|
editorParams: { type: Object, default: null },
|
|
2852
2829
|
onMappingFieldsChanged: { type: Function, default: null },
|
|
2853
2830
|
beforeOpen: { type: Function }
|
|
2854
|
-
},
|
|
2831
|
+
}, Oo = Ha(Dt, ko), Fo = {
|
|
2855
2832
|
showCloseButton: { type: Boolean, default: !0 },
|
|
2856
2833
|
position: { type: String, default: "top-center" },
|
|
2857
2834
|
timeout: { type: Number, default: 3e3 },
|
|
@@ -2864,139 +2841,139 @@ const So = "https://json-schema.org/draft/2020-12/schema", To = "https://farris-
|
|
|
2864
2841
|
animate: { type: String, default: "fadeIn" },
|
|
2865
2842
|
options: { type: Object },
|
|
2866
2843
|
safeHtml: { type: Boolean, default: !0 }
|
|
2867
|
-
},
|
|
2844
|
+
}, Io = {
|
|
2868
2845
|
showCloseButton: { type: Boolean, default: !0 },
|
|
2869
2846
|
animate: { type: String, default: "fadeIn" },
|
|
2870
2847
|
options: { type: Object }
|
|
2871
|
-
},
|
|
2848
|
+
}, ut = /* @__PURE__ */ Se({
|
|
2872
2849
|
name: "Toast",
|
|
2873
|
-
props:
|
|
2850
|
+
props: Io,
|
|
2874
2851
|
emits: ["close", "click"],
|
|
2875
2852
|
setup: (e, t) => {
|
|
2876
|
-
const n =
|
|
2877
|
-
const
|
|
2878
|
-
animated:
|
|
2853
|
+
const n = r(e.animate), a = "fadeOut", o = y(() => e.options), s = r(!1), i = y(() => o.value.title && o.value.message), u = y(() => !o.value.title && o.value.message), v = y(() => {
|
|
2854
|
+
const C = {
|
|
2855
|
+
animated: s.value,
|
|
2879
2856
|
toast: !0,
|
|
2880
|
-
"toast--only-content": !
|
|
2857
|
+
"toast--only-content": !i.value
|
|
2881
2858
|
};
|
|
2882
|
-
return
|
|
2883
|
-
}),
|
|
2884
|
-
const
|
|
2859
|
+
return C[e.animate] = !1, C[a] = s.value, C["toasty-type-" + o.value.type] = !0, o.value.theme && (C[o.value.theme] = !0), C;
|
|
2860
|
+
}), f = y(() => {
|
|
2861
|
+
const U = `f-icon-${o.value && o.value.type ? o.value.type.replace("toasty-type-", "") : "default"}`, B = {
|
|
2885
2862
|
"f-icon": !0
|
|
2886
2863
|
};
|
|
2887
|
-
return
|
|
2888
|
-
}),
|
|
2864
|
+
return B[U] = !0, B;
|
|
2865
|
+
}), p = y(() => o.value.title || o.value.message), w = y(() => e.showCloseButton), T = y(() => !!o.value.buttons || !!t.slots.default), h = y(() => Ce.getLocale() === "en" ? {
|
|
2889
2866
|
wordBreak: "keep-all",
|
|
2890
2867
|
overflowWrap: "break-word"
|
|
2891
2868
|
} : {});
|
|
2892
|
-
function
|
|
2893
|
-
|
|
2869
|
+
function g(C) {
|
|
2870
|
+
C.stopPropagation(), C.preventDefault(), s.value = !1, setTimeout(() => {
|
|
2894
2871
|
t.emit("close", o.value);
|
|
2895
2872
|
}, 200);
|
|
2896
2873
|
}
|
|
2897
|
-
function
|
|
2874
|
+
function F(C, N) {
|
|
2898
2875
|
}
|
|
2899
|
-
function
|
|
2900
|
-
return `f-preten-link ${
|
|
2876
|
+
function E(C) {
|
|
2877
|
+
return `f-preten-link ${C.customClass ? C.customClass : ""}`;
|
|
2901
2878
|
}
|
|
2902
|
-
|
|
2879
|
+
Z(n, () => {
|
|
2903
2880
|
n.value;
|
|
2904
2881
|
});
|
|
2905
|
-
const
|
|
2906
|
-
var
|
|
2907
|
-
return l(
|
|
2882
|
+
const P = () => {
|
|
2883
|
+
var C;
|
|
2884
|
+
return l(pe, null, [l("div", {
|
|
2908
2885
|
class: "after-toast-msg text-right"
|
|
2909
|
-
}, [!t.slots.default && ((
|
|
2910
|
-
class:
|
|
2911
|
-
onClick: (
|
|
2912
|
-
}, [
|
|
2886
|
+
}, [!t.slots.default && ((C = o.value.buttons) == null ? void 0 : C.map((N) => l("span", {
|
|
2887
|
+
class: E(N),
|
|
2888
|
+
onClick: (U) => void 0
|
|
2889
|
+
}, [N.text]))), t.slots.default && t.slots.default()])]);
|
|
2913
2890
|
};
|
|
2914
2891
|
return () => l("div", {
|
|
2915
|
-
class:
|
|
2892
|
+
class: v.value,
|
|
2916
2893
|
style: "min-height:44px"
|
|
2917
|
-
}, [
|
|
2918
|
-
title:
|
|
2894
|
+
}, [w.value && l("button", {
|
|
2895
|
+
title: Ce.getLocaleValue("messageBox.close"),
|
|
2919
2896
|
class: "toast-close f-btn-icon f-bare",
|
|
2920
|
-
onClick:
|
|
2897
|
+
onClick: g
|
|
2921
2898
|
}, [l("span", {
|
|
2922
2899
|
class: "f-icon modal_close"
|
|
2923
|
-
}, null)]),
|
|
2900
|
+
}, null)]), p.value && l("section", {
|
|
2924
2901
|
class: "modal-tips"
|
|
2925
|
-
}, [!
|
|
2902
|
+
}, [!i.value && l("div", {
|
|
2926
2903
|
class: "float-left modal-tips-iconwrap"
|
|
2927
2904
|
}, [l("span", {
|
|
2928
|
-
class:
|
|
2905
|
+
class: f.value
|
|
2929
2906
|
}, null)]), l("div", {
|
|
2930
2907
|
class: "modal-tips-content"
|
|
2931
|
-
}, [
|
|
2908
|
+
}, [i.value && l(pe, null, [l("h5", {
|
|
2932
2909
|
class: "toast-title modal-tips-title",
|
|
2933
2910
|
innerHTML: o.value.title
|
|
2934
2911
|
}, null), l("p", {
|
|
2935
2912
|
class: "toast-msg",
|
|
2936
2913
|
innerHTML: o.value.message,
|
|
2937
|
-
style:
|
|
2938
|
-
}, null),
|
|
2914
|
+
style: h.value
|
|
2915
|
+
}, null), T.value && P()]), u.value && (o.value.buttons ? l("div", {
|
|
2939
2916
|
class: "toast-title-btns-wrapper d-flex"
|
|
2940
2917
|
}, [l("h5", {
|
|
2941
2918
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
2942
|
-
style:
|
|
2919
|
+
style: h.value,
|
|
2943
2920
|
innerHTML: o.value.message
|
|
2944
2921
|
}, null), l("div", {
|
|
2945
2922
|
class: "after-toast-title text-right ml-auto"
|
|
2946
|
-
}, [
|
|
2923
|
+
}, [P()])]) : l("h5", {
|
|
2947
2924
|
class: "toast-title modal-tips-title only-toast-msg",
|
|
2948
|
-
style:
|
|
2925
|
+
style: h.value,
|
|
2949
2926
|
innerHTML: o.value.message
|
|
2950
2927
|
}, null))])])]);
|
|
2951
2928
|
}
|
|
2952
2929
|
}), et = /* @__PURE__ */ Se({
|
|
2953
2930
|
name: "Notify",
|
|
2954
|
-
props:
|
|
2931
|
+
props: Fo,
|
|
2955
2932
|
emits: ["close", "empty"],
|
|
2956
2933
|
setup(e, t) {
|
|
2957
|
-
const n =
|
|
2934
|
+
const n = y(() => ({
|
|
2958
2935
|
"farris-notify": !0
|
|
2959
2936
|
})), a = {
|
|
2960
2937
|
left: 12,
|
|
2961
2938
|
right: 12,
|
|
2962
2939
|
top: 20,
|
|
2963
2940
|
bottom: 12
|
|
2964
|
-
}, o =
|
|
2965
|
-
const
|
|
2941
|
+
}, o = r(), s = r(e.options), i = r(e.showCloseButton), u = y(() => e.position || "bottom-right"), v = y(() => e.timeout != null ? e.timeout : 3e3), f = y(() => {
|
|
2942
|
+
const T = e.bottom ? e.bottom : a.bottom, h = e.top ? e.top : a.top, g = {
|
|
2966
2943
|
transition: "all 0.2s ease",
|
|
2967
|
-
left:
|
|
2968
|
-
right:
|
|
2969
|
-
top:
|
|
2970
|
-
bottom:
|
|
2944
|
+
left: u.value.indexOf("left") > -1 ? `${e.left ? e.left : a.left}px` : "",
|
|
2945
|
+
right: u.value.indexOf("right") > -1 ? `${e.right ? e.right : a.right}px` : "",
|
|
2946
|
+
top: u.value.indexOf("top") > -1 ? `${h}px` : "",
|
|
2947
|
+
bottom: u.value.indexOf("bottom") > -1 ? `${T}px` : ""
|
|
2971
2948
|
};
|
|
2972
|
-
return
|
|
2949
|
+
return u.value.indexOf("center") > -1 && (g.left = "50%", g.marginLeft = "calc(-24rem / 2)", u.value === "center-center" && (g.top = "50%", g.transform = "translate(-50%, -50%)")), g;
|
|
2973
2950
|
});
|
|
2974
|
-
function
|
|
2951
|
+
function p(T) {
|
|
2975
2952
|
t.emit("close");
|
|
2976
2953
|
}
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
},
|
|
2980
|
-
closeToast:
|
|
2954
|
+
v.value && setTimeout(() => {
|
|
2955
|
+
p();
|
|
2956
|
+
}, v.value), t.expose({
|
|
2957
|
+
closeToast: p,
|
|
2981
2958
|
container: o,
|
|
2982
|
-
notifyPosition:
|
|
2959
|
+
notifyPosition: u
|
|
2983
2960
|
});
|
|
2984
|
-
function
|
|
2985
|
-
|
|
2961
|
+
function w(T, h) {
|
|
2962
|
+
p();
|
|
2986
2963
|
}
|
|
2987
2964
|
return () => l("div", {
|
|
2988
2965
|
class: n.value,
|
|
2989
|
-
style:
|
|
2966
|
+
style: f.value,
|
|
2990
2967
|
ref: o
|
|
2991
|
-
}, [l(
|
|
2992
|
-
options:
|
|
2993
|
-
showCloseButton:
|
|
2968
|
+
}, [l(ut, {
|
|
2969
|
+
options: s.value,
|
|
2970
|
+
showCloseButton: i.value,
|
|
2994
2971
|
animate: e.animate,
|
|
2995
|
-
onClose: (
|
|
2972
|
+
onClose: (T) => w(T, s.value)
|
|
2996
2973
|
}, null)]);
|
|
2997
2974
|
}
|
|
2998
2975
|
});
|
|
2999
|
-
class
|
|
2976
|
+
class Eo {
|
|
3000
2977
|
constructor() {
|
|
3001
2978
|
me(this, "notifyRefs", []);
|
|
3002
2979
|
me(this, "globalConfig", ge({}));
|
|
@@ -3015,42 +2992,42 @@ class Do {
|
|
|
3015
2992
|
safeHtml: !0
|
|
3016
2993
|
}, this.globalConfig, {
|
|
3017
2994
|
...t
|
|
3018
|
-
}),
|
|
3019
|
-
|
|
3020
|
-
const
|
|
2995
|
+
}), s = document.createElement("div");
|
|
2996
|
+
s.style.display = "contents";
|
|
2997
|
+
const i = rt({
|
|
3021
2998
|
setup() {
|
|
3022
|
-
var
|
|
3023
|
-
const
|
|
3024
|
-
function
|
|
3025
|
-
|
|
3026
|
-
n.updateNotifyPositionForClose(o,
|
|
2999
|
+
var f;
|
|
3000
|
+
const u = r();
|
|
3001
|
+
function v() {
|
|
3002
|
+
u.value.container.style.transform = "scale(0)", setTimeout(() => {
|
|
3003
|
+
n.updateNotifyPositionForClose(o, u), i.unmount();
|
|
3027
3004
|
}, 220);
|
|
3028
3005
|
}
|
|
3029
3006
|
if (o.position.indexOf("top") > -1) {
|
|
3030
|
-
const
|
|
3031
|
-
if (
|
|
3032
|
-
const
|
|
3033
|
-
o.top =
|
|
3007
|
+
const p = n.getNotifyInstances(o.position), w = p[p.length - 1];
|
|
3008
|
+
if (w) {
|
|
3009
|
+
const T = w.value.container.getBoundingClientRect();
|
|
3010
|
+
o.top = T.bottom;
|
|
3034
3011
|
}
|
|
3035
3012
|
}
|
|
3036
|
-
return o.safeHtml && ((
|
|
3037
|
-
document.body.removeChild(
|
|
3013
|
+
return o.safeHtml && ((f = o.options) != null && f.message) && (o.options.message = n.escapeAllHtml(o.options.message)), Xe(() => {
|
|
3014
|
+
document.body.removeChild(s);
|
|
3038
3015
|
}), ze(() => {
|
|
3039
|
-
n.updateNotifyPositionForCreate(o,
|
|
3040
|
-
}), () => l(
|
|
3016
|
+
n.updateNotifyPositionForCreate(o, u);
|
|
3017
|
+
}), () => l(St, {
|
|
3041
3018
|
mode: "out-in",
|
|
3042
3019
|
name: "fade",
|
|
3043
3020
|
appear: !0
|
|
3044
3021
|
}, {
|
|
3045
3022
|
default: () => [l(et, tt({
|
|
3046
|
-
ref:
|
|
3023
|
+
ref: u
|
|
3047
3024
|
}, o, {
|
|
3048
|
-
onClose:
|
|
3025
|
+
onClose: v
|
|
3049
3026
|
}), null)]
|
|
3050
3027
|
});
|
|
3051
3028
|
}
|
|
3052
3029
|
});
|
|
3053
|
-
return
|
|
3030
|
+
return i.provide("NotifyService", this), document.body.appendChild(s), i.use(Ce.i18n), i.mount(s), i;
|
|
3054
3031
|
}
|
|
3055
3032
|
getNotifyInstances(t) {
|
|
3056
3033
|
return this.notifyRefs.filter((n) => n.value.notifyPosition === t);
|
|
@@ -3059,8 +3036,8 @@ class Do {
|
|
|
3059
3036
|
if (this.notifyRefs && this.notifyRefs.length) {
|
|
3060
3037
|
const a = window.innerHeight;
|
|
3061
3038
|
t.position.indexOf("bottom") > -1 && this.getNotifyInstances(t.position).forEach((o) => {
|
|
3062
|
-
const
|
|
3063
|
-
o.value.container.style.bottom =
|
|
3039
|
+
const s = o.value.container.getBoundingClientRect();
|
|
3040
|
+
o.value.container.style.bottom = s.height + a - s.bottom + "px";
|
|
3064
3041
|
});
|
|
3065
3042
|
}
|
|
3066
3043
|
this.notifyRefs = [...this.notifyRefs, n];
|
|
@@ -3068,9 +3045,9 @@ class Do {
|
|
|
3068
3045
|
updateNotifyPositionForClose(t, n) {
|
|
3069
3046
|
const a = this.notifyRefs.indexOf(n);
|
|
3070
3047
|
if (t.position.indexOf("top") > -1) {
|
|
3071
|
-
const o = this.getNotifyInstances(t.position),
|
|
3072
|
-
o.slice(
|
|
3073
|
-
|
|
3048
|
+
const o = this.getNotifyInstances(t.position), s = o.indexOf(n);
|
|
3049
|
+
o.slice(s + 1).forEach((i) => {
|
|
3050
|
+
i.value.container.style.top = i.value.container.offsetTop - i.value.container.offsetHeight + "px";
|
|
3074
3051
|
});
|
|
3075
3052
|
}
|
|
3076
3053
|
a > -1 && this.notifyRefs.splice(a, 1);
|
|
@@ -3079,16 +3056,16 @@ class Do {
|
|
|
3079
3056
|
return this.createNotifyInstance(t);
|
|
3080
3057
|
}
|
|
3081
3058
|
buildNotifyProps(t, n) {
|
|
3082
|
-
let a = "", o = "",
|
|
3083
|
-
typeof n == "string" ? a = n : n && (a = n.message || "", o = n.title || "",
|
|
3084
|
-
const
|
|
3059
|
+
let a = "", o = "", s, i, u;
|
|
3060
|
+
typeof n == "string" ? a = n : n && (a = n.message || "", o = n.title || "", i = n.position || null, u = n.showCloseButton != null ? n.showCloseButton : null, s = n.timeout != null ? n.timeout : null);
|
|
3061
|
+
const f = {
|
|
3085
3062
|
options: {
|
|
3086
3063
|
type: t,
|
|
3087
3064
|
message: a,
|
|
3088
3065
|
title: o
|
|
3089
3066
|
}
|
|
3090
3067
|
};
|
|
3091
|
-
return
|
|
3068
|
+
return i != null && (f.position = i), u != null && (f.showCloseButton = u), s != null && (f.timeout = s), f;
|
|
3092
3069
|
}
|
|
3093
3070
|
info(t) {
|
|
3094
3071
|
const n = this.buildNotifyProps("info", t);
|
|
@@ -3115,34 +3092,34 @@ class Do {
|
|
|
3115
3092
|
}), this.notifyRefs.length = 0;
|
|
3116
3093
|
}
|
|
3117
3094
|
}
|
|
3118
|
-
const
|
|
3095
|
+
const Ht = Symbol("NOTIFY_SERVICE_TOKEN");
|
|
3119
3096
|
et.install = (e) => {
|
|
3120
|
-
e.component(et.name, et), e.component(
|
|
3121
|
-
const t = new
|
|
3122
|
-
e.provide(
|
|
3097
|
+
e.component(et.name, et), e.component(ut.name, ut);
|
|
3098
|
+
const t = new Eo();
|
|
3099
|
+
e.provide(Ht, t), e.provide("FNotifyService", t);
|
|
3123
3100
|
};
|
|
3124
|
-
function
|
|
3101
|
+
function it(e) {
|
|
3125
3102
|
return e.reduce((t, n) => {
|
|
3126
3103
|
var a;
|
|
3127
|
-
return t.push(n.data), (a = n.children) != null && a.length && t.push(...
|
|
3104
|
+
return t.push(n.data), (a = n.children) != null && a.length && t.push(...it(n.children)), t;
|
|
3128
3105
|
}, []);
|
|
3129
3106
|
}
|
|
3130
3107
|
const st = /* @__PURE__ */ Se({
|
|
3131
3108
|
name: "FMappingEditor",
|
|
3132
|
-
props:
|
|
3109
|
+
props: Dt,
|
|
3133
3110
|
emits: ["submitModal", "update:modelValue"],
|
|
3134
3111
|
setup(e, t) {
|
|
3135
|
-
const n = '<i class="f-icon f-icon-lookup"></i>', a =
|
|
3136
|
-
var
|
|
3137
|
-
const
|
|
3138
|
-
return
|
|
3139
|
-
},
|
|
3112
|
+
const n = '<i class="f-icon f-icon-lookup"></i>', a = r(), o = r(e.modelValue || {}), s = r([]), i = r(e.fromData.dataSource || []), u = r([]), v = e.fromData.repositoryToken ? Ze(e.fromData.repositoryToken) : null, f = e.toData.repositoryToken ? Ze(e.toData.repositoryToken) : null, p = Ze(Ht), w = (M) => ((M.raw.$type !== "SimpleField" || M.raw.selectable === !1) && (M.disabled = !0), M), T = y(() => it(i.value)), h = y(() => it(u.value)), g = (M, d, x, R) => {
|
|
3113
|
+
var q, oe;
|
|
3114
|
+
const D = ((q = M.value.find((re) => re[R] === d)) == null ? void 0 : q[x || "name"]) || "", A = ((oe = M.value.find((re) => re[R] === d)) == null ? void 0 : oe[R || "code"]) || "";
|
|
3115
|
+
return D && A ? `${D}[${A}]` : "";
|
|
3116
|
+
}, F = [{
|
|
3140
3117
|
field: "sourceField",
|
|
3141
3118
|
title: "数据源字段",
|
|
3142
3119
|
dataType: "string",
|
|
3143
3120
|
editor: {
|
|
3144
3121
|
type: "combo-tree",
|
|
3145
|
-
data:
|
|
3122
|
+
data: i.value,
|
|
3146
3123
|
idField: e.fromData.idField || "id",
|
|
3147
3124
|
textField: e.fromData.textField || "name",
|
|
3148
3125
|
valueField: e.fromData.valueField || "id",
|
|
@@ -3150,17 +3127,17 @@ const st = /* @__PURE__ */ Se({
|
|
|
3150
3127
|
editorParams: e.fromData.editorParams,
|
|
3151
3128
|
editable: e.fromData.editable || !1,
|
|
3152
3129
|
searchFields: e.fromData.searchFields || [],
|
|
3153
|
-
customRowStatus:
|
|
3130
|
+
customRowStatus: w,
|
|
3154
3131
|
displayFormatter: e.fromData.displayFormatter
|
|
3155
3132
|
},
|
|
3156
|
-
formatter: (M, d) =>
|
|
3133
|
+
formatter: (M, d) => g(T, d.raw.sourceField, e.fromData.textField, e.fromData.valueField)
|
|
3157
3134
|
}, {
|
|
3158
3135
|
field: "targetField",
|
|
3159
3136
|
title: "目标字段",
|
|
3160
3137
|
dataType: "string",
|
|
3161
3138
|
editor: {
|
|
3162
3139
|
type: "combo-tree",
|
|
3163
|
-
data:
|
|
3140
|
+
data: u.value,
|
|
3164
3141
|
idField: e.toData.idField || "id",
|
|
3165
3142
|
textField: e.toData.textField || "name",
|
|
3166
3143
|
valueField: e.toData.valueField || "id",
|
|
@@ -3170,70 +3147,70 @@ const st = /* @__PURE__ */ Se({
|
|
|
3170
3147
|
enableSearch: !0,
|
|
3171
3148
|
editable: !1,
|
|
3172
3149
|
searchFields: e.toData.searchFields || [],
|
|
3173
|
-
customRowStatus:
|
|
3150
|
+
customRowStatus: w,
|
|
3174
3151
|
displayFormatter: e.toData.displayFormatter
|
|
3175
3152
|
},
|
|
3176
|
-
formatter: (M, d) => d.raw.targetField ? (d.raw.targetField.indexOf(",") > -1 ? d.raw.targetField.split(",") : [d.raw.targetField]).map((
|
|
3153
|
+
formatter: (M, d) => d.raw.targetField ? (d.raw.targetField.indexOf(",") > -1 ? d.raw.targetField.split(",") : [d.raw.targetField]).map((R) => g(h, R, e.toData.textField, e.toData.valueField)).join(",") : ""
|
|
3177
3154
|
}];
|
|
3178
|
-
function
|
|
3155
|
+
function E() {
|
|
3179
3156
|
return Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
|
|
3180
3157
|
}
|
|
3181
|
-
function
|
|
3158
|
+
function P() {
|
|
3182
3159
|
let M = o.value || {};
|
|
3183
3160
|
return typeof M == "string" && (M = JSON.parse(M)), Object.keys(M).map((d) => ({
|
|
3184
|
-
id:
|
|
3161
|
+
id: E(),
|
|
3185
3162
|
sourceField: d,
|
|
3186
3163
|
targetField: M[d]
|
|
3187
3164
|
}));
|
|
3188
3165
|
}
|
|
3189
|
-
const
|
|
3166
|
+
const C = r(P()), N = y(() => {
|
|
3190
3167
|
var M;
|
|
3191
|
-
return `共 ${((M =
|
|
3168
|
+
return `共 ${((M = C.value) == null ? void 0 : M.length) || 0} 项`;
|
|
3192
3169
|
});
|
|
3193
|
-
function
|
|
3170
|
+
function U() {
|
|
3194
3171
|
a.value.endEditCell(), a.value.addNewDataItemAtLast();
|
|
3195
3172
|
}
|
|
3196
|
-
function
|
|
3173
|
+
function B() {
|
|
3197
3174
|
return {
|
|
3198
3175
|
sourceField: "",
|
|
3199
3176
|
targetField: "",
|
|
3200
|
-
id:
|
|
3177
|
+
id: E()
|
|
3201
3178
|
};
|
|
3202
3179
|
}
|
|
3203
|
-
function
|
|
3204
|
-
if (!
|
|
3205
|
-
|
|
3180
|
+
function L() {
|
|
3181
|
+
if (!s.value.length) {
|
|
3182
|
+
p.warning("请选择要删除的映射字段!");
|
|
3206
3183
|
return;
|
|
3207
3184
|
}
|
|
3208
3185
|
a.value.endEditCell();
|
|
3209
|
-
const M =
|
|
3186
|
+
const M = C.value.findIndex((A) => A.id === s.value[0].id);
|
|
3210
3187
|
if (M === -1)
|
|
3211
3188
|
return;
|
|
3212
|
-
const d =
|
|
3213
|
-
if (a.value.removeDataItemById(d),
|
|
3189
|
+
const d = s.value[0].id;
|
|
3190
|
+
if (a.value.removeDataItemById(d), s.value = [], !C.value.length)
|
|
3214
3191
|
return;
|
|
3215
|
-
const
|
|
3216
|
-
|
|
3192
|
+
const x = Math.min(M, C.value.length - 1), R = C.value[x], D = R == null ? void 0 : R.id;
|
|
3193
|
+
D && (a.value.selectItemById(D), s.value = [R]);
|
|
3217
3194
|
}
|
|
3218
|
-
function
|
|
3195
|
+
function b() {
|
|
3219
3196
|
qe.question("确定要清空所有映射字段吗?", "", () => {
|
|
3220
|
-
|
|
3197
|
+
s.value = [], o.value = {}, C.value = [], a.value.updateDataSource(C.value);
|
|
3221
3198
|
}, () => {
|
|
3222
3199
|
});
|
|
3223
3200
|
}
|
|
3224
|
-
function
|
|
3201
|
+
function k() {
|
|
3225
3202
|
const M = {};
|
|
3226
|
-
return
|
|
3203
|
+
return C.value.forEach((d) => {
|
|
3227
3204
|
d.sourceField && d.targetField && (M[d.sourceField] = d.targetField);
|
|
3228
3205
|
}), M;
|
|
3229
3206
|
}
|
|
3230
|
-
|
|
3231
|
-
o.value = M,
|
|
3207
|
+
Z(() => e.modelValue, (M) => {
|
|
3208
|
+
o.value = M, C.value = P();
|
|
3232
3209
|
});
|
|
3233
|
-
function
|
|
3234
|
-
return
|
|
3210
|
+
function W() {
|
|
3211
|
+
return C.value.filter((d) => !d.sourceField || !d.targetField).length;
|
|
3235
3212
|
}
|
|
3236
|
-
const
|
|
3213
|
+
const K = {
|
|
3237
3214
|
title: e.title,
|
|
3238
3215
|
fitContent: !1,
|
|
3239
3216
|
height: e.modalHeight,
|
|
@@ -3251,62 +3228,62 @@ const st = /* @__PURE__ */ Se({
|
|
|
3251
3228
|
text: "确定",
|
|
3252
3229
|
class: "btn btn-primary",
|
|
3253
3230
|
handle: (M) => {
|
|
3254
|
-
if (a.value.endEditCell(),
|
|
3255
|
-
return
|
|
3256
|
-
const d =
|
|
3231
|
+
if (a.value.endEditCell(), W())
|
|
3232
|
+
return p.warning("请将映射字段填写完整!"), !1;
|
|
3233
|
+
const d = k();
|
|
3257
3234
|
return o.value = d, t.emit("submitModal", d), t.emit("update:modelValue", d), e.onMappingFieldsChanged && typeof e.onMappingFieldsChanged == "function" && e.onMappingFieldsChanged(JSON.stringify(d)), !0;
|
|
3258
3235
|
}
|
|
3259
3236
|
}],
|
|
3260
3237
|
resizeable: !0,
|
|
3261
3238
|
draggable: !0,
|
|
3262
3239
|
closedCallback: (M, d) => {
|
|
3263
|
-
(M.target.name === "cancel" || d === "icon" || d === "esc") && (o.value = e.modelValue,
|
|
3240
|
+
(M.target.name === "cancel" || d === "icon" || d === "esc") && (o.value = e.modelValue, C.value = P(), s.value = []);
|
|
3264
3241
|
}
|
|
3265
3242
|
};
|
|
3266
|
-
function
|
|
3267
|
-
|
|
3243
|
+
function O(M) {
|
|
3244
|
+
s.value = M;
|
|
3268
3245
|
}
|
|
3269
3246
|
function G() {
|
|
3270
|
-
var
|
|
3247
|
+
var D, A;
|
|
3271
3248
|
if (e.beforeOpen && typeof e.beforeOpen == "function")
|
|
3272
3249
|
return e.beforeOpen({
|
|
3273
|
-
fromDataSource:
|
|
3274
|
-
toDataSource:
|
|
3275
|
-
gridColumns:
|
|
3250
|
+
fromDataSource: i,
|
|
3251
|
+
toDataSource: u,
|
|
3252
|
+
gridColumns: F
|
|
3276
3253
|
});
|
|
3277
|
-
if (!((A = (
|
|
3278
|
-
return
|
|
3254
|
+
if (!((A = (D = e.editorParams) == null ? void 0 : D.propertyData) == null ? void 0 : A.helpId))
|
|
3255
|
+
return p == null || p.warning({
|
|
3279
3256
|
message: "请先配置数据源!",
|
|
3280
3257
|
position: "top-center"
|
|
3281
3258
|
}), !1;
|
|
3282
|
-
const d = [],
|
|
3283
|
-
d.push(
|
|
3284
|
-
const
|
|
3285
|
-
return d.push(
|
|
3259
|
+
const d = [], x = v ? v.getData(e.editorParams) : Promise.resolve(i.value);
|
|
3260
|
+
d.push(x), typeof e.toData.dataSource == "function" ? u.value = e.toData.dataSource() : u.value = e.toData.dataSource;
|
|
3261
|
+
const R = f ? f.getData(e.editorParams) : Promise.resolve(u.value);
|
|
3262
|
+
return d.push(R), Promise.all(d).then(([q, oe]) => (i.value = q, u.value = oe, F[0].editor.data = q, F[1].editor.data = oe, !0));
|
|
3286
3263
|
}
|
|
3287
3264
|
function se(M, d) {
|
|
3288
|
-
M.forEach((
|
|
3289
|
-
|
|
3265
|
+
M.forEach((x) => {
|
|
3266
|
+
x.selectable = !d.includes(x.data.bindingPath), x.children && se(x.children, d);
|
|
3290
3267
|
});
|
|
3291
3268
|
}
|
|
3292
|
-
function
|
|
3269
|
+
function X(M) {
|
|
3293
3270
|
const {
|
|
3294
3271
|
column: d,
|
|
3295
|
-
rawData:
|
|
3272
|
+
rawData: x
|
|
3296
3273
|
} = M, {
|
|
3297
|
-
field:
|
|
3298
|
-
editor:
|
|
3274
|
+
field: R,
|
|
3275
|
+
editor: D
|
|
3299
3276
|
} = d;
|
|
3300
|
-
if (
|
|
3301
|
-
const A =
|
|
3302
|
-
se(
|
|
3277
|
+
if (R === "sourceField" && D) {
|
|
3278
|
+
const A = C.value.filter((q) => q.sourceField !== x.sourceField).map((q) => q.sourceField);
|
|
3279
|
+
se(i.value, A), D.data = Ln(i.value);
|
|
3303
3280
|
}
|
|
3304
3281
|
return !0;
|
|
3305
3282
|
}
|
|
3306
|
-
const
|
|
3307
|
-
return () => l(
|
|
3308
|
-
modelValue:
|
|
3309
|
-
"onUpdate:modelValue": (M) =>
|
|
3283
|
+
const ue = y(() => s.value.length > 0), z = y(() => C.value.length > 0);
|
|
3284
|
+
return () => l(Pt, {
|
|
3285
|
+
modelValue: N.value,
|
|
3286
|
+
"onUpdate:modelValue": (M) => N.value = M,
|
|
3310
3287
|
editable: !1,
|
|
3311
3288
|
disabled: e.disabled,
|
|
3312
3289
|
readonly: e.readonly,
|
|
@@ -3314,7 +3291,7 @@ const st = /* @__PURE__ */ Se({
|
|
|
3314
3291
|
enableClear: !1,
|
|
3315
3292
|
buttonContent: n,
|
|
3316
3293
|
buttonBehavior: "Modal",
|
|
3317
|
-
modalOptions:
|
|
3294
|
+
modalOptions: K,
|
|
3318
3295
|
beforeOpen: G
|
|
3319
3296
|
}, {
|
|
3320
3297
|
default: () => [l("div", {
|
|
@@ -3323,18 +3300,18 @@ const st = /* @__PURE__ */ Se({
|
|
|
3323
3300
|
class: "px-2"
|
|
3324
3301
|
}, [l("button", {
|
|
3325
3302
|
class: "btn btn-primary",
|
|
3326
|
-
onClick:
|
|
3303
|
+
onClick: U
|
|
3327
3304
|
}, [Be("新增")]), l("button", {
|
|
3328
3305
|
class: "btn btn-secondary ml-2",
|
|
3329
|
-
disabled: !
|
|
3330
|
-
onClick:
|
|
3306
|
+
disabled: !ue.value,
|
|
3307
|
+
onClick: L
|
|
3331
3308
|
}, [Be("删除")]), l("button", {
|
|
3332
3309
|
class: "btn btn-secondary ml-3",
|
|
3333
|
-
disabled: !
|
|
3334
|
-
onClick:
|
|
3310
|
+
disabled: !z.value,
|
|
3311
|
+
onClick: b
|
|
3335
3312
|
}, [Be("清空")])]), l("div", {
|
|
3336
3313
|
class: " f-utils-fill p-2"
|
|
3337
|
-
}, [l(
|
|
3314
|
+
}, [l(Rt, {
|
|
3338
3315
|
ref: a,
|
|
3339
3316
|
pagination: {
|
|
3340
3317
|
enable: !1
|
|
@@ -3352,25 +3329,25 @@ const st = /* @__PURE__ */ Se({
|
|
|
3352
3329
|
showBorder: !0,
|
|
3353
3330
|
editable: "true",
|
|
3354
3331
|
fit: !0,
|
|
3355
|
-
columns:
|
|
3356
|
-
data:
|
|
3357
|
-
newDataItem:
|
|
3358
|
-
onSelectionChange:
|
|
3359
|
-
beforeEditCell:
|
|
3332
|
+
columns: F,
|
|
3333
|
+
data: C.value,
|
|
3334
|
+
newDataItem: B,
|
|
3335
|
+
onSelectionChange: O,
|
|
3336
|
+
beforeEditCell: X
|
|
3360
3337
|
}, null)])])]
|
|
3361
3338
|
});
|
|
3362
3339
|
}
|
|
3363
|
-
}),
|
|
3340
|
+
}), Ko = {
|
|
3364
3341
|
install(e) {
|
|
3365
3342
|
e.component(st.name, st);
|
|
3366
3343
|
},
|
|
3367
3344
|
register(e, t, n, a) {
|
|
3368
|
-
e["mapping-editor"] = st, t["mapping-editor"] =
|
|
3345
|
+
e["mapping-editor"] = st, t["mapping-editor"] = Oo;
|
|
3369
3346
|
}
|
|
3370
3347
|
};
|
|
3371
3348
|
export {
|
|
3372
3349
|
st as MappingEditor,
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3350
|
+
Ko as default,
|
|
3351
|
+
Dt as mappingEditorProps,
|
|
3352
|
+
Oo as propsResolver
|
|
3376
3353
|
};
|