@rainte/ant 0.0.58 → 0.0.67
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/dist/index.js +84 -102
- package/dist/index.umd.cjs +1 -1
- package/dist/types/components/Editor/index.d.ts +1 -1
- package/dist/types/components/Form/index.d.ts +1 -2
- package/dist/types/components/Layout/index.d.ts +5 -0
- package/dist/types/components/Provider/index.d.ts +4 -2
- package/dist/types/components/Table/index.d.ts +1 -2
- package/dist/types/components/Upload/index.d.ts +4 -4
- package/dist/types/lib.d.ts +1 -2
- package/dist/types/utils/antd.d.ts +8 -0
- package/dist/types/utils/router.d.ts +9 -0
- package/dist/types/views/form/index.d.ts +2 -1
- package/dist/types/views/layout/index.d.ts +9 -0
- package/dist/types/views/table/index.d.ts +2 -1
- package/package.json +6 -12
- package/dist/types/router/index.d.ts +0 -7
- package/dist/types/utils/dialog.d.ts +0 -22
- package/dist/types/utils/i18n.d.ts +0 -3
- package/dist/types/views/layout/blank/index.d.ts +0 -1
- package/dist/types/views/layout/menu/index.d.ts +0 -2
package/dist/index.js
CHANGED
|
@@ -1,105 +1,104 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { useContext as e, useEffect as t, useRef as n } from "react";
|
|
2
|
+
import r from "quill";
|
|
3
3
|
import "quill/dist/quill.snow.css";
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { BetaSchemaForm as
|
|
6
|
-
import { App as
|
|
7
|
-
import { AiOutlineUpload as
|
|
8
|
-
import { storage as m, system as h } from "@rainte/js";
|
|
9
|
-
import g, * as _ from "i18next";
|
|
10
|
-
import v from "i18next-http-backend";
|
|
11
|
-
import y from "i18next-browser-languagedetector";
|
|
4
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
5
|
+
import { BetaSchemaForm as o, ProForm as s, ProProvider as c, ProTable as l } from "@ant-design/pro-components";
|
|
6
|
+
import { App as u, Button as d, Space as f, Upload as p } from "antd";
|
|
7
|
+
import { AiOutlineUpload as m } from "react-icons/ai";
|
|
12
8
|
// \0rolldown/runtime.js
|
|
13
|
-
var
|
|
9
|
+
var h = Object.defineProperty, g = (e, t) => {
|
|
14
10
|
let n = {};
|
|
15
|
-
for (var r in e)
|
|
11
|
+
for (var r in e) h(n, r, {
|
|
16
12
|
get: e[r],
|
|
17
13
|
enumerable: !0
|
|
18
14
|
});
|
|
19
|
-
return t ||
|
|
20
|
-
}
|
|
21
|
-
if (t && typeof t == "object" || typeof t == "function") for (var i = S(t), a = 0, o = i.length, s; a < o; a++) s = i[a], !C.call(e, s) && s !== n && b(e, s, {
|
|
22
|
-
get: ((e) => t[e]).bind(null, s),
|
|
23
|
-
enumerable: !(r = x(t, s)) || r.enumerable
|
|
24
|
-
});
|
|
25
|
-
return e;
|
|
26
|
-
}, E = (e, t, n) => (T(e, t, "default"), n && T(n, t, "default"));
|
|
15
|
+
return t || h(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
16
|
+
};
|
|
27
17
|
// src/components/Editor/index.tsx
|
|
28
|
-
function
|
|
29
|
-
let { value: a, style: o, ...s } =
|
|
30
|
-
return
|
|
18
|
+
function _(e) {
|
|
19
|
+
let { value: a, style: o, ...s } = e, c = n(null), l = n(null);
|
|
20
|
+
return t(() => {
|
|
31
21
|
let e = c.current, t = document.createElement("div");
|
|
32
22
|
Object.assign(t.style, o ?? {});
|
|
33
|
-
let
|
|
23
|
+
let n = new r(e.appendChild(t), {
|
|
34
24
|
theme: "snow",
|
|
35
25
|
...s
|
|
36
26
|
});
|
|
37
|
-
l.current =
|
|
38
|
-
let i = () => s.onChange?.(
|
|
39
|
-
return
|
|
40
|
-
|
|
27
|
+
l.current = n;
|
|
28
|
+
let i = () => s.onChange?.(n.root.innerHTML || "");
|
|
29
|
+
return n.on("text-change", i), () => {
|
|
30
|
+
n.off("text-change", i), l.current = null, e.innerHTML = "";
|
|
41
31
|
};
|
|
42
|
-
}, []),
|
|
32
|
+
}, []), t(() => {
|
|
43
33
|
let e = l.current;
|
|
44
34
|
if (!e) return;
|
|
45
35
|
let t = a || "";
|
|
46
36
|
e.root.innerHTML !== t && e.clipboard.dangerouslyPasteHTML(t);
|
|
47
|
-
}, [a]), /* @__PURE__ */
|
|
37
|
+
}, [a]), /* @__PURE__ */ i("div", {
|
|
48
38
|
ref: c,
|
|
49
39
|
style: { height: "100%" }
|
|
50
40
|
});
|
|
51
41
|
}
|
|
52
42
|
// src/components/Upload/index.tsx
|
|
53
|
-
var
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
...
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
43
|
+
var v = (e) => {
|
|
44
|
+
if (Array.isArray(e)) return e;
|
|
45
|
+
if (e && typeof e == "object" && "fileList" in e) return e.fileList;
|
|
46
|
+
};
|
|
47
|
+
function y(e) {
|
|
48
|
+
let { value: t, onChange: n, maxCount: r = 1, multiple: a, listType: o, ...s } = e, c = v(t) ?? [], l = c.length >= r, u = o?.startsWith("picture-") ? /* @__PURE__ */ i(m, {}) : /* @__PURE__ */ i(d, {
|
|
49
|
+
icon: /* @__PURE__ */ i(m, {}),
|
|
50
|
+
children: "上传"
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ i(p, {
|
|
53
|
+
...s,
|
|
54
|
+
maxCount: r,
|
|
55
|
+
multiple: a ?? r > 1,
|
|
56
|
+
listType: o,
|
|
57
|
+
showUploadList: s.showUploadList ?? !0,
|
|
58
|
+
fileList: c,
|
|
59
|
+
onChange: (e) => n?.(e.fileList),
|
|
60
|
+
children: l ? null : u
|
|
67
61
|
});
|
|
68
62
|
}
|
|
69
63
|
// src/components/Provider/index.tsx
|
|
70
|
-
var
|
|
71
|
-
upload: { formItemRender: (e, t) => /* @__PURE__ */
|
|
72
|
-
editor: { formItemRender: (e, t) => /* @__PURE__ */
|
|
64
|
+
var b = {
|
|
65
|
+
upload: { formItemRender: (e, t) => /* @__PURE__ */ i(y, { ...t.fieldProps }) },
|
|
66
|
+
editor: { formItemRender: (e, t) => /* @__PURE__ */ i(_, { ...t.fieldProps }) }
|
|
73
67
|
};
|
|
74
|
-
function
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
68
|
+
function x({ children: t }) {
|
|
69
|
+
let n = e(c);
|
|
70
|
+
return /* @__PURE__ */ i(c.Provider, {
|
|
71
|
+
value: {
|
|
72
|
+
...n,
|
|
73
|
+
valueTypeMap: {
|
|
74
|
+
...n.valueTypeMap,
|
|
75
|
+
...b
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
children: t
|
|
78
79
|
});
|
|
79
80
|
}
|
|
80
81
|
// src/components/Form/index.tsx
|
|
81
|
-
var
|
|
82
|
+
var S = () => s.useForm()[0], C = (e) => /* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(o, {
|
|
82
83
|
layout: "horizontal",
|
|
83
84
|
colon: !1,
|
|
84
|
-
labelCol: { span: 3 },
|
|
85
|
-
wrapperCol: { span: 6 },
|
|
86
85
|
scrollToFirstError: !0,
|
|
87
|
-
submitter: { render: (e, t) => /* @__PURE__ */
|
|
86
|
+
submitter: { render: (e, t) => /* @__PURE__ */ i(s.Item, {
|
|
88
87
|
wrapperCol: {
|
|
89
88
|
offset: 4,
|
|
90
89
|
span: 8
|
|
91
90
|
},
|
|
92
|
-
children: /* @__PURE__ */
|
|
91
|
+
children: /* @__PURE__ */ i(f, { children: t })
|
|
93
92
|
}) },
|
|
94
93
|
...e
|
|
95
94
|
}) });
|
|
96
|
-
|
|
95
|
+
C.useForm = S;
|
|
97
96
|
// src/components/Table/index.tsx
|
|
98
|
-
function
|
|
99
|
-
return /* @__PURE__ */
|
|
97
|
+
function w(e) {
|
|
98
|
+
return /* @__PURE__ */ i(x, { children: /* @__PURE__ */ i(l, {
|
|
100
99
|
rowKey: "id",
|
|
101
100
|
pagination: { pageSize: 10 },
|
|
102
|
-
tableAlertRender: ({ selectedRowKeys: e }) => /* @__PURE__ */
|
|
101
|
+
tableAlertRender: ({ selectedRowKeys: e }) => /* @__PURE__ */ a(f, { children: [
|
|
103
102
|
"已选 ",
|
|
104
103
|
e.length,
|
|
105
104
|
" 项"
|
|
@@ -107,50 +106,33 @@ function P(e) {
|
|
|
107
106
|
...e
|
|
108
107
|
}) });
|
|
109
108
|
}
|
|
110
|
-
// src/utils/
|
|
111
|
-
var
|
|
112
|
-
|
|
113
|
-
message: () =>
|
|
114
|
-
modal: () =>
|
|
115
|
-
notification: () =>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return
|
|
121
|
-
}, B = {
|
|
122
|
-
confirm: (e) => R.confirm({
|
|
109
|
+
// src/utils/antd.ts
|
|
110
|
+
var T = /* @__PURE__ */ g({
|
|
111
|
+
AntdAppHolder: () => k,
|
|
112
|
+
message: () => j,
|
|
113
|
+
modal: () => A,
|
|
114
|
+
notification: () => O
|
|
115
|
+
}), E, D, O, k = () => {
|
|
116
|
+
let e = u.useApp();
|
|
117
|
+
return E = e.message, D = e.modal, O = e.notification, null;
|
|
118
|
+
}, A = new Proxy({}, { get(e, t) {
|
|
119
|
+
return t === "confirm" ? (e) => D.confirm({
|
|
123
120
|
title: "提示",
|
|
124
121
|
content: "确认操作?",
|
|
125
122
|
...e
|
|
126
|
-
})
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
123
|
+
}) : D[t];
|
|
124
|
+
} }), j = new Proxy({}, { get(e, t) {
|
|
125
|
+
return t === "success" ? (e = "操作成功", t, n) => E.success(e, t, n) : E[t];
|
|
126
|
+
} }), M = /* @__PURE__ */ g({ onUpload: () => N }), N = async (e) => {
|
|
127
|
+
let { file: t, onProgress: n, onSuccess: r, onError: i } = e, a = URL.createObjectURL(t);
|
|
128
|
+
try {
|
|
129
|
+
await new Promise((e) => {
|
|
130
|
+
let t = 0, r = setInterval(() => {
|
|
131
|
+
t = Math.min(t + Math.floor(Math.random() * 10) + 1, 99), n?.({ percent: t }), t >= 99 && (clearInterval(r), e());
|
|
132
|
+
}, 100);
|
|
133
|
+
}), n?.({ percent: 100 }), t.url = a, r?.({ url: a });
|
|
134
|
+
} catch (e) {
|
|
135
|
+
URL.revokeObjectURL(a), i?.(e);
|
|
136
136
|
}
|
|
137
|
-
}, V = /* @__PURE__ */ w({
|
|
138
|
-
KEY: () => H,
|
|
139
|
-
LNG_ZH: () => "zh"
|
|
140
|
-
});
|
|
141
|
-
E(V, _);
|
|
142
|
-
var H = "i18nextLng";
|
|
143
|
-
g.use(v).use(y).init({
|
|
144
|
-
lng: m.local.getRaw(H, "zh"),
|
|
145
|
-
fallbackLng: "zh",
|
|
146
|
-
backend: { loadPath: "/locales/{{lng}}/{{ns}}.json" },
|
|
147
|
-
interpolation: { escapeValue: !1 }
|
|
148
|
-
});
|
|
149
|
-
// src/utils/misc.ts
|
|
150
|
-
var U = /* @__PURE__ */ w({ onUpload: () => W }), W = async (e) => {
|
|
151
|
-
let { file: t, onProgress: n, onSuccess: r } = e, i = 0, a = setInterval(() => {
|
|
152
|
-
i += Math.floor(Math.random() * 10), i >= 100 && (i = 99), n({ percent: i });
|
|
153
|
-
}, 100);
|
|
154
|
-
t.url = URL.createObjectURL(t), r?.({ url: t.url }), clearInterval(a);
|
|
155
137
|
};
|
|
156
|
-
export {
|
|
138
|
+
export { _ as Editor, C as Form, x as Provider, w as Table, y as Upload, T as antd, M as misc };
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("quill"),require("quill/dist/quill.snow.css"),require("react/jsx-runtime"),require("@ant-design/pro-components"),require("antd"),require("react-icons/ai")
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("react"),require("quill"),require("quill/dist/quill.snow.css"),require("react/jsx-runtime"),require("@ant-design/pro-components"),require("antd"),require("react-icons/ai")):typeof define==`function`&&define.amd?define([`exports`,`react`,`quill`,`quill/dist/quill.snow.css`,`react/jsx-runtime`,`@ant-design/pro-components`,`antd`,`react-icons/ai`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`@rainte/ant`]={},e.React,e.Quill,e.QuillSnowCSS,e.ReactJSXRuntime,e.ProComponents,e.antd,e.ReactIconsAI))})(this,function(e,t,n,r,i,a,o,s){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var c=Object.create,l=Object.defineProperty,u=Object.getOwnPropertyDescriptor,d=Object.getOwnPropertyNames,f=Object.getPrototypeOf,p=Object.prototype.hasOwnProperty,m=(e,t)=>{let n={};for(var r in e)l(n,r,{get:e[r],enumerable:!0});return t||l(n,Symbol.toStringTag,{value:`Module`}),n},h=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var i=d(t),a=0,o=i.length,s;a<o;a++)s=i[a],!p.call(e,s)&&s!==n&&l(e,s,{get:(e=>t[e]).bind(null,s),enumerable:!(r=u(t,s))||r.enumerable});return e};n=((e,t,n)=>(n=e==null?{}:c(f(e)),h(l(n,`default`,{value:e,enumerable:!0}),e)))(n,1);function g(e){let{value:r,style:a,...o}=e,s=(0,t.useRef)(null),c=(0,t.useRef)(null);return(0,t.useEffect)(()=>{let e=s.current,t=document.createElement(`div`);Object.assign(t.style,a??{});let r=new n.default(e.appendChild(t),{theme:`snow`,...o});c.current=r;let i=()=>o.onChange?.(r.root.innerHTML||``);return r.on(`text-change`,i),()=>{r.off(`text-change`,i),c.current=null,e.innerHTML=``}},[]),(0,t.useEffect)(()=>{let e=c.current;if(!e)return;let t=r||``;e.root.innerHTML!==t&&e.clipboard.dangerouslyPasteHTML(t)},[r]),(0,i.jsx)(`div`,{ref:s,style:{height:`100%`}})}var _=e=>{if(Array.isArray(e))return e;if(e&&typeof e==`object`&&`fileList`in e)return e.fileList};function v(e){let{value:t,onChange:n,maxCount:r=1,multiple:a,listType:c,...l}=e,u=_(t)??[],d=u.length>=r,f=c?.startsWith(`picture-`)?(0,i.jsx)(s.AiOutlineUpload,{}):(0,i.jsx)(o.Button,{icon:(0,i.jsx)(s.AiOutlineUpload,{}),children:`上传`});return(0,i.jsx)(o.Upload,{...l,maxCount:r,multiple:a??r>1,listType:c,showUploadList:l.showUploadList??!0,fileList:u,onChange:e=>n?.(e.fileList),children:d?null:f})}var y={upload:{formItemRender:(e,t)=>(0,i.jsx)(v,{...t.fieldProps})},editor:{formItemRender:(e,t)=>(0,i.jsx)(g,{...t.fieldProps})}};function b({children:e}){let n=(0,t.useContext)(a.ProProvider);return(0,i.jsx)(a.ProProvider.Provider,{value:{...n,valueTypeMap:{...n.valueTypeMap,...y}},children:e})}var x=()=>a.ProForm.useForm()[0],S=e=>(0,i.jsx)(b,{children:(0,i.jsx)(a.BetaSchemaForm,{layout:`horizontal`,colon:!1,scrollToFirstError:!0,submitter:{render:(e,t)=>(0,i.jsx)(a.ProForm.Item,{wrapperCol:{offset:4,span:8},children:(0,i.jsx)(o.Space,{children:t})})},...e})});S.useForm=x;function C(e){return(0,i.jsx)(b,{children:(0,i.jsx)(a.ProTable,{rowKey:`id`,pagination:{pageSize:10},tableAlertRender:({selectedRowKeys:e})=>(0,i.jsxs)(o.Space,{children:[`已选 `,e.length,` 项`]}),...e})})}var w=m({AntdAppHolder:()=>O,message:()=>A,modal:()=>k,notification:()=>D}),T,E,D,O=()=>{let e=o.App.useApp();return T=e.message,E=e.modal,D=e.notification,null},k=new Proxy({},{get(e,t){return t===`confirm`?e=>E.confirm({title:`提示`,content:`确认操作?`,...e}):E[t]}}),A=new Proxy({},{get(e,t){return t===`success`?(e=`操作成功`,t,n)=>T.success(e,t,n):T[t]}}),j=m({onUpload:()=>M}),M=async e=>{let{file:t,onProgress:n,onSuccess:r,onError:i}=e,a=URL.createObjectURL(t);try{await new Promise(e=>{let t=0,r=setInterval(()=>{t=Math.min(t+Math.floor(Math.random()*10)+1,99),n?.({percent:t}),t>=99&&(clearInterval(r),e())},100)}),n?.({percent:100}),t.url=a,r?.({url:a})}catch(e){URL.revokeObjectURL(a),i?.(e)}};e.Editor=g,e.Form=S,e.Provider=b,e.Table=C,e.Upload=v,Object.defineProperty(e,"antd",{enumerable:!0,get:function(){return w}}),Object.defineProperty(e,"misc",{enumerable:!0,get:function(){return j}})});
|
|
@@ -3,7 +3,7 @@ import { type QuillOptions } from 'quill';
|
|
|
3
3
|
import 'quill/dist/quill.snow.css';
|
|
4
4
|
export type EditorProps = QuillOptions & {
|
|
5
5
|
value?: any;
|
|
6
|
-
onChange?:
|
|
6
|
+
onChange?: (...args: any[]) => void;
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
};
|
|
9
9
|
export default function Editor(props: EditorProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { type ComponentProps } from 'react';
|
|
2
|
-
import { type ValueTypeProps } from '@/components/Provider';
|
|
3
2
|
import { BetaSchemaForm, type ProFormInstance } from '@ant-design/pro-components';
|
|
4
|
-
export type FormProps<T = any, ValueType =
|
|
3
|
+
export type FormProps<T = any, ValueType = string> = ComponentProps<typeof BetaSchemaForm<T, ValueType>> & {
|
|
5
4
|
form?: ProFormInstance;
|
|
6
5
|
};
|
|
7
6
|
export declare const useForm: () => import("antd").FormInstance<any>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ProLayoutProps } from '@ant-design/pro-components';
|
|
2
|
+
export type LayoutProps = ProLayoutProps & {
|
|
3
|
+
routes?: NonNullable<ProLayoutProps['route']>['routes'];
|
|
4
|
+
};
|
|
5
|
+
export default function Layout({ routes, ...props }: LayoutProps): import("react").JSX.Element;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export default function Provider({ children }:
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
export default function Provider({ children }: {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
}): import("react").JSX.Element;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type ValueTypeProps } from '@/components/Provider';
|
|
2
1
|
import { type ProTableProps } from '@ant-design/pro-components';
|
|
3
|
-
export type TableProps<T = any, U =
|
|
2
|
+
export type TableProps<T = any, U = Record<string, any>, ValueType = string> = ProTableProps<T, U, ValueType>;
|
|
4
3
|
export default function Table(props: TableProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type UploadProps as AntUploadProps } from 'antd';
|
|
2
|
-
export type UploadProps = AntUploadProps & {
|
|
3
|
-
value?:
|
|
4
|
-
onChange?:
|
|
2
|
+
export type UploadProps = Omit<AntUploadProps, 'onChange' | 'fileList'> & {
|
|
3
|
+
value?: AntUploadProps['fileList'];
|
|
4
|
+
onChange?: (fileList: NonNullable<AntUploadProps['fileList']>) => void;
|
|
5
5
|
};
|
|
6
|
-
export declare const files: (
|
|
6
|
+
export declare const files: (value: unknown) => AntUploadProps['fileList'];
|
|
7
7
|
export default function Upload(props: UploadProps): import("react").JSX.Element;
|
package/dist/types/lib.d.ts
CHANGED
|
@@ -7,6 +7,5 @@ export { default as Table } from './components/Table';
|
|
|
7
7
|
export type { TableProps } from './components/Table';
|
|
8
8
|
export { default as Upload } from './components/Upload';
|
|
9
9
|
export type { UploadProps } from './components/Upload';
|
|
10
|
-
export * as
|
|
11
|
-
export * as i18n from './utils/i18n';
|
|
10
|
+
export * as antd from './utils/antd';
|
|
12
11
|
export * as misc from './utils/misc';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MessageInstance } from 'antd/es/message/interface';
|
|
2
|
+
import type { ModalStaticFunctions } from 'antd/es/modal/confirm';
|
|
3
|
+
import type { NotificationInstance } from 'antd/es/notification/interface';
|
|
4
|
+
declare let notification: NotificationInstance;
|
|
5
|
+
export declare const AntdAppHolder: () => null;
|
|
6
|
+
export declare const modal: Omit<ModalStaticFunctions, "warn">;
|
|
7
|
+
export declare const message: MessageInstance;
|
|
8
|
+
export { notification };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ComponentType = () => Promise<{
|
|
2
|
+
default: React.ComponentType<any>;
|
|
3
|
+
}>;
|
|
4
|
+
export type MenuItem = {
|
|
5
|
+
url: string;
|
|
6
|
+
label: string;
|
|
7
|
+
component: ComponentType;
|
|
8
|
+
};
|
|
9
|
+
export declare function createRouter(menus: MenuItem[], homePath: string, layoutPath: ComponentType): import("react-router").DataRouter;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export default
|
|
1
|
+
export default _default;
|
|
2
|
+
declare function _default(): import("react").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const home = "/form";
|
|
2
|
+
export declare const layout: () => Promise<typeof import("@/views/layout")>;
|
|
3
|
+
export declare const menus: {
|
|
4
|
+
url: string;
|
|
5
|
+
label: string;
|
|
6
|
+
component: () => Promise<typeof import("@/views/form")>;
|
|
7
|
+
}[];
|
|
8
|
+
export default _default;
|
|
9
|
+
declare function _default(): import("react").JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export default
|
|
1
|
+
export default _default;
|
|
2
|
+
declare function _default(): import("react").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rainte/ant",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.67",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -32,17 +32,12 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@ant-design/pro-components": "^3.1.15-9",
|
|
35
|
-
"
|
|
36
|
-
"antd": "^6.6.8",
|
|
37
|
-
"i18next": "^26.7.1",
|
|
38
|
-
"i18next-browser-languagedetector": "^8.3.0",
|
|
39
|
-
"i18next-http-backend": "^4.0.9",
|
|
35
|
+
"antd": "^6.7.0",
|
|
40
36
|
"quill": "^2.0.3",
|
|
41
37
|
"react": "^19.3.1",
|
|
42
38
|
"react-dom": "^19.3.1",
|
|
43
|
-
"react-i18next": "^17.1.11",
|
|
44
39
|
"react-icons": "^5.7.0",
|
|
45
|
-
"react-router
|
|
40
|
+
"react-router": "^8.5.1"
|
|
46
41
|
},
|
|
47
42
|
"devDependencies": {
|
|
48
43
|
"@types/node": "^26.6.6",
|
|
@@ -50,17 +45,16 @@
|
|
|
50
45
|
"@types/react-dom": "^19.3.0",
|
|
51
46
|
"@vitejs/plugin-react": "^6.2.1",
|
|
52
47
|
"happy-dom": "^21.0.4",
|
|
53
|
-
"oxlint": "^1.
|
|
48
|
+
"oxlint": "^1.92.0",
|
|
54
49
|
"typescript": "^7.0.2",
|
|
55
|
-
"vite": "^8.3.
|
|
50
|
+
"vite": "^8.3.6"
|
|
56
51
|
},
|
|
57
52
|
"peerDependencies": {
|
|
58
53
|
"@ant-design/pro-components": "*",
|
|
59
|
-
"@rainte/js": "*",
|
|
60
54
|
"antd": "*",
|
|
61
55
|
"react": "*",
|
|
62
56
|
"react-dom": "*",
|
|
63
57
|
"react-icons": "*",
|
|
64
|
-
"react-router
|
|
58
|
+
"react-router": "*"
|
|
65
59
|
}
|
|
66
60
|
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type { MessageInstance, JointContent } from 'antd/es/message/interface';
|
|
2
|
-
import type { ModalStaticFunctions } from 'antd/es/modal/confirm';
|
|
3
|
-
import type { NotificationInstance } from 'antd/es/notification/interface';
|
|
4
|
-
import type { ModalFuncProps } from 'antd/es/modal/interface';
|
|
5
|
-
declare let message: MessageInstance;
|
|
6
|
-
declare let notification: NotificationInstance;
|
|
7
|
-
declare let modal: Omit<ModalStaticFunctions, 'warn'>;
|
|
8
|
-
declare const useDialog: () => null;
|
|
9
|
-
export default useDialog;
|
|
10
|
-
declare const popup: {
|
|
11
|
-
confirm: (props: ModalFuncProps) => {
|
|
12
|
-
destroy: () => void;
|
|
13
|
-
update: (configUpdate: import("antd/es/modal/confirm").ConfigUpdate) => void;
|
|
14
|
-
};
|
|
15
|
-
success: (content?: JointContent, duration?: number | VoidFunction) => import("antd/es/message/interface").MessageType;
|
|
16
|
-
error: (content?: string, duration?: number | VoidFunction) => never;
|
|
17
|
-
ask: (onOk: (...args: any[]) => any, props?: ModalFuncProps) => {
|
|
18
|
-
destroy: () => void;
|
|
19
|
-
update: (configUpdate: import("antd/es/modal/confirm").ConfigUpdate) => void;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export { message, notification, modal, popup, useDialog };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function App(): import("react").JSX.Element;
|