@para-ui/core 5.0.0-beta.2 → 5.0.0-beta.4
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/README.md +14 -0
- package/es/Argv/batchEdit/index.js +1 -1
- package/es/CodeEditor/index.js +1 -1
- package/es/ComboSelect/index.d.ts +2 -2
- package/es/InputCode/index.js +1 -1
- package/es/Message/index.js +16 -10
- package/es/Tooltip/index.d.ts +2 -2
- package/es/Upload/index.d.ts +2 -2
- package/es/_virtual/index3.js +2 -2
- package/es/_virtual/index4.js +2 -2
- package/es/node_modules/@para-snack/core/dist/index.js +1 -1
- package/es/node_modules/classnames/index.js +1 -1
- package/lib/ComboSelect/index.d.ts +2 -2
- package/lib/Message/index.js +2 -2
- package/lib/Tooltip/index.d.ts +2 -2
- package/lib/Upload/index.d.ts +2 -2
- package/package.json +1 -1
- /package/es/{InputCode → CodeEditor}/index.css +0 -0
package/README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## 🎉 para-ui/core@5.0.0-beta.4 发布
|
|
2
|
+
|
|
3
|
+
🔧【Bugfix】
|
|
4
|
+
|
|
5
|
+
- 【组合选择器-ComboSelect】补充导出 SelectOpt、SelectedOptions 类型
|
|
6
|
+
- 【文字提示-Tooltip】补充导出 TooltipPlacement 类型
|
|
7
|
+
- 【上传-Upload】补充导出 UploadFile、RcFile 类型
|
|
8
|
+
|
|
9
|
+
## 🎉 para-ui/core@5.0.0-beta.3 发布
|
|
10
|
+
|
|
11
|
+
🔧【Bugfix】
|
|
12
|
+
|
|
13
|
+
- 【全局提示-Message】修复在iframe中跨域访问window.top导致报错的问题
|
|
14
|
+
|
|
1
15
|
## 🎉 para-ui/core@4.0.83 发布
|
|
2
16
|
|
|
3
17
|
🔧【Bugfix】
|
|
@@ -7,7 +7,7 @@ import { Message as h } from "../../Message/index.js";
|
|
|
7
7
|
import k from "../../GlobalContext/useFormatMessage.js";
|
|
8
8
|
import { $prefixCls as g } from "../../GlobalContext/constant.js";
|
|
9
9
|
import x from "../lang/index.js";
|
|
10
|
-
import '../../
|
|
10
|
+
import '../../CodeEditor/index.css';/* empty css */
|
|
11
11
|
const B = (c) => {
|
|
12
12
|
const i = k("Argv", x), { className: u, sourceData: t, onFinish: m, dataToJson: s, jsonToData: a } = c, [e, o] = j({
|
|
13
13
|
open: !1,
|
package/es/CodeEditor/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { $prefixCls as tr } from "../GlobalContext/constant.js";
|
|
|
7
7
|
import { d as gr } from "../_virtual/index.js";
|
|
8
8
|
import { Loading as fr } from "../Loading/index.js";
|
|
9
9
|
import hr from "./lang/index.js";
|
|
10
|
-
import '
|
|
10
|
+
import './index.css';/* empty css */
|
|
11
11
|
var kr = /* @__PURE__ */ ((r) => (r[r.Method = 0] = "Method", r[r.Function = 1] = "Function", r[r.Constructor = 2] = "Constructor", r[r.Field = 3] = "Field", r[r.Variable = 4] = "Variable", r[r.Class = 5] = "Class", r[r.Struct = 6] = "Struct", r[r.Interface = 7] = "Interface", r[r.Module = 8] = "Module", r[r.Property = 9] = "Property", r[r.Event = 10] = "Event", r[r.Operator = 11] = "Operator", r[r.Unit = 12] = "Unit", r[r.Value = 13] = "Value", r[r.Constant = 14] = "Constant", r[r.Enum = 15] = "Enum", r[r.EnumMember = 16] = "EnumMember", r[r.Keyword = 17] = "Keyword", r[r.Text = 18] = "Text", r[r.Color = 19] = "Color", r[r.File = 20] = "File", r[r.Reference = 21] = "Reference", r[r.Customcolor = 22] = "Customcolor", r[r.Folder = 23] = "Folder", r[r.TypeParameter = 24] = "TypeParameter", r[r.User = 25] = "User", r[r.Issue = 26] = "Issue", r[r.Snippet = 27] = "Snippet", r))(kr || {});
|
|
12
12
|
const wr = (r) => {
|
|
13
13
|
const {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { ComboSelectProps } from './interface';
|
|
2
|
+
import { ComboSelectProps, SelectedOptions, SelectOpt } from './interface';
|
|
3
3
|
export declare const ComboSelect: FunctionComponent<ComboSelectProps>;
|
|
4
|
-
export type { ComboSelectProps };
|
|
4
|
+
export type { ComboSelectProps, SelectOpt, SelectedOptions };
|
|
5
5
|
export default ComboSelect;
|
package/es/InputCode/index.js
CHANGED
package/es/Message/index.js
CHANGED
|
@@ -12,7 +12,13 @@ const w = {
|
|
|
12
12
|
warn: /* @__PURE__ */ p.jsx(N, {}),
|
|
13
13
|
error: /* @__PURE__ */ p.jsx(D, {}),
|
|
14
14
|
success: /* @__PURE__ */ p.jsx(b, {})
|
|
15
|
-
}, _ = () =>
|
|
15
|
+
}, _ = () => {
|
|
16
|
+
try {
|
|
17
|
+
return window === window.top ? window : window.top;
|
|
18
|
+
} catch {
|
|
19
|
+
return window;
|
|
20
|
+
}
|
|
21
|
+
}, T = ({ icon: e, text: t, id: n, type: c, html: o, close: a, desc: i, hideIcon: l }) => {
|
|
16
22
|
let s = document.createElement("div");
|
|
17
23
|
s.className = "msg-item", s.id = n || "", s.innerHTML = `<div class="msg-wrapper message-fadeInDown ${a ? "message-close" : "message-no-close"} msg-${c}">
|
|
18
24
|
${e ? '<div class="msg-icon"></div>' : ""}
|
|
@@ -57,19 +63,19 @@ const w = {
|
|
|
57
63
|
), j = (e, { icon: t, text: n, id: c, type: o, html: a, close: i, desc: l, hideIcon: s }, u, m, f) => {
|
|
58
64
|
const r = T({ id: c, text: n, icon: t, type: o, html: a, close: i, desc: l, hideIcon: s });
|
|
59
65
|
f && r && r.classList.add("msg-item-fill"), e?.appendChild(r);
|
|
60
|
-
const
|
|
61
|
-
|
|
66
|
+
const h = document.querySelector(`#${c} .msg-icon`);
|
|
67
|
+
h && t && !s && v.render(t, h);
|
|
62
68
|
const x = document.querySelector(`#${c} .msg-close`);
|
|
63
69
|
x && v.render(/* @__PURE__ */ p.jsx(q, {}), x), m && setTimeout(() => {
|
|
64
70
|
document.querySelector(`#${r.id}`) && e?.removeChild(r);
|
|
65
71
|
}, u);
|
|
66
|
-
},
|
|
72
|
+
}, C = (e, t, n, c) => {
|
|
67
73
|
const o = () => _().__msg_conf__ || {};
|
|
68
|
-
let a = w[n], i = "", l = "", s = !1, u, m = !1, f = o().maxCount ?? 1 / 0, r = o().duration ?? t,
|
|
74
|
+
let a = w[n], i = "", l = "", s = !1, u, m = !1, f = o().maxCount ?? 1 / 0, r = o().duration ?? t, h = "";
|
|
69
75
|
const x = !isNaN(r) && r > 0;
|
|
70
76
|
typeof e == "string" ? i = e : typeof e == "object" && (i = e.text || "", l = e.desc, a = e.icon || w[n], s = e.html || !1, m = e.hideIcon || !1, e.maxCount > 0 && (f = e.maxCount || 1 / 0)), typeof e == "object" && typeof e.close == "boolean" ? u = e.close : u = !x;
|
|
71
77
|
let d = document.getElementById(c);
|
|
72
|
-
d || (d = document.createElement("div"), d.id = c, document.body.appendChild(d)), d.className = E(
|
|
78
|
+
d || (d = document.createElement("div"), d.id = c, document.body.appendChild(d)), d.className = E(h), d.className += ` ${y}-message-box--message-float`;
|
|
73
79
|
const S = I();
|
|
74
80
|
j(d, { id: S, text: i, icon: a, type: n, html: s, close: u, desc: l, hideIcon: m }, r, x), B(d, f);
|
|
75
81
|
}, E = (e) => `${y}-message-box${e ? ` ${e}` : ""}`, I = () => `msgitem_${String(Math.random() * 1e5 | 0 + (/* @__PURE__ */ new Date()).getTime())}`, B = (e, t) => {
|
|
@@ -85,10 +91,10 @@ const w = {
|
|
|
85
91
|
const t = _();
|
|
86
92
|
t.__msg_conf__ = e;
|
|
87
93
|
}, U = {
|
|
88
|
-
info: (e, t = 5e3) =>
|
|
89
|
-
warn: (e, t = 5e3) =>
|
|
90
|
-
error: (e, t = 5e3) =>
|
|
91
|
-
success: (e, t = 5e3) =>
|
|
94
|
+
info: (e, t = 5e3) => C(e, t, "info", g),
|
|
95
|
+
warn: (e, t = 5e3) => C(e, t, "warn", g),
|
|
96
|
+
error: (e, t = 5e3) => C(e, t, "error", g),
|
|
97
|
+
success: (e, t = 5e3) => C(e, t, "success", g),
|
|
92
98
|
clear: () => $(g),
|
|
93
99
|
destroyAll: () => $(g),
|
|
94
100
|
config: (e) => F(e)
|
package/es/Tooltip/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { TooltipProps } from './interface';
|
|
2
|
+
import { TooltipProps, TooltipPlacement } from './interface';
|
|
3
3
|
export declare const Tooltip: FC<TooltipProps>;
|
|
4
|
-
export type { TooltipProps };
|
|
4
|
+
export type { TooltipProps, TooltipPlacement };
|
|
5
5
|
export default Tooltip;
|
package/es/Upload/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { UploadProps } from './interface';
|
|
2
|
+
import { UploadProps, UploadFile, RcFile } from './interface';
|
|
3
3
|
import { default as ImageUpload, ImageUploadProps } from './ImageUpload';
|
|
4
4
|
import { default as Dragger, DraggerProps } from './Dragger';
|
|
5
5
|
import { default as ImgCrop, ImgCropProps } from './ImgCrop';
|
|
@@ -10,5 +10,5 @@ type MergedUploadType = typeof InternalUpload & {
|
|
|
10
10
|
ImgCrop: typeof ImgCrop;
|
|
11
11
|
};
|
|
12
12
|
declare const Upload: MergedUploadType;
|
|
13
|
-
export type { UploadProps, ImageUploadProps, DraggerProps, ImgCropProps };
|
|
13
|
+
export type { UploadProps, ImageUploadProps, DraggerProps, ImgCropProps, UploadFile, RcFile };
|
|
14
14
|
export default Upload;
|
package/es/_virtual/index3.js
CHANGED
package/es/_virtual/index4.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { ComboSelectProps } from './interface';
|
|
2
|
+
import { ComboSelectProps, SelectedOptions, SelectOpt } from './interface';
|
|
3
3
|
export declare const ComboSelect: FunctionComponent<ComboSelectProps>;
|
|
4
|
-
export type { ComboSelectProps };
|
|
4
|
+
export type { ComboSelectProps, SelectOpt, SelectedOptions };
|
|
5
5
|
export default ComboSelect;
|
package/lib/Message/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const f=require("../_virtual/jsx-runtime.js"),I=require("react"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});require('./index.css');const f=require("../_virtual/jsx-runtime.js"),I=require("react"),y=require("react-dom"),v=require("../node_modules/@para-ui/icons/WarningCircleF/index.js"),b=require("../node_modules/@para-ui/icons/CheckCircleF/index.js"),R=require("../node_modules/@para-ui/icons/Close/index.js"),L=require("../node_modules/@para-ui/icons/CloseCircleF/index.js"),w=require("../GlobalContext/constant.js");;/* empty css */const $={info:f.jsxRuntimeExports.jsx(v.WarningCircleF,{}),warn:f.jsxRuntimeExports.jsx(v.WarningCircleF,{}),error:f.jsxRuntimeExports.jsx(L.CloseCircleF,{}),success:f.jsxRuntimeExports.jsx(b.CheckCircleF,{})},N=()=>{try{return window===window.top?window:window.top}catch{return window}},T=({icon:e,text:s,id:o,type:i,html:n,close:l,desc:c,hideIcon:d})=>{let t=document.createElement("div");t.className="msg-item",t.id=o||"",t.innerHTML=`<div class="msg-wrapper message-fadeInDown ${l?"message-close":"message-no-close"} msg-${i}">
|
|
2
2
|
${e?'<div class="msg-icon"></div>':""}
|
|
3
3
|
<div class="msg-text"></div>
|
|
4
4
|
${l?'<div class="msg-close"></div>':""}
|
|
5
5
|
</div>
|
|
6
|
-
`;const u=t.querySelector(".msg-wrapper"),a=t.querySelector(".msg-text");if(!a||!u)return t;if(n?a.innerHTML=s:a.textContent=s,c){const r=document.createElement("span");r.className="msg-desc",r.textContent=c||"",a.classList.add("msg-text--title"),u.classList.add("msg-wrapper-title"),a.appendChild(r)}d&&a.classList.add("msg-text--noicon");const g=t.querySelector(".msg-close");return g&&g.addEventListener("click",()=>{document.querySelector(`#${o}`)&&(t?.parentNode?.removeChild(t),t=null)}),t},B=e=>{const{className:s,style:o,type:i}=e,n=q(),l=_();let c=M(e.className||"");return s&&(c+=` ${s}`),I.useEffect(()=>{const d=document.getElementById(n);return E(d,{...e,id:l,icon:$[i]},0,!1,!0),()=>{const t=document.querySelector(`#${l}`);t&&d?.removeChild(t)}},[...Object.values(e)]),f.jsxRuntimeExports.jsx("div",{id:n,className:c,style:o})},q=()=>`msgbox_${String(Math.random()*1e5|0+new Date().getTime())}`,x=q(),D=()=>f.jsxRuntimeExports.jsx("div",{className:`${w.$prefixCls}-message-box`,id:x}),E=(e,{icon:s,text:o,id:i,type:n,html:l,close:c,desc:d,hideIcon:t},u,a,g)=>{const r=T({id:i,text:o,icon:s,type:n,html:l,close:c,desc:d,hideIcon:t});g&&r&&r.classList.add("msg-item-fill"),e?.appendChild(r);const C=document.querySelector(`#${i} .msg-icon`);C&&s&&!t&&
|
|
6
|
+
`;const u=t.querySelector(".msg-wrapper"),a=t.querySelector(".msg-text");if(!a||!u)return t;if(n?a.innerHTML=s:a.textContent=s,c){const r=document.createElement("span");r.className="msg-desc",r.textContent=c||"",a.classList.add("msg-text--title"),u.classList.add("msg-wrapper-title"),a.appendChild(r)}d&&a.classList.add("msg-text--noicon");const g=t.querySelector(".msg-close");return g&&g.addEventListener("click",()=>{document.querySelector(`#${o}`)&&(t?.parentNode?.removeChild(t),t=null)}),t},B=e=>{const{className:s,style:o,type:i}=e,n=q(),l=_();let c=M(e.className||"");return s&&(c+=` ${s}`),I.useEffect(()=>{const d=document.getElementById(n);return E(d,{...e,id:l,icon:$[i]},0,!1,!0),()=>{const t=document.querySelector(`#${l}`);t&&d?.removeChild(t)}},[...Object.values(e)]),f.jsxRuntimeExports.jsx("div",{id:n,className:c,style:o})},q=()=>`msgbox_${String(Math.random()*1e5|0+new Date().getTime())}`,x=q(),D=()=>f.jsxRuntimeExports.jsx("div",{className:`${w.$prefixCls}-message-box`,id:x}),E=(e,{icon:s,text:o,id:i,type:n,html:l,close:c,desc:d,hideIcon:t},u,a,g)=>{const r=T({id:i,text:o,icon:s,type:n,html:l,close:c,desc:d,hideIcon:t});g&&r&&r.classList.add("msg-item-fill"),e?.appendChild(r);const C=document.querySelector(`#${i} .msg-icon`);C&&s&&!t&&y.render(s,C);const p=document.querySelector(`#${i} .msg-close`);p&&y.render(f.jsxRuntimeExports.jsx(R.Close,{}),p),a&&setTimeout(()=>{document.querySelector(`#${r.id}`)&&e?.removeChild(r)},u)},h=(e,s,o,i)=>{const n=()=>N().__msg_conf__||{};let l=$[o],c="",d="",t=!1,u,a=!1,g=n().maxCount??1/0,r=n().duration??s,C="";const p=!isNaN(r)&&r>0;typeof e=="string"?c=e:typeof e=="object"&&(c=e.text||"",d=e.desc,l=e.icon||$[o],t=e.html||!1,a=e.hideIcon||!1,e.maxCount>0&&(g=e.maxCount||1/0)),typeof e=="object"&&typeof e.close=="boolean"?u=e.close:u=!p;let m=document.getElementById(i);m||(m=document.createElement("div"),m.id=i,document.body.appendChild(m)),m.className=M(C),m.className+=` ${w.$prefixCls}-message-box--message-float`;const S=_();E(m,{id:S,text:c,icon:l,type:o,html:t,close:u,desc:d,hideIcon:a},r,p),F(m,g)},M=e=>`${w.$prefixCls}-message-box${e?` ${e}`:""}`,_=()=>`msgitem_${String(Math.random()*1e5|0+new Date().getTime())}`,F=(e,s)=>{if(!e||!e.children?.length)return;const o=e.children,i=o.length;if(i>s)for(let n=0;n<i;n++)n<s&&o[n]&&o[n].parentNode?.removeChild(o[n])},j=e=>{const s=document.getElementById(e);s&&(s.innerHTML="")},W=(e={})=>{const s=N();s.__msg_conf__=e},H={info:(e,s=5e3)=>h(e,s,"info",x),warn:(e,s=5e3)=>h(e,s,"warn",x),error:(e,s=5e3)=>h(e,s,"error",x),success:(e,s=5e3)=>h(e,s,"success",x),clear:()=>j(x),destroyAll:()=>j(x),config:e=>W(e)};exports.Message=H;exports.MessageBar=B;exports.default=D;
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/lib/Tooltip/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { TooltipProps } from './interface';
|
|
2
|
+
import { TooltipProps, TooltipPlacement } from './interface';
|
|
3
3
|
export declare const Tooltip: FC<TooltipProps>;
|
|
4
|
-
export type { TooltipProps };
|
|
4
|
+
export type { TooltipProps, TooltipPlacement };
|
|
5
5
|
export default Tooltip;
|
package/lib/Upload/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import { UploadProps } from './interface';
|
|
2
|
+
import { UploadProps, UploadFile, RcFile } from './interface';
|
|
3
3
|
import { default as ImageUpload, ImageUploadProps } from './ImageUpload';
|
|
4
4
|
import { default as Dragger, DraggerProps } from './Dragger';
|
|
5
5
|
import { default as ImgCrop, ImgCropProps } from './ImgCrop';
|
|
@@ -10,5 +10,5 @@ type MergedUploadType = typeof InternalUpload & {
|
|
|
10
10
|
ImgCrop: typeof ImgCrop;
|
|
11
11
|
};
|
|
12
12
|
declare const Upload: MergedUploadType;
|
|
13
|
-
export type { UploadProps, ImageUploadProps, DraggerProps, ImgCropProps };
|
|
13
|
+
export type { UploadProps, ImageUploadProps, DraggerProps, ImgCropProps, UploadFile, RcFile };
|
|
14
14
|
export default Upload;
|
package/package.json
CHANGED
|
File without changes
|