@sia.soul/sia-react-ui 0.1.11 → 0.1.12
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/{core-EyinLic7.d.ts → core-VmiEI1Jp.d.ts} +1 -1
- package/dist/{core-D3ZPxJ7a.d.cts → core-y0w5PBO2.d.cts} +1 -1
- package/dist/core.d.cts +1 -1
- package/dist/core.d.ts +1 -1
- package/dist/index.cjs +12 -2
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +12 -2
- package/package.json +1 -1
|
@@ -1076,4 +1076,4 @@ declare const FloatButton: react.ForwardRefExoticComponent<FloatButtonProps & re
|
|
|
1076
1076
|
BackTop: typeof FloatButtonBackTop;
|
|
1077
1077
|
};
|
|
1078
1078
|
|
|
1079
|
-
export { Menu as $, type DropdownProps as A,
|
|
1079
|
+
export { Menu as $, type DropdownProps as A, type ButtonProps as B, Calendar as C, Dropdown as D, type DropdownTrigger as E, FILLED_ICON_NAMES as F, type FilledIconName as G, FloatButton as H, type FloatButtonBackTopProps as I, type FloatButtonGroupProps as J, type FloatButtonProps as K, type FloatButtonShape as L, type FloatingPlacement as M, type FloatingTrigger as N, type OverlayContainer as O, ICON_NAMES as P, Icon as Q, type IconName as R, type IconProps as S, type IconVariant as T, Image as U, ImagePreview as V, type ImagePreviewConfig as W, type ImagePreviewProps as X, type ImageProps as Y, Input as Z, type InputProps as _, type OverlayApiHandle as a, type TypographyTitleProps as a$, type MenuClickInfo as a0, type MenuItem as a1, type MenuMode as a2, type MenuProps as a3, type MenuTheme as a4, type MessageConfig as a5, type MessageHandle as a6, type MessageKey as a7, type MessageType as a8, Modal as a9, type TabItem as aA, Tabs as aB, type TabsContextMenuClickInfo as aC, type TabsOrientation as aD, type TabsPosition as aE, type TabsProps as aF, type TabsType as aG, Tag as aH, type TagProps as aI, type TagStatus as aJ, type TagVariant as aK, Timeline as aL, type TimelineItem as aM, type TimelineProps as aN, Tooltip as aO, type TooltipProps as aP, Tour as aQ, type TourProps as aR, type TourStep as aS, Tree as aT, type TreeDropPosition as aU, type TreeKey as aV, type TreeNode as aW, type TreeProps as aX, Typography as aY, type TypographyLinkProps as aZ, type TypographyProps as a_, type ModalActionResult as aa, type ModalOpenConfig as ab, type ModalProps as ac, type ModalType as ad, type NotificationConfig as ae, type NotificationPlacement as af, type NotificationType as ag, Popconfirm as ah, type PopconfirmProps as ai, Popover as aj, type PopoverProps as ak, Progress as al, type ProgressProps as am, type ProgressStatus as an, Rate as ao, type RateProps as ap, Segmented as aq, type SegmentedOption as ar, type SegmentedProps as as, type SegmentedValue as at, Spin as au, type SpinProps as av, type StepItem as aw, type StepStatus as ax, Steps as ay, type StepsProps as az, Badge as b, type TypographyType as b0, Upload as b1, type UploadChangeInfo as b2, type UploadDraggerProps as b3, type UploadFile as b4, type UploadFileStatus as b5, type UploadProps as b6, type UploadRequestOptions as b7, Watermark as b8, type WatermarkFont as b9, type WatermarkProps as ba, message as bb, notification as bc, type BadgeProps as c, type BadgeRibbonProps as d, type BadgeStatus as e, Breadcrumb as f, type BreadcrumbItem as g, type BreadcrumbProps as h, Button as i, type ButtonSize as j, type ButtonVariant as k, type CalendarProps as l, Card as m, type CardAccent as n, type CardProps as o, Carousel as p, type CarouselProps as q, type CarouselRef as r, Collapse as s, type CollapseItem as t, type CollapseKey as u, type CollapseProps as v, type DropdownButtonProps as w, type DropdownMenuProps as x, type DropdownOpenSource as y, type DropdownPlacement as z };
|
|
@@ -1076,4 +1076,4 @@ declare const FloatButton: react.ForwardRefExoticComponent<FloatButtonProps & re
|
|
|
1076
1076
|
BackTop: typeof FloatButtonBackTop;
|
|
1077
1077
|
};
|
|
1078
1078
|
|
|
1079
|
-
export { Menu as $, type DropdownProps as A,
|
|
1079
|
+
export { Menu as $, type DropdownProps as A, type ButtonProps as B, Calendar as C, Dropdown as D, type DropdownTrigger as E, FILLED_ICON_NAMES as F, type FilledIconName as G, FloatButton as H, type FloatButtonBackTopProps as I, type FloatButtonGroupProps as J, type FloatButtonProps as K, type FloatButtonShape as L, type FloatingPlacement as M, type FloatingTrigger as N, type OverlayContainer as O, ICON_NAMES as P, Icon as Q, type IconName as R, type IconProps as S, type IconVariant as T, Image as U, ImagePreview as V, type ImagePreviewConfig as W, type ImagePreviewProps as X, type ImageProps as Y, Input as Z, type InputProps as _, type OverlayApiHandle as a, type TypographyTitleProps as a$, type MenuClickInfo as a0, type MenuItem as a1, type MenuMode as a2, type MenuProps as a3, type MenuTheme as a4, type MessageConfig as a5, type MessageHandle as a6, type MessageKey as a7, type MessageType as a8, Modal as a9, type TabItem as aA, Tabs as aB, type TabsContextMenuClickInfo as aC, type TabsOrientation as aD, type TabsPosition as aE, type TabsProps as aF, type TabsType as aG, Tag as aH, type TagProps as aI, type TagStatus as aJ, type TagVariant as aK, Timeline as aL, type TimelineItem as aM, type TimelineProps as aN, Tooltip as aO, type TooltipProps as aP, Tour as aQ, type TourProps as aR, type TourStep as aS, Tree as aT, type TreeDropPosition as aU, type TreeKey as aV, type TreeNode as aW, type TreeProps as aX, Typography as aY, type TypographyLinkProps as aZ, type TypographyProps as a_, type ModalActionResult as aa, type ModalOpenConfig as ab, type ModalProps as ac, type ModalType as ad, type NotificationConfig as ae, type NotificationPlacement as af, type NotificationType as ag, Popconfirm as ah, type PopconfirmProps as ai, Popover as aj, type PopoverProps as ak, Progress as al, type ProgressProps as am, type ProgressStatus as an, Rate as ao, type RateProps as ap, Segmented as aq, type SegmentedOption as ar, type SegmentedProps as as, type SegmentedValue as at, Spin as au, type SpinProps as av, type StepItem as aw, type StepStatus as ax, Steps as ay, type StepsProps as az, Badge as b, type TypographyType as b0, Upload as b1, type UploadChangeInfo as b2, type UploadDraggerProps as b3, type UploadFile as b4, type UploadFileStatus as b5, type UploadProps as b6, type UploadRequestOptions as b7, Watermark as b8, type WatermarkFont as b9, type WatermarkProps as ba, message as bb, notification as bc, type BadgeProps as c, type BadgeRibbonProps as d, type BadgeStatus as e, Breadcrumb as f, type BreadcrumbItem as g, type BreadcrumbProps as h, Button as i, type ButtonSize as j, type ButtonVariant as k, type CalendarProps as l, Card as m, type CardAccent as n, type CardProps as o, Carousel as p, type CarouselProps as q, type CarouselRef as r, Collapse as s, type CollapseItem as t, type CollapseKey as u, type CollapseProps as v, type DropdownButtonProps as w, type DropdownMenuProps as x, type DropdownOpenSource as y, type DropdownPlacement as z };
|
package/dist/core.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { f as Breadcrumb, g as BreadcrumbItem, h as BreadcrumbProps, i as Button, B as ButtonProps, j as ButtonSize, k as ButtonVariant, m as Card, n as CardAccent, o as CardProps, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, Q as Icon, R as IconName, S as IconProps, T as IconVariant, Z as Input, _ as InputProps, a5 as MessageConfig, a6 as MessageHandle, a7 as MessageKey, a8 as MessageType, a9 as Modal, aa as ModalActionResult, ab as ModalOpenConfig, ac as ModalProps, ad as ModalType, a as OverlayApiHandle, al as Progress, am as ProgressProps, an as ProgressStatus, aq as Segmented, ar as SegmentedOption, as as SegmentedProps, at as SegmentedValue, aA as TabItem, aB as Tabs, aD as TabsOrientation, aE as TabsPosition, aF as TabsProps, aG as TabsType, aH as Tag, aI as TagProps, aJ as TagStatus, aK as TagVariant, aY as Typography, aZ as TypographyLinkProps, a_ as TypographyProps, a$ as TypographyTitleProps, b0 as TypographyType, b1 as Upload, b2 as UploadChangeInfo, b3 as UploadDraggerProps, b4 as UploadFile, b5 as UploadFileStatus, b6 as UploadProps, b7 as UploadRequestOptions, bb as message } from './core-y0w5PBO2.cjs';
|
|
2
2
|
export { S as Select, c as SelectOption, d as SelectProps, e as SelectValue } from './Select-CVvF4mcy.cjs';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-DAYZvZVu.cjs';
|
package/dist/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { f as Breadcrumb, g as BreadcrumbItem, h as BreadcrumbProps, i as Button, B as ButtonProps, j as ButtonSize, k as ButtonVariant, m as Card, n as CardAccent, o as CardProps, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, Q as Icon, R as IconName, S as IconProps, T as IconVariant, Z as Input, _ as InputProps, a5 as MessageConfig, a6 as MessageHandle, a7 as MessageKey, a8 as MessageType, a9 as Modal, aa as ModalActionResult, ab as ModalOpenConfig, ac as ModalProps, ad as ModalType, a as OverlayApiHandle, al as Progress, am as ProgressProps, an as ProgressStatus, aq as Segmented, ar as SegmentedOption, as as SegmentedProps, at as SegmentedValue, aA as TabItem, aB as Tabs, aD as TabsOrientation, aE as TabsPosition, aF as TabsProps, aG as TabsType, aH as Tag, aI as TagProps, aJ as TagStatus, aK as TagVariant, aY as Typography, aZ as TypographyLinkProps, a_ as TypographyProps, a$ as TypographyTitleProps, b0 as TypographyType, b1 as Upload, b2 as UploadChangeInfo, b3 as UploadDraggerProps, b4 as UploadFile, b5 as UploadFileStatus, b6 as UploadProps, b7 as UploadRequestOptions, bb as message } from './core-VmiEI1Jp.js';
|
|
2
2
|
export { S as Select, c as SelectOption, d as SelectProps, e as SelectValue } from './Select-Ce2Irbpt.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import './shared-DAYZvZVu.js';
|
package/dist/index.cjs
CHANGED
|
@@ -11659,11 +11659,21 @@ function createColumnSettingPlugin(options = {}) {
|
|
|
11659
11659
|
disabled: item.disabled === true || typeof item.disabled === "function" && item.disabled(context)
|
|
11660
11660
|
}))
|
|
11661
11661
|
];
|
|
11662
|
-
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Dropdown, { trigger: ["hover", "click"], placement: "bottomRight", popupClassName: "sia-table__settings-dropdown", menu: { items, onClick: ({ key }) => {
|
|
11662
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Dropdown, { disabled: options.buttonProps?.disabled || options.buttonProps?.loading, trigger: ["hover", "click"], placement: "bottomRight", popupClassName: "sia-table__settings-dropdown", menu: { items, onClick: ({ key }) => {
|
|
11663
11663
|
if (key === "builtin:export") void exportApi().download();
|
|
11664
11664
|
else if (key === "builtin:columns") context.setState((state) => ({ ...state, open: true }));
|
|
11665
11665
|
else void customItems.find((item) => "custom:" + item.key === key)?.onClick?.(context);
|
|
11666
|
-
} }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
11666
|
+
} }, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
11667
|
+
Button,
|
|
11668
|
+
{
|
|
11669
|
+
size: "small",
|
|
11670
|
+
variant: "text",
|
|
11671
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Icon, { name: "settings", size: 16 }),
|
|
11672
|
+
"aria-label": "\u8868\u683C\u8BBE\u7F6E",
|
|
11673
|
+
...options.buttonProps,
|
|
11674
|
+
className: `sia-table__settings-button${options.buttonProps?.children == null ? " sia-table__toolbar-icon" : ""} ${options.buttonProps?.className ?? ""}`.trim()
|
|
11675
|
+
}
|
|
11676
|
+
) });
|
|
11667
11677
|
},
|
|
11668
11678
|
renderOverlay: (context) => /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(ColumnSettingPanel, { open: context.state.open, items: currentItems(context), columns: context.baseColumns, onClose: () => context.setState((state) => ({ ...state, open: false })), onApply: (items) => apply(items, context) }),
|
|
11669
11679
|
getApi: (context) => ({ open: () => context.setState((state) => ({ ...state, open: true })), close: () => context.setState((state) => ({ ...state, open: false })), getSettings: () => currentItems(context), apply: (items) => apply(items, context) })
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import { O as OverlayContainer, a as OverlayApiHandle } from './core-
|
|
4
|
-
export {
|
|
3
|
+
import { O as OverlayContainer, a as OverlayApiHandle, B as ButtonProps } from './core-y0w5PBO2.cjs';
|
|
4
|
+
export { b as Badge, c as BadgeProps, d as BadgeRibbonProps, e as BadgeStatus, f as Breadcrumb, g as BreadcrumbItem, h as BreadcrumbProps, i as Button, j as ButtonSize, k as ButtonVariant, C as Calendar, l as CalendarProps, m as Card, n as CardAccent, o as CardProps, p as Carousel, q as CarouselProps, r as CarouselRef, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, D as Dropdown, w as DropdownButtonProps, x as DropdownMenuProps, y as DropdownOpenSource, z as DropdownPlacement, A as DropdownProps, E as DropdownTrigger, F as FILLED_ICON_NAMES, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, M as FloatingPlacement, N as FloatingTrigger, P as ICON_NAMES, Q as Icon, R as IconName, S as IconProps, T as IconVariant, U as Image, V as ImagePreview, W as ImagePreviewConfig, X as ImagePreviewProps, Y as ImageProps, Z as Input, _ as InputProps, $ as Menu, a0 as MenuClickInfo, a1 as MenuItem, a2 as MenuMode, a3 as MenuProps, a4 as MenuTheme, a5 as MessageConfig, a6 as MessageHandle, a7 as MessageKey, a8 as MessageType, a9 as Modal, aa as ModalActionResult, ab as ModalOpenConfig, ac as ModalProps, ad as ModalType, ae as NotificationConfig, af as NotificationPlacement, ag as NotificationType, ah as Popconfirm, ai as PopconfirmProps, aj as Popover, ak as PopoverProps, al as Progress, am as ProgressProps, an as ProgressStatus, ao as Rate, ap as RateProps, aq as Segmented, ar as SegmentedOption, as as SegmentedProps, at as SegmentedValue, au as Spin, av as SpinProps, aw as StepItem, ax as StepStatus, ay as Steps, az as StepsProps, aA as TabItem, aB as Tabs, aC as TabsContextMenuClickInfo, aD as TabsOrientation, aE as TabsPosition, aF as TabsProps, aG as TabsType, aH as Tag, aI as TagProps, aJ as TagStatus, aK as TagVariant, aL as Timeline, aM as TimelineItem, aN as TimelineProps, aO as Tooltip, aP as TooltipProps, aQ as Tour, aR as TourProps, aS as TourStep, aT as Tree, aU as TreeDropPosition, aV as TreeKey, aW as TreeNode, aX as TreeProps, aY as Typography, aZ as TypographyLinkProps, a_ as TypographyProps, a$ as TypographyTitleProps, b0 as TypographyType, b1 as Upload, b2 as UploadChangeInfo, b3 as UploadDraggerProps, b4 as UploadFile, b5 as UploadFileStatus, b6 as UploadProps, b7 as UploadRequestOptions, b8 as Watermark, b9 as WatermarkFont, ba as WatermarkProps, bb as message, bc as notification } from './core-y0w5PBO2.cjs';
|
|
5
5
|
import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-DAYZvZVu.cjs';
|
|
6
6
|
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-l-xgB959.cjs';
|
|
7
7
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.cjs';
|
|
@@ -1189,6 +1189,8 @@ interface TableResizeApi {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
declare function createResizePlugin<T extends Record<string, unknown>>(options?: TableResizePluginOptions): TablePlugin<T, ResizeState, TableResizeApi>;
|
|
1191
1191
|
interface TableColumnSettingPluginOptions<T> {
|
|
1192
|
+
/** 设置按钮的完整 Button 属性;className 合并,disabled/loading 同时禁用菜单触发。 */
|
|
1193
|
+
buttonProps?: ButtonProps;
|
|
1192
1194
|
/** 追加到设置下拉菜单中的业务操作。 */
|
|
1193
1195
|
menuItems?: readonly TableToolbarItem<T>[];
|
|
1194
1196
|
/** 是否显示设置菜单中的导出操作,默认 true。 */
|
|
@@ -1350,4 +1352,4 @@ interface InputSelectProps {
|
|
|
1350
1352
|
}
|
|
1351
1353
|
declare const InputSelect: react.ForwardRefExoticComponent<InputSelectProps & react.RefAttributes<HTMLInputElement>>;
|
|
1352
1354
|
|
|
1353
|
-
export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, useForm };
|
|
1355
|
+
export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, ButtonProps, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, useForm };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { HTMLAttributes, ReactNode, CSSProperties, ElementType, FormHTMLAttributes, InputHTMLAttributes, ChangeEvent, TextareaHTMLAttributes, MouseEvent, Key, PointerEvent, Ref, ReactElement, ButtonHTMLAttributes } from 'react';
|
|
3
|
-
import { O as OverlayContainer, a as OverlayApiHandle } from './core-
|
|
4
|
-
export {
|
|
3
|
+
import { O as OverlayContainer, a as OverlayApiHandle, B as ButtonProps } from './core-VmiEI1Jp.js';
|
|
4
|
+
export { b as Badge, c as BadgeProps, d as BadgeRibbonProps, e as BadgeStatus, f as Breadcrumb, g as BreadcrumbItem, h as BreadcrumbProps, i as Button, j as ButtonSize, k as ButtonVariant, C as Calendar, l as CalendarProps, m as Card, n as CardAccent, o as CardProps, p as Carousel, q as CarouselProps, r as CarouselRef, s as Collapse, t as CollapseItem, u as CollapseKey, v as CollapseProps, D as Dropdown, w as DropdownButtonProps, x as DropdownMenuProps, y as DropdownOpenSource, z as DropdownPlacement, A as DropdownProps, E as DropdownTrigger, F as FILLED_ICON_NAMES, G as FilledIconName, H as FloatButton, I as FloatButtonBackTopProps, J as FloatButtonGroupProps, K as FloatButtonProps, L as FloatButtonShape, M as FloatingPlacement, N as FloatingTrigger, P as ICON_NAMES, Q as Icon, R as IconName, S as IconProps, T as IconVariant, U as Image, V as ImagePreview, W as ImagePreviewConfig, X as ImagePreviewProps, Y as ImageProps, Z as Input, _ as InputProps, $ as Menu, a0 as MenuClickInfo, a1 as MenuItem, a2 as MenuMode, a3 as MenuProps, a4 as MenuTheme, a5 as MessageConfig, a6 as MessageHandle, a7 as MessageKey, a8 as MessageType, a9 as Modal, aa as ModalActionResult, ab as ModalOpenConfig, ac as ModalProps, ad as ModalType, ae as NotificationConfig, af as NotificationPlacement, ag as NotificationType, ah as Popconfirm, ai as PopconfirmProps, aj as Popover, ak as PopoverProps, al as Progress, am as ProgressProps, an as ProgressStatus, ao as Rate, ap as RateProps, aq as Segmented, ar as SegmentedOption, as as SegmentedProps, at as SegmentedValue, au as Spin, av as SpinProps, aw as StepItem, ax as StepStatus, ay as Steps, az as StepsProps, aA as TabItem, aB as Tabs, aC as TabsContextMenuClickInfo, aD as TabsOrientation, aE as TabsPosition, aF as TabsProps, aG as TabsType, aH as Tag, aI as TagProps, aJ as TagStatus, aK as TagVariant, aL as Timeline, aM as TimelineItem, aN as TimelineProps, aO as Tooltip, aP as TooltipProps, aQ as Tour, aR as TourProps, aS as TourStep, aT as Tree, aU as TreeDropPosition, aV as TreeKey, aW as TreeNode, aX as TreeProps, aY as Typography, aZ as TypographyLinkProps, a_ as TypographyProps, a$ as TypographyTitleProps, b0 as TypographyType, b1 as Upload, b2 as UploadChangeInfo, b3 as UploadDraggerProps, b4 as UploadFile, b5 as UploadFileStatus, b6 as UploadProps, b7 as UploadRequestOptions, b8 as Watermark, b9 as WatermarkFont, ba as WatermarkProps, bb as message, bc as notification } from './core-VmiEI1Jp.js';
|
|
5
5
|
import { I as InputPlaceholderMode, C as ControlSize, a as ControlStatus } from './shared-DAYZvZVu.js';
|
|
6
6
|
export { D as DatePicker, a as DatePickerDisabledInfo, b as DatePickerPreset, c as DatePickerProps, d as DatePickerShowTime, e as DatePickerType, f as DatePickerValue, g as DateRangePickerPreset, h as DateRangePickerProps, S as SelectDateRange, i as SelectDateRangeProps, j as SelectDateRangeValue } from './select-date-range-D-JMfpwD.js';
|
|
7
7
|
export { RichTextContent, RichTextContentFormat, RichTextContentProps, RichTextEditor, RichTextEditorProps, RichTextImagePasteHandler, RichTextToolbar } from './rich-text-editor.js';
|
|
@@ -1189,6 +1189,8 @@ interface TableResizeApi {
|
|
|
1189
1189
|
}
|
|
1190
1190
|
declare function createResizePlugin<T extends Record<string, unknown>>(options?: TableResizePluginOptions): TablePlugin<T, ResizeState, TableResizeApi>;
|
|
1191
1191
|
interface TableColumnSettingPluginOptions<T> {
|
|
1192
|
+
/** 设置按钮的完整 Button 属性;className 合并,disabled/loading 同时禁用菜单触发。 */
|
|
1193
|
+
buttonProps?: ButtonProps;
|
|
1192
1194
|
/** 追加到设置下拉菜单中的业务操作。 */
|
|
1193
1195
|
menuItems?: readonly TableToolbarItem<T>[];
|
|
1194
1196
|
/** 是否显示设置菜单中的导出操作,默认 true。 */
|
|
@@ -1350,4 +1352,4 @@ interface InputSelectProps {
|
|
|
1350
1352
|
}
|
|
1351
1353
|
declare const InputSelect: react.ForwardRefExoticComponent<InputSelectProps & react.RefAttributes<HTMLInputElement>>;
|
|
1352
1354
|
|
|
1353
|
-
export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, useForm };
|
|
1355
|
+
export { Alert, type AlertProps, type AlertStatus, type AnyTablePlugin, ButtonProps, Cascader, type CascaderFieldNames, type CascaderOption, type CascaderProps, type CascaderValue, Checkbox, type CheckboxGroupProps, type CheckboxOption, type CheckboxProps, type CheckboxValue, Col, type ColProps, type ColSize, ColorPicker, type ColorPickerMode, type ColorPickerPreset, type ColorPickerProps, ControlSize, ControlStatus, DEFAULT_PAGE_SIZE_OPTIONS, Divider, type DividerProps, Drawer, type DrawerOpenConfig, type DrawerPlacement, type DrawerProps, type DrawerPush, type DrawerPushConfig, Editor, type EditorCommand, type EditorCompletionContext, type EditorCompletionItem, type EditorCompletionItemKind, type EditorCompletionProvider, type EditorContextMenuItem, type EditorHandle, type EditorKeyDownEvent, type EditorLanguage, type EditorMarker, type EditorProps, type EditorRange, type EditorSelectionChange, type EditorTheme, type FlatTreeNode, type FlatTreeOptions, Flex, type FlexProps, FloatingScrollbarProvider, type FloatingScrollbarProviderProps, Form, type FormErrorField, type FormInstance, type FormItemProps, type FormListField, type FormListOperation, type FormListProps, type FormProps, type FormRule, type FormValues, type GridBreakpoint, InputNumber, type InputNumberProps, InputPlaceholderMode, InputSelect, type InputSelectProps, type LayoutGap, Markdown, type MarkdownProps, type NamePath, OverlayApiHandle, Pagination, type PaginationProps, Radio, type RadioGroupProps, type RadioOption, type RadioProps, type RadioValue, Row, type RowProps, SIA_THEME, type SelectionOption, SelectionPanel, type SelectionPanelProps, type SelectionValue, type SiaThemeMode, Slider, type SliderMark, type SliderProps, type SliderValue, Space, type SpaceCompactProps, type SpaceProps, Splitter, type SplitterPanelProps, type SplitterProps, Switch, type SwitchProps, type SwitchVariant, Table, type TableAlign, type TableCellAddress, type TableCellRange, type TableCellRenderInfo, type TableCellSelectionApi, type TableCellSelectionPluginOptions, type TableColumn, type TableColumnSettingApi, type TableColumnSettingItem, type TableColumnSettingPluginOptions, type TableColumnTransformPluginOptions, type TableEditableApi, type TableEditableCellConfig, type TableEditableCellType, type TableEditablePluginOptions, type TableExportApi, type TableExportPluginOptions, type TableExportScope, type TableFilterApi, type TableFilterPluginOptions, type TableFilterValues, type TableFixed, type TableHighlightPluginOptions, type TableHighlightValue, type TableIndexPluginOptions, type TableKey, type TableMergeStickyConfig, type TablePageParams, type TablePaginationApi, type TablePaginationPluginOptions, type TablePlugin, type TablePluginCellProps, type TablePluginContext, type TablePluginEvent, type TableProps, type TableRef, type TableResizeApi, type TableResizePluginOptions, type TableRow, type TableRowSpanPluginOptions, type TableSelectedCell, type TableSelectionApi, type TableSelectionMode, type TableSelectionPluginOptions, type TableSettingsAdapter, type TableSettingsSnapshot, type TableSize, type TableSortApi, type TableSortInfo, type TableSortPluginOptions, type TableSummaryPluginOptions, type TableSummaryRow, type TableToolbarItem, type TableToolbarPluginOptions, type TableTreeApi, type TableTreePluginOptions, TextArea, type TextAreaProps, ThemeSwitch, type ThemeSwitchProps, TimePicker, type TimePickerProps, type TimeRangePickerProps, ToolPanel, type ToolPanelItem, type ToolPanelPlacement, type ToolPanelProps, TreeSelect, type TreeSelectNode, type TreeSelectProps, type TreeSelectValue, Treemap, type TreemapNode, type TreemapNodeClickInfo, type TreemapNodeKind, type TreemapProps, type WindowAction, type WindowActionHandler, type WindowControlAction, type WindowControlLabels, WindowControls, type WindowControlsProps, WindowFrame, type WindowFrameProps, WindowTitleBar, type WindowTitleBarActionsAlign, type WindowTitleBarProps, applySiaTheme, buildFlatTree, createCellSelectionPlugin, createColumnSettingPlugin, createColumnTransformPlugin, createEditablePlugin, createExportPlugin, createFilterPlugin, createHighlightPlugin, createIndexPlugin, createLocalStorageTableSettingsAdapter, createPaginationPlugin, createResizePlugin, createRowSpanPlugin, createSelectionPlugin, createSortPlugin, createSummaryPlugin, createToolbarPlugin, createTreePlugin, useForm };
|
package/dist/index.js
CHANGED
|
@@ -5902,11 +5902,21 @@ function createColumnSettingPlugin(options = {}) {
|
|
|
5902
5902
|
disabled: item.disabled === true || typeof item.disabled === "function" && item.disabled(context)
|
|
5903
5903
|
}))
|
|
5904
5904
|
];
|
|
5905
|
-
return /* @__PURE__ */ jsx20(Dropdown, { trigger: ["hover", "click"], placement: "bottomRight", popupClassName: "sia-table__settings-dropdown", menu: { items, onClick: ({ key }) => {
|
|
5905
|
+
return /* @__PURE__ */ jsx20(Dropdown, { disabled: options.buttonProps?.disabled || options.buttonProps?.loading, trigger: ["hover", "click"], placement: "bottomRight", popupClassName: "sia-table__settings-dropdown", menu: { items, onClick: ({ key }) => {
|
|
5906
5906
|
if (key === "builtin:export") void exportApi().download();
|
|
5907
5907
|
else if (key === "builtin:columns") context.setState((state) => ({ ...state, open: true }));
|
|
5908
5908
|
else void customItems.find((item) => "custom:" + item.key === key)?.onClick?.(context);
|
|
5909
|
-
} }, children: /* @__PURE__ */ jsx20(
|
|
5909
|
+
} }, children: /* @__PURE__ */ jsx20(
|
|
5910
|
+
Button,
|
|
5911
|
+
{
|
|
5912
|
+
size: "small",
|
|
5913
|
+
variant: "text",
|
|
5914
|
+
icon: /* @__PURE__ */ jsx20(Icon, { name: "settings", size: 16 }),
|
|
5915
|
+
"aria-label": "\u8868\u683C\u8BBE\u7F6E",
|
|
5916
|
+
...options.buttonProps,
|
|
5917
|
+
className: `sia-table__settings-button${options.buttonProps?.children == null ? " sia-table__toolbar-icon" : ""} ${options.buttonProps?.className ?? ""}`.trim()
|
|
5918
|
+
}
|
|
5919
|
+
) });
|
|
5910
5920
|
},
|
|
5911
5921
|
renderOverlay: (context) => /* @__PURE__ */ jsx20(ColumnSettingPanel, { open: context.state.open, items: currentItems(context), columns: context.baseColumns, onClose: () => context.setState((state) => ({ ...state, open: false })), onApply: (items) => apply(items, context) }),
|
|
5912
5922
|
getApi: (context) => ({ open: () => context.setState((state) => ({ ...state, open: true })), close: () => context.setState((state) => ({ ...state, open: false })), getSettings: () => currentItems(context), apply: (items) => apply(items, context) })
|