@pisell/materials 6.0.18 → 6.0.20
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 +146 -146
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +51 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +51 -20
- package/es/components/badge/index.d.ts +7 -0
- package/es/components/badge/index.js +44 -0
- package/es/components/badge/index.less +2 -0
- package/es/components/buttonGroupEdit/index.d.ts +8 -0
- package/es/components/buttonGroupEdit/index.js +408 -0
- package/es/components/buttonGroupPreview/index.d.ts +19 -0
- package/es/components/buttonGroupPreview/index.js +74 -0
- package/es/components/cardMetricItem/index.d.ts +12 -0
- package/es/components/cardMetricItem/index.js +39 -0
- package/es/components/cardMetricItem/index.less +39 -0
- package/es/components/cardPro/index.d.ts +3 -0
- package/es/components/cardPro/index.js +66 -0
- package/es/components/cardPro/index.less +55 -0
- package/es/components/cropPhoto/index.d.ts +3 -0
- package/es/components/cropPhoto/index.js +72 -0
- package/es/components/cropPhoto/index.less +15 -0
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.js +13 -3
- package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
- package/es/components/dataSourceComponents/fields/Input/WithMode.js +24 -1
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +31 -3
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +31 -3
- 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/Upload/BaseUpload.js +102 -141
- package/es/components/dataSourceComponents/fields/Upload/WithMode.js +6 -3
- package/es/components/dataSourceComponents/fields/Upload/serve.js +13 -3
- package/es/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
- package/es/components/dataSourceComponents/fields/Upload/shopUploadServe.js +396 -0
- package/es/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Upload/utils.js +17 -2
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/es/components/dataSourceComponents/hooks/usePlatform.js +12 -0
- 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/pisellAnchor/index.d.ts +23 -0
- package/es/components/pisellAnchor/index.js +303 -0
- package/es/components/pisellAnchor/index.less +197 -0
- package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +18 -2
- package/es/components/pisellQrcode/index.d.ts +10 -0
- package/es/components/pisellQrcode/index.js +70 -0
- package/es/components/pisellQrcode/index.less +41 -0
- package/es/components/pisellStatisticList/index.d.ts +3 -0
- package/es/components/pisellStatisticList/index.js +17 -5
- package/es/components/pisellStatisticList/index.less +1 -1
- package/es/components/pisellText/components/Amount/index.d.ts +2 -0
- package/es/components/pisellText/components/Amount/index.js +3 -2
- package/es/components/pisellWalletPassCard/index.d.ts +4 -4
- package/es/components/pisellWalletPassCard/index.js +28 -12
- package/es/components/pisellWalletPassCard/index.less +26 -4
- package/es/components/record-view/index.d.ts +13 -5
- package/es/components/record-view/index.js +81 -30
- package/es/components/record-view/index.less +37 -2
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/tabs/index.d.ts +1 -0
- package/es/components/tabs/index.js +25 -7
- package/es/components/tabs/index.less +5 -5
- package/es/components/walletCard/Guest/index.d.ts +3 -0
- package/es/components/walletCard/Guest/index.js +83 -0
- package/es/components/walletCard/Guest/index.less +71 -0
- package/es/components/walletCard/index.d.ts +65 -0
- package/es/components/walletCard/index.js +402 -0
- package/es/components/walletCard/index.less +267 -0
- package/es/index.d.ts +10 -1
- package/es/index.js +10 -1
- package/es/locales/en-US.d.ts +38 -2
- package/es/locales/en-US.js +55 -10
- package/es/locales/index.js +4 -2
- package/es/locales/zh-CN.d.ts +36 -0
- package/es/locales/zh-CN.js +41 -1
- package/es/locales/zh-TW.d.ts +36 -0
- package/es/locales/zh-TW.js +41 -1
- package/es/utils/index.d.ts +1 -0
- package/es/utils/index.js +3 -0
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/badge/index.d.ts +7 -0
- package/lib/components/badge/index.js +70 -0
- package/lib/components/badge/index.less +2 -0
- package/lib/components/buttonGroupEdit/index.d.ts +8 -0
- package/lib/components/buttonGroupEdit/index.js +317 -0
- package/lib/components/buttonGroupPreview/index.d.ts +19 -0
- package/lib/components/buttonGroupPreview/index.js +79 -0
- package/lib/components/cardMetricItem/index.d.ts +12 -0
- package/lib/components/cardMetricItem/index.js +75 -0
- package/lib/components/cardMetricItem/index.less +39 -0
- package/lib/components/cardPro/index.d.ts +3 -0
- package/lib/components/cardPro/index.js +98 -0
- package/lib/components/cardPro/index.less +55 -0
- package/lib/components/cropPhoto/index.d.ts +3 -0
- package/lib/components/cropPhoto/index.js +70 -0
- package/lib/components/cropPhoto/index.less +15 -0
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.js +12 -3
- package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
- package/lib/components/dataSourceComponents/fields/Input/WithMode.js +21 -0
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +37 -3
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +37 -3
- 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/Upload/BaseUpload.js +47 -72
- package/lib/components/dataSourceComponents/fields/Upload/WithMode.js +11 -9
- package/lib/components/dataSourceComponents/fields/Upload/serve.js +11 -2
- package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
- package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.js +247 -0
- package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Upload/utils.js +17 -2
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
- package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
- package/lib/components/dataSourceComponents/hooks/usePlatform.js +51 -0
- 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/pisellAnchor/index.d.ts +23 -0
- package/lib/components/pisellAnchor/index.js +251 -0
- package/lib/components/pisellAnchor/index.less +197 -0
- package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +24 -3
- package/lib/components/pisellQrcode/index.d.ts +10 -0
- package/lib/components/pisellQrcode/index.js +82 -0
- package/lib/components/pisellQrcode/index.less +41 -0
- package/lib/components/pisellStatisticList/index.d.ts +3 -0
- package/lib/components/pisellStatisticList/index.js +35 -15
- package/lib/components/pisellStatisticList/index.less +1 -1
- package/lib/components/pisellText/components/Amount/index.d.ts +2 -0
- package/lib/components/pisellText/components/Amount/index.js +2 -1
- package/lib/components/pisellWalletPassCard/index.d.ts +4 -4
- package/lib/components/pisellWalletPassCard/index.js +17 -9
- package/lib/components/pisellWalletPassCard/index.less +26 -4
- package/lib/components/record-view/index.d.ts +13 -5
- package/lib/components/record-view/index.js +63 -11
- package/lib/components/record-view/index.less +37 -2
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/tabs/index.d.ts +1 -0
- package/lib/components/tabs/index.js +12 -1
- package/lib/components/tabs/index.less +5 -5
- package/lib/components/walletCard/Guest/index.d.ts +3 -0
- package/lib/components/walletCard/Guest/index.js +138 -0
- package/lib/components/walletCard/Guest/index.less +71 -0
- package/lib/components/walletCard/index.d.ts +65 -0
- package/lib/components/walletCard/index.js +374 -0
- package/lib/components/walletCard/index.less +267 -0
- package/lib/index.d.ts +10 -1
- package/lib/index.js +26 -1
- package/lib/locales/en-US.d.ts +38 -2
- package/lib/locales/en-US.js +41 -3
- package/lib/locales/index.js +4 -2
- package/lib/locales/zh-CN.d.ts +36 -0
- package/lib/locales/zh-CN.js +41 -1
- package/lib/locales/zh-TW.d.ts +36 -0
- package/lib/locales/zh-TW.js +41 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +6 -1
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/badge/meta.ts +20 -11
- package/lowcode/badge/snippets.ts +2 -0
- package/lowcode/button/meta.ts +2 -6
- package/lowcode/button-group/meta.ts +198 -0
- package/lowcode/button-group/snippets.ts +68 -0
- package/lowcode/button-group-edit/meta.ts +32 -0
- package/lowcode/button-group-edit/snippets.ts +98 -0
- package/lowcode/button-group-preview/meta.ts +55 -0
- package/lowcode/button-group-preview/snippets.ts +57 -0
- package/lowcode/card/snippets.ts +55 -55
- package/lowcode/card-metric-item/meta.ts +83 -0
- package/lowcode/card-metric-item/snippets.ts +13 -0
- package/lowcode/card-pro/meta.ts +338 -0
- package/lowcode/card-pro/snippe.ts +39 -0
- package/lowcode/crop-photo/meta.ts +77 -0
- package/lowcode/crop-photo/snippe.ts +12 -0
- package/lowcode/form-item-input/snippets.ts +1 -1
- package/lowcode/form-item-upload/meta.ts +11 -0
- package/lowcode/pisell-anchor/meta.ts +118 -0
- package/lowcode/pisell-anchor/snippets.ts +26 -0
- package/lowcode/pisell-card/meta.ts +63 -27
- package/lowcode/pisell-card/snippets.ts +6 -0
- package/lowcode/pisell-modal.information/meta.ts +8 -0
- package/lowcode/pisell-qrcode/__screenshots__/upload-1.png +0 -0
- package/lowcode/pisell-qrcode/meta.ts +46 -0
- package/lowcode/pisell-qrcode/snippets.ts +13 -0
- package/lowcode/pisell-tooltip/meta.ts +1 -1
- package/lowcode/record-view/meta.ts +20 -0
- package/lowcode/section-footers/meta.ts +66 -0
- package/lowcode/section-footers/snippe.ts +21 -0
- package/lowcode/spin/meta.ts +9 -0
- package/lowcode/tag/meta.ts +6 -0
- package/lowcode/timeline/meta.ts +32 -9
- package/lowcode/timeline/snippets.ts +12 -2
- package/lowcode/timeline.item/meta.ts +1 -1
- package/lowcode/wallet-card/meta.ts +283 -0
- package/lowcode/wallet-card/snippets.ts +44 -0
- package/package.json +5 -1
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
.pisell-anchor-containers {
|
|
2
|
+
// display: flex;
|
|
3
|
+
// align-items: center;
|
|
4
|
+
// background-color: #fff;
|
|
5
|
+
// height: 40px;
|
|
6
|
+
.pisell-lowcode-anchor-wrapper {
|
|
7
|
+
&::before {
|
|
8
|
+
content: '';
|
|
9
|
+
display: none;
|
|
10
|
+
}
|
|
11
|
+
.pisell-lowcode-anchor {
|
|
12
|
+
height: 40px;
|
|
13
|
+
border-bottom: none !important;
|
|
14
|
+
background-color: #fff;
|
|
15
|
+
|
|
16
|
+
.pisell-lowcode-anchor-ink {
|
|
17
|
+
display: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.pisell-lowcode-anchor-link {
|
|
21
|
+
height: 100%;
|
|
22
|
+
padding: 0 16px;
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
|
|
26
|
+
&-title {
|
|
27
|
+
color: var(--Gray-900, #101828);
|
|
28
|
+
font-family: Inter;
|
|
29
|
+
font-size: 16px;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
line-height: 40px;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.pisell-lowcode-anchor-link-active {
|
|
36
|
+
border-radius: 100px;
|
|
37
|
+
background: var(--theme-color, #7f56d9);
|
|
38
|
+
height: 40px;
|
|
39
|
+
|
|
40
|
+
.pisell-lowcode-anchor-link-title {
|
|
41
|
+
color: var(--White, #fff);
|
|
42
|
+
line-height: 40px;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
.pisell-anchor-scroll {
|
|
48
|
+
height: 40px;
|
|
49
|
+
flex: 1;
|
|
50
|
+
overflow-x: auto;
|
|
51
|
+
|
|
52
|
+
// 隐藏滚动条 - Firefox
|
|
53
|
+
scrollbar-width: none;
|
|
54
|
+
|
|
55
|
+
// 隐藏滚动条 - IE and Edge
|
|
56
|
+
-ms-overflow-style: none;
|
|
57
|
+
|
|
58
|
+
// 隐藏滚动条 - Chrome, Safari, Opera
|
|
59
|
+
&::-webkit-scrollbar {
|
|
60
|
+
display: none;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.pisell-anchor-buttons {
|
|
65
|
+
display: flex;
|
|
66
|
+
gap: 8px;
|
|
67
|
+
margin-left: 16px;
|
|
68
|
+
|
|
69
|
+
.scroll-button {
|
|
70
|
+
display: flex;
|
|
71
|
+
align-items: center;
|
|
72
|
+
justify-content: center;
|
|
73
|
+
width: 24px;
|
|
74
|
+
height: 24px;
|
|
75
|
+
border: 1px solid #d9d9d9;
|
|
76
|
+
border-radius: 4px;
|
|
77
|
+
background: white;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
transition: all 0.3s;
|
|
80
|
+
|
|
81
|
+
&:hover:not(.disabled) {
|
|
82
|
+
color: #1890ff;
|
|
83
|
+
border-color: #1890ff;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&.disabled {
|
|
87
|
+
color: #d9d9d9;
|
|
88
|
+
cursor: not-allowed;
|
|
89
|
+
background: #f5f5f5;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.pisell-anchor-tabs {
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
width: 100%;
|
|
99
|
+
height: 100%;
|
|
100
|
+
font-size: 17px;
|
|
101
|
+
font-weight: 400;
|
|
102
|
+
color: #0d1619;
|
|
103
|
+
cursor: default;
|
|
104
|
+
position: relative;
|
|
105
|
+
|
|
106
|
+
.pisell-anchor-tabs-btn-left,
|
|
107
|
+
.pisell-anchor-tabs-btn-right {
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: 50%;
|
|
110
|
+
transform: translateY(-50%);
|
|
111
|
+
z-index: 1;
|
|
112
|
+
width: 40px;
|
|
113
|
+
height: 40px;
|
|
114
|
+
display: flex;
|
|
115
|
+
align-items: center;
|
|
116
|
+
justify-content: center;
|
|
117
|
+
background: linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0.8) 100%);
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
transition: width 300ms ease;
|
|
120
|
+
user-select: none;
|
|
121
|
+
|
|
122
|
+
.pisell-anchor-tabs-btn-icon {
|
|
123
|
+
width: 24px;
|
|
124
|
+
height: 24px;
|
|
125
|
+
background: #f1f1f1;
|
|
126
|
+
border-radius: 50%;
|
|
127
|
+
display: flex;
|
|
128
|
+
align-items: center;
|
|
129
|
+
justify-content: center;
|
|
130
|
+
color: #262626;
|
|
131
|
+
font-size: 20px;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.pisell-anchor-tabs-btn-left {
|
|
136
|
+
left: 0;
|
|
137
|
+
background: linear-gradient(270deg, rgba(255, 255, 255, 0.8) 0%, #fff 70%);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.pisell-anchor-tabs-btn-right {
|
|
141
|
+
right: 0;
|
|
142
|
+
background: linear-gradient(90deg, rgba(255, 255, 255, 0.8) 0%, #fff 70%);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.pisell-anchor-tabs-content {
|
|
146
|
+
flex: 1;
|
|
147
|
+
display: flex;
|
|
148
|
+
overflow-x: auto;
|
|
149
|
+
overflow-y: hidden;
|
|
150
|
+
scroll-behavior: smooth;
|
|
151
|
+
-webkit-overflow-scrolling: touch;
|
|
152
|
+
scrollbar-width: none;
|
|
153
|
+
-ms-overflow-style: none;
|
|
154
|
+
padding: 0;
|
|
155
|
+
gap: 16px;
|
|
156
|
+
|
|
157
|
+
&::-webkit-scrollbar {
|
|
158
|
+
display: none;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.pisell-anchor-tabs-tab {
|
|
162
|
+
flex: 0 0 auto;
|
|
163
|
+
padding: 0 16px;
|
|
164
|
+
cursor: pointer;
|
|
165
|
+
white-space: nowrap;
|
|
166
|
+
transition: all 0.3s;
|
|
167
|
+
height: 48px;
|
|
168
|
+
display: flex;
|
|
169
|
+
align-items: center;
|
|
170
|
+
justify-content: center;
|
|
171
|
+
font-size: 16px;
|
|
172
|
+
border-radius: 100px;
|
|
173
|
+
|
|
174
|
+
&:hover:not(.pisell-anchor-tabs-tab-active) {
|
|
175
|
+
color: var(--theme-color, #7f56d9);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&.pisell-anchor-tabs-tab-active {
|
|
179
|
+
color: #fff;
|
|
180
|
+
font-weight: 600;
|
|
181
|
+
background-color: var(--theme-color, #7f56d9);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
.pisell-anchor-tabs-tab-content {
|
|
185
|
+
line-height: 24px;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.pisell-anchor {
|
|
192
|
+
border-bottom: 1px solid #EAECF0;
|
|
193
|
+
|
|
194
|
+
&.pisell-anchor-no-border {
|
|
195
|
+
border-bottom: none;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
@@ -67,9 +67,22 @@ var PisellNavigationMenu = function PisellNavigationMenu(_ref) {
|
|
|
67
67
|
onAddPage === null || onAddPage === void 0 || onAddPage(item);
|
|
68
68
|
}
|
|
69
69
|
}, []);
|
|
70
|
+
var tagTextMap = useMemo(function () {
|
|
71
|
+
return {
|
|
72
|
+
base: {
|
|
73
|
+
text: getText('pisell-lowcode-navigation-menu-tag-base'),
|
|
74
|
+
color: '#7f56d9'
|
|
75
|
+
},
|
|
76
|
+
pisellV1: {
|
|
77
|
+
text: getText('pisell-lowcode-navigation-menu-tag-pisell1'),
|
|
78
|
+
color: '#ee837a'
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
}, []);
|
|
70
82
|
|
|
71
83
|
// 自定义渲染菜单项
|
|
72
84
|
var renderMenuItem = useCallback(function (itemProps) {
|
|
85
|
+
var _tagTextMap$item$sour, _tagTextMap$item$sour2;
|
|
73
86
|
var item = itemProps.item;
|
|
74
87
|
var _item$allowEdit = item.allowEdit,
|
|
75
88
|
allowEdit = _item$allowEdit === void 0 ? true : _item$allowEdit,
|
|
@@ -96,10 +109,13 @@ var PisellNavigationMenu = function PisellNavigationMenu(_ref) {
|
|
|
96
109
|
className: "pisell-lowcode-navigation-menu-item-title"
|
|
97
110
|
}, item.title), /*#__PURE__*/React.createElement("div", {
|
|
98
111
|
className: "pisell-lowcode-navigation-menu-item-description"
|
|
99
|
-
}, item.description,
|
|
112
|
+
}, item.description, item.source && /*#__PURE__*/React.createElement(PisellTags, {
|
|
113
|
+
type: "pill_color",
|
|
114
|
+
color: (_tagTextMap$item$sour = tagTextMap[item.source]) === null || _tagTextMap$item$sour === void 0 ? void 0 : _tagTextMap$item$sour.color
|
|
115
|
+
}, ((_tagTextMap$item$sour2 = tagTextMap[item.source]) === null || _tagTextMap$item$sour2 === void 0 ? void 0 : _tagTextMap$item$sour2.text) || ""), !item.isGroup && item.version && /*#__PURE__*/React.createElement(PisellTags, {
|
|
100
116
|
type: "pill_color",
|
|
101
117
|
color: "success"
|
|
102
|
-
}, item.version)))), /*#__PURE__*/React.createElement("div", {
|
|
118
|
+
}, "v", item.version)))), /*#__PURE__*/React.createElement("div", {
|
|
103
119
|
className: "pisell-lowcode-navigation-menu-item-action-wrap"
|
|
104
120
|
}, allowEdit && /*#__PURE__*/React.createElement(Button, {
|
|
105
121
|
type: "text",
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface PisellQrcodeProps {
|
|
4
|
+
size?: number;
|
|
5
|
+
platform: 'pc' | 'h5' | 'ipad';
|
|
6
|
+
value: string;
|
|
7
|
+
className: string;
|
|
8
|
+
}
|
|
9
|
+
declare const PisellQrcode: React.FC<PisellQrcodeProps>;
|
|
10
|
+
export default PisellQrcode;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
2
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
+
import React, { useEffect, useState, useRef } from 'react';
|
|
8
|
+
import { QRCode, Button, Divider } from 'antd';
|
|
9
|
+
import classNames from 'classnames';
|
|
10
|
+
import PisellModal from "./../pisellModal";
|
|
11
|
+
import { getText } from "../../locales/index";
|
|
12
|
+
import "./index.less";
|
|
13
|
+
var PisellQrcode = function PisellQrcode(props) {
|
|
14
|
+
var size = props.size,
|
|
15
|
+
platform = props.platform,
|
|
16
|
+
_props$value = props.value,
|
|
17
|
+
value = _props$value === void 0 ? '' : _props$value,
|
|
18
|
+
className = props.className; // 裁剪形状
|
|
19
|
+
var _useState = useState(false),
|
|
20
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
21
|
+
open = _useState2[0],
|
|
22
|
+
setOpen = _useState2[1];
|
|
23
|
+
useEffect(function () {
|
|
24
|
+
document.body.id = 'body';
|
|
25
|
+
}, []);
|
|
26
|
+
var modalRef = useRef(null);
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
if (open) {}
|
|
29
|
+
}, [open]);
|
|
30
|
+
var modalProps = {
|
|
31
|
+
title: getText('pisellQrcode-qrcode'),
|
|
32
|
+
platform: platform,
|
|
33
|
+
onCancel: function onCancel() {
|
|
34
|
+
return setOpen(false);
|
|
35
|
+
},
|
|
36
|
+
open: open,
|
|
37
|
+
footer: null,
|
|
38
|
+
mobileModalHeight: 'auto',
|
|
39
|
+
className: classNames('pisell-qrcode-modal'),
|
|
40
|
+
bodyStyle: {
|
|
41
|
+
padding: 0
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: classNames('pisell-qrcode-wrapper', className)
|
|
46
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
onClick: function onClick(e) {
|
|
48
|
+
e.stopPropagation();
|
|
49
|
+
setOpen(true);
|
|
50
|
+
}
|
|
51
|
+
}, /*#__PURE__*/React.createElement(QRCode, {
|
|
52
|
+
size: size,
|
|
53
|
+
value: value,
|
|
54
|
+
bordered: false
|
|
55
|
+
})), /*#__PURE__*/React.createElement(PisellModal, modalProps, /*#__PURE__*/React.createElement(QRCode, {
|
|
56
|
+
size: 200,
|
|
57
|
+
value: value,
|
|
58
|
+
style: {
|
|
59
|
+
marginTop: 24
|
|
60
|
+
}
|
|
61
|
+
}), /*#__PURE__*/React.createElement("p", {
|
|
62
|
+
className: classNames('pisell-qrcode-modal-value')
|
|
63
|
+
}, value), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(Button, {
|
|
64
|
+
onClick: function onClick() {
|
|
65
|
+
return setOpen(false);
|
|
66
|
+
},
|
|
67
|
+
className: classNames('pisell-qrcode-modal-button')
|
|
68
|
+
}, getText('pisellQrcode-done'))));
|
|
69
|
+
};
|
|
70
|
+
export default PisellQrcode;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
.pisell-qrcode-wrapper {
|
|
2
|
+
}
|
|
3
|
+
|
|
4
|
+
.pisell-qrcode-modal {
|
|
5
|
+
.pisell-lowcode-modal-content {
|
|
6
|
+
padding: 0;
|
|
7
|
+
.pisell-lowcode-modal-body {
|
|
8
|
+
display: flex;
|
|
9
|
+
width: 100%;
|
|
10
|
+
align-items: center;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
.pisell-qrcode-modal-value {
|
|
13
|
+
color: var(--Gray-500, #667085);
|
|
14
|
+
font-family: Inter;
|
|
15
|
+
font-size: 14px;
|
|
16
|
+
font-style: normal;
|
|
17
|
+
font-weight: 400;
|
|
18
|
+
line-height: 20px;
|
|
19
|
+
margin: 20px 0 24px;
|
|
20
|
+
}
|
|
21
|
+
.pisell-lowcode-divider {
|
|
22
|
+
margin: 0;
|
|
23
|
+
}
|
|
24
|
+
.pisell-qrcode-modal-button {
|
|
25
|
+
margin: 24px;
|
|
26
|
+
|
|
27
|
+
color: var(--Base-White, #fff);
|
|
28
|
+
|
|
29
|
+
font-family: Inter;
|
|
30
|
+
font-size: 16px;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-weight: 600;
|
|
33
|
+
line-height: 24px;
|
|
34
|
+
|
|
35
|
+
width: calc(100% - 48px);
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
background-color: var(--theme-color, #7f56d9);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './index.less';
|
|
3
3
|
export interface PisellStatisticListProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
isHasBorder?: boolean;
|
|
4
5
|
backgroundColors?: string[];
|
|
5
6
|
labelColor?: string;
|
|
6
7
|
valueColor?: string;
|
|
7
8
|
data: {
|
|
8
9
|
label: string;
|
|
9
10
|
value: string;
|
|
11
|
+
isLink?: boolean;
|
|
12
|
+
link?: string;
|
|
10
13
|
tip?: string;
|
|
11
14
|
children?: {
|
|
12
15
|
label: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["backgroundColors", "labelColor", "valueColor", "data"];
|
|
1
|
+
var _excluded = ["isHasBorder", "backgroundColors", "labelColor", "valueColor", "data"];
|
|
2
2
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
3
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
4
4
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -9,7 +9,9 @@ import Iconfont from "../iconfont";
|
|
|
9
9
|
import "./index.less";
|
|
10
10
|
var defaultColors = ['rgba(224, 79, 22, 0.20)', 'rgba(202, 133, 4, 0.20)', 'rgba(127, 86, 217, 0.22)', 'rgba(7, 148, 85, 0.20)', 'rgba(21, 112, 239, 0.23)'];
|
|
11
11
|
var PisellStatisticList = function PisellStatisticList(props) {
|
|
12
|
-
var _props$
|
|
12
|
+
var _props$isHasBorder = props.isHasBorder,
|
|
13
|
+
isHasBorder = _props$isHasBorder === void 0 ? true : _props$isHasBorder,
|
|
14
|
+
_props$backgroundColo = props.backgroundColors,
|
|
13
15
|
backgroundColors = _props$backgroundColo === void 0 ? defaultColors : _props$backgroundColo,
|
|
14
16
|
_props$labelColor = props.labelColor,
|
|
15
17
|
labelColor = _props$labelColor === void 0 ? '#fff' : _props$labelColor,
|
|
@@ -21,10 +23,15 @@ var PisellStatisticList = function PisellStatisticList(props) {
|
|
|
21
23
|
className: "pisell-lowcode-statistic-list-wrap"
|
|
22
24
|
}, others), data.map(function (item, index) {
|
|
23
25
|
var _item$children;
|
|
26
|
+
var _item$isLink = item.isLink,
|
|
27
|
+
isLink = _item$isLink === void 0 ? false : _item$isLink,
|
|
28
|
+
_item$link = item.link,
|
|
29
|
+
link = _item$link === void 0 ? '' : _item$link;
|
|
24
30
|
return /*#__PURE__*/React.createElement("div", {
|
|
25
31
|
className: "pisell-lowcode-statistic-list-item",
|
|
26
32
|
style: {
|
|
27
|
-
background: backgroundColors[index % backgroundColors.length]
|
|
33
|
+
background: backgroundColors[index % backgroundColors.length],
|
|
34
|
+
border: isHasBorder ? 'border: 1px solid var(--Gray-600, #475467)' : 'none'
|
|
28
35
|
}
|
|
29
36
|
}, /*#__PURE__*/React.createElement("div", {
|
|
30
37
|
className: "pisell-lowcode-statistic-list-item-label",
|
|
@@ -44,7 +51,12 @@ var PisellStatisticList = function PisellStatisticList(props) {
|
|
|
44
51
|
style: {
|
|
45
52
|
color: valueColor
|
|
46
53
|
}
|
|
47
|
-
},
|
|
54
|
+
}, isLink && link ? /*#__PURE__*/React.createElement("a", {
|
|
55
|
+
href: "javascript:void(0);",
|
|
56
|
+
onClick: function onClick() {
|
|
57
|
+
location.replace(item.link);
|
|
58
|
+
}
|
|
59
|
+
}, item.value || '-') : item.value || '-'), !!((_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) && /*#__PURE__*/React.createElement(Row, {
|
|
48
60
|
className: "pisell-lowcode-statistic-list-item-children-wrap"
|
|
49
61
|
}, item.children.map(function (child) {
|
|
50
62
|
return /*#__PURE__*/React.createElement(Col, {
|
|
@@ -60,7 +72,7 @@ var PisellStatisticList = function PisellStatisticList(props) {
|
|
|
60
72
|
style: {
|
|
61
73
|
color: valueColor
|
|
62
74
|
}
|
|
63
|
-
}, child.value));
|
|
75
|
+
}, child.value || ''));
|
|
64
76
|
})));
|
|
65
77
|
}));
|
|
66
78
|
};
|
|
@@ -13,6 +13,8 @@ export interface AmountProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
13
13
|
useThousandsSeparator?: boolean;
|
|
14
14
|
/** 整数位隐藏小数 指的是如果价格为整数,后面的".00" 将被省略以节省页面空间 */
|
|
15
15
|
hideDecimalForWholeNumbers?: boolean;
|
|
16
|
+
/** 货币符号 */
|
|
17
|
+
symbol?: string;
|
|
16
18
|
}
|
|
17
19
|
declare const Amount: (props: AmountProps) => JSX.Element;
|
|
18
20
|
export default Amount;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _excluded = ["value", "precision", "showCurrencySymbol", "useThousandsSeparator", "hideDecimalForWholeNumbers"];
|
|
1
|
+
var _excluded = ["value", "precision", "showCurrencySymbol", "useThousandsSeparator", "hideDecimalForWholeNumbers", "symbol"];
|
|
2
2
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
3
3
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
@@ -10,10 +10,11 @@ var Amount = function Amount(props) {
|
|
|
10
10
|
showCurrencySymbol = props.showCurrencySymbol,
|
|
11
11
|
useThousandsSeparator = props.useThousandsSeparator,
|
|
12
12
|
hideDecimalForWholeNumbers = props.hideDecimalForWholeNumbers,
|
|
13
|
+
symbol = props.symbol,
|
|
13
14
|
others = _objectWithoutProperties(props, _excluded);
|
|
14
15
|
var config = usePisellConfig();
|
|
15
16
|
var amount = useMemo(function () {
|
|
16
|
-
return formatAmountWithOptions(value, (config === null || config === void 0 ? void 0 : config.symbol) || "", {
|
|
17
|
+
return formatAmountWithOptions(value, symbol || (config === null || config === void 0 ? void 0 : config.symbol) || "", {
|
|
17
18
|
precision: precision,
|
|
18
19
|
showCurrencySymbol: showCurrencySymbol,
|
|
19
20
|
useThousandsSeparator: useThousandsSeparator,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.less';
|
|
2
2
|
export interface PisellWalletPassCardProps {
|
|
3
|
-
id
|
|
3
|
+
id?: number;
|
|
4
4
|
/** 商品名称 */
|
|
5
5
|
name: string;
|
|
6
6
|
/** 二维码 */
|
|
@@ -8,19 +8,19 @@ export interface PisellWalletPassCardProps {
|
|
|
8
8
|
/** 共享店铺名称 */
|
|
9
9
|
storeName: string;
|
|
10
10
|
/** 余额 */
|
|
11
|
-
balance
|
|
11
|
+
balance?: number;
|
|
12
12
|
/** 识别码编号 */
|
|
13
13
|
code: string;
|
|
14
14
|
/** 有效期 */
|
|
15
15
|
validDate: string;
|
|
16
16
|
/** 使用金额 */
|
|
17
|
-
redeem
|
|
17
|
+
redeem?: number;
|
|
18
18
|
/** 是否禁用 */
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
/** 禁用原因 */
|
|
21
21
|
disabledReason?: string;
|
|
22
22
|
/** 是否展示禁用原因 */
|
|
23
|
-
showDisabledReason?:
|
|
23
|
+
showDisabledReason?: boolean;
|
|
24
24
|
/** 封面图 */
|
|
25
25
|
cover?: string;
|
|
26
26
|
/** 余额标题文案 */
|