@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.
Files changed (204) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +7 -7
  6. package/build/lowcode/preview.js +146 -146
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +51 -20
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +51 -20
  11. package/es/components/badge/index.d.ts +7 -0
  12. package/es/components/badge/index.js +44 -0
  13. package/es/components/badge/index.less +2 -0
  14. package/es/components/buttonGroupEdit/index.d.ts +8 -0
  15. package/es/components/buttonGroupEdit/index.js +408 -0
  16. package/es/components/buttonGroupPreview/index.d.ts +19 -0
  17. package/es/components/buttonGroupPreview/index.js +74 -0
  18. package/es/components/cardMetricItem/index.d.ts +12 -0
  19. package/es/components/cardMetricItem/index.js +39 -0
  20. package/es/components/cardMetricItem/index.less +39 -0
  21. package/es/components/cardPro/index.d.ts +3 -0
  22. package/es/components/cardPro/index.js +66 -0
  23. package/es/components/cardPro/index.less +55 -0
  24. package/es/components/cropPhoto/index.d.ts +3 -0
  25. package/es/components/cropPhoto/index.js +72 -0
  26. package/es/components/cropPhoto/index.less +15 -0
  27. package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
  28. package/es/components/dataSourceComponents/dataSourceMenu/Basic.js +13 -3
  29. package/es/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
  30. package/es/components/dataSourceComponents/fields/Input/WithMode.js +24 -1
  31. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.js +31 -3
  32. package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +31 -3
  33. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  34. package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +2 -0
  35. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +102 -141
  36. package/es/components/dataSourceComponents/fields/Upload/WithMode.js +6 -3
  37. package/es/components/dataSourceComponents/fields/Upload/serve.js +13 -3
  38. package/es/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
  39. package/es/components/dataSourceComponents/fields/Upload/shopUploadServe.js +396 -0
  40. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
  41. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -0
  42. package/es/components/dataSourceComponents/fields/Upload/utils.js +17 -2
  43. package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
  44. package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
  45. package/es/components/dataSourceComponents/hooks/usePlatform.js +12 -0
  46. package/es/components/login-and-register/index.js +23 -21
  47. package/es/components/login-and-register/index.less +7 -7
  48. package/es/components/page/index.js +23 -57
  49. package/es/components/pisellAnchor/index.d.ts +23 -0
  50. package/es/components/pisellAnchor/index.js +303 -0
  51. package/es/components/pisellAnchor/index.less +197 -0
  52. package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +18 -2
  53. package/es/components/pisellQrcode/index.d.ts +10 -0
  54. package/es/components/pisellQrcode/index.js +70 -0
  55. package/es/components/pisellQrcode/index.less +41 -0
  56. package/es/components/pisellStatisticList/index.d.ts +3 -0
  57. package/es/components/pisellStatisticList/index.js +17 -5
  58. package/es/components/pisellStatisticList/index.less +1 -1
  59. package/es/components/pisellText/components/Amount/index.d.ts +2 -0
  60. package/es/components/pisellText/components/Amount/index.js +3 -2
  61. package/es/components/pisellWalletPassCard/index.d.ts +4 -4
  62. package/es/components/pisellWalletPassCard/index.js +28 -12
  63. package/es/components/pisellWalletPassCard/index.less +26 -4
  64. package/es/components/record-view/index.d.ts +13 -5
  65. package/es/components/record-view/index.js +81 -30
  66. package/es/components/record-view/index.less +37 -2
  67. package/es/components/table/Table/utils.d.ts +1 -1
  68. package/es/components/tabs/index.d.ts +1 -0
  69. package/es/components/tabs/index.js +25 -7
  70. package/es/components/tabs/index.less +5 -5
  71. package/es/components/walletCard/Guest/index.d.ts +3 -0
  72. package/es/components/walletCard/Guest/index.js +83 -0
  73. package/es/components/walletCard/Guest/index.less +71 -0
  74. package/es/components/walletCard/index.d.ts +65 -0
  75. package/es/components/walletCard/index.js +402 -0
  76. package/es/components/walletCard/index.less +267 -0
  77. package/es/index.d.ts +10 -1
  78. package/es/index.js +10 -1
  79. package/es/locales/en-US.d.ts +38 -2
  80. package/es/locales/en-US.js +55 -10
  81. package/es/locales/index.js +4 -2
  82. package/es/locales/zh-CN.d.ts +36 -0
  83. package/es/locales/zh-CN.js +41 -1
  84. package/es/locales/zh-TW.d.ts +36 -0
  85. package/es/locales/zh-TW.js +41 -1
  86. package/es/utils/index.d.ts +1 -0
  87. package/es/utils/index.js +3 -0
  88. package/es/utils/platform.d.ts +1 -1
  89. package/lib/components/badge/index.d.ts +7 -0
  90. package/lib/components/badge/index.js +70 -0
  91. package/lib/components/badge/index.less +2 -0
  92. package/lib/components/buttonGroupEdit/index.d.ts +8 -0
  93. package/lib/components/buttonGroupEdit/index.js +317 -0
  94. package/lib/components/buttonGroupPreview/index.d.ts +19 -0
  95. package/lib/components/buttonGroupPreview/index.js +79 -0
  96. package/lib/components/cardMetricItem/index.d.ts +12 -0
  97. package/lib/components/cardMetricItem/index.js +75 -0
  98. package/lib/components/cardMetricItem/index.less +39 -0
  99. package/lib/components/cardPro/index.d.ts +3 -0
  100. package/lib/components/cardPro/index.js +98 -0
  101. package/lib/components/cardPro/index.less +55 -0
  102. package/lib/components/cropPhoto/index.d.ts +3 -0
  103. package/lib/components/cropPhoto/index.js +70 -0
  104. package/lib/components/cropPhoto/index.less +15 -0
  105. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +8 -2
  106. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.js +12 -3
  107. package/lib/components/dataSourceComponents/dataSourceMenu/index.d.ts +8 -2
  108. package/lib/components/dataSourceComponents/fields/Input/WithMode.js +21 -0
  109. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.js +37 -3
  110. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +37 -3
  111. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  112. package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.less +2 -0
  113. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +47 -72
  114. package/lib/components/dataSourceComponents/fields/Upload/WithMode.js +11 -9
  115. package/lib/components/dataSourceComponents/fields/Upload/serve.js +11 -2
  116. package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.d.ts +56 -0
  117. package/lib/components/dataSourceComponents/fields/Upload/shopUploadServe.js +247 -0
  118. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
  119. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -0
  120. package/lib/components/dataSourceComponents/fields/Upload/utils.js +17 -2
  121. package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
  122. package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
  123. package/lib/components/dataSourceComponents/hooks/usePlatform.js +51 -0
  124. package/lib/components/login-and-register/index.js +23 -21
  125. package/lib/components/login-and-register/index.less +7 -7
  126. package/lib/components/page/index.js +37 -65
  127. package/lib/components/pisellAnchor/index.d.ts +23 -0
  128. package/lib/components/pisellAnchor/index.js +251 -0
  129. package/lib/components/pisellAnchor/index.less +197 -0
  130. package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +24 -3
  131. package/lib/components/pisellQrcode/index.d.ts +10 -0
  132. package/lib/components/pisellQrcode/index.js +82 -0
  133. package/lib/components/pisellQrcode/index.less +41 -0
  134. package/lib/components/pisellStatisticList/index.d.ts +3 -0
  135. package/lib/components/pisellStatisticList/index.js +35 -15
  136. package/lib/components/pisellStatisticList/index.less +1 -1
  137. package/lib/components/pisellText/components/Amount/index.d.ts +2 -0
  138. package/lib/components/pisellText/components/Amount/index.js +2 -1
  139. package/lib/components/pisellWalletPassCard/index.d.ts +4 -4
  140. package/lib/components/pisellWalletPassCard/index.js +17 -9
  141. package/lib/components/pisellWalletPassCard/index.less +26 -4
  142. package/lib/components/record-view/index.d.ts +13 -5
  143. package/lib/components/record-view/index.js +63 -11
  144. package/lib/components/record-view/index.less +37 -2
  145. package/lib/components/table/Table/utils.d.ts +1 -1
  146. package/lib/components/tabs/index.d.ts +1 -0
  147. package/lib/components/tabs/index.js +12 -1
  148. package/lib/components/tabs/index.less +5 -5
  149. package/lib/components/walletCard/Guest/index.d.ts +3 -0
  150. package/lib/components/walletCard/Guest/index.js +138 -0
  151. package/lib/components/walletCard/Guest/index.less +71 -0
  152. package/lib/components/walletCard/index.d.ts +65 -0
  153. package/lib/components/walletCard/index.js +374 -0
  154. package/lib/components/walletCard/index.less +267 -0
  155. package/lib/index.d.ts +10 -1
  156. package/lib/index.js +26 -1
  157. package/lib/locales/en-US.d.ts +38 -2
  158. package/lib/locales/en-US.js +41 -3
  159. package/lib/locales/index.js +4 -2
  160. package/lib/locales/zh-CN.d.ts +36 -0
  161. package/lib/locales/zh-CN.js +41 -1
  162. package/lib/locales/zh-TW.d.ts +36 -0
  163. package/lib/locales/zh-TW.js +41 -1
  164. package/lib/utils/index.d.ts +1 -0
  165. package/lib/utils/index.js +6 -1
  166. package/lib/utils/platform.d.ts +1 -1
  167. package/lowcode/badge/meta.ts +20 -11
  168. package/lowcode/badge/snippets.ts +2 -0
  169. package/lowcode/button/meta.ts +2 -6
  170. package/lowcode/button-group/meta.ts +198 -0
  171. package/lowcode/button-group/snippets.ts +68 -0
  172. package/lowcode/button-group-edit/meta.ts +32 -0
  173. package/lowcode/button-group-edit/snippets.ts +98 -0
  174. package/lowcode/button-group-preview/meta.ts +55 -0
  175. package/lowcode/button-group-preview/snippets.ts +57 -0
  176. package/lowcode/card/snippets.ts +55 -55
  177. package/lowcode/card-metric-item/meta.ts +83 -0
  178. package/lowcode/card-metric-item/snippets.ts +13 -0
  179. package/lowcode/card-pro/meta.ts +338 -0
  180. package/lowcode/card-pro/snippe.ts +39 -0
  181. package/lowcode/crop-photo/meta.ts +77 -0
  182. package/lowcode/crop-photo/snippe.ts +12 -0
  183. package/lowcode/form-item-input/snippets.ts +1 -1
  184. package/lowcode/form-item-upload/meta.ts +11 -0
  185. package/lowcode/pisell-anchor/meta.ts +118 -0
  186. package/lowcode/pisell-anchor/snippets.ts +26 -0
  187. package/lowcode/pisell-card/meta.ts +63 -27
  188. package/lowcode/pisell-card/snippets.ts +6 -0
  189. package/lowcode/pisell-modal.information/meta.ts +8 -0
  190. package/lowcode/pisell-qrcode/__screenshots__/upload-1.png +0 -0
  191. package/lowcode/pisell-qrcode/meta.ts +46 -0
  192. package/lowcode/pisell-qrcode/snippets.ts +13 -0
  193. package/lowcode/pisell-tooltip/meta.ts +1 -1
  194. package/lowcode/record-view/meta.ts +20 -0
  195. package/lowcode/section-footers/meta.ts +66 -0
  196. package/lowcode/section-footers/snippe.ts +21 -0
  197. package/lowcode/spin/meta.ts +9 -0
  198. package/lowcode/tag/meta.ts +6 -0
  199. package/lowcode/timeline/meta.ts +32 -9
  200. package/lowcode/timeline/snippets.ts +12 -2
  201. package/lowcode/timeline.item/meta.ts +1 -1
  202. package/lowcode/wallet-card/meta.ts +283 -0
  203. package/lowcode/wallet-card/snippets.ts +44 -0
  204. 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, !item.isGroup && item.version && /*#__PURE__*/React.createElement(PisellTags, {
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$backgroundColo = props.backgroundColors,
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
- }, item.value), !!((_item$children = item.children) !== null && _item$children !== void 0 && _item$children.length) && /*#__PURE__*/React.createElement(Row, {
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
  };
@@ -3,7 +3,7 @@
3
3
  flex-direction: column;
4
4
  gap: 16px;
5
5
  .pisell-lowcode-statistic-list-item {
6
- padding: 16px;
6
+ padding: 16px 16px 16px 0;
7
7
  border-radius: 8px;
8
8
  border: 1px solid var(--Gray-600, #475467);
9
9
  .pisell-lowcode-statistic-list-item-label {
@@ -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: number;
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: number;
11
+ balance?: number;
12
12
  /** 识别码编号 */
13
13
  code: string;
14
14
  /** 有效期 */
15
15
  validDate: string;
16
16
  /** 使用金额 */
17
- redeem: number;
17
+ redeem?: number;
18
18
  /** 是否禁用 */
19
19
  disabled?: boolean;
20
20
  /** 禁用原因 */
21
21
  disabledReason?: string;
22
22
  /** 是否展示禁用原因 */
23
- showDisabledReason?: string;
23
+ showDisabledReason?: boolean;
24
24
  /** 封面图 */
25
25
  cover?: string;
26
26
  /** 余额标题文案 */