bitz-react-admin-ui 2.2.7 → 2.2.8

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 (209) hide show
  1. package/dist/_virtual/Draggable.mjs +4 -0
  2. package/dist/_virtual/DraggableCore.mjs +4 -0
  3. package/dist/_virtual/Resizable.mjs +4 -0
  4. package/dist/_virtual/ResizableBox.mjs +4 -0
  5. package/dist/_virtual/_commonjsHelpers.mjs +26 -4
  6. package/dist/_virtual/cjs.mjs +4 -0
  7. package/dist/_virtual/clsx.m.mjs +6 -0
  8. package/dist/_virtual/domFns.mjs +4 -0
  9. package/dist/_virtual/getPrefix.mjs +4 -0
  10. package/dist/_virtual/index.mjs +2 -2
  11. package/dist/_virtual/index2.mjs +2 -2
  12. package/dist/_virtual/index6.mjs +4 -0
  13. package/dist/_virtual/log.mjs +4 -0
  14. package/dist/_virtual/positionFns.mjs +4 -0
  15. package/dist/_virtual/propTypes.mjs +4 -0
  16. package/dist/_virtual/shims.mjs +4 -0
  17. package/dist/_virtual/utils.mjs +4 -0
  18. package/dist/assets/iconfont/IconChenggong.mjs +4 -10
  19. package/dist/assets/iconfont/IconClose.mjs +1 -7
  20. package/dist/assets/iconfont/IconColumnCancelFixed.mjs +4 -25
  21. package/dist/assets/iconfont/IconColumnFixedLeft.mjs +8 -29
  22. package/dist/assets/iconfont/IconColumnFixedRight.mjs +7 -28
  23. package/dist/assets/iconfont/IconCuowu.mjs +2 -8
  24. package/dist/assets/iconfont/IconDragOrder.mjs +7 -28
  25. package/dist/assets/iconfont/IconDuigoux.mjs +2 -8
  26. package/dist/assets/iconfont/IconFabu.mjs +3 -18
  27. package/dist/assets/iconfont/IconFanhui.mjs +5 -11
  28. package/dist/assets/iconfont/IconGaojisousuo.mjs +4 -10
  29. package/dist/assets/iconfont/IconHangfengexian.mjs +4 -27
  30. package/dist/assets/iconfont/IconHangliefengexian.mjs +4 -27
  31. package/dist/assets/iconfont/IconIcFluentHomeRegular.mjs +5 -11
  32. package/dist/assets/iconfont/IconIcon21.mjs +2 -8
  33. package/dist/assets/iconfont/IconJincoude.mjs +3 -9
  34. package/dist/assets/iconfont/IconJinggao.mjs +2 -8
  35. package/dist/assets/iconfont/IconKuansongde.mjs +5 -11
  36. package/dist/assets/iconfont/IconLiefengexian.mjs +5 -28
  37. package/dist/assets/iconfont/IconMore.mjs +4 -26
  38. package/dist/assets/iconfont/IconShanchu.mjs +5 -11
  39. package/dist/assets/iconfont/IconShanchu1.mjs +3 -18
  40. package/dist/assets/iconfont/IconSousuo.mjs +4 -10
  41. package/dist/assets/iconfont/IconTejincou.mjs +1 -7
  42. package/dist/assets/iconfont/IconTekuansong.mjs +5 -11
  43. package/dist/assets/iconfont/IconTishi1.mjs +6 -12
  44. package/dist/assets/iconfont/IconTuodong.mjs +6 -12
  45. package/dist/assets/iconfont/IconWubanmawentianchong.mjs +5 -22
  46. package/dist/assets/iconfont/IconWufengexian.mjs +4 -11
  47. package/dist/assets/iconfont/IconXinxitishi.mjs +3 -9
  48. package/dist/assets/iconfont/IconYoubanmawentianchong.mjs +7 -23
  49. package/dist/assets/iconfont/IconZhongdengde.mjs +4 -10
  50. package/dist/assets/iconfont/IconZhongzhi.mjs +5 -11
  51. package/dist/assets/iconfont/index.mjs +33 -33
  52. package/dist/components/BitzAddTag/index.mjs +8 -41
  53. package/dist/components/BitzAddressBook/index.mjs +35 -122
  54. package/dist/components/BitzAppPage/index.mjs +4 -18
  55. package/dist/components/BitzAppRefresh/index.mjs +15 -27
  56. package/dist/components/BitzBetterScroll/index.mjs +5 -5
  57. package/dist/components/BitzButton/index.mjs +9 -23
  58. package/dist/components/BitzCalendar/index.mjs +19 -52
  59. package/dist/components/BitzCascader/BitzCascaderMobile.mjs +30 -68
  60. package/dist/components/BitzCascader/index.mjs +2 -6
  61. package/dist/components/BitzCollapse/index.mjs +4 -4
  62. package/dist/components/BitzConfigProvider/context.mjs +1 -3
  63. package/dist/components/BitzConfigProvider/index.mjs +8 -12
  64. package/dist/components/BitzConfirmModal/index.mjs +1 -24
  65. package/dist/components/BitzConvert/DropdownToButton/index.mjs +11 -14
  66. package/dist/components/BitzConvert/index.mjs +1 -1
  67. package/dist/components/BitzDescriptions/index.mjs +1 -11
  68. package/dist/components/BitzDrawer/index.mjs +2 -17
  69. package/dist/components/BitzEmpty/index.mjs +2 -6
  70. package/dist/components/BitzException/index.mjs +1 -6
  71. package/dist/components/BitzFloatLayout/index.mjs +1 -10
  72. package/dist/components/BitzFuiCalendar/BitzFuiCalendarStore.mjs +16 -13
  73. package/dist/components/BitzFuiCalendar/CalendarAgendum.mjs +20 -26
  74. package/dist/components/BitzFuiCalendar/CalendarAgendumItem.mjs +3 -21
  75. package/dist/components/BitzFuiCalendar/CalendarBody.mjs +4 -27
  76. package/dist/components/BitzFuiCalendar/CalendarHead.mjs +2 -5
  77. package/dist/components/BitzFuiCalendar/CalendarHeadItem.mjs +3 -12
  78. package/dist/components/BitzFuiCalendar/CalendarToolbar.mjs +19 -51
  79. package/dist/components/BitzFuiCalendar/ColumnData.mjs +14 -30
  80. package/dist/components/BitzFuiCalendar/FuiCalendarItem.mjs +5 -47
  81. package/dist/components/BitzFuiCalendar/index.mjs +1 -7
  82. package/dist/components/BitzFullScreen/index.mjs +6 -9
  83. package/dist/components/BitzHighlight/Child.mjs +9 -23
  84. package/dist/components/BitzHighlight/Highlight.mjs +5 -26
  85. package/dist/components/BitzHighlight/chunks.mjs +17 -20
  86. package/dist/components/BitzHighlight/style.mjs +1 -4
  87. package/dist/components/BitzImage/index.mjs +1 -1
  88. package/dist/components/BitzImage/previewImage.mjs +5 -12
  89. package/dist/components/BitzLanguageTabs/index.mjs +3 -14
  90. package/dist/components/BitzLazyLoad/index.mjs +1 -7
  91. package/dist/components/BitzList/List.mjs +3 -17
  92. package/dist/components/BitzList/LoadMore.mjs +20 -29
  93. package/dist/components/BitzLoadMore/index.mjs +14 -34
  94. package/dist/components/BitzMeetingTime/BitzMeetingTimeItem.mjs +11 -24
  95. package/dist/components/BitzMeetingTime/index.mjs +6 -10
  96. package/dist/components/BitzMobileLoading/index.mjs +1 -1
  97. package/dist/components/BitzModal/index.mjs +11 -24
  98. package/dist/components/BitzNoData/index.mjs +1 -4
  99. package/dist/components/BitzNoMore/index.mjs +1 -1
  100. package/dist/components/BitzOrganizationSelection/index.mjs +14 -43
  101. package/dist/components/BitzPageContainer/index.mjs +46 -107
  102. package/dist/components/BitzPageHeader/index.mjs +21 -89
  103. package/dist/components/BitzPagination/index.mjs +22 -71
  104. package/dist/components/BitzPopover/index.mjs +4 -4
  105. package/dist/components/BitzPullRefresh/PullRefresh.mjs +18 -47
  106. package/dist/components/BitzQRCode/index.mjs +1 -6
  107. package/dist/components/BitzQueryFilter/QueryFilterContent.mjs +17 -35
  108. package/dist/components/BitzQueryFilter/QueryFilterDrawer.mjs +13 -20
  109. package/dist/components/BitzQueryFilter/QueryFilterMobile.mjs +1 -4
  110. package/dist/components/BitzQueryFilter/index.mjs +20 -69
  111. package/dist/components/BitzRefresh/index.mjs +1 -5
  112. package/dist/components/BitzRemark/index.mjs +4 -4
  113. package/dist/components/BitzScheduleCenter/index.mjs +30 -24
  114. package/dist/components/BitzSearch/index.mjs +1 -1
  115. package/dist/components/BitzSelect/component/BitzSelectMobile.mjs +48 -123
  116. package/dist/components/BitzSelect/index.mjs +1 -1
  117. package/dist/components/BitzSkeleton/index.mjs +1 -31
  118. package/dist/components/BitzSwitch/index.mjs +2 -7
  119. package/dist/components/BitzTabbar/BitzTabbar.mjs +8 -25
  120. package/dist/components/BitzTabbar/BitzTabbarItem.mjs +1 -4
  121. package/dist/components/BitzTable/ActionBar/ActionBar.d.ts +21 -9
  122. package/dist/components/BitzTable/ActionBar/ActionBar.mjs +38 -66
  123. package/dist/components/BitzTable/ActionBar/Button.mjs +1 -1
  124. package/dist/components/BitzTable/ActionBar/style.mjs +9 -12
  125. package/dist/components/BitzTable/ActionCol/index.d.ts +1 -1
  126. package/dist/components/BitzTable/ActionCol/index.mjs +32 -98
  127. package/dist/components/BitzTable/ActionCol/style.mjs +12 -15
  128. package/dist/components/BitzTable/Dropdown/index.mjs +1 -8
  129. package/dist/components/BitzTable/Dropdown/style.mjs +6 -9
  130. package/dist/components/BitzTable/SelectionBar/Button.mjs +6 -19
  131. package/dist/components/BitzTable/SelectionBar/SelectionBar.mjs +2 -8
  132. package/dist/components/BitzTable/SelectionBar/style.mjs +8 -18
  133. package/dist/components/BitzTable/Store/index.mjs +89 -121
  134. package/dist/components/BitzTable/Store/utils/index.d.ts +1 -1
  135. package/dist/components/BitzTable/Store/utils/index.mjs +30 -30
  136. package/dist/components/BitzTable/SubTable/index.mjs +52 -94
  137. package/dist/components/BitzTable/Table/ResizableTitle.d.ts +8 -0
  138. package/dist/components/BitzTable/Table/ResizableTitle.mjs +14 -0
  139. package/dist/components/BitzTable/Table/SortTableContext.mjs +7 -20
  140. package/dist/components/BitzTable/Table/SortableRow.mjs +20 -44
  141. package/dist/components/BitzTable/Table/index.d.ts +1 -1
  142. package/dist/components/BitzTable/Table/index.mjs +248 -436
  143. package/dist/components/BitzTable/Table/style.mjs +1 -11
  144. package/dist/components/BitzTable/Table/utils.mjs +4 -11
  145. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnConfigModal.mjs +28 -92
  146. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndItem.mjs +22 -97
  147. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/DndList.mjs +29 -68
  148. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ColumnsSort/index.mjs +145 -253
  149. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndItem.mjs +12 -38
  150. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/DndList.mjs +16 -42
  151. package/dist/components/BitzTable/ToolBar/ColConfigIcon/ExportConfig/index.mjs +20 -96
  152. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/RadioCard.mjs +2 -9
  153. package/dist/components/BitzTable/ToolBar/ColConfigIcon/StylesConfig/index.mjs +46 -100
  154. package/dist/components/BitzTable/ToolBar/ColConfigIcon/index.mjs +8 -30
  155. package/dist/components/BitzTable/ToolBar/ExportIcon/ExportModal.mjs +14 -44
  156. package/dist/components/BitzTable/ToolBar/ExportIcon/index.mjs +12 -44
  157. package/dist/components/BitzTable/ToolBar/FullscreenIcon/index.mjs +4 -17
  158. package/dist/components/BitzTable/ToolBar/Modal/index.mjs +12 -49
  159. package/dist/components/BitzTable/ToolBar/Modal/style.mjs +4 -0
  160. package/dist/components/BitzTable/ToolBar/RefreshIcon/index.mjs +9 -20
  161. package/dist/components/BitzTable/ToolBar/Wrapper/index.mjs +2 -48
  162. package/dist/components/BitzTable/ToolBar/style.mjs +1 -6
  163. package/dist/components/BitzTableOperations/index.mjs +3 -13
  164. package/dist/components/BitzTableSelect/Picker/index.mjs +10 -43
  165. package/dist/components/BitzTableSelect/Select/index.mjs +21 -87
  166. package/dist/components/BitzTableSelect/SelectPopup/getData.mjs +20 -30
  167. package/dist/components/BitzTableSelect/SelectPopup/index.mjs +61 -239
  168. package/dist/components/BitzTableSelect/TableCell/index.mjs +8 -49
  169. package/dist/components/BitzTableSelect/TextBlock/index.mjs +5 -23
  170. package/dist/components/BitzTableSelect/index.mjs +13 -61
  171. package/dist/components/BitzTag/index.mjs +1 -1
  172. package/dist/components/BitzTheme/index.mjs +6 -6
  173. package/dist/components/BitzTimeline/index.mjs +1 -11
  174. package/dist/components/BitzTimer/Form.mjs +11 -32
  175. package/dist/components/BitzTimer/Timer.mjs +38 -76
  176. package/dist/components/BitzTimer/index.mjs +43 -66
  177. package/dist/components/BitzToast/Toast/index.mjs +10 -28
  178. package/dist/components/BitzToast/index.mjs +1 -1
  179. package/dist/components/BitzTree/index.mjs +1 -4
  180. package/dist/components/BitzUeEditor/index.mjs +5 -5
  181. package/dist/components/BitzUpload/index.mjs +43 -81
  182. package/dist/components/BitzWebAppDrawer/index.mjs +4 -35
  183. package/dist/components/BitzWebAppModal/index.mjs +3 -6
  184. package/dist/hooks/use-event-listener.mjs +2 -11
  185. package/dist/hooks/use-lock-fn.mjs +10 -13
  186. package/dist/hooks/use-scroll-parent.mjs +14 -16
  187. package/dist/hooks/useEvent.mjs +4 -7
  188. package/dist/hooks/useMergedState.mjs +11 -11
  189. package/dist/node_modules/.store/classnames@2.5.1/node_modules/classnames/index.mjs +1 -1
  190. package/dist/node_modules/.store/clsx@1.2.1/node_modules/clsx/dist/clsx.m.mjs +22 -0
  191. package/dist/node_modules/.store/prop-types@15.8.1/node_modules/prop-types/index.mjs +9 -8
  192. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/Draggable.mjs +343 -0
  193. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/DraggableCore.mjs +324 -0
  194. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/cjs.mjs +14 -0
  195. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/domFns.mjs +174 -0
  196. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/getPrefix.mjs +35 -0
  197. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/log.mjs +7 -0
  198. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/positionFns.mjs +107 -0
  199. package/dist/node_modules/.store/react-draggable@4.4.6/node_modules/react-draggable/build/cjs/utils/shims.mjs +30 -0
  200. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/Resizable.mjs +201 -0
  201. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/ResizableBox.mjs +162 -0
  202. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/propTypes.mjs +118 -0
  203. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/build/utils.mjs +54 -0
  204. package/dist/node_modules/.store/react-resizable@3.0.5/node_modules/react-resizable/index.mjs +13 -0
  205. package/dist/node_modules/.store/use-sync-external-store@1.2.0/node_modules/use-sync-external-store/shim/index.mjs +1 -1
  206. package/dist/style.css +1 -1
  207. package/dist/utils/WithFluent.mjs +12 -27
  208. package/dist/utils/create.mjs +1 -7
  209. package/package.json +1 -1
@@ -14,20 +14,11 @@ if (i)
14
14
  function w(e, o, c = {}) {
15
15
  if (!i)
16
16
  return;
17
- const {
18
- target: n = window,
19
- passive: d = !1,
20
- capture: r = !1,
21
- depends: l = []
22
- } = c;
17
+ const { target: n = window, passive: d = !1, capture: r = !1, depends: l = [] } = c;
23
18
  let s;
24
19
  const p = () => {
25
20
  const t = a(n);
26
- t && !s && (t.addEventListener(
27
- e,
28
- o,
29
- f ? { capture: r, passive: d } : r
30
- ), s = !0);
21
+ t && !s && (t.addEventListener(e, o, f ? { capture: r, passive: d } : r), s = !0);
31
22
  }, u = () => {
32
23
  const t = a(n);
33
24
  t && s && (t.removeEventListener(e, o, r), s = !1);
@@ -1,20 +1,17 @@
1
1
  import { useRef as u, useCallback as n } from "react";
2
2
  function s(t) {
3
3
  const r = u(!1);
4
- return n(
5
- async (...c) => {
6
- if (!r.current) {
7
- r.current = !0;
8
- try {
9
- const e = await t(...c);
10
- return r.current = !1, e;
11
- } catch (e) {
12
- throw r.current = !1, e;
13
- }
4
+ return n(async (...c) => {
5
+ if (!r.current) {
6
+ r.current = !0;
7
+ try {
8
+ const e = await t(...c);
9
+ return r.current = !1, e;
10
+ } catch (e) {
11
+ throw r.current = !1, e;
14
12
  }
15
- },
16
- [t]
17
- );
13
+ }
14
+ }, [t]);
18
15
  }
19
16
  export {
20
17
  s as default
@@ -1,34 +1,32 @@
1
1
  import "react";
2
- function c(t, n) {
3
- if (!t)
4
- return n;
2
+ function w(n, t) {
3
+ if (!n)
4
+ return t;
5
5
  let e;
6
- return typeof t == "function" ? e = t() : "current" in t ? e = t.current : e = t, e;
6
+ return typeof n == "function" ? e = n() : "current" in n ? e = n.current : e = n, e;
7
7
  }
8
8
  const l = typeof window < "u", o = /scroll|auto/i, f = l ? window : void 0;
9
- function u(t) {
10
- return t.tagName !== "HTML" && t.tagName !== "BODY" && t.nodeType === 1;
9
+ function u(n) {
10
+ return n.tagName !== "HTML" && n.tagName !== "BODY" && n.nodeType === 1;
11
11
  }
12
- function d(t, n = f) {
13
- n === void 0 && (n = window);
14
- let e = t;
15
- for (; e && e !== n && u(e); ) {
12
+ function c(n, t = f) {
13
+ t === void 0 && (t = window);
14
+ let e = n;
15
+ for (; e && e !== t && u(e); ) {
16
16
  const { overflowY: i } = window.getComputedStyle(e);
17
17
  if (o.test(i)) {
18
18
  if (e.tagName !== "BODY")
19
19
  return e;
20
- const r = window.getComputedStyle(
21
- e.parentNode
22
- ).overflowY;
20
+ const r = window.getComputedStyle(e.parentNode).overflowY;
23
21
  if (o.test(r))
24
22
  return e;
25
23
  }
26
24
  e = e.parentNode;
27
25
  }
28
- return n;
26
+ return t;
29
27
  }
30
28
  export {
31
- d as getScrollParent,
32
- c as getTargetElement,
29
+ c as getScrollParent,
30
+ w as getTargetElement,
33
31
  l as inBrowser
34
32
  };
@@ -1,13 +1,10 @@
1
1
  import * as n from "react";
2
2
  function c(r) {
3
3
  const e = n.useRef();
4
- return e.current = r, n.useCallback(
5
- (...o) => {
6
- var t;
7
- return (t = e.current) == null ? void 0 : t.call(e, ...o);
8
- },
9
- []
10
- );
4
+ return e.current = r, n.useCallback((...o) => {
5
+ var t;
6
+ return (t = e.current) == null ? void 0 : t.call(e, ...o);
7
+ }, []);
11
8
  }
12
9
  export {
13
10
  c as default
@@ -1,21 +1,21 @@
1
1
  import p from "../node_modules/.store/ahooks@3.7.11/node_modules/ahooks/es/useUpdateLayoutEffect/index.mjs";
2
2
  import l from "./useEvent.mjs";
3
- import g from "./useState.mjs";
4
- function s(t) {
5
- return t !== void 0;
3
+ import d from "./useState.mjs";
4
+ function s(n) {
5
+ return n !== void 0;
6
6
  }
7
- function S(t, m) {
8
- const { defaultValue: n, value: e, onChange: v, postState: a } = m || {}, [u, f] = g(() => s(e) ? e : s(n) ? typeof n == "function" ? n() : n : typeof t == "function" ? t() : t), o = e !== void 0 ? e : u, d = a ? a(o) : o, V = l(v), [i, h] = g([o]);
7
+ function S(n, g) {
8
+ const { defaultValue: t, value: e, onChange: m, postState: f } = g || {}, [u, a] = d(() => s(e) ? e : s(t) ? typeof t == "function" ? t() : t : typeof n == "function" ? n() : n), r = e !== void 0 ? e : u, V = f ? f(r) : r, v = l(m), [i, h] = d([r]);
9
9
  p(() => {
10
- const r = i[0];
11
- u !== r && V(u, r);
10
+ const o = i[0];
11
+ u !== o && v(u, o);
12
12
  }, [i]), p(() => {
13
- s(e) || f(e);
13
+ s(e) || a(e);
14
14
  }, [e]);
15
- const C = l((r, c) => {
16
- f(r, c), h([o], c);
15
+ const C = l((o, c) => {
16
+ a(o, c), h([r], c);
17
17
  });
18
- return [d, C];
18
+ return [V, C];
19
19
  }
20
20
  export {
21
21
  S as default
@@ -1,5 +1,5 @@
1
1
  import { getDefaultExportFromCjs as u } from "../../../../../_virtual/_commonjsHelpers.mjs";
2
- import { __module as i } from "../../../../../_virtual/index.mjs";
2
+ import { __module as i } from "../../../../../_virtual/index2.mjs";
3
3
  /*!
4
4
  Copyright (c) 2018 Jed Watson.
5
5
  Licensed under the MIT License (MIT), see
@@ -0,0 +1,22 @@
1
+ function o(r) {
2
+ var f, n, t = "";
3
+ if (typeof r == "string" || typeof r == "number")
4
+ t += r;
5
+ else if (typeof r == "object")
6
+ if (Array.isArray(r))
7
+ for (f = 0; f < r.length; f++)
8
+ r[f] && (n = o(r[f])) && (t && (t += " "), t += n);
9
+ else
10
+ for (f in r)
11
+ r[f] && (t && (t += " "), t += f);
12
+ return t;
13
+ }
14
+ function a() {
15
+ for (var r, f, n = 0, t = ""; n < arguments.length; )
16
+ (r = arguments[n++]) && (f = o(r)) && (t && (t += " "), t += f);
17
+ return t;
18
+ }
19
+ export {
20
+ a as clsx,
21
+ a as default
22
+ };
@@ -1,15 +1,16 @@
1
1
  import { getDefaultExportFromCjs as e } from "../../../../../_virtual/_commonjsHelpers.mjs";
2
- import { __module as r } from "../../../../../_virtual/index2.mjs";
2
+ import { __module as r } from "../../../../../_virtual/index.mjs";
3
3
  import { __require as o } from "../../../react-is@16.13.1/node_modules/react-is/index.mjs";
4
- import { __require as t } from "./factoryWithTypeCheckers.mjs";
5
- import { __require as p } from "./factoryWithThrowingShims.mjs";
4
+ import { __require as p } from "./factoryWithTypeCheckers.mjs";
5
+ import { __require as t } from "./factoryWithThrowingShims.mjs";
6
6
  if (process.env.NODE_ENV !== "production") {
7
7
  var s = o(), i = !0;
8
- r.exports = t()(s.isElement, i);
8
+ r.exports = p()(s.isElement, i);
9
9
  } else
10
- r.exports = p()();
11
- var m = r.exports;
12
- const q = /* @__PURE__ */ e(m);
10
+ r.exports = t()();
11
+ var a = r.exports;
12
+ const q = /* @__PURE__ */ e(a);
13
13
  export {
14
- q as default
14
+ q as default,
15
+ a as p
15
16
  };
@@ -0,0 +1,343 @@
1
+ import { __exports as F } from "../../../../../../../_virtual/Draggable.mjs";
2
+ import G from "react";
3
+ import { p as V } from "../../../../../prop-types@15.8.1/node_modules/prop-types/index.mjs";
4
+ import W from "react-dom";
5
+ import $ from "../../../../../../../_virtual/clsx.m.mjs";
6
+ import "./utils/domFns.mjs";
7
+ import "./utils/positionFns.mjs";
8
+ import "./utils/shims.mjs";
9
+ import "./DraggableCore.mjs";
10
+ import "./utils/log.mjs";
11
+ import { __exports as q } from "../../../../../../../_virtual/domFns.mjs";
12
+ import { __exports as B } from "../../../../../../../_virtual/positionFns.mjs";
13
+ import { __exports as U } from "../../../../../../../_virtual/shims.mjs";
14
+ import { __exports as A } from "../../../../../../../_virtual/DraggableCore.mjs";
15
+ import { __exports as I } from "../../../../../../../_virtual/log.mjs";
16
+ (function(p) {
17
+ Object.defineProperty(p, "__esModule", {
18
+ value: !0
19
+ }), Object.defineProperty(p, "DraggableCore", {
20
+ enumerable: !0,
21
+ get: function() {
22
+ return m.default;
23
+ }
24
+ }), p.default = void 0;
25
+ var c = E(G), n = d(V), M = d(W), T = d($), S = q, l = B, v = U, m = d(A), h = d(I);
26
+ function d(t) {
27
+ return t && t.__esModule ? t : { default: t };
28
+ }
29
+ function _(t) {
30
+ if (typeof WeakMap != "function")
31
+ return null;
32
+ var e = /* @__PURE__ */ new WeakMap(), r = /* @__PURE__ */ new WeakMap();
33
+ return (_ = function(a) {
34
+ return a ? r : e;
35
+ })(t);
36
+ }
37
+ function E(t, e) {
38
+ if (!e && t && t.__esModule)
39
+ return t;
40
+ if (t === null || typeof t != "object" && typeof t != "function")
41
+ return { default: t };
42
+ var r = _(e);
43
+ if (r && r.has(t))
44
+ return r.get(t);
45
+ var a = {}, o = Object.defineProperty && Object.getOwnPropertyDescriptor;
46
+ for (var s in t)
47
+ if (s !== "default" && Object.prototype.hasOwnProperty.call(t, s)) {
48
+ var i = o ? Object.getOwnPropertyDescriptor(t, s) : null;
49
+ i && (i.get || i.set) ? Object.defineProperty(a, s, i) : a[s] = t[s];
50
+ }
51
+ return a.default = t, r && r.set(t, a), a;
52
+ }
53
+ function b() {
54
+ return b = Object.assign ? Object.assign.bind() : function(t) {
55
+ for (var e = 1; e < arguments.length; e++) {
56
+ var r = arguments[e];
57
+ for (var a in r)
58
+ Object.prototype.hasOwnProperty.call(r, a) && (t[a] = r[a]);
59
+ }
60
+ return t;
61
+ }, b.apply(this, arguments);
62
+ }
63
+ function f(t, e, r) {
64
+ return e = X(e), e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
65
+ }
66
+ function X(t) {
67
+ var e = Y(t, "string");
68
+ return typeof e == "symbol" ? e : String(e);
69
+ }
70
+ function Y(t, e) {
71
+ if (typeof t != "object" || t === null)
72
+ return t;
73
+ var r = t[Symbol.toPrimitive];
74
+ if (r !== void 0) {
75
+ var a = r.call(t, e || "default");
76
+ if (typeof a != "object")
77
+ return a;
78
+ throw new TypeError("@@toPrimitive must return a primitive value.");
79
+ }
80
+ return (e === "string" ? String : Number)(t);
81
+ }
82
+ class y extends c.Component {
83
+ // React 16.3+
84
+ // Arity (props, state)
85
+ static getDerivedStateFromProps(e, r) {
86
+ let {
87
+ position: a
88
+ } = e, {
89
+ prevPropsPosition: o
90
+ } = r;
91
+ return a && (!o || a.x !== o.x || a.y !== o.y) ? ((0, h.default)("Draggable: getDerivedStateFromProps %j", {
92
+ position: a,
93
+ prevPropsPosition: o
94
+ }), {
95
+ x: a.x,
96
+ y: a.y,
97
+ prevPropsPosition: {
98
+ ...a
99
+ }
100
+ }) : null;
101
+ }
102
+ constructor(e) {
103
+ super(e), f(this, "onDragStart", (r, a) => {
104
+ if ((0, h.default)("Draggable: onDragStart: %j", a), this.props.onStart(r, (0, l.createDraggableData)(this, a)) === !1)
105
+ return !1;
106
+ this.setState({
107
+ dragging: !0,
108
+ dragged: !0
109
+ });
110
+ }), f(this, "onDrag", (r, a) => {
111
+ if (!this.state.dragging)
112
+ return !1;
113
+ (0, h.default)("Draggable: onDrag: %j", a);
114
+ const o = (0, l.createDraggableData)(this, a), s = {
115
+ x: o.x,
116
+ y: o.y,
117
+ slackX: 0,
118
+ slackY: 0
119
+ };
120
+ if (this.props.bounds) {
121
+ const {
122
+ x: g,
123
+ y: u
124
+ } = s;
125
+ s.x += this.state.slackX, s.y += this.state.slackY;
126
+ const [D, x] = (0, l.getBoundPosition)(this, s.x, s.y);
127
+ s.x = D, s.y = x, s.slackX = this.state.slackX + (g - s.x), s.slackY = this.state.slackY + (u - s.y), o.x = s.x, o.y = s.y, o.deltaX = s.x - this.state.x, o.deltaY = s.y - this.state.y;
128
+ }
129
+ if (this.props.onDrag(r, o) === !1)
130
+ return !1;
131
+ this.setState(s);
132
+ }), f(this, "onDragStop", (r, a) => {
133
+ if (!this.state.dragging || this.props.onStop(r, (0, l.createDraggableData)(this, a)) === !1)
134
+ return !1;
135
+ (0, h.default)("Draggable: onDragStop: %j", a);
136
+ const s = {
137
+ dragging: !1,
138
+ slackX: 0,
139
+ slackY: 0
140
+ };
141
+ if (!!this.props.position) {
142
+ const {
143
+ x: g,
144
+ y: u
145
+ } = this.props.position;
146
+ s.x = g, s.y = u;
147
+ }
148
+ this.setState(s);
149
+ }), this.state = {
150
+ // Whether or not we are currently dragging.
151
+ dragging: !1,
152
+ // Whether or not we have been dragged before.
153
+ dragged: !1,
154
+ // Current transform x and y.
155
+ x: e.position ? e.position.x : e.defaultPosition.x,
156
+ y: e.position ? e.position.y : e.defaultPosition.y,
157
+ prevPropsPosition: {
158
+ ...e.position
159
+ },
160
+ // Used for compensating for out-of-bounds drags
161
+ slackX: 0,
162
+ slackY: 0,
163
+ // Can only determine if SVG after mounting
164
+ isElementSVG: !1
165
+ }, e.position && !(e.onDrag || e.onStop) && console.warn("A `position` was applied to this <Draggable>, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.");
166
+ }
167
+ componentDidMount() {
168
+ typeof window.SVGElement < "u" && this.findDOMNode() instanceof window.SVGElement && this.setState({
169
+ isElementSVG: !0
170
+ });
171
+ }
172
+ componentWillUnmount() {
173
+ this.setState({
174
+ dragging: !1
175
+ });
176
+ }
177
+ // React Strict Mode compatibility: if `nodeRef` is passed, we will use it instead of trying to find
178
+ // the underlying DOM node ourselves. See the README for more information.
179
+ findDOMNode() {
180
+ var e, r;
181
+ return (e = (r = this.props) === null || r === void 0 || (r = r.nodeRef) === null || r === void 0 ? void 0 : r.current) !== null && e !== void 0 ? e : M.default.findDOMNode(this);
182
+ }
183
+ render() {
184
+ const {
185
+ axis: e,
186
+ bounds: r,
187
+ children: a,
188
+ defaultPosition: o,
189
+ defaultClassName: s,
190
+ defaultClassNameDragging: i,
191
+ defaultClassNameDragged: g,
192
+ position: u,
193
+ positionOffset: D,
194
+ scale: x,
195
+ ...R
196
+ } = this.props;
197
+ let P = {}, O = null;
198
+ const w = !!!u || this.state.dragging, C = u || o, N = {
199
+ // Set left if horizontal drag is enabled
200
+ x: (0, l.canDragX)(this) && w ? this.state.x : C.x,
201
+ // Set top if vertical drag is enabled
202
+ y: (0, l.canDragY)(this) && w ? this.state.y : C.y
203
+ };
204
+ this.state.isElementSVG ? O = (0, S.createSVGTransform)(N, D) : P = (0, S.createCSSTransform)(N, D);
205
+ const k = (0, T.default)(a.props.className || "", s, {
206
+ [i]: this.state.dragging,
207
+ [g]: this.state.dragged
208
+ });
209
+ return /* @__PURE__ */ c.createElement(m.default, b({}, R, {
210
+ onStart: this.onDragStart,
211
+ onDrag: this.onDrag,
212
+ onStop: this.onDragStop
213
+ }), /* @__PURE__ */ c.cloneElement(c.Children.only(a), {
214
+ className: k,
215
+ style: {
216
+ ...a.props.style,
217
+ ...P
218
+ },
219
+ transform: O
220
+ }));
221
+ }
222
+ }
223
+ p.default = y, f(y, "displayName", "Draggable"), f(y, "propTypes", {
224
+ // Accepts all props <DraggableCore> accepts.
225
+ ...m.default.propTypes,
226
+ /**
227
+ * `axis` determines which axis the draggable can move.
228
+ *
229
+ * Note that all callbacks will still return data as normal. This only
230
+ * controls flushing to the DOM.
231
+ *
232
+ * 'both' allows movement horizontally and vertically.
233
+ * 'x' limits movement to horizontal axis.
234
+ * 'y' limits movement to vertical axis.
235
+ * 'none' limits all movement.
236
+ *
237
+ * Defaults to 'both'.
238
+ */
239
+ axis: n.default.oneOf(["both", "x", "y", "none"]),
240
+ /**
241
+ * `bounds` determines the range of movement available to the element.
242
+ * Available values are:
243
+ *
244
+ * 'parent' restricts movement within the Draggable's parent node.
245
+ *
246
+ * Alternatively, pass an object with the following properties, all of which are optional:
247
+ *
248
+ * {left: LEFT_BOUND, right: RIGHT_BOUND, bottom: BOTTOM_BOUND, top: TOP_BOUND}
249
+ *
250
+ * All values are in px.
251
+ *
252
+ * Example:
253
+ *
254
+ * ```jsx
255
+ * let App = React.createClass({
256
+ * render: function () {
257
+ * return (
258
+ * <Draggable bounds={{right: 300, bottom: 300}}>
259
+ * <div>Content</div>
260
+ * </Draggable>
261
+ * );
262
+ * }
263
+ * });
264
+ * ```
265
+ */
266
+ bounds: n.default.oneOfType([n.default.shape({
267
+ left: n.default.number,
268
+ right: n.default.number,
269
+ top: n.default.number,
270
+ bottom: n.default.number
271
+ }), n.default.string, n.default.oneOf([!1])]),
272
+ defaultClassName: n.default.string,
273
+ defaultClassNameDragging: n.default.string,
274
+ defaultClassNameDragged: n.default.string,
275
+ /**
276
+ * `defaultPosition` specifies the x and y that the dragged item should start at
277
+ *
278
+ * Example:
279
+ *
280
+ * ```jsx
281
+ * let App = React.createClass({
282
+ * render: function () {
283
+ * return (
284
+ * <Draggable defaultPosition={{x: 25, y: 25}}>
285
+ * <div>I start with transformX: 25px and transformY: 25px;</div>
286
+ * </Draggable>
287
+ * );
288
+ * }
289
+ * });
290
+ * ```
291
+ */
292
+ defaultPosition: n.default.shape({
293
+ x: n.default.number,
294
+ y: n.default.number
295
+ }),
296
+ positionOffset: n.default.shape({
297
+ x: n.default.oneOfType([n.default.number, n.default.string]),
298
+ y: n.default.oneOfType([n.default.number, n.default.string])
299
+ }),
300
+ /**
301
+ * `position`, if present, defines the current position of the element.
302
+ *
303
+ * This is similar to how form elements in React work - if no `position` is supplied, the component
304
+ * is uncontrolled.
305
+ *
306
+ * Example:
307
+ *
308
+ * ```jsx
309
+ * let App = React.createClass({
310
+ * render: function () {
311
+ * return (
312
+ * <Draggable position={{x: 25, y: 25}}>
313
+ * <div>I start with transformX: 25px and transformY: 25px;</div>
314
+ * </Draggable>
315
+ * );
316
+ * }
317
+ * });
318
+ * ```
319
+ */
320
+ position: n.default.shape({
321
+ x: n.default.number,
322
+ y: n.default.number
323
+ }),
324
+ /**
325
+ * These properties should be defined on the child, not here.
326
+ */
327
+ className: v.dontSetMe,
328
+ style: v.dontSetMe,
329
+ transform: v.dontSetMe
330
+ }), f(y, "defaultProps", {
331
+ ...m.default.defaultProps,
332
+ axis: "both",
333
+ bounds: !1,
334
+ defaultClassName: "react-draggable",
335
+ defaultClassNameDragging: "react-draggable-dragging",
336
+ defaultClassNameDragged: "react-draggable-dragged",
337
+ defaultPosition: {
338
+ x: 0,
339
+ y: 0
340
+ },
341
+ scale: 1
342
+ });
343
+ })(F);