@cloudbase/weda-ui 3.4.4 → 3.4.6

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 (147) hide show
  1. package/dist/configs/components/chart/bar.json +113 -8
  2. package/dist/configs/components/chart/line.js +113 -8
  3. package/dist/configs/components/chart/pie.json +113 -8
  4. package/dist/configs/components/chart/statisticsCard.json +57 -0
  5. package/dist/configs/components/dataView.js +7 -7
  6. package/dist/configs/components/form/input.json +48 -2
  7. package/dist/configs/components/form/richText.json +2 -1
  8. package/dist/configs/components/form/uploader.json +62 -14
  9. package/dist/configs/components/graphicCard.json +1 -1
  10. package/dist/configs/components/grid/col.js +4 -1
  11. package/dist/configs/components/grid/grid.js +8 -3
  12. package/dist/configs/components/grid/row.js +51 -3
  13. package/dist/configs/components/listView.js +113 -9
  14. package/dist/configs/components/navLayout.json +1 -1
  15. package/dist/configs/components/repeater.js +4 -1
  16. package/dist/configs/components/table.json +125 -9
  17. package/dist/configs/components/wd-bubble.js +6 -0
  18. package/dist/configs/components/wd-button.js +6 -0
  19. package/dist/configs/components/wd-divider.js +7 -18
  20. package/dist/configs/components/wd-icon.js +7 -0
  21. package/dist/configs/components/wd-image.js +7 -0
  22. package/dist/configs/components/wd-link.js +7 -2
  23. package/dist/configs/components/wd-text.js +14 -6
  24. package/dist/configs/index.js +0 -2
  25. package/dist/docs/common/componentList.js +1 -1
  26. package/dist/style/index.scss +1 -1
  27. package/dist/web/actions/showModal/index.js +1 -1
  28. package/dist/web/components/calendar/index.js +2 -2
  29. package/dist/web/components/chart/common/data-transform.js +1 -1
  30. package/dist/web/components/chart/statisticsCard/index.js +1 -1
  31. package/dist/web/components/flow/components/index.js +0 -4
  32. package/dist/web/components/flow/frame/index.js +4 -3
  33. package/dist/web/components/flow/frame/types.js +11 -5
  34. package/dist/web/components/flow/frame/utils.js +60 -1
  35. package/dist/web/components/flow/modules/chart/Chart.js +2 -3
  36. package/dist/web/components/flow/modules/chart/index.css +0 -3
  37. package/dist/web/components/flow/modules/combination/index.js +1 -1
  38. package/dist/web/components/flow/modules/operations/components/button/index.js +11 -0
  39. package/dist/web/components/flow/modules/operations/components/button/style.css +5 -0
  40. package/dist/web/components/flow/modules/operations/components/index.js +6 -0
  41. package/dist/web/components/flow/modules/operations/components/popup/index.js +100 -0
  42. package/dist/web/components/flow/modules/operations/components/popup/style.css +154 -0
  43. package/dist/web/components/flow/modules/operations/components/popup/types.js +1 -0
  44. package/dist/web/components/flow/modules/operations/components/user-select/index.js +43 -0
  45. package/dist/web/components/flow/modules/operations/components/user-select/style.css +4 -0
  46. package/dist/web/components/flow/modules/operations/components/user-select/types.js +1 -0
  47. package/dist/web/components/flow/modules/operations/config/approval-form-config.js +140 -0
  48. package/dist/web/components/flow/modules/operations/config/control-config.js +218 -0
  49. package/dist/web/components/flow/modules/operations/config/index.js +2 -0
  50. package/dist/web/components/flow/modules/operations/config/types.js +1 -0
  51. package/dist/web/components/flow/modules/operations/control.js +26 -0
  52. package/dist/web/components/flow/modules/operations/controls-items/add-assignee-btn.js +33 -0
  53. package/dist/web/components/flow/modules/operations/controls-items/apply-cc-btn.js +12 -0
  54. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/comment/index.js +188 -0
  55. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/comment/style.css +51 -0
  56. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/drawer-form/index.js +64 -0
  57. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/drawer-form/types.js +1 -0
  58. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/drawer-form/view-model.js +83 -0
  59. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/field/index.js +16 -0
  60. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/field/style.css +56 -0
  61. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/index.js +47 -0
  62. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/style.css +60 -0
  63. package/dist/web/components/flow/modules/operations/controls-items/cancel-apply-btn.js +15 -0
  64. package/dist/web/components/flow/modules/operations/controls-items/check-list-popup/index.js +11 -0
  65. package/dist/web/components/flow/modules/operations/controls-items/check-list-popup/style.css +26 -0
  66. package/dist/web/components/flow/modules/operations/controls-items/flow-task-info-modal.js +98 -0
  67. package/dist/web/components/flow/modules/operations/controls-items/index.js +18 -0
  68. package/dist/web/components/flow/modules/operations/controls-items/initiation-btn.js +25 -0
  69. package/dist/web/components/flow/modules/operations/controls-items/revoke-modal/index.js +50 -0
  70. package/dist/web/components/flow/modules/operations/controls-items/revoke-modal/style.css +28 -0
  71. package/dist/web/components/flow/modules/operations/controls-items/roll-back-modal.js +104 -0
  72. package/dist/web/components/flow/modules/operations/controls-items/types.js +1 -0
  73. package/dist/web/components/flow/modules/operations/index.js +2 -0
  74. package/dist/web/components/flow/modules/operations/style.css +20 -0
  75. package/dist/web/components/flow/modules/operations/view-model.js +137 -0
  76. package/dist/web/components/flow/services/ideData/instance.js +2 -2
  77. package/dist/web/components/flow/services/ideData/pageDetail.js +1 -0
  78. package/dist/web/components/form/select/dropdown-select/h5.js +1 -1
  79. package/dist/web/components/form/select/dropdown-select/index.css +7 -0
  80. package/dist/web/components/form/select/index.js +2 -7
  81. package/dist/web/components/form/textarea/index.js +1 -1
  82. package/dist/web/components/form/uploader/index.css +19 -0
  83. package/dist/web/components/form/uploader/index.js +21 -3
  84. package/dist/web/components/form/uploader/uploader.h5.js +14 -8
  85. package/dist/web/components/form/uploader/uploader.pc.js +29 -16
  86. package/dist/web/components/form/uploaderFile/index.css +9 -5
  87. package/dist/web/components/form/uploaderFile/uploadFile.h5.js +23 -21
  88. package/dist/web/components/form/uploaderFile/uploadFile.pc.js +14 -10
  89. package/dist/web/components/form/userOrgSelect/common/fetch-data-service.js +0 -1
  90. package/dist/web/components/form/userOrgSelect/component/depart-select/index.js +1 -1
  91. package/dist/web/components/form/userOrgSelect/component/user-select-h5/index.js +43 -22
  92. package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-select-h5.js +15 -4
  93. package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-model.js +2 -2
  94. package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-select-pc.js +4 -2
  95. package/dist/web/components/grid/col.js +81 -18
  96. package/dist/web/components/grid/grid.js +1 -1
  97. package/dist/web/components/grid/row.js +4 -2
  98. package/dist/web/components/index.js +1 -1
  99. package/dist/web/components/listView/index.js +98 -100
  100. package/dist/web/components/lottery/index.js +122 -123
  101. package/dist/web/components/richTextView/index.css +2 -0
  102. package/dist/web/components/swiper/index.js +14 -8
  103. package/dist/web/components/table/BaseTable.js +3 -3
  104. package/dist/web/components/table/ExportFileModalByApi/index.js +1 -1
  105. package/dist/web/components/table/ImportFileModal/index.js +1 -1
  106. package/dist/web/components/table/ImportFileModalByApi/index.js +1 -1
  107. package/dist/web/components/wd-bubble/wd-bubble.js +11 -3
  108. package/dist/web/components/wd-button/wd-button.js +22 -13
  109. package/dist/web/components/wd-divider/wd-divider.js +10 -7
  110. package/dist/web/components/wd-icon/wd-icon.js +12 -3
  111. package/dist/web/components/wd-image/index.js +12 -5
  112. package/dist/web/components/wd-link/wd-link.js +11 -3
  113. package/dist/web/components/wd-text/wd-text.js +15 -3
  114. package/dist/web/utils/hooks/use-cloud-id-temp-url.js +7 -2
  115. package/dist/web/utils/platform.js +9 -2
  116. package/dist/web/utils/tool.js +11 -0
  117. package/dist/web/utils/widget-api/index.js +3 -0
  118. package/package.json +7 -5
  119. package/dist/configs/components/auth.json +0 -17
  120. package/dist/web/components/flow/components/FlowUserSelect/index.css +0 -116
  121. package/dist/web/components/flow/components/FlowUserSelect/index.js +0 -115
  122. package/dist/web/components/flow/components/HighlightTextarea/index.css +0 -42
  123. package/dist/web/components/flow/components/HighlightTextarea/index.js +0 -131
  124. package/dist/web/components/flow/components/UserSelectModel/UserSelect.js +0 -74
  125. package/dist/web/components/flow/components/UserSelectModel/UserSelectMobile.css +0 -8
  126. package/dist/web/components/flow/components/UserSelectModel/UserSelectMobile.js +0 -86
  127. package/dist/web/components/flow/components/UserSelectModel/index.js +0 -18
  128. package/dist/web/components/flow/components/WedaUserTransfer/index.css +0 -3
  129. package/dist/web/components/flow/components/WedaUserTransfer/index.js +0 -162
  130. package/dist/web/components/flow/modules/control/ApprovalDrawer.css +0 -144
  131. package/dist/web/components/flow/modules/control/ApprovalDrawer.js +0 -178
  132. package/dist/web/components/flow/modules/control/ApprovalPopup.css +0 -115
  133. package/dist/web/components/flow/modules/control/ApprovalPopup.js +0 -241
  134. package/dist/web/components/flow/modules/control/Control.css +0 -29
  135. package/dist/web/components/flow/modules/control/Control.js +0 -93
  136. package/dist/web/components/flow/modules/control/ControlMobile.css +0 -69
  137. package/dist/web/components/flow/modules/control/ControlMobile.js +0 -133
  138. package/dist/web/components/flow/modules/control/FlowTaskInfoModal.css +0 -3
  139. package/dist/web/components/flow/modules/control/FlowTaskInfoModal.js +0 -31
  140. package/dist/web/components/flow/modules/control/constants/index.js +0 -35
  141. package/dist/web/components/flow/modules/control/index.js +0 -15
  142. package/dist/web/components/flow/modules/control/provider/index.js +0 -17
  143. package/dist/web/components/flow/modules/control/provider/useControlModel.js +0 -256
  144. package/dist/web/components/flow/modules/control/provider/useMobileModel.js +0 -86
  145. package/dist/web/components/flow/modules/control/provider/useRevokeAndBackHook.js +0 -82
  146. package/dist/web/components/flow/modules/control/utils/ControlModelUtils.js +0 -57
  147. package/dist/web/components/flow/modules/control/utils/index.js +0 -2
@@ -255,137 +255,136 @@ export default React.forwardRef(function Lottery({ className, id, style, prizeLi
255
255
  },
256
256
  ];
257
257
  return (React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
258
- React.createElement("div", { className: "body", key: "lottery", "data-testid": "lottery" },
259
- React.createElement("div", { className: cls, id: id, style: style },
260
- React.createElement("div", { className: `${CLASS_PREFIX}__wrap` },
261
- dotList.map((dot, index) => {
262
- return (React.createElement("div", { key: index },
263
- dot.single && (React.createElement("div", { key: `${dot.direction}-${index}`, className: classNames(`${CLASS_PREFIX}__dot-single`, `${CLASS_PREFIX}__dot-${dot.position}`), style: {
264
- width: `${(9 * widthRatio) / 14}rem`,
265
- height: `${(9 * heightRatio) / 14}rem`,
266
- top: `${dot.position}` === 'left-top' ||
267
- `${dot.position}` === 'right-top'
268
- ? `${(9 * heightRatio) / 14}rem`
269
- : '',
270
- bottom: `${dot.position}` === 'left-bottom' ||
271
- `${dot.position}` === 'right-bottom'
272
- ? `${(9 * heightRatio) / 14}rem`
273
- : '',
274
- left: `${dot.position}` === 'left-top' ||
275
- `${dot.position}` === 'left-bottom'
276
- ? `${(6 * widthRatio) / 14}rem`
258
+ React.createElement("div", { className: cls, id: id, style: style, "data-testid": "lottery" },
259
+ React.createElement("div", { className: `${CLASS_PREFIX}__wrap` },
260
+ dotList.map((dot, index) => {
261
+ return (React.createElement("div", { key: index },
262
+ dot.single && (React.createElement("div", { key: `${dot.direction}-${index}`, className: classNames(`${CLASS_PREFIX}__dot-single`, `${CLASS_PREFIX}__dot-${dot.position}`), style: {
263
+ width: `${(9 * widthRatio) / 14}rem`,
264
+ height: `${(9 * heightRatio) / 14}rem`,
265
+ top: `${dot.position}` === 'left-top' ||
266
+ `${dot.position}` === 'right-top'
267
+ ? `${(9 * heightRatio) / 14}rem`
268
+ : '',
269
+ bottom: `${dot.position}` === 'left-bottom' ||
270
+ `${dot.position}` === 'right-bottom'
271
+ ? `${(9 * heightRatio) / 14}rem`
272
+ : '',
273
+ left: `${dot.position}` === 'left-top' ||
274
+ `${dot.position}` === 'left-bottom'
275
+ ? `${(6 * widthRatio) / 14}rem`
276
+ : '',
277
+ right: `${dot.position}` === 'right-top' ||
278
+ `${dot.position}` === 'right-bottom'
279
+ ? `${(6 * widthRatio) / 14}rem`
280
+ : '',
281
+ } })),
282
+ !dot.single && (React.createElement("div", { key: `${dot.direction}-${index}`, className: `${CLASS_PREFIX}__dot-${dot.position}`, style: {
283
+ left: `${dot.position}` === 'top' ||
284
+ `${dot.position}` === 'bottom'
285
+ ? `calc((${'100%'} - ${dotWidth}rem) / 2)`
286
+ : `${dot.position}` === 'left'
287
+ ? `${(widthRatio * 18 - widthRatio * 9) / 2 / 14}rem`
277
288
  : '',
278
- right: `${dot.position}` === 'right-top' ||
279
- `${dot.position}` === 'right-bottom'
280
- ? `${(6 * widthRatio) / 14}rem`
289
+ top: `${dot.position}` === 'left' ||
290
+ `${dot.position}` === 'right'
291
+ ? `calc((100% - ${dotHeight}rem) / 2)`
292
+ : `${dot.position}` === 'top'
293
+ ? `${(heightRatio * 18 - heightRatio * 9) / 2 / 14}rem`
281
294
  : '',
282
- } })),
283
- !dot.single && (React.createElement("div", { key: `${dot.direction}-${index}`, className: `${CLASS_PREFIX}__dot-${dot.position}`, style: {
284
- left: `${dot.position}` === 'top' ||
285
- `${dot.position}` === 'bottom'
286
- ? `calc((${'100%'} - ${dotWidth}rem) / 2)`
287
- : `${dot.position}` === 'left'
288
- ? `${(widthRatio * 18 - widthRatio * 9) / 2 / 14}rem`
295
+ bottom: `${dot.position}` === 'bottom'
296
+ ? `${(heightRatio * 18 - heightRatio * 9) / 2 / 14}rem`
297
+ : '',
298
+ right: `${dot.position}` === 'right'
299
+ ? `${(widthRatio * 18 - widthRatio * 9) / 2 / 14}rem`
300
+ : '',
301
+ } }, true && renderDot(dot.direction, dot.list)))));
302
+ }),
303
+ React.createElement("div", { className: `${CLASS_PREFIX}__inner`, style: {
304
+ paddingTop: `${(18 * heightRatio) / 14}rem`,
305
+ paddingBottom: `${(18 * heightRatio) / 14}rem`,
306
+ paddingLeft: `${(18 * widthRatio) / 14}rem`,
307
+ paddingRight: `${(18 * widthRatio) / 14}rem`,
308
+ } },
309
+ React.createElement("div", { className: `${CLASS_PREFIX}__inner-wrap` },
310
+ React.createElement("ul", { className: `${CLASS_PREFIX}__list` }, lotteryList.map((item, index) => {
311
+ return (React.createElement("li", { "data-testid": "lottery-item", key: index, className: classNames(`${CLASS_PREFIX}__turntable-item`, item.idx === activedId ? 'is-actived' : '', item.selected ? 'is-selected' : ''), style: {
312
+ width: `calc((${'100%'} - ${(widthRatio * 8 * 4) / 14}rem) / 3)`,
313
+ height: `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3)`,
314
+ top: `${index}` == '0' ||
315
+ `${index}` == '1' ||
316
+ `${index}` == '2'
317
+ ? `${(heightRatio * 8) / 14}rem`
318
+ : `${index}` == '3'
319
+ ? `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3 + ${(heightRatio * 8 * 2) / 14}rem)`
289
320
  : '',
290
- top: `${dot.position}` === 'left' ||
291
- `${dot.position}` === 'right'
292
- ? `calc((100% - ${dotHeight}rem) / 2)`
293
- : `${dot.position}` === 'top'
294
- ? `${(heightRatio * 18 - heightRatio * 9) / 2 / 14}rem`
321
+ bottom: `${index}` == '4' ||
322
+ `${index}` == '5' ||
323
+ `${index}` == '6'
324
+ ? `${(heightRatio * 8) / 14}rem`
325
+ : `${index}` == '7'
326
+ ? `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3 + ${(heightRatio * 8 * 2) / 14}rem)`
295
327
  : '',
296
- bottom: `${dot.position}` === 'bottom'
297
- ? `${(heightRatio * 18 - heightRatio * 9) / 2 / 14}rem`
328
+ right: `${index}` == '2' ||
329
+ `${index}` == '3' ||
330
+ `${index}` == '4'
331
+ ? `${(widthRatio * 8) / 14}rem`
298
332
  : '',
299
- right: `${dot.position}` === 'right'
300
- ? `${(widthRatio * 18 - widthRatio * 9) / 2 / 14}rem`
301
- : '',
302
- } }, true && renderDot(dot.direction, dot.list)))));
303
- }),
304
- React.createElement("div", { className: `${CLASS_PREFIX}__inner`, style: {
305
- paddingTop: `${(18 * heightRatio) / 14}rem`,
306
- paddingBottom: `${(18 * heightRatio) / 14}rem`,
307
- paddingLeft: `${(18 * widthRatio) / 14}rem`,
308
- paddingRight: `${(18 * widthRatio) / 14}rem`,
309
- } },
310
- React.createElement("div", { className: `${CLASS_PREFIX}__inner-wrap` },
311
- React.createElement("ul", { className: `${CLASS_PREFIX}__list` }, lotteryList.map((item, index) => {
312
- return (React.createElement("li", { "data-testid": "lottery-item", key: index, className: classNames(`${CLASS_PREFIX}__turntable-item`, item.idx === activedId ? 'is-actived' : '', item.selected ? 'is-selected' : ''), style: {
313
- width: `calc((${'100%'} - ${(widthRatio * 8 * 4) / 14}rem) / 3)`,
314
- height: `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3)`,
315
- top: `${index}` == '0' ||
316
- `${index}` == '1' ||
317
- `${index}` == '2'
318
- ? `${(heightRatio * 8) / 14}rem`
319
- : `${index}` == '3'
320
- ? `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3 + ${(heightRatio * 8 * 2) / 14}rem)`
321
- : '',
322
- bottom: `${index}` == '4' ||
323
- `${index}` == '5' ||
324
- `${index}` == '6'
325
- ? `${(heightRatio * 8) / 14}rem`
326
- : `${index}` == '7'
327
- ? `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3 + ${(heightRatio * 8 * 2) / 14}rem)`
328
- : '',
329
- right: `${index}` == '2' ||
330
- `${index}` == '3' ||
331
- `${index}` == '4'
332
- ? `${(widthRatio * 8) / 14}rem`
333
+ left: `${index}` == '0' ||
334
+ `${index}` == '6' ||
335
+ `${index}` == '7'
336
+ ? `${(widthRatio * 8) / 14}rem`
337
+ : `${index}` == '1' || `${index}` == '5'
338
+ ? `calc((${'100%'} - ${(widthRatio * 8 * 4) / 14}rem) / 3 + ${(widthRatio * 8 * 2) / 14}rem)`
333
339
  : '',
334
- left: `${index}` == '0' ||
335
- `${index}` == '6' ||
336
- `${index}` == '7'
337
- ? `${(widthRatio * 8) / 14}rem`
338
- : `${index}` == '1' || `${index}` == '5'
339
- ? `calc((${'100%'} - ${(widthRatio * 8 * 4) / 14}rem) / 3 + ${(widthRatio * 8 * 2) / 14}rem)`
340
- : '',
340
+ } },
341
+ React.createElement("div", { className: `${CLASS_PREFIX}__turntable-cell`, style: {
342
+ borderLeftWidth: `${(4 * widthRatio) / 14}rem`,
343
+ borderRightWidth: `${(4 * widthRatio) / 14}rem`,
344
+ borderTopWidth: `${(4 * heightRatio) / 14}rem`,
345
+ borderBottomWidth: `${(4 * heightRatio) / 14}rem`,
346
+ paddingTop: `${(8 * heightRatio) / 14}rem`,
347
+ paddingBottom: `${(8 * heightRatio) / 14}rem`,
348
+ paddingLeft: `${(2 * widthRatio) / 14}rem`,
349
+ paddingRight: `${(2 * widthRatio) / 14}rem`,
341
350
  } },
342
- React.createElement("div", { className: `${CLASS_PREFIX}__turntable-cell`, style: {
343
- borderLeftWidth: `${(4 * widthRatio) / 14}rem`,
344
- borderRightWidth: `${(4 * widthRatio) / 14}rem`,
345
- borderTopWidth: `${(4 * heightRatio) / 14}rem`,
346
- borderBottomWidth: `${(4 * heightRatio) / 14}rem`,
347
- paddingTop: `${(8 * heightRatio) / 14}rem`,
348
- paddingBottom: `${(8 * heightRatio) / 14}rem`,
349
- paddingLeft: `${(2 * widthRatio) / 14}rem`,
350
- paddingRight: `${(2 * widthRatio) / 14}rem`,
351
+ item.src && (React.createElement("div", { className: `${CLASS_PREFIX}__turntable-cell-image`, style: {
352
+ height: `${(heightRatio * 40) / 14}rem`,
351
353
  } },
352
- item.src && (React.createElement("div", { className: `${CLASS_PREFIX}__turntable-cell-image`, style: {
354
+ React.createElement("img", { src: item.src, alt: item.desc, className: `${CLASS_PREFIX}__turntable-cell-icon`, style: {
355
+ width: `${(widthRatio * 40) / 14}rem`,
353
356
  height: `${(heightRatio * 40) / 14}rem`,
354
- } },
355
- React.createElement("img", { src: item.src, alt: item.desc, className: `${CLASS_PREFIX}__turntable-cell-icon`, style: {
356
- width: `${(widthRatio * 40) / 14}rem`,
357
- height: `${(heightRatio * 40) / 14}rem`,
358
- } }))),
359
- item.desc && (React.createElement("div", { className: `${CLASS_PREFIX}__turntable-cell-desc`, style: {
360
- marginTop: `${(heightRatio * 6) / 14}rem`,
361
- fontSize: `${(widthRatio * 12) / 14}rem`,
362
- lineHeight: `${(heightRatio * 17) / 14}rem`,
363
- } }, item.desc)))));
364
- })),
365
- React.createElement("div", { className: classNames(`${CLASS_PREFIX}__turntable-btn`, btnActived ? 'is-actived' : ''), style: {
366
- width: `calc((${'100%'} - ${(widthRatio * 8 * 4) / 14}rem) / 3)`,
367
- height: `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3)`,
368
- top: `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3 + ${(heightRatio * 8 * 2) / 14}rem)`,
369
- left: `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3 + ${(heightRatio * 8 * 2) / 14}rem)`,
357
+ } }))),
358
+ item.desc && (React.createElement("div", { className: `${CLASS_PREFIX}__turntable-cell-desc`, style: {
359
+ marginTop: `${(heightRatio * 6) / 14}rem`,
360
+ fontSize: `${(widthRatio * 12) / 14}rem`,
361
+ lineHeight: `${(heightRatio * 17) / 14}rem`,
362
+ } }, item.desc)))));
363
+ })),
364
+ React.createElement("div", { className: classNames(`${CLASS_PREFIX}__turntable-btn`, btnActived ? 'is-actived' : ''), style: {
365
+ width: `calc((${'100%'} - ${(widthRatio * 8 * 4) / 14}rem) / 3)`,
366
+ height: `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3)`,
367
+ top: `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3 + ${(heightRatio * 8 * 2) / 14}rem)`,
368
+ left: `calc((${'100%'} - ${(heightRatio * 8 * 4) / 14}rem) / 3 + ${(heightRatio * 8 * 2) / 14}rem)`,
369
+ } },
370
+ React.createElement("div", { className: `${CLASS_PREFIX}__btn-inner`, style: {
371
+ paddingTop: `${(9 * heightRatio) / 14}rem`,
372
+ paddingBottom: `${(9 * heightRatio) / 14}rem`,
373
+ paddingLeft: `${(9 * widthRatio) / 14}rem`,
374
+ paddingRight: `${(9 * widthRatio) / 14}rem`,
370
375
  } },
371
- React.createElement("div", { className: `${CLASS_PREFIX}__btn-inner`, style: {
372
- paddingTop: `${(9 * heightRatio) / 14}rem`,
373
- paddingBottom: `${(9 * heightRatio) / 14}rem`,
374
- paddingLeft: `${(9 * widthRatio) / 14}rem`,
375
- paddingRight: `${(9 * widthRatio) / 14}rem`,
376
- } },
377
- React.createElement("div", { className: `${CLASS_PREFIX}__btn` },
378
- React.createElement("a", { "data-testid": "start-lottery", className: `${CLASS_PREFIX}__btn-image`, style: {
379
- paddingTop: `${(11 * heightRatio) / 14}rem`,
380
- paddingBottom: `${(11 * heightRatio) / 14}rem`,
381
- paddingLeft: `${(15 * widthRatio) / 14}rem`,
382
- paddingRight: `${(15 * widthRatio) / 14}rem`,
383
- }, onClick: startLottery },
384
- React.createElement("p", { className: `${CLASS_PREFIX}__btn-text`, style: {
385
- fontSize: `${(widthRatio * 18) / 14}rem`,
386
- lineHeight: `${(widthRatio * 22) / 14}rem`,
387
- } },
388
- "\u5F00\u59CB",
389
- React.createElement("br", null),
390
- "\u62BD\u5956"))))))))))));
376
+ React.createElement("div", { className: `${CLASS_PREFIX}__btn` },
377
+ React.createElement("a", { "data-testid": "start-lottery", className: `${CLASS_PREFIX}__btn-image`, style: {
378
+ paddingTop: `${(11 * heightRatio) / 14}rem`,
379
+ paddingBottom: `${(11 * heightRatio) / 14}rem`,
380
+ paddingLeft: `${(15 * widthRatio) / 14}rem`,
381
+ paddingRight: `${(15 * widthRatio) / 14}rem`,
382
+ }, onClick: startLottery },
383
+ React.createElement("p", { className: `${CLASS_PREFIX}__btn-text`, style: {
384
+ fontSize: `${(widthRatio * 18) / 14}rem`,
385
+ lineHeight: `${(widthRatio * 22) / 14}rem`,
386
+ } },
387
+ "\u5F00\u59CB",
388
+ React.createElement("br", null),
389
+ "\u62BD\u5956")))))))))));
391
390
  });
@@ -1,5 +1,7 @@
1
1
  .weda-RichTextView {
2
2
  font-size: 14px;
3
+ word-wrap: break-word;
4
+ word-break: break-all;
3
5
  }
4
6
  .weda-RichTextView blockquote {
5
7
  margin: 0 0 10px;
@@ -6,6 +6,7 @@ import { useDebouncedCallback, useEventListener, useResizeObserver, } from '@rea
6
6
  import './index.css';
7
7
  import { emptyObject } from '../../utils/constant';
8
8
  export default function Swiper({ children, className, style, autoplay = true, circular = true, vertical = false, indicatorDots, indicatorColor = 'rgba(200, 200, 200, 0.9)', indicatorActiveColor = 'rgba(0, 0, 0, 0.9)', duration = 500, interval = 5000, current = 0, events = emptyObject, id, }) {
9
+ var _a;
9
10
  const originChildrenRef = useRef(null);
10
11
  const [realChildren, setRealChildren] = useState([]);
11
12
  const itemCount = React.Children.count(realChildren);
@@ -15,14 +16,19 @@ export default function Swiper({ children, className, style, autoplay = true, ci
15
16
  const [height, setHeight] = useState(0);
16
17
  const { change = () => { } } = events;
17
18
  useEffect(() => {
18
- const realChildren = Array.from(originChildrenRef.current.children).map((elem) => {
19
- const reactFiberProp = Object.keys(elem).find((prop) => prop.startsWith('__reactInternalInstance'));
20
- const reactFiber = elem[reactFiberProp];
21
- const reactElem = React.createElement(reactFiber.elementType, reactFiber.pendingProps);
22
- return reactElem;
23
- });
24
- setRealChildren(realChildren);
25
- }, [children]);
19
+ // 等待dom渲染完成
20
+ // eslint-disable-next-line rulesdir/no-timer
21
+ const timer = setTimeout(() => {
22
+ const realChildren = Array.from(originChildrenRef.current.children).map((elem) => {
23
+ const reactFiberProp = Object.keys(elem).find((prop) => prop.startsWith('__reactInternalInstance'));
24
+ const reactFiber = elem[reactFiberProp];
25
+ const reactElem = React.createElement(reactFiber.elementType, reactFiber.pendingProps);
26
+ return reactElem;
27
+ });
28
+ setRealChildren(realChildren);
29
+ }, 0);
30
+ return () => clearTimeout(timer);
31
+ }, [(_a = originChildrenRef.current) === null || _a === void 0 ? void 0 : _a.children, children]);
26
32
  useEffect(() => {
27
33
  if (autoplay) {
28
34
  // 自动切换
@@ -422,7 +422,7 @@ export const BaseTable = (props) => {
422
422
  connectorParamsRef.current = connectorParams;
423
423
  }
424
424
  }, [connectorParams]);
425
- // 移动端和自定义APIs场景不支持导入功能,监听变化存到表格上下文中
425
+ // 移动端和APIs场景不支持导入功能,监听变化存到表格上下文中
426
426
  useEffect(() => {
427
427
  handleContext({ state: { isH5, isModel } });
428
428
  }, [isH5, isModel]);
@@ -661,7 +661,7 @@ export const BaseTable = (props) => {
661
661
  // 刷新表格(查看当前页数据)
662
662
  refreshKeepPage: () => fetchData({ searchValues, pageSize, pageNo: pageIndex }),
663
663
  },
664
- }));
664
+ }), [pageIndex, pageSize, searchValues, selectedKeys, records]);
665
665
  // 表格选中事件
666
666
  const handleRowsSelect = (keys) => {
667
667
  if (events === null || events === void 0 ? void 0 : events.rowsSelect) {
@@ -975,7 +975,7 @@ export const BaseTable = (props) => {
975
975
  return slotRender(slots.globalButton);
976
976
  }
977
977
  else if (enableGlobalButton === undefined) {
978
- // 移动端和自定义APIs场景不支持导入功能
978
+ // 移动端和APIs场景不支持导入功能
979
979
  const buttonsList = isH5 || !isModel
980
980
  ? buttons.filter((i) => i.action !== 'import')
981
981
  : buttons;
@@ -128,7 +128,7 @@ export function ExportFileModalByApi({ onCancel, visible, fields, selectedKeysLi
128
128
  maxWidth: '430px',
129
129
  }, title: status === 'success'
130
130
  ? '数据导出完成'
131
- : '数据导出中,请稍后...', description: status !== 'success' ? (React.createElement("div", null,
131
+ : '数据导出中,请稍候...', description: status !== 'success' ? (React.createElement("div", null,
132
132
  "\u5173\u95ED\u5F39\u7A97\u540E\uFF0C\u5BFC\u51FA\u4EFB\u52A1\u4F1A\u7EE7\u7EED\u6267\u884C\uFF0C\u53EF\u5728",
133
133
  React.createElement("a", { onClick: () => {
134
134
  onCancel();
@@ -261,7 +261,7 @@ export function ImportFileModal({ onCancel, visible, fields, dataBatchCreate, da
261
261
  status !== 'validateError' && status !== 'error' && (React.createElement("div", { className: `status-wrap ${status}` },
262
262
  React.createElement(Status, { icon: 'blank', size: 's', description: status === 'success'
263
263
  ? '数据导入成功'
264
- : '数据导入中,请稍后...' }))))),
264
+ : '数据导入中,请稍候...' }))))),
265
265
  nextAction: () => {
266
266
  const repeatList = repeatabilityCheck(fileJsonMap);
267
267
  if (repeatList.length) {
@@ -247,7 +247,7 @@ export function ImportFileModalByApi({ onCancel, handleInOrOutRecordModealVisibl
247
247
  status !== 'validateError' && status !== 'error' && (React.createElement("div", { className: `status-wrap ${status}` },
248
248
  React.createElement(Status, { icon: 'blank', size: 'm', title: status === 'success'
249
249
  ? '数据导入完成'
250
- : '数据导入中,请稍后...', description: status !== 'success' ? (React.createElement("div", null,
250
+ : '数据导入中,请稍候...', description: status !== 'success' ? (React.createElement("div", null,
251
251
  "\u5173\u95ED\u5F39\u7A97\u540E\uFF0C\u5BFC\u5165\u4EFB\u52A1\u4F1A\u7EE7\u7EED\u6267\u884C\uFF0C\u53EF\u5728",
252
252
  React.createElement("a", { onClick: () => {
253
253
  handleInOrOutRecordModealVisible('import');
@@ -1,9 +1,17 @@
1
- import * as React from 'react';
1
+ import React, { forwardRef, useImperativeHandle } from 'react';
2
2
  import { Bubble, ConfigProvider } from 'tea-component';
3
3
  import classNames from '../../utils/classnames';
4
4
  import { isInIde, usePlatform } from '../../utils/platform';
5
- export const WdBubble = ({ trigger, placement, promptTheme, arrowPointAtCenter, openDelay, closeDelay, bubbleContent, bubbleChildren, events, id, style, className, }) => {
5
+ export const WdBubble = forwardRef(function WdBubble({ trigger, placement, promptTheme, arrowPointAtCenter, openDelay, closeDelay, bubbleContent, bubbleChildren, events, id, style, className, }, ref) {
6
6
  const platform = usePlatform();
7
+ // Widget API,挂载组件只读属性和组件方法
8
+ useImperativeHandle(ref, () => {
9
+ return {
10
+ trigger,
11
+ placement,
12
+ promptTheme,
13
+ };
14
+ }, [trigger, placement, promptTheme]);
7
15
  return (React.createElement(ConfigProvider, { classPrefix: "wedatea2td" },
8
16
  React.createElement("div", { className: classNames('wd-bubble', className, platform === 'h5' ? 'wd-h5-bubble' : 'wd-pc-bubble'), id: id, style: style }, isInIde() ? (React.createElement(Bubble, { content: bubbleContent && (React.createElement("div", { className: 'wd-bubble-content', style: { minWidth: '140px' } }, bubbleContent)), visible: true }, bubbleChildren)) : (React.createElement(Bubble, { content: bubbleContent, error: promptTheme === 'error', dark: promptTheme === 'dark', trigger: trigger, placement: placement, arrowPointAtCenter: arrowPointAtCenter, openDelay: Number(openDelay), closeDelay: Number(closeDelay), onVisibleChange: (visible) => {
9
17
  if (visible) {
@@ -14,4 +22,4 @@ export const WdBubble = ({ trigger, placement, promptTheme, arrowPointAtCenter,
14
22
  }
15
23
  } },
16
24
  React.createElement("span", { className: 'wd-bubble-child' }, bubbleChildren))))));
17
- };
25
+ });
@@ -1,16 +1,17 @@
1
- import * as React from 'react';
1
+ import React, { forwardRef, useImperativeHandle } from 'react';
2
2
  import classNames from '../../utils/classnames';
3
3
  import { emptyObject } from '../../utils/constant';
4
4
  import { useConfig } from '../../utils/config-context';
5
5
  import { getParentForm } from '../../utils/widget-api';
6
6
  import { convertLegacyProps } from './convert-legacy-props';
7
7
  import { textToString, usePlatform } from '../../utils/platform';
8
- import { convertLegacyEnum } from '../../utils/tool';
8
+ import { convertLegacyEnum, filterPropsWithOn } from '../../utils/tool';
9
9
  import { WD_BUTTON_THEME, WD_BUTTON_VARIANT, WD_BUTTON_SIZE, WD_BUTTON_ICON_TYPE, WD_BUTTON_ICON_POSITION, WD_BUTTON_TYPE, } from '../../../enum';
10
10
  import { WdIcon } from '../index';
11
- export const WdButton = ({ text, size: _size = 'md', theme: _theme = 'secondary', variant: _variant = 'base', iconType: _iconType = 'none', iconSource = 'inner', icon: _icon, iconSrc, iconPosition: _iconPosition = 'before', block, formType: _formType, disabled, events = emptyObject, className, style, id, loading,
12
- // 组件 widget 实例,后续可能会更改接口
13
- $node, ...props }) => {
11
+ export const WdButton = forwardRef(function WdButton(props, ref) {
12
+ const { text, size: _size = 'md', theme: _theme = 'secondary', variant: _variant = 'base', iconType: _iconType = 'none', iconSource = 'inner', icon: _icon, iconSrc, iconPosition: _iconPosition = 'before', block, formType: _formType, disabled, events = emptyObject, className, style, id, loading,
13
+ // 组件 widget 实例,后续可能会更改接口
14
+ $node, openType, ...restProps } = props;
14
15
  const platform = usePlatform();
15
16
  // 兼容旧版组件的属性值
16
17
  let size = convertLegacyProps('size', _size) || _size;
@@ -65,13 +66,8 @@ $node, ...props }) => {
65
66
  }
66
67
  };
67
68
  const propsStartWithOn = React.useMemo(() => {
68
- return Object.keys(props).reduce((acc, cur) => {
69
- if (cur.startsWith('on')) {
70
- acc[cur] = props[cur];
71
- }
72
- return acc;
73
- }, {});
74
- }, [props]);
69
+ return filterPropsWithOn(restProps);
70
+ }, [restProps]);
75
71
  const Icon = () => {
76
72
  // icon样式
77
73
  const iconCls = classNames({
@@ -82,8 +78,21 @@ $node, ...props }) => {
82
78
  });
83
79
  return icon || iconSrc ? (React.createElement(WdIcon, { className: iconCls, size: 'sm', name: icon, src: iconSrc, type: iconSource })) : null;
84
80
  };
81
+ // Widget API,挂载组件只读属性和组件方法
82
+ useImperativeHandle(ref, () => {
83
+ return {
84
+ text,
85
+ theme,
86
+ variant,
87
+ size,
88
+ block,
89
+ disabled,
90
+ formType,
91
+ openType,
92
+ };
93
+ }, [text, theme, variant, size, block, disabled, formType, openType]);
85
94
  return (React.createElement("button", { className: classNames(classes, className), disabled: disabled, type: formType, style: style, id: id, ...propsStartWithOn, onClick: onClick },
86
95
  iconPosition === 'before' && iconType === 'text-with-icon' && React.createElement(Icon, null),
87
96
  iconType === 'icon-only' ? (React.createElement(Icon, null)) : (React.createElement("span", { className: `${classPrefix}-btn__text` }, textToString(text))),
88
97
  iconPosition === 'after' && iconType === 'text-with-icon' && React.createElement(Icon, null)));
89
- };
98
+ });
@@ -1,12 +1,10 @@
1
- import * as React from 'react';
1
+ import React, { forwardRef, useImperativeHandle } from 'react';
2
2
  import classNames from '../../utils/classnames';
3
3
  import { useConfig } from '../../utils/config-context';
4
4
  import { usePlatform } from '../../utils/platform';
5
5
  import { convertLegacyEnum } from '../../utils/tool';
6
6
  import { WD_DIVIDER_TYPE } from '../../../enum';
7
- export const WdDivider = ({ className, style, id, type: _type = 'solid',
8
- // diriction = 'horizontal',
9
- ...props }) => {
7
+ export const WdDivider = forwardRef(function WdDivider({ className, style, id, type: _type = 'solid', ...restProps }, ref) {
10
8
  const platform = usePlatform();
11
9
  // 兼容旧版组件的属性值
12
10
  const { classPrefix } = useConfig();
@@ -16,7 +14,6 @@ export const WdDivider = ({ className, style, id, type: _type = 'solid',
16
14
  // 类名
17
15
  const classList = [compClassName];
18
16
  type && classList.push(`${compClassName}--${type}`);
19
- // diriction && classList.push(`${btnClassName}-${diriction}`);
20
17
  // 用户定义的className
21
18
  classList.push(className);
22
19
  if (platform === 'h5') {
@@ -25,5 +22,11 @@ export const WdDivider = ({ className, style, id, type: _type = 'solid',
25
22
  else {
26
23
  classList.push('wd-pc-divider');
27
24
  }
28
- return (React.createElement("div", { "data-testid": "wd-divider-test", className: classNames(...classList), style: style, id: id, ...props }));
29
- };
25
+ // Widget API,挂载组件只读属性和组件方法
26
+ useImperativeHandle(ref, () => {
27
+ return {
28
+ type,
29
+ };
30
+ }, [type]);
31
+ return (React.createElement("div", { "data-testid": "wd-divider-test", className: classNames(...classList), style: style, id: id, ...restProps }));
32
+ });
@@ -1,11 +1,11 @@
1
- import * as React from 'react';
1
+ import React, { forwardRef, useImperativeHandle } from 'react';
2
2
  import classNames from '../../utils/classnames';
3
3
  import { emptyObject } from '../../utils/constant';
4
4
  import { useConfig } from '../../utils/config-context';
5
5
  import { usePlatform } from '../../utils/platform';
6
6
  import { convertLegacyEnum } from '../../utils/tool';
7
7
  import { WD_ICON_TYPE, WD_ICON_SIZE } from '../../../enum';
8
- export const WdIcon = ({ type: _type = 'inner', name, src, size: _size, events = emptyObject, className, style: _style, id, color: _color, ...props }) => {
8
+ export const WdIcon = forwardRef(function WdIcon({ type: _type = 'inner', name, src, size: _size, events = emptyObject, className, style: _style, id, color: _color, ...props }, ref) {
9
9
  const platform = usePlatform();
10
10
  // 兼容旧版组件的属性值 size/color
11
11
  const remdiff = 2;
@@ -52,6 +52,15 @@ export const WdIcon = ({ type: _type = 'inner', name, src, size: _size, events =
52
52
  return acc;
53
53
  }, {});
54
54
  }, [props]);
55
+ // Widget API,挂载组件只读属性和组件方法
56
+ useImperativeHandle(ref, () => {
57
+ return {
58
+ type,
59
+ name,
60
+ src,
61
+ size,
62
+ };
63
+ }, [type, name, src, size]);
55
64
  if (type === 'inner') {
56
65
  return (React.createElement("i", { className: classNames(classes, className), style: style, id: id, onClick: onClick, ...propsStartWithOn }));
57
66
  }
@@ -60,4 +69,4 @@ export const WdIcon = ({ type: _type = 'inner', name, src, size: _size, events =
60
69
  ? src
61
70
  : 'https://qcloudimg.tencent-cloud.cn/raw/4a29d51b504f12b4933ce4490110b4dc.svg', onClick: onClick, ...propsStartWithOn }));
62
71
  }
63
- };
72
+ });
@@ -1,15 +1,14 @@
1
- import * as React from 'react';
2
- import { useState, useMemo } from 'react';
1
+ import React, { forwardRef, useImperativeHandle, useState, useMemo, } from 'react';
3
2
  import classNames from '../../utils/classnames';
4
3
  import { ImageInner } from './image';
5
4
  import { emptyObject } from '../../utils/constant';
6
5
  import { useTempUrl } from '../../utils/hooks/use-cloud-id-temp-url';
7
6
  import { useConfig } from '../../utils/config-context';
8
- export default function Image({
7
+ export default forwardRef(function WdImage({
9
8
  // 系统属性
10
9
  className, events = emptyObject, style,
11
10
  // 组件属性
12
- src, alt, mode, lazyLoad, imgPreview, maskClosable, fit, }) {
11
+ src, alt, mode, lazyLoad, imgPreview, maskClosable, fit, }, ref) {
13
12
  const [isError, setIsError] = useState(false);
14
13
  const { classPrefix } = useConfig();
15
14
  const cls = classNames({
@@ -52,8 +51,16 @@ src, alt, mode, lazyLoad, imgPreview, maskClosable, fit, }) {
52
51
  }
53
52
  }
54
53
  }, [style, objectFit, isError]);
54
+ // Widget API,挂载组件只读属性和组件方法
55
+ useImperativeHandle(ref, () => {
56
+ return {
57
+ fit,
58
+ src,
59
+ alt,
60
+ };
61
+ }, [fit, src, alt]);
55
62
  return src === realSrc || (realSrc !== undefined && src !== realSrc) ? (React.createElement(ImageInner, { objectFit: realFit, style: realStyle, className: cls, alt: alt, src: realSrc, isError: isError, setIsError: setIsError, events: events, lazyLoad: lazyLoad, imgPreview: imgPreview, maskClosable: maskClosable })) : null;
56
- }
63
+ });
57
64
  function getObjectFitByWxImageMode(mode) {
58
65
  const array = [
59
66
  {