@pisell/materials 1.0.1003 → 1.0.1004
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 +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +5 -5
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +16 -16
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +16 -16
- package/es/components/PisellSteps/PisellSteps.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/pisellBatchActionBar/PisellBatchActionBar.js +110 -54
- package/es/components/pisellBatchActionBar/PisellBatchActionBar.less +10 -25
- package/es/components/virtualInput/index.d.ts +2 -2
- package/es/components/virtualInput/index.js +0 -1
- package/lib/components/PisellSteps/PisellSteps.js +2 -2
- package/lib/components/pisellBatchActionBar/PisellBatchActionBar.js +80 -42
- package/lib/components/pisellBatchActionBar/PisellBatchActionBar.less +10 -25
- package/lib/components/virtualInput/index.d.ts +2 -2
- package/lib/components/virtualInput/index.js +0 -8
- package/package.json +3 -3
|
@@ -19,7 +19,7 @@ import React, { useMemo } from 'react';
|
|
|
19
19
|
import "./PisellSteps.less";
|
|
20
20
|
import { useStepsState, useStepClick, useAnchor, useResponsive } from "./hooks";
|
|
21
21
|
import { getStepStatus, mergeStepClassName } from "./utils";
|
|
22
|
-
import
|
|
22
|
+
import PisellScrollView from "../PisellScrollView";
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* PisellSteps 步骤条组件
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean |
|
|
22
|
+
title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean |
|
|
31
|
+
subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -72,7 +72,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
72
72
|
useCustomAction: boolean;
|
|
73
73
|
actionType: string;
|
|
74
74
|
openMode: "modal" | "drawer";
|
|
75
|
-
openContentSize: "
|
|
75
|
+
openContentSize: "middle" | "large" | "small";
|
|
76
76
|
openTitle: string;
|
|
77
77
|
key: string;
|
|
78
78
|
} | undefined;
|
|
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
|
|
|
15
15
|
metadata?: MediaMetadata;
|
|
16
16
|
}) => Record<string, any>;
|
|
17
17
|
export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
|
|
18
|
-
export declare const getBaseTime: (size: number) =>
|
|
18
|
+
export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
|
|
@@ -1,22 +1,24 @@
|
|
|
1
|
-
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); }
|
|
2
1
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3
2
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
5
3
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
6
4
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
7
|
-
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; }
|
|
8
5
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
9
6
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
7
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
8
|
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; }
|
|
12
9
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
13
10
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
14
|
-
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
13
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
14
|
+
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; }
|
|
15
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
16
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
+
import React, { useMemo, useCallback, useRef, useState } from 'react';
|
|
15
18
|
import classNames from 'classnames';
|
|
16
|
-
import { Popconfirm, Modal } from 'antd';
|
|
19
|
+
import { Popconfirm, Modal, Popover } from 'antd';
|
|
17
20
|
import PisellBasicGrid from "../PisellBasicGrid";
|
|
18
21
|
import GraphicTextCard from "../PisellCards/components/GraphicTextCard";
|
|
19
|
-
import MultilevelCard from "../PisellCards/components/MultilevelCard";
|
|
20
22
|
import { getText } from "../../locales";
|
|
21
23
|
import "./PisellBatchActionBar.less";
|
|
22
24
|
|
|
@@ -78,6 +80,19 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
78
80
|
deleteConfirmConfig = props.deleteConfirmConfig,
|
|
79
81
|
onActionClick = props.onActionClick;
|
|
80
82
|
|
|
83
|
+
/**
|
|
84
|
+
* 用于防止删除按钮重复点击的标记
|
|
85
|
+
*/
|
|
86
|
+
var isDeleteModalOpenRef = useRef(false);
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* "更多"按钮的展开状态
|
|
90
|
+
*/
|
|
91
|
+
var _useState = useState(false),
|
|
92
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
93
|
+
moreExpanded = _useState2[0],
|
|
94
|
+
setMoreExpanded = _useState2[1];
|
|
95
|
+
|
|
81
96
|
/**
|
|
82
97
|
* 计算选择状态
|
|
83
98
|
*/
|
|
@@ -181,6 +196,7 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
181
196
|
variant: "horizontal",
|
|
182
197
|
size: "small",
|
|
183
198
|
clickable: true,
|
|
199
|
+
className: "pisell-batch-action-bar-button",
|
|
184
200
|
graphicConfig: {
|
|
185
201
|
iconSize: 24,
|
|
186
202
|
width: 24,
|
|
@@ -217,6 +233,7 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
217
233
|
variant: "horizontal",
|
|
218
234
|
size: "small",
|
|
219
235
|
clickable: true,
|
|
236
|
+
className: "pisell-batch-action-bar-button",
|
|
220
237
|
graphicConfig: {
|
|
221
238
|
iconSize: 24,
|
|
222
239
|
width: 24,
|
|
@@ -253,6 +270,7 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
253
270
|
variant: "horizontal",
|
|
254
271
|
size: "small",
|
|
255
272
|
clickable: true,
|
|
273
|
+
className: "pisell-batch-action-bar-button",
|
|
256
274
|
graphicConfig: {
|
|
257
275
|
iconSize: 24,
|
|
258
276
|
width: 24,
|
|
@@ -289,6 +307,7 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
289
307
|
variant: "horizontal",
|
|
290
308
|
size: "small",
|
|
291
309
|
clickable: true,
|
|
310
|
+
className: "pisell-batch-action-bar-button",
|
|
292
311
|
graphicConfig: {
|
|
293
312
|
iconSize: 24,
|
|
294
313
|
width: 24,
|
|
@@ -309,6 +328,14 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
309
328
|
height: '48px'
|
|
310
329
|
},
|
|
311
330
|
onClick: function onClick() {
|
|
331
|
+
// 防止重复点击弹出多个 Modal
|
|
332
|
+
if (isDeleteModalOpenRef.current) {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
// 标记 Modal 已打开
|
|
337
|
+
isDeleteModalOpenRef.current = true;
|
|
338
|
+
|
|
312
339
|
// 显示确认弹窗
|
|
313
340
|
var deleteContent = function () {
|
|
314
341
|
var i18nContent = getText('batch-action-bar-delete-confirm-content');
|
|
@@ -327,6 +354,14 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
327
354
|
},
|
|
328
355
|
onOk: function onOk() {
|
|
329
356
|
onDelete === null || onDelete === void 0 || onDelete(selectedKeys, selectedRows);
|
|
357
|
+
},
|
|
358
|
+
onCancel: function onCancel() {
|
|
359
|
+
// Modal 关闭时重置标记
|
|
360
|
+
isDeleteModalOpenRef.current = false;
|
|
361
|
+
},
|
|
362
|
+
afterClose: function afterClose() {
|
|
363
|
+
// Modal 完全关闭后重置标记(兜底)
|
|
364
|
+
isDeleteModalOpenRef.current = false;
|
|
330
365
|
}
|
|
331
366
|
});
|
|
332
367
|
}
|
|
@@ -367,7 +402,7 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
367
402
|
}) : visibleActions;
|
|
368
403
|
return sortedActions.map(function (action) {
|
|
369
404
|
var disabled = typeof action.disabled === 'function' ? action.disabled(selectedKeys, selectedRows) : action.disabled || false;
|
|
370
|
-
var card = /*#__PURE__*/React.createElement(GraphicTextCard, {
|
|
405
|
+
var card = /*#__PURE__*/React.createElement(GraphicTextCard, _defineProperty(_defineProperty({
|
|
371
406
|
key: action.key,
|
|
372
407
|
text: action.label,
|
|
373
408
|
icon: action.icon,
|
|
@@ -380,6 +415,7 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
380
415
|
loading: action.loading ? {
|
|
381
416
|
value: true
|
|
382
417
|
} : undefined,
|
|
418
|
+
className: classNames('pisell-batch-action-bar-button', action.className),
|
|
383
419
|
graphicConfig: _objectSpread({
|
|
384
420
|
iconSize: 24,
|
|
385
421
|
width: 24,
|
|
@@ -396,12 +432,10 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
396
432
|
padding: '8px 12px',
|
|
397
433
|
minWidth: '120px',
|
|
398
434
|
height: '48px'
|
|
399
|
-
}, action.style)
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
}
|
|
404
|
-
});
|
|
435
|
+
}, action.style)
|
|
436
|
+
}, "className", action.className), "onClick", function onClick() {
|
|
437
|
+
return handleActionClick(action);
|
|
438
|
+
}));
|
|
405
439
|
|
|
406
440
|
// 如果需要确认弹窗
|
|
407
441
|
if (action.confirm) {
|
|
@@ -462,50 +496,72 @@ var PisellBatchActionBar = function PisellBatchActionBar(props) {
|
|
|
462
496
|
if (!hasOverflow || overflowActions.length === 0) {
|
|
463
497
|
return null;
|
|
464
498
|
}
|
|
465
|
-
|
|
499
|
+
|
|
500
|
+
// 克隆溢出按钮并修改样式
|
|
501
|
+
var modifiedOverflowActions = overflowActions.map(function (action) {
|
|
502
|
+
if ( /*#__PURE__*/React.isValidElement(action)) {
|
|
503
|
+
var _action$props;
|
|
504
|
+
return /*#__PURE__*/React.cloneElement(action, {
|
|
505
|
+
style: _objectSpread(_objectSpread({}, ((_action$props = action.props) === null || _action$props === void 0 ? void 0 : _action$props.style) || {}), {}, {
|
|
506
|
+
minWidth: '160px',
|
|
507
|
+
width: '160px'
|
|
508
|
+
})
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
return action;
|
|
512
|
+
});
|
|
513
|
+
var content = /*#__PURE__*/React.createElement(PisellBasicGrid, {
|
|
514
|
+
dataSource: modifiedOverflowActions,
|
|
515
|
+
renderItem: function renderItem(item) {
|
|
516
|
+
return item;
|
|
517
|
+
},
|
|
518
|
+
direction: "vertical",
|
|
519
|
+
gap: 0
|
|
520
|
+
});
|
|
521
|
+
return /*#__PURE__*/React.createElement(Popover, {
|
|
466
522
|
key: "more-actions",
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
background: '#1B1B1B',
|
|
487
|
-
border: 'none',
|
|
488
|
-
padding: '8px 12px',
|
|
489
|
-
gap: 4,
|
|
490
|
-
minWidth: '120px',
|
|
491
|
-
height: '48px'
|
|
492
|
-
}
|
|
493
|
-
}, props));
|
|
523
|
+
content: content,
|
|
524
|
+
trigger: "click",
|
|
525
|
+
placement: "topLeft",
|
|
526
|
+
arrow: false,
|
|
527
|
+
open: moreExpanded,
|
|
528
|
+
onOpenChange: setMoreExpanded,
|
|
529
|
+
overlayClassName: "pisell-batch-action-bar__more-popover",
|
|
530
|
+
overlayInnerStyle: {
|
|
531
|
+
padding: 0,
|
|
532
|
+
background: 'rgba(29, 41, 57, 1)'
|
|
533
|
+
}
|
|
534
|
+
}, /*#__PURE__*/React.createElement(GraphicTextCard, {
|
|
535
|
+
text: moreText,
|
|
536
|
+
icon: "pisell2-dots-horizontal",
|
|
537
|
+
variant: "horizontal",
|
|
538
|
+
size: "small",
|
|
539
|
+
clickable: true,
|
|
540
|
+
active: {
|
|
541
|
+
value: moreExpanded
|
|
494
542
|
},
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
gap: 8
|
|
503
|
-
}, props));
|
|
543
|
+
className: "pisell-batch-action-bar-button",
|
|
544
|
+
graphicConfig: {
|
|
545
|
+
iconSize: 24,
|
|
546
|
+
width: 24,
|
|
547
|
+
height: 24,
|
|
548
|
+
background: 'transparent',
|
|
549
|
+
iconColor: '#FFFFFF'
|
|
504
550
|
},
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
551
|
+
textConfig: {
|
|
552
|
+
color: '#FFFFFF',
|
|
553
|
+
fontSize: 14
|
|
554
|
+
},
|
|
555
|
+
style: {
|
|
556
|
+
background: moreExpanded ? 'rgba(93, 63, 159, 1)' : '#1B1B1B',
|
|
557
|
+
border: 'none',
|
|
558
|
+
padding: '8px 12px',
|
|
559
|
+
gap: 4,
|
|
560
|
+
minWidth: '120px',
|
|
561
|
+
height: '48px'
|
|
562
|
+
}
|
|
563
|
+
}));
|
|
564
|
+
}, [hasOverflow, overflowActions, moreText, moreExpanded]);
|
|
509
565
|
|
|
510
566
|
/**
|
|
511
567
|
* 合并类名
|
|
@@ -58,31 +58,6 @@
|
|
|
58
58
|
font-weight: 400 !important;
|
|
59
59
|
line-height: 20px !important;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
// Hover 效果:深色主题下的 hover(降低透明度)
|
|
63
|
-
&:hover:not(.graphic-text-card--disabled):not(.graphic-text-card--loading):not(.graphic-text-card--active).graphic-text-card--clickable {
|
|
64
|
-
background: #1B1B1B !important;
|
|
65
|
-
border: none !important;
|
|
66
|
-
opacity: 0.7;
|
|
67
|
-
|
|
68
|
-
.graphic-text-card__graphic,
|
|
69
|
-
.graphic-text-card__text {
|
|
70
|
-
color: #FFFFFF !important;
|
|
71
|
-
opacity: 0.7;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Active 效果
|
|
76
|
-
&:active:not(.graphic-text-card--disabled):not(.graphic-text-card--loading).graphic-text-card--clickable {
|
|
77
|
-
background: #1B1B1B !important;
|
|
78
|
-
opacity: 0.5;
|
|
79
|
-
|
|
80
|
-
.graphic-text-card__graphic,
|
|
81
|
-
.graphic-text-card__text {
|
|
82
|
-
color: #FFFFFF !important;
|
|
83
|
-
opacity: 0.5;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
61
|
}
|
|
87
62
|
}
|
|
88
63
|
|
|
@@ -100,4 +75,14 @@
|
|
|
100
75
|
&--inline {
|
|
101
76
|
width: 100%;
|
|
102
77
|
}
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Popover 中的按钮样式(全局作用域)
|
|
82
|
+
:global(.pisell-batch-action-bar__more-popover) {
|
|
83
|
+
:global(.graphic-text-card--horizontal) {
|
|
84
|
+
min-width: 160px !important;
|
|
85
|
+
width: 160px !important;
|
|
86
|
+
height: 40px !important;
|
|
87
|
+
}
|
|
103
88
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BaseVirtualInputProps, BaseVirtualInputRef } from './BaseVirtualInput';
|
|
2
|
+
import type { BaseVirtualInputProps, BaseVirtualInputRef } from './BaseVirtualInput';
|
|
3
3
|
import './index.less';
|
|
4
|
-
export { BaseVirtualInputProps, BaseVirtualInputRef } from './BaseVirtualInput';
|
|
4
|
+
export type { BaseVirtualInputProps, BaseVirtualInputRef } from './BaseVirtualInput';
|
|
5
5
|
export interface VirtualInputProps extends BaseVirtualInputProps {
|
|
6
6
|
/** 在VirtualInput上方显示的额外内容 */
|
|
7
7
|
topContent?: React.ReactNode;
|
|
@@ -13,7 +13,6 @@ import classNames from 'classnames';
|
|
|
13
13
|
import Icon from "../icon";
|
|
14
14
|
import BaseVirtualInput from "./BaseVirtualInput";
|
|
15
15
|
import "./index.less";
|
|
16
|
-
export { BaseVirtualInputProps, BaseVirtualInputRef } from "./BaseVirtualInput";
|
|
17
16
|
var VirtualInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
18
17
|
var topContent = _ref.topContent,
|
|
19
18
|
bottomContent = _ref.bottomContent,
|
|
@@ -37,7 +37,7 @@ var import_react = __toESM(require("react"));
|
|
|
37
37
|
var import_PisellSteps = require("./PisellSteps.less");
|
|
38
38
|
var import_hooks = require("./hooks");
|
|
39
39
|
var import_utils = require("./utils");
|
|
40
|
-
var import_PisellScrollView = require("../PisellScrollView");
|
|
40
|
+
var import_PisellScrollView = __toESM(require("../PisellScrollView"));
|
|
41
41
|
var PisellSteps = ({
|
|
42
42
|
// 基础属性
|
|
43
43
|
type = "default",
|
|
@@ -224,7 +224,7 @@ var PisellSteps = ({
|
|
|
224
224
|
const renderDesktopSteps = () => {
|
|
225
225
|
if (enableScrollMode) {
|
|
226
226
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
227
|
-
import_PisellScrollView.
|
|
227
|
+
import_PisellScrollView.default,
|
|
228
228
|
{
|
|
229
229
|
className: "pisell-steps-scroll-view",
|
|
230
230
|
overflow: "x",
|
|
@@ -37,7 +37,6 @@ var import_classnames = __toESM(require("classnames"));
|
|
|
37
37
|
var import_antd = require("antd");
|
|
38
38
|
var import_PisellBasicGrid = __toESM(require("../PisellBasicGrid"));
|
|
39
39
|
var import_GraphicTextCard = __toESM(require("../PisellCards/components/GraphicTextCard"));
|
|
40
|
-
var import_MultilevelCard = __toESM(require("../PisellCards/components/MultilevelCard"));
|
|
41
40
|
var import_locales = require("../../locales");
|
|
42
41
|
var import_PisellBatchActionBar = require("./PisellBatchActionBar.less");
|
|
43
42
|
var PisellBatchActionBar = (props) => {
|
|
@@ -66,6 +65,8 @@ var PisellBatchActionBar = (props) => {
|
|
|
66
65
|
deleteConfirmConfig,
|
|
67
66
|
onActionClick
|
|
68
67
|
} = props;
|
|
68
|
+
const isDeleteModalOpenRef = (0, import_react.useRef)(false);
|
|
69
|
+
const [moreExpanded, setMoreExpanded] = (0, import_react.useState)(false);
|
|
69
70
|
const selectionState = (0, import_react.useMemo)(() => {
|
|
70
71
|
const selectedCount = selectedKeys.length;
|
|
71
72
|
const hasSelected = selectedCount > 0;
|
|
@@ -151,6 +152,7 @@ var PisellBatchActionBar = (props) => {
|
|
|
151
152
|
variant: "horizontal",
|
|
152
153
|
size: "small",
|
|
153
154
|
clickable: true,
|
|
155
|
+
className: "pisell-batch-action-bar-button",
|
|
154
156
|
graphicConfig: {
|
|
155
157
|
iconSize: 24,
|
|
156
158
|
width: 24,
|
|
@@ -185,6 +187,7 @@ var PisellBatchActionBar = (props) => {
|
|
|
185
187
|
variant: "horizontal",
|
|
186
188
|
size: "small",
|
|
187
189
|
clickable: true,
|
|
190
|
+
className: "pisell-batch-action-bar-button",
|
|
188
191
|
graphicConfig: {
|
|
189
192
|
iconSize: 24,
|
|
190
193
|
width: 24,
|
|
@@ -219,6 +222,7 @@ var PisellBatchActionBar = (props) => {
|
|
|
219
222
|
variant: "horizontal",
|
|
220
223
|
size: "small",
|
|
221
224
|
clickable: true,
|
|
225
|
+
className: "pisell-batch-action-bar-button",
|
|
222
226
|
graphicConfig: {
|
|
223
227
|
iconSize: 24,
|
|
224
228
|
width: 24,
|
|
@@ -253,6 +257,7 @@ var PisellBatchActionBar = (props) => {
|
|
|
253
257
|
variant: "horizontal",
|
|
254
258
|
size: "small",
|
|
255
259
|
clickable: true,
|
|
260
|
+
className: "pisell-batch-action-bar-button",
|
|
256
261
|
graphicConfig: {
|
|
257
262
|
iconSize: 24,
|
|
258
263
|
width: 24,
|
|
@@ -270,6 +275,10 @@ var PisellBatchActionBar = (props) => {
|
|
|
270
275
|
height: "48px"
|
|
271
276
|
},
|
|
272
277
|
onClick: () => {
|
|
278
|
+
if (isDeleteModalOpenRef.current) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
isDeleteModalOpenRef.current = true;
|
|
273
282
|
const deleteContent = (() => {
|
|
274
283
|
const i18nContent = (0, import_locales.getText)("batch-action-bar-delete-confirm-content");
|
|
275
284
|
if (typeof i18nContent === "function") {
|
|
@@ -285,6 +294,12 @@ var PisellBatchActionBar = (props) => {
|
|
|
285
294
|
okButtonProps: { danger: true },
|
|
286
295
|
onOk: () => {
|
|
287
296
|
onDelete == null ? void 0 : onDelete(selectedKeys, selectedRows);
|
|
297
|
+
},
|
|
298
|
+
onCancel: () => {
|
|
299
|
+
isDeleteModalOpenRef.current = false;
|
|
300
|
+
},
|
|
301
|
+
afterClose: () => {
|
|
302
|
+
isDeleteModalOpenRef.current = false;
|
|
288
303
|
}
|
|
289
304
|
});
|
|
290
305
|
}
|
|
@@ -347,6 +362,7 @@ var PisellBatchActionBar = (props) => {
|
|
|
347
362
|
clickable: !disabled && !action.loading,
|
|
348
363
|
disabled: disabled ? { value: true } : void 0,
|
|
349
364
|
loading: action.loading ? { value: true } : void 0,
|
|
365
|
+
className: (0, import_classnames.default)("pisell-batch-action-bar-button", action.className),
|
|
350
366
|
graphicConfig: {
|
|
351
367
|
iconSize: 24,
|
|
352
368
|
width: 24,
|
|
@@ -411,52 +427,74 @@ var PisellBatchActionBar = (props) => {
|
|
|
411
427
|
if (!hasOverflow || overflowActions.length === 0) {
|
|
412
428
|
return null;
|
|
413
429
|
}
|
|
430
|
+
const modifiedOverflowActions = overflowActions.map((action) => {
|
|
431
|
+
var _a;
|
|
432
|
+
if (import_react.default.isValidElement(action)) {
|
|
433
|
+
return import_react.default.cloneElement(action, {
|
|
434
|
+
style: {
|
|
435
|
+
...((_a = action.props) == null ? void 0 : _a.style) || {},
|
|
436
|
+
minWidth: "160px",
|
|
437
|
+
width: "160px"
|
|
438
|
+
}
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
return action;
|
|
442
|
+
});
|
|
443
|
+
const content = /* @__PURE__ */ import_react.default.createElement(
|
|
444
|
+
import_PisellBasicGrid.default,
|
|
445
|
+
{
|
|
446
|
+
dataSource: modifiedOverflowActions,
|
|
447
|
+
renderItem: (item) => item,
|
|
448
|
+
direction: "vertical",
|
|
449
|
+
gap: 0
|
|
450
|
+
}
|
|
451
|
+
);
|
|
414
452
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
415
|
-
|
|
453
|
+
import_antd.Popover,
|
|
416
454
|
{
|
|
417
455
|
key: "more-actions",
|
|
418
|
-
|
|
419
|
-
import_GraphicTextCard.default,
|
|
420
|
-
{
|
|
421
|
-
text: moreText,
|
|
422
|
-
icon: "pisell2-dots-horizontal",
|
|
423
|
-
variant: "horizontal",
|
|
424
|
-
size: "small",
|
|
425
|
-
clickable: true,
|
|
426
|
-
graphicConfig: {
|
|
427
|
-
iconSize: 24,
|
|
428
|
-
width: 24,
|
|
429
|
-
height: 24,
|
|
430
|
-
background: "transparent",
|
|
431
|
-
iconColor: "#FFFFFF"
|
|
432
|
-
},
|
|
433
|
-
textConfig: { color: "#FFFFFF", fontSize: 14 },
|
|
434
|
-
style: {
|
|
435
|
-
background: "#1B1B1B",
|
|
436
|
-
border: "none",
|
|
437
|
-
padding: "8px 12px",
|
|
438
|
-
gap: 4,
|
|
439
|
-
minWidth: "120px",
|
|
440
|
-
height: "48px"
|
|
441
|
-
},
|
|
442
|
-
...props2
|
|
443
|
-
}
|
|
444
|
-
),
|
|
445
|
-
panel: (props2) => /* @__PURE__ */ import_react.default.createElement(
|
|
446
|
-
import_PisellBasicGrid.default,
|
|
447
|
-
{
|
|
448
|
-
dataSource: overflowActions,
|
|
449
|
-
renderItem: (item) => item,
|
|
450
|
-
direction: "vertical",
|
|
451
|
-
gap: 8,
|
|
452
|
-
...props2
|
|
453
|
-
}
|
|
454
|
-
),
|
|
456
|
+
content,
|
|
455
457
|
trigger: "click",
|
|
456
|
-
|
|
457
|
-
|
|
458
|
+
placement: "topLeft",
|
|
459
|
+
arrow: false,
|
|
460
|
+
open: moreExpanded,
|
|
461
|
+
onOpenChange: setMoreExpanded,
|
|
462
|
+
overlayClassName: "pisell-batch-action-bar__more-popover",
|
|
463
|
+
overlayInnerStyle: {
|
|
464
|
+
padding: 0,
|
|
465
|
+
background: "rgba(29, 41, 57, 1)"
|
|
466
|
+
}
|
|
467
|
+
},
|
|
468
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
469
|
+
import_GraphicTextCard.default,
|
|
470
|
+
{
|
|
471
|
+
text: moreText,
|
|
472
|
+
icon: "pisell2-dots-horizontal",
|
|
473
|
+
variant: "horizontal",
|
|
474
|
+
size: "small",
|
|
475
|
+
clickable: true,
|
|
476
|
+
active: { value: moreExpanded },
|
|
477
|
+
className: "pisell-batch-action-bar-button",
|
|
478
|
+
graphicConfig: {
|
|
479
|
+
iconSize: 24,
|
|
480
|
+
width: 24,
|
|
481
|
+
height: 24,
|
|
482
|
+
background: "transparent",
|
|
483
|
+
iconColor: "#FFFFFF"
|
|
484
|
+
},
|
|
485
|
+
textConfig: { color: "#FFFFFF", fontSize: 14 },
|
|
486
|
+
style: {
|
|
487
|
+
background: moreExpanded ? "rgba(93, 63, 159, 1)" : "#1B1B1B",
|
|
488
|
+
border: "none",
|
|
489
|
+
padding: "8px 12px",
|
|
490
|
+
gap: 4,
|
|
491
|
+
minWidth: "120px",
|
|
492
|
+
height: "48px"
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
)
|
|
458
496
|
);
|
|
459
|
-
}, [hasOverflow, overflowActions, moreText]);
|
|
497
|
+
}, [hasOverflow, overflowActions, moreText, moreExpanded]);
|
|
460
498
|
const mergedClassName = (0, import_classnames.default)("pisell-batch-action-bar", className, {
|
|
461
499
|
[`pisell-batch-action-bar--${position}`]: position
|
|
462
500
|
});
|
|
@@ -58,31 +58,6 @@
|
|
|
58
58
|
font-weight: 400 !important;
|
|
59
59
|
line-height: 20px !important;
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
// Hover 效果:深色主题下的 hover(降低透明度)
|
|
63
|
-
&:hover:not(.graphic-text-card--disabled):not(.graphic-text-card--loading):not(.graphic-text-card--active).graphic-text-card--clickable {
|
|
64
|
-
background: #1B1B1B !important;
|
|
65
|
-
border: none !important;
|
|
66
|
-
opacity: 0.7;
|
|
67
|
-
|
|
68
|
-
.graphic-text-card__graphic,
|
|
69
|
-
.graphic-text-card__text {
|
|
70
|
-
color: #FFFFFF !important;
|
|
71
|
-
opacity: 0.7;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// Active 效果
|
|
76
|
-
&:active:not(.graphic-text-card--disabled):not(.graphic-text-card--loading).graphic-text-card--clickable {
|
|
77
|
-
background: #1B1B1B !important;
|
|
78
|
-
opacity: 0.5;
|
|
79
|
-
|
|
80
|
-
.graphic-text-card__graphic,
|
|
81
|
-
.graphic-text-card__text {
|
|
82
|
-
color: #FFFFFF !important;
|
|
83
|
-
opacity: 0.5;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
61
|
}
|
|
87
62
|
}
|
|
88
63
|
|
|
@@ -100,4 +75,14 @@
|
|
|
100
75
|
&--inline {
|
|
101
76
|
width: 100%;
|
|
102
77
|
}
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Popover 中的按钮样式(全局作用域)
|
|
82
|
+
:global(.pisell-batch-action-bar__more-popover) {
|
|
83
|
+
:global(.graphic-text-card--horizontal) {
|
|
84
|
+
min-width: 160px !important;
|
|
85
|
+
width: 160px !important;
|
|
86
|
+
height: 40px !important;
|
|
87
|
+
}
|
|
103
88
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { BaseVirtualInputProps, BaseVirtualInputRef } from './BaseVirtualInput';
|
|
2
|
+
import type { BaseVirtualInputProps, BaseVirtualInputRef } from './BaseVirtualInput';
|
|
3
3
|
import './index.less';
|
|
4
|
-
export { BaseVirtualInputProps, BaseVirtualInputRef } from './BaseVirtualInput';
|
|
4
|
+
export type { BaseVirtualInputProps, BaseVirtualInputRef } from './BaseVirtualInput';
|
|
5
5
|
export interface VirtualInputProps extends BaseVirtualInputProps {
|
|
6
6
|
/** 在VirtualInput上方显示的额外内容 */
|
|
7
7
|
topContent?: React.ReactNode;
|
|
@@ -29,8 +29,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/virtualInput/index.tsx
|
|
30
30
|
var virtualInput_exports = {};
|
|
31
31
|
__export(virtualInput_exports, {
|
|
32
|
-
BaseVirtualInputProps: () => import_BaseVirtualInput2.BaseVirtualInputProps,
|
|
33
|
-
BaseVirtualInputRef: () => import_BaseVirtualInput2.BaseVirtualInputRef,
|
|
34
32
|
default: () => virtualInput_default
|
|
35
33
|
});
|
|
36
34
|
module.exports = __toCommonJS(virtualInput_exports);
|
|
@@ -39,7 +37,6 @@ var import_classnames = __toESM(require("classnames"));
|
|
|
39
37
|
var import_icon = __toESM(require("../icon"));
|
|
40
38
|
var import_BaseVirtualInput = __toESM(require("./BaseVirtualInput"));
|
|
41
39
|
var import_index = require("./index.less");
|
|
42
|
-
var import_BaseVirtualInput2 = require("./BaseVirtualInput");
|
|
43
40
|
var VirtualInput = (0, import_react.forwardRef)(
|
|
44
41
|
({
|
|
45
42
|
topContent,
|
|
@@ -105,8 +102,3 @@ var VirtualInput = (0, import_react.forwardRef)(
|
|
|
105
102
|
);
|
|
106
103
|
VirtualInput.displayName = "VirtualInput";
|
|
107
104
|
var virtualInput_default = VirtualInput;
|
|
108
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
109
|
-
0 && (module.exports = {
|
|
110
|
-
BaseVirtualInputProps,
|
|
111
|
-
BaseVirtualInputRef
|
|
112
|
-
});
|