@ant-design/agentic-ui 2.0.20 → 2.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/Bubble/FileView.js +27 -30
  2. package/dist/Bubble/MessagesContent/VoiceButton/style.js +6 -3
  3. package/dist/ChatBootPage/ButtonTabStyle.js +2 -0
  4. package/dist/ChatBootPage/CaseReply.d.ts +0 -3
  5. package/dist/ChatBootPage/CaseReplyStyle.js +3 -4
  6. package/dist/Components/ActionIconBox/style.js +3 -1
  7. package/dist/Components/lotties/LoadingLottie/loading.json +1989 -1
  8. package/dist/Components/lotties/{ShinyText → TextLoading}/index.d.ts +9 -9
  9. package/dist/Components/lotties/{ShinyText → TextLoading}/index.js +7 -7
  10. package/dist/Components/lotties/{ShinyText → TextLoading}/style.js +4 -4
  11. package/dist/Components/lotties/index.d.ts +1 -1
  12. package/dist/Components/lotties/index.js +1 -1
  13. package/dist/History/components/HistoryItem.js +14 -6
  14. package/dist/History/types/HistoryData.d.ts +2 -0
  15. package/dist/MarkdownEditor/editor/components/ContributorAvatar/index.js +1 -1
  16. package/dist/MarkdownEditor/editor/elements/Table/TableRowIndex/index.js +3 -1
  17. package/dist/MarkdownEditor/editor/elements/TagPopup/index.js +7 -4
  18. package/dist/MarkdownEditor/editor/elements/TagPopup/style.js +5 -1
  19. package/dist/MarkdownEditor/editor/plugins/withMarkdown.js +42 -0
  20. package/dist/MarkdownInputField/AttachmentButton/style.js +1 -1
  21. package/dist/MarkdownInputField/BeforeToolContainer/BeforeToolContainer.js +3 -2
  22. package/dist/MarkdownInputField/FileMapView/index.d.ts +2 -2
  23. package/dist/MarkdownInputField/FileMapView/index.js +39 -12
  24. package/dist/MarkdownInputField/FileMapView/style.js +9 -6
  25. package/dist/MarkdownInputField/MarkdownInputField.js +158 -181
  26. package/dist/MarkdownInputField/VoiceInput/style.js +1 -1
  27. package/dist/MarkdownInputField/style.js +3 -54
  28. package/dist/Plugins/chart/DonutChart/style.js +1 -0
  29. package/dist/Plugins/chart/LineChart/index.js +66 -55
  30. package/dist/Plugins/chart/LineChart/style.js +8 -0
  31. package/dist/Schema/SchemaRenderer/index.js +1 -1
  32. package/package.json +1 -1
  33. /package/dist/Components/lotties/{ShinyText → TextLoading}/style.d.ts +0 -0
@@ -149,6 +149,23 @@ var MarkdownInputField = (_a) => {
149
149
  props == null ? void 0 : props.actionsRender,
150
150
  props == null ? void 0 : props.toolsRender
151
151
  ]);
152
+ const computedMinHeight = useMemo(() => {
153
+ var _a3, _b3, _c2;
154
+ if (isEnlarged)
155
+ return "auto";
156
+ if (((_a3 = props == null ? void 0 : props.enlargeable) == null ? void 0 : _a3.enable) && ((_b3 = props == null ? void 0 : props.refinePrompt) == null ? void 0 : _b3.enable)) {
157
+ return 140;
158
+ }
159
+ if (isMultiRowLayout)
160
+ return 106;
161
+ return ((_c2 = props.style) == null ? void 0 : _c2.minHeight) || 0;
162
+ }, [
163
+ isEnlarged,
164
+ (_h = props == null ? void 0 : props.enlargeable) == null ? void 0 : _h.enable,
165
+ (_i = props == null ? void 0 : props.refinePrompt) == null ? void 0 : _i.enable,
166
+ isMultiRowLayout,
167
+ (_j = props.style) == null ? void 0 : _j.minHeight
168
+ ]);
152
169
  const {
153
170
  fileUploadDone,
154
171
  supportedFormat,
@@ -284,7 +301,7 @@ var MarkdownInputField = (_a) => {
284
301
  );
285
302
  }, [
286
303
  fileMap,
287
- (_h = props.attachment) == null ? void 0 : _h.enable,
304
+ (_k = props.attachment) == null ? void 0 : _k.enable,
288
305
  handleFileRemoval,
289
306
  handleFileRetry,
290
307
  updateAttachmentFiles
@@ -323,7 +340,7 @@ var MarkdownInputField = (_a) => {
323
340
  supportedFormat,
324
341
  fileMap,
325
342
  onFileMapChange: setFileMap,
326
- upload: ((_i = props.attachment) == null ? void 0 : _i.upload) ? (file) => props.attachment.upload(file, 0) : void 0
343
+ upload: ((_l = props.attachment) == null ? void 0 : _l.upload) ? (file) => props.attachment.upload(file, 0) : void 0
327
344
  }),
328
345
  voiceRecognizer: props.voiceRecognizer,
329
346
  value,
@@ -378,8 +395,11 @@ var MarkdownInputField = (_a) => {
378
395
  [`${baseCls}-enlarged`]: isEnlarged
379
396
  }),
380
397
  style: __spreadProps(__spreadValues(__spreadValues({}, props.style), enlargedStyle), {
381
- height: isEnlarged ? `${(_k = (_j = props.enlargeable) == null ? void 0 : _j.height) != null ? _k : 980}px` : `min(${collapsedHeightPx}px,100%)`,
398
+ height: isEnlarged ? `${(_n = (_m = props.enlargeable) == null ? void 0 : _m.height) != null ? _n : 980}px` : `min(${collapsedHeightPx}px,100%)`,
382
399
  borderRadius: borderRadius || 16,
400
+ minHeight: computedMinHeight,
401
+ cursor: isLoading || props.disabled ? "not-allowed" : "auto",
402
+ opacity: props.disabled ? 0.5 : 1,
383
403
  maxHeight: isEnlarged ? "none" : `min(${collapsedHeightPx}px,100%)`,
384
404
  transition: "height, max-height 0.3s,border-radius 0.3s,box-shadow 0.3s,transform 0.3s,opacity 0.3s,background 0.3s"
385
405
  }),
@@ -391,196 +411,153 @@ var MarkdownInputField = (_a) => {
391
411
  /* @__PURE__ */ React.createElement(
392
412
  "div",
393
413
  {
394
- className: classNames(`${baseCls}-background`, hashId, {
395
- [`${baseCls}-hover`]: isHover
396
- }),
397
414
  style: {
398
- minHeight: isEnlarged ? "auto" : isMultiRowLayout ? 106 : ((_l = props.style) == null ? void 0 : _l.minHeight) || 0,
399
- height: "100%",
400
- width: "100%"
415
+ display: "flex",
416
+ flexDirection: "column",
417
+ borderTopLeftRadius: "inherit",
418
+ borderTopRightRadius: "inherit",
419
+ maxHeight: isEnlarged ? "none" : (() => {
420
+ var _a3, _b3;
421
+ const mh = (_a3 = props.style) == null ? void 0 : _a3.maxHeight;
422
+ const base = typeof mh === "number" ? mh : mh ? parseFloat(String(mh)) || 400 : 400;
423
+ const extra = ((_b3 = props.attachment) == null ? void 0 : _b3.enable) ? 90 : 0;
424
+ return `min(${base + extra}px)`;
425
+ })(),
426
+ height: isEnlarged ? "100%" : "auto",
427
+ flex: 1
428
+ },
429
+ className: classNames(`${baseCls}-editor`, hashId, {
430
+ [`${baseCls}-editor-hover`]: isHover,
431
+ [`${baseCls}-editor-disabled`]: props.disabled
432
+ })
433
+ },
434
+ /* @__PURE__ */ React.createElement(
435
+ SkillModeBar,
436
+ {
437
+ skillMode: props.skillMode,
438
+ onSkillModeOpenChange: props.onSkillModeOpenChange
401
439
  }
402
- }
440
+ ),
441
+ /* @__PURE__ */ React.createElement("div", { className: classNames(`${baseCls}-editor-content`, hashId) }, attachmentList, /* @__PURE__ */ React.createElement(
442
+ BaseMarkdownEditor,
443
+ __spreadValues({
444
+ editorRef: markdownEditorRef,
445
+ leafRender: props.leafRender,
446
+ style: {
447
+ width: "100%",
448
+ flex: 1,
449
+ padding: 0,
450
+ paddingRight: computedRightPadding
451
+ },
452
+ toolBar: {
453
+ enable: false
454
+ },
455
+ floatBar: {
456
+ enable: false
457
+ },
458
+ readonly: isLoading,
459
+ contentStyle: {
460
+ padding: "var(--padding-3x)"
461
+ },
462
+ textAreaProps: {
463
+ enable: true,
464
+ placeholder: props.placeholder,
465
+ triggerSendKey: props.triggerSendKey || "Enter"
466
+ },
467
+ tagInputProps: __spreadValues({
468
+ enable: true,
469
+ type: "dropdown"
470
+ }, tagInputProps),
471
+ initValue: props.value,
472
+ onChange: (value2) => {
473
+ var _a3;
474
+ setValue(value2);
475
+ (_a3 = props.onChange) == null ? void 0 : _a3.call(props, value2);
476
+ },
477
+ onFocus: (value2, schema, e) => {
478
+ onFocus == null ? void 0 : onFocus(value2, schema, e);
479
+ activeInput(true);
480
+ },
481
+ onBlur: (value2, schema, e) => {
482
+ onBlur == null ? void 0 : onBlur(value2, schema, e);
483
+ activeInput(false);
484
+ },
485
+ onPaste: (e) => {
486
+ handlePaste(e);
487
+ },
488
+ titlePlaceholderContent: props.placeholder,
489
+ toc: false,
490
+ pasteConfig: props.pasteConfig
491
+ }, markdownProps)
492
+ ))
403
493
  ),
404
- /* @__PURE__ */ React.createElement(
494
+ props.toolsRender ? /* @__PURE__ */ React.createElement(
405
495
  "div",
406
496
  {
407
- className: classNames(`${baseCls}-border-wrapper`, hashId),
408
497
  style: {
409
- height: isEnlarged ? "100%" : "100%",
410
- maxHeight: isEnlarged ? "100%" : "100%",
411
- borderRadius: (borderRadius || 16) - 2 || 10,
412
- cursor: isLoading || props.disabled ? "not-allowed" : "auto",
413
- opacity: props.disabled ? 0.5 : 1,
414
- minHeight: isEnlarged ? "auto" : isMultiRowLayout ? 106 : ((_m = props.style) == null ? void 0 : _m.minHeight) || 0
498
+ backgroundColor: "#fff",
499
+ display: "flex",
500
+ boxSizing: "border-box",
501
+ borderRadius: "inherit",
502
+ flexDirection: "row",
503
+ alignItems: "center",
504
+ justifyContent: "space-between",
505
+ gap: 8,
506
+ width: "100%",
507
+ paddingRight: "var(--padding-3x)",
508
+ paddingLeft: "var(--padding-3x)",
509
+ paddingBottom: "var(--padding-3x)"
415
510
  }
416
511
  },
417
512
  /* @__PURE__ */ React.createElement(
418
513
  "div",
419
514
  {
420
- className: classNames(`${baseCls}-content-wrapper`, hashId),
421
- style: {
422
- minHeight: isEnlarged ? "auto" : isMultiRowLayout ? 106 : ((_n = props.style) == null ? void 0 : _n.minHeight) || 0
423
- }
515
+ ref: actionsRef,
516
+ contentEditable: false,
517
+ className: classNames(`${baseCls}-send-tools`, hashId)
424
518
  },
425
- /* @__PURE__ */ React.createElement(
426
- "div",
427
- {
428
- style: {
429
- display: "flex",
430
- flexDirection: "column",
431
- borderTopLeftRadius: (borderRadius || 16) - 2 || 10,
432
- borderTopRightRadius: (borderRadius || 16) - 2 || 10,
433
- maxHeight: isEnlarged ? "none" : (() => {
434
- var _a3, _b3;
435
- const mh = (_a3 = props.style) == null ? void 0 : _a3.maxHeight;
436
- const base = typeof mh === "number" ? mh : mh ? parseFloat(String(mh)) || 400 : 400;
437
- const extra = ((_b3 = props.attachment) == null ? void 0 : _b3.enable) ? 90 : 0;
438
- return `min(${base + extra}px)`;
439
- })(),
440
- height: isEnlarged ? "100%" : "auto",
441
- flex: 1
442
- },
443
- className: classNames(`${baseCls}-editor`, hashId, {
444
- [`${baseCls}-editor-hover`]: isHover,
445
- [`${baseCls}-editor-disabled`]: props.disabled
446
- })
447
- },
448
- /* @__PURE__ */ React.createElement(
449
- SkillModeBar,
450
- {
451
- skillMode: props.skillMode,
452
- onSkillModeOpenChange: props.onSkillModeOpenChange
453
- }
454
- ),
455
- /* @__PURE__ */ React.createElement(
456
- "div",
457
- {
458
- className: classNames(`${baseCls}-editor-content`, hashId)
459
- },
460
- attachmentList,
461
- /* @__PURE__ */ React.createElement(
462
- BaseMarkdownEditor,
463
- __spreadValues({
464
- editorRef: markdownEditorRef,
465
- leafRender: props.leafRender,
466
- style: {
467
- width: "100%",
468
- flex: 1,
469
- padding: 0,
470
- paddingRight: computedRightPadding
471
- },
472
- toolBar: {
473
- enable: false
474
- },
475
- floatBar: {
476
- enable: false
477
- },
478
- readonly: isLoading,
479
- contentStyle: {
480
- padding: "var(--padding-3x)"
481
- },
482
- textAreaProps: {
483
- enable: true,
484
- placeholder: props.placeholder,
485
- triggerSendKey: props.triggerSendKey || "Enter"
486
- },
487
- tagInputProps: __spreadValues({
488
- enable: true,
489
- type: "dropdown"
490
- }, tagInputProps),
491
- initValue: props.value,
492
- onChange: (value2) => {
493
- var _a3;
494
- setValue(value2);
495
- (_a3 = props.onChange) == null ? void 0 : _a3.call(props, value2);
496
- },
497
- onFocus: (value2, schema, e) => {
498
- onFocus == null ? void 0 : onFocus(value2, schema, e);
499
- activeInput(true);
500
- },
501
- onBlur: (value2, schema, e) => {
502
- onBlur == null ? void 0 : onBlur(value2, schema, e);
503
- activeInput(false);
504
- },
505
- onPaste: (e) => {
506
- handlePaste(e);
507
- },
508
- titlePlaceholderContent: props.placeholder,
509
- toc: false,
510
- pasteConfig: props.pasteConfig
511
- }, markdownProps)
512
- )
513
- )
514
- ),
515
- props.toolsRender ? /* @__PURE__ */ React.createElement(
516
- "div",
517
- {
518
- style: {
519
- backgroundColor: "#fff",
520
- display: "flex",
521
- boxSizing: "border-box",
522
- borderRadius: "inherit",
523
- flexDirection: "row",
524
- alignItems: "center",
525
- justifyContent: "space-between",
526
- gap: 8,
527
- width: "100%",
528
- paddingRight: "var(--padding-3x)",
529
- paddingLeft: "var(--padding-3x)",
530
- paddingBottom: "var(--padding-3x)"
531
- }
532
- },
533
- /* @__PURE__ */ React.createElement(
534
- "div",
535
- {
536
- ref: actionsRef,
537
- contentEditable: false,
538
- className: classNames(`${baseCls}-send-tools`, hashId)
539
- },
540
- props.toolsRender(__spreadProps(__spreadValues({
541
- value,
542
- fileMap,
543
- onFileMapChange: setFileMap
544
- }, props), {
545
- isHover,
546
- isLoading,
547
- fileUploadStatus: fileUploadDone ? "done" : "uploading"
548
- }))
549
- ),
550
- sendActionsNode
551
- ) : sendActionsNode,
552
- (props == null ? void 0 : props.quickActionRender) || ((_o = props.refinePrompt) == null ? void 0 : _o.enable) ? /* @__PURE__ */ React.createElement(
553
- QuickActions,
554
- {
555
- ref: quickActionsRef,
556
- value,
557
- fileMap,
558
- onFileMapChange: setFileMap,
559
- isHover,
560
- isLoading,
561
- disabled: props.disabled,
562
- fileUploadStatus: fileUploadDone ? "done" : "uploading",
563
- refinePrompt: props.refinePrompt,
564
- editorRef: markdownEditorRef,
565
- onValueChange: (text) => {
566
- var _a3;
567
- setValue(text);
568
- (_a3 = props.onChange) == null ? void 0 : _a3.call(props, text);
569
- },
570
- quickActionRender: props.quickActionRender,
571
- prefixCls: baseCls,
572
- hashId,
573
- enlargeable: !!((_p = props.enlargeable) == null ? void 0 : _p.enable),
574
- isEnlarged,
575
- onEnlargeClick: handleEnlargeClick,
576
- onResize: (width, rightOffset) => {
577
- setTopRightPadding(width);
578
- setQuickRightOffset(rightOffset);
579
- }
580
- }
581
- ) : null
582
- )
583
- )
519
+ props.toolsRender(__spreadProps(__spreadValues({
520
+ value,
521
+ fileMap,
522
+ onFileMapChange: setFileMap
523
+ }, props), {
524
+ isHover,
525
+ isLoading,
526
+ fileUploadStatus: fileUploadDone ? "done" : "uploading"
527
+ }))
528
+ ),
529
+ sendActionsNode
530
+ ) : sendActionsNode,
531
+ (props == null ? void 0 : props.quickActionRender) || ((_o = props.refinePrompt) == null ? void 0 : _o.enable) ? /* @__PURE__ */ React.createElement(
532
+ QuickActions,
533
+ {
534
+ ref: quickActionsRef,
535
+ value,
536
+ fileMap,
537
+ onFileMapChange: setFileMap,
538
+ isHover,
539
+ isLoading,
540
+ disabled: props.disabled,
541
+ fileUploadStatus: fileUploadDone ? "done" : "uploading",
542
+ refinePrompt: props.refinePrompt,
543
+ editorRef: markdownEditorRef,
544
+ onValueChange: (text) => {
545
+ var _a3;
546
+ setValue(text);
547
+ (_a3 = props.onChange) == null ? void 0 : _a3.call(props, text);
548
+ },
549
+ quickActionRender: props.quickActionRender,
550
+ prefixCls: baseCls,
551
+ hashId,
552
+ enlargeable: !!((_p = props.enlargeable) == null ? void 0 : _p.enable),
553
+ isEnlarged,
554
+ onEnlargeClick: handleEnlargeClick,
555
+ onResize: (width, rightOffset) => {
556
+ setTopRightPadding(width);
557
+ setQuickRightOffset(rightOffset);
558
+ }
559
+ }
560
+ ) : null
584
561
  )
585
562
  ))
586
563
  );
@@ -39,7 +39,7 @@ var genStyle = (token) => {
39
39
  gap: "4px",
40
40
  color: "var(--color-gray-text-secondary)",
41
41
  "&:hover": {
42
- background: "rgba(0, 28, 57, 0.0353)"
42
+ background: "var(--color-gray-control-fill-hover)"
43
43
  },
44
44
  "&&-disabled": {
45
45
  cursor: "not-allowed",
@@ -65,24 +65,8 @@ var stopIconRotate = new Keyframes("stopIconRotate", {
65
65
  transform: "rotate(360deg)"
66
66
  }
67
67
  });
68
- var rotateFadeOnce = new Keyframes("rotateFadeOnce", {
69
- "0%": {
70
- "--mif-angle": "42deg",
71
- opacity: 1
72
- },
73
- "100%": {
74
- "--mif-angle": "calc(42deg + 1turn)",
75
- opacity: 0
76
- }
77
- });
78
68
  var genStyle = (token) => {
79
69
  return {
80
- // 声明 CSS 自定义属性 --mif-angle,使其可动画(需浏览器支持 @property)
81
- "@property --mif-angle": {
82
- syntax: '"<angle>"',
83
- "initial-value": "0deg",
84
- inherits: false
85
- },
86
70
  [token.componentCls]: {
87
71
  width: "100%",
88
72
  height: "100%",
@@ -101,24 +85,9 @@ var genStyle = (token) => {
101
85
  boxSizing: "border-box"
102
86
  },
103
87
  "&:active,&.active": {
104
- [`${token.componentCls}-background`]: {
105
- opacity: 0,
106
- height: "100%",
107
- backgroundImage: "radial-gradient(127% 127% at 0% 0%, rgba(255, 255, 255, 0) 57%, #EEF0F5 84%),linear-gradient(var(--mif-angle), #D7B9FF 14%, #9BA0FF 57%, #09B1FF 98%)",
108
- // 单一动画:一次性旋转并淡出
109
- animationName: rotateFadeOnce,
110
- animationDuration: "2.5s",
111
- animationTimingFunction: "ease-in-out",
112
- animationIterationCount: "1"
113
- }
88
+ outline: "1px solid transparent"
114
89
  },
115
90
  "&-enlarged": {
116
- "> div:last-child": {
117
- flex: 1,
118
- height: "100%",
119
- minHeight: "100%",
120
- width: "100%"
121
- },
122
91
  [`${token.componentCls}-editor`]: {
123
92
  flex: 1,
124
93
  height: "100%",
@@ -134,28 +103,8 @@ var genStyle = (token) => {
134
103
  maxHeight: "none",
135
104
  overflow: "auto",
136
105
  width: "100%"
137
- },
138
- [`${token.componentCls}-background`]: {
139
- // 放大时保持和普通状态相同的背景效果
140
- opacity: 1
141
106
  }
142
107
  },
143
- "&-background": {
144
- boxSizing: "border-box",
145
- position: "absolute",
146
- width: "calc(100% - 4px)",
147
- height: "calc(100% - 4px)",
148
- zIndex: 2,
149
- backgroundColor: "transparent",
150
- pointerEvents: "none",
151
- borderRadius: "inherit",
152
- // 自定义属性控制线性渐变角度,默认与原始设计保持一致 42deg
153
- "--mif-angle": "42deg",
154
- // 提示浏览器该节点将频繁重绘背景图像
155
- willChange: "background-image",
156
- // 限定绘制范围,降低重绘影响
157
- contain: "paint"
158
- },
159
108
  "&-border-wrapper": {
160
109
  width: "100%",
161
110
  zIndex: 9,
@@ -226,9 +175,9 @@ var genStyle = (token) => {
226
175
  "&-quick-actions": {
227
176
  position: "absolute",
228
177
  userSelect: "none",
229
- right: 0,
230
- width: "40px",
178
+ width: "32px",
231
179
  top: 12,
180
+ right: 12,
232
181
  boxSizing: "border-box",
233
182
  zIndex: 99,
234
183
  display: "flex",
@@ -59,6 +59,7 @@ var genStyle = (token) => {
59
59
  "&-row": {
60
60
  display: "flex",
61
61
  alignItems: "center",
62
+ flexDirection: "row",
62
63
  [`@media (max-width: 768px)`]: {
63
64
  flexDirection: "column",
64
65
  alignItems: "stretch"
@@ -42,6 +42,7 @@ import {
42
42
  PointElement,
43
43
  Tooltip
44
44
  } from "chart.js";
45
+ import classNames from "classnames";
45
46
  import React, { useContext, useEffect, useMemo, useRef, useState } from "react";
46
47
  import { Line } from "react-chartjs-2";
47
48
  import {
@@ -56,6 +57,7 @@ import {
56
57
  extractAndSortXValues,
57
58
  findDataPointByXValue
58
59
  } from "../utils";
60
+ import { useStyle } from "./style";
59
61
  ChartJS.register(
60
62
  CategoryScale,
61
63
  LinearScale,
@@ -125,6 +127,7 @@ var LineChart = (_a) => {
125
127
  }, []);
126
128
  const context = useContext(ConfigProvider.ConfigContext);
127
129
  const baseClassName = context == null ? void 0 : context.getPrefixCls("line-chart-container");
130
+ const { wrapSSR, hashId } = useStyle(baseClassName);
128
131
  const chartRef = useRef(null);
129
132
  const statistics = useMemo(() => {
130
133
  if (!statisticConfig)
@@ -325,65 +328,73 @@ var LineChart = (_a) => {
325
328
  const handleDownload = () => {
326
329
  downloadChart(chartRef.current, "line-chart");
327
330
  };
328
- return /* @__PURE__ */ React.createElement(
329
- ChartContainer,
330
- {
331
- baseClassName,
332
- className,
333
- theme,
334
- isMobile,
335
- variant: props.variant,
336
- style: {
337
- width: responsiveWidth
338
- }
339
- },
331
+ return wrapSSR(
340
332
  /* @__PURE__ */ React.createElement(
341
- ChartToolBar,
333
+ ChartContainer,
342
334
  {
343
- title,
335
+ baseClassName,
336
+ className,
344
337
  theme,
345
- onDownload: handleDownload,
346
- extra: toolbarExtra,
347
- dataTime,
348
- filter: renderFilterInToolbar && filterOptions && filterOptions.length > 1 ? /* @__PURE__ */ React.createElement(
349
- ChartFilter,
350
- __spreadProps(__spreadValues({
351
- filterOptions,
352
- selectedFilter,
353
- onFilterChange: setSelectedFilter
354
- }, filterLabels && {
355
- customOptions: filteredDataByFilterLabel,
356
- selectedCustomSelection: selectedFilterLabel,
357
- onSelectionChange: setSelectedFilterLabel
358
- }), {
359
- theme,
360
- variant: "compact"
361
- })
362
- ) : void 0
363
- }
364
- ),
365
- statistics && /* @__PURE__ */ React.createElement("div", { className: `${baseClassName}-statistic-container` }, statistics.map((config, index) => /* @__PURE__ */ React.createElement(ChartStatistic, __spreadProps(__spreadValues({ key: index }, config), { theme })))),
366
- !renderFilterInToolbar && filterOptions && filterOptions.length > 1 && /* @__PURE__ */ React.createElement(
367
- ChartFilter,
368
- __spreadProps(__spreadValues({
369
- filterOptions,
370
- selectedFilter,
371
- onFilterChange: setSelectedFilter
372
- }, filterLabels && {
373
- customOptions: filteredDataByFilterLabel,
374
- selectedCustomSelection: selectedFilterLabel,
375
- onSelectionChange: setSelectedFilterLabel
376
- }), {
377
- theme
378
- })
379
- ),
380
- /* @__PURE__ */ React.createElement(
381
- "div",
382
- {
383
- className: `${baseClassName}-wrapper`,
384
- style: { height: responsiveHeight }
338
+ isMobile,
339
+ variant: props.variant,
340
+ style: {
341
+ width: responsiveWidth
342
+ }
385
343
  },
386
- /* @__PURE__ */ React.createElement(Line, { ref: chartRef, data: processedData, options })
344
+ /* @__PURE__ */ React.createElement(
345
+ ChartToolBar,
346
+ {
347
+ title,
348
+ theme,
349
+ onDownload: handleDownload,
350
+ extra: toolbarExtra,
351
+ dataTime,
352
+ filter: renderFilterInToolbar && filterOptions && filterOptions.length > 1 ? /* @__PURE__ */ React.createElement(
353
+ ChartFilter,
354
+ __spreadProps(__spreadValues({
355
+ filterOptions,
356
+ selectedFilter,
357
+ onFilterChange: setSelectedFilter
358
+ }, filterLabels && {
359
+ customOptions: filteredDataByFilterLabel,
360
+ selectedCustomSelection: selectedFilterLabel,
361
+ onSelectionChange: setSelectedFilterLabel
362
+ }), {
363
+ theme,
364
+ variant: "compact"
365
+ })
366
+ ) : void 0
367
+ }
368
+ ),
369
+ statistics && /* @__PURE__ */ React.createElement(
370
+ "div",
371
+ {
372
+ className: classNames(`${baseClassName}-statistic-container`, hashId)
373
+ },
374
+ statistics.map((config, index) => /* @__PURE__ */ React.createElement(ChartStatistic, __spreadProps(__spreadValues({ key: index }, config), { theme })))
375
+ ),
376
+ !renderFilterInToolbar && filterOptions && filterOptions.length > 1 && /* @__PURE__ */ React.createElement(
377
+ ChartFilter,
378
+ __spreadProps(__spreadValues({
379
+ filterOptions,
380
+ selectedFilter,
381
+ onFilterChange: setSelectedFilter
382
+ }, filterLabels && {
383
+ customOptions: filteredDataByFilterLabel,
384
+ selectedCustomSelection: selectedFilterLabel,
385
+ onSelectionChange: setSelectedFilterLabel
386
+ }), {
387
+ theme
388
+ })
389
+ ),
390
+ /* @__PURE__ */ React.createElement(
391
+ "div",
392
+ {
393
+ className: `${baseClassName}-wrapper`,
394
+ style: { height: responsiveHeight }
395
+ },
396
+ /* @__PURE__ */ React.createElement(Line, { ref: chartRef, data: processedData, options })
397
+ )
387
398
  )
388
399
  );
389
400
  };
@@ -26,6 +26,14 @@ var genStyle = (token) => {
26
26
  return {
27
27
  [token.componentCls]: {
28
28
  // 折线图容器样式
29
+ // 统计数据容器样式
30
+ "&-statistic-container": {
31
+ display: "flex",
32
+ gap: "16px",
33
+ marginBottom: "16px",
34
+ flexWrap: "wrap",
35
+ alignItems: "flex-start"
36
+ },
29
37
  ".chart-wrapper": {
30
38
  width: "100%",
31
39
  height: "calc(100% - 120px)",
@@ -49,11 +49,11 @@ import React, {
49
49
  useState
50
50
  } from "react";
51
51
  import partialParse from "../../MarkdownEditor/editor/parser/json-parse";
52
- import { mdDataSchemaValidator } from "../validator";
53
52
  import {
54
53
  createSandbox,
55
54
  DEFAULT_SANDBOX_CONFIG
56
55
  } from "../../Utils/proxySandbox";
56
+ import { mdDataSchemaValidator } from "../validator";
57
57
  import { TemplateEngine } from "./templateEngine";
58
58
  export * from "./templateEngine";
59
59
  var ErrorBoundary = class extends Component {