@pisell/materials 6.0.6 → 6.0.7
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 +7 -7
- package/build/lowcode/preview.js +8 -8
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +21 -53
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +18 -50
- package/es/components/config-provider/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +20 -11
- package/es/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
- package/es/components/dataSourceComponents/dataSourceForm/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +11 -3
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +10 -3
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
- package/es/components/dataSourceComponents/dataSourceForm/serve.js +36 -20
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +46 -25
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +38 -10
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +7 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +28 -5
- package/es/components/dataSourceComponents/dataSourceTable/index.js +4 -2
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +9 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/WithMode.js +7 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +16 -1
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.js +7 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
- package/es/components/dataSourceComponents/fields/Upload/serve.js +10 -31
- package/es/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +73 -36
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +49 -3
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/login-and-register/index.js +360 -0
- package/es/components/login-and-register/index.less +211 -0
- package/es/components/organizationTenantSwitcher/defaultLogo.png +0 -0
- package/es/components/organizationTenantSwitcher/index.d.ts +17 -0
- package/es/components/organizationTenantSwitcher/index.js +96 -0
- package/es/components/organizationTenantSwitcher/index.less +88 -0
- package/es/components/page/index.js +4 -4
- package/es/components/page-header/index.d.ts +14 -0
- package/es/components/page-header/index.js +36 -0
- package/es/components/page-header/index.less +45 -0
- package/es/components/pisellAvatar/index.d.ts +19 -0
- package/es/components/pisellAvatar/index.js +89 -0
- package/es/components/pisellAvatar/index.less +26 -0
- package/es/components/pisellModal/components/PcModal/index.js +1 -1
- package/es/components/pisellTags/index.d.ts +13 -0
- package/es/components/pisellTags/index.js +83 -0
- package/es/components/pisellTags/index.less +17 -0
- package/es/components/pisellTags/utils.d.ts +1 -0
- package/es/components/pisellTags/utils.js +89 -0
- package/es/components/pisellText/components/Amount/index.js +1 -1
- package/es/components/profileMenu/index.d.ts +26 -0
- package/es/components/profileMenu/index.js +115 -0
- package/es/components/profileMenu/index.less +135 -0
- package/es/components/table/Header/index.js +8 -11
- package/es/index.d.ts +6 -0
- package/es/index.js +7 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/en-US.js +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +1 -0
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +1 -0
- package/lib/components/config-provider/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +22 -4
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/group/index.less +2 -2
- package/lib/components/dataSourceComponents/dataSourceForm/index.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +17 -3
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +16 -6
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +3 -2
- package/lib/components/dataSourceComponents/dataSourceForm/serve.js +9 -5
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +15 -4
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +5 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +3 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +51 -5
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +4 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +7 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +24 -3
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +9 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/WithMode.js +6 -1
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.js +17 -2
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.js +5 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +4 -1
- package/lib/components/dataSourceComponents/fields/Upload/serve.js +20 -12
- package/lib/components/dataSourceComponents/hooks/useActions.d.ts +2 -1
- package/lib/components/dataSourceComponents/hooks/useActions.js +25 -7
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +7 -0
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +3 -1
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +49 -3
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/login-and-register/index.js +261 -0
- package/lib/components/login-and-register/index.less +211 -0
- package/lib/components/organizationTenantSwitcher/defaultLogo.png +0 -0
- package/lib/components/organizationTenantSwitcher/index.d.ts +17 -0
- package/lib/components/organizationTenantSwitcher/index.js +119 -0
- package/lib/components/organizationTenantSwitcher/index.less +88 -0
- package/lib/components/page/index.js +4 -4
- package/lib/components/page-header/index.d.ts +14 -0
- package/lib/components/page-header/index.js +63 -0
- package/lib/components/page-header/index.less +45 -0
- package/lib/components/pisellAvatar/index.d.ts +19 -0
- package/lib/components/pisellAvatar/index.js +108 -0
- package/lib/components/pisellAvatar/index.less +26 -0
- package/lib/components/pisellModal/components/PcModal/index.js +1 -1
- package/lib/components/pisellTags/index.d.ts +13 -0
- package/lib/components/pisellTags/index.js +113 -0
- package/lib/components/pisellTags/index.less +17 -0
- package/lib/components/pisellTags/utils.d.ts +1 -0
- package/lib/components/pisellTags/utils.js +86 -0
- package/lib/components/pisellText/components/Amount/index.js +2 -2
- package/lib/components/profileMenu/index.d.ts +26 -0
- package/lib/components/profileMenu/index.js +113 -0
- package/lib/components/profileMenu/index.less +135 -0
- package/lib/components/table/Header/index.js +11 -1
- package/lib/index.d.ts +6 -0
- package/lib/index.js +18 -0
- package/lib/locales/en-US.d.ts +1 -0
- package/lib/locales/en-US.js +1 -0
- package/lib/locales/zh-CN.d.ts +1 -0
- package/lib/locales/zh-CN.js +1 -0
- package/lib/locales/zh-TW.d.ts +1 -0
- package/lib/locales/zh-TW.js +1 -0
- package/lowcode/_utils/defaultSchema.ts +64 -0
- package/lowcode/data-source-form/meta.ts +130 -0
- package/lowcode/data-source-form/utils.ts +33 -3
- package/lowcode/data-source-table/meta.ts +139 -3
- package/lowcode/data-source-table/utils.tsx +6 -0
- package/lowcode/form-item-date-picker/snippets.ts +3 -0
- package/lowcode/form-item-input/snippets.ts +3 -1
- package/lowcode/form-item-input-number/snippets.ts +4 -0
- package/lowcode/form-item-input.email/snippets.ts +3 -0
- package/lowcode/form-item-input.json/snippets.ts +4 -1
- package/lowcode/form-item-input.password/snippets.ts +3 -0
- package/lowcode/form-item-input.phone/snippets.ts +3 -0
- package/lowcode/form-item-input.text-area/snippets.ts +3 -1
- package/lowcode/form-item-input.url/snippets.ts +3 -0
- package/lowcode/form-item-select/meta.ts +2 -1
- package/lowcode/form-item-select/snippets.ts +6 -0
- package/lowcode/form-item-time-picker/snippets.ts +3 -0
- package/lowcode/form-item-translation/snippets.ts +3 -1
- package/lowcode/login-and-register/meta.ts +541 -0
- package/lowcode/login-and-register/snippets.ts +38 -0
- package/lowcode/organization-tenant-switch/meta.ts +127 -0
- package/lowcode/page-header/meta.ts +68 -124
- package/lowcode/page-header/snippets.ts +1 -1
- package/lowcode/pisell-avatar/__screenshots__/avatar-1.jpg +0 -0
- package/lowcode/pisell-avatar/meta.ts +111 -0
- package/lowcode/pisell-avatar/snippets.ts +14 -0
- package/lowcode/pisell-tags/__screenshots__/tag-1.png +0 -0
- package/lowcode/pisell-tags/meta.ts +123 -0
- package/lowcode/pisell-tags/snippets.ts +14 -0
- package/lowcode/profile-menu/meta.ts +175 -0
- package/lowcode/profile-menu/snippets.ts +71 -0
- package/lowcode/submit-button/meta.ts +6 -0
- package/package.json +3 -3
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __export = (target, all) => {
|
|
6
|
+
for (var name in all)
|
|
7
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
+
};
|
|
9
|
+
var __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
+
}
|
|
15
|
+
return to;
|
|
16
|
+
};
|
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
|
|
19
|
+
// src/components/pisellTags/utils.ts
|
|
20
|
+
var utils_exports = {};
|
|
21
|
+
__export(utils_exports, {
|
|
22
|
+
generateColorShades: () => generateColorShades
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(utils_exports);
|
|
25
|
+
var hexToRgb = (hex) => {
|
|
26
|
+
hex = hex.replace(/^#/, "");
|
|
27
|
+
if (hex.length === 3) {
|
|
28
|
+
hex = hex.split("").map((h) => h + h).join("");
|
|
29
|
+
}
|
|
30
|
+
const intVal = parseInt(hex, 16);
|
|
31
|
+
return {
|
|
32
|
+
r: intVal >> 16 & 255,
|
|
33
|
+
// 提取红色分量
|
|
34
|
+
g: intVal >> 8 & 255,
|
|
35
|
+
// 提取绿色分量
|
|
36
|
+
b: intVal & 255
|
|
37
|
+
// 提取蓝色分量
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
var rgbToHex = (r, g, b) => {
|
|
41
|
+
return "#" + [r, g, b].map((x) => {
|
|
42
|
+
const hex = x.toString(16);
|
|
43
|
+
return hex.length === 1 ? "0" + hex : hex;
|
|
44
|
+
}).join("");
|
|
45
|
+
};
|
|
46
|
+
var parseColor = (color) => {
|
|
47
|
+
if (color.startsWith("#")) {
|
|
48
|
+
return hexToRgb(color);
|
|
49
|
+
} else if (color.startsWith("rgb")) {
|
|
50
|
+
const rgba = color.replace(/rgba?\(|\s+|\)/g, "").split(",").map(Number);
|
|
51
|
+
return { r: rgba[0], g: rgba[1], b: rgba[2], a: rgba[3] !== void 0 ? rgba[3] : 1 };
|
|
52
|
+
} else {
|
|
53
|
+
throw new Error("无效的颜色格式");
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
var generateColorShades = (color) => {
|
|
57
|
+
const { r, g, b, a } = parseColor(color);
|
|
58
|
+
const max = 700;
|
|
59
|
+
const gap = 1 / max;
|
|
60
|
+
const ratios = {
|
|
61
|
+
50: gap * 50,
|
|
62
|
+
200: gap * 200,
|
|
63
|
+
500: gap * 500,
|
|
64
|
+
600: gap * 600,
|
|
65
|
+
700: gap * 700
|
|
66
|
+
};
|
|
67
|
+
const adjustColorComponent = (component, ratio) => Math.round(component * ratio + 255 * (1 - ratio));
|
|
68
|
+
const shades = {
|
|
69
|
+
"color_50": rgbToHex(adjustColorComponent(r, ratios[50]), adjustColorComponent(g, ratios[50]), adjustColorComponent(b, ratios[50])),
|
|
70
|
+
"color_200": rgbToHex(adjustColorComponent(r, ratios[200]), adjustColorComponent(g, ratios[200]), adjustColorComponent(b, ratios[200])),
|
|
71
|
+
"color_500": rgbToHex(adjustColorComponent(r, ratios[500]), adjustColorComponent(g, ratios[500]), adjustColorComponent(b, ratios[500])),
|
|
72
|
+
"color_600": rgbToHex(adjustColorComponent(r, ratios[600]), adjustColorComponent(g, ratios[600]), adjustColorComponent(b, ratios[600])),
|
|
73
|
+
"color_700": color
|
|
74
|
+
};
|
|
75
|
+
if (a !== void 0) {
|
|
76
|
+
shades["color_50"] = `rgba(${adjustColorComponent(r, ratios[50])}, ${adjustColorComponent(g, ratios[50])}, ${adjustColorComponent(b, ratios[50])}, ${a})`;
|
|
77
|
+
shades["color_200"] = `rgba(${adjustColorComponent(r, ratios[200])}, ${adjustColorComponent(g, ratios[200])}, ${adjustColorComponent(b, ratios[200])}, ${a})`;
|
|
78
|
+
shades["color_500"] = `rgba(${adjustColorComponent(r, ratios[500])}, ${adjustColorComponent(g, ratios[500])}, ${adjustColorComponent(b, ratios[500])}, ${a})`;
|
|
79
|
+
shades["color_600"] = `rgba(${adjustColorComponent(r, ratios[600])}, ${adjustColorComponent(g, ratios[600])}, ${adjustColorComponent(b, ratios[600])}, ${a})`;
|
|
80
|
+
}
|
|
81
|
+
return shades;
|
|
82
|
+
};
|
|
83
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
84
|
+
0 && (module.exports = {
|
|
85
|
+
generateColorShades
|
|
86
|
+
});
|
|
@@ -33,7 +33,7 @@ __export(Amount_exports, {
|
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(Amount_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
|
-
var
|
|
36
|
+
var import_utils = require("@pisell/utils");
|
|
37
37
|
var import_usePisellConfig = __toESM(require("../../../pisell-config-provider/hooks/usePisellConfig"));
|
|
38
38
|
var Amount = (props) => {
|
|
39
39
|
const {
|
|
@@ -46,7 +46,7 @@ var Amount = (props) => {
|
|
|
46
46
|
} = props;
|
|
47
47
|
const config = (0, import_usePisellConfig.default)();
|
|
48
48
|
const amount = (0, import_react.useMemo)(() => {
|
|
49
|
-
return (0,
|
|
49
|
+
return (0, import_utils.formatAmountWithOptions)(value, (config == null ? void 0 : config.symbol) || "", {
|
|
50
50
|
precision,
|
|
51
51
|
showCurrencySymbol,
|
|
52
52
|
useThousandsSeparator,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { MenuProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface AvatarConfig {
|
|
5
|
+
src?: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
}
|
|
8
|
+
interface ProfileMenuProps {
|
|
9
|
+
menuIcon?: React.ReactNode;
|
|
10
|
+
userName?: string;
|
|
11
|
+
email?: string;
|
|
12
|
+
isShowUserName?: boolean;
|
|
13
|
+
isShowEmail?: boolean;
|
|
14
|
+
isShowUserInfo?: boolean;
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
avatar?: AvatarConfig;
|
|
17
|
+
className?: string;
|
|
18
|
+
style?: React.CSSProperties;
|
|
19
|
+
menuItems?: MenuProps['items'];
|
|
20
|
+
placement?: 'bottomLeft' | 'bottomCenter' | 'bottomRight' | 'topLeft' | 'topCenter' | 'topRight';
|
|
21
|
+
trigger?: ('click' | 'hover')[];
|
|
22
|
+
showBadge?: boolean;
|
|
23
|
+
badgeCount?: number;
|
|
24
|
+
}
|
|
25
|
+
declare const ProfileMenu: React.FC<ProfileMenuProps>;
|
|
26
|
+
export default ProfileMenu;
|
|
@@ -0,0 +1,113 @@
|
|
|
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/profileMenu/index.tsx
|
|
30
|
+
var profileMenu_exports = {};
|
|
31
|
+
__export(profileMenu_exports, {
|
|
32
|
+
default: () => profileMenu_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(profileMenu_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_icons = require("@ant-design/icons");
|
|
38
|
+
var import_classnames = __toESM(require("classnames"));
|
|
39
|
+
var import_pisellAvatar = __toESM(require("../pisellAvatar"));
|
|
40
|
+
var import_index = require("./index.less");
|
|
41
|
+
var ProfileMenu = ({
|
|
42
|
+
menuIcon,
|
|
43
|
+
userName = "",
|
|
44
|
+
email = "",
|
|
45
|
+
isShowUserName = true,
|
|
46
|
+
isShowEmail = true,
|
|
47
|
+
isShowUserInfo = false,
|
|
48
|
+
onClick,
|
|
49
|
+
avatar,
|
|
50
|
+
className,
|
|
51
|
+
style,
|
|
52
|
+
menuItems = [],
|
|
53
|
+
placement = "bottomRight",
|
|
54
|
+
trigger = ["click"],
|
|
55
|
+
showBadge = false,
|
|
56
|
+
badgeCount = 1
|
|
57
|
+
}) => {
|
|
58
|
+
(0, import_react.useEffect)(() => {
|
|
59
|
+
document.body.id = "body";
|
|
60
|
+
}, []);
|
|
61
|
+
const handleClick = (e) => {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
onClick == null ? void 0 : onClick();
|
|
64
|
+
};
|
|
65
|
+
const renderAvatar = (avatarProps) => /* @__PURE__ */ import_react.default.createElement(
|
|
66
|
+
import_pisellAvatar.default,
|
|
67
|
+
{
|
|
68
|
+
style: { margin: "0 6px" },
|
|
69
|
+
size: "md",
|
|
70
|
+
src: (avatarProps == null ? void 0 : avatarProps.src) || "",
|
|
71
|
+
alt: (avatarProps == null ? void 0 : avatarProps.alt) || "",
|
|
72
|
+
icon: /* @__PURE__ */ import_react.default.createElement(import_icons.UserOutlined, { style: { fontSize: 24, color: "#475467" } })
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
const finalMenuItems = (0, import_react.useMemo)(() => {
|
|
76
|
+
if (!isShowUserInfo)
|
|
77
|
+
return menuItems;
|
|
78
|
+
const userInfoItem = {
|
|
79
|
+
key: "user-info",
|
|
80
|
+
label: /* @__PURE__ */ import_react.default.createElement("div", { className: "profile-menu-user-info-item" }, renderAvatar(avatar), /* @__PURE__ */ import_react.default.createElement("div", { className: "profile-menu-user-info" }, userName && /* @__PURE__ */ import_react.default.createElement("p", { className: "profile-menu-user-info-name" }, userName), email && /* @__PURE__ */ import_react.default.createElement("p", { className: "profile-menu-user-info-email" }, email)))
|
|
81
|
+
};
|
|
82
|
+
return [
|
|
83
|
+
userInfoItem,
|
|
84
|
+
{ type: "divider" },
|
|
85
|
+
...menuItems || []
|
|
86
|
+
];
|
|
87
|
+
}, [isShowUserInfo, menuItems, userName, email, avatar]);
|
|
88
|
+
const showUserInfo = isShowUserName && userName || isShowEmail && email;
|
|
89
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
90
|
+
import_antd.Dropdown,
|
|
91
|
+
{
|
|
92
|
+
menu: { items: finalMenuItems },
|
|
93
|
+
placement,
|
|
94
|
+
trigger,
|
|
95
|
+
overlayClassName: "profile-menu-dropdown"
|
|
96
|
+
},
|
|
97
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
className: (0, import_classnames.default)("profile-menu-wrap", className),
|
|
101
|
+
style: {
|
|
102
|
+
...style,
|
|
103
|
+
paddingRight: showUserInfo ? 16 : 0
|
|
104
|
+
},
|
|
105
|
+
onClick: handleClick
|
|
106
|
+
},
|
|
107
|
+
menuIcon && /* @__PURE__ */ import_react.default.createElement("div", { className: "profile-menu-icon" }, menuIcon),
|
|
108
|
+
/* @__PURE__ */ import_react.default.createElement(import_antd.Badge, { count: showBadge ? badgeCount : 0, offset: [-6, 6] }, renderAvatar(avatar)),
|
|
109
|
+
showUserInfo && /* @__PURE__ */ import_react.default.createElement("div", { className: "profile-menu-user-info" }, isShowUserName && userName && /* @__PURE__ */ import_react.default.createElement("p", { className: "profile-menu-user-info-name", title: userName }, userName), isShowEmail && email && /* @__PURE__ */ import_react.default.createElement("p", { className: "profile-menu-user-info-email", title: email }, email))
|
|
110
|
+
)
|
|
111
|
+
);
|
|
112
|
+
};
|
|
113
|
+
var profileMenu_default = ProfileMenu;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
.profile-menu-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
max-width: 250px;
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
gap: 10px;
|
|
6
|
+
width: fit-content;
|
|
7
|
+
align-items: center;
|
|
8
|
+
padding-top: 6px;
|
|
9
|
+
padding-bottom: 6px;
|
|
10
|
+
padding-left: 16px;
|
|
11
|
+
|
|
12
|
+
border-radius: 50px;
|
|
13
|
+
border: 1px solid var(--Gray-100, #f2f4f7);
|
|
14
|
+
background: var(--Base-White, #fff);
|
|
15
|
+
cursor: pointer;
|
|
16
|
+
transition: all 0.3s ease;
|
|
17
|
+
|
|
18
|
+
/* Shadow/sm */
|
|
19
|
+
// box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1),
|
|
20
|
+
// 0px 1px 2px 0px rgba(16, 24, 40, 0.06);
|
|
21
|
+
|
|
22
|
+
&:hover {
|
|
23
|
+
border-color: var(--Gray-200, #e5e7eb);
|
|
24
|
+
box-shadow: 0px 2px 4px 0px rgba(16, 24, 40, 0.15);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.profile-menu-icon {
|
|
28
|
+
display: flex;
|
|
29
|
+
align-items: center;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.profile-menu-user-info{
|
|
33
|
+
flex: 1;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
.profile-menu-user-info {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
min-width: 0;
|
|
43
|
+
padding: 0;
|
|
44
|
+
|
|
45
|
+
&-item {
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
gap: 12px;
|
|
49
|
+
width: 100%;
|
|
50
|
+
flex-wrap: nowrap;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&-name {
|
|
54
|
+
color: var(--Gray-700, #344054);
|
|
55
|
+
font-family: Inter;
|
|
56
|
+
font-size: 14px;
|
|
57
|
+
font-weight: 600;
|
|
58
|
+
line-height: 20px;
|
|
59
|
+
margin: 0;
|
|
60
|
+
white-space: nowrap;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
text-overflow: ellipsis;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
&-email {
|
|
66
|
+
color: var(--Gray-600, #475467);
|
|
67
|
+
font-family: Inter;
|
|
68
|
+
font-size: 14px;
|
|
69
|
+
font-weight: 400;
|
|
70
|
+
line-height: 20px;
|
|
71
|
+
margin: 0;
|
|
72
|
+
white-space: nowrap;
|
|
73
|
+
overflow: hidden;
|
|
74
|
+
text-overflow: ellipsis;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.profile-menu-dropdown {
|
|
79
|
+
.ant-dropdown-menu {
|
|
80
|
+
min-width: fit-content;
|
|
81
|
+
max-width: 250px;
|
|
82
|
+
padding: 8px;
|
|
83
|
+
border-radius: 8px;
|
|
84
|
+
border: 1px solid var(--Gray-100, #f2f4f7);
|
|
85
|
+
background: var(--Base-White, #fff);
|
|
86
|
+
box-shadow: 0px 4px 6px -2px rgba(16, 24, 40, 0.03),
|
|
87
|
+
0px 12px 16px -4px rgba(16, 24, 40, 0.08);
|
|
88
|
+
|
|
89
|
+
.ant-dropdown-menu-item {
|
|
90
|
+
padding: 8px 12px;
|
|
91
|
+
border-radius: 6px;
|
|
92
|
+
min-height: 40px;
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
|
|
96
|
+
&:hover {
|
|
97
|
+
background: var(--Gray-50, #f9fafb);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:active {
|
|
101
|
+
background: var(--Gray-100, #f2f4f7);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.profile-menu-user-info-item {
|
|
105
|
+
display: flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
gap: 12px;
|
|
108
|
+
width: 100%;
|
|
109
|
+
flex-wrap: nowrap;
|
|
110
|
+
overflow: hidden;
|
|
111
|
+
|
|
112
|
+
.profile-menu-user-info {
|
|
113
|
+
flex: 1;
|
|
114
|
+
min-width: 0;
|
|
115
|
+
overflow: hidden;
|
|
116
|
+
|
|
117
|
+
&-name,
|
|
118
|
+
&-email {
|
|
119
|
+
width: 100%;
|
|
120
|
+
padding-right: 8px;
|
|
121
|
+
margin: 0;
|
|
122
|
+
white-space: nowrap;
|
|
123
|
+
overflow: hidden;
|
|
124
|
+
text-overflow: ellipsis;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.ant-dropdown-menu-item-divider {
|
|
131
|
+
margin: 8px 0;
|
|
132
|
+
background-color: var(--Gray-100, #f2f4f7);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -34,6 +34,7 @@ __export(Header_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(Header_exports);
|
|
35
35
|
var import_react = __toESM(require("react"));
|
|
36
36
|
var import_utils = require("@pisell/utils");
|
|
37
|
+
var import_page_header = __toESM(require("../../page-header"));
|
|
37
38
|
var import_Buttons = __toESM(require("./Buttons"));
|
|
38
39
|
var import_index = require("./index.less");
|
|
39
40
|
var Header = ({
|
|
@@ -64,6 +65,15 @@ var Header = ({
|
|
|
64
65
|
}
|
|
65
66
|
return subTitle;
|
|
66
67
|
}, [subTitle]);
|
|
67
|
-
return showHeader ? /* @__PURE__ */ import_react.default.createElement(
|
|
68
|
+
return showHeader ? /* @__PURE__ */ import_react.default.createElement(
|
|
69
|
+
import_page_header.default,
|
|
70
|
+
{
|
|
71
|
+
title: titleNode,
|
|
72
|
+
showTitle,
|
|
73
|
+
subTitle: subTitleNode,
|
|
74
|
+
showSubTitle,
|
|
75
|
+
extra: buttonsNode
|
|
76
|
+
}
|
|
77
|
+
) : null;
|
|
68
78
|
};
|
|
69
79
|
var Header_default = Header;
|
package/lib/index.d.ts
CHANGED
|
@@ -98,6 +98,8 @@ export { default as PisellToast } from './components/pisellToast';
|
|
|
98
98
|
export { default as PisellWalletPassCard } from './components/pisellWalletPassCard';
|
|
99
99
|
export { default as PisellScan } from './components/pisellScan';
|
|
100
100
|
export { default as PisellAlert } from './components/pisellAlert';
|
|
101
|
+
export { default as PisellAvatar } from './components/pisellAvatar';
|
|
102
|
+
export { default as ProfileMenu } from './components/profileMenu';
|
|
101
103
|
export { default as PisellCard } from './components/pisellCard';
|
|
102
104
|
export { default as PisellInformationEntry } from './components/pisellInformationEntry';
|
|
103
105
|
export { default as usePisellConfig } from './components/pisell-config-provider/hooks/usePisellConfig';
|
|
@@ -129,3 +131,7 @@ export { default as DataSourceWrapper } from './components/dataSourceComponents/
|
|
|
129
131
|
export { default as DataSourceTypography } from './components/dataSourceComponents/dataSourceShow/dataSourceTypography';
|
|
130
132
|
export { default as DataSourceImage } from './components/dataSourceComponents/dataSourceShow/dataSourceImage';
|
|
131
133
|
export { default as DataSourceQRCode } from './components/dataSourceComponents/dataSourceShow/dataSourceQRCode';
|
|
134
|
+
export { default as PageHeader } from './components/page-header';
|
|
135
|
+
export { default as OrganizationTenantSwitcher } from './components/organizationTenantSwitcher';
|
|
136
|
+
export { default as PisellTags } from './components/pisellTags';
|
|
137
|
+
export { default as loginAndRegister } from './components/login-and-register';
|
package/lib/index.js
CHANGED
|
@@ -90,11 +90,14 @@ __export(src_exports, {
|
|
|
90
90
|
Mentions: () => import_antd19.Mentions,
|
|
91
91
|
Menu: () => import_antd18.Menu,
|
|
92
92
|
Modal: () => import_modal.default,
|
|
93
|
+
OrganizationTenantSwitcher: () => import_organizationTenantSwitcher.default,
|
|
93
94
|
Page: () => import_page.default,
|
|
95
|
+
PageHeader: () => import_page_header.default,
|
|
94
96
|
Pagination: () => import_antd22.Pagination,
|
|
95
97
|
PisellAdjustPrice: () => import_pisellAdjustPrice.default,
|
|
96
98
|
PisellAdjustPriceInputNumber: () => import_PisellAdjustPriceInputNumber.default,
|
|
97
99
|
PisellAlert: () => import_pisellAlert.default,
|
|
100
|
+
PisellAvatar: () => import_pisellAvatar.default,
|
|
98
101
|
PisellCard: () => import_pisellCard.default,
|
|
99
102
|
PisellCardList: () => import_pisellCardList.default,
|
|
100
103
|
PisellCheckboxGroup: () => import_pisellCheckboxGroup.default,
|
|
@@ -114,6 +117,7 @@ __export(src_exports, {
|
|
|
114
117
|
PisellRow: () => import_pisellRow.default,
|
|
115
118
|
PisellScan: () => import_pisellScan.default,
|
|
116
119
|
PisellStatisticList: () => import_pisellStatisticList.default,
|
|
120
|
+
PisellTags: () => import_pisellTags.default,
|
|
117
121
|
PisellText: () => import_pisellText.default,
|
|
118
122
|
PisellToast: () => import_pisellToast.default,
|
|
119
123
|
PisellTooltip: () => import_pisellTooltip.default,
|
|
@@ -121,6 +125,7 @@ __export(src_exports, {
|
|
|
121
125
|
PisellWalletPassCard: () => import_pisellWalletPassCard.default,
|
|
122
126
|
Popconfirm: () => import_antd23.Popconfirm,
|
|
123
127
|
Popover: () => import_antd24.Popover,
|
|
128
|
+
ProfileMenu: () => import_profileMenu.default,
|
|
124
129
|
Progress: () => import_antd25.Progress,
|
|
125
130
|
QRCode: () => import_qrcode.default,
|
|
126
131
|
Radio: () => import_radio.default,
|
|
@@ -157,6 +162,7 @@ __export(src_exports, {
|
|
|
157
162
|
VirtualKeyboardTime: () => import_Time.default,
|
|
158
163
|
getBankCardTypeImg: () => import_utils.getBankCardTypeImg,
|
|
159
164
|
globalConfig: () => import_context.globalConfig,
|
|
165
|
+
loginAndRegister: () => import_login_and_register.default,
|
|
160
166
|
message: () => import_antd17.message,
|
|
161
167
|
notification: () => import_antd21.notification,
|
|
162
168
|
usePisellConfig: () => import_usePisellConfig.default,
|
|
@@ -263,6 +269,8 @@ var import_pisellToast = __toESM(require("./components/pisellToast"));
|
|
|
263
269
|
var import_pisellWalletPassCard = __toESM(require("./components/pisellWalletPassCard"));
|
|
264
270
|
var import_pisellScan = __toESM(require("./components/pisellScan"));
|
|
265
271
|
var import_pisellAlert = __toESM(require("./components/pisellAlert"));
|
|
272
|
+
var import_pisellAvatar = __toESM(require("./components/pisellAvatar"));
|
|
273
|
+
var import_profileMenu = __toESM(require("./components/profileMenu"));
|
|
266
274
|
var import_pisellCard = __toESM(require("./components/pisellCard"));
|
|
267
275
|
var import_pisellInformationEntry = __toESM(require("./components/pisellInformationEntry"));
|
|
268
276
|
var import_usePisellConfig = __toESM(require("./components/pisell-config-provider/hooks/usePisellConfig"));
|
|
@@ -294,6 +302,10 @@ var import_dataSourceWrapper = __toESM(require("./components/dataSourceComponent
|
|
|
294
302
|
var import_dataSourceTypography = __toESM(require("./components/dataSourceComponents/dataSourceShow/dataSourceTypography"));
|
|
295
303
|
var import_dataSourceImage = __toESM(require("./components/dataSourceComponents/dataSourceShow/dataSourceImage"));
|
|
296
304
|
var import_dataSourceQRCode = __toESM(require("./components/dataSourceComponents/dataSourceShow/dataSourceQRCode"));
|
|
305
|
+
var import_page_header = __toESM(require("./components/page-header"));
|
|
306
|
+
var import_organizationTenantSwitcher = __toESM(require("./components/organizationTenantSwitcher"));
|
|
307
|
+
var import_pisellTags = __toESM(require("./components/pisellTags"));
|
|
308
|
+
var import_login_and_register = __toESM(require("./components/login-and-register"));
|
|
297
309
|
// Annotate the CommonJS export names for ESM import in node:
|
|
298
310
|
0 && (module.exports = {
|
|
299
311
|
Affix,
|
|
@@ -357,11 +369,14 @@ var import_dataSourceQRCode = __toESM(require("./components/dataSourceComponents
|
|
|
357
369
|
Mentions,
|
|
358
370
|
Menu,
|
|
359
371
|
Modal,
|
|
372
|
+
OrganizationTenantSwitcher,
|
|
360
373
|
Page,
|
|
374
|
+
PageHeader,
|
|
361
375
|
Pagination,
|
|
362
376
|
PisellAdjustPrice,
|
|
363
377
|
PisellAdjustPriceInputNumber,
|
|
364
378
|
PisellAlert,
|
|
379
|
+
PisellAvatar,
|
|
365
380
|
PisellCard,
|
|
366
381
|
PisellCardList,
|
|
367
382
|
PisellCheckboxGroup,
|
|
@@ -381,6 +396,7 @@ var import_dataSourceQRCode = __toESM(require("./components/dataSourceComponents
|
|
|
381
396
|
PisellRow,
|
|
382
397
|
PisellScan,
|
|
383
398
|
PisellStatisticList,
|
|
399
|
+
PisellTags,
|
|
384
400
|
PisellText,
|
|
385
401
|
PisellToast,
|
|
386
402
|
PisellTooltip,
|
|
@@ -388,6 +404,7 @@ var import_dataSourceQRCode = __toESM(require("./components/dataSourceComponents
|
|
|
388
404
|
PisellWalletPassCard,
|
|
389
405
|
Popconfirm,
|
|
390
406
|
Popover,
|
|
407
|
+
ProfileMenu,
|
|
391
408
|
Progress,
|
|
392
409
|
QRCode,
|
|
393
410
|
Radio,
|
|
@@ -424,6 +441,7 @@ var import_dataSourceQRCode = __toESM(require("./components/dataSourceComponents
|
|
|
424
441
|
VirtualKeyboardTime,
|
|
425
442
|
getBankCardTypeImg,
|
|
426
443
|
globalConfig,
|
|
444
|
+
loginAndRegister,
|
|
427
445
|
message,
|
|
428
446
|
notification,
|
|
429
447
|
usePisellConfig,
|
package/lib/locales/en-US.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ declare const _default: {
|
|
|
133
133
|
'pisell-data-source-table-delete': string;
|
|
134
134
|
'pisell-data-source-form-required-message': string;
|
|
135
135
|
'pisell-data-source-form-email-message': string;
|
|
136
|
+
'pisell-data-source-form-domain-message': string;
|
|
136
137
|
'pisell-data-source-form-url-message': string;
|
|
137
138
|
'pisell-data-source-form-phone-message': string;
|
|
138
139
|
'pisell-data-source-form-min-length-message': (minLength: number) => string;
|
package/lib/locales/en-US.js
CHANGED
|
@@ -167,6 +167,7 @@ var en_US_default = {
|
|
|
167
167
|
"pisell-data-source-table-delete": "Delete",
|
|
168
168
|
"pisell-data-source-form-required-message": "This field is required",
|
|
169
169
|
"pisell-data-source-form-email-message": "Please enter a valid email address",
|
|
170
|
+
"pisell-data-source-form-domain-message": "Please enter a valid domain",
|
|
170
171
|
"pisell-data-source-form-url-message": "Please enter a valid URL",
|
|
171
172
|
"pisell-data-source-form-phone-message": "Please enter a valid phone number",
|
|
172
173
|
"pisell-data-source-form-min-length-message": (minLength) => `Length must be at least ${minLength} character`,
|
package/lib/locales/zh-CN.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ declare const _default: {
|
|
|
133
133
|
'pisell-data-source-table-delete': string;
|
|
134
134
|
'pisell-data-source-form-required-message': string;
|
|
135
135
|
'pisell-data-source-form-email-message': string;
|
|
136
|
+
'pisell-data-source-form-domain-message': string;
|
|
136
137
|
'pisell-data-source-form-url-message': string;
|
|
137
138
|
'pisell-data-source-form-phone-message': string;
|
|
138
139
|
'pisell-data-source-form-min-length-message': (minLength: number) => string;
|
package/lib/locales/zh-CN.js
CHANGED
|
@@ -166,6 +166,7 @@ var zh_CN_default = {
|
|
|
166
166
|
"pisell-data-source-table-delete": "删除",
|
|
167
167
|
"pisell-data-source-form-required-message": "该字段为必填项",
|
|
168
168
|
"pisell-data-source-form-email-message": "请输入有效的电子邮件地址",
|
|
169
|
+
"pisell-data-source-form-domain-message": "请输入有效的域名",
|
|
169
170
|
"pisell-data-source-form-url-message": "请输入正确的网址",
|
|
170
171
|
"pisell-data-source-form-phone-message": "请输入有效的电话号码",
|
|
171
172
|
"pisell-data-source-form-min-length-message": (minLength) => `长度必须至少为${minLength}个字符`,
|
package/lib/locales/zh-TW.d.ts
CHANGED
|
@@ -133,6 +133,7 @@ declare const _default: {
|
|
|
133
133
|
'pisell-data-source-table-delete': string;
|
|
134
134
|
'pisell-data-source-form-required-message': string;
|
|
135
135
|
'pisell-data-source-form-email-message': string;
|
|
136
|
+
'pisell-data-source-form-domain-message': string;
|
|
136
137
|
'pisell-data-source-form-url-message': string;
|
|
137
138
|
'pisell-data-source-form-phone-message': string;
|
|
138
139
|
'pisell-data-source-form-min-length-message': (minLength: number) => string;
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -167,6 +167,7 @@ var zh_TW_default = {
|
|
|
167
167
|
"pisell-data-source-table-delete": "刪除",
|
|
168
168
|
"pisell-data-source-form-required-message": "該字段為必填項",
|
|
169
169
|
"pisell-data-source-form-email-message": "請輸入有效的電子郵件地址",
|
|
170
|
+
"pisell-data-source-form-domain-message": "請輸入有效的域名",
|
|
170
171
|
"pisell-data-source-form-url-message": "請輸入正確的網址",
|
|
171
172
|
"pisell-data-source-form-phone-message": "請輸入有效的電話號碼",
|
|
172
173
|
"pisell-data-source-form-min-length-message": (minLength) => `長度必須至少為${minLength}个字符`,
|
|
@@ -460,10 +460,24 @@ export const generalItemMap = {
|
|
|
460
460
|
{ title: '字符串', value: 'string' },
|
|
461
461
|
{ title: '邮箱', value: 'email' },
|
|
462
462
|
{ title: '网址', value: 'url' },
|
|
463
|
+
{ title: '域名', value: 'domain' },
|
|
464
|
+
{ title: '正则', value: 'pattern' },
|
|
463
465
|
],
|
|
464
466
|
},
|
|
465
467
|
},
|
|
466
468
|
},
|
|
469
|
+
{
|
|
470
|
+
name: 'pattern',
|
|
471
|
+
title: {
|
|
472
|
+
type: 'i18n',
|
|
473
|
+
'en-US': 'Pattern',
|
|
474
|
+
'zh-CN': '正则',
|
|
475
|
+
},
|
|
476
|
+
setter: 'StringSetter',
|
|
477
|
+
condition: (target: any) => {
|
|
478
|
+
return target.parent.getPropValue('type') === 'pattern';
|
|
479
|
+
},
|
|
480
|
+
},
|
|
467
481
|
{
|
|
468
482
|
name: 'message',
|
|
469
483
|
title: {
|
|
@@ -1303,10 +1317,24 @@ export const formItemGeneralProps = [
|
|
|
1303
1317
|
{ title: '字符串', value: 'string' },
|
|
1304
1318
|
{ title: '邮箱', value: 'email' },
|
|
1305
1319
|
{ title: '网址', value: 'url' },
|
|
1320
|
+
{ title: '域名', value: 'domain' },
|
|
1321
|
+
{ title: '正则', value: 'pattern' },
|
|
1306
1322
|
],
|
|
1307
1323
|
},
|
|
1308
1324
|
},
|
|
1309
1325
|
},
|
|
1326
|
+
{
|
|
1327
|
+
name: 'pattern',
|
|
1328
|
+
title: {
|
|
1329
|
+
type: 'i18n',
|
|
1330
|
+
'en-US': 'Pattern',
|
|
1331
|
+
'zh-CN': '正则',
|
|
1332
|
+
},
|
|
1333
|
+
setter: 'StringSetter',
|
|
1334
|
+
condition: (target: any) => {
|
|
1335
|
+
return target.parent.getPropValue('type') === 'pattern';
|
|
1336
|
+
},
|
|
1337
|
+
},
|
|
1310
1338
|
{
|
|
1311
1339
|
name: 'message',
|
|
1312
1340
|
title: {
|
|
@@ -1478,3 +1506,39 @@ export const genGeneralVariablesSetting = ({
|
|
|
1478
1506
|
},
|
|
1479
1507
|
};
|
|
1480
1508
|
};
|
|
1509
|
+
|
|
1510
|
+
|
|
1511
|
+
export const inputPlaceholder = {
|
|
1512
|
+
type: 'i18n',
|
|
1513
|
+
'en': 'Enter',
|
|
1514
|
+
'zh-CN': '请输入',
|
|
1515
|
+
'zh-HK': '請輸入',
|
|
1516
|
+
};
|
|
1517
|
+
|
|
1518
|
+
export const selectPlaceholder = {
|
|
1519
|
+
type: 'i18n',
|
|
1520
|
+
'en': 'Select an option',
|
|
1521
|
+
'zh-CN': '请选择一个选项',
|
|
1522
|
+
'zh-HK': '請選擇一個選項',
|
|
1523
|
+
};
|
|
1524
|
+
|
|
1525
|
+
export const selectMultiplePlaceholder = {
|
|
1526
|
+
type: 'i18n',
|
|
1527
|
+
'en': 'Select one or more options',
|
|
1528
|
+
'zh-CN': '请选择一个或多个选项',
|
|
1529
|
+
'zh-HK': '請選擇一個或多個選項',
|
|
1530
|
+
};
|
|
1531
|
+
|
|
1532
|
+
export const datePickerPlaceholder = {
|
|
1533
|
+
type: 'i18n',
|
|
1534
|
+
'en': 'Select a date',
|
|
1535
|
+
'zh-CN': '请选择日期',
|
|
1536
|
+
'zh-HK': '請選擇日期',
|
|
1537
|
+
};
|
|
1538
|
+
|
|
1539
|
+
export const timePickerPlaceholder = {
|
|
1540
|
+
type: 'i18n',
|
|
1541
|
+
'en': 'Select a time',
|
|
1542
|
+
'zh-CN': '请选择时间',
|
|
1543
|
+
'zh-HK': '請選擇時間',
|
|
1544
|
+
};
|