@pisell/materials 6.11.13 → 6.11.14

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.
Files changed (147) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/meta.js +1 -1
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/es/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +7 -0
  8. package/es/components/PisellSteps/PisellSteps.d.ts +14 -0
  9. package/es/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
  10. package/es/components/PisellSuperTabs/hooks/index.d.ts +1 -0
  11. package/es/components/PisellSuperTabs/hooks/useTabsState.d.ts +7 -0
  12. package/es/components/PisellSuperTabs/index.d.ts +3 -0
  13. package/es/components/PisellSuperTabs/types.d.ts +212 -0
  14. package/es/components/PisellTabbar/constants.d.ts +47 -0
  15. package/es/components/PisellTabbar/hooks/index.d.ts +2 -0
  16. package/es/components/PisellTabbar/hooks/useActiveKey.d.ts +55 -0
  17. package/es/components/PisellTabbar/hooks/useExpand.d.ts +42 -0
  18. package/es/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
  19. package/es/components/PisellTabbar/template/Template1/utils/index.d.ts +35 -0
  20. package/es/components/PisellTabbar/types.d.ts +90 -0
  21. package/es/components/PisellTabbar/utils/index.d.ts +69 -0
  22. package/es/components/cardPro/index.d.ts +4 -0
  23. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  24. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  25. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
  26. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +26 -0
  27. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  28. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  29. package/es/components/dataSourceComponents/fields/index.d.ts +4 -4
  30. package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +15 -0
  31. package/es/components/iconfont/index.d.ts +8 -0
  32. package/es/components/pisell-config-provider/context.d.ts +22 -0
  33. package/es/components/pisellAdjustPrice/type.d.ts +22 -0
  34. package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
  35. package/es/components/pisellDatePicker/index.d.ts +1 -0
  36. package/es/components/pisellEmpty/index.d.ts +19 -0
  37. package/es/components/pisellLookup/PisellLookup.d.ts +4 -0
  38. package/es/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
  39. package/es/components/pisellStatisticList/index.d.ts +22 -0
  40. package/es/components/pisellToast/squareToast/index.d.ts +15 -0
  41. package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
  42. package/es/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
  43. package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
  44. package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +29 -0
  45. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  46. package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +7 -0
  47. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
  48. package/es/components/productCard/cartSkuCard/components/holders/index.js +1 -1
  49. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  50. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +9 -0
  51. package/es/components/productCard/cartSkuCard/index.d.ts +11 -0
  52. package/es/components/productCard/cartSkuCard/locales.d.ts +178 -0
  53. package/es/components/productCard/components/Action/index.d.ts +4 -0
  54. package/es/components/productCard/locales.d.ts +138 -0
  55. package/es/components/productCard/status.d.ts +32 -0
  56. package/es/components/productCard/types.d.ts +95 -0
  57. package/es/components/select/index.d.ts +9 -0
  58. package/es/components/table/Table/fields/select/Edit/index.d.ts +4 -0
  59. package/es/components/table/Table/utils.d.ts +1 -1
  60. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +15 -0
  61. package/es/components/virtual-keyboard/Number/types.d.ts +26 -0
  62. package/es/locales/en-US.d.ts +384 -0
  63. package/es/locales/index.d.ts +1 -0
  64. package/es/locales/ja.d.ts +348 -0
  65. package/es/locales/pt.d.ts +348 -0
  66. package/es/locales/zh-CN.d.ts +379 -0
  67. package/es/locales/zh-TW.d.ts +379 -0
  68. package/lib/components/PisellCards/components/MultilevelCard/components/PanelWrapper.d.ts +7 -0
  69. package/lib/components/PisellSteps/PisellSteps.d.ts +14 -0
  70. package/lib/components/PisellSuperTabs/PisellSuperTabs.d.ts +8 -0
  71. package/lib/components/PisellSuperTabs/hooks/index.d.ts +1 -0
  72. package/lib/components/PisellSuperTabs/hooks/useTabsState.d.ts +7 -0
  73. package/lib/components/PisellSuperTabs/index.d.ts +3 -0
  74. package/lib/components/PisellSuperTabs/types.d.ts +212 -0
  75. package/lib/components/PisellTabbar/constants.d.ts +47 -0
  76. package/lib/components/PisellTabbar/hooks/index.d.ts +2 -0
  77. package/lib/components/PisellTabbar/hooks/useActiveKey.d.ts +55 -0
  78. package/lib/components/PisellTabbar/hooks/useExpand.d.ts +42 -0
  79. package/lib/components/PisellTabbar/template/Template1/constants.d.ts +10 -0
  80. package/lib/components/PisellTabbar/template/Template1/utils/index.d.ts +35 -0
  81. package/lib/components/PisellTabbar/types.d.ts +90 -0
  82. package/lib/components/PisellTabbar/utils/index.d.ts +69 -0
  83. package/lib/components/cardPro/index.d.ts +4 -0
  84. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  85. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  86. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
  87. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +26 -0
  88. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  89. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  90. package/lib/components/dataSourceComponents/fields/index.d.ts +4 -4
  91. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +15 -0
  92. package/lib/components/iconfont/index.d.ts +8 -0
  93. package/lib/components/pisell-config-provider/context.d.ts +22 -0
  94. package/lib/components/pisellAdjustPrice/type.d.ts +22 -0
  95. package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
  96. package/lib/components/pisellDatePicker/index.d.ts +1 -0
  97. package/lib/components/pisellEmpty/index.d.ts +19 -0
  98. package/lib/components/pisellLookup/PisellLookup.d.ts +4 -0
  99. package/lib/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
  100. package/lib/components/pisellStatisticList/index.d.ts +22 -0
  101. package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
  102. package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
  103. package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
  104. package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
  105. package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +29 -0
  106. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  107. package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +7 -0
  108. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +36 -0
  109. package/lib/components/productCard/cartSkuCard/components/holders/index.js +1 -1
  110. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  111. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +9 -0
  112. package/lib/components/productCard/cartSkuCard/index.d.ts +11 -0
  113. package/lib/components/productCard/cartSkuCard/locales.d.ts +178 -0
  114. package/lib/components/productCard/components/Action/index.d.ts +4 -0
  115. package/lib/components/productCard/locales.d.ts +138 -0
  116. package/lib/components/productCard/status.d.ts +32 -0
  117. package/lib/components/productCard/types.d.ts +95 -0
  118. package/lib/components/select/index.d.ts +9 -0
  119. package/lib/components/table/Table/fields/select/Edit/index.d.ts +4 -0
  120. package/lib/components/table/Table/utils.d.ts +1 -1
  121. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +15 -0
  122. package/lib/components/virtual-keyboard/Number/types.d.ts +26 -0
  123. package/lib/locales/en-US.d.ts +384 -0
  124. package/lib/locales/index.d.ts +1 -0
  125. package/lib/locales/ja.d.ts +348 -0
  126. package/lib/locales/pt.d.ts +348 -0
  127. package/lib/locales/zh-CN.d.ts +379 -0
  128. package/lib/locales/zh-TW.d.ts +379 -0
  129. package/package.json +3 -3
  130. package/es/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +0 -24
  131. package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -8
  132. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +0 -8
  133. package/es/components/pisellRecordBoard/shellFrame/Search/index.d.ts +0 -10
  134. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +0 -11
  135. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +0 -16
  136. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
  137. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -4
  138. package/es/components/sort/index.d.ts +0 -5
  139. package/lib/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +0 -24
  140. package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +0 -8
  141. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +0 -8
  142. package/lib/components/pisellRecordBoard/shellFrame/Search/index.d.ts +0 -10
  143. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +0 -11
  144. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +0 -16
  145. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.d.ts +0 -32
  146. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -4
  147. package/lib/components/sort/index.d.ts +0 -5
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  declare const Subdomain: React.FC<import("antd").InputProps & {
3
3
  onChange: (value: string) => void;
4
4
  onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
5
- rootDomain: "custom" | "saas" | "xzero";
5
+ rootDomain: "custom" | "xzero" | "saas";
6
6
  customDomain?: string | undefined;
7
7
  value?: string | undefined;
8
8
  tenantId: string;
@@ -15,4 +15,4 @@ export declare const getFileMetadataParams: (file: RcFile & {
15
15
  metadata?: MediaMetadata;
16
16
  }) => Record<string, any>;
17
17
  export declare const isValueEqual: (value: any, fileListValue: any) => boolean;
18
- export declare const getBaseTime: (size: number) => 1000 | 2000 | 4000 | 8000;
18
+ export declare const getBaseTime: (size: number) => 2000 | 1000 | 4000 | 8000;
@@ -20,7 +20,7 @@ declare const formFieldMap: {
20
20
  Subdomain: import("react").FC<import("antd").InputProps & {
21
21
  onChange: (value: string) => void;
22
22
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
23
- rootDomain: "custom" | "saas" | "xzero";
23
+ rootDomain: "custom" | "xzero" | "saas";
24
24
  customDomain?: string | undefined;
25
25
  value?: string | undefined;
26
26
  tenantId: string;
@@ -61,7 +61,7 @@ declare const formFieldMap: {
61
61
  FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
62
62
  FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
63
63
  };
64
- declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
64
+ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
65
65
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
66
66
  } & {
67
67
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -78,7 +78,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
78
78
  Subdomain: import("react").FC<import("antd").InputProps & {
79
79
  onChange: (value: string) => void;
80
80
  onBlur?: ((e: import("react").FocusEvent<HTMLInputElement, Element>) => void) | undefined;
81
- rootDomain: "custom" | "saas" | "xzero";
81
+ rootDomain: "custom" | "xzero" | "saas";
82
82
  customDomain?: string | undefined;
83
83
  value?: string | undefined;
84
84
  tenantId: string;
@@ -98,7 +98,7 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
98
98
  } & {
99
99
  dataSource?: any;
100
100
  extraParams?: Record<string, any> | undefined;
101
- }) => import("react").JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
101
+ }) => import("react").JSX.Element) | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
102
102
  onChange: (value: string) => void;
103
103
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
104
104
  export { getFieldComponent, formFieldMap };
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export interface VariablesContextType {
3
+ children?: React.ReactNode;
4
+ variables?: Record<string, any>;
5
+ registerVariable?: (value: Record<string, any>) => void;
6
+ parseVariable?: (str: string, localVariables?: Record<string, any>) => any;
7
+ registerValueVariable?: (componentId: string, value: Record<string, any>) => void;
8
+ registerFunctionVariable?: (componentId: string, value: Record<string, any>) => void;
9
+ subscribeVariables?: (listener: (allVariables: Record<string, any>, updateVariables: Record<string, any>) => void) => () => void;
10
+ config?: {
11
+ disabledHistoryListener?: boolean;
12
+ };
13
+ }
14
+ export declare const VariablesContext: import("react").Context<VariablesContextType>;
15
+ export default VariablesContext;
@@ -0,0 +1,8 @@
1
+ import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
2
+ import React from 'react';
3
+ interface IconFontProps extends IconComponentProps {
4
+ type: string;
5
+ onClick?: React.MouseEventHandler<HTMLSpanElement>;
6
+ }
7
+ declare const IconFont: React.FC<IconFontProps>;
8
+ export default IconFont;
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ export interface PisellContextType {
3
+ platform: 'h5' | 'pc' | 'ipad';
4
+ /** 货币符号 */
5
+ symbol?: string;
6
+ /** 当前语言环境 */
7
+ locale?: string;
8
+ /** 获取货币符号 */
9
+ getSymbolic?: () => string;
10
+ }
11
+ export declare const PisellContext: import("react").Context<PisellContextType>;
12
+ /**
13
+ * provider外获取当前全局配置
14
+ */
15
+ declare class GlobalConfig {
16
+ private config;
17
+ constructor();
18
+ setConfig(config: PisellContextType): void;
19
+ getConfig(): PisellContextType;
20
+ }
21
+ export declare const globalConfig: GlobalConfig;
22
+ export default PisellContext;
@@ -0,0 +1,22 @@
1
+ export interface PisellAdjustPriceProps {
2
+ value?: number;
3
+ originValue: number;
4
+ defaultValue?: number;
5
+ onChange?: (val: number) => void;
6
+ selectType?: 'light' | 'dark';
7
+ backgroundColor?: string;
8
+ containerBackgroundColor?: string;
9
+ buttonBackgroundColor?: string;
10
+ textColor?: string;
11
+ resetButtonBackgroundColor?: string;
12
+ resetButtonTextColor?: string;
13
+ isDoneButtonFollowTheme?: boolean;
14
+ doneButtonBackgroundColor?: string;
15
+ doneButtonTextColor?: string;
16
+ isShowMainText?: boolean;
17
+ mainTextColor?: string;
18
+ isShowSubText?: boolean;
19
+ subTextColor?: string;
20
+ resetText?: string;
21
+ doneText?: string;
22
+ }
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  declare const useDataSourceKey: () => {
2
3
  dataSourceKey: string | undefined;
3
4
  dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const PisellDatePicker: (props: any) => import("react").JSX.Element;
2
3
  export default PisellDatePicker;
@@ -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) => React.JSX.Element;
19
+ export default PisellEmpty;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { PisellLookupProps, PisellLookupRef } from './types';
3
+ import './PisellLookup.less';
4
+ export declare const PisellLookup: React.ForwardRefExoticComponent<PisellLookupProps & React.RefAttributes<PisellLookupRef>>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { LookupTriggerProps, LookupTriggerRef } from '../types';
3
+ export declare const LookupTrigger: React.ForwardRefExoticComponent<LookupTriggerProps & React.RefAttributes<LookupTriggerRef>>;
@@ -0,0 +1,22 @@
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
+ onClick?: () => void;
15
+ children?: {
16
+ label: string;
17
+ value: string;
18
+ }[];
19
+ }[];
20
+ }
21
+ declare const PisellStatisticList: (props: PisellStatisticListProps) => React.JSX.Element;
22
+ export default PisellStatisticList;
@@ -0,0 +1,15 @@
1
+ import { clear, show, success, info, loading, fail, hide } from './methods';
2
+ import './index.less';
3
+ interface ToastInstance {
4
+ show: typeof show;
5
+ clear: typeof clear;
6
+ success: typeof success;
7
+ info: typeof info;
8
+ loading: typeof loading;
9
+ fail: typeof fail;
10
+ error: typeof fail;
11
+ hide: typeof hide;
12
+ }
13
+ declare const Toast: ToastInstance;
14
+ export declare const useToast: () => ToastInstance;
15
+ export default Toast;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { ToastProps } from './toast';
3
+ interface ToastInstance {
4
+ close: () => void;
5
+ }
6
+ declare const show: (configOrContent: Partial<ToastProps> | React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
7
+ declare const clear: () => void;
8
+ declare const success: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
9
+ declare const info: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
10
+ declare const loading: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
11
+ declare const fail: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
12
+ declare const hide: () => void;
13
+ export { show, clear, success, info, loading, fail, hide };
@@ -0,0 +1,28 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { Root } from 'react-dom/client';
3
+ import React from 'react';
4
+ declare type ImperativeProps = {
5
+ open?: boolean;
6
+ onCancel?: () => void;
7
+ afterClose?: () => void;
8
+ };
9
+ declare type TargetElement = ReactElement<ImperativeProps>;
10
+ export declare type ImperativeHandler = {
11
+ close: () => void;
12
+ replace: (element: TargetElement) => void;
13
+ isRendered?: () => boolean;
14
+ };
15
+ export declare type UnmountType = () => Promise<void>;
16
+ export declare type RenderType = (node: React.ReactElement, container: Element | DocumentFragment) => UnmountType;
17
+ declare const MARK = "__pisell_react_root__";
18
+ declare type ContainerType = (Element | DocumentFragment) & {
19
+ [MARK]?: Root;
20
+ };
21
+ export declare function render(node: React.ReactElement, container: ContainerType): void;
22
+ export declare function unmount(container: ContainerType): Promise<void>;
23
+ /**
24
+ * @deprecated 设置 React 渲染函数以兼容使用。
25
+ */
26
+ export declare function unstableSetRender(render?: RenderType): RenderType;
27
+ export declare function renderImperatively(element: TargetElement): ImperativeHandler;
28
+ export {};
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export declare type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading';
4
+ export interface ToastProps {
5
+ /** Toast 类型 */
6
+ icon?: ToastType | React.ReactNode;
7
+ /** 显示的内容,支持文本或 React 节点 */
8
+ content: React.ReactNode;
9
+ /** 是否显示 */
10
+ open?: boolean;
11
+ /** 自动关闭时间,单位毫秒,0 表示不自动关闭 */
12
+ duration?: number;
13
+ /** 关闭 */
14
+ onCancel?: () => void;
15
+ /** 关闭后回调 */
16
+ afterClose?: () => void;
17
+ /** 自定义样式类名 */
18
+ className?: string;
19
+ /** 自定义样式 */
20
+ style?: React.CSSProperties;
21
+ /** 是否显示遮罩 */
22
+ mask?: boolean;
23
+ }
24
+ declare const Toast: React.FC<ToastProps>;
25
+ export default Toast;
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * 赠品项数据结构
4
+ */
5
+ export interface IGiftItem {
6
+ /** 图片 URL */
7
+ image?: string;
8
+ /** 标题 */
9
+ title?: string;
10
+ /** 唯一标识 */
11
+ id?: string;
12
+ }
13
+ /**
14
+ * Gift 组件 Props
15
+ */
16
+ export interface IGiftProps {
17
+ /** 是否显示赠品组件 */
18
+ isShow?: boolean;
19
+ /** 赠品总数量(可选择的总数) */
20
+ totalCount?: number;
21
+ /** 已选择的赠品列表 */
22
+ selectedGifts?: IGiftItem[];
23
+ /** 选择的赠品原始数据列表 */
24
+ _selectedOriginGifts?: any[];
25
+ /** 提示文本(未选择时显示) */
26
+ promptText?: string;
27
+ /** 点击事件回调 */
28
+ onClick?: (e: React.MouseEvent) => void;
29
+ }
@@ -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,7 @@
1
+ import React from 'react';
2
+ interface IPromotionProps {
3
+ promotions: any[];
4
+ onClick?: (item: any) => void;
5
+ }
6
+ declare const Promotion: (props: IPromotionProps) => React.JSX.Element;
7
+ export default Promotion;
@@ -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;
@@ -27,7 +27,7 @@ var Holders = function Holders(props) {
27
27
  ;
28
28
  var renderHolder = function renderHolder(id) {
29
29
  if (!id) return null;
30
- var holder = holders.find(function (item) {
30
+ var holder = (holders || []).find(function (item) {
31
31
  return item.id === id;
32
32
  });
33
33
  return /*#__PURE__*/React.createElement("div", {
@@ -0,0 +1,46 @@
1
+ import type { ReactNode } from 'react';
2
+ import React from 'react';
3
+ declare type NativeProps<S extends string = never> = {
4
+ className?: string;
5
+ style?: React.CSSProperties & Partial<Record<S, string>>;
6
+ };
7
+ declare type PropagationEvent = 'click';
8
+ import './index.less';
9
+ declare type SideType = 'left' | 'right';
10
+ export declare type SwipeActionRef = {
11
+ close: () => void;
12
+ show: (side?: SideType) => void;
13
+ };
14
+ declare type ActionColor = 'light' | 'weak' | 'primary' | 'success' | 'warning' | 'danger';
15
+ export declare type Action = {
16
+ key: string | number;
17
+ text: ReactNode;
18
+ color?: ActionColor | string;
19
+ onClick?: (e: React.MouseEvent) => void;
20
+ style?: React.CSSProperties;
21
+ };
22
+ export declare type SwipeActionProps = {
23
+ rightActions?: Action[];
24
+ leftActions?: Action[];
25
+ onAction?: (action: Action, e: React.MouseEvent) => void;
26
+ closeOnTouchOutside?: boolean;
27
+ closeOnAction?: boolean;
28
+ children: ReactNode;
29
+ stopPropagation?: PropagationEvent[];
30
+ onActionsReveal?: (side: SideType) => void;
31
+ onClose?: () => void;
32
+ escapeDom?: string;
33
+ } & NativeProps<'--background'>;
34
+ export declare const SwipeAction: React.ForwardRefExoticComponent<{
35
+ rightActions?: Action[] | undefined;
36
+ leftActions?: Action[] | undefined;
37
+ onAction?: ((action: Action, e: React.MouseEvent) => void) | undefined;
38
+ closeOnTouchOutside?: boolean | undefined;
39
+ closeOnAction?: boolean | undefined;
40
+ children: ReactNode;
41
+ stopPropagation?: "click"[] | undefined;
42
+ onActionsReveal?: ((side: SideType) => void) | undefined;
43
+ onClose?: (() => void) | undefined;
44
+ escapeDom?: string | undefined;
45
+ } & NativeProps<"--background"> & React.RefAttributes<SwipeActionRef>>;
46
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import 'dayjs/locale/zh-cn';
3
+ import 'dayjs/locale/en';
4
+ import 'dayjs/locale/zh-tw';
5
+ import 'dayjs/locale/ja';
6
+ import 'dayjs/locale/pt';
7
+ import './index.less';
8
+ declare const TimeRange: (props: any) => React.JSX.Element | null;
9
+ export default TimeRange;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ import { ProductCardTypes } from '../types';
4
+ interface ISKUCardProps extends ProductCardTypes {
5
+ type: 'a2' | 'a5' | 'a9';
6
+ rightActions: any[];
7
+ escapeDom?: string;
8
+ }
9
+ export declare const PREFIX = "pisell-cart-sku-card";
10
+ declare const CartSkuCard: (props: ISKUCardProps) => React.JSX.Element | null;
11
+ export default CartSkuCard;
@@ -0,0 +1,178 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.product.card.discount.reason': string;
4
+ 'pisell2.cart.sku-card.more': string;
5
+ 'pisell2.cart.sku-card.packages.title': string;
6
+ 'pisell2.cart.sku-card.sales.title': string;
7
+ 'pisell2.cart.sku-card.actions.delete': string;
8
+ 'pisell2.cart.sku-card.unassigned': string;
9
+ 'pisell2.cart.sku-card.gift.title': string;
10
+ 'pisell2.cart.sku-card.gift.select.title': string;
11
+ 'pisell2.cart.sku-card.gift.total': (num: number) => string;
12
+ 'pisell2.product.card.day': (val: number) => string;
13
+ 'pisell2.product.card.day.event': (val: number) => string;
14
+ 'pisell2.product.card.minute': (val: number) => string;
15
+ 'pisell2.product.card.discount.note': string;
16
+ 'pisell2.product.card.edit': string;
17
+ 'pisell2.product.card.discount.add.note': string;
18
+ 'pisell2.product.card.discount.edit.note': string;
19
+ 'pisell2.product.card.confirm': string;
20
+ 'pisell2.product.card.cancel': string;
21
+ 'pisell2.product.card.note.pla': string;
22
+ 'pisell2.product.card.items.package': string;
23
+ 'pisell2.product.card.view-all': string;
24
+ 'pisell2.product.card.view-less': string;
25
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
26
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
27
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
28
+ 'pisell2.product.card.add.holder.modal.title.1': string;
29
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
30
+ 'pisell2.product.card.sales': string;
31
+ 'pisell2.product.card.add.holder.modal.cancel': string;
32
+ 'pisell2.product.card.add.holder.modal.clear': string;
33
+ 'pisell2.product.card.add.holder.modal.apply': string;
34
+ 'pisell2.product.card.add.holder.modal.add': string;
35
+ 'pisell2.product.card.closing-soon.warning': string;
36
+ };
37
+ 'zh-CN': {
38
+ 'pisell2.product.card.discount.reason': string;
39
+ 'pisell2.cart.sku-card.more': string;
40
+ 'pisell2.cart.sku-card.packages.title': string;
41
+ 'pisell2.cart.sku-card.sales.title': string;
42
+ 'pisell2.cart.sku-card.actions.delete': string;
43
+ 'pisell2.cart.sku-card.unassigned': string;
44
+ 'pisell2.cart.sku-card.gift.title': string;
45
+ 'pisell2.cart.sku-card.gift.select.title': string;
46
+ 'pisell2.cart.sku-card.gift.total': (num: number) => string;
47
+ 'pisell2.product.card.edit': string;
48
+ 'pisell2.product.card.day': (val: number) => string;
49
+ 'pisell2.product.card.day.event': (val: number) => string;
50
+ 'pisell2.product.card.minute': (val: number) => string;
51
+ 'pisell2.product.card.discount.note': string;
52
+ 'pisell2.product.card.discount.add.note': string;
53
+ 'pisell2.product.card.discount.edit.note': string;
54
+ 'pisell2.product.card.confirm': string;
55
+ 'pisell2.product.card.cancel': string;
56
+ 'pisell2.product.card.note.pla': string;
57
+ 'pisell2.product.card.items.package': string;
58
+ 'pisell2.product.card.view-all': string;
59
+ 'pisell2.product.card.view-less': string;
60
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
61
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
62
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
63
+ 'pisell2.product.card.add.holder.modal.title.1': string;
64
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
65
+ 'pisell2.product.card.sales': string;
66
+ 'pisell2.product.card.add.holder.modal.cancel': string;
67
+ 'pisell2.product.card.add.holder.modal.clear': string;
68
+ 'pisell2.product.card.add.holder.modal.apply': string;
69
+ 'pisell2.product.card.add.holder.modal.add': string;
70
+ 'pisell2.product.card.closing-soon.warning': string;
71
+ };
72
+ 'zh-HK': {
73
+ 'pisell2.product.card.discount.reason': string;
74
+ 'pisell2.cart.sku-card.more': string;
75
+ 'pisell2.cart.sku-card.packages.title': string;
76
+ 'pisell2.cart.sku-card.sales.title': string;
77
+ 'pisell2.cart.sku-card.actions.delete': string;
78
+ 'pisell2.cart.sku-card.unassigned': string;
79
+ 'pisell2.cart.sku-card.gift.title': string;
80
+ 'pisell2.cart.sku-card.gift.select.title': string;
81
+ 'pisell2.cart.sku-card.gift.total': (num: number) => string;
82
+ 'pisell2.product.card.edit': string;
83
+ 'pisell2.product.card.day': (val: number) => string;
84
+ 'pisell2.product.card.day.event': (val: number) => string;
85
+ 'pisell2.product.card.minute': (val: number) => string;
86
+ 'pisell2.product.card.discount.note': string;
87
+ 'pisell2.product.card.discount.add.note': string;
88
+ 'pisell2.product.card.discount.edit.note': string;
89
+ 'pisell2.product.card.confirm': string;
90
+ 'pisell2.product.card.cancel': string;
91
+ 'pisell2.product.card.note.pla': string;
92
+ 'pisell2.product.card.items.package': string;
93
+ 'pisell2.product.card.view-all': string;
94
+ 'pisell2.product.card.view-less': string;
95
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
96
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
97
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
98
+ 'pisell2.product.card.add.holder.modal.title.1': string;
99
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
100
+ 'pisell2.product.card.sales': string;
101
+ 'pisell2.product.card.add.holder.modal.cancel': string;
102
+ 'pisell2.product.card.add.holder.modal.clear': string;
103
+ 'pisell2.product.card.add.holder.modal.apply': string;
104
+ 'pisell2.product.card.add.holder.modal.add': string;
105
+ 'pisell2.product.card.closing-soon.warning': string;
106
+ };
107
+ ja: {
108
+ 'pisell2.product.card.discount.reason': string;
109
+ 'pisell2.cart.sku-card.more': string;
110
+ 'pisell2.cart.sku-card.packages.title': string;
111
+ 'pisell2.cart.sku-card.sales.title': string;
112
+ 'pisell2.cart.sku-card.actions.delete': string;
113
+ 'pisell2.cart.sku-card.unassigned': string;
114
+ 'pisell2.cart.sku-card.gift.title': string;
115
+ 'pisell2.cart.sku-card.gift.select.title': string;
116
+ 'pisell2.cart.sku-card.gift.total': (num: number) => string;
117
+ 'pisell2.product.card.day': (val: number) => string;
118
+ 'pisell2.product.card.day.event': (val: number) => string;
119
+ 'pisell2.product.card.minute': (val: number) => string;
120
+ 'pisell2.product.card.discount.note': string;
121
+ 'pisell2.product.card.edit': string;
122
+ 'pisell2.product.card.discount.add.note': string;
123
+ 'pisell2.product.card.discount.edit.note': string;
124
+ 'pisell2.product.card.confirm': string;
125
+ 'pisell2.product.card.cancel': string;
126
+ 'pisell2.product.card.note.pla': string;
127
+ 'pisell2.product.card.items.package': string;
128
+ 'pisell2.product.card.view-all': string;
129
+ 'pisell2.product.card.view-less': string;
130
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
131
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
132
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
133
+ 'pisell2.product.card.add.holder.modal.title.1': string;
134
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
135
+ 'pisell2.product.card.sales': string;
136
+ 'pisell2.product.card.add.holder.modal.cancel': string;
137
+ 'pisell2.product.card.add.holder.modal.clear': string;
138
+ 'pisell2.product.card.add.holder.modal.apply': string;
139
+ 'pisell2.product.card.add.holder.modal.add': string;
140
+ 'pisell2.product.card.closing-soon.warning': string;
141
+ };
142
+ pt: {
143
+ 'pisell2.product.card.discount.reason': string;
144
+ 'pisell2.cart.sku-card.more': string;
145
+ 'pisell2.cart.sku-card.packages.title': string;
146
+ 'pisell2.cart.sku-card.sales.title': string;
147
+ 'pisell2.cart.sku-card.actions.delete': string;
148
+ 'pisell2.cart.sku-card.unassigned': string;
149
+ 'pisell2.cart.sku-card.gift.title': string;
150
+ 'pisell2.cart.sku-card.gift.select.title': string;
151
+ 'pisell2.cart.sku-card.gift.total': (num: number) => string;
152
+ 'pisell2.product.card.day': (val: number) => string;
153
+ 'pisell2.product.card.day.event': (val: number) => string;
154
+ 'pisell2.product.card.minute': (val: number) => string;
155
+ 'pisell2.product.card.discount.note': string;
156
+ 'pisell2.product.card.edit': string;
157
+ 'pisell2.product.card.discount.add.note': string;
158
+ 'pisell2.product.card.discount.edit.note': string;
159
+ 'pisell2.product.card.confirm': string;
160
+ 'pisell2.product.card.cancel': string;
161
+ 'pisell2.product.card.note.pla': string;
162
+ 'pisell2.product.card.items.package': string;
163
+ 'pisell2.product.card.view-all': string;
164
+ 'pisell2.product.card.view-less': string;
165
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
166
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
167
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
168
+ 'pisell2.product.card.add.holder.modal.title.1': string;
169
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
170
+ 'pisell2.product.card.sales': string;
171
+ 'pisell2.product.card.add.holder.modal.cancel': string;
172
+ 'pisell2.product.card.add.holder.modal.clear': string;
173
+ 'pisell2.product.card.add.holder.modal.apply': string;
174
+ 'pisell2.product.card.add.holder.modal.add': string;
175
+ 'pisell2.product.card.closing-soon.warning': string;
176
+ };
177
+ };
178
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const Action: ({ item, onAction }: any) => React.JSX.Element;
4
+ export default Action;