@pisell/materials 2.2.39 → 2.2.41

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 (67) 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 +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +24 -24
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +14 -14
  11. package/es/components/Pagination/index.d.ts +1 -1
  12. package/es/components/collapse/index.js +27 -4
  13. package/es/components/productCard/components/Action/index.js +1 -1
  14. package/es/components/productCard/components/AmountFooter/index.d.ts +1 -1
  15. package/es/components/productCard/components/AmountFooter/index.js +30 -10
  16. package/es/components/productCard/components/AmountFooter/index.less +11 -0
  17. package/es/components/productCard/components/Header/index.js +22 -14
  18. package/es/components/productCard/components/MultiDay/index.d.ts +4 -0
  19. package/es/components/productCard/components/MultiDay/index.js +79 -0
  20. package/es/components/productCard/components/MultiDay/index.less +34 -0
  21. package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
  22. package/es/components/productCard/components/MultiDay/utils.js +54 -0
  23. package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +11 -5
  24. package/es/components/productCard/components/Packages/components/options/index.js +2 -2
  25. package/es/components/productCard/components/Packages/index.js +1 -2
  26. package/es/components/productCard/components/Sales/index.js +2 -2
  27. package/es/components/productCard/components/Time/index.js +15 -13
  28. package/es/components/productCard/index.d.ts +1 -1
  29. package/es/components/productCard/index.js +34 -20
  30. package/es/components/productCard/index.less +3 -2
  31. package/es/components/productCard/status.d.ts +24 -1
  32. package/es/components/productCard/status.js +52 -2
  33. package/es/components/productCard/types.d.ts +60 -1
  34. package/es/components/productCard/utils.d.ts +10 -144
  35. package/es/components/productCard/utils.js +36 -673
  36. package/es/components/table/Table/utils.d.ts +1 -1
  37. package/lib/components/Pagination/index.d.ts +1 -1
  38. package/lib/components/collapse/index.js +30 -4
  39. package/lib/components/productCard/components/Action/index.js +1 -1
  40. package/lib/components/productCard/components/AmountFooter/index.d.ts +1 -1
  41. package/lib/components/productCard/components/AmountFooter/index.js +33 -9
  42. package/lib/components/productCard/components/AmountFooter/index.less +11 -0
  43. package/lib/components/productCard/components/Header/index.js +16 -8
  44. package/lib/components/productCard/components/MultiDay/index.d.ts +4 -0
  45. package/lib/components/productCard/components/MultiDay/index.js +72 -0
  46. package/lib/components/productCard/components/MultiDay/index.less +34 -0
  47. package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
  48. package/lib/components/productCard/components/MultiDay/utils.js +77 -0
  49. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
  50. package/lib/components/productCard/components/Packages/components/options/index.js +2 -2
  51. package/lib/components/productCard/components/Packages/index.js +1 -1
  52. package/lib/components/productCard/components/Sales/index.js +1 -2
  53. package/lib/components/productCard/components/Time/index.js +14 -11
  54. package/lib/components/productCard/index.d.ts +1 -1
  55. package/lib/components/productCard/index.js +32 -20
  56. package/lib/components/productCard/index.less +3 -2
  57. package/lib/components/productCard/status.d.ts +24 -1
  58. package/lib/components/productCard/status.js +35 -2
  59. package/lib/components/productCard/types.d.ts +60 -1
  60. package/lib/components/productCard/utils.d.ts +10 -144
  61. package/lib/components/productCard/utils.js +30 -567
  62. package/lib/components/table/Table/utils.d.ts +1 -1
  63. package/package.json +3 -3
  64. package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
  65. package/es/components/table/Actions/component/ExportImport/utils/index.js +0 -11
  66. package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
  67. package/lib/components/table/Actions/component/ExportImport/utils/index.js +0 -31
@@ -1,6 +1,7 @@
1
1
  .pisell-lowcode-product-card {
2
2
  overflow: hidden;
3
3
  border: 1px solid var(--Gray-300, #d0d5dd);
4
+
4
5
  &:hover,
5
6
  &:active {
6
7
  border: 1px solid var(--Gray-400, #98a2b3);
@@ -36,7 +37,7 @@
36
37
  width: 6px;
37
38
  height: 100%;
38
39
  background: var(--Blue-400, #53b1fd);
39
- z-index: 2;
40
+ z-index: 0 !important;
40
41
  }
41
42
  }
42
43
 
@@ -50,4 +51,4 @@
50
51
  border: none !important;
51
52
  margin: 8px -16px -8px;
52
53
  border-radius: 0 0 8px 8px;
53
- }
54
+ }
@@ -1,4 +1,27 @@
1
- import { ProductCardTypes } from './types';
1
+ import { ProductCardTypes, bundleType, optionType, productType } from './types';
2
+ /**
3
+ * @title: 套餐数据
4
+ * @description:
5
+ * @return {*}
6
+ * @Author: WangHan
7
+ * @Date: 2025-01-02 23:21
8
+ */
9
+ export declare const defaultBundle: bundleType;
10
+ /**
11
+ * @description: 单规格
12
+ * @return {*}
13
+ * @Author: WangHan
14
+ * @Date: 2025-01-02 23:00
15
+ */
16
+ export declare const defaultOption: optionType;
17
+ /**
18
+ * @title: 商品商品类型
19
+ * @description:
20
+ * @return {*}
21
+ * @Author: WangHan
22
+ * @Date: 2025-01-02 22:48
23
+ */
24
+ export declare const defaultProduct: productType;
2
25
  /**
3
26
  * @title: 默认数据
4
27
  * @description:
@@ -19,18 +19,51 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
19
19
  // src/components/productCard/status.ts
20
20
  var status_exports = {};
21
21
  __export(status_exports, {
22
+ defaultBundle: () => defaultBundle,
23
+ defaultOption: () => defaultOption,
24
+ defaultProduct: () => defaultProduct,
22
25
  defaultValue: () => defaultValue
23
26
  });
24
27
  module.exports = __toCommonJS(status_exports);
28
+ var defaultBundle = {
29
+ id: 0,
30
+ name: "",
31
+ num: 1,
32
+ price: 0,
33
+ total: 0
34
+ };
35
+ var defaultOption = {
36
+ id: 0,
37
+ name: "",
38
+ num: 1,
39
+ price: 0,
40
+ total: 0
41
+ };
42
+ var defaultProduct = {
43
+ id: 0,
44
+ _id: 0,
45
+ name: "",
46
+ price: 0,
47
+ total: 0,
48
+ num: 1,
49
+ image: "",
50
+ isShowNote: true,
51
+ note: ""
52
+ };
25
53
  var defaultValue = {
26
- dataSource: {},
54
+ dataSource: defaultProduct,
27
55
  isShowImage: true,
28
56
  isShowHolder: true,
29
57
  isShowNote: true,
30
58
  isShowDelete: true,
31
- isShowPackageNote: true
59
+ isShowPackageNote: true,
60
+ locale: "en-US",
61
+ symbol: "$"
32
62
  };
33
63
  // Annotate the CommonJS export names for ESM import in node:
34
64
  0 && (module.exports = {
65
+ defaultBundle,
66
+ defaultOption,
67
+ defaultProduct,
35
68
  defaultValue
36
69
  });
@@ -1,14 +1,73 @@
1
+ export declare type bundleType = {
2
+ id: number;
3
+ name: string;
4
+ num: number;
5
+ price: number;
6
+ total: number;
7
+ origin_total?: number;
8
+ price_type?: string;
9
+ options?: optionType[];
10
+ };
11
+ /**
12
+ * @description:
13
+ * @return {*}
14
+ * @Author: WangHan
15
+ * @Date: 2025-01-02 23:00
16
+ */
17
+ export declare type optionType = {
18
+ id: number;
19
+ name: string;
20
+ num: number;
21
+ price: number;
22
+ total: number;
23
+ origin_total?: number;
24
+ };
25
+ /**
26
+ * @title: 商品商品类型
27
+ * @description:
28
+ * @return {*}
29
+ * @Author: WangHan
30
+ * @Date: 2025-01-02 22:48
31
+ */
32
+ export declare type productType = {
33
+ _id: string | number;
34
+ id: number;
35
+ name: string;
36
+ price: number;
37
+ total: number;
38
+ num: number;
39
+ origin_total?: number;
40
+ image?: string;
41
+ isShowNote?: boolean;
42
+ note?: string;
43
+ like_status?: string;
44
+ bundle?: bundleType[];
45
+ options?: optionType[];
46
+ isShowAction?: boolean;
47
+ actionText?: string;
48
+ errorMessage?: string;
49
+ product_option_string?: string;
50
+ discount_reason?: string;
51
+ relation_products?: any[];
52
+ resource_id?: string | number;
53
+ relation_form_name?: string;
54
+ holder_title?: string;
55
+ start_date?: string;
56
+ end_date?: string;
57
+ };
1
58
  /**
2
59
  * 排序总配置
3
60
  */
4
61
  export declare type ProductCardTypes = {
5
- dataSource: any;
62
+ dataSource: productType;
6
63
  isShowImage?: boolean;
7
64
  isShowHolder?: boolean;
8
65
  isShowNote?: boolean;
9
66
  isShowPackageNote?: boolean;
10
67
  isShowDelete?: boolean;
11
68
  disabledEdit?: boolean;
69
+ locale?: string;
70
+ symbol?: string;
12
71
  onAction?: (val: any) => void;
13
72
  onDelete?: (val: any) => void;
14
73
  onNote?: (val: any) => void;
@@ -1,60 +1,24 @@
1
- import dayjs from 'dayjs';
2
1
  import 'dayjs/locale/zh-cn';
3
2
  import 'dayjs/locale/en';
4
3
  import 'dayjs/locale/zh-tw';
5
- declare type RType = (url: string, data?: {} | undefined, config?: {} | undefined) => Promise<any>;
6
- declare class Request {
7
- private request;
8
- constructor();
9
- setRequest(val: any): void;
10
- getRequest(): {
11
- get: RType;
12
- post: RType;
13
- put: RType;
14
- remove: RType;
15
- custom: RType;
16
- };
17
- }
18
- export declare const request: Request;
19
4
  /**
20
- * @title: 格式化持续时长用于展示
5
+ * @title: 是否英文
21
6
  * @description:
22
- * @param {number} service_times
7
+ * @param {any} item
23
8
  * @return {*}
24
- * @Author: zhiwei.Wang
25
- * @Date: 2024-04-26 14:00
9
+ * @Author: WangHan
10
+ * @Date: 2024-12-28 22:49
26
11
  */
27
- export declare const getDiscountTime: (service_times: number) => string;
12
+ export declare const isEn: (item: any) => boolean;
28
13
  /**
29
- * @title: 时间切片
14
+ * @title: 跨日预约时间
30
15
  * @description:
31
- * @param {any} config
32
- * @param {string} locale
33
- * @return {*}
34
- * @Author: zhiwei.Wang
35
- * @Date: 2024-04-26 13:59
36
- */
37
- export declare const sliceDayIntoFiveMinutes: (config: any, locale: string) => {
38
- timeSlices: {
39
- label: string;
40
- value: string;
41
- }[];
42
- durationSlicesBasedOnTime: {
43
- label: string;
44
- value: number;
45
- }[];
46
- };
47
- export declare const getNowTime: () => string;
48
- export declare const isNowTime: (time: string) => boolean;
49
- /**
50
- * @title: 获取服务的开始时间, 如果是now 转换为当前的时间
51
- * @description:
52
- * @param {string} start_time
16
+ * @param {any} item
53
17
  * @return {*}
54
- * @Author: zhiwei.Wang
55
- * @Date: 2024-04-26 14:03
18
+ * @Author: WangHan
19
+ * @Date: 2024-12-28 22:50
56
20
  */
57
- export declare const getServeStartTime: (start_time: string) => string;
21
+ export declare const formatMultiDayDate: (item: any) => string;
58
22
  /**
59
23
  * @title: 格式化服务的 开始时间-结束时间-时长, 用于展示
60
24
  * @description:
@@ -65,101 +29,3 @@ export declare const getServeStartTime: (start_time: string) => string;
65
29
  * @Date: 2024-04-26 14:04
66
30
  */
67
31
  export declare const getServiceTime: (item: any, currentDate: any) => string;
68
- export declare const findNextSlice: ({ timeSlices, index, date, }: {
69
- timeSlices: any[];
70
- index?: number | undefined;
71
- date?: string | undefined;
72
- }) => any;
73
- export declare const findNextDuration: (current: any, array: any, defaultValue?: any) => any;
74
- export declare const formatProductListByCategory: (list: any, filterItem: any) => unknown[];
75
- export declare const getResourceTimeIsUsable: (item: any, cacheItem: any) => any;
76
- /**
77
- * @title: 查找是否有可用的time
78
- * @description:
79
- * @param {any} resourceItem
80
- * @return {*}
81
- * @Author: zhiwei.Wang
82
- * @Date: 2024-01-09 13:57
83
- */
84
- export declare const formatTimes: (resourceItem: any, cacheItem: any) => any;
85
- /**
86
- * @title: 获取店铺的营业结束时间
87
- * @description:
88
- * @return {*}
89
- * @Author: zhiwei.Wang
90
- * @Date: 2024-02-23 10:00
91
- */
92
- export declare const getShopOpeningHours: () => string;
93
- /**
94
- * @title: 对灵活时长进行处理
95
- * @description:
96
- * @return {*}
97
- * @Author: zhiwei.Wang
98
- * @Date: 2024-02-23 10:00
99
- */
100
- export declare const flexibleObj: {
101
- create: (num: number) => any;
102
- getValue: (str: string | number) => number;
103
- isFlexible: (str: string | number) => boolean;
104
- add: (current: number | string, duration: number) => any;
105
- };
106
- /**
107
- * @title: 获取结束时间
108
- * @description: 取 endDate | 店铺营业时间 最小的那一个
109
- * @param {any} startDate
110
- * @param {string} duration
111
- * @param {any} endDate
112
- * @return {*}
113
- * @Author: zhiwei.Wang
114
- * @Date: 2024-02-23 10:01
115
- */
116
- export declare const getEndDate: (startDate: any, duration: string | number, endDate: any) => any;
117
- export declare const getServiceTimes: (service: any) => {
118
- startDate: dayjs.Dayjs;
119
- endDate: dayjs.Dayjs;
120
- };
121
- export declare const getErrorList: (resource: any, cacheItem: any) => {
122
- label: any;
123
- type: string;
124
- }[];
125
- /**
126
- * @title: 格式化资源, 添加自定义参数
127
- * @description:
128
- * @param {any} resourceItem
129
- * @return {*}
130
- * @Author: zhiwei.Wang
131
- * @Date: 2024-01-09 13:40
132
- */
133
- export declare const formatResource: (resourceItem: any, cacheItem?: any, formatLabel?: any) => any;
134
- export declare const getLastServer: (list: any) => any;
135
- export declare const getCacheParams: () => any;
136
- export declare const deleteCacheParams: () => void;
137
- /**
138
- * @title: 创建一个服务商品
139
- * @description:
140
- * @param {any} state
141
- * @param {any} item
142
- * @return {*}
143
- * @Author: zhiwei.Wang
144
- * @Date: 2024-01-26 14:09
145
- */
146
- export declare const getServerItemExtend: (state: any, cacheItem: any, timeObj: any) => any;
147
- export declare const getProductTotalPrice: (item: any) => number;
148
- /**
149
- * @title: 判断 duration
150
- * @description: 用于处理不同格式的duration
151
- * @param {number} duration
152
- * @return {*}
153
- * @Author: zhiwei.Wang
154
- * @Date: 2024-02-23 10:02
155
- */
156
- export declare const getDuration: (duration: number | {
157
- type: string;
158
- value: number;
159
- }) => number | {
160
- type: string;
161
- value: number;
162
- } | "flexible";
163
- export declare const isWalkIn: (customer_id?: number | string) => boolean;
164
- export declare const getIsEdit: (state: any) => boolean;
165
- export {};