@pisell/materials 1.0.407 → 1.0.409
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/build/lowcode/assets-daily.json +13 -13
- package/build/lowcode/assets-dev.json +4 -4
- package/build/lowcode/assets-prod.json +13 -13
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +59 -16
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +62 -19
- package/es/components/browserSelect/chevron-down.png +0 -0
- package/es/components/browserSelect/index.d.ts +15 -0
- package/es/components/browserSelect/index.js +36 -0
- package/es/components/browserSelect/index.less +18 -0
- package/es/components/date-picker/constants.d.ts +39 -0
- package/es/components/date-picker/constants.js +76 -0
- package/es/components/date-picker/datePickerCpt.d.ts +8 -0
- package/es/components/date-picker/datePickerCpt.js +370 -0
- package/es/components/date-picker/hooks/useMediaQuery.d.ts +2 -0
- package/es/components/date-picker/hooks/useMediaQuery.js +28 -0
- package/es/components/date-picker/index.js +2 -2
- package/es/components/date-picker/index.less +1880 -0
- package/es/components/drag-sort-tree/index.d.ts +0 -1
- package/es/components/drag-sort-tree/index.js +2 -1
- package/es/components/page/index.js +4 -2
- package/es/components/picker-view/index.d.ts +2 -0
- package/es/components/picker-view/index.js +2 -0
- package/es/components/pisell-config-provider/index.js +2 -0
- package/es/components/pisellModal/components/functions/index.d.ts +23 -5
- package/es/components/pisellModal/components/functions/index.js +7 -2
- package/es/components/pisellModal/index.d.ts +20 -5
- package/es/components/pisellTags/index.d.ts +13 -0
- package/es/components/pisellTags/index.js +83 -0
- package/es/components/pisellTags/index.less +17 -0
- package/es/components/pisellTags/utils.d.ts +1 -0
- package/es/components/pisellTags/utils.js +89 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.js +33 -48
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +9 -9
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.js +28 -43
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.js +45 -44
- package/es/components/table/Actions/component/ExportImport/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/index.js +34 -25
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.js +11 -0
- package/es/components/table/BasicTable/index.js +5 -3
- package/es/components/table/Gallery/index.js +2 -1
- package/es/components/table/Table/fields/rangePicker/Edit/index.js +13 -11
- package/es/components/table/Table/index.d.ts +2 -2
- package/es/components/table/Table/index.js +68 -42
- package/es/components/table/Table/index.less +3 -0
- package/es/components/table/Table/utils.d.ts +14 -2
- package/es/components/table/Table/utils.js +6 -2
- package/es/components/table/View/index.d.ts +2 -2
- package/es/components/table/View/index.js +27 -16
- package/es/components/table/hooks/useGenScroll.js +1 -1
- package/es/components/table/hooks/useTableSetting.js +29 -7
- package/es/components/table/hooks/useTransDataSource.d.ts +1 -0
- package/es/components/table/hooks/useTransDataSource.js +8 -6
- package/es/components/table/index.js +7 -5
- package/es/components/table/index.less +9 -0
- package/es/components/table/serve.d.ts +3 -1
- package/es/components/table/serve.js +71 -9
- package/es/components/table/types.d.ts +17 -4
- package/es/index.d.ts +3 -1
- package/es/index.js +3 -1
- package/es/locales/en-US.d.ts +12 -0
- package/es/locales/en-US.js +13 -0
- package/es/locales/zh-CN.d.ts +12 -0
- package/es/locales/zh-CN.js +13 -0
- package/es/locales/zh-TW.d.ts +12 -0
- package/es/locales/zh-TW.js +13 -0
- package/lib/components/browserSelect/chevron-down.png +0 -0
- package/lib/components/browserSelect/index.d.ts +15 -0
- package/lib/components/browserSelect/index.js +59 -0
- package/lib/components/browserSelect/index.less +18 -0
- package/lib/components/date-picker/constants.d.ts +39 -0
- package/lib/components/date-picker/constants.js +78 -0
- package/lib/components/date-picker/datePickerCpt.d.ts +8 -0
- package/lib/components/date-picker/datePickerCpt.js +403 -0
- package/lib/components/date-picker/hooks/useMediaQuery.d.ts +2 -0
- package/lib/components/date-picker/hooks/useMediaQuery.js +43 -0
- package/lib/components/date-picker/index.js +2 -2
- package/lib/components/date-picker/index.less +1880 -0
- package/lib/components/drag-sort-tree/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/index.js +0 -1
- package/lib/components/page/index.js +3 -2
- package/lib/components/picker-view/index.d.ts +2 -0
- package/lib/components/picker-view/index.js +36 -0
- package/lib/components/pisell-config-provider/index.js +2 -0
- package/lib/components/pisellModal/components/functions/index.d.ts +23 -5
- package/lib/components/pisellModal/components/functions/index.js +13 -7
- package/lib/components/pisellModal/index.d.ts +20 -5
- package/lib/components/pisellTags/index.d.ts +13 -0
- package/lib/components/pisellTags/index.js +113 -0
- package/lib/components/pisellTags/index.less +17 -0
- package/lib/components/pisellTags/utils.d.ts +1 -0
- package/lib/components/pisellTags/utils.js +86 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.js +9 -22
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +3 -8
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.js +9 -22
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.js +5 -8
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/index.js +15 -8
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.js +31 -0
- package/lib/components/table/BasicTable/index.js +2 -3
- package/lib/components/table/Gallery/index.js +2 -1
- package/lib/components/table/Table/fields/rangePicker/Edit/index.js +1 -9
- package/lib/components/table/Table/index.d.ts +2 -2
- package/lib/components/table/Table/index.js +61 -34
- package/lib/components/table/Table/index.less +3 -0
- package/lib/components/table/Table/utils.d.ts +14 -2
- package/lib/components/table/Table/utils.js +7 -1
- package/lib/components/table/View/index.d.ts +2 -2
- package/lib/components/table/View/index.js +28 -19
- package/lib/components/table/hooks/useGenScroll.js +1 -1
- package/lib/components/table/hooks/useTableSetting.js +26 -11
- package/lib/components/table/hooks/useTransDataSource.d.ts +1 -0
- package/lib/components/table/hooks/useTransDataSource.js +6 -5
- package/lib/components/table/index.js +4 -4
- package/lib/components/table/index.less +9 -0
- package/lib/components/table/serve.d.ts +3 -1
- package/lib/components/table/serve.js +38 -6
- package/lib/components/table/types.d.ts +17 -4
- package/lib/index.d.ts +3 -1
- package/lib/index.js +6 -0
- package/lib/locales/en-US.d.ts +12 -0
- package/lib/locales/en-US.js +13 -0
- package/lib/locales/zh-CN.d.ts +12 -0
- package/lib/locales/zh-CN.js +13 -0
- package/lib/locales/zh-TW.d.ts +12 -0
- package/lib/locales/zh-TW.js +13 -0
- package/lowcode/table/meta.ts +26 -18
- package/lowcode/table/snippets.ts +2 -3
- package/package.json +3 -3
- package/dist/umd/materials.min.css +0 -1
- package/dist/umd/materials.min.js +0 -1
- package/dist/umd/static/DotsSix.57d66266.svg +0 -1
- package/dist/umd/static/arrow-left.e542294f.svg +0 -1
- package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
- package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
- package/dist/umd/static/help-circle.31c9be40.svg +0 -1
- package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
|
@@ -37,7 +37,6 @@ var import_core = require("@dnd-kit/core");
|
|
|
37
37
|
var import_sortable = require("@dnd-kit/sortable");
|
|
38
38
|
var import_TreeItem = __toESM(require("./TreeItem"));
|
|
39
39
|
var import_modifiers = require("@dnd-kit/modifiers");
|
|
40
|
-
var import_index = require("./index.less");
|
|
41
40
|
var DragSortTree = (props) => {
|
|
42
41
|
const { value, rowKey, tabKey, hiddenKeys, onChange } = props;
|
|
43
42
|
const [items, setItems] = (0, import_react.useState)(value || []);
|
|
@@ -69,7 +69,7 @@ var localeDateMap = {
|
|
|
69
69
|
};
|
|
70
70
|
var Page = (props) => {
|
|
71
71
|
var _a, _b, _c, _d;
|
|
72
|
-
const { children, style, locale: propsLocale, ...others } = props;
|
|
72
|
+
const { children, style, className, locale: propsLocale, ...others } = props;
|
|
73
73
|
const context = (0, import_useEngineContext.default)();
|
|
74
74
|
const { platform, themeColor } = ((_a = context.appHelper) == null ? void 0 : _a.constants) || {};
|
|
75
75
|
const locale = propsLocale || ((_c = (_b = context == null ? void 0 : context.engine) == null ? void 0 : _b.props) == null ? void 0 : _c.locale) || "en";
|
|
@@ -271,7 +271,8 @@ var Page = (props) => {
|
|
|
271
271
|
/* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement(import_date_picker.LocaleProvider, { value: { locale } }, /* @__PURE__ */ import_react.default.createElement(import_pisell_config_provider.default, { locale }, /* @__PURE__ */ import_react.default.createElement(
|
|
272
272
|
"div",
|
|
273
273
|
{
|
|
274
|
-
style: { ...style, "--theme-color": themeColor || "#7F56D9" }
|
|
274
|
+
style: { ...style, "--theme-color": themeColor || "#7F56D9" },
|
|
275
|
+
className
|
|
275
276
|
},
|
|
276
277
|
children
|
|
277
278
|
))))
|
|
@@ -0,0 +1,36 @@
|
|
|
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/picker-view/index.tsx
|
|
30
|
+
var picker_view_exports = {};
|
|
31
|
+
__export(picker_view_exports, {
|
|
32
|
+
default: () => picker_view_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(picker_view_exports);
|
|
35
|
+
var import_picker_view = __toESM(require("antd-mobile/es/components/picker-view"));
|
|
36
|
+
var picker_view_default = import_picker_view.default;
|
|
@@ -38,6 +38,7 @@ var import_context = __toESM(require("./context"));
|
|
|
38
38
|
var import_hooks = require("../../hooks");
|
|
39
39
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
40
40
|
var import_pisellMessage = require("../pisellMessage");
|
|
41
|
+
var import_functions = require("../pisellModal/components/functions");
|
|
41
42
|
var platformMap = {
|
|
42
43
|
phone: "h5",
|
|
43
44
|
pc: "pc",
|
|
@@ -63,6 +64,7 @@ var PisellConfigProvider = (props) => {
|
|
|
63
64
|
};
|
|
64
65
|
const staticFunction = import_antd.App.useApp();
|
|
65
66
|
(0, import_pisellMessage.setMessage)(staticFunction.message);
|
|
67
|
+
(0, import_functions.setModal)(staticFunction.modal);
|
|
66
68
|
import_context.globalConfig.setConfig(config);
|
|
67
69
|
return /* @__PURE__ */ import_react.default.createElement(import_context.default.Provider, { value: config }, children);
|
|
68
70
|
};
|
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
import { ModalFuncProps } from 'antd';
|
|
2
|
+
import { useAppProps } from 'antd/es/app/context';
|
|
2
3
|
import { PisellContextType } from '../../../pisell-config-provider/context';
|
|
3
4
|
import './index.less';
|
|
5
|
+
declare const setModal: (m: useAppProps['modal']) => void;
|
|
4
6
|
export interface PisellModalFuncProps extends ModalFuncProps {
|
|
5
7
|
platform?: PisellContextType['platform'];
|
|
6
8
|
}
|
|
7
|
-
export declare const info: (props: PisellModalFuncProps) =>
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
export declare const info: (props: PisellModalFuncProps) => {
|
|
10
|
+
destroy: () => void;
|
|
11
|
+
update: (configUpdate: ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps)) => void;
|
|
12
|
+
};
|
|
13
|
+
export declare const success: (props: PisellModalFuncProps) => {
|
|
14
|
+
destroy: () => void;
|
|
15
|
+
update: (configUpdate: ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps)) => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const error: (props: PisellModalFuncProps) => {
|
|
18
|
+
destroy: () => void;
|
|
19
|
+
update: (configUpdate: ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps)) => void;
|
|
20
|
+
};
|
|
21
|
+
export declare const warning: (props: PisellModalFuncProps) => {
|
|
22
|
+
destroy: () => void;
|
|
23
|
+
update: (configUpdate: ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps)) => void;
|
|
24
|
+
};
|
|
11
25
|
export declare const warn: (props: PisellModalFuncProps) => any;
|
|
12
|
-
export declare const confirm: (props: PisellModalFuncProps) =>
|
|
26
|
+
export declare const confirm: (props: PisellModalFuncProps) => {
|
|
27
|
+
destroy: () => void;
|
|
28
|
+
update: (configUpdate: ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps)) => void;
|
|
29
|
+
};
|
|
30
|
+
export { setModal };
|
|
@@ -32,15 +32,19 @@ __export(functions_exports, {
|
|
|
32
32
|
confirm: () => confirm,
|
|
33
33
|
error: () => error,
|
|
34
34
|
info: () => info,
|
|
35
|
+
setModal: () => setModal,
|
|
35
36
|
success: () => success,
|
|
36
37
|
warn: () => warn,
|
|
37
38
|
warning: () => warning
|
|
38
39
|
});
|
|
39
40
|
module.exports = __toCommonJS(functions_exports);
|
|
40
|
-
var import_modal = __toESM(require("../../../modal"));
|
|
41
41
|
var import_classnames = __toESM(require("classnames"));
|
|
42
42
|
var import_context = require("../../../pisell-config-provider/context");
|
|
43
43
|
var import_index = require("./index.less");
|
|
44
|
+
var Modal;
|
|
45
|
+
var setModal = (m) => {
|
|
46
|
+
Modal = m;
|
|
47
|
+
};
|
|
44
48
|
var genConfig = (props) => {
|
|
45
49
|
const { platform } = import_context.globalConfig.getConfig();
|
|
46
50
|
return {
|
|
@@ -48,6 +52,7 @@ var genConfig = (props) => {
|
|
|
48
52
|
wrapClassName: (0, import_classnames.default)("pisell-modal-function-wrap", {
|
|
49
53
|
["pisell-modal-mobile-function-wrap"]: platform === "h5"
|
|
50
54
|
}),
|
|
55
|
+
transitionName: "pisell-move-down",
|
|
51
56
|
cancelButtonProps: {
|
|
52
57
|
block: true,
|
|
53
58
|
size: "large",
|
|
@@ -62,28 +67,29 @@ var genConfig = (props) => {
|
|
|
62
67
|
};
|
|
63
68
|
};
|
|
64
69
|
var info = (props) => {
|
|
65
|
-
return
|
|
70
|
+
return Modal.info(genConfig(props));
|
|
66
71
|
};
|
|
67
72
|
var success = (props) => {
|
|
68
|
-
return
|
|
73
|
+
return Modal.success(genConfig(props));
|
|
69
74
|
};
|
|
70
75
|
var error = (props) => {
|
|
71
|
-
return
|
|
76
|
+
return Modal.error(genConfig(props));
|
|
72
77
|
};
|
|
73
78
|
var warning = (props) => {
|
|
74
|
-
return
|
|
79
|
+
return Modal.warning(genConfig(props));
|
|
75
80
|
};
|
|
76
81
|
var warn = (props) => {
|
|
77
|
-
return
|
|
82
|
+
return Modal.warn(genConfig(props));
|
|
78
83
|
};
|
|
79
84
|
var confirm = (props) => {
|
|
80
|
-
return
|
|
85
|
+
return Modal.confirm(genConfig(props));
|
|
81
86
|
};
|
|
82
87
|
// Annotate the CommonJS export names for ESM import in node:
|
|
83
88
|
0 && (module.exports = {
|
|
84
89
|
confirm,
|
|
85
90
|
error,
|
|
86
91
|
info,
|
|
92
|
+
setModal,
|
|
87
93
|
success,
|
|
88
94
|
warn,
|
|
89
95
|
warning
|
|
@@ -32,12 +32,27 @@ export interface PisellModalProps extends ModalProps {
|
|
|
32
32
|
}
|
|
33
33
|
declare const PisellModal: {
|
|
34
34
|
(props: PisellModalProps): React.JSX.Element;
|
|
35
|
-
confirm: (props: import("./components/functions").PisellModalFuncProps) =>
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
confirm: (props: import("./components/functions").PisellModalFuncProps) => {
|
|
36
|
+
destroy: () => void;
|
|
37
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
38
|
+
};
|
|
39
|
+
info: (props: import("./components/functions").PisellModalFuncProps) => {
|
|
40
|
+
destroy: () => void;
|
|
41
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
42
|
+
};
|
|
43
|
+
error: (props: import("./components/functions").PisellModalFuncProps) => {
|
|
44
|
+
destroy: () => void;
|
|
45
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
46
|
+
};
|
|
38
47
|
warn: (props: import("./components/functions").PisellModalFuncProps) => any;
|
|
39
|
-
warning: (props: import("./components/functions").PisellModalFuncProps) =>
|
|
40
|
-
|
|
48
|
+
warning: (props: import("./components/functions").PisellModalFuncProps) => {
|
|
49
|
+
destroy: () => void;
|
|
50
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
51
|
+
};
|
|
52
|
+
success: (props: import("./components/functions").PisellModalFuncProps) => {
|
|
53
|
+
destroy: () => void;
|
|
54
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
55
|
+
};
|
|
41
56
|
Information: (props: import("./components/Information").InformationProps) => React.JSX.Element;
|
|
42
57
|
};
|
|
43
58
|
export default PisellModal;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export declare type PisellTagsType = 'pill_color' | 'pill_outline';
|
|
4
|
+
export declare type PisellTagsColor = 'success' | 'warning' | 'error' | 'gray' | string;
|
|
5
|
+
export interface PisellTagsProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> {
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
others?: React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
|
|
8
|
+
type: PisellTagsType;
|
|
9
|
+
icon?: React.ReactNode;
|
|
10
|
+
color?: PisellTagsColor;
|
|
11
|
+
}
|
|
12
|
+
declare const PisellTags: (props: PisellTagsProps) => React.JSX.Element;
|
|
13
|
+
export default PisellTags;
|
|
@@ -0,0 +1,113 @@
|
|
|
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/pisellTags/index.tsx
|
|
30
|
+
var pisellTags_exports = {};
|
|
31
|
+
__export(pisellTags_exports, {
|
|
32
|
+
default: () => pisellTags_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellTags_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
|
+
var import_utils = require("./utils");
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var pisellTagsColors = {
|
|
40
|
+
success: "#067647",
|
|
41
|
+
warning: "#B54708",
|
|
42
|
+
error: "#B42318",
|
|
43
|
+
gray: "#344054"
|
|
44
|
+
};
|
|
45
|
+
var getColor = (_color) => {
|
|
46
|
+
if (_color) {
|
|
47
|
+
return pisellTagsColors[_color] || _color;
|
|
48
|
+
}
|
|
49
|
+
return "#344054";
|
|
50
|
+
};
|
|
51
|
+
var getPillColorStyles = (_color) => {
|
|
52
|
+
const colorShades = (0, import_utils.generateColorShades)(_color);
|
|
53
|
+
return {
|
|
54
|
+
"--pisell-tags-bg-color": colorShades["color_50"],
|
|
55
|
+
"--pisell-tags-font-color": colorShades["color_700"],
|
|
56
|
+
"--pisell-tags-border-color": colorShades["color_200"]
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
var getPillOutlineStyles = (_color) => {
|
|
60
|
+
const colorShades = (0, import_utils.generateColorShades)(_color);
|
|
61
|
+
return {
|
|
62
|
+
"--pisell-tags-bg-color": "transparent",
|
|
63
|
+
"--pisell-tags-font-color": colorShades["color_700"],
|
|
64
|
+
"--pisell-tags-border-color": colorShades["color_600"]
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
var PisellTags = (props) => {
|
|
68
|
+
const {
|
|
69
|
+
children,
|
|
70
|
+
type,
|
|
71
|
+
icon,
|
|
72
|
+
color,
|
|
73
|
+
style = {},
|
|
74
|
+
others = {},
|
|
75
|
+
...otherProps
|
|
76
|
+
} = props;
|
|
77
|
+
const styles = (0, import_react.useMemo)(() => {
|
|
78
|
+
let obj = {
|
|
79
|
+
...style,
|
|
80
|
+
...others.style
|
|
81
|
+
};
|
|
82
|
+
const _color = getColor(props.color);
|
|
83
|
+
if (type === "pill_color") {
|
|
84
|
+
obj = {
|
|
85
|
+
...obj,
|
|
86
|
+
...getPillColorStyles(_color)
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (type === "pill_outline") {
|
|
90
|
+
obj = {
|
|
91
|
+
...obj,
|
|
92
|
+
...getPillOutlineStyles(_color)
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return obj;
|
|
96
|
+
}, [color, style, others.style, type]);
|
|
97
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
98
|
+
"span",
|
|
99
|
+
{
|
|
100
|
+
style: { ...styles, ...style },
|
|
101
|
+
...others,
|
|
102
|
+
...otherProps,
|
|
103
|
+
className: (0, import_classnames.default)(
|
|
104
|
+
"pisell-tags",
|
|
105
|
+
others.className,
|
|
106
|
+
otherProps.className
|
|
107
|
+
)
|
|
108
|
+
},
|
|
109
|
+
icon ? icon : null,
|
|
110
|
+
children
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
var pisellTags_default = PisellTags;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.pisell-tags {
|
|
2
|
+
--pisell-tags-bg-color: #F9FAFB;
|
|
3
|
+
--pisell-tags-font-color: #344054;
|
|
4
|
+
--pisell-tags-border-color: #EAECF0;
|
|
5
|
+
border-radius: 16px;
|
|
6
|
+
border: 1px solid var(--pisell-tags-border-color);
|
|
7
|
+
background: var(--pisell-tags-bg-color);
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
padding: 4px 12px;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 6px;
|
|
12
|
+
|
|
13
|
+
color: var(--pisell-tags-font-color);
|
|
14
|
+
font-size: 14px;
|
|
15
|
+
font-style: normal;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const generateColorShades: (color: string) => Record<string, string>;
|
|
@@ -0,0 +1,86 @@
|
|
|
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/pisellTags/utils.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
generateColorShades: () => generateColorShades
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
|
25
|
+
var hexToRgb = (hex) => {
|
|
26
|
+
hex = hex.replace(/^#/, "");
|
|
27
|
+
if (hex.length === 3) {
|
|
28
|
+
hex = hex.split("").map((h) => h + h).join("");
|
|
29
|
+
}
|
|
30
|
+
const intVal = parseInt(hex, 16);
|
|
31
|
+
return {
|
|
32
|
+
r: intVal >> 16 & 255,
|
|
33
|
+
// 提取红色分量
|
|
34
|
+
g: intVal >> 8 & 255,
|
|
35
|
+
// 提取绿色分量
|
|
36
|
+
b: intVal & 255
|
|
37
|
+
// 提取蓝色分量
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
var rgbToHex = (r, g, b) => {
|
|
41
|
+
return "#" + [r, g, b].map((x) => {
|
|
42
|
+
const hex = x.toString(16);
|
|
43
|
+
return hex.length === 1 ? "0" + hex : hex;
|
|
44
|
+
}).join("");
|
|
45
|
+
};
|
|
46
|
+
var parseColor = (color) => {
|
|
47
|
+
if (color.startsWith("#")) {
|
|
48
|
+
return hexToRgb(color);
|
|
49
|
+
} else if (color.startsWith("rgb")) {
|
|
50
|
+
const rgba = color.replace(/rgba?\(|\s+|\)/g, "").split(",").map(Number);
|
|
51
|
+
return { r: rgba[0], g: rgba[1], b: rgba[2], a: rgba[3] !== void 0 ? rgba[3] : 1 };
|
|
52
|
+
} else {
|
|
53
|
+
throw new Error("无效的颜色格式");
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var generateColorShades = (color) => {
|
|
57
|
+
const { r, g, b, a } = parseColor(color);
|
|
58
|
+
const max = 700;
|
|
59
|
+
const gap = 1 / max;
|
|
60
|
+
const ratios = {
|
|
61
|
+
50: gap * 50,
|
|
62
|
+
200: gap * 200,
|
|
63
|
+
500: gap * 500,
|
|
64
|
+
600: gap * 600,
|
|
65
|
+
700: gap * 700
|
|
66
|
+
};
|
|
67
|
+
const adjustColorComponent = (component, ratio) => Math.round(component * ratio + 255 * (1 - ratio));
|
|
68
|
+
const shades = {
|
|
69
|
+
"color_50": rgbToHex(adjustColorComponent(r, ratios[50]), adjustColorComponent(g, ratios[50]), adjustColorComponent(b, ratios[50])),
|
|
70
|
+
"color_200": rgbToHex(adjustColorComponent(r, ratios[200]), adjustColorComponent(g, ratios[200]), adjustColorComponent(b, ratios[200])),
|
|
71
|
+
"color_500": rgbToHex(adjustColorComponent(r, ratios[500]), adjustColorComponent(g, ratios[500]), adjustColorComponent(b, ratios[500])),
|
|
72
|
+
"color_600": rgbToHex(adjustColorComponent(r, ratios[600]), adjustColorComponent(g, ratios[600]), adjustColorComponent(b, ratios[600])),
|
|
73
|
+
"color_700": color
|
|
74
|
+
};
|
|
75
|
+
if (a !== void 0) {
|
|
76
|
+
shades["color_50"] = `rgba(${adjustColorComponent(r, ratios[50])}, ${adjustColorComponent(g, ratios[50])}, ${adjustColorComponent(b, ratios[50])}, ${a})`;
|
|
77
|
+
shades["color_200"] = `rgba(${adjustColorComponent(r, ratios[200])}, ${adjustColorComponent(g, ratios[200])}, ${adjustColorComponent(b, ratios[200])}, ${a})`;
|
|
78
|
+
shades["color_500"] = `rgba(${adjustColorComponent(r, ratios[500])}, ${adjustColorComponent(g, ratios[500])}, ${adjustColorComponent(b, ratios[500])}, ${a})`;
|
|
79
|
+
shades["color_600"] = `rgba(${adjustColorComponent(r, ratios[600])}, ${adjustColorComponent(g, ratios[600])}, ${adjustColorComponent(b, ratios[600])}, ${a})`;
|
|
80
|
+
}
|
|
81
|
+
return shades;
|
|
82
|
+
};
|
|
83
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
84
|
+
0 && (module.exports = {
|
|
85
|
+
generateColorShades
|
|
86
|
+
});
|
package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ExportImportType } from
|
|
3
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExportImportType } from '../../../../../types';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const ExportFile: (props: {
|
|
5
5
|
exportImport: ExportImportType;
|
|
6
6
|
}) => React.JSX.Element;
|
|
@@ -38,13 +38,11 @@ var import_react = __toESM(require("react"));
|
|
|
38
38
|
var import_useEngineContext = __toESM(require("../../../../../../../hooks/useEngineContext"));
|
|
39
39
|
var import_locales = require("../../../../../../../locales/index");
|
|
40
40
|
var import_serve = require("../../../../../serve");
|
|
41
|
-
var import_status = require("../../../../../status");
|
|
42
41
|
var import_utils = require("../../../../../utils");
|
|
43
42
|
var import_date = require("../../utils/date");
|
|
44
43
|
var import_download = __toESM(require("../../utils/download"));
|
|
45
44
|
var import_index = require("./index.less");
|
|
46
45
|
var defaultData = {
|
|
47
|
-
type: import_status.defaultOptions.exportValue,
|
|
48
46
|
skip: 1,
|
|
49
47
|
num: 10
|
|
50
48
|
};
|
|
@@ -56,25 +54,11 @@ var exportStatusOptions = {
|
|
|
56
54
|
};
|
|
57
55
|
var ExportFile = (props) => {
|
|
58
56
|
const { exportImport } = props;
|
|
59
|
-
const {
|
|
57
|
+
const { apiUrl, otherParams } = exportImport;
|
|
60
58
|
const [list, setList] = (0, import_react.useState)([]);
|
|
61
|
-
const [defaultParams, setDefaultParams] = (0, import_react.useState)(defaultData);
|
|
62
59
|
const context = (0, import_useEngineContext.default)();
|
|
63
60
|
import_utils.request.setRequest(context.appHelper.utils.request);
|
|
64
|
-
(0,
|
|
65
|
-
let params = {};
|
|
66
|
-
if (formId) {
|
|
67
|
-
params.form_id = formId;
|
|
68
|
-
}
|
|
69
|
-
if (formCode) {
|
|
70
|
-
params.code = formCode;
|
|
71
|
-
}
|
|
72
|
-
setDefaultParams({
|
|
73
|
-
...defaultParams,
|
|
74
|
-
...params
|
|
75
|
-
});
|
|
76
|
-
}, [formId, formCode]);
|
|
77
|
-
const _historyList = (0, import_ahooks.useRequest)(import_serve.historyData, {
|
|
61
|
+
const _historyList = (0, import_ahooks.useRequest)(import_serve.getExportFile, {
|
|
78
62
|
manual: true,
|
|
79
63
|
onSuccess: (res) => {
|
|
80
64
|
var _a;
|
|
@@ -84,13 +68,16 @@ var ExportFile = (props) => {
|
|
|
84
68
|
}
|
|
85
69
|
});
|
|
86
70
|
const init = () => {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
71
|
+
const _defaultParams = {
|
|
72
|
+
...defaultData,
|
|
73
|
+
...otherParams,
|
|
74
|
+
url: apiUrl == null ? void 0 : apiUrl.export_file
|
|
75
|
+
};
|
|
76
|
+
_historyList.run(_defaultParams);
|
|
90
77
|
};
|
|
91
78
|
(0, import_react.useEffect)(() => {
|
|
92
79
|
init();
|
|
93
|
-
}, [
|
|
80
|
+
}, [exportImport]);
|
|
94
81
|
const columns = [
|
|
95
82
|
{
|
|
96
83
|
title: (0, import_locales.getText)("table-action-export-import-file-name"),
|
package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js
CHANGED
|
@@ -40,15 +40,10 @@ var _batchExport = async (params) => {
|
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
var batchExport = (exportParams, exportImport) => {
|
|
43
|
-
const { selectLists,
|
|
43
|
+
const { selectLists, apiUrl, otherParams } = exportImport;
|
|
44
44
|
let _name = (0, import_file.getFileDateName)();
|
|
45
|
-
let params = {};
|
|
46
|
-
|
|
47
|
-
params.form_id = formId;
|
|
48
|
-
}
|
|
49
|
-
if (formCode) {
|
|
50
|
-
params.code = formCode;
|
|
51
|
-
}
|
|
45
|
+
let params = { ...otherParams };
|
|
46
|
+
params.url = apiUrl == null ? void 0 : apiUrl.export;
|
|
52
47
|
console.log("exportParams", exportParams);
|
|
53
48
|
const type = (exportParams == null ? void 0 : exportParams.type) || import_status.defaultOptions.exportType;
|
|
54
49
|
if (type === import_status.defaultOptions.exportType) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ExportImportType } from
|
|
3
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExportImportType } from '../../../../../types';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare const ImportLog: (props: {
|
|
5
5
|
exportImport: ExportImportType;
|
|
6
6
|
}) => React.JSX.Element;
|
|
@@ -38,38 +38,22 @@ var import_react = __toESM(require("react"));
|
|
|
38
38
|
var import_useEngineContext = __toESM(require("../../../../../../../hooks/useEngineContext"));
|
|
39
39
|
var import_locales = require("../../../../../../../locales/index");
|
|
40
40
|
var import_serve = require("../../../../../serve");
|
|
41
|
-
var import_status = require("../../../../../status");
|
|
42
41
|
var import_utils = require("../../../../../utils");
|
|
43
42
|
var import_date = require("../../utils/date");
|
|
44
43
|
var import_Detail = __toESM(require("./Detail"));
|
|
45
44
|
var import_index = require("./index.less");
|
|
46
45
|
var defaultData = {
|
|
47
|
-
type: import_status.defaultOptions.importValue,
|
|
48
46
|
skip: 1,
|
|
49
47
|
num: 10
|
|
50
48
|
};
|
|
51
49
|
var ImportLog = (props) => {
|
|
52
50
|
const { exportImport } = props;
|
|
53
|
-
const {
|
|
51
|
+
const { apiUrl, otherParams } = exportImport;
|
|
54
52
|
const detailRef = (0, import_react.useRef)(null);
|
|
55
53
|
const [list, setList] = (0, import_react.useState)([]);
|
|
56
|
-
const [defaultParams, setDefaultParams] = (0, import_react.useState)(defaultData);
|
|
57
54
|
const context = (0, import_useEngineContext.default)();
|
|
58
55
|
import_utils.request.setRequest(context.appHelper.utils.request);
|
|
59
|
-
(0,
|
|
60
|
-
let params = {};
|
|
61
|
-
if (formId) {
|
|
62
|
-
params.form_id = formId;
|
|
63
|
-
}
|
|
64
|
-
if (formCode) {
|
|
65
|
-
params.code = formCode;
|
|
66
|
-
}
|
|
67
|
-
setDefaultParams({
|
|
68
|
-
...defaultParams,
|
|
69
|
-
...params
|
|
70
|
-
});
|
|
71
|
-
}, [formId, formCode]);
|
|
72
|
-
const _historyList = (0, import_ahooks.useRequest)(import_serve.historyData, {
|
|
56
|
+
const _historyList = (0, import_ahooks.useRequest)(import_serve.getImportLog, {
|
|
73
57
|
manual: true,
|
|
74
58
|
onSuccess: (res) => {
|
|
75
59
|
var _a;
|
|
@@ -79,13 +63,16 @@ var ImportLog = (props) => {
|
|
|
79
63
|
}
|
|
80
64
|
});
|
|
81
65
|
const init = () => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
66
|
+
const _defaultParams = {
|
|
67
|
+
...defaultData,
|
|
68
|
+
...otherParams,
|
|
69
|
+
url: apiUrl == null ? void 0 : apiUrl.import_log
|
|
70
|
+
};
|
|
71
|
+
_historyList.run(_defaultParams);
|
|
85
72
|
};
|
|
86
73
|
(0, import_react.useEffect)(() => {
|
|
87
74
|
init();
|
|
88
|
-
}, [
|
|
75
|
+
}, [exportImport]);
|
|
89
76
|
const columns = [
|
|
90
77
|
{
|
|
91
78
|
title: (0, import_locales.getText)("table-action-export-import-log-name"),
|
package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ExportImportType } from
|
|
3
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExportImportType } from '../../../../../types';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare type ImportTableProps = {
|
|
5
5
|
onChange: any;
|
|
6
6
|
exportImport: ExportImportType;
|