@pisell/materials 6.11.241 → 6.11.242
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.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +24 -24
- package/es/components/PisellCards/index.d.ts +1 -0
- package/es/components/PisellFields/index.d.ts +1 -0
- package/es/components/PisellGroupView/PisellGroupView.d.ts +9 -0
- package/es/components/PisellGroupView/PisellGroupView.stories.d.ts +27 -0
- package/es/components/PisellGroupView/index.d.ts +6 -0
- package/es/components/PisellGroupView/types.d.ts +124 -0
- package/es/components/PisellGroupView/utils/index.d.ts +20 -0
- package/es/components/PisellLayouts/index.d.ts +1 -0
- package/es/components/PisellMetrics/index.d.ts +1 -0
- package/es/components/PisellTabbar/PisellTabbar.js +3 -4
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +5 -4
- package/es/components/date-picker/index.d.ts +1 -0
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +13 -0
- package/es/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +89 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +64 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +49 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +13 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +84 -0
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +20 -0
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +94 -0
- package/es/components/pisellFloorMapLayout/index.d.ts +39 -0
- package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.d.ts +10 -0
- package/es/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanPure.d.ts +22 -0
- package/es/components/pisellFloorMapLayout/types.d.ts +769 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +27 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/es/components/pisellFloorMapLayout/utils/floorMapSelectionZone.d.ts +24 -0
- package/es/components/pisellModal/components/index.d.ts +1 -0
- package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +9 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.d.ts +9 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +43 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.d.ts +34 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +18 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.d.ts +30 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +9 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.d.ts +330 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +52 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.d.ts +22 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +57 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.d.ts +26 -0
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
- package/es/components/pisellRecordBoard/types.d.ts +899 -0
- package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
- package/es/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +36 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +4 -0
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +2 -3
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -5
- package/es/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +15 -0
- package/es/components/productCard/cartSkuCard/components/inlineActions/index.js +3 -1
- package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +22 -0
- package/es/components/productCard/cartSkuCard/components/weighing/index.d.ts +9 -0
- package/es/components/productCard/cartSkuCard/components/weighing/index.js +12 -14
- package/es/components/productCard/cartSkuCard/index.d.ts +15 -0
- package/es/components/productCard/cartSkuCard/index.less +8 -1
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +23 -0
- package/es/components/productCard/lineItem/components/Holders/index.d.ts +10 -0
- package/es/components/productCard/lineItem/index.d.ts +72 -0
- package/es/components/table/Table/fields/date/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/link/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useTableSetting.d.ts +21 -0
- package/es/components/virtual-keyboard/Time/index.d.ts +14 -0
- package/es/components/virtual-keyboard/index.d.ts +25 -0
- package/es/hooks/useTranslationOriginal.d.ts +4 -0
- package/es/pisell-materials.tw.css +1 -1
- package/lib/components/PisellCards/index.d.ts +1 -0
- package/lib/components/PisellFields/index.d.ts +1 -0
- package/lib/components/PisellGroupView/PisellGroupView.d.ts +9 -0
- package/lib/components/PisellGroupView/PisellGroupView.stories.d.ts +27 -0
- package/lib/components/PisellGroupView/index.d.ts +6 -0
- package/lib/components/PisellGroupView/types.d.ts +124 -0
- package/lib/components/PisellGroupView/utils/index.d.ts +20 -0
- package/lib/components/PisellLayouts/index.d.ts +1 -0
- package/lib/components/PisellMetrics/index.d.ts +1 -0
- package/lib/components/PisellTabbar/PisellTabbar.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +5 -4
- package/lib/components/date-picker/index.d.ts +1 -0
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +13 -0
- package/lib/components/pisellFloorMapLayout/components/CanvasTabs.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +89 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +14 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.d.ts +64 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +49 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapSelectionZoneElement.d.ts +13 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +84 -0
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +20 -0
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +94 -0
- package/lib/components/pisellFloorMapLayout/index.d.ts +39 -0
- package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanClient.d.ts +10 -0
- package/lib/components/pisellFloorMapLayout/shopFloorPlan/shopFloorPlanPure.d.ts +22 -0
- package/lib/components/pisellFloorMapLayout/types.d.ts +769 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapCanvasDisplay.d.ts +27 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +8 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +11 -0
- package/lib/components/pisellFloorMapLayout/utils/floorMapSelectionZone.d.ts +24 -0
- package/lib/components/pisellModal/components/index.d.ts +1 -0
- package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +9 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.d.ts +9 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarInternalTypes.d.ts +43 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.d.ts +34 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.d.ts +18 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.d.ts +30 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.d.ts +9 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.d.ts +330 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.d.ts +52 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.d.ts +22 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.d.ts +57 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.d.ts +26 -0
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
- package/lib/components/pisellRecordBoard/types.d.ts +899 -0
- package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +32 -0
- package/lib/components/pisellTimeRangeDisplay/components/TimeRangeBlock.d.ts +36 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +4 -0
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +1 -2
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +3 -6
- package/lib/components/productCard/cartSkuCard/components/inlineActions/index.d.ts +15 -0
- package/lib/components/productCard/cartSkuCard/components/inlineActions/index.js +2 -1
- package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +22 -0
- package/lib/components/productCard/cartSkuCard/components/weighing/index.d.ts +9 -0
- package/lib/components/productCard/cartSkuCard/components/weighing/index.js +11 -14
- package/lib/components/productCard/cartSkuCard/index.d.ts +15 -0
- package/lib/components/productCard/cartSkuCard/index.less +8 -1
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +23 -0
- package/lib/components/productCard/lineItem/components/Holders/index.d.ts +10 -0
- package/lib/components/productCard/lineItem/index.d.ts +72 -0
- package/lib/components/table/Table/fields/date/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/link/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/hooks/useTableSetting.d.ts +21 -0
- package/lib/components/virtual-keyboard/Time/index.d.ts +14 -0
- package/lib/components/virtual-keyboard/index.d.ts +25 -0
- package/lib/hooks/useTranslationOriginal.d.ts +4 -0
- package/lib/pisell-materials.tw.css +1 -1
- package/package.json +1 -1
- package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/es/components/pisellLookup/types.d.ts +0 -797
- package/es/components/pisellTimeRangeDisplay/index.d.ts +0 -3
- package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
- package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
- package/lib/components/pisellLookup/types.d.ts +0 -797
- package/lib/components/pisellTimeRangeDisplay/index.d.ts +0 -3
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'dayjs/locale/zh-cn';
|
|
3
|
+
import 'dayjs/locale/en';
|
|
4
|
+
import type { PisellTimeRangeDisplayProps } from './types';
|
|
5
|
+
import './PisellTimeRangeDisplay.less';
|
|
6
|
+
/**
|
|
7
|
+
* PisellTimeRangeDisplay 组件
|
|
8
|
+
*
|
|
9
|
+
* @description
|
|
10
|
+
* 纯展示型时间区间组件,将 startAt / endAt 格式化为「时间区间 + 持续时间」。
|
|
11
|
+
* - 同一天:HH:mm-HH:mm,可选显示日期/星期
|
|
12
|
+
* - 跨天:起止日期时间
|
|
13
|
+
* - 持续时间:d h m s 格式
|
|
14
|
+
* - 字段顺序由 fieldOrder 控制,可将 duration 放在中间
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <PisellTimeRangeDisplay
|
|
18
|
+
* startAt="2026-02-04 09:00"
|
|
19
|
+
* endAt="2026-02-04 18:00"
|
|
20
|
+
* />
|
|
21
|
+
* // => "09:00-18:00" + "9h"
|
|
22
|
+
*
|
|
23
|
+
* <PisellTimeRangeDisplay
|
|
24
|
+
* startAt={start}
|
|
25
|
+
* endAt={end}
|
|
26
|
+
* fields={{ fieldOrder: ['time', 'duration', 'date', 'weekday'] }}
|
|
27
|
+
* showDateForSameDay
|
|
28
|
+
* />
|
|
29
|
+
*/
|
|
30
|
+
export declare const PisellTimeRangeDisplay: React.FC<PisellTimeRangeDisplayProps>;
|
|
31
|
+
declare const _default: React.NamedExoticComponent<PisellTimeRangeDisplayProps>;
|
|
32
|
+
export default _default;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type Dayjs } from 'dayjs';
|
|
3
|
+
import type { TimeFormatConfig, DateFormatConfig, WeekdayFormatConfig, TextStyleConfig } from '../types';
|
|
4
|
+
export interface TimeRangeBlockProps {
|
|
5
|
+
/** 开始时间 */
|
|
6
|
+
start: Dayjs;
|
|
7
|
+
/** 结束时间 */
|
|
8
|
+
end: Dayjs;
|
|
9
|
+
/** 是否同一天 */
|
|
10
|
+
isSameDay: boolean;
|
|
11
|
+
/** 时间格式配置 */
|
|
12
|
+
timeFormat?: TimeFormatConfig;
|
|
13
|
+
/** 日期格式配置(跨天时用于起止日期,含 showRelativeDay) */
|
|
14
|
+
dateFormat?: DateFormatConfig;
|
|
15
|
+
/** 星期格式配置(跨天时用于「Sat, 22 Jan」) */
|
|
16
|
+
weekdayFormat?: WeekdayFormatConfig;
|
|
17
|
+
/** 跨天时是否展示星期 */
|
|
18
|
+
showWeekdayInCrossDay?: boolean;
|
|
19
|
+
/** 参考日期,用于相对日判定,默认 dayjs() */
|
|
20
|
+
referenceDate?: Dayjs;
|
|
21
|
+
/** 文本样式 */
|
|
22
|
+
style?: TextStyleConfig;
|
|
23
|
+
/** 开始时间文本样式,会覆盖 style 中的同名字段 */
|
|
24
|
+
startStyle?: TextStyleConfig;
|
|
25
|
+
/** 结束时间文本样式,会覆盖 style 中的同名字段 */
|
|
26
|
+
endStyle?: TextStyleConfig;
|
|
27
|
+
/** 自定义类名 */
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* 时间区间展示块
|
|
32
|
+
* - 同一天:HH:mm-HH:mm
|
|
33
|
+
* - 跨天:起止完整日期时间;若某端为相对日(今天/昨天/明天)则只显示「时间 相对日」,不显示星期+日期
|
|
34
|
+
*/
|
|
35
|
+
export declare const TimeRangeBlock: React.FC<TimeRangeBlockProps>;
|
|
36
|
+
export default TimeRangeBlock;
|
|
@@ -42,9 +42,8 @@ var import_index = require("./index.less");
|
|
|
42
42
|
var import_utils2 = require("@pisell/utils");
|
|
43
43
|
var import__ = require("../../index");
|
|
44
44
|
var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
45
|
-
var _a, _b;
|
|
46
45
|
const { total, origin_total, symbol, tip, num, discount_reason } = item;
|
|
47
|
-
const weighingInfo = (
|
|
46
|
+
const weighingInfo = (0, import_utils2.resolveWeighingSnapshot)(item);
|
|
48
47
|
const formatFooterAmount = (amount, precision = 2) => {
|
|
49
48
|
if (!weighingInfo) {
|
|
50
49
|
return (0, import_utils._formatAmount)(amount, symbol, precision);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface IProps {
|
|
4
|
+
isShowImage?: boolean;
|
|
5
|
+
dataSource: {
|
|
6
|
+
image?: string;
|
|
7
|
+
bundle?: any[];
|
|
8
|
+
options?: any[];
|
|
9
|
+
product_option_string?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
symbol?: string;
|
|
12
|
+
price?: string | number;
|
|
13
|
+
total?: number;
|
|
14
|
+
origin_total?: number;
|
|
15
|
+
num?: number;
|
|
16
|
+
holder_id?: any;
|
|
17
|
+
isFormSubject?: boolean;
|
|
18
|
+
totalDifference?: number;
|
|
19
|
+
};
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
/** 作为主商品卡片展示
|
|
22
|
+
* 1. 影响商品数量 tag 的位置
|
|
23
|
+
* 2. isMain 且 type 为 a5,展示holder
|
|
24
|
+
*/
|
|
25
|
+
isMainProduct?: boolean;
|
|
26
|
+
maxSpecsCount?: number;
|
|
27
|
+
type?: 'a2' | 'a5' | 'a9';
|
|
28
|
+
isBundle?: boolean;
|
|
29
|
+
showFooter?: boolean;
|
|
30
|
+
isShowOriginalPrice?: boolean;
|
|
31
|
+
isShowEditProduct?: boolean;
|
|
32
|
+
onEditProduct?: (val: any) => void;
|
|
33
|
+
disabledEditClick?: boolean;
|
|
34
|
+
}
|
|
35
|
+
declare const BasicInfo: (props: IProps) => React.JSX.Element;
|
|
36
|
+
export default BasicInfo;
|
|
@@ -42,7 +42,6 @@ var import__ = require("../../index");
|
|
|
42
42
|
var import_EditButton = __toESM(require("../../../components/Header/EditButton"));
|
|
43
43
|
var import_index = require("./index.less");
|
|
44
44
|
var BasicInfo = (props) => {
|
|
45
|
-
var _a, _b;
|
|
46
45
|
const {
|
|
47
46
|
isShowImage,
|
|
48
47
|
dataSource = {},
|
|
@@ -84,10 +83,8 @@ var BasicInfo = (props) => {
|
|
|
84
83
|
);
|
|
85
84
|
};
|
|
86
85
|
const hasSpecs = (bundle == null ? void 0 : bundle.length) || (options == null ? void 0 : options.length) || product_option_string;
|
|
87
|
-
const weighingInfo = (
|
|
88
|
-
const hasWeighingInfo = Boolean(
|
|
89
|
-
weighingInfo && (Number.isFinite(Number(weighingInfo == null ? void 0 : weighingInfo.weight)) || Number.isFinite(Number(weighingInfo == null ? void 0 : weighingInfo.net_weight)))
|
|
90
|
-
);
|
|
86
|
+
const weighingInfo = (0, import_utils.resolveWeighingSnapshot)(dataSource);
|
|
87
|
+
const hasWeighingInfo = Boolean(weighingInfo);
|
|
91
88
|
const hasProductMeta = hasSpecs || hasWeighingInfo;
|
|
92
89
|
const basicInfoClassName = (0, import_classnames.default)(`${import__.PREFIX}__basic-info`, {
|
|
93
90
|
[`${import__.PREFIX}__basic-info--weighing`]: hasWeighingInfo
|
|
@@ -115,7 +112,7 @@ var BasicInfo = (props) => {
|
|
|
115
112
|
);
|
|
116
113
|
};
|
|
117
114
|
const renderProductPrice = () => {
|
|
118
|
-
if (
|
|
115
|
+
if (hasWeighingInfo) {
|
|
119
116
|
return null;
|
|
120
117
|
}
|
|
121
118
|
return (0, import_utils.formatAmount)(price, 2, symbol);
|
|
@@ -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;
|
|
@@ -48,7 +48,8 @@ var InlineActions = ({ actions }) => {
|
|
|
48
48
|
},
|
|
49
49
|
onClick: (event) => {
|
|
50
50
|
var _a;
|
|
51
|
-
|
|
51
|
+
event.stopPropagation();
|
|
52
|
+
(_a = action.onClick) == null ? void 0 : _a.call(action, event);
|
|
52
53
|
}
|
|
53
54
|
},
|
|
54
55
|
action.text
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface SpecsProps {
|
|
4
|
+
/** 数据源 */
|
|
5
|
+
dataSource?: {
|
|
6
|
+
bundle?: Array<{
|
|
7
|
+
title: string;
|
|
8
|
+
}>;
|
|
9
|
+
options?: Array<{
|
|
10
|
+
name: string;
|
|
11
|
+
price: number;
|
|
12
|
+
num: number;
|
|
13
|
+
}>;
|
|
14
|
+
product_option_string?: string;
|
|
15
|
+
symbol?: string;
|
|
16
|
+
};
|
|
17
|
+
/** 最大展示数量,默认为 1 */
|
|
18
|
+
maxSpecsCount?: number;
|
|
19
|
+
type?: 'a2' | 'a5' | 'a9';
|
|
20
|
+
}
|
|
21
|
+
declare const Specs: (props: SpecsProps) => React.JSX.Element | null;
|
|
22
|
+
export default Specs;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { WeighingSnapshot } from '@pisell/utils';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface WeighingProps {
|
|
5
|
+
dataSource?: WeighingSnapshot;
|
|
6
|
+
symbol?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const Weighing: (props: WeighingProps) => React.JSX.Element | null;
|
|
9
|
+
export default Weighing;
|
|
@@ -36,17 +36,11 @@ var import_react = __toESM(require("react"));
|
|
|
36
36
|
var import_utils = require("@pisell/utils");
|
|
37
37
|
var import__ = require("../../index");
|
|
38
38
|
var import_index = require("./index.less");
|
|
39
|
-
var UNIT_LABEL_MAP = {
|
|
40
|
-
KILOGRAMS: "kg",
|
|
41
|
-
GRAMS: "g",
|
|
42
|
-
POUNDS: "lb",
|
|
43
|
-
OUNCES: "oz"
|
|
44
|
-
};
|
|
45
39
|
var formatWeight = (value, unit) => {
|
|
46
40
|
const parsedValue = Number(value);
|
|
47
41
|
const displayValue = Number.isFinite(parsedValue) ? parsedValue : 0;
|
|
48
|
-
const displayUnit =
|
|
49
|
-
return `${
|
|
42
|
+
const displayUnit = (0, import_utils.getWeightUnitSymbol)(unit);
|
|
43
|
+
return `${(0, import_utils.formatWeightValue)(displayValue)} ${displayUnit}`;
|
|
50
44
|
};
|
|
51
45
|
var Weighing = (props) => {
|
|
52
46
|
const { dataSource, symbol } = props;
|
|
@@ -55,15 +49,18 @@ var Weighing = (props) => {
|
|
|
55
49
|
}
|
|
56
50
|
const {
|
|
57
51
|
mode,
|
|
52
|
+
weight_source,
|
|
58
53
|
weight,
|
|
59
54
|
tare,
|
|
55
|
+
tare_weight,
|
|
60
56
|
net_weight,
|
|
61
57
|
unit_price,
|
|
62
|
-
unit =
|
|
58
|
+
unit = import_utils.STANDARD_WEIGHT_UNIT
|
|
63
59
|
} = dataSource;
|
|
64
|
-
const unitLabel =
|
|
65
|
-
const tareValue = Number((tare == null ? void 0 : tare.value)
|
|
66
|
-
const
|
|
60
|
+
const unitLabel = (0, import_utils.getWeightUnitSymbol)(unit);
|
|
61
|
+
const tareValue = Number((tare == null ? void 0 : tare.value) ?? tare_weight ?? 0);
|
|
62
|
+
const tareUnit = (tare == null ? void 0 : tare.unit) || unit;
|
|
63
|
+
const isManualWeight = (mode ?? weight_source) === "manual";
|
|
67
64
|
const grossLabel = import_utils.locales.getText("pisell2.cart.sku-card.weighing.gross");
|
|
68
65
|
const tareLabel = import_utils.locales.getText("pisell2.cart.sku-card.weighing.tare");
|
|
69
66
|
const netLabel = import_utils.locales.getText("pisell2.cart.sku-card.weighing.net");
|
|
@@ -88,8 +85,8 @@ var Weighing = (props) => {
|
|
|
88
85
|
className: `${import__.PREFIX}__weighing-row ${import__.PREFIX}__weighing-row--large`
|
|
89
86
|
},
|
|
90
87
|
/* @__PURE__ */ import_react.default.createElement("span", null, `${tareLabel}: ${formatWeight(
|
|
91
|
-
tare == null ? void 0 : tare.value,
|
|
92
|
-
|
|
88
|
+
(tare == null ? void 0 : tare.value) ?? tare_weight,
|
|
89
|
+
tareUnit
|
|
93
90
|
)}`)
|
|
94
91
|
) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
95
92
|
"div",
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
declare const CartSkuCard: (props: ISKUCardProps) => React.JSX.Element | null;
|
|
15
|
+
export default CartSkuCard;
|
|
@@ -28,7 +28,14 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
.pisell-cart-sku-card {
|
|
31
|
-
|
|
31
|
+
// 浏览器无法可靠换算屏幕物理尺寸:保留设计基准,并允许按送检设备校准。
|
|
32
|
+
// 当前送检机 30px 实测约 3mm,因此默认系数为 4/3;设备侧可覆盖该系数。
|
|
33
|
+
--pisell-cart-sku-card-weighing-font-base: 30px;
|
|
34
|
+
--pisell-cart-sku-card-device-font-scale: 1.333333;
|
|
35
|
+
--pisell-cart-sku-card-physical-text-height: calc(
|
|
36
|
+
var(--pisell-cart-sku-card-weighing-font-base) *
|
|
37
|
+
var(--pisell-cart-sku-card-device-font-scale)
|
|
38
|
+
);
|
|
32
39
|
|
|
33
40
|
padding: 4px 8px 4px 4px;
|
|
34
41
|
border-radius: inherit;
|
|
@@ -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,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { LineItemHolderOption } from '../../types';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface LineItemHoldersProps {
|
|
5
|
+
dataSource?: any;
|
|
6
|
+
holderOptions?: LineItemHolderOption[];
|
|
7
|
+
isFormSubject?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const LineItemHolders: (props: LineItemHoldersProps) => React.JSX.Element | null;
|
|
10
|
+
export default LineItemHolders;
|
|
@@ -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;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const fieldMaps: {
|
|
2
3
|
text: {
|
|
3
4
|
field: {
|
|
@@ -197,12 +198,12 @@ export declare const fieldList: ({
|
|
|
197
198
|
field_icon: string;
|
|
198
199
|
field_name: string;
|
|
199
200
|
field_type: string;
|
|
200
|
-
default_value:
|
|
201
|
+
default_value: boolean;
|
|
201
202
|
} | {
|
|
202
203
|
field_icon: string;
|
|
203
204
|
field_name: string;
|
|
204
205
|
field_type: string;
|
|
205
|
-
default_value:
|
|
206
|
+
default_value: string;
|
|
206
207
|
} | {
|
|
207
208
|
field_icon: string;
|
|
208
209
|
field_name: string;
|
|
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
155
155
|
sort?: SortType | undefined;
|
|
156
156
|
mode: "" | "localStorage" | "remote";
|
|
157
157
|
currentViewMode: ModeType;
|
|
158
|
-
}) => ("filters" | "
|
|
158
|
+
}) => ("filters" | "column_setting" | "gallery_setting" | "order_by" | "group_by" | "view_mode" | "filter_setting")[];
|
|
159
159
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
160
160
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
161
161
|
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FilterType } from "../../filter/types";
|
|
2
|
+
import { ColumnSettingType, DataSourceGroupType, GallerySettingType, GridViewType, ModeType, SortType, ExportImportModeType, LocalSettingsType } from "../types";
|
|
3
|
+
declare type UseTableSettingProps = {
|
|
4
|
+
tableId?: string;
|
|
5
|
+
filter: FilterType;
|
|
6
|
+
columns: Record<string, any>[];
|
|
7
|
+
columnSetting?: ColumnSettingType;
|
|
8
|
+
dataSourceGroup?: DataSourceGroupType;
|
|
9
|
+
sort?: SortType;
|
|
10
|
+
view: GridViewType;
|
|
11
|
+
currentViewMode: ModeType;
|
|
12
|
+
gallery?: GallerySettingType;
|
|
13
|
+
currentSettingHash: string;
|
|
14
|
+
exportImport?: ExportImportModeType;
|
|
15
|
+
localSettings?: LocalSettingsType;
|
|
16
|
+
};
|
|
17
|
+
declare const useTableSetting: (params: UseTableSettingProps) => {
|
|
18
|
+
setTableSetting: (this: unknown, values: Record<string, any>) => void;
|
|
19
|
+
tableSetting: any;
|
|
20
|
+
};
|
|
21
|
+
export default useTableSetting;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Item } from "../Keyboard";
|
|
3
|
+
import "./index.less";
|
|
4
|
+
export interface VirtualKeyboardTimeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
style?: React.CSSProperties;
|
|
6
|
+
selectType?: 'light' | 'dark';
|
|
7
|
+
onChange?: (value?: any) => void;
|
|
8
|
+
value?: any;
|
|
9
|
+
items?: Item[];
|
|
10
|
+
onEnter?: (value: any) => void;
|
|
11
|
+
rightPanel?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const VirtualKeyboardTime: (props: VirtualKeyboardTimeProps) => React.JSX.Element;
|
|
14
|
+
export default VirtualKeyboardTime;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { KeyboardProps } from "./Keyboard";
|
|
3
|
+
import { VirtualKeyInputProps } from "./VirtualKeyInput";
|
|
4
|
+
import "./index.less";
|
|
5
|
+
interface VirtualKeyboardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
keyboardProps?: KeyboardProps;
|
|
7
|
+
virtualKeyInputProps?: VirtualKeyInputProps;
|
|
8
|
+
rightPanel?: React.ReactNode;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
onChange?: (value?: any) => void;
|
|
11
|
+
value?: string;
|
|
12
|
+
selectType?: 'light' | 'dark';
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
containerBackgroundColor?: string;
|
|
15
|
+
buttonBackgroundColor?: string;
|
|
16
|
+
textColor?: string;
|
|
17
|
+
keyboardBackgroundColor?: string;
|
|
18
|
+
keyboardButtonBackgroundColor?: string;
|
|
19
|
+
keyboardButtonTextColor?: string;
|
|
20
|
+
keyboardButtonHoverColor?: string;
|
|
21
|
+
primaryButtonBackgroundColor?: string;
|
|
22
|
+
primaryButtonTextColor?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const VirtualKeyboard: (props: VirtualKeyboardProps) => React.JSX.Element;
|
|
25
|
+
export default VirtualKeyboard;
|