@pisell/materials 6.0.6 → 6.0.8
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/pisellViewGrid/index.d.ts +16 -0
- package/es/components/pisellViewGrid/index.js +66 -0
- package/es/components/pisellViewGrid/index.less +31 -0
- 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 +7 -0
- package/es/index.js +8 -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/pisellViewGrid/index.d.ts +16 -0
- package/lib/components/pisellViewGrid/index.js +98 -0
- package/lib/components/pisellViewGrid/index.less +31 -0
- 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 +7 -0
- package/lib/index.js +21 -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/pisell-view-grid/__screenshots__/card-1.png +0 -0
- package/lowcode/pisell-view-grid/meta.ts +167 -0
- package/lowcode/pisell-view-grid/snippets.ts +54 -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 +1 -1
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
.saas-login-container {
|
|
2
|
+
// width: 100%;
|
|
3
|
+
max-width: 360px;
|
|
4
|
+
overflow-x: hidden;
|
|
5
|
+
// margin: 0 auto;
|
|
6
|
+
// padding: 24px;
|
|
7
|
+
text-align: center;
|
|
8
|
+
// height: 100%;
|
|
9
|
+
// overflow-y: auto;
|
|
10
|
+
|
|
11
|
+
// Logo样式
|
|
12
|
+
.saas-login-logo {
|
|
13
|
+
height: 48px;
|
|
14
|
+
margin-bottom: 24px;
|
|
15
|
+
border-radius: 8px;
|
|
16
|
+
|
|
17
|
+
&.left {
|
|
18
|
+
margin-right: auto;
|
|
19
|
+
margin-left: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&.center {
|
|
23
|
+
margin: 0 auto;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.right {
|
|
27
|
+
margin-left: auto;
|
|
28
|
+
margin-right: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
img {
|
|
32
|
+
height: 48px;
|
|
33
|
+
object-fit: contain;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.saas-login-title {
|
|
38
|
+
font-size: 24px;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
color: #101828;
|
|
41
|
+
margin-top: 0;
|
|
42
|
+
margin-bottom: 12px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.saas-login-subtitle {
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
color: #667085;
|
|
48
|
+
margin-top: 0;
|
|
49
|
+
margin-bottom: 32px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.saas-login-tabs {
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
gap: 24px;
|
|
56
|
+
margin-bottom: 32px;
|
|
57
|
+
border-bottom: 1px solid #E4E7EC;
|
|
58
|
+
|
|
59
|
+
.tab {
|
|
60
|
+
padding: 12px 24px;
|
|
61
|
+
cursor: pointer;
|
|
62
|
+
color: #667085;
|
|
63
|
+
font-weight: 500;
|
|
64
|
+
position: relative;
|
|
65
|
+
|
|
66
|
+
&.active {
|
|
67
|
+
color: #7F56D9;
|
|
68
|
+
|
|
69
|
+
&:after {
|
|
70
|
+
content: '';
|
|
71
|
+
position: absolute;
|
|
72
|
+
bottom: -1px;
|
|
73
|
+
left: 0;
|
|
74
|
+
right: 0;
|
|
75
|
+
height: 2px;
|
|
76
|
+
background: #7F56D9;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:hover {
|
|
81
|
+
color: #6941C6;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// 表单区域样式
|
|
87
|
+
.saas-login-form {
|
|
88
|
+
// 表单项标题
|
|
89
|
+
.form-item-label {
|
|
90
|
+
font-size: 14px;
|
|
91
|
+
font-weight: 500;
|
|
92
|
+
color: #344054;
|
|
93
|
+
margin-bottom: 6px;
|
|
94
|
+
text-align: left;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 输入框样式
|
|
98
|
+
.saas-login-input {
|
|
99
|
+
height: 44px;
|
|
100
|
+
border-radius: 8px;
|
|
101
|
+
border: 1px solid #D0D5DD;
|
|
102
|
+
background: #FFF;
|
|
103
|
+
|
|
104
|
+
&:hover {
|
|
105
|
+
border-color: #7F56D9;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:focus {
|
|
109
|
+
border-color: #7F56D9;
|
|
110
|
+
box-shadow: 0 0 0 4px rgba(127, 86, 217, 0.1);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
&.ant-input-password {
|
|
114
|
+
padding: 4px 11px;
|
|
115
|
+
|
|
116
|
+
.ant-input {
|
|
117
|
+
height: 34px;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// 登录按钮样式
|
|
123
|
+
.saas-login-button {
|
|
124
|
+
height: 44px;
|
|
125
|
+
border-radius: 8px;
|
|
126
|
+
background: #7F56D9;
|
|
127
|
+
border: none;
|
|
128
|
+
font-weight: 500;
|
|
129
|
+
|
|
130
|
+
&:hover {
|
|
131
|
+
background: #6941C6;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&:focus {
|
|
135
|
+
background: #7F56D9;
|
|
136
|
+
box-shadow: 0 0 0 4px rgba(127, 86, 217, 0.1);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// 社交登录按钮样式
|
|
141
|
+
.saas-login-social {
|
|
142
|
+
width: 100%;
|
|
143
|
+
|
|
144
|
+
.saas-login-social-button {
|
|
145
|
+
height: 44px;
|
|
146
|
+
border-radius: 8px;
|
|
147
|
+
|
|
148
|
+
&.google {
|
|
149
|
+
border-color: #D0D5DD;
|
|
150
|
+
|
|
151
|
+
&:hover {
|
|
152
|
+
background: #F9FAFB;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&.facebook {
|
|
157
|
+
border-color: #D0D5DD;
|
|
158
|
+
|
|
159
|
+
&:hover {
|
|
160
|
+
background: #F9FAFB;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&.apple {
|
|
165
|
+
border-color: #D0D5DD;
|
|
166
|
+
|
|
167
|
+
&:hover {
|
|
168
|
+
background: #F9FAFB;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
// 页脚样式
|
|
176
|
+
.saas-login-footer {
|
|
177
|
+
margin-top: 32px;
|
|
178
|
+
|
|
179
|
+
.saas-login-signup {
|
|
180
|
+
font-size: 14px;
|
|
181
|
+
color: #667085;
|
|
182
|
+
margin-bottom: 16px;
|
|
183
|
+
|
|
184
|
+
a {
|
|
185
|
+
color: #7F56D9;
|
|
186
|
+
margin-left: 4px;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
|
|
189
|
+
&:hover {
|
|
190
|
+
color: #6941C6;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
.saas-login-links {
|
|
196
|
+
display: flex;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
gap: 24px;
|
|
199
|
+
|
|
200
|
+
a {
|
|
201
|
+
font-size: 14px;
|
|
202
|
+
color: #667085;
|
|
203
|
+
cursor: pointer;
|
|
204
|
+
|
|
205
|
+
&:hover {
|
|
206
|
+
color: #101828;
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
Binary file
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface OrganizationTenantSwitcherProps {
|
|
4
|
+
onChange?: (value: string, option: any) => void;
|
|
5
|
+
value: string;
|
|
6
|
+
options: {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
logo?: string;
|
|
10
|
+
}[];
|
|
11
|
+
showLogo?: boolean;
|
|
12
|
+
showName?: boolean;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
onClick?: React.MouseEventHandler<HTMLDivElement>;
|
|
15
|
+
}
|
|
16
|
+
declare const OrganizationTenantSwitcher: React.FC<OrganizationTenantSwitcherProps>;
|
|
17
|
+
export default OrganizationTenantSwitcher;
|
|
@@ -0,0 +1,119 @@
|
|
|
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/organizationTenantSwitcher/index.tsx
|
|
30
|
+
var organizationTenantSwitcher_exports = {};
|
|
31
|
+
__export(organizationTenantSwitcher_exports, {
|
|
32
|
+
default: () => organizationTenantSwitcher_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(organizationTenantSwitcher_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_Check = __toESM(require("@pisell/icon/es/Check"));
|
|
39
|
+
var import_ChevronDown = __toESM(require("@pisell/icon/es/ChevronDown"));
|
|
40
|
+
var import_defaultLogo = __toESM(require("./defaultLogo.png"));
|
|
41
|
+
var import_index = require("./index.less");
|
|
42
|
+
var Logo = ({ logo, className }) => {
|
|
43
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
44
|
+
"img",
|
|
45
|
+
{
|
|
46
|
+
src: logo || import_defaultLogo.default,
|
|
47
|
+
alt: "logo",
|
|
48
|
+
className: (0, import_classnames.default)(
|
|
49
|
+
"organization-tenant-switcher-item-logo",
|
|
50
|
+
className
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
);
|
|
54
|
+
};
|
|
55
|
+
var OrganizationTenantSwitcher = ({
|
|
56
|
+
onChange,
|
|
57
|
+
value,
|
|
58
|
+
options,
|
|
59
|
+
showLogo = true,
|
|
60
|
+
showName = true,
|
|
61
|
+
readOnly = false,
|
|
62
|
+
onClick
|
|
63
|
+
}) => {
|
|
64
|
+
const getCurrentOrg = () => {
|
|
65
|
+
return options.find((opt) => (opt == null ? void 0 : opt.value) === value);
|
|
66
|
+
};
|
|
67
|
+
const items = [
|
|
68
|
+
...options.map((opt) => ({
|
|
69
|
+
key: opt == null ? void 0 : opt.value,
|
|
70
|
+
label: /* @__PURE__ */ import_react.default.createElement("div", { className: "organization-tenant-switcher-item" }, /* @__PURE__ */ import_react.default.createElement(Logo, { logo: opt == null ? void 0 : opt.logo }), /* @__PURE__ */ import_react.default.createElement("div", { className: "organization-tenant-switcher-item-name", title: opt == null ? void 0 : opt.label }, opt == null ? void 0 : opt.label), (opt == null ? void 0 : opt.value) === value && /* @__PURE__ */ import_react.default.createElement(import_Check.default, { className: "organization-tenant-switcher-item-check" }))
|
|
71
|
+
}))
|
|
72
|
+
];
|
|
73
|
+
const handleMenuClick = (e) => {
|
|
74
|
+
if (e.key !== "create") {
|
|
75
|
+
const selectedOption = options.find((opt) => opt.value === e.key);
|
|
76
|
+
if (selectedOption) {
|
|
77
|
+
onChange == null ? void 0 : onChange(selectedOption.value, selectedOption);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
const currentOrg = getCurrentOrg();
|
|
82
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
83
|
+
import_antd.Dropdown,
|
|
84
|
+
{
|
|
85
|
+
overlayClassName: "organization-tenant-switcher-overlay",
|
|
86
|
+
menu: {
|
|
87
|
+
items,
|
|
88
|
+
onClick: handleMenuClick,
|
|
89
|
+
selectedKeys: [value],
|
|
90
|
+
style: {
|
|
91
|
+
maxHeight: 370,
|
|
92
|
+
overflow: "auto"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
trigger: readOnly ? [] : ["click"],
|
|
96
|
+
disabled: readOnly
|
|
97
|
+
},
|
|
98
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
99
|
+
"div",
|
|
100
|
+
{
|
|
101
|
+
className: (0, import_classnames.default)("organization-tenant-switcher-switch", {
|
|
102
|
+
"organization-tenant-switcher-switch-readonly": readOnly
|
|
103
|
+
}),
|
|
104
|
+
style: !showLogo ? { paddingLeft: 16 } : {},
|
|
105
|
+
onClick
|
|
106
|
+
},
|
|
107
|
+
showLogo && /* @__PURE__ */ import_react.default.createElement(
|
|
108
|
+
Logo,
|
|
109
|
+
{
|
|
110
|
+
logo: currentOrg == null ? void 0 : currentOrg.logo,
|
|
111
|
+
className: "organization-tenant-switcher-switch-logo"
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "organization-tenant-switcher-switch-name", title: currentOrg == null ? void 0 : currentOrg.label }, showName && (currentOrg == null ? void 0 : currentOrg.label)),
|
|
115
|
+
!readOnly && /* @__PURE__ */ import_react.default.createElement(import_ChevronDown.default, { className: "organization-tenant-switcher-switch-chevron" })
|
|
116
|
+
)
|
|
117
|
+
);
|
|
118
|
+
};
|
|
119
|
+
var organizationTenantSwitcher_default = OrganizationTenantSwitcher;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
.organization-tenant-switcher-switch {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
gap: 10px;
|
|
6
|
+
padding: 6px 16px 6px 6px;
|
|
7
|
+
height: 52px;
|
|
8
|
+
width: fit-content;
|
|
9
|
+
max-width: 220px;
|
|
10
|
+
|
|
11
|
+
border-radius: 8px;
|
|
12
|
+
border: 1px solid var(--Gray-100, #f2f4f7);
|
|
13
|
+
background: var(--Base-White, #fff);
|
|
14
|
+
transition: all 0.3s ease;
|
|
15
|
+
|
|
16
|
+
&:hover {
|
|
17
|
+
border-color: var(--Gray-200, #e5e7eb);
|
|
18
|
+
box-shadow: 0px 2px 4px 0px rgba(16, 24, 40, 0.15);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&-readonly {
|
|
22
|
+
border: none;
|
|
23
|
+
padding-right: 16px;
|
|
24
|
+
|
|
25
|
+
&:hover {
|
|
26
|
+
border: none;
|
|
27
|
+
box-shadow: none;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.organization-tenant-switcher-overlay {
|
|
33
|
+
.pisell-lowcode-dropdown-menu-item {
|
|
34
|
+
padding: 9px 10px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.organization-tenant-switcher-switch-name {
|
|
39
|
+
flex: 1;
|
|
40
|
+
overflow: hidden;
|
|
41
|
+
text-overflow: ellipsis;
|
|
42
|
+
white-space: nowrap;
|
|
43
|
+
color: var(--Gray-700, #344054);
|
|
44
|
+
font-size: 14px;
|
|
45
|
+
font-style: normal;
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
line-height: 20px; /* 142.857% */
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.organization-tenant-switcher-switch-logo {
|
|
51
|
+
margin-right: 6px;
|
|
52
|
+
color: #344054;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.organization-tenant-switcher-item-check {
|
|
56
|
+
font-size: 16px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.organization-tenant-switcher-item-name {
|
|
60
|
+
flex: 1;
|
|
61
|
+
color: var(--Gray-700, #344054);
|
|
62
|
+
font-size: 14px;
|
|
63
|
+
font-style: normal;
|
|
64
|
+
font-weight: 500;
|
|
65
|
+
line-height: 20px; /* 142.857% */
|
|
66
|
+
overflow: hidden;
|
|
67
|
+
text-overflow: ellipsis;
|
|
68
|
+
white-space: nowrap;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.organization-tenant-switcher-item {
|
|
72
|
+
width: 208px;
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
gap: 12px;
|
|
76
|
+
//padding: 9px 10px;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.organization-tenant-switcher-item-logo {
|
|
80
|
+
width: 40px;
|
|
81
|
+
height: 40px;
|
|
82
|
+
border-radius: 6px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.organization-tenant-switcher-switch-chevron {
|
|
86
|
+
font-size: 16px;
|
|
87
|
+
color: #101828;
|
|
88
|
+
}
|
|
@@ -38,10 +38,10 @@ var import_AdapterDayjs = require("@pisell/date-picker/es/AdapterDayjs");
|
|
|
38
38
|
var import_VariablesProvider = __toESM(require("../dataSourceComponents/provider/variables/VariablesProvider"));
|
|
39
39
|
var import_date_picker = require("@pisell/date-picker");
|
|
40
40
|
var import_antd = require("antd");
|
|
41
|
-
var import_en_US = __toESM(require("antd/locale/en_US"));
|
|
42
|
-
var import_zh_CN = __toESM(require("antd/locale/zh_CN"));
|
|
43
|
-
var import_zh_TW = __toESM(require("antd/locale/zh_TW"));
|
|
44
|
-
var import_zh_HK = __toESM(require("antd/locale/zh_HK"));
|
|
41
|
+
var import_en_US = __toESM(require("antd/es/locale/en_US"));
|
|
42
|
+
var import_zh_CN = __toESM(require("antd/es/locale/zh_CN"));
|
|
43
|
+
var import_zh_TW = __toESM(require("antd/es/locale/zh_TW"));
|
|
44
|
+
var import_zh_HK = __toESM(require("antd/es/locale/zh_HK"));
|
|
45
45
|
var import_pisell_config_provider = __toESM(require("../pisell-config-provider"));
|
|
46
46
|
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
47
47
|
var localMap = {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface PageHeaderProps {
|
|
4
|
+
title?: React.ReactNode;
|
|
5
|
+
showTitle?: boolean;
|
|
6
|
+
subTitle?: React.ReactNode;
|
|
7
|
+
showSubTitle?: boolean;
|
|
8
|
+
showDivider?: boolean;
|
|
9
|
+
extra?: React.ReactNode;
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
}
|
|
13
|
+
declare const PageHeader: (props: PageHeaderProps) => React.JSX.Element | null;
|
|
14
|
+
export default PageHeader;
|
|
@@ -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/page-header/index.tsx
|
|
30
|
+
var page_header_exports = {};
|
|
31
|
+
__export(page_header_exports, {
|
|
32
|
+
default: () => page_header_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(page_header_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_antd = require("antd");
|
|
37
|
+
var import_classnames = __toESM(require("classnames"));
|
|
38
|
+
var import_index = require("./index.less");
|
|
39
|
+
var PageHeader = (props) => {
|
|
40
|
+
const {
|
|
41
|
+
title,
|
|
42
|
+
showTitle,
|
|
43
|
+
subTitle,
|
|
44
|
+
showSubTitle,
|
|
45
|
+
showDivider,
|
|
46
|
+
extra,
|
|
47
|
+
className,
|
|
48
|
+
style
|
|
49
|
+
} = props;
|
|
50
|
+
if ((!showTitle || !title) && (!showSubTitle || !subTitle) && !extra) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: (0, import_classnames.default)("pisell-lowcode-page-header-wrap", className),
|
|
57
|
+
style
|
|
58
|
+
},
|
|
59
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-page-header" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-page-header-left" }, showTitle && title && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-page-header-title" }, title), showSubTitle && subTitle && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-page-header-sub-title" }, subTitle)), /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-lowcode-page-header-extra" }, extra)),
|
|
60
|
+
showDivider && /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { className: "pisell-lowcode-page-header-divider" })
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
var page_header_default = PageHeader;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.pisell-lowcode-page-header-wrap {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 4px;
|
|
5
|
+
margin-bottom: 16px;
|
|
6
|
+
.pisell-lowcode-page-header {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
width: 100%;
|
|
11
|
+
|
|
12
|
+
.pisell-lowcode-page-header-left {
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 4px;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.pisell-lowcode-page-header-title {
|
|
19
|
+
color: var(--Colors-Neutral-Text-colorText, rgba(0, 0, 0, 0.88));
|
|
20
|
+
font-size: var(--Typography-Font-Size-fontSizeHeading4, 20px);
|
|
21
|
+
font-weight: var(--Typography-Font-Weight-fontWeightStrong, 700);
|
|
22
|
+
line-height: var(
|
|
23
|
+
--Typography-Line-Height-lineHeightHeading4,
|
|
24
|
+
28px
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.pisell-lowcode-page-header-extra {
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
gap: 8px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
.pisell-lowcode-page-header-sub-title {
|
|
35
|
+
color: var(--Colors-Neutral-Text-colorTextSecondary, rgba(0, 0, 0, 0.65));
|
|
36
|
+
font-size: var(--Typography-Font-Size-fontSize, 14px);
|
|
37
|
+
font-style: normal;
|
|
38
|
+
font-weight: var(--Typography-Font-Weight-fontWeightNormal, 400);
|
|
39
|
+
line-height: var(--Typography-Line-Height-lineHeight, 22px);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.pisell-lowcode-page-header-divider {
|
|
43
|
+
margin: 16px 0 0;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { AvatarProps } from 'antd';
|
|
3
|
+
import './index.less';
|
|
4
|
+
export declare type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
5
|
+
export interface PisellAvatarProps extends Omit<AvatarProps, 'size' | 'shape'> {
|
|
6
|
+
shape?: 'circle' | 'square';
|
|
7
|
+
size?: AvatarSize;
|
|
8
|
+
src?: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
useTextAvatar?: boolean;
|
|
15
|
+
borderRadius?: number;
|
|
16
|
+
onError?: () => boolean;
|
|
17
|
+
}
|
|
18
|
+
declare const PisellAvatar: React.FC<PisellAvatarProps>;
|
|
19
|
+
export default PisellAvatar;
|