@pisell/materials 6.1.1 → 6.2.24

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 (183) 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 +7 -7
  6. package/build/lowcode/preview.js +9 -9
  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 +25 -25
  11. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  12. package/es/components/appVersionControl/index.d.ts +4 -0
  13. package/es/components/badge/index.d.ts +7 -0
  14. package/es/components/buttonGroupEdit/index.d.ts +8 -0
  15. package/es/components/buttonGroupPreview/index.d.ts +19 -0
  16. package/es/components/cardPro/index.d.ts +3 -0
  17. package/es/components/collapse/index.d.ts +15 -0
  18. package/es/components/cropPhoto/index.d.ts +3 -0
  19. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  20. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  21. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  22. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
  23. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
  24. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
  25. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  26. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  27. package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
  28. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
  29. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  30. package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
  31. package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
  32. package/es/components/drag-sort-tree/TreeItem/index.js +2 -1
  33. package/es/components/drag-sort-tree/index.d.ts +4 -0
  34. package/es/components/iconfont/index.d.ts +8 -0
  35. package/es/components/login-and-register/index.d.ts +82 -0
  36. package/es/components/login-and-register/index.js +22 -18
  37. package/es/components/page/index.d.ts +5 -0
  38. package/es/components/pisell-config-provider/index.d.ts +12 -0
  39. package/es/components/pisellAnchor/index.d.ts +23 -0
  40. package/es/components/pisellAvatar/index.d.ts +19 -0
  41. package/es/components/pisellCard/index.d.ts +19 -0
  42. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  43. package/es/components/pisellDropdown/index.d.ts +20 -0
  44. package/es/components/pisellEmpty/index.d.ts +19 -0
  45. package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
  46. package/es/components/pisellImageCarousels/index.d.ts +18 -0
  47. package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  48. package/es/components/pisellInformationEntry/index.d.ts +33 -0
  49. package/es/components/pisellList01/index.d.ts +17 -0
  50. package/es/components/pisellQrcode/index.d.ts +10 -0
  51. package/es/components/pisellSectionHeaders/index.d.ts +21 -0
  52. package/es/components/pisellStatisticList/index.d.ts +21 -0
  53. package/es/components/pisellWalletPassCard/index.d.ts +0 -1
  54. package/es/components/productCard/components/Action/index.d.ts +3 -0
  55. package/es/components/productCard/components/AmountFooter/index.js +22 -6
  56. package/es/components/productCard/components/AmountFooter/index.less +28 -1
  57. package/es/components/productCard/components/Divider/index.d.ts +3 -0
  58. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  59. package/es/components/productCard/components/MultiDay/index.d.ts +3 -0
  60. package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
  61. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
  62. package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
  63. package/es/components/productCard/components/Packages/components/options/index.d.ts +3 -0
  64. package/es/components/productCard/components/Packages/components/options/index.less +3 -2
  65. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  66. package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  67. package/es/components/productCard/components/Time/index.d.ts +3 -0
  68. package/es/components/productCard/components/Warning/index.d.ts +7 -0
  69. package/es/components/productCard/components/Warning/index.js +48 -0
  70. package/es/components/productCard/index.js +8 -8
  71. package/es/components/productCard/locales.d.ts +84 -0
  72. package/es/components/productCard/locales.js +6 -3
  73. package/es/components/productCard/status.d.ts +32 -0
  74. package/es/components/productCard/status.js +3 -1
  75. package/es/components/productCard/types.d.ts +84 -0
  76. package/es/components/productCard/utils.js +8 -6
  77. package/es/components/section-footers/index.d.ts +9 -0
  78. package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  79. package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  80. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  81. package/es/components/table/Table/fields/index.d.ts +2 -2
  82. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  83. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  84. package/es/components/table/Table/index.d.ts +4 -0
  85. package/es/components/table/Table/utils.d.ts +1 -1
  86. package/es/components/table/hooks/useTableSetting.d.ts +22 -0
  87. package/es/components/table/types.d.ts +251 -0
  88. package/es/components/tabs/index.d.ts +16 -0
  89. package/es/components/translation/index.d.ts +4 -3
  90. package/es/components/translation/index.js +34 -32
  91. package/es/components/versionModal/index.d.ts +23 -0
  92. package/es/components/walletCard/Guest/index.d.ts +3 -0
  93. package/es/components/walletCard/Guide/index.d.ts +3 -0
  94. package/es/components/walletCard/index.d.ts +67 -0
  95. package/es/utils/index.d.ts +1 -1
  96. package/es/utils/platform.d.ts +1 -1
  97. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  98. package/lib/components/appVersionControl/index.d.ts +4 -0
  99. package/lib/components/badge/index.d.ts +7 -0
  100. package/lib/components/buttonGroupEdit/index.d.ts +8 -0
  101. package/lib/components/buttonGroupPreview/index.d.ts +19 -0
  102. package/lib/components/cardPro/index.d.ts +3 -0
  103. package/lib/components/collapse/index.d.ts +15 -0
  104. package/lib/components/cropPhoto/index.d.ts +3 -0
  105. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  106. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  107. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  108. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
  109. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
  110. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
  111. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  112. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  113. package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
  114. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
  115. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  116. package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
  117. package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
  118. package/lib/components/drag-sort-tree/TreeItem/index.js +2 -1
  119. package/lib/components/drag-sort-tree/index.d.ts +4 -0
  120. package/lib/components/iconfont/index.d.ts +8 -0
  121. package/lib/components/login-and-register/index.d.ts +82 -0
  122. package/lib/components/login-and-register/index.js +2 -2
  123. package/lib/components/page/index.d.ts +5 -0
  124. package/lib/components/pisell-config-provider/index.d.ts +12 -0
  125. package/lib/components/pisellAnchor/index.d.ts +23 -0
  126. package/lib/components/pisellAvatar/index.d.ts +19 -0
  127. package/lib/components/pisellCard/index.d.ts +19 -0
  128. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  129. package/lib/components/pisellDropdown/index.d.ts +20 -0
  130. package/lib/components/pisellEmpty/index.d.ts +19 -0
  131. package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
  132. package/lib/components/pisellImageCarousels/index.d.ts +18 -0
  133. package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  134. package/lib/components/pisellInformationEntry/index.d.ts +33 -0
  135. package/lib/components/pisellList01/index.d.ts +17 -0
  136. package/lib/components/pisellQrcode/index.d.ts +10 -0
  137. package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
  138. package/lib/components/pisellStatisticList/index.d.ts +21 -0
  139. package/lib/components/pisellWalletPassCard/index.d.ts +0 -1
  140. package/lib/components/productCard/components/Action/index.d.ts +3 -0
  141. package/lib/components/productCard/components/AmountFooter/index.js +16 -6
  142. package/lib/components/productCard/components/AmountFooter/index.less +28 -1
  143. package/lib/components/productCard/components/Divider/index.d.ts +3 -0
  144. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  145. package/lib/components/productCard/components/MultiDay/index.d.ts +3 -0
  146. package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
  147. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
  148. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -2
  149. package/lib/components/productCard/components/Packages/components/options/index.d.ts +3 -0
  150. package/lib/components/productCard/components/Packages/components/options/index.less +3 -2
  151. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  152. package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  153. package/lib/components/productCard/components/Time/index.d.ts +3 -0
  154. package/lib/components/productCard/components/Warning/index.d.ts +7 -0
  155. package/lib/components/productCard/components/Warning/index.js +68 -0
  156. package/lib/components/productCard/index.js +4 -11
  157. package/lib/components/productCard/locales.d.ts +84 -0
  158. package/lib/components/productCard/locales.js +6 -3
  159. package/lib/components/productCard/status.d.ts +32 -0
  160. package/lib/components/productCard/status.js +3 -1
  161. package/lib/components/productCard/types.d.ts +84 -0
  162. package/lib/components/productCard/utils.js +7 -6
  163. package/lib/components/section-footers/index.d.ts +9 -0
  164. package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  165. package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  166. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  167. package/lib/components/table/Table/fields/index.d.ts +2 -2
  168. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  169. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  170. package/lib/components/table/Table/index.d.ts +4 -0
  171. package/lib/components/table/Table/utils.d.ts +1 -1
  172. package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
  173. package/lib/components/table/types.d.ts +251 -0
  174. package/lib/components/tabs/index.d.ts +16 -0
  175. package/lib/components/translation/index.d.ts +4 -3
  176. package/lib/components/translation/index.js +1 -0
  177. package/lib/components/versionModal/index.d.ts +23 -0
  178. package/lib/components/walletCard/Guest/index.d.ts +3 -0
  179. package/lib/components/walletCard/Guide/index.d.ts +3 -0
  180. package/lib/components/walletCard/index.d.ts +67 -0
  181. package/lib/utils/index.d.ts +1 -1
  182. package/lib/utils/platform.d.ts +1 -1
  183. package/package.json +2 -2
@@ -0,0 +1,84 @@
1
+ declare const _default: {
2
+ en: {
3
+ 'pisell2.product.card.day': (val: number) => string;
4
+ 'pisell2.product.card.day.event': (val: number) => string;
5
+ 'pisell2.product.card.minute': (val: number) => string;
6
+ 'pisell2.product.card.discount.reason': string;
7
+ 'pisell2.product.card.discount.note': string;
8
+ 'pisell2.product.card.edit': string;
9
+ 'pisell2.product.card.discount.add.note': string;
10
+ 'pisell2.product.card.discount.edit.note': string;
11
+ 'pisell2.product.card.confirm': string;
12
+ 'pisell2.product.card.cancel': string;
13
+ 'pisell2.product.card.note.pla': string;
14
+ 'pisell2.product.card.items.package': string;
15
+ 'pisell2.product.card.view-all': string;
16
+ 'pisell2.product.card.view-less': string;
17
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
18
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
19
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
20
+ 'pisell2.product.card.add.holder.modal.title.1': string;
21
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
22
+ 'pisell2.product.card.sales': string;
23
+ 'pisell2.product.card.add.holder.modal.cancel': string;
24
+ 'pisell2.product.card.add.holder.modal.clear': string;
25
+ 'pisell2.product.card.add.holder.modal.apply': string;
26
+ 'pisell2.product.card.add.holder.modal.add': string;
27
+ 'pisell2.product.card.closing-soon.warning': string;
28
+ };
29
+ 'zh-CN': {
30
+ 'pisell2.product.card.edit': string;
31
+ 'pisell2.product.card.day': (val: number) => string;
32
+ 'pisell2.product.card.day.event': (val: number) => string;
33
+ 'pisell2.product.card.minute': (val: number) => string;
34
+ 'pisell2.product.card.discount.reason': string;
35
+ 'pisell2.product.card.discount.note': string;
36
+ 'pisell2.product.card.discount.add.note': string;
37
+ 'pisell2.product.card.discount.edit.note': string;
38
+ 'pisell2.product.card.confirm': string;
39
+ 'pisell2.product.card.cancel': string;
40
+ 'pisell2.product.card.note.pla': string;
41
+ 'pisell2.product.card.items.package': string;
42
+ 'pisell2.product.card.view-all': string;
43
+ 'pisell2.product.card.view-less': string;
44
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
45
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
46
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
47
+ 'pisell2.product.card.add.holder.modal.title.1': string;
48
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
49
+ 'pisell2.product.card.sales': string;
50
+ 'pisell2.product.card.add.holder.modal.cancel': string;
51
+ 'pisell2.product.card.add.holder.modal.clear': string;
52
+ 'pisell2.product.card.add.holder.modal.apply': string;
53
+ 'pisell2.product.card.add.holder.modal.add': string;
54
+ 'pisell2.product.card.closing-soon.warning': string;
55
+ };
56
+ 'zh-HK': {
57
+ 'pisell2.product.card.edit': string;
58
+ 'pisell2.product.card.day': (val: number) => string;
59
+ 'pisell2.product.card.day.event': (val: number) => string;
60
+ 'pisell2.product.card.minute': (val: number) => string;
61
+ 'pisell2.product.card.discount.reason': string;
62
+ 'pisell2.product.card.discount.note': string;
63
+ 'pisell2.product.card.discount.add.note': string;
64
+ 'pisell2.product.card.discount.edit.note': string;
65
+ 'pisell2.product.card.confirm': string;
66
+ 'pisell2.product.card.cancel': string;
67
+ 'pisell2.product.card.note.pla': string;
68
+ 'pisell2.product.card.items.package': string;
69
+ 'pisell2.product.card.view-all': string;
70
+ 'pisell2.product.card.view-less': string;
71
+ 'pisell2.product.card.add.holder.button.text': (val: string) => string;
72
+ 'pisell2.product.card.add.holder.placeholder': (val: string) => string;
73
+ 'pisell2.product.card.add.holder.placeholder.multiple': (num: number, val: string) => string;
74
+ 'pisell2.product.card.add.holder.modal.title.1': string;
75
+ 'pisell2.product.card.hour.minute': (hour: number, minute: number) => string;
76
+ 'pisell2.product.card.sales': string;
77
+ 'pisell2.product.card.add.holder.modal.cancel': string;
78
+ 'pisell2.product.card.add.holder.modal.clear': string;
79
+ 'pisell2.product.card.add.holder.modal.apply': string;
80
+ 'pisell2.product.card.add.holder.modal.add': string;
81
+ 'pisell2.product.card.closing-soon.warning': string;
82
+ };
83
+ };
84
+ export default _default;
@@ -37,7 +37,8 @@ export default {
37
37
  'pisell2.product.card.add.holder.modal.cancel': 'Cancel',
38
38
  'pisell2.product.card.add.holder.modal.clear': 'Clear',
39
39
  'pisell2.product.card.add.holder.modal.apply': 'Apply',
40
- 'pisell2.product.card.add.holder.modal.add': 'Add New'
40
+ 'pisell2.product.card.add.holder.modal.add': 'Add New',
41
+ 'pisell2.product.card.closing-soon.warning': 'The venue will close soon. Please make sure you have enough time for your visit.'
41
42
  },
42
43
  'zh-CN': {
43
44
  'pisell2.product.card.edit': '编辑',
@@ -77,7 +78,8 @@ export default {
77
78
  'pisell2.product.card.add.holder.modal.cancel': '取消',
78
79
  'pisell2.product.card.add.holder.modal.clear': '清除',
79
80
  'pisell2.product.card.add.holder.modal.apply': '应用',
80
- 'pisell2.product.card.add.holder.modal.add': '添加'
81
+ 'pisell2.product.card.add.holder.modal.add': '添加',
82
+ 'pisell2.product.card.closing-soon.warning': '当前入场时间临近营业结束,请确认是否仍要购买。'
81
83
  },
82
84
  'zh-HK': {
83
85
  'pisell2.product.card.edit': '編輯',
@@ -117,6 +119,7 @@ export default {
117
119
  'pisell2.product.card.add.holder.modal.cancel': '取消',
118
120
  'pisell2.product.card.add.holder.modal.clear': '清除',
119
121
  'pisell2.product.card.add.holder.modal.apply': '應用',
120
- 'pisell2.product.card.add.holder.modal.add': '添加'
122
+ 'pisell2.product.card.add.holder.modal.add': '添加',
123
+ 'pisell2.product.card.closing-soon.warning': '當前入場時間臨近營業結束,請確認是否仍要購買。'
121
124
  }
122
125
  };
@@ -0,0 +1,32 @@
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;
25
+ /**
26
+ * @title: 默认数据
27
+ * @description:
28
+ * @return {*}
29
+ * @Author: WangHan
30
+ * @Date: 2024-12-12 16:49
31
+ */
32
+ export declare const defaultValue: ProductCardTypes;
@@ -64,5 +64,7 @@ export var defaultValue = {
64
64
  isShowPackageNote: true,
65
65
  isShowEditProduct: false,
66
66
  locale: 'en-US',
67
- symbol: '$'
67
+ symbol: '$',
68
+ // os层自定义错误提示
69
+ osWarnTips: []
68
70
  };
@@ -0,0 +1,84 @@
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
+ is_show_duration?: boolean;
58
+ is_show_week?: boolean;
59
+ };
60
+ /**
61
+ * 排序总配置
62
+ */
63
+ export declare type ProductCardTypes = {
64
+ dataSource: productType;
65
+ isShowImage?: boolean;
66
+ isShowHolder?: boolean;
67
+ isShowNote?: boolean;
68
+ isShowPackageNote?: boolean;
69
+ isShowDelete?: boolean;
70
+ disabledEdit?: boolean;
71
+ locale?: string;
72
+ symbol?: string;
73
+ isShowChangeHolder?: boolean;
74
+ isShowChangeResource?: boolean;
75
+ isShowChangeDate?: boolean;
76
+ onAction?: (val: any) => void;
77
+ onDelete?: (val: any) => void;
78
+ onNote?: (val: any) => void;
79
+ onLike?: (val: any) => void;
80
+ onCard?: (val: any) => void;
81
+ onChangeResource?: (val: any) => void;
82
+ osWarnTips?: Array<string>;
83
+ [key: string]: any;
84
+ };
@@ -60,6 +60,8 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
60
60
  var utils = context.appHelper.utils || {};
61
61
  var locale = (item === null || item === void 0 ? void 0 : item.locale) || (utils === null || utils === void 0 || (_utils$storage = utils.storage) === null || _utils$storage === void 0 ? void 0 : _utils$storage.get('umi_locale')) || 'en-US';
62
62
  var isEn = locale === 'en-US' || locale === 'en';
63
+ // 灵活时长, 默认按分钟计算
64
+ var durationType = (item === null || item === void 0 ? void 0 : item.duration_type) === 'flexible' ? 'minutes' : item === null || item === void 0 ? void 0 : item.duration_type;
63
65
  var localeTypes = {
64
66
  'en-US': 'en',
65
67
  'zh-CN': 'zh-cn',
@@ -71,7 +73,7 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
71
73
  var diffInDays = (item === null || item === void 0 ? void 0 : item.custom_day_count) || endDate.diff(startDate, 'day');
72
74
 
73
75
  // 1.2时间格式, 同天显示 年月日 开始 - 结束, 不同天 年月日 开始 - 年月日 结束
74
- if (item !== null && item !== void 0 && item.duration_type) {
76
+ if (durationType) {
75
77
  var sameDay = startDate.isSame(endDate, 'day');
76
78
  var dateFormat = isEn ? 'DD/MM/YYYY' : 'YYYY-MM-DD';
77
79
  var timeFormat = 'HH:mm';
@@ -98,14 +100,14 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
98
100
  }
99
101
  var startDateTime = "".concat(startDate.format('YYYY-MM-DD'), " ").concat(startTime);
100
102
  var endDateTime = "".concat(endDate.format('YYYY-MM-DD'), " ").concat(endTime);
101
- var _duration = dayjs(endDateTime).diff(dayjs(startDateTime), item === null || item === void 0 ? void 0 : item.duration_type);
103
+ var _duration = dayjs(endDateTime).diff(dayjs(startDateTime), durationType);
102
104
  var durationText = '';
103
- if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'minutes') {
105
+ if (durationType === 'minutes') {
104
106
  // 转为小时+分钟
105
107
  var hours = Math.floor(_duration / 60);
106
108
  var minutes = _duration % 60;
107
109
  durationText = locales.getText('pisell2.product.card.hour.minute')(hours, minutes);
108
- } else if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'days') {
110
+ } else if (durationType === 'days') {
109
111
  durationText = locales.getText('pisell2.product.card.day')(_duration);
110
112
  } else {
111
113
  durationText = "".concat(_duration);
@@ -127,7 +129,7 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
127
129
  }
128
130
 
129
131
  // 显示时长分钟
130
- if ((item === null || item === void 0 ? void 0 : item.duration_type) === 'minutes') {
132
+ if (durationType === 'minutes') {
131
133
  diffInDays = endDate.diff(startDate, 'minute');
132
134
  }
133
135
  var date = "".concat(startDate.format(_format), " ~ ").concat(endDate.format(_format));
@@ -141,7 +143,7 @@ export var getServiceTime = function getServiceTime(item, currentDate) {
141
143
  'minutes': locales.getText('pisell2.product.card.minute')(diffInDays),
142
144
  'event': locales.getText('pisell2.product.card.day.event')(diffInDays)
143
145
  };
144
- text = (textTypes === null || textTypes === void 0 ? void 0 : textTypes[item === null || item === void 0 ? void 0 : item.duration_type]) || text;
146
+ text = (textTypes === null || textTypes === void 0 ? void 0 : textTypes[durationType]) || text;
145
147
  var duration = "".concat(diffInDays).concat(text);
146
148
  return "".concat(date, " (").concat(duration, ")");
147
149
  };
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ interface SectionFooterProps {
3
+ left?: React.ReactNode;
4
+ middle?: React.ReactNode;
5
+ right?: React.ReactNode;
6
+ className?: string;
7
+ }
8
+ declare const SectionFooters: (props: SectionFooterProps) => JSX.Element;
9
+ export default SectionFooters;
@@ -0,0 +1,7 @@
1
+ import { ExportImportType } from '../../../types';
2
+ import './index.less';
3
+ declare type ExportImportProps = {
4
+ exportImport: ExportImportType;
5
+ };
6
+ declare const ExportImport: ({ exportImport }: ExportImportProps) => JSX.Element;
7
+ export default ExportImport;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @title: 格式化导出导入接口地址
3
+ * @description:
4
+ * @param {string} url
5
+ * @return {*}
6
+ * @Author: WangHan
7
+ * @Date: 2024-09-05 11:39
8
+ */
9
+ export declare const formatApiUrl: (url: string) => string;
@@ -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;
@@ -197,12 +197,12 @@ export declare const fieldList: ({
197
197
  field_icon: string;
198
198
  field_name: string;
199
199
  field_type: string;
200
- default_value: boolean;
200
+ default_value: string;
201
201
  } | {
202
202
  field_icon: string;
203
203
  field_name: string;
204
204
  field_type: string;
205
- default_value: string;
205
+ default_value: boolean;
206
206
  } | {
207
207
  field_icon: string;
208
208
  field_name: string;
@@ -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;
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[] | Record<string, any>[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const _default: React.NamedExoticComponent<any>;
4
+ export default _default;
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
155
155
  sort?: SortType | undefined;
156
156
  mode: "" | "localStorage" | "remote";
157
157
  currentViewMode: ModeType;
158
- }) => ("column_setting" | "gallery_setting" | "order_by" | "group_by" | "view_mode" | "filter_setting")[];
158
+ }) => ("filter_setting" | "column_setting" | "gallery_setting" | "view_mode" | "group_by" | "order_by")[];
159
159
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
160
160
  export declare const stringify: (obj: Record<string, any>) => string;
161
161
  export {};
@@ -0,0 +1,22 @@
1
+ import { FilterType } from "../../filter/types";
2
+ import { ColumnSettingType, DataSourceGroupType, GallerySettingType, GridViewType, ModeType, SortType, ExportImportModeType } from "../types";
3
+ declare type UseTableSettingProps = {
4
+ tableId?: string;
5
+ filter: FilterType;
6
+ columns: Record<string, any>[];
7
+ columnSetting?: ColumnSettingType;
8
+ dataSourceGroup?: DataSourceGroupType;
9
+ sort?: SortType;
10
+ view: GridViewType;
11
+ currentViewMode: ModeType;
12
+ gallery?: GallerySettingType;
13
+ currentSettingHash: string;
14
+ exportImport?: ExportImportModeType;
15
+ };
16
+ declare const useTableSetting: (params: UseTableSettingProps) => {
17
+ setTableSetting: (values: Record<string, any>) => void;
18
+ tableSetting: {
19
+ [x: string]: any;
20
+ };
21
+ };
22
+ export default useTableSetting;
@@ -0,0 +1,251 @@
1
+ import { FilterType } from "../filter/types";
2
+ import { SortItemProps } from "../sort/types";
3
+ import React from "react";
4
+ export declare type StorageMode = "" | "localStorage";
5
+ /**
6
+ * 排序总配置
7
+ */
8
+ export declare type SortType = {
9
+ /** 排序是否展示 */
10
+ show: boolean;
11
+ /** 排序存储模式 */
12
+ storageMode: StorageMode;
13
+ list: SortItemProps[];
14
+ };
15
+ /**
16
+ * 列展示总配置
17
+ */
18
+ export declare type ColumnSettingType = {
19
+ /** 列设置是否展示 */
20
+ show: boolean;
21
+ /** 列设置存储模式 */
22
+ storageMode: StorageMode;
23
+ };
24
+ declare type DataSourceListItemType = {
25
+ isCustom: boolean;
26
+ columnKey?: string;
27
+ label?: string;
28
+ name?: string | string[];
29
+ isHidden?: boolean;
30
+ };
31
+ /**
32
+ * 数据源分组总配置
33
+ */
34
+ export declare type DataSourceGroupType = {
35
+ /** 分组设置是否展示 */
36
+ show: boolean;
37
+ /** 分组设置存储模式 */
38
+ storageMode: StorageMode;
39
+ /** */
40
+ list: DataSourceListItemType[];
41
+ };
42
+ /**
43
+ * Gallery封面总配置
44
+ */
45
+ declare type GalleryCoverType = {
46
+ /** 封面是否展示 */
47
+ show: boolean;
48
+ /**
49
+ * 封面图片可以使用的字段
50
+ */
51
+ fields: string[];
52
+ /**
53
+ * 封面高度
54
+ */
55
+ height: number;
56
+ /** 图片裁剪方式 */
57
+ objectFit: "fill" | "cover";
58
+ };
59
+ /**
60
+ * Gallery标题总配置
61
+ */
62
+ declare type GalleryTitleType = {
63
+ /** 标题使用的字段 */
64
+ field: string;
65
+ /** 标题行数 */
66
+ line: number;
67
+ };
68
+ /**
69
+ * Gallery头部区域总配置
70
+ */
71
+ declare type GalleryHeaderType = {
72
+ /** 头部区域插槽 */
73
+ slot?: (record: Record<string, any>, index: number) => React.ReactNode;
74
+ /** 头部区域其他字段设置 */
75
+ fields: {
76
+ /** 头部区域其他字段是否展示 */
77
+ show: boolean;
78
+ /** 头部区域其他字段 */
79
+ list: string[];
80
+ };
81
+ };
82
+ /**
83
+ * Gallery内容区域总配置
84
+ */
85
+ declare type GalleryContentType = {
86
+ /** 内容区域字段配置 */
87
+ fields: {
88
+ columnKey: string;
89
+ show: boolean;
90
+ }[];
91
+ };
92
+ export declare type GallerySettingValueType = {
93
+ coverField: string | "noCover";
94
+ coverObjectFit: "fill" | "cover";
95
+ compactMode: "default" | "compact";
96
+ isShowLabel: boolean;
97
+ };
98
+ /**
99
+ * Gallery底部区域总配置
100
+ */
101
+ declare type GalleryFooterType = {
102
+ /** 底部区域自定义渲染 */
103
+ render: (record: Record<string, any>, index: number) => React.ReactNode;
104
+ /** 底部区域高度 */
105
+ height: number;
106
+ };
107
+ /**
108
+ * Gallery模式总配置
109
+ */
110
+ export declare type GallerySettingType = {
111
+ /** 卡片最小宽度 */
112
+ cardMinWidth: number;
113
+ /** 卡片最大宽度 */
114
+ cardMaxWidth: number;
115
+ /** 水平间隔 */
116
+ horizontalGutter: number;
117
+ /** 垂直间隔 */
118
+ verticalGutter: number;
119
+ /** 封面配置 */
120
+ cover: GalleryCoverType;
121
+ /** 标题配置 */
122
+ title: GalleryTitleType;
123
+ /** 头部区域 */
124
+ header: GalleryHeaderType;
125
+ /** 内容区域 */
126
+ content: GalleryContentType;
127
+ /** 固定高度 */
128
+ fixedHeight: boolean;
129
+ /** 固定的卡片高度 */
130
+ cardHeight: number;
131
+ /** 固定顶部 */
132
+ fixedHeader: boolean;
133
+ /** 固定底部 */
134
+ fixedFooter: boolean;
135
+ /** 底部区域 */
136
+ footer: GalleryFooterType;
137
+ /** 卡片点击时间 */
138
+ onItem: (record: Record<string, any>, index: number) => void;
139
+ };
140
+ /** 视图模式 */
141
+ export declare type ModeType = "grid" | "gallery" | "kanban";
142
+ /**
143
+ * 视图模式总配置
144
+ */
145
+ export declare type GridViewType = {
146
+ /** 默认视图模式 */
147
+ defaultViewMode: ModeType;
148
+ /** 开启多视图模式可进行页面内转换 */
149
+ multiple: boolean;
150
+ /** 当前可用的视图模式列表 */
151
+ modeList: ModeType[];
152
+ };
153
+ declare type SortDetail = {
154
+ fromIndex: number;
155
+ toIndex: number;
156
+ dataSource: Record<string, any>[];
157
+ fromId: number | string;
158
+ toId: number | string;
159
+ fromItem: Record<string, any>;
160
+ toItem: Record<string, any>;
161
+ };
162
+ /** 导入导出模式 */
163
+ export declare type ExportImportModeType = "import" | "export" | "export_file" | "import_log";
164
+ /**
165
+ * @title: 导出导入api
166
+ * @description:
167
+ * @return {*}
168
+ * @Author: WangHan
169
+ * @Date: 2024-09-11 15:44
170
+ */
171
+ export declare type ApiProps = {
172
+ export?: string;
173
+ import?: string;
174
+ export_file: string;
175
+ import_log?: string;
176
+ template?: string;
177
+ };
178
+ /**
179
+ * 导入导出配置
180
+ */
181
+ export declare type ExportImportType = {
182
+ /** 是否展示 */
183
+ show: boolean;
184
+ /** 当前所选项 */
185
+ selectLists: string[];
186
+ /** 导入模版链接 */
187
+ templateFileUrl: string;
188
+ /** 标题 */
189
+ title: string;
190
+ hiddenKeys?: string[];
191
+ apiUrl?: ApiProps;
192
+ otherParams?: any;
193
+ };
194
+ export declare type GridViewProps = {
195
+ columns: any;
196
+ dataSource: any[];
197
+ dispatch: any;
198
+ /**
199
+ * 画册模式的配置
200
+ */
201
+ gallery: GallerySettingType;
202
+ /**
203
+ * 视图设置
204
+ */
205
+ view: GridViewType;
206
+ style: React.CSSProperties;
207
+ pagination: any;
208
+ filter: FilterType;
209
+ buttons: React.ReactNode | any[];
210
+ actionButtons: any;
211
+ sort: SortType;
212
+ title?: React.ReactNode | (() => React.ReactNode);
213
+ showTitle?: boolean;
214
+ subTitle?: React.ReactNode | (() => React.ReactNode);
215
+ showSubTitle?: boolean;
216
+ exportImport: ExportImportType;
217
+ onValuesChange: (changedValues: any, values: any) => void;
218
+ summary: any;
219
+ utils: any;
220
+ rowKey: ((record: Record<string, any>) => string) | string;
221
+ columnSetting?: ColumnSettingType;
222
+ dataSourceGroup?: DataSourceGroupType;
223
+ loading: boolean;
224
+ dragSort: boolean;
225
+ onSortChange?: (detail: SortDetail) => boolean;
226
+ __id?: string;
227
+ __designMode?: "design";
228
+ /**
229
+ * 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash
230
+ */
231
+ currentSettingKey?: string;
232
+ /**
233
+ * 当前本地配置的唯一值, 不填默认使用currentSettingKey
234
+ */
235
+ currentComponentId?: string;
236
+ /**
237
+ * 当前表格中数据发生变化事件 包含本地筛选和外部传入数据变化
238
+ * @param currentDataSource
239
+ */
240
+ onDataSourceChange?: (currentDataSource: Record<string, any>[]) => void;
241
+ tabs: {
242
+ show: boolean;
243
+ type: 'default' | 'button' | 'buttonGroup' | 'dropdown';
244
+ items: {
245
+ name: string;
246
+ filterBy?: Record<string, any>;
247
+ sortBy?: string;
248
+ }[];
249
+ };
250
+ };
251
+ export {};
@@ -0,0 +1,16 @@
1
+ import { Component } from 'react';
2
+ import { TabsProps } from 'antd';
3
+ import './index.less';
4
+ declare class Tabs extends Component<any> {
5
+ state: {
6
+ activeKey: any;
7
+ };
8
+ componentDidMount(): void;
9
+ private _handleChange;
10
+ setActiveKey: (key: string) => void;
11
+ getActiveKey: () => any;
12
+ renderIconLabelTabBar: TabsProps['renderTabBar'];
13
+ filterHiddenTabs: (tabs: any[]) => any[];
14
+ render(): JSX.Element;
15
+ }
16
+ export default Tabs;