@pisell/materials 3.2.26 → 3.2.28
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 +2 -2
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +17 -17
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -18
- package/es/components/productCard/components/MultiDay/index.d.ts +0 -1
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
- package/es/components/productCard/components/Time/components/SelectHolder/index.js +92 -0
- package/es/components/productCard/components/Time/components/SelectHolder/index.less +10 -0
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +1 -2
- package/es/components/productCard/components/Time/components/SelectResource/index.js +20 -3
- package/es/components/productCard/components/Time/index.d.ts +1 -2
- package/es/components/productCard/components/Time/index.js +78 -26
- package/es/components/productCard/components/Time/index.less +12 -0
- package/es/components/productCard/index.js +7 -2
- package/es/components/productCard/utils.js +2 -2
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/productCard/components/MultiDay/index.d.ts +0 -1
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/SelectHolder/index.js +90 -0
- package/lib/components/productCard/components/Time/components/SelectHolder/index.less +10 -0
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +1 -2
- package/lib/components/productCard/components/Time/components/SelectResource/index.js +3 -2
- package/lib/components/productCard/components/Time/index.d.ts +1 -2
- package/lib/components/productCard/components/Time/index.js +78 -16
- package/lib/components/productCard/components/Time/index.less +12 -0
- package/lib/components/productCard/index.js +6 -1
- package/lib/components/productCard/utils.js +2 -2
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/product-card/meta.ts +25 -0
- package/lowcode/product-card/snippets.ts +14 -1
- package/package.json +1 -1
- package/es/components/appVersionControl/index.d.ts +0 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -97
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/login-and-register/index.d.ts +0 -82
- package/es/components/pisell-config-provider/index.d.ts +0 -12
- package/es/components/pisellCardList/index.d.ts +0 -43
- package/es/components/pisellCheckboxGroup/index.d.ts +0 -34
- package/es/components/pisellEmpty/index.d.ts +0 -19
- package/es/components/pisellInformationEntry/index.d.ts +0 -31
- package/es/components/pisellWalletPassCard/index.d.ts +0 -55
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
- package/es/components/table/Gallery/index.d.ts +0 -5
- package/es/components/table/Table/index.d.ts +0 -4
- package/es/components/table/Table/utils.d.ts +0 -161
- package/es/components/table/hooks/useTableSetting.d.ts +0 -22
- package/es/components/table/hooks/useTransDataSource.d.ts +0 -11
- package/es/components/table/types.d.ts +0 -251
- package/es/components/versionModal/index.d.ts +0 -23
- package/es/index.d.ts +0 -141
- package/es/locales/en-US.d.ts +0 -266
- package/es/locales/zh-CN.d.ts +0 -261
- package/es/locales/zh-TW.d.ts +0 -261
- package/lib/components/appVersionControl/index.d.ts +0 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +0 -97
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/login-and-register/index.d.ts +0 -82
- package/lib/components/pisell-config-provider/index.d.ts +0 -12
- package/lib/components/pisellCardList/index.d.ts +0 -43
- package/lib/components/pisellCheckboxGroup/index.d.ts +0 -34
- package/lib/components/pisellEmpty/index.d.ts +0 -19
- package/lib/components/pisellInformationEntry/index.d.ts +0 -31
- package/lib/components/pisellWalletPassCard/index.d.ts +0 -55
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +0 -14
- package/lib/components/table/Gallery/index.d.ts +0 -5
- package/lib/components/table/Table/index.d.ts +0 -4
- package/lib/components/table/Table/utils.d.ts +0 -161
- package/lib/components/table/hooks/useTableSetting.d.ts +0 -22
- package/lib/components/table/hooks/useTransDataSource.d.ts +0 -11
- package/lib/components/table/types.d.ts +0 -251
- package/lib/components/versionModal/index.d.ts +0 -23
- package/lib/index.d.ts +0 -141
- package/lib/locales/en-US.d.ts +0 -266
- package/lib/locales/zh-CN.d.ts +0 -261
- package/lib/locales/zh-TW.d.ts +0 -261
|
@@ -37,6 +37,7 @@ var import_utils = require("../../utils");
|
|
|
37
37
|
var import_Divider = __toESM(require("../Divider"));
|
|
38
38
|
var import_Like = __toESM(require("./components/Like"));
|
|
39
39
|
var import_SelectResource = __toESM(require("./components/SelectResource"));
|
|
40
|
+
var import_SelectHolder = __toESM(require("./components/SelectHolder"));
|
|
40
41
|
var import_index = require("./index.less");
|
|
41
42
|
var prefix = "pisell-lowcode-";
|
|
42
43
|
var Time = ({
|
|
@@ -44,7 +45,11 @@ var Time = ({
|
|
|
44
45
|
isShowHolder,
|
|
45
46
|
onLike,
|
|
46
47
|
isShowChangeResource,
|
|
47
|
-
changeResource
|
|
48
|
+
changeResource,
|
|
49
|
+
changeHolder,
|
|
50
|
+
isShowChangeHolder,
|
|
51
|
+
holderMode,
|
|
52
|
+
onAddHolder
|
|
48
53
|
}) => {
|
|
49
54
|
const {
|
|
50
55
|
start_date,
|
|
@@ -54,38 +59,95 @@ var Time = ({
|
|
|
54
59
|
relation_form_name,
|
|
55
60
|
like_status,
|
|
56
61
|
resources,
|
|
57
|
-
is_hide_like
|
|
62
|
+
is_hide_like,
|
|
63
|
+
holder_id,
|
|
64
|
+
holders,
|
|
65
|
+
// 多个资源数据
|
|
66
|
+
multiResources,
|
|
67
|
+
isShowAddHolderButton
|
|
58
68
|
} = item;
|
|
59
69
|
const isShow = (0, import_react.useMemo)(() => {
|
|
60
70
|
return start_date && end_date || isShowHolder && holder_title || resource_id || relation_form_name || isShowChangeResource;
|
|
61
71
|
}, [start_date, isShowHolder, holder_title, resource_id]);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
72
|
+
const holderCom = (0, import_react.useMemo)(() => {
|
|
73
|
+
if (!isShowHolder) return null;
|
|
74
|
+
if (isShowChangeHolder) {
|
|
75
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
76
|
+
import_SelectHolder.default,
|
|
77
|
+
{
|
|
78
|
+
lists: holders,
|
|
79
|
+
value: holder_id,
|
|
80
|
+
onChange: changeHolder,
|
|
81
|
+
holderMode,
|
|
82
|
+
isShowAddHolderButton: true,
|
|
83
|
+
onAddHolder
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
if (holder_title) {
|
|
88
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-holder-wrap` }, holder_title);
|
|
89
|
+
}
|
|
90
|
+
}, [
|
|
91
|
+
isShowHolder,
|
|
92
|
+
holder_id,
|
|
93
|
+
holder_title,
|
|
94
|
+
holderMode,
|
|
95
|
+
holders,
|
|
96
|
+
isShowAddHolderButton
|
|
97
|
+
]);
|
|
98
|
+
const likeCom = (0, import_react.useCallback)((status, item2) => {
|
|
99
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
69
100
|
import_Like.default,
|
|
70
101
|
{
|
|
71
102
|
style: { marginRight: 4 },
|
|
72
|
-
status
|
|
103
|
+
status,
|
|
73
104
|
onLike: (e) => {
|
|
74
105
|
onLike({
|
|
75
|
-
...
|
|
106
|
+
...item2,
|
|
76
107
|
like_status: e
|
|
77
108
|
});
|
|
78
109
|
}
|
|
79
110
|
}
|
|
80
|
-
)
|
|
81
|
-
|
|
111
|
+
);
|
|
112
|
+
}, []);
|
|
113
|
+
const resourceCom = (0, import_react.useCallback)((item2) => {
|
|
114
|
+
if (!isShowChangeResource) {
|
|
115
|
+
return item2 == null ? void 0 : item2.name;
|
|
116
|
+
}
|
|
117
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
82
118
|
import_SelectResource.default,
|
|
83
119
|
{
|
|
84
|
-
lists:
|
|
85
|
-
value:
|
|
120
|
+
lists: item2 == null ? void 0 : item2.lists,
|
|
121
|
+
value: item2 == null ? void 0 : item2.id,
|
|
122
|
+
allowClear: item2 == null ? void 0 : item2.allowClear,
|
|
86
123
|
onChange: changeResource
|
|
87
124
|
}
|
|
88
|
-
)
|
|
125
|
+
);
|
|
126
|
+
}, []);
|
|
127
|
+
const likeAndResourceCom = (0, import_react.useMemo)(() => {
|
|
128
|
+
if ((multiResources == null ? void 0 : multiResources.length) > 0) {
|
|
129
|
+
return multiResources.map((resourceItem) => {
|
|
130
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: resourceItem == null ? void 0 : resourceItem.id }, (resourceItem == null ? void 0 : resourceItem.id) && !is_hide_like ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-card-like-wrap` }, likeCom(resourceItem == null ? void 0 : resourceItem.status, resourceItem)) : null, resourceCom(resourceItem));
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, resource_id && !is_hide_like ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-card-like-wrap` }, likeCom(like_status, item)) : null, resourceCom({
|
|
134
|
+
name: relation_form_name,
|
|
135
|
+
id: resource_id,
|
|
136
|
+
lists: resources
|
|
137
|
+
}));
|
|
138
|
+
}, [
|
|
139
|
+
multiResources,
|
|
140
|
+
resource_id,
|
|
141
|
+
resources,
|
|
142
|
+
relation_form_name,
|
|
143
|
+
is_hide_like
|
|
144
|
+
]);
|
|
145
|
+
return isShow ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_Divider.default, null), /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-time-wrap` }, start_date && end_date ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}product-date` }, (0, import_utils.getServiceTime)(item, start_date)) : null, holderCom, isShowChangeResource && (start_date && end_date || isShowHolder && holder_title) ? /* @__PURE__ */ import_react.default.createElement(import_Divider.default, { type: "inside" }) : null, likeAndResourceCom ? /* @__PURE__ */ import_react.default.createElement(
|
|
146
|
+
"div",
|
|
147
|
+
{
|
|
148
|
+
className: `${prefix}product-technician ${isShowChangeResource ? "pisell-lowcode-change-resource" : ""} ${(multiResources == null ? void 0 : multiResources.length) > 0 ? "pisell-lowcode-multi-resources" : ""}`
|
|
149
|
+
},
|
|
150
|
+
likeAndResourceCom
|
|
89
151
|
) : null)) : null;
|
|
90
152
|
};
|
|
91
153
|
var Time_default = Time;
|
|
@@ -33,6 +33,18 @@
|
|
|
33
33
|
align-items: center;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
+
&-multi-resources {
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
align-items: start !important;
|
|
39
|
+
> div {
|
|
40
|
+
flex: 1;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 10px;
|
|
44
|
+
width: 100%;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
36
48
|
&-product-card-like-wrap {
|
|
37
49
|
display: flex;
|
|
38
50
|
justify-content: center;
|
|
@@ -68,6 +68,7 @@ var ProductCard = (props) => {
|
|
|
68
68
|
onLike,
|
|
69
69
|
onCard,
|
|
70
70
|
onChangeResource,
|
|
71
|
+
onChangeHolder,
|
|
71
72
|
...other
|
|
72
73
|
} = props;
|
|
73
74
|
const useOpenNoteRef = (0, import_react.useRef)();
|
|
@@ -135,8 +136,12 @@ var ProductCard = (props) => {
|
|
|
135
136
|
item: dataSource,
|
|
136
137
|
isShowHolder,
|
|
137
138
|
isShowChangeResource: other == null ? void 0 : other.isShowChangeResource,
|
|
139
|
+
isShowChangeHolder: other == null ? void 0 : other.isShowChangeHolder,
|
|
140
|
+
holderMode: other == null ? void 0 : other.holderMode,
|
|
138
141
|
onLike: (item) => onLike == null ? void 0 : onLike(item),
|
|
139
|
-
changeResource: onChangeResource
|
|
142
|
+
changeResource: onChangeResource,
|
|
143
|
+
changeHolder: onChangeHolder,
|
|
144
|
+
onAddHolder: other == null ? void 0 : other.onAddHolder
|
|
140
145
|
}
|
|
141
146
|
),
|
|
142
147
|
/* @__PURE__ */ import_react.default.createElement(import_Packages.default, { item: dataSource, isShowPackageNote }),
|
|
@@ -80,8 +80,8 @@ var getServiceTime = (item, currentDate) => {
|
|
|
80
80
|
_format = isEn2 ? (_c = item == null ? void 0 : item.format) == null ? void 0 : _c[0] : (_d = item == null ? void 0 : item.format) == null ? void 0 : _d[1];
|
|
81
81
|
}
|
|
82
82
|
if (item == null ? void 0 : item.show_time) {
|
|
83
|
-
startDate = (0, import_dayjs.default)(`${item == null ? void 0 : item.start_date} ${item == null ? void 0 : item.start_time}`);
|
|
84
|
-
endDate = (0, import_dayjs.default)(`${item == null ? void 0 : item.end_date} ${item == null ? void 0 : item.end_time}`);
|
|
83
|
+
startDate = (0, import_dayjs.default)((item == null ? void 0 : item.start_time) ? `${item == null ? void 0 : item.start_date} ${item == null ? void 0 : item.start_time}` : startDate.format("YYYY-MM-DD HH:mm"));
|
|
84
|
+
endDate = (0, import_dayjs.default)((item == null ? void 0 : item.end_time) ? `${item == null ? void 0 : item.end_date} ${item == null ? void 0 : item.end_time}` : endDate.format("YYYY-MM-DD HH:mm"));
|
|
85
85
|
}
|
|
86
86
|
if ((item == null ? void 0 : item.duration_type) === "minutes") {
|
|
87
87
|
diffInDays = endDate.diff(startDate, "minute");
|
package/lib/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => boolean;
|
|
@@ -77,6 +77,31 @@ export default {
|
|
|
77
77
|
setter: "BoolSetter",
|
|
78
78
|
defaultValue: false,
|
|
79
79
|
},
|
|
80
|
+
{
|
|
81
|
+
name: "holderMode",
|
|
82
|
+
title: {
|
|
83
|
+
label: "holder 选择",
|
|
84
|
+
tip: "holderMode | holder 选择模式",
|
|
85
|
+
},
|
|
86
|
+
condition(target) {
|
|
87
|
+
return !!target.getProps().getPropValue("isShowChangeHolder");
|
|
88
|
+
},
|
|
89
|
+
setter: {
|
|
90
|
+
componentName: "RadioGroupSetter",
|
|
91
|
+
props: {
|
|
92
|
+
options: [
|
|
93
|
+
{
|
|
94
|
+
title: "单选",
|
|
95
|
+
value: "single",
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
title: "多选",
|
|
99
|
+
value: "multiple",
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
},
|
|
80
105
|
{
|
|
81
106
|
name: "isShowChangeResource",
|
|
82
107
|
title: { label: "更改资源", tip: "更改商品资源" },
|
|
@@ -11,12 +11,25 @@ export default [
|
|
|
11
11
|
num: 1,
|
|
12
12
|
price: 100,
|
|
13
13
|
total: 120,
|
|
14
|
-
symbol: '&'
|
|
14
|
+
symbol: '&',
|
|
15
|
+
isShowChangeResource: true,
|
|
16
|
+
resource_id: 3,
|
|
17
|
+
isShowChangeHolder: true,
|
|
18
|
+
holderMode: 'single',
|
|
19
|
+
holder_id: 2,
|
|
20
|
+
holders: [{
|
|
21
|
+
label: 'holder1',
|
|
22
|
+
id: 1
|
|
23
|
+
}, {
|
|
24
|
+
label: 'holder2',
|
|
25
|
+
id: 2
|
|
26
|
+
}]
|
|
15
27
|
},
|
|
16
28
|
isShowImage: true,
|
|
17
29
|
isShowHolder: true,
|
|
18
30
|
isShowNote: true,
|
|
19
31
|
isShowDelete: true,
|
|
32
|
+
holderMode: "single",
|
|
20
33
|
},
|
|
21
34
|
},
|
|
22
35
|
},
|
package/package.json
CHANGED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Drawer } from 'antd';
|
|
2
|
-
import { OperationItem } from '../type';
|
|
3
|
-
declare const useDrawerState: (operationContent?: {
|
|
4
|
-
[key: string]: import("react").ReactNode;
|
|
5
|
-
} | undefined) => {
|
|
6
|
-
drawerVisible: boolean;
|
|
7
|
-
setDrawerVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
8
|
-
openDrawer: (item: OperationItem) => void;
|
|
9
|
-
closeDrawer: () => void;
|
|
10
|
-
drawerContent: import("react").ReactNode;
|
|
11
|
-
Container: {
|
|
12
|
-
(props: import("../../../pisellModal").PisellModalProps): JSX.Element;
|
|
13
|
-
confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
14
|
-
destroy: () => void;
|
|
15
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
16
|
-
};
|
|
17
|
-
info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
18
|
-
destroy: () => void;
|
|
19
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
20
|
-
};
|
|
21
|
-
error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
22
|
-
destroy: () => void;
|
|
23
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
24
|
-
};
|
|
25
|
-
warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
|
|
26
|
-
warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
27
|
-
destroy: () => void;
|
|
28
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
29
|
-
};
|
|
30
|
-
success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
31
|
-
destroy: () => void;
|
|
32
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
33
|
-
};
|
|
34
|
-
Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
|
|
35
|
-
} | typeof Drawer;
|
|
36
|
-
containerProps: {};
|
|
37
|
-
};
|
|
38
|
-
export default useDrawerState;
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { DataSourceTableProps } from '../type';
|
|
3
|
-
import { OperationItem } from '../type';
|
|
4
|
-
interface UseTablePropsProps {
|
|
5
|
-
data: any;
|
|
6
|
-
originProps: DataSourceTableProps;
|
|
7
|
-
openDrawer: (type: OperationItem) => void;
|
|
8
|
-
closeDrawer: () => void;
|
|
9
|
-
refreshData: () => void;
|
|
10
|
-
handleFilterChange: (changedFields: any, allFields: any) => void;
|
|
11
|
-
tableRef: any;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* 处理table的props
|
|
15
|
-
* 转换title
|
|
16
|
-
* @param props
|
|
17
|
-
* @returns
|
|
18
|
-
*/
|
|
19
|
-
declare const useTableProps: (props: UseTablePropsProps) => {
|
|
20
|
-
title: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
21
|
-
pagination: {
|
|
22
|
-
total: number;
|
|
23
|
-
current: number;
|
|
24
|
-
pageSize: number;
|
|
25
|
-
size: string;
|
|
26
|
-
showSizeChanger: boolean;
|
|
27
|
-
};
|
|
28
|
-
columns: import("./useColumns").Column[];
|
|
29
|
-
subTitle: number | boolean | JSX.Element | React.ReactFragment | (() => React.ReactNode) | null | undefined;
|
|
30
|
-
buttons: any[] | null;
|
|
31
|
-
filter: JSX.Element | null;
|
|
32
|
-
onRow: (record: any) => any;
|
|
33
|
-
actionButtons: any[] | null;
|
|
34
|
-
titleButtons?: {
|
|
35
|
-
show: boolean;
|
|
36
|
-
maxCount: number;
|
|
37
|
-
items: OperationItem[];
|
|
38
|
-
} | undefined;
|
|
39
|
-
tableButtons?: {
|
|
40
|
-
show: boolean;
|
|
41
|
-
maxCount: number;
|
|
42
|
-
items: OperationItem[];
|
|
43
|
-
} | undefined;
|
|
44
|
-
operation?: {
|
|
45
|
-
show: boolean;
|
|
46
|
-
title: string; /**
|
|
47
|
-
* 处理table的props
|
|
48
|
-
* 转换title
|
|
49
|
-
* @param props
|
|
50
|
-
* @returns
|
|
51
|
-
*/
|
|
52
|
-
width: number;
|
|
53
|
-
align: "center" | "left" | "right";
|
|
54
|
-
fixed: false | "left" | "right";
|
|
55
|
-
type: "button" | "link";
|
|
56
|
-
items: OperationItem[];
|
|
57
|
-
} | undefined;
|
|
58
|
-
operationContent?: {
|
|
59
|
-
[key: string]: React.ReactNode;
|
|
60
|
-
} | undefined;
|
|
61
|
-
dataSource: import("../../provider/dataSource/DataSourceContext").DataSourceType;
|
|
62
|
-
search?: {
|
|
63
|
-
show: boolean;
|
|
64
|
-
placeholder: string;
|
|
65
|
-
} | undefined;
|
|
66
|
-
__designMode: string;
|
|
67
|
-
componentId: string;
|
|
68
|
-
clickToDetail?: {
|
|
69
|
-
show: boolean;
|
|
70
|
-
useCustomAction: boolean;
|
|
71
|
-
actionType: string;
|
|
72
|
-
openMode: "modal" | "drawer";
|
|
73
|
-
openContentSize: "small" | "large" | "middle";
|
|
74
|
-
openTitle: string;
|
|
75
|
-
key: string;
|
|
76
|
-
} | undefined;
|
|
77
|
-
filterBy?: Record<string, any> | undefined;
|
|
78
|
-
sortBy: string;
|
|
79
|
-
tabs?: {
|
|
80
|
-
show: boolean;
|
|
81
|
-
type: string;
|
|
82
|
-
items: {
|
|
83
|
-
name: string;
|
|
84
|
-
filterBy: Record<string, any>;
|
|
85
|
-
sortBy: string;
|
|
86
|
-
}[];
|
|
87
|
-
} | undefined;
|
|
88
|
-
onValuesChange?: ((changedValues: any, values: any) => void) | undefined;
|
|
89
|
-
extraParams?: {
|
|
90
|
-
list?: Record<string, any> | undefined;
|
|
91
|
-
get?: Record<string, any> | undefined;
|
|
92
|
-
update?: Record<string, any> | undefined;
|
|
93
|
-
create?: Record<string, any> | undefined;
|
|
94
|
-
destroy?: Record<string, any> | undefined;
|
|
95
|
-
} | undefined;
|
|
96
|
-
};
|
|
97
|
-
export default useTableProps;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ColumnType } from 'antd/es/table';
|
|
3
|
-
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
4
|
-
export declare type OperationItem = {
|
|
5
|
-
label?: string;
|
|
6
|
-
openMode: 'modal' | 'drawer' | 'custom';
|
|
7
|
-
openContentSize: 'small' | 'middle' | 'large';
|
|
8
|
-
openTitle: string;
|
|
9
|
-
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
10
|
-
key: string;
|
|
11
|
-
buttonProps?: any;
|
|
12
|
-
onClick?: (record: any) => void;
|
|
13
|
-
};
|
|
14
|
-
export interface DataSourceTableProps {
|
|
15
|
-
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
16
|
-
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
17
|
-
titleButtons?: {
|
|
18
|
-
show: boolean;
|
|
19
|
-
maxCount: number;
|
|
20
|
-
items: OperationItem[];
|
|
21
|
-
};
|
|
22
|
-
tableButtons?: {
|
|
23
|
-
show: boolean;
|
|
24
|
-
maxCount: number;
|
|
25
|
-
items: OperationItem[];
|
|
26
|
-
};
|
|
27
|
-
buttons?: any[];
|
|
28
|
-
operation?: {
|
|
29
|
-
show: boolean;
|
|
30
|
-
title: string;
|
|
31
|
-
width: number;
|
|
32
|
-
align: 'left' | 'center' | 'right';
|
|
33
|
-
fixed: 'left' | 'right' | false;
|
|
34
|
-
type: 'link' | 'button';
|
|
35
|
-
items: OperationItem[];
|
|
36
|
-
};
|
|
37
|
-
operationContent?: {
|
|
38
|
-
[key: string]: React.ReactNode;
|
|
39
|
-
};
|
|
40
|
-
dataSource: DataSourceType;
|
|
41
|
-
columns: ColumnType<any>[];
|
|
42
|
-
filter: any;
|
|
43
|
-
search?: {
|
|
44
|
-
show: boolean;
|
|
45
|
-
placeholder: string;
|
|
46
|
-
};
|
|
47
|
-
__designMode: string;
|
|
48
|
-
componentId: string;
|
|
49
|
-
clickToDetail?: {
|
|
50
|
-
show: boolean;
|
|
51
|
-
useCustomAction: boolean;
|
|
52
|
-
actionType: string;
|
|
53
|
-
openMode: 'modal' | 'drawer';
|
|
54
|
-
openContentSize: 'small' | 'middle' | 'large';
|
|
55
|
-
openTitle: string;
|
|
56
|
-
key: string;
|
|
57
|
-
};
|
|
58
|
-
onRow?: any;
|
|
59
|
-
filterBy?: Record<string, any>;
|
|
60
|
-
sortBy: string;
|
|
61
|
-
tabs?: {
|
|
62
|
-
show: boolean;
|
|
63
|
-
type: string;
|
|
64
|
-
items: {
|
|
65
|
-
name: string;
|
|
66
|
-
filterBy: Record<string, any>;
|
|
67
|
-
sortBy: string;
|
|
68
|
-
}[];
|
|
69
|
-
};
|
|
70
|
-
onValuesChange?: (changedValues: any, values: any) => void;
|
|
71
|
-
extraParams?: {
|
|
72
|
-
list?: Record<string, any>;
|
|
73
|
-
get?: Record<string, any>;
|
|
74
|
-
update?: Record<string, any>;
|
|
75
|
-
create?: Record<string, any>;
|
|
76
|
-
destroy?: Record<string, any>;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './index.less';
|
|
3
|
-
/**
|
|
4
|
-
* loginAndRegister组件的属性接口
|
|
5
|
-
*/
|
|
6
|
-
export interface loginAndRegisterProps {
|
|
7
|
-
/** Logo相关配置 */
|
|
8
|
-
showLogo?: boolean;
|
|
9
|
-
logo?: string;
|
|
10
|
-
logoPosition?: 'left' | 'center' | 'right';
|
|
11
|
-
logoSize?: {
|
|
12
|
-
width?: number;
|
|
13
|
-
height?: number;
|
|
14
|
-
};
|
|
15
|
-
/** 标题相关配置 */
|
|
16
|
-
title?: string;
|
|
17
|
-
showTitle?: boolean;
|
|
18
|
-
titleAlign?: 'left' | 'center' | 'right';
|
|
19
|
-
/** 副标题相关配置 */
|
|
20
|
-
subtitle?: string;
|
|
21
|
-
showSubtitle?: boolean;
|
|
22
|
-
subtitleAlign?: 'left' | 'center' | 'right';
|
|
23
|
-
/** 登录方式配置 */
|
|
24
|
-
loginMethods?: ('email' | 'google' | 'facebook' | 'apple')[];
|
|
25
|
-
defaultLoginMethod?: 'email' | 'google' | 'facebook' | 'apple';
|
|
26
|
-
/** 表单配置 */
|
|
27
|
-
emailLabel?: string;
|
|
28
|
-
passwordLabel?: string;
|
|
29
|
-
emailPlaceholder?: string;
|
|
30
|
-
passwordPlaceholder?: string;
|
|
31
|
-
emailRules?: any[];
|
|
32
|
-
buttonText?: string;
|
|
33
|
-
rememberMeText?: string;
|
|
34
|
-
forgotPasswordText?: string;
|
|
35
|
-
showRememberMe?: boolean;
|
|
36
|
-
showForgotPassword?: boolean;
|
|
37
|
-
/** 社交登录配置 */
|
|
38
|
-
socialLoginTexts?: {
|
|
39
|
-
google?: string;
|
|
40
|
-
facebook?: string;
|
|
41
|
-
apple?: string;
|
|
42
|
-
};
|
|
43
|
-
/** 底部配置 */
|
|
44
|
-
showFooter?: boolean;
|
|
45
|
-
showSignUp?: boolean;
|
|
46
|
-
signUpText?: string;
|
|
47
|
-
signUpLink?: string;
|
|
48
|
-
signUpPosition?: 'left' | 'center' | 'right';
|
|
49
|
-
otherLinks?: Array<{
|
|
50
|
-
text: string;
|
|
51
|
-
url: string;
|
|
52
|
-
}>;
|
|
53
|
-
otherLinksPosition?: 'left' | 'center' | 'right';
|
|
54
|
-
/** 登录/注册切换配置 */
|
|
55
|
-
showTabs?: boolean;
|
|
56
|
-
loginTabText?: string;
|
|
57
|
-
registerTabText?: string;
|
|
58
|
-
/** 注册表单配置 */
|
|
59
|
-
registerEmailPlaceholder?: string;
|
|
60
|
-
registerPasswordPlaceholder?: string;
|
|
61
|
-
registerButtonText?: string;
|
|
62
|
-
/** 事件回调 */
|
|
63
|
-
onLogin?: (values: {
|
|
64
|
-
email: string;
|
|
65
|
-
loginMethod: string;
|
|
66
|
-
}) => void;
|
|
67
|
-
onSocialLogin?: (type: 'google' | 'facebook' | 'apple') => void;
|
|
68
|
-
onSignUp?: () => void;
|
|
69
|
-
onRegister?: (values: {
|
|
70
|
-
email: string;
|
|
71
|
-
password: string;
|
|
72
|
-
}) => void;
|
|
73
|
-
/** 新增背景图片属性 */
|
|
74
|
-
backgroundImage?: string;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Saas登录组件
|
|
78
|
-
* @param props - 组件属性
|
|
79
|
-
* @returns React组件
|
|
80
|
-
*/
|
|
81
|
-
declare const loginAndRegister: React.FC<loginAndRegisterProps>;
|
|
82
|
-
export default loginAndRegister;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PisellContextType } from './context';
|
|
3
|
-
interface PisellConfigProviderType {
|
|
4
|
-
platform?: PisellContextType['platform'];
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
/** 货币符号 */
|
|
7
|
-
symbol?: string;
|
|
8
|
-
/** 当前语言环境 */
|
|
9
|
-
locale?: string;
|
|
10
|
-
}
|
|
11
|
-
declare const PisellConfigProvider: React.FC<PisellConfigProviderType>;
|
|
12
|
-
export default PisellConfigProvider;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PisellCheckboxGroupProps } from '../pisellCheckboxGroup';
|
|
3
|
-
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
-
import { PisellWalletPassCardProps } from '../pisellWalletPassCard';
|
|
5
|
-
export interface PisellCardListProps extends Omit<PisellCheckboxGroupProps, 'options'> {
|
|
6
|
-
platform?: PisellContextType['platform'];
|
|
7
|
-
/** 当用户查看完所有记录时,底部会显示此消息 */
|
|
8
|
-
endMessage?: React.ReactNode;
|
|
9
|
-
/** 加载下次数据时的加载站位 */
|
|
10
|
-
loader?: React.ReactNode;
|
|
11
|
-
/** 是否有更多数据 */
|
|
12
|
-
hasMore: boolean;
|
|
13
|
-
/** 加载更多数据回调 */
|
|
14
|
-
loadMoreData?: () => Promise<void>;
|
|
15
|
-
/** 当前list数据 */
|
|
16
|
-
data: PisellWalletPassCardProps[];
|
|
17
|
-
/** list空数据时展示内容 */
|
|
18
|
-
empty?: React.ReactNode;
|
|
19
|
-
/** 是否展示空状态 */
|
|
20
|
-
showEmpty?: boolean;
|
|
21
|
-
/** 是否展示卡片名称 */
|
|
22
|
-
showName?: boolean;
|
|
23
|
-
/** 是否展示店铺名称 */
|
|
24
|
-
showStoreName?: boolean;
|
|
25
|
-
/** 是否展示核销金额 */
|
|
26
|
-
showRedeem?: boolean;
|
|
27
|
-
/** 是否展示余额 */
|
|
28
|
-
showBalance?: boolean;
|
|
29
|
-
/** 是否展示编码 */
|
|
30
|
-
showCode?: boolean;
|
|
31
|
-
/** 是否展示到期时间 */
|
|
32
|
-
showValidDate?: boolean;
|
|
33
|
-
/** 是否展示详情按钮 */
|
|
34
|
-
showDetail?: boolean;
|
|
35
|
-
/** 是否展示二维码 */
|
|
36
|
-
showQrCode?: boolean;
|
|
37
|
-
/** 是否展示封面图 */
|
|
38
|
-
showCover?: boolean;
|
|
39
|
-
/** 是否余额货币单位 */
|
|
40
|
-
showBalanceSymbol?: boolean;
|
|
41
|
-
}
|
|
42
|
-
declare const _default: React.MemoExoticComponent<(props: PisellCardListProps) => JSX.Element>;
|
|
43
|
-
export default _default;
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PisellContextType } from '../pisell-config-provider/context';
|
|
3
|
-
import './index.less';
|
|
4
|
-
export interface PisellCheckboxGroupOption {
|
|
5
|
-
label: string;
|
|
6
|
-
value: string;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
}
|
|
10
|
-
declare type PisellCheckboxGroupValue = string | string[] | any;
|
|
11
|
-
export interface PisellCheckboxGroupProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
12
|
-
platform?: PisellContextType['platform'];
|
|
13
|
-
gap?: number;
|
|
14
|
-
padding?: number;
|
|
15
|
-
options: PisellCheckboxGroupOption[];
|
|
16
|
-
onChange?: (value: PisellCheckboxGroupValue, item: PisellCheckboxGroupOption) => void;
|
|
17
|
-
value?: PisellCheckboxGroupValue;
|
|
18
|
-
renderOption?: (option: PisellCheckboxGroupOption, active: boolean) => React.ReactNode;
|
|
19
|
-
rowKey?: string;
|
|
20
|
-
mode?: 'multiple' | 'single';
|
|
21
|
-
iconPosition?: 'left' | 'right' | 'hide';
|
|
22
|
-
optionClassName?: string;
|
|
23
|
-
optionActiveClassName?: string;
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* @title: PisellCheckboxGroup
|
|
27
|
-
* @description: 选中组件
|
|
28
|
-
* @param {PisellCheckboxGroupProps} props
|
|
29
|
-
* @return {*}
|
|
30
|
-
* @Author: zhiwei.Wang
|
|
31
|
-
* @Date: 2024-08-16 10:34
|
|
32
|
-
*/
|
|
33
|
-
declare const PisellCheckboxGroup: (props: PisellCheckboxGroupProps) => JSX.Element;
|
|
34
|
-
export default PisellCheckboxGroup;
|