@aplus-frontend/ui 7.19.0-beta.1 → 7.19.0

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.
Files changed (165) hide show
  1. package/es/src/ag-grid/context.mjs +1 -1
  2. package/es/src/ag-grid/editable/form-item.vue.d.ts +2 -4
  3. package/es/src/ag-grid/editable/form-item.vue.mjs +88 -77
  4. package/es/src/ag-grid/editable/index.vue.d.ts +2 -4
  5. package/es/src/ag-grid/editable/index.vue.mjs +9 -8
  6. package/es/src/ag-grid/editable/interface.d.ts +15 -1
  7. package/es/src/ag-grid/hooks/use-columns.mjs +31 -23
  8. package/es/src/ag-grid/hooks/use-pinned-row.mjs +2 -2
  9. package/es/src/ag-grid/index.vue.d.ts +2 -4
  10. package/es/src/ag-grid/index.vue.mjs +353 -335
  11. package/es/src/ag-grid/interface.d.ts +40 -1
  12. package/es/src/ag-grid/utils.d.ts +18 -0
  13. package/es/src/ag-grid/utils.mjs +39 -18
  14. package/es/src/ap-field/cascader/use-options.d.ts +4 -4
  15. package/es/src/ap-field/date/index.vue.d.ts +0 -1
  16. package/es/src/ap-field/date-range/index.vue.d.ts +0 -1
  17. package/es/src/ap-field/select/use-select-options.d.ts +2 -2
  18. package/es/src/ap-field/text/password.vue.d.ts +4 -4
  19. package/es/src/ap-field/tree-select/use-request.d.ts +4 -4
  20. package/es/src/ap-form/ap-form.vue.d.ts +1 -2
  21. package/es/src/ap-form/ap-form.vue2.mjs +63 -61
  22. package/es/src/ap-form/context.mjs +1 -1
  23. package/es/src/ap-form/drawer-form/index.vue.d.ts +3 -4
  24. package/es/src/ap-form/interface.d.ts +4 -0
  25. package/es/src/ap-form/item/index.vue.d.ts +6 -6
  26. package/es/src/ap-form/item-group/helper.mjs +2 -2
  27. package/es/src/ap-form/items/date/index.vue.d.ts +9 -11
  28. package/es/src/ap-form/items/date-range/index.vue.d.ts +13 -15
  29. package/es/src/ap-form/items/number/index.vue.d.ts +2 -3
  30. package/es/src/ap-form/items/select/index.vue.d.ts +8 -8
  31. package/es/src/ap-form/modal-form/index.vue.d.ts +3 -4
  32. package/es/src/ap-form/provider/context.mjs +1 -1
  33. package/es/src/ap-form/search-form/index.vue.d.ts +3 -4
  34. package/es/src/ap-grid/editable/form-item.vue.d.ts +2 -4
  35. package/es/src/ap-grid/editable/index.vue.d.ts +2 -4
  36. package/es/src/ap-grid/index.vue.d.ts +2 -4
  37. package/es/src/ap-grid/utils/table.mjs +2 -2
  38. package/es/src/ap-list/index.vue.d.ts +2 -4
  39. package/es/src/ap-modal/utils/confirm.d.ts +1 -1
  40. package/es/src/ap-pro-card/components/card/index.vue2.mjs +2 -2
  41. package/es/src/ap-table/ap-table.vue.d.ts +2 -4
  42. package/es/src/ap-table/components/setting/context.d.ts +1 -1
  43. package/es/src/ap-table/components/setting/context.mjs +1 -1
  44. package/es/src/ap-table/components/setting/modal/index.vue.mjs +127 -117
  45. package/es/src/ap-table/components/setting/sorter/context.mjs +1 -1
  46. package/es/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -3
  47. package/es/src/ap-table/constants.d.ts +20 -22
  48. package/es/src/ap-table/context.mjs +1 -1
  49. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +9 -9
  50. package/es/src/ap-table/hooks/use-table-template-storage.d.ts +9 -9
  51. package/es/src/ap-table/hooks/use-table-template-storage.mjs +102 -95
  52. package/es/src/ap-table/utils.mjs +1 -1
  53. package/es/src/business/ag-grid-modal/hooks/use-ag-grid-instance.mjs +1 -1
  54. package/es/src/business/ap-batch-action-group/index.d.ts +3 -3
  55. package/es/src/business/ap-download/hooks/index.mjs +1 -1
  56. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
  57. package/es/src/business/ap-draggable-grid/ApDraggableGrid.vue2.mjs +1 -3
  58. package/es/src/business/ap-draggable-grid/index.d.ts +1 -1
  59. package/es/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
  60. package/es/src/business/ap-keep-alive/hook.mjs +1 -1
  61. package/es/src/business/ap-keep-alive/utils.mjs +1 -1
  62. package/es/src/business/ap-select-layout/index.d.ts +2 -4
  63. package/es/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
  64. package/es/src/business/ap-table-modal/index.d.ts +17 -5
  65. package/es/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  66. package/es/src/business/ap-upload/components/MultipleFile.vue2.mjs +128 -112
  67. package/es/src/business/ap-value-select-card/index.vue.d.ts +2 -4
  68. package/es/src/business/ap-view/ap-view.vue.d.ts +1 -1
  69. package/es/src/business/ap-view/ap-view.vue2.mjs +87 -81
  70. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +2 -3
  71. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
  72. package/es/src/business/ap-view/hooks/use-send-to-url.d.ts +2 -0
  73. package/es/src/business/ap-view/hooks/use-send-to-url.mjs +46 -30
  74. package/es/src/business/ap-view/hooks/use-view-provide.mjs +1 -1
  75. package/es/src/business/ap-view/index.d.ts +3 -3
  76. package/es/src/business/ap-view/interface.d.ts +7 -1
  77. package/es/src/check-card/context.mjs +1 -1
  78. package/es/src/config-provider/constants.mjs +1 -1
  79. package/es/src/config-provider/hooks/use-locale.mjs +1 -1
  80. package/es/src/config-provider/hooks/use-namespace.d.ts +5 -1
  81. package/es/src/config-provider/hooks/use-namespace.mjs +1 -1
  82. package/es/src/config-provider/hooks/use-token.mjs +1 -1
  83. package/es/src/editable-table/form-item.vue.d.ts +2 -4
  84. package/es/src/editable-table/index.vue.d.ts +2 -4
  85. package/es/src/editable-table/utils.mjs +1 -1
  86. package/es/src/scroll-view/index.vue.d.ts +5 -5
  87. package/es/src/tests/wrapper.d.ts +4 -4
  88. package/es/src/text/context.mjs +1 -1
  89. package/es/src/time-ago/useTimeAgo.mjs +1 -1
  90. package/es/src/type.d.ts +1 -0
  91. package/es/src/utils/slot.mjs +1 -1
  92. package/es/src/version.d.ts +1 -1
  93. package/es/src/version.mjs +1 -1
  94. package/lib/src/ag-grid/editable/form-item.vue.d.ts +2 -4
  95. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  96. package/lib/src/ag-grid/editable/index.vue.d.ts +2 -4
  97. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  98. package/lib/src/ag-grid/editable/interface.d.ts +15 -1
  99. package/lib/src/ag-grid/hooks/use-columns.js +1 -1
  100. package/lib/src/ag-grid/hooks/use-pinned-row.js +1 -1
  101. package/lib/src/ag-grid/index.vue.d.ts +2 -4
  102. package/lib/src/ag-grid/index.vue.js +1 -1
  103. package/lib/src/ag-grid/interface.d.ts +40 -1
  104. package/lib/src/ag-grid/utils.d.ts +18 -0
  105. package/lib/src/ag-grid/utils.js +1 -1
  106. package/lib/src/ap-field/cascader/use-options.d.ts +4 -4
  107. package/lib/src/ap-field/date/index.vue.d.ts +0 -1
  108. package/lib/src/ap-field/date-range/index.vue.d.ts +0 -1
  109. package/lib/src/ap-field/select/use-select-options.d.ts +2 -2
  110. package/lib/src/ap-field/text/password.vue.d.ts +4 -4
  111. package/lib/src/ap-field/tree-select/use-request.d.ts +4 -4
  112. package/lib/src/ap-form/ap-form.vue.d.ts +1 -2
  113. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  114. package/lib/src/ap-form/drawer-form/index.vue.d.ts +3 -4
  115. package/lib/src/ap-form/interface.d.ts +4 -0
  116. package/lib/src/ap-form/item/index.vue.d.ts +6 -6
  117. package/lib/src/ap-form/items/date/index.vue.d.ts +9 -11
  118. package/lib/src/ap-form/items/date-range/index.vue.d.ts +13 -15
  119. package/lib/src/ap-form/items/number/index.vue.d.ts +2 -3
  120. package/lib/src/ap-form/items/select/index.vue.d.ts +8 -8
  121. package/lib/src/ap-form/modal-form/index.vue.d.ts +3 -4
  122. package/lib/src/ap-form/search-form/index.vue.d.ts +3 -4
  123. package/lib/src/ap-grid/editable/form-item.vue.d.ts +2 -4
  124. package/lib/src/ap-grid/editable/index.vue.d.ts +2 -4
  125. package/lib/src/ap-grid/index.vue.d.ts +2 -4
  126. package/lib/src/ap-grid/utils/table.js +1 -1
  127. package/lib/src/ap-list/index.vue.d.ts +2 -4
  128. package/lib/src/ap-modal/utils/confirm.d.ts +1 -1
  129. package/lib/src/ap-table/ap-table.vue.d.ts +2 -4
  130. package/lib/src/ap-table/components/setting/context.d.ts +1 -1
  131. package/lib/src/ap-table/components/setting/modal/index.vue.js +1 -1
  132. package/lib/src/ap-table/components/setting/template/edit-form.vue.d.ts +2 -3
  133. package/lib/src/ap-table/constants.d.ts +20 -22
  134. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  135. package/lib/src/ap-table/hooks/use-table-template-storage.d.ts +9 -9
  136. package/lib/src/ap-table/hooks/use-table-template-storage.js +1 -1
  137. package/lib/src/business/ap-batch-action-group/index.d.ts +3 -3
  138. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue.d.ts +1 -1
  139. package/lib/src/business/ap-draggable-grid/ApDraggableGrid.vue2.js +1 -1
  140. package/lib/src/business/ap-draggable-grid/index.d.ts +1 -1
  141. package/lib/src/business/ap-expand-alert/ApExpandAlert.vue.d.ts +2 -4
  142. package/lib/src/business/ap-select-layout/index.d.ts +2 -4
  143. package/lib/src/business/ap-select-layout/select-layout.vue.d.ts +2 -4
  144. package/lib/src/business/ap-table-modal/index.d.ts +17 -5
  145. package/lib/src/business/ap-upload/components/MultipleFile.vue.d.ts +1 -1
  146. package/lib/src/business/ap-upload/components/MultipleFile.vue2.js +1 -1
  147. package/lib/src/business/ap-value-select-card/index.vue.d.ts +2 -4
  148. package/lib/src/business/ap-view/ap-view.vue.d.ts +1 -1
  149. package/lib/src/business/ap-view/ap-view.vue2.js +1 -1
  150. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +2 -3
  151. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +2 -3
  152. package/lib/src/business/ap-view/hooks/use-send-to-url.d.ts +2 -0
  153. package/lib/src/business/ap-view/hooks/use-send-to-url.js +1 -1
  154. package/lib/src/business/ap-view/index.d.ts +3 -3
  155. package/lib/src/business/ap-view/interface.d.ts +7 -1
  156. package/lib/src/config-provider/hooks/use-namespace.d.ts +5 -1
  157. package/lib/src/editable-table/form-item.vue.d.ts +2 -4
  158. package/lib/src/editable-table/index.vue.d.ts +2 -4
  159. package/lib/src/scroll-view/index.vue.d.ts +5 -5
  160. package/lib/src/tests/wrapper.d.ts +4 -4
  161. package/lib/src/time-ago/useTimeAgo.js +1 -1
  162. package/lib/src/type.d.ts +1 -0
  163. package/lib/src/version.d.ts +1 -1
  164. package/lib/src/version.js +1 -1
  165. package/package.json +1 -1
@@ -1,21 +1,22 @@
1
- import { defineComponent as z, computed as c, ref as d, createVNode as g, watch as R, createBlock as q, openBlock as H, unref as f, mergeProps as J, withCtx as Q, createElementVNode as X, normalizeClass as Z } from "vue";
2
- import { isValid as ee } from "@aplus-frontend/utils";
3
- import { useInjectApTable as te } from "../../ap-table/context.mjs";
1
+ import { defineComponent as R, computed as n, ref as d, createVNode as g, watch as q, createBlock as H, openBlock as J, unref as f, mergeProps as Q, withCtx as X, createElementVNode as Z, normalizeClass as ee } from "vue";
2
+ import { isValid as te } from "@aplus-frontend/utils";
3
+ import { useInjectForm as ae } from "../../ap-form/context.mjs";
4
+ import { useInjectApTable as ie } from "../../ap-table/context.mjs";
4
5
  import "../../config-provider/index.mjs";
5
- import { ApBatchActionGroup as ae } from "../ap-batch-action-group/index.mjs";
6
+ import { ApBatchActionGroup as oe } from "../ap-batch-action-group/index.mjs";
6
7
  import "./components/main-button-content.vue.mjs";
7
8
  import "./components/menu-list-content.vue.mjs";
8
- import { useSendToUrl as ie } from "./hooks/use-send-to-url.mjs";
9
- import { useViewProvide as oe } from "./hooks/use-view-provide.mjs";
10
- import se from "./icons/line-down.vue.mjs";
11
- import re from "./style/index.mjs";
9
+ import { useSendToUrl as re } from "./hooks/use-send-to-url.mjs";
10
+ import { useViewProvide as se } from "./hooks/use-view-provide.mjs";
11
+ import le from "./icons/line-down.vue.mjs";
12
+ import ne from "./style/index.mjs";
12
13
  import { SYSTEM_VIEW_KEY as v } from "./utils/enum.mjs";
13
- import { useGlobalConfig as le } from "../../config-provider/hooks/use-global-config.mjs";
14
- import { useNamespace as ne } from "../../config-provider/hooks/use-namespace.mjs";
15
- import { useLocale as me } from "../../config-provider/hooks/use-locale.mjs";
16
- import ue from "./components/main-button-content.vue2.mjs";
17
- import ce from "./components/menu-list-content.vue2.mjs";
18
- const Ie = /* @__PURE__ */ z({
14
+ import { useGlobalConfig as me } from "../../config-provider/hooks/use-global-config.mjs";
15
+ import { useNamespace as ue } from "../../config-provider/hooks/use-namespace.mjs";
16
+ import { useLocale as ce } from "../../config-provider/hooks/use-locale.mjs";
17
+ import fe from "./components/main-button-content.vue2.mjs";
18
+ import ve from "./components/menu-list-content.vue2.mjs";
19
+ const _e = /* @__PURE__ */ R({
19
20
  name: "ApView",
20
21
  __name: "ap-view",
21
22
  props: {
@@ -46,70 +47,75 @@ const Ie = /* @__PURE__ */ z({
46
47
  initToUrl: {
47
48
  type: Boolean,
48
49
  default: !0
49
- }
50
+ },
51
+ extraUrlParams: {}
50
52
  },
51
- setup(N, {
52
- expose: _
53
+ setup(x, {
54
+ expose: N
53
55
  }) {
54
- const a = N, O = le("viewCacheOption"), {
56
+ const a = x, _ = me("viewCacheOption"), {
55
57
  b: V
56
- } = ne("ap-view"), {
57
- t: x
58
- } = me(), F = re("ap-view"), S = c(() => ({
58
+ } = ue("ap-view"), {
59
+ t: O
60
+ } = ce(), F = ne("ap-view"), S = n(() => ({
59
61
  viewKey: v,
60
- viewName: x("ap.apView.systemView")
62
+ viewName: O("ap.apView.systemView")
61
63
  })), {
62
- getSearchFormValues: B,
63
- setSearchFormValues: L,
64
- submit: P,
64
+ getSearchFormValues: P,
65
+ setSearchFormValues: B,
66
+ submit: L,
65
67
  reset: E,
66
- submitWith: k,
67
- getSearchFormSorterItems: A,
68
- setSearchFormSorterItems: W,
69
- resetSearchFormSorterItems: j
70
- } = te(), G = d(!1), h = d(!1), w = d("");
71
- let n = !1, C = !1, K = !0;
68
+ submitWith: M,
69
+ getSearchFormSorterItems: j,
70
+ setSearchFormSorterItems: k,
71
+ resetSearchFormSorterItems: A
72
+ } = ie(), {
73
+ model: W
74
+ } = ae(), G = d(!1), h = d(!1), w = d("");
75
+ let m = !1, C = !1, K = !0;
72
76
  const $ = {
73
77
  dropdownType: "dropdown",
74
- content: g(ue, {
78
+ content: g(fe, {
75
79
  maxViewNum: a.maxViewNum
76
80
  }, null)
77
- }, o = d([S.value]), M = c(() => o.value.map((t) => ({
81
+ }, o = d([S.value]), Y = n(() => o.value.map((t) => ({
78
82
  id: t.viewKey,
79
- content: g(ce, {
83
+ content: g(ve, {
80
84
  view: t
81
85
  }, null)
82
- }))), s = {
83
- getSearchFormValues: B,
84
- setSearchFormValues: L,
85
- submit: P,
86
+ }))), r = {
87
+ getSearchFormValues: P,
88
+ setSearchFormValues: B,
89
+ submit: L,
86
90
  reset: E,
87
- submitWith: k,
88
- getSearchFormSorterItems: A,
89
- setSearchFormSorterItems: W,
90
- resetSearchFormSorterItems: j,
91
+ submitWith: M,
92
+ getSearchFormSorterItems: j,
93
+ setSearchFormSorterItems: k,
94
+ resetSearchFormSorterItems: A,
91
95
  ...a.saveDataSource
92
96
  }, y = {
93
- ...O.value,
97
+ ..._.value,
94
98
  ...a.viewCacheOption
95
99
  }, {
96
100
  mountedData: b,
97
- isValidMountedData: T
98
- } = ie({
99
- saveDataSource: s,
100
- sendToUrl: c(() => a.sendToUrl),
101
- tableKey: c(() => a.tableKey)
102
- }), U = () => a.isDefaultSystemView ? v : (a.isFirstDefaultSystemView || C) && n ? v : o.value.find((i) => i.isDefault)?.viewKey ?? v, m = (t) => {
101
+ isValidMountedData: U
102
+ } = re({
103
+ saveDataSource: r,
104
+ sendToUrl: n(() => a.sendToUrl),
105
+ tableKey: n(() => a.tableKey),
106
+ searchFormModel: n(() => a?.saveDataSource?.searchFormModel || W?.value),
107
+ extraUrlParams: n(() => a.extraUrlParams)
108
+ }), T = () => a.isDefaultSystemView ? v : (a.isFirstDefaultSystemView || C) && m ? v : o.value.find((i) => i.isDefault)?.viewKey ?? v, u = (t) => {
103
109
  w.value = t;
104
110
  const i = o.value.find((e) => e.viewKey === w.value);
105
111
  i && setTimeout(() => {
106
- i.viewKey === v ? n ? a.manual || (a.sendToUrl && K && a.initToUrl && T.value && s?.setSearchFormValues?.(b.value), s?.submitWith?.()) : a.manual || (s?.resetSearchFormSorterItems?.(), s?.reset?.()) : (a.sendToUrl && K && a.initToUrl && T.value && n ? s?.setSearchFormValues?.(b.value) : s?.setSearchFormValues?.({
107
- ...Object.fromEntries(Object.keys(s?.getSearchFormValues?.() ?? {}).map((e) => [e, void 0])) ?? {},
112
+ i.viewKey === v ? m ? a.manual || (a.sendToUrl && K && a.initToUrl && U.value && r?.setSearchFormValues?.(b.value), r?.submitWith?.()) : a.manual || (r?.resetSearchFormSorterItems?.(), r?.reset?.()) : (a.sendToUrl && K && a.initToUrl && U.value && m ? r?.setSearchFormValues?.(b.value) : r?.setSearchFormValues?.({
113
+ ...Object.fromEntries(Object.keys(r?.getSearchFormValues?.() ?? {}).map((e) => [e, void 0])) ?? {},
108
114
  ...a?.emptyData ?? {},
109
- ...[...s?.getSearchFormSorterItems?.() ?? [], ...a?.extraParams?.map((e) => ({
115
+ ...[...r?.getSearchFormSorterItems?.() ?? [], ...a?.extraParams?.map((e) => ({
110
116
  name: e
111
- })) ?? []].reduce((e, r) => (i.viewConfig?.searchForm?.[r.name] && (e[r.name] = i.viewConfig?.searchForm?.[r.name]), e), {}) ?? {}
112
- }), s?.setSearchFormSorterItems?.(i.viewConfig?.sorterItems ?? []), n ? a.manual || s?.submitWith?.() : s?.submit?.()), n = !1;
117
+ })) ?? []].reduce((e, s) => (i.viewConfig?.searchForm?.[s.name] && (e[s.name] = i.viewConfig?.searchForm?.[s.name]), e), {}) ?? {}
118
+ }), r?.setSearchFormSorterItems?.(i.viewConfig?.sorterItems ?? []), m ? a.manual || r?.submitWith?.() : r?.submit?.()), m = !1;
113
119
  });
114
120
  }, I = {
115
121
  getViewList: async (t) => {
@@ -119,55 +125,55 @@ const Ie = /* @__PURE__ */ z({
119
125
  } = t, e = await y?.getViewList?.({
120
126
  tableKey: i
121
127
  });
122
- return o.value = [S.value, ...e ?? []], m(U()), o.value;
128
+ return o.value = [S.value, ...e ?? []], u(T()), o.value;
123
129
  } catch {
124
- return o.value = [S.value], m(v), o.value;
130
+ return o.value = [S.value], u(v), o.value;
125
131
  }
126
132
  },
127
133
  addView: async (t) => {
128
134
  const {
129
135
  tableKey: i,
130
136
  viewKey: e,
131
- viewName: r,
137
+ viewName: s,
132
138
  isDefault: l,
133
139
  viewConfig: p
134
140
  } = t;
135
141
  await y?.addView?.({
136
142
  tableKey: i,
137
143
  viewKey: e,
138
- viewName: r,
144
+ viewName: s,
139
145
  isDefault: l,
140
146
  viewConfig: p
141
- }), l && (o.value = o.value.map((u) => ({
142
- ...u,
147
+ }), l && (o.value = o.value.map((c) => ({
148
+ ...c,
143
149
  isDefault: !1
144
150
  }))), o.value = [...o.value, {
145
151
  viewKey: e,
146
- viewName: r,
152
+ viewName: s,
147
153
  isDefault: l,
148
154
  viewConfig: p
149
- }], m(e);
155
+ }], u(e);
150
156
  },
151
157
  changeView: async (t) => {
152
158
  const {
153
159
  tableKey: i,
154
160
  viewKey: e,
155
- viewName: r,
161
+ viewName: s,
156
162
  isDefault: l,
157
163
  viewConfig: p
158
164
  } = t;
159
165
  await y?.changeView?.({
160
166
  tableKey: i,
161
167
  viewKey: e,
162
- viewName: r,
168
+ viewName: s,
163
169
  isDefault: l,
164
170
  viewConfig: p
165
171
  }), l && (o.value = o.value.map((D) => ({
166
172
  ...D,
167
173
  isDefault: !1
168
174
  })));
169
- const u = o.value.find((D) => D.viewKey === e);
170
- u && (u.viewName = r, u.isDefault = l, u.viewConfig = p), m(e);
175
+ const c = o.value.find((D) => D.viewKey === e);
176
+ c && (c.viewName = s, c.isDefault = l, c.viewConfig = p), u(e);
171
177
  },
172
178
  removeView: async (t) => {
173
179
  const {
@@ -177,51 +183,51 @@ const Ie = /* @__PURE__ */ z({
177
183
  await y?.removeView?.({
178
184
  tableKey: i,
179
185
  viewKey: e
180
- }), o.value = o.value.filter((r) => r.viewKey !== e), e === w.value && m(U());
186
+ }), o.value = o.value.filter((s) => s.viewKey !== e), e === w.value && u(T());
181
187
  }
182
- }, Y = {
183
- tableKey: c(() => a.tableKey),
188
+ }, z = {
189
+ tableKey: n(() => a.tableKey),
184
190
  currentViewKey: w,
185
- changeCurrentViewKey: m,
191
+ changeCurrentViewKey: u,
186
192
  popoverOpen: G,
187
193
  menuOpen: h,
188
194
  viewList: o,
189
195
  viewListCRUD: I,
190
- saveDataSource: s
196
+ saveDataSource: r
191
197
  };
192
- return oe(Y), R(() => a.tableKey, (t) => {
193
- ee(t) && (n = !0, I?.getViewList?.({
198
+ return se(z), q(() => a.tableKey, (t) => {
199
+ te(t) && (m = !0, I?.getViewList?.({
194
200
  tableKey: t
195
201
  }));
196
202
  }, {
197
203
  immediate: !0
198
- }), _({
204
+ }), N({
199
205
  setFirstDefaultSystemView: (t) => {
200
206
  C = t;
201
207
  },
202
208
  setInitToUrl: (t) => {
203
209
  K = t;
204
210
  },
205
- mountedData: c(() => b.value)
206
- }), (t, i) => (H(), q(f(ae), J({
211
+ getMountedData: () => b.value
212
+ }), (t, i) => (J(), H(f(oe), Q({
207
213
  ...t.$attrs
208
214
  }, {
209
215
  open: h.value,
210
216
  "onUpdate:open": i[0] || (i[0] = (e) => h.value = e),
211
217
  class: [f(V)(), f(F)],
212
218
  "button-props": $,
213
- "menu-list": M.value,
219
+ "menu-list": Y.value,
214
220
  "overlay-class-name": [f(V)("overlay"), f(F)],
215
221
  trigger: "click",
216
222
  placement: "bottom"
217
223
  }), {
218
- icon: Q(() => [X("div", {
219
- class: Z([f(V)("icon")])
220
- }, [g(se)], 2)]),
224
+ icon: X(() => [Z("div", {
225
+ class: ee([f(V)("icon")])
226
+ }, [g(le)], 2)]),
221
227
  _: 1
222
228
  }, 16, ["open", "class", "menu-list", "overlay-class-name"]));
223
229
  }
224
230
  });
225
231
  export {
226
- Ie as default
232
+ _e as default
227
233
  };
@@ -1,13 +1,12 @@
1
1
  import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '../../../ap-form';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
3
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
4
- import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
4
+ import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
5
5
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
6
6
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
7
7
  import { Options } from '../../../../node_modules/scroll-into-view-if-needed';
8
8
  import { Recordable } from '../../../type';
9
9
  import { VueTypeDef, VueTypeValidableDef } from '../../../../node_modules/vue-types';
10
- import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
11
10
  import { SizeType } from '@aplus-frontend/antdv/es/button';
12
11
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
13
12
  import { OnCleanup } from '@vue/reactivity';
@@ -110,7 +109,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
110
109
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
111
110
  readonly initialValues?: Recordable | undefined;
112
111
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
113
- readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
112
+ readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
114
113
  readonly syncToUrlPriority?: boolean | undefined;
115
114
  readonly autoFocusFirstInput?: boolean | undefined;
116
115
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
@@ -1,13 +1,12 @@
1
1
  import { ViewListModel } from '../interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, ComponentInternalInstance, ExtractPropTypes, PropType, HTMLAttributes, VNodeProps, AllowedComponentProps, ComponentCustomProps, CreateComponentPublicInstanceWithMixins, GlobalComponents, GlobalDirectives, Slot, ComponentPublicInstance, ComponentOptionsBase, DebuggerEvent, nextTick, WatchOptions, WatchStopHandle, ShallowUnwrapRef, ComponentCustomProperties } from 'vue';
3
3
  import { ColSize } from '@aplus-frontend/antdv/es/grid';
4
- import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, RuleObject, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
4
+ import { FormLabelAlign, ValidateMessages, FieldData, ValidateErrorEntity, NamePath, ValidateOptions, InternalNamePath } from '@aplus-frontend/antdv/es/form/interface';
5
5
  import { RequiredMark } from '@aplus-frontend/antdv/es/form/Form';
6
6
  import { RuleObject } from '@aplus-frontend/antdv/es/form';
7
7
  import { Options } from '../../../../node_modules/scroll-into-view-if-needed';
8
8
  import { Recordable } from '../../../type';
9
9
  import { VueTypeDef, VueTypeValidableDef } from '../../../../node_modules/vue-types';
10
- import { SizeType } from '@aplus-frontend/antdv/es/config-provider';
11
10
  import { SizeType } from '@aplus-frontend/antdv/es/button';
12
11
  import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
13
12
  import { ApFormProps, UpdateModelOptimizeFn, ApFormInternalInstance, WatchFunc } from '../../../ap-form';
@@ -111,7 +110,7 @@ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOp
111
110
  readonly onValidate?: ((name: string | number | string[] | number[], status: boolean, errors: string[]) => void) | undefined;
112
111
  readonly initialValues?: Recordable | undefined;
113
112
  readonly onValuesChange?: ((changedValues: Recordable, allValues: Recordable, fieldName: NamePath) => void) | undefined;
114
- readonly syncToUrl?: (boolean | ((values: Recordable, type: "get" | "set") => Recordable)) | undefined;
113
+ readonly syncToUrl?: boolean | ((values: Recordable, type: "get" | "set") => Recordable) | undefined;
115
114
  readonly syncToUrlPriority?: boolean | undefined;
116
115
  readonly autoFocusFirstInput?: boolean | undefined;
117
116
  } & VNodeProps & AllowedComponentProps & ComponentCustomProps;
@@ -5,6 +5,8 @@ export declare const useSendToUrl: (option: {
5
5
  saveDataSource: SaveDataSource;
6
6
  sendToUrl: ComputedRef<boolean>;
7
7
  tableKey: ComputedRef<string>;
8
+ extraUrlParams: ComputedRef<(() => Recordable) | undefined>;
9
+ searchFormModel: ComputedRef<any>;
8
10
  }) => {
9
11
  mountedData: ComputedRef<Recordable>;
10
12
  isValidMountedData: ComputedRef<boolean>;
@@ -1,37 +1,53 @@
1
- import { isObjectWithContent as d } from "@aplus-frontend/utils";
2
- import { ref as i, onMounted as m, onUnmounted as f, computed as l } from "vue";
3
- import { getUrlQuery as v, setUrlQuery as p } from "../utils/query.mjs";
4
- const S = (u) => {
5
- const { saveDataSource: s, sendToUrl: c, tableKey: n } = u;
6
- let o, t, r = !1;
7
- const a = i({});
8
- return m(() => {
9
- if (c?.value) {
10
- try {
11
- const e = v()[n.value] ?? "";
12
- a.value = e ? JSON.parse(decodeURIComponent(e)) : {};
13
- } catch {
14
- a.value = {};
15
- }
16
- o = setInterval(() => {
17
- try {
18
- const e = encodeURIComponent(
19
- JSON.stringify(s?.getSearchFormValues?.() ?? {})
20
- );
21
- e !== t && (t = e, r = !0);
22
- } catch {
23
- t = "";
24
- }
25
- r && (p({ [n.value]: t }), r = !1);
26
- }, 500);
1
+ import { isObjectWithContent as h } from "@aplus-frontend/utils";
2
+ import { debounce as f } from "lodash-unified";
3
+ import { ref as p, watch as v, onMounted as g, computed as l } from "vue";
4
+ import { setUrlQuery as C, getUrlQuery as U } from "../utils/query.mjs";
5
+ const I = (d) => {
6
+ const {
7
+ saveDataSource: u,
8
+ sendToUrl: n,
9
+ tableKey: r,
10
+ extraUrlParams: c,
11
+ searchFormModel: s
12
+ } = d;
13
+ let t, o = !1;
14
+ const a = p({}), m = f(() => {
15
+ try {
16
+ const e = encodeURIComponent(
17
+ JSON.stringify({
18
+ ...u?.getSearchFormValues?.(),
19
+ ...c?.value?.() ?? {}
20
+ })
21
+ );
22
+ e !== t && (t = e, o = !0);
23
+ } catch {
24
+ t = "";
27
25
  }
28
- }), f(() => {
29
- o && clearInterval(o);
26
+ o && (C({ [r.value]: t }), o = !1);
27
+ }, 500), i = () => {
28
+ try {
29
+ const e = U()[r.value] ?? "";
30
+ a.value = e ? JSON.parse(decodeURIComponent(e)) : {};
31
+ } catch {
32
+ a.value = {};
33
+ }
34
+ };
35
+ return v(
36
+ s,
37
+ () => {
38
+ n?.value && m();
39
+ },
40
+ {
41
+ deep: !0,
42
+ immediate: !0
43
+ }
44
+ ), g(() => {
45
+ n?.value && i();
30
46
  }), {
31
47
  mountedData: l(() => a.value),
32
- isValidMountedData: l(() => d(a.value))
48
+ isValidMountedData: l(() => h(a.value))
33
49
  };
34
50
  };
35
51
  export {
36
- S as useSendToUrl
52
+ I as useSendToUrl
37
53
  };
@@ -1,5 +1,5 @@
1
1
  import { provide as t, inject as r } from "vue";
2
- const o = Symbol("provideKey"), n = (e) => {
2
+ const o = /* @__PURE__ */ Symbol("provideKey"), n = (e) => {
3
3
  t(o, e);
4
4
  }, c = () => r(o);
5
5
  export {
@@ -6,7 +6,7 @@ declare const ApView: {
6
6
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApViewProps> & Readonly<{}>, {
7
7
  setFirstDefaultSystemView: (value: boolean) => void;
8
8
  setInitToUrl: (value: boolean) => void;
9
- mountedData: Recordable;
9
+ getMountedData: () => Recordable;
10
10
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
11
11
  manual: boolean;
12
12
  maxViewNum: number;
@@ -24,7 +24,7 @@ declare const ApView: {
24
24
  }, Readonly< ApViewProps> & Readonly<{}>, {
25
25
  setFirstDefaultSystemView: (value: boolean) => void;
26
26
  setInitToUrl: (value: boolean) => void;
27
- mountedData: Recordable;
27
+ getMountedData: () => Recordable;
28
28
  }, {}, {}, {}, {
29
29
  manual: boolean;
30
30
  maxViewNum: number;
@@ -39,7 +39,7 @@ declare const ApView: {
39
39
  } & ComponentOptionsBase<Readonly< ApViewProps> & Readonly<{}>, {
40
40
  setFirstDefaultSystemView: (value: boolean) => void;
41
41
  setInitToUrl: (value: boolean) => void;
42
- mountedData: Recordable;
42
+ getMountedData: () => Recordable;
43
43
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
44
44
  manual: boolean;
45
45
  maxViewNum: number;
@@ -19,6 +19,10 @@ export interface SaveDataSource {
19
19
  resetSearchFormSorterItems?: () => void;
20
20
  /** 是否转换搜索表单,默认为 false */
21
21
  searchFormTransform?: boolean;
22
+ /**
23
+ * searchForm的model,用于当searchFormModel变更时触发url参数更新
24
+ */
25
+ searchFormModel?: any;
22
26
  }
23
27
  export interface ViewCacheOption {
24
28
  /** 获取视图列表 */
@@ -98,9 +102,11 @@ export interface ApViewProps {
98
102
  * 是否在第一次进入页面时将参数保存在url回显在 searchForm,默认为 true,设置为 false 后,第一次进入页面时 searchForm 将不会将参数保存在url上
99
103
  */
100
104
  initToUrl?: boolean;
105
+ /** 额外的保存在url的参数 */
106
+ extraUrlParams?: () => Recordable;
101
107
  }
102
108
  export interface ApViewExpose {
103
109
  setFirstDefaultSystemView: (value: boolean) => void;
104
110
  setInitToUrl: (value: boolean) => void;
105
- mountedData: Recordable;
111
+ getMountedData: () => Recordable;
106
112
  }
@@ -1,5 +1,5 @@
1
1
  import { provide as c, inject as o, computed as n } from "vue";
2
- const e = Symbol("checkCardContextKey");
2
+ const e = /* @__PURE__ */ Symbol("checkCardContextKey");
3
3
  function C(t) {
4
4
  c(e, t);
5
5
  }
@@ -1,4 +1,4 @@
1
- const o = Symbol(), t = "aplus", n = "aplus";
1
+ const o = /* @__PURE__ */ Symbol(), t = "aplus", n = "aplus";
2
2
  export {
3
3
  t as DEFAULT_NAMESPACE,
4
4
  n as DEFAULT_UIMODE,
@@ -12,7 +12,7 @@ const u = (t) => (e, o) => f(e, o, r(t)), f = (t, e, o) => l(o, t, t).replace(
12
12
  locale: o,
13
13
  t: u(t)
14
14
  };
15
- }, x = Symbol("localeContextKey"), K = (t) => {
15
+ }, x = /* @__PURE__ */ Symbol("localeContextKey"), K = (t) => {
16
16
  const e = t || m(x, s());
17
17
  return p(c(() => e?.value || i));
18
18
  };
@@ -2,7 +2,11 @@ import { InjectionKey, Ref, ComputedRef } from 'vue';
2
2
  export declare const defaultNamespace = "aplus";
3
3
  export declare const namespaceContextKey: InjectionKey<Ref<string | undefined>>;
4
4
  export declare const useGetDerivedNamespace: (namespaceOverrides?: Ref<string | undefined>) => ComputedRef<string>;
5
- export declare const useNamespace: (block: string, namespaceOverrides?: Ref<string | undefined>) => {
5
+ export declare const useNamespace: (
6
+ /**
7
+ * 块 一般是指组件名
8
+ */
9
+ block: string, namespaceOverrides?: Ref<string | undefined>) => {
6
10
  namespace: ComputedRef<string>;
7
11
  b: (blockSuffix?: string) => string;
8
12
  e: (element?: string) => string;
@@ -2,7 +2,7 @@ import { getCurrentInstance as N, inject as V, ref as v, computed as y, unref as
2
2
  const p = "aplus", B = "is-", c = (a, r, t, $, o) => {
3
3
  let u = `${a}-${r}`;
4
4
  return t && (u += `-${t}`), $ && (u += `__${$}`), o && (u += `--${o}`), u;
5
- }, C = Symbol("namespaceContextKey"), _ = (a) => {
5
+ }, C = /* @__PURE__ */ Symbol("namespaceContextKey"), _ = (a) => {
6
6
  const r = a || (N() ? V(C, v(p)) : v(p));
7
7
  return y(() => l(r) || p);
8
8
  }, w = (a, r) => {
@@ -1,5 +1,5 @@
1
1
  import { inject as o, ref as e } from "vue";
2
- const n = Symbol("designTokenContextKey"), r = () => o(n, {
2
+ const n = /* @__PURE__ */ Symbol("designTokenContextKey"), r = () => o(n, {
3
3
  token: e({}),
4
4
  rootCls: e()
5
5
  });
@@ -1,5 +1,5 @@
1
1
  import { EditableColumnType, EditableTableFormItemExpose, EditableTableFormItemProps } from './interface';
2
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
2
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
3
3
  declare const _default: <RecordType = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
4
4
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>, never> & EditableTableFormItemProps<RecordType> & Partial<{}>> & PublicProps;
5
5
  expose(exposed: ShallowUnwrapRef<EditableTableFormItemExpose>): void;
@@ -36,9 +36,7 @@ declare const _default: <RecordType = any>(__VLS_props: NonNullable<Awaited<type
36
36
  }) => void;
37
37
  };
38
38
  emit: {};
39
- }>) => VNode<RendererNode, RendererElement, {
40
- [key: string]: any;
41
- }> & {
39
+ }>) => VNode & {
42
40
  __ctx?: Awaited<typeof __VLS_setup>;
43
41
  };
44
42
  export default _default;
@@ -1,6 +1,6 @@
1
1
  import { Recordable } from '../type';
2
2
  import { EditableTableProps, EditableColumnType, EditableTableExpose } from './interface';
3
- import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode, RendererNode, RendererElement } from 'vue';
3
+ import { VNodeProps, AllowedComponentProps, ComponentCustomProps, PublicProps, ShallowUnwrapRef, VNode } from 'vue';
4
4
  declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
5
  props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
6
6
  readonly "onUpdate:value"?: ((...args: any[]) => any) | undefined;
@@ -39,9 +39,7 @@ declare const _default: <RecordType extends Recordable = any>(__VLS_props: NonNu
39
39
  }) => void;
40
40
  };
41
41
  emit: (event: "update:value", ...args: any[]) => void;
42
- }>) => VNode<RendererNode, RendererElement, {
43
- [key: string]: any;
44
- }> & {
42
+ }>) => VNode & {
45
43
  __ctx?: Awaited<typeof __VLS_setup>;
46
44
  };
47
45
  export default _default;
@@ -83,7 +83,7 @@ function re(e, t, r, i, f) {
83
83
  const n = i?.({
84
84
  title: e.title,
85
85
  column: e
86
- }), s = n?.filter((T) => T.type !== Symbol.for("v-cmt")) || [];
86
+ }), s = n?.filter((T) => T.type !== /* @__PURE__ */ Symbol.for("v-cmt")) || [];
87
87
  if (n && s.length > 0)
88
88
  return n;
89
89
  const d = k(e), m = w(e.title) ? {
@@ -1,4 +1,4 @@
1
- import { ScrollBarDirection, InternalScrollBarProps, ColorType } from '../scroll-bar';
1
+ import { ScrollBarDirection, InternalScrollBarProps } from '../scroll-bar';
2
2
  import { ScrollOptions, ScrollViewProps } from './interface';
3
3
  import { CreateComponentPublicInstanceWithMixins, Ref, ShallowRef, ComponentOptionsMixin, PublicProps, GlobalComponents, GlobalDirectives, ComponentProvideOptions, DefineComponent, ComputedRef } from 'vue';
4
4
  declare function scroll(x?: number, y?: number): void;
@@ -106,8 +106,8 @@ declare const __VLS_component: DefineComponent<ScrollViewProps, {
106
106
  onScroll?: ((percent: number) => void) | undefined;
107
107
  disabled?: boolean | undefined;
108
108
  trackSpeed?: number | undefined;
109
- barColor?: ColorType;
110
- trackColor?: ColorType;
109
+ barColor?: import("csstype").Property.BackgroundColor | undefined;
110
+ trackColor?: import("csstype").Property.BackgroundColor | undefined;
111
111
  trackWidth?: number | undefined;
112
112
  showTrack?: boolean | undefined;
113
113
  onScrollStart?: ((percent: number) => void) | undefined;
@@ -118,8 +118,8 @@ declare const __VLS_component: DefineComponent<ScrollViewProps, {
118
118
  onScroll?: ((percent: number) => void) | undefined;
119
119
  disabled?: boolean | undefined;
120
120
  trackSpeed?: number | undefined;
121
- barColor?: ColorType;
122
- trackColor?: ColorType;
121
+ barColor?: import("csstype").Property.BackgroundColor | undefined;
122
+ trackColor?: import("csstype").Property.BackgroundColor | undefined;
123
123
  trackWidth?: number | undefined;
124
124
  showTrack?: boolean | undefined;
125
125
  onScrollStart?: ((percent: number) => void) | undefined;