@pisell/common 0.0.1

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 (183) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +40 -0
  3. package/es/business-components/colorInput/index.d.ts +21 -0
  4. package/es/business-components/colorInput/index.js +43 -0
  5. package/es/business-components/colorInput/index.less +10 -0
  6. package/es/business-components/index.d.ts +11 -0
  7. package/es/business-components/index.js +7 -0
  8. package/es/business-components/rechargeOption/index.d.ts +36 -0
  9. package/es/business-components/rechargeOption/index.js +136 -0
  10. package/es/business-components/rechargeOption/index.less +0 -0
  11. package/es/business-components/selectTag/index.d.ts +25 -0
  12. package/es/business-components/selectTag/index.js +180 -0
  13. package/es/business-components/selectTag/index.less +22 -0
  14. package/es/business-components/sortModal/index.d.ts +30 -0
  15. package/es/business-components/sortModal/index.js +85 -0
  16. package/es/business-components/sortModal/index.less +29 -0
  17. package/es/business-components/statistics/index.d.ts +12 -0
  18. package/es/business-components/statistics/index.js +38 -0
  19. package/es/business-components/statistics/index.less +64 -0
  20. package/es/business-components/tagModal/index.d.ts +17 -0
  21. package/es/business-components/tagModal/index.js +59 -0
  22. package/es/business-hooks/index.d.ts +2 -0
  23. package/es/business-hooks/index.js +2 -0
  24. package/es/business-hooks/useModal/index.d.ts +31 -0
  25. package/es/business-hooks/useModal/index.js +91 -0
  26. package/es/business-hooks/useModal/index.less +0 -0
  27. package/es/business-hooks/useTagModal/index.d.ts +17 -0
  28. package/es/business-hooks/useTagModal/index.js +47 -0
  29. package/es/components/ColorPicker/index.d.ts +22 -0
  30. package/es/components/ColorPicker/index.js +51 -0
  31. package/es/components/ColorPicker/index.less +17 -0
  32. package/es/components/DragSort/index.d.ts +2 -0
  33. package/es/components/DragSort/index.js +68 -0
  34. package/es/components/Iconfont/index.d.ts +6 -0
  35. package/es/components/Iconfont/index.js +28 -0
  36. package/es/components/Iconfont/index.less +0 -0
  37. package/es/components/card/index.d.ts +5 -0
  38. package/es/components/card/index.js +16 -0
  39. package/es/components/card/index.less +9 -0
  40. package/es/components/index.d.ts +4 -0
  41. package/es/components/index.js +4 -0
  42. package/es/config/index.d.ts +16 -0
  43. package/es/config/index.js +18 -0
  44. package/es/config/utils.d.ts +0 -0
  45. package/es/config/utils.js +0 -0
  46. package/es/hooks/index.d.ts +8 -0
  47. package/es/hooks/index.js +8 -0
  48. package/es/hooks/useCountDown/index.d.ts +10 -0
  49. package/es/hooks/useCountDown/index.js +48 -0
  50. package/es/hooks/useDocumentScroll/index.d.ts +8 -0
  51. package/es/hooks/useDocumentScroll/index.js +41 -0
  52. package/es/hooks/useDocumentScroll/index.less +0 -0
  53. package/es/hooks/useMousemove/index.d.ts +8 -0
  54. package/es/hooks/useMousemove/index.js +61 -0
  55. package/es/hooks/useResponsive/index.d.ts +2 -0
  56. package/es/hooks/useResponsive/index.js +29 -0
  57. package/es/hooks/useResponsive/index.less +0 -0
  58. package/es/hooks/useSize/index.d.ts +2 -0
  59. package/es/hooks/useSize/index.js +27 -0
  60. package/es/hooks/useSize/index.less +0 -0
  61. package/es/hooks/useStateMulti/index.d.ts +2 -0
  62. package/es/hooks/useStateMulti/index.js +29 -0
  63. package/es/hooks/useStateWithCb/index.d.ts +2 -0
  64. package/es/hooks/useStateWithCb/index.js +42 -0
  65. package/es/hooks/useTable/index.d.ts +12 -0
  66. package/es/hooks/useTable/index.js +74 -0
  67. package/es/hooks/useTable/index.less +0 -0
  68. package/es/hooks/useTableModal/index.d.ts +12 -0
  69. package/es/hooks/useTableModal/index.js +25 -0
  70. package/es/hooks/useTableModal/index.less +0 -0
  71. package/es/hooks/useUrlState/index.d.ts +2 -0
  72. package/es/hooks/useUrlState/index.js +56 -0
  73. package/es/hooks/useWebSocket/index.d.ts +13 -0
  74. package/es/hooks/useWebSocket/index.js +121 -0
  75. package/es/index.d.ts +4 -0
  76. package/es/index.js +4 -0
  77. package/es/locales/en-US.d.ts +11 -0
  78. package/es/locales/en-US.js +10 -0
  79. package/es/locales/index.d.ts +1 -0
  80. package/es/locales/index.js +23 -0
  81. package/es/locales/zh-CN.d.ts +11 -0
  82. package/es/locales/zh-CN.js +10 -0
  83. package/es/locales/zh-TW.d.ts +11 -0
  84. package/es/locales/zh-TW.js +10 -0
  85. package/es/utils/index.d.ts +3 -0
  86. package/es/utils/index.js +3 -0
  87. package/es/utils/otherUtils.d.ts +8 -0
  88. package/es/utils/otherUtils.js +12 -0
  89. package/es/utils/storage.d.ts +30 -0
  90. package/es/utils/storage.js +70 -0
  91. package/es/utils/typeUtils.d.ts +42 -0
  92. package/es/utils/typeUtils.js +86 -0
  93. package/lib/business-components/colorInput/index.d.ts +21 -0
  94. package/lib/business-components/colorInput/index.js +70 -0
  95. package/lib/business-components/colorInput/index.less +10 -0
  96. package/lib/business-components/index.d.ts +11 -0
  97. package/lib/business-components/index.js +54 -0
  98. package/lib/business-components/rechargeOption/index.d.ts +36 -0
  99. package/lib/business-components/rechargeOption/index.js +133 -0
  100. package/lib/business-components/rechargeOption/index.less +0 -0
  101. package/lib/business-components/selectTag/index.d.ts +25 -0
  102. package/lib/business-components/selectTag/index.js +181 -0
  103. package/lib/business-components/selectTag/index.less +22 -0
  104. package/lib/business-components/sortModal/index.d.ts +30 -0
  105. package/lib/business-components/sortModal/index.js +100 -0
  106. package/lib/business-components/sortModal/index.less +29 -0
  107. package/lib/business-components/statistics/index.d.ts +12 -0
  108. package/lib/business-components/statistics/index.js +63 -0
  109. package/lib/business-components/statistics/index.less +64 -0
  110. package/lib/business-components/tagModal/index.d.ts +17 -0
  111. package/lib/business-components/tagModal/index.js +66 -0
  112. package/lib/business-hooks/index.d.ts +2 -0
  113. package/lib/business-hooks/index.js +42 -0
  114. package/lib/business-hooks/useModal/index.d.ts +31 -0
  115. package/lib/business-hooks/useModal/index.js +68 -0
  116. package/lib/business-hooks/useModal/index.less +0 -0
  117. package/lib/business-hooks/useTagModal/index.d.ts +17 -0
  118. package/lib/business-hooks/useTagModal/index.js +61 -0
  119. package/lib/components/ColorPicker/index.d.ts +22 -0
  120. package/lib/components/ColorPicker/index.js +80 -0
  121. package/lib/components/ColorPicker/index.less +17 -0
  122. package/lib/components/DragSort/index.d.ts +2 -0
  123. package/lib/components/DragSort/index.js +101 -0
  124. package/lib/components/Iconfont/index.d.ts +6 -0
  125. package/lib/components/Iconfont/index.js +47 -0
  126. package/lib/components/Iconfont/index.less +0 -0
  127. package/lib/components/card/index.d.ts +5 -0
  128. package/lib/components/card/index.js +42 -0
  129. package/lib/components/card/index.less +9 -0
  130. package/lib/components/index.d.ts +4 -0
  131. package/lib/components/index.js +48 -0
  132. package/lib/config/index.d.ts +16 -0
  133. package/lib/config/index.js +39 -0
  134. package/lib/config/utils.d.ts +0 -0
  135. package/lib/config/utils.js +0 -0
  136. package/lib/hooks/index.d.ts +8 -0
  137. package/lib/hooks/index.js +57 -0
  138. package/lib/hooks/useCountDown/index.d.ts +10 -0
  139. package/lib/hooks/useCountDown/index.js +57 -0
  140. package/lib/hooks/useDocumentScroll/index.d.ts +8 -0
  141. package/lib/hooks/useDocumentScroll/index.js +54 -0
  142. package/lib/hooks/useDocumentScroll/index.less +0 -0
  143. package/lib/hooks/useMousemove/index.d.ts +8 -0
  144. package/lib/hooks/useMousemove/index.js +70 -0
  145. package/lib/hooks/useResponsive/index.d.ts +2 -0
  146. package/lib/hooks/useResponsive/index.js +47 -0
  147. package/lib/hooks/useResponsive/index.less +0 -0
  148. package/lib/hooks/useSize/index.d.ts +2 -0
  149. package/lib/hooks/useSize/index.js +45 -0
  150. package/lib/hooks/useSize/index.less +0 -0
  151. package/lib/hooks/useStateMulti/index.d.ts +2 -0
  152. package/lib/hooks/useStateMulti/index.js +43 -0
  153. package/lib/hooks/useStateWithCb/index.d.ts +2 -0
  154. package/lib/hooks/useStateWithCb/index.js +53 -0
  155. package/lib/hooks/useTable/index.d.ts +12 -0
  156. package/lib/hooks/useTable/index.js +75 -0
  157. package/lib/hooks/useTable/index.less +0 -0
  158. package/lib/hooks/useTableModal/index.d.ts +12 -0
  159. package/lib/hooks/useTableModal/index.js +43 -0
  160. package/lib/hooks/useTableModal/index.less +0 -0
  161. package/lib/hooks/useUrlState/index.d.ts +2 -0
  162. package/lib/hooks/useUrlState/index.js +59 -0
  163. package/lib/hooks/useWebSocket/index.d.ts +13 -0
  164. package/lib/hooks/useWebSocket/index.js +91 -0
  165. package/lib/index.d.ts +4 -0
  166. package/lib/index.js +22 -0
  167. package/lib/locales/en-US.d.ts +11 -0
  168. package/lib/locales/en-US.js +36 -0
  169. package/lib/locales/index.d.ts +1 -0
  170. package/lib/locales/index.js +59 -0
  171. package/lib/locales/zh-CN.d.ts +11 -0
  172. package/lib/locales/zh-CN.js +36 -0
  173. package/lib/locales/zh-TW.d.ts +11 -0
  174. package/lib/locales/zh-TW.js +36 -0
  175. package/lib/utils/index.d.ts +3 -0
  176. package/lib/utils/index.js +21 -0
  177. package/lib/utils/otherUtils.d.ts +8 -0
  178. package/lib/utils/otherUtils.js +31 -0
  179. package/lib/utils/storage.d.ts +30 -0
  180. package/lib/utils/storage.js +63 -0
  181. package/lib/utils/typeUtils.d.ts +42 -0
  182. package/lib/utils/typeUtils.js +75 -0
  183. package/package.json +101 -0
@@ -0,0 +1,80 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/ColorPicker/index.tsx
30
+ var ColorPicker_exports = {};
31
+ __export(ColorPicker_exports, {
32
+ default: () => ColorPicker_default
33
+ });
34
+ module.exports = __toCommonJS(ColorPicker_exports);
35
+ var import_antd = require("antd");
36
+ var import_react = __toESM(require("react"));
37
+ var import_react_color = require("react-color");
38
+ var import_index = require("./index.less");
39
+ var ColorPicker = ({
40
+ keyName,
41
+ value,
42
+ onChange,
43
+ children
44
+ }) => {
45
+ const [val, setVal] = (0, import_react.useState)(value);
46
+ const handleChange = (e) => {
47
+ setVal(e[keyName]);
48
+ };
49
+ const handleConfirm = (e) => {
50
+ console.log(2);
51
+ onChange && onChange(e[keyName]);
52
+ };
53
+ (0, import_react.useEffect)(() => {
54
+ setVal(value);
55
+ }, [value]);
56
+ return /* @__PURE__ */ import_react.default.createElement(
57
+ import_antd.Popover,
58
+ {
59
+ trigger: "click",
60
+ overlayClassName: "colorPickerBtn-Popover",
61
+ placement: "rightTop",
62
+ content: /* @__PURE__ */ import_react.default.createElement(
63
+ import_react_color.SwatchesPicker,
64
+ {
65
+ triangle: "hide",
66
+ color: val,
67
+ onChange: handleChange,
68
+ onChangeComplete: handleConfirm
69
+ }
70
+ )
71
+ },
72
+ children
73
+ );
74
+ };
75
+ ColorPicker.defaultProps = {
76
+ keyName: "hex"
77
+ };
78
+ var ColorPicker_default = ColorPicker;
79
+ // Annotate the CommonJS export names for ESM import in node:
80
+ 0 && (module.exports = {});
@@ -0,0 +1,17 @@
1
+ .colorPickerBtn-Popover {
2
+ .ant-popover-inner-content {
3
+ padding: 0 0 0 0;
4
+ }
5
+
6
+ .ant-popover-arrow {
7
+ display: none;
8
+ }
9
+ }
10
+
11
+ .sketch-picker {
12
+ .flexbox-fix:nth-of-type(3) {
13
+ div:nth-of-type(5) {
14
+ display: none;
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,2 @@
1
+ declare const DragDrop: ({ onChange, children, list, droppableId, draggableIdKey, droppableClassName, draggableClassName, footer, direction, isDragDisabled, }: any) => JSX.Element;
2
+ export default DragDrop;
@@ -0,0 +1,101 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/DragSort/index.tsx
30
+ var DragSort_exports = {};
31
+ __export(DragSort_exports, {
32
+ default: () => DragSort_default
33
+ });
34
+ module.exports = __toCommonJS(DragSort_exports);
35
+ var import_react_beautiful_dnd = require("react-beautiful-dnd");
36
+ var import_array_move = __toESM(require("array-move"));
37
+ var import_classnames = __toESM(require("classnames"));
38
+ var import_utils = require("../../utils");
39
+ var DragDrop = ({
40
+ onChange,
41
+ children,
42
+ list,
43
+ droppableId,
44
+ draggableIdKey,
45
+ droppableClassName,
46
+ draggableClassName,
47
+ footer,
48
+ direction = "vertical",
49
+ isDragDisabled
50
+ }) => {
51
+ droppableId = droppableId || (0, import_utils.getUniqueId)("droppableId_");
52
+ const handleDragEnd = (result) => {
53
+ if (result.destination) {
54
+ onChange && onChange(
55
+ (0, import_array_move.default)(list, result.source.index, result.destination.index),
56
+ result
57
+ );
58
+ }
59
+ };
60
+ const getDraggableId = (item, index) => {
61
+ if (typeof draggableIdKey === "function") {
62
+ return String(draggableIdKey(item, index));
63
+ } else {
64
+ return draggableIdKey ? String(item[draggableIdKey]) : String(item);
65
+ }
66
+ };
67
+ return /* @__PURE__ */ React.createElement(import_react_beautiful_dnd.DragDropContext, { onDragEnd: handleDragEnd }, /* @__PURE__ */ React.createElement(import_react_beautiful_dnd.Droppable, { droppableId, direction }, (provided) => /* @__PURE__ */ React.createElement(
68
+ "div",
69
+ {
70
+ ...provided.droppableProps,
71
+ ref: provided.innerRef,
72
+ className: (0, import_classnames.default)(droppableClassName)
73
+ },
74
+ list.map((item, index) => /* @__PURE__ */ React.createElement(
75
+ import_react_beautiful_dnd.Draggable,
76
+ {
77
+ key: getDraggableId(item, index),
78
+ draggableId: getDraggableId(item, index),
79
+ index,
80
+ isDragDisabled: !!isDragDisabled
81
+ },
82
+ (provided2) => /* @__PURE__ */ React.createElement(
83
+ "div",
84
+ {
85
+ className: (0, import_classnames.default)(
86
+ typeof draggableClassName === "function" ? draggableClassName(item, index) : draggableClassName
87
+ ),
88
+ ref: provided2.innerRef,
89
+ ...provided2.draggableProps,
90
+ ...provided2.dragHandleProps
91
+ },
92
+ children(item, index)
93
+ )
94
+ )),
95
+ provided.placeholder,
96
+ footer
97
+ )));
98
+ };
99
+ var DragSort_default = DragDrop;
100
+ // Annotate the CommonJS export names for ESM import in node:
101
+ 0 && (module.exports = {});
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface IconFontProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
3
+ type: string;
4
+ }
5
+ declare const IconFont: React.FC<IconFontProps>;
6
+ export default IconFont;
@@ -0,0 +1,47 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/Iconfont/index.tsx
30
+ var Iconfont_exports = {};
31
+ __export(Iconfont_exports, {
32
+ default: () => Iconfont_default
33
+ });
34
+ module.exports = __toCommonJS(Iconfont_exports);
35
+ var import_icons = require("@ant-design/icons");
36
+ var import_react = __toESM(require("react"));
37
+ var import_config = require("../../config");
38
+ var MyIcon = (0, import_icons.createFromIconfontCN)({
39
+ scriptUrl: (0, import_config.getConfig)().ENV.static + "/static/fonts/iconfont/iconfont.js?q=" + new Date().getTime()
40
+ // 在 iconfont.cn 上生成
41
+ });
42
+ var IconFont = (props) => {
43
+ return /* @__PURE__ */ import_react.default.createElement(MyIcon, { ...props, className: props.className });
44
+ };
45
+ var Iconfont_default = IconFont;
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {});
File without changes
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ export declare type CardProps = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
4
+ declare const Card: React.FC<Partial<CardProps>>;
5
+ export default Card;
@@ -0,0 +1,42 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/card/index.tsx
30
+ var card_exports = {};
31
+ __export(card_exports, {
32
+ default: () => card_default
33
+ });
34
+ module.exports = __toCommonJS(card_exports);
35
+ var import_classnames = __toESM(require("classnames"));
36
+ var import_index = require("./index.less");
37
+ var Card = (props) => {
38
+ return /* @__PURE__ */ React.createElement("div", { ...props, className: (0, import_classnames.default)("pisell-card", props.className) }, props.children);
39
+ };
40
+ var card_default = Card;
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {});
@@ -0,0 +1,9 @@
1
+ .pisell-card {
2
+ width: 100%;
3
+ background: #fff;
4
+ border-radius: 4px;
5
+ padding: 20px;
6
+ box-sizing: border-box;
7
+ margin-bottom: 20px;
8
+ overflow: hidden;
9
+ }
@@ -0,0 +1,4 @@
1
+ export { default as Card } from './card';
2
+ export { default as ColorPicker } from './ColorPicker';
3
+ export { default as DragSort } from './DragSort';
4
+ export { default as IconFont } from './Iconfont';
@@ -0,0 +1,48 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/index.ts
30
+ var components_exports = {};
31
+ __export(components_exports, {
32
+ Card: () => import_card.default,
33
+ ColorPicker: () => import_ColorPicker.default,
34
+ DragSort: () => import_DragSort.default,
35
+ IconFont: () => import_Iconfont.default
36
+ });
37
+ module.exports = __toCommonJS(components_exports);
38
+ var import_card = __toESM(require("./card"));
39
+ var import_ColorPicker = __toESM(require("./ColorPicker"));
40
+ var import_DragSort = __toESM(require("./DragSort"));
41
+ var import_Iconfont = __toESM(require("./Iconfont"));
42
+ // Annotate the CommonJS export names for ESM import in node:
43
+ 0 && (module.exports = {
44
+ Card,
45
+ ColorPicker,
46
+ DragSort,
47
+ IconFont
48
+ });
@@ -0,0 +1,16 @@
1
+ declare type PisellConfigType = {
2
+ ENV: {
3
+ host: string;
4
+ socket: string;
5
+ helpHost: string;
6
+ boxlocal_h5: string;
7
+ accounts: string;
8
+ domain: string;
9
+ googleMap: string;
10
+ appCenter: string;
11
+ static: string;
12
+ };
13
+ };
14
+ export declare const initConfig: (options: PisellConfigType) => void;
15
+ export declare const getConfig: () => PisellConfigType;
16
+ export {};
@@ -0,0 +1,39 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/config/index.ts
20
+ var config_exports = {};
21
+ __export(config_exports, {
22
+ getConfig: () => getConfig,
23
+ initConfig: () => initConfig
24
+ });
25
+ module.exports = __toCommonJS(config_exports);
26
+ var PisellConfig = {};
27
+ var initConfig = (options) => {
28
+ Object.entries(options).forEach(([key, value]) => {
29
+ PisellConfig[key] = value;
30
+ });
31
+ };
32
+ var getConfig = () => {
33
+ return PisellConfig;
34
+ };
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ getConfig,
38
+ initConfig
39
+ });
File without changes
File without changes
@@ -0,0 +1,8 @@
1
+ import useMousemove from './useMousemove';
2
+ import useResponsive from './useResponsive';
3
+ import useSize from './useSize';
4
+ import useStateMulti from './useStateMulti';
5
+ import useStateWithCb from './useStateWithCb';
6
+ import useTable from './useTable';
7
+ import useUrlState from './useUrlState';
8
+ export { useStateMulti, useStateWithCb, useResponsive, useUrlState, useSize, useMousemove, useTable, };
@@ -0,0 +1,57 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/hooks/index.ts
30
+ var hooks_exports = {};
31
+ __export(hooks_exports, {
32
+ useMousemove: () => import_useMousemove.default,
33
+ useResponsive: () => import_useResponsive.default,
34
+ useSize: () => import_useSize.default,
35
+ useStateMulti: () => import_useStateMulti.default,
36
+ useStateWithCb: () => import_useStateWithCb.default,
37
+ useTable: () => import_useTable.default,
38
+ useUrlState: () => import_useUrlState.default
39
+ });
40
+ module.exports = __toCommonJS(hooks_exports);
41
+ var import_useMousemove = __toESM(require("./useMousemove"));
42
+ var import_useResponsive = __toESM(require("./useResponsive"));
43
+ var import_useSize = __toESM(require("./useSize"));
44
+ var import_useStateMulti = __toESM(require("./useStateMulti"));
45
+ var import_useStateWithCb = __toESM(require("./useStateWithCb"));
46
+ var import_useTable = __toESM(require("./useTable"));
47
+ var import_useUrlState = __toESM(require("./useUrlState"));
48
+ // Annotate the CommonJS export names for ESM import in node:
49
+ 0 && (module.exports = {
50
+ useMousemove,
51
+ useResponsive,
52
+ useSize,
53
+ useStateMulti,
54
+ useStateWithCb,
55
+ useTable,
56
+ useUrlState
57
+ });
@@ -0,0 +1,10 @@
1
+ declare const useCountDown: ({ second, running }?: {
2
+ second?: number | undefined;
3
+ running?: boolean | undefined;
4
+ }) => {
5
+ running: boolean;
6
+ second: number;
7
+ start: () => void;
8
+ stop: () => void;
9
+ };
10
+ export default useCountDown;
@@ -0,0 +1,57 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/hooks/useCountDown/index.ts
20
+ var useCountDown_exports = {};
21
+ __export(useCountDown_exports, {
22
+ default: () => useCountDown_default
23
+ });
24
+ module.exports = __toCommonJS(useCountDown_exports);
25
+ var import_react = require("react");
26
+ var useCountDown = ({ second = 60, running = false } = {}) => {
27
+ const [_running, setRunning] = (0, import_react.useState)(running);
28
+ const [_second, setSecond] = (0, import_react.useState)(second);
29
+ const timer = (0, import_react.useRef)();
30
+ const stop = (0, import_react.useCallback)(() => {
31
+ setRunning(false);
32
+ clearInterval(timer.current);
33
+ }, []);
34
+ const start = (0, import_react.useCallback)(() => {
35
+ setSecond(second);
36
+ setRunning(true);
37
+ timer.current = setInterval(() => {
38
+ setSecond((s) => {
39
+ s = s - 1;
40
+ if (s <= 0) {
41
+ s = 0;
42
+ stop();
43
+ }
44
+ return s;
45
+ });
46
+ }, 1e3);
47
+ }, [second, stop]);
48
+ return {
49
+ running: _running,
50
+ second: _second,
51
+ start,
52
+ stop
53
+ };
54
+ };
55
+ var useCountDown_default = useCountDown;
56
+ // Annotate the CommonJS export names for ESM import in node:
57
+ 0 && (module.exports = {});
@@ -0,0 +1,8 @@
1
+ declare type useDocumentScrollReturn = {
2
+ innerHeight: number;
3
+ newInnerHeight: number;
4
+ top: number;
5
+ left: number;
6
+ };
7
+ declare const useDocumentScroll: () => useDocumentScrollReturn;
8
+ export default useDocumentScroll;
@@ -0,0 +1,54 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/hooks/useDocumentScroll/index.tsx
20
+ var useDocumentScroll_exports = {};
21
+ __export(useDocumentScroll_exports, {
22
+ default: () => useDocumentScroll_default
23
+ });
24
+ module.exports = __toCommonJS(useDocumentScroll_exports);
25
+ var import_react = require("react");
26
+ var import_ahooks = require("ahooks");
27
+ var initValue = {
28
+ left: 0,
29
+ top: 0,
30
+ // 窗口高度
31
+ innerHeight: 0,
32
+ // 当前窗口高度
33
+ newInnerHeight: 0
34
+ };
35
+ var useDocumentScroll = () => {
36
+ const _innerHeight = (0, import_react.useMemo)(() => {
37
+ return document.documentElement.clientHeight;
38
+ }, []);
39
+ const _scroll = (0, import_ahooks.useScroll)(document);
40
+ const _result = (0, import_react.useMemo)(() => {
41
+ return {
42
+ ...initValue,
43
+ ..._scroll,
44
+ // 窗口高度
45
+ innerHeight: _innerHeight,
46
+ // 当前窗口高度
47
+ newInnerHeight: window.innerHeight
48
+ };
49
+ }, [_innerHeight, _scroll]);
50
+ return _result;
51
+ };
52
+ var useDocumentScroll_default = useDocumentScroll;
53
+ // Annotate the CommonJS export names for ESM import in node:
54
+ 0 && (module.exports = {});
File without changes
@@ -0,0 +1,8 @@
1
+ declare type useMousemoveProps = {
2
+ time: number;
3
+ };
4
+ declare type useMousemoveReturn = {
5
+ isMove: boolean;
6
+ };
7
+ declare const useMousemove: ({ time }: useMousemoveProps) => useMousemoveReturn;
8
+ export default useMousemove;