@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/esm/index.js
CHANGED
|
@@ -56,6 +56,9 @@ import CheckOutlined from '@ant-design/icons/es/icons/CheckOutlined';
|
|
|
56
56
|
import CopyOutlined from '@ant-design/icons/es/icons/CopyOutlined';
|
|
57
57
|
import RcDrawer from '@rc-component/drawer';
|
|
58
58
|
import useId$2 from '@rc-component/util/es/hooks/useId';
|
|
59
|
+
import EllipsisOutlined from '@ant-design/icons/es/icons/EllipsisOutlined';
|
|
60
|
+
import PlusOutlined from '@ant-design/icons/es/icons/PlusOutlined';
|
|
61
|
+
import RcTabs from '@rc-component/tabs';
|
|
59
62
|
import RcSwitch from '@rc-component/switch';
|
|
60
63
|
import RcSelect, { Option, OptGroup } from '@rc-component/select';
|
|
61
64
|
import DownOutlined from '@ant-design/icons/es/icons/DownOutlined';
|
|
@@ -67,7 +70,6 @@ import LeftOutlined from '@ant-design/icons/es/icons/LeftOutlined';
|
|
|
67
70
|
import RcDropdown from '@rc-component/dropdown';
|
|
68
71
|
import RcMenu, { Divider as Divider$1, Item as Item$1, useFullPath, SubMenu as SubMenu$1, ItemGroup } from '@rc-component/menu';
|
|
69
72
|
import BarsOutlined from '@ant-design/icons/es/icons/BarsOutlined';
|
|
70
|
-
import EllipsisOutlined from '@ant-design/icons/es/icons/EllipsisOutlined';
|
|
71
73
|
import '@rc-component/util/es/Dom/findDOMNode';
|
|
72
74
|
import { convertChildrenToColumns } from '@rc-component/table/es/hooks/useColumns';
|
|
73
75
|
import DoubleLeftOutlined from '@ant-design/icons/es/icons/DoubleLeftOutlined';
|
|
@@ -76,8 +78,6 @@ import RcPagination from '@rc-component/pagination';
|
|
|
76
78
|
import FilterFilled from '@ant-design/icons/es/icons/FilterFilled';
|
|
77
79
|
import CaretDownOutlined from '@ant-design/icons/es/icons/CaretDownOutlined';
|
|
78
80
|
import CaretUpOutlined from '@ant-design/icons/es/icons/CaretUpOutlined';
|
|
79
|
-
import PlusOutlined from '@ant-design/icons/es/icons/PlusOutlined';
|
|
80
|
-
import RcTabs from '@rc-component/tabs';
|
|
81
81
|
|
|
82
82
|
function cc(names) {
|
|
83
83
|
if (typeof names === "string" || typeof names === "number") return "" + names;
|
|
@@ -3921,7 +3921,7 @@ function nodeHasDimensions(node) {
|
|
|
3921
3921
|
return (node.measured?.width ?? node.width ?? node.initialWidth) !== undefined && (node.measured?.height ?? node.height ?? node.initialHeight) !== undefined;
|
|
3922
3922
|
}
|
|
3923
3923
|
/**
|
|
3924
|
-
* Convert child position to
|
|
3924
|
+
* Convert child position to absolute position
|
|
3925
3925
|
*
|
|
3926
3926
|
* @internal
|
|
3927
3927
|
* @param position
|
|
@@ -4368,7 +4368,7 @@ const distance = (a, b)=>Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y,
|
|
|
4368
4368
|
centerX = center.x ?? sourceGapped.x + (targetGapped.x - sourceGapped.x) * stepPosition;
|
|
4369
4369
|
centerY = center.y ?? (sourceGapped.y + targetGapped.y) / 2;
|
|
4370
4370
|
} else {
|
|
4371
|
-
// Primary direction is vertical, so stepPosition affects Y coordinate
|
|
4371
|
+
// Primary direction is vertical, so stepPosition affects Y coordinate
|
|
4372
4372
|
centerX = center.x ?? (sourceGapped.x + targetGapped.x) / 2;
|
|
4373
4373
|
centerY = center.y ?? sourceGapped.y + (targetGapped.y - sourceGapped.y) * stepPosition;
|
|
4374
4374
|
}
|
|
@@ -4467,17 +4467,24 @@ const distance = (a, b)=>Math.sqrt(Math.pow(b.x - a.x, 2) + Math.pow(b.y - a.y,
|
|
|
4467
4467
|
centerY = (sourceGapPoint.y + targetGapPoint.y) / 2;
|
|
4468
4468
|
}
|
|
4469
4469
|
}
|
|
4470
|
+
const gappedSource = {
|
|
4471
|
+
x: sourceGapped.x + sourceGapOffset.x,
|
|
4472
|
+
y: sourceGapped.y + sourceGapOffset.y
|
|
4473
|
+
};
|
|
4474
|
+
const gappedTarget = {
|
|
4475
|
+
x: targetGapped.x + targetGapOffset.x,
|
|
4476
|
+
y: targetGapped.y + targetGapOffset.y
|
|
4477
|
+
};
|
|
4470
4478
|
const pathPoints = [
|
|
4471
4479
|
source,
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4480
|
+
// 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
|
|
4481
|
+
...gappedSource.x !== points[0].x || gappedSource.y !== points[0].y ? [
|
|
4482
|
+
gappedSource
|
|
4483
|
+
] : [],
|
|
4476
4484
|
...points,
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
},
|
|
4485
|
+
...gappedTarget.x !== points[points.length - 1].x || gappedTarget.y !== points[points.length - 1].y ? [
|
|
4486
|
+
gappedTarget
|
|
4487
|
+
] : [],
|
|
4481
4488
|
target
|
|
4482
4489
|
];
|
|
4483
4490
|
return [
|
|
@@ -4554,16 +4561,11 @@ function getBend(a, b, c, size) {
|
|
|
4554
4561
|
offset,
|
|
4555
4562
|
stepPosition
|
|
4556
4563
|
});
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
segment = `${i === 0 ? 'M' : 'L'}${p.x} ${p.y}`;
|
|
4563
|
-
}
|
|
4564
|
-
res += segment;
|
|
4565
|
-
return res;
|
|
4566
|
-
}, '');
|
|
4564
|
+
let path = `M${points[0].x} ${points[0].y}`;
|
|
4565
|
+
for(let i = 1; i < points.length - 1; i++){
|
|
4566
|
+
path += getBend(points[i - 1], points[i], points[i + 1], borderRadius);
|
|
4567
|
+
}
|
|
4568
|
+
path += `L${points[points.length - 1].x} ${points[points.length - 1].y}`;
|
|
4567
4569
|
return [
|
|
4568
4570
|
path,
|
|
4569
4571
|
labelX,
|
|
@@ -4779,6 +4781,7 @@ function adoptUserNodes(nodes, nodeLookup, parentLookup, options = {}) {
|
|
|
4779
4781
|
const tmpLookup = new Map(nodeLookup);
|
|
4780
4782
|
const selectedNodeZ = _options?.elevateNodesOnSelect && !isManualZIndexMode(_options.zIndexMode) ? SELECTED_NODE_Z : 0;
|
|
4781
4783
|
let nodesInitialized = nodes.length > 0;
|
|
4784
|
+
let hasSelectedNodes = false;
|
|
4782
4785
|
nodeLookup.clear();
|
|
4783
4786
|
parentLookup.clear();
|
|
4784
4787
|
for (const userNode of nodes){
|
|
@@ -4812,8 +4815,12 @@ function adoptUserNodes(nodes, nodeLookup, parentLookup, options = {}) {
|
|
|
4812
4815
|
if (userNode.parentId) {
|
|
4813
4816
|
updateChildNode(internalNode, nodeLookup, parentLookup, options, rootParentIndex);
|
|
4814
4817
|
}
|
|
4818
|
+
hasSelectedNodes || (hasSelectedNodes = userNode.selected ?? false);
|
|
4815
4819
|
}
|
|
4816
|
-
return
|
|
4820
|
+
return {
|
|
4821
|
+
nodesInitialized,
|
|
4822
|
+
hasSelectedNodes
|
|
4823
|
+
};
|
|
4817
4824
|
}
|
|
4818
4825
|
function updateParentLookup(node, parentLookup) {
|
|
4819
4826
|
if (!node.parentId) {
|
|
@@ -5087,7 +5094,7 @@ async function panBy({ delta, panZoom, transform, translateExtent, width, height
|
|
|
5087
5094
|
* @param connectionKey at which key the connection should be added
|
|
5088
5095
|
* @param connectionLookup reference to the connection lookup
|
|
5089
5096
|
* @param nodeId nodeId of the connection
|
|
5090
|
-
* @param handleId handleId of the
|
|
5097
|
+
* @param handleId handleId of the connection
|
|
5091
5098
|
*/ function addConnectionToLookup(type, connection, connectionKey, connectionLookup, nodeId, handleId) {
|
|
5092
5099
|
/*
|
|
5093
5100
|
* We add the connection to the connectionLookup at the following keys
|
|
@@ -5753,7 +5760,7 @@ function onPointerDown(event, { connectionMode, connectionRadius, handleId, node
|
|
|
5753
5760
|
doc.addEventListener('touchmove', onPointerMove);
|
|
5754
5761
|
doc.addEventListener('touchend', onPointerUp);
|
|
5755
5762
|
}
|
|
5756
|
-
// checks if and returns connection in
|
|
5763
|
+
// checks if and returns connection in form of an object { source: 123, target: 312 }
|
|
5757
5764
|
function isValidHandle(event, { handle, connectionMode, fromNodeId, fromHandleId, fromType, doc, lib, flowId, isValidConnection = alwaysValid, nodeLookup }) {
|
|
5758
5765
|
const isTarget = fromType === 'target';
|
|
5759
5766
|
const handleDomNode = handle ? doc.querySelector(`.${lib}-flow__handle[data-id="${flowId}-${handle?.nodeId}-${handle?.id}-${handle?.type}"]`) : null;
|
|
@@ -6017,7 +6024,7 @@ function createPanZoomEndHandler({ zoomPanValues, panOnDrag, panOnScroll, onDrag
|
|
|
6017
6024
|
clearTimeout(zoomPanValues.timerId);
|
|
6018
6025
|
zoomPanValues.timerId = setTimeout(()=>{
|
|
6019
6026
|
onPanZoomEnd?.(event.sourceEvent, viewport);
|
|
6020
|
-
}, // we need a setTimeout for panOnScroll to
|
|
6027
|
+
}, // we need a setTimeout for panOnScroll to suppress multiple end events fired during scroll
|
|
6021
6028
|
panOnScroll ? 150 : 0);
|
|
6022
6029
|
}
|
|
6023
6030
|
};
|
|
@@ -7334,6 +7341,8 @@ function SelectionListener({ onSelectionChange }) {
|
|
|
7334
7341
|
}
|
|
7335
7342
|
return null;
|
|
7336
7343
|
}
|
|
7344
|
+
// we need this hook to prevent a warning when using react-flow in SSR
|
|
7345
|
+
const useIsomorphicLayoutEffect$3 = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
7337
7346
|
const defaultNodeOrigin = [
|
|
7338
7347
|
0,
|
|
7339
7348
|
0
|
|
@@ -7439,7 +7448,12 @@ const initPrevValues = {
|
|
|
7439
7448
|
function StoreUpdater(props) {
|
|
7440
7449
|
const { setNodes, setEdges, setMinZoom, setMaxZoom, setTranslateExtent, setNodeExtent, reset, setDefaultNodesAndEdges } = useStore(selector$l, shallow$1);
|
|
7441
7450
|
const store = useStoreApi();
|
|
7442
|
-
|
|
7451
|
+
// We use layout effects here so that the store is always populated before
|
|
7452
|
+
// any child useEffect or useLayoutEffect fires. With regular useEffect, the
|
|
7453
|
+
// cleanup calls reset() which empties the store, and child effects can run
|
|
7454
|
+
// before the new mount effect repopulates it — causing children to read
|
|
7455
|
+
// empty nodeLookup/nodes/edges during a <ReactFlow> remount.
|
|
7456
|
+
useIsomorphicLayoutEffect$3(()=>{
|
|
7443
7457
|
setDefaultNodesAndEdges(props.defaultNodes, props.defaultEdges);
|
|
7444
7458
|
return ()=>{
|
|
7445
7459
|
// when we reset the store we also need to reset the previous fields
|
|
@@ -7448,7 +7462,7 @@ function StoreUpdater(props) {
|
|
|
7448
7462
|
};
|
|
7449
7463
|
}, []);
|
|
7450
7464
|
const previousFields = useRef(initPrevValues);
|
|
7451
|
-
|
|
7465
|
+
useIsomorphicLayoutEffect$3(()=>{
|
|
7452
7466
|
for (const fieldName of fieldsToTrack){
|
|
7453
7467
|
const fieldValue = props[fieldName];
|
|
7454
7468
|
const previousFieldValue = previousFields.current[fieldName];
|
|
@@ -7664,21 +7678,15 @@ function useKeyOrCode(eventCode, keysToWatch) {
|
|
|
7664
7678
|
return {
|
|
7665
7679
|
zoomIn: (options)=>{
|
|
7666
7680
|
const { panZoom } = store.getState();
|
|
7667
|
-
return panZoom ? panZoom.scaleBy(1.2,
|
|
7668
|
-
duration: options?.duration
|
|
7669
|
-
}) : Promise.resolve(false);
|
|
7681
|
+
return panZoom ? panZoom.scaleBy(1.2, options) : Promise.resolve(false);
|
|
7670
7682
|
},
|
|
7671
7683
|
zoomOut: (options)=>{
|
|
7672
7684
|
const { panZoom } = store.getState();
|
|
7673
|
-
return panZoom ? panZoom.scaleBy(1 / 1.2,
|
|
7674
|
-
duration: options?.duration
|
|
7675
|
-
}) : Promise.resolve(false);
|
|
7685
|
+
return panZoom ? panZoom.scaleBy(1 / 1.2, options) : Promise.resolve(false);
|
|
7676
7686
|
},
|
|
7677
7687
|
zoomTo: (zoomLevel, options)=>{
|
|
7678
7688
|
const { panZoom } = store.getState();
|
|
7679
|
-
return panZoom ? panZoom.scaleTo(zoomLevel,
|
|
7680
|
-
duration: options?.duration
|
|
7681
|
-
}) : Promise.resolve(false);
|
|
7689
|
+
return panZoom ? panZoom.scaleTo(zoomLevel, options) : Promise.resolve(false);
|
|
7682
7690
|
},
|
|
7683
7691
|
getZoom: ()=>store.getState().transform[2],
|
|
7684
7692
|
setViewport: async (viewport, options)=>{
|
|
@@ -8050,8 +8058,6 @@ function fixedForwardRef(render) {
|
|
|
8050
8058
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
8051
8059
|
return forwardRef(render);
|
|
8052
8060
|
}
|
|
8053
|
-
// we need this hook to prevent a warning when using react-flow in SSR
|
|
8054
|
-
const useIsomorphicLayoutEffect$3 = typeof window !== 'undefined' ? useLayoutEffect : useEffect;
|
|
8055
8061
|
/**
|
|
8056
8062
|
* This hook returns a queue that can be used to batch updates.
|
|
8057
8063
|
*
|
|
@@ -11141,7 +11147,7 @@ const getInitialState = ({ nodes, edges, defaultNodes, defaultEdges, width, heig
|
|
|
11141
11147
|
];
|
|
11142
11148
|
const storeNodeExtent = nodeExtent ?? infiniteExtent;
|
|
11143
11149
|
updateConnectionLookup(connectionLookup, edgeLookup, storeEdges);
|
|
11144
|
-
const nodesInitialized = adoptUserNodes(storeNodes, nodeLookup, parentLookup, {
|
|
11150
|
+
const { nodesInitialized } = adoptUserNodes(storeNodes, nodeLookup, parentLookup, {
|
|
11145
11151
|
nodeOrigin: storeNodeOrigin,
|
|
11146
11152
|
nodeExtent: storeNodeExtent,
|
|
11147
11153
|
zIndexMode
|
|
@@ -11272,7 +11278,7 @@ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height,
|
|
|
11272
11278
|
zIndexMode
|
|
11273
11279
|
}),
|
|
11274
11280
|
setNodes: (nodes)=>{
|
|
11275
|
-
const { nodeLookup, parentLookup, nodeOrigin, elevateNodesOnSelect, fitViewQueued, zIndexMode } = get();
|
|
11281
|
+
const { nodeLookup, parentLookup, nodeOrigin, elevateNodesOnSelect, fitViewQueued, zIndexMode, nodesSelectionActive } = get();
|
|
11276
11282
|
/*
|
|
11277
11283
|
* setNodes() is called exclusively in response to user actions:
|
|
11278
11284
|
* - either when the `<ReactFlow nodes>` prop is updated in the controlled ReactFlow setup,
|
|
@@ -11280,25 +11286,28 @@ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height,
|
|
|
11280
11286
|
*
|
|
11281
11287
|
* When this happens, we take the note objects passed by the user and extend them with fields
|
|
11282
11288
|
* relevant for internal React Flow operations.
|
|
11283
|
-
*/ const nodesInitialized = adoptUserNodes(nodes, nodeLookup, parentLookup, {
|
|
11289
|
+
*/ const { nodesInitialized, hasSelectedNodes } = adoptUserNodes(nodes, nodeLookup, parentLookup, {
|
|
11284
11290
|
nodeOrigin,
|
|
11285
11291
|
nodeExtent,
|
|
11286
11292
|
elevateNodesOnSelect,
|
|
11287
11293
|
checkEquality: true,
|
|
11288
11294
|
zIndexMode
|
|
11289
11295
|
});
|
|
11296
|
+
const nextNodesSelectionActive = nodesSelectionActive && hasSelectedNodes;
|
|
11290
11297
|
if (fitViewQueued && nodesInitialized) {
|
|
11291
11298
|
resolveFitView();
|
|
11292
11299
|
set({
|
|
11293
11300
|
nodes,
|
|
11294
11301
|
nodesInitialized,
|
|
11295
11302
|
fitViewQueued: false,
|
|
11296
|
-
fitViewOptions: undefined
|
|
11303
|
+
fitViewOptions: undefined,
|
|
11304
|
+
nodesSelectionActive: nextNodesSelectionActive
|
|
11297
11305
|
});
|
|
11298
11306
|
} else {
|
|
11299
11307
|
set({
|
|
11300
11308
|
nodes,
|
|
11301
|
-
nodesInitialized
|
|
11309
|
+
nodesInitialized,
|
|
11310
|
+
nodesSelectionActive: nextNodesSelectionActive
|
|
11302
11311
|
});
|
|
11303
11312
|
}
|
|
11304
11313
|
},
|
|
@@ -11326,7 +11335,7 @@ const createStore = ({ nodes, edges, defaultNodes, defaultEdges, width, height,
|
|
|
11326
11335
|
}
|
|
11327
11336
|
},
|
|
11328
11337
|
/*
|
|
11329
|
-
* Every node gets
|
|
11338
|
+
* Every node gets registered at a ResizeObserver. Whenever a node
|
|
11330
11339
|
* changes its dimensions, this function is called to measure the
|
|
11331
11340
|
* new dimensions and update the nodes.
|
|
11332
11341
|
*/ updateNodeInternals: (updates)=>{
|
|
@@ -11718,6 +11727,67 @@ function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTy
|
|
|
11718
11727
|
nodeExtent: nodeExtent,
|
|
11719
11728
|
zIndexMode: zIndexMode,
|
|
11720
11729
|
children: [
|
|
11730
|
+
jsx$1(StoreUpdater, {
|
|
11731
|
+
nodes: nodes,
|
|
11732
|
+
edges: edges,
|
|
11733
|
+
defaultNodes: defaultNodes,
|
|
11734
|
+
defaultEdges: defaultEdges,
|
|
11735
|
+
onConnect: onConnect,
|
|
11736
|
+
onConnectStart: onConnectStart,
|
|
11737
|
+
onConnectEnd: onConnectEnd,
|
|
11738
|
+
onClickConnectStart: onClickConnectStart,
|
|
11739
|
+
onClickConnectEnd: onClickConnectEnd,
|
|
11740
|
+
nodesDraggable: nodesDraggable,
|
|
11741
|
+
autoPanOnNodeFocus: autoPanOnNodeFocus,
|
|
11742
|
+
nodesConnectable: nodesConnectable,
|
|
11743
|
+
nodesFocusable: nodesFocusable,
|
|
11744
|
+
edgesFocusable: edgesFocusable,
|
|
11745
|
+
edgesReconnectable: edgesReconnectable,
|
|
11746
|
+
elementsSelectable: elementsSelectable,
|
|
11747
|
+
elevateNodesOnSelect: elevateNodesOnSelect,
|
|
11748
|
+
elevateEdgesOnSelect: elevateEdgesOnSelect,
|
|
11749
|
+
minZoom: minZoom,
|
|
11750
|
+
maxZoom: maxZoom,
|
|
11751
|
+
nodeExtent: nodeExtent,
|
|
11752
|
+
onNodesChange: onNodesChange,
|
|
11753
|
+
onEdgesChange: onEdgesChange,
|
|
11754
|
+
snapToGrid: snapToGrid,
|
|
11755
|
+
snapGrid: snapGrid,
|
|
11756
|
+
connectionMode: connectionMode,
|
|
11757
|
+
translateExtent: translateExtent,
|
|
11758
|
+
connectOnClick: connectOnClick,
|
|
11759
|
+
defaultEdgeOptions: defaultEdgeOptions,
|
|
11760
|
+
fitView: fitView,
|
|
11761
|
+
fitViewOptions: fitViewOptions,
|
|
11762
|
+
onNodesDelete: onNodesDelete,
|
|
11763
|
+
onEdgesDelete: onEdgesDelete,
|
|
11764
|
+
onDelete: onDelete,
|
|
11765
|
+
onNodeDragStart: onNodeDragStart,
|
|
11766
|
+
onNodeDrag: onNodeDrag,
|
|
11767
|
+
onNodeDragStop: onNodeDragStop,
|
|
11768
|
+
onSelectionDrag: onSelectionDrag,
|
|
11769
|
+
onSelectionDragStart: onSelectionDragStart,
|
|
11770
|
+
onSelectionDragStop: onSelectionDragStop,
|
|
11771
|
+
onMove: onMove,
|
|
11772
|
+
onMoveStart: onMoveStart,
|
|
11773
|
+
onMoveEnd: onMoveEnd,
|
|
11774
|
+
noPanClassName: noPanClassName,
|
|
11775
|
+
nodeOrigin: nodeOrigin,
|
|
11776
|
+
rfId: rfId,
|
|
11777
|
+
autoPanOnConnect: autoPanOnConnect,
|
|
11778
|
+
autoPanOnNodeDrag: autoPanOnNodeDrag,
|
|
11779
|
+
autoPanSpeed: autoPanSpeed,
|
|
11780
|
+
onError: onError,
|
|
11781
|
+
connectionRadius: connectionRadius,
|
|
11782
|
+
isValidConnection: isValidConnection,
|
|
11783
|
+
selectNodesOnDrag: selectNodesOnDrag,
|
|
11784
|
+
nodeDragThreshold: nodeDragThreshold,
|
|
11785
|
+
connectionDragThreshold: connectionDragThreshold,
|
|
11786
|
+
onBeforeDelete: onBeforeDelete,
|
|
11787
|
+
debug: debug,
|
|
11788
|
+
ariaLabelConfig: ariaLabelConfig,
|
|
11789
|
+
zIndexMode: zIndexMode
|
|
11790
|
+
}),
|
|
11721
11791
|
jsx$1(GraphView, {
|
|
11722
11792
|
onInit: onInit,
|
|
11723
11793
|
onNodeClick: onNodeClick,
|
|
@@ -11783,67 +11853,6 @@ function ReactFlow({ nodes, edges, defaultNodes, defaultEdges, className, nodeTy
|
|
|
11783
11853
|
viewport: viewport,
|
|
11784
11854
|
onViewportChange: onViewportChange
|
|
11785
11855
|
}),
|
|
11786
|
-
jsx$1(StoreUpdater, {
|
|
11787
|
-
nodes: nodes,
|
|
11788
|
-
edges: edges,
|
|
11789
|
-
defaultNodes: defaultNodes,
|
|
11790
|
-
defaultEdges: defaultEdges,
|
|
11791
|
-
onConnect: onConnect,
|
|
11792
|
-
onConnectStart: onConnectStart,
|
|
11793
|
-
onConnectEnd: onConnectEnd,
|
|
11794
|
-
onClickConnectStart: onClickConnectStart,
|
|
11795
|
-
onClickConnectEnd: onClickConnectEnd,
|
|
11796
|
-
nodesDraggable: nodesDraggable,
|
|
11797
|
-
autoPanOnNodeFocus: autoPanOnNodeFocus,
|
|
11798
|
-
nodesConnectable: nodesConnectable,
|
|
11799
|
-
nodesFocusable: nodesFocusable,
|
|
11800
|
-
edgesFocusable: edgesFocusable,
|
|
11801
|
-
edgesReconnectable: edgesReconnectable,
|
|
11802
|
-
elementsSelectable: elementsSelectable,
|
|
11803
|
-
elevateNodesOnSelect: elevateNodesOnSelect,
|
|
11804
|
-
elevateEdgesOnSelect: elevateEdgesOnSelect,
|
|
11805
|
-
minZoom: minZoom,
|
|
11806
|
-
maxZoom: maxZoom,
|
|
11807
|
-
nodeExtent: nodeExtent,
|
|
11808
|
-
onNodesChange: onNodesChange,
|
|
11809
|
-
onEdgesChange: onEdgesChange,
|
|
11810
|
-
snapToGrid: snapToGrid,
|
|
11811
|
-
snapGrid: snapGrid,
|
|
11812
|
-
connectionMode: connectionMode,
|
|
11813
|
-
translateExtent: translateExtent,
|
|
11814
|
-
connectOnClick: connectOnClick,
|
|
11815
|
-
defaultEdgeOptions: defaultEdgeOptions,
|
|
11816
|
-
fitView: fitView,
|
|
11817
|
-
fitViewOptions: fitViewOptions,
|
|
11818
|
-
onNodesDelete: onNodesDelete,
|
|
11819
|
-
onEdgesDelete: onEdgesDelete,
|
|
11820
|
-
onDelete: onDelete,
|
|
11821
|
-
onNodeDragStart: onNodeDragStart,
|
|
11822
|
-
onNodeDrag: onNodeDrag,
|
|
11823
|
-
onNodeDragStop: onNodeDragStop,
|
|
11824
|
-
onSelectionDrag: onSelectionDrag,
|
|
11825
|
-
onSelectionDragStart: onSelectionDragStart,
|
|
11826
|
-
onSelectionDragStop: onSelectionDragStop,
|
|
11827
|
-
onMove: onMove,
|
|
11828
|
-
onMoveStart: onMoveStart,
|
|
11829
|
-
onMoveEnd: onMoveEnd,
|
|
11830
|
-
noPanClassName: noPanClassName,
|
|
11831
|
-
nodeOrigin: nodeOrigin,
|
|
11832
|
-
rfId: rfId,
|
|
11833
|
-
autoPanOnConnect: autoPanOnConnect,
|
|
11834
|
-
autoPanOnNodeDrag: autoPanOnNodeDrag,
|
|
11835
|
-
autoPanSpeed: autoPanSpeed,
|
|
11836
|
-
onError: onError,
|
|
11837
|
-
connectionRadius: connectionRadius,
|
|
11838
|
-
isValidConnection: isValidConnection,
|
|
11839
|
-
selectNodesOnDrag: selectNodesOnDrag,
|
|
11840
|
-
nodeDragThreshold: nodeDragThreshold,
|
|
11841
|
-
connectionDragThreshold: connectionDragThreshold,
|
|
11842
|
-
onBeforeDelete: onBeforeDelete,
|
|
11843
|
-
debug: debug,
|
|
11844
|
-
ariaLabelConfig: ariaLabelConfig,
|
|
11845
|
-
zIndexMode: zIndexMode
|
|
11846
|
-
}),
|
|
11847
11856
|
jsx$1(SelectionListener, {
|
|
11848
11857
|
onSelectionChange: onSelectionChange
|
|
11849
11858
|
}),
|
|
@@ -12815,7 +12824,7 @@ var css_248z = "/* this gets exported as style.css and can be used for the defau
|
|
|
12815
12824
|
styleInject(css_248z);
|
|
12816
12825
|
|
|
12817
12826
|
/**
|
|
12818
|
-
* @license lucide-react
|
|
12827
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12819
12828
|
*
|
|
12820
12829
|
* This source code is licensed under the ISC license.
|
|
12821
12830
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -12824,14 +12833,14 @@ styleInject(css_248z);
|
|
|
12824
12833
|
}).join(" ").trim();
|
|
12825
12834
|
|
|
12826
12835
|
/**
|
|
12827
|
-
* @license lucide-react
|
|
12836
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12828
12837
|
*
|
|
12829
12838
|
* This source code is licensed under the ISC license.
|
|
12830
12839
|
* See the LICENSE file in the root directory of this source tree.
|
|
12831
12840
|
*/ const toKebabCase = (string)=>string.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
12832
12841
|
|
|
12833
12842
|
/**
|
|
12834
|
-
* @license lucide-react
|
|
12843
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12835
12844
|
*
|
|
12836
12845
|
* This source code is licensed under the ISC license.
|
|
12837
12846
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -12843,7 +12852,7 @@ const toPascalCase = (string)=>{
|
|
|
12843
12852
|
};
|
|
12844
12853
|
|
|
12845
12854
|
/**
|
|
12846
|
-
* @license lucide-react
|
|
12855
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12847
12856
|
*
|
|
12848
12857
|
* This source code is licensed under the ISC license.
|
|
12849
12858
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -12860,7 +12869,7 @@ const toPascalCase = (string)=>{
|
|
|
12860
12869
|
};
|
|
12861
12870
|
|
|
12862
12871
|
/**
|
|
12863
|
-
* @license lucide-react
|
|
12872
|
+
* @license lucide-react v1.8.0 - ISC
|
|
12864
12873
|
*
|
|
12865
12874
|
* This source code is licensed under the ISC license.
|
|
12866
12875
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -12873,14 +12882,20 @@ const toPascalCase = (string)=>{
|
|
|
12873
12882
|
return false;
|
|
12874
12883
|
};
|
|
12875
12884
|
|
|
12876
|
-
const
|
|
12885
|
+
const LucideContext = createContext({});
|
|
12886
|
+
const useLucideContext = ()=>useContext(LucideContext);
|
|
12887
|
+
|
|
12888
|
+
const Icon = forwardRef(({ color, size, strokeWidth, absoluteStrokeWidth, className = "", children, iconNode, ...rest }, ref)=>{
|
|
12889
|
+
const { size: contextSize = 24, strokeWidth: contextStrokeWidth = 2, absoluteStrokeWidth: contextAbsoluteStrokeWidth = false, color: contextColor = "currentColor", className: contextClass = "" } = useLucideContext() ?? {};
|
|
12890
|
+
const calculatedStrokeWidth = absoluteStrokeWidth ?? contextAbsoluteStrokeWidth ? Number(strokeWidth ?? contextStrokeWidth) * 24 / Number(size ?? contextSize) : strokeWidth ?? contextStrokeWidth;
|
|
12891
|
+
return createElement("svg", {
|
|
12877
12892
|
ref,
|
|
12878
12893
|
...defaultAttributes,
|
|
12879
|
-
width: size,
|
|
12880
|
-
height: size,
|
|
12881
|
-
stroke: color,
|
|
12882
|
-
strokeWidth:
|
|
12883
|
-
className: mergeClasses("lucide", className),
|
|
12894
|
+
width: size ?? contextSize ?? defaultAttributes.width,
|
|
12895
|
+
height: size ?? contextSize ?? defaultAttributes.height,
|
|
12896
|
+
stroke: color ?? contextColor,
|
|
12897
|
+
strokeWidth: calculatedStrokeWidth,
|
|
12898
|
+
className: mergeClasses("lucide", contextClass, className),
|
|
12884
12899
|
...!children && !hasA11yProp(rest) && {
|
|
12885
12900
|
"aria-hidden": "true"
|
|
12886
12901
|
},
|
|
@@ -12890,7 +12905,8 @@ const Icon = forwardRef(({ color = "currentColor", size = 24, strokeWidth = 2, a
|
|
|
12890
12905
|
...Array.isArray(children) ? children : [
|
|
12891
12906
|
children
|
|
12892
12907
|
]
|
|
12893
|
-
])
|
|
12908
|
+
]);
|
|
12909
|
+
});
|
|
12894
12910
|
|
|
12895
12911
|
const createLucideIcon = (iconName, iconNode)=>{
|
|
12896
12912
|
const Component = forwardRef(({ className, ...props }, ref)=>createElement(Icon, {
|
|
@@ -12903,7 +12919,7 @@ const createLucideIcon = (iconName, iconNode)=>{
|
|
|
12903
12919
|
return Component;
|
|
12904
12920
|
};
|
|
12905
12921
|
|
|
12906
|
-
const __iconNode$
|
|
12922
|
+
const __iconNode$y = [
|
|
12907
12923
|
[
|
|
12908
12924
|
"path",
|
|
12909
12925
|
{
|
|
@@ -12919,9 +12935,9 @@ const __iconNode$x = [
|
|
|
12919
12935
|
}
|
|
12920
12936
|
]
|
|
12921
12937
|
];
|
|
12922
|
-
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$
|
|
12938
|
+
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$y);
|
|
12923
12939
|
|
|
12924
|
-
const __iconNode$
|
|
12940
|
+
const __iconNode$x = [
|
|
12925
12941
|
[
|
|
12926
12942
|
"path",
|
|
12927
12943
|
{
|
|
@@ -12937,9 +12953,9 @@ const __iconNode$w = [
|
|
|
12937
12953
|
}
|
|
12938
12954
|
]
|
|
12939
12955
|
];
|
|
12940
|
-
const ArrowRight = createLucideIcon("arrow-right", __iconNode$
|
|
12956
|
+
const ArrowRight = createLucideIcon("arrow-right", __iconNode$x);
|
|
12941
12957
|
|
|
12942
|
-
const __iconNode$
|
|
12958
|
+
const __iconNode$w = [
|
|
12943
12959
|
[
|
|
12944
12960
|
"path",
|
|
12945
12961
|
{
|
|
@@ -12987,9 +13003,9 @@ const __iconNode$v = [
|
|
|
12987
13003
|
}
|
|
12988
13004
|
]
|
|
12989
13005
|
];
|
|
12990
|
-
const Bot = createLucideIcon("bot", __iconNode$
|
|
13006
|
+
const Bot = createLucideIcon("bot", __iconNode$w);
|
|
12991
13007
|
|
|
12992
|
-
const __iconNode$
|
|
13008
|
+
const __iconNode$v = [
|
|
12993
13009
|
[
|
|
12994
13010
|
"path",
|
|
12995
13011
|
{
|
|
@@ -13023,9 +13039,9 @@ const __iconNode$u = [
|
|
|
13023
13039
|
}
|
|
13024
13040
|
]
|
|
13025
13041
|
];
|
|
13026
|
-
const Calendar = createLucideIcon("calendar", __iconNode$
|
|
13042
|
+
const Calendar = createLucideIcon("calendar", __iconNode$v);
|
|
13027
13043
|
|
|
13028
|
-
const __iconNode$
|
|
13044
|
+
const __iconNode$u = [
|
|
13029
13045
|
[
|
|
13030
13046
|
"path",
|
|
13031
13047
|
{
|
|
@@ -13082,9 +13098,9 @@ const __iconNode$t = [
|
|
|
13082
13098
|
}
|
|
13083
13099
|
]
|
|
13084
13100
|
];
|
|
13085
|
-
const ChartNetwork = createLucideIcon("chart-network", __iconNode$
|
|
13101
|
+
const ChartNetwork = createLucideIcon("chart-network", __iconNode$u);
|
|
13086
13102
|
|
|
13087
|
-
const __iconNode$
|
|
13103
|
+
const __iconNode$t = [
|
|
13088
13104
|
[
|
|
13089
13105
|
"path",
|
|
13090
13106
|
{
|
|
@@ -13093,9 +13109,9 @@ const __iconNode$s = [
|
|
|
13093
13109
|
}
|
|
13094
13110
|
]
|
|
13095
13111
|
];
|
|
13096
|
-
const ChevronDown = createLucideIcon("chevron-down", __iconNode$
|
|
13112
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$t);
|
|
13097
13113
|
|
|
13098
|
-
const __iconNode$
|
|
13114
|
+
const __iconNode$s = [
|
|
13099
13115
|
[
|
|
13100
13116
|
"path",
|
|
13101
13117
|
{
|
|
@@ -13104,9 +13120,9 @@ const __iconNode$r = [
|
|
|
13104
13120
|
}
|
|
13105
13121
|
]
|
|
13106
13122
|
];
|
|
13107
|
-
const ChevronRight = createLucideIcon("chevron-right", __iconNode$
|
|
13123
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$s);
|
|
13108
13124
|
|
|
13109
|
-
const __iconNode$
|
|
13125
|
+
const __iconNode$r = [
|
|
13110
13126
|
[
|
|
13111
13127
|
"path",
|
|
13112
13128
|
{
|
|
@@ -13122,9 +13138,9 @@ const __iconNode$q = [
|
|
|
13122
13138
|
}
|
|
13123
13139
|
]
|
|
13124
13140
|
];
|
|
13125
|
-
const ChevronsDown = createLucideIcon("chevrons-down", __iconNode$
|
|
13141
|
+
const ChevronsDown = createLucideIcon("chevrons-down", __iconNode$r);
|
|
13126
13142
|
|
|
13127
|
-
const __iconNode$
|
|
13143
|
+
const __iconNode$q = [
|
|
13128
13144
|
[
|
|
13129
13145
|
"path",
|
|
13130
13146
|
{
|
|
@@ -13140,9 +13156,9 @@ const __iconNode$p = [
|
|
|
13140
13156
|
}
|
|
13141
13157
|
]
|
|
13142
13158
|
];
|
|
13143
|
-
const ChevronsUp = createLucideIcon("chevrons-up", __iconNode$
|
|
13159
|
+
const ChevronsUp = createLucideIcon("chevrons-up", __iconNode$q);
|
|
13144
13160
|
|
|
13145
|
-
const __iconNode$
|
|
13161
|
+
const __iconNode$p = [
|
|
13146
13162
|
[
|
|
13147
13163
|
"circle",
|
|
13148
13164
|
{
|
|
@@ -13173,9 +13189,9 @@ const __iconNode$o = [
|
|
|
13173
13189
|
}
|
|
13174
13190
|
]
|
|
13175
13191
|
];
|
|
13176
|
-
const CircleAlert = createLucideIcon("circle-alert", __iconNode$
|
|
13192
|
+
const CircleAlert = createLucideIcon("circle-alert", __iconNode$p);
|
|
13177
13193
|
|
|
13178
|
-
const __iconNode$
|
|
13194
|
+
const __iconNode$o = [
|
|
13179
13195
|
[
|
|
13180
13196
|
"path",
|
|
13181
13197
|
{
|
|
@@ -13191,9 +13207,9 @@ const __iconNode$n = [
|
|
|
13191
13207
|
}
|
|
13192
13208
|
]
|
|
13193
13209
|
];
|
|
13194
|
-
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$
|
|
13210
|
+
const CircleCheckBig = createLucideIcon("circle-check-big", __iconNode$o);
|
|
13195
13211
|
|
|
13196
|
-
const __iconNode$
|
|
13212
|
+
const __iconNode$n = [
|
|
13197
13213
|
[
|
|
13198
13214
|
"circle",
|
|
13199
13215
|
{
|
|
@@ -13218,9 +13234,9 @@ const __iconNode$m = [
|
|
|
13218
13234
|
}
|
|
13219
13235
|
]
|
|
13220
13236
|
];
|
|
13221
|
-
const CircleDollarSign = createLucideIcon("circle-dollar-sign", __iconNode$
|
|
13237
|
+
const CircleDollarSign = createLucideIcon("circle-dollar-sign", __iconNode$n);
|
|
13222
13238
|
|
|
13223
|
-
const __iconNode$
|
|
13239
|
+
const __iconNode$m = [
|
|
13224
13240
|
[
|
|
13225
13241
|
"circle",
|
|
13226
13242
|
{
|
|
@@ -13238,9 +13254,9 @@ const __iconNode$l = [
|
|
|
13238
13254
|
}
|
|
13239
13255
|
]
|
|
13240
13256
|
];
|
|
13241
|
-
const Clock = createLucideIcon("clock", __iconNode$
|
|
13257
|
+
const Clock = createLucideIcon("clock", __iconNode$m);
|
|
13242
13258
|
|
|
13243
|
-
const __iconNode$
|
|
13259
|
+
const __iconNode$l = [
|
|
13244
13260
|
[
|
|
13245
13261
|
"rect",
|
|
13246
13262
|
{
|
|
@@ -13261,9 +13277,9 @@ const __iconNode$k = [
|
|
|
13261
13277
|
}
|
|
13262
13278
|
]
|
|
13263
13279
|
];
|
|
13264
|
-
const Copy = createLucideIcon("copy", __iconNode$
|
|
13280
|
+
const Copy = createLucideIcon("copy", __iconNode$l);
|
|
13265
13281
|
|
|
13266
|
-
const __iconNode$
|
|
13282
|
+
const __iconNode$k = [
|
|
13267
13283
|
[
|
|
13268
13284
|
"path",
|
|
13269
13285
|
{
|
|
@@ -13371,9 +13387,9 @@ const __iconNode$j = [
|
|
|
13371
13387
|
}
|
|
13372
13388
|
]
|
|
13373
13389
|
];
|
|
13374
|
-
const Cpu = createLucideIcon("cpu", __iconNode$
|
|
13390
|
+
const Cpu = createLucideIcon("cpu", __iconNode$k);
|
|
13375
13391
|
|
|
13376
|
-
const __iconNode$
|
|
13392
|
+
const __iconNode$j = [
|
|
13377
13393
|
[
|
|
13378
13394
|
"line",
|
|
13379
13395
|
{
|
|
@@ -13392,9 +13408,9 @@ const __iconNode$i = [
|
|
|
13392
13408
|
}
|
|
13393
13409
|
]
|
|
13394
13410
|
];
|
|
13395
|
-
const DollarSign = createLucideIcon("dollar-sign", __iconNode$
|
|
13411
|
+
const DollarSign = createLucideIcon("dollar-sign", __iconNode$j);
|
|
13396
13412
|
|
|
13397
|
-
const __iconNode$
|
|
13413
|
+
const __iconNode$i = [
|
|
13398
13414
|
[
|
|
13399
13415
|
"path",
|
|
13400
13416
|
{
|
|
@@ -13424,9 +13440,9 @@ const __iconNode$h = [
|
|
|
13424
13440
|
}
|
|
13425
13441
|
]
|
|
13426
13442
|
];
|
|
13427
|
-
const FileInput = createLucideIcon("file-input", __iconNode$
|
|
13443
|
+
const FileInput = createLucideIcon("file-input", __iconNode$i);
|
|
13428
13444
|
|
|
13429
|
-
const __iconNode$
|
|
13445
|
+
const __iconNode$h = [
|
|
13430
13446
|
[
|
|
13431
13447
|
"path",
|
|
13432
13448
|
{
|
|
@@ -13456,9 +13472,9 @@ const __iconNode$g = [
|
|
|
13456
13472
|
}
|
|
13457
13473
|
]
|
|
13458
13474
|
];
|
|
13459
|
-
const FileOutput = createLucideIcon("file-output", __iconNode$
|
|
13475
|
+
const FileOutput = createLucideIcon("file-output", __iconNode$h);
|
|
13460
13476
|
|
|
13461
|
-
const __iconNode$
|
|
13477
|
+
const __iconNode$g = [
|
|
13462
13478
|
[
|
|
13463
13479
|
"path",
|
|
13464
13480
|
{
|
|
@@ -13516,9 +13532,9 @@ const __iconNode$f = [
|
|
|
13516
13532
|
}
|
|
13517
13533
|
]
|
|
13518
13534
|
];
|
|
13519
|
-
const FoldVertical = createLucideIcon("fold-vertical", __iconNode$
|
|
13535
|
+
const FoldVertical = createLucideIcon("fold-vertical", __iconNode$g);
|
|
13520
13536
|
|
|
13521
|
-
const __iconNode$
|
|
13537
|
+
const __iconNode$f = [
|
|
13522
13538
|
[
|
|
13523
13539
|
"line",
|
|
13524
13540
|
{
|
|
@@ -13560,9 +13576,9 @@ const __iconNode$e = [
|
|
|
13560
13576
|
}
|
|
13561
13577
|
]
|
|
13562
13578
|
];
|
|
13563
|
-
const Hash = createLucideIcon("hash", __iconNode$
|
|
13579
|
+
const Hash = createLucideIcon("hash", __iconNode$f);
|
|
13564
13580
|
|
|
13565
|
-
const __iconNode$
|
|
13581
|
+
const __iconNode$e = [
|
|
13566
13582
|
[
|
|
13567
13583
|
"circle",
|
|
13568
13584
|
{
|
|
@@ -13587,9 +13603,9 @@ const __iconNode$d = [
|
|
|
13587
13603
|
}
|
|
13588
13604
|
]
|
|
13589
13605
|
];
|
|
13590
|
-
const Info = createLucideIcon("info", __iconNode$
|
|
13606
|
+
const Info = createLucideIcon("info", __iconNode$e);
|
|
13591
13607
|
|
|
13592
|
-
const __iconNode$
|
|
13608
|
+
const __iconNode$d = [
|
|
13593
13609
|
[
|
|
13594
13610
|
"path",
|
|
13595
13611
|
{
|
|
@@ -13626,9 +13642,9 @@ const __iconNode$c = [
|
|
|
13626
13642
|
}
|
|
13627
13643
|
]
|
|
13628
13644
|
];
|
|
13629
|
-
const ListChecks = createLucideIcon("list-checks", __iconNode$
|
|
13645
|
+
const ListChecks = createLucideIcon("list-checks", __iconNode$d);
|
|
13630
13646
|
|
|
13631
|
-
const __iconNode$
|
|
13647
|
+
const __iconNode$c = [
|
|
13632
13648
|
[
|
|
13633
13649
|
"path",
|
|
13634
13650
|
{
|
|
@@ -13644,9 +13660,9 @@ const __iconNode$b = [
|
|
|
13644
13660
|
}
|
|
13645
13661
|
]
|
|
13646
13662
|
];
|
|
13647
|
-
const MessagesSquare = createLucideIcon("messages-square", __iconNode$
|
|
13663
|
+
const MessagesSquare = createLucideIcon("messages-square", __iconNode$c);
|
|
13648
13664
|
|
|
13649
|
-
const __iconNode$
|
|
13665
|
+
const __iconNode$b = [
|
|
13650
13666
|
[
|
|
13651
13667
|
"rect",
|
|
13652
13668
|
{
|
|
@@ -13666,9 +13682,9 @@ const __iconNode$a = [
|
|
|
13666
13682
|
}
|
|
13667
13683
|
]
|
|
13668
13684
|
];
|
|
13669
|
-
const PanelLeft = createLucideIcon("panel-left", __iconNode$
|
|
13685
|
+
const PanelLeft = createLucideIcon("panel-left", __iconNode$b);
|
|
13670
13686
|
|
|
13671
|
-
const __iconNode$
|
|
13687
|
+
const __iconNode$a = [
|
|
13672
13688
|
[
|
|
13673
13689
|
"path",
|
|
13674
13690
|
{
|
|
@@ -13698,9 +13714,9 @@ const __iconNode$9 = [
|
|
|
13698
13714
|
}
|
|
13699
13715
|
]
|
|
13700
13716
|
];
|
|
13701
|
-
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$
|
|
13717
|
+
const RefreshCw = createLucideIcon("refresh-cw", __iconNode$a);
|
|
13702
13718
|
|
|
13703
|
-
const __iconNode$
|
|
13719
|
+
const __iconNode$9 = [
|
|
13704
13720
|
[
|
|
13705
13721
|
"path",
|
|
13706
13722
|
{
|
|
@@ -13737,9 +13753,9 @@ const __iconNode$8 = [
|
|
|
13737
13753
|
}
|
|
13738
13754
|
]
|
|
13739
13755
|
];
|
|
13740
|
-
const Scale = createLucideIcon("scale", __iconNode$
|
|
13756
|
+
const Scale = createLucideIcon("scale", __iconNode$9);
|
|
13741
13757
|
|
|
13742
|
-
const __iconNode$
|
|
13758
|
+
const __iconNode$8 = [
|
|
13743
13759
|
[
|
|
13744
13760
|
"path",
|
|
13745
13761
|
{
|
|
@@ -13773,9 +13789,9 @@ const __iconNode$7 = [
|
|
|
13773
13789
|
}
|
|
13774
13790
|
]
|
|
13775
13791
|
];
|
|
13776
|
-
const Settings2 = createLucideIcon("settings-2", __iconNode$
|
|
13792
|
+
const Settings2 = createLucideIcon("settings-2", __iconNode$8);
|
|
13777
13793
|
|
|
13778
|
-
const __iconNode$
|
|
13794
|
+
const __iconNode$7 = [
|
|
13779
13795
|
[
|
|
13780
13796
|
"path",
|
|
13781
13797
|
{
|
|
@@ -13798,7 +13814,18 @@ const __iconNode$6 = [
|
|
|
13798
13814
|
}
|
|
13799
13815
|
]
|
|
13800
13816
|
];
|
|
13801
|
-
const Share = createLucideIcon("share", __iconNode$
|
|
13817
|
+
const Share = createLucideIcon("share", __iconNode$7);
|
|
13818
|
+
|
|
13819
|
+
const __iconNode$6 = [
|
|
13820
|
+
[
|
|
13821
|
+
"path",
|
|
13822
|
+
{
|
|
13823
|
+
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",
|
|
13824
|
+
key: "oel41y"
|
|
13825
|
+
}
|
|
13826
|
+
]
|
|
13827
|
+
];
|
|
13828
|
+
const Shield = createLucideIcon("shield", __iconNode$6);
|
|
13802
13829
|
|
|
13803
13830
|
const __iconNode$5 = [
|
|
13804
13831
|
[
|
|
@@ -15867,6 +15894,18 @@ function css() {
|
|
|
15867
15894
|
}
|
|
15868
15895
|
return serializeStyles(args);
|
|
15869
15896
|
}
|
|
15897
|
+
function keyframes() {
|
|
15898
|
+
var insertable = css.apply(void 0, arguments);
|
|
15899
|
+
var name = "animation-" + insertable.name;
|
|
15900
|
+
return {
|
|
15901
|
+
name: name,
|
|
15902
|
+
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
15903
|
+
anim: 1,
|
|
15904
|
+
toString: function toString() {
|
|
15905
|
+
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
15906
|
+
}
|
|
15907
|
+
};
|
|
15908
|
+
}
|
|
15870
15909
|
|
|
15871
15910
|
const lightTheme = {
|
|
15872
15911
|
colors: {
|
|
@@ -21505,7 +21544,7 @@ function getFontSizes(base) {
|
|
|
21505
21544
|
}));
|
|
21506
21545
|
}
|
|
21507
21546
|
|
|
21508
|
-
var version = '6.3.
|
|
21547
|
+
var version = '6.3.6';
|
|
21509
21548
|
|
|
21510
21549
|
const defaultPresetColors = {
|
|
21511
21550
|
blue: '#1677FF',
|
|
@@ -21807,12 +21846,14 @@ const generateColorPalettes = (baseColor)=>{
|
|
|
21807
21846
|
10: colors[6]
|
|
21808
21847
|
};
|
|
21809
21848
|
};
|
|
21810
|
-
const generateNeutralColorPalettes = (bgBaseColor, textBaseColor)=>{
|
|
21849
|
+
const generateNeutralColorPalettes = (bgBaseColor, textBaseColor, shadowColor)=>{
|
|
21811
21850
|
const colorBgBase = bgBaseColor || '#fff';
|
|
21812
21851
|
const colorTextBase = textBaseColor || '#000';
|
|
21852
|
+
const colorShadow = shadowColor || '#000';
|
|
21813
21853
|
return {
|
|
21814
21854
|
colorBgBase,
|
|
21815
21855
|
colorTextBase,
|
|
21856
|
+
colorShadow,
|
|
21816
21857
|
colorText: getAlphaColor$1(colorTextBase, 0.88),
|
|
21817
21858
|
colorTextSecondary: getAlphaColor$1(colorTextBase, 0.65),
|
|
21818
21859
|
colorTextTertiary: getAlphaColor$1(colorTextBase, 0.45),
|
|
@@ -21934,6 +21975,9 @@ function getAlphaColor(frontColor, backgroundColor) {
|
|
|
21934
21975
|
...restToken,
|
|
21935
21976
|
...overrideTokens
|
|
21936
21977
|
};
|
|
21978
|
+
const shadowBaseColor = new FastColor(mergedToken.colorShadow);
|
|
21979
|
+
const shadowBaseAlpha = shadowBaseColor.a;
|
|
21980
|
+
const getShadowColor = (alpha)=>shadowBaseColor.clone().setA(shadowBaseAlpha * alpha).toRgbString();
|
|
21937
21981
|
const screenXS = 480;
|
|
21938
21982
|
const screenSM = 576;
|
|
21939
21983
|
const screenMD = 768;
|
|
@@ -22022,19 +22066,19 @@ function getAlphaColor(frontColor, backgroundColor) {
|
|
|
22022
22066
|
marginXL: mergedToken.sizeXL,
|
|
22023
22067
|
marginXXL: mergedToken.sizeXXL,
|
|
22024
22068
|
boxShadow: `
|
|
22025
|
-
0 6px 16px 0
|
|
22026
|
-
0 3px 6px -4px
|
|
22027
|
-
0 9px 28px 8px
|
|
22069
|
+
0 6px 16px 0 ${getShadowColor(0.08)},
|
|
22070
|
+
0 3px 6px -4px ${getShadowColor(0.12)},
|
|
22071
|
+
0 9px 28px 8px ${getShadowColor(0.05)}
|
|
22028
22072
|
`,
|
|
22029
22073
|
boxShadowSecondary: `
|
|
22030
|
-
0 6px 16px 0
|
|
22031
|
-
0 3px 6px -4px
|
|
22032
|
-
0 9px 28px 8px
|
|
22074
|
+
0 6px 16px 0 ${getShadowColor(0.08)},
|
|
22075
|
+
0 3px 6px -4px ${getShadowColor(0.12)},
|
|
22076
|
+
0 9px 28px 8px ${getShadowColor(0.05)}
|
|
22033
22077
|
`,
|
|
22034
22078
|
boxShadowTertiary: `
|
|
22035
|
-
0 1px 2px 0
|
|
22036
|
-
0 1px 6px -1px
|
|
22037
|
-
0 2px 4px 0
|
|
22079
|
+
0 1px 2px 0 ${getShadowColor(0.03)},
|
|
22080
|
+
0 1px 6px -1px ${getShadowColor(0.02)},
|
|
22081
|
+
0 2px 4px 0 ${getShadowColor(0.02)}
|
|
22038
22082
|
`,
|
|
22039
22083
|
screenXS,
|
|
22040
22084
|
screenXSMin: screenXS,
|
|
@@ -22056,36 +22100,36 @@ function getAlphaColor(frontColor, backgroundColor) {
|
|
|
22056
22100
|
screenXXLMax: screenXXXL - 1,
|
|
22057
22101
|
screenXXXL,
|
|
22058
22102
|
screenXXXLMin: screenXXXL,
|
|
22059
|
-
boxShadowPopoverArrow:
|
|
22103
|
+
boxShadowPopoverArrow: `2px 2px 5px ${getShadowColor(0.05)}`,
|
|
22060
22104
|
boxShadowCard: `
|
|
22061
|
-
0 1px 2px -2px ${
|
|
22062
|
-
0 3px 6px 0 ${
|
|
22063
|
-
0 5px 12px 4px ${
|
|
22105
|
+
0 1px 2px -2px ${getShadowColor(0.16)},
|
|
22106
|
+
0 3px 6px 0 ${getShadowColor(0.12)},
|
|
22107
|
+
0 5px 12px 4px ${getShadowColor(0.09)}
|
|
22064
22108
|
`,
|
|
22065
22109
|
boxShadowDrawerRight: `
|
|
22066
|
-
-6px 0 16px 0
|
|
22067
|
-
-3px 0 6px -4px
|
|
22068
|
-
-9px 0 28px 8px
|
|
22110
|
+
-6px 0 16px 0 ${getShadowColor(0.08)},
|
|
22111
|
+
-3px 0 6px -4px ${getShadowColor(0.12)},
|
|
22112
|
+
-9px 0 28px 8px ${getShadowColor(0.05)}
|
|
22069
22113
|
`,
|
|
22070
22114
|
boxShadowDrawerLeft: `
|
|
22071
|
-
6px 0 16px 0
|
|
22072
|
-
3px 0 6px -4px
|
|
22073
|
-
9px 0 28px 8px
|
|
22115
|
+
6px 0 16px 0 ${getShadowColor(0.08)},
|
|
22116
|
+
3px 0 6px -4px ${getShadowColor(0.12)},
|
|
22117
|
+
9px 0 28px 8px ${getShadowColor(0.05)}
|
|
22074
22118
|
`,
|
|
22075
22119
|
boxShadowDrawerUp: `
|
|
22076
|
-
0 6px 16px 0
|
|
22077
|
-
0 3px 6px -4px
|
|
22078
|
-
0 9px 28px 8px
|
|
22120
|
+
0 6px 16px 0 ${getShadowColor(0.08)},
|
|
22121
|
+
0 3px 6px -4px ${getShadowColor(0.12)},
|
|
22122
|
+
0 9px 28px 8px ${getShadowColor(0.05)}
|
|
22079
22123
|
`,
|
|
22080
22124
|
boxShadowDrawerDown: `
|
|
22081
|
-
0 -6px 16px 0
|
|
22082
|
-
0 -3px 6px -4px
|
|
22083
|
-
0 -9px 28px 8px
|
|
22125
|
+
0 -6px 16px 0 ${getShadowColor(0.08)},
|
|
22126
|
+
0 -3px 6px -4px ${getShadowColor(0.12)},
|
|
22127
|
+
0 -9px 28px 8px ${getShadowColor(0.05)}
|
|
22084
22128
|
`,
|
|
22085
|
-
boxShadowTabsOverflowLeft:
|
|
22086
|
-
boxShadowTabsOverflowRight:
|
|
22087
|
-
boxShadowTabsOverflowTop:
|
|
22088
|
-
boxShadowTabsOverflowBottom:
|
|
22129
|
+
boxShadowTabsOverflowLeft: `inset 10px 0 8px -8px ${getShadowColor(0.08)}`,
|
|
22130
|
+
boxShadowTabsOverflowRight: `inset -10px 0 8px -8px ${getShadowColor(0.08)}`,
|
|
22131
|
+
boxShadowTabsOverflowTop: `inset 0 10px 8px -8px ${getShadowColor(0.08)}`,
|
|
22132
|
+
boxShadowTabsOverflowBottom: `inset 0 -10px 8px -8px ${getShadowColor(0.08)}`,
|
|
22089
22133
|
// Override AliasToken
|
|
22090
22134
|
...overrideTokens
|
|
22091
22135
|
};
|
|
@@ -22128,7 +22172,10 @@ const preserve = {
|
|
|
22128
22172
|
screenXLMin: true,
|
|
22129
22173
|
screenXLMax: true,
|
|
22130
22174
|
screenXXL: true,
|
|
22131
|
-
screenXXLMin: true
|
|
22175
|
+
screenXXLMin: true,
|
|
22176
|
+
screenXXLMax: true,
|
|
22177
|
+
screenXXXL: true,
|
|
22178
|
+
screenXXXLMin: true
|
|
22132
22179
|
};
|
|
22133
22180
|
const getComputedToken = (originToken, overrideToken, theme)=>{
|
|
22134
22181
|
const derivativeToken = theme.getDerivativeToken(originToken);
|
|
@@ -22160,6 +22207,7 @@ const getComputedToken = (originToken, overrideToken, theme)=>{
|
|
|
22160
22207
|
// ================================== Hook ==================================
|
|
22161
22208
|
function useToken() {
|
|
22162
22209
|
const { token: rootDesignToken, hashed, theme, override, cssVar: ctxCssVar, zeroRuntime } = React__default.useContext(DesignTokenContext);
|
|
22210
|
+
const { csp } = React__default.useContext(ConfigContext);
|
|
22163
22211
|
const cssVar = {
|
|
22164
22212
|
prefix: ctxCssVar?.prefix ?? 'ant',
|
|
22165
22213
|
key: ctxCssVar?.key ?? 'css-var-root'
|
|
@@ -22178,7 +22226,8 @@ function useToken() {
|
|
|
22178
22226
|
unitless,
|
|
22179
22227
|
ignore,
|
|
22180
22228
|
preserve
|
|
22181
|
-
}
|
|
22229
|
+
},
|
|
22230
|
+
nonce: csp?.nonce
|
|
22182
22231
|
});
|
|
22183
22232
|
return [
|
|
22184
22233
|
mergedTheme,
|
|
@@ -22240,6 +22289,17 @@ const clearFix = ()=>({
|
|
|
22240
22289
|
content: '""'
|
|
22241
22290
|
}
|
|
22242
22291
|
});
|
|
22292
|
+
const genFocusOutline = (token, offset)=>({
|
|
22293
|
+
outline: `${unit(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,
|
|
22294
|
+
outlineOffset: offset ?? 1,
|
|
22295
|
+
transition: [
|
|
22296
|
+
`outline-offset`,
|
|
22297
|
+
`outline`
|
|
22298
|
+
].map((prop)=>`${prop} 0s`).join(', ')
|
|
22299
|
+
});
|
|
22300
|
+
const genFocusStyle = (token, offset)=>({
|
|
22301
|
+
'&:focus-visible': genFocusOutline(token, offset)
|
|
22302
|
+
});
|
|
22243
22303
|
const genLinkStyle = (token)=>({
|
|
22244
22304
|
a: {
|
|
22245
22305
|
color: token.colorLink,
|
|
@@ -22266,6 +22326,7 @@ const genLinkStyle = (token)=>({
|
|
|
22266
22326
|
textDecoration: token.linkFocusDecoration,
|
|
22267
22327
|
outline: 0
|
|
22268
22328
|
},
|
|
22329
|
+
...genFocusStyle(token),
|
|
22269
22330
|
'&[disabled]': {
|
|
22270
22331
|
color: token.colorTextDisabled,
|
|
22271
22332
|
cursor: 'not-allowed'
|
|
@@ -22296,17 +22357,6 @@ const genCommonStyle = (token, componentPrefixCls, rootCls, resetFont)=>{
|
|
|
22296
22357
|
}
|
|
22297
22358
|
};
|
|
22298
22359
|
};
|
|
22299
|
-
const genFocusOutline = (token, offset)=>({
|
|
22300
|
-
outline: `${unit(token.lineWidthFocus)} solid ${token.colorPrimaryBorder}`,
|
|
22301
|
-
outlineOffset: offset ?? 1,
|
|
22302
|
-
transition: [
|
|
22303
|
-
`outline-offset`,
|
|
22304
|
-
`outline`
|
|
22305
|
-
].map((prop)=>`${prop} 0s`).join(', ')
|
|
22306
|
-
});
|
|
22307
|
-
const genFocusStyle = (token, offset)=>({
|
|
22308
|
-
'&:focus-visible': genFocusOutline(token, offset)
|
|
22309
|
-
});
|
|
22310
22360
|
const genIconStyle = (iconPrefixCls)=>({
|
|
22311
22361
|
[`.${iconPrefixCls}`]: {
|
|
22312
22362
|
...resetIcon(),
|
|
@@ -22809,6 +22859,12 @@ function mergeProps$1(...items) {
|
|
|
22809
22859
|
const isNonNullable = (val)=>{
|
|
22810
22860
|
return val !== undefined && val !== null;
|
|
22811
22861
|
};
|
|
22862
|
+
const isNumber = (val)=>{
|
|
22863
|
+
return typeof val === 'number' && !Number.isNaN(val);
|
|
22864
|
+
};
|
|
22865
|
+
const isPrimitive = (value)=>{
|
|
22866
|
+
return typeof value !== 'object' && typeof value !== 'function' || value === null;
|
|
22867
|
+
};
|
|
22812
22868
|
|
|
22813
22869
|
const pickClosable = (context)=>{
|
|
22814
22870
|
if (!context) {
|
|
@@ -23238,7 +23294,7 @@ const genAlertTypeStyle = (bgColor, borderColor, iconColor, token, alertCls)=>({
|
|
|
23238
23294
|
color: iconColor
|
|
23239
23295
|
}
|
|
23240
23296
|
});
|
|
23241
|
-
const genBaseStyle$
|
|
23297
|
+
const genBaseStyle$7 = (token)=>{
|
|
23242
23298
|
const { componentCls, motionDurationSlow: duration, marginXS, marginSM, fontSize, fontSizeLG, lineHeight, borderRadiusLG: borderRadius, motionEaseInOutCirc, withDescriptionIconSize, colorText, colorTextHeading, withDescriptionPadding, defaultPadding } = token;
|
|
23243
23299
|
return {
|
|
23244
23300
|
[componentCls]: {
|
|
@@ -23365,7 +23421,7 @@ const genActionStyle = (token)=>{
|
|
|
23365
23421
|
}
|
|
23366
23422
|
};
|
|
23367
23423
|
};
|
|
23368
|
-
const prepareComponentToken$
|
|
23424
|
+
const prepareComponentToken$n = (token)=>{
|
|
23369
23425
|
const paddingHorizontal = 12; // Fixed value here.
|
|
23370
23426
|
return {
|
|
23371
23427
|
withDescriptionIconSize: token.fontSizeHeading3,
|
|
@@ -23373,11 +23429,11 @@ const prepareComponentToken$m = (token)=>{
|
|
|
23373
23429
|
withDescriptionPadding: `${token.paddingMD}px ${token.paddingContentHorizontalLG}px`
|
|
23374
23430
|
};
|
|
23375
23431
|
};
|
|
23376
|
-
var useStyle$
|
|
23377
|
-
genBaseStyle$
|
|
23432
|
+
var useStyle$u = genStyleHooks('Alert', (token)=>[
|
|
23433
|
+
genBaseStyle$7(token),
|
|
23378
23434
|
genTypeStyle(token),
|
|
23379
23435
|
genActionStyle(token)
|
|
23380
|
-
], prepareComponentToken$
|
|
23436
|
+
], prepareComponentToken$n);
|
|
23381
23437
|
|
|
23382
23438
|
const IconNode = (props)=>{
|
|
23383
23439
|
const { icon, type, className, style, successIcon, infoIcon, warningIcon, errorIcon } = props;
|
|
@@ -23429,7 +23485,7 @@ const Alert$1 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
23429
23485
|
}));
|
|
23430
23486
|
const { getPrefixCls, direction, closable: contextClosable, closeIcon: contextCloseIcon, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, successIcon, infoIcon, warningIcon, errorIcon } = useComponentConfig('alert');
|
|
23431
23487
|
const prefixCls = getPrefixCls('alert', customizePrefixCls);
|
|
23432
|
-
const [hashId, cssVarCls] = useStyle$
|
|
23488
|
+
const [hashId, cssVarCls] = useStyle$u(prefixCls);
|
|
23433
23489
|
const { onClose: closableOnClose, afterClose: closableAfterClose } = closable && typeof closable === 'object' ? closable : {};
|
|
23434
23490
|
const handleClose = (e)=>{
|
|
23435
23491
|
setClosed(true);
|
|
@@ -23682,20 +23738,18 @@ function _inherits(t, e) {
|
|
|
23682
23738
|
}), e && _setPrototypeOf(t, e);
|
|
23683
23739
|
}
|
|
23684
23740
|
|
|
23685
|
-
let ErrorBoundary$1 = /*#__PURE__*/ function(_React$
|
|
23741
|
+
let ErrorBoundary$1 = /*#__PURE__*/ function(_React$PureComponent) {
|
|
23686
23742
|
function ErrorBoundary() {
|
|
23687
23743
|
var _this;
|
|
23688
23744
|
_classCallCheck(this, ErrorBoundary);
|
|
23689
23745
|
_this = _callSuper(this, ErrorBoundary, arguments);
|
|
23690
23746
|
_this.state = {
|
|
23691
23747
|
error: undefined,
|
|
23692
|
-
info: {
|
|
23693
|
-
componentStack: ''
|
|
23694
|
-
}
|
|
23748
|
+
info: {}
|
|
23695
23749
|
};
|
|
23696
23750
|
return _this;
|
|
23697
23751
|
}
|
|
23698
|
-
_inherits(ErrorBoundary, _React$
|
|
23752
|
+
_inherits(ErrorBoundary, _React$PureComponent);
|
|
23699
23753
|
return _createClass(ErrorBoundary, [
|
|
23700
23754
|
{
|
|
23701
23755
|
key: "componentDidCatch",
|
|
@@ -23713,8 +23767,8 @@ let ErrorBoundary$1 = /*#__PURE__*/ function(_React$Component) {
|
|
|
23713
23767
|
const { error, info } = this.state;
|
|
23714
23768
|
const mergedTitle = title ?? message;
|
|
23715
23769
|
const componentStack = info?.componentStack || null;
|
|
23716
|
-
const errorMessage =
|
|
23717
|
-
const errorDescription =
|
|
23770
|
+
const errorMessage = isNonNullable(mergedTitle) ? mergedTitle : error?.toString();
|
|
23771
|
+
const errorDescription = isNonNullable(description) ? description : componentStack;
|
|
23718
23772
|
if (error) {
|
|
23719
23773
|
return /*#__PURE__*/ React.createElement(Alert$1, {
|
|
23720
23774
|
id: id,
|
|
@@ -23732,14 +23786,14 @@ let ErrorBoundary$1 = /*#__PURE__*/ function(_React$Component) {
|
|
|
23732
23786
|
}
|
|
23733
23787
|
}
|
|
23734
23788
|
]);
|
|
23735
|
-
}(React.
|
|
23789
|
+
}(React.PureComponent);
|
|
23736
23790
|
|
|
23737
23791
|
const Alert = Alert$1;
|
|
23738
23792
|
Alert.ErrorBoundary = ErrorBoundary$1;
|
|
23739
23793
|
|
|
23740
|
-
|
|
23794
|
+
const isWindow = (obj)=>{
|
|
23741
23795
|
return isNonNullable(obj) && obj === obj.window;
|
|
23742
|
-
}
|
|
23796
|
+
};
|
|
23743
23797
|
const getScroll = (target)=>{
|
|
23744
23798
|
if (typeof window === 'undefined') {
|
|
23745
23799
|
/* istanbul ignore next */ return 0;
|
|
@@ -23997,7 +24051,8 @@ function MotionWrapper(props) {
|
|
|
23997
24051
|
/**
|
|
23998
24052
|
* Warning for ConfigProviderProps.
|
|
23999
24053
|
* This will be empty function in production.
|
|
24000
|
-
*/ const PropWarning = /*#__PURE__*/ React.memo((
|
|
24054
|
+
*/ const PropWarning = /*#__PURE__*/ React.memo((props)=>{
|
|
24055
|
+
const { dropdownMatchSelectWidth } = props;
|
|
24001
24056
|
const warning = devUseWarning('ConfigProvider');
|
|
24002
24057
|
warning.deprecated(dropdownMatchSelectWidth === undefined, 'dropdownMatchSelectWidth', 'popupMatchSelectWidth');
|
|
24003
24058
|
return null;
|
|
@@ -24469,19 +24524,19 @@ const genMessageStyle = (token)=>{
|
|
|
24469
24524
|
}
|
|
24470
24525
|
];
|
|
24471
24526
|
};
|
|
24472
|
-
const prepareComponentToken$
|
|
24527
|
+
const prepareComponentToken$m = (token)=>({
|
|
24473
24528
|
zIndexPopup: token.zIndexPopupBase + CONTAINER_MAX_OFFSET + 10,
|
|
24474
24529
|
contentBg: token.colorBgElevated,
|
|
24475
24530
|
contentPadding: `${(token.controlHeightLG - token.fontSize * token.lineHeight) / 2}px ${token.paddingSM}px`
|
|
24476
24531
|
});
|
|
24477
24532
|
// ============================== Export ==============================
|
|
24478
|
-
var useStyle$
|
|
24533
|
+
var useStyle$t = genStyleHooks('Message', (token)=>{
|
|
24479
24534
|
// Gen-style functions here
|
|
24480
24535
|
const combinedToken = mergeToken(token, {
|
|
24481
24536
|
height: 150
|
|
24482
24537
|
});
|
|
24483
24538
|
return genMessageStyle(combinedToken);
|
|
24484
|
-
}, prepareComponentToken$
|
|
24539
|
+
}, prepareComponentToken$m);
|
|
24485
24540
|
|
|
24486
24541
|
const TypeIcon = {
|
|
24487
24542
|
info: /*#__PURE__*/ React.createElement(InfoCircleFilled, null),
|
|
@@ -24510,12 +24565,12 @@ const PureContent = (props)=>{
|
|
|
24510
24565
|
style: styles?.content
|
|
24511
24566
|
}, children));
|
|
24512
24567
|
};
|
|
24513
|
-
/** @private Internal Component. Do not use in your production. */ const PurePanel$
|
|
24568
|
+
/** @private Internal Component. Do not use in your production. */ const PurePanel$5 = (props)=>{
|
|
24514
24569
|
const { prefixCls: staticPrefixCls, className, style, type, icon, content, classNames: messageClassNames, styles, ...restProps } = props;
|
|
24515
24570
|
const { getPrefixCls, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('message');
|
|
24516
24571
|
const prefixCls = staticPrefixCls || getPrefixCls('message');
|
|
24517
24572
|
const rootCls = useCSSVarCls(prefixCls);
|
|
24518
|
-
const [hashId, cssVarCls] = useStyle$
|
|
24573
|
+
const [hashId, cssVarCls] = useStyle$t(prefixCls, rootCls);
|
|
24519
24574
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
24520
24575
|
contextClassNames,
|
|
24521
24576
|
messageClassNames
|
|
@@ -24570,7 +24625,7 @@ const DEFAULT_OFFSET = 8;
|
|
|
24570
24625
|
const DEFAULT_DURATION = 3;
|
|
24571
24626
|
const Wrapper = ({ children, prefixCls })=>{
|
|
24572
24627
|
const rootCls = useCSSVarCls(prefixCls);
|
|
24573
|
-
const [hashId, cssVarCls] = useStyle$
|
|
24628
|
+
const [hashId, cssVarCls] = useStyle$t(prefixCls, rootCls);
|
|
24574
24629
|
return /*#__PURE__*/ React.createElement(NotificationProvider, {
|
|
24575
24630
|
classNames: {
|
|
24576
24631
|
list: clsx(hashId, cssVarCls, rootCls)
|
|
@@ -24651,7 +24706,6 @@ function useInternalMessage(messageConfig) {
|
|
|
24651
24706
|
if (!holderRef.current) {
|
|
24652
24707
|
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;
|
|
24653
24708
|
const fakeResult = ()=>{};
|
|
24654
|
-
// eslint-disable-next-line react-hooks/immutability
|
|
24655
24709
|
fakeResult.then = ()=>{};
|
|
24656
24710
|
return fakeResult;
|
|
24657
24711
|
}
|
|
@@ -24785,15 +24839,12 @@ const getCollapsedHeight = ()=>({
|
|
|
24785
24839
|
height: 0,
|
|
24786
24840
|
opacity: 0
|
|
24787
24841
|
});
|
|
24788
|
-
const getRealHeight = (node)=>{
|
|
24789
|
-
|
|
24790
|
-
|
|
24791
|
-
|
|
24792
|
-
opacity: 1
|
|
24793
|
-
};
|
|
24794
|
-
};
|
|
24842
|
+
const getRealHeight = (node)=>({
|
|
24843
|
+
height: node?.scrollHeight ?? 0,
|
|
24844
|
+
opacity: node ? 1 : 0
|
|
24845
|
+
});
|
|
24795
24846
|
const getCurrentHeight = (node)=>({
|
|
24796
|
-
height: node
|
|
24847
|
+
height: node?.offsetHeight ?? 0
|
|
24797
24848
|
});
|
|
24798
24849
|
const skipOpacityTransition = (_, event)=>event?.deadline === true || event.propertyName === 'height';
|
|
24799
24850
|
const initCollapseMotion = (rootCls = defaultPrefixCls)=>({
|
|
@@ -24848,7 +24899,7 @@ const genWaveStyle = (token)=>{
|
|
|
24848
24899
|
}
|
|
24849
24900
|
};
|
|
24850
24901
|
};
|
|
24851
|
-
var useStyle$
|
|
24902
|
+
var useStyle$s = genComponentStyleHook('Wave', genWaveStyle);
|
|
24852
24903
|
|
|
24853
24904
|
const TARGET_CLS = `${defaultPrefixCls}-wave-target`;
|
|
24854
24905
|
|
|
@@ -25002,15 +25053,15 @@ const useWave = (nodeRef, className, component, colorSource)=>{
|
|
|
25002
25053
|
colorSource
|
|
25003
25054
|
});
|
|
25004
25055
|
});
|
|
25005
|
-
const
|
|
25056
|
+
const rafIdRef = React.useRef(null);
|
|
25006
25057
|
// Clean up RAF on unmount to prevent memory leaks and stale callbacks
|
|
25007
25058
|
React.useEffect(()=>()=>{
|
|
25008
|
-
raf.cancel(
|
|
25059
|
+
raf.cancel(rafIdRef.current);
|
|
25009
25060
|
}, []);
|
|
25010
25061
|
// Merge trigger event into one for each frame
|
|
25011
25062
|
const showDebounceWave = (event)=>{
|
|
25012
|
-
raf.cancel(
|
|
25013
|
-
|
|
25063
|
+
raf.cancel(rafIdRef.current);
|
|
25064
|
+
rafIdRef.current = raf(()=>{
|
|
25014
25065
|
showWave(event);
|
|
25015
25066
|
});
|
|
25016
25067
|
};
|
|
@@ -25023,7 +25074,7 @@ const Wave = (props)=>{
|
|
|
25023
25074
|
const containerRef = useRef(null);
|
|
25024
25075
|
// ============================== Style ===============================
|
|
25025
25076
|
const prefixCls = getPrefixCls('wave');
|
|
25026
|
-
const hashId = useStyle$
|
|
25077
|
+
const hashId = useStyle$s(prefixCls);
|
|
25027
25078
|
// =============================== Wave ===============================
|
|
25028
25079
|
const showWave = useWave(containerRef, clsx(prefixCls, hashId), component, colorSource);
|
|
25029
25080
|
// ============================== Effect ==============================
|
|
@@ -25101,7 +25152,7 @@ const genSpaceCompactStyle = (token)=>{
|
|
|
25101
25152
|
};
|
|
25102
25153
|
};
|
|
25103
25154
|
// ============================== Export ==============================
|
|
25104
|
-
var useStyle$
|
|
25155
|
+
var useStyle$r = genStyleHooks([
|
|
25105
25156
|
'Space',
|
|
25106
25157
|
'Compact'
|
|
25107
25158
|
], genSpaceCompactStyle, ()=>({}), {
|
|
@@ -25160,7 +25211,7 @@ const Compact$1 = (props)=>{
|
|
|
25160
25211
|
const [mergedOrientation, mergedVertical] = useOrientation(orientation, vertical, direction);
|
|
25161
25212
|
const mergedSize = useSize((ctx)=>size ?? ctx);
|
|
25162
25213
|
const prefixCls = getPrefixCls('space-compact', customizePrefixCls);
|
|
25163
|
-
const [hashId] = useStyle$
|
|
25214
|
+
const [hashId] = useStyle$r(prefixCls);
|
|
25164
25215
|
const clx = clsx(prefixCls, hashId, {
|
|
25165
25216
|
[`${prefixCls}-rtl`]: directionConfig === 'rtl',
|
|
25166
25217
|
[`${prefixCls}-block`]: block,
|
|
@@ -25217,8 +25268,8 @@ const ButtonGroup = (props)=>{
|
|
|
25217
25268
|
warning.deprecated(false, 'Button.Group', 'Space.Compact');
|
|
25218
25269
|
process.env.NODE_ENV !== "production" ? warning(!size || [
|
|
25219
25270
|
'large',
|
|
25220
|
-
'
|
|
25221
|
-
'
|
|
25271
|
+
'medium',
|
|
25272
|
+
'small'
|
|
25222
25273
|
].includes(size), 'usage', 'Invalid prop `size`.') : void 0;
|
|
25223
25274
|
}
|
|
25224
25275
|
const classes = clsx(prefixCls, {
|
|
@@ -25404,11 +25455,6 @@ const initMotionCommon = (duration)=>({
|
|
|
25404
25455
|
animationDuration: duration,
|
|
25405
25456
|
animationFillMode: 'both'
|
|
25406
25457
|
});
|
|
25407
|
-
// FIXME: origin less code seems same as initMotionCommon. Maybe we can safe remove
|
|
25408
|
-
const initMotionCommonLeave = (duration)=>({
|
|
25409
|
-
animationDuration: duration,
|
|
25410
|
-
animationFillMode: 'both'
|
|
25411
|
-
});
|
|
25412
25458
|
const initMotion = (motionCls, inKeyframes, outKeyframes, duration, sameLevel = false)=>{
|
|
25413
25459
|
const sameLevelPrefix = sameLevel ? '&' : '';
|
|
25414
25460
|
return {
|
|
@@ -25420,7 +25466,7 @@ const initMotion = (motionCls, inKeyframes, outKeyframes, duration, sameLevel =
|
|
|
25420
25466
|
animationPlayState: 'paused'
|
|
25421
25467
|
},
|
|
25422
25468
|
[`${sameLevelPrefix}${motionCls}-leave`]: {
|
|
25423
|
-
...
|
|
25469
|
+
...initMotionCommon(duration),
|
|
25424
25470
|
animationPlayState: 'paused'
|
|
25425
25471
|
},
|
|
25426
25472
|
[`
|
|
@@ -26161,7 +26207,7 @@ const CollapsePanel = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
26161
26207
|
});
|
|
26162
26208
|
});
|
|
26163
26209
|
|
|
26164
|
-
const genBaseStyle$
|
|
26210
|
+
const genBaseStyle$6 = (token)=>{
|
|
26165
26211
|
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;
|
|
26166
26212
|
const borderBase = `${unit(lineWidth)} ${lineType} ${colorBorder}`;
|
|
26167
26213
|
return {
|
|
@@ -26294,10 +26340,7 @@ const genBaseStyle$5 = (token)=>{
|
|
|
26294
26340
|
}
|
|
26295
26341
|
},
|
|
26296
26342
|
[`& ${componentCls}-item-disabled > ${componentCls}-header`]: {
|
|
26297
|
-
|
|
26298
|
-
&,
|
|
26299
|
-
& > .arrow
|
|
26300
|
-
`]: {
|
|
26343
|
+
'&, & > .arrow': {
|
|
26301
26344
|
color: colorTextDisabled,
|
|
26302
26345
|
cursor: 'not-allowed'
|
|
26303
26346
|
}
|
|
@@ -26375,7 +26418,7 @@ const genGhostStyle = (token)=>{
|
|
|
26375
26418
|
}
|
|
26376
26419
|
};
|
|
26377
26420
|
};
|
|
26378
|
-
const prepareComponentToken$
|
|
26421
|
+
const prepareComponentToken$l = (token)=>({
|
|
26379
26422
|
headerPadding: `${token.paddingSM}px ${token.padding}px`,
|
|
26380
26423
|
headerBg: token.colorFillAlter,
|
|
26381
26424
|
contentPadding: `${token.padding}px 16px`,
|
|
@@ -26384,20 +26427,20 @@ const prepareComponentToken$k = (token)=>({
|
|
|
26384
26427
|
borderlessContentPadding: `${token.paddingXXS}px 16px ${token.padding}px`,
|
|
26385
26428
|
borderlessContentBg: 'transparent'
|
|
26386
26429
|
});
|
|
26387
|
-
var useStyle$
|
|
26430
|
+
var useStyle$q = genStyleHooks('Collapse', (token)=>{
|
|
26388
26431
|
const collapseToken = mergeToken(token, {
|
|
26389
26432
|
collapseHeaderPaddingSM: `${unit(token.paddingXS)} ${unit(token.paddingSM)}`,
|
|
26390
26433
|
collapseHeaderPaddingLG: `${unit(token.padding)} ${unit(token.paddingLG)}`,
|
|
26391
26434
|
collapsePanelBorderRadius: token.borderRadiusLG
|
|
26392
26435
|
});
|
|
26393
26436
|
return [
|
|
26394
|
-
genBaseStyle$
|
|
26437
|
+
genBaseStyle$6(collapseToken),
|
|
26395
26438
|
genBorderlessStyle$1(collapseToken),
|
|
26396
26439
|
genGhostStyle(collapseToken),
|
|
26397
26440
|
genArrowStyle(collapseToken),
|
|
26398
26441
|
genCollapseMotion(collapseToken)
|
|
26399
26442
|
];
|
|
26400
|
-
}, prepareComponentToken$
|
|
26443
|
+
}, prepareComponentToken$l);
|
|
26401
26444
|
|
|
26402
26445
|
const Collapse = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
26403
26446
|
const { getPrefixCls, direction, expandIcon: contextExpandIcon, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('collapse');
|
|
@@ -26405,7 +26448,7 @@ const Collapse = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
26405
26448
|
const mergedSize = useSize((ctx)=>customizeSize ?? ctx ?? 'middle');
|
|
26406
26449
|
const prefixCls = getPrefixCls('collapse', customizePrefixCls);
|
|
26407
26450
|
const rootPrefixCls = getPrefixCls();
|
|
26408
|
-
const [hashId, cssVarCls] = useStyle$
|
|
26451
|
+
const [hashId, cssVarCls] = useStyle$q(prefixCls);
|
|
26409
26452
|
const mergedPlacement = expandIconPlacement ?? expandIconPosition ?? 'start';
|
|
26410
26453
|
// =========== Merged Props for Semantic ===========
|
|
26411
26454
|
const mergedProps = {
|
|
@@ -26456,7 +26499,8 @@ const Collapse = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
26456
26499
|
[`${prefixCls}-borderless`]: !bordered,
|
|
26457
26500
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
26458
26501
|
[`${prefixCls}-ghost`]: !!ghost,
|
|
26459
|
-
[`${prefixCls}
|
|
26502
|
+
[`${prefixCls}-large`]: mergedSize === 'large',
|
|
26503
|
+
[`${prefixCls}-small`]: mergedSize === 'small'
|
|
26460
26504
|
}, contextClassName, className, rootClassName, hashId, cssVarCls, mergedClassNames.root);
|
|
26461
26505
|
const openMotion = React.useMemo(()=>({
|
|
26462
26506
|
...initCollapseMotion(rootPrefixCls),
|
|
@@ -26474,8 +26518,7 @@ const Collapse = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
26474
26518
|
}, [
|
|
26475
26519
|
children
|
|
26476
26520
|
]);
|
|
26477
|
-
return
|
|
26478
|
-
React.createElement(RcCollapse, {
|
|
26521
|
+
return /*#__PURE__*/ React.createElement(RcCollapse, {
|
|
26479
26522
|
ref: ref,
|
|
26480
26523
|
openMotion: openMotion,
|
|
26481
26524
|
...omit(props, [
|
|
@@ -26492,7 +26535,7 @@ const Collapse = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
26492
26535
|
classNames: mergedClassNames,
|
|
26493
26536
|
styles: mergedStyles,
|
|
26494
26537
|
destroyOnHidden: destroyOnHidden ?? destroyInactivePanel
|
|
26495
|
-
}, items)
|
|
26538
|
+
}, items);
|
|
26496
26539
|
});
|
|
26497
26540
|
if (process.env.NODE_ENV !== 'production') {
|
|
26498
26541
|
Collapse.displayName = 'Collapse';
|
|
@@ -26528,7 +26571,7 @@ const prepareToken$2 = (token)=>{
|
|
|
26528
26571
|
});
|
|
26529
26572
|
return buttonToken;
|
|
26530
26573
|
};
|
|
26531
|
-
const prepareComponentToken$
|
|
26574
|
+
const prepareComponentToken$k = (token)=>{
|
|
26532
26575
|
const contentFontSize = token.contentFontSize ?? token.fontSize;
|
|
26533
26576
|
const contentFontSizeSM = token.contentFontSizeSM ?? token.fontSize;
|
|
26534
26577
|
const contentFontSizeLG = token.contentFontSizeLG ?? token.fontSizeLG;
|
|
@@ -27038,7 +27081,7 @@ const genBlockButtonStyle = (token)=>{
|
|
|
27038
27081
|
};
|
|
27039
27082
|
};
|
|
27040
27083
|
// ============================== Export ==============================
|
|
27041
|
-
var useStyle$
|
|
27084
|
+
var useStyle$p = genStyleHooks('Button', (token)=>{
|
|
27042
27085
|
const buttonToken = prepareToken$2(token);
|
|
27043
27086
|
return [
|
|
27044
27087
|
// Shared
|
|
@@ -27054,7 +27097,7 @@ var useStyle$o = genStyleHooks('Button', (token)=>{
|
|
|
27054
27097
|
// Button Group
|
|
27055
27098
|
genGroupStyle$1(buttonToken)
|
|
27056
27099
|
];
|
|
27057
|
-
}, prepareComponentToken$
|
|
27100
|
+
}, prepareComponentToken$k, {
|
|
27058
27101
|
unitless: {
|
|
27059
27102
|
fontWeight: true,
|
|
27060
27103
|
contentLineHeight: true,
|
|
@@ -27238,12 +27281,12 @@ var Compact = genSubStyleComponent([
|
|
|
27238
27281
|
genCompactItemVerticalStyle(buttonToken),
|
|
27239
27282
|
genButtonCompactStyle(buttonToken)
|
|
27240
27283
|
];
|
|
27241
|
-
}, prepareComponentToken$
|
|
27284
|
+
}, prepareComponentToken$k);
|
|
27242
27285
|
|
|
27243
27286
|
function getLoadingConfig(loading) {
|
|
27244
27287
|
if (typeof loading === 'object' && loading) {
|
|
27245
27288
|
let delay = loading?.delay;
|
|
27246
|
-
delay =
|
|
27289
|
+
delay = isNumber(delay) ? delay : 0;
|
|
27247
27290
|
return {
|
|
27248
27291
|
loading: delay <= 0,
|
|
27249
27292
|
delay
|
|
@@ -27346,7 +27389,7 @@ const InternalCompoundedButton = /*#__PURE__*/ React__default.forwardRef((props,
|
|
|
27346
27389
|
const mergedColorText = isDanger ? 'dangerous' : mergedColor;
|
|
27347
27390
|
const mergedInsertSpace = autoInsertSpace ?? contextAutoInsertSpace ?? true;
|
|
27348
27391
|
const prefixCls = getPrefixCls('btn', customizePrefixCls);
|
|
27349
|
-
const [hashId, cssVarCls] = useStyle$
|
|
27392
|
+
const [hashId, cssVarCls] = useStyle$p(prefixCls);
|
|
27350
27393
|
const disabled = useContext(DisabledContext);
|
|
27351
27394
|
const mergedDisabled = customDisabled ?? disabled;
|
|
27352
27395
|
const groupSize = useContext(GroupSizeContext);
|
|
@@ -27435,14 +27478,7 @@ const InternalCompoundedButton = /*#__PURE__*/ React__default.forwardRef((props,
|
|
|
27435
27478
|
}
|
|
27436
27479
|
// ========================== Size ==========================
|
|
27437
27480
|
const { compactSize, compactItemClassnames } = useCompactItemContext(prefixCls, direction);
|
|
27438
|
-
const sizeClassNameMap = {
|
|
27439
|
-
large: 'lg',
|
|
27440
|
-
small: 'sm',
|
|
27441
|
-
middle: undefined,
|
|
27442
|
-
medium: undefined
|
|
27443
|
-
};
|
|
27444
27481
|
const sizeFullName = useSize((ctxSize)=>customizeSize ?? compactSize ?? groupSize ?? ctxSize);
|
|
27445
|
-
const sizeCls = sizeFullName ? sizeClassNameMap[sizeFullName] ?? '' : '';
|
|
27446
27482
|
const iconType = innerLoading ? 'loading' : icon;
|
|
27447
27483
|
const mergedIconPlacement = iconPlacement ?? iconPosition ?? 'start';
|
|
27448
27484
|
const linkButtonRestProps = omit(rest, [
|
|
@@ -27479,7 +27515,8 @@ const InternalCompoundedButton = /*#__PURE__*/ React__default.forwardRef((props,
|
|
|
27479
27515
|
[`${prefixCls}-dangerous`]: danger,
|
|
27480
27516
|
[`${prefixCls}-color-${mergedColorText}`]: mergedColorText,
|
|
27481
27517
|
[`${prefixCls}-variant-${mergedVariant}`]: mergedVariant,
|
|
27482
|
-
[`${prefixCls}
|
|
27518
|
+
[`${prefixCls}-lg`]: sizeFullName === 'large',
|
|
27519
|
+
[`${prefixCls}-sm`]: sizeFullName === 'small',
|
|
27483
27520
|
[`${prefixCls}-icon-only`]: !children && children !== 0 && !!iconType,
|
|
27484
27521
|
[`${prefixCls}-background-ghost`]: ghost && !isUnBorderedButtonVariant(mergedVariant),
|
|
27485
27522
|
[`${prefixCls}-loading`]: innerLoading,
|
|
@@ -27630,6 +27667,10 @@ function useFocusable(focusable, defaultTrap, legacyFocusTriggerAfterClose) {
|
|
|
27630
27667
|
|
|
27631
27668
|
const Element$1 = (props)=>{
|
|
27632
27669
|
const { prefixCls, className, style, size, shape } = props;
|
|
27670
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
27671
|
+
const warning = devUseWarning('Skeleton');
|
|
27672
|
+
warning.deprecated(size !== 'default', 'size="default"', 'size="medium"');
|
|
27673
|
+
}
|
|
27633
27674
|
const sizeCls = clsx({
|
|
27634
27675
|
[`${prefixCls}-lg`]: size === 'large',
|
|
27635
27676
|
[`${prefixCls}-sm`]: size === 'small'
|
|
@@ -27639,7 +27680,7 @@ const Element$1 = (props)=>{
|
|
|
27639
27680
|
[`${prefixCls}-square`]: shape === 'square',
|
|
27640
27681
|
[`${prefixCls}-round`]: shape === 'round'
|
|
27641
27682
|
});
|
|
27642
|
-
const sizeStyle = React.useMemo(()=>
|
|
27683
|
+
const sizeStyle = React.useMemo(()=>isNumber(size) ? {
|
|
27643
27684
|
width: size,
|
|
27644
27685
|
height: size,
|
|
27645
27686
|
lineHeight: `${size}px`
|
|
@@ -27805,7 +27846,7 @@ const genSkeletonElementButton = (token)=>{
|
|
|
27805
27846
|
};
|
|
27806
27847
|
};
|
|
27807
27848
|
// =============================== Base ===============================
|
|
27808
|
-
const genBaseStyle$
|
|
27849
|
+
const genBaseStyle$5 = (token)=>{
|
|
27809
27850
|
const { componentCls, skeletonAvatarCls, skeletonTitleCls, skeletonParagraphCls, skeletonButtonCls, skeletonInputCls, skeletonNodeCls, skeletonImageCls, controlHeight, controlHeightLG, controlHeightSM, gradientFromColor, padding, marginSM, borderRadius, titleHeight, blockRadius, paragraphLiHeight, controlHeightXS, paragraphMarginTop } = token;
|
|
27810
27851
|
return {
|
|
27811
27852
|
[componentCls]: {
|
|
@@ -27916,7 +27957,7 @@ const genBaseStyle$4 = (token)=>{
|
|
|
27916
27957
|
};
|
|
27917
27958
|
};
|
|
27918
27959
|
// ============================== Export ==============================
|
|
27919
|
-
const prepareComponentToken$
|
|
27960
|
+
const prepareComponentToken$j = (token)=>{
|
|
27920
27961
|
const { colorFillContent, colorFill } = token;
|
|
27921
27962
|
const gradientFromColor = colorFillContent;
|
|
27922
27963
|
const gradientToColor = colorFill;
|
|
@@ -27931,7 +27972,7 @@ const prepareComponentToken$i = (token)=>{
|
|
|
27931
27972
|
paragraphLiHeight: token.controlHeight / 2
|
|
27932
27973
|
};
|
|
27933
27974
|
};
|
|
27934
|
-
var useStyle$
|
|
27975
|
+
var useStyle$o = genStyleHooks('Skeleton', (token)=>{
|
|
27935
27976
|
const { componentCls, calc } = token;
|
|
27936
27977
|
const skeletonToken = mergeToken(token, {
|
|
27937
27978
|
skeletonAvatarCls: `${componentCls}-avatar`,
|
|
@@ -27947,8 +27988,8 @@ var useStyle$n = genStyleHooks('Skeleton', (token)=>{
|
|
|
27947
27988
|
skeletonLoadingBackground: `linear-gradient(90deg, ${token.gradientFromColor} 25%, ${token.gradientToColor} 37%, ${token.gradientFromColor} 63%)`,
|
|
27948
27989
|
skeletonLoadingMotionDuration: '1.4s'
|
|
27949
27990
|
});
|
|
27950
|
-
return genBaseStyle$
|
|
27951
|
-
}, prepareComponentToken$
|
|
27991
|
+
return genBaseStyle$5(skeletonToken);
|
|
27992
|
+
}, prepareComponentToken$j, {
|
|
27952
27993
|
deprecatedTokens: [
|
|
27953
27994
|
[
|
|
27954
27995
|
'color',
|
|
@@ -27962,10 +28003,11 @@ var useStyle$n = genStyleHooks('Skeleton', (token)=>{
|
|
|
27962
28003
|
});
|
|
27963
28004
|
|
|
27964
28005
|
const SkeletonAvatar = (props)=>{
|
|
27965
|
-
const { prefixCls: customizePrefixCls, className, classNames, rootClassName, active, style, styles, shape = 'circle', size
|
|
28006
|
+
const { prefixCls: customizePrefixCls, className, classNames, rootClassName, active, style, styles, shape = 'circle', size: customSize, ...rest } = props;
|
|
27966
28007
|
const { getPrefixCls } = React.useContext(ConfigContext);
|
|
27967
28008
|
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
27968
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28009
|
+
const [hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
28010
|
+
const mergedSize = useSize((ctx)=>customSize ?? ctx);
|
|
27969
28011
|
const cls = clsx(prefixCls, `${prefixCls}-element`, {
|
|
27970
28012
|
[`${prefixCls}-active`]: active
|
|
27971
28013
|
}, classNames?.root, className, rootClassName, hashId, cssVarCls);
|
|
@@ -27980,16 +28022,17 @@ const SkeletonAvatar = (props)=>{
|
|
|
27980
28022
|
...style
|
|
27981
28023
|
},
|
|
27982
28024
|
shape: shape,
|
|
27983
|
-
size:
|
|
28025
|
+
size: mergedSize,
|
|
27984
28026
|
...rest
|
|
27985
28027
|
}));
|
|
27986
28028
|
};
|
|
27987
28029
|
|
|
27988
28030
|
const SkeletonButton = (props)=>{
|
|
27989
|
-
const { prefixCls: customizePrefixCls, className, rootClassName, classNames, active, style, styles, block = false, size
|
|
28031
|
+
const { prefixCls: customizePrefixCls, className, rootClassName, classNames, active, style, styles, block = false, size: customSize, ...rest } = props;
|
|
27990
28032
|
const { getPrefixCls } = React.useContext(ConfigContext);
|
|
27991
28033
|
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
27992
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28034
|
+
const [hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
28035
|
+
const mergedSize = useSize((ctx)=>customSize ?? ctx);
|
|
27993
28036
|
const cls = clsx(prefixCls, `${prefixCls}-element`, {
|
|
27994
28037
|
[`${prefixCls}-active`]: active,
|
|
27995
28038
|
[`${prefixCls}-block`]: block
|
|
@@ -28004,7 +28047,7 @@ const SkeletonButton = (props)=>{
|
|
|
28004
28047
|
...styles?.content,
|
|
28005
28048
|
...style
|
|
28006
28049
|
},
|
|
28007
|
-
size:
|
|
28050
|
+
size: mergedSize,
|
|
28008
28051
|
...rest
|
|
28009
28052
|
}));
|
|
28010
28053
|
};
|
|
@@ -28013,7 +28056,7 @@ const SkeletonNode = (props)=>{
|
|
|
28013
28056
|
const { prefixCls: customizePrefixCls, className, classNames, rootClassName, internalClassName, style, styles, active, children } = props;
|
|
28014
28057
|
const { getPrefixCls } = React.useContext(ConfigContext);
|
|
28015
28058
|
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
28016
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28059
|
+
const [hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
28017
28060
|
const cls = clsx(prefixCls, `${prefixCls}-element`, {
|
|
28018
28061
|
[`${prefixCls}-active`]: active
|
|
28019
28062
|
}, hashId, classNames?.root, className, rootClassName, cssVarCls);
|
|
@@ -28046,10 +28089,11 @@ const SkeletonImage = (props)=>{
|
|
|
28046
28089
|
};
|
|
28047
28090
|
|
|
28048
28091
|
const SkeletonInput = (props)=>{
|
|
28049
|
-
const { prefixCls: customizePrefixCls, className, classNames, rootClassName, active, block, style, styles, size
|
|
28092
|
+
const { prefixCls: customizePrefixCls, className, classNames, rootClassName, active, block, style, styles, size: customSize, ...rest } = props;
|
|
28050
28093
|
const { getPrefixCls } = React.useContext(ConfigContext);
|
|
28051
28094
|
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
28052
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28095
|
+
const [hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
28096
|
+
const mergedSize = useSize((ctx)=>customSize ?? ctx);
|
|
28053
28097
|
const cls = clsx(prefixCls, `${prefixCls}-element`, {
|
|
28054
28098
|
[`${prefixCls}-active`]: active,
|
|
28055
28099
|
[`${prefixCls}-block`]: block
|
|
@@ -28064,7 +28108,7 @@ const SkeletonInput = (props)=>{
|
|
|
28064
28108
|
...styles?.content,
|
|
28065
28109
|
...style
|
|
28066
28110
|
},
|
|
28067
|
-
size:
|
|
28111
|
+
size: mergedSize,
|
|
28068
28112
|
...rest
|
|
28069
28113
|
}));
|
|
28070
28114
|
};
|
|
@@ -28084,8 +28128,7 @@ const Paragraph$1 = (props)=>{
|
|
|
28084
28128
|
const { prefixCls, className, style, rows = 0 } = props;
|
|
28085
28129
|
const rowList = Array.from({
|
|
28086
28130
|
length: rows
|
|
28087
|
-
}).map((_, index)=>/*#__PURE__*/
|
|
28088
|
-
React.createElement("li", {
|
|
28131
|
+
}).map((_, index)=>/*#__PURE__*/ React.createElement("li", {
|
|
28089
28132
|
key: index,
|
|
28090
28133
|
style: {
|
|
28091
28134
|
width: getWidth(index, props)
|
|
@@ -28097,8 +28140,7 @@ const Paragraph$1 = (props)=>{
|
|
|
28097
28140
|
}, rowList);
|
|
28098
28141
|
};
|
|
28099
28142
|
|
|
28100
|
-
const Title$2 = ({ prefixCls, className, width, style })=>/*#__PURE__*/
|
|
28101
|
-
React.createElement("h3", {
|
|
28143
|
+
const Title$2 = ({ prefixCls, className, width, style })=>/*#__PURE__*/ React.createElement("h3", {
|
|
28102
28144
|
className: clsx(prefixCls, className),
|
|
28103
28145
|
style: {
|
|
28104
28146
|
width,
|
|
@@ -28157,7 +28199,7 @@ const Skeleton = (props)=>{
|
|
|
28157
28199
|
const { prefixCls: customizePrefixCls, loading, className, rootClassName, classNames, style, styles, children, avatar = false, title = true, paragraph = true, active, round } = props;
|
|
28158
28200
|
const { getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('skeleton');
|
|
28159
28201
|
const prefixCls = getPrefixCls('skeleton', customizePrefixCls);
|
|
28160
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28202
|
+
const [hashId, cssVarCls] = useStyle$o(prefixCls);
|
|
28161
28203
|
const mergedProps = {
|
|
28162
28204
|
...props,
|
|
28163
28205
|
avatar,
|
|
@@ -28422,7 +28464,8 @@ const getMediaSize = (token)=>{
|
|
|
28422
28464
|
md: token.screenMDMin,
|
|
28423
28465
|
lg: token.screenLGMin,
|
|
28424
28466
|
xl: token.screenXLMin,
|
|
28425
|
-
xxl: token.screenXXLMin
|
|
28467
|
+
xxl: token.screenXXLMin,
|
|
28468
|
+
xxxl: token.screenXXXLMin
|
|
28426
28469
|
};
|
|
28427
28470
|
return mediaSizesMap;
|
|
28428
28471
|
};
|
|
@@ -28501,14 +28544,15 @@ function withPureRenderTheme(Component) {
|
|
|
28501
28544
|
getPopupContainer: ()=>holderRef.current
|
|
28502
28545
|
};
|
|
28503
28546
|
if (alignPropName) {
|
|
28504
|
-
|
|
28547
|
+
mergedProps = {
|
|
28548
|
+
...mergedProps,
|
|
28505
28549
|
[alignPropName]: {
|
|
28506
28550
|
overflow: {
|
|
28507
28551
|
adjustX: false,
|
|
28508
28552
|
adjustY: false
|
|
28509
28553
|
}
|
|
28510
28554
|
}
|
|
28511
|
-
}
|
|
28555
|
+
};
|
|
28512
28556
|
}
|
|
28513
28557
|
const mergedStyle = {
|
|
28514
28558
|
paddingBottom: popupHeight,
|
|
@@ -28683,7 +28727,7 @@ const genSharedEmptyStyle = (token)=>{
|
|
|
28683
28727
|
};
|
|
28684
28728
|
};
|
|
28685
28729
|
// ============================== Export ==============================
|
|
28686
|
-
var useStyle$
|
|
28730
|
+
var useStyle$n = genStyleHooks('Empty', (token)=>{
|
|
28687
28731
|
const { componentCls, controlHeightLG, calc } = token;
|
|
28688
28732
|
const emptyToken = mergeToken(token, {
|
|
28689
28733
|
emptyImgCls: `${componentCls}-img`,
|
|
@@ -28700,7 +28744,7 @@ const Empty = (props)=>{
|
|
|
28700
28744
|
const { className, rootClassName, prefixCls: customizePrefixCls, image, description, children, imageStyle, style, classNames, styles, ...restProps } = props;
|
|
28701
28745
|
const { getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, image: contextImage } = useComponentConfig('empty');
|
|
28702
28746
|
const prefixCls = getPrefixCls('empty', customizePrefixCls);
|
|
28703
|
-
const [hashId, cssVarCls] = useStyle$
|
|
28747
|
+
const [hashId, cssVarCls] = useStyle$n(prefixCls);
|
|
28704
28748
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
28705
28749
|
contextClassNames,
|
|
28706
28750
|
classNames
|
|
@@ -29291,6 +29335,10 @@ const genSelectInputStyle = (token)=>{
|
|
|
29291
29335
|
width: 0,
|
|
29292
29336
|
overflow: 'hidden'
|
|
29293
29337
|
},
|
|
29338
|
+
// >>> Value
|
|
29339
|
+
'&-value': {
|
|
29340
|
+
visibility: 'inherit'
|
|
29341
|
+
},
|
|
29294
29342
|
// >>> Input: should only take effect for not customize mode
|
|
29295
29343
|
// input element with readOnly use cursor pointer
|
|
29296
29344
|
'input[readonly]': {
|
|
@@ -29371,8 +29419,7 @@ const genSelectInputStyle = (token)=>{
|
|
|
29371
29419
|
[`&-single:not(${componentCls}-customize)`]: {
|
|
29372
29420
|
[`${componentCls}-input`]: {
|
|
29373
29421
|
position: 'absolute',
|
|
29374
|
-
|
|
29375
|
-
insetBlock: `calc(${varRef('padding-vertical')} * -1)`,
|
|
29422
|
+
inset: 0,
|
|
29376
29423
|
lineHeight: `calc(${varRef('font-height')} + ${varRef('padding-vertical')} * 2)`
|
|
29377
29424
|
},
|
|
29378
29425
|
// Content center align
|
|
@@ -29481,8 +29528,7 @@ const genSelectInputStyle = (token)=>{
|
|
|
29481
29528
|
}, {
|
|
29482
29529
|
borderRadius: 0,
|
|
29483
29530
|
borderTopColor: 'transparent',
|
|
29484
|
-
|
|
29485
|
-
borderLeftColor: 'transparent'
|
|
29531
|
+
borderInlineColor: 'transparent'
|
|
29486
29532
|
}),
|
|
29487
29533
|
// ============================================================
|
|
29488
29534
|
// == Custom ==
|
|
@@ -29492,7 +29538,7 @@ const genSelectInputStyle = (token)=>{
|
|
|
29492
29538
|
};
|
|
29493
29539
|
};
|
|
29494
29540
|
|
|
29495
|
-
const prepareComponentToken$
|
|
29541
|
+
const prepareComponentToken$i = (token)=>{
|
|
29496
29542
|
const { fontSize, lineHeight, lineWidth, controlHeight, controlHeightSM, controlHeightLG, paddingXXS, controlPaddingHorizontal, zIndexPopupBase, colorText, fontWeightStrong, controlItemBgActive, controlItemBgHover, colorBgContainer, colorFillSecondary, colorBgContainerDisabled, colorTextDisabled, colorPrimaryHover, colorPrimary, controlOutline } = token;
|
|
29497
29543
|
// Item height default use `controlHeight - 2 * paddingXXS`,
|
|
29498
29544
|
// but some case `paddingXXS=0`.
|
|
@@ -29535,7 +29581,7 @@ const prepareComponentToken$h = (token)=>{
|
|
|
29535
29581
|
};
|
|
29536
29582
|
|
|
29537
29583
|
// =============================== Base ===============================
|
|
29538
|
-
const genBaseStyle$
|
|
29584
|
+
const genBaseStyle$4 = (token)=>{
|
|
29539
29585
|
const { antCls, componentCls, motionDurationMid, inputPaddingHorizontalBase } = token;
|
|
29540
29586
|
const hoverShowClearStyle = {
|
|
29541
29587
|
[`${componentCls}-clear`]: {
|
|
@@ -29629,7 +29675,7 @@ const genSelectStyle = (token)=>{
|
|
|
29629
29675
|
// == LTR ==
|
|
29630
29676
|
// =====================================================
|
|
29631
29677
|
// Base
|
|
29632
|
-
genBaseStyle$
|
|
29678
|
+
genBaseStyle$4(token),
|
|
29633
29679
|
// Dropdown
|
|
29634
29680
|
genSingleStyle(token),
|
|
29635
29681
|
// =====================================================
|
|
@@ -29660,7 +29706,7 @@ var useSelectStyle = genStyleHooks('Select', (token, { rootPrefixCls })=>{
|
|
|
29660
29706
|
genSelectStyle(selectToken),
|
|
29661
29707
|
genSelectInputStyle(selectToken)
|
|
29662
29708
|
];
|
|
29663
|
-
}, prepareComponentToken$
|
|
29709
|
+
}, prepareComponentToken$i, {
|
|
29664
29710
|
unitless: {
|
|
29665
29711
|
optionLineHeight: true,
|
|
29666
29712
|
optionSelectedFontWeight: true
|
|
@@ -29923,11 +29969,11 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
29923
29969
|
}
|
|
29924
29970
|
const Select = /*#__PURE__*/ React.forwardRef(InternalSelect);
|
|
29925
29971
|
// We don't care debug panel
|
|
29926
|
-
/* istanbul ignore next */ const PurePanel$
|
|
29972
|
+
/* istanbul ignore next */ const PurePanel$4 = genPurePanel(Select, 'popupAlign');
|
|
29927
29973
|
Select.SECRET_COMBOBOX_MODE_DO_NOT_USE = SECRET_COMBOBOX_MODE_DO_NOT_USE;
|
|
29928
29974
|
Select.Option = Option;
|
|
29929
29975
|
Select.OptGroup = OptGroup;
|
|
29930
|
-
Select._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$
|
|
29976
|
+
Select._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$4;
|
|
29931
29977
|
if (process.env.NODE_ENV !== 'production') {
|
|
29932
29978
|
Select.displayName = 'Select';
|
|
29933
29979
|
}
|
|
@@ -29991,7 +30037,9 @@ const useResponsiveObserver = ()=>{
|
|
|
29991
30037
|
matchHandlers: {},
|
|
29992
30038
|
dispatch (pointMap) {
|
|
29993
30039
|
screens = pointMap;
|
|
29994
|
-
subscribers.forEach((func)=>
|
|
30040
|
+
subscribers.forEach((func)=>{
|
|
30041
|
+
func(screens);
|
|
30042
|
+
});
|
|
29995
30043
|
return subscribers.size >= 1;
|
|
29996
30044
|
},
|
|
29997
30045
|
subscribe (func) {
|
|
@@ -30059,6 +30107,13 @@ function useBreakpoint(refreshOnChange = true, defaultScreens = {}) {
|
|
|
30059
30107
|
return screensRef.current;
|
|
30060
30108
|
}
|
|
30061
30109
|
|
|
30110
|
+
const getRenderPropValue = (propValue)=>{
|
|
30111
|
+
if (!propValue) {
|
|
30112
|
+
return null;
|
|
30113
|
+
}
|
|
30114
|
+
return typeof propValue === 'function' ? propValue() : propValue;
|
|
30115
|
+
};
|
|
30116
|
+
|
|
30062
30117
|
function getArrowToken(token) {
|
|
30063
30118
|
const { sizePopupArrow, borderRadiusXS, borderRadiusOuter } = token;
|
|
30064
30119
|
const unitWidth = sizePopupArrow / 2;
|
|
@@ -30546,6 +30601,8 @@ function getPlacements(config) {
|
|
|
30546
30601
|
return placementMap;
|
|
30547
30602
|
}
|
|
30548
30603
|
|
|
30604
|
+
const TableMeasureRowContext = /*#__PURE__*/ React__default.createContext(false);
|
|
30605
|
+
|
|
30549
30606
|
const useMergedArrow = (providedArrow, providedContextArrow)=>{
|
|
30550
30607
|
const toConfig = (arrow)=>typeof arrow === 'boolean' ? {
|
|
30551
30608
|
show: arrow
|
|
@@ -30564,7 +30621,7 @@ const useMergedArrow = (providedArrow, providedContextArrow)=>{
|
|
|
30564
30621
|
]);
|
|
30565
30622
|
};
|
|
30566
30623
|
|
|
30567
|
-
const FALL_BACK_ORIGIN = '50%';
|
|
30624
|
+
const FALL_BACK_ORIGIN$1 = '50%';
|
|
30568
30625
|
const genTooltipStyle = (token)=>{
|
|
30569
30626
|
const { calc, componentCls, // ant-tooltip
|
|
30570
30627
|
tooltipMaxWidth, tooltipColor, tooltipBg, tooltipBorderRadius, zIndexPopup, controlHeight, boxShadowSecondary, paddingSM, paddingXS, arrowOffsetHorizontal, sizePopupArrow, antCls } = token;
|
|
@@ -30590,8 +30647,8 @@ const genTooltipStyle = (token)=>{
|
|
|
30590
30647
|
// When use `autoArrow`, origin will follow the arrow position
|
|
30591
30648
|
[varName('valid-offset-x')]: varRef('arrow-offset-x', 'var(--arrow-x)'),
|
|
30592
30649
|
transformOrigin: [
|
|
30593
|
-
varRef('valid-offset-x', FALL_BACK_ORIGIN),
|
|
30594
|
-
`var(--arrow-y, ${FALL_BACK_ORIGIN})`
|
|
30650
|
+
varRef('valid-offset-x', FALL_BACK_ORIGIN$1),
|
|
30651
|
+
`var(--arrow-y, ${FALL_BACK_ORIGIN$1})`
|
|
30595
30652
|
].join(' ')
|
|
30596
30653
|
};
|
|
30597
30654
|
return [
|
|
@@ -30691,7 +30748,7 @@ const genTooltipStyle = (token)=>{
|
|
|
30691
30748
|
];
|
|
30692
30749
|
};
|
|
30693
30750
|
// ============================== Export ==============================
|
|
30694
|
-
const prepareComponentToken$
|
|
30751
|
+
const prepareComponentToken$h = (token)=>({
|
|
30695
30752
|
zIndexPopup: token.zIndexPopupBase + 70,
|
|
30696
30753
|
maxWidth: 250,
|
|
30697
30754
|
...getArrowOffsetToken({
|
|
@@ -30702,7 +30759,7 @@ const prepareComponentToken$g = (token)=>({
|
|
|
30702
30759
|
borderRadiusOuter: Math.min(token.borderRadiusOuter, 4)
|
|
30703
30760
|
}))
|
|
30704
30761
|
});
|
|
30705
|
-
var useStyle$
|
|
30762
|
+
var useStyle$m = ((prefixCls, rootCls, injectStyle = true)=>{
|
|
30706
30763
|
const useStyle = genStyleHooks('Tooltip', (token)=>{
|
|
30707
30764
|
const { borderRadius, colorTextLightSolid, colorBgSpotlight, maxWidth } = token;
|
|
30708
30765
|
const TooltipToken = mergeToken(token, {
|
|
@@ -30716,7 +30773,7 @@ var useStyle$l = ((prefixCls, rootCls, injectStyle = true)=>{
|
|
|
30716
30773
|
genTooltipStyle(TooltipToken),
|
|
30717
30774
|
initZoomMotion(token, 'zoom-big-fast')
|
|
30718
30775
|
];
|
|
30719
|
-
}, prepareComponentToken$
|
|
30776
|
+
}, prepareComponentToken$h, {
|
|
30720
30777
|
resetStyle: false,
|
|
30721
30778
|
// Popover use Tooltip as internal component. We do not need to handle this.
|
|
30722
30779
|
injectStyle
|
|
@@ -30769,13 +30826,13 @@ const parseColor = (rootPrefixCls, prefixCls, color)=>{
|
|
|
30769
30826
|
};
|
|
30770
30827
|
};
|
|
30771
30828
|
|
|
30772
|
-
/** @private Internal Component. Do not use in your production. */ const PurePanel$
|
|
30829
|
+
/** @private Internal Component. Do not use in your production. */ const PurePanel$3 = (props)=>{
|
|
30773
30830
|
const { prefixCls: customizePrefixCls, className, placement = 'top', title, color, overlayInnerStyle, classNames, styles } = props;
|
|
30774
30831
|
const { getPrefixCls } = React.useContext(ConfigContext);
|
|
30775
30832
|
const prefixCls = getPrefixCls('tooltip', customizePrefixCls);
|
|
30776
30833
|
const rootPrefixCls = getPrefixCls();
|
|
30777
30834
|
const rootCls = useCSSVarCls(prefixCls);
|
|
30778
|
-
const [hashId, cssVarCls] = useStyle$
|
|
30835
|
+
const [hashId, cssVarCls] = useStyle$m(prefixCls, rootCls);
|
|
30779
30836
|
// Color
|
|
30780
30837
|
const colorInfo = parseColor(rootPrefixCls, prefixCls, color);
|
|
30781
30838
|
const arrowContentStyle = colorInfo.arrowStyle;
|
|
@@ -30826,6 +30883,9 @@ const InternalTooltip = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
30826
30883
|
const mergedArrow = useMergedArrow(tooltipArrow, contextArrow);
|
|
30827
30884
|
const mergedShowArrow = mergedArrow.show;
|
|
30828
30885
|
const mergedTrigger = trigger || contextTrigger || 'hover';
|
|
30886
|
+
const mergedGetPopupContainer = getPopupContainer || getContextPopupContainer;
|
|
30887
|
+
const mergedDestroyOnHidden = destroyOnHidden ?? !!destroyTooltipOnHide;
|
|
30888
|
+
const inTableMeasureRow = React.useContext(TableMeasureRowContext);
|
|
30829
30889
|
// ============================== Ref ===============================
|
|
30830
30890
|
const warning = devUseWarning('Tooltip');
|
|
30831
30891
|
const tooltipRef = React.useRef(null);
|
|
@@ -30903,16 +30963,9 @@ const InternalTooltip = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
30903
30963
|
const mergedProps = {
|
|
30904
30964
|
...props,
|
|
30905
30965
|
trigger: mergedTrigger,
|
|
30906
|
-
|
|
30907
|
-
|
|
30908
|
-
|
|
30909
|
-
openClassName,
|
|
30910
|
-
arrow: tooltipArrow,
|
|
30911
|
-
autoAdjustOverflow,
|
|
30912
|
-
getPopupContainer,
|
|
30913
|
-
children,
|
|
30914
|
-
destroyTooltipOnHide,
|
|
30915
|
-
destroyOnHidden
|
|
30966
|
+
builtinPlacements: tooltipPlacements,
|
|
30967
|
+
getPopupContainer: mergedGetPopupContainer,
|
|
30968
|
+
destroyOnHidden: mergedDestroyOnHidden
|
|
30916
30969
|
};
|
|
30917
30970
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
30918
30971
|
contextClassNames,
|
|
@@ -30927,8 +30980,8 @@ const InternalTooltip = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
30927
30980
|
const rootPrefixCls = getPrefixCls();
|
|
30928
30981
|
const injectFromPopover = props['data-popover-inject'];
|
|
30929
30982
|
let tempOpen = open;
|
|
30930
|
-
// Hide tooltip when there is no title
|
|
30931
|
-
if (!('open' in props) && noTitle) {
|
|
30983
|
+
// Hide tooltip when there is no title or in table measure row
|
|
30984
|
+
if (!('open' in props) && noTitle || inTableMeasureRow) {
|
|
30932
30985
|
tempOpen = false;
|
|
30933
30986
|
}
|
|
30934
30987
|
// ============================= Render =============================
|
|
@@ -30937,7 +30990,7 @@ const InternalTooltip = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
30937
30990
|
const childCls = !childProps.className || typeof childProps.className === 'string' ? clsx(childProps.className, openClassName || `${prefixCls}-open`) : childProps.className;
|
|
30938
30991
|
// Style
|
|
30939
30992
|
const rootCls = useCSSVarCls(prefixCls);
|
|
30940
|
-
const [hashId, cssVarCls] = useStyle$
|
|
30993
|
+
const [hashId, cssVarCls] = useStyle$m(prefixCls, rootCls, !injectFromPopover);
|
|
30941
30994
|
// Color
|
|
30942
30995
|
const colorInfo = parseColor(rootPrefixCls, prefixCls, color);
|
|
30943
30996
|
const arrowContentStyle = colorInfo.arrowStyle;
|
|
@@ -30955,7 +31008,6 @@ const InternalTooltip = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
30955
31008
|
const content = /*#__PURE__*/ React.createElement(RcTooltip, {
|
|
30956
31009
|
unique: true,
|
|
30957
31010
|
...restProps,
|
|
30958
|
-
trigger: mergedTrigger,
|
|
30959
31011
|
zIndex: zIndex,
|
|
30960
31012
|
showArrow: mergedShowArrow,
|
|
30961
31013
|
placement: placement,
|
|
@@ -30979,9 +31031,7 @@ const InternalTooltip = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
30979
31031
|
uniqueContainer: containerStyle,
|
|
30980
31032
|
arrow: mergedStyles.arrow
|
|
30981
31033
|
},
|
|
30982
|
-
getTooltipContainer: getPopupContainer || getTooltipContainer || getContextPopupContainer,
|
|
30983
31034
|
ref: tooltipRef,
|
|
30984
|
-
builtinPlacements: tooltipPlacements,
|
|
30985
31035
|
overlay: memoOverlayWrapper,
|
|
30986
31036
|
visible: tempOpen,
|
|
30987
31037
|
onVisibleChange: onInternalOpenChange,
|
|
@@ -30993,7 +31043,10 @@ const InternalTooltip = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
30993
31043
|
motionName: getTransitionName(rootPrefixCls, 'zoom-big-fast', typeof motion?.motionName === 'string' ? motion?.motionName : undefined),
|
|
30994
31044
|
motionDeadline: 1000
|
|
30995
31045
|
},
|
|
30996
|
-
|
|
31046
|
+
trigger: mergedTrigger,
|
|
31047
|
+
builtinPlacements: tooltipPlacements,
|
|
31048
|
+
getTooltipContainer: mergedGetPopupContainer,
|
|
31049
|
+
destroyOnHidden: mergedDestroyOnHidden
|
|
30997
31050
|
}, tempOpen ? cloneElement(child, {
|
|
30998
31051
|
className: childCls
|
|
30999
31052
|
}) : child);
|
|
@@ -31001,14 +31054,299 @@ const InternalTooltip = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
31001
31054
|
value: contextZIndex
|
|
31002
31055
|
}, content);
|
|
31003
31056
|
});
|
|
31004
|
-
const Tooltip
|
|
31057
|
+
const Tooltip = InternalTooltip;
|
|
31005
31058
|
if (process.env.NODE_ENV !== 'production') {
|
|
31006
|
-
Tooltip
|
|
31059
|
+
Tooltip.displayName = 'Tooltip';
|
|
31007
31060
|
}
|
|
31008
|
-
Tooltip
|
|
31009
|
-
Tooltip
|
|
31061
|
+
Tooltip._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$3;
|
|
31062
|
+
Tooltip.UniqueProvider = UniqueProvider;
|
|
31063
|
+
|
|
31064
|
+
const FALL_BACK_ORIGIN = '50%';
|
|
31065
|
+
const genBaseStyle$3 = (token)=>{
|
|
31066
|
+
const { componentCls, popoverColor, titleMinWidth, fontWeightStrong, innerPadding, boxShadowSecondary, colorTextHeading, borderRadiusLG, zIndexPopup, titleMarginBottom, colorBgElevated, popoverBg, titleBorderBottom, innerContentPadding, titlePadding, antCls } = token;
|
|
31067
|
+
const [varName, varRef] = genCssVar(antCls, 'tooltip');
|
|
31068
|
+
return [
|
|
31069
|
+
{
|
|
31070
|
+
[componentCls]: {
|
|
31071
|
+
...resetComponent(token),
|
|
31072
|
+
position: 'absolute',
|
|
31073
|
+
top: 0,
|
|
31074
|
+
// use `left` to fix https://github.com/ant-design/ant-design/issues/39195
|
|
31075
|
+
left: {
|
|
31076
|
+
_skip_check_: true,
|
|
31077
|
+
value: 0
|
|
31078
|
+
},
|
|
31079
|
+
zIndex: zIndexPopup,
|
|
31080
|
+
fontWeight: 'normal',
|
|
31081
|
+
whiteSpace: 'normal',
|
|
31082
|
+
textAlign: 'start',
|
|
31083
|
+
cursor: 'auto',
|
|
31084
|
+
userSelect: 'text',
|
|
31085
|
+
// When use `autoArrow`, origin will follow the arrow position
|
|
31086
|
+
[varName('valid-offset-x')]: varRef('arrow-offset-x', 'var(--arrow-x)'),
|
|
31087
|
+
transformOrigin: [
|
|
31088
|
+
varRef('valid-offset-x', FALL_BACK_ORIGIN),
|
|
31089
|
+
`var(--arrow-y, ${FALL_BACK_ORIGIN})`
|
|
31090
|
+
].join(' '),
|
|
31091
|
+
[varName('arrow-background-color')]: colorBgElevated,
|
|
31092
|
+
width: 'max-content',
|
|
31093
|
+
maxWidth: '100vw',
|
|
31094
|
+
'&-rtl': {
|
|
31095
|
+
direction: 'rtl'
|
|
31096
|
+
},
|
|
31097
|
+
'&-hidden': {
|
|
31098
|
+
display: 'none'
|
|
31099
|
+
},
|
|
31100
|
+
[`${componentCls}-content`]: {
|
|
31101
|
+
position: 'relative'
|
|
31102
|
+
},
|
|
31103
|
+
[`${componentCls}-container`]: {
|
|
31104
|
+
backgroundColor: popoverBg,
|
|
31105
|
+
backgroundClip: 'padding-box',
|
|
31106
|
+
borderRadius: borderRadiusLG,
|
|
31107
|
+
boxShadow: boxShadowSecondary,
|
|
31108
|
+
padding: innerPadding
|
|
31109
|
+
},
|
|
31110
|
+
[`${componentCls}-title`]: {
|
|
31111
|
+
minWidth: titleMinWidth,
|
|
31112
|
+
marginBottom: titleMarginBottom,
|
|
31113
|
+
color: colorTextHeading,
|
|
31114
|
+
fontWeight: fontWeightStrong,
|
|
31115
|
+
borderBottom: titleBorderBottom,
|
|
31116
|
+
padding: titlePadding
|
|
31117
|
+
},
|
|
31118
|
+
[`${componentCls}-content`]: {
|
|
31119
|
+
color: popoverColor,
|
|
31120
|
+
padding: innerContentPadding
|
|
31121
|
+
}
|
|
31122
|
+
}
|
|
31123
|
+
},
|
|
31124
|
+
// Arrow Style
|
|
31125
|
+
getArrowStyle(token, varRef('arrow-background-color')),
|
|
31126
|
+
// Pure Render
|
|
31127
|
+
{
|
|
31128
|
+
[`${componentCls}-pure`]: {
|
|
31129
|
+
position: 'relative',
|
|
31130
|
+
maxWidth: 'none',
|
|
31131
|
+
margin: token.sizePopupArrow,
|
|
31132
|
+
display: 'inline-block'
|
|
31133
|
+
}
|
|
31134
|
+
}
|
|
31135
|
+
];
|
|
31136
|
+
};
|
|
31137
|
+
const genColorStyle = (token)=>{
|
|
31138
|
+
const { componentCls, antCls } = token;
|
|
31139
|
+
const [varName] = genCssVar(antCls, 'tooltip');
|
|
31140
|
+
return {
|
|
31141
|
+
[componentCls]: PresetColors.map((colorKey)=>{
|
|
31142
|
+
const lightColor = token[`${colorKey}6`];
|
|
31143
|
+
return {
|
|
31144
|
+
[`&${componentCls}-${colorKey}`]: {
|
|
31145
|
+
[varName('arrow-background-color')]: lightColor,
|
|
31146
|
+
[`${componentCls}-inner`]: {
|
|
31147
|
+
backgroundColor: lightColor
|
|
31148
|
+
},
|
|
31149
|
+
[`${componentCls}-arrow`]: {
|
|
31150
|
+
background: 'transparent'
|
|
31151
|
+
}
|
|
31152
|
+
}
|
|
31153
|
+
};
|
|
31154
|
+
})
|
|
31155
|
+
};
|
|
31156
|
+
};
|
|
31157
|
+
const prepareComponentToken$g = (token)=>{
|
|
31158
|
+
const { lineWidth, controlHeight, fontHeight, padding, wireframe, zIndexPopupBase, borderRadiusLG, marginXS, lineType, colorSplit, paddingSM } = token;
|
|
31159
|
+
const titlePaddingBlockDist = controlHeight - fontHeight;
|
|
31160
|
+
const popoverTitlePaddingBlockTop = titlePaddingBlockDist / 2;
|
|
31161
|
+
const popoverTitlePaddingBlockBottom = titlePaddingBlockDist / 2 - lineWidth;
|
|
31162
|
+
const popoverPaddingHorizontal = padding;
|
|
31163
|
+
return {
|
|
31164
|
+
titleMinWidth: 177,
|
|
31165
|
+
zIndexPopup: zIndexPopupBase + 30,
|
|
31166
|
+
...getArrowToken(token),
|
|
31167
|
+
...getArrowOffsetToken({
|
|
31168
|
+
contentRadius: borderRadiusLG,
|
|
31169
|
+
limitVerticalRadius: true
|
|
31170
|
+
}),
|
|
31171
|
+
// internal
|
|
31172
|
+
innerPadding: wireframe ? 0 : 12,
|
|
31173
|
+
titleMarginBottom: wireframe ? 0 : marginXS,
|
|
31174
|
+
titlePadding: wireframe ? `${popoverTitlePaddingBlockTop}px ${popoverPaddingHorizontal}px ${popoverTitlePaddingBlockBottom}px` : 0,
|
|
31175
|
+
titleBorderBottom: wireframe ? `${lineWidth}px ${lineType} ${colorSplit}` : 'none',
|
|
31176
|
+
innerContentPadding: wireframe ? `${paddingSM}px ${popoverPaddingHorizontal}px` : 0
|
|
31177
|
+
};
|
|
31178
|
+
};
|
|
31179
|
+
var useStyle$l = genStyleHooks('Popover', (token)=>{
|
|
31180
|
+
const { colorBgElevated, colorText } = token;
|
|
31181
|
+
const popoverToken = mergeToken(token, {
|
|
31182
|
+
popoverBg: colorBgElevated,
|
|
31183
|
+
popoverColor: colorText
|
|
31184
|
+
});
|
|
31185
|
+
return [
|
|
31186
|
+
genBaseStyle$3(popoverToken),
|
|
31187
|
+
genColorStyle(popoverToken),
|
|
31188
|
+
initZoomMotion(popoverToken, 'zoom-big')
|
|
31189
|
+
];
|
|
31190
|
+
}, prepareComponentToken$g, {
|
|
31191
|
+
resetStyle: false,
|
|
31192
|
+
deprecatedTokens: [
|
|
31193
|
+
[
|
|
31194
|
+
'width',
|
|
31195
|
+
'titleMinWidth'
|
|
31196
|
+
],
|
|
31197
|
+
[
|
|
31198
|
+
'minWidth',
|
|
31199
|
+
'titleMinWidth'
|
|
31200
|
+
]
|
|
31201
|
+
]
|
|
31202
|
+
});
|
|
31010
31203
|
|
|
31011
|
-
const
|
|
31204
|
+
const Overlay$2 = (props)=>{
|
|
31205
|
+
const { title, content, prefixCls, classNames, styles } = props;
|
|
31206
|
+
if (!title && !content) {
|
|
31207
|
+
return null;
|
|
31208
|
+
}
|
|
31209
|
+
return /*#__PURE__*/ React.createElement(React.Fragment, null, title && /*#__PURE__*/ React.createElement("div", {
|
|
31210
|
+
className: clsx(`${prefixCls}-title`, classNames?.title),
|
|
31211
|
+
style: styles?.title
|
|
31212
|
+
}, title), content && /*#__PURE__*/ React.createElement("div", {
|
|
31213
|
+
className: clsx(`${prefixCls}-content`, classNames?.content),
|
|
31214
|
+
style: styles?.content
|
|
31215
|
+
}, content));
|
|
31216
|
+
};
|
|
31217
|
+
const RawPurePanel = (props)=>{
|
|
31218
|
+
const { hashId, prefixCls, className, style, placement = 'top', title, content, children, classNames, styles } = props;
|
|
31219
|
+
const titleNode = getRenderPropValue(title);
|
|
31220
|
+
const contentNode = getRenderPropValue(content);
|
|
31221
|
+
const mergedProps = {
|
|
31222
|
+
...props,
|
|
31223
|
+
placement
|
|
31224
|
+
};
|
|
31225
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
31226
|
+
classNames
|
|
31227
|
+
], [
|
|
31228
|
+
styles
|
|
31229
|
+
], {
|
|
31230
|
+
props: mergedProps
|
|
31231
|
+
});
|
|
31232
|
+
const rootClassName = clsx(hashId, prefixCls, `${prefixCls}-pure`, `${prefixCls}-placement-${placement}`, className);
|
|
31233
|
+
return /*#__PURE__*/ React.createElement("div", {
|
|
31234
|
+
className: rootClassName,
|
|
31235
|
+
style: style
|
|
31236
|
+
}, /*#__PURE__*/ React.createElement("div", {
|
|
31237
|
+
className: `${prefixCls}-arrow`
|
|
31238
|
+
}), /*#__PURE__*/ React.createElement(Popup, {
|
|
31239
|
+
...props,
|
|
31240
|
+
className: hashId,
|
|
31241
|
+
prefixCls: prefixCls,
|
|
31242
|
+
classNames: mergedClassNames,
|
|
31243
|
+
styles: mergedStyles
|
|
31244
|
+
}, children || /*#__PURE__*/ React.createElement(Overlay$2, {
|
|
31245
|
+
prefixCls: prefixCls,
|
|
31246
|
+
title: titleNode,
|
|
31247
|
+
content: contentNode,
|
|
31248
|
+
classNames: mergedClassNames,
|
|
31249
|
+
styles: mergedStyles
|
|
31250
|
+
})));
|
|
31251
|
+
};
|
|
31252
|
+
const PurePanel$2 = (props)=>{
|
|
31253
|
+
const { prefixCls: customizePrefixCls, className, ...restProps } = props;
|
|
31254
|
+
const { getPrefixCls } = React.useContext(ConfigContext);
|
|
31255
|
+
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
31256
|
+
const [hashId, cssVarCls] = useStyle$l(prefixCls);
|
|
31257
|
+
return /*#__PURE__*/ React.createElement(RawPurePanel, {
|
|
31258
|
+
...restProps,
|
|
31259
|
+
prefixCls: prefixCls,
|
|
31260
|
+
hashId: hashId,
|
|
31261
|
+
className: clsx(className, cssVarCls)
|
|
31262
|
+
});
|
|
31263
|
+
};
|
|
31264
|
+
|
|
31265
|
+
const InternalPopover = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
31266
|
+
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;
|
|
31267
|
+
const { getPrefixCls, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles, arrow: contextArrow, trigger: contextTrigger } = useComponentConfig('popover');
|
|
31268
|
+
const prefixCls = getPrefixCls('popover', customizePrefixCls);
|
|
31269
|
+
const [hashId, cssVarCls] = useStyle$l(prefixCls);
|
|
31270
|
+
const rootPrefixCls = getPrefixCls();
|
|
31271
|
+
const mergedArrow = useMergedArrow(popoverArrow, contextArrow);
|
|
31272
|
+
const mergedTrigger = trigger || contextTrigger || 'hover';
|
|
31273
|
+
// ========================== Warning ===========================
|
|
31274
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
31275
|
+
const warning = devUseWarning('Popover');
|
|
31276
|
+
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;
|
|
31277
|
+
}
|
|
31278
|
+
// ============================= Styles =============================
|
|
31279
|
+
const mergedProps = {
|
|
31280
|
+
...props,
|
|
31281
|
+
placement,
|
|
31282
|
+
trigger: mergedTrigger,
|
|
31283
|
+
mouseEnterDelay,
|
|
31284
|
+
mouseLeaveDelay,
|
|
31285
|
+
overlayStyle,
|
|
31286
|
+
styles,
|
|
31287
|
+
classNames
|
|
31288
|
+
};
|
|
31289
|
+
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
31290
|
+
contextClassNames,
|
|
31291
|
+
classNames
|
|
31292
|
+
], [
|
|
31293
|
+
contextStyles,
|
|
31294
|
+
styles
|
|
31295
|
+
], {
|
|
31296
|
+
props: mergedProps
|
|
31297
|
+
});
|
|
31298
|
+
const rootClassNames = clsx(overlayClassName, hashId, cssVarCls, contextClassName, mergedClassNames.root);
|
|
31299
|
+
const [open, setOpen] = useControlledState(props.defaultOpen ?? false, props.open);
|
|
31300
|
+
const settingOpen = (value)=>{
|
|
31301
|
+
setOpen(value);
|
|
31302
|
+
onOpenChange?.(value);
|
|
31303
|
+
};
|
|
31304
|
+
const titleNode = getRenderPropValue(title);
|
|
31305
|
+
const contentNode = getRenderPropValue(content);
|
|
31306
|
+
return /*#__PURE__*/ React.createElement(Tooltip, {
|
|
31307
|
+
unique: false,
|
|
31308
|
+
arrow: mergedArrow,
|
|
31309
|
+
placement: placement,
|
|
31310
|
+
trigger: mergedTrigger,
|
|
31311
|
+
mouseEnterDelay: mouseEnterDelay,
|
|
31312
|
+
mouseLeaveDelay: mouseLeaveDelay,
|
|
31313
|
+
...restProps,
|
|
31314
|
+
prefixCls: prefixCls,
|
|
31315
|
+
classNames: {
|
|
31316
|
+
root: rootClassNames,
|
|
31317
|
+
container: mergedClassNames.container,
|
|
31318
|
+
arrow: mergedClassNames.arrow
|
|
31319
|
+
},
|
|
31320
|
+
styles: {
|
|
31321
|
+
root: {
|
|
31322
|
+
...mergedStyles.root,
|
|
31323
|
+
...contextStyle,
|
|
31324
|
+
...overlayStyle
|
|
31325
|
+
},
|
|
31326
|
+
container: mergedStyles.container,
|
|
31327
|
+
arrow: mergedStyles.arrow
|
|
31328
|
+
},
|
|
31329
|
+
ref: ref,
|
|
31330
|
+
open: open,
|
|
31331
|
+
onOpenChange: settingOpen,
|
|
31332
|
+
overlay: titleNode || contentNode ? /*#__PURE__*/ React.createElement(Overlay$2, {
|
|
31333
|
+
prefixCls: prefixCls,
|
|
31334
|
+
title: titleNode,
|
|
31335
|
+
content: contentNode,
|
|
31336
|
+
classNames: mergedClassNames,
|
|
31337
|
+
styles: mergedStyles
|
|
31338
|
+
}) : null,
|
|
31339
|
+
motion: {
|
|
31340
|
+
motionName: getTransitionName(rootPrefixCls, 'zoom-big', typeof motion?.motionName === 'string' ? motion?.motionName : undefined)
|
|
31341
|
+
},
|
|
31342
|
+
"data-popover-inject": true
|
|
31343
|
+
}, children);
|
|
31344
|
+
});
|
|
31345
|
+
const Popover = InternalPopover;
|
|
31346
|
+
Popover._InternalPanelDoNotUseOrYouWillBeFired = PurePanel$2;
|
|
31347
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
31348
|
+
Popover.displayName = 'Popover';
|
|
31349
|
+
}
|
|
31012
31350
|
|
|
31013
31351
|
const LayoutContext = /*#__PURE__*/ React.createContext({
|
|
31014
31352
|
siderHook: {
|
|
@@ -31451,7 +31789,7 @@ const MenuItem = (props)=>{
|
|
|
31451
31789
|
const resolvedClassNames = tooltipConfig.classNames(info);
|
|
31452
31790
|
return mergeTooltipRootClassName(resolvedClassNames);
|
|
31453
31791
|
} : mergeTooltipRootClassName(tooltipConfig?.classNames);
|
|
31454
|
-
returnNode = /*#__PURE__*/ React.createElement(Tooltip
|
|
31792
|
+
returnNode = /*#__PURE__*/ React.createElement(Tooltip, {
|
|
31455
31793
|
...tooltipProps,
|
|
31456
31794
|
placement: mergedTooltipPlacement,
|
|
31457
31795
|
classNames: mergedTooltipClassNames
|
|
@@ -31586,6 +31924,12 @@ const getThemeStyle = (token, themeSuffix)=>{
|
|
|
31586
31924
|
color: itemHoverColor
|
|
31587
31925
|
}
|
|
31588
31926
|
},
|
|
31927
|
+
// SubMenu active (when hover on parent menu item)
|
|
31928
|
+
[`${componentCls}-submenu:not(${componentCls}-submenu-selected)`]: {
|
|
31929
|
+
[`> ${componentCls}-submenu-title:hover`]: {
|
|
31930
|
+
color: itemHoverColor
|
|
31931
|
+
}
|
|
31932
|
+
},
|
|
31589
31933
|
[`&:not(${componentCls}-horizontal)`]: {
|
|
31590
31934
|
[`${componentCls}-item:not(${componentCls}-item-selected)`]: {
|
|
31591
31935
|
'&:hover': {
|
|
@@ -31864,6 +32208,9 @@ const getVerticalStyle = (token)=>{
|
|
|
31864
32208
|
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-item,
|
|
31865
32209
|
> ${componentCls}-item-group > ${componentCls}-item-group-list > ${componentCls}-submenu > ${componentCls}-submenu-title,
|
|
31866
32210
|
> ${componentCls}-submenu > ${componentCls}-submenu-title`]: {
|
|
32211
|
+
display: 'flex',
|
|
32212
|
+
alignItems: 'center',
|
|
32213
|
+
justifyContent: 'center',
|
|
31867
32214
|
insetInlineStart: 0,
|
|
31868
32215
|
paddingInline: `calc(50% - ${unit(token.calc(collapsedIconSize).div(2).equal())} - ${unit(itemMarginInline)})`,
|
|
31869
32216
|
textOverflow: 'clip',
|
|
@@ -31873,13 +32220,21 @@ const getVerticalStyle = (token)=>{
|
|
|
31873
32220
|
`]: {
|
|
31874
32221
|
opacity: 0
|
|
31875
32222
|
},
|
|
32223
|
+
[`> ${componentCls}-title-content`]: {
|
|
32224
|
+
width: 0,
|
|
32225
|
+
opacity: 0,
|
|
32226
|
+
overflow: 'hidden'
|
|
32227
|
+
},
|
|
31876
32228
|
[`${componentCls}-item-icon, ${iconCls}`]: {
|
|
31877
32229
|
margin: 0,
|
|
31878
32230
|
fontSize: collapsedIconSize,
|
|
31879
32231
|
lineHeight: unit(itemHeight),
|
|
31880
32232
|
'+ span': {
|
|
31881
32233
|
display: 'inline-block',
|
|
31882
|
-
|
|
32234
|
+
width: 0,
|
|
32235
|
+
opacity: 0,
|
|
32236
|
+
overflow: 'hidden',
|
|
32237
|
+
marginInlineStart: 0
|
|
31883
32238
|
}
|
|
31884
32239
|
}
|
|
31885
32240
|
},
|
|
@@ -32166,52 +32521,28 @@ const getBaseStyle = (token)=>{
|
|
|
32166
32521
|
}
|
|
32167
32522
|
}
|
|
32168
32523
|
},
|
|
32169
|
-
|
|
32170
|
-
&-placement-leftTop,
|
|
32171
|
-
&-placement-bottomRight,
|
|
32172
|
-
`]: {
|
|
32524
|
+
'&-placement-leftTop, &-placement-bottomRight': {
|
|
32173
32525
|
transformOrigin: '100% 0'
|
|
32174
32526
|
},
|
|
32175
|
-
|
|
32176
|
-
&-placement-leftBottom,
|
|
32177
|
-
&-placement-topRight,
|
|
32178
|
-
`]: {
|
|
32527
|
+
'&-placement-leftBottom, &-placement-topRight': {
|
|
32179
32528
|
transformOrigin: '100% 100%'
|
|
32180
32529
|
},
|
|
32181
|
-
|
|
32182
|
-
&-placement-rightBottom,
|
|
32183
|
-
&-placement-topLeft,
|
|
32184
|
-
`]: {
|
|
32530
|
+
'&-placement-rightBottom, &-placement-topLeft': {
|
|
32185
32531
|
transformOrigin: '0 100%'
|
|
32186
32532
|
},
|
|
32187
|
-
|
|
32188
|
-
&-placement-bottomLeft,
|
|
32189
|
-
&-placement-rightTop,
|
|
32190
|
-
`]: {
|
|
32533
|
+
'&-placement-bottomLeft, &-placement-rightTop': {
|
|
32191
32534
|
transformOrigin: '0 0'
|
|
32192
32535
|
},
|
|
32193
|
-
|
|
32194
|
-
&-placement-leftTop,
|
|
32195
|
-
&-placement-leftBottom
|
|
32196
|
-
`]: {
|
|
32536
|
+
'&-placement-leftTop, &-placement-leftBottom': {
|
|
32197
32537
|
paddingInlineEnd: token.paddingXS
|
|
32198
32538
|
},
|
|
32199
|
-
|
|
32200
|
-
&-placement-rightTop,
|
|
32201
|
-
&-placement-rightBottom
|
|
32202
|
-
`]: {
|
|
32539
|
+
'&-placement-rightTop, &-placement-rightBottom': {
|
|
32203
32540
|
paddingInlineStart: token.paddingXS
|
|
32204
32541
|
},
|
|
32205
|
-
|
|
32206
|
-
&-placement-topRight,
|
|
32207
|
-
&-placement-topLeft
|
|
32208
|
-
`]: {
|
|
32542
|
+
'&-placement-topRight, &-placement-topLeft': {
|
|
32209
32543
|
paddingBottom: token.paddingXS
|
|
32210
32544
|
},
|
|
32211
|
-
|
|
32212
|
-
&-placement-bottomRight,
|
|
32213
|
-
&-placement-bottomLeft
|
|
32214
|
-
`]: {
|
|
32545
|
+
'&-placement-bottomRight, &-placement-bottomLeft': {
|
|
32215
32546
|
paddingTop: token.paddingXS
|
|
32216
32547
|
}
|
|
32217
32548
|
},
|
|
@@ -32812,11 +33143,7 @@ const genBaseStyle$2 = (token)=>{
|
|
|
32812
33143
|
transform: `rotate(180deg)`
|
|
32813
33144
|
}
|
|
32814
33145
|
},
|
|
32815
|
-
|
|
32816
|
-
&-hidden,
|
|
32817
|
-
&-menu-hidden,
|
|
32818
|
-
&-menu-submenu-hidden
|
|
32819
|
-
`]: {
|
|
33146
|
+
'&-hidden, &-menu-hidden, &-menu-submenu-hidden': {
|
|
32820
33147
|
display: 'none'
|
|
32821
33148
|
},
|
|
32822
33149
|
// =============================================================
|
|
@@ -33456,6 +33783,7 @@ const getRadioBasicStyle = (token)=>{
|
|
|
33456
33783
|
border: `${unit(lineWidth)} ${lineType} ${colorBorder}`,
|
|
33457
33784
|
borderRadius: '50%',
|
|
33458
33785
|
transition: `all ${motionDurationMid}`,
|
|
33786
|
+
flex: 'none',
|
|
33459
33787
|
// Dot
|
|
33460
33788
|
'&:after': {
|
|
33461
33789
|
content: '""',
|
|
@@ -33484,7 +33812,7 @@ const getRadioBasicStyle = (token)=>{
|
|
|
33484
33812
|
[`&:has(${componentCls}-input:focus-visible)`]: genFocusOutline(token)
|
|
33485
33813
|
},
|
|
33486
33814
|
// ===================== Hover =====================
|
|
33487
|
-
[`&:hover ${componentCls}`]: {
|
|
33815
|
+
[`&:hover:not(${componentCls}-wrapper-disabled) ${componentCls}`]: {
|
|
33488
33816
|
borderColor: colorPrimary
|
|
33489
33817
|
},
|
|
33490
33818
|
[`&:hover ${componentCls}-checked:not(${componentCls}-disabled)`]: {
|
|
@@ -33854,7 +34182,7 @@ const RadioGroup = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
33854
34182
|
// 如果存在 options, 优先使用
|
|
33855
34183
|
if (options && options.length > 0) {
|
|
33856
34184
|
childrenToRender = options.map((option)=>{
|
|
33857
|
-
if (typeof option === 'string' ||
|
|
34185
|
+
if (typeof option === 'string' || isNumber(option)) {
|
|
33858
34186
|
// 此处类型自动推导为 string
|
|
33859
34187
|
return /*#__PURE__*/ React.createElement(Radio$1, {
|
|
33860
34188
|
key: option.toString(),
|
|
@@ -33882,7 +34210,8 @@ const RadioGroup = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
33882
34210
|
const mergedSize = useSize(customizeSize);
|
|
33883
34211
|
const [, mergedVertical] = useOrientation(orientation, vertical);
|
|
33884
34212
|
const classString = clsx(groupPrefixCls, `${groupPrefixCls}-${buttonStyle}`, {
|
|
33885
|
-
[`${groupPrefixCls}
|
|
34213
|
+
[`${groupPrefixCls}-large`]: mergedSize === 'large',
|
|
34214
|
+
[`${groupPrefixCls}-small`]: mergedSize === 'small',
|
|
33886
34215
|
[`${groupPrefixCls}-rtl`]: direction === 'rtl',
|
|
33887
34216
|
[`${groupPrefixCls}-block`]: block
|
|
33888
34217
|
}, className, rootClassName, hashId, cssVarCls, rootCls);
|
|
@@ -33984,7 +34313,7 @@ const genHoverStyle = (token)=>({
|
|
|
33984
34313
|
const genDisabledStyle = (token)=>({
|
|
33985
34314
|
color: token.colorTextDisabled,
|
|
33986
34315
|
backgroundColor: token.colorBgContainerDisabled,
|
|
33987
|
-
borderColor: token.
|
|
34316
|
+
borderColor: token.colorBorderDisabled,
|
|
33988
34317
|
boxShadow: 'none',
|
|
33989
34318
|
cursor: 'not-allowed',
|
|
33990
34319
|
opacity: 1,
|
|
@@ -33993,7 +34322,7 @@ const genDisabledStyle = (token)=>({
|
|
|
33993
34322
|
},
|
|
33994
34323
|
'&:hover:not([disabled])': {
|
|
33995
34324
|
...genHoverStyle(mergeToken(token, {
|
|
33996
|
-
hoverBorderColor: token.
|
|
34325
|
+
hoverBorderColor: token.colorBorderDisabled,
|
|
33997
34326
|
hoverBg: token.colorBgContainerDisabled
|
|
33998
34327
|
}))
|
|
33999
34328
|
}
|
|
@@ -35506,17 +35835,17 @@ const genRtlStyle = (token)=>{
|
|
|
35506
35835
|
},
|
|
35507
35836
|
marginLeft: {
|
|
35508
35837
|
_skip_check_: true,
|
|
35509
|
-
value:
|
|
35838
|
+
value: token.marginSM
|
|
35510
35839
|
}
|
|
35511
35840
|
},
|
|
35512
35841
|
[`${componentCls}-tab-remove`]: {
|
|
35513
35842
|
marginRight: {
|
|
35514
35843
|
_skip_check_: true,
|
|
35515
|
-
value:
|
|
35844
|
+
value: token.marginXS
|
|
35516
35845
|
},
|
|
35517
35846
|
marginLeft: {
|
|
35518
35847
|
_skip_check_: true,
|
|
35519
|
-
value:
|
|
35848
|
+
value: calc(token.marginXXS).mul(-1).equal()
|
|
35520
35849
|
},
|
|
35521
35850
|
[iconCls]: {
|
|
35522
35851
|
margin: 0
|
|
@@ -35859,7 +36188,8 @@ const InternalTabs = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
35859
36188
|
...restProps,
|
|
35860
36189
|
items: mergedItems,
|
|
35861
36190
|
className: clsx({
|
|
35862
|
-
[`${prefixCls}
|
|
36191
|
+
[`${prefixCls}-large`]: size === 'large',
|
|
36192
|
+
[`${prefixCls}-small`]: size === 'small',
|
|
35863
36193
|
[`${prefixCls}-card`]: [
|
|
35864
36194
|
'card',
|
|
35865
36195
|
'editable-card'
|
|
@@ -36259,13 +36589,16 @@ const Card$1 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
36259
36589
|
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;
|
|
36260
36590
|
const { getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('card');
|
|
36261
36591
|
const [variant] = useVariant('card', customVariant, bordered);
|
|
36592
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
36593
|
+
const warning = devUseWarning('Card');
|
|
36594
|
+
warning.deprecated(customizeSize !== 'default', 'size="default"', 'size="medium"');
|
|
36595
|
+
}
|
|
36262
36596
|
const mergedSize = useSize(customizeSize);
|
|
36263
36597
|
// =========== Merged Props for Semantic ==========
|
|
36264
36598
|
const mergedProps = {
|
|
36265
36599
|
...props,
|
|
36266
36600
|
size: mergedSize,
|
|
36267
|
-
variant: variant
|
|
36268
|
-
loading
|
|
36601
|
+
variant: variant
|
|
36269
36602
|
};
|
|
36270
36603
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
36271
36604
|
contextClassNames,
|
|
@@ -36322,7 +36655,7 @@ const Card$1 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
36322
36655
|
tabBarExtraContent
|
|
36323
36656
|
};
|
|
36324
36657
|
let head;
|
|
36325
|
-
const tabSize =
|
|
36658
|
+
const tabSize = mergedSize !== 'small' ? 'large' : mergedSize;
|
|
36326
36659
|
const tabs = tabList ? /*#__PURE__*/ React.createElement(Tabs, {
|
|
36327
36660
|
size: tabSize,
|
|
36328
36661
|
...extraProps,
|
|
@@ -36383,7 +36716,7 @@ const Card$1 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
36383
36716
|
[`${prefixCls}-hoverable`]: hoverable,
|
|
36384
36717
|
[`${prefixCls}-contain-grid`]: isContainGrid,
|
|
36385
36718
|
[`${prefixCls}-contain-tabs`]: tabList?.length,
|
|
36386
|
-
[`${prefixCls}
|
|
36719
|
+
[`${prefixCls}-small`]: mergedSize === 'small',
|
|
36387
36720
|
[`${prefixCls}-type-${type}`]: !!type,
|
|
36388
36721
|
[`${prefixCls}-rtl`]: direction === 'rtl'
|
|
36389
36722
|
}, className, rootClassName, hashId, cssVarCls, mergedClassNames.root);
|
|
@@ -36521,6 +36854,7 @@ const genCheckboxStyle = (token)=>{
|
|
|
36521
36854
|
borderRadius: token.borderRadiusSM,
|
|
36522
36855
|
borderCollapse: 'separate',
|
|
36523
36856
|
transition: `all ${token.motionDurationSlow}`,
|
|
36857
|
+
flex: 'none',
|
|
36524
36858
|
...genNoMotionStyle(),
|
|
36525
36859
|
// Checkmark
|
|
36526
36860
|
'&:after': {
|
|
@@ -36806,7 +37140,7 @@ const CheckboxGroup = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
36806
37140
|
restProps.value
|
|
36807
37141
|
]);
|
|
36808
37142
|
const memoizedOptions = React.useMemo(()=>options.map((option)=>{
|
|
36809
|
-
if (typeof option === 'string' ||
|
|
37143
|
+
if (typeof option === 'string' || isNumber(option)) {
|
|
36810
37144
|
return {
|
|
36811
37145
|
label: option,
|
|
36812
37146
|
value: option
|
|
@@ -36901,9 +37235,6 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
36901
37235
|
|
|
36902
37236
|
const RowContext = /*#__PURE__*/ createContext({});
|
|
36903
37237
|
|
|
36904
|
-
const isNumber = (value)=>{
|
|
36905
|
-
return typeof value === 'number' && !Number.isNaN(value);
|
|
36906
|
-
};
|
|
36907
37238
|
function parseFlex(flex) {
|
|
36908
37239
|
if (flex === 'auto') {
|
|
36909
37240
|
return '1 1 auto';
|
|
@@ -36930,7 +37261,7 @@ const Col = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
36930
37261
|
responsiveArrayReversed.forEach((size)=>{
|
|
36931
37262
|
let sizeProps = {};
|
|
36932
37263
|
const propSize = props[size];
|
|
36933
|
-
if (
|
|
37264
|
+
if (isNumber(propSize)) {
|
|
36934
37265
|
sizeProps.span = propSize;
|
|
36935
37266
|
} else if (typeof propSize === 'object') {
|
|
36936
37267
|
sizeProps = propSize || {};
|
|
@@ -36938,7 +37269,7 @@ const Col = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
36938
37269
|
delete others[size];
|
|
36939
37270
|
sizeClassObj = {
|
|
36940
37271
|
...sizeClassObj,
|
|
36941
|
-
[`${prefixCls}-${size}-${sizeProps.span}`]: sizeProps.span
|
|
37272
|
+
[`${prefixCls}-${size}-${sizeProps.span}`]: isNonNullable(sizeProps.span),
|
|
36942
37273
|
[`${prefixCls}-${size}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,
|
|
36943
37274
|
[`${prefixCls}-${size}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,
|
|
36944
37275
|
[`${prefixCls}-${size}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,
|
|
@@ -36962,7 +37293,7 @@ const Col = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
36962
37293
|
const mergedStyle = {};
|
|
36963
37294
|
// Horizontal gutter use padding
|
|
36964
37295
|
if (gutter?.[0]) {
|
|
36965
|
-
const horizontalGutter =
|
|
37296
|
+
const horizontalGutter = isNumber(gutter[0]) ? `${gutter[0] / 2}px` : `calc(${gutter[0]} / 2)`;
|
|
36966
37297
|
mergedStyle.paddingInline = horizontalGutter;
|
|
36967
37298
|
}
|
|
36968
37299
|
if (flex) {
|
|
@@ -37072,7 +37403,7 @@ const Row = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
37072
37403
|
// Add gutter related style
|
|
37073
37404
|
const rowStyle = {};
|
|
37074
37405
|
if (gutters?.[0]) {
|
|
37075
|
-
const horizontalGutter =
|
|
37406
|
+
const horizontalGutter = isNumber(gutters[0]) ? `${gutters[0] / -2}px` : `calc(${gutters[0]} / -2)`;
|
|
37076
37407
|
rowStyle.marginInline = horizontalGutter;
|
|
37077
37408
|
}
|
|
37078
37409
|
// "gutters" is a new array in each rendering phase, it'll make 'React.useMemo' effectless.
|
|
@@ -37292,10 +37623,6 @@ const titlePlacementList = [
|
|
|
37292
37623
|
'start',
|
|
37293
37624
|
'end'
|
|
37294
37625
|
];
|
|
37295
|
-
const sizeClassNameMap = {
|
|
37296
|
-
small: 'sm',
|
|
37297
|
-
middle: 'md'
|
|
37298
|
-
};
|
|
37299
37626
|
const Divider = (props)=>{
|
|
37300
37627
|
const { getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('divider');
|
|
37301
37628
|
const { prefixCls: customizePrefixCls, type, orientation, vertical, titlePlacement, orientationMargin, className, rootClassName, children, dashed, variant = 'solid', plain, style, size: customSize, classNames, styles, ...restProps } = props;
|
|
@@ -37303,7 +37630,6 @@ const Divider = (props)=>{
|
|
|
37303
37630
|
const railCls = `${prefixCls}-rail`;
|
|
37304
37631
|
const [hashId, cssVarCls] = useStyle$c(prefixCls);
|
|
37305
37632
|
const sizeFullName = useSize(customSize);
|
|
37306
|
-
const sizeCls = sizeClassNameMap[sizeFullName];
|
|
37307
37633
|
const hasChildren = !!children;
|
|
37308
37634
|
const validTitlePlacement = titlePlacementList.includes(orientation || '');
|
|
37309
37635
|
const mergedTitlePlacement = React.useMemo(()=>{
|
|
@@ -37349,12 +37675,13 @@ const Divider = (props)=>{
|
|
|
37349
37675
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
37350
37676
|
[`${prefixCls}-no-default-orientation-margin-start`]: hasMarginStart,
|
|
37351
37677
|
[`${prefixCls}-no-default-orientation-margin-end`]: hasMarginEnd,
|
|
37352
|
-
[`${prefixCls}
|
|
37678
|
+
[`${prefixCls}-md`]: sizeFullName === 'medium' || sizeFullName === 'middle',
|
|
37679
|
+
[`${prefixCls}-sm`]: sizeFullName === 'small',
|
|
37353
37680
|
[railCls]: !children,
|
|
37354
37681
|
[mergedClassNames.rail]: mergedClassNames.rail && !children
|
|
37355
37682
|
}, className, rootClassName, mergedClassNames.root);
|
|
37356
37683
|
const memoizedPlacementMargin = React.useMemo(()=>{
|
|
37357
|
-
if (
|
|
37684
|
+
if (isNumber(orientationMargin)) {
|
|
37358
37685
|
return orientationMargin;
|
|
37359
37686
|
}
|
|
37360
37687
|
if (/^\d+$/.test(orientationMargin)) {
|
|
@@ -37426,6 +37753,7 @@ const genSpaceAddonStyle = (token)=>{
|
|
|
37426
37753
|
display: 'inline-flex',
|
|
37427
37754
|
alignItems: 'center',
|
|
37428
37755
|
gap: 0,
|
|
37756
|
+
whiteSpace: 'nowrap',
|
|
37429
37757
|
paddingInline: paddingSM,
|
|
37430
37758
|
margin: 0,
|
|
37431
37759
|
borderWidth: lineWidth,
|
|
@@ -37641,15 +37969,15 @@ const Input = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
37641
37969
|
const mergedStatus = getMergedStatus(contextStatus, customStatus);
|
|
37642
37970
|
// ===================== Focus warning =====================
|
|
37643
37971
|
const inputHasPrefixSuffix = hasPrefixSuffix(props) || !!hasFeedback;
|
|
37644
|
-
const
|
|
37972
|
+
const prevHasPrefixSuffixRef = useRef(inputHasPrefixSuffix);
|
|
37645
37973
|
/* eslint-disable react-hooks/rules-of-hooks */ if (process.env.NODE_ENV !== 'production') {
|
|
37646
37974
|
const warning = devUseWarning('Input');
|
|
37647
37975
|
// biome-ignore lint/correctness/useHookAtTopLevel: Development-only warning hook called conditionally
|
|
37648
37976
|
useEffect(()=>{
|
|
37649
|
-
if (inputHasPrefixSuffix && !
|
|
37977
|
+
if (inputHasPrefixSuffix && !prevHasPrefixSuffixRef.current) {
|
|
37650
37978
|
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;
|
|
37651
37979
|
}
|
|
37652
|
-
|
|
37980
|
+
prevHasPrefixSuffixRef.current = inputHasPrefixSuffix;
|
|
37653
37981
|
}, [
|
|
37654
37982
|
inputHasPrefixSuffix
|
|
37655
37983
|
]);
|
|
@@ -38172,7 +38500,7 @@ const Drawer$2 = (props)=>{
|
|
|
38172
38500
|
customizeGetContainer === undefined && getPopupContainer ? ()=>getPopupContainer(document.body) : customizeGetContainer;
|
|
38173
38501
|
// ============================ Size ============================
|
|
38174
38502
|
const drawerSize = React.useMemo(()=>{
|
|
38175
|
-
if (
|
|
38503
|
+
if (isNumber(size)) {
|
|
38176
38504
|
return size;
|
|
38177
38505
|
}
|
|
38178
38506
|
if (size === 'large') {
|
|
@@ -38380,6 +38708,7 @@ function isPresetSize(size) {
|
|
|
38380
38708
|
return [
|
|
38381
38709
|
'small',
|
|
38382
38710
|
'middle',
|
|
38711
|
+
'medium',
|
|
38383
38712
|
'large'
|
|
38384
38713
|
].includes(size);
|
|
38385
38714
|
}
|
|
@@ -38388,7 +38717,7 @@ function isValidGapNumber(size) {
|
|
|
38388
38717
|
// 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.
|
|
38389
38718
|
return false;
|
|
38390
38719
|
}
|
|
38391
|
-
return
|
|
38720
|
+
return isNumber(size);
|
|
38392
38721
|
}
|
|
38393
38722
|
|
|
38394
38723
|
const SpaceContext = /*#__PURE__*/ React__default.createContext({
|
|
@@ -38454,7 +38783,7 @@ const genSpaceGapStyle = (token)=>{
|
|
|
38454
38783
|
'&-gap-row-small': {
|
|
38455
38784
|
rowGap: token.spaceGapSmallSize
|
|
38456
38785
|
},
|
|
38457
|
-
'&-gap-row-middle': {
|
|
38786
|
+
'&-gap-row-medium, &-gap-row-middle': {
|
|
38458
38787
|
rowGap: token.spaceGapMiddleSize
|
|
38459
38788
|
},
|
|
38460
38789
|
'&-gap-row-large': {
|
|
@@ -38463,7 +38792,7 @@ const genSpaceGapStyle = (token)=>{
|
|
|
38463
38792
|
'&-gap-col-small': {
|
|
38464
38793
|
columnGap: token.spaceGapSmallSize
|
|
38465
38794
|
},
|
|
38466
|
-
'&-gap-col-middle': {
|
|
38795
|
+
'&-gap-col-medium, &-gap-col-middle': {
|
|
38467
38796
|
columnGap: token.spaceGapMiddleSize
|
|
38468
38797
|
},
|
|
38469
38798
|
'&-gap-col-large': {
|
|
@@ -39602,8 +39931,7 @@ const Pagination = (props)=>{
|
|
|
39602
39931
|
type: "button",
|
|
39603
39932
|
tabIndex: -1
|
|
39604
39933
|
}, direction === 'rtl' ? /*#__PURE__*/ React.createElement(LeftOutlined, null) : /*#__PURE__*/ React.createElement(RightOutlined, null));
|
|
39605
|
-
const jumpPrevIcon = /*#__PURE__*/
|
|
39606
|
-
React.createElement("a", {
|
|
39934
|
+
const jumpPrevIcon = /*#__PURE__*/ React.createElement("a", {
|
|
39607
39935
|
className: `${prefixCls}-item-link`
|
|
39608
39936
|
}, /*#__PURE__*/ React.createElement("div", {
|
|
39609
39937
|
className: `${prefixCls}-item-container`
|
|
@@ -39612,8 +39940,7 @@ const Pagination = (props)=>{
|
|
|
39612
39940
|
}) : /*#__PURE__*/ React.createElement(DoubleLeftOutlined, {
|
|
39613
39941
|
className: `${prefixCls}-item-link-icon`
|
|
39614
39942
|
}), ellipsis));
|
|
39615
|
-
const jumpNextIcon = /*#__PURE__*/
|
|
39616
|
-
React.createElement("a", {
|
|
39943
|
+
const jumpNextIcon = /*#__PURE__*/ React.createElement("a", {
|
|
39617
39944
|
className: `${prefixCls}-item-link`
|
|
39618
39945
|
}, /*#__PURE__*/ React.createElement("div", {
|
|
39619
39946
|
className: `${prefixCls}-item-container`
|
|
@@ -39838,7 +40165,9 @@ const Progress = ({ percent, prefixCls })=>{
|
|
|
39838
40165
|
strokeDasharray: `${circumference * safePtg / 100} ${circumference * (100 - safePtg) / 100}`
|
|
39839
40166
|
};
|
|
39840
40167
|
return /*#__PURE__*/ React.createElement("span", {
|
|
39841
|
-
className: clsx(holderClassName, `${dotClassName}-progress`,
|
|
40168
|
+
className: clsx(holderClassName, `${dotClassName}-progress`, {
|
|
40169
|
+
[hideClassName]: safePtg <= 0
|
|
40170
|
+
})
|
|
39842
40171
|
}, /*#__PURE__*/ React.createElement("svg", {
|
|
39843
40172
|
viewBox: `0 0 ${viewSize} ${viewSize}`,
|
|
39844
40173
|
role: "progressbar",
|
|
@@ -40198,7 +40527,7 @@ function shouldDelay(spinning, delay) {
|
|
|
40198
40527
|
return !!spinning && !!delay && !Number.isNaN(Number(delay));
|
|
40199
40528
|
}
|
|
40200
40529
|
const Spin = (props)=>{
|
|
40201
|
-
const { prefixCls: customizePrefixCls, spinning: customSpinning = true, delay = 0, className, rootClassName, size
|
|
40530
|
+
const { prefixCls: customizePrefixCls, spinning: customSpinning = true, delay = 0, className, rootClassName, size, tip, description, wrapperClassName, style, children, fullscreen = false, indicator, percent, classNames, styles, ...restProps } = props;
|
|
40202
40531
|
const { getPrefixCls, direction, indicator: contextIndicator, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('spin');
|
|
40203
40532
|
const prefixCls = getPrefixCls('spin', customizePrefixCls);
|
|
40204
40533
|
const [hashId, cssVarCls] = useStyle$6(prefixCls);
|
|
@@ -40219,12 +40548,18 @@ const Spin = (props)=>{
|
|
|
40219
40548
|
delay,
|
|
40220
40549
|
customSpinning
|
|
40221
40550
|
]);
|
|
40551
|
+
// ======================= Size ======================
|
|
40552
|
+
const mergedSize = useSize((ctx)=>size ?? ctx);
|
|
40553
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
40554
|
+
const warning = devUseWarning('Spin');
|
|
40555
|
+
warning.deprecated(size !== 'default', 'size="default"', 'size="medium"');
|
|
40556
|
+
}
|
|
40222
40557
|
// ======================= Description ======================
|
|
40223
40558
|
const mergedDescription = description ?? tip;
|
|
40224
40559
|
// =============== Merged Props for Semantic ================
|
|
40225
40560
|
const mergedProps = {
|
|
40226
40561
|
...props,
|
|
40227
|
-
size,
|
|
40562
|
+
size: mergedSize,
|
|
40228
40563
|
spinning,
|
|
40229
40564
|
tip: mergedDescription,
|
|
40230
40565
|
description: mergedDescription,
|
|
@@ -40270,8 +40605,8 @@ const Spin = (props)=>{
|
|
|
40270
40605
|
}, mergedDescription));
|
|
40271
40606
|
return /*#__PURE__*/ React.createElement("div", {
|
|
40272
40607
|
className: clsx(prefixCls, {
|
|
40273
|
-
[`${prefixCls}-sm`]:
|
|
40274
|
-
[`${prefixCls}-lg`]:
|
|
40608
|
+
[`${prefixCls}-sm`]: mergedSize === 'small',
|
|
40609
|
+
[`${prefixCls}-lg`]: mergedSize === 'large',
|
|
40275
40610
|
[`${prefixCls}-spinning`]: spinning,
|
|
40276
40611
|
[`${prefixCls}-rtl`]: direction === 'rtl',
|
|
40277
40612
|
[`${prefixCls}-fullscreen`]: fullscreen
|
|
@@ -40304,12 +40639,12 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
40304
40639
|
Spin.displayName = 'Spin';
|
|
40305
40640
|
}
|
|
40306
40641
|
|
|
40307
|
-
const toList
|
|
40308
|
-
if (
|
|
40642
|
+
const toList = (val, config = {})=>{
|
|
40643
|
+
if (!isNonNullable(val) && config?.skipEmpty) {
|
|
40309
40644
|
return [];
|
|
40310
40645
|
}
|
|
40311
|
-
return Array.isArray(
|
|
40312
|
-
|
|
40646
|
+
return Array.isArray(val) ? val : [
|
|
40647
|
+
val
|
|
40313
40648
|
];
|
|
40314
40649
|
};
|
|
40315
40650
|
|
|
@@ -40531,7 +40866,7 @@ const baseStaticMethods = {
|
|
|
40531
40866
|
destroy,
|
|
40532
40867
|
config: setMessageGlobalConfig,
|
|
40533
40868
|
useMessage,
|
|
40534
|
-
_InternalPanelDoNotUseOrYouWillBeFired: PurePanel$
|
|
40869
|
+
_InternalPanelDoNotUseOrYouWillBeFired: PurePanel$5
|
|
40535
40870
|
};
|
|
40536
40871
|
const staticMethods = baseStaticMethods;
|
|
40537
40872
|
methods.forEach((type)=>{
|
|
@@ -40558,7 +40893,7 @@ const StatisticNumber = (props)=>{
|
|
|
40558
40893
|
let int = cells[2] || '0';
|
|
40559
40894
|
let decimal = cells[4] || '';
|
|
40560
40895
|
int = int.replace(/\B(?=(\d{3})+(?!\d))/g, groupSeparator);
|
|
40561
|
-
if (
|
|
40896
|
+
if (isNumber(precision)) {
|
|
40562
40897
|
decimal = decimal.padEnd(precision, '0').slice(0, precision > 0 ? precision : 0);
|
|
40563
40898
|
}
|
|
40564
40899
|
if (decimal) {
|
|
@@ -40718,7 +41053,7 @@ const Statistic = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
40718
41053
|
}, prefix && /*#__PURE__*/ React.createElement("span", {
|
|
40719
41054
|
className: prefixClassNames,
|
|
40720
41055
|
style: mergedStyles.prefix
|
|
40721
|
-
}, prefix), valueRender ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/ React.createElement("span", {
|
|
41056
|
+
}, prefix), typeof valueRender === 'function' ? valueRender(valueNode) : valueNode, suffix && /*#__PURE__*/ React.createElement("span", {
|
|
40722
41057
|
className: suffixClassNames,
|
|
40723
41058
|
style: mergedStyles.suffix
|
|
40724
41059
|
}, suffix))));
|
|
@@ -41175,6 +41510,10 @@ const InternalSwitch = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
41175
41510
|
const prefixCls = getPrefixCls('switch', customizePrefixCls);
|
|
41176
41511
|
// Style
|
|
41177
41512
|
const [hashId, cssVarCls] = useStyle$4(prefixCls);
|
|
41513
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
41514
|
+
const warning = devUseWarning('Switch');
|
|
41515
|
+
warning.deprecated(customizeSize !== 'default', 'size="default"', 'size="medium"');
|
|
41516
|
+
}
|
|
41178
41517
|
const mergedSize = useSize(customizeSize);
|
|
41179
41518
|
const mergedProps = {
|
|
41180
41519
|
...props,
|
|
@@ -41260,6 +41599,7 @@ const useSelection = (config, rowSelection)=>{
|
|
|
41260
41599
|
const [multipleSelect, updatePrevSelectedIndex] = useMultipleSelect((item)=>item);
|
|
41261
41600
|
// ========================= Keys =========================
|
|
41262
41601
|
const [mergedSelectedKeys, setMergedSelectedKeys] = useControlledState(defaultSelectedRowKeys || EMPTY_LIST$1, selectedRowKeys);
|
|
41602
|
+
const mergedSelectedKeyList = mergedSelectedKeys ?? EMPTY_LIST$1;
|
|
41263
41603
|
// ======================== Caches ========================
|
|
41264
41604
|
const preserveRecordsRef = React.useRef(new Map());
|
|
41265
41605
|
const updatePreserveRecordsCache = useCallback((keys)=>{
|
|
@@ -41282,9 +41622,10 @@ const useSelection = (config, rowSelection)=>{
|
|
|
41282
41622
|
]);
|
|
41283
41623
|
// Update cache with selectedKeys
|
|
41284
41624
|
React.useEffect(()=>{
|
|
41285
|
-
updatePreserveRecordsCache(
|
|
41625
|
+
updatePreserveRecordsCache(mergedSelectedKeyList);
|
|
41286
41626
|
}, [
|
|
41287
|
-
|
|
41627
|
+
mergedSelectedKeyList,
|
|
41628
|
+
updatePreserveRecordsCache
|
|
41288
41629
|
]);
|
|
41289
41630
|
// Get flatten data
|
|
41290
41631
|
const flattedData = useMemo(()=>flattenData(childrenColumnName, pageData), [
|
|
@@ -41348,17 +41689,17 @@ const useSelection = (config, rowSelection)=>{
|
|
|
41348
41689
|
const [derivedSelectedKeys, derivedHalfSelectedKeys] = useMemo(()=>{
|
|
41349
41690
|
if (checkStrictly) {
|
|
41350
41691
|
return [
|
|
41351
|
-
|
|
41692
|
+
mergedSelectedKeyList,
|
|
41352
41693
|
[]
|
|
41353
41694
|
];
|
|
41354
41695
|
}
|
|
41355
|
-
const { checkedKeys, halfCheckedKeys } = conductCheck(
|
|
41696
|
+
const { checkedKeys, halfCheckedKeys } = conductCheck(mergedSelectedKeyList, true, keyEntities, isCheckboxDisabled);
|
|
41356
41697
|
return [
|
|
41357
41698
|
checkedKeys || [],
|
|
41358
41699
|
halfCheckedKeys
|
|
41359
41700
|
];
|
|
41360
41701
|
}, [
|
|
41361
|
-
|
|
41702
|
+
mergedSelectedKeyList,
|
|
41362
41703
|
checkStrictly,
|
|
41363
41704
|
keyEntities,
|
|
41364
41705
|
isCheckboxDisabled
|
|
@@ -41947,7 +42288,7 @@ const getDropIndicatorStyle = (prefixCls, token)=>({
|
|
|
41947
42288
|
}
|
|
41948
42289
|
});
|
|
41949
42290
|
const genBaseStyle$1 = (prefixCls, token)=>{
|
|
41950
|
-
const { treeCls, treeNodeCls, treeNodePadding, titleHeight, indentSize, motionDurationMid, nodeSelectedBg, nodeHoverBg, colorTextQuaternary, controlItemBgActiveDisabled } = token;
|
|
42291
|
+
const { treeCls, treeNodeCls, treeNodePadding, titleHeight, indentSize, switcherSize, motionDurationMid, nodeSelectedBg, nodeHoverBg, colorTextQuaternary, controlItemBgActiveDisabled } = token;
|
|
41951
42292
|
return {
|
|
41952
42293
|
[treeCls]: {
|
|
41953
42294
|
...resetComponent(token),
|
|
@@ -42051,7 +42392,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42051
42392
|
[`${treeCls}-draggable-icon`]: {
|
|
42052
42393
|
// https://github.com/ant-design/ant-design/issues/41915
|
|
42053
42394
|
flexShrink: 0,
|
|
42054
|
-
width:
|
|
42395
|
+
width: switcherSize,
|
|
42055
42396
|
textAlign: 'center',
|
|
42056
42397
|
visibility: 'visible',
|
|
42057
42398
|
color: colorTextQuaternary
|
|
@@ -42077,12 +42418,18 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42077
42418
|
},
|
|
42078
42419
|
// Switcher / Checkbox
|
|
42079
42420
|
[`${treeCls}-switcher, ${treeCls}-checkbox`]: {
|
|
42080
|
-
marginInlineEnd: token.calc(token.calc(
|
|
42421
|
+
marginInlineEnd: token.calc(token.calc(switcherSize).sub(token.controlInteractiveSize)).div(2).equal()
|
|
42081
42422
|
},
|
|
42082
42423
|
// >>> Checkbox
|
|
42083
42424
|
// https://github.com/ant-design/ant-design/issues/56957
|
|
42084
42425
|
[`${treeCls}-checkbox`]: {
|
|
42085
|
-
flexShrink: 0
|
|
42426
|
+
flexShrink: 0,
|
|
42427
|
+
// When the title spans multiple lines, the checkbox aligns vertically centered with other elements
|
|
42428
|
+
// However, the switcher aligns to flex-start, causing a vertical alignment discrepancy in the parent node
|
|
42429
|
+
// Currently, the checkbox uses start alignment, but this causes it to stick to the top, resulting in a visually higher position
|
|
42430
|
+
// By setting the switcher's lineHeight to titleHeight, the required margin-block-start distance can be calculated to correct the alignment
|
|
42431
|
+
alignSelf: 'flex-start',
|
|
42432
|
+
marginBlockStart: token.calc(token.calc(titleHeight).sub(token.controlInteractiveSize)).div(2).equal()
|
|
42086
42433
|
},
|
|
42087
42434
|
// >>> Switcher
|
|
42088
42435
|
[`${treeCls}-switcher`]: {
|
|
@@ -42090,7 +42437,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42090
42437
|
position: 'relative',
|
|
42091
42438
|
flex: 'none',
|
|
42092
42439
|
alignSelf: 'stretch',
|
|
42093
|
-
width:
|
|
42440
|
+
width: switcherSize,
|
|
42094
42441
|
textAlign: 'center',
|
|
42095
42442
|
cursor: 'pointer',
|
|
42096
42443
|
userSelect: 'none',
|
|
@@ -42101,7 +42448,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42101
42448
|
'&:before': {
|
|
42102
42449
|
pointerEvents: 'none',
|
|
42103
42450
|
content: '""',
|
|
42104
|
-
width:
|
|
42451
|
+
width: switcherSize,
|
|
42105
42452
|
height: titleHeight,
|
|
42106
42453
|
position: 'absolute',
|
|
42107
42454
|
left: {
|
|
@@ -42131,7 +42478,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42131
42478
|
'&:before': {
|
|
42132
42479
|
position: 'absolute',
|
|
42133
42480
|
top: 0,
|
|
42134
|
-
insetInlineEnd: token.calc(
|
|
42481
|
+
insetInlineEnd: token.calc(switcherSize).div(2).equal(),
|
|
42135
42482
|
bottom: token.calc(treeNodePadding).mul(-1).equal(),
|
|
42136
42483
|
marginInlineStart: -1,
|
|
42137
42484
|
borderInlineEnd: `1px solid ${token.colorBorder}`,
|
|
@@ -42139,7 +42486,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42139
42486
|
},
|
|
42140
42487
|
'&:after': {
|
|
42141
42488
|
position: 'absolute',
|
|
42142
|
-
width: token.calc(token.calc(
|
|
42489
|
+
width: token.calc(token.calc(switcherSize).div(2).equal()).mul(0.8).equal(),
|
|
42143
42490
|
height: token.calc(titleHeight).div(2).equal(),
|
|
42144
42491
|
borderBottom: `1px solid ${token.colorBorder}`,
|
|
42145
42492
|
content: '""'
|
|
@@ -42173,7 +42520,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42173
42520
|
// Icon
|
|
42174
42521
|
[`${treeCls}-iconEle`]: {
|
|
42175
42522
|
display: 'inline-block',
|
|
42176
|
-
width:
|
|
42523
|
+
width: switcherSize,
|
|
42177
42524
|
height: titleHeight,
|
|
42178
42525
|
textAlign: 'center',
|
|
42179
42526
|
verticalAlign: 'top',
|
|
@@ -42198,7 +42545,7 @@ const genBaseStyle$1 = (prefixCls, token)=>{
|
|
|
42198
42545
|
'&:before': {
|
|
42199
42546
|
position: 'absolute',
|
|
42200
42547
|
top: 0,
|
|
42201
|
-
insetInlineEnd: token.calc(
|
|
42548
|
+
insetInlineEnd: token.calc(switcherSize).div(2).equal(),
|
|
42202
42549
|
bottom: token.calc(treeNodePadding).mul(-1).equal(),
|
|
42203
42550
|
borderInlineEnd: `1px solid ${token.colorBorder}`,
|
|
42204
42551
|
content: '""'
|
|
@@ -42250,6 +42597,7 @@ const initComponentToken = (token)=>{
|
|
|
42250
42597
|
const titleHeight = controlHeightSM;
|
|
42251
42598
|
return {
|
|
42252
42599
|
titleHeight,
|
|
42600
|
+
switcherSize: titleHeight,
|
|
42253
42601
|
indentSize: titleHeight,
|
|
42254
42602
|
nodeHoverBg: controlItemBgHover,
|
|
42255
42603
|
nodeHoverColor: token.colorText,
|
|
@@ -42274,7 +42622,7 @@ var useStyle$3 = genStyleHooks('Tree', (token, { prefixCls })=>[
|
|
|
42274
42622
|
], prepareComponentToken$3);
|
|
42275
42623
|
|
|
42276
42624
|
const offset = 4;
|
|
42277
|
-
|
|
42625
|
+
const dropIndicatorRender = (props)=>{
|
|
42278
42626
|
const { dropPosition, dropLevelOffset, prefixCls, indent, direction = 'ltr' } = props;
|
|
42279
42627
|
const startPosition = direction === 'ltr' ? 'left' : 'right';
|
|
42280
42628
|
const endPosition = direction === 'ltr' ? 'right' : 'left';
|
|
@@ -42299,7 +42647,7 @@ function dropIndicatorRender(props) {
|
|
|
42299
42647
|
style: style,
|
|
42300
42648
|
className: `${prefixCls}-drop-indicator`
|
|
42301
42649
|
});
|
|
42302
|
-
}
|
|
42650
|
+
};
|
|
42303
42651
|
|
|
42304
42652
|
const SwitcherIconCom = (props)=>{
|
|
42305
42653
|
const { prefixCls, switcherIcon, treeNodeProps, showLine, switcherLoadingIcon } = props;
|
|
@@ -42340,7 +42688,7 @@ const SwitcherIconCom = (props)=>{
|
|
|
42340
42688
|
const switcher = typeof switcherIcon === 'function' ? switcherIcon(treeNodeProps) : switcherIcon;
|
|
42341
42689
|
if (/*#__PURE__*/ React.isValidElement(switcher)) {
|
|
42342
42690
|
return cloneElement(switcher, {
|
|
42343
|
-
className: clsx(switcher.props?.className, switcherCls)
|
|
42691
|
+
className: clsx(switcher.props?.className, showLine ? `${prefixCls}-switcher-line-icon` : switcherCls)
|
|
42344
42692
|
});
|
|
42345
42693
|
}
|
|
42346
42694
|
if (switcher !== undefined) {
|
|
@@ -42361,7 +42709,7 @@ const SwitcherIconCom = (props)=>{
|
|
|
42361
42709
|
const Tree$1 = /*#__PURE__*/ React__default.forwardRef((props, ref)=>{
|
|
42362
42710
|
const { getPrefixCls, direction, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('tree');
|
|
42363
42711
|
const { virtual } = React__default.useContext(ConfigContext);
|
|
42364
|
-
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;
|
|
42712
|
+
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;
|
|
42365
42713
|
const contextDisabled = React__default.useContext(DisabledContext);
|
|
42366
42714
|
const mergedDisabled = disabled ?? contextDisabled;
|
|
42367
42715
|
const prefixCls = getPrefixCls('tree', customizePrefixCls);
|
|
@@ -42392,7 +42740,8 @@ const Tree$1 = /*#__PURE__*/ React__default.forwardRef((props, ref)=>{
|
|
|
42392
42740
|
const newProps = {
|
|
42393
42741
|
...mergedProps,
|
|
42394
42742
|
showLine: Boolean(showLine),
|
|
42395
|
-
|
|
42743
|
+
icon: icon,
|
|
42744
|
+
dropIndicatorRender: dropIndicatorRender
|
|
42396
42745
|
};
|
|
42397
42746
|
const [hashId, cssVarCls] = useStyle$3(prefixCls);
|
|
42398
42747
|
const [, token] = useToken();
|
|
@@ -42426,8 +42775,7 @@ const Tree$1 = /*#__PURE__*/ React__default.forwardRef((props, ref)=>{
|
|
|
42426
42775
|
treeNodeProps: nodeProps,
|
|
42427
42776
|
showLine: showLine
|
|
42428
42777
|
});
|
|
42429
|
-
return
|
|
42430
|
-
React__default.createElement(RcTree, {
|
|
42778
|
+
return /*#__PURE__*/ React__default.createElement(RcTree, {
|
|
42431
42779
|
itemHeight: itemHeight,
|
|
42432
42780
|
ref: ref,
|
|
42433
42781
|
virtual: virtual,
|
|
@@ -42445,8 +42793,8 @@ const Tree$1 = /*#__PURE__*/ React__default.forwardRef((props, ref)=>{
|
|
|
42445
42793
|
...contextStyle,
|
|
42446
42794
|
...style
|
|
42447
42795
|
},
|
|
42448
|
-
rootClassName: clsx(mergedClassNames
|
|
42449
|
-
rootStyle: mergedStyles
|
|
42796
|
+
rootClassName: clsx(mergedClassNames.root, rootClassName),
|
|
42797
|
+
rootStyle: mergedStyles.root,
|
|
42450
42798
|
classNames: mergedClassNames,
|
|
42451
42799
|
styles: mergedStyles,
|
|
42452
42800
|
direction: direction,
|
|
@@ -42456,7 +42804,7 @@ const Tree$1 = /*#__PURE__*/ React__default.forwardRef((props, ref)=>{
|
|
|
42456
42804
|
selectable: selectable,
|
|
42457
42805
|
switcherIcon: renderSwitcherIcon,
|
|
42458
42806
|
draggable: draggableConfig
|
|
42459
|
-
}, children)
|
|
42807
|
+
}, children);
|
|
42460
42808
|
});
|
|
42461
42809
|
if (process.env.NODE_ENV !== 'production') {
|
|
42462
42810
|
Tree$1.displayName = 'Tree';
|
|
@@ -42538,8 +42886,8 @@ function getTreeData({ treeData, children }) {
|
|
|
42538
42886
|
const DirectoryTree = /*#__PURE__*/ React.forwardRef((oriProps, ref)=>{
|
|
42539
42887
|
const { defaultExpandAll, defaultExpandParent, defaultExpandedKeys, ...props } = oriProps;
|
|
42540
42888
|
// Shift click usage
|
|
42541
|
-
const
|
|
42542
|
-
const
|
|
42889
|
+
const lastSelectedKeyRef = React.useRef(null);
|
|
42890
|
+
const cachedSelectedKeysRef = React.useRef(null);
|
|
42543
42891
|
const getInitExpandedKeys = ()=>{
|
|
42544
42892
|
const { keyEntities } = convertDataToEntities(getTreeData(props), {
|
|
42545
42893
|
fieldNames: props.fieldNames
|
|
@@ -42597,16 +42945,16 @@ const DirectoryTree = /*#__PURE__*/ React.forwardRef((oriProps, ref)=>{
|
|
|
42597
42945
|
if (multiple && ctrlPick) {
|
|
42598
42946
|
// Control click
|
|
42599
42947
|
newSelectedKeys = keys;
|
|
42600
|
-
|
|
42601
|
-
|
|
42948
|
+
lastSelectedKeyRef.current = key;
|
|
42949
|
+
cachedSelectedKeysRef.current = newSelectedKeys;
|
|
42602
42950
|
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
|
|
42603
42951
|
} else if (multiple && shiftPick) {
|
|
42604
42952
|
// Shift click
|
|
42605
|
-
newSelectedKeys = Array.from(new Set([].concat(_toConsumableArray(
|
|
42953
|
+
newSelectedKeys = Array.from(new Set([].concat(_toConsumableArray(cachedSelectedKeysRef.current || []), _toConsumableArray(calcRangeKeys({
|
|
42606
42954
|
treeData,
|
|
42607
42955
|
expandedKeys,
|
|
42608
42956
|
startKey: key,
|
|
42609
|
-
endKey:
|
|
42957
|
+
endKey: lastSelectedKeyRef.current,
|
|
42610
42958
|
fieldNames
|
|
42611
42959
|
})))));
|
|
42612
42960
|
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
|
|
@@ -42615,8 +42963,8 @@ const DirectoryTree = /*#__PURE__*/ React.forwardRef((oriProps, ref)=>{
|
|
|
42615
42963
|
newSelectedKeys = [
|
|
42616
42964
|
key
|
|
42617
42965
|
];
|
|
42618
|
-
|
|
42619
|
-
|
|
42966
|
+
lastSelectedKeyRef.current = key;
|
|
42967
|
+
cachedSelectedKeysRef.current = newSelectedKeys;
|
|
42620
42968
|
newEvent.selectedNodes = convertDirectoryKeysToNodes(treeData, newSelectedKeys, fieldNames);
|
|
42621
42969
|
}
|
|
42622
42970
|
props.onSelect?.(newSelectedKeys, newEvent);
|
|
@@ -42653,8 +43001,6 @@ const Tree = Tree$1;
|
|
|
42653
43001
|
Tree.DirectoryTree = DirectoryTree;
|
|
42654
43002
|
Tree.TreeNode = TreeNode$1;
|
|
42655
43003
|
|
|
42656
|
-
const TableMeasureRowContext = /*#__PURE__*/ React__default.createContext(false);
|
|
42657
|
-
|
|
42658
43004
|
const FilterSearch = (props)=>{
|
|
42659
43005
|
const { value, filterSearch, tablePrefixCls, locale, onChange } = props;
|
|
42660
43006
|
if (!filterSearch) {
|
|
@@ -42702,13 +43048,14 @@ function flattenKeys(filters) {
|
|
|
42702
43048
|
function hasSubMenu(filters) {
|
|
42703
43049
|
return filters.some(({ children })=>children);
|
|
42704
43050
|
}
|
|
42705
|
-
|
|
42706
|
-
if (typeof text === 'string' ||
|
|
42707
|
-
return text
|
|
43051
|
+
const searchValueMatched = (normalizedSearchValue, text)=>{
|
|
43052
|
+
if (typeof text === 'string' || isNumber(text)) {
|
|
43053
|
+
return text.toString().toLowerCase().includes(normalizedSearchValue);
|
|
42708
43054
|
}
|
|
42709
43055
|
return false;
|
|
42710
|
-
}
|
|
42711
|
-
|
|
43056
|
+
};
|
|
43057
|
+
const renderFilterItems = (options)=>{
|
|
43058
|
+
const { filters, prefixCls, filteredKeys, filterMultiple, searchValue, normalizedSearchValue, filterSearch } = options;
|
|
42712
43059
|
return filters.map((filter, index)=>{
|
|
42713
43060
|
const key = String(filter.value);
|
|
42714
43061
|
if (filter.children) {
|
|
@@ -42722,6 +43069,7 @@ function renderFilterItems({ filters, prefixCls, filteredKeys, filterMultiple, s
|
|
|
42722
43069
|
filteredKeys,
|
|
42723
43070
|
filterMultiple,
|
|
42724
43071
|
searchValue,
|
|
43072
|
+
normalizedSearchValue,
|
|
42725
43073
|
filterSearch
|
|
42726
43074
|
})
|
|
42727
43075
|
};
|
|
@@ -42733,15 +43081,15 @@ function renderFilterItems({ filters, prefixCls, filteredKeys, filterMultiple, s
|
|
|
42733
43081
|
checked: filteredKeys.includes(key)
|
|
42734
43082
|
}), /*#__PURE__*/ React.createElement("span", null, filter.text))
|
|
42735
43083
|
};
|
|
42736
|
-
if (
|
|
43084
|
+
if (normalizedSearchValue) {
|
|
42737
43085
|
if (typeof filterSearch === 'function') {
|
|
42738
|
-
return filterSearch(
|
|
43086
|
+
return filterSearch(normalizedSearchValue, filter) ? item : null;
|
|
42739
43087
|
}
|
|
42740
|
-
return searchValueMatched(
|
|
43088
|
+
return searchValueMatched(normalizedSearchValue, filter.text) ? item : null;
|
|
42741
43089
|
}
|
|
42742
43090
|
return item;
|
|
42743
43091
|
});
|
|
42744
|
-
}
|
|
43092
|
+
};
|
|
42745
43093
|
function wrapStringListType(keys) {
|
|
42746
43094
|
return keys || [];
|
|
42747
43095
|
}
|
|
@@ -42814,6 +43162,9 @@ const FilterDropdown = (props)=>{
|
|
|
42814
43162
|
};
|
|
42815
43163
|
// search in tree mode column filter
|
|
42816
43164
|
const [searchValue, setSearchValue] = React.useState('');
|
|
43165
|
+
const normalizedSearchValue = React.useMemo(()=>searchValue.trim().toLowerCase(), [
|
|
43166
|
+
searchValue
|
|
43167
|
+
]);
|
|
42817
43168
|
const onSearch = (e)=>{
|
|
42818
43169
|
const { value } = e.target;
|
|
42819
43170
|
setSearchValue(value);
|
|
@@ -42981,11 +43332,11 @@ const FilterDropdown = (props)=>{
|
|
|
42981
43332
|
}),
|
|
42982
43333
|
autoExpandParent: true,
|
|
42983
43334
|
defaultExpandAll: true,
|
|
42984
|
-
filterTreeNode:
|
|
43335
|
+
filterTreeNode: normalizedSearchValue ? (node)=>{
|
|
42985
43336
|
if (typeof filterSearch === 'function') {
|
|
42986
43337
|
return filterSearch(searchValue, getFilterData(node));
|
|
42987
43338
|
}
|
|
42988
|
-
return searchValueMatched(
|
|
43339
|
+
return searchValueMatched(normalizedSearchValue, node.title);
|
|
42989
43340
|
} : undefined
|
|
42990
43341
|
})));
|
|
42991
43342
|
}
|
|
@@ -42995,7 +43346,8 @@ const FilterDropdown = (props)=>{
|
|
|
42995
43346
|
prefixCls,
|
|
42996
43347
|
filteredKeys: getFilteredKeysSync(),
|
|
42997
43348
|
filterMultiple,
|
|
42998
|
-
searchValue
|
|
43349
|
+
searchValue,
|
|
43350
|
+
normalizedSearchValue
|
|
42999
43351
|
});
|
|
43000
43352
|
const isEmpty = items.every((item)=>item === null);
|
|
43001
43353
|
return /*#__PURE__*/ React.createElement(React.Fragment, null, /*#__PURE__*/ React.createElement(FilterSearch, {
|
|
@@ -43194,19 +43546,33 @@ const getFilterData = (data, filterStates, childrenColumnName)=>{
|
|
|
43194
43546
|
const filterDatas = filterStates.reduce((currentData, filterState)=>{
|
|
43195
43547
|
const { column: { onFilter, filters }, filteredKeys } = filterState;
|
|
43196
43548
|
if (onFilter && filteredKeys && filteredKeys.length) {
|
|
43197
|
-
|
|
43198
|
-
|
|
43199
|
-
|
|
43200
|
-
|
|
43201
|
-
|
|
43202
|
-
|
|
43203
|
-
|
|
43204
|
-
|
|
43205
|
-
|
|
43206
|
-
|
|
43549
|
+
// Preprocess the keys corresponding to the filter tree,
|
|
43550
|
+
// use Map to improve lookup performance to O(1).
|
|
43551
|
+
const flatKeys = flattenKeys(filters);
|
|
43552
|
+
const keyMap = new Map();
|
|
43553
|
+
flatKeys.forEach((k)=>{
|
|
43554
|
+
const strKey = String(k);
|
|
43555
|
+
if (!keyMap.has(strKey)) {
|
|
43556
|
+
keyMap.set(strKey, k);
|
|
43557
|
+
}
|
|
43558
|
+
});
|
|
43559
|
+
const realKeys = filteredKeys.map((key)=>{
|
|
43560
|
+
const strKey = String(key);
|
|
43561
|
+
return keyMap.get(strKey) ?? key;
|
|
43562
|
+
});
|
|
43563
|
+
const internalFilter = (subset)=>subset.reduce((acc, record)=>{
|
|
43564
|
+
const clonedRecord = {
|
|
43565
|
+
...record
|
|
43566
|
+
};
|
|
43567
|
+
if (clonedRecord[childrenColumnName]) {
|
|
43568
|
+
clonedRecord[childrenColumnName] = getFilterData(clonedRecord[childrenColumnName], filterStates, childrenColumnName);
|
|
43207
43569
|
}
|
|
43208
|
-
|
|
43209
|
-
|
|
43570
|
+
if (realKeys.some((realKey)=>onFilter(realKey, clonedRecord))) {
|
|
43571
|
+
acc.push(clonedRecord);
|
|
43572
|
+
}
|
|
43573
|
+
return acc;
|
|
43574
|
+
}, []);
|
|
43575
|
+
return internalFilter(currentData);
|
|
43210
43576
|
}
|
|
43211
43577
|
return currentData;
|
|
43212
43578
|
}, data);
|
|
@@ -43373,7 +43739,7 @@ function usePagination(total, onChange, pagination) {
|
|
|
43373
43739
|
const ASCEND = 'ascend';
|
|
43374
43740
|
const DESCEND = 'descend';
|
|
43375
43741
|
const getMultiplePriority = (column)=>{
|
|
43376
|
-
if (typeof column.sorter === 'object' &&
|
|
43742
|
+
if (typeof column.sorter === 'object' && isNumber(column.sorter.multiple)) {
|
|
43377
43743
|
return column.sorter.multiple;
|
|
43378
43744
|
}
|
|
43379
43745
|
return false;
|
|
@@ -43494,11 +43860,11 @@ const injectSorter = (prefixCls, columns, sorterStates, triggerSorter, defaultSo
|
|
|
43494
43860
|
if (typeof showSorterTooltip !== 'boolean' && showSorterTooltip?.target === 'sorter-icon') {
|
|
43495
43861
|
return /*#__PURE__*/ React.createElement("div", {
|
|
43496
43862
|
className: clsx(columnSortersClass, `${columnSortersClass}-tooltip-target-sorter`)
|
|
43497
|
-
}, renderColumnTitleWrapper, /*#__PURE__*/ React.createElement(Tooltip
|
|
43863
|
+
}, renderColumnTitleWrapper, /*#__PURE__*/ React.createElement(Tooltip, {
|
|
43498
43864
|
...tooltipProps
|
|
43499
43865
|
}, sorter));
|
|
43500
43866
|
}
|
|
43501
|
-
return /*#__PURE__*/ React.createElement(Tooltip
|
|
43867
|
+
return /*#__PURE__*/ React.createElement(Tooltip, {
|
|
43502
43868
|
...tooltipProps
|
|
43503
43869
|
}, renderSortTitle);
|
|
43504
43870
|
}
|
|
@@ -43757,10 +44123,7 @@ const genBorderedStyle = (token)=>{
|
|
|
43757
44123
|
[`&${componentCls}-${size}`]: {
|
|
43758
44124
|
[`> ${componentCls}-container`]: {
|
|
43759
44125
|
[`> ${componentCls}-content, > ${componentCls}-body`]: {
|
|
43760
|
-
|
|
43761
|
-
> table > tbody > tr > th,
|
|
43762
|
-
> table > tbody > tr > td
|
|
43763
|
-
`]: {
|
|
44126
|
+
'> table > tbody > tr > th, > table > tbody > tr > td': {
|
|
43764
44127
|
[`> ${componentCls}-expanded-row-fixed`]: {
|
|
43765
44128
|
margin: `${unit(calc(paddingVertical).mul(-1).equal())}
|
|
43766
44129
|
${unit(calc(calc(paddingHorizontal).add(lineWidth)).mul(-1).equal())}`
|
|
@@ -43782,22 +44145,10 @@ const genBorderedStyle = (token)=>{
|
|
|
43782
44145
|
[`> ${componentCls}-container`]: {
|
|
43783
44146
|
borderInlineStart: tableBorder,
|
|
43784
44147
|
borderTop: tableBorder,
|
|
43785
|
-
[`
|
|
43786
|
-
> ${componentCls}-content,
|
|
43787
|
-
> ${componentCls}-header,
|
|
43788
|
-
> ${componentCls}-body,
|
|
43789
|
-
> ${componentCls}-summary
|
|
43790
|
-
`]: {
|
|
44148
|
+
[`> ${componentCls}-content, > ${componentCls}-header, > ${componentCls}-body, > ${componentCls}-summary`]: {
|
|
43791
44149
|
'> table': {
|
|
43792
44150
|
// ============================= Cell =============================
|
|
43793
|
-
|
|
43794
|
-
> thead > tr > th,
|
|
43795
|
-
> thead > tr > td,
|
|
43796
|
-
> tbody > tr > th,
|
|
43797
|
-
> tbody > tr > td,
|
|
43798
|
-
> tfoot > tr > th,
|
|
43799
|
-
> tfoot > tr > td
|
|
43800
|
-
`]: {
|
|
44151
|
+
'> thead > tr > th, > thead > tr > td, > tbody > tr > th, > tbody > tr > td, > tfoot > tr > th, > tfoot > tr > td': {
|
|
43801
44152
|
borderInlineEnd: tableBorder
|
|
43802
44153
|
},
|
|
43803
44154
|
// ============================ Header ============================
|
|
@@ -43810,20 +44161,13 @@ const genBorderedStyle = (token)=>{
|
|
|
43810
44161
|
}
|
|
43811
44162
|
},
|
|
43812
44163
|
// Fixed right should provides additional border
|
|
43813
|
-
|
|
43814
|
-
> thead > tr,
|
|
43815
|
-
> tbody > tr,
|
|
43816
|
-
> tfoot > tr
|
|
43817
|
-
`]: {
|
|
44164
|
+
'> thead > tr, > tbody > tr, > tfoot > tr': {
|
|
43818
44165
|
[`> ${componentCls}-cell-fix-right-first::after`]: {
|
|
43819
44166
|
borderInlineEnd: tableBorder
|
|
43820
44167
|
}
|
|
43821
44168
|
},
|
|
43822
44169
|
// ========================== Expandable ==========================
|
|
43823
|
-
|
|
43824
|
-
> tbody > tr > th,
|
|
43825
|
-
> tbody > tr > td
|
|
43826
|
-
`]: {
|
|
44170
|
+
'> tbody > tr > th, > tbody > tr > td': {
|
|
43827
44171
|
[`> ${componentCls}-expanded-row-fixed`]: {
|
|
43828
44172
|
margin: `${unit(calc(tablePaddingVertical).mul(-1).equal())} ${unit(calc(calc(tablePaddingHorizontal).add(lineWidth)).mul(-1).equal())}`,
|
|
43829
44173
|
'&::after': {
|
|
@@ -43855,7 +44199,7 @@ const genBorderedStyle = (token)=>{
|
|
|
43855
44199
|
}
|
|
43856
44200
|
},
|
|
43857
44201
|
// ============================ Size ============================
|
|
43858
|
-
...getSizeBorderStyle('
|
|
44202
|
+
...getSizeBorderStyle('medium', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle),
|
|
43859
44203
|
...getSizeBorderStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall),
|
|
43860
44204
|
// ============================ Footer ============================
|
|
43861
44205
|
[`> ${componentCls}-footer`]: {
|
|
@@ -43916,10 +44260,7 @@ const genEmptyStyle = (token)=>{
|
|
|
43916
44260
|
[`${componentCls}-tbody > tr${componentCls}-placeholder`]: {
|
|
43917
44261
|
textAlign: 'center',
|
|
43918
44262
|
color: token.colorTextDisabled,
|
|
43919
|
-
|
|
43920
|
-
&:hover > th,
|
|
43921
|
-
&:hover > td,
|
|
43922
|
-
`]: {
|
|
44263
|
+
'&:hover > th, &:hover > td': {
|
|
43923
44264
|
background: token.colorBgContainer
|
|
43924
44265
|
}
|
|
43925
44266
|
}
|
|
@@ -44464,7 +44805,7 @@ const genSizeStyle = (token)=>{
|
|
|
44464
44805
|
});
|
|
44465
44806
|
return {
|
|
44466
44807
|
[`${componentCls}-wrapper`]: {
|
|
44467
|
-
...getSizeStyle('
|
|
44808
|
+
...getSizeStyle('medium', token.tablePaddingVerticalMiddle, token.tablePaddingHorizontalMiddle, token.tableFontSizeMiddle),
|
|
44468
44809
|
...getSizeStyle('small', token.tablePaddingVerticalSmall, token.tablePaddingHorizontalSmall, token.tableFontSizeSmall)
|
|
44469
44810
|
}
|
|
44470
44811
|
};
|
|
@@ -44731,10 +45072,7 @@ const genTableStyle = (token)=>{
|
|
|
44731
45072
|
},
|
|
44732
45073
|
// ============================ Header ============================
|
|
44733
45074
|
[`${componentCls}-thead`]: {
|
|
44734
|
-
|
|
44735
|
-
> tr > th,
|
|
44736
|
-
> tr > td
|
|
44737
|
-
`]: {
|
|
45075
|
+
'> tr > th, > tr > td': {
|
|
44738
45076
|
position: 'relative',
|
|
44739
45077
|
color: tableHeaderTextColor,
|
|
44740
45078
|
fontWeight: fontWeightStrong,
|
|
@@ -44942,7 +45280,7 @@ var useStyle$2 = genStyleHooks('Table', (token)=>{
|
|
|
44942
45280
|
|
|
44943
45281
|
const EMPTY_LIST = [];
|
|
44944
45282
|
const InternalTable = (props, ref)=>{
|
|
44945
|
-
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 = {
|
|
45283
|
+
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 = {
|
|
44946
45284
|
target: 'full-header'
|
|
44947
45285
|
}, virtual } = props;
|
|
44948
45286
|
const warning = devUseWarning('Table');
|
|
@@ -44968,7 +45306,7 @@ const InternalTable = (props, ref)=>{
|
|
|
44968
45306
|
]);
|
|
44969
45307
|
const { locale: contextLocale = localeValues, table } = React.useContext(ConfigContext);
|
|
44970
45308
|
const { getPrefixCls, direction, renderEmpty, getPopupContainer: getContextPopupContainer, className: contextClassName, style: contextStyle, classNames: contextClassNames, styles: contextStyles } = useComponentConfig('table');
|
|
44971
|
-
const mergedSize = useSize(customizeSize);
|
|
45309
|
+
const mergedSize = useSize((ctx)=>customizeSize === 'middle' ? 'medium' : customizeSize ?? ctx);
|
|
44972
45310
|
// =========== Merged Props for Semantic ==========
|
|
44973
45311
|
const mergedProps = {
|
|
44974
45312
|
...props,
|
|
@@ -45003,6 +45341,15 @@ const InternalTable = (props, ref)=>{
|
|
|
45003
45341
|
const prefixCls = getPrefixCls('table', customizePrefixCls);
|
|
45004
45342
|
const dropdownPrefixCls = getPrefixCls('dropdown', customizeDropdownPrefixCls);
|
|
45005
45343
|
const [, token] = useToken();
|
|
45344
|
+
const mergedRowSelection = React.useMemo(()=>{
|
|
45345
|
+
return customizeRowSelection && typeof customizeRowSelection === 'object' ? {
|
|
45346
|
+
columnWidth: token.Table?.selectionColumnWidth,
|
|
45347
|
+
...customizeRowSelection
|
|
45348
|
+
} : customizeRowSelection;
|
|
45349
|
+
}, [
|
|
45350
|
+
customizeRowSelection,
|
|
45351
|
+
token.Table?.selectionColumnWidth
|
|
45352
|
+
]);
|
|
45006
45353
|
const rootCls = useCSSVarCls(prefixCls);
|
|
45007
45354
|
const [hashId, cssVarCls] = useStyle$2(prefixCls, rootCls);
|
|
45008
45355
|
const mergedExpandable = {
|
|
@@ -45024,7 +45371,7 @@ const InternalTable = (props, ref)=>{
|
|
|
45024
45371
|
childrenColumnName,
|
|
45025
45372
|
rawData
|
|
45026
45373
|
]);
|
|
45027
|
-
const
|
|
45374
|
+
const internalRef = {
|
|
45028
45375
|
body: React.useRef(null)
|
|
45029
45376
|
};
|
|
45030
45377
|
// ============================ Width =============================
|
|
@@ -45070,9 +45417,9 @@ const InternalTable = (props, ref)=>{
|
|
|
45070
45417
|
pagination.onChange?.(1, changeInfo.pagination?.pageSize);
|
|
45071
45418
|
}
|
|
45072
45419
|
}
|
|
45073
|
-
if (scroll && scroll.scrollToFirstRowOnChange !== false &&
|
|
45420
|
+
if (scroll && scroll.scrollToFirstRowOnChange !== false && internalRef.body.current) {
|
|
45074
45421
|
scrollTo(0, {
|
|
45075
|
-
getContainer: ()=>
|
|
45422
|
+
getContainer: ()=>internalRef.body.current
|
|
45076
45423
|
});
|
|
45077
45424
|
}
|
|
45078
45425
|
onChange?.(changeInfo.pagination, changeInfo.filters, changeInfo.sorter, {
|
|
@@ -45194,7 +45541,7 @@ const InternalTable = (props, ref)=>{
|
|
|
45194
45541
|
childrenColumnName,
|
|
45195
45542
|
locale: tableLocale,
|
|
45196
45543
|
getPopupContainer: getPopupContainer || getContextPopupContainer
|
|
45197
|
-
},
|
|
45544
|
+
}, mergedRowSelection);
|
|
45198
45545
|
const internalRowClassName = (record, index, indent)=>{
|
|
45199
45546
|
const resolvedRowClassName = typeof rowClassName === 'function' ? rowClassName(record, index, indent) : rowClassName;
|
|
45200
45547
|
return clsx({
|
|
@@ -45208,13 +45555,13 @@ const InternalTable = (props, ref)=>{
|
|
|
45208
45555
|
mergedExpandable.expandIcon = mergedExpandable.expandIcon || expandIcon || renderExpandIcon(tableLocale);
|
|
45209
45556
|
// Adjust expand icon index, no overwrite expandIconColumnIndex if set.
|
|
45210
45557
|
if (expandType === 'nest' && mergedExpandable.expandIconColumnIndex === undefined) {
|
|
45211
|
-
mergedExpandable.expandIconColumnIndex =
|
|
45212
|
-
} else if (mergedExpandable.expandIconColumnIndex > 0 &&
|
|
45558
|
+
mergedExpandable.expandIconColumnIndex = mergedRowSelection ? 1 : 0;
|
|
45559
|
+
} else if (mergedExpandable.expandIconColumnIndex > 0 && mergedRowSelection) {
|
|
45213
45560
|
mergedExpandable.expandIconColumnIndex -= 1;
|
|
45214
45561
|
}
|
|
45215
45562
|
// Indent size
|
|
45216
45563
|
if (typeof mergedExpandable.indentSize !== 'number') {
|
|
45217
|
-
mergedExpandable.indentSize =
|
|
45564
|
+
mergedExpandable.indentSize = isNumber(indentSize) ? indentSize : 15;
|
|
45218
45565
|
}
|
|
45219
45566
|
// ============================ Render ============================
|
|
45220
45567
|
const transformColumns = React.useCallback((innerColumns)=>transformTitleColumns(transformSelectionColumns(transformFilterColumns(transformSorterColumns(innerColumns)))), [
|
|
@@ -45229,7 +45576,7 @@ const InternalTable = (props, ref)=>{
|
|
|
45229
45576
|
if (mergedPagination.size) {
|
|
45230
45577
|
paginationSize = mergedPagination.size;
|
|
45231
45578
|
} else {
|
|
45232
|
-
paginationSize = mergedSize === 'small' || mergedSize === '
|
|
45579
|
+
paginationSize = mergedSize === 'small' || mergedSize === 'medium' ? 'small' : undefined;
|
|
45233
45580
|
}
|
|
45234
45581
|
const renderPagination = (placement = 'end')=>/*#__PURE__*/ React.createElement(Pagination, {
|
|
45235
45582
|
...mergedPagination,
|
|
@@ -45323,7 +45670,7 @@ const InternalTable = (props, ref)=>{
|
|
|
45323
45670
|
const { fontSize, lineHeight, lineWidth, padding, paddingXS, paddingSM } = token;
|
|
45324
45671
|
const fontHeight = Math.floor(fontSize * lineHeight);
|
|
45325
45672
|
switch(mergedSize){
|
|
45326
|
-
case '
|
|
45673
|
+
case 'medium':
|
|
45327
45674
|
return paddingSM * 2 + fontHeight + lineWidth;
|
|
45328
45675
|
case 'small':
|
|
45329
45676
|
return paddingXS * 2 + fontHeight + lineWidth;
|
|
@@ -45356,7 +45703,7 @@ const InternalTable = (props, ref)=>{
|
|
|
45356
45703
|
expandable: mergedExpandable,
|
|
45357
45704
|
prefixCls: prefixCls,
|
|
45358
45705
|
className: clsx({
|
|
45359
|
-
[`${prefixCls}-
|
|
45706
|
+
[`${prefixCls}-medium`]: mergedSize === 'medium',
|
|
45360
45707
|
[`${prefixCls}-small`]: mergedSize === 'small',
|
|
45361
45708
|
[`${prefixCls}-bordered`]: bordered,
|
|
45362
45709
|
[`${prefixCls}-empty`]: rawData.length === 0
|
|
@@ -45367,7 +45714,7 @@ const InternalTable = (props, ref)=>{
|
|
|
45367
45714
|
emptyText: mergedEmptyNode,
|
|
45368
45715
|
// Internal
|
|
45369
45716
|
internalHooks: INTERNAL_HOOKS,
|
|
45370
|
-
internalRefs:
|
|
45717
|
+
internalRefs: internalRef,
|
|
45371
45718
|
transformColumns: transformColumns,
|
|
45372
45719
|
getContainerWidth: getContainerWidth,
|
|
45373
45720
|
measureRowRender: (measureRow)=>/*#__PURE__*/ React.createElement(TableMeasureRowContext.Provider, {
|
|
@@ -45843,10 +46190,7 @@ const InternalTag = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
45843
46190
|
...props,
|
|
45844
46191
|
color: mergedColor,
|
|
45845
46192
|
variant: mergedVariant,
|
|
45846
|
-
disabled: mergedDisabled
|
|
45847
|
-
href,
|
|
45848
|
-
target,
|
|
45849
|
-
icon
|
|
46193
|
+
disabled: mergedDisabled
|
|
45850
46194
|
};
|
|
45851
46195
|
// ====================== Styles ======================
|
|
45852
46196
|
const [mergedClassNames, mergedStyles] = useMergeSemantic([
|
|
@@ -46125,10 +46469,7 @@ const getEditableStyles = (token)=>{
|
|
|
46125
46469
|
};
|
|
46126
46470
|
const getCopyableStyles = (token)=>({
|
|
46127
46471
|
[`${token.componentCls}-copy-success`]: {
|
|
46128
|
-
|
|
46129
|
-
&,
|
|
46130
|
-
&:hover,
|
|
46131
|
-
&:focus`]: {
|
|
46472
|
+
'&, &:hover, &:focus': {
|
|
46132
46473
|
color: token.colorSuccess
|
|
46133
46474
|
}
|
|
46134
46475
|
},
|
|
@@ -46137,10 +46478,7 @@ const getCopyableStyles = (token)=>({
|
|
|
46137
46478
|
}
|
|
46138
46479
|
});
|
|
46139
46480
|
const getEllipsisStyles = ()=>({
|
|
46140
|
-
|
|
46141
|
-
a&-ellipsis,
|
|
46142
|
-
span&-ellipsis
|
|
46143
|
-
`]: {
|
|
46481
|
+
'a&-ellipsis, span&-ellipsis': {
|
|
46144
46482
|
display: 'inline-block',
|
|
46145
46483
|
maxWidth: '100%'
|
|
46146
46484
|
},
|
|
@@ -46201,39 +46539,15 @@ const genTypographyStyle = (token)=>{
|
|
|
46201
46539
|
cursor: 'not-allowed',
|
|
46202
46540
|
userSelect: 'none'
|
|
46203
46541
|
},
|
|
46204
|
-
|
|
46205
|
-
div&,
|
|
46206
|
-
p
|
|
46207
|
-
`]: {
|
|
46542
|
+
'div&, p': {
|
|
46208
46543
|
marginBottom: '1em'
|
|
46209
46544
|
},
|
|
46210
46545
|
...getTitleStyles(token),
|
|
46211
|
-
[`
|
|
46212
|
-
& + h1${componentCls},
|
|
46213
|
-
& + h2${componentCls},
|
|
46214
|
-
& + h3${componentCls},
|
|
46215
|
-
& + h4${componentCls},
|
|
46216
|
-
& + h5${componentCls}
|
|
46217
|
-
`]: {
|
|
46546
|
+
[`& + h1${componentCls}, & + h2${componentCls}, & + h3${componentCls}, & + h4${componentCls}, & + h5${componentCls}`]: {
|
|
46218
46547
|
marginTop: titleMarginTop
|
|
46219
46548
|
},
|
|
46220
|
-
|
|
46221
|
-
|
|
46222
|
-
ul,
|
|
46223
|
-
li,
|
|
46224
|
-
p,
|
|
46225
|
-
h1,
|
|
46226
|
-
h2,
|
|
46227
|
-
h3,
|
|
46228
|
-
h4,
|
|
46229
|
-
h5`]: {
|
|
46230
|
-
[`
|
|
46231
|
-
+ h1,
|
|
46232
|
-
+ h2,
|
|
46233
|
-
+ h3,
|
|
46234
|
-
+ h4,
|
|
46235
|
-
+ h5
|
|
46236
|
-
`]: {
|
|
46549
|
+
'div, ul, li, p, h1, h2, h3, h4, h5': {
|
|
46550
|
+
'+ h1, + h2, + h3, + h4, + h5': {
|
|
46237
46551
|
marginTop: titleMarginTop
|
|
46238
46552
|
}
|
|
46239
46553
|
},
|
|
@@ -46271,8 +46585,8 @@ var useStyle = genStyleHooks('Typography', genTypographyStyle, prepareComponentT
|
|
|
46271
46585
|
const Editable = (props)=>{
|
|
46272
46586
|
const { prefixCls, 'aria-label': ariaLabel, className, style, direction, maxLength, autoSize = true, value, onSave, onCancel, onEnd, component, enterIcon = /*#__PURE__*/ React.createElement(EnterOutlined, null) } = props;
|
|
46273
46587
|
const ref = React.useRef(null);
|
|
46274
|
-
const
|
|
46275
|
-
const
|
|
46588
|
+
const inCompositionRef = React.useRef(false);
|
|
46589
|
+
const lastKeyCodeRef = React.useRef(null);
|
|
46276
46590
|
const [current, setCurrent] = React.useState(value);
|
|
46277
46591
|
React.useEffect(()=>{
|
|
46278
46592
|
setCurrent(value);
|
|
@@ -46291,24 +46605,24 @@ const Editable = (props)=>{
|
|
|
46291
46605
|
setCurrent(target.value.replace(/[\n\r]/g, ''));
|
|
46292
46606
|
};
|
|
46293
46607
|
const onCompositionStart = ()=>{
|
|
46294
|
-
|
|
46608
|
+
inCompositionRef.current = true;
|
|
46295
46609
|
};
|
|
46296
46610
|
const onCompositionEnd = ()=>{
|
|
46297
|
-
|
|
46611
|
+
inCompositionRef.current = false;
|
|
46298
46612
|
};
|
|
46299
46613
|
const onKeyDown = ({ keyCode })=>{
|
|
46300
46614
|
// We don't record keyCode when IME is using
|
|
46301
|
-
if (
|
|
46615
|
+
if (inCompositionRef.current) {
|
|
46302
46616
|
return;
|
|
46303
46617
|
}
|
|
46304
|
-
|
|
46618
|
+
lastKeyCodeRef.current = keyCode;
|
|
46305
46619
|
};
|
|
46306
46620
|
const confirmChange = ()=>{
|
|
46307
46621
|
onSave(current.trim());
|
|
46308
46622
|
};
|
|
46309
46623
|
const onKeyUp = ({ keyCode, ctrlKey, altKey, metaKey, shiftKey })=>{
|
|
46310
46624
|
// Check if it's a real key
|
|
46311
|
-
if (
|
|
46625
|
+
if (lastKeyCodeRef.current !== keyCode || inCompositionRef.current || ctrlKey || altKey || metaKey || shiftKey) {
|
|
46312
46626
|
return;
|
|
46313
46627
|
}
|
|
46314
46628
|
if (keyCode === KeyCode.ENTER) {
|
|
@@ -46434,7 +46748,9 @@ const useCopyClick = ({ copyConfig, children })=>{
|
|
|
46434
46748
|
setCopyLoading(true);
|
|
46435
46749
|
try {
|
|
46436
46750
|
const text = typeof copyConfig.text === 'function' ? await copyConfig.text() : copyConfig.text;
|
|
46437
|
-
await copy(text || toList
|
|
46751
|
+
await copy(text || toList(children, {
|
|
46752
|
+
skipEmpty: true
|
|
46753
|
+
}).join('') || '', copyOptions);
|
|
46438
46754
|
setCopyLoading(false);
|
|
46439
46755
|
setCopied(true);
|
|
46440
46756
|
// Trigger tips update
|
|
@@ -46518,29 +46834,26 @@ const Typography$1 = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
46518
46834
|
...contextStyle,
|
|
46519
46835
|
...style
|
|
46520
46836
|
};
|
|
46521
|
-
return
|
|
46522
|
-
React.createElement(Component, {
|
|
46837
|
+
return /*#__PURE__*/ React.createElement(Component, {
|
|
46523
46838
|
className: componentClassName,
|
|
46524
46839
|
style: mergedStyle,
|
|
46525
46840
|
ref: ref,
|
|
46526
46841
|
...restProps
|
|
46527
|
-
}, children)
|
|
46842
|
+
}, children);
|
|
46528
46843
|
});
|
|
46529
46844
|
if (process.env.NODE_ENV !== 'production') {
|
|
46530
46845
|
Typography$1.displayName = 'Typography';
|
|
46531
46846
|
}
|
|
46532
46847
|
|
|
46533
|
-
|
|
46848
|
+
const toCopyConfigList = (val)=>{
|
|
46534
46849
|
if (val === false) {
|
|
46535
46850
|
return [
|
|
46536
46851
|
false,
|
|
46537
46852
|
false
|
|
46538
46853
|
];
|
|
46539
46854
|
}
|
|
46540
|
-
return
|
|
46541
|
-
|
|
46542
|
-
];
|
|
46543
|
-
}
|
|
46855
|
+
return toList(val);
|
|
46856
|
+
};
|
|
46544
46857
|
function getNode(dom, defaultNode, needDom) {
|
|
46545
46858
|
if (dom === true || dom === undefined) {
|
|
46546
46859
|
return defaultNode;
|
|
@@ -46574,14 +46887,15 @@ const isValidText = (val)=>[
|
|
|
46574
46887
|
'number'
|
|
46575
46888
|
].includes(typeof val);
|
|
46576
46889
|
|
|
46577
|
-
const CopyBtn = (
|
|
46578
|
-
const
|
|
46579
|
-
const
|
|
46890
|
+
const CopyBtn = (props)=>{
|
|
46891
|
+
const { prefixCls, copied, locale, iconOnly, tooltips, icon, tabIndex, onCopy, loading: btnLoading } = props;
|
|
46892
|
+
const tooltipNodes = toCopyConfigList(tooltips);
|
|
46893
|
+
const iconNodes = toCopyConfigList(icon);
|
|
46580
46894
|
const { copied: copiedText, copy: copyText } = locale ?? {};
|
|
46581
46895
|
const systemStr = copied ? copiedText : copyText;
|
|
46582
46896
|
const copyTitle = getNode(tooltipNodes[copied ? 1 : 0], systemStr);
|
|
46583
46897
|
const ariaLabel = typeof copyTitle === 'string' ? copyTitle : systemStr;
|
|
46584
|
-
return /*#__PURE__*/ React.createElement(Tooltip
|
|
46898
|
+
return /*#__PURE__*/ React.createElement(Tooltip, {
|
|
46585
46899
|
title: copyTitle
|
|
46586
46900
|
}, /*#__PURE__*/ React.createElement("button", {
|
|
46587
46901
|
type: "button",
|
|
@@ -46825,7 +47139,7 @@ const EllipsisTooltip = ({ enableEllipsis, isEllipsis, open, children, tooltipPr
|
|
|
46825
47139
|
return children;
|
|
46826
47140
|
}
|
|
46827
47141
|
const mergedOpen = open && isEllipsis;
|
|
46828
|
-
return /*#__PURE__*/ React.createElement(Tooltip
|
|
47142
|
+
return /*#__PURE__*/ React.createElement(Tooltip, {
|
|
46829
47143
|
open: mergedOpen,
|
|
46830
47144
|
...tooltipProps
|
|
46831
47145
|
}, children);
|
|
@@ -46963,7 +47277,9 @@ const Base = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
46963
47277
|
canUseCssEllipsis,
|
|
46964
47278
|
mergedEnableEllipsis
|
|
46965
47279
|
]);
|
|
46966
|
-
const
|
|
47280
|
+
const tooltipProps = useTooltipProps(ellipsisConfig.tooltip, editConfig.text, children);
|
|
47281
|
+
const needNativeEllipsisMeasure = cssEllipsis && !!tooltipProps.title;
|
|
47282
|
+
const isMergedEllipsis = mergedEnableEllipsis && (cssEllipsis ? needNativeEllipsisMeasure && isNativeEllipsis : isJsEllipsis);
|
|
46967
47283
|
const cssTextOverflow = mergedEnableEllipsis && rows === 1 && cssEllipsis;
|
|
46968
47284
|
const cssLineClamp = mergedEnableEllipsis && rows > 1 && cssEllipsis;
|
|
46969
47285
|
// >>>>> Expand
|
|
@@ -46988,7 +47304,7 @@ const Base = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
46988
47304
|
// >>>>> Native ellipsis
|
|
46989
47305
|
React.useEffect(()=>{
|
|
46990
47306
|
const textEle = typographyRef.current;
|
|
46991
|
-
if (enableEllipsis &&
|
|
47307
|
+
if (enableEllipsis && needNativeEllipsisMeasure && textEle) {
|
|
46992
47308
|
const currentEllipsis = isEleEllipsis(textEle);
|
|
46993
47309
|
if (isNativeEllipsis !== currentEllipsis) {
|
|
46994
47310
|
setIsNativeEllipsis(currentEllipsis);
|
|
@@ -46996,7 +47312,7 @@ const Base = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
46996
47312
|
}
|
|
46997
47313
|
}, [
|
|
46998
47314
|
enableEllipsis,
|
|
46999
|
-
|
|
47315
|
+
needNativeEllipsisMeasure,
|
|
47000
47316
|
children,
|
|
47001
47317
|
cssLineClamp,
|
|
47002
47318
|
isNativeVisible,
|
|
@@ -47006,7 +47322,7 @@ const Base = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
47006
47322
|
// Use IntersectionObserver to check if element is invisible
|
|
47007
47323
|
React.useEffect(()=>{
|
|
47008
47324
|
const textEle = typographyRef.current;
|
|
47009
|
-
if (typeof IntersectionObserver === 'undefined' || !textEle || !
|
|
47325
|
+
if (typeof IntersectionObserver === 'undefined' || !textEle || !needNativeEllipsisMeasure || !mergedEnableEllipsis) {
|
|
47010
47326
|
return;
|
|
47011
47327
|
}
|
|
47012
47328
|
const observer = new IntersectionObserver(()=>{
|
|
@@ -47017,11 +47333,10 @@ const Base = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
47017
47333
|
observer.disconnect();
|
|
47018
47334
|
};
|
|
47019
47335
|
}, [
|
|
47020
|
-
|
|
47336
|
+
needNativeEllipsisMeasure,
|
|
47021
47337
|
mergedEnableEllipsis
|
|
47022
47338
|
]);
|
|
47023
47339
|
// ========================== Tooltip ===========================
|
|
47024
|
-
const tooltipProps = useTooltipProps(ellipsisConfig.tooltip, editConfig.text, children);
|
|
47025
47340
|
const topAriaLabel = React.useMemo(()=>{
|
|
47026
47341
|
if (!enableEllipsis || cssEllipsis) {
|
|
47027
47342
|
return undefined;
|
|
@@ -47079,7 +47394,7 @@ const Base = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
|
47079
47394
|
const { icon, tooltip, tabIndex } = editConfig;
|
|
47080
47395
|
const editTitle = toArray$1(tooltip)[0] || textLocale?.edit;
|
|
47081
47396
|
const ariaLabel = typeof editTitle === 'string' ? editTitle : '';
|
|
47082
|
-
return triggerType.includes('icon') ? /*#__PURE__*/ React.createElement(Tooltip
|
|
47397
|
+
return triggerType.includes('icon') ? /*#__PURE__*/ React.createElement(Tooltip, {
|
|
47083
47398
|
key: "edit",
|
|
47084
47399
|
title: tooltip === false ? '' : editTitle
|
|
47085
47400
|
}, /*#__PURE__*/ React.createElement("button", {
|
|
@@ -47331,7 +47646,7 @@ const JsonValueTree = ({ data, className, maxHeight = "auto" })=>{
|
|
|
47331
47646
|
flexShrink: 0,
|
|
47332
47647
|
background: "transparent"
|
|
47333
47648
|
}
|
|
47334
|
-
}, /*#__PURE__*/ React__default.createElement(Tooltip
|
|
47649
|
+
}, /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
47335
47650
|
title: "Copy JSON"
|
|
47336
47651
|
}, /*#__PURE__*/ React__default.createElement(Button$1, {
|
|
47337
47652
|
type: "text",
|
|
@@ -47342,7 +47657,7 @@ const JsonValueTree = ({ data, className, maxHeight = "auto" })=>{
|
|
|
47342
47657
|
color: mutedForeground
|
|
47343
47658
|
}),
|
|
47344
47659
|
onClick: handleCopyJson
|
|
47345
|
-
})), /*#__PURE__*/ React__default.createElement(Tooltip
|
|
47660
|
+
})), /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
47346
47661
|
title: isAllExpanded ? "Collapse all" : "Expand all"
|
|
47347
47662
|
}, /*#__PURE__*/ React__default.createElement(Button$1, {
|
|
47348
47663
|
type: "text",
|
|
@@ -47479,7 +47794,7 @@ function valueToTreeNodes(value, path) {
|
|
|
47479
47794
|
const childPath = `${path}.${escapeDotPathSegment(k)}`;
|
|
47480
47795
|
if (v === null || v === undefined || typeof v !== "object") {
|
|
47481
47796
|
const text = `${k}: ${formatJsonTreePrimitive(v)}`;
|
|
47482
|
-
const title = text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React__default.createElement(Tooltip
|
|
47797
|
+
const title = text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
47483
47798
|
title: text
|
|
47484
47799
|
}, /*#__PURE__*/ React__default.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text;
|
|
47485
47800
|
return {
|
|
@@ -47500,7 +47815,7 @@ function valueToTreeNodes(value, path) {
|
|
|
47500
47815
|
const text = `${k}: ${formatJsonTreePrimitive(v)}`;
|
|
47501
47816
|
return {
|
|
47502
47817
|
key: childPath,
|
|
47503
|
-
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React__default.createElement(Tooltip
|
|
47818
|
+
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
47504
47819
|
title: text
|
|
47505
47820
|
}, /*#__PURE__*/ React__default.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text,
|
|
47506
47821
|
isLeaf: true
|
|
@@ -47511,7 +47826,7 @@ function valueToTreeNodes(value, path) {
|
|
|
47511
47826
|
return [
|
|
47512
47827
|
{
|
|
47513
47828
|
key: path,
|
|
47514
|
-
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React__default.createElement(Tooltip
|
|
47829
|
+
title: text.length > MAX_TITLE_LEN ? /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
47515
47830
|
title: text
|
|
47516
47831
|
}, /*#__PURE__*/ React__default.createElement("span", null, text.slice(0, MAX_TITLE_LEN), "…")) : text,
|
|
47517
47832
|
isLeaf: true
|
|
@@ -49020,373 +49335,6 @@ const Node$1 = ({ data, id })=>{
|
|
|
49020
49335
|
}
|
|
49021
49336
|
};
|
|
49022
49337
|
|
|
49023
|
-
const TooltipContainer = styled.div`
|
|
49024
|
-
position: relative;
|
|
49025
|
-
display: inline-block;
|
|
49026
|
-
`;
|
|
49027
|
-
const TooltipContent = styled.div`
|
|
49028
|
-
position: absolute;
|
|
49029
|
-
z-index: 1000;
|
|
49030
|
-
padding: 8px 12px;
|
|
49031
|
-
font-weight: 400;
|
|
49032
|
-
background-color: ${({ themeColors })=>themeColors.popover};
|
|
49033
|
-
color: ${({ themeColors })=>themeColors.popoverForeground};
|
|
49034
|
-
border: 1px solid ${({ themeColors })=>themeColors.border};
|
|
49035
|
-
border-radius: 6px;
|
|
49036
|
-
font-size: 12px;
|
|
49037
|
-
line-height: 1.4;
|
|
49038
|
-
white-space: nowrap;
|
|
49039
|
-
box-shadow:
|
|
49040
|
-
0 4px 6px -1px rgba(0, 0, 0, 0.1),
|
|
49041
|
-
0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
49042
|
-
opacity: ${({ isVisible })=>isVisible ? 1 : 0};
|
|
49043
|
-
visibility: ${({ isVisible })=>isVisible ? "visible" : "hidden"};
|
|
49044
|
-
transition:
|
|
49045
|
-
opacity 0.15s ease-in-out,
|
|
49046
|
-
visibility 0.15s ease-in-out;
|
|
49047
|
-
pointer-events: none;
|
|
49048
|
-
|
|
49049
|
-
/* Arrow */
|
|
49050
|
-
&::before {
|
|
49051
|
-
content: "";
|
|
49052
|
-
position: absolute;
|
|
49053
|
-
width: 0;
|
|
49054
|
-
height: 0;
|
|
49055
|
-
border: 4px solid transparent;
|
|
49056
|
-
}
|
|
49057
|
-
|
|
49058
|
-
/* Placement-specific positioning and arrow */
|
|
49059
|
-
${({ placement, themeColors })=>{
|
|
49060
|
-
switch(placement){
|
|
49061
|
-
case "top":
|
|
49062
|
-
return `
|
|
49063
|
-
bottom: 100%;
|
|
49064
|
-
left: 50%;
|
|
49065
|
-
transform: translateX(-50%);
|
|
49066
|
-
margin-bottom: 8px;
|
|
49067
|
-
&::before {
|
|
49068
|
-
top: 100%;
|
|
49069
|
-
left: 50%;
|
|
49070
|
-
transform: translateX(-50%);
|
|
49071
|
-
border-top-color: ${themeColors.border};
|
|
49072
|
-
}
|
|
49073
|
-
&::after {
|
|
49074
|
-
content: "";
|
|
49075
|
-
position: absolute;
|
|
49076
|
-
top: 100%;
|
|
49077
|
-
left: 50%;
|
|
49078
|
-
transform: translateX(-50%);
|
|
49079
|
-
width: 0;
|
|
49080
|
-
height: 0;
|
|
49081
|
-
border: 3px solid transparent;
|
|
49082
|
-
border-top-color: ${themeColors.popover};
|
|
49083
|
-
}
|
|
49084
|
-
`;
|
|
49085
|
-
case "bottom":
|
|
49086
|
-
return `
|
|
49087
|
-
top: 100%;
|
|
49088
|
-
left: 50%;
|
|
49089
|
-
transform: translateX(-50%);
|
|
49090
|
-
margin-top: 8px;
|
|
49091
|
-
&::before {
|
|
49092
|
-
bottom: 100%;
|
|
49093
|
-
left: 50%;
|
|
49094
|
-
transform: translateX(-50%);
|
|
49095
|
-
border-bottom-color: ${themeColors.border};
|
|
49096
|
-
}
|
|
49097
|
-
&::after {
|
|
49098
|
-
content: "";
|
|
49099
|
-
position: absolute;
|
|
49100
|
-
bottom: 100%;
|
|
49101
|
-
left: 50%;
|
|
49102
|
-
transform: translateX(-50%);
|
|
49103
|
-
width: 0;
|
|
49104
|
-
height: 0;
|
|
49105
|
-
border: 3px solid transparent;
|
|
49106
|
-
border-bottom-color: ${themeColors.popover};
|
|
49107
|
-
}
|
|
49108
|
-
`;
|
|
49109
|
-
case "left":
|
|
49110
|
-
return `
|
|
49111
|
-
right: 100%;
|
|
49112
|
-
top: 50%;
|
|
49113
|
-
transform: translateY(-50%);
|
|
49114
|
-
margin-right: 8px;
|
|
49115
|
-
&::before {
|
|
49116
|
-
left: 100%;
|
|
49117
|
-
top: 50%;
|
|
49118
|
-
transform: translateY(-50%);
|
|
49119
|
-
border-left-color: ${themeColors.border};
|
|
49120
|
-
}
|
|
49121
|
-
&::after {
|
|
49122
|
-
content: "";
|
|
49123
|
-
position: absolute;
|
|
49124
|
-
left: 100%;
|
|
49125
|
-
top: 50%;
|
|
49126
|
-
transform: translateY(-50%);
|
|
49127
|
-
width: 0;
|
|
49128
|
-
height: 0;
|
|
49129
|
-
border: 3px solid transparent;
|
|
49130
|
-
border-left-color: ${themeColors.popover};
|
|
49131
|
-
}
|
|
49132
|
-
`;
|
|
49133
|
-
case "right":
|
|
49134
|
-
return `
|
|
49135
|
-
left: 100%;
|
|
49136
|
-
top: 50%;
|
|
49137
|
-
transform: translateY(-50%);
|
|
49138
|
-
margin-left: 8px;
|
|
49139
|
-
&::before {
|
|
49140
|
-
right: 100%;
|
|
49141
|
-
top: 50%;
|
|
49142
|
-
transform: translateY(-50%);
|
|
49143
|
-
border-right-color: ${themeColors.border};
|
|
49144
|
-
}
|
|
49145
|
-
&::after {
|
|
49146
|
-
content: "";
|
|
49147
|
-
position: absolute;
|
|
49148
|
-
right: 100%;
|
|
49149
|
-
top: 50%;
|
|
49150
|
-
transform: translateY(-50%);
|
|
49151
|
-
width: 0;
|
|
49152
|
-
height: 0;
|
|
49153
|
-
border: 3px solid transparent;
|
|
49154
|
-
border-right-color: ${themeColors.popover};
|
|
49155
|
-
}
|
|
49156
|
-
`;
|
|
49157
|
-
case "topLeft":
|
|
49158
|
-
return `
|
|
49159
|
-
bottom: 100%;
|
|
49160
|
-
right: 0;
|
|
49161
|
-
margin-bottom: 8px;
|
|
49162
|
-
&::before {
|
|
49163
|
-
top: 100%;
|
|
49164
|
-
right: 8px;
|
|
49165
|
-
border-top-color: ${themeColors.border};
|
|
49166
|
-
}
|
|
49167
|
-
&::after {
|
|
49168
|
-
content: "";
|
|
49169
|
-
position: absolute;
|
|
49170
|
-
top: 100%;
|
|
49171
|
-
right: 8px;
|
|
49172
|
-
width: 0;
|
|
49173
|
-
height: 0;
|
|
49174
|
-
border: 3px solid transparent;
|
|
49175
|
-
border-top-color: ${themeColors.popover};
|
|
49176
|
-
}
|
|
49177
|
-
`;
|
|
49178
|
-
case "topRight":
|
|
49179
|
-
return `
|
|
49180
|
-
bottom: 100%;
|
|
49181
|
-
left: 0;
|
|
49182
|
-
margin-bottom: 8px;
|
|
49183
|
-
&::before {
|
|
49184
|
-
top: 100%;
|
|
49185
|
-
left: 8px;
|
|
49186
|
-
border-top-color: ${themeColors.border};
|
|
49187
|
-
}
|
|
49188
|
-
&::after {
|
|
49189
|
-
content: "";
|
|
49190
|
-
position: absolute;
|
|
49191
|
-
top: 100%;
|
|
49192
|
-
left: 8px;
|
|
49193
|
-
width: 0;
|
|
49194
|
-
height: 0;
|
|
49195
|
-
border: 3px solid transparent;
|
|
49196
|
-
border-top-color: ${themeColors.popover};
|
|
49197
|
-
}
|
|
49198
|
-
`;
|
|
49199
|
-
case "bottomLeft":
|
|
49200
|
-
return `
|
|
49201
|
-
top: 100%;
|
|
49202
|
-
right: 0;
|
|
49203
|
-
margin-top: 8px;
|
|
49204
|
-
&::before {
|
|
49205
|
-
bottom: 100%;
|
|
49206
|
-
right: 8px;
|
|
49207
|
-
border-bottom-color: ${themeColors.border};
|
|
49208
|
-
}
|
|
49209
|
-
&::after {
|
|
49210
|
-
content: "";
|
|
49211
|
-
position: absolute;
|
|
49212
|
-
bottom: 100%;
|
|
49213
|
-
right: 8px;
|
|
49214
|
-
width: 0;
|
|
49215
|
-
height: 0;
|
|
49216
|
-
border: 3px solid transparent;
|
|
49217
|
-
border-bottom-color: ${themeColors.popover};
|
|
49218
|
-
}
|
|
49219
|
-
`;
|
|
49220
|
-
case "bottomRight":
|
|
49221
|
-
return `
|
|
49222
|
-
top: 100%;
|
|
49223
|
-
left: 0;
|
|
49224
|
-
margin-top: 8px;
|
|
49225
|
-
&::before {
|
|
49226
|
-
bottom: 100%;
|
|
49227
|
-
left: 8px;
|
|
49228
|
-
border-bottom-color: ${themeColors.border};
|
|
49229
|
-
}
|
|
49230
|
-
&::after {
|
|
49231
|
-
content: "";
|
|
49232
|
-
position: absolute;
|
|
49233
|
-
bottom: 100%;
|
|
49234
|
-
left: 8px;
|
|
49235
|
-
width: 0;
|
|
49236
|
-
height: 0;
|
|
49237
|
-
border: 3px solid transparent;
|
|
49238
|
-
border-bottom-color: ${themeColors.popover};
|
|
49239
|
-
}
|
|
49240
|
-
`;
|
|
49241
|
-
case "leftTop":
|
|
49242
|
-
return `
|
|
49243
|
-
right: 100%;
|
|
49244
|
-
bottom: 0;
|
|
49245
|
-
margin-right: 8px;
|
|
49246
|
-
&::before {
|
|
49247
|
-
left: 100%;
|
|
49248
|
-
bottom: 8px;
|
|
49249
|
-
border-left-color: ${themeColors.border};
|
|
49250
|
-
}
|
|
49251
|
-
&::after {
|
|
49252
|
-
content: "";
|
|
49253
|
-
position: absolute;
|
|
49254
|
-
left: 100%;
|
|
49255
|
-
bottom: 8px;
|
|
49256
|
-
width: 0;
|
|
49257
|
-
height: 0;
|
|
49258
|
-
border: 3px solid transparent;
|
|
49259
|
-
border-left-color: ${themeColors.popover};
|
|
49260
|
-
}
|
|
49261
|
-
`;
|
|
49262
|
-
case "leftBottom":
|
|
49263
|
-
return `
|
|
49264
|
-
right: 100%;
|
|
49265
|
-
top: 0;
|
|
49266
|
-
margin-right: 8px;
|
|
49267
|
-
&::before {
|
|
49268
|
-
left: 100%;
|
|
49269
|
-
top: 8px;
|
|
49270
|
-
border-left-color: ${themeColors.border};
|
|
49271
|
-
}
|
|
49272
|
-
&::after {
|
|
49273
|
-
content: "";
|
|
49274
|
-
position: absolute;
|
|
49275
|
-
left: 100%;
|
|
49276
|
-
top: 8px;
|
|
49277
|
-
width: 0;
|
|
49278
|
-
height: 0;
|
|
49279
|
-
border: 3px solid transparent;
|
|
49280
|
-
border-left-color: ${themeColors.popover};
|
|
49281
|
-
}
|
|
49282
|
-
`;
|
|
49283
|
-
case "rightTop":
|
|
49284
|
-
return `
|
|
49285
|
-
left: 100%;
|
|
49286
|
-
bottom: 0;
|
|
49287
|
-
margin-left: 8px;
|
|
49288
|
-
&::before {
|
|
49289
|
-
right: 100%;
|
|
49290
|
-
bottom: 8px;
|
|
49291
|
-
border-right-color: ${themeColors.border};
|
|
49292
|
-
}
|
|
49293
|
-
&::after {
|
|
49294
|
-
content: "";
|
|
49295
|
-
position: absolute;
|
|
49296
|
-
right: 100%;
|
|
49297
|
-
bottom: 8px;
|
|
49298
|
-
width: 0;
|
|
49299
|
-
height: 0;
|
|
49300
|
-
border: 3px solid transparent;
|
|
49301
|
-
border-right-color: ${themeColors.popover};
|
|
49302
|
-
}
|
|
49303
|
-
`;
|
|
49304
|
-
case "rightBottom":
|
|
49305
|
-
return `
|
|
49306
|
-
left: 100%;
|
|
49307
|
-
top: 0;
|
|
49308
|
-
margin-left: 8px;
|
|
49309
|
-
&::before {
|
|
49310
|
-
right: 100%;
|
|
49311
|
-
top: 8px;
|
|
49312
|
-
border-right-color: ${themeColors.border};
|
|
49313
|
-
}
|
|
49314
|
-
&::after {
|
|
49315
|
-
content: "";
|
|
49316
|
-
position: absolute;
|
|
49317
|
-
right: 100%;
|
|
49318
|
-
top: 8px;
|
|
49319
|
-
width: 0;
|
|
49320
|
-
height: 0;
|
|
49321
|
-
border: 3px solid transparent;
|
|
49322
|
-
border-right-color: ${themeColors.popover};
|
|
49323
|
-
}
|
|
49324
|
-
`;
|
|
49325
|
-
default:
|
|
49326
|
-
return `
|
|
49327
|
-
bottom: 100%;
|
|
49328
|
-
left: 50%;
|
|
49329
|
-
transform: translateX(-50%);
|
|
49330
|
-
margin-bottom: 8px;
|
|
49331
|
-
&::before {
|
|
49332
|
-
top: 100%;
|
|
49333
|
-
left: 50%;
|
|
49334
|
-
transform: translateX(-50%);
|
|
49335
|
-
border-top-color: ${themeColors.border};
|
|
49336
|
-
}
|
|
49337
|
-
&::after {
|
|
49338
|
-
content: "";
|
|
49339
|
-
position: absolute;
|
|
49340
|
-
top: 100%;
|
|
49341
|
-
left: 50%;
|
|
49342
|
-
transform: translateX(-50%);
|
|
49343
|
-
width: 0;
|
|
49344
|
-
height: 0;
|
|
49345
|
-
border: 3px solid transparent;
|
|
49346
|
-
border-top-color: ${themeColors.popover};
|
|
49347
|
-
}
|
|
49348
|
-
`;
|
|
49349
|
-
}
|
|
49350
|
-
}}
|
|
49351
|
-
`;
|
|
49352
|
-
const Tooltip = ({ children, content, placement = "top", delay = 300 })=>{
|
|
49353
|
-
const { theme } = useTheme$1();
|
|
49354
|
-
const [isVisible, setIsVisible] = React.useState(false);
|
|
49355
|
-
const timeoutRef = React.useRef();
|
|
49356
|
-
const showTooltip = ()=>{
|
|
49357
|
-
if (timeoutRef.current) {
|
|
49358
|
-
clearTimeout(timeoutRef.current);
|
|
49359
|
-
}
|
|
49360
|
-
timeoutRef.current = setTimeout(()=>{
|
|
49361
|
-
setIsVisible(true);
|
|
49362
|
-
}, delay);
|
|
49363
|
-
};
|
|
49364
|
-
const hideTooltip = ()=>{
|
|
49365
|
-
if (timeoutRef.current) {
|
|
49366
|
-
clearTimeout(timeoutRef.current);
|
|
49367
|
-
}
|
|
49368
|
-
setIsVisible(false);
|
|
49369
|
-
};
|
|
49370
|
-
React.useEffect(()=>{
|
|
49371
|
-
return ()=>{
|
|
49372
|
-
if (timeoutRef.current) {
|
|
49373
|
-
clearTimeout(timeoutRef.current);
|
|
49374
|
-
}
|
|
49375
|
-
};
|
|
49376
|
-
}, []);
|
|
49377
|
-
return /*#__PURE__*/ React.createElement(TooltipContainer, {
|
|
49378
|
-
onMouseEnter: showTooltip,
|
|
49379
|
-
onMouseLeave: hideTooltip,
|
|
49380
|
-
onFocus: showTooltip,
|
|
49381
|
-
onBlur: hideTooltip
|
|
49382
|
-
}, children, /*#__PURE__*/ React.createElement(TooltipContent, {
|
|
49383
|
-
isVisible: isVisible,
|
|
49384
|
-
placement: placement,
|
|
49385
|
-
themeColors: theme.colors,
|
|
49386
|
-
role: "tooltip"
|
|
49387
|
-
}, content));
|
|
49388
|
-
};
|
|
49389
|
-
|
|
49390
49338
|
const BadgeContainer = styled.div`
|
|
49391
49339
|
display: inline-flex;
|
|
49392
49340
|
align-items: center;
|
|
@@ -49507,8 +49455,9 @@ const Badge = ({ variant = "default", children, title, placement = "top" })=>{
|
|
|
49507
49455
|
}, children);
|
|
49508
49456
|
if (title) {
|
|
49509
49457
|
return /*#__PURE__*/ React.createElement(Tooltip, {
|
|
49510
|
-
|
|
49511
|
-
placement: placement
|
|
49458
|
+
title: title,
|
|
49459
|
+
placement: placement,
|
|
49460
|
+
mouseEnterDelay: 0.3
|
|
49512
49461
|
}, badgeContent);
|
|
49513
49462
|
}
|
|
49514
49463
|
return badgeContent;
|
|
@@ -112325,7 +112274,115 @@ class ErrorBoundary extends Component {
|
|
|
112325
112274
|
}
|
|
112326
112275
|
}
|
|
112327
112276
|
|
|
112277
|
+
const shieldPulse = keyframes`
|
|
112278
|
+
0%,
|
|
112279
|
+
100% {
|
|
112280
|
+
opacity: 1;
|
|
112281
|
+
transform: scale(1);
|
|
112282
|
+
}
|
|
112283
|
+
50% {
|
|
112284
|
+
opacity: 0.55;
|
|
112285
|
+
transform: scale(1.28);
|
|
112286
|
+
}
|
|
112287
|
+
`;
|
|
112288
|
+
const ShieldTrigger = styled.span`
|
|
112289
|
+
display: inline-flex;
|
|
112290
|
+
align-items: center;
|
|
112291
|
+
color: ${(p)=>p.$color};
|
|
112292
|
+
animation: ${shieldPulse} 1.35s ease-in-out infinite;
|
|
112293
|
+
`;
|
|
112294
|
+
const GuardrailsPopover = ({ guardrails, title = "Guardrails", placement = "right", trigger = "hover", shieldSize = 16, shieldStrokeWidth = 2.5, ariaLabel = "Guardrails applied" })=>{
|
|
112295
|
+
const { theme, isDarkMode } = useTheme$1();
|
|
112296
|
+
/** 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;
|
|
112297
|
+
if (!guardrails?.length) {
|
|
112298
|
+
return null;
|
|
112299
|
+
}
|
|
112300
|
+
const content = /*#__PURE__*/ React__default.createElement("div", {
|
|
112301
|
+
style: {
|
|
112302
|
+
color: theme.colors.foreground
|
|
112303
|
+
}
|
|
112304
|
+
}, /*#__PURE__*/ React__default.createElement(Card, {
|
|
112305
|
+
title: title,
|
|
112306
|
+
size: "small",
|
|
112307
|
+
style: {
|
|
112308
|
+
maxWidth: 380
|
|
112309
|
+
},
|
|
112310
|
+
styles: {
|
|
112311
|
+
body: {
|
|
112312
|
+
padding: 0
|
|
112313
|
+
}
|
|
112314
|
+
}
|
|
112315
|
+
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
112316
|
+
style: {
|
|
112317
|
+
display: "flex",
|
|
112318
|
+
flexDirection: "column",
|
|
112319
|
+
gap: 8
|
|
112320
|
+
}
|
|
112321
|
+
}, guardrails.map((guardrail, index)=>/*#__PURE__*/ React__default.createElement(Card, {
|
|
112322
|
+
key: `${guardrail.rail_name}-${guardrail.phase}-${index}`,
|
|
112323
|
+
type: "inner",
|
|
112324
|
+
title: guardrail.rail_name,
|
|
112325
|
+
size: "small",
|
|
112326
|
+
styles: {
|
|
112327
|
+
body: {
|
|
112328
|
+
padding: 12
|
|
112329
|
+
}
|
|
112330
|
+
}
|
|
112331
|
+
}, /*#__PURE__*/ React__default.createElement("div", {
|
|
112332
|
+
style: {
|
|
112333
|
+
display: "flex",
|
|
112334
|
+
flexDirection: "column",
|
|
112335
|
+
gap: 6
|
|
112336
|
+
}
|
|
112337
|
+
}, /*#__PURE__*/ React__default.createElement("div", null, /*#__PURE__*/ React__default.createElement("strong", null, "Phase:"), " ", guardrail.phase), /*#__PURE__*/ React__default.createElement("div", null, /*#__PURE__*/ React__default.createElement("strong", null, "Action:"), " ", guardrail.action), /*#__PURE__*/ React__default.createElement("div", null, /*#__PURE__*/ React__default.createElement("strong", null, "Reason:"), " ", guardrail.reason ?? "N/A"), guardrail.meta != null && /*#__PURE__*/ React__default.createElement("div", null, /*#__PURE__*/ React__default.createElement("strong", null, "Meta:"), /*#__PURE__*/ React__default.createElement("div", {
|
|
112338
|
+
style: {
|
|
112339
|
+
marginTop: 4,
|
|
112340
|
+
maxWidth: "100%"
|
|
112341
|
+
}
|
|
112342
|
+
}, /*#__PURE__*/ React__default.createElement(JsonValueTree, {
|
|
112343
|
+
data: guardrail.meta,
|
|
112344
|
+
maxHeight: 240
|
|
112345
|
+
})))))))));
|
|
112346
|
+
return /*#__PURE__*/ React__default.createElement(Popover, {
|
|
112347
|
+
content: content,
|
|
112348
|
+
placement: placement,
|
|
112349
|
+
trigger: trigger,
|
|
112350
|
+
styles: {
|
|
112351
|
+
container: {
|
|
112352
|
+
padding: 0
|
|
112353
|
+
},
|
|
112354
|
+
content: {
|
|
112355
|
+
padding: 0
|
|
112356
|
+
}
|
|
112357
|
+
}
|
|
112358
|
+
}, /*#__PURE__*/ React__default.createElement(ShieldTrigger, {
|
|
112359
|
+
$color: shieldColor,
|
|
112360
|
+
onClick: (event)=>event.stopPropagation()
|
|
112361
|
+
}, /*#__PURE__*/ React__default.createElement(Shield, {
|
|
112362
|
+
size: shieldSize,
|
|
112363
|
+
strokeWidth: shieldStrokeWidth,
|
|
112364
|
+
color: "currentColor",
|
|
112365
|
+
"aria-label": ariaLabel
|
|
112366
|
+
})));
|
|
112367
|
+
};
|
|
112368
|
+
|
|
112328
112369
|
const getNodeLatency = (node)=>node.details?.internals?.latency?.total_time ?? 0;
|
|
112370
|
+
const SessionTreeNodeTitle = ({ displayName, subtreeLatency, guardrails })=>{
|
|
112371
|
+
return /*#__PURE__*/ React__default.createElement("span", {
|
|
112372
|
+
style: {
|
|
112373
|
+
display: "flex",
|
|
112374
|
+
alignItems: "center",
|
|
112375
|
+
gap: 8
|
|
112376
|
+
}
|
|
112377
|
+
}, /*#__PURE__*/ React__default.createElement("span", null, displayName), /*#__PURE__*/ React__default.createElement(GuardrailsPopover, {
|
|
112378
|
+
guardrails: guardrails
|
|
112379
|
+
}), subtreeLatency > 0 && /*#__PURE__*/ React__default.createElement(Tag, {
|
|
112380
|
+
style: {
|
|
112381
|
+
fontSize: 11,
|
|
112382
|
+
margin: 0
|
|
112383
|
+
}
|
|
112384
|
+
}, formatLatency(subtreeLatency)));
|
|
112385
|
+
};
|
|
112329
112386
|
/** 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) {
|
|
112330
112387
|
const incoming = run.edges?.filter((e)=>e.target === nodeId) ?? [];
|
|
112331
112388
|
const status = incoming[0]?.details?.status;
|
|
@@ -112439,6 +112496,7 @@ const buildNodeTree = (run)=>{
|
|
|
112439
112496
|
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);
|
|
112440
112497
|
const childLatency = children.reduce((s, c)=>s + (c.subtreeLatency ?? 0), 0);
|
|
112441
112498
|
const subtreeLatency = getNodeLatency(node) + childLatency;
|
|
112499
|
+
const guardrails = node.details?.internals?.guard_details ?? [];
|
|
112442
112500
|
const isTool = node.node_type === "Tool";
|
|
112443
112501
|
const failed = isNodeFailureFromIncomingEdge(run, node.identifier);
|
|
112444
112502
|
const iconBg = failed ? "#ff4d4f" : isTool ? "#1890ff" : "#52c41a";
|
|
@@ -112459,18 +112517,11 @@ const buildNodeTree = (run)=>{
|
|
|
112459
112517
|
}));
|
|
112460
112518
|
return {
|
|
112461
112519
|
key: nodeKey,
|
|
112462
|
-
title: /*#__PURE__*/ React__default.createElement(
|
|
112463
|
-
|
|
112464
|
-
|
|
112465
|
-
|
|
112466
|
-
|
|
112467
|
-
}
|
|
112468
|
-
}, /*#__PURE__*/ React__default.createElement("span", null, displayName), subtreeLatency > 0 && /*#__PURE__*/ React__default.createElement(Tag, {
|
|
112469
|
-
style: {
|
|
112470
|
-
fontSize: 11,
|
|
112471
|
-
margin: 0
|
|
112472
|
-
}
|
|
112473
|
-
}, formatLatency(subtreeLatency))),
|
|
112520
|
+
title: /*#__PURE__*/ React__default.createElement(SessionTreeNodeTitle, {
|
|
112521
|
+
displayName: displayName,
|
|
112522
|
+
subtreeLatency: subtreeLatency,
|
|
112523
|
+
guardrails: guardrails
|
|
112524
|
+
}),
|
|
112474
112525
|
icon,
|
|
112475
112526
|
children: children.length > 0 ? children : undefined,
|
|
112476
112527
|
isLeaf: children.length === 0,
|
|
@@ -112535,6 +112586,10 @@ const SessionTree = ({ session, selectedNodeKey, onSelectNode })=>{
|
|
|
112535
112586
|
}), /*#__PURE__*/ React__default.createElement("style", null, `
|
|
112536
112587
|
.session-details-tree {
|
|
112537
112588
|
background-color: transparent;
|
|
112589
|
+
color: inherit;
|
|
112590
|
+
}
|
|
112591
|
+
.session-details-tree .ant-tree-title {
|
|
112592
|
+
color: inherit;
|
|
112538
112593
|
}
|
|
112539
112594
|
.session-details-tree .ant-tree-node-content-wrapper {
|
|
112540
112595
|
display: flex;
|
|
@@ -112940,7 +112995,7 @@ const SessionDetails = ({ session, open, onClose, initialNodeId, initialRunId, l
|
|
|
112940
112995
|
size: "small"
|
|
112941
112996
|
})), /*#__PURE__*/ React__default.createElement(Divider, {
|
|
112942
112997
|
type: "vertical"
|
|
112943
|
-
}), /*#__PURE__*/ React__default.createElement(Tooltip
|
|
112998
|
+
}), /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
112944
112999
|
title: "Show Session Details"
|
|
112945
113000
|
}, /*#__PURE__*/ React__default.createElement(Button$1, {
|
|
112946
113001
|
type: "text",
|
|
@@ -112949,7 +113004,7 @@ const SessionDetails = ({ session, open, onClose, initialNodeId, initialRunId, l
|
|
|
112949
113004
|
}),
|
|
112950
113005
|
onClick: ()=>setIsFullScreen(false),
|
|
112951
113006
|
disabled: !session?.session_id
|
|
112952
|
-
}, "Session Details"))) : /*#__PURE__*/ React__default.createElement(Tooltip
|
|
113007
|
+
}, "Session Details"))) : /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
112953
113008
|
title: "Open Visualizer"
|
|
112954
113009
|
}, /*#__PURE__*/ React__default.createElement(Button$1, {
|
|
112955
113010
|
type: "text",
|
|
@@ -112960,7 +113015,7 @@ const SessionDetails = ({ session, open, onClose, initialNodeId, initialRunId, l
|
|
|
112960
113015
|
disabled: !session?.session_id
|
|
112961
113016
|
}, "Visualizer")), /*#__PURE__*/ React__default.createElement(Divider, {
|
|
112962
113017
|
type: "vertical"
|
|
112963
|
-
}), /*#__PURE__*/ React__default.createElement(Tooltip
|
|
113018
|
+
}), /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
112964
113019
|
title: "Copy Session ID to Clipboard"
|
|
112965
113020
|
}, /*#__PURE__*/ React__default.createElement(Button$1, {
|
|
112966
113021
|
type: "text",
|
|
@@ -112969,7 +113024,7 @@ const SessionDetails = ({ session, open, onClose, initialNodeId, initialRunId, l
|
|
|
112969
113024
|
}),
|
|
112970
113025
|
onClick: handleCopyId,
|
|
112971
113026
|
disabled: !session?.session_id
|
|
112972
|
-
})), /*#__PURE__*/ React__default.createElement(Tooltip
|
|
113027
|
+
})), /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
112973
113028
|
title: "Coming Soon!"
|
|
112974
113029
|
}, /*#__PURE__*/ React__default.createElement(Button$1, {
|
|
112975
113030
|
type: "text",
|
|
@@ -113689,7 +113744,7 @@ const EvaluationsCompareDrawer = ({ open, onClose, evaluationId1, evaluationId2,
|
|
|
113689
113744
|
display: "flex",
|
|
113690
113745
|
gap: 8
|
|
113691
113746
|
}
|
|
113692
|
-
}, /*#__PURE__*/ React__default.createElement(Tooltip
|
|
113747
|
+
}, /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
113693
113748
|
title: "Copy IDs to Clipboard"
|
|
113694
113749
|
}, /*#__PURE__*/ React__default.createElement(Button$1, {
|
|
113695
113750
|
type: "text",
|
|
@@ -113698,7 +113753,7 @@ const EvaluationsCompareDrawer = ({ open, onClose, evaluationId1, evaluationId2,
|
|
|
113698
113753
|
}),
|
|
113699
113754
|
onClick: handleCopyIds,
|
|
113700
113755
|
disabled: !evaluationId1 || !evaluationId2
|
|
113701
|
-
})), /*#__PURE__*/ React__default.createElement(Tooltip
|
|
113756
|
+
})), /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
113702
113757
|
title: "Share"
|
|
113703
113758
|
}, /*#__PURE__*/ React__default.createElement(Button$1, {
|
|
113704
113759
|
type: "text",
|
|
@@ -113760,7 +113815,7 @@ const EvaluationDetailsDrawer = ({ evaluation, open, onClose, getEvaluatorResult
|
|
|
113760
113815
|
gap: 4,
|
|
113761
113816
|
justifyContent: "space-between"
|
|
113762
113817
|
}
|
|
113763
|
-
}, /*#__PURE__*/ React__default.createElement("span", null, normalizedEvaluation.name || "Evaluation Details"), normalizedEvaluation.completed_at && /*#__PURE__*/ React__default.createElement(Tooltip
|
|
113818
|
+
}, /*#__PURE__*/ React__default.createElement("span", null, normalizedEvaluation.name || "Evaluation Details"), normalizedEvaluation.completed_at && /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
113764
113819
|
title: formatDateFriendly(normalizedEvaluation.completed_at),
|
|
113765
113820
|
getPopupContainer: ()=>document.body
|
|
113766
113821
|
}, /*#__PURE__*/ React__default.createElement("span", {
|
|
@@ -113951,7 +114006,7 @@ const EvaluationDetailsDrawer = ({ evaluation, open, onClose, getEvaluatorResult
|
|
|
113951
114006
|
key: metric.sha || `${metric.name}-${i}`,
|
|
113952
114007
|
style: tagStyle
|
|
113953
114008
|
}, metric.name);
|
|
113954
|
-
return metric.description ? /*#__PURE__*/ React__default.createElement(Tooltip
|
|
114009
|
+
return metric.description ? /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
113955
114010
|
key: metric.sha || `${metric.name}-${i}`,
|
|
113956
114011
|
title: metric.description,
|
|
113957
114012
|
getPopupContainer: ()=>document.body
|
|
@@ -114214,7 +114269,7 @@ const EvaluationsTable = ({ evaluations, loading = false, error = null, onRefres
|
|
|
114214
114269
|
const bVal = b.completed_at ? moment(b.completed_at).unix() : 0;
|
|
114215
114270
|
return aVal - bVal;
|
|
114216
114271
|
},
|
|
114217
|
-
render: (completedAt)=>completedAt ? /*#__PURE__*/ React__default.createElement(Tooltip
|
|
114272
|
+
render: (completedAt)=>completedAt ? /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
114218
114273
|
title: completedAt
|
|
114219
114274
|
}, /*#__PURE__*/ React__default.createElement("span", null, formatDateShort(completedAt))) : "-"
|
|
114220
114275
|
},
|
|
@@ -114689,7 +114744,7 @@ function resolvePath(to, fromPathname = "/") {
|
|
|
114689
114744
|
let { pathname: toPathname, search = "", hash = "" } = typeof to === "string" ? parsePath(to) : to;
|
|
114690
114745
|
let pathname;
|
|
114691
114746
|
if (toPathname) {
|
|
114692
|
-
toPathname = toPathname
|
|
114747
|
+
toPathname = removeDoubleSlashes(toPathname);
|
|
114693
114748
|
if (toPathname.startsWith("/")) {
|
|
114694
114749
|
pathname = resolvePathname(toPathname.substring(1), "/");
|
|
114695
114750
|
} else {
|
|
@@ -114705,7 +114760,7 @@ function resolvePath(to, fromPathname = "/") {
|
|
|
114705
114760
|
};
|
|
114706
114761
|
}
|
|
114707
114762
|
function resolvePathname(relativePath, fromPathname) {
|
|
114708
|
-
let segments = fromPathname
|
|
114763
|
+
let segments = removeTrailingSlash(fromPathname).split("/");
|
|
114709
114764
|
let relativeSegments = relativePath.split("/");
|
|
114710
114765
|
relativeSegments.forEach((segment)=>{
|
|
114711
114766
|
if (segment === "..") {
|
|
@@ -114763,8 +114818,10 @@ function resolveTo(toArg, routePathnames, locationPathname, isPathRelative = fal
|
|
|
114763
114818
|
}
|
|
114764
114819
|
return path;
|
|
114765
114820
|
}
|
|
114766
|
-
var
|
|
114767
|
-
var
|
|
114821
|
+
var removeDoubleSlashes = (path)=>path.replace(/\/\/+/g, "/");
|
|
114822
|
+
var joinPaths = (paths)=>removeDoubleSlashes(paths.join("/"));
|
|
114823
|
+
var removeTrailingSlash = (path)=>path.replace(/\/+$/, "");
|
|
114824
|
+
var normalizePathname = (pathname)=>removeTrailingSlash(pathname).replace(/^\/*/, "/");
|
|
114768
114825
|
var normalizeSearch = (search)=>!search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
|
|
114769
114826
|
var normalizeHash = (hash)=>!hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
|
|
114770
114827
|
var ErrorResponseImpl = class {
|
|
@@ -114784,7 +114841,8 @@ function isRouteErrorResponse(error) {
|
|
|
114784
114841
|
return error != null && typeof error.status === "number" && typeof error.statusText === "string" && typeof error.internal === "boolean" && "data" in error;
|
|
114785
114842
|
}
|
|
114786
114843
|
function getRoutePattern(matches) {
|
|
114787
|
-
|
|
114844
|
+
let parts = matches.map((m)=>m.route.path).filter(Boolean);
|
|
114845
|
+
return joinPaths(parts) || "/";
|
|
114788
114846
|
}
|
|
114789
114847
|
var isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
114790
114848
|
function parseToInfo(_to, basename) {
|
|
@@ -114837,6 +114895,9 @@ DataRouterContext.displayName = "DataRouter";
|
|
|
114837
114895
|
var DataRouterStateContext = React.createContext(null);
|
|
114838
114896
|
DataRouterStateContext.displayName = "DataRouterState";
|
|
114839
114897
|
var RSCRouterContext = React.createContext(false);
|
|
114898
|
+
function useIsRSCRouterContext() {
|
|
114899
|
+
return React.useContext(RSCRouterContext);
|
|
114900
|
+
}
|
|
114840
114901
|
var ViewTransitionContext = React.createContext({
|
|
114841
114902
|
isTransitioning: false
|
|
114842
114903
|
});
|
|
@@ -115013,18 +115074,18 @@ Please change the parent <Route path="${parentPath}"> to <Route path="${parentPa
|
|
|
115013
115074
|
pathname: joinPaths([
|
|
115014
115075
|
parentPathnameBase,
|
|
115015
115076
|
// Re-encode pathnames that were decoded inside matchRoutes.
|
|
115016
|
-
// Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
|
|
115077
|
+
// Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses
|
|
115017
115078
|
// `new URL()` internally and we need to prevent it from treating
|
|
115018
115079
|
// them as separators
|
|
115019
|
-
navigator.encodeLocation ? navigator.encodeLocation(match.pathname.replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathname
|
|
115080
|
+
navigator.encodeLocation ? navigator.encodeLocation(match.pathname.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathname
|
|
115020
115081
|
]),
|
|
115021
115082
|
pathnameBase: match.pathnameBase === "/" ? parentPathnameBase : joinPaths([
|
|
115022
115083
|
parentPathnameBase,
|
|
115023
115084
|
// Re-encode pathnames that were decoded inside matchRoutes
|
|
115024
|
-
// Pre-encode `?` and `#` ahead of `encodeLocation` because it uses
|
|
115085
|
+
// Pre-encode `%`, `?` and `#` ahead of `encodeLocation` because it uses
|
|
115025
115086
|
// `new URL()` internally and we need to prevent it from treating
|
|
115026
115087
|
// them as separators
|
|
115027
|
-
navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase.replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathnameBase
|
|
115088
|
+
navigator.encodeLocation ? navigator.encodeLocation(match.pathnameBase.replace(/%/g, "%25").replace(/\?/g, "%3F").replace(/#/g, "%23")).pathname : match.pathnameBase
|
|
115028
115089
|
])
|
|
115029
115090
|
})), parentMatches, dataRouterOpts);
|
|
115030
115091
|
return renderedMatches;
|
|
@@ -115491,9 +115552,9 @@ function singleFetchUrl(reqUrl, basename, trailingSlashAware, extension) {
|
|
|
115491
115552
|
if (url.pathname === "/") {
|
|
115492
115553
|
url.pathname = `_root.${extension}`;
|
|
115493
115554
|
} else if (basename && stripBasename(url.pathname, basename) === "/") {
|
|
115494
|
-
url.pathname = `${basename
|
|
115555
|
+
url.pathname = `${removeTrailingSlash(basename)}/_root.${extension}`;
|
|
115495
115556
|
} else {
|
|
115496
|
-
url.pathname = `${url.pathname
|
|
115557
|
+
url.pathname = `${removeTrailingSlash(url.pathname)}.${extension}`;
|
|
115497
115558
|
}
|
|
115498
115559
|
}
|
|
115499
115560
|
return url;
|
|
@@ -115734,6 +115795,7 @@ function composeEventHandlers(theirHandler, ourHandler) {
|
|
|
115734
115795
|
};
|
|
115735
115796
|
}
|
|
115736
115797
|
function PrefetchPageLinks({ page, ...linkProps }) {
|
|
115798
|
+
let rsc = useIsRSCRouterContext();
|
|
115737
115799
|
let { router } = useDataRouterContext2();
|
|
115738
115800
|
let matches = React.useMemo(()=>matchRoutes(router.routes, page, router.basename), [
|
|
115739
115801
|
router.routes,
|
|
@@ -115743,6 +115805,13 @@ function PrefetchPageLinks({ page, ...linkProps }) {
|
|
|
115743
115805
|
if (!matches) {
|
|
115744
115806
|
return null;
|
|
115745
115807
|
}
|
|
115808
|
+
if (rsc) {
|
|
115809
|
+
return /* @__PURE__ */ React.createElement(RSCPrefetchPageLinksImpl, {
|
|
115810
|
+
page,
|
|
115811
|
+
matches,
|
|
115812
|
+
...linkProps
|
|
115813
|
+
});
|
|
115814
|
+
}
|
|
115746
115815
|
return /* @__PURE__ */ React.createElement(PrefetchPageLinksImpl, {
|
|
115747
115816
|
page,
|
|
115748
115817
|
matches,
|
|
@@ -115769,6 +115838,45 @@ function useKeyedPrefetchLinks(matches) {
|
|
|
115769
115838
|
]);
|
|
115770
115839
|
return keyedPrefetchLinks;
|
|
115771
115840
|
}
|
|
115841
|
+
function RSCPrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {
|
|
115842
|
+
let location = useLocation();
|
|
115843
|
+
let { future } = useFrameworkContext();
|
|
115844
|
+
let { basename } = useDataRouterContext2();
|
|
115845
|
+
let dataHrefs = React.useMemo(()=>{
|
|
115846
|
+
if (page === location.pathname + location.search + location.hash) {
|
|
115847
|
+
return [];
|
|
115848
|
+
}
|
|
115849
|
+
let url = singleFetchUrl(page, basename, future.unstable_trailingSlashAwareDataRequests, "rsc");
|
|
115850
|
+
let hasSomeRoutesWithShouldRevalidate = false;
|
|
115851
|
+
let targetRoutes = [];
|
|
115852
|
+
for (let match of nextMatches){
|
|
115853
|
+
if (typeof match.route.shouldRevalidate === "function") {
|
|
115854
|
+
hasSomeRoutesWithShouldRevalidate = true;
|
|
115855
|
+
} else {
|
|
115856
|
+
targetRoutes.push(match.route.id);
|
|
115857
|
+
}
|
|
115858
|
+
}
|
|
115859
|
+
if (hasSomeRoutesWithShouldRevalidate && targetRoutes.length > 0) {
|
|
115860
|
+
url.searchParams.set("_routes", targetRoutes.join(","));
|
|
115861
|
+
}
|
|
115862
|
+
return [
|
|
115863
|
+
url.pathname + url.search
|
|
115864
|
+
];
|
|
115865
|
+
}, [
|
|
115866
|
+
basename,
|
|
115867
|
+
future.unstable_trailingSlashAwareDataRequests,
|
|
115868
|
+
page,
|
|
115869
|
+
location,
|
|
115870
|
+
nextMatches
|
|
115871
|
+
]);
|
|
115872
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, null, dataHrefs.map((href)=>/* @__PURE__ */ React.createElement("link", {
|
|
115873
|
+
key: href,
|
|
115874
|
+
rel: "prefetch",
|
|
115875
|
+
as: "fetch",
|
|
115876
|
+
href,
|
|
115877
|
+
...linkProps
|
|
115878
|
+
})));
|
|
115879
|
+
}
|
|
115772
115880
|
function PrefetchPageLinksImpl({ page, matches: nextMatches, ...linkProps }) {
|
|
115773
115881
|
let location = useLocation();
|
|
115774
115882
|
let { future, manifest, routeModules } = useFrameworkContext();
|
|
@@ -115867,7 +115975,7 @@ function mergeRefs(...refs) {
|
|
|
115867
115975
|
var isBrowser2 = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
115868
115976
|
try {
|
|
115869
115977
|
if (isBrowser2) {
|
|
115870
|
-
window.__reactRouterVersion = "7.
|
|
115978
|
+
window.__reactRouterVersion = "7.14.1";
|
|
115871
115979
|
}
|
|
115872
115980
|
} catch (e) {}
|
|
115873
115981
|
var ABSOLUTE_URL_REGEX2 = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
@@ -116996,7 +117104,7 @@ const AggregateResultsTable = ({ rawResults = [], aggregateResults, agents, titl
|
|
|
116996
117104
|
fontSize: 16,
|
|
116997
117105
|
fontWeight: 600
|
|
116998
117106
|
}
|
|
116999
|
-
}, resolvedTitle), /*#__PURE__*/ React__default.createElement(Tooltip
|
|
117107
|
+
}, resolvedTitle), /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
117000
117108
|
title: llmExpandableKeys.length === 0 ? "No expandable rows" : undefined
|
|
117001
117109
|
}, /*#__PURE__*/ React__default.createElement(Button$1, {
|
|
117002
117110
|
type: "text",
|
|
@@ -117426,7 +117534,7 @@ const AggregateResultsTable = ({ rawResults = [], aggregateResults, agents, titl
|
|
|
117426
117534
|
fontSize: 16,
|
|
117427
117535
|
fontWeight: 600
|
|
117428
117536
|
}
|
|
117429
|
-
}, resolvedTitle), /*#__PURE__*/ React__default.createElement(Tooltip
|
|
117537
|
+
}, resolvedTitle), /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
117430
117538
|
title: expandableKeys.length === 0 ? "No expandable rows" : undefined
|
|
117431
117539
|
}, /*#__PURE__*/ React__default.createElement(Button$1, {
|
|
117432
117540
|
type: "text",
|
|
@@ -117718,7 +117826,7 @@ const EvaluatorResult = ({ evaluation, evaluatorId, backHref, onAgentNodeClick }
|
|
|
117718
117826
|
fontWeight: 600,
|
|
117719
117827
|
fontSize: 15
|
|
117720
117828
|
}
|
|
117721
|
-
}, completed_at ? /*#__PURE__*/ React__default.createElement(Tooltip
|
|
117829
|
+
}, completed_at ? /*#__PURE__*/ React__default.createElement(Tooltip, {
|
|
117722
117830
|
title: formatDateFriendly(completed_at)
|
|
117723
117831
|
}, /*#__PURE__*/ React__default.createElement("span", null, formatDateRelative(completed_at))) : "-")), /*#__PURE__*/ React__default.createElement(Col, {
|
|
117724
117832
|
xs: 24,
|