@pisell/materials 1.0.393 → 1.0.395

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 (103) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +13 -13
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +16 -16
  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/table/Actions/component/ExportImport/index.js +4 -5
  26. package/es/components/table/BasicTable/index.js +1 -0
  27. package/es/components/table/Gallery/index.js +1 -2
  28. package/es/components/table/Table/fields/rangePicker/Edit/index.js +11 -13
  29. package/es/components/table/Table/index.js +1 -2
  30. package/es/components/table/Table/utils.d.ts +2 -14
  31. package/es/components/table/Table/utils.js +2 -6
  32. package/es/components/table/hooks/useTableSetting.js +5 -26
  33. package/es/components/table/hooks/useTransDataSource.d.ts +0 -1
  34. package/es/components/table/hooks/useTransDataSource.js +4 -6
  35. package/es/index.d.ts +1 -3
  36. package/es/index.js +1 -3
  37. package/es/locales/en-US.d.ts +0 -12
  38. package/es/locales/en-US.js +0 -13
  39. package/es/locales/zh-CN.d.ts +0 -12
  40. package/es/locales/zh-CN.js +0 -13
  41. package/es/locales/zh-TW.d.ts +0 -12
  42. package/es/locales/zh-TW.js +0 -13
  43. package/lib/components/date-picker/index.js +2 -2
  44. package/lib/components/drag-sort-tree/index.d.ts +1 -0
  45. package/lib/components/drag-sort-tree/index.js +1 -0
  46. package/lib/components/pisell-config-provider/index.js +0 -2
  47. package/lib/components/pisellModal/components/functions/index.d.ts +5 -23
  48. package/lib/components/pisellModal/components/functions/index.js +7 -13
  49. package/lib/components/table/Actions/component/ExportImport/index.js +5 -5
  50. package/lib/components/table/BasicTable/index.js +1 -0
  51. package/lib/components/table/Gallery/index.js +1 -2
  52. package/lib/components/table/Table/fields/rangePicker/Edit/index.js +9 -1
  53. package/lib/components/table/Table/index.js +1 -2
  54. package/lib/components/table/Table/utils.d.ts +2 -14
  55. package/lib/components/table/Table/utils.js +1 -7
  56. package/lib/components/table/hooks/useTableSetting.js +9 -23
  57. package/lib/components/table/hooks/useTransDataSource.d.ts +0 -1
  58. package/lib/components/table/hooks/useTransDataSource.js +4 -5
  59. package/lib/index.d.ts +1 -3
  60. package/lib/index.js +0 -6
  61. package/lib/locales/en-US.d.ts +0 -12
  62. package/lib/locales/en-US.js +0 -13
  63. package/lib/locales/zh-CN.d.ts +0 -12
  64. package/lib/locales/zh-CN.js +0 -13
  65. package/lib/locales/zh-TW.d.ts +0 -12
  66. package/lib/locales/zh-TW.js +0 -13
  67. package/package.json +3 -3
  68. package/es/components/browserSelect/chevron-down.png +0 -0
  69. package/es/components/browserSelect/index.d.ts +0 -15
  70. package/es/components/browserSelect/index.js +0 -36
  71. package/es/components/browserSelect/index.less +0 -18
  72. package/es/components/date-picker/constants.d.ts +0 -39
  73. package/es/components/date-picker/constants.js +0 -76
  74. package/es/components/date-picker/datePickerCpt.d.ts +0 -8
  75. package/es/components/date-picker/datePickerCpt.js +0 -370
  76. package/es/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
  77. package/es/components/date-picker/hooks/useMediaQuery.js +0 -28
  78. package/es/components/date-picker/index.less +0 -1880
  79. package/es/components/picker-view/index.d.ts +0 -2
  80. package/es/components/picker-view/index.js +0 -2
  81. package/es/components/pisellTags/index.d.ts +0 -13
  82. package/es/components/pisellTags/index.js +0 -83
  83. package/es/components/pisellTags/index.less +0 -17
  84. package/es/components/pisellTags/utils.d.ts +0 -1
  85. package/es/components/pisellTags/utils.js +0 -89
  86. package/lib/components/browserSelect/chevron-down.png +0 -0
  87. package/lib/components/browserSelect/index.d.ts +0 -15
  88. package/lib/components/browserSelect/index.js +0 -59
  89. package/lib/components/browserSelect/index.less +0 -18
  90. package/lib/components/date-picker/constants.d.ts +0 -39
  91. package/lib/components/date-picker/constants.js +0 -78
  92. package/lib/components/date-picker/datePickerCpt.d.ts +0 -8
  93. package/lib/components/date-picker/datePickerCpt.js +0 -403
  94. package/lib/components/date-picker/hooks/useMediaQuery.d.ts +0 -2
  95. package/lib/components/date-picker/hooks/useMediaQuery.js +0 -43
  96. package/lib/components/date-picker/index.less +0 -1880
  97. package/lib/components/picker-view/index.d.ts +0 -2
  98. package/lib/components/picker-view/index.js +0 -36
  99. package/lib/components/pisellTags/index.d.ts +0 -13
  100. package/lib/components/pisellTags/index.js +0 -113
  101. package/lib/components/pisellTags/index.less +0 -17
  102. package/lib/components/pisellTags/utils.d.ts +0 -1
  103. 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
+ };
@@ -34,7 +34,6 @@ var Com = {
34
34
  import_log: ImportLog
35
35
  };
36
36
  var ExportImport = function ExportImport(_ref) {
37
- var _context$appHelper, _context$appHelper$ut;
38
37
  var exportImport = _ref.exportImport;
39
38
  var _useState = useState(false),
40
39
  _useState2 = _slicedToArray(_useState, 2),
@@ -61,7 +60,7 @@ var ExportImport = function ExportImport(_ref) {
61
60
  var originResultDataSource = state.originResultDataSource,
62
61
  currentDataSource = state.currentDataSource;
63
62
  var context = useEngineContext();
64
- request.setRequest((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : (_context$appHelper$ut = _context$appHelper.utils) === null || _context$appHelper$ut === void 0 ? void 0 : _context$appHelper$ut.request);
63
+ request.setRequest(context.appHelper.utils.request);
65
64
  var _items = useMemo(function () {
66
65
  // 将对象转成数组
67
66
  var result = Object.entries(exportImportOptions).map(function (_ref2) {
@@ -76,9 +75,9 @@ var ExportImport = function ExportImport(_ref) {
76
75
  return result;
77
76
  }, []);
78
77
  var Content = useMemo(function () {
79
- var _value = value || defaultOptions.importValue;
80
- return Com[_value];
81
- }, [value, defaultOptions.importValue]);
78
+ if (!value) return null;
79
+ return Com[value];
80
+ }, [value]);
82
81
  var _footer = useMemo(function () {
83
82
  var types = defaultOptions.footerHintTypes;
84
83
  if (types.includes(value)) {
@@ -84,6 +84,7 @@ var BasicTable = function BasicTable(props) {
84
84
  total: _total
85
85
  };
86
86
  }, [localPagination, dataSource, formPagination === null || formPagination === void 0 ? void 0 : formPagination.page, formPagination === null || formPagination === void 0 ? void 0 : formPagination.size, filter, sort, other.columns]);
87
+ console.log(pagination, 'wh8888');
87
88
 
88
89
  // 总数
89
90
  var total = useMemo(function () {
@@ -46,8 +46,7 @@ var Gallery = function Gallery(props) {
46
46
  form: form,
47
47
  localPagination: !!(pagination !== null && pagination !== void 0 && pagination.localPagination),
48
48
  rowKey: rowKey,
49
- filter: filter,
50
- currentView: 'gallery'
49
+ filter: filter
51
50
  });
52
51
  useEffect(function () {
53
52
  onDataSourceChange === null || onDataSourceChange === void 0 ? void 0 : onDataSourceChange(dataSource);
@@ -1,4 +1,3 @@
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
1
  var _excluded = ["value", "onChange", "onPressEnter", "onBlur", "style", "bordered", "presets", "showTime", "format"];
3
2
  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
3
  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; }
@@ -6,9 +5,10 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
6
5
  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
6
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
7
  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); }
8
+ 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); }
9
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
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 { isArr, isString } from "@pisell/utils";
11
+ import { isArr, isBoolean, isString } from "@pisell/utils";
12
12
  import dayjs from "dayjs";
13
13
  import React, { forwardRef, useMemo } from "react";
14
14
  import DatePicker from "../../../../../date-picker";
@@ -64,19 +64,17 @@ var Edit = function Edit(props, ref) {
64
64
  label: getText("table-action-range-picker-presets-last-90-day"),
65
65
  value: [dayjs().add(-90, "d").startOf("day"), dayjs().endOf("day")]
66
66
  }];
67
-
68
- // const _showTime = useMemo(() => {
69
- // if (isBoolean(showTime)) {
70
- // return showTime;
71
- // } else if (typeof showTime === "object") {
72
- // return showTime;
73
- // }
74
- // return true;
75
- // }, [showTime]);
76
-
67
+ var _showTime = useMemo(function () {
68
+ if (isBoolean(showTime)) {
69
+ return showTime;
70
+ } else if (_typeof(showTime) === "object") {
71
+ return showTime;
72
+ }
73
+ return true;
74
+ }, [showTime]);
77
75
  return /*#__PURE__*/React.createElement(RangePicker, _extends({}, others, {
78
76
  format: format,
79
- showTime: showTime,
77
+ showTime: _showTime,
80
78
  presets: presets || rangePresets,
81
79
  ref: ref,
82
80
  value: dayjsVal,
@@ -85,8 +85,7 @@ var GridViewTable = function GridViewTable(_ref) {
85
85
  form: form,
86
86
  localPagination: !!(tableProps !== null && tableProps !== void 0 && (_tableProps$paginatio2 = tableProps.pagination) !== null && _tableProps$paginatio2 !== void 0 && _tableProps$paginatio2.localPagination),
87
87
  rowKey: tableProps.rowKey,
88
- filter: filter,
89
- currentView: 'table'
88
+ filter: filter
90
89
  });
91
90
  useEffect(function () {
92
91
  dispatch({
@@ -81,10 +81,7 @@ export declare const setTableSettingToLocalStorage: ({ tableId, tableSettingObj,
81
81
  }>;
82
82
  currentViewMode: ModeType;
83
83
  currentSettingHash: string;
84
- }) => {
85
- key: string;
86
- value: Record<string, any>;
87
- } | undefined;
84
+ }) => void;
88
85
  export declare const clearTableSettingToLocalStorage: (tableId?: string) => void;
89
86
  /**
90
87
  * 从本地存储中获取表格设置, 全部配置
@@ -115,16 +112,7 @@ export declare const setFormValuesToLocalStorage: ({ tableId, allValues, keys, c
115
112
  keys?: string[] | undefined;
116
113
  currentViewMode: ModeType;
117
114
  currentSettingHash: string;
118
- }) => {
119
- key: string;
120
- value: Record<string, any>;
121
- } | undefined;
122
- /**
123
- * 获取表格键值
124
- * @param tableId 表格ID
125
- * @returns 返回格式化后的表格键值
126
- */
127
- export declare const getTableKey: (tableId: string) => string;
115
+ }) => void;
128
116
  /**
129
117
  * 合并筛选设置
130
118
  * @param list 列表数据
@@ -271,10 +271,6 @@ export var setTableSettingToLocalStorage = function setTableSettingToLocalStorag
271
271
  currentSettingHash: currentSettingHash
272
272
  }, currentViewMode, _objectSpread(_objectSpread({}, newData[currentViewMode] || {}), itemSetting)));
273
273
  localStorage.setItem(getTableKey(tableId), JSON.stringify(newData));
274
- return {
275
- key: getTableKey(tableId),
276
- value: newData
277
- };
278
274
  };
279
275
  export var clearTableSettingToLocalStorage = function clearTableSettingToLocalStorage(tableId) {
280
276
  if (!tableId) return;
@@ -331,7 +327,7 @@ export var setFormValuesToLocalStorage = function setFormValuesToLocalStorage(_r
331
327
  keys === null || keys === void 0 ? void 0 : keys.forEach(function (key) {
332
328
  obj[key] = allValues === null || allValues === void 0 ? void 0 : allValues[key];
333
329
  });
334
- return setTableSettingToLocalStorage({
330
+ setTableSettingToLocalStorage({
335
331
  tableId: tableId,
336
332
  tableSettingObj: obj,
337
333
  currentViewMode: currentViewMode,
@@ -344,7 +340,7 @@ export var setFormValuesToLocalStorage = function setFormValuesToLocalStorage(_r
344
340
  * @param tableId 表格ID
345
341
  * @returns 返回格式化后的表格键值
346
342
  */
347
- export var getTableKey = function getTableKey(tableId) {
343
+ var getTableKey = function getTableKey(tableId) {
348
344
  return "".concat(tableKeyPrefix, "-").concat(tableId);
349
345
  };
350
346
 
@@ -6,9 +6,7 @@ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _ty
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
7
  import { useMemo } from "react";
8
8
  import { getSettingKeyArrByMode, getTableSettingByCurrentViewMode, getTableSettingFromLocalStorage, mergeColumnSetting, mergeFilterSetting, setFormValuesToLocalStorage } from "../Table/utils";
9
- import useEngineContext from "../../../hooks/useEngineContext";
10
9
  var useTableSetting = function useTableSetting(params) {
11
- var _context$appHelper;
12
10
  var tableId = params.tableId,
13
11
  filter = params.filter,
14
12
  columnSetting = params.columnSetting,
@@ -20,10 +18,6 @@ var useTableSetting = function useTableSetting(params) {
20
18
  gallery = params.gallery,
21
19
  currentSettingHash = params.currentSettingHash,
22
20
  exportImport = params.exportImport;
23
- var context = useEngineContext();
24
- var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
25
- isTerminal = _ref.isTerminal,
26
- interaction = _ref.interaction;
27
21
  var columnsMap = useMemo(function () {
28
22
  return new Map(propsColumns.map(function (item) {
29
23
  return [item.key, item];
@@ -44,10 +38,10 @@ var useTableSetting = function useTableSetting(params) {
44
38
  }
45
39
  return propsColumns;
46
40
  }, [propsColumns, currentViewMode, gallery, columnsMap]);
47
- var _ref2 = filter || {},
48
- list = _ref2.list,
49
- quickFilterMaxLength = _ref2.quickFilterMaxLength,
50
- sortButtonShow = _ref2.sortButtonShow;
41
+ var _ref = filter || {},
42
+ list = _ref.list,
43
+ quickFilterMaxLength = _ref.quickFilterMaxLength,
44
+ sortButtonShow = _ref.sortButtonShow;
51
45
  var defaultGalleryCoverSetting = useMemo(function () {
52
46
  var _gallery$cover, _columns$find;
53
47
  return {
@@ -163,29 +157,14 @@ var useTableSetting = function useTableSetting(params) {
163
157
  * @param values
164
158
  */
165
159
  var setTableSetting = function setTableSetting(values) {
166
- var result = setFormValuesToLocalStorage({
160
+ setFormValuesToLocalStorage({
167
161
  tableId: tableId,
168
162
  allValues: values,
169
163
  keys: localStorageSettingKeyArr,
170
164
  currentViewMode: currentViewMode,
171
165
  currentSettingHash: currentSettingHash
172
166
  });
173
- /*
174
- if (isTerminal?.() && result) {
175
- interaction?.utils?.postMessageToApp?.({
176
- module: "global",
177
- key: "local_storage",
178
- data: {
179
- type: "set",
180
- value: {
181
- [result.key]: result.value
182
- },
183
- },
184
- })
185
- }
186
- */
187
167
  };
188
-
189
168
  var tableSetting = useMemo(function () {
190
169
  return _objectSpread(_objectSpread({}, tableLocalSetting), defaultTableSetting);
191
170
  }, [tableLocalSetting, defaultTableSetting]);
@@ -6,7 +6,6 @@ declare type UseTransDataSourceParams = {
6
6
  dataSource: Record<string, any>[];
7
7
  rowKey: string | ((params: any) => string);
8
8
  filter: FilterType;
9
- currentView: 'gallery' | 'table';
10
9
  };
11
10
  declare const useTransDataSource: (params: UseTransDataSourceParams) => Record<string, any>[];
12
11
  export default useTransDataSource;
@@ -14,8 +14,7 @@ var useTransDataSource = function useTransDataSource(params) {
14
14
  localPagination = params.localPagination,
15
15
  pDataSource = params.dataSource,
16
16
  rowKey = params.rowKey,
17
- filter = params.filter,
18
- currentView = params.currentView;
17
+ filter = params.filter;
19
18
  var sort = Form.useWatch("order_by", {
20
19
  form: form,
21
20
  preserve: true
@@ -82,13 +81,12 @@ var useTransDataSource = function useTransDataSource(params) {
82
81
  if (sortObj) {
83
82
  newDataSource = sortDataSource(newDataSource, sortObj);
84
83
  }
85
-
86
- // 在table视图时进行group分组
87
- if (groupDetail && currentView === 'table') {
84
+ if (groupDetail) {
88
85
  newDataSource = groupDataSource(newDataSource, groupDetail, rowKey);
89
86
  }
90
87
  return newDataSource;
91
- }, [pDataSource, localPagination, sortObj, groupDetail, filterLocalArr, filters, currentView]);
88
+ }, [pDataSource, localPagination, sortObj, groupDetail, filterLocalArr, filters]);
89
+ console.log('dataSourcedataSource', dataSource);
92
90
  return dataSource;
93
91
  };
94
92
  export default useTransDataSource;
package/es/index.d.ts CHANGED
@@ -72,7 +72,6 @@ export { default as List } from './components/list';
72
72
  export { default as Sort } from './components/sort';
73
73
  export { default as InputNumberRange } from './components/input-number-range';
74
74
  export { default as LowCodePage } from './components/lowCodePage';
75
- export { default as PickerView } from './components/picker-view';
76
75
  export { default as Segmented } from './components/segmented';
77
76
  export { default as VirtualKeyboard } from './components/virtual-keyboard';
78
77
  export { default as VirtualKeyboardTime } from './components/virtual-keyboard/Time';
@@ -102,5 +101,4 @@ export { default as PisellAlert } from './components/pisellAlert';
102
101
  export { default as PisellCard } from './components/pisellCard';
103
102
  export { default as PisellInformationEntry } from './components/pisellInformationEntry';
104
103
  export { default as usePisellConfig } from './components/pisell-config-provider/hooks/usePisellConfig';
105
- export { globalConfig, default as PisellContext, } from './components/pisell-config-provider/context';
106
- export { default as PisellTags } from './components/pisellTags';
104
+ export { globalConfig, default as PisellContext } from './components/pisell-config-provider/context';
package/es/index.js CHANGED
@@ -92,7 +92,6 @@ export { default as List } from "./components/list";
92
92
  export { default as Sort } from "./components/sort";
93
93
  export { default as InputNumberRange } from "./components/input-number-range";
94
94
  export { default as LowCodePage } from "./components/lowCodePage";
95
- export { default as PickerView } from "./components/picker-view";
96
95
  export { default as Segmented } from "./components/segmented";
97
96
  export { default as VirtualKeyboard } from "./components/virtual-keyboard";
98
97
  export { default as VirtualKeyboardTime } from "./components/virtual-keyboard/Time";
@@ -124,5 +123,4 @@ export { default as PisellAlert } from "./components/pisellAlert";
124
123
  export { default as PisellCard } from "./components/pisellCard";
125
124
  export { default as PisellInformationEntry } from "./components/pisellInformationEntry";
126
125
  export { default as usePisellConfig } from "./components/pisell-config-provider/hooks/usePisellConfig";
127
- export { globalConfig, default as PisellContext } from "./components/pisell-config-provider/context";
128
- export { default as PisellTags } from "./components/pisellTags";
126
+ export { globalConfig, default as PisellContext } from "./components/pisell-config-provider/context";
@@ -97,18 +97,6 @@ declare const _default: {
97
97
  'table-action-export-import-log-copy': string;
98
98
  'table-action-export-import-table-success-copy': string;
99
99
  'drag-sort-tree-unavailable-today-tip': string;
100
- 'date-picker-today': string;
101
- 'date-picker-yesterday': string;
102
- 'date-picker-tomorrow': string;
103
- 'date-picker-next_monday': string;
104
- 'date-picker-last_friday': string;
105
- 'date-picker-first_day_of_this_month': string;
106
- 'date-picker-last_day_of_this_month': string;
107
- 'date-picker-first_day_of_next_month': string;
108
- 'date-picker-last_day_of_last_month': string;
109
- 'date-picker-invalid-date': string;
110
- "date-picker-apply": string;
111
- 'date-picker-shortcut-custom': string;
112
100
  'pisell-input-copy-success': string;
113
101
  'pisell-input-copy': string;
114
102
  'pisell-empty-description-no-data': string;
@@ -119,19 +119,6 @@ export default {
119
119
  'table-action-export-import-log-copy': 'Copy',
120
120
  'table-action-export-import-table-success-copy': 'Copy Success',
121
121
  'drag-sort-tree-unavailable-today-tip': 'Unavailable today',
122
- // 日期组件
123
- 'date-picker-today': 'Today',
124
- 'date-picker-yesterday': 'Yesterday',
125
- 'date-picker-tomorrow': 'Tomorrow',
126
- 'date-picker-next_monday': 'Next monday',
127
- 'date-picker-last_friday': 'Last friday',
128
- 'date-picker-first_day_of_this_month': 'First day of this month',
129
- 'date-picker-last_day_of_this_month': 'Last day of this month',
130
- 'date-picker-first_day_of_next_month': 'First day of next month',
131
- 'date-picker-last_day_of_last_month': 'Last day of last month',
132
- 'date-picker-invalid-date': 'Invalid date',
133
- "date-picker-apply": "Apply",
134
- 'date-picker-shortcut-custom': 'Custom',
135
122
  'pisell-input-copy-success': 'Copy Success',
136
123
  'pisell-input-copy': 'Copy',
137
124
  // 空状态
@@ -97,18 +97,6 @@ declare const _default: {
97
97
  'table-action-export-import-log-copy': string;
98
98
  'table-action-export-import-table-success-copy': string;
99
99
  'drag-sort-tree-unavailable-today-tip': string;
100
- 'date-picker-today': string;
101
- 'date-picker-yesterday': string;
102
- 'date-picker-tomorrow': string;
103
- 'date-picker-next_monday': string;
104
- 'date-picker-last_friday': string;
105
- 'date-picker-first_day_of_this_month': string;
106
- 'date-picker-last_day_of_this_month': string;
107
- 'date-picker-first_day_of_next_month': string;
108
- 'date-picker-last_day_of_last_month': string;
109
- 'date-picker-invalid-date': string;
110
- "date-picker-apply": string;
111
- 'date-picker-shortcut-custom': string;
112
100
  'pisell-input-copy-success': string;
113
101
  'pisell-input-copy': string;
114
102
  'pisell-empty-description-no-data': string;
@@ -119,19 +119,6 @@ export default {
119
119
  'table-action-export-import-log-copy': '复制',
120
120
  'table-action-export-import-table-success-copy': '复制成功',
121
121
  'drag-sort-tree-unavailable-today-tip': '今日不可用',
122
- // 日期组件
123
- 'date-picker-today': '今天',
124
- 'date-picker-yesterday': '昨天',
125
- 'date-picker-tomorrow': '明天',
126
- 'date-picker-next_monday': '下个星期一',
127
- 'date-picker-last_friday': '上个星期五',
128
- 'date-picker-first_day_of_this_month': '本月的第一天',
129
- 'date-picker-last_day_of_this_month': '本月的最后一天',
130
- 'date-picker-first_day_of_next_month': '下个月的第一天',
131
- 'date-picker-last_day_of_last_month': '上个月的最后一天',
132
- 'date-picker-invalid-date': '无效日期',
133
- "date-picker-apply": "确定",
134
- 'date-picker-shortcut-custom': '自定义',
135
122
  'pisell-input-copy-success': '复制成功',
136
123
  'pisell-input-copy': '复制',
137
124
  // 空状态
@@ -97,18 +97,6 @@ declare const _default: {
97
97
  'table-action-export-import-log-copy': string;
98
98
  'table-action-export-import-table-success-copy': string;
99
99
  'drag-sort-tree-unavailable-today-tip': string;
100
- 'date-picker-today': string;
101
- 'date-picker-yesterday': string;
102
- 'date-picker-tomorrow': string;
103
- 'date-picker-next_monday': string;
104
- 'date-picker-last_friday': string;
105
- 'date-picker-first_day_of_this_month': string;
106
- 'date-picker-last_day_of_this_month': string;
107
- 'date-picker-first_day_of_next_month': string;
108
- 'date-picker-last_day_of_last_month': string;
109
- 'date-picker-invalid-date': string;
110
- "date-picker-apply": string;
111
- 'date-picker-shortcut-custom': string;
112
100
  'pisell-input-copy-success': string;
113
101
  'pisell-input-copy': string;
114
102
  'pisell-empty-description-no-data': string;
@@ -119,19 +119,6 @@ export default {
119
119
  'table-action-export-import-log-copy': '復製',
120
120
  'table-action-export-import-table-success-copy': '復製成功',
121
121
  'drag-sort-tree-unavailable-today-tip': '今日不可用',
122
- // 日期组件
123
- 'date-picker-today': '今天',
124
- 'date-picker-yesterday': '昨天',
125
- 'date-picker-tomorrow': '明天',
126
- 'date-picker-next_monday': '下個星期一',
127
- 'date-picker-last_friday': '上個星期五',
128
- 'date-picker-first_day_of_this_month': '本月的第一天',
129
- 'date-picker-last_day_of_this_month': '本月的最後一天',
130
- 'date-picker-first_day_of_next_month': '下個月的第一天',
131
- 'date-picker-last_day_of_last_month': '上個月的最後一天',
132
- 'date-picker-invalid-date': '無效日期',
133
- "date-picker-apply": "确定",
134
- 'date-picker-shortcut-custom': '自定義',
135
122
  'pisell-input-copy-success': '復製成功',
136
123
  'pisell-input-copy': '復製',
137
124
  // 空状态
@@ -32,15 +32,15 @@ __export(date_picker_exports, {
32
32
  default: () => date_picker_default
33
33
  });
34
34
  module.exports = __toCommonJS(date_picker_exports);
35
+ var import_antd = require("antd");
35
36
  var import_hoc = require("../../utils/hoc");
36
37
  var import_dayjs = __toESM(require("dayjs"));
37
38
  var import_date_picker = require("@pisell/date-picker");
38
39
  var import_localeData = __toESM(require("dayjs/plugin/localeData"));
39
40
  var import_weekday = __toESM(require("dayjs/plugin/weekday"));
40
- var import_datePickerCpt = __toESM(require("./datePickerCpt"));
41
41
  import_dayjs.default.extend(import_weekday.default);
42
42
  import_dayjs.default.extend(import_localeData.default);
43
- var DatePicker = (0, import_hoc.withMomentProps)(import_datePickerCpt.default, [
43
+ var DatePicker = (0, import_hoc.withMomentProps)(import_antd.DatePicker, [
44
44
  "defaultPickerValue",
45
45
  "defaultValue",
46
46
  "showTime.defaultValue",
@@ -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;
@@ -37,6 +37,7 @@ 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");
40
41
  var DragSortTree = (props) => {
41
42
  const { value, rowKey, tabKey, hiddenKeys, onChange } = props;
42
43
  const [items, setItems] = (0, import_react.useState)(value || []);
@@ -38,7 +38,6 @@ 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");
42
41
  var platformMap = {
43
42
  phone: "h5",
44
43
  pc: "pc",
@@ -64,7 +63,6 @@ var PisellConfigProvider = (props) => {
64
63
  };
65
64
  const staticFunction = import_antd.App.useApp();
66
65
  (0, import_pisellMessage.setMessage)(staticFunction.message);
67
- (0, import_functions.setModal)(staticFunction.modal);
68
66
  import_context.globalConfig.setConfig(config);
69
67
  return /* @__PURE__ */ import_react.default.createElement(import_context.default.Provider, { value: config }, children);
70
68
  };