@cloudbase/weda-ui 3.4.5 → 3.4.7

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 (129) hide show
  1. package/dist/configs/components/form/input.json +48 -2
  2. package/dist/configs/components/form/richText.json +2 -1
  3. package/dist/configs/components/form/uploader.json +62 -14
  4. package/dist/configs/components/grid/col.js +4 -1
  5. package/dist/configs/components/grid/grid.js +8 -3
  6. package/dist/configs/components/grid/row.js +51 -3
  7. package/dist/configs/components/repeater.js +4 -1
  8. package/dist/configs/components/table.json +1 -0
  9. package/dist/configs/components/wd-bubble.js +6 -0
  10. package/dist/configs/components/wd-button.js +6 -0
  11. package/dist/configs/components/wd-divider.js +7 -18
  12. package/dist/configs/components/wd-icon.js +7 -0
  13. package/dist/configs/components/wd-image.js +7 -0
  14. package/dist/configs/components/wd-link.js +7 -2
  15. package/dist/configs/components/wd-text.js +14 -6
  16. package/dist/configs/index.js +0 -2
  17. package/dist/docs/common/componentList.js +1 -1
  18. package/dist/web/actions/showModal/index.js +1 -1
  19. package/dist/web/components/calendar/index.js +2 -2
  20. package/dist/web/components/flow/components/index.js +0 -4
  21. package/dist/web/components/flow/frame/index.js +4 -3
  22. package/dist/web/components/flow/frame/types.js +11 -5
  23. package/dist/web/components/flow/frame/utils.js +60 -1
  24. package/dist/web/components/flow/modules/chart/Chart.js +2 -3
  25. package/dist/web/components/flow/modules/combination/index.js +1 -1
  26. package/dist/web/components/flow/modules/operations/components/button/index.js +11 -0
  27. package/dist/web/components/flow/modules/operations/components/button/style.css +5 -0
  28. package/dist/web/components/flow/modules/operations/components/index.js +6 -0
  29. package/dist/web/components/flow/modules/operations/components/popup/index.js +100 -0
  30. package/dist/web/components/flow/modules/operations/components/popup/style.css +154 -0
  31. package/dist/web/components/flow/modules/operations/components/popup/types.js +1 -0
  32. package/dist/web/components/flow/modules/operations/components/user-select/index.js +43 -0
  33. package/dist/web/components/flow/modules/operations/components/user-select/style.css +4 -0
  34. package/dist/web/components/flow/modules/operations/components/user-select/types.js +1 -0
  35. package/dist/web/components/flow/modules/operations/config/approval-form-config.js +140 -0
  36. package/dist/web/components/flow/modules/operations/config/control-config.js +218 -0
  37. package/dist/web/components/flow/modules/operations/config/index.js +2 -0
  38. package/dist/web/components/flow/modules/operations/config/types.js +1 -0
  39. package/dist/web/components/flow/modules/operations/control.js +26 -0
  40. package/dist/web/components/flow/modules/operations/controls-items/add-assignee-btn.js +33 -0
  41. package/dist/web/components/flow/modules/operations/controls-items/apply-cc-btn.js +12 -0
  42. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/comment/index.js +188 -0
  43. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/comment/style.css +51 -0
  44. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/drawer-form/index.js +64 -0
  45. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/drawer-form/types.js +1 -0
  46. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/drawer-form/view-model.js +83 -0
  47. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/field/index.js +16 -0
  48. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/field/style.css +56 -0
  49. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/index.js +47 -0
  50. package/dist/web/components/flow/modules/operations/controls-items/approval-drawer/style.css +60 -0
  51. package/dist/web/components/flow/modules/operations/controls-items/cancel-apply-btn.js +15 -0
  52. package/dist/web/components/flow/modules/operations/controls-items/check-list-popup/index.js +11 -0
  53. package/dist/web/components/flow/modules/operations/controls-items/check-list-popup/style.css +26 -0
  54. package/dist/web/components/flow/modules/operations/controls-items/flow-task-info-modal.js +98 -0
  55. package/dist/web/components/flow/modules/operations/controls-items/index.js +18 -0
  56. package/dist/web/components/flow/modules/operations/controls-items/initiation-btn.js +25 -0
  57. package/dist/web/components/flow/modules/operations/controls-items/revoke-modal/index.js +50 -0
  58. package/dist/web/components/flow/modules/operations/controls-items/revoke-modal/style.css +28 -0
  59. package/dist/web/components/flow/modules/operations/controls-items/roll-back-modal.js +104 -0
  60. package/dist/web/components/flow/modules/operations/controls-items/types.js +1 -0
  61. package/dist/web/components/flow/modules/operations/index.js +2 -0
  62. package/dist/web/components/flow/modules/operations/style.css +20 -0
  63. package/dist/web/components/flow/modules/operations/view-model.js +137 -0
  64. package/dist/web/components/flow/services/ideData/instance.js +2 -2
  65. package/dist/web/components/flow/services/ideData/pageDetail.js +1 -0
  66. package/dist/web/components/form/uploader/index.css +19 -0
  67. package/dist/web/components/form/uploader/index.js +21 -3
  68. package/dist/web/components/form/uploader/uploader.h5.js +14 -8
  69. package/dist/web/components/form/uploader/uploader.pc.js +29 -16
  70. package/dist/web/components/form/uploaderFile/index.css +5 -2
  71. package/dist/web/components/form/uploaderFile/uploadFile.h5.js +15 -12
  72. package/dist/web/components/form/uploaderFile/uploadFile.pc.js +11 -8
  73. package/dist/web/components/form/userOrgSelect/common/fetch-data-service.js +0 -1
  74. package/dist/web/components/form/userOrgSelect/component/depart-select/index.js +1 -1
  75. package/dist/web/components/form/userOrgSelect/component/user-select-h5/index.js +9 -5
  76. package/dist/web/components/form/userOrgSelect/component/user-select-h5/user-select-h5.js +4 -2
  77. package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-model.js +2 -2
  78. package/dist/web/components/form/userOrgSelect/component/user-select-pc/user-select-pc.js +4 -2
  79. package/dist/web/components/grid/col.js +81 -18
  80. package/dist/web/components/grid/grid.js +1 -1
  81. package/dist/web/components/grid/row.js +4 -2
  82. package/dist/web/components/index.js +1 -1
  83. package/dist/web/components/listView/index.js +4 -3
  84. package/dist/web/components/lottery/index.js +122 -123
  85. package/dist/web/components/table/ExportFileModalByApi/index.js +1 -1
  86. package/dist/web/components/table/ImportFileModal/index.js +1 -1
  87. package/dist/web/components/table/ImportFileModalByApi/index.js +1 -1
  88. package/dist/web/components/wd-bubble/wd-bubble.js +11 -3
  89. package/dist/web/components/wd-button/wd-button.js +22 -13
  90. package/dist/web/components/wd-divider/wd-divider.js +10 -7
  91. package/dist/web/components/wd-icon/wd-icon.js +12 -3
  92. package/dist/web/components/wd-image/index.js +12 -5
  93. package/dist/web/components/wd-link/wd-link.js +11 -3
  94. package/dist/web/components/wd-text/wd-text.js +15 -3
  95. package/dist/web/utils/hooks/use-cloud-id-temp-url.js +7 -3
  96. package/dist/web/utils/platform.js +0 -1
  97. package/dist/web/utils/tool.js +11 -0
  98. package/dist/web/utils/widget-api/index.js +3 -0
  99. package/package.json +5 -3
  100. package/dist/configs/components/auth.json +0 -17
  101. package/dist/web/components/flow/components/FlowUserSelect/index.css +0 -116
  102. package/dist/web/components/flow/components/FlowUserSelect/index.js +0 -115
  103. package/dist/web/components/flow/components/HighlightTextarea/index.css +0 -42
  104. package/dist/web/components/flow/components/HighlightTextarea/index.js +0 -131
  105. package/dist/web/components/flow/components/UserSelectModel/UserSelect.js +0 -72
  106. package/dist/web/components/flow/components/UserSelectModel/UserSelectMobile.css +0 -8
  107. package/dist/web/components/flow/components/UserSelectModel/UserSelectMobile.js +0 -82
  108. package/dist/web/components/flow/components/UserSelectModel/index.js +0 -18
  109. package/dist/web/components/flow/components/WedaUserTransfer/index.css +0 -3
  110. package/dist/web/components/flow/components/WedaUserTransfer/index.js +0 -162
  111. package/dist/web/components/flow/modules/control/ApprovalDrawer.css +0 -144
  112. package/dist/web/components/flow/modules/control/ApprovalDrawer.js +0 -178
  113. package/dist/web/components/flow/modules/control/ApprovalPopup.css +0 -115
  114. package/dist/web/components/flow/modules/control/ApprovalPopup.js +0 -240
  115. package/dist/web/components/flow/modules/control/Control.css +0 -29
  116. package/dist/web/components/flow/modules/control/Control.js +0 -105
  117. package/dist/web/components/flow/modules/control/ControlMobile.css +0 -101
  118. package/dist/web/components/flow/modules/control/ControlMobile.js +0 -148
  119. package/dist/web/components/flow/modules/control/FlowTaskInfoModal.css +0 -3
  120. package/dist/web/components/flow/modules/control/FlowTaskInfoModal.js +0 -31
  121. package/dist/web/components/flow/modules/control/constants/index.js +0 -35
  122. package/dist/web/components/flow/modules/control/index.js +0 -15
  123. package/dist/web/components/flow/modules/control/provider/index.js +0 -17
  124. package/dist/web/components/flow/modules/control/provider/useControlModel.js +0 -252
  125. package/dist/web/components/flow/modules/control/provider/useMobileModel.js +0 -84
  126. package/dist/web/components/flow/modules/control/provider/useRevokeAndBackHook.js +0 -84
  127. package/dist/web/components/flow/modules/control/utils/ControlModelUtils.js +0 -57
  128. package/dist/web/components/flow/modules/control/utils/index.js +0 -3
  129. package/dist/web/components/flow/modules/control/utils/tools.js +0 -3
@@ -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
  });
@@ -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
  {
@@ -1,10 +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 { emptyObject } from '../../utils/constant';
4
4
  import { useConfig } from '../../utils/config-context';
5
5
  import { usePlatform } from '../../utils/platform';
6
6
  import { WdIcon } from '../index';
7
- export const WdLink = ({ content, url, isOpenInNewWindow, params, iconType, iconSource = 'inner', icon, iconSrc, iconPosition = 'before', disabled, enableSlot = true, contentSlot, events = emptyObject, className, style, id, ...props }) => {
7
+ export const WdLink = forwardRef(function WdLink({ content, url, isOpenInNewWindow, params, iconType, iconSource = 'inner', icon, iconSrc, iconPosition = 'before', disabled, enableSlot = true, contentSlot, events = emptyObject, className, style, id, ...props }, ref) {
8
8
  const platform = usePlatform();
9
9
  // 样式
10
10
  const { classPrefix } = useConfig();
@@ -47,13 +47,21 @@ export const WdLink = ({ content, url, isOpenInNewWindow, params, iconType, icon
47
47
  });
48
48
  return icon || iconSrc ? (React.createElement(WdIcon, { className: iconCls, size: 'sm', name: icon, src: iconSrc, type: iconSource })) : null;
49
49
  };
50
+ // Widget API,挂载组件只读属性和组件方法
51
+ useImperativeHandle(ref, () => {
52
+ return {
53
+ content,
54
+ url,
55
+ disabled,
56
+ };
57
+ }, [content, url, disabled]);
50
58
  return (React.createElement("a", { style: style, className: classNames(classes, className), target: isOpenInNewWindow ? '_blank' : '_self', href: href, id: id, onClick: onClick, rel: "noopener noreferrer", ...props },
51
59
  enableSlot && contentSlot && (React.createElement("div", { className: `${classPrefix}-link__slot` }, contentSlot)),
52
60
  React.createElement("span", { className: `${classPrefix}-link__wrap` },
53
61
  iconPosition === 'before' && iconType === 'text-with-icon' && React.createElement(Icon, null),
54
62
  iconType === 'icon-only' ? (React.createElement(Icon, null)) : (React.createElement("span", { className: `${classPrefix}-link__text` }, content)),
55
63
  iconPosition === 'after' && iconType === 'text-with-icon' && React.createElement(Icon, null))));
56
- };
64
+ });
57
65
  function processUrl(url, params) {
58
66
  url = url === null || url === void 0 ? void 0 : url.trim();
59
67
  // URL 构造函数不支持 '//xxx.com' 的格式
@@ -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 { useConfig } from '../../utils/config-context';
4
4
  import { textToString, usePlatform } from '../../utils/platform';
5
5
  import { convertLegacyProps } from './convert-legacy-props';
6
6
  import { convertLegacyEnum } from '../../utils/tool';
7
7
  import { WD_TEXT_LEVEL, WD_TEXT_MAX_LINES } from '../../../enum';
8
- export const WdText = ({ className, style, id, level: _level = 'body-default', text, overflow, maxLines: _maxLines, space, tips, userSelect, events, contenteditable, onInput, onBlur, ...props }) => {
8
+ export const WdText = forwardRef(function WdText({ className, style, id, level: _level = 'body-default', text, overflow, maxLines: _maxLines, space, tips, userSelect, events, contenteditable, onInput, onBlur, ...props }, ref) {
9
9
  const platform = usePlatform();
10
10
  // 兼容旧版组件的属性值
11
11
  let level = convertLegacyProps('level', String(_level)) || _level;
@@ -58,6 +58,18 @@ export const WdText = ({ className, style, id, level: _level = 'body-default', t
58
58
  return acc;
59
59
  }, {});
60
60
  }, [props]);
61
+ // Widget API,挂载组件只读属性和组件方法
62
+ useImperativeHandle(ref, () => {
63
+ return {
64
+ text,
65
+ level,
66
+ overflow,
67
+ maxLines,
68
+ space,
69
+ userSelect,
70
+ tips,
71
+ };
72
+ }, [text, level, overflow, maxLines, space, userSelect, tips]);
61
73
  switch (level) {
62
74
  case 'title-1':
63
75
  return (React.createElement("h1", { className: classNames(classes, className), style: inlineStyle, id: id,
@@ -88,4 +100,4 @@ export const WdText = ({ className, style, id, level: _level = 'body-default', t
88
100
  //@ts-expect-error contentEditable type def sucks
89
101
  contentEditable: contenteditable, onInput: onInput, onBlur: onBlur, title: tips ? textToString(text) : '', onClick: (e) => events.tap({}, { originEvent: e }), ...propsStartWithOn }, textToString(text)));
90
102
  }
91
- };
103
+ });
@@ -1,11 +1,15 @@
1
1
  import useSWR from 'swr';
2
2
  import { getTempFileURL } from '../tcb';
3
- import { transFileCloudidToName } from '../platform';
3
+ import { isCloudFileID, transFileCloudidToName } from '../platform';
4
4
  export function useTempUrl(cloudId) {
5
+ const isCloudId = isCloudFileID(cloudId);
5
6
  const prefix = 'tcb:cloud-id:temp-url';
6
- const key = `${prefix}:${transFileCloudidToName(cloudId)}`;
7
+ // https格式不走cloudId处理逻辑
8
+ const key = isCloudId
9
+ ? `${prefix}:${transFileCloudidToName(cloudId)}`
10
+ : cloudId;
7
11
  return useSWR(key, async () => {
8
- if (!(cloudId === null || cloudId === void 0 ? void 0 : cloudId.startsWith('cloud://'))) {
12
+ if (!isCloudId) {
9
13
  return cloudId;
10
14
  }
11
15
  const tempUrl = await getTempFileURL(cloudId);
@@ -222,7 +222,6 @@ export const getWhereList = (where) => {
222
222
  if (val === '' ||
223
223
  val === undefined ||
224
224
  Object.prototype.toString.call(val) === '[object Object]') {
225
- console.error(`${item2 === null || item2 === void 0 ? void 0 : item2.key}筛选值为:${val},不符合查询条件,请检查绑定变量值是否正确`);
226
225
  return;
227
226
  }
228
227
  if ('_begin_with' === rel) {