@kengic/vue 0.10.11 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -3917,7 +3917,7 @@ const emptyIcon = {
3917
3917
  ...t.data
3918
3918
  }, r);
3919
3919
  }
3920
- }), name = "@kengic/vue", version = "0.10.11", data$1 = {
3920
+ }), name = "@kengic/vue", version = "0.11.0", data$1 = {
3921
3921
  width: 24,
3922
3922
  height: 24,
3923
3923
  body: '<path fill="currentColor" d="M5 21q-.825 0-1.413-.588T3 19V5q0-.825.588-1.413T5 3h11.175q.4 0 .763.15t.637.425l2.85 2.85q.275.275.425.638t.15.762V12.3q-.475-.2-.988-.263T19 12.05V7.825L16.175 5H5v14h6v2H5ZM5 5v14V5Zm8 17v-1.65q0-.2.075-.388t.225-.337l5.225-5.2q.225-.225.5-.325t.55-.1q.3 0 .575.113t.5.337l.925.925q.2.225.313.5t.112.55q0 .275-.1.563t-.325.512l-5.2 5.2q-.15.15-.338.225T15.65 23H14q-.425 0-.712-.287T13 22Zm7.5-5.575l-.925-.925l.925.925Zm-6 5.075h.95l3.025-3.05l-.45-.475l-.475-.45l-3.05 3.025v.95Zm3.525-3.525l-.475-.45l.925.925l-.45-.475ZM7 10h7q.425 0 .713-.288T15 9V7q0-.425-.288-.713T14 6H7q-.425 0-.713.288T6 7v2q0 .425.288.713T7 10Zm5 8h.1l2.9-2.875V15q0-1.25-.875-2.125T12 12q-1.25 0-2.125.875T9 15q0 1.25.875 2.125T12 18Z"/>'
@@ -4033,14 +4033,14 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4033
4033
  return H ? N : N.endOf(c);
4034
4034
  }, Y = function(fe, ae) {
4035
4035
  return L.w(x.toDate()[fe].apply(x.toDate("s"), (H ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ae)), x);
4036
- }, Q = this.$W, X = this.$M, J = this.$D, te = "set" + (this.$u ? "UTC" : "");
4036
+ }, q = this.$W, X = this.$M, J = this.$D, te = "set" + (this.$u ? "UTC" : "");
4037
4037
  switch (K) {
4038
4038
  case v:
4039
4039
  return H ? F(1, 0) : F(31, 11);
4040
4040
  case d:
4041
4041
  return H ? F(1, X) : F(0, X + 1);
4042
4042
  case u:
4043
- var le = this.$locale().weekStart || 0, _e = (Q < le ? Q + 7 : Q) - le;
4043
+ var ue = this.$locale().weekStart || 0, _e = (q < ue ? q + 7 : q) - ue;
4044
4044
  return F(H ? J - _e : J + (6 - _e), X);
4045
4045
  case c:
4046
4046
  case y:
@@ -4059,8 +4059,8 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4059
4059
  }, I.$set = function(V, P) {
4060
4060
  var x, H = L.p(V), K = "set" + (this.$u ? "UTC" : ""), F = (x = {}, x[c] = K + "Date", x[y] = K + "Date", x[d] = K + "Month", x[v] = K + "FullYear", x[i] = K + "Hours", x[o] = K + "Minutes", x[l] = K + "Seconds", x[s] = K + "Milliseconds", x)[H], Y = H === c ? this.$D + (P - this.$W) : P;
4061
4061
  if (H === d || H === v) {
4062
- var Q = this.clone().set(y, 1);
4063
- Q.$d[F](Y), Q.init(), this.$d = Q.set(y, Math.min(this.$D, Q.daysInMonth())).$d;
4062
+ var q = this.clone().set(y, 1);
4063
+ q.$d[F](Y), q.init(), this.$d = q.set(y, Math.min(this.$D, q.daysInMonth())).$d;
4064
4064
  } else
4065
4065
  F && this.$d[F](Y);
4066
4066
  return this.init(), this;
@@ -4083,21 +4083,21 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4083
4083
  return F(1);
4084
4084
  if (K === u)
4085
4085
  return F(7);
4086
- var Y = (x = {}, x[o] = a, x[i] = n, x[l] = r, x)[K] || 1, Q = this.$d.getTime() + V * Y;
4087
- return L.w(Q, this);
4086
+ var Y = (x = {}, x[o] = a, x[i] = n, x[l] = r, x)[K] || 1, q = this.$d.getTime() + V * Y;
4087
+ return L.w(q, this);
4088
4088
  }, I.subtract = function(V, P) {
4089
4089
  return this.add(-1 * V, P);
4090
4090
  }, I.format = function(V) {
4091
4091
  var P = this, x = this.$locale();
4092
4092
  if (!this.isValid())
4093
4093
  return x.invalidDate || _;
4094
- var H = V || "YYYY-MM-DDTHH:mm:ssZ", K = L.z(this), F = this.$H, Y = this.$m, Q = this.$M, X = x.weekdays, J = x.months, te = x.meridiem, le = function(ae, N, U, q) {
4095
- return ae && (ae[N] || ae(P, H)) || U[N].slice(0, q);
4094
+ var H = V || "YYYY-MM-DDTHH:mm:ssZ", K = L.z(this), F = this.$H, Y = this.$m, q = this.$M, X = x.weekdays, J = x.months, te = x.meridiem, ue = function(ae, N, U, Q) {
4095
+ return ae && (ae[N] || ae(P, H)) || U[N].slice(0, Q);
4096
4096
  }, _e = function(ae) {
4097
4097
  return L.s(F % 12 || 12, ae, "0");
4098
4098
  }, fe = te || function(ae, N, U) {
4099
- var q = ae < 12 ? "AM" : "PM";
4100
- return U ? q.toLowerCase() : q;
4099
+ var Q = ae < 12 ? "AM" : "PM";
4100
+ return U ? Q.toLowerCase() : Q;
4101
4101
  };
4102
4102
  return H.replace(b, function(ae, N) {
4103
4103
  return N || function(U) {
@@ -4107,13 +4107,13 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4107
4107
  case "YYYY":
4108
4108
  return L.s(P.$y, 4, "0");
4109
4109
  case "M":
4110
- return Q + 1;
4110
+ return q + 1;
4111
4111
  case "MM":
4112
- return L.s(Q + 1, 2, "0");
4112
+ return L.s(q + 1, 2, "0");
4113
4113
  case "MMM":
4114
- return le(x.monthsShort, Q, J, 3);
4114
+ return ue(x.monthsShort, q, J, 3);
4115
4115
  case "MMMM":
4116
- return le(J, Q);
4116
+ return ue(J, q);
4117
4117
  case "D":
4118
4118
  return P.$D;
4119
4119
  case "DD":
@@ -4121,9 +4121,9 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4121
4121
  case "d":
4122
4122
  return String(P.$W);
4123
4123
  case "dd":
4124
- return le(x.weekdaysMin, P.$W, X, 2);
4124
+ return ue(x.weekdaysMin, P.$W, X, 2);
4125
4125
  case "ddd":
4126
- return le(x.weekdaysShort, P.$W, X, 3);
4126
+ return ue(x.weekdaysShort, P.$W, X, 3);
4127
4127
  case "dddd":
4128
4128
  return X[P.$W];
4129
4129
  case "H":
@@ -4157,7 +4157,7 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4157
4157
  }, I.utcOffset = function() {
4158
4158
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
4159
4159
  }, I.diff = function(V, P, x) {
4160
- var H, K = this, F = L.p(P), Y = M(V), Q = (Y.utcOffset() - this.utcOffset()) * a, X = this - Y, J = function() {
4160
+ var H, K = this, F = L.p(P), Y = M(V), q = (Y.utcOffset() - this.utcOffset()) * a, X = this - Y, J = function() {
4161
4161
  return L.m(K, Y);
4162
4162
  };
4163
4163
  switch (F) {
@@ -4171,10 +4171,10 @@ var commonjsGlobal = typeof globalThis < "u" ? globalThis : typeof window < "u"
4171
4171
  H = J() / 3;
4172
4172
  break;
4173
4173
  case u:
4174
- H = (X - Q) / 6048e5;
4174
+ H = (X - q) / 6048e5;
4175
4175
  break;
4176
4176
  case c:
4177
- H = (X - Q) / 864e5;
4177
+ H = (X - q) / 864e5;
4178
4178
  break;
4179
4179
  case i:
4180
4180
  H = X / n;
@@ -6295,6 +6295,9 @@ var KG_APP_PREFIX = /* @__PURE__ */ ((e) => (e.WMS_DATA_MANAGER = "/wms/data-man
6295
6295
  const KG_APP_PREFIXS = ["/wms/data-manager", "/wms/business-manager", "/wcs", "/sys"];
6296
6296
  var KG_FORM_ITEM_TYPE = /* @__PURE__ */ ((e) => (e.INPUT = "INPUT", e.INPUT_PASSWORD = "INPUT_PASSWORD", e.INPUT_NUMBER = "INPUT_NUMBER", e.TEXT_AREA = "TEXT_AREA", e.CHECKBOX = "CHECKBOX", e.CHECKBOX_GROUP = "CHECKBOX_GROUP", e.RADIO_GROUP = "RADIO_GROUP", e.SWITCH = "SWITCH", e.SELECT = "SELECT", e.SELECT_MULTIPLE = "SELECT_MULTIPLE", e.DATE_DATE = "DATE_DATE", e.DATE_DATE_RANGE = "DATE_DATE_RANGE", e.DATE_TIME = "DATE_TIME", e.DATE_TIME_RANGE = "DATE_TIME_RANGE", e.DATE_DATETIME = "DATE_DATETIME", e.DATE_DATETIME_RANGE = "DATE_DATETIME_RANGE", e.DATE_WEEK = "DATE_WEEK", e.DATE_MONTH = "DATE_MONTH", e.DATE_YEAR = "DATE_YEAR", e.BUTTON_UPLOAD = "BUTTON_UPLOAD", e))(KG_FORM_ITEM_TYPE || {}), KG_FORM_CONTEXT = /* @__PURE__ */ ((e) => (e.SEARCH = "SEARCH", e.SUBMIT = "SUBMIT", e.TABLE = "TABLE", e))(KG_FORM_CONTEXT || {}), KG_TABLE_CELL_DISPLAY_TYPE = /* @__PURE__ */ ((e) => (e.YN = "YN", e.ENUM = "ENUM", e.PROGRESS = "PROGRESS", e.FILE_SIZE = "FILE_SIZE", e.UPDATE_LINK = "UPDATE_LINK", e.ROUTE_LINK = "ROUTE_LINK", e.DESC = "DESC", e))(KG_TABLE_CELL_DISPLAY_TYPE || {}), KG_BUTTON_TYPE = /* @__PURE__ */ ((e) => (e.CREATE = "CREATE", e.UPDATE = "UPDATE", e.COPY = "COPY", e.DELETE = "DELETE", e.IMPORT = "IMPORT", e.IMPORT_TEMPLATE = "IMPORT_TEMPLATE", e.EXPORT = "EXPORT", e.SEARCH = "SEARCH", e.REFRESH = "REFRESH", e.OTHER = "OTHER", e))(KG_BUTTON_TYPE || {}), KG_BUTTON_COLOR = /* @__PURE__ */ ((e) => (e.DANGER = "DANGER", e.WARN = "WARN", e))(KG_BUTTON_COLOR || {}), KG_BUTTON_DISPLAY_TYPE = /* @__PURE__ */ ((e) => (e.DEFAULT = "DEFAULT", e.SELECT = "SELECT", e))(KG_BUTTON_DISPLAY_TYPE || {}), KG_VAR_SUBMIT__DISPLAY_TYPE = /* @__PURE__ */ ((e) => (e.MODAL = "MODAL", e.DRAWER = "DRAWER", e.TABLE = "TABLE", e))(KG_VAR_SUBMIT__DISPLAY_TYPE || {}), KG_VAR_SUBMIT__LAYOUT = /* @__PURE__ */ ((e) => (e.VERTICAL = "vertical", e.HORIZONTAL = "horizontal", e))(KG_VAR_SUBMIT__LAYOUT || {}), KG_VAR_INPUT__DATA_TYPE = /* @__PURE__ */ ((e) => (e.NUMBER = "NUMBER", e))(KG_VAR_INPUT__DATA_TYPE || {}), KG_CUSTOM_LEVEL = /* @__PURE__ */ ((e) => (e[e.L0 = 0] = "L0", e[e.L10 = 10] = "L10", e))(KG_CUSTOM_LEVEL || {}), KG_POSSIBILITY_DATA_TYPE = /* @__PURE__ */ ((e) => (e.STRING = "string", e.NUMBER = "number", e.BOOLEAN = "boolean", e))(KG_POSSIBILITY_DATA_TYPE || {}), KG_WIDTH_UNIT = /* @__PURE__ */ ((e) => (e.SPAN = "SPAN", e.PX = "PX", e))(KG_WIDTH_UNIT || {}), KG_EXCEL_SUFFIX = /* @__PURE__ */ ((e) => (e.XLS = "xls", e.XLSX = "xlsx", e))(KG_EXCEL_SUFFIX || {}), KG_DESCRIPTION_CODE_NAME = /* @__PURE__ */ ((e) => (e.YN = "yn", e.VAR_SUBMIT_LAYOUT = "var_submit_layout", e.VAR_SPAN = "var_span", e.VAR_BUTTON_DISPLAY_TYPE = "var_button_display_type", e.VAR_WIDTH_UNIT = "var_width_unit", e))(KG_DESCRIPTION_CODE_NAME || {}), KG_DYNAMIC_QUERY_OPERATOR = /* @__PURE__ */ ((e) => (e.EQ = "eq", e.NE = "ne", e.GT = "gt", e.LT = "lt", e.GTE = "gte", e.LTE = "lte", e.START_WITH = "start", e.END_WITH = "end", e.CONTAIN = "contain", e.IN = "in", e.BETWEEN = "between", e))(KG_DYNAMIC_QUERY_OPERATOR || {}), KG_HEADERS = /* @__PURE__ */ ((e) => (e.DYNAMIC_QUERY = "Kg-Dynamic-Query", e))(KG_HEADERS || {});
6297
6297
  class KgLogger {
6298
+ static deprecated(t, r = {}, a = !0) {
6299
+ KgLogger.log("deprecated", t, r, a);
6300
+ }
6298
6301
  static error(t, r = {}, a = !0) {
6299
6302
  KgLogger.log("error", t, r, a);
6300
6303
  }
@@ -6316,6 +6319,9 @@ class KgLogger {
6316
6319
  case "error":
6317
6320
  l = `[ERROR] ${r}`, o = "color:#f00;";
6318
6321
  break;
6322
+ case "deprecated":
6323
+ l = `[DEPRECATED] ${r}`, o = "color:#f00;";
6324
+ break;
6319
6325
  }
6320
6326
  n ? console.groupCollapsed(`%c[@kengic/vue] ${l}`, o) : console.group(`%c[@kengic/vue] ${l}`, o), toPairs$1(cloneDeep(a)).forEach((i) => {
6321
6327
  console.log(`%c${i[0]}:`, "color: #000; font-weight: bold;", i[1]);
@@ -9473,7 +9479,7 @@ function useKgVar(e, t, r = 0) {
9473
9479
  const d = (J) => computed(() => u.t(c, J)), p = computed(() => u.isRetrieving(c)), v = computed(() => u.isRetrievingVarProfileMaster(c)), y = computed(() => u.isRetrievingVarGridMaster(c)), _ = computed(() => u.isRetrieved(c)), g = computed(() => u.isCreating(c)), b = computed(() => u.isCreatingRequesting(c)), E = computed(() => u.isUpdating(c)), T = computed(() => u.isUpdatingRequesting(c)), k = computed(() => u.isCopying(c)), A = computed(() => u.isCopyingRequesting(c)), C = computed(() => u.isDeleting(c)), D = computed(() => u.isDeletingRequesting(c)), w = computed(() => u.isOtherRequesting(c)), O = computed(() => u.getVarButtons(c)), M = computed(() => u.getVarButtonSearch(c)), L = computed(() => u.getVarButtonCreate(c)), R = computed(() => u.getVarButtonUpdate(c)), B = computed(() => u.getVarButtonCopy(c)), $ = computed(() => u.getVarButtonDelete(c)), I = computed(() => u.getVarProfileMasters(c)), V = computed(() => u.getCurrentVarProfileMasterID(c)), P = computed(() => u.getCurrentVarProfileMaster(c)), x = computed(() => {
9474
9480
  var J, te;
9475
9481
  return (te = (J = P.value) == null ? void 0 : J.varProfileDetails) != null ? te : null;
9476
- }), H = computed(() => u.getVarGridConfig(c)), K = computed(() => u.getVarGridMasters(c)), F = computed(() => u.getCurrentVarGridMasterID(c)), Y = computed(() => u.getCurrentVarGridMaster(c)), Q = computed(() => u.getSystemVarGridDetails(c)), X = computed(() => u.getCurrentVarGridDetails(c));
9482
+ }), H = computed(() => u.getVarGridConfig(c)), K = computed(() => u.getVarGridMasters(c)), F = computed(() => u.getCurrentVarGridMasterID(c)), Y = computed(() => u.getCurrentVarGridMaster(c)), q = computed(() => u.getSystemVarGridDetails(c)), X = computed(() => u.getCurrentVarGridDetails(c));
9477
9483
  return {
9478
9484
  formID: c,
9479
9485
  store: u,
@@ -9504,7 +9510,7 @@ function useKgVar(e, t, r = 0) {
9504
9510
  varGridMasters: K,
9505
9511
  currentVarGridMasteID: F,
9506
9512
  currentVarGridMaster: Y,
9507
- systemVarGridDetails: Q,
9513
+ systemVarGridDetails: q,
9508
9514
  currentVarGridDetails: X,
9509
9515
  setIsCreating: s,
9510
9516
  setIsUpdating: l,
@@ -11436,10 +11442,10 @@ const getProps$p = () => ({
11436
11442
  return u.value ? 398 : (W = (G = p.value) == null ? void 0 : G.max_width) != null ? W : DEFAULT_MAX_WIDTH;
11437
11443
  }), F = computed(() => u.value ? 398 : P.value.kgWidth), Y = ref(null);
11438
11444
  _useResizeObserver$1(Y);
11439
- const Q = _useTitle(), X = computed(() => u.value ? 400 : P.value.kgWidth && P.value.kgWidth > 0 ? "auto" : 0), J = computed(() => X.value === 0 ? !1 : !!(s.isCreating.value || s.isUpdating.value || s.isCopying.value || s.isDeleting.value)), te = reactive({
11445
+ const q = _useTitle(), X = computed(() => u.value ? 400 : P.value.kgWidth && P.value.kgWidth > 0 ? "auto" : 0), J = computed(() => X.value === 0 ? !1 : !!(s.isCreating.value || s.isUpdating.value || s.isCopying.value || s.isDeleting.value)), te = reactive({
11440
11446
  isFullscreen: !1
11441
11447
  }), {
11442
- getClass: le
11448
+ getClass: ue
11443
11449
  } = _useClass(e, te), {
11444
11450
  getLayout: _e
11445
11451
  } = _useLayout(), {
@@ -11480,7 +11486,7 @@ const getProps$p = () => ({
11480
11486
  }
11481
11487
  });
11482
11488
  watch(J, (G, W) => {
11483
- G === !0 && U(), W === !0 && G === !1 && q();
11489
+ G === !0 && U(), W === !0 && G === !1 && Q();
11484
11490
  }, {
11485
11491
  immediate: !0
11486
11492
  }), watch(fe, (G) => {
@@ -11498,8 +11504,8 @@ const getProps$p = () => ({
11498
11504
  }))
11499
11505
  return new Promise((W, Z) => {
11500
11506
  var se;
11501
- const re = watch(i.model, async (oe) => {
11502
- oe && Object.keys(oe).length > 0 && (setTimeout(() => re()), await i.store.emit(s.formID, "open", {
11507
+ const re = watch(i.model, async (ie) => {
11508
+ ie && Object.keys(ie).length > 0 && (setTimeout(() => re()), await i.store.emit(s.formID, "open", {
11503
11509
  isCreating: s.isCreating.value,
11504
11510
  isUpdating: s.isUpdating.value,
11505
11511
  isCopying: s.isCopying.value,
@@ -11513,7 +11519,7 @@ const getProps$p = () => ({
11513
11519
  ((se = p.value) == null ? void 0 : se.dft_fullscreen_flg) === 1 && !u.value && (te.isFullscreen = !0);
11514
11520
  });
11515
11521
  }
11516
- async function q() {
11522
+ async function Q() {
11517
11523
  P.value.kgWidth = fe.value, te.isFullscreen = !1, await i.store.emit(s.formID, "close", null);
11518
11524
  }
11519
11525
  function z() {
@@ -11562,13 +11568,13 @@ const getProps$p = () => ({
11562
11568
  return;
11563
11569
  switch (!0) {
11564
11570
  case s.isCreating.value:
11565
- await ue();
11571
+ await ce();
11566
11572
  break;
11567
11573
  case s.isUpdating.value:
11568
- await ce();
11574
+ await le();
11569
11575
  break;
11570
11576
  case s.isCopying.value:
11571
- await ie();
11577
+ await oe();
11572
11578
  break;
11573
11579
  case s.isDeleting.value:
11574
11580
  await me();
@@ -11578,8 +11584,8 @@ const getProps$p = () => ({
11578
11584
  KgUtil.throwIfNotFormError(Z);
11579
11585
  }
11580
11586
  }
11581
- async function ue() {
11582
- var W, Z, re, se, oe, de;
11587
+ async function ce() {
11588
+ var W, Z, re, se, ie, de;
11583
11589
  const G = (W = s.varButtonCreate.value) == null ? void 0 : W.cmd;
11584
11590
  if (!G) {
11585
11591
  KgLogger.error("[KgSubmit] '\u521B\u5EFA\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -11603,11 +11609,11 @@ const getProps$p = () => ({
11603
11609
  }))
11604
11610
  return;
11605
11611
  await httpClient().request({
11606
- method: (oe = (se = s.varButtonCreate.value) == null ? void 0 : se.cmd_method) != null ? oe : "POST",
11612
+ method: (ie = (se = s.varButtonCreate.value) == null ? void 0 : se.cmd_method) != null ? ie : "POST",
11607
11613
  url: G,
11608
11614
  params: ne.value,
11609
11615
  data: ge.value
11610
- }), ((de = s.varButtonCreate.value) == null ? void 0 : de.show_success_message_flg) !== 0 && message.success(Q.title.value + n.t("kg.succeed")), await i.store.emit(s.formID, "ok", {
11616
+ }), ((de = s.varButtonCreate.value) == null ? void 0 : de.show_success_message_flg) !== 0 && message.success(q.title.value + n.t("kg.succeed")), await i.store.emit(s.formID, "ok", {
11611
11617
  isCreating: s.isCreating.value,
11612
11618
  isUpdating: s.isUpdating.value,
11613
11619
  isCopying: s.isCopying.value,
@@ -11621,8 +11627,8 @@ const getProps$p = () => ({
11621
11627
  s.store.setIsCreatingRequesting(s.formID, !1);
11622
11628
  }
11623
11629
  }
11624
- async function ce() {
11625
- var W, Z, re, se, oe, de;
11630
+ async function le() {
11631
+ var W, Z, re, se, ie, de;
11626
11632
  const G = (W = s.varButtonUpdate.value) == null ? void 0 : W.cmd;
11627
11633
  if (!G) {
11628
11634
  KgLogger.error("[KgSubmit] '\u66F4\u65B0\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -11646,7 +11652,7 @@ const getProps$p = () => ({
11646
11652
  }))
11647
11653
  return;
11648
11654
  await httpClient().request({
11649
- method: (oe = (se = s.varButtonUpdate.value) == null ? void 0 : se.cmd_method) != null ? oe : "POST",
11655
+ method: (ie = (se = s.varButtonUpdate.value) == null ? void 0 : se.cmd_method) != null ? ie : "POST",
11650
11656
  url: G,
11651
11657
  params: ne.value,
11652
11658
  data: ge.value
@@ -11664,8 +11670,8 @@ const getProps$p = () => ({
11664
11670
  s.store.setIsUpdatingRequesting(s.formID, !1);
11665
11671
  }
11666
11672
  }
11667
- async function ie() {
11668
- var W, Z, re, se, oe, de, ne, ge;
11673
+ async function oe() {
11674
+ var W, Z, re, se, ie, de, ne, ge;
11669
11675
  const G = (W = s.varButtonCopy.value) == null ? void 0 : W.cmd;
11670
11676
  if (!G) {
11671
11677
  KgLogger.error("[KgSubmit] '\u590D\u5236\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -11679,7 +11685,7 @@ const getProps$p = () => ({
11679
11685
  ...(se = o.selectedFirstRow.value) != null ? se : {},
11680
11686
  ...toRaw(i.model.value)
11681
11687
  }, s.formID, r));
11682
- if (((oe = p.value) == null ? void 0 : oe.cpy_clear_id_flg) !== 0 && delete ve.value.id, await i.store.emit(s.formID, "beforeRequest", {
11688
+ if (((ie = p.value) == null ? void 0 : ie.cpy_clear_id_flg) !== 0 && delete ve.value.id, await i.store.emit(s.formID, "beforeRequest", {
11683
11689
  isCreating: s.isCreating.value,
11684
11690
  isUpdating: s.isUpdating.value,
11685
11691
  isCopying: s.isCopying.value,
@@ -11711,7 +11717,7 @@ const getProps$p = () => ({
11711
11717
  }
11712
11718
  }
11713
11719
  async function me() {
11714
- var W, Z, re, se, oe, de, ne, ge, pe, ve;
11720
+ var W, Z, re, se, ie, de, ne, ge, pe, ve;
11715
11721
  const G = (W = s.varButtonDelete.value) == null ? void 0 : W.cmd;
11716
11722
  if (!G) {
11717
11723
  KgLogger.error("[KgSubmit] '\u5220\u9664\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -11721,13 +11727,13 @@ const getProps$p = () => ({
11721
11727
  }
11722
11728
  try {
11723
11729
  s.store.setIsDeletingRequesting(s.formID, !0);
11724
- let be = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonDelete.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), ye = ref((se = o.selectedRows.value) != null ? se : []);
11725
- if (((oe = s.varButtonDelete.value) == null ? void 0 : oe.del_param_clm) !== "__kg__new_delete_param" && (be = ref({
11730
+ let ye = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((re = (Z = s.varButtonDelete.value) == null ? void 0 : Z.cmd_prm) != null ? re : ""), s.formID, r)), Ce = ref((se = o.selectedRows.value) != null ? se : []);
11731
+ if (((ie = s.varButtonDelete.value) == null ? void 0 : ie.del_param_clm) !== "__kg__new_delete_param" && (ye = ref({
11726
11732
  ids: (ne = (de = o.selectedRows.value) == null ? void 0 : de.map((Ie) => {
11727
- var Se, Ee, Ce;
11728
- return (Ce = Ie[(Ee = (Se = s.varButtonDelete.value) == null ? void 0 : Se.del_param_clm) != null ? Ee : "id"]) != null ? Ce : "";
11733
+ var Te, ke, Ae;
11734
+ return (Ae = Ie[(ke = (Te = s.varButtonDelete.value) == null ? void 0 : Te.del_param_clm) != null ? ke : "id"]) != null ? Ae : "";
11729
11735
  })) != null ? ne : []
11730
- }), ye = ref({})), await i.store.emit(s.formID, "beforeRequest", {
11736
+ }), Ce = ref({})), await i.store.emit(s.formID, "beforeRequest", {
11731
11737
  isCreating: s.isCreating.value,
11732
11738
  isUpdating: s.isUpdating.value,
11733
11739
  isCopying: s.isCopying.value,
@@ -11735,15 +11741,15 @@ const getProps$p = () => ({
11735
11741
  row: o.selectedFirstRow.value,
11736
11742
  rows: o.selectedRows.value,
11737
11743
  model: i.model,
11738
- params: be,
11739
- data: ye
11744
+ params: ye,
11745
+ data: Ce
11740
11746
  }))
11741
11747
  return;
11742
11748
  await httpClient().request({
11743
11749
  method: (pe = (ge = s.varButtonDelete.value) == null ? void 0 : ge.cmd_method) != null ? pe : "DELETE",
11744
11750
  url: G,
11745
- params: be.value,
11746
- data: ye.value
11751
+ params: ye.value,
11752
+ data: Ce.value
11747
11753
  }, {
11748
11754
  joinParamsToUrl: !0
11749
11755
  }), ((ve = s.varButtonDelete.value) == null ? void 0 : ve.show_success_message_flg) !== 0 && message.success(n.t("kg.deleteSuccess")), await l.store.emit(s.formID, "deleteOk", {
@@ -11757,13 +11763,13 @@ const getProps$p = () => ({
11757
11763
  row: o.selectedFirstRow.value,
11758
11764
  model: i.model
11759
11765
  }), s.store.setIsDeleting(s.formID, !1), c.search(!0);
11760
- } catch (be) {
11761
- console.error(be), i.store.emit(s.formID, "error", be);
11766
+ } catch (ye) {
11767
+ console.error(ye), i.store.emit(s.formID, "error", ye);
11762
11768
  } finally {
11763
11769
  s.store.setIsDeletingRequesting(s.formID, !1);
11764
11770
  }
11765
11771
  }
11766
- function he(G) {
11772
+ function be(G) {
11767
11773
  var Z, re;
11768
11774
  const W = (re = (Z = a == null ? void 0 : a.KgSubmit) == null ? void 0 : Z["KgForm.Item"]) == null ? void 0 : re[G.var_nam];
11769
11775
  return isFunction$2(W) ? createVNode(KgForm.Item, {
@@ -11774,7 +11780,7 @@ const getProps$p = () => ({
11774
11780
  }, {
11775
11781
  control: ({
11776
11782
  frm_id: se,
11777
- varName: oe,
11783
+ varName: ie,
11778
11784
  props: de,
11779
11785
  model: ne,
11780
11786
  varVariableConfig: ge,
@@ -11782,7 +11788,7 @@ const getProps$p = () => ({
11782
11788
  varSubmitField: ve
11783
11789
  }) => W({
11784
11790
  frm_id: se,
11785
- varName: oe,
11791
+ varName: ie,
11786
11792
  props: de,
11787
11793
  model: ne,
11788
11794
  varVariableConfig: ge,
@@ -11796,7 +11802,7 @@ const getProps$p = () => ({
11796
11802
  onKgSubmit: ee
11797
11803
  }, null);
11798
11804
  }
11799
- function Te() {
11805
+ function he() {
11800
11806
  let G, W;
11801
11807
  return createVNode(KgResizable, {
11802
11808
  kgType: i.displayType.value === KG_VAR_SUBMIT__DISPLAY_TYPE.MODAL ? "right" : "left",
@@ -11820,11 +11826,11 @@ const getProps$p = () => ({
11820
11826
  ref: Y
11821
11827
  }, [M.value.length > 0 && createVNode(Row, {
11822
11828
  gutter: 12
11823
- }, _isSlot$9(G = M.value.map(he)) ? G : {
11829
+ }, _isSlot$9(G = M.value.map(be)) ? G : {
11824
11830
  default: () => [G]
11825
11831
  }), L.value.length > 0 && B.value.length > 0 && createVNode(Divider, null, null), R.value.length > 0 && createVNode(Row, {
11826
11832
  gutter: 12
11827
- }, _isSlot$9(W = R.value.map(he)) ? W : {
11833
+ }, _isSlot$9(W = R.value.map(be)) ? W : {
11828
11834
  default: () => [W]
11829
11835
  }), u.value && createVNode("div", {
11830
11836
  style: "text-align: center; padding: 6px 0 12px;"
@@ -11833,7 +11839,7 @@ const getProps$p = () => ({
11833
11839
  })]
11834
11840
  });
11835
11841
  }
11836
- function ke() {
11842
+ function Se() {
11837
11843
  let G, W;
11838
11844
  return createVNode("div", null, [createVNode(Button, {
11839
11845
  type: "primary",
@@ -11852,10 +11858,10 @@ const getProps$p = () => ({
11852
11858
  default: () => [W]
11853
11859
  })]);
11854
11860
  }
11855
- function Ae() {
11861
+ function Ee() {
11856
11862
  return createVNode("div", {
11857
- title: Q.title.value
11858
- }, [Q.title.value]);
11863
+ title: q.title.value
11864
+ }, [q.title.value]);
11859
11865
  }
11860
11866
  function Me() {
11861
11867
  return createVNode(KgSubmitHeader, {
@@ -11867,7 +11873,7 @@ const getProps$p = () => ({
11867
11873
  }, null);
11868
11874
  }
11869
11875
  return onUnmounted(async () => {
11870
- await q();
11876
+ await Q();
11871
11877
  }), () => createVNode(Drawer, {
11872
11878
  visible: J.value,
11873
11879
  placement: "right",
@@ -11876,13 +11882,13 @@ const getProps$p = () => ({
11876
11882
  keyboard: !1,
11877
11883
  destroyOnClose: !0,
11878
11884
  width: X.value,
11879
- class: le.value,
11885
+ class: ue.value,
11880
11886
  "kg-frm_id": s.formID
11881
11887
  }, {
11882
- title: Ae,
11888
+ title: Ee,
11883
11889
  extra: Me,
11884
- default: Te,
11885
- footer: ke
11890
+ default: he,
11891
+ footer: Se
11886
11892
  });
11887
11893
  }
11888
11894
  });
@@ -14006,16 +14012,16 @@ function _useColumns(e) {
14006
14012
  return "right";
14007
14013
  }
14008
14014
  function R() {
14009
- var K, F, Y, Q;
14010
- return !(C.ord_flg !== 1 || (F = (K = t == null ? void 0 : t.value) == null ? void 0 : K.KgTable) != null && F.kgDisabled || isNil((Q = (Y = t == null ? void 0 : t.value) == null ? void 0 : Y.KgTable) == null ? void 0 : Q.kgDisabled) && e.kgDisabled || r.isCreating.value || r.isUpdating.value || r.isCopying.value || r.isDeleting.value || y.length <= 0);
14015
+ var K, F, Y, q;
14016
+ return !(C.ord_flg !== 1 || (F = (K = t == null ? void 0 : t.value) == null ? void 0 : K.KgTable) != null && F.kgDisabled || isNil((q = (Y = t == null ? void 0 : t.value) == null ? void 0 : Y.KgTable) == null ? void 0 : q.kgDisabled) && e.kgDisabled || r.isCreating.value || r.isUpdating.value || r.isCopying.value || r.isDeleting.value || y.length <= 0);
14011
14017
  }
14012
14018
  function B() {
14013
- var K, F, Y, Q, X, J;
14014
- if (((F = (K = v.option.value.KgTable) == null ? void 0 : K.filter) == null ? void 0 : F.on) === !0 && C.filter_flag === 1 && !((Q = (Y = t == null ? void 0 : t.value) == null ? void 0 : Y.KgTable) != null && Q.kgDisabled) && !(isNil((J = (X = t == null ? void 0 : t.value) == null ? void 0 : X.KgTable) == null ? void 0 : J.kgDisabled) && e.kgDisabled) && !(r.isCreating.value || r.isUpdating.value || r.isCopying.value || r.isDeleting.value) && !(y.length <= 0))
14019
+ var K, F, Y, q, X, J;
14020
+ if (((F = (K = v.option.value.KgTable) == null ? void 0 : K.filter) == null ? void 0 : F.on) === !0 && C.filter_flag === 1 && !((q = (Y = t == null ? void 0 : t.value) == null ? void 0 : Y.KgTable) != null && q.kgDisabled) && !(isNil((J = (X = t == null ? void 0 : t.value) == null ? void 0 : X.KgTable) == null ? void 0 : J.kgDisabled) && e.kgDisabled) && !(r.isCreating.value || r.isUpdating.value || r.isCopying.value || r.isDeleting.value) && !(y.length <= 0))
14015
14021
  return uniqBy(y.map((te) => {
14016
- var le;
14022
+ var ue;
14017
14023
  return {
14018
- value: (le = te == null ? void 0 : te[w]) != null ? le : "",
14024
+ value: (ue = te == null ? void 0 : te[w]) != null ? ue : "",
14019
14025
  text: l({
14020
14026
  column: {
14021
14027
  dataIndex: w
@@ -14238,16 +14244,16 @@ const KgTable$1 = "", getProps$g = () => ({
14238
14244
  setup: function(e) {
14239
14245
  var ae;
14240
14246
  const t = inject("$dayjs", dayjs), r = inject(DI_KG_VAR__KG_SLOTS, null), a = inject(DI_KG_VAR__KG_PROPS, null), n = useKg(), s = useKgVar(), l = useKgSearch(), o = useKgTable(), i = useKgSubmit();
14241
- l.onSearch(async ({
14242
- resetPageIndex: N
14243
- }) => (K(N), !1)), l.onReset(async () => (p.value = {}, K(!0), !1)), o.store.$onAction(async ({
14247
+ l.onSearch(async (N) => (K(N), !1)), l.onReset(async () => (p.value = {}, K({
14248
+ isSearchFirstPage: !0
14249
+ }), !1)), o.store.$onAction(async ({
14244
14250
  name: N,
14245
14251
  args: U
14246
14252
  }) => {
14247
14253
  switch (N) {
14248
14254
  case "setRowSelect":
14249
14255
  if (U[0] === s.formID) {
14250
- const q = U[1], z = U[2], ee = q[o.id.value];
14256
+ const Q = U[1], z = U[2], ee = Q[o.id.value];
14251
14257
  switch (!0) {
14252
14258
  case (z && !$.value.includes(ee)):
14253
14259
  F([...$.value, ee]);
@@ -14281,31 +14287,31 @@ const KgTable$1 = "", getProps$g = () => ({
14281
14287
  var N, U;
14282
14288
  return (U = (N = s.varButtonSearch.value) == null ? void 0 : N.cmd) != null ? U : null;
14283
14289
  }), k = computed(() => {
14284
- var U, q, z, ee, ue, ce, ie, me, he;
14290
+ var U, Q, z, ee, ce, le, oe, me, be;
14285
14291
  let N = {
14286
14292
  pageNo: I.pageIndex,
14287
14293
  pageSize: I.pageSize,
14288
- column: (q = (U = p.value) == null ? void 0 : U.field) != null ? q : void 0,
14294
+ column: (Q = (U = p.value) == null ? void 0 : U.field) != null ? Q : void 0,
14289
14295
  order: p.value.order === "ascend" ? "asc" : p.value.order === "descend" ? "desc" : void 0,
14290
14296
  ...(ee = (z = l.model) == null ? void 0 : z.value) != null ? ee : {}
14291
14297
  };
14292
14298
  return s.varButtonSearch.value && (N = {
14293
14299
  ...N,
14294
- ...KgVarUtil.parseCommandParameter((ce = (ue = s.varButtonSearch.value) == null ? void 0 : ue.cmd_prm) != null ? ce : "")
14295
- }), (ie = s.varGridConfig.value) != null && ie.cmd_prm && (N = {
14300
+ ...KgVarUtil.parseCommandParameter((le = (ce = s.varButtonSearch.value) == null ? void 0 : ce.cmd_prm) != null ? le : "")
14301
+ }), (oe = s.varGridConfig.value) != null && oe.cmd_prm && (N = {
14296
14302
  ...N,
14297
14303
  ...KgVarUtil.parseCommandParameter((me = s.varGridConfig.value.cmd_prm) != null ? me : "")
14298
- }), ((he = s.varGridConfig.value) == null ? void 0 : he.convert_sort_field_to_under_score_flg) === 1 && N.column && (N.column = snakeCase$1(N.column)), N;
14304
+ }), ((be = s.varGridConfig.value) == null ? void 0 : be.convert_sort_field_to_under_score_flg) === 1 && N.column && (N.column = snakeCase$1(N.column)), N;
14299
14305
  }), A = computed(() => {
14300
- var N, U, q, z;
14306
+ var N, U, Q, z;
14301
14307
  if (!isNil((U = (N = a == null ? void 0 : a.value) == null ? void 0 : N.KgTable) == null ? void 0 : U.kgDisabled))
14302
- return (z = (q = a == null ? void 0 : a.value) == null ? void 0 : q.KgTable) == null ? void 0 : z.kgDisabled;
14308
+ return (z = (Q = a == null ? void 0 : a.value) == null ? void 0 : Q.KgTable) == null ? void 0 : z.kgDisabled;
14303
14309
  if (!isNil(e.kgDisabled))
14304
14310
  return e.kgDisabled;
14305
14311
  }), C = computed(() => {
14306
- var N, U, q, z;
14312
+ var N, U, Q, z;
14307
14313
  if (!isNil((U = (N = a == null ? void 0 : a.value) == null ? void 0 : N.KgTable) == null ? void 0 : U.kgCheckboxDisabled))
14308
- return (z = (q = a == null ? void 0 : a.value) == null ? void 0 : q.KgTable) == null ? void 0 : z.kgCheckboxDisabled;
14314
+ return (z = (Q = a == null ? void 0 : a.value) == null ? void 0 : Q.KgTable) == null ? void 0 : z.kgCheckboxDisabled;
14309
14315
  if (!isNil(e.kgCheckboxDisabled))
14310
14316
  return e.kgCheckboxDisabled;
14311
14317
  }), D = computed(() => !!A.value || y.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value), w = computed(() => !!A.value || y.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value || I.total === 0), O = computed(() => {
@@ -14361,8 +14367,10 @@ const KgTable$1 = "", getProps$g = () => ({
14361
14367
  });
14362
14368
  watch(o.pageSizeOptions, (N) => {
14363
14369
  N.length > 0 && !N.includes(I.pageSize) && (I.pageSize = o.pageSizeOption.value);
14364
- }), watch([T, o.isReadAutomatically, l.isReady], ([N, U, q]) => {
14365
- N && U && q && !o.store.getIsRetrieved(s.formID) && K(!0);
14370
+ }), watch([T, o.isReadAutomatically, l.isReady], ([N, U, Q]) => {
14371
+ N && U && Q && !o.store.getIsRetrieved(s.formID) && K({
14372
+ isSearchFirstPage: !0
14373
+ });
14366
14374
  }, {
14367
14375
  immediate: !0
14368
14376
  }), watch(s.isCreating, (N, U) => {
@@ -14383,7 +14391,7 @@ const KgTable$1 = "", getProps$g = () => ({
14383
14391
  N && (o.store.setDatas(s.formID, without$1(b.value, N)), o.store.setSelectedRows(s.formID, []));
14384
14392
  }
14385
14393
  function H(N, U) {
14386
- var q;
14394
+ var Q;
14387
14395
  if (!(!!A.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value) && !!L.value) {
14388
14396
  if (!U) {
14389
14397
  o.store.setSelectedRows(s.formID, []);
@@ -14391,7 +14399,7 @@ const KgTable$1 = "", getProps$g = () => ({
14391
14399
  }
14392
14400
  switch (N == null ? void 0 : N.detail) {
14393
14401
  case 1:
14394
- switch ((q = s.varGridConfig.value) == null ? void 0 : q.operation_on_row_click) {
14402
+ switch ((Q = s.varGridConfig.value) == null ? void 0 : Q.operation_on_row_click) {
14395
14403
  case 0:
14396
14404
  break;
14397
14405
  case 1:
@@ -14407,14 +14415,16 @@ const KgTable$1 = "", getProps$g = () => ({
14407
14415
  }
14408
14416
  }
14409
14417
  }
14410
- function K(N = !1) {
14411
- KgLogger.debug(`${s.formID} | KgTable | retrieve() | \u6267\u884C\u5F00\u59CB.`);
14418
+ function K(N = {}) {
14419
+ KgLogger.debug(`${s.formID} | KgTable | retrieve() | \u6267\u884C\u5F00\u59CB.`, {
14420
+ param: N
14421
+ });
14412
14422
  const U = watch(o.isReady, (z) => {
14413
- z && (setTimeout(() => U()), q());
14423
+ z && (setTimeout(() => U()), Q());
14414
14424
  }, {
14415
14425
  immediate: !0
14416
14426
  });
14417
- async function q() {
14427
+ async function Q() {
14418
14428
  var z, ee;
14419
14429
  if (KgLogger.debug(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u6267\u884C\u5F00\u59CB.`), !T.value) {
14420
14430
  KgLogger.error(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u67E5\u8BE2\u6309\u94AE\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.`, {
@@ -14422,43 +14432,49 @@ const KgTable$1 = "", getProps$g = () => ({
14422
14432
  });
14423
14433
  return;
14424
14434
  }
14425
- N && (I.pageIndex = 1), o.store.setIsRetrieving(s.formID, !0);
14435
+ N.isSearchFirstPage && (I.pageIndex = 1), o.store.setIsRetrieving(s.formID, !0);
14426
14436
  try {
14427
- const ue = KgUtil.parseParams(k.value, o.profileFormID.value, t), ce = ref({});
14437
+ const ce = KgUtil.parseParams(k.value, o.profileFormID.value, t), le = ref({});
14428
14438
  await o.store.emit(s.formID, "beforeRetrieve", {
14429
- params: ue,
14430
- response: ce
14431
- }) || (ce.value = await httpClient().request({
14439
+ params: ce,
14440
+ response: le
14441
+ }) || (le.value = await httpClient().request({
14432
14442
  method: "GET",
14433
14443
  url: T.value,
14434
- params: ue,
14444
+ params: ce,
14435
14445
  headers: {
14436
14446
  [KG_HEADERS.DYNAMIC_QUERY]: ((z = s.currentVarProfileMaster.value) == null ? void 0 : z.dyn_flg) === 1
14437
14447
  }
14438
14448
  }, {
14439
14449
  successMessageMode: "none"
14440
14450
  }), KgLogger.debug(`${s.formID} | KgTable | retrieve() | retrieveDatas() | \u67E5\u8BE2\u6210\u529F.`, {
14441
- params: ue
14451
+ params: ce,
14452
+ response: le.value
14442
14453
  }));
14443
14454
  const {
14444
- datas: ie,
14455
+ datas: oe,
14445
14456
  total: me
14446
- } = E(ce);
14457
+ } = E(le);
14447
14458
  await o.store.emit(s.formID, "beforeSetDatas", {
14448
- datas: ie,
14459
+ datas: oe,
14449
14460
  total: me,
14450
14461
  setDatas(he) {
14451
14462
  o.store.setDatas(s.formID, he);
14452
14463
  }
14453
- }), d.value = {}, o.store.setDatas(s.formID, ie.value), I.total = me.value, H(), c.value = [], await nextTick(), ((ee = s.varGridConfig.value) == null ? void 0 : ee.check_first_row_after_retrieve) === 1 && ie.value.length > 0 && o.store.setSelectedRows(s.formID, [ie.value[0]]), await o.store.emit(s.formID, "retrieve", {
14454
- page: ce.value,
14455
- datas: ie,
14464
+ }), d.value = {}, o.store.setDatas(s.formID, oe.value), I.total = me.value;
14465
+ const be = cloneDeep($.value);
14466
+ H(), c.value = [], await nextTick(), N.isPreserveSelectedRows ? o.store.setSelectedRows(s.formID, be.map((he) => {
14467
+ var Se;
14468
+ return (Se = oe.value) == null ? void 0 : Se.find((Ee) => Ee[o.id.value] === he);
14469
+ }).filter((he) => !!he)) : ((ee = s.varGridConfig.value) == null ? void 0 : ee.check_first_row_after_retrieve) === 1 && oe.value.length > 0 && o.store.setSelectedRows(s.formID, [oe.value[0]]), await o.store.emit(s.formID, "retrieve", {
14470
+ page: le.value,
14471
+ datas: oe,
14456
14472
  setDatas(he) {
14457
14473
  o.store.setDatas(s.formID, he);
14458
14474
  }
14459
14475
  }), o.store.setIsRetrieved(s.formID, !0);
14460
- } catch (ue) {
14461
- throw ue;
14476
+ } catch (ce) {
14477
+ throw ce;
14462
14478
  } finally {
14463
14479
  o.store.setIsRetrieving(s.formID, !1);
14464
14480
  }
@@ -14466,12 +14482,12 @@ const KgTable$1 = "", getProps$g = () => ({
14466
14482
  }
14467
14483
  function F(N) {
14468
14484
  o.store.setSelectedRows(s.formID, N.map((U) => {
14469
- var q;
14470
- return (q = b.value) == null ? void 0 : q.find((z) => z[o.id.value] === U);
14485
+ var Q;
14486
+ return (Q = b.value) == null ? void 0 : Q.find((z) => z[o.id.value] === U);
14471
14487
  }).filter((U) => !!U));
14472
14488
  }
14473
14489
  function Y(N) {
14474
- var U, q;
14490
+ var U, Q;
14475
14491
  switch (o.isMultiSelect.value) {
14476
14492
  case !0:
14477
14493
  {
@@ -14482,22 +14498,24 @@ const KgTable$1 = "", getProps$g = () => ({
14482
14498
  case !1:
14483
14499
  {
14484
14500
  const z = N[o.id.value];
14485
- (q = $.value) != null && q.includes(z) ? $.value = [] : $.value = [z];
14501
+ (Q = $.value) != null && Q.includes(z) ? $.value = [] : $.value = [z];
14486
14502
  }
14487
14503
  break;
14488
14504
  }
14489
14505
  o.store.setSelectedRows(s.formID, $.value.map((z) => {
14490
14506
  var ee;
14491
- return (ee = b.value) == null ? void 0 : ee.find((ue) => ue[o.id.value] === z);
14507
+ return (ee = b.value) == null ? void 0 : ee.find((ce) => ce[o.id.value] === z);
14492
14508
  }).filter((z) => !!z));
14493
14509
  }
14494
- function Q(N, U) {
14510
+ function q(N, U) {
14495
14511
  U.width = N, s.store.setVarGridDetailWidth(s.formID, U.dataIndex, N);
14496
14512
  }
14497
- async function X(N, U, q, z) {
14513
+ async function X(N, U, Q, z) {
14498
14514
  switch (z.action) {
14499
14515
  case "sort": {
14500
- p.value = q, await nextTick(), K(!0);
14516
+ p.value = Q, await nextTick(), K({
14517
+ isSearchFirstPage: !0
14518
+ });
14501
14519
  break;
14502
14520
  }
14503
14521
  case "filter":
@@ -14506,20 +14524,20 @@ const KgTable$1 = "", getProps$g = () => ({
14506
14524
  }
14507
14525
  function J(N, U) {
14508
14526
  var z;
14509
- const q = U[o.id.value];
14527
+ const Q = U[o.id.value];
14510
14528
  switch ((z = s.varGridConfig.value) == null ? void 0 : z.expand_accordion_flg) {
14511
14529
  case 0:
14512
- N ? c.value = uniq([...c.value, q]) : c.value = without$1(c.value, q);
14530
+ N ? c.value = uniq([...c.value, Q]) : c.value = without$1(c.value, Q);
14513
14531
  break;
14514
14532
  default:
14515
- N ? c.value = [q] : c.value = [];
14533
+ N ? c.value = [Q] : c.value = [];
14516
14534
  break;
14517
14535
  }
14518
14536
  }
14519
14537
  function te(N, U) {
14520
14538
  U !== I.pageSize ? (I.pageIndex = 1, I.pageSize = U) : I.pageIndex = N, K();
14521
14539
  }
14522
- function le({
14540
+ function ue({
14523
14541
  title: N,
14524
14542
  column: U
14525
14543
  }) {
@@ -14544,18 +14562,18 @@ const KgTable$1 = "", getProps$g = () => ({
14544
14562
  index: 0
14545
14563
  }, null), M.value && createVNode(TableSummary.Cell, {
14546
14564
  index: O.value ? 1 : 0
14547
- }, null), u.value.map((U, q) => {
14548
- const z = String(U.dataIndex), ee = z ? s.store.getVarGridDetail(s.formID, z) : null, ue = (() => ["left", "center", "right"].includes((ee == null ? void 0 : ee.align) || "") ? ee == null ? void 0 : ee.align : "left")();
14549
- let ce = q;
14550
- return O.value && M.value ? ce += 2 : (O.value || M.value) && (ce += 1), createVNode(TableSummary.Cell, {
14551
- index: ce,
14552
- align: ue
14565
+ }, null), u.value.map((U, Q) => {
14566
+ const z = String(U.dataIndex), ee = z ? s.store.getVarGridDetail(s.formID, z) : null, ce = (() => ["left", "center", "right"].includes((ee == null ? void 0 : ee.align) || "") ? ee == null ? void 0 : ee.align : "left")();
14567
+ let le = Q;
14568
+ return O.value && M.value ? le += 2 : (O.value || M.value) && (le += 1), createVNode(TableSummary.Cell, {
14569
+ index: le,
14570
+ align: ce
14553
14571
  }, {
14554
14572
  default: () => {
14555
- var ie, me;
14556
- return [(me = (ie = r == null ? void 0 : r.KgTable) == null ? void 0 : ie["summary.bodyCell"]) == null ? void 0 : me.call(ie, {
14573
+ var oe, me;
14574
+ return [(me = (oe = r == null ? void 0 : r.KgTable) == null ? void 0 : oe["summary.bodyCell"]) == null ? void 0 : me.call(oe, {
14557
14575
  column: U,
14558
- index: ce,
14576
+ index: le,
14559
14577
  varGridDetail: ee
14560
14578
  })];
14561
14579
  }
@@ -14568,7 +14586,7 @@ const KgTable$1 = "", getProps$g = () => ({
14568
14586
  return !o.isReadAutomatically.value && !o.store.getIsRetrieved(s.formID) ? n.t("kg.KgTable.emptyText") : n.t("kg.emptyText");
14569
14587
  }
14570
14588
  return () => {
14571
- var N, U, q;
14589
+ var N, U, Q;
14572
14590
  return createVNode("div", {
14573
14591
  class: R.value,
14574
14592
  "kg-frm_id": s.formID,
@@ -14593,14 +14611,14 @@ const KgTable$1 = "", getProps$g = () => ({
14593
14611
  customRow: (z) => ({
14594
14612
  onClick: (ee) => H(ee, z)
14595
14613
  }),
14596
- onResizeColumn: Q,
14614
+ onResizeColumn: q,
14597
14615
  onChange: X,
14598
14616
  onExpand: J
14599
14617
  }, {
14600
- headerCell: le,
14618
+ headerCell: ue,
14601
14619
  bodyCell: g,
14602
14620
  emptyText: fe,
14603
- expandedRowRender: (q = r == null ? void 0 : r.KgTable) == null ? void 0 : q.expandedRowRender,
14621
+ expandedRowRender: (Q = r == null ? void 0 : r.KgTable) == null ? void 0 : Q.expandedRowRender,
14604
14622
  summary: _e
14605
14623
  }), (o.isShowBottomLeft.value || o.isShowBottomRight.value) && createVNode("div", {
14606
14624
  class: B.value
@@ -15819,7 +15837,7 @@ function useKgSearch(e) {
15819
15837
  KgLogger.error(`${t.formID} | useKgSearch | search() | \u67E5\u8BE2\u51FD\u6570\u4E3A\u7A7A.`);
15820
15838
  return;
15821
15839
  }
15822
- d(i);
15840
+ typeof i == "boolean" ? (KgLogger.deprecated(`${t.formID} | useKgSearch | search() | \u65E7\u7684\u53C2\u6570\u683C\u5F0F\u5DF2\u5F03\u7528, \u8BF7\u4F7F\u7528\u65B0\u7684\u53C2\u6570\u683C\u5F0F.`), d({ isSearchFirstPage: i })) : d(i);
15823
15841
  }
15824
15842
  },
15825
15843
  { immediate: !0 }
@@ -16496,9 +16514,9 @@ const KgSearch$1 = "", getProps$9 = () => ({
16496
16514
  });
16497
16515
  _useLayoutHeaderResizeObserver();
16498
16516
  const g = _useFormModel(v, y, _), b = computed(() => {
16499
- var K, F, Y, Q;
16517
+ var K, F, Y, q;
16500
16518
  if (!isNil((F = (K = r == null ? void 0 : r.value) == null ? void 0 : K.KgSearch) == null ? void 0 : F.kgDisabled))
16501
- return (Q = (Y = r == null ? void 0 : r.value) == null ? void 0 : Y.KgSearch) == null ? void 0 : Q.kgDisabled;
16519
+ return (q = (Y = r == null ? void 0 : r.value) == null ? void 0 : Y.KgSearch) == null ? void 0 : q.kgDisabled;
16502
16520
  if (!isNil(e.kgDisabled))
16503
16521
  return e.kgDisabled;
16504
16522
  }), E = computed(() => {
@@ -16524,22 +16542,27 @@ const KgSearch$1 = "", getProps$9 = () => ({
16524
16542
  let K = "kg-search";
16525
16543
  return o.value && (K += " kg-search--visible"), c.value && (K += " kg-search--teleport"), K;
16526
16544
  });
16527
- async function R(K = !1) {
16528
- if (KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u6267\u884C\u5F00\u59CB.`), E.value) {
16529
- KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u91CD\u7F6E\u6309\u94AE\u7981\u7528.`);
16545
+ async function R(K = {}) {
16546
+ var F, Y;
16547
+ if (KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u6267\u884C\u5F00\u59CB.`), l.isRetrieving.value) {
16548
+ KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u6B63\u5728\u67E5\u8BE2.`);
16549
+ return;
16550
+ }
16551
+ if (((F = n.varButtonSearch.value) == null ? void 0 : F.permission_type) === 2 && !a.p((Y = n.varButtonSearch.value) == null ? void 0 : Y.permission_code)) {
16552
+ KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u6CA1\u6709\u6743\u9650.`);
16553
+ return;
16554
+ }
16555
+ if (n.isCreating.value || n.isUpdating.value || n.isCopying.value || n.isDeleting.value) {
16556
+ KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u6B63\u5728\u521B\u5EFA/\u66F4\u65B0/\u590D\u5236/\u5220\u9664.`);
16530
16557
  return;
16531
16558
  }
16532
16559
  o.value ? (KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u663E\u793A\u67E5\u8BE2\u6761\u4EF6\u7EC4\u4EF6.`), y.value && y.value.validate().then(async () => {
16533
- await s.store.emit(n.formID, "search", {
16534
- resetPageIndex: K
16535
- });
16536
- }).catch((F) => {
16560
+ await s.store.emit(n.formID, "search", K);
16561
+ }).catch((q) => {
16537
16562
  KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u8868\u5355\u9A8C\u8BC1\u5931\u8D25.`, {
16538
- e: F
16563
+ e: q
16539
16564
  });
16540
- })) : (KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u9690\u85CF\u67E5\u8BE2\u6761\u4EF6\u7EC4\u4EF6.`), await s.store.emit(n.formID, "search", {
16541
- resetPageIndex: K
16542
- }));
16565
+ })) : (KgLogger.debug(`${n.formID} | KgSearch | onSearch() | \u9690\u85CF\u67E5\u8BE2\u6761\u4EF6\u7EC4\u4EF6.`), await s.store.emit(n.formID, "search", K));
16543
16566
  }
16544
16567
  s.store.setSearchFn(n.formID, R);
16545
16568
  async function B() {
@@ -16553,7 +16576,9 @@ const KgSearch$1 = "", getProps$9 = () => ({
16553
16576
  }
16554
16577
  s.store.setResetFn(n.formID, B);
16555
16578
  function $() {
16556
- return R(!0), Promise.resolve(!0);
16579
+ return R({
16580
+ isSearchFirstPage: !0
16581
+ }), Promise.resolve(!0);
16557
16582
  }
16558
16583
  function I() {
16559
16584
  var K;
@@ -16568,9 +16593,9 @@ const KgSearch$1 = "", getProps$9 = () => ({
16568
16593
  }, [t.KgSearch.left()]), C.value ? createVNode(CaretUpOutlined$1, null, null) : createVNode(CaretDownOutlined$1, null, null), createVNode("span", null, [a.t("kg.KgSearch.title")])]);
16569
16594
  }
16570
16595
  function V() {
16571
- var K, F, Y, Q;
16596
+ var K, F, Y, q;
16572
16597
  return ((Y = (F = (K = n.varProfileMasters) == null ? void 0 : K.value) == null ? void 0 : F.length) != null ? Y : 0) === 0 ? null : createVNode(Fragment, null, [createVNode(Select, {
16573
- value: (Q = n.currentVarProfileMasterID.value) != null ? Q : void 0,
16598
+ value: (q = n.currentVarProfileMasterID.value) != null ? q : void 0,
16574
16599
  "onUpdate:value": (X) => n.store.setCurrentVarProfileMasterID(n.formID, X),
16575
16600
  disabled: T.value,
16576
16601
  class: "kg-search-profile-master-select"
@@ -16601,7 +16626,7 @@ const KgSearch$1 = "", getProps$9 = () => ({
16601
16626
  }, null)]);
16602
16627
  }
16603
16628
  function P() {
16604
- var K, F, Y, Q, X;
16629
+ var K, F, Y, q, X;
16605
16630
  return createVNode(Fragment, null, [V(), !(((K = n.varButtonSearch.value) == null ? void 0 : K.permission_type) !== 2 && !a.p((F = n.varButtonSearch.value) == null ? void 0 : F.permission_code)) && createVNode(Button, {
16606
16631
  type: "primary",
16607
16632
  ghost: !E.value,
@@ -16613,7 +16638,7 @@ const KgSearch$1 = "", getProps$9 = () => ({
16613
16638
  }), createVNode(KgButton.Item, {
16614
16639
  kgType: KG_BUTTON_TYPE.SEARCH,
16615
16640
  kgVarName: (Y = n.varButtonSearch.value) == null ? void 0 : Y.var_nam,
16616
- kgIcon: (Q = n.varButtonSearch.value) == null ? void 0 : Q.icon,
16641
+ kgIcon: (q = n.varButtonSearch.value) == null ? void 0 : q.icon,
16617
16642
  kgText: D.value,
16618
16643
  kgColor: (X = n.varButtonSearch.value) == null ? void 0 : X.color,
16619
16644
  kgPrimary: w.value,
@@ -16640,7 +16665,9 @@ const KgSearch$1 = "", getProps$9 = () => ({
16640
16665
  key: Y.var_nam,
16641
16666
  kgVarName: Y.var_nam,
16642
16667
  kgContext: KG_FORM_CONTEXT.SEARCH,
16643
- onKgSubmit: () => R(!0)
16668
+ onKgSubmit: () => R({
16669
+ isSearchFirstPage: !0
16670
+ })
16644
16671
  }, null))];
16645
16672
  }
16646
16673
  })]
@@ -13,7 +13,6 @@ declare const _default: import("vue").DefineComponent<{
13
13
  default: undefined;
14
14
  };
15
15
  kgSpan: import("vue").PropType<number>;
16
- /** 获取下拉列表数据. */
17
16
  kgPlaceholder: import("vue").PropType<string>;
18
17
  kgMode: import("vue").PropType<"multiple" | "tags">;
19
18
  kgShowLabel: {
@@ -54,7 +53,6 @@ declare const _default: import("vue").DefineComponent<{
54
53
  default: undefined;
55
54
  };
56
55
  kgSpan: import("vue").PropType<number>;
57
- /** 获取下拉列表数据. */
58
56
  kgPlaceholder: import("vue").PropType<string>;
59
57
  kgMode: import("vue").PropType<"multiple" | "tags">;
60
58
  kgShowLabel: {
@@ -89,5 +89,28 @@ export declare type IKgFormItemSlotControlParam = {
89
89
  varProfileDetail: VarProfileDetail;
90
90
  varSubmitField: VarSubmitField;
91
91
  };
92
+ /**
93
+ * 对应于 {@link VarVariableConfig.ctrl_prop} 字段, 给不同类型的表单控件设置额外参数.
94
+ * @see VarVariableConfig.ctrl_prop
95
+ * @see KG_FORM_ITEM_TYPE
96
+ */
97
+ export interface IKgFormItemTypeProperties {
98
+ CHECKBOX_GROUP: {
99
+ /**
100
+ * 数据项的宽度.
101
+ * @default 24
102
+ */
103
+ span?: number;
104
+ /** 要排除哪些值. */
105
+ excludeValues?: Array<any>;
106
+ };
107
+ RADIO_GROUP: {
108
+ /**
109
+ * 数据项的宽度.
110
+ * @default 24
111
+ */
112
+ span?: number;
113
+ };
114
+ }
92
115
  /** 依赖注入 kgContext 参数. */
93
116
  export declare const DI_KG_CONTEXT: InjectionKey<string>;
@@ -1,5 +1,6 @@
1
1
  import { ComputedRef } from 'vue';
2
2
  import { IRemoveEventListenerHandler } from '../../consts';
3
+ import { IKgTableSearchParams } from '../KgTable';
3
4
  import { IKgSearchReadyCb, IKgSearchResetCb, IKgSearchSearchCb, IKgSearchStore } from './index.store';
4
5
  export declare type IUseKgSearch = {
5
6
  formID: string;
@@ -11,12 +12,9 @@ export declare type IUseKgSearch = {
11
12
  model: ComputedRef<ReturnType<IKgSearchStore['getModel']>>;
12
13
  /** 高级查询的操作符表单数据对象. */
13
14
  operatorModel: ComputedRef<ReturnType<IKgSearchStore['getOperatorModel']>>;
14
- /**
15
- * 执行查询.
16
- * @param resetPageIndex 是否从第一页开始查询.
17
- */
18
- search(resetPageIndex?: boolean): void;
19
- /** 执行重置. */
15
+ /** 查询. */
16
+ search(param?: boolean | IKgTableSearchParams): void;
17
+ /** 重置. */
20
18
  reset(): void;
21
19
  /**
22
20
  * 监听事件: ready, 查询字段初始完成, 组件渲染完成.
@@ -1,5 +1,6 @@
1
1
  import { StoreDefinition } from 'pinia';
2
2
  import { IKgEventCb } from '../../consts';
3
+ import { IKgTableSearchParams } from '../KgTable';
3
4
  /**
4
5
  * 事件类型.
5
6
  * 'ready': 就绪, 查询字段初始完成, 组件渲染完成
@@ -9,18 +10,13 @@ import { IKgEventCb } from '../../consts';
9
10
  export declare type IKgSearchEvent = 'ready' | 'search' | 'reset';
10
11
  /** 事件监听函数: ready. */
11
12
  export declare type IKgSearchReadyCb = ((param: any) => Promise<boolean>) & IKgEventCb;
12
- /** 事件监听函数: search. */
13
- export declare type IKgSearchSearchCbParam = {
14
- /** 是否从第一页开始查询. */
15
- resetPageIndex?: boolean;
16
- };
17
- export declare type IKgSearchSearchCb = ((param: IKgSearchSearchCbParam) => Promise<boolean>) & IKgEventCb;
13
+ export declare type IKgSearchSearchCb = ((param: IKgTableSearchParams) => Promise<boolean>) & IKgEventCb;
18
14
  /** 事件监听函数: reset. */
19
15
  export declare type IKgSearchResetCb = ((param: any) => Promise<boolean>) & IKgEventCb;
20
- export declare type IKgSearchCbParam = IKgSearchSearchCbParam;
16
+ export declare type IKgSearchCbParam = IKgTableSearchParams;
21
17
  export declare type IKgSearchCb = IKgSearchReadyCb | IKgSearchSearchCb | IKgSearchResetCb;
22
18
  /** 查询方法. */
23
- export declare type IKgSearchSearchFn = (resetPageIndex?: boolean) => void;
19
+ export declare type IKgSearchSearchFn = (param?: IKgTableSearchParams) => void;
24
20
  /** 重置方法. */
25
21
  export declare type IKgSearchResetFn = () => void;
26
22
  export interface IKgSearchState {
@@ -10,6 +10,19 @@ export declare type IKgTableRow<T = {}> = {
10
10
  } & {
11
11
  [K in keyof T]: T[K];
12
12
  };
13
+ /** 查询方法参数. */
14
+ export interface IKgTableSearchParams {
15
+ /**
16
+ * 是否查询首页, 否则查询当页.
17
+ * @default false
18
+ */
19
+ isSearchFirstPage?: boolean;
20
+ /**
21
+ * 是否保留行的勾选状态.
22
+ * @default false
23
+ */
24
+ isPreserveSelectedRows?: boolean;
25
+ }
13
26
  /** 插槽参数. */
14
27
  export interface IKgTableSlotParams<T = {}> {
15
28
  bodyCell: {
@@ -112,29 +125,6 @@ export interface IKgTableCellDisplayTypeProperties {
112
125
  }>;
113
126
  };
114
127
  }
115
- /**
116
- * 对应于 {@link VarVariableConfig.ctrl_prop} 字段, 给不同类型的表单控件设置额外参数.
117
- * @see VarVariableConfig.ctrl_prop
118
- * @see KG_FORM_ITEM_TYPE
119
- */
120
- export interface IKgFormItemTypeProperties {
121
- CHECKBOX_GROUP: {
122
- /**
123
- * 数据项的宽度.
124
- * @default 24
125
- */
126
- span?: number;
127
- /** 要排除哪些值. */
128
- excludeValues?: Array<any>;
129
- };
130
- RADIO_GROUP: {
131
- /**
132
- * 数据项的宽度.
133
- * @default 24
134
- */
135
- span?: number;
136
- };
137
- }
138
128
  /** 表格的单元格所处环境. */
139
129
  export declare const enum KG_TABLE_CELL_CONTEXT {
140
130
  /** 表格的单元格. */
@@ -2,6 +2,14 @@
2
2
  * 日志服务.
3
3
  */
4
4
  declare class KgLogger {
5
+ /**
6
+ * 打印弃用日志.
7
+ *
8
+ * @param message 提示消息.
9
+ * @param args 数据对象.
10
+ * @param collapsed 是否折叠.
11
+ */
12
+ static deprecated(message: string, args?: Record<string, any>, collapsed?: boolean): void;
5
13
  /**
6
14
  * 打印错误日志.
7
15
  *
@@ -27,7 +35,7 @@ declare class KgLogger {
27
35
  * @param collapsed 是否折叠.
28
36
  * @param style 提示消息样式.
29
37
  */
30
- static log(level: "error" | "debug" | "info" | "warn" | undefined, message: string, args?: Record<string, any>, collapsed?: boolean, style?: string): void;
38
+ static log(level: "error" | "debug" | "info" | "warn" | "deprecated" | undefined, message: string, args?: Record<string, any>, collapsed?: boolean, style?: string): void;
31
39
  /**
32
40
  * 打印警告日志.
33
41
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/vue",
3
- "version": "0.10.11",
3
+ "version": "0.11.0",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build:dev": "rimraf dist && vue-tsc && vite build --mode development",