@farris/ui-vue 1.8.5-beta.19 → 1.8.5-beta.20

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.
@@ -1,16 +1,16 @@
1
1
  var To = Object.defineProperty;
2
2
  var Bo = (e, n, t) => n in e ? To(e, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[n] = t;
3
3
  var $e = (e, n, t) => Bo(e, typeof n != "symbol" ? n + "" : n, t);
4
- import { ref as v, onMounted as pt, defineComponent as qe, computed as I, createVNode as r, Teleport as sn, createApp as Wt, onUnmounted as xt, Fragment as Oe, watch as ve, nextTick as st, onBeforeMount as Fo, watchEffect as ko, Transition as un, mergeProps as de, shallowRef as Oo, render as jt, h as Mo, cloneVNode as Eo, inject as Tt, withDirectives as cn, vShow as Io, createTextVNode as He, onUpdated as Po, onBeforeUnmount as Do, reactive as Fe, isVNode as Gt, Comment as dn, provide as No, getCurrentInstance as $t, vModelCheckbox as Ro } from "vue";
4
+ import { ref as v, onMounted as pt, defineComponent as qe, computed as I, createVNode as r, Teleport as sn, createApp as Gt, onUnmounted as xt, Fragment as Oe, watch as ve, nextTick as st, onBeforeMount as Fo, watchEffect as ko, Transition as un, mergeProps as de, shallowRef as Oo, render as Vt, h as Mo, cloneVNode as Eo, inject as Bt, withDirectives as cn, vShow as Io, createTextVNode as He, onUpdated as Po, onBeforeUnmount as Do, reactive as Fe, isVNode as $t, Comment as dn, provide as No, getCurrentInstance as Ut, vModelCheckbox as Ro } from "vue";
5
5
  import { LocaleService as Ue } from "../locale/index.esm.js";
6
- import { useLocatorProps as Et, isMobilePhone as Ct, getMaxZIndex as an, locatorAttrs as Ot, locatorChild as Se, extractDataAttrs as Ho, useGuid as jo, useInputExpand as Vo, withInstall as fn, useCommonUtils as mn, resolveField as zo, getCustomClass as Ao } from "../common/index.esm.js";
7
- import It from "../drawer/index.esm.js";
6
+ import { useLocatorProps as It, isMobilePhone as Ct, getMaxZIndex as an, locatorAttrs as Mt, locatorChild as Se, extractDataAttrs as Ho, useGuid as jo, useInputExpand as Vo, withInstall as fn, useCommonUtils as mn, resolveField as zo, getCustomClass as Ao } from "../common/index.esm.js";
7
+ import Pt from "../drawer/index.esm.js";
8
8
  import "../property-panel/index.esm.js";
9
9
  import { FButton as ln } from "../button/index.esm.js";
10
10
  import "../field-selector/index.esm.js";
11
11
  import "../collection-property-editor/index.esm.js";
12
12
  import Lo from "../tags/index.esm.js";
13
- import { debounce as vn, isPlainObject as rn, cloneDeep as zt } from "lodash-es";
13
+ import { debounce as vn, isPlainObject as rn, cloneDeep as At } from "lodash-es";
14
14
  import _o from "../popover/index.esm.js";
15
15
  import { useResizeObserver as Wo } from "@vueuse/core";
16
16
  import { locatorGridGroup as pn, locatorGridRowId as gn, locatorGridRow as hn, locatorGridCell as yn, locatorChild as bn, SETTING_COLUMN_FIELD as Go, COMMAND_COLUMN_FIELD as $o, resolveEnumDisplayText as Cn, CellMode as wn, SETTING_COLUMN_DATA_TYPE as mt, COMMAND_COLUMN_DATA_TYPE as vt, useScreen as Uo, useIdentify as qo, useGroupData as Yo, useFilter as Xo, useHierarchy as Jo, useLoading as Zo, useDataView as Qo, usePagination as Ko, useSelection as ea, useDataViewContainerStyle as ta, useCommandColumn as na, useSettingColumn as oa, useColumn as aa, useSort as la, useGroupColumn as ia, useRow as ra, useEdit as sa, useVisualDataBound as ua, useVisualDataCell as ca, useVisualDataRow as da, useVisualGroupRow as fa, useVisualSummaryRow as ma, useVisualData as va, useCellContentStyle as pa, useCellPosition as ga, useSidebar as ha, useVirtualScroll as ya, useFitColumn as ba, useFilterHistory as Ca, useColumnFilter as wa, useDragColumn as xa, resolvePreviewFixedColumns as Sa, getColumnHeader as Ta, getPagination as Ba, getSidebar as Fa, getDisableMask as ka, getSummary as Oa, getHorizontalScrollbar as Ma, getVerticalScrollbar as Ea, getFilterPanel as Ia, getGroupPanel as Pa, useAdapt as Da, useNavigation as Na, getEmpty as Ra, ColumnSettingSolution as Ha, refreshScrollAfterDataSourceLoad as ja, applyReassignRowData as Va } from "../data-view/index.esm.js";
@@ -280,7 +280,7 @@ function Xa(e) {
280
280
  }), a = () => {
281
281
  o(), t && t.unmount();
282
282
  };
283
- return t = Wt({
283
+ return t = Gt({
284
284
  setup() {
285
285
  xt(() => {
286
286
  document.body.removeChild(n);
@@ -830,7 +830,7 @@ const yt = /* @__PURE__ */ qe({
830
830
  props: Za,
831
831
  emits: ["update:modelValue", "accept", "cancel", "closed", "resize", "esc", "enter", "stopMove", "buttonClick"],
832
832
  setup(e, n) {
833
- const t = Et(e), o = v(typeof t.width == "string" ? parseInt(t.width, 10) || 300 : t.width || 300), a = v(typeof t.height == "string" ? parseInt(t.height, 10) || 200 : t.height || 200), l = v(t.modelValue), c = v(t.id), h = v(t.class), d = v(t.fitContent), m = v(t.showHeader), S = v(""), s = v(t.showCloseButton), b = v(t.showMaxButton), u = v(!1), g = v(t.dialogType), y = v(t.src), p = v(""), C = v(t.showButtons), T = v(t.title), N = v(t.containment || null), D = v();
833
+ const t = It(e), o = v(typeof t.width == "string" ? parseInt(t.width, 10) || 300 : t.width || 300), a = v(typeof t.height == "string" ? parseInt(t.height, 10) || 200 : t.height || 200), l = v(t.modelValue), c = v(t.id), h = v(t.class), d = v(t.fitContent), m = v(t.showHeader), S = v(""), s = v(t.showCloseButton), b = v(t.showMaxButton), u = v(!1), g = v(t.dialogType), y = v(t.src), p = v(""), C = v(t.showButtons), T = v(t.title), N = v(t.containment || null), D = v();
834
834
  T.value === "错误提示" && (T.value = Ue.getLocaleValue("messageBox.errorTitle"));
835
835
  const G = v(!1);
836
836
  function Y() {
@@ -1049,7 +1049,7 @@ const yt = /* @__PURE__ */ qe({
1049
1049
  }, [_.value.map((x) => {
1050
1050
  var le;
1051
1051
  const X = v(x.disabled), ae = x.class || ((le = x.appearance) == null ? void 0 : le.class) || "btn btn-secondary";
1052
- return r("button", de(x.id ? Ot(x.id) : x.name ? Se(t.id, x.name) : {}, Ho(x), {
1052
+ return r("button", de(x.id ? Mt(x.id) : x.name ? Se(t.id, x.name) : {}, Ho(x), {
1053
1053
  name: x.name,
1054
1054
  style: x.styles,
1055
1055
  type: "button",
@@ -1099,7 +1099,7 @@ const yt = /* @__PURE__ */ qe({
1099
1099
  }
1100
1100
  function ue() {
1101
1101
  var x, X;
1102
- return r("div", de(Ot(t.id), {
1102
+ return r("div", de(Mt(t.id), {
1103
1103
  class: xe.value,
1104
1104
  style: Ye.value,
1105
1105
  ref: L
@@ -1146,7 +1146,7 @@ function Sn(e) {
1146
1146
  function nl(e) {
1147
1147
  const n = document.createElement("div");
1148
1148
  n.style.display = "contents";
1149
- const t = e.type || "modal", o = Wt({
1149
+ const t = e.type || "modal", o = Gt({
1150
1150
  setup(a, l) {
1151
1151
  xt(() => {
1152
1152
  document.body.removeChild(n);
@@ -1158,7 +1158,7 @@ function nl(e) {
1158
1158
  if (l.expose({
1159
1159
  ref: c
1160
1160
  }), t === "drawer")
1161
- return () => r(It, {
1161
+ return () => r(Pt, {
1162
1162
  ref: c,
1163
1163
  modelValue: d.value,
1164
1164
  "onUpdate:modelValue": (G) => d.value = G,
@@ -1273,7 +1273,7 @@ class Tn {
1273
1273
  h(C, this.isUseEscCloseModal.value ? "esc" : T ? "icon" : "button");
1274
1274
  }, s = (C) => {
1275
1275
  S(C), m && st(() => {
1276
- if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], jt(null, t), m = null, this.modalRef.value = null, this.modalRefs) {
1276
+ if (this.modalRefs[this.activeModalIndex.value] && delete this.modalRefs[this.activeModalIndex.value], Vt(null, t), m = null, this.modalRef.value = null, this.modalRefs) {
1277
1277
  const T = Object.keys(this.modalRefs).map((N) => Number(N));
1278
1278
  T.length > 0 ? this.activeModalIndex.value = Math.max(...T) : this.activeModalIndex.value = 0, this.modalRefs[this.activeModalIndex.value] && (this.modalRef.value = this.modalRefs[this.activeModalIndex.value]);
1279
1279
  }
@@ -1282,7 +1282,7 @@ class Tn {
1282
1282
  }, b = v();
1283
1283
  let u;
1284
1284
  if (o === "drawer")
1285
- u = () => r(It, de({
1285
+ u = () => r(Pt, de({
1286
1286
  ref: b,
1287
1287
  modelValue: l.value,
1288
1288
  "onUpdate:modelValue": (C) => l.value = C,
@@ -1323,7 +1323,7 @@ class Tn {
1323
1323
  }
1324
1324
  m = ((C) => {
1325
1325
  const T = Mo(u, C);
1326
- return T.appContext = this.appContext, jt(T, t), T;
1326
+ return T.appContext = this.appContext, Vt(T, t), T;
1327
1327
  })({
1328
1328
  ...a.value
1329
1329
  }), this.activeModalIndex.value++;
@@ -1333,7 +1333,7 @@ class Tn {
1333
1333
  a.value = {
1334
1334
  ...a.value,
1335
1335
  ...C
1336
- }, m && jt(Eo(m, {
1336
+ }, m && Vt(Eo(m, {
1337
1337
  ...a
1338
1338
  }), t);
1339
1339
  };
@@ -1378,7 +1378,7 @@ function ol(e, n, t, o, a) {
1378
1378
  const l = v(e.buttonBehavior), c = v(e.popupOnInput), h = I(() => ({
1379
1379
  "input-group-append": !0,
1380
1380
  "append-force-show": e.showButtonWhenDisabled && (e.readonly || e.disable)
1381
- })), { judgeCanOpen: d } = Bn(e, a), m = I(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), S = Tt(bt, null), s = v();
1381
+ })), { judgeCanOpen: d } = Bn(e, a), m = I(() => e.showButtonWhenDisabled || (!e.editable || !e.readonly) && !e.disable), S = Bt(bt, null), s = v();
1382
1382
  async function b(y) {
1383
1383
  if (await d() && m.value) {
1384
1384
  const p = !!n.slots.default;
@@ -1713,7 +1713,7 @@ function cl(e, n, t) {
1713
1713
  }, h = () => {
1714
1714
  a(), n.emit("hidden");
1715
1715
  };
1716
- return () => Ct() ? r(It, de(Se(e.id, "drawer"), {
1716
+ return () => Ct() ? r(Pt, de(Se(e.id, "drawer"), {
1717
1717
  ref: l,
1718
1718
  position: e.placement,
1719
1719
  width: "auto",
@@ -1755,7 +1755,7 @@ const Fn = /* @__PURE__ */ qe({
1755
1755
  props: Wa,
1756
1756
  emits: Ga,
1757
1757
  setup(e, n) {
1758
- const t = Et(e), o = n, a = v(), l = v(t.customClass), c = v(t.modelValue), h = il(t, o, a, c), {
1758
+ const t = It(e), o = n, a = v(), l = v(t.customClass), c = v(t.modelValue), h = il(t, o, a, c), {
1759
1759
  shouldPopupContent: d,
1760
1760
  hidePopup: m,
1761
1761
  showPopup: S,
@@ -1865,7 +1865,7 @@ const Fn = /* @__PURE__ */ qe({
1865
1865
  var M, A;
1866
1866
  return r(Oe, null, [r("div", de({
1867
1867
  ref: a
1868
- }, Ot(t.id), n.attrs, {
1868
+ }, Mt(t.id), n.attrs, {
1869
1869
  class: F.value,
1870
1870
  style: W.value
1871
1871
  }), [r("div", de(Se(t.id, "input-group"), {
@@ -1881,7 +1881,7 @@ fn(Fn);
1881
1881
  function kn(e, n) {
1882
1882
  let t;
1883
1883
  function o(s) {
1884
- const { properties: b, title: u, ignore: g } = s, y = g && Array.isArray(g), p = Object.keys(b).reduce((C, T) => ((!y || !g.find((N) => N === T)) && (C[T] = b[T].type === "object" && b[T].properties ? o(b[T]) : zt(b[T].default)), C), {});
1884
+ const { properties: b, title: u, ignore: g } = s, y = g && Array.isArray(g), p = Object.keys(b).reduce((C, T) => ((!y || !g.find((N) => N === T)) && (C[T] = b[T].type === "object" && b[T].properties ? o(b[T]) : At(b[T].default)), C), {});
1885
1885
  if (u && (!y || !g.find((C) => C === "id"))) {
1886
1886
  const C = u.toLowerCase().replace(/-/g, "_");
1887
1887
  p.id = `${C}_${Math.random().toString().slice(2, 6)}`;
@@ -1891,7 +1891,7 @@ function kn(e, n) {
1891
1891
  function a(s) {
1892
1892
  const { properties: b, title: u, required: g } = s;
1893
1893
  if (g && Array.isArray(g)) {
1894
- const y = g.reduce((p, C) => (p[C] = b[C].type === "object" && b[C].properties ? o(b[C]) : zt(b[C].default), p), {});
1894
+ const y = g.reduce((p, C) => (p[C] = b[C].type === "object" && b[C].properties ? o(b[C]) : At(b[C].default), p), {});
1895
1895
  if (u && g.find((p) => p === "id")) {
1896
1896
  const p = u.toLowerCase().replace(/-/g, "_");
1897
1897
  y.id = `${p}_${Math.random().toString().slice(2, 6)}`;
@@ -2646,7 +2646,7 @@ const Ql = {
2646
2646
  /** 是否禁用分页。 */
2647
2647
  disabled: { type: Boolean, default: !1 }
2648
2648
  };
2649
- function Bt(e) {
2649
+ function Ft(e) {
2650
2650
  const n = e == null ? void 0 : e.fitColumns;
2651
2651
  return n === !0 || typeof n == "object" && n !== null && "enable" in n && n.enable === !0;
2652
2652
  }
@@ -3007,7 +3007,7 @@ function ii(e, n, t, o, a, l, c, h, d, m, S, s, b, u, g, y, p) {
3007
3007
  } = h, {
3008
3008
  navigateOnKeyUp: Te,
3009
3009
  navigateOnKeyDown: Ye
3010
- } = S, Xe = (f) => (f || []).some((i) => Gt(i) ? !(i.type === dn || i.type === Oe && !Xe(i.children)) : !0) ? f : null, we = (f) => {
3010
+ } = S, Xe = (f) => (f || []).some((i) => $t(i) ? !(i.type === dn || i.type === Oe && !Xe(i.children)) : !0) ? f : null, we = (f) => {
3011
3011
  var i, O, P;
3012
3012
  return ((O = (i = f.column) == null ? void 0 : i.editor) == null ? void 0 : O.type) === "switch" || ((P = f.column) == null ? void 0 : P.dataType) === "boolean" ? {
3013
3013
  display: "flex",
@@ -3406,14 +3406,14 @@ function si(e, n, t, o, a, l, c, h, d, m, S, s, b, u, g, y, p) {
3406
3406
  hasRightFixedColumn: xe
3407
3407
  } = h, Te = I(() => {
3408
3408
  var O;
3409
- if (e.displayType !== "Card" || (((O = e.columns) == null ? void 0 : O.length) ?? 0) === 0 || e.fit && Bt(e.columnOption))
3409
+ if (e.displayType !== "Card" || (((O = e.columns) == null ? void 0 : O.length) ?? 0) === 0 || e.fit && Ft(e.columnOption))
3410
3410
  return;
3411
3411
  const i = fe.value.primaryColumnsWidth || 0;
3412
3412
  return i > 0 ? `${i}px` : void 0;
3413
3413
  }), {
3414
3414
  navigateOnKeyUp: Ye,
3415
3415
  navigateOnKeyDown: Xe
3416
- } = S, we = (i) => (i || []).some((O) => Gt(O) ? !(O.type === dn || O.type === Oe && !we(O.children)) : !0) ? i : null, Be = (i) => {
3416
+ } = S, we = (i) => (i || []).some((O) => $t(O) ? !(O.type === dn || O.type === Oe && !we(O.children)) : !0) ? i : null, Be = (i) => {
3417
3417
  var O, P, z;
3418
3418
  return ((P = (O = i.column) == null ? void 0 : O.editor) == null ? void 0 : P.type) === "switch" || ((z = i.column) == null ? void 0 : z.dataType) === "boolean" ? {
3419
3419
  display: "flex",
@@ -3620,7 +3620,7 @@ function si(e, n, t, o, a, l, c, h, d, m, S, s, b, u, g, y, p) {
3620
3620
  onMouseout: (re) => J(re, i)
3621
3621
  }), [Object.values(i.data).filter((re) => O[re.field] && re.rowSpan === 1).map((re) => {
3622
3622
  var St, gt, at;
3623
- const Pt = n.slots.cellTemplate && we(n.slots.cellTemplate({
3623
+ const Dt = n.slots.cellTemplate && we(n.slots.cellTemplate({
3624
3624
  cell: re,
3625
3625
  row: i
3626
3626
  })), Ie = W(i, re, O);
@@ -3640,7 +3640,7 @@ function si(e, n, t, o, a, l, c, h, d, m, S, s, b, u, g, y, p) {
3640
3640
  }), [r("div", {
3641
3641
  class: k(re),
3642
3642
  style: oe(re)
3643
- }, [Pt ? (at = (gt = n.slots).cellTemplate) == null ? void 0 : at.call(gt, {
3643
+ }, [Dt ? (at = (gt = n.slots).cellTemplate) == null ? void 0 : at.call(gt, {
3644
3644
  cell: re,
3645
3645
  row: i
3646
3646
  }) : nt(re, i)])]);
@@ -3656,7 +3656,7 @@ function si(e, n, t, o, a, l, c, h, d, m, S, s, b, u, g, y, p) {
3656
3656
  }
3657
3657
  function x(i, O, P) {
3658
3658
  var ie, he;
3659
- const z = i.height || ((ie = e.rowOption) == null ? void 0 : ie.height) || 28, U = e.displayType === "Card" && (((he = e.columns) == null ? void 0 : he.length) ?? 0) > 0 && !(e.fit && Bt(e.columnOption)), Z = r(ri, {
3659
+ const z = i.height || ((ie = e.rowOption) == null ? void 0 : ie.height) || 28, U = e.displayType === "Card" && (((he = e.columns) == null ? void 0 : he.length) ?? 0) > 0 && !(e.fit && Ft(e.columnOption)), Z = r(ri, {
3660
3660
  columns: p.value,
3661
3661
  fields: P,
3662
3662
  mainTitle: e.cardMainTitle,
@@ -3708,7 +3708,7 @@ function si(e, n, t, o, a, l, c, h, d, m, S, s, b, u, g, y, p) {
3708
3708
  ...Te.value ? {
3709
3709
  minWidth: Te.value
3710
3710
  } : {},
3711
- ...Bt(e.columnOption) && e.fit ? {
3711
+ ...Ft(e.columnOption) && e.fit ? {
3712
3712
  maxWidth: "100%"
3713
3713
  } : {}
3714
3714
  } : {}
@@ -3782,7 +3782,7 @@ function si(e, n, t, o, a, l, c, h, d, m, S, s, b, u, g, y, p) {
3782
3782
  };
3783
3783
  }
3784
3784
  function ui(e) {
3785
- return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !Gt(e);
3785
+ return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !$t(e);
3786
3786
  }
3787
3787
  const En = /* @__PURE__ */ qe({
3788
3788
  name: "FDataGrid",
@@ -3790,7 +3790,7 @@ const En = /* @__PURE__ */ qe({
3790
3790
  emits: ti,
3791
3791
  setup(e, n) {
3792
3792
  var tn, nn;
3793
- const t = Et(e), {
3793
+ const t = It(e), {
3794
3794
  isSmall: o
3795
3795
  } = Uo(), a = n, l = ai(t);
3796
3796
  let c = [], h = [];
@@ -3811,7 +3811,7 @@ const En = /* @__PURE__ */ qe({
3811
3811
  return t.displayType === "Card" && (((w = t.columns) == null ? void 0 : w.length) ?? 0) === 0;
3812
3812
  }), De = I(() => {
3813
3813
  var w;
3814
- return t.displayType === "Card" && (((w = t.columns) == null ? void 0 : w.length) ?? 0) > 0 && !!t.fit && Bt(t.columnOption);
3814
+ return t.displayType === "Card" && (((w = t.columns) == null ? void 0 : w.length) ?? 0) > 0 && !!t.fit && Ft(t.columnOption);
3815
3815
  });
3816
3816
  I(() => {
3817
3817
  const w = Ce.value;
@@ -3905,7 +3905,7 @@ const En = /* @__PURE__ */ qe({
3905
3905
  renderGridColumnResizeOverlay: Q,
3906
3906
  shouldShowHeader: re
3907
3907
  } = Ta(l, a, p, T, N, we, k, O, i, _, f, Ge, je, R, Le, Be, ue, ae, D, d, ie), {
3908
- renderDataGridPagination: Pt
3908
+ renderDataGridPagination: Dt
3909
3909
  } = Ba(l, a, k, ue, oe, R), {
3910
3910
  renderDataGridSidebar: Ie
3911
3911
  } = Fa(l, Ee, R, Le, ue), {
@@ -3923,19 +3923,22 @@ const En = /* @__PURE__ */ qe({
3923
3923
  renderGroupPanel: Nn
3924
3924
  } = Pa(l, k, O, W, ue);
3925
3925
  let ut = null, ct = null;
3926
- function Yt() {
3926
+ function Tt() {
3927
3927
  F.value && (ct !== null && cancelAnimationFrame(ct), ct = requestAnimationFrame(() => {
3928
3928
  ct = null;
3929
3929
  const w = D.value;
3930
- w.length && (Je.recalculateRowHeights(w), D.value = [...w]);
3930
+ w.length && Je.recalculateRowHeights(w) && (D.value = [...w]);
3931
3931
  }));
3932
3932
  }
3933
+ ve(() => D.value.length, () => {
3934
+ Tt();
3935
+ });
3933
3936
  function Rn() {
3934
3937
  var V;
3935
3938
  if (!p.value)
3936
3939
  return;
3937
3940
  const w = Math.ceil(p.value.clientHeight / S.value);
3938
- w > b.value && (b.value = w, ke()), X.value = ((V = C.value) == null ? void 0 : V.clientHeight) || 0, x.value = p.value.clientWidth || 0, C.value && (ae.value = C.value.clientWidth), _e(), Yt();
3941
+ w > b.value && (b.value = w, ke()), X.value = ((V = C.value) == null ? void 0 : V.clientHeight) || 0, x.value = p.value.clientWidth || 0, C.value && (ae.value = C.value.clientWidth), _e(), Tt();
3939
3942
  }
3940
3943
  function Hn() {
3941
3944
  ut !== null && cancelAnimationFrame(ut), ut = requestAnimationFrame(() => {
@@ -3943,7 +3946,7 @@ const En = /* @__PURE__ */ qe({
3943
3946
  });
3944
3947
  }
3945
3948
  pt(() => {
3946
- p.value && (b.value = Math.max(Math.ceil(p.value.clientHeight / S.value), b.value), D.value = Ze(0, se.value + m - 1), Wo(p.value, Hn), _e(), Yt(), st(() => {
3949
+ p.value && (b.value = Math.max(Math.ceil(p.value.clientHeight / S.value), b.value), D.value = Ze(0, se.value + m - 1), Wo(p.value, Hn), _e(), Tt(), st(() => {
3947
3950
  p.value && (x.value = p.value.clientWidth), C.value && (ae.value = C.value.clientWidth, X.value = C.value.clientHeight);
3948
3951
  })), H.value && j();
3949
3952
  }), xt(() => {
@@ -4000,7 +4003,7 @@ const En = /* @__PURE__ */ qe({
4000
4003
  ve(() => t.showSetting, (w, V) => {
4001
4004
  w !== V && (w ? Ye(u) : Xe(u), dt(u.value));
4002
4005
  });
4003
- function Dt(w) {
4006
+ function Nt(w) {
4004
4007
  oe.updatePagination(w);
4005
4008
  }
4006
4009
  function Jt(w, V) {
@@ -4011,7 +4014,7 @@ const En = /* @__PURE__ */ qe({
4011
4014
  savedOffsetY: ee,
4012
4015
  resetScroll: le,
4013
4016
  scrollTo: ue.scrollTo
4014
- }), D.value.length || (M.value = []), nt.value && B.value && A();
4017
+ }), Tt(), D.value.length || (M.value = []), nt.value && B.value && A();
4015
4018
  }
4016
4019
  }
4017
4020
  ve(k.shouldGroupingData, (w, V) => {
@@ -4023,14 +4026,14 @@ const En = /* @__PURE__ */ qe({
4023
4026
  }
4024
4027
  dt(w);
4025
4028
  });
4026
- function Nt(w) {
4029
+ function Rt(w) {
4027
4030
  Ee.activeRowById(w);
4028
4031
  }
4029
- const $n = Da(R, k, _, u, oe, g, we, Be, dt, Jt, Dt);
4032
+ const $n = Da(R, k, _, u, oe, g, we, Be, dt, Jt, Nt);
4030
4033
  function Un(w, V = {
4031
4034
  isCurrent: !0
4032
4035
  }) {
4033
- V != null && V.isCurrent && Nt(w), R.selectItemById(w);
4036
+ V != null && V.isCurrent && Rt(w), R.selectItemById(w);
4034
4037
  }
4035
4038
  function qn(w) {
4036
4039
  const V = g.idField.value, q = D.value.find((ee) => ee.raw[V] === w);
@@ -4074,7 +4077,7 @@ const En = /* @__PURE__ */ qe({
4074
4077
  function no(w, V = {
4075
4078
  clearCurrent: !0
4076
4079
  }) {
4077
- V != null && V.clearCurrent && Nt(""), R.unSelectItemByIds(w);
4080
+ V != null && V.clearCurrent && Rt(""), R.unSelectItemByIds(w);
4078
4081
  }
4079
4082
  function Zt() {
4080
4083
  R.clearSelection();
@@ -4092,7 +4095,7 @@ const En = /* @__PURE__ */ qe({
4092
4095
  ue.scrollRowIntoView(w);
4093
4096
  }
4094
4097
  function ro() {
4095
- R.keepSelectingOnPaging.value || Zt(), k.updateVisibleDataSummary(D.value), Dt({
4098
+ R.keepSelectingOnPaging.value || Zt(), k.updateVisibleDataSummary(D.value), Nt({
4096
4099
  total: k.dataView.value.length,
4097
4100
  index: 1
4098
4101
  });
@@ -4108,7 +4111,7 @@ const En = /* @__PURE__ */ qe({
4108
4111
  }
4109
4112
  function fo() {
4110
4113
  var w;
4111
- (w = $t()) == null || w.update();
4114
+ (w = Ut()) == null || w.update();
4112
4115
  }
4113
4116
  function mo(w) {
4114
4117
  const V = g.idField.value;
@@ -4124,8 +4127,8 @@ const En = /* @__PURE__ */ qe({
4124
4127
  }
4125
4128
  return -1;
4126
4129
  }
4127
- const Rt = {
4128
- activeRowById: Nt,
4130
+ const Ht = {
4131
+ activeRowById: Rt,
4129
4132
  selectRowById: Yn,
4130
4133
  addNewDataItem: jn,
4131
4134
  addNewDataItemAtLast: Vn,
@@ -4138,7 +4141,7 @@ const En = /* @__PURE__ */ qe({
4138
4141
  selectItemByIds: Xn,
4139
4142
  updateColumns: dt,
4140
4143
  updateDataSource: Jt,
4141
- updatePagination: Dt,
4144
+ updatePagination: Nt,
4142
4145
  getVisibleData: Jn,
4143
4146
  getVisibleDataByIds: Zn,
4144
4147
  getSelectedItems: Kn,
@@ -4161,12 +4164,12 @@ const En = /* @__PURE__ */ qe({
4161
4164
  forceUpdate: fo,
4162
4165
  getDataIndexById: mo
4163
4166
  };
4164
- n.expose(Rt);
4165
- const Qt = Na(l, a, Rt, we, pe, D), {
4167
+ n.expose(Ht);
4168
+ const Qt = Na(l, a, Ht, we, pe, D), {
4166
4169
  renderDataArea: vo
4167
4170
  } = ii(t, a, C, T, N, Qe, Ae, we, pe, W, Qt, Ee, ze, ue, D, k), {
4168
4171
  renderDataArea: po
4169
- } = si(t, a, C, T, N, Qe, Ae, we, pe, W, Qt, Ee, ze, ue, D, k, u), Ht = I(() => !D.value || !D.value.length), {
4172
+ } = si(t, a, C, T, N, Qe, Ae, we, pe, W, Qt, Ee, ze, ue, D, k, u), jt = I(() => !D.value || !D.value.length), {
4170
4173
  renderEmpty: Kt
4171
4174
  } = Ra(l, a), go = I(() => ({
4172
4175
  "d-flex": !0,
@@ -4187,7 +4190,7 @@ const En = /* @__PURE__ */ qe({
4187
4190
  useFitColumnComposition: Ge,
4188
4191
  useSortComposition: Be,
4189
4192
  useVirtualScrollComposition: ue,
4190
- dataGridComponentInstance: Rt
4193
+ dataGridComponentInstance: Ht
4191
4194
  });
4192
4195
  function bo(w) {
4193
4196
  let V;
@@ -4233,7 +4236,7 @@ const En = /* @__PURE__ */ qe({
4233
4236
  }
4234
4237
  function wo() {
4235
4238
  const w = R.currentSelectedDataId.value, V = D.value.find((q) => q.raw[t.idField] === w);
4236
- return V ? r(It, {
4239
+ return V ? r(Pt, {
4237
4240
  id: Se(t.id, "row-edit").id,
4238
4241
  showHeader: !1,
4239
4242
  modelValue: pe.showRowEditPanel.value,
@@ -4274,7 +4277,7 @@ const En = /* @__PURE__ */ qe({
4274
4277
  } : {
4275
4278
  width: "max-content",
4276
4279
  minWidth: "100%"
4277
- }, V = re.value && u.value.length > 0 ? he() : null, q = en(), ee = Ht.value ? Kt() : null, me = fe.value || De.value, ge = (((ne = D.value) == null ? void 0 : ne.length) ?? 0) > 0 ? "auto" : "visible";
4280
+ }, V = re.value && u.value.length > 0 ? he() : null, q = en(), ee = jt.value ? Kt() : null, me = fe.value || De.value, ge = (((ne = D.value) == null ? void 0 : ne.length) ?? 0) > 0 ? "auto" : "visible";
4278
4281
  return me ? r("div", {
4279
4282
  style: {
4280
4283
  ...w,
@@ -4312,7 +4315,7 @@ const En = /* @__PURE__ */ qe({
4312
4315
  var w, V;
4313
4316
  return t.visible && r(Oe, null, [r("div", de({
4314
4317
  ref: y
4315
- }, Ot(t.id), {
4318
+ }, Mt(t.id), {
4316
4319
  class: P.value,
4317
4320
  style: Ce.value,
4318
4321
  onWheel: ot
@@ -4326,12 +4329,12 @@ const En = /* @__PURE__ */ qe({
4326
4329
  onMouseleave: (q) => {
4327
4330
  q.stopPropagation(), G.value !== "always" && Y.value && !s.value && (Y.value = !1);
4328
4331
  }
4329
- }, [p.value && s.value ? xo() : [p.value && !s.value && Ie(D), p.value && en(), p.value && Ht.value && !s.value && Kt()], p.value && ht(), p.value && !Ht.value && Dn()]), p.value && (at.value === "bottom" || at.value === "both") && !s.value && gt(), (te.value || E.value) && !s.value && r("div", {
4332
+ }, [p.value && s.value ? xo() : [p.value && !s.value && Ie(D), p.value && en(), p.value && jt.value && !s.value && Kt()], p.value && ht(), p.value && !jt.value && Dn()]), p.value && (at.value === "bottom" || at.value === "both") && !s.value && gt(), (te.value || E.value) && !s.value && r("div", {
4330
4333
  class: go.value,
4331
4334
  style: ho.value
4332
4335
  }, [E.value && r("div", {
4333
4336
  class: yo.value
4334
- }, [r("div", Se(t.id, "selection-info"), ["已选:" + M.value.length, He(" 条")])]), te.value && Pt()]), Q(), J.value && St()]), o() && wo(), t.enableColumnSettingSolution && r(Ha, {
4337
+ }, [r("div", Se(t.id, "selection-info"), ["已选:" + M.value.length, He(" 条")])]), te.value && Dt()]), Q(), J.value && St()]), o() && wo(), t.enableColumnSettingSolution && r(Ha, {
4335
4338
  ref: U,
4336
4339
  columns: [...u.value, ...c],
4337
4340
  componentId: t.id,
@@ -4392,12 +4395,12 @@ const ci = {
4392
4395
  buttons: { type: Object, default: [] },
4393
4396
  enableNeverShowAgain: { Type: Boolean, default: !1 }
4394
4397
  };
4395
- function Ut() {
4398
+ function qt() {
4396
4399
  return new DOMException("The request is not allowed", "NotAllowedError");
4397
4400
  }
4398
4401
  async function di(e) {
4399
4402
  if (!navigator.clipboard)
4400
- throw Ut();
4403
+ throw qt();
4401
4404
  return navigator.clipboard.writeText(e);
4402
4405
  }
4403
4406
  async function fi(e) {
@@ -4412,7 +4415,7 @@ async function fi(e) {
4412
4415
  t == null || t.removeAllRanges(), window.document.body.removeChild(n);
4413
4416
  }
4414
4417
  if (!a)
4415
- throw Ut();
4418
+ throw qt();
4416
4419
  }
4417
4420
  async function mi(e) {
4418
4421
  try {
@@ -4421,7 +4424,7 @@ async function mi(e) {
4421
4424
  try {
4422
4425
  await fi(e);
4423
4426
  } catch (t) {
4424
- throw t || n || Ut();
4427
+ throw t || n || qt();
4425
4428
  }
4426
4429
  }
4427
4430
  }
@@ -4679,27 +4682,27 @@ function Ti(e) {
4679
4682
  neverShowAgain: o("messageBox.neverShowAgain") || "不再提示"
4680
4683
  };
4681
4684
  }
4682
- function At(e) {
4685
+ function Lt(e) {
4683
4686
  return e ? Object.keys(e).reduce((n, t) => (t.startsWith("data-") && (n[t] = e[t]), n), {}) : {};
4684
4687
  }
4685
- function Mt(e) {
4688
+ function Et(e) {
4686
4689
  return e == null || e === "" ? "" : String(e).replace(/[^A-Za-z0-9_-]/g, "-");
4687
4690
  }
4688
4691
  function Bi(e, n) {
4689
- return Mt(e) || Mt(n);
4692
+ return Et(e) || Et(n);
4690
4693
  }
4691
4694
  function Fi(e) {
4692
- const n = $t();
4695
+ const n = Ut();
4693
4696
  if (!n)
4694
4697
  return {};
4695
- const { attrs: t, props: o } = n, a = Mt(e), l = Bi(
4698
+ const { attrs: t, props: o } = n, a = Et(e), l = Bi(
4696
4699
  o == null ? void 0 : o.id,
4697
4700
  t["data-testid"]
4698
4701
  );
4699
- return l ? a === l ? At(t) : {} : a ? {} : At(t);
4702
+ return l ? a === l ? Lt(t) : {} : a ? {} : Lt(t);
4700
4703
  }
4701
4704
  function ki(e, n) {
4702
- const t = Mt(e), o = { ...Fi(e), ...At(n) };
4705
+ const t = Et(e), o = { ...Fi(e), ...Lt(n) };
4703
4706
  return t ? { id: t, "data-testid": t, ...o } : { ...o };
4704
4707
  }
4705
4708
  const Oi = ["moz", "ms", "webkit"];
@@ -4722,7 +4725,7 @@ function Ei() {
4722
4725
  }
4723
4726
  Ei();
4724
4727
  v("");
4725
- function qt() {
4728
+ function Yt() {
4726
4729
  if (typeof window > "u" || typeof navigator > "u")
4727
4730
  return !1;
4728
4731
  const e = navigator.userAgent || navigator.vendor || window.opera, n = [
@@ -4756,16 +4759,16 @@ function qt() {
4756
4759
  return !!(o && c <= 768);
4757
4760
  }
4758
4761
  function Ii() {
4759
- const e = qt();
4762
+ const e = Yt();
4760
4763
  return e && document.body.classList.add("f-mobile"), e;
4761
4764
  }
4762
4765
  typeof document < "u" && Ii();
4763
- const Ft = /* @__PURE__ */ qe({
4766
+ const kt = /* @__PURE__ */ qe({
4764
4767
  name: "FMessageBox",
4765
4768
  props: ci,
4766
4769
  emits: ["accept", "reject", "close", "neverShowAgain"],
4767
4770
  setup(e, n) {
4768
- const t = Et(e), o = Ti(t), a = v(t.type), l = v(t.title), c = v(t.detail), h = I(() => {
4771
+ const t = It(e), o = Ti(t), a = v(t.type), l = v(t.title), c = v(t.detail), h = I(() => {
4769
4772
  const T = {
4770
4773
  "modal-tips": !0,
4771
4774
  "d-flex": !0,
@@ -4797,7 +4800,7 @@ const Ft = /* @__PURE__ */ qe({
4797
4800
  }
4798
4801
  const p = y(), C = Si(t, n, m, s, o);
4799
4802
  return () => r("div", de({
4800
- class: ["farris-messager", qt() ? "is-mobile" : ""]
4803
+ class: ["farris-messager", Yt() ? "is-mobile" : ""]
4801
4804
  }, ki(t.id)), [!t.exceptionInfo && r("div", {
4802
4805
  style: "height: 30px;width: 100%;position: absolute;",
4803
4806
  class: "messager-draggable"
@@ -4823,7 +4826,7 @@ const Ft = /* @__PURE__ */ qe({
4823
4826
  });
4824
4827
  const l = !1, c = a.type === "error" || a.type === "prompt", h = a.type === "error" ? "错误提示" : a.type === "prompt" && a.title || "", d = a.acceptCallback || (() => {
4825
4828
  }), m = a.rejectCallback || (() => {
4826
- }), S = $t();
4829
+ }), S = Ut();
4827
4830
  let s = null;
4828
4831
  if (S && S.appContext) {
4829
4832
  const {
@@ -4846,7 +4849,7 @@ const Ft = /* @__PURE__ */ qe({
4846
4849
  showMaxButton: !1,
4847
4850
  draggable: !0,
4848
4851
  dragHandle: ".messager-draggable",
4849
- render: () => r(Ft, de(a, {
4852
+ render: () => r(kt, de(a, {
4850
4853
  onAccept: d,
4851
4854
  onReject: m,
4852
4855
  onClose: g,
@@ -4936,8 +4939,8 @@ const Ft = /* @__PURE__ */ qe({
4936
4939
  };
4937
4940
  $e(Pe, "app", null);
4938
4941
  let wt = Pe;
4939
- Ft.install = (e) => {
4940
- e.component(Ft.name, Ft), wt.app = e, e.provide("FMessageBoxService", wt);
4942
+ kt.install = (e) => {
4943
+ e.component(kt.name, kt), wt.app = e, e.provide("FMessageBoxService", wt);
4941
4944
  };
4942
4945
  const Pi = "https://json-schema.org/draft/2020-12/schema", Di = "https://farris-design.gitee.io/mapping-editor.schema.json", Ni = "mapping-editor", Ri = "A Farris Input Component", Hi = "object", ji = {
4943
4946
  fromData: {
@@ -5040,7 +5043,7 @@ const Pi = "https://json-schema.org/draft/2020-12/schema", Di = "https://farris-
5040
5043
  showCloseButton: { type: Boolean, default: !0 },
5041
5044
  animate: { type: String, default: "fadeIn" },
5042
5045
  options: { type: Object }
5043
- }, Lt = /* @__PURE__ */ qe({
5046
+ }, _t = /* @__PURE__ */ qe({
5044
5047
  name: "Toast",
5045
5048
  props: Li,
5046
5049
  emits: ["close", "click"],
@@ -5121,13 +5124,13 @@ const Pi = "https://json-schema.org/draft/2020-12/schema", Di = "https://farris-
5121
5124
  innerHTML: a.value.message
5122
5125
  }, null))])])]);
5123
5126
  }
5124
- }), kt = /* @__PURE__ */ qe({
5127
+ }), Ot = /* @__PURE__ */ qe({
5125
5128
  name: "Notify",
5126
5129
  props: Ai,
5127
5130
  emits: ["close", "empty"],
5128
5131
  setup(e, n) {
5129
5132
  var y;
5130
- const t = qt(), a = `farris-notify-${(y = e.options) != null && y.type ? e.options.type : "info"}}`, l = I(() => ({
5133
+ const t = Yt(), a = `farris-notify-${(y = e.options) != null && y.type ? e.options.type : "info"}}`, l = I(() => ({
5131
5134
  "farris-notify": !0,
5132
5135
  [a]: t
5133
5136
  })), c = {
@@ -5167,7 +5170,7 @@ const Pi = "https://json-schema.org/draft/2020-12/schema", Di = "https://farris-
5167
5170
  class: l.value,
5168
5171
  style: b.value,
5169
5172
  ref: h
5170
- }, [r(Lt, {
5173
+ }, [r(_t, {
5171
5174
  options: d.value,
5172
5175
  showCloseButton: m.value,
5173
5176
  animate: e.animate,
@@ -5197,7 +5200,7 @@ class _i {
5197
5200
  ...n
5198
5201
  }), l = document.createElement("div");
5199
5202
  l.style.display = "contents";
5200
- const c = Wt({
5203
+ const c = Gt({
5201
5204
  setup() {
5202
5205
  var m;
5203
5206
  const h = v();
@@ -5222,7 +5225,7 @@ class _i {
5222
5225
  name: "fade",
5223
5226
  appear: !0
5224
5227
  }, {
5225
- default: () => [r(kt, de({
5228
+ default: () => [r(Ot, de({
5226
5229
  ref: h
5227
5230
  }, a, {
5228
5231
  onClose: d
@@ -5296,23 +5299,23 @@ class _i {
5296
5299
  }
5297
5300
  }
5298
5301
  const Pn = Symbol("NOTIFY_SERVICE_TOKEN");
5299
- kt.install = (e) => {
5300
- e.component(kt.name, kt), e.component(Lt.name, Lt);
5302
+ Ot.install = (e) => {
5303
+ e.component(Ot.name, Ot), e.component(_t.name, _t);
5301
5304
  const n = new _i();
5302
5305
  e.provide(Pn, n), e.provide("FNotifyService", n);
5303
5306
  };
5304
- function _t(e) {
5307
+ function Wt(e) {
5305
5308
  return e.reduce((n, t) => {
5306
5309
  var o;
5307
- return n.push(t.data), (o = t.children) != null && o.length && n.push(..._t(t.children)), n;
5310
+ return n.push(t.data), (o = t.children) != null && o.length && n.push(...Wt(t.children)), n;
5308
5311
  }, []);
5309
5312
  }
5310
- const Vt = /* @__PURE__ */ qe({
5313
+ const zt = /* @__PURE__ */ qe({
5311
5314
  name: "FMappingEditor",
5312
5315
  props: In,
5313
5316
  emits: ["submitModal", "update:modelValue"],
5314
5317
  setup(e, n) {
5315
- const t = '<i class="f-icon f-icon-lookup"></i>', o = v(), a = v(e.modelValue || {}), l = v([]), c = v(e.fromData.dataSource || []), h = v([]), d = e.fromData.repositoryToken ? Tt(e.fromData.repositoryToken) : null, m = e.toData.repositoryToken ? Tt(e.toData.repositoryToken) : null, S = Tt(Pn), s = (R) => ((R.raw.$type !== "SimpleField" || R.raw.selectable === !1) && (R.disabled = !0), R), b = I(() => _t(c.value)), u = I(() => _t(h.value)), g = (R, B, E, M) => {
5318
+ const t = '<i class="f-icon f-icon-lookup"></i>', o = v(), a = v(e.modelValue || {}), l = v([]), c = v(e.fromData.dataSource || []), h = v([]), d = e.fromData.repositoryToken ? Bt(e.fromData.repositoryToken) : null, m = e.toData.repositoryToken ? Bt(e.toData.repositoryToken) : null, S = Bt(Pn), s = (R) => ((R.raw.$type !== "SimpleField" || R.raw.selectable === !1) && (R.disabled = !0), R), b = I(() => Wt(c.value)), u = I(() => Wt(h.value)), g = (R, B, E, M) => {
5316
5319
  var se, Ce;
5317
5320
  const A = ((se = R.value.find((fe) => fe[M] === B)) == null ? void 0 : se[E || "name"]) || "", J = ((Ce = R.value.find((fe) => fe[M] === B)) == null ? void 0 : Ce[M || "code"]) || "";
5318
5321
  return A && J ? `${A}[${J}]` : "";
@@ -5488,7 +5491,7 @@ const Vt = /* @__PURE__ */ qe({
5488
5491
  } = B;
5489
5492
  if (M === "sourceField" && A) {
5490
5493
  const J = T.value.filter((se) => se.sourceField !== E.sourceField).map((se) => se.sourceField);
5491
- L(c.value, J), A.data = zt(c.value);
5494
+ L(c.value, J), A.data = At(c.value);
5492
5495
  }
5493
5496
  return !0;
5494
5497
  }
@@ -5551,14 +5554,14 @@ const Vt = /* @__PURE__ */ qe({
5551
5554
  }
5552
5555
  }), rr = {
5553
5556
  install(e) {
5554
- e.component(Vt.name, Vt);
5557
+ e.component(zt.name, zt);
5555
5558
  },
5556
5559
  register(e, n, t, o) {
5557
- e["mapping-editor"] = Vt, n["mapping-editor"] = zi;
5560
+ e["mapping-editor"] = zt, n["mapping-editor"] = zi;
5558
5561
  }
5559
5562
  };
5560
5563
  export {
5561
- Vt as MappingEditor,
5564
+ zt as MappingEditor,
5562
5565
  rr as default,
5563
5566
  In as mappingEditorProps,
5564
5567
  zi as propsResolver