@aplus-frontend/ui 0.6.0-beta.16 → 0.6.0-beta.18

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 (234) hide show
  1. package/es/index.mjs +118 -109
  2. package/es/src/ap-field/date-range/index.vue.mjs +8 -7
  3. package/es/src/ap-field/number/index.vue.d.ts +2 -4
  4. package/es/src/ap-field/radio/index.vue.d.ts +2 -4
  5. package/es/src/ap-field/rate/index.vue.d.ts +2 -4
  6. package/es/src/ap-field/select/index.vue.d.ts +3 -6
  7. package/es/src/ap-field/slider/index.vue.d.ts +2 -4
  8. package/es/src/ap-field/text/index.vue2.mjs +42 -44
  9. package/es/src/ap-field/text/password.vue.mjs +15 -17
  10. package/es/src/ap-field/text-area/index.vue.d.ts +2 -2
  11. package/es/src/ap-field/tree-select/index.vue.mjs +31 -30
  12. package/es/src/ap-form/ap-form.vue2.mjs +18 -17
  13. package/es/src/ap-form/dependency/index.vue.mjs +24 -23
  14. package/es/src/ap-form/drawer-form/index.vue.d.ts +9 -7
  15. package/es/src/ap-form/drawer-form/index.vue.mjs +58 -49
  16. package/es/src/ap-form/interface.d.ts +2 -2
  17. package/es/src/ap-form/item/index.vue.d.ts +5 -10
  18. package/es/src/ap-form/items/select/index.vue.mjs +12 -14
  19. package/es/src/ap-form/items/text/password.vue.mjs +9 -9
  20. package/es/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  21. package/es/src/ap-form/items/tree-select/index.vue.mjs +12 -14
  22. package/es/src/ap-form/modal-form/index.vue.d.ts +9 -7
  23. package/es/src/ap-form/modal-form/index.vue.mjs +64 -55
  24. package/es/src/ap-form/provider/index.vue.mjs +6 -5
  25. package/es/src/ap-form/search-form/index.vue.d.ts +4 -8
  26. package/es/src/ap-form/search-form/index.vue.mjs +50 -50
  27. package/es/src/ap-form/set/index.vue.mjs +7 -6
  28. package/es/src/ap-grid/editable/form-item.vue.mjs +1 -1
  29. package/es/src/ap-grid/hooks/use-editable-columns.mjs +17 -17
  30. package/es/src/ap-grid/index.vue.mjs +79 -75
  31. package/es/src/ap-grid/interface.d.ts +13 -0
  32. package/es/src/ap-list/index.vue.d.ts +2 -9
  33. package/es/src/ap-list/index.vue.mjs +116 -106
  34. package/es/src/ap-list/interface.d.ts +20 -0
  35. package/es/src/ap-table/ap-table.vue.d.ts +10 -2
  36. package/es/src/ap-table/ap-table.vue2.mjs +87 -83
  37. package/es/src/ap-table/components/setting/modal/index.vue2.mjs +12 -11
  38. package/es/src/ap-table/constants.d.ts +4 -4
  39. package/es/src/ap-table/hooks/use-table-paging-ng.d.ts +9 -2
  40. package/es/src/ap-table/hooks/use-table-paging-ng.mjs +113 -105
  41. package/es/src/ap-table/interface.d.ts +14 -1
  42. package/es/src/ap-table/utils.d.ts +3 -3
  43. package/es/src/business/ap-card/ApCard.vue2.mjs +1 -1
  44. package/es/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
  45. package/es/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
  46. package/es/src/business/ap-keep-alive/cacher/lru-cacher.mjs +43 -0
  47. package/es/src/business/ap-keep-alive/hook.d.ts +10 -0
  48. package/es/src/business/ap-keep-alive/hook.mjs +31 -0
  49. package/es/src/business/ap-keep-alive/index.d.ts +101 -0
  50. package/es/src/business/ap-keep-alive/index.mjs +13 -0
  51. package/es/src/business/ap-keep-alive/interface.d.ts +35 -0
  52. package/es/src/business/ap-keep-alive/interface.mjs +54 -0
  53. package/es/src/business/ap-keep-alive/keep-alive.d.ts +51 -0
  54. package/es/src/business/ap-keep-alive/keep-alive.mjs +154 -0
  55. package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
  56. package/es/src/business/ap-keep-alive/keeper/ap-form-keeper.mjs +21 -0
  57. package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
  58. package/es/src/business/ap-keep-alive/keeper/ap-grid-keeper.mjs +27 -0
  59. package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
  60. package/es/src/business/ap-keep-alive/keeper/ap-list-keeper.mjs +18 -0
  61. package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
  62. package/es/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.mjs +17 -0
  63. package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
  64. package/es/src/business/ap-keep-alive/keeper/ap-search-form-keeper.mjs +18 -0
  65. package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
  66. package/es/src/business/ap-keep-alive/keeper/ap-table-keeper.mjs +18 -0
  67. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
  68. package/es/src/business/ap-keep-alive/keeper/ap-view-keeper.mjs +12 -0
  69. package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
  70. package/es/src/business/ap-keep-alive/keeper/edit-grid-keeper.mjs +18 -0
  71. package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
  72. package/es/src/business/ap-keep-alive/keeper/edit-table-keeper.mjs +18 -0
  73. package/es/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
  74. package/es/src/business/ap-keep-alive/keeper/index.mjs +27 -0
  75. package/es/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
  76. package/es/src/business/ap-keep-alive/keeper/step-keeper.mjs +17 -0
  77. package/es/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
  78. package/es/src/business/ap-keep-alive/keeper/tab-keeper.mjs +17 -0
  79. package/es/src/business/ap-keep-alive/utils.d.ts +22 -0
  80. package/es/src/business/ap-keep-alive/utils.mjs +41 -0
  81. package/es/src/business/ap-radio-group/ap-radio-group.vue2.mjs +23 -23
  82. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
  83. package/es/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
  84. package/es/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
  85. package/es/src/business/ap-table-modal/index.d.ts +32 -5
  86. package/es/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
  87. package/es/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  88. package/es/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  89. package/es/src/business/batch-input-group/form-item.vue.mjs +14 -13
  90. package/es/src/business/batch-input-group/index.vue.mjs +10 -9
  91. package/es/src/business/hooks/usePageListApTable.d.ts +4 -1
  92. package/es/src/business/index.d.ts +1 -0
  93. package/es/src/business/index.mjs +18 -16
  94. package/es/src/editable-table/form-item.vue.mjs +23 -23
  95. package/es/src/full-screen/interface.d.ts +5 -6
  96. package/es/src/index.mjs +199 -190
  97. package/es/src/mask/index.vue.mjs +21 -20
  98. package/es/src/resize-observer/interface.d.ts +2 -3
  99. package/es/src/scroll-bar/interface.d.ts +7 -7
  100. package/es/src/scroll-view/interface.d.ts +2 -3
  101. package/es/src/splitter/SplitBar.vue2.mjs +1 -0
  102. package/es/src/splitter/Splitter.vue2.mjs +1 -0
  103. package/es/src/text/group.vue.mjs +7 -6
  104. package/es/src/text/index.vue.mjs +20 -19
  105. package/es/src/version.d.ts +1 -1
  106. package/es/src/version.mjs +1 -1
  107. package/es/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  108. package/lib/index.js +1 -1
  109. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  110. package/lib/src/ap-field/number/index.vue.d.ts +2 -4
  111. package/lib/src/ap-field/radio/index.vue.d.ts +2 -4
  112. package/lib/src/ap-field/rate/index.vue.d.ts +2 -4
  113. package/lib/src/ap-field/select/index.vue.d.ts +3 -6
  114. package/lib/src/ap-field/slider/index.vue.d.ts +2 -4
  115. package/lib/src/ap-field/text/index.vue2.js +1 -1
  116. package/lib/src/ap-field/text/password.vue.js +1 -1
  117. package/lib/src/ap-field/text-area/index.vue.d.ts +2 -2
  118. package/lib/src/ap-field/tree-select/index.vue.js +1 -1
  119. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  120. package/lib/src/ap-form/dependency/index.vue.js +1 -1
  121. package/lib/src/ap-form/drawer-form/index.vue.d.ts +9 -7
  122. package/lib/src/ap-form/drawer-form/index.vue.js +1 -1
  123. package/lib/src/ap-form/interface.d.ts +2 -2
  124. package/lib/src/ap-form/item/index.vue.d.ts +5 -10
  125. package/lib/src/ap-form/items/select/index.vue.js +1 -1
  126. package/lib/src/ap-form/items/text/password.vue.js +1 -1
  127. package/lib/src/ap-form/items/text-area/index.vue.d.ts +5 -5
  128. package/lib/src/ap-form/items/tree-select/index.vue.js +1 -1
  129. package/lib/src/ap-form/modal-form/index.vue.d.ts +9 -7
  130. package/lib/src/ap-form/modal-form/index.vue.js +1 -1
  131. package/lib/src/ap-form/provider/index.vue.js +1 -1
  132. package/lib/src/ap-form/search-form/index.vue.d.ts +4 -8
  133. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  134. package/lib/src/ap-form/set/index.vue.js +1 -1
  135. package/lib/src/ap-grid/editable/form-item.vue.js +1 -1
  136. package/lib/src/ap-grid/hooks/use-editable-columns.js +1 -1
  137. package/lib/src/ap-grid/index.vue.js +1 -1
  138. package/lib/src/ap-grid/interface.d.ts +13 -0
  139. package/lib/src/ap-list/index.vue.d.ts +2 -9
  140. package/lib/src/ap-list/index.vue.js +1 -1
  141. package/lib/src/ap-list/interface.d.ts +20 -0
  142. package/lib/src/ap-table/ap-table.vue.d.ts +10 -2
  143. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  144. package/lib/src/ap-table/components/setting/modal/index.vue2.js +1 -1
  145. package/lib/src/ap-table/constants.d.ts +4 -4
  146. package/lib/src/ap-table/hooks/use-table-paging-ng.d.ts +9 -2
  147. package/lib/src/ap-table/hooks/use-table-paging-ng.js +1 -1
  148. package/lib/src/ap-table/interface.d.ts +14 -1
  149. package/lib/src/ap-table/utils.d.ts +3 -3
  150. package/lib/src/business/ap-card/ApCard.vue2.js +1 -1
  151. package/lib/src/business/ap-keep-alive/cacher/cacher.d.ts +10 -0
  152. package/lib/src/business/ap-keep-alive/cacher/lru-cacher.d.ts +16 -0
  153. package/lib/src/business/ap-keep-alive/cacher/lru-cacher.js +1 -0
  154. package/lib/src/business/ap-keep-alive/hook.d.ts +10 -0
  155. package/lib/src/business/ap-keep-alive/hook.js +1 -0
  156. package/lib/src/business/ap-keep-alive/index.d.ts +101 -0
  157. package/lib/src/business/ap-keep-alive/index.js +1 -0
  158. package/lib/src/business/ap-keep-alive/interface.d.ts +35 -0
  159. package/lib/src/business/ap-keep-alive/interface.js +1 -0
  160. package/lib/src/business/ap-keep-alive/keep-alive.d.ts +51 -0
  161. package/lib/src/business/ap-keep-alive/keep-alive.js +1 -0
  162. package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.d.ts +7 -0
  163. package/lib/src/business/ap-keep-alive/keeper/ap-form-keeper.js +1 -0
  164. package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.d.ts +14 -0
  165. package/lib/src/business/ap-keep-alive/keeper/ap-grid-keeper.js +1 -0
  166. package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.d.ts +13 -0
  167. package/lib/src/business/ap-keep-alive/keeper/ap-list-keeper.js +1 -0
  168. package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.d.ts +6 -0
  169. package/lib/src/business/ap-keep-alive/keeper/ap-radio-group-keeper.js +1 -0
  170. package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.d.ts +7 -0
  171. package/lib/src/business/ap-keep-alive/keeper/ap-search-form-keeper.js +1 -0
  172. package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.d.ts +13 -0
  173. package/lib/src/business/ap-keep-alive/keeper/ap-table-keeper.js +1 -0
  174. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.d.ts +6 -0
  175. package/lib/src/business/ap-keep-alive/keeper/ap-view-keeper.js +1 -0
  176. package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.d.ts +6 -0
  177. package/lib/src/business/ap-keep-alive/keeper/edit-grid-keeper.js +1 -0
  178. package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.d.ts +6 -0
  179. package/lib/src/business/ap-keep-alive/keeper/edit-table-keeper.js +1 -0
  180. package/lib/src/business/ap-keep-alive/keeper/index.d.ts +3 -0
  181. package/lib/src/business/ap-keep-alive/keeper/index.js +1 -0
  182. package/lib/src/business/ap-keep-alive/keeper/step-keeper.d.ts +6 -0
  183. package/lib/src/business/ap-keep-alive/keeper/step-keeper.js +1 -0
  184. package/lib/src/business/ap-keep-alive/keeper/tab-keeper.d.ts +6 -0
  185. package/lib/src/business/ap-keep-alive/keeper/tab-keeper.js +1 -0
  186. package/lib/src/business/ap-keep-alive/utils.d.ts +22 -0
  187. package/lib/src/business/ap-keep-alive/utils.js +1 -0
  188. package/lib/src/business/ap-radio-group/ap-radio-group.vue2.js +1 -1
  189. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +4 -1
  190. package/lib/src/business/ap-table-modal/hooks/use-table-modal.d.ts +4 -1
  191. package/lib/src/business/ap-table-modal/hooks/use-table-select-modal.d.ts +4 -1
  192. package/lib/src/business/ap-table-modal/index.d.ts +32 -5
  193. package/lib/src/business/ap-table-modal/table-modal.vue.d.ts +14 -3
  194. package/lib/src/business/ap-view/components/main-button-content.vue.d.ts +1 -1
  195. package/lib/src/business/ap-view/components/menu-list-content.vue.d.ts +1 -1
  196. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  197. package/lib/src/business/batch-input-group/index.vue.js +2 -2
  198. package/lib/src/business/hooks/usePageListApTable.d.ts +4 -1
  199. package/lib/src/business/index.d.ts +1 -0
  200. package/lib/src/business/index.js +1 -1
  201. package/lib/src/editable-table/form-item.vue.js +1 -1
  202. package/lib/src/full-screen/interface.d.ts +5 -6
  203. package/lib/src/index.js +1 -1
  204. package/lib/src/mask/index.vue.js +1 -1
  205. package/lib/src/resize-observer/interface.d.ts +2 -3
  206. package/lib/src/scroll-bar/interface.d.ts +7 -7
  207. package/lib/src/scroll-view/interface.d.ts +2 -3
  208. package/lib/src/splitter/SplitBar.vue2.js +1 -1
  209. package/lib/src/splitter/Splitter.vue2.js +1 -1
  210. package/lib/src/text/group.vue.js +1 -1
  211. package/lib/src/text/index.vue.js +1 -1
  212. package/lib/src/version.d.ts +1 -1
  213. package/lib/src/version.js +1 -1
  214. package/lib/src/work-order-modal/work-order-modal.vue.d.ts +1 -1
  215. package/package.json +7 -6
  216. package/theme/antd-global-overwrite/admin/field.css +12 -0
  217. package/theme/antd-global-overwrite/admin/field.less +16 -0
  218. package/theme/antd-global-overwrite/admin/index.css +12 -0
  219. package/theme/antd-global-overwrite/aplus/field.css +12 -0
  220. package/theme/antd-global-overwrite/aplus/field.less +16 -0
  221. package/theme/antd-global-overwrite/aplus/index.css +12 -0
  222. package/theme/ap-action/item.css +1 -1
  223. package/theme/ap-action/item.less +1 -1
  224. package/theme/ap-card/ap-card.css +1 -1
  225. package/theme/ap-card/ap-card.less +1 -1
  226. package/theme/ap-grid/index.css +6 -1
  227. package/theme/ap-grid/index.less +5 -0
  228. package/theme/ap-table/ap-table.css +6 -1
  229. package/theme/ap-table/ap-table.less +5 -0
  230. package/theme/ap-table-modal/index.css +6 -1
  231. package/theme/editable-table/index.css +1 -1
  232. package/theme/index.css +14 -2
  233. package/theme/ui-mode.css +2 -0
  234. package/theme/ui-mode.less +4 -0
@@ -1,13 +1,13 @@
1
- import { isVNode as g, defineComponent as I, ref as C, useSlots as S, computed as _, createVNode as s, mergeProps as R, unref as p, createBlock as V, openBlock as w, resolveDynamicComponent as T } from "vue";
2
- import { Input as j } from "@aplus-frontend/antdv";
1
+ import { isVNode as _, defineComponent as V, ref as w, useSlots as R, createVNode as s, mergeProps as T, unref as p, computed as j, createBlock as U, openBlock as z, resolveDynamicComponent as F } from "vue";
2
+ import { Input as M } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
- import { omit as U } from "lodash-unified";
5
- import { useDefaultPlaceholder as z } from "../hooks/use-default-placeholder.mjs";
6
- import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
7
- function M(a) {
8
- return typeof a == "function" || Object.prototype.toString.call(a) === "[object Object]" && !g(a);
4
+ import { omit as N } from "lodash-unified";
5
+ import { useDefaultPlaceholder as O } from "../hooks/use-default-placeholder.mjs";
6
+ import { useControllableValue as P } from "../../hooks/useControllableValue.mjs";
7
+ function k(a) {
8
+ return typeof a == "function" || Object.prototype.toString.call(a) === "[object Object]" && !_(a);
9
9
  }
10
- const G = /* @__PURE__ */ I({
10
+ const G = /* @__PURE__ */ V({
11
11
  name: "ApFieldText",
12
12
  __name: "index",
13
13
  props: {
@@ -96,50 +96,48 @@ const G = /* @__PURE__ */ I({
96
96
  expose: m,
97
97
  emit: y
98
98
  }) {
99
- const u = C(), t = S();
100
- m({
101
- focus: (e) => {
102
- var n;
103
- (n = u.value) == null || n.focus(e);
104
- },
105
- blur: () => {
106
- var e;
107
- (e = u.value) == null || e.blur();
108
- },
109
- setSelectionRange: (e, n, r) => {
110
- var l;
111
- (l = u.value) == null || l.setSelectionRange(e, n, r);
112
- },
113
- select: () => {
114
- var e;
115
- (e = u.value) == null || e.select();
116
- },
117
- input: _(() => {
118
- var e;
119
- return (e = u.value) == null ? void 0 : e.input;
120
- })
121
- });
122
- const x = y, o = a, {
99
+ const u = w(), t = R(), x = (e) => {
100
+ var n;
101
+ (n = u.value) == null || n.focus(e);
102
+ }, v = () => {
103
+ var e;
104
+ (e = u.value) == null || e.blur();
105
+ }, B = (e, n, r) => {
106
+ var l;
107
+ (l = u.value) == null || l.setSelectionRange(e, n, r);
108
+ }, b = () => {
109
+ var e;
110
+ (e = u.value) == null || e.select();
111
+ }, h = y, o = a, {
123
112
  value: i,
124
- updateValue: v
125
- } = F(o, x), b = z("Text", o);
126
- function B(e) {
127
- var c, d, f;
128
- const n = e.target.value || "", r = o.beforeInput ? (c = o.beforeInput) == null ? void 0 : c.call(o, n) : n, l = (f = (d = u.value) == null ? void 0 : d.$el) == null ? void 0 : f.querySelector("input");
129
- l && (l.value = r), v(r);
113
+ updateValue: I
114
+ } = P(o, h), g = O("Text", o);
115
+ function C(e) {
116
+ var d, c, f;
117
+ const n = e.target.value || "", r = o.beforeInput ? (d = o.beforeInput) == null ? void 0 : d.call(o, n) : n, l = (f = (c = u.value) == null ? void 0 : c.$el) == null ? void 0 : f.querySelector("input");
118
+ l && (l.value = r), I(r);
130
119
  }
131
- function h() {
120
+ function S() {
132
121
  var e, n;
133
- return o.mode === "edit" ? s(j, R(U(o, ["mode", "emptyText", "value", "onUpdate:value", "beforeInput"]), {
134
- placeholder: p(b),
122
+ return o.mode === "edit" ? s(M, T(N(o, ["mode", "emptyText", "value", "onUpdate:value", "beforeInput"]), {
123
+ placeholder: p(g),
135
124
  value: p(i),
136
- onInput: B,
125
+ onInput: C,
137
126
  ref: u
138
- }), M(t) ? t : {
127
+ }), k(t) ? t : {
139
128
  default: () => [t]
140
129
  }) : s("span", null, [o.prefix || ((e = t == null ? void 0 : t.prefix) == null ? void 0 : e.call(t)), p(i) || o.emptyText, o.suffix || ((n = t == null ? void 0 : t.suffix) == null ? void 0 : n.call(t))]);
141
130
  }
142
- return (e, n) => (w(), V(T(h())));
131
+ return m({
132
+ focus: x,
133
+ blur: v,
134
+ setSelectionRange: B,
135
+ select: b,
136
+ input: j(() => {
137
+ var e;
138
+ return (e = u.value) == null ? void 0 : e.input;
139
+ })
140
+ }), (e, n) => (z(), U(F(S())));
143
141
  }
144
142
  });
145
143
  export {
@@ -1,4 +1,4 @@
1
- import { isVNode as x, defineComponent as h, ref as C, useSlots as g, unref as i, createVNode as o, mergeProps as w, Fragment as P, createBlock as U, openBlock as V, resolveDynamicComponent as _ } from "vue";
1
+ import { isVNode as x, defineComponent as h, useSlots as C, ref as g, unref as i, createVNode as o, mergeProps as w, Fragment as P, createBlock as U, openBlock as V, resolveDynamicComponent as _ } from "vue";
2
2
  import { Input as S, Space as T } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
4
  import { omit as I } from "lodash-unified";
@@ -109,18 +109,7 @@ const G = /* @__PURE__ */ h({
109
109
  expose: c,
110
110
  emit: f
111
111
  }) {
112
- const a = C(), u = g();
113
- c({
114
- focus: () => {
115
- var e;
116
- (e = a.value) == null || e.focus();
117
- },
118
- blur: () => {
119
- var e;
120
- (e = a.value) == null || e.blur();
121
- }
122
- });
123
- const s = f, t = l, {
112
+ const s = f, t = l, a = C(), u = g(), {
124
113
  value: m,
125
114
  updateValue: y
126
115
  } = d(t, s), v = k("TextPassword", t), {
@@ -138,9 +127,9 @@ const G = /* @__PURE__ */ h({
138
127
  "onUpdate:value": y,
139
128
  visible: n,
140
129
  "onUpdate:visible": r,
141
- ref: a
142
- }), E(u) ? u : {
143
- default: () => [u]
130
+ ref: u
131
+ }), E(a) ? a : {
132
+ default: () => [a]
144
133
  });
145
134
  let p = o(P, null, [t.emptyText]);
146
135
  return e && (p = o(T, null, {
@@ -152,7 +141,16 @@ const G = /* @__PURE__ */ h({
152
141
  }, [n ? o(O, null, null) : o(j, null, null)])]
153
142
  })), p;
154
143
  }
155
- return (e, n) => (V(), U(_(B())));
144
+ return c({
145
+ focus: () => {
146
+ var e;
147
+ (e = u.value) == null || e.focus();
148
+ },
149
+ blur: () => {
150
+ var e;
151
+ (e = u.value) == null || e.blur();
152
+ }
153
+ }), (e, n) => (V(), U(_(B())));
156
154
  }
157
155
  });
158
156
  export {
@@ -1,6 +1,6 @@
1
1
  import { ApFieldTextAreaProps } from '../interface';
2
2
  import { InputFocusOptions } from '@aplus-frontend/antdv/es/vc-input/utils/commonUtils';
3
- import { DefineComponent, ComputedRef, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, GlobalComponents, GlobalDirectives } from 'vue';
3
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions, CreateComponentPublicInstanceWithMixins, ExtractPropTypes, PropType, GlobalComponents, GlobalDirectives } from 'vue';
4
4
  import { FieldMode } from '..';
5
5
  import { AutoSizeType } from '@aplus-frontend/antdv/es/input/inputProps';
6
6
  import { CompositionEventHandler, FocusEventHandler, ChangeEventHandler, KeyboardEventHandler, MouseEventHandler } from '@aplus-frontend/antdv/es/_util/EventInterface';
@@ -11,7 +11,7 @@ import { VueNode } from '@aplus-frontend/antdv/es/_util/type';
11
11
  declare const _default: DefineComponent<ApFieldTextAreaProps, {
12
12
  focus: (options?: InputFocusOptions) => void;
13
13
  blur: () => void;
14
- resizableTextArea: ComputedRef<any>;
14
+ resizableTextArea: any;
15
15
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
16
16
  "update:value": (...args: any[]) => void;
17
17
  }, string, PublicProps, Readonly<ApFieldTextAreaProps> & Readonly<{
@@ -1,13 +1,14 @@
1
- import { isVNode as E, defineComponent as F, useSlots as K, ref as U, computed as z, unref as o, createVNode as d, Fragment as S, createBlock as w, openBlock as C, resolveDynamicComponent as M, mergeProps as j, createSlots as q, renderList as O, withCtx as x, renderSlot as $, normalizeProps as H, guardReactiveProps as W } from "vue";
1
+ import { isVNode as _, defineComponent as E, useSlots as K, ref as U, computed as z, unref as n, createVNode as d, Fragment as B, createBlock as w, openBlock as C, resolveDynamicComponent as M, mergeProps as j, createSlots as q, renderList as O, withCtx as x, renderSlot as $, normalizeProps as H, guardReactiveProps as W } from "vue";
2
2
  import { Space as G, Tag as J, TreeSelect as Q, Spin as X } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
4
  import { isArray as Y, omit as Z } from "lodash-unified";
5
5
  import { useRequest as ee } from "./use-request.mjs";
6
6
  import { useControllableValue as te } from "../../hooks/useControllableValue.mjs";
7
7
  function N(r) {
8
- return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !E(r);
8
+ return typeof r == "function" || Object.prototype.toString.call(r) === "[object Object]" && !_(r);
9
9
  }
10
- const ie = /* @__PURE__ */ F({
10
+ const ie = /* @__PURE__ */ E({
11
+ name: "ApFieldTreeSelect",
11
12
  __name: "index",
12
13
  props: {
13
14
  mode: {
@@ -169,10 +170,10 @@ const ie = /* @__PURE__ */ F({
169
170
  },
170
171
  emits: ["update:value"],
171
172
  setup(r, {
172
- expose: b,
173
- emit: T
173
+ expose: T,
174
+ emit: b
174
175
  }) {
175
- const a = r, D = K(), V = T, s = U(), {
176
+ const a = r, D = K(), V = b, s = U(), {
176
177
  value: c,
177
178
  updateValue: k
178
179
  } = te(a, V), {
@@ -180,66 +181,66 @@ const ie = /* @__PURE__ */ F({
180
181
  loading: y,
181
182
  request: h
182
183
  } = ee(a), I = z(() => {
183
- var v, B;
184
+ var S, v;
184
185
  let e;
185
- const t = o(c), u = Y(t) ? t : [t].filter(Boolean);
186
+ const t = n(c), u = Y(t) ? t : [t].filter(Boolean);
186
187
  if (!u.length)
187
- return d(S, null, [a.emptyText]);
188
- const n = [], f = ((v = a.fieldNames) == null ? void 0 : v.label) || "label", _ = ((B = a.fieldNames) == null ? void 0 : B.value) || "value";
188
+ return d(B, null, [a.emptyText]);
189
+ const o = [], f = ((S = a.fieldNames) == null ? void 0 : S.label) || "label", L = ((v = a.fieldNames) == null ? void 0 : v.value) || "value";
189
190
  function g(l) {
190
191
  var i;
191
192
  for (const p of l) {
192
- if (u.find((A) => A === p[_]) && n.push(p[f]), n.length === u.length)
193
+ if (u.find((R) => R === p[L]) && o.push(p[f]), o.length === u.length)
193
194
  return;
194
195
  (i = p.children) != null && i.length && g(p.children);
195
196
  }
196
197
  }
197
- return g(o(m)), n.length ? n.length === 1 ? d("span", null, [n[0]]) : d(G, {
198
+ return g(n(m)), o.length ? o.length === 1 ? d("span", null, [o[0]]) : d(G, {
198
199
  size: 4
199
- }, N(e = n.map((l, i) => d(J, {
200
+ }, N(e = o.map((l, i) => d(J, {
200
201
  style: "margin-right: 0px",
201
202
  key: `${l}-${i}`
202
203
  }, N(l) ? l : {
203
204
  default: () => [l]
204
205
  }))) ? e : {
205
206
  default: () => [e]
206
- }) : d(S, null, [a.emptyText]);
207
+ }) : d(B, null, [a.emptyText]);
207
208
  });
208
209
  function P() {
209
210
  var e, t;
210
211
  (t = (e = s.value) == null ? void 0 : e.focus) == null || t.call(e);
211
212
  }
212
- function L() {
213
+ function A() {
213
214
  var e, t;
214
215
  (t = (e = s.value) == null ? void 0 : e.blur) == null || t.call(e);
215
216
  }
216
- function R(e) {
217
+ function F(e) {
217
218
  return h(e);
218
219
  }
219
- return b({
220
+ return T({
220
221
  request: h,
221
222
  focus: P,
222
- blur: L
223
+ blur: A
223
224
  }), (e, t) => e.mode === "read" ? (C(), w(M(I.value), {
224
225
  key: 0
225
- })) : (C(), w(o(Q), j({
226
+ })) : (C(), w(n(Q), j({
226
227
  key: 1
227
- }, o(Z)(a, ["onUpdate:value", "value", "treeData", "loadData"]), {
228
+ }, n(Z)(a, ["onUpdate:value", "value", "treeData", "loadData"]), {
228
229
  ref_key: "treeSelectRef",
229
230
  ref: s,
230
- value: o(c),
231
- "tree-data": o(m),
232
- loading: o(y),
233
- "load-data": e.loadData ? R : void 0,
234
- "onUpdate:value": o(k)
231
+ value: n(c),
232
+ "tree-data": n(m),
233
+ loading: n(y),
234
+ "load-data": e.loadData ? F : void 0,
235
+ "onUpdate:value": n(k)
235
236
  }), q({
236
237
  _: 2
237
- }, [O(D, (u, n) => ({
238
- name: n,
239
- fn: x((f) => [$(e.$slots, n, H(W(f || {})))])
240
- })), o(y) ? {
238
+ }, [O(D, (u, o) => ({
239
+ name: o,
240
+ fn: x((f) => [$(e.$slots, o, H(W(f || {})))])
241
+ })), n(y) ? {
241
242
  name: "notFoundContent",
242
- fn: x(() => [d(o(X), {
243
+ fn: x(() => [d(n(X), {
243
244
  size: "small"
244
245
  })]),
245
246
  key: "0"
@@ -1,4 +1,4 @@
1
- import { defineComponent as Q, reactive as X, ref as E, unref as p, nextTick as Y, toRaw as _, watch as Z, onWatcherCleanup as z, computed as ee, createBlock as te, openBlock as re, mergeProps as le, withCtx as oe, renderSlot as se } from "vue";
1
+ import { defineComponent as Q, reactive as X, ref as A, unref as p, nextTick as Y, toRaw as _, watch as Z, onWatcherCleanup as z, computed as ee, createBlock as te, openBlock as re, mergeProps as le, withCtx as oe, renderSlot as se } from "vue";
2
2
  import { Form as ne } from "@aplus-frontend/antdv";
3
3
  import { useProvideForm as ie } from "./context.mjs";
4
4
  import { isArray as f, cloneDeep as ae, isFunction as B, isPlainObject as M, omit as ue } from "lodash-unified";
@@ -6,9 +6,10 @@ import { useUrlSearchParams as ce } from "@vueuse/core";
6
6
  import { INTERNAL_FORM_INSTANCE_MARK as fe } from "./constant.mjs";
7
7
  import { getRouteType as de, isDef as V } from "../utils/index.mjs";
8
8
  import ge from "./utils/set.mjs";
9
- import { genParams as b, setToParams as A } from "./utils/params.mjs";
10
- import { useInjectFormProvider as he } from "./provider/context.mjs";
9
+ import { genParams as b, setToParams as E } from "./utils/params.mjs";
10
+ import { useInjectFormProvider as Fe } from "./provider/context.mjs";
11
11
  const Re = /* @__PURE__ */ Q({
12
+ name: "ApForm",
12
13
  __name: "ap-form",
13
14
  props: {
14
15
  layout: { default: "horizontal" },
@@ -59,12 +60,12 @@ const Re = /* @__PURE__ */ Q({
59
60
  }
60
61
  T();
61
62
  }
62
- const u = E(), I = ce(de()), y = he(), P = E(
63
+ const u = A(), I = ce(de()), y = Fe(), P = A(
63
64
  l.syncToUrl ? b(l.syncToUrl, I, "get") : {}
64
65
  );
65
66
  let m = ae(w()), g = {};
66
67
  const n = X(w());
67
- let h = [];
68
+ let F = [];
68
69
  function w() {
69
70
  const e = l.initialValues || {};
70
71
  return l.syncToUrlPriority ? {
@@ -77,17 +78,17 @@ const Re = /* @__PURE__ */ Q({
77
78
  }
78
79
  function W(e) {
79
80
  var r;
80
- const t = F(e, g);
81
- y.triggerFormFinish(l.name, e), l.syncToUrl && A(I, b(l.syncToUrl, t, "set")), (r = l.onFinish) == null || r.call(l, t);
81
+ const t = h(e, g);
82
+ y.triggerFormFinish(l.name, e), l.syncToUrl && E(I, b(l.syncToUrl, t, "set")), (r = l.onFinish) == null || r.call(l, t);
82
83
  }
83
84
  const q = async () => {
84
85
  var e;
85
86
  (e = u.value) == null || e.resetFields(), await Y(() => {
86
- Object.keys(n).forEach((t) => delete n[t]), Object.assign(n, m), T(), l.syncToUrl && A(
87
+ Object.keys(n).forEach((t) => delete n[t]), Object.assign(n, m), T(), l.syncToUrl && E(
87
88
  I,
88
89
  b(
89
90
  l.syncToUrl,
90
- F(m, g),
91
+ h(m, g),
91
92
  "set"
92
93
  )
93
94
  );
@@ -104,13 +105,13 @@ const Re = /* @__PURE__ */ Q({
104
105
  e,
105
106
  t
106
107
  ));
107
- return F(r, g);
108
+ return h(r, g);
108
109
  }, O = (e) => {
109
110
  var t;
110
111
  return e === !0 ? _(n) : (t = u.value) == null ? void 0 : t.getFieldsValue(e);
111
112
  }, L = (e) => {
112
113
  const t = O(e);
113
- return F(t, g);
114
+ return h(t, g);
114
115
  }, $ = (e, t) => {
115
116
  var r;
116
117
  return (r = u.value) == null ? void 0 : r.validate(e, t);
@@ -123,8 +124,8 @@ const Re = /* @__PURE__ */ Q({
123
124
  v(e, t, r, o), T();
124
125
  };
125
126
  function R(e, t) {
126
- return t || e(_(n)), h.push(e), () => {
127
- h = h.filter((r) => r !== e);
127
+ return t || e(_(n)), F.push(e), () => {
128
+ F = F.filter((r) => r !== e);
128
129
  };
129
130
  }
130
131
  function j({ initialValue: e, name: t, transform: r }) {
@@ -158,14 +159,14 @@ const Re = /* @__PURE__ */ Q({
158
159
  };
159
160
  }
160
161
  function T() {
161
- if (h.length) {
162
+ if (F.length) {
162
163
  const e = _(n);
163
- h.forEach((t) => {
164
+ F.forEach((t) => {
164
165
  t(e);
165
166
  });
166
167
  }
167
168
  }
168
- function F(e, t) {
169
+ function h(e, t) {
169
170
  if (e == null)
170
171
  return;
171
172
  let r = f(e) ? [] : {};
@@ -178,7 +179,7 @@ const Re = /* @__PURE__ */ Q({
178
179
  ...c
179
180
  } : r[o] = c : r[o] = c;
180
181
  } else if (M(i) || f(i)) {
181
- const c = F(
182
+ const c = h(
182
183
  i,
183
184
  s
184
185
  );
@@ -1,42 +1,43 @@
1
- import { defineComponent as m, ref as _, watchEffect as g, unref as h, renderSlot as y } from "vue";
2
- import { useInjectForm as V } from "../context.mjs";
3
- import { isArray as d, isNumber as x, cloneDeep as b } from "lodash-unified";
4
- const k = /* @__PURE__ */ m({
1
+ import { defineComponent as m, ref as y, watchEffect as _, unref as d, renderSlot as g } from "vue";
2
+ import { useInjectForm as h } from "../context.mjs";
3
+ import { isArray as V, isNumber as x, cloneDeep as b } from "lodash-unified";
4
+ const F = /* @__PURE__ */ m({
5
+ name: "ApFormDependency",
5
6
  __name: "index",
6
7
  props: {
7
8
  nameList: {}
8
9
  },
9
10
  setup(c) {
10
- function f(t, n) {
11
- return d(n) ? n.reduce((o, e) => o == null ? void 0 : o[e], t) : t == null ? void 0 : t[n];
11
+ function f(e, n) {
12
+ return V(n) ? n.reduce((o, t) => o == null ? void 0 : o[t], e) : e == null ? void 0 : e[n];
12
13
  }
13
14
  const a = c, {
14
15
  model: l
15
- } = V(), r = _({});
16
- function i(t, n, o) {
17
- let e = n;
18
- for (let s = 0; s < t.length; s++) {
19
- const u = t[s];
20
- if (s === t.length - 1)
21
- e[u] = o;
16
+ } = h(), u = y({});
17
+ function i(e, n, o) {
18
+ let t = n;
19
+ for (let s = 0; s < e.length; s++) {
20
+ const r = e[s];
21
+ if (s === e.length - 1)
22
+ t[r] = o;
22
23
  else {
23
- const p = t[s + 1];
24
- (typeof e[u] != "object" || e[u] === null) && (e[u] = x(p) ? [] : {}), e = e[u];
24
+ const p = e[s + 1];
25
+ (typeof t[r] != "object" || t[r] === null) && (t[r] = x(p) ? [] : {}), t = t[r];
25
26
  }
26
27
  }
27
28
  }
28
- return g(() => {
29
- const t = b(r.value);
29
+ return _(() => {
30
+ const e = b(u.value);
30
31
  for (const n of a.nameList) {
31
- const o = [n].flat(1), e = f(h(l), o);
32
- i(o, t, e);
32
+ const o = [n].flat(1), t = f(d(l), o);
33
+ i(o, e, t);
33
34
  }
34
- r.value = t;
35
- }), (t, n) => y(t.$slots, "default", {
36
- values: r.value
35
+ u.value = e;
36
+ }), (e, n) => g(e.$slots, "default", {
37
+ values: u.value
37
38
  });
38
39
  }
39
40
  });
40
41
  export {
41
- k as default
42
+ F as default
42
43
  };
@@ -818,7 +818,7 @@ declare function __VLS_template(): {
818
818
  hideRequiredMark: boolean;
819
819
  validateOnRuleChange: boolean;
820
820
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
821
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl") | "setFieldsValue" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed"> & ShallowUnwrapRef<{
821
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl")> & ShallowUnwrapRef<{
822
822
  setFieldsValue: (fields: Partial<any>) => void;
823
823
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
824
824
  resetFields: () => Promise<void>;
@@ -841,15 +841,17 @@ declare function __VLS_template(): {
841
841
  };
842
842
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
843
843
  declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
844
- resetFields: () => void;
844
+ validate: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
845
+ setFieldsValue: (fields: Partial<any>) => void;
846
+ setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
847
+ resetFields: () => Promise<void>;
845
848
  clearValidate: (name?: NamePath) => void;
846
849
  validateFields: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
847
850
  getFieldsValue: (nameList?: true | InternalNamePath[]) => Partial<any> | undefined;
848
- validate: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
849
- scrollToField: (name: NamePath, options?: {}) => void;
850
- setFieldValue: (key: string, newValue: any) => void;
851
- setFieldsValue: (values: Record<string, any>) => void;
851
+ scrollToField: (name: NamePath, options?: any) => void;
852
852
  getInternalInstance: (mark: string) => ApFormInternalInstance | undefined;
853
+ validateFieldsReturnTransformed: (nameList?: NamePath[] | string, options?: ValidateOptions) => Promise<Partial<any>> | undefined;
854
+ getFieldsValueTransformed: (nameList?: true | InternalNamePath[]) => Partial<any> | undefined;
853
855
  }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
854
856
  "update:open": (...args: any[]) => void;
855
857
  }, string, PublicProps, Readonly<ApFormDrawerFormProps> & Readonly<{
@@ -1760,7 +1762,7 @@ declare const __VLS_component: DefineComponent<ApFormDrawerFormProps, {
1760
1762
  hideRequiredMark: boolean;
1761
1763
  validateOnRuleChange: boolean;
1762
1764
  syncToUrl: boolean | ((values: Recordable, type: "get" | "set") => Recordable);
1763
- }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "registerWatch" | "setFieldValue" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl") | "setFieldsValue" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed"> & ShallowUnwrapRef<{
1765
+ }> & Omit<Readonly< ApFormProps> & Readonly<{}>, "validate" | "registerWatch" | "setFieldsValue" | "setFieldValue" | "resetFields" | "clearValidate" | "validateFields" | "getFieldsValue" | "scrollToField" | "getInternalInstance" | "validateFieldsReturnTransformed" | "getFieldsValueTransformed" | ("layout" | "colon" | "labelAlign" | "validateTrigger" | "hideRequiredMark" | "validateOnRuleChange" | "syncToUrl")> & ShallowUnwrapRef<{
1764
1766
  setFieldsValue: (fields: Partial<any>) => void;
1765
1767
  setFieldValue: (name: NamePath, value: any, triggerChange?: boolean, optimizeFn?: UpdateModelOptimizeFn) => void;
1766
1768
  resetFields: () => Promise<void>;