@baishuyun/ui-base 3.0.2 → 6.1.0
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/Amap/AmapCircle/index.js +1 -1
- package/dist/Amap/{AmapCircle-COjtl-XB.js → AmapCircle-mh92P2l6.js} +1 -1
- package/dist/Amap/AmapProvider/index.js +2 -2
- package/dist/Amap/{AmapProvider-CWbRK6QL.js → AmapProvider-H1GNfMdk.js} +1 -1
- package/dist/Amap/index.js +3 -3
- package/dist/Card/{Card-D__c94yx.js → Card-CRrtIjNT.js} +1 -1
- package/dist/Card/index.js +2 -2
- package/dist/CheckBox/{CheckBox-DF201Nxg.js → CheckBox-BsihF-AN.js} +1 -1
- package/dist/CheckBox/{CheckBox-B04hZKaC.js → CheckBox-D1aeCoQb.js} +1 -1
- package/dist/CheckBox/index.js +3 -3
- package/dist/ColorPicker/{ColorPicker-B-KaMDAn.js → ColorPicker-CFKvAzYa.js} +8 -8
- package/dist/ColorPicker/index.js +2 -2
- package/dist/ConfigProvider/index.js +1 -1
- package/dist/DropDown/{DropDown-CMKiQDrc.js → DropDown-DNEQ5nQz.js} +1 -1
- package/dist/DropDown/index.js +3 -3
- package/dist/Editor/{Buttons-CZOTyAPL.js → Buttons-0qZ4g7Ig.js} +30 -30
- package/dist/Editor/ToolbarPlugin/Buttons/index.js +8 -8
- package/dist/Editor/index.js +8 -8
- package/dist/Icon/{Icon-CTZCSuVg.js → Icon-BQ3Whub2.js} +1 -1
- package/dist/Icon/index.js +1 -1
- package/dist/InputTag/{InputTag-F2Dv-r56.js → InputTag-DcVn_bRl.js} +1 -1
- package/dist/InputTag/index.js +2 -2
- package/dist/Modal/{Modal-CuDbh_WD.js → Modal-B5AW5GKt.js} +39 -30
- package/dist/Modal/index.js +2 -2
- package/dist/Segmented/{Segmented-Byw8j1hQ.js → Segmented-DkhT5_Ty.js} +36 -25
- package/dist/Segmented/index.js +1 -1
- package/dist/Select/{Select-xuQGK6It.js → Select-BSPmsIMh.js} +16 -17
- package/dist/Select/{SelectInputSearch-Dm3CI_L4.js → SelectInputSearch-Cj9Uubc4.js} +2 -2
- package/dist/Select/index.js +6 -6
- package/dist/Tabs/{Tabs-Cxf7jwys.js → Tabs-BVSzo2qS.js} +1 -1
- package/dist/Tabs/index.js +2 -2
- package/dist/Tree/index.js +3 -3
- package/dist/components/Amap/Amap.d.ts +1 -1
- package/dist/components/Amap/{interface.d.ts → Amap.type.d.ts} +187 -2
- package/dist/components/Amap/AmapCircle/AmapCircle.d.ts +1 -1
- package/dist/components/Amap/AmapMarker/AmapMarker.d.ts +1 -1
- package/dist/components/Amap/AmapMarker/useMarkerInfoWindow.d.ts +1 -1
- package/dist/components/Amap/AmapMarker/useMarkerInfoWindowController.d.ts +1 -1
- package/dist/components/Amap/AmapMarkerCluster/AmapMarkerCluster.d.ts +1 -1
- package/dist/components/Amap/AmapMarkerCluster/AmapMarkerCluster.type.d.ts +1 -1
- package/dist/components/Amap/AmapMarkerCluster/utils.d.ts +1 -1
- package/dist/components/Amap/AmapProvider/AmapProvider.d.ts +1 -1
- package/dist/components/Amap/context/AmapContext.d.ts +1 -1
- package/dist/components/Amap/hooks/useAmap.d.ts +1 -1
- package/dist/components/Amap/hooks/useCurrentLocation.d.ts +1 -1
- package/dist/components/Amap/index.d.ts +1 -1
- package/dist/components/Amap/utils/currentLocation.d.ts +1 -1
- package/dist/components/ConfigProvider/ConfigProvider.type.d.ts +1 -0
- package/dist/components/Modal/Modal.type.d.ts +4 -0
- package/dist/components/Segmented/Segmented.type.d.ts +4 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/theme.d.ts +6 -0
- package/dist/index.js +25 -51
- package/dist/style.css +1 -1
- package/dist/{ConfigProvider/ConfigProvider-Bx-uxnns.js → vendors/ConfigProvider-Bd6SRQtO.js} +93 -22
- package/dist/vendors/{Tree-Bg2UzLsC.js → Tree-D7ZZAwIg.js} +2 -2
- package/package.json +6 -10
- package/dist/locale/LocaleProvider.d.ts +0 -9
- /package/dist/locale/__tests__/{LocaleProvider.test.d.ts → locale.test.d.ts} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "../../vendors/LocaleContext-Jj_JGgi2.js";
|
|
2
|
-
import "../../
|
|
2
|
+
import "../../vendors/ConfigProvider-Bd6SRQtO.js";
|
|
3
3
|
import "../AmapContext-JaYk1a3H.js";
|
|
4
|
-
import { t as e } from "../AmapProvider-
|
|
4
|
+
import { t as e } from "../AmapProvider-H1GNfMdk.js";
|
|
5
5
|
export { e as AmapProvider, e as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as e } from "../
|
|
1
|
+
import { n as e } from "../vendors/ConfigProvider-Bd6SRQtO.js";
|
|
2
2
|
import { n as t } from "./AmapContext-JaYk1a3H.js";
|
|
3
3
|
import { Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
4
4
|
import { useEffect as i, useState as a } from "react";
|
package/dist/Amap/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../vendors/LocaleContext-Jj_JGgi2.js";
|
|
2
|
-
import "../
|
|
2
|
+
import "../vendors/ConfigProvider-Bd6SRQtO.js";
|
|
3
3
|
import "./AmapContext-JaYk1a3H.js";
|
|
4
|
-
import { t as e } from "./AmapProvider-
|
|
4
|
+
import { t as e } from "./AmapProvider-H1GNfMdk.js";
|
|
5
5
|
import { t } from "./Amap-DL5dLiUm.js";
|
|
6
6
|
import { n, t as r } from "./hooks-D1m8KgVM.js";
|
|
7
|
-
import { t as i } from "./AmapCircle-
|
|
7
|
+
import { t as i } from "./AmapCircle-mh92P2l6.js";
|
|
8
8
|
import "./useMarkerInfoWindowController-CRgf2I0Q.js";
|
|
9
9
|
import { t as a } from "./AmapMarker-DYW0-8Hd.js";
|
|
10
10
|
import { t as o } from "./AmapMarkerCluster-BRVHHMbi.js";
|
package/dist/Card/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import { t as e } from "./Card-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import { t as e } from "./Card-CRrtIjNT.js";
|
|
3
3
|
export { e as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
1
|
+
import { t as e } from "../Icon/Icon-BQ3Whub2.js";
|
|
2
2
|
import { uniqueId as t } from "lodash-es";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
import { createContext as i, forwardRef as a, useContext as o } from "react";
|
package/dist/CheckBox/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import "./CheckBox-
|
|
3
|
-
import { t as e } from "./CheckBox-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import "./CheckBox-BsihF-AN.js";
|
|
3
|
+
import { t as e } from "./CheckBox-D1aeCoQb.js";
|
|
4
4
|
export { e as default };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
1
|
+
import { t as e } from "../Icon/Icon-BQ3Whub2.js";
|
|
2
2
|
import { t } from "../vendors/useLocale-Mk0d7wNt.js";
|
|
3
3
|
import { t as n } from "../vendors/color-CxdZwdYM.js";
|
|
4
4
|
import { n as r } from "../vendors/animations-C2i5EijE.js";
|
|
5
5
|
import { isArray as i } from "lodash-es";
|
|
6
6
|
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
import { cloneElement as c, isValidElement as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
8
|
-
import p from "
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
8
|
+
import { ColorPicker as p } from "antd";
|
|
9
|
+
import m from "clsx";
|
|
10
|
+
import { useControllableValue as h } from "ahooks";
|
|
11
11
|
import { AnimatePresence as g, motion as _ } from "motion/react";
|
|
12
12
|
import { FloatingPortal as v, flip as y, offset as b, shift as x, useClick as S, useDismiss as C, useFloating as w, useInteractions as T } from "@floating-ui/react";
|
|
13
13
|
import E from "tinycolor2";
|
|
@@ -80,10 +80,10 @@ var D = [
|
|
|
80
80
|
})
|
|
81
81
|
}, i))
|
|
82
82
|
}), M = (e) => {
|
|
83
|
-
let { children: f, placement: p = "bottom-start", disabled:
|
|
83
|
+
let { children: f, placement: p = "bottom-start", disabled: m = !1, presetColors: y, getPopupContainer: b } = e, { t: x } = t(), [S, C] = h(e, { defaultValue: e.value }), { isOpen: w, refs: T, floatingStyles: E, getReferenceProps: k, getFloatingProps: M } = O(p), P = l(f) ? c(f, {
|
|
84
84
|
...k(),
|
|
85
85
|
ref: T.setReference,
|
|
86
|
-
disabled:
|
|
86
|
+
disabled: m
|
|
87
87
|
}) : f, F = i(y) && y.length ? y : D, I = d(F.some((e) => n(e, S)) ? [] : [S]);
|
|
88
88
|
return /* @__PURE__ */ s(a, { children: [P, /* @__PURE__ */ o(v, {
|
|
89
89
|
root: u(() => w ? b?.() : void 0, [w, b]),
|
|
@@ -129,7 +129,7 @@ var D = [
|
|
|
129
129
|
children: u("customColor")
|
|
130
130
|
}), /* @__PURE__ */ s("div", {
|
|
131
131
|
className: A["bsy-color-picker__custom-color-content"],
|
|
132
|
-
children: [/* @__PURE__ */ o(
|
|
132
|
+
children: [/* @__PURE__ */ o(p, {
|
|
133
133
|
value: i,
|
|
134
134
|
onChange: (e) => {
|
|
135
135
|
let t = e.toRgbString();
|
|
@@ -140,7 +140,7 @@ var D = [
|
|
|
140
140
|
l(e), !e && i && (r.includes(i) || r.unshift(i), n.onChange(i), a(void 0));
|
|
141
141
|
},
|
|
142
142
|
children: /* @__PURE__ */ o("div", {
|
|
143
|
-
className:
|
|
143
|
+
className: m(A["bsy-color-picker__custom-color-btn"], {
|
|
144
144
|
[A["bsy-color-picker__custom-color-btn--active"]]: c && !i,
|
|
145
145
|
[A["bsy-color-picker__custom-color-btn--preview"]]: !!i
|
|
146
146
|
}),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
2
|
import "../vendors/LocaleContext-Jj_JGgi2.js";
|
|
3
|
-
import { n as e, t } from "./ColorPicker-
|
|
3
|
+
import { n as e, t } from "./ColorPicker-CFKvAzYa.js";
|
|
4
4
|
import "../vendors/useLocale-Mk0d7wNt.js";
|
|
5
5
|
import "../vendors/color-CxdZwdYM.js";
|
|
6
6
|
export { e as COLOR_OPTIONS_RGBA, t as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "../vendors/useLocale-Mk0d7wNt.js";
|
|
2
2
|
import { n as t } from "../vendors/animations-C2i5EijE.js";
|
|
3
|
-
import { t as n } from "../Select/SelectInputSearch-
|
|
3
|
+
import { t as n } from "../Select/SelectInputSearch-Cj9Uubc4.js";
|
|
4
4
|
import { t as r } from "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
5
5
|
import { t as i } from "../vendors/useFloatingPortal-CDgiCnbb.js";
|
|
6
6
|
import { isEmpty as a, isNumber as o } from "lodash-es";
|
package/dist/DropDown/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
2
|
import "../vendors/LocaleContext-Jj_JGgi2.js";
|
|
3
3
|
import "../vendors/useLocale-Mk0d7wNt.js";
|
|
4
|
-
import "../Select/SelectInputSearch-
|
|
4
|
+
import "../Select/SelectInputSearch-Cj9Uubc4.js";
|
|
5
5
|
import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
6
6
|
import "../vendors/useFloatingPortal-CDgiCnbb.js";
|
|
7
|
-
import { t as e } from "./DropDown-
|
|
7
|
+
import { t as e } from "./DropDown-DNEQ5nQz.js";
|
|
8
8
|
export { e as default };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
2
|
-
import { t } from "../Modal/Modal-
|
|
3
|
-
import { t as n } from "../ColorPicker/ColorPicker-
|
|
1
|
+
import { t as e } from "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import { t } from "../Modal/Modal-B5AW5GKt.js";
|
|
3
|
+
import { t as n } from "../ColorPicker/ColorPicker-CFKvAzYa.js";
|
|
4
4
|
import { t as r } from "../vendors/useLocale-Mk0d7wNt.js";
|
|
5
|
-
import { t as i } from "../CheckBox/CheckBox-
|
|
6
|
-
import { t as a } from "../DropDown/DropDown-
|
|
5
|
+
import { t as i } from "../CheckBox/CheckBox-D1aeCoQb.js";
|
|
6
|
+
import { t as a } from "../DropDown/DropDown-DNEQ5nQz.js";
|
|
7
7
|
import { FONT_SIZES as o } from "./constants/index.js";
|
|
8
8
|
import { AlignCenterOutlined as s, AlignLeftOutlined as c, AlignRightOutlined as l } from "@ant-design/icons";
|
|
9
9
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
10
10
|
import p, { createContext as m, forwardRef as h, useCallback as g, useContext as _, useImperativeHandle as v, useMemo as y, useRef as b, useState as x } from "react";
|
|
11
|
-
import S from "
|
|
12
|
-
import
|
|
11
|
+
import { Button as S, Form as C, Input as w, message as T } from "antd";
|
|
12
|
+
import E from "clsx";
|
|
13
13
|
import { AnimatePresence as D, motion as O } from "motion/react";
|
|
14
|
-
import { $createParagraphNode as k, $createTextNode as ee, $getRoot as te, $getSelection as A, $isElementNode as j, $isRangeSelection as M, FORMAT_ELEMENT_COMMAND as
|
|
14
|
+
import { $createParagraphNode as k, $createTextNode as ee, $getRoot as te, $getSelection as A, $isElementNode as j, $isRangeSelection as M, FORMAT_ELEMENT_COMMAND as N, FORMAT_TEXT_COMMAND as P, createCommand as ne } from "lexical";
|
|
15
15
|
import { useLexicalComposerContext as F } from "@lexical/react/LexicalComposerContext";
|
|
16
16
|
import { $patchStyleText as I } from "@lexical/selection";
|
|
17
17
|
import { $createLinkNode as L, $toggleLink as R, TOGGLE_LINK_COMMAND as z } from "@lexical/link";
|
|
@@ -22,7 +22,7 @@ var B = m(null), V = {
|
|
|
22
22
|
}, H = (t) => {
|
|
23
23
|
let { icon: n, tooltip: r, onClick: i, disabled: a = !1, active: o = !1, size: s = 14 } = t;
|
|
24
24
|
return /* @__PURE__ */ d("button", {
|
|
25
|
-
className:
|
|
25
|
+
className: E(V["lexical-editor__toolbar-button"], { [V["lexical-editor__toolbar-button-active"]]: o }),
|
|
26
26
|
type: "button",
|
|
27
27
|
onClick: i,
|
|
28
28
|
disabled: a,
|
|
@@ -43,7 +43,7 @@ var B = m(null), V = {
|
|
|
43
43
|
tooltip: n("editor.bold"),
|
|
44
44
|
active: i,
|
|
45
45
|
onClick: () => {
|
|
46
|
-
e.dispatchCommand(
|
|
46
|
+
e.dispatchCommand(P, "bold");
|
|
47
47
|
}
|
|
48
48
|
});
|
|
49
49
|
}, re = () => {
|
|
@@ -53,7 +53,7 @@ var B = m(null), V = {
|
|
|
53
53
|
tooltip: n("editor.underline"),
|
|
54
54
|
active: i,
|
|
55
55
|
onClick: () => {
|
|
56
|
-
e.dispatchCommand(
|
|
56
|
+
e.dispatchCommand(P, "underline");
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
}, ie = () => {
|
|
@@ -63,7 +63,7 @@ var B = m(null), V = {
|
|
|
63
63
|
tooltip: n("editor.italic"),
|
|
64
64
|
active: i,
|
|
65
65
|
onClick: () => {
|
|
66
|
-
e.dispatchCommand(
|
|
66
|
+
e.dispatchCommand(P, "italic");
|
|
67
67
|
}
|
|
68
68
|
});
|
|
69
69
|
}, ae = () => {
|
|
@@ -161,7 +161,7 @@ var B = m(null), V = {
|
|
|
161
161
|
icon: /* @__PURE__ */ d(l, {})
|
|
162
162
|
}
|
|
163
163
|
], o = g((t) => {
|
|
164
|
-
e.dispatchCommand(
|
|
164
|
+
e.dispatchCommand(N, t);
|
|
165
165
|
}, [e]), u = i.map((e) => ({
|
|
166
166
|
key: e.key,
|
|
167
167
|
label: /* @__PURE__ */ f("div", {
|
|
@@ -191,7 +191,7 @@ var B = m(null), V = {
|
|
|
191
191
|
})
|
|
192
192
|
});
|
|
193
193
|
}, le = () => {
|
|
194
|
-
let [e] = F(), { link: n } = U(), { t: a } = r(), [o, s] = x(!1), [c, l] = x(""), [p, m] = x(""), [h, _] = x(!0), [v, y] =
|
|
194
|
+
let [e] = F(), { link: n } = U(), { t: a } = r(), [o, s] = x(!1), [c, l] = x(""), [p, m] = x(""), [h, _] = x(!0), [v, y] = T.useMessage(), b = g((e) => e ? e.startsWith("@") ? "javascript:void(0);" : e.match(/^https?:\/\//) ? e : `http://${e}` : "", []), C = () => {
|
|
195
195
|
if (!c) {
|
|
196
196
|
v.warning(a("editor.linkAddressEmpty"));
|
|
197
197
|
return;
|
|
@@ -214,14 +214,14 @@ var B = m(null), V = {
|
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
}), l(""), m(""), s(!1);
|
|
217
|
-
},
|
|
217
|
+
}, E = g(() => {
|
|
218
218
|
n ? (l(n.link === "javascript:void(0);" ? "" : n.link), m(n.linkText)) : (l(""), m("")), s(!0);
|
|
219
219
|
}, [n]);
|
|
220
220
|
return /* @__PURE__ */ f(u, { children: [
|
|
221
221
|
/* @__PURE__ */ d(H, {
|
|
222
222
|
icon: "Insertlink",
|
|
223
223
|
tooltip: a("link"),
|
|
224
|
-
onClick:
|
|
224
|
+
onClick: E,
|
|
225
225
|
active: !!n?.link
|
|
226
226
|
}),
|
|
227
227
|
y,
|
|
@@ -238,7 +238,7 @@ var B = m(null), V = {
|
|
|
238
238
|
className: "w-[80px] shrink-0",
|
|
239
239
|
children: a("linkAddress")
|
|
240
240
|
}),
|
|
241
|
-
/* @__PURE__ */ d(
|
|
241
|
+
/* @__PURE__ */ d(w, {
|
|
242
242
|
value: c,
|
|
243
243
|
onChange: (e) => l(e.target.value),
|
|
244
244
|
placeholder: a("editor.linkTip")
|
|
@@ -256,7 +256,7 @@ var B = m(null), V = {
|
|
|
256
256
|
children: [/* @__PURE__ */ d("label", {
|
|
257
257
|
className: "w-[80px] shrink-0",
|
|
258
258
|
children: a("showContent")
|
|
259
|
-
}), /* @__PURE__ */ d(
|
|
259
|
+
}), /* @__PURE__ */ d(w, {
|
|
260
260
|
value: p,
|
|
261
261
|
onChange: (e) => m(e.target.value)
|
|
262
262
|
})]
|
|
@@ -269,12 +269,12 @@ var B = m(null), V = {
|
|
|
269
269
|
children: a("openInNewTab")
|
|
270
270
|
}) }), /* @__PURE__ */ f("div", {
|
|
271
271
|
className: "flex gap-[15px]",
|
|
272
|
-
children: [/* @__PURE__ */ d(
|
|
272
|
+
children: [/* @__PURE__ */ d(S, {
|
|
273
273
|
onClick: () => s(!1),
|
|
274
274
|
children: a("cancel")
|
|
275
|
-
}), /* @__PURE__ */ d(
|
|
275
|
+
}), /* @__PURE__ */ d(S, {
|
|
276
276
|
type: "primary",
|
|
277
|
-
onClick:
|
|
277
|
+
onClick: C,
|
|
278
278
|
children: a("confirm")
|
|
279
279
|
})]
|
|
280
280
|
})]
|
|
@@ -312,7 +312,7 @@ var B = m(null), V = {
|
|
|
312
312
|
"picture-modal__upload-text": "_picture-modal__upload-text_qyj1h_121",
|
|
313
313
|
"picture-modal__footer": "_picture-modal__footer_qyj1h_125"
|
|
314
314
|
}, J = h((e, t) => {
|
|
315
|
-
let [n] =
|
|
315
|
+
let [n] = C.useForm(), [i, a] = x(""), { t: o } = r(), s = (e) => /^https?:\/\/.+/i.test(e);
|
|
316
316
|
return v(t, () => ({ getValue: async () => {
|
|
317
317
|
try {
|
|
318
318
|
return await n.validateFields(), i;
|
|
@@ -323,15 +323,15 @@ var B = m(null), V = {
|
|
|
323
323
|
className: q["picture-modal__content-title"],
|
|
324
324
|
"data-title": o("editor.imageUrlNote"),
|
|
325
325
|
children: o("editor.enterImageUrl")
|
|
326
|
-
}), /* @__PURE__ */ d(
|
|
326
|
+
}), /* @__PURE__ */ d(C, {
|
|
327
327
|
form: n,
|
|
328
|
-
children: /* @__PURE__ */ d(
|
|
328
|
+
children: /* @__PURE__ */ d(C.Item, {
|
|
329
329
|
name: "url",
|
|
330
330
|
rules: [{
|
|
331
331
|
required: !0,
|
|
332
332
|
message: o("editor.pleaseEnterImageUrl")
|
|
333
333
|
}, { validator: (e, t) => !t || s(t) ? Promise.resolve() : Promise.reject(Error(o("editor.pleaseEnterValidImageUrl"))) }],
|
|
334
|
-
children: /* @__PURE__ */ d(
|
|
334
|
+
children: /* @__PURE__ */ d(w, {
|
|
335
335
|
placeholder: o("editor.pleaseEnterImageUrl"),
|
|
336
336
|
value: i,
|
|
337
337
|
onChange: (e) => a(e.target.value)
|
|
@@ -343,7 +343,7 @@ J.displayName = "LinkInput";
|
|
|
343
343
|
//#endregion
|
|
344
344
|
//#region src/components/Editor/ToolbarPlugin/Buttons/PictureButton/UploadImage.tsx
|
|
345
345
|
var Y = h((t, n) => {
|
|
346
|
-
let [i, a] = x(null), [o, s] = x(!1), [c, l] = x(null), u = b(null), [p, m] =
|
|
346
|
+
let [i, a] = x(null), [o, s] = x(!1), [c, l] = x(null), u = b(null), [p, m] = T.useMessage(), { t: h } = r(), g = (e) => (e / 1024).toFixed(1) + "kb", _ = (e) => e.type.startsWith("image/") ? e.size > 1048576 ? (p.warning(h("editor.imageSizeNote")), !1) : !0 : (p.warning(h("editor.onlyImageFormatsSupported")), !1), y = (e) => {
|
|
347
347
|
_(e) && (a(URL.createObjectURL(e)), l(e));
|
|
348
348
|
}, S = () => {
|
|
349
349
|
u.current?.click();
|
|
@@ -504,7 +504,7 @@ var Y = h((t, n) => {
|
|
|
504
504
|
Y.displayName = "UploadImage";
|
|
505
505
|
//#endregion
|
|
506
506
|
//#region src/components/Editor/commands/ImageCommands.ts
|
|
507
|
-
var X =
|
|
507
|
+
var X = ne("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
|
|
508
508
|
let { t: n } = r(), [i] = F(), [a, o] = x(!1), s = b(null), c = b(null), l = [{
|
|
509
509
|
key: "upload",
|
|
510
510
|
title: n("editor.uploadImage"),
|
|
@@ -525,7 +525,7 @@ var X = P("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
|
|
|
525
525
|
altText: t
|
|
526
526
|
}), o(!1);
|
|
527
527
|
} catch (e) {
|
|
528
|
-
|
|
528
|
+
T.error(e instanceof Error ? e.message : n("editor.operationFailed"));
|
|
529
529
|
}
|
|
530
530
|
}, _ = {
|
|
531
531
|
upload: /* @__PURE__ */ d(Y, { ref: c }),
|
|
@@ -564,10 +564,10 @@ var X = P("INSERT_INLINE_IMAGE_COMMAND"), de = () => {
|
|
|
564
564
|
})]
|
|
565
565
|
}), /* @__PURE__ */ f("div", {
|
|
566
566
|
className: q["picture-modal__footer"],
|
|
567
|
-
children: [/* @__PURE__ */ d(
|
|
567
|
+
children: [/* @__PURE__ */ d(S, {
|
|
568
568
|
onClick: () => o(!1),
|
|
569
569
|
children: n("cancel")
|
|
570
|
-
}), /* @__PURE__ */ d(
|
|
570
|
+
}), /* @__PURE__ */ d(S, {
|
|
571
571
|
type: "primary",
|
|
572
572
|
onClick: g,
|
|
573
573
|
children: n("confirm")
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "../../../Icon/Icon-
|
|
1
|
+
import "../../../Icon/Icon-BQ3Whub2.js";
|
|
2
2
|
import "../../../vendors/LocaleContext-Jj_JGgi2.js";
|
|
3
|
-
import "../../../Modal/Modal-
|
|
4
|
-
import "../../../ColorPicker/ColorPicker-
|
|
3
|
+
import "../../../Modal/Modal-B5AW5GKt.js";
|
|
4
|
+
import "../../../ColorPicker/ColorPicker-CFKvAzYa.js";
|
|
5
5
|
import "../../../vendors/useLocale-Mk0d7wNt.js";
|
|
6
6
|
import "../../../vendors/color-CxdZwdYM.js";
|
|
7
|
-
import "../../../Select/SelectInputSearch-
|
|
8
|
-
import "../../../CheckBox/CheckBox-
|
|
9
|
-
import "../../../CheckBox/CheckBox-
|
|
7
|
+
import "../../../Select/SelectInputSearch-Cj9Uubc4.js";
|
|
8
|
+
import "../../../CheckBox/CheckBox-BsihF-AN.js";
|
|
9
|
+
import "../../../CheckBox/CheckBox-D1aeCoQb.js";
|
|
10
10
|
import "../../../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
11
11
|
import "../../../vendors/useFloatingPortal-CDgiCnbb.js";
|
|
12
|
-
import "../../../DropDown/DropDown-
|
|
13
|
-
import { a as e, i as t, n, r, t as i } from "../../Buttons-
|
|
12
|
+
import "../../../DropDown/DropDown-DNEQ5nQz.js";
|
|
13
|
+
import { a as e, i as t, n, r, t as i } from "../../Buttons-0qZ4g7Ig.js";
|
|
14
14
|
export { i as default, n as getToolbarButton, r as listRegisteredToolbarButtons, t as registerToolbarButton, e as unregisterToolbarButton };
|
package/dist/Editor/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
2
|
import "../vendors/LocaleContext-Jj_JGgi2.js";
|
|
3
|
-
import "../Modal/Modal-
|
|
4
|
-
import "../ColorPicker/ColorPicker-
|
|
3
|
+
import "../Modal/Modal-B5AW5GKt.js";
|
|
4
|
+
import "../ColorPicker/ColorPicker-CFKvAzYa.js";
|
|
5
5
|
import "../vendors/useLocale-Mk0d7wNt.js";
|
|
6
6
|
import "../vendors/color-CxdZwdYM.js";
|
|
7
|
-
import "../Select/SelectInputSearch-
|
|
8
|
-
import "../CheckBox/CheckBox-
|
|
9
|
-
import "../CheckBox/CheckBox-
|
|
7
|
+
import "../Select/SelectInputSearch-Cj9Uubc4.js";
|
|
8
|
+
import "../CheckBox/CheckBox-BsihF-AN.js";
|
|
9
|
+
import "../CheckBox/CheckBox-D1aeCoQb.js";
|
|
10
10
|
import "../NotFoundContent/NotFoundContent-DJUQ0_2D.js";
|
|
11
11
|
import "../vendors/useFloatingPortal-CDgiCnbb.js";
|
|
12
|
-
import "../DropDown/DropDown-
|
|
13
|
-
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s } from "./Buttons-
|
|
12
|
+
import "../DropDown/DropDown-DNEQ5nQz.js";
|
|
13
|
+
import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s } from "./Buttons-0qZ4g7Ig.js";
|
|
14
14
|
import { DEFAULT_BACKGROUND_COLOR as c, DEFAULT_FONT_COLOR as l, DEFAULT_FONT_SIZE as u } from "./constants/index.js";
|
|
15
15
|
import { Fragment as d, jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
16
16
|
import m, { useCallback as h, useEffect as g, useMemo as _, useRef as v, useState as y } from "react";
|
|
@@ -2,7 +2,7 @@ import { createFromIconfontCN as e } from "@ant-design/icons";
|
|
|
2
2
|
import { isNumber as t } from "lodash-es";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
4
|
//#region src/components/Icon/Icon.tsx
|
|
5
|
-
var r = e({ scriptUrl: "https://at.alicdn.com/t/c/
|
|
5
|
+
var r = e({ scriptUrl: "https://at.alicdn.com/t/c/font_4786625_7yye49rghck.js" }), i = ({ name: e, style: i, className: a, onClick: o, color: s, size: c = 16 }) => {
|
|
6
6
|
let l = {
|
|
7
7
|
color: s,
|
|
8
8
|
fontSize: t(c) ? `${c}px` : c,
|
package/dist/Icon/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as e } from "./Icon-
|
|
1
|
+
import { t as e } from "./Icon-BQ3Whub2.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
1
|
+
import { t as e } from "../Icon/Icon-BQ3Whub2.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import { useCallback as r, useEffect as i, useLayoutEffect as a, useRef as o, useState as s } from "react";
|
|
4
4
|
import c from "clsx";
|
package/dist/InputTag/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import { t as e } from "./InputTag-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import { t as e } from "./InputTag-DcVn_bRl.js";
|
|
3
3
|
export { e as default };
|
|
@@ -1,81 +1,90 @@
|
|
|
1
|
-
import { t as e } from "../Icon/Icon-
|
|
1
|
+
import { t as e } from "../Icon/Icon-BQ3Whub2.js";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
import { useState as r } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Modal as i } from "antd";
|
|
5
|
+
import { useControllableValue as a } from "ahooks";
|
|
6
6
|
//#region src/components/Modal/modal.module.scss
|
|
7
|
-
var o = "
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
var o = "_modal_xkmkv_1", s = "_modal__title_xkmkv_4", c = "_modal__actions_xkmkv_17", l = "_modal__button_groups_xkmkv_21", u = "_modal__button_xkmkv_21", d = "_modal__icon_xkmkv_41", f = {
|
|
8
|
+
modal: o,
|
|
9
|
+
modal__title: s,
|
|
10
|
+
"modal__title-text": "_modal__title-text_xkmkv_13",
|
|
11
|
+
modal__actions: c,
|
|
12
|
+
modal__button_groups: l,
|
|
13
|
+
modal__button: u,
|
|
14
|
+
"modal__button--fullscreen": "_modal__button--fullscreen_xkmkv_38",
|
|
15
|
+
modal__icon: d
|
|
16
|
+
}, p = (o) => {
|
|
17
|
+
let { fullSwitch: s = !1 } = o, [c, l] = a(o, {
|
|
17
18
|
valuePropName: "open",
|
|
18
19
|
defaultValue: !1,
|
|
19
20
|
defaultValuePropName: "defaultOpen",
|
|
20
21
|
trigger: "onOpenChange"
|
|
21
|
-
}), [u,
|
|
22
|
-
return /* @__PURE__ */ t(
|
|
22
|
+
}), [u, d] = r(!1);
|
|
23
|
+
return /* @__PURE__ */ t(i, {
|
|
23
24
|
destroyOnHidden: !0,
|
|
24
25
|
open: c,
|
|
25
26
|
onCancel: () => l(!1),
|
|
26
27
|
footer: null,
|
|
27
28
|
title: o.title ? /* @__PURE__ */ n("div", {
|
|
28
|
-
className:
|
|
29
|
+
className: f.modal__title,
|
|
29
30
|
children: [/* @__PURE__ */ t("div", {
|
|
30
|
-
className:
|
|
31
|
+
className: f.modal__titleText,
|
|
31
32
|
children: o.title
|
|
32
33
|
}), s ? /* @__PURE__ */ n("div", {
|
|
33
|
-
className:
|
|
34
|
+
className: f.modal__button_groups,
|
|
34
35
|
children: [/* @__PURE__ */ t("div", {
|
|
35
36
|
"aria-label": "toggle fullscreen",
|
|
36
37
|
role: "button",
|
|
37
|
-
onClick: () =>
|
|
38
|
-
className:
|
|
38
|
+
onClick: () => d(!u),
|
|
39
|
+
className: f.modal__button,
|
|
39
40
|
children: /* @__PURE__ */ t(e, {
|
|
40
41
|
name: u ? "quanpingsuoxiao" : "quanpingfangda",
|
|
41
|
-
className:
|
|
42
|
+
className: f.modal__icon
|
|
42
43
|
})
|
|
43
44
|
}), /* @__PURE__ */ t("div", {
|
|
44
45
|
role: "button",
|
|
45
46
|
"aria-label": "close",
|
|
46
47
|
onClick: () => l(!1),
|
|
47
|
-
className:
|
|
48
|
+
className: f.modal__button,
|
|
48
49
|
children: /* @__PURE__ */ t(e, {
|
|
49
50
|
name: "close",
|
|
50
|
-
className:
|
|
51
|
+
className: f.modal__icon
|
|
51
52
|
})
|
|
52
53
|
})]
|
|
53
54
|
}) : /* @__PURE__ */ t("div", {
|
|
54
55
|
role: "button",
|
|
55
56
|
"aria-label": "close",
|
|
56
57
|
onClick: () => l(!1),
|
|
57
|
-
className:
|
|
58
|
+
className: f.modal__button,
|
|
58
59
|
children: /* @__PURE__ */ t(e, {
|
|
59
60
|
name: "close",
|
|
60
|
-
className:
|
|
61
|
+
className: f.modal__icon,
|
|
62
|
+
size: 18
|
|
61
63
|
})
|
|
62
64
|
})]
|
|
63
65
|
}) : null,
|
|
64
66
|
closable: !1,
|
|
67
|
+
className: f.modal,
|
|
65
68
|
width: u ? "100%" : o.width,
|
|
69
|
+
zIndex: o.zIndex,
|
|
66
70
|
style: { transition: "width 0.3s ease" },
|
|
67
|
-
|
|
71
|
+
mask: {
|
|
72
|
+
closable: !1,
|
|
73
|
+
blur: !1
|
|
74
|
+
},
|
|
75
|
+
focusable: { trap: !1 },
|
|
68
76
|
styles: {
|
|
69
77
|
header: { marginBottom: 0 },
|
|
70
|
-
|
|
78
|
+
container: {
|
|
71
79
|
padding: 0,
|
|
72
80
|
borderRadius: "10px",
|
|
73
81
|
overflow: "hidden"
|
|
74
|
-
}
|
|
82
|
+
},
|
|
83
|
+
body: { padding: 0 }
|
|
75
84
|
},
|
|
76
85
|
children: o.children
|
|
77
86
|
});
|
|
78
87
|
};
|
|
79
|
-
|
|
88
|
+
p.displayName = "BsyModal";
|
|
80
89
|
//#endregion
|
|
81
|
-
export {
|
|
90
|
+
export { p as t };
|
package/dist/Modal/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "../Icon/Icon-
|
|
2
|
-
import { t as e } from "./Modal-
|
|
1
|
+
import "../Icon/Icon-BQ3Whub2.js";
|
|
2
|
+
import { t as e } from "./Modal-B5AW5GKt.js";
|
|
3
3
|
export { e as default };
|