@aplus-frontend/ui 0.0.1-beta.6 → 0.0.1-beta.7

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 (133) hide show
  1. package/es/index.mjs +59 -49
  2. package/es/src/ap-action/constant.d.ts +0 -0
  3. package/es/src/ap-action/group/index.vue.d.ts +38 -0
  4. package/es/src/ap-action/group/index.vue.mjs +64 -0
  5. package/es/src/ap-action/group/index.vue2.mjs +4 -0
  6. package/es/src/ap-action/index.d.ts +14 -0
  7. package/es/src/ap-action/index.mjs +17 -0
  8. package/es/src/ap-action/interface.d.ts +81 -0
  9. package/es/src/ap-action/item/index.vue.d.ts +44 -0
  10. package/es/src/ap-action/item/index.vue.mjs +49 -0
  11. package/es/src/ap-action/item/index.vue2.mjs +4 -0
  12. package/es/src/ap-action/item-dropdown/index.vue.d.ts +57 -0
  13. package/es/src/ap-action/item-dropdown/index.vue.mjs +92 -0
  14. package/es/src/ap-action/item-dropdown/index.vue2.mjs +4 -0
  15. package/es/src/ap-action/item-modal/index.vue.d.ts +41 -0
  16. package/es/src/ap-action/item-modal/index.vue.mjs +34 -0
  17. package/es/src/ap-action/item-modal/index.vue2.mjs +4 -0
  18. package/es/src/ap-action/item-popconfirm/index.vue.d.ts +343 -0
  19. package/es/src/ap-action/item-popconfirm/index.vue.mjs +37 -0
  20. package/es/src/ap-action/item-popconfirm/index.vue2.mjs +4 -0
  21. package/es/src/ap-action/style/item-dropdown.css +11 -0
  22. package/es/src/ap-action/style/item.css +28 -0
  23. package/es/src/ap-field/date/index.vue.d.ts +1 -1
  24. package/es/src/ap-field/date-range/index.vue.d.ts +1 -1
  25. package/es/src/ap-field/interface.d.ts +3 -2
  26. package/es/src/ap-field/number/index.vue.d.ts +1 -1
  27. package/es/src/ap-field/select/index.vue.d.ts +1 -1
  28. package/es/src/ap-field/switch/index.vue.d.ts +1 -1
  29. package/es/src/ap-field/switch/index.vue.mjs +68 -39
  30. package/es/src/ap-field/text/index.vue.d.ts +3 -3
  31. package/es/src/ap-field/text-area/index.vue.d.ts +2 -2
  32. package/es/src/ap-form/index.d.ts +76 -76
  33. package/es/src/base-button/index.d.ts +28 -28
  34. package/es/src/config-provider/config-provider.d.ts +4 -4
  35. package/es/src/config-provider/index.d.ts +12 -12
  36. package/es/src/count-down/index.d.ts +12 -12
  37. package/es/src/cropper/cropper-avatar.vue.d.ts +1 -1
  38. package/es/src/cropper/cropper-image.vue.d.ts +1 -1
  39. package/es/src/cropper/index.d.ts +42 -42
  40. package/es/src/description/description.vue.d.ts +1 -1
  41. package/es/src/description/index.d.ts +3 -3
  42. package/es/src/dropdown/dropdown.vue.d.ts +1 -1
  43. package/es/src/dropdown/index.d.ts +7 -7
  44. package/es/src/icon/index.d.ts +41 -41
  45. package/es/src/icon-picker/icon-picker.vue.d.ts +3 -3
  46. package/es/src/icon-picker/index.d.ts +45 -45
  47. package/es/src/index.d.ts +1 -0
  48. package/es/src/index.mjs +98 -88
  49. package/es/src/modal/basic.vue.d.ts +4 -3
  50. package/es/src/modal/basic.vue.mjs +53 -49
  51. package/es/src/modal/components/modal-footer.vue.d.ts +2 -2
  52. package/es/src/modal/components/modal.d.ts +2 -2
  53. package/es/src/modal/index.d.ts +10 -11
  54. package/es/src/modal/index.mjs +2 -3
  55. package/es/src/modal/props.mjs +1 -1
  56. package/es/src/modal/style/index.css +29 -30
  57. package/es/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
  58. package/es/src/pro-form/components/api-select.vue.d.ts +2 -2
  59. package/es/src/pro-form/components/api-transfer.vue.d.ts +1 -1
  60. package/es/src/pro-form/components/api-tree.vue.d.ts +1 -1
  61. package/es/src/pro-form/hooks/use-label-width.d.ts +8 -8
  62. package/es/src/pro-form/pro-form.vue.d.ts +1 -1
  63. package/es/src/strength-meter/index.d.ts +12 -12
  64. package/es/src/theme/ap-action/item-dropdown.css +11 -0
  65. package/es/src/theme/ap-action/item.css +28 -0
  66. package/es/src/theme/modal/index.css +29 -30
  67. package/lib/index.js +1 -1
  68. package/lib/src/ap-action/constant.d.ts +0 -0
  69. package/lib/src/ap-action/group/index.vue.d.ts +38 -0
  70. package/lib/src/ap-action/group/index.vue.js +1 -0
  71. package/lib/src/ap-action/group/index.vue2.js +1 -0
  72. package/lib/src/ap-action/index.d.ts +14 -0
  73. package/lib/src/ap-action/index.js +1 -0
  74. package/lib/src/ap-action/interface.d.ts +81 -0
  75. package/lib/src/ap-action/item/index.vue.d.ts +44 -0
  76. package/lib/src/ap-action/item/index.vue.js +1 -0
  77. package/lib/src/ap-action/item/index.vue2.js +1 -0
  78. package/lib/src/ap-action/item-dropdown/index.vue.d.ts +57 -0
  79. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -0
  80. package/lib/src/ap-action/item-dropdown/index.vue2.js +1 -0
  81. package/lib/src/ap-action/item-modal/index.vue.d.ts +41 -0
  82. package/lib/src/ap-action/item-modal/index.vue.js +1 -0
  83. package/lib/src/ap-action/item-modal/index.vue2.js +1 -0
  84. package/lib/src/ap-action/item-popconfirm/index.vue.d.ts +343 -0
  85. package/lib/src/ap-action/item-popconfirm/index.vue.js +1 -0
  86. package/lib/src/ap-action/item-popconfirm/index.vue2.js +1 -0
  87. package/lib/src/ap-action/style/item-dropdown.css +11 -0
  88. package/lib/src/ap-action/style/item.css +28 -0
  89. package/lib/src/ap-field/date/index.vue.d.ts +1 -1
  90. package/lib/src/ap-field/date-range/index.vue.d.ts +1 -1
  91. package/lib/src/ap-field/interface.d.ts +3 -2
  92. package/lib/src/ap-field/number/index.vue.d.ts +1 -1
  93. package/lib/src/ap-field/select/index.vue.d.ts +1 -1
  94. package/lib/src/ap-field/switch/index.vue.d.ts +1 -1
  95. package/lib/src/ap-field/switch/index.vue.js +1 -1
  96. package/lib/src/ap-field/text/index.vue.d.ts +3 -3
  97. package/lib/src/ap-field/text-area/index.vue.d.ts +2 -2
  98. package/lib/src/ap-form/index.d.ts +76 -76
  99. package/lib/src/base-button/index.d.ts +28 -28
  100. package/lib/src/config-provider/config-provider.d.ts +4 -4
  101. package/lib/src/config-provider/index.d.ts +12 -12
  102. package/lib/src/count-down/index.d.ts +12 -12
  103. package/lib/src/cropper/cropper-avatar.vue.d.ts +1 -1
  104. package/lib/src/cropper/cropper-image.vue.d.ts +1 -1
  105. package/lib/src/cropper/index.d.ts +42 -42
  106. package/lib/src/description/description.vue.d.ts +1 -1
  107. package/lib/src/description/index.d.ts +3 -3
  108. package/lib/src/dropdown/dropdown.vue.d.ts +1 -1
  109. package/lib/src/dropdown/index.d.ts +7 -7
  110. package/lib/src/icon/index.d.ts +41 -41
  111. package/lib/src/icon-picker/icon-picker.vue.d.ts +3 -3
  112. package/lib/src/icon-picker/index.d.ts +45 -45
  113. package/lib/src/index.d.ts +1 -0
  114. package/lib/src/index.js +1 -1
  115. package/lib/src/modal/basic.vue.d.ts +4 -3
  116. package/lib/src/modal/basic.vue.js +1 -1
  117. package/lib/src/modal/components/modal-footer.vue.d.ts +2 -2
  118. package/lib/src/modal/components/modal.d.ts +2 -2
  119. package/lib/src/modal/index.d.ts +10 -11
  120. package/lib/src/modal/index.js +1 -1
  121. package/lib/src/modal/props.js +1 -1
  122. package/lib/src/modal/style/index.css +29 -30
  123. package/lib/src/pro-form/components/api-radio-group.vue.d.ts +1 -1
  124. package/lib/src/pro-form/components/api-select.vue.d.ts +2 -2
  125. package/lib/src/pro-form/components/api-transfer.vue.d.ts +1 -1
  126. package/lib/src/pro-form/components/api-tree.vue.d.ts +1 -1
  127. package/lib/src/pro-form/hooks/use-label-width.d.ts +8 -8
  128. package/lib/src/pro-form/pro-form.vue.d.ts +1 -1
  129. package/lib/src/strength-meter/index.d.ts +12 -12
  130. package/lib/src/theme/ap-action/item-dropdown.css +11 -0
  131. package/lib/src/theme/ap-action/item.css +28 -0
  132. package/lib/src/theme/modal/index.css +29 -30
  133. package/package.json +3 -3
package/es/index.mjs CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as e from "./src/index.mjs";
2
2
  import { useMessage as l } from "./src/hooks/useMessage.mjs";
3
3
  import { useControllableValue as n } from "./src/hooks/useControllableValue.mjs";
4
- import { Icon as m, SvgIcon as x } from "./src/icon/index.mjs";
4
+ import { Icon as s, SvgIcon as d } from "./src/icon/index.mjs";
5
5
  import { configProviderProps as u } from "./src/config-provider/config-provider-props.mjs";
6
- import { configProviderContextKey as T, tableDefaultConfig as C } from "./src/config-provider/constants.mjs";
6
+ import { configProviderContextKey as A, tableDefaultConfig as T } from "./src/config-provider/constants.mjs";
7
7
  import { keysOf as S, provideGlobalConfig as F, useGlobalConfig as b } from "./src/config-provider/hooks/use-global-config.mjs";
8
- import { buildLocaleContext as v, buildTranslator as P, localeContextKey as B, translate as I, useLocale as R } from "./src/config-provider/hooks/use-locale.mjs";
9
- import { defaultNamespace as M, namespaceContextKey as h, useGetDerivedNamespace as G, useNamespace as k } from "./src/config-provider/hooks/use-namespace.mjs";
8
+ import { buildLocaleContext as g, buildTranslator as v, localeContextKey as P, translate as B, useLocale as R } from "./src/config-provider/hooks/use-locale.mjs";
9
+ import { defaultNamespace as M, namespaceContextKey as G, useGetDerivedNamespace as h, useNamespace as w } from "./src/config-provider/hooks/use-namespace.mjs";
10
10
  import { ConfigProvider as X } from "./src/config-provider/config-provider.mjs";
11
11
  import { APConfigProvider as N } from "./src/config-provider/index.mjs";
12
12
  import { Scrollbar as E } from "./src/scroll-bar/index.mjs";
@@ -16,16 +16,16 @@ import { default as $ } from "./src/locale/lang/zh-cn.mjs";
16
16
  import { default as q } from "./src/locale/lang/en.mjs";
17
17
  import { BasicArrow as Q, BasicHelp as U, BasicTitle as W } from "./src/basic/index.mjs";
18
18
  import { default as _ } from "./src/transition/collapse-transition.vue.mjs";
19
- import { ExpandTransition as eo, ExpandXTransition as ro, FadeTransition as to, ScaleRotateTransition as ao, ScaleTransition as po, ScrollXReverseTransition as fo, ScrollXTransition as lo, ScrollYReverseTransition as io, ScrollYTransition as no, SlideXReverseTransition as so, SlideXTransition as mo, SlideYReverseTransition as xo, SlideYTransition as uo } from "./src/transition/index.mjs";
20
- import { useDescription as To } from "./src/description/use-description.mjs";
21
- import { Description as Ao } from "./src/description/index.mjs";
19
+ import { ExpandTransition as eo, ExpandXTransition as ro, FadeTransition as to, ScaleRotateTransition as ao, ScaleTransition as po, ScrollXReverseTransition as fo, ScrollXTransition as lo, ScrollYReverseTransition as io, ScrollYTransition as no, SlideXReverseTransition as mo, SlideXTransition as so, SlideYReverseTransition as xo, SlideYTransition as uo } from "./src/transition/index.mjs";
20
+ import { useDescription as Ao } from "./src/description/use-description.mjs";
21
+ import { Description as Co } from "./src/description/index.mjs";
22
22
  import { useForm as Fo } from "./src/pro-form/hooks/use-form.mjs";
23
- import { isComponentFormSchema as go, isSlotFormSchema as vo } from "./src/pro-form/types/form.mjs";
24
- import { Field as Bo } from "./src/pro-form/index.mjs";
23
+ import { isComponentFormSchema as Io, isSlotFormSchema as go } from "./src/pro-form/types/form.mjs";
24
+ import { Field as Po } from "./src/pro-form/index.mjs";
25
25
  import { default as Ro } from "./src/pro-form/components/api-cascader.vue.mjs";
26
26
  import { default as Mo } from "./src/pro-form/components/api-radio-group.vue.mjs";
27
- import { default as Go } from "./src/pro-form/components/api-select.vue.mjs";
28
- import { default as wo } from "./src/pro-form/components/api-transfer.vue.mjs";
27
+ import { default as ho } from "./src/pro-form/components/api-select.vue.mjs";
28
+ import { default as ko } from "./src/pro-form/components/api-transfer.vue.mjs";
29
29
  import { default as yo } from "./src/pro-form/components/api-tree.vue.mjs";
30
30
  import { default as Yo } from "./src/pro-form/components/radio-button-group.vue.mjs";
31
31
  import { default as Ko } from "./src/pro-form/pro-form.vue.mjs";
@@ -39,17 +39,17 @@ import { useModal as _o, useModalInner as oe } from "./src/modal/hooks/use-modal
39
39
  import { BaseModal as re } from "./src/modal/index.mjs";
40
40
  import { CropperAvatar as ae, CropperImage as pe } from "./src/cropper/index.mjs";
41
41
  import { CountdownButton as le, CountdownInput as ie } from "./src/count-down/index.mjs";
42
- import { createPrompt as se } from "./src/prompt/index.mjs";
43
- import { Dropdown as xe } from "./src/dropdown/index.mjs";
42
+ import { createPrompt as me } from "./src/prompt/index.mjs";
43
+ import { Dropdown as de } from "./src/dropdown/index.mjs";
44
44
  import { default as ue } from "./src/pro-table/pro-table.vue.mjs";
45
- import { default as Te } from "./src/pro-table/components/table-action.vue.mjs";
46
- import { default as Ae } from "./src/pro-table/components/edit-table-header-icon.vue.mjs";
45
+ import { default as Ae } from "./src/pro-table/components/table-action.vue.mjs";
46
+ import { default as Ce } from "./src/pro-table/components/edit-table-header-icon.vue.mjs";
47
47
  import { default as Fe } from "./src/pro-table/components/table-image.vue.mjs";
48
- import { useTable as ge } from "./src/pro-table/hooks/use-table.mjs";
49
- import { ApForm as Pe, ApFormItem as Be, ApFormItemGroup as Ie } from "./src/ap-form/index.mjs";
48
+ import { useTable as Ie } from "./src/pro-table/hooks/use-table.mjs";
49
+ import { ApForm as ve, ApFormItem as Pe, ApFormItemGroup as Be } from "./src/ap-form/index.mjs";
50
50
  import { default as De } from "./src/ap-field/text/index.vue.mjs";
51
- import { default as he } from "./src/ap-field/checkbox/index.vue.mjs";
52
- import { default as ke } from "./src/ap-field/date/index.vue.mjs";
51
+ import { default as Ge } from "./src/ap-field/checkbox/index.vue.mjs";
52
+ import { default as we } from "./src/ap-field/date/index.vue.mjs";
53
53
  import { default as Xe } from "./src/ap-field/number/index.vue.mjs";
54
54
  import { default as Ne } from "./src/ap-field/radio/index.vue.mjs";
55
55
  import { default as Ee } from "./src/ap-field/switch/index.vue.mjs";
@@ -57,6 +57,11 @@ import { default as He } from "./src/ap-field/text-area/index.vue.mjs";
57
57
  import { default as ze } from "./src/ap-field/date-range/index.vue.mjs";
58
58
  import { default as Ve } from "./src/ap-field/select/index.vue.mjs";
59
59
  import { adminToken as je, aplusToken as qe } from "./src/design-token/index.mjs";
60
+ import { ApActionItem as Qe } from "./src/ap-action/index.mjs";
61
+ import { default as We } from "./src/ap-action/item-modal/index.vue.mjs";
62
+ import { default as _e } from "./src/ap-action/item-popconfirm/index.vue.mjs";
63
+ import { default as er } from "./src/ap-action/item-dropdown/index.vue.mjs";
64
+ import { default as tr } from "./src/ap-action/group/index.vue.mjs";
60
65
  const a = {
61
66
  install: (r) => {
62
67
  for (const t in e) {
@@ -67,8 +72,13 @@ const a = {
67
72
  };
68
73
  export {
69
74
  N as APConfigProvider,
70
- he as ApFieldCheckbox,
71
- ke as ApFieldDate,
75
+ tr as ApActionGroup,
76
+ Qe as ApActionItem,
77
+ er as ApActionItemDropdown,
78
+ We as ApActionItemModal,
79
+ _e as ApActionItemPopconfirm,
80
+ Ge as ApFieldCheckbox,
81
+ we as ApFieldDate,
72
82
  ze as ApFieldDateRange,
73
83
  Xe as ApFieldNumber,
74
84
  Ne as ApFieldRadio,
@@ -76,13 +86,13 @@ export {
76
86
  Ee as ApFieldSwitch,
77
87
  De as ApFieldText,
78
88
  He as ApFieldTextArea,
79
- Pe as ApForm,
80
- Be as ApFormItem,
81
- Ie as ApFormItemGroup,
89
+ ve as ApForm,
90
+ Pe as ApFormItem,
91
+ Be as ApFormItemGroup,
82
92
  Ro as ApiCascader,
83
93
  Mo as ApiRadioGroup,
84
- Go as ApiSelect,
85
- wo as ApiTransfer,
94
+ ho as ApiSelect,
95
+ ko as ApiTransfer,
86
96
  yo as ApiTree,
87
97
  Lo as ApiTreeSelect,
88
98
  qo as BaseButton,
@@ -97,14 +107,14 @@ export {
97
107
  ie as CountdownInput,
98
108
  ae as CropperAvatar,
99
109
  pe as CropperImage,
100
- Ao as Description,
101
- xe as Dropdown,
102
- Ae as EditTableHeaderIcon,
110
+ Co as Description,
111
+ de as Dropdown,
112
+ Ce as EditTableHeaderIcon,
103
113
  eo as ExpandTransition,
104
114
  ro as ExpandXTransition,
105
115
  to as FadeTransition,
106
- Bo as Field,
107
- m as Icon,
116
+ Po as Field,
117
+ s as Icon,
108
118
  O as IconPicker,
109
119
  Oo as ModalButton,
110
120
  $o as PopConfirmButton,
@@ -119,43 +129,43 @@ export {
119
129
  io as ScrollYReverseTransition,
120
130
  no as ScrollYTransition,
121
131
  E as Scrollbar,
122
- so as SlideXReverseTransition,
123
- mo as SlideXTransition,
132
+ mo as SlideXReverseTransition,
133
+ so as SlideXTransition,
124
134
  xo as SlideYReverseTransition,
125
135
  uo as SlideYTransition,
126
136
  Qo as StrengthMeter,
127
- x as SvgIcon,
128
- Te as TableAction,
137
+ d as SvgIcon,
138
+ Ae as TableAction,
129
139
  Fe as TableImg,
130
140
  je as adminToken,
131
141
  qe as aplusToken,
132
- v as buildLocaleContext,
133
- P as buildTranslator,
134
- T as configProviderContextKey,
142
+ g as buildLocaleContext,
143
+ v as buildTranslator,
144
+ A as configProviderContextKey,
135
145
  u as configProviderProps,
136
- se as createPrompt,
146
+ me as createPrompt,
137
147
  a as default,
138
148
  M as defaultNamespace,
139
149
  q as en,
140
- go as isComponentFormSchema,
141
- vo as isSlotFormSchema,
150
+ Io as isComponentFormSchema,
151
+ go as isSlotFormSchema,
142
152
  S as keysOf,
143
- B as localeContextKey,
144
- h as namespaceContextKey,
153
+ P as localeContextKey,
154
+ G as namespaceContextKey,
145
155
  F as provideGlobalConfig,
146
- C as tableDefaultConfig,
147
- I as translate,
156
+ T as tableDefaultConfig,
157
+ B as translate,
148
158
  n as useControllableValue,
149
- To as useDescription,
159
+ Ao as useDescription,
150
160
  Fo as useForm,
151
- G as useGetDerivedNamespace,
161
+ h as useGetDerivedNamespace,
152
162
  b as useGlobalConfig,
153
163
  R as useLocale,
154
164
  l as useMessage,
155
165
  _o as useModal,
156
166
  Wo as useModalContext,
157
167
  oe as useModalInner,
158
- k as useNamespace,
159
- ge as useTable,
168
+ w as useNamespace,
169
+ Ie as useTable,
160
170
  $ as zhCn
161
171
  };
File without changes
@@ -0,0 +1,38 @@
1
+ import { ApActionGroupProps, GroupActionTypes } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ import { Trigger } from 'ant-design-vue/es/dropdown/props';
4
+
5
+ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionGroupProps>, {
6
+ count: number;
7
+ trigger: () => string[];
8
+ placement: string;
9
+ actions: () => never[];
10
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionGroupProps>, {
11
+ count: number;
12
+ trigger: () => string[];
13
+ placement: string;
14
+ actions: () => never[];
15
+ }>>>, {
16
+ trigger: Trigger | Trigger[];
17
+ placement: "top" | "bottom" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "topCenter" | "bottomCenter";
18
+ actions: GroupActionTypes[];
19
+ count: number;
20
+ }, {}>;
21
+ export default _default;
22
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
23
+ type __VLS_TypePropsToRuntimeProps<T> = {
24
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
25
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
26
+ } : {
27
+ type: PropType<T[K]>;
28
+ required: true;
29
+ };
30
+ };
31
+ type __VLS_WithDefaults<P, D> = {
32
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
33
+ default: D[K];
34
+ }> : P[K];
35
+ };
36
+ type __VLS_Prettify<T> = {
37
+ [K in keyof T]: T[K];
38
+ } & {};
@@ -0,0 +1,64 @@
1
+ import { defineComponent as d, computed as i, openBlock as t, createBlock as r, unref as s, withCtx as u, createElementBlock as l, Fragment as f, renderList as h, mergeProps as n, createVNode as k, createCommentVNode as A } from "vue";
2
+ import { Space as w } from "ant-design-vue";
3
+ import { MoreOutlined as y } from "@ant-design/icons-vue";
4
+ import v from "../item/index.vue.mjs";
5
+ import $ from "../item-modal/index.vue.mjs";
6
+ import B from "../item-popconfirm/index.vue.mjs";
7
+ import m from "../item-dropdown/index.vue.mjs";
8
+ const z = /* @__PURE__ */ d({
9
+ name: "ApActionGroup",
10
+ __name: "index",
11
+ props: {
12
+ count: { default: 3 },
13
+ trigger: { default: () => ["hover"] },
14
+ placement: { default: "bottomRight" },
15
+ actions: { default: () => [] }
16
+ },
17
+ setup(p) {
18
+ const e = p, _ = i(() => e.actions.length > e.count), c = i(() => e.actions.length <= e.count ? {
19
+ showActions: e.actions,
20
+ menuActions: []
21
+ } : {
22
+ showActions: e.actions.slice(0, e.count - 1),
23
+ menuActions: e.actions.slice(e.count - 1)
24
+ });
25
+ return (a, C) => (t(), r(s(w), {
26
+ size: 16,
27
+ align: "center"
28
+ }, {
29
+ default: u(() => [
30
+ (t(!0), l(f, null, h(c.value.showActions, (o, g) => (t(), l(f, { key: g }, [
31
+ o.actions ? (t(), r(m, n({
32
+ key: 0,
33
+ ref_for: !0
34
+ }, o), null, 16)) : o.modalProps ? (t(), r($, n({
35
+ key: 1,
36
+ ref_for: !0
37
+ }, o), null, 16)) : o.popconfirmProps ? (t(), r(B, n({
38
+ key: 2,
39
+ ref_for: !0
40
+ }, o), null, 16)) : (t(), r(v, n({
41
+ key: 3,
42
+ ref_for: !0
43
+ }, o), null, 16))
44
+ ], 64))), 128)),
45
+ _.value ? (t(), r(m, {
46
+ key: 0,
47
+ actions: c.value.menuActions,
48
+ "show-icon": !1,
49
+ placement: a.placement,
50
+ trigger: a.trigger
51
+ }, {
52
+ default: u(() => [
53
+ k(s(y), { rotate: 90 })
54
+ ]),
55
+ _: 1
56
+ }, 8, ["actions", "placement", "trigger"])) : A("", !0)
57
+ ]),
58
+ _: 1
59
+ }));
60
+ }
61
+ });
62
+ export {
63
+ z as default
64
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,14 @@
1
+ import { default as _ApActionItem } from './item/index.vue';
2
+ import { default as ApActionItemDropdown } from './item-dropdown/index.vue';
3
+ import { default as ApActionItemModal } from './item-modal/index.vue';
4
+ import { default as ApActionItemPopconfirm } from './item-popconfirm/index.vue';
5
+ import { default as ApActionGroup } from './group/index.vue';
6
+
7
+ type ApActionItemTypes = typeof _ApActionItem & {
8
+ Dropdown: typeof ApActionItemDropdown;
9
+ Modal: typeof ApActionItemModal;
10
+ Popconfirm: typeof ApActionItemPopconfirm;
11
+ };
12
+ declare const ApActionItem: ApActionItemTypes;
13
+ export * from './interface';
14
+ export { ApActionItem, ApActionItemModal, ApActionItemPopconfirm, ApActionItemDropdown, ApActionGroup };
@@ -0,0 +1,17 @@
1
+ import m from "./item/index.vue.mjs";
2
+ import i from "./item-dropdown/index.vue.mjs";
3
+ import t from "./item-modal/index.vue.mjs";
4
+ import p from "./item-popconfirm/index.vue.mjs";
5
+ import "vue";
6
+ import "ant-design-vue";
7
+ import "@ant-design/icons-vue";
8
+ const o = m;
9
+ o.Dropdown = i;
10
+ o.Modal = t;
11
+ o.Popconfirm = p;
12
+ export {
13
+ o as ApActionItem,
14
+ i as ApActionItemDropdown,
15
+ t as ApActionItemModal,
16
+ p as ApActionItemPopconfirm
17
+ };
@@ -0,0 +1,81 @@
1
+ import { DropdownProps, ModalFuncProps, PopconfirmProps } from 'ant-design-vue';
2
+
3
+ export type ActionColor = 'primary' | 'success' | 'error' | 'warn';
4
+ export type ApActionItemProps = {
5
+ /**
6
+ * 文本
7
+ */
8
+ text?: string;
9
+ /**
10
+ * 预定义文本颜色
11
+ */
12
+ color?: ActionColor;
13
+ /**
14
+ * 是否禁用
15
+ */
16
+ disabled?: boolean;
17
+ /**
18
+ * 是否可见
19
+ */
20
+ visible?: boolean;
21
+ /**
22
+ * 点击时的动作,支持异步
23
+ * @param e
24
+ * @returns
25
+ */
26
+ onAction?: (e: MouseEvent) => Promise<any>;
27
+ /**
28
+ * 基础点击事件
29
+ * @param e
30
+ * @returns
31
+ */
32
+ onClick?: (e: MouseEvent) => void;
33
+ /**
34
+ * 是否显示loading效果
35
+ */
36
+ loading?: boolean;
37
+ };
38
+ export type MixedActionTypes = ApActionItemProps | ApActionItemModalProps | ApActionItemPopconfirmProps;
39
+ export type GroupActionTypes = MixedActionTypes | ApActionItemDropdownProps;
40
+ export type ApActionItemDropdownProps = {
41
+ /**
42
+ * 触发下拉的行为
43
+ */
44
+ trigger?: DropdownProps['trigger'];
45
+ /**
46
+ * 菜单弹出的位置
47
+ */
48
+ placement?: DropdownProps['placement'];
49
+ /**
50
+ * 下拉菜单中的行为项配置
51
+ */
52
+ actions?: MixedActionTypes[];
53
+ /**
54
+ * 是否显示向下的箭头
55
+ */
56
+ showIcon?: boolean;
57
+ } & Omit<ApActionItemProps, 'onAction'>;
58
+ export type ApActionGroupProps = {
59
+ count?: number;
60
+ /**
61
+ * 触发下拉的行为
62
+ */
63
+ trigger?: DropdownProps['trigger'];
64
+ /**
65
+ * 菜单弹出的位置
66
+ */
67
+ placement?: DropdownProps['placement'];
68
+ /**
69
+ * 菜单项配置
70
+ */
71
+ actions?: GroupActionTypes[];
72
+ };
73
+ export type ApActionItemModalProps = ApActionItemProps & {
74
+ /**
75
+ * 对话框的具体配置
76
+ */
77
+ modalProps?: Omit<ModalFuncProps, 'type'>;
78
+ };
79
+ export type ApActionItemPopconfirmProps = ApActionItemProps & {
80
+ popconfirmProps?: PopconfirmProps;
81
+ };
@@ -0,0 +1,44 @@
1
+ import { ApActionItemProps, ActionColor } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+
4
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionItemProps>, {
5
+ color: string;
6
+ disabled: boolean;
7
+ visible: boolean;
8
+ loading: boolean;
9
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionItemProps>, {
10
+ color: string;
11
+ disabled: boolean;
12
+ visible: boolean;
13
+ loading: boolean;
14
+ }>>>, {
15
+ color: ActionColor;
16
+ disabled: boolean;
17
+ visible: boolean;
18
+ loading: boolean;
19
+ }, {}>, {
20
+ default?(_: {}): any;
21
+ }>;
22
+ export default _default;
23
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
24
+ type __VLS_TypePropsToRuntimeProps<T> = {
25
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
26
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
27
+ } : {
28
+ type: PropType<T[K]>;
29
+ required: true;
30
+ };
31
+ };
32
+ type __VLS_WithDefaults<P, D> = {
33
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
34
+ default: D[K];
35
+ }> : P[K];
36
+ };
37
+ type __VLS_Prettify<T> = {
38
+ [K in keyof T]: T[K];
39
+ } & {};
40
+ type __VLS_WithTemplateSlots<T, S> = T & {
41
+ new (): {
42
+ $slots: S;
43
+ };
44
+ };
@@ -0,0 +1,49 @@
1
+ import { defineComponent as p, ref as g, computed as r, unref as i, openBlock as s, createElementBlock as k, normalizeClass as C, createBlock as y, createCommentVNode as c, renderSlot as b, createTextVNode as v, toDisplayString as B } from "vue";
2
+ import "../../config-provider/index.mjs";
3
+ import x from "ant-design-vue/es/button/LoadingIcon";
4
+ import "../style/item.css";
5
+ import { useNamespace as A } from "../../config-provider/hooks/use-namespace.mjs";
6
+ const S = /* @__PURE__ */ p({
7
+ name: "ApActionItem",
8
+ __name: "index",
9
+ props: {
10
+ text: {},
11
+ color: { default: "primary" },
12
+ disabled: { type: Boolean, default: !1 },
13
+ visible: { type: Boolean, default: !0 },
14
+ onAction: {},
15
+ onClick: {},
16
+ loading: { type: Boolean, default: !1 }
17
+ },
18
+ setup(u) {
19
+ const e = u, { b: d, m: t } = A("action-item"), n = g(!1);
20
+ function f(o) {
21
+ var a;
22
+ i(l) || ((a = e.onClick) == null || a.call(e, o), e.onAction && (n.value = !0, e.onAction(o).finally(() => n.value = !1)));
23
+ }
24
+ const l = r(() => e.loading || i(n)), m = r(() => [
25
+ d(),
26
+ t(e.color),
27
+ e.disabled ? t("disabled") : null,
28
+ l.value ? t("loading") : null
29
+ ].filter(Boolean));
30
+ return (o, a) => o.visible ? (s(), k("span", {
31
+ key: 0,
32
+ onClick: f,
33
+ class: C(m.value)
34
+ }, [
35
+ l.value ? (s(), y(i(x), {
36
+ key: 0,
37
+ prefixCls: "btn",
38
+ existIcon: !1,
39
+ loading: ""
40
+ })) : c("", !0),
41
+ b(o.$slots, "default", {}, () => [
42
+ v(B(o.text || ""), 1)
43
+ ])
44
+ ], 2)) : c("", !0);
45
+ }
46
+ });
47
+ export {
48
+ S as default
49
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./index.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,57 @@
1
+ import { ApActionItemDropdownProps, ActionColor, MixedActionTypes } from '../interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ import { Trigger } from 'ant-design-vue/es/dropdown/props';
4
+
5
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionItemDropdownProps>, {
6
+ color: string;
7
+ disabled: boolean;
8
+ visible: boolean;
9
+ loading: boolean;
10
+ trigger: () => string[];
11
+ placement: string;
12
+ actions: () => never[];
13
+ showIcon: boolean;
14
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApActionItemDropdownProps>, {
15
+ color: string;
16
+ disabled: boolean;
17
+ visible: boolean;
18
+ loading: boolean;
19
+ trigger: () => string[];
20
+ placement: string;
21
+ actions: () => never[];
22
+ showIcon: boolean;
23
+ }>>>, {
24
+ color: ActionColor;
25
+ disabled: boolean;
26
+ visible: boolean;
27
+ loading: boolean;
28
+ trigger: Trigger | Trigger[];
29
+ placement: "top" | "bottom" | "bottomLeft" | "bottomRight" | "topLeft" | "topRight" | "topCenter" | "bottomCenter";
30
+ showIcon: boolean;
31
+ actions: MixedActionTypes[];
32
+ }, {}>, {
33
+ default?(_: {}): any;
34
+ }>;
35
+ export default _default;
36
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
37
+ type __VLS_TypePropsToRuntimeProps<T> = {
38
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
39
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
40
+ } : {
41
+ type: PropType<T[K]>;
42
+ required: true;
43
+ };
44
+ };
45
+ type __VLS_WithDefaults<P, D> = {
46
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
47
+ default: D[K];
48
+ }> : P[K];
49
+ };
50
+ type __VLS_Prettify<T> = {
51
+ [K in keyof T]: T[K];
52
+ } & {};
53
+ type __VLS_WithTemplateSlots<T, S> = T & {
54
+ new (): {
55
+ $slots: S;
56
+ };
57
+ };
@@ -0,0 +1,92 @@
1
+ import { defineComponent as _, ref as k, computed as w, openBlock as t, createBlock as l, unref as r, withCtx as n, createVNode as i, createElementBlock as v, Fragment as B, renderList as A, normalizeClass as s, mergeProps as f, createElementVNode as C, normalizeProps as P, guardReactiveProps as D, renderSlot as I, createCommentVNode as N } from "vue";
2
+ import { Dropdown as $, Menu as b, MenuItem as h } from "ant-design-vue";
3
+ import { DownOutlined as V } from "@ant-design/icons-vue";
4
+ import c from "../item/index.vue.mjs";
5
+ import z from "../item-modal/index.vue.mjs";
6
+ import E from "../item-popconfirm/index.vue.mjs";
7
+ import "../../config-provider/index.mjs";
8
+ import { omit as L } from "lodash-unified";
9
+ import "../style/item-dropdown.css";
10
+ import { useNamespace as M } from "../../config-provider/hooks/use-namespace.mjs";
11
+ const J = /* @__PURE__ */ _({
12
+ name: "ApActionItemDropDown",
13
+ __name: "index",
14
+ props: {
15
+ trigger: { default: () => ["hover"] },
16
+ placement: { default: "bottomLeft" },
17
+ actions: { default: () => [] },
18
+ showIcon: { type: Boolean, default: !0 },
19
+ text: {},
20
+ color: { default: "primary" },
21
+ disabled: { type: Boolean, default: !1 },
22
+ visible: { type: Boolean, default: !0 },
23
+ onClick: {},
24
+ loading: { type: Boolean, default: !1 }
25
+ },
26
+ setup(d) {
27
+ const u = d, m = k(!1), { e: p } = M("action-item-dropdown"), g = w(() => u.actions.map((o) => ({
28
+ ...o,
29
+ onAction: async (a) => {
30
+ var e;
31
+ try {
32
+ await ((e = o.onAction) == null ? void 0 : e.call(o, a));
33
+ } finally {
34
+ m.value = !1;
35
+ }
36
+ }
37
+ })));
38
+ return (o, a) => (t(), l(r($), {
39
+ open: m.value,
40
+ "onUpdate:open": a[0] || (a[0] = (e) => m.value = e),
41
+ trigger: o.trigger,
42
+ placement: o.placement
43
+ }, {
44
+ overlay: n(() => [
45
+ i(r(b), null, {
46
+ default: n(() => [
47
+ (t(!0), v(B, null, A(g.value, (e, y) => (t(), l(r(h), {
48
+ key: y,
49
+ class: s(r(p)("item"))
50
+ }, {
51
+ default: n(() => [
52
+ e.modalProps ? (t(), l(z, f({
53
+ key: 0,
54
+ ref_for: !0
55
+ }, e), null, 16)) : e.popconfirmProps ? (t(), l(E, f({
56
+ key: 1,
57
+ ref_for: !0
58
+ }, e), null, 16)) : (t(), l(c, f({
59
+ key: 2,
60
+ ref_for: !0
61
+ }, e), null, 16))
62
+ ]),
63
+ _: 2
64
+ }, 1032, ["class"]))), 128))
65
+ ]),
66
+ _: 1
67
+ })
68
+ ]),
69
+ default: n(() => [
70
+ C("span", {
71
+ class: s(r(p)("wrapper"))
72
+ }, [
73
+ i(c, P(D(r(L)(u, ["actions", "trigger", "placement"]))), {
74
+ default: n(() => [
75
+ I(o.$slots, "default")
76
+ ]),
77
+ _: 3
78
+ }, 16),
79
+ o.showIcon ? (t(), l(r(V), {
80
+ key: 0,
81
+ class: s(r(p)("icon")),
82
+ style: { color: "#0070ff" }
83
+ }, null, 8, ["class"])) : N("", !0)
84
+ ], 2)
85
+ ]),
86
+ _: 3
87
+ }, 8, ["open", "trigger", "placement"]));
88
+ }
89
+ });
90
+ export {
91
+ J as default
92
+ };