@sdata/web-vue 3.1.0 → 3.2.0

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 (35) hide show
  1. package/dist/sd.css +166 -0
  2. package/dist/sd.min.css +1 -1
  3. package/es/components.d.ts +1 -0
  4. package/es/file-previewer/file-previewer.js +5 -0
  5. package/es/file-previewer/file-previewer.vue.d.ts +126 -0
  6. package/es/file-previewer/file-previewer.vue_vue_type_script_setup_true_lang.js +356 -0
  7. package/es/file-previewer/index.d.ts +220 -0
  8. package/es/file-previewer/index.js +10 -0
  9. package/es/file-previewer/style/css.js +2 -0
  10. package/es/file-previewer/style/index.css +164 -0
  11. package/es/file-previewer/style/index.d.ts +2 -0
  12. package/es/file-previewer/style/index.js +2 -0
  13. package/es/file-previewer/style/index.scss +186 -0
  14. package/es/file-previewer/style/token.scss +31 -0
  15. package/es/file-previewer/types.d.ts +29 -0
  16. package/es/image/preview.vue_vue_type_script_setup_true_lang.js +1 -1
  17. package/es/index.css +166 -0
  18. package/es/index.d.ts +2 -0
  19. package/es/index.js +2 -1
  20. package/es/index.scss +1 -0
  21. package/es/menu/style/css.js +0 -1
  22. package/es/menu/style/index.js +0 -1
  23. package/es/sd-vue.js +2 -0
  24. package/es/tree/base-node.vue.d.ts +8 -4
  25. package/es/tree/base-node.vue_vue_type_script_setup_true_lang.js +23 -3
  26. package/es/tree/interface.d.ts +2 -0
  27. package/es/tree/style/index.css +18 -0
  28. package/es/tree/style/index.d.ts +1 -0
  29. package/es/tree/style/index.scss +21 -0
  30. package/es/tree/tree.vue.d.ts +10 -1
  31. package/es/tree/tree.vue_vue_type_script_setup_true_lang.js +8 -0
  32. package/json/vetur-attributes.json +51 -0
  33. package/json/vetur-tags.json +18 -0
  34. package/json/web-types.json +113 -1
  35. package/package.json +2 -1
package/es/index.css CHANGED
@@ -4031,6 +4031,24 @@ body {
4031
4031
  display: block;
4032
4032
  width: 100%;
4033
4033
  }
4034
+ .sd-tree-node-title-with-ellipsis {
4035
+ flex: 1 1 0;
4036
+ min-width: 0;
4037
+ max-width: 100%;
4038
+ overflow: hidden;
4039
+ }
4040
+ .sd-tree-node-title-text-ellipsis {
4041
+ display: block;
4042
+ flex: 1 1 0;
4043
+ min-width: 0;
4044
+ max-width: 100%;
4045
+ overflow: hidden;
4046
+ }
4047
+ .sd-tree-node-title-ellipsis {
4048
+ display: block;
4049
+ width: 100%;
4050
+ max-width: 100%;
4051
+ }
4034
4052
  .sd-tree-node-indent {
4035
4053
  position: relative;
4036
4054
  flex-shrink: 0;
@@ -14786,6 +14804,154 @@ body.sd-tour-active .sd-tour-popover * {
14786
14804
  opacity: 1;
14787
14805
  }
14788
14806
  }
14807
+ .sd-file-previewer {
14808
+ position: relative;
14809
+ width: 100%;
14810
+ height: 100%;
14811
+ min-height: 240px;
14812
+ }
14813
+ .sd-file-previewer-fullscreen {
14814
+ inset: 0;
14815
+ min-height: 0;
14816
+ }
14817
+ .sd-file-previewer-inline {
14818
+ overflow: hidden;
14819
+ color: var(--sd-color-text-1);
14820
+ background: var(--sd-color-fill-1);
14821
+ border: 1px solid var(--sd-color-border-2);
14822
+ border-radius: var(--sd-border-radius-medium);
14823
+ }
14824
+ .sd-file-previewer-mask {
14825
+ position: absolute;
14826
+ inset: 0;
14827
+ background-color: var(--sd-color-mask-bg);
14828
+ }
14829
+ .sd-file-previewer-content {
14830
+ z-index: 1;
14831
+ display: flex;
14832
+ flex-direction: column;
14833
+ min-width: 0;
14834
+ min-height: 0;
14835
+ }
14836
+ .sd-file-previewer-content-fullscreen {
14837
+ position: absolute;
14838
+ inset: 40px;
14839
+ }
14840
+ .sd-file-previewer-content-inline {
14841
+ position: relative;
14842
+ width: 100%;
14843
+ height: 100%;
14844
+ min-height: 240px;
14845
+ }
14846
+ .sd-file-previewer-fullscreen .sd-file-previewer-content-audio {
14847
+ inset: 50% auto auto 50%;
14848
+ width: min(560px, 100% - 40px * 2);
14849
+ max-height: 78vh;
14850
+ background: var(--sd-color-bg-2);
14851
+ border-radius: var(--sd-border-radius-medium);
14852
+ transform: translate(-50%, -50%);
14853
+ }
14854
+ .sd-file-previewer-header {
14855
+ box-sizing: border-box;
14856
+ padding: 12px 20px;
14857
+ color: var(--sd-color-text-1);
14858
+ font-size: 16px;
14859
+ }
14860
+ .sd-file-previewer-title {
14861
+ display: block;
14862
+ overflow: hidden;
14863
+ white-space: nowrap;
14864
+ text-overflow: ellipsis;
14865
+ }
14866
+ .sd-file-previewer-body {
14867
+ display: flex;
14868
+ flex: 1;
14869
+ align-items: center;
14870
+ justify-content: center;
14871
+ min-width: 0;
14872
+ min-height: 0;
14873
+ }
14874
+ .sd-file-previewer-image, .sd-file-previewer-video-player, .sd-file-previewer-video, .sd-file-previewer-pdf {
14875
+ display: block;
14876
+ width: 100%;
14877
+ height: 100%;
14878
+ }
14879
+ .sd-file-previewer-image {
14880
+ object-fit: contain;
14881
+ }
14882
+ .sd-file-previewer-video-player {
14883
+ max-width: 1180px;
14884
+ max-height: 78vh;
14885
+ }
14886
+ .sd-file-previewer-inline .sd-file-previewer-video-player {
14887
+ max-width: 100%;
14888
+ max-height: none;
14889
+ }
14890
+ .sd-file-previewer-video {
14891
+ background: #000;
14892
+ }
14893
+ .sd-file-previewer-audio-panel {
14894
+ box-sizing: border-box;
14895
+ width: 100%;
14896
+ padding: 20px;
14897
+ }
14898
+ .sd-file-previewer-audio {
14899
+ display: block;
14900
+ width: 100%;
14901
+ }
14902
+ .sd-file-previewer-pdf {
14903
+ background: var(--sd-color-bg-2);
14904
+ border: 0;
14905
+ border-radius: var(--sd-border-radius-medium);
14906
+ }
14907
+ .sd-file-previewer-inline .sd-file-previewer-pdf {
14908
+ border-radius: 0;
14909
+ }
14910
+ .sd-file-previewer-close-btn {
14911
+ position: absolute;
14912
+ top: 36px;
14913
+ right: 36px;
14914
+ z-index: 2;
14915
+ display: flex;
14916
+ align-items: center;
14917
+ justify-content: center;
14918
+ width: 32px;
14919
+ height: 32px;
14920
+ color: var(--sd-color-white);
14921
+ font-size: 14px;
14922
+ background: rgba(0, 0, 0, 0.5);
14923
+ border: 0;
14924
+ border-radius: 50%;
14925
+ cursor: pointer;
14926
+ }
14927
+ .sd-file-previewer-loading {
14928
+ z-index: 2;
14929
+ display: flex;
14930
+ align-items: center;
14931
+ justify-content: center;
14932
+ box-sizing: border-box;
14933
+ width: 48px;
14934
+ height: 48px;
14935
+ color: rgb(var(--sd-primary-6));
14936
+ background-color: #232324;
14937
+ border-radius: var(--sd-border-radius-medium);
14938
+ position: absolute;
14939
+ top: 50%;
14940
+ left: 50%;
14941
+ transform: translate(-50%, -50%);
14942
+ }
14943
+ .sd-file-previewer-error {
14944
+ z-index: 2;
14945
+ color: var(--sd-color-white);
14946
+ position: absolute;
14947
+ top: 50%;
14948
+ left: 50%;
14949
+ transform: translate(-50%, -50%);
14950
+ }
14951
+ .sd-file-previewer-inline .sd-file-previewer-error {
14952
+ color: var(--sd-color-danger-6);
14953
+ }
14954
+
14789
14955
  .sd-json-form-row {
14790
14956
  gap: 8px 8px;
14791
14957
  }
package/es/index.d.ts CHANGED
@@ -69,6 +69,8 @@ export { default as Grid, Col, Row, GridItem } from './grid';
69
69
  export type { ColProps, GridColInstance, GridInstance, GridItemInstance, GridItemProps, GridProps, GridRowInstance, ResponsiveValue, RowProps, } from './grid';
70
70
  export { default as Icon } from './icon-component';
71
71
  export type { IconInstance, IconProps } from './icon-component';
72
+ export { default as FilePreviewer } from './file-previewer';
73
+ export type { FilePreviewerContentSlotProps, FilePreviewerInstance, FilePreviewerProps, FilePreviewerStatus, FilePreviewerType, } from './file-previewer';
72
74
  export { default as Image, ImagePreviewAction, ImagePreview, ImagePreviewGroup } from './image';
73
75
  export type { ImageInstance, ImagePreviewActionInstance, ImagePreviewInstance, ImagePreviewGroupInstance, } from './image';
74
76
  export { default as Input, InputGroup, InputPassword, InputSearch } from './input';
package/es/index.js CHANGED
@@ -66,6 +66,7 @@ import descriptions_item_default from "./descriptions/descriptions-item.js";
66
66
  import Descriptions from "./descriptions/index.js";
67
67
  import Divider from "./divider/index.js";
68
68
  import Drawer from "./drawer/index.js";
69
+ import FilePreviewer from "./file-previewer/index.js";
69
70
  import grid_col_default from "./grid/grid-col.js";
70
71
  import grid_item_default from "./grid/grid-item.js";
71
72
  import grid_row_default from "./grid/grid-row.js";
@@ -142,4 +143,4 @@ import Typography from "./typography/index.js";
142
143
  import Upload from "./upload/index.js";
143
144
  import Watermark from "./watermark/index.js";
144
145
  import SDVue from "./sd-vue.js";
145
- export { A2UI_0_8, Affix, Alert, Anchor, anchor_link_default as AnchorLink, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, BorderBeam, Breadcrumb, breadcrumb_item_default as BreadcrumbItem, Button, button_group_default as ButtonGroup, Calendar, Card, card_grid_default as CardGrid, card_meta_default as CardMeta, Carousel, carousel_item_default as CarouselItem, Cascader, cascader_panel_default as CascaderPanel, Checkbox, checkbox_group_default as CheckboxGroup, grid_col_default as Col, Collapse, collapse_item_default as CollapseItem, ColorPicker, Comment, ConfigProvider, Copy, countdown_default as Countdown, Cropper, DatePicker, Descriptions, descriptions_item_default as DescriptionsItem, dropdown_group_default as Dgroup, Divider, dropdown_option_default as Doption, Drawer, Dropdown, dropdown_button_default as DropdownButton, dropdown_submenu_default as Dsubmenu, Ellipsis, Empty, Form, form_item_default as FormItem, Grid, grid_item_default as GridItem, Icon, Image, preview_default as ImagePreview, preview_action_default as ImagePreviewAction, preview_group_default as ImagePreviewGroup, Input, input_group_default as InputGroup, InputNumber, input_password_default as InputPassword, input_search_default as InputSearch, InputTag, JsonForm, Layout, content_default as LayoutContent, footer_default as LayoutFooter, header_default as LayoutHeader, sider_default as LayoutSider, Link, List, list_item_default as ListItem, list_item_meta_default as ListItemMeta, Mention, Menu, item_default as MenuItem, item_group_default as MenuItemGroup, Message, Modal, month_picker_default as MonthPicker, Notification, OverflowList, PageHeader, Pagination, PerformantEllipsis, Popconfirm, Popover, Progress, QrCode, quarter_picker_default as QuarterPicker, Radio, radio_group_default as RadioGroup, range_picker_default as RangePicker, Rate, ResizeBox, Result, grid_row_default as Row, Scrollbar, Secret, Select, Skeleton, line_default as SkeletonLine, shape_default as SkeletonShape, Slider, Space, Spin, Split, Statistic, step_default as Step, Steps, sub_menu_default as SubMenu, Switch, tab_pane_default as TabPane, Table, table_column_default as TableColumn, Tabs, Tag, TagGroup, table_tbody_default as Tbody, table_td_default as Td, Textarea, table_th_default as Th, table_thead_default as Thead, ThemeProvider, TimePicker, Timeline, item_default$1 as TimelineItem, Tooltip, Tour, table_tr_default as Tr, Transfer, Tree, TreeSelect, Trigger, Typography, paragraph_default as TypographyParagraph, text_default as TypographyText, title_default as TypographyTitle, Upload, VerificationCode, Watermark, week_picker_default as WeekPicker, year_picker_default as YearPicker, addI18nMessages, SDVue as default, defineJsonFormComponents, defineJsonFormSchemas, getCssVarToken, getLocale, useFormItem, useLocale };
146
+ export { A2UI_0_8, Affix, Alert, Anchor, anchor_link_default as AnchorLink, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, BorderBeam, Breadcrumb, breadcrumb_item_default as BreadcrumbItem, Button, button_group_default as ButtonGroup, Calendar, Card, card_grid_default as CardGrid, card_meta_default as CardMeta, Carousel, carousel_item_default as CarouselItem, Cascader, cascader_panel_default as CascaderPanel, Checkbox, checkbox_group_default as CheckboxGroup, grid_col_default as Col, Collapse, collapse_item_default as CollapseItem, ColorPicker, Comment, ConfigProvider, Copy, countdown_default as Countdown, Cropper, DatePicker, Descriptions, descriptions_item_default as DescriptionsItem, dropdown_group_default as Dgroup, Divider, dropdown_option_default as Doption, Drawer, Dropdown, dropdown_button_default as DropdownButton, dropdown_submenu_default as Dsubmenu, Ellipsis, Empty, FilePreviewer, Form, form_item_default as FormItem, Grid, grid_item_default as GridItem, Icon, Image, preview_default as ImagePreview, preview_action_default as ImagePreviewAction, preview_group_default as ImagePreviewGroup, Input, input_group_default as InputGroup, InputNumber, input_password_default as InputPassword, input_search_default as InputSearch, InputTag, JsonForm, Layout, content_default as LayoutContent, footer_default as LayoutFooter, header_default as LayoutHeader, sider_default as LayoutSider, Link, List, list_item_default as ListItem, list_item_meta_default as ListItemMeta, Mention, Menu, item_default as MenuItem, item_group_default as MenuItemGroup, Message, Modal, month_picker_default as MonthPicker, Notification, OverflowList, PageHeader, Pagination, PerformantEllipsis, Popconfirm, Popover, Progress, QrCode, quarter_picker_default as QuarterPicker, Radio, radio_group_default as RadioGroup, range_picker_default as RangePicker, Rate, ResizeBox, Result, grid_row_default as Row, Scrollbar, Secret, Select, Skeleton, line_default as SkeletonLine, shape_default as SkeletonShape, Slider, Space, Spin, Split, Statistic, step_default as Step, Steps, sub_menu_default as SubMenu, Switch, tab_pane_default as TabPane, Table, table_column_default as TableColumn, Tabs, Tag, TagGroup, table_tbody_default as Tbody, table_td_default as Td, Textarea, table_th_default as Th, table_thead_default as Thead, ThemeProvider, TimePicker, Timeline, item_default$1 as TimelineItem, Tooltip, Tour, table_tr_default as Tr, Transfer, Tree, TreeSelect, Trigger, Typography, paragraph_default as TypographyParagraph, text_default as TypographyText, title_default as TypographyTitle, Upload, VerificationCode, Watermark, week_picker_default as WeekPicker, year_picker_default as YearPicker, addI18nMessages, SDVue as default, defineJsonFormComponents, defineJsonFormSchemas, getCssVarToken, getLocale, useFormItem, useLocale };
package/es/index.scss CHANGED
@@ -56,6 +56,7 @@
56
56
  @use '@components/image/style/index.scss' as *;
57
57
  @use '@components/grid/style/index.scss' as *;
58
58
  @use '@components/form/style/index.scss' as *;
59
+ @use '@components/file-previewer/style/index.scss' as *;
59
60
  @use '@components/json-form/style/index.scss' as *;
60
61
  @use '@components/ellipsis/style/index.scss' as *;
61
62
  @use '@components/empty/style/index.scss' as *;
@@ -1,4 +1,3 @@
1
1
  import "../../dropdown/style/index.js";
2
- import "../../ellipsis/style/index.js";
3
2
  import "../../style/index.css";
4
3
  import "./index.css";
@@ -1,4 +1,3 @@
1
1
  import "../../dropdown/style/index.js";
2
- import "../../ellipsis/style/index.js";
3
2
  import "../../style/index.scss";
4
3
  import "./index.scss";
package/es/sd-vue.js CHANGED
@@ -66,6 +66,7 @@ import descriptions_item_default from "./descriptions/descriptions-item.js";
66
66
  import Descriptions from "./descriptions/index.js";
67
67
  import Divider from "./divider/index.js";
68
68
  import Drawer from "./drawer/index.js";
69
+ import FilePreviewer from "./file-previewer/index.js";
69
70
  import grid_col_default from "./grid/grid-col.js";
70
71
  import grid_item_default from "./grid/grid-item.js";
71
72
  import grid_row_default from "./grid/grid-row.js";
@@ -161,6 +162,7 @@ var components = {
161
162
  Copy,
162
163
  Cropper,
163
164
  Empty,
165
+ FilePreviewer,
164
166
  Image,
165
167
  Scrollbar,
166
168
  List,
@@ -6,9 +6,11 @@ declare var __VLS_10: {}, __VLS_13: {}, __VLS_22: {
6
6
  indeterminate: boolean | undefined;
7
7
  expanded: boolean | undefined;
8
8
  isLeaf: boolean;
9
- }, __VLS_39: {
9
+ }, __VLS_45: {
10
10
  title: string | undefined;
11
- }, __VLS_41: {
11
+ }, __VLS_52: {
12
+ title: string | undefined;
13
+ }, __VLS_54: {
12
14
  loading: boolean | undefined;
13
15
  checked: boolean | undefined;
14
16
  selected: boolean | undefined;
@@ -23,9 +25,11 @@ type __VLS_Slots = {} & {
23
25
  } & {
24
26
  icon?: (props: typeof __VLS_22) => any;
25
27
  } & {
26
- title?: (props: typeof __VLS_39) => any;
28
+ title?: (props: typeof __VLS_45) => any;
29
+ } & {
30
+ title?: (props: typeof __VLS_52) => any;
27
31
  } & {
28
- 'drag-icon'?: (props: typeof __VLS_41) => any;
32
+ 'drag-icon'?: (props: typeof __VLS_54) => any;
29
33
  };
30
34
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
31
35
  title: {
@@ -1,6 +1,7 @@
1
1
  import { _objectSpread2 } from "../_virtual/_@oxc-project_runtime@0.133.0/helpers/esm/objectSpread2.js";
2
2
  import { getPrefixCls } from "../_utils/global-config.js";
3
3
  import { isFunction } from "../_utils/is.js";
4
+ import Ellipsis, { PerformantEllipsis } from "../ellipsis/index.js";
4
5
  import Checkbox from "../checkbox/index.js";
5
6
  import { toArray } from "../_utils/to-array.js";
6
7
  import IconDragDotVertical from "../icon/icon-drag-dot-vertical/index.js";
@@ -103,7 +104,8 @@ var base_node_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
103
104
  [`${prefixCls}-title-gap-bottom`]: isDragOver.value && isAllowDrop.value && dropPosition.value > 0,
104
105
  [`${prefixCls}-title-highlight`]: !isDragging.value && isDragOver.value && isAllowDrop.value && dropPosition.value === 0,
105
106
  [`${prefixCls}-title-dragging`]: isDragging.value,
106
- [`${prefixCls}-title-block`]: node.value.blockNode
107
+ [`${prefixCls}-title-block`]: node.value.blockNode,
108
+ [`${prefixCls}-title-with-ellipsis`]: shouldRenderEllipsis.value
107
109
  }]);
108
110
  const checked = computed(() => {
109
111
  var _treeContext$checkedK, _treeContext$checkedK2;
@@ -127,6 +129,15 @@ var base_node_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
127
129
  });
128
130
  const treeDragIcon = computed(() => treeContext.dragIcon);
129
131
  const treeNodeIcon = computed(() => treeContext.nodeIcon);
132
+ const shouldRenderEllipsis = computed(() => {
133
+ var _treeContext$treeProp3, _treeContext$treeProp4;
134
+ return ((_treeContext$treeProp3 = treeContext.treeProps) === null || _treeContext$treeProp3 === void 0 ? void 0 : _treeContext$treeProp3.ellipsis) === true || ((_treeContext$treeProp4 = treeContext.treeProps) === null || _treeContext$treeProp4 === void 0 ? void 0 : _treeContext$treeProp4.ellipsis) === "performant-ellipsis";
135
+ });
136
+ const ellipsisComponent = computed(() => {
137
+ var _treeContext$treeProp5;
138
+ return ((_treeContext$treeProp5 = treeContext.treeProps) === null || _treeContext$treeProp5 === void 0 ? void 0 : _treeContext$treeProp5.ellipsis) === "performant-ellipsis" ? PerformantEllipsis : Ellipsis;
139
+ });
140
+ const titleTextClassNames = computed(() => [`${prefixCls}-title-text`, { [`${prefixCls}-title-text-ellipsis`]: shouldRenderEllipsis.value }]);
130
141
  function onSwitcherClick(e) {
131
142
  var _children$value;
132
143
  if (isLeaf.value) return;
@@ -301,10 +312,19 @@ var base_node_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ define
301
312
  }, [_ctx.$slots.icon ? renderSlot(_ctx.$slots, "icon", normalizeProps(mergeProps({ key: 0 }, nodeStatus))) : __props.icon ? (openBlock(), createBlock(resolveDynamicComponent(__props.icon), normalizeProps(mergeProps({ key: 1 }, nodeStatus)), null, 16)) : treeNodeIcon.value ? (openBlock(), createBlock(resolveDynamicComponent(treeNodeIcon.value), mergeProps({
302
313
  key: 2,
303
314
  node: treeNodeData.value
304
- }, nodeStatus), null, 16, ["node"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true), createElementVNode("span", { class: normalizeClass(`${unref(prefixCls)}-title-text`) }, [treeTitle.value ? (openBlock(), createBlock(resolveDynamicComponent(treeTitle.value), { key: 0 })) : renderSlot(_ctx.$slots, "title", {
315
+ }, nodeStatus), null, 16, ["node"])) : createCommentVNode("", true)], 2)) : createCommentVNode("", true), createElementVNode("span", { class: normalizeClass(titleTextClassNames.value) }, [shouldRenderEllipsis.value ? (openBlock(), createBlock(resolveDynamicComponent(ellipsisComponent.value), {
316
+ key: 0,
317
+ class: normalizeClass(`${unref(prefixCls)}-title-ellipsis`)
318
+ }, {
319
+ default: withCtx(() => [treeTitle.value ? (openBlock(), createBlock(resolveDynamicComponent(treeTitle.value), { key: 0 })) : renderSlot(_ctx.$slots, "title", {
320
+ key: 1,
321
+ title: __props.title
322
+ }, () => [createTextVNode(toDisplayString(__props.title), 1)])]),
323
+ _: 3
324
+ }, 8, ["class"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [treeTitle.value ? (openBlock(), createBlock(resolveDynamicComponent(treeTitle.value), { key: 0 })) : renderSlot(_ctx.$slots, "title", {
305
325
  key: 1,
306
326
  title: __props.title
307
- }, () => [createTextVNode(toDisplayString(__props.title), 1)]), unref(draggable) ? (openBlock(), createElementBlock("span", {
327
+ }, () => [createTextVNode(toDisplayString(__props.title), 1)])], 64)), unref(draggable) ? (openBlock(), createElementBlock("span", {
308
328
  key: 2,
309
329
  class: normalizeClass([`${unref(prefixCls)}-icon`, `${unref(prefixCls)}-drag-icon`])
310
330
  }, [_ctx.$slots["drag-icon"] ? renderSlot(_ctx.$slots, "drag-icon", normalizeProps(mergeProps({ key: 0 }, nodeStatus))) : __props.dragIcon ? (openBlock(), createBlock(resolveDynamicComponent(__props.dragIcon), normalizeProps(mergeProps({ key: 1 }, nodeStatus)), null, 16)) : treeDragIcon.value ? (openBlock(), createBlock(resolveDynamicComponent(treeDragIcon.value), mergeProps({
@@ -2,6 +2,7 @@ import { Slot, VNode } from 'vue';
2
2
  import { VirtualListProps } from '../_components/virtual-list/interface';
3
3
  import { Size } from '../_utils/constant';
4
4
  export type TreeNodeKey = number | string;
5
+ export type TreeEllipsis = boolean | 'performant-ellipsis';
5
6
  export type TreeNodeDomEventName = 'click' | 'dblclick' | 'contextmenu' | 'mouseover' | 'mouseenter' | 'mouseleave' | 'mousemove' | 'mouseout' | 'mousedown' | 'mouseup' | 'pointerdown' | 'pointermove' | 'pointerup' | 'pointerenter' | 'pointerleave' | 'pointerover' | 'pointerout' | 'pointercancel' | 'touchstart' | 'touchmove' | 'touchend' | 'touchcancel' | 'keydown' | 'keyup' | 'keypress';
6
7
  export type TreeNodeSwipeEventName = 'swipeStart' | 'swipe' | 'swipeEnd';
7
8
  export type TreeNodeSwipeDirection = 'up' | 'down' | 'left' | 'right' | 'none';
@@ -99,6 +100,7 @@ export interface TreeProps {
99
100
  autoExpandParent?: boolean;
100
101
  onlyCheckLeaf: boolean;
101
102
  animation: boolean;
103
+ ellipsis: TreeEllipsis;
102
104
  actionOnNodeClick?: 'expand';
103
105
  disableSelectActionOnly: boolean;
104
106
  dragIcon?: Slot;
@@ -144,6 +144,24 @@
144
144
  display: block;
145
145
  width: 100%;
146
146
  }
147
+ .sd-tree-node-title-with-ellipsis {
148
+ flex: 1 1 0;
149
+ min-width: 0;
150
+ max-width: 100%;
151
+ overflow: hidden;
152
+ }
153
+ .sd-tree-node-title-text-ellipsis {
154
+ display: block;
155
+ flex: 1 1 0;
156
+ min-width: 0;
157
+ max-width: 100%;
158
+ overflow: hidden;
159
+ }
160
+ .sd-tree-node-title-ellipsis {
161
+ display: block;
162
+ width: 100%;
163
+ max-width: 100%;
164
+ }
147
165
  .sd-tree-node-indent {
148
166
  position: relative;
149
167
  flex-shrink: 0;
@@ -1,3 +1,4 @@
1
1
  import '../../style/index.scss';
2
2
  import '../../checkbox/style';
3
+ import '../../ellipsis/style';
3
4
  import './index.scss';
@@ -189,6 +189,27 @@ $tree-node-prefix-cls: string.unquote('#{theme.$prefix}-tree-node');
189
189
  }
190
190
  }
191
191
 
192
+ &-node-title-with-ellipsis {
193
+ flex: 1 1 0;
194
+ min-width: 0;
195
+ max-width: 100%;
196
+ overflow: hidden;
197
+ }
198
+
199
+ &-node-title-text-ellipsis {
200
+ display: block;
201
+ flex: 1 1 0;
202
+ min-width: 0;
203
+ max-width: 100%;
204
+ overflow: hidden;
205
+ }
206
+
207
+ &-node-title-ellipsis {
208
+ display: block;
209
+ width: 100%;
210
+ max-width: 100%;
211
+ }
212
+
192
213
  &-node-indent {
193
214
  position: relative;
194
215
  flex-shrink: 0;
@@ -1,6 +1,6 @@
1
1
  import { PropType } from 'vue';
2
2
  import type { VirtualListProps, ScrollIntoViewOptions } from '../_components/virtual-list/interface';
3
- import type { TreeFieldNames, TreeNodeData, FilterTreeNode, TreeNodeKey, CheckedStrategy, TreeNodeSwipeEventData } from './interface';
3
+ import type { TreeFieldNames, TreeNodeData, FilterTreeNode, TreeNodeKey, CheckedStrategy, TreeNodeSwipeEventData, TreeEllipsis } from './interface';
4
4
  declare function toggleCheck(key: TreeNodeKey, e: Event): void;
5
5
  declare function scrollIntoView(options: ScrollIntoViewOptions): void;
6
6
  declare function getSelectedNodes(): (TreeNodeData | undefined)[];
@@ -123,6 +123,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
123
123
  type: BooleanConstructor;
124
124
  default: boolean;
125
125
  };
126
+ ellipsis: {
127
+ type: PropType<TreeEllipsis>;
128
+ default: boolean;
129
+ };
126
130
  actionOnNodeClick: {
127
131
  type: PropType<"expand">;
128
132
  };
@@ -314,6 +318,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
314
318
  type: BooleanConstructor;
315
319
  default: boolean;
316
320
  };
321
+ ellipsis: {
322
+ type: PropType<TreeEllipsis>;
323
+ default: boolean;
324
+ };
317
325
  actionOnNodeClick: {
318
326
  type: PropType<"expand">;
319
327
  };
@@ -388,6 +396,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
388
396
  }>, {
389
397
  size: "small" | "mini" | "medium" | "large";
390
398
  data: TreeNodeData[];
399
+ ellipsis: TreeEllipsis;
391
400
  multiple: boolean;
392
401
  checkable: boolean | ((node: TreeNodeData, info: {
393
402
  level: number;
@@ -198,6 +198,14 @@ var tree_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineCompo
198
198
  default: true
199
199
  },
200
200
  /**
201
+ * @zh 是否使用 Ellipsis 组件渲染节点标题。传入 `performant-ellipsis` 时使用高性能省略实现。
202
+ * @en Whether to render node titles with the Ellipsis component. Use `performant-ellipsis` for the performant implementation.
203
+ */
204
+ ellipsis: {
205
+ type: [Boolean, String],
206
+ default: false
207
+ },
208
+ /**
201
209
  * @zh 点击节点的时候触发的动作
202
210
  * @en The action triggered when the node is clicked
203
211
  * @version 2.27.0
@@ -1167,6 +1167,54 @@
1167
1167
  "description": "Whether to use in ConfigProvider",
1168
1168
  "type": "boolean"
1169
1169
  },
1170
+ "sd-file-previewer/close": {
1171
+ "description": "Close event"
1172
+ },
1173
+ "sd-file-previewer/visible-change": {
1174
+ "description": "Visible state change"
1175
+ },
1176
+ "sd-file-previewer/src": {
1177
+ "description": "File source url",
1178
+ "type": "string"
1179
+ },
1180
+ "sd-file-previewer/type": {
1181
+ "description": "Preview type, decides which previewer to use"
1182
+ },
1183
+ "sd-file-previewer/visible": {
1184
+ "description": "Whether the previewer is visible",
1185
+ "type": "boolean"
1186
+ },
1187
+ "sd-file-previewer/default-visible": {
1188
+ "description": "Default visibility",
1189
+ "type": "boolean"
1190
+ },
1191
+ "sd-file-previewer/fullscreen": {
1192
+ "description": "Whether to show the previewer in fullscreen overlay",
1193
+ "type": "boolean"
1194
+ },
1195
+ "sd-file-previewer/title": {
1196
+ "description": "Title",
1197
+ "type": "string"
1198
+ },
1199
+ "sd-file-previewer/mask-closable": {
1200
+ "description": "Whether to close when mask is clicked",
1201
+ "type": "boolean"
1202
+ },
1203
+ "sd-file-previewer/closable": {
1204
+ "description": "Whether to show close button",
1205
+ "type": "boolean"
1206
+ },
1207
+ "sd-file-previewer/esc-to-close": {
1208
+ "description": "Whether to support closing with ESC",
1209
+ "type": "boolean"
1210
+ },
1211
+ "sd-file-previewer/popup-container": {
1212
+ "description": "Set the mount point, same as teleport to"
1213
+ },
1214
+ "sd-file-previewer/render-to-body": {
1215
+ "description": "Whether to render to body",
1216
+ "type": "boolean"
1217
+ },
1170
1218
  "sd-form-item/field": {
1171
1219
  "description": "The path of the form element in the data object (required for the data item)",
1172
1220
  "type": "string"
@@ -4065,6 +4113,9 @@
4065
4113
  "description": "Whether to enable expand transition animation",
4066
4114
  "type": "boolean"
4067
4115
  },
4116
+ "sd-tree/ellipsis": {
4117
+ "description": "Whether to render node titles with the Ellipsis component. Use `performant-ellipsis` for the performant implementation."
4118
+ },
4068
4119
  "sd-tree/action-on-node-click": {
4069
4120
  "description": "The action triggered when the node is clicked"
4070
4121
  },
@@ -504,6 +504,23 @@
504
504
  "in-config-provider"
505
505
  ]
506
506
  },
507
+ "sd-file-previewer": {
508
+ "attributes": [
509
+ "close",
510
+ "visible-change",
511
+ "src",
512
+ "type",
513
+ "visible",
514
+ "default-visible",
515
+ "fullscreen",
516
+ "title",
517
+ "mask-closable",
518
+ "closable",
519
+ "esc-to-close",
520
+ "popup-container",
521
+ "render-to-body"
522
+ ]
523
+ },
507
524
  "sd-form-item": {
508
525
  "attributes": [
509
526
  "field",
@@ -1628,6 +1645,7 @@
1628
1645
  "half-checked-keys",
1629
1646
  "only-check-leaf",
1630
1647
  "animation",
1648
+ "ellipsis",
1631
1649
  "action-on-node-click"
1632
1650
  ]
1633
1651
  },