@para-ui/core 5.0.0-beta.11 → 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.
Files changed (127) hide show
  1. package/es/Anchor/index.js +15 -15
  2. package/es/Argv/dataGenerator/index.js +1 -1
  3. package/es/Argv/index.js +1 -1
  4. package/es/AutoBox/protal.js +1 -1
  5. package/es/AutoTips/index.js +1 -1
  6. package/es/Cascader/Cascader.js +1 -1
  7. package/es/Cascader/OptionList/Column.js +1 -1
  8. package/es/Cascader/OptionList/index.js +1 -1
  9. package/es/CheckboxGroup/index.js +1 -1
  10. package/es/CodeEditor/index.d.ts +1 -1
  11. package/es/CodeEditor/index.js +19 -19
  12. package/es/ComboSelect/index.js +53 -52
  13. package/es/DatePicker/generatePicker/generateRangePicker.js +1 -1
  14. package/es/DatePicker/generatePicker/generateSinglePicker.js +1 -1
  15. package/es/Desktop/index.js +1 -1
  16. package/es/Drawer/index.js +1 -1
  17. package/es/Dropdown/index.js +1 -1
  18. package/es/DynamicMultiBox/index.js +1 -1
  19. package/es/FieldForm/FieldFormItem/ItemHolder.js +1 -1
  20. package/es/FieldForm/FieldFormItem/StatusProvider.js +1 -1
  21. package/es/FieldForm/Form.js +1 -1
  22. package/es/FieldForm/FormItemInput.js +1 -1
  23. package/es/FieldForm/FormItemLabel.js +1 -1
  24. package/es/Form/index.js +1 -1
  25. package/es/GlobalContext/confirmLocale.js +1 -1
  26. package/es/GlobalContext/index.js +1 -1
  27. package/es/Image/PreviewGroup.js +1 -1
  28. package/es/Image/index.js +1 -1
  29. package/es/InputLang/index.js +1 -1
  30. package/es/Menu/verticalMenuList.js +1 -1
  31. package/es/Modal/Confirm/index.js +1 -1
  32. package/es/PageHeader/horizontalMeun.js +1 -1
  33. package/es/PageHeader/horizontalMeunRight.js +1 -1
  34. package/es/ParauiProvider/index.js +1 -1
  35. package/es/QuickReply/QuickReplyCode/index.js +1 -1
  36. package/es/RangeInput/index.js +19 -19
  37. package/es/Select/index.js +1 -1
  38. package/es/Selector/index.js +52 -47
  39. package/es/Selector/interface.d.ts +1 -1
  40. package/es/Selector/selectorData/index.js +1 -1
  41. package/es/Selector/selectorMain/index.js +1 -1
  42. package/es/Selector/util.d.ts +1 -1
  43. package/es/Selector/util.js +6 -12
  44. package/es/Table/index.js +256 -253
  45. package/es/Table/interface.d.ts +24 -0
  46. package/es/Table/tableHead.js +1 -1
  47. package/es/Table/util.d.ts +1 -1
  48. package/es/Table/util.js +3 -12
  49. package/es/TextEditor/index.js +1 -1
  50. package/es/TextField/index.js +1 -1
  51. package/es/ToggleButton/index.js +1 -1
  52. package/es/Tree/OperateBar/index.js +1 -1
  53. package/es/Tree/Tree.js +3 -3
  54. package/es/Tree/interface.d.ts +1 -1
  55. package/es/Upload/util.js +1 -1
  56. package/es/Utils/snack-kit-shims.d.ts +18 -0
  57. package/es/Utils/snack-kit-shims.js +19 -0
  58. package/es/_virtual/index.js +5 -3
  59. package/es/_virtual/index2.js +2 -5
  60. package/es/node_modules/classnames/index.js +1 -1
  61. package/lib/Anchor/index.js +1 -1
  62. package/lib/Argv/dataGenerator/index.js +1 -1
  63. package/lib/Argv/index.js +1 -1
  64. package/lib/AutoBox/protal.js +1 -1
  65. package/lib/AutoTips/index.js +1 -1
  66. package/lib/Cascader/Cascader.js +1 -1
  67. package/lib/Cascader/OptionList/Column.js +1 -1
  68. package/lib/Cascader/OptionList/index.js +1 -1
  69. package/lib/CheckboxGroup/index.js +1 -1
  70. package/lib/CodeEditor/index.d.ts +1 -1
  71. package/lib/CodeEditor/index.js +1 -1
  72. package/lib/ComboSelect/index.js +1 -1
  73. package/lib/DatePicker/generatePicker/generateRangePicker.js +1 -1
  74. package/lib/DatePicker/generatePicker/generateSinglePicker.js +1 -1
  75. package/lib/Desktop/index.js +1 -1
  76. package/lib/Drawer/index.js +1 -1
  77. package/lib/Dropdown/index.js +1 -1
  78. package/lib/DynamicMultiBox/index.js +1 -1
  79. package/lib/FieldForm/FieldFormItem/ItemHolder.js +1 -1
  80. package/lib/FieldForm/FieldFormItem/StatusProvider.js +1 -1
  81. package/lib/FieldForm/Form.js +1 -1
  82. package/lib/FieldForm/FormItemInput.js +1 -1
  83. package/lib/FieldForm/FormItemLabel.js +1 -1
  84. package/lib/Form/index.js +1 -1
  85. package/lib/GlobalContext/confirmLocale.js +1 -1
  86. package/lib/GlobalContext/index.js +1 -1
  87. package/lib/Image/PreviewGroup.js +1 -1
  88. package/lib/Image/index.js +1 -1
  89. package/lib/InputLang/index.js +1 -1
  90. package/lib/Menu/verticalMenuList.js +1 -1
  91. package/lib/Modal/Confirm/index.js +1 -1
  92. package/lib/PageHeader/horizontalMeun.js +1 -1
  93. package/lib/PageHeader/horizontalMeunRight.js +1 -1
  94. package/lib/ParauiProvider/index.js +1 -1
  95. package/lib/QuickReply/QuickReplyCode/index.js +1 -1
  96. package/lib/RangeInput/index.js +1 -1
  97. package/lib/Select/index.js +1 -1
  98. package/lib/Selector/index.js +1 -1
  99. package/lib/Selector/interface.d.ts +1 -1
  100. package/lib/Selector/selectorData/index.js +1 -1
  101. package/lib/Selector/selectorMain/index.js +1 -1
  102. package/lib/Selector/util.d.ts +1 -1
  103. package/lib/Selector/util.js +1 -1
  104. package/lib/Table/index.js +1 -1
  105. package/lib/Table/interface.d.ts +24 -0
  106. package/lib/Table/tableHead.js +1 -1
  107. package/lib/Table/util.d.ts +1 -1
  108. package/lib/Table/util.js +1 -1
  109. package/lib/TextEditor/index.js +1 -1
  110. package/lib/TextField/index.js +1 -1
  111. package/lib/ToggleButton/index.js +1 -1
  112. package/lib/Tree/OperateBar/index.js +2 -2
  113. package/lib/Tree/Tree.js +1 -1
  114. package/lib/Tree/interface.d.ts +1 -1
  115. package/lib/Upload/util.js +1 -1
  116. package/lib/Utils/snack-kit-shims.d.ts +18 -0
  117. package/lib/Utils/snack-kit-shims.js +2 -0
  118. package/lib/_virtual/index.js +1 -1
  119. package/lib/_virtual/index2.js +1 -1
  120. package/lib/node_modules/classnames/index.js +1 -1
  121. package/package.json +3 -2
  122. package/es/_virtual/index3.js +0 -5
  123. package/es/_virtual/index4.js +0 -5
  124. package/es/node_modules/@para-snack/core/dist/index.js +0 -5231
  125. package/lib/_virtual/index3.js +0 -2
  126. package/lib/_virtual/index4.js +0 -2
  127. package/lib/node_modules/@para-snack/core/dist/index.js +0 -20
@@ -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 W } from "../node_modules/@para-ui/icons/ToRight/index.js";
7
- import { ToLeft as z } from "../node_modules/@para-ui/icons/ToLeft/index.js";
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 { throttle as ne, debounce as se } from "@paraview/lib";
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: D,
16
+ style: z,
17
17
  className: J,
18
- title: j = "",
19
- scrollId: T = `${C}-anchor-scroll-id`,
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(T), n = ne(async () => {
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(T), t = n?.querySelectorAll("[id]") || [], h = Array.from(t).findIndex((s) => String(s.id) === String(e)), l = t[h];
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(() => j ? /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
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: j }),
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(z, {}) : /* @__PURE__ */ r.jsx(W, {}) })
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, [j, x, $, B, g]), P = E(() => {
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(W, {}) : /* @__PURE__ */ r.jsx(z, {})
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: D,
174
+ style: z,
175
175
  children: [
176
176
  a === "left" && P,
177
177
  /* @__PURE__ */ r.jsx(
178
178
  "div",
179
179
  {
180
- id: T,
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 "@paraview/lib";
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 { debounce as P } from "@paraview/lib";
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";
@@ -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 "@paraview/lib";
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({
@@ -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 "@paraview/lib";
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) => {
@@ -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 "@paraview/lib";
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/index2.js";
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";
@@ -1,5 +1,5 @@
1
1
  import { j as C } from "../../_virtual/jsx-runtime.js";
2
- import U from "../../_virtual/index2.js";
2
+ import U from "../../_virtual/index.js";
3
3
  import { useBaseProps as W } from "rc-select";
4
4
  import * as r from "react";
5
5
  import Z from "../context.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 "@paraview/lib";
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) {
@@ -1,5 +1,5 @@
1
1
  import { default as React, FunctionComponent, ReactNode } from 'react';
2
- import { Snack } from '@para-snack/core';
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,
@@ -1,21 +1,21 @@
1
1
  import { j as f } from "../_virtual/jsx-runtime.js";
2
- import sr, { useState as y, useRef as E, useEffect as h, useMemo as ar } from "react";
3
- import { Context as er } from "@paraview/lib";
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 { d as gr } from "../_virtual/index.js";
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 wr = (r) => {
12
+ const Fr = (r) => {
13
13
  const {
14
- className: b,
15
- style: d,
16
- id: w,
14
+ className: E,
15
+ style: w,
16
+ id: F,
17
17
  language: k,
18
- zoomLength: F = 300,
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: o
47
- } = r, [X, M] = y(!0), [n, Y] = y(), l = E(null), s = E({});
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.SnackSDK({
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
- M(!0);
69
+ o(!0);
70
70
  const e = await (await p()).createModule(
71
71
  { name: "codeeditornew", type: "code-editor" },
72
72
  {
73
- id: w,
73
+ id: F,
74
74
  theme: R,
75
75
  language: k || hr,
76
- zoomLength: F,
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 (M(!1), !e)
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
- }, o && o(e);
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
- ...d
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`, b),
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
- wr as default
137
+ Fr as default
138
138
  };
139
139
  //# sourceMappingURL=index.js.map
@@ -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 { ArrayToObject as no, DeepClone as co } from "@paraview/lib";
18
- import ao from "../GlobalContext/index.js";
19
- import io from "../Hooks/useGlobalProps.js";
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 qo = (nt) => {
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: at = !1,
36
- className: it,
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: a = !0,
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: ae = !0,
84
+ dropdownMatchSelectWidth: ie = !0,
84
85
  getPopupContainer: St,
85
86
  maxTagTextLength: W,
86
87
  renderInputContent: q,
87
- renderTagLabel: ie,
88
+ renderTagLabel: ae,
88
89
  renderMoreTagLabel: Ee
89
- } = io(nt, "ComboSelect"), { language: Fe, locale: Ke } = Gt.useContext(ao), $ = v(null), [p, me] = g(!1), [x, B] = g([]), G = v(/* @__PURE__ */ new Map()), [i, _] = 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);
90
- h.current.openMore = z, h.current.list = [...i];
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
- }), [i]), S(() => (!V && a ? window.addEventListener("resize", X) : window.removeEventListener("resize", X), () => {
111
+ }), [a]), S(() => (!V && i ? window.addEventListener("resize", X) : window.removeEventListener("resize", X), () => {
111
112
  window.removeEventListener("resize", X);
112
- }), [V, a]);
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 = [...i], l = r.findIndex((s) => s[j] === o[j]);
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?.(i), C(null, "ok")) : (gt?.(), C(null, "cancel"));
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 ae == "number" ? r.width = ae : ae && (r.width = e), {
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
- it,
160
+ at,
160
161
  {
161
162
  [`${m}-comboselect-focused`]: p && !f,
162
163
  [`${m}-comboselect-disabled`]: Ce,
163
- [`${m}-comboselect-radioable`]: !a,
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 = co(e || []);
183
- a ? T?.(r, l) : T?.(r[0], l[0]);
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?.(a ? [] : {});
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
- at && Rt(!!i?.length);
261
- }, [i]), S(() => {
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 (!i?.length) return null;
283
+ if (!a?.length) return null;
283
284
  if (q)
284
- return q(a ? i : i[0]);
285
- if (!a)
286
- return /* @__PURE__ */ t.jsx("span", { className: "comboselect-single-content", children: /* @__PURE__ */ t.jsx(xe, { children: i[0]?.[y] }) });
287
- if (!i.length) return;
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
- ie && (n = ie(l));
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 = i.map((l, s) => w !== null && w <= s ? null : /* @__PURE__ */ t.jsx(
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
- ie,
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
- !a && (C(), x.includes(r)) || he([r], [l]);
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: a,
380
- radio: !a,
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, a]), ve = N(() => {
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 (!a && (C(), !Pt && x.includes(c.node?.key)))
407
+ if (!i && (C(), !Pt && x.includes(c.node?.key)))
407
408
  return;
408
409
  let n = c.checkedNodes;
409
- if (a || s?.length && (n = [c.node]), a) {
410
- const u = no("key", n);
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" && !a
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: a,
433
- radioable: !a,
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, a]), ee = N(() => /* @__PURE__ */ t.jsxs(
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", !a && "comboselect-overflow-single"), children: et }),
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
- !i?.length && /* @__PURE__ */ t.jsx("span", { className: "comboselect-placeholder", children: je ?? P({ id: "pleaseSelect" }) })
466
+ !a?.length && /* @__PURE__ */ t.jsx("span", { className: "comboselect-placeholder", children: je ?? P({ id: "pleaseSelect" }) })
466
467
  ]
467
468
  }
468
- ), [i, et, a, D, f, je]), Ht = () => Le || Me ? /* @__PURE__ */ t.jsx(
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 = () => i.map((o, r) => {
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
- i
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
- i
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
- qo as ComboSelect,
621
- qo as default
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 "@paraview/lib";
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 "@paraview/lib";
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) {
@@ -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 "@paraview/lib";
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";
@@ -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 "@paraview/lib";
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) => {