@railtownai/railtracks-visualizer 0.0.65 → 0.0.66
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/dist/cjs/index.js +1150 -1042
- package/dist/esm/index.js +1150 -1042
- package/dist/types/agenthub/components/GuardrailsPopover.d.ts +18 -0
- package/dist/types/dto/AgentRunNode.d.ts +17 -0
- package/package.json +22 -22
- package/dist/types/components/ui/tooltip.d.ts +0 -9
package/dist/cjs/index.js
CHANGED
|
@@ -56,6 +56,9 @@ var CheckOutlined = require('@ant-design/icons/es/icons/CheckOutlined');
|
|
|
56
56
|
var CopyOutlined = require('@ant-design/icons/es/icons/CopyOutlined');
|
|
57
57
|
var RcDrawer = require('@rc-component/drawer');
|
|
58
58
|
var useId$1 = require('@rc-component/util/es/hooks/useId');
|
|
59
|
+
var EllipsisOutlined = require('@ant-design/icons/es/icons/EllipsisOutlined');
|
|
60
|
+
var PlusOutlined = require('@ant-design/icons/es/icons/PlusOutlined');
|
|
61
|
+
var RcTabs = require('@rc-component/tabs');
|
|
59
62
|
var RcSwitch = require('@rc-component/switch');
|
|
60
63
|
var RcSelect = require('@rc-component/select');
|
|
61
64
|
var DownOutlined = require('@ant-design/icons/es/icons/DownOutlined');
|
|
@@ -67,7 +70,6 @@ var LeftOutlined = require('@ant-design/icons/es/icons/LeftOutlined');
|
|
|
67
70
|
var RcDropdown = require('@rc-component/dropdown');
|
|
68
71
|
var RcMenu = require('@rc-component/menu');
|
|
69
72
|
var BarsOutlined = require('@ant-design/icons/es/icons/BarsOutlined');
|
|
70
|
-
var EllipsisOutlined = require('@ant-design/icons/es/icons/EllipsisOutlined');
|
|
71
73
|
require('@rc-component/util/es/Dom/findDOMNode');
|
|
72
74
|
var useColumns = require('@rc-component/table/es/hooks/useColumns');
|
|
73
75
|
var DoubleLeftOutlined = require('@ant-design/icons/es/icons/DoubleLeftOutlined');
|
|
@@ -76,8 +78,6 @@ var RcPagination = require('@rc-component/pagination');
|
|
|
76
78
|
var FilterFilled = require('@ant-design/icons/es/icons/FilterFilled');
|
|
77
79
|
var CaretDownOutlined = require('@ant-design/icons/es/icons/CaretDownOutlined');
|
|
78
80
|
var CaretUpOutlined = require('@ant-design/icons/es/icons/CaretUpOutlined');
|
|
79
|
-
var PlusOutlined = require('@ant-design/icons/es/icons/PlusOutlined');
|
|
80
|
-
var RcTabs = require('@rc-component/tabs');
|
|
81
81
|
|
|
82
82
|
function _interopNamespaceDefault(e) {
|
|
83
83
|
var n = Object.create(null);
|
|
@@ -3941,7 +3941,7 @@ function nodeHasDimensions(node) {
|
|
|
3941
3941
|
return (node.measured?.width ?? node.width ?? node.initialWidth) !== undefined && (node.measured?.height ?? node.height ?? node.initialHeight) !== undefined;
|
|
3942
3942
|
}
|
|
3943
3943
|
/**
|
|
3944
|
-
* Convert child position to
|
|
3944
|
+
* Convert child position to absolute position
|
|
3945
3945
|
*
|
|
3946
3946
|
* @internal
|
|
3947
3947
|
* @param position
|
|
@@ -4388,7 +4388,7 @@ const distance = (a, b)=>Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y,
|
|
|
4388
4388
|
centerX = center.x ?? sourceGapped.x + (targetGapped.x - sourceGapped.x) * stepPosition;
|
|
4389
4389
|
centerY = center.y ?? (sourceGapped.y + targetGapped.y) / 2;
|
|
4390
4390
|
} else {
|
|
4391
|
-
// Primary direction is vertical, so stepPosition affects Y coordinate
|
|
4391
|
+
// Primary direction is vertical, so stepPosition affects Y coordinate
|
|
4392
4392
|
centerX = center.x ?? (sourceGapped.x + targetGapped.x) / 2;
|
|
4393
4393
|
centerY = center.y ?? sourceGapped.y + (targetGapped.y - sourceGapped.y) * stepPosition;
|
|
4394
4394
|
}
|
|
@@ -4487,17 +4487,24 @@ const distance = (a, b)=>Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y,
|
|
|
4487
4487
|
centerY = (sourceGapPoint.y + targetGapPoint.y) / 2;
|
|
4488
4488
|
}
|
|
4489
4489
|
}
|
|
4490
|
+
const gappedSource = {
|
|
4491
|
+
x: sourceGapped.x + sourceGapOffset.x,
|
|
4492
|
+
y: sourceGapped.y + sourceGapOffset.y
|
|
4493
|
+
};
|
|
4494
|
+
const gappedTarget = {
|
|
4495
|
+
x: targetGapped.x + targetGapOffset.x,
|
|
4496
|
+
y: targetGapped.y + targetGapOffset.y
|
|
4497
|
+
};
|
|
4490
4498
|
const pathPoints = [
|
|
4491
4499
|
source,
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4500
|
+
// we only want to add the gapped source/target if they are different from the first/last point to avoid duplicates which can cause issues with the bends
|
|
4501
|
+
...gappedSource.x !== points[0].x || gappedSource.y !== points[0].y ? [
|
|
4502
|
+
gappedSource
|
|
4503
|
+
] : [],
|
|
4496
4504
|
...points,
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
},
|
|
4505
|
+
...gappedTarget.x !== points[points.length - 1].x || gappedTarget.y !== points[points.length - 1].y ? [
|
|
4506
|
+
gappedTarget
|
|
4507
|
+
] : [],
|
|
4501
4508
|
target
|
|
4502
4509
|
];
|
|
4503
4510
|
return [
|
|
@@ -4574,16 +4581,11 @@ function getBend(a, b, c, size) {
|
|
|
4574
4581
|
offset,
|
|
4575
4582
|
stepPosition
|
|
4576
4583
|
});
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
segment = `${i === 0 ? 'M' : 'L'}${p.x} ${p.y}`;
|
|
4583
|
-
}
|
|
4584
|
-
res += segment;
|
|
4585
|
-
return res;
|
|
4586
|
-
}, '');
|
|
4584
|
+
let path = `M${points[0].x} ${points[0].y}`;
|
|
4585
|
+
for(let i = 1; i < points.length - 1; i++){
|
|
4586
|
+
path += getBend(points[i - 1], points[i], points[i + 1], borderRadius);
|
|
4587
|
+
}
|
|
4588
|
+
path += `L${points[points.length - 1].x} ${points[points.length - 1].y}`;
|
|
4587
4589
|
return [
|
|
4588
4590
|
path,
|
|
4589
4591
|
labelX,
|
|
@@ -4799,6 +4801,7 @@ function adoptUserNodes(nodes, nodeLookup, parentLookup, options = {}) {
|
|
|
4799
4801
|
const tmpLookup = new Map(nodeLookup);
|
|
4800
4802
|
const selectedNodeZ = _options?.elevateNodesOnSelect && !isManualZIndexMode(_options.zIndexMode) ? SELECTED_NODE_Z : 0;
|
|
4801
4803
|
let nodesInitialized = nodes.length > 0;
|
|
4804
|
+
let hasSelectedNodes = false;
|
|
4802
4805
|
nodeLookup.clear();
|
|
4803
4806
|
parentLookup.clear();
|
|
4804
4807
|
for (const userNode of nodes){
|
|
@@ -4832,8 +4835,12 @@ function adoptUserNodes(nodes, nodeLookup, parentLookup, options = {}) {
|
|
|
4832
4835
|
if (userNode.parentId) {
|
|
4833
4836
|
updateChildNode(internalNode, nodeLookup, parentLookup, options, rootParentIndex);
|
|
4834
4837
|
}
|
|
4838
|
+
hasSelectedNodes || (hasSelectedNodes = userNode.selected ?? false);
|
|
4835
4839
|
}
|
|
4836
|
-
return
|
|
4840
|
+
return {
|
|
4841
|
+
nodesInitialized,
|
|
4842
|
+
hasSelectedNodes
|
|
4843
|
+
};
|
|
4837
4844
|
}
|
|
4838
4845
|
function updateParentLookup(node, parentLookup) {
|
|
4839
4846
|
if (!node.parentId) {
|
|
@@ -5107,7 +5114,7 @@ async function panBy({ delta, panZoom, transform, translateExtent, width, height
|
|
|
5107
5114
|
* @param connectionKey at which key the connection should be added
|
|
5108
5115
|
* @param connectionLookup reference to the connection lookup
|
|
5109
5116
|
* @param nodeId nodeId of the connection
|
|
5110
|
-
* @param handleId handleId of the
|
|
5117
|
+
* @param handleId handleId of the connection
|
|
5111
5118
|
*/ function addConnectionToLookup(type, connection, connectionKey, connectionLookup, nodeId, handleId) {
|
|
5112
5119
|
/*
|
|
5113
5120
|
* We add the connection to the connectionLookup at the following keys
|
|
@@ -5773,7 +5780,7 @@ function onPointerDown(event, { connectionMode, connectionRadius, handleId, node
|
|
|
5773
5780
|
doc.addEventListener('touchmove', onPointerMove);
|
|
5774
5781
|
doc.addEventListener('touchend', onPointerUp);
|
|
5775
5782
|
}
|
|
5776
|
-
// checks if and returns connection in
|
|
5783
|
+
// checks if and returns connection in form of an object { source: 123, target: 312 }
|
|
5777
5784
|
function isValidHandle(event, { handle, connectionMode, fromNodeId, fromHandleId, fromType, doc, lib, flowId, isValidConnection = alwaysValid, nodeLookup }) {
|
|
5778
5785
|
const isTarget = fromType === 'target';
|
|
5779
5786
|
const handleDomNode = handle ? doc.querySelector(`.${lib}-flow__handle[data-id="${flowId}-${handle?.nodeId}-${handle?.id}-${handle?.type}"]`) : null;
|
|
@@ -6037,7 +6044,7 @@ function createPanZoomEndHandler({ zoomPanValues, panOnDrag, panOnScroll, onDrag
|
|
|
6037
6044
|
clearTimeout(zoomPanValues.timerId);
|
|
6038
6045
|
zoomPanValues.timerId = setTimeout(()=>{
|
|
6039
6046
|
onPanZoomEnd?.(event.sourceEvent, viewport);
|
|
6040
|
-
}, // we need a setTimeout for panOnScroll to
|
|
6047
|
+
}, // we need a setTimeout for panOnScroll to suppress multiple end events fired during scroll
|
|
6041
6048
|
panOnScroll ? 150 : 0);
|
|
6042
6049
|
}
|
|
6043
6050
|
};
|
|
@@ -7354,6 +7361,8 @@ function SelectionListener({ onSelectionChange }) {
|
|
|
7354
7361
|
}
|
|
7355
7362
|
return null;
|
|
7356
7363
|
}
|
|
7364
|
+
// we need this hook to prevent a warning when using react-flow in SSR
|
|
7365
|
+
const useIsomorphicLayoutEffect$3 = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
7357
7366
|
const defaultNodeOrigin = [
|
|
7358
7367
|
0,
|
|
7359
7368
|
0
|
|
@@ -7459,7 +7468,12 @@ const initPrevValues = {
|
|
|
7459
7468
|
function StoreUpdater(props) {
|
|
7460
7469
|
const { setNodes, setEdges, setMinZoom, setMaxZoom, setTranslateExtent, setNodeExtent, reset, setDefaultNodesAndEdges } = useStore(selector$l, shallow$1);
|
|
7461
7470
|
const store = useStoreApi();
|
|
7462
|
-
|
|
7471
|
+
// We use layout effects here so that the store is always populated before
|
|
7472
|
+
// any child useEffect or useLayoutEffect fires. With regular useEffect, the
|
|
7473
|
+
// cleanup calls reset() which empties the store, and child effects can run
|
|
7474
|
+
// before the new mount effect repopulates it — causing children to read
|
|
7475
|
+
// empty nodeLookup/nodes/edges during a <ReactFlow> remount.
|
|
7476
|
+
useIsomorphicLayoutEffect$3(()=>{
|
|
7463
7477
|
setDefaultNodesAndEdges(props.defaultNodes, props.defaultEdges);
|
|
7464
7478
|
return ()=>{
|
|
7465
7479
|
// when we reset the store we also need to reset the previous fields
|
|
@@ -7468,7 +7482,7 @@ function StoreUpdater(props) {
|
|
|
7468
7482
|
};
|
|
7469
7483
|
}, []);
|
|
7470
7484
|
const previousFields = React.useRef(initPrevValues);
|
|
7471
|
-
|
|
7485
|
+
useIsomorphicLayoutEffect$3(()=>{
|
|
7472
7486
|
for (const fieldName of fieldsToTrack){
|
|
7473
7487
|
const fieldValue = props[fieldName];
|
|
7474
7488
|
const previousFieldValue = previousFields.current[fieldName];
|
|
@@ -7684,21 +7698,15 @@ function useKeyOrCode(eventCode, keysToWatch) {
|
|
|
7684
7698
|
return {
|
|
7685
7699
|
zoomIn: (options)=>{
|
|
7686
7700
|
const { panZoom } = store.getState();
|
|
7687
|
-
return panZoom ? panZoom.scaleBy(1.2,
|
|
7688
|
-
duration: options?.duration
|
|
7689
|
-
}) : Promise.resolve(false);
|
|
7701
|
+
return panZoom ? panZoom.scaleBy(1.2, options) : Promise.resolve(false);
|
|
7690
7702
|
},
|
|
7691
7703
|
zoomOut: (options)=>{
|
|
7692
7704
|
const { panZoom } = store.getState();
|
|
7693
|
-
return panZoom ? panZoom.scaleBy(1 / 1.2,
|
|
7694
|
-
duration: options?.duration
|
|
7695
|
-
}) : Promise.resolve(false);
|
|
7705
|
+
return panZoom ? panZoom.scaleBy(1 / 1.2, options) : Promise.resolve(false);
|
|
7696
7706
|
},
|
|
7697
7707
|
zoomTo: (zoomLevel, options)=>{
|
|
7698
7708
|
const { panZoom } = store.getState();
|
|
7699
|
-
return panZoom ? panZoom.scaleTo(zoomLevel,
|
|
7700
|
-
duration: options?.duration
|
|
7701
|
-
}) : Promise.resolve(false);
|
|
7709
|
+
return panZoom ? panZoom.scaleTo(zoomLevel, options) : Promise.resolve(false);
|
|
7702
7710
|
},
|
|
7703
7711
|
getZoom: ()=>store.getState().transform[2],
|
|
7704
7712
|
setViewport: async (viewport, options)=>{
|
|
@@ -8070,8 +8078,6 @@ function fixedForwardRef(render) {
|
|
|
8070
8078
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8071
8079
|
return React.forwardRef(render);
|
|
8072
8080
|
}
|
|
8073
|
-
// we need this hook to prevent a warning when using react-flow in SSR
|
|
8074
|
-
const useIsomorphicLayoutEffect$3 = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
|
8075
8081
|
/**
|
|
8076
8082
|
* This hook returns a queue that can be used to batch updates.
|
|
8077
8083
|
*
|
|
@@ -11161,7 +11167,7 @@ const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, heig
|
|
|
11161
11167
|
];
|
|
11162
11168
|
const storeNodeExtent = nodeExtent ?? infiniteExtent;
|
|
11163
11169
|
updateConnectionLookup(connectionLookup, edgeLookup, storeEdges);
|
|
11164
|
-
const nodesInitialized = adoptUserNodes(storeNodes, nodeLookup, parentLookup, {
|
|
11170
|
+
const { nodesInitialized } = adoptUserNodes(storeNodes, nodeLookup, parentLookup, {
|
|
11165
11171
|
nodeOrigin: storeNodeOrigin,
|
|
11166
11172
|
nodeExtent: storeNodeExtent,
|
|
11167
11173
|
zIndexMode
|
|
@@ -11292,7 +11298,7 @@ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height,
|
|
|
11292
11298
|
zIndexMode
|
|
11293
11299
|
}),
|
|
11294
11300
|
setNodes: (nodes)=>{
|
|
11295
|
-
const { nodeLookup, parentLookup, nodeOrigin, elevateNodesOnSelect, fitViewQueued, zIndexMode } = get();
|
|
11301
|
+
const { nodeLookup, parentLookup, nodeOrigin, elevateNodesOnSelect, fitViewQueued, zIndexMode, nodesSelectionActive } = get();
|
|
11296
11302
|
/*
|
|
11297
11303
|
* setNodes() is called exclusively in response to user actions:
|
|
11298
11304
|
* - either when the `<ReactFlow nodes>` prop is updated in the controlled ReactFlow setup,
|
|
@@ -11300,25 +11306,28 @@ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height,
|
|
|
11300
11306
|
*
|
|
11301
11307
|
* When this happens, we take the note objects passed by the user and extend them with fields
|
|
11302
11308
|
* relevant for internal React Flow operations.
|
|
11303
|
-
*/ const nodesInitialized = adoptUserNodes(nodes, nodeLookup, parentLookup, {
|
|
11309
|
+
*/ const { nodesInitialized, hasSelectedNodes } = adoptUserNodes(nodes, nodeLookup, parentLookup, {
|
|
11304
11310
|
nodeOrigin,
|
|
11305
11311
|
nodeExtent,
|
|
11306
11312
|
elevateNodesOnSelect,
|
|
11307
11313
|
checkEquality: true,
|
|
11308
11314
|
zIndexMode
|
|
11309
11315
|
});
|
|
11316
|
+
const nextNodesSelectionActive = nodesSelectionActive && hasSelectedNodes;
|
|
11310
11317
|
if (fitViewQueued && nodesInitialized) {
|
|
11311
11318
|
resolveFitView();
|
|
11312
11319
|
set({
|
|
11313
11320
|
nodes,
|
|
11314
11321
|
nodesInitialized,
|
|
11315
11322
|
fitViewQueued: false,
|
|
11316
|
-
fitViewOptions: undefined
|
|
11323
|
+
fitViewOptions: undefined,
|
|
11324
|
+
nodesSelectionActive: nextNodesSelectionActive
|
|
11317
11325
|
});
|
|
11318
11326
|
} else {
|
|
11319
11327
|
set({
|
|
11320
11328
|
nodes,
|
|
11321
|
-
nodesInitialized
|
|
11329
|
+
nodesInitialized,
|
|
11330
|
+
nodesSelectionActive: nextNodesSelectionActive
|
|
11322
11331
|
});
|
|
11323
11332
|
}
|
|
11324
11333
|
},
|
|
@@ -11346,7 +11355,7 @@ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height,
|
|
|
11346
11355
|
}
|
|
11347
11356
|
},
|
|
11348
11357
|
/*
|
|
11349
|
-
* Every node gets
|
|
11358
|
+
* Every node gets registered at a ResizeObserver. Whenever a node
|
|
11350
11359
|
* changes its dimensions, this function is called to measure the
|
|
11351
11360
|
* new dimensions and update the nodes.
|
|
11352
11361
|
*/ updateNodeInternals: (updates)=>{
|
|
@@ -11738,6 +11747,67 @@ function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTy
|
|
|
11738
11747
|
nodeExtent: nodeExtent,
|
|
11739
11748
|
zIndexMode: zIndexMode,
|
|
11740
11749
|
children: [
|
|
11750
|
+
jsxRuntime.jsx(StoreUpdater, {
|
|
11751
|
+
nodes: nodes,
|
|
11752
|
+
edges: edges,
|
|
11753
|
+
defaultNodes: defaultNodes,
|
|
11754
|
+
defaultEdges: defaultEdges,
|
|
11755
|
+
onConnect: onConnect,
|
|
11756
|
+
onConnectStart: onConnectStart,
|
|
11757
|
+
onConnectEnd: onConnectEnd,
|
|
11758
|
+
onClickConnectStart: onClickConnectStart,
|
|
11759
|
+
onClickConnectEnd: onClickConnectEnd,
|
|
11760
|
+
nodesDraggable: nodesDraggable,
|
|
11761
|
+
autoPanOnNodeFocus: autoPanOnNodeFocus,
|
|
11762
|
+
nodesConnectable: nodesConnectable,
|
|
11763
|
+
nodesFocusable: nodesFocusable,
|
|
11764
|
+
edgesFocusable: edgesFocusable,
|
|
11765
|
+
edgesReconnectable: edgesReconnectable,
|
|
11766
|
+
elementsSelectable: elementsSelectable,
|
|
11767
|
+
elevateNodesOnSelect: elevateNodesOnSelect,
|
|
11768
|
+
elevateEdgesOnSelect: elevateEdgesOnSelect,
|
|
11769
|
+
minZoom: minZoom,
|
|
11770
|
+
maxZoom: maxZoom,
|
|
11771
|
+
nodeExtent: nodeExtent,
|
|
11772
|
+
onNodesChange: onNodesChange,
|
|
11773
|
+
onEdgesChange: onEdgesChange,
|
|
11774
|
+
snapToGrid: snapToGrid,
|
|
11775
|
+
snapGrid: snapGrid,
|
|
11776
|
+
connectionMode: connectionMode,
|
|
11777
|
+
translateExtent: translateExtent,
|
|
11778
|
+
connectOnClick: connectOnClick,
|
|
11779
|
+
defaultEdgeOptions: defaultEdgeOptions,
|
|
11780
|
+
fitView: fitView,
|
|
11781
|
+
fitViewOptions: fitViewOptions,
|
|
11782
|
+
onNodesDelete: onNodesDelete,
|
|
11783
|
+
onEdgesDelete: onEdgesDelete,
|
|
11784
|
+
onDelete: onDelete,
|
|
11785
|
+
onNodeDragStart: onNodeDragStart,
|
|
11786
|
+
onNodeDrag: onNodeDrag,
|
|
11787
|
+
onNodeDragStop: onNodeDragStop,
|
|
11788
|
+
onSelectionDrag: onSelectionDrag,
|
|
11789
|
+
onSelectionDragStart: onSelectionDragStart,
|
|
11790
|
+
onSelectionDragStop: onSelectionDragStop,
|
|
11791
|
+
onMove: onMove,
|
|
11792
|
+
onMoveStart: onMoveStart,
|
|
11793
|
+
onMoveEnd: onMoveEnd,
|
|
11794
|
+
noPanClassName: noPanClassName,
|
|
11795
|
+
nodeOrigin: nodeOrigin,
|
|
11796
|
+
rfId: rfId,
|
|
11797
|
+
autoPanOnConnect: autoPanOnConnect,
|
|
11798
|
+
autoPanOnNodeDrag: autoPanOnNodeDrag,
|
|
11799
|
+
autoPanSpeed: autoPanSpeed,
|
|
11800
|
+
onError: onError,
|
|
11801
|
+
connectionRadius: connectionRadius,
|
|
11802
|
+
isValidConnection: isValidConnection,
|
|
11803
|
+
selectNodesOnDrag: selectNodesOnDrag,
|
|
11804
|
+
nodeDragThreshold: nodeDragThreshold,
|
|
11805
|
+
connectionDragThreshold: connectionDragThreshold,
|
|
11806
|
+
onBeforeDelete: onBeforeDelete,
|
|
11807
|
+
debug: debug,
|
|
11808
|
+
ariaLabelConfig: ariaLabelConfig,
|
|
11809
|
+
zIndexMode: zIndexMode
|
|
11810
|
+
}),
|
|
11741
11811
|
jsxRuntime.jsx(GraphView, {
|
|
11742
11812
|
onInit: onInit,
|
|
11743
11813
|
onNodeClick: onNodeClick,
|
|
@@ -11803,67 +11873,6 @@ function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTy
|
|
|
11803
11873
|
viewport: viewport,
|
|
11804
11874
|
onViewportChange: onViewportChange
|
|
11805
11875
|
}),
|
|
11806
|
-
jsxRuntime.jsx(StoreUpdater, {
|
|
11807
|
-
nodes: nodes,
|
|
11808
|
-
edges: edges,
|
|
11809
|
-
defaultNodes: defaultNodes,
|
|
11810
|
-
defaultEdges: defaultEdges,
|
|
11811
|
-
onConnect: onConnect,
|
|
11812
|
-
onConnectStart: onConnectStart,
|
|
11813
|
-
onConnectEnd: onConnectEnd,
|
|
11814
|
-
onClickConnectStart: onClickConnectStart,
|
|
11815
|
-
onClickConnectEnd: onClickConnectEnd,
|
|
11816
|
-
nodesDraggable: nodesDraggable,
|
|
11817
|
-
autoPanOnNodeFocus: autoPanOnNodeFocus,
|
|
11818
|
-
nodesConnectable: nodesConnectable,
|
|
11819
|
-
nodesFocusable: nodesFocusable,
|
|
11820
|
-
edgesFocusable: edgesFocusable,
|
|
11821
|
-
edgesReconnectable: edgesReconnectable,
|
|
11822
|
-
elementsSelectable: elementsSelectable,
|
|
11823
|
-
elevateNodesOnSelect: elevateNodesOnSelect,
|
|
11824
|
-
elevateEdgesOnSelect: elevateEdgesOnSelect,
|
|
11825
|
-
minZoom: minZoom,
|
|
11826
|
-
maxZoom: maxZoom,
|
|
11827
|
-
nodeExtent: nodeExtent,
|
|
11828
|
-
onNodesChange: onNodesChange,
|
|
11829
|
-
onEdgesChange: onEdgesChange,
|
|
11830
|
-
snapToGrid: snapToGrid,
|
|
11831
|
-
snapGrid: snapGrid,
|
|
11832
|
-
connectionMode: connectionMode,
|
|
11833
|
-
translateExtent: translateExtent,
|
|
11834
|
-
connectOnClick: connectOnClick,
|
|
11835
|
-
defaultEdgeOptions: defaultEdgeOptions,
|
|
11836
|
-
fitView: fitView,
|
|
11837
|
-
fitViewOptions: fitViewOptions,
|
|
11838
|
-
onNodesDelete: onNodesDelete,
|
|
11839
|
-
onEdgesDelete: onEdgesDelete,
|
|
11840
|
-
onDelete: onDelete,
|
|
11841
|
-
onNodeDragStart: onNodeDragStart,
|
|
11842
|
-
onNodeDrag: onNodeDrag,
|
|
11843
|
-
onNodeDragStop: onNodeDragStop,
|
|
11844
|
-
onSelectionDrag: onSelectionDrag,
|
|
11845
|
-
onSelectionDragStart: onSelectionDragStart,
|
|
11846
|
-
onSelectionDragStop: onSelectionDragStop,
|
|
11847
|
-
onMove: onMove,
|
|
11848
|
-
onMoveStart: onMoveStart,
|
|
11849
|
-
onMoveEnd: onMoveEnd,
|
|
11850
|
-
noPanClassName: noPanClassName,
|
|
11851
|
-
nodeOrigin: nodeOrigin,
|
|
11852
|
-
rfId: rfId,
|
|
11853
|
-
autoPanOnConnect: autoPanOnConnect,
|
|
11854
|
-
autoPanOnNodeDrag: autoPanOnNodeDrag,
|
|
11855
|
-
autoPanSpeed: autoPanSpeed,
|
|
11856
|
-
onError: onError,
|
|
11857
|
-
connectionRadius: connectionRadius,
|
|
11858
|
-
isValidConnection: isValidConnection,
|
|
11859
|
-
selectNodesOnDrag: selectNodesOnDrag,
|
|
11860
|
-
nodeDragThreshold: nodeDragThreshold,
|
|
11861
|
-
connectionDragThreshold: connectionDragThreshold,
|
|
11862
|
-
onBeforeDelete: onBeforeDelete,
|
|
11863
|
-
debug: debug,
|
|
11864
|
-
ariaLabelConfig: ariaLabelConfig,
|
|
11865
|
-
zIndexMode: zIndexMode
|
|
11866
|
-
}),
|
|
11867
11876
|
jsxRuntime.jsx(SelectionListener, {
|
|
11868
11877
|
onSelectionChange: onSelectionChange
|
|
11869
11878
|
}),
|
|
@@ -12835,7 +12844,7 @@ var css_248z = "/* this gets exported as style.css and can be used for the defau
|
|
|
12835
12844
|
styleInject(css_248z);
|
|
12836
12845
|
|
|
12837
12846
|
/**
|
|
12838
|
-
* @license lucide-react
|
|
12847
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12839
12848
|
*
|
|
12840
12849
|
* This source code is licensed under the ISC license.
|
|
12841
12850
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -12844,14 +12853,14 @@ styleInject(css_248z);
|
|
|
12844
12853
|
}).join(" ").trim();
|
|
12845
12854
|
|
|
12846
12855
|
/**
|
|
12847
|
-
* @license lucide-react
|
|
12856
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12848
12857
|
*
|
|
12849
12858
|
* This source code is licensed under the ISC license.
|
|
12850
12859
|
* See the LICENSE file in the root directory of this source tree.
|
|
12851
12860
|
*/ const toKebabCase = (string)=>string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
12852
12861
|
|
|
12853
12862
|
/**
|
|
12854
|
-
* @license lucide-react
|
|
12863
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12855
12864
|
*
|
|
12856
12865
|
* This source code is licensed under the ISC license.
|
|
12857
12866
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -12863,7 +12872,7 @@ const toPascalCase = (string)=>{
|
|
|
12863
12872
|
};
|
|
12864
12873
|
|
|
12865
12874
|
/**
|
|
12866
|
-
* @license lucide-react
|
|
12875
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12867
12876
|
*
|
|
12868
12877
|
* This source code is licensed under the ISC license.
|
|
12869
12878
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -12880,7 +12889,7 @@ const toPascalCase = (string)=>{
|
|
|
12880
12889
|
};
|
|
12881
12890
|
|
|
12882
12891
|
/**
|
|
12883
|
-
* @license lucide-react
|
|
12892
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12884
12893
|
*
|
|
12885
12894
|
* This source code is licensed under the ISC license.
|
|
12886
12895
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -12893,14 +12902,20 @@ const toPascalCase = (string)=>{
|
|
|
12893
12902
|
return false;
|
|
12894
12903
|
};
|
|
12895
12904
|
|
|
12896
|
-
const
|
|
12905
|
+
const LucideContext = React.createContext({});
|
|
12906
|
+
const useLucideContext = ()=>React.useContext(LucideContext);
|
|
12907
|
+
|
|
12908
|
+
const Icon = React.forwardRef(({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref)=>{
|
|
12909
|
+
const { size: contextSize = 24, strokeWidth: contextStrokeWidth = 2, absoluteStrokeWidth: contextAbsoluteStrokeWidth = false, color: contextColor = "currentColor", className: contextClass = "" } = useLucideContext() ?? {};
|
|
12910
|
+
const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
|
|
12911
|
+
return React.createElement("svg", {
|
|
12897
12912
|
ref,
|
|
12898
12913
|
...defaultAttributes,
|
|
12899
|
-
width: size,
|
|
12900
|
-
height: size,
|
|
12901
|
-
stroke: color,
|
|
12902
|
-
strokeWidth:
|
|
12903
|
-
className: mergeClasses("lucide", className),
|
|
12914
|
+
width: size ?? contextSize ?? defaultAttributes.width,
|
|
12915
|
+
height: size ?? contextSize ?? defaultAttributes.height,
|
|
12916
|
+
stroke: color ?? contextColor,
|
|
12917
|
+
strokeWidth: calculatedStrokeWidth,
|
|
12918
|
+
className: mergeClasses("lucide", contextClass, className),
|
|
12904
12919
|
...!children && !hasA11yProp(rest) && {
|
|
12905
12920
|
"aria-hidden": "true"
|
|
12906
12921
|
},
|
|
@@ -12910,7 +12925,8 @@ const Icon = React.forwardRef(({ color = "currentColor", size = 24, strokeWidth
|
|
|
12910
12925
|
...Array.isArray(children) ? children : [
|
|
12911
12926
|
children
|
|
12912
12927
|
]
|
|
12913
|
-
])
|
|
12928
|
+
]);
|
|
12929
|
+
});
|
|
12914
12930
|
|
|
12915
12931
|
const createLucideIcon = (iconName, iconNode)=>{
|
|
12916
12932
|
const Component = React.forwardRef(({ className, ...props }, ref)=>React.createElement(Icon, {
|
|
@@ -12923,7 +12939,7 @@ const createLucideIcon = (iconName, iconNode)=>{
|
|
|
12923
12939
|
return Component;
|
|
12924
12940
|
};
|
|
12925
12941
|
|
|
12926
|
-
const __iconNode$
|
|
12942
|
+
const __iconNode$y = [
|
|
12927
12943
|
[
|
|
12928
12944
|
"path",
|
|
12929
12945
|
{
|
|
@@ -12939,9 +12955,9 @@ const __iconNode$x = [
|
|
|
12939
12955
|
}
|
|
12940
12956
|
]
|
|
12941
12957
|
];
|
|
12942
|
-
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$
|
|
12958
|
+
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$y);
|
|
12943
12959
|
|
|
12944
|
-
const __iconNode$
|
|
12960
|
+
const __iconNode$x = [
|
|
12945
12961
|
[
|
|
12946
12962
|
"path",
|
|
12947
12963
|
{
|
|
@@ -12957,9 +12973,9 @@ const __iconNode$w = [
|
|
|
12957
12973
|
}
|
|
12958
12974
|
]
|
|
12959
12975
|
];
|
|
12960
|
-
const ArrowRight = createLucideIcon("arrow-right", __iconNode$
|
|
12976
|
+
const ArrowRight = createLucideIcon("arrow-right", __iconNode$x);
|
|
12961
12977
|
|
|
12962
|
-
const __iconNode$
|
|
12978
|
+
const __iconNode$w = [
|
|
12963
12979
|
[
|
|
12964
12980
|
"path",
|
|
12965
12981
|
{
|
|
@@ -13007,9 +13023,9 @@ const __iconNode$v = [
|
|
|
13007
13023
|
}
|
|
13008
13024
|
]
|
|
13009
13025
|
];
|
|
13010
|
-
const Bot = createLucideIcon("bot", __iconNode$
|
|
13026
|
+
const Bot = createLucideIcon("bot", __iconNode$w);
|
|
13011
13027
|
|
|
13012
|
-
const __iconNode$
|
|
13028
|
+
const __iconNode$v = [
|
|
13013
13029
|
[
|
|
13014
13030
|
"path",
|
|
13015
13031
|
{
|
|
@@ -13043,9 +13059,9 @@ const __iconNode$u = [
|
|
|
13043
13059
|
}
|
|
13044
13060
|
]
|
|
13045
13061
|
];
|
|
13046
|
-
const Calendar = createLucideIcon("calendar", __iconNode$
|
|
13062
|
+
const Calendar = createLucideIcon("calendar", __iconNode$v);
|
|
13047
13063
|
|
|
13048
|
-
const __iconNode$
|
|
13064
|
+
const __iconNode$u = [
|
|
13049
13065
|
[
|
|
13050
13066
|
"path",
|
|
13051
13067
|
{
|
|
@@ -13102,9 +13118,9 @@ const __iconNode$t = [
|
|
|
13102
13118
|
}
|
|
13103
13119
|
]
|
|
13104
13120
|
];
|
|
13105
|
-
const ChartNetwork = createLucideIcon("chart-network", __iconNode$
|
|
13121
|
+
const ChartNetwork = createLucideIcon("chart-network", __iconNode$u);
|
|
13106
13122
|
|
|
13107
|
-
const __iconNode$
|
|
13123
|
+
const __iconNode$t = [
|
|
13108
13124
|
[
|
|
13109
13125
|
"path",
|
|
13110
13126
|
{
|
|
@@ -13113,9 +13129,9 @@ const __iconNode$s = [
|
|
|
13113
13129
|
}
|
|
13114
13130
|
]
|
|
13115
13131
|
];
|
|
13116
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
13132
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$t);
|
|
13117
13133
|
|
|
13118
|
-
const __iconNode$
|
|
13134
|
+
const __iconNode$s = [
|
|
13119
13135
|
[
|
|
13120
13136
|
"path",
|
|
13121
13137
|
{
|
|
@@ -13124,9 +13140,9 @@ const __iconNode$r = [
|
|
|
13124
13140
|
}
|
|
13125
13141
|
]
|
|
13126
13142
|
];
|
|
13127
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
13143
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$s);
|
|
13128
13144
|
|
|
13129
|
-
const __iconNode$
|
|
13145
|
+
const __iconNode$r = [
|
|
13130
13146
|
[
|
|
13131
13147
|
"path",
|
|
13132
13148
|
{
|
|
@@ -13142,9 +13158,9 @@ const __iconNode$q = [
|
|
|
13142
13158
|
}
|
|
13143
13159
|
]
|
|
13144
13160
|
];
|
|
13145
|
-
const ChevronsDown = createLucideIcon("chevrons-down", __iconNode$
|
|
13161
|
+
const ChevronsDown = createLucideIcon("chevrons-down", __iconNode$r);
|
|
13146
13162
|
|
|
13147
|
-
const __iconNode$
|
|
13163
|
+
const __iconNode$q = [
|
|
13148
13164
|
[
|
|
13149
13165
|
"path",
|
|
13150
13166
|
{
|
|
@@ -13160,9 +13176,9 @@ const __iconNode$p = [
|
|
|
13160
13176
|
}
|
|
13161
13177
|
]
|
|
13162
13178
|
];
|
|
13163
|
-
const ChevronsUp = createLucideIcon("chevrons-up", __iconNode$
|
|
13179
|
+
const ChevronsUp = createLucideIcon("chevrons-up", __iconNode$q);
|
|
13164
13180
|
|
|
13165
|
-
const __iconNode$
|
|
13181
|
+
const __iconNode$p = [
|
|
13166
13182
|
[
|
|
13167
13183
|
"circle",
|
|
13168
13184
|
{
|
|
@@ -13193,9 +13209,9 @@ const __iconNode$o = [
|
|
|
13193
13209
|
}
|
|
13194
13210
|
]
|
|
13195
13211
|
];
|
|
13196
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
13212
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$p);
|
|
13197
13213
|
|
|
13198
|
-
const __iconNode$
|
|
13214
|
+
const __iconNode$o = [
|
|
13199
13215
|
[
|
|
13200
13216
|
"path",
|
|
13201
13217
|
{
|
|
@@ -13211,9 +13227,9 @@ const __iconNode$n = [
|
|
|
13211
13227
|
}
|
|
13212
13228
|
]
|
|
13213
13229
|
];
|
|
13214
|
-
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$
|
|
13230
|
+
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$o);
|
|
13215
13231
|
|
|
13216
|
-
const __iconNode$
|
|
13232
|
+
const __iconNode$n = [
|
|
13217
13233
|
[
|
|
13218
13234
|
"circle",
|
|
13219
13235
|
{
|
|
@@ -13238,9 +13254,9 @@ const __iconNode$m = [
|
|
|
13238
13254
|
}
|
|
13239
13255
|
]
|
|
13240
13256
|
];
|
|
13241
|
-
const CircleDollarSign = createLucideIcon("circle-dollar-sign", __iconNode$
|
|
13257
|
+
const CircleDollarSign = createLucideIcon("circle-dollar-sign", __iconNode$n);
|
|
13242
13258
|
|
|
13243
|
-
const __iconNode$
|
|
13259
|
+
const __iconNode$m = [
|
|
13244
13260
|
[
|
|
13245
13261
|
"circle",
|
|
13246
13262
|
{
|
|
@@ -13258,9 +13274,9 @@ const __iconNode$l = [
|
|
|
13258
13274
|
}
|
|
13259
13275
|
]
|
|
13260
13276
|
];
|
|
13261
|
-
const Clock = createLucideIcon("clock", __iconNode$
|
|
13277
|
+
const Clock = createLucideIcon("clock", __iconNode$m);
|
|
13262
13278
|
|
|
13263
|
-
const __iconNode$
|
|
13279
|
+
const __iconNode$l = [
|
|
13264
13280
|
[
|
|
13265
13281
|
"rect",
|
|
13266
13282
|
{
|
|
@@ -13281,9 +13297,9 @@ const __iconNode$k = [
|
|
|
13281
13297
|
}
|
|
13282
13298
|
]
|
|
13283
13299
|
];
|
|
13284
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
13300
|
+
const Copy = createLucideIcon("copy", __iconNode$l);
|
|
13285
13301
|
|
|
13286
|
-
const __iconNode$
|
|
13302
|
+
const __iconNode$k = [
|
|
13287
13303
|
[
|
|
13288
13304
|
"path",
|
|
13289
13305
|
{
|
|
@@ -13391,9 +13407,9 @@ const __iconNode$j = [
|
|
|
13391
13407
|
}
|
|
13392
13408
|
]
|
|
13393
13409
|
];
|
|
13394
|
-
const Cpu = createLucideIcon("cpu", __iconNode$
|
|
13410
|
+
const Cpu = createLucideIcon("cpu", __iconNode$k);
|
|
13395
13411
|
|
|
13396
|
-
const __iconNode$
|
|
13412
|
+
const __iconNode$j = [
|
|
13397
13413
|
[
|
|
13398
13414
|
"line",
|
|
13399
13415
|
{
|
|
@@ -13412,9 +13428,9 @@ const __iconNode$i = [
|
|
|
13412
13428
|
}
|
|
13413
13429
|
]
|
|
13414
13430
|
];
|
|
13415
|
-
const DollarSign = createLucideIcon("dollar-sign", __iconNode$
|
|
13431
|
+
const DollarSign = createLucideIcon("dollar-sign", __iconNode$j);
|
|
13416
13432
|
|
|
13417
|
-
const __iconNode$
|
|
13433
|
+
const __iconNode$i = [
|
|
13418
13434
|
[
|
|
13419
13435
|
"path",
|
|
13420
13436
|
{
|
|
@@ -13444,9 +13460,9 @@ const __iconNode$h = [
|
|
|
13444
13460
|
}
|
|
13445
13461
|
]
|
|
13446
13462
|
];
|
|
13447
|
-
const FileInput = createLucideIcon("file-input", __iconNode$
|
|
13463
|
+
const FileInput = createLucideIcon("file-input", __iconNode$i);
|
|
13448
13464
|
|
|
13449
|
-
const __iconNode$
|
|
13465
|
+
const __iconNode$h = [
|
|
13450
13466
|
[
|
|
13451
13467
|
"path",
|
|
13452
13468
|
{
|
|
@@ -13476,9 +13492,9 @@ const __iconNode$g = [
|
|
|
13476
13492
|
}
|
|
13477
13493
|
]
|
|
13478
13494
|
];
|
|
13479
|
-
const FileOutput = createLucideIcon("file-output", __iconNode$
|
|
13495
|
+
const FileOutput = createLucideIcon("file-output", __iconNode$h);
|
|
13480
13496
|
|
|
13481
|
-
const __iconNode$
|
|
13497
|
+
const __iconNode$g = [
|
|
13482
13498
|
[
|
|
13483
13499
|
"path",
|
|
13484
13500
|
{
|
|
@@ -13536,9 +13552,9 @@ const __iconNode$f = [
|
|
|
13536
13552
|
}
|
|
13537
13553
|
]
|
|
13538
13554
|
];
|
|
13539
|
-
const FoldVertical = createLucideIcon("fold-vertical", __iconNode$
|
|
13555
|
+
const FoldVertical = createLucideIcon("fold-vertical", __iconNode$g);
|
|
13540
13556
|
|
|
13541
|
-
const __iconNode$
|
|
13557
|
+
const __iconNode$f = [
|
|
13542
13558
|
[
|
|
13543
13559
|
"line",
|
|
13544
13560
|
{
|
|
@@ -13580,9 +13596,9 @@ const __iconNode$e = [
|
|
|
13580
13596
|
}
|
|
13581
13597
|
]
|
|
13582
13598
|
];
|
|
13583
|
-
const Hash = createLucideIcon("hash", __iconNode$
|
|
13599
|
+
const Hash = createLucideIcon("hash", __iconNode$f);
|
|
13584
13600
|
|
|
13585
|
-
const __iconNode$
|
|
13601
|
+
const __iconNode$e = [
|
|
13586
13602
|
[
|
|
13587
13603
|
"circle",
|
|
13588
13604
|
{
|
|
@@ -13607,9 +13623,9 @@ const __iconNode$d = [
|
|
|
13607
13623
|
}
|
|
13608
13624
|
]
|
|
13609
13625
|
];
|
|
13610
|
-
const Info = createLucideIcon("info", __iconNode$
|
|
13626
|
+
const Info = createLucideIcon("info", __iconNode$e);
|
|
13611
13627
|
|
|
13612
|
-
const __iconNode$
|
|
13628
|
+
const __iconNode$d = [
|
|
13613
13629
|
[
|
|
13614
13630
|
"path",
|
|
13615
13631
|
{
|
|
@@ -13646,9 +13662,9 @@ const __iconNode$c = [
|
|
|
13646
13662
|
}
|
|
13647
13663
|
]
|
|
13648
13664
|
];
|
|
13649
|
-
const ListChecks = createLucideIcon("list-checks", __iconNode$
|
|
13665
|
+
const ListChecks = createLucideIcon("list-checks", __iconNode$d);
|
|
13650
13666
|
|
|
13651
|
-
const __iconNode$
|
|
13667
|
+
const __iconNode$c = [
|
|
13652
13668
|
[
|
|
13653
13669
|
"path",
|
|
13654
13670
|
{
|
|
@@ -13664,9 +13680,9 @@ const __iconNode$b = [
|
|
|
13664
13680
|
}
|
|
13665
13681
|
]
|
|
13666
13682
|
];
|
|
13667
|
-
const MessagesSquare = createLucideIcon("messages-square", __iconNode$
|
|
13683
|
+
const MessagesSquare = createLucideIcon("messages-square", __iconNode$c);
|
|
13668
13684
|
|
|
13669
|
-
const __iconNode$
|
|
13685
|
+
const __iconNode$b = [
|
|
13670
13686
|
[
|
|
13671
13687
|
"rect",
|
|
13672
13688
|
{
|
|
@@ -13686,9 +13702,9 @@ const __iconNode$a = [
|
|
|
13686
13702
|
}
|
|
13687
13703
|
]
|
|
13688
13704
|
];
|
|
13689
|
-
const PanelLeft = createLucideIcon("panel-left", __iconNode$
|
|
13705
|
+
const PanelLeft = createLucideIcon("panel-left", __iconNode$b);
|
|
13690
13706
|
|
|
13691
|
-
const __iconNode$
|
|
13707
|
+
const __iconNode$a = [
|
|
13692
13708
|
[
|
|
13693
13709
|
"path",
|
|
13694
13710
|
{
|
|
@@ -13718,9 +13734,9 @@ const __iconNode$9 = [
|
|
|
13718
13734
|
}
|
|
13719
13735
|
]
|
|
13720
13736
|
];
|
|
13721
|
-
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$
|
|
13737
|
+
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$a);
|
|
13722
13738
|
|
|
13723
|
-
const __iconNode$
|
|
13739
|
+
const __iconNode$9 = [
|
|
13724
13740
|
[
|
|
13725
13741
|
"path",
|
|
13726
13742
|
{
|
|
@@ -13757,9 +13773,9 @@ const __iconNode$8 = [
|
|
|
13757
13773
|
}
|
|
13758
13774
|
]
|
|
13759
13775
|
];
|
|
13760
|
-
const Scale = createLucideIcon("scale", __iconNode$
|
|
13776
|
+
const Scale = createLucideIcon("scale", __iconNode$9);
|
|
13761
13777
|
|
|
13762
|
-
const __iconNode$
|
|
13778
|
+
const __iconNode$8 = [
|
|
13763
13779
|
[
|
|
13764
13780
|
"path",
|
|
13765
13781
|
{
|
|
@@ -13793,9 +13809,9 @@ const __iconNode$7 = [
|
|
|
13793
13809
|
}
|
|
13794
13810
|
]
|
|
13795
13811
|
];
|
|
13796
|
-
const Settings2 = createLucideIcon("settings-2", __iconNode$
|
|
13812
|
+
const Settings2 = createLucideIcon("settings-2", __iconNode$8);
|
|
13797
13813
|
|
|
13798
|
-
const __iconNode$
|
|
13814
|
+
const __iconNode$7 = [
|
|
13799
13815
|
[
|
|
13800
13816
|
"path",
|
|
13801
13817
|
{
|
|
@@ -13818,7 +13834,18 @@ const __iconNode$6 = [
|
|
|
13818
13834
|
}
|
|
13819
13835
|
]
|
|
13820
13836
|
];
|
|
13821
|
-
const Share = createLucideIcon("share", __iconNode$
|
|
13837
|
+
const Share = createLucideIcon("share", __iconNode$7);
|
|
13838
|
+
|
|
13839
|
+
const __iconNode$6 = [
|
|
13840
|
+
[
|
|
13841
|
+
"path",
|
|
13842
|
+
{
|
|
13843
|
+
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
13844
|
+
key: "oel41y"
|
|
13845
|
+
}
|
|
13846
|
+
]
|
|
13847
|
+
];
|
|
13848
|
+
const Shield = createLucideIcon("shield", __iconNode$6);
|
|
13822
13849
|
|
|
13823
13850
|
const __iconNode$5 = [
|
|
13824
13851
|
[
|
|
@@ -15887,6 +15914,18 @@ function css() {
|
|
|
15887
15914
|
}
|
|
15888
15915
|
return serializeStyles(args);
|
|
15889
15916
|
}
|
|
15917
|
+
function keyframes() {
|
|
15918
|
+
var insertable = css.apply(void 0, arguments);
|
|
15919
|
+
var name = "animation-" + insertable.name;
|
|
15920
|
+
return {
|
|
15921
|
+
name: name,
|
|
15922
|
+
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
15923
|
+
anim: 1,
|
|
15924
|
+
toString: function toString() {
|
|
15925
|
+
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
15926
|
+
}
|
|
15927
|
+
};
|
|
15928
|
+
}
|
|
15890
15929
|
|
|
15891
15930
|
const lightTheme = {
|
|
15892
15931
|
colors: {
|
|
@@ -21525,7 +21564,7 @@ function getFontSizes(base) {
|
|
|
21525
21564
|
}));
|
|
21526
21565
|
}
|
|
21527
21566
|
|
|
21528
|
-
var version = '6.3.
|
|
21567
|
+
var version = '6.3.6';
|
|
21529
21568
|
|
|
21530
21569
|
const defaultPresetColors = {
|
|
21531
21570
|
blue: '#1677FF',
|
|
@@ -21827,12 +21866,14 @@ const generateColorPalettes = (baseColor)=>{
|
|
|
21827
21866
|
10: colors$1[6]
|
|
21828
21867
|
};
|
|
21829
21868
|
};
|
|
21830
|
-
const generateNeutralColorPalettes = (bgBaseColor, textBaseColor)=>{
|
|
21869
|
+
const generateNeutralColorPalettes = (bgBaseColor, textBaseColor, shadowColor)=>{
|
|
21831
21870
|
const colorBgBase = bgBaseColor || '#fff';
|
|
21832
21871
|
const colorTextBase = textBaseColor || '#000';
|
|
21872
|
+
const colorShadow = shadowColor || '#000';
|
|
21833
21873
|
return {
|
|
21834
21874
|
colorBgBase,
|
|
21835
21875
|
colorTextBase,
|
|
21876
|
+
colorShadow,
|
|
21836
21877
|
colorText: getAlphaColor$1(colorTextBase, 0.88),
|
|
21837
21878
|
colorTextSecondary: getAlphaColor$1(colorTextBase, 0.65),
|
|
21838
21879
|
colorTextTertiary: getAlphaColor$1(colorTextBase, 0.45),
|
|
@@ -21954,6 +21995,9 @@ function getAlphaColor(frontColor, backgroundColor) {
|
|
|
21954
21995
|
...restToken,
|
|
21955
21996
|
...overrideTokens
|
|
21956
21997
|
};
|
|
21998
|
+
const shadowBaseColor = new fastColor.FastColor(mergedToken.colorShadow);
|
|
21999
|
+
const shadowBaseAlpha = shadowBaseColor.a;
|
|
22000
|
+
const getShadowColor = (alpha)=>shadowBaseColor.clone().setA(shadowBaseAlpha * alpha).toRgbString();
|
|
21957
22001
|
const screenXS = 480;
|
|
21958
22002
|
const screenSM = 576;
|
|
21959
22003
|
const screenMD = 768;
|
|
@@ -22042,19 +22086,19 @@ function getAlphaColor(frontColor, backgroundColor) {
|
|
|
22042
22086
|
marginXL: mergedToken.sizeXL,
|
|
22043
22087
|
marginXXL: mergedToken.sizeXXL,
|
|
22044
22088
|
boxShadow: `
|
|
22045
|
-
0 6px 16px 0
|
|
22046
|
-
0 3px 6px -4px
|
|
22047
|
-
0 9px 28px 8px
|
|
22089
|
+
0 6px 16px 0 ${getShadowColor(0.08)},
|
|
22090
|
+
0 3px 6px -4px ${getShadowColor(0.12)},
|
|
22091
|
+
0 9px 28px 8px ${getShadowColor(0.05)}
|
|
22048
22092
|
`,
|
|
22049
22093
|
boxShadowSecondary: `
|
|
22050
|
-
0 6px 16px 0
|
|
22051
|
-
0 3px 6px -4px
|
|
22052
|
-
0 9px 28px 8px
|
|
22094
|
+
0 6px 16px 0 ${getShadowColor(0.08)},
|
|
22095
|
+
0 3px 6px -4px ${getShadowColor(0.12)},
|
|
22096
|
+
0 9px 28px 8px ${getShadowColor(0.05)}
|
|
22053
22097
|
`,
|
|
22054
22098
|
boxShadowTertiary: `
|
|
22055
|
-
0 1px 2px 0
|
|
22056
|
-
0 1px 6px -1px
|
|
22057
|
-
0 2px 4px 0
|
|
22099
|
+
0 1px 2px 0 ${getShadowColor(0.03)},
|
|
22100
|
+
0 1px 6px -1px ${getShadowColor(0.02)},
|
|
22101
|
+
0 2px 4px 0 ${getShadowColor(0.02)}
|
|
22058
22102
|
`,
|
|
22059
22103
|
screenXS,
|
|
22060
22104
|
screenXSMin: screenXS,
|
|
@@ -22076,36 +22120,36 @@ function getAlphaColor(frontColor, backgroundColor) {
|
|
|
22076
22120
|
screenXXLMax: screenXXXL - 1,
|
|
22077
22121
|
screenXXXL,
|
|
22078
22122
|
screenXXXLMin: screenXXXL,
|
|
22079
|
-
boxShadowPopoverArrow:
|
|
22123
|
+
boxShadowPopoverArrow: `2px 2px 5px ${getShadowColor(0.05)}`,
|
|
22080
22124
|
boxShadowCard: `
|
|
22081
|
-
0 1px 2px -2px ${
|
|
22082
|
-
0 3px 6px 0 ${
|
|
22083
|
-
0 5px 12px 4px ${
|
|
22125
|
+
0 1px 2px -2px ${getShadowColor(0.16)},
|
|
22126
|
+
0 3px 6px 0 ${getShadowColor(0.12)},
|
|
22127
|
+
0 5px 12px 4px ${getShadowColor(0.09)}
|
|
22084
22128
|
`,
|
|
22085
22129
|
boxShadowDrawerRight: `
|
|
22086
|
-
-6px 0 16px 0
|
|
22087
|
-
-3px 0 6px -4px
|
|
22088
|
-
-9px 0 28px 8px
|
|
22130
|
+
-6px 0 16px 0 ${getShadowColor(0.08)},
|
|
22131
|
+
-3px 0 6px -4px ${getShadowColor(0.12)},
|
|
22132
|
+
-9px 0 28px 8px ${getShadowColor(0.05)}
|
|
22089
22133
|
`,
|
|
22090
22134
|
boxShadowDrawerLeft: `
|
|
22091
|
-
6px 0 16px 0
|
|
22092
|
-
3px 0 6px -4px
|
|
22093
|
-
9px 0 28px 8px
|
|
22135
|
+
6px 0 16px 0 ${getShadowColor(0.08)},
|
|
22136
|
+
3px 0 6px -4px ${getShadowColor(0.12)},
|
|
22137
|
+
9px 0 28px 8px ${getShadowColor(0.05)}
|
|
22094
22138
|
`,
|
|
22095
22139
|
boxShadowDrawerUp: `
|
|
22096
|
-
0 6px 16px 0
|
|
22097
|
-
0 3px 6px -4px
|
|
22098
|
-
0 9px 28px 8px
|
|
22140
|
+
0 6px 16px 0 ${getShadowColor(0.08)},
|
|
22141
|
+
0 3px 6px -4px ${getShadowColor(0.12)},
|
|
22142
|
+
0 9px 28px 8px ${getShadowColor(0.05)}
|
|
22099
22143
|
`,
|
|
22100
22144
|
boxShadowDrawerDown: `
|
|
22101
|
-
0 -6px 16px 0
|
|
22102
|
-
0 -3px 6px -4px
|
|
22103
|
-
0 -9px 28px 8px
|
|
22145
|
+
0 -6px 16px 0 ${getShadowColor(0.08)},
|
|
22146
|
+
0 -3px 6px -4px ${getShadowColor(0.12)},
|
|
22147
|
+
0 -9px 28px 8px ${getShadowColor(0.05)}
|
|
22104
22148
|
`,
|
|
22105
|
-
boxShadowTabsOverflowLeft:
|
|
22106
|
-
boxShadowTabsOverflowRight:
|
|
22107
|
-
boxShadowTabsOverflowTop:
|
|
22108
|
-
boxShadowTabsOverflowBottom:
|
|
22149
|
+
boxShadowTabsOverflowLeft: `inset 10px 0 8px -8px ${getShadowColor(0.08)}`,
|
|
22150
|
+
boxShadowTabsOverflowRight: `inset -10px 0 8px -8px ${getShadowColor(0.08)}`,
|
|
22151
|
+
boxShadowTabsOverflowTop: `inset 0 10px 8px -8px ${getShadowColor(0.08)}`,
|
|
22152
|
+
boxShadowTabsOverflowBottom: `inset 0 -10px 8px -8px ${getShadowColor(0.08)}`,
|
|
22109
22153
|
// Override AliasToken
|
|
22110
22154
|
...overrideTokens
|
|
22111
22155
|
};
|
|
@@ -22148,7 +22192,10 @@ const preserve = {
|
|
|
22148
22192
|
screenXLMin: true,
|
|
22149
22193
|
screenXLMax: true,
|
|
22150
22194
|
screenXXL: true,
|
|
22151
|
-
screenXXLMin: true
|
|
22195
|
+
screenXXLMin: true,
|
|
22196
|
+
screenXXLMax: true,
|
|
22197
|
+
screenXXXL: true,
|
|
22198
|
+
screenXXXLMin: true
|
|
22152
22199
|
};
|
|
22153
22200
|
const getComputedToken = (originToken, overrideToken, theme)=>{
|
|
22154
22201
|
const derivativeToken = theme.getDerivativeToken(originToken);
|
|
@@ -22180,6 +22227,7 @@ const getComputedToken = (originToken, overrideToken, theme)=>{
|
|
|
22180
22227
|
// ================================== Hook ==================================
|
|
22181
22228
|
function useToken() {
|
|
22182
22229
|
const { token: rootDesignToken, hashed, theme, override, cssVar: ctxCssVar, zeroRuntime } = React.useContext(DesignTokenContext);
|
|
22230
|
+
const { csp } = React.useContext(ConfigContext);
|
|
22183
22231
|
const cssVar = {
|
|
22184
22232
|
prefix: ctxCssVar?.prefix ?? 'ant',
|
|
22185
22233
|
key: ctxCssVar?.key ?? 'css-var-root'
|
|
@@ -22198,7 +22246,8 @@ function useToken() {
|
|
|
22198
22246
|
unitless,
|
|
22199
22247
|
ignore,
|
|
22200
22248
|
preserve
|
|
22201
|
-
}
|
|
22249
|
+
},
|
|
22250
|
+
nonce: csp?.nonce
|
|
22202
22251
|
});
|
|
22203
22252
|
return [
|
|
22204
22253
|
mergedTheme,
|
|
@@ -22260,6 +22309,17 @@ const clearFix = ()=>({
|
|
|
22260
22309
|
content: '""'
|
|
22261
22310
|
}
|
|
22262
22311
|
});
|
|
22312
|
+
const genFocusOutline = (token, offset)=>({
|
|
22313
|
+
outline: `${cssinjs.unit(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,
|
|
22314
|
+
outlineOffset: offset ?? 1,
|
|
22315
|
+
transition: [
|
|
22316
|
+
`outline-offset`,
|
|
22317
|
+
`outline`
|
|
22318
|
+
].map((prop)=>`${prop} 0s`).join(', ')
|
|
22319
|
+
});
|
|
22320
|
+
const genFocusStyle = (token, offset)=>({
|
|
22321
|
+
'&:focus-visible': genFocusOutline(token, offset)
|
|
22322
|
+
});
|
|
22263
22323
|
const genLinkStyle = (token)=>({
|
|
22264
22324
|
a: {
|
|
22265
22325
|
color: token.colorLink,
|
|
@@ -22286,6 +22346,7 @@ const genLinkStyle = (token)=>({
|
|
|
22286
22346
|
textDecoration: token.linkFocusDecoration,
|
|
22287
22347
|
outline: 0
|
|
22288
22348
|
},
|
|
22349
|
+
...genFocusStyle(token),
|
|
22289
22350
|
'&[disabled]': {
|
|
22290
22351
|
color: token.colorTextDisabled,
|
|
22291
22352
|
cursor: 'not-allowed'
|
|
@@ -22316,17 +22377,6 @@ const genCommonStyle = (token, componentPrefixCls, rootCls, resetFont)=>{
|
|
|
22316
22377
|
}
|
|
22317
22378
|
};
|
|
22318
22379
|
};
|
|
22319
|
-
const genFocusOutline = (token, offset)=>({
|
|
22320
|
-
outline: `${cssinjs.unit(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,
|
|
22321
|
-
outlineOffset: offset ?? 1,
|
|
22322
|
-
transition: [
|
|
22323
|
-
`outline-offset`,
|
|
22324
|
-
`outline`
|
|
22325
|
-
].map((prop)=>`${prop} 0s`).join(', ')
|
|
22326
|
-
});
|
|
22327
|
-
const genFocusStyle = (token, offset)=>({
|
|
22328
|
-
'&:focus-visible': genFocusOutline(token, offset)
|
|
22329
|
-
});
|
|
22330
22380
|
const genIconStyle = (iconPrefixCls)=>({
|
|
22331
22381
|
[`.${iconPrefixCls}`]: {
|
|
22332
22382
|
...resetIcon(),
|
|
@@ -22829,6 +22879,12 @@ function mergeProps$1(...items) {
|
|
|
22829
22879
|
const isNonNullable = (val)=>{
|
|
22830
22880
|
return val !== undefined && val !== null;
|
|
22831
22881
|
};
|
|
22882
|
+
const isNumber = (val)=>{
|
|
22883
|
+
return typeof val === 'number' && !Number.isNaN(val);
|
|
22884
|
+
};
|
|
22885
|
+
const isPrimitive = (value)=>{
|
|
22886
|
+
return typeof value !== 'object' && typeof value !== 'function' || value === null;
|
|
22887
|
+
};
|
|
22832
22888
|
|
|
22833
22889
|
const pickClosable = (context)=>{
|
|
22834
22890
|
if (!context) {
|
|
@@ -23258,7 +23314,7 @@ const genAlertTypeStyle = (bgColor, borderColor, iconColor, token, alertCls)=>({
|
|
|
23258
23314
|
color: iconColor
|
|
23259
23315
|
}
|
|
23260
23316
|
});
|
|
23261
|
-
const genBaseStyle$
|
|
23317
|
+
const genBaseStyle$7 = (token)=>{
|
|
23262
23318
|
const { componentCls, motionDurationSlow: duration, marginXS, marginSM, fontSize, fontSizeLG, lineHeight, borderRadiusLG: borderRadius, motionEaseInOutCirc, withDescriptionIconSize, colorText, colorTextHeading, withDescriptionPadding, defaultPadding } = token;
|
|
23263
23319
|
return {
|
|
23264
23320
|
[componentCls]: {
|
|
@@ -23385,7 +23441,7 @@ const genActionStyle = (token)=>{
|
|
|
23385
23441
|
}
|
|
23386
23442
|
};
|
|
23387
23443
|
};
|
|
23388
|
-
const prepareComponentToken$
|
|
23444
|
+
const prepareComponentToken$n = (token)=>{
|
|
23389
23445
|
const paddingHorizontal = 12; // Fixed value here.
|
|
23390
23446
|
return {
|
|
23391
23447
|
withDescriptionIconSize: token.fontSizeHeading3,
|
|
@@ -23393,11 +23449,11 @@ const prepareComponentToken$m = (token)=>{
|
|
|
23393
23449
|
withDescriptionPadding: `${token.paddingMD}px ${token.paddingContentHorizontalLG}px`
|
|
23394
23450
|
};
|
|
23395
23451
|
};
|
|
23396
|
-
var useStyle$
|
|
23397
|
-
genBaseStyle$
|
|
23452
|
+
var useStyle$u = genStyleHooks('Alert', (token)=>[
|
|
23453
|
+
genBaseStyle$7(token),
|
|
23398
23454
|
genTypeStyle(token),
|
|
23399
23455
|
genActionStyle(token)
|
|
23400
|
-
], prepareComponentToken$
|
|
23456
|
+
], prepareComponentToken$n);
|
|
23401
23457
|
|
|
23402
23458
|
const IconNode = (props)=>{
|
|
23403
23459
|
const { icon, type, className, style, successIcon, infoIcon, warningIcon, errorIcon } = props;
|
|
@@ -23449,7 +23505,7 @@ const Alert$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref$1)=>{
|
|
|
23449
23505
|
}));
|
|
23450
23506
|
const { getPrefixCls, direction, closable: contextClosable, closeIcon: contextCloseIcon, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, successIcon, infoIcon, warningIcon, errorIcon } = useComponentConfig('alert');
|
|
23451
23507
|
const prefixCls = getPrefixCls('alert', customizePrefixCls);
|
|
23452
|
-
const [hashId, cssVarCls] = useStyle$
|
|
23508
|
+
const [hashId, cssVarCls] = useStyle$u(prefixCls);
|
|
23453
23509
|
const { onClose: closableOnClose, afterClose: closableAfterClose } = closable && typeof closable === 'object' ? closable : {};
|
|
23454
23510
|
const handleClose = (e)=>{
|
|
23455
23511
|
setClosed(true);
|
|
@@ -23702,20 +23758,18 @@ function _inherits(t, e) {
|
|
|
23702
23758
|
}), e && _setPrototypeOf(t, e);
|
|
23703
23759
|
}
|
|
23704
23760
|
|
|
23705
|
-
let ErrorBoundary$1 = /*#__PURE__*/ function(_React$
|
|
23761
|
+
let ErrorBoundary$1 = /*#__PURE__*/ function(_React$PureComponent) {
|
|
23706
23762
|
function ErrorBoundary() {
|
|
23707
23763
|
var _this;
|
|
23708
23764
|
_classCallCheck(this, ErrorBoundary);
|
|
23709
23765
|
_this = _callSuper(this, ErrorBoundary, arguments);
|
|
23710
23766
|
_this.state = {
|
|
23711
23767
|
error: undefined,
|
|
23712
|
-
info: {
|
|
23713
|
-
componentStack: ''
|
|
23714
|
-
}
|
|
23768
|
+
info: {}
|
|
23715
23769
|
};
|
|
23716
23770
|
return _this;
|
|
23717
23771
|
}
|
|
23718
|
-
_inherits(ErrorBoundary, _React$
|
|
23772
|
+
_inherits(ErrorBoundary, _React$PureComponent);
|
|
23719
23773
|
return _createClass(ErrorBoundary, [
|
|
23720
23774
|
{
|
|
23721
23775
|
key: "componentDidCatch",
|
|
@@ -23733,8 +23787,8 @@ let ErrorBoundary$1 = /*#__PURE__*/ function(_React$Component) {
|
|
|
23733
23787
|
const { error, info } = this.state;
|
|
23734
23788
|
const mergedTitle = title ?? message;
|
|
23735
23789
|
const componentStack = info?.componentStack || null;
|
|
23736
|
-
const errorMessage =
|
|
23737
|
-
const errorDescription =
|
|
23790
|
+
const errorMessage = isNonNullable(mergedTitle) ? mergedTitle : error?.toString();
|
|
23791
|
+
const errorDescription = isNonNullable(description) ? description : componentStack;
|
|
23738
23792
|
if (error) {
|
|
23739
23793
|
return /*#__PURE__*/ React__namespace.createElement(Alert$1, {
|
|
23740
23794
|
id: id,
|
|
@@ -23752,14 +23806,14 @@ let ErrorBoundary$1 = /*#__PURE__*/ function(_React$Component) {
|
|
|
23752
23806
|
}
|
|
23753
23807
|
}
|
|
23754
23808
|
]);
|
|
23755
|
-
}(React__namespace.
|
|
23809
|
+
}(React__namespace.PureComponent);
|
|
23756
23810
|
|
|
23757
23811
|
const Alert = Alert$1;
|
|
23758
23812
|
Alert.ErrorBoundary = ErrorBoundary$1;
|
|
23759
23813
|
|
|
23760
|
-
|
|
23814
|
+
const isWindow = (obj)=>{
|
|
23761
23815
|
return isNonNullable(obj) && obj === obj.window;
|
|
23762
|
-
}
|
|
23816
|
+
};
|
|
23763
23817
|
const getScroll = (target)=>{
|
|
23764
23818
|
if (typeof window === 'undefined') {
|
|
23765
23819
|
/* istanbul ignore next */ return 0;
|
|
@@ -24017,7 +24071,8 @@ function MotionWrapper(props) {
|
|
|
24017
24071
|
/**
|
|
24018
24072
|
* Warning for ConfigProviderProps.
|
|
24019
24073
|
* This will be empty function in production.
|
|
24020
|
-
*/ const PropWarning$1 = /*#__PURE__*/ React__namespace.memo((
|
|
24074
|
+
*/ const PropWarning$1 = /*#__PURE__*/ React__namespace.memo((props)=>{
|
|
24075
|
+
const { dropdownMatchSelectWidth } = props;
|
|
24021
24076
|
const warning = devUseWarning('ConfigProvider');
|
|
24022
24077
|
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
|
|
24023
24078
|
return null;
|
|
@@ -24489,19 +24544,19 @@ const genMessageStyle = (token)=>{
|
|
|
24489
24544
|
}
|
|
24490
24545
|
];
|
|
24491
24546
|
};
|
|
24492
|
-
const prepareComponentToken$
|
|
24547
|
+
const prepareComponentToken$m = (token)=>({
|
|
24493
24548
|
zIndexPopup: token.zIndexPopupBase + CONTAINER_MAX_OFFSET + 10,
|
|
24494
24549
|
contentBg: token.colorBgElevated,
|
|
24495
24550
|
contentPadding: `${(token.controlHeightLG - token.fontSize * token.lineHeight) / 2}px ${token.paddingSM}px`
|
|
24496
24551
|
});
|
|
24497
24552
|
// ============================== Export ==============================
|
|
24498
|
-
var useStyle$
|
|
24553
|
+
var useStyle$t = genStyleHooks('Message', (token)=>{
|
|
24499
24554
|
// Gen-style functions here
|
|
24500
24555
|
const combinedToken = cssinjsUtils.mergeToken(token, {
|
|
24501
24556
|
height: 150
|
|
24502
24557
|
});
|
|
24503
24558
|
return genMessageStyle(combinedToken);
|
|
24504
|
-
}, prepareComponentToken$
|
|
24559
|
+
}, prepareComponentToken$m);
|
|
24505
24560
|
|
|
24506
24561
|
const TypeIcon = {
|
|
24507
24562
|
info: /*#__PURE__*/ React__namespace.createElement(InfoCircleFilled, null),
|
|
@@ -24530,12 +24585,12 @@ const PureContent = (props)=>{
|
|
|
24530
24585
|
style: styles?.content
|
|
24531
24586
|
}, children));
|
|
24532
24587
|
};
|
|
24533
|
-
/** @private Internal Component. Do not use in your production. */ const PurePanel$
|
|
24588
|
+
/** @private Internal Component. Do not use in your production. */ const PurePanel$5 = (props)=>{
|
|
24534
24589
|
const { prefixCls: staticPrefixCls, className, style, type, icon, content, classNames: messageClassNames, styles, ...restProps } = props;
|
|
24535
24590
|
const { getPrefixCls, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('message');
|
|
24536
24591
|
const prefixCls = staticPrefixCls || getPrefixCls('message');
|
|
24537
24592
|
const rootCls = useCSSVarCls(prefixCls);
|
|
24538
|
-
const [hashId, cssVarCls] = useStyle$
|
|
24593
|
+
const [hashId, cssVarCls] = useStyle$t(prefixCls, rootCls);
|
|
24539
24594
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
24540
24595
|
contextClassNames,
|
|
24541
24596
|
messageClassNames
|
|
@@ -24590,7 +24645,7 @@ const DEFAULT_OFFSET = 8;
|
|
|
24590
24645
|
const DEFAULT_DURATION = 3;
|
|
24591
24646
|
const Wrapper = ({ children, prefixCls })=>{
|
|
24592
24647
|
const rootCls = useCSSVarCls(prefixCls);
|
|
24593
|
-
const [hashId, cssVarCls] = useStyle$
|
|
24648
|
+
const [hashId, cssVarCls] = useStyle$t(prefixCls, rootCls);
|
|
24594
24649
|
return /*#__PURE__*/ React__namespace.createElement(notification.NotificationProvider, {
|
|
24595
24650
|
classNames: {
|
|
24596
24651
|
list: clsx(hashId, cssVarCls, rootCls)
|
|
@@ -24671,7 +24726,6 @@ function useInternalMessage(messageConfig) {
|
|
|
24671
24726
|
if (!holderRef.current) {
|
|
24672
24727
|
process.env.NODE_ENV !== "production" ? warning(false, 'usage', 'You are calling notice in render which will break in React 18 concurrent mode. Please trigger in effect instead.') : void 0;
|
|
24673
24728
|
const fakeResult = ()=>{};
|
|
24674
|
-
// eslint-disable-next-line react-hooks/immutability
|
|
24675
24729
|
fakeResult.then = ()=>{};
|
|
24676
24730
|
return fakeResult;
|
|
24677
24731
|
}
|
|
@@ -24805,15 +24859,12 @@ const getCollapsedHeight = ()=>({
|
|
|
24805
24859
|
height: 0,
|
|
24806
24860
|
opacity: 0
|
|
24807
24861
|
});
|
|
24808
|
-
const getRealHeight = (node)=>{
|
|
24809
|
-
|
|
24810
|
-
|
|
24811
|
-
|
|
24812
|
-
opacity: 1
|
|
24813
|
-
};
|
|
24814
|
-
};
|
|
24862
|
+
const getRealHeight = (node)=>({
|
|
24863
|
+
height: node?.scrollHeight ?? 0,
|
|
24864
|
+
opacity: node ? 1 : 0
|
|
24865
|
+
});
|
|
24815
24866
|
const getCurrentHeight = (node)=>({
|
|
24816
|
-
height: node
|
|
24867
|
+
height: node?.offsetHeight ?? 0
|
|
24817
24868
|
});
|
|
24818
24869
|
const skipOpacityTransition = (_, event)=>event?.deadline === true || event.propertyName === 'height';
|
|
24819
24870
|
const initCollapseMotion = (rootCls = defaultPrefixCls)=>({
|
|
@@ -24868,7 +24919,7 @@ const genWaveStyle = (token)=>{
|
|
|
24868
24919
|
}
|
|
24869
24920
|
};
|
|
24870
24921
|
};
|
|
24871
|
-
var useStyle$
|
|
24922
|
+
var useStyle$s = genComponentStyleHook('Wave', genWaveStyle);
|
|
24872
24923
|
|
|
24873
24924
|
const TARGET_CLS = `${defaultPrefixCls}-wave-target`;
|
|
24874
24925
|
|
|
@@ -25022,15 +25073,15 @@ const useWave = (nodeRef, className, component, colorSource)=>{
|
|
|
25022
25073
|
colorSource
|
|
25023
25074
|
});
|
|
25024
25075
|
});
|
|
25025
|
-
const
|
|
25076
|
+
const rafIdRef = React__namespace.useRef(null);
|
|
25026
25077
|
// Clean up RAF on unmount to prevent memory leaks and stale callbacks
|
|
25027
25078
|
React__namespace.useEffect(()=>()=>{
|
|
25028
|
-
raf.cancel(
|
|
25079
|
+
raf.cancel(rafIdRef.current);
|
|
25029
25080
|
}, []);
|
|
25030
25081
|
// Merge trigger event into one for each frame
|
|
25031
25082
|
const showDebounceWave = (event)=>{
|
|
25032
|
-
raf.cancel(
|
|
25033
|
-
|
|
25083
|
+
raf.cancel(rafIdRef.current);
|
|
25084
|
+
rafIdRef.current = raf(()=>{
|
|
25034
25085
|
showWave(event);
|
|
25035
25086
|
});
|
|
25036
25087
|
};
|
|
@@ -25043,7 +25094,7 @@ const Wave = (props)=>{
|
|
|
25043
25094
|
const containerRef = React.useRef(null);
|
|
25044
25095
|
// ============================== Style ===============================
|
|
25045
25096
|
const prefixCls = getPrefixCls('wave');
|
|
25046
|
-
const hashId = useStyle$
|
|
25097
|
+
const hashId = useStyle$s(prefixCls);
|
|
25047
25098
|
// =============================== Wave ===============================
|
|
25048
25099
|
const showWave = useWave(containerRef, clsx(prefixCls, hashId), component, colorSource);
|
|
25049
25100
|
// ============================== Effect ==============================
|
|
@@ -25121,7 +25172,7 @@ const genSpaceCompactStyle = (token)=>{
|
|
|
25121
25172
|
};
|
|
25122
25173
|
};
|
|
25123
25174
|
// ============================== Export ==============================
|
|
25124
|
-
var useStyle$
|
|
25175
|
+
var useStyle$r = genStyleHooks([
|
|
25125
25176
|
'Space',
|
|
25126
25177
|
'Compact'
|
|
25127
25178
|
], genSpaceCompactStyle, ()=>({}), {
|
|
@@ -25180,7 +25231,7 @@ const Compact$1 = (props)=>{
|
|
|
25180
25231
|
const [mergedOrientation, mergedVertical] = useOrientation(orientation, vertical, direction);
|
|
25181
25232
|
const mergedSize = useSize((ctx)=>size ?? ctx);
|
|
25182
25233
|
const prefixCls = getPrefixCls('space-compact', customizePrefixCls);
|
|
25183
|
-
const [hashId] = useStyle$
|
|
25234
|
+
const [hashId] = useStyle$r(prefixCls);
|
|
25184
25235
|
const clx = clsx(prefixCls, hashId, {
|
|
25185
25236
|
[`${prefixCls}-rtl`]: directionConfig === 'rtl',
|
|
25186
25237
|
[`${prefixCls}-block`]: block,
|
|
@@ -25237,8 +25288,8 @@ const ButtonGroup = (props)=>{
|
|
|
25237
25288
|
warning.deprecated(false, 'Button.Group', 'Space.Compact');
|
|
25238
25289
|
process.env.NODE_ENV !== "production" ? warning(!size || [
|
|
25239
25290
|
'large',
|
|
25240
|
-
'
|
|
25241
|
-
'
|
|
25291
|
+
'medium',
|
|
25292
|
+
'small'
|
|
25242
25293
|
].includes(size), 'usage', 'Invalid prop `size`.') : void 0;
|
|
25243
25294
|
}
|
|
25244
25295
|
const classes = clsx(prefixCls, {
|
|
@@ -25424,11 +25475,6 @@ const initMotionCommon = (duration)=>({
|
|
|
25424
25475
|
animationDuration: duration,
|
|
25425
25476
|
animationFillMode: 'both'
|
|
25426
25477
|
});
|
|
25427
|
-
// FIXME: origin less code seems same as initMotionCommon. Maybe we can safe remove
|
|
25428
|
-
const initMotionCommonLeave = (duration)=>({
|
|
25429
|
-
animationDuration: duration,
|
|
25430
|
-
animationFillMode: 'both'
|
|
25431
|
-
});
|
|
25432
25478
|
const initMotion = (motionCls, inKeyframes, outKeyframes, duration, sameLevel = false)=>{
|
|
25433
25479
|
const sameLevelPrefix = sameLevel ? '&' : '';
|
|
25434
25480
|
return {
|
|
@@ -25440,7 +25486,7 @@ const initMotion = (motionCls, inKeyframes, outKeyframes, duration, sameLevel =
|
|
|
25440
25486
|
animationPlayState: 'paused'
|
|
25441
25487
|
},
|
|
25442
25488
|
[`${sameLevelPrefix}${motionCls}-leave`]: {
|
|
25443
|
-
...
|
|
25489
|
+
...initMotionCommon(duration),
|
|
25444
25490
|
animationPlayState: 'paused'
|
|
25445
25491
|
},
|
|
25446
25492
|
[`
|
|
@@ -26181,7 +26227,7 @@ const CollapsePanel = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
26181
26227
|
});
|
|
26182
26228
|
});
|
|
26183
26229
|
|
|
26184
|
-
const genBaseStyle$
|
|
26230
|
+
const genBaseStyle$6 = (token)=>{
|
|
26185
26231
|
const { componentCls, contentBg, padding, headerBg, headerPadding, collapseHeaderPaddingSM, collapseHeaderPaddingLG, collapsePanelBorderRadius, lineWidth, lineType, colorBorder, colorText, colorTextHeading, colorTextDisabled, fontSizeLG, lineHeight, lineHeightLG, marginSM, paddingSM, paddingLG, paddingXS, motionDurationSlow, fontSizeIcon, contentPadding, fontHeight, fontHeightLG } = token;
|
|
26186
26232
|
const borderBase = `${cssinjs.unit(lineWidth)} ${lineType} ${colorBorder}`;
|
|
26187
26233
|
return {
|
|
@@ -26314,10 +26360,7 @@ const genBaseStyle$5 = (token)=>{
|
|
|
26314
26360
|
}
|
|
26315
26361
|
},
|
|
26316
26362
|
[`& ${componentCls}-item-disabled > ${componentCls}-header`]: {
|
|
26317
|
-
|
|
26318
|
-
&,
|
|
26319
|
-
& > .arrow
|
|
26320
|
-
`]: {
|
|
26363
|
+
'&, & > .arrow': {
|
|
26321
26364
|
color: colorTextDisabled,
|
|
26322
26365
|
cursor: 'not-allowed'
|
|
26323
26366
|
}
|
|
@@ -26395,7 +26438,7 @@ const genGhostStyle = (token)=>{
|
|
|
26395
26438
|
}
|
|
26396
26439
|
};
|
|
26397
26440
|
};
|
|
26398
|
-
const prepareComponentToken$
|
|
26441
|
+
const prepareComponentToken$l = (token)=>({
|
|
26399
26442
|
headerPadding: `${token.paddingSM}px ${token.padding}px`,
|
|
26400
26443
|
headerBg: token.colorFillAlter,
|
|
26401
26444
|
contentPadding: `${token.padding}px 16px`,
|
|
@@ -26404,20 +26447,20 @@ const prepareComponentToken$k = (token)=>({
|
|
|
26404
26447
|
borderlessContentPadding: `${token.paddingXXS}px 16px ${token.padding}px`,
|
|
26405
26448
|
borderlessContentBg: 'transparent'
|
|
26406
26449
|
});
|
|
26407
|
-
var useStyle$
|
|
26450
|
+
var useStyle$q = genStyleHooks('Collapse', (token)=>{
|
|
26408
26451
|
const collapseToken = cssinjsUtils.mergeToken(token, {
|
|
26409
26452
|
collapseHeaderPaddingSM: `${cssinjs.unit(token.paddingXS)} ${cssinjs.unit(token.paddingSM)}`,
|
|
26410
26453
|
collapseHeaderPaddingLG: `${cssinjs.unit(token.padding)} ${cssinjs.unit(token.paddingLG)}`,
|
|
26411
26454
|
collapsePanelBorderRadius: token.borderRadiusLG
|
|
26412
26455
|
});
|
|
26413
26456
|
return [
|
|
26414
|
-
genBaseStyle$
|
|
26457
|
+
genBaseStyle$6(collapseToken),
|
|
26415
26458
|
genBorderlessStyle$1(collapseToken),
|
|
26416
26459
|
genGhostStyle(collapseToken),
|
|
26417
26460
|
genArrowStyle(collapseToken),
|
|
26418
26461
|
genCollapseMotion(collapseToken)
|
|
26419
26462
|
];
|
|
26420
|
-
}, prepareComponentToken$
|
|
26463
|
+
}, prepareComponentToken$l);
|
|
26421
26464
|
|
|
26422
26465
|
const Collapse$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
26423
26466
|
const { getPrefixCls, direction, expandIcon: contextExpandIcon, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('collapse');
|
|
@@ -26425,7 +26468,7 @@ const Collapse$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
26425
26468
|
const mergedSize = useSize((ctx)=>customizeSize ?? ctx ?? 'middle');
|
|
26426
26469
|
const prefixCls = getPrefixCls('collapse', customizePrefixCls);
|
|
26427
26470
|
const rootPrefixCls = getPrefixCls();
|
|
26428
|
-
const [hashId, cssVarCls] = useStyle$
|
|
26471
|
+
const [hashId, cssVarCls] = useStyle$q(prefixCls);
|
|
26429
26472
|
const mergedPlacement = expandIconPlacement ?? expandIconPosition ?? 'start';
|
|
26430
26473
|
// =========== Merged Props for Semantic ===========
|
|
26431
26474
|
const mergedProps = {
|
|
@@ -26476,7 +26519,8 @@ const Collapse$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
26476
26519
|
[`${prefixCls}-borderless`]: !bordered,
|
|
26477
26520
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
26478
26521
|
[`${prefixCls}-ghost`]: !!ghost,
|
|
26479
|
-
[`${prefixCls}
|
|
26522
|
+
[`${prefixCls}-large`]: mergedSize === 'large',
|
|
26523
|
+
[`${prefixCls}-small`]: mergedSize === 'small'
|
|
26480
26524
|
}, contextClassName, className, rootClassName, hashId, cssVarCls, mergedClassNames.root);
|
|
26481
26525
|
const openMotion = React__namespace.useMemo(()=>({
|
|
26482
26526
|
...initCollapseMotion(rootPrefixCls),
|
|
@@ -26494,8 +26538,7 @@ const Collapse$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
26494
26538
|
}, [
|
|
26495
26539
|
children
|
|
26496
26540
|
]);
|
|
26497
|
-
return
|
|
26498
|
-
React__namespace.createElement(RcCollapse, {
|
|
26541
|
+
return /*#__PURE__*/ React__namespace.createElement(RcCollapse, {
|
|
26499
26542
|
ref: ref,
|
|
26500
26543
|
openMotion: openMotion,
|
|
26501
26544
|
...util.omit(props, [
|
|
@@ -26512,7 +26555,7 @@ const Collapse$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
26512
26555
|
classNames: mergedClassNames,
|
|
26513
26556
|
styles: mergedStyles,
|
|
26514
26557
|
destroyOnHidden: destroyOnHidden ?? destroyInactivePanel
|
|
26515
|
-
}, items)
|
|
26558
|
+
}, items);
|
|
26516
26559
|
});
|
|
26517
26560
|
if (process.env.NODE_ENV !== 'production') {
|
|
26518
26561
|
Collapse$1.displayName = 'Collapse';
|
|
@@ -26548,7 +26591,7 @@ const prepareToken$2 = (token)=>{
|
|
|
26548
26591
|
});
|
|
26549
26592
|
return buttonToken;
|
|
26550
26593
|
};
|
|
26551
|
-
const prepareComponentToken$
|
|
26594
|
+
const prepareComponentToken$k = (token)=>{
|
|
26552
26595
|
const contentFontSize = token.contentFontSize ?? token.fontSize;
|
|
26553
26596
|
const contentFontSizeSM = token.contentFontSizeSM ?? token.fontSize;
|
|
26554
26597
|
const contentFontSizeLG = token.contentFontSizeLG ?? token.fontSizeLG;
|
|
@@ -27058,7 +27101,7 @@ const genBlockButtonStyle = (token)=>{
|
|
|
27058
27101
|
};
|
|
27059
27102
|
};
|
|
27060
27103
|
// ============================== Export ==============================
|
|
27061
|
-
var useStyle$
|
|
27104
|
+
var useStyle$p = genStyleHooks('Button', (token)=>{
|
|
27062
27105
|
const buttonToken = prepareToken$2(token);
|
|
27063
27106
|
return [
|
|
27064
27107
|
// Shared
|
|
@@ -27074,7 +27117,7 @@ var useStyle$o = genStyleHooks('Button', (token)=>{
|
|
|
27074
27117
|
// Button Group
|
|
27075
27118
|
genGroupStyle$1(buttonToken)
|
|
27076
27119
|
];
|
|
27077
|
-
}, prepareComponentToken$
|
|
27120
|
+
}, prepareComponentToken$k, {
|
|
27078
27121
|
unitless: {
|
|
27079
27122
|
fontWeight: true,
|
|
27080
27123
|
contentLineHeight: true,
|
|
@@ -27258,12 +27301,12 @@ var Compact = genSubStyleComponent([
|
|
|
27258
27301
|
genCompactItemVerticalStyle(buttonToken),
|
|
27259
27302
|
genButtonCompactStyle(buttonToken)
|
|
27260
27303
|
];
|
|
27261
|
-
}, prepareComponentToken$
|
|
27304
|
+
}, prepareComponentToken$k);
|
|
27262
27305
|
|
|
27263
27306
|
function getLoadingConfig(loading) {
|
|
27264
27307
|
if (typeof loading === 'object' && loading) {
|
|
27265
27308
|
let delay = loading?.delay;
|
|
27266
|
-
delay =
|
|
27309
|
+
delay = isNumber(delay) ? delay : 0;
|
|
27267
27310
|
return {
|
|
27268
27311
|
loading: delay <= 0,
|
|
27269
27312
|
delay
|
|
@@ -27366,7 +27409,7 @@ const InternalCompoundedButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
27366
27409
|
const mergedColorText = isDanger ? 'dangerous' : mergedColor;
|
|
27367
27410
|
const mergedInsertSpace = autoInsertSpace ?? contextAutoInsertSpace ?? true;
|
|
27368
27411
|
const prefixCls = getPrefixCls('btn', customizePrefixCls);
|
|
27369
|
-
const [hashId, cssVarCls] = useStyle$
|
|
27412
|
+
const [hashId, cssVarCls] = useStyle$p(prefixCls);
|
|
27370
27413
|
const disabled = React.useContext(DisabledContext);
|
|
27371
27414
|
const mergedDisabled = customDisabled ?? disabled;
|
|
27372
27415
|
const groupSize = React.useContext(GroupSizeContext);
|
|
@@ -27455,14 +27498,7 @@ const InternalCompoundedButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
27455
27498
|
}
|
|
27456
27499
|
// ========================== Size ==========================
|
|
27457
27500
|
const { compactSize, compactItemClassnames } = useCompactItemContext(prefixCls, direction);
|
|
27458
|
-
const sizeClassNameMap = {
|
|
27459
|
-
large: 'lg',
|
|
27460
|
-
small: 'sm',
|
|
27461
|
-
middle: undefined,
|
|
27462
|
-
medium: undefined
|
|
27463
|
-
};
|
|
27464
27501
|
const sizeFullName = useSize((ctxSize)=>customizeSize ?? compactSize ?? groupSize ?? ctxSize);
|
|
27465
|
-
const sizeCls = sizeFullName ? sizeClassNameMap[sizeFullName] ?? '' : '';
|
|
27466
27502
|
const iconType = innerLoading ? 'loading' : icon;
|
|
27467
27503
|
const mergedIconPlacement = iconPlacement ?? iconPosition ?? 'start';
|
|
27468
27504
|
const linkButtonRestProps = util.omit(rest, [
|
|
@@ -27499,7 +27535,8 @@ const InternalCompoundedButton = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
27499
27535
|
[`${prefixCls}-dangerous`]: danger,
|
|
27500
27536
|
[`${prefixCls}-color-${mergedColorText}`]: mergedColorText,
|
|
27501
27537
|
[`${prefixCls}-variant-${mergedVariant}`]: mergedVariant,
|
|
27502
|
-
[`${prefixCls}
|
|
27538
|
+
[`${prefixCls}-lg`]: sizeFullName === 'large',
|
|
27539
|
+
[`${prefixCls}-sm`]: sizeFullName === 'small',
|
|
27503
27540
|
[`${prefixCls}-icon-only`]: !children && children !== 0 && !!iconType,
|
|
27504
27541
|
[`${prefixCls}-background-ghost`]: ghost && !isUnBorderedButtonVariant(mergedVariant),
|
|
27505
27542
|
[`${prefixCls}-loading`]: innerLoading,
|
|
@@ -27650,6 +27687,10 @@ function useFocusable(focusable, defaultTrap, legacyFocusTriggerAfterClose) {
|
|
|
27650
27687
|
|
|
27651
27688
|
const Element$1 = (props)=>{
|
|
27652
27689
|
const { prefixCls, className, style, size, shape } = props;
|
|
27690
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
27691
|
+
const warning = devUseWarning('Skeleton');
|
|
27692
|
+
warning.deprecated(size !== 'default', 'size="default"', 'size="medium"');
|
|
27693
|
+
}
|
|
27653
27694
|
const sizeCls = clsx({
|
|
27654
27695
|
[`${prefixCls}-lg`]: size === 'large',
|
|
27655
27696
|
[`${prefixCls}-sm`]: size === 'small'
|
|
@@ -27659,7 +27700,7 @@ const Element$1 = (props)=>{
|
|
|
27659
27700
|
[`${prefixCls}-square`]: shape === 'square',
|
|
27660
27701
|
[`${prefixCls}-round`]: shape === 'round'
|
|
27661
27702
|
});
|
|
27662
|
-
const sizeStyle = React__namespace.useMemo(()=>
|
|
27703
|
+
const sizeStyle = React__namespace.useMemo(()=>isNumber(size) ? {
|
|
27663
27704
|
width: size,
|
|
27664
27705
|
height: size,
|
|
27665
27706
|
lineHeight: `${size}px`
|
|
@@ -27825,7 +27866,7 @@ const genSkeletonElementButton = (token)=>{
|
|
|
27825
27866
|
};
|
|
27826
27867
|
};
|
|
27827
27868
|
// =============================== Base ===============================
|
|
27828
|
-
const genBaseStyle$
|
|
27869
|
+
const genBaseStyle$5 = (token)=>{
|
|
27829
27870
|
const { componentCls, skeletonAvatarCls, skeletonTitleCls, skeletonParagraphCls, skeletonButtonCls, skeletonInputCls, skeletonNodeCls, skeletonImageCls, controlHeight, controlHeightLG, controlHeightSM, gradientFromColor, padding, marginSM, borderRadius, titleHeight, blockRadius, paragraphLiHeight, controlHeightXS, paragraphMarginTop } = token;
|
|
27830
27871
|
return {
|
|
27831
27872
|
[componentCls]: {
|
|
@@ -27936,7 +27977,7 @@ const genBaseStyle$4 = (token)=>{
|
|
|
27936
27977
|
};
|
|
27937
27978
|
};
|
|
27938
27979
|
// ============================== Export ==============================
|
|
27939
|
-
const prepareComponentToken$
|
|
27980
|
+
const prepareComponentToken$j = (token)=>{
|
|
27940
27981
|
const { colorFillContent, colorFill } = token;
|
|
27941
27982
|
const gradientFromColor = colorFillContent;
|
|
27942
27983
|
const gradientToColor = colorFill;
|
|
@@ -27951,7 +27992,7 @@ const prepareComponentToken$i = (token)=>{
|
|
|
27951
27992
|
paragraphLiHeight: token.controlHeight / 2
|
|
27952
27993
|
};
|
|
27953
27994
|
};
|
|
27954
|
-
var useStyle$
|
|
27995
|
+
var useStyle$o = genStyleHooks('Skeleton', (token)=>{
|
|
27955
27996
|
const { componentCls, calc } = token;
|
|
27956
27997
|
const skeletonToken = cssinjsUtils.mergeToken(token, {
|
|
27957
27998
|
skeletonAvatarCls: `${componentCls}-avatar`,
|
|
@@ -27967,8 +28008,8 @@ var useStyle$n = genStyleHooks('Skeleton', (token)=>{
|
|
|
27967
28008
|
skeletonLoadingBackground: `linear-gradient(90deg, ${token.gradientFromColor} 25%, ${token.gradientToColor} 37%, ${token.gradientFromColor} 63%)`,
|
|
27968
28009
|
skeletonLoadingMotionDuration: '1.4s'
|
|
27969
28010
|
});
|
|
27970
|
-
return genBaseStyle$
|
|
27971
|
-
}, prepareComponentToken$
|
|
28011
|
+
return genBaseStyle$5(skeletonToken);
|
|
28012
|
+
}, prepareComponentToken$j, {
|
|
27972
28013
|
deprecatedTokens: [
|
|
27973
28014
|
[
|
|
27974
28015
|
'color',
|
|
@@ -27982,10 +28023,11 @@ var useStyle$n = genStyleHooks('Skeleton', (token)=>{
|
|
|
27982
28023
|
});
|
|
27983
28024
|
|
|
27984
28025
|
const SkeletonAvatar = (props)=>{
|
|
27985
|
-
const { prefixCls: customizePrefixCls, className, classNames, rootClassName, active, style, styles, shape = 'circle', size
|
|
28026
|
+
const { prefixCls: customizePrefixCls, className, classNames, rootClassName, active, style, styles, shape = 'circle', size: customSize, ...rest } = props;
|
|
27986
28027
|
const { getPrefixCls } = React__namespace.useContext(ConfigContext);
|
|
27987
28028
|
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
27988
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28029
|
+
const [hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
28030
|
+
const mergedSize = useSize((ctx)=>customSize ?? ctx);
|
|
27989
28031
|
const cls = clsx(prefixCls, `${prefixCls}-element`, {
|
|
27990
28032
|
[`${prefixCls}-active`]: active
|
|
27991
28033
|
}, classNames?.root, className, rootClassName, hashId, cssVarCls);
|
|
@@ -28000,16 +28042,17 @@ const SkeletonAvatar = (props)=>{
|
|
|
28000
28042
|
...style
|
|
28001
28043
|
},
|
|
28002
28044
|
shape: shape,
|
|
28003
|
-
size:
|
|
28045
|
+
size: mergedSize,
|
|
28004
28046
|
...rest
|
|
28005
28047
|
}));
|
|
28006
28048
|
};
|
|
28007
28049
|
|
|
28008
28050
|
const SkeletonButton = (props)=>{
|
|
28009
|
-
const { prefixCls: customizePrefixCls, className, rootClassName, classNames, active, style, styles, block = false, size
|
|
28051
|
+
const { prefixCls: customizePrefixCls, className, rootClassName, classNames, active, style, styles, block = false, size: customSize, ...rest } = props;
|
|
28010
28052
|
const { getPrefixCls } = React__namespace.useContext(ConfigContext);
|
|
28011
28053
|
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
28012
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28054
|
+
const [hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
28055
|
+
const mergedSize = useSize((ctx)=>customSize ?? ctx);
|
|
28013
28056
|
const cls = clsx(prefixCls, `${prefixCls}-element`, {
|
|
28014
28057
|
[`${prefixCls}-active`]: active,
|
|
28015
28058
|
[`${prefixCls}-block`]: block
|
|
@@ -28024,7 +28067,7 @@ const SkeletonButton = (props)=>{
|
|
|
28024
28067
|
...styles?.content,
|
|
28025
28068
|
...style
|
|
28026
28069
|
},
|
|
28027
|
-
size:
|
|
28070
|
+
size: mergedSize,
|
|
28028
28071
|
...rest
|
|
28029
28072
|
}));
|
|
28030
28073
|
};
|
|
@@ -28033,7 +28076,7 @@ const SkeletonNode = (props)=>{
|
|
|
28033
28076
|
const { prefixCls: customizePrefixCls, className, classNames, rootClassName, internalClassName, style, styles, active, children } = props;
|
|
28034
28077
|
const { getPrefixCls } = React__namespace.useContext(ConfigContext);
|
|
28035
28078
|
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
28036
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28079
|
+
const [hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
28037
28080
|
const cls = clsx(prefixCls, `${prefixCls}-element`, {
|
|
28038
28081
|
[`${prefixCls}-active`]: active
|
|
28039
28082
|
}, hashId, classNames?.root, className, rootClassName, cssVarCls);
|
|
@@ -28066,10 +28109,11 @@ const SkeletonImage = (props)=>{
|
|
|
28066
28109
|
};
|
|
28067
28110
|
|
|
28068
28111
|
const SkeletonInput = (props)=>{
|
|
28069
|
-
const { prefixCls: customizePrefixCls, className, classNames, rootClassName, active, block, style, styles, size
|
|
28112
|
+
const { prefixCls: customizePrefixCls, className, classNames, rootClassName, active, block, style, styles, size: customSize, ...rest } = props;
|
|
28070
28113
|
const { getPrefixCls } = React__namespace.useContext(ConfigContext);
|
|
28071
28114
|
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
28072
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28115
|
+
const [hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
28116
|
+
const mergedSize = useSize((ctx)=>customSize ?? ctx);
|
|
28073
28117
|
const cls = clsx(prefixCls, `${prefixCls}-element`, {
|
|
28074
28118
|
[`${prefixCls}-active`]: active,
|
|
28075
28119
|
[`${prefixCls}-block`]: block
|
|
@@ -28084,7 +28128,7 @@ const SkeletonInput = (props)=>{
|
|
|
28084
28128
|
...styles?.content,
|
|
28085
28129
|
...style
|
|
28086
28130
|
},
|
|
28087
|
-
size:
|
|
28131
|
+
size: mergedSize,
|
|
28088
28132
|
...rest
|
|
28089
28133
|
}));
|
|
28090
28134
|
};
|
|
@@ -28104,8 +28148,7 @@ const Paragraph$1 = (props)=>{
|
|
|
28104
28148
|
const { prefixCls, className, style, rows = 0 } = props;
|
|
28105
28149
|
const rowList = Array.from({
|
|
28106
28150
|
length: rows
|
|
28107
|
-
}).map((_, index)=>/*#__PURE__*/
|
|
28108
|
-
React__namespace.createElement("li", {
|
|
28151
|
+
}).map((_, index)=>/*#__PURE__*/ React__namespace.createElement("li", {
|
|
28109
28152
|
key: index,
|
|
28110
28153
|
style: {
|
|
28111
28154
|
width: getWidth(index, props)
|
|
@@ -28117,8 +28160,7 @@ const Paragraph$1 = (props)=>{
|
|
|
28117
28160
|
}, rowList);
|
|
28118
28161
|
};
|
|
28119
28162
|
|
|
28120
|
-
const Title$2 = ({ prefixCls, className, width, style })=>/*#__PURE__*/
|
|
28121
|
-
React__namespace.createElement("h3", {
|
|
28163
|
+
const Title$2 = ({ prefixCls, className, width, style })=>/*#__PURE__*/ React__namespace.createElement("h3", {
|
|
28122
28164
|
className: clsx(prefixCls, className),
|
|
28123
28165
|
style: {
|
|
28124
28166
|
width,
|
|
@@ -28177,7 +28219,7 @@ const Skeleton = (props)=>{
|
|
|
28177
28219
|
const { prefixCls: customizePrefixCls, loading, className, rootClassName, classNames, style, styles, children, avatar = false, title = true, paragraph = true, active, round } = props;
|
|
28178
28220
|
const { getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('skeleton');
|
|
28179
28221
|
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
28180
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28222
|
+
const [hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
28181
28223
|
const mergedProps = {
|
|
28182
28224
|
...props,
|
|
28183
28225
|
avatar,
|
|
@@ -28442,7 +28484,8 @@ const getMediaSize = (token)=>{
|
|
|
28442
28484
|
md: token.screenMDMin,
|
|
28443
28485
|
lg: token.screenLGMin,
|
|
28444
28486
|
xl: token.screenXLMin,
|
|
28445
|
-
xxl: token.screenXXLMin
|
|
28487
|
+
xxl: token.screenXXLMin,
|
|
28488
|
+
xxxl: token.screenXXXLMin
|
|
28446
28489
|
};
|
|
28447
28490
|
return mediaSizesMap;
|
|
28448
28491
|
};
|
|
@@ -28521,14 +28564,15 @@ function withPureRenderTheme(Component) {
|
|
|
28521
28564
|
getPopupContainer: ()=>holderRef.current
|
|
28522
28565
|
};
|
|
28523
28566
|
if (alignPropName) {
|
|
28524
|
-
|
|
28567
|
+
mergedProps = {
|
|
28568
|
+
...mergedProps,
|
|
28525
28569
|
[alignPropName]: {
|
|
28526
28570
|
overflow: {
|
|
28527
28571
|
adjustX: false,
|
|
28528
28572
|
adjustY: false
|
|
28529
28573
|
}
|
|
28530
28574
|
}
|
|
28531
|
-
}
|
|
28575
|
+
};
|
|
28532
28576
|
}
|
|
28533
28577
|
const mergedStyle = {
|
|
28534
28578
|
paddingBottom: popupHeight,
|
|
@@ -28703,7 +28747,7 @@ const genSharedEmptyStyle = (token)=>{
|
|
|
28703
28747
|
};
|
|
28704
28748
|
};
|
|
28705
28749
|
// ============================== Export ==============================
|
|
28706
|
-
var useStyle$
|
|
28750
|
+
var useStyle$n = genStyleHooks('Empty', (token)=>{
|
|
28707
28751
|
const { componentCls, controlHeightLG, calc } = token;
|
|
28708
28752
|
const emptyToken = cssinjsUtils.mergeToken(token, {
|
|
28709
28753
|
emptyImgCls: `${componentCls}-img`,
|
|
@@ -28720,7 +28764,7 @@ const Empty = (props)=>{
|
|
|
28720
28764
|
const { className, rootClassName, prefixCls: customizePrefixCls, image, description, children, imageStyle, style, classNames, styles, ...restProps } = props;
|
|
28721
28765
|
const { getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, image: contextImage } = useComponentConfig('empty');
|
|
28722
28766
|
const prefixCls = getPrefixCls('empty', customizePrefixCls);
|
|
28723
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28767
|
+
const [hashId, cssVarCls] = useStyle$n(prefixCls);
|
|
28724
28768
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
28725
28769
|
contextClassNames,
|
|
28726
28770
|
classNames
|
|
@@ -29311,6 +29355,10 @@ const genSelectInputStyle = (token)=>{
|
|
|
29311
29355
|
width: 0,
|
|
29312
29356
|
overflow: 'hidden'
|
|
29313
29357
|
},
|
|
29358
|
+
// >>> Value
|
|
29359
|
+
'&-value': {
|
|
29360
|
+
visibility: 'inherit'
|
|
29361
|
+
},
|
|
29314
29362
|
// >>> Input: should only take effect for not customize mode
|
|
29315
29363
|
// input element with readOnly use cursor pointer
|
|
29316
29364
|
'input[readonly]': {
|
|
@@ -29391,8 +29439,7 @@ const genSelectInputStyle = (token)=>{
|
|
|
29391
29439
|
[`&-single:not(${componentCls}-customize)`]: {
|
|
29392
29440
|
[`${componentCls}-input`]: {
|
|
29393
29441
|
position: 'absolute',
|
|
29394
|
-
|
|
29395
|
-
insetBlock: `calc(${varRef('padding-vertical')} * -1)`,
|
|
29442
|
+
inset: 0,
|
|
29396
29443
|
lineHeight: `calc(${varRef('font-height')} + ${varRef('padding-vertical')} * 2)`
|
|
29397
29444
|
},
|
|
29398
29445
|
// Content center align
|
|
@@ -29501,8 +29548,7 @@ const genSelectInputStyle = (token)=>{
|
|
|
29501
29548
|
}, {
|
|
29502
29549
|
borderRadius: 0,
|
|
29503
29550
|
borderTopColor: 'transparent',
|
|
29504
|
-
|
|
29505
|
-
borderLeftColor: 'transparent'
|
|
29551
|
+
borderInlineColor: 'transparent'
|
|
29506
29552
|
}),
|
|
29507
29553
|
// ============================================================
|
|
29508
29554
|
// == Custom ==
|
|
@@ -29512,7 +29558,7 @@ const genSelectInputStyle = (token)=>{
|
|
|
29512
29558
|
};
|
|
29513
29559
|
};
|
|
29514
29560
|
|
|
29515
|
-
const prepareComponentToken$
|
|
29561
|
+
const prepareComponentToken$i = (token)=>{
|
|
29516
29562
|
const { fontSize, lineHeight, lineWidth, controlHeight, controlHeightSM, controlHeightLG, paddingXXS, controlPaddingHorizontal, zIndexPopupBase, colorText, fontWeightStrong, controlItemBgActive, controlItemBgHover, colorBgContainer, colorFillSecondary, colorBgContainerDisabled, colorTextDisabled, colorPrimaryHover, colorPrimary, controlOutline } = token;
|
|
29517
29563
|
// Item height default use `controlHeight - 2 * paddingXXS`,
|
|
29518
29564
|
// but some case `paddingXXS=0`.
|
|
@@ -29555,7 +29601,7 @@ const prepareComponentToken$h = (token)=>{
|
|
|
29555
29601
|
};
|
|
29556
29602
|
|
|
29557
29603
|
// =============================== Base ===============================
|
|
29558
|
-
const genBaseStyle$
|
|
29604
|
+
const genBaseStyle$4 = (token)=>{
|
|
29559
29605
|
const { antCls, componentCls, motionDurationMid, inputPaddingHorizontalBase } = token;
|
|
29560
29606
|
const hoverShowClearStyle = {
|
|
29561
29607
|
[`${componentCls}-clear`]: {
|
|
@@ -29649,7 +29695,7 @@ const genSelectStyle = (token)=>{
|
|
|
29649
29695
|
// == LTR ==
|
|
29650
29696
|
// =====================================================
|
|
29651
29697
|
// Base
|
|
29652
|
-
genBaseStyle$
|
|
29698
|
+
genBaseStyle$4(token),
|
|
29653
29699
|
// Dropdown
|
|
29654
29700
|
genSingleStyle(token),
|
|
29655
29701
|
// =====================================================
|
|
@@ -29680,7 +29726,7 @@ var useSelectStyle = genStyleHooks('Select', (token, { rootPrefixCls })=>{
|
|
|
29680
29726
|
genSelectStyle(selectToken),
|
|
29681
29727
|
genSelectInputStyle(selectToken)
|
|
29682
29728
|
];
|
|
29683
|
-
}, prepareComponentToken$
|
|
29729
|
+
}, prepareComponentToken$i, {
|
|
29684
29730
|
unitless: {
|
|
29685
29731
|
optionLineHeight: true,
|
|
29686
29732
|
optionSelectedFontWeight: true
|
|
@@ -29943,11 +29989,11 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
29943
29989
|
}
|
|
29944
29990
|
const Select = /*#__PURE__*/ React__namespace.forwardRef(InternalSelect);
|
|
29945
29991
|
// We don't care debug panel
|
|
29946
|
-
/* istanbul ignore next */ const PurePanel$
|
|
29992
|
+
/* istanbul ignore next */ const PurePanel$4 = genPurePanel(Select, 'popupAlign');
|
|
29947
29993
|
Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;
|
|
29948
29994
|
Select.Option = RcSelect.Option;
|
|
29949
29995
|
Select.OptGroup = RcSelect.OptGroup;
|
|
29950
|
-
Select._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$
|
|
29996
|
+
Select._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$4;
|
|
29951
29997
|
if (process.env.NODE_ENV !== 'production') {
|
|
29952
29998
|
Select.displayName = 'Select';
|
|
29953
29999
|
}
|
|
@@ -30011,7 +30057,9 @@ const useResponsiveObserver = ()=>{
|
|
|
30011
30057
|
matchHandlers: {},
|
|
30012
30058
|
dispatch (pointMap) {
|
|
30013
30059
|
screens = pointMap;
|
|
30014
|
-
subscribers.forEach((func)=>
|
|
30060
|
+
subscribers.forEach((func)=>{
|
|
30061
|
+
func(screens);
|
|
30062
|
+
});
|
|
30015
30063
|
return subscribers.size >= 1;
|
|
30016
30064
|
},
|
|
30017
30065
|
subscribe (func) {
|
|
@@ -30079,6 +30127,13 @@ function useBreakpoint(refreshOnChange = true, defaultScreens = {}) {
|
|
|
30079
30127
|
return screensRef.current;
|
|
30080
30128
|
}
|
|
30081
30129
|
|
|
30130
|
+
const getRenderPropValue = (propValue)=>{
|
|
30131
|
+
if (!propValue) {
|
|
30132
|
+
return null;
|
|
30133
|
+
}
|
|
30134
|
+
return typeof propValue === 'function' ? propValue() : propValue;
|
|
30135
|
+
};
|
|
30136
|
+
|
|
30082
30137
|
function getArrowToken(token) {
|
|
30083
30138
|
const { sizePopupArrow, borderRadiusXS, borderRadiusOuter } = token;
|
|
30084
30139
|
const unitWidth = sizePopupArrow / 2;
|
|
@@ -30566,6 +30621,8 @@ function getPlacements(config) {
|
|
|
30566
30621
|
return placementMap;
|
|
30567
30622
|
}
|
|
30568
30623
|
|
|
30624
|
+
const TableMeasureRowContext = /*#__PURE__*/ React.createContext(false);
|
|
30625
|
+
|
|
30569
30626
|
const useMergedArrow = (providedArrow, providedContextArrow)=>{
|
|
30570
30627
|
const toConfig = (arrow)=>typeof arrow === 'boolean' ? {
|
|
30571
30628
|
show: arrow
|
|
@@ -30584,7 +30641,7 @@ const useMergedArrow = (providedArrow, providedContextArrow)=>{
|
|
|
30584
30641
|
]);
|
|
30585
30642
|
};
|
|
30586
30643
|
|
|
30587
|
-
const FALL_BACK_ORIGIN = '50%';
|
|
30644
|
+
const FALL_BACK_ORIGIN$1 = '50%';
|
|
30588
30645
|
const genTooltipStyle = (token)=>{
|
|
30589
30646
|
const { calc, componentCls, // ant-tooltip
|
|
30590
30647
|
tooltipMaxWidth, tooltipColor, tooltipBg, tooltipBorderRadius, zIndexPopup, controlHeight, boxShadowSecondary, paddingSM, paddingXS, arrowOffsetHorizontal, sizePopupArrow, antCls } = token;
|
|
@@ -30610,8 +30667,8 @@ const genTooltipStyle = (token)=>{
|
|
|
30610
30667
|
// When use `autoArrow`, origin will follow the arrow position
|
|
30611
30668
|
[varName('valid-offset-x')]: varRef('arrow-offset-x', 'var(--arrow-x)'),
|
|
30612
30669
|
transformOrigin: [
|
|
30613
|
-
varRef('valid-offset-x', FALL_BACK_ORIGIN),
|
|
30614
|
-
`var(--arrow-y, ${FALL_BACK_ORIGIN})`
|
|
30670
|
+
varRef('valid-offset-x', FALL_BACK_ORIGIN$1),
|
|
30671
|
+
`var(--arrow-y, ${FALL_BACK_ORIGIN$1})`
|
|
30615
30672
|
].join(' ')
|
|
30616
30673
|
};
|
|
30617
30674
|
return [
|
|
@@ -30711,7 +30768,7 @@ const genTooltipStyle = (token)=>{
|
|
|
30711
30768
|
];
|
|
30712
30769
|
};
|
|
30713
30770
|
// ============================== Export ==============================
|
|
30714
|
-
const prepareComponentToken$
|
|
30771
|
+
const prepareComponentToken$h = (token)=>({
|
|
30715
30772
|
zIndexPopup: token.zIndexPopupBase + 70,
|
|
30716
30773
|
maxWidth: 250,
|
|
30717
30774
|
...getArrowOffsetToken({
|
|
@@ -30722,7 +30779,7 @@ const prepareComponentToken$g = (token)=>({
|
|
|
30722
30779
|
borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)
|
|
30723
30780
|
}))
|
|
30724
30781
|
});
|
|
30725
|
-
var useStyle$
|
|
30782
|
+
var useStyle$m = ((prefixCls, rootCls, injectStyle = true)=>{
|
|
30726
30783
|
const useStyle = genStyleHooks('Tooltip', (token)=>{
|
|
30727
30784
|
const { borderRadius, colorTextLightSolid, colorBgSpotlight, maxWidth } = token;
|
|
30728
30785
|
const TooltipToken = cssinjsUtils.mergeToken(token, {
|
|
@@ -30736,7 +30793,7 @@ var useStyle$l = ((prefixCls, rootCls, injectStyle = true)=>{
|
|
|
30736
30793
|
genTooltipStyle(TooltipToken),
|
|
30737
30794
|
initZoomMotion(token, 'zoom-big-fast')
|
|
30738
30795
|
];
|
|
30739
|
-
}, prepareComponentToken$
|
|
30796
|
+
}, prepareComponentToken$h, {
|
|
30740
30797
|
resetStyle: false,
|
|
30741
30798
|
// Popover use Tooltip as internal component. We do not need to handle this.
|
|
30742
30799
|
injectStyle
|
|
@@ -30789,13 +30846,13 @@ const parseColor = (rootPrefixCls, prefixCls, color)=>{
|
|
|
30789
30846
|
};
|
|
30790
30847
|
};
|
|
30791
30848
|
|
|
30792
|
-
/** @private Internal Component. Do not use in your production. */ const PurePanel$
|
|
30849
|
+
/** @private Internal Component. Do not use in your production. */ const PurePanel$3 = (props)=>{
|
|
30793
30850
|
const { prefixCls: customizePrefixCls, className, placement = 'top', title, color, overlayInnerStyle, classNames, styles } = props;
|
|
30794
30851
|
const { getPrefixCls } = React__namespace.useContext(ConfigContext);
|
|
30795
30852
|
const prefixCls = getPrefixCls('tooltip', customizePrefixCls);
|
|
30796
30853
|
const rootPrefixCls = getPrefixCls();
|
|
30797
30854
|
const rootCls = useCSSVarCls(prefixCls);
|
|
30798
|
-
const [hashId, cssVarCls] = useStyle$
|
|
30855
|
+
const [hashId, cssVarCls] = useStyle$m(prefixCls, rootCls);
|
|
30799
30856
|
// Color
|
|
30800
30857
|
const colorInfo = parseColor(rootPrefixCls, prefixCls, color);
|
|
30801
30858
|
const arrowContentStyle = colorInfo.arrowStyle;
|
|
@@ -30846,6 +30903,9 @@ const InternalTooltip = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>
|
|
|
30846
30903
|
const mergedArrow = useMergedArrow(tooltipArrow, contextArrow);
|
|
30847
30904
|
const mergedShowArrow = mergedArrow.show;
|
|
30848
30905
|
const mergedTrigger = trigger || contextTrigger || 'hover';
|
|
30906
|
+
const mergedGetPopupContainer = getPopupContainer || getContextPopupContainer;
|
|
30907
|
+
const mergedDestroyOnHidden = destroyOnHidden ?? !!destroyTooltipOnHide;
|
|
30908
|
+
const inTableMeasureRow = React__namespace.useContext(TableMeasureRowContext);
|
|
30849
30909
|
// ============================== Ref ===============================
|
|
30850
30910
|
const warning = devUseWarning('Tooltip');
|
|
30851
30911
|
const tooltipRef = React__namespace.useRef(null);
|
|
@@ -30923,16 +30983,9 @@ const InternalTooltip = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>
|
|
|
30923
30983
|
const mergedProps = {
|
|
30924
30984
|
...props,
|
|
30925
30985
|
trigger: mergedTrigger,
|
|
30926
|
-
|
|
30927
|
-
|
|
30928
|
-
|
|
30929
|
-
openClassName,
|
|
30930
|
-
arrow: tooltipArrow,
|
|
30931
|
-
autoAdjustOverflow,
|
|
30932
|
-
getPopupContainer,
|
|
30933
|
-
children,
|
|
30934
|
-
destroyTooltipOnHide,
|
|
30935
|
-
destroyOnHidden
|
|
30986
|
+
builtinPlacements: tooltipPlacements,
|
|
30987
|
+
getPopupContainer: mergedGetPopupContainer,
|
|
30988
|
+
destroyOnHidden: mergedDestroyOnHidden
|
|
30936
30989
|
};
|
|
30937
30990
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
30938
30991
|
contextClassNames,
|
|
@@ -30947,8 +31000,8 @@ const InternalTooltip = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>
|
|
|
30947
31000
|
const rootPrefixCls = getPrefixCls();
|
|
30948
31001
|
const injectFromPopover = props['data-popover-inject'];
|
|
30949
31002
|
let tempOpen = open;
|
|
30950
|
-
// Hide tooltip when there is no title
|
|
30951
|
-
if (!('open' in props) && noTitle) {
|
|
31003
|
+
// Hide tooltip when there is no title or in table measure row
|
|
31004
|
+
if (!('open' in props) && noTitle || inTableMeasureRow) {
|
|
30952
31005
|
tempOpen = false;
|
|
30953
31006
|
}
|
|
30954
31007
|
// ============================= Render =============================
|
|
@@ -30957,7 +31010,7 @@ const InternalTooltip = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>
|
|
|
30957
31010
|
const childCls = !childProps.className || typeof childProps.className === 'string' ? clsx(childProps.className, openClassName || `${prefixCls}-open`) : childProps.className;
|
|
30958
31011
|
// Style
|
|
30959
31012
|
const rootCls = useCSSVarCls(prefixCls);
|
|
30960
|
-
const [hashId, cssVarCls] = useStyle$
|
|
31013
|
+
const [hashId, cssVarCls] = useStyle$m(prefixCls, rootCls, !injectFromPopover);
|
|
30961
31014
|
// Color
|
|
30962
31015
|
const colorInfo = parseColor(rootPrefixCls, prefixCls, color);
|
|
30963
31016
|
const arrowContentStyle = colorInfo.arrowStyle;
|
|
@@ -30975,7 +31028,6 @@ const InternalTooltip = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>
|
|
|
30975
31028
|
const content = /*#__PURE__*/ React__namespace.createElement(RcTooltip, {
|
|
30976
31029
|
unique: true,
|
|
30977
31030
|
...restProps,
|
|
30978
|
-
trigger: mergedTrigger,
|
|
30979
31031
|
zIndex: zIndex,
|
|
30980
31032
|
showArrow: mergedShowArrow,
|
|
30981
31033
|
placement: placement,
|
|
@@ -30999,9 +31051,7 @@ const InternalTooltip = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>
|
|
|
30999
31051
|
uniqueContainer: containerStyle,
|
|
31000
31052
|
arrow: mergedStyles.arrow
|
|
31001
31053
|
},
|
|
31002
|
-
getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer,
|
|
31003
31054
|
ref: tooltipRef,
|
|
31004
|
-
builtinPlacements: tooltipPlacements,
|
|
31005
31055
|
overlay: memoOverlayWrapper,
|
|
31006
31056
|
visible: tempOpen,
|
|
31007
31057
|
onVisibleChange: onInternalOpenChange,
|
|
@@ -31013,7 +31063,10 @@ const InternalTooltip = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>
|
|
|
31013
31063
|
motionName: getTransitionName(rootPrefixCls, 'zoom-big-fast', typeof motion?.motionName === 'string' ? motion?.motionName : undefined),
|
|
31014
31064
|
motionDeadline: 1000
|
|
31015
31065
|
},
|
|
31016
|
-
|
|
31066
|
+
trigger: mergedTrigger,
|
|
31067
|
+
builtinPlacements: tooltipPlacements,
|
|
31068
|
+
getTooltipContainer: mergedGetPopupContainer,
|
|
31069
|
+
destroyOnHidden: mergedDestroyOnHidden
|
|
31017
31070
|
}, tempOpen ? cloneElement(child, {
|
|
31018
31071
|
className: childCls
|
|
31019
31072
|
}) : child);
|
|
@@ -31021,14 +31074,299 @@ const InternalTooltip = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>
|
|
|
31021
31074
|
value: contextZIndex
|
|
31022
31075
|
}, content);
|
|
31023
31076
|
});
|
|
31024
|
-
const Tooltip
|
|
31077
|
+
const Tooltip = InternalTooltip;
|
|
31025
31078
|
if (process.env.NODE_ENV !== 'production') {
|
|
31026
|
-
Tooltip
|
|
31079
|
+
Tooltip.displayName = 'Tooltip';
|
|
31027
31080
|
}
|
|
31028
|
-
Tooltip
|
|
31029
|
-
Tooltip
|
|
31081
|
+
Tooltip._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$3;
|
|
31082
|
+
Tooltip.UniqueProvider = UniqueProvider;
|
|
31083
|
+
|
|
31084
|
+
const FALL_BACK_ORIGIN = '50%';
|
|
31085
|
+
const genBaseStyle$3 = (token)=>{
|
|
31086
|
+
const { componentCls, popoverColor, titleMinWidth, fontWeightStrong, innerPadding, boxShadowSecondary, colorTextHeading, borderRadiusLG, zIndexPopup, titleMarginBottom, colorBgElevated, popoverBg, titleBorderBottom, innerContentPadding, titlePadding, antCls } = token;
|
|
31087
|
+
const [varName, varRef] = genCssVar(antCls, 'tooltip');
|
|
31088
|
+
return [
|
|
31089
|
+
{
|
|
31090
|
+
[componentCls]: {
|
|
31091
|
+
...resetComponent(token),
|
|
31092
|
+
position: 'absolute',
|
|
31093
|
+
top: 0,
|
|
31094
|
+
// use `left` to fix https://github.com/ant-design/ant-design/issues/39195
|
|
31095
|
+
left: {
|
|
31096
|
+
_skip_check_: true,
|
|
31097
|
+
value: 0
|
|
31098
|
+
},
|
|
31099
|
+
zIndex: zIndexPopup,
|
|
31100
|
+
fontWeight: 'normal',
|
|
31101
|
+
whiteSpace: 'normal',
|
|
31102
|
+
textAlign: 'start',
|
|
31103
|
+
cursor: 'auto',
|
|
31104
|
+
userSelect: 'text',
|
|
31105
|
+
// When use `autoArrow`, origin will follow the arrow position
|
|
31106
|
+
[varName('valid-offset-x')]: varRef('arrow-offset-x', 'var(--arrow-x)'),
|
|
31107
|
+
transformOrigin: [
|
|
31108
|
+
varRef('valid-offset-x', FALL_BACK_ORIGIN),
|
|
31109
|
+
`var(--arrow-y, ${FALL_BACK_ORIGIN})`
|
|
31110
|
+
].join(' '),
|
|
31111
|
+
[varName('arrow-background-color')]: colorBgElevated,
|
|
31112
|
+
width: 'max-content',
|
|
31113
|
+
maxWidth: '100vw',
|
|
31114
|
+
'&-rtl': {
|
|
31115
|
+
direction: 'rtl'
|
|
31116
|
+
},
|
|
31117
|
+
'&-hidden': {
|
|
31118
|
+
display: 'none'
|
|
31119
|
+
},
|
|
31120
|
+
[`${componentCls}-content`]: {
|
|
31121
|
+
position: 'relative'
|
|
31122
|
+
},
|
|
31123
|
+
[`${componentCls}-container`]: {
|
|
31124
|
+
backgroundColor: popoverBg,
|
|
31125
|
+
backgroundClip: 'padding-box',
|
|
31126
|
+
borderRadius: borderRadiusLG,
|
|
31127
|
+
boxShadow: boxShadowSecondary,
|
|
31128
|
+
padding: innerPadding
|
|
31129
|
+
},
|
|
31130
|
+
[`${componentCls}-title`]: {
|
|
31131
|
+
minWidth: titleMinWidth,
|
|
31132
|
+
marginBottom: titleMarginBottom,
|
|
31133
|
+
color: colorTextHeading,
|
|
31134
|
+
fontWeight: fontWeightStrong,
|
|
31135
|
+
borderBottom: titleBorderBottom,
|
|
31136
|
+
padding: titlePadding
|
|
31137
|
+
},
|
|
31138
|
+
[`${componentCls}-content`]: {
|
|
31139
|
+
color: popoverColor,
|
|
31140
|
+
padding: innerContentPadding
|
|
31141
|
+
}
|
|
31142
|
+
}
|
|
31143
|
+
},
|
|
31144
|
+
// Arrow Style
|
|
31145
|
+
getArrowStyle(token, varRef('arrow-background-color')),
|
|
31146
|
+
// Pure Render
|
|
31147
|
+
{
|
|
31148
|
+
[`${componentCls}-pure`]: {
|
|
31149
|
+
position: 'relative',
|
|
31150
|
+
maxWidth: 'none',
|
|
31151
|
+
margin: token.sizePopupArrow,
|
|
31152
|
+
display: 'inline-block'
|
|
31153
|
+
}
|
|
31154
|
+
}
|
|
31155
|
+
];
|
|
31156
|
+
};
|
|
31157
|
+
const genColorStyle = (token)=>{
|
|
31158
|
+
const { componentCls, antCls } = token;
|
|
31159
|
+
const [varName] = genCssVar(antCls, 'tooltip');
|
|
31160
|
+
return {
|
|
31161
|
+
[componentCls]: PresetColors.map((colorKey)=>{
|
|
31162
|
+
const lightColor = token[`${colorKey}6`];
|
|
31163
|
+
return {
|
|
31164
|
+
[`&${componentCls}-${colorKey}`]: {
|
|
31165
|
+
[varName('arrow-background-color')]: lightColor,
|
|
31166
|
+
[`${componentCls}-inner`]: {
|
|
31167
|
+
backgroundColor: lightColor
|
|
31168
|
+
},
|
|
31169
|
+
[`${componentCls}-arrow`]: {
|
|
31170
|
+
background: 'transparent'
|
|
31171
|
+
}
|
|
31172
|
+
}
|
|
31173
|
+
};
|
|
31174
|
+
})
|
|
31175
|
+
};
|
|
31176
|
+
};
|
|
31177
|
+
const prepareComponentToken$g = (token)=>{
|
|
31178
|
+
const { lineWidth, controlHeight, fontHeight, padding, wireframe, zIndexPopupBase, borderRadiusLG, marginXS, lineType, colorSplit, paddingSM } = token;
|
|
31179
|
+
const titlePaddingBlockDist = controlHeight - fontHeight;
|
|
31180
|
+
const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2;
|
|
31181
|
+
const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth;
|
|
31182
|
+
const popoverPaddingHorizontal = padding;
|
|
31183
|
+
return {
|
|
31184
|
+
titleMinWidth: 177,
|
|
31185
|
+
zIndexPopup: zIndexPopupBase + 30,
|
|
31186
|
+
...getArrowToken(token),
|
|
31187
|
+
...getArrowOffsetToken({
|
|
31188
|
+
contentRadius: borderRadiusLG,
|
|
31189
|
+
limitVerticalRadius: true
|
|
31190
|
+
}),
|
|
31191
|
+
// internal
|
|
31192
|
+
innerPadding: wireframe ? 0 : 12,
|
|
31193
|
+
titleMarginBottom: wireframe ? 0 : marginXS,
|
|
31194
|
+
titlePadding: wireframe ? `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px` : 0,
|
|
31195
|
+
titleBorderBottom: wireframe ? `${lineWidth}px ${lineType} ${colorSplit}` : 'none',
|
|
31196
|
+
innerContentPadding: wireframe ? `${paddingSM}px ${popoverPaddingHorizontal}px` : 0
|
|
31197
|
+
};
|
|
31198
|
+
};
|
|
31199
|
+
var useStyle$l = genStyleHooks('Popover', (token)=>{
|
|
31200
|
+
const { colorBgElevated, colorText } = token;
|
|
31201
|
+
const popoverToken = cssinjsUtils.mergeToken(token, {
|
|
31202
|
+
popoverBg: colorBgElevated,
|
|
31203
|
+
popoverColor: colorText
|
|
31204
|
+
});
|
|
31205
|
+
return [
|
|
31206
|
+
genBaseStyle$3(popoverToken),
|
|
31207
|
+
genColorStyle(popoverToken),
|
|
31208
|
+
initZoomMotion(popoverToken, 'zoom-big')
|
|
31209
|
+
];
|
|
31210
|
+
}, prepareComponentToken$g, {
|
|
31211
|
+
resetStyle: false,
|
|
31212
|
+
deprecatedTokens: [
|
|
31213
|
+
[
|
|
31214
|
+
'width',
|
|
31215
|
+
'titleMinWidth'
|
|
31216
|
+
],
|
|
31217
|
+
[
|
|
31218
|
+
'minWidth',
|
|
31219
|
+
'titleMinWidth'
|
|
31220
|
+
]
|
|
31221
|
+
]
|
|
31222
|
+
});
|
|
31030
31223
|
|
|
31031
|
-
const
|
|
31224
|
+
const Overlay$2 = (props)=>{
|
|
31225
|
+
const { title, content, prefixCls, classNames, styles } = props;
|
|
31226
|
+
if (!title && !content) {
|
|
31227
|
+
return null;
|
|
31228
|
+
}
|
|
31229
|
+
return /*#__PURE__*/ React__namespace.createElement(React__namespace.Fragment, null, title && /*#__PURE__*/ React__namespace.createElement("div", {
|
|
31230
|
+
className: clsx(`${prefixCls}-title`, classNames?.title),
|
|
31231
|
+
style: styles?.title
|
|
31232
|
+
}, title), content && /*#__PURE__*/ React__namespace.createElement("div", {
|
|
31233
|
+
className: clsx(`${prefixCls}-content`, classNames?.content),
|
|
31234
|
+
style: styles?.content
|
|
31235
|
+
}, content));
|
|
31236
|
+
};
|
|
31237
|
+
const RawPurePanel = (props)=>{
|
|
31238
|
+
const { hashId, prefixCls, className, style, placement = 'top', title, content, children, classNames, styles } = props;
|
|
31239
|
+
const titleNode = getRenderPropValue(title);
|
|
31240
|
+
const contentNode = getRenderPropValue(content);
|
|
31241
|
+
const mergedProps = {
|
|
31242
|
+
...props,
|
|
31243
|
+
placement
|
|
31244
|
+
};
|
|
31245
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
31246
|
+
classNames
|
|
31247
|
+
], [
|
|
31248
|
+
styles
|
|
31249
|
+
], {
|
|
31250
|
+
props: mergedProps
|
|
31251
|
+
});
|
|
31252
|
+
const rootClassName = clsx(hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className);
|
|
31253
|
+
return /*#__PURE__*/ React__namespace.createElement("div", {
|
|
31254
|
+
className: rootClassName,
|
|
31255
|
+
style: style
|
|
31256
|
+
}, /*#__PURE__*/ React__namespace.createElement("div", {
|
|
31257
|
+
className: `${prefixCls}-arrow`
|
|
31258
|
+
}), /*#__PURE__*/ React__namespace.createElement(RcTooltip.Popup, {
|
|
31259
|
+
...props,
|
|
31260
|
+
className: hashId,
|
|
31261
|
+
prefixCls: prefixCls,
|
|
31262
|
+
classNames: mergedClassNames,
|
|
31263
|
+
styles: mergedStyles
|
|
31264
|
+
}, children || /*#__PURE__*/ React__namespace.createElement(Overlay$2, {
|
|
31265
|
+
prefixCls: prefixCls,
|
|
31266
|
+
title: titleNode,
|
|
31267
|
+
content: contentNode,
|
|
31268
|
+
classNames: mergedClassNames,
|
|
31269
|
+
styles: mergedStyles
|
|
31270
|
+
})));
|
|
31271
|
+
};
|
|
31272
|
+
const PurePanel$2 = (props)=>{
|
|
31273
|
+
const { prefixCls: customizePrefixCls, className, ...restProps } = props;
|
|
31274
|
+
const { getPrefixCls } = React__namespace.useContext(ConfigContext);
|
|
31275
|
+
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
31276
|
+
const [hashId, cssVarCls] = useStyle$l(prefixCls);
|
|
31277
|
+
return /*#__PURE__*/ React__namespace.createElement(RawPurePanel, {
|
|
31278
|
+
...restProps,
|
|
31279
|
+
prefixCls: prefixCls,
|
|
31280
|
+
hashId: hashId,
|
|
31281
|
+
className: clsx(className, cssVarCls)
|
|
31282
|
+
});
|
|
31283
|
+
};
|
|
31284
|
+
|
|
31285
|
+
const InternalPopover = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
31286
|
+
const { prefixCls: customizePrefixCls, title, content, overlayClassName, placement = 'top', trigger, children, mouseEnterDelay = 0.1, mouseLeaveDelay = 0.1, onOpenChange, overlayStyle = {}, styles, classNames, motion, arrow: popoverArrow, ...restProps } = props;
|
|
31287
|
+
const { getPrefixCls, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, arrow: contextArrow, trigger: contextTrigger } = useComponentConfig('popover');
|
|
31288
|
+
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
31289
|
+
const [hashId, cssVarCls] = useStyle$l(prefixCls);
|
|
31290
|
+
const rootPrefixCls = getPrefixCls();
|
|
31291
|
+
const mergedArrow = useMergedArrow(popoverArrow, contextArrow);
|
|
31292
|
+
const mergedTrigger = trigger || contextTrigger || 'hover';
|
|
31293
|
+
// ========================== Warning ===========================
|
|
31294
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
31295
|
+
const warning = devUseWarning('Popover');
|
|
31296
|
+
process.env.NODE_ENV !== "production" ? warning(!onOpenChange || onOpenChange.length <= 1, 'usage', 'The second `onOpenChange` parameter is internal and unsupported. Please lock to a previous version if needed.') : void 0;
|
|
31297
|
+
}
|
|
31298
|
+
// ============================= Styles =============================
|
|
31299
|
+
const mergedProps = {
|
|
31300
|
+
...props,
|
|
31301
|
+
placement,
|
|
31302
|
+
trigger: mergedTrigger,
|
|
31303
|
+
mouseEnterDelay,
|
|
31304
|
+
mouseLeaveDelay,
|
|
31305
|
+
overlayStyle,
|
|
31306
|
+
styles,
|
|
31307
|
+
classNames
|
|
31308
|
+
};
|
|
31309
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
31310
|
+
contextClassNames,
|
|
31311
|
+
classNames
|
|
31312
|
+
], [
|
|
31313
|
+
contextStyles,
|
|
31314
|
+
styles
|
|
31315
|
+
], {
|
|
31316
|
+
props: mergedProps
|
|
31317
|
+
});
|
|
31318
|
+
const rootClassNames = clsx(overlayClassName, hashId, cssVarCls, contextClassName, mergedClassNames.root);
|
|
31319
|
+
const [open, setOpen] = util.useControlledState(props.defaultOpen ?? false, props.open);
|
|
31320
|
+
const settingOpen = (value)=>{
|
|
31321
|
+
setOpen(value);
|
|
31322
|
+
onOpenChange?.(value);
|
|
31323
|
+
};
|
|
31324
|
+
const titleNode = getRenderPropValue(title);
|
|
31325
|
+
const contentNode = getRenderPropValue(content);
|
|
31326
|
+
return /*#__PURE__*/ React__namespace.createElement(Tooltip, {
|
|
31327
|
+
unique: false,
|
|
31328
|
+
arrow: mergedArrow,
|
|
31329
|
+
placement: placement,
|
|
31330
|
+
trigger: mergedTrigger,
|
|
31331
|
+
mouseEnterDelay: mouseEnterDelay,
|
|
31332
|
+
mouseLeaveDelay: mouseLeaveDelay,
|
|
31333
|
+
...restProps,
|
|
31334
|
+
prefixCls: prefixCls,
|
|
31335
|
+
classNames: {
|
|
31336
|
+
root: rootClassNames,
|
|
31337
|
+
container: mergedClassNames.container,
|
|
31338
|
+
arrow: mergedClassNames.arrow
|
|
31339
|
+
},
|
|
31340
|
+
styles: {
|
|
31341
|
+
root: {
|
|
31342
|
+
...mergedStyles.root,
|
|
31343
|
+
...contextStyle,
|
|
31344
|
+
...overlayStyle
|
|
31345
|
+
},
|
|
31346
|
+
container: mergedStyles.container,
|
|
31347
|
+
arrow: mergedStyles.arrow
|
|
31348
|
+
},
|
|
31349
|
+
ref: ref,
|
|
31350
|
+
open: open,
|
|
31351
|
+
onOpenChange: settingOpen,
|
|
31352
|
+
overlay: titleNode || contentNode ? /*#__PURE__*/ React__namespace.createElement(Overlay$2, {
|
|
31353
|
+
prefixCls: prefixCls,
|
|
31354
|
+
title: titleNode,
|
|
31355
|
+
content: contentNode,
|
|
31356
|
+
classNames: mergedClassNames,
|
|
31357
|
+
styles: mergedStyles
|
|
31358
|
+
}) : null,
|
|
31359
|
+
motion: {
|
|
31360
|
+
motionName: getTransitionName(rootPrefixCls, 'zoom-big', typeof motion?.motionName === 'string' ? motion?.motionName : undefined)
|
|
31361
|
+
},
|
|
31362
|
+
"data-popover-inject": true
|
|
31363
|
+
}, children);
|
|
31364
|
+
});
|
|
31365
|
+
const Popover = InternalPopover;
|
|
31366
|
+
Popover._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$2;
|
|
31367
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
31368
|
+
Popover.displayName = 'Popover';
|
|
31369
|
+
}
|
|
31032
31370
|
|
|
31033
31371
|
const LayoutContext = /*#__PURE__*/ React__namespace.createContext({
|
|
31034
31372
|
siderHook: {
|
|
@@ -31471,7 +31809,7 @@ const MenuItem = (props)=>{
|
|
|
31471
31809
|
const resolvedClassNames = tooltipConfig.classNames(info);
|
|
31472
31810
|
return mergeTooltipRootClassName(resolvedClassNames);
|
|
31473
31811
|
} : mergeTooltipRootClassName(tooltipConfig?.classNames);
|
|
31474
|
-
returnNode = /*#__PURE__*/ React__namespace.createElement(Tooltip
|
|
31812
|
+
returnNode = /*#__PURE__*/ React__namespace.createElement(Tooltip, {
|
|
31475
31813
|
...tooltipProps,
|
|
31476
31814
|
placement: mergedTooltipPlacement,
|
|
31477
31815
|
classNames: mergedTooltipClassNames
|
|
@@ -31606,6 +31944,12 @@ const getThemeStyle = (token, themeSuffix)=>{
|
|
|
31606
31944
|
color: itemHoverColor
|
|
31607
31945
|
}
|
|
31608
31946
|
},
|
|
31947
|
+
// SubMenu active (when hover on parent menu item)
|
|
31948
|
+
[`${componentCls}-submenu:not(${componentCls}-submenu-selected)`]: {
|
|
31949
|
+
[`> ${componentCls}-submenu-title:hover`]: {
|
|
31950
|
+
color: itemHoverColor
|
|
31951
|
+
}
|
|
31952
|
+
},
|
|
31609
31953
|
[`&:not(${componentCls}-horizontal)`]: {
|
|
31610
31954
|
[`${componentCls}-item:not(${componentCls}-item-selected)`]: {
|
|
31611
31955
|
'&:hover': {
|
|
@@ -31884,6 +32228,9 @@ const getVerticalStyle = (token)=>{
|
|
|
31884
32228
|
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-item,
|
|
31885
32229
|
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-submenu > ${componentCls}-submenu-title,
|
|
31886
32230
|
> ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
|
|
32231
|
+
display: 'flex',
|
|
32232
|
+
alignItems: 'center',
|
|
32233
|
+
justifyContent: 'center',
|
|
31887
32234
|
insetInlineStart: 0,
|
|
31888
32235
|
paddingInline: `calc(50% - ${cssinjs.unit(token.calc(collapsedIconSize).div(2).equal())} - ${cssinjs.unit(itemMarginInline)})`,
|
|
31889
32236
|
textOverflow: 'clip',
|
|
@@ -31893,13 +32240,21 @@ const getVerticalStyle = (token)=>{
|
|
|
31893
32240
|
`]: {
|
|
31894
32241
|
opacity: 0
|
|
31895
32242
|
},
|
|
32243
|
+
[`> ${componentCls}-title-content`]: {
|
|
32244
|
+
width: 0,
|
|
32245
|
+
opacity: 0,
|
|
32246
|
+
overflow: 'hidden'
|
|
32247
|
+
},
|
|
31896
32248
|
[`${componentCls}-item-icon, ${iconCls}`]: {
|
|
31897
32249
|
margin: 0,
|
|
31898
32250
|
fontSize: collapsedIconSize,
|
|
31899
32251
|
lineHeight: cssinjs.unit(itemHeight),
|
|
31900
32252
|
'+ span': {
|
|
31901
32253
|
display: 'inline-block',
|
|
31902
|
-
|
|
32254
|
+
width: 0,
|
|
32255
|
+
opacity: 0,
|
|
32256
|
+
overflow: 'hidden',
|
|
32257
|
+
marginInlineStart: 0
|
|
31903
32258
|
}
|
|
31904
32259
|
}
|
|
31905
32260
|
},
|
|
@@ -32186,52 +32541,28 @@ const getBaseStyle = (token)=>{
|
|
|
32186
32541
|
}
|
|
32187
32542
|
}
|
|
32188
32543
|
},
|
|
32189
|
-
|
|
32190
|
-
&-placement-leftTop,
|
|
32191
|
-
&-placement-bottomRight,
|
|
32192
|
-
`]: {
|
|
32544
|
+
'&-placement-leftTop, &-placement-bottomRight': {
|
|
32193
32545
|
transformOrigin: '100% 0'
|
|
32194
32546
|
},
|
|
32195
|
-
|
|
32196
|
-
&-placement-leftBottom,
|
|
32197
|
-
&-placement-topRight,
|
|
32198
|
-
`]: {
|
|
32547
|
+
'&-placement-leftBottom, &-placement-topRight': {
|
|
32199
32548
|
transformOrigin: '100% 100%'
|
|
32200
32549
|
},
|
|
32201
|
-
|
|
32202
|
-
&-placement-rightBottom,
|
|
32203
|
-
&-placement-topLeft,
|
|
32204
|
-
`]: {
|
|
32550
|
+
'&-placement-rightBottom, &-placement-topLeft': {
|
|
32205
32551
|
transformOrigin: '0 100%'
|
|
32206
32552
|
},
|
|
32207
|
-
|
|
32208
|
-
&-placement-bottomLeft,
|
|
32209
|
-
&-placement-rightTop,
|
|
32210
|
-
`]: {
|
|
32553
|
+
'&-placement-bottomLeft, &-placement-rightTop': {
|
|
32211
32554
|
transformOrigin: '0 0'
|
|
32212
32555
|
},
|
|
32213
|
-
|
|
32214
|
-
&-placement-leftTop,
|
|
32215
|
-
&-placement-leftBottom
|
|
32216
|
-
`]: {
|
|
32556
|
+
'&-placement-leftTop, &-placement-leftBottom': {
|
|
32217
32557
|
paddingInlineEnd: token.paddingXS
|
|
32218
32558
|
},
|
|
32219
|
-
|
|
32220
|
-
&-placement-rightTop,
|
|
32221
|
-
&-placement-rightBottom
|
|
32222
|
-
`]: {
|
|
32559
|
+
'&-placement-rightTop, &-placement-rightBottom': {
|
|
32223
32560
|
paddingInlineStart: token.paddingXS
|
|
32224
32561
|
},
|
|
32225
|
-
|
|
32226
|
-
&-placement-topRight,
|
|
32227
|
-
&-placement-topLeft
|
|
32228
|
-
`]: {
|
|
32562
|
+
'&-placement-topRight, &-placement-topLeft': {
|
|
32229
32563
|
paddingBottom: token.paddingXS
|
|
32230
32564
|
},
|
|
32231
|
-
|
|
32232
|
-
&-placement-bottomRight,
|
|
32233
|
-
&-placement-bottomLeft
|
|
32234
|
-
`]: {
|
|
32565
|
+
'&-placement-bottomRight, &-placement-bottomLeft': {
|
|
32235
32566
|
paddingTop: token.paddingXS
|
|
32236
32567
|
}
|
|
32237
32568
|
},
|
|
@@ -32832,11 +33163,7 @@ const genBaseStyle$2 = (token)=>{
|
|
|
32832
33163
|
transform: `rotate(180deg)`
|
|
32833
33164
|
}
|
|
32834
33165
|
},
|
|
32835
|
-
|
|
32836
|
-
&-hidden,
|
|
32837
|
-
&-menu-hidden,
|
|
32838
|
-
&-menu-submenu-hidden
|
|
32839
|
-
`]: {
|
|
33166
|
+
'&-hidden, &-menu-hidden, &-menu-submenu-hidden': {
|
|
32840
33167
|
display: 'none'
|
|
32841
33168
|
},
|
|
32842
33169
|
// =============================================================
|
|
@@ -33476,6 +33803,7 @@ const getRadioBasicStyle = (token)=>{
|
|
|
33476
33803
|
border: `${cssinjs.unit(lineWidth)} ${lineType} ${colorBorder}`,
|
|
33477
33804
|
borderRadius: '50%',
|
|
33478
33805
|
transition: `all ${motionDurationMid}`,
|
|
33806
|
+
flex: 'none',
|
|
33479
33807
|
// Dot
|
|
33480
33808
|
'&:after': {
|
|
33481
33809
|
content: '""',
|
|
@@ -33504,7 +33832,7 @@ const getRadioBasicStyle = (token)=>{
|
|
|
33504
33832
|
[`&:has(${componentCls}-input:focus-visible)`]: genFocusOutline(token)
|
|
33505
33833
|
},
|
|
33506
33834
|
// ===================== Hover =====================
|
|
33507
|
-
[`&:hover ${componentCls}`]: {
|
|
33835
|
+
[`&:hover:not(${componentCls}-wrapper-disabled) ${componentCls}`]: {
|
|
33508
33836
|
borderColor: colorPrimary
|
|
33509
33837
|
},
|
|
33510
33838
|
[`&:hover ${componentCls}-checked:not(${componentCls}-disabled)`]: {
|
|
@@ -33874,7 +34202,7 @@ const RadioGroup = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
33874
34202
|
// 如果存在 options, 优先使用
|
|
33875
34203
|
if (options && options.length > 0) {
|
|
33876
34204
|
childrenToRender = options.map((option)=>{
|
|
33877
|
-
if (typeof option === 'string' ||
|
|
34205
|
+
if (typeof option === 'string' || isNumber(option)) {
|
|
33878
34206
|
// 此处类型自动推导为 string
|
|
33879
34207
|
return /*#__PURE__*/ React__namespace.createElement(Radio$1, {
|
|
33880
34208
|
key: option.toString(),
|
|
@@ -33902,7 +34230,8 @@ const RadioGroup = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
33902
34230
|
const mergedSize = useSize(customizeSize);
|
|
33903
34231
|
const [, mergedVertical] = useOrientation(orientation, vertical);
|
|
33904
34232
|
const classString = clsx(groupPrefixCls, `${groupPrefixCls}-${buttonStyle}`, {
|
|
33905
|
-
[`${groupPrefixCls}
|
|
34233
|
+
[`${groupPrefixCls}-large`]: mergedSize === 'large',
|
|
34234
|
+
[`${groupPrefixCls}-small`]: mergedSize === 'small',
|
|
33906
34235
|
[`${groupPrefixCls}-rtl`]: direction === 'rtl',
|
|
33907
34236
|
[`${groupPrefixCls}-block`]: block
|
|
33908
34237
|
}, className, rootClassName, hashId, cssVarCls, rootCls);
|
|
@@ -34004,7 +34333,7 @@ const genHoverStyle = (token)=>({
|
|
|
34004
34333
|
const genDisabledStyle = (token)=>({
|
|
34005
34334
|
color: token.colorTextDisabled,
|
|
34006
34335
|
backgroundColor: token.colorBgContainerDisabled,
|
|
34007
|
-
borderColor: token.
|
|
34336
|
+
borderColor: token.colorBorderDisabled,
|
|
34008
34337
|
boxShadow: 'none',
|
|
34009
34338
|
cursor: 'not-allowed',
|
|
34010
34339
|
opacity: 1,
|
|
@@ -34013,7 +34342,7 @@ const genDisabledStyle = (token)=>({
|
|
|
34013
34342
|
},
|
|
34014
34343
|
'&:hover:not([disabled])': {
|
|
34015
34344
|
...genHoverStyle(cssinjsUtils.mergeToken(token, {
|
|
34016
|
-
hoverBorderColor: token.
|
|
34345
|
+
hoverBorderColor: token.colorBorderDisabled,
|
|
34017
34346
|
hoverBg: token.colorBgContainerDisabled
|
|
34018
34347
|
}))
|
|
34019
34348
|
}
|
|
@@ -35526,17 +35855,17 @@ const genRtlStyle = (token)=>{
|
|
|
35526
35855
|
},
|
|
35527
35856
|
marginLeft: {
|
|
35528
35857
|
_skip_check_: true,
|
|
35529
|
-
value:
|
|
35858
|
+
value: token.marginSM
|
|
35530
35859
|
}
|
|
35531
35860
|
},
|
|
35532
35861
|
[`${componentCls}-tab-remove`]: {
|
|
35533
35862
|
marginRight: {
|
|
35534
35863
|
_skip_check_: true,
|
|
35535
|
-
value:
|
|
35864
|
+
value: token.marginXS
|
|
35536
35865
|
},
|
|
35537
35866
|
marginLeft: {
|
|
35538
35867
|
_skip_check_: true,
|
|
35539
|
-
value:
|
|
35868
|
+
value: calc(token.marginXXS).mul(-1).equal()
|
|
35540
35869
|
},
|
|
35541
35870
|
[iconCls]: {
|
|
35542
35871
|
margin: 0
|
|
@@ -35879,7 +36208,8 @@ const InternalTabs = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
35879
36208
|
...restProps,
|
|
35880
36209
|
items: mergedItems,
|
|
35881
36210
|
className: clsx({
|
|
35882
|
-
[`${prefixCls}
|
|
36211
|
+
[`${prefixCls}-large`]: size === 'large',
|
|
36212
|
+
[`${prefixCls}-small`]: size === 'small',
|
|
35883
36213
|
[`${prefixCls}-card`]: [
|
|
35884
36214
|
'card',
|
|
35885
36215
|
'editable-card'
|
|
@@ -36279,13 +36609,16 @@ const Card$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
36279
36609
|
const { prefixCls: customizePrefixCls, className, rootClassName, style, extra, headStyle = {}, bodyStyle = {}, title, loading, bordered, variant: customVariant, size: customizeSize, type, cover, actions, tabList, children, activeTabKey, defaultActiveTabKey, tabBarExtraContent, hoverable, tabProps = {}, classNames, styles, ...rest } = props;
|
|
36280
36610
|
const { getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('card');
|
|
36281
36611
|
const [variant] = useVariant('card', customVariant, bordered);
|
|
36612
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
36613
|
+
const warning = devUseWarning('Card');
|
|
36614
|
+
warning.deprecated(customizeSize !== 'default', 'size="default"', 'size="medium"');
|
|
36615
|
+
}
|
|
36282
36616
|
const mergedSize = useSize(customizeSize);
|
|
36283
36617
|
// =========== Merged Props for Semantic ==========
|
|
36284
36618
|
const mergedProps = {
|
|
36285
36619
|
...props,
|
|
36286
36620
|
size: mergedSize,
|
|
36287
|
-
variant: variant
|
|
36288
|
-
loading
|
|
36621
|
+
variant: variant
|
|
36289
36622
|
};
|
|
36290
36623
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
36291
36624
|
contextClassNames,
|
|
@@ -36342,7 +36675,7 @@ const Card$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
36342
36675
|
tabBarExtraContent
|
|
36343
36676
|
};
|
|
36344
36677
|
let head;
|
|
36345
|
-
const tabSize =
|
|
36678
|
+
const tabSize = mergedSize !== 'small' ? 'large' : mergedSize;
|
|
36346
36679
|
const tabs = tabList ? /*#__PURE__*/ React__namespace.createElement(Tabs, {
|
|
36347
36680
|
size: tabSize,
|
|
36348
36681
|
...extraProps,
|
|
@@ -36403,7 +36736,7 @@ const Card$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
36403
36736
|
[`${prefixCls}-hoverable`]: hoverable,
|
|
36404
36737
|
[`${prefixCls}-contain-grid`]: isContainGrid,
|
|
36405
36738
|
[`${prefixCls}-contain-tabs`]: tabList?.length,
|
|
36406
|
-
[`${prefixCls}
|
|
36739
|
+
[`${prefixCls}-small`]: mergedSize === 'small',
|
|
36407
36740
|
[`${prefixCls}-type-${type}`]: !!type,
|
|
36408
36741
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
36409
36742
|
}, className, rootClassName, hashId, cssVarCls, mergedClassNames.root);
|
|
@@ -36541,6 +36874,7 @@ const genCheckboxStyle = (token)=>{
|
|
|
36541
36874
|
borderRadius: token.borderRadiusSM,
|
|
36542
36875
|
borderCollapse: 'separate',
|
|
36543
36876
|
transition: `all ${token.motionDurationSlow}`,
|
|
36877
|
+
flex: 'none',
|
|
36544
36878
|
...genNoMotionStyle(),
|
|
36545
36879
|
// Checkmark
|
|
36546
36880
|
'&:after': {
|
|
@@ -36826,7 +37160,7 @@ const CheckboxGroup = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
36826
37160
|
restProps.value
|
|
36827
37161
|
]);
|
|
36828
37162
|
const memoizedOptions = React__namespace.useMemo(()=>options.map((option)=>{
|
|
36829
|
-
if (typeof option === 'string' ||
|
|
37163
|
+
if (typeof option === 'string' || isNumber(option)) {
|
|
36830
37164
|
return {
|
|
36831
37165
|
label: option,
|
|
36832
37166
|
value: option
|
|
@@ -36921,9 +37255,6 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
36921
37255
|
|
|
36922
37256
|
const RowContext = /*#__PURE__*/ React.createContext({});
|
|
36923
37257
|
|
|
36924
|
-
const isNumber = (value)=>{
|
|
36925
|
-
return typeof value === 'number' && !Number.isNaN(value);
|
|
36926
|
-
};
|
|
36927
37258
|
function parseFlex(flex) {
|
|
36928
37259
|
if (flex === 'auto') {
|
|
36929
37260
|
return '1 1 auto';
|
|
@@ -36950,7 +37281,7 @@ const Col = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
36950
37281
|
responsiveArrayReversed.forEach((size)=>{
|
|
36951
37282
|
let sizeProps = {};
|
|
36952
37283
|
const propSize = props[size];
|
|
36953
|
-
if (
|
|
37284
|
+
if (isNumber(propSize)) {
|
|
36954
37285
|
sizeProps.span = propSize;
|
|
36955
37286
|
} else if (typeof propSize === 'object') {
|
|
36956
37287
|
sizeProps = propSize || {};
|
|
@@ -36958,7 +37289,7 @@ const Col = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
36958
37289
|
delete others[size];
|
|
36959
37290
|
sizeClassObj = {
|
|
36960
37291
|
...sizeClassObj,
|
|
36961
|
-
[`${prefixCls}-${size}-${sizeProps.span}`]: sizeProps.span
|
|
37292
|
+
[`${prefixCls}-${size}-${sizeProps.span}`]: isNonNullable(sizeProps.span),
|
|
36962
37293
|
[`${prefixCls}-${size}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,
|
|
36963
37294
|
[`${prefixCls}-${size}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,
|
|
36964
37295
|
[`${prefixCls}-${size}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,
|
|
@@ -36982,7 +37313,7 @@ const Col = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
36982
37313
|
const mergedStyle = {};
|
|
36983
37314
|
// Horizontal gutter use padding
|
|
36984
37315
|
if (gutter?.[0]) {
|
|
36985
|
-
const horizontalGutter =
|
|
37316
|
+
const horizontalGutter = isNumber(gutter[0]) ? `${gutter[0] / 2}px` : `calc(${gutter[0]} / 2)`;
|
|
36986
37317
|
mergedStyle.paddingInline = horizontalGutter;
|
|
36987
37318
|
}
|
|
36988
37319
|
if (flex) {
|
|
@@ -37092,7 +37423,7 @@ const Row = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
37092
37423
|
// Add gutter related style
|
|
37093
37424
|
const rowStyle = {};
|
|
37094
37425
|
if (gutters?.[0]) {
|
|
37095
|
-
const horizontalGutter =
|
|
37426
|
+
const horizontalGutter = isNumber(gutters[0]) ? `${gutters[0] / -2}px` : `calc(${gutters[0]} / -2)`;
|
|
37096
37427
|
rowStyle.marginInline = horizontalGutter;
|
|
37097
37428
|
}
|
|
37098
37429
|
// "gutters" is a new array in each rendering phase, it'll make 'React.useMemo' effectless.
|
|
@@ -37312,10 +37643,6 @@ const titlePlacementList = [
|
|
|
37312
37643
|
'start',
|
|
37313
37644
|
'end'
|
|
37314
37645
|
];
|
|
37315
|
-
const sizeClassNameMap = {
|
|
37316
|
-
small: 'sm',
|
|
37317
|
-
middle: 'md'
|
|
37318
|
-
};
|
|
37319
37646
|
const Divider = (props)=>{
|
|
37320
37647
|
const { getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('divider');
|
|
37321
37648
|
const { prefixCls: customizePrefixCls, type, orientation, vertical, titlePlacement, orientationMargin, className, rootClassName, children, dashed, variant = 'solid', plain, style, size: customSize, classNames, styles, ...restProps } = props;
|
|
@@ -37323,7 +37650,6 @@ const Divider = (props)=>{
|
|
|
37323
37650
|
const railCls = `${prefixCls}-rail`;
|
|
37324
37651
|
const [hashId, cssVarCls] = useStyle$c(prefixCls);
|
|
37325
37652
|
const sizeFullName = useSize(customSize);
|
|
37326
|
-
const sizeCls = sizeClassNameMap[sizeFullName];
|
|
37327
37653
|
const hasChildren = !!children;
|
|
37328
37654
|
const validTitlePlacement = titlePlacementList.includes(orientation || '');
|
|
37329
37655
|
const mergedTitlePlacement = React__namespace.useMemo(()=>{
|
|
@@ -37369,12 +37695,13 @@ const Divider = (props)=>{
|
|
|
37369
37695
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
37370
37696
|
[`${prefixCls}-no-default-orientation-margin-start`]: hasMarginStart,
|
|
37371
37697
|
[`${prefixCls}-no-default-orientation-margin-end`]: hasMarginEnd,
|
|
37372
|
-
[`${prefixCls}
|
|
37698
|
+
[`${prefixCls}-md`]: sizeFullName === 'medium' || sizeFullName === 'middle',
|
|
37699
|
+
[`${prefixCls}-sm`]: sizeFullName === 'small',
|
|
37373
37700
|
[railCls]: !children,
|
|
37374
37701
|
[mergedClassNames.rail]: mergedClassNames.rail && !children
|
|
37375
37702
|
}, className, rootClassName, mergedClassNames.root);
|
|
37376
37703
|
const memoizedPlacementMargin = React__namespace.useMemo(()=>{
|
|
37377
|
-
if (
|
|
37704
|
+
if (isNumber(orientationMargin)) {
|
|
37378
37705
|
return orientationMargin;
|
|
37379
37706
|
}
|
|
37380
37707
|
if (/^\d+$/.test(orientationMargin)) {
|
|
@@ -37446,6 +37773,7 @@ const genSpaceAddonStyle = (token)=>{
|
|
|
37446
37773
|
display: 'inline-flex',
|
|
37447
37774
|
alignItems: 'center',
|
|
37448
37775
|
gap: 0,
|
|
37776
|
+
whiteSpace: 'nowrap',
|
|
37449
37777
|
paddingInline: paddingSM,
|
|
37450
37778
|
margin: 0,
|
|
37451
37779
|
borderWidth: lineWidth,
|
|
@@ -37661,15 +37989,15 @@ const Input = /*#__PURE__*/ React.forwardRef((props, ref$1)=>{
|
|
|
37661
37989
|
const mergedStatus = getMergedStatus(contextStatus, customStatus);
|
|
37662
37990
|
// ===================== Focus warning =====================
|
|
37663
37991
|
const inputHasPrefixSuffix = hasPrefixSuffix(props) || !!hasFeedback;
|
|
37664
|
-
const
|
|
37992
|
+
const prevHasPrefixSuffixRef = React.useRef(inputHasPrefixSuffix);
|
|
37665
37993
|
/* eslint-disable react-hooks/rules-of-hooks */ if (process.env.NODE_ENV !== 'production') {
|
|
37666
37994
|
const warning = devUseWarning('Input');
|
|
37667
37995
|
// biome-ignore lint/correctness/useHookAtTopLevel: Development-only warning hook called conditionally
|
|
37668
37996
|
React.useEffect(()=>{
|
|
37669
|
-
if (inputHasPrefixSuffix && !
|
|
37997
|
+
if (inputHasPrefixSuffix && !prevHasPrefixSuffixRef.current) {
|
|
37670
37998
|
process.env.NODE_ENV !== "production" ? warning(document.activeElement === inputRef.current?.input, 'usage', `When Input is focused, dynamic add or remove prefix / suffix will make it lose focus caused by dom structure change. Read more: https://ant.design/components/input/#FAQ`) : void 0;
|
|
37671
37999
|
}
|
|
37672
|
-
|
|
38000
|
+
prevHasPrefixSuffixRef.current = inputHasPrefixSuffix;
|
|
37673
38001
|
}, [
|
|
37674
38002
|
inputHasPrefixSuffix
|
|
37675
38003
|
]);
|
|
@@ -38192,7 +38520,7 @@ const Drawer$2 = (props)=>{
|
|
|
38192
38520
|
customizeGetContainer === undefined && getPopupContainer ? ()=>getPopupContainer(document.body) : customizeGetContainer;
|
|
38193
38521
|
// ============================ Size ============================
|
|
38194
38522
|
const drawerSize = React__namespace.useMemo(()=>{
|
|
38195
|
-
if (
|
|
38523
|
+
if (isNumber(size)) {
|
|
38196
38524
|
return size;
|
|
38197
38525
|
}
|
|
38198
38526
|
if (size === 'large') {
|
|
@@ -38400,6 +38728,7 @@ function isPresetSize(size) {
|
|
|
38400
38728
|
return [
|
|
38401
38729
|
'small',
|
|
38402
38730
|
'middle',
|
|
38731
|
+
'medium',
|
|
38403
38732
|
'large'
|
|
38404
38733
|
].includes(size);
|
|
38405
38734
|
}
|
|
@@ -38408,7 +38737,7 @@ function isValidGapNumber(size) {
|
|
|
38408
38737
|
// The case of size = 0 is deliberately excluded here, because the default value of the gap attribute in CSS is 0, so if the user passes 0 in, we can directly ignore it.
|
|
38409
38738
|
return false;
|
|
38410
38739
|
}
|
|
38411
|
-
return
|
|
38740
|
+
return isNumber(size);
|
|
38412
38741
|
}
|
|
38413
38742
|
|
|
38414
38743
|
const SpaceContext = /*#__PURE__*/ React.createContext({
|
|
@@ -38474,7 +38803,7 @@ const genSpaceGapStyle = (token)=>{
|
|
|
38474
38803
|
'&-gap-row-small': {
|
|
38475
38804
|
rowGap: token.spaceGapSmallSize
|
|
38476
38805
|
},
|
|
38477
|
-
'&-gap-row-middle': {
|
|
38806
|
+
'&-gap-row-medium, &-gap-row-middle': {
|
|
38478
38807
|
rowGap: token.spaceGapMiddleSize
|
|
38479
38808
|
},
|
|
38480
38809
|
'&-gap-row-large': {
|
|
@@ -38483,7 +38812,7 @@ const genSpaceGapStyle = (token)=>{
|
|
|
38483
38812
|
'&-gap-col-small': {
|
|
38484
38813
|
columnGap: token.spaceGapSmallSize
|
|
38485
38814
|
},
|
|
38486
|
-
'&-gap-col-middle': {
|
|
38815
|
+
'&-gap-col-medium, &-gap-col-middle': {
|
|
38487
38816
|
columnGap: token.spaceGapMiddleSize
|
|
38488
38817
|
},
|
|
38489
38818
|
'&-gap-col-large': {
|
|
@@ -39622,8 +39951,7 @@ const Pagination = (props)=>{
|
|
|
39622
39951
|
type: "button",
|
|
39623
39952
|
tabIndex: -1
|
|
39624
39953
|
}, direction === 'rtl' ? /*#__PURE__*/ React__namespace.createElement(LeftOutlined, null) : /*#__PURE__*/ React__namespace.createElement(RightOutlined, null));
|
|
39625
|
-
const jumpPrevIcon = /*#__PURE__*/
|
|
39626
|
-
React__namespace.createElement("a", {
|
|
39954
|
+
const jumpPrevIcon = /*#__PURE__*/ React__namespace.createElement("a", {
|
|
39627
39955
|
className: `${prefixCls}-item-link`
|
|
39628
39956
|
}, /*#__PURE__*/ React__namespace.createElement("div", {
|
|
39629
39957
|
className: `${prefixCls}-item-container`
|
|
@@ -39632,8 +39960,7 @@ const Pagination = (props)=>{
|
|
|
39632
39960
|
}) : /*#__PURE__*/ React__namespace.createElement(DoubleLeftOutlined, {
|
|
39633
39961
|
className: `${prefixCls}-item-link-icon`
|
|
39634
39962
|
}), ellipsis));
|
|
39635
|
-
const jumpNextIcon = /*#__PURE__*/
|
|
39636
|
-
React__namespace.createElement("a", {
|
|
39963
|
+
const jumpNextIcon = /*#__PURE__*/ React__namespace.createElement("a", {
|
|
39637
39964
|
className: `${prefixCls}-item-link`
|
|
39638
39965
|
}, /*#__PURE__*/ React__namespace.createElement("div", {
|
|
39639
39966
|
className: `${prefixCls}-item-container`
|
|
@@ -39858,7 +40185,9 @@ const Progress = ({ percent, prefixCls })=>{
|
|
|
39858
40185
|
strokeDasharray: `${circumference * safePtg / 100} ${circumference * (100 - safePtg) / 100}`
|
|
39859
40186
|
};
|
|
39860
40187
|
return /*#__PURE__*/ React__namespace.createElement("span", {
|
|
39861
|
-
className: clsx(holderClassName, `${dotClassName}-progress`,
|
|
40188
|
+
className: clsx(holderClassName, `${dotClassName}-progress`, {
|
|
40189
|
+
[hideClassName]: safePtg <= 0
|
|
40190
|
+
})
|
|
39862
40191
|
}, /*#__PURE__*/ React__namespace.createElement("svg", {
|
|
39863
40192
|
viewBox: `0 0 ${viewSize} ${viewSize}`,
|
|
39864
40193
|
role: "progressbar",
|
|
@@ -40218,7 +40547,7 @@ function shouldDelay(spinning, delay) {
|
|
|
40218
40547
|
return !!spinning && !!delay && !Number.isNaN(Number(delay));
|
|
40219
40548
|
}
|
|
40220
40549
|
const Spin = (props)=>{
|
|
40221
|
-
const { prefixCls: customizePrefixCls, spinning: customSpinning = true, delay = 0, className, rootClassName, size
|
|
40550
|
+
const { prefixCls: customizePrefixCls, spinning: customSpinning = true, delay = 0, className, rootClassName, size, tip, description, wrapperClassName, style, children, fullscreen = false, indicator, percent, classNames, styles, ...restProps } = props;
|
|
40222
40551
|
const { getPrefixCls, direction, indicator: contextIndicator, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('spin');
|
|
40223
40552
|
const prefixCls = getPrefixCls('spin', customizePrefixCls);
|
|
40224
40553
|
const [hashId, cssVarCls] = useStyle$6(prefixCls);
|
|
@@ -40239,12 +40568,18 @@ const Spin = (props)=>{
|
|
|
40239
40568
|
delay,
|
|
40240
40569
|
customSpinning
|
|
40241
40570
|
]);
|
|
40571
|
+
// ======================= Size ======================
|
|
40572
|
+
const mergedSize = useSize((ctx)=>size ?? ctx);
|
|
40573
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
40574
|
+
const warning = devUseWarning('Spin');
|
|
40575
|
+
warning.deprecated(size !== 'default', 'size="default"', 'size="medium"');
|
|
40576
|
+
}
|
|
40242
40577
|
// ======================= Description ======================
|
|
40243
40578
|
const mergedDescription = description ?? tip;
|
|
40244
40579
|
// =============== Merged Props for Semantic ================
|
|
40245
40580
|
const mergedProps = {
|
|
40246
40581
|
...props,
|
|
40247
|
-
size,
|
|
40582
|
+
size: mergedSize,
|
|
40248
40583
|
spinning,
|
|
40249
40584
|
tip: mergedDescription,
|
|
40250
40585
|
description: mergedDescription,
|
|
@@ -40290,8 +40625,8 @@ const Spin = (props)=>{
|
|
|
40290
40625
|
}, mergedDescription));
|
|
40291
40626
|
return /*#__PURE__*/ React__namespace.createElement("div", {
|
|
40292
40627
|
className: clsx(prefixCls, {
|
|
40293
|
-
[`${prefixCls}-sm`]:
|
|
40294
|
-
[`${prefixCls}-lg`]:
|
|
40628
|
+
[`${prefixCls}-sm`]: mergedSize === 'small',
|
|
40629
|
+
[`${prefixCls}-lg`]: mergedSize === 'large',
|
|
40295
40630
|
[`${prefixCls}-spinning`]: spinning,
|
|
40296
40631
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
40297
40632
|
[`${prefixCls}-fullscreen`]: fullscreen
|
|
@@ -40324,12 +40659,12 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
40324
40659
|
Spin.displayName = 'Spin';
|
|
40325
40660
|
}
|
|
40326
40661
|
|
|
40327
|
-
const toList
|
|
40328
|
-
if (
|
|
40662
|
+
const toList = (val, config = {})=>{
|
|
40663
|
+
if (!isNonNullable(val) && config?.skipEmpty) {
|
|
40329
40664
|
return [];
|
|
40330
40665
|
}
|
|
40331
|
-
return Array.isArray(
|
|
40332
|
-
|
|
40666
|
+
return Array.isArray(val) ? val : [
|
|
40667
|
+
val
|
|
40333
40668
|
];
|
|
40334
40669
|
};
|
|
40335
40670
|
|
|
@@ -40551,7 +40886,7 @@ const baseStaticMethods = {
|
|
|
40551
40886
|
destroy,
|
|
40552
40887
|
config: setMessageGlobalConfig,
|
|
40553
40888
|
useMessage,
|
|
40554
|
-
_InternalPanelDoNotUseOrYouWillBeFired: PurePanel$
|
|
40889
|
+
_InternalPanelDoNotUseOrYouWillBeFired: PurePanel$5
|
|
40555
40890
|
};
|
|
40556
40891
|
const staticMethods = baseStaticMethods;
|
|
40557
40892
|
methods.forEach((type)=>{
|
|
@@ -40578,7 +40913,7 @@ const StatisticNumber = (props)=>{
|
|
|
40578
40913
|
let int = cells[2] || '0';
|
|
40579
40914
|
let decimal = cells[4] || '';
|
|
40580
40915
|
int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
|
|
40581
|
-
if (
|
|
40916
|
+
if (isNumber(precision)) {
|
|
40582
40917
|
decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);
|
|
40583
40918
|
}
|
|
40584
40919
|
if (decimal) {
|
|
@@ -40738,7 +41073,7 @@ const Statistic = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
40738
41073
|
}, prefix && /*#__PURE__*/ React__namespace.createElement("span", {
|
|
40739
41074
|
className: prefixClassNames,
|
|
40740
41075
|
style: mergedStyles.prefix
|
|
40741
|
-
}, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/ React__namespace.createElement("span", {
|
|
41076
|
+
}, prefix), typeof valueRender === 'function' ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/ React__namespace.createElement("span", {
|
|
40742
41077
|
className: suffixClassNames,
|
|
40743
41078
|
style: mergedStyles.suffix
|
|
40744
41079
|
}, suffix))));
|
|
@@ -41195,6 +41530,10 @@ const InternalSwitch = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
41195
41530
|
const prefixCls = getPrefixCls('switch', customizePrefixCls);
|
|
41196
41531
|
// Style
|
|
41197
41532
|
const [hashId, cssVarCls] = useStyle$4(prefixCls);
|
|
41533
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
41534
|
+
const warning = devUseWarning('Switch');
|
|
41535
|
+
warning.deprecated(customizeSize !== 'default', 'size="default"', 'size="medium"');
|
|
41536
|
+
}
|
|
41198
41537
|
const mergedSize = useSize(customizeSize);
|
|
41199
41538
|
const mergedProps = {
|
|
41200
41539
|
...props,
|
|
@@ -41280,6 +41619,7 @@ const useSelection = (config, rowSelection)=>{
|
|
|
41280
41619
|
const [multipleSelect, updatePrevSelectedIndex] = useMultipleSelect((item)=>item);
|
|
41281
41620
|
// ========================= Keys =========================
|
|
41282
41621
|
const [mergedSelectedKeys, setMergedSelectedKeys] = util.useControlledState(defaultSelectedRowKeys || EMPTY_LIST$1, selectedRowKeys);
|
|
41622
|
+
const mergedSelectedKeyList = mergedSelectedKeys ?? EMPTY_LIST$1;
|
|
41283
41623
|
// ======================== Caches ========================
|
|
41284
41624
|
const preserveRecordsRef = React__namespace.useRef(new Map());
|
|
41285
41625
|
const updatePreserveRecordsCache = React.useCallback((keys)=>{
|
|
@@ -41302,9 +41642,10 @@ const useSelection = (config, rowSelection)=>{
|
|
|
41302
41642
|
]);
|
|
41303
41643
|
// Update cache with selectedKeys
|
|
41304
41644
|
React__namespace.useEffect(()=>{
|
|
41305
|
-
updatePreserveRecordsCache(
|
|
41645
|
+
updatePreserveRecordsCache(mergedSelectedKeyList);
|
|
41306
41646
|
}, [
|
|
41307
|
-
|
|
41647
|
+
mergedSelectedKeyList,
|
|
41648
|
+
updatePreserveRecordsCache
|
|
41308
41649
|
]);
|
|
41309
41650
|
// Get flatten data
|
|
41310
41651
|
const flattedData = React.useMemo(()=>flattenData(childrenColumnName, pageData), [
|
|
@@ -41368,17 +41709,17 @@ const useSelection = (config, rowSelection)=>{
|
|
|
41368
41709
|
const [derivedSelectedKeys, derivedHalfSelectedKeys] = React.useMemo(()=>{
|
|
41369
41710
|
if (checkStrictly) {
|
|
41370
41711
|
return [
|
|
41371
|
-
|
|
41712
|
+
mergedSelectedKeyList,
|
|
41372
41713
|
[]
|
|
41373
41714
|
];
|
|
41374
41715
|
}
|
|
41375
|
-
const { checkedKeys, halfCheckedKeys } = conductUtil.conductCheck(
|
|
41716
|
+
const { checkedKeys, halfCheckedKeys } = conductUtil.conductCheck(mergedSelectedKeyList, true, keyEntities, isCheckboxDisabled);
|
|
41376
41717
|
return [
|
|
41377
41718
|
checkedKeys || [],
|
|
41378
41719
|
halfCheckedKeys
|
|
41379
41720
|
];
|
|
41380
41721
|
}, [
|
|
41381
|
-
|
|
41722
|
+
mergedSelectedKeyList,
|
|
41382
41723
|
checkStrictly,
|
|
41383
41724
|
keyEntities,
|
|
41384
41725
|
isCheckboxDisabled
|
|
@@ -41967,7 +42308,7 @@ const getDropIndicatorStyle = (prefixCls, token)=>({
|
|
|
41967
42308
|
}
|
|
41968
42309
|
});
|
|
41969
42310
|
const genBaseStyle$1 = (prefixCls, token)=>{
|
|
41970
|
-
const { treeCls, treeNodeCls, treeNodePadding, titleHeight, indentSize, motionDurationMid, nodeSelectedBg, nodeHoverBg, colorTextQuaternary, controlItemBgActiveDisabled } = token;
|
|
42311
|
+
const { treeCls, treeNodeCls, treeNodePadding, titleHeight, indentSize, switcherSize, motionDurationMid, nodeSelectedBg, nodeHoverBg, colorTextQuaternary, controlItemBgActiveDisabled } = token;
|
|
41971
42312
|
return {
|
|
41972
42313
|
[treeCls]: {
|
|
41973
42314
|
...resetComponent(token),
|
|
@@ -42071,7 +42412,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42071
42412
|
[`${treeCls}-draggable-icon`]: {
|
|
42072
42413
|
// https://github.com/ant-design/ant-design/issues/41915
|
|
42073
42414
|
flexShrink: 0,
|
|
42074
|
-
width:
|
|
42415
|
+
width: switcherSize,
|
|
42075
42416
|
textAlign: 'center',
|
|
42076
42417
|
visibility: 'visible',
|
|
42077
42418
|
color: colorTextQuaternary
|
|
@@ -42097,12 +42438,18 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42097
42438
|
},
|
|
42098
42439
|
// Switcher / Checkbox
|
|
42099
42440
|
[`${treeCls}-switcher, ${treeCls}-checkbox`]: {
|
|
42100
|
-
marginInlineEnd: token.calc(token.calc(
|
|
42441
|
+
marginInlineEnd: token.calc(token.calc(switcherSize).sub(token.controlInteractiveSize)).div(2).equal()
|
|
42101
42442
|
},
|
|
42102
42443
|
// >>> Checkbox
|
|
42103
42444
|
// https://github.com/ant-design/ant-design/issues/56957
|
|
42104
42445
|
[`${treeCls}-checkbox`]: {
|
|
42105
|
-
flexShrink: 0
|
|
42446
|
+
flexShrink: 0,
|
|
42447
|
+
// When the title spans multiple lines, the checkbox aligns vertically centered with other elements
|
|
42448
|
+
// However, the switcher aligns to flex-start, causing a vertical alignment discrepancy in the parent node
|
|
42449
|
+
// Currently, the checkbox uses start alignment, but this causes it to stick to the top, resulting in a visually higher position
|
|
42450
|
+
// By setting the switcher's lineHeight to titleHeight, the required margin-block-start distance can be calculated to correct the alignment
|
|
42451
|
+
alignSelf: 'flex-start',
|
|
42452
|
+
marginBlockStart: token.calc(token.calc(titleHeight).sub(token.controlInteractiveSize)).div(2).equal()
|
|
42106
42453
|
},
|
|
42107
42454
|
// >>> Switcher
|
|
42108
42455
|
[`${treeCls}-switcher`]: {
|
|
@@ -42110,7 +42457,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42110
42457
|
position: 'relative',
|
|
42111
42458
|
flex: 'none',
|
|
42112
42459
|
alignSelf: 'stretch',
|
|
42113
|
-
width:
|
|
42460
|
+
width: switcherSize,
|
|
42114
42461
|
textAlign: 'center',
|
|
42115
42462
|
cursor: 'pointer',
|
|
42116
42463
|
userSelect: 'none',
|
|
@@ -42121,7 +42468,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42121
42468
|
'&:before': {
|
|
42122
42469
|
pointerEvents: 'none',
|
|
42123
42470
|
content: '""',
|
|
42124
|
-
width:
|
|
42471
|
+
width: switcherSize,
|
|
42125
42472
|
height: titleHeight,
|
|
42126
42473
|
position: 'absolute',
|
|
42127
42474
|
left: {
|
|
@@ -42151,7 +42498,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42151
42498
|
'&:before': {
|
|
42152
42499
|
position: 'absolute',
|
|
42153
42500
|
top: 0,
|
|
42154
|
-
insetInlineEnd: token.calc(
|
|
42501
|
+
insetInlineEnd: token.calc(switcherSize).div(2).equal(),
|
|
42155
42502
|
bottom: token.calc(treeNodePadding).mul(-1).equal(),
|
|
42156
42503
|
marginInlineStart: -1,
|
|
42157
42504
|
borderInlineEnd: `1px solid ${token.colorBorder}`,
|
|
@@ -42159,7 +42506,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42159
42506
|
},
|
|
42160
42507
|
'&:after': {
|
|
42161
42508
|
position: 'absolute',
|
|
42162
|
-
width: token.calc(token.calc(
|
|
42509
|
+
width: token.calc(token.calc(switcherSize).div(2).equal()).mul(0.8).equal(),
|
|
42163
42510
|
height: token.calc(titleHeight).div(2).equal(),
|
|
42164
42511
|
borderBottom: `1px solid ${token.colorBorder}`,
|
|
42165
42512
|
content: '""'
|
|
@@ -42193,7 +42540,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42193
42540
|
// Icon
|
|
42194
42541
|
[`${treeCls}-iconEle`]: {
|
|
42195
42542
|
display: 'inline-block',
|
|
42196
|
-
width:
|
|
42543
|
+
width: switcherSize,
|
|
42197
42544
|
height: titleHeight,
|
|
42198
42545
|
textAlign: 'center',
|
|
42199
42546
|
verticalAlign: 'top',
|
|
@@ -42218,7 +42565,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42218
42565
|
'&:before': {
|
|
42219
42566
|
position: 'absolute',
|
|
42220
42567
|
top: 0,
|
|
42221
|
-
insetInlineEnd: token.calc(
|
|
42568
|
+
insetInlineEnd: token.calc(switcherSize).div(2).equal(),
|
|
42222
42569
|
bottom: token.calc(treeNodePadding).mul(-1).equal(),
|
|
42223
42570
|
borderInlineEnd: `1px solid ${token.colorBorder}`,
|
|
42224
42571
|
content: '""'
|
|
@@ -42270,6 +42617,7 @@ const initComponentToken = (token)=>{
|
|
|
42270
42617
|
const titleHeight = controlHeightSM;
|
|
42271
42618
|
return {
|
|
42272
42619
|
titleHeight,
|
|
42620
|
+
switcherSize: titleHeight,
|
|
42273
42621
|
indentSize: titleHeight,
|
|
42274
42622
|
nodeHoverBg: controlItemBgHover,
|
|
42275
42623
|
nodeHoverColor: token.colorText,
|
|
@@ -42294,7 +42642,7 @@ var useStyle$3 = genStyleHooks('Tree', (token, { prefixCls })=>[
|
|
|
42294
42642
|
], prepareComponentToken$3);
|
|
42295
42643
|
|
|
42296
42644
|
const offset = 4;
|
|
42297
|
-
|
|
42645
|
+
const dropIndicatorRender = (props)=>{
|
|
42298
42646
|
const { dropPosition, dropLevelOffset, prefixCls, indent, direction = 'ltr' } = props;
|
|
42299
42647
|
const startPosition = direction === 'ltr' ? 'left' : 'right';
|
|
42300
42648
|
const endPosition = direction === 'ltr' ? 'right' : 'left';
|
|
@@ -42319,7 +42667,7 @@ function dropIndicatorRender(props) {
|
|
|
42319
42667
|
style: style,
|
|
42320
42668
|
className: `${prefixCls}-drop-indicator`
|
|
42321
42669
|
});
|
|
42322
|
-
}
|
|
42670
|
+
};
|
|
42323
42671
|
|
|
42324
42672
|
const SwitcherIconCom = (props)=>{
|
|
42325
42673
|
const { prefixCls, switcherIcon, treeNodeProps, showLine, switcherLoadingIcon } = props;
|
|
@@ -42360,7 +42708,7 @@ const SwitcherIconCom = (props)=>{
|
|
|
42360
42708
|
const switcher = typeof switcherIcon === 'function' ? switcherIcon(treeNodeProps) : switcherIcon;
|
|
42361
42709
|
if (/*#__PURE__*/ React__namespace.isValidElement(switcher)) {
|
|
42362
42710
|
return cloneElement(switcher, {
|
|
42363
|
-
className: clsx(switcher.props?.className, switcherCls)
|
|
42711
|
+
className: clsx(switcher.props?.className, showLine ? `${prefixCls}-switcher-line-icon` : switcherCls)
|
|
42364
42712
|
});
|
|
42365
42713
|
}
|
|
42366
42714
|
if (switcher !== undefined) {
|
|
@@ -42381,7 +42729,7 @@ const SwitcherIconCom = (props)=>{
|
|
|
42381
42729
|
const Tree$1 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
42382
42730
|
const { getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('tree');
|
|
42383
42731
|
const { virtual } = React.useContext(ConfigContext);
|
|
42384
|
-
const { prefixCls: customizePrefixCls, className, showIcon = false, showLine, switcherIcon, switcherLoadingIcon, blockNode = false, children, checkable = false, selectable = true, draggable, disabled, motion: customMotion, style, rootClassName, classNames, styles } = props;
|
|
42732
|
+
const { prefixCls: customizePrefixCls, className, showIcon = false, showLine, switcherIcon, switcherLoadingIcon, blockNode = false, children, checkable = false, selectable = true, draggable, disabled, motion: customMotion, style, rootClassName, classNames, styles, icon } = props;
|
|
42385
42733
|
const contextDisabled = React.useContext(DisabledContext);
|
|
42386
42734
|
const mergedDisabled = disabled ?? contextDisabled;
|
|
42387
42735
|
const prefixCls = getPrefixCls('tree', customizePrefixCls);
|
|
@@ -42412,7 +42760,8 @@ const Tree$1 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
42412
42760
|
const newProps = {
|
|
42413
42761
|
...mergedProps,
|
|
42414
42762
|
showLine: Boolean(showLine),
|
|
42415
|
-
|
|
42763
|
+
icon: icon,
|
|
42764
|
+
dropIndicatorRender: dropIndicatorRender
|
|
42416
42765
|
};
|
|
42417
42766
|
const [hashId, cssVarCls] = useStyle$3(prefixCls);
|
|
42418
42767
|
const [, token] = useToken();
|
|
@@ -42446,8 +42795,7 @@ const Tree$1 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
42446
42795
|
treeNodeProps: nodeProps,
|
|
42447
42796
|
showLine: showLine
|
|
42448
42797
|
});
|
|
42449
|
-
return
|
|
42450
|
-
React.createElement(RcTree, {
|
|
42798
|
+
return /*#__PURE__*/ React.createElement(RcTree, {
|
|
42451
42799
|
itemHeight: itemHeight,
|
|
42452
42800
|
ref: ref,
|
|
42453
42801
|
virtual: virtual,
|
|
@@ -42465,8 +42813,8 @@ const Tree$1 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
42465
42813
|
...contextStyle,
|
|
42466
42814
|
...style
|
|
42467
42815
|
},
|
|
42468
|
-
rootClassName: clsx(mergedClassNames
|
|
42469
|
-
rootStyle: mergedStyles
|
|
42816
|
+
rootClassName: clsx(mergedClassNames.root, rootClassName),
|
|
42817
|
+
rootStyle: mergedStyles.root,
|
|
42470
42818
|
classNames: mergedClassNames,
|
|
42471
42819
|
styles: mergedStyles,
|
|
42472
42820
|
direction: direction,
|
|
@@ -42476,7 +42824,7 @@ const Tree$1 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
42476
42824
|
selectable: selectable,
|
|
42477
42825
|
switcherIcon: renderSwitcherIcon,
|
|
42478
42826
|
draggable: draggableConfig
|
|
42479
|
-
}, children)
|
|
42827
|
+
}, children);
|
|
42480
42828
|
});
|
|
42481
42829
|
if (process.env.NODE_ENV !== 'production') {
|
|
42482
42830
|
Tree$1.displayName = 'Tree';
|
|
@@ -42558,8 +42906,8 @@ function getTreeData({ treeData, children }) {
|
|
|
42558
42906
|
const DirectoryTree = /*#__PURE__*/ React__namespace.forwardRef((oriProps, ref)=>{
|
|
42559
42907
|
const { defaultExpandAll, defaultExpandParent, defaultExpandedKeys, ...props } = oriProps;
|
|
42560
42908
|
// Shift click usage
|
|
42561
|
-
const
|
|
42562
|
-
const
|
|
42909
|
+
const lastSelectedKeyRef = React__namespace.useRef(null);
|
|
42910
|
+
const cachedSelectedKeysRef = React__namespace.useRef(null);
|
|
42563
42911
|
const getInitExpandedKeys = ()=>{
|
|
42564
42912
|
const { keyEntities } = treeUtil.convertDataToEntities(getTreeData(props), {
|
|
42565
42913
|
fieldNames: props.fieldNames
|
|
@@ -42617,16 +42965,16 @@ const DirectoryTree = /*#__PURE__*/ React__namespace.forwardRef((oriProps, ref)=
|
|
|
42617
42965
|
if (multiple && ctrlPick) {
|
|
42618
42966
|
// Control click
|
|
42619
42967
|
newSelectedKeys = keys;
|
|
42620
|
-
|
|
42621
|
-
|
|
42968
|
+
lastSelectedKeyRef.current = key;
|
|
42969
|
+
cachedSelectedKeysRef.current = newSelectedKeys;
|
|
42622
42970
|
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
|
|
42623
42971
|
} else if (multiple && shiftPick) {
|
|
42624
42972
|
// Shift click
|
|
42625
|
-
newSelectedKeys = Array.from(new Set([].concat(_toConsumableArray(
|
|
42973
|
+
newSelectedKeys = Array.from(new Set([].concat(_toConsumableArray(cachedSelectedKeysRef.current || []), _toConsumableArray(calcRangeKeys({
|
|
42626
42974
|
treeData,
|
|
42627
42975
|
expandedKeys,
|
|
42628
42976
|
startKey: key,
|
|
42629
|
-
endKey:
|
|
42977
|
+
endKey: lastSelectedKeyRef.current,
|
|
42630
42978
|
fieldNames
|
|
42631
42979
|
})))));
|
|
42632
42980
|
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
|
|
@@ -42635,8 +42983,8 @@ const DirectoryTree = /*#__PURE__*/ React__namespace.forwardRef((oriProps, ref)=
|
|
|
42635
42983
|
newSelectedKeys = [
|
|
42636
42984
|
key
|
|
42637
42985
|
];
|
|
42638
|
-
|
|
42639
|
-
|
|
42986
|
+
lastSelectedKeyRef.current = key;
|
|
42987
|
+
cachedSelectedKeysRef.current = newSelectedKeys;
|
|
42640
42988
|
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
|
|
42641
42989
|
}
|
|
42642
42990
|
props.onSelect?.(newSelectedKeys, newEvent);
|
|
@@ -42673,8 +43021,6 @@ const Tree = Tree$1;
|
|
|
42673
43021
|
Tree.DirectoryTree = DirectoryTree;
|
|
42674
43022
|
Tree.TreeNode = RcTree.TreeNode;
|
|
42675
43023
|
|
|
42676
|
-
const TableMeasureRowContext = /*#__PURE__*/ React.createContext(false);
|
|
42677
|
-
|
|
42678
43024
|
const FilterSearch = (props)=>{
|
|
42679
43025
|
const { value, filterSearch, tablePrefixCls, locale, onChange } = props;
|
|
42680
43026
|
if (!filterSearch) {
|
|
@@ -42722,13 +43068,14 @@ function flattenKeys(filters) {
|
|
|
42722
43068
|
function hasSubMenu(filters) {
|
|
42723
43069
|
return filters.some(({ children })=>children);
|
|
42724
43070
|
}
|
|
42725
|
-
|
|
42726
|
-
if (typeof text === 'string' ||
|
|
42727
|
-
return text
|
|
43071
|
+
const searchValueMatched = (normalizedSearchValue, text)=>{
|
|
43072
|
+
if (typeof text === 'string' || isNumber(text)) {
|
|
43073
|
+
return text.toString().toLowerCase().includes(normalizedSearchValue);
|
|
42728
43074
|
}
|
|
42729
43075
|
return false;
|
|
42730
|
-
}
|
|
42731
|
-
|
|
43076
|
+
};
|
|
43077
|
+
const renderFilterItems = (options)=>{
|
|
43078
|
+
const { filters, prefixCls, filteredKeys, filterMultiple, searchValue, normalizedSearchValue, filterSearch } = options;
|
|
42732
43079
|
return filters.map((filter, index)=>{
|
|
42733
43080
|
const key = String(filter.value);
|
|
42734
43081
|
if (filter.children) {
|
|
@@ -42742,6 +43089,7 @@ function renderFilterItems({ filters, prefixCls, filteredKeys, filterMultiple, s
|
|
|
42742
43089
|
filteredKeys,
|
|
42743
43090
|
filterMultiple,
|
|
42744
43091
|
searchValue,
|
|
43092
|
+
normalizedSearchValue,
|
|
42745
43093
|
filterSearch
|
|
42746
43094
|
})
|
|
42747
43095
|
};
|
|
@@ -42753,15 +43101,15 @@ function renderFilterItems({ filters, prefixCls, filteredKeys, filterMultiple, s
|
|
|
42753
43101
|
checked: filteredKeys.includes(key)
|
|
42754
43102
|
}), /*#__PURE__*/ React__namespace.createElement("span", null, filter.text))
|
|
42755
43103
|
};
|
|
42756
|
-
if (
|
|
43104
|
+
if (normalizedSearchValue) {
|
|
42757
43105
|
if (typeof filterSearch === 'function') {
|
|
42758
|
-
return filterSearch(
|
|
43106
|
+
return filterSearch(normalizedSearchValue, filter) ? item : null;
|
|
42759
43107
|
}
|
|
42760
|
-
return searchValueMatched(
|
|
43108
|
+
return searchValueMatched(normalizedSearchValue, filter.text) ? item : null;
|
|
42761
43109
|
}
|
|
42762
43110
|
return item;
|
|
42763
43111
|
});
|
|
42764
|
-
}
|
|
43112
|
+
};
|
|
42765
43113
|
function wrapStringListType(keys) {
|
|
42766
43114
|
return keys || [];
|
|
42767
43115
|
}
|
|
@@ -42834,6 +43182,9 @@ const FilterDropdown = (props)=>{
|
|
|
42834
43182
|
};
|
|
42835
43183
|
// search in tree mode column filter
|
|
42836
43184
|
const [searchValue, setSearchValue] = React__namespace.useState('');
|
|
43185
|
+
const normalizedSearchValue = React__namespace.useMemo(()=>searchValue.trim().toLowerCase(), [
|
|
43186
|
+
searchValue
|
|
43187
|
+
]);
|
|
42837
43188
|
const onSearch = (e)=>{
|
|
42838
43189
|
const { value } = e.target;
|
|
42839
43190
|
setSearchValue(value);
|
|
@@ -43001,11 +43352,11 @@ const FilterDropdown = (props)=>{
|
|
|
43001
43352
|
}),
|
|
43002
43353
|
autoExpandParent: true,
|
|
43003
43354
|
defaultExpandAll: true,
|
|
43004
|
-
filterTreeNode:
|
|
43355
|
+
filterTreeNode: normalizedSearchValue ? (node)=>{
|
|
43005
43356
|
if (typeof filterSearch === 'function') {
|
|
43006
43357
|
return filterSearch(searchValue, getFilterData(node));
|
|
43007
43358
|
}
|
|
43008
|
-
return searchValueMatched(
|
|
43359
|
+
return searchValueMatched(normalizedSearchValue, node.title);
|
|
43009
43360
|
} : undefined
|
|
43010
43361
|
})));
|
|
43011
43362
|
}
|
|
@@ -43015,7 +43366,8 @@ const FilterDropdown = (props)=>{
|
|
|
43015
43366
|
prefixCls,
|
|
43016
43367
|
filteredKeys: getFilteredKeysSync(),
|
|
43017
43368
|
filterMultiple,
|
|
43018
|
-
searchValue
|
|
43369
|
+
searchValue,
|
|
43370
|
+
normalizedSearchValue
|
|
43019
43371
|
});
|
|
43020
43372
|
const isEmpty = items.every((item)=>item === null);
|
|
43021
43373
|
return /*#__PURE__*/ React__namespace.createElement(React__namespace.Fragment, null, /*#__PURE__*/ React__namespace.createElement(FilterSearch, {
|
|
@@ -43214,19 +43566,33 @@ const getFilterData = (data, filterStates, childrenColumnName)=>{
|
|
|
43214
43566
|
const filterDatas = filterStates.reduce((currentData, filterState)=>{
|
|
43215
43567
|
const { column: { onFilter, filters }, filteredKeys } = filterState;
|
|
43216
43568
|
if (onFilter && filteredKeys && filteredKeys.length) {
|
|
43217
|
-
|
|
43218
|
-
|
|
43219
|
-
|
|
43220
|
-
|
|
43221
|
-
|
|
43222
|
-
|
|
43223
|
-
|
|
43224
|
-
|
|
43225
|
-
|
|
43226
|
-
|
|
43569
|
+
// Preprocess the keys corresponding to the filter tree,
|
|
43570
|
+
// use Map to improve lookup performance to O(1).
|
|
43571
|
+
const flatKeys = flattenKeys(filters);
|
|
43572
|
+
const keyMap = new Map();
|
|
43573
|
+
flatKeys.forEach((k)=>{
|
|
43574
|
+
const strKey = String(k);
|
|
43575
|
+
if (!keyMap.has(strKey)) {
|
|
43576
|
+
keyMap.set(strKey, k);
|
|
43577
|
+
}
|
|
43578
|
+
});
|
|
43579
|
+
const realKeys = filteredKeys.map((key)=>{
|
|
43580
|
+
const strKey = String(key);
|
|
43581
|
+
return keyMap.get(strKey) ?? key;
|
|
43582
|
+
});
|
|
43583
|
+
const internalFilter = (subset)=>subset.reduce((acc, record)=>{
|
|
43584
|
+
const clonedRecord = {
|
|
43585
|
+
...record
|
|
43586
|
+
};
|
|
43587
|
+
if (clonedRecord[childrenColumnName]) {
|
|
43588
|
+
clonedRecord[childrenColumnName] = getFilterData(clonedRecord[childrenColumnName], filterStates, childrenColumnName);
|
|
43227
43589
|
}
|
|
43228
|
-
|
|
43229
|
-
|
|
43590
|
+
if (realKeys.some((realKey)=>onFilter(realKey, clonedRecord))) {
|
|
43591
|
+
acc.push(clonedRecord);
|
|
43592
|
+
}
|
|
43593
|
+
return acc;
|
|
43594
|
+
}, []);
|
|
43595
|
+
return internalFilter(currentData);
|
|
43230
43596
|
}
|
|
43231
43597
|
return currentData;
|
|
43232
43598
|
}, data);
|
|
@@ -43393,7 +43759,7 @@ function usePagination(total, onChange, pagination) {
|
|
|
43393
43759
|
const ASCEND = 'ascend';
|
|
43394
43760
|
const DESCEND = 'descend';
|
|
43395
43761
|
const getMultiplePriority = (column)=>{
|
|
43396
|
-
if (typeof column.sorter === 'object' &&
|
|
43762
|
+
if (typeof column.sorter === 'object' && isNumber(column.sorter.multiple)) {
|
|
43397
43763
|
return column.sorter.multiple;
|
|
43398
43764
|
}
|
|
43399
43765
|
return false;
|
|
@@ -43514,11 +43880,11 @@ const injectSorter = (prefixCls, columns, sorterStates, triggerSorter, defaultSo
|
|
|
43514
43880
|
if (typeof showSorterTooltip !== 'boolean' && showSorterTooltip?.target === 'sorter-icon') {
|
|
43515
43881
|
return /*#__PURE__*/ React__namespace.createElement("div", {
|
|
43516
43882
|
className: clsx(columnSortersClass, `${columnSortersClass}-tooltip-target-sorter`)
|
|
43517
|
-
}, renderColumnTitleWrapper, /*#__PURE__*/ React__namespace.createElement(Tooltip
|
|
43883
|
+
}, renderColumnTitleWrapper, /*#__PURE__*/ React__namespace.createElement(Tooltip, {
|
|
43518
43884
|
...tooltipProps
|
|
43519
43885
|
}, sorter));
|
|
43520
43886
|
}
|
|
43521
|
-
return /*#__PURE__*/ React__namespace.createElement(Tooltip
|
|
43887
|
+
return /*#__PURE__*/ React__namespace.createElement(Tooltip, {
|
|
43522
43888
|
...tooltipProps
|
|
43523
43889
|
}, renderSortTitle);
|
|
43524
43890
|
}
|
|
@@ -43777,10 +44143,7 @@ const genBorderedStyle = (token)=>{
|
|
|
43777
44143
|
[`&${componentCls}-${size}`]: {
|
|
43778
44144
|
[`> ${componentCls}-container`]: {
|
|
43779
44145
|
[`> ${componentCls}-content, > ${componentCls}-body`]: {
|
|
43780
|
-
|
|
43781
|
-
> table > tbody > tr > th,
|
|
43782
|
-
> table > tbody > tr > td
|
|
43783
|
-
`]: {
|
|
44146
|
+
'> table > tbody > tr > th, > table > tbody > tr > td': {
|
|
43784
44147
|
[`> ${componentCls}-expanded-row-fixed`]: {
|
|
43785
44148
|
margin: `${cssinjs.unit(calc(paddingVertical).mul(-1).equal())}
|
|
43786
44149
|
${cssinjs.unit(calc(calc(paddingHorizontal).add(lineWidth)).mul(-1).equal())}`
|
|
@@ -43802,22 +44165,10 @@ const genBorderedStyle = (token)=>{
|
|
|
43802
44165
|
[`> ${componentCls}-container`]: {
|
|
43803
44166
|
borderInlineStart: tableBorder,
|
|
43804
44167
|
borderTop: tableBorder,
|
|
43805
|
-
[`
|
|
43806
|
-
> ${componentCls}-content,
|
|
43807
|
-
> ${componentCls}-header,
|
|
43808
|
-
> ${componentCls}-body,
|
|
43809
|
-
> ${componentCls}-summary
|
|
43810
|
-
`]: {
|
|
44168
|
+
[`> ${componentCls}-content, > ${componentCls}-header, > ${componentCls}-body, > ${componentCls}-summary`]: {
|
|
43811
44169
|
'> table': {
|
|
43812
44170
|
// ============================= Cell =============================
|
|
43813
|
-
|
|
43814
|
-
> thead > tr > th,
|
|
43815
|
-
> thead > tr > td,
|
|
43816
|
-
> tbody > tr > th,
|
|
43817
|
-
> tbody > tr > td,
|
|
43818
|
-
> tfoot > tr > th,
|
|
43819
|
-
> tfoot > tr > td
|
|
43820
|
-
`]: {
|
|
44171
|
+
'> thead > tr > th, > thead > tr > td, > tbody > tr > th, > tbody > tr > td, > tfoot > tr > th, > tfoot > tr > td': {
|
|
43821
44172
|
borderInlineEnd: tableBorder
|
|
43822
44173
|
},
|
|
43823
44174
|
// ============================ Header ============================
|
|
@@ -43830,20 +44181,13 @@ const genBorderedStyle = (token)=>{
|
|
|
43830
44181
|
}
|
|
43831
44182
|
},
|
|
43832
44183
|
// Fixed right should provides additional border
|
|
43833
|
-
|
|
43834
|
-
> thead > tr,
|
|
43835
|
-
> tbody > tr,
|
|
43836
|
-
> tfoot > tr
|
|
43837
|
-
`]: {
|
|
44184
|
+
'> thead > tr, > tbody > tr, > tfoot > tr': {
|
|
43838
44185
|
[`> ${componentCls}-cell-fix-right-first::after`]: {
|
|
43839
44186
|
borderInlineEnd: tableBorder
|
|
43840
44187
|
}
|
|
43841
44188
|
},
|
|
43842
44189
|
// ========================== Expandable ==========================
|
|
43843
|
-
|
|
43844
|
-
> tbody > tr > th,
|
|
43845
|
-
> tbody > tr > td
|
|
43846
|
-
`]: {
|
|
44190
|
+
'> tbody > tr > th, > tbody > tr > td': {
|
|
43847
44191
|
[`> ${componentCls}-expanded-row-fixed`]: {
|
|
43848
44192
|
margin: `${cssinjs.unit(calc(tablePaddingVertical).mul(-1).equal())} ${cssinjs.unit(calc(calc(tablePaddingHorizontal).add(lineWidth)).mul(-1).equal())}`,
|
|
43849
44193
|
'&::after': {
|
|
@@ -43875,7 +44219,7 @@ const genBorderedStyle = (token)=>{
|
|
|
43875
44219
|
}
|
|
43876
44220
|
},
|
|
43877
44221
|
// ============================ Size ============================
|
|
43878
|
-
...getSizeBorderStyle('
|
|
44222
|
+
...getSizeBorderStyle('medium', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle),
|
|
43879
44223
|
...getSizeBorderStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall),
|
|
43880
44224
|
// ============================ Footer ============================
|
|
43881
44225
|
[`> ${componentCls}-footer`]: {
|
|
@@ -43936,10 +44280,7 @@ const genEmptyStyle = (token)=>{
|
|
|
43936
44280
|
[`${componentCls}-tbody > tr${componentCls}-placeholder`]: {
|
|
43937
44281
|
textAlign: 'center',
|
|
43938
44282
|
color: token.colorTextDisabled,
|
|
43939
|
-
|
|
43940
|
-
&:hover > th,
|
|
43941
|
-
&:hover > td,
|
|
43942
|
-
`]: {
|
|
44283
|
+
'&:hover > th, &:hover > td': {
|
|
43943
44284
|
background: token.colorBgContainer
|
|
43944
44285
|
}
|
|
43945
44286
|
}
|
|
@@ -44484,7 +44825,7 @@ const genSizeStyle = (token)=>{
|
|
|
44484
44825
|
});
|
|
44485
44826
|
return {
|
|
44486
44827
|
[`${componentCls}-wrapper`]: {
|
|
44487
|
-
...getSizeStyle('
|
|
44828
|
+
...getSizeStyle('medium', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle, token.tableFontSizeMiddle),
|
|
44488
44829
|
...getSizeStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall, token.tableFontSizeSmall)
|
|
44489
44830
|
}
|
|
44490
44831
|
};
|
|
@@ -44751,10 +45092,7 @@ const genTableStyle = (token)=>{
|
|
|
44751
45092
|
},
|
|
44752
45093
|
// ============================ Header ============================
|
|
44753
45094
|
[`${componentCls}-thead`]: {
|
|
44754
|
-
|
|
44755
|
-
> tr > th,
|
|
44756
|
-
> tr > td
|
|
44757
|
-
`]: {
|
|
45095
|
+
'> tr > th, > tr > td': {
|
|
44758
45096
|
position: 'relative',
|
|
44759
45097
|
color: tableHeaderTextColor,
|
|
44760
45098
|
fontWeight: fontWeightStrong,
|
|
@@ -44962,7 +45300,7 @@ var useStyle$2 = genStyleHooks('Table', (token)=>{
|
|
|
44962
45300
|
|
|
44963
45301
|
const EMPTY_LIST = [];
|
|
44964
45302
|
const InternalTable$1 = (props, ref)=>{
|
|
44965
|
-
const { prefixCls: customizePrefixCls, className, rootClassName, style, classNames, styles, size: customizeSize, bordered, dropdownPrefixCls: customizeDropdownPrefixCls, dataSource, pagination, rowSelection, rowKey: customizeRowKey, rowClassName, columns, children, childrenColumnName: legacyChildrenColumnName, onChange, getPopupContainer, loading, expandIcon, expandable, expandedRowRender, expandIconColumnIndex, indentSize, scroll, sortDirections, locale, showSorterTooltip = {
|
|
45303
|
+
const { prefixCls: customizePrefixCls, className, rootClassName, style, classNames, styles, size: customizeSize, bordered, dropdownPrefixCls: customizeDropdownPrefixCls, dataSource, pagination, rowSelection: customizeRowSelection, rowKey: customizeRowKey, rowClassName, columns, children, childrenColumnName: legacyChildrenColumnName, onChange, getPopupContainer, loading, expandIcon, expandable, expandedRowRender, expandIconColumnIndex, indentSize, scroll, sortDirections, locale, showSorterTooltip = {
|
|
44966
45304
|
target: 'full-header'
|
|
44967
45305
|
}, virtual } = props;
|
|
44968
45306
|
const warning = devUseWarning('Table');
|
|
@@ -44988,7 +45326,7 @@ const InternalTable$1 = (props, ref)=>{
|
|
|
44988
45326
|
]);
|
|
44989
45327
|
const { locale: contextLocale = localeValues, table: table$1 } = React__namespace.useContext(ConfigContext);
|
|
44990
45328
|
const { getPrefixCls, direction, renderEmpty, getPopupContainer: getContextPopupContainer, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('table');
|
|
44991
|
-
const mergedSize = useSize(customizeSize);
|
|
45329
|
+
const mergedSize = useSize((ctx)=>customizeSize === 'middle' ? 'medium' : customizeSize ?? ctx);
|
|
44992
45330
|
// =========== Merged Props for Semantic ==========
|
|
44993
45331
|
const mergedProps = {
|
|
44994
45332
|
...props,
|
|
@@ -45023,6 +45361,15 @@ const InternalTable$1 = (props, ref)=>{
|
|
|
45023
45361
|
const prefixCls = getPrefixCls('table', customizePrefixCls);
|
|
45024
45362
|
const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);
|
|
45025
45363
|
const [, token] = useToken();
|
|
45364
|
+
const mergedRowSelection = React__namespace.useMemo(()=>{
|
|
45365
|
+
return customizeRowSelection && typeof customizeRowSelection === 'object' ? {
|
|
45366
|
+
columnWidth: token.Table?.selectionColumnWidth,
|
|
45367
|
+
...customizeRowSelection
|
|
45368
|
+
} : customizeRowSelection;
|
|
45369
|
+
}, [
|
|
45370
|
+
customizeRowSelection,
|
|
45371
|
+
token.Table?.selectionColumnWidth
|
|
45372
|
+
]);
|
|
45026
45373
|
const rootCls = useCSSVarCls(prefixCls);
|
|
45027
45374
|
const [hashId, cssVarCls] = useStyle$2(prefixCls, rootCls);
|
|
45028
45375
|
const mergedExpandable = {
|
|
@@ -45044,7 +45391,7 @@ const InternalTable$1 = (props, ref)=>{
|
|
|
45044
45391
|
childrenColumnName,
|
|
45045
45392
|
rawData
|
|
45046
45393
|
]);
|
|
45047
|
-
const
|
|
45394
|
+
const internalRef = {
|
|
45048
45395
|
body: React__namespace.useRef(null)
|
|
45049
45396
|
};
|
|
45050
45397
|
// ============================ Width =============================
|
|
@@ -45090,9 +45437,9 @@ const InternalTable$1 = (props, ref)=>{
|
|
|
45090
45437
|
pagination.onChange?.(1, changeInfo.pagination?.pageSize);
|
|
45091
45438
|
}
|
|
45092
45439
|
}
|
|
45093
|
-
if (scroll && scroll.scrollToFirstRowOnChange !== false &&
|
|
45440
|
+
if (scroll && scroll.scrollToFirstRowOnChange !== false && internalRef.body.current) {
|
|
45094
45441
|
scrollTo(0, {
|
|
45095
|
-
getContainer: ()=>
|
|
45442
|
+
getContainer: ()=>internalRef.body.current
|
|
45096
45443
|
});
|
|
45097
45444
|
}
|
|
45098
45445
|
onChange?.(changeInfo.pagination, changeInfo.filters, changeInfo.sorter, {
|
|
@@ -45214,7 +45561,7 @@ const InternalTable$1 = (props, ref)=>{
|
|
|
45214
45561
|
childrenColumnName,
|
|
45215
45562
|
locale: tableLocale,
|
|
45216
45563
|
getPopupContainer: getPopupContainer || getContextPopupContainer
|
|
45217
|
-
},
|
|
45564
|
+
}, mergedRowSelection);
|
|
45218
45565
|
const internalRowClassName = (record, index, indent)=>{
|
|
45219
45566
|
const resolvedRowClassName = typeof rowClassName === 'function' ? rowClassName(record, index, indent) : rowClassName;
|
|
45220
45567
|
return clsx({
|
|
@@ -45228,13 +45575,13 @@ const InternalTable$1 = (props, ref)=>{
|
|
|
45228
45575
|
mergedExpandable.expandIcon = mergedExpandable.expandIcon || expandIcon || renderExpandIcon(tableLocale);
|
|
45229
45576
|
// Adjust expand icon index, no overwrite expandIconColumnIndex if set.
|
|
45230
45577
|
if (expandType === 'nest' && mergedExpandable.expandIconColumnIndex === undefined) {
|
|
45231
|
-
mergedExpandable.expandIconColumnIndex =
|
|
45232
|
-
} else if (mergedExpandable.expandIconColumnIndex > 0 &&
|
|
45578
|
+
mergedExpandable.expandIconColumnIndex = mergedRowSelection ? 1 : 0;
|
|
45579
|
+
} else if (mergedExpandable.expandIconColumnIndex > 0 && mergedRowSelection) {
|
|
45233
45580
|
mergedExpandable.expandIconColumnIndex -= 1;
|
|
45234
45581
|
}
|
|
45235
45582
|
// Indent size
|
|
45236
45583
|
if (typeof mergedExpandable.indentSize !== 'number') {
|
|
45237
|
-
mergedExpandable.indentSize =
|
|
45584
|
+
mergedExpandable.indentSize = isNumber(indentSize) ? indentSize : 15;
|
|
45238
45585
|
}
|
|
45239
45586
|
// ============================ Render ============================
|
|
45240
45587
|
const transformColumns = React__namespace.useCallback((innerColumns)=>transformTitleColumns(transformSelectionColumns(transformFilterColumns(transformSorterColumns(innerColumns)))), [
|
|
@@ -45249,7 +45596,7 @@ const InternalTable$1 = (props, ref)=>{
|
|
|
45249
45596
|
if (mergedPagination.size) {
|
|
45250
45597
|
paginationSize = mergedPagination.size;
|
|
45251
45598
|
} else {
|
|
45252
|
-
paginationSize = mergedSize === 'small' || mergedSize === '
|
|
45599
|
+
paginationSize = mergedSize === 'small' || mergedSize === 'medium' ? 'small' : undefined;
|
|
45253
45600
|
}
|
|
45254
45601
|
const renderPagination = (placement = 'end')=>/*#__PURE__*/ React__namespace.createElement(Pagination, {
|
|
45255
45602
|
...mergedPagination,
|
|
@@ -45343,7 +45690,7 @@ const InternalTable$1 = (props, ref)=>{
|
|
|
45343
45690
|
const { fontSize, lineHeight, lineWidth, padding, paddingXS, paddingSM } = token;
|
|
45344
45691
|
const fontHeight = Math.floor(fontSize * lineHeight);
|
|
45345
45692
|
switch(mergedSize){
|
|
45346
|
-
case '
|
|
45693
|
+
case 'medium':
|
|
45347
45694
|
return paddingSM * 2 + fontHeight + lineWidth;
|
|
45348
45695
|
case 'small':
|
|
45349
45696
|
return paddingXS * 2 + fontHeight + lineWidth;
|
|
@@ -45376,7 +45723,7 @@ const InternalTable$1 = (props, ref)=>{
|
|
|
45376
45723
|
expandable: mergedExpandable,
|
|
45377
45724
|
prefixCls: prefixCls,
|
|
45378
45725
|
className: clsx({
|
|
45379
|
-
[`${prefixCls}-
|
|
45726
|
+
[`${prefixCls}-medium`]: mergedSize === 'medium',
|
|
45380
45727
|
[`${prefixCls}-small`]: mergedSize === 'small',
|
|
45381
45728
|
[`${prefixCls}-bordered`]: bordered,
|
|
45382
45729
|
[`${prefixCls}-empty`]: rawData.length === 0
|
|
@@ -45387,7 +45734,7 @@ const InternalTable$1 = (props, ref)=>{
|
|
|
45387
45734
|
emptyText: mergedEmptyNode,
|
|
45388
45735
|
// Internal
|
|
45389
45736
|
internalHooks: table.INTERNAL_HOOKS,
|
|
45390
|
-
internalRefs:
|
|
45737
|
+
internalRefs: internalRef,
|
|
45391
45738
|
transformColumns: transformColumns,
|
|
45392
45739
|
getContainerWidth: getContainerWidth,
|
|
45393
45740
|
measureRowRender: (measureRow)=>/*#__PURE__*/ React__namespace.createElement(TableMeasureRowContext.Provider, {
|
|
@@ -45863,10 +46210,7 @@ const InternalTag = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
45863
46210
|
...props,
|
|
45864
46211
|
color: mergedColor,
|
|
45865
46212
|
variant: mergedVariant,
|
|
45866
|
-
disabled: mergedDisabled
|
|
45867
|
-
href,
|
|
45868
|
-
target,
|
|
45869
|
-
icon
|
|
46213
|
+
disabled: mergedDisabled
|
|
45870
46214
|
};
|
|
45871
46215
|
// ====================== Styles ======================
|
|
45872
46216
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
@@ -46145,10 +46489,7 @@ const getEditableStyles = (token)=>{
|
|
|
46145
46489
|
};
|
|
46146
46490
|
const getCopyableStyles = (token)=>({
|
|
46147
46491
|
[`${token.componentCls}-copy-success`]: {
|
|
46148
|
-
|
|
46149
|
-
&,
|
|
46150
|
-
&:hover,
|
|
46151
|
-
&:focus`]: {
|
|
46492
|
+
'&, &:hover, &:focus': {
|
|
46152
46493
|
color: token.colorSuccess
|
|
46153
46494
|
}
|
|
46154
46495
|
},
|
|
@@ -46157,10 +46498,7 @@ const getCopyableStyles = (token)=>({
|
|
|
46157
46498
|
}
|
|
46158
46499
|
});
|
|
46159
46500
|
const getEllipsisStyles = ()=>({
|
|
46160
|
-
|
|
46161
|
-
a&-ellipsis,
|
|
46162
|
-
span&-ellipsis
|
|
46163
|
-
`]: {
|
|
46501
|
+
'a&-ellipsis, span&-ellipsis': {
|
|
46164
46502
|
display: 'inline-block',
|
|
46165
46503
|
maxWidth: '100%'
|
|
46166
46504
|
},
|
|
@@ -46221,39 +46559,15 @@ const genTypographyStyle = (token)=>{
|
|
|
46221
46559
|
cursor: 'not-allowed',
|
|
46222
46560
|
userSelect: 'none'
|
|
46223
46561
|
},
|
|
46224
|
-
|
|
46225
|
-
div&,
|
|
46226
|
-
p
|
|
46227
|
-
`]: {
|
|
46562
|
+
'div&, p': {
|
|
46228
46563
|
marginBottom: '1em'
|
|
46229
46564
|
},
|
|
46230
46565
|
...getTitleStyles(token),
|
|
46231
|
-
[`
|
|
46232
|
-
& + h1${componentCls},
|
|
46233
|
-
& + h2${componentCls},
|
|
46234
|
-
& + h3${componentCls},
|
|
46235
|
-
& + h4${componentCls},
|
|
46236
|
-
& + h5${componentCls}
|
|
46237
|
-
`]: {
|
|
46566
|
+
[`& + h1${componentCls}, & + h2${componentCls}, & + h3${componentCls}, & + h4${componentCls}, & + h5${componentCls}`]: {
|
|
46238
46567
|
marginTop: titleMarginTop
|
|
46239
46568
|
},
|
|
46240
|
-
|
|
46241
|
-
|
|
46242
|
-
ul,
|
|
46243
|
-
li,
|
|
46244
|
-
p,
|
|
46245
|
-
h1,
|
|
46246
|
-
h2,
|
|
46247
|
-
h3,
|
|
46248
|
-
h4,
|
|
46249
|
-
h5`]: {
|
|
46250
|
-
[`
|
|
46251
|
-
+ h1,
|
|
46252
|
-
+ h2,
|
|
46253
|
-
+ h3,
|
|
46254
|
-
+ h4,
|
|
46255
|
-
+ h5
|
|
46256
|
-
`]: {
|
|
46569
|
+
'div, ul, li, p, h1, h2, h3, h4, h5': {
|
|
46570
|
+
'+ h1, + h2, + h3, + h4, + h5': {
|
|
46257
46571
|
marginTop: titleMarginTop
|
|
46258
46572
|
}
|
|
46259
46573
|
},
|
|
@@ -46291,8 +46605,8 @@ var useStyle = genStyleHooks('Typography', genTypographyStyle, prepareComponentT
|
|
|
46291
46605
|
const Editable = (props)=>{
|
|
46292
46606
|
const { prefixCls, 'aria-label': ariaLabel, className, style, direction, maxLength, autoSize = true, value, onSave, onCancel, onEnd, component, enterIcon = /*#__PURE__*/ React__namespace.createElement(EnterOutlined, null) } = props;
|
|
46293
46607
|
const ref = React__namespace.useRef(null);
|
|
46294
|
-
const
|
|
46295
|
-
const
|
|
46608
|
+
const inCompositionRef = React__namespace.useRef(false);
|
|
46609
|
+
const lastKeyCodeRef = React__namespace.useRef(null);
|
|
46296
46610
|
const [current, setCurrent] = React__namespace.useState(value);
|
|
46297
46611
|
React__namespace.useEffect(()=>{
|
|
46298
46612
|
setCurrent(value);
|
|
@@ -46311,24 +46625,24 @@ const Editable = (props)=>{
|
|
|
46311
46625
|
setCurrent(target.value.replace(/[\n\r]/g, ''));
|
|
46312
46626
|
};
|
|
46313
46627
|
const onCompositionStart = ()=>{
|
|
46314
|
-
|
|
46628
|
+
inCompositionRef.current = true;
|
|
46315
46629
|
};
|
|
46316
46630
|
const onCompositionEnd = ()=>{
|
|
46317
|
-
|
|
46631
|
+
inCompositionRef.current = false;
|
|
46318
46632
|
};
|
|
46319
46633
|
const onKeyDown = ({ keyCode })=>{
|
|
46320
46634
|
// We don't record keyCode when IME is using
|
|
46321
|
-
if (
|
|
46635
|
+
if (inCompositionRef.current) {
|
|
46322
46636
|
return;
|
|
46323
46637
|
}
|
|
46324
|
-
|
|
46638
|
+
lastKeyCodeRef.current = keyCode;
|
|
46325
46639
|
};
|
|
46326
46640
|
const confirmChange = ()=>{
|
|
46327
46641
|
onSave(current.trim());
|
|
46328
46642
|
};
|
|
46329
46643
|
const onKeyUp = ({ keyCode, ctrlKey, altKey, metaKey, shiftKey })=>{
|
|
46330
46644
|
// Check if it's a real key
|
|
46331
|
-
if (
|
|
46645
|
+
if (lastKeyCodeRef.current !== keyCode || inCompositionRef.current || ctrlKey || altKey || metaKey || shiftKey) {
|
|
46332
46646
|
return;
|
|
46333
46647
|
}
|
|
46334
46648
|
if (keyCode === KeyCode.ENTER) {
|
|
@@ -46454,7 +46768,9 @@ const useCopyClick = ({ copyConfig, children })=>{
|
|
|
46454
46768
|
setCopyLoading(true);
|
|
46455
46769
|
try {
|
|
46456
46770
|
const text = typeof copyConfig.text === 'function' ? await copyConfig.text() : copyConfig.text;
|
|
46457
|
-
await copy(text || toList
|
|
46771
|
+
await copy(text || toList(children, {
|
|
46772
|
+
skipEmpty: true
|
|
46773
|
+
}).join('') || '', copyOptions);
|
|
46458
46774
|
setCopyLoading(false);
|
|
46459
46775
|
setCopied(true);
|
|
46460
46776
|
// Trigger tips update
|
|
@@ -46538,29 +46854,26 @@ const Typography$1 = /*#__PURE__*/ React__namespace.forwardRef((props, ref)=>{
|
|
|
46538
46854
|
...contextStyle,
|
|
46539
46855
|
...style
|
|
46540
46856
|
};
|
|
46541
|
-
return
|
|
46542
|
-
React__namespace.createElement(Component, {
|
|
46857
|
+
return /*#__PURE__*/ React__namespace.createElement(Component, {
|
|
46543
46858
|
className: componentClassName,
|
|
46544
46859
|
style: mergedStyle,
|
|
46545
46860
|
ref: ref,
|
|
46546
46861
|
...restProps
|
|
46547
|
-
}, children)
|
|
46862
|
+
}, children);
|
|
46548
46863
|
});
|
|
46549
46864
|
if (process.env.NODE_ENV !== 'production') {
|
|
46550
46865
|
Typography$1.displayName = 'Typography';
|
|
46551
46866
|
}
|
|
46552
46867
|
|
|
46553
|
-
|
|
46868
|
+
const toCopyConfigList = (val)=>{
|
|
46554
46869
|
if (val === false) {
|
|
46555
46870
|
return [
|
|
46556
46871
|
false,
|
|
46557
46872
|
false
|
|
46558
46873
|
];
|
|
46559
46874
|
}
|
|
46560
|
-
return
|
|
46561
|
-
|
|
46562
|
-
];
|
|
46563
|
-
}
|
|
46875
|
+
return toList(val);
|
|
46876
|
+
};
|
|
46564
46877
|
function getNode(dom, defaultNode, needDom) {
|
|
46565
46878
|
if (dom === true || dom === undefined) {
|
|
46566
46879
|
return defaultNode;
|
|
@@ -46594,14 +46907,15 @@ const isValidText = (val)=>[
|
|
|
46594
46907
|
'number'
|
|
46595
46908
|
].includes(typeof val);
|
|
46596
46909
|
|
|
46597
|
-
const CopyBtn = (
|
|
46598
|
-
const
|
|
46599
|
-
const
|
|
46910
|
+
const CopyBtn = (props)=>{
|
|
46911
|
+
const { prefixCls, copied, locale, iconOnly, tooltips, icon, tabIndex, onCopy, loading: btnLoading } = props;
|
|
46912
|
+
const tooltipNodes = toCopyConfigList(tooltips);
|
|
46913
|
+
const iconNodes = toCopyConfigList(icon);
|
|
46600
46914
|
const { copied: copiedText, copy: copyText } = locale ?? {};
|
|
46601
46915
|
const systemStr = copied ? copiedText : copyText;
|
|
46602
46916
|
const copyTitle = getNode(tooltipNodes[copied ? 1 : 0], systemStr);
|
|
46603
46917
|
const ariaLabel = typeof copyTitle === 'string' ? copyTitle : systemStr;
|
|
46604
|
-
return /*#__PURE__*/ React__namespace.createElement(Tooltip
|
|
46918
|
+
return /*#__PURE__*/ React__namespace.createElement(Tooltip, {
|
|
46605
46919
|
title: copyTitle
|
|
46606
46920
|
}, /*#__PURE__*/ React__namespace.createElement("button", {
|
|
46607
46921
|
type: "button",
|
|
@@ -46845,7 +47159,7 @@ const EllipsisTooltip = ({ enableEllipsis, isEllipsis, open, children, tooltipPr
|
|
|
46845
47159
|
return children;
|
|
46846
47160
|
}
|
|
46847
47161
|
const mergedOpen = open && isEllipsis;
|
|
46848
|
-
return /*#__PURE__*/ React__namespace.createElement(Tooltip
|
|
47162
|
+
return /*#__PURE__*/ React__namespace.createElement(Tooltip, {
|
|
46849
47163
|
open: mergedOpen,
|
|
46850
47164
|
...tooltipProps
|
|
46851
47165
|
}, children);
|
|
@@ -46983,7 +47297,9 @@ const Base = /*#__PURE__*/ React__namespace.forwardRef((props, ref$1)=>{
|
|
|
46983
47297
|
canUseCssEllipsis,
|
|
46984
47298
|
mergedEnableEllipsis
|
|
46985
47299
|
]);
|
|
46986
|
-
const
|
|
47300
|
+
const tooltipProps = useTooltipProps(ellipsisConfig.tooltip, editConfig.text, children);
|
|
47301
|
+
const needNativeEllipsisMeasure = cssEllipsis && !!tooltipProps.title;
|
|
47302
|
+
const isMergedEllipsis = mergedEnableEllipsis && (cssEllipsis ? needNativeEllipsisMeasure && isNativeEllipsis : isJsEllipsis);
|
|
46987
47303
|
const cssTextOverflow = mergedEnableEllipsis && rows === 1 && cssEllipsis;
|
|
46988
47304
|
const cssLineClamp = mergedEnableEllipsis && rows > 1 && cssEllipsis;
|
|
46989
47305
|
// >>>>> Expand
|
|
@@ -47008,7 +47324,7 @@ const Base = /*#__PURE__*/ React__namespace.forwardRef((props, ref$1)=>{
|
|
|
47008
47324
|
// >>>>> Native ellipsis
|
|
47009
47325
|
React__namespace.useEffect(()=>{
|
|
47010
47326
|
const textEle = typographyRef.current;
|
|
47011
|
-
if (enableEllipsis &&
|
|
47327
|
+
if (enableEllipsis && needNativeEllipsisMeasure && textEle) {
|
|
47012
47328
|
const currentEllipsis = isEleEllipsis(textEle);
|
|
47013
47329
|
if (isNativeEllipsis !== currentEllipsis) {
|
|
47014
47330
|
setIsNativeEllipsis(currentEllipsis);
|
|
@@ -47016,7 +47332,7 @@ const Base = /*#__PURE__*/ React__namespace.forwardRef((props, ref$1)=>{
|
|
|
47016
47332
|
}
|
|
47017
47333
|
}, [
|
|
47018
47334
|
enableEllipsis,
|
|
47019
|
-
|
|
47335
|
+
needNativeEllipsisMeasure,
|
|
47020
47336
|
children,
|
|
47021
47337
|
cssLineClamp,
|
|
47022
47338
|
isNativeVisible,
|
|
@@ -47026,7 +47342,7 @@ const Base = /*#__PURE__*/ React__namespace.forwardRef((props, ref$1)=>{
|
|
|
47026
47342
|
// Use IntersectionObserver to check if element is invisible
|
|
47027
47343
|
React__namespace.useEffect(()=>{
|
|
47028
47344
|
const textEle = typographyRef.current;
|
|
47029
|
-
if (typeof IntersectionObserver === 'undefined' || !textEle || !
|
|
47345
|
+
if (typeof IntersectionObserver === 'undefined' || !textEle || !needNativeEllipsisMeasure || !mergedEnableEllipsis) {
|
|
47030
47346
|
return;
|
|
47031
47347
|
}
|
|
47032
47348
|
const observer = new IntersectionObserver(()=>{
|
|
@@ -47037,11 +47353,10 @@ const Base = /*#__PURE__*/ React__namespace.forwardRef((props, ref$1)=>{
|
|
|
47037
47353
|
observer.disconnect();
|
|
47038
47354
|
};
|
|
47039
47355
|
}, [
|
|
47040
|
-
|
|
47356
|
+
needNativeEllipsisMeasure,
|
|
47041
47357
|
mergedEnableEllipsis
|
|
47042
47358
|
]);
|
|
47043
47359
|
// ========================== Tooltip ===========================
|
|
47044
|
-
const tooltipProps = useTooltipProps(ellipsisConfig.tooltip, editConfig.text, children);
|
|
47045
47360
|
const topAriaLabel = React__namespace.useMemo(()=>{
|
|
47046
47361
|
if (!enableEllipsis || cssEllipsis) {
|
|
47047
47362
|
return undefined;
|
|
@@ -47099,7 +47414,7 @@ const Base = /*#__PURE__*/ React__namespace.forwardRef((props, ref$1)=>{
|
|
|
47099
47414
|
const { icon, tooltip, tabIndex } = editConfig;
|
|
47100
47415
|
const editTitle = util.toArray(tooltip)[0] || textLocale?.edit;
|
|
47101
47416
|
const ariaLabel = typeof editTitle === 'string' ? editTitle : '';
|
|
47102
|
-
return triggerType.includes('icon') ? /*#__PURE__*/ React__namespace.createElement(Tooltip
|
|
47417
|
+
return triggerType.includes('icon') ? /*#__PURE__*/ React__namespace.createElement(Tooltip, {
|
|
47103
47418
|
key: "edit",
|
|
47104
47419
|
title: tooltip === false ? '' : editTitle
|
|
47105
47420
|
}, /*#__PURE__*/ React__namespace.createElement("button", {
|
|
@@ -47351,7 +47666,7 @@ const JsonValueTree = ({ data, className, maxHeight = "auto" })=>{
|
|
|
47351
47666
|
flexShrink: 0,
|
|
47352
47667
|
background: "transparent"
|
|
47353
47668
|
}
|
|
47354
|
-
}, /*#__PURE__*/ React.createElement(Tooltip
|
|
47669
|
+
}, /*#__PURE__*/ React.createElement(Tooltip, {
|
|
47355
47670
|
title: "Copy JSON"
|
|
47356
47671
|
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
47357
47672
|
type: "text",
|
|
@@ -47362,7 +47677,7 @@ const JsonValueTree = ({ data, className, maxHeight = "auto" })=>{
|
|
|
47362
47677
|
color: mutedForeground
|
|
47363
47678
|
}),
|
|
47364
47679
|
onClick: handleCopyJson
|
|
47365
|
-
})), /*#__PURE__*/ React.createElement(Tooltip
|
|
47680
|
+
})), /*#__PURE__*/ React.createElement(Tooltip, {
|
|
47366
47681
|
title: isAllExpanded ? "Collapse all" : "Expand all"
|
|
47367
47682
|
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
47368
47683
|
type: "text",
|
|
@@ -47499,7 +47814,7 @@ function valueToTreeNodes(value, path) {
|
|
|
47499
47814
|
const childPath = `${path}.${escapeDotPathSegment(k)}`;
|
|
47500
47815
|
if (v === null || v === undefined || typeof v !== "object") {
|
|
47501
47816
|
const text = `${k}: ${formatJsonTreePrimitive(v)}`;
|
|
47502
|
-
const title = text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip
|
|
47817
|
+
const title = text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip, {
|
|
47503
47818
|
title: text
|
|
47504
47819
|
}, /*#__PURE__*/ React.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text;
|
|
47505
47820
|
return {
|
|
@@ -47520,7 +47835,7 @@ function valueToTreeNodes(value, path) {
|
|
|
47520
47835
|
const text = `${k}: ${formatJsonTreePrimitive(v)}`;
|
|
47521
47836
|
return {
|
|
47522
47837
|
key: childPath,
|
|
47523
|
-
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip
|
|
47838
|
+
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip, {
|
|
47524
47839
|
title: text
|
|
47525
47840
|
}, /*#__PURE__*/ React.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text,
|
|
47526
47841
|
isLeaf: true
|
|
@@ -47531,7 +47846,7 @@ function valueToTreeNodes(value, path) {
|
|
|
47531
47846
|
return [
|
|
47532
47847
|
{
|
|
47533
47848
|
key: path,
|
|
47534
|
-
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip
|
|
47849
|
+
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React.createElement(Tooltip, {
|
|
47535
47850
|
title: text
|
|
47536
47851
|
}, /*#__PURE__*/ React.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text,
|
|
47537
47852
|
isLeaf: true
|
|
@@ -49040,373 +49355,6 @@ const Node$1 = ({ data, id })=>{
|
|
|
49040
49355
|
}
|
|
49041
49356
|
};
|
|
49042
49357
|
|
|
49043
|
-
const TooltipContainer = styled.div`
|
|
49044
|
-
position: relative;
|
|
49045
|
-
display: inline-block;
|
|
49046
|
-
`;
|
|
49047
|
-
const TooltipContent = styled.div`
|
|
49048
|
-
position: absolute;
|
|
49049
|
-
z-index: 1000;
|
|
49050
|
-
padding: 8px 12px;
|
|
49051
|
-
font-weight: 400;
|
|
49052
|
-
background-color: ${({ themeColors })=>themeColors.popover};
|
|
49053
|
-
color: ${({ themeColors })=>themeColors.popoverForeground};
|
|
49054
|
-
border: 1px solid ${({ themeColors })=>themeColors.border};
|
|
49055
|
-
border-radius: 6px;
|
|
49056
|
-
font-size: 12px;
|
|
49057
|
-
line-height: 1.4;
|
|
49058
|
-
white-space: nowrap;
|
|
49059
|
-
box-shadow:
|
|
49060
|
-
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
49061
|
-
0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
49062
|
-
opacity: ${({ isVisible })=>isVisible ? 1 : 0};
|
|
49063
|
-
visibility: ${({ isVisible })=>isVisible ? "visible" : "hidden"};
|
|
49064
|
-
transition:
|
|
49065
|
-
opacity 0.15s ease-in-out,
|
|
49066
|
-
visibility 0.15s ease-in-out;
|
|
49067
|
-
pointer-events: none;
|
|
49068
|
-
|
|
49069
|
-
/* Arrow */
|
|
49070
|
-
&::before {
|
|
49071
|
-
content: "";
|
|
49072
|
-
position: absolute;
|
|
49073
|
-
width: 0;
|
|
49074
|
-
height: 0;
|
|
49075
|
-
border: 4px solid transparent;
|
|
49076
|
-
}
|
|
49077
|
-
|
|
49078
|
-
/* Placement-specific positioning and arrow */
|
|
49079
|
-
${({ placement, themeColors })=>{
|
|
49080
|
-
switch(placement){
|
|
49081
|
-
case "top":
|
|
49082
|
-
return `
|
|
49083
|
-
bottom: 100%;
|
|
49084
|
-
left: 50%;
|
|
49085
|
-
transform: translateX(-50%);
|
|
49086
|
-
margin-bottom: 8px;
|
|
49087
|
-
&::before {
|
|
49088
|
-
top: 100%;
|
|
49089
|
-
left: 50%;
|
|
49090
|
-
transform: translateX(-50%);
|
|
49091
|
-
border-top-color: ${themeColors.border};
|
|
49092
|
-
}
|
|
49093
|
-
&::after {
|
|
49094
|
-
content: "";
|
|
49095
|
-
position: absolute;
|
|
49096
|
-
top: 100%;
|
|
49097
|
-
left: 50%;
|
|
49098
|
-
transform: translateX(-50%);
|
|
49099
|
-
width: 0;
|
|
49100
|
-
height: 0;
|
|
49101
|
-
border: 3px solid transparent;
|
|
49102
|
-
border-top-color: ${themeColors.popover};
|
|
49103
|
-
}
|
|
49104
|
-
`;
|
|
49105
|
-
case "bottom":
|
|
49106
|
-
return `
|
|
49107
|
-
top: 100%;
|
|
49108
|
-
left: 50%;
|
|
49109
|
-
transform: translateX(-50%);
|
|
49110
|
-
margin-top: 8px;
|
|
49111
|
-
&::before {
|
|
49112
|
-
bottom: 100%;
|
|
49113
|
-
left: 50%;
|
|
49114
|
-
transform: translateX(-50%);
|
|
49115
|
-
border-bottom-color: ${themeColors.border};
|
|
49116
|
-
}
|
|
49117
|
-
&::after {
|
|
49118
|
-
content: "";
|
|
49119
|
-
position: absolute;
|
|
49120
|
-
bottom: 100%;
|
|
49121
|
-
left: 50%;
|
|
49122
|
-
transform: translateX(-50%);
|
|
49123
|
-
width: 0;
|
|
49124
|
-
height: 0;
|
|
49125
|
-
border: 3px solid transparent;
|
|
49126
|
-
border-bottom-color: ${themeColors.popover};
|
|
49127
|
-
}
|
|
49128
|
-
`;
|
|
49129
|
-
case "left":
|
|
49130
|
-
return `
|
|
49131
|
-
right: 100%;
|
|
49132
|
-
top: 50%;
|
|
49133
|
-
transform: translateY(-50%);
|
|
49134
|
-
margin-right: 8px;
|
|
49135
|
-
&::before {
|
|
49136
|
-
left: 100%;
|
|
49137
|
-
top: 50%;
|
|
49138
|
-
transform: translateY(-50%);
|
|
49139
|
-
border-left-color: ${themeColors.border};
|
|
49140
|
-
}
|
|
49141
|
-
&::after {
|
|
49142
|
-
content: "";
|
|
49143
|
-
position: absolute;
|
|
49144
|
-
left: 100%;
|
|
49145
|
-
top: 50%;
|
|
49146
|
-
transform: translateY(-50%);
|
|
49147
|
-
width: 0;
|
|
49148
|
-
height: 0;
|
|
49149
|
-
border: 3px solid transparent;
|
|
49150
|
-
border-left-color: ${themeColors.popover};
|
|
49151
|
-
}
|
|
49152
|
-
`;
|
|
49153
|
-
case "right":
|
|
49154
|
-
return `
|
|
49155
|
-
left: 100%;
|
|
49156
|
-
top: 50%;
|
|
49157
|
-
transform: translateY(-50%);
|
|
49158
|
-
margin-left: 8px;
|
|
49159
|
-
&::before {
|
|
49160
|
-
right: 100%;
|
|
49161
|
-
top: 50%;
|
|
49162
|
-
transform: translateY(-50%);
|
|
49163
|
-
border-right-color: ${themeColors.border};
|
|
49164
|
-
}
|
|
49165
|
-
&::after {
|
|
49166
|
-
content: "";
|
|
49167
|
-
position: absolute;
|
|
49168
|
-
right: 100%;
|
|
49169
|
-
top: 50%;
|
|
49170
|
-
transform: translateY(-50%);
|
|
49171
|
-
width: 0;
|
|
49172
|
-
height: 0;
|
|
49173
|
-
border: 3px solid transparent;
|
|
49174
|
-
border-right-color: ${themeColors.popover};
|
|
49175
|
-
}
|
|
49176
|
-
`;
|
|
49177
|
-
case "topLeft":
|
|
49178
|
-
return `
|
|
49179
|
-
bottom: 100%;
|
|
49180
|
-
right: 0;
|
|
49181
|
-
margin-bottom: 8px;
|
|
49182
|
-
&::before {
|
|
49183
|
-
top: 100%;
|
|
49184
|
-
right: 8px;
|
|
49185
|
-
border-top-color: ${themeColors.border};
|
|
49186
|
-
}
|
|
49187
|
-
&::after {
|
|
49188
|
-
content: "";
|
|
49189
|
-
position: absolute;
|
|
49190
|
-
top: 100%;
|
|
49191
|
-
right: 8px;
|
|
49192
|
-
width: 0;
|
|
49193
|
-
height: 0;
|
|
49194
|
-
border: 3px solid transparent;
|
|
49195
|
-
border-top-color: ${themeColors.popover};
|
|
49196
|
-
}
|
|
49197
|
-
`;
|
|
49198
|
-
case "topRight":
|
|
49199
|
-
return `
|
|
49200
|
-
bottom: 100%;
|
|
49201
|
-
left: 0;
|
|
49202
|
-
margin-bottom: 8px;
|
|
49203
|
-
&::before {
|
|
49204
|
-
top: 100%;
|
|
49205
|
-
left: 8px;
|
|
49206
|
-
border-top-color: ${themeColors.border};
|
|
49207
|
-
}
|
|
49208
|
-
&::after {
|
|
49209
|
-
content: "";
|
|
49210
|
-
position: absolute;
|
|
49211
|
-
top: 100%;
|
|
49212
|
-
left: 8px;
|
|
49213
|
-
width: 0;
|
|
49214
|
-
height: 0;
|
|
49215
|
-
border: 3px solid transparent;
|
|
49216
|
-
border-top-color: ${themeColors.popover};
|
|
49217
|
-
}
|
|
49218
|
-
`;
|
|
49219
|
-
case "bottomLeft":
|
|
49220
|
-
return `
|
|
49221
|
-
top: 100%;
|
|
49222
|
-
right: 0;
|
|
49223
|
-
margin-top: 8px;
|
|
49224
|
-
&::before {
|
|
49225
|
-
bottom: 100%;
|
|
49226
|
-
right: 8px;
|
|
49227
|
-
border-bottom-color: ${themeColors.border};
|
|
49228
|
-
}
|
|
49229
|
-
&::after {
|
|
49230
|
-
content: "";
|
|
49231
|
-
position: absolute;
|
|
49232
|
-
bottom: 100%;
|
|
49233
|
-
right: 8px;
|
|
49234
|
-
width: 0;
|
|
49235
|
-
height: 0;
|
|
49236
|
-
border: 3px solid transparent;
|
|
49237
|
-
border-bottom-color: ${themeColors.popover};
|
|
49238
|
-
}
|
|
49239
|
-
`;
|
|
49240
|
-
case "bottomRight":
|
|
49241
|
-
return `
|
|
49242
|
-
top: 100%;
|
|
49243
|
-
left: 0;
|
|
49244
|
-
margin-top: 8px;
|
|
49245
|
-
&::before {
|
|
49246
|
-
bottom: 100%;
|
|
49247
|
-
left: 8px;
|
|
49248
|
-
border-bottom-color: ${themeColors.border};
|
|
49249
|
-
}
|
|
49250
|
-
&::after {
|
|
49251
|
-
content: "";
|
|
49252
|
-
position: absolute;
|
|
49253
|
-
bottom: 100%;
|
|
49254
|
-
left: 8px;
|
|
49255
|
-
width: 0;
|
|
49256
|
-
height: 0;
|
|
49257
|
-
border: 3px solid transparent;
|
|
49258
|
-
border-bottom-color: ${themeColors.popover};
|
|
49259
|
-
}
|
|
49260
|
-
`;
|
|
49261
|
-
case "leftTop":
|
|
49262
|
-
return `
|
|
49263
|
-
right: 100%;
|
|
49264
|
-
bottom: 0;
|
|
49265
|
-
margin-right: 8px;
|
|
49266
|
-
&::before {
|
|
49267
|
-
left: 100%;
|
|
49268
|
-
bottom: 8px;
|
|
49269
|
-
border-left-color: ${themeColors.border};
|
|
49270
|
-
}
|
|
49271
|
-
&::after {
|
|
49272
|
-
content: "";
|
|
49273
|
-
position: absolute;
|
|
49274
|
-
left: 100%;
|
|
49275
|
-
bottom: 8px;
|
|
49276
|
-
width: 0;
|
|
49277
|
-
height: 0;
|
|
49278
|
-
border: 3px solid transparent;
|
|
49279
|
-
border-left-color: ${themeColors.popover};
|
|
49280
|
-
}
|
|
49281
|
-
`;
|
|
49282
|
-
case "leftBottom":
|
|
49283
|
-
return `
|
|
49284
|
-
right: 100%;
|
|
49285
|
-
top: 0;
|
|
49286
|
-
margin-right: 8px;
|
|
49287
|
-
&::before {
|
|
49288
|
-
left: 100%;
|
|
49289
|
-
top: 8px;
|
|
49290
|
-
border-left-color: ${themeColors.border};
|
|
49291
|
-
}
|
|
49292
|
-
&::after {
|
|
49293
|
-
content: "";
|
|
49294
|
-
position: absolute;
|
|
49295
|
-
left: 100%;
|
|
49296
|
-
top: 8px;
|
|
49297
|
-
width: 0;
|
|
49298
|
-
height: 0;
|
|
49299
|
-
border: 3px solid transparent;
|
|
49300
|
-
border-left-color: ${themeColors.popover};
|
|
49301
|
-
}
|
|
49302
|
-
`;
|
|
49303
|
-
case "rightTop":
|
|
49304
|
-
return `
|
|
49305
|
-
left: 100%;
|
|
49306
|
-
bottom: 0;
|
|
49307
|
-
margin-left: 8px;
|
|
49308
|
-
&::before {
|
|
49309
|
-
right: 100%;
|
|
49310
|
-
bottom: 8px;
|
|
49311
|
-
border-right-color: ${themeColors.border};
|
|
49312
|
-
}
|
|
49313
|
-
&::after {
|
|
49314
|
-
content: "";
|
|
49315
|
-
position: absolute;
|
|
49316
|
-
right: 100%;
|
|
49317
|
-
bottom: 8px;
|
|
49318
|
-
width: 0;
|
|
49319
|
-
height: 0;
|
|
49320
|
-
border: 3px solid transparent;
|
|
49321
|
-
border-right-color: ${themeColors.popover};
|
|
49322
|
-
}
|
|
49323
|
-
`;
|
|
49324
|
-
case "rightBottom":
|
|
49325
|
-
return `
|
|
49326
|
-
left: 100%;
|
|
49327
|
-
top: 0;
|
|
49328
|
-
margin-left: 8px;
|
|
49329
|
-
&::before {
|
|
49330
|
-
right: 100%;
|
|
49331
|
-
top: 8px;
|
|
49332
|
-
border-right-color: ${themeColors.border};
|
|
49333
|
-
}
|
|
49334
|
-
&::after {
|
|
49335
|
-
content: "";
|
|
49336
|
-
position: absolute;
|
|
49337
|
-
right: 100%;
|
|
49338
|
-
top: 8px;
|
|
49339
|
-
width: 0;
|
|
49340
|
-
height: 0;
|
|
49341
|
-
border: 3px solid transparent;
|
|
49342
|
-
border-right-color: ${themeColors.popover};
|
|
49343
|
-
}
|
|
49344
|
-
`;
|
|
49345
|
-
default:
|
|
49346
|
-
return `
|
|
49347
|
-
bottom: 100%;
|
|
49348
|
-
left: 50%;
|
|
49349
|
-
transform: translateX(-50%);
|
|
49350
|
-
margin-bottom: 8px;
|
|
49351
|
-
&::before {
|
|
49352
|
-
top: 100%;
|
|
49353
|
-
left: 50%;
|
|
49354
|
-
transform: translateX(-50%);
|
|
49355
|
-
border-top-color: ${themeColors.border};
|
|
49356
|
-
}
|
|
49357
|
-
&::after {
|
|
49358
|
-
content: "";
|
|
49359
|
-
position: absolute;
|
|
49360
|
-
top: 100%;
|
|
49361
|
-
left: 50%;
|
|
49362
|
-
transform: translateX(-50%);
|
|
49363
|
-
width: 0;
|
|
49364
|
-
height: 0;
|
|
49365
|
-
border: 3px solid transparent;
|
|
49366
|
-
border-top-color: ${themeColors.popover};
|
|
49367
|
-
}
|
|
49368
|
-
`;
|
|
49369
|
-
}
|
|
49370
|
-
}}
|
|
49371
|
-
`;
|
|
49372
|
-
const Tooltip = ({ children, content, placement = "top", delay = 300 })=>{
|
|
49373
|
-
const { theme } = useTheme$1();
|
|
49374
|
-
const [isVisible, setIsVisible] = React__namespace.useState(false);
|
|
49375
|
-
const timeoutRef = React__namespace.useRef();
|
|
49376
|
-
const showTooltip = ()=>{
|
|
49377
|
-
if (timeoutRef.current) {
|
|
49378
|
-
clearTimeout(timeoutRef.current);
|
|
49379
|
-
}
|
|
49380
|
-
timeoutRef.current = setTimeout(()=>{
|
|
49381
|
-
setIsVisible(true);
|
|
49382
|
-
}, delay);
|
|
49383
|
-
};
|
|
49384
|
-
const hideTooltip = ()=>{
|
|
49385
|
-
if (timeoutRef.current) {
|
|
49386
|
-
clearTimeout(timeoutRef.current);
|
|
49387
|
-
}
|
|
49388
|
-
setIsVisible(false);
|
|
49389
|
-
};
|
|
49390
|
-
React__namespace.useEffect(()=>{
|
|
49391
|
-
return ()=>{
|
|
49392
|
-
if (timeoutRef.current) {
|
|
49393
|
-
clearTimeout(timeoutRef.current);
|
|
49394
|
-
}
|
|
49395
|
-
};
|
|
49396
|
-
}, []);
|
|
49397
|
-
return /*#__PURE__*/ React__namespace.createElement(TooltipContainer, {
|
|
49398
|
-
onMouseEnter: showTooltip,
|
|
49399
|
-
onMouseLeave: hideTooltip,
|
|
49400
|
-
onFocus: showTooltip,
|
|
49401
|
-
onBlur: hideTooltip
|
|
49402
|
-
}, children, /*#__PURE__*/ React__namespace.createElement(TooltipContent, {
|
|
49403
|
-
isVisible: isVisible,
|
|
49404
|
-
placement: placement,
|
|
49405
|
-
themeColors: theme.colors,
|
|
49406
|
-
role: "tooltip"
|
|
49407
|
-
}, content));
|
|
49408
|
-
};
|
|
49409
|
-
|
|
49410
49358
|
const BadgeContainer = styled.div`
|
|
49411
49359
|
display: inline-flex;
|
|
49412
49360
|
align-items: center;
|
|
@@ -49527,8 +49475,9 @@ const Badge = ({ variant = "default", children, title, placement = "top" })=>{
|
|
|
49527
49475
|
}, children);
|
|
49528
49476
|
if (title) {
|
|
49529
49477
|
return /*#__PURE__*/ React__namespace.createElement(Tooltip, {
|
|
49530
|
-
|
|
49531
|
-
placement: placement
|
|
49478
|
+
title: title,
|
|
49479
|
+
placement: placement,
|
|
49480
|
+
mouseEnterDelay: 0.3
|
|
49532
49481
|
}, badgeContent);
|
|
49533
49482
|
}
|
|
49534
49483
|
return badgeContent;
|
|
@@ -112345,7 +112294,115 @@ class ErrorBoundary extends React.Component {
|
|
|
112345
112294
|
}
|
|
112346
112295
|
}
|
|
112347
112296
|
|
|
112297
|
+
const shieldPulse = keyframes`
|
|
112298
|
+
0%,
|
|
112299
|
+
100% {
|
|
112300
|
+
opacity: 1;
|
|
112301
|
+
transform: scale(1);
|
|
112302
|
+
}
|
|
112303
|
+
50% {
|
|
112304
|
+
opacity: 0.55;
|
|
112305
|
+
transform: scale(1.28);
|
|
112306
|
+
}
|
|
112307
|
+
`;
|
|
112308
|
+
const ShieldTrigger = styled.span`
|
|
112309
|
+
display: inline-flex;
|
|
112310
|
+
align-items: center;
|
|
112311
|
+
color: ${(p)=>p.$color};
|
|
112312
|
+
animation: ${shieldPulse} 1.35s ease-in-out infinite;
|
|
112313
|
+
`;
|
|
112314
|
+
const GuardrailsPopover = ({ guardrails, title = "Guardrails", placement = "right", trigger = "hover", shieldSize = 16, shieldStrokeWidth = 2.5, ariaLabel = "Guardrails applied" })=>{
|
|
112315
|
+
const { theme, isDarkMode } = useTheme$1();
|
|
112316
|
+
/** Light: semantic destructive; dark: same hue at higher lightness so the icon stays visible on dark surfaces */ const shieldColor = isDarkMode ? theme.colors.tagJudge?.color ?? theme.colors.destructive : theme.colors.destructive;
|
|
112317
|
+
if (!guardrails?.length) {
|
|
112318
|
+
return null;
|
|
112319
|
+
}
|
|
112320
|
+
const content = /*#__PURE__*/ React.createElement("div", {
|
|
112321
|
+
style: {
|
|
112322
|
+
color: theme.colors.foreground
|
|
112323
|
+
}
|
|
112324
|
+
}, /*#__PURE__*/ React.createElement(Card, {
|
|
112325
|
+
title: title,
|
|
112326
|
+
size: "small",
|
|
112327
|
+
style: {
|
|
112328
|
+
maxWidth: 380
|
|
112329
|
+
},
|
|
112330
|
+
styles: {
|
|
112331
|
+
body: {
|
|
112332
|
+
padding: 0
|
|
112333
|
+
}
|
|
112334
|
+
}
|
|
112335
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
112336
|
+
style: {
|
|
112337
|
+
display: "flex",
|
|
112338
|
+
flexDirection: "column",
|
|
112339
|
+
gap: 8
|
|
112340
|
+
}
|
|
112341
|
+
}, guardrails.map((guardrail, index)=>/*#__PURE__*/ React.createElement(Card, {
|
|
112342
|
+
key: `${guardrail.rail_name}-${guardrail.phase}-${index}`,
|
|
112343
|
+
type: "inner",
|
|
112344
|
+
title: guardrail.rail_name,
|
|
112345
|
+
size: "small",
|
|
112346
|
+
styles: {
|
|
112347
|
+
body: {
|
|
112348
|
+
padding: 12
|
|
112349
|
+
}
|
|
112350
|
+
}
|
|
112351
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
112352
|
+
style: {
|
|
112353
|
+
display: "flex",
|
|
112354
|
+
flexDirection: "column",
|
|
112355
|
+
gap: 6
|
|
112356
|
+
}
|
|
112357
|
+
}, /*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement("strong", null, "Phase:"), " ", guardrail.phase), /*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement("strong", null, "Action:"), " ", guardrail.action), /*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement("strong", null, "Reason:"), " ", guardrail.reason ?? "N/A"), guardrail.meta != null && /*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement("strong", null, "Meta:"), /*#__PURE__*/ React.createElement("div", {
|
|
112358
|
+
style: {
|
|
112359
|
+
marginTop: 4,
|
|
112360
|
+
maxWidth: "100%"
|
|
112361
|
+
}
|
|
112362
|
+
}, /*#__PURE__*/ React.createElement(JsonValueTree, {
|
|
112363
|
+
data: guardrail.meta,
|
|
112364
|
+
maxHeight: 240
|
|
112365
|
+
})))))))));
|
|
112366
|
+
return /*#__PURE__*/ React.createElement(Popover, {
|
|
112367
|
+
content: content,
|
|
112368
|
+
placement: placement,
|
|
112369
|
+
trigger: trigger,
|
|
112370
|
+
styles: {
|
|
112371
|
+
container: {
|
|
112372
|
+
padding: 0
|
|
112373
|
+
},
|
|
112374
|
+
content: {
|
|
112375
|
+
padding: 0
|
|
112376
|
+
}
|
|
112377
|
+
}
|
|
112378
|
+
}, /*#__PURE__*/ React.createElement(ShieldTrigger, {
|
|
112379
|
+
$color: shieldColor,
|
|
112380
|
+
onClick: (event)=>event.stopPropagation()
|
|
112381
|
+
}, /*#__PURE__*/ React.createElement(Shield, {
|
|
112382
|
+
size: shieldSize,
|
|
112383
|
+
strokeWidth: shieldStrokeWidth,
|
|
112384
|
+
color: "currentColor",
|
|
112385
|
+
"aria-label": ariaLabel
|
|
112386
|
+
})));
|
|
112387
|
+
};
|
|
112388
|
+
|
|
112348
112389
|
const getNodeLatency = (node)=>node.details?.internals?.latency?.total_time ?? 0;
|
|
112390
|
+
const SessionTreeNodeTitle = ({ displayName, subtreeLatency, guardrails })=>{
|
|
112391
|
+
return /*#__PURE__*/ React.createElement("span", {
|
|
112392
|
+
style: {
|
|
112393
|
+
display: "flex",
|
|
112394
|
+
alignItems: "center",
|
|
112395
|
+
gap: 8
|
|
112396
|
+
}
|
|
112397
|
+
}, /*#__PURE__*/ React.createElement("span", null, displayName), /*#__PURE__*/ React.createElement(GuardrailsPopover, {
|
|
112398
|
+
guardrails: guardrails
|
|
112399
|
+
}), subtreeLatency > 0 && /*#__PURE__*/ React.createElement(Tag, {
|
|
112400
|
+
style: {
|
|
112401
|
+
fontSize: 11,
|
|
112402
|
+
margin: 0
|
|
112403
|
+
}
|
|
112404
|
+
}, formatLatency(subtreeLatency)));
|
|
112405
|
+
};
|
|
112349
112406
|
/** Tool/agent failure is carried on the incoming edge's details.status (e.g. Failed), same as flow edges and session I/O. */ function isNodeFailureFromIncomingEdge(run, nodeId) {
|
|
112350
112407
|
const incoming = run.edges?.filter((e)=>e.target === nodeId) ?? [];
|
|
112351
112408
|
const status = incoming[0]?.details?.status;
|
|
@@ -112459,6 +112516,7 @@ const buildNodeTree = (run)=>{
|
|
|
112459
112516
|
const children = childIds.map((id)=>nodeMap.get(id)).filter((n)=>n != null).sort((a, b)=>(a.stamp?.step ?? 0) - (b.stamp?.step ?? 0)).map(buildTreeNode);
|
|
112460
112517
|
const childLatency = children.reduce((s, c)=>s + (c.subtreeLatency ?? 0), 0);
|
|
112461
112518
|
const subtreeLatency = getNodeLatency(node) + childLatency;
|
|
112519
|
+
const guardrails = node.details?.internals?.guard_details ?? [];
|
|
112462
112520
|
const isTool = node.node_type === "Tool";
|
|
112463
112521
|
const failed = isNodeFailureFromIncomingEdge(run, node.identifier);
|
|
112464
112522
|
const iconBg = failed ? "#ff4d4f" : isTool ? "#1890ff" : "#52c41a";
|
|
@@ -112479,18 +112537,11 @@ const buildNodeTree = (run)=>{
|
|
|
112479
112537
|
}));
|
|
112480
112538
|
return {
|
|
112481
112539
|
key: nodeKey,
|
|
112482
|
-
title: /*#__PURE__*/ React.createElement(
|
|
112483
|
-
|
|
112484
|
-
|
|
112485
|
-
|
|
112486
|
-
|
|
112487
|
-
}
|
|
112488
|
-
}, /*#__PURE__*/ React.createElement("span", null, displayName), subtreeLatency > 0 && /*#__PURE__*/ React.createElement(Tag, {
|
|
112489
|
-
style: {
|
|
112490
|
-
fontSize: 11,
|
|
112491
|
-
margin: 0
|
|
112492
|
-
}
|
|
112493
|
-
}, formatLatency(subtreeLatency))),
|
|
112540
|
+
title: /*#__PURE__*/ React.createElement(SessionTreeNodeTitle, {
|
|
112541
|
+
displayName: displayName,
|
|
112542
|
+
subtreeLatency: subtreeLatency,
|
|
112543
|
+
guardrails: guardrails
|
|
112544
|
+
}),
|
|
112494
112545
|
icon,
|
|
112495
112546
|
children: children.length > 0 ? children : undefined,
|
|
112496
112547
|
isLeaf: children.length === 0,
|
|
@@ -112555,6 +112606,10 @@ const SessionTree = ({ session, selectedNodeKey, onSelectNode })=>{
|
|
|
112555
112606
|
}), /*#__PURE__*/ React.createElement("style", null, `
|
|
112556
112607
|
.session-details-tree {
|
|
112557
112608
|
background-color: transparent;
|
|
112609
|
+
color: inherit;
|
|
112610
|
+
}
|
|
112611
|
+
.session-details-tree .ant-tree-title {
|
|
112612
|
+
color: inherit;
|
|
112558
112613
|
}
|
|
112559
112614
|
.session-details-tree .ant-tree-node-content-wrapper {
|
|
112560
112615
|
display: flex;
|
|
@@ -112960,7 +113015,7 @@ const SessionDetails = ({ session, open, onClose, initialNodeId, initialRunId, l
|
|
|
112960
113015
|
size: "small"
|
|
112961
113016
|
})), /*#__PURE__*/ React.createElement(Divider, {
|
|
112962
113017
|
type: "vertical"
|
|
112963
|
-
}), /*#__PURE__*/ React.createElement(Tooltip
|
|
113018
|
+
}), /*#__PURE__*/ React.createElement(Tooltip, {
|
|
112964
113019
|
title: "Show Session Details"
|
|
112965
113020
|
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
112966
113021
|
type: "text",
|
|
@@ -112969,7 +113024,7 @@ const SessionDetails = ({ session, open, onClose, initialNodeId, initialRunId, l
|
|
|
112969
113024
|
}),
|
|
112970
113025
|
onClick: ()=>setIsFullScreen(false),
|
|
112971
113026
|
disabled: !session?.session_id
|
|
112972
|
-
}, "Session Details"))) : /*#__PURE__*/ React.createElement(Tooltip
|
|
113027
|
+
}, "Session Details"))) : /*#__PURE__*/ React.createElement(Tooltip, {
|
|
112973
113028
|
title: "Open Visualizer"
|
|
112974
113029
|
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
112975
113030
|
type: "text",
|
|
@@ -112980,7 +113035,7 @@ const SessionDetails = ({ session, open, onClose, initialNodeId, initialRunId, l
|
|
|
112980
113035
|
disabled: !session?.session_id
|
|
112981
113036
|
}, "Visualizer")), /*#__PURE__*/ React.createElement(Divider, {
|
|
112982
113037
|
type: "vertical"
|
|
112983
|
-
}), /*#__PURE__*/ React.createElement(Tooltip
|
|
113038
|
+
}), /*#__PURE__*/ React.createElement(Tooltip, {
|
|
112984
113039
|
title: "Copy Session ID to Clipboard"
|
|
112985
113040
|
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
112986
113041
|
type: "text",
|
|
@@ -112989,7 +113044,7 @@ const SessionDetails = ({ session, open, onClose, initialNodeId, initialRunId, l
|
|
|
112989
113044
|
}),
|
|
112990
113045
|
onClick: handleCopyId,
|
|
112991
113046
|
disabled: !session?.session_id
|
|
112992
|
-
})), /*#__PURE__*/ React.createElement(Tooltip
|
|
113047
|
+
})), /*#__PURE__*/ React.createElement(Tooltip, {
|
|
112993
113048
|
title: "Coming Soon!"
|
|
112994
113049
|
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
112995
113050
|
type: "text",
|
|
@@ -113709,7 +113764,7 @@ const EvaluationsCompareDrawer = ({ open, onClose, evaluationId1, evaluationId2,
|
|
|
113709
113764
|
display: "flex",
|
|
113710
113765
|
gap: 8
|
|
113711
113766
|
}
|
|
113712
|
-
}, /*#__PURE__*/ React.createElement(Tooltip
|
|
113767
|
+
}, /*#__PURE__*/ React.createElement(Tooltip, {
|
|
113713
113768
|
title: "Copy IDs to Clipboard"
|
|
113714
113769
|
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
113715
113770
|
type: "text",
|
|
@@ -113718,7 +113773,7 @@ const EvaluationsCompareDrawer = ({ open, onClose, evaluationId1, evaluationId2,
|
|
|
113718
113773
|
}),
|
|
113719
113774
|
onClick: handleCopyIds,
|
|
113720
113775
|
disabled: !evaluationId1 || !evaluationId2
|
|
113721
|
-
})), /*#__PURE__*/ React.createElement(Tooltip
|
|
113776
|
+
})), /*#__PURE__*/ React.createElement(Tooltip, {
|
|
113722
113777
|
title: "Share"
|
|
113723
113778
|
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
113724
113779
|
type: "text",
|
|
@@ -113780,7 +113835,7 @@ const EvaluationDetailsDrawer = ({ evaluation, open, onClose, getEvaluatorResult
|
|
|
113780
113835
|
gap: 4,
|
|
113781
113836
|
justifyContent: "space-between"
|
|
113782
113837
|
}
|
|
113783
|
-
}, /*#__PURE__*/ React.createElement("span", null, normalizedEvaluation.name || "Evaluation Details"), normalizedEvaluation.completed_at && /*#__PURE__*/ React.createElement(Tooltip
|
|
113838
|
+
}, /*#__PURE__*/ React.createElement("span", null, normalizedEvaluation.name || "Evaluation Details"), normalizedEvaluation.completed_at && /*#__PURE__*/ React.createElement(Tooltip, {
|
|
113784
113839
|
title: formatDateFriendly(normalizedEvaluation.completed_at),
|
|
113785
113840
|
getPopupContainer: ()=>document.body
|
|
113786
113841
|
}, /*#__PURE__*/ React.createElement("span", {
|
|
@@ -113971,7 +114026,7 @@ const EvaluationDetailsDrawer = ({ evaluation, open, onClose, getEvaluatorResult
|
|
|
113971
114026
|
key: metric.sha || `${metric.name}-${i}`,
|
|
113972
114027
|
style: tagStyle
|
|
113973
114028
|
}, metric.name);
|
|
113974
|
-
return metric.description ? /*#__PURE__*/ React.createElement(Tooltip
|
|
114029
|
+
return metric.description ? /*#__PURE__*/ React.createElement(Tooltip, {
|
|
113975
114030
|
key: metric.sha || `${metric.name}-${i}`,
|
|
113976
114031
|
title: metric.description,
|
|
113977
114032
|
getPopupContainer: ()=>document.body
|
|
@@ -114234,7 +114289,7 @@ const EvaluationsTable = ({ evaluations, loading = false, error = null, onRefres
|
|
|
114234
114289
|
const bVal = b.completed_at ? moment(b.completed_at).unix() : 0;
|
|
114235
114290
|
return aVal - bVal;
|
|
114236
114291
|
},
|
|
114237
|
-
render: (completedAt)=>completedAt ? /*#__PURE__*/ React.createElement(Tooltip
|
|
114292
|
+
render: (completedAt)=>completedAt ? /*#__PURE__*/ React.createElement(Tooltip, {
|
|
114238
114293
|
title: completedAt
|
|
114239
114294
|
}, /*#__PURE__*/ React.createElement("span", null, formatDateShort(completedAt))) : "-"
|
|
114240
114295
|
},
|
|
@@ -114709,7 +114764,7 @@ function resolvePath(to, fromPathname = "/") {
|
|
|
114709
114764
|
let { pathname: toPathname, search = "", hash = "" } = typeof to === "string" ? parsePath(to) : to;
|
|
114710
114765
|
let pathname;
|
|
114711
114766
|
if (toPathname) {
|
|
114712
|
-
toPathname = toPathname
|
|
114767
|
+
toPathname = removeDoubleSlashes(toPathname);
|
|
114713
114768
|
if (toPathname.startsWith("/")) {
|
|
114714
114769
|
pathname = resolvePathname(toPathname.substring(1), "/");
|
|
114715
114770
|
} else {
|
|
@@ -114725,7 +114780,7 @@ function resolvePath(to, fromPathname = "/") {
|
|
|
114725
114780
|
};
|
|
114726
114781
|
}
|
|
114727
114782
|
function resolvePathname(relativePath, fromPathname) {
|
|
114728
|
-
let segments = fromPathname
|
|
114783
|
+
let segments = removeTrailingSlash(fromPathname).split("/");
|
|
114729
114784
|
let relativeSegments = relativePath.split("/");
|
|
114730
114785
|
relativeSegments.forEach((segment)=>{
|
|
114731
114786
|
if (segment === "..") {
|
|
@@ -114783,8 +114838,10 @@ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = fal
|
|
|
114783
114838
|
}
|
|
114784
114839
|
return path;
|
|
114785
114840
|
}
|
|
114786
|
-
var
|
|
114787
|
-
var
|
|
114841
|
+
var removeDoubleSlashes = (path)=>path.replace(/\/\/+/g, "/");
|
|
114842
|
+
var joinPaths = (paths)=>removeDoubleSlashes(paths.join("/"));
|
|
114843
|
+
var removeTrailingSlash = (path)=>path.replace(/\/+$/, "");
|
|
114844
|
+
var normalizePathname = (pathname)=>removeTrailingSlash(pathname).replace(/^\/*/, "/");
|
|
114788
114845
|
var normalizeSearch = (search)=>!search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
|
|
114789
114846
|
var normalizeHash = (hash)=>!hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
|
|
114790
114847
|
var ErrorResponseImpl = class {
|
|
@@ -114804,7 +114861,8 @@ function isRouteErrorResponse(error) {
|
|
|
114804
114861
|
return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
|
|
114805
114862
|
}
|
|
114806
114863
|
function getRoutePattern(matches) {
|
|
114807
|
-
|
|
114864
|
+
let parts = matches.map((m)=>m.route.path).filter(Boolean);
|
|
114865
|
+
return joinPaths(parts) || "/";
|
|
114808
114866
|
}
|
|
114809
114867
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
114810
114868
|
function parseToInfo(_to, basename) {
|
|
@@ -114857,6 +114915,9 @@ DataRouterContext.displayName = "DataRouter";
|
|
|
114857
114915
|
var DataRouterStateContext = React__namespace.createContext(null);
|
|
114858
114916
|
DataRouterStateContext.displayName = "DataRouterState";
|
|
114859
114917
|
var RSCRouterContext = React__namespace.createContext(false);
|
|
114918
|
+
function useIsRSCRouterContext() {
|
|
114919
|
+
return React__namespace.useContext(RSCRouterContext);
|
|
114920
|
+
}
|
|
114860
114921
|
var ViewTransitionContext = React__namespace.createContext({
|
|
114861
114922
|
isTransitioning: false
|
|
114862
114923
|
});
|
|
@@ -115033,18 +115094,18 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
115033
115094
|
pathname: joinPaths([
|
|
115034
115095
|
parentPathnameBase,
|
|
115035
115096
|
// Re-encode pathnames that were decoded inside matchRoutes.
|
|
115036
|
-
// Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
|
|
115097
|
+
// Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses
|
|
115037
115098
|
// `new URL()` internally and we need to prevent it from treating
|
|
115038
115099
|
// them as separators
|
|
115039
|
-
navigator.encodeLocation ? navigator.encodeLocation(match.pathname.replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathname
|
|
115100
|
+
navigator.encodeLocation ? navigator.encodeLocation(match.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathname
|
|
115040
115101
|
]),
|
|
115041
115102
|
pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : joinPaths([
|
|
115042
115103
|
parentPathnameBase,
|
|
115043
115104
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
115044
|
-
// Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
|
|
115105
|
+
// Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses
|
|
115045
115106
|
// `new URL()` internally and we need to prevent it from treating
|
|
115046
115107
|
// them as separators
|
|
115047
|
-
navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase.replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathnameBase
|
|
115108
|
+
navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathnameBase
|
|
115048
115109
|
])
|
|
115049
115110
|
})), parentMatches, dataRouterOpts);
|
|
115050
115111
|
return renderedMatches;
|
|
@@ -115511,9 +115572,9 @@ function singleFetchUrl(reqUrl, basename, trailingSlashAware, extension) {
|
|
|
115511
115572
|
if (url.pathname === "/") {
|
|
115512
115573
|
url.pathname = `_root.${extension}`;
|
|
115513
115574
|
} else if (basename && stripBasename(url.pathname, basename) === "/") {
|
|
115514
|
-
url.pathname = `${basename
|
|
115575
|
+
url.pathname = `${removeTrailingSlash(basename)}/_root.${extension}`;
|
|
115515
115576
|
} else {
|
|
115516
|
-
url.pathname = `${url.pathname
|
|
115577
|
+
url.pathname = `${removeTrailingSlash(url.pathname)}.${extension}`;
|
|
115517
115578
|
}
|
|
115518
115579
|
}
|
|
115519
115580
|
return url;
|
|
@@ -115754,6 +115815,7 @@ function composeEventHandlers(theirHandler, ourHandler) {
|
|
|
115754
115815
|
};
|
|
115755
115816
|
}
|
|
115756
115817
|
function PrefetchPageLinks({ page, ...linkProps }) {
|
|
115818
|
+
let rsc = useIsRSCRouterContext();
|
|
115757
115819
|
let { router } = useDataRouterContext2();
|
|
115758
115820
|
let matches = React__namespace.useMemo(()=>matchRoutes(router.routes, page, router.basename), [
|
|
115759
115821
|
router.routes,
|
|
@@ -115763,6 +115825,13 @@ function PrefetchPageLinks({ page, ...linkProps }) {
|
|
|
115763
115825
|
if (!matches) {
|
|
115764
115826
|
return null;
|
|
115765
115827
|
}
|
|
115828
|
+
if (rsc) {
|
|
115829
|
+
return /* @__PURE__ */ React__namespace.createElement(RSCPrefetchPageLinksImpl, {
|
|
115830
|
+
page,
|
|
115831
|
+
matches,
|
|
115832
|
+
...linkProps
|
|
115833
|
+
});
|
|
115834
|
+
}
|
|
115766
115835
|
return /* @__PURE__ */ React__namespace.createElement(PrefetchPageLinksImpl, {
|
|
115767
115836
|
page,
|
|
115768
115837
|
matches,
|
|
@@ -115789,6 +115858,45 @@ function useKeyedPrefetchLinks(matches) {
|
|
|
115789
115858
|
]);
|
|
115790
115859
|
return keyedPrefetchLinks;
|
|
115791
115860
|
}
|
|
115861
|
+
function RSCPrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {
|
|
115862
|
+
let location = useLocation();
|
|
115863
|
+
let { future } = useFrameworkContext();
|
|
115864
|
+
let { basename } = useDataRouterContext2();
|
|
115865
|
+
let dataHrefs = React__namespace.useMemo(()=>{
|
|
115866
|
+
if (page === location.pathname + location.search + location.hash) {
|
|
115867
|
+
return [];
|
|
115868
|
+
}
|
|
115869
|
+
let url = singleFetchUrl(page, basename, future.unstable_trailingSlashAwareDataRequests, "rsc");
|
|
115870
|
+
let hasSomeRoutesWithShouldRevalidate = false;
|
|
115871
|
+
let targetRoutes = [];
|
|
115872
|
+
for (let match of nextMatches){
|
|
115873
|
+
if (typeof match.route.shouldRevalidate === "function") {
|
|
115874
|
+
hasSomeRoutesWithShouldRevalidate = true;
|
|
115875
|
+
} else {
|
|
115876
|
+
targetRoutes.push(match.route.id);
|
|
115877
|
+
}
|
|
115878
|
+
}
|
|
115879
|
+
if (hasSomeRoutesWithShouldRevalidate && targetRoutes.length > 0) {
|
|
115880
|
+
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
115881
|
+
}
|
|
115882
|
+
return [
|
|
115883
|
+
url.pathname + url.search
|
|
115884
|
+
];
|
|
115885
|
+
}, [
|
|
115886
|
+
basename,
|
|
115887
|
+
future.unstable_trailingSlashAwareDataRequests,
|
|
115888
|
+
page,
|
|
115889
|
+
location,
|
|
115890
|
+
nextMatches
|
|
115891
|
+
]);
|
|
115892
|
+
return /* @__PURE__ */ React__namespace.createElement(React__namespace.Fragment, null, dataHrefs.map((href)=>/* @__PURE__ */ React__namespace.createElement("link", {
|
|
115893
|
+
key: href,
|
|
115894
|
+
rel: "prefetch",
|
|
115895
|
+
as: "fetch",
|
|
115896
|
+
href,
|
|
115897
|
+
...linkProps
|
|
115898
|
+
})));
|
|
115899
|
+
}
|
|
115792
115900
|
function PrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {
|
|
115793
115901
|
let location = useLocation();
|
|
115794
115902
|
let { future, manifest, routeModules } = useFrameworkContext();
|
|
@@ -115887,7 +115995,7 @@ function mergeRefs(...refs) {
|
|
|
115887
115995
|
var isBrowser2 = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
115888
115996
|
try {
|
|
115889
115997
|
if (isBrowser2) {
|
|
115890
|
-
window.__reactRouterVersion = "7.
|
|
115998
|
+
window.__reactRouterVersion = "7.14.1";
|
|
115891
115999
|
}
|
|
115892
116000
|
} catch (e) {}
|
|
115893
116001
|
var ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
@@ -117016,7 +117124,7 @@ const AggregateResultsTable = ({ rawResults = [], aggregateResults, agents, titl
|
|
|
117016
117124
|
fontSize: 16,
|
|
117017
117125
|
fontWeight: 600
|
|
117018
117126
|
}
|
|
117019
|
-
}, resolvedTitle), /*#__PURE__*/ React.createElement(Tooltip
|
|
117127
|
+
}, resolvedTitle), /*#__PURE__*/ React.createElement(Tooltip, {
|
|
117020
117128
|
title: llmExpandableKeys.length === 0 ? "No expandable rows" : undefined
|
|
117021
117129
|
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
117022
117130
|
type: "text",
|
|
@@ -117446,7 +117554,7 @@ const AggregateResultsTable = ({ rawResults = [], aggregateResults, agents, titl
|
|
|
117446
117554
|
fontSize: 16,
|
|
117447
117555
|
fontWeight: 600
|
|
117448
117556
|
}
|
|
117449
|
-
}, resolvedTitle), /*#__PURE__*/ React.createElement(Tooltip
|
|
117557
|
+
}, resolvedTitle), /*#__PURE__*/ React.createElement(Tooltip, {
|
|
117450
117558
|
title: expandableKeys.length === 0 ? "No expandable rows" : undefined
|
|
117451
117559
|
}, /*#__PURE__*/ React.createElement(Button$1, {
|
|
117452
117560
|
type: "text",
|
|
@@ -117738,7 +117846,7 @@ const EvaluatorResult = ({ evaluation, evaluatorId, backHref, onAgentNodeClick }
|
|
|
117738
117846
|
fontWeight: 600,
|
|
117739
117847
|
fontSize: 15
|
|
117740
117848
|
}
|
|
117741
|
-
}, completed_at ? /*#__PURE__*/ React.createElement(Tooltip
|
|
117849
|
+
}, completed_at ? /*#__PURE__*/ React.createElement(Tooltip, {
|
|
117742
117850
|
title: formatDateFriendly(completed_at)
|
|
117743
117851
|
}, /*#__PURE__*/ React.createElement("span", null, formatDateRelative(completed_at))) : "-")), /*#__PURE__*/ React.createElement(Col, {
|
|
117744
117852
|
xs: 24,
|