@pisell/materials 6.12.18 → 6.12.20
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +5 -5
- package/build/lowcode/view.js +5 -5
- package/es/components/PisellScrollView/components/Actions/index.js +2 -1
- package/es/components/PisellScrollView/hooks/useScrollState.js +3 -1
- package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
- package/es/components/PisellSuperTabs/PisellSuperTabs.js +39 -8
- package/es/components/PisellTabbar/index.d.ts +10 -0
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +16 -0
- package/es/components/PisellTabbar/template/Template1/index.d.ts +7 -0
- package/es/components/PisellTabbar/types.d.ts +123 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +48 -0
- package/es/components/pisellFind/index.d.ts +69 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +94 -0
- package/es/components/pisellLookup/PisellLookup.d.ts +4 -0
- package/es/components/pisellLookup/PisellLookup.js +4 -0
- package/es/components/pisellLookup/components/LookupResultHost.d.ts +7 -0
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
- package/es/components/pisellLookup/components/LookupTrigger.js +5 -2
- package/es/components/pisellLookup/types.d.ts +806 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +9 -0
- package/es/components/pisellRecordBoard/index.d.ts +55 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +43 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +9 -0
- package/es/components/productCard/cartSkuCard/components/Gift/index.d.ts +5 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +5 -3
- package/es/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +15 -0
- package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +2 -1
- package/es/components/productCard/cartSkuCard/components/packages/index.js +2 -0
- package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +2 -1
- package/es/components/productCard/cartSkuCard/components/sales/index.js +3 -1
- package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
- package/es/components/productCard/cartSkuCard/index.d.ts +16 -0
- package/es/components/productCard/cartSkuCard/index.js +11 -3
- package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +3 -0
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +23 -0
- package/es/components/productCard/lineItem/BookingLineItem.js +5 -1
- package/es/components/productCard/lineItem/index.d.ts +72 -0
- package/es/components/productCard/lineItem/index.js +2 -0
- package/es/components/productCard/types.d.ts +99 -0
- package/es/components/table/hooks/useTableSetting.d.ts +21 -0
- package/es/hooks/useInitLocalesOnce.d.ts +4 -0
- package/es/hooks/useTranslationOriginal.d.ts +4 -0
- package/es/index.d.ts +271 -0
- package/es/locales/ja.d.ts +534 -0
- package/es/locales/pt.d.ts +534 -0
- package/es/locales/zh-CN.d.ts +561 -0
- package/es/locales/zh-TW.d.ts +561 -0
- package/lib/components/PisellScrollView/components/Actions/index.js +2 -1
- package/lib/components/PisellScrollView/hooks/useScrollState.js +3 -1
- package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
- package/lib/components/PisellSuperTabs/PisellSuperTabs.js +37 -8
- package/lib/components/PisellTabbar/index.d.ts +10 -0
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.d.ts +16 -0
- package/lib/components/PisellTabbar/template/Template1/index.d.ts +7 -0
- package/lib/components/PisellTabbar/types.d.ts +123 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +48 -0
- package/lib/components/pisellFind/index.d.ts +69 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +94 -0
- package/lib/components/pisellLookup/PisellLookup.d.ts +4 -0
- package/lib/components/pisellLookup/PisellLookup.js +3 -0
- package/lib/components/pisellLookup/components/LookupResultHost.d.ts +7 -0
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
- package/lib/components/pisellLookup/components/LookupTrigger.js +4 -2
- package/lib/components/pisellLookup/types.d.ts +806 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +9 -0
- package/lib/components/pisellRecordBoard/index.d.ts +55 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +43 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +9 -0
- package/lib/components/productCard/cartSkuCard/components/Gift/index.d.ts +5 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -3
- package/lib/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +15 -0
- package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +2 -1
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +7 -1
- package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +2 -1
- package/lib/components/productCard/cartSkuCard/components/sales/index.js +7 -1
- package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
- package/lib/components/productCard/cartSkuCard/index.d.ts +16 -0
- package/lib/components/productCard/cartSkuCard/index.js +15 -2
- package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +3 -0
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +23 -0
- package/lib/components/productCard/lineItem/BookingLineItem.js +3 -0
- package/lib/components/productCard/lineItem/index.d.ts +72 -0
- package/lib/components/productCard/lineItem/index.js +2 -0
- package/lib/components/productCard/types.d.ts +99 -0
- package/lib/components/table/hooks/useTableSetting.d.ts +21 -0
- package/lib/hooks/useInitLocalesOnce.d.ts +4 -0
- package/lib/hooks/useTranslationOriginal.d.ts +4 -0
- package/lib/index.d.ts +271 -0
- package/lib/locales/ja.d.ts +534 -0
- package/lib/locales/pt.d.ts +534 -0
- package/lib/locales/zh-CN.d.ts +561 -0
- package/lib/locales/zh-TW.d.ts +561 -0
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { RecordBoardProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* RecordBoard 容器:提供统一的 data / pagination / search 上下文。
|
|
5
|
+
* 打散 props:列表/分页/搜索/多选、grid/toolBar/…;可选根级 **floorMap**(兼容透传)。
|
|
6
|
+
* 平面图推荐在 ShellFrame 内使用 **PisellRecordBoard.FloorMap** 声明,与根级 `floorMap` 合并(子优先)。
|
|
7
|
+
*/
|
|
8
|
+
declare const PisellRecordBoard: React.FC<RecordBoardProps>;
|
|
9
|
+
export default PisellRecordBoard;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import GridLayout from './layouts/GridLayout';
|
|
3
|
+
import CardLayout from './layouts/CardLayout';
|
|
4
|
+
import RecordBoardShellFrame, { RecordBoardToolBar, RecordBoardBatchActionBar, RecordBoardPagination, RecordBoardSearch, RecordBoardFloorMap, RecordBoardCalendar, RecordBoardResourceWall } from './shellFrame';
|
|
5
|
+
import RecordBoardGridView from './layouts/GridLayout/Grid';
|
|
6
|
+
import RecordBoardCardList from './layouts/CardLayout/CardList';
|
|
7
|
+
import { useRecordBoardContext } from './hooks/useRecordBoardContext';
|
|
8
|
+
import type { RecordBoardProps } from './types';
|
|
9
|
+
/** RecordBoard 复合组件类型 */
|
|
10
|
+
interface PisellRecordBoardType extends React.FC<RecordBoardProps> {
|
|
11
|
+
/** Shell Frame:对 Layout 的扩展,提供 ToolBar + BatchActionBar + children(Layout) */
|
|
12
|
+
ShellFrame: typeof RecordBoardShellFrame;
|
|
13
|
+
/** Grid 布局:仅内容区(表格 + 分页),需配合 ShellFrame 使用 */
|
|
14
|
+
GridLayout: typeof GridLayout;
|
|
15
|
+
/** 卡片布局:仅内容区(卡片列表 + 分页),需配合 ShellFrame 使用 */
|
|
16
|
+
CardLayout: typeof CardLayout;
|
|
17
|
+
/**
|
|
18
|
+
* 平面图槽位:仅在 ShellFrame 内声明,无 DOM; props 与 PisellFloorMapLayout 对齐。
|
|
19
|
+
* 与 GridLayout 同时存在时出现「表格 / 平面图」切换。
|
|
20
|
+
*/
|
|
21
|
+
FloorMap: typeof RecordBoardFloorMap;
|
|
22
|
+
/**
|
|
23
|
+
* 日历槽位:仅在 ShellFrame 内声明,无 DOM;与 GridLayout / FloorMap 并存时出现「表格 / 平面图 / 日历」切换。
|
|
24
|
+
*/
|
|
25
|
+
Calendar: typeof RecordBoardCalendar;
|
|
26
|
+
/**
|
|
27
|
+
* 大屏资源墙槽位:仅在 ShellFrame 内声明,无 DOM;与其它主区并存时出现视图切换。
|
|
28
|
+
*/
|
|
29
|
+
ResourceWall: typeof RecordBoardResourceWall;
|
|
30
|
+
/** 单独使用:搜索槽(PisellFind,绑定 searchParams.keyword / onSearch) */
|
|
31
|
+
Search: typeof RecordBoardSearch;
|
|
32
|
+
/** 单独使用:工具栏(PisellToolBar,含搜索/导出,可透传 topLeft/topRight 等) */
|
|
33
|
+
ToolBar: typeof RecordBoardToolBar;
|
|
34
|
+
/** 单独使用:分页槽 */
|
|
35
|
+
Pagination: typeof RecordBoardPagination;
|
|
36
|
+
/** 单独使用:Grid 视图(表格) */
|
|
37
|
+
Grid: typeof RecordBoardGridView;
|
|
38
|
+
/** 单独使用:卡片列表视图 */
|
|
39
|
+
CardList: typeof RecordBoardCardList;
|
|
40
|
+
/** 多选操作栏(基于 PisellBatchActionBar,有选中项时展示) */
|
|
41
|
+
BatchActionBar: typeof RecordBoardBatchActionBar;
|
|
42
|
+
/** 消费 RecordBoard 上下文 */
|
|
43
|
+
useRecordBoardContext: typeof useRecordBoardContext;
|
|
44
|
+
}
|
|
45
|
+
declare const PisellRecordBoard: PisellRecordBoardType;
|
|
46
|
+
export default PisellRecordBoard;
|
|
47
|
+
export type { RecordBoardProps, RecordBoardLayoutType, RecordBoardLayoutVariant, RecordBoardContextValue, RecordBoardChildComponentProps, RecordBoardGridProps, RecordBoardColumnType, RecordBoardFieldType, RecordBoardColumnFilterConfig, RecordBoardOptionItem, RecordBoardGetOptions, RecordBoardBodyView, RecordBoardFloorMapProps, RecordBoardCalendarProps, RecordBoardCalendarBlockedTimePayload, RecordBoardCalendarResource, RecordBoardCalendarBookingLike, RecordBoardCalendarDayOverlayBooking, RecordBoardCalendarTimelineHeaderGroup, RecordBoardCalendarTimelineHeaderRenderContext, RecordBoardCalendarResourceRenderArgs, RecordBoardCalendarBookingRenderArgs, RecordBoardBookingMoveDraft, RecordBoardBlockedTimeMergedRange, RecordBoardBlockedTimePanelPayload, RecordBoardCreateBookingDayGroup, RecordBoardCreateBookingFromSelectionPayload, RecordBoardCalendarSelectedFreeSlot, RecordBoardToolBarProps, RecordBoardResourceWallProps, RecordBoardResourceWallCardModel, RecordBoardResourceWallLayoutPersist, } from './types';
|
|
48
|
+
export { DEFAULT_RESOURCE_WALL_LAYOUT_PERSIST } from './types';
|
|
49
|
+
export type { CalendarPersistContextValue } from './shellFrame/Calendar/calendarPersistGuard';
|
|
50
|
+
export type { VenueWallAppearanceTheme, VenueWallStatusToneOverrides, } from './shellFrame/ResourceWall/venueWallUtils';
|
|
51
|
+
export { useRecordBoardContext } from './hooks/useRecordBoardContext';
|
|
52
|
+
export { useRecordBoardShellBodyMeta } from './shellFrame';
|
|
53
|
+
export { DEFAULT_RESOURCE_WALL_FILTER_FIELD_KEY } from './shellFrame/ResourceWall/PisellRecordBoardResourceWallView';
|
|
54
|
+
export { adaptColumnsForPhoneLayout, RECORD_BOARD_PHONE_GRID_CLASS, } from './utils/recordBoardPhoneGrid';
|
|
55
|
+
export type { AdaptColumnsForPhoneLayoutOptions } from './utils/recordBoardPhoneGrid';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BookingCalendar 专用类型(不放入全局 RecordBoard types,避免对外膨胀)。
|
|
3
|
+
*/
|
|
4
|
+
import type { RecordBoardCalendarBookingLike } from '../../types';
|
|
5
|
+
import type { CalendarBookingSegmentInput, SelectedSlotLike } from './utils/bookingCalendarDateUtils';
|
|
6
|
+
import type { Dayjs } from 'dayjs';
|
|
7
|
+
/** 资源视图格子选中:仅记 court + 日 */
|
|
8
|
+
export declare type ResourceCellPick = {
|
|
9
|
+
courtId: string;
|
|
10
|
+
dateKey: string;
|
|
11
|
+
};
|
|
12
|
+
/** 顶栏粒度切换 */
|
|
13
|
+
export declare type CalendarViewMode = 'resource' | 'day' | 'week' | 'month';
|
|
14
|
+
export declare type FreeSlotSelection = SelectedSlotLike & {
|
|
15
|
+
court?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare type OverflowListModalState = {
|
|
18
|
+
scope: string;
|
|
19
|
+
date: string;
|
|
20
|
+
title: string;
|
|
21
|
+
items: CalendarBookingSegmentInput[];
|
|
22
|
+
};
|
|
23
|
+
export declare type OverflowPopoverState = {
|
|
24
|
+
courtId: string;
|
|
25
|
+
date: string;
|
|
26
|
+
items: CalendarBookingSegmentInput[];
|
|
27
|
+
pinned?: boolean;
|
|
28
|
+
};
|
|
29
|
+
export declare type MoveConfirmState = {
|
|
30
|
+
item: RecordBoardCalendarBookingLike;
|
|
31
|
+
targetCourtId: string;
|
|
32
|
+
targetDate: string;
|
|
33
|
+
targetHour: number;
|
|
34
|
+
};
|
|
35
|
+
export declare type MoveDraftState = {
|
|
36
|
+
targetCourtId: string;
|
|
37
|
+
targetDate: string;
|
|
38
|
+
targetHour: number;
|
|
39
|
+
};
|
|
40
|
+
export declare type TransitioningToDayState = {
|
|
41
|
+
source: string;
|
|
42
|
+
};
|
|
43
|
+
export declare type BlockTimeRange = [Dayjs, Dayjs] | null;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type CalendarBookingSegmentInput } from '../utils/bookingCalendarDateUtils';
|
|
3
|
+
export declare type MonthGridOverflowVirtualListProps = {
|
|
4
|
+
items: CalendarBookingSegmentInput[];
|
|
5
|
+
listWidth: number;
|
|
6
|
+
onPickItem: (item: CalendarBookingSegmentInput) => void;
|
|
7
|
+
};
|
|
8
|
+
/** 月/周格「+N」悬停层内的虚拟列表(overflowPopover) */
|
|
9
|
+
export declare function MonthGridOverflowVirtualList({ items, listWidth, onPickItem, }: MonthGridOverflowVirtualListProps): React.JSX.Element | null;
|
|
@@ -13,6 +13,8 @@ import EditButton from "../../../components/Header/EditButton";
|
|
|
13
13
|
import "./index.less";
|
|
14
14
|
var BasicInfo = function BasicInfo(props) {
|
|
15
15
|
var isShowImage = props.isShowImage,
|
|
16
|
+
_props$isShowQuantity = props.isShowQuantityBadge,
|
|
17
|
+
isShowQuantityBadge = _props$isShowQuantity === void 0 ? true : _props$isShowQuantity,
|
|
16
18
|
_props$dataSource = props.dataSource,
|
|
17
19
|
dataSource = _props$dataSource === void 0 ? {} : _props$dataSource,
|
|
18
20
|
style = props.style,
|
|
@@ -121,7 +123,7 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
121
123
|
return /*#__PURE__*/React.createElement("div", {
|
|
122
124
|
className: basicInfoClassName,
|
|
123
125
|
style: style || {}
|
|
124
|
-
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
126
|
+
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
125
127
|
style: {
|
|
126
128
|
width: 20
|
|
127
129
|
}
|
|
@@ -144,7 +146,7 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
144
146
|
return /*#__PURE__*/React.createElement("div", {
|
|
145
147
|
className: basicInfoClassName,
|
|
146
148
|
style: style || {}
|
|
147
|
-
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
148
150
|
style: {
|
|
149
151
|
width: 20
|
|
150
152
|
}
|
|
@@ -165,7 +167,7 @@ var BasicInfo = function BasicInfo(props) {
|
|
|
165
167
|
return /*#__PURE__*/React.createElement("div", {
|
|
166
168
|
className: basicInfoClassName,
|
|
167
169
|
style: style || {}
|
|
168
|
-
}, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
170
|
+
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /*#__PURE__*/React.createElement("div", {
|
|
169
171
|
style: {
|
|
170
172
|
width: 20
|
|
171
173
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { CSSProperties, ReactNode } from 'react';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface InlineActionItem {
|
|
5
|
+
key: string | number;
|
|
6
|
+
text: ReactNode;
|
|
7
|
+
color?: string;
|
|
8
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
9
|
+
style?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
interface InlineActionsProps {
|
|
12
|
+
actions: InlineActionItem[];
|
|
13
|
+
}
|
|
14
|
+
declare const InlineActions: ({ actions }: InlineActionsProps) => React.JSX.Element | null;
|
|
15
|
+
export default InlineActions;
|
|
@@ -2,11 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import './index.less';
|
|
3
3
|
interface IProps {
|
|
4
4
|
isShowImage?: boolean;
|
|
5
|
+
isShowQuantityBadge?: boolean;
|
|
5
6
|
dataSource: {
|
|
6
7
|
bundle?: any[];
|
|
7
8
|
symbol?: string;
|
|
8
9
|
};
|
|
9
10
|
type?: 'a2' | 'a5' | 'a9';
|
|
10
11
|
}
|
|
11
|
-
declare const Packages: ({ isShowImage, dataSource, type }: IProps) => React.JSX.Element | null;
|
|
12
|
+
declare const Packages: ({ isShowImage, isShowQuantityBadge, dataSource, type, }: IProps) => React.JSX.Element | null;
|
|
12
13
|
export default Packages;
|
|
@@ -14,6 +14,7 @@ import AmountFooter from "../../../components/AmountFooter";
|
|
|
14
14
|
import "./index.less";
|
|
15
15
|
var Packages = function Packages(_ref) {
|
|
16
16
|
var isShowImage = _ref.isShowImage,
|
|
17
|
+
isShowQuantityBadge = _ref.isShowQuantityBadge,
|
|
17
18
|
_ref$dataSource = _ref.dataSource,
|
|
18
19
|
dataSource = _ref$dataSource === void 0 ? {} : _ref$dataSource,
|
|
19
20
|
type = _ref.type;
|
|
@@ -51,6 +52,7 @@ var Packages = function Packages(_ref) {
|
|
|
51
52
|
}
|
|
52
53
|
}, /*#__PURE__*/React.createElement(BasicInfo, {
|
|
53
54
|
isShowImage: isShowImage,
|
|
55
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
54
56
|
dataSource: _objectSpread(_objectSpread({}, item), {}, {
|
|
55
57
|
name: item.title,
|
|
56
58
|
image: item.cover,
|
|
@@ -8,6 +8,7 @@ interface IProps {
|
|
|
8
8
|
bundle?: any[];
|
|
9
9
|
};
|
|
10
10
|
isShowImage?: boolean;
|
|
11
|
+
isShowQuantityBadge?: boolean;
|
|
11
12
|
}
|
|
12
|
-
declare const Sales: ({ hideDivider, dataSource, isShowImage }: IProps) => React.JSX.Element | null;
|
|
13
|
+
declare const Sales: ({ hideDivider, dataSource, isShowImage, isShowQuantityBadge, }: IProps) => React.JSX.Element | null;
|
|
13
14
|
export default Sales;
|
|
@@ -14,7 +14,8 @@ import "./index.less";
|
|
|
14
14
|
var Sales = function Sales(_ref) {
|
|
15
15
|
var hideDivider = _ref.hideDivider,
|
|
16
16
|
dataSource = _ref.dataSource,
|
|
17
|
-
isShowImage = _ref.isShowImage
|
|
17
|
+
isShowImage = _ref.isShowImage,
|
|
18
|
+
isShowQuantityBadge = _ref.isShowQuantityBadge;
|
|
18
19
|
var _ref2 = dataSource || {},
|
|
19
20
|
_ref2$relation_produc = _ref2.relation_products,
|
|
20
21
|
relation_products = _ref2$relation_produc === void 0 ? [] : _ref2$relation_produc,
|
|
@@ -44,6 +45,7 @@ var Sales = function Sales(_ref) {
|
|
|
44
45
|
renderItem: function renderItem(item) {
|
|
45
46
|
return /*#__PURE__*/React.createElement(BasicInfo, {
|
|
46
47
|
isShowImage: isShowImage,
|
|
48
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
47
49
|
style: {
|
|
48
50
|
border: '1px solid #D0D5DD',
|
|
49
51
|
borderRadius: 4,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
declare type NativeProps<S extends string = never> = {
|
|
4
|
+
className?: string;
|
|
5
|
+
style?: React.CSSProperties & Partial<Record<S, string>>;
|
|
6
|
+
};
|
|
7
|
+
declare type PropagationEvent = 'click';
|
|
8
|
+
import './index.less';
|
|
9
|
+
declare type SideType = 'left' | 'right';
|
|
10
|
+
export declare type SwipeActionRef = {
|
|
11
|
+
close: () => void;
|
|
12
|
+
show: (side?: SideType) => void;
|
|
13
|
+
};
|
|
14
|
+
declare type ActionColor = 'light' | 'weak' | 'primary' | 'success' | 'warning' | 'danger';
|
|
15
|
+
export declare type Action = {
|
|
16
|
+
key: string | number;
|
|
17
|
+
text: ReactNode;
|
|
18
|
+
color?: ActionColor | string;
|
|
19
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
};
|
|
22
|
+
export declare type SwipeActionProps = {
|
|
23
|
+
rightActions?: Action[];
|
|
24
|
+
leftActions?: Action[];
|
|
25
|
+
onAction?: (action: Action, e: React.MouseEvent) => void;
|
|
26
|
+
closeOnTouchOutside?: boolean;
|
|
27
|
+
closeOnAction?: boolean;
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
stopPropagation?: PropagationEvent[];
|
|
30
|
+
onActionsReveal?: (side: SideType) => void;
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
escapeDom?: string;
|
|
33
|
+
} & NativeProps<'--background'>;
|
|
34
|
+
export declare const SwipeAction: React.ForwardRefExoticComponent<{
|
|
35
|
+
rightActions?: Action[] | undefined;
|
|
36
|
+
leftActions?: Action[] | undefined;
|
|
37
|
+
onAction?: ((action: Action, e: React.MouseEvent) => void) | undefined;
|
|
38
|
+
closeOnTouchOutside?: boolean | undefined;
|
|
39
|
+
closeOnAction?: boolean | undefined;
|
|
40
|
+
children: ReactNode;
|
|
41
|
+
stopPropagation?: "click"[] | undefined;
|
|
42
|
+
onActionsReveal?: ((side: SideType) => void) | undefined;
|
|
43
|
+
onClose?: (() => void) | undefined;
|
|
44
|
+
escapeDom?: string | undefined;
|
|
45
|
+
} & NativeProps<"--background"> & React.RefAttributes<SwipeActionRef>>;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { ProductCardTypes } from '../types';
|
|
4
|
+
interface ISKUCardProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
5
|
+
dataSource: any;
|
|
6
|
+
itemType?: 'booking' | 'product';
|
|
7
|
+
type: 'a2' | 'a5' | 'a9';
|
|
8
|
+
rightActions: any[];
|
|
9
|
+
rightActionsDisplay?: 'swipe' | 'inline';
|
|
10
|
+
escapeDom?: string;
|
|
11
|
+
isShowRelatedProduct?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const PREFIX = "pisell-cart-sku-card";
|
|
14
|
+
export declare const ENABLE_LARGE_WEIGHING_FONT = true;
|
|
15
|
+
declare const CartSkuCard: (props: ISKUCardProps) => React.JSX.Element | null;
|
|
16
|
+
export default CartSkuCard;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["dataSource", "isShowImage", "isShowOriginalPrice", "isShowHolder", "isShowNote", "isShowDelete", "isShowInlineDelete", "isShowAmountFooter", "isShowPackageNote", "isShowEditProduct", "disabledClick", "disabledEditClick", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onPromotion", "onGift", "onChangeHolder", "itemType", "type", "rightActions", "rightActionsDisplay", "escapeDom", "maxSpecsCount", "isShowRelatedProduct"];
|
|
2
|
+
var _excluded = ["dataSource", "isShowImage", "isShowQuantityBadge", "isShowOriginalPrice", "isShowHolder", "isShowNote", "isShowDelete", "isShowInlineDelete", "isShowAmountFooter", "isShowPackageNote", "isShowEditProduct", "disabledClick", "disabledEditClick", "onEditProduct", "onAction", "onDelete", "onNote", "onLike", "onCard", "onChangeResource", "onPromotion", "onGift", "onChangeHolder", "itemType", "type", "rightActions", "rightActionsDisplay", "escapeDom", "maxSpecsCount", "isShowRelatedProduct"];
|
|
3
3
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
4
4
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
5
5
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
@@ -44,6 +44,8 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
44
44
|
dataSource = _props$dataSource === void 0 ? defaultValue.dataSource : _props$dataSource,
|
|
45
45
|
_props$isShowImage = props.isShowImage,
|
|
46
46
|
isShowImage = _props$isShowImage === void 0 ? defaultValue.isShowImage : _props$isShowImage,
|
|
47
|
+
_props$isShowQuantity = props.isShowQuantityBadge,
|
|
48
|
+
isShowQuantityBadge = _props$isShowQuantity === void 0 ? true : _props$isShowQuantity,
|
|
47
49
|
_props$isShowOriginal = props.isShowOriginalPrice,
|
|
48
50
|
isShowOriginalPrice = _props$isShowOriginal === void 0 ? defaultValue.isShowOriginalPrice : _props$isShowOriginal,
|
|
49
51
|
_props$isShowHolder = props.isShowHolder,
|
|
@@ -168,6 +170,7 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
168
170
|
var renderA2 = function renderA2() {
|
|
169
171
|
return /*#__PURE__*/React.createElement(React.Fragment, null, renderMainProduct( /*#__PURE__*/React.createElement(BasicInfo, {
|
|
170
172
|
isShowImage: isShowImage,
|
|
173
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
171
174
|
dataSource: dataSource,
|
|
172
175
|
isMainProduct: true,
|
|
173
176
|
maxSpecsCount: maxSpecsCount
|
|
@@ -195,6 +198,7 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
195
198
|
type: "pisell2-trash-01"
|
|
196
199
|
})) : null, renderMainProduct( /*#__PURE__*/React.createElement(BasicInfo, {
|
|
197
200
|
isShowImage: isShowImage,
|
|
201
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
198
202
|
dataSource: dataSource,
|
|
199
203
|
isMainProduct: true,
|
|
200
204
|
type: type,
|
|
@@ -208,11 +212,13 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
208
212
|
dataSource: dataSource
|
|
209
213
|
})) : null, /*#__PURE__*/React.createElement(Packages, {
|
|
210
214
|
dataSource: dataSource,
|
|
211
|
-
isShowImage: isShowImage
|
|
215
|
+
isShowImage: isShowImage,
|
|
216
|
+
isShowQuantityBadge: isShowQuantityBadge
|
|
212
217
|
}), /*#__PURE__*/React.createElement(Sales, {
|
|
213
218
|
dataSource: dataSource,
|
|
214
219
|
hideDivider: !!(dataSource !== null && dataSource !== void 0 && (_dataSource$bundle = dataSource.bundle) !== null && _dataSource$bundle !== void 0 && _dataSource$bundle.length),
|
|
215
|
-
isShowImage: isShowImage
|
|
220
|
+
isShowImage: isShowImage,
|
|
221
|
+
isShowQuantityBadge: isShowQuantityBadge
|
|
216
222
|
}), (_dataSource$items = dataSource.items) !== null && _dataSource$items !== void 0 && _dataSource$items.length ? /*#__PURE__*/React.createElement(Items, {
|
|
217
223
|
dataSource: dataSource,
|
|
218
224
|
hideDivider: hideDivider
|
|
@@ -246,6 +252,7 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
246
252
|
type: "pisell2-trash-01"
|
|
247
253
|
})) : null, renderMainProduct( /*#__PURE__*/React.createElement(BasicInfo, {
|
|
248
254
|
isShowImage: isShowImage,
|
|
255
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
249
256
|
dataSource: dataSource,
|
|
250
257
|
isMainProduct: true,
|
|
251
258
|
type: type,
|
|
@@ -256,6 +263,7 @@ var CartSkuCard = function CartSkuCard(props) {
|
|
|
256
263
|
})), /*#__PURE__*/React.createElement(Packages, {
|
|
257
264
|
dataSource: dataSource,
|
|
258
265
|
isShowImage: isShowImage,
|
|
266
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
259
267
|
type: type
|
|
260
268
|
}), isShowAmountFooter ? /*#__PURE__*/React.createElement(AmountFooter, {
|
|
261
269
|
item: dataSource,
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare const SelectHolderMultiple: ({ lists, value, onChange, holderMode, isShowAddHolderButton, onAddHolder, addHolderButtonText, onClearHolder, isErrorHolder, allowClear, holderMaxCount, }: any) => React.JSX.Element;
|
|
3
|
+
export default SelectHolderMultiple;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ProductCardTypes } from '../types';
|
|
3
|
+
import type { LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
|
|
4
|
+
interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
5
|
+
dataSource: any;
|
|
6
|
+
type: LineItemType;
|
|
7
|
+
cartSkuType: 'a2' | 'a5' | 'a9';
|
|
8
|
+
isShowBookingHeader: boolean;
|
|
9
|
+
relatedProductDataSource?: any;
|
|
10
|
+
addTimeProductDataSources?: any[];
|
|
11
|
+
rightActions?: any[];
|
|
12
|
+
rightActionsDisplay?: 'swipe' | 'inline';
|
|
13
|
+
escapeDom?: string;
|
|
14
|
+
statusOptions?: LineItemStatusOption[];
|
|
15
|
+
statusLoading?: boolean;
|
|
16
|
+
statusDisabled?: boolean;
|
|
17
|
+
isShowRelatedProduct?: boolean;
|
|
18
|
+
holderOptions?: LineItemHolderOption[];
|
|
19
|
+
onBookingStatusChange?: (status: string, item: any) => void;
|
|
20
|
+
onAddTimeProductCard?: (item: any) => void;
|
|
21
|
+
}
|
|
22
|
+
declare const BookingLineItem: (props: BookingLineItemProps) => React.JSX.Element | null;
|
|
23
|
+
export default BookingLineItem;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var _excluded = ["dataSource", "type", "cartSkuType", "isShowBookingHeader", "relatedProductDataSource", "addTimeProductDataSources", "rightActions", "rightActionsDisplay", "escapeDom", "isShowImage", "isFormSubject", "isShowDelete", "isShowInlineDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "holderOptions", "onBookingStatusChange", "onAddTimeProductCard", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
|
|
2
|
+
var _excluded = ["dataSource", "type", "cartSkuType", "isShowBookingHeader", "relatedProductDataSource", "addTimeProductDataSources", "rightActions", "rightActionsDisplay", "escapeDom", "isShowImage", "isShowQuantityBadge", "isFormSubject", "isShowDelete", "isShowInlineDelete", "isShowNote", "isShowAmountFooter", "disabledClick", "disabledEdit", "statusOptions", "statusLoading", "statusDisabled", "isShowRelatedProduct", "holderOptions", "onBookingStatusChange", "onAddTimeProductCard", "onAction", "onDelete", "onNote", "onCard", "onPromotion", "onGift"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
@@ -62,6 +62,8 @@ var BookingLineItem = function BookingLineItem(props) {
|
|
|
62
62
|
rightActionsDisplay = _props$rightActionsDi === void 0 ? 'swipe' : _props$rightActionsDi,
|
|
63
63
|
escapeDom = props.escapeDom,
|
|
64
64
|
isShowImage = props.isShowImage,
|
|
65
|
+
_props$isShowQuantity = props.isShowQuantityBadge,
|
|
66
|
+
isShowQuantityBadge = _props$isShowQuantity === void 0 ? true : _props$isShowQuantity,
|
|
65
67
|
isFormSubject = props.isFormSubject,
|
|
66
68
|
isShowDelete = props.isShowDelete,
|
|
67
69
|
_props$isShowInlineDe = props.isShowInlineDelete,
|
|
@@ -180,12 +182,14 @@ var BookingLineItem = function BookingLineItem(props) {
|
|
|
180
182
|
}) : null;
|
|
181
183
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicInfo, {
|
|
182
184
|
isShowImage: isShowImage,
|
|
185
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
183
186
|
dataSource: productDataSource,
|
|
184
187
|
type: cartSkuType,
|
|
185
188
|
maxSpecsCount: props.maxSpecsCount || 1
|
|
186
189
|
}), /*#__PURE__*/React.createElement(Packages, {
|
|
187
190
|
dataSource: productDataSource,
|
|
188
191
|
isShowImage: isShowImage,
|
|
192
|
+
isShowQuantityBadge: isShowQuantityBadge,
|
|
189
193
|
type: cartSkuType
|
|
190
194
|
}), isShowAmountFooter ? /*#__PURE__*/React.createElement(AmountFooter, {
|
|
191
195
|
item: productDataSource,
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ProductCardTypes } from '../types';
|
|
3
|
+
import type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType } from './types';
|
|
4
|
+
import './index.less';
|
|
5
|
+
export declare const PREFIX = "pisell-line-item";
|
|
6
|
+
export type { itemType, LineItemHolderOption, LineItemStatusOption, LineItemType, } from './types';
|
|
7
|
+
declare type LocalizedText = string | Record<string, unknown> | null | undefined;
|
|
8
|
+
export interface LineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
9
|
+
dataSource: any;
|
|
10
|
+
itemType?: itemType;
|
|
11
|
+
type?: LineItemType;
|
|
12
|
+
isShowBookingHeader: boolean;
|
|
13
|
+
rightActions?: any[];
|
|
14
|
+
rightActionsDisplay?: 'swipe' | 'inline';
|
|
15
|
+
escapeDom?: string;
|
|
16
|
+
statusOptions?: LineItemStatusOption[];
|
|
17
|
+
statusLoading?: boolean;
|
|
18
|
+
statusDisabled?: boolean;
|
|
19
|
+
isShowRelatedProduct?: boolean;
|
|
20
|
+
holderOptions?: LineItemHolderOption[];
|
|
21
|
+
onBookingStatusChange?: (status: string, item: any) => void;
|
|
22
|
+
onAddTimeProductCard?: (item: any) => void;
|
|
23
|
+
}
|
|
24
|
+
export declare const convertProductToLineItemProduct: (product: any, translationOriginal: (text: LocalizedText) => string, symbol: string) => {
|
|
25
|
+
_id: any;
|
|
26
|
+
id: any;
|
|
27
|
+
product_id: any;
|
|
28
|
+
product_variant_id: any;
|
|
29
|
+
title: string;
|
|
30
|
+
product_title: string;
|
|
31
|
+
name: string;
|
|
32
|
+
cover: any;
|
|
33
|
+
image: any;
|
|
34
|
+
num: any;
|
|
35
|
+
quantity: any;
|
|
36
|
+
price: any;
|
|
37
|
+
total: any;
|
|
38
|
+
origin_total: string | number | undefined;
|
|
39
|
+
original_total: string | number | undefined;
|
|
40
|
+
source_product_price: any;
|
|
41
|
+
selling_price: any;
|
|
42
|
+
payment_price: any;
|
|
43
|
+
tax_fee: any;
|
|
44
|
+
symbol: string;
|
|
45
|
+
note: any;
|
|
46
|
+
product_sku: any;
|
|
47
|
+
product_bundle: any;
|
|
48
|
+
bundle: any;
|
|
49
|
+
product_option_string: any;
|
|
50
|
+
options: any[];
|
|
51
|
+
discount_list: any;
|
|
52
|
+
promotions: any;
|
|
53
|
+
discount_reason: any;
|
|
54
|
+
isGift: boolean;
|
|
55
|
+
giftData: any;
|
|
56
|
+
_origin: any;
|
|
57
|
+
_extend: {
|
|
58
|
+
other: {
|
|
59
|
+
product_id: any;
|
|
60
|
+
option: any[];
|
|
61
|
+
bundle: any;
|
|
62
|
+
product_variant_id: any;
|
|
63
|
+
quantity: any;
|
|
64
|
+
};
|
|
65
|
+
note: any;
|
|
66
|
+
total: any;
|
|
67
|
+
origin_total: string | number | undefined;
|
|
68
|
+
payment_price: any;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
declare const LineItem: (props: LineItemProps) => React.JSX.Element;
|
|
72
|
+
export default LineItem;
|
|
@@ -60,12 +60,14 @@ var convertBundle = function convertBundle(bundle, translationOriginal) {
|
|
|
60
60
|
var options = (bundle.option || []).map(function (option) {
|
|
61
61
|
return convertBundleOption(option, translationOriginal);
|
|
62
62
|
});
|
|
63
|
+
var bundlePrice = bundle.price_type === 'markdown' && Number.isFinite(Number(bundle.price)) ? -Math.abs(Number(bundle.price)) : bundle.price;
|
|
63
64
|
return _objectSpread(_objectSpread({}, bundle), {}, {
|
|
64
65
|
title: bundle.title || bundle.bundle_title,
|
|
65
66
|
id: bundle.bundle_id,
|
|
66
67
|
product_id: bundle.bundle_product_id,
|
|
67
68
|
_bundle_product_id: bundle.bundle_product_id,
|
|
68
69
|
product_variant_id: bundle.bundle_variant_id,
|
|
70
|
+
price: bundlePrice,
|
|
69
71
|
total: bundle.bundle_selling_price,
|
|
70
72
|
origin_total: bundle.original_total,
|
|
71
73
|
custom_price: bundle.custom_price,
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
export declare type bundleType = {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
num: number;
|
|
5
|
+
price: number;
|
|
6
|
+
total: number;
|
|
7
|
+
origin_total?: number;
|
|
8
|
+
price_type?: string;
|
|
9
|
+
options?: optionType[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @description:
|
|
13
|
+
* @return {*}
|
|
14
|
+
* @Author: WangHan
|
|
15
|
+
* @Date: 2025-01-02 23:00
|
|
16
|
+
*/
|
|
17
|
+
export declare type optionType = {
|
|
18
|
+
id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
num: number;
|
|
21
|
+
price: number;
|
|
22
|
+
total: number;
|
|
23
|
+
origin_total?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @title: 商品商品类型
|
|
27
|
+
* @description:
|
|
28
|
+
* @return {*}
|
|
29
|
+
* @Author: WangHan
|
|
30
|
+
* @Date: 2025-01-02 22:48
|
|
31
|
+
*/
|
|
32
|
+
export declare type productType = {
|
|
33
|
+
_id: string | number;
|
|
34
|
+
id: number;
|
|
35
|
+
name: string;
|
|
36
|
+
price: number;
|
|
37
|
+
total: number;
|
|
38
|
+
num: number;
|
|
39
|
+
origin_total?: number;
|
|
40
|
+
image?: string;
|
|
41
|
+
isShowNote?: boolean;
|
|
42
|
+
note?: string;
|
|
43
|
+
like_status?: string;
|
|
44
|
+
bundle?: bundleType[];
|
|
45
|
+
options?: optionType[];
|
|
46
|
+
isShowAction?: boolean;
|
|
47
|
+
actionText?: string;
|
|
48
|
+
errorMessage?: string;
|
|
49
|
+
product_option_string?: string;
|
|
50
|
+
discount_reason?: string;
|
|
51
|
+
relation_products?: any[];
|
|
52
|
+
resource_id?: string | number;
|
|
53
|
+
relation_form_name?: string;
|
|
54
|
+
holder_title?: string;
|
|
55
|
+
start_date?: string;
|
|
56
|
+
end_date?: string;
|
|
57
|
+
is_show_duration?: boolean;
|
|
58
|
+
is_show_week?: boolean;
|
|
59
|
+
promotions?: any[];
|
|
60
|
+
isGift?: boolean;
|
|
61
|
+
giftData?: any;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* 排序总配置
|
|
65
|
+
*/
|
|
66
|
+
export declare type ProductCardTypes = {
|
|
67
|
+
dataSource: productType;
|
|
68
|
+
isFormSubject?: boolean;
|
|
69
|
+
isShowImage?: boolean;
|
|
70
|
+
isShowQuantityBadge?: boolean;
|
|
71
|
+
isShowOriginalPrice?: boolean;
|
|
72
|
+
isShowHolder?: boolean;
|
|
73
|
+
isShowNote?: boolean;
|
|
74
|
+
isShowPackageNote?: boolean;
|
|
75
|
+
isShowDelete?: boolean;
|
|
76
|
+
isShowInlineDelete?: boolean;
|
|
77
|
+
rightActionsDisplay?: 'swipe' | 'inline';
|
|
78
|
+
isShowEditProduct?: boolean;
|
|
79
|
+
isShowAmountFooter?: boolean;
|
|
80
|
+
disabledEdit?: boolean;
|
|
81
|
+
locale?: string;
|
|
82
|
+
symbol?: string;
|
|
83
|
+
isShowChangeHolder?: boolean;
|
|
84
|
+
isShowChangeResource?: boolean;
|
|
85
|
+
isShowChangeDate?: boolean;
|
|
86
|
+
disabledClick?: boolean;
|
|
87
|
+
disabledEditClick?: boolean;
|
|
88
|
+
onAction?: (val: any) => void;
|
|
89
|
+
onDelete?: (val: any) => void;
|
|
90
|
+
onNote?: (val: any) => void;
|
|
91
|
+
onLike?: (val: any) => void;
|
|
92
|
+
onCard?: (val: any) => void;
|
|
93
|
+
onChangeResource?: (val: any) => void;
|
|
94
|
+
onPromotion?: (val: any) => void;
|
|
95
|
+
onEditProduct?: (val: any) => void;
|
|
96
|
+
onGift?: (val: any) => void;
|
|
97
|
+
osWarnTips?: Array<string>;
|
|
98
|
+
[key: string]: any;
|
|
99
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FilterType } from "../../filter/types";
|
|
2
|
+
import { ColumnSettingType, DataSourceGroupType, GallerySettingType, GridViewType, ModeType, SortType, ExportImportModeType, LocalSettingsType } from "../types";
|
|
3
|
+
declare type UseTableSettingProps = {
|
|
4
|
+
tableId?: string;
|
|
5
|
+
filter: FilterType;
|
|
6
|
+
columns: Record<string, any>[];
|
|
7
|
+
columnSetting?: ColumnSettingType;
|
|
8
|
+
dataSourceGroup?: DataSourceGroupType;
|
|
9
|
+
sort?: SortType;
|
|
10
|
+
view: GridViewType;
|
|
11
|
+
currentViewMode: ModeType;
|
|
12
|
+
gallery?: GallerySettingType;
|
|
13
|
+
currentSettingHash: string;
|
|
14
|
+
exportImport?: ExportImportModeType;
|
|
15
|
+
localSettings?: LocalSettingsType;
|
|
16
|
+
};
|
|
17
|
+
declare const useTableSetting: (params: UseTableSettingProps) => {
|
|
18
|
+
setTableSetting: (this: unknown, values: Record<string, any>) => void;
|
|
19
|
+
tableSetting: any;
|
|
20
|
+
};
|
|
21
|
+
export default useTableSetting;
|