@pisell/materials 2.2.54 → 2.2.55
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 +5 -5
- package/build/lowcode/preview.js +164 -148
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +39 -25
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +39 -25
- package/es/components/Pagination/index.d.ts +1 -1
- package/es/components/appVersionControl/index.d.ts +0 -1
- package/es/components/colorPicker/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +2 -0
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +10 -10
- package/es/components/drag-sort-tree/index.d.ts +0 -1
- package/es/components/filter/components/items/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/es/components/filter/components/items/text/index.d.ts +1 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/login-and-register/index.js +23 -21
- package/es/components/login-and-register/index.less +7 -7
- package/es/components/page/index.js +23 -57
- package/es/components/pisellCustomCheckboxGroup/index.js +3 -0
- package/es/components/pisellGoodPassCard/index.d.ts +47 -0
- package/es/components/pisellGoodPassCard/index.js +115 -0
- package/es/components/pisellGoodPassCard/index.less +52 -0
- package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +18 -2
- package/es/components/pisellWalletPassCard/index.d.ts +0 -1
- package/es/components/productCard/components/MultiDay/index.js +2 -1
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +4 -3
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +3 -0
- package/es/components/productCard/components/Time/components/SelectResource/index.js +53 -0
- package/es/components/productCard/components/Time/index.d.ts +1 -1
- package/es/components/productCard/components/Time/index.js +21 -7
- package/es/components/productCard/components/Time/index.less +29 -0
- package/es/components/productCard/index.js +5 -2
- package/es/components/productCard/locales.d.ts +3 -0
- package/es/components/productCard/locales.js +9 -0
- package/es/components/productCard/types.d.ts +4 -0
- package/es/components/productCard/utils.js +10 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -1
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/tableConfig/summary/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/tabs/index.js +6 -1
- package/es/components/virtual-keyboard/Number/index.d.ts +1 -0
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/es/locales/en-US.d.ts +28 -2
- package/es/locales/en-US.js +43 -10
- package/es/locales/zh-CN.d.ts +26 -0
- package/es/locales/zh-CN.js +29 -1
- package/es/locales/zh-TW.d.ts +26 -0
- package/es/locales/zh-TW.js +28 -1
- package/lib/components/Pagination/index.d.ts +1 -1
- package/lib/components/appVersionControl/index.d.ts +0 -1
- package/lib/components/colorPicker/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +2 -0
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +10 -10
- package/lib/components/drag-sort-tree/index.d.ts +0 -1
- package/lib/components/filter/components/items/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/index.d.ts +1 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/login-and-register/index.js +23 -21
- package/lib/components/login-and-register/index.less +7 -7
- package/lib/components/page/index.js +37 -65
- package/lib/components/pisellCustomCheckboxGroup/index.js +1 -1
- package/lib/components/pisellGoodPassCard/index.d.ts +47 -0
- package/lib/components/pisellGoodPassCard/index.js +109 -0
- package/lib/components/pisellGoodPassCard/index.less +52 -0
- package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +24 -3
- package/lib/components/pisellWalletPassCard/index.d.ts +0 -1
- package/lib/components/productCard/components/MultiDay/index.js +3 -2
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +5 -4
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +3 -0
- package/lib/components/productCard/components/Time/components/SelectResource/index.js +63 -0
- package/lib/components/productCard/components/Time/index.d.ts +1 -1
- package/lib/components/productCard/components/Time/index.js +38 -14
- package/lib/components/productCard/components/Time/index.less +29 -0
- package/lib/components/productCard/index.js +4 -1
- package/lib/components/productCard/locales.d.ts +3 -0
- package/lib/components/productCard/locales.js +3 -0
- package/lib/components/productCard/types.d.ts +4 -0
- package/lib/components/productCard/utils.js +10 -2
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -1
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/tableConfig/summary/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/tabs/index.js +1 -0
- package/lib/components/virtual-keyboard/Number/index.d.ts +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lib/locales/en-US.d.ts +28 -2
- package/lib/locales/en-US.js +29 -3
- package/lib/locales/zh-CN.d.ts +26 -0
- package/lib/locales/zh-CN.js +29 -1
- package/lib/locales/zh-TW.d.ts +26 -0
- package/lib/locales/zh-TW.js +28 -1
- package/lowcode/pisell-good-pass-card/meta.ts +38 -0
- package/lowcode/pisell-good-pass-card/snippets.ts +9 -0
- package/lowcode/product-card/meta.ts +28 -0
- package/package.json +1 -1
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
position: relative;
|
|
68
68
|
|
|
69
69
|
&.active {
|
|
70
|
-
color:
|
|
70
|
+
color: var(--theme-color);
|
|
71
71
|
|
|
72
72
|
&:after {
|
|
73
73
|
content: '';
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
left: 0;
|
|
77
77
|
right: 0;
|
|
78
78
|
height: 2px;
|
|
79
|
-
background:
|
|
79
|
+
background: var(--theme-color);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
|
|
@@ -105,11 +105,11 @@
|
|
|
105
105
|
background: #FFF;
|
|
106
106
|
|
|
107
107
|
&:hover {
|
|
108
|
-
border-color:
|
|
108
|
+
border-color: var(--theme-color);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
&:focus {
|
|
112
|
-
border-color:
|
|
112
|
+
border-color: var(--theme-color);
|
|
113
113
|
box-shadow: 0 0 0 4px rgba(127, 86, 217, 0.1);
|
|
114
114
|
}
|
|
115
115
|
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
.saas-login-button {
|
|
127
127
|
height: 44px;
|
|
128
128
|
border-radius: 8px;
|
|
129
|
-
background:
|
|
129
|
+
background: var(--theme-color);
|
|
130
130
|
border: none;
|
|
131
131
|
font-weight: 500;
|
|
132
132
|
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
&:focus {
|
|
138
|
-
background:
|
|
138
|
+
background: var(--theme-color);
|
|
139
139
|
box-shadow: 0 0 0 4px rgba(127, 86, 217, 0.1);
|
|
140
140
|
}
|
|
141
141
|
}
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
margin-bottom: 16px;
|
|
186
186
|
|
|
187
187
|
a {
|
|
188
|
-
color: #7F56D9;
|
|
188
|
+
//color: #7F56D9;
|
|
189
189
|
margin-left: 4px;
|
|
190
190
|
cursor: pointer;
|
|
191
191
|
|
|
@@ -83,7 +83,7 @@ var Page = (props) => {
|
|
|
83
83
|
token: {
|
|
84
84
|
...props.theme.token,
|
|
85
85
|
// 外部透传主题时,如果没有传入colorPrimary 默认使用主项目内主题色
|
|
86
|
-
colorPrimary: ((_b2 = (_a2 = props == null ? void 0 : props.theme) == null ? void 0 : _a2.token) == null ? void 0 : _b2.colorPrimary) || themeColor || "#
|
|
86
|
+
colorPrimary: ((_b2 = (_a2 = props == null ? void 0 : props.theme) == null ? void 0 : _a2.token) == null ? void 0 : _b2.colorPrimary) || themeColor || "#5D3F9F"
|
|
87
87
|
}
|
|
88
88
|
};
|
|
89
89
|
}
|
|
@@ -120,10 +120,10 @@ var Page = (props) => {
|
|
|
120
120
|
colorErrorBg: "#FEF3F2",
|
|
121
121
|
colorErrorBorderHover: "#FDA29B",
|
|
122
122
|
colorErrorOutline: "rgba(217, 45, 32, 0.06)",
|
|
123
|
-
colorLink: "#
|
|
124
|
-
colorLinkActive: "#
|
|
125
|
-
colorLinkHover: "#
|
|
126
|
-
// colorPrimaryActive: '#
|
|
123
|
+
colorLink: "#7F56DA",
|
|
124
|
+
colorLinkActive: "#5F3DA8",
|
|
125
|
+
colorLinkHover: "#6D48C4",
|
|
126
|
+
// colorPrimaryActive: '#5D3F9F',
|
|
127
127
|
// colorPrimaryBorder: '#E9D7FE',
|
|
128
128
|
colorText: "#344054",
|
|
129
129
|
colorTextDisabled: "#D0D5DD",
|
|
@@ -170,59 +170,25 @@ var Page = (props) => {
|
|
|
170
170
|
Select: {
|
|
171
171
|
fontSizeIcon: 16
|
|
172
172
|
// "lineHeight": 1
|
|
173
|
+
},
|
|
174
|
+
Menu: {
|
|
175
|
+
subMenuItemSelectedColor: "#9976e3"
|
|
173
176
|
}
|
|
174
177
|
},
|
|
175
178
|
token: {
|
|
176
|
-
colorPrimary: themeColor || "#
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
//
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
colorSuccessBorder: "#ABEFC6",
|
|
190
|
-
colorSuccessBorderHover: "#75E0A7",
|
|
191
|
-
colorSuccessHover: "#067647",
|
|
192
|
-
colorSuccessText: "#067647",
|
|
193
|
-
colorSuccessActive: "#085D3A",
|
|
194
|
-
colorSuccessTextHover: "#085D3A",
|
|
195
|
-
colorSuccessTextActive: "#074D31",
|
|
196
|
-
colorWarning: "#dc6803",
|
|
197
|
-
colorWarningBg: "#FFFAEB",
|
|
198
|
-
colorWarningBgHover: "#FEF0C7",
|
|
199
|
-
colorWarningBorder: "#FEDF89",
|
|
200
|
-
colorWarningBorderHover: "#FEC84B",
|
|
201
|
-
colorWarningHover: "#B54708",
|
|
202
|
-
colorWarningText: "#B54708",
|
|
203
|
-
colorWarningActive: "#93370D",
|
|
204
|
-
colorWarningTextHover: "#93370D",
|
|
205
|
-
colorWarningTextActive: "#7A2E0E",
|
|
206
|
-
colorError: "#d92d20",
|
|
207
|
-
colorErrorBg: "#FEF3F2",
|
|
208
|
-
colorErrorBgHover: "#FEE4E2",
|
|
209
|
-
colorErrorBorder: "#FECDCA",
|
|
210
|
-
colorErrorBorderHover: "#FDA29B",
|
|
211
|
-
colorErrorHover: "#B42318",
|
|
212
|
-
colorErrorText: "#B42318",
|
|
213
|
-
colorErrorActive: "#912018",
|
|
214
|
-
colorErrorTextHover: "#912018",
|
|
215
|
-
colorErrorTextActive: "#7A271A",
|
|
216
|
-
colorInfo: "#1570ef",
|
|
217
|
-
colorInfoBg: "#EFF8FF",
|
|
218
|
-
colorInfoBgHover: "#D1E9FF",
|
|
219
|
-
colorInfoBorder: "#B2DDFF",
|
|
220
|
-
colorInfoBorderHover: "#84CAFF",
|
|
221
|
-
colorInfoHover: "#175CD3",
|
|
222
|
-
colorInfoText: "#175CD3",
|
|
223
|
-
colorInfoActive: "#1849A9",
|
|
224
|
-
colorInfoTextHover: "#1849A9",
|
|
225
|
-
colorInfoTextActive: "#194185",
|
|
179
|
+
colorPrimary: themeColor || "#5D3F9F",
|
|
180
|
+
colorPrimaryBg: "#eee5ff",
|
|
181
|
+
colorPrimaryBgHover: "#e4d9fc",
|
|
182
|
+
colorPrimaryBorder: "#d4c3f7",
|
|
183
|
+
colorSuccess: "#5f9e3f",
|
|
184
|
+
colorInfo: "#5d3f9f",
|
|
185
|
+
colorError: "#f5222d",
|
|
186
|
+
colorSuccessBg: "#e5fcd9",
|
|
187
|
+
colorSuccessBgHover: "#d5f7c3",
|
|
188
|
+
// 链接色
|
|
189
|
+
colorLink: "#7F56DA",
|
|
190
|
+
colorLinkActive: "#5F3DA8",
|
|
191
|
+
colorLinkHover: "#6D48C4",
|
|
226
192
|
colorText: "#101828",
|
|
227
193
|
colorTextSecondary: "#475467",
|
|
228
194
|
colorTextTertiary: "#667085",
|
|
@@ -245,7 +211,7 @@ var Page = (props) => {
|
|
|
245
211
|
var _a2;
|
|
246
212
|
return (0, import_date_picker.createTheme)({
|
|
247
213
|
palette: {
|
|
248
|
-
primary: { main: ((_a2 = theme.token) == null ? void 0 : _a2.colorPrimary) || "#
|
|
214
|
+
primary: { main: ((_a2 = theme.token) == null ? void 0 : _a2.colorPrimary) || "#5D3F9F" }
|
|
249
215
|
}
|
|
250
216
|
});
|
|
251
217
|
}, [platform, themeColor]);
|
|
@@ -271,17 +237,23 @@ var Page = (props) => {
|
|
|
271
237
|
dateAdapter: import_AdapterDayjs.AdapterDayjs,
|
|
272
238
|
adapterLocale: ((_d = localeDateMap == null ? void 0 : localeDateMap[locale]) == null ? void 0 : _d.adapterLocale) || "en"
|
|
273
239
|
},
|
|
274
|
-
/* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement(import_date_picker.LocaleProvider, { value: { locale } }, /* @__PURE__ */ import_react.default.createElement(import_pisell_config_provider.default, { locale }, /* @__PURE__ */ import_react.default.createElement(
|
|
275
|
-
|
|
240
|
+
/* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement(import_date_picker.LocaleProvider, { value: { locale } }, /* @__PURE__ */ import_react.default.createElement(import_pisell_config_provider.default, { locale }, /* @__PURE__ */ import_react.default.createElement(
|
|
241
|
+
import_VariablesProvider.default,
|
|
276
242
|
{
|
|
277
|
-
|
|
278
|
-
...style,
|
|
279
|
-
"--theme-color": themeColor || "#7F56D9"
|
|
280
|
-
},
|
|
281
|
-
className
|
|
243
|
+
variables: ((_f = (_e = context.engine) == null ? void 0 : _e.props) == null ? void 0 : _f.variables) || {}
|
|
282
244
|
},
|
|
283
|
-
|
|
284
|
-
|
|
245
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
246
|
+
"div",
|
|
247
|
+
{
|
|
248
|
+
style: {
|
|
249
|
+
...style,
|
|
250
|
+
"--theme-color": themeColor || "#5D3F9F"
|
|
251
|
+
},
|
|
252
|
+
className
|
|
253
|
+
},
|
|
254
|
+
children
|
|
255
|
+
)
|
|
256
|
+
))))
|
|
285
257
|
)
|
|
286
258
|
)
|
|
287
259
|
);
|
|
@@ -54,7 +54,7 @@ var PisellCustomCheckboxGroup = ({
|
|
|
54
54
|
}, [allowAdd, dataSource]);
|
|
55
55
|
const renderGridItem = (item, index) => {
|
|
56
56
|
var _a;
|
|
57
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { onClick: () => onClick(item) }, (item == null ? void 0 : item.isAddCard) && renderAddItem ? renderAddItem(item) : (_a = rest == null ? void 0 : rest.renderItem) == null ? void 0 : _a.call(rest, item, index));
|
|
57
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { onClick: () => onClick(item), style: { height: "100%" } }, (item == null ? void 0 : item.isAddCard) && renderAddItem ? renderAddItem(item) : (_a = rest == null ? void 0 : rest.renderItem) == null ? void 0 : _a.call(rest, item, index));
|
|
58
58
|
};
|
|
59
59
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
60
60
|
import_pisellViewGrid.default,
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface ApplicableProductDetails {
|
|
4
|
+
amount: string;
|
|
5
|
+
type: string;
|
|
6
|
+
resource_id: number;
|
|
7
|
+
title: string;
|
|
8
|
+
original_amount: string;
|
|
9
|
+
}
|
|
10
|
+
interface Discount {
|
|
11
|
+
id: number;
|
|
12
|
+
product_name: string;
|
|
13
|
+
encoded: string;
|
|
14
|
+
code: string;
|
|
15
|
+
tag: string;
|
|
16
|
+
expire_time?: string;
|
|
17
|
+
product_id: number;
|
|
18
|
+
relation_type: string;
|
|
19
|
+
par_value: string;
|
|
20
|
+
used_par_value: string;
|
|
21
|
+
limit_status: string;
|
|
22
|
+
limited_relation_product_data: any;
|
|
23
|
+
balance: string;
|
|
24
|
+
format_title: any;
|
|
25
|
+
product: any;
|
|
26
|
+
savedAmount: number;
|
|
27
|
+
isDisabled: boolean;
|
|
28
|
+
isSelected?: boolean;
|
|
29
|
+
isAvailable?: boolean;
|
|
30
|
+
isUsed?: boolean;
|
|
31
|
+
applicableProductIds?: number[];
|
|
32
|
+
applicableProductDetails: ApplicableProductDetails[];
|
|
33
|
+
appliedProductDetails: any[];
|
|
34
|
+
}
|
|
35
|
+
export interface PisellGoodPassCardProps {
|
|
36
|
+
/**数据源 */
|
|
37
|
+
dataSource: Array<Discount>;
|
|
38
|
+
/**事件 */
|
|
39
|
+
onChange?: (current: {
|
|
40
|
+
id: string | number;
|
|
41
|
+
isSelected: boolean;
|
|
42
|
+
}) => void;
|
|
43
|
+
/**样式 */
|
|
44
|
+
style: React.CSSProperties;
|
|
45
|
+
}
|
|
46
|
+
declare const index: (props: PisellGoodPassCardProps) => JSX.Element;
|
|
47
|
+
export default index;
|
|
@@ -0,0 +1,109 @@
|
|
|
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/pisellGoodPassCard/index.tsx
|
|
30
|
+
var pisellGoodPassCard_exports = {};
|
|
31
|
+
__export(pisellGoodPassCard_exports, {
|
|
32
|
+
default: () => pisellGoodPassCard_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(pisellGoodPassCard_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import__ = require("../../index");
|
|
38
|
+
var import_locales = require("../../locales");
|
|
39
|
+
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var clsPrefix = "pisell-good-pass-card";
|
|
42
|
+
var index = (props) => {
|
|
43
|
+
var _a;
|
|
44
|
+
const context = (0, import_useEngineContext.default)();
|
|
45
|
+
const { translation } = (_a = context.appHelper) == null ? void 0 : _a.utils;
|
|
46
|
+
const { dataSource = [], onChange, style = {} } = props;
|
|
47
|
+
const [showModal, setShowModal] = (0, import_react.useState)(false);
|
|
48
|
+
console.log("pisell good card datasource", dataSource);
|
|
49
|
+
const handleChange = (newValue) => {
|
|
50
|
+
if (onChange) {
|
|
51
|
+
onChange(newValue);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
const handleItemChange = (item, checked) => {
|
|
55
|
+
handleChange({
|
|
56
|
+
id: item.id,
|
|
57
|
+
isSelected: checked
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
const renderVoucherContent = (item) => {
|
|
61
|
+
return /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_locales.getText)("pisell2.text.goodpass.save"), " ", /* @__PURE__ */ import_react.default.createElement(import__.PisellText.Amount, { value: item.savedAmount }));
|
|
62
|
+
};
|
|
63
|
+
const renderActionElement = (item) => {
|
|
64
|
+
const isChecked = item.isSelected;
|
|
65
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
import_antd.Checkbox,
|
|
67
|
+
{
|
|
68
|
+
disabled: item.isDisabled,
|
|
69
|
+
style: { marginLeft: 8 },
|
|
70
|
+
checked: isChecked,
|
|
71
|
+
onChange: (e) => handleItemChange(item, e.target.checked)
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
const renderVoucherItem = (item) => {
|
|
76
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: item.id, className: `${clsPrefix}-voucher-item` }, /* @__PURE__ */ import_react.default.createElement("div", { className: "item-title" }, translation(item.format_title)), /* @__PURE__ */ import_react.default.createElement("div", { className: "item-content" }, renderVoucherContent(item), renderActionElement(item)));
|
|
77
|
+
};
|
|
78
|
+
const renderModal = () => {
|
|
79
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
80
|
+
import__.PisellModal,
|
|
81
|
+
{
|
|
82
|
+
title: (0, import_locales.getText)("pisell2.text.goodpass.product-vouchers"),
|
|
83
|
+
footer: null,
|
|
84
|
+
open: showModal,
|
|
85
|
+
onCancel: () => setShowModal(false),
|
|
86
|
+
className: `${clsPrefix}-all-items-modal`
|
|
87
|
+
},
|
|
88
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { padding: "10px 0" } }, dataSource.map(renderVoucherItem))
|
|
89
|
+
);
|
|
90
|
+
};
|
|
91
|
+
const renderMixedMode = () => {
|
|
92
|
+
const list = dataSource.length > 3 ? dataSource.slice(0, 3) : dataSource;
|
|
93
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: `${clsPrefix}-header` }, /* @__PURE__ */ import_react.default.createElement("div", null, (0, import_locales.getText)("pisell2.text.goodpass.product-vouchers")), /* @__PURE__ */ import_react.default.createElement(import_antd.Typography.Text, { underline: true, onClick: () => setShowModal(true) }, (0, import_locales.getText)("pisell2.text.goodpass.view-more"))), /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 4 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${clsPrefix}-body` }, list.map(renderVoucherItem)));
|
|
94
|
+
};
|
|
95
|
+
return /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, renderModal(), /* @__PURE__ */ import_react.default.createElement(
|
|
96
|
+
import__.PisellCard,
|
|
97
|
+
{
|
|
98
|
+
padding: 8,
|
|
99
|
+
borderRadius: 8,
|
|
100
|
+
style: {
|
|
101
|
+
width: 378,
|
|
102
|
+
...style
|
|
103
|
+
},
|
|
104
|
+
className: clsPrefix
|
|
105
|
+
},
|
|
106
|
+
renderMixedMode()
|
|
107
|
+
));
|
|
108
|
+
};
|
|
109
|
+
var pisellGoodPassCard_default = index;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
.pisell-good-pass-card-all-items-modal,
|
|
2
|
+
.pisell-good-pass-card {
|
|
3
|
+
.pisell-good-pass-card-header,
|
|
4
|
+
.pisell-good-pass-card-group-header {
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
align-items: center;
|
|
8
|
+
color: var(--Gray-900, #101828);
|
|
9
|
+
text-align: center;
|
|
10
|
+
font-family: Inter;
|
|
11
|
+
font-size: 14px;
|
|
12
|
+
font-style: normal;
|
|
13
|
+
font-weight: 600;
|
|
14
|
+
line-height: 20px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.pisell-good-pass-card-voucher-item {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
height: 22px;
|
|
22
|
+
|
|
23
|
+
.item-title {
|
|
24
|
+
color: var(--Gray-500, #667085);
|
|
25
|
+
text-align: center;
|
|
26
|
+
font-family: Inter;
|
|
27
|
+
font-size: 14px;
|
|
28
|
+
font-style: normal;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
line-height: 20px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.item-content {
|
|
34
|
+
color: var(--, #8157d5);
|
|
35
|
+
font-family: Inter;
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
font-style: normal;
|
|
38
|
+
font-weight: 400;
|
|
39
|
+
line-height: 20px;
|
|
40
|
+
|
|
41
|
+
.add-btn {
|
|
42
|
+
color: var(--, #8157d5);
|
|
43
|
+
text-align: center;
|
|
44
|
+
font-family: Inter;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
font-style: normal;
|
|
47
|
+
font-weight: 600;
|
|
48
|
+
line-height: 20px; /* 142.857% */
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -88,12 +88,31 @@ var PisellNavigationMenu = ({
|
|
|
88
88
|
onAddPage == null ? void 0 : onAddPage(item);
|
|
89
89
|
}
|
|
90
90
|
}, []);
|
|
91
|
+
const tagTextMap = (0, import_react.useMemo)(() => {
|
|
92
|
+
return {
|
|
93
|
+
base: {
|
|
94
|
+
text: (0, import_locales.getText)("pisell-lowcode-navigation-menu-tag-base"),
|
|
95
|
+
color: "#7f56d9"
|
|
96
|
+
},
|
|
97
|
+
pisellV1: {
|
|
98
|
+
text: (0, import_locales.getText)("pisell-lowcode-navigation-menu-tag-pisell1"),
|
|
99
|
+
color: "#ee837a"
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}, []);
|
|
91
103
|
const renderMenuItem = (0, import_react.useCallback)(
|
|
92
104
|
(itemProps) => {
|
|
105
|
+
var _a, _b;
|
|
93
106
|
const { item } = itemProps;
|
|
94
|
-
const {
|
|
107
|
+
const {
|
|
108
|
+
allowEdit = true,
|
|
109
|
+
allowDelete: allowDelete2 = true,
|
|
110
|
+
allowAddChild: allowAddChild2 = true,
|
|
111
|
+
allowAddSubmenu = true,
|
|
112
|
+
allowAddPage = true
|
|
113
|
+
} = item;
|
|
95
114
|
const isShowAddButton = item.isGroup && allowAddChild2 && (allowAddSubmenu || allowAddPage);
|
|
96
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-content-icon" }, /* @__PURE__ */ import_react.default.createElement(import_icon.default, { type: item.icon })), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-content-text" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-title" }, item.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-description" }, item.description, !item.isGroup && item.version && /* @__PURE__ */ import_react.default.createElement(import_pisellTags.default, { type: "pill_color", color: "success" }, item.version)))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-action-wrap" }, allowEdit && /* @__PURE__ */ import_react.default.createElement(
|
|
115
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-content-icon" }, /* @__PURE__ */ import_react.default.createElement(import_icon.default, { type: item.icon })), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-content-text" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-title" }, item.title), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-description" }, item.description, item.source && /* @__PURE__ */ import_react.default.createElement(import_pisellTags.default, { type: "pill_color", color: (_a = tagTextMap[item.source]) == null ? void 0 : _a.color }, ((_b = tagTextMap[item.source]) == null ? void 0 : _b.text) || ""), !item.isGroup && item.version && /* @__PURE__ */ import_react.default.createElement(import_pisellTags.default, { type: "pill_color", color: "success" }, "v", item.version)))), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-navigation-menu-item-action-wrap" }, allowEdit && /* @__PURE__ */ import_react.default.createElement(
|
|
97
116
|
import_button.default,
|
|
98
117
|
{
|
|
99
118
|
type: "text",
|
|
@@ -114,7 +133,9 @@ var PisellNavigationMenu = ({
|
|
|
114
133
|
items: [
|
|
115
134
|
allowAddSubmenu && {
|
|
116
135
|
key: "add-child",
|
|
117
|
-
label: (0, import_locales.getText)(
|
|
136
|
+
label: (0, import_locales.getText)(
|
|
137
|
+
"pisell-lowcode-navigation-menu-add-sub-menu"
|
|
138
|
+
),
|
|
118
139
|
onClick: () => handleClick("add-child", item)
|
|
119
140
|
},
|
|
120
141
|
allowAddPage && {
|
|
@@ -42,11 +42,12 @@ var import_index = require("./index.less");
|
|
|
42
42
|
var import_utils2 = require("./utils");
|
|
43
43
|
var prefix = "pisell-lowcode-";
|
|
44
44
|
var MultiDay = ({ dataSource, hideDivider }) => {
|
|
45
|
-
var _a
|
|
45
|
+
var _a;
|
|
46
46
|
const { items, symbol, locale } = dataSource;
|
|
47
47
|
let translationOriginal = (text) => "";
|
|
48
48
|
const context = (0, import_useEngineContext.default)();
|
|
49
|
-
|
|
49
|
+
const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
|
|
50
|
+
translationOriginal = (utils == null ? void 0 : utils.translationOriginal) || (utils == null ? void 0 : utils.translation);
|
|
50
51
|
const lists = (0, import_react.useMemo)(() => {
|
|
51
52
|
if (!(items == null ? void 0 : items.length)) return [];
|
|
52
53
|
return (0, import_utils2.formatDateRanges)(items);
|
|
@@ -40,12 +40,13 @@ var import_utils = require("../../utils");
|
|
|
40
40
|
var import_options = __toESM(require("../options"));
|
|
41
41
|
var prefix = "pisell-lowcode-";
|
|
42
42
|
var renderBundles = (item, hidePrice, isShowPackageNote) => {
|
|
43
|
-
var _a
|
|
44
|
-
let
|
|
43
|
+
var _a;
|
|
44
|
+
let translation = (text) => "";
|
|
45
45
|
const context = (0, import_useEngineContext.default)();
|
|
46
|
-
|
|
46
|
+
const utils = (_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils;
|
|
47
|
+
translation = (utils == null ? void 0 : utils.translationOriginal) || (utils == null ? void 0 : utils.translation);
|
|
47
48
|
const { title, name, id, price, symbol, option } = item;
|
|
48
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { key: id, className: `${prefix}packages-product-bundle-item` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}packages-product-bundle-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}packages-product-bundle-info-title` },
|
|
49
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { key: id, className: `${prefix}packages-product-bundle-item` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}packages-product-bundle-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}packages-product-bundle-info-title` }, translation(title || name)), !hidePrice ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${prefix}packages-product-bundle-info-num` }, (0, import_utils._formatAmount)(price, symbol)) : null), /* @__PURE__ */ import_react.default.createElement(import_options.default, { options: option, amountSymbol: symbol }), /* @__PURE__ */ import_react.default.createElement(import_AmountFooter.default, { item }), isShowPackageNote ? /* @__PURE__ */ import_react.default.createElement(import_Note.default, { item, type: "inside" }) : null);
|
|
49
50
|
};
|
|
50
51
|
// Annotate the CommonJS export names for ESM import in node:
|
|
51
52
|
0 && (module.exports = {
|
|
@@ -0,0 +1,63 @@
|
|
|
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/Time/components/SelectResource/index.tsx
|
|
30
|
+
var SelectResource_exports = {};
|
|
31
|
+
__export(SelectResource_exports, {
|
|
32
|
+
default: () => SelectResource_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(SelectResource_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var SelectResource = ({ lists, value, onChange }) => {
|
|
38
|
+
const [selectedValue, setSelectedValue] = (0, import_react.useState)();
|
|
39
|
+
(0, import_react.useEffect)(() => {
|
|
40
|
+
setSelectedValue(value);
|
|
41
|
+
}, [value]);
|
|
42
|
+
const renderOptions = (0, import_react.useCallback)(() => {
|
|
43
|
+
return (lists || []).map((d) => {
|
|
44
|
+
return /* @__PURE__ */ import_react.default.createElement(import_antd.Select.Option, { value: d.id, key: d.id }, d["label"]);
|
|
45
|
+
});
|
|
46
|
+
}, [lists]);
|
|
47
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
48
|
+
import_antd.Select,
|
|
49
|
+
{
|
|
50
|
+
size: "large",
|
|
51
|
+
showSearch: true,
|
|
52
|
+
style: { flex: 1 },
|
|
53
|
+
value: selectedValue,
|
|
54
|
+
onChange: (val) => {
|
|
55
|
+
setSelectedValue(val);
|
|
56
|
+
const item = lists.find((d) => d.id === val);
|
|
57
|
+
onChange(item);
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
renderOptions()
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
var SelectResource_default = SelectResource;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import './index.less';
|
|
3
|
-
declare const Time: ({ item, isShowHolder, onLike }: any) => JSX.Element | null;
|
|
3
|
+
declare const Time: ({ item, isShowHolder, onLike, isShowChangeResource, changeResource, }: any) => JSX.Element | null;
|
|
4
4
|
export default Time;
|