@pisell/materials 1.0.404 → 1.0.405
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/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 +30 -26
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +3 -1
- 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 +25 -21
- 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 +34 -31
- package/es/components/table/Actions/component/ExportImport/index.d.ts +3 -3
- package/es/components/table/Actions/component/ExportImport/index.js +32 -25
- 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 +1 -0
- package/es/components/table/serve.js +38 -7
- package/es/components/table/types.d.ts +2 -0
- 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/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 +6 -2
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +2 -1
- 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 +6 -2
- 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 +4 -2
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +3 -3
- package/lib/components/table/Actions/component/ExportImport/index.js +13 -8
- 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 +1 -0
- package/lib/components/table/serve.js +24 -4
- package/lib/components/table/types.d.ts +2 -0
- 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/package.json +1 -1
- 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
|
@@ -13,7 +13,8 @@ import { DndContext, useSensor, useSensors, PointerSensor } from '@dnd-kit/core'
|
|
|
13
13
|
import { SortableContext, verticalListSortingStrategy, arrayMove } from '@dnd-kit/sortable';
|
|
14
14
|
import TreeItem from "./TreeItem";
|
|
15
15
|
import { restrictToVerticalAxis, restrictToParentElement } from '@dnd-kit/modifiers';
|
|
16
|
-
import
|
|
16
|
+
// import './index.less';
|
|
17
|
+
|
|
17
18
|
var DragSortTree = function DragSortTree(props) {
|
|
18
19
|
var value = props.value,
|
|
19
20
|
rowKey = props.rowKey,
|
|
@@ -4,6 +4,7 @@ import PisellContext, { globalConfig } from "./context";
|
|
|
4
4
|
import { useResponsive } from "../../hooks";
|
|
5
5
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
6
6
|
import { setMessage } from "../pisellMessage";
|
|
7
|
+
import { setModal } from "../pisellModal/components/functions";
|
|
7
8
|
var platformMap = {
|
|
8
9
|
phone: 'h5',
|
|
9
10
|
pc: 'pc',
|
|
@@ -28,6 +29,7 @@ var PisellConfigProvider = function PisellConfigProvider(props) {
|
|
|
28
29
|
};
|
|
29
30
|
var staticFunction = App.useApp();
|
|
30
31
|
setMessage(staticFunction.message);
|
|
32
|
+
setModal(staticFunction.modal);
|
|
31
33
|
globalConfig.setConfig(config);
|
|
32
34
|
return /*#__PURE__*/React.createElement(PisellContext.Provider, {
|
|
33
35
|
value: config
|
|
@@ -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 };
|
|
@@ -4,15 +4,19 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
7
|
-
import Modal from "../../../modal";
|
|
8
7
|
import classNames from 'classnames';
|
|
9
8
|
import { globalConfig } from "../../../pisell-config-provider/context";
|
|
10
9
|
import "./index.less";
|
|
10
|
+
var Modal;
|
|
11
|
+
var setModal = function setModal(m) {
|
|
12
|
+
Modal = m;
|
|
13
|
+
};
|
|
11
14
|
var genConfig = function genConfig(props) {
|
|
12
15
|
var _globalConfig$getConf = globalConfig.getConfig(),
|
|
13
16
|
platform = _globalConfig$getConf.platform;
|
|
14
17
|
return _objectSpread(_objectSpread({}, props), {}, {
|
|
15
18
|
wrapClassName: classNames('pisell-modal-function-wrap', _defineProperty({}, 'pisell-modal-mobile-function-wrap', platform === 'h5')),
|
|
19
|
+
transitionName: "pisell-move-down",
|
|
16
20
|
cancelButtonProps: _objectSpread({
|
|
17
21
|
block: true,
|
|
18
22
|
size: 'large'
|
|
@@ -41,4 +45,5 @@ export var warn = function warn(props) {
|
|
|
41
45
|
};
|
|
42
46
|
export var confirm = function confirm(props) {
|
|
43
47
|
return Modal.confirm(genConfig(props));
|
|
44
|
-
};
|
|
48
|
+
};
|
|
49
|
+
export { setModal };
|
|
@@ -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,83 @@
|
|
|
1
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
+
var _excluded = ["children", "type", "icon", "color", "style", "others"];
|
|
3
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
9
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
10
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
|
+
import React, { useMemo } from 'react';
|
|
12
|
+
import classNames from 'classnames';
|
|
13
|
+
import { generateColorShades } from "./utils";
|
|
14
|
+
import "./index.less";
|
|
15
|
+
|
|
16
|
+
// Pisell Tags 样式类型
|
|
17
|
+
|
|
18
|
+
// 预设颜色枚举
|
|
19
|
+
var pisellTagsColors = {
|
|
20
|
+
success: '#067647',
|
|
21
|
+
warning: '#B54708',
|
|
22
|
+
error: '#B42318',
|
|
23
|
+
gray: '#344054'
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* @title: 获取颜色
|
|
28
|
+
* @description:
|
|
29
|
+
* @param {PisellTagsColor} _color
|
|
30
|
+
* @return {*}
|
|
31
|
+
* @Author: zhiwei.Wang
|
|
32
|
+
* @Date: 2024-08-23 16:07
|
|
33
|
+
*/
|
|
34
|
+
var getColor = function getColor(_color) {
|
|
35
|
+
if (_color) {
|
|
36
|
+
return pisellTagsColors[_color] || _color;
|
|
37
|
+
}
|
|
38
|
+
return '#344054';
|
|
39
|
+
};
|
|
40
|
+
var getPillColorStyles = function getPillColorStyles(_color) {
|
|
41
|
+
var colorShades = generateColorShades(_color);
|
|
42
|
+
return {
|
|
43
|
+
'--pisell-tags-bg-color': colorShades['color_50'],
|
|
44
|
+
'--pisell-tags-font-color': colorShades['color_700'],
|
|
45
|
+
'--pisell-tags-border-color': colorShades['color_200']
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
var getPillOutlineStyles = function getPillOutlineStyles(_color) {
|
|
49
|
+
var colorShades = generateColorShades(_color);
|
|
50
|
+
return {
|
|
51
|
+
'--pisell-tags-bg-color': 'transparent',
|
|
52
|
+
'--pisell-tags-font-color': colorShades['color_700'],
|
|
53
|
+
'--pisell-tags-border-color': colorShades['color_600']
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
var PisellTags = function PisellTags(props) {
|
|
57
|
+
var children = props.children,
|
|
58
|
+
type = props.type,
|
|
59
|
+
icon = props.icon,
|
|
60
|
+
color = props.color,
|
|
61
|
+
_props$style = props.style,
|
|
62
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
63
|
+
_props$others = props.others,
|
|
64
|
+
others = _props$others === void 0 ? {} : _props$others,
|
|
65
|
+
otherProps = _objectWithoutProperties(props, _excluded);
|
|
66
|
+
var styles = useMemo(function () {
|
|
67
|
+
var obj = _objectSpread(_objectSpread({}, style), others.style);
|
|
68
|
+
var _color = getColor(props.color);
|
|
69
|
+
if (type === 'pill_color') {
|
|
70
|
+
obj = _objectSpread(_objectSpread({}, obj), getPillColorStyles(_color));
|
|
71
|
+
}
|
|
72
|
+
if (type === 'pill_outline') {
|
|
73
|
+
obj = _objectSpread(_objectSpread({}, obj), getPillOutlineStyles(_color));
|
|
74
|
+
}
|
|
75
|
+
return obj;
|
|
76
|
+
}, [color, style, others.style, type]);
|
|
77
|
+
return /*#__PURE__*/React.createElement("span", _extends({
|
|
78
|
+
style: _objectSpread(_objectSpread({}, styles), style)
|
|
79
|
+
}, others, otherProps, {
|
|
80
|
+
className: classNames('pisell-tags', others.className, otherProps.className)
|
|
81
|
+
}), icon ? icon : null, children);
|
|
82
|
+
};
|
|
83
|
+
export 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,89 @@
|
|
|
1
|
+
// 定义 RGB 类型,包括 r, g, b 和可选的 a(透明度)分量
|
|
2
|
+
|
|
3
|
+
// 辅助函数:将 16 进制颜色转换为 RGB
|
|
4
|
+
var hexToRgb = function hexToRgb(hex) {
|
|
5
|
+
hex = hex.replace(/^#/, ''); // 去掉开头的 #
|
|
6
|
+
if (hex.length === 3) {
|
|
7
|
+
// 处理三位颜色码,扩展为六位颜色码
|
|
8
|
+
hex = hex.split('').map(function (h) {
|
|
9
|
+
return h + h;
|
|
10
|
+
}).join('');
|
|
11
|
+
}
|
|
12
|
+
var intVal = parseInt(hex, 16); // 将 16 进制转换为整数
|
|
13
|
+
return {
|
|
14
|
+
r: intVal >> 16 & 255,
|
|
15
|
+
// 提取红色分量
|
|
16
|
+
g: intVal >> 8 & 255,
|
|
17
|
+
// 提取绿色分量
|
|
18
|
+
b: intVal & 255 // 提取蓝色分量
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
// 辅助函数:将 RGB 转换为 16 进制颜色
|
|
23
|
+
var rgbToHex = function rgbToHex(r, g, b) {
|
|
24
|
+
return '#' + [r, g, b].map(function (x) {
|
|
25
|
+
var hex = x.toString(16); // 将数值转换为 16 进制字符串
|
|
26
|
+
return hex.length === 1 ? '0' + hex : hex; // 确保每个分量都是两位
|
|
27
|
+
}).join(''); // 将 RGB 分量组合为 16 进制颜色码
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
// 辅助函数:解析输入的颜色字符串,并返回 RGB 或 RGBA 对象
|
|
31
|
+
var parseColor = function parseColor(color) {
|
|
32
|
+
if (color.startsWith('#')) {
|
|
33
|
+
return hexToRgb(color); // 处理 16 进制颜色
|
|
34
|
+
} else if (color.startsWith('rgb')) {
|
|
35
|
+
// 处理 RGB 或 RGBA 颜色
|
|
36
|
+
var rgba = color.replace(/rgba?\(|\s+|\)/g, '').split(',').map(Number);
|
|
37
|
+
return {
|
|
38
|
+
r: rgba[0],
|
|
39
|
+
g: rgba[1],
|
|
40
|
+
b: rgba[2],
|
|
41
|
+
a: rgba[3] !== undefined ? rgba[3] : 1
|
|
42
|
+
};
|
|
43
|
+
} else {
|
|
44
|
+
throw new Error('无效的颜色格式');
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
// 生成颜色阶梯的函数
|
|
49
|
+
export var generateColorShades = function generateColorShades(color) {
|
|
50
|
+
var _parseColor = parseColor(color),
|
|
51
|
+
r = _parseColor.r,
|
|
52
|
+
g = _parseColor.g,
|
|
53
|
+
b = _parseColor.b,
|
|
54
|
+
a = _parseColor.a;
|
|
55
|
+
var max = 700;
|
|
56
|
+
var gap = 1 / max;
|
|
57
|
+
|
|
58
|
+
// 定义相对于 700 阶梯的 50, 200, 500 阶梯的比例
|
|
59
|
+
var ratios = {
|
|
60
|
+
50: gap * 50,
|
|
61
|
+
200: gap * 200,
|
|
62
|
+
500: gap * 500,
|
|
63
|
+
600: gap * 600,
|
|
64
|
+
700: gap * 700
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
// 调整颜色分量的函数,基于比例计算新的分量值
|
|
68
|
+
var adjustColorComponent = function adjustColorComponent(component, ratio) {
|
|
69
|
+
return Math.round(component * ratio + 255 * (1 - ratio));
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// 生成不同阶梯的颜色
|
|
73
|
+
var shades = {
|
|
74
|
+
'color_50': rgbToHex(adjustColorComponent(r, ratios[50]), adjustColorComponent(g, ratios[50]), adjustColorComponent(b, ratios[50])),
|
|
75
|
+
'color_200': rgbToHex(adjustColorComponent(r, ratios[200]), adjustColorComponent(g, ratios[200]), adjustColorComponent(b, ratios[200])),
|
|
76
|
+
'color_500': rgbToHex(adjustColorComponent(r, ratios[500]), adjustColorComponent(g, ratios[500]), adjustColorComponent(b, ratios[500])),
|
|
77
|
+
'color_600': rgbToHex(adjustColorComponent(r, ratios[600]), adjustColorComponent(g, ratios[600]), adjustColorComponent(b, ratios[600])),
|
|
78
|
+
'color_700': color
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
// 如果原始颜色带有透明度 (RGBA),在返回结果中包含透明度信息
|
|
82
|
+
if (a !== undefined) {
|
|
83
|
+
shades['color_50'] = "rgba(".concat(adjustColorComponent(r, ratios[50]), ", ").concat(adjustColorComponent(g, ratios[50]), ", ").concat(adjustColorComponent(b, ratios[50]), ", ").concat(a, ")");
|
|
84
|
+
shades['color_200'] = "rgba(".concat(adjustColorComponent(r, ratios[200]), ", ").concat(adjustColorComponent(g, ratios[200]), ", ").concat(adjustColorComponent(b, ratios[200]), ", ").concat(a, ")");
|
|
85
|
+
shades['color_500'] = "rgba(".concat(adjustColorComponent(r, ratios[500]), ", ").concat(adjustColorComponent(g, ratios[500]), ", ").concat(adjustColorComponent(b, ratios[500]), ", ").concat(a, ")");
|
|
86
|
+
shades['color_600'] = "rgba(".concat(adjustColorComponent(r, ratios[600]), ", ").concat(adjustColorComponent(g, ratios[600]), ", ").concat(adjustColorComponent(b, ratios[600]), ", ").concat(a, ")");
|
|
87
|
+
}
|
|
88
|
+
return shades;
|
|
89
|
+
};
|
|
@@ -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;
|
|
@@ -10,9 +10,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import { useRequest } from
|
|
14
|
-
import { Spin, Table } from
|
|
15
|
-
import React, { useEffect, useState } from
|
|
13
|
+
import { useRequest } from 'ahooks';
|
|
14
|
+
import { Spin, Table } from 'antd';
|
|
15
|
+
import React, { useEffect, useState } from 'react';
|
|
16
16
|
import useEngineContext from "../../../../../../../hooks/useEngineContext";
|
|
17
17
|
import { getText } from "../../../../../../../locales/index";
|
|
18
18
|
import { historyData } from "../../../../../serve";
|
|
@@ -27,15 +27,16 @@ var defaultData = {
|
|
|
27
27
|
num: 10
|
|
28
28
|
};
|
|
29
29
|
var exportStatusOptions = {
|
|
30
|
-
pending: getText(
|
|
31
|
-
processing: getText(
|
|
32
|
-
completed: getText(
|
|
33
|
-
complete: getText(
|
|
30
|
+
pending: getText('table-action-export-import-file-pending'),
|
|
31
|
+
processing: getText('table-action-export-import-file-processing'),
|
|
32
|
+
completed: getText('table-action-export-import-file-completed'),
|
|
33
|
+
complete: getText('table-action-export-import-file-completed')
|
|
34
34
|
};
|
|
35
35
|
var ExportFile = function ExportFile(props) {
|
|
36
36
|
var exportImport = props.exportImport;
|
|
37
37
|
var formId = exportImport.formId,
|
|
38
|
-
formCode = exportImport.formCode
|
|
38
|
+
formCode = exportImport.formCode,
|
|
39
|
+
apiUrl = exportImport.apiUrl;
|
|
39
40
|
var _useState = useState([]),
|
|
40
41
|
_useState2 = _slicedToArray(_useState, 2),
|
|
41
42
|
list = _useState2[0],
|
|
@@ -75,59 +76,62 @@ var ExportFile = function ExportFile(props) {
|
|
|
75
76
|
});
|
|
76
77
|
var init = function init() {
|
|
77
78
|
if (defaultParams !== null && defaultParams !== void 0 && defaultParams.form_id || defaultParams !== null && defaultParams !== void 0 && defaultParams.code) {
|
|
78
|
-
|
|
79
|
+
var _defaultParams = _objectSpread(_objectSpread({}, defaultParams), {}, {
|
|
80
|
+
url: apiUrl
|
|
81
|
+
});
|
|
82
|
+
_historyList.run(_defaultParams);
|
|
79
83
|
}
|
|
80
84
|
};
|
|
81
85
|
useEffect(function () {
|
|
82
86
|
init();
|
|
83
87
|
}, [defaultParams]);
|
|
84
88
|
var columns = [{
|
|
85
|
-
title: getText(
|
|
86
|
-
dataIndex:
|
|
89
|
+
title: getText('table-action-export-import-file-name'),
|
|
90
|
+
dataIndex: 'file_name',
|
|
87
91
|
render: function render(text, record) {
|
|
88
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, record.status ==
|
|
92
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, record.status == 'completed' || record.status == 'complete' ? /*#__PURE__*/React.createElement("a", {
|
|
89
93
|
onClick: function onClick() {
|
|
90
94
|
download(record.url, text);
|
|
91
95
|
}
|
|
92
96
|
}, text) : /*#__PURE__*/React.createElement("span", null, text));
|
|
93
97
|
}
|
|
94
98
|
}, {
|
|
95
|
-
title: getText(
|
|
96
|
-
dataIndex:
|
|
99
|
+
title: getText('table-action-export-import-file-content'),
|
|
100
|
+
dataIndex: 'setting',
|
|
97
101
|
render: function render(text, record) {
|
|
98
102
|
var _text$params, _text$params$ids, _record$result;
|
|
99
|
-
return /*#__PURE__*/React.createElement("div", null, text !== null && text !== void 0 && (_text$params = text.params) !== null && _text$params !== void 0 && (_text$params$ids = _text$params.ids) !== null && _text$params$ids !== void 0 && _text$params$ids.length ? getText(
|
|
103
|
+
return /*#__PURE__*/React.createElement("div", null, text !== null && text !== void 0 && (_text$params = text.params) !== null && _text$params !== void 0 && (_text$params$ids = _text$params.ids) !== null && _text$params$ids !== void 0 && _text$params$ids.length ? getText('table-action-export-import-file-content-part') : getText('table-action-export-import-file-content-all'), ' ', getText('table-action-export-import-file-record')("".concat((record === null || record === void 0 ? void 0 : (_record$result = record.result) === null || _record$result === void 0 ? void 0 : _record$result.total) || 0)));
|
|
100
104
|
}
|
|
101
105
|
}, {
|
|
102
|
-
title: getText(
|
|
103
|
-
dataIndex:
|
|
106
|
+
title: getText('table-action-export-import-file-status'),
|
|
107
|
+
dataIndex: 'status',
|
|
104
108
|
render: function render(text) {
|
|
105
109
|
return exportStatusOptions[text];
|
|
106
110
|
}
|
|
107
111
|
}, {
|
|
108
|
-
title: getText(
|
|
109
|
-
dataIndex:
|
|
112
|
+
title: getText('table-action-export-import-file-account'),
|
|
113
|
+
dataIndex: 'account',
|
|
110
114
|
render: function render(text) {
|
|
111
|
-
return text ? /*#__PURE__*/React.createElement("div", null, "".concat((text === null || text === void 0 ? void 0 : text.first_name) ||
|
|
115
|
+
return text ? /*#__PURE__*/React.createElement("div", null, "".concat((text === null || text === void 0 ? void 0 : text.first_name) || '', " ").concat((text === null || text === void 0 ? void 0 : text.last_name) || '')) : null;
|
|
112
116
|
}
|
|
113
117
|
}, {
|
|
114
|
-
title: getText(
|
|
115
|
-
dataIndex:
|
|
118
|
+
title: getText('table-action-export-import-file-created'),
|
|
119
|
+
dataIndex: 'created_at',
|
|
116
120
|
render: function render(text) {
|
|
117
121
|
return formatDate(text);
|
|
118
122
|
}
|
|
119
123
|
}];
|
|
120
124
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
121
|
-
className:
|
|
125
|
+
className: 'export-history-content'
|
|
122
126
|
}, /*#__PURE__*/React.createElement(Spin, {
|
|
123
127
|
spinning: _historyList === null || _historyList === void 0 ? void 0 : _historyList.loading
|
|
124
128
|
}, /*#__PURE__*/React.createElement("div", {
|
|
125
|
-
className:
|
|
126
|
-
}, getText(
|
|
129
|
+
className: 'content-hint'
|
|
130
|
+
}, getText('table-action-export-import-file-hint'), /*#__PURE__*/React.createElement("a", {
|
|
127
131
|
onClick: function onClick() {
|
|
128
132
|
return init();
|
|
129
133
|
}
|
|
130
|
-
}, getText(
|
|
134
|
+
}, getText('table-action-export-import-file-refresh'))), /*#__PURE__*/React.createElement(Table, {
|
|
131
135
|
rowClassName: "antd-table-row",
|
|
132
136
|
columns: columns,
|
|
133
137
|
dataSource: list,
|
package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js
CHANGED
|
@@ -45,7 +45,8 @@ var _batchExport = /*#__PURE__*/function () {
|
|
|
45
45
|
export var batchExport = function batchExport(exportParams, exportImport) {
|
|
46
46
|
var selectLists = exportImport.selectLists,
|
|
47
47
|
formId = exportImport.formId,
|
|
48
|
-
formCode = exportImport.formCode
|
|
48
|
+
formCode = exportImport.formCode,
|
|
49
|
+
apiUrl = exportImport.apiUrl;
|
|
49
50
|
var _name = getFileDateName();
|
|
50
51
|
var params = {};
|
|
51
52
|
if (formId) {
|
|
@@ -54,6 +55,7 @@ export var batchExport = function batchExport(exportParams, exportImport) {
|
|
|
54
55
|
if (formCode) {
|
|
55
56
|
params.code = formCode;
|
|
56
57
|
}
|
|
58
|
+
params.url = apiUrl;
|
|
57
59
|
console.log("exportParams", exportParams);
|
|
58
60
|
var type = (exportParams === null || exportParams === void 0 ? void 0 : exportParams.type) || defaultOptions.exportType;
|
|
59
61
|
|
|
@@ -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;
|
|
@@ -10,9 +10,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import { useRequest } from
|
|
14
|
-
import { Spin, Table } from
|
|
15
|
-
import React, { useEffect, useRef, useState } from
|
|
13
|
+
import { useRequest } from 'ahooks';
|
|
14
|
+
import { Spin, Table } from 'antd';
|
|
15
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
16
16
|
import useEngineContext from "../../../../../../../hooks/useEngineContext";
|
|
17
17
|
import { getText } from "../../../../../../../locales/index";
|
|
18
18
|
import { historyData } from "../../../../../serve";
|
|
@@ -29,7 +29,8 @@ var defaultData = {
|
|
|
29
29
|
var ImportLog = function ImportLog(props) {
|
|
30
30
|
var exportImport = props.exportImport;
|
|
31
31
|
var formId = exportImport.formId,
|
|
32
|
-
formCode = exportImport.formCode
|
|
32
|
+
formCode = exportImport.formCode,
|
|
33
|
+
apiUrl = exportImport.apiUrl;
|
|
33
34
|
var detailRef = useRef(null);
|
|
34
35
|
var _useState = useState([]),
|
|
35
36
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -70,23 +71,26 @@ var ImportLog = function ImportLog(props) {
|
|
|
70
71
|
});
|
|
71
72
|
var init = function init() {
|
|
72
73
|
if (defaultParams !== null && defaultParams !== void 0 && defaultParams.form_id || defaultParams !== null && defaultParams !== void 0 && defaultParams.code) {
|
|
73
|
-
|
|
74
|
+
var _defaultParams = _objectSpread(_objectSpread({}, defaultParams), {}, {
|
|
75
|
+
url: apiUrl
|
|
76
|
+
});
|
|
77
|
+
_historyList.run(_defaultParams);
|
|
74
78
|
}
|
|
75
79
|
};
|
|
76
80
|
useEffect(function () {
|
|
77
81
|
init();
|
|
78
82
|
}, [defaultParams]);
|
|
79
83
|
var columns = [{
|
|
80
|
-
title: getText(
|
|
81
|
-
dataIndex:
|
|
84
|
+
title: getText('table-action-export-import-log-name'),
|
|
85
|
+
dataIndex: 'file_name'
|
|
82
86
|
}, {
|
|
83
|
-
title: getText(
|
|
84
|
-
dataIndex:
|
|
87
|
+
title: getText('table-action-export-import-log-result'),
|
|
88
|
+
dataIndex: 'result',
|
|
85
89
|
render: function render(text, record) {
|
|
86
90
|
var _record$result;
|
|
87
|
-
return /*#__PURE__*/React.createElement("div", null, getText(
|
|
91
|
+
return /*#__PURE__*/React.createElement("div", null, getText('table-action-export-import-log-ok')((text === null || text === void 0 ? void 0 : text.success) || 0), record !== null && record !== void 0 && (_record$result = record.result) !== null && _record$result !== void 0 && _record$result.fail ? getText('table-action-export-import-log-err')((text === null || text === void 0 ? void 0 : text.fail) || 0) : null, text !== null && text !== void 0 && text.fail ? /*#__PURE__*/React.createElement("a", {
|
|
88
92
|
style: {
|
|
89
|
-
marginLeft:
|
|
93
|
+
marginLeft: '10px'
|
|
90
94
|
},
|
|
91
95
|
onClick: function onClick() {
|
|
92
96
|
var _detailRef$current, _detailRef$current$op;
|
|
@@ -94,32 +98,32 @@ var ImportLog = function ImportLog(props) {
|
|
|
94
98
|
list: [record]
|
|
95
99
|
});
|
|
96
100
|
}
|
|
97
|
-
}, getText(
|
|
101
|
+
}, getText('table-action-export-import-log-check')) : null);
|
|
98
102
|
}
|
|
99
103
|
}, {
|
|
100
|
-
title: getText(
|
|
101
|
-
dataIndex:
|
|
104
|
+
title: getText('table-action-export-import-file-account'),
|
|
105
|
+
dataIndex: 'account',
|
|
102
106
|
render: function render(text) {
|
|
103
|
-
return text ? /*#__PURE__*/React.createElement("div", null, "".concat((text === null || text === void 0 ? void 0 : text.first_name) ||
|
|
107
|
+
return text ? /*#__PURE__*/React.createElement("div", null, "".concat((text === null || text === void 0 ? void 0 : text.first_name) || '', " ").concat((text === null || text === void 0 ? void 0 : text.last_name) || '')) : null;
|
|
104
108
|
}
|
|
105
109
|
}, {
|
|
106
|
-
title: getText(
|
|
107
|
-
dataIndex:
|
|
110
|
+
title: getText('table-action-export-import-file-created'),
|
|
111
|
+
dataIndex: 'created_at',
|
|
108
112
|
render: function render(text) {
|
|
109
113
|
return formatDate(text);
|
|
110
114
|
}
|
|
111
115
|
}];
|
|
112
116
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
113
|
-
className:
|
|
117
|
+
className: 'export-history-content'
|
|
114
118
|
}, /*#__PURE__*/React.createElement(Spin, {
|
|
115
119
|
spinning: _historyList === null || _historyList === void 0 ? void 0 : _historyList.loading
|
|
116
120
|
}, /*#__PURE__*/React.createElement("div", {
|
|
117
|
-
className:
|
|
118
|
-
}, getText(
|
|
121
|
+
className: 'content-hint'
|
|
122
|
+
}, getText('table-action-export-import-log-hint'), /*#__PURE__*/React.createElement("a", {
|
|
119
123
|
onClick: function onClick() {
|
|
120
124
|
return init();
|
|
121
125
|
}
|
|
122
|
-
}, getText(
|
|
126
|
+
}, getText('table-action-export-import-file-refresh'))), /*#__PURE__*/React.createElement(Table, {
|
|
123
127
|
rowClassName: "antd-table-row",
|
|
124
128
|
columns: columns,
|
|
125
129
|
dataSource: list,
|
package/es/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;
|