@baishuyun/ui-base 6.28.2 → 6.29.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 (41) hide show
  1. package/dist/Amap/index.js +1 -1
  2. package/dist/Calendar/{Calendar-DPF0ecD9.js → Calendar-DHRiaiXw.js} +1 -1
  3. package/dist/Calendar/index.js +3 -3
  4. package/dist/Card/index.js +1 -1
  5. package/dist/CheckBox/index.js +1 -1
  6. package/dist/ColorPicker/index.js +1 -1
  7. package/dist/ConfigProvider/index.js +1 -1
  8. package/dist/DatePicker/{DatePicker-Hn_P6uYt.js → DatePicker-BfyiYmTl.js} +1 -1
  9. package/dist/DatePicker/{DatePickerPanel-Bl83l0FK.js → DatePickerPanel-D8qVQZ0a.js} +1 -1
  10. package/dist/DatePicker/index.js +2 -2
  11. package/dist/DropDown/index.js +1 -1
  12. package/dist/Editor/index.js +1 -1
  13. package/dist/FieldCard/index.js +1 -1
  14. package/dist/Gantt/index.js +2 -2
  15. package/dist/Icon/index.js +1 -1
  16. package/dist/InputTag/index.js +1 -1
  17. package/dist/Kanban/index.js +1 -1
  18. package/dist/Loading/index.js +1 -1
  19. package/dist/Modal/index.js +1 -1
  20. package/dist/NotFoundContent/index.js +1 -1
  21. package/dist/Overlay/index.js +1 -1
  22. package/dist/Radio/index.js +1 -1
  23. package/dist/ScrollBar/index.js +1 -1
  24. package/dist/Segmented/index.js +1 -1
  25. package/dist/Select/index.js +1 -1
  26. package/dist/Table/Table-BmPAWvbO.js +1078 -0
  27. package/dist/Table/index.js +4 -3
  28. package/dist/Tabs/index.js +1 -1
  29. package/dist/Tooltip/index.js +1 -1
  30. package/dist/Tree/index.js +1 -1
  31. package/dist/components/Table/HierarchyCell/HierarchyCell.d.ts +3 -0
  32. package/dist/components/Table/HierarchyCell/hierarchyTreeLayout.d.ts +27 -0
  33. package/dist/components/Table/HierarchyCell/index.d.ts +4 -0
  34. package/dist/components/Table/HierarchyCell/interface.d.ts +46 -0
  35. package/dist/components/Table/index.d.ts +2 -0
  36. package/dist/components/index.d.ts +2 -1
  37. package/dist/index.js +6 -6
  38. package/dist/style.css +1 -1
  39. package/dist/vendors/{version-C6z7Jrt6.js → version-BovtV-fV.js} +1 -1
  40. package/package.json +1 -1
  41. package/dist/Table/Table-Cfj7bTb2.js +0 -881
@@ -1,6 +1,7 @@
1
- import "../vendors/version-C6z7Jrt6.js";
1
+ import "../vendors/version-BovtV-fV.js";
2
2
  import "../ScrollBar/style-D26azwz6.js";
3
+ import "../Icon/Icon-CcKDWNGy.js";
3
4
  import "../vendors/LocaleContext-CsTLO_Y2.js";
4
5
  import "../vendors/useLocale-3oUjPb-k.js";
5
- import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g } from "./Table-Cfj7bTb2.js";
6
- export { o as COLUMN_DEFAULTS, a as DEFAULT_CONFIG, e as TABLE_DOM, h as Table, h as default, t as TableBody, c as calculateFixedOffset, g as expandLeafColumns, d as getCellRowspan, r as getColumnsWidth, i as getRowKey, m as processRowspan, u as resolveTableThemeVars, n as shouldRenderCell, f as sortData, l as splitFixedColumns, p as useColumnResize, s as useTableVirtual };
6
+ import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, n as u, o as d, p as f, r as p, s as m, t as h, u as g, v as _, y as v } from "./Table-BmPAWvbO.js";
7
+ export { e as COLUMN_DEFAULTS, _ as DEFAULT_CONFIG, h as HierarchyCell, v as TABLE_DOM, p as Table, p as default, m as TableBody, u as buildHierarchyTreeMeta, r as calculateFixedOffset, i as expandLeafColumns, n as getCellRowspan, f as getColumnsWidth, l as getRowKey, c as processRowspan, s as resolveTableThemeVars, g as shouldRenderCell, o as sortData, a as splitFixedColumns, t as useColumnResize, d as useTableVirtual };
@@ -1,4 +1,4 @@
1
- import "../vendors/version-C6z7Jrt6.js";
1
+ import "../vendors/version-BovtV-fV.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import "../vendors/LocaleContext-CsTLO_Y2.js";
4
4
  import "../Overlay/OverlayContext-CVSFoyqN.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-C6z7Jrt6.js";
1
+ import "../vendors/version-BovtV-fV.js";
2
2
  import "../Overlay/OverlayContext-CVSFoyqN.js";
3
3
  import "../vendors/useLatchedPopupPortalRoot-CC6af8t-.js";
4
4
  import { n as e, t } from "./Tooltip-N06Os8rG.js";
@@ -1,4 +1,4 @@
1
- import "../vendors/version-C6z7Jrt6.js";
1
+ import "../vendors/version-BovtV-fV.js";
2
2
  import "../Icon/Icon-CcKDWNGy.js";
3
3
  import { t as e } from "../vendors/Tree-f0FxoFIC.js";
4
4
  import "../CheckBox/CheckBox-DOdRLFKI.js";
@@ -0,0 +1,3 @@
1
+ import { HierarchyProps } from './interface';
2
+ declare const HierarchyCell: (props: HierarchyProps) => import("react").JSX.Element;
3
+ export default HierarchyCell;
@@ -0,0 +1,27 @@
1
+ import { HierarchyGutterBridgeStyle, HierarchyRailSegment, HierarchyRowMeta, HierarchyTreeLayout } from './interface';
2
+ export declare const HIERARCHY_TREE_LAYOUT: {
3
+ axisOffset: number;
4
+ arrowSize: number;
5
+ branchContinueOffset: number;
6
+ branchEndOffset: number;
7
+ iconOffset: number;
8
+ levelStep: number;
9
+ prefixOffset: number;
10
+ textGap: number;
11
+ textOffset: number;
12
+ };
13
+ export declare const getHierarchyTreeLayout: (depth?: number) => HierarchyTreeLayout;
14
+ export declare const buildHierarchyTreeMeta: (depths: number[]) => HierarchyRowMeta[];
15
+ export declare const getHierarchyTreeRailSegment: ({ rowIndex, subtreeEndIndex, type, }: {
16
+ rowIndex: number;
17
+ subtreeEndIndex: number;
18
+ type?: "ancestor" | "current";
19
+ }) => HierarchyRailSegment;
20
+ export declare const getHierarchyGutterBridgeStyle: ({ depth, hasChildren, previousDepth, rowIndex, rowMeta, treeMeta, }: {
21
+ depth?: number;
22
+ hasChildren?: boolean;
23
+ previousDepth?: number;
24
+ rowIndex?: number;
25
+ rowMeta?: HierarchyRowMeta | null;
26
+ treeMeta?: HierarchyRowMeta[];
27
+ }) => HierarchyGutterBridgeStyle;
@@ -0,0 +1,4 @@
1
+ export { default } from './HierarchyCell';
2
+ export { default as HierarchyCell } from './HierarchyCell';
3
+ export { buildHierarchyTreeMeta } from './hierarchyTreeLayout';
4
+ export type { HierarchyLoadMore, HierarchyProps, HierarchyRowMeta } from './interface';
@@ -0,0 +1,46 @@
1
+ import { CSSProperties, ReactNode } from 'react';
2
+ export interface HierarchyRowMeta {
3
+ ancestorIndices: number[];
4
+ subtreeEndIndex: number;
5
+ }
6
+ export interface HierarchyLoadMore {
7
+ label: ReactNode;
8
+ loading?: boolean;
9
+ onClick: () => void;
10
+ }
11
+ export interface HierarchyTreeLayout {
12
+ axisCenter: number;
13
+ arrowLeft: number;
14
+ prefixWidth: number;
15
+ textOffset: number;
16
+ }
17
+ export interface HierarchyRailSegment {
18
+ top: number | string;
19
+ bottom: number | string;
20
+ }
21
+ export type HierarchyDataProps = {
22
+ loadMore?: undefined;
23
+ rowIndex: number;
24
+ /** 上一可见行的深度,首行为 -1。用来画槽底横线 */
25
+ previousDepth?: number;
26
+ rowMeta: HierarchyRowMeta;
27
+ /** 整表元数据,与可见行下标对齐 */
28
+ treeMeta: HierarchyRowMeta[];
29
+ hasChildren?: boolean;
30
+ expanded?: boolean;
31
+ /** 子节点加载中时,箭头位置显示转圈,不显示展开按钮 */
32
+ loading?: boolean;
33
+ onToggle?: () => void;
34
+ };
35
+ type HierarchyLoadMoreProps = {
36
+ /** 传入后只画加载更多,不画引导线、箭头和 children */
37
+ loadMore: HierarchyLoadMore;
38
+ };
39
+ export type HierarchyProps = {
40
+ /** 当前行深度,从 0 开始。树槽宽度只由它决定 */
41
+ depth: number;
42
+ /** 字段内容。加载更多行不使用 */
43
+ children?: ReactNode;
44
+ } & (HierarchyDataProps | HierarchyLoadMoreProps);
45
+ export type HierarchyGutterBridgeStyle = Pick<CSSProperties, 'left' | 'width'> | null;
46
+ export {};
@@ -8,3 +8,5 @@ export { processRowspan, shouldRenderCell, getCellRowspan } from './utils/proces
8
8
  export { getRowKey, calculateFixedOffset, splitFixedColumns, getColumnsWidth, expandLeafColumns, sortData, } from './utils/tableUtils';
9
9
  export { useTableVirtual, useColumnResize } from './hooks';
10
10
  export { TABLE_DOM, DEFAULT_CONFIG, COLUMN_DEFAULTS } from './constants';
11
+ export { HierarchyCell, buildHierarchyTreeMeta } from './HierarchyCell';
12
+ export type { HierarchyLoadMore, HierarchyProps, HierarchyRowMeta } from './HierarchyCell';
@@ -38,6 +38,7 @@ export { default as DatePicker } from './DatePicker';
38
38
  export type { DatePickerProps, DatePickerTheme, PickerType } from './DatePicker';
39
39
  export { default as Table } from './Table';
40
40
  export type { TableProps, TableTheme, ColumnConfig, HeaderRenderApi } from './Table';
41
- export { processRowspan, shouldRenderCell, getCellRowspan, getRowKey, calculateFixedOffset, splitFixedColumns, getColumnsWidth, expandLeafColumns, sortData, useTableVirtual, useColumnResize, resolveTableThemeVars, } from './Table';
41
+ export { processRowspan, shouldRenderCell, getCellRowspan, getRowKey, calculateFixedOffset, splitFixedColumns, getColumnsWidth, expandLeafColumns, sortData, useTableVirtual, useColumnResize, resolveTableThemeVars, HierarchyCell, buildHierarchyTreeMeta, } from './Table';
42
+ export type { HierarchyLoadMore, HierarchyProps, HierarchyRowMeta } from './Table';
42
43
  export { default as FieldCard } from './FieldCard';
43
44
  export type { FieldCardCheckProps, FieldCardCoverFit, FieldCardCoverLayout, FieldCardCoverPosition, FieldCardCoverShape, FieldCardExtraProps, FieldCardFooterProps, FieldCardLayout, FieldCardMetaProps, FieldCardProps, FieldCardSize, FieldCardSkeletonProps, FieldCardTheme, } from './FieldCard';
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./vendors/version-C6z7Jrt6.js";
1
+ import "./vendors/version-BovtV-fV.js";
2
2
  import "./ScrollBar/style-D26azwz6.js";
3
3
  import { t as e } from "./Icon/Icon-CcKDWNGy.js";
4
4
  import "./vendors/LocaleContext-CsTLO_Y2.js";
@@ -29,10 +29,10 @@ import { t as O } from "./DropDown/DropDown-B3VFy5GF.js";
29
29
  import { t as k } from "./Loading/Loading-Dm4i0lYd.js";
30
30
  import "./NotFoundContent/index.js";
31
31
  import { t as A } from "./InputTag/InputTag-C1WA6sDA.js";
32
- import { t as j } from "./Calendar/Calendar-DPF0ecD9.js";
33
- import { t as M } from "./DatePicker/DatePicker-Hn_P6uYt.js";
32
+ import { t as j } from "./Calendar/Calendar-DHRiaiXw.js";
33
+ import { t as M } from "./DatePicker/DatePicker-BfyiYmTl.js";
34
34
  import "./DatePicker/pickerLocale-Brf7_Tnd.js";
35
- import { c as N, d as P, f as F, i as I, l as L, m as R, n as z, o as B, p as V, r as H, s as U, t as W, u as G } from "./Table/Table-Cfj7bTb2.js";
36
- import { t as K } from "./FieldCard/FieldCard-CCv4nLpH.js";
35
+ import { a as N, c as P, d as F, f as I, g as L, h as R, i as z, l as B, m as V, n as H, o as U, p as W, r as G, t as K, u as q } from "./Table/Table-BmPAWvbO.js";
36
+ import { t as J } from "./FieldCard/FieldCard-CCv4nLpH.js";
37
37
  import "overlayscrollbars/overlayscrollbars.css";
38
- export { u as Amap, d as AmapCircle, l as AmapMarker, p as AmapMarkerCluster, f as AmapProvider, j as Calendar, m as Card, S as Checkbox, g as ColorPicker, n as ConfigProvider, M as DatePicker, O as DropDown, K as FieldCard, e as Icon, A as InputTag, k as Loading, t as LocalTheme, h as Modal, w as NotFoundContent, o as OVERLAY_Z_BASE, a as OVERLAY_Z_STEP, i as OverlayProvider, C as Radio, C as Ratio, T as ScrollBar, _ as Segmented, b as Select, D as TabSelect, W as Table, E as Tabs, y as Tooltip, v as TooltipFloatingContext, x as Tree, L as calculateFixedOffset, G as expandLeafColumns, B as getCellRowspan, P as getColumnsWidth, F as getRowKey, U as processRowspan, z as resolveTableThemeVars, N as shouldRenderCell, V as sortData, R as splitFixedColumns, s as useAmap, H as useColumnResize, c as useCurrentLocation, r as useOverlayZIndex, I as useTableVirtual };
38
+ export { u as Amap, d as AmapCircle, l as AmapMarker, p as AmapMarkerCluster, f as AmapProvider, j as Calendar, m as Card, S as Checkbox, g as ColorPicker, n as ConfigProvider, M as DatePicker, O as DropDown, J as FieldCard, K as HierarchyCell, e as Icon, A as InputTag, k as Loading, t as LocalTheme, h as Modal, w as NotFoundContent, o as OVERLAY_Z_BASE, a as OVERLAY_Z_STEP, i as OverlayProvider, C as Radio, C as Ratio, T as ScrollBar, _ as Segmented, b as Select, D as TabSelect, G as Table, E as Tabs, y as Tooltip, v as TooltipFloatingContext, x as Tree, H as buildHierarchyTreeMeta, F as calculateFixedOffset, I as expandLeafColumns, P as getCellRowspan, W as getColumnsWidth, V as getRowKey, B as processRowspan, z as resolveTableThemeVars, q as shouldRenderCell, R as sortData, L as splitFixedColumns, s as useAmap, N as useColumnResize, c as useCurrentLocation, r as useOverlayZIndex, U as useTableVirtual };