@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
@@ -1,14 +1,14 @@
1
- import { defineComponent as $, useSlots as j, ref as m, computed as b, unref as t, watch as q, cloneVNode as D, openBlock as h, createBlock as C, mergeProps as E, createSlots as K, withCtx as i, resolveDynamicComponent as O, createCommentVNode as Q, createElementVNode as U, normalizeClass as w, createVNode as g, normalizeStyle as G, renderList as H, renderSlot as J, normalizeProps as W, guardReactiveProps as X } from "vue";
2
- import { Form as Y, Tooltip as Z } from "ant-design-vue";
3
- import { useToken as M } from "ant-design-vue/es/theme/internal";
4
- import { isArray as ee, omit as k } from "lodash-unified";
5
- import { apFormItemColPropKeys as oe } from "./constant.mjs";
6
- import { QuestionCircleOutlined as te } from "@ant-design/icons-vue";
1
+ import { defineComponent as j, useSlots as q, ref as m, computed as B, unref as o, watch as D, cloneVNode as E, openBlock as h, createBlock as C, mergeProps as K, createSlots as O, withCtx as i, resolveDynamicComponent as Q, createCommentVNode as U, createElementVNode as w, normalizeClass as G, createVNode as g, normalizeStyle as H, renderList as J, renderSlot as W, normalizeProps as X, guardReactiveProps as Y } from "vue";
2
+ import { Form as Z, Tooltip as M } from "ant-design-vue";
3
+ import { useToken as ee } from "ant-design-vue/es/theme/internal";
4
+ import { isArray as oe, omit as k } from "lodash-unified";
5
+ import { apFormItemColPropKeys as te } from "./constant.mjs";
6
+ import { QuestionCircleOutlined as re } from "@ant-design/icons-vue";
7
7
  import "../config-provider/index.mjs";
8
8
  import { useInjectForm as le } from "./context.mjs";
9
9
  import "./style/ap-form-item.css";
10
- import { useNamespace as re } from "../config-provider/hooks/use-namespace.mjs";
11
- const ve = /* @__PURE__ */ $({
10
+ import { useNamespace as ae } from "../config-provider/hooks/use-namespace.mjs";
11
+ const ye = /* @__PURE__ */ j({
12
12
  name: "ApFormItem",
13
13
  __name: "ap-form-item",
14
14
  props: {
@@ -51,87 +51,91 @@ const ve = /* @__PURE__ */ $({
51
51
  },
52
52
  setup(N, { expose: P }) {
53
53
  var y, F;
54
- const o = N, l = j(), { model: u, updateModel: d } = le(), { m: f } = re("ap-form-item"), s = m(!1), r = m(), [, x] = M(), p = b(() => o.name ? ee(o.name) ? o.name.reduce((e, a) => e == null ? void 0 : e[a], t(u)) : u == null ? void 0 : u.value[o.name] : null), c = m((F = (y = l.default) == null ? void 0 : y.call(l)) == null ? void 0 : F[0]);
55
- q(
54
+ const t = N, r = q(), { model: u, updateModel: d } = le(), { m: f, b: x } = ae("ap-form-item"), s = m(!1), l = m(), [, V] = ee(), p = B(() => t.name ? oe(t.name) ? t.name.reduce((e, a) => e == null ? void 0 : e[a], o(u)) : u == null ? void 0 : u.value[t.name] : null), c = m((F = (y = r.default) == null ? void 0 : y.call(r)) == null ? void 0 : F[0]);
55
+ D(
56
56
  () => {
57
57
  var e;
58
- return (e = l.default) == null ? void 0 : e.call(l);
58
+ return (e = r.default) == null ? void 0 : e.call(r);
59
59
  },
60
60
  (e) => {
61
61
  c.value = e == null ? void 0 : e[0];
62
62
  }
63
63
  );
64
- function V(e) {
65
- d == null || d(o.name, e);
64
+ function I(e) {
65
+ d == null || d(t.name, e);
66
66
  }
67
- function I() {
67
+ function S() {
68
68
  s.value = !0;
69
69
  }
70
- function S() {
70
+ function _() {
71
71
  s.value = !1;
72
72
  }
73
- const v = b(() => {
73
+ const v = B(() => {
74
74
  var a, n;
75
- if (!o.name)
76
- return (a = l.default()) == null ? void 0 : a[0];
77
- const e = t(c);
78
- return e ? D(e, {
79
- [o.valuePropName]: t(p),
80
- [`onUpdate:${o.valuePropName}`]: V,
81
- bordered: o.bordered ? !1 : (n = e == null ? void 0 : e.props) == null ? void 0 : n.bordered,
82
- onFocus: I,
83
- onBlur: S
75
+ if (!t.name)
76
+ return (a = r.default()) == null ? void 0 : a[0];
77
+ const e = o(c);
78
+ return e ? E(e, {
79
+ [t.valuePropName]: o(p),
80
+ [`onUpdate:${t.valuePropName}`]: I,
81
+ bordered: t.bordered ? !1 : (n = e == null ? void 0 : e.props) == null ? void 0 : n.bordered,
82
+ onFocus: S,
83
+ onBlur: _
84
84
  }) : null;
85
85
  });
86
- function _() {
87
- var e;
88
- (e = r.value) == null || e.onFieldBlur();
89
- }
90
86
  function z() {
91
87
  var e;
92
- (e = r.value) == null || e.onFieldChange();
88
+ (e = l.value) == null || e.onFieldBlur();
93
89
  }
94
90
  function A() {
95
91
  var e;
96
- (e = r.value) == null || e.clearValidate();
92
+ (e = l.value) == null || e.onFieldChange();
97
93
  }
98
94
  function R() {
99
95
  var e;
100
- (e = r.value) == null || e.resetField();
96
+ (e = l.value) == null || e.clearValidate();
101
97
  }
102
98
  function T() {
103
- return t(p);
99
+ var e;
100
+ (e = l.value) == null || e.resetField();
101
+ }
102
+ function L() {
103
+ return o(p);
104
104
  }
105
105
  return P({
106
- onFieldBlur: _,
107
- onFieldChange: z,
108
- clearValidate: A,
109
- resetField: R,
110
- getFieldValue: T
111
- }), (e, a) => (h(), C(t(Y).Item, E({
106
+ onFieldBlur: z,
107
+ onFieldChange: A,
108
+ clearValidate: R,
109
+ resetField: T,
110
+ getFieldValue: L
111
+ }), (e, a) => (h(), C(o(Z).Item, K({
112
112
  ref_key: "formItemRef",
113
- ref: r
114
- }, t(k)(o, [...t(oe), "tooltip"]), {
115
- class: { [t(f)("bordered")]: e.bordered, [t(f)("focused")]: e.bordered && s.value },
116
- colon: e.bordered ? !1 : o.colon
117
- }), K({
113
+ ref: l
114
+ }, o(k)(t, [...o(te), "tooltip"]), {
115
+ class: {
116
+ [o(f)("bordered")]: e.bordered,
117
+ [o(f)("focused")]: e.bordered && s.value,
118
+ [o(x)()]: !0
119
+ },
120
+ colon: e.bordered ? !1 : t.colon
121
+ }), O({
118
122
  default: i(() => [
119
- v.value ? (h(), C(O(v.value), { key: 0 })) : Q("", !0)
123
+ v.value ? (h(), C(Q(v.value), { key: 0 })) : U("", !0)
120
124
  ]),
121
125
  _: 2
122
126
  }, [
123
- o.tooltip ? {
127
+ t.tooltip ? {
124
128
  name: "tooltip",
125
129
  fn: i(({ class: n }) => [
126
- U("span", {
127
- class: w(n)
130
+ w("span", {
131
+ class: G(n)
128
132
  }, [
129
- g(t(Z), {
130
- title: o.tooltip
133
+ g(o(M), {
134
+ title: t.tooltip
131
135
  }, {
132
136
  default: i(() => [
133
- g(t(te), {
134
- style: G({ color: t(x).colorPrimary })
137
+ g(o(re), {
138
+ style: H({ color: o(V).colorPrimary })
135
139
  }, null, 8, ["style"])
136
140
  ]),
137
141
  _: 1
@@ -140,15 +144,15 @@ const ve = /* @__PURE__ */ $({
140
144
  ]),
141
145
  key: "0"
142
146
  } : void 0,
143
- H(t(k)(l, "default"), (n, B) => ({
144
- name: B,
145
- fn: i((L) => [
146
- J(e.$slots, B, W(X(L || {})))
147
+ J(o(k)(r, "default"), (n, b) => ({
148
+ name: b,
149
+ fn: i(($) => [
150
+ W(e.$slots, b, X(Y($ || {})))
147
151
  ])
148
152
  }))
149
153
  ]), 1040, ["class", "colon"]));
150
154
  }
151
155
  });
152
156
  export {
153
- ve as default
157
+ ye as default
154
158
  };
@@ -147,7 +147,7 @@ const s = 24, Pe = /* @__PURE__ */ K({
147
147
  const v = p.props;
148
148
  return _ += v.span || r, Y(p, {
149
149
  span: v.span || r,
150
- key: `ApFormSearchFormItem-${c}`,
150
+ key: `ApFormSearchFormItem-${c}-${Date.now()}`,
151
151
  hidden: !t.forceExpand && o(u) && _ > x
152
152
  });
153
153
  }), H = s - Math.min(x, _) - r;
@@ -48,3 +48,14 @@
48
48
  border-color: #66a9ff;
49
49
  box-shadow: 0 0 0 2px rgba(5, 155, 255, 0.1);
50
50
  }
51
+ .aplus-ap-form-item .ant-form-show-help .ant-form-item-explain-error {
52
+ font-size: 12px;
53
+ line-height: 18px;
54
+ margin-top: 2px;
55
+ }
56
+ .aplus-ap-form-item .ant-col .ant-form-item-extra {
57
+ line-height: 22px;
58
+ min-height: unset;
59
+ margin-top: 4px;
60
+ margin-bottom: 12px;
61
+ }
@@ -0,0 +1,9 @@
1
+ import { Modal as _Modal } from 'ant-design-vue';
2
+ import { CreateModalFunc } from './type';
3
+
4
+ export * from './type';
5
+ type ApModalMixedProps = typeof _Modal & {
6
+ createModal: CreateModalFunc;
7
+ };
8
+ declare const ApModal: ApModalMixedProps;
9
+ export { ApModal };
@@ -0,0 +1,10 @@
1
+ import { Modal as r } from "ant-design-vue";
2
+ import "./utils/index.mjs";
3
+ import "./type.mjs";
4
+ import { createModal as a } from "./utils/createModal.mjs";
5
+ const o = r;
6
+ o.createModal = a;
7
+ o.name = "ApModal";
8
+ export {
9
+ o as ApModal
10
+ };
@@ -0,0 +1,13 @@
1
+ import { ModalProps } from 'ant-design-vue';
2
+
3
+ export type CreateModalFuncProps = Omit<ModalProps, 'open' | 'onUpdate:open' | 'destroyOnClose' | 'onCancel' | 'onOk' | 'getContainer'> & Partial<{
4
+ onCancel: (e: MouseEvent) => void | Promise<unknown>;
5
+ onOk: (e: MouseEvent) => void | Promise<unknown>;
6
+ getContainer: HTMLElement;
7
+ content: any;
8
+ }>;
9
+ export type CreateModalFuncReturn = {
10
+ destroy: () => void;
11
+ update: (newConfig: CreateModalFuncProps) => void;
12
+ };
13
+ export type CreateModalFunc = (props: CreateModalFuncProps) => CreateModalFuncReturn;
@@ -0,0 +1 @@
1
+
@@ -0,0 +1,3 @@
1
+ import { CreateModalFunc } from '../type';
2
+
3
+ export declare const createModal: CreateModalFunc;
@@ -0,0 +1,74 @@
1
+ import { render as d, defineComponent as h, createVNode as m, mergeProps as f, h as u } from "vue";
2
+ import { Modal as C } from "ant-design-vue";
3
+ const k = (a) => {
4
+ let r, t;
5
+ function s() {
6
+ r && r(!1), setTimeout(() => {
7
+ d(null, o), i.removeChild(o);
8
+ }, 500);
9
+ }
10
+ function c(e) {
11
+ t && t(e);
12
+ }
13
+ const l = /* @__PURE__ */ h({
14
+ data() {
15
+ return {
16
+ open: !0,
17
+ props: a
18
+ };
19
+ },
20
+ methods: {
21
+ async handleCancel(e) {
22
+ var n, p;
23
+ (n = this.props) != null && n.onCancel && await ((p = this.props) == null ? void 0 : p.onCancel(e)), s();
24
+ },
25
+ async handleOk(e) {
26
+ var n;
27
+ try {
28
+ t({
29
+ confirmLoading: !0
30
+ }), (n = this.props) != null && n.onOk && await this.props.onOk(e), t({
31
+ confirmLoading: !1
32
+ }), s();
33
+ } catch {
34
+ t({
35
+ confirmLoading: !1
36
+ });
37
+ }
38
+ }
39
+ },
40
+ created() {
41
+ r = (e) => {
42
+ this.open = e;
43
+ }, t = (e) => {
44
+ this.props = {
45
+ ...this.props,
46
+ ...e
47
+ };
48
+ };
49
+ },
50
+ render() {
51
+ const {
52
+ ...e
53
+ } = this.props;
54
+ return delete e.onCancel, delete e.onOk, m(C, f({
55
+ open: this.open,
56
+ destroyOnClose: !0,
57
+ onCancel: this.handleCancel,
58
+ onOk: this.handleOk
59
+ }, e), {
60
+ default: () => {
61
+ var n;
62
+ return [(n = this.props) == null ? void 0 : n.content];
63
+ }
64
+ });
65
+ }
66
+ }), i = a.getContainer || document.body, o = document.createElement("div");
67
+ return i.appendChild(o), d(u(l), o), {
68
+ destroy: s,
69
+ update: c
70
+ };
71
+ };
72
+ export {
73
+ k as createModal
74
+ };
@@ -0,0 +1 @@
1
+ export * from './createModal';
@@ -0,0 +1,4 @@
1
+ import { createModal as r } from "./createModal.mjs";
2
+ export {
3
+ r as createModal
4
+ };