@aplus-frontend/ui 0.1.35 → 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.
Files changed (75) hide show
  1. package/es/index.mjs +136 -133
  2. package/es/src/ap-button/ap-action-button.vue.d.ts +5 -0
  3. package/es/src/ap-button/ap-action-button.vue.mjs +8 -8
  4. package/es/src/ap-form/ap-form.vue2.mjs +93 -93
  5. package/es/src/ap-form/index.d.ts +3 -1
  6. package/es/src/ap-form/index.mjs +5 -1
  7. package/es/src/ap-form/interface.d.ts +4 -0
  8. package/es/src/ap-form/set/index.vue.d.ts +43 -0
  9. package/es/src/ap-form/set/index.vue.mjs +35 -0
  10. package/es/src/ap-form/set/index.vue2.mjs +4 -0
  11. package/es/src/ap-table/ap-table.vue.d.ts +1 -0
  12. package/es/src/ap-table/ap-table.vue.mjs +109 -107
  13. package/es/src/ap-table/components/setting/utils.d.ts +1 -1
  14. package/es/src/ap-table/components/setting/utils.mjs +12 -21
  15. package/es/src/ap-table/components/style/setting/modal.css +15 -3
  16. package/es/src/ap-table/interface.d.ts +5 -0
  17. package/es/src/ap-table/utils.mjs +14 -13
  18. package/es/src/ap-upload/apUpload.vue.mjs +40 -39
  19. package/es/src/business/ap-button-group/ApButtonGroup.vue.d.ts +21 -0
  20. package/es/src/business/ap-button-group/ApButtonGroup.vue.mjs +4 -0
  21. package/es/src/business/ap-button-group/ApButtonGroup.vue2.mjs +71 -0
  22. package/es/src/business/ap-button-group/interface.d.ts +29 -0
  23. package/es/src/business/ap-button-group/interface.mjs +1 -0
  24. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -1
  25. package/es/src/business/ap-table-modal/hooks/use-create-table-modal.mjs +11 -11
  26. package/es/src/business/hooks/usePageListApTable.d.ts +1 -0
  27. package/es/src/business/index.d.ts +607 -4
  28. package/es/src/business/index.mjs +27 -23
  29. package/es/src/editable-table/form-item.vue.mjs +76 -97
  30. package/es/src/editable-table/hooks/use-get-columns.mjs +41 -35
  31. package/es/src/editable-table/index.vue.mjs +79 -100
  32. package/es/src/editable-table/style/index.css +12 -0
  33. package/es/src/editable-table/utils.d.ts +8 -1
  34. package/es/src/editable-table/utils.mjs +103 -69
  35. package/es/src/index.mjs +220 -217
  36. package/es/src/theme/ap-table/setting/modal.css +15 -3
  37. package/es/src/theme/editable-table/index.css +12 -0
  38. package/lib/index.js +1 -1
  39. package/lib/src/ap-button/ap-action-button.vue.d.ts +5 -0
  40. package/lib/src/ap-button/ap-action-button.vue.js +1 -1
  41. package/lib/src/ap-form/ap-form.vue2.js +1 -1
  42. package/lib/src/ap-form/index.d.ts +3 -1
  43. package/lib/src/ap-form/index.js +1 -1
  44. package/lib/src/ap-form/interface.d.ts +4 -0
  45. package/lib/src/ap-form/set/index.vue.d.ts +43 -0
  46. package/lib/src/ap-form/set/index.vue.js +1 -0
  47. package/lib/src/ap-form/set/index.vue2.js +1 -0
  48. package/lib/src/ap-table/ap-table.vue.d.ts +1 -0
  49. package/lib/src/ap-table/ap-table.vue.js +1 -1
  50. package/lib/src/ap-table/components/setting/utils.d.ts +1 -1
  51. package/lib/src/ap-table/components/setting/utils.js +1 -1
  52. package/lib/src/ap-table/components/style/setting/modal.css +15 -3
  53. package/lib/src/ap-table/interface.d.ts +5 -0
  54. package/lib/src/ap-table/utils.js +1 -1
  55. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  56. package/lib/src/business/ap-button-group/ApButtonGroup.vue.d.ts +21 -0
  57. package/lib/src/business/ap-button-group/ApButtonGroup.vue.js +1 -0
  58. package/lib/src/business/ap-button-group/ApButtonGroup.vue2.js +1 -0
  59. package/lib/src/business/ap-button-group/interface.d.ts +29 -0
  60. package/lib/src/business/ap-button-group/interface.js +1 -0
  61. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.d.ts +1 -1
  62. package/lib/src/business/ap-table-modal/hooks/use-create-table-modal.js +1 -1
  63. package/lib/src/business/hooks/usePageListApTable.d.ts +1 -0
  64. package/lib/src/business/index.d.ts +607 -4
  65. package/lib/src/business/index.js +1 -1
  66. package/lib/src/editable-table/form-item.vue.js +1 -1
  67. package/lib/src/editable-table/hooks/use-get-columns.js +1 -1
  68. package/lib/src/editable-table/index.vue.js +1 -1
  69. package/lib/src/editable-table/style/index.css +12 -0
  70. package/lib/src/editable-table/utils.d.ts +8 -1
  71. package/lib/src/editable-table/utils.js +1 -1
  72. package/lib/src/index.js +1 -1
  73. package/lib/src/theme/ap-table/setting/modal.css +15 -3
  74. package/lib/src/theme/editable-table/index.css +12 -0
  75. package/package.json +5 -5
@@ -1,19 +1,19 @@
1
- import { defineComponent as U, computed as u, provide as e, ref as d, openBlock as f, createElementBlock as h, normalizeClass as j, unref as T, createBlock as z, resolveDynamicComponent as k, normalizeProps as B, mergeProps as $, createCommentVNode as q } from "vue";
1
+ import { defineComponent as U, computed as d, provide as t, ref as f, openBlock as g, createElementBlock as j, normalizeClass as T, unref as z, createBlock as k, resolveDynamicComponent as B, normalizeProps as $, mergeProps as q, createCommentVNode as L } from "vue";
2
2
  import "../config-provider/index.mjs";
3
3
  import "./components/SingleFile.vue.mjs";
4
4
  import "./components/MultipleFile.vue.mjs";
5
5
  import "./components/Picture.vue.mjs";
6
6
  import "./styles/upload.css";
7
- import { injectLocaleToAccept as L } from "./utils/accept.mjs";
8
- import { injectLocaleToOss as R } from "./hooks/useOss.mjs";
9
- import { Form as M } from "ant-design-vue";
10
- import { useLocale as P } from "../config-provider/hooks/use-locale.mjs";
11
- import { useNamespace as w } from "../config-provider/hooks/use-namespace.mjs";
12
- import D from "./components/SingleFile.vue2.mjs";
13
- import E from "./components/MultipleFile.vue2.mjs";
14
- import G from "./components/Picture.vue2.mjs";
15
- import { useGlobalConfig as g } from "../config-provider/hooks/use-global-config.mjs";
16
- const se = /* @__PURE__ */ U({
7
+ import { injectLocaleToAccept as R } from "./utils/accept.mjs";
8
+ import { injectLocaleToOss as M } from "./hooks/useOss.mjs";
9
+ import { Form as P } from "ant-design-vue";
10
+ import { useLocale as w } from "../config-provider/hooks/use-locale.mjs";
11
+ import { useNamespace as D } from "../config-provider/hooks/use-namespace.mjs";
12
+ import E from "./components/SingleFile.vue2.mjs";
13
+ import G from "./components/MultipleFile.vue2.mjs";
14
+ import I from "./components/Picture.vue2.mjs";
15
+ import { useGlobalConfig as v } from "../config-provider/hooks/use-global-config.mjs";
16
+ const me = /* @__PURE__ */ U({
17
17
  name: "AplusFileUpload",
18
18
  __name: "apUpload",
19
19
  props: {
@@ -60,47 +60,48 @@ const se = /* @__PURE__ */ U({
60
60
  onChange: Function
61
61
  },
62
62
  emits: ["update:value"],
63
- setup(v, { expose: y, emit: b }) {
64
- var m, p, c, l;
65
- const { t: s, lang: C } = P();
66
- L(s), R(s, C);
67
- const { b: N } = w("ap-upload"), t = v, _ = b, F = {
68
- singleFile: D,
69
- multipleFile: E,
70
- picture: G
71
- }, a = M.useInjectFormItemContext(), S = u({
63
+ setup(y, { expose: C, emit: b }) {
64
+ var c, l, p, u;
65
+ const { t: r, lang: N } = w();
66
+ R(r), M(r, N);
67
+ const { b: _ } = D("ap-upload"), e = y, F = b, S = {
68
+ singleFile: E,
69
+ multipleFile: G,
70
+ picture: I
71
+ }, n = P.useInjectFormItemContext(), x = d({
72
72
  get() {
73
- return t.value;
73
+ return e.value;
74
74
  },
75
- set(r) {
76
- _("update:value", r), a == null || a.onFieldChange();
75
+ set(a) {
76
+ var m;
77
+ F("update:value", a), n == null || n.onFieldChange(), (m = e.onChange) == null || m.call(e, a);
77
78
  }
78
- }), x = g("uiMode"), o = g("apUpload");
79
- e("theme", x.value), e("value", S), e("dirName", t.dirName ?? ((m = o.value) == null ? void 0 : m.dirName)), e(
79
+ }), O = v("uiMode"), o = v("apUpload");
80
+ t("theme", O.value), t("value", x), t("dirName", e.dirName ?? ((c = o.value) == null ? void 0 : c.dirName)), t(
80
81
  "needName",
81
- t.needName ?? ((p = o.value) == null ? void 0 : p.needName) ?? !1
82
- ), e("accept", t.accept ?? ((c = o.value) == null ? void 0 : c.accept) ?? ""), e("maxSize", t.maxSize), e("title", t.title), e("subTitle", t.subTitle), e("maxCount", t.maxCount), e("beforeUpload", t.beforeUpload), e("customRequest", t.customRequest), e(
82
+ e.needName ?? ((l = o.value) == null ? void 0 : l.needName) ?? !1
83
+ ), t("accept", e.accept ?? ((p = o.value) == null ? void 0 : p.accept) ?? ""), t("maxSize", e.maxSize), t("title", e.title), t("subTitle", e.subTitle), t("maxCount", e.maxCount), t("beforeUpload", e.beforeUpload), t("customRequest", e.customRequest), t(
83
84
  "getOssAccess",
84
- t.getOssAccess ?? ((l = o.value) == null ? void 0 : l.getOssAccess)
85
+ e.getOssAccess ?? ((u = o.value) == null ? void 0 : u.getOssAccess)
85
86
  );
86
- const O = u(() => i.value === 0), i = d(0);
87
- e("uploadingCount", i);
88
- const n = d(!0);
87
+ const h = d(() => s.value === 0), s = f(0);
88
+ t("uploadingCount", s);
89
+ const i = f(!0);
89
90
  function A() {
90
- n.value = !1, setTimeout(() => {
91
- n.value = !0;
91
+ i.value = !1, setTimeout(() => {
92
+ i.value = !0;
92
93
  });
93
94
  }
94
- return y({
95
- done: O,
95
+ return C({
96
+ done: h,
96
97
  clear: A
97
- }), (r, I) => (f(), h("div", {
98
- class: j(T(N)())
98
+ }), (a, m) => (g(), j("div", {
99
+ class: T(z(_)())
99
100
  }, [
100
- n.value ? (f(), z(k(F[t.type]), B($({ key: 0 }, r.$attrs)), null, 16)) : q("", !0)
101
+ i.value ? (g(), k(B(S[e.type]), $(q({ key: 0 }, a.$attrs)), null, 16)) : L("", !0)
101
102
  ], 2));
102
103
  }
103
104
  });
104
105
  export {
105
- se as default
106
+ me as default
106
107
  };
@@ -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
+ };
@@ -3,5 +3,5 @@ export declare function useCreateTableModal(props: UseCreateTableModalProps): {
3
3
  readonly openModal: <T>(selected?: any[], options?: OpenOptions) => Promise< OpenReturnType<T> | undefined>;
4
4
  readonly closeModal: () => void;
5
5
  readonly destroy: () => void;
6
- readonly isDestroyed: false;
6
+ readonly isDestroyed: true;
7
7
  };
@@ -1,12 +1,12 @@
1
- import { ref as v, defineComponent as C, h as r, render as m, onUnmounted as y } from "vue";
1
+ import { ref as v, defineComponent as C, h as r, render as a, onUnmounted as y } from "vue";
2
2
  import "../table-modal.vue.mjs";
3
3
  import "../../../index.mjs";
4
4
  import { omit as h } from "lodash-unified";
5
5
  import { ConfigProvider as M, globalConfigCached as b } from "../../../config-provider/config-provider.mjs";
6
6
  import g from "../table-modal.vue2.mjs";
7
7
  function E(d) {
8
- let o = !1;
9
- const l = document.body, t = v(), { destroyOnUnmounted: s = !0 } = d, n = document.createElement("div"), c = () => {
8
+ let o = !0;
9
+ const i = document.body, t = v(), { destroyOnUnmounted: s = !0 } = d, n = document.createElement("div"), u = () => {
10
10
  const e = C({
11
11
  setup() {
12
12
  return () => r(
@@ -19,22 +19,22 @@ function E(d) {
19
19
  );
20
20
  }
21
21
  });
22
- l.appendChild(n), m(r(e), n), o = !1;
23
- }, i = () => {
22
+ i.appendChild(n), a(r(e), n), o = !1;
23
+ }, l = () => {
24
24
  var e;
25
25
  (e = t.value) == null || e.close(), o || setTimeout(() => {
26
- m(null, n), l.removeChild(n), o = !0;
26
+ a(null, n), i.removeChild(n), o = !0;
27
27
  }, 400);
28
- }, u = async (e = [], p = {}) => {
29
- var a;
30
- return t.value || c(), (a = t.value) == null ? void 0 : a.open(e, p);
28
+ }, c = async (e = [], p = {}) => {
29
+ var m;
30
+ return t.value || u(), (m = t.value) == null ? void 0 : m.open(e, p);
31
31
  }, f = () => {
32
32
  var e;
33
33
  o || (e = t.value) == null || e.close();
34
34
  };
35
35
  return y(() => {
36
- s && i();
37
- }), { openModal: u, closeModal: f, destroy: i, isDestroyed: o };
36
+ s && l();
37
+ }), { openModal: c, closeModal: f, destroy: l, isDestroyed: o };
38
38
  }
39
39
  export {
40
40
  E as useCreateTableModal
@@ -34,6 +34,7 @@ export declare function usePageListApTable(props?: UsePageListApTable): [ApTable
34
34
  getApTableInstance: () => {
35
35
  submit: () => void;
36
36
  reset: () => void;
37
+ refresh: () => void;
37
38
  setSearchFormValues: (fields: Partial< Recordable>) => void;
38
39
  getSearchFormValues: () => Partial< Recordable>;
39
40
  dataSource: any;