@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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.js +24 -24
- package/build/lowcode/view.js +25 -25
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Warning/index.d.ts +7 -0
- package/es/components/productCard/components/Warning/index.js +48 -0
- package/es/components/productCard/index.js +8 -8
- package/es/components/productCard/locales.d.ts +3 -0
- package/es/components/productCard/locales.js +6 -3
- package/es/components/productCard/status.js +3 -1
- package/es/components/productCard/types.d.ts +1 -0
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/fields/index.d.ts +2 -2
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/View/index.d.ts +1 -0
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Warning/index.d.ts +7 -0
- package/lib/components/productCard/components/Warning/index.js +68 -0
- package/lib/components/productCard/index.js +4 -11
- package/lib/components/productCard/locales.d.ts +3 -0
- package/lib/components/productCard/locales.js +6 -3
- package/lib/components/productCard/status.js +3 -1
- package/lib/components/productCard/types.d.ts +1 -0
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/fields/index.d.ts +2 -2
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/View/index.d.ts +1 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/package.json +1 -1
- package/es/components/TimeResourceSelector/index.d.ts +0 -21
- package/es/components/badge/index.d.ts +0 -8
- package/es/components/buttonGroupPreview/index.d.ts +0 -19
- package/es/components/cardPro/index.d.ts +0 -4
- package/es/components/collapse/index.d.ts +0 -15
- package/es/components/cropPhoto/index.d.ts +0 -3
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +0 -8
- package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +0 -8
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -33
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +0 -5
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +0 -20
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +0 -37
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -3
- package/es/components/div/index.d.ts +0 -19
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +0 -19
- package/es/components/iconfont/index.d.ts +0 -8
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/page/index.d.ts +0 -6
- package/es/components/pisell-config-provider/index.d.ts +0 -12
- package/es/components/pisellAnchor/index.d.ts +0 -23
- package/es/components/pisellAvatar/index.d.ts +0 -19
- package/es/components/pisellCard/index.d.ts +0 -20
- package/es/components/pisellCustomCheckboxGroup/index.d.ts +0 -16
- package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -24
- package/es/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
- package/es/components/pisellDraggable/index.d.ts +0 -35
- package/es/components/pisellDropSort/PisellDropSort.d.ts +0 -5
- package/es/components/pisellDropSort/components/SortableItem/index.d.ts +0 -26
- package/es/components/pisellDropSort/types.d.ts +0 -58
- package/es/components/pisellDropdown/index.d.ts +0 -20
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellHeaderProgressBar/index.d.ts +0 -29
- package/es/components/pisellImageCarousels/index.d.ts +0 -18
- package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +0 -4
- package/es/components/pisellInformationEntry/index.d.ts +0 -33
- package/es/components/pisellList01/index.d.ts +0 -17
- package/es/components/pisellMenu/PisellMenu.d.ts +0 -11
- package/es/components/pisellMenu/types.d.ts +0 -27
- package/es/components/pisellNavigationMenu/types.d.ts +0 -85
- package/es/components/pisellQrcode/index.d.ts +0 -10
- package/es/components/pisellSectionHeaders/index.d.ts +0 -21
- package/es/components/pisellStatisticList/index.d.ts +0 -21
- package/es/components/productCard/components/Action/index.d.ts +0 -4
- package/es/components/productCard/components/Divider/index.d.ts +0 -4
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/es/components/productCard/components/MultiDay/utils.d.ts +0 -14
- package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -10
- package/es/components/productCard/components/Time/index.d.ts +0 -4
- package/es/components/section-footers/index.d.ts +0 -9
- package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
- package/es/components/tabs/index.d.ts +0 -16
- package/es/components/walletCard/Guest/index.d.ts +0 -4
- package/es/components/walletCard/Guide/index.d.ts +0 -4
- package/es/components/walletCard/index.d.ts +0 -67
- package/es/locales/en-US.d.ts +0 -278
- package/es/locales/index.d.ts +0 -1
- package/es/locales/zh-CN.d.ts +0 -273
- package/es/locales/zh-TW.d.ts +0 -273
- package/lib/components/TimeResourceSelector/index.d.ts +0 -21
- package/lib/components/badge/index.d.ts +0 -8
- package/lib/components/buttonGroupPreview/index.d.ts +0 -19
- package/lib/components/cardPro/index.d.ts +0 -4
- package/lib/components/collapse/index.d.ts +0 -15
- package/lib/components/cropPhoto/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +0 -8
- package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +0 -8
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -33
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +0 -5
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -24
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -24
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +0 -20
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +0 -37
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +0 -3
- package/lib/components/div/index.d.ts +0 -19
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +0 -19
- package/lib/components/iconfont/index.d.ts +0 -8
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/page/index.d.ts +0 -6
- package/lib/components/pisell-config-provider/index.d.ts +0 -12
- package/lib/components/pisellAnchor/index.d.ts +0 -23
- package/lib/components/pisellAvatar/index.d.ts +0 -19
- package/lib/components/pisellCard/index.d.ts +0 -20
- package/lib/components/pisellCustomCheckboxGroup/index.d.ts +0 -16
- package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -24
- package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
- package/lib/components/pisellDraggable/index.d.ts +0 -35
- package/lib/components/pisellDropSort/PisellDropSort.d.ts +0 -5
- package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +0 -26
- package/lib/components/pisellDropSort/types.d.ts +0 -58
- package/lib/components/pisellDropdown/index.d.ts +0 -20
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellHeaderProgressBar/index.d.ts +0 -29
- package/lib/components/pisellImageCarousels/index.d.ts +0 -18
- package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +0 -4
- package/lib/components/pisellInformationEntry/index.d.ts +0 -33
- package/lib/components/pisellList01/index.d.ts +0 -17
- package/lib/components/pisellMenu/PisellMenu.d.ts +0 -11
- package/lib/components/pisellMenu/types.d.ts +0 -27
- package/lib/components/pisellNavigationMenu/types.d.ts +0 -85
- package/lib/components/pisellQrcode/index.d.ts +0 -10
- package/lib/components/pisellSectionHeaders/index.d.ts +0 -21
- package/lib/components/pisellStatisticList/index.d.ts +0 -21
- package/lib/components/productCard/components/Action/index.d.ts +0 -4
- package/lib/components/productCard/components/Divider/index.d.ts +0 -4
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +0 -4
- package/lib/components/productCard/components/MultiDay/utils.d.ts +0 -14
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -10
- package/lib/components/productCard/components/Time/index.d.ts +0 -4
- package/lib/components/section-footers/index.d.ts +0 -9
- package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +0 -9
- package/lib/components/tabs/index.d.ts +0 -16
- package/lib/components/walletCard/Guest/index.d.ts +0 -4
- package/lib/components/walletCard/Guide/index.d.ts +0 -4
- package/lib/components/walletCard/index.d.ts +0 -67
- package/lib/locales/en-US.d.ts +0 -278
- package/lib/locales/index.d.ts +0 -1
- package/lib/locales/zh-CN.d.ts +0 -273
- 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 |
|
|
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 |
|
|
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: "
|
|
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: "
|
|
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) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -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,
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
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
|
};
|
|
@@ -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:
|
|
201
|
+
default_value: string;
|
|
202
202
|
} | {
|
|
203
203
|
field_icon: string;
|
|
204
204
|
field_name: string;
|
|
205
205
|
field_type: string;
|
|
206
|
-
default_value:
|
|
206
|
+
default_value: boolean;
|
|
207
207
|
} | {
|
|
208
208
|
field_icon: string;
|
|
209
209
|
field_name: string;
|
|
@@ -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
|
-
}) => ("
|
|
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 {};
|
package/es/utils/index.d.ts
CHANGED
package/es/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
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 |
|
|
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 |
|
|
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: "
|
|
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: "
|
|
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) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -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
|
-
|
|
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 = {
|
|
@@ -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:
|
|
201
|
+
default_value: string;
|
|
202
202
|
} | {
|
|
203
203
|
field_icon: string;
|
|
204
204
|
field_name: string;
|
|
205
205
|
field_type: string;
|
|
206
|
-
default_value:
|
|
206
|
+
default_value: boolean;
|
|
207
207
|
} | {
|
|
208
208
|
field_icon: string;
|
|
209
209
|
field_name: string;
|
|
@@ -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
|
-
}) => ("
|
|
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 {};
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => any;
|
package/package.json
CHANGED
|
@@ -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;
|