@pisell/materials 6.12.24 → 6.12.27
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +154 -154
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +25 -25
- package/es/components/PisellGroupView/utils/index.d.ts +1 -1
- package/es/components/PisellSuperTabs/PisellSuperTabs.js +2 -0
- package/es/components/PisellSuperTabs/types.d.ts +3 -1
- package/es/components/PisellTabbar/PisellTabbar.js +31 -11
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/es/components/iconSelect/utils.d.ts +1 -1
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/BookingCalendarStyle.d.ts +1 -1
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/PisellGroupView/utils/index.d.ts +1 -1
- package/lib/components/PisellSuperTabs/PisellSuperTabs.js +2 -0
- package/lib/components/PisellSuperTabs/types.d.ts +3 -1
- package/lib/components/PisellTabbar/PisellTabbar.js +30 -14
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/lib/components/iconSelect/utils.d.ts +1 -1
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/BookingCalendarStyle.d.ts +1 -1
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +3 -3
|
@@ -9,7 +9,7 @@ export declare const COMPONENT_PREFIX = "pisell-group-view";
|
|
|
9
9
|
* @returns 字段名数组;自定义函数分组时返回空数组
|
|
10
10
|
* @description 用于透传给 `renderItem`,让调用方据此省略头部已展示的字段
|
|
11
11
|
*/
|
|
12
|
-
export declare const getGroupFieldNames: <T>(groupBy: string | string[] | ((item: T, index: number) =>
|
|
12
|
+
export declare const getGroupFieldNames: <T>(groupBy: string | string[] | ((item: T, index: number) => any)) => string[];
|
|
13
13
|
/**
|
|
14
14
|
* 获取主体内单条数据的稳定 key
|
|
15
15
|
* @param item - 数据项
|
|
@@ -37,6 +37,7 @@ var PisellSuperTabs = function PisellSuperTabs(props, ref) {
|
|
|
37
37
|
slotRight = props.slotRight,
|
|
38
38
|
slotTop = props.slotTop,
|
|
39
39
|
slotBottom = props.slotBottom,
|
|
40
|
+
slotBottomRef = props.slotBottomRef,
|
|
40
41
|
tabItemClassName = props.tabItemClassName,
|
|
41
42
|
tabItemStyle = props.tabItemStyle,
|
|
42
43
|
slotLeftClassName = props.slotLeftClassName,
|
|
@@ -188,6 +189,7 @@ var PisellSuperTabs = function PisellSuperTabs(props, ref) {
|
|
|
188
189
|
className: classNames('pisell-super-tabs-slot-right-' + id, slotRightClassName),
|
|
189
190
|
style: slotRightStyle
|
|
190
191
|
}, slotRight), /*#__PURE__*/React.createElement("div", {
|
|
192
|
+
ref: slotBottomRef,
|
|
191
193
|
className: classNames('pisell-super-tabs-slot-bottom-' + id, slotBottomClassName),
|
|
192
194
|
style: slotBottomStyle
|
|
193
195
|
}, slotBottom));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode, Ref } from 'react';
|
|
2
2
|
import type { PisellBasicGridProps } from '../PisellBasicGrid/types';
|
|
3
3
|
import type { PisellScrollViewProps } from '../PisellScrollView/types';
|
|
4
4
|
import type { PisellBasicCardProps } from '../PisellCards/types';
|
|
@@ -166,6 +166,8 @@ export interface PisellSuperTabsProps<T = any> {
|
|
|
166
166
|
* 底部插槽
|
|
167
167
|
*/
|
|
168
168
|
slotBottom?: ReactNode;
|
|
169
|
+
/** 底部插槽容器引用 */
|
|
170
|
+
slotBottomRef?: Ref<HTMLDivElement>;
|
|
169
171
|
slotBottomClassName?: string;
|
|
170
172
|
slotBottomStyle?: CSSProperties;
|
|
171
173
|
__designMode?: boolean;
|
|
@@ -94,6 +94,18 @@ var PisellTabbar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
94
94
|
level1Actions = props.level1Actions;
|
|
95
95
|
var containerRef = useRef(null);
|
|
96
96
|
var tabbarIdRef = useRef(createTabbarId());
|
|
97
|
+
var bottomSlotRefs = useRef(new Map());
|
|
98
|
+
var registerBottomSlot = useCallback(function (id, element) {
|
|
99
|
+
if (element) {
|
|
100
|
+
bottomSlotRefs.current.set(id, element);
|
|
101
|
+
} else {
|
|
102
|
+
bottomSlotRefs.current.delete(id);
|
|
103
|
+
}
|
|
104
|
+
}, []);
|
|
105
|
+
var getBottomSlot = useCallback(function (id) {
|
|
106
|
+
var _bottomSlotRefs$curre;
|
|
107
|
+
return (_bottomSlotRefs$curre = bottomSlotRefs.current.get(id)) !== null && _bottomSlotRefs$curre !== void 0 ? _bottomSlotRefs$curre : null;
|
|
108
|
+
}, []);
|
|
97
109
|
var searchRef = useRef(null);
|
|
98
110
|
|
|
99
111
|
// 激活的 key 管理
|
|
@@ -319,6 +331,7 @@ var PisellTabbar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
319
331
|
_dataSource2 = addDataSourceItemsByKey(_dataSource2, LEVEL_ADD_ITEMS.level3);
|
|
320
332
|
}
|
|
321
333
|
var level3Config = getLevelConfig('level3');
|
|
334
|
+
var level3TabbarId = "".concat(tabbarIdRef.current, "-").concat(panelProps2.dataSource.id);
|
|
322
335
|
|
|
323
336
|
/**
|
|
324
337
|
* 渲染三级 Tab 项
|
|
@@ -339,13 +352,15 @@ var PisellTabbar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
339
352
|
return renderLevelNNormalCard(cardProps, 'level3');
|
|
340
353
|
},
|
|
341
354
|
panelContainer: function panelContainer() {
|
|
342
|
-
|
|
343
|
-
return document.querySelector(selector);
|
|
355
|
+
return getBottomSlot(level3TabbarId);
|
|
344
356
|
}
|
|
345
357
|
}));
|
|
346
358
|
};
|
|
347
359
|
return /*#__PURE__*/React.createElement(SuperTabs, {
|
|
348
|
-
id:
|
|
360
|
+
id: level3TabbarId,
|
|
361
|
+
slotBottomRef: function slotBottomRef(element) {
|
|
362
|
+
return registerBottomSlot(level3TabbarId, element);
|
|
363
|
+
},
|
|
349
364
|
tabItemStyle: {},
|
|
350
365
|
isControlled: true,
|
|
351
366
|
dataSource: _dataSource2,
|
|
@@ -376,7 +391,7 @@ var PisellTabbar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
376
391
|
scrollViewProps: level3ScrollViewProps,
|
|
377
392
|
renderItem: renderLevel3Item
|
|
378
393
|
});
|
|
379
|
-
}, [activeKey, maxLevel, getActiveKey, handleLevel3Change, level3Expand, level3ScrollViewProps, toggleExpand, getLevelConfig, renderLevelNCard, renderLevelNNormalCard]);
|
|
394
|
+
}, [activeKey, maxLevel, getActiveKey, handleLevel3Change, level3Expand, level3ScrollViewProps, toggleExpand, getLevelConfig, getBottomSlot, registerBottomSlot, renderLevelNCard, renderLevelNNormalCard]);
|
|
380
395
|
|
|
381
396
|
/**
|
|
382
397
|
* 渲染二级 Tabbar
|
|
@@ -388,6 +403,7 @@ var PisellTabbar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
388
403
|
_dataSource = addDataSourceItemsByKey(_dataSource, LEVEL_ADD_ITEMS.level2);
|
|
389
404
|
}
|
|
390
405
|
var level2Config = getLevelConfig('level2');
|
|
406
|
+
var level2TabbarId = "".concat(tabbarIdRef.current, "-").concat(panelProps.dataSource.id);
|
|
391
407
|
|
|
392
408
|
/**
|
|
393
409
|
* 渲染二级 Tab 项
|
|
@@ -415,13 +431,15 @@ var PisellTabbar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
415
431
|
return null;
|
|
416
432
|
},
|
|
417
433
|
panelContainer: function panelContainer() {
|
|
418
|
-
|
|
419
|
-
return document.querySelector(selector);
|
|
434
|
+
return getBottomSlot(level2TabbarId);
|
|
420
435
|
}
|
|
421
436
|
}));
|
|
422
437
|
};
|
|
423
438
|
return /*#__PURE__*/React.createElement(SuperTabs, {
|
|
424
|
-
id:
|
|
439
|
+
id: level2TabbarId,
|
|
440
|
+
slotBottomRef: function slotBottomRef(element) {
|
|
441
|
+
return registerBottomSlot(level2TabbarId, element);
|
|
442
|
+
},
|
|
425
443
|
tabItemStyle: {},
|
|
426
444
|
dataSource: _dataSource,
|
|
427
445
|
value: level2Value,
|
|
@@ -452,7 +470,7 @@ var PisellTabbar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
452
470
|
scrollViewProps: level2ScrollViewProps,
|
|
453
471
|
renderItem: renderLevel2Item
|
|
454
472
|
});
|
|
455
|
-
}, [activeKey, maxLevel, getActiveKey, handleLevel2Change, level2Expand, level2ScrollViewProps, toggleExpand, getLevelConfig, renderLevelNCard, renderLevelNNormalCard, renderLevel3]);
|
|
473
|
+
}, [activeKey, maxLevel, getActiveKey, handleLevel2Change, level2Expand, level2ScrollViewProps, toggleExpand, getLevelConfig, getBottomSlot, registerBottomSlot, renderLevelNCard, renderLevelNNormalCard, renderLevel3]);
|
|
456
474
|
var renderExpand = useCallback(function (itemProps, level) {
|
|
457
475
|
return /*#__PURE__*/React.createElement(PisellCards.MultilevelCard, _extends({}, itemProps, {
|
|
458
476
|
card: function card(cardProps) {
|
|
@@ -557,8 +575,7 @@ var PisellTabbar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
557
575
|
return null;
|
|
558
576
|
},
|
|
559
577
|
panelContainer: function panelContainer() {
|
|
560
|
-
|
|
561
|
-
return document.querySelector(selector);
|
|
578
|
+
return getBottomSlot(tabbarIdRef.current);
|
|
562
579
|
}
|
|
563
580
|
}));
|
|
564
581
|
});
|
|
@@ -584,6 +601,9 @@ var PisellTabbar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
584
601
|
}, /*#__PURE__*/React.createElement(SuperTabs, {
|
|
585
602
|
isControlled: true,
|
|
586
603
|
id: tabbarIdRef.current,
|
|
604
|
+
slotBottomRef: function slotBottomRef(element) {
|
|
605
|
+
return registerBottomSlot(tabbarIdRef.current, element);
|
|
606
|
+
},
|
|
587
607
|
tabItemStyle: {},
|
|
588
608
|
dataSource: level1DataSource,
|
|
589
609
|
value: level1Value,
|
|
@@ -601,7 +621,7 @@ var PisellTabbar = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
601
621
|
scrollViewProps: level1ScrollViewProps,
|
|
602
622
|
renderItem: renderLevel1Item
|
|
603
623
|
})) : null;
|
|
604
|
-
}, [className, style, level1DataSource, activeKey, expand, maxLevel, level1Value, handleLevel1Change, level1Config, level1Expand, level1ScrollViewProps, renderLevel1Item]);
|
|
624
|
+
}, [className, style, level1DataSource, activeKey, expand, maxLevel, level1Value, handleLevel1Change, level1Config, level1Expand, level1ScrollViewProps, registerBottomSlot, renderLevel1Item]);
|
|
605
625
|
return tabbarDom;
|
|
606
626
|
});
|
|
607
627
|
PisellTabbar.displayName = 'PisellTabbar';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean |
|
|
22
|
+
title: string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean |
|
|
31
|
+
subTitle: string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -54,7 +54,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
54
54
|
width: number;
|
|
55
55
|
align: "center" | "left" | "right";
|
|
56
56
|
fixed: false | "left" | "right";
|
|
57
|
-
type: "
|
|
57
|
+
type: "link" | "button";
|
|
58
58
|
items: OperationItem[];
|
|
59
59
|
} | undefined;
|
|
60
60
|
operationContent?: {
|
|
@@ -72,7 +72,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
72
72
|
useCustomAction: boolean;
|
|
73
73
|
actionType: string;
|
|
74
74
|
openMode: "modal" | "drawer";
|
|
75
|
-
openContentSize: "small" | "
|
|
75
|
+
openContentSize: "small" | "large" | "middle";
|
|
76
76
|
openTitle: string;
|
|
77
77
|
key: string;
|
|
78
78
|
} | undefined;
|
|
@@ -80,7 +80,16 @@ declare const formFieldMap: {
|
|
|
80
80
|
extraParams?: Record<string, any> | undefined;
|
|
81
81
|
}) => import("react").JSX.Element;
|
|
82
82
|
};
|
|
83
|
-
declare const getFieldComponent: (fieldComponent: string) =>
|
|
83
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | ((props: import("./Tabs/type").TabsProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
84
|
+
options?: any;
|
|
85
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
86
|
+
labelField: string;
|
|
87
|
+
valueField: string;
|
|
88
|
+
extraParams?: Record<string, any> | undefined;
|
|
89
|
+
} & {
|
|
90
|
+
dataSource?: any;
|
|
91
|
+
extraParams?: Record<string, any> | undefined;
|
|
92
|
+
}) => import("react").JSX.Element) | (import("react").FC<{}> & {
|
|
84
93
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
85
94
|
} & {
|
|
86
95
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -117,7 +126,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
117
126
|
} & {
|
|
118
127
|
dataSource?: any;
|
|
119
128
|
extraParams?: Record<string, any> | undefined;
|
|
120
|
-
}) => import("react").JSX.Element) | import("react").FC<
|
|
129
|
+
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
121
130
|
onChange: (value: string) => void;
|
|
122
131
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | ((props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
123
132
|
options?: any;
|
|
@@ -128,14 +137,5 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
128
137
|
} & {
|
|
129
138
|
dataSource?: any;
|
|
130
139
|
extraParams?: Record<string, any> | undefined;
|
|
131
|
-
}) => import("react").JSX.Element) | ((props: import("./Tabs/type").TabsProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
132
|
-
options?: any;
|
|
133
|
-
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
134
|
-
labelField: string;
|
|
135
|
-
valueField: string;
|
|
136
|
-
extraParams?: Record<string, any> | undefined;
|
|
137
|
-
} & {
|
|
138
|
-
dataSource?: any;
|
|
139
|
-
extraParams?: Record<string, any> | undefined;
|
|
140
140
|
}) => import("react").JSX.Element);
|
|
141
141
|
export { getFieldComponent, formFieldMap };
|
|
@@ -2,7 +2,7 @@ export declare type IconGroup = 'outlined' | 'filled' | 'two-tone' | 'iconfont';
|
|
|
2
2
|
export declare function get(obj: any, path: string, defaultValue?: any): any;
|
|
3
3
|
export declare function getAntdIconList(): ({
|
|
4
4
|
name: any;
|
|
5
|
-
group: "
|
|
5
|
+
group: "outlined" | "filled" | "two-tone";
|
|
6
6
|
icon: any;
|
|
7
7
|
} | null)[];
|
|
8
8
|
interface IconItem {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type CalendarBookingSegmentInput } from './bookingCalendarDateUtils';
|
|
2
2
|
export declare function getDrawerStatusTheme(item: CalendarBookingSegmentInput, dateKey: string): "bg-red-700/88 border-b-4 border-red-300/55" | "bg-zinc-700/88 border-b-4 border-zinc-400/45" | "bg-zinc-700/88 border-b-4 border-red-400/75" | "bg-violet-700/92 border-b-4 border-amber-400/95" | "bg-violet-700/92 border-b-4 border-zinc-300/45" | "bg-violet-700/92 border-b-4 border-violet-300/30";
|
|
3
3
|
export declare function paymentTagClass(label: string, isLight?: boolean): "theme-success-chip border" | "bg-emerald-500 text-white" | "theme-warning-chip border" | "bg-amber-500 text-white" | "theme-info-chip border" | "bg-sky-500 text-white" | "theme-danger-chip border" | "bg-red-500 text-white";
|
|
4
|
-
export declare function fulfillmentTagClass(label: string, isLight?: boolean): "theme-success-chip border" | "theme-warning-chip border" | "bg-amber-500 text-white" | "theme-info-chip border" | "theme-danger-chip border" | "bg-emerald-600 text-white" | "bg-cyan-500 text-white" | "bg-red-600 text-white" | "border border-[var(--border-strong)] bg-[var(--bg-input)] theme-text-soft" | "bg-zinc-600 text-white" | "border border-[var(--brand-light)] bg-[var(--brand-surface)] theme-brand-text"
|
|
4
|
+
export declare function fulfillmentTagClass(label: string, isLight?: boolean): "bg-violet-600 text-white" | "theme-success-chip border" | "theme-warning-chip border" | "bg-amber-500 text-white" | "theme-info-chip border" | "theme-danger-chip border" | "bg-emerald-600 text-white" | "bg-cyan-500 text-white" | "bg-red-600 text-white" | "border border-[var(--border-strong)] bg-[var(--bg-input)] theme-text-soft" | "bg-zinc-600 text-white" | "border border-[var(--brand-light)] bg-[var(--brand-surface)] theme-brand-text";
|
|
5
5
|
export declare function getBookingStateClasses(item: CalendarBookingSegmentInput, dateKey: string): "bg-zinc-700/55 border border-zinc-500/70 text-zinc-100 grayscale-[0.2]" | "bg-zinc-700/55 border border-red-500/70 text-zinc-200 grayscale-[0.15]" | "bg-violet-700/90 border border-amber-400/80 text-violet-50" | "bg-red-700/70 text-red-100" | "bg-violet-700/90 text-violet-50";
|
|
6
6
|
/**
|
|
7
7
|
* 月 / 周紧凑格:不按签到/取消/迟到等状态变色,仅区分 booking(默认紫)与 block(红)。
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
155
155
|
sort?: SortType | undefined;
|
|
156
156
|
mode: "" | "localStorage" | "remote";
|
|
157
157
|
currentViewMode: ModeType;
|
|
158
|
-
}) => ("filters" | "
|
|
158
|
+
}) => ("filters" | "view_mode" | "filter_setting" | "group_by" | "order_by" | "column_setting" | "gallery_setting")[];
|
|
159
159
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
160
160
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
161
161
|
export {};
|
package/es/utils/index.d.ts
CHANGED
package/es/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => any;
|
|
@@ -9,7 +9,7 @@ export declare const COMPONENT_PREFIX = "pisell-group-view";
|
|
|
9
9
|
* @returns 字段名数组;自定义函数分组时返回空数组
|
|
10
10
|
* @description 用于透传给 `renderItem`,让调用方据此省略头部已展示的字段
|
|
11
11
|
*/
|
|
12
|
-
export declare const getGroupFieldNames: <T>(groupBy: string | string[] | ((item: T, index: number) =>
|
|
12
|
+
export declare const getGroupFieldNames: <T>(groupBy: string | string[] | ((item: T, index: number) => any)) => string[];
|
|
13
13
|
/**
|
|
14
14
|
* 获取主体内单条数据的稳定 key
|
|
15
15
|
* @param item - 数据项
|
|
@@ -63,6 +63,7 @@ var PisellSuperTabs = (props, ref) => {
|
|
|
63
63
|
slotRight,
|
|
64
64
|
slotTop,
|
|
65
65
|
slotBottom,
|
|
66
|
+
slotBottomRef,
|
|
66
67
|
tabItemClassName,
|
|
67
68
|
tabItemStyle,
|
|
68
69
|
slotLeftClassName,
|
|
@@ -248,6 +249,7 @@ var PisellSuperTabs = (props, ref) => {
|
|
|
248
249
|
/* @__PURE__ */ import_react.default.createElement(
|
|
249
250
|
"div",
|
|
250
251
|
{
|
|
252
|
+
ref: slotBottomRef,
|
|
251
253
|
className: (0, import_classnames.default)(
|
|
252
254
|
"pisell-super-tabs-slot-bottom-" + id,
|
|
253
255
|
slotBottomClassName
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties, ReactNode } from 'react';
|
|
1
|
+
import { CSSProperties, ReactNode, Ref } from 'react';
|
|
2
2
|
import type { PisellBasicGridProps } from '../PisellBasicGrid/types';
|
|
3
3
|
import type { PisellScrollViewProps } from '../PisellScrollView/types';
|
|
4
4
|
import type { PisellBasicCardProps } from '../PisellCards/types';
|
|
@@ -166,6 +166,8 @@ export interface PisellSuperTabsProps<T = any> {
|
|
|
166
166
|
* 底部插槽
|
|
167
167
|
*/
|
|
168
168
|
slotBottom?: ReactNode;
|
|
169
|
+
/** 底部插槽容器引用 */
|
|
170
|
+
slotBottomRef?: Ref<HTMLDivElement>;
|
|
169
171
|
slotBottomClassName?: string;
|
|
170
172
|
slotBottomStyle?: CSSProperties;
|
|
171
173
|
__designMode?: boolean;
|
|
@@ -75,6 +75,21 @@ var PisellTabbar = (0, import_react.forwardRef)(
|
|
|
75
75
|
} = props;
|
|
76
76
|
const containerRef = (0, import_react.useRef)(null);
|
|
77
77
|
const tabbarIdRef = (0, import_react.useRef)(createTabbarId());
|
|
78
|
+
const bottomSlotRefs = (0, import_react.useRef)(/* @__PURE__ */ new Map());
|
|
79
|
+
const registerBottomSlot = (0, import_react.useCallback)(
|
|
80
|
+
(id, element) => {
|
|
81
|
+
if (element) {
|
|
82
|
+
bottomSlotRefs.current.set(id, element);
|
|
83
|
+
} else {
|
|
84
|
+
bottomSlotRefs.current.delete(id);
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
[]
|
|
88
|
+
);
|
|
89
|
+
const getBottomSlot = (0, import_react.useCallback)(
|
|
90
|
+
(id) => bottomSlotRefs.current.get(id) ?? null,
|
|
91
|
+
[]
|
|
92
|
+
);
|
|
78
93
|
const searchRef = (0, import_react.useRef)(null);
|
|
79
94
|
const {
|
|
80
95
|
activeKey,
|
|
@@ -269,6 +284,7 @@ var PisellTabbar = (0, import_react.forwardRef)(
|
|
|
269
284
|
);
|
|
270
285
|
}
|
|
271
286
|
const level3Config = getLevelConfig("level3");
|
|
287
|
+
const level3TabbarId = `${tabbarIdRef.current}-${panelProps2.dataSource.id}`;
|
|
272
288
|
const renderLevel3Item = (itemProps) => {
|
|
273
289
|
const { dataSource: itemData } = itemProps;
|
|
274
290
|
if (itemData == null ? void 0 : itemData.customClick) {
|
|
@@ -281,17 +297,15 @@ var PisellTabbar = (0, import_react.forwardRef)(
|
|
|
281
297
|
{
|
|
282
298
|
...itemProps,
|
|
283
299
|
card: (cardProps) => renderLevelNNormalCard(cardProps, "level3"),
|
|
284
|
-
panelContainer: () =>
|
|
285
|
-
const selector = `.pisell-super-tabs-slot-bottom-${tabbarIdRef.current}-${panelProps2.dataSource.id}`;
|
|
286
|
-
return document.querySelector(selector);
|
|
287
|
-
}
|
|
300
|
+
panelContainer: () => getBottomSlot(level3TabbarId)
|
|
288
301
|
}
|
|
289
302
|
);
|
|
290
303
|
};
|
|
291
304
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
292
305
|
import_PisellSuperTabs.default,
|
|
293
306
|
{
|
|
294
|
-
id:
|
|
307
|
+
id: level3TabbarId,
|
|
308
|
+
slotBottomRef: (element) => registerBottomSlot(level3TabbarId, element),
|
|
295
309
|
tabItemStyle: {},
|
|
296
310
|
isControlled: true,
|
|
297
311
|
dataSource: _dataSource2,
|
|
@@ -328,6 +342,8 @@ var PisellTabbar = (0, import_react.forwardRef)(
|
|
|
328
342
|
level3ScrollViewProps,
|
|
329
343
|
toggleExpand,
|
|
330
344
|
getLevelConfig,
|
|
345
|
+
getBottomSlot,
|
|
346
|
+
registerBottomSlot,
|
|
331
347
|
renderLevelNCard,
|
|
332
348
|
renderLevelNNormalCard
|
|
333
349
|
]
|
|
@@ -343,6 +359,7 @@ var PisellTabbar = (0, import_react.forwardRef)(
|
|
|
343
359
|
);
|
|
344
360
|
}
|
|
345
361
|
const level2Config = getLevelConfig("level2");
|
|
362
|
+
const level2TabbarId = `${tabbarIdRef.current}-${panelProps.dataSource.id}`;
|
|
346
363
|
const renderLevel2Item = (itemProps) => {
|
|
347
364
|
const { dataSource: itemData } = itemProps;
|
|
348
365
|
if (itemData == null ? void 0 : itemData.customClick) {
|
|
@@ -362,17 +379,15 @@ var PisellTabbar = (0, import_react.forwardRef)(
|
|
|
362
379
|
}
|
|
363
380
|
return null;
|
|
364
381
|
},
|
|
365
|
-
panelContainer: () =>
|
|
366
|
-
const selector = `.pisell-super-tabs-slot-bottom-${tabbarIdRef.current}-${panelProps.dataSource.id}`;
|
|
367
|
-
return document.querySelector(selector);
|
|
368
|
-
}
|
|
382
|
+
panelContainer: () => getBottomSlot(level2TabbarId)
|
|
369
383
|
}
|
|
370
384
|
);
|
|
371
385
|
};
|
|
372
386
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
373
387
|
import_PisellSuperTabs.default,
|
|
374
388
|
{
|
|
375
|
-
id:
|
|
389
|
+
id: level2TabbarId,
|
|
390
|
+
slotBottomRef: (element) => registerBottomSlot(level2TabbarId, element),
|
|
376
391
|
tabItemStyle: {},
|
|
377
392
|
dataSource: _dataSource,
|
|
378
393
|
value: level2Value,
|
|
@@ -409,6 +424,8 @@ var PisellTabbar = (0, import_react.forwardRef)(
|
|
|
409
424
|
level2ScrollViewProps,
|
|
410
425
|
toggleExpand,
|
|
411
426
|
getLevelConfig,
|
|
427
|
+
getBottomSlot,
|
|
428
|
+
registerBottomSlot,
|
|
412
429
|
renderLevelNCard,
|
|
413
430
|
renderLevelNNormalCard,
|
|
414
431
|
renderLevel3
|
|
@@ -540,10 +557,7 @@ var PisellTabbar = (0, import_react.forwardRef)(
|
|
|
540
557
|
}
|
|
541
558
|
return null;
|
|
542
559
|
},
|
|
543
|
-
panelContainer: () =>
|
|
544
|
-
const selector = `.pisell-super-tabs-slot-bottom-${tabbarIdRef.current}`;
|
|
545
|
-
return document.querySelector(selector);
|
|
546
|
-
}
|
|
560
|
+
panelContainer: () => getBottomSlot(tabbarIdRef.current)
|
|
547
561
|
}
|
|
548
562
|
);
|
|
549
563
|
}
|
|
@@ -570,6 +584,7 @@ var PisellTabbar = (0, import_react.forwardRef)(
|
|
|
570
584
|
{
|
|
571
585
|
isControlled: true,
|
|
572
586
|
id: tabbarIdRef.current,
|
|
587
|
+
slotBottomRef: (element) => registerBottomSlot(tabbarIdRef.current, element),
|
|
573
588
|
tabItemStyle: {},
|
|
574
589
|
dataSource: level1DataSource,
|
|
575
590
|
value: level1Value,
|
|
@@ -601,6 +616,7 @@ var PisellTabbar = (0, import_react.forwardRef)(
|
|
|
601
616
|
level1Config,
|
|
602
617
|
level1Expand,
|
|
603
618
|
level1ScrollViewProps,
|
|
619
|
+
registerBottomSlot,
|
|
604
620
|
renderLevel1Item
|
|
605
621
|
]
|
|
606
622
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|
|
@@ -19,7 +19,7 @@ interface UseTablePropsProps {
|
|
|
19
19
|
*/
|
|
20
20
|
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
21
21
|
currentComponentId: any;
|
|
22
|
-
title: number | boolean |
|
|
22
|
+
title: string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
23
23
|
pagination: {
|
|
24
24
|
total: number;
|
|
25
25
|
current: number;
|
|
@@ -28,7 +28,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
28
28
|
showSizeChanger: boolean;
|
|
29
29
|
};
|
|
30
30
|
columns: import("./useColumns").Column[];
|
|
31
|
-
subTitle: number | boolean |
|
|
31
|
+
subTitle: string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | (() => React.ReactNode) | null | undefined;
|
|
32
32
|
buttons: any[] | null;
|
|
33
33
|
filter: {
|
|
34
34
|
dom: any;
|
|
@@ -54,7 +54,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
54
54
|
width: number;
|
|
55
55
|
align: "center" | "left" | "right";
|
|
56
56
|
fixed: false | "left" | "right";
|
|
57
|
-
type: "
|
|
57
|
+
type: "link" | "button";
|
|
58
58
|
items: OperationItem[];
|
|
59
59
|
} | undefined;
|
|
60
60
|
operationContent?: {
|
|
@@ -72,7 +72,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
|
|
|
72
72
|
useCustomAction: boolean;
|
|
73
73
|
actionType: string;
|
|
74
74
|
openMode: "modal" | "drawer";
|
|
75
|
-
openContentSize: "small" | "
|
|
75
|
+
openContentSize: "small" | "large" | "middle";
|
|
76
76
|
openTitle: string;
|
|
77
77
|
key: string;
|
|
78
78
|
} | undefined;
|
|
@@ -80,7 +80,16 @@ declare const formFieldMap: {
|
|
|
80
80
|
extraParams?: Record<string, any> | undefined;
|
|
81
81
|
}) => import("react").JSX.Element;
|
|
82
82
|
};
|
|
83
|
-
declare const getFieldComponent: (fieldComponent: string) =>
|
|
83
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | ((props: import("./Tabs/type").TabsProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
84
|
+
options?: any;
|
|
85
|
+
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
86
|
+
labelField: string;
|
|
87
|
+
valueField: string;
|
|
88
|
+
extraParams?: Record<string, any> | undefined;
|
|
89
|
+
} & {
|
|
90
|
+
dataSource?: any;
|
|
91
|
+
extraParams?: Record<string, any> | undefined;
|
|
92
|
+
}) => import("react").JSX.Element) | (import("react").FC<{}> & {
|
|
84
93
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
85
94
|
} & {
|
|
86
95
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -117,7 +126,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
117
126
|
} & {
|
|
118
127
|
dataSource?: any;
|
|
119
128
|
extraParams?: Record<string, any> | undefined;
|
|
120
|
-
}) => import("react").JSX.Element) | import("react").FC<
|
|
129
|
+
}) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
121
130
|
onChange: (value: string) => void;
|
|
122
131
|
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | ((props: import("./RecordListWrapper/type").RecordListWrapperProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
123
132
|
options?: any;
|
|
@@ -128,14 +137,5 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
|
|
|
128
137
|
} & {
|
|
129
138
|
dataSource?: any;
|
|
130
139
|
extraParams?: Record<string, any> | undefined;
|
|
131
|
-
}) => import("react").JSX.Element) | ((props: import("./Tabs/type").TabsProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
|
|
132
|
-
options?: any;
|
|
133
|
-
optionSourceType?: "default" | "custom" | "api" | undefined;
|
|
134
|
-
labelField: string;
|
|
135
|
-
valueField: string;
|
|
136
|
-
extraParams?: Record<string, any> | undefined;
|
|
137
|
-
} & {
|
|
138
|
-
dataSource?: any;
|
|
139
|
-
extraParams?: Record<string, any> | undefined;
|
|
140
140
|
}) => import("react").JSX.Element);
|
|
141
141
|
export { getFieldComponent, formFieldMap };
|
|
@@ -2,7 +2,7 @@ export declare type IconGroup = 'outlined' | 'filled' | 'two-tone' | 'iconfont';
|
|
|
2
2
|
export declare function get(obj: any, path: string, defaultValue?: any): any;
|
|
3
3
|
export declare function getAntdIconList(): ({
|
|
4
4
|
name: any;
|
|
5
|
-
group: "
|
|
5
|
+
group: "outlined" | "filled" | "two-tone";
|
|
6
6
|
icon: any;
|
|
7
7
|
} | null)[];
|
|
8
8
|
interface IconItem {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
declare const useDataSourceKey: () => {
|
|
2
|
-
dataSourceKey: string | undefined;
|
|
3
|
-
dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
|
|
2
|
+
dataSourceKey: string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined;
|
|
3
|
+
dataSourceKeyRef: import("react").MutableRefObject<string | import("../../dataSourceComponents/provider/dataSource/DataSourceContext").DataSourceType | undefined>;
|
|
4
4
|
};
|
|
5
5
|
export default useDataSourceKey;
|