@pisell/materials 1.0.877 → 1.0.878

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 (157) 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/index.js +1 -1
  5. package/build/lowcode/meta.js +1 -1
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +12 -12
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +20 -20
  11. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  12. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  13. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  14. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  15. package/es/components/dataSourceComponents/fields/index.d.ts +9 -9
  16. package/es/components/filter/index.d.ts +0 -1
  17. package/es/components/pisellLoading/index.d.ts +0 -1
  18. package/es/components/pisellWalletPassCard/index.d.ts +1 -0
  19. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
  20. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +76 -0
  21. package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
  22. package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
  23. package/es/components/productCard/cartSkuCard/components/MultiDay/index.js +82 -0
  24. package/es/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
  25. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  26. package/es/components/productCard/cartSkuCard/components/MultiDay/utils.js +56 -0
  27. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +2 -2
  28. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +1 -2
  29. package/es/components/productCard/cartSkuCard/components/resources/index.js +6 -8
  30. package/es/components/productCard/cartSkuCard/components/specs/index.less +1 -1
  31. package/es/components/productCard/cartSkuCard/index.js +5 -5
  32. package/es/components/productCard/components/MultiDay/index.d.ts +0 -1
  33. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
  34. package/es/components/productCard/components/Packages/components/options/index.d.ts +0 -1
  35. package/es/components/productCard/components/Packages/utils.d.ts +2 -2
  36. package/es/components/table/Actions/index.d.ts +0 -1
  37. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  38. package/es/components/table/Table/SelectField/index.d.ts +0 -1
  39. package/es/components/table/Table/fields/index.d.ts +0 -1
  40. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  41. package/es/components/table/Table/fields/select/index.d.ts +0 -1
  42. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  43. package/es/components/table/Table/fields/treeSelect/index.d.ts +0 -1
  44. package/es/components/table/Table/utils.d.ts +1 -1
  45. package/es/utils/index.d.ts +1 -1
  46. package/es/utils/platform.d.ts +1 -1
  47. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  48. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  49. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  50. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  51. package/lib/components/dataSourceComponents/fields/index.d.ts +9 -9
  52. package/lib/components/filter/index.d.ts +0 -1
  53. package/lib/components/pisellLoading/index.d.ts +0 -1
  54. package/lib/components/pisellWalletPassCard/index.d.ts +1 -0
  55. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.d.ts +3 -0
  56. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +80 -0
  57. package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +75 -0
  58. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +3 -0
  59. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.js +71 -0
  60. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.less +31 -0
  61. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.d.ts +14 -0
  62. package/lib/components/productCard/cartSkuCard/components/MultiDay/utils.js +77 -0
  63. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +2 -2
  64. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +1 -2
  65. package/lib/components/productCard/cartSkuCard/components/resources/index.js +4 -6
  66. package/lib/components/productCard/cartSkuCard/components/specs/index.less +1 -1
  67. package/lib/components/productCard/cartSkuCard/index.js +3 -4
  68. package/lib/components/productCard/components/MultiDay/index.d.ts +0 -1
  69. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
  70. package/lib/components/productCard/components/Packages/components/options/index.d.ts +0 -1
  71. package/lib/components/productCard/components/Packages/utils.d.ts +2 -2
  72. package/lib/components/table/Actions/index.d.ts +0 -1
  73. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  74. package/lib/components/table/Table/SelectField/index.d.ts +0 -1
  75. package/lib/components/table/Table/fields/index.d.ts +0 -1
  76. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  77. package/lib/components/table/Table/fields/select/index.d.ts +0 -1
  78. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  79. package/lib/components/table/Table/fields/treeSelect/index.d.ts +0 -1
  80. package/lib/components/table/Table/utils.d.ts +1 -1
  81. package/lib/utils/index.d.ts +1 -1
  82. package/lib/utils/platform.d.ts +1 -1
  83. package/package.json +3 -3
  84. package/es/components/appVersionControl/index.d.ts +0 -4
  85. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -39
  86. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -79
  87. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
  88. package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  89. package/es/components/drag-sort-tree/index.d.ts +0 -3
  90. package/es/components/hardwareErrorTip/demo.d.ts +0 -3
  91. package/es/components/hardwareErrorTip/errorCard/index.d.ts +0 -28
  92. package/es/components/hardwareErrorTip/errorTipStatistics/index.d.ts +0 -12
  93. package/es/components/hardwareErrorTip/index.d.ts +0 -19
  94. package/es/components/hardwareErrorTip/logCard/index.d.ts +0 -27
  95. package/es/components/hardwareErrorTip/types.d.ts +0 -44
  96. package/es/components/login-and-register/index.d.ts +0 -82
  97. package/es/components/pisell-config-provider/index.d.ts +0 -12
  98. package/es/components/pisellAdjustPrice/status.d.ts +0 -32
  99. package/es/components/pisellAdjustPrice/type.d.ts +0 -20
  100. package/es/components/pisellEmpty/index.d.ts +0 -19
  101. package/es/components/productCard/components/Header/Actions/index.d.ts +0 -3
  102. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  103. package/es/components/productCard/components/Time/index.d.ts +0 -3
  104. package/es/components/productCard/locales.d.ts +0 -84
  105. package/es/components/productCard/status.d.ts +0 -32
  106. package/es/components/productCard/types.d.ts +0 -84
  107. package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  108. package/es/components/table/Table/index.d.ts +0 -4
  109. package/es/components/table/types.d.ts +0 -253
  110. package/es/components/versionModal/index.d.ts +0 -24
  111. package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
  112. package/es/components/virtual-keyboard/Amount/types.d.ts +0 -44
  113. package/es/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  114. package/es/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
  115. package/es/components/virtual-keyboard/Number/types.d.ts +0 -25
  116. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
  117. package/es/components/walletCard/index.d.ts +0 -71
  118. package/es/locales/en-US.d.ts +0 -313
  119. package/es/locales/zh-CN.d.ts +0 -308
  120. package/es/locales/zh-TW.d.ts +0 -308
  121. package/lib/components/appVersionControl/index.d.ts +0 -4
  122. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -39
  123. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -79
  124. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -25
  125. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -18
  126. package/lib/components/drag-sort-tree/index.d.ts +0 -3
  127. package/lib/components/hardwareErrorTip/demo.d.ts +0 -3
  128. package/lib/components/hardwareErrorTip/errorCard/index.d.ts +0 -28
  129. package/lib/components/hardwareErrorTip/errorTipStatistics/index.d.ts +0 -12
  130. package/lib/components/hardwareErrorTip/index.d.ts +0 -19
  131. package/lib/components/hardwareErrorTip/logCard/index.d.ts +0 -27
  132. package/lib/components/hardwareErrorTip/types.d.ts +0 -44
  133. package/lib/components/login-and-register/index.d.ts +0 -82
  134. package/lib/components/pisell-config-provider/index.d.ts +0 -12
  135. package/lib/components/pisellAdjustPrice/status.d.ts +0 -32
  136. package/lib/components/pisellAdjustPrice/type.d.ts +0 -20
  137. package/lib/components/pisellEmpty/index.d.ts +0 -19
  138. package/lib/components/productCard/components/Header/Actions/index.d.ts +0 -3
  139. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -3
  140. package/lib/components/productCard/components/Time/index.d.ts +0 -3
  141. package/lib/components/productCard/locales.d.ts +0 -84
  142. package/lib/components/productCard/status.d.ts +0 -32
  143. package/lib/components/productCard/types.d.ts +0 -84
  144. package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  145. package/lib/components/table/Table/index.d.ts +0 -4
  146. package/lib/components/table/types.d.ts +0 -253
  147. package/lib/components/versionModal/index.d.ts +0 -24
  148. package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +0 -32
  149. package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -44
  150. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +0 -21
  151. package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +0 -32
  152. package/lib/components/virtual-keyboard/Number/types.d.ts +0 -25
  153. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +0 -13
  154. package/lib/components/walletCard/index.d.ts +0 -71
  155. package/lib/locales/en-US.d.ts +0 -313
  156. package/lib/locales/zh-CN.d.ts +0 -308
  157. package/lib/locales/zh-TW.d.ts +0 -308
@@ -43,7 +43,7 @@ export declare const withDataSource: <P extends unknown>(WrappedComponent: React
43
43
  }) => JSX.Element;
44
44
  export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
45
45
  options?: any;
46
- optionSourceType?: "custom" | "default" | "api" | undefined;
46
+ optionSourceType?: "default" | "custom" | "api" | undefined;
47
47
  labelField: string;
48
48
  valueField: string;
49
49
  extraParams?: Record<string, any> | undefined;
@@ -1,5 +1,5 @@
1
1
  declare const useDataSourceKey: () => {
2
- dataSourceKey: string | undefined;
3
- dataSourceKeyRef: import("react").MutableRefObject<string | undefined>;
2
+ dataSourceKey: string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined;
3
+ dataSourceKeyRef: import("react").MutableRefObject<string | import("../../provider/dataSource/DataSourceContext").DataSourceType | undefined>;
4
4
  };
5
5
  export default useDataSourceKey;
@@ -17,7 +17,7 @@ interface UseTablePropsProps {
17
17
  * @returns
18
18
  */
19
19
  declare const useTableProps: (props: UseTablePropsProps) => {
20
- title: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
20
+ title: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
21
21
  pagination: {
22
22
  total: number;
23
23
  current: number;
@@ -26,7 +26,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
26
26
  showSizeChanger: boolean;
27
27
  };
28
28
  columns: import("./useColumns").Column[];
29
- subTitle: number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
29
+ subTitle: string | number | boolean | React.ReactFragment | JSX.Element | (() => React.ReactNode) | null | undefined;
30
30
  buttons: any[] | null;
31
31
  filter: JSX.Element | null;
32
32
  onRow: (record: any) => any;
@@ -52,7 +52,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
52
52
  width: number;
53
53
  align: "center" | "left" | "right";
54
54
  fixed: false | "left" | "right";
55
- type: "link" | "button";
55
+ type: "button" | "link";
56
56
  items: OperationItem[];
57
57
  } | undefined;
58
58
  operationContent?: {
@@ -70,7 +70,7 @@ declare const useTableProps: (props: UseTablePropsProps) => {
70
70
  useCustomAction: boolean;
71
71
  actionType: string;
72
72
  openMode: "modal" | "drawer";
73
- openContentSize: "small" | "large" | "middle";
73
+ openContentSize: "large" | "middle" | "small";
74
74
  openTitle: string;
75
75
  key: string;
76
76
  } | undefined;
@@ -1,6 +1,6 @@
1
1
  declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
2
2
  options?: any;
3
- optionSourceType?: "custom" | "default" | "api" | undefined;
3
+ optionSourceType?: "default" | "custom" | "api" | undefined;
4
4
  labelField: string;
5
5
  valueField: string;
6
6
  extraParams?: Record<string, any> | undefined;
@@ -34,7 +34,7 @@ declare const formFieldMap: {
34
34
  };
35
35
  FormItemSelect: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
36
36
  options?: any;
37
- optionSourceType?: "custom" | "default" | "api" | undefined;
37
+ optionSourceType?: "default" | "custom" | "api" | undefined;
38
38
  labelField: string;
39
39
  valueField: string;
40
40
  extraParams?: Record<string, any> | undefined;
@@ -59,11 +59,7 @@ declare const formFieldMap: {
59
59
  FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
60
60
  FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
61
61
  };
62
- declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
63
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
64
- } & {
65
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
66
- }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
62
+ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<import("./Input/type").InputProps> & {
67
63
  JSON: import("react").FC<any>;
68
64
  Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
69
65
  TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
@@ -83,19 +79,23 @@ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC
83
79
  name?: string | undefined;
84
80
  fieldKey?: string | undefined;
85
81
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
86
- }) | (import("react").FC<{}> & {
82
+ }) | import("react").FC<any> | (import("react").FC<{}> & {
83
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
84
+ } & {
85
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
86
+ }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
87
87
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
88
88
  } & {
89
89
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
90
90
  }) | ((props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps & {
91
91
  options?: any;
92
- optionSourceType?: "custom" | "default" | "api" | undefined;
92
+ optionSourceType?: "default" | "custom" | "api" | undefined;
93
93
  labelField: string;
94
94
  valueField: string;
95
95
  extraParams?: Record<string, any> | undefined;
96
96
  } & {
97
97
  dataSource?: any;
98
- }) => 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 & {
98
+ }) => JSX.Element) | 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 & {
99
99
  onChange: (value: string) => void;
100
100
  } & 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>;
101
101
  export { getFieldComponent, formFieldMap };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FilterProps } from "./types";
3
2
  declare const Filter: (props: FilterProps) => JSX.Element | null;
4
3
  export default Filter;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SpinProps } from 'antd';
3
2
  import './index.less';
4
3
  declare type MaskType = {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  export interface PisellWalletPassCardProps {
3
4
  id: number;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const Footer: ({ item, hideDivider, type, isOnlyTotal }: any) => JSX.Element;
3
+ export default Footer;
@@ -0,0 +1,76 @@
1
+ import React, { useMemo } from 'react';
2
+ import classNames from 'classnames';
3
+ import { Divider } from 'antd';
4
+ import { Tag, Tooltip } from 'antd';
5
+ import { QuestionCircleOutlined } from '@ant-design/icons';
6
+ import { _formatAmount } from "../packages/utils";
7
+ import "./index.less";
8
+ import { locales } from '@pisell/utils';
9
+ import { PREFIX } from "../../index";
10
+ var Footer = function Footer(_ref) {
11
+ var item = _ref.item,
12
+ hideDivider = _ref.hideDivider,
13
+ type = _ref.type,
14
+ isOnlyTotal = _ref.isOnlyTotal;
15
+ var total = item.total,
16
+ origin_total = item.origin_total,
17
+ symbol = item.symbol,
18
+ tip = item.tip,
19
+ num = item.num,
20
+ discount_reason = item.discount_reason;
21
+ /**
22
+ * @title: 折扣
23
+ * @description:
24
+ * @param {*} useMemo
25
+ * @return {*}
26
+ * @Author: WangHan
27
+ * @Date: 2024-11-22 13:50
28
+ */
29
+ var isDiscount = useMemo(function () {
30
+ // item中没有该属性则不展示
31
+ if (!origin_total) return false;
32
+ return Number(total) != Number(origin_total);
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, "_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, "_discount-reason")
48
+ }, /*#__PURE__*/React.createElement("span", null, "".concat(locales.getText('pisell2.product.card.discount.reason'), ": ").concat(discount_reason))));
49
+ }
50
+ return null;
51
+ };
52
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !hideDivider ? /*#__PURE__*/React.createElement(Divider, {
53
+ style: {
54
+ margin: 0
55
+ }
56
+ }) : null, /*#__PURE__*/React.createElement("div", {
57
+ className: classNames("".concat(PREFIX, "__product-footer"), hideDivider && "".concat(PREFIX, "__hide-divider-footer"), isOnlyTotal && "".concat(PREFIX, "__only-total-footer"))
58
+ }, /*#__PURE__*/React.createElement("div", {
59
+ className: classNames("".concat(PREFIX, "__footer-price-wrap"))
60
+ }, !isOnlyTotal ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
61
+ className: classNames("".concat(PREFIX, "__footer-price"))
62
+ }, /*#__PURE__*/React.createElement("span", null, _formatAmount(total, symbol)), tip ? /*#__PURE__*/React.createElement(Tooltip, {
63
+ title: locales.getText(tip),
64
+ destroyTooltipOnHide: true
65
+ }, /*#__PURE__*/React.createElement(QuestionCircleOutlined, {
66
+ style: {
67
+ fontSize: '16px',
68
+ color: '#1570ef'
69
+ }
70
+ })) : null), /*#__PURE__*/React.createElement("span", null, "\xD7".concat(num))) : null, /*#__PURE__*/React.createElement("span", {
71
+ className: "".concat(PREFIX, "__footer-total")
72
+ }, isDiscount ? /*#__PURE__*/React.createElement("span", {
73
+ className: "".concat(PREFIX, "__footer-origin-total")
74
+ }, _formatAmount(origin_total * num, symbol, 2)) : null, /*#__PURE__*/React.createElement("span", null, _formatAmount(total * num, symbol))))), renderDiscountReason());
75
+ };
76
+ export default Footer;
@@ -0,0 +1,75 @@
1
+ .pisell-cart-sku-card {
2
+ &__product-footer {
3
+ color: var(--Gray-500, #667085);
4
+ font-size: 14px;
5
+ font-style: normal;
6
+ font-weight: 600;
7
+ line-height: 20px;
8
+ > div {
9
+ display: flex;
10
+ justify-content: space-between;
11
+ }
12
+ }
13
+ &__only-total-footer {
14
+ > div {
15
+ justify-content: end !important;
16
+ }
17
+ }
18
+
19
+ &__footer-price {
20
+ display: flex;
21
+ align-items: center;
22
+ gap: 4px;
23
+ }
24
+
25
+ &__footer-discount {
26
+ font-size: 12px;
27
+ font-weight: 400;
28
+ line-height: 18px;
29
+ text-decoration-line: line-through;
30
+ }
31
+
32
+ &__footer-total {
33
+ color: var(--Gray-900, #101828);
34
+ }
35
+
36
+ &__footer-origin-total {
37
+ color: var(--Gray-500, #667085);
38
+ text-align: center;
39
+ font-size: 12px;
40
+ font-style: normal;
41
+ font-weight: 400;
42
+ line-height: 18px; /* 150% */
43
+ text-decoration-line: line-through;
44
+ margin-right: 8px;
45
+ display: inline-block;
46
+ transform: translateY(-1px);
47
+ }
48
+
49
+ &__hide-divider-footer {
50
+ margin-top: 8px;
51
+ }
52
+
53
+ &-product-item-discount-reason {
54
+ color: var(--gray-500, #667085);
55
+ font-size: 14px;
56
+ font-style: normal;
57
+ font-weight: 400;
58
+ line-height: 20px;
59
+ margin-top: 4px;
60
+ display: flex;
61
+ flex-wrap: wrap;
62
+ gap: 4px;
63
+ overflow: hidden;
64
+
65
+ > span {
66
+ display: inline-block;
67
+ max-width: 100%;
68
+ text-overflow: ellipsis;
69
+ white-space: nowrap;
70
+ overflow: hidden;
71
+ border-radius: 4px;
72
+ margin: 0;
73
+ }
74
+ }
75
+ }
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const MultiDay: ({ dataSource, hideDivider }: any) => JSX.Element;
3
+ export default MultiDay;
@@ -0,0 +1,82 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import React, { useMemo } from 'react';
8
+ import classNames from 'classnames';
9
+ import { Divider } from 'antd';
10
+ import AmountFooter from "../AmountFooter";
11
+ import { formatMultiDayDate } from "../../../utils";
12
+ import useEngineContext from "../../../../../hooks/useEngineContext";
13
+ import "./index.less";
14
+ import { formatDateRanges } from "./utils";
15
+ import { PREFIX } from "../../index";
16
+ var MultiDay = function MultiDay(_ref) {
17
+ var _context$appHelper;
18
+ var dataSource = _ref.dataSource,
19
+ hideDivider = _ref.hideDivider;
20
+ var items = dataSource.items,
21
+ symbol = dataSource.symbol,
22
+ locale = dataSource.locale;
23
+ var translationOriginal = function translationOriginal(text) {
24
+ return '';
25
+ };
26
+ var context = useEngineContext();
27
+ var utils = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils;
28
+ translationOriginal = (utils === null || utils === void 0 ? void 0 : utils.translationOriginal) || (utils === null || utils === void 0 ? void 0 : utils.translation);
29
+
30
+ /**
31
+ * @title: 商品单价 + 套餐价格
32
+ * @description:
33
+ * @param {*} useMemo
34
+ * @return {*}
35
+ * @Author: WangHan
36
+ * @Date: 2024-12-28 23:00
37
+ */
38
+ var lists = useMemo(function () {
39
+ // if (!items?.length) return [];
40
+
41
+ // // 套餐明细
42
+ // const bundleDetails = bundle
43
+ // ?.map(
44
+ // (b: any) =>
45
+ // `${translationOriginal(b?.title)} (${symbol}${
46
+ // Number(b.price) * Number(b.num)
47
+ // })`
48
+ // )
49
+ // ?.join('+');
50
+
51
+ return formatDateRanges([dataSource]);
52
+ }, [items, dataSource]);
53
+ return /*#__PURE__*/React.createElement("div", {
54
+ className: classNames("".concat(PREFIX, "__multi-day-wrap"))
55
+ }, lists === null || lists === void 0 ? void 0 : lists.map(function (m, index) {
56
+ return /*#__PURE__*/React.createElement("div", {
57
+ key: index
58
+ }, /*#__PURE__*/React.createElement(Divider, {
59
+ style: {
60
+ margin: '4px 0'
61
+ }
62
+ }), /*#__PURE__*/React.createElement("div", {
63
+ className: classNames("".concat(PREFIX, "__multi-day"))
64
+ }, /*#__PURE__*/React.createElement("div", null, formatMultiDayDate(_objectSpread(_objectSpread({}, m), {}, {
65
+ locale: locale
66
+ }))), /*#__PURE__*/React.createElement(AmountFooter, {
67
+ item: _objectSpread(_objectSpread({}, m), {}, {
68
+ symbol: symbol
69
+ }),
70
+ hideDivider: true
71
+ })));
72
+ }), /*#__PURE__*/React.createElement("div", {
73
+ className: classNames("".concat(PREFIX, "__multi-day-total-wrap"))
74
+ }, /*#__PURE__*/React.createElement(AmountFooter, {
75
+ item: _objectSpread(_objectSpread({}, dataSource), {}, {
76
+ num: 1
77
+ }),
78
+ type: "total",
79
+ isOnlyTotal: true
80
+ })));
81
+ };
82
+ export default MultiDay;
@@ -0,0 +1,31 @@
1
+ .pisell-cart-sku-card {
2
+ &__multi-day-wrap {
3
+ }
4
+
5
+ &__multi-day {
6
+ color: var(--Gray-500, #667085);
7
+ font-size: 14px;
8
+ font-weight: 400;
9
+ line-height: 20px;
10
+ display: flex;
11
+ flex-direction: column;
12
+ }
13
+
14
+ &__multi-day-total {
15
+ color: var(--Gray-900, #101828);
16
+ text-align: right;
17
+ font-size: 14px;
18
+ font-weight: 600;
19
+ line-height: 20px;
20
+ display: flex;
21
+ flex-direction: column;
22
+ }
23
+
24
+ &__multi-day-total-discount {
25
+ font-size: 12px;
26
+ font-weight: 400;
27
+ line-height: 18px;
28
+ text-decoration-line: line-through;
29
+ color: var(--Gray-500, #667085);
30
+ }
31
+ }
@@ -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,56 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import dayjs from 'dayjs';
8
+
9
+ // 定义输入数据的接口
10
+
11
+ // 定义输出数据的接口
12
+
13
+ export function formatDateRanges(list) {
14
+ var result = [];
15
+ var currentGroup = null;
16
+ list.forEach(function (item, index) {
17
+ // Convert string dates using dayjs
18
+ var currentStartDate = dayjs(item.start_date);
19
+ var currentEndDate = dayjs(item.end_date);
20
+ var currentTotal = item.total;
21
+ var currentNum = item.num;
22
+ if (!currentGroup) {
23
+ // Start a new group
24
+ currentGroup = _objectSpread(_objectSpread({}, item), {}, {
25
+ start_date: currentStartDate.format('YYYY-MM-DD'),
26
+ end_date: currentEndDate.format('YYYY-MM-DD'),
27
+ total: currentTotal,
28
+ num: currentNum
29
+ });
30
+ } else {
31
+ var prevEndDate = dayjs(currentGroup.end_date);
32
+
33
+ // Check if current item can be merged with current group
34
+ if (currentTotal === currentGroup.total && prevEndDate.isSame(currentStartDate, 'day')) {
35
+ // Update end date and add up num
36
+ currentGroup.end_date = currentEndDate.format('YYYY-MM-DD');
37
+ currentGroup.num += currentNum;
38
+ } else {
39
+ // Push current group and start a new one
40
+ result.push(currentGroup);
41
+ currentGroup = _objectSpread(_objectSpread({}, item), {}, {
42
+ start_date: currentStartDate.format('YYYY-MM-DD'),
43
+ end_date: currentEndDate.format('YYYY-MM-DD'),
44
+ total: currentTotal,
45
+ num: currentNum
46
+ });
47
+ }
48
+ }
49
+
50
+ // Push the last group
51
+ if (index === list.length - 1 && currentGroup) {
52
+ result.push(currentGroup);
53
+ }
54
+ });
55
+ return result;
56
+ }
@@ -6,7 +6,7 @@
6
6
  * @Author: WangHan
7
7
  * @Date: 2024-11-22 10:01
8
8
  */
9
- export declare const minusSign: (item: any, type?: string) => "-" | "";
9
+ export declare const minusSign: (item: any, type?: string) => "" | "-";
10
10
  /**
11
11
  * @title: 金额格式化
12
12
  * @description:
@@ -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) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
- declare const Resources: (props: any) => JSX.Element;
2
+ declare const Resources: (props: any) => JSX.Element | null;
4
3
  export default Resources;
@@ -29,13 +29,11 @@ var Resources = function Resources(props) {
29
29
  return null;
30
30
  }) : null;
31
31
  };
32
- var renderContent = function renderContent() {
33
- if (isMultipleResource && (multiResources === null || multiResources === void 0 ? void 0 : multiResources.length) > 0) {
34
- return multiResources.map(renderResourceItem);
35
- }
36
- };
37
- return /*#__PURE__*/React.createElement("div", {
38
- className: "".concat(PREFIX, "__resources")
39
- }, renderContent());
32
+ if (isMultipleResource && (multiResources === null || multiResources === void 0 ? void 0 : multiResources.length) > 0) {
33
+ return /*#__PURE__*/React.createElement("div", {
34
+ className: "".concat(PREFIX, "__resources")
35
+ }, multiResources.map(renderResourceItem));
36
+ }
37
+ return null;
40
38
  };
41
39
  export default Resources;
@@ -27,7 +27,7 @@
27
27
 
28
28
  .spec-num {
29
29
  display: flex;
30
- gap: 4;
30
+ gap: 4px;
31
31
  align-items: center;
32
32
  }
33
33
  }
@@ -20,11 +20,11 @@ import Packages from "./components/packages";
20
20
  import Sales from "./components/sales";
21
21
  import { SwipeAction } from "./components/swipeAction";
22
22
  import Note from "./components/Note";
23
+ import AmountFooter from "./components/AmountFooter";
24
+ import Items from "./components/MultiDay";
23
25
  import "./index.less";
24
26
  import Iconfont from "../../iconfont";
25
27
  import useEngineContext from "../../../hooks/useEngineContext";
26
- import Items from "../components/MultiDay";
27
- import AmountFooter from "../components/AmountFooter";
28
28
  import Action from "../components/Action";
29
29
  import { defaultValue } from "../status";
30
30
  export var PREFIX = 'pisell-cart-sku-card';
@@ -101,9 +101,9 @@ var CartSkuCard = function CartSkuCard(props) {
101
101
  return actions;
102
102
  }, [dataSource, onDelete, isShowDelete, rightActions]);
103
103
  var hideDivider = useMemo(function () {
104
- var bundle = dataSource.bundle,
105
- relation_products = dataSource.relation_products;
106
- return (bundle === null || bundle === void 0 ? void 0 : bundle.length) || (relation_products === null || relation_products === void 0 ? void 0 : relation_products.length);
104
+ return false;
105
+ // const { bundle, relation_products } = dataSource;
106
+ // return bundle?.length || relation_products?.length;
107
107
  }, [dataSource]);
108
108
  var renderA2 = function renderA2() {
109
109
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(BasicInfo, {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const MultiDay: ({ dataSource, hideDivider }: any) => JSX.Element;
4
3
  export default MultiDay;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const renderBundles: (item: any, hidePrice?: boolean, isShowPackageNote?: boolean) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Options: ({ options, amountSymbol }: any) => JSX.Element | null;
4
3
  export default Options;
@@ -6,7 +6,7 @@
6
6
  * @Author: WangHan
7
7
  * @Date: 2024-11-22 10:01
8
8
  */
9
- export declare const minusSign: (item: any, type?: string) => "-" | "";
9
+ export declare const minusSign: (item: any, type?: string) => "" | "-";
10
10
  /**
11
11
  * @title: 金额格式化
12
12
  * @description:
@@ -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) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FilterType } from "../../filter/types";
3
2
  import { ColumnSettingType, DataSourceGroupType, ExportImportType, GallerySettingType, GridViewType, SortType } from "../types";
4
3
  import "./index.less";
@@ -1,5 +1,5 @@
1
1
  declare const useGapSize: (gap: number | number[]) => {
2
- horizontal: number;
3
- vertical: number;
2
+ horizontal: any;
3
+ vertical: any;
4
4
  };
5
5
  export default useGapSize;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SelectField: () => JSX.Element;
3
2
  export default SelectField;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const fieldMaps: {
3
2
  text: {
4
3
  field: {
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;