@pisell/materials 2.2.97 → 2.2.98

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 (32) 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 +164 -148
  7. package/build/lowcode/render/default/view.js +39 -25
  8. package/build/lowcode/view.js +39 -25
  9. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +2 -0
  10. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -2
  11. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
  12. package/es/components/filter/index.d.ts +1 -0
  13. package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +1 -0
  14. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  15. package/es/components/productCard/components/MultiDay/index.d.ts +1 -0
  16. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
  17. package/es/components/productCard/components/Packages/components/options/index.d.ts +1 -0
  18. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  19. package/es/utils/platform.d.ts +1 -1
  20. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.js +2 -0
  21. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -2
  22. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
  23. package/lib/components/filter/index.d.ts +1 -0
  24. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +1 -0
  25. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
  26. package/lib/components/productCard/components/MultiDay/index.d.ts +1 -0
  27. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
  28. package/lib/components/productCard/components/Packages/components/options/index.d.ts +1 -0
  29. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  30. package/lib/utils/platform.d.ts +1 -1
  31. package/lowcode/data-source-table/meta.ts +14 -0
  32. package/package.json +3 -3
@@ -54,6 +54,8 @@ var useDrawerState = function useDrawerState(operationContent) {
54
54
  setDrawerVisible(false);
55
55
  // 等待动画完成后再清除item
56
56
  timerRef.current = setTimeout(function () {
57
+ var _item$afterClose;
58
+ item === null || item === void 0 || (_item$afterClose = item.afterClose) === null || _item$afterClose === void 0 || _item$afterClose.call(item);
57
59
  setItem(null);
58
60
  timerRef.current = undefined;
59
61
  }, 300);
@@ -42,13 +42,14 @@ declare const useTableProps: (props: UseTablePropsProps) => {
42
42
  items: OperationItem[];
43
43
  } | undefined;
44
44
  operation?: {
45
- show: boolean;
46
- title: string; /**
45
+ /**
47
46
  * 处理table的props
48
47
  * 转换title
49
48
  * @param props
50
49
  * @returns
51
50
  */
51
+ show: boolean;
52
+ title: string;
52
53
  width: number;
53
54
  align: "center" | "left" | "right";
54
55
  fixed: false | "left" | "right";
@@ -10,6 +10,7 @@ export declare type OperationItem = {
10
10
  key: string;
11
11
  buttonProps?: any;
12
12
  onClick?: (record: any) => void;
13
+ afterClose?: () => void;
13
14
  };
14
15
  export interface DataSourceTableProps {
15
16
  title?: string | React.ReactNode | (() => React.ReactNode);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FilterProps } from "./types";
2
3
  declare const Filter: (props: FilterProps) => JSX.Element | null;
3
4
  export default Filter;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const MultiDay: ({ dataSource, hideDivider }: any) => JSX.Element;
3
4
  export default MultiDay;
@@ -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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const MultiDay: ({ dataSource, hideDivider }: any) => JSX.Element;
3
4
  export default MultiDay;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const renderBundles: (item: any, hidePrice?: boolean, isShowPackageNote?: boolean) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Options: ({ options, amountSymbol }: any) => JSX.Element | null;
3
4
  export default Options;
@@ -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 +1 @@
1
- export declare const isMobile: () => boolean;
1
+ export declare const isMobile: () => any;
@@ -64,6 +64,8 @@ var useDrawerState = (operationContent) => {
64
64
  }
65
65
  setDrawerVisible(false);
66
66
  timerRef.current = setTimeout(() => {
67
+ var _a;
68
+ (_a = item == null ? void 0 : item.afterClose) == null ? void 0 : _a.call(item);
67
69
  setItem(null);
68
70
  timerRef.current = void 0;
69
71
  }, 300);
@@ -42,13 +42,14 @@ declare const useTableProps: (props: UseTablePropsProps) => {
42
42
  items: OperationItem[];
43
43
  } | undefined;
44
44
  operation?: {
45
- show: boolean;
46
- title: string; /**
45
+ /**
47
46
  * 处理table的props
48
47
  * 转换title
49
48
  * @param props
50
49
  * @returns
51
50
  */
51
+ show: boolean;
52
+ title: string;
52
53
  width: number;
53
54
  align: "center" | "left" | "right";
54
55
  fixed: false | "left" | "right";
@@ -10,6 +10,7 @@ export declare type OperationItem = {
10
10
  key: string;
11
11
  buttonProps?: any;
12
12
  onClick?: (record: any) => void;
13
+ afterClose?: () => void;
13
14
  };
14
15
  export interface DataSourceTableProps {
15
16
  title?: string | React.ReactNode | (() => React.ReactNode);
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { FilterProps } from "./types";
2
3
  declare const Filter: (props: FilterProps) => JSX.Element | null;
3
4
  export default Filter;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const MultiDay: ({ dataSource, hideDivider }: any) => JSX.Element;
3
4
  export default MultiDay;
@@ -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,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const MultiDay: ({ dataSource, hideDivider }: any) => JSX.Element;
3
4
  export default MultiDay;
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const renderBundles: (item: any, hidePrice?: boolean, isShowPackageNote?: boolean) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import './index.less';
2
3
  declare const Options: ({ options, amountSymbol }: any) => JSX.Element | null;
3
4
  export default Options;
@@ -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 +1 @@
1
- export declare const isMobile: () => boolean;
1
+ export declare const isMobile: () => any;
@@ -897,6 +897,13 @@ const dataSourceTable = {
897
897
  },
898
898
  },
899
899
  },
900
+ {
901
+ name: 'afterClose',
902
+ title: { label: '关闭后' },
903
+ setter: {
904
+ componentName: 'FunctionSetter'
905
+ }
906
+ }
900
907
  ],
901
908
  },
902
909
  },
@@ -2689,6 +2696,13 @@ const dataSourceTable = {
2689
2696
  componentName: 'BoolSetter'
2690
2697
  },
2691
2698
  ],
2699
+ },
2700
+ {
2701
+ name: 'afterClose',
2702
+ title: { label: '关闭后' },
2703
+ setter: {
2704
+ componentName: 'FunctionSetter'
2705
+ }
2692
2706
  }
2693
2707
  ],
2694
2708
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "2.2.97",
3
+ "version": "2.2.98",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -73,9 +73,9 @@
73
73
  "styled-components": "^6.0.0-rc.3",
74
74
  "swiper": "^8.4.7",
75
75
  "vod-js-sdk-v6": "^1.4.11",
76
+ "@pisell/icon": "0.0.11",
76
77
  "@pisell/date-picker": "1.0.101",
77
- "@pisell/utils": "2.0.1",
78
- "@pisell/icon": "0.0.11"
78
+ "@pisell/utils": "2.0.1"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "react": "^18.0.0",