@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,101 +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/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 = {});
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import './index.less';
3
- declare type EditorPreivewProps = React.HTMLAttributes<any>;
4
- declare const EditorPreivew: React.FC<EditorPreivewProps>;
5
- export default EditorPreivew;
@@ -1,37 +0,0 @@
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/components/EditorPreview/index.tsx
20
- var EditorPreview_exports = {};
21
- __export(EditorPreview_exports, {
22
- default: () => EditorPreview_default
23
- });
24
- module.exports = __toCommonJS(EditorPreview_exports);
25
- var import_index = require("./index.less");
26
- var EditorPreivew = (props) => {
27
- return /* @__PURE__ */ React.createElement(
28
- "div",
29
- {
30
- ...props,
31
- className: `pisell-editor-tiny-css ${props.className}`
32
- }
33
- );
34
- };
35
- var EditorPreview_default = EditorPreivew;
36
- // Annotate the CommonJS export names for ESM import in node:
37
- 0 && (module.exports = {});
@@ -1,81 +0,0 @@
1
- .pisell-editor-tiny-css {
2
- // white-space: pre-wrap;
3
- word-break: break-word;
4
-
5
- img {
6
- vertical-align: baseline;
7
- object-fit: contain;
8
- max-width: 100%;
9
- height: auto;
10
- }
11
-
12
- div {
13
- white-space: normal;
14
- }
15
-
16
- p {
17
- color: #000;
18
- font-size: 16px;
19
- margin-bottom: 1em;
20
- }
21
-
22
- table {
23
- border-collapse: collapse;
24
- }
25
-
26
- table:not([cellpadding]) td,
27
- table:not([cellpadding]) th {
28
- padding: 0.4rem;
29
- }
30
-
31
- table[border]:not([border='0']):not([style*='border-width']) td,
32
- table[border]:not([border='0']):not([style*='border-width']) th {
33
- border-width: 1px;
34
- }
35
-
36
- table[border]:not([border='0']):not([style*='border-style']) td,
37
- table[border]:not([border='0']):not([style*='border-style']) th {
38
- border-style: solid;
39
- }
40
-
41
- table[border]:not([border='0']):not([style*='border-color']) td,
42
- table[border]:not([border='0']):not([style*='border-color']) th {
43
- border-color: #ccc;
44
- }
45
-
46
- figure {
47
- display: table;
48
- margin: 1rem auto;
49
- }
50
-
51
- figure figcaption {
52
- color: #999;
53
- display: block;
54
- margin-top: 0.25rem;
55
- text-align: center;
56
- }
57
-
58
- hr {
59
- border-color: #ccc;
60
- border-style: solid;
61
- border-width: 1px 0 0;
62
- }
63
-
64
- code {
65
- background-color: #e8e8e8;
66
- border-radius: 3px;
67
- padding: 0.1rem 0.2rem;
68
- }
69
-
70
- blockquote {
71
- border-left: 2px solid #ccc;
72
- margin-left: 1.5rem;
73
- padding-left: 1rem;
74
- }
75
-
76
- // blockquote {
77
- // border-right: 2px solid #ccc;
78
- // margin-right: 1.5rem;
79
- // padding-right: 1rem
80
- // }
81
- }
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface IconFontProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
3
- type: string;
4
- }
5
- declare const IconFont: React.FC<IconFontProps>;
6
- export default IconFont;
@@ -1,48 +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/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 _a, _b;
39
- var MyIcon = (0, import_icons.createFromIconfontCN)({
40
- scriptUrl: ((_b = (_a = (0, import_config.getConfig)()) == null ? void 0 : _a.ENV) == null ? void 0 : _b.static) + "/static/fonts/iconfont/iconfont.js?q=" + new Date().getTime()
41
- // 在 iconfont.cn 上生成
42
- });
43
- var IconFont = (props) => {
44
- return /* @__PURE__ */ import_react.default.createElement(MyIcon, { ...props, className: props.className });
45
- };
46
- var Iconfont_default = IconFont;
47
- // Annotate the CommonJS export names for ESM import in node:
48
- 0 && (module.exports = {});
File without changes
@@ -1,3 +0,0 @@
1
- /// <reference types="react" />
2
- declare const _default: import("react").ForwardRefExoticComponent<import("react").RefAttributes<unknown>>;
3
- export default _default;
@@ -1,86 +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/agreement/Detail/index.tsx
30
- var Detail_exports = {};
31
- __export(Detail_exports, {
32
- default: () => Detail_default
33
- });
34
- module.exports = __toCommonJS(Detail_exports);
35
- var import_ahooks = require("ahooks");
36
- var import_antd5 = require("antd5");
37
- var import_react = require("react");
38
- var import_business_hooks = require("../../../business-hooks");
39
- var import_EditorPreview = __toESM(require("../../EditorPreview"));
40
- var import_serve = require("./serve");
41
- var AgreementDetail = ({}, ref) => {
42
- const [data, setData] = (0, import_react.useState)({});
43
- const [current, setCurrent] = (0, import_react.useState)(null);
44
- const _getPolicyDetail = (0, import_ahooks.useRequest)(import_serve.getPolicyDetail, {
45
- manual: true,
46
- formatResult: (res) => res.data,
47
- onSuccess: (res) => {
48
- setData({
49
- ...data,
50
- [res.id]: res
51
- });
52
- }
53
- });
54
- const detail = (0, import_react.useMemo)(() => {
55
- if (current) {
56
- return data[current] || {};
57
- }
58
- return {};
59
- }, [data, current]);
60
- const { showModal, content } = (0, import_business_hooks.useModal)({
61
- title: detail.title,
62
- children: /* @__PURE__ */ React.createElement(import_antd5.Spin, { spinning: _getPolicyDetail.loading }, /* @__PURE__ */ React.createElement("div", { style: { minHeight: 400 } }, /* @__PURE__ */ React.createElement(
63
- import_EditorPreview.default,
64
- {
65
- dangerouslySetInnerHTML: {
66
- __html: detail.content
67
- }
68
- }
69
- )))
70
- });
71
- (0, import_react.useImperativeHandle)(ref, () => {
72
- return {
73
- open: (item) => {
74
- setCurrent(item.id);
75
- if (!data[item.id]) {
76
- _getPolicyDetail.run(item.id);
77
- }
78
- showModal();
79
- }
80
- };
81
- });
82
- return content;
83
- };
84
- var Detail_default = (0, import_react.forwardRef)(AgreementDetail);
85
- // Annotate the CommonJS export names for ESM import in node:
86
- 0 && (module.exports = {});
@@ -1 +0,0 @@
1
- export declare const getPolicyDetail: (id: string) => Promise<any>;
@@ -1,30 +0,0 @@
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/components/agreement/Detail/serve.ts
20
- var serve_exports = {};
21
- __export(serve_exports, {
22
- getPolicyDetail: () => getPolicyDetail
23
- });
24
- module.exports = __toCommonJS(serve_exports);
25
- var import_request = require("../../../config/request");
26
- var getPolicyDetail = (id) => (0, import_request.get)(`/shop/policy/` + id);
27
- // Annotate the CommonJS export names for ESM import in node:
28
- 0 && (module.exports = {
29
- getPolicyDetail
30
- });
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface AgreementProps {
4
- value?: 1 | 0;
5
- onChange?: (data: 1 | 0) => void;
6
- className?: string;
7
- style?: React.CSSProperties;
8
- agreements?: any[];
9
- }
10
- declare const Agreement: React.FC<AgreementProps>;
11
- export default Agreement;
@@ -1,82 +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/agreement/index.tsx
30
- var agreement_exports = {};
31
- __export(agreement_exports, {
32
- default: () => agreement_default
33
- });
34
- module.exports = __toCommonJS(agreement_exports);
35
- var import_antd5 = require("antd5");
36
- var import_classnames = __toESM(require("classnames"));
37
- var import_react = __toESM(require("react"));
38
- var import_Detail = __toESM(require("./Detail"));
39
- var import_index = require("./index.less");
40
- var Agreement = ({
41
- className,
42
- style,
43
- value,
44
- onChange,
45
- agreements
46
- }) => {
47
- const detailRef = (0, import_react.useRef)();
48
- const onRead = (item) => {
49
- detailRef.current.open(item);
50
- };
51
- const _agreements = (0, import_react.useMemo)(() => {
52
- return agreements == null ? void 0 : agreements.map((item) => {
53
- return /* @__PURE__ */ import_react.default.createElement(
54
- "a",
55
- {
56
- className: "pisell-agreement",
57
- key: item.id,
58
- onClick: (e) => {
59
- e.preventDefault();
60
- e.stopPropagation();
61
- onRead(item);
62
- }
63
- },
64
- item.title
65
- );
66
- });
67
- }, [agreements]);
68
- return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)("pisell-agreements", className), style }, /* @__PURE__ */ import_react.default.createElement(
69
- import_antd5.Checkbox,
70
- {
71
- value,
72
- onChange: (e) => {
73
- onChange && onChange(e.target.value);
74
- }
75
- },
76
- "您已阅读并同意 ",
77
- _agreements
78
- ), /* @__PURE__ */ import_react.default.createElement(import_Detail.default, { ref: detailRef }));
79
- };
80
- var agreement_default = Agreement;
81
- // Annotate the CommonJS export names for ESM import in node:
82
- 0 && (module.exports = {});
@@ -1,20 +0,0 @@
1
- //.pisell-agreements {
2
- //}
3
-
4
- .pisell-agreement {
5
- margin-right: 8px;
6
-
7
- &::after {
8
- content: ',';
9
- color: #000;
10
- }
11
-
12
- &:last-child {
13
- margin-right: 0;
14
-
15
- &::after {
16
- content: '.';
17
- color: #000;
18
- }
19
- }
20
- }
@@ -1,13 +0,0 @@
1
- import type { AvatarProps as AntAvatarProps } from 'antd5';
2
- import React from 'react';
3
- /**
4
- * 后续可添加属性
5
- */
6
- export declare type AvatarProps = AntAvatarProps;
7
- /**
8
- * 头像
9
- * @param props
10
- * @constructor
11
- */
12
- declare const Avatar: React.FC<AvatarProps>;
13
- export default Avatar;
@@ -1,36 +0,0 @@
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/components/button/index.tsx
20
- var button_exports = {};
21
- __export(button_exports, {
22
- default: () => button_default
23
- });
24
- module.exports = __toCommonJS(button_exports);
25
- var import_antd5 = require("antd5");
26
- var { Group: AntGroup } = import_antd5.Button;
27
- var Button = (props) => {
28
- return /* @__PURE__ */ React.createElement(import_antd5.Button, { ...props });
29
- };
30
- var Group = (props) => {
31
- return /* @__PURE__ */ React.createElement(AntGroup, { ...props });
32
- };
33
- Button.Group = Group;
34
- var button_default = Button;
35
- // Annotate the CommonJS export names for ESM import in node:
36
- 0 && (module.exports = {});
@@ -1,5 +0,0 @@
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;
@@ -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/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 = {});
@@ -1,9 +0,0 @@
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
- }
@@ -1,20 +0,0 @@
1
- import type { CheckboxGroupProps as AntCheckboxGroupProps } from 'antd/es/checkbox';
2
- import type { CheckboxProps as AntCheckboxProps } from 'antd5';
3
- /**
4
- * 后续可添加属性
5
- */
6
- /**
7
- * 后续可添加属性
8
- */
9
- export declare type CheckboxProps = AntCheckboxProps;
10
- export declare type CheckboxGroupProps = AntCheckboxGroupProps;
11
- /**
12
- * 多选框
13
- * @param props
14
- * @constructor
15
- */
16
- declare const Checkbox: {
17
- (props: CheckboxProps): import("react/jsx-runtime").JSX.Element;
18
- Group: (props: AntCheckboxGroupProps) => import("react/jsx-runtime").JSX.Element;
19
- };
20
- export default Checkbox;