@pisell/materials 2.2.52 → 2.2.54
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/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +14 -14
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +14 -14
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/TimeResourceSelector/index.d.ts +21 -0
- package/es/components/appVersionControl/index.d.ts +1 -0
- package/es/components/collapse/index.d.ts +15 -0
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.js +13 -3
- package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/es/components/drag-sort-tree/index.d.ts +1 -0
- package/es/components/page/index.d.ts +1 -0
- package/es/components/pisellAnchor/index.d.ts +1 -1
- package/es/components/pisellAnchor/index.js +109 -199
- package/es/components/pisellAnchor/index.less +3 -5
- package/es/components/pisellAvatar/index.js +2 -1
- package/es/components/pisellAvatar/index.less +2 -1
- package/es/components/pisellCard/index.d.ts +20 -0
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/es/components/pisellDropdown/index.d.ts +20 -0
- package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/es/components/pisellImageCarousels/index.d.ts +18 -0
- package/es/components/pisellModal/components/MobileModal/index.less +4 -0
- package/es/components/pisellSectionHeaders/index.d.ts +21 -0
- package/es/components/pisellText/components/Amount/index.d.ts +20 -0
- package/es/components/productCard/components/Action/index.d.ts +4 -0
- package/es/components/productCard/components/AmountFooter/index.d.ts +4 -0
- package/es/components/productCard/components/Divider/index.d.ts +4 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
- package/es/components/productCard/components/Header/index.d.ts +4 -0
- package/es/components/productCard/components/MultiDay/index.d.ts +4 -0
- package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/components/Note/index.d.ts +4 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
- package/es/components/productCard/components/Packages/components/options/index.d.ts +4 -0
- package/es/components/productCard/components/Packages/index.d.ts +4 -0
- package/es/components/productCard/components/Packages/utils.d.ts +20 -0
- package/es/components/productCard/components/Sales/index.d.ts +4 -0
- package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/es/components/productCard/components/Time/index.d.ts +4 -0
- package/es/components/productCard/locales.d.ts +3 -0
- package/es/components/productCard/locales.js +10 -1
- package/es/components/productCard/status.d.ts +32 -0
- package/es/components/productCard/types.d.ts +78 -0
- package/es/components/productCard/utils.js +8 -2
- package/es/components/section-footers/index.d.ts +9 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/es/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/Group/index.d.ts +1 -0
- package/es/components/table/Actions/component/ViewMode/index.d.ts +1 -0
- package/es/components/table/Actions/index.d.ts +1 -0
- package/es/components/table/BasicTable/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/es/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/es/components/table/View/index.d.ts +1 -0
- package/es/components/virtual-keyboard/Number/index.d.ts +0 -1
- package/es/components/walletCard/Guest/index.d.ts +4 -0
- package/es/components/walletCard/index.d.ts +65 -0
- package/es/index.d.ts +9 -11
- package/es/index.js +10 -12
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/TimeResourceSelector/index.d.ts +21 -0
- package/lib/components/appVersionControl/index.d.ts +1 -0
- package/lib/components/collapse/index.d.ts +15 -0
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.js +12 -3
- package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +11 -11
- package/lib/components/drag-sort-tree/index.d.ts +1 -0
- package/lib/components/page/index.d.ts +1 -0
- package/lib/components/pisellAnchor/index.d.ts +1 -1
- package/lib/components/pisellAnchor/index.js +64 -131
- package/lib/components/pisellAnchor/index.less +3 -5
- package/lib/components/pisellAvatar/index.js +1 -1
- package/lib/components/pisellAvatar/index.less +2 -1
- package/lib/components/pisellCard/index.d.ts +20 -0
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/lib/components/pisellDropdown/index.d.ts +20 -0
- package/lib/components/pisellEmpty/index.js +9 -1
- package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/lib/components/pisellImageCarousels/index.d.ts +18 -0
- package/lib/components/pisellModal/components/MobileModal/index.less +4 -0
- package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
- package/lib/components/pisellText/components/Amount/index.d.ts +20 -0
- package/lib/components/productCard/components/Action/index.d.ts +4 -0
- package/lib/components/productCard/components/AmountFooter/index.d.ts +4 -0
- package/lib/components/productCard/components/Divider/index.d.ts +4 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
- package/lib/components/productCard/components/Header/index.d.ts +4 -0
- package/lib/components/productCard/components/MultiDay/index.d.ts +4 -0
- package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/components/Note/index.d.ts +4 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +4 -0
- package/lib/components/productCard/components/Packages/index.d.ts +4 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +20 -0
- package/lib/components/productCard/components/Sales/index.d.ts +4 -0
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/lib/components/productCard/components/Time/index.d.ts +4 -0
- package/lib/components/productCard/locales.d.ts +3 -0
- package/lib/components/productCard/locales.js +4 -1
- package/lib/components/productCard/status.d.ts +32 -0
- package/lib/components/productCard/types.d.ts +78 -0
- package/lib/components/productCard/utils.js +6 -2
- package/lib/components/section-footers/index.d.ts +9 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportFile/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportLog/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ImportTable/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/lib/components/table/Actions/component/GallerySetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +1 -0
- package/lib/components/table/Actions/index.d.ts +1 -0
- package/lib/components/table/BasicTable/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +1 -0
- package/lib/components/table/Table/tableConfig/SortRow/index.d.ts +1 -0
- package/lib/components/table/View/index.d.ts +1 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +0 -1
- package/lib/components/walletCard/Guest/index.d.ts +4 -0
- package/lib/components/walletCard/index.d.ts +65 -0
- package/lib/index.d.ts +9 -11
- package/lib/index.js +9 -15
- package/lowcode/button-group/meta.ts +1 -4
- package/package.json +3 -3
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import 'swiper/swiper-bundle.css';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export interface PisellImageCarouselsProps {
|
|
5
|
+
dataSource?: string[];
|
|
6
|
+
width?: number | string;
|
|
7
|
+
height?: number;
|
|
8
|
+
showArrows?: boolean;
|
|
9
|
+
showDots?: boolean;
|
|
10
|
+
autoplay?: boolean;
|
|
11
|
+
interval?: number;
|
|
12
|
+
borderRadius?: number;
|
|
13
|
+
loop?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
}
|
|
17
|
+
declare const PisellImageCarousels: React.FC<PisellImageCarouselsProps>;
|
|
18
|
+
export default PisellImageCarousels;
|
|
@@ -17,14 +17,18 @@
|
|
|
17
17
|
overflow: hidden;
|
|
18
18
|
max-height: 90%;
|
|
19
19
|
min-height: 200px;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
20
22
|
}
|
|
21
23
|
.pisell-lowcode-modal-content {
|
|
24
|
+
flex: 1;
|
|
22
25
|
padding: 0;
|
|
23
26
|
border-radius: 0;
|
|
24
27
|
height: 100%;
|
|
25
28
|
display: flex;
|
|
26
29
|
flex-direction: column;
|
|
27
30
|
max-height: none;
|
|
31
|
+
min-height: 200px;
|
|
28
32
|
.pisell-lowcode-modal-close {
|
|
29
33
|
padding: 10px;
|
|
30
34
|
top: 8px;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellSectionHeadersProps {
|
|
4
|
+
/** 是否占据空间(true: 占据空间, false: 不占据空间) */
|
|
5
|
+
/** 左侧返回区域 */
|
|
6
|
+
backNode?: React.ReactNode;
|
|
7
|
+
/** 中间内容区域 */
|
|
8
|
+
centerNode?: React.ReactNode;
|
|
9
|
+
/** 右侧操作区域 */
|
|
10
|
+
actionNode?: React.ReactNode;
|
|
11
|
+
/** 自定义类名 */
|
|
12
|
+
className?: string;
|
|
13
|
+
/** 自定义样式 */
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
/** 返回按钮点击事件 */
|
|
16
|
+
onBack?: () => void;
|
|
17
|
+
/** 操作区域点击事件 */
|
|
18
|
+
onAction?: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare const PisellSectionHeaders: React.FC<PisellSectionHeadersProps>;
|
|
21
|
+
export default PisellSectionHeaders;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellContextType } from '../../../pisell-config-provider/context';
|
|
3
|
+
export interface AmountProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
/** 平台 */
|
|
5
|
+
platform?: PisellContextType['platform'];
|
|
6
|
+
/** 当前数值 */
|
|
7
|
+
value?: number | string;
|
|
8
|
+
/** 小数点后位数 默认是小数点后2位 */
|
|
9
|
+
precision?: number;
|
|
10
|
+
/** 显示货币符号 指的是 ¥$ 等货币符号等显隐,默认是展示 */
|
|
11
|
+
showCurrencySymbol?: boolean;
|
|
12
|
+
/** 千分位 指的是长金额的千分位逗号隔开,比如“123, 245, 315” 这种展现形式,默认是关闭 */
|
|
13
|
+
useThousandsSeparator?: boolean;
|
|
14
|
+
/** 整数位隐藏小数 指的是如果价格为整数,后面的".00" 将被省略以节省页面空间 */
|
|
15
|
+
hideDecimalForWholeNumbers?: boolean;
|
|
16
|
+
/** 货币符号 */
|
|
17
|
+
symbol?: string;
|
|
18
|
+
}
|
|
19
|
+
declare const Amount: (props: AmountProps) => JSX.Element;
|
|
20
|
+
export default Amount;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface InputItem {
|
|
2
|
+
start_date: string;
|
|
3
|
+
end_date: string;
|
|
4
|
+
total: number;
|
|
5
|
+
num: number;
|
|
6
|
+
}
|
|
7
|
+
interface OutputItem {
|
|
8
|
+
start_date: string;
|
|
9
|
+
end_date: string;
|
|
10
|
+
total: number;
|
|
11
|
+
num: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function formatDateRanges(list: InputItem[]): OutputItem[];
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface CollapsibleListProps<T> {
|
|
4
|
+
list: T[];
|
|
5
|
+
renderItem: (item: T, index: number) => React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const CollapsibleList: React.FC<CollapsibleListProps<any>>;
|
|
10
|
+
export default CollapsibleList;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @title: 金额是否是负
|
|
3
|
+
* @description:
|
|
4
|
+
* @param {string} type
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: WangHan
|
|
7
|
+
* @Date: 2024-11-22 10:01
|
|
8
|
+
*/
|
|
9
|
+
export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
10
|
+
/**
|
|
11
|
+
* @title: 金额格式化
|
|
12
|
+
* @description:
|
|
13
|
+
* @param {number} price
|
|
14
|
+
* @param {string} amountSymbol
|
|
15
|
+
* @param {number} digit
|
|
16
|
+
* @return {*}
|
|
17
|
+
* @Author: WangHan
|
|
18
|
+
* @Date: 2024-11-22 10:58
|
|
19
|
+
*/
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
en: {
|
|
3
3
|
'pisell2.product.card.day': (val: number) => string;
|
|
4
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
4
5
|
'pisell2.product.card.discount.reason': string;
|
|
5
6
|
'pisell2.product.card.discount.note': string;
|
|
6
7
|
'pisell2.product.card.discount.add.note': string;
|
|
@@ -14,6 +15,7 @@ declare const _default: {
|
|
|
14
15
|
};
|
|
15
16
|
'zh-CN': {
|
|
16
17
|
'pisell2.product.card.day': (val: number) => string;
|
|
18
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
17
19
|
'pisell2.product.card.discount.reason': string;
|
|
18
20
|
'pisell2.product.card.discount.note': string;
|
|
19
21
|
'pisell2.product.card.discount.add.note': string;
|
|
@@ -27,6 +29,7 @@ declare const _default: {
|
|
|
27
29
|
};
|
|
28
30
|
'zh-HK': {
|
|
29
31
|
'pisell2.product.card.day': (val: number) => string;
|
|
32
|
+
'pisell2.product.card.day.event': (val: number) => string;
|
|
30
33
|
'pisell2.product.card.discount.reason': string;
|
|
31
34
|
'pisell2.product.card.discount.note': string;
|
|
32
35
|
'pisell2.product.card.discount.add.note': string;
|
|
@@ -24,7 +24,8 @@ __export(locales_exports, {
|
|
|
24
24
|
module.exports = __toCommonJS(locales_exports);
|
|
25
25
|
var locales_default = {
|
|
26
26
|
"en": {
|
|
27
|
-
"pisell2.product.card.day": (val) => `${val > 1 ? "days" : "day"}`,
|
|
27
|
+
"pisell2.product.card.day": (val) => `${val > 1 ? " days" : " day"}`,
|
|
28
|
+
"pisell2.product.card.day.event": (val) => `${val > 1 ? " events" : " event"}`,
|
|
28
29
|
"pisell2.product.card.discount.reason": "Discount reason",
|
|
29
30
|
"pisell2.product.card.discount.note": "Note",
|
|
30
31
|
"pisell2.product.card.discount.add.note": "Add note",
|
|
@@ -38,6 +39,7 @@ var locales_default = {
|
|
|
38
39
|
},
|
|
39
40
|
"zh-CN": {
|
|
40
41
|
"pisell2.product.card.day": (val) => "天",
|
|
42
|
+
"pisell2.product.card.day.event": (val) => "个活动",
|
|
41
43
|
"pisell2.product.card.discount.reason": "折扣原因",
|
|
42
44
|
"pisell2.product.card.discount.note": "备注",
|
|
43
45
|
"pisell2.product.card.discount.add.note": "添加备注",
|
|
@@ -51,6 +53,7 @@ var locales_default = {
|
|
|
51
53
|
},
|
|
52
54
|
"zh-HK": {
|
|
53
55
|
"pisell2.product.card.day": (val) => "天",
|
|
56
|
+
"pisell2.product.card.day.event": (val) => "个活動",
|
|
54
57
|
"pisell2.product.card.discount.reason": "折扣原因",
|
|
55
58
|
"pisell2.product.card.discount.note": "備註",
|
|
56
59
|
"pisell2.product.card.discount.add.note": "添加備註",
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ProductCardTypes, bundleType, optionType, productType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* @title: 套餐数据
|
|
4
|
+
* @description:
|
|
5
|
+
* @return {*}
|
|
6
|
+
* @Author: WangHan
|
|
7
|
+
* @Date: 2025-01-02 23:21
|
|
8
|
+
*/
|
|
9
|
+
export declare const defaultBundle: bundleType;
|
|
10
|
+
/**
|
|
11
|
+
* @description: 单规格
|
|
12
|
+
* @return {*}
|
|
13
|
+
* @Author: WangHan
|
|
14
|
+
* @Date: 2025-01-02 23:00
|
|
15
|
+
*/
|
|
16
|
+
export declare const defaultOption: optionType;
|
|
17
|
+
/**
|
|
18
|
+
* @title: 商品商品类型
|
|
19
|
+
* @description:
|
|
20
|
+
* @return {*}
|
|
21
|
+
* @Author: WangHan
|
|
22
|
+
* @Date: 2025-01-02 22:48
|
|
23
|
+
*/
|
|
24
|
+
export declare const defaultProduct: productType;
|
|
25
|
+
/**
|
|
26
|
+
* @title: 默认数据
|
|
27
|
+
* @description:
|
|
28
|
+
* @return {*}
|
|
29
|
+
* @Author: WangHan
|
|
30
|
+
* @Date: 2024-12-12 16:49
|
|
31
|
+
*/
|
|
32
|
+
export declare const defaultValue: ProductCardTypes;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export declare type bundleType = {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
num: number;
|
|
5
|
+
price: number;
|
|
6
|
+
total: number;
|
|
7
|
+
origin_total?: number;
|
|
8
|
+
price_type?: string;
|
|
9
|
+
options?: optionType[];
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* @description:
|
|
13
|
+
* @return {*}
|
|
14
|
+
* @Author: WangHan
|
|
15
|
+
* @Date: 2025-01-02 23:00
|
|
16
|
+
*/
|
|
17
|
+
export declare type optionType = {
|
|
18
|
+
id: number;
|
|
19
|
+
name: string;
|
|
20
|
+
num: number;
|
|
21
|
+
price: number;
|
|
22
|
+
total: number;
|
|
23
|
+
origin_total?: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* @title: 商品商品类型
|
|
27
|
+
* @description:
|
|
28
|
+
* @return {*}
|
|
29
|
+
* @Author: WangHan
|
|
30
|
+
* @Date: 2025-01-02 22:48
|
|
31
|
+
*/
|
|
32
|
+
export declare type productType = {
|
|
33
|
+
_id: string | number;
|
|
34
|
+
id: number;
|
|
35
|
+
name: string;
|
|
36
|
+
price: number;
|
|
37
|
+
total: number;
|
|
38
|
+
num: number;
|
|
39
|
+
origin_total?: number;
|
|
40
|
+
image?: string;
|
|
41
|
+
isShowNote?: boolean;
|
|
42
|
+
note?: string;
|
|
43
|
+
like_status?: string;
|
|
44
|
+
bundle?: bundleType[];
|
|
45
|
+
options?: optionType[];
|
|
46
|
+
isShowAction?: boolean;
|
|
47
|
+
actionText?: string;
|
|
48
|
+
errorMessage?: string;
|
|
49
|
+
product_option_string?: string;
|
|
50
|
+
discount_reason?: string;
|
|
51
|
+
relation_products?: any[];
|
|
52
|
+
resource_id?: string | number;
|
|
53
|
+
relation_form_name?: string;
|
|
54
|
+
holder_title?: string;
|
|
55
|
+
start_date?: string;
|
|
56
|
+
end_date?: string;
|
|
57
|
+
is_show_duration?: boolean;
|
|
58
|
+
is_show_week?: boolean;
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* 排序总配置
|
|
62
|
+
*/
|
|
63
|
+
export declare type ProductCardTypes = {
|
|
64
|
+
dataSource: productType;
|
|
65
|
+
isShowImage?: boolean;
|
|
66
|
+
isShowHolder?: boolean;
|
|
67
|
+
isShowNote?: boolean;
|
|
68
|
+
isShowPackageNote?: boolean;
|
|
69
|
+
isShowDelete?: boolean;
|
|
70
|
+
disabledEdit?: boolean;
|
|
71
|
+
locale?: string;
|
|
72
|
+
symbol?: string;
|
|
73
|
+
onAction?: (val: any) => void;
|
|
74
|
+
onDelete?: (val: any) => void;
|
|
75
|
+
onNote?: (val: any) => void;
|
|
76
|
+
onLike?: (val: any) => void;
|
|
77
|
+
onCard?: (val: any) => void;
|
|
78
|
+
};
|
|
@@ -74,7 +74,7 @@ var getServiceTime = (item, currentDate) => {
|
|
|
74
74
|
import_dayjs.default.locale(localeTypes[locale]);
|
|
75
75
|
let startDate = (0, import_dayjs.default)(item == null ? void 0 : item.start_date);
|
|
76
76
|
let endDate = (0, import_dayjs.default)(item == null ? void 0 : item.end_date);
|
|
77
|
-
const diffInDays = endDate.diff(startDate, "day");
|
|
77
|
+
const diffInDays = (item == null ? void 0 : item.custom_day_count) || endDate.diff(startDate, "day");
|
|
78
78
|
let _format = isEn2 ? "ddd, DD/MM/YYYY" : "YYYY-MM-DD,ddd";
|
|
79
79
|
if ((item == null ? void 0 : item.hasOwnProperty("format")) && ((_b = item == null ? void 0 : item.format) == null ? void 0 : _b.length) > 0) {
|
|
80
80
|
_format = isEn2 ? (_c = item == null ? void 0 : item.format) == null ? void 0 : _c[0] : (_d = item == null ? void 0 : item.format) == null ? void 0 : _d[1];
|
|
@@ -84,7 +84,11 @@ var getServiceTime = (item, currentDate) => {
|
|
|
84
84
|
endDate = (0, import_dayjs.default)(`${item == null ? void 0 : item.end_date} ${item == null ? void 0 : item.end_time}`);
|
|
85
85
|
}
|
|
86
86
|
const date = `${startDate.format(_format)} ~ ${endDate.format(_format)}`;
|
|
87
|
-
|
|
87
|
+
let text = import_utils.locales.getText("pisell2.product.card.day")(diffInDays);
|
|
88
|
+
if (item == null ? void 0 : item.custom_day_count) {
|
|
89
|
+
text = import_utils.locales.getText("pisell2.product.card.day.event")(diffInDays);
|
|
90
|
+
}
|
|
91
|
+
const duration = `${diffInDays}${text}`;
|
|
88
92
|
return `${date} (${duration})`;
|
|
89
93
|
};
|
|
90
94
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface SectionFooterProps {
|
|
3
|
+
left?: React.ReactNode;
|
|
4
|
+
middle?: React.ReactNode;
|
|
5
|
+
right?: React.ReactNode;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const SectionFooters: (props: SectionFooterProps) => JSX.Element;
|
|
9
|
+
export default SectionFooters;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
declare global {
|
|
4
|
+
namespace JSX {
|
|
5
|
+
interface IntrinsicElements {
|
|
6
|
+
[elemName: string]: any;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export interface WalletCardItem {
|
|
11
|
+
key: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
hidden?: boolean;
|
|
14
|
+
value?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface WalletCardProps {
|
|
17
|
+
/** 二维码弹窗适配平台 */
|
|
18
|
+
platform?: 'pc' | 'h5' | 'ipad';
|
|
19
|
+
/** 卡片主题 */
|
|
20
|
+
mode?: 'dark' | 'light';
|
|
21
|
+
/** 默认还是完整显示code */
|
|
22
|
+
cardStyle?: 'normal' | 'full';
|
|
23
|
+
/** 条形码还是二维码 */
|
|
24
|
+
codeType?: 'barCode' | 'orCode';
|
|
25
|
+
/** 二维码方向 */
|
|
26
|
+
codeDirection?: 'bottom' | 'top';
|
|
27
|
+
/** 自定义背景图 */
|
|
28
|
+
customBackgroundImage?: string;
|
|
29
|
+
/** 图标:可以是React组件或图片URL */
|
|
30
|
+
showIcon?: boolean;
|
|
31
|
+
showWalletName?: boolean;
|
|
32
|
+
iconImg?: string;
|
|
33
|
+
/** 钱包名称 */
|
|
34
|
+
walletName?: string;
|
|
35
|
+
/** 店铺名称 */
|
|
36
|
+
shopName?: string;
|
|
37
|
+
/** 是否显示店铺名称 */
|
|
38
|
+
showShopName?: boolean;
|
|
39
|
+
/** 卡号 */
|
|
40
|
+
cardNo?: string;
|
|
41
|
+
/** 是否显示卡号 */
|
|
42
|
+
showCardNo?: boolean;
|
|
43
|
+
/** 是否显示二维码 */
|
|
44
|
+
showCode?: boolean;
|
|
45
|
+
/** 点击二维码/条形码的回调 */
|
|
46
|
+
onCodeClick?: () => void;
|
|
47
|
+
/** 货币符号 */
|
|
48
|
+
symbol: string;
|
|
49
|
+
/** 点击卡片的回调 */
|
|
50
|
+
onClick?: () => void;
|
|
51
|
+
/** 自定义类名 */
|
|
52
|
+
className?: string;
|
|
53
|
+
items: WalletCardItem[];
|
|
54
|
+
/** 自定义样式 */
|
|
55
|
+
style?: React.CSSProperties;
|
|
56
|
+
title?: string;
|
|
57
|
+
subTitle?: string;
|
|
58
|
+
align?: 'left' | 'center';
|
|
59
|
+
buttonText?: string;
|
|
60
|
+
[key: string]: any;
|
|
61
|
+
/** 是否已登录 */
|
|
62
|
+
isLogin?: boolean;
|
|
63
|
+
}
|
|
64
|
+
declare const WalletCard: React.FC<WalletCardProps>;
|
|
65
|
+
export default WalletCard;
|
package/lib/index.d.ts
CHANGED
|
@@ -117,17 +117,6 @@ export { default as Upload } from './components/upload';
|
|
|
117
117
|
export { default as VirtualKeyboard } from './components/virtual-keyboard';
|
|
118
118
|
export { default as VirtualKeyboardTime } from './components/virtual-keyboard/Time';
|
|
119
119
|
export { default as WalletCard } from './components/walletCard';
|
|
120
|
-
export { default as PisellPriceKeyboard } from './components/virtual-keyboard/Amount';
|
|
121
|
-
export { default as PisellNumberKeyboard } from './components/virtual-keyboard/Number';
|
|
122
|
-
export { default as ProductCard } from './components/productCard';
|
|
123
|
-
export { default as Collapse } from './components/collapse';
|
|
124
|
-
export { default as PisellCustomCheckboxGroup } from './components/pisellCustomCheckboxGroup';
|
|
125
|
-
export { default as PisellDropdown } from './components/pisellDropdown';
|
|
126
|
-
export { default as PisellSectionHeaders } from './components/pisellSectionHeaders';
|
|
127
|
-
export { default as PisellImageCarousels } from './components/pisellImageCarousels';
|
|
128
|
-
export { default as PisellHeaderProgressBar } from './components/pisellHeaderProgressBar';
|
|
129
|
-
export { default as PisellList01 } from './components/pisellList01';
|
|
130
|
-
export { default as SectionFooters } from './components/section-footers';
|
|
131
120
|
export { default as PublishVersionModal } from './components/versionModal';
|
|
132
121
|
export { default as IconSelect } from './components/iconSelect';
|
|
133
122
|
export { default as CustomSelect } from './components/customSelect';
|
|
@@ -138,3 +127,12 @@ export { default as PisellNavigationMenu } from './components/pisellNavigationMe
|
|
|
138
127
|
export { default as PisellAppCard } from './components/pisellAppCard';
|
|
139
128
|
export type { PisellAppCardProps } from './components/pisellAppCard/types';
|
|
140
129
|
export { default as BaseTranslation } from './components/dataSourceComponents/fields/Translation/BaseTranslation';
|
|
130
|
+
export { default as PisellCustomCheckboxGroup } from './components/pisellCustomCheckboxGroup';
|
|
131
|
+
export { default as PisellDropdown } from './components/pisellDropdown';
|
|
132
|
+
export { default as PisellSectionHeaders } from './components/pisellSectionHeaders';
|
|
133
|
+
export { default as PisellImageCarousels } from './components/pisellImageCarousels';
|
|
134
|
+
export { default as PisellHeaderProgressBar } from './components/pisellHeaderProgressBar';
|
|
135
|
+
export { default as PisellList01 } from './components/pisellList01';
|
|
136
|
+
export { default as SectionFooters } from './components/section-footers';
|
|
137
|
+
export { default as ProductCard } from './components/productCard';
|
|
138
|
+
export { default as Collapse } from './components/collapse';
|