@cloudbase/weda-ui 0.2.15 → 0.2.16

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 (112) hide show
  1. package/package.json +10 -7
  2. package/src/configs/components/calendar.json +75 -0
  3. package/src/configs/components/carousel.json +273 -0
  4. package/src/configs/components/chart/statisticsCard.json +331 -0
  5. package/src/configs/components/dataView.json +139 -0
  6. package/src/configs/components/form/location.json +152 -0
  7. package/src/configs/components/form/uploaderFile.json +2 -1
  8. package/src/configs/components/graphicCard.json +399 -0
  9. package/src/configs/components/link.json +2 -2
  10. package/src/configs/components/listView.json +230 -0
  11. package/src/configs/components/navLayout.json +350 -0
  12. package/src/configs/components/swiper.json +3 -3
  13. package/src/configs/index.js +16 -0
  14. package/src/mp/components/button/index.js +12 -13
  15. package/src/mp/components/button/index.wxml +1 -1
  16. package/src/mp/components/calendar/arrowright--line.svg +11 -0
  17. package/src/mp/components/calendar/index.js +238 -0
  18. package/src/mp/components/calendar/index.json +4 -0
  19. package/src/mp/components/calendar/index.wxml +37 -0
  20. package/src/mp/components/calendar/index.wxss +178 -0
  21. package/src/mp/components/carousel/index.js +88 -0
  22. package/src/mp/components/carousel/index.json +7 -0
  23. package/src/mp/components/carousel/index.wxml +6 -0
  24. package/src/mp/components/chart/statisticsCard/index.js +226 -0
  25. package/src/mp/components/chart/statisticsCard/index.json +4 -0
  26. package/src/mp/components/chart/statisticsCard/index.wxml +9 -0
  27. package/src/mp/components/chart/statisticsCard/index.wxss +45 -0
  28. package/src/mp/components/dataView/index.js +34 -0
  29. package/src/mp/components/dataView/index.json +7 -0
  30. package/src/mp/components/dataView/index.wxml +15 -0
  31. package/src/mp/components/dataView/index.wxss +0 -0
  32. package/src/mp/components/form/location/components/mapChoose/index.js +201 -0
  33. package/src/mp/components/form/location/components/mapChoose/index.json +4 -0
  34. package/src/mp/components/form/location/components/mapChoose/index.wxml +42 -0
  35. package/src/mp/components/form/location/components/mapChoose/index.wxss +188 -0
  36. package/src/mp/components/form/location/index.js +341 -0
  37. package/src/mp/components/form/location/index.json +6 -0
  38. package/src/mp/components/form/location/index.wxml +25 -0
  39. package/src/mp/components/form/location/index.wxss +91 -0
  40. package/src/mp/components/form/uploader/index.js +39 -35
  41. package/src/mp/components/form/uploaderFile/index.js +61 -14
  42. package/src/mp/components/graphicCard/chevron-right.svg +3 -0
  43. package/src/mp/components/graphicCard/index.js +205 -0
  44. package/src/mp/components/graphicCard/index.json +4 -0
  45. package/src/mp/components/graphicCard/index.wxml +29 -0
  46. package/src/mp/components/graphicCard/index.wxss +157 -0
  47. package/src/mp/components/image/index.js +0 -1
  48. package/src/mp/components/listView/arrow-right-line.svg +3 -0
  49. package/src/mp/components/listView/index.js +286 -0
  50. package/src/mp/components/listView/index.json +4 -0
  51. package/src/mp/components/listView/index.wxml +40 -0
  52. package/src/mp/components/listView/index.wxss +150 -0
  53. package/src/mp/components/listView/more-line.svg +3 -0
  54. package/src/mp/components/navLayout/index.js +123 -0
  55. package/src/mp/components/navLayout/index.json +7 -0
  56. package/src/mp/components/navLayout/index.wxml +25 -0
  57. package/src/mp/components/navLayout/index.wxss +1193 -0
  58. package/src/mp/components/swiper/index.wxml +2 -0
  59. package/src/mp/index.json +9 -1
  60. package/src/mp/utils/debounce.js +133 -0
  61. package/src/mp/utils/dr_square_point.js +25 -0
  62. package/src/mp/utils/qqmap-wx-jssdk1.2/qqmap-wx-jssdk.js +1336 -0
  63. package/src/mp/utils/spark-md5.js +776 -0
  64. package/src/mp/utils/tcb.js +18 -0
  65. package/src/web/components/calendar/index.css +382 -0
  66. package/src/web/components/calendar/index.jsx +312 -0
  67. package/src/web/components/calendar/util.js +90 -0
  68. package/src/web/components/carousel/index.css +119 -0
  69. package/src/web/components/carousel/index.tsx +417 -0
  70. package/src/web/components/chart/statisticsCard/index.css +62 -0
  71. package/src/web/components/chart/statisticsCard/index.tsx +286 -0
  72. package/src/web/components/chart/statisticsCard/interface.ts +14 -0
  73. package/src/web/components/dataView/index.tsx +20 -0
  74. package/src/web/components/dataView/interface.ts +6 -0
  75. package/src/web/components/form/location/common/mapChoose.css +178 -0
  76. package/src/web/components/form/location/common/mapChoose.jsx +343 -0
  77. package/src/web/components/form/location/common/mapView.jsx +190 -0
  78. package/src/web/components/form/location/common/propsConfig.js +54 -0
  79. package/src/web/components/form/location/common/selectModal.css +44 -0
  80. package/src/web/components/form/location/common/selectModal.jsx +82 -0
  81. package/src/web/components/form/location/common/useLocationInfo.js +100 -0
  82. package/src/web/components/form/location/components/LocationH5/index.css +243 -0
  83. package/src/web/components/form/location/components/LocationH5/location.h5.jsx +403 -0
  84. package/src/web/components/form/location/components/LocationPC/Header.jsx +109 -0
  85. package/src/web/components/form/location/components/LocationPC/index.css +44 -0
  86. package/src/web/components/form/location/components/LocationPC/location.PC.jsx +323 -0
  87. package/src/web/components/form/location/constants.js +4 -0
  88. package/src/web/components/form/location/index.css +0 -0
  89. package/src/web/components/form/location/index.jsx +25 -0
  90. package/src/web/components/form/uploader/uploader.h5.tsx +16 -10
  91. package/src/web/components/form/uploader/uploader.pc.tsx +15 -11
  92. package/src/web/components/form/uploaderFile/uploadFile.h5.tsx +122 -107
  93. package/src/web/components/form/uploaderFile/uploadFile.pc.tsx +22 -19
  94. package/src/web/components/graphicCard/index.css +163 -0
  95. package/src/web/components/graphicCard/index.tsx +309 -0
  96. package/src/web/components/image/image.tsx +0 -1
  97. package/src/web/components/index.js +12 -0
  98. package/src/web/components/listView/arrow-right-line.svg +3 -0
  99. package/src/web/components/listView/index.css +139 -0
  100. package/src/web/components/listView/index.tsx +354 -0
  101. package/src/web/components/listView/interface.ts +98 -0
  102. package/src/web/components/navLayout/index.css +332 -0
  103. package/src/web/components/navLayout/index.tsx +247 -0
  104. package/src/web/components/tabs/index.tsx +2 -2
  105. package/src/web/components/tabs/tabs.h5.tsx +7 -4
  106. package/src/web/components/uploaderFileView/index.css +9 -9
  107. package/src/web/components/uploaderFileView/index.jsx +32 -23
  108. package/src/web/types.d.ts +15 -14
  109. package/src/web/utils/debounce.js +98 -0
  110. package/src/web/utils/platform.js +31 -0
  111. package/src/web/utils/tcb.js +35 -0
  112. package/src/web/utils/tmap.js +4 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/weda-ui",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "main": "./src/index.js",
5
5
  "module": "./src/index",
6
6
  "miniprogram": "mpdist",
@@ -64,6 +64,8 @@
64
64
  "object.fromentries": "^2.0.5",
65
65
  "prop-types": "^15.7.2",
66
66
  "react-easy-swipe": "0.0.22",
67
+ "spark-md5": "^3.0.2",
68
+ "tdesign-icons-react": "0.0.8",
67
69
  "tea-component": "^2.7.3",
68
70
  "uuid": "8.3.2",
69
71
  "weui": "^2.4.4",
@@ -101,14 +103,15 @@
101
103
  "babel-plugin-istanbul": "^6.1.1",
102
104
  "cross-env": "^7.0.3",
103
105
  "cypress": "^9.3.1",
104
- "eslint": "^8.4.1",
105
- "eslint-config-tencent": "^1.0.2",
106
+ "eslint": "^8.9.0",
107
+ "eslint-config-tencent": "^1.0.3",
106
108
  "eslint-plugin-cypress": "^2.12.1",
107
- "eslint-plugin-jest": "^25.3.0",
108
- "eslint-plugin-react": "^7.27.1",
109
+ "eslint-plugin-jest": "^26.1.1",
110
+ "eslint-plugin-react": "^7.28.0",
111
+ "eslint-plugin-rulesdir": "^0.2.1",
109
112
  "husky": "^7.0.4",
110
113
  "identity-obj-proxy": "^3.0.0",
111
- "jest": "^27.4.5",
114
+ "jest": "^27.5.1",
112
115
  "less": "^4.1.2",
113
116
  "miniprogram-simulate": "^1.4.3",
114
117
  "nano-staged": "^0.5.0",
@@ -134,7 +137,7 @@
134
137
  {
135
138
  "path": ".temp/dist/*.main.*",
136
139
  "webpack": false,
137
- "limit": "700 KB"
140
+ "limit": "720 KB"
138
141
  }
139
142
  ],
140
143
  "nyc": {
@@ -0,0 +1,75 @@
1
+ {
2
+ "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
3
+ "data": {
4
+ "properties": {
5
+ "initValue": {
6
+ "type": "date",
7
+ "title": "日历展示时间",
8
+ "x-category": "基础属性",
9
+ "x-index": 1
10
+ },
11
+ "configData": {
12
+ "type": "array",
13
+ "title": "展示配置",
14
+ "x-category": "基础属性",
15
+ "x-index": 2,
16
+ "items": {
17
+ "type": "object",
18
+ "properties": {
19
+ "matchDate": {
20
+ "title": "对应日期",
21
+ "type": "date"
22
+ },
23
+ "disabled": {
24
+ "title": "是否置灰",
25
+ "type": "string",
26
+ "enum": [
27
+ {
28
+ "label": "是",
29
+ "value": "true"
30
+ },
31
+ {
32
+ "label": "否",
33
+ "value": "false"
34
+ }
35
+ ]
36
+ },
37
+ "marked": {
38
+ "title": "打点标记",
39
+ "type": "string",
40
+ "enum": [
41
+ {
42
+ "label": "红色",
43
+ "value": "#E34D59"
44
+ },
45
+ {
46
+ "label": "绿色",
47
+ "value": "#00A870"
48
+ },
49
+ {
50
+ "label": "橙色",
51
+ "value": "#ED7B2F"
52
+ }
53
+ ]
54
+ }
55
+ }
56
+ },
57
+ "default": []
58
+ },
59
+ "initVisible": {
60
+ "type": "boolean",
61
+ "default": true,
62
+ "title": "时间控制器",
63
+ "x-category": "基础属性",
64
+ "x-index": 3
65
+ }
66
+ }
67
+ },
68
+ "meta": {
69
+ "name": "Calendar",
70
+ "title": "日历",
71
+ "description": "日历组件",
72
+ "category": "展示",
73
+ "icon": "https://imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/Calendar.svg"
74
+ }
75
+ }
@@ -0,0 +1,273 @@
1
+ {
2
+ "$schema": "https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json",
3
+ "data": {
4
+ "properties": {
5
+ "autoplay": {
6
+ "title": "自动切换",
7
+ "default": true,
8
+ "type": "boolean",
9
+ "x-category": "基础属性"
10
+ },
11
+ "indicatorDots": {
12
+ "title": "导航锚点",
13
+ "default": true,
14
+ "type": "boolean",
15
+ "x-category": "高级属性"
16
+ },
17
+ "current": {
18
+ "title": "当前所在滑块的 index",
19
+ "default": 0,
20
+ "type": "number",
21
+ "x-category": "高级属性"
22
+ },
23
+ "interval": {
24
+ "title": "自动切换时间间隔",
25
+ "default": 5000,
26
+ "type": "number",
27
+ "x-category": "基础属性"
28
+ },
29
+ "duration": {
30
+ "title": "滑动动画时长",
31
+ "default": 500,
32
+ "type": "number",
33
+ "x-category": "高级属性"
34
+ },
35
+ "circular": {
36
+ "title": "衔接滑动",
37
+ "default": true,
38
+ "type": "boolean",
39
+ "x-category": "高级属性"
40
+ },
41
+ "vertical": {
42
+ "title": "纵向轮播",
43
+ "default": false,
44
+ "type": "boolean",
45
+ "x-category": "基础属性"
46
+ },
47
+ "indicatorColor": {
48
+ "title": "锚点颜色",
49
+ "type": "string",
50
+ "x-component": "color",
51
+ "default": "rgba(200, 200, 200, 0.9)",
52
+ "x-category": "高级属性"
53
+ },
54
+ "indicatorActiveColor": {
55
+ "title": "锚点激活色",
56
+ "type": "string",
57
+ "x-component": "color",
58
+ "default": "rgba(0, 0, 0, 0.9)",
59
+ "x-category": "高级属性"
60
+ },
61
+ "images": {
62
+ "type": "array",
63
+ "items": {
64
+ "type": "object",
65
+ "title": "images",
66
+ "default": {
67
+ "image": "https://main.qcloudimg.com/raw/828ee6644f137d166b063ad7f5dda842.png",
68
+ "title": "图片1",
69
+ "height": "160px",
70
+ "width": "100%",
71
+ "tapMode":"tap",
72
+ "fit":"cover"
73
+ },
74
+ "properties": {
75
+ "title": {
76
+ "type": "string",
77
+ "title": "图片标题",
78
+ "default": "图片1",
79
+ "x-index": 20
80
+ },
81
+ "image": {
82
+ "type": "image",
83
+ "title": "图片1",
84
+ "default": "https://main.qcloudimg.com/raw/828ee6644f137d166b063ad7f5dda842.png",
85
+ "x-index": 30
86
+ },
87
+ "height": {
88
+ "type": "string",
89
+ "title": "图片高度",
90
+ "default": "160px",
91
+ "x-index": 40
92
+ },
93
+ "width": {
94
+ "type": "string",
95
+ "title": "图片宽度",
96
+ "default": "100%",
97
+ "x-index": 50
98
+ },
99
+ "fit": {
100
+ "title": "布局模式",
101
+ "type": "string",
102
+ "default": "cover",
103
+ "enum": [
104
+ {
105
+ "value": "cover",
106
+ "label": "铺满"
107
+ },
108
+ {
109
+ "value": "contain",
110
+ "label": "适合"
111
+ },
112
+ {
113
+ "value": "fill",
114
+ "label": "拉伸"
115
+ }
116
+ ],
117
+ "x-index": 60
118
+ },
119
+ "tapMode": {
120
+ "type": "string",
121
+ "title": "点击时",
122
+ "default": "tap",
123
+ "x-index": 70,
124
+ "enum": [
125
+ {
126
+ "value": "tap",
127
+ "label": "无行为",
128
+ "icon": "weda-editor-icon-alert-close"
129
+ },
130
+ {
131
+ "value": "inside",
132
+ "label": "打开页面",
133
+ "icon": "weda-editor-icon-docs"
134
+ },
135
+ {
136
+ "value": "outer",
137
+ "label": "外部链接",
138
+ "icon": "weda-editor-icon-link",
139
+ "tooltip":[{
140
+ "platform":["ALL","MP"],
141
+ "text":"小程序平台不支持跳转外部链接"
142
+ }],
143
+ "disabled": [{
144
+ "platform":["MP"]
145
+ }]
146
+ }
147
+ ],
148
+ "x-component": "icon-text-radio",
149
+ "x-linkages": [
150
+ {
151
+ "type": "value:visible",
152
+ "target": "*(dataForm.insideUrl)",
153
+ "condition": "{{$self.value=='inside'}}"
154
+ },
155
+ {
156
+ "type": "value:visible",
157
+ "target": "*(dataForm.outerUrl)",
158
+ "condition": "{{$self.value=='outer'}}"
159
+ },
160
+ {
161
+ "type": "value:visible",
162
+ "target": "*(dataForm.widthParams)",
163
+ "condition": "{{$self.value=='inside'}}"
164
+ },
165
+ {
166
+ "type": "value:visible",
167
+ "target": "*(dataForm.newPage)",
168
+ "condition": "{{$self.value=='outer'}}"
169
+ }
170
+ ]
171
+ },
172
+ "insideUrl": {
173
+ "type": "string",
174
+ "x-component": "page-list",
175
+ "default": "",
176
+ "title": "跳转页面",
177
+ "description": "通过下拉选择应用页面,可以实现内部页面跳转",
178
+ "x-category": "基础属性",
179
+ "x-index": 120,
180
+ "x-component-props": {
181
+ "hideAddPlatform": ["MP"],
182
+ "addHidden":true
183
+ },
184
+ "x-linkages": [
185
+ {
186
+ "type": "value:state",
187
+ "target": "*(dataForm.params)",
188
+ "condition": "{{$self.value && $self.value.length>0}}",
189
+ "state":{
190
+ "pageId":"{{$self.value}}"
191
+ }
192
+ }
193
+ ]
194
+ },
195
+ "outerUrl": {
196
+ "title": "URL",
197
+ "default": "",
198
+ "type": "string",
199
+ "placeholder": "外部链接请以http://或https://开头",
200
+ "description":"当前页面打开只支持https"
201
+ },
202
+ "newPage": {
203
+ "title": "打开新页面",
204
+ "default": false,
205
+ "type": "boolean"
206
+ },
207
+ "widthParams": {
208
+ "title": "携带参数",
209
+ "default": false,
210
+ "type": "boolean",
211
+ "x-linkages": [
212
+ {
213
+ "type": "value:visible",
214
+ "target": "*(dataForm.params)",
215
+ "condition": "{{$self.value==true}}"
216
+ }
217
+ ]
218
+ },
219
+ "params": {
220
+ "type": "array",
221
+ "title": "参数",
222
+ "pageId":"",
223
+ "default":[],
224
+ "x-component":"page-params"
225
+ }
226
+ }
227
+ },
228
+ "title": "轮播图",
229
+ "default": [
230
+ {
231
+ "image": "https://main.qcloudimg.com/raw/828ee6644f137d166b063ad7f5dda842.png",
232
+ "title": "图片1",
233
+ "fit":"cover",
234
+ "tapMode":"tap",
235
+ "height":"160px",
236
+ "width":"100%"
237
+ },
238
+ {
239
+ "image": "https://main.qcloudimg.com/raw/880b5277dc7d8f62fd6b5f964bee3af4.png",
240
+ "title": "图片2",
241
+ "fit":"cover",
242
+ "tapMode":"tap",
243
+ "height":"160px",
244
+ "width":"100%"
245
+ },
246
+ {
247
+ "image": "https://main.qcloudimg.com/raw/af8d7dff73fea17aa099876bc3a811fa.png",
248
+ "title": "图片3",
249
+ "fit":"cover",
250
+ "tapMode":"tap",
251
+ "height":"160px",
252
+ "width":"100%"
253
+ }
254
+ ],
255
+ "x-component": "list"
256
+ }
257
+ }
258
+ },
259
+ "events": [
260
+ {
261
+ "name": "change",
262
+ "title": "切换"
263
+ }
264
+ ],
265
+ "meta": {
266
+ "title": "轮播图",
267
+ "description": "轮播图",
268
+ "category": "展示",
269
+ "componentOrder": 80,
270
+ "icon": "//imgcache.qq.com/qcloud/lowcode/static/ide/left-material-icon/Swiper.svg"
271
+ },
272
+ "mpOrigin": "swiper"
273
+ }