@pisell/materials 2.2.125 → 2.2.126

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 (235) 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 +2 -2
  5. package/build/lowcode/render/default/view.js +3 -3
  6. package/build/lowcode/view.js +2 -2
  7. package/es/components/appVersionControl/index.d.ts +4 -0
  8. package/es/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
  9. package/es/components/auto-resize-text/index.d.ts +6 -0
  10. package/es/components/cardPro/index.d.ts +3 -0
  11. package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +16 -0
  12. package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
  13. package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +179 -0
  14. package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +32 -0
  15. package/es/components/dataSourceComponents/dataSourceForm/urlUtils.d.ts +24 -0
  16. package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -0
  17. package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +2 -0
  18. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
  19. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  20. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +4 -0
  21. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  22. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
  23. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
  24. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  25. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
  26. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  27. package/es/components/dataSourceComponents/fields/Switch/ReadPretty.d.ts +5 -0
  28. package/es/components/dataSourceComponents/fields/Switch/type.d.ts +16 -0
  29. package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
  30. package/es/components/dataSourceComponents/fields/Translation/type.d.ts +16 -0
  31. package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +5 -0
  32. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +38 -0
  33. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  34. package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
  35. package/es/components/dataSourceComponents/hooks/useActions.d.ts +18 -0
  36. package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +5 -0
  37. package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +120 -0
  38. package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +12 -0
  39. package/es/components/date-picker/index.d.ts +0 -1
  40. package/es/components/div/index.d.ts +19 -0
  41. package/es/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
  42. package/es/components/drag-sort-tree/index.d.ts +4 -0
  43. package/es/components/filter/types.d.ts +46 -0
  44. package/es/components/iconfont/index.d.ts +8 -0
  45. package/es/components/keyboard/index.d.ts +22 -0
  46. package/es/components/login-and-register/index.d.ts +82 -0
  47. package/es/components/page/index.d.ts +0 -1
  48. package/es/components/pisell-config-provider/context.d.ts +22 -0
  49. package/es/components/pisell-config-provider/index.d.ts +13 -0
  50. package/es/components/pisellAdjustPrice/status.d.ts +32 -0
  51. package/es/components/pisellAdjustPrice/type.d.ts +22 -0
  52. package/es/components/pisellCamera/index.d.ts +4 -0
  53. package/es/components/pisellCardList/index.d.ts +107 -0
  54. package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +9 -0
  55. package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +24 -0
  56. package/es/components/pisellDraggable/components/TreeItem/index.d.ts +2 -0
  57. package/es/components/pisellDraggable/index.d.ts +35 -0
  58. package/es/components/pisellDropSort/PisellDropSort.d.ts +5 -0
  59. package/es/components/pisellDropSort/components/SortableItem/index.d.ts +26 -0
  60. package/es/components/pisellDropSort/types.d.ts +58 -0
  61. package/es/components/pisellEmpty/index.d.ts +19 -0
  62. package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  63. package/es/components/pisellMenu/PisellMenu.d.ts +11 -0
  64. package/es/components/pisellMenu/types.d.ts +27 -0
  65. package/es/components/pisellNavigationMenu/types.d.ts +85 -0
  66. package/es/components/pisellQRScanner/index.d.ts +24 -0
  67. package/es/components/pisellQrcode/index.d.ts +10 -0
  68. package/es/components/pisellText/index.d.ts +9 -0
  69. package/es/components/pisellToast/squareToast/index.d.ts +15 -0
  70. package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
  71. package/es/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
  72. package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
  73. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  74. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +1 -0
  75. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -2
  76. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  77. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  78. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  79. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  80. package/es/components/productCard/cartSkuCard/locales.d.ts +99 -0
  81. package/es/components/productCard/components/Action/index.d.ts +3 -0
  82. package/es/components/productCard/components/AmountFooter/index.js +4 -2
  83. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  84. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  85. package/es/components/productCard/components/Time/index.d.ts +3 -0
  86. package/es/components/productCard/locales.d.ts +84 -0
  87. package/es/components/productCard/status.d.ts +32 -0
  88. package/es/components/productCard/types.d.ts +85 -0
  89. package/es/components/select/index.d.ts +9 -0
  90. package/es/components/sortableList/index.d.ts +11 -0
  91. package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  92. package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  93. package/es/components/table/Actions/index.d.ts +17 -0
  94. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  95. package/es/components/table/Table/SelectField/index.d.ts +0 -1
  96. package/es/components/table/Table/fields/index.d.ts +0 -1
  97. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  98. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  99. package/es/components/table/Table/index.d.ts +4 -0
  100. package/es/components/table/Table/utils.d.ts +1 -1
  101. package/es/components/table/serve.d.ts +13 -0
  102. package/es/components/table/types.d.ts +268 -0
  103. package/es/components/tabs/index.d.ts +17 -0
  104. package/es/components/versionModal/index.d.ts +23 -0
  105. package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
  106. package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
  107. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +15 -0
  108. package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  109. package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
  110. package/es/components/virtual-keyboard/Number/types.d.ts +26 -0
  111. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
  112. package/es/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
  113. package/es/components/virtualInput/index.d.ts +24 -0
  114. package/es/components/walletCard/Guide/index.d.ts +3 -0
  115. package/es/components/walletCard/index.d.ts +77 -0
  116. package/es/locales/en-US.d.ts +310 -0
  117. package/es/locales/zh-CN.d.ts +305 -0
  118. package/es/locales/zh-TW.d.ts +305 -0
  119. package/es/utils/index.d.ts +1 -1
  120. package/es/utils/platform.d.ts +1 -1
  121. package/lib/components/appVersionControl/index.d.ts +4 -0
  122. package/lib/components/auto-resize-text/auto-text-size-standalone.d.ts +20 -0
  123. package/lib/components/auto-resize-text/index.d.ts +6 -0
  124. package/lib/components/cardPro/index.d.ts +3 -0
  125. package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +16 -0
  126. package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
  127. package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +179 -0
  128. package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +32 -0
  129. package/lib/components/dataSourceComponents/dataSourceForm/urlUtils.d.ts +24 -0
  130. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -0
  131. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +2 -0
  132. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +0 -1
  133. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  134. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +4 -0
  135. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  136. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
  137. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
  138. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  139. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +25 -0
  140. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  141. package/lib/components/dataSourceComponents/fields/Switch/ReadPretty.d.ts +5 -0
  142. package/lib/components/dataSourceComponents/fields/Switch/type.d.ts +16 -0
  143. package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
  144. package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +16 -0
  145. package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +5 -0
  146. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +38 -0
  147. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  148. package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
  149. package/lib/components/dataSourceComponents/hooks/useActions.d.ts +18 -0
  150. package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +5 -0
  151. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +120 -0
  152. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +12 -0
  153. package/lib/components/date-picker/index.d.ts +0 -1
  154. package/lib/components/div/index.d.ts +19 -0
  155. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +18 -0
  156. package/lib/components/drag-sort-tree/index.d.ts +4 -0
  157. package/lib/components/filter/types.d.ts +46 -0
  158. package/lib/components/iconfont/index.d.ts +8 -0
  159. package/lib/components/keyboard/index.d.ts +22 -0
  160. package/lib/components/login-and-register/index.d.ts +82 -0
  161. package/lib/components/page/index.d.ts +0 -1
  162. package/lib/components/pisell-config-provider/context.d.ts +22 -0
  163. package/lib/components/pisell-config-provider/index.d.ts +13 -0
  164. package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
  165. package/lib/components/pisellAdjustPrice/type.d.ts +22 -0
  166. package/lib/components/pisellCamera/index.d.ts +4 -0
  167. package/lib/components/pisellCardList/index.d.ts +107 -0
  168. package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +9 -0
  169. package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +24 -0
  170. package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +2 -0
  171. package/lib/components/pisellDraggable/index.d.ts +35 -0
  172. package/lib/components/pisellDropSort/PisellDropSort.d.ts +5 -0
  173. package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +26 -0
  174. package/lib/components/pisellDropSort/types.d.ts +58 -0
  175. package/lib/components/pisellEmpty/index.d.ts +19 -0
  176. package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  177. package/lib/components/pisellMenu/PisellMenu.d.ts +11 -0
  178. package/lib/components/pisellMenu/types.d.ts +27 -0
  179. package/lib/components/pisellNavigationMenu/types.d.ts +85 -0
  180. package/lib/components/pisellQRScanner/index.d.ts +24 -0
  181. package/lib/components/pisellQrcode/index.d.ts +10 -0
  182. package/lib/components/pisellText/index.d.ts +9 -0
  183. package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
  184. package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
  185. package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +28 -0
  186. package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
  187. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  188. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +1 -0
  189. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +3 -2
  190. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  191. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  192. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  193. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  194. package/lib/components/productCard/cartSkuCard/locales.d.ts +99 -0
  195. package/lib/components/productCard/components/Action/index.d.ts +3 -0
  196. package/lib/components/productCard/components/AmountFooter/index.js +2 -2
  197. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  198. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  199. package/lib/components/productCard/components/Time/index.d.ts +3 -0
  200. package/lib/components/productCard/locales.d.ts +84 -0
  201. package/lib/components/productCard/status.d.ts +32 -0
  202. package/lib/components/productCard/types.d.ts +85 -0
  203. package/lib/components/select/index.d.ts +9 -0
  204. package/lib/components/sortableList/index.d.ts +11 -0
  205. package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
  206. package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  207. package/lib/components/table/Actions/index.d.ts +17 -0
  208. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  209. package/lib/components/table/Table/SelectField/index.d.ts +0 -1
  210. package/lib/components/table/Table/fields/index.d.ts +0 -1
  211. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  212. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  213. package/lib/components/table/Table/index.d.ts +4 -0
  214. package/lib/components/table/Table/utils.d.ts +1 -1
  215. package/lib/components/table/serve.d.ts +13 -0
  216. package/lib/components/table/types.d.ts +268 -0
  217. package/lib/components/tabs/index.d.ts +17 -0
  218. package/lib/components/versionModal/index.d.ts +23 -0
  219. package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
  220. package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
  221. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +15 -0
  222. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  223. package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
  224. package/lib/components/virtual-keyboard/Number/types.d.ts +26 -0
  225. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
  226. package/lib/components/virtualInput/BaseVirtualInput/index.d.ts +40 -0
  227. package/lib/components/virtualInput/index.d.ts +24 -0
  228. package/lib/components/walletCard/Guide/index.d.ts +3 -0
  229. package/lib/components/walletCard/index.d.ts +77 -0
  230. package/lib/locales/en-US.d.ts +310 -0
  231. package/lib/locales/zh-CN.d.ts +305 -0
  232. package/lib/locales/zh-TW.d.ts +305 -0
  233. package/lib/utils/index.d.ts +1 -1
  234. package/lib/utils/platform.d.ts +1 -1
  235. package/package.json +1 -1
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import type { Props as TreeItem } from '../../../pisellDraggable/components/TreeItem/TreeItem';
3
+ import './index.less';
4
+ interface SortableItemProps {
5
+ itemProps: TreeItem;
6
+ render?: (itemProps: TreeItem) => React.ReactNode;
7
+ domRef: React.RefObject<HTMLDivElement>;
8
+ allowAddChild?: boolean;
9
+ allowDelete?: boolean;
10
+ allowIsShow?: boolean;
11
+ allowDrag?: boolean;
12
+ disabled?: boolean;
13
+ onAdd?: (itemProps: TreeItem) => void;
14
+ onDelete?: (itemProps: TreeItem) => void;
15
+ showBorder?: boolean;
16
+ spacing?: number;
17
+ maxLevel?: number;
18
+ /** 设计模式 */
19
+ __designMode?: string;
20
+ /** 是否自定义操作 */
21
+ isCustomAction?: boolean;
22
+ /** 获取item样式 */
23
+ getItemStyle?: (itemProps: TreeItem) => React.CSSProperties;
24
+ }
25
+ declare const SortableItem: (props: SortableItemProps) => JSX.Element;
26
+ export default SortableItem;
@@ -0,0 +1,58 @@
1
+ import { CSSProperties } from 'react';
2
+ import type { Props as TreeItem } from '../pisellDraggable/components/TreeItem/TreeItem';
3
+ import type { TreeItem as TreeItemType } from '../pisellDraggable/types';
4
+ export interface DropSortItem extends TreeItemType {
5
+ [key: string]: any;
6
+ }
7
+ export interface PisellDropSortProps {
8
+ /** value */
9
+ value: DropSortItem[];
10
+ /** 允许拖拽 */
11
+ allowDrag?: boolean;
12
+ /** 允许删除 */
13
+ allowDelete?: boolean;
14
+ /** 允许添加子节点 */
15
+ allowAddChild?: boolean;
16
+ /** 允许添加根节点 */
17
+ allowAddRoot?: boolean;
18
+ /** 是否允许显示隐藏 */
19
+ allowIsShow?: boolean;
20
+ /** 是否禁用 */
21
+ disabled?: boolean;
22
+ /** 节点间距 */
23
+ spacing?: number;
24
+ /** 最大层级数 */
25
+ maxLevel?: number;
26
+ /** 是否显示边框 */
27
+ showBorder?: boolean;
28
+ /** 样式 */
29
+ style?: CSSProperties;
30
+ /** 类名 */
31
+ className?: string;
32
+ /** 数据源变化回调 */
33
+ onChange?: (items: DropSortItem[]) => void;
34
+ /** 删除节点回调 */
35
+ onDelete?: (itemProps: TreeItem) => void;
36
+ /** 添加节点回调 */
37
+ onAdd?: (itemProps: TreeItem) => void;
38
+ /** 自定义渲染节点 */
39
+ renderItem?: (itemProps: TreeItem) => React.ReactNode;
40
+ /** 添加根节点回调 */
41
+ onAddRoot?: () => void;
42
+ /** 左侧自定义内容 */
43
+ leftContent?: React.ReactNode;
44
+ /** 右侧自定义内容 */
45
+ rightContent?: React.ReactNode;
46
+ /** 空状态自定义内容 */
47
+ emptyContent?: React.ReactNode;
48
+ /** 设计模式 */
49
+ __designMode?: string;
50
+ /** 是否自定义操作 */
51
+ isCustomAction?: boolean;
52
+ /** 获取item样式 */
53
+ getItemStyle?: (itemProps: TreeItem) => React.CSSProperties;
54
+ /** 自定义拖拽判断函数,返回false时阻止拖拽 */
55
+ canDrop?: (dragItem: DropSortItem, dropTarget: DropSortItem, parentId: string | number | null) => boolean;
56
+ /** 节点缩进宽度 */
57
+ indentationWidth?: number;
58
+ }
@@ -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,4 @@
1
+ export declare const useNativeScanner: (onChange?: ((val: string) => void) | undefined) => {
2
+ activeNativeScanner: () => void;
3
+ isTerminal: any;
4
+ };
@@ -0,0 +1,11 @@
1
+ import { Menu as AntdMenu } from 'antd';
2
+ import React from 'react';
3
+ import './PisellMenu.less';
4
+ import type { PisellMenuProps } from './types';
5
+ declare type PisellMenuComponent = React.FC<PisellMenuProps> & {
6
+ Item: typeof AntdMenu.Item;
7
+ SubMenu: typeof AntdMenu.SubMenu;
8
+ ItemGroup: typeof AntdMenu.ItemGroup;
9
+ };
10
+ declare const PisellMenu: PisellMenuComponent;
11
+ export default PisellMenu;
@@ -0,0 +1,27 @@
1
+ /// <reference types="react" />
2
+ import type { MenuProps } from 'antd';
3
+ export interface PisellMenuProps extends Omit<MenuProps, 'items'> {
4
+ className?: string;
5
+ style?: React.CSSProperties;
6
+ mode?: 'vertical' | 'horizontal' | 'inline';
7
+ theme?: 'light' | 'dark';
8
+ defaultOpenKeys?: string[];
9
+ defaultSelectedKeys?: string[];
10
+ inlineCollapsed?: boolean;
11
+ openKeys?: string[];
12
+ selectedKeys?: string[];
13
+ onOpenChange?: (openKeys: string[]) => void;
14
+ dataSource?: any;
15
+ __designMode?: string;
16
+ other?: PisellMenuProps;
17
+ }
18
+ export interface MenuItemType {
19
+ key: string;
20
+ label: string;
21
+ path: string;
22
+ children?: MenuItemType[];
23
+ icon?: string | React.ReactNode;
24
+ hide?: boolean;
25
+ type?: 'group' | 'divider';
26
+ isGroup?: boolean;
27
+ }
@@ -0,0 +1,85 @@
1
+ import { CSSProperties } from 'react';
2
+ import { Props as TreeItem } from "../pisellDraggable/components/TreeItem/TreeItem";
3
+ export interface NavigationMenuItem {
4
+ id: string;
5
+ /** 标题 */
6
+ title: string;
7
+ /** 图标 */
8
+ icon?: string;
9
+ /** 描述 */
10
+ description?: string;
11
+ /** 子菜单 */
12
+ children?: NavigationMenuItem[];
13
+ /** 版本 */
14
+ version?: string;
15
+ /** 是否是分组 */
16
+ isGroup?: boolean;
17
+ /** 是否允许添加子菜单 */
18
+ allowAddChild?: boolean;
19
+ /** 是否允许删除 */
20
+ allowDelete?: boolean;
21
+ /** 是否允许编辑 */
22
+ allowEdit?: boolean;
23
+ /** 是否允许添加子菜单 */
24
+ allowAddSubmenu?: boolean;
25
+ /** 是否允许添加页面 */
26
+ allowAddPage?: boolean;
27
+ /** 其他属性 */
28
+ [key: string]: any;
29
+ }
30
+ export interface PisellNavigationMenuProps {
31
+ /** 导航菜单数据 */
32
+ value: NavigationMenuItem[];
33
+ /** 是否允许拖拽排序 */
34
+ allowDrag?: boolean;
35
+ /** 是否允许删除菜单项 */
36
+ allowDelete?: boolean;
37
+ /** 是否允许添加子菜单 */
38
+ allowAddChild?: boolean;
39
+ /** 是否允许添加根菜单 */
40
+ allowAddRoot?: boolean;
41
+ /** 是否允许显示隐藏 */
42
+ allowIsShow?: boolean;
43
+ /** 是否禁用 */
44
+ disabled?: boolean;
45
+ /** 菜单项间距 */
46
+ spacing?: number;
47
+ /** 最大层级数 */
48
+ maxLevel?: number;
49
+ /** 样式 */
50
+ style?: CSSProperties;
51
+ /** 类名 */
52
+ className?: string;
53
+ /** 数据变化回调 */
54
+ onChange?: (items: NavigationMenuItem[]) => void;
55
+ /** 设计模式 */
56
+ __designMode?: string;
57
+ /** 标题 */
58
+ title?: string;
59
+ /** 添加子菜单回调 */
60
+ onAddSubMenu?: (item?: NavigationMenuItem) => void;
61
+ /** 添加页面回调 */
62
+ onAddPage?: (item?: NavigationMenuItem) => void;
63
+ /** 编辑回调 */
64
+ onEdit?: (item: NavigationMenuItem) => void;
65
+ /** 删除回调 */
66
+ onDelete?: (item: NavigationMenuItem) => void;
67
+ /** 左侧自定义内容 */
68
+ leftContent?: React.ReactNode;
69
+ /** 右侧自定义内容 */
70
+ rightContent?: React.ReactNode;
71
+ /** 获取item样式 */
72
+ getItemStyle?: (itemProps: TreeItem) => React.CSSProperties;
73
+ /** 自定义拖拽判断函数,返回false时阻止拖拽 */
74
+ canDrop?: (dragItem: NavigationMenuItem, dropTarget: NavigationMenuItem, parentId: string | number | null) => boolean;
75
+ /** 显示隐藏回调 */
76
+ onIsShow?: (item: NavigationMenuItem) => void;
77
+ /** 节点缩进宽度 */
78
+ indentationWidth?: number;
79
+ /** 隐藏描述 */
80
+ hideDescription?: boolean;
81
+ /** 悬浮时展示action */
82
+ showActionOnHover?: boolean;
83
+ /** 是否展示标题标签 */
84
+ showTitleTags?: boolean;
85
+ }
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface PisellQRScannerProps {
4
+ /** 是否可见 */
5
+ visible: boolean;
6
+ /** 是否显示上传图片按钮 */
7
+ showUpload?: boolean;
8
+ /** 关闭回调 */
9
+ onClose: () => void;
10
+ /** 扫码成功回调 */
11
+ onScan: (value: string) => void;
12
+ /**
13
+ * 样式属性,可选
14
+ * 注意: 不应传入renderMode等不必要属性
15
+ */
16
+ style?: React.CSSProperties;
17
+ /** 类名,可选 */
18
+ className?: string;
19
+ }
20
+ /**
21
+ * 二维码扫描组件
22
+ */
23
+ declare const PisellQRScanner: React.FC<PisellQRScannerProps>;
24
+ export default PisellQRScanner;
@@ -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,9 @@
1
+ import React from 'react';
2
+ export interface PisellTextProps extends React.HTMLAttributes<HTMLSpanElement> {
3
+ }
4
+ declare const PisellText: {
5
+ (props: PisellTextProps): JSX.Element;
6
+ Amount: (props: import("./components/Amount").AmountProps) => JSX.Element;
7
+ Editable: React.FC<import("./components/Editable").EditableProps>;
8
+ };
9
+ export default PisellText;
@@ -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,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 {};
@@ -15,6 +15,7 @@ interface IProps {
15
15
  num?: number;
16
16
  holder_id?: any;
17
17
  isFormSubject?: boolean;
18
+ totalDifference?: number;
18
19
  };
19
20
  style?: React.CSSProperties;
20
21
  /** 作为主商品卡片展示
@@ -53,7 +53,8 @@ var BasicInfo = (props) => {
53
53
  origin_total = 0,
54
54
  num = 1,
55
55
  holder_id,
56
- isFormSubject
56
+ isFormSubject,
57
+ totalDifference = 0
57
58
  } = dataSource;
58
59
  const renderNumTag = () => {
59
60
  return /* @__PURE__ */ import_react.default.createElement(
@@ -78,6 +79,6 @@ var BasicInfo = (props) => {
78
79
  if (type === "a5") {
79
80
  return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), (!holder_id || !(holder_id == null ? void 0 : holder_id.length)) && !isFormSubject ? /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol)) : /* @__PURE__ */ import_react.default.createElement(import_holders.default, { dataSource })));
80
81
  }
81
- return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasSpecs ? /* @__PURE__ */ import_react.default.createElement(import_specs.default, { dataSource }) : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol))), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num, 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
82
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasSpecs ? /* @__PURE__ */ import_react.default.createElement(import_specs.default, { dataSource }) : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol))), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
82
83
  };
83
84
  var basicInfo_default = BasicInfo;
@@ -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) => any;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Resources: (props: any) => JSX.Element | null;
3
+ export default Resources;
@@ -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,6 @@
1
+ import 'dayjs/locale/zh-cn';
2
+ import 'dayjs/locale/en';
3
+ import 'dayjs/locale/zh-tw';
4
+ import './index.less';
5
+ declare const TimeRange: (props: any) => JSX.Element | null;
6
+ export default TimeRange;
@@ -0,0 +1,99 @@
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.product.card.day': (val: number) => string;
10
+ 'pisell2.product.card.day.event': (val: number) => string;
11
+ 'pisell2.product.card.minute': (val: number) => string;
12
+ 'pisell2.product.card.discount.note': string;
13
+ 'pisell2.product.card.edit': string;
14
+ 'pisell2.product.card.discount.add.note': string;
15
+ 'pisell2.product.card.discount.edit.note': string;
16
+ 'pisell2.product.card.confirm': string;
17
+ 'pisell2.product.card.cancel': string;
18
+ 'pisell2.product.card.note.pla': string;
19
+ 'pisell2.product.card.items.package': string;
20
+ 'pisell2.product.card.view-all': string;
21
+ 'pisell2.product.card.view-less': string;
22
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
23
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
24
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
25
+ 'pisell2.product.card.add.holder.modal.title.1': string;
26
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
27
+ 'pisell2.product.card.sales': string;
28
+ 'pisell2.product.card.add.holder.modal.cancel': string;
29
+ 'pisell2.product.card.add.holder.modal.clear': string;
30
+ 'pisell2.product.card.add.holder.modal.apply': string;
31
+ 'pisell2.product.card.add.holder.modal.add': string;
32
+ 'pisell2.product.card.closing-soon.warning': string;
33
+ };
34
+ 'zh-CN': {
35
+ 'pisell2.product.card.discount.reason': string;
36
+ 'pisell2.cart.sku-card.more': string;
37
+ 'pisell2.cart.sku-card.packages.title': string;
38
+ 'pisell2.cart.sku-card.sales.title': string;
39
+ 'pisell2.cart.sku-card.actions.delete': string;
40
+ 'pisell2.cart.sku-card.unassigned': string;
41
+ 'pisell2.product.card.edit': string;
42
+ 'pisell2.product.card.day': (val: number) => string;
43
+ 'pisell2.product.card.day.event': (val: number) => string;
44
+ 'pisell2.product.card.minute': (val: number) => string;
45
+ 'pisell2.product.card.discount.note': string;
46
+ 'pisell2.product.card.discount.add.note': string;
47
+ 'pisell2.product.card.discount.edit.note': string;
48
+ 'pisell2.product.card.confirm': string;
49
+ 'pisell2.product.card.cancel': string;
50
+ 'pisell2.product.card.note.pla': string;
51
+ 'pisell2.product.card.items.package': string;
52
+ 'pisell2.product.card.view-all': string;
53
+ 'pisell2.product.card.view-less': string;
54
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
55
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
56
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
57
+ 'pisell2.product.card.add.holder.modal.title.1': string;
58
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
59
+ 'pisell2.product.card.sales': string;
60
+ 'pisell2.product.card.add.holder.modal.cancel': string;
61
+ 'pisell2.product.card.add.holder.modal.clear': string;
62
+ 'pisell2.product.card.add.holder.modal.apply': string;
63
+ 'pisell2.product.card.add.holder.modal.add': string;
64
+ 'pisell2.product.card.closing-soon.warning': string;
65
+ };
66
+ 'zh-HK': {
67
+ 'pisell2.product.card.discount.reason': string;
68
+ 'pisell2.cart.sku-card.more': string;
69
+ 'pisell2.cart.sku-card.packages.title': string;
70
+ 'pisell2.cart.sku-card.sales.title': string;
71
+ 'pisell2.cart.sku-card.actions.delete': string;
72
+ 'pisell2.cart.sku-card.unassigned': string;
73
+ 'pisell2.product.card.edit': string;
74
+ 'pisell2.product.card.day': (val: number) => string;
75
+ 'pisell2.product.card.day.event': (val: number) => string;
76
+ 'pisell2.product.card.minute': (val: number) => string;
77
+ 'pisell2.product.card.discount.note': string;
78
+ 'pisell2.product.card.discount.add.note': string;
79
+ 'pisell2.product.card.discount.edit.note': string;
80
+ 'pisell2.product.card.confirm': string;
81
+ 'pisell2.product.card.cancel': string;
82
+ 'pisell2.product.card.note.pla': string;
83
+ 'pisell2.product.card.items.package': string;
84
+ 'pisell2.product.card.view-all': string;
85
+ 'pisell2.product.card.view-less': string;
86
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
87
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
88
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
89
+ 'pisell2.product.card.add.holder.modal.title.1': string;
90
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
91
+ 'pisell2.product.card.sales': string;
92
+ 'pisell2.product.card.add.holder.modal.cancel': string;
93
+ 'pisell2.product.card.add.holder.modal.clear': string;
94
+ 'pisell2.product.card.add.holder.modal.apply': string;
95
+ 'pisell2.product.card.add.holder.modal.add': string;
96
+ 'pisell2.product.card.closing-soon.warning': string;
97
+ };
98
+ };
99
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Action: ({ item, onAction }: any) => JSX.Element;
3
+ export default Action;
@@ -42,7 +42,7 @@ var import_index = require("./index.less");
42
42
  var import_utils2 = require("@pisell/utils");
43
43
  var prefix = "pisell-lowcode-";
44
44
  var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
45
- const { total, origin_total, symbol, tip, num, discount_reason } = item;
45
+ const { total, origin_total, symbol, tip, num, discount_reason, totalDifference = 0 } = item;
46
46
  const isDiscount = (0, import_react.useMemo)(() => {
47
47
  if (!origin_total) return false;
48
48
  return Number(total) != Number(origin_total);
@@ -87,7 +87,7 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
87
87
  }
88
88
  )) : null
89
89
  ), /* @__PURE__ */ import_react.default.createElement("span", null, `×${num}`)) : null,
90
- /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-origin-total` }, (0, import_utils._formatAmount)(origin_total * num, symbol, 2)) : null, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total * num, symbol)))
90
+ /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-origin-total` }, (0, import_utils._formatAmount)(origin_total * num, symbol, 2)) : null, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total * num - (totalDifference ?? 0), symbol)))
91
91
  )
92
92
  ), renderDiscountReason());
93
93
  };
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const DeleteButton: ({ onDelete }: any) => JSX.Element;
3
+ export default DeleteButton;
@@ -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) => any;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
@@ -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;