@aplus-frontend/ui 0.2.12 → 0.2.14

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 (87) hide show
  1. package/es/index.mjs +145 -143
  2. package/es/src/ap-descriptions/ap-descriptions.vue.mjs +4 -5
  3. package/es/src/ap-descriptions/help-message/index.vue.d.ts +3 -15
  4. package/es/src/ap-descriptions/help-message/index.vue2.mjs +35 -20
  5. package/es/src/ap-form/item-group/index.vue.mjs +1 -1
  6. package/es/src/ap-table/ap-table.vue2.mjs +73 -73
  7. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +20 -0
  8. package/es/src/ap-table/components/paragraph-ellipsis/index.vue.mjs +4 -0
  9. package/es/src/ap-table/components/paragraph-ellipsis/index.vue2.mjs +82 -0
  10. package/es/src/ap-table/hooks/use-table-paging.mjs +15 -14
  11. package/es/src/business/ap-batch-action/ApBatchAction.vue2.mjs +42 -33
  12. package/es/src/business/ap-image/ApImage.vue.d.ts +39 -1
  13. package/es/src/business/ap-image/ApImage.vue2.mjs +78 -30
  14. package/es/src/business/ap-image/hooks/useOss.mjs +35 -26
  15. package/es/src/business/ap-image/index.d.ts +41 -1
  16. package/es/src/business/ap-image/interface.d.ts +1 -0
  17. package/es/src/business/ap-image/style/css.d.ts +0 -1
  18. package/es/src/business/ap-image/style/css.js +1 -1
  19. package/es/src/business/ap-image/style/index.d.ts +0 -1
  20. package/es/src/business/ap-image/style/index.js +1 -1
  21. package/es/src/business/batch-input-group/index.d.ts +2 -0
  22. package/es/src/business/batch-input-group/index.mjs +1 -0
  23. package/es/src/business/batch-input-group/index.vue.d.ts +50 -0
  24. package/es/src/business/batch-input-group/index.vue.mjs +155 -0
  25. package/es/src/business/batch-input-group/index.vue2.mjs +4 -0
  26. package/es/src/business/batch-input-group/interface.d.ts +34 -0
  27. package/es/src/business/batch-input-group/popover-input/index.vue.d.ts +17 -0
  28. package/es/src/business/batch-input-group/popover-input/index.vue.mjs +4 -0
  29. package/es/src/business/batch-input-group/popover-input/index.vue2.mjs +74 -0
  30. package/es/src/business/batch-input-group/popover-input/style/css.d.ts +0 -0
  31. package/es/src/business/batch-input-group/popover-input/style/css.js +1 -0
  32. package/es/src/business/batch-input-group/popover-input/style/index.d.ts +0 -0
  33. package/es/src/business/batch-input-group/popover-input/style/index.js +1 -0
  34. package/es/src/business/batch-input-group/style/css.d.ts +0 -0
  35. package/es/src/business/batch-input-group/style/css.js +1 -0
  36. package/es/src/business/batch-input-group/style/index.d.ts +0 -0
  37. package/es/src/business/batch-input-group/style/index.js +1 -0
  38. package/es/src/business/index.d.ts +1 -0
  39. package/es/src/business/index.mjs +41 -40
  40. package/es/src/index.mjs +27 -25
  41. package/es/src/locale/lang/en.mjs +5 -1
  42. package/es/src/locale/lang/zh-cn.mjs +5 -1
  43. package/es/src/path-map.mjs +2 -1
  44. package/lib/index.js +1 -1
  45. package/lib/src/ap-descriptions/ap-descriptions.vue.js +1 -1
  46. package/lib/src/ap-descriptions/help-message/index.vue.d.ts +3 -15
  47. package/lib/src/ap-descriptions/help-message/index.vue2.js +1 -1
  48. package/lib/src/ap-form/item-group/index.vue.js +1 -1
  49. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  50. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.d.ts +20 -0
  51. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue.js +1 -0
  52. package/lib/src/ap-table/components/paragraph-ellipsis/index.vue2.js +1 -0
  53. package/lib/src/ap-table/hooks/use-table-paging.js +1 -1
  54. package/lib/src/business/ap-batch-action/ApBatchAction.vue2.js +1 -1
  55. package/lib/src/business/ap-image/ApImage.vue.d.ts +39 -1
  56. package/lib/src/business/ap-image/ApImage.vue2.js +1 -1
  57. package/lib/src/business/ap-image/hooks/useOss.js +1 -1
  58. package/lib/src/business/ap-image/index.d.ts +41 -1
  59. package/lib/src/business/ap-image/interface.d.ts +1 -0
  60. package/lib/src/business/ap-image/style/css.d.ts +0 -1
  61. package/lib/src/business/ap-image/style/css.js +1 -1
  62. package/lib/src/business/ap-image/style/index.d.ts +0 -1
  63. package/lib/src/business/ap-image/style/index.js +1 -1
  64. package/lib/src/business/batch-input-group/index.d.ts +2 -0
  65. package/lib/src/business/batch-input-group/index.js +1 -0
  66. package/lib/src/business/batch-input-group/index.vue.d.ts +50 -0
  67. package/lib/src/business/batch-input-group/index.vue.js +2 -0
  68. package/lib/src/business/batch-input-group/index.vue2.js +1 -0
  69. package/lib/src/business/batch-input-group/interface.d.ts +34 -0
  70. package/lib/src/business/batch-input-group/popover-input/index.vue.d.ts +17 -0
  71. package/lib/src/business/batch-input-group/popover-input/index.vue.js +1 -0
  72. package/lib/src/business/batch-input-group/popover-input/index.vue2.js +2 -0
  73. package/lib/src/business/batch-input-group/popover-input/style/css.d.ts +0 -0
  74. package/lib/src/business/batch-input-group/popover-input/style/css.js +1 -0
  75. package/lib/src/business/batch-input-group/popover-input/style/index.d.ts +0 -0
  76. package/lib/src/business/batch-input-group/popover-input/style/index.js +1 -0
  77. package/lib/src/business/batch-input-group/style/css.d.ts +0 -0
  78. package/lib/src/business/batch-input-group/style/css.js +1 -0
  79. package/lib/src/business/batch-input-group/style/index.d.ts +0 -0
  80. package/lib/src/business/batch-input-group/style/index.js +1 -0
  81. package/lib/src/business/index.d.ts +1 -0
  82. package/lib/src/business/index.js +1 -1
  83. package/lib/src/index.js +1 -1
  84. package/lib/src/locale/lang/en.js +1 -1
  85. package/lib/src/locale/lang/zh-cn.js +1 -1
  86. package/lib/src/path-map.js +1 -1
  87. package/package.json +11 -11
@@ -1,6 +1,38 @@
1
1
  import { ApImageProps } from './interface';
2
+ import { ImgInfo } from '@aplus-frontend/antdv/es/vc-image/src/Preview';
2
3
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
- declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApImageProps>, {
4
+ declare function __VLS_template(): {
5
+ slots: {
6
+ toolbarRender?(_: {
7
+ originalNodes: import("vue/jsx-runtime").JSX.Element[];
8
+ actions: {
9
+ onFlipX: () => void;
10
+ onFlipY: () => void;
11
+ onRotateLeft: () => void;
12
+ onRotateRight: () => void;
13
+ onZoomIn: () => void;
14
+ onZoomOut: () => void;
15
+ };
16
+ transform: {
17
+ x: number;
18
+ y: number;
19
+ scale: number;
20
+ rotate: number;
21
+ flip: {
22
+ x: number;
23
+ y: number;
24
+ };
25
+ };
26
+ image: ImgInfo;
27
+ current?: number;
28
+ total?: number;
29
+ }): any;
30
+ };
31
+ refs: {};
32
+ attrs: Partial<{}>;
33
+ };
34
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
35
+ declare const __VLS_component: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApImageProps>, {
4
36
  preview: boolean;
5
37
  }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApImageProps>, {
6
38
  preview: boolean;
@@ -14,6 +46,7 @@ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOpti
14
46
  current?: number;
15
47
  };
16
48
  }, {}>;
49
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
17
50
  export default _default;
18
51
  type __VLS_WithDefaults<P, D> = {
19
52
  [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
@@ -29,6 +62,11 @@ type __VLS_TypePropsToOption<T> = {
29
62
  required: true;
30
63
  };
31
64
  };
65
+ type __VLS_WithTemplateSlots<T, S> = T & {
66
+ new (): {
67
+ $slots: S;
68
+ };
69
+ };
32
70
  type __VLS_PrettifyLocal<T> = {
33
71
  [K in keyof T]: T[K];
34
72
  } & {};
@@ -1,13 +1,15 @@
1
- import { defineComponent as b, computed as s, ref as k, watchEffect as A, openBlock as O, createBlock as h, unref as l, normalizeProps as _, guardReactiveProps as w } from "vue";
2
- import { Image as U } from "@aplus-frontend/antdv";
3
- import { injectLocaleToOss as y, getOssInstance as B, getSignatureUrl as C } from "./hooks/useOss.mjs";
1
+ import { defineComponent as S, computed as s, ref as U, watchEffect as j, openBlock as i, createBlock as g, unref as n, mergeProps as p, withCtx as B, renderSlot as E, normalizeProps as I, guardReactiveProps as L, createElementVNode as b, normalizeClass as D, createElementBlock as M, Fragment as P, renderList as R, resolveDynamicComponent as T, createVNode as x } from "vue";
2
+ import { Image as z } from "@aplus-frontend/antdv";
3
+ import { DownloadOutlined as V } from "@ant-design/icons-vue";
4
+ import { injectLocaleToOss as W, getOssInstance as G, getSignatureUrl as $ } from "./hooks/useOss.mjs";
4
5
  import "../../config-provider/index.mjs";
5
- import F from "./imgs/admin-fallback.jpg.mjs";
6
- import I from "./imgs/aplus-fallback.jpg.mjs";
7
- import { omit as M } from "lodash-unified";
8
- import { useGlobalConfig as n } from "../../config-provider/hooks/use-global-config.mjs";
9
- import { useLocale as S } from "../../config-provider/hooks/use-locale.mjs";
10
- const T = /* @__PURE__ */ b({
6
+ import q from "./imgs/admin-fallback.jpg.mjs";
7
+ import H from "./imgs/aplus-fallback.jpg.mjs";
8
+ import { omit as J } from "lodash-unified";
9
+ import { useNamespace as K } from "../../config-provider/hooks/use-namespace.mjs";
10
+ import { useGlobalConfig as m } from "../../config-provider/hooks/use-global-config.mjs";
11
+ import { useLocale as Q } from "../../config-provider/hooks/use-locale.mjs";
12
+ const se = /* @__PURE__ */ S({
11
13
  __name: "ApImage",
12
14
  props: {
13
15
  getOssAccess: {},
@@ -16,46 +18,92 @@ const T = /* @__PURE__ */ b({
16
18
  alt: {},
17
19
  fallback: {},
18
20
  src: {},
21
+ fileName: {},
19
22
  preview: { type: [Boolean, Object], default: !0 }
20
23
  },
21
- setup(i) {
22
- const e = i, c = {
23
- aplus: I,
24
- admin: F
25
- }, u = n("uiMode"), f = n("apUpload"), { t: m, lang: p } = S(), g = s(
24
+ setup(v) {
25
+ const { b: u } = K("ap-image"), e = v, d = {
26
+ aplus: H,
27
+ admin: q
28
+ }, k = m("uiMode"), w = m("apUpload"), f = m(
29
+ "downloadCenterTriggerConfig"
30
+ ), { t: h, lang: C } = Q(), O = s(
26
31
  () => {
27
32
  var a;
28
- return e.getOssAccess || ((a = f.value) == null ? void 0 : a.getOssAccess);
33
+ return e.getOssAccess || ((a = w.value) == null ? void 0 : a.getOssAccess);
29
34
  }
30
- ), d = s(
31
- () => c[u.value] || c.aplus
32
- ), v = s(() => (e == null ? void 0 : e.fallback) || d.value), t = k("");
33
- return y(m, p), A(async () => {
35
+ ), A = s(
36
+ () => d[k.value] || d.aplus
37
+ ), N = s(() => (e == null ? void 0 : e.fallback) || A.value), r = U("");
38
+ W(h, C), j(async () => {
34
39
  var a;
35
40
  if (!(e != null && e.src)) {
36
- t.value = "";
41
+ r.value = "";
37
42
  return;
38
43
  }
39
44
  if (!((a = e.src) != null && a.startsWith("Frontend-Upload"))) {
40
- t.value = e.src;
45
+ r.value = e.src;
41
46
  return;
42
47
  }
43
48
  try {
44
- const o = await B(g.value), r = await C({
49
+ const o = await G(O.value), t = await $({
45
50
  oss: o,
46
51
  fileName: e.src
47
52
  });
48
- r && (t.value = r);
53
+ t && (r.value = t);
49
54
  } catch {
50
- t.value = "";
55
+ r.value = "";
51
56
  }
52
- }), (a, o) => (O(), h(l(U), _(w({
53
- ...l(M)(e, ["src", "getOssAccess"]),
54
- fallback: v.value,
55
- src: t.value
56
- })), null, 16));
57
+ });
58
+ async function y() {
59
+ var t, l, c;
60
+ if (!(e != null && e.src))
61
+ return;
62
+ const a = e.src, o = e.fileName ?? e.src;
63
+ if (!((t = e.src) != null && t.startsWith("Frontend-Upload"))) {
64
+ _(a, o);
65
+ return;
66
+ }
67
+ if ((l = f.value) != null && l.trigger) {
68
+ let F = [
69
+ {
70
+ objectName: a,
71
+ fileName: o
72
+ }
73
+ ];
74
+ await ((c = f.value) == null ? void 0 : c.trigger(F));
75
+ }
76
+ }
77
+ const _ = (a, o) => {
78
+ const t = document.createElement("a");
79
+ t.href = a, t.rel = "noopener noreferrer", t.setAttribute("download", o), document.body.appendChild(t), t.click(), document.body.removeChild(t);
80
+ };
81
+ return (a, o) => (i(), g(n(z), p({
82
+ class: [n(u)()]
83
+ }, {
84
+ ...n(J)(e, ["src", "getOssAccess"]),
85
+ fallback: N.value,
86
+ src: r.value
87
+ }), {
88
+ toolbarRender: B((t) => [
89
+ E(a.$slots, "toolbarRender", I(L({ ...t })), () => [
90
+ b("div", {
91
+ class: D([n(u)("toolbar")])
92
+ }, [
93
+ (i(!0), M(P, null, R(t.originalNodes, (l, c) => (i(), g(T(l), p({ ref_for: !0 }, t, { key: c }), null, 16))), 128)),
94
+ b("div", {
95
+ class: "ant-image-preview-operations-operation",
96
+ onClick: y
97
+ }, [
98
+ x(n(V))
99
+ ])
100
+ ], 2)
101
+ ])
102
+ ]),
103
+ _: 3
104
+ }, 16, ["class"]));
57
105
  }
58
106
  });
59
107
  export {
60
- T as default
108
+ se as default
61
109
  };
@@ -1,37 +1,46 @@
1
- import { createOssInstance as o } from "@aplus-frontend/oss";
2
- let a, s;
3
- function c(n, t) {
4
- a = n, s = t;
1
+ import { createOssInstance as l } from "@aplus-frontend/oss";
2
+ const r = 1e4;
3
+ let a, i;
4
+ function f(t, n) {
5
+ a = t, i = n;
5
6
  }
6
- const i = {
7
+ const u = {
7
8
  "zh-cn": "zh_CN",
8
9
  en: "en_US"
9
10
  };
10
- function l() {
11
- return i[s.value] ?? "zh_CN";
11
+ function g() {
12
+ return u[i.value] ?? "zh_CN";
12
13
  }
13
- async function p(n) {
14
- if (!n)
14
+ let e;
15
+ async function m(t) {
16
+ if (!t)
15
17
  throw new Error(`${a("ap.apUpload.pleasePass")}getOssAccess`);
16
- const t = o();
17
- return await t.initOssClient({
18
- getOssAccess: n,
19
- locale: l(),
20
- onFailure: (e) => {
21
- throw new Error(
22
- typeof (e == null ? void 0 : e.message) == "string" ? e.message : a("ap.apUpload.FailedToObtainOssTemporaryPermissions")
23
- );
24
- }
25
- }), t;
18
+ return e != null && e.createDate && e.createDate < Date.now() + r && (e != null && e.oss) || (e = {
19
+ oss: new Promise((n, c) => {
20
+ const o = l();
21
+ o.initOssClient({
22
+ getOssAccess: t,
23
+ locale: g(),
24
+ onFailure: (s) => {
25
+ c(
26
+ typeof (s == null ? void 0 : s.message) == "string" ? s.message : a("ap.apUpload.FailedToObtainOssTemporaryPermissions")
27
+ );
28
+ }
29
+ }).then(() => {
30
+ n(o);
31
+ });
32
+ }),
33
+ createDate: Date.now()
34
+ }), e.oss;
26
35
  }
27
- function g({
28
- oss: n,
29
- fileName: t
36
+ function O({
37
+ oss: t,
38
+ fileName: n
30
39
  }) {
31
- return n.getSignatureUrl(t);
40
+ return t.getSignatureUrl(n);
32
41
  }
33
42
  export {
34
- p as getOssInstance,
35
- g as getSignatureUrl,
36
- c as injectLocaleToOss
43
+ m as getOssInstance,
44
+ O as getSignatureUrl,
45
+ f as injectLocaleToOss
37
46
  };
@@ -1,5 +1,6 @@
1
1
  import { CreateComponentPublicInstance, ExtractPropTypes, PropType, ComponentOptionsMixin, VNodeProps, AllowedComponentProps, ComponentCustomProps, ComponentOptionsBase, Plugin } from 'vue';
2
2
  import { accessCreate } from '@aplus-frontend/oss';
3
+ import { ImgInfo } from '@aplus-frontend/antdv/es/vc-image/src/Preview';
3
4
  export * from './interface';
4
5
  declare const ApImage: {
5
6
  new (...args: any[]): CreateComponentPublicInstance<Readonly< ExtractPropTypes<{
@@ -12,6 +13,9 @@ declare const ApImage: {
12
13
  getOssAccess: {
13
14
  type: PropType<() => Promise< accessCreate>>;
14
15
  };
16
+ fileName: {
17
+ type: PropType<string>;
18
+ };
15
19
  src: {
16
20
  type: PropType<string>;
17
21
  };
@@ -42,6 +46,9 @@ declare const ApImage: {
42
46
  getOssAccess: {
43
47
  type: PropType<() => Promise< accessCreate>>;
44
48
  };
49
+ fileName: {
50
+ type: PropType<string>;
51
+ };
45
52
  src: {
46
53
  type: PropType<string>;
47
54
  };
@@ -88,6 +95,9 @@ declare const ApImage: {
88
95
  getOssAccess: {
89
96
  type: PropType<() => Promise< accessCreate>>;
90
97
  };
98
+ fileName: {
99
+ type: PropType<string>;
100
+ };
91
101
  src: {
92
102
  type: PropType<string>;
93
103
  };
@@ -131,6 +141,9 @@ declare const ApImage: {
131
141
  getOssAccess: {
132
142
  type: PropType<() => Promise< accessCreate>>;
133
143
  };
144
+ fileName: {
145
+ type: PropType<string>;
146
+ };
134
147
  src: {
135
148
  type: PropType<string>;
136
149
  };
@@ -160,7 +173,34 @@ declare const ApImage: {
160
173
  maskClassName?: string;
161
174
  current?: number;
162
175
  };
163
- }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
176
+ }, {}, string, {}> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
177
+ $slots: {
178
+ toolbarRender?(_: {
179
+ originalNodes: import("vue/jsx-runtime").JSX.Element[];
180
+ actions: {
181
+ onFlipX: () => void;
182
+ onFlipY: () => void;
183
+ onRotateLeft: () => void;
184
+ onRotateRight: () => void;
185
+ onZoomIn: () => void;
186
+ onZoomOut: () => void;
187
+ };
188
+ transform: {
189
+ x: number;
190
+ y: number;
191
+ scale: number;
192
+ rotate: number;
193
+ flip: {
194
+ x: number;
195
+ y: number;
196
+ };
197
+ };
198
+ image: ImgInfo;
199
+ current?: number;
200
+ total?: number;
201
+ }): any;
202
+ };
203
+ }) & ( Plugin & (new (...args: any[]) => {
164
204
  $props: {
165
205
  onClick?: () => void;
166
206
  };
@@ -6,6 +6,7 @@ export interface ApImageProps {
6
6
  alt?: string;
7
7
  fallback?: string;
8
8
  src?: string;
9
+ fileName?: string;
9
10
  preview?: boolean | {
10
11
  visible?: boolean;
11
12
  onVisibleChange?: (visible: boolean, prevVisible: boolean) => void;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +1 @@
1
- export {};
1
+ import '@aplus-frontend/ui-theme/dist/ap-image/ap-image.css';
@@ -1 +0,0 @@
1
- export {};
@@ -1 +1 @@
1
- export {};
1
+ import '@aplus-frontend/ui-theme/src/ap-image/ap-image.less';
@@ -0,0 +1,2 @@
1
+ import { default as BatchInputGroup } from './index.vue';
2
+ export { BatchInputGroup };
@@ -0,0 +1 @@
1
+ import "./index.vue2.mjs";
@@ -0,0 +1,50 @@
1
+ import { BatchInputGroupProps } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ import { FieldMode } from '../../ap-field';
4
+ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<BatchInputGroupProps>, {
5
+ hasAll: boolean;
6
+ emptyText: string;
7
+ mode: string;
8
+ bordered: boolean;
9
+ type: string;
10
+ lazy: boolean;
11
+ allowClear: boolean;
12
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
13
+ "update:value": (...args: any[]) => void;
14
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<BatchInputGroupProps>, {
15
+ hasAll: boolean;
16
+ emptyText: string;
17
+ mode: string;
18
+ bordered: boolean;
19
+ type: string;
20
+ lazy: boolean;
21
+ allowClear: boolean;
22
+ }>>> & {
23
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
24
+ }, {
25
+ type: "number" | "reset" | "submit" | "button" | "search" | "time" | "month" | "date" | "week" | "hidden" | "checkbox" | "radio" | "color" | "text" | "range" | "tel" | "url" | "email" | "image" | "datetime-local" | "file" | "password";
26
+ mode: FieldMode;
27
+ bordered: boolean;
28
+ lazy: boolean;
29
+ allowClear: boolean;
30
+ emptyText: string;
31
+ hasAll: boolean;
32
+ }, {}>;
33
+ export default _default;
34
+ type __VLS_WithDefaults<P, D> = {
35
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
36
+ default: D[K];
37
+ }> : P[K];
38
+ };
39
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
40
+ type __VLS_TypePropsToOption<T> = {
41
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
42
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
43
+ } : {
44
+ type: PropType<T[K]>;
45
+ required: true;
46
+ };
47
+ };
48
+ type __VLS_PrettifyLocal<T> = {
49
+ [K in keyof T]: T[K];
50
+ } & {};
@@ -0,0 +1,155 @@
1
+ import { defineComponent as S, ref as V, computed as p, unref as o, openBlock as d, createElementBlock as U, createVNode as i, withCtx as f, createBlock as b, normalizeStyle as k, createCommentVNode as E, mergeProps as I } from "vue";
2
+ import "../../ap-field/index.mjs";
3
+ import { Space as L } from "@aplus-frontend/antdv";
4
+ import "../../config-provider/index.mjs";
5
+ import { omit as j } from "lodash-unified";
6
+ import "./popover-input/index.vue.mjs";
7
+ import "../../hooks/index.mjs";
8
+ import { useControllableValue as w } from "../../hooks/useControllableValue.mjs";
9
+ import { useLocale as O } from "../../config-provider/hooks/use-locale.mjs";
10
+ import R from "../../ap-field/select/index.vue.mjs";
11
+ import { ApFieldText as z } from "../../ap-field/text/index.mjs";
12
+ import T from "./popover-input/index.vue2.mjs";
13
+ const F = "GROUP_SEARCH_ALL", Q = /* @__PURE__ */ S({
14
+ __name: "index",
15
+ props: {
16
+ style: { type: [Boolean, null, String, Object, Array] },
17
+ inputStyle: { type: [Boolean, null, String, Object, Array] },
18
+ options: {},
19
+ hasAll: { type: Boolean, default: !0 },
20
+ value: {},
21
+ "onUpdate:value": {},
22
+ mode: { default: "edit" },
23
+ class: {},
24
+ id: {},
25
+ placeholder: {},
26
+ autocomplete: {},
27
+ type: { default: "text" },
28
+ name: {},
29
+ size: {},
30
+ autofocus: { type: Boolean },
31
+ lazy: { type: Boolean, default: !0 },
32
+ maxlength: {},
33
+ loading: { type: Boolean },
34
+ bordered: { type: Boolean, default: !0 },
35
+ showCount: { type: [Boolean, Object] },
36
+ htmlSize: {},
37
+ onPressEnter: {},
38
+ onKeydown: {},
39
+ onKeyup: {},
40
+ onFocus: {},
41
+ onBlur: {},
42
+ onChange: {},
43
+ onInput: {},
44
+ onCompositionstart: {},
45
+ onCompositionend: {},
46
+ valueModifiers: {},
47
+ hidden: { type: Boolean },
48
+ status: {},
49
+ defaultValue: {},
50
+ inputElement: {},
51
+ prefixCls: {},
52
+ disabled: { type: Boolean },
53
+ focused: { type: Boolean },
54
+ triggerFocus: {},
55
+ readonly: { type: Boolean },
56
+ handleReset: {},
57
+ addonBefore: {},
58
+ addonAfter: {},
59
+ prefix: {},
60
+ suffix: {},
61
+ clearIcon: {},
62
+ allowClear: { type: Boolean, default: !0 },
63
+ emptyText: { default: "--" }
64
+ },
65
+ emits: ["update:value"],
66
+ setup(m, { emit: y }) {
67
+ const r = m, v = y, { value: n, updateValue: u } = w(
68
+ r,
69
+ v
70
+ ), s = V(), { t: h } = O(), B = p(() => r.options ? r.hasAll ? [
71
+ { value: F, label: h("ap.apGroupSearch.all") },
72
+ ...r.options
73
+ ] : r.options : []), _ = p(() => {
74
+ var e, t;
75
+ return (t = (e = o(n)) == null ? void 0 : e.value) != null && t.length ? o(n).value.join(",") : "";
76
+ }), A = p(() => {
77
+ var e, t;
78
+ return (t = (e = o(n)) == null ? void 0 : e.value) != null && t.length ? o(n).value.join(`
79
+ `) : "";
80
+ });
81
+ function g(e) {
82
+ const t = o(n) || {};
83
+ u({
84
+ ...t,
85
+ key: e
86
+ });
87
+ }
88
+ function x(e) {
89
+ const t = o(n) || {};
90
+ let l = e;
91
+ for (; l.startsWith(","); )
92
+ l = l.slice(1);
93
+ let a = l.replaceAll(",,", ",").split(",");
94
+ a.length === 1 && a[0] === "" && (a = []), u({
95
+ ...t,
96
+ value: a
97
+ });
98
+ }
99
+ function C(e) {
100
+ const t = o(n) || {};
101
+ let l = e.split(/,|\n/);
102
+ u({
103
+ ...t,
104
+ value: l
105
+ });
106
+ }
107
+ function c() {
108
+ var l;
109
+ const e = o(n) || {}, t = (l = e.value) == null ? void 0 : l.filter(Boolean);
110
+ u({
111
+ ...e,
112
+ value: t
113
+ });
114
+ }
115
+ return (e, t) => (d(), U("div", {
116
+ ref_key: "containerRef",
117
+ ref: s,
118
+ style: { position: "relative" }
119
+ }, [
120
+ i(o(L).Compact, { block: "" }, {
121
+ default: f(() => {
122
+ var l, a;
123
+ return [
124
+ (l = e.options) != null && l.length ? (d(), b(o(R), {
125
+ key: 0,
126
+ style: k(e.style),
127
+ options: B.value,
128
+ value: (a = o(n)) == null ? void 0 : a.key,
129
+ "onUpdate:value": g
130
+ }, null, 8, ["style", "options", "value"])) : E("", !0),
131
+ i(o(z), I({ style: e.inputStyle }, o(j)(r, ["style", "value", "onUpdate:value", "inputStyle"]), {
132
+ value: _.value,
133
+ "onUpdate:value": x,
134
+ onBlur: c
135
+ }), {
136
+ suffix: f(() => [
137
+ i(T, {
138
+ _parent: s.value,
139
+ value: A.value,
140
+ "onUpdate:value": C,
141
+ onClose: c
142
+ }, null, 8, ["_parent", "value"])
143
+ ]),
144
+ _: 1
145
+ }, 16, ["style", "value"])
146
+ ];
147
+ }),
148
+ _: 1
149
+ })
150
+ ], 512));
151
+ }
152
+ });
153
+ export {
154
+ Q as default
155
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,34 @@
1
+ import { ApFieldTextAreaProps, ApFieldTextProps } from '../../ap-field';
2
+ import { DefaultOptionType, SelectValue } from '@aplus-frontend/antdv/es/select';
3
+ import { StyleValue } from 'vue';
4
+ export type BatchInputGroupValueType = {
5
+ key: SelectValue;
6
+ value: string[];
7
+ };
8
+ export interface BatchInputGroupProps extends Omit<ApFieldTextProps, 'value' | 'onUpdate:value' | 'style'> {
9
+ /**
10
+ * 下拉框自定义样式
11
+ */
12
+ style?: StyleValue;
13
+ /**
14
+ * 输入框样式
15
+ */
16
+ inputStyle?: StyleValue;
17
+ /**
18
+ * 下拉框可选项列表
19
+ */
20
+ options?: DefaultOptionType[];
21
+ /**
22
+ * 是否为下拉框添加全选选项
23
+ */
24
+ hasAll?: boolean;
25
+ /**
26
+ * v-model
27
+ */
28
+ value?: BatchInputGroupValueType;
29
+ 'onUpdate:value'?: (nextValue: BatchInputGroupValueType) => void;
30
+ }
31
+ export interface BatchInputGroupPopoverInputProps extends Pick<ApFieldTextAreaProps, 'value' | 'onUpdate:value'> {
32
+ _parent?: HTMLElement;
33
+ onClose?: () => void;
34
+ }
@@ -0,0 +1,17 @@
1
+ import { BatchInputGroupPopoverInputProps } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ declare const _default: DefineComponent<__VLS_TypePropsToOption<BatchInputGroupPopoverInputProps>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
4
+ "update:value": (...args: any[]) => void;
5
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_TypePropsToOption<BatchInputGroupPopoverInputProps>>> & {
6
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
7
+ }, {}, {}>;
8
+ export default _default;
9
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
10
+ type __VLS_TypePropsToOption<T> = {
11
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
12
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
13
+ } : {
14
+ type: PropType<T[K]>;
15
+ required: true;
16
+ };
17
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };