@para-ui/core 5.0.0-beta.10 → 5.0.0-beta.12
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/Anchor/index.js +15 -15
- package/es/Argv/dataGenerator/index.js +1 -1
- package/es/Argv/index.js +1 -1
- package/es/AutoBox/protal.js +1 -1
- package/es/AutoTips/index.js +1 -1
- package/es/Cascader/Cascader.js +1 -1
- package/es/Cascader/OptionList/Column.js +1 -1
- package/es/Cascader/OptionList/index.js +1 -1
- package/es/CheckboxGroup/index.js +1 -1
- package/es/CodeEditor/index.d.ts +1 -1
- package/es/CodeEditor/index.js +19 -19
- package/es/ComboSelect/index.js +53 -52
- package/es/DatePicker/generatePicker/generateRangePicker.js +1 -1
- package/es/DatePicker/generatePicker/generateSinglePicker.js +1 -1
- package/es/Desktop/index.js +1 -1
- package/es/Drawer/index.js +1 -1
- package/es/Dropdown/index.js +1 -1
- package/es/DynamicMultiBox/index.js +1 -1
- package/es/FieldForm/FieldFormItem/ItemHolder.js +1 -1
- package/es/FieldForm/FieldFormItem/StatusProvider.js +1 -1
- package/es/FieldForm/Form.js +1 -1
- package/es/FieldForm/FormItemInput.js +1 -1
- package/es/FieldForm/FormItemLabel.js +1 -1
- package/es/Form/index.js +1 -1
- package/es/GlobalContext/confirmLocale.js +1 -1
- package/es/GlobalContext/index.js +1 -1
- package/es/Image/PreviewGroup.js +1 -1
- package/es/Image/index.js +1 -1
- package/es/InputLang/index.js +1 -1
- package/es/Menu/verticalMenuList.js +1 -1
- package/es/Modal/Confirm/index.js +1 -1
- package/es/PageHeader/horizontalMeun.js +1 -1
- package/es/PageHeader/horizontalMeunRight.js +1 -1
- package/es/ParauiProvider/index.js +1 -1
- package/es/QuickReply/QuickReplyCode/index.js +1 -1
- package/es/RangeInput/index.js +19 -19
- package/es/Select/index.d.ts +11 -8
- package/es/Select/index.js +421 -418
- package/es/SelectInput/index.d.ts +4 -4
- package/es/SelectInput/index.js +8 -8
- package/es/Selector/index.js +52 -47
- package/es/Selector/interface.d.ts +1 -1
- package/es/Selector/selectorData/index.js +1 -1
- package/es/Selector/selectorMain/index.js +1 -1
- package/es/Selector/util.d.ts +1 -1
- package/es/Selector/util.js +6 -12
- package/es/Table/index.js +256 -253
- package/es/Table/interface.d.ts +24 -0
- package/es/Table/tableHead.js +1 -1
- package/es/Table/util.d.ts +1 -1
- package/es/Table/util.js +3 -12
- package/es/TextEditor/index.js +1 -1
- package/es/TextField/index.js +1 -1
- package/es/ToggleButton/index.js +1 -1
- package/es/Tree/OperateBar/index.js +1 -1
- package/es/Tree/Tree.js +3 -3
- package/es/Tree/interface.d.ts +1 -1
- package/es/Upload/util.js +1 -1
- package/es/Utils/snack-kit-shims.d.ts +18 -0
- package/es/Utils/snack-kit-shims.js +19 -0
- package/es/Utils/type.d.ts +0 -4
- package/es/_virtual/index.js +5 -3
- package/es/_virtual/index2.js +2 -5
- package/es/node_modules/classnames/index.js +1 -1
- package/lib/Anchor/index.js +1 -1
- package/lib/Argv/batchEdit/index.js +1 -1
- package/lib/Argv/dataGenerator/index.js +1 -1
- package/lib/Argv/index.js +1 -1
- package/lib/AutoBox/protal.js +1 -1
- package/lib/AutoTips/index.js +1 -1
- package/lib/Cascader/Cascader.js +1 -1
- package/lib/Cascader/OptionList/Column.js +1 -1
- package/lib/Cascader/OptionList/index.js +1 -1
- package/lib/CheckboxGroup/index.js +1 -1
- package/lib/CodeEditor/index.d.ts +1 -1
- package/lib/CodeEditor/index.js +1 -1
- package/lib/ComboSelect/index.js +1 -1
- package/lib/DatePicker/generatePicker/generateRangePicker.js +1 -1
- package/lib/DatePicker/generatePicker/generateSinglePicker.js +1 -1
- package/lib/Desktop/index.js +1 -1
- package/lib/Drawer/index.js +1 -1
- package/lib/Dropdown/index.js +1 -1
- package/lib/DynamicMultiBox/index.js +1 -1
- package/lib/FieldForm/FieldFormItem/ItemHolder.js +1 -1
- package/lib/FieldForm/FieldFormItem/StatusProvider.js +1 -1
- package/lib/FieldForm/Form.js +1 -1
- package/lib/FieldForm/FormItemInput.js +1 -1
- package/lib/FieldForm/FormItemLabel.js +1 -1
- package/lib/Form/index.js +1 -1
- package/lib/GlobalContext/confirmLocale.js +1 -1
- package/lib/GlobalContext/index.js +1 -1
- package/lib/Image/PreviewGroup.js +1 -1
- package/lib/Image/index.js +1 -1
- package/lib/InputCode/index.js +1 -1
- package/lib/InputLang/index.js +1 -1
- package/lib/Menu/verticalMenuList.js +1 -1
- package/lib/Modal/Confirm/index.js +1 -1
- package/lib/PageHeader/horizontalMeun.js +1 -1
- package/lib/PageHeader/horizontalMeunRight.js +1 -1
- package/lib/ParauiProvider/index.js +1 -1
- package/lib/QuickReply/QuickReplyCode/index.js +1 -1
- package/lib/RangeInput/index.js +1 -1
- package/lib/Select/index.d.ts +11 -8
- package/lib/Select/index.js +1 -1
- package/lib/SelectInput/index.d.ts +4 -4
- package/lib/SelectInput/index.js +1 -1
- package/lib/Selector/index.js +1 -1
- package/lib/Selector/interface.d.ts +1 -1
- package/lib/Selector/selectorData/index.js +1 -1
- package/lib/Selector/selectorMain/index.js +1 -1
- package/lib/Selector/util.d.ts +1 -1
- package/lib/Selector/util.js +1 -1
- package/lib/Table/index.js +1 -1
- package/lib/Table/interface.d.ts +24 -0
- package/lib/Table/tableHead.js +1 -1
- package/lib/Table/util.d.ts +1 -1
- package/lib/Table/util.js +1 -1
- package/lib/TextEditor/index.js +1 -1
- package/lib/TextField/index.js +1 -1
- package/lib/ToggleButton/index.js +1 -1
- package/lib/Tree/OperateBar/index.js +2 -2
- package/lib/Tree/Tree.js +1 -1
- package/lib/Tree/interface.d.ts +1 -1
- package/lib/Upload/util.js +1 -1
- package/lib/Utils/snack-kit-shims.d.ts +18 -0
- package/lib/Utils/snack-kit-shims.js +2 -0
- package/lib/Utils/type.d.ts +0 -4
- package/lib/_virtual/index.js +1 -1
- package/lib/_virtual/index2.js +1 -1
- package/lib/node_modules/classnames/index.js +1 -1
- package/package.json +3 -2
- package/es/_virtual/index3.js +0 -5
- package/es/_virtual/index4.js +0 -5
- package/es/node_modules/@para-snack/core/dist/index.js +0 -5231
- package/lib/_virtual/index3.js +0 -2
- package/lib/_virtual/index4.js +0 -2
- package/lib/node_modules/@para-snack/core/dist/index.js +0 -20
- /package/lib/{InputCode → CodeEditor}/index.css +0 -0
package/es/Anchor/index.js
CHANGED
|
@@ -3,20 +3,20 @@ import { useState as f, useRef as X, useEffect as q, useMemo as E } from "react"
|
|
|
3
3
|
import L from "clsx";
|
|
4
4
|
import { $prefixCls as C } from "../GlobalContext/constant.js";
|
|
5
5
|
import Y from "./anchorMenu/index.js";
|
|
6
|
-
import { ToRight as
|
|
7
|
-
import { ToLeft as
|
|
6
|
+
import { ToRight as D } from "../node_modules/@para-ui/icons/ToRight/index.js";
|
|
7
|
+
import { ToLeft as W } from "../node_modules/@para-ui/icons/ToLeft/index.js";
|
|
8
8
|
import { PreviewOpen as Z } from "../node_modules/@para-ui/icons/PreviewOpen/index.js";
|
|
9
9
|
import { Search as _ } from "../Search/index.js";
|
|
10
10
|
import ee from "../GlobalContext/useFormatMessage.js";
|
|
11
11
|
import re from "./lang/index.js";
|
|
12
|
-
import {
|
|
12
|
+
import { Throttle as ne, Debounce as se } from "@snack-kit/lib";
|
|
13
13
|
import './index.css';/* empty css */
|
|
14
14
|
const ge = (N) => {
|
|
15
15
|
const {
|
|
16
|
-
style:
|
|
16
|
+
style: z,
|
|
17
17
|
className: J,
|
|
18
|
-
title:
|
|
19
|
-
scrollId:
|
|
18
|
+
title: T = "",
|
|
19
|
+
scrollId: j = `${C}-anchor-scroll-id`,
|
|
20
20
|
list: d = [],
|
|
21
21
|
listClassName: M,
|
|
22
22
|
scrollClassName: G,
|
|
@@ -43,7 +43,7 @@ const ge = (N) => {
|
|
|
43
43
|
};
|
|
44
44
|
t(d), U(n), o.current.anchorMap = e, A(e);
|
|
45
45
|
}, [d]), q(() => {
|
|
46
|
-
const e = document.getElementById(
|
|
46
|
+
const e = document.getElementById(j), n = ne(async () => {
|
|
47
47
|
if (o.current.scrolling) return;
|
|
48
48
|
const t = e?.querySelectorAll("[id]") || [], l = Array.from(t).map((c) => ({
|
|
49
49
|
id: c.id,
|
|
@@ -61,7 +61,7 @@ const ge = (N) => {
|
|
|
61
61
|
};
|
|
62
62
|
}, []);
|
|
63
63
|
const b = (e) => {
|
|
64
|
-
const n = document.getElementById(
|
|
64
|
+
const n = document.getElementById(j), t = n?.querySelectorAll("[id]") || [], h = Array.from(t).findIndex((s) => String(s.id) === String(e)), l = t[h];
|
|
65
65
|
l && (O(e), o.current.currentAnchorId = e, o.current.scrolling = !0, setTimeout(() => {
|
|
66
66
|
o.current.scrolling = !1;
|
|
67
67
|
}, 1e3), n?.scrollTo({
|
|
@@ -87,15 +87,15 @@ const ge = (N) => {
|
|
|
87
87
|
h(n), y(t);
|
|
88
88
|
}, 200),
|
|
89
89
|
[]
|
|
90
|
-
), F = E(() =>
|
|
90
|
+
), F = E(() => T ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
91
91
|
/* @__PURE__ */ r.jsxs("div", { className: "anchor-menu-title", children: [
|
|
92
|
-
/* @__PURE__ */ r.jsx("div", { className: "title", children:
|
|
92
|
+
/* @__PURE__ */ r.jsx("div", { className: "title", children: T }),
|
|
93
93
|
/* @__PURE__ */ r.jsxs("div", { className: "opera-area", children: [
|
|
94
94
|
x && H && /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
|
|
95
95
|
/* @__PURE__ */ r.jsx(Z, { onClick: B }),
|
|
96
96
|
/* @__PURE__ */ r.jsx("div", { className: "split-line" })
|
|
97
97
|
] }),
|
|
98
|
-
/* @__PURE__ */ r.jsx("div", { onClick: () => R(!0), children: a === "left" ? /* @__PURE__ */ r.jsx(
|
|
98
|
+
/* @__PURE__ */ r.jsx("div", { onClick: () => R(!0), children: a === "left" ? /* @__PURE__ */ r.jsx(W, {}) : /* @__PURE__ */ r.jsx(D, {}) })
|
|
99
99
|
] })
|
|
100
100
|
] }),
|
|
101
101
|
K && /* @__PURE__ */ r.jsx(
|
|
@@ -115,7 +115,7 @@ const ge = (N) => {
|
|
|
115
115
|
style: { padding: "0 4px", marginBottom: "6px" }
|
|
116
116
|
}
|
|
117
117
|
)
|
|
118
|
-
] }) : null, [
|
|
118
|
+
] }) : null, [T, x, $, B, g]), P = E(() => {
|
|
119
119
|
if (!d?.length) return null;
|
|
120
120
|
if (v)
|
|
121
121
|
return /* @__PURE__ */ r.jsx(
|
|
@@ -123,7 +123,7 @@ const ge = (N) => {
|
|
|
123
123
|
{
|
|
124
124
|
className: "collapse-icon-area",
|
|
125
125
|
onClick: () => R(!1),
|
|
126
|
-
children: a === "left" ? /* @__PURE__ */ r.jsx(
|
|
126
|
+
children: a === "left" ? /* @__PURE__ */ r.jsx(D, {}) : /* @__PURE__ */ r.jsx(W, {})
|
|
127
127
|
}
|
|
128
128
|
);
|
|
129
129
|
const e = p || d;
|
|
@@ -171,13 +171,13 @@ const ge = (N) => {
|
|
|
171
171
|
className: L(`${C}-anchor`, J, {
|
|
172
172
|
[`${C}-anchor-${a}`]: a
|
|
173
173
|
}),
|
|
174
|
-
style:
|
|
174
|
+
style: z,
|
|
175
175
|
children: [
|
|
176
176
|
a === "left" && P,
|
|
177
177
|
/* @__PURE__ */ r.jsx(
|
|
178
178
|
"div",
|
|
179
179
|
{
|
|
180
|
-
id:
|
|
180
|
+
id: j,
|
|
181
181
|
className: L("anchor-scroll", G),
|
|
182
182
|
style: {
|
|
183
183
|
paddingLeft: a === "left" ? w : "0",
|
|
@@ -9,7 +9,7 @@ import { Modal as z } from "../../Modal/index.js";
|
|
|
9
9
|
import { Message as L } from "../../Message/index.js";
|
|
10
10
|
import R from "../../GlobalContext/useFormatMessage.js";
|
|
11
11
|
import U from "../lang/index.js";
|
|
12
|
-
import { UUID as A } from "@
|
|
12
|
+
import { UUID as A } from "@snack-kit/lib";
|
|
13
13
|
import './index.css';/* empty css */
|
|
14
14
|
const te = (e) => {
|
|
15
15
|
const { defaultValue: i, value: t, disabled: s, onChange: l, error: p, helperText: d, placeholderTextField: v } = e, M = R("Argv", U), [n, m] = y({ dataType: "string", data: "" }), [S, f] = y(!1), [g, T] = y(""), b = J({
|
package/es/Argv/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { useState as L, useEffect as C, useMemo as k } from "react";
|
|
|
3
3
|
import S from "clsx";
|
|
4
4
|
import { $prefixCls as B } from "../GlobalContext/constant.js";
|
|
5
5
|
import I from "../GlobalContext/useFormatMessage.js";
|
|
6
|
-
import {
|
|
6
|
+
import { Debounce as P } from "@snack-kit/lib";
|
|
7
7
|
import q from "./lang/index.js";
|
|
8
8
|
import R from "./batchEdit/index.js";
|
|
9
9
|
import w, { checkGeneratorData as z, formatGeneratorToData as A, formatDataToGenerator as O } from "./dataGenerator/index.js";
|
package/es/AutoBox/protal.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as o } from "../_virtual/jsx-runtime.js";
|
|
2
2
|
import { useState as v, useRef as i, useEffect as y } from "react";
|
|
3
3
|
import { createPortal as E } from "react-dom";
|
|
4
|
-
import { UUID as S } from "@
|
|
4
|
+
import { UUID as S } from "@snack-kit/lib";
|
|
5
5
|
import { $prefixCls as h } from "../GlobalContext/constant.js";
|
|
6
6
|
const M = (p) => {
|
|
7
7
|
const { children: w, className: a, anchorEl: l, onClose: m } = p, [g, x] = v({}), c = i({
|
package/es/AutoTips/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { j as r } from "../_virtual/jsx-runtime.js";
|
|
|
2
2
|
import { useRef as d, useState as $, useEffect as A } from "react";
|
|
3
3
|
import { Tooltip as N } from "../Tooltip/index.js";
|
|
4
4
|
import { $prefixCls as o } from "../GlobalContext/constant.js";
|
|
5
|
-
import { isIE as b } from "
|
|
5
|
+
import { isIE as b } from "../Utils/snack-kit-shims.js";
|
|
6
6
|
import { default as q } from "./autoTipsMultiline/index.js";
|
|
7
7
|
import './index.css';/* empty css */
|
|
8
8
|
const I = (x) => {
|
package/es/Cascader/Cascader.js
CHANGED
|
@@ -16,7 +16,7 @@ import Ye from "./hooks/useMissingValues.js";
|
|
|
16
16
|
import Ze from "./OptionList/index.js";
|
|
17
17
|
import { SHOW_PARENT as ae, fillFieldNames as et, toPathKeys as oe, SHOW_CHILD as tt } from "./utils/commonUtil.js";
|
|
18
18
|
import { formatStrategyValues as st, toPathOptions as ne } from "./utils/treeUtil.js";
|
|
19
|
-
import { UUID as ot } from "@
|
|
19
|
+
import { UUID as ot } from "@snack-kit/lib";
|
|
20
20
|
import { $prefixCls as x } from "../GlobalContext/constant.js";
|
|
21
21
|
import { Tooltip as re } from "../Tooltip/index.js";
|
|
22
22
|
import nt from "./lang/index.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as e } from "../../_virtual/jsx-runtime.js";
|
|
2
|
-
import Q from "../../_virtual/
|
|
2
|
+
import Q from "../../_virtual/index.js";
|
|
3
3
|
import * as F from "react";
|
|
4
4
|
import U from "../context.js";
|
|
5
5
|
import { isLeaf as Y, toPathKey as Z } from "../utils/commonUtil.js";
|
|
@@ -3,7 +3,7 @@ import { useState as D, useEffect as C, createElement as E } from "react";
|
|
|
3
3
|
import { Checkbox as w } from "../Checkbox/index.js";
|
|
4
4
|
import I from "../Label/index.js";
|
|
5
5
|
import R from "../HelperText/index.js";
|
|
6
|
-
import { DeepClone as S } from "@
|
|
6
|
+
import { DeepClone as S } from "@snack-kit/lib";
|
|
7
7
|
import { $prefixCls as t } from "../GlobalContext/constant.js";
|
|
8
8
|
import './index.css';/* empty css */
|
|
9
9
|
function K(l) {
|
package/es/CodeEditor/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React, FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
import { Snack } from '@
|
|
2
|
+
import { Snack } from '@snack-kit/core';
|
|
3
3
|
export type CodeEditorLanguageType = 'plaintext' | 'html' | 'xml' | 'javascript' | 'css' | 'less' | 'scss' | 'json' | 'typescript' | 'java' | 'mysql' | 'go' | 'shell' | 'python' | 'c' | string;
|
|
4
4
|
export declare enum CompletionItemKind {
|
|
5
5
|
Method = 0,
|
package/es/CodeEditor/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as f } from "../_virtual/jsx-runtime.js";
|
|
2
|
-
import sr, { useState as y, useRef as
|
|
3
|
-
import { Context as er } from "@
|
|
2
|
+
import sr, { useState as y, useRef as b, useEffect as h, useMemo as ar } from "react";
|
|
3
|
+
import { Context as er } from "@snack-kit/lib";
|
|
4
4
|
import cr from "react-dom";
|
|
5
5
|
import ur from "clsx";
|
|
6
6
|
import { $prefixCls as tr } from "../GlobalContext/constant.js";
|
|
7
|
-
import {
|
|
7
|
+
import { SnackSDK as gr } from "@snack-kit/core";
|
|
8
8
|
import { Loading as fr } from "../Loading/index.js";
|
|
9
9
|
import hr from "./lang/index.js";
|
|
10
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
|
-
const
|
|
12
|
+
const Fr = (r) => {
|
|
13
13
|
const {
|
|
14
|
-
className:
|
|
15
|
-
style:
|
|
16
|
-
id:
|
|
14
|
+
className: E,
|
|
15
|
+
style: w,
|
|
16
|
+
id: F,
|
|
17
17
|
language: k,
|
|
18
|
-
zoomLength:
|
|
18
|
+
zoomLength: d = 300,
|
|
19
19
|
theme: R = "vs-light",
|
|
20
20
|
resize: v = !0,
|
|
21
21
|
editorLanguage: L = "javascript",
|
|
@@ -43,8 +43,8 @@ const wr = (r) => {
|
|
|
43
43
|
onClickCodeSnippet: Q,
|
|
44
44
|
onChange: S,
|
|
45
45
|
onChangeLanguage: W,
|
|
46
|
-
onMounted:
|
|
47
|
-
} = r, [X,
|
|
46
|
+
onMounted: M
|
|
47
|
+
} = r, [X, o] = y(!0), [n, Y] = y(), l = b(null), s = b({});
|
|
48
48
|
h(() => (C(), () => {
|
|
49
49
|
clearTimeout(s.current.snackTimer);
|
|
50
50
|
}), []), h(() => {
|
|
@@ -56,7 +56,7 @@ const wr = (r) => {
|
|
|
56
56
|
s.current.snackClass && (s.current.snackClass.data[a] = e, s.current.snackClass.$forceUpdate(), s.current.snackClass.editor?.focus());
|
|
57
57
|
}, p = async () => {
|
|
58
58
|
if (s.current.sdk) return s.current.sdk;
|
|
59
|
-
const a = new gr
|
|
59
|
+
const a = new gr({
|
|
60
60
|
service: er.get("snackbar"),
|
|
61
61
|
importMaps: {
|
|
62
62
|
react: sr,
|
|
@@ -66,14 +66,14 @@ const wr = (r) => {
|
|
|
66
66
|
});
|
|
67
67
|
return s.current.sdk = a, a;
|
|
68
68
|
}, C = async () => {
|
|
69
|
-
|
|
69
|
+
o(!0);
|
|
70
70
|
const e = await (await p()).createModule(
|
|
71
71
|
{ name: "codeeditornew", type: "code-editor" },
|
|
72
72
|
{
|
|
73
|
-
id:
|
|
73
|
+
id: F,
|
|
74
74
|
theme: R,
|
|
75
75
|
language: k || hr,
|
|
76
|
-
zoomLength:
|
|
76
|
+
zoomLength: d,
|
|
77
77
|
editorLanguage: L,
|
|
78
78
|
title: A,
|
|
79
79
|
disabledSelectLanguage: T,
|
|
@@ -102,27 +102,27 @@ const wr = (r) => {
|
|
|
102
102
|
monacoEditorProps: q
|
|
103
103
|
}
|
|
104
104
|
);
|
|
105
|
-
if (
|
|
105
|
+
if (o(!1), !e)
|
|
106
106
|
return;
|
|
107
107
|
const m = () => e.FC();
|
|
108
108
|
Y(/* @__PURE__ */ f.jsx(m, {})), s.current.snackTimer = setTimeout(() => {
|
|
109
109
|
e.updateSnackModules = Z, s.current.snackClass = e, e.getMoveHeight = (rr) => {
|
|
110
110
|
const x = l.current;
|
|
111
111
|
x && (x.style.height = rr);
|
|
112
|
-
},
|
|
112
|
+
}, M && M(e);
|
|
113
113
|
});
|
|
114
114
|
}, i = (a) => {
|
|
115
115
|
S && S(a);
|
|
116
116
|
}, I = ar(() => n, [n]), K = () => {
|
|
117
117
|
const a = {
|
|
118
|
-
...
|
|
118
|
+
...w
|
|
119
119
|
};
|
|
120
120
|
return c && (a.width = c), u && (a.height = u), a;
|
|
121
121
|
};
|
|
122
122
|
return /* @__PURE__ */ f.jsxs(
|
|
123
123
|
"div",
|
|
124
124
|
{
|
|
125
|
-
className: ur(`${tr}-code-editor`,
|
|
125
|
+
className: ur(`${tr}-code-editor`, E),
|
|
126
126
|
style: K(),
|
|
127
127
|
ref: l,
|
|
128
128
|
children: [
|
|
@@ -134,6 +134,6 @@ const wr = (r) => {
|
|
|
134
134
|
};
|
|
135
135
|
export {
|
|
136
136
|
kr as CompletionItemKind,
|
|
137
|
-
|
|
137
|
+
Fr as default
|
|
138
138
|
};
|
|
139
139
|
//# sourceMappingURL=index.js.map
|
package/es/ComboSelect/index.js
CHANGED
|
@@ -14,9 +14,10 @@ import xe from "../AutoTips/index.js";
|
|
|
14
14
|
import { Tooltip as eo } from "../Tooltip/index.js";
|
|
15
15
|
import I from "clsx";
|
|
16
16
|
import { getReplaceField as to, isRemoteLoad as oo, debounce as ro, toArray as lt, closest as so, getOverlaySize as lo } from "./utils.js";
|
|
17
|
-
import {
|
|
18
|
-
import
|
|
19
|
-
import io from "../
|
|
17
|
+
import { DeepClone as no } from "@snack-kit/lib";
|
|
18
|
+
import { ArrayToObject as co } from "../Utils/snack-kit-shims.js";
|
|
19
|
+
import io from "../GlobalContext/index.js";
|
|
20
|
+
import ao from "../Hooks/useGlobalProps.js";
|
|
20
21
|
import mo from "../GlobalContext/useFormatMessage.js";
|
|
21
22
|
import uo from "./lang/index.js";
|
|
22
23
|
import fo from "../Label/index.js";
|
|
@@ -25,15 +26,15 @@ import { $prefixCls as m } from "../GlobalContext/constant.js";
|
|
|
25
26
|
import { Search as ho } from "../Search/index.js";
|
|
26
27
|
import { LoadingF as bo } from "../node_modules/@para-ui/icons/LoadingF/index.js";
|
|
27
28
|
/* empty css */
|
|
28
|
-
const
|
|
29
|
+
const Bo = (nt) => {
|
|
29
30
|
const {
|
|
30
31
|
mode: d = "table",
|
|
31
32
|
placeholder: je,
|
|
32
33
|
searchPlaceholder: ct,
|
|
33
34
|
overLine: V = !1,
|
|
34
35
|
disabled: Ce = !1,
|
|
35
|
-
allowClear:
|
|
36
|
-
className:
|
|
36
|
+
allowClear: it = !1,
|
|
37
|
+
className: at,
|
|
37
38
|
style: mt,
|
|
38
39
|
maxHeight: dt,
|
|
39
40
|
height: ut,
|
|
@@ -56,7 +57,7 @@ const qo = (nt) => {
|
|
|
56
57
|
refresh: k,
|
|
57
58
|
TableProps: le,
|
|
58
59
|
TreeProps: M,
|
|
59
|
-
checkable:
|
|
60
|
+
checkable: i = !0,
|
|
60
61
|
url: Te,
|
|
61
62
|
ctx: ke,
|
|
62
63
|
params: R,
|
|
@@ -80,14 +81,14 @@ const qo = (nt) => {
|
|
|
80
81
|
toggleSelectedOnSingle: Pt = !1,
|
|
81
82
|
optionRender: De,
|
|
82
83
|
getOptionLabel: ze,
|
|
83
|
-
dropdownMatchSelectWidth:
|
|
84
|
+
dropdownMatchSelectWidth: ie = !0,
|
|
84
85
|
getPopupContainer: St,
|
|
85
86
|
maxTagTextLength: W,
|
|
86
87
|
renderInputContent: q,
|
|
87
|
-
renderTagLabel:
|
|
88
|
+
renderTagLabel: ae,
|
|
88
89
|
renderMoreTagLabel: Ee
|
|
89
|
-
} =
|
|
90
|
-
h.current.openMore = z, h.current.list = [...
|
|
90
|
+
} = ao(nt, "ComboSelect"), { language: Fe, locale: Ke } = Gt.useContext(io), $ = v(null), [p, me] = g(!1), [x, B] = g([]), G = v(/* @__PURE__ */ new Map()), [a, _] = g([]), [J, Ae] = g(""), U = v(void 0), [O, Ie] = g(null), [D, Rt] = g(!1), [L, $t] = g(0), [z, E] = g(!1), de = v([]), F = v(!1), Q = v(null), Ve = v({}), He = to(d, bt, le, M), { key: K = "", title: We = "" } = He, { outputKey: j = "key", outputTitle: y = "label" } = vt || {}, P = mo("ComboSelect", uo), qe = v(oo(d, d === "table" ? le : M)), [ue, Lt] = g(), h = v({ list: [] }), [w, fe] = g(null), pe = v(null);
|
|
91
|
+
h.current.openMore = z, h.current.list = [...a];
|
|
91
92
|
const Mt = () => {
|
|
92
93
|
h.current.openMore && E(!1);
|
|
93
94
|
}, Be = (e) => {
|
|
@@ -107,9 +108,9 @@ const qo = (nt) => {
|
|
|
107
108
|
};
|
|
108
109
|
S(() => (X(), () => {
|
|
109
110
|
clearTimeout(h.current.resizeTimer);
|
|
110
|
-
}), [
|
|
111
|
+
}), [a]), S(() => (!V && i ? window.addEventListener("resize", X) : window.removeEventListener("resize", X), () => {
|
|
111
112
|
window.removeEventListener("resize", X);
|
|
112
|
-
}), [V,
|
|
113
|
+
}), [V, i]);
|
|
113
114
|
const Ot = (e) => {
|
|
114
115
|
if (!f && !Ce) {
|
|
115
116
|
if (F.current) {
|
|
@@ -131,7 +132,7 @@ const qo = (nt) => {
|
|
|
131
132
|
});
|
|
132
133
|
}, _e = (e, o) => {
|
|
133
134
|
if (e.stopPropagation(), o.closable === !1 || $e?.(o) === !1) return;
|
|
134
|
-
const r = [...
|
|
135
|
+
const r = [...a], l = r.findIndex((s) => s[j] === o[j]);
|
|
135
136
|
l > -1 && r.splice(l, 1), _(r), Dt(o), T?.(r);
|
|
136
137
|
}, zt = N(
|
|
137
138
|
() => ro(async (e) => {
|
|
@@ -144,23 +145,23 @@ const qo = (nt) => {
|
|
|
144
145
|
const o = e ?? J;
|
|
145
146
|
se ? se(o) : (U.current = o?.trim(), $t(Math.random())), qe.current && Lt([]);
|
|
146
147
|
}, Je = (e, o) => {
|
|
147
|
-
o ? (xt?.(
|
|
148
|
+
o ? (xt?.(a), C(null, "ok")) : (gt?.(), C(null, "cancel"));
|
|
148
149
|
}, Ue = () => {
|
|
149
150
|
let e = "auto";
|
|
150
151
|
$.current && (e = `${$.current.offsetWidth}px`);
|
|
151
152
|
const o = lo(d, qe.current, dt, ut), r = { minWidth: e, maxWidth: 960 };
|
|
152
|
-
return typeof
|
|
153
|
+
return typeof ie == "number" ? r.width = ie : ie && (r.width = e), {
|
|
153
154
|
overflow: "auto",
|
|
154
155
|
...r,
|
|
155
156
|
...o
|
|
156
157
|
};
|
|
157
158
|
}, Ft = () => I(
|
|
158
159
|
`${m}-comboselect`,
|
|
159
|
-
|
|
160
|
+
at,
|
|
160
161
|
{
|
|
161
162
|
[`${m}-comboselect-focused`]: p && !f,
|
|
162
163
|
[`${m}-comboselect-disabled`]: Ce,
|
|
163
|
-
[`${m}-comboselect-radioable`]: !
|
|
164
|
+
[`${m}-comboselect-radioable`]: !i,
|
|
164
165
|
[`${m}-comboselect-error`]: Se,
|
|
165
166
|
[`${m}-comboselect-clear`]: D,
|
|
166
167
|
[`${m}-comboselect-non-popup`]: f,
|
|
@@ -179,8 +180,8 @@ const qo = (nt) => {
|
|
|
179
180
|
c && r.push(...c);
|
|
180
181
|
}
|
|
181
182
|
_(r);
|
|
182
|
-
const l =
|
|
183
|
-
|
|
183
|
+
const l = no(e || []);
|
|
184
|
+
i ? T?.(r, l) : T?.(r[0], l[0]);
|
|
184
185
|
}, Qe = (e) => {
|
|
185
186
|
const o = e.map((r) => r[j]);
|
|
186
187
|
_(e), B(o), de.current = e;
|
|
@@ -244,7 +245,7 @@ const qo = (nt) => {
|
|
|
244
245
|
/* @__PURE__ */ t.jsx("span", { children: P({ id: "fullPath" }) }),
|
|
245
246
|
O?.[Nt] ?? ""
|
|
246
247
|
] }), It = (e) => {
|
|
247
|
-
e.stopPropagation(), Ge(), C(), E(!1), re?.(), T?.(
|
|
248
|
+
e.stopPropagation(), Ge(), C(), E(!1), re?.(), T?.(i ? [] : {});
|
|
248
249
|
}, Vt = (e) => {
|
|
249
250
|
e.stopPropagation(), E(!0), C();
|
|
250
251
|
};
|
|
@@ -257,8 +258,8 @@ const qo = (nt) => {
|
|
|
257
258
|
}, []), S(() => {
|
|
258
259
|
oe && Qe(lt(oe));
|
|
259
260
|
}, [oe]), S(() => {
|
|
260
|
-
|
|
261
|
-
}, [
|
|
261
|
+
it && Rt(!!a?.length);
|
|
262
|
+
}, [a]), S(() => {
|
|
262
263
|
const e = (r) => r && r.ownerDocument || document, o = (r) => {
|
|
263
264
|
const l = e($.current), s = r.target, c = !l.documentElement.contains(s) || Q.current?.contains(s) || $.current?.contains(s) || !1;
|
|
264
265
|
if (d === "table") {
|
|
@@ -279,17 +280,17 @@ const qo = (nt) => {
|
|
|
279
280
|
}
|
|
280
281
|
}, [p]);
|
|
281
282
|
const et = N(() => {
|
|
282
|
-
if (!
|
|
283
|
+
if (!a?.length) return null;
|
|
283
284
|
if (q)
|
|
284
|
-
return q(
|
|
285
|
-
if (!
|
|
286
|
-
return /* @__PURE__ */ t.jsx("span", { className: "comboselect-single-content", children: /* @__PURE__ */ t.jsx(xe, { children:
|
|
287
|
-
if (!
|
|
285
|
+
return q(i ? a : a[0]);
|
|
286
|
+
if (!i)
|
|
287
|
+
return /* @__PURE__ */ t.jsx("span", { className: "comboselect-single-content", children: /* @__PURE__ */ t.jsx(xe, { children: a[0]?.[y] }) });
|
|
288
|
+
if (!a.length) return;
|
|
288
289
|
const e = (l) => {
|
|
289
290
|
if (ce) return ce(l);
|
|
290
291
|
const { disabled: s, closable: c = !0 } = l ?? {};
|
|
291
292
|
let n = l[y];
|
|
292
|
-
|
|
293
|
+
ae && (n = ae(l));
|
|
293
294
|
let u = !1;
|
|
294
295
|
if (typeof W == "number" && (typeof n == "string" || typeof n == "number")) {
|
|
295
296
|
const b = String(n);
|
|
@@ -334,7 +335,7 @@ const qo = (nt) => {
|
|
|
334
335
|
h.current.list.length - w
|
|
335
336
|
] })
|
|
336
337
|
}
|
|
337
|
-
) }) : null, r =
|
|
338
|
+
) }) : null, r = a.map((l, s) => w !== null && w <= s ? null : /* @__PURE__ */ t.jsx(
|
|
338
339
|
"div",
|
|
339
340
|
{
|
|
340
341
|
className: "comboselect-overflow-item",
|
|
@@ -347,15 +348,15 @@ const qo = (nt) => {
|
|
|
347
348
|
o()
|
|
348
349
|
] });
|
|
349
350
|
}, [
|
|
350
|
-
i,
|
|
351
|
-
T,
|
|
352
351
|
a,
|
|
352
|
+
T,
|
|
353
|
+
i,
|
|
353
354
|
w,
|
|
354
355
|
W,
|
|
355
356
|
y,
|
|
356
357
|
ce,
|
|
357
358
|
q,
|
|
358
|
-
|
|
359
|
+
ae,
|
|
359
360
|
V
|
|
360
361
|
]), Z = N(() => {
|
|
361
362
|
let e = R || Ve.current;
|
|
@@ -368,7 +369,7 @@ const qo = (nt) => {
|
|
|
368
369
|
search: Z,
|
|
369
370
|
method: Pe
|
|
370
371
|
}, o = (r, l) => {
|
|
371
|
-
!
|
|
372
|
+
!i && (C(), x.includes(r)) || he([r], [l]);
|
|
372
373
|
};
|
|
373
374
|
return /* @__PURE__ */ t.jsx("div", { className: "comboselect-table", children: /* @__PURE__ */ t.jsx(
|
|
374
375
|
Xt,
|
|
@@ -376,8 +377,8 @@ const qo = (nt) => {
|
|
|
376
377
|
...e,
|
|
377
378
|
...le,
|
|
378
379
|
emptyProps: Oe,
|
|
379
|
-
check:
|
|
380
|
-
radio: !
|
|
380
|
+
check: i,
|
|
381
|
+
radio: !i,
|
|
381
382
|
rowKey: K,
|
|
382
383
|
setCheck: he,
|
|
383
384
|
setRadio: o,
|
|
@@ -390,7 +391,7 @@ const qo = (nt) => {
|
|
|
390
391
|
paginationType: "simple"
|
|
391
392
|
}
|
|
392
393
|
) });
|
|
393
|
-
}, [x, k, R, L, f, p, Z, K,
|
|
394
|
+
}, [x, k, R, L, f, p, Z, K, i]), ve = N(() => {
|
|
394
395
|
if (!f && !p || !["tree", "list"].includes(d)) return null;
|
|
395
396
|
const e = {
|
|
396
397
|
url: Te,
|
|
@@ -403,11 +404,11 @@ const qo = (nt) => {
|
|
|
403
404
|
if (u[j] = c.node[K] || "", u[y] = c.node[We] || "", $e?.(u) === !1)
|
|
404
405
|
return;
|
|
405
406
|
}
|
|
406
|
-
if (!
|
|
407
|
+
if (!i && (C(), !Pt && x.includes(c.node?.key)))
|
|
407
408
|
return;
|
|
408
409
|
let n = c.checkedNodes;
|
|
409
|
-
if (
|
|
410
|
-
const u =
|
|
410
|
+
if (i || s?.length && (n = [c.node]), i) {
|
|
411
|
+
const u = co("key", n);
|
|
411
412
|
Array.from(G.current.keys()).forEach((A) => {
|
|
412
413
|
s.includes(A) || G.current.delete(A);
|
|
413
414
|
}), s.forEach((A) => {
|
|
@@ -418,7 +419,7 @@ const qo = (nt) => {
|
|
|
418
419
|
he(s, n);
|
|
419
420
|
}, r = (s) => M?.titleRender ? M.titleRender(s) : De ? De(s) : s.title, l = I("comboselect-tree", {
|
|
420
421
|
"comboselect-list": d === "list",
|
|
421
|
-
"comboselect-list-single": d === "list" && !
|
|
422
|
+
"comboselect-list-single": d === "list" && !i
|
|
422
423
|
});
|
|
423
424
|
return /* @__PURE__ */ t.jsx("div", { className: l, children: /* @__PURE__ */ t.jsx(
|
|
424
425
|
Yt,
|
|
@@ -429,8 +430,8 @@ const qo = (nt) => {
|
|
|
429
430
|
wrapperStyle: { position: "static" },
|
|
430
431
|
emptyProps: { size: "small", ...Oe },
|
|
431
432
|
replaceFields: He,
|
|
432
|
-
checkable:
|
|
433
|
-
radioable: !
|
|
433
|
+
checkable: i,
|
|
434
|
+
radioable: !i,
|
|
434
435
|
showRadio: !1,
|
|
435
436
|
selectable: d !== "list",
|
|
436
437
|
loadedKeys: ue,
|
|
@@ -445,14 +446,14 @@ const qo = (nt) => {
|
|
|
445
446
|
] })
|
|
446
447
|
}
|
|
447
448
|
) });
|
|
448
|
-
}, [x, k, R, L, f, p, ue, d, Z,
|
|
449
|
+
}, [x, k, R, L, f, p, ue, d, Z, i]), ee = N(() => /* @__PURE__ */ t.jsxs(
|
|
449
450
|
"div",
|
|
450
451
|
{
|
|
451
452
|
className: "comboselect-wrapper",
|
|
452
453
|
ref: $,
|
|
453
454
|
onClick: Ot,
|
|
454
455
|
children: [
|
|
455
|
-
/* @__PURE__ */ t.jsx("div", { className: I("comboselect-overflow", !
|
|
456
|
+
/* @__PURE__ */ t.jsx("div", { className: I("comboselect-overflow", !i && "comboselect-overflow-single"), children: et }),
|
|
456
457
|
!f && /* @__PURE__ */ t.jsx("span", { className: "comboselect-arrow", children: /* @__PURE__ */ t.jsx(Jt, {}) }),
|
|
457
458
|
D && /* @__PURE__ */ t.jsx(
|
|
458
459
|
"span",
|
|
@@ -462,10 +463,10 @@ const qo = (nt) => {
|
|
|
462
463
|
children: /* @__PURE__ */ t.jsx(Qt, {})
|
|
463
464
|
}
|
|
464
465
|
),
|
|
465
|
-
!
|
|
466
|
+
!a?.length && /* @__PURE__ */ t.jsx("span", { className: "comboselect-placeholder", children: je ?? P({ id: "pleaseSelect" }) })
|
|
466
467
|
]
|
|
467
468
|
}
|
|
468
|
-
), [
|
|
469
|
+
), [a, et, i, D, f, je]), Ht = () => Le || Me ? /* @__PURE__ */ t.jsx(
|
|
469
470
|
fo,
|
|
470
471
|
{
|
|
471
472
|
label: Le,
|
|
@@ -492,7 +493,7 @@ const qo = (nt) => {
|
|
|
492
493
|
)
|
|
493
494
|
}
|
|
494
495
|
), tt = () => {
|
|
495
|
-
const e = () =>
|
|
496
|
+
const e = () => a.map((o, r) => {
|
|
496
497
|
if (w !== null && w > r) return null;
|
|
497
498
|
let l = o[y];
|
|
498
499
|
return Ee && (l = Ee(o)), /* @__PURE__ */ t.jsxs(
|
|
@@ -557,7 +558,7 @@ const qo = (nt) => {
|
|
|
557
558
|
T,
|
|
558
559
|
re,
|
|
559
560
|
ee,
|
|
560
|
-
|
|
561
|
+
a
|
|
561
562
|
]), Bt = N(() => /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
562
563
|
/* @__PURE__ */ t.jsx(
|
|
563
564
|
st,
|
|
@@ -593,7 +594,7 @@ const qo = (nt) => {
|
|
|
593
594
|
ve,
|
|
594
595
|
ee,
|
|
595
596
|
z,
|
|
596
|
-
|
|
597
|
+
a
|
|
597
598
|
]);
|
|
598
599
|
return /* @__PURE__ */ t.jsxs(
|
|
599
600
|
"div",
|
|
@@ -617,7 +618,7 @@ const qo = (nt) => {
|
|
|
617
618
|
);
|
|
618
619
|
};
|
|
619
620
|
export {
|
|
620
|
-
|
|
621
|
-
|
|
621
|
+
Bo as ComboSelect,
|
|
622
|
+
Bo as default
|
|
622
623
|
};
|
|
623
624
|
//# sourceMappingURL=index.js.map
|
|
@@ -13,7 +13,7 @@ import fe from "../../GlobalContext/index.js";
|
|
|
13
13
|
import de from "../../Label/index.js";
|
|
14
14
|
import xe from "../../HelperText/index.js";
|
|
15
15
|
import { $prefixCls as I } from "../../GlobalContext/constant.js";
|
|
16
|
-
import { UUID as ge } from "@
|
|
16
|
+
import { UUID as ge } from "@snack-kit/lib";
|
|
17
17
|
import L from "../PickerTag.js";
|
|
18
18
|
import { Tooltip as Pe } from "../../Tooltip/index.js";
|
|
19
19
|
function Se(z) {
|
|
@@ -12,7 +12,7 @@ import Pe from "../../GlobalContext/index.js";
|
|
|
12
12
|
import xe from "../../Label/index.js";
|
|
13
13
|
import ke from "../../HelperText/index.js";
|
|
14
14
|
import { $prefixCls as I } from "../../GlobalContext/constant.js";
|
|
15
|
-
import { UUID as ge } from "@
|
|
15
|
+
import { UUID as ge } from "@snack-kit/lib";
|
|
16
16
|
import Ce from "../PickerTag.js";
|
|
17
17
|
import { Tooltip as he } from "../../Tooltip/index.js";
|
|
18
18
|
function Ge(L) {
|
package/es/Desktop/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { j as a } from "../_virtual/jsx-runtime.js";
|
|
2
2
|
import z, { useRef as nt, useState as Z, useMemo as it } from "react";
|
|
3
3
|
import { TextField as gt } from "../TextField/index.js";
|
|
4
|
-
import { DeepClone as xt } from "@
|
|
4
|
+
import { DeepClone as xt } from "@snack-kit/lib";
|
|
5
5
|
import { $prefixCls as rt } from "../GlobalContext/constant.js";
|
|
6
6
|
import F from "../AutoTips/index.js";
|
|
7
7
|
import { Left as qt } from "../node_modules/@para-ui/icons/Left/index.js";
|
package/es/Drawer/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import oe from "../GlobalContext/useFormatMessage.js";
|
|
|
7
7
|
import ie from "./lang/index.js";
|
|
8
8
|
import { $prefixCls as c } from "../GlobalContext/constant.js";
|
|
9
9
|
import se from "../AutoTips/index.js";
|
|
10
|
-
import { isIE as H } from "
|
|
10
|
+
import { isIE as H } from "../Utils/snack-kit-shims.js";
|
|
11
11
|
import { closest as R } from "./util.js";
|
|
12
12
|
import './index.css';/* empty css */
|
|
13
13
|
const ce = (n) => {
|