@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.
- package/.fatherrc.ts +7 -0
- package/CHANGELOG.md +7 -0
- package/README.md +1 -38
- package/{lib/components → es}/button/index.d.ts +5 -4
- package/es/button/index.d.ts.map +1 -0
- package/es/button/index.js +33 -0
- package/{es/components → lib}/button/index.d.ts +5 -4
- package/lib/button/index.d.ts.map +1 -0
- package/lib/{components/avatar → button}/index.js +14 -11
- package/package.json +20 -77
- package/src/button/index.md +17 -0
- package/src/button/index.tsx +38 -0
- package/tsconfig.json +14 -0
- package/LICENSE +0 -21
- package/es/bin/pisell.js +0 -2
- package/es/business-components/colorInput/index.d.ts +0 -21
- package/es/business-components/colorInput/index.js +0 -43
- package/es/business-components/colorInput/index.less +0 -10
- package/es/business-components/index.d.ts +0 -11
- package/es/business-components/index.js +0 -7
- package/es/business-components/rechargeOption/index.d.ts +0 -36
- package/es/business-components/rechargeOption/index.js +0 -132
- package/es/business-components/rechargeOption/index.less +0 -0
- package/es/business-components/selectTag/index.d.ts +0 -25
- package/es/business-components/selectTag/index.js +0 -179
- package/es/business-components/selectTag/index.less +0 -22
- package/es/business-components/sortModal/index.d.ts +0 -30
- package/es/business-components/sortModal/index.js +0 -85
- package/es/business-components/sortModal/index.less +0 -29
- package/es/business-components/statistics/index.d.ts +0 -12
- package/es/business-components/statistics/index.js +0 -38
- package/es/business-components/statistics/index.less +0 -64
- package/es/business-components/tagModal/index.d.ts +0 -17
- package/es/business-components/tagModal/index.js +0 -58
- package/es/business-hooks/index.d.ts +0 -2
- package/es/business-hooks/index.js +0 -2
- package/es/business-hooks/useModal/index.d.ts +0 -31
- package/es/business-hooks/useModal/index.js +0 -91
- package/es/business-hooks/useModal/index.less +0 -0
- package/es/business-hooks/useTagModal/index.d.ts +0 -17
- package/es/business-hooks/useTagModal/index.js +0 -47
- package/es/components/ColorPicker/index.d.ts +0 -22
- package/es/components/ColorPicker/index.js +0 -51
- package/es/components/ColorPicker/index.less +0 -17
- package/es/components/DragSort/index.d.ts +0 -2
- package/es/components/DragSort/index.js +0 -68
- package/es/components/EditorPreview/index.d.ts +0 -5
- package/es/components/EditorPreview/index.js +0 -14
- package/es/components/EditorPreview/index.less +0 -81
- package/es/components/Iconfont/index.d.ts +0 -6
- package/es/components/Iconfont/index.js +0 -29
- package/es/components/Iconfont/index.less +0 -0
- package/es/components/agreement/Detail/index.d.ts +0 -3
- package/es/components/agreement/Detail/index.js +0 -77
- package/es/components/agreement/Detail/serve.d.ts +0 -1
- package/es/components/agreement/Detail/serve.js +0 -6
- package/es/components/agreement/index.d.ts +0 -11
- package/es/components/agreement/index.js +0 -45
- package/es/components/agreement/index.less +0 -20
- package/es/components/avatar/index.d.ts +0 -13
- package/es/components/avatar/index.js +0 -25
- package/es/components/button/index.js +0 -36
- package/es/components/card/index.d.ts +0 -5
- package/es/components/card/index.js +0 -16
- package/es/components/card/index.less +0 -9
- package/es/components/checkbox/index.d.ts +0 -20
- package/es/components/checkbox/index.js +0 -43
- package/es/components/configProvider/index.d.ts +0 -113
- package/es/components/configProvider/index.js +0 -114
- package/es/components/datePicker/index.d.ts +0 -9
- package/es/components/datePicker/index.js +0 -17
- package/es/components/index.d.ts +0 -30
- package/es/components/index.js +0 -16
- package/es/components/input/index.d.ts +0 -35
- package/es/components/input/index.js +0 -97
- package/es/components/inputNumber/index.d.ts +0 -9
- package/es/components/inputNumber/index.js +0 -17
- package/es/components/pagination/index.d.ts +0 -10
- package/es/components/pagination/index.js +0 -18
- package/es/components/radio/index.d.ts +0 -13
- package/es/components/radio/index.js +0 -28
- package/es/components/select/index.d.ts +0 -9
- package/es/components/select/index.js +0 -17
- package/es/components/switch/index.d.ts +0 -10
- package/es/components/switch/index.js +0 -18
- package/es/config/index.d.ts +0 -30
- package/es/config/index.js +0 -18
- package/es/config/request.d.ts +0 -7
- package/es/config/request.js +0 -67
- package/es/config/utils.d.ts +0 -0
- package/es/config/utils.js +0 -0
- package/es/hooks/index.d.ts +0 -8
- package/es/hooks/index.js +0 -8
- package/es/hooks/useCountDown/index.d.ts +0 -10
- package/es/hooks/useCountDown/index.js +0 -48
- package/es/hooks/useDocumentScroll/index.d.ts +0 -8
- package/es/hooks/useDocumentScroll/index.js +0 -41
- package/es/hooks/useDocumentScroll/index.less +0 -0
- package/es/hooks/useMousemove/index.d.ts +0 -8
- package/es/hooks/useMousemove/index.js +0 -61
- package/es/hooks/useResponsive/index.d.ts +0 -2
- package/es/hooks/useResponsive/index.js +0 -29
- package/es/hooks/useResponsive/index.less +0 -0
- package/es/hooks/useSize/index.d.ts +0 -2
- package/es/hooks/useSize/index.js +0 -27
- package/es/hooks/useSize/index.less +0 -0
- package/es/hooks/useStateMulti/index.d.ts +0 -2
- package/es/hooks/useStateMulti/index.js +0 -29
- package/es/hooks/useStateWithCb/index.d.ts +0 -2
- package/es/hooks/useStateWithCb/index.js +0 -42
- package/es/hooks/useTable/index.d.ts +0 -12
- package/es/hooks/useTable/index.js +0 -74
- package/es/hooks/useTable/index.less +0 -0
- package/es/hooks/useTableModal/index.d.ts +0 -12
- package/es/hooks/useTableModal/index.js +0 -25
- package/es/hooks/useTableModal/index.less +0 -0
- package/es/hooks/useUrlState/index.d.ts +0 -2
- package/es/hooks/useUrlState/index.js +0 -56
- package/es/hooks/useWebSocket/index.d.ts +0 -13
- package/es/hooks/useWebSocket/index.js +0 -121
- package/es/index.d.ts +0 -4
- package/es/index.js +0 -4
- package/es/locales/en-US.d.ts +0 -11
- package/es/locales/en-US.js +0 -10
- package/es/locales/index.d.ts +0 -1
- package/es/locales/index.js +0 -23
- package/es/locales/zh-CN.d.ts +0 -11
- package/es/locales/zh-CN.js +0 -10
- package/es/locales/zh-TW.d.ts +0 -11
- package/es/locales/zh-TW.js +0 -10
- package/es/script/constants/index.js +0 -8
- package/es/script/deploy.js +0 -47
- package/es/script/index.js +0 -40
- package/es/script/package.json +0 -4
- package/es/script/release/index.js +0 -161
- package/es/script/release/release.js +0 -163
- package/es/script/uploadCode/index.js +0 -278
- package/es/script/uploadCode/uploadCode.js +0 -401
- package/es/script/utils/index.js +0 -321
- package/es/utils/index.d.ts +0 -3
- package/es/utils/index.js +0 -3
- package/es/utils/otherUtils.d.ts +0 -8
- package/es/utils/otherUtils.js +0 -12
- package/es/utils/storage.d.ts +0 -30
- package/es/utils/storage.js +0 -70
- package/es/utils/typeUtils.d.ts +0 -42
- package/es/utils/typeUtils.js +0 -86
- package/lib/bin/pisell.js +0 -26
- package/lib/business-components/colorInput/index.d.ts +0 -21
- package/lib/business-components/colorInput/index.js +0 -70
- package/lib/business-components/colorInput/index.less +0 -10
- package/lib/business-components/index.d.ts +0 -11
- package/lib/business-components/index.js +0 -54
- package/lib/business-components/rechargeOption/index.d.ts +0 -36
- package/lib/business-components/rechargeOption/index.js +0 -112
- package/lib/business-components/rechargeOption/index.less +0 -0
- package/lib/business-components/selectTag/index.d.ts +0 -25
- package/lib/business-components/selectTag/index.js +0 -181
- package/lib/business-components/selectTag/index.less +0 -22
- package/lib/business-components/sortModal/index.d.ts +0 -30
- package/lib/business-components/sortModal/index.js +0 -100
- package/lib/business-components/sortModal/index.less +0 -29
- package/lib/business-components/statistics/index.d.ts +0 -12
- package/lib/business-components/statistics/index.js +0 -63
- package/lib/business-components/statistics/index.less +0 -64
- package/lib/business-components/tagModal/index.d.ts +0 -17
- package/lib/business-components/tagModal/index.js +0 -66
- package/lib/business-hooks/index.d.ts +0 -2
- package/lib/business-hooks/index.js +0 -42
- package/lib/business-hooks/useModal/index.d.ts +0 -31
- package/lib/business-hooks/useModal/index.js +0 -68
- package/lib/business-hooks/useModal/index.less +0 -0
- package/lib/business-hooks/useTagModal/index.d.ts +0 -17
- package/lib/business-hooks/useTagModal/index.js +0 -61
- package/lib/components/ColorPicker/index.d.ts +0 -22
- package/lib/components/ColorPicker/index.js +0 -80
- package/lib/components/ColorPicker/index.less +0 -17
- package/lib/components/DragSort/index.d.ts +0 -2
- package/lib/components/DragSort/index.js +0 -101
- package/lib/components/EditorPreview/index.d.ts +0 -5
- package/lib/components/EditorPreview/index.js +0 -37
- package/lib/components/EditorPreview/index.less +0 -81
- package/lib/components/Iconfont/index.d.ts +0 -6
- package/lib/components/Iconfont/index.js +0 -48
- package/lib/components/Iconfont/index.less +0 -0
- package/lib/components/agreement/Detail/index.d.ts +0 -3
- package/lib/components/agreement/Detail/index.js +0 -86
- package/lib/components/agreement/Detail/serve.d.ts +0 -1
- package/lib/components/agreement/Detail/serve.js +0 -30
- package/lib/components/agreement/index.d.ts +0 -11
- package/lib/components/agreement/index.js +0 -82
- package/lib/components/agreement/index.less +0 -20
- package/lib/components/avatar/index.d.ts +0 -13
- package/lib/components/button/index.js +0 -36
- package/lib/components/card/index.d.ts +0 -5
- package/lib/components/card/index.js +0 -42
- package/lib/components/card/index.less +0 -9
- package/lib/components/checkbox/index.d.ts +0 -20
- package/lib/components/checkbox/index.js +0 -36
- package/lib/components/configProvider/index.d.ts +0 -113
- package/lib/components/configProvider/index.js +0 -159
- package/lib/components/datePicker/index.d.ts +0 -9
- package/lib/components/datePicker/index.js +0 -31
- package/lib/components/index.d.ts +0 -30
- package/lib/components/index.js +0 -83
- package/lib/components/input/index.d.ts +0 -35
- package/lib/components/input/index.js +0 -53
- package/lib/components/inputNumber/index.d.ts +0 -9
- package/lib/components/inputNumber/index.js +0 -31
- package/lib/components/pagination/index.d.ts +0 -10
- package/lib/components/pagination/index.js +0 -42
- package/lib/components/radio/index.d.ts +0 -13
- package/lib/components/radio/index.js +0 -36
- package/lib/components/select/index.d.ts +0 -9
- package/lib/components/select/index.js +0 -36
- package/lib/components/switch/index.d.ts +0 -10
- package/lib/components/switch/index.js +0 -42
- package/lib/config/index.d.ts +0 -30
- package/lib/config/index.js +0 -39
- package/lib/config/request.d.ts +0 -7
- package/lib/config/request.js +0 -76
- package/lib/config/utils.d.ts +0 -0
- package/lib/config/utils.js +0 -0
- package/lib/hooks/index.d.ts +0 -8
- package/lib/hooks/index.js +0 -57
- package/lib/hooks/useCountDown/index.d.ts +0 -10
- package/lib/hooks/useCountDown/index.js +0 -57
- package/lib/hooks/useDocumentScroll/index.d.ts +0 -8
- package/lib/hooks/useDocumentScroll/index.js +0 -54
- package/lib/hooks/useDocumentScroll/index.less +0 -0
- package/lib/hooks/useMousemove/index.d.ts +0 -8
- package/lib/hooks/useMousemove/index.js +0 -70
- package/lib/hooks/useResponsive/index.d.ts +0 -2
- package/lib/hooks/useResponsive/index.js +0 -47
- package/lib/hooks/useResponsive/index.less +0 -0
- package/lib/hooks/useSize/index.d.ts +0 -2
- package/lib/hooks/useSize/index.js +0 -45
- package/lib/hooks/useSize/index.less +0 -0
- package/lib/hooks/useStateMulti/index.d.ts +0 -2
- package/lib/hooks/useStateMulti/index.js +0 -43
- package/lib/hooks/useStateWithCb/index.d.ts +0 -2
- package/lib/hooks/useStateWithCb/index.js +0 -53
- package/lib/hooks/useTable/index.d.ts +0 -12
- package/lib/hooks/useTable/index.js +0 -75
- package/lib/hooks/useTable/index.less +0 -0
- package/lib/hooks/useTableModal/index.d.ts +0 -12
- package/lib/hooks/useTableModal/index.js +0 -43
- package/lib/hooks/useTableModal/index.less +0 -0
- package/lib/hooks/useUrlState/index.d.ts +0 -2
- package/lib/hooks/useUrlState/index.js +0 -59
- package/lib/hooks/useWebSocket/index.d.ts +0 -13
- package/lib/hooks/useWebSocket/index.js +0 -91
- package/lib/index.d.ts +0 -4
- package/lib/index.js +0 -22
- package/lib/locales/en-US.d.ts +0 -11
- package/lib/locales/en-US.js +0 -36
- package/lib/locales/index.d.ts +0 -1
- package/lib/locales/index.js +0 -59
- package/lib/locales/zh-CN.d.ts +0 -11
- package/lib/locales/zh-CN.js +0 -36
- package/lib/locales/zh-TW.d.ts +0 -11
- package/lib/locales/zh-TW.js +0 -36
- package/lib/script/constants/index.js +0 -35
- package/lib/script/deploy.js +0 -61
- package/lib/script/index.js +0 -61
- package/lib/script/package.json +0 -4
- package/lib/script/release/index.js +0 -116
- package/lib/script/release/release.js +0 -89
- package/lib/script/uploadCode/index.js +0 -202
- package/lib/script/uploadCode/uploadCode.js +0 -208
- package/lib/script/utils/index.js +0 -248
- package/lib/utils/index.d.ts +0 -3
- package/lib/utils/index.js +0 -21
- package/lib/utils/otherUtils.d.ts +0 -8
- package/lib/utils/otherUtils.js +0 -31
- package/lib/utils/storage.d.ts +0 -30
- package/lib/utils/storage.js +0 -63
- package/lib/utils/typeUtils.d.ts +0 -42
- package/lib/utils/typeUtils.js +0 -75
|
@@ -1,45 +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/hooks/useSize/index.tsx
|
|
20
|
-
var useSize_exports = {};
|
|
21
|
-
__export(useSize_exports, {
|
|
22
|
-
default: () => useSize_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useSize_exports);
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var import_ahooks = require("ahooks");
|
|
27
|
-
var useSize_default = (dom) => {
|
|
28
|
-
const [size, setSize] = (0, import_react.useState)({ width: 0, height: 0 });
|
|
29
|
-
const _fn = (0, import_react.useCallback)(() => {
|
|
30
|
-
return document.querySelector(dom || "body");
|
|
31
|
-
}, [dom]);
|
|
32
|
-
const _size = (0, import_ahooks.useSize)(_fn);
|
|
33
|
-
(0, import_ahooks.useDebounceEffect)(
|
|
34
|
-
() => {
|
|
35
|
-
setSize(_size);
|
|
36
|
-
},
|
|
37
|
-
[_size],
|
|
38
|
-
{
|
|
39
|
-
wait: 50
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
return size;
|
|
43
|
-
};
|
|
44
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
45
|
-
0 && (module.exports = {});
|
|
File without changes
|
|
@@ -1,43 +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/hooks/useStateMulti/index.ts
|
|
20
|
-
var useStateMulti_exports = {};
|
|
21
|
-
__export(useStateMulti_exports, {
|
|
22
|
-
default: () => useStateMulti_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useStateMulti_exports);
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var import_utils = require("../../utils");
|
|
27
|
-
var useStateMulti = (initState) => {
|
|
28
|
-
const [state, _setState] = (0, import_react.useState)(initState);
|
|
29
|
-
const setState = (0, import_react.useCallback)((updatedValues) => {
|
|
30
|
-
if ((0, import_utils.isPlainObject)(updatedValues)) {
|
|
31
|
-
_setState((prevState) => {
|
|
32
|
-
return {
|
|
33
|
-
...prevState,
|
|
34
|
-
...updatedValues
|
|
35
|
-
};
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
}, []);
|
|
39
|
-
return [state, setState];
|
|
40
|
-
};
|
|
41
|
-
var useStateMulti_default = useStateMulti;
|
|
42
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
-
0 && (module.exports = {});
|
|
@@ -1,53 +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/hooks/useStateWithCb/index.ts
|
|
20
|
-
var useStateWithCb_exports = {};
|
|
21
|
-
__export(useStateWithCb_exports, {
|
|
22
|
-
default: () => useStateWithCb_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useStateWithCb_exports);
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var useStateWithCb = (initialVal) => {
|
|
27
|
-
const [state, _setState] = (0, import_react.useState)(() => initialVal);
|
|
28
|
-
const [random, setRandom] = (0, import_react.useState)(() => Math.random());
|
|
29
|
-
const cbs = (0, import_react.useRef)([]);
|
|
30
|
-
const setState = (0, import_react.useCallback)(
|
|
31
|
-
(newState, cb) => {
|
|
32
|
-
if (cb) {
|
|
33
|
-
cbs.current.push(cb);
|
|
34
|
-
}
|
|
35
|
-
if (Object.is(state, newState)) {
|
|
36
|
-
setRandom(Math.random());
|
|
37
|
-
}
|
|
38
|
-
_setState(newState);
|
|
39
|
-
},
|
|
40
|
-
[state]
|
|
41
|
-
);
|
|
42
|
-
(0, import_react.useEffect)(() => {
|
|
43
|
-
if (cbs.current) {
|
|
44
|
-
let _cbs = cbs.current;
|
|
45
|
-
cbs.current = [];
|
|
46
|
-
_cbs.forEach((_cb) => _cb());
|
|
47
|
-
}
|
|
48
|
-
}, [state, random]);
|
|
49
|
-
return [state, setState];
|
|
50
|
-
};
|
|
51
|
-
var useStateWithCb_default = useStateWithCb;
|
|
52
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
53
|
-
0 && (module.exports = {});
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { BaseOptions, CombineService, PaginatedFormatReturn, PaginatedParams, Result } from 'ahooks/lib/useAntdTable/index';
|
|
2
|
-
/**
|
|
3
|
-
* @Title: 基于ahooks 增加额外参数
|
|
4
|
-
* @Describe:
|
|
5
|
-
* @Author: Wzw
|
|
6
|
-
*/
|
|
7
|
-
interface useTableOptions<T> extends Omit<BaseOptions<T>, 'onSuccess'> {
|
|
8
|
-
isCaChe?: boolean;
|
|
9
|
-
onSuccess?: (data: any, params?: any, urlParams?: any) => void;
|
|
10
|
-
}
|
|
11
|
-
declare const useTable: <R, Item = any, U extends Item = any>(service: CombineService<PaginatedFormatReturn<Item>, PaginatedParams>, options: useTableOptions<U>) => Result<Item>;
|
|
12
|
-
export default useTable;
|
|
@@ -1,75 +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/hooks/useTable/index.tsx
|
|
30
|
-
var useTable_exports = {};
|
|
31
|
-
__export(useTable_exports, {
|
|
32
|
-
default: () => useTable_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(useTable_exports);
|
|
35
|
-
var import_react = require("react");
|
|
36
|
-
var import_ahooks = require("ahooks");
|
|
37
|
-
var import_useUrlState = __toESM(require("../useUrlState"));
|
|
38
|
-
var useTable = (service, options) => {
|
|
39
|
-
const [urlParams, setUrlParams] = (0, import_useUrlState.default)({});
|
|
40
|
-
const table = (0, import_ahooks.useAntdTable)(service, {
|
|
41
|
-
throwOnError: true,
|
|
42
|
-
...options,
|
|
43
|
-
onSuccess: (data, params) => {
|
|
44
|
-
if (options.isCaChe) {
|
|
45
|
-
setParams(params);
|
|
46
|
-
}
|
|
47
|
-
if (typeof options.onSuccess === "function") {
|
|
48
|
-
options.onSuccess(data, params, urlParams);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
const setParams = (params) => {
|
|
53
|
-
let _pagination = params[0];
|
|
54
|
-
let _formData = params[1];
|
|
55
|
-
let _newParams = {
|
|
56
|
-
skip: (_pagination == null ? void 0 : _pagination.current) || 1,
|
|
57
|
-
num: (_pagination == null ? void 0 : _pagination.pageSize) || 10
|
|
58
|
-
};
|
|
59
|
-
for (let item of Object.entries(_formData)) {
|
|
60
|
-
if (item[1] !== void 0) {
|
|
61
|
-
_newParams[item[0]] = item[1];
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
setUrlParams({ ..._newParams });
|
|
65
|
-
};
|
|
66
|
-
(0, import_react.useEffect)(() => {
|
|
67
|
-
return () => {
|
|
68
|
-
table.cancel();
|
|
69
|
-
};
|
|
70
|
-
}, []);
|
|
71
|
-
return table;
|
|
72
|
-
};
|
|
73
|
-
var useTable_default = useTable;
|
|
74
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
75
|
-
0 && (module.exports = {});
|
|
File without changes
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* @Title: 传入参数
|
|
4
|
-
* @Describe: 其余参数与Modal一致
|
|
5
|
-
* @Author: Wzw
|
|
6
|
-
*/
|
|
7
|
-
interface useModalProps {
|
|
8
|
-
children: React.ReactNode;
|
|
9
|
-
title: React.ReactNode;
|
|
10
|
-
}
|
|
11
|
-
declare const useTableModal: (props: Partial<useModalProps>) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default useTableModal;
|
|
@@ -1,43 +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/hooks/useTableModal/index.tsx
|
|
30
|
-
var useTableModal_exports = {};
|
|
31
|
-
__export(useTableModal_exports, {
|
|
32
|
-
default: () => useTableModal_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(useTableModal_exports);
|
|
35
|
-
var import_react = __toESM(require("react"));
|
|
36
|
-
var import_useModal = __toESM(require("../../business-hooks/useModal"));
|
|
37
|
-
var useTableModal = (props) => {
|
|
38
|
-
const { content } = (0, import_useModal.default)({});
|
|
39
|
-
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, content);
|
|
40
|
-
};
|
|
41
|
-
var useTableModal_default = useTableModal;
|
|
42
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
-
0 && (module.exports = {});
|
|
File without changes
|
|
@@ -1,59 +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/hooks/useUrlState/index.ts
|
|
20
|
-
var useUrlState_exports = {};
|
|
21
|
-
__export(useUrlState_exports, {
|
|
22
|
-
default: () => useUrlState_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useUrlState_exports);
|
|
25
|
-
var import_umi = require("umi");
|
|
26
|
-
var import_react = require("react");
|
|
27
|
-
var import_ahooks = require("ahooks");
|
|
28
|
-
var useUrlState = (defaultState) => {
|
|
29
|
-
const mergeQueryAndDefault = (0, import_ahooks.usePersistFn)((query) => {
|
|
30
|
-
const tempState = {};
|
|
31
|
-
Object.keys(defaultState).forEach((k) => {
|
|
32
|
-
if (k in query) {
|
|
33
|
-
tempState[k] = query[k];
|
|
34
|
-
} else {
|
|
35
|
-
tempState[k] = defaultState[k];
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
return tempState;
|
|
39
|
-
});
|
|
40
|
-
const [state, setState] = (0, import_react.useState)(() => {
|
|
41
|
-
return mergeQueryAndDefault(import_umi.history.location.query);
|
|
42
|
-
});
|
|
43
|
-
(0, import_react.useEffect)(() => {
|
|
44
|
-
return import_umi.history.listen((location) => {
|
|
45
|
-
setState(mergeQueryAndDefault(location.query));
|
|
46
|
-
});
|
|
47
|
-
}, [mergeQueryAndDefault]);
|
|
48
|
-
const setUrlState = (0, import_react.useCallback)((states) => {
|
|
49
|
-
import_umi.history.replace({
|
|
50
|
-
query: {
|
|
51
|
-
...states
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
}, []);
|
|
55
|
-
return [state, setUrlState];
|
|
56
|
-
};
|
|
57
|
-
var useUrlState_default = useUrlState;
|
|
58
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
59
|
-
0 && (module.exports = {});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @Description: WebSocket hooks
|
|
3
|
-
* @Author: wzw
|
|
4
|
-
* @Date: 2020-11-26 14:00:23
|
|
5
|
-
* @param {*}
|
|
6
|
-
* @return {*}
|
|
7
|
-
*/
|
|
8
|
-
declare const useWebSocket: ({ onopen, onerror, onmessage, onclose }: any) => {
|
|
9
|
-
createWebSocket: () => void;
|
|
10
|
-
closeWebSocket: () => void;
|
|
11
|
-
websocket: any;
|
|
12
|
-
};
|
|
13
|
-
export default useWebSocket;
|
|
@@ -1,91 +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/hooks/useWebSocket/index.tsx
|
|
20
|
-
var useWebSocket_exports = {};
|
|
21
|
-
__export(useWebSocket_exports, {
|
|
22
|
-
default: () => useWebSocket_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(useWebSocket_exports);
|
|
25
|
-
var import_react = require("react");
|
|
26
|
-
var import_config = require("../../config");
|
|
27
|
-
var useWebSocket = ({ onopen, onerror, onmessage, onclose }) => {
|
|
28
|
-
let websocket = (0, import_react.useRef)();
|
|
29
|
-
const time = (0, import_react.useRef)();
|
|
30
|
-
const [reconnectNum, setReconnectNum] = (0, import_react.useState)(3);
|
|
31
|
-
const createWebSocket = () => {
|
|
32
|
-
websocket.current = new WebSocket((0, import_config.getConfig)().ENV.socket);
|
|
33
|
-
websocket.current.onopen = (e) => {
|
|
34
|
-
console.log("open");
|
|
35
|
-
if (typeof onopen === "function") {
|
|
36
|
-
onopen(e);
|
|
37
|
-
}
|
|
38
|
-
socketTimeOut();
|
|
39
|
-
};
|
|
40
|
-
websocket.current.onerror = (e) => {
|
|
41
|
-
console.log("error");
|
|
42
|
-
reconnect();
|
|
43
|
-
if (typeof onerror === "function") {
|
|
44
|
-
onerror(e);
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
websocket.current.onmessage = (e) => {
|
|
48
|
-
console.log("message", e);
|
|
49
|
-
if (typeof onmessage === "function") {
|
|
50
|
-
onmessage(e);
|
|
51
|
-
}
|
|
52
|
-
};
|
|
53
|
-
websocket.current.onclose = (e) => {
|
|
54
|
-
console.log("close");
|
|
55
|
-
if (typeof onclose === "function") {
|
|
56
|
-
onclose(e);
|
|
57
|
-
}
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
const reconnect = () => {
|
|
61
|
-
if (reconnectNum === 0) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
setReconnectNum(reconnectNum - 1);
|
|
65
|
-
createWebSocket();
|
|
66
|
-
};
|
|
67
|
-
const socketTimeOut = () => {
|
|
68
|
-
clearTimeout(time.current);
|
|
69
|
-
if (websocket.current && websocket.current.readyState === 1) {
|
|
70
|
-
time.current = setTimeout(() => {
|
|
71
|
-
console.log("ping");
|
|
72
|
-
websocket.current.send(JSON.stringify({ type: "ping" }));
|
|
73
|
-
socketTimeOut();
|
|
74
|
-
}, 3e4);
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
const closeWebSocket = () => {
|
|
78
|
-
_reset();
|
|
79
|
-
};
|
|
80
|
-
const _reset = () => {
|
|
81
|
-
if (websocket.current) {
|
|
82
|
-
websocket.current.close();
|
|
83
|
-
}
|
|
84
|
-
setReconnectNum(3);
|
|
85
|
-
clearTimeout(time.current);
|
|
86
|
-
};
|
|
87
|
-
return { createWebSocket, closeWebSocket, websocket: websocket.current };
|
|
88
|
-
};
|
|
89
|
-
var useWebSocket_default = useWebSocket;
|
|
90
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
91
|
-
0 && (module.exports = {});
|
package/lib/index.d.ts
DELETED
package/lib/index.js
DELETED
|
@@ -1,22 +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 __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
-
for (let key of __getOwnPropNames(from))
|
|
8
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
9
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
}
|
|
11
|
-
return to;
|
|
12
|
-
};
|
|
13
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
14
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
-
|
|
16
|
-
// src/index.ts
|
|
17
|
-
var src_exports = {};
|
|
18
|
-
module.exports = __toCommonJS(src_exports);
|
|
19
|
-
__reExport(src_exports, require("./business-components"), module.exports);
|
|
20
|
-
__reExport(src_exports, require("./business-hooks"), module.exports);
|
|
21
|
-
__reExport(src_exports, require("./components"), module.exports);
|
|
22
|
-
__reExport(src_exports, require("./hooks"), module.exports);
|
package/lib/locales/en-US.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
'pisell-design.multi-select.apply': string;
|
|
3
|
-
'pisell-design.multi-select.apply.no-data': string;
|
|
4
|
-
'pisell-design.paginator.previous': string;
|
|
5
|
-
'pisell-design.paginator.next': string;
|
|
6
|
-
'pisell-design.search.search': string;
|
|
7
|
-
'pisell-design.recharge.option.button.edit': string;
|
|
8
|
-
'pisell-design.recharge.option.button.add': string;
|
|
9
|
-
'pisell-design.select.tag.modal.title': string;
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
package/lib/locales/en-US.js
DELETED
|
@@ -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/locales/en-US.ts
|
|
20
|
-
var en_US_exports = {};
|
|
21
|
-
__export(en_US_exports, {
|
|
22
|
-
default: () => en_US_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(en_US_exports);
|
|
25
|
-
var en_US_default = {
|
|
26
|
-
"pisell-design.multi-select.apply": "Apply",
|
|
27
|
-
"pisell-design.multi-select.apply.no-data": "Sorry, no products matched your selection",
|
|
28
|
-
"pisell-design.paginator.previous": "Previous",
|
|
29
|
-
"pisell-design.paginator.next": "Next",
|
|
30
|
-
"pisell-design.search.search": "Search",
|
|
31
|
-
"pisell-design.recharge.option.button.edit": "Edit",
|
|
32
|
-
"pisell-design.recharge.option.button.add": "Add recharge item",
|
|
33
|
-
"pisell-design.select.tag.modal.title": "Select tag"
|
|
34
|
-
};
|
|
35
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
-
0 && (module.exports = {});
|
package/lib/locales/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const getText: (id: string) => any;
|
package/lib/locales/index.js
DELETED
|
@@ -1,59 +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/locales/index.ts
|
|
30
|
-
var locales_exports = {};
|
|
31
|
-
__export(locales_exports, {
|
|
32
|
-
getText: () => getText
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(locales_exports);
|
|
35
|
-
var import_zh_CN = __toESM(require("../locales/zh-CN"));
|
|
36
|
-
var import_zh_TW = __toESM(require("../locales/zh-TW"));
|
|
37
|
-
var import_en_US = __toESM(require("../locales/en-US"));
|
|
38
|
-
var import_storage = require("../utils/storage");
|
|
39
|
-
var langMap = {
|
|
40
|
-
"zh-CN": import_zh_CN.default,
|
|
41
|
-
"en-US": import_en_US.default,
|
|
42
|
-
"zh-TW": import_zh_TW.default
|
|
43
|
-
};
|
|
44
|
-
var getText = (id) => {
|
|
45
|
-
if (!id) {
|
|
46
|
-
return "";
|
|
47
|
-
}
|
|
48
|
-
let locale = "en-US";
|
|
49
|
-
let oldLocale = (0, import_storage.getStorage)("umi_locale");
|
|
50
|
-
if (oldLocale) {
|
|
51
|
-
locale = oldLocale;
|
|
52
|
-
}
|
|
53
|
-
console.log("locale", (0, import_storage.getStorage)("umi_locale"));
|
|
54
|
-
return langMap[locale] ? langMap[locale][id] || id : id;
|
|
55
|
-
};
|
|
56
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
-
0 && (module.exports = {
|
|
58
|
-
getText
|
|
59
|
-
});
|
package/lib/locales/zh-CN.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
'pisell-design.multi-select.apply': string;
|
|
3
|
-
'pisell-design.multi-select.apply.no-data': string;
|
|
4
|
-
'pisell-design.paginator.previous': string;
|
|
5
|
-
'pisell-design.paginator.next': string;
|
|
6
|
-
'pisell-design.search.search': string;
|
|
7
|
-
'pisell-design.recharge.option.button.edit': string;
|
|
8
|
-
'pisell-design.recharge.option.button.add': string;
|
|
9
|
-
'pisell-design.select.tag.modal.title': string;
|
|
10
|
-
};
|
|
11
|
-
export default _default;
|
package/lib/locales/zh-CN.js
DELETED
|
@@ -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/locales/zh-CN.ts
|
|
20
|
-
var zh_CN_exports = {};
|
|
21
|
-
__export(zh_CN_exports, {
|
|
22
|
-
default: () => zh_CN_default
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(zh_CN_exports);
|
|
25
|
-
var zh_CN_default = {
|
|
26
|
-
"pisell-design.multi-select.apply": "应用",
|
|
27
|
-
"pisell-design.multi-select.apply.no-data": "对不起,没有符合您选择的产品",
|
|
28
|
-
"pisell-design.paginator.previous": "上一页",
|
|
29
|
-
"pisell-design.paginator.next": "下一页",
|
|
30
|
-
"pisell-design.search.search": "搜索",
|
|
31
|
-
"pisell-design.recharge.option.button.edit": "编辑",
|
|
32
|
-
"pisell-design.recharge.option.button.add": "添加充值项",
|
|
33
|
-
"pisell-design.select.tag.modal.title": "选择标签"
|
|
34
|
-
};
|
|
35
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
-
0 && (module.exports = {});
|