@pisell/materials 6.1.1 → 6.2.24
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 +7 -7
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +24 -24
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +25 -25
- package/es/components/TimeResourceSelector/index.d.ts +21 -0
- package/es/components/appVersionControl/index.d.ts +4 -0
- package/es/components/badge/index.d.ts +7 -0
- package/es/components/buttonGroupEdit/index.d.ts +8 -0
- package/es/components/buttonGroupPreview/index.d.ts +19 -0
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/collapse/index.d.ts +15 -0
- package/es/components/cropPhoto/index.d.ts +3 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/es/components/drag-sort-tree/TreeItem/index.js +2 -1
- package/es/components/drag-sort-tree/index.d.ts +4 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/login-and-register/index.js +22 -18
- package/es/components/page/index.d.ts +5 -0
- package/es/components/pisell-config-provider/index.d.ts +12 -0
- package/es/components/pisellAnchor/index.d.ts +23 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellCard/index.d.ts +19 -0
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/es/components/pisellDropdown/index.d.ts +20 -0
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/es/components/pisellImageCarousels/index.d.ts +18 -0
- package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
- package/es/components/pisellInformationEntry/index.d.ts +33 -0
- package/es/components/pisellList01/index.d.ts +17 -0
- package/es/components/pisellQrcode/index.d.ts +10 -0
- package/es/components/pisellSectionHeaders/index.d.ts +21 -0
- package/es/components/pisellStatisticList/index.d.ts +21 -0
- package/es/components/pisellWalletPassCard/index.d.ts +0 -1
- package/es/components/productCard/components/Action/index.d.ts +3 -0
- package/es/components/productCard/components/AmountFooter/index.js +22 -6
- package/es/components/productCard/components/AmountFooter/index.less +28 -1
- package/es/components/productCard/components/Divider/index.d.ts +3 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/es/components/productCard/components/MultiDay/index.d.ts +3 -0
- package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
- package/es/components/productCard/components/Packages/components/options/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/components/options/index.less +3 -2
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/es/components/productCard/components/Time/index.d.ts +3 -0
- package/es/components/productCard/components/Warning/index.d.ts +7 -0
- package/es/components/productCard/components/Warning/index.js +48 -0
- package/es/components/productCard/index.js +8 -8
- package/es/components/productCard/locales.d.ts +84 -0
- package/es/components/productCard/locales.js +6 -3
- package/es/components/productCard/status.d.ts +32 -0
- package/es/components/productCard/status.js +3 -1
- package/es/components/productCard/types.d.ts +84 -0
- package/es/components/productCard/utils.js +8 -6
- package/es/components/section-footers/index.d.ts +9 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/hooks/useTableSetting.d.ts +22 -0
- package/es/components/table/types.d.ts +251 -0
- package/es/components/tabs/index.d.ts +16 -0
- package/es/components/translation/index.d.ts +4 -3
- package/es/components/translation/index.js +34 -32
- package/es/components/versionModal/index.d.ts +23 -0
- package/es/components/walletCard/Guest/index.d.ts +3 -0
- package/es/components/walletCard/Guide/index.d.ts +3 -0
- package/es/components/walletCard/index.d.ts +67 -0
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/TimeResourceSelector/index.d.ts +21 -0
- package/lib/components/appVersionControl/index.d.ts +4 -0
- package/lib/components/badge/index.d.ts +7 -0
- package/lib/components/buttonGroupEdit/index.d.ts +8 -0
- package/lib/components/buttonGroupPreview/index.d.ts +19 -0
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/collapse/index.d.ts +15 -0
- package/lib/components/cropPhoto/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/lib/components/drag-sort-tree/TreeItem/index.js +2 -1
- package/lib/components/drag-sort-tree/index.d.ts +4 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/login-and-register/index.js +2 -2
- package/lib/components/page/index.d.ts +5 -0
- package/lib/components/pisell-config-provider/index.d.ts +12 -0
- package/lib/components/pisellAnchor/index.d.ts +23 -0
- package/lib/components/pisellAvatar/index.d.ts +19 -0
- package/lib/components/pisellCard/index.d.ts +19 -0
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
- package/lib/components/pisellDropdown/index.d.ts +20 -0
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
- package/lib/components/pisellImageCarousels/index.d.ts +18 -0
- package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
- package/lib/components/pisellInformationEntry/index.d.ts +33 -0
- package/lib/components/pisellList01/index.d.ts +17 -0
- package/lib/components/pisellQrcode/index.d.ts +10 -0
- package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
- package/lib/components/pisellStatisticList/index.d.ts +21 -0
- package/lib/components/pisellWalletPassCard/index.d.ts +0 -1
- package/lib/components/productCard/components/Action/index.d.ts +3 -0
- package/lib/components/productCard/components/AmountFooter/index.js +16 -6
- package/lib/components/productCard/components/AmountFooter/index.less +28 -1
- package/lib/components/productCard/components/Divider/index.d.ts +3 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/lib/components/productCard/components/MultiDay/index.d.ts +3 -0
- package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -2
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/components/options/index.less +3 -2
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
- package/lib/components/productCard/components/Time/index.d.ts +3 -0
- package/lib/components/productCard/components/Warning/index.d.ts +7 -0
- package/lib/components/productCard/components/Warning/index.js +68 -0
- package/lib/components/productCard/index.js +4 -11
- package/lib/components/productCard/locales.d.ts +84 -0
- package/lib/components/productCard/locales.js +6 -3
- package/lib/components/productCard/status.d.ts +32 -0
- package/lib/components/productCard/status.js +3 -1
- package/lib/components/productCard/types.d.ts +84 -0
- package/lib/components/productCard/utils.js +7 -6
- package/lib/components/section-footers/index.d.ts +9 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
- package/lib/components/table/types.d.ts +251 -0
- package/lib/components/tabs/index.d.ts +16 -0
- package/lib/components/translation/index.d.ts +4 -3
- package/lib/components/translation/index.js +1 -0
- package/lib/components/versionModal/index.d.ts +23 -0
- package/lib/components/walletCard/Guest/index.d.ts +3 -0
- package/lib/components/walletCard/Guide/index.d.ts +3 -0
- package/lib/components/walletCard/index.d.ts +67 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellContextType } from './context';
|
|
3
|
+
interface PisellConfigProviderType {
|
|
4
|
+
platform?: PisellContextType['platform'];
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
/** 货币符号 */
|
|
7
|
+
symbol?: string;
|
|
8
|
+
/** 当前语言环境 */
|
|
9
|
+
locale?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const PisellConfigProvider: React.FC<PisellConfigProviderType>;
|
|
12
|
+
export default PisellConfigProvider;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface Option {
|
|
4
|
+
id: string | number;
|
|
5
|
+
name: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export interface PisellAnchorProps {
|
|
8
|
+
options?: Option[];
|
|
9
|
+
tab?: string | number;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
onChange?: (key: string | number) => void;
|
|
13
|
+
onTabClick?: () => void;
|
|
14
|
+
containerRef?: React.RefObject<HTMLElement>;
|
|
15
|
+
/**
|
|
16
|
+
* 平台类型,仅用于样式调整,不再影响锚点滚动功能
|
|
17
|
+
* 无论pc还是h5模式,点击锚点都会自动滚动到对应内容
|
|
18
|
+
* @default 'pc'
|
|
19
|
+
*/
|
|
20
|
+
platform?: 'pc' | 'h5';
|
|
21
|
+
}
|
|
22
|
+
declare const PisellAnchor: React.FC<PisellAnchorProps>;
|
|
23
|
+
export default PisellAnchor;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AvatarProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
5
|
+
export interface PisellAvatarProps extends Omit<AvatarProps, 'size' | 'shape'> {
|
|
6
|
+
shape?: 'circle' | 'square';
|
|
7
|
+
size?: AvatarSize;
|
|
8
|
+
src?: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
useTextAvatar?: boolean;
|
|
15
|
+
borderRadius?: number;
|
|
16
|
+
onError?: () => boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const PisellAvatar: React.FC<PisellAvatarProps>;
|
|
19
|
+
export default PisellAvatar;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CardProps } from 'antd';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellCardProps extends CardProps {
|
|
4
|
+
bordered?: boolean;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
padding?: number;
|
|
8
|
+
borderRadius?: number;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
11
|
+
isClickable?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Pisell 卡片容器组件
|
|
15
|
+
* @param props
|
|
16
|
+
* @constructor
|
|
17
|
+
*/
|
|
18
|
+
declare const PisellCard: (props: PisellCardProps) => JSX.Element;
|
|
19
|
+
export default PisellCard;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellCustomCheckboxGroupProps {
|
|
4
|
+
dataSource?: any[];
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
allowAdd?: boolean;
|
|
7
|
+
isMultiple?: boolean;
|
|
8
|
+
id?: string | string[];
|
|
9
|
+
onClick?: (value: any) => void;
|
|
10
|
+
onAdd?: () => void;
|
|
11
|
+
renderAddItem?: (item: any) => React.ReactNode;
|
|
12
|
+
[key: string]: any;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const PisellCustomCheckboxGroup: React.FC<PisellCustomCheckboxGroupProps>;
|
|
16
|
+
export default PisellCustomCheckboxGroup;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface MenuItemType {
|
|
4
|
+
key: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
shortcut?: string;
|
|
8
|
+
divider?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface PisellDropdownProps {
|
|
11
|
+
trigger?: React.ReactNode;
|
|
12
|
+
items?: MenuItemType[];
|
|
13
|
+
showShortcut?: boolean;
|
|
14
|
+
triggerType?: ('click' | 'hover')[];
|
|
15
|
+
className?: string;
|
|
16
|
+
style?: React.CSSProperties;
|
|
17
|
+
onSelect?: (key: string) => void;
|
|
18
|
+
}
|
|
19
|
+
declare const PisellDropdown: React.FC<PisellDropdownProps>;
|
|
20
|
+
export default PisellDropdown;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EmptyProps } from 'antd';
|
|
3
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
+
import './index.less';
|
|
5
|
+
export interface PisellEmptyProps extends EmptyProps {
|
|
6
|
+
/** 平台 */
|
|
7
|
+
platform?: PisellContextType['platform'];
|
|
8
|
+
/** 额外内容描述 */
|
|
9
|
+
extraDescription?: React.ReactNode;
|
|
10
|
+
/** 额外内容描述 */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** 自定义底部额外操作区域 */
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
/** 最大宽度 */
|
|
16
|
+
maxWidth?: number;
|
|
17
|
+
}
|
|
18
|
+
declare const PisellEmpty: (props: PisellEmptyProps) => JSX.Element;
|
|
19
|
+
export default PisellEmpty;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellHeaderProgressBarProps {
|
|
4
|
+
title?: React.ReactNode;
|
|
5
|
+
stepText?: React.ReactNode;
|
|
6
|
+
showClose?: boolean;
|
|
7
|
+
/** 是否启用投影 */
|
|
8
|
+
enableShadow?: boolean;
|
|
9
|
+
/** 是否启用描边 */
|
|
10
|
+
enableBorder?: boolean;
|
|
11
|
+
/** 描边粗细 */
|
|
12
|
+
borderWidth?: number;
|
|
13
|
+
/** 描边颜色 */
|
|
14
|
+
borderColor?: string;
|
|
15
|
+
/** 头部背景颜色 */
|
|
16
|
+
backgroundColor?: string;
|
|
17
|
+
/** 自定义类名 */
|
|
18
|
+
className?: string;
|
|
19
|
+
/** 自定义样式 */
|
|
20
|
+
style?: React.CSSProperties;
|
|
21
|
+
/** 是否显示返回键 */
|
|
22
|
+
showBack?: boolean;
|
|
23
|
+
/** 返回按钮点击事件 */
|
|
24
|
+
onBack?: () => void;
|
|
25
|
+
/** 关闭按钮点击事件 */
|
|
26
|
+
onClose?: () => void;
|
|
27
|
+
}
|
|
28
|
+
declare const PisellHeaderProgressBar: React.FC<PisellHeaderProgressBarProps>;
|
|
29
|
+
export default PisellHeaderProgressBar;
|
|
@@ -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;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export declare type EntryModeType = {
|
|
5
|
+
/**
|
|
6
|
+
* 录入模式名称
|
|
7
|
+
* scanCode: 扫码录入
|
|
8
|
+
* input: 手动录入
|
|
9
|
+
* scanner: 扫码枪录入
|
|
10
|
+
* nfc: NFC录入
|
|
11
|
+
*/
|
|
12
|
+
type: 'scanCode' | 'input' | 'scanner' | 'nfc';
|
|
13
|
+
/**
|
|
14
|
+
* 录入模式文案 没有使用默认文案
|
|
15
|
+
*/
|
|
16
|
+
name?: string;
|
|
17
|
+
};
|
|
18
|
+
export interface PisellInformationEntryProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'title' | 'onChange'> {
|
|
19
|
+
/** 平台 */
|
|
20
|
+
platform?: PisellContextType['platform'];
|
|
21
|
+
/** 录入模式 */
|
|
22
|
+
entryModes: EntryModeType[];
|
|
23
|
+
/** 标题文案 */
|
|
24
|
+
title?: React.ReactNode;
|
|
25
|
+
/** 搜索框描述文案 */
|
|
26
|
+
searchDescribe?: React.ReactNode;
|
|
27
|
+
/** 录入信息值改变 */
|
|
28
|
+
onChange?: (val: string) => void;
|
|
29
|
+
/** 录入类型切换时候触发的 */
|
|
30
|
+
onChangeType?: (val: null | EntryModeType['type']) => void;
|
|
31
|
+
}
|
|
32
|
+
declare const PisellInformationEntry: (props: PisellInformationEntryProps) => JSX.Element;
|
|
33
|
+
export default PisellInformationEntry;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellList01Props {
|
|
4
|
+
dataSource?: any[];
|
|
5
|
+
showSearch: boolean;
|
|
6
|
+
showCategory: boolean;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
renderItem?: (item: any, index: number) => React.ReactNode;
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React.CSSProperties;
|
|
11
|
+
onChange?: (anchor: string) => void;
|
|
12
|
+
onSearch?: (value: any) => void;
|
|
13
|
+
isShowEmpty?: boolean;
|
|
14
|
+
description?: any;
|
|
15
|
+
}
|
|
16
|
+
declare const PisellList01: React.FC<PisellList01Props>;
|
|
17
|
+
export default PisellList01;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface PisellQrcodeProps {
|
|
4
|
+
size?: number;
|
|
5
|
+
platform: 'pc' | 'h5' | 'ipad';
|
|
6
|
+
value: string;
|
|
7
|
+
className: string;
|
|
8
|
+
}
|
|
9
|
+
declare const PisellQrcode: React.FC<PisellQrcodeProps>;
|
|
10
|
+
export default PisellQrcode;
|
|
@@ -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,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
export interface PisellStatisticListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
isHasBorder?: boolean;
|
|
5
|
+
backgroundColors?: string[];
|
|
6
|
+
labelColor?: string;
|
|
7
|
+
valueColor?: string;
|
|
8
|
+
data: {
|
|
9
|
+
label: string;
|
|
10
|
+
value: string;
|
|
11
|
+
isLink?: boolean;
|
|
12
|
+
link?: string;
|
|
13
|
+
tip?: string;
|
|
14
|
+
children?: {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}[];
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
declare const PisellStatisticList: (props: PisellStatisticListProps) => JSX.Element;
|
|
21
|
+
export default PisellStatisticList;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
import { Tooltip } from 'antd';
|
|
3
|
+
import { Tag, Tooltip } from 'antd';
|
|
4
4
|
import { QuestionCircleOutlined } from '@ant-design/icons';
|
|
5
5
|
import { _formatAmount } from "../Packages/utils";
|
|
6
6
|
import Divider from "../Divider";
|
|
@@ -31,6 +31,24 @@ var Footer = function Footer(_ref) {
|
|
|
31
31
|
if (!origin_total) return false;
|
|
32
32
|
return Number(total) != Number(origin_total);
|
|
33
33
|
}, [total, origin_total]);
|
|
34
|
+
var renderDiscountReason = function renderDiscountReason() {
|
|
35
|
+
if (isDiscount && discount_reason && type === 'total') {
|
|
36
|
+
if (Array.isArray(discount_reason)) {
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "".concat(prefix, "product-item-discount-reason")
|
|
39
|
+
}, discount_reason.map(function (reason, index) {
|
|
40
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
41
|
+
key: index,
|
|
42
|
+
color: "red"
|
|
43
|
+
}, reason);
|
|
44
|
+
}));
|
|
45
|
+
}
|
|
46
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: "".concat(prefix, "product-item-discount-reason")
|
|
48
|
+
}, /*#__PURE__*/React.createElement("span", null, "".concat(locales.getText('pisell2.product.card.discount.reason'), ": ").concat(discount_reason))));
|
|
49
|
+
}
|
|
50
|
+
return null;
|
|
51
|
+
};
|
|
34
52
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !hideDivider ? /*#__PURE__*/React.createElement(Divider, {
|
|
35
53
|
type: type !== 'total' ? 'inside' : ''
|
|
36
54
|
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
@@ -49,10 +67,8 @@ var Footer = function Footer(_ref) {
|
|
|
49
67
|
}
|
|
50
68
|
})) : null), /*#__PURE__*/React.createElement("span", null, "\xD7".concat(num))) : null, /*#__PURE__*/React.createElement("span", {
|
|
51
69
|
className: "".concat(prefix, "packages-product-footer-total")
|
|
52
|
-
},
|
|
53
|
-
className: "".concat(prefix, "packages-product-footer-
|
|
54
|
-
},
|
|
55
|
-
className: "".concat(prefix, "product-item-discount-reason")
|
|
56
|
-
}, /*#__PURE__*/React.createElement("span", null, "".concat(locales.getText('pisell2.product.card.discount.reason'), ": ").concat(discount_reason)))) : null);
|
|
70
|
+
}, isDiscount ? /*#__PURE__*/React.createElement("span", {
|
|
71
|
+
className: "".concat(prefix, "packages-product-footer-origin-total")
|
|
72
|
+
}, _formatAmount(origin_total * num, symbol, 2)) : null, /*#__PURE__*/React.createElement("span", null, _formatAmount(total * num, symbol))))), renderDiscountReason());
|
|
57
73
|
};
|
|
58
74
|
export default Footer;
|
|
@@ -35,6 +35,19 @@
|
|
|
35
35
|
color: var(--Gray-900, #101828);
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
+
&-packages-product-footer-origin-total {
|
|
39
|
+
color: var(--Gray-500, #667085);
|
|
40
|
+
text-align: center;
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
font-style: normal;
|
|
43
|
+
font-weight: 400;
|
|
44
|
+
line-height: 18px; /* 150% */
|
|
45
|
+
text-decoration-line: line-through;
|
|
46
|
+
margin-right: 8px;
|
|
47
|
+
display: inline-block;
|
|
48
|
+
transform: translateY(-1px);
|
|
49
|
+
}
|
|
50
|
+
|
|
38
51
|
&-packages-product-hide-divider-footer {
|
|
39
52
|
margin-top: 8px;
|
|
40
53
|
}
|
|
@@ -45,6 +58,20 @@
|
|
|
45
58
|
font-style: normal;
|
|
46
59
|
font-weight: 400;
|
|
47
60
|
line-height: 20px;
|
|
48
|
-
|
|
61
|
+
margin-top: 4px;
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-wrap: wrap;
|
|
64
|
+
gap: 4px;
|
|
65
|
+
overflow: hidden;
|
|
66
|
+
|
|
67
|
+
>span {
|
|
68
|
+
display: inline-block;
|
|
69
|
+
max-width: 100%;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
border-radius: 4px;
|
|
74
|
+
margin: 0;
|
|
75
|
+
}
|
|
49
76
|
}
|
|
50
77
|
}
|
|
@@ -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 @@
|
|
|
1
|
+
export declare const renderBundles: (item: any, hidePrice?: boolean, isShowPackageNote?: boolean) => JSX.Element;
|
|
@@ -18,6 +18,7 @@ export var renderBundles = function renderBundles(item, hidePrice, isShowPackage
|
|
|
18
18
|
id = item.id,
|
|
19
19
|
price = item.price,
|
|
20
20
|
symbol = item.symbol,
|
|
21
|
+
options = item.options,
|
|
21
22
|
option = item.option;
|
|
22
23
|
return /*#__PURE__*/React.createElement("div", {
|
|
23
24
|
key: id,
|
|
@@ -29,7 +30,7 @@ export var renderBundles = function renderBundles(item, hidePrice, isShowPackage
|
|
|
29
30
|
}, translation(title || name)), !hidePrice ? /*#__PURE__*/React.createElement("div", {
|
|
30
31
|
className: "".concat(prefix, "packages-product-bundle-info-num")
|
|
31
32
|
}, _formatAmount(price, symbol)) : null), /*#__PURE__*/React.createElement(Options, {
|
|
32
|
-
options: option,
|
|
33
|
+
options: options || option,
|
|
33
34
|
amountSymbol: symbol
|
|
34
35
|
}), /*#__PURE__*/React.createElement(Footer, {
|
|
35
36
|
item: item
|
|
@@ -14,15 +14,16 @@
|
|
|
14
14
|
&-packages-product-bundle-option-item {
|
|
15
15
|
display: flex;
|
|
16
16
|
justify-content: space-between;
|
|
17
|
+
gap: 8px;
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
&-packages-product-bundle-option-item-left {
|
|
20
21
|
display: flex;
|
|
21
|
-
gap:
|
|
22
|
+
gap: 8px;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
&-packages-product-bundle-option-item-left-amount {
|
|
25
|
-
margin-left:
|
|
26
|
+
margin-left: 0;
|
|
26
27
|
display: flex;
|
|
27
28
|
gap: 4px;
|
|
28
29
|
}
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
declare const Like: ({ status, onLike, className, style, isShowChangeResource, }: {
|
|
3
|
+
style?: any;
|
|
4
|
+
status: string;
|
|
5
|
+
onLike?: any;
|
|
6
|
+
className?: string | undefined;
|
|
7
|
+
isShowChangeResource?: boolean | undefined;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export default Like;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import './index.less';
|
|
2
|
+
declare const Time: ({ item, isShowHolder, onLike, isShowChangeResource, changeResource, changeHolder, isShowChangeHolder, holderMode, onAddHolder, isShowAddHolderButton, onClearHolder, onClearResource, }: any) => JSX.Element | null;
|
|
3
|
+
export default Time;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { locales } from '@pisell/utils';
|
|
3
|
+
import { Alert } from 'antd';
|
|
4
|
+
import "../../index.less";
|
|
5
|
+
var Warning = function Warning(_ref) {
|
|
6
|
+
var errorMessage = _ref.errorMessage,
|
|
7
|
+
osWarnTips = _ref.osWarnTips;
|
|
8
|
+
/**
|
|
9
|
+
* @title: 错误提示列表
|
|
10
|
+
* @description: 错误提示列表
|
|
11
|
+
* @param {*} useMemo
|
|
12
|
+
* @return {*}
|
|
13
|
+
* @Author: WangHan
|
|
14
|
+
* @Date: 2025-07-23 10:10
|
|
15
|
+
*/
|
|
16
|
+
var errorLists = useMemo(function () {
|
|
17
|
+
if (errorMessage) {
|
|
18
|
+
// 如果errorMessage是数组,则返回数组
|
|
19
|
+
if (Array.isArray(errorMessage)) {
|
|
20
|
+
return errorMessage;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// 如果errorMessage是字符串,则返回字符串
|
|
24
|
+
if (typeof errorMessage === 'string') {
|
|
25
|
+
return [errorMessage];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if ((osWarnTips === null || osWarnTips === void 0 ? void 0 : osWarnTips.length) > 0) {
|
|
29
|
+
return osWarnTips.map(function (item) {
|
|
30
|
+
return locales.getText(item);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
return [];
|
|
34
|
+
}, [errorMessage, osWarnTips]);
|
|
35
|
+
if ((errorLists === null || errorLists === void 0 ? void 0 : errorLists.length) === 0) {
|
|
36
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null);
|
|
37
|
+
}
|
|
38
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, errorLists.map(function (item, index) {
|
|
39
|
+
return /*#__PURE__*/React.createElement(Alert, {
|
|
40
|
+
key: index,
|
|
41
|
+
message: item,
|
|
42
|
+
type: "warning",
|
|
43
|
+
showIcon: true,
|
|
44
|
+
className: "pisell-lowcode-product-card-error"
|
|
45
|
+
});
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
export default Warning;
|
|
@@ -10,7 +10,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
|
|
|
10
10
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
11
11
|
import React, { useMemo, useRef } from 'react';
|
|
12
12
|
import classNames from 'classnames';
|
|
13
|
-
import { Alert } from 'antd';
|
|
14
13
|
import { locales } from '@pisell/utils';
|
|
15
14
|
import CardPro from "../cardPro";
|
|
16
15
|
import Header from "./components/Header";
|
|
@@ -26,6 +25,7 @@ import UseOpenNote from "./hooks/useOpenNote";
|
|
|
26
25
|
import localeTexts from "./locales";
|
|
27
26
|
import { defaultValue } from "./status";
|
|
28
27
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
28
|
+
import Warning from "./components/Warning";
|
|
29
29
|
import "./index.less";
|
|
30
30
|
var ProductCard = function ProductCard(props) {
|
|
31
31
|
var _utils$storage, _dataSource$items;
|
|
@@ -64,7 +64,9 @@ var ProductCard = function ProductCard(props) {
|
|
|
64
64
|
isShowAction = dataSource.isShowAction,
|
|
65
65
|
actionText = dataSource.actionText,
|
|
66
66
|
errorMessage = dataSource.errorMessage,
|
|
67
|
-
isNormalProduct = dataSource.isNormalProduct
|
|
67
|
+
isNormalProduct = dataSource.isNormalProduct,
|
|
68
|
+
_dataSource$osWarnTip = dataSource.osWarnTips,
|
|
69
|
+
osWarnTips = _dataSource$osWarnTip === void 0 ? [] : _dataSource$osWarnTip;
|
|
68
70
|
|
|
69
71
|
/**
|
|
70
72
|
* @title: 显示图片
|
|
@@ -159,12 +161,10 @@ var ProductCard = function ProductCard(props) {
|
|
|
159
161
|
onAction: function onAction() {
|
|
160
162
|
return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
|
|
161
163
|
}
|
|
162
|
-
}) : null,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
className: "pisell-lowcode-product-card-error"
|
|
167
|
-
}) : null), /*#__PURE__*/React.createElement(UseOpenNote, {
|
|
164
|
+
}) : null, /*#__PURE__*/React.createElement(Warning, {
|
|
165
|
+
errorMessage: errorMessage,
|
|
166
|
+
osWarnTips: osWarnTips
|
|
167
|
+
})), /*#__PURE__*/React.createElement(UseOpenNote, {
|
|
168
168
|
ref: useOpenNoteRef,
|
|
169
169
|
onNoteChange: function onNoteChange(e) {
|
|
170
170
|
onNote === null || onNote === void 0 || onNote(_objectSpread(_objectSpread({}, dataSource), {}, {
|