@pisell/materials 3.3.44 → 3.3.47

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 (167) 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 +9 -9
  7. package/build/lowcode/render/default/view.js +24 -24
  8. package/build/lowcode/view.js +25 -25
  9. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  10. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  11. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  12. package/es/components/productCard/components/Warning/index.d.ts +7 -0
  13. package/es/components/productCard/components/Warning/index.js +48 -0
  14. package/es/components/productCard/index.js +8 -8
  15. package/es/components/productCard/locales.d.ts +3 -0
  16. package/es/components/productCard/locales.js +6 -3
  17. package/es/components/productCard/status.js +3 -1
  18. package/es/components/productCard/types.d.ts +1 -0
  19. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  20. package/es/components/table/Table/fields/index.d.ts +2 -2
  21. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  22. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  23. package/es/components/table/Table/utils.d.ts +1 -1
  24. package/es/components/table/View/index.d.ts +1 -0
  25. package/es/utils/index.d.ts +1 -1
  26. package/es/utils/platform.d.ts +1 -1
  27. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  28. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  29. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  30. package/lib/components/productCard/components/Warning/index.d.ts +7 -0
  31. package/lib/components/productCard/components/Warning/index.js +68 -0
  32. package/lib/components/productCard/index.js +4 -11
  33. package/lib/components/productCard/locales.d.ts +3 -0
  34. package/lib/components/productCard/locales.js +6 -3
  35. package/lib/components/productCard/status.js +3 -1
  36. package/lib/components/productCard/types.d.ts +1 -0
  37. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  38. package/lib/components/table/Table/fields/index.d.ts +2 -2
  39. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  40. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  41. package/lib/components/table/Table/utils.d.ts +1 -1
  42. package/lib/components/table/View/index.d.ts +1 -0
  43. package/lib/utils/index.d.ts +1 -1
  44. package/lib/utils/platform.d.ts +1 -1
  45. package/package.json +1 -1
  46. package/es/components/TimeResourceSelector/index.d.ts +0 -21
  47. package/es/components/badge/index.d.ts +0 -8
  48. package/es/components/buttonGroupPreview/index.d.ts +0 -19
  49. package/es/components/cardPro/index.d.ts +0 -4
  50. package/es/components/collapse/index.d.ts +0 -15
  51. package/es/components/cropPhoto/index.d.ts +0 -3
  52. package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +0 -8
  53. package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +0 -8
  54. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -33
  55. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +0 -5
  56. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
  57. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
  58. package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +0 -20
  59. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +0 -37
  60. package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -3
  61. package/es/components/div/index.d.ts +0 -19
  62. package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -19
  63. package/es/components/iconfont/index.d.ts +0 -8
  64. package/es/components/login-and-register/index.d.ts +0 -82
  65. package/es/components/page/index.d.ts +0 -6
  66. package/es/components/pisell-config-provider/index.d.ts +0 -12
  67. package/es/components/pisellAnchor/index.d.ts +0 -23
  68. package/es/components/pisellAvatar/index.d.ts +0 -19
  69. package/es/components/pisellCard/index.d.ts +0 -20
  70. package/es/components/pisellCustomCheckboxGroup/index.d.ts +0 -16
  71. package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
  72. package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -24
  73. package/es/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
  74. package/es/components/pisellDraggable/index.d.ts +0 -35
  75. package/es/components/pisellDropSort/PisellDropSort.d.ts +0 -5
  76. package/es/components/pisellDropSort/components/SortableItem/index.d.ts +0 -26
  77. package/es/components/pisellDropSort/types.d.ts +0 -58
  78. package/es/components/pisellDropdown/index.d.ts +0 -20
  79. package/es/components/pisellEmpty/index.d.ts +0 -19
  80. package/es/components/pisellHeaderProgressBar/index.d.ts +0 -29
  81. package/es/components/pisellImageCarousels/index.d.ts +0 -18
  82. package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +0 -4
  83. package/es/components/pisellInformationEntry/index.d.ts +0 -33
  84. package/es/components/pisellList01/index.d.ts +0 -17
  85. package/es/components/pisellMenu/PisellMenu.d.ts +0 -11
  86. package/es/components/pisellMenu/types.d.ts +0 -27
  87. package/es/components/pisellNavigationMenu/types.d.ts +0 -85
  88. package/es/components/pisellQrcode/index.d.ts +0 -10
  89. package/es/components/pisellSectionHeaders/index.d.ts +0 -21
  90. package/es/components/pisellStatisticList/index.d.ts +0 -21
  91. package/es/components/productCard/components/Action/index.d.ts +0 -4
  92. package/es/components/productCard/components/Divider/index.d.ts +0 -4
  93. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
  94. package/es/components/productCard/components/MultiDay/utils.d.ts +0 -14
  95. package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -10
  96. package/es/components/productCard/components/Time/index.d.ts +0 -4
  97. package/es/components/section-footers/index.d.ts +0 -9
  98. package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
  99. package/es/components/tabs/index.d.ts +0 -16
  100. package/es/components/walletCard/Guest/index.d.ts +0 -4
  101. package/es/components/walletCard/Guide/index.d.ts +0 -4
  102. package/es/components/walletCard/index.d.ts +0 -67
  103. package/es/locales/en-US.d.ts +0 -278
  104. package/es/locales/index.d.ts +0 -1
  105. package/es/locales/zh-CN.d.ts +0 -273
  106. package/es/locales/zh-TW.d.ts +0 -273
  107. package/lib/components/TimeResourceSelector/index.d.ts +0 -21
  108. package/lib/components/badge/index.d.ts +0 -8
  109. package/lib/components/buttonGroupPreview/index.d.ts +0 -19
  110. package/lib/components/cardPro/index.d.ts +0 -4
  111. package/lib/components/collapse/index.d.ts +0 -15
  112. package/lib/components/cropPhoto/index.d.ts +0 -3
  113. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +0 -8
  114. package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +0 -8
  115. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -33
  116. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +0 -5
  117. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
  118. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
  119. package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +0 -20
  120. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +0 -37
  121. package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -3
  122. package/lib/components/div/index.d.ts +0 -19
  123. package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -19
  124. package/lib/components/iconfont/index.d.ts +0 -8
  125. package/lib/components/login-and-register/index.d.ts +0 -82
  126. package/lib/components/page/index.d.ts +0 -6
  127. package/lib/components/pisell-config-provider/index.d.ts +0 -12
  128. package/lib/components/pisellAnchor/index.d.ts +0 -23
  129. package/lib/components/pisellAvatar/index.d.ts +0 -19
  130. package/lib/components/pisellCard/index.d.ts +0 -20
  131. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +0 -16
  132. package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
  133. package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -24
  134. package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
  135. package/lib/components/pisellDraggable/index.d.ts +0 -35
  136. package/lib/components/pisellDropSort/PisellDropSort.d.ts +0 -5
  137. package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +0 -26
  138. package/lib/components/pisellDropSort/types.d.ts +0 -58
  139. package/lib/components/pisellDropdown/index.d.ts +0 -20
  140. package/lib/components/pisellEmpty/index.d.ts +0 -19
  141. package/lib/components/pisellHeaderProgressBar/index.d.ts +0 -29
  142. package/lib/components/pisellImageCarousels/index.d.ts +0 -18
  143. package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +0 -4
  144. package/lib/components/pisellInformationEntry/index.d.ts +0 -33
  145. package/lib/components/pisellList01/index.d.ts +0 -17
  146. package/lib/components/pisellMenu/PisellMenu.d.ts +0 -11
  147. package/lib/components/pisellMenu/types.d.ts +0 -27
  148. package/lib/components/pisellNavigationMenu/types.d.ts +0 -85
  149. package/lib/components/pisellQrcode/index.d.ts +0 -10
  150. package/lib/components/pisellSectionHeaders/index.d.ts +0 -21
  151. package/lib/components/pisellStatisticList/index.d.ts +0 -21
  152. package/lib/components/productCard/components/Action/index.d.ts +0 -4
  153. package/lib/components/productCard/components/Divider/index.d.ts +0 -4
  154. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
  155. package/lib/components/productCard/components/MultiDay/utils.d.ts +0 -14
  156. package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -10
  157. package/lib/components/productCard/components/Time/index.d.ts +0 -4
  158. package/lib/components/section-footers/index.d.ts +0 -9
  159. package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
  160. package/lib/components/tabs/index.d.ts +0 -16
  161. package/lib/components/walletCard/Guest/index.d.ts +0 -4
  162. package/lib/components/walletCard/Guide/index.d.ts +0 -4
  163. package/lib/components/walletCard/index.d.ts +0 -67
  164. package/lib/locales/en-US.d.ts +0 -278
  165. package/lib/locales/index.d.ts +0 -1
  166. package/lib/locales/zh-CN.d.ts +0 -273
  167. package/lib/locales/zh-TW.d.ts +0 -273
@@ -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 | JSX.Element | React.ReactFragment | (() => 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 | JSX.Element | React.ReactFragment | (() => 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;
@@ -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;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import '../../index.less';
3
+ declare const Warning: React.FC<{
4
+ errorMessage: string | Array<string>;
5
+ osWarnTips: Array<string>;
6
+ }>;
7
+ export default Warning;
@@ -0,0 +1,48 @@
1
+ import React, { useMemo } from 'react';
2
+ import { locales } from '@pisell/utils';
3
+ import { Alert } from 'antd';
4
+ import "../../index.less";
5
+ var Warning = function Warning(_ref) {
6
+ var errorMessage = _ref.errorMessage,
7
+ osWarnTips = _ref.osWarnTips;
8
+ /**
9
+ * @title: 错误提示列表
10
+ * @description: 错误提示列表
11
+ * @param {*} useMemo
12
+ * @return {*}
13
+ * @Author: WangHan
14
+ * @Date: 2025-07-23 10:10
15
+ */
16
+ var errorLists = useMemo(function () {
17
+ if (errorMessage) {
18
+ // 如果errorMessage是数组,则返回数组
19
+ if (Array.isArray(errorMessage)) {
20
+ return errorMessage;
21
+ }
22
+
23
+ // 如果errorMessage是字符串,则返回字符串
24
+ if (typeof errorMessage === 'string') {
25
+ return [errorMessage];
26
+ }
27
+ }
28
+ if ((osWarnTips === null || osWarnTips === void 0 ? void 0 : osWarnTips.length) > 0) {
29
+ return osWarnTips.map(function (item) {
30
+ return locales.getText(item);
31
+ });
32
+ }
33
+ return [];
34
+ }, [errorMessage, osWarnTips]);
35
+ if ((errorLists === null || errorLists === void 0 ? void 0 : errorLists.length) === 0) {
36
+ return /*#__PURE__*/React.createElement(React.Fragment, null);
37
+ }
38
+ return /*#__PURE__*/React.createElement(React.Fragment, null, errorLists.map(function (item, index) {
39
+ return /*#__PURE__*/React.createElement(Alert, {
40
+ key: index,
41
+ message: item,
42
+ type: "warning",
43
+ showIcon: true,
44
+ className: "pisell-lowcode-product-card-error"
45
+ });
46
+ }));
47
+ };
48
+ export default Warning;
@@ -10,7 +10,6 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
10
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
11
11
  import React, { useMemo, useRef } from 'react';
12
12
  import classNames from 'classnames';
13
- import { Alert } from 'antd';
14
13
  import { locales } from '@pisell/utils';
15
14
  import CardPro from "../cardPro";
16
15
  import Header from "./components/Header";
@@ -26,6 +25,7 @@ import UseOpenNote from "./hooks/useOpenNote";
26
25
  import localeTexts from "./locales";
27
26
  import { defaultValue } from "./status";
28
27
  import useEngineContext from "../../hooks/useEngineContext";
28
+ import Warning from "./components/Warning";
29
29
  import "./index.less";
30
30
  var ProductCard = function ProductCard(props) {
31
31
  var _utils$storage, _dataSource$items;
@@ -64,7 +64,9 @@ var ProductCard = function ProductCard(props) {
64
64
  isShowAction = dataSource.isShowAction,
65
65
  actionText = dataSource.actionText,
66
66
  errorMessage = dataSource.errorMessage,
67
- isNormalProduct = dataSource.isNormalProduct;
67
+ isNormalProduct = dataSource.isNormalProduct,
68
+ _dataSource$osWarnTip = dataSource.osWarnTips,
69
+ osWarnTips = _dataSource$osWarnTip === void 0 ? [] : _dataSource$osWarnTip;
68
70
 
69
71
  /**
70
72
  * @title: 显示图片
@@ -159,12 +161,10 @@ var ProductCard = function ProductCard(props) {
159
161
  onAction: function onAction() {
160
162
  return _onAction === null || _onAction === void 0 ? void 0 : _onAction(dataSource);
161
163
  }
162
- }) : null, errorMessage ? /*#__PURE__*/React.createElement(Alert, {
163
- message: errorMessage,
164
- type: "warning",
165
- showIcon: true,
166
- className: "pisell-lowcode-product-card-error"
167
- }) : null), /*#__PURE__*/React.createElement(UseOpenNote, {
164
+ }) : null, /*#__PURE__*/React.createElement(Warning, {
165
+ errorMessage: errorMessage,
166
+ osWarnTips: osWarnTips
167
+ })), /*#__PURE__*/React.createElement(UseOpenNote, {
168
168
  ref: useOpenNoteRef,
169
169
  onNoteChange: function onNoteChange(e) {
170
170
  onNote === null || onNote === void 0 || onNote(_objectSpread(_objectSpread({}, dataSource), {}, {
@@ -24,6 +24,7 @@ declare const _default: {
24
24
  'pisell2.product.card.add.holder.modal.clear': string;
25
25
  'pisell2.product.card.add.holder.modal.apply': string;
26
26
  'pisell2.product.card.add.holder.modal.add': string;
27
+ 'pisell2.product.card.closing-soon.warning': string;
27
28
  };
28
29
  'zh-CN': {
29
30
  'pisell2.product.card.edit': string;
@@ -50,6 +51,7 @@ declare const _default: {
50
51
  'pisell2.product.card.add.holder.modal.clear': string;
51
52
  'pisell2.product.card.add.holder.modal.apply': string;
52
53
  'pisell2.product.card.add.holder.modal.add': string;
54
+ 'pisell2.product.card.closing-soon.warning': string;
53
55
  };
54
56
  'zh-HK': {
55
57
  'pisell2.product.card.edit': string;
@@ -76,6 +78,7 @@ declare const _default: {
76
78
  'pisell2.product.card.add.holder.modal.clear': string;
77
79
  'pisell2.product.card.add.holder.modal.apply': string;
78
80
  'pisell2.product.card.add.holder.modal.add': string;
81
+ 'pisell2.product.card.closing-soon.warning': string;
79
82
  };
80
83
  };
81
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
  };
@@ -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
  };
@@ -79,5 +79,6 @@ export declare type ProductCardTypes = {
79
79
  onLike?: (val: any) => void;
80
80
  onCard?: (val: any) => void;
81
81
  onChangeResource?: (val: any) => void;
82
+ osWarnTips?: Array<string>;
82
83
  [key: string]: any;
83
84
  };
@@ -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;
@@ -198,12 +198,12 @@ export declare const fieldList: ({
198
198
  field_icon: string;
199
199
  field_name: string;
200
200
  field_type: string;
201
- default_value: boolean;
201
+ default_value: string;
202
202
  } | {
203
203
  field_icon: string;
204
204
  field_name: string;
205
205
  field_type: string;
206
- default_value: string;
206
+ default_value: boolean;
207
207
  } | {
208
208
  field_icon: string;
209
209
  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;
@@ -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" | "view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting")[];
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 {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { GridViewProps } from '../types';
2
3
  declare const View: (props: GridViewProps & {
3
4
  setTableSetting: (values: Record<string, any>) => void;
@@ -1,4 +1,4 @@
1
1
  export declare const isBrowser: boolean;
2
- export declare const getCssNumber: (val: string | number) => string;
2
+ export declare const getCssNumber: (val: string | number) => string | number;
3
3
  export declare function uuid(): string;
4
4
  export * from './mergeWith';
@@ -1 +1 @@
1
- export declare const isMobile: () => boolean;
1
+ export declare const isMobile: () => any;
@@ -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 | JSX.Element | React.ReactFragment | (() => 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 | JSX.Element | React.ReactFragment | (() => 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;
@@ -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;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import '../../index.less';
3
+ declare const Warning: React.FC<{
4
+ errorMessage: string | Array<string>;
5
+ osWarnTips: Array<string>;
6
+ }>;
7
+ export default Warning;
@@ -0,0 +1,68 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/productCard/components/Warning/index.tsx
30
+ var Warning_exports = {};
31
+ __export(Warning_exports, {
32
+ default: () => Warning_default
33
+ });
34
+ module.exports = __toCommonJS(Warning_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_utils = require("@pisell/utils");
37
+ var import_antd = require("antd");
38
+ var import__ = require("../../index.less");
39
+ var Warning = ({ errorMessage, osWarnTips }) => {
40
+ const errorLists = (0, import_react.useMemo)(() => {
41
+ if (errorMessage) {
42
+ if (Array.isArray(errorMessage)) {
43
+ return errorMessage;
44
+ }
45
+ if (typeof errorMessage === "string") {
46
+ return [errorMessage];
47
+ }
48
+ }
49
+ if ((osWarnTips == null ? void 0 : osWarnTips.length) > 0) {
50
+ return osWarnTips.map((item) => import_utils.locales.getText(item));
51
+ }
52
+ return [];
53
+ }, [errorMessage, osWarnTips]);
54
+ if ((errorLists == null ? void 0 : errorLists.length) === 0) {
55
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null);
56
+ }
57
+ return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, errorLists.map((item, index) => /* @__PURE__ */ import_react.default.createElement(
58
+ import_antd.Alert,
59
+ {
60
+ key: index,
61
+ message: item,
62
+ type: "warning",
63
+ showIcon: true,
64
+ className: "pisell-lowcode-product-card-error"
65
+ }
66
+ )));
67
+ };
68
+ var Warning_default = Warning;
@@ -34,7 +34,6 @@ __export(productCard_exports, {
34
34
  module.exports = __toCommonJS(productCard_exports);
35
35
  var import_react = __toESM(require("react"));
36
36
  var import_classnames = __toESM(require("classnames"));
37
- var import_antd = require("antd");
38
37
  var import_utils = require("@pisell/utils");
39
38
  var import_cardPro = __toESM(require("../cardPro"));
40
39
  var import_Header = __toESM(require("./components/Header"));
@@ -50,6 +49,7 @@ var import_useOpenNote = __toESM(require("./hooks/useOpenNote"));
50
49
  var import_locales = __toESM(require("./locales"));
51
50
  var import_status = require("./status");
52
51
  var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
52
+ var import_Warning = __toESM(require("./components/Warning"));
53
53
  var import_index = require("./index.less");
54
54
  var ProductCard = (props) => {
55
55
  var _a, _b;
@@ -84,7 +84,8 @@ var ProductCard = (props) => {
84
84
  isShowAction,
85
85
  actionText,
86
86
  errorMessage,
87
- isNormalProduct
87
+ isNormalProduct,
88
+ osWarnTips = []
88
89
  } = dataSource;
89
90
  const showImage = (0, import_react.useMemo)(() => {
90
91
  return isShowImage && image;
@@ -180,15 +181,7 @@ var ProductCard = (props) => {
180
181
  onAction: () => onAction == null ? void 0 : onAction(dataSource)
181
182
  }
182
183
  ) : null,
183
- errorMessage ? /* @__PURE__ */ import_react.default.createElement(
184
- import_antd.Alert,
185
- {
186
- message: errorMessage,
187
- type: "warning",
188
- showIcon: true,
189
- className: "pisell-lowcode-product-card-error"
190
- }
191
- ) : null
184
+ /* @__PURE__ */ import_react.default.createElement(import_Warning.default, { errorMessage, osWarnTips })
192
185
  ), /* @__PURE__ */ import_react.default.createElement(
193
186
  import_useOpenNote.default,
194
187
  {
@@ -24,6 +24,7 @@ declare const _default: {
24
24
  'pisell2.product.card.add.holder.modal.clear': string;
25
25
  'pisell2.product.card.add.holder.modal.apply': string;
26
26
  'pisell2.product.card.add.holder.modal.add': string;
27
+ 'pisell2.product.card.closing-soon.warning': string;
27
28
  };
28
29
  'zh-CN': {
29
30
  'pisell2.product.card.edit': string;
@@ -50,6 +51,7 @@ declare const _default: {
50
51
  'pisell2.product.card.add.holder.modal.clear': string;
51
52
  'pisell2.product.card.add.holder.modal.apply': string;
52
53
  'pisell2.product.card.add.holder.modal.add': string;
54
+ 'pisell2.product.card.closing-soon.warning': string;
53
55
  };
54
56
  'zh-HK': {
55
57
  'pisell2.product.card.edit': string;
@@ -76,6 +78,7 @@ declare const _default: {
76
78
  'pisell2.product.card.add.holder.modal.clear': string;
77
79
  'pisell2.product.card.add.holder.modal.apply': string;
78
80
  'pisell2.product.card.add.holder.modal.add': string;
81
+ 'pisell2.product.card.closing-soon.warning': string;
79
82
  };
80
83
  };
81
84
  export default _default;
@@ -47,7 +47,8 @@ var locales_default = {
47
47
  "pisell2.product.card.add.holder.modal.cancel": "Cancel",
48
48
  "pisell2.product.card.add.holder.modal.clear": "Clear",
49
49
  "pisell2.product.card.add.holder.modal.apply": "Apply",
50
- "pisell2.product.card.add.holder.modal.add": "Add New"
50
+ "pisell2.product.card.add.holder.modal.add": "Add New",
51
+ "pisell2.product.card.closing-soon.warning": "The venue will close soon. Please make sure you have enough time for your visit."
51
52
  },
52
53
  "zh-CN": {
53
54
  "pisell2.product.card.edit": "编辑",
@@ -73,7 +74,8 @@ var locales_default = {
73
74
  "pisell2.product.card.add.holder.modal.cancel": "取消",
74
75
  "pisell2.product.card.add.holder.modal.clear": "清除",
75
76
  "pisell2.product.card.add.holder.modal.apply": "应用",
76
- "pisell2.product.card.add.holder.modal.add": "添加"
77
+ "pisell2.product.card.add.holder.modal.add": "添加",
78
+ "pisell2.product.card.closing-soon.warning": "当前入场时间临近营业结束,请确认是否仍要购买。"
77
79
  },
78
80
  "zh-HK": {
79
81
  "pisell2.product.card.edit": "編輯",
@@ -99,6 +101,7 @@ var locales_default = {
99
101
  "pisell2.product.card.add.holder.modal.cancel": "取消",
100
102
  "pisell2.product.card.add.holder.modal.clear": "清除",
101
103
  "pisell2.product.card.add.holder.modal.apply": "應用",
102
- "pisell2.product.card.add.holder.modal.add": "添加"
104
+ "pisell2.product.card.add.holder.modal.add": "添加",
105
+ "pisell2.product.card.closing-soon.warning": "當前入場時間臨近營業結束,請確認是否仍要購買。"
103
106
  }
104
107
  };
@@ -61,7 +61,9 @@ var defaultValue = {
61
61
  isShowPackageNote: true,
62
62
  isShowEditProduct: false,
63
63
  locale: "en-US",
64
- symbol: "$"
64
+ symbol: "$",
65
+ // os层自定义错误提示
66
+ osWarnTips: []
65
67
  };
66
68
  // Annotate the CommonJS export names for ESM import in node:
67
69
  0 && (module.exports = {
@@ -79,5 +79,6 @@ export declare type ProductCardTypes = {
79
79
  onLike?: (val: any) => void;
80
80
  onCard?: (val: any) => void;
81
81
  onChangeResource?: (val: any) => void;
82
+ osWarnTips?: Array<string>;
82
83
  [key: string]: any;
83
84
  };
@@ -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;
@@ -198,12 +198,12 @@ export declare const fieldList: ({
198
198
  field_icon: string;
199
199
  field_name: string;
200
200
  field_type: string;
201
- default_value: boolean;
201
+ default_value: string;
202
202
  } | {
203
203
  field_icon: string;
204
204
  field_name: string;
205
205
  field_type: string;
206
- default_value: string;
206
+ default_value: boolean;
207
207
  } | {
208
208
  field_icon: string;
209
209
  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;
@@ -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" | "view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting")[];
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 {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { GridViewProps } from '../types';
2
3
  declare const View: (props: GridViewProps & {
3
4
  setTableSetting: (values: Record<string, any>) => void;
@@ -1,4 +1,4 @@
1
1
  export declare const isBrowser: boolean;
2
- export declare const getCssNumber: (val: string | number) => string;
2
+ export declare const getCssNumber: (val: string | number) => string | number;
3
3
  export declare function uuid(): string;
4
4
  export * from './mergeWith';
@@ -1 +1 @@
1
- export declare const isMobile: () => boolean;
1
+ export declare const isMobile: () => any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "3.3.44",
3
+ "version": "3.3.47",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- export interface TimeSlot {
4
- value: string;
5
- label: string;
6
- time: string;
7
- remainingCount: number;
8
- disabled?: boolean;
9
- }
10
- export interface TimeResourceSelectorProps {
11
- timeSlots?: TimeSlot[];
12
- multiple?: boolean;
13
- showUnavailable?: boolean;
14
- defaultExpanded?: boolean;
15
- defaultSelectFirst?: boolean;
16
- onChange?: (values: string | string[]) => void;
17
- className?: string;
18
- style?: React.CSSProperties;
19
- }
20
- declare const TimeResourceSelector: React.FC<TimeResourceSelectorProps>;
21
- export default TimeResourceSelector;