@pisell/materials 1.0.402 → 1.0.404

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/build/lowcode/assets-daily.json +13 -13
  2. package/build/lowcode/assets-dev.json +4 -4
  3. package/build/lowcode/assets-prod.json +13 -13
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +16 -59
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +19 -62
  11. package/dist/umd/materials.min.css +1 -0
  12. package/dist/umd/materials.min.js +1 -0
  13. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  14. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  15. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  16. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  17. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  18. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  19. package/es/components/date-picker/index.js +2 -2
  20. package/es/components/drag-sort-tree/index.d.ts +1 -0
  21. package/es/components/drag-sort-tree/index.js +1 -2
  22. package/es/components/pisell-config-provider/index.js +0 -2
  23. package/es/components/pisellModal/components/functions/index.d.ts +5 -23
  24. package/es/components/pisellModal/components/functions/index.js +2 -7
  25. package/es/components/pisellModal/index.d.ts +5 -20
  26. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +3 -3
  27. package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.js +26 -30
  28. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.js +1 -3
  29. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +3 -3
  30. package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.js +21 -25
  31. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +3 -3
  32. package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.js +31 -34
  33. package/es/components/table/Actions/component/ExportImport/index.d.ts +3 -3
  34. package/es/components/table/Actions/component/ExportImport/index.js +25 -32
  35. package/es/components/table/BasicTable/index.js +2 -1
  36. package/es/components/table/Gallery/index.js +1 -2
  37. package/es/components/table/Table/fields/rangePicker/Edit/index.js +11 -13
  38. package/es/components/table/Table/index.d.ts +2 -2
  39. package/es/components/table/Table/index.js +42 -68
  40. package/es/components/table/Table/index.less +0 -3
  41. package/es/components/table/Table/utils.d.ts +3 -15
  42. package/es/components/table/Table/utils.js +2 -6
  43. package/es/components/table/View/index.d.ts +2 -2
  44. package/es/components/table/View/index.js +16 -20
  45. package/es/components/table/hooks/useTableSetting.js +7 -29
  46. package/es/components/table/hooks/useTransDataSource.d.ts +0 -1
  47. package/es/components/table/hooks/useTransDataSource.js +4 -6
  48. package/es/components/table/index.js +5 -8
  49. package/es/components/table/index.less +0 -4
  50. package/es/components/table/serve.d.ts +0 -1
  51. package/es/components/table/serve.js +7 -38
  52. package/es/components/table/types.d.ts +0 -2
  53. package/es/index.d.ts +1 -3
  54. package/es/index.js +1 -3
  55. package/es/locales/en-US.d.ts +0 -12
  56. package/es/locales/en-US.js +0 -13
  57. package/es/locales/zh-CN.d.ts +0 -12
  58. package/es/locales/zh-CN.js +0 -13
  59. package/es/locales/zh-TW.d.ts +0 -12
  60. package/es/locales/zh-TW.js +0 -13
  61. package/lib/components/date-picker/index.js +2 -2
  62. package/lib/components/drag-sort-tree/index.d.ts +1 -0
  63. package/lib/components/drag-sort-tree/index.js +1 -0
  64. package/lib/components/pisell-config-provider/index.js +0 -2
  65. package/lib/components/pisellModal/components/functions/index.d.ts +5 -23
  66. package/lib/components/pisellModal/components/functions/index.js +7 -13
  67. package/lib/components/pisellModal/index.d.ts +5 -20
  68. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +3 -3
  69. package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.js +2 -6
  70. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.js +1 -2
  71. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +3 -3
  72. package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.js +2 -6
  73. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +3 -3
  74. package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.js +2 -4
  75. package/lib/components/table/Actions/component/ExportImport/index.d.ts +3 -3
  76. package/lib/components/table/Actions/component/ExportImport/index.js +8 -13
  77. package/lib/components/table/BasicTable/index.js +2 -1
  78. package/lib/components/table/Gallery/index.js +1 -2
  79. package/lib/components/table/Table/fields/rangePicker/Edit/index.js +9 -1
  80. package/lib/components/table/Table/index.d.ts +2 -2
  81. package/lib/components/table/Table/index.js +34 -61
  82. package/lib/components/table/Table/index.less +0 -3
  83. package/lib/components/table/Table/utils.d.ts +3 -15
  84. package/lib/components/table/Table/utils.js +1 -7
  85. package/lib/components/table/View/index.d.ts +2 -2
  86. package/lib/components/table/View/index.js +19 -23
  87. package/lib/components/table/hooks/useTableSetting.js +11 -26
  88. package/lib/components/table/hooks/useTransDataSource.d.ts +0 -1
  89. package/lib/components/table/hooks/useTransDataSource.js +4 -5
  90. package/lib/components/table/index.js +4 -5
  91. package/lib/components/table/index.less +0 -4
  92. package/lib/components/table/serve.d.ts +0 -1
  93. package/lib/components/table/serve.js +4 -24
  94. package/lib/components/table/types.d.ts +0 -2
  95. package/lib/index.d.ts +1 -3
  96. package/lib/index.js +0 -6
  97. package/lib/locales/en-US.d.ts +0 -12
  98. package/lib/locales/en-US.js +0 -13
  99. package/lib/locales/zh-CN.d.ts +0 -12
  100. package/lib/locales/zh-CN.js +0 -13
  101. package/lib/locales/zh-TW.d.ts +0 -12
  102. package/lib/locales/zh-TW.js +0 -13
  103. package/package.json +3 -3
  104. package/es/components/browserSelect/chevron-down.png +0 -0
  105. package/es/components/browserSelect/index.d.ts +0 -15
  106. package/es/components/browserSelect/index.js +0 -36
  107. package/es/components/browserSelect/index.less +0 -18
  108. package/es/components/date-picker/constants.d.ts +0 -39
  109. package/es/components/date-picker/constants.js +0 -76
  110. package/es/components/date-picker/datePickerCpt.d.ts +0 -8
  111. package/es/components/date-picker/datePickerCpt.js +0 -370
  112. package/es/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
  113. package/es/components/date-picker/hooks/useMediaQuery.js +0 -28
  114. package/es/components/date-picker/index.less +0 -1880
  115. package/es/components/picker-view/index.d.ts +0 -2
  116. package/es/components/picker-view/index.js +0 -2
  117. package/es/components/pisellTags/index.d.ts +0 -13
  118. package/es/components/pisellTags/index.js +0 -83
  119. package/es/components/pisellTags/index.less +0 -17
  120. package/es/components/pisellTags/utils.d.ts +0 -1
  121. package/es/components/pisellTags/utils.js +0 -89
  122. package/lib/components/browserSelect/chevron-down.png +0 -0
  123. package/lib/components/browserSelect/index.d.ts +0 -15
  124. package/lib/components/browserSelect/index.js +0 -59
  125. package/lib/components/browserSelect/index.less +0 -18
  126. package/lib/components/date-picker/constants.d.ts +0 -39
  127. package/lib/components/date-picker/constants.js +0 -78
  128. package/lib/components/date-picker/datePickerCpt.d.ts +0 -8
  129. package/lib/components/date-picker/datePickerCpt.js +0 -403
  130. package/lib/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
  131. package/lib/components/date-picker/hooks/useMediaQuery.js +0 -43
  132. package/lib/components/date-picker/index.less +0 -1880
  133. package/lib/components/picker-view/index.d.ts +0 -2
  134. package/lib/components/picker-view/index.js +0 -36
  135. package/lib/components/pisellTags/index.d.ts +0 -13
  136. package/lib/components/pisellTags/index.js +0 -113
  137. package/lib/components/pisellTags/index.less +0 -17
  138. package/lib/components/pisellTags/utils.d.ts +0 -1
  139. package/lib/components/pisellTags/utils.js +0 -86
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M8 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM8 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 13a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 6a1 1 0 1 0 0-2 1 1 0 0 0 0 2ZM16 20a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12.707 4.293a1 1 0 0 1 0 1.414L7.414 11H19a1 1 0 1 1 0 2H7.414l5.293 5.293a1 1 0 0 1-1.414 1.414l-7-7a1 1 0 0 1 0-1.414l7-7a1 1 0 0 1 1.414 0Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M11.293 4.293a1 1 0 0 1 1.414 0l7 7a1 1 0 0 1 0 1.414l-7 7a1 1 0 0 1-1.414-1.414L16.586 13H5a1 1 0 1 1 0-2h11.586l-5.293-5.293a1 1 0 0 1 0-1.414Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M2 6a1 1 0 0 1 1-1h18a1 1 0 1 1 0 2H3a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h12a1 1 0 1 1 0 2H6a1 1 0 0 1-1-1Zm3 6a1 1 0 0 1 1-1h6a1 1 0 1 1 0 2H9a1 1 0 0 1-1-1Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-18ZM1 12C1 5.925 5.925 1 12 1s11 4.925 11 11-4.925 11-11 11S1 18.075 1 12Zm11.258-3.976a2 2 0 0 0-2.225 1.308 1 1 0 1 1-1.886-.664 4 4 0 0 1 7.773 1.333c0 1.53-1.135 2.54-1.945 3.081a8.044 8.044 0 0 1-1.686.848l-.035.013-.011.003-.004.002h-.002L11.92 13l.316.949a1 1 0 0 1-.633-1.897l.016-.006.074-.027a6.051 6.051 0 0 0 1.172-.6c.69-.46 1.055-.95 1.055-1.419v-.001a2 2 0 0 0-1.662-1.975ZM11 17a1 1 0 0 1 1-1h.01a1 1 0 1 1 0 2H12a1 1 0 0 1-1-1Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg width="24" height="24" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.293 3.293a1 1 0 0 1 1.414 0l4 4a1 1 0 0 1-1.414 1.414L8 6.414V20a1 1 0 1 1-2 0V6.414L3.707 8.707a1 1 0 0 1-1.414-1.414l4-4ZM16 17.586V4a1 1 0 1 1 2 0v13.586l2.293-2.293a1 1 0 0 1 1.414 1.414l-4 4a1 1 0 0 1-1.414 0l-4-4a1 1 0 0 1 1.414-1.414L16 17.586Z"/></svg>
@@ -1,15 +1,15 @@
1
+ import { DatePicker as OriginalDatePicker } from 'antd';
1
2
  import { withMomentProps } from "../../utils/hoc";
2
3
  import dayjs from 'dayjs';
3
4
  import { RangePicker, OldPisellDateRangePicker } from "@pisell/date-picker";
4
5
  import localeData from 'dayjs/plugin/localeData';
5
6
  import weekday from 'dayjs/plugin/weekday';
6
- import DatePickerCpt from "./datePickerCpt";
7
7
  dayjs.extend(weekday);
8
8
  dayjs.extend(localeData);
9
9
 
10
10
  // const OriginalRangePicker = OriginalDatePicker.RangePicker;
11
11
 
12
- var DatePicker = withMomentProps(DatePickerCpt, ['defaultPickerValue', 'defaultValue', 'showTime.defaultValue', 'value']);
12
+ var DatePicker = withMomentProps(OriginalDatePicker, ['defaultPickerValue', 'defaultValue', 'showTime.defaultValue', 'value']);
13
13
 
14
14
  // const RangePicker = withMomentProps(OriginalRangePicker, [
15
15
  // 'defaultPickerValue',
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import './index.less';
2
3
  import { SortType } from './types';
3
4
  declare const DragSortTree: (props: SortType) => React.JSX.Element;
4
5
  export default DragSortTree;
@@ -13,8 +13,7 @@ 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 './index.less';
17
-
16
+ import "./index.less";
18
17
  var DragSortTree = function DragSortTree(props) {
19
18
  var value = props.value,
20
19
  rowKey = props.rowKey,
@@ -4,7 +4,6 @@ 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";
8
7
  var platformMap = {
9
8
  phone: 'h5',
10
9
  pc: 'pc',
@@ -29,7 +28,6 @@ var PisellConfigProvider = function PisellConfigProvider(props) {
29
28
  };
30
29
  var staticFunction = App.useApp();
31
30
  setMessage(staticFunction.message);
32
- setModal(staticFunction.modal);
33
31
  globalConfig.setConfig(config);
34
32
  return /*#__PURE__*/React.createElement(PisellContext.Provider, {
35
33
  value: config
@@ -1,30 +1,12 @@
1
1
  import { ModalFuncProps } from 'antd';
2
- import { useAppProps } from 'antd/es/app/context';
3
2
  import { PisellContextType } from '../../../pisell-config-provider/context';
4
3
  import './index.less';
5
- declare const setModal: (m: useAppProps['modal']) => void;
6
4
  export interface PisellModalFuncProps extends ModalFuncProps {
7
5
  platform?: PisellContextType['platform'];
8
6
  }
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
- };
7
+ export declare const info: (props: PisellModalFuncProps) => any;
8
+ export declare const success: (props: PisellModalFuncProps) => any;
9
+ export declare const error: (props: PisellModalFuncProps) => any;
10
+ export declare const warning: (props: PisellModalFuncProps) => any;
25
11
  export declare const warn: (props: PisellModalFuncProps) => any;
26
- export declare const confirm: (props: PisellModalFuncProps) => {
27
- destroy: () => void;
28
- update: (configUpdate: ModalFuncProps | ((prevConfig: ModalFuncProps) => ModalFuncProps)) => void;
29
- };
30
- export { setModal };
12
+ export declare const confirm: (props: PisellModalFuncProps) => any;
@@ -4,19 +4,15 @@ 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";
7
8
  import classNames from 'classnames';
8
9
  import { globalConfig } from "../../../pisell-config-provider/context";
9
10
  import "./index.less";
10
- var Modal;
11
- var setModal = function setModal(m) {
12
- Modal = m;
13
- };
14
11
  var genConfig = function genConfig(props) {
15
12
  var _globalConfig$getConf = globalConfig.getConfig(),
16
13
  platform = _globalConfig$getConf.platform;
17
14
  return _objectSpread(_objectSpread({}, props), {}, {
18
15
  wrapClassName: classNames('pisell-modal-function-wrap', _defineProperty({}, 'pisell-modal-mobile-function-wrap', platform === 'h5')),
19
- transitionName: "pisell-move-down",
20
16
  cancelButtonProps: _objectSpread({
21
17
  block: true,
22
18
  size: 'large'
@@ -45,5 +41,4 @@ export var warn = function warn(props) {
45
41
  };
46
42
  export var confirm = function confirm(props) {
47
43
  return Modal.confirm(genConfig(props));
48
- };
49
- export { setModal };
44
+ };
@@ -32,27 +32,12 @@ 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
- 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
- };
35
+ confirm: (props: import("./components/functions").PisellModalFuncProps) => any;
36
+ info: (props: import("./components/functions").PisellModalFuncProps) => any;
37
+ error: (props: import("./components/functions").PisellModalFuncProps) => any;
47
38
  warn: (props: import("./components/functions").PisellModalFuncProps) => any;
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
- };
39
+ warning: (props: import("./components/functions").PisellModalFuncProps) => any;
40
+ success: (props: import("./components/functions").PisellModalFuncProps) => any;
56
41
  Information: (props: import("./components/Information").InformationProps) => React.JSX.Element;
57
42
  };
58
43
  export default PisellModal;
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { ExportImportType } from '../../../../../types';
3
- import './index.less';
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 'ahooks';
14
- import { Spin, Table } from 'antd';
15
- import React, { useEffect, useState } from 'react';
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,16 +27,15 @@ var defaultData = {
27
27
  num: 10
28
28
  };
29
29
  var exportStatusOptions = {
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')
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,
39
- apiUrl = exportImport.apiUrl;
38
+ formCode = exportImport.formCode;
40
39
  var _useState = useState([]),
41
40
  _useState2 = _slicedToArray(_useState, 2),
42
41
  list = _useState2[0],
@@ -76,62 +75,59 @@ var ExportFile = function ExportFile(props) {
76
75
  });
77
76
  var init = function init() {
78
77
  if (defaultParams !== null && defaultParams !== void 0 && defaultParams.form_id || defaultParams !== null && defaultParams !== void 0 && defaultParams.code) {
79
- var _defaultParams = _objectSpread(_objectSpread({}, defaultParams), {}, {
80
- url: apiUrl
81
- });
82
- _historyList.run(_defaultParams);
78
+ _historyList.run(defaultParams);
83
79
  }
84
80
  };
85
81
  useEffect(function () {
86
82
  init();
87
83
  }, [defaultParams]);
88
84
  var columns = [{
89
- title: getText('table-action-export-import-file-name'),
90
- dataIndex: 'file_name',
85
+ title: getText("table-action-export-import-file-name"),
86
+ dataIndex: "file_name",
91
87
  render: function render(text, record) {
92
- return /*#__PURE__*/React.createElement(React.Fragment, null, record.status == 'completed' || record.status == 'complete' ? /*#__PURE__*/React.createElement("a", {
88
+ return /*#__PURE__*/React.createElement(React.Fragment, null, record.status == "completed" || record.status == "complete" ? /*#__PURE__*/React.createElement("a", {
93
89
  onClick: function onClick() {
94
90
  download(record.url, text);
95
91
  }
96
92
  }, text) : /*#__PURE__*/React.createElement("span", null, text));
97
93
  }
98
94
  }, {
99
- title: getText('table-action-export-import-file-content'),
100
- dataIndex: 'setting',
95
+ title: getText("table-action-export-import-file-content"),
96
+ dataIndex: "setting",
101
97
  render: function render(text, record) {
102
98
  var _text$params, _text$params$ids, _record$result;
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)));
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("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)));
104
100
  }
105
101
  }, {
106
- title: getText('table-action-export-import-file-status'),
107
- dataIndex: 'status',
102
+ title: getText("table-action-export-import-file-status"),
103
+ dataIndex: "status",
108
104
  render: function render(text) {
109
105
  return exportStatusOptions[text];
110
106
  }
111
107
  }, {
112
- title: getText('table-action-export-import-file-account'),
113
- dataIndex: 'account',
108
+ title: getText("table-action-export-import-file-account"),
109
+ dataIndex: "account",
114
110
  render: function render(text) {
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;
111
+ 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;
116
112
  }
117
113
  }, {
118
- title: getText('table-action-export-import-file-created'),
119
- dataIndex: 'created_at',
114
+ title: getText("table-action-export-import-file-created"),
115
+ dataIndex: "created_at",
120
116
  render: function render(text) {
121
117
  return formatDate(text);
122
118
  }
123
119
  }];
124
120
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
125
- className: 'export-history-content'
121
+ className: "export-history-content"
126
122
  }, /*#__PURE__*/React.createElement(Spin, {
127
123
  spinning: _historyList === null || _historyList === void 0 ? void 0 : _historyList.loading
128
124
  }, /*#__PURE__*/React.createElement("div", {
129
- className: 'content-hint'
130
- }, getText('table-action-export-import-file-hint'), /*#__PURE__*/React.createElement("a", {
125
+ className: "content-hint"
126
+ }, getText("table-action-export-import-file-hint"), /*#__PURE__*/React.createElement("a", {
131
127
  onClick: function onClick() {
132
128
  return init();
133
129
  }
134
- }, getText('table-action-export-import-file-refresh'))), /*#__PURE__*/React.createElement(Table, {
130
+ }, getText("table-action-export-import-file-refresh"))), /*#__PURE__*/React.createElement(Table, {
135
131
  rowClassName: "antd-table-row",
136
132
  columns: columns,
137
133
  dataSource: list,
@@ -45,8 +45,7 @@ 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,
49
- apiUrl = exportImport.apiUrl;
48
+ formCode = exportImport.formCode;
50
49
  var _name = getFileDateName();
51
50
  var params = {};
52
51
  if (formId) {
@@ -55,7 +54,6 @@ export var batchExport = function batchExport(exportParams, exportImport) {
55
54
  if (formCode) {
56
55
  params.code = formCode;
57
56
  }
58
- params.url = apiUrl;
59
57
  console.log("exportParams", exportParams);
60
58
  var type = (exportParams === null || exportParams === void 0 ? void 0 : exportParams.type) || defaultOptions.exportType;
61
59
 
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { ExportImportType } from '../../../../../types';
3
- import './index.less';
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 'ahooks';
14
- import { Spin, Table } from 'antd';
15
- import React, { useEffect, useRef, useState } from 'react';
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,8 +29,7 @@ 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,
33
- apiUrl = exportImport.apiUrl;
32
+ formCode = exportImport.formCode;
34
33
  var detailRef = useRef(null);
35
34
  var _useState = useState([]),
36
35
  _useState2 = _slicedToArray(_useState, 2),
@@ -71,26 +70,23 @@ var ImportLog = function ImportLog(props) {
71
70
  });
72
71
  var init = function init() {
73
72
  if (defaultParams !== null && defaultParams !== void 0 && defaultParams.form_id || defaultParams !== null && defaultParams !== void 0 && defaultParams.code) {
74
- var _defaultParams = _objectSpread(_objectSpread({}, defaultParams), {}, {
75
- url: apiUrl
76
- });
77
- _historyList.run(_defaultParams);
73
+ _historyList.run(defaultParams);
78
74
  }
79
75
  };
80
76
  useEffect(function () {
81
77
  init();
82
78
  }, [defaultParams]);
83
79
  var columns = [{
84
- title: getText('table-action-export-import-log-name'),
85
- dataIndex: 'file_name'
80
+ title: getText("table-action-export-import-log-name"),
81
+ dataIndex: "file_name"
86
82
  }, {
87
- title: getText('table-action-export-import-log-result'),
88
- dataIndex: 'result',
83
+ title: getText("table-action-export-import-log-result"),
84
+ dataIndex: "result",
89
85
  render: function render(text, record) {
90
86
  var _record$result;
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", {
87
+ 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", {
92
88
  style: {
93
- marginLeft: '10px'
89
+ marginLeft: "10px"
94
90
  },
95
91
  onClick: function onClick() {
96
92
  var _detailRef$current, _detailRef$current$op;
@@ -98,32 +94,32 @@ var ImportLog = function ImportLog(props) {
98
94
  list: [record]
99
95
  });
100
96
  }
101
- }, getText('table-action-export-import-log-check')) : null);
97
+ }, getText("table-action-export-import-log-check")) : null);
102
98
  }
103
99
  }, {
104
- title: getText('table-action-export-import-file-account'),
105
- dataIndex: 'account',
100
+ title: getText("table-action-export-import-file-account"),
101
+ dataIndex: "account",
106
102
  render: function render(text) {
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;
103
+ 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;
108
104
  }
109
105
  }, {
110
- title: getText('table-action-export-import-file-created'),
111
- dataIndex: 'created_at',
106
+ title: getText("table-action-export-import-file-created"),
107
+ dataIndex: "created_at",
112
108
  render: function render(text) {
113
109
  return formatDate(text);
114
110
  }
115
111
  }];
116
112
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
117
- className: 'export-history-content'
113
+ className: "export-history-content"
118
114
  }, /*#__PURE__*/React.createElement(Spin, {
119
115
  spinning: _historyList === null || _historyList === void 0 ? void 0 : _historyList.loading
120
116
  }, /*#__PURE__*/React.createElement("div", {
121
- className: 'content-hint'
122
- }, getText('table-action-export-import-log-hint'), /*#__PURE__*/React.createElement("a", {
117
+ className: "content-hint"
118
+ }, getText("table-action-export-import-log-hint"), /*#__PURE__*/React.createElement("a", {
123
119
  onClick: function onClick() {
124
120
  return init();
125
121
  }
126
- }, getText('table-action-export-import-file-refresh'))), /*#__PURE__*/React.createElement(Table, {
122
+ }, getText("table-action-export-import-file-refresh"))), /*#__PURE__*/React.createElement(Table, {
127
123
  rowClassName: "antd-table-row",
128
124
  columns: columns,
129
125
  dataSource: list,
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { ExportImportType } from '../../../../../types';
3
- import './index.less';
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;
@@ -8,9 +8,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
8
8
  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; }
9
9
  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; } }
10
10
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
11
- import { InboxOutlined } from '@ant-design/icons';
12
- import { Button, message } from 'antd';
13
- import React, { useMemo, useState } from 'react';
11
+ import { InboxOutlined } from "@ant-design/icons";
12
+ import { Button, message } from "antd";
13
+ import React, { useMemo, useState } from "react";
14
14
  import useEngineContext from "../../../../../../../hooks/useEngineContext";
15
15
  import { getText } from "../../../../../../../locales/index";
16
16
  import IconFont from "../../../../../../iconfont";
@@ -26,8 +26,7 @@ var ImportTable = function ImportTable(props) {
26
26
  errorStatus = props.errorStatus;
27
27
  var formId = exportImport.formId,
28
28
  formCode = exportImport.formCode,
29
- templateFileUrl = exportImport.templateFileUrl,
30
- apiUrl = exportImport.apiUrl;
29
+ templateFileUrl = exportImport.templateFileUrl;
31
30
 
32
31
  // 当前上传列表
33
32
  var _useState = useState(null),
@@ -53,12 +52,10 @@ var ImportTable = function ImportTable(props) {
53
52
  break;
54
53
  case 4:
55
54
  message.loading({
56
- content: 'Loading...',
55
+ content: "Loading...",
57
56
  key: loadingKey
58
57
  });
59
- params = {
60
- url: apiUrl
61
- };
58
+ params = {};
62
59
  if (formId) {
63
60
  params.form_id = formId;
64
61
  }
@@ -73,7 +70,7 @@ var ImportTable = function ImportTable(props) {
73
70
  download(data === null || data === void 0 ? void 0 : data.url);
74
71
  case 13:
75
72
  message.success({
76
- content: getText('table-action-export-import-table-success-download'),
73
+ content: getText("table-action-export-import-table-success-download"),
77
74
  key: loadingKey
78
75
  });
79
76
  case 14:
@@ -88,62 +85,62 @@ var ImportTable = function ImportTable(props) {
88
85
  }();
89
86
  var fileType = useMemo(function () {
90
87
  if (file) {
91
- return file.type.indexOf('/csv') !== -1 ? 'csv' : 'excel';
88
+ return file.type.indexOf("/csv") !== -1 ? "csv" : "excel";
92
89
  }
93
- return '';
90
+ return "";
94
91
  }, [file]);
95
92
  var fileName = useMemo(function () {
96
93
  if (file) {
97
94
  return file.name;
98
95
  }
99
- return '';
96
+ return "";
100
97
  }, [file]);
101
98
  var _handleSelectFile = function _handleSelectFile(e) {
102
99
  var _e$target;
103
100
  var _file = e !== null && e !== void 0 && (_e$target = e.target) !== null && _e$target !== void 0 && _e$target.files ? e.target.files[0] : null;
104
101
  if (_file) {
105
- if (_file.name.indexOf('.csv') === -1 && _file.name.indexOf('.xls') === -1 && _file.name.indexOf('.xlsx') === -1) {
106
- return message.error(getText('table-action-export-import-table-error-file'));
102
+ if (_file.name.indexOf(".csv") === -1 && _file.name.indexOf(".xls") === -1 && _file.name.indexOf(".xlsx") === -1) {
103
+ return message.error(getText("table-action-export-import-table-error-file"));
107
104
  }
108
105
  onChange(_file);
109
106
  setFile(_file);
110
107
  }
111
108
  };
112
109
  return /*#__PURE__*/React.createElement(React.Fragment, null, errorStatus ? /*#__PURE__*/React.createElement("div", {
113
- className: 'error-hint'
110
+ className: "error-hint"
114
111
  }, /*#__PURE__*/React.createElement(IconFont, {
115
112
  type: "icontixingshixin",
116
- className: 'error-icon'
113
+ className: "error-icon"
117
114
  }), /*#__PURE__*/React.createElement("div", {
118
- className: 'text'
115
+ className: "text"
119
116
  }, errorStatus)) : null, /*#__PURE__*/React.createElement("div", {
120
- className: 'import-title'
121
- }, getText('table-action-export-import-table-text-click-download'), /*#__PURE__*/React.createElement("a", {
117
+ className: "import-title"
118
+ }, getText("table-action-export-import-table-text-click-download"), /*#__PURE__*/React.createElement("a", {
122
119
  onClick: handleDownload
123
- }, getText('table-action-export-import-table-text-product-template'))), file ? /*#__PURE__*/React.createElement("div", {
124
- className: 'file-list'
120
+ }, getText("table-action-export-import-table-text-product-template"))), file ? /*#__PURE__*/React.createElement("div", {
121
+ className: "file-list"
125
122
  }, /*#__PURE__*/React.createElement(IconFont, {
126
- type: fileType === 'csv' ? 'icon-csv' : 'icon-excel',
127
- className: 'file-icon'
123
+ type: fileType === "csv" ? "icon-csv" : "icon-excel",
124
+ className: "file-icon"
128
125
  }), /*#__PURE__*/React.createElement("div", {
129
- className: 'file-name'
130
- }, fileName), /*#__PURE__*/React.createElement(Button, null, getText('table-action-export-import-table-text-edit-file'), /*#__PURE__*/React.createElement("input", {
126
+ className: "file-name"
127
+ }, fileName), /*#__PURE__*/React.createElement(Button, null, getText("table-action-export-import-table-text-edit-file"), /*#__PURE__*/React.createElement("input", {
131
128
  accept: ".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",
132
- className: 'upload-input',
129
+ className: "upload-input",
133
130
  type: "file",
134
131
  onChange: _handleSelectFile,
135
132
  value: ""
136
133
  }))) : /*#__PURE__*/React.createElement("div", {
137
- className: 'default-view'
134
+ className: "default-view"
138
135
  }, /*#__PURE__*/React.createElement("div", {
139
- className: 'icon-wrap'
136
+ className: "icon-wrap"
140
137
  }, /*#__PURE__*/React.createElement(InboxOutlined, null)), /*#__PURE__*/React.createElement("p", {
141
- className: 'text'
142
- }, getText('table-action-export-import-table-text-input-title')), /*#__PURE__*/React.createElement("p", {
143
- className: 'hint'
144
- }, getText('table-action-export-import-table-text-input-describe')), /*#__PURE__*/React.createElement("input", {
138
+ className: "text"
139
+ }, getText("table-action-export-import-table-text-input-title")), /*#__PURE__*/React.createElement("p", {
140
+ className: "hint"
141
+ }, getText("table-action-export-import-table-text-input-describe")), /*#__PURE__*/React.createElement("input", {
145
142
  accept: ".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel",
146
- className: 'upload-input',
143
+ className: "upload-input",
147
144
  type: "file",
148
145
  onChange: _handleSelectFile,
149
146
  value: ""
@@ -1,6 +1,6 @@
1
- import React from 'react';
2
- import { ExportImportType } from '../../../types';
3
- import './index.less';
1
+ import React from "react";
2
+ import { ExportImportType } from "../../../types";
3
+ import "./index.less";
4
4
  declare type ExportImportProps = {
5
5
  exportImport: ExportImportType;
6
6
  };