@kengic/vue 0.6.11-beta.1 → 0.6.12

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  var ve = Object.defineProperty;
2
2
  var be = (e, t, r) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var p = (e, t, r) => (be(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { h, nextTick, createVNode, defineComponent, toRaw, unref, inject, getCurrentInstance, markRaw, ref, watch, reactive, effectScope, isRef, isReactive, toRef, computed, onUnmounted, toRefs, Fragment, isVNode, createTextVNode, provide, onMounted, mergeProps, Teleport, getCurrentScope, onScopeDispose } from "vue";
4
+ import { h, nextTick, createVNode, defineComponent, toRaw, unref, inject, getCurrentInstance, markRaw, ref, watch, reactive, effectScope, isRef, isReactive, toRef, computed, onUnmounted, toRefs, Fragment, isVNode, createTextVNode, provide, onMounted, mergeProps, onActivated, onDeactivated, Teleport, getCurrentScope, onScopeDispose } from "vue";
5
5
  import { Modal, Spin, Tooltip, Select, SelectOption, Button, Progress, Form, Checkbox, Divider, Row, Col, DatePicker, Input, InputNumber, Radio, Switch, Textarea, message, Drawer, Tag, Tabs, Dropdown, Menu, Table, Pagination, TableSummary, Upload, ConfigProvider, Transfer, Card, TabPane } from "ant-design-vue";
6
6
  const index$7 = "";
7
7
  let _httpClient = null;
@@ -270,6 +270,7 @@ class VarGridConfig {
270
270
  p(this, "id");
271
271
  p(this, "id_clm");
272
272
  p(this, "mult_flg");
273
+ p(this, "operation_on_row_click");
273
274
  p(this, "pg_size_opt");
274
275
  p(this, "pg_size_opts");
275
276
  p(this, "prf_frm_id");
@@ -288,6 +289,7 @@ class VarGridConfig {
288
289
  case "id":
289
290
  case "id_clm":
290
291
  case "mult_flg":
292
+ case "operation_on_row_click":
291
293
  case "pg_size_opt":
292
294
  case "pg_size_opts":
293
295
  case "prf_frm_id":
@@ -7969,19 +7971,20 @@ function transformVarProfileConfig(e) {
7969
7971
  function transformVarGridConfig(e) {
7970
7972
  if (!e)
7971
7973
  return null;
7972
- e.pg_size_opts || (e.pg_size_opts = DEFAULT_PAGE_SIZES);
7974
+ let t = e.operation_on_row_click;
7975
+ isNil(t) ? e.operation_on_row_click = 1 : (t = Number(e.operation_on_row_click), [0, 1, 2].includes(t) || (e.operation_on_row_click = 1, KgLogger.error(`| \u6570\u636E\u6709\u8BEF | VarGridConfig.min_width \u975E\u6CD5, \u6539\u4E3A\u4F7F\u7528\u9ED8\u8BA4\u503C ${1}. \u5408\u6CD5\u7684\u503C\u4E3A 0, 1, 2.`, { VarGridConfig: e }))), e.pg_size_opts || (e.pg_size_opts = DEFAULT_PAGE_SIZES);
7973
7976
  try {
7974
- let t = JSON.parse(e.pg_size_opts);
7977
+ let r = JSON.parse(e.pg_size_opts);
7975
7978
  switch (!0) {
7976
- case !isArray$1(t):
7977
- case t.length < 1:
7978
- case t.some((r) => Number.isNaN(Number(r)) || Math.floor(Number(r)) <= 0):
7979
+ case !isArray$1(r):
7980
+ case r.length < 1:
7981
+ case r.some((a) => Number.isNaN(Number(a)) || Math.floor(Number(a)) <= 0):
7979
7982
  e.pg_size_opts = DEFAULT_PAGE_SIZES, KgLogger.error(`| \u6570\u636E\u6709\u8BEF | VarGridConfig.pg_size_opts \u975E\u6CD5, \u6539\u4E3A\u4F7F\u7528\u9ED8\u8BA4\u503C ${DEFAULT_PAGE_SIZES}.`, { VarGridConfig: e });
7980
7983
  break;
7981
7984
  default:
7982
- switch (t = sortBy$1(uniq(t.map((r) => Math.floor(r)))), e.pg_size_opts = JSON.stringify(t), e.pg_size_opt || (e.pg_size_opt = t[0]), e.pg_size_opt = Number(e.pg_size_opt), !0) {
7985
+ switch (r = sortBy$1(uniq(r.map((a) => Math.floor(a)))), e.pg_size_opts = JSON.stringify(r), e.pg_size_opt || (e.pg_size_opt = r[0]), e.pg_size_opt = Number(e.pg_size_opt), !0) {
7983
7986
  case Number.isNaN(e.pg_size_opt):
7984
- case !t.includes(e.pg_size_opt):
7987
+ case !r.includes(e.pg_size_opt):
7985
7988
  e.pg_size_opt = DEFAULT_PAGE_SIZE, KgLogger.error(`| \u6570\u636E\u6709\u8BEF | VarGridConfig.pg_size_opt \u975E\u6CD5, \u6539\u4E3A\u4F7F\u7528\u9ED8\u8BA4\u503C ${DEFAULT_PAGE_SIZE}.`, { VarGridConfig: e });
7986
7989
  break;
7987
7990
  }
@@ -10543,29 +10546,29 @@ const getProps$p = () => ({
10543
10546
  const n = useKg(), o = useKgVar(), i = useKgButton(), s = useKgTable(), l = useKgSubmit(), c = useKgSearch();
10544
10547
  i.onSubmitSave(async () => (await ue(), !1)), i.onSubmitCancel(async () => (await oe(), !1)), _useFormModel$1();
10545
10548
  const u = computed(() => o.isDeleting.value && T.value.length === 0 && M.value.length === 0), d = computed(() => l.store.isLoading(o.formID)), m = computed(() => o.store.getVarSubmitConfig(o.formID)), v = computed(() => o.store.getVarSubmitFieldsForCreateKey(o.formID)), C = computed(() => o.store.getVarSubmitFieldsForCreateNotKey(o.formID)), g = computed(() => o.store.getVarSubmitFieldsForUpdateKey(o.formID)), _ = computed(() => o.store.getVarSubmitFieldsForUpdateNotKey(o.formID)), b = computed(() => o.store.getVarSubmitFieldsForCopyKey(o.formID)), y = computed(() => o.store.getVarSubmitFieldsForCopyNotKey(o.formID)), k = computed(() => o.store.getVarSubmitFieldsForDelete(o.formID)), T = computed(() => {
10546
- var L, B, q;
10549
+ var L, B, W;
10547
10550
  switch (!0) {
10548
10551
  case o.isCreating.value:
10549
10552
  return (L = v.value) != null ? L : [];
10550
10553
  case o.isUpdating.value:
10551
10554
  return (B = g.value) != null ? B : [];
10552
10555
  case o.isCopying.value:
10553
- return (q = b.value) != null ? q : [];
10556
+ return (W = b.value) != null ? W : [];
10554
10557
  case o.isDeleting.value:
10555
10558
  return [];
10556
10559
  }
10557
10560
  return [];
10558
10561
  }), M = computed(() => {
10559
- var L, B, q, ee;
10562
+ var L, B, W, Z;
10560
10563
  switch (!0) {
10561
10564
  case o.isCreating.value:
10562
10565
  return (L = C.value) != null ? L : [];
10563
10566
  case o.isUpdating.value:
10564
10567
  return (B = _.value) != null ? B : [];
10565
10568
  case o.isCopying.value:
10566
- return (q = y.value) != null ? q : [];
10569
+ return (W = y.value) != null ? W : [];
10567
10570
  case o.isDeleting.value:
10568
- return (ee = k.value) != null ? ee : [];
10571
+ return (Z = k.value) != null ? Z : [];
10569
10572
  }
10570
10573
  return [];
10571
10574
  }), E = computed(() => !!o.store.isCreatingRequesting(o.formID) || !!o.store.isUpdatingRequesting(o.formID) || !!o.store.isCopyingRequesting(o.formID) || !!o.store.isDeletingRequesting(o.formID)), N = computed(() => E.value || d.value), I = computed(() => d.value), A = ref({
@@ -10590,7 +10593,7 @@ const getProps$p = () => ({
10590
10593
  } = _useLayout(), {
10591
10594
  getDefaultWidth: Q
10592
10595
  } = _useDefaultWidth(), X = computed(() => {
10593
- var L, B, q;
10596
+ var L, B, W;
10594
10597
  switch (H.value) {
10595
10598
  case "horizontal":
10596
10599
  switch ((L = m.value) == null ? void 0 : L.label_col_unit) {
@@ -10601,7 +10604,7 @@ const getProps$p = () => ({
10601
10604
  default:
10602
10605
  return {
10603
10606
  style: {
10604
- width: `${(q = m.value) == null ? void 0 : q.label_col}px`
10607
+ width: `${(W = m.value) == null ? void 0 : W.label_col}px`
10605
10608
  }
10606
10609
  };
10607
10610
  }
@@ -10635,8 +10638,8 @@ const getProps$p = () => ({
10635
10638
  });
10636
10639
  function te() {
10637
10640
  var B;
10638
- const L = watch(l.model, (q) => {
10639
- q && Object.keys(q).length > 0 && (setTimeout(() => L()), l.store.emit(o.formID, "open", {
10641
+ const L = watch(l.model, (W) => {
10642
+ W && Object.keys(W).length > 0 && (setTimeout(() => L()), l.store.emit(o.formID, "open", {
10640
10643
  isCreating: o.isCreating.value,
10641
10644
  isUpdating: o.isUpdating.value,
10642
10645
  isCopying: o.isCopying.value,
@@ -10710,12 +10713,12 @@ const getProps$p = () => ({
10710
10713
  await fe();
10711
10714
  break;
10712
10715
  }
10713
- } catch (q) {
10714
- KgUtil.throwIfNotFormError(q);
10716
+ } catch (W) {
10717
+ KgUtil.throwIfNotFormError(W);
10715
10718
  }
10716
10719
  }
10717
10720
  async function de() {
10718
- var B, q, ee, ne, se, ie;
10721
+ var B, W, Z, ne, se, ie;
10719
10722
  const L = (B = o.varButtonCreate.value) == null ? void 0 : B.cmd;
10720
10723
  if (!L) {
10721
10724
  KgLogger.error("[KgSubmit] '\u521B\u5EFA\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10725,7 +10728,7 @@ const getProps$p = () => ({
10725
10728
  }
10726
10729
  o.store.setIsCreatingRequesting(o.formID, !0);
10727
10730
  try {
10728
- let Z = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((ee = (q = o.varButtonCreate.value) == null ? void 0 : q.cmd_prm) != null ? ee : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10731
+ let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (W = o.varButtonCreate.value) == null ? void 0 : W.cmd_prm) != null ? Z : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10729
10732
  if (await l.store.emit(o.formID, "beforeRequest", {
10730
10733
  isCreating: o.isCreating.value,
10731
10734
  isUpdating: o.isUpdating.value,
@@ -10734,14 +10737,14 @@ const getProps$p = () => ({
10734
10737
  row: s.selectedFirstRow.value,
10735
10738
  rows: s.selectedRows.value,
10736
10739
  model: l.model,
10737
- params: Z,
10740
+ params: ee,
10738
10741
  data: le
10739
10742
  }))
10740
10743
  return;
10741
10744
  await httpClient().request({
10742
10745
  method: (se = (ne = o.varButtonCreate.value) == null ? void 0 : ne.cmd_method) != null ? se : "POST",
10743
10746
  url: L,
10744
- params: Z.value,
10747
+ params: ee.value,
10745
10748
  data: le.value
10746
10749
  }), ((ie = o.varButtonCreate.value) == null ? void 0 : ie.show_success_message_flg) !== 0 && message.success(D.title.value + n.t("kg.succeed")), await l.store.emit(o.formID, "ok", {
10747
10750
  isCreating: o.isCreating.value,
@@ -10751,14 +10754,14 @@ const getProps$p = () => ({
10751
10754
  row: s.selectedFirstRow.value,
10752
10755
  model: l.model
10753
10756
  }), o.store.setIsCreating(o.formID, !1), c.search(!0);
10754
- } catch (Z) {
10755
- console.error(Z), l.store.emit(o.formID, "error", Z);
10757
+ } catch (ee) {
10758
+ console.error(ee), l.store.emit(o.formID, "error", ee);
10756
10759
  } finally {
10757
10760
  o.store.setIsCreatingRequesting(o.formID, !1);
10758
10761
  }
10759
10762
  }
10760
10763
  async function re() {
10761
- var B, q, ee, ne, se, ie;
10764
+ var B, W, Z, ne, se, ie;
10762
10765
  const L = (B = o.varButtonUpdate.value) == null ? void 0 : B.cmd;
10763
10766
  if (!L) {
10764
10767
  KgLogger.error("[KgSubmit] '\u66F4\u65B0\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10768,7 +10771,7 @@ const getProps$p = () => ({
10768
10771
  }
10769
10772
  try {
10770
10773
  o.store.setIsUpdatingRequesting(o.formID, !0);
10771
- let Z = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((ee = (q = o.varButtonUpdate.value) == null ? void 0 : q.cmd_prm) != null ? ee : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10774
+ let ee = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (W = o.varButtonUpdate.value) == null ? void 0 : W.cmd_prm) != null ? Z : ""), o.formID, r)), le = ref(KgUtil.parseParams(toRaw(l.model.value), o.formID, r));
10772
10775
  if (await l.store.emit(o.formID, "beforeRequest", {
10773
10776
  isCreating: o.isCreating.value,
10774
10777
  isUpdating: o.isUpdating.value,
@@ -10777,14 +10780,14 @@ const getProps$p = () => ({
10777
10780
  row: s.selectedRow.value,
10778
10781
  rows: s.selectedRows.value,
10779
10782
  model: l.model,
10780
- params: Z,
10783
+ params: ee,
10781
10784
  data: le
10782
10785
  }))
10783
10786
  return;
10784
10787
  await httpClient().request({
10785
10788
  method: (se = (ne = o.varButtonUpdate.value) == null ? void 0 : ne.cmd_method) != null ? se : "POST",
10786
10789
  url: L,
10787
- params: Z.value,
10790
+ params: ee.value,
10788
10791
  data: le.value
10789
10792
  }), ((ie = o.varButtonUpdate.value) == null ? void 0 : ie.show_success_message_flg) !== 0 && message.success(n.t("kg.updateSuccess")), await l.store.emit(o.formID, "ok", {
10790
10793
  isCreating: o.isCreating.value,
@@ -10794,14 +10797,14 @@ const getProps$p = () => ({
10794
10797
  row: s.selectedFirstRow.value,
10795
10798
  model: l.model
10796
10799
  }), o.store.setIsUpdating(o.formID, !1), c.search();
10797
- } catch (Z) {
10798
- console.error(Z), l.store.emit(o.formID, "error", Z);
10800
+ } catch (ee) {
10801
+ console.error(ee), l.store.emit(o.formID, "error", ee);
10799
10802
  } finally {
10800
10803
  o.store.setIsUpdatingRequesting(o.formID, !1);
10801
10804
  }
10802
10805
  }
10803
10806
  async function ce() {
10804
- var B, q, ee, ne, se, ie, Z, le;
10807
+ var B, W, Z, ne, se, ie, ee, le;
10805
10808
  const L = (B = o.varButtonCopy.value) == null ? void 0 : B.cmd;
10806
10809
  if (!L) {
10807
10810
  KgLogger.error("[KgSubmit] '\u590D\u5236\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10811,7 +10814,7 @@ const getProps$p = () => ({
10811
10814
  }
10812
10815
  try {
10813
10816
  o.store.setIsCopyingRequesting(o.formID, !0);
10814
- let ge = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((ee = (q = o.varButtonCopy.value) == null ? void 0 : q.cmd_prm) != null ? ee : ""), o.formID, r)), pe = ref(KgUtil.parseParams({
10817
+ let ge = ref(KgUtil.parseParams(KgVarUtil.parseCommandParameter((Z = (W = o.varButtonCopy.value) == null ? void 0 : W.cmd_prm) != null ? Z : ""), o.formID, r)), pe = ref(KgUtil.parseParams({
10815
10818
  ...(ne = s.selectedFirstRow.value) != null ? ne : {},
10816
10819
  ...toRaw(l.model.value)
10817
10820
  }, o.formID, r));
@@ -10828,7 +10831,7 @@ const getProps$p = () => ({
10828
10831
  }))
10829
10832
  return;
10830
10833
  await httpClient().request({
10831
- method: (Z = (ie = o.varButtonCopy.value) == null ? void 0 : ie.cmd_method) != null ? Z : "POST",
10834
+ method: (ee = (ie = o.varButtonCopy.value) == null ? void 0 : ie.cmd_method) != null ? ee : "POST",
10832
10835
  url: L,
10833
10836
  params: ge.value,
10834
10837
  data: pe.value
@@ -10847,7 +10850,7 @@ const getProps$p = () => ({
10847
10850
  }
10848
10851
  }
10849
10852
  async function fe() {
10850
- var B, q, ee, ne, se, ie;
10853
+ var B, W, Z, ne, se, ie;
10851
10854
  const L = (B = o.varButtonDelete.value) == null ? void 0 : B.cmd;
10852
10855
  if (!L) {
10853
10856
  KgLogger.error("[KgSubmit] '\u5220\u9664\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
@@ -10857,11 +10860,11 @@ const getProps$p = () => ({
10857
10860
  }
10858
10861
  try {
10859
10862
  o.store.setIsDeletingRequesting(o.formID, !0);
10860
- let Z = ref({
10861
- ids: (ee = (q = s.selectedRows.value) == null ? void 0 : q.map((pe) => {
10863
+ let ee = ref({
10864
+ ids: (Z = (W = s.selectedRows.value) == null ? void 0 : W.map((pe) => {
10862
10865
  var me, _e, he;
10863
10866
  return (he = pe[(_e = (me = o.varButtonDelete.value) == null ? void 0 : me.del_param_clm) != null ? _e : "id"]) != null ? he : "";
10864
- })) != null ? ee : []
10867
+ })) != null ? Z : []
10865
10868
  }), le = ref({});
10866
10869
  if (await l.store.emit(o.formID, "beforeRequest", {
10867
10870
  isCreating: o.isCreating.value,
@@ -10871,14 +10874,14 @@ const getProps$p = () => ({
10871
10874
  row: s.selectedFirstRow.value,
10872
10875
  rows: s.selectedRows.value,
10873
10876
  model: l.model,
10874
- params: Z,
10877
+ params: ee,
10875
10878
  data: le
10876
10879
  }))
10877
10880
  return;
10878
10881
  await httpClient().request({
10879
10882
  method: (se = (ne = o.varButtonDelete.value) == null ? void 0 : ne.cmd_method) != null ? se : "DELETE",
10880
10883
  url: L,
10881
- params: Z.value,
10884
+ params: ee.value,
10882
10885
  data: le.value
10883
10886
  }, {
10884
10887
  joinParamsToUrl: !0
@@ -10890,15 +10893,15 @@ const getProps$p = () => ({
10890
10893
  row: s.selectedFirstRow.value,
10891
10894
  model: l.model
10892
10895
  }), o.store.setIsDeleting(o.formID, !1), c.search(!0);
10893
- } catch (Z) {
10894
- console.error(Z), l.store.emit(o.formID, "error", Z);
10896
+ } catch (ee) {
10897
+ console.error(ee), l.store.emit(o.formID, "error", ee);
10895
10898
  } finally {
10896
10899
  o.store.setIsDeletingRequesting(o.formID, !1);
10897
10900
  }
10898
10901
  }
10899
10902
  function K(L) {
10900
- var q, ee;
10901
- const B = (ee = (q = a == null ? void 0 : a.KgSubmit) == null ? void 0 : q["KgForm.Item"]) == null ? void 0 : ee[L.var_nam];
10903
+ var W, Z;
10904
+ const B = (Z = (W = a == null ? void 0 : a.KgSubmit) == null ? void 0 : W["KgForm.Item"]) == null ? void 0 : Z[L.var_nam];
10902
10905
  return isFunction$2(B) ? createVNode(KgForm.Item, {
10903
10906
  kgVarName: L.var_nam,
10904
10907
  kgContext: KG_FORM_CONTEXT.SUBMIT,
@@ -10909,14 +10912,14 @@ const getProps$p = () => ({
10909
10912
  varName: ne,
10910
10913
  props: se,
10911
10914
  model: ie,
10912
- varVariableConfig: Z,
10915
+ varVariableConfig: ee,
10913
10916
  varProfileDetail: le,
10914
10917
  varSubmitField: ge
10915
10918
  }) => B({
10916
10919
  varName: ne,
10917
10920
  props: se,
10918
10921
  model: ie,
10919
- varVariableConfig: Z,
10922
+ varVariableConfig: ee,
10920
10923
  varProfileDetail: le,
10921
10924
  varSubmitField: ge
10922
10925
  })
@@ -10935,7 +10938,7 @@ const getProps$p = () => ({
10935
10938
  kgMaxWidth: $.value,
10936
10939
  kgWidth: P.value,
10937
10940
  kgDisabled: w.value,
10938
- "onUpdate:kgWidth": (q) => A.value.kgWidth = q
10941
+ "onUpdate:kgWidth": (W) => A.value.kgWidth = W
10939
10942
  }, {
10940
10943
  default: () => [createVNode(Spin, {
10941
10944
  spinning: d.value
@@ -10983,7 +10986,7 @@ const getProps$p = () => ({
10983
10986
  default: () => [B]
10984
10987
  })]);
10985
10988
  }
10986
- function W() {
10989
+ function q() {
10987
10990
  return createVNode("div", {
10988
10991
  title: D.title.value
10989
10992
  }, [D.title.value]);
@@ -11010,7 +11013,7 @@ const getProps$p = () => ({
11010
11013
  class: G.value,
11011
11014
  "kg-frm_id": o.formID
11012
11015
  }, {
11013
- title: W,
11016
+ title: q,
11014
11017
  extra: J,
11015
11018
  default: U,
11016
11019
  footer: z
@@ -11048,6 +11051,7 @@ const useKgTableStore = () => (store$4 || (store$4 = defineStore("KgTable", {
11048
11051
  tableWidthMap: /* @__PURE__ */ new Map(),
11049
11052
  rowDoubleClickListenersMap: /* @__PURE__ */ new Map(),
11050
11053
  beforeRetrieveListenersMap: /* @__PURE__ */ new Map(),
11054
+ beforeSetDatasListenersMap: /* @__PURE__ */ new Map(),
11051
11055
  retrieveListenersMap: /* @__PURE__ */ new Map()
11052
11056
  }),
11053
11057
  getters: {
@@ -11119,6 +11123,12 @@ const useKgTableStore = () => (store$4 || (store$4 = defineStore("KgTable", {
11119
11123
  this.beforeRetrieveListenersMap.set(e, [...a != null ? a : [], r]);
11120
11124
  }
11121
11125
  break;
11126
+ case "beforeSetDatas":
11127
+ {
11128
+ const a = this.beforeSetDatasListenersMap.get(e);
11129
+ this.beforeSetDatasListenersMap.set(e, [...a != null ? a : [], r]);
11130
+ }
11131
+ break;
11122
11132
  case "retrieve":
11123
11133
  {
11124
11134
  const a = this.retrieveListenersMap.get(e);
@@ -11143,6 +11153,13 @@ const useKgTableStore = () => (store$4 || (store$4 = defineStore("KgTable", {
11143
11153
  } else
11144
11154
  this.beforeRetrieveListenersMap.set(e, []);
11145
11155
  break;
11156
+ case "beforeSetDatas":
11157
+ if (r) {
11158
+ const a = this.beforeSetDatasListenersMap.get(e);
11159
+ this.beforeSetDatasListenersMap.set(e, without$1(a, r));
11160
+ } else
11161
+ this.beforeSetDatasListenersMap.set(e, []);
11162
+ break;
11146
11163
  case "retrieve":
11147
11164
  if (r) {
11148
11165
  const a = this.retrieveListenersMap.get(e);
@@ -11161,6 +11178,9 @@ const useKgTableStore = () => (store$4 || (store$4 = defineStore("KgTable", {
11161
11178
  case "beforeRetrieve":
11162
11179
  a = this.beforeRetrieveListenersMap.get(e);
11163
11180
  break;
11181
+ case "beforeSetDatas":
11182
+ a = this.beforeSetDatasListenersMap.get(e);
11183
+ break;
11164
11184
  case "retrieve":
11165
11185
  a = this.retrieveListenersMap.get(e);
11166
11186
  break;
@@ -11238,6 +11258,7 @@ function useKgTable(e) {
11238
11258
  profileFormID: C,
11239
11259
  onRowDoubleClick: onEventFactory(t.formID, r, "rowDoubleClick"),
11240
11260
  onBeforeRetrieve: onEventFactory(t.formID, r, "beforeRetrieve"),
11261
+ onBeforeSetDatas: onEventFactory(t.formID, r, "beforeSetDatas"),
11241
11262
  onRetrieve: onEventFactory(t.formID, r, "retrieve")
11242
11263
  };
11243
11264
  }
@@ -11970,12 +11991,12 @@ const KgTable$1 = "", getProps$g = () => ({
11970
11991
  switch (K) {
11971
11992
  case "setRowSelect":
11972
11993
  if (U[0] === s.formID) {
11973
- const z = U[1], W = U[2], J = z[u.id.value];
11994
+ const z = U[1], q = U[2], J = z[u.id.value];
11974
11995
  switch (!0) {
11975
- case (W && !$.value.includes(J)):
11996
+ case (q && !$.value.includes(J)):
11976
11997
  H([...$.value, J]);
11977
11998
  break;
11978
- case (!W && $.value.includes(J)):
11999
+ case (!q && $.value.includes(J)):
11979
12000
  H(without$1($.value, J));
11980
12001
  break;
11981
12002
  }
@@ -11994,7 +12015,7 @@ const KgTable$1 = "", getProps$g = () => ({
11994
12015
  var K, U;
11995
12016
  return (U = (K = s.varButtonSearch.value) == null ? void 0 : K.cmd) != null ? U : null;
11996
12017
  }), k = computed(() => {
11997
- var U, z, W, J, L, B, q;
12018
+ var U, z, q, J, L, B, W;
11998
12019
  let K = {
11999
12020
  pageNo: P.pageIndex,
12000
12021
  pageSize: P.pageSize,
@@ -12003,11 +12024,11 @@ const KgTable$1 = "", getProps$g = () => ({
12003
12024
  };
12004
12025
  return s.varButtonSearch.value && (K = {
12005
12026
  ...K,
12006
- ...KgVarUtil.parseCommandParameter((J = (W = s.varButtonSearch.value) == null ? void 0 : W.cmd_prm) != null ? J : "")
12027
+ ...KgVarUtil.parseCommandParameter((J = (q = s.varButtonSearch.value) == null ? void 0 : q.cmd_prm) != null ? J : "")
12007
12028
  }), (L = s.varGridConfig.value) != null && L.cmd_prm && (K = {
12008
12029
  ...K,
12009
12030
  ...KgVarUtil.parseCommandParameter((B = s.varGridConfig.value.cmd_prm) != null ? B : "")
12010
- }), ((q = s.varGridConfig.value) == null ? void 0 : q.convert_sort_field_to_under_score_flg) === 1 && K.column && (K.column = snakeCase$1(K.column)), K;
12031
+ }), ((W = s.varGridConfig.value) == null ? void 0 : W.convert_sort_field_to_under_score_flg) === 1 && K.column && (K.column = snakeCase$1(K.column)), K;
12011
12032
  }), T = computed(() => _.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value || P.total === 0), M = computed(() => _.value || !!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value), E = computed(() => {
12012
12033
  var K;
12013
12034
  return !!((K = n == null ? void 0 : n.KgTable) != null && K.expandedRowRender);
@@ -12072,6 +12093,7 @@ const KgTable$1 = "", getProps$g = () => ({
12072
12093
  K && (F.value = without$1(F.value, K), u.store.setSelectedRows(s.formID, []));
12073
12094
  }
12074
12095
  function x(K, U) {
12096
+ var z;
12075
12097
  if (!(!!s.isCreating.value || !!s.isUpdating.value || !!s.isCopying.value || !!s.isDeleting.value) && !!I.value) {
12076
12098
  if (!U) {
12077
12099
  u.store.setSelectedRows(s.formID, []);
@@ -12079,7 +12101,13 @@ const KgTable$1 = "", getProps$g = () => ({
12079
12101
  }
12080
12102
  switch (K == null ? void 0 : K.detail) {
12081
12103
  case 1:
12082
- u.store.setSelectedRows(s.formID, [U]);
12104
+ switch ((z = s.varGridConfig.value) == null ? void 0 : z.operation_on_row_click) {
12105
+ case 0:
12106
+ break;
12107
+ case 1:
12108
+ u.store.setSelectedRows(s.formID, [U]);
12109
+ break;
12110
+ }
12083
12111
  break;
12084
12112
  case 2:
12085
12113
  u.store.emit(s.formID, "rowDoubleClick", {
@@ -12091,13 +12119,13 @@ const KgTable$1 = "", getProps$g = () => ({
12091
12119
  }
12092
12120
  function G(K = !1) {
12093
12121
  KgLogger.debug(`${s.formID} | KgTable | retrieve() | \u8FDB\u5165\u65B9\u6CD5.`);
12094
- const U = watch(m, (W) => {
12095
- W && (setTimeout(() => U()), z());
12122
+ const U = watch(m, (q) => {
12123
+ q && (setTimeout(() => U()), z());
12096
12124
  }, {
12097
12125
  immediate: !0
12098
12126
  });
12099
12127
  async function z() {
12100
- var W, J;
12128
+ var q, J;
12101
12129
  if (KgLogger.debug(`${s.formID} | KgTable | retrieve() | read() | \u8FDB\u5165\u65B9\u6CD5.`), !y.value) {
12102
12130
  KgLogger.error("[KgTable] '\u67E5\u8BE2\u6309\u94AE'\u6CA1\u6709\u914D\u7F6E\u63A5\u53E3\u5730\u5740.", {
12103
12131
  VarButton: s.varButtonSearch.value
@@ -12107,7 +12135,7 @@ const KgTable$1 = "", getProps$g = () => ({
12107
12135
  K && (P.pageIndex = 1), u.store.setIsRetrieving(s.formID, !0);
12108
12136
  try {
12109
12137
  const L = KgUtil.parseParams(k.value, u.profileFormID.value, a), B = ref({});
12110
- switch (await u.store.emit(s.formID, "beforeRetrieve", {
12138
+ await u.store.emit(s.formID, "beforeRetrieve", {
12111
12139
  params: L,
12112
12140
  response: B
12113
12141
  }) ? KgLogger.debug(`${s.formID} | KgTable | retrieve() | read() | \u89E6\u53D1 beforeRetrieve \u4E8B\u4EF6.`) : B.value = await httpClient().request({
@@ -12116,18 +12144,23 @@ const KgTable$1 = "", getProps$g = () => ({
12116
12144
  params: L
12117
12145
  }, {
12118
12146
  successMessageMode: "none"
12119
- }), !0) {
12147
+ });
12148
+ let W = ref([]), Z = ref(0);
12149
+ switch (!0) {
12120
12150
  case !B.value:
12121
- F.value = [], P.total = 0;
12151
+ W.value = [], Z.value = 0;
12122
12152
  break;
12123
12153
  case isArrayLike(B.value):
12124
- F.value = B.value, P.total = B.value.length;
12154
+ W.value = B.value, Z.value = B.value.length;
12125
12155
  break;
12126
12156
  case ("total" in B.value && "records" in B.value):
12127
- F.value = (W = B.value.records) != null ? W : [], P.total = (J = B.value.total) != null ? J : 0;
12157
+ W.value = (q = B.value.records) != null ? q : [], Z.value = (J = B.value.total) != null ? J : 0;
12128
12158
  break;
12129
12159
  }
12130
- x(), v.value = [], await nextTick(), await u.store.emit(s.formID, "retrieve", {
12160
+ await u.store.emit(s.formID, "beforeSetDatas", {
12161
+ datas: W,
12162
+ total: Z
12163
+ }), F.value = W.value, P.total = Z.value, x(), v.value = [], await nextTick(), await u.store.emit(s.formID, "retrieve", {
12131
12164
  page: B.value,
12132
12165
  datas: F
12133
12166
  }), u.store.setIsRetrieved(s.formID, !0);
@@ -12141,7 +12174,7 @@ const KgTable$1 = "", getProps$g = () => ({
12141
12174
  function H(K) {
12142
12175
  u.store.setSelectedRows(s.formID, K.map((U) => {
12143
12176
  var z;
12144
- return (z = F.value) == null ? void 0 : z.find((W) => W[u.id.value] === U);
12177
+ return (z = F.value) == null ? void 0 : z.find((q) => q[u.id.value] === U);
12145
12178
  }).filter((U) => !!U));
12146
12179
  }
12147
12180
  function Q(K) {
@@ -12149,28 +12182,28 @@ const KgTable$1 = "", getProps$g = () => ({
12149
12182
  switch (u.isMultiSelect.value) {
12150
12183
  case !0:
12151
12184
  {
12152
- const W = K[u.id.value];
12153
- $.value.includes(W) ? $.value = without$1($.value, W) : $.value = [...(U = $.value) != null ? U : [], W];
12185
+ const q = K[u.id.value];
12186
+ $.value.includes(q) ? $.value = without$1($.value, q) : $.value = [...(U = $.value) != null ? U : [], q];
12154
12187
  }
12155
12188
  break;
12156
12189
  case !1:
12157
12190
  {
12158
- const W = K[u.id.value];
12159
- (z = $.value) != null && z.includes(W) ? $.value = [] : $.value = [W];
12191
+ const q = K[u.id.value];
12192
+ (z = $.value) != null && z.includes(q) ? $.value = [] : $.value = [q];
12160
12193
  }
12161
12194
  break;
12162
12195
  }
12163
- u.store.setSelectedRows(s.formID, $.value.map((W) => {
12196
+ u.store.setSelectedRows(s.formID, $.value.map((q) => {
12164
12197
  var J;
12165
- return (J = F.value) == null ? void 0 : J.find((L) => L[u.id.value] === W);
12166
- }).filter((W) => !!W));
12198
+ return (J = F.value) == null ? void 0 : J.find((L) => L[u.id.value] === q);
12199
+ }).filter((q) => !!q));
12167
12200
  }
12168
12201
  function X(K, U) {
12169
12202
  U.width = K, s.store.setVarGridDetailWidth(s.formID, U.dataIndex, K);
12170
12203
  }
12171
- async function Y(K, U, z, W) {
12204
+ async function Y(K, U, z, q) {
12172
12205
  var J;
12173
- switch (W.action) {
12206
+ switch (q.action) {
12174
12207
  case "sort":
12175
12208
  {
12176
12209
  await nextTick();
@@ -12181,9 +12214,9 @@ const KgTable$1 = "", getProps$g = () => ({
12181
12214
  }
12182
12215
  }
12183
12216
  function te(K, U) {
12184
- var W;
12217
+ var q;
12185
12218
  const z = U[u.id.value];
12186
- switch ((W = s.varGridConfig.value) == null ? void 0 : W.expand_accordion_flg) {
12219
+ switch ((q = s.varGridConfig.value) == null ? void 0 : q.expand_accordion_flg) {
12187
12220
  case 0:
12188
12221
  K ? v.value = uniq([...v.value, z]) : v.value = without$1(v.value, z);
12189
12222
  break;
@@ -12198,7 +12231,7 @@ const KgTable$1 = "", getProps$g = () => ({
12198
12231
  function oe(K) {
12199
12232
  u.store.setSelectedRows(s.formID, [K].map((U) => {
12200
12233
  var z;
12201
- return (z = F.value) == null ? void 0 : z.find((W) => W[u.id.value] === U[u.id.value]);
12234
+ return (z = F.value) == null ? void 0 : z.find((q) => q[u.id.value] === U[u.id.value]);
12202
12235
  }).filter((U) => !!U)), c.click(s.formID, KG_BUTTON_TYPE.UPDATE);
12203
12236
  }
12204
12237
  function ue({
@@ -12208,8 +12241,8 @@ const KgTable$1 = "", getProps$g = () => ({
12208
12241
  switch (U.dataIndex) {
12209
12242
  case "index": {
12210
12243
  const z = (() => {
12211
- var W, J, L, B;
12212
- if (!isNil((J = (W = o == null ? void 0 : o.value) == null ? void 0 : W.KgTable) == null ? void 0 : J.kgDisabled))
12244
+ var q, J, L, B;
12245
+ if (!isNil((J = (q = o == null ? void 0 : o.value) == null ? void 0 : q.KgTable) == null ? void 0 : J.kgDisabled))
12213
12246
  return (B = (L = o == null ? void 0 : o.value) == null ? void 0 : L.KgTable) == null ? void 0 : B.kgDisabled;
12214
12247
  if (!isNil(e.kgDisabled))
12215
12248
  return e.kgDisabled;
@@ -12233,7 +12266,7 @@ const KgTable$1 = "", getProps$g = () => ({
12233
12266
  }, null), N.value && createVNode(TableSummary.Cell, {
12234
12267
  index: E.value ? 1 : 0
12235
12268
  }, null), C.value.map((U, z) => {
12236
- const W = s.store.getVarGridDetail(s.formID, U.dataIndex);
12269
+ const q = s.store.getVarGridDetail(s.formID, U.dataIndex);
12237
12270
  let J = z;
12238
12271
  return E.value && N.value ? J += 2 : (E.value || N.value) && (J += 1), createVNode(TableSummary.Cell, {
12239
12272
  index: J
@@ -12243,7 +12276,7 @@ const KgTable$1 = "", getProps$g = () => ({
12243
12276
  return [(B = (L = n == null ? void 0 : n.KgTable) == null ? void 0 : L["summary.bodyCell"]) == null ? void 0 : B.call(L, {
12244
12277
  column: U,
12245
12278
  index: J,
12246
- varGridDetail: W
12279
+ varGridDetail: q
12247
12280
  })];
12248
12281
  }
12249
12282
  });
@@ -12255,16 +12288,16 @@ const KgTable$1 = "", getProps$g = () => ({
12255
12288
  column: K,
12256
12289
  index: U,
12257
12290
  record: z,
12258
- text: W,
12291
+ text: q,
12259
12292
  value: J
12260
12293
  }) {
12261
- var q;
12294
+ var W;
12262
12295
  let L = "";
12263
12296
  K.customRender ? L = K.customRender({
12264
12297
  index: U,
12265
12298
  record: z,
12266
12299
  column: K,
12267
- text: W,
12300
+ text: q,
12268
12301
  value: J,
12269
12302
  renderIndex: U
12270
12303
  }) : L = J;
@@ -12274,16 +12307,16 @@ const KgTable$1 = "", getProps$g = () => ({
12274
12307
  kgVarName: K.dataIndex,
12275
12308
  onKgUpdateLinkClick: () => oe(z)
12276
12309
  }, null);
12277
- if ((q = n == null ? void 0 : n.KgTable) != null && q.bodyCell) {
12278
- const ee = K.dataIndex ? s.store.getVarGridDetail(s.formID, K.dataIndex) : null;
12310
+ if ((W = n == null ? void 0 : n.KgTable) != null && W.bodyCell) {
12311
+ const Z = K.dataIndex ? s.store.getVarGridDetail(s.formID, K.dataIndex) : null;
12279
12312
  return n.KgTable.bodyCell({
12280
12313
  column: K,
12281
12314
  index: U,
12282
12315
  record: z,
12283
- text: W,
12316
+ text: q,
12284
12317
  value: J,
12285
12318
  row: z,
12286
- varGridDetail: ee,
12319
+ varGridDetail: Z,
12287
12320
  defaultRender: B
12288
12321
  });
12289
12322
  } else
@@ -12834,10 +12867,8 @@ const KgButtonCreate = defineComponent({
12834
12867
  var C, g;
12835
12868
  return (g = (C = o.value) == null ? void 0 : C.cmd_method) != null ? g : "GET";
12836
12869
  }), l = computed(() => {
12837
- var g, _, b, y, k, T;
12870
+ var g, _, b, y, k;
12838
12871
  let C = {
12839
- pageNo: 1,
12840
- pageSize: 0,
12841
12872
  ...(g = a.model.value) != null ? g : {}
12842
12873
  };
12843
12874
  return o.value && (C = {
@@ -12846,7 +12877,7 @@ const KgButtonCreate = defineComponent({
12846
12877
  }), (y = r.varGridConfig.value) != null && y.cmd_prm && (C = {
12847
12878
  ...C,
12848
12879
  ...KgVarUtil.parseCommandParameter((k = r.varGridConfig.value.cmd_prm) != null ? k : "")
12849
- }), ((T = r.varGridConfig.value) == null ? void 0 : T.convert_sort_field_to_under_score_flg) === 1 && C.column && (C.column = snakeCase$1(C.column)), C;
12880
+ }), C;
12850
12881
  }), c = computed(() => {
12851
12882
  var C, g, _, b, y, k, T, M;
12852
12883
  return r.isCreating.value || r.isUpdating.value || r.isCopying.value || r.isDeleting.value || n.isRetrieving.value || ((C = o.value) == null ? void 0 : C.dis_no_select_flg) === 1 && ((_ = (g = n.selectedRows.value) == null ? void 0 : g.length) != null ? _ : 0) === 0 || ((b = o.value) == null ? void 0 : b.dis_mult_select_flg) === 1 && ((k = (y = n.selectedRows.value) == null ? void 0 : y.length) != null ? k : 0) > 1 || ((T = o.value) == null ? void 0 : T.permission_type) === 2 && !t.p((M = o.value) == null ? void 0 : M.permission_code) ? !0 : isNil(e.kgDisabled) ? !1 : e.kgDisabled;
@@ -13932,27 +13963,31 @@ function _useLayoutHeaderResizeObserver() {
13932
13963
  }), {};
13933
13964
  }
13934
13965
  function _useCommon() {
13935
- const e = inject(DI_KG_VAR__KG_PROPS, null), t = useKgVar(), r = computed(() => t.store.getVarProfileConfig(t.formID)), a = computed(() => t.store.getFormLevel(t.formID)), n = computed(() => {
13936
- var d, m, v;
13937
- if (a.value > 0)
13966
+ const e = inject(DI_KG_VAR__KG_PROPS, null), t = useKgVar(), r = computed(() => t.store.getVarProfileConfig(t.formID)), a = computed(() => t.store.getFormLevel(t.formID)), n = ref(!0), o = computed(() => {
13967
+ var m, v, C;
13968
+ if (!n.value || a.value > 0)
13938
13969
  return !1;
13939
- const u = (m = (d = e == null ? void 0 : e.value) == null ? void 0 : d.KgSearch) == null ? void 0 : m.kgHeaderTeleport;
13940
- return u !== void 0 ? u : ((v = r.value) == null ? void 0 : v.header_teleport_flg) !== 0;
13941
- }), o = computed(() => {
13942
- var u;
13943
- return ((u = r.value) == null ? void 0 : u.vis_flg) === 1;
13970
+ const d = (v = (m = e == null ? void 0 : e.value) == null ? void 0 : m.KgSearch) == null ? void 0 : v.kgHeaderTeleport;
13971
+ return d !== void 0 ? d : ((C = r.value) == null ? void 0 : C.header_teleport_flg) !== 0;
13944
13972
  }), i = computed(() => {
13945
- var u;
13946
- return ((u = r.value) == null ? void 0 : u.resizable_flg) !== 0;
13947
- }), s = computed(() => getDefaultHeight(t.currentVarProfileDetails.value, n.value)), l = computed(() => getMaxHeight(t.currentVarProfileDetails.value, n.value)), c = computed(() => n.value ? 1 : HEADER_HEIGHT);
13948
- return {
13949
- isVisible: o,
13950
- isResizable: i,
13951
- isHeaderTeleport: n,
13973
+ var d;
13974
+ return ((d = r.value) == null ? void 0 : d.vis_flg) === 1;
13975
+ }), s = computed(() => {
13976
+ var d;
13977
+ return ((d = r.value) == null ? void 0 : d.resizable_flg) !== 0;
13978
+ }), l = computed(() => getDefaultHeight(t.currentVarProfileDetails.value, o.value)), c = computed(() => getMaxHeight(t.currentVarProfileDetails.value, o.value)), u = computed(() => o.value ? 1 : HEADER_HEIGHT);
13979
+ return onActivated(() => {
13980
+ n.value = !0;
13981
+ }), onDeactivated(() => {
13982
+ n.value = !1;
13983
+ }), {
13984
+ isVisible: i,
13985
+ isResizable: s,
13986
+ isHeaderTeleport: o,
13952
13987
  formLevel: a,
13953
- defaultHeight: s,
13954
- maxHeight: l,
13955
- minHeight: c
13988
+ defaultHeight: l,
13989
+ maxHeight: c,
13990
+ minHeight: u
13956
13991
  };
13957
13992
  }
13958
13993
  function _useFormModel(e, t) {