@aplus-frontend/ui 7.17.1 → 7.17.2
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 +29 -31
- package/es/src/ag-grid/editable/form-item.vue.mjs +48 -48
- package/es/src/ap-field/cascader/index.vue.mjs +64 -67
- package/es/src/ap-field/interface.d.ts +6 -1
- package/es/src/ap-field/select/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.mjs +145 -134
- package/es/src/ap-field/select/read.vue2.mjs +1 -0
- package/es/src/ap-form/interface.d.ts +18 -0
- package/es/src/ap-form/items/select/index.vue.d.ts +8 -6
- package/es/src/ap-form/items/switch/index.vue.d.ts +1 -1
- package/es/src/ap-table/constants.d.ts +7 -6
- package/es/src/check-card/index.vue2.mjs +61 -64
- package/es/src/hooks/index.d.ts +0 -1
- package/es/src/hooks/index.mjs +10 -12
- package/es/src/version.d.ts +1 -1
- package/es/src/version.mjs +1 -1
- package/lib/index.js +1 -1
- package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
- package/lib/src/ap-field/cascader/index.vue.js +1 -1
- package/lib/src/ap-field/interface.d.ts +6 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.js +1 -1
- package/lib/src/ap-field/select/read.vue2.js +1 -1
- package/lib/src/ap-form/interface.d.ts +18 -0
- package/lib/src/ap-form/items/select/index.vue.d.ts +8 -6
- package/lib/src/ap-form/items/switch/index.vue.d.ts +1 -1
- package/lib/src/ap-table/constants.d.ts +7 -6
- package/lib/src/check-card/index.vue2.js +1 -1
- package/lib/src/hooks/index.d.ts +0 -1
- package/lib/src/hooks/index.js +1 -1
- package/lib/src/version.d.ts +1 -1
- package/lib/src/version.js +1 -1
- package/package.json +1 -1
- package/es/src/hooks/useMessage.d.ts +0 -62
- package/es/src/hooks/useMessage.mjs +0 -86
- package/lib/src/hooks/useMessage.d.ts +0 -62
- package/lib/src/hooks/useMessage.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),S=require("@aplus-frontend/antdv"),V=require("lodash-unified");require("../render/index.js");require("../config-provider/index.js");require("../hooks/index.js");const q=require("./checked.svg.js"),N=require("./context.js"),P=require("./style/index.js"),_=require("../config-provider/hooks/use-namespace.js"),w=require("../hooks/useControllableValue.js"),m=require("../render/render.js"),E=["src"],T=e.defineComponent({name:"CheckCard",__name:"index",props:{bordered:{type:Boolean,default:!0},disabled:{type:Boolean},loading:{type:Boolean},size:{default:"middle"},stopPropagation:{type:[Boolean,Function],default:!1},indicatorSize:{default:void 0},style:{default:void 0},checked:{type:Boolean,default:void 0},"onUpdate:checked":{},defaultChecked:{type:Boolean},value:{type:[String,Number,Boolean]},title:{},content:{}},emits:["update:checked"],setup(v,{emit:k}){const l=v,{b:g,m:u,e:c,em:d}=_.useNamespace("check-card"),h=P.default("check-card"),b=k,r=N.useInjectCheckCard(),{value:o,updateValue:i}=w.useControllableValue(l,b,{valuePropName:"checked",defaultValuePropName:"defaultChecked"}),a=e.computed(()=>{const t={...l},n=e.unref(r);return n&&(t.disabled=t.disabled||n.disabled,t.bordered=t.bordered||n.bordered,t.loading=t.loading||n.loading,t.size=t.size||n.size,t.indicatorSize=t.indicatorSize||n.indicatorSize,t.stopPropagation=t.stopPropagation||n.stopPropagation,t.style=t.style?t.style:n.style),t}),y=e.computed(()=>{const t=e.unref(a);return[g(),u(t.size),e.unref(o)?u("checked"):null,t.bordered?u("bordered"):null,t.disabled?u("disabled"):null,h.value]}),C=e.computed(()=>{const t=e.unref(a);return{...t.style||{},"--check-card-indicator-size":`${t.indicatorSize||14}px`}});function s(t,n){return t==null?null:V.isFunction(t)?t(n):e.createVNode(e.Fragment,null,[t])}const f=e.computed(()=>s(l.title,e.unref(o))),p=e.computed(()=>s(l.content,e.unref(o)));function B(t){const n=e.unref(a).stopPropagation;return n?n===!0?t.target!==t.currentTarget:n(t):!1}function z(t){B(t)||a.value.loading||a.value.disabled||(r.value?r.value?.toggleOption?.(l.value):i(!e.unref(o)))}return e.watch(()=>r.value,t=>{if(!t)return;const n=t.multiple?(t.value||[]).includes(l.value):t.value===l.value;i(n)},{immediate:!0}),e.watchEffect(t=>{r.value?.registerValue?.(l.value),t(()=>r.value?.cancelValue?.(l.value))}),(t,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(C.value),class:e.normalizeClass(y.value),onClick:e.withModifiers(z,["stop"])},[a.value.loading?(e.openBlock(),e.createBlock(e.unref(S.Skeleton),{key:0,active:""})):e.renderSlot(t.$slots,"default",{key:1,checked:e.unref(o)},()=>[f.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([e.unref(c)("title"),a.value.disabled?e.unref(d)("title","disabled"):null])},[e.createVNode(e.unref(m.default),{node:f.value},null,8,["node"])],2)):e.createCommentVNode("",!0),p.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass([e.unref(c)("content"),a.value.disabled?e.unref(d)("content","disabled"):null])},[e.createVNode(e.unref(m.default),{node:p.value},null,8,["node"])],2)):e.createCommentVNode("",!0)]),e.unref(o)?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(c)("checked-icon"))},[e.createElementVNode("img",{src:e.unref(q.default)},null,8,E)],2)):e.createCommentVNode("",!0)],6))}});exports.default=T;
|
package/lib/src/hooks/index.d.ts
CHANGED
package/lib/src/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./useControllableValue.js"),u=require("./useManualRef.js"),l=require("./useThrottleRef.js"),s=require("./useFullScreen.js"),r=require("./useResize.js");exports.useControllableValue=e.useControllableValue;exports.useManualRef=u.useManualRef;exports.useThrottleRef=l.useThrottleRef;exports.useFullScreen=s.useFullScreen;exports.useResize=r.useResize;
|
package/lib/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "7.17.
|
|
1
|
+
declare const _default: "7.17.2";
|
|
2
2
|
export default _default;
|
package/lib/src/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.17.
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="7.17.2";exports.default=e;
|
package/package.json
CHANGED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ModalFuncProps } from '@aplus-frontend/antdv/lib/modal/Modal';
|
|
2
|
-
import { NotificationArgsProps, ConfigProps } from '@aplus-frontend/antdv/lib/notification';
|
|
3
|
-
import { ModalFuncProps } from '@aplus-frontend/antdv';
|
|
4
|
-
import { MessageApi } from '@aplus-frontend/antdv/es/message';
|
|
5
|
-
export interface NotifyApi {
|
|
6
|
-
info(config: NotificationArgsProps): void;
|
|
7
|
-
success(config: NotificationArgsProps): void;
|
|
8
|
-
error(config: NotificationArgsProps): void;
|
|
9
|
-
warn(config: NotificationArgsProps): void;
|
|
10
|
-
warning(config: NotificationArgsProps): void;
|
|
11
|
-
open(args: NotificationArgsProps): void;
|
|
12
|
-
close(key: string): void;
|
|
13
|
-
config(options: ConfigProps): void;
|
|
14
|
-
destroy(): void;
|
|
15
|
-
}
|
|
16
|
-
export declare type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
17
|
-
export declare type IconType = 'success' | 'info' | 'error' | 'warning';
|
|
18
|
-
export interface ModalOptionsEx extends Omit<ModalFuncProps, 'iconType'> {
|
|
19
|
-
iconType: 'warning' | 'success' | 'error' | 'info';
|
|
20
|
-
}
|
|
21
|
-
export type ModalOptionsPartial = Partial<ModalOptionsEx> & Pick<ModalOptionsEx, 'content'>;
|
|
22
|
-
/**
|
|
23
|
-
* @description: Create confirmation box
|
|
24
|
-
*/
|
|
25
|
-
declare function createConfirm(options: ModalOptionsEx): {
|
|
26
|
-
destroy: () => void;
|
|
27
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
28
|
-
};
|
|
29
|
-
declare function createSuccessModal(options: ModalOptionsPartial): {
|
|
30
|
-
destroy: () => void;
|
|
31
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
32
|
-
};
|
|
33
|
-
declare function createErrorModal(options: ModalOptionsPartial): {
|
|
34
|
-
destroy: () => void;
|
|
35
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
36
|
-
};
|
|
37
|
-
declare function createInfoModal(options: ModalOptionsPartial): {
|
|
38
|
-
destroy: () => void;
|
|
39
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
40
|
-
};
|
|
41
|
-
declare function createWarningModal(options: ModalOptionsPartial): {
|
|
42
|
-
destroy: () => void;
|
|
43
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
44
|
-
};
|
|
45
|
-
declare function createModal(options: ModalOptionsPartial, type: IconType): {
|
|
46
|
-
destroy: () => void;
|
|
47
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* @description: message
|
|
51
|
-
*/
|
|
52
|
-
export declare function useMessage(): {
|
|
53
|
-
createMessage: MessageApi;
|
|
54
|
-
notification: NotifyApi;
|
|
55
|
-
createConfirm: typeof createConfirm;
|
|
56
|
-
createSuccessModal: typeof createSuccessModal;
|
|
57
|
-
createErrorModal: typeof createErrorModal;
|
|
58
|
-
createInfoModal: typeof createInfoModal;
|
|
59
|
-
createWarningModal: typeof createWarningModal;
|
|
60
|
-
createModal: typeof createModal;
|
|
61
|
-
};
|
|
62
|
-
export {};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { createVNode as o } from "vue";
|
|
2
|
-
import { InfoCircleFilled as c, CheckCircleFilled as s, CloseCircleFilled as f } from "@ant-design/icons-vue";
|
|
3
|
-
import { Modal as r, notification as i, message as d } from "@aplus-frontend/antdv";
|
|
4
|
-
import { isString as m } from "lodash-unified";
|
|
5
|
-
import "../config-provider/index.mjs";
|
|
6
|
-
import { useLocale as g } from "../config-provider/hooks/use-locale.mjs";
|
|
7
|
-
function l(e) {
|
|
8
|
-
return e === "warning" ? o(c, {
|
|
9
|
-
class: "modal-icon-warning"
|
|
10
|
-
}, null) : e === "success" ? o(s, {
|
|
11
|
-
class: "modal-icon-success"
|
|
12
|
-
}, null) : e === "info" ? o(c, {
|
|
13
|
-
class: "modal-icon-info"
|
|
14
|
-
}, null) : o(f, {
|
|
15
|
-
class: "modal-icon-error"
|
|
16
|
-
}, null);
|
|
17
|
-
}
|
|
18
|
-
function a({
|
|
19
|
-
content: e
|
|
20
|
-
}) {
|
|
21
|
-
return m(e) ? o("div", {
|
|
22
|
-
innerHTML: `<div>${e}</div>`
|
|
23
|
-
}, null) : e;
|
|
24
|
-
}
|
|
25
|
-
function p(e) {
|
|
26
|
-
const n = e.iconType || "warning";
|
|
27
|
-
Reflect.deleteProperty(e, "iconType");
|
|
28
|
-
const u = {
|
|
29
|
-
centered: !0,
|
|
30
|
-
icon: l(n),
|
|
31
|
-
...e,
|
|
32
|
-
content: a(e)
|
|
33
|
-
};
|
|
34
|
-
return r.confirm(u);
|
|
35
|
-
}
|
|
36
|
-
const M = () => {
|
|
37
|
-
const {
|
|
38
|
-
t: e
|
|
39
|
-
} = g();
|
|
40
|
-
return {
|
|
41
|
-
okText: e("ap.common.okText"),
|
|
42
|
-
centered: !0
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
function t(e, n) {
|
|
46
|
-
return {
|
|
47
|
-
...M(),
|
|
48
|
-
...e,
|
|
49
|
-
content: a(e),
|
|
50
|
-
icon: l(n)
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
function C(e) {
|
|
54
|
-
return r.success(t(e, "success"));
|
|
55
|
-
}
|
|
56
|
-
function w(e) {
|
|
57
|
-
return r.error(t(e, "error"));
|
|
58
|
-
}
|
|
59
|
-
function T(e) {
|
|
60
|
-
return r.info(t(e, "info"));
|
|
61
|
-
}
|
|
62
|
-
function k(e) {
|
|
63
|
-
return r.warning(t(e, "warning"));
|
|
64
|
-
}
|
|
65
|
-
function v(e, n) {
|
|
66
|
-
return r[n](t(e, n));
|
|
67
|
-
}
|
|
68
|
-
i.config({
|
|
69
|
-
placement: "topRight",
|
|
70
|
-
duration: 3
|
|
71
|
-
});
|
|
72
|
-
function R() {
|
|
73
|
-
return {
|
|
74
|
-
createMessage: d,
|
|
75
|
-
notification: i,
|
|
76
|
-
createConfirm: p,
|
|
77
|
-
createSuccessModal: C,
|
|
78
|
-
createErrorModal: w,
|
|
79
|
-
createInfoModal: T,
|
|
80
|
-
createWarningModal: k,
|
|
81
|
-
createModal: v
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
export {
|
|
85
|
-
R as useMessage
|
|
86
|
-
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { ModalFuncProps } from '@aplus-frontend/antdv/lib/modal/Modal';
|
|
2
|
-
import { NotificationArgsProps, ConfigProps } from '@aplus-frontend/antdv/lib/notification';
|
|
3
|
-
import { ModalFuncProps } from '@aplus-frontend/antdv';
|
|
4
|
-
import { MessageApi } from '@aplus-frontend/antdv/es/message';
|
|
5
|
-
export interface NotifyApi {
|
|
6
|
-
info(config: NotificationArgsProps): void;
|
|
7
|
-
success(config: NotificationArgsProps): void;
|
|
8
|
-
error(config: NotificationArgsProps): void;
|
|
9
|
-
warn(config: NotificationArgsProps): void;
|
|
10
|
-
warning(config: NotificationArgsProps): void;
|
|
11
|
-
open(args: NotificationArgsProps): void;
|
|
12
|
-
close(key: string): void;
|
|
13
|
-
config(options: ConfigProps): void;
|
|
14
|
-
destroy(): void;
|
|
15
|
-
}
|
|
16
|
-
export declare type NotificationPlacement = 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight';
|
|
17
|
-
export declare type IconType = 'success' | 'info' | 'error' | 'warning';
|
|
18
|
-
export interface ModalOptionsEx extends Omit<ModalFuncProps, 'iconType'> {
|
|
19
|
-
iconType: 'warning' | 'success' | 'error' | 'info';
|
|
20
|
-
}
|
|
21
|
-
export type ModalOptionsPartial = Partial<ModalOptionsEx> & Pick<ModalOptionsEx, 'content'>;
|
|
22
|
-
/**
|
|
23
|
-
* @description: Create confirmation box
|
|
24
|
-
*/
|
|
25
|
-
declare function createConfirm(options: ModalOptionsEx): {
|
|
26
|
-
destroy: () => void;
|
|
27
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
28
|
-
};
|
|
29
|
-
declare function createSuccessModal(options: ModalOptionsPartial): {
|
|
30
|
-
destroy: () => void;
|
|
31
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
32
|
-
};
|
|
33
|
-
declare function createErrorModal(options: ModalOptionsPartial): {
|
|
34
|
-
destroy: () => void;
|
|
35
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
36
|
-
};
|
|
37
|
-
declare function createInfoModal(options: ModalOptionsPartial): {
|
|
38
|
-
destroy: () => void;
|
|
39
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
40
|
-
};
|
|
41
|
-
declare function createWarningModal(options: ModalOptionsPartial): {
|
|
42
|
-
destroy: () => void;
|
|
43
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
44
|
-
};
|
|
45
|
-
declare function createModal(options: ModalOptionsPartial, type: IconType): {
|
|
46
|
-
destroy: () => void;
|
|
47
|
-
update: (newConfig: ModalFuncProps) => void;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* @description: message
|
|
51
|
-
*/
|
|
52
|
-
export declare function useMessage(): {
|
|
53
|
-
createMessage: MessageApi;
|
|
54
|
-
notification: NotifyApi;
|
|
55
|
-
createConfirm: typeof createConfirm;
|
|
56
|
-
createSuccessModal: typeof createSuccessModal;
|
|
57
|
-
createErrorModal: typeof createErrorModal;
|
|
58
|
-
createInfoModal: typeof createInfoModal;
|
|
59
|
-
createWarningModal: typeof createWarningModal;
|
|
60
|
-
createModal: typeof createModal;
|
|
61
|
-
};
|
|
62
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("vue"),c=require("@ant-design/icons-vue"),n=require("@aplus-frontend/antdv"),u=require("lodash-unified");require("../config-provider/index.js");const s=require("../config-provider/hooks/use-locale.js");function i(e){return e==="warning"?o.createVNode(c.InfoCircleFilled,{class:"modal-icon-warning"},null):e==="success"?o.createVNode(c.CheckCircleFilled,{class:"modal-icon-success"},null):e==="info"?o.createVNode(c.InfoCircleFilled,{class:"modal-icon-info"},null):o.createVNode(c.CloseCircleFilled,{class:"modal-icon-error"},null)}function a({content:e}){return u.isString(e)?o.createVNode("div",{innerHTML:`<div>${e}</div>`},null):e}function d(e){const r=e.iconType||"warning";Reflect.deleteProperty(e,"iconType");const l={centered:!0,icon:i(r),...e,content:a(e)};return n.Modal.confirm(l)}const f=()=>{const{t:e}=s.useLocale();return{okText:e("ap.common.okText"),centered:!0}};function t(e,r){return{...f(),...e,content:a(e),icon:i(r)}}function g(e){return n.Modal.success(t(e,"success"))}function M(e){return n.Modal.error(t(e,"error"))}function m(e){return n.Modal.info(t(e,"info"))}function C(e){return n.Modal.warning(t(e,"warning"))}function q(e,r){return n.Modal[r](t(e,r))}n.notification.config({placement:"topRight",duration:3});function v(){return{createMessage:n.message,notification:n.notification,createConfirm:d,createSuccessModal:g,createErrorModal:M,createInfoModal:m,createWarningModal:C,createModal:q}}exports.useMessage=v;
|