@canvas-components/react-components 0.3.15 → 0.3.16
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/index.cjs +11 -3
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +11 -4
- package/package.json +1 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -6515,6 +6515,14 @@ if (typeof globalThis.addEventListener === "function") {
|
|
|
6515
6515
|
listeners.forEach((listener) => listener());
|
|
6516
6516
|
});
|
|
6517
6517
|
}
|
|
6518
|
+
function resolveReactScrollbarMode(value) {
|
|
6519
|
+
const modes = ["horizontal", "vertical"].filter((axis) => value?.[axis] !== false && value?.[axis]?.visible !== false).map((axis) => {
|
|
6520
|
+
const axisValue = value?.[axis];
|
|
6521
|
+
return axisValue && axisValue.mode || value?.mode || "scrollbar";
|
|
6522
|
+
});
|
|
6523
|
+
if (modes.length === 0) return value?.mode ?? "scrollbar";
|
|
6524
|
+
return modes.every((mode) => mode === modes[0]) ? modes[0] : void 0;
|
|
6525
|
+
}
|
|
6518
6526
|
var rowStyle = {
|
|
6519
6527
|
display: "grid",
|
|
6520
6528
|
gridTemplateColumns: "108px minmax(0, 1fr)",
|
|
@@ -6568,7 +6576,8 @@ function ReactScrollbarSettingsDialog(props) {
|
|
|
6568
6576
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6569
6577
|
ReactSelect,
|
|
6570
6578
|
{
|
|
6571
|
-
value: draft
|
|
6579
|
+
value: resolveReactScrollbarMode(draft),
|
|
6580
|
+
placeholder: "\u6309\u8F74\u5206\u522B\u8BBE\u7F6E",
|
|
6572
6581
|
options: [
|
|
6573
6582
|
{ label: "\u6EDA\u52A8\u6761", value: "scrollbar" },
|
|
6574
6583
|
{ label: "\u6309\u94AE", value: "button" }
|
|
@@ -9826,6 +9835,7 @@ exports.ReactVirtualList = ReactVirtualList;
|
|
|
9826
9835
|
exports.ReactYearPicker = ReactYearPicker;
|
|
9827
9836
|
exports.getSharedScrollbarSettings = getSharedScrollbarSettings;
|
|
9828
9837
|
exports.reactMessage = reactMessage;
|
|
9838
|
+
exports.resolveReactScrollbarMode = resolveReactScrollbarMode;
|
|
9829
9839
|
exports.resolveResizablePanelSizes = resolveResizablePanelSizes;
|
|
9830
9840
|
exports.setSharedScrollbarSettings = setSharedScrollbarSettings;
|
|
9831
9841
|
exports.subscribeSharedScrollbarSettings = subscribeSharedScrollbarSettings;
|
|
@@ -9833,5 +9843,3 @@ exports.useReactContentScale = useReactContentScale;
|
|
|
9833
9843
|
exports.useReactForm = useReactForm;
|
|
9834
9844
|
exports.useReactFormWatch = useReactFormWatch;
|
|
9835
9845
|
exports.useReactTransition = useReactTransition;
|
|
9836
|
-
//# sourceMappingURL=index.cjs.map
|
|
9837
|
-
//# sourceMappingURL=index.cjs.map
|
package/dist/index.d.cts
CHANGED
|
@@ -465,6 +465,8 @@ interface ReactScrollbarAxisSettings {
|
|
|
465
465
|
buttonHoverBackgroundColor?: string;
|
|
466
466
|
buttonPressedBackgroundColor?: string;
|
|
467
467
|
}
|
|
468
|
+
/** 根据实际启用的轴解析菜单中的统一模式;两轴不同时不预选模式。 */
|
|
469
|
+
declare function resolveReactScrollbarMode(value?: ReactScrollbarSettings): "scrollbar" | "button" | undefined;
|
|
468
470
|
/** 同时供列表与透视表使用的滚动条配置弹窗。 */
|
|
469
471
|
declare function ReactScrollbarSettingsDialog(props: {
|
|
470
472
|
value?: ReactScrollbarSettings;
|
|
@@ -1408,4 +1410,4 @@ declare function useReactContentScale(): ReactContentScaleValue;
|
|
|
1408
1410
|
*/
|
|
1409
1411
|
declare const REACT_COMPONENT_PREFIX = "canvas-react";
|
|
1410
1412
|
|
|
1411
|
-
export { type CascaderCheckedStrategy, type CascaderPath, REACT_COMPONENT_PREFIX, ReactAutoComplete, type ReactAutoCompleteProps, ReactButton, type ReactButtonProps, ReactCascader, type ReactCascaderChangeInfo, type ReactCascaderOption, type ReactCascaderProps, ReactCheckbox, type ReactCheckboxProps, type ReactCheckboxRef, ReactCol, type ReactColProps, ReactColorPicker, type ReactColorPickerProps, ReactContentScaleProvider, type ReactContentScaleValue, ReactDatePicker, type ReactDatePickerProps, ReactDateRangePicker, type ReactDateRangePickerProps, ReactDateTimePicker, type ReactDateTimePickerProps, ReactDateTimeRangePicker, type ReactDateTimeRangePickerProps, type ReactFilterConditionOperator, ReactFilterPanel, type ReactFilterPanelCondition, type ReactFilterPanelOption, type ReactFilterPanelRequest, type ReactFilterPanelTexts, type ReactFilterPanelValue, ReactFlex, type ReactFlexProps, ReactForm, type ReactFormInstance, type ReactFormItemProps, type ReactFormProps, type ReactFormRule, type ReactFormRuleConfig, type ReactFormValues, ReactImagePreview, type ReactImagePreviewProps, ReactInput, ReactInputNumber, type ReactInputNumberProps, type ReactInputProps, ReactInputRange, type ReactInputRangeProps, type ReactInputRangeValue, type ReactMessageType, ReactModal, type ReactModalButtonProps, type ReactModalCancelEvent, type ReactModalProps, ReactMonthPicker, type ReactMonthPickerProps, ReactNumberInput, type ReactNumberInputProps, ReactPagination, type ReactPaginationProps, type ReactPaginationStyles, ReactPopconfirm, type ReactPopconfirmButtonProps, type ReactPopconfirmPlacement, type ReactPopconfirmProps, ReactPopup, type ReactPopupProps, ReactQuarterPicker, type ReactQuarterPickerProps, ReactRadio, type ReactRadioGroupProps, type ReactRadioProps, type ReactResizablePanel, type ReactResizablePanelSizes, ReactResizablePanels, type ReactResizablePanelsDirection, type ReactResizablePanelsProps, type ReactResizablePanelsResizeInfo, ReactRow, type ReactRowProps, ReactScrollbarPositionDialog, type ReactScrollbarSettings, ReactScrollbarSettingsDialog, ReactSelect, type ReactSelectChangeInfo, type ReactSelectFilterOption, type ReactSelectOption, type ReactSelectProps, ReactTextArea, type ReactTextAreaProps, ReactTimePicker, type ReactTimePickerProps, ReactTimeRangePicker, type ReactTimeRangePickerProps, ReactTooltip, type ReactTooltipProps, ReactTransition, type ReactTransitionDuration, type ReactTransitionOptions, type ReactTransitionPhase, type ReactTransitionProps, type ReactTransitionState, ReactTreeSelect, type ReactTreeSelectChangeInfo, type TreeSelectNode as ReactTreeSelectNode, type ReactTreeSelectProps, type ReactTreeSelectValue, ReactVirtualList, type ReactVirtualListProps, type ReactVirtualListRef, ReactYearPicker, type ReactYearPickerProps, type SharedScrollbarSettings, getSharedScrollbarSettings, reactMessage, resolveResizablePanelSizes, setSharedScrollbarSettings, subscribeSharedScrollbarSettings, useReactContentScale, useReactForm, useReactFormWatch, useReactTransition };
|
|
1413
|
+
export { type CascaderCheckedStrategy, type CascaderPath, REACT_COMPONENT_PREFIX, ReactAutoComplete, type ReactAutoCompleteProps, ReactButton, type ReactButtonProps, ReactCascader, type ReactCascaderChangeInfo, type ReactCascaderOption, type ReactCascaderProps, ReactCheckbox, type ReactCheckboxProps, type ReactCheckboxRef, ReactCol, type ReactColProps, ReactColorPicker, type ReactColorPickerProps, ReactContentScaleProvider, type ReactContentScaleValue, ReactDatePicker, type ReactDatePickerProps, ReactDateRangePicker, type ReactDateRangePickerProps, ReactDateTimePicker, type ReactDateTimePickerProps, ReactDateTimeRangePicker, type ReactDateTimeRangePickerProps, type ReactFilterConditionOperator, ReactFilterPanel, type ReactFilterPanelCondition, type ReactFilterPanelOption, type ReactFilterPanelRequest, type ReactFilterPanelTexts, type ReactFilterPanelValue, ReactFlex, type ReactFlexProps, ReactForm, type ReactFormInstance, type ReactFormItemProps, type ReactFormProps, type ReactFormRule, type ReactFormRuleConfig, type ReactFormValues, ReactImagePreview, type ReactImagePreviewProps, ReactInput, ReactInputNumber, type ReactInputNumberProps, type ReactInputProps, ReactInputRange, type ReactInputRangeProps, type ReactInputRangeValue, type ReactMessageType, ReactModal, type ReactModalButtonProps, type ReactModalCancelEvent, type ReactModalProps, ReactMonthPicker, type ReactMonthPickerProps, ReactNumberInput, type ReactNumberInputProps, ReactPagination, type ReactPaginationProps, type ReactPaginationStyles, ReactPopconfirm, type ReactPopconfirmButtonProps, type ReactPopconfirmPlacement, type ReactPopconfirmProps, ReactPopup, type ReactPopupProps, ReactQuarterPicker, type ReactQuarterPickerProps, ReactRadio, type ReactRadioGroupProps, type ReactRadioProps, type ReactResizablePanel, type ReactResizablePanelSizes, ReactResizablePanels, type ReactResizablePanelsDirection, type ReactResizablePanelsProps, type ReactResizablePanelsResizeInfo, ReactRow, type ReactRowProps, ReactScrollbarPositionDialog, type ReactScrollbarSettings, ReactScrollbarSettingsDialog, ReactSelect, type ReactSelectChangeInfo, type ReactSelectFilterOption, type ReactSelectOption, type ReactSelectProps, ReactTextArea, type ReactTextAreaProps, ReactTimePicker, type ReactTimePickerProps, ReactTimeRangePicker, type ReactTimeRangePickerProps, ReactTooltip, type ReactTooltipProps, ReactTransition, type ReactTransitionDuration, type ReactTransitionOptions, type ReactTransitionPhase, type ReactTransitionProps, type ReactTransitionState, ReactTreeSelect, type ReactTreeSelectChangeInfo, type TreeSelectNode as ReactTreeSelectNode, type ReactTreeSelectProps, type ReactTreeSelectValue, ReactVirtualList, type ReactVirtualListProps, type ReactVirtualListRef, ReactYearPicker, type ReactYearPickerProps, type SharedScrollbarSettings, getSharedScrollbarSettings, reactMessage, resolveReactScrollbarMode, resolveResizablePanelSizes, setSharedScrollbarSettings, subscribeSharedScrollbarSettings, useReactContentScale, useReactForm, useReactFormWatch, useReactTransition };
|
package/dist/index.d.ts
CHANGED
|
@@ -465,6 +465,8 @@ interface ReactScrollbarAxisSettings {
|
|
|
465
465
|
buttonHoverBackgroundColor?: string;
|
|
466
466
|
buttonPressedBackgroundColor?: string;
|
|
467
467
|
}
|
|
468
|
+
/** 根据实际启用的轴解析菜单中的统一模式;两轴不同时不预选模式。 */
|
|
469
|
+
declare function resolveReactScrollbarMode(value?: ReactScrollbarSettings): "scrollbar" | "button" | undefined;
|
|
468
470
|
/** 同时供列表与透视表使用的滚动条配置弹窗。 */
|
|
469
471
|
declare function ReactScrollbarSettingsDialog(props: {
|
|
470
472
|
value?: ReactScrollbarSettings;
|
|
@@ -1408,4 +1410,4 @@ declare function useReactContentScale(): ReactContentScaleValue;
|
|
|
1408
1410
|
*/
|
|
1409
1411
|
declare const REACT_COMPONENT_PREFIX = "canvas-react";
|
|
1410
1412
|
|
|
1411
|
-
export { type CascaderCheckedStrategy, type CascaderPath, REACT_COMPONENT_PREFIX, ReactAutoComplete, type ReactAutoCompleteProps, ReactButton, type ReactButtonProps, ReactCascader, type ReactCascaderChangeInfo, type ReactCascaderOption, type ReactCascaderProps, ReactCheckbox, type ReactCheckboxProps, type ReactCheckboxRef, ReactCol, type ReactColProps, ReactColorPicker, type ReactColorPickerProps, ReactContentScaleProvider, type ReactContentScaleValue, ReactDatePicker, type ReactDatePickerProps, ReactDateRangePicker, type ReactDateRangePickerProps, ReactDateTimePicker, type ReactDateTimePickerProps, ReactDateTimeRangePicker, type ReactDateTimeRangePickerProps, type ReactFilterConditionOperator, ReactFilterPanel, type ReactFilterPanelCondition, type ReactFilterPanelOption, type ReactFilterPanelRequest, type ReactFilterPanelTexts, type ReactFilterPanelValue, ReactFlex, type ReactFlexProps, ReactForm, type ReactFormInstance, type ReactFormItemProps, type ReactFormProps, type ReactFormRule, type ReactFormRuleConfig, type ReactFormValues, ReactImagePreview, type ReactImagePreviewProps, ReactInput, ReactInputNumber, type ReactInputNumberProps, type ReactInputProps, ReactInputRange, type ReactInputRangeProps, type ReactInputRangeValue, type ReactMessageType, ReactModal, type ReactModalButtonProps, type ReactModalCancelEvent, type ReactModalProps, ReactMonthPicker, type ReactMonthPickerProps, ReactNumberInput, type ReactNumberInputProps, ReactPagination, type ReactPaginationProps, type ReactPaginationStyles, ReactPopconfirm, type ReactPopconfirmButtonProps, type ReactPopconfirmPlacement, type ReactPopconfirmProps, ReactPopup, type ReactPopupProps, ReactQuarterPicker, type ReactQuarterPickerProps, ReactRadio, type ReactRadioGroupProps, type ReactRadioProps, type ReactResizablePanel, type ReactResizablePanelSizes, ReactResizablePanels, type ReactResizablePanelsDirection, type ReactResizablePanelsProps, type ReactResizablePanelsResizeInfo, ReactRow, type ReactRowProps, ReactScrollbarPositionDialog, type ReactScrollbarSettings, ReactScrollbarSettingsDialog, ReactSelect, type ReactSelectChangeInfo, type ReactSelectFilterOption, type ReactSelectOption, type ReactSelectProps, ReactTextArea, type ReactTextAreaProps, ReactTimePicker, type ReactTimePickerProps, ReactTimeRangePicker, type ReactTimeRangePickerProps, ReactTooltip, type ReactTooltipProps, ReactTransition, type ReactTransitionDuration, type ReactTransitionOptions, type ReactTransitionPhase, type ReactTransitionProps, type ReactTransitionState, ReactTreeSelect, type ReactTreeSelectChangeInfo, type TreeSelectNode as ReactTreeSelectNode, type ReactTreeSelectProps, type ReactTreeSelectValue, ReactVirtualList, type ReactVirtualListProps, type ReactVirtualListRef, ReactYearPicker, type ReactYearPickerProps, type SharedScrollbarSettings, getSharedScrollbarSettings, reactMessage, resolveResizablePanelSizes, setSharedScrollbarSettings, subscribeSharedScrollbarSettings, useReactContentScale, useReactForm, useReactFormWatch, useReactTransition };
|
|
1413
|
+
export { type CascaderCheckedStrategy, type CascaderPath, REACT_COMPONENT_PREFIX, ReactAutoComplete, type ReactAutoCompleteProps, ReactButton, type ReactButtonProps, ReactCascader, type ReactCascaderChangeInfo, type ReactCascaderOption, type ReactCascaderProps, ReactCheckbox, type ReactCheckboxProps, type ReactCheckboxRef, ReactCol, type ReactColProps, ReactColorPicker, type ReactColorPickerProps, ReactContentScaleProvider, type ReactContentScaleValue, ReactDatePicker, type ReactDatePickerProps, ReactDateRangePicker, type ReactDateRangePickerProps, ReactDateTimePicker, type ReactDateTimePickerProps, ReactDateTimeRangePicker, type ReactDateTimeRangePickerProps, type ReactFilterConditionOperator, ReactFilterPanel, type ReactFilterPanelCondition, type ReactFilterPanelOption, type ReactFilterPanelRequest, type ReactFilterPanelTexts, type ReactFilterPanelValue, ReactFlex, type ReactFlexProps, ReactForm, type ReactFormInstance, type ReactFormItemProps, type ReactFormProps, type ReactFormRule, type ReactFormRuleConfig, type ReactFormValues, ReactImagePreview, type ReactImagePreviewProps, ReactInput, ReactInputNumber, type ReactInputNumberProps, type ReactInputProps, ReactInputRange, type ReactInputRangeProps, type ReactInputRangeValue, type ReactMessageType, ReactModal, type ReactModalButtonProps, type ReactModalCancelEvent, type ReactModalProps, ReactMonthPicker, type ReactMonthPickerProps, ReactNumberInput, type ReactNumberInputProps, ReactPagination, type ReactPaginationProps, type ReactPaginationStyles, ReactPopconfirm, type ReactPopconfirmButtonProps, type ReactPopconfirmPlacement, type ReactPopconfirmProps, ReactPopup, type ReactPopupProps, ReactQuarterPicker, type ReactQuarterPickerProps, ReactRadio, type ReactRadioGroupProps, type ReactRadioProps, type ReactResizablePanel, type ReactResizablePanelSizes, ReactResizablePanels, type ReactResizablePanelsDirection, type ReactResizablePanelsProps, type ReactResizablePanelsResizeInfo, ReactRow, type ReactRowProps, ReactScrollbarPositionDialog, type ReactScrollbarSettings, ReactScrollbarSettingsDialog, ReactSelect, type ReactSelectChangeInfo, type ReactSelectFilterOption, type ReactSelectOption, type ReactSelectProps, ReactTextArea, type ReactTextAreaProps, ReactTimePicker, type ReactTimePickerProps, ReactTimeRangePicker, type ReactTimeRangePickerProps, ReactTooltip, type ReactTooltipProps, ReactTransition, type ReactTransitionDuration, type ReactTransitionOptions, type ReactTransitionPhase, type ReactTransitionProps, type ReactTransitionState, ReactTreeSelect, type ReactTreeSelectChangeInfo, type TreeSelectNode as ReactTreeSelectNode, type ReactTreeSelectProps, type ReactTreeSelectValue, ReactVirtualList, type ReactVirtualListProps, type ReactVirtualListRef, ReactYearPicker, type ReactYearPickerProps, type SharedScrollbarSettings, getSharedScrollbarSettings, reactMessage, resolveReactScrollbarMode, resolveResizablePanelSizes, setSharedScrollbarSettings, subscribeSharedScrollbarSettings, useReactContentScale, useReactForm, useReactFormWatch, useReactTransition };
|
package/dist/index.js
CHANGED
|
@@ -6494,6 +6494,14 @@ if (typeof globalThis.addEventListener === "function") {
|
|
|
6494
6494
|
listeners.forEach((listener) => listener());
|
|
6495
6495
|
});
|
|
6496
6496
|
}
|
|
6497
|
+
function resolveReactScrollbarMode(value) {
|
|
6498
|
+
const modes = ["horizontal", "vertical"].filter((axis) => value?.[axis] !== false && value?.[axis]?.visible !== false).map((axis) => {
|
|
6499
|
+
const axisValue = value?.[axis];
|
|
6500
|
+
return axisValue && axisValue.mode || value?.mode || "scrollbar";
|
|
6501
|
+
});
|
|
6502
|
+
if (modes.length === 0) return value?.mode ?? "scrollbar";
|
|
6503
|
+
return modes.every((mode) => mode === modes[0]) ? modes[0] : void 0;
|
|
6504
|
+
}
|
|
6497
6505
|
var rowStyle = {
|
|
6498
6506
|
display: "grid",
|
|
6499
6507
|
gridTemplateColumns: "108px minmax(0, 1fr)",
|
|
@@ -6547,7 +6555,8 @@ function ReactScrollbarSettingsDialog(props) {
|
|
|
6547
6555
|
/* @__PURE__ */ jsx(
|
|
6548
6556
|
ReactSelect,
|
|
6549
6557
|
{
|
|
6550
|
-
value: draft
|
|
6558
|
+
value: resolveReactScrollbarMode(draft),
|
|
6559
|
+
placeholder: "\u6309\u8F74\u5206\u522B\u8BBE\u7F6E",
|
|
6551
6560
|
options: [
|
|
6552
6561
|
{ label: "\u6EDA\u52A8\u6761", value: "scrollbar" },
|
|
6553
6562
|
{ label: "\u6309\u94AE", value: "button" }
|
|
@@ -9763,6 +9772,4 @@ function resolveDecadeStart6(year) {
|
|
|
9763
9772
|
return Math.floor(year / 10) * 10;
|
|
9764
9773
|
}
|
|
9765
9774
|
|
|
9766
|
-
export { REACT_COMPONENT_PREFIX, ReactAutoComplete, ReactButton, ReactCascader, ReactCheckbox, ReactCol, ReactColorPicker, ReactContentScaleProvider, ReactDatePicker, ReactDateRangePicker, ReactDateTimePicker, ReactDateTimeRangePicker, ReactFilterPanel, ReactFlex, ReactForm, ReactImagePreview, ReactInput, ReactInputNumber, ReactInputRange, ReactModal, ReactMonthPicker, ReactNumberInput, ReactPagination, ReactPopconfirm, ReactPopup, ReactQuarterPicker, ReactRadio, ReactResizablePanels, ReactRow, ReactScrollbarPositionDialog, ReactScrollbarSettingsDialog, ReactSelect, ReactTextArea, ReactTimePicker, ReactTimeRangePicker, ReactTooltip, ReactTransition, ReactTreeSelect, ReactVirtualList, ReactYearPicker, getSharedScrollbarSettings, reactMessage, resolveResizablePanelSizes, setSharedScrollbarSettings, subscribeSharedScrollbarSettings, useReactContentScale, useReactForm, useReactFormWatch, useReactTransition };
|
|
9767
|
-
//# sourceMappingURL=index.js.map
|
|
9768
|
-
//# sourceMappingURL=index.js.map
|
|
9775
|
+
export { REACT_COMPONENT_PREFIX, ReactAutoComplete, ReactButton, ReactCascader, ReactCheckbox, ReactCol, ReactColorPicker, ReactContentScaleProvider, ReactDatePicker, ReactDateRangePicker, ReactDateTimePicker, ReactDateTimeRangePicker, ReactFilterPanel, ReactFlex, ReactForm, ReactImagePreview, ReactInput, ReactInputNumber, ReactInputRange, ReactModal, ReactMonthPicker, ReactNumberInput, ReactPagination, ReactPopconfirm, ReactPopup, ReactQuarterPicker, ReactRadio, ReactResizablePanels, ReactRow, ReactScrollbarPositionDialog, ReactScrollbarSettingsDialog, ReactSelect, ReactTextArea, ReactTimePicker, ReactTimeRangePicker, ReactTooltip, ReactTransition, ReactTreeSelect, ReactVirtualList, ReactYearPicker, getSharedScrollbarSettings, reactMessage, resolveReactScrollbarMode, resolveResizablePanelSizes, setSharedScrollbarSettings, subscribeSharedScrollbarSettings, useReactContentScale, useReactForm, useReactFormWatch, useReactTransition };
|