@aplus-frontend/ui 0.0.17 → 0.0.19

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 (91) hide show
  1. package/es/index.mjs +18 -14
  2. package/es/src/ap-field/date/helper.d.ts +7 -0
  3. package/es/src/ap-field/date/helper.mjs +17 -7
  4. package/es/src/ap-field/date/index.vue.d.ts +3 -1
  5. package/es/src/ap-field/date/index.vue.mjs +46 -39
  6. package/es/src/ap-field/date-range/index.vue.d.ts +3 -3
  7. package/es/src/ap-field/date-range/index.vue.mjs +64 -62
  8. package/es/src/ap-field/interface.d.ts +10 -1
  9. package/es/src/ap-form/ap-form-item.vue.mjs +61 -57
  10. package/es/src/ap-form/search-form/index.vue.mjs +1 -1
  11. package/es/src/ap-form/style/ap-form-item.css +11 -0
  12. package/es/src/ap-modal/index.d.ts +9 -0
  13. package/es/src/ap-modal/index.mjs +10 -0
  14. package/es/src/ap-modal/type.d.ts +13 -0
  15. package/es/src/ap-modal/type.mjs +1 -0
  16. package/es/src/ap-modal/utils/createModal.d.ts +3 -0
  17. package/es/src/ap-modal/utils/createModal.mjs +74 -0
  18. package/es/src/ap-modal/utils/index.d.ts +1 -0
  19. package/es/src/ap-modal/utils/index.mjs +4 -0
  20. package/es/src/ap-table/ap-table.vue.mjs +151 -141
  21. package/es/src/ap-table/constants.d.ts +41 -15
  22. package/es/src/ap-table/interface.d.ts +22 -4
  23. package/es/src/ap-table/style/ap-table.css +1 -0
  24. package/es/src/ap-table/utils.d.ts +6831 -845
  25. package/es/src/business/ap-label/ApLabel.vue.d.ts +38 -0
  26. package/es/src/business/ap-label/ApLabel.vue.mjs +4 -0
  27. package/es/src/business/ap-label/ApLabel.vue2.mjs +52 -0
  28. package/es/src/business/ap-label/index.d.ts +4 -0
  29. package/es/src/business/ap-label/interface.d.ts +8 -0
  30. package/es/src/business/ap-label/style.css +4 -0
  31. package/es/src/business/expandAlert/ApExpandAlert.vue.d.ts +81 -0
  32. package/es/src/business/expandAlert/ApExpandAlert.vue.mjs +4 -0
  33. package/es/src/business/expandAlert/ApExpandAlert.vue2.mjs +113 -0
  34. package/es/src/business/expandAlert/interface.d.ts +26 -0
  35. package/es/src/business/expandAlert/style.css +42 -0
  36. package/es/src/business/index.d.ts +416 -1
  37. package/es/src/business/index.mjs +10 -4
  38. package/es/src/editable-table/interface.d.ts +1 -1
  39. package/es/src/index.d.ts +1 -0
  40. package/es/src/index.mjs +192 -188
  41. package/es/src/theme/ap-expand-alert/ap-expand-alert.css +42 -0
  42. package/es/src/theme/ap-form/ap-form-item.css +11 -0
  43. package/es/src/theme/ap-label/ap-label.css +4 -0
  44. package/es/src/theme/ap-table/ap-table.css +1 -0
  45. package/es/src/type.d.ts +3 -1
  46. package/lib/index.js +1 -1
  47. package/lib/src/ap-field/date/helper.d.ts +7 -0
  48. package/lib/src/ap-field/date/helper.js +1 -1
  49. package/lib/src/ap-field/date/index.vue.d.ts +3 -1
  50. package/lib/src/ap-field/date/index.vue.js +1 -1
  51. package/lib/src/ap-field/date-range/index.vue.d.ts +3 -3
  52. package/lib/src/ap-field/date-range/index.vue.js +1 -1
  53. package/lib/src/ap-field/interface.d.ts +10 -1
  54. package/lib/src/ap-form/ap-form-item.vue.js +1 -1
  55. package/lib/src/ap-form/search-form/index.vue.js +1 -1
  56. package/lib/src/ap-form/style/ap-form-item.css +11 -0
  57. package/lib/src/ap-modal/index.d.ts +9 -0
  58. package/lib/src/ap-modal/index.js +1 -0
  59. package/lib/src/ap-modal/type.d.ts +13 -0
  60. package/lib/src/ap-modal/type.js +1 -0
  61. package/lib/src/ap-modal/utils/createModal.d.ts +3 -0
  62. package/lib/src/ap-modal/utils/createModal.js +1 -0
  63. package/lib/src/ap-modal/utils/index.d.ts +1 -0
  64. package/lib/src/ap-modal/utils/index.js +1 -0
  65. package/lib/src/ap-table/ap-table.vue.js +1 -1
  66. package/lib/src/ap-table/constants.d.ts +41 -15
  67. package/lib/src/ap-table/interface.d.ts +22 -4
  68. package/lib/src/ap-table/style/ap-table.css +1 -0
  69. package/lib/src/ap-table/utils.d.ts +6831 -845
  70. package/lib/src/business/ap-label/ApLabel.vue.d.ts +38 -0
  71. package/lib/src/business/ap-label/ApLabel.vue.js +1 -0
  72. package/lib/src/business/ap-label/ApLabel.vue2.js +1 -0
  73. package/lib/src/business/ap-label/index.d.ts +4 -0
  74. package/lib/src/business/ap-label/interface.d.ts +8 -0
  75. package/lib/src/business/ap-label/style.css +4 -0
  76. package/lib/src/business/expandAlert/ApExpandAlert.vue.d.ts +81 -0
  77. package/lib/src/business/expandAlert/ApExpandAlert.vue.js +1 -0
  78. package/lib/src/business/expandAlert/ApExpandAlert.vue2.js +1 -0
  79. package/lib/src/business/expandAlert/interface.d.ts +26 -0
  80. package/lib/src/business/expandAlert/style.css +42 -0
  81. package/lib/src/business/index.d.ts +416 -1
  82. package/lib/src/business/index.js +1 -1
  83. package/lib/src/editable-table/interface.d.ts +1 -1
  84. package/lib/src/index.d.ts +1 -0
  85. package/lib/src/index.js +1 -1
  86. package/lib/src/theme/ap-expand-alert/ap-expand-alert.css +42 -0
  87. package/lib/src/theme/ap-form/ap-form-item.css +11 -0
  88. package/lib/src/theme/ap-label/ap-label.css +4 -0
  89. package/lib/src/theme/ap-table/ap-table.css +1 -0
  90. package/lib/src/type.d.ts +3 -1
  91. package/package.json +3 -3
@@ -0,0 +1,38 @@
1
+ import { ApLabelProps } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+ import { TooltipPlacement } from 'ant-design-vue/es/tooltip';
4
+
5
+ declare const _default: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApLabelProps>, {
6
+ status: string;
7
+ placement: string;
8
+ iconColor: string;
9
+ text: string;
10
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApLabelProps>, {
11
+ status: string;
12
+ placement: string;
13
+ iconColor: string;
14
+ text: string;
15
+ }>>>, {
16
+ text: any;
17
+ placement: TooltipPlacement;
18
+ status: "success" | "error" | "default" | "warning" | "processing";
19
+ iconColor: string;
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,4 @@
1
+ import f from "./ApLabel.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,52 @@
1
+ import { defineComponent as n, openBlock as o, createElementBlock as p, normalizeClass as s, unref as t, createVNode as l, normalizeProps as m, guardReactiveProps as c, createBlock as i, withCtx as u, normalizeStyle as f, createCommentVNode as d } from "vue";
2
+ import { Badge as C, Tooltip as g } from "ant-design-vue";
3
+ import { QuestionCircleOutlined as h } from "@ant-design/icons-vue";
4
+ import "../../config-provider/index.mjs";
5
+ import { omit as x } from "lodash-unified";
6
+ import "./style.css";
7
+ import { useNamespace as y } from "../../config-provider/hooks/use-namespace.mjs";
8
+ const F = /* @__PURE__ */ n({
9
+ name: "ApLabel",
10
+ __name: "ApLabel",
11
+ props: {
12
+ count: {},
13
+ showZero: { type: Boolean },
14
+ overflowCount: {},
15
+ dot: { type: Boolean },
16
+ prefixCls: {},
17
+ scrollNumberPrefixCls: {},
18
+ status: { default: "default" },
19
+ size: {},
20
+ color: {},
21
+ text: { default: "" },
22
+ offset: {},
23
+ numberStyle: {},
24
+ title: {},
25
+ helpMessage: {},
26
+ placement: { default: "top" },
27
+ iconColor: { default: "#FF4D4F" }
28
+ },
29
+ setup(r) {
30
+ const e = r, { b: a } = y("ap-label");
31
+ return (_, b) => (o(), p("div", {
32
+ class: s([t(a)()])
33
+ }, [
34
+ l(t(C), m(c(t(x)(e, ["helpMessage", "placement", "iconColor"]))), null, 16),
35
+ e.helpMessage ? (o(), i(t(g), {
36
+ key: 0,
37
+ placement: e.placement,
38
+ title: e.helpMessage
39
+ }, {
40
+ default: u(() => [
41
+ l(t(h), {
42
+ style: f({ color: e.iconColor, marginLeft: "6px" })
43
+ }, null, 8, ["style"])
44
+ ]),
45
+ _: 1
46
+ }, 8, ["placement", "title"])) : d("", !0)
47
+ ], 2));
48
+ }
49
+ });
50
+ export {
51
+ F as default
52
+ };
@@ -0,0 +1,4 @@
1
+ import { default as ApLabel } from './ApLabel.vue';
2
+
3
+ export * from './interface';
4
+ export { ApLabel };
@@ -0,0 +1,8 @@
1
+ import { BadgeProps } from 'ant-design-vue';
2
+ import { TooltipPlacement } from 'ant-design-vue/es/Tooltip';
3
+
4
+ export type ApLabelProps = BadgeProps & {
5
+ helpMessage?: string;
6
+ placement: TooltipPlacement;
7
+ iconColor: string;
8
+ };
@@ -0,0 +1,4 @@
1
+ .aplus-ap-label {
2
+ display: inline-block;
3
+ font-size: 14px;
4
+ }
@@ -0,0 +1,81 @@
1
+ import { ApExpandAlertProps } from './interface';
2
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ExtractPropTypes, PropType } from 'vue';
3
+
4
+ declare const _default: __VLS_WithTemplateSlots< DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApExpandAlertProps>, {
5
+ /**
6
+ * Alert类型
7
+ */
8
+ type: string;
9
+ /**
10
+ * 数据
11
+ */
12
+ data: () => never[];
13
+ /**
14
+ * 前缀
15
+ */
16
+ prefix: string;
17
+ /**
18
+ * Tooltip 提示标题
19
+ */
20
+ tipTitle: string;
21
+ /**
22
+ * 分隔符
23
+ */
24
+ separator: string;
25
+ }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
26
+ choose: (...args: any[]) => void;
27
+ }, string, PublicProps, Readonly< ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ApExpandAlertProps>, {
28
+ /**
29
+ * Alert类型
30
+ */
31
+ type: string;
32
+ /**
33
+ * 数据
34
+ */
35
+ data: () => never[];
36
+ /**
37
+ * 前缀
38
+ */
39
+ prefix: string;
40
+ /**
41
+ * Tooltip 提示标题
42
+ */
43
+ tipTitle: string;
44
+ /**
45
+ * 分隔符
46
+ */
47
+ separator: string;
48
+ }>>> & {
49
+ onChoose?: ((...args: any[]) => any) | undefined;
50
+ }, {
51
+ type: "success" | "error" | "info" | "warning" | undefined;
52
+ data: string | any[];
53
+ prefix: string;
54
+ separator: string;
55
+ tipTitle: string;
56
+ }, {}>, {
57
+ default?(_: {}): any;
58
+ }>;
59
+ export default _default;
60
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
61
+ type __VLS_TypePropsToRuntimeProps<T> = {
62
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
63
+ type: PropType<__VLS_NonUndefinedable<T[K]>>;
64
+ } : {
65
+ type: PropType<T[K]>;
66
+ required: true;
67
+ };
68
+ };
69
+ type __VLS_WithDefaults<P, D> = {
70
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
71
+ default: D[K];
72
+ }> : P[K];
73
+ };
74
+ type __VLS_Prettify<T> = {
75
+ [K in keyof T]: T[K];
76
+ } & {};
77
+ type __VLS_WithTemplateSlots<T, S> = T & {
78
+ new (): {
79
+ $slots: S;
80
+ };
81
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ApExpandAlert.vue2.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,113 @@
1
+ import { defineComponent as H, ref as f, computed as v, watch as I, nextTick as L, openBlock as s, createElementBlock as i, normalizeClass as l, unref as e, createVNode as h, withCtx as d, createBlock as $, createElementVNode as c, toDisplayString as r, createCommentVNode as y, normalizeStyle as z, renderSlot as R, Fragment as g, renderList as S } from "vue";
2
+ import { DownOutlined as V } from "@ant-design/icons-vue";
3
+ import { Alert as D, Tooltip as M } from "ant-design-vue";
4
+ import { ApActionItem as O } from "../../ap-action/index.mjs";
5
+ import "../../config-provider/index.mjs";
6
+ import "./style.css";
7
+ import { useNamespace as F } from "../../config-provider/hooks/use-namespace.mjs";
8
+ import { useGlobalConfig as G } from "../../config-provider/hooks/use-global-config.mjs";
9
+ const W = { key: 0 }, j = ["onClick"], _ = /* @__PURE__ */ H({
10
+ __name: "ApExpandAlert",
11
+ props: {
12
+ type: { default: "warning" },
13
+ data: { default: () => [] },
14
+ prefix: { default: "" },
15
+ tipTitle: { default: "查看详情" },
16
+ mapLabel: {},
17
+ separator: { default: "|" }
18
+ },
19
+ emits: ["choose"],
20
+ setup(w) {
21
+ const x = w, o = f(""), p = f(null), b = v(() => ({
22
+ fontWeight: "400",
23
+ wordBreak: "break-all",
24
+ overflow: "hidden",
25
+ display: "-webkit-box",
26
+ webkitLineClamp: o.value,
27
+ webkitBoxOrient: "vertical",
28
+ lineHeight: "22px"
29
+ }));
30
+ function C() {
31
+ o.value === "1" ? o.value = "" : o.value = "1";
32
+ }
33
+ const B = v(() => o.value === "1" ? "展开" : "收起"), m = f(!0), k = v(() => o.value !== "1");
34
+ I(
35
+ () => x.data,
36
+ () => {
37
+ o.value = "", L(() => {
38
+ if (p.value) {
39
+ const t = Number(p.value.clientHeight), u = Number(
40
+ parseInt(p.value.style.lineHeight)
41
+ );
42
+ t <= u && k.value ? m.value = !1 : m.value = !0;
43
+ }
44
+ });
45
+ },
46
+ {
47
+ immediate: !0
48
+ }
49
+ );
50
+ const { b: A, e: a, m: N } = F("ap-expand-alert"), T = G("uiMode", "aplus");
51
+ return (t, u) => (s(), i("div", {
52
+ class: l([e(A)(), `${e(N)(e(T))}`])
53
+ }, [
54
+ h(e(D), {
55
+ type: t.type,
56
+ "show-icon": "",
57
+ class: l(e(a)("antAlert"))
58
+ }, {
59
+ action: d(() => [
60
+ m.value ? (s(), $(e(O), {
61
+ key: 0,
62
+ size: "small",
63
+ onClick: u[0] || (u[0] = (n) => C()),
64
+ style: { "font-size": "12px", "padding-left": "16px" }
65
+ }, {
66
+ default: d(() => [
67
+ c("span", {
68
+ class: l(e(a)("expandText"))
69
+ }, r(B.value), 3),
70
+ h(e(V), {
71
+ class: l(k.value ? e(a)("expandIcon") : e(a)("collapseIcon"))
72
+ }, null, 8, ["class"])
73
+ ]),
74
+ _: 1
75
+ })) : y("", !0)
76
+ ]),
77
+ message: d(() => [
78
+ c("div", {
79
+ style: z(b.value),
80
+ class: l(e(a)("alertContent")),
81
+ ref_key: "ellipsisBoxRef",
82
+ ref: p
83
+ }, [
84
+ R(t.$slots, "default", {}, () => [
85
+ c("span", {
86
+ class: l(e(a)("prefix"))
87
+ }, r(t.prefix), 3),
88
+ typeof t.data == "string" ? (s(), i("span", W, r(t.data), 1)) : (s(!0), i(g, { key: 1 }, S(t.data, (n, E) => (s(), i(g, { key: n }, [
89
+ h(e(M), { title: t.tipTitle }, {
90
+ default: d(() => [
91
+ c("span", {
92
+ class: l(e(a)("showItem")),
93
+ onClick: (q) => t.$emit("choose", n)
94
+ }, r(t.mapLabel ? n[t.mapLabel] : n), 11, j)
95
+ ]),
96
+ _: 2
97
+ }, 1032, ["title"]),
98
+ E !== t.data.length - 1 ? (s(), i("span", {
99
+ key: 0,
100
+ class: l(e(a)("spliter"))
101
+ }, r(t.separator), 3)) : y("", !0)
102
+ ], 64))), 128))
103
+ ])
104
+ ], 6)
105
+ ]),
106
+ _: 3
107
+ }, 8, ["type", "class"])
108
+ ], 2));
109
+ }
110
+ });
111
+ export {
112
+ _ as default
113
+ };
@@ -0,0 +1,26 @@
1
+ export interface ApExpandAlertProps {
2
+ /**
3
+ * Alert类型
4
+ */
5
+ type: 'warning' | 'error' | 'success' | 'info' | undefined;
6
+ /**
7
+ * 展开数据
8
+ */
9
+ data: Array<any> | string;
10
+ /**
11
+ * 标题前缀
12
+ */
13
+ prefix?: string;
14
+ /**
15
+ * Tooltip 提示标题
16
+ */
17
+ tipTitle?: string;
18
+ /**
19
+ * Label映射字段
20
+ */
21
+ mapLabel?: string;
22
+ /**
23
+ * 分隔符
24
+ */
25
+ separator: string;
26
+ }
@@ -0,0 +1,42 @@
1
+ .aplus-ap-expand-alert .aplus-action-item {
2
+ font-size: 12px;
3
+ }
4
+ .aplus-ap-expand-alert__expandText {
5
+ font-size: 12px;
6
+ margin-inline-end: 4px;
7
+ margin-inline-start: 4px;
8
+ }
9
+ .aplus-ap-expand-alert__expandIcon {
10
+ transition: all 0.3s;
11
+ transform: rotateZ(180deg);
12
+ }
13
+ .aplus-ap-expand-alert__collapseIcon {
14
+ transition: all 0.3s;
15
+ transform: rotateZ(0deg);
16
+ }
17
+ .aplus-ap-expand-alert__alertContent {
18
+ color: #182948;
19
+ }
20
+ .aplus-ap-expand-alert__prefix {
21
+ color: #182948;
22
+ }
23
+ .aplus-ap-expand-alert__showItem {
24
+ color: #0070ff;
25
+ cursor: pointer;
26
+ white-space: nowrap;
27
+ }
28
+ .aplus-ap-expand-alert__showItem:hover {
29
+ color: #66a9ff;
30
+ }
31
+ .aplus-ap-expand-alert__spliter {
32
+ color: #dee4ed;
33
+ padding: 0 8px;
34
+ }
35
+ .aplus-ap-expand-alert__antAlert.ant-alert {
36
+ align-items: flex-start;
37
+ line-height: 18px;
38
+ }
39
+ .aplus-ap-expand-alert__antAlert.ant-alert .ant-alert-icon {
40
+ font-size: 16px;
41
+ transform: translateY(2px);
42
+ }