@txgw/payout-components 1.1.3 → 1.2.0

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 (253) hide show
  1. package/dist/{AMIS-DAyIQg_G.js → AMIS-yQ-qSYx6.js} +1 -1
  2. package/dist/Action-O_zoRC90.js +1 -0
  3. package/dist/{Alert-Cp-q4PfW.js → Alert-M2uguZ2-.js} +1 -1
  4. package/dist/{AnchorNav-DRtBwJHB.js → AnchorNav-CLxVBebc.js} +1 -1
  5. package/dist/App-DCX5cbgG.js +1 -0
  6. package/dist/Audio-DHE_mJFM.js +1 -0
  7. package/dist/{Avatar-qROBlWC5.js → Avatar-BcduLEa3.js} +1 -1
  8. package/dist/BarCode-CGrg59dd.js +1 -0
  9. package/dist/{BarCode-9qcb_QZV.js → BarCode-uhJMrOnK.js} +1 -1
  10. package/dist/{Breadcrumb-CnYLTLG2.js → Breadcrumb-Bu2GK1JP.js} +1 -1
  11. package/dist/ButtonGroup-DlC6ck_w.js +1 -0
  12. package/dist/{ButtonGroupSelect-Br9QO7Ah.js → ButtonGroupSelect-e98karBC.js} +1 -1
  13. package/dist/{ButtonToolbar-DAXNty4L.js → ButtonToolbar-CVU9Sl3O.js} +1 -1
  14. package/dist/CRUD-BC-reZZf.js +1 -0
  15. package/dist/CRUD2-FL2Lf3lg.js +1 -0
  16. package/dist/{Calendar-DjdYB26f.js → Calendar-nMyeGsYx.js} +1 -1
  17. package/dist/Card-D0gZnuZy.js +1 -0
  18. package/dist/{Card2-Cu31YvK5.js → Card2-Clwjsydz.js} +1 -1
  19. package/dist/Cards-Bjesu3b3.js +1 -0
  20. package/dist/Carousel-BX16BlEp.js +1 -0
  21. package/dist/ChainedSelect-HNkJ3-dh.js +1 -0
  22. package/dist/{Chart-k2n3KbeJ.js → Chart-agJkN0ZL.js} +1 -1
  23. package/dist/{ChartRadios-Cv_E9P7l.js → ChartRadios-Bzxejcn5.js} +1 -1
  24. package/dist/Checkbox-LJ5JWlGH.js +1 -0
  25. package/dist/Checkboxes-Dai8FX75.js +1 -0
  26. package/dist/{Code-D4_QKMQI.js → Code-CssmXCo1.js} +1 -1
  27. package/dist/Collapse-CxdrbTCt.js +1 -0
  28. package/dist/{CollapseGroup-DsF-EgIN.js → CollapseGroup-DSVqVNzd.js} +1 -1
  29. package/dist/{Color-xBgwFhyM.js → Color-D_IajbVk.js} +1 -1
  30. package/dist/ColorPicker-D7vbsyrO.js +1 -0
  31. package/dist/{ColumnToggler-B4_p_fol.js → ColumnToggler-CHKOkn5W.js} +1 -1
  32. package/dist/ColumnToggler-CNtsoshN.js +1 -0
  33. package/dist/Combo-BY-auuRw.js +1 -0
  34. package/dist/{ConditionBuilder-C6y4Niek.js → ConditionBuilder-CcARxcMo.js} +1 -1
  35. package/dist/{Container-DIwv0W3y.js → Container-DJSLtDAJ.js} +1 -1
  36. package/dist/{Control-BsINOFFV.js → Control-DSGWLqqF.js} +1 -1
  37. package/dist/{Custom-UqWqkCBN.js → Custom-BYHmBkth.js} +1 -1
  38. package/dist/{Date-CwyL0i2y.js → Date-B63AkW7Z.js} +1 -1
  39. package/dist/{DateRange-BbK8plpl.js → DateRange-DJOatHqc.js} +1 -1
  40. package/dist/Dialog-kgjY-B2R.js +1 -0
  41. package/dist/{DiffEditor-DYtkyXuj.js → DiffEditor-DVtcPH19.js} +1 -1
  42. package/dist/{Divider-Dh3DN6al.js → Divider-Bhz9wUzQ.js} +1 -1
  43. package/dist/Drawer-Chy6lJ0Z.js +1 -0
  44. package/dist/DropDownButton-BWs-Bt8i.js +1 -0
  45. package/dist/{Each-BUw57vY9.js → Each-BOfQOLuK.js} +1 -1
  46. package/dist/FieldSet-B0nSnSUc.js +1 -0
  47. package/dist/{Flex-C0hNuyOd.js → Flex-CPhW10VO.js} +1 -1
  48. package/dist/{Formula-BtEwGFmI.js → Formula-DcsJiszb.js} +1 -1
  49. package/dist/{Grid2D-BxnTgVoa.js → Grid2D-CdxZo60p.js} +1 -1
  50. package/dist/{GridNav-COV2whrb.js → GridNav-Ygo_GK3C.js} +1 -1
  51. package/dist/{Group-BYOqgaHQ.js → Group-DDAf-7uz.js} +1 -1
  52. package/dist/HBox-ifP1wPkX.js +1 -0
  53. package/dist/{Hidden-SDRqFPHU.js → Hidden-BR6IyG0j.js} +1 -1
  54. package/dist/{IFrame-BKPZpwD9.js → IFrame-BxqJ3U9V.js} +1 -1
  55. package/dist/Icon-CRwFwe54.js +1 -0
  56. package/dist/IconPicker-BaSn0ir6.js +1 -0
  57. package/dist/IconSelect-B06M_oDf.js +1 -0
  58. package/dist/{IconSelectStore-Cw4MsRUx.js → IconSelectStore-CR8CK_X5.js} +1 -1
  59. package/dist/Image-CTRm12Jc.js +1 -0
  60. package/dist/{Images-BTTEJClc.js → Images-D46XKnM8.js} +1 -1
  61. package/dist/{InputArray-DvmG1NbU.js → InputArray-VGWKyEK3.js} +1 -1
  62. package/dist/InputCity-D2F8LhKN.js +1 -0
  63. package/dist/{InputColor-CuGveT2B.js → InputColor-DnQoK0vq.js} +1 -1
  64. package/dist/{InputDate-CPNZ8Ql_.js → InputDate-Dh59pmr9.js} +1 -1
  65. package/dist/{InputDateRange-CUJbjbXA.js → InputDateRange-CEYcs3US.js} +1 -1
  66. package/dist/InputExcel-44jxNcRm.js +1 -0
  67. package/dist/InputFile-BXCmkHsj.js +1 -0
  68. package/dist/{InputFormula-BlWsaRgO.js → InputFormula-BbBUGVDB.js} +1 -1
  69. package/dist/{InputGroup-B0iNRBoA.js → InputGroup-DC6UhjCD.js} +1 -1
  70. package/dist/InputImage-5cMEXqDt.js +1 -0
  71. package/dist/{InputMonthRange-CVWXFyng.js → InputMonthRange-vWfEBcgt.js} +1 -1
  72. package/dist/{InputNumber-WVrrdK5K.js → InputNumber-BroZeI3k.js} +1 -1
  73. package/dist/{InputQuarterRange-DlPmxZUk.js → InputQuarterRange-B-RgvEyL.js} +1 -1
  74. package/dist/InputRange-Bs7KposT.js +1 -0
  75. package/dist/{InputRating-CoWIusTr.js → InputRating-Cu5964Ql.js} +1 -1
  76. package/dist/{InputRepeat-vtLHisDx.js → InputRepeat-Cv2fEcrY.js} +1 -1
  77. package/dist/InputRichText-BdMa6WfT.js +1 -0
  78. package/dist/{InputSignature-BaRJvLQA.js → InputSignature-DIuwKNcw.js} +1 -1
  79. package/dist/InputSubForm-Bj00jcae.js +1 -0
  80. package/dist/InputTable-ByM68rOw.js +1 -0
  81. package/dist/InputTag-idylaKEe.js +1 -0
  82. package/dist/InputText-Cj2wp6S0.js +1 -0
  83. package/dist/InputTree-B0aSRjss.js +1 -0
  84. package/dist/{InputVerificationCode-CXfWRO0c.js → InputVerificationCode-DWmHV08K.js} +1 -1
  85. package/dist/{InputYearRange-a9R28Zzo.js → InputYearRange-D0V1t9TC.js} +1 -1
  86. package/dist/{JSONSchema-ydPGt5BM.js → JSONSchema-BNYO4lHp.js} +1 -1
  87. package/dist/{JSONSchemaEditor-DhAE991v.js → JSONSchemaEditor-DOUw4cjR.js} +1 -1
  88. package/dist/{Json-DlDI6pYj.js → Json-ChJFz16a.js} +1 -1
  89. package/dist/{Link-K8pf_CH7.js → Link-Bu3ve8g0.js} +1 -1
  90. package/dist/List-9MVmmygK.js +1 -0
  91. package/dist/{ListSelect-C5_rPp8r.js → ListSelect-CbUhVvRd.js} +1 -1
  92. package/dist/{LocationPicker-CpZbckdW.js → LocationPicker-CVmG_PU4.js} +1 -1
  93. package/dist/Log-CFLunOAF.js +1 -0
  94. package/dist/{Mapping-DKEV0yFA.js → Mapping-C6YMHlDX.js} +1 -1
  95. package/dist/{Markdown-DOG-PWSW.js → Markdown-j5efZcgS.js} +1 -1
  96. package/dist/{Markdown-DQXPWcZy.js → Markdown-pNRSLVqI.js} +1 -1
  97. package/dist/MatrixCheckboxes-CUi1N0RM.js +1 -0
  98. package/dist/{MultilineText-nDqbzJcx.js → MultilineText-CjvXXqrp.js} +1 -1
  99. package/dist/Nav-CwSHGiwE.js +1 -0
  100. package/dist/NestedSelect-BfkZhH1O.js +1 -0
  101. package/dist/{Number-Bw_bgJ20.js → Number-1fqsX9DH.js} +1 -1
  102. package/dist/OfficeViewer-DwIQUl66.js +1 -0
  103. package/dist/{Operation-DC_y6Ub7.js → Operation-B1HwrneV.js} +1 -1
  104. package/dist/Page-Ed_OjLiq.js +1 -0
  105. package/dist/{Pagination-CCe6HayL.js → Pagination-6lMmNWPI.js} +1 -1
  106. package/dist/{PaginationWrapper-BlFp9wjh.js → PaginationWrapper-BkSRXIPs.js} +1 -1
  107. package/dist/Panel-DdwXHCry.js +1 -0
  108. package/dist/Password-D7hJHKSJ.js +1 -0
  109. package/dist/Picker-BZNqS92p.js +1 -0
  110. package/dist/{Plain-Dwci4N2e.js → Plain-D7nwMMVt.js} +1 -1
  111. package/dist/{Portlet-CNgfI1Ub.js → Portlet-BNPvph0w.js} +1 -1
  112. package/dist/{Progress-XZb5-ThE.js → Progress-CATKwBwk.js} +1 -1
  113. package/dist/{Property-D2a_Ul3S.js → Property-Bbw6J0EJ.js} +1 -1
  114. package/dist/{QRCode-DHU1RQet.js → QRCode-C1Sz2px4.js} +1 -1
  115. package/dist/{Radio-C7BdmAKp.js → Radio-Bp4A9ifj.js} +1 -1
  116. package/dist/{Radios-BwjWo-L1.js → Radios-BiON9miU.js} +1 -1
  117. package/dist/Remark-Dsxb2TwD.js +1 -0
  118. package/dist/{RichText-D9hUcBuE.js → RichText-Ck_YZ4kC.js} +1 -1
  119. package/dist/{SearchBox-Bh3PIe-b.js → SearchBox-M-dkIVTh.js} +1 -1
  120. package/dist/Select-BGyJvCHF.js +1 -0
  121. package/dist/Service-7EfZof-E.js +1 -0
  122. package/dist/{Shape-C4o5GSeA.js → Shape-DGo5yg6n.js} +1 -1
  123. package/dist/{Slider-DHYsoPVj.js → Slider-CZP8_8w7.js} +1 -1
  124. package/dist/{SparkLine-BBXL561Q.js → SparkLine-BMxbCqBr.js} +1 -1
  125. package/dist/Spinner-D8gjgMqi.js +1 -0
  126. package/dist/{StaticHoc-CJgNJAEY.js → StaticHoc-D0pM2bgC.js} +1 -1
  127. package/dist/Status-CVO4FFCM.js +1 -0
  128. package/dist/{Steps-UlgTNiB1.js → Steps-D7IGq2Hh.js} +1 -1
  129. package/dist/Switch-DamAp7Z0.js +1 -0
  130. package/dist/{SwitchContainer-D70l_KaN.js → SwitchContainer-CMXoJ9rv.js} +1 -1
  131. package/dist/Table-DaePlnJ2.js +1 -0
  132. package/dist/Table2-DZv7wQuy.js +1 -0
  133. package/dist/{TableView-Df0guEBC.js → TableView-DoAcciT3.js} +1 -1
  134. package/dist/{Tabs-Dh9SVot3.js → Tabs-9QLYiuKd.js} +1 -1
  135. package/dist/TabsTransfer-CYt2Ydo2.js +1 -0
  136. package/dist/TabsTransferPicker-DbFyy-8j.js +1 -0
  137. package/dist/{Tag-ChRcdATW.js → Tag-mYOYI2_I.js} +1 -1
  138. package/dist/Tasks-BLnNJBWx.js +1 -0
  139. package/dist/{Textarea-CIqPVCY2.js → Textarea-sYiziBNB.js} +1 -1
  140. package/dist/{Timeline-D7CXypET.js → Timeline-BAxKRm5L.js} +1 -1
  141. package/dist/TooltipWrapper-C09x-Vn9.js +1 -0
  142. package/dist/{Tpl-cTs7jhV_.js → Tpl-ByPycBij.js} +1 -1
  143. package/dist/Transfer-B0VVG1X5.js +1 -0
  144. package/dist/TransferPicker-D2BR3RwX.js +1 -0
  145. package/dist/TreeSelect-V8WAsBlR.js +1 -0
  146. package/dist/{UUID-BARmlnTb.js → UUID-9JqGMHov.js} +1 -1
  147. package/dist/{UserSelect-D6S_lRVG.js → UserSelect-DU-DqXMl.js} +1 -1
  148. package/dist/{VBox-BAzEQR4R.js → VBox-DObThecs.js} +1 -1
  149. package/dist/{Video-fb-VaQF8.js → Video-C8IgYvL_.js} +1 -1
  150. package/dist/{WebComponent-Cc6mYGsA.js → WebComponent-qhqdvgNC.js} +1 -1
  151. package/dist/Wizard-OfhcHrBG.js +1 -0
  152. package/dist/{Words-eY9320eX.js → Words-BIdMoCe8.js} +1 -1
  153. package/dist/{Wrapper-DHBwNSd-.js → Wrapper-DJrZT8db.js} +1 -1
  154. package/dist/{PopUp-CJyUTmjT.js → _castFunction-CQMNP8A1.js} +104 -104
  155. package/dist/beneficiary-form-DWYNuxQk.js +10 -0
  156. package/dist/{client-vLe_PnLn.js → client-CGP9wC59.js} +1 -1
  157. package/dist/crypto-js-_p8NjmHX.js +1 -0
  158. package/dist/{doc-CxGb1TfN.js → doc-C6E4JfQ4.js} +1 -1
  159. package/dist/es-DoSNZEgs.js +1 -0
  160. package/dist/esm-DMJQA23h.js +4 -0
  161. package/dist/esm-Dgr2t9Jm.js +27 -0
  162. package/dist/esm-lQQ8f-8c.js +1 -0
  163. package/dist/function-AxX-od3p.js +3 -0
  164. package/dist/index.css +1 -1
  165. package/dist/index.d.ts +26 -0
  166. package/dist/index.js +1 -1
  167. package/dist/isEqual-CABQKVnq.js +1 -0
  168. package/dist/{main-C5HXsudB.js → main-BtAz1nDN.js} +1 -1
  169. package/dist/{objectSpread2-DFRX1WB4.js → objectSpread2-EZn5iNnc.js} +1 -1
  170. package/dist/{omitBy-DBIyJYy7.js → omitBy-DzRksfoy.js} +1 -1
  171. package/dist/{papaparse.min-BtfDBTEy.js → papaparse.min-DVFqGzF3.js} +1 -1
  172. package/dist/{react-COOgDf_T.js → react-CWkhIp2c.js} +1 -1
  173. package/dist/{react-cropper.es-DzdYLVvj.js → react-cropper.es-0hTsGdEg.js} +1 -1
  174. package/dist/react-dom-CCQ2gErg.js +1 -0
  175. package/dist/request-CLLl5Hjd.js +1 -0
  176. package/dist/rolldown-runtime-DXzHzmmG.js +1 -0
  177. package/dist/xor-D3F4ghdw.js +1 -0
  178. package/package.json +6 -6
  179. package/dist/Action-Clb8i0X2.js +0 -1
  180. package/dist/App-D5D3gmNS.js +0 -1
  181. package/dist/Audio-ezDzOZ39.js +0 -1
  182. package/dist/BarCode-6Po-8p4f.js +0 -1
  183. package/dist/ButtonGroup-B3gS_-Ep.js +0 -1
  184. package/dist/CRUD-B--j--TM.js +0 -1
  185. package/dist/CRUD2-Czfh3c6d.js +0 -1
  186. package/dist/Card-By-PXs2S.js +0 -1
  187. package/dist/Cards-5ddE2SUr.js +0 -1
  188. package/dist/Carousel-hMJwhzad.js +0 -1
  189. package/dist/ChainedSelect-BVw16VhH.js +0 -1
  190. package/dist/Checkbox-DhLJdAC3.js +0 -1
  191. package/dist/Checkboxes-BxYxzZa5.js +0 -1
  192. package/dist/Collapse-CEnYSzni.js +0 -1
  193. package/dist/ColorPicker-D-WUp5Oc.js +0 -1
  194. package/dist/ColumnToggler-BSPIBpte.js +0 -1
  195. package/dist/Combo-OgMxOSk_.js +0 -1
  196. package/dist/Dialog-B9w6XNSa.js +0 -1
  197. package/dist/Drawer-CBRwH0Bt.js +0 -1
  198. package/dist/DropDownButton-DQLBn8hV.js +0 -1
  199. package/dist/FieldSet-CAP6ZdK6.js +0 -1
  200. package/dist/HBox-WD6QODEX.js +0 -1
  201. package/dist/Icon-CF0MfUgx.js +0 -1
  202. package/dist/IconPicker-DtgLB7Li.js +0 -1
  203. package/dist/IconSelect-f1Lu6X5l.js +0 -1
  204. package/dist/Image-DqR0gBiu.js +0 -1
  205. package/dist/InputCity-KNg6Eygl.js +0 -1
  206. package/dist/InputExcel-DmiEkGzr.js +0 -1
  207. package/dist/InputFile-BBimXXKp.js +0 -1
  208. package/dist/InputImage-DV2_-1UV.js +0 -1
  209. package/dist/InputRange-BtbO0-Q3.js +0 -1
  210. package/dist/InputRichText-CDtNI74S.js +0 -1
  211. package/dist/InputSubForm-DN437CKg.js +0 -1
  212. package/dist/InputTable-4VS50n9k.js +0 -1
  213. package/dist/InputTag-CyraIqPe.js +0 -1
  214. package/dist/InputText-YV-KWQFV.js +0 -1
  215. package/dist/InputTree-Bgtw4o8_.js +0 -1
  216. package/dist/List-DLVcqN93.js +0 -1
  217. package/dist/Log-D7Yg8q24.js +0 -1
  218. package/dist/MatrixCheckboxes-DfJ5M8qG.js +0 -1
  219. package/dist/Nav-Cm6e_dal.js +0 -1
  220. package/dist/NestedSelect-LIGunxlP.js +0 -1
  221. package/dist/OfficeViewer-BT_jACpM.js +0 -1
  222. package/dist/Page-C90C-uXp.js +0 -1
  223. package/dist/Panel-BQBXJkJg.js +0 -1
  224. package/dist/Password-BRgzVD-R.js +0 -1
  225. package/dist/Picker-BFbwyiE1.js +0 -1
  226. package/dist/Remark-Q40Cl_Fm.js +0 -1
  227. package/dist/Select-20F0bgFJ.js +0 -1
  228. package/dist/Service-CuSQipPk.js +0 -1
  229. package/dist/Spinner-CsRzfkv4.js +0 -1
  230. package/dist/Status-KxvNWOcw.js +0 -1
  231. package/dist/Switch-C0aCyqKu.js +0 -1
  232. package/dist/Table-BaDaN8MH.js +0 -1
  233. package/dist/Table2-DqyJ5B5M.js +0 -1
  234. package/dist/TabsTransfer-DakjSBBq.js +0 -1
  235. package/dist/TabsTransferPicker-CCMRPC1d.js +0 -1
  236. package/dist/Tasks-C8oQeM6A.js +0 -1
  237. package/dist/TooltipWrapper-CtUc05W4.js +0 -1
  238. package/dist/Transfer-_RgCe9xE.js +0 -1
  239. package/dist/TransferPicker-DS450Cwo.js +0 -1
  240. package/dist/TreeSelect-ipE2Adb0.js +0 -1
  241. package/dist/Wizard-B5v3sXNf.js +0 -1
  242. package/dist/beneficiary-form-BT1hMT9A.js +0 -10
  243. package/dist/crypto-js-DfHtkI6b.js +0 -1
  244. package/dist/es-Dm57cZR7.js +0 -1
  245. package/dist/esm-Byma-6B-.js +0 -4
  246. package/dist/esm-CM4fvlfi.js +0 -27
  247. package/dist/esm-CrR9dHH3.js +0 -1
  248. package/dist/function-CrEuBBd9.js +0 -3
  249. package/dist/isEqual-DiNKNUz9.js +0 -1
  250. package/dist/mi18n-react.esm-CNXlHzVT.js +0 -1
  251. package/dist/react-dom-D_0O8_TK.js +0 -1
  252. package/dist/rolldown-runtime-Cmsah3SL.js +0 -1
  253. package/dist/xor-NaloR5U3.js +0 -1
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a as n,c as r,i as o,n as a,o as i,r as s,s as l,t as d,u as c}from"./tslib.es6-TRdqp4ac.js";import{$n as u,Bn as p,Et as m,Ii as h,J as y,Jr as v,Ln as f,Nn as b,Xr as g,Z as w,Zr as S,di as x,dt as C,fr as R,ft as E,gn as k,it as F,jn as A,ln as O,oa as N,oi as I,pn as T,qr as j,sn as B,ua as D,ui as K}from"./esm-DMJQA23h.js";import{t as P}from"./isEqual-CABQKVnq.js";import{t as M}from"./react-dom-CCQ2gErg.js";import{B as q,V as L,z as Q}from"./esm-Dgr2t9Jm.js";import{c as V}from"./_castFunction-CQMNP8A1.js";import{a as H,i as z,n as U,r as W}from"./Table-DaePlnJ2.js";import"./ColumnToggler-CHKOkn5W.js";var J=/* @__PURE__ */e(P()),Z=/* @__PURE__ */e(T()),X=/* @__PURE__ */e(L()),$=/* @__PURE__ */e(t()),_=/* @__PURE__ */e(M()),G=function(e){function t(t){var n=e.call(this,t)||this;return n.formItems=[],n.handleSubmit=n.handleSubmit.bind(n),n.handleAction=n.handleAction.bind(n),n}return o(t,e),t.prototype.buildSchema=function(){var e,t,n,r,o,a,i,s=this.props,l=s.searchable,c=s.sortable,u=s.name,p=s.label,m=s.translate,h=s.testIdBuilder;if(!0===l?i={title:"",controls:[{type:"text",name:u,placeholder:p,clearable:!0,testid:null===(e=null==h?void 0:h.getChild(u))||void 0===e?void 0:e.getTestIdValue()}]}:l&&(i=l.controls||l.tabs||l.fieldSet?d(d({title:""},l),{controls:Array.isArray(l.controls)?l.controls.concat():void 0}):"form"===(null==l?void 0:l.type)?l:{title:"",className:l.formClassName,controls:[d({type:l.type||"text",name:l.name||u,testid:null===(t=null==h?void 0:h.getChild(l.name||u))||void 0===t?void 0:t.getTestIdValue(),placeholder:p},l)]}),i&&i.controls&&c&&i.controls.unshift({type:"hidden",name:"orderBy",value:u},{type:"button-group",name:"order",label:m("sort"),options:[{label:m("asc"),value:"asc"},{label:m("desc"),value:"desc"}]}),i){var y=[];(i.controls||i.body||[]).forEach(function(e){return e.name&&"orderBy"!==e.name&&"order"!==e.name&&y.push(e.name)}),this.formItems=y,i=d(d({},i),{type:"form",wrapperComponent:"div",wrapWithPanel:!0,title:!1,testid:null===(n=null==h?void 0:h.getChild("form"))||void 0===n?void 0:n.getTestIdValue(),actions:[{type:"button",label:m("reset"),actionType:"clear-and-submit",testid:null===(r=null==h?void 0:h.getChild("btn-reset"))||void 0===r?void 0:r.getTestIdValue()},{type:"button",label:m("cancel"),actionType:"cancel",testid:null===(o=null==h?void 0:h.getChild("btn-cancel"))||void 0===o?void 0:o.getTestIdValue()},{label:m("search"),type:"submit",primary:!0,testid:null===(a=null==h?void 0:h.getChild("btn-search"))||void 0===a?void 0:a.getTestIdValue()}]})}return i||"error"},t.prototype.handleAction=function(e,t,r,o){return a(this,void 0,void 0,function(){var a,i,s,l,c,u,p;return n(this,function(n){switch(n.label){case 0:return a=this.props,i=a.onAction,s=a.data,l=a.dispatchEvent,c=a.name,"cancel"===t.actionType||"close"===t.actionType?(o(),[2]):"reset"===t.actionType?(o(),this.handleReset(),[2]):(u=d({},s),this.formItems.forEach(function(e){return x(u,e,void 0)}),[4,l("columnSearch",I(s,{searchName:c,searchValue:u}))]);case 1:return(null==(p=n.sent())?void 0:p.prevented)||i&&i(e,t,r),[2]}})})},t.prototype.handleReset=function(){return a(this,void 0,void 0,function(){var e,t,r,o,a;return n(this,function(n){switch(n.label){case 0:return e=this.props,t=e.onSearch,r=e.data,o=e.name,a=d({},r),this.formItems.forEach(function(e){return x(a,e,void 0)}),a.orderBy===o&&(a.orderBy="",a.order="asc"),t?[4,t(o,a)]:[3,2];case 1:n.sent(),n.label=2;case 2:return t&&t(a),[2]}})})},t.prototype.handleSubmit=function(e,t){return a(this,void 0,void 0,function(){var r,o,a;return n(this,function(n){switch(n.label){case 0:return r=this.props,o=r.onSearch,a=r.name,e.order&&(e=d(d({},e),{orderBy:a})),o?[4,o(a,e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return t(),[2]}})})},t.prototype.isActive=function(){var e=this.props,t=e.data,n=e.name,r=e.orderBy;return r&&r===n||this.formItems.some(function(e){return null==t?void 0:t[e]})},t.prototype.render=function(){var e=this,t=this.props,n=t.render,r=t.name,o=t.data,a=t.searchable,i=t.order,s=t.orderBy,l=t.popOverContainer,c=t.classPrefix,u=t.classnames,p=t.testIdBuilder,m=this.buildSchema(),h=this.isActive();return $.createElement(q,{className:"".concat(c,"TableCell-searchBtn"),layerClassName:u("".concat(c,"TableCell-searchPopOver"),a.className),active:h,filterIcon:$.createElement(V,{icon:"search",className:"icon",iconContent:"table-search-icon",testIdBuilder:null==p?void 0:p.getChild("search-icon")}),popOverContainer:l||function(){return(0,_.findDOMNode)(e)},filterDropdown:function(t){t.setSelectedKeys,t.selectedKeys;var a=t.confirm;return t.clearFilters,n("quick-search-form",m,{data:d(d({},o),{orderBy:s,order:s&&s===r?i:""}),onSubmit:function(t){return e.handleSubmit(t,a)},onAction:function(t,n,r){e.handleAction(t,n,r,a)}})},testIdBuilder:p})},t}($.Component),Y=k(function(e){var t=e.store;return $.createElement(G,d({},e,{data:t.query,orderBy:t.orderBy,order:t.order}))}),ee=(function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.propsNeedRemove=["title"],t}o(t,e),t.defaultProps=d(d({},U.defaultProps),{wrapperComponent:"div"}),t=s([F({type:"cell-field",name:"cell-field"}),z(),W(),H()],t)}(U),function(e){function t(n,r){var o=e.call(this,n)||this;o.renderedToolbars=[],o.subForms={},o.columns=[],o.reactions=[],r.registerComponent(o);var a=n.store,i=n.columnsTogglable,s=n.columns,l=n.rowSelection,d=n.keyField,c=n.primaryField,u=n.canAccessSuperData,p=n.persistKey;return a.update({columnsTogglable:i,columns:s,canAccessSuperData:u,rowSelectionKeyField:c||(null==l?void 0:l.keyField)||d,persistKey:p}),t.syncRows(a,n,void 0)&&o.syncSelected(),o.columns=o.buildColumns(a.filteredColumns,[],[]),o.rowSelection=o.buildRowSelection(),o.expandable=o.buildExpandable(),o.reactions.push(D(function(){return a.currentSelectedRowKeys.join(",")},function(){o.rowSelection=o.buildRowSelection(),o.forceUpdate()})),o.reactions.push(D(function(){return a.currentExpandedKeys.join(",")},function(){o.expandable=o.buildExpandable(),o.forceUpdate()})),o.reactions.push(D(function(){return a.filteredColumns},function(){o.columns=o.buildColumns(a.filteredColumns,[],[]),o.forceUpdate()})),o}return o(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this),this.reactions&&this.reactions.forEach(function(e){return e()})},t.prototype.syncSelected=function(){var e=this.props,t=e.store,n=e.onSelect;n&&n(t.selectedRows.map(function(e){return e.data}),t.unSelectedRows.map(function(e){return e.data}))},t.syncRows=function(e,t,n){var r,o=t.source,a=u(t,function(e){return e.items}),i=[],s=!1;if(Array.isArray(a))n&&u(n,function(e){return e.items})===a||(s=!0,i=a);else if("string"==typeof o){var d=h(o,t.data,"| raw"),p=n?h(o,n.data,"| raw"):null;p&&p===d?s=!1:Array.isArray(d)&&(s=!0,i=d)}s&&e.initRows(i,t.getEntryId,t.reUseRow,t.childrenColumnName);var m=[],y=e.keyField;Array.isArray(t.selected)?m=t.selected.map(function(e){return e[y]})||[]:t.rowSelection&&t.rowSelection.selectedRowKeysExpr?i.forEach(function(e,n){var r;j((null===(r=t.rowSelection)||void 0===r?void 0:r.selectedRowKeysExpr)||"",{record:e,rowIndex:n})&&m.push(e[y])}):t.rowSelection&&t.rowSelection.selectedRowKeys&&(m=c([],l(t.rowSelection.selectedRowKeys),!1)),s&&m.length>0&&e.updateSelected(m);var v=[],f=t.primaryField||(null===(r=t.expandable)||void 0===r?void 0:r.keyField)||t.keyField;return t.expandable&&t.expandable.expandedRowKeysExpr?i.forEach(function(e,n){var r;j((null===(r=t.expandable)||void 0===r?void 0:r.expandedRowKeysExpr)||"",{record:e,rowIndex:n})&&v.push(e[f])}):t.expandable&&t.expandable.expandedRowKeys&&(v=c([],l(t.expandable.expandedRowKeys),!1)),s&&v.length>0&&e.updateExpanded(v,f),s},t.prototype.componentDidUpdate=function(e){var n,r,o,a=this.props,i=a.store;if(f(["orderBy","columnsTogglable","canAccessSuperData","persistKey"],e,a,function(e){e.orderBy&&!a.onQuery&&delete e.orderBy,i.update(e,{resolveDefinitions:a.resolveDefinitions})}),A(["source","value","items"],e,a)||!a.value&&!a.items&&(a.data!==e.data||"string"==typeof a.source&&S(a.source)))t.syncRows(i,a,e)&&this.syncSelected();else if(R(e.selected,a.selected)){var s=i.keyField,l=i.selectedRows.map(function(e){return e[s]}).join(",");i.updateSelected(a.selected.map(function(e){return e[s]})||[]),l!==i.selectedRows.map(function(e){return e[s]}).join(",")&&this.syncSelected()}A(["columns"],e,a)&&i.update({columns:a.columns}),A(["rowSelection","selectable","multiple","maxKeepItemSelectionLength"],e,a)&&(this.rowSelection=this.buildRowSelection()),A(["query","pageField","perPageField"],e,a)&&i.updateQuery(a.query,void 0,a.pageField,a.perPageField,!0),(0,J.default)(null===(n=null==e?void 0:e.rowSelection)||void 0===n?void 0:n.keyField,null===(r=a.rowSelection)||void 0===r?void 0:r.keyField)&&(0,J.default)(e.keyField,a.keyField)||i.update({rowSelectionKeyField:a.primaryField||(null===(o=a.rowSelection)||void 0===o?void 0:o.keyField)||a.keyField})},t.prototype.getPopOverContainer=function(){return(0,_.findDOMNode)(this)},t.prototype.subFormRef=function(e,t,n){var r=this.props.quickEditFormRef;r&&r(e,t,n),this.subForms["".concat(t,"-").concat(n)]=e,e&&this.props.store.addForm(e.props.store,n)},t.prototype.reset=function(){var e=this;this.props.store.reset();var t=[];Object.keys(this.subForms).forEach(function(n){return e.subForms[n]&&t.push(e.subForms[n])}),t.forEach(function(e){return e.clearErrors()})},t.prototype.renderCellSchema=function(e,t){var n=this.props,o=n.render;if(n.store,e&&K(e)){e.width,e.children;var a=e.wrapperComponent,i=e.title,s=r(e,["width","children","wrapperComponent","title"]);return o("cell-field",d(d({},s),{wrapperComponent:a||void 0,title:i||s.label,type:"cell-field",column:s,data:t.data,name:e.name}),t)}return e},t.prototype.renderSchema=function(e,t,n){var r=this.props.render;if(t&&K(t))return r(e||"field",d(d({},t),{data:null==n?void 0:n.data}),n);if(Array.isArray(t)){var o=[];return t.forEach(function(t,a){return o.push(r(e||"field",d(d({},t),{data:null==n?void 0:n.data}),d(d({},n),{key:a})))}),o}return"string"==typeof t?g(t,null==n?void 0:n.data):t},t.prototype.buildColumns=function(e,t,r){var o=this,i=this.props,s=i.render,u=i.store,p=i.popOverContainer;i.canAccessSuperData;var m=i.showBadge,y=i.itemBadge,v=i.data,f=i.classnames,b=i.env,w=i.testIdBuilder,x=[];return Array.isArray(e)&&e.forEach(function(e,i){return a(o,void 0,void 0,function(){var o,a,C,R,E,k,F,A,N,I,T,j,D=this;return n(this,function(n){switch(n.label){case 0:return o=d({},e),a=null,C=o.title||o.label,R=d(d({},v),{popOverContainer:p||this.getPopOverContainer}),K(e.title)?a=(0,Z.default)(e.title):"string"==typeof C&&(a={type:"plain",tpl:C}),(e.headerAlign||e.align)&&(a.align=e.headerAlign||e.align,a.className="flex-1"),E=function(t){var n,r=D.renderCellSchema(a,R),o=null;return e.remark&&(o=s("remark",{type:"remark",tooltip:e.remark,container:D.getPopOverContainer})),$.createElement("div",{key:i,className:f("Table-head-cell-wrapper",(n={},n["".concat(e.className)]=!!e.className,n["".concat(e.titleClassName)]=!!e.titleClassName,n)),style:{justifyContent:{right:"flex-end",center:"center"}[e.align]||"flex-start"}},r,o,t)},Object.assign(o,{title:E}),k=!!(null===(j=e.children)||void 0===j?void 0:j.length),e.canAccessSuperData,e.type&&Object.assign(o,{render:function(n,o,a,s,d){var h=u.getRowByIndex(a,c([],l(d||[]),!1))||{},v=null==w?void 0:w.getChild("row-".concat(a,"-cell-").concat(s)),f={children:D.renderCellSchema(e,{data:h.locals,btnDisabled:u.dragging,popOverContainer:p||D.getPopOverContainer,quickEditFormRef:D.subFormRef,onQuickChange:function(e,t,n,r){D.handleQuickChange(h,e,t,n,r)},row:h,showBadge:m&&0===i,itemBadge:y,testIdBuilder:v}),props:{}};if(!k&&e.rowSpanExpr){var b=+g(e.rowSpanExpr,{record:o,rowIndex:a,colIndex:s});b&&(f.props.rowSpan=b,t.push({colIndex:s,rowIndex:a,rowSpan:b}))}if(!k&&e.colSpanExpr){var S=+g(e.colSpanExpr,{record:o,rowIndex:a,colIndex:s});S&&(f.props.colSpan=S,r.push({colIndex:s,rowIndex:a,colSpan:S}))}return t.forEach(function(e){s===e.colIndex&&a>e.rowIndex&&a<e.rowIndex+(e.rowSpan||0)&&(f.props.rowSpan=0)}),r.forEach(function(e){a===e.rowIndex&&s>e.colIndex&&s<e.colIndex+(e.colSpan||0)&&(f.props.colSpan=0)}),f}}),e.searchable&&(o.filterDropdown=$.createElement(Y,d({},this.props,{popOverContainer:this.getPopOverContainer,name:e.name,searchable:e.searchable,onSearch:this.handleSearch,key:"th-search-"+i,testIdBuilder:null==w?void 0:w.getChild("head-search-".concat(i))}))),e.sortable&&(o.sorter=!0),e.filterable?e.filterable.options?(o.filters=e.filterable.options.map(function(e){return"string"==typeof e?{text:e,value:e}:{text:e.label,value:e.value}}),[3,4]):[3,1]:[3,4];case 1:return e.filterable.source?(F=e.filterable.source,S(F)?(A=h(F,v,"| raw"),o.filters=A,[3,4]):[3,2]):[3,4];case 2:return B(F,v)?((N=O(F)).cache=3e3,[4,b.fetcher(N,v)]):[3,4];case 3:I=n.sent(),T=I.data&&I.data.options||[],o.filters=T,n.label=4;case 4:return k&&(o.children=this.buildColumns(e.children,t,r)),x.push(o),[2]}})})}),x},t.prototype.buildSummary=function(e,t){var n=this,r=[];return Array.isArray(t)&&t.forEach(function(t,o){K(t)?r.push({colSpan:t.colSpan,fixed:t.fixed,cellClassName:t.cellClassName,render:function(r){return n.renderSchema(e,t,{data:r})}}):Array.isArray(t)&&(r[o]||r.push([]),t.forEach(function(t){r[o].push({colSpan:t.colSpan,fixed:t.fixed,cellClassName:t.cellClassName,render:function(r){return n.renderSchema(e,t,{data:r})}})}))}),r.length?r:null},t.prototype.rowClassName=function(e,t){var n=this.props,r=n.rowClassNameExpr,o=n.store,a=n.themeCss,i=n.id,s=n.rowClassName,l=[];s&&l.push(s),r&&l.push(g(r,d(d({},e),{rowIndex:t})));var c=o.getRowByIndex(t);return(null==c?void 0:c.modified)&&l.push("is-modified"),(null==c?void 0:c.moved)&&l.push("is-moved"),l.push(w(d(d({},this.props),{name:"tableRowClassname",id:i,themeCss:a}))),l.join(" ")},t.prototype.buildRowSelection=function(){var e=this,t=this.props,n=t.selectable,o=t.multiple,a=t.maxKeepItemSelectionLength,i=t.rowSelection,s=t.store,l=null;if(n)l={type:!1===o?"radio":"",selectedRowKeys:s.currentSelectedRowKeys,maxSelectedLength:a};else if(i){i.selectedRowKeys;var c=i.selections,u=r(i,["selectedRowKeys","selections"]);(l=d({selectedRowKeys:s.currentSelectedRowKeys,maxSelectedLength:a},u)).getCheckboxProps=function(t,n){var r=e.props,o=r.rowSelection,a=r.maxKeepItemSelectionLength,i=r.store,s=null==o?void 0:o.disableOn;return{disabled:!!s&&j(s,{record:t,rowIndex:n})||a&&i.currentSelectedRowKeys.length>=a&&!i.currentSelectedRowKeys.includes(t[i.keyField])}},i.disableOn&&delete l.disableOn,c&&Array.isArray(c)&&(l.selections=[],c.forEach(function(e){l.selections.push({key:e.key,text:e.text,onSelect:function(t){var n;n=t.filter(function(t,n){return"all"===e.key||"none"!==e.key&&("invert"===e.key?!s.currentSelectedRowKeys.includes(t):"odd"===e.key?n%2==0:"even"!==e.key||n%2!=0)}),s.updateSelected(n)}})}))}return l},t.prototype.expandedRowClassName=function(e,t){var n=this.props.expandable;return g(null==n?void 0:n.expandedRowClassNameExpr,{record:e,rowIndex:t})},t.prototype.expandedRowRender=function(e,t){var n=this.props.expandable;return this.renderSchema("expandableBody",d({},n),{data:d(d(d({},this.props.data),e),{rowIndex:t})})},t.prototype.rowExpandable=function(e,t,n){var r=this.props.expandable;return!!(null==r?void 0:r.expandableOn)&&j(r.expandableOn,{record:e,rowIndex:t})},t.prototype.buildExpandable=function(){var e=this.props,t=e.expandable,n=e.store,o=null;if(t){t.expandedRowKeys;var a=r(t,["expandedRowKeys"]);o=d({expandedRowKeys:n.currentExpandedKeys},a),t.expandableOn&&(o.rowExpandable=this.rowExpandable,delete o.expandableOn),t&&t.type&&(o.expandedRowRender=this.expandedRowRender),t.expandedRowClassNameExpr&&(o.expandedRowClassName=this.expandedRowClassName,delete o.expandedRowClassNameExpr)}return o},t.prototype.reloadTarget=function(e,t){this.context.reload(e,t)},t.prototype.handleSave=function(){return a(this,void 0,void 0,function(){var e,t,r,o,a,i,s,l,d,c,u=this;return n(this,function(n){switch(n.label){case 0:return e=this.props,t=e.store,r=e.onSave,o=e.primaryField,a=e.keyField,t.modifiedRows.length?(i=[],Object.keys(this.subForms).forEach(function(e){return u.subForms[e]&&i.push(u.subForms[e])}),i.length?[4,Promise.all(i.map(function(e){return e.validate()}))]:[3,2]):[2];case 1:if(~n.sent().indexOf(!1))return[2];n.label=2;case 2:return s=t.modifiedRows.map(function(e){return e.data}),l=t.modifiedRows.map(function(e){return e.path}),d=t.modifiedRows.map(function(e){return p(e.data,e.pristine,[a,o])}),c=t.rows.filter(function(e){return!e.modified}).map(function(e){return e.data}),r?(r(s,d,l,c,t.modifiedRows.map(function(e){return e.pristine})),[2]):(this.handleQuickSave(s,d,l,c,t.modifiedRows.map(function(e){return e.pristine})),[2])}})})},t.prototype.handleQuickSave=function(e,t,n,r,o,a){var i=this,s=this.props,l=s.store,d=s.quickSaveApi,c=s.quickSaveItemApi,u=s.primaryField,p=s.keyField,m=s.env,h=s.messages,y=s.reload,v=s.dispatchEvent;if(Array.isArray(e)){if(!B(d))return void(m&&m.alert("Table2 quickSaveApi is required"));var f=u||p,b=I(l.data,{rows:e,rowsDiff:t,indexes:n,rowsOrigin:o});e.length&&e[0].hasOwnProperty(f)&&(b.ids=e.map(function(e){return e[f]}).join(",")),r&&(b.unModifiedItems=r),l.saveRemote(d,b,{successMessage:h&&h.saveFailed,errorMessage:h&&h.saveSuccess}).then(function(){v("quickSaveSubmitted",b),y&&i.reloadTarget(E(y,b),b)}).catch(function(){})}else{if(!B(c))return void(m&&m.alert("Table2 quickSaveItemApi is required!"));var g=I(l.data,{item:e,modified:t,origin:o}),w=I(g,e);l.saveRemote(c,w).then(function(){v("quickSaveSubmitted",w),y&&i.reloadTarget(E(y,g),g)}).catch(function(){null!=a&&a.resetOnFailed&&i.reset()})}},t.prototype.handleQuickChange=function(e,t,n,r,o){if(N(e)){var a=this.props,i=a.onSave,s=a.onPristineChange,l=a.saveImmediately,d=a.primaryField,c=a.keyField,u=a.quickSaveItemApi;e.change(t,r),e.modified&&this.syncSelected(),r?null==s||s(e.data,e.path):(n||l)&&(n&&n.api?this.props.onAction&&this.props.onAction(null,{actionType:"ajax",api:n.api,reload:null==o?void 0:o.reload},e.locals):i?i(e.data,p(e.data,e.pristine,[c,d]),e.path,void 0,e.pristine,o):this.handleQuickSave(u?e.data:[e.data],p(e.data,e.pristine,[c,d]),[e.path],void 0,e.pristine,o))}},t.prototype.handleAction=function(e,t,n){var r=this.props.onAction;return null==r?void 0:r(e,t,n)},t.prototype.renderActions=function(e){var t=this,n=this.props,r=n.actions,o=n.render,a=n.store,i=n.classnames,s=n.data,l=n.columnsTogglable,c=n.dispatchEvent;r=Array.isArray(r)?r.concat():[];var u=K(l)?l:{align:"left"};return a.toggable&&"header"===e&&!~this.renderedToolbars.indexOf("columns-toggler")&&r.push({type:"button",children:o("column-toggler",d(d({},u),{type:"column-toggler"}),{cols:a.columnsData,toggleAllColumns:function(){a.toggleAllColumns(),c("columnToggled",I(s,{columns:a.columnsData.filter(function(e){return e.toggled})}))},toggleToggle:function(e){a.columnsData[e].toggleToggle(),c("columnToggled",I(s,{columns:a.columnsData.filter(function(e){return e.toggled})}))}})}),Array.isArray(r)&&r.length?$.createElement("div",{className:i("Table-toolbar")},r.map(function(e,n){return o("action/".concat(n),d({type:"button"},e),{onAction:t.handleAction,key:n,btnDisabled:a.dragging,data:a.getData(s)})})):null},t.prototype.handleSelected=function(e,t,r){return a(this,void 0,void 0,function(){var o,a,i;return n(this,function(n){switch(n.label){case 0:return o=this.props,a=o.dispatchEvent,i=o.data,o.store.updateSelected(t),this.syncSelected(),[4,a("selectedChange",I(i,{selectedItems:e,unSelectedItems:r}))];case 1:return n.sent(),[2]}})})},t.prototype.handleSort=function(e){return a(this,void 0,void 0,function(){var t,r,o,a,i;return n(this,function(n){switch(n.label){case 0:return t=this.props,r=t.dispatchEvent,o=t.data,a=t.onSort,[4,r("columnSort",I(o,{orderBy:e.orderBy,orderDir:e.orderDir}))];case 1:return(null==(i=n.sent())?void 0:i.prevented)?[2,null==i?void 0:i.prevented]:(a&&a(e),[2])}})})},t.prototype.handleFilter=function(e){return a(this,void 0,void 0,function(){var t,r,o,a,i;return n(this,function(n){switch(n.label){case 0:return t=this.props,r=t.dispatchEvent,o=t.data,a=t.onSearch,[4,r("columnFilter",I(o,e))];case 1:return(null==(i=n.sent())?void 0:i.prevented)?[2,null==i?void 0:i.prevented]:(a&&a(e),[2])}})})},t.prototype.handleSearch=function(e,t){return a(this,void 0,void 0,function(){var r,o,a,i,s,l,d;return n(this,function(n){switch(n.label){case 0:return r=this.props,o=r.data,a=r.dispatchEvent,i=r.store,s=r.onSearch,[4,a("columnSearch",I(o,{searchName:e,searchValue:t}))];case 1:return(null==(l=n.sent())?void 0:l.prevented)||(i.updateQuery(t),s&&s(((d={})[e]=t[e],d))),[2]}})})},t.prototype.handleRowClick=function(e,t,r){return a(this,void 0,void 0,function(){var o,a,i,s,l;return n(this,function(n){switch(n.label){case 0:return o=this.props,a=o.dispatchEvent,i=o.data,s=o.onRow,[4,a("rowClick",I(i,{item:t,index:r}))];case 1:return(null==(l=n.sent())?void 0:l.prevented)||t&&s&&s.onRowClick&&s.onRowClick(e,t,r),[2]}})})},t.prototype.handleRowDbClick=function(e,t,r){return a(this,void 0,void 0,function(){var o,a,i,s,l;return n(this,function(n){switch(n.label){case 0:return o=this.props,a=o.dispatchEvent,i=o.data,s=o.onRow,[4,a("rowDbClick",I(i,{item:t,index:r}))];case 1:return(null==(l=n.sent())?void 0:l.prevented)?[2,!1]:(t&&s&&s.onRowDbClick&&s.onRowDbClick(e,t,r),[2,!0])}})})},t.prototype.handleRowMouseEnter=function(e,t,r){var o;return a(this,void 0,void 0,function(){var a,i,s,l,d;return n(this,function(n){switch(n.label){case 0:return null===(o=null==e?void 0:e.persist)||void 0===o||o.call(e),a=this.props,i=a.dispatchEvent,s=a.data,l=a.onRow,[4,i("rowMouseEnter",I(s,{item:t,index:r}))];case 1:return(null==(d=n.sent())?void 0:d.prevented)||t&&l&&l.onRowMouseEnter&&l.onRowMouseEnter(e,t,r),[2]}})})},t.prototype.handleRowMouseLeave=function(e,t,r){var o;return a(this,void 0,void 0,function(){var a,i,s,l,d;return n(this,function(n){switch(n.label){case 0:return null===(o=null==e?void 0:e.persist)||void 0===o||o.call(e),a=this.props,i=a.dispatchEvent,s=a.data,l=a.onRow,[4,i("rowMouseLeave",I(s,{item:t,index:r}))];case 1:return(null==(d=n.sent())?void 0:d.prevented)||t&&l&&l.onRowMouseLeave&&l.onRowMouseLeave(e,t,r),[2]}})})},t.prototype.handleOrderChange=function(e,t,r){return a(this,void 0,void 0,function(){var o,a;return n(this,function(n){return o=this.props.store,a=o.getRowByIndex(e,r),o.exchange(e,t,a),[2]})})},t.prototype.handleSaveOrder=function(){return a(this,void 0,void 0,function(){var e,t,r,o,a,i,s,l;return n(this,function(n){switch(n.label){case 0:return e=this.props,t=e.store,r=e.onSaveOrder,o=e.data,a=e.dispatchEvent,i=t.movedRows.map(function(e){return e.data}),s=t.rows.map(function(e){return e.getDataWithModifiedChilden()}),[4,a("orderChange",I(o,{movedItems:i}))];case 1:return(null==(l=n.sent())?void 0:l.prevented)?[2]:r&&t.movedRows.length?(r(i,s),[2]):[2]}})})},t.prototype.doAction=function(e,t,n,r){var o=this;void 0===n&&(n=!1);var a=this.props,i=a.store,s=a.data,l=a.keyField,d=a.expandable,c=a.primaryField,u=null==e?void 0:e.actionType,p=i.keyField,m=i.getData(s).items||[];switch(u){case"selectAll":i.updateSelectedAll();break;case"clearAll":i.updateSelected([]);break;case"select":var h=[];m.forEach(function(e,t){j((null==r?void 0:r.selected)||(null==r?void 0:r.selectedRowKeysExpr),{record:e,rowIndex:t})&&h.push(e[p])}),i.updateSelected(h);break;case"expand":var y=c||(null==d?void 0:d.keyField)||l,v=[],f=[];if(null==r?void 0:r.value){var b=m.findIndex(function(e){return e[y]===r.value}),g=m[b];this.tableRef&&this.tableRef.isExpandableRow(g,b)&&(this.tableRef.isExpanded(g)?f.push(g):v.push(g))}else(null==r?void 0:r.expandedRowsExpr)&&m.forEach(function(e,t){j(null==r?void 0:r.expandedRowsExpr,{record:e,rowIndex:t})&&o.tableRef&&o.tableRef.isExpandableRow(e,t)&&(o.tableRef.isExpanded(e)?f.push(e):v.push(e))});v.length>0&&this.tableRef&&this.tableRef.onExpandRows(v),f.length>0&&this.tableRef&&this.tableRef.onCollapseRows(f);break;default:this.handleAction(void 0,e,s)}},t.prototype.getRef=function(e){this.tableRef=e},t.prototype.renderTable=function(){var e=this.props,t=e.render,n=e.title,o=e.footer;e.rowSelection,e.selectable,e.multiple,e.columns,e.expandable;var a=e.footSummary,i=e.headSummary,s=e.loading,l=e.classnames,c=e.placeholder;e.rowClassNameExpr;var u=e.itemActions,p=e.keyField,m=e.primaryField;e.maxKeepItemSelectionLength;var h=e.onRow,y=e.store,v=e.id,f=e.themeCss,b=r(e,["render","title","footer","rowSelection","selectable","multiple","columns","expandable","footSummary","headSummary","loading","classnames","placeholder","rowClassNameExpr","itemActions","keyField","primaryField","maxKeepItemSelectionLength","onRow","store","id","themeCss"]),g=void 0;if(u){var S=Array.isArray(u)?u.filter(function(e){return!e.hiddenOnHover}):[];if(!S.length)return null;g=function(e,n){return $.createElement("div",{className:l("Table-itemActions")},S.map(function(r,o){return t("itemAction/".concat(o),d(d({},r),{isMenuItem:!0}),{key:o,item:e,data:e,rowIndex:n})}))}}var x={data:this.props.data};return $.createElement(Q,d({},b,{headerClassName:w(d(d({},this.props),{name:"tableHeadClassname",id:v,themeCss:f})),bodyClassname:w(d(d({},this.props),{name:"tableBodyClassname",id:v,themeCss:f})),onRef:this.getRef,title:this.renderSchema("title",n,x),footer:this.renderSchema("footer",o,x),columns:this.columns,dataSource:y.dataSource,rowSelection:this.rowSelection,rowClassName:this.rowClassName,expandable:this.expandable,footSummary:this.buildSummary("footSummary",a),headSummary:this.buildSummary("headSummary",i),loading:this.renderSchema("loading",s,x),placeholder:this.renderSchema("placeholder",c,x),onSelect:this.handleSelected,onSelectAll:this.handleSelected,onSort:this.handleSort,onFilter:this.handleFilter,onDrag:this.handleOrderChange,itemActions:g,keyField:m||p,onRow:d(d({},h),{onRowClick:this.handleRowClick,onRowDbClick:this.handleRowDbClick,onRowMouseEnter:this.handleRowMouseEnter,onRowMouseLeave:this.handleRowMouseLeave})}))},t.prototype.renderHeading=function(){var e=this.props,t=e.store,n=e.hideQuickSaveBtn,r=e.classnames,o=e.headingClassName,a=e.saveImmediately,i=e.quickSaveApi,s=e.translate,l=e.columns,d=!1;if(1===t.modifiedRows.length){var c=(null==l?void 0:l.map(function(e){var t;return(null===(t=null==e?void 0:e.quickEdit)||void 0===t?void 0:t.saveImmediately)?null==e?void 0:e.name:""}).filter(function(e){return e}))||[],u=t.modifiedRows[0],m=p(u.data,u.pristine);(0,X.default)(c,Object.keys(m)).length&&(d=!0)}return i&&!a&&!d&&t.modified&&!n||t.moved?$.createElement("div",{className:r("Table-heading",o),key:"heading"},a||!t.modified||n||d?t.moved?$.createElement("span",null,s("Table.moved",{moved:t.moved}),$.createElement("button",{type:"button",className:r("Button Button--size-xs Button--success m-l-sm"),onClick:this.handleSaveOrder},$.createElement(V,{icon:"check",className:"icon m-r-xs"}),s("Form.submit")),$.createElement("button",{type:"button",className:r("Button Button--size-xs Button--danger m-l-sm"),onClick:this.reset},$.createElement(V,{icon:"close",className:"icon m-r-xs"}),s("Table.discard"))):"":$.createElement("span",null,s("Table.modified",{modified:t.modified}),$.createElement("button",{type:"button",className:r("Button Button--size-xs Button--success m-l-sm"),onClick:this.handleSave},$.createElement(V,{icon:"check",className:"icon m-r-xs"}),s("Form.submit")),$.createElement("button",{type:"button",className:r("Button Button--size-xs Button--danger m-l-sm"),onClick:this.reset},$.createElement(V,{icon:"close",className:"icon m-r-xs"}),s("Table.discard")))):null},t.prototype.render=function(){var e=this.props,t=e.classnames,n=e.style,r=e.store,o=e.themeCss,a=e.wrapperCustomStyle,i=e.id,s=e.env;this.renderedToolbars=[];var l=this.renderHeading();return $.createElement("div",{className:t("Table-render-wrapper",w(d(d({},this.props),{name:"wrapperCustomStyle",id:i,themeCss:a})),{"Table--unsaved":!!r.modified||!!r.moved}),style:n},this.renderActions("header"),l,this.renderTable(),$.createElement(y,d({},this.props,{config:{themeCss:o,classNames:[{key:"tableHeadClassname",weights:{default:{inner:".".concat(t("Table-table")," > thead > tr > th"),important:!0}}},{key:"tableHeadClassname",weights:{default:{inner:"> tr > th",important:!0}}},{key:"tableBodyClassname",weights:{default:{inner:"> tbody.".concat(t("Table-tbody")," > tr td")},hover:{suf:"> tbody > tr",inner:"td",important:!0}}},{key:"tableRowClassname",weights:{default:{parent:".".concat(t("Table-table")," > tbody.").concat(t("Table-tbody")),inner:"td.".concat(t("Table-cell"))},hover:{parent:".".concat(t("Table-table")," > tbody.").concat(t("Table-tbody")),inner:"td.".concat(t("Table-cell"))}}}],wrapperCustomStyle:a,id:i},env:s})))},t.contextType=C,t.propsList=["source","columnsTogglable","columns","items","rowSelection","expandable","sticky","itemBadge","popOverContainer","keyField","childrenColumnName","rowClassNameExpr","lineHeight","bordered","footer","maxKeepItemSelectionLength","keepItemSelectionOnPageChange","itemActions","headingClassName","footSummary","headSummary","saveImmediately","selectable","multiple","primaryField","hideQuickSaveBtn","selected","placeholder","autoFillHeight"],t.defaultProps={keyField:"id",canAccessSuperData:!1,lazyRenderAfter:100},s([b,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],t.prototype,"getPopOverContainer",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Number,Number]),i("design:returntype",void 0)],t.prototype,"subFormRef",null),s([b,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],t.prototype,"reset",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Number]),i("design:returntype",void 0)],t.prototype,"rowClassName",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Number]),i("design:returntype",void 0)],t.prototype,"expandedRowClassName",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Number]),i("design:returntype",void 0)],t.prototype,"expandedRowRender",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Number,Array]),i("design:returntype",void 0)],t.prototype,"rowExpandable",null),s([b,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",Promise)],t.prototype,"handleSave",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Object,Array,Array,Object,Object]),i("design:returntype",void 0)],t.prototype,"handleQuickSave",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Object,Object,Boolean,Object]),i("design:returntype",void 0)],t.prototype,"handleQuickChange",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Object,Object]),i("design:returntype",void 0)],t.prototype,"handleAction",null),s([b,i("design:type",Function),i("design:paramtypes",[Array,Array,Array]),i("design:returntype",Promise)],t.prototype,"handleSelected",null),s([b,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",Promise)],t.prototype,"handleSort",null),s([b,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",Promise)],t.prototype,"handleFilter",null),s([b,i("design:type",Function),i("design:paramtypes",[String,Object]),i("design:returntype",Promise)],t.prototype,"handleSearch",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Object,Number]),i("design:returntype",Promise)],t.prototype,"handleRowClick",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Object,Number]),i("design:returntype",Promise)],t.prototype,"handleRowDbClick",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Object,Number]),i("design:returntype",Promise)],t.prototype,"handleRowMouseEnter",null),s([b,i("design:type",Function),i("design:paramtypes",[Object,Object,Number]),i("design:returntype",Promise)],t.prototype,"handleRowMouseLeave",null),s([b,i("design:type",Function),i("design:paramtypes",[Number,Number,Array]),i("design:returntype",Promise)],t.prototype,"handleOrderChange",null),s([b,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",Promise)],t.prototype,"handleSaveOrder",null),s([b,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],t.prototype,"getRef",null),t}($.Component)),te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.receive=function(e,t){var n,r,o,a=this.context;return(null===(n=this.props)||void 0===n?void 0:n.host)?null===(o=(r=this.props.host).receive)||void 0===o?void 0:o.call(r,e,t):t?a.send(t,e):void 0},t.prototype.reload=function(e,t,n){var r,o,a,i,s=this.context;return null===(r=null==s?void 0:s.parent)||void 0===r||r.getComponents(),(null===(o=this.props)||void 0===o?void 0:o.host)?null===(i=(a=this.props.host).reload)||void 0===i?void 0:i.call(a,e,t,n):e?s.reload(e,n):void 0},t.prototype.setData=function(e,t,r,o){var i;return a(this,void 0,void 0,function(){var a,s,u,p,m,h,y;return n(this,function(n){switch(n.label){case 0:return a=this.props.store,s=a.data.rows.length,void 0===r?[3,1]:(u=c([],l(a.data.rows),!1),String(r).split(",").forEach(function(t){var n=Number(t);u.splice(n,1,e)}),[2,a.updateData({rows:u},void 0,t)]);case 1:if(void 0===o)return[3,6];p=c([],l(a.data.rows),!1),m=0,n.label=2;case 2:return m<s?(h=p[m],[4,v(o,h)]):[3,5];case 3:n.sent()&&p.splice(m,1,e),n.label=4;case 4:return m++,[3,2];case 5:return[2,a.updateData({rows:p},void 0,t)];case 6:return y=d(d({},e),{rows:null!==(i=e.rows)&&void 0!==i?i:e.items}),[2,a.updateData(y,void 0,t)]}})})},t.prototype.getData=function(){var e=this.props,t=e.store,n=e.data;return t.getData(n)},s([F({type:"table2",storeType:m.name,name:"table2",isolateScope:!0})],t)}(ee);export{te as TableRenderer,ee as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as r,r as n,t as o}from"./tslib.es6-TRdqp4ac.js";import{J as a,On as s,Z as l,it as i,xr as p}from"./esm-Byma-6B-.js";var d=/* @__PURE__ */e(t()),c=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.renderTd=function(e,t,r){var n,a=this.props,s=a.border,l=a.borderColor;a.render;var i,c=a.data,u=a.padding,m="td-".concat(t);return s&&(i="1px solid ".concat(l)),p(e,c)?d.createElement("td",{style:o({border:i,color:e.color,fontWeight:e.bold?"bold":"normal",background:e.background,padding:null!==(n=e.padding)&&void 0!==n?n:u,width:e.width||"auto",textAlign:e.align||"left",verticalAlign:e.valign||"center"},e.style),align:e.align,valign:e.valign,rowSpan:e.rowspan,colSpan:e.colspan,key:m},this.renderTdBody(e.body)):null},t.prototype.renderTdBody=function(e){return(0,this.props.render)("td",e||"")},t.prototype.renderTds=function(e,t){var r=this,n=this.props.data;return e.map(function(e,o){return r.renderTd(s(e,n),o,t)})},t.prototype.renderTr=function(e,t){var r="tr-".concat(t),n=this.props.data;return p(e,n)?d.createElement("tr",{style:o({height:e.height,background:e.background},e.style),key:r},this.renderTds(e.tds||[],t)):null},t.prototype.renderTrs=function(e){var t=this,r=this.props.data;return e.map(function(e,n){return t.renderTr(s(e,r),n)})},t.prototype.renderCols=function(){var e=this.props,t=e.cols,r=e.data;if(t){var n=t.map(function(e){return e=s(e,r),d.createElement("col",{span:e.span,style:e.style})});return d.createElement("colgroup",null,n)}return null},t.prototype.renderCaption=function(){return this.props.caption?d.createElement("caption",{style:{captionSide:"bottom"===this.props.captionSide?"bottom":"top"}},this.props.caption):null},t.prototype.render=function(){var e=this.props,t=e.width,r=e.trs,n=void 0===r?[]:r,s=e.classnames,i=e.className,p=e.id,c=e.wrapperCustomStyle,u=e.env,m=e.themeCss,h=e.style,y=d.createElement("table",{className:s("TableView",i,l(o(o({},this.props),{name:"baseControlClassName",id:p,themeCss:m})),l(o(o({},this.props),{name:"wrapperCustomStyle",id:p,themeCss:c}))),style:{width:t,borderCollapse:"collapse"},"data-id":p},this.renderCaption(),this.renderCols(),d.createElement("tbody",null,this.renderTrs(n)),d.createElement(a,o({},this.props,{config:{wrapperCustomStyle:c,id:p,themeCss:m,classNames:[{key:"baseControlClassName"}]},env:u})));return h&&Object.keys(h).length?d.createElement("div",{className:"ae-TableViewEditor",style:h},y):y},t.defaultProps={padding:"var(--TableCell-paddingY) var(--TableCell-paddingX)",width:"100%",border:!0,borderColor:"var(--borderColor)"},t}(d.Component),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),n([i({type:"table-view",autoVar:!0})],t)}(c);export{u as TableViewRenderer,c as default};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as r,r as n,t as o}from"./tslib.es6-TRdqp4ac.js";import{J as a,On as s,Z as l,it as i,xr as p}from"./esm-DMJQA23h.js";var d=/* @__PURE__ */e(t()),c=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.renderTd=function(e,t,r){var n,a=this.props,s=a.border,l=a.borderColor;a.render;var i,c=a.data,u=a.padding,m="td-".concat(t);return s&&(i="1px solid ".concat(l)),p(e,c)?d.createElement("td",{style:o({border:i,color:e.color,fontWeight:e.bold?"bold":"normal",background:e.background,padding:null!==(n=e.padding)&&void 0!==n?n:u,width:e.width||"auto",textAlign:e.align||"left",verticalAlign:e.valign||"center"},e.style),align:e.align,valign:e.valign,rowSpan:e.rowspan,colSpan:e.colspan,key:m},this.renderTdBody(e.body)):null},t.prototype.renderTdBody=function(e){return(0,this.props.render)("td",e||"")},t.prototype.renderTds=function(e,t){var r=this,n=this.props.data;return e.map(function(e,o){return r.renderTd(s(e,n),o,t)})},t.prototype.renderTr=function(e,t){var r="tr-".concat(t),n=this.props.data;return p(e,n)?d.createElement("tr",{style:o({height:e.height,background:e.background},e.style),key:r},this.renderTds(e.tds||[],t)):null},t.prototype.renderTrs=function(e){var t=this,r=this.props.data;return e.map(function(e,n){return t.renderTr(s(e,r),n)})},t.prototype.renderCols=function(){var e=this.props,t=e.cols,r=e.data;if(t){var n=t.map(function(e){return e=s(e,r),d.createElement("col",{span:e.span,style:e.style})});return d.createElement("colgroup",null,n)}return null},t.prototype.renderCaption=function(){return this.props.caption?d.createElement("caption",{style:{captionSide:"bottom"===this.props.captionSide?"bottom":"top"}},this.props.caption):null},t.prototype.render=function(){var e=this.props,t=e.width,r=e.trs,n=void 0===r?[]:r,s=e.classnames,i=e.className,p=e.id,c=e.wrapperCustomStyle,u=e.env,m=e.themeCss,h=e.style,y=d.createElement("table",{className:s("TableView",i,l(o(o({},this.props),{name:"baseControlClassName",id:p,themeCss:m})),l(o(o({},this.props),{name:"wrapperCustomStyle",id:p,themeCss:c}))),style:{width:t,borderCollapse:"collapse"},"data-id":p},this.renderCaption(),this.renderCols(),d.createElement("tbody",null,this.renderTrs(n)),d.createElement(a,o({},this.props,{config:{wrapperCustomStyle:c,id:p,themeCss:m,classNames:[{key:"baseControlClassName"}]},env:u})));return h&&Object.keys(h).length?d.createElement("div",{className:"ae-TableViewEditor",style:h},y):y},t.defaultProps={padding:"var(--TableCell-paddingY) var(--TableCell-paddingX)",width:"100%",border:!0,borderColor:"var(--borderColor)"},t}(d.Component),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),n([i({type:"table-view",autoVar:!0})],t)}(c);export{u as TableViewRenderer,c as default};
@@ -1 +1 @@
1
- import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{a,i as n,n as s,o as i,r as o,s as r,t as l,u as d}from"./tslib.es6-TRdqp4ac.js";import{En as u,Hi as c,Ii as h,J as p,Nn as y,Tn as v,Xr as m,Xt as f,Z as b,dn as g,dt as T,hr as C,ht as K,it as A,oi as N,ui as E,vi as S,xr as x,yr as w}from"./esm-Byma-6B-.js";import{St as O,xt as I}from"./esm-CM4fvlfi.js";var F=/* @__PURE__ */t(e()),B=/* @__PURE__ */t(v()),j=/* @__PURE__ */t(u()),k=/* @__PURE__ */t(c()),z=/* @__PURE__ */t(f()),D=function(t){function e(e){var a=t.call(this,e)||this;a.newTabDefaultId=3,a.lazySwitchTo=(0,z.default)(a.switchTo.bind(a),250,{leading:!0,trailing:!1});var n=e.location||window.location,s=e.tabs,i=e.source,o=e.data,l=0;if(void 0!==e.activeKey)l=e.activeKey;else if(n&&Array.isArray(s)){var d=n.hash.substring(1),u=(0,B.default)(s,function(t){return t.hash===d});u?l=u.hash:void 0!==e.defaultKey?l="string"==typeof e.defaultKey?h(e.defaultKey,e.data):e.defaultKey:e.defaultActiveKey&&(l="string"==typeof e.defaultActiveKey?h(e.defaultActiveKey,e.data):e.defaultActiveKey),l=l||s[0]&&s[0].hash||0}var c=r(a.initTabArray(s,i,o),2),p=c[0],y=c[1];return a.state={prevKey:void 0,activeKey:a.activeKey=l,localTabs:p,isFromSource:y},a}return n(e,t),e.prototype.initTabArray=function(t,e,a){if(!t)return[[],!1];var n=h(e,a,"| raw");if(!Array.isArray(n))return[t,!1];t=Array.isArray(t)?t:[t];var s=[];return n.forEach(function(e){s.push.apply(s,d([],r(t.map(function(t){return l(l({},t),{data:e})})),!1))}),[s,!0]},e.prototype.componentDidMount=function(){var t,e;this.autoJumpToNeighbour(this.activeKey);var a=this.props,n=a.name,s=a.value,i=a.onChange,o=a.source;a.tabs;var r=a.data,l=this.state.localTabs;if(n&&"function"==typeof i&&!o)if((s=null!=s?s:S(r,n))&&Array.isArray(l)){var d=this.resolveKeyByValue(s);void 0!==d&&this.handleSelect(d)}else{var u=this.resolveTabByKey(this.activeKey);u&&s!==(null!==(t=u.value)&&void 0!==t?t:u.title)&&i(null!==(e=u.value)&&void 0!==e?e:u.title,n)}},e.prototype.componentDidUpdate=function(t,e){var a,n,s,i=this.props,o=this.state.localTabs,l=h(t.defaultActiveKey,t.data),d=h(i.defaultActiveKey,i.data);if(w({tabs:i.tabs,source:h(i.source,i.data,"| raw")},{tabs:t.tabs,source:h(t.source,t.data,"| raw")},!1)){var u=r(this.initTabArray(i.tabs,i.source,i.data),2),c=u[0],p=u[1];this.setState({localTabs:c,isFromSource:p}),o=c}if(i.location&&t.location&&i.location.hash!==t.location.hash){var y=i.location.hash.substring(1);if(!y)return;(f=(0,B.default)(o,function(t){return t.hash===y}))&&f.hash&&f.hash!==this.state.activeKey&&this.setState({activeKey:this.activeKey=f.hash,prevKey:this.state.activeKey})}else if(Array.isArray(o)&&Array.isArray(e.localTabs)&&JSON.stringify(o.map(function(t){return t.hash}))!==JSON.stringify(e.localTabs.map(function(t){return t.hash}))){var v=this.state.activeKey,m=i.location,f=null;if(m&&Array.isArray(o)){var b=m.hash.substring(1);f=(0,B.default)(o,function(t){return t.hash===b})}f?v=f.hash:o&&o.some(function(t,e){return t.hash?t.hash===v:e===v})||(v=o&&o[0]&&o[0].hash||0),this.setState({prevKey:void 0,activeKey:this.activeKey=v})}else if(l!==d){if(null==d)return;var g=null;(f=(0,B.default)(o,function(t){return t.hash===d}))?g=f.hash:"number"==typeof d&&o[d]&&(g=d),null!==g&&this.setState({prevKey:l,activeKey:this.activeKey=g})}this.autoJumpToNeighbour(this.activeKey);var T,C=this.props,K=C.name,A=C.value,N=C.onChange,E=C.source,x=C.data;K&&"function"==typeof N&&!E&&((A=null!=A?A:S(x,K))!==(null!==(a=t.value)&&void 0!==a?a:S(t.data,t.name))&&void 0!==(T=this.resolveKeyByValue(A))&&T!==this.activeKey?this.handleSelect(T):this.activeKey!==e.activeKey&&(f=this.resolveTabByKey(this.activeKey))&&A!==(null!==(n=f.value)&&void 0!==n?n:f.title)&&N(null!==(s=f.value)&&void 0!==s?s:f.title,K))},e.prototype.componentWillUnmount=function(){this.lazySwitchTo.cancel()},e.prototype.resolveTabByKey=function(t){var e=this.state.localTabs;if(Array.isArray(e))return(0,B.default)(e,function(e,a){return e.hash?e.hash===t:a===t})},e.prototype.resolveKeyByValue=function(t){var e=this.state.localTabs;if(Array.isArray(e)){var a=(0,B.default)(e,function(e){var a;return(null!==(a=e.value)&&void 0!==a?a:e.title)===t});return a&&a.hash?a.hash:e.indexOf(a)}},e.prototype.autoJumpToNeighbour=function(t){var e=this.props;e.tabs;var a=e.data,n=this.state.localTabs;if(Array.isArray(n)){var s=(0,j.default)(n,function(e,a){return e.hash?e.hash===t:a===t});if(n[s]&&!x(n[s],this.props.data))for(var i=n.length,o=s,r=s;o-- >=0||r++<i;){var l=null;if(o>=0&&x(n[o],a)?l=n[o].hash||o:r<i&&x(n[r],a)&&(l=n[r].hash||r),null!==l){this.setState({activeKey:this.activeKey=l});break}}}},e.prototype.handleAdd=function(){var t=this,e=this.state.localTabs.concat();e.push({title:"tab".concat(this.newTabDefaultId++),body:"tab"}),this.setState({localTabs:e},function(){t.switchTo(t.state.localTabs.length-1)})},e.prototype.handleClose=function(t,e){return s(this,void 0,void 0,function(){var n,s,i;return a(this,function(a){switch(a.label){case 0:return n=this.state.localTabs.concat(),s=null==n?void 0:n.findIndex(function(a,n){var s;return t===(e?a.hash:null!==(s=a.hash)&&void 0!==s?s:n)}),-1===s?[2]:(n.splice(s,1),[4,(0,this.props.dispatchEvent)("delete",K(this.props,{value:t}))]);case 1:return(null==(i=a.sent())?void 0:i.prevented)||this.setState({localTabs:n}),[2]}})})},e.prototype.handleEdit=function(t,e){var a=this.state.localTabs.concat();a[t].title=e,this.setState({localTabs:a})},e.prototype.handleDragChange=function(t){return s(this,void 0,void 0,function(){var e,n,s=this;return a(this,function(a){return e=this.resolveTabByKey(this.activeKey),(n=this.state.localTabs.concat()).splice(t.newIndex,0,n.splice(t.oldIndex,1)[0]),this.setState({localTabs:n},function(){if(e){var t=n.indexOf(e);s.switchTo(t)}}),[2]})})},e.prototype.handleSelect=function(t){var e;return s(this,void 0,void 0,function(){var n,s,i,o,r,l,d,u,c;return a(this,function(a){switch(a.label){case 0:return n=this.props,s=n.dispatchEvent,n.data,i=n.env,o=n.onSelect,r=n.id,l=this.state.localTabs,(d=null==l?void 0:l.find(function(e,a){return t===(e.hash?e.hash:a)}))?(null===(e=i.tracker)||void 0===e||e.call(i,{eventType:"tabChange",eventData:{id:r,key:t}}),[4,s("change",K(this.props,{value:(null==d?void 0:d.hash)?null==d?void 0:d.hash:t+1}))]):[2];case 1:return(null==(u=a.sent())?void 0:u.prevented)||("string"==typeof t&&i?i.updateLocation("#".concat(t)):"string"==typeof this.state.activeKey&&i&&i.updateLocation("#"),this.setState({activeKey:this.activeKey=t,prevKey:this.state.activeKey}),"string"==typeof o?(c=g(o,"key","props"))&&c(t,this.props):"function"==typeof o&&o(t,this.props)),[2]}})})},e.prototype.doAction=function(t,e,a,n){void 0===a&&(a=!1);var s=null==t?void 0:t.actionType,i=Number(null==n?void 0:n.activeKey),o=(0,k.default)(i)?null==n?void 0:n.activeKey:i,r=null==n?void 0:n.deleteHash;"changeActiveKey"===s?this.handleSelect("number"==typeof o?o-1:o):"deleteTab"===s&&this.handleClose(r,!0)},e.prototype.switchTo=function(t,e){var a=this.state.localTabs;Array.isArray(a)&&a[t]&&this.setState({activeKey:this.activeKey=a[t].hash||t},e)},e.prototype.currentIndex=function(){var t=this,e=this.state.localTabs;return Array.isArray(e)?(0,j.default)(e,function(e,a){return e.hash?e.hash===t.state.activeKey:a===t.state.activeKey}):-1},e.prototype.dispatchEvent=function(t,e,n,i){return s(this,void 0,void 0,function(){var s;return a(this,function(a){return"formItemValidateError"===t&&"number"==typeof(s=null==n?void 0:n.props.tabIndex)&&this.lazySwitchTo(s),[2,this.props.dispatchEvent(t,e,n,i)]})})},e.prototype.renderTabTitle=function(t,e,a){var n=this.props.render;return"string"!=typeof t&&t?n("tab-title/".concat(e),t,{data:l({index:e,__index:e},a)}):m(t,a)},e.prototype.renderToolbar=function(){var t=this.props,e=t.toolbar,a=t.render,n=t.classnames,s=t.toolbarClassName,i=t.id,o=t.themeCss;return e?F.createElement("div",{className:n("Tabs-toolbar",s,b(l(l({},this.props),{name:"toolbarControlClassName",id:i,themeCss:o})))},a("toolbar",e)):null},e.prototype.renderTabs=function(){var t=this,e=this.props,a=e.classnames,n=e.classPrefix,s=e.contentClassName,i=e.linksClassName,o=e.tabRender,r=e.className,d=e.style,u=e.render,c=e.data,h=e.mode,y=e.tabsMode,v=e.unmountOnExit;e.source;var f=e.formStore,g=e.formMode,T=e.formHorizontal,K=e.subFormMode,A=e.subFormHorizontal,S=e.addable,w=e.closable,B=e.draggable,j=e.showTip,k=e.showTipClassName,z=e.editable,D=e.sidePosition,P=e.translate,U=e.addBtnText,J=e.collapseOnExceed,H=e.collapseBtnLabel,M=e.disabled,L=e.mobileUI,V=e.swipeable,_=e.testIdBuilder,W=e.id,R=e.wrapperCustomStyle,X=e.themeCss,Z=e.env,q=y||h,G=this.props.mountOnEnter;f&&(G=!1);var Q=this.state,Y=Q.localTabs,$=[],tt=[];return Q.isFromSource?($=Y.map(function(e,n){var s,i,o=N(c,E(e.data)?l({index:n},e.data):{item:e.data,index:n});return x(e,o)?F.createElement(I,l({},e,{title:t.renderTabTitle(e.title,n,o),disabled:M||C(e,o),key:n,eventKey:m(e.hash,o)||n,prevKey:n>0?(null===(s=Y[n-1])||void 0===s?void 0:s.hash)||n-1:0,nextKey:n<Y.length-1?(null===(i=Y[n+1])||void 0===i?void 0:i.hash)||n+1:Y.length-1,swipeable:V,mobileUI:L,mountOnEnter:G,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:v,onSelect:t.handleSelect,testIdBuilder:null==_?void 0:_.getChild("tab-".concat("string"==typeof e.title?e.title:n)),className:a(e.className,b(l(l({},e),{name:"panelControlClassName",id:e.id,themeCss:e.themeCss})))}),u("item/".concat(n),(null==e?void 0:e.type)?e:e.tab||e.body,{tabIndex:n,dispatchEvent:t.dispatchEvent,disabled:M||C(e,o)||void 0,data:o,formMode:e.mode||K||g,formHorizontal:e.horizontal||A||T})):null}),tt=Y.map(function(e,a){return x(e,N(c,E(e.data)?l({index:a},e.data):{item:e.data,index:a}))?F.createElement(p,l({},e,{config:{id:e.id,themeCss:e.themeCss,classNames:[{key:"panelControlClassName"}]},env:t.props.env,key:"customstyle_".concat(a)})):null})):($=Y.map(function(e,n){var s,i;return x(e,c)?F.createElement(I,l({},e,{title:t.renderTabTitle(e.title,n,c),disabled:M||C(e,c),key:n,eventKey:e.hash||n,prevKey:n>0?(null===(s=Y[n-1])||void 0===s?void 0:s.hash)||n-1:0,nextKey:n<Y.length-1?(null===(i=Y[n+1])||void 0===i?void 0:i.hash)||n+1:Y.length-1,swipeable:V,mobileUI:L,mountOnEnter:G,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:v,onSelect:t.handleSelect,testIdBuilder:null==_?void 0:_.getChild("tab-".concat("string"==typeof e.title?e.title:n)),className:a(e.className,b(l(l({},e),{name:"panelControlClassName",id:e.id,themeCss:e.themeCss})))}),t.renderTab?t.renderTab(e,t.props,n):o?o(e,t.props,n):u("tab/".concat(n),(null==e?void 0:e.type)?e:e.tab||e.body,{tabIndex:n,dispatchEvent:t.dispatchEvent,disabled:M||C(e,c)||void 0,formMode:e.mode||K||g,formHorizontal:e.horizontal||A||T})):null}),tt=Y.map(function(e,a){return x(e,c)?F.createElement(p,{config:{id:e.id,themeCss:e.themeCss,classNames:[{key:"panelControlClassName"}]},env:t.props.env,key:"customstyle_".concat(a)}):null})),F.createElement(F.Fragment,null,F.createElement(O,{addBtnText:P(U||"add"),classPrefix:n,classnames:a,mode:q,closable:w,className:a(r,b(l(l({},this.props),{name:"wrapperCustomStyle",id:W,themeCss:R}))),style:d,contentClassName:a(s,b(l(l({},this.props),{name:"contentControlClassName",id:W,themeCss:X}))),linksClassName:i,titleClassName:a(b(l(l({},this.props),{name:"titleControlClassName",id:W,themeCss:X}))),onSelect:this.handleSelect,activeKey:this.state.activeKey,toolbar:this.renderToolbar(),addable:S,onAdd:this.handleAdd,onClose:this.handleClose,draggable:B,onDragChange:this.handleDragChange,showTip:j,showTipClassName:k,editable:z,onEdit:this.handleEdit,sidePosition:D,collapseOnExceed:J,collapseBtnLabel:H,mobileUI:L,testIdBuilder:_},$),tt,F.createElement(p,l({},this.props,{config:{wrapperCustomStyle:R,id:W,themeCss:X,classNames:[{key:"titleControlClassName",weights:{default:{important:!0,inner:"> a"},focused:{important:!0,suf:".is-active",inner:"> a"},hover:{important:!0,inner:"> a"},disabled:{important:!0,suf:".is-disabled",inner:"> a"}}},{key:"toolbarControlClassName",weights:{default:{important:!0}}},{key:"contentControlClassName",weights:{default:{important:!0}}}]},env:Z})))},e.prototype.render=function(){return this.renderTabs()},e.defaultProps={className:"",mode:"",mountOnEnter:!0,unmountOnExit:!1},o([y,i("design:type",Function),i("design:paramtypes",[Array,String,Object]),i("design:returntype",Array)],e.prototype,"initTabArray",null),o([y,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"autoJumpToNeighbour",null),o([y,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"handleAdd",null),o([y,i("design:type",Function),i("design:paramtypes",[Object,Boolean]),i("design:returntype",Promise)],e.prototype,"handleClose",null),o([y,i("design:type",Function),i("design:paramtypes",[Number,String]),i("design:returntype",void 0)],e.prototype,"handleEdit",null),o([y,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",Promise)],e.prototype,"handleDragChange",null),o([y,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",Promise)],e.prototype,"handleSelect",null),o([y,i("design:type",Function),i("design:paramtypes",[Number,Function]),i("design:returntype",void 0)],e.prototype,"switchTo",null),o([y,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",Number)],e.prototype,"currentIndex",null),o([y,i("design:type",Function),i("design:paramtypes",[Object,Object,F.Component,Object]),i("design:returntype",Promise)],e.prototype,"dispatchEvent",null),e}(F.Component),P=function(t){function e(e,a){var n=t.call(this,e)||this;return a.registerComponent(n),n}return n(e,t),e.prototype.componentWillUnmount=function(){var e;null===(e=t.prototype.componentWillUnmount)||void 0===e||e.call(this),this.context.unRegisterComponent(this)},e.contextType=T,o([A({type:"tabs"}),i("design:paramtypes",[Object,Object])],e)}(D);export{P as TabsRenderer,D as default};
1
+ import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as e}from"./react-CWkhIp2c.js";import{a,i as n,n as s,o as i,r as o,s as r,t as l,u as d}from"./tslib.es6-TRdqp4ac.js";import{En as u,Hi as c,Ii as h,J as p,Nn as y,Tn as v,Xr as m,Xt as f,Z as b,dn as g,dt as T,hr as C,ht as K,it as A,oi as N,ui as E,vi as S,xr as x,yr as w}from"./esm-DMJQA23h.js";import{St as O,xt as I}from"./esm-Dgr2t9Jm.js";var F=/* @__PURE__ */t(e()),B=/* @__PURE__ */t(v()),j=/* @__PURE__ */t(u()),k=/* @__PURE__ */t(c()),z=/* @__PURE__ */t(f()),D=function(t){function e(e){var a=t.call(this,e)||this;a.newTabDefaultId=3,a.lazySwitchTo=(0,z.default)(a.switchTo.bind(a),250,{leading:!0,trailing:!1});var n=e.location||window.location,s=e.tabs,i=e.source,o=e.data,l=0;if(void 0!==e.activeKey)l=e.activeKey;else if(n&&Array.isArray(s)){var d=n.hash.substring(1),u=(0,B.default)(s,function(t){return t.hash===d});u?l=u.hash:void 0!==e.defaultKey?l="string"==typeof e.defaultKey?h(e.defaultKey,e.data):e.defaultKey:e.defaultActiveKey&&(l="string"==typeof e.defaultActiveKey?h(e.defaultActiveKey,e.data):e.defaultActiveKey),l=l||s[0]&&s[0].hash||0}var c=r(a.initTabArray(s,i,o),2),p=c[0],y=c[1];return a.state={prevKey:void 0,activeKey:a.activeKey=l,localTabs:p,isFromSource:y},a}return n(e,t),e.prototype.initTabArray=function(t,e,a){if(!t)return[[],!1];var n=h(e,a,"| raw");if(!Array.isArray(n))return[t,!1];t=Array.isArray(t)?t:[t];var s=[];return n.forEach(function(e){s.push.apply(s,d([],r(t.map(function(t){return l(l({},t),{data:e})})),!1))}),[s,!0]},e.prototype.componentDidMount=function(){var t,e;this.autoJumpToNeighbour(this.activeKey);var a=this.props,n=a.name,s=a.value,i=a.onChange,o=a.source;a.tabs;var r=a.data,l=this.state.localTabs;if(n&&"function"==typeof i&&!o)if((s=null!=s?s:S(r,n))&&Array.isArray(l)){var d=this.resolveKeyByValue(s);void 0!==d&&this.handleSelect(d)}else{var u=this.resolveTabByKey(this.activeKey);u&&s!==(null!==(t=u.value)&&void 0!==t?t:u.title)&&i(null!==(e=u.value)&&void 0!==e?e:u.title,n)}},e.prototype.componentDidUpdate=function(t,e){var a,n,s,i=this.props,o=this.state.localTabs,l=h(t.defaultActiveKey,t.data),d=h(i.defaultActiveKey,i.data);if(w({tabs:i.tabs,source:h(i.source,i.data,"| raw")},{tabs:t.tabs,source:h(t.source,t.data,"| raw")},!1)){var u=r(this.initTabArray(i.tabs,i.source,i.data),2),c=u[0],p=u[1];this.setState({localTabs:c,isFromSource:p}),o=c}if(i.location&&t.location&&i.location.hash!==t.location.hash){var y=i.location.hash.substring(1);if(!y)return;(f=(0,B.default)(o,function(t){return t.hash===y}))&&f.hash&&f.hash!==this.state.activeKey&&this.setState({activeKey:this.activeKey=f.hash,prevKey:this.state.activeKey})}else if(Array.isArray(o)&&Array.isArray(e.localTabs)&&JSON.stringify(o.map(function(t){return t.hash}))!==JSON.stringify(e.localTabs.map(function(t){return t.hash}))){var v=this.state.activeKey,m=i.location,f=null;if(m&&Array.isArray(o)){var b=m.hash.substring(1);f=(0,B.default)(o,function(t){return t.hash===b})}f?v=f.hash:o&&o.some(function(t,e){return t.hash?t.hash===v:e===v})||(v=o&&o[0]&&o[0].hash||0),this.setState({prevKey:void 0,activeKey:this.activeKey=v})}else if(l!==d){if(null==d)return;var g=null;(f=(0,B.default)(o,function(t){return t.hash===d}))?g=f.hash:"number"==typeof d&&o[d]&&(g=d),null!==g&&this.setState({prevKey:l,activeKey:this.activeKey=g})}this.autoJumpToNeighbour(this.activeKey);var T,C=this.props,K=C.name,A=C.value,N=C.onChange,E=C.source,x=C.data;K&&"function"==typeof N&&!E&&((A=null!=A?A:S(x,K))!==(null!==(a=t.value)&&void 0!==a?a:S(t.data,t.name))&&void 0!==(T=this.resolveKeyByValue(A))&&T!==this.activeKey?this.handleSelect(T):this.activeKey!==e.activeKey&&(f=this.resolveTabByKey(this.activeKey))&&A!==(null!==(n=f.value)&&void 0!==n?n:f.title)&&N(null!==(s=f.value)&&void 0!==s?s:f.title,K))},e.prototype.componentWillUnmount=function(){this.lazySwitchTo.cancel()},e.prototype.resolveTabByKey=function(t){var e=this.state.localTabs;if(Array.isArray(e))return(0,B.default)(e,function(e,a){return e.hash?e.hash===t:a===t})},e.prototype.resolveKeyByValue=function(t){var e=this.state.localTabs;if(Array.isArray(e)){var a=(0,B.default)(e,function(e){var a;return(null!==(a=e.value)&&void 0!==a?a:e.title)===t});return a&&a.hash?a.hash:e.indexOf(a)}},e.prototype.autoJumpToNeighbour=function(t){var e=this.props;e.tabs;var a=e.data,n=this.state.localTabs;if(Array.isArray(n)){var s=(0,j.default)(n,function(e,a){return e.hash?e.hash===t:a===t});if(n[s]&&!x(n[s],this.props.data))for(var i=n.length,o=s,r=s;o-- >=0||r++<i;){var l=null;if(o>=0&&x(n[o],a)?l=n[o].hash||o:r<i&&x(n[r],a)&&(l=n[r].hash||r),null!==l){this.setState({activeKey:this.activeKey=l});break}}}},e.prototype.handleAdd=function(){var t=this,e=this.state.localTabs.concat();e.push({title:"tab".concat(this.newTabDefaultId++),body:"tab"}),this.setState({localTabs:e},function(){t.switchTo(t.state.localTabs.length-1)})},e.prototype.handleClose=function(t,e){return s(this,void 0,void 0,function(){var n,s,i;return a(this,function(a){switch(a.label){case 0:return n=this.state.localTabs.concat(),s=null==n?void 0:n.findIndex(function(a,n){var s;return t===(e?a.hash:null!==(s=a.hash)&&void 0!==s?s:n)}),-1===s?[2]:(n.splice(s,1),[4,(0,this.props.dispatchEvent)("delete",K(this.props,{value:t}))]);case 1:return(null==(i=a.sent())?void 0:i.prevented)||this.setState({localTabs:n}),[2]}})})},e.prototype.handleEdit=function(t,e){var a=this.state.localTabs.concat();a[t].title=e,this.setState({localTabs:a})},e.prototype.handleDragChange=function(t){return s(this,void 0,void 0,function(){var e,n,s=this;return a(this,function(a){return e=this.resolveTabByKey(this.activeKey),(n=this.state.localTabs.concat()).splice(t.newIndex,0,n.splice(t.oldIndex,1)[0]),this.setState({localTabs:n},function(){if(e){var t=n.indexOf(e);s.switchTo(t)}}),[2]})})},e.prototype.handleSelect=function(t){var e;return s(this,void 0,void 0,function(){var n,s,i,o,r,l,d,u,c;return a(this,function(a){switch(a.label){case 0:return n=this.props,s=n.dispatchEvent,n.data,i=n.env,o=n.onSelect,r=n.id,l=this.state.localTabs,(d=null==l?void 0:l.find(function(e,a){return t===(e.hash?e.hash:a)}))?(null===(e=i.tracker)||void 0===e||e.call(i,{eventType:"tabChange",eventData:{id:r,key:t}}),[4,s("change",K(this.props,{value:(null==d?void 0:d.hash)?null==d?void 0:d.hash:t+1}))]):[2];case 1:return(null==(u=a.sent())?void 0:u.prevented)||("string"==typeof t&&i?i.updateLocation("#".concat(t)):"string"==typeof this.state.activeKey&&i&&i.updateLocation("#"),this.setState({activeKey:this.activeKey=t,prevKey:this.state.activeKey}),"string"==typeof o?(c=g(o,"key","props"))&&c(t,this.props):"function"==typeof o&&o(t,this.props)),[2]}})})},e.prototype.doAction=function(t,e,a,n){void 0===a&&(a=!1);var s=null==t?void 0:t.actionType,i=Number(null==n?void 0:n.activeKey),o=(0,k.default)(i)?null==n?void 0:n.activeKey:i,r=null==n?void 0:n.deleteHash;"changeActiveKey"===s?this.handleSelect("number"==typeof o?o-1:o):"deleteTab"===s&&this.handleClose(r,!0)},e.prototype.switchTo=function(t,e){var a=this.state.localTabs;Array.isArray(a)&&a[t]&&this.setState({activeKey:this.activeKey=a[t].hash||t},e)},e.prototype.currentIndex=function(){var t=this,e=this.state.localTabs;return Array.isArray(e)?(0,j.default)(e,function(e,a){return e.hash?e.hash===t.state.activeKey:a===t.state.activeKey}):-1},e.prototype.dispatchEvent=function(t,e,n,i){return s(this,void 0,void 0,function(){var s;return a(this,function(a){return"formItemValidateError"===t&&"number"==typeof(s=null==n?void 0:n.props.tabIndex)&&this.lazySwitchTo(s),[2,this.props.dispatchEvent(t,e,n,i)]})})},e.prototype.renderTabTitle=function(t,e,a){var n=this.props.render;return"string"!=typeof t&&t?n("tab-title/".concat(e),t,{data:l({index:e,__index:e},a)}):m(t,a)},e.prototype.renderToolbar=function(){var t=this.props,e=t.toolbar,a=t.render,n=t.classnames,s=t.toolbarClassName,i=t.id,o=t.themeCss;return e?F.createElement("div",{className:n("Tabs-toolbar",s,b(l(l({},this.props),{name:"toolbarControlClassName",id:i,themeCss:o})))},a("toolbar",e)):null},e.prototype.renderTabs=function(){var t=this,e=this.props,a=e.classnames,n=e.classPrefix,s=e.contentClassName,i=e.linksClassName,o=e.tabRender,r=e.className,d=e.style,u=e.render,c=e.data,h=e.mode,y=e.tabsMode,v=e.unmountOnExit;e.source;var f=e.formStore,g=e.formMode,T=e.formHorizontal,K=e.subFormMode,A=e.subFormHorizontal,S=e.addable,w=e.closable,B=e.draggable,j=e.showTip,k=e.showTipClassName,z=e.editable,D=e.sidePosition,P=e.translate,U=e.addBtnText,J=e.collapseOnExceed,H=e.collapseBtnLabel,M=e.disabled,L=e.mobileUI,V=e.swipeable,_=e.testIdBuilder,W=e.id,R=e.wrapperCustomStyle,X=e.themeCss,Z=e.env,q=y||h,G=this.props.mountOnEnter;f&&(G=!1);var Q=this.state,Y=Q.localTabs,$=[],tt=[];return Q.isFromSource?($=Y.map(function(e,n){var s,i,o=N(c,E(e.data)?l({index:n},e.data):{item:e.data,index:n});return x(e,o)?F.createElement(I,l({},e,{title:t.renderTabTitle(e.title,n,o),disabled:M||C(e,o),key:n,eventKey:m(e.hash,o)||n,prevKey:n>0?(null===(s=Y[n-1])||void 0===s?void 0:s.hash)||n-1:0,nextKey:n<Y.length-1?(null===(i=Y[n+1])||void 0===i?void 0:i.hash)||n+1:Y.length-1,swipeable:V,mobileUI:L,mountOnEnter:G,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:v,onSelect:t.handleSelect,testIdBuilder:null==_?void 0:_.getChild("tab-".concat("string"==typeof e.title?e.title:n)),className:a(e.className,b(l(l({},e),{name:"panelControlClassName",id:e.id,themeCss:e.themeCss})))}),u("item/".concat(n),(null==e?void 0:e.type)?e:e.tab||e.body,{tabIndex:n,dispatchEvent:t.dispatchEvent,disabled:M||C(e,o)||void 0,data:o,formMode:e.mode||K||g,formHorizontal:e.horizontal||A||T})):null}),tt=Y.map(function(e,a){return x(e,N(c,E(e.data)?l({index:a},e.data):{item:e.data,index:a}))?F.createElement(p,l({},e,{config:{id:e.id,themeCss:e.themeCss,classNames:[{key:"panelControlClassName"}]},env:t.props.env,key:"customstyle_".concat(a)})):null})):($=Y.map(function(e,n){var s,i;return x(e,c)?F.createElement(I,l({},e,{title:t.renderTabTitle(e.title,n,c),disabled:M||C(e,c),key:n,eventKey:e.hash||n,prevKey:n>0?(null===(s=Y[n-1])||void 0===s?void 0:s.hash)||n-1:0,nextKey:n<Y.length-1?(null===(i=Y[n+1])||void 0===i?void 0:i.hash)||n+1:Y.length-1,swipeable:V,mobileUI:L,mountOnEnter:G,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:v,onSelect:t.handleSelect,testIdBuilder:null==_?void 0:_.getChild("tab-".concat("string"==typeof e.title?e.title:n)),className:a(e.className,b(l(l({},e),{name:"panelControlClassName",id:e.id,themeCss:e.themeCss})))}),t.renderTab?t.renderTab(e,t.props,n):o?o(e,t.props,n):u("tab/".concat(n),(null==e?void 0:e.type)?e:e.tab||e.body,{tabIndex:n,dispatchEvent:t.dispatchEvent,disabled:M||C(e,c)||void 0,formMode:e.mode||K||g,formHorizontal:e.horizontal||A||T})):null}),tt=Y.map(function(e,a){return x(e,c)?F.createElement(p,{config:{id:e.id,themeCss:e.themeCss,classNames:[{key:"panelControlClassName"}]},env:t.props.env,key:"customstyle_".concat(a)}):null})),F.createElement(F.Fragment,null,F.createElement(O,{addBtnText:P(U||"add"),classPrefix:n,classnames:a,mode:q,closable:w,className:a(r,b(l(l({},this.props),{name:"wrapperCustomStyle",id:W,themeCss:R}))),style:d,contentClassName:a(s,b(l(l({},this.props),{name:"contentControlClassName",id:W,themeCss:X}))),linksClassName:i,titleClassName:a(b(l(l({},this.props),{name:"titleControlClassName",id:W,themeCss:X}))),onSelect:this.handleSelect,activeKey:this.state.activeKey,toolbar:this.renderToolbar(),addable:S,onAdd:this.handleAdd,onClose:this.handleClose,draggable:B,onDragChange:this.handleDragChange,showTip:j,showTipClassName:k,editable:z,onEdit:this.handleEdit,sidePosition:D,collapseOnExceed:J,collapseBtnLabel:H,mobileUI:L,testIdBuilder:_},$),tt,F.createElement(p,l({},this.props,{config:{wrapperCustomStyle:R,id:W,themeCss:X,classNames:[{key:"titleControlClassName",weights:{default:{important:!0,inner:"> a"},focused:{important:!0,suf:".is-active",inner:"> a"},hover:{important:!0,inner:"> a"},disabled:{important:!0,suf:".is-disabled",inner:"> a"}}},{key:"toolbarControlClassName",weights:{default:{important:!0}}},{key:"contentControlClassName",weights:{default:{important:!0}}}]},env:Z})))},e.prototype.render=function(){return this.renderTabs()},e.defaultProps={className:"",mode:"",mountOnEnter:!0,unmountOnExit:!1},o([y,i("design:type",Function),i("design:paramtypes",[Array,String,Object]),i("design:returntype",Array)],e.prototype,"initTabArray",null),o([y,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"autoJumpToNeighbour",null),o([y,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"handleAdd",null),o([y,i("design:type",Function),i("design:paramtypes",[Object,Boolean]),i("design:returntype",Promise)],e.prototype,"handleClose",null),o([y,i("design:type",Function),i("design:paramtypes",[Number,String]),i("design:returntype",void 0)],e.prototype,"handleEdit",null),o([y,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",Promise)],e.prototype,"handleDragChange",null),o([y,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",Promise)],e.prototype,"handleSelect",null),o([y,i("design:type",Function),i("design:paramtypes",[Number,Function]),i("design:returntype",void 0)],e.prototype,"switchTo",null),o([y,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",Number)],e.prototype,"currentIndex",null),o([y,i("design:type",Function),i("design:paramtypes",[Object,Object,F.Component,Object]),i("design:returntype",Promise)],e.prototype,"dispatchEvent",null),e}(F.Component),P=function(t){function e(e,a){var n=t.call(this,e)||this;return a.registerComponent(n),n}return n(e,t),e.prototype.componentWillUnmount=function(){var e;null===(e=t.prototype.componentWillUnmount)||void 0===e||e.call(this),this.context.unRegisterComponent(this)},e.contextType=T,o([A({type:"tabs"}),i("design:paramtypes",[Object,Object])],e)}(D);export{P as TabsRenderer,D as default};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a as n,i as r,n as a,o as i,r as s,t as o}from"./tslib.es6-TRdqp4ac.js";import{Bi as l,Gn as u,Jn as d,Nn as c,P as p,Rr as h,Tn as v,ht as m,oi as y,rr as f,vi as g,w as b,xt as T}from"./esm-DMJQA23h.js";import{J as C,Q as w}from"./esm-Dgr2t9Jm.js";import{a as A}from"./_castFunction-CQMNP8A1.js";import{t as j}from"./StaticHoc-D0pM2bgC.js";import{t as F}from"./Transfer-B0VVG1X5.js";var R=/* @__PURE__ */e(t()),I=/* @__PURE__ */e(v()),S=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={activeKey:0},t}return r(t,e),t.prototype.onTabChange=function(e){return a(this,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return[4,(0,this.props.dispatchEvent)("tab-change",{key:e})];case 1:return(null==(t=n.sent())?void 0:t.prevented)||this.setState({activeKey:e}),[2]}})})},t.prototype.handleTabSearch=function(e,t,r){return a(this,void 0,void 0,function(){var a,i,s,o,d,c,p,h,v,m,f;return n(this,function(n){switch(n.label){case 0:if(a=this.props,i=a.options,s=a.labelField,o=a.valueField,d=a.env,c=a.data,p=a.searchApi,h=a.translate,!p)return[3,5];n.label=1;case 1:return n.trys.push([1,3,,4]),[4,d.fetcher(p,y(c,{term:e}),{cancelExecutor:r})];case 2:if(!(v=n.sent()).ok)throw new Error(h(v.msg||"networkError"));if(m=v.data.options||v.data.items||v.data,!Array.isArray(m))throw new Error(h("CRUD.invalidArray"));return[2,m.map(function(e){var t=null,n=e[o||"value"];return Array.isArray(i)&&null!=n&&(t=(0,I.default)(i,T(n,o))),t||e})];case 3:return f=n.sent(),d.isCancel(f)||!p.silent&&d.notify("error",f.message),[2,[]];case 4:return[3,6];case 5:return e?[2,u(t.children||i,function(t,n,r,a){return!!(Array.isArray(t.children)&&t.children.length||l([t].concat(a),e,{keys:[s||"label",o||"value"],threshold:l.rankings.CONTAINS}).length)},0,!0)]:[2,i];case 6:return[2]}})})},t.prototype.handleChange=function(e,t){return a(this,void 0,void 0,function(){var r,a,i,s,l,u,c,p,v,y,g,b,C,w;return n(this,function(n){switch(n.label){case 0:return r=this.props,a=r.onChange,i=r.joinValues,s=r.delimiter,l=r.valueField,u=r.extractValue,c=r.options,p=r.dispatchEvent,v=r.setOptions,y=r.translate,g=e,b=c.concat(),C="UN_MATCH_RESULT",Array.isArray(e)?(g=e.map(function(e){var n=d(c,T(e[l||"value"],l||"value"));if(n){if(t){var r=f(b,n);b=h(b,n,1,o(o({},r),e))}}else{var a=d(b,function(e){return e.value===C});if(a){var s=f(b,a);(null==s?void 0:s.children)&&(s.children.push(e),b=h(b,a,1,o(o({},s),e)))}else b.push({label:y("searchResult"),value:C,visible:!1,children:[e]})}return i||u?e[l||"value"]:e}),i&&(g=g.join(s||","))):e&&(g=i||u?e[l||"value"]:e),(b.length>c.length||t)&&v(b,!0),[4,p("change",m(this.props,{value:g,options:c,items:c}))];case 1:return(null==(w=n.sent())?void 0:w.prevented)||a(g),[2]}})})},s([c,i("design:type",Function),i("design:paramtypes",[Number]),i("design:returntype",Promise)],t.prototype,"onTabChange",null),s([c,i("design:type",Function),i("design:paramtypes",[String,Object,Function]),i("design:returntype",Promise)],t.prototype,"handleTabSearch",null),s([c,i("design:type",Function),i("design:paramtypes",[Object,Boolean]),i("design:returntype",Promise)],t.prototype,"handleChange",null),t}(F),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.optionItemRender=function(e,t){var n=this.props,r=n.menuTpl,a=n.render,i=n.data,s=n.classnames,l=arguments[2]||{};return r?a("item/".concat(t.index),r,{data:y(y(i,o(o({},t),l)),e)}):w.itemRender(e,o(o({},t),{classnames:s}))},t.prototype.doAction=function(e,t,n,r){var a,i,s;void 0===n&&(n=!1);var o=this.props,l=o.resetValue,u=o.onChange,d=o.formStore,c=o.store,p=o.name,h=null==r?void 0:r.activeKey;switch(e.actionType){case"clear":null==u||u("");break;case"reset":null==u||u(null!==(s=null!==(i=g(null!==(a=null==d?void 0:d.pristine)&&void 0!==a?a:null==c?void 0:c.pristine,p))&&void 0!==i?i:l)&&void 0!==s?s:"");break;case"changeTabKey":this.setState({activeKey:h})}},t.prototype.render=function(){var e=this.props,t=e.className;e.style;var n=e.classnames,r=e.options,a=e.selectedOptions,i=e.sortable,s=e.loading,o=e.searchResultMode,l=e.selectMode,u=e.searchable,d=e.showArrow,c=e.deferLoad,p=e.leftDeferLoad,h=e.disabled,v=e.selectTitle,m=e.resultTitle,y=e.itemHeight,f=e.virtualThreshold,g=e.onlyChildren,T=e.loadingConfig,w=e.valueField,j=void 0===w?"value":w,F=e.labelField,I=void 0===F?"label":F,S=e.valueTpl,E=e.menuTpl,O=e.data,k=e.mobileUI,K=e.initiallyOpen,N=void 0===K||K,x=e.testIdBuilder;return R.createElement("div",{className:n("TabsTransferControl",t)},R.createElement(C,{onlyChildren:g,activeKey:this.state.activeKey,value:a,disabled:h,options:r,onChange:this.handleChange,option2value:this.option2value,sortable:i,searchResultMode:o,onSearch:this.handleTabSearch,showArrow:d,onDeferLoad:c,onLeftDeferLoad:p,selectTitle:v,resultTitle:m,selectMode:l,searchable:u,optionItemRender:E?this.optionItemRender:void 0,resultItemRender:S?this.resultItemRender:void 0,onTabChange:this.onTabChange,itemHeight:b(y)>0?b(y):void 0,virtualThreshold:f,labelField:I,valueField:j,ctx:O,mobileUI:k,initiallyOpen:N,testIdBuilder:x}),R.createElement(A,{overlay:!0,key:"info",show:s,loadingConfig:T}))},t.defaultProps={multiple:!0},s([c,i("design:type",Function),i("design:paramtypes",[Object,Object]),i("design:returntype",void 0)],t.prototype,"optionItemRender",null),s([j(),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],t.prototype,"render",null),s([p({type:"tabs-transfer"})],t)}(S);export{S as BaseTabsTransferRenderer,E as TabsTransferRenderer};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as o,o as n,r as i,t as r}from"./tslib.es6-TRdqp4ac.js";import{Nn as a,P as s,ht as l,oi as p,vi as d,w as u}from"./esm-DMJQA23h.js";import{$ as c,C as v}from"./esm-Dgr2t9Jm.js";import{a as m}from"./_castFunction-CQMNP8A1.js";import{t as h}from"./StaticHoc-D0pM2bgC.js";import{BaseTabsTransferRenderer as f}from"./TabsTransfer-CYt2Ydo2.js";var g=/* @__PURE__ */e(t()),y=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={activeKey:0},t}return o(t,e),t.prototype.dispatchEvent=function(e){var t=this.props,o=t.dispatchEvent,n=t.value;o(e,l(this.props,{value:n}))},t.prototype.optionItemRender=function(e,t){var o=this.props,n=o.menuTpl,i=o.render,a=o.data,s=o.classnames,l=arguments[2]||{};return n?i("item/".concat(t.index),n,{data:p(p(a,r(r({},t),l)),e)}):c.itemRender(e,r(r({},t),{classnames:s}))},t.prototype.doAction=function(e){var t,o,n,i=this.props,r=i.resetValue,a=i.onChange,s=i.formStore,l=i.store,p=i.name;switch(e.actionType){case"clear":null==a||a("");break;case"reset":null==a||a(null!==(n=null!==(o=d(null!==(t=null==s?void 0:s.pristine)&&void 0!==t?t:null==l?void 0:l.pristine,p))&&void 0!==o?o:r)&&void 0!==n?n:"")}},t.prototype.render=function(){var e=this,t=this.props,o=t.className;t.style;var n=t.classnames,i=t.options,r=t.selectedOptions,a=t.sortable,s=t.loading,l=t.searchResultMode,p=t.showArrow,d=t.deferLoad,c=t.disabled,h=t.selectTitle,f=t.resultTitle,y=t.pickerSize,b=t.leftMode,T=t.leftOptions,C=t.itemHeight,F=t.virtualThreshold,j=t.loadingConfig,w=t.labelField,R=void 0===w?"label":w,E=t.valueField,I=void 0===E?"value":E,O=t.deferField,M=void 0===O?"defer":O,S=t.mobileUI,k=t.env,x=t.maxTagCount,A=t.overflowTagPopover,H=t.placeholder,K=t.initiallyOpen,N=void 0===K||K;return g.createElement("div",{className:n("TabsTransferControl",o)},g.createElement(v,{activeKey:this.state.activeKey,onTabChange:this.onTabChange,placeholder:H,value:r,disabled:c,options:i,onChange:this.handleChange,option2value:this.option2value,sortable:a,searchResultMode:l,onSearch:this.handleTabSearch,showArrow:p,onDeferLoad:d,selectTitle:h,resultTitle:f,size:y,leftMode:b,leftOptions:T,optionItemRender:this.optionItemRender,resultItemRender:this.resultItemRender,onFocus:function(){return e.dispatchEvent("focus")},onBlur:function(){return e.dispatchEvent("blur")},itemHeight:u(C)>0?u(C):void 0,virtualThreshold:F,labelField:R,valueField:I,deferField:M,mobileUI:S,popOverContainer:null==k?void 0:k.getModalContainer,maxTagCount:x,overflowTagPopover:A,initiallyOpen:N}),g.createElement(m,{loadingConfig:j,overlay:!0,key:"info",show:s}))},i([a,n("design:type",Function),n("design:paramtypes",[String]),n("design:returntype",void 0)],t.prototype,"dispatchEvent",null),i([a,n("design:type",Function),n("design:paramtypes",[Object,Object]),n("design:returntype",void 0)],t.prototype,"optionItemRender",null),i([h(),n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],t.prototype,"render",null),i([s({type:"tabs-transfer-picker"})],t)}(f);export{y as TabsTransferPickerRenderer};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as s,o,r as n,t as r}from"./tslib.es6-TRdqp4ac.js";import{$n as a,Ii as i,Nn as l,O as p,Zr as d,it as u,oi as c}from"./esm-Byma-6B-.js";import{I as h}from"./esm-CM4fvlfi.js";var v=/* @__PURE__ */e(t()),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.handleClick=function(e){var t=this.props,s=t.dispatchEvent,o=t.onClick,n=this.getResolvedEventParams();s(e,n),null==o||o(n)},t.prototype.handleMouseEnter=function(e){(0,this.props.dispatchEvent)(e,this.getResolvedEventParams())},t.prototype.handleMouseLeave=function(e){(0,this.props.dispatchEvent)(e,this.getResolvedEventParams())},t.prototype.handleClose=function(e){var t=this.props,s=t.dispatchEvent,o=t.onClose,n=this.getResolvedEventParams();s(r(r({},e),{type:"close"}),n),null==o||o(n)},t.prototype.render=function(){var e=this.props,t=e.icon,s=e.displayMode,o=e.color,n=e.className,r=e.closable,a=e.data,l=e.style,u=void 0===l?{}:l,c=p(this.resolveLabel());return d(t)&&(t=i(t,a)),d(s)&&(s=i(s,a)),d(o)&&(o=i(o,a)),v.createElement(h,{className:n,displayMode:s,color:o,icon:t,closable:r,style:u,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onClose:this.handleClose},c)},t.prototype.resolveLabel=function(){var e=this.props,t=e.label,s=e.data;return a(this.props)||(t?i(t,s,"| raw"):null)},t.prototype.getResolvedEventParams=function(){var e=this.props.data;return c(e,{label:this.resolveLabel()})},t.defaultProps={displayMode:"normal"},n([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleClick",null),n([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),n([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),n([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleClose",null),t}(v.Component),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),n([u({type:"tag"})],t)}(y);export{y as TagField,m as TagFieldRenderer};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as s,o,r as n,t as r}from"./tslib.es6-TRdqp4ac.js";import{$n as a,Ii as i,Nn as l,O as p,Zr as d,it as u,oi as c}from"./esm-DMJQA23h.js";import{I as h}from"./esm-Dgr2t9Jm.js";var v=/* @__PURE__ */e(t()),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.handleClick=function(e){var t=this.props,s=t.dispatchEvent,o=t.onClick,n=this.getResolvedEventParams();s(e,n),null==o||o(n)},t.prototype.handleMouseEnter=function(e){(0,this.props.dispatchEvent)(e,this.getResolvedEventParams())},t.prototype.handleMouseLeave=function(e){(0,this.props.dispatchEvent)(e,this.getResolvedEventParams())},t.prototype.handleClose=function(e){var t=this.props,s=t.dispatchEvent,o=t.onClose,n=this.getResolvedEventParams();s(r(r({},e),{type:"close"}),n),null==o||o(n)},t.prototype.render=function(){var e=this.props,t=e.icon,s=e.displayMode,o=e.color,n=e.className,r=e.closable,a=e.data,l=e.style,u=void 0===l?{}:l,c=p(this.resolveLabel());return d(t)&&(t=i(t,a)),d(s)&&(s=i(s,a)),d(o)&&(o=i(o,a)),v.createElement(h,{className:n,displayMode:s,color:o,icon:t,closable:r,style:u,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onClose:this.handleClose},c)},t.prototype.resolveLabel=function(){var e=this.props,t=e.label,s=e.data;return a(this.props)||(t?i(t,s,"| raw"):null)},t.prototype.getResolvedEventParams=function(){var e=this.props.data;return c(e,{label:this.resolveLabel()})},t.defaultProps={displayMode:"normal"},n([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleClick",null),n([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),n([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),n([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"handleClose",null),t}(v.Component),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),n([u({type:"tag"})],t)}(y);export{y as TagField,m as TagFieldRenderer};
@@ -0,0 +1 @@
1
+ import{o as t,t as e}from"./rolldown-runtime-DXzHzmmG.js";import{t as a}from"./react-CWkhIp2c.js";import{i as n,o as r,r as o,t as s}from"./tslib.es6-TRdqp4ac.js";import{an as i,dt as c,it as u,oi as l,sn as p}from"./esm-DMJQA23h.js";import"./esm-Dgr2t9Jm.js";import{a as d}from"./_castFunction-CQMNP8A1.js";var f=/* @__PURE__ */e((t,e)=>{function a(t){return"object"!=typeof t||"toString"in t?t:Object.prototype.toString.call(t).slice(8,-1)}Object.defineProperty(t,"__esModule",{value:!0});var n="object"==typeof process&&"production"===process.env.NODE_ENV;function r(t,e){if(!t){if(n)throw new Error("Invariant failed");throw new Error(e())}}t.invariant=r;var o=Object.prototype.hasOwnProperty,s=Array.prototype.splice,i=Object.prototype.toString;function c(t){return i.call(t).slice(8,-1)}var u=Object.assign||function(t,e){return l(e).forEach(function(a){o.call(e,a)&&(t[a]=e[a])}),t},l="function"==typeof Object.getOwnPropertySymbols?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.keys(t)};function p(t){return Array.isArray(t)?u(t.constructor(t.length),t):"Map"===c(t)?new Map(t):"Set"===c(t)?new Set(t):t&&"object"==typeof t?u(Object.create(Object.getPrototypeOf(t)),t):t}var d=function(){function t(){this.commands=u({},f),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(t,e){return t===e},this.update.newContext=function(){return(new t).update}}return Object.defineProperty(t.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(t){this.update.isEquals=t},enumerable:!0,configurable:!0}),t.prototype.extend=function(t,e){this.commands[t]=e},t.prototype.update=function(t,e){var a=this,n="function"==typeof e?{$apply:e}:e;Array.isArray(t)&&Array.isArray(n)||r(!Array.isArray(n),function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."}),r("object"==typeof n&&null!==n,function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(a.commands).join(", ")+"."});var s=t;return l(n).forEach(function(e){if(o.call(a.commands,e)){var r=t===s;s=a.commands[e](n[e],s,n,t),r&&a.isEquals(s,t)&&(s=t)}else{var i="Map"===c(t)?a.update(t.get(e),n[e]):a.update(t[e],n[e]),u="Map"===c(s)?s.get(e):s[e];a.isEquals(i,u)&&(void 0!==i||o.call(t,e))||(s===t&&(s=p(t)),"Map"===c(s)?s.set(e,i):s[e]=i)}}),s},t}();t.Context=d;var f={$push:function(t,e,a){return h(e,a,"$push"),t.length?e.concat(t):e},$unshift:function(t,e,a){return h(e,a,"$unshift"),t.length?t.concat(e):e},$splice:function(t,e,n,o){return function(t,e){r(Array.isArray(t),function(){return"Expected $splice target to be an array; got "+a(t)}),b(e.$splice)}(e,n),t.forEach(function(t){b(t),e===o&&t.length&&(e=p(o)),s.apply(e,t)}),e},$set:function(t,e,a){return function(t){r(1===Object.keys(t).length,function(){return"Cannot have more than one key in an object with $set"})}(a),t},$toggle:function(t,e){y(t,"$toggle");var a=t.length?p(e):e;return t.forEach(function(t){a[t]=!e[t]}),a},$unset:function(t,e,a,n){return y(t,"$unset"),t.forEach(function(t){Object.hasOwnProperty.call(e,t)&&(e===n&&(e=p(n)),delete e[t])}),e},$add:function(t,e,a,n){return g(e,"$add"),y(t,"$add"),"Map"===c(e)?t.forEach(function(t){var a=t[0],r=t[1];e===n&&e.get(a)!==r&&(e=p(n)),e.set(a,r)}):t.forEach(function(t){e!==n||e.has(t)||(e=p(n)),e.add(t)}),e},$remove:function(t,e,a,n){return g(e,"$remove"),y(t,"$remove"),t.forEach(function(t){e===n&&e.has(t)&&(e=p(n)),e.delete(t)}),e},$merge:function(t,e,n,o){var s,i;return s=e,r((i=t)&&"object"==typeof i,function(){return"update(): $merge expects a spec of type 'object'; got "+a(i)}),r(s&&"object"==typeof s,function(){return"update(): $merge expects a target of type 'object'; got "+a(s)}),l(t).forEach(function(a){t[a]!==e[a]&&(e===o&&(e=p(o)),e[a]=t[a])}),e},$apply:function(t,e){var n;return r("function"==typeof(n=t),function(){return"update(): expected spec of $apply to be a function; got "+a(n)+"."}),t(e)}},m=new d;function h(t,e,n){r(Array.isArray(t),function(){return"update(): expected target of "+a(n)+" to be an array; got "+a(t)+"."}),y(e[n],n)}function y(t,e){r(Array.isArray(t),function(){return"update(): expected spec of "+a(e)+" to be an array; got "+a(t)+". Did you forget to wrap your parameter in an array?"})}function b(t){r(Array.isArray(t),function(){return"update(): expected spec of $splice to be an array of arrays; got "+a(t)+". Did you forget to wrap your parameters in an array?"})}function g(t,e){var n=c(t);r("Map"===n||"Set"===n,function(){return"update(): "+a(e)+" expects a target of type Set or Map; got "+a(n)})}t.isEquals=m.update.isEquals,t.extend=m.extend,t.default=m.update,t.default.default=e.exports=u(t.default,t)}),m=/* @__PURE__ */t(a()),h=/* @__PURE__ */t(f()),y=function(t){function e(e){var a=t.call(this,e)||this;return a.state={items:e.items?e.items.concat():[]},a.handleLoaded=a.handleLoaded.bind(a),a.tick=a.tick.bind(a),a}return n(e,t),e.prototype.componentDidMount=function(){this.tick(!!this.props.checkApi)},e.prototype.componentDidUpdate=function(t){var e=this.props;t.items!==e.items?this.setState({items:e.items?e.items.concat():[]}):i(t.checkApi,e.checkApi,t.data,e.data)&&this.tick(!0)},e.prototype.componentWillUnmount=function(){clearTimeout(this.timer)},e.prototype.reload=function(){this.tick(!0)},e.prototype.tick=function(t){var e=this;void 0===t&&(t=!1);var a=this.props,n=a.loadingStatusCode,r=a.data,o=a.interval,s=a.checkApi,i=a.env,c=this.state.items;if(clearTimeout(this.timer),t||c.some(function(t){return t.status===n}))return o&&!p(s)?i.alert("checkApi 没有设置, 不能及时获取任务状态"):void(p(s,r)&&i&&i.fetcher(s,r).then(this.handleLoaded).catch(function(t){return e.setState({error:t})}))},e.prototype.handleLoaded=function(t){if(!Array.isArray(t.data))return this.props.env.alert("返回格式不正确, 期望 response.data 为数组, 包含每个 task 的状态信息");this.setState({items:t.data});var e=this.props.interval;clearTimeout(this.timer),this.timer=setTimeout(this.tick,e)},e.prototype.submitTask=function(t,e,a){var n=this;void 0===a&&(a=!1);var r=this.props,o=r.submitApi,i=r.reSubmitApi,c=r.loadingStatusCode,u=r.errorStatusCode,d=r.data,f=r.env;if(!a&&!p(o))return f.alert("submitApi 没有配置");if(a&&!p(i))return f.alert("reSubmitApi 没有配置");this.setState((0,h.default)(this.state,{items:{$splice:[[e,1,s(s({},t),{status:c})]]}}));var m=a?i:o;p(m,d)&&f&&f.fetcher(m,l(d,t)).then(function(t){if(t&&t.data)if(Array.isArray(t.data))n.handleLoaded(t);else{m&&m.replaceData;var e=n.state.items.map(function(e){return e.key===t.data.key?s(s({},m.replaceData?{}:e),t.data):e});n.handleLoaded(s(s({},t),{data:e}))}else clearTimeout(n.timer),n.timer=setTimeout(n.tick,4)}).catch(function(a){return n.setState((0,h.default)(n.state,{items:{$splice:[[e,1,s(s({},t),{status:u,remark:a.message||a})]]}}))})},e.prototype.render=function(){var t=this,e=this.props,a=e.classnames,n=e.className,r=e.style,o=e.tableClassName,s=e.taskNameLabel,i=e.operationLabel,c=e.statusLabel,u=e.remarkLabel,l=e.btnText,p=e.retryBtnText,f=e.btnClassName,h=e.retryBtnClassName,y=e.statusLabelMap,b=e.statusTextMap,g=e.readyStatusCode,v=e.loadingStatusCode,E=e.canRetryStatusCode,k=e.translate,j=e.render,$=e.loadingConfig,A=this.state.items,C=this.state.error;return m.createElement("div",{className:a("Table-content",n),style:r},m.createElement("table",{className:a("Table-table",o)},m.createElement("thead",null,m.createElement("tr",null,m.createElement("th",null,s),m.createElement("th",null,k(i)),m.createElement("th",null,c),m.createElement("th",null,u))),m.createElement("tbody",null,C?m.createElement("tr",null,m.createElement("td",{colSpan:4},m.createElement("div",{className:"text-danger"},C))):A.map(function(e,n){var r;return m.createElement("tr",{key:n},m.createElement("td",null,m.createElement("span",{className:a("word-break")},e.label)),m.createElement("td",null,e.status==v?m.createElement(d,{loadingConfig:$,show:!0,icon:"reload",spinnerClassName:a("Task-spinner")}):e.status==E?m.createElement("a",{onClick:function(){return t.submitTask(e,n,!0)},className:a("Button","Button--danger","Button--size-md",h||f)},p||l):m.createElement("a",{onClick:function(){return t.submitTask(e,n)},className:a("Button","Button--default","Button--size-md",f,(r={},r["is-disabled"]=e.status!==g,r))},l)),m.createElement("td",null,m.createElement("span",{className:a("label",y&&y[e.status||0])},b&&b[e.status||0])),m.createElement("td",null,e.remark?j("".concat(n,"/remark"),e.remark):null))}))))},e.defaultProps={className:"",tableClassName:"",taskNameLabel:"任务名称",operationLabel:"Table.operation",statusLabel:"状态",remarkLabel:"备注说明",btnText:"上线",retryBtnText:"重试",btnClassName:"",retryBtnClassName:"",statusLabelMap:["label-warning","label-info","label-info","label-danger","label-success","label-danger"],statusTextMap:["未开始","就绪","进行中","出错","已完成","出错"],initialStatusCode:0,readyStatusCode:1,loadingStatusCode:2,errorStatusCode:3,finishStatusCode:4,canRetryStatusCode:5,interval:3e3},e}(m.Component),b=function(t){function e(e,a){var n=t.call(this,e)||this;return a.registerComponent(n),n}return n(e,t),e.prototype.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this),this.context.unRegisterComponent(this)},e.contextType=c,o([u({type:"tasks"}),r("design:paramtypes",[Object,Object])],e)}(y);export{b as TaskRenderer,y as default};
@@ -1 +1 @@
1
- import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{a as n,c as s,i as r,n as o,o as i,r as a,t as u}from"./tslib.es6-TRdqp4ac.js";import{F as l,J as p,Nn as c,Z as d,ht as h,vi as f,vn as v}from"./esm-Byma-6B-.js";import{ot as m}from"./esm-CM4fvlfi.js";import{t as y}from"./StaticHoc-CJgNJAEY.js";var g=/* @__PURE__ */t(e()),C=/* @__PURE__ */t(v()),x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputRef=g.createRef(),e}return r(e,t),e.prototype.doAction=function(t,e,n,s){var r,o;void 0===n&&(n=!1);var i=null==t?void 0:t.actionType,a=this.props,u=a.onChange,l=a.formStore,p=a.store,c=a.name,d=a.resetValue;if("clear"===i)null==u||u(""),this.focus();else if("reset"===i){var h=null!==(o=f(null!==(r=null==l?void 0:l.pristine)&&void 0!==r?r:null==p?void 0:p.pristine,c))&&void 0!==o?o:d;null==u||u(h),this.focus()}else"focus"===i&&this.focus()},e.prototype.focus=function(){var t;null===(t=this.inputRef.current)||void 0===t||t.focus()},e.prototype.handleChange=function(t){var e=this.props,n=e.onChange;(0,e.dispatchEvent)("change",h(this.props,{value:t})),n&&n(t)},e.prototype.handleFocus=function(t){var e=this,s=this.props,r=s.onFocus,i=s.dispatchEvent,a=s.value;this.setState({focused:!0},function(){return o(e,void 0,void 0,function(){var e;return n(this,function(n){switch(n.label){case 0:return[4,i("focus",h(this.props,{value:a}))];case 1:return(null==(e=n.sent())?void 0:e.prevented)||r&&r(t),[2]}})})})},e.prototype.handleBlur=function(t){var e=this,s=this.props,r=s.onBlur,i=s.trimContents,a=s.value,u=s.onChange,l=s.dispatchEvent;this.setState({focused:!1},function(){return o(e,void 0,void 0,function(){var e;return n(this,function(n){switch(n.label){case 0:return i&&a&&"string"==typeof a&&u(a.trim()),[4,l("blur",h(this.props,{value:a}))];case 1:return(null==(e=n.sent())?void 0:e.prevented)||r&&r(t),[2]}})})})},e.prototype.renderStatic=function(t){void 0===t&&(t="-");var e=this.props,n=e.render,s=e.staticSchema,r=void 0===s?{}:s;return n("static-textarea",u({type:"multiline-text",maxRows:r.limit||5},r),{value:t})},e.prototype.render=function(){var t=s(this.props,[]),e=this.props,n=e.id,r=e.themeCss,o=e.env,i=e.className,a=e.classPrefix;return g.createElement(g.Fragment,null,g.createElement(m,u({},t,{forwardRef:this.inputRef,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,className:(0,C.default)(i,d(u(u({},this.props),{name:"inputControlClassName",id:n,themeCss:r})))})),g.createElement(p,u({},this.props,{config:{themeCss:r,classNames:[{key:"inputControlClassName",weights:{default:{inner:".".concat(a,"TextareaControl-input")},hover:{inner:".".concat(a,"TextareaControl-input")},focused:{suf:".is-focused",inner:".".concat(a,"TextareaControl-input")},disabled:{suf:".is-disabled",inner:".".concat(a,"TextareaControl-input")}}}],id:n},env:o})))},e.defaultProps={minRows:3,maxRows:20,trimContents:!0,resetValue:"",clearable:!1},a([c,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"handleChange",null),a([c,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"handleFocus",null),a([c,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"handleBlur",null),a([y(),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"render",null),e}(g.Component),F=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),a([l({type:"textarea"})],e)}(x);export{F as TextAreaControlRenderer,x as default};
1
+ import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as e}from"./react-CWkhIp2c.js";import{a as n,c as s,i as r,n as o,o as i,r as a,t as u}from"./tslib.es6-TRdqp4ac.js";import{F as l,J as p,Nn as c,Z as d,ht as h,vi as f,vn as v}from"./esm-DMJQA23h.js";import{ot as m}from"./esm-Dgr2t9Jm.js";import{t as y}from"./StaticHoc-D0pM2bgC.js";var g=/* @__PURE__ */t(e()),C=/* @__PURE__ */t(v()),x=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.inputRef=g.createRef(),e}return r(e,t),e.prototype.doAction=function(t,e,n,s){var r,o;void 0===n&&(n=!1);var i=null==t?void 0:t.actionType,a=this.props,u=a.onChange,l=a.formStore,p=a.store,c=a.name,d=a.resetValue;if("clear"===i)null==u||u(""),this.focus();else if("reset"===i){var h=null!==(o=f(null!==(r=null==l?void 0:l.pristine)&&void 0!==r?r:null==p?void 0:p.pristine,c))&&void 0!==o?o:d;null==u||u(h),this.focus()}else"focus"===i&&this.focus()},e.prototype.focus=function(){var t;null===(t=this.inputRef.current)||void 0===t||t.focus()},e.prototype.handleChange=function(t){var e=this.props,n=e.onChange;(0,e.dispatchEvent)("change",h(this.props,{value:t})),n&&n(t)},e.prototype.handleFocus=function(t){var e=this,s=this.props,r=s.onFocus,i=s.dispatchEvent,a=s.value;this.setState({focused:!0},function(){return o(e,void 0,void 0,function(){var e;return n(this,function(n){switch(n.label){case 0:return[4,i("focus",h(this.props,{value:a}))];case 1:return(null==(e=n.sent())?void 0:e.prevented)||r&&r(t),[2]}})})})},e.prototype.handleBlur=function(t){var e=this,s=this.props,r=s.onBlur,i=s.trimContents,a=s.value,u=s.onChange,l=s.dispatchEvent;this.setState({focused:!1},function(){return o(e,void 0,void 0,function(){var e;return n(this,function(n){switch(n.label){case 0:return i&&a&&"string"==typeof a&&u(a.trim()),[4,l("blur",h(this.props,{value:a}))];case 1:return(null==(e=n.sent())?void 0:e.prevented)||r&&r(t),[2]}})})})},e.prototype.renderStatic=function(t){void 0===t&&(t="-");var e=this.props,n=e.render,s=e.staticSchema,r=void 0===s?{}:s;return n("static-textarea",u({type:"multiline-text",maxRows:r.limit||5},r),{value:t})},e.prototype.render=function(){var t=s(this.props,[]),e=this.props,n=e.id,r=e.themeCss,o=e.env,i=e.className,a=e.classPrefix;return g.createElement(g.Fragment,null,g.createElement(m,u({},t,{forwardRef:this.inputRef,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,className:(0,C.default)(i,d(u(u({},this.props),{name:"inputControlClassName",id:n,themeCss:r})))})),g.createElement(p,u({},this.props,{config:{themeCss:r,classNames:[{key:"inputControlClassName",weights:{default:{inner:".".concat(a,"TextareaControl-input")},hover:{inner:".".concat(a,"TextareaControl-input")},focused:{suf:".is-focused",inner:".".concat(a,"TextareaControl-input")},disabled:{suf:".is-disabled",inner:".".concat(a,"TextareaControl-input")}}}],id:n},env:o})))},e.defaultProps={minRows:3,maxRows:20,trimContents:!0,resetValue:"",clearable:!1},a([c,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"handleChange",null),a([c,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"handleFocus",null),a([c,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"handleBlur",null),a([y(),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"render",null),e}(g.Component),F=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),a([l({type:"textarea"})],e)}(x);export{F as TextAreaControlRenderer,x as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{c as a,i,o as r,r as o,t as s}from"./tslib.es6-TRdqp4ac.js";import{Ii as n,Nn as m,Xr as l,Zr as d,it as f,oi as c,sn as p,ui as u}from"./esm-Byma-6B-.js";import{f as C,ht as y}from"./esm-CM4fvlfi.js";var h,N=/* @__PURE__ */e(t());function g(e){var t=e.items,a=e.mode,i=e.style,r=e.direction,o=e.reverse,m=e.data,f=e.itemTitleSchema,p=e.className,y=e.timeClassName,h=e.titleClassName,g=e.detailClassName,v=e.cardSchema,R=e.name,j=e.itemKeyName,b=e.indexKeyName,x=e.render,E=function(e,t){return"string"==typeof t?l(t,m):t&&x(e,t)},S=(t||[]).map(function(e,t){var a,i,r=e.icon,o=e.iconClassName,l=e.title,p=e.time,C=e.detail,y=e.timeClassName,h=e.titleClassName,N=e.detailClassName,g=e.cardSchema||v,S=c(m,s(s({},u(e)?s({index:t},e):((a={})[R]=e,a)),((i={})[j||"item"]=e,i[b||"index"]=t,i)));return s(s({},e),{iconClassName:o,timeClassName:y,titleClassName:h,detailClassName:N,icon:d(r)?n(r,S,"| raw"):r,title:f?x("".concat(t,"/body"),f,{data:S}):E("title",l),time:E("time",p),detail:E("detail",C),cardNode:g?x("card",g,{data:S}):void 0})});return N.createElement(C,{items:S,direction:r,reverse:o,mode:a,style:i,className:p,timeClassName:y,titleClassName:h,detailClassName:g})}!function(e){e.left="left",e.right="right",e.top="top",e.bottom="bottom",e.alternate="alternate"}(h||(h={}));var v=y({adaptor:function(e){return e.items||e}})(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.config,i=e.items;e.deferLoad,e.loading,e.updateConfig;var r=a(e,["config","items","deferLoad","loading","updateConfig"]),o=t?Array.isArray(t)?t:Object.keys(t).map(function(e){return{time:e,title:t[e]}}):i||[];return N.createElement(g,s({items:o},r))},t}(N.Component)),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remoteRef=void 0,t}return i(t,e),t.prototype.remoteConfigRef=function(e){this.remoteRef=e},t.prototype.componentDidUpdate=function(e){var t=this.props,a=t.source,i=t.data;this.remoteRef&&a!==e.source&&(d(a)&&this.remoteRef.syncConfig()||(p(a,i)?!1!==a.autoRefresh&&this.remoteRef.loadConfig():this.remoteRef.setConfig(void 0)))},t.prototype.render=function(){return N.createElement(v,s({},this.props,{remoteConfigRef:this.remoteConfigRef}))},o([m,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],t.prototype,"remoteConfigRef",null),o([f({type:"timeline"})],t)}(N.Component);export{g as TimelineCmpt,R as TimelineRenderer};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{c as a,i,o as r,r as o,t as s}from"./tslib.es6-TRdqp4ac.js";import{Ii as n,Nn as m,Xr as l,Zr as d,it as f,oi as c,sn as p,ui as u}from"./esm-DMJQA23h.js";import{f as C,ht as y}from"./esm-Dgr2t9Jm.js";var h,N=/* @__PURE__ */e(t());function g(e){var t=e.items,a=e.mode,i=e.style,r=e.direction,o=e.reverse,m=e.data,f=e.itemTitleSchema,p=e.className,y=e.timeClassName,h=e.titleClassName,g=e.detailClassName,v=e.cardSchema,R=e.name,j=e.itemKeyName,b=e.indexKeyName,x=e.render,E=function(e,t){return"string"==typeof t?l(t,m):t&&x(e,t)},S=(t||[]).map(function(e,t){var a,i,r=e.icon,o=e.iconClassName,l=e.title,p=e.time,C=e.detail,y=e.timeClassName,h=e.titleClassName,N=e.detailClassName,g=e.cardSchema||v,S=c(m,s(s({},u(e)?s({index:t},e):((a={})[R]=e,a)),((i={})[j||"item"]=e,i[b||"index"]=t,i)));return s(s({},e),{iconClassName:o,timeClassName:y,titleClassName:h,detailClassName:N,icon:d(r)?n(r,S,"| raw"):r,title:f?x("".concat(t,"/body"),f,{data:S}):E("title",l),time:E("time",p),detail:E("detail",C),cardNode:g?x("card",g,{data:S}):void 0})});return N.createElement(C,{items:S,direction:r,reverse:o,mode:a,style:i,className:p,timeClassName:y,titleClassName:h,detailClassName:g})}!function(e){e.left="left",e.right="right",e.top="top",e.bottom="bottom",e.alternate="alternate"}(h||(h={}));var v=y({adaptor:function(e){return e.items||e}})(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.render=function(){var e=this.props,t=e.config,i=e.items;e.deferLoad,e.loading,e.updateConfig;var r=a(e,["config","items","deferLoad","loading","updateConfig"]),o=t?Array.isArray(t)?t:Object.keys(t).map(function(e){return{time:e,title:t[e]}}):i||[];return N.createElement(g,s({items:o},r))},t}(N.Component)),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.remoteRef=void 0,t}return i(t,e),t.prototype.remoteConfigRef=function(e){this.remoteRef=e},t.prototype.componentDidUpdate=function(e){var t=this.props,a=t.source,i=t.data;this.remoteRef&&a!==e.source&&(d(a)&&this.remoteRef.syncConfig()||(p(a,i)?!1!==a.autoRefresh&&this.remoteRef.loadConfig():this.remoteRef.setConfig(void 0)))},t.prototype.render=function(){return N.createElement(v,s({},this.props,{remoteConfigRef:this.remoteConfigRef}))},o([m,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],t.prototype,"remoteConfigRef",null),o([f({type:"timeline"})],t)}(N.Component);export{g as TimelineCmpt,R as TimelineRenderer};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{i as o,r as s,t as r}from"./tslib.es6-TRdqp4ac.js";import{E as a,J as l,Xr as n,Z as i,it as p}from"./esm-DMJQA23h.js";import"./esm-Dgr2t9Jm.js";import{o as m}from"./_castFunction-CQMNP8A1.js";var c=/* @__PURE__ */e(t()),u=function(e){function t(t){return e.call(this,t)||this}return o(t,e),t.prototype.renderBody=function(){var e=this.props,t=e.render,o=e.classnames,s=e.body,l=e.className,n=e.wrapperComponent,p=e.inline,m=e.style,u=e.data,C=e.themeCss,d=e.wrapperCustomStyle,h=e.id,y=n||(p?"span":"div");return c.createElement(y,{className:o("TooltipWrapper",l,{"TooltipWrapper--inline":p},i(r(r({},this.props),{name:"baseControlClassName",id:h,themeCss:C})),i(r(r({},this.props),{name:"wrapperCustomStyle",id:h,themeCss:d}))),style:a(m,u)},t("body",s))},t.prototype.render=function(){var e=this.props,t=e.classPrefix,o=e.classnames,s=e.tooltipClassName,p=e.tooltipArrowClassName,u=e.tooltipTheme,C=e.container,d=e.placement,h=e.rootClose,y=e.tooltipStyle,f=e.title,w=e.content,v=e.tooltip,N=e.mouseEnterDelay,g=e.mouseLeaveDelay,b=e.trigger,E=e.offset,j=e.showArrow,D=e.disabled,S=e.enterable,T=e.data,A=e.env,x=e.popOverContainer,L=e.wrapperCustomStyle,P=e.id,k=e.themeCss,B={title:n(f,T),content:n(w||v,T),style:a(y,T),placement:d,trigger:b,rootClose:h,tooltipArrowClassName:p,container:void 0!==C?C:x||(null==A?void 0:A.getModalContainer),tooltipTheme:u,tooltipClassName:o(s,i(r(r({},this.props),{name:"tooltipControlClassName",id:P,themeCss:k}))),mouseEnterDelay:N,mouseLeaveDelay:g,offset:E,showArrow:j,disabled:D,enterable:S,filterHtml:A.filterHtml};return c.createElement(c.Fragment,null,c.createElement(m,{classPrefix:t,classnames:o,tooltip:B},this.renderBody()),c.createElement(l,r({},this.props,{config:{wrapperCustomStyle:L,id:P,themeCss:k,classNames:[{key:"baseControlClassName"},{key:"tooltipControlClassName"}]},env:A})))},t.defaultProps={placement:"top",trigger:"hover",rootClose:!0,mouseEnterDelay:0,mouseLeaveDelay:200,inline:!1,wrap:!1,tooltipTheme:"light"},t}(c.Component),C=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),s([p({type:"tooltip-wrapper"})],t)}(u);export{C as TooltipWrapperRenderer,u as default};
@@ -1 +1 @@
1
- import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{a as n,i as s,n as o,o as r,r as i,t as a}from"./tslib.es6-TRdqp4ac.js";import{$n as p,E as l,J as u,Kr as d,Nn as c,Qr as h,Xr as m,Z as y,ii as v,it as g}from"./esm-Byma-6B-.js";import{R as f}from"./esm-CM4fvlfi.js";var C=/* @__PURE__ */t(e()),w=/* @__PURE__ */t(h()),b=function(t){function e(e){var n=t.call(this,e)||this;return n.sn=0,n.state={content:n.getContent()},n.mounted=!0,n}return s(e,t),e.prototype.componentDidUpdate=function(t){var e=this;!["tpl","html","text","raw","data","placeholder"].some(function(n){return!Object.is(t[n],e.props[n])})&&Object.is(p(t),p(this.props))||this.updateContent()},e.prototype.componentDidMount=function(){this.updateContent()},e.prototype.componentWillUnmount=function(){this.mounted=!1},e.prototype.updateContent=function(){return o(this,void 0,void 0,function(){var t,e;return n(this,function(n){switch(n.label){case 0:return t=++this.sn,[4,this.getAsyncContent()];case 1:return e=n.sent(),t!==this.sn||this.mounted&&this.setState({content:e}),[2]}})})},e.prototype.getContent=function(){var t=this.props,e=t.tpl,n=t.html,s=t.text,o=t.raw,r=t.data,i=t.placeholder,a=p(this.props);return o||(n?m(n,r):e?m(e,r):s?v(m(s,r)):null==a||""===a?'<span class="text-muted">'.concat(i,"</span>"):"string"==typeof a?a:JSON.stringify(a))},e.prototype.getAsyncContent=function(){return o(this,void 0,void 0,function(){var t,e,s,o,r,i,a,l,u;return n(this,function(n){switch(n.label){case 0:return t=this.props,e=t.tpl,s=t.html,o=t.text,r=t.data,i=t.raw,a=t.placeholder,l=p(this.props),i?[2,i]:[3,1];case 1:return s?[2,d(s,r)]:[3,2];case 2:return e?[2,d(e,r)]:[3,3];case 3:return o?(u=v,[4,d(o,r)]):[3,5];case 4:return[2,u.apply(void 0,[n.sent()])];case 5:return[2,null==l||""===l?'<span class="text-muted">'.concat(a,"</span>"):"string"==typeof l?l:JSON.stringify(l)]}})})},e.prototype.getTitle=function(t){var e;if(!this.props.showNativeTitle)return"";var n="string"==typeof t?t:"",s=(new DOMParser).parseFromString(t,"text/html");return(null===(e=null==s?void 0:s.body)||void 0===e?void 0:e.textContent)&&(n=s.body.textContent),n},e.prototype.handleClick=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.handleMouseEnter=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.handleMouseLeave=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.render=function(){var t,e=this.props,n=e.className,s=e.wrapperComponent,o=e.inline,r=e.classnames,i=e.style,p=e.maxLine,d=e.showNativeTitle,c=e.data,h=e.id,m=e.wrapperCustomStyle,v=e.env,g=e.themeCss,f=e.testIdBuilder,b=s||(o?"span":"div"),x=this.state.content,E={},M="";return p>0&&(M="max-line",E.WebkitLineClamp=+p),C.createElement(b,a({className:r("TplField fr-view",n,y(a(a({},this.props),{name:"baseControlClassName",id:h,themeCss:g})),y(a(a({},this.props),{name:"wrapperCustomStyle",id:h,themeCss:m}))),style:l(i,c)},d?{title:this.getTitle(x)}:{},{onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},null===(t=null==f?void 0:f.getChild("tpl"))||void 0===t?void 0:t.getTestId()),C.createElement("span",{className:M?r(M):void 0,style:(0,w.default)(E)?void 0:E,dangerouslySetInnerHTML:{__html:v.filterHtml(x)}}),C.createElement(u,a({},this.props,{config:{wrapperCustomStyle:m,id:h,themeCss:g,classNames:[{key:"baseControlClassName"}]},env:v})))},e.defaultProps={inline:!0,placeholder:""},i([c,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",Promise)],e.prototype,"updateContent",null),i([c,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"getContent",null),i([c,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",Promise)],e.prototype,"getAsyncContent",null),i([c,r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",void 0)],e.prototype,"getTitle",null),i([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"handleClick",null),i([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"handleMouseEnter",null),i([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"handleMouseLeave",null),e}(C.Component),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),i([g({type:"tpl",alias:["html"],name:"tpl"}),f],e)}(b);export{b as Tpl,x as TplRenderer};
1
+ import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as e}from"./react-CWkhIp2c.js";import{a as n,i as s,n as o,o as r,r as i,t as a}from"./tslib.es6-TRdqp4ac.js";import{$n as p,E as l,J as u,Kr as d,Nn as c,Qr as h,Xr as m,Z as y,ii as v,it as g}from"./esm-DMJQA23h.js";import{R as f}from"./esm-Dgr2t9Jm.js";var C=/* @__PURE__ */t(e()),w=/* @__PURE__ */t(h()),b=function(t){function e(e){var n=t.call(this,e)||this;return n.sn=0,n.state={content:n.getContent()},n.mounted=!0,n}return s(e,t),e.prototype.componentDidUpdate=function(t){var e=this;!["tpl","html","text","raw","data","placeholder"].some(function(n){return!Object.is(t[n],e.props[n])})&&Object.is(p(t),p(this.props))||this.updateContent()},e.prototype.componentDidMount=function(){this.updateContent()},e.prototype.componentWillUnmount=function(){this.mounted=!1},e.prototype.updateContent=function(){return o(this,void 0,void 0,function(){var t,e;return n(this,function(n){switch(n.label){case 0:return t=++this.sn,[4,this.getAsyncContent()];case 1:return e=n.sent(),t!==this.sn||this.mounted&&this.setState({content:e}),[2]}})})},e.prototype.getContent=function(){var t=this.props,e=t.tpl,n=t.html,s=t.text,o=t.raw,r=t.data,i=t.placeholder,a=p(this.props);return o||(n?m(n,r):e?m(e,r):s?v(m(s,r)):null==a||""===a?'<span class="text-muted">'.concat(i,"</span>"):"string"==typeof a?a:JSON.stringify(a))},e.prototype.getAsyncContent=function(){return o(this,void 0,void 0,function(){var t,e,s,o,r,i,a,l,u;return n(this,function(n){switch(n.label){case 0:return t=this.props,e=t.tpl,s=t.html,o=t.text,r=t.data,i=t.raw,a=t.placeholder,l=p(this.props),i?[2,i]:[3,1];case 1:return s?[2,d(s,r)]:[3,2];case 2:return e?[2,d(e,r)]:[3,3];case 3:return o?(u=v,[4,d(o,r)]):[3,5];case 4:return[2,u.apply(void 0,[n.sent()])];case 5:return[2,null==l||""===l?'<span class="text-muted">'.concat(a,"</span>"):"string"==typeof l?l:JSON.stringify(l)]}})})},e.prototype.getTitle=function(t){var e;if(!this.props.showNativeTitle)return"";var n="string"==typeof t?t:"",s=(new DOMParser).parseFromString(t,"text/html");return(null===(e=null==s?void 0:s.body)||void 0===e?void 0:e.textContent)&&(n=s.body.textContent),n},e.prototype.handleClick=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.handleMouseEnter=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.handleMouseLeave=function(t){var e=this.props;(0,e.dispatchEvent)(t,e.data)},e.prototype.render=function(){var t,e=this.props,n=e.className,s=e.wrapperComponent,o=e.inline,r=e.classnames,i=e.style,p=e.maxLine,d=e.showNativeTitle,c=e.data,h=e.id,m=e.wrapperCustomStyle,v=e.env,g=e.themeCss,f=e.testIdBuilder,b=s||(o?"span":"div"),x=this.state.content,E={},M="";return p>0&&(M="max-line",E.WebkitLineClamp=+p),C.createElement(b,a({className:r("TplField fr-view",n,y(a(a({},this.props),{name:"baseControlClassName",id:h,themeCss:g})),y(a(a({},this.props),{name:"wrapperCustomStyle",id:h,themeCss:m}))),style:l(i,c)},d?{title:this.getTitle(x)}:{},{onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},null===(t=null==f?void 0:f.getChild("tpl"))||void 0===t?void 0:t.getTestId()),C.createElement("span",{className:M?r(M):void 0,style:(0,w.default)(E)?void 0:E,dangerouslySetInnerHTML:{__html:v.filterHtml(x)}}),C.createElement(u,a({},this.props,{config:{wrapperCustomStyle:m,id:h,themeCss:g,classNames:[{key:"baseControlClassName"}]},env:v})))},e.defaultProps={inline:!0,placeholder:""},i([c,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",Promise)],e.prototype,"updateContent",null),i([c,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],e.prototype,"getContent",null),i([c,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",Promise)],e.prototype,"getAsyncContent",null),i([c,r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",void 0)],e.prototype,"getTitle",null),i([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"handleClick",null),i([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"handleMouseEnter",null),i([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],e.prototype,"handleMouseLeave",null),e}(C.Component),x=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),i([g({type:"tpl",alias:["html"],name:"tpl"}),f],e)}(b);export{b as Tpl,x as TplRenderer};
@@ -0,0 +1 @@
1
+ import{o as e,r as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as n}from"./react-CWkhIp2c.js";import{a as r,i as a,n as l,o,r as i,t as s}from"./tslib.es6-TRdqp4ac.js";import{Bi as u,Gn as p,Jn as d,Nn as c,P as h,Rr as v,Tn as g,Tr as m,Zr as y,_i as f,ai as b,bt as C,fn as R,ht as O,kt as S,oa as F,oi as A,qn as I,qr as j,rr as w,sn as P,vi as T,w as M,xt as N}from"./esm-DMJQA23h.js";import{Y as k}from"./esm-Dgr2t9Jm.js";import{a as x}from"./_castFunction-CQMNP8A1.js";import{t as E}from"./StaticHoc-D0pM2bgC.js";var B=/* @__PURE__ */t({BaseTransferRenderer:()=>H,TransferRender:()=>U,default:()=>q,getCustomFilterOption:()=>_}),D=/* @__PURE__ */e(n()),V=/* @__PURE__ */e(g()),L=/* @__PURE__ */e(S()),_=function(e){switch(typeof e){case"string":return R(e,"options","inputValue","option");case"function":return e;default:return null}},H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.reload=function(e,t){var n=this.props.reloadOptions;n&&n(e,t)},t.prototype.handleChange=function(e,t){return l(this,void 0,void 0,function(){var n,a,l,o,i,u,p,c,h,g,m,y,f,b,R,S,F,A,j;return r(this,function(r){switch(r.label){case 0:return n=this.props,a=n.onChange,l=n.joinValues,o=n.delimiter,i=n.valueField,u=n.extractValue,p=n.options,c=n.dispatchEvent,h=n.setOptions,g=n.selectMode,m=n.deferApi,y=n.deferField,f=void 0===y?"defer":y,b=e,R=p.concat(),S=e,Array.isArray(e)?(b=e.map(function(e){var n=d(p,N(e[i||"value"],i||"value"),{resolve:C(i),value:e[i]||"value"});if(n){if(t){var r=w(R,n);R=v(R,n,1,s(s({},r),e))}}else R.push(s(s({},e),{visible:!1}));return l||u?e[i||"value"]:e}),l&&(b=b.join(o||","))):e&&(b=l||u?e[i||"value"]:e,(F=d(p,N(e[i||"value"],i||"value")))?t&&(A=w(R,F),R=v(R,F,1,s(s({},A),e))):R.push(s(s({},e),{visible:!1}))),(1==!("tree"!==g||!m&&!I(p,function(e){return e.deferApi||e[f]}))||R.length>p.length||t)&&h(R,!0),[4,c("change",O(this.props,{value:b,options:p,items:p,selectedItems:S}))];case 1:return(null==(j=r.sent())?void 0:j.prevented)||a(b),[2]}})})},t.prototype.option2value=function(e){return e},t.prototype.getResult=function(e){return e.data.options||e.data.items||e.data},t.prototype.handleSearch=function(e,t,n){return l(this,void 0,void 0,function(){var a,l,o,i,d,c,h,v,g,y,f,b,C,R,O;return r(this,function(r){switch(r.label){case 0:if(a=this.props,l=a.searchApi,o=a.options,i=a.labelField,d=a.valueField,c=a.env,h=a.data,v=a.translate,g=a.filterOption,!l)return[3,5];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,c.fetcher(l,A(h,s({term:e},n||{})),{cancelExecutor:t})];case 2:if(!(y=r.sent()).ok)throw new Error(v(y.msg||"networkError"));if(f=this.getResult(y),!Array.isArray(f))throw new Error(v("CRUD.invalidArray"));return b={},n&&(b={page:y.data.page,perPage:n.perPage,total:y.data.count}),[2,s({items:m(f,function(e){var t=null,n=e[d||"value"];return Array.isArray(o)&&null!=n&&(t=(0,V.default)(o,N(n,d)),(null==e?void 0:e.children)&&(t=s(s({},t),{children:e.children}))),t||e})},b)];case 3:return C=r.sent(),c.isCancel(C)||l.silent||c.notify("error",C.message),[2,{items:[]}];case 4:return[3,6];case 5:return e?(R={keys:[i||"label",d||"value"]},g?(O=_(g))?[2,{items:O(o,e,R)}]:(c.notify("error","自定义检索函数不符合要求"),[2,{items:[]}]):[2,{items:p(o,function(t,n,r,a){return!!(Array.isArray(t.children)&&t.children.length||u([t].concat(a),e,{keys:[i||"label",d||"value"],threshold:u.rankings.CONTAINS}).length)},0,!0)}]):[2,{items:o}];case 6:return[2]}})})},t.prototype.handleResultSearch=function(e,t){var n=this.props,r=n.valueField,a=n.labelField,l=b(e),o=t[a||"label"],i=t[r||"value"];return l.test(o)||l.test(i)},t.prototype.handlePageChange=function(e,t,n){var r=this.props,a=r.source,l=r.data,o=r.formItem,i=r.onChange,u=A(l,s({page:null!=e?e:1,perPage:null!=t?t:10},n?{pageDir:n}:{}));o&&F(o)&&(y(a)?o.loadOptionsFromDataScope(a,u,i):P(a,u)&&o.loadOptions(a,u,void 0,!1,i,!1))},t.prototype.optionItemRender=function(e,t){var n=this.props,r=n.menuTpl,a=n.render,l=n.data;return a("item/".concat(t.index),r,{data:A(A(l,t),e)})},t.prototype.resultItemRender=function(e,t){var n=this.props,r=n.valueTpl,a=n.render,l=n.data;return a("value/".concat(t.index),r,{onChange:t.onChange,data:A(A(l,t),e)})},t.prototype.renderCell=function(e,t,n,r){var a=this.props,l=a.render,o=a.data,i=a.classnames,u=a.showInvalidMatch;return l("cell/".concat(n,"/").concat(r),s({type:"text",className:i({"is-invalid":!!u&&(null==t?void 0:t.__unmatched)})},e),{value:f(e.name,t),data:A(o,t)})},t.prototype.getRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.tranferRef=e},t.prototype.onSelectAll=function(e){var t=this.props,n=t.dispatchEvent,r=t.data;n("selectAll",A(r,{items:e}))},t.prototype.doAction=function(e,t,n){var r,a,l,o,i,s=this.props,u=s.resetValue,p=s.onChange,d=s.formStore,c=s.store,h=s.name;switch(e.actionType){case"clear":null==p||p("");break;case"reset":null==p||p(null!==(l=null!==(a=T(null!==(r=null==d?void 0:d.pristine)&&void 0!==r?r:null==c?void 0:c.pristine,h))&&void 0!==a?a:u)&&void 0!==l?l:"");break;case"selectAll":null===(o=this.tranferRef)||void 0===o||o.selectAll();break;case"clearSearch":null===(i=this.tranferRef)||void 0===i||i.clearSearch(t)}},t.prototype.render=function(){var e,t,n=this.props,r=n.className;n.style;var a=n.classnames,l=n.selectedOptions,o=n.showArrow,i=n.sortable,u=n.selectMode,p=n.columns,d=n.loading,c=n.searchable,h=n.searchResultMode,v=n.searchResultColumns,g=n.deferLoad,m=n.leftMode,y=n.rightMode,f=n.disabled,b=n.selectTitle,C=n.resultTitle,R=n.menuTpl,O=n.valueTpl,S=n.searchPlaceholder,F=n.resultListModeFollowSelect,A=void 0!==F&&F,I=n.resultSearchPlaceholder,w=n.resultSearchable,P=void 0!==w&&w,T=n.statistics,N=n.labelField,E=n.valueField,B=n.virtualThreshold,V=n.itemHeight,_=n.loadingConfig,H=n.showInvalidMatch,U=n.onlyChildren,q=n.mobileUI,W=n.noResultsText,G=n.pagination,J=n.formItem,Y=n.env,Z=n.popOverContainer,z=n.data,K=n.autoCheckChildren,Q=void 0===K||K,X=n.initiallyOpen,$=void 0===X||X,ee=n.testIdBuilder,te=this.props,ne=te.options,re=te.leftOptions,ae=te.leftDefaultValue;return"associated"===u&&ne&&ne.length&&ne[0].leftOptions&&Array.isArray(ne[0].children)&&(re=ne[0].leftOptions,ae=null!==(e=ne[0].leftDefaultValue)&&void 0!==e?e:ae,ne=ne[0].children),D.createElement("div",{className:a("TransferControl",r)},D.createElement(k,{onlyChildren:U,value:l,options:ne,accumulatedOptions:null!==(t=null==J?void 0:J.accumulatedOptions)&&void 0!==t?t:[],disabled:f,onChange:this.handleChange,option2value:this.option2value,sortable:i,showArrow:o,selectMode:u,searchResultMode:h,searchResultColumns:v,columns:p,onSearch:c?this.handleSearch:void 0,onDeferLoad:g,leftOptions:re,leftMode:m,rightMode:y,cellRender:this.renderCell,selectTitle:b,resultTitle:C,resultListModeFollowSelect:A,onResultSearch:this.handleResultSearch,searchPlaceholder:S,resultSearchable:P,resultSearchPlaceholder:I,statistics:T,labelField:N,valueField:E,optionItemRender:R?this.optionItemRender:void 0,resultItemRender:O?this.resultItemRender:void 0,onSelectAll:this.onSelectAll,onRef:this.getRef,virtualThreshold:B,itemHeight:M(V)>0?M(V):void 0,loadingConfig:_,showInvalidMatch:H,mobileUI:q,noResultsText:W,pagination:s(s({},(0,L.default)(G,["className","layout","perPageAvailable","popOverContainerSelector"])),{enable:(G&&void 0!==G.enable?!!("string"==typeof G.enable?j(G.enable,z):G.enable):!!(null==J?void 0:J.enableSourcePagination))&&(!u||"list"===u||"table"===u)&&ne.length>0,maxButtons:Number.isInteger(null==G?void 0:G.maxButtons)?G.maxButtons:5,page:null==J?void 0:J.sourcePageNum,perPage:null==J?void 0:J.sourcePerPageNum,total:null==J?void 0:J.sourceTotalNum,popOverContainer:null!=Z?Z:null==Y?void 0:Y.getModalContainer}),onPageChange:this.handlePageChange,initiallyOpen:$,autoCheckChildren:Q,testIdBuilder:ee}),D.createElement(x,{overlay:!0,key:"info",loadingConfig:_,show:d}))},t.defaultProps={multiple:!0},i([c,o("design:type",Function),o("design:paramtypes",[Object,Boolean]),o("design:returntype",Promise)],t.prototype,"handleChange",null),i([c,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"option2value",null),i([c,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"getResult",null),i([c,o("design:type",Function),o("design:paramtypes",[String,Function,Object]),o("design:returntype",Promise)],t.prototype,"handleSearch",null),i([c,o("design:type",Function),o("design:paramtypes",[String,Object]),o("design:returntype",void 0)],t.prototype,"handleResultSearch",null),i([c,o("design:type",Function),o("design:paramtypes",[Number,Number,String]),o("design:returntype",void 0)],t.prototype,"handlePageChange",null),i([c,o("design:type",Function),o("design:paramtypes",[Object,Object]),o("design:returntype",void 0)],t.prototype,"optionItemRender",null),i([c,o("design:type",Function),o("design:paramtypes",[Object,Object]),o("design:returntype",void 0)],t.prototype,"resultItemRender",null),i([c,o("design:type",Function),o("design:paramtypes",[Object,Object,Number,Number]),o("design:returntype",void 0)],t.prototype,"renderCell",null),i([c,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",void 0)],t.prototype,"getRef",null),i([c,o("design:type",Function),o("design:paramtypes",[Array]),o("design:returntype",void 0)],t.prototype,"onSelectAll",null),i([E(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"render",null),t}(D.Component),U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t}(H),q=h({type:"transfer"})(U);export{B as n,H as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a as o,i as n,n as l,o as i,r,t as a}from"./tslib.es6-TRdqp4ac.js";import{Nn as s,P as d,ht as p,kt as u,qr as c,vi as h,w as v}from"./esm-DMJQA23h.js";import{S as m}from"./esm-Dgr2t9Jm.js";import{a as f}from"./_castFunction-CQMNP8A1.js";import{t as g}from"./StaticHoc-D0pM2bgC.js";import{t as y}from"./Transfer-B0VVG1X5.js";var C=/* @__PURE__ */e(t()),b=/* @__PURE__ */e(u()),T=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.dispatchEvent=function(e){var t=this.props,o=t.dispatchEvent,n=t.value;o(e,p(this.props,{value:n}))},t.prototype.onItemClick=function(e){return l(this,void 0,void 0,function(){var t;return o(this,function(o){switch(o.label){case 0:return[4,(0,this.props.dispatchEvent)("itemClick",p(this.props,{item:e}))];case 1:return null==(t=o.sent())||t.prevented,[2]}})})},t.prototype.doAction=function(e){var t,o,n,l=this.props,i=l.resetValue,r=l.onChange,a=l.formStore,s=l.store,d=l.name;switch(e.actionType){case"clear":null==r||r("");break;case"reset":null==r||r(null!==(n=null!==(o=h(null!==(t=null==a?void 0:a.pristine)&&void 0!==t?t:null==s?void 0:s.pristine,d))&&void 0!==o?o:i)&&void 0!==n?n:"")}},t.prototype.render=function(){var e,t=this,o=this.props,n=o.className;o.style;var l=o.classnames,i=o.selectedOptions,r=o.sortable,s=o.loading,d=o.searchable,p=o.searchResultMode,u=o.showArrow,h=o.deferLoad,g=o.disabled,y=o.selectTitle,T=o.resultTitle,P=o.pickerSize,k=o.columns,I=o.leftMode,O=o.selectMode,w=o.borderMode,F=o.itemHeight,M=o.virtualThreshold,j=o.loadingConfig,E=o.labelField,N=void 0===E?"label":E,S=o.valueField,x=void 0===S?"value":S,A=o.deferField,R=void 0===A?"defer":A,B=o.menuTpl,D=o.valueTpl,H=o.mobileUI,V=o.env,z=o.maxTagCount,L=o.overflowTagPopover,U=o.pagination,q=o.formItem,J=o.data,_=o.popOverContainer,G=o.placeholder,K=o.onlyChildren,Q=o.autoCheckChildren,W=void 0===Q||Q,X=o.initiallyOpen,Y=void 0===X||X,Z=o.searchPlaceholder,$=this.props,ee=$.options,te=$.leftOptions,oe=$.leftDefaultValue;return"associated"===O&&ee&&ee.length&&ee[0].leftOptions&&Array.isArray(ee[0].children)&&(te=ee[0].leftOptions,oe=null!==(e=ee[0].leftDefaultValue)&&void 0!==e?e:oe,ee=ee[0].children),C.createElement("div",{className:l("TransferControl",n)},C.createElement(m,{placeholder:G,borderMode:w,selectMode:O,onlyChildren:K,value:i,disabled:g,options:ee,onItemClick:this.onItemClick,onChange:this.handleChange,option2value:this.option2value,sortable:r,searchResultMode:p,onSearch:d?this.handleSearch:void 0,searchPlaceholder:Z,showArrow:u,onDeferLoad:h,selectTitle:y,resultTitle:T,size:P,columns:k,leftMode:I,leftOptions:te,optionItemRender:B?this.optionItemRender:void 0,resultItemRender:D?this.resultItemRender:void 0,onFocus:function(){return t.dispatchEvent("focus")},onBlur:function(){return t.dispatchEvent("blur")},labelField:N,valueField:x,deferField:R,itemHeight:v(F)>0?v(F):void 0,virtualThreshold:M,mobileUI:H,popOverContainer:null==V?void 0:V.getModalContainer,maxTagCount:z,overflowTagPopover:L,pagination:a(a({},(0,b.default)(U,["layout","perPageAvailable","popOverContainerSelector"])),{className:null==U?void 0:U.className,enable:(U&&void 0!==U.enable?!!("string"==typeof U.enable?c(U.enable,J):U.enable):!!(null==q?void 0:q.enableSourcePagination))&&(!O||"list"===O||"table"===O)&&ee.length>0,maxButtons:Number.isInteger(null==U?void 0:U.maxButtons)?null==U?void 0:U.maxButtons:5,page:null==q?void 0:q.sourcePageNum,perPage:null==q?void 0:q.sourcePerPageNum,total:null==q?void 0:q.sourceTotalNum,popOverContainer:null!=_?_:null==V?void 0:V.getModalContainer}),onPageChange:this.handlePageChange,autoCheckChildren:W,initiallyOpen:Y}),C.createElement(f,{loadingConfig:j,overlay:!0,key:"info",show:s}))},r([s,i("design:type",Function),i("design:paramtypes",[String]),i("design:returntype",void 0)],t.prototype,"dispatchEvent",null),r([s,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",Promise)],t.prototype,"onItemClick",null),r([g(),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],t.prototype,"render",null),r([d({type:"transfer-picker"})],t)}(y);export{T as TransferPickerRenderer};
@@ -0,0 +1 @@
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a as n,i as o,n as i,o as r,r as a,t as s}from"./tslib.es6-TRdqp4ac.js";import{Bi as l,J as p,Jn as d,L as u,Nn as c,P as h,R as m,St as v,Xt as f,Z as y,ht as g,ir as C,lr as b,oi as O,qn as I,sn as V,vi as F}from"./esm-DMJQA23h.js";import{t as T}from"./react-dom-CCQ2gErg.js";import{q as A,rt as j}from"./esm-Dgr2t9Jm.js";import{a as w,n as P}from"./_castFunction-CQMNP8A1.js";import{t as R}from"./StaticHoc-D0pM2bgC.js";var S=/* @__PURE__ */e(t()),E=/* @__PURE__ */e(f()),L=/* @__PURE__ */e(T()),x=function(e){function t(t){var n=e.call(this,t)||this;return n.container=S.createRef(),n.input=S.createRef(),n.cache={},n.targetRef=function(e){return n.target=e?(0,L.findDOMNode)(e):null},n.sourceLoaded=!1,n.state={inputValue:"",tempValue:"",isOpened:!1},n.open=n.open.bind(n),n.close=n.close.bind(n),n.handleChange=n.handleChange.bind(n),n.handleTempChange=n.handleTempChange.bind(n),n.handleConfirm=n.handleConfirm.bind(n),n.clearValue=n.clearValue.bind(n),n.handleFocus=n.handleFocus.bind(n),n.handleBlur=n.handleBlur.bind(n),n.handleKeyPress=n.handleKeyPress.bind(n),n.handleInputChange=(0,E.default)(n.handleInputChange.bind(n),150,{trailing:!0,leading:!1}),n.handleInputKeyDown=n.handleInputKeyDown.bind(n),n.loadRemote=(0,E.default)(n.loadRemote.bind(n),250,{trailing:!0,leading:!1}),n}return o(t,e),t.prototype.componentDidMount=function(){this.loadRemote("")},t.prototype.componentWillUnmount=function(){this.sourceLoaded=!1},t.prototype.open=function(e){this.props.disabled||this.setState({isOpened:!0},e)},t.prototype.close=function(){var e=this;this.setState({isOpened:!1,inputValue:this.props.multiple?this.state.inputValue:""},function(){return e.loadRemote(e.state.inputValue)})},t.prototype.resolveOptions=function(){var e=this.props,t=e.options,n=e.searchable,o=e.autoComplete;return!V(o)&&n&&this.state.inputValue?this.filterOptions(t,this.state.inputValue):t},t.prototype.resolveOption=function(e,t){var n=this;return I(e,function(e){var o=n.props.valueField||"value";return(b(e,o)?e[o]:"")===t})},t.prototype.handleFocus=function(e){var t=this.props,n=t.dispatchEvent,o=t.value,i=this.resolveOptions(),r=this.resolveOption(i,o);n("focus",g(this.props,{value:o,item:r,items:i}))},t.prototype.handleBlur=function(e){var t=this.props,n=t.dispatchEvent,o=t.value,i=this.resolveOptions(),r=this.resolveOption(i,o);n("blur",g(this.props,{value:o,item:r,items:i}))},t.prototype.handleKeyPress=function(e){" "===e.key&&e.shiftKey&&(this.handleOutClick(e),e.preventDefault())},t.prototype.validate=function(){var e=this.props,t=e.value,n=e.minLength,o=e.maxLength,i=e.delimiter,r=Array.isArray(t)?t:(t?String(t):"").split(i||",");return n&&r.length<n?"已选择数量低于设定的最小个数".concat(n,",请选择更多的选项。"):o&&r.length>o?"已选择数量超出设定的最大个数".concat(o,",请取消选择超出的选项。"):void 0},t.prototype.removeItem=function(e,t){var n=this.props,o=n.selectedOptions,i=n.joinValues,r=n.extractValue,a=n.delimiter,s=n.valueField,l=n.onChange,p=n.disabled;if(t&&t.stopPropagation(),!p){var d=o.concat();d.splice(e,1);var u=d;i?u=d.map(function(e){return e[s||"value"]}).join(a||","):r&&(u=d.map(function(e){return e[s||"value"]})),l(u)}},t.prototype.handleChange=function(e){var t=this;this.props.multiple||this.close(),this.setState({inputValue:""},function(){return t.resultChangeEvent(e)})},t.prototype.handleTempChange=function(e){this.setState({tempValue:e})},t.prototype.handleConfirm=function(){var e=this;this.close(),this.setState({inputValue:""},function(){return e.resultChangeEvent(e.state.tempValue)})},t.prototype.handleInputChange=function(e){var t=this,n=this.props,o=n.autoComplete,i=n.data;this.setState({inputValue:e},V(o,i)?function(){return t.loadRemote(t.state.inputValue)}:void 0)},t.prototype.handleInputKeyDown=function(e){var t=this.state.inputValue,n=this.props,o=n.multiple,i=n.selectedOptions;"Backspace"===e.key&&!t&&i.length&&o&&this.removeItem(i.length-1)},t.prototype.resetValue=function(){var e,t,n=this.props,o=n.onChange,i=n.resetValue,r=n.formStore,a=n.store,s=n.name;o(null!==(t=F(null!==(e=null==r?void 0:r.pristine)&&void 0!==e?e:null==a?void 0:a.pristine,s))&&void 0!==t?t:i)},t.prototype.clearValue=function(){var e=this.props,t=e.onChange,n=e.resetValue;t(void 0===n?"":n)},t.prototype.filterOptions=function(e,t){var n=this,o=this.props,i=o.labelField,r=o.valueField;return e.map(function(e){if((e=s({},e)).visible=!!l([e],t,{keys:[i||"label",r||"value"],threshold:l.rankings.CONTAINS}).length,!e.visible&&e.children){e.children=n.filterOptions(e.children,t);var o=e.children.filter(function(e){return e.visible}).length;e.visible=!!o}return e.visible&&(e.collapsed=!1),e})},t.prototype.loadRemote=function(e){return i(this,void 0,void 0,function(){var t,o,i,r,a,l,p,d,u,c;return n(this,function(n){switch(n.label){case 0:if(t=this.props,o=t.autoComplete,i=t.env,r=t.data,a=t.setOptions,l=t.setLoading,p=t.source,!V(o,r)||!e&&V(p)&&!this.sourceLoaded)return this.sourceLoaded=!0,[2];if(!i||!i.fetcher)throw new Error("fetcher is required");if(this.cache[e]||~e.indexOf("'"))return u=this.cache[e]||[],c=this.mergeOptions(u),a(c),[2,Promise.resolve({options:c})];l(!0),n.label=1;case 1:return n.trys.push([1,,3,4]),[4,i.fetcher(o,s(s({},r),{term:e,value:e}))];case 2:return d=n.sent(),u=d.data&&d.data.options||d.data||[],this.cache[e]=u,c=this.mergeOptions(u),a(c),[2,{options:c}];case 3:return l(!1),[7];case 4:return[2]}})})},t.prototype.mergeOptions=function(e){var t=this.props.selectedOptions,n=v(e).concat();return Array.isArray(t)&&t.length&&t.forEach(function(e){I(n,function(t){return t.value==e.value})||n.push(s({},e))}),n},t.prototype.reload=function(e,t){var n=this.props.reloadOptions;n&&n(e,t)},t.prototype.handleOutClick=function(e){e.defaultPrevented||this.setState({isOpened:!0})},t.prototype.handleResultChange=function(e){var t=this.props,n=t.joinValues,o=t.extractValue,i=t.delimiter,r=t.valueField,a=t.multiple,s=Array.isArray(e)?e.concat():[];a||s.length?((n||o)&&(s=e.map(function(e){return e[r||"value"]})),n&&(s=s.join(i||",")),this.resultChangeEvent(s)):this.resultChangeEvent("")},t.prototype.doAction=function(e,t,n){var o,i,r,a,s;"clear"===e.actionType?this.clearValue():"reset"===e.actionType?this.resetValue():"add"===e.actionType?this.addItemFromAction(null===(o=e.args)||void 0===o?void 0:o.item,null===(i=e.args)||void 0===i?void 0:i.parentValue):"edit"===e.actionType?this.editItemFromAction(null===(r=e.args)||void 0===r?void 0:r.item,null===(a=e.args)||void 0===a?void 0:a.originValue):"delete"===e.actionType?this.deleteItemFromAction(null===(s=e.args)||void 0===s?void 0:s.value):"reload"===e.actionType&&this.reload()},t.prototype.addItemFromAction=function(e,t){var n=this.props,o=n.onAdd,i=n.options,r=n.valueField,a=d(i,function(e){var n=r||"value";return(b(e,n)?e[n]:"")===t})||[];o&&o(a.concat(0),e,!0)},t.prototype.editItemFromAction=function(e,t){var n=this.props,o=n.onEdit,i=n.options,r=this.resolveOption(i,t);o&&r&&o(s(s({},e),{originValue:t}),r,!0)},t.prototype.deleteItemFromAction=function(e){var t=this.props,n=t.onDelete,o=t.options,i=this.resolveOption(o,e);n&&i&&n(i)},t.prototype.resultChangeEvent=function(e){return i(this,void 0,void 0,function(){var t,o,i,r,a,s;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.onChange,i=t.dispatchEvent,r=this.resolveOptions(),a=this.resolveOption(r,e),[4,i("change",g(this.props,{value:e,item:a,items:this.resolveOptions()}))];case 1:return(null==(s=n.sent())?void 0:s.prevented)||o&&o(e),[2]}})})},t.prototype.handleNodeClick=function(e){return i(this,void 0,void 0,function(){var t,o,i,r;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.dispatchEvent,i=t.data,[4,o("itemClick",O(i,{item:e}))];case 1:return null==(r=n.sent())||r.prevented,[2]}})})},t.prototype.renderOptionItem=function(e,t){var n=this.props,o=n.menuTpl,i=n.render,r=n.data;return i("option/".concat(t.index),o,{data:O(O(r,s({},t)),e)})},t.prototype.renderItem=function(e){var t=this.props,n=t.labelField,o=t.options;if(t.hideNodePathLabel)return e[n||"label"];var i=C(o,e,!0);return"".concat(i?i.map(function(e){return"".concat(e[n||"label"])}).join(" / "):e[n||"label"])},t.prototype.domRef=function(e){this.treeRef=e},t.prototype.renderOuter=function(){var e=this.props,t=e.value,n=e.enableNodePath,o=e.pathSeparator,i=void 0===o?"/":o,r=e.disabled,a=e.joinValues,l=e.extractValue,p=e.delimiter;e.placeholder;var d=e.options,u=e.multiple,c=e.valueField,h=e.initiallyOpen,m=e.unfoldedLevel,v=e.withChildren,f=e.rootLabel,g=e.cascade,C=e.rootValue,b=e.showIcon,O=e.showRadio;e.popOverContainer;var I=e.onlyChildren,F=e.onlyLeaf,T=e.classPrefix,A=e.optionsPlaceholder,w=e.searchable,P=e.autoComplete,R=e.maxLength,E=e.minLength,L=e.labelField,x=e.deferField,N=e.nodePath,D=e.onAdd,k=e.creatable,B=e.createTip,K=e.addControls,U=e.onEdit,H=e.editable,M=e.editTip,q=e.editControls,W=e.removable,J=e.removeTip,z=e.onDelete,X=e.rootCreatable,Z=e.rootCreateTip,_=e.translate,G=e.deferLoad,Q=e.expandTreeOptions,Y=e.selfDisabledAffectChildren,$=e.showOutline,ee=e.autoCheckChildren,te=e.autoCancelParent,ne=e.hideRoot,oe=e.virtualThreshold;e.itemHeight;var ie=e.menuTpl,re=e.enableDefaultIcon,ae=e.mobileUI,se=e.testIdBuilder,le=e.nodeBehavior,pe=e.itemActions,de=e.classnames,ue=e.id,ce=e.themeCss,he=!V(P)&&w&&this.state.inputValue?this.filterOptions(d,this.state.inputValue):d;return S.createElement(j,{classPrefix:T,onRef:this.domRef,onlyChildren:I,onHandleNodeClick:this.handleNodeClick,onlyLeaf:F,labelField:L,valueField:c,deferField:x,disabled:r,onChange:ae?this.handleTempChange:this.handleChange,joinValues:a,extractValue:l,delimiter:p,placeholder:_(A),options:he,highlightTxt:this.state.inputValue,multiple:u,initiallyOpen:h,unfoldedLevel:m,withChildren:v,autoCheckChildren:ee,autoCancelParent:te,rootLabel:_(f),rootValue:C,showIcon:b,showRadio:O,showOutline:$,cascade:g,foldedField:"collapsed",hideRoot:ne,value:t||"",nodePath:N,enableNodePath:n,pathSeparator:i,maxLength:R,minLength:E,onAdd:D,creatable:k,createTip:B,rootCreatable:X,rootCreateTip:Z,onEdit:U,editable:H,editTip:M,removable:W,removeTip:J,onDelete:z,bultinCUD:!K&&!q,onDeferLoad:G,onExpandTree:Q,selfDisabledAffectChildren:Y,virtualThreshold:oe,itemRender:ie?this.renderOptionItem:void 0,enableDefaultIcon:re,mobileUI:ae,nodeBehavior:le,itemActionsRender:pe?this.renderItemActions:void 0,actionClassName:de(y(s(s({},this.props),{name:"actionControlClassName",id:ue,themeCss:ce}))),testIdBuilder:se})},t.prototype.renderItemActions=function(e,t){var n=this.props,o=n.itemActions,i=n.data;return(0,n.render)("action/".concat(t.index),o||"",{data:O(O(i,s({},t)),e)})},t.prototype.render=function(){var e=this,t=this.props,n=t.className;t.style;var o=t.disabled,i=t.inline,r=t.loading,a=t.multiple;t.value;var l=t.clearable,d=t.classPrefix,c=t.classnames,h=t.searchable,v=t.autoComplete,f=t.selectedOptions,y=t.placeholder,g=t.popOverContainer,C=t.mobileUI,b=t.maxTagCount,O=t.overflowTagPopover,I=t.translate,F=t.env,T=t.loadingConfig,j=t.testIdBuilder,R=t.wrapperCustomStyle,E=t.id,L=t.themeCss,x=this.state.isOpened,N=a?f:f.length?this.renderItem(f[0]):"";return S.createElement(S.Fragment,null,S.createElement("div",s({ref:this.container,className:c("TreeSelectControl",n)},null==j?void 0:j.getTestId()),S.createElement(A,{popOverContainer:g||F.getModalContainer,maxTagCount:b,overflowTagPopover:O,disabled:o,ref:this.targetRef,placeholder:I(null!=y?y:"placeholder.empty"),inputPlaceholder:"",className:c("TreeSelect",{"TreeSelect--inline":i,"TreeSelect--single":!a,"TreeSelect--multi":a,"TreeSelect--searchable":h||V(v),"is-opened":this.state.isOpened,"is-disabled":o}),result:N,onResultClick:this.handleOutClick,value:this.state.inputValue,onChange:this.handleInputChange,onResultChange:this.handleResultChange,itemRender:this.renderItem,onKeyPress:this.handleKeyPress,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleInputKeyDown,clearable:l,allowInput:!C&&(h||V(v))&&(a||!N),hasDropDownArrow:!0,readOnly:C,mobileUI:C,testIdBuilder:null==j?void 0:j.getChild("result-box")},r?S.createElement(w,{loadingConfig:T,size:"sm"}):void 0),!C&&x?S.createElement(m,{container:g||function(){return e.container.current},target:function(){return e.target},show:!0},S.createElement(u,{classPrefix:d,className:"".concat(d,"TreeSelect-popover"),style:{minWidth:this.target?this.target.offsetWidth:void 0},onHide:this.close,overlay:!0},this.renderOuter())):null,C?S.createElement(P,{container:F.getModalContainer,className:c("".concat(d,"TreeSelect-popup")),isShow:x,onHide:this.close,showConfirm:!0,onConfirm:this.handleConfirm},this.renderOuter()):null),S.createElement(p,s({},this.props,{config:{wrapperCustomStyle:R,id:E,themeCss:L,classNames:[{key:"actionControlClassName"}]},env:F})))},t.defaultProps={hideRoot:!0,placeholder:"Select.placeholder",optionsPlaceholder:"placeholder.noData",multiple:!1,clearable:!0,rootLabel:"Tree.root",rootValue:"",showIcon:!0,joinValues:!0,extractValue:!1,delimiter:",",resetValue:"",hideNodePathLabel:!1,enableNodePath:!1,pathSeparator:"/",selfDisabledAffectChildren:!0},a([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],t.prototype,"handleOutClick",null),a([c,r("design:type",Function),r("design:paramtypes",[Array]),r("design:returntype",void 0)],t.prototype,"handleResultChange",null),a([c,r("design:type",Function),r("design:paramtypes",[Object,Object]),r("design:returntype",void 0)],t.prototype,"addItemFromAction",null),a([c,r("design:type",Function),r("design:paramtypes",[Object,Object]),r("design:returntype",void 0)],t.prototype,"editItemFromAction",null),a([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],t.prototype,"deleteItemFromAction",null),a([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",Promise)],t.prototype,"resultChangeEvent",null),a([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",Promise)],t.prototype,"handleNodeClick",null),a([c,r("design:type",Function),r("design:paramtypes",[Object,Object]),r("design:returntype",void 0)],t.prototype,"renderOptionItem",null),a([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],t.prototype,"renderItem",null),a([c,r("design:type",Function),r("design:paramtypes",[Object]),r("design:returntype",void 0)],t.prototype,"domRef",null),a([c,r("design:type",Function),r("design:paramtypes",[Object,Object]),r("design:returntype",void 0)],t.prototype,"renderItemActions",null),a([R(),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],t.prototype,"render",null),t}(S.Component),N=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),a([h({type:"tree-select"})],t)}(x);export{N as TreeSelectControlRenderer,x as default};
@@ -1 +1 @@
1
- import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as r}from"./react-COOgDf_T.js";import{i as e,r as n}from"./tslib.es6-TRdqp4ac.js";import{F as o,Hr as s}from"./esm-Byma-6B-.js";var i=function(t){function r(r){var e=t.call(this,r)||this;return r.value||e.setValue(),e}return e(r,t),r.prototype.componentDidUpdate=function(t){t.value||!1===t.formInited||this.setValue()},r.prototype.setValue=function(){var t=this.props,r=s();t.length&&(r=r.substring(0,t.length)),t.onChange(r)},r.prototype.render=function(){return null},r}(/* @__PURE__ */t(r()).Component),u=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),n([o({type:"uuid",wrap:!1,sizeMutable:!1})],r)}(i);export{u as UUIDControlRenderer,i as default};
1
+ import{o as t}from"./rolldown-runtime-DXzHzmmG.js";import{t as r}from"./react-CWkhIp2c.js";import{i as e,r as n}from"./tslib.es6-TRdqp4ac.js";import{F as o,Hr as s}from"./esm-DMJQA23h.js";var i=function(t){function r(r){var e=t.call(this,r)||this;return r.value||e.setValue(),e}return e(r,t),r.prototype.componentDidUpdate=function(t){t.value||!1===t.formInited||this.setValue()},r.prototype.setValue=function(){var t=this.props,r=s();t.length&&(r=r.substring(0,t.length)),t.onChange(r)},r.prototype.render=function(){return null},r}(/* @__PURE__ */t(r()).Component),u=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),n([o({type:"uuid",wrap:!1,sizeMutable:!1})],r)}(i);export{u as UUIDControlRenderer,i as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{a as r,i as a,n,o as s,r as o,t as i}from"./tslib.es6-TRdqp4ac.js";import{Nn as l,P as u,Tn as c,ht as p,oi as d,sn as h,vn as f}from"./esm-Byma-6B-.js";import{b as m,x as v}from"./esm-CM4fvlfi.js";import{t as y}from"./StaticHoc-CJgNJAEY.js";var g=/* @__PURE__ */e(t()),b=/* @__PURE__ */e(f()),j=/* @__PURE__ */e(c()),S=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.componentWillUnmount=function(){this.unHook&&this.unHook()},t.prototype.onSearch=function(e,t,a){return n(this,void 0,void 0,function(){var n,s,o,l,u,c,p,d,f;return r(this,function(r){switch(r.label){case 0:if(n=this.props,s=n.searchApi,o=n.setLoading,l=n.env,s=(null==a?void 0:a.searchApi)||s,u=(null==a?void 0:a.searchTerm)||this.props.searchTerm||"term",c=(null==a?void 0:a.searchParam)||this.props.searchParam||{},p=i(((f={})[u]=e,f),c),!h(s,p))return[2,Promise.resolve([])];o(!0),r.label=1;case 1:return r.trys.push([1,,3,4]),[4,l.fetcher(s,p,{cancelExecutor:t,autoAppend:!0})];case 2:return[2,(d=r.sent()).data&&d.data.options||d.data||[]];case 3:return o(!1),[7];case 4:return[2]}})})},t.prototype.deferLoad=function(e,t,a){return n(this,void 0,void 0,function(){var n,s,o,i,l,u,c;return r(this,function(r){switch(r.label){case 0:if(n=this.props,s=n.env,o=n.deferApi,i=n.setLoading,n.formInited,n.addHook,o=(null==a?void 0:a.deferApi)||o,!s||!s.fetcher)throw new Error("fetcher is required");if(l=d(e,{}),!h(o,l))return[2,Promise.resolve([])];r.label=1;case 1:return r.trys.push([1,,3,4]),[4,s.fetcher(o,l)];case 2:return u=r.sent(),c=u.data&&u.data.options||u.data||[],t&&c.forEach(function(e){e.isRef=!0}),[2,c];case 3:return i(!1),[7];case 4:return[2]}})})},t.prototype.changeValue=function(e){return n(this,void 0,void 0,function(){var t,a,n,s,o,i,l,u,c,d,h,f;return r(this,function(r){switch(r.label){case 0:return t=this.props,a=t.joinValues,n=t.extractValue,s=t.delimiter,o=t.multiple,i=t.valueField,l=t.onChange,u=t.options,t.setOptions,t.data,c=t.dispatchEvent,d=e,h=[],(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){(0,j.default)(u,function(t){return t[i||"value"]==e[i||"value"]})||h.push(e)}),a?d=o?Array.isArray(e)?e.map(function(e){return e[i||"value"]}).join(s):e?e[i||"value"]:"":d?d[i||"value"]:"":n&&(d=o?Array.isArray(e)?e.map(function(e){return e[i||"value"]}):e?[e[i||"value"]]:[]:d?d[i||"value"]:""),[4,c("change",p(this.props,{value:d,options:u,items:u}))];case 1:return(null==(f=r.sent())?void 0:f.prevented)||l(d),[2]}})})},t.prototype.renderStatic=function(){var e=this.props,t=e.selectedOptions,r=e.labelField,a=void 0===r?"label":r,n=e.classnames;return"avatar"===a?t.map(function(e,t){return g.createElement("img",{key:t,className:n("UserSelect-avatar-img"),src:e[a],alt:""})}):t.map(function(e){return e[a]}).join(",")},t.prototype.render=function(){var e=this,t=this.props,r=t.showNav,a=t.navTitle,n=t.searchable,s=t.options,o=t.className;t.style;var i=t.selectedOptions,l=t.tabOptions,u=t.multi,c=t.multiple,p=t.isDep,d=t.isRef,h=t.placeholder,f=t.searchPlaceholder,y=t.tabMode,j=t.data,S=t.displayFields,F=t.labelField,A=t.loadingConfig,P=t.disabled;return null==l||l.forEach(function(t){t.deferLoad=e.deferLoad,t.onChange=e.changeValue,t.onSearch=e.onSearch}),g.createElement("div",{className:(0,b.default)("UserSelectControl",o)},y?g.createElement(m,{selection:i,tabOptions:l,multiple:c,displayFields:S,onChange:this.changeValue,onSearch:this.onSearch,deferLoad:this.deferLoad,data:j,disabled:P}):g.createElement(v,{loadingConfig:A,showNav:r,navTitle:a,selection:i,options:s,multi:u,multiple:c,searchable:n,placeholder:h,searchPlaceholder:f,deferLoad:this.deferLoad,onChange:this.changeValue,onSearch:this.onSearch,displayFields:S,labelField:F,isDep:p,isRef:d,disabled:P}))},t.defaultProps={showNav:!0},o([l,s("design:type",Function),s("design:paramtypes",[String,Function,Object]),s("design:returntype",Promise)],t.prototype,"onSearch",null),o([l,s("design:type",Function),s("design:paramtypes",[Object,Boolean,Object]),s("design:returntype",Promise)],t.prototype,"deferLoad",null),o([l,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",Promise)],t.prototype,"changeValue",null),o([y(),s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"render",null),t}(g.Component),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),o([u({type:"users-select"})],t)}(S);export{F as UserSelectControlRenderer,S as default};
1
+ import{o as e}from"./rolldown-runtime-DXzHzmmG.js";import{t}from"./react-CWkhIp2c.js";import{a as r,i as a,n,o as s,r as o,t as i}from"./tslib.es6-TRdqp4ac.js";import{Nn as l,P as u,Tn as c,ht as p,oi as d,sn as h,vn as f}from"./esm-DMJQA23h.js";import{b as m,x as v}from"./esm-Dgr2t9Jm.js";import{t as y}from"./StaticHoc-D0pM2bgC.js";var g=/* @__PURE__ */e(t()),b=/* @__PURE__ */e(f()),j=/* @__PURE__ */e(c()),S=function(e){function t(t){return e.call(this,t)||this}return a(t,e),t.prototype.componentWillUnmount=function(){this.unHook&&this.unHook()},t.prototype.onSearch=function(e,t,a){return n(this,void 0,void 0,function(){var n,s,o,l,u,c,p,d,f;return r(this,function(r){switch(r.label){case 0:if(n=this.props,s=n.searchApi,o=n.setLoading,l=n.env,s=(null==a?void 0:a.searchApi)||s,u=(null==a?void 0:a.searchTerm)||this.props.searchTerm||"term",c=(null==a?void 0:a.searchParam)||this.props.searchParam||{},p=i(((f={})[u]=e,f),c),!h(s,p))return[2,Promise.resolve([])];o(!0),r.label=1;case 1:return r.trys.push([1,,3,4]),[4,l.fetcher(s,p,{cancelExecutor:t,autoAppend:!0})];case 2:return[2,(d=r.sent()).data&&d.data.options||d.data||[]];case 3:return o(!1),[7];case 4:return[2]}})})},t.prototype.deferLoad=function(e,t,a){return n(this,void 0,void 0,function(){var n,s,o,i,l,u,c;return r(this,function(r){switch(r.label){case 0:if(n=this.props,s=n.env,o=n.deferApi,i=n.setLoading,n.formInited,n.addHook,o=(null==a?void 0:a.deferApi)||o,!s||!s.fetcher)throw new Error("fetcher is required");if(l=d(e,{}),!h(o,l))return[2,Promise.resolve([])];r.label=1;case 1:return r.trys.push([1,,3,4]),[4,s.fetcher(o,l)];case 2:return u=r.sent(),c=u.data&&u.data.options||u.data||[],t&&c.forEach(function(e){e.isRef=!0}),[2,c];case 3:return i(!1),[7];case 4:return[2]}})})},t.prototype.changeValue=function(e){return n(this,void 0,void 0,function(){var t,a,n,s,o,i,l,u,c,d,h,f;return r(this,function(r){switch(r.label){case 0:return t=this.props,a=t.joinValues,n=t.extractValue,s=t.delimiter,o=t.multiple,i=t.valueField,l=t.onChange,u=t.options,t.setOptions,t.data,c=t.dispatchEvent,d=e,h=[],(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){(0,j.default)(u,function(t){return t[i||"value"]==e[i||"value"]})||h.push(e)}),a?d=o?Array.isArray(e)?e.map(function(e){return e[i||"value"]}).join(s):e?e[i||"value"]:"":d?d[i||"value"]:"":n&&(d=o?Array.isArray(e)?e.map(function(e){return e[i||"value"]}):e?[e[i||"value"]]:[]:d?d[i||"value"]:""),[4,c("change",p(this.props,{value:d,options:u,items:u}))];case 1:return(null==(f=r.sent())?void 0:f.prevented)||l(d),[2]}})})},t.prototype.renderStatic=function(){var e=this.props,t=e.selectedOptions,r=e.labelField,a=void 0===r?"label":r,n=e.classnames;return"avatar"===a?t.map(function(e,t){return g.createElement("img",{key:t,className:n("UserSelect-avatar-img"),src:e[a],alt:""})}):t.map(function(e){return e[a]}).join(",")},t.prototype.render=function(){var e=this,t=this.props,r=t.showNav,a=t.navTitle,n=t.searchable,s=t.options,o=t.className;t.style;var i=t.selectedOptions,l=t.tabOptions,u=t.multi,c=t.multiple,p=t.isDep,d=t.isRef,h=t.placeholder,f=t.searchPlaceholder,y=t.tabMode,j=t.data,S=t.displayFields,F=t.labelField,A=t.loadingConfig,P=t.disabled;return null==l||l.forEach(function(t){t.deferLoad=e.deferLoad,t.onChange=e.changeValue,t.onSearch=e.onSearch}),g.createElement("div",{className:(0,b.default)("UserSelectControl",o)},y?g.createElement(m,{selection:i,tabOptions:l,multiple:c,displayFields:S,onChange:this.changeValue,onSearch:this.onSearch,deferLoad:this.deferLoad,data:j,disabled:P}):g.createElement(v,{loadingConfig:A,showNav:r,navTitle:a,selection:i,options:s,multi:u,multiple:c,searchable:n,placeholder:h,searchPlaceholder:f,deferLoad:this.deferLoad,onChange:this.changeValue,onSearch:this.onSearch,displayFields:S,labelField:F,isDep:p,isRef:d,disabled:P}))},t.defaultProps={showNav:!0},o([l,s("design:type",Function),s("design:paramtypes",[String,Function,Object]),s("design:returntype",Promise)],t.prototype,"onSearch",null),o([l,s("design:type",Function),s("design:paramtypes",[Object,Boolean,Object]),s("design:returntype",Promise)],t.prototype,"deferLoad",null),o([l,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",Promise)],t.prototype,"changeValue",null),o([y(),s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"render",null),t}(g.Component),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),o([u({type:"users-select"})],t)}(S);export{F as UserSelectControlRenderer,S as default};
@@ -1 +1 @@
1
- import{o as r}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{i as t,r as s}from"./tslib.es6-TRdqp4ac.js";import{it as o,vn as n}from"./esm-Byma-6B-.js";var a=/* @__PURE__ */r(e()),l=/* @__PURE__ */r(n()),i=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return t(e,r),e.prototype.renderChild=function(r,e){return(0,this.props.render)(r,e)},e.prototype.renderCell=function(r,e){var t=this.props.classPrefix;return a.createElement("div",{className:(0,l.default)("".concat(t,"Vbox-cell"),r.cellClassName)},this.renderChild("row/".concat(e),r))},e.prototype.render=function(){var r=this,e=this.props,t=e.className,s=e.style,o=e.rows,n=e.classPrefix;return a.createElement("div",{className:(0,l.default)("".concat(n,"Vbox"),t),style:s},Array.isArray(o)?o.map(function(e,t){return a.createElement("div",{className:(0,l.default)("row-row",e.rowClassName),key:t},r.renderCell(e,t))}):null)},e.propsList=["rows"],e.defaultProps={},e}(a.Component),p=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return t(e,r),s([o({type:"vbox"})],e)}(i);export{p as VBoxRenderer,i as default};
1
+ import{o as r}from"./rolldown-runtime-DXzHzmmG.js";import{t as e}from"./react-CWkhIp2c.js";import{i as t,r as s}from"./tslib.es6-TRdqp4ac.js";import{it as o,vn as n}from"./esm-DMJQA23h.js";var a=/* @__PURE__ */r(e()),l=/* @__PURE__ */r(n()),i=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return t(e,r),e.prototype.renderChild=function(r,e){return(0,this.props.render)(r,e)},e.prototype.renderCell=function(r,e){var t=this.props.classPrefix;return a.createElement("div",{className:(0,l.default)("".concat(t,"Vbox-cell"),r.cellClassName)},this.renderChild("row/".concat(e),r))},e.prototype.render=function(){var r=this,e=this.props,t=e.className,s=e.style,o=e.rows,n=e.classPrefix;return a.createElement("div",{className:(0,l.default)("".concat(n,"Vbox"),t),style:s},Array.isArray(o)?o.map(function(e,t){return a.createElement("div",{className:(0,l.default)("row-row",e.rowClassName),key:t},r.renderCell(e,t))}):null)},e.propsList=["rows"],e.defaultProps={},e}(a.Component),p=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return t(e,r),s([o({type:"vbox"})],e)}(i);export{p as VBoxRenderer,i as default};