@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';
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts
ADDED
|
@@ -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;
|
|
@@ -44,6 +44,7 @@ var import_index = require("./index.less");
|
|
|
44
44
|
var BasicInfo = (props) => {
|
|
45
45
|
const {
|
|
46
46
|
isShowImage,
|
|
47
|
+
isShowQuantityBadge = true,
|
|
47
48
|
dataSource = {},
|
|
48
49
|
style,
|
|
49
50
|
isMainProduct,
|
|
@@ -144,7 +145,7 @@ var BasicInfo = (props) => {
|
|
|
144
145
|
return _originalTotal !== 0 && _originalTotal != _total;
|
|
145
146
|
}, [isShowOriginalPrice, origin_total, total, hasSpecs, hasWeighingInfo]);
|
|
146
147
|
if (type === "a5") {
|
|
147
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement(
|
|
148
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a5` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement(
|
|
148
149
|
"div",
|
|
149
150
|
{
|
|
150
151
|
className: `product-name ${renderEdit ? "product-name-edit" : ""}`
|
|
@@ -155,7 +156,7 @@ var BasicInfo = (props) => {
|
|
|
155
156
|
if (type === "a9") {
|
|
156
157
|
const showAmount = isBundle && !showFooter;
|
|
157
158
|
const _price = showAmount ? Number(price ?? 0) * num : price;
|
|
158
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ import_react.default.createElement(
|
|
159
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ import_react.default.createElement(
|
|
159
160
|
"div",
|
|
160
161
|
{
|
|
161
162
|
className: `product-name ${renderEdit ? "product-name-edit" : ""}`
|
|
@@ -163,6 +164,6 @@ var BasicInfo = (props) => {
|
|
|
163
164
|
name
|
|
164
165
|
), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, /* @__PURE__ */ import_react.default.createElement("span", null, renderProductPrice()), _isShowOriginalPrice ? /* @__PURE__ */ import_react.default.createElement("span", { className: `original-price` }, (0, import_utils.formatAmount)(origin_total, 2, symbol)) : null)), renderProductMeta()), renderEdit));
|
|
165
166
|
}
|
|
166
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
|
|
167
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: basicInfoClassName, style: style || {} }, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
|
|
167
168
|
};
|
|
168
169
|
var basicInfo_default = BasicInfo;
|
|
@@ -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;
|
|
@@ -40,7 +40,12 @@ var import_basicInfo = __toESM(require("../basicInfo"));
|
|
|
40
40
|
var import__ = require("../../index");
|
|
41
41
|
var import_AmountFooter = __toESM(require("../../../components/AmountFooter"));
|
|
42
42
|
var import_index = require("./index.less");
|
|
43
|
-
var Packages = ({
|
|
43
|
+
var Packages = ({
|
|
44
|
+
isShowImage,
|
|
45
|
+
isShowQuantityBadge,
|
|
46
|
+
dataSource = {},
|
|
47
|
+
type
|
|
48
|
+
}) => {
|
|
44
49
|
const { bundle = [], symbol = "$" } = dataSource;
|
|
45
50
|
const showFooter = (0, import_react.useCallback)(
|
|
46
51
|
(_bundle) => {
|
|
@@ -71,6 +76,7 @@ var Packages = ({ isShowImage, dataSource = {}, type }) => {
|
|
|
71
76
|
import_basicInfo.default,
|
|
72
77
|
{
|
|
73
78
|
isShowImage,
|
|
79
|
+
isShowQuantityBadge,
|
|
74
80
|
dataSource: {
|
|
75
81
|
...item,
|
|
76
82
|
name: item.title,
|
|
@@ -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;
|
|
@@ -39,7 +39,12 @@ var import_basicInfo = __toESM(require("../basicInfo"));
|
|
|
39
39
|
var import_utils = require("@pisell/utils");
|
|
40
40
|
var import__ = require("../../index");
|
|
41
41
|
var import_index = require("./index.less");
|
|
42
|
-
var Sales = ({
|
|
42
|
+
var Sales = ({
|
|
43
|
+
hideDivider,
|
|
44
|
+
dataSource,
|
|
45
|
+
isShowImage,
|
|
46
|
+
isShowQuantityBadge
|
|
47
|
+
}) => {
|
|
43
48
|
const { relation_products = [], symbol = "$" } = dataSource || {};
|
|
44
49
|
let other_products = relation_products.map((p) => {
|
|
45
50
|
return {
|
|
@@ -60,6 +65,7 @@ var Sales = ({ hideDivider, dataSource, isShowImage }) => {
|
|
|
60
65
|
import_basicInfo.default,
|
|
61
66
|
{
|
|
62
67
|
isShowImage,
|
|
68
|
+
isShowQuantityBadge,
|
|
63
69
|
style: {
|
|
64
70
|
border: "1px solid #D0D5DD",
|
|
65
71
|
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;
|
|
@@ -64,6 +64,7 @@ var CartSkuCard = (props) => {
|
|
|
64
64
|
const {
|
|
65
65
|
dataSource = import_status.defaultValue.dataSource,
|
|
66
66
|
isShowImage = import_status.defaultValue.isShowImage,
|
|
67
|
+
isShowQuantityBadge = true,
|
|
67
68
|
isShowOriginalPrice = import_status.defaultValue.isShowOriginalPrice,
|
|
68
69
|
isShowHolder = import_status.defaultValue.isShowHolder,
|
|
69
70
|
isShowNote = import_status.defaultValue.isShowNote,
|
|
@@ -164,6 +165,7 @@ var CartSkuCard = (props) => {
|
|
|
164
165
|
import_basicInfo.default,
|
|
165
166
|
{
|
|
166
167
|
isShowImage,
|
|
168
|
+
isShowQuantityBadge,
|
|
167
169
|
dataSource,
|
|
168
170
|
isMainProduct: true,
|
|
169
171
|
maxSpecsCount
|
|
@@ -200,6 +202,7 @@ var CartSkuCard = (props) => {
|
|
|
200
202
|
import_basicInfo.default,
|
|
201
203
|
{
|
|
202
204
|
isShowImage,
|
|
205
|
+
isShowQuantityBadge,
|
|
203
206
|
dataSource,
|
|
204
207
|
isMainProduct: true,
|
|
205
208
|
type,
|
|
@@ -209,12 +212,20 @@ var CartSkuCard = (props) => {
|
|
|
209
212
|
onEditProduct
|
|
210
213
|
}
|
|
211
214
|
)
|
|
212
|
-
), itemType !== "booking" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_timeRange.default, { dataSource }), /* @__PURE__ */ import_react.default.createElement(import_resources.default, { dataSource })) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
215
|
+
), itemType !== "booking" ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_timeRange.default, { dataSource }), /* @__PURE__ */ import_react.default.createElement(import_resources.default, { dataSource })) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
216
|
+
import_packages.default,
|
|
217
|
+
{
|
|
218
|
+
dataSource,
|
|
219
|
+
isShowImage,
|
|
220
|
+
isShowQuantityBadge
|
|
221
|
+
}
|
|
222
|
+
), /* @__PURE__ */ import_react.default.createElement(
|
|
213
223
|
import_sales.default,
|
|
214
224
|
{
|
|
215
225
|
dataSource,
|
|
216
226
|
hideDivider: !!((_a2 = dataSource == null ? void 0 : dataSource.bundle) == null ? void 0 : _a2.length),
|
|
217
|
-
isShowImage
|
|
227
|
+
isShowImage,
|
|
228
|
+
isShowQuantityBadge
|
|
218
229
|
}
|
|
219
230
|
), ((_b2 = dataSource.items) == null ? void 0 : _b2.length) ? /* @__PURE__ */ import_react.default.createElement(import_MultiDay.default, { dataSource, hideDivider }) : isShowAmountFooter ? /* @__PURE__ */ import_react.default.createElement(
|
|
220
231
|
import_AmountFooter.default,
|
|
@@ -253,6 +264,7 @@ var CartSkuCard = (props) => {
|
|
|
253
264
|
import_basicInfo.default,
|
|
254
265
|
{
|
|
255
266
|
isShowImage,
|
|
267
|
+
isShowQuantityBadge,
|
|
256
268
|
dataSource,
|
|
257
269
|
isMainProduct: true,
|
|
258
270
|
type,
|
|
@@ -267,6 +279,7 @@ var CartSkuCard = (props) => {
|
|
|
267
279
|
{
|
|
268
280
|
dataSource,
|
|
269
281
|
isShowImage,
|
|
282
|
+
isShowQuantityBadge,
|
|
270
283
|
type
|
|
271
284
|
}
|
|
272
285
|
), isShowAmountFooter ? /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -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;
|
|
@@ -73,6 +73,7 @@ var BookingLineItem = (props) => {
|
|
|
73
73
|
rightActionsDisplay = "swipe",
|
|
74
74
|
escapeDom,
|
|
75
75
|
isShowImage,
|
|
76
|
+
isShowQuantityBadge = true,
|
|
76
77
|
isFormSubject,
|
|
77
78
|
isShowDelete,
|
|
78
79
|
isShowInlineDelete = isShowDelete,
|
|
@@ -182,6 +183,7 @@ var BookingLineItem = (props) => {
|
|
|
182
183
|
import_basicInfo.default,
|
|
183
184
|
{
|
|
184
185
|
isShowImage,
|
|
186
|
+
isShowQuantityBadge,
|
|
185
187
|
dataSource: productDataSource,
|
|
186
188
|
type: cartSkuType,
|
|
187
189
|
maxSpecsCount: props.maxSpecsCount || 1
|
|
@@ -191,6 +193,7 @@ var BookingLineItem = (props) => {
|
|
|
191
193
|
{
|
|
192
194
|
dataSource: productDataSource,
|
|
193
195
|
isShowImage,
|
|
196
|
+
isShowQuantityBadge,
|
|
194
197
|
type: cartSkuType
|
|
195
198
|
}
|
|
196
199
|
), isShowAmountFooter ? /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -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;
|
|
@@ -82,6 +82,7 @@ var convertBundle = (bundle, translationOriginal) => {
|
|
|
82
82
|
const options = (bundle.option || []).map(
|
|
83
83
|
(option) => convertBundleOption(option, translationOriginal)
|
|
84
84
|
);
|
|
85
|
+
const bundlePrice = bundle.price_type === "markdown" && Number.isFinite(Number(bundle.price)) ? -Math.abs(Number(bundle.price)) : bundle.price;
|
|
85
86
|
return {
|
|
86
87
|
...bundle,
|
|
87
88
|
title: bundle.title || bundle.bundle_title,
|
|
@@ -89,6 +90,7 @@ var convertBundle = (bundle, translationOriginal) => {
|
|
|
89
90
|
product_id: bundle.bundle_product_id,
|
|
90
91
|
_bundle_product_id: bundle.bundle_product_id,
|
|
91
92
|
product_variant_id: bundle.bundle_variant_id,
|
|
93
|
+
price: bundlePrice,
|
|
92
94
|
total: bundle.bundle_selling_price,
|
|
93
95
|
origin_total: bundle.original_total,
|
|
94
96
|
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;
|