@pisell/common 0.0.18 → 1.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 (279) hide show
  1. package/.fatherrc.ts +7 -0
  2. package/CHANGELOG.md +7 -0
  3. package/README.md +1 -38
  4. package/{lib/components → es}/button/index.d.ts +5 -4
  5. package/es/button/index.d.ts.map +1 -0
  6. package/es/button/index.js +33 -0
  7. package/{es/components → lib}/button/index.d.ts +5 -4
  8. package/lib/button/index.d.ts.map +1 -0
  9. package/lib/{components/avatar → button}/index.js +14 -11
  10. package/package.json +20 -77
  11. package/src/button/index.md +17 -0
  12. package/src/button/index.tsx +38 -0
  13. package/tsconfig.json +14 -0
  14. package/LICENSE +0 -21
  15. package/es/bin/pisell.js +0 -2
  16. package/es/business-components/colorInput/index.d.ts +0 -21
  17. package/es/business-components/colorInput/index.js +0 -43
  18. package/es/business-components/colorInput/index.less +0 -10
  19. package/es/business-components/index.d.ts +0 -11
  20. package/es/business-components/index.js +0 -7
  21. package/es/business-components/rechargeOption/index.d.ts +0 -36
  22. package/es/business-components/rechargeOption/index.js +0 -132
  23. package/es/business-components/rechargeOption/index.less +0 -0
  24. package/es/business-components/selectTag/index.d.ts +0 -25
  25. package/es/business-components/selectTag/index.js +0 -179
  26. package/es/business-components/selectTag/index.less +0 -22
  27. package/es/business-components/sortModal/index.d.ts +0 -30
  28. package/es/business-components/sortModal/index.js +0 -85
  29. package/es/business-components/sortModal/index.less +0 -29
  30. package/es/business-components/statistics/index.d.ts +0 -12
  31. package/es/business-components/statistics/index.js +0 -38
  32. package/es/business-components/statistics/index.less +0 -64
  33. package/es/business-components/tagModal/index.d.ts +0 -17
  34. package/es/business-components/tagModal/index.js +0 -58
  35. package/es/business-hooks/index.d.ts +0 -2
  36. package/es/business-hooks/index.js +0 -2
  37. package/es/business-hooks/useModal/index.d.ts +0 -31
  38. package/es/business-hooks/useModal/index.js +0 -91
  39. package/es/business-hooks/useModal/index.less +0 -0
  40. package/es/business-hooks/useTagModal/index.d.ts +0 -17
  41. package/es/business-hooks/useTagModal/index.js +0 -47
  42. package/es/components/ColorPicker/index.d.ts +0 -22
  43. package/es/components/ColorPicker/index.js +0 -51
  44. package/es/components/ColorPicker/index.less +0 -17
  45. package/es/components/DragSort/index.d.ts +0 -2
  46. package/es/components/DragSort/index.js +0 -68
  47. package/es/components/EditorPreview/index.d.ts +0 -5
  48. package/es/components/EditorPreview/index.js +0 -14
  49. package/es/components/EditorPreview/index.less +0 -81
  50. package/es/components/Iconfont/index.d.ts +0 -6
  51. package/es/components/Iconfont/index.js +0 -29
  52. package/es/components/Iconfont/index.less +0 -0
  53. package/es/components/agreement/Detail/index.d.ts +0 -3
  54. package/es/components/agreement/Detail/index.js +0 -77
  55. package/es/components/agreement/Detail/serve.d.ts +0 -1
  56. package/es/components/agreement/Detail/serve.js +0 -6
  57. package/es/components/agreement/index.d.ts +0 -11
  58. package/es/components/agreement/index.js +0 -45
  59. package/es/components/agreement/index.less +0 -20
  60. package/es/components/avatar/index.d.ts +0 -13
  61. package/es/components/avatar/index.js +0 -25
  62. package/es/components/button/index.js +0 -36
  63. package/es/components/card/index.d.ts +0 -5
  64. package/es/components/card/index.js +0 -16
  65. package/es/components/card/index.less +0 -9
  66. package/es/components/checkbox/index.d.ts +0 -20
  67. package/es/components/checkbox/index.js +0 -43
  68. package/es/components/configProvider/index.d.ts +0 -113
  69. package/es/components/configProvider/index.js +0 -114
  70. package/es/components/datePicker/index.d.ts +0 -9
  71. package/es/components/datePicker/index.js +0 -17
  72. package/es/components/index.d.ts +0 -30
  73. package/es/components/index.js +0 -16
  74. package/es/components/input/index.d.ts +0 -35
  75. package/es/components/input/index.js +0 -97
  76. package/es/components/inputNumber/index.d.ts +0 -9
  77. package/es/components/inputNumber/index.js +0 -17
  78. package/es/components/pagination/index.d.ts +0 -10
  79. package/es/components/pagination/index.js +0 -18
  80. package/es/components/radio/index.d.ts +0 -13
  81. package/es/components/radio/index.js +0 -28
  82. package/es/components/select/index.d.ts +0 -9
  83. package/es/components/select/index.js +0 -17
  84. package/es/components/switch/index.d.ts +0 -10
  85. package/es/components/switch/index.js +0 -18
  86. package/es/config/index.d.ts +0 -30
  87. package/es/config/index.js +0 -18
  88. package/es/config/request.d.ts +0 -7
  89. package/es/config/request.js +0 -67
  90. package/es/config/utils.d.ts +0 -0
  91. package/es/config/utils.js +0 -0
  92. package/es/hooks/index.d.ts +0 -8
  93. package/es/hooks/index.js +0 -8
  94. package/es/hooks/useCountDown/index.d.ts +0 -10
  95. package/es/hooks/useCountDown/index.js +0 -48
  96. package/es/hooks/useDocumentScroll/index.d.ts +0 -8
  97. package/es/hooks/useDocumentScroll/index.js +0 -41
  98. package/es/hooks/useDocumentScroll/index.less +0 -0
  99. package/es/hooks/useMousemove/index.d.ts +0 -8
  100. package/es/hooks/useMousemove/index.js +0 -61
  101. package/es/hooks/useResponsive/index.d.ts +0 -2
  102. package/es/hooks/useResponsive/index.js +0 -29
  103. package/es/hooks/useResponsive/index.less +0 -0
  104. package/es/hooks/useSize/index.d.ts +0 -2
  105. package/es/hooks/useSize/index.js +0 -27
  106. package/es/hooks/useSize/index.less +0 -0
  107. package/es/hooks/useStateMulti/index.d.ts +0 -2
  108. package/es/hooks/useStateMulti/index.js +0 -29
  109. package/es/hooks/useStateWithCb/index.d.ts +0 -2
  110. package/es/hooks/useStateWithCb/index.js +0 -42
  111. package/es/hooks/useTable/index.d.ts +0 -12
  112. package/es/hooks/useTable/index.js +0 -74
  113. package/es/hooks/useTable/index.less +0 -0
  114. package/es/hooks/useTableModal/index.d.ts +0 -12
  115. package/es/hooks/useTableModal/index.js +0 -25
  116. package/es/hooks/useTableModal/index.less +0 -0
  117. package/es/hooks/useUrlState/index.d.ts +0 -2
  118. package/es/hooks/useUrlState/index.js +0 -56
  119. package/es/hooks/useWebSocket/index.d.ts +0 -13
  120. package/es/hooks/useWebSocket/index.js +0 -121
  121. package/es/index.d.ts +0 -4
  122. package/es/index.js +0 -4
  123. package/es/locales/en-US.d.ts +0 -11
  124. package/es/locales/en-US.js +0 -10
  125. package/es/locales/index.d.ts +0 -1
  126. package/es/locales/index.js +0 -23
  127. package/es/locales/zh-CN.d.ts +0 -11
  128. package/es/locales/zh-CN.js +0 -10
  129. package/es/locales/zh-TW.d.ts +0 -11
  130. package/es/locales/zh-TW.js +0 -10
  131. package/es/script/constants/index.js +0 -8
  132. package/es/script/deploy.js +0 -47
  133. package/es/script/index.js +0 -40
  134. package/es/script/package.json +0 -4
  135. package/es/script/release/index.js +0 -161
  136. package/es/script/release/release.js +0 -163
  137. package/es/script/uploadCode/index.js +0 -278
  138. package/es/script/uploadCode/uploadCode.js +0 -401
  139. package/es/script/utils/index.js +0 -321
  140. package/es/utils/index.d.ts +0 -3
  141. package/es/utils/index.js +0 -3
  142. package/es/utils/otherUtils.d.ts +0 -8
  143. package/es/utils/otherUtils.js +0 -12
  144. package/es/utils/storage.d.ts +0 -30
  145. package/es/utils/storage.js +0 -70
  146. package/es/utils/typeUtils.d.ts +0 -42
  147. package/es/utils/typeUtils.js +0 -86
  148. package/lib/bin/pisell.js +0 -26
  149. package/lib/business-components/colorInput/index.d.ts +0 -21
  150. package/lib/business-components/colorInput/index.js +0 -70
  151. package/lib/business-components/colorInput/index.less +0 -10
  152. package/lib/business-components/index.d.ts +0 -11
  153. package/lib/business-components/index.js +0 -54
  154. package/lib/business-components/rechargeOption/index.d.ts +0 -36
  155. package/lib/business-components/rechargeOption/index.js +0 -112
  156. package/lib/business-components/rechargeOption/index.less +0 -0
  157. package/lib/business-components/selectTag/index.d.ts +0 -25
  158. package/lib/business-components/selectTag/index.js +0 -181
  159. package/lib/business-components/selectTag/index.less +0 -22
  160. package/lib/business-components/sortModal/index.d.ts +0 -30
  161. package/lib/business-components/sortModal/index.js +0 -100
  162. package/lib/business-components/sortModal/index.less +0 -29
  163. package/lib/business-components/statistics/index.d.ts +0 -12
  164. package/lib/business-components/statistics/index.js +0 -63
  165. package/lib/business-components/statistics/index.less +0 -64
  166. package/lib/business-components/tagModal/index.d.ts +0 -17
  167. package/lib/business-components/tagModal/index.js +0 -66
  168. package/lib/business-hooks/index.d.ts +0 -2
  169. package/lib/business-hooks/index.js +0 -42
  170. package/lib/business-hooks/useModal/index.d.ts +0 -31
  171. package/lib/business-hooks/useModal/index.js +0 -68
  172. package/lib/business-hooks/useModal/index.less +0 -0
  173. package/lib/business-hooks/useTagModal/index.d.ts +0 -17
  174. package/lib/business-hooks/useTagModal/index.js +0 -61
  175. package/lib/components/ColorPicker/index.d.ts +0 -22
  176. package/lib/components/ColorPicker/index.js +0 -80
  177. package/lib/components/ColorPicker/index.less +0 -17
  178. package/lib/components/DragSort/index.d.ts +0 -2
  179. package/lib/components/DragSort/index.js +0 -101
  180. package/lib/components/EditorPreview/index.d.ts +0 -5
  181. package/lib/components/EditorPreview/index.js +0 -37
  182. package/lib/components/EditorPreview/index.less +0 -81
  183. package/lib/components/Iconfont/index.d.ts +0 -6
  184. package/lib/components/Iconfont/index.js +0 -48
  185. package/lib/components/Iconfont/index.less +0 -0
  186. package/lib/components/agreement/Detail/index.d.ts +0 -3
  187. package/lib/components/agreement/Detail/index.js +0 -86
  188. package/lib/components/agreement/Detail/serve.d.ts +0 -1
  189. package/lib/components/agreement/Detail/serve.js +0 -30
  190. package/lib/components/agreement/index.d.ts +0 -11
  191. package/lib/components/agreement/index.js +0 -82
  192. package/lib/components/agreement/index.less +0 -20
  193. package/lib/components/avatar/index.d.ts +0 -13
  194. package/lib/components/button/index.js +0 -36
  195. package/lib/components/card/index.d.ts +0 -5
  196. package/lib/components/card/index.js +0 -42
  197. package/lib/components/card/index.less +0 -9
  198. package/lib/components/checkbox/index.d.ts +0 -20
  199. package/lib/components/checkbox/index.js +0 -36
  200. package/lib/components/configProvider/index.d.ts +0 -113
  201. package/lib/components/configProvider/index.js +0 -159
  202. package/lib/components/datePicker/index.d.ts +0 -9
  203. package/lib/components/datePicker/index.js +0 -31
  204. package/lib/components/index.d.ts +0 -30
  205. package/lib/components/index.js +0 -83
  206. package/lib/components/input/index.d.ts +0 -35
  207. package/lib/components/input/index.js +0 -53
  208. package/lib/components/inputNumber/index.d.ts +0 -9
  209. package/lib/components/inputNumber/index.js +0 -31
  210. package/lib/components/pagination/index.d.ts +0 -10
  211. package/lib/components/pagination/index.js +0 -42
  212. package/lib/components/radio/index.d.ts +0 -13
  213. package/lib/components/radio/index.js +0 -36
  214. package/lib/components/select/index.d.ts +0 -9
  215. package/lib/components/select/index.js +0 -36
  216. package/lib/components/switch/index.d.ts +0 -10
  217. package/lib/components/switch/index.js +0 -42
  218. package/lib/config/index.d.ts +0 -30
  219. package/lib/config/index.js +0 -39
  220. package/lib/config/request.d.ts +0 -7
  221. package/lib/config/request.js +0 -76
  222. package/lib/config/utils.d.ts +0 -0
  223. package/lib/config/utils.js +0 -0
  224. package/lib/hooks/index.d.ts +0 -8
  225. package/lib/hooks/index.js +0 -57
  226. package/lib/hooks/useCountDown/index.d.ts +0 -10
  227. package/lib/hooks/useCountDown/index.js +0 -57
  228. package/lib/hooks/useDocumentScroll/index.d.ts +0 -8
  229. package/lib/hooks/useDocumentScroll/index.js +0 -54
  230. package/lib/hooks/useDocumentScroll/index.less +0 -0
  231. package/lib/hooks/useMousemove/index.d.ts +0 -8
  232. package/lib/hooks/useMousemove/index.js +0 -70
  233. package/lib/hooks/useResponsive/index.d.ts +0 -2
  234. package/lib/hooks/useResponsive/index.js +0 -47
  235. package/lib/hooks/useResponsive/index.less +0 -0
  236. package/lib/hooks/useSize/index.d.ts +0 -2
  237. package/lib/hooks/useSize/index.js +0 -45
  238. package/lib/hooks/useSize/index.less +0 -0
  239. package/lib/hooks/useStateMulti/index.d.ts +0 -2
  240. package/lib/hooks/useStateMulti/index.js +0 -43
  241. package/lib/hooks/useStateWithCb/index.d.ts +0 -2
  242. package/lib/hooks/useStateWithCb/index.js +0 -53
  243. package/lib/hooks/useTable/index.d.ts +0 -12
  244. package/lib/hooks/useTable/index.js +0 -75
  245. package/lib/hooks/useTable/index.less +0 -0
  246. package/lib/hooks/useTableModal/index.d.ts +0 -12
  247. package/lib/hooks/useTableModal/index.js +0 -43
  248. package/lib/hooks/useTableModal/index.less +0 -0
  249. package/lib/hooks/useUrlState/index.d.ts +0 -2
  250. package/lib/hooks/useUrlState/index.js +0 -59
  251. package/lib/hooks/useWebSocket/index.d.ts +0 -13
  252. package/lib/hooks/useWebSocket/index.js +0 -91
  253. package/lib/index.d.ts +0 -4
  254. package/lib/index.js +0 -22
  255. package/lib/locales/en-US.d.ts +0 -11
  256. package/lib/locales/en-US.js +0 -36
  257. package/lib/locales/index.d.ts +0 -1
  258. package/lib/locales/index.js +0 -59
  259. package/lib/locales/zh-CN.d.ts +0 -11
  260. package/lib/locales/zh-CN.js +0 -36
  261. package/lib/locales/zh-TW.d.ts +0 -11
  262. package/lib/locales/zh-TW.js +0 -36
  263. package/lib/script/constants/index.js +0 -35
  264. package/lib/script/deploy.js +0 -61
  265. package/lib/script/index.js +0 -61
  266. package/lib/script/package.json +0 -4
  267. package/lib/script/release/index.js +0 -116
  268. package/lib/script/release/release.js +0 -89
  269. package/lib/script/uploadCode/index.js +0 -202
  270. package/lib/script/uploadCode/uploadCode.js +0 -208
  271. package/lib/script/utils/index.js +0 -248
  272. package/lib/utils/index.d.ts +0 -3
  273. package/lib/utils/index.js +0 -21
  274. package/lib/utils/otherUtils.d.ts +0 -8
  275. package/lib/utils/otherUtils.js +0 -31
  276. package/lib/utils/storage.d.ts +0 -30
  277. package/lib/utils/storage.js +0 -63
  278. package/lib/utils/typeUtils.d.ts +0 -42
  279. package/lib/utils/typeUtils.js +0 -75
@@ -1,29 +0,0 @@
1
- .pisell-sort-list {
2
- .pisell-sort-item {
3
- display: flex;
4
- align-items: center;
5
- width: 100%;
6
- min-width: 40px;
7
- margin-bottom: 10px;
8
- font-size: 16px;
9
- text-align: center;
10
- background: none;
11
- border: none;
12
- .pisell-sort-content {
13
- display: flex;
14
- width: 100%;
15
- }
16
-
17
- .pisell-icon {
18
- margin-right: 6px;
19
- font-size: 20px;
20
- }
21
-
22
- .pisell-tag-content {
23
- flex: 1;
24
- width: 100%;
25
- text-align: left;
26
- word-break: break-word;
27
- }
28
- }
29
- }
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface StatisticsOption {
4
- label: string;
5
- value: string;
6
- }
7
- export interface StatisticsProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
8
- loading: boolean;
9
- options: StatisticsOption[];
10
- }
11
- declare const Statistics: React.FC<Partial<StatisticsProps>>;
12
- export default Statistics;
@@ -1,63 +0,0 @@
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/business-components/statistics/index.tsx
30
- var statistics_exports = {};
31
- __export(statistics_exports, {
32
- default: () => statistics_default
33
- });
34
- module.exports = __toCommonJS(statistics_exports);
35
- var import_antd5 = require("antd5");
36
- var import_classnames = __toESM(require("classnames"));
37
- var import_react = __toESM(require("react"));
38
- var import_hooks = require("../../hooks");
39
- var import_index = require("./index.less");
40
- var Statistics = (props) => {
41
- const { loading, options = [] } = props;
42
- const responsive = (0, import_hooks.useResponsive)();
43
- return /* @__PURE__ */ import_react.default.createElement(
44
- "div",
45
- {
46
- className: (0, import_classnames.default)(
47
- "pisell-statistics",
48
- "pisell-scrollbar",
49
- props.className,
50
- {
51
- "phone-wrap": responsive === "phone"
52
- }
53
- ),
54
- style: props.style
55
- },
56
- /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-statistics-options" }, options.map((d, i) => {
57
- return /* @__PURE__ */ import_react.default.createElement("div", { key: i, className: "pisell-statistics-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-statistics-label" }, d.label), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-statistics-value" }, loading ? /* @__PURE__ */ import_react.default.createElement(import_antd5.Skeleton.Input, { active: true, size: "default" }) : d.value));
58
- }))
59
- );
60
- };
61
- var statistics_default = Statistics;
62
- // Annotate the CommonJS export names for ESM import in node:
63
- 0 && (module.exports = {});
@@ -1,64 +0,0 @@
1
- .pisell-statistics {
2
- width: 100%;
3
- overflow-y: auto;
4
-
5
- &.phone-wrap {
6
- overflow-y: hidden;
7
-
8
- .pisell-statistics-options {
9
- min-width: 100%;
10
- display: block;
11
-
12
- .pisell-statistics-item {
13
- padding: 12px;
14
- width: 100%;
15
- margin-bottom: 20px;
16
- border-bottom: 1px solid #ccc;
17
-
18
- &::after {
19
- display: none;
20
- }
21
- }
22
- }
23
- }
24
-
25
- .pisell-statistics-options {
26
- width: 100%;
27
- min-width: 1000px;
28
- display: flex;
29
- align-items: flex-start;
30
- justify-content: center;
31
-
32
- .pisell-statistics-item {
33
- flex: 1;
34
- position: relative;
35
- text-align: center;
36
-
37
- &::after {
38
- content: '';
39
- position: absolute;
40
- right: 0;
41
- top: 50%;
42
- transform: translate(-50%, -50%);
43
- height: 40px;
44
- width: 1px;
45
- background-color: #ccc;
46
- }
47
-
48
- .pisell-statistics-label {
49
- }
50
-
51
- .pisell-statistics-value {
52
- margin-top: 10px;
53
- font-size: 26px;
54
- // font-weight: 500;
55
- }
56
-
57
- &:last-child {
58
- &::after {
59
- display: none;
60
- }
61
- }
62
- }
63
- }
64
- }
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import type { useModalProps } from '../../business-hooks/useModal';
3
- export interface TagDataType<T> {
4
- value: T;
5
- label: string;
6
- }
7
- export interface TagModalProps<T> extends useModalProps {
8
- data: TagDataType<T>[];
9
- value: T[];
10
- onChange: (value: T[]) => void;
11
- tagModalRef: React.Ref<{
12
- showModal: () => void;
13
- hideModal: () => void;
14
- }>;
15
- }
16
- declare const TagModal: <T extends string | number>(props: TagModalProps<T>) => import("react/jsx-runtime").JSX.Element;
17
- export default TagModal;
@@ -1,66 +0,0 @@
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/business-components/tagModal/index.tsx
30
- var tagModal_exports = {};
31
- __export(tagModal_exports, {
32
- default: () => tagModal_default
33
- });
34
- module.exports = __toCommonJS(tagModal_exports);
35
- var import_antd5 = require("antd5");
36
- var import_react = __toESM(require("react"));
37
- var import_useModal = __toESM(require("../../business-hooks/useModal"));
38
- var TagModal = (props) => {
39
- const { data, onChange, value, tagModalRef, ...others } = props;
40
- const Content = (0, import_react.useMemo)(() => {
41
- return /* @__PURE__ */ import_react.default.createElement(
42
- import_antd5.Checkbox.Group,
43
- {
44
- style: { width: "100%" },
45
- onChange: (val) => onChange(val),
46
- value
47
- },
48
- /* @__PURE__ */ import_react.default.createElement(import_antd5.Row, { gutter: 10 }, data.map((d, i) => {
49
- return /* @__PURE__ */ import_react.default.createElement(import_antd5.Col, { span: 8, key: i }, /* @__PURE__ */ import_react.default.createElement(import_antd5.Checkbox, { value: d.value }, d.label));
50
- }))
51
- );
52
- }, [data]);
53
- const { showModal, hideModal, content } = (0, import_useModal.default)({
54
- ...others,
55
- children: Content,
56
- destroyOnClose: true
57
- });
58
- (0, import_react.useImperativeHandle)(tagModalRef, () => ({
59
- showModal,
60
- hideModal
61
- }));
62
- return content;
63
- };
64
- var tagModal_default = TagModal;
65
- // Annotate the CommonJS export names for ESM import in node:
66
- 0 && (module.exports = {});
@@ -1,2 +0,0 @@
1
- export { default as useModal } from './useModal';
2
- export { default as useTagModal } from './useTagModal';
@@ -1,42 +0,0 @@
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/business-hooks/index.ts
30
- var business_hooks_exports = {};
31
- __export(business_hooks_exports, {
32
- useModal: () => import_useModal.default,
33
- useTagModal: () => import_useTagModal.default
34
- });
35
- module.exports = __toCommonJS(business_hooks_exports);
36
- var import_useModal = __toESM(require("./useModal"));
37
- var import_useTagModal = __toESM(require("./useTagModal"));
38
- // Annotate the CommonJS export names for ESM import in node:
39
- 0 && (module.exports = {
40
- useModal,
41
- useTagModal
42
- });
@@ -1,31 +0,0 @@
1
- import { ModalProps } from 'node_modules/antd/lib/modal/Modal.d';
2
- import React from 'react';
3
- /**
4
- * @Title: 传入参数
5
- * @Describe: 其余参数与Modal一致
6
- * @Author: Wzw
7
- */
8
- export interface useModalProps extends ModalProps {
9
- /**
10
- * @description 属性描述
11
- * @default "默认值"
12
- */
13
- children: React.ReactNode;
14
- /**
15
- * @description 取消事件,不传则执行关闭事件
16
- * @default "默认值"
17
- */
18
- onCancel: () => void;
19
- /**
20
- * @description 确认事件,不传则执行关闭事件
21
- * @default "默认值"
22
- */
23
- onOk: () => void;
24
- }
25
- declare const useModal: (props: Partial<useModalProps>) => {
26
- showModal: () => void;
27
- hideModal: () => void;
28
- visible: boolean;
29
- content: import("react/jsx-runtime").JSX.Element;
30
- };
31
- export default useModal;
@@ -1,68 +0,0 @@
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/business-hooks/useModal/index.tsx
30
- var useModal_exports = {};
31
- __export(useModal_exports, {
32
- default: () => useModal_default
33
- });
34
- module.exports = __toCommonJS(useModal_exports);
35
- var import_antd5 = require("antd5");
36
- var import_react = __toESM(require("react"));
37
- var useModal = (props) => {
38
- const [visible, setVisible] = (0, import_react.useState)(false);
39
- const showModal = () => {
40
- setVisible(true);
41
- };
42
- const hideModal = () => {
43
- setVisible(false);
44
- };
45
- const _onOk = () => {
46
- if (props.onOk) {
47
- props.onOk();
48
- } else {
49
- hideModal();
50
- }
51
- };
52
- const _onCancel = () => {
53
- if (props.onCancel) {
54
- props.onCancel();
55
- } else {
56
- hideModal();
57
- }
58
- };
59
- return {
60
- showModal,
61
- hideModal,
62
- visible,
63
- content: /* @__PURE__ */ import_react.default.createElement(import_antd5.Modal, { open: visible, onOk: _onOk, onCancel: _onCancel, ...props }, props.children)
64
- };
65
- };
66
- var useModal_default = useModal;
67
- // Annotate the CommonJS export names for ESM import in node:
68
- 0 && (module.exports = {});
File without changes
@@ -1,17 +0,0 @@
1
- import { useModalProps } from '../useModal';
2
- export interface TagDataType<T> {
3
- value: T;
4
- label: string;
5
- }
6
- export interface UseTagModalProps<T> extends Omit<useModalProps, 'children'> {
7
- data: TagDataType<T>[];
8
- value: T[];
9
- onChange?: (value: T[]) => void;
10
- }
11
- declare const useTagModal: <T extends string | number>(props: UseTagModalProps<T>) => {
12
- showModal: () => void;
13
- hideModal: () => void;
14
- visible: boolean;
15
- content: import("react/jsx-runtime").JSX.Element;
16
- };
17
- export default useTagModal;
@@ -1,61 +0,0 @@
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/business-hooks/useTagModal/index.tsx
30
- var useTagModal_exports = {};
31
- __export(useTagModal_exports, {
32
- default: () => useTagModal_default
33
- });
34
- module.exports = __toCommonJS(useTagModal_exports);
35
- var import_antd5 = require("antd5");
36
- var import_react = require("react");
37
- var import_useModal = __toESM(require("../useModal"));
38
- var useTagModal = (props) => {
39
- const { data, onChange, value, ...others } = props;
40
- const Content = (0, import_react.useMemo)(() => {
41
- return /* @__PURE__ */ React.createElement(
42
- import_antd5.Checkbox.Group,
43
- {
44
- style: { width: "100%" },
45
- onChange: (val) => onChange == null ? void 0 : onChange(val),
46
- value
47
- },
48
- /* @__PURE__ */ React.createElement(import_antd5.Row, { gutter: 10 }, data.map((d, i) => {
49
- return /* @__PURE__ */ React.createElement(import_antd5.Col, { span: 8, key: i }, /* @__PURE__ */ React.createElement(import_antd5.Checkbox, { value: d.value }, d.label));
50
- }))
51
- );
52
- }, [data, value]);
53
- const modalResult = (0, import_useModal.default)({
54
- ...others,
55
- children: Content
56
- });
57
- return modalResult;
58
- };
59
- var useTagModal_default = useTagModal;
60
- // Annotate the CommonJS export names for ESM import in node:
61
- 0 && (module.exports = {});
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface ColorPickerProps {
4
- keyName?: string;
5
- /**
6
- * @description 属性描述
7
- * @default "默认值"
8
- */
9
- value: string;
10
- /**
11
- * @description 属性描述
12
- * @default "默认值"
13
- */
14
- onChange: (val: any) => void;
15
- /**
16
- * @description 属性描述
17
- * @default "默认值"
18
- */
19
- children?: React.ReactNode;
20
- }
21
- declare const ColorPicker: React.FC<ColorPickerProps>;
22
- export default ColorPicker;
@@ -1,80 +0,0 @@
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_antd5 = require("antd5");
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_antd5.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 = {});
@@ -1,17 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- declare const DragDrop: ({ onChange, children, list, droppableId, draggableIdKey, droppableClassName, draggableClassName, footer, direction, isDragDisabled, }: any) => import("react/jsx-runtime").JSX.Element;
2
- export default DragDrop;