@pisell/materials 6.12.54 → 6.12.56
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 +3 -3
- package/build/lowcode/preview.css +1 -1
- package/build/lowcode/preview.js +1 -1
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +48 -48
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +48 -48
- package/es/components/PisellBasicGrid/PisellBasicGrid.d.ts +1 -2
- package/es/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +1 -2
- package/es/components/PisellCards/components/MultilevelCard/MultilevelCard.d.ts +1 -1
- package/es/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts +1 -2
- package/es/components/PisellCards/components/TabCard/TabCard.d.ts +1 -2
- package/es/components/PisellCards/components/TextCard/TextCard.d.ts +1 -2
- package/es/components/PisellCards/index.d.ts +5 -6
- package/es/components/PisellGroupView/PisellGroupView.d.ts +1 -2
- package/es/components/PisellLayouts/index.d.ts +2 -2
- package/es/components/PisellMetrics/index.d.ts +2 -2
- package/es/components/appVersionControl/index.d.ts +1 -2
- package/es/components/auto-complete-number/index.d.ts +1 -2
- package/es/components/badge/index.d.ts +1 -2
- package/es/components/batch-editor/index.d.ts +1 -2
- package/es/components/calendar/index.d.ts +1 -3
- package/es/components/cardMetricItem/index.d.ts +1 -1
- package/es/components/cardPro/index.d.ts +1 -2
- package/es/components/checkbox/index.d.ts +1 -3
- package/es/components/classicLayout/index.d.ts +1 -2
- package/es/components/config-provider/index.d.ts +1 -2
- package/es/components/customSelect/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/group/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -2
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -3
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -2
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -2
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -2
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -2
- package/es/components/date-picker/index.d.ts +1 -3
- package/es/components/drag-sort-tree/index.d.ts +1 -2
- package/es/components/dropdown/index.d.ts +1 -3
- package/es/components/filter/index.d.ts +1 -2
- package/es/components/keyboard/index.d.ts +1 -1
- package/es/components/list/index.d.ts +1 -2
- package/es/components/lowCodePage/index.d.ts +1 -3
- package/es/components/page/index.d.ts +1 -2
- package/es/components/page-header/index.d.ts +1 -1
- package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -2
- package/es/components/pisellAdjustPrice/index.d.ts +1 -2
- package/es/components/pisellAlert/index.d.ts +1 -1
- package/es/components/pisellCard/index.d.ts +1 -2
- package/es/components/pisellCheckboxGroup/index.d.ts +1 -1
- package/es/components/pisellCountdown/index.d.ts +1 -1
- package/es/components/pisellDatePicker/index.d.ts +1 -3
- package/es/components/pisellDraggable/index.d.ts +1 -1
- package/es/components/pisellEmpty/index.d.ts +1 -1
- package/es/components/pisellFilter/index.d.ts +1 -2
- package/es/components/pisellFloatingPanel/index.d.ts +1 -1
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +4 -5
- package/es/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.d.ts +1 -2
- package/es/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +1 -3
- package/es/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +1 -2
- package/es/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +1 -1
- package/es/components/pisellGoodPassCard/index.d.ts +1 -1
- package/es/components/pisellGridPro/GridView/index.d.ts +1 -2
- package/es/components/pisellInformationEntry/index.d.ts +1 -1
- package/es/components/pisellInput/components/BankCard/index.d.ts +0 -1
- package/es/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/es/components/pisellInput/components/SecurityCode/index.d.ts +0 -1
- package/es/components/pisellInput/index.d.ts +4 -5
- package/es/components/pisellLoading/index.d.ts +1 -2
- package/es/components/pisellModal/index.d.ts +2 -2
- package/es/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +1 -2
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +1 -2
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +1 -2
- package/es/components/pisellRow/index.d.ts +1 -1
- package/es/components/pisellSort/index.d.ts +1 -2
- package/es/components/pisellStatisticList/index.d.ts +1 -1
- package/es/components/pisellTags/index.d.ts +1 -1
- package/es/components/pisellText/index.d.ts +2 -2
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +1 -2
- package/es/components/pisellTooltip/index.d.ts +1 -2
- package/es/components/pisellUpload/index.d.ts +1 -2
- package/es/components/pisellWalletPassCard/index.d.ts +3 -1
- package/es/components/pisellWalletPassCard/index.js +2 -2
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +2 -1
- package/es/components/productCard/cartSkuCard/components/Note/index.less +6 -2
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +5 -4
- package/es/components/productCard/cartSkuCard/components/packages/index.js +5 -3
- package/es/components/productCard/cartSkuCard/components/specs/index.js +5 -3
- package/es/components/productCard/components/Packages/components/options/index.js +3 -2
- package/es/components/productCard/lineItem/index.js +16 -9
- package/es/components/qrcode/index.d.ts +1 -3
- package/es/components/radio/index.d.ts +1 -3
- package/es/components/section-footers/index.d.ts +1 -3
- package/es/components/segmented/index.d.ts +1 -2
- package/es/components/select-time/index.d.ts +1 -2
- package/es/components/skeleton/index.d.ts +1 -3
- package/es/components/slider/index.d.ts +1 -3
- package/es/components/tabs/index.d.ts +2 -2
- package/es/components/time-picker/index.d.ts +1 -3
- package/es/components/upload/index.d.ts +1 -3
- package/es/components/versionSelect/index.d.ts +0 -1
- package/es/components/virtual-keyboard/Amount/index.d.ts +1 -2
- package/es/components/virtual-keyboard/Number/index.d.ts +1 -2
- package/es/components/virtual-keyboard/Time/index.d.ts +1 -1
- package/es/components/virtual-keyboard/index.d.ts +1 -1
- package/lib/components/PisellBasicGrid/PisellBasicGrid.d.ts +1 -2
- package/lib/components/PisellCards/components/GraphicTextCard/GraphicTextCard.d.ts +1 -2
- package/lib/components/PisellCards/components/MultilevelCard/MultilevelCard.d.ts +1 -1
- package/lib/components/PisellCards/components/PisellImageCard/PisellImageCard.d.ts +1 -2
- package/lib/components/PisellCards/components/TabCard/TabCard.d.ts +1 -2
- package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +1 -2
- package/lib/components/PisellCards/index.d.ts +5 -6
- package/lib/components/PisellGroupView/PisellGroupView.d.ts +1 -2
- package/lib/components/PisellLayouts/index.d.ts +2 -2
- package/lib/components/PisellMetrics/index.d.ts +2 -2
- package/lib/components/appVersionControl/index.d.ts +1 -2
- package/lib/components/auto-complete-number/index.d.ts +1 -2
- package/lib/components/badge/index.d.ts +1 -2
- package/lib/components/batch-editor/index.d.ts +1 -2
- package/lib/components/calendar/index.d.ts +1 -3
- package/lib/components/cardMetricItem/index.d.ts +1 -1
- package/lib/components/cardPro/index.d.ts +1 -2
- package/lib/components/checkbox/index.d.ts +1 -3
- package/lib/components/classicLayout/index.d.ts +1 -2
- package/lib/components/config-provider/index.d.ts +1 -2
- package/lib/components/customSelect/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +1 -2
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -3
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +1 -2
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -2
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -2
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -2
- package/lib/components/date-picker/index.d.ts +1 -3
- package/lib/components/drag-sort-tree/index.d.ts +1 -2
- package/lib/components/dropdown/index.d.ts +1 -3
- package/lib/components/filter/index.d.ts +1 -2
- package/lib/components/keyboard/index.d.ts +1 -1
- package/lib/components/list/index.d.ts +1 -2
- package/lib/components/lowCodePage/index.d.ts +1 -3
- package/lib/components/page/index.d.ts +1 -2
- package/lib/components/page-header/index.d.ts +1 -1
- package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +1 -2
- package/lib/components/pisellAdjustPrice/index.d.ts +1 -2
- package/lib/components/pisellAlert/index.d.ts +1 -1
- package/lib/components/pisellCard/index.d.ts +1 -2
- package/lib/components/pisellCheckboxGroup/index.d.ts +1 -1
- package/lib/components/pisellCountdown/index.d.ts +1 -1
- package/lib/components/pisellDatePicker/index.d.ts +1 -3
- package/lib/components/pisellDraggable/index.d.ts +1 -1
- package/lib/components/pisellEmpty/index.d.ts +1 -1
- package/lib/components/pisellFilter/index.d.ts +1 -2
- package/lib/components/pisellFloatingPanel/index.d.ts +1 -1
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +4 -5
- package/lib/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.d.ts +1 -2
- package/lib/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts +1 -3
- package/lib/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +1 -2
- package/lib/components/pisellFloorMapLayout/context/FloorMapLayoutContext.d.ts +1 -1
- package/lib/components/pisellGoodPassCard/index.d.ts +1 -1
- package/lib/components/pisellGridPro/GridView/index.d.ts +1 -2
- package/lib/components/pisellInformationEntry/index.d.ts +1 -1
- package/lib/components/pisellInput/components/BankCard/index.d.ts +0 -1
- package/lib/components/pisellInput/components/Copy/index.d.ts +0 -1
- package/lib/components/pisellInput/components/SecurityCode/index.d.ts +0 -1
- package/lib/components/pisellInput/index.d.ts +4 -5
- package/lib/components/pisellLoading/index.d.ts +1 -2
- package/lib/components/pisellModal/index.d.ts +2 -2
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +1 -2
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.d.ts +1 -2
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts +1 -2
- package/lib/components/pisellRow/index.d.ts +1 -1
- package/lib/components/pisellSort/index.d.ts +1 -2
- package/lib/components/pisellStatisticList/index.d.ts +1 -1
- package/lib/components/pisellTags/index.d.ts +1 -1
- package/lib/components/pisellText/index.d.ts +2 -2
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.d.ts +1 -2
- package/lib/components/pisellTooltip/index.d.ts +1 -2
- package/lib/components/pisellUpload/index.d.ts +1 -2
- package/lib/components/pisellWalletPassCard/index.d.ts +3 -1
- package/lib/components/pisellWalletPassCard/index.js +2 -2
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +2 -1
- package/lib/components/productCard/cartSkuCard/components/Note/index.less +6 -2
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +5 -4
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +5 -3
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +5 -3
- package/lib/components/productCard/components/Packages/components/options/index.js +3 -2
- package/lib/components/productCard/lineItem/index.js +16 -9
- package/lib/components/qrcode/index.d.ts +1 -3
- package/lib/components/radio/index.d.ts +1 -3
- package/lib/components/section-footers/index.d.ts +1 -3
- package/lib/components/segmented/index.d.ts +1 -2
- package/lib/components/select-time/index.d.ts +1 -2
- package/lib/components/skeleton/index.d.ts +1 -3
- package/lib/components/slider/index.d.ts +1 -3
- package/lib/components/tabs/index.d.ts +2 -2
- package/lib/components/time-picker/index.d.ts +1 -3
- package/lib/components/upload/index.d.ts +1 -3
- package/lib/components/versionSelect/index.d.ts +0 -1
- package/lib/components/virtual-keyboard/Amount/index.d.ts +1 -2
- package/lib/components/virtual-keyboard/Number/index.d.ts +1 -2
- package/lib/components/virtual-keyboard/Time/index.d.ts +1 -1
- package/lib/components/virtual-keyboard/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PisellFilterProps } from "./type.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/components/pisellFilter/index.d.ts
|
|
5
|
-
declare const PisellFilter: (props: PisellFilterProps) =>
|
|
4
|
+
declare const PisellFilter: (props: PisellFilterProps) => JSX.Element;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { PisellFilter };
|
|
@@ -13,6 +13,6 @@ interface PisellFloatingPanelProps {
|
|
|
13
13
|
style?: React.CSSProperties;
|
|
14
14
|
retractIconStyle?: React.CSSProperties;
|
|
15
15
|
}
|
|
16
|
-
declare const PisellFloatingPanel: (props: PisellFloatingPanelProps) =>
|
|
16
|
+
declare const PisellFloatingPanel: (props: PisellFloatingPanelProps) => JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { PisellFloatingPanel };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FloorMapDataSources, FloorMapMergedItem } from "../types.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts
|
|
5
4
|
type FigmaTableStatus = 'available' | 'reserved' | 'waiting' | 'dining' | 'billed' | 'availableSoon';
|
|
@@ -32,12 +31,12 @@ interface FigmaTableCardItem {
|
|
|
32
31
|
/** 从 merged item + dataSources 得到卡片数据 */
|
|
33
32
|
declare function getFigmaTableCardFromMerged(item: FloorMapMergedItem, dataSources: FloorMapDataSources): FigmaTableCardItem;
|
|
34
33
|
/** 渲染 Figma 样式的方桌卡片(上下小条 + 资源信息标题栏 + 白底卡片 + 状态色边框) */
|
|
35
|
-
declare function renderFigmaStyleTableCard(cardItem: FigmaTableCardItem):
|
|
34
|
+
declare function renderFigmaStyleTableCard(cardItem: FigmaTableCardItem): JSX.Element;
|
|
36
35
|
/** 渲染 Figma 样式的圆桌卡片(顶部资源信息 chip + 圆形主体,圆形主体只展示状态相关内容) */
|
|
37
|
-
declare function renderFigmaStyleRoundTableCard(cardItem: FigmaTableCardItem):
|
|
36
|
+
declare function renderFigmaStyleRoundTableCard(cardItem: FigmaTableCardItem): JSX.Element;
|
|
38
37
|
/** 返回用于 renderItemByKind.table 的渲染函数(方桌) */
|
|
39
|
-
declare function getRenderItemByKindTable(dataSources: FloorMapDataSources): (item: unknown) =>
|
|
38
|
+
declare function getRenderItemByKindTable(dataSources: FloorMapDataSources): (item: unknown) => JSX.Element;
|
|
40
39
|
/** 返回用于 renderItemByKind.roundTable 的渲染函数(圆桌) */
|
|
41
|
-
declare function getRenderItemByKindRoundTable(dataSources: FloorMapDataSources): (item: unknown) =>
|
|
40
|
+
declare function getRenderItemByKindRoundTable(dataSources: FloorMapDataSources): (item: unknown) => JSX.Element;
|
|
42
41
|
//#endregion
|
|
43
42
|
export { FigmaTableCardItem, FigmaTableStatus, getFigmaTableCardFromMerged, getRenderItemByKindRoundTable, getRenderItemByKindTable, renderFigmaStyleRoundTableCard, renderFigmaStyleTableCard };
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { FloorMapBuiltinShapeRenderProps } from "../utils/floorMapBuiltinShapes.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/components/pisellFloorMapLayout/components/FloorMapBuiltinShapeElement.d.ts
|
|
5
4
|
interface FloorMapBuiltinShapeElementProps extends FloorMapBuiltinShapeRenderProps {
|
|
6
5
|
builtinShapeKey?: string;
|
|
7
6
|
name?: string;
|
|
8
7
|
}
|
|
9
|
-
declare function FloorMapBuiltinShapeElement(props: FloorMapBuiltinShapeElementProps):
|
|
8
|
+
declare function FloorMapBuiltinShapeElement(props: FloorMapBuiltinShapeElementProps): JSX.Element;
|
|
10
9
|
//#endregion
|
|
11
10
|
export { FloorMapBuiltinShapeElement };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
|
|
3
1
|
//#region src/components/pisellFloorMapLayout/components/FloorMapImageElement.d.ts
|
|
4
2
|
interface FloorMapImageElementProps {
|
|
5
3
|
imageUrl?: string;
|
|
6
4
|
name?: string;
|
|
7
5
|
}
|
|
8
|
-
declare function FloorMapImageElement(props: FloorMapImageElementProps):
|
|
6
|
+
declare function FloorMapImageElement(props: FloorMapImageElementProps): JSX.Element;
|
|
9
7
|
//#endregion
|
|
10
8
|
export { FloorMapImageElement };
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
//#region src/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts
|
|
3
2
|
interface FloorMapSelectionZoneElementProps {
|
|
4
3
|
/** 选区名称;为空时展示「未命名选区」占位 */
|
|
5
4
|
name?: string;
|
|
6
5
|
}
|
|
7
|
-
declare function FloorMapSelectionZoneElement(props: FloorMapSelectionZoneElementProps):
|
|
6
|
+
declare function FloorMapSelectionZoneElement(props: FloorMapSelectionZoneElementProps): JSX.Element;
|
|
8
7
|
//#endregion
|
|
9
8
|
export { FloorMapSelectionZoneElement };
|
|
@@ -15,6 +15,6 @@ interface FloorMapLayoutProviderProps {
|
|
|
15
15
|
declare function FloorMapLayoutProvider({
|
|
16
16
|
value,
|
|
17
17
|
children
|
|
18
|
-
}: FloorMapLayoutProviderProps):
|
|
18
|
+
}: FloorMapLayoutProviderProps): JSX.Element;
|
|
19
19
|
//#endregion
|
|
20
20
|
export { EMPTY_FLOOR_MAP_LAYOUT_CONTEXT, FloorMapLayoutProvider, FloorMapLayoutProviderProps, useFloorMapLayoutContext };
|
|
@@ -46,6 +46,6 @@ interface PisellGoodPassCardProps {
|
|
|
46
46
|
mixedSort?: (val: Discount[]) => Discount[];
|
|
47
47
|
isInModal: boolean;
|
|
48
48
|
}
|
|
49
|
-
declare const index: (props: PisellGoodPassCardProps) =>
|
|
49
|
+
declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
|
|
50
50
|
//#endregion
|
|
51
51
|
export { index };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { GridViewProps } from "./type.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
//#region src/components/pisellGridPro/GridView/index.d.ts
|
|
4
|
-
declare const GridView: (props: GridViewProps) =>
|
|
3
|
+
declare const GridView: (props: GridViewProps) => JSX.Element;
|
|
5
4
|
//#endregion
|
|
6
5
|
export { GridView };
|
|
@@ -29,6 +29,6 @@ interface PisellInformationEntryProps extends Omit<React.HTMLAttributes<HTMLDivE
|
|
|
29
29
|
/** 录入类型切换时候触发的 */
|
|
30
30
|
onChangeType?: (val: null | EntryModeType['type']) => void;
|
|
31
31
|
}
|
|
32
|
-
declare const PisellInformationEntry: (props: PisellInformationEntryProps) =>
|
|
32
|
+
declare const PisellInformationEntry: (props: PisellInformationEntryProps) => JSX.Element;
|
|
33
33
|
//#endregion
|
|
34
34
|
export { PisellInformationEntry };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { PisellContextType } from "../../../pisell-config-provider/context.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import { InputProps } from "antd";
|
|
4
3
|
//#region src/components/pisellInput/components/SecurityCode/index.d.ts
|
|
5
4
|
interface SecurityCodeProps extends Omit<InputProps, 'onChange'> {
|
|
@@ -2,17 +2,16 @@ import { PisellContextType } from "../pisell-config-provider/context.js";
|
|
|
2
2
|
import { BankCardProps } from "./components/BankCard/index.js";
|
|
3
3
|
import { SecurityCodeProps } from "./components/SecurityCode/index.js";
|
|
4
4
|
import { CopyProps } from "./components/Copy/index.js";
|
|
5
|
-
import React from "react";
|
|
6
5
|
import { InputProps } from "antd";
|
|
7
6
|
|
|
8
7
|
//#region src/components/pisellInput/index.d.ts
|
|
9
8
|
declare const PisellInput: {
|
|
10
9
|
(props: InputProps & {
|
|
11
10
|
/** 平台 */platform?: PisellContextType['platform'];
|
|
12
|
-
}):
|
|
13
|
-
BankCard: (props: BankCardProps) =>
|
|
14
|
-
SecurityCode: (props: SecurityCodeProps) =>
|
|
15
|
-
Copy: (props: CopyProps) =>
|
|
11
|
+
}): JSX.Element;
|
|
12
|
+
BankCard: (props: BankCardProps) => JSX.Element;
|
|
13
|
+
SecurityCode: (props: SecurityCodeProps) => JSX.Element;
|
|
14
|
+
Copy: (props: CopyProps) => JSX.Element;
|
|
16
15
|
};
|
|
17
16
|
//#endregion
|
|
18
17
|
export { PisellInput };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { SpinProps } from "antd";
|
|
3
2
|
//#region src/components/pisellLoading/index.d.ts
|
|
4
3
|
type MaskType = {
|
|
@@ -16,6 +15,6 @@ interface PisellLoadingProps extends SpinProps {
|
|
|
16
15
|
/** 延迟显示加载效果的时间(防止闪烁) */
|
|
17
16
|
delay?: number;
|
|
18
17
|
}
|
|
19
|
-
declare const PisellLoading: (props: PisellLoadingProps) =>
|
|
18
|
+
declare const PisellLoading: (props: PisellLoadingProps) => JSX.Element;
|
|
20
19
|
//#endregion
|
|
21
20
|
export { PisellLoading };
|
|
@@ -40,7 +40,7 @@ interface PisellModalProps extends ModalProps {
|
|
|
40
40
|
maskProps?: React.HTMLAttributes<HTMLDivElement>;
|
|
41
41
|
}
|
|
42
42
|
declare const PisellModal: {
|
|
43
|
-
(props: PisellModalProps):
|
|
43
|
+
(props: PisellModalProps): JSX.Element;
|
|
44
44
|
confirm: (props: PisellModalFuncProps) => {
|
|
45
45
|
destroy: () => void;
|
|
46
46
|
update: (configUpdate: _$antd.ModalFuncProps | ((prevConfig: _$antd.ModalFuncProps) => _$antd.ModalFuncProps)) => void;
|
|
@@ -62,7 +62,7 @@ declare const PisellModal: {
|
|
|
62
62
|
destroy: () => void;
|
|
63
63
|
update: (configUpdate: _$antd.ModalFuncProps | ((prevConfig: _$antd.ModalFuncProps) => _$antd.ModalFuncProps)) => void;
|
|
64
64
|
};
|
|
65
|
-
Information: (props: InformationProps) =>
|
|
65
|
+
Information: (props: InformationProps) => JSX.Element;
|
|
66
66
|
};
|
|
67
67
|
//#endregion
|
|
68
68
|
export { PisellModal, PisellModalProps };
|
package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { RecordBoardCalendarProps } from "../../types.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts
|
|
5
4
|
type PisellRecordBoardCalendarViewProps = RecordBoardCalendarProps;
|
|
@@ -10,6 +9,6 @@ type PisellRecordBoardCalendarViewProps = RecordBoardCalendarProps;
|
|
|
10
9
|
* 只做「占位与裁剪高度」;本组件根节点负责在同一 flex 列里向下传递 **min-height:0**,避免 `BookingCalendar`
|
|
11
10
|
* 撑破壳层(一层即可,历史上曾双包一层重复 flex+overflow)。
|
|
12
11
|
*/
|
|
13
|
-
declare function PisellRecordBoardCalendarView(props: PisellRecordBoardCalendarViewProps):
|
|
12
|
+
declare function PisellRecordBoardCalendarView(props: PisellRecordBoardCalendarViewProps): JSX.Element;
|
|
14
13
|
//#endregion
|
|
15
14
|
export { PisellRecordBoardCalendarView, PisellRecordBoardCalendarViewProps };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { PisellReservationScheduleProps } from "./types.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
//#region src/components/pisellReservationSchedule/PisellReservationSchedule.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* 营业日导航条:上一日、中间日期文案、下一日(深色条样式,适配预约顶栏)
|
|
6
5
|
*/
|
|
7
|
-
declare function PisellReservationSchedule(props: PisellReservationScheduleProps):
|
|
6
|
+
declare function PisellReservationSchedule(props: PisellReservationScheduleProps): JSX.Element;
|
|
8
7
|
declare namespace PisellReservationSchedule {
|
|
9
8
|
var displayName: string;
|
|
10
9
|
}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { PisellReservationScheduleBandProps } from "./types.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
//#region src/components/pisellReservationScheduleBand/PisellReservationScheduleBand.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* 预约顶栏组合:营业日切换 + 锚定到选中日的时间导航轴
|
|
6
5
|
*/
|
|
7
|
-
declare function PisellReservationScheduleBand(props: PisellReservationScheduleBandProps):
|
|
6
|
+
declare function PisellReservationScheduleBand(props: PisellReservationScheduleBandProps): JSX.Element;
|
|
8
7
|
declare namespace PisellReservationScheduleBand {
|
|
9
8
|
var displayName: string;
|
|
10
9
|
}
|
|
@@ -18,6 +18,6 @@ interface PisellRowProps extends React.DetailedHTMLProps<React.HTMLAttributes<HT
|
|
|
18
18
|
* @Author: zhiwei.Wang
|
|
19
19
|
* @Date: 2024-08-16 10:38
|
|
20
20
|
*/
|
|
21
|
-
declare const PisellRow: (props: PisellRowProps) =>
|
|
21
|
+
declare const PisellRow: (props: PisellRowProps) => JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { PisellRow, PisellRowProps };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PisellSortProps } from "./type.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
|
|
4
3
|
//#region src/components/pisellSort/index.d.ts
|
|
5
|
-
declare const PisellSort: (props: PisellSortProps) =>
|
|
4
|
+
declare const PisellSort: (props: PisellSortProps) => JSX.Element;
|
|
6
5
|
//#endregion
|
|
7
6
|
export { PisellSort };
|
|
@@ -18,6 +18,6 @@ interface PisellStatisticListProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
18
18
|
}[];
|
|
19
19
|
}[];
|
|
20
20
|
}
|
|
21
|
-
declare const PisellStatisticList: (props: PisellStatisticListProps) =>
|
|
21
|
+
declare const PisellStatisticList: (props: PisellStatisticListProps) => JSX.Element;
|
|
22
22
|
//#endregion
|
|
23
23
|
export { PisellStatisticList, PisellStatisticListProps };
|
|
@@ -9,6 +9,6 @@ interface PisellTagsProps extends React.DetailedHTMLProps<React.HTMLAttributes<H
|
|
|
9
9
|
icon?: React.ReactNode;
|
|
10
10
|
color?: PisellTagsColor;
|
|
11
11
|
}
|
|
12
|
-
declare const PisellTags: (props: PisellTagsProps) =>
|
|
12
|
+
declare const PisellTags: (props: PisellTagsProps) => JSX.Element;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { PisellTags, PisellTagsProps };
|
|
@@ -5,8 +5,8 @@ import React from "react";
|
|
|
5
5
|
//#region src/components/pisellText/index.d.ts
|
|
6
6
|
interface PisellTextProps extends React.HTMLAttributes<HTMLSpanElement> {}
|
|
7
7
|
declare const PisellText: {
|
|
8
|
-
(props: PisellTextProps):
|
|
9
|
-
Amount: (props: AmountProps) =>
|
|
8
|
+
(props: PisellTextProps): JSX.Element;
|
|
9
|
+
Amount: (props: AmountProps) => JSX.Element;
|
|
10
10
|
Editable: React.FC<EditableProps>;
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { PisellTimeNavigatorProps } from "./types.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
//#region src/components/pisellTimeNavigator/PisellTimeNavigator.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* PisellTimeNavigator:可拖动的时间导航轴,时间范围内浏览、选择、控制
|
|
6
5
|
*/
|
|
7
|
-
declare function PisellTimeNavigator(props: PisellTimeNavigatorProps):
|
|
6
|
+
declare function PisellTimeNavigator(props: PisellTimeNavigatorProps): JSX.Element;
|
|
8
7
|
declare namespace PisellTimeNavigator {
|
|
9
8
|
var displayName: string;
|
|
10
9
|
}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { PisellContextType } from "../pisell-config-provider/context.js";
|
|
2
|
-
import React from "react";
|
|
3
2
|
import { TooltipPropsWithTitle } from "antd/es/tooltip";
|
|
4
3
|
//#region src/components/pisellTooltip/index.d.ts
|
|
5
4
|
interface PisellTooltipProps extends TooltipPropsWithTitle {
|
|
6
5
|
/** 平台 */
|
|
7
6
|
platform?: PisellContextType['platform'];
|
|
8
7
|
}
|
|
9
|
-
declare const PisellTooltip: (props: PisellTooltipProps) =>
|
|
8
|
+
declare const PisellTooltip: (props: PisellTooltipProps) => JSX.Element;
|
|
10
9
|
//#endregion
|
|
11
10
|
export { PisellTooltip };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
import { UploadProps } from "antd";
|
|
3
2
|
//#region src/components/pisellUpload/index.d.ts
|
|
4
3
|
interface PisellUploadProps extends UploadProps {
|
|
@@ -7,6 +6,6 @@ interface PisellUploadProps extends UploadProps {
|
|
|
7
6
|
text2?: string;
|
|
8
7
|
uploadType?: 'button' | 'drop' | 'custom';
|
|
9
8
|
}
|
|
10
|
-
declare const PisellUpload: (props: PisellUploadProps) =>
|
|
9
|
+
declare const PisellUpload: (props: PisellUploadProps) => JSX.Element;
|
|
11
10
|
//#endregion
|
|
12
11
|
export { PisellUpload };
|
|
@@ -20,6 +20,8 @@ interface PisellWalletPassCardProps {
|
|
|
20
20
|
storeName: string;
|
|
21
21
|
/** 余额 */
|
|
22
22
|
balance?: number;
|
|
23
|
+
/** 已格式化的余额展示内容 */
|
|
24
|
+
formattedBalance?: React.ReactNode;
|
|
23
25
|
/** 识别码编号 */
|
|
24
26
|
code: string;
|
|
25
27
|
/** 有效期 */
|
|
@@ -139,6 +141,6 @@ interface PisellWalletPassCardProps {
|
|
|
139
141
|
onSetHolder?: (currentValue?: any) => void;
|
|
140
142
|
[key: string]: any;
|
|
141
143
|
}
|
|
142
|
-
declare const PisellWalletPassCard: (props: PisellWalletPassCardProps) =>
|
|
144
|
+
declare const PisellWalletPassCard: (props: PisellWalletPassCardProps) => JSX.Element;
|
|
143
145
|
//#endregion
|
|
144
146
|
export { FormatOption, PisellWalletPassCard, PisellWalletPassCardProps };
|
|
@@ -43,7 +43,7 @@ const PisellWalletPassCard = (props) => {
|
|
|
43
43
|
if (pressTimer) clearTimeout(pressTimer);
|
|
44
44
|
};
|
|
45
45
|
}, [pressTimer]);
|
|
46
|
-
const { id, type, code, qrCode, balance, disabledReason, name, storeName, redeem, validDate, disabled, active = false, cover, balanceTitle, redeemTitle, showCover = true, showDetail = true, showBalance = true, showRedeem = true, showName = true, showCode = true, showStoreName = true, showValidDate = true, showQrCode = true, showBalanceSymbol = true, showDisabledReason = true, showDiscount = false, discount, showActions, actions, beforeEdit, onBeforeEditAmount, onConfirmEdit, onConfirmEditAmount, onDetail, useExternalDetail = false, originData, style = {}, mode = "multiple", showActiveIcon, enableEditAmount, showStatus, cardStatus, nameTitleStyle, formatBalance, formatBalanceTitle, formatRedeem, formatRedeemTitle, maxRedeem, showHolderName = true, holder, onSetHolder, validDateBySchedule, scheduleList } = props;
|
|
46
|
+
const { id, type, code, qrCode, balance, formattedBalance, disabledReason, name, storeName, redeem, validDate, disabled, active = false, cover, balanceTitle, redeemTitle, showCover = true, showDetail = true, showBalance = true, showRedeem = true, showName = true, showCode = true, showStoreName = true, showValidDate = true, showQrCode = true, showBalanceSymbol = true, showDisabledReason = true, showDiscount = false, discount, showActions, actions, beforeEdit, onBeforeEditAmount, onConfirmEdit, onConfirmEditAmount, onDetail, useExternalDetail = false, originData, style = {}, mode = "multiple", showActiveIcon, enableEditAmount, showStatus, cardStatus, nameTitleStyle, formatBalance, formatBalanceTitle, formatRedeem, formatRedeemTitle, maxRedeem, showHolderName = true, holder, onSetHolder, validDateBySchedule, scheduleList } = props;
|
|
47
47
|
(0, react.useEffect)(() => {
|
|
48
48
|
document.body.id = "body";
|
|
49
49
|
}, []);
|
|
@@ -271,7 +271,7 @@ const PisellWalletPassCard = (props) => {
|
|
|
271
271
|
active,
|
|
272
272
|
data: props
|
|
273
273
|
}) : balanceTitle || require_index.getText("pisell-wallet-pass-card-balance"), disabled || isMini ? ": " : "");
|
|
274
|
-
const createOriginalBalanceDom = () => /* @__PURE__ */ react.default.createElement(require_index$4.default, {
|
|
274
|
+
const createOriginalBalanceDom = () => formattedBalance !== void 0 ? /* @__PURE__ */ react.default.createElement("span", { className: "pisell-card-amount-item-value" }, formattedBalance) : /* @__PURE__ */ react.default.createElement(require_index$4.default, {
|
|
275
275
|
className: "pisell-card-amount-item-value",
|
|
276
276
|
useThousandsSeparator: true,
|
|
277
277
|
value: balance,
|
|
@@ -11,9 +11,10 @@ classnames = require_runtime.__toESM(classnames);
|
|
|
11
11
|
require("./index.less");
|
|
12
12
|
//#region src/components/productCard/cartSkuCard/components/AmountFooter/index.tsx
|
|
13
13
|
const Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
14
|
-
const { total, origin_total, symbol, tip, num, discount_reason } = item;
|
|
14
|
+
const { total, origin_total, symbol, tip, num, discount_reason, amountFormatter } = item;
|
|
15
15
|
const weighingInfo = (0, _pisell_utils.resolveWeighingSnapshot)(item);
|
|
16
16
|
const formatFooterAmount = (amount, precision = 2) => {
|
|
17
|
+
if (amountFormatter) return amountFormatter(amount, precision);
|
|
17
18
|
if (!weighingInfo) return require_utils._formatAmount(amount, symbol, precision);
|
|
18
19
|
return (0, _pisell_utils.formatAmountWithOptions)(amount, symbol, {
|
|
19
20
|
precision,
|
|
@@ -10,15 +10,19 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
&__note-text {
|
|
13
|
+
min-width: 0;
|
|
14
|
+
flex: 1;
|
|
15
|
+
overflow: hidden;
|
|
13
16
|
color: #101828;
|
|
14
17
|
font-size: 14px;
|
|
15
18
|
font-weight: 400;
|
|
16
19
|
line-height: 20px;
|
|
17
|
-
|
|
18
|
-
|
|
20
|
+
text-overflow: ellipsis;
|
|
21
|
+
white-space: nowrap;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
24
|
&__note-btn {
|
|
25
|
+
flex-shrink: 0;
|
|
22
26
|
color: var(--Blue-600, #1570ef);
|
|
23
27
|
font-weight: 600;
|
|
24
28
|
cursor: pointer;
|
|
@@ -13,7 +13,8 @@ require("./index.less");
|
|
|
13
13
|
//#region src/components/productCard/cartSkuCard/components/basicInfo/index.tsx
|
|
14
14
|
const BasicInfo = (props) => {
|
|
15
15
|
const { isShowImage, isShowQuantityBadge = true, dataSource = {}, style, isMainProduct, type, maxSpecsCount = 1, isBundle, showFooter, isShowOriginalPrice = false, isShowEditProduct = false, onEditProduct, disabledEditClick = false } = props;
|
|
16
|
-
const { image, bundle, options, product_option_string, name, price, symbol, total = 0, origin_total = 0, num = 1, holder_id, isFormSubject, totalDifference = 0 } = dataSource;
|
|
16
|
+
const { image, bundle, options, product_option_string, name, price, symbol, total = 0, origin_total = 0, num = 1, holder_id, isFormSubject, totalDifference = 0, amountFormatter } = dataSource;
|
|
17
|
+
const formatProductAmount = (value, precision = 2) => amountFormatter ? amountFormatter(value, precision) : (0, _pisell_utils.formatAmount)(value, precision, symbol);
|
|
17
18
|
const renderNumTag = () => {
|
|
18
19
|
return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)(`num-tag`, { "is-main": isMainProduct }) }, num < 100 ? num : "99+");
|
|
19
20
|
};
|
|
@@ -35,7 +36,7 @@ const BasicInfo = (props) => {
|
|
|
35
36
|
};
|
|
36
37
|
const renderProductPrice = () => {
|
|
37
38
|
if (hasWeighingInfo) return null;
|
|
38
|
-
return (0
|
|
39
|
+
return formatProductAmount(price !== null && price !== void 0 ? price : 0);
|
|
39
40
|
};
|
|
40
41
|
const renderImage = () => {
|
|
41
42
|
if (!isShowImage) return null;
|
|
@@ -81,12 +82,12 @@ const BasicInfo = (props) => {
|
|
|
81
82
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
82
83
|
className: basicInfoClassName,
|
|
83
84
|
style: style || {}
|
|
84
|
-
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-name ${renderEdit ? "product-name-edit" : ""}` }, name), /* @__PURE__ */ react.default.createElement("div", { className: `product-price` }, /* @__PURE__ */ react.default.createElement("span", null, renderProductPrice()), _isShowOriginalPrice ? /* @__PURE__ */ react.default.createElement("span", { className: `original-price` }, (
|
|
85
|
+
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ react.default.createElement("div", { className: `product-info product-info-a9` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-basic-info-wrap` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-basic-info ${isBundle ? "row" : ""}` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-name ${renderEdit ? "product-name-edit" : ""}` }, name), /* @__PURE__ */ react.default.createElement("div", { className: `product-price` }, /* @__PURE__ */ react.default.createElement("span", null, renderProductPrice()), _isShowOriginalPrice ? /* @__PURE__ */ react.default.createElement("span", { className: `original-price` }, formatProductAmount(origin_total)) : null)), renderProductMeta()), renderEdit));
|
|
85
86
|
}
|
|
86
87
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
87
88
|
className: basicInfoClassName,
|
|
88
89
|
style: style || {}
|
|
89
|
-
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ react.default.createElement("div", { className: `total-amont` }, (
|
|
90
|
+
}, isShowQuantityBadge ? renderNumTag() : null, renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ react.default.createElement("div", { className: `product-name` }, name), hasProductMeta ? renderProductMeta() : /* @__PURE__ */ react.default.createElement("div", { className: `product-price` }, renderProductPrice())), /* @__PURE__ */ react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ react.default.createElement("div", { className: `total-amont` }, formatProductAmount(total * num - (totalDifference !== null && totalDifference !== void 0 ? totalDifference : 0))), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ react.default.createElement("div", { className: `origin-amount` }, formatProductAmount(origin_total * num)) : null));
|
|
90
91
|
};
|
|
91
92
|
//#endregion
|
|
92
93
|
exports.default = BasicInfo;
|
|
@@ -11,7 +11,7 @@ let antd = require("antd");
|
|
|
11
11
|
require("./index.less");
|
|
12
12
|
//#region src/components/productCard/cartSkuCard/components/packages/index.tsx
|
|
13
13
|
const Packages = ({ isShowImage, isShowQuantityBadge, dataSource = {}, type }) => {
|
|
14
|
-
const { bundle = [], symbol = "$" } = dataSource;
|
|
14
|
+
const { bundle = [], symbol = "$", amountFormatter } = dataSource;
|
|
15
15
|
const showFooter = (0, react.useCallback)((_bundle) => {
|
|
16
16
|
const { options = [], bundle = [] } = _bundle;
|
|
17
17
|
const hasSpecs = (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (options === null || options === void 0 ? void 0 : options.length);
|
|
@@ -31,7 +31,8 @@ const Packages = ({ isShowImage, isShowQuantityBadge, dataSource = {}, type }) =
|
|
|
31
31
|
dataSource: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, item), {}, {
|
|
32
32
|
name: item.title,
|
|
33
33
|
image: item.cover,
|
|
34
|
-
symbol
|
|
34
|
+
symbol,
|
|
35
|
+
amountFormatter
|
|
35
36
|
}),
|
|
36
37
|
type,
|
|
37
38
|
isBundle: true,
|
|
@@ -39,7 +40,8 @@ const Packages = ({ isShowImage, isShowQuantityBadge, dataSource = {}, type }) =
|
|
|
39
40
|
}), showFooter(item) ? /* @__PURE__ */ react.default.createElement(require_index$1.default, {
|
|
40
41
|
item: require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, item), {}, {
|
|
41
42
|
total: item === null || item === void 0 ? void 0 : item.price,
|
|
42
|
-
symbol: dataSource === null || dataSource === void 0 ? void 0 : dataSource.symbol
|
|
43
|
+
symbol: dataSource === null || dataSource === void 0 ? void 0 : dataSource.symbol,
|
|
44
|
+
amountFormatter
|
|
43
45
|
}),
|
|
44
46
|
hideDivider: false,
|
|
45
47
|
type: "total"
|
|
@@ -8,7 +8,8 @@ require("./index.less");
|
|
|
8
8
|
//#region src/components/productCard/cartSkuCard/components/specs/index.tsx
|
|
9
9
|
const Specs = (props) => {
|
|
10
10
|
const { dataSource = {}, maxSpecsCount = 1, type } = props;
|
|
11
|
-
const { bundle, options, product_option_string, symbol } = dataSource;
|
|
11
|
+
const { bundle, options, product_option_string, symbol, amountFormatter } = dataSource;
|
|
12
|
+
const formatSpecAmount = (value) => amountFormatter ? amountFormatter(value, 2) : `${symbol || ""}${value}`;
|
|
12
13
|
const more = /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$1.PREFIX}__specs-more` }, _pisell_utils.locales.getText("pisell2.cart.sku-card.more"));
|
|
13
14
|
/**
|
|
14
15
|
* @description: 渲染多规格字符串
|
|
@@ -19,7 +20,8 @@ const Specs = (props) => {
|
|
|
19
20
|
};
|
|
20
21
|
if (type === "a9") return /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$1.PREFIX}__specs-a9-wrap` }, product_option_string ? /* @__PURE__ */ react.default.createElement("div", { className: "option-string-wrap" }, renderOptionString()) : null, options && (options === null || options === void 0 ? void 0 : options.length) > 0 ? /* @__PURE__ */ react.default.createElement(require_index.default, {
|
|
21
22
|
options,
|
|
22
|
-
amountSymbol: symbol
|
|
23
|
+
amountSymbol: symbol,
|
|
24
|
+
amountFormatter
|
|
23
25
|
}) : null);
|
|
24
26
|
if (Array.isArray(bundle) && (bundle === null || bundle === void 0 ? void 0 : bundle.length) > 0) {
|
|
25
27
|
const displayItems = bundle.slice(0, maxSpecsCount);
|
|
@@ -31,7 +33,7 @@ const Specs = (props) => {
|
|
|
31
33
|
return /* @__PURE__ */ react.default.createElement("div", { className: `${require_index$1.PREFIX}__specs` }, displayItems.map((item, index) => /* @__PURE__ */ react.default.createElement("div", {
|
|
32
34
|
className: "spec-item",
|
|
33
35
|
key: index
|
|
34
|
-
}, /* @__PURE__ */ react.default.createElement("span", { className: "spec-name" }, item.name), /* @__PURE__ */ react.default.createElement("span", { className: "spec-num" }, /* @__PURE__ */ react.default.createElement("span", null,
|
|
36
|
+
}, /* @__PURE__ */ react.default.createElement("span", { className: "spec-name" }, item.name), /* @__PURE__ */ react.default.createElement("span", { className: "spec-num" }, /* @__PURE__ */ react.default.createElement("span", null, formatSpecAmount(item.price)), /* @__PURE__ */ react.default.createElement("span", null), "x", /* @__PURE__ */ react.default.createElement("span", null, item.num)))), options.length > maxSpecsCount ? more : null);
|
|
35
37
|
}
|
|
36
38
|
return null;
|
|
37
39
|
};
|
|
@@ -5,12 +5,13 @@ react = require_runtime.__toESM(react);
|
|
|
5
5
|
require("./index.less");
|
|
6
6
|
//#region src/components/productCard/components/Packages/components/options/index.tsx
|
|
7
7
|
const prefix = "pisell-lowcode-";
|
|
8
|
-
const Options = ({ options, amountSymbol }) => {
|
|
8
|
+
const Options = ({ options, amountSymbol, amountFormatter }) => {
|
|
9
|
+
const formatOptionAmount = (value) => amountFormatter ? amountFormatter(value, 2) : require_utils._formatAmount(value, amountSymbol);
|
|
9
10
|
return (options === null || options === void 0 ? void 0 : options.length) > 0 ? /* @__PURE__ */ react.default.createElement("div", { className: `${prefix}packages-product-bundle-option` }, options.map((option, index) => {
|
|
10
11
|
return /* @__PURE__ */ react.default.createElement("div", {
|
|
11
12
|
key: option.id,
|
|
12
13
|
className: `${prefix}packages-product-bundle-option-item`
|
|
13
|
-
}, /* @__PURE__ */ react.default.createElement("div", { className: `${prefix}packages-product-bundle-option-item-left` }, /* @__PURE__ */ react.default.createElement("span", null, option === null || option === void 0 ? void 0 : option.name), /* @__PURE__ */ react.default.createElement("div", { className: `${prefix}packages-product-bundle-option-item-left-amount` }, /* @__PURE__ */ react.default.createElement("span", null,
|
|
14
|
+
}, /* @__PURE__ */ react.default.createElement("div", { className: `${prefix}packages-product-bundle-option-item-left` }, /* @__PURE__ */ react.default.createElement("span", null, option === null || option === void 0 ? void 0 : option.name), /* @__PURE__ */ react.default.createElement("div", { className: `${prefix}packages-product-bundle-option-item-left-amount` }, /* @__PURE__ */ react.default.createElement("span", null, formatOptionAmount(option === null || option === void 0 ? void 0 : option.price)), /* @__PURE__ */ react.default.createElement("span", null, "×"), /* @__PURE__ */ react.default.createElement("span", null, option === null || option === void 0 ? void 0 : option.num))), /* @__PURE__ */ react.default.createElement("span", { className: `${prefix}packages-product-bundle-option-item-amount` }, formatOptionAmount((option === null || option === void 0 ? void 0 : option.price) * (option === null || option === void 0 ? void 0 : option.num))));
|
|
14
15
|
})) : null;
|
|
15
16
|
};
|
|
16
17
|
//#endregion
|
|
@@ -42,7 +42,9 @@ const _excluded = [
|
|
|
42
42
|
"onNote",
|
|
43
43
|
"onCard",
|
|
44
44
|
"onPromotion",
|
|
45
|
-
"onGift"
|
|
45
|
+
"onGift",
|
|
46
|
+
"symbol",
|
|
47
|
+
"amountFormatter"
|
|
46
48
|
];
|
|
47
49
|
const isBookingItem = (dataSource) => {
|
|
48
50
|
var _dataSource$_extend;
|
|
@@ -80,7 +82,7 @@ const convertBundleOption = (option, translationOriginal) => {
|
|
|
80
82
|
num: (_ref = (_option$num = option.num) !== null && _option$num !== void 0 ? _option$num : option.quantity) !== null && _ref !== void 0 ? _ref : 1
|
|
81
83
|
});
|
|
82
84
|
};
|
|
83
|
-
const convertBundle = (bundle, translationOriginal) => {
|
|
85
|
+
const convertBundle = (bundle, translationOriginal, amountFormatter) => {
|
|
84
86
|
const options = (bundle.option || []).map((option) => convertBundleOption(option, translationOriginal));
|
|
85
87
|
const bundlePrice = bundle.price_type === "markdown" && Number.isFinite(Number(bundle.price)) ? -Math.abs(Number(bundle.price)) : bundle.price;
|
|
86
88
|
return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, bundle), {}, {
|
|
@@ -97,6 +99,7 @@ const convertBundle = (bundle, translationOriginal) => {
|
|
|
97
99
|
custom_price_type_ext: bundle.price_type_ext,
|
|
98
100
|
options,
|
|
99
101
|
option: options,
|
|
102
|
+
amountFormatter,
|
|
100
103
|
_origin: bundle
|
|
101
104
|
});
|
|
102
105
|
};
|
|
@@ -148,10 +151,10 @@ const resolveA12Eyebrow = (product, translationOriginal) => {
|
|
|
148
151
|
(_categories$ = categories[0]) === null || _categories$ === void 0 ? void 0 : _categories$.name
|
|
149
152
|
], translationOriginal);
|
|
150
153
|
};
|
|
151
|
-
const convertProductToLineItemProduct = (product, translationOriginal, symbol) => {
|
|
154
|
+
const convertProductToLineItemProduct = (product, translationOriginal, symbol, amountFormatter) => {
|
|
152
155
|
var _product$metadata4, _ref3, _product$num, _ref4, _product$num2, _product$metadata5, _product$metadata6, _product$product_opti, _product$product_sku2, _product$discount_lis, _product$discount_lis2, _product$metadata7, _product$metadata8, _ref5, _product$num3;
|
|
153
156
|
const title = translateText(product.product_title || product.title, translationOriginal);
|
|
154
|
-
const bundle = (product.product_bundle || []).map((bundleItem) => convertBundle(bundleItem, translationOriginal));
|
|
157
|
+
const bundle = (product.product_bundle || []).map((bundleItem) => convertBundle(bundleItem, translationOriginal, amountFormatter));
|
|
155
158
|
const lineOriginTotal = resolveLineOriginTotal(product);
|
|
156
159
|
const lineOptions = mapLineItemOptions(resolveLineItemOptions(product), translationOriginal);
|
|
157
160
|
const a12Eyebrow = resolveA12Eyebrow(product, translationOriginal);
|
|
@@ -176,6 +179,7 @@ const convertProductToLineItemProduct = (product, translationOriginal, symbol) =
|
|
|
176
179
|
payment_price: product.payment_price,
|
|
177
180
|
tax_fee: product.tax_fee,
|
|
178
181
|
symbol,
|
|
182
|
+
amountFormatter,
|
|
179
183
|
note: product.note,
|
|
180
184
|
product_sku: product.product_sku,
|
|
181
185
|
product_bundle: bundle,
|
|
@@ -206,15 +210,16 @@ const convertProductToLineItemProduct = (product, translationOriginal, symbol) =
|
|
|
206
210
|
};
|
|
207
211
|
const LineItem = (props) => {
|
|
208
212
|
var _context$appHelper$ut, _context$appHelper$ut2, _context$appHelper$ut3, _context$appHelper$ut4, _dataSource$_extend2, _dataSource$_extend4;
|
|
209
|
-
const { dataSource = require_status.defaultValue.dataSource, itemType, type = "a9", isShowBookingHeader, rightActions = [], rightActionsDisplay = "swipe", escapeDom, isShowImage = require_status.defaultValue.isShowImage, isShowDelete = require_status.defaultValue.isShowDelete, isShowInlineDelete = isShowDelete, isShowNote = require_status.defaultValue.isShowNote, isShowAmountFooter = require_status.defaultValue.isShowAmountFooter, disabledClick = require_status.defaultValue.disabledClick, disabledEdit = require_status.defaultValue.disabledEdit, disabledNoteEdit = disabledEdit, statusOptions = [], statusLoading = false, statusDisabled = false, isShowRelatedProduct = true, holderOptions, onBookingStatusChange, onAddTimeProductCard, a12UnsupportedFallback = "a9", onAction, onDelete, onNote, onCard, onPromotion, onGift } = props, other = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
|
|
213
|
+
const { dataSource = require_status.defaultValue.dataSource, itemType, type = "a9", isShowBookingHeader, rightActions = [], rightActionsDisplay = "swipe", escapeDom, isShowImage = require_status.defaultValue.isShowImage, isShowDelete = require_status.defaultValue.isShowDelete, isShowInlineDelete = isShowDelete, isShowNote = require_status.defaultValue.isShowNote, isShowAmountFooter = require_status.defaultValue.isShowAmountFooter, disabledClick = require_status.defaultValue.disabledClick, disabledEdit = require_status.defaultValue.disabledEdit, disabledNoteEdit = disabledEdit, statusOptions = [], statusLoading = false, statusDisabled = false, isShowRelatedProduct = true, holderOptions, onBookingStatusChange, onAddTimeProductCard, a12UnsupportedFallback = "a9", onAction, onDelete, onNote, onCard, onPromotion, onGift, symbol: amountSymbol, amountFormatter } = props, other = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
|
|
210
214
|
const itemKind = itemType || (isBookingItem(dataSource) ? "booking" : "product");
|
|
211
215
|
const context = require_useEngineContext.default();
|
|
212
216
|
const translationOriginal = require_useTranslationOriginal.default();
|
|
213
|
-
const symbol = context.appHelper.utils.getSymbolic();
|
|
217
|
+
const symbol = amountSymbol || context.appHelper.utils.getSymbolic();
|
|
214
218
|
const locale = ((_context$appHelper$ut = context.appHelper.utils) === null || _context$appHelper$ut === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut.getApp) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.call(_context$appHelper$ut)) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut2 = _context$appHelper$ut2.locales) === null || _context$appHelper$ut2 === void 0 || (_context$appHelper$ut3 = _context$appHelper$ut2.getLocale) === null || _context$appHelper$ut3 === void 0 ? void 0 : _context$appHelper$ut3.call(_context$appHelper$ut2)) || ((_context$appHelper$ut4 = context.appHelper.utils) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut4 = _context$appHelper$ut4.storage) === null || _context$appHelper$ut4 === void 0 ? void 0 : _context$appHelper$ut4.get("umi_locale")) || "en-US";
|
|
215
219
|
require_useInitLocalesOnce.default(require_locales$1.default, locale);
|
|
216
220
|
require_useInitLocalesOnce.default(require_locales.default, locale);
|
|
217
|
-
const productDataSource = (0, react.useMemo)(() => itemKind === "product" ? convertProductToLineItemProduct(dataSource, translationOriginal, symbol) : null, [
|
|
221
|
+
const productDataSource = (0, react.useMemo)(() => itemKind === "product" ? convertProductToLineItemProduct(dataSource, translationOriginal, symbol, amountFormatter) : null, [
|
|
222
|
+
amountFormatter,
|
|
218
223
|
dataSource,
|
|
219
224
|
itemKind,
|
|
220
225
|
symbol,
|
|
@@ -223,16 +228,18 @@ const LineItem = (props) => {
|
|
|
223
228
|
const relatedProduct = dataSource === null || dataSource === void 0 || (_dataSource$_extend2 = dataSource._extend) === null || _dataSource$_extend2 === void 0 ? void 0 : _dataSource$_extend2.product;
|
|
224
229
|
const relatedProductDataSource = (0, react.useMemo)(() => {
|
|
225
230
|
if (!relatedProduct) return null;
|
|
226
|
-
return convertProductToLineItemProduct(relatedProduct, translationOriginal, symbol);
|
|
231
|
+
return convertProductToLineItemProduct(relatedProduct, translationOriginal, symbol, amountFormatter);
|
|
227
232
|
}, [
|
|
233
|
+
amountFormatter,
|
|
228
234
|
relatedProduct,
|
|
229
235
|
symbol,
|
|
230
236
|
translationOriginal
|
|
231
237
|
]);
|
|
232
238
|
const addTimeProductDataSources = (0, react.useMemo)(() => {
|
|
233
239
|
var _dataSource$_extend3;
|
|
234
|
-
return (Array.isArray(dataSource === null || dataSource === void 0 || (_dataSource$_extend3 = dataSource._extend) === null || _dataSource$_extend3 === void 0 ? void 0 : _dataSource$_extend3.addTimeProduct) ? dataSource._extend.addTimeProduct : []).map((item) => convertProductToLineItemProduct(item, translationOriginal, symbol));
|
|
240
|
+
return (Array.isArray(dataSource === null || dataSource === void 0 || (_dataSource$_extend3 = dataSource._extend) === null || _dataSource$_extend3 === void 0 ? void 0 : _dataSource$_extend3.addTimeProduct) ? dataSource._extend.addTimeProduct : []).map((item) => convertProductToLineItemProduct(item, translationOriginal, symbol, amountFormatter));
|
|
235
241
|
}, [
|
|
242
|
+
amountFormatter,
|
|
236
243
|
dataSource === null || dataSource === void 0 || (_dataSource$_extend4 = dataSource._extend) === null || _dataSource$_extend4 === void 0 ? void 0 : _dataSource$_extend4.addTimeProduct,
|
|
237
244
|
symbol,
|
|
238
245
|
translationOriginal
|