@pisell/materials 6.11.243 → 6.11.245
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 +4 -4
- package/build/lowcode/render/default/view.js +4 -4
- package/build/lowcode/view.js +5 -5
- package/es/components/PisellCards/components/MultilevelCard/hooks/useMultilevelCardExpand.d.ts +1 -0
- package/es/components/PisellCards/components/PisellImageCard/hooks/useImageLoad.d.ts +1 -0
- package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
- package/es/components/PisellScrollView/PisellScrollView.d.ts +5 -0
- package/es/components/PisellScrollView/PisellScrollView.stories.d.ts +87 -0
- package/es/components/PisellScrollView/hooks/useScrollState.d.ts +13 -0
- package/es/components/PisellSteps/PisellSteps.stories.d.ts +155 -0
- package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
- package/es/components/PisellSuperTabs/PisellSuperTabs.js +8 -3
- package/es/components/PisellTabbar/constants.d.ts +47 -0
- 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/PisellTabbar.js +19 -3
- package/es/components/PisellTabbar/template/Template1/index.d.ts +7 -0
- package/es/components/PisellTabbar/types.d.ts +123 -0
- package/es/components/batch-editor/fields/index.d.ts +1 -0
- package/es/components/buttonGroupPreview/index.d.ts +19 -0
- package/es/components/calendar/index.d.ts +1 -0
- package/es/components/checkbox/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +48 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +22 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +2 -2
- package/es/components/filter/components/items/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/es/components/filter/components/items/text/index.d.ts +1 -0
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/pisellDatePicker/index.d.ts +1 -0
- package/es/components/pisellFind/index.d.ts +69 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +94 -0
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +184 -0
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +184 -0
- package/es/components/pisellFloorMapLayout/locales.d.ts +969 -0
- package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +80 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +109 -0
- package/es/components/pisellLookup/PisellLookup.d.ts +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/types.d.ts +797 -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/const/bookingCalendarConstants.d.ts +102 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +9 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +32 -0
- package/es/components/pisellTimeRangeDisplay/index.d.ts +3 -0
- package/es/components/pisellTimeRangeDisplay/types.d.ts +145 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +2 -2
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +3 -3
- package/es/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +15 -0
- package/es/components/productCard/cartSkuCard/components/weighing/index.js +9 -4
- package/es/components/productCard/cartSkuCard/index.d.ts +16 -0
- package/es/components/productCard/cartSkuCard/index.js +2 -0
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +23 -0
- package/es/components/productCard/lineItem/components/Resources/index.d.ts +7 -0
- package/es/components/productCard/lineItem/index.d.ts +72 -0
- package/es/components/productCard/lineItem/locales.d.ts +38 -0
- package/es/components/productCard/types.d.ts +98 -0
- package/es/components/radio/index.d.ts +1 -0
- package/es/components/select-time/RightPanel/index.d.ts +10 -0
- package/es/components/select-time/index.d.ts +16 -0
- package/es/components/skeleton/index.d.ts +1 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/fields/image/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +0 -1
- package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/select/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useTableSetting.d.ts +21 -0
- package/es/components/time-picker/index.d.ts +1 -0
- package/es/components/upload/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Time/utils.d.ts +1 -0
- package/es/hooks/useTranslationOriginal.d.ts +4 -0
- package/es/index.d.ts +271 -0
- package/es/locales/en-US.d.ts +566 -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/es/utils/index.d.ts +1 -1
- package/lib/components/PisellCards/components/MultilevelCard/hooks/useMultilevelCardExpand.d.ts +1 -0
- package/lib/components/PisellCards/components/PisellImageCard/hooks/useImageLoad.d.ts +1 -0
- package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +163 -0
- package/lib/components/PisellScrollView/PisellScrollView.d.ts +5 -0
- package/lib/components/PisellScrollView/PisellScrollView.stories.d.ts +87 -0
- package/lib/components/PisellScrollView/hooks/useScrollState.d.ts +13 -0
- package/lib/components/PisellSteps/PisellSteps.stories.d.ts +155 -0
- package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
- package/lib/components/PisellSuperTabs/PisellSuperTabs.js +12 -3
- package/lib/components/PisellTabbar/constants.d.ts +47 -0
- 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/PisellTabbar.js +22 -3
- package/lib/components/PisellTabbar/template/Template1/index.d.ts +7 -0
- package/lib/components/PisellTabbar/types.d.ts +123 -0
- package/lib/components/batch-editor/fields/index.d.ts +1 -0
- package/lib/components/buttonGroupPreview/index.d.ts +19 -0
- package/lib/components/calendar/index.d.ts +1 -0
- package/lib/components/checkbox/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +48 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +22 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +2 -2
- package/lib/components/filter/components/items/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/index.d.ts +1 -0
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/pisellDatePicker/index.d.ts +1 -0
- package/lib/components/pisellFind/index.d.ts +69 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +94 -0
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +184 -0
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +184 -0
- package/lib/components/pisellFloorMapLayout/locales.d.ts +969 -0
- package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanTypes.d.ts +80 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +109 -0
- package/lib/components/pisellLookup/PisellLookup.d.ts +4 -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/types.d.ts +797 -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/const/bookingCalendarConstants.d.ts +102 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +9 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarAxis.d.ts +32 -0
- package/lib/components/pisellTimeRangeDisplay/index.d.ts +3 -0
- package/lib/components/pisellTimeRangeDisplay/types.d.ts +145 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +2 -2
- package/lib/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +15 -0
- package/lib/components/productCard/cartSkuCard/components/weighing/index.js +10 -3
- package/lib/components/productCard/cartSkuCard/index.d.ts +16 -0
- package/lib/components/productCard/cartSkuCard/index.js +3 -0
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +23 -0
- package/lib/components/productCard/lineItem/components/Resources/index.d.ts +7 -0
- package/lib/components/productCard/lineItem/index.d.ts +72 -0
- package/lib/components/productCard/lineItem/locales.d.ts +38 -0
- package/lib/components/productCard/types.d.ts +98 -0
- package/lib/components/radio/index.d.ts +1 -0
- package/lib/components/select-time/RightPanel/index.d.ts +10 -0
- package/lib/components/select-time/index.d.ts +16 -0
- package/lib/components/skeleton/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/fields/image/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +0 -1
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/select/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/hooks/useTableSetting.d.ts +21 -0
- package/lib/components/time-picker/index.d.ts +1 -0
- package/lib/components/upload/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Time/utils.d.ts +1 -0
- package/lib/hooks/useTranslationOriginal.d.ts +4 -0
- package/lib/index.d.ts +271 -0
- package/lib/locales/en-US.d.ts +566 -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/lib/utils/index.d.ts +1 -1
- package/lowcode/form.item/meta.ts +1 -1
- 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;
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.d.ts
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/** BookingCalendarDemo:布局数值与虚拟列表高度等(无演示种子数据)。 */
|
|
2
|
+
export declare const timeSliceMinutes = 60;
|
|
3
|
+
/** 未传 timelineRange 时默认营业日界钟 */
|
|
4
|
+
export declare const DEFAULT_CALENDAR_TIMELINE: {
|
|
5
|
+
start: string;
|
|
6
|
+
end: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const frozenColWidth = 132;
|
|
9
|
+
export declare const dayColWidth = 92;
|
|
10
|
+
/**
|
|
11
|
+
* 日历「资源视图」横向每一「日」列宽度(按月天数铺开)。
|
|
12
|
+
* 略大于 {@link dayColWidth},仅作用于资源视图;日视图时间轴仍用 dayColWidth。
|
|
13
|
+
*/
|
|
14
|
+
export declare const resourceViewDayColWidth = 102;
|
|
15
|
+
/**
|
|
16
|
+
* 日/周视图空档虚线框:在父级为 column flex 且占满格高时 `flex-1 min-h-0` 纵向铺满剩余区域。
|
|
17
|
+
*/
|
|
18
|
+
export declare const CALENDAR_EMPTY_DASHED_SLOT_CLASSNAME = "flex min-h-0 flex-1 w-full flex-col items-center justify-center rounded-lg border border-dashed px-2 py-1 text-xs";
|
|
19
|
+
/** 日视图无 overlay 时资源行默认高度;周视图 court 行与各日期格 `minHeight` 与之对齐 */
|
|
20
|
+
export declare const dayRowHeight = 44;
|
|
21
|
+
/**
|
|
22
|
+
* 资源视图月格:单条预约卡片**实际 min-height** 与「行高估算」共用此值。
|
|
23
|
+
* 调整此常量即可同步改变卡片显示高度与父行预留高度,避免行高与卡片高度不一致导致的截断 / 留白。
|
|
24
|
+
*/
|
|
25
|
+
export declare const RESOURCE_VIEW_BOOKING_CARD_EST_PX = 48;
|
|
26
|
+
/** 资源视图「+N」tile 的 min-height */
|
|
27
|
+
export declare const RESOURCE_VIEW_MORE_TILE_MIN_PX = 48;
|
|
28
|
+
/** 资源视图单元格 p-1 上下合计 */
|
|
29
|
+
export declare const RESOURCE_VIEW_CELL_PADDING_Y_PX = 8;
|
|
30
|
+
/** 资源视图 fullyBooked 占位块 min-height */
|
|
31
|
+
export declare const RESOURCE_VIEW_FULLY_BOOKED_BLOCK_PX = 28;
|
|
32
|
+
/**
|
|
33
|
+
* 资源视图:单 court 行最多展示的 lane 数;超出 → 该天落入 cell 级 `+N` 溢出
|
|
34
|
+
*/
|
|
35
|
+
export declare const RESOURCE_VIEW_MAX_LANE = 3;
|
|
36
|
+
/**
|
|
37
|
+
* 周视图:单 court 行最多展示的 lane 数(含 pill)。
|
|
38
|
+
* 比资源视图小:周列宽 ≈ 1 天,行高过大会让 5/27–5/31 这种"中间天"出现大块底部空白
|
|
39
|
+
* (短跨日 pill 只占 5/25–5/26 的 lane 2,但行高被全周 max 撑到 3 lane)。
|
|
40
|
+
* 这里取 2 → 长跨日两条占顶 lane 0/1,短跨日和单日全部进 cell 级 +N tile,行高紧凑。
|
|
41
|
+
*/
|
|
42
|
+
export declare const WEEK_VIEW_MAX_LANE = 2;
|
|
43
|
+
/** 月视图:每周内最多展示的 lane 数;超出 → cell 级 `+N` 溢出(M1:跨自然周续画时端部加 ◀/▶) */
|
|
44
|
+
export declare const MONTH_VIEW_MAX_LANE = 3;
|
|
45
|
+
/** 月视图 banner 高度(细于周视图 pill,节省每个 cell 的垂直空间) */
|
|
46
|
+
export declare const MONTH_VIEW_BANNER_H = 22;
|
|
47
|
+
/** 月视图 banner 之间纵向间距 */
|
|
48
|
+
export declare const MONTH_VIEW_BANNER_GAP = 2;
|
|
49
|
+
/** 月视图 banner 区域顶部留白(cell header 已留 padding,这里只补 banner 自身上边距) */
|
|
50
|
+
export declare const MONTH_VIEW_BANNER_PAD_Y = 2;
|
|
51
|
+
/** 月视图 cell header 估算高度:日期数字 + 占用 dot,banner 起点的 top 偏移 */
|
|
52
|
+
export declare const MONTH_VIEW_DAY_HEADER_H = 52;
|
|
53
|
+
/** 月视图 +N tile 高度(与 banner 一致以对齐 lane 槽) */
|
|
54
|
+
export declare const MONTH_VIEW_MORE_TILE_PX = 22;
|
|
55
|
+
/** 月视图:给定可见 lane 数与是否有 +N,banner 区所需高度(px) */
|
|
56
|
+
export declare function monthWeekBannerContentHeightPx(visibleLanes: number, hasOverflow: boolean): number;
|
|
57
|
+
/**
|
|
58
|
+
* 月视图:在固定行高、不可滚动的前提下,根据 banner 区可用高度推算本行最多展示几条。
|
|
59
|
+
* 超出部分走 cell 级 +N,避免底部 banner 被裁切却看不到 +N。
|
|
60
|
+
*/
|
|
61
|
+
export declare function monthViewEffectiveMaxLanes(bannerZoneHeightPx: number, totalLaneCount: number): number;
|
|
62
|
+
/** 日视图分组行默认高度(须容纳左侧折叠按钮等) */
|
|
63
|
+
export declare const groupRowHeight = 38;
|
|
64
|
+
export declare const dayHeaderHeight = 56;
|
|
65
|
+
/** 日视图 overlay 内单条预约卡片区最小高度(与 BookingCard、行高计算一致) */
|
|
66
|
+
export declare const DAY_BOOKING_CARD_MIN_PX = 64;
|
|
67
|
+
/** 日视图同一资源行内每条 lane 的最小高度(须 ≥ DAY_BOOKING_CARD_MIN_PX);并行时抬高该行 */
|
|
68
|
+
export declare const DAY_OVERLAY_LANE_MIN_PX = 64;
|
|
69
|
+
export declare const DAY_OVERLAY_INNER_TOP = 8;
|
|
70
|
+
export declare const DAY_OVERLAY_INNER_BOTTOM = 8;
|
|
71
|
+
export declare const DAY_OVERLAY_LANE_GAP = 2;
|
|
72
|
+
/** 同一重叠簇内最多展示的预约条数;超出合并为第 4 行的 +N(与日/周时间轴 overlay 一致) */
|
|
73
|
+
export declare const DAY_OVERLAY_VISIBLE_BOOKING_CAP = 3;
|
|
74
|
+
/**
|
|
75
|
+
* 日视图:某 court 行在「有预约 overlay」时的总高度(px),随并行展示条数 `displayLaneCount` 变高而变高(非固定常数)。
|
|
76
|
+
* `displayLaneCount` 由 `effectiveDayOverlayDisplayLaneCount(最大并行数)` 得到,与 3+N 截断规则一致。
|
|
77
|
+
*/
|
|
78
|
+
export declare function dayCourtOverlayRowHeightPx(displayLaneCount: number): number;
|
|
79
|
+
/**
|
|
80
|
+
* 资源视图:按某一格「courtDaySummary」结果估算该格所需最小高度(px)。
|
|
81
|
+
* 用于横向虚拟化仅挂载可见日期列时,仍按**全月**最大内容撑开行高,避免日程只在屏幕外列时出现行高塌陷。
|
|
82
|
+
*/
|
|
83
|
+
export declare function estimateResourceViewCourtCellHeightPx(summary: {
|
|
84
|
+
fullyBooked: boolean;
|
|
85
|
+
items: unknown[];
|
|
86
|
+
}): number;
|
|
87
|
+
/** 低于该宽度时日视图预约条内难以排下两行文案,默认用 Tooltip 展示完整信息 */
|
|
88
|
+
export declare const DAY_BOOKING_NARROW_PX = 88;
|
|
89
|
+
/** 低于该宽度时条内仅保留居中首字/圆点,避免文字竖排或完全不可读 */
|
|
90
|
+
export declare const DAY_BOOKING_MICRO_PX = 32;
|
|
91
|
+
/** 日视图横向:视口外多渲染的槽列数(减轻快速滚动白边) */
|
|
92
|
+
export declare const DAY_VIEW_COL_BUFFER = 5;
|
|
93
|
+
/** 日视图纵向:视口外多渲染的像素边距 */
|
|
94
|
+
export declare const DAY_VIEW_ROW_BUFFER_PX = 240;
|
|
95
|
+
/** 月/周/资源 +N 弹层内置列表行内容区高度(名称 + 时间) */
|
|
96
|
+
export declare const OVERFLOW_MODAL_SIMPLE_CARD_H = 56;
|
|
97
|
+
/** 日视图 lane +N:RoomCard 单行内容区高度(略大于格内条 min,可裁切次要信息) */
|
|
98
|
+
export declare const OVERFLOW_MODAL_DAY_CARD_H = 80;
|
|
99
|
+
export declare const OVERFLOW_MODAL_ROW_GAP = 8;
|
|
100
|
+
export declare const OVERFLOW_MODAL_SIMPLE_ROW_H: number;
|
|
101
|
+
export declare const OVERFLOW_MODAL_DAY_ROW_H: number;
|
|
102
|
+
export declare const OVERFLOW_MODAL_LIST_MAX_H = 420;
|
|
@@ -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;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 日历主轴映射纯函数:把一条 booking 在主轴方向的连续区间 [startUnit, endUnit)
|
|
3
|
+
* 按「精确比例 proportional」或「补全到刻度结束 snap」映射成 { offset, size }。
|
|
4
|
+
* 单位无关:scalePerUnit 既可是 px(固定列宽视图)也可是 %(弹性列视图)。
|
|
5
|
+
*/
|
|
6
|
+
export declare type TickFillMode = 'proportional' | 'snap';
|
|
7
|
+
export declare type CalendarViewKind = 'day' | 'week' | 'resource' | 'month';
|
|
8
|
+
export interface TickAxis {
|
|
9
|
+
/** 主轴起点对应的"绝对单位坐标"(日视图=firstTimelineHour;天维度=0) */
|
|
10
|
+
originUnit: number;
|
|
11
|
+
/** 每 1 单位的输出量(日视图=每小时 px;天维度=每列 px 或 %) */
|
|
12
|
+
scalePerUnit: number;
|
|
13
|
+
/** snap 的对齐粒度(单位)(日视图=slotStepHours;天维度=1) */
|
|
14
|
+
tickUnit: number;
|
|
15
|
+
/** 输出尺寸下限(与 scalePerUnit 同量纲),比例模式兜底可点击宽度 */
|
|
16
|
+
minSize: number;
|
|
17
|
+
}
|
|
18
|
+
export interface AxisSpan {
|
|
19
|
+
offset: number;
|
|
20
|
+
size: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function mapAxisSpan(axis: TickAxis, startUnit: number, endUnit: number, mode: TickFillMode): AxisSpan;
|
|
23
|
+
/**
|
|
24
|
+
* 天维度:把(列下标, 当天浮点小时)折算成连续「天单位」坐标。
|
|
25
|
+
* frac 限制在 [0,1],使跨日首尾按当天营业小时占比收口。
|
|
26
|
+
*
|
|
27
|
+
* 营业窗口起点 `dayGridMin` 可能不是 0 点、甚至接近午夜(跨午夜营业,如 23:59 起)。
|
|
28
|
+
* 此时 `hour - dayGridMin` 对白天小时会变负而被 clamp 成 0,导致所有预约挤到格子开头。
|
|
29
|
+
* 因此先对 24h 做环绕,得到「距营业起点的正向偏移」,再按 span 归一化。
|
|
30
|
+
*/
|
|
31
|
+
export declare function dayGridUnit(colIndex: number, hour: number, dayGridMin: number, dayGridSpan: number): number;
|
|
32
|
+
export declare function resolveTickFillMode(view: CalendarViewKind, override: TickFillMode | undefined): TickFillMode;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { PisellTimeRangeDisplay, default } from './PisellTimeRangeDisplay';
|
|
2
|
+
export type { PisellTimeRangeDisplayProps, TimeRangeFieldType, TimeRangeFieldConfig, DurationFormatConfig, DayjsLike, } from './types';
|
|
3
|
+
export type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign, } from './types';
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import type { CSSProperties } from 'react';
|
|
2
|
+
import type { Dayjs } from 'dayjs';
|
|
3
|
+
import type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign } from '../pisellDateTimeDisplay/types';
|
|
4
|
+
export type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, ContainerStyleConfig, TextStyleConfig, TextAlign, };
|
|
5
|
+
/**
|
|
6
|
+
* 字段类型(时间区间、日期、星期、持续时长)
|
|
7
|
+
* - time: 时间区间块(HH:mm-HH:mm 或跨天起止)
|
|
8
|
+
* - date: 日期块
|
|
9
|
+
* - weekday: 星期块
|
|
10
|
+
* - duration: 持续时长块
|
|
11
|
+
*/
|
|
12
|
+
export declare type TimeRangeFieldType = 'time' | 'date' | 'weekday' | 'duration';
|
|
13
|
+
/**
|
|
14
|
+
* 持续时长格式配置
|
|
15
|
+
*/
|
|
16
|
+
export interface DurationFormatConfig {
|
|
17
|
+
/**
|
|
18
|
+
* 是否显示秒
|
|
19
|
+
* @default false
|
|
20
|
+
* @example true -> "2h30m23s" | false -> "2h30m"
|
|
21
|
+
*/
|
|
22
|
+
showSeconds?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 字段配置
|
|
26
|
+
*/
|
|
27
|
+
export interface TimeRangeFieldConfig {
|
|
28
|
+
/**
|
|
29
|
+
* 是否显示时间区间块
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
showTimeRange?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* 是否显示日期块
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
showDate?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* 是否显示星期块
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
showWeekday?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* 是否显示持续时长块
|
|
45
|
+
* @default true
|
|
46
|
+
*/
|
|
47
|
+
showDuration?: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 字段顺序(四类块可任意排序;默认 时间 日期 星期 持续时长,可实现「持续时间在前」等)
|
|
50
|
+
* @default ['weekday', 'date', 'time', 'duration'] 换行顺序:先持续时间 → 结束时间(跨天)→ 开始/结束时间与日期 → 星期
|
|
51
|
+
*/
|
|
52
|
+
fieldOrder?: TimeRangeFieldType[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* startAt / endAt 的 dayjs 兼容值
|
|
56
|
+
*/
|
|
57
|
+
export declare type DayjsLike = Dayjs | string | number;
|
|
58
|
+
/**
|
|
59
|
+
* PisellTimeRangeDisplay 组件 Props
|
|
60
|
+
*/
|
|
61
|
+
export interface PisellTimeRangeDisplayProps {
|
|
62
|
+
/**
|
|
63
|
+
* 开始时间(dayjs 兼容值)
|
|
64
|
+
*/
|
|
65
|
+
startAt: DayjsLike;
|
|
66
|
+
/**
|
|
67
|
+
* 结束时间(dayjs 兼容值)
|
|
68
|
+
*/
|
|
69
|
+
endAt: DayjsLike;
|
|
70
|
+
/**
|
|
71
|
+
* 文本对齐方式(单行/多行均生效)
|
|
72
|
+
* @default 'center'
|
|
73
|
+
*/
|
|
74
|
+
textAlign?: TextAlign;
|
|
75
|
+
/**
|
|
76
|
+
* 字段显示与排序配置
|
|
77
|
+
*/
|
|
78
|
+
fields?: TimeRangeFieldConfig;
|
|
79
|
+
/**
|
|
80
|
+
* 同一天时是否显示具体日期
|
|
81
|
+
* @default true
|
|
82
|
+
*/
|
|
83
|
+
showDateForSameDay?: boolean;
|
|
84
|
+
/**
|
|
85
|
+
* 时间格式配置(复用 PisellDateTimeDisplay)
|
|
86
|
+
*/
|
|
87
|
+
timeFormat?: TimeFormatConfig;
|
|
88
|
+
/**
|
|
89
|
+
* 日期格式配置(复用 PisellDateTimeDisplay)
|
|
90
|
+
*/
|
|
91
|
+
dateFormat?: DateFormatConfig;
|
|
92
|
+
/**
|
|
93
|
+
* 星期格式配置(复用 PisellDateTimeDisplay)
|
|
94
|
+
*/
|
|
95
|
+
weekdayFormat?: WeekdayFormatConfig;
|
|
96
|
+
/**
|
|
97
|
+
* 持续时长格式配置
|
|
98
|
+
*/
|
|
99
|
+
durationFormat?: DurationFormatConfig;
|
|
100
|
+
/**
|
|
101
|
+
* 容器样式
|
|
102
|
+
*/
|
|
103
|
+
containerStyle?: ContainerStyleConfig;
|
|
104
|
+
/**
|
|
105
|
+
* 时间区间文本样式
|
|
106
|
+
*/
|
|
107
|
+
timeStyle?: TextStyleConfig;
|
|
108
|
+
/**
|
|
109
|
+
* 开始时间文本样式,会覆盖 timeStyle 中的同名字段
|
|
110
|
+
*/
|
|
111
|
+
startTimeStyle?: TextStyleConfig;
|
|
112
|
+
/**
|
|
113
|
+
* 结束时间文本样式,会覆盖 timeStyle 中的同名字段
|
|
114
|
+
*/
|
|
115
|
+
endTimeStyle?: TextStyleConfig;
|
|
116
|
+
/**
|
|
117
|
+
* 日期文本样式
|
|
118
|
+
*/
|
|
119
|
+
dateStyle?: TextStyleConfig;
|
|
120
|
+
/**
|
|
121
|
+
* 星期文本样式
|
|
122
|
+
*/
|
|
123
|
+
weekdayStyle?: TextStyleConfig;
|
|
124
|
+
/**
|
|
125
|
+
* 持续时长文本样式
|
|
126
|
+
*/
|
|
127
|
+
durationStyle?: TextStyleConfig;
|
|
128
|
+
/**
|
|
129
|
+
* dayjs locale(语言代码)
|
|
130
|
+
* @default 优先使用全局配置,其次浏览器语言
|
|
131
|
+
*/
|
|
132
|
+
locale?: string;
|
|
133
|
+
/**
|
|
134
|
+
* 自定义类名
|
|
135
|
+
*/
|
|
136
|
+
className?: string;
|
|
137
|
+
/**
|
|
138
|
+
* 自定义样式
|
|
139
|
+
*/
|
|
140
|
+
style?: CSSProperties;
|
|
141
|
+
/**
|
|
142
|
+
* 点击回调
|
|
143
|
+
*/
|
|
144
|
+
onClick?: () => void;
|
|
145
|
+
}
|
|
@@ -84,7 +84,7 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
84
84
|
{
|
|
85
85
|
className: (0, import_classnames.default)(
|
|
86
86
|
`${import__.PREFIX}__footer-price-wrap`,
|
|
87
|
-
weighingInfo && `${import__.PREFIX}__footer-price-wrap--weighing`
|
|
87
|
+
weighingInfo && import__.ENABLE_LARGE_WEIGHING_FONT && `${import__.PREFIX}__footer-price-wrap--weighing`
|
|
88
88
|
)
|
|
89
89
|
},
|
|
90
90
|
!isOnlyTotal ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__footer-price`) }, /* @__PURE__ */ import_react.default.createElement("span", null, formatFooterAmount(total)), tip ? /* @__PURE__ */ import_react.default.createElement(import_antd2.Tooltip, { title: import_utils2.locales.getText(tip), destroyTooltipOnHide: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -87,7 +87,7 @@ var BasicInfo = (props) => {
|
|
|
87
87
|
const hasWeighingInfo = Boolean(weighingInfo);
|
|
88
88
|
const hasProductMeta = hasSpecs || hasWeighingInfo;
|
|
89
89
|
const basicInfoClassName = (0, import_classnames.default)(`${import__.PREFIX}__basic-info`, {
|
|
90
|
-
[`${import__.PREFIX}__basic-info--weighing`]: hasWeighingInfo
|
|
90
|
+
[`${import__.PREFIX}__basic-info--weighing`]: hasWeighingInfo && import__.ENABLE_LARGE_WEIGHING_FONT
|
|
91
91
|
});
|
|
92
92
|
const renderProductMeta = () => {
|
|
93
93
|
if (!hasProductMeta) {
|
|
@@ -97,7 +97,7 @@ var BasicInfo = (props) => {
|
|
|
97
97
|
"div",
|
|
98
98
|
{
|
|
99
99
|
className: (0, import_classnames.default)(`${import__.PREFIX}__product-meta`, {
|
|
100
|
-
[`${import__.PREFIX}__product-meta--weighing`]: hasWeighingInfo
|
|
100
|
+
[`${import__.PREFIX}__product-meta--weighing`]: hasWeighingInfo && import__.ENABLE_LARGE_WEIGHING_FONT
|
|
101
101
|
})
|
|
102
102
|
},
|
|
103
103
|
hasWeighingInfo ? /* @__PURE__ */ import_react.default.createElement(import_weighing.default, { dataSource: weighingInfo, symbol }) : null,
|
|
@@ -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;
|
|
@@ -34,6 +34,7 @@ __export(weighing_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(weighing_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
37
38
|
var import__ = require("../../index");
|
|
38
39
|
var import_index = require("./index.less");
|
|
39
40
|
var formatWeight = (value, unit) => {
|
|
@@ -73,7 +74,9 @@ var Weighing = (props) => {
|
|
|
73
74
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__weighing` }, tareValue > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
74
75
|
"div",
|
|
75
76
|
{
|
|
76
|
-
className: `${import__.PREFIX}__weighing-row
|
|
77
|
+
className: (0, import_classnames.default)(`${import__.PREFIX}__weighing-row`, {
|
|
78
|
+
[`${import__.PREFIX}__weighing-row--large`]: import__.ENABLE_LARGE_WEIGHING_FONT
|
|
79
|
+
})
|
|
77
80
|
},
|
|
78
81
|
/* @__PURE__ */ import_react.default.createElement("span", null, `${manualPrefix}${grossLabel}: ${formatWeight(
|
|
79
82
|
weight,
|
|
@@ -82,7 +85,9 @@ var Weighing = (props) => {
|
|
|
82
85
|
) : null, tareValue > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
83
86
|
"div",
|
|
84
87
|
{
|
|
85
|
-
className: `${import__.PREFIX}__weighing-row
|
|
88
|
+
className: (0, import_classnames.default)(`${import__.PREFIX}__weighing-row`, {
|
|
89
|
+
[`${import__.PREFIX}__weighing-row--large`]: import__.ENABLE_LARGE_WEIGHING_FONT
|
|
90
|
+
})
|
|
86
91
|
},
|
|
87
92
|
/* @__PURE__ */ import_react.default.createElement("span", null, `${tareLabel}: ${formatWeight(
|
|
88
93
|
(tare == null ? void 0 : tare.value) ?? tare_weight,
|
|
@@ -91,7 +96,9 @@ var Weighing = (props) => {
|
|
|
91
96
|
) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
92
97
|
"div",
|
|
93
98
|
{
|
|
94
|
-
className: `${import__.PREFIX}__weighing-row
|
|
99
|
+
className: (0, import_classnames.default)(`${import__.PREFIX}__weighing-row`, {
|
|
100
|
+
[`${import__.PREFIX}__weighing-row--large`]: import__.ENABLE_LARGE_WEIGHING_FONT
|
|
101
|
+
})
|
|
95
102
|
},
|
|
96
103
|
/* @__PURE__ */ import_react.default.createElement("span", null, netWeightText),
|
|
97
104
|
/* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__weighing-unit-price` }, `@ ${unitPriceText}/${unitLabel}`)
|
|
@@ -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 = false;
|
|
15
|
+
declare const CartSkuCard: (props: ISKUCardProps) => React.JSX.Element | null;
|
|
16
|
+
export default CartSkuCard;
|
|
@@ -29,6 +29,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/productCard/cartSkuCard/index.tsx
|
|
30
30
|
var cartSkuCard_exports = {};
|
|
31
31
|
__export(cartSkuCard_exports, {
|
|
32
|
+
ENABLE_LARGE_WEIGHING_FONT: () => ENABLE_LARGE_WEIGHING_FONT,
|
|
32
33
|
PREFIX: () => PREFIX,
|
|
33
34
|
default: () => cartSkuCard_default
|
|
34
35
|
});
|
|
@@ -57,6 +58,7 @@ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext")
|
|
|
57
58
|
var import_Action = __toESM(require("../components/Action"));
|
|
58
59
|
var import_status = require("../status");
|
|
59
60
|
var PREFIX = "pisell-cart-sku-card";
|
|
61
|
+
var ENABLE_LARGE_WEIGHING_FONT = false;
|
|
60
62
|
var CartSkuCard = (props) => {
|
|
61
63
|
var _a, _b;
|
|
62
64
|
const {
|
|
@@ -358,5 +360,6 @@ var CartSkuCard = (props) => {
|
|
|
358
360
|
var cartSkuCard_default = CartSkuCard;
|
|
359
361
|
// Annotate the CommonJS export names for ESM import in node:
|
|
360
362
|
0 && (module.exports = {
|
|
363
|
+
ENABLE_LARGE_WEIGHING_FONT,
|
|
361
364
|
PREFIX
|
|
362
365
|
});
|
|
@@ -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;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import '../../../cartSkuCard/components/resources/index.less';
|
|
3
|
+
interface LineItemResourcesProps {
|
|
4
|
+
dataSource?: any;
|
|
5
|
+
}
|
|
6
|
+
declare const LineItemResources: (props: LineItemResourcesProps) => React.JSX.Element | null;
|
|
7
|
+
export default LineItemResources;
|
|
@@ -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;
|