@aplus-frontend/ui 0.1.36 → 0.1.37

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.
package/es/index.mjs CHANGED
@@ -5,7 +5,7 @@ import { configProviderProps as x } from "./src/config-provider/config-provider-
5
5
  import { configProviderContextKey as n, tableDefaultConfig as i } from "./src/config-provider/constants.mjs";
6
6
  import { keysOf as c, provideGlobalConfig as T, useGlobalConfig as F } from "./src/config-provider/hooks/use-global-config.mjs";
7
7
  import { buildLocaleContext as b, buildTranslator as S, localeContextKey as I, translate as g, useLocale as D } from "./src/config-provider/hooks/use-locale.mjs";
8
- import { defaultNamespace as P, namespaceContextKey as M, useGetDerivedNamespace as R, useNamespace as B } from "./src/config-provider/hooks/use-namespace.mjs";
8
+ import { defaultNamespace as P, namespaceContextKey as M, useGetDerivedNamespace as B, useNamespace as R } from "./src/config-provider/hooks/use-namespace.mjs";
9
9
  import { ConfigProvider as v, globalConfigCached as w } from "./src/config-provider/config-provider.mjs";
10
10
  import { APConfigProvider as k } from "./src/config-provider/index.mjs";
11
11
  import { Scrollbar as N } from "./src/scroll-bar/index.mjs";
@@ -23,7 +23,7 @@ import { useForm as Ce } from "./src/pro-form/hooks/use-form.mjs";
23
23
  import { isComponentFormSchema as Se, isSlotFormSchema as Ie } from "./src/pro-form/types/form.mjs";
24
24
  import { Field as De } from "./src/pro-form/index.mjs";
25
25
  import { default as Pe } from "./src/pro-form/components/api-cascader.vue.mjs";
26
- import { default as Re } from "./src/pro-form/components/api-radio-group.vue.mjs";
26
+ import { default as Be } from "./src/pro-form/components/api-radio-group.vue.mjs";
27
27
  import { default as Ge } from "./src/pro-form/components/api-select.vue.mjs";
28
28
  import { default as we } from "./src/pro-form/components/api-transfer.vue.mjs";
29
29
  import { default as ke } from "./src/pro-form/components/api-tree.vue.mjs";
@@ -48,7 +48,7 @@ import { default as bo } from "./src/pro-table/components/table-action.vue.mjs";
48
48
  import { default as Io } from "./src/pro-table/components/edit-table-header-icon.vue.mjs";
49
49
  import { default as Do } from "./src/pro-table/components/table-image.vue.mjs";
50
50
  import { useTable as Po } from "./src/pro-table/hooks/use-table.mjs";
51
- import { ApFormItemText as Ro } from "./src/ap-form/items/text/index.mjs";
51
+ import { ApFormItemText as Bo } from "./src/ap-form/items/text/index.mjs";
52
52
  import { default as Go } from "./src/ap-form/items/text-area/index.vue.mjs";
53
53
  import { default as wo } from "./src/ap-form/items/number/index.vue.mjs";
54
54
  import { default as ko } from "./src/ap-form/items/date/index.vue.mjs";
@@ -75,7 +75,7 @@ import { default as br } from "./src/ap-field/radio/index.vue.mjs";
75
75
  import { default as Ir } from "./src/ap-field/switch/index.vue.mjs";
76
76
  import { default as Dr } from "./src/ap-field/text-area/index.vue.mjs";
77
77
  import { default as Pr } from "./src/ap-field/date-range/index.vue.mjs";
78
- import { default as Rr } from "./src/ap-field/select/index.vue.mjs";
78
+ import { default as Br } from "./src/ap-field/select/index.vue.mjs";
79
79
  import { default as Gr } from "./src/ap-field/text/password.vue.mjs";
80
80
  import { default as wr } from "./src/ap-field/slider/index.vue.mjs";
81
81
  import { default as kr } from "./src/ap-field/segmented/index.vue.mjs";
@@ -101,7 +101,7 @@ import { default as bt } from "./src/ap-upload/apUpload.vue.mjs";
101
101
  import { ApDownLoadNeedNameKeyDefault as It } from "./src/ap-download/interface.mjs";
102
102
  import { default as Dt } from "./src/ap-download/ap-download.vue.mjs";
103
103
  import { CheckCard as Pt } from "./src/check-card/index.mjs";
104
- import { default as Rt } from "./src/check-card/group.vue.mjs";
104
+ import { default as Bt } from "./src/check-card/group.vue.mjs";
105
105
  import { ApModal as Gt } from "./src/ap-modal/index.mjs";
106
106
  import { default as wt } from "./src/ap-list/index.vue.mjs";
107
107
  import { default as kt } from "./src/ap-button/ap-button.vue.mjs";
@@ -112,15 +112,15 @@ import { handleExportDownload as Ot } from "./src/business/ap-export-group/handl
112
112
  import { default as zt } from "./src/business/ap-table-modal/index.mjs";
113
113
  import { useTableModal as Vt } from "./src/business/ap-table-modal/hooks/use-table-modal.mjs";
114
114
  import { useTableSelectModal as jt } from "./src/business/ap-table-modal/hooks/use-table-select-modal.mjs";
115
- import { ApAttachment as Jt, ApBatchAction as Qt, ApBatchActionGroup as Zt, ApCard as _t, ApExpandAlert as ea, ApExportGroup as oa, ApImage as ra, ApInputRadio as ta, ApLabel as aa, ApLabelGroup as pa, ApLadder as fa, ApSelectLayout as ma, ApStatus as la, ApStatusGroup as sa, ApTitle as da } from "./src/business/index.mjs";
116
- import { ApTransformDataHelper as ua } from "./src/utils/ap-trans-data/index.mjs";
117
- import { useTablePaging as ia } from "./src/ap-table/hooks/use-table-paging.mjs";
118
- import { default as ca } from "./src/ap-table/ap-table.vue.mjs";
119
- import { default as Fa } from "./src/editable-table/index.vue.mjs";
120
- import { default as ba } from "./src/editable-table/form-item.vue.mjs";
121
- import { default as Ia } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
122
- import { useMessage as Da } from "./src/hooks/useMessage.mjs";
123
- import { useControllableValue as Pa } from "./src/hooks/useControllableValue.mjs";
115
+ import { ApAttachment as Jt, ApBatchAction as Qt, ApBatchActionGroup as Zt, ApButtonGroup as _t, ApCard as ea, ApExpandAlert as oa, ApExportGroup as ra, ApImage as ta, ApInputRadio as aa, ApLabel as pa, ApLabelGroup as fa, ApLadder as ma, ApSelectLayout as la, ApStatus as sa, ApStatusGroup as da, ApTitle as xa } from "./src/business/index.mjs";
116
+ import { ApTransformDataHelper as na } from "./src/utils/ap-trans-data/index.mjs";
117
+ import { useTablePaging as Aa } from "./src/ap-table/hooks/use-table-paging.mjs";
118
+ import { default as Ta } from "./src/ap-table/ap-table.vue.mjs";
119
+ import { default as Ca } from "./src/editable-table/index.vue.mjs";
120
+ import { default as Sa } from "./src/editable-table/form-item.vue.mjs";
121
+ import { default as ga } from "./src/ap-descriptions/ap-descriptions.vue.mjs";
122
+ import { useMessage as ha } from "./src/hooks/useMessage.mjs";
123
+ import { useControllableValue as Ma } from "./src/hooks/useControllableValue.mjs";
124
124
  const p = {
125
125
  install: (r) => {
126
126
  for (const t in o) {
@@ -141,14 +141,15 @@ export {
141
141
  Qt as ApBatchAction,
142
142
  Zt as ApBatchActionGroup,
143
143
  kt as ApButton,
144
- _t as ApCard,
144
+ _t as ApButtonGroup,
145
+ ea as ApCard,
145
146
  ot as ApCustomColumn,
146
147
  tt as ApCustomSelect,
147
- Ia as ApDescriptions,
148
+ ga as ApDescriptions,
148
149
  It as ApDownLoadNeedNameKeyDefault,
149
150
  Dt as ApDownload,
150
- ea as ApExpandAlert,
151
- oa as ApExportGroup,
151
+ oa as ApExpandAlert,
152
+ ra as ApExportGroup,
152
153
  dr as ApField,
153
154
  ir as ApFieldCheckbox,
154
155
  cr as ApFieldDate,
@@ -158,7 +159,7 @@ export {
158
159
  br as ApFieldRadio,
159
160
  Nr as ApFieldRate,
160
161
  kr as ApFieldSegmented,
161
- Rr as ApFieldSelect,
162
+ Br as ApFieldSelect,
162
163
  wr as ApFieldSlider,
163
164
  Ir as ApFieldSwitch,
164
165
  ur as ApFieldText,
@@ -174,33 +175,33 @@ export {
174
175
  Ko as ApFormItemRadio,
175
176
  Yo as ApFormItemSelect,
176
177
  Oo as ApFormItemSwitch,
177
- Ro as ApFormItemText,
178
+ Bo as ApFormItemText,
178
179
  Go as ApFormItemTextArea,
179
180
  Vo as ApFormItemTextPassword,
180
181
  er as ApFormList,
181
182
  ar as ApFormModalForm,
182
183
  rr as ApFormSearchForm,
183
184
  lr as ApFormSet,
184
- ra as ApImage,
185
+ ta as ApImage,
185
186
  ct as ApInfoLayout,
186
- ta as ApInputRadio,
187
- aa as ApLabel,
188
- pa as ApLabelGroup,
189
- fa as ApLadder,
187
+ aa as ApInputRadio,
188
+ pa as ApLabel,
189
+ fa as ApLabelGroup,
190
+ ma as ApLadder,
190
191
  wt as ApList,
191
192
  Gt as ApModal,
192
- ma as ApSelectLayout,
193
- la as ApStatus,
194
- sa as ApStatusGroup,
195
- ca as ApTable,
193
+ la as ApSelectLayout,
194
+ sa as ApStatus,
195
+ da as ApStatusGroup,
196
+ Ta as ApTable,
196
197
  zt as ApTableModal,
197
198
  ut as ApTag,
198
199
  it as ApTagGroup,
199
- da as ApTitle,
200
- ua as ApTransformDataHelper,
200
+ xa as ApTitle,
201
+ na as ApTransformDataHelper,
201
202
  bt as ApUpload,
202
203
  Pe as ApiCascader,
203
- Re as ApiRadioGroup,
204
+ Be as ApiRadioGroup,
204
205
  Ge as ApiSelect,
205
206
  we as ApiTransfer,
206
207
  ke as ApiTree,
@@ -211,7 +212,7 @@ export {
211
212
  j as BasicHelp,
212
213
  q as BasicTitle,
213
214
  Pt as CheckCard,
214
- Rt as CheckCardGroup,
215
+ Bt as CheckCardGroup,
215
216
  K as CollapseContainer,
216
217
  Q as CollapseTransition,
217
218
  v as ConfigProvider,
@@ -223,8 +224,8 @@ export {
223
224
  pt as DictCode,
224
225
  co as Dropdown,
225
226
  Io as EditTableHeaderIcon,
226
- Fa as EditableTable,
227
- ba as EditableTableFormItem,
227
+ Ca as EditableTable,
228
+ Sa as EditableTableFormItem,
228
229
  _ as ExpandTransition,
229
230
  ee as ExpandXTransition,
230
231
  oe as FadeTransition,
@@ -281,21 +282,21 @@ export {
281
282
  g as translate,
282
283
  _r as useCacheColumnSetting,
283
284
  Te as useComponentRegister,
284
- Pa as useControllableValue,
285
+ Ma as useControllableValue,
285
286
  ne as useDescription,
286
287
  Ce as useForm,
287
- R as useGetDerivedNamespace,
288
+ B as useGetDerivedNamespace,
288
289
  F as useGlobalConfig,
289
290
  D as useLocale,
290
- Da as useMessage,
291
+ ha as useMessage,
291
292
  ro as useModal,
292
293
  eo as useModalContext,
293
294
  to as useModalInner,
294
- B as useNamespace,
295
+ R as useNamespace,
295
296
  Kt as usePageListApTable,
296
297
  Po as useTable,
297
298
  Vt as useTableModal,
298
- ia as useTablePaging,
299
+ Aa as useTablePaging,
299
300
  Yt as useTableRefresh,
300
301
  jt as useTableSelectModal,
301
302
  W as zhCn
@@ -1,5 +1,5 @@
1
- import { isVNode as m, createVNode as u, mergeProps as f, cloneVNode as T, Fragment as b } from "vue";
2
- import { isObject as c, isArray as p, isUndefined as h, isFunction as y, omit as g, isBoolean as j, isString as a } from "lodash-unified";
1
+ import { isVNode as m, createVNode as u, mergeProps as a, cloneVNode as T, Fragment as b } from "vue";
2
+ import { isObject as c, isArray as f, isUndefined as h, isFunction as p, omit as y, isBoolean as g, isString as j } from "lodash-unified";
3
3
  import { apTableRenderItemMap as F, apTableFormItemMap as O } from "./constants.mjs";
4
4
  import { isType as E } from "@fruits-chain/utils";
5
5
  import "../ap-form/index.mjs";
@@ -26,7 +26,7 @@ const v = (t, e, n) => {
26
26
  }
27
27
  case "multiple":
28
28
  case "multipleNumber":
29
- return p(e) ? e : [e];
29
+ return f(e) ? e : [e];
30
30
  case "boolean":
31
31
  return e;
32
32
  case "object":
@@ -36,7 +36,7 @@ const v = (t, e, n) => {
36
36
  }
37
37
  };
38
38
  function J(t) {
39
- return p(t) ? t.join(".") : t;
39
+ return f(t) ? t.join(".") : t;
40
40
  }
41
41
  function P(t) {
42
42
  const e = Object.prototype.toString.call(t).match(/^\[object (.*)\]$/)[1].toLowerCase();
@@ -75,7 +75,7 @@ const V = (t) => P(t) === "map" ? t : new Map(Object.entries(t || {})), d = (t)
75
75
  return t("ap.common.inputText");
76
76
  };
77
77
  function w(t, e) {
78
- return !t || !y(t) ? t : t(e);
78
+ return !t || !p(t) ? t : t(e);
79
79
  }
80
80
  function U(t) {
81
81
  let e = t.valueType || "text";
@@ -85,7 +85,7 @@ function z(t, e, n, r) {
85
85
  var s;
86
86
  const o = F[t];
87
87
  if (o)
88
- return u(o, f(e, {
88
+ return u(o, a(e, {
89
89
  mode: "read"
90
90
  }), null);
91
91
  const i = r == null ? void 0 : r[t];
@@ -108,7 +108,7 @@ function G(t, e) {
108
108
  return () => {
109
109
  var i;
110
110
  const o = (i = r == null ? void 0 : r.renderFormItem) == null ? void 0 : i.call(r, t.fieldProps.field);
111
- return o ? u(S, f(t.fieldProps, {
111
+ return o ? u(S, a(t.fieldProps, {
112
112
  span: t.span
113
113
  }), I(o) ? o : {
114
114
  default: () => [o]
@@ -122,7 +122,7 @@ function K(t, e) {
122
122
  value: i ? e.index + 1 : e.value
123
123
  };
124
124
  return t.valueEnum && (r.valueEnum = t.valueEnum), {
125
- ...g(r, ["request"]),
125
+ ...y(r, ["request"]),
126
126
  ...s
127
127
  };
128
128
  }
@@ -130,7 +130,7 @@ function X(t) {
130
130
  const e = {
131
131
  ...t
132
132
  };
133
- return j(t.filters) && t.filters && t.valueEnum && (e.filters = d(t.valueEnum)), e;
133
+ return g(t.filters) && t.filters && t.valueEnum && (e.filters = d(t.valueEnum)), e;
134
134
  }
135
135
  function Y(t, e) {
136
136
  var r;
@@ -156,10 +156,10 @@ function k(t, e, n, r) {
156
156
  });
157
157
  if (o && (o.length > 1 || o[0].children && o[0].children !== "v-if"))
158
158
  return o;
159
- const s = a(t.title) ? u("span", {
159
+ const s = j(t.title) ? u("span", {
160
160
  class: e,
161
161
  title: t.title
162
- }, [t.title]) : t.title, l = t.tooltip ? a(t.tooltip) ? u(b, null, [t.tooltip]) : t.tooltip(t) : null;
162
+ }, [t.title]) : t.title, l = t.tooltip ? p(t.tooltip) ? t.tooltip(t) : u(b, null, [t.tooltip]) : null;
163
163
  return l ? u("span", {
164
164
  style: {
165
165
  display: "inline-flex",
@@ -0,0 +1,21 @@
1
+ import { ApButtonGroupProps } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<ApButtonGroupProps>, {}>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<ApButtonGroupProps>, {}>>>, {}, {}>;
4
+ export default _default;
5
+ type __VLS_WithDefaults<P, D> = {
6
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
7
+ default: D[K];
8
+ }> : P[K];
9
+ };
10
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
11
+ type __VLS_TypePropsToOption<T> = {
12
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
13
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
14
+ } : {
15
+ type: PropType<T[K]>;
16
+ required: true;
17
+ };
18
+ };
19
+ type __VLS_PrettifyLocal<T> = {
20
+ [K in keyof T]: T[K];
21
+ } & {};
@@ -0,0 +1,4 @@
1
+ import f from "./ApButtonGroup.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,71 @@
1
+ import { defineComponent as k, computed as T, openBlock as t, createBlock as u, unref as s, normalizeProps as P, guardReactiveProps as R, withCtx as c, createElementBlock as m, Fragment as p, renderList as i, mergeProps as l, resolveDynamicComponent as f, h as y, createCommentVNode as B } from "vue";
2
+ import { Space as x } from "ant-design-vue";
3
+ import "../../ap-button/ap-button.vue2.mjs";
4
+ import "../../ap-button/ap-action-button.vue2.mjs";
5
+ import "../ap-batch-action-group/ApBatchActionGroup.vue.mjs";
6
+ import "../ap-export-group/ApExportGroup.vue.mjs";
7
+ import { omit as n } from "lodash-unified";
8
+ import { usePermission as C } from "@aplus-frontend/hooks";
9
+ import L from "../../ap-button/ap-button.vue.mjs";
10
+ import S from "../../ap-button/ap-action-button.vue.mjs";
11
+ import $ from "../ap-batch-action-group/ApBatchActionGroup.vue2.mjs";
12
+ import b from "../ap-export-group/ApExportGroup.vue2.mjs";
13
+ const I = /* @__PURE__ */ k({
14
+ __name: "ApButtonGroup",
15
+ props: {
16
+ spaceProps: {},
17
+ selectedRows: {},
18
+ selectedRowKeys: {},
19
+ groupList: {}
20
+ },
21
+ setup(d) {
22
+ const { hasPermission: h } = C(), o = d, v = T(() => o.groupList);
23
+ function _(r) {
24
+ let a = r == null ? void 0 : r.ifShow;
25
+ return !(r != null && r.ifShow) && (r != null && r.auth) && (a = () => h(r.auth)), (a == null ? void 0 : a()) ?? !0;
26
+ }
27
+ return (r, a) => (t(), u(s(x), P(R(o.spaceProps ?? {})), {
28
+ default: c(() => [
29
+ (t(!0), m(p, null, i(v.value, (e, w) => (t(), m(p, { key: w }, [
30
+ e.valueType === "button" && _(e) ? (t(), u(L, l({
31
+ key: 0,
32
+ ref_for: !0
33
+ }, {
34
+ ...s(n)(e, ["valueType", "ifShow", "auth"])
35
+ }), {
36
+ default: c(() => [
37
+ (t(), u(f(y(p, [e == null ? void 0 : e.content]))))
38
+ ]),
39
+ _: 2
40
+ }, 1040)) : e.valueType === "actionButton" && _(e) ? (t(), u(S, l({
41
+ key: 1,
42
+ ref_for: !0
43
+ }, {
44
+ ...s(n)(e, ["valueType", "ifShow", "auth"])
45
+ }), {
46
+ default: c(() => [
47
+ (t(), u(f(y(p, [e == null ? void 0 : e.content]))))
48
+ ]),
49
+ _: 2
50
+ }, 1040)) : e.valueType === "batchActionGroup" ? (t(), u($, l({
51
+ key: 2,
52
+ ref_for: !0
53
+ }, {
54
+ ...s(n)(e, ["valueType"]),
55
+ selectedRows: o == null ? void 0 : o.selectedRows
56
+ }), null, 16)) : e.valueType === "exportGroup" ? (t(), u(b, l({
57
+ key: 3,
58
+ ref_for: !0
59
+ }, {
60
+ ...s(n)(e, ["valueType"]),
61
+ selectedRowKeys: o == null ? void 0 : o.selectedRowKeys
62
+ }), null, 16)) : B("", !0)
63
+ ], 64))), 128))
64
+ ]),
65
+ _: 1
66
+ }, 16));
67
+ }
68
+ });
69
+ export {
70
+ I as default
71
+ };
@@ -0,0 +1,29 @@
1
+ import { SpaceProps } from 'ant-design-vue';
2
+ import { ApButtonProps } from '../../ap-button';
3
+ import { ApBatchActionGroupProps } from '../ap-batch-action-group/interface';
4
+ import { ApExportGroupProps } from '../ap-export-group/interface';
5
+ import { VNodeChild } from 'vue';
6
+ export type ApButtonGroupType = {
7
+ button: ApButtonProps & {
8
+ content?: VNodeChild;
9
+ ifShow?: () => boolean;
10
+ auth?: string;
11
+ };
12
+ actionButton: ApButtonProps & {
13
+ content?: VNodeChild;
14
+ ifShow?: () => boolean;
15
+ auth?: string;
16
+ };
17
+ batchActionGroup: Omit<ApBatchActionGroupProps, 'selectedRows'>;
18
+ exportGroup: Omit<ApExportGroupProps, 'selectedRowKeys'>;
19
+ };
20
+ export type ApButtonGroupTypeKey = keyof ApButtonGroupType & {};
21
+ export type ApButtonGroupListProps<ButtonType extends ApButtonGroupTypeKey = ApButtonGroupTypeKey> = ButtonType extends ApButtonGroupTypeKey ? {
22
+ valueType: ButtonType;
23
+ } & ApButtonGroupType[ButtonType] : never;
24
+ export type ApButtonGroupProps = {
25
+ spaceProps?: Partial<SpaceProps>;
26
+ selectedRows?: any[];
27
+ selectedRowKeys?: any[];
28
+ groupList?: ApButtonGroupListProps[];
29
+ };