@txgw/payout-components 1.1.2 → 1.1.3

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 (173) hide show
  1. package/dist/{AMIS-DZNF-wN5.js → AMIS-DAyIQg_G.js} +1 -1
  2. package/dist/{Action-Bs-w39w3.js → Action-Clb8i0X2.js} +1 -1
  3. package/dist/{Alert-DUrQKj62.js → Alert-Cp-q4PfW.js} +1 -1
  4. package/dist/{AnchorNav-DwqO5tOJ.js → AnchorNav-DRtBwJHB.js} +1 -1
  5. package/dist/{App-XGojn9ib.js → App-D5D3gmNS.js} +1 -1
  6. package/dist/{Audio-DgzkufkL.js → Audio-ezDzOZ39.js} +1 -1
  7. package/dist/{Avatar-DqhjWFEd.js → Avatar-qROBlWC5.js} +1 -1
  8. package/dist/{BarCode-tjp-bkz9.js → BarCode-6Po-8p4f.js} +1 -1
  9. package/dist/{BarCode-BvXPpsQD.js → BarCode-9qcb_QZV.js} +1 -1
  10. package/dist/{Breadcrumb-oAm7DyFM.js → Breadcrumb-CnYLTLG2.js} +1 -1
  11. package/dist/ButtonGroup-B3gS_-Ep.js +1 -0
  12. package/dist/{ButtonGroupSelect-BSiLinwi.js → ButtonGroupSelect-Br9QO7Ah.js} +1 -1
  13. package/dist/{ButtonToolbar-DreDDViU.js → ButtonToolbar-DAXNty4L.js} +1 -1
  14. package/dist/{CRUD-DOweSvNT.js → CRUD-B--j--TM.js} +1 -1
  15. package/dist/{CRUD2-vQ4diTWc.js → CRUD2-Czfh3c6d.js} +1 -1
  16. package/dist/{Calendar-BiO6uAcc.js → Calendar-DjdYB26f.js} +1 -1
  17. package/dist/Card-By-PXs2S.js +1 -0
  18. package/dist/{Card2-7Wp2CxXC.js → Card2-Cu31YvK5.js} +1 -1
  19. package/dist/{Cards-D4nSx5vL.js → Cards-5ddE2SUr.js} +1 -1
  20. package/dist/{Carousel-h335GVnQ.js → Carousel-hMJwhzad.js} +1 -1
  21. package/dist/{ChainedSelect-CgA7EAnm.js → ChainedSelect-BVw16VhH.js} +1 -1
  22. package/dist/{Chart-3iqLVLt0.js → Chart-k2n3KbeJ.js} +1 -1
  23. package/dist/{ChartRadios-B6Ot4z4V.js → ChartRadios-Cv_E9P7l.js} +1 -1
  24. package/dist/Checkbox-DhLJdAC3.js +1 -0
  25. package/dist/{Checkboxes-B57EyVvD.js → Checkboxes-BxYxzZa5.js} +1 -1
  26. package/dist/{Code-73HoywPD.js → Code-D4_QKMQI.js} +1 -1
  27. package/dist/{Collapse-Of0m7uH6.js → Collapse-CEnYSzni.js} +1 -1
  28. package/dist/{CollapseGroup-BdfCeJXB.js → CollapseGroup-DsF-EgIN.js} +1 -1
  29. package/dist/{Color-Dex4BTai.js → Color-xBgwFhyM.js} +1 -1
  30. package/dist/{ColorPicker-CaZhySp2.js → ColorPicker-D-WUp5Oc.js} +1 -1
  31. package/dist/{ColumnToggler-BT4N08pI.js → ColumnToggler-B4_p_fol.js} +1 -1
  32. package/dist/{ColumnToggler-DCYiE7t2.js → ColumnToggler-BSPIBpte.js} +1 -1
  33. package/dist/{Combo-DhX7fDDG.js → Combo-OgMxOSk_.js} +1 -1
  34. package/dist/{ConditionBuilder-DlYCpqot.js → ConditionBuilder-C6y4Niek.js} +1 -1
  35. package/dist/{Container-Cjl-6k2g.js → Container-DIwv0W3y.js} +1 -1
  36. package/dist/{Control-D0yxiOHV.js → Control-BsINOFFV.js} +1 -1
  37. package/dist/{Custom-DYfrc-91.js → Custom-UqWqkCBN.js} +1 -1
  38. package/dist/{Date-D_v0tbK0.js → Date-CwyL0i2y.js} +1 -1
  39. package/dist/{DateRange-DM7ZQogY.js → DateRange-BbK8plpl.js} +1 -1
  40. package/dist/{Dialog-D4mabE0H.js → Dialog-B9w6XNSa.js} +1 -1
  41. package/dist/{DiffEditor-3RFnxnVZ.js → DiffEditor-DYtkyXuj.js} +1 -1
  42. package/dist/{Divider-X0wd4qMm.js → Divider-Dh3DN6al.js} +1 -1
  43. package/dist/{Drawer-CmNhH-X1.js → Drawer-CBRwH0Bt.js} +1 -1
  44. package/dist/{DropDownButton-3OqKMh9I.js → DropDownButton-DQLBn8hV.js} +1 -1
  45. package/dist/{Each-CUEt_Fp0.js → Each-BUw57vY9.js} +1 -1
  46. package/dist/FieldSet-CAP6ZdK6.js +1 -0
  47. package/dist/{Flex-vXjawllk.js → Flex-C0hNuyOd.js} +1 -1
  48. package/dist/{Formula-td5jVfJP.js → Formula-BtEwGFmI.js} +1 -1
  49. package/dist/{Grid2D-B94XWGD9.js → Grid2D-BxnTgVoa.js} +1 -1
  50. package/dist/{GridNav-CjBc3KU2.js → GridNav-COV2whrb.js} +1 -1
  51. package/dist/{Group-BZ4Pg7AG.js → Group-BYOqgaHQ.js} +1 -1
  52. package/dist/HBox-WD6QODEX.js +1 -0
  53. package/dist/{Hidden-BscLTSvF.js → Hidden-SDRqFPHU.js} +1 -1
  54. package/dist/{IFrame-DGSX6045.js → IFrame-BKPZpwD9.js} +1 -1
  55. package/dist/{Icon-iZCnbbZJ.js → Icon-CF0MfUgx.js} +1 -1
  56. package/dist/{IconPicker-C-73qGJr.js → IconPicker-DtgLB7Li.js} +1 -1
  57. package/dist/{IconSelect-BPcOP4a-.js → IconSelect-f1Lu6X5l.js} +1 -1
  58. package/dist/{IconSelectStore-CfOI4fPx.js → IconSelectStore-Cw4MsRUx.js} +1 -1
  59. package/dist/{Image-B_euCBkp.js → Image-DqR0gBiu.js} +1 -1
  60. package/dist/{Images-NpK2jr8S.js → Images-BTTEJClc.js} +1 -1
  61. package/dist/{InputArray-D_C7sc2K.js → InputArray-DvmG1NbU.js} +1 -1
  62. package/dist/{InputCity-DjTVJMDf.js → InputCity-KNg6Eygl.js} +1 -1
  63. package/dist/{InputColor-Cxs2k3zC.js → InputColor-CuGveT2B.js} +1 -1
  64. package/dist/{InputDate-D0ayUi_W.js → InputDate-CPNZ8Ql_.js} +1 -1
  65. package/dist/{InputDateRange-D5xZLZ87.js → InputDateRange-CUJbjbXA.js} +1 -1
  66. package/dist/{InputExcel-DJwiAPrG.js → InputExcel-DmiEkGzr.js} +1 -1
  67. package/dist/{InputFile-CLgy5Kwa.js → InputFile-BBimXXKp.js} +1 -1
  68. package/dist/{InputFormula-CiNEZ27E.js → InputFormula-BlWsaRgO.js} +1 -1
  69. package/dist/{InputGroup-BeE8skgC.js → InputGroup-B0iNRBoA.js} +1 -1
  70. package/dist/InputImage-DV2_-1UV.js +1 -0
  71. package/dist/{InputMonthRange-IwvyjfHM.js → InputMonthRange-CVWXFyng.js} +1 -1
  72. package/dist/{InputNumber-CwgWdQv0.js → InputNumber-WVrrdK5K.js} +1 -1
  73. package/dist/{InputQuarterRange-KVLnwl5Z.js → InputQuarterRange-DlPmxZUk.js} +1 -1
  74. package/dist/{InputRange-DuQrlfhv.js → InputRange-BtbO0-Q3.js} +1 -1
  75. package/dist/{InputRating-dpD8uqWr.js → InputRating-CoWIusTr.js} +1 -1
  76. package/dist/{InputRepeat-40A83-CG.js → InputRepeat-vtLHisDx.js} +1 -1
  77. package/dist/InputRichText-CDtNI74S.js +1 -0
  78. package/dist/{InputSignature-BixhxEHC.js → InputSignature-BaRJvLQA.js} +1 -1
  79. package/dist/{InputSubForm-DY7gjGCI.js → InputSubForm-DN437CKg.js} +1 -1
  80. package/dist/{InputTable-KQY600uO.js → InputTable-4VS50n9k.js} +1 -1
  81. package/dist/{InputTag-COBAcy-D.js → InputTag-CyraIqPe.js} +1 -1
  82. package/dist/{InputText-DMKOqEA5.js → InputText-YV-KWQFV.js} +1 -1
  83. package/dist/{InputTree-C5ku3s07.js → InputTree-Bgtw4o8_.js} +1 -1
  84. package/dist/{InputVerificationCode-BG75Q7R0.js → InputVerificationCode-CXfWRO0c.js} +1 -1
  85. package/dist/{InputYearRange-BOCyFqVY.js → InputYearRange-a9R28Zzo.js} +1 -1
  86. package/dist/{JSONSchema-DPtkw1sK.js → JSONSchema-ydPGt5BM.js} +1 -1
  87. package/dist/{JSONSchemaEditor--MtYcADt.js → JSONSchemaEditor-DhAE991v.js} +1 -1
  88. package/dist/{Json-DzE3RuEL.js → Json-DlDI6pYj.js} +1 -1
  89. package/dist/{Link-CYr-HaE7.js → Link-K8pf_CH7.js} +1 -1
  90. package/dist/List-DLVcqN93.js +1 -0
  91. package/dist/{ListSelect-Bqcz5Vsf.js → ListSelect-C5_rPp8r.js} +1 -1
  92. package/dist/{LocationPicker-DmgXW4e_.js → LocationPicker-CpZbckdW.js} +1 -1
  93. package/dist/{Log-htr4zYhI.js → Log-D7Yg8q24.js} +1 -1
  94. package/dist/{Mapping-Dp7GXGk0.js → Mapping-DKEV0yFA.js} +1 -1
  95. package/dist/{Markdown-CRTswpVP.js → Markdown-DOG-PWSW.js} +1 -1
  96. package/dist/{MatrixCheckboxes-CrC-0KV5.js → MatrixCheckboxes-DfJ5M8qG.js} +1 -1
  97. package/dist/{MultilineText-pqUIIh-i.js → MultilineText-nDqbzJcx.js} +1 -1
  98. package/dist/{Nav-C7Q5NTyJ.js → Nav-Cm6e_dal.js} +1 -1
  99. package/dist/{NestedSelect-cGzGDu2x.js → NestedSelect-LIGunxlP.js} +1 -1
  100. package/dist/{Number-HvZgu-Ps.js → Number-Bw_bgJ20.js} +1 -1
  101. package/dist/{OfficeViewer-BwHQtXDM.js → OfficeViewer-BT_jACpM.js} +1 -1
  102. package/dist/{Operation-BlB9BgWJ.js → Operation-DC_y6Ub7.js} +1 -1
  103. package/dist/{Page-DFGe-1EJ.js → Page-C90C-uXp.js} +1 -1
  104. package/dist/{Pagination-BPnTFeYa.js → Pagination-CCe6HayL.js} +1 -1
  105. package/dist/{PaginationWrapper-Cc_ArWYp.js → PaginationWrapper-BlFp9wjh.js} +1 -1
  106. package/dist/{Panel-YID5Pd0p.js → Panel-BQBXJkJg.js} +1 -1
  107. package/dist/{Password-CQvFKTlR.js → Password-BRgzVD-R.js} +1 -1
  108. package/dist/{Picker-Bd08LYGS.js → Picker-BFbwyiE1.js} +1 -1
  109. package/dist/{Plain-BXvSUnJt.js → Plain-Dwci4N2e.js} +1 -1
  110. package/dist/{PopUp-DTLG0S4M.js → PopUp-CJyUTmjT.js} +1 -1
  111. package/dist/{Portlet-tFR4gBDB.js → Portlet-CNgfI1Ub.js} +1 -1
  112. package/dist/{Progress-BsjTAFle.js → Progress-XZb5-ThE.js} +1 -1
  113. package/dist/{Property-DczjnSg8.js → Property-D2a_Ul3S.js} +1 -1
  114. package/dist/{QRCode-B3Jistsv.js → QRCode-DHU1RQet.js} +1 -1
  115. package/dist/{Radio-D9rpSDB1.js → Radio-C7BdmAKp.js} +1 -1
  116. package/dist/{Radios-BAkviIMB.js → Radios-BwjWo-L1.js} +1 -1
  117. package/dist/{Remark-2nq87f0j.js → Remark-Q40Cl_Fm.js} +1 -1
  118. package/dist/{SearchBox-BlOWBFmf.js → SearchBox-Bh3PIe-b.js} +1 -1
  119. package/dist/{Select-CNRCEqfS.js → Select-20F0bgFJ.js} +1 -1
  120. package/dist/{Service-B3evLOnD.js → Service-CuSQipPk.js} +1 -1
  121. package/dist/{Shape-oNfw1JQb.js → Shape-C4o5GSeA.js} +1 -1
  122. package/dist/{Slider-BkAJVHJv.js → Slider-DHYsoPVj.js} +1 -1
  123. package/dist/{SparkLine-BHo-1vXu.js → SparkLine-BBXL561Q.js} +1 -1
  124. package/dist/{Spinner-C6lWc4OM.js → Spinner-CsRzfkv4.js} +1 -1
  125. package/dist/{StaticHoc-BGJCCg4f.js → StaticHoc-CJgNJAEY.js} +1 -1
  126. package/dist/{Status-DplNkt0Z.js → Status-KxvNWOcw.js} +1 -1
  127. package/dist/{Steps-DfFUvz_A.js → Steps-UlgTNiB1.js} +1 -1
  128. package/dist/{Switch-BVSzVpRN.js → Switch-C0aCyqKu.js} +1 -1
  129. package/dist/{SwitchContainer-CFA12Afc.js → SwitchContainer-D70l_KaN.js} +1 -1
  130. package/dist/{Table-efibISgA.js → Table-BaDaN8MH.js} +1 -1
  131. package/dist/{Table2-C-el0Wqe.js → Table2-DqyJ5B5M.js} +1 -1
  132. package/dist/{TableView-CTG5hc3H.js → TableView-Df0guEBC.js} +1 -1
  133. package/dist/{Tabs-D_H_s_Lo.js → Tabs-Dh9SVot3.js} +1 -1
  134. package/dist/{TabsTransfer-CtbMgGeJ.js → TabsTransfer-DakjSBBq.js} +1 -1
  135. package/dist/{TabsTransferPicker-L3HKNnXE.js → TabsTransferPicker-CCMRPC1d.js} +1 -1
  136. package/dist/{Tag-VPoGNvKr.js → Tag-ChRcdATW.js} +1 -1
  137. package/dist/{Tasks-DfnQ6J5i.js → Tasks-C8oQeM6A.js} +1 -1
  138. package/dist/{Textarea-Dxd2ut9C.js → Textarea-CIqPVCY2.js} +1 -1
  139. package/dist/{Timeline-PSktc7Gj.js → Timeline-D7CXypET.js} +1 -1
  140. package/dist/{TooltipWrapper-BMLQMhlo.js → TooltipWrapper-CtUc05W4.js} +1 -1
  141. package/dist/{Tpl-D-0fwqIo.js → Tpl-cTs7jhV_.js} +1 -1
  142. package/dist/{Transfer-U4V9M4hb.js → Transfer-_RgCe9xE.js} +1 -1
  143. package/dist/{TransferPicker-4u_PHlo2.js → TransferPicker-DS450Cwo.js} +1 -1
  144. package/dist/{TreeSelect-xFIc1kbp.js → TreeSelect-ipE2Adb0.js} +1 -1
  145. package/dist/{UUID-z-38LjnX.js → UUID-BARmlnTb.js} +1 -1
  146. package/dist/{UserSelect-kZxushLL.js → UserSelect-D6S_lRVG.js} +1 -1
  147. package/dist/{VBox-Wx0Hae1x.js → VBox-BAzEQR4R.js} +1 -1
  148. package/dist/{Video-DpUxYlrI.js → Video-fb-VaQF8.js} +1 -1
  149. package/dist/{WebComponent-qVXehLOT.js → WebComponent-Cc6mYGsA.js} +1 -1
  150. package/dist/{Wizard-CgWXlbIW.js → Wizard-B5v3sXNf.js} +1 -1
  151. package/dist/{Words-BcH_hUuO.js → Words-eY9320eX.js} +1 -1
  152. package/dist/{Wrapper-goADT8nB.js → Wrapper-DHBwNSd-.js} +1 -1
  153. package/dist/{beneficiary-form-BjZ_GGCu.js → beneficiary-form-BT1hMT9A.js} +1 -1
  154. package/dist/{es-CEgI316R.js → es-Dm57cZR7.js} +1 -1
  155. package/dist/{esm-D3qvBzlk.js → esm-Byma-6B-.js} +1 -1
  156. package/dist/{esm-DdEfrmRq.js → esm-CM4fvlfi.js} +1 -1
  157. package/dist/{esm-CMljH72G.js → esm-CrR9dHH3.js} +1 -1
  158. package/dist/index.css +1 -1
  159. package/dist/index.js +1 -1
  160. package/dist/{objectSpread2-CaisYh-T.js → objectSpread2-DFRX1WB4.js} +1 -1
  161. package/dist/{omitBy-CXOTk7kv.js → omitBy-DBIyJYy7.js} +1 -1
  162. package/dist/papaparse.min-BtfDBTEy.js +1 -0
  163. package/dist/{xor-6sD3W2X_.js → xor-NaloR5U3.js} +1 -1
  164. package/package.json +1 -1
  165. package/dist/ButtonGroup-DhxYojgw.js +0 -1
  166. package/dist/Card-BIz3TQnU.js +0 -1
  167. package/dist/Checkbox-Dmf4DD3L.js +0 -1
  168. package/dist/FieldSet-xMpwZk45.js +0 -1
  169. package/dist/HBox-mmIRGeNY.js +0 -1
  170. package/dist/InputImage-IH9vczM1.js +0 -1
  171. package/dist/InputRichText-CPs8s7sR.js +0 -1
  172. package/dist/List-CsbZFLho.js +0 -1
  173. package/dist/papaparse.min-PX0bGR45.js +0 -1
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as a,r as o}from"./tslib.es6-TRdqp4ac.js";import{it as p,vt as r}from"./esm-D3qvBzlk.js";var s=/* @__PURE__ */e(t()),n=function(e){function t(t){var a=e.call(this,t)||this;return t.store.syncProps(t,void 0,["perPage","mode","ellipsisPageGap","inputName","outputName"]),a}return a(t,e),t.prototype.componentDidUpdate=function(e){this.props.store.syncProps(this.props,e,["perPage","mode","ellipsisPageGap","inputName","outputName"])},t.prototype.render=function(){var e=this.props,t=e.position,a=e.render,o=e.store,p=e.classnames,r=e.style,n=e.body,i=e.translate,l="none"!==t?a("pager",{type:"pagination"},{activePage:o.page,lastPage:o.lastPage,mode:o.mode,ellipsisPageGap:o.ellipsisPageGap,onPageChange:o.switchTo,perPage:o.perPage,className:"PaginationWrapper-pager"}):null;return s.createElement("div",{className:p("PaginationWrapper"),style:r},"top"===t?l:null,n?a("body",n,{data:o.locals}):s.createElement("span",null,i("PaginationWrapper.placeholder")),"bottom"===t?l:null)},t.defaultProps={inputName:"items",outputName:"items",perPage:10,position:"top"},t}(s.Component),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),o([p({type:"pagination-wrapper",storeType:r.name})],t)}(n);export{n as PaginationWrapper,i as PaginationWrapperRenderer};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as a,r as o}from"./tslib.es6-TRdqp4ac.js";import{it as p,vt as r}from"./esm-Byma-6B-.js";var s=/* @__PURE__ */e(t()),n=function(e){function t(t){var a=e.call(this,t)||this;return t.store.syncProps(t,void 0,["perPage","mode","ellipsisPageGap","inputName","outputName"]),a}return a(t,e),t.prototype.componentDidUpdate=function(e){this.props.store.syncProps(this.props,e,["perPage","mode","ellipsisPageGap","inputName","outputName"])},t.prototype.render=function(){var e=this.props,t=e.position,a=e.render,o=e.store,p=e.classnames,r=e.style,n=e.body,i=e.translate,l="none"!==t?a("pager",{type:"pagination"},{activePage:o.page,lastPage:o.lastPage,mode:o.mode,ellipsisPageGap:o.ellipsisPageGap,onPageChange:o.switchTo,perPage:o.perPage,className:"PaginationWrapper-pager"}):null;return s.createElement("div",{className:p("PaginationWrapper"),style:r},"top"===t?l:null,n?a("body",n,{data:o.locals}):s.createElement("span",null,i("PaginationWrapper.placeholder")),"bottom"===t?l:null)},t.defaultProps={inputName:"items",outputName:"items",perPage:10,position:"top"},t}(s.Component),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),o([p({type:"pagination-wrapper",storeType:r.name})],t)}(n);export{n as PaginationWrapper,i as PaginationWrapperRenderer};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t as a}from"./react-COOgDf_T.js";import{c as s,i as t,r as o,t as r}from"./tslib.es6-TRdqp4ac.js";import{J as l,Z as n,i,it as m,yn as d}from"./esm-D3qvBzlk.js";import"./esm-DdEfrmRq.js";import{s as p}from"./PopUp-DTLG0S4M.js";var c=/* @__PURE__ */e(a()),C=/* @__PURE__ */e(d()),h=function(e){function a(a){var s=e.call(this,a)||this;return s.state={collapsed:!1},a.mobileUI&&a.collapsible&&(s.state.collapsed=!0),s}return t(a,e),a.prototype.renderBody=function(){var e=this.props;e.type,e.className,e.style;var a=e.data;e.header;var t=e.body,o=e.render;e.bodyClassName,e.headerClassName,e.actionsClassName,e.footerClassName;var l=e.children;e.title,e.actions,e.footer,e.classPrefix;var n=e.formMode,m=e.formHorizontal,d=e.subFormMode,p=e.subFormHorizontal;e.id,e.themeCss,e.wrapperCustomStyle;var c=s(e,["type","className","style","data","header","body","render","bodyClassName","headerClassName","actionsClassName","footerClassName","children","title","actions","footer","classPrefix","formMode","formHorizontal","subFormMode","subFormHorizontal","id","themeCss","wrapperCustomStyle"]),h=r(r({data:a},(0,C.default)(c,i)),{formMode:d||n,formHorizontal:p||m});return l?"function"==typeof l?l(this.props):l:t?o("body",t,h):null},a.prototype.renderActions=function(){var e=this.props,a=e.actions,s=e.render;return Array.isArray(a)?a.map(function(e,a){return s("action",e,{type:e.type||"button",key:a})}):null},a.prototype.render=function(){var e=this,a=this.props;a.type;var t=a.className,o=a.style,i=a.data,m=a.header;a.body;var d=a.render,C=a.bodyClassName,h=a.headerClassName,f=a.actionsClassName,N=a.footerClassName,y=a.footerWrapClassName,u=a.headerControlClassName,b=a.headerTitleControlClassName,v=a.bodyControlClassName,P=a.actionsControlClassName;a.children;var w=a.title,E=a.footer,k=a.affixFooter,x=a.classPrefix,g=a.classnames,S=a.id,j=a.collapsible,A=a.themeCss,F=a.wrapperCustomStyle,z=s(a,["type","className","style","data","header","body","render","bodyClassName","headerClassName","actionsClassName","footerClassName","footerWrapClassName","headerControlClassName","headerTitleControlClassName","bodyControlClassName","actionsControlClassName","children","title","footer","affixFooter","classPrefix","classnames","id","collapsible","themeCss","wrapperCustomStyle"]),H=r({data:i},z),M=[],W=this.state.collapsed;W||(Array.isArray(this.props.actions)&&this.props.actions.length&&M.push(c.createElement("div",{key:"actions",className:g("Panel-btnToolbar",f||"Panel-footer",P)},this.renderActions())),E&&M.push(c.createElement("div",{key:"footer",className:g(N||"Panel-footer",P)},d("footer",E,H))));var B=M.length?c.createElement("div",{className:g("Panel-footerWrap",y,k?"Panel-fixedBottom":"",n(r(r({},this.props),{name:"footerControlClassName",id:S,themeCss:A})))},M):null;return c.createElement("div",{"data-id":S,"data-role":"container",className:g("Panel",t||"Panel--default",n(r(r({},this.props),{name:"baseControlClassName",id:S,themeCss:A})),n(r(r({},this.props),{name:"wrapperCustomStyle",id:S,themeCss:F}))),style:o},m?c.createElement("div",{className:g(h||"Panel-heading",u,n(r(r({},this.props),{name:"headerControlClassName",id:S,themeCss:A})))},d("header",m,H)):w?c.createElement("div",{className:g(h||"Panel-heading",u,{"is-collapsible":j},n(r(r({},this.props),{name:"headerControlClassName",id:S,themeCss:A})))},c.createElement("h3",{className:g("Panel-title",b,n(r(r({},this.props),{name:"titleControlClassName",id:S,themeCss:A})))},d("title",w,H)),j?c.createElement("span",{className:g("Panel-arrow-wrap"),onClick:function(){e.setState({collapsed:!W})}},c.createElement(p,{icon:"down-arrow-bold",className:g("Panel-arrow","icon",{"is-collapsed":W})})):null):null,W?null:c.createElement("div",{className:g(C||"Panel-body",v,n(r(r({},this.props),{name:"bodyControlClassName",id:S,themeCss:A})))},this.renderBody()),B,c.createElement(l,r({},this.props,{config:{wrapperCustomStyle:F,id:S,themeCss:A,classNames:[{key:"baseControlClassName"},{key:"bodyControlClassName"},{key:"headerControlClassName",weights:{default:{suf:".".concat(x,"Panel-heading")}}},{key:"titleControlClassName"},{key:"footerControlClassName"}]},env:this.props.env})))},a.propsList=["header","actions","children","headerClassName","footerClassName","footerWrapClassName","actionsClassName","bodyClassName"],a.defaultProps={},a}(c.Component),f=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t(a,e),o([m({type:"panel"})],a)}(h);export{f as PanelRenderer,h as default};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t as a}from"./react-COOgDf_T.js";import{c as s,i as t,r as o,t as r}from"./tslib.es6-TRdqp4ac.js";import{J as l,Z as n,i,it as m,yn as d}from"./esm-Byma-6B-.js";import"./esm-CM4fvlfi.js";import{s as p}from"./PopUp-CJyUTmjT.js";var c=/* @__PURE__ */e(a()),C=/* @__PURE__ */e(d()),h=function(e){function a(a){var s=e.call(this,a)||this;return s.state={collapsed:!1},a.mobileUI&&a.collapsible&&(s.state.collapsed=!0),s}return t(a,e),a.prototype.renderBody=function(){var e=this.props;e.type,e.className,e.style;var a=e.data;e.header;var t=e.body,o=e.render;e.bodyClassName,e.headerClassName,e.actionsClassName,e.footerClassName;var l=e.children;e.title,e.actions,e.footer,e.classPrefix;var n=e.formMode,m=e.formHorizontal,d=e.subFormMode,p=e.subFormHorizontal;e.id,e.themeCss,e.wrapperCustomStyle;var c=s(e,["type","className","style","data","header","body","render","bodyClassName","headerClassName","actionsClassName","footerClassName","children","title","actions","footer","classPrefix","formMode","formHorizontal","subFormMode","subFormHorizontal","id","themeCss","wrapperCustomStyle"]),h=r(r({data:a},(0,C.default)(c,i)),{formMode:d||n,formHorizontal:p||m});return l?"function"==typeof l?l(this.props):l:t?o("body",t,h):null},a.prototype.renderActions=function(){var e=this.props,a=e.actions,s=e.render;return Array.isArray(a)?a.map(function(e,a){return s("action",e,{type:e.type||"button",key:a})}):null},a.prototype.render=function(){var e=this,a=this.props;a.type;var t=a.className,o=a.style,i=a.data,m=a.header;a.body;var d=a.render,C=a.bodyClassName,h=a.headerClassName,f=a.actionsClassName,N=a.footerClassName,y=a.footerWrapClassName,u=a.headerControlClassName,b=a.headerTitleControlClassName,v=a.bodyControlClassName,P=a.actionsControlClassName;a.children;var w=a.title,E=a.footer,k=a.affixFooter,x=a.classPrefix,g=a.classnames,S=a.id,j=a.collapsible,A=a.themeCss,F=a.wrapperCustomStyle,z=s(a,["type","className","style","data","header","body","render","bodyClassName","headerClassName","actionsClassName","footerClassName","footerWrapClassName","headerControlClassName","headerTitleControlClassName","bodyControlClassName","actionsControlClassName","children","title","footer","affixFooter","classPrefix","classnames","id","collapsible","themeCss","wrapperCustomStyle"]),H=r({data:i},z),M=[],W=this.state.collapsed;W||(Array.isArray(this.props.actions)&&this.props.actions.length&&M.push(c.createElement("div",{key:"actions",className:g("Panel-btnToolbar",f||"Panel-footer",P)},this.renderActions())),E&&M.push(c.createElement("div",{key:"footer",className:g(N||"Panel-footer",P)},d("footer",E,H))));var B=M.length?c.createElement("div",{className:g("Panel-footerWrap",y,k?"Panel-fixedBottom":"",n(r(r({},this.props),{name:"footerControlClassName",id:S,themeCss:A})))},M):null;return c.createElement("div",{"data-id":S,"data-role":"container",className:g("Panel",t||"Panel--default",n(r(r({},this.props),{name:"baseControlClassName",id:S,themeCss:A})),n(r(r({},this.props),{name:"wrapperCustomStyle",id:S,themeCss:F}))),style:o},m?c.createElement("div",{className:g(h||"Panel-heading",u,n(r(r({},this.props),{name:"headerControlClassName",id:S,themeCss:A})))},d("header",m,H)):w?c.createElement("div",{className:g(h||"Panel-heading",u,{"is-collapsible":j},n(r(r({},this.props),{name:"headerControlClassName",id:S,themeCss:A})))},c.createElement("h3",{className:g("Panel-title",b,n(r(r({},this.props),{name:"titleControlClassName",id:S,themeCss:A})))},d("title",w,H)),j?c.createElement("span",{className:g("Panel-arrow-wrap"),onClick:function(){e.setState({collapsed:!W})}},c.createElement(p,{icon:"down-arrow-bold",className:g("Panel-arrow","icon",{"is-collapsed":W})})):null):null,W?null:c.createElement("div",{className:g(C||"Panel-body",v,n(r(r({},this.props),{name:"bodyControlClassName",id:S,themeCss:A})))},this.renderBody()),B,c.createElement(l,r({},this.props,{config:{wrapperCustomStyle:F,id:S,themeCss:A,classNames:[{key:"baseControlClassName"},{key:"bodyControlClassName"},{key:"headerControlClassName",weights:{default:{suf:".".concat(x,"Panel-heading")}}},{key:"titleControlClassName"},{key:"footerControlClassName"}]},env:this.props.env})))},a.propsList=["header","actions","children","headerClassName","footerClassName","footerWrapClassName","actionsClassName","bodyClassName"],a.defaultProps={},a}(c.Component),f=function(e){function a(){return null!==e&&e.apply(this,arguments)||this}return t(a,e),o([m({type:"panel"})],a)}(h);export{f as PanelRenderer,h as default};
@@ -1 +1 @@
1
- import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as s}from"./react-COOgDf_T.js";import{i as e,o as i,r as o}from"./tslib.es6-TRdqp4ac.js";import{Nn as n,it as r}from"./esm-D3qvBzlk.js";import"./esm-DdEfrmRq.js";import{s as a}from"./PopUp-DTLG0S4M.js";var l=/* @__PURE__ */t(s()),p=function(t){function s(){var s=null!==t&&t.apply(this,arguments)||this;return s.state={visible:!1},s}return e(s,t),s.prototype.toggleVisible=function(){this.setState({visible:!this.state.visible})},s.prototype.render=function(){var t=this.props,s=t.classnames,e=t.className,i=t.style,o=t.mosaicText,n=void 0===o?"********":o,r=t.value;return l.createElement("span",{className:s("Password-field",e),style:i},this.state.visible?r:n,this.state.visible?l.createElement(a,{icon:"view",className:"icon",onClick:this.toggleVisible}):l.createElement(a,{icon:"invisible",className:"icon",onClick:this.toggleVisible}))},o([n,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],s.prototype,"toggleVisible",null),s}(l.Component),m=function(t){function s(){return null!==t&&t.apply(this,arguments)||this}return e(s,t),o([r({type:"password"})],s)}(p);export{p as PasswordField,m as PasswordFieldRenderer};
1
+ import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as s}from"./react-COOgDf_T.js";import{i as e,o as i,r as o}from"./tslib.es6-TRdqp4ac.js";import{Nn as n,it as r}from"./esm-Byma-6B-.js";import"./esm-CM4fvlfi.js";import{s as a}from"./PopUp-CJyUTmjT.js";var l=/* @__PURE__ */t(s()),p=function(t){function s(){var s=null!==t&&t.apply(this,arguments)||this;return s.state={visible:!1},s}return e(s,t),s.prototype.toggleVisible=function(){this.setState({visible:!this.state.visible})},s.prototype.render=function(){var t=this.props,s=t.classnames,e=t.className,i=t.style,o=t.mosaicText,n=void 0===o?"********":o,r=t.value;return l.createElement("span",{className:s("Password-field",e),style:i},this.state.visible?r:n,this.state.visible?l.createElement(a,{icon:"view",className:"icon",onClick:this.toggleVisible}):l.createElement(a,{icon:"invisible",className:"icon",onClick:this.toggleVisible}))},o([n,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],s.prototype,"toggleVisible",null),s}(l.Component),m=function(t){function s(){return null!==t&&t.apply(this,arguments)||this}return e(s,t),o([r({type:"password"})],s)}(p);export{p as PasswordField,m as PasswordFieldRenderer};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{a as n,i as o,n as i,o as s,r,s as a,t as l}from"./tslib.es6-TRdqp4ac.js";import{t as p}from"./isEqual-DiNKNUz9.js";import{En as c,Er as d,Ii as u,J as m,Nn as h,P as v,Tn as f,Wi as y,Xr as g,Z as C,Zr as k,an as b,ht as O,oi as P,sn as F,ua as w,vi as I,vn as N,yn as S}from"./esm-D3qvBzlk.js";import{mt as E,s as j,tt as T}from"./esm-DdEfrmRq.js";import{o as D,s as A}from"./PopUp-DTLG0S4M.js";import{t as V}from"./StaticHoc-BGJCCg4f.js";var B=/* @__PURE__ */e(t()),x=/* @__PURE__ */e(N()),M=/* @__PURE__ */e(S()),R=/* @__PURE__ */e(f()),U=/* @__PURE__ */e(p()),W=/* @__PURE__ */e(c()),z=/* @__PURE__ */e(y()),H=/* @__PURE__ */e(T()),K=function(e){function t(t){var o=e.call(this,t)||this;o.state={isOpened:!1,schema:o.buildSchema(o.props),isFocused:!1},o.input=B.createRef(),o.toDispose=[],o.mounted=!1;var s=t.formInited,r=t.addHook,a=t.formItem,l=function(){return i(o,void 0,void 0,function(){var e=this;return n(this,function(t){switch(t.label){case 0:return[4,this.fetchOptions()];case 1:return t.sent(),this.mounted&&this.toDispose.push(w(function(){return JSON.stringify(null==a?void 0:a.tmpValue)},function(){return e.fetchOptions()})),[2]}})})};return a&&o.toDispose.push(s||!r?a.addInitHook(l):r(l,"init")),o}return o(t,e),t.prototype.componentDidMount=function(){this.mounted=!0},t.prototype.componentDidUpdate=function(e){var t,n=this.props;["multiple","source","pickerSchema"].some(function(t){return!(0,U.default)(e[t],n[t])})?this.setState({schema:this.buildSchema(n)}):b(e.source,n.source,e.data,n.data)&&null!==(t=n.formItem)&&void 0!==t&&t.inited&&this.fetchOptions()},t.prototype.componentWillUnmount=function(){this.toDispose.forEach(function(e){return e()}),this.toDispose=[],this.mounted=!1},t.prototype.fetchOptions=function(){var e,t,n=this.props,o=n.value,i=n.formItem,s=n.valueField,r=n.labelField,a=n.source,l=n.data;if(a&&i&&(s||"value")!==(r||"label")&&(!(t=i.getSelectedOptions(o))||t.length&&t[0][s||"value"]===t[0][r||"label"])){var p=P(l,((e={value:o})[s||"value"]=o,e.op="loadOptions",e));if(k(a))i.setOptions(u(a,l,"| raw"));else if(F(a,p))return i.loadOptions(a,p,{autoAppend:!0})}},t.prototype.buildSchema=function(e){var t,n,o=k(e.source);return l(l({checkOnItemClick:!0,listItem:{title:"${".concat(e.labelField||"label","|raw}")}},e.pickerSchema),{labelTpl:null!==(n=null===(t=e.pickerSchema)||void 0===t?void 0:t.labelTpl)&&void 0!==n?n:e.labelTpl,type:"crud",pickerMode:!0,syncLocation:!1,filterCanAccessSuperData:!1,api:o?null:e.source,source:o?e.source:null,keepItemSelectionOnPageChange:!0,valueField:e.valueField,labelField:e.labelField,bulkActions:e.multiple?e.pickerSchema.bulkActions:[]})},t.prototype.crudRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.crud=e},t.prototype.reload=function(e,t){if(this.crud)this.crud.reload(e,t);else{var n=this.props.reloadOptions;n&&n(e,t)}},t.prototype.open=function(){this.setState({isOpened:!0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.handleModalConfirm=function(e,t,o,s){return i(this,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return t=(0,W.default)(s,function(e){return"crud"===e.props.type}),[4,this.handleChange(e[t].items)];case 1:return n.sent(),this.close(),[2]}})})},t.prototype.handleChange=function(e){return i(this,void 0,void 0,function(){var t,o,i,s,r,a,l,p,c,d,u,m,h,v;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.joinValues,i=t.valueField,s=t.delimiter,r=t.extractValue,a=t.multiple,l=t.options,t.data,p=t.dispatchEvent,t.selectedOptions,c=t.setOptions,d=t.onChange,u=e,u=o?e.map(function(e){return e[i||"value"]}).join(s||","):r?a?e.map(function(e){return e[i||"value"]}):e[0]&&e[0][i||"value"]||"":a?e:e[0],m=[],e.forEach(function(e){(0,R.default)(l,function(t){return e[i||"value"]==t[i||"value"]})||m.push(e)}),m.length&&c(l.concat(m)),h=a?e:e[0],[4,p("change",O(this.props,{value:u,option:h,selectedItems:h}))];case 1:return(null==(v=n.sent())?void 0:v.prevented)||d(u),[2]}})})},t.prototype.handleItemClick=function(e){return i(this,void 0,void 0,function(){var t,o,i;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.data,[4,(0,t.dispatchEvent)("itemClick",P(o,{item:e}))];case 1:return null==(i=n.sent())||i.prevented,[2]}})})},t.prototype.removeItem=function(e){return i(this,void 0,void 0,function(){var t,o,i,s,r,l,p,c,d,u,m,h,v,f;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.selectedOptions,i=t.joinValues,s=t.extractValue,r=t.delimiter,l=t.valueField,p=t.onChange,c=t.multiple,d=t.dispatchEvent,u=o.concat(),m=a(u.splice(e,1),1),h=m[0],v=u,v=i?u.map(function(e){return e[l||"value"]}).join(r||","):s?c?u.map(function(e){return e[l||"value"]}):u[0]&&u[0][l||"value"]||"":c?u:u[0],[4,d("change",O(this.props,{value:v,option:h,selectedItems:h}))];case 1:return(null==(f=n.sent())?void 0:f.prevented)||p(v),[2]}})})},t.prototype.handleKeyDown=function(e){var t=this.props.selectedOptions;" "===e.key?(this.open(),e.preventDefault()):t.length&&"Backspace"==e.key&&this.removeItem(t.length-1)},t.prototype.handleFocus=function(e){this.input.current&&this.input.current.focus(),e.stopPropagation(),this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1})},t.prototype.handleClick=function(){this.open()},t.prototype.clearValue=function(e){e.stopPropagation();var t=this.props,n=t.onChange,o=t.resetValue;n(void 0!==o?o:"")},t.prototype.getOverflowConfig=function(){var e=this.props.overflowConfig;return(0,z.default)(t.defaultProps.overflowConfig,e)},t.prototype.handleSelect=function(e,t){var n=this.props,o=n.selectedOptions,i=n.valueField;if(Array.isArray(e)&&Array.isArray(t)&&(e.length||t.length)){var s=(0,H.default)(e,o,function(e,t){var n=e[i||"value"],o=t[i||"value"];return n||o?n===o:(0,U.default)((0,M.default)(e,"value"),(0,M.default)(t,"value"))});s.length===e.length&&s.length===o.length||this.handleChange(e)}},t.prototype.renderTag=function(e,t){var n=this,o=this.props,i=o.itemClearable,s=void 0===i||i,r=o.classPrefix,a=o.classnames,p=o.labelField,c=o.labelTpl;o.translate;var d=o.disabled,u=o.env,m=o.id,h=o.themeCss,v=o.css;return B.createElement("div",{key:t,className:a("".concat(r,"Picker-value"),C(l(l({},this.props),{name:"pickValueWrapClassName",id:m,themeCss:h||v})),{"is-disabled":d})},s&&B.createElement("span",{className:a("".concat(r,"Picker-valueIcon"),C(l(l({},this.props),{name:"pickValueIconClassName",id:m,themeCss:h||v}))),onClick:function(e){e.stopPropagation(),n.removeItem(t)}},"×"),B.createElement(j,{inline:!1,tooltip:I(e,p||"label")},B.createElement("span",{className:a("".concat(r,"Picker-valueLabel"),C(l(l({},this.props),{name:"pickFontClassName",id:m,themeCss:h||v}))),onClick:function(t){t.stopPropagation(),n.handleItemClick(e)}},c?B.createElement(D,{html:g(c,e),filterHtml:u.filterHtml}):"".concat(I(e,p||"label")||I(e,"id")))))},t.prototype.renderValues=function(){var e=this,t=this.props;t.classPrefix;var n=t.selectedOptions,o=t.translate;t.disabled;var i=t.multiple,s=t.popOverContainer;t.id,t.themeCss,t.css;var r=this.getOverflowConfig(),a=r.maxTagCount,p=r.overflowTagPopover,c=n,d=!1!==i&&"number"==typeof a&&a>0,u=l({tooltipClassName:(0,x.default)("Picker-overflow",null==p?void 0:p.tooltipClassName),title:o("已选项")},(0,M.default)(p,["children","content","tooltipClassName"]));return B.createElement(E,{enabled:!!d,tooltipClassName:(0,x.default)("Picker-overflow-wrapper"),items:c,popOverContainer:s,tooltipOptions:u,maxVisibleCount:a,renderItem:function(t,n,o){return e.renderTag(t,n)}})},t.prototype.overrideCRUDProps=function(){return{}},t.prototype.renderBody=function(e){var t=(void 0===e?{}:e).popOverContainer,n=this.props,o=n.render,i=n.selectedOptions,s=n.options,r=n.multiple,a=n.valueField,p=n.embed,c=n.source,d=n.strictMode,u=n.testIdBuilder,m=this.getOverflowConfig(),h=m.maxTagCount,v=m.overflowTagPopoverInCRUD,f=m.displayPosition;return o("modal-body",this.state.schema,l(l({value:i,valueField:a,primaryField:a,options:c?[]:s,multiple:r,strictMode:d,onSelect:p?this.handleSelect:void 0,testIdBuilder:null==u?void 0:u.getChild("body-schema"),ref:this.crudRef,popOverContainer:t},p||Array.isArray(f)&&f.includes("crud")?{maxTagCount:h,overflowTagPopover:v}:{}),this.overrideCRUDProps()))},t.prototype.render=function(){var e=this.props,t=e.className;e.style;var n=e.modalClassName,o=e.classnames,i=e.disabled,s=e.render,r=e.modalMode,a=e.source,p=e.modalSize,c=e.clearable,u=e.multiple,h=e.placeholder,v=e.embed,f=e.selectedOptions,y=e.translate,k=e.popOverContainer,b=e.modalTitle,O=e.data,P=e.mobileUI,F=e.env,w=e.themeCss,I=e.css,N=e.id,S=e.classPrefix,E=e.testIdBuilder;return B.createElement("div",{className:o("PickerControl",{"is-mobile":P},t)},v?B.createElement("div",{className:o("Picker")},this.renderBody({popOverContainer:k})):B.createElement("div",{className:o("Picker",{"Picker--single":!u,"Picker--multi":u,"is-focused":this.state.isFocused,"is-disabled":i})},B.createElement("div",{onClick:this.handleClick,className:o("Picker-input",i&&"is-disabled",this.state.isFocused&&"is-focused",C(l(l({},this.props),{name:"pickControlClassName",id:N,themeCss:w||I})))},!f.length&&h?B.createElement("div",{className:o("Picker-placeholder")},y(h)):B.createElement("div",l({className:o("Picker-valueWrap")},null==E?void 0:E.getTestId()),this.renderValues(),B.createElement("input",{onChange:d,value:"",ref:this.input,onKeyDown:this.handleKeyDown,onClick:this.handleFocus,onBlur:this.handleBlur,readOnly:P})),c&&!i&&f.length?B.createElement("a",{onClick:this.clearValue,className:o("Picker-clear")},B.createElement(A,{icon:"input-clear",className:"icon"})):null,B.createElement("span",l({onClick:this.open,className:o("Picker-btn")},null==E?void 0:E.getChild("picker-open-btn").getTestId()),B.createElement(A,{icon:"window-restore",className:o("icon",C(l(l({},this.props),{name:"pickIconClassName",id:N,themeCss:w||I}))),iconContent:"Picker-icon"}))),s("modal",{title:b&&"string"==typeof b?g(b,O):y("Select.placeholder"),size:p,type:r,className:n,body:{children:this.renderBody},testIdBuilder:null==E?void 0:E.getChild("modal")},{key:"modal",lazyRender:!!a,onConfirm:this.handleModalConfirm,onClose:this.close,show:this.state.isOpened})),B.createElement(m,l({},this.props,{config:{themeCss:w||I,classNames:[{key:"pickControlClassName",weights:{default:{important:!0},hover:{important:!0},focused:{important:!0,parent:".".concat(S,"Picker.is-focused >")},disabled:{important:!0,parent:".".concat(S,"Picker.is-disabled >")}}},{key:"pickFontClassName"},{key:"pickValueWrapClassName",weights:{default:{important:!0}}},{key:"pickValueIconClassName",weights:{default:{important:!0},hover:{important:!0}}},{key:"pickIconClassName",weights:{default:{suf:" svg"}}}],id:N},env:F})))},t.propsList=["modalTitle","modalMode","modalSize","pickerSchema","labelField","onChange","options","value","inline","multiple","embed","resetValue","placeholder","onQuery"],t.defaultProps={modalMode:"dialog",multiple:!1,placeholder:"Picker.placeholder",labelField:"label",valueField:"value",pickerSchema:{mode:"list"},embed:!1,overflowConfig:{maxTagCount:-1,displayPosition:["select","crud"],overflowTagPopover:{placement:"top",trigger:"hover",showArrow:!1,offset:[0,-5]},overflowTagPopoverInCRUD:{placement:"bottom",trigger:"hover",showArrow:!1,offset:[0,0]}}},r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",Object)],t.prototype,"fetchOptions",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"crudRef",null),r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"open",null),r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"close",null),r([h,s("design:type",Function),s("design:paramtypes",[Array,Object,Object,Array]),s("design:returntype",Promise)],t.prototype,"handleModalConfirm",null),r([h,s("design:type",Function),s("design:paramtypes",[Array]),s("design:returntype",Promise)],t.prototype,"handleChange",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",Promise)],t.prototype,"handleItemClick",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"handleKeyDown",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"handleFocus",null),r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"handleBlur",null),r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"handleClick",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"clearValue",null),r([h,s("design:type",Function),s("design:paramtypes",[Array,Array]),s("design:returntype",void 0)],t.prototype,"handleSelect",null),r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"overrideCRUDProps",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"renderBody",null),r([V(),s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"render",null),t}(B.PureComponent),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),r([v({type:"picker",autoLoadOptionsFromSource:!1,sizeMutable:!1})],t)}(K);export{L as PickerControlRenderer,K as default};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{a as n,i as o,n as i,o as s,r,s as a,t as l}from"./tslib.es6-TRdqp4ac.js";import{t as p}from"./isEqual-DiNKNUz9.js";import{En as c,Er as d,Ii as u,J as m,Nn as h,P as v,Tn as f,Wi as y,Xr as g,Z as C,Zr as k,an as b,ht as O,oi as P,sn as F,ua as w,vi as I,vn as N,yn as S}from"./esm-Byma-6B-.js";import{mt as E,s as j,tt as T}from"./esm-CM4fvlfi.js";import{o as D,s as A}from"./PopUp-CJyUTmjT.js";import{t as V}from"./StaticHoc-CJgNJAEY.js";var B=/* @__PURE__ */e(t()),x=/* @__PURE__ */e(N()),M=/* @__PURE__ */e(S()),R=/* @__PURE__ */e(f()),U=/* @__PURE__ */e(p()),W=/* @__PURE__ */e(c()),z=/* @__PURE__ */e(y()),H=/* @__PURE__ */e(T()),K=function(e){function t(t){var o=e.call(this,t)||this;o.state={isOpened:!1,schema:o.buildSchema(o.props),isFocused:!1},o.input=B.createRef(),o.toDispose=[],o.mounted=!1;var s=t.formInited,r=t.addHook,a=t.formItem,l=function(){return i(o,void 0,void 0,function(){var e=this;return n(this,function(t){switch(t.label){case 0:return[4,this.fetchOptions()];case 1:return t.sent(),this.mounted&&this.toDispose.push(w(function(){return JSON.stringify(null==a?void 0:a.tmpValue)},function(){return e.fetchOptions()})),[2]}})})};return a&&o.toDispose.push(s||!r?a.addInitHook(l):r(l,"init")),o}return o(t,e),t.prototype.componentDidMount=function(){this.mounted=!0},t.prototype.componentDidUpdate=function(e){var t,n=this.props;["multiple","source","pickerSchema"].some(function(t){return!(0,U.default)(e[t],n[t])})?this.setState({schema:this.buildSchema(n)}):b(e.source,n.source,e.data,n.data)&&null!==(t=n.formItem)&&void 0!==t&&t.inited&&this.fetchOptions()},t.prototype.componentWillUnmount=function(){this.toDispose.forEach(function(e){return e()}),this.toDispose=[],this.mounted=!1},t.prototype.fetchOptions=function(){var e,t,n=this.props,o=n.value,i=n.formItem,s=n.valueField,r=n.labelField,a=n.source,l=n.data;if(a&&i&&(s||"value")!==(r||"label")&&(!(t=i.getSelectedOptions(o))||t.length&&t[0][s||"value"]===t[0][r||"label"])){var p=P(l,((e={value:o})[s||"value"]=o,e.op="loadOptions",e));if(k(a))i.setOptions(u(a,l,"| raw"));else if(F(a,p))return i.loadOptions(a,p,{autoAppend:!0})}},t.prototype.buildSchema=function(e){var t,n,o=k(e.source);return l(l({checkOnItemClick:!0,listItem:{title:"${".concat(e.labelField||"label","|raw}")}},e.pickerSchema),{labelTpl:null!==(n=null===(t=e.pickerSchema)||void 0===t?void 0:t.labelTpl)&&void 0!==n?n:e.labelTpl,type:"crud",pickerMode:!0,syncLocation:!1,filterCanAccessSuperData:!1,api:o?null:e.source,source:o?e.source:null,keepItemSelectionOnPageChange:!0,valueField:e.valueField,labelField:e.labelField,bulkActions:e.multiple?e.pickerSchema.bulkActions:[]})},t.prototype.crudRef=function(e){for(;e&&e.getWrappedInstance;)e=e.getWrappedInstance();this.crud=e},t.prototype.reload=function(e,t){if(this.crud)this.crud.reload(e,t);else{var n=this.props.reloadOptions;n&&n(e,t)}},t.prototype.open=function(){this.setState({isOpened:!0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.handleModalConfirm=function(e,t,o,s){return i(this,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return t=(0,W.default)(s,function(e){return"crud"===e.props.type}),[4,this.handleChange(e[t].items)];case 1:return n.sent(),this.close(),[2]}})})},t.prototype.handleChange=function(e){return i(this,void 0,void 0,function(){var t,o,i,s,r,a,l,p,c,d,u,m,h,v;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.joinValues,i=t.valueField,s=t.delimiter,r=t.extractValue,a=t.multiple,l=t.options,t.data,p=t.dispatchEvent,t.selectedOptions,c=t.setOptions,d=t.onChange,u=e,u=o?e.map(function(e){return e[i||"value"]}).join(s||","):r?a?e.map(function(e){return e[i||"value"]}):e[0]&&e[0][i||"value"]||"":a?e:e[0],m=[],e.forEach(function(e){(0,R.default)(l,function(t){return e[i||"value"]==t[i||"value"]})||m.push(e)}),m.length&&c(l.concat(m)),h=a?e:e[0],[4,p("change",O(this.props,{value:u,option:h,selectedItems:h}))];case 1:return(null==(v=n.sent())?void 0:v.prevented)||d(u),[2]}})})},t.prototype.handleItemClick=function(e){return i(this,void 0,void 0,function(){var t,o,i;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.data,[4,(0,t.dispatchEvent)("itemClick",P(o,{item:e}))];case 1:return null==(i=n.sent())||i.prevented,[2]}})})},t.prototype.removeItem=function(e){return i(this,void 0,void 0,function(){var t,o,i,s,r,l,p,c,d,u,m,h,v,f;return n(this,function(n){switch(n.label){case 0:return t=this.props,o=t.selectedOptions,i=t.joinValues,s=t.extractValue,r=t.delimiter,l=t.valueField,p=t.onChange,c=t.multiple,d=t.dispatchEvent,u=o.concat(),m=a(u.splice(e,1),1),h=m[0],v=u,v=i?u.map(function(e){return e[l||"value"]}).join(r||","):s?c?u.map(function(e){return e[l||"value"]}):u[0]&&u[0][l||"value"]||"":c?u:u[0],[4,d("change",O(this.props,{value:v,option:h,selectedItems:h}))];case 1:return(null==(f=n.sent())?void 0:f.prevented)||p(v),[2]}})})},t.prototype.handleKeyDown=function(e){var t=this.props.selectedOptions;" "===e.key?(this.open(),e.preventDefault()):t.length&&"Backspace"==e.key&&this.removeItem(t.length-1)},t.prototype.handleFocus=function(e){this.input.current&&this.input.current.focus(),e.stopPropagation(),this.setState({isFocused:!0})},t.prototype.handleBlur=function(){this.setState({isFocused:!1})},t.prototype.handleClick=function(){this.open()},t.prototype.clearValue=function(e){e.stopPropagation();var t=this.props,n=t.onChange,o=t.resetValue;n(void 0!==o?o:"")},t.prototype.getOverflowConfig=function(){var e=this.props.overflowConfig;return(0,z.default)(t.defaultProps.overflowConfig,e)},t.prototype.handleSelect=function(e,t){var n=this.props,o=n.selectedOptions,i=n.valueField;if(Array.isArray(e)&&Array.isArray(t)&&(e.length||t.length)){var s=(0,H.default)(e,o,function(e,t){var n=e[i||"value"],o=t[i||"value"];return n||o?n===o:(0,U.default)((0,M.default)(e,"value"),(0,M.default)(t,"value"))});s.length===e.length&&s.length===o.length||this.handleChange(e)}},t.prototype.renderTag=function(e,t){var n=this,o=this.props,i=o.itemClearable,s=void 0===i||i,r=o.classPrefix,a=o.classnames,p=o.labelField,c=o.labelTpl;o.translate;var d=o.disabled,u=o.env,m=o.id,h=o.themeCss,v=o.css;return B.createElement("div",{key:t,className:a("".concat(r,"Picker-value"),C(l(l({},this.props),{name:"pickValueWrapClassName",id:m,themeCss:h||v})),{"is-disabled":d})},s&&B.createElement("span",{className:a("".concat(r,"Picker-valueIcon"),C(l(l({},this.props),{name:"pickValueIconClassName",id:m,themeCss:h||v}))),onClick:function(e){e.stopPropagation(),n.removeItem(t)}},"×"),B.createElement(j,{inline:!1,tooltip:I(e,p||"label")},B.createElement("span",{className:a("".concat(r,"Picker-valueLabel"),C(l(l({},this.props),{name:"pickFontClassName",id:m,themeCss:h||v}))),onClick:function(t){t.stopPropagation(),n.handleItemClick(e)}},c?B.createElement(D,{html:g(c,e),filterHtml:u.filterHtml}):"".concat(I(e,p||"label")||I(e,"id")))))},t.prototype.renderValues=function(){var e=this,t=this.props;t.classPrefix;var n=t.selectedOptions,o=t.translate;t.disabled;var i=t.multiple,s=t.popOverContainer;t.id,t.themeCss,t.css;var r=this.getOverflowConfig(),a=r.maxTagCount,p=r.overflowTagPopover,c=n,d=!1!==i&&"number"==typeof a&&a>0,u=l({tooltipClassName:(0,x.default)("Picker-overflow",null==p?void 0:p.tooltipClassName),title:o("已选项")},(0,M.default)(p,["children","content","tooltipClassName"]));return B.createElement(E,{enabled:!!d,tooltipClassName:(0,x.default)("Picker-overflow-wrapper"),items:c,popOverContainer:s,tooltipOptions:u,maxVisibleCount:a,renderItem:function(t,n,o){return e.renderTag(t,n)}})},t.prototype.overrideCRUDProps=function(){return{}},t.prototype.renderBody=function(e){var t=(void 0===e?{}:e).popOverContainer,n=this.props,o=n.render,i=n.selectedOptions,s=n.options,r=n.multiple,a=n.valueField,p=n.embed,c=n.source,d=n.strictMode,u=n.testIdBuilder,m=this.getOverflowConfig(),h=m.maxTagCount,v=m.overflowTagPopoverInCRUD,f=m.displayPosition;return o("modal-body",this.state.schema,l(l({value:i,valueField:a,primaryField:a,options:c?[]:s,multiple:r,strictMode:d,onSelect:p?this.handleSelect:void 0,testIdBuilder:null==u?void 0:u.getChild("body-schema"),ref:this.crudRef,popOverContainer:t},p||Array.isArray(f)&&f.includes("crud")?{maxTagCount:h,overflowTagPopover:v}:{}),this.overrideCRUDProps()))},t.prototype.render=function(){var e=this.props,t=e.className;e.style;var n=e.modalClassName,o=e.classnames,i=e.disabled,s=e.render,r=e.modalMode,a=e.source,p=e.modalSize,c=e.clearable,u=e.multiple,h=e.placeholder,v=e.embed,f=e.selectedOptions,y=e.translate,k=e.popOverContainer,b=e.modalTitle,O=e.data,P=e.mobileUI,F=e.env,w=e.themeCss,I=e.css,N=e.id,S=e.classPrefix,E=e.testIdBuilder;return B.createElement("div",{className:o("PickerControl",{"is-mobile":P},t)},v?B.createElement("div",{className:o("Picker")},this.renderBody({popOverContainer:k})):B.createElement("div",{className:o("Picker",{"Picker--single":!u,"Picker--multi":u,"is-focused":this.state.isFocused,"is-disabled":i})},B.createElement("div",{onClick:this.handleClick,className:o("Picker-input",i&&"is-disabled",this.state.isFocused&&"is-focused",C(l(l({},this.props),{name:"pickControlClassName",id:N,themeCss:w||I})))},!f.length&&h?B.createElement("div",{className:o("Picker-placeholder")},y(h)):B.createElement("div",l({className:o("Picker-valueWrap")},null==E?void 0:E.getTestId()),this.renderValues(),B.createElement("input",{onChange:d,value:"",ref:this.input,onKeyDown:this.handleKeyDown,onClick:this.handleFocus,onBlur:this.handleBlur,readOnly:P})),c&&!i&&f.length?B.createElement("a",{onClick:this.clearValue,className:o("Picker-clear")},B.createElement(A,{icon:"input-clear",className:"icon"})):null,B.createElement("span",l({onClick:this.open,className:o("Picker-btn")},null==E?void 0:E.getChild("picker-open-btn").getTestId()),B.createElement(A,{icon:"window-restore",className:o("icon",C(l(l({},this.props),{name:"pickIconClassName",id:N,themeCss:w||I}))),iconContent:"Picker-icon"}))),s("modal",{title:b&&"string"==typeof b?g(b,O):y("Select.placeholder"),size:p,type:r,className:n,body:{children:this.renderBody},testIdBuilder:null==E?void 0:E.getChild("modal")},{key:"modal",lazyRender:!!a,onConfirm:this.handleModalConfirm,onClose:this.close,show:this.state.isOpened})),B.createElement(m,l({},this.props,{config:{themeCss:w||I,classNames:[{key:"pickControlClassName",weights:{default:{important:!0},hover:{important:!0},focused:{important:!0,parent:".".concat(S,"Picker.is-focused >")},disabled:{important:!0,parent:".".concat(S,"Picker.is-disabled >")}}},{key:"pickFontClassName"},{key:"pickValueWrapClassName",weights:{default:{important:!0}}},{key:"pickValueIconClassName",weights:{default:{important:!0},hover:{important:!0}}},{key:"pickIconClassName",weights:{default:{suf:" svg"}}}],id:N},env:F})))},t.propsList=["modalTitle","modalMode","modalSize","pickerSchema","labelField","onChange","options","value","inline","multiple","embed","resetValue","placeholder","onQuery"],t.defaultProps={modalMode:"dialog",multiple:!1,placeholder:"Picker.placeholder",labelField:"label",valueField:"value",pickerSchema:{mode:"list"},embed:!1,overflowConfig:{maxTagCount:-1,displayPosition:["select","crud"],overflowTagPopover:{placement:"top",trigger:"hover",showArrow:!1,offset:[0,-5]},overflowTagPopoverInCRUD:{placement:"bottom",trigger:"hover",showArrow:!1,offset:[0,0]}}},r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",Object)],t.prototype,"fetchOptions",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"crudRef",null),r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"open",null),r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"close",null),r([h,s("design:type",Function),s("design:paramtypes",[Array,Object,Object,Array]),s("design:returntype",Promise)],t.prototype,"handleModalConfirm",null),r([h,s("design:type",Function),s("design:paramtypes",[Array]),s("design:returntype",Promise)],t.prototype,"handleChange",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",Promise)],t.prototype,"handleItemClick",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"handleKeyDown",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"handleFocus",null),r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"handleBlur",null),r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"handleClick",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"clearValue",null),r([h,s("design:type",Function),s("design:paramtypes",[Array,Array]),s("design:returntype",void 0)],t.prototype,"handleSelect",null),r([h,s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"overrideCRUDProps",null),r([h,s("design:type",Function),s("design:paramtypes",[Object]),s("design:returntype",void 0)],t.prototype,"renderBody",null),r([V(),s("design:type",Function),s("design:paramtypes",[]),s("design:returntype",void 0)],t.prototype,"render",null),t}(B.PureComponent),L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),r([v({type:"picker",autoLoadOptionsFromSource:!1,sizeMutable:!1})],t)}(K);export{L as PickerControlRenderer,K as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as n,o as a,r as s}from"./tslib.es6-TRdqp4ac.js";import{$n as o,Nn as i,Xr as r,it as p,oi as l}from"./esm-D3qvBzlk.js";var d=/* @__PURE__ */e(t()),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.handleClick=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n("click",l(a,{nativeEvent:e}))},t.prototype.handleMouseEnter=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n(e,l(a,{nativeEvent:e}))},t.prototype.handleMouseLeave=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n(e,l(a,{nativeEvent:e}))},t.prototype.render=function(){var e=this.props,t=e.className,n=e.style,a=e.wrapperComponent,s=e.text,i=e.data,p=e.tpl,l=e.inline,u=e.placeholder,c=e.classnames,h=o(this.props),m=a||(l?"span":"div");return d.createElement(m,{className:c("PlainField",t),style:n,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},p||s?r(p||s,i):void 0===h||""===h||null===h?d.createElement("span",{className:"text-muted"},u):String(h))},t.defaultProps={wrapperComponent:"",inline:!0,placeholder:"-"},s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleClick",null),s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),t}(d.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),s([p({type:"plain",alias:["text"],name:"plain"})],t)}(u);export{u as Plain,c as PlainRenderer};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as n,o as a,r as s}from"./tslib.es6-TRdqp4ac.js";import{$n as o,Nn as i,Xr as r,it as p,oi as l}from"./esm-Byma-6B-.js";var d=/* @__PURE__ */e(t()),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),t.prototype.handleClick=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n("click",l(a,{nativeEvent:e}))},t.prototype.handleMouseEnter=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n(e,l(a,{nativeEvent:e}))},t.prototype.handleMouseLeave=function(e){var t=this.props,n=t.dispatchEvent,a=t.data;n(e,l(a,{nativeEvent:e}))},t.prototype.render=function(){var e=this.props,t=e.className,n=e.style,a=e.wrapperComponent,s=e.text,i=e.data,p=e.tpl,l=e.inline,u=e.placeholder,c=e.classnames,h=o(this.props),m=a||(l?"span":"div");return d.createElement(m,{className:c("PlainField",t),style:n,onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},p||s?r(p||s,i):void 0===h||""===h||null===h?d.createElement("span",{className:"text-muted"},u):String(h))},t.defaultProps={wrapperComponent:"",inline:!0,placeholder:"-"},s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleClick",null),s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleMouseEnter",null),s([i,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"handleMouseLeave",null),t}(d.Component),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),s([p({type:"plain",alias:["text"],name:"plain"})],t)}(u);export{u as Plain,c as PlainRenderer};
@@ -1,4 +1,4 @@
1
- import{o as e,t as n}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{c as r,i as l,s as a,t as o}from"./tslib.es6-TRdqp4ac.js";import{f as c}from"./function-CrEuBBd9.js";import{F as i}from"./isEqual-DiNKNUz9.js";import{G as s,R as u,T as v,a as p,c as h,h as m,jr as f,k as g,l as d,la as w,o as y,s as E,sa as b,tt as O,ua as x,ui as C,vn as j}from"./esm-D3qvBzlk.js";import{t as M}from"./react-dom-D_0O8_TK.js";var N,P=/* @__PURE__ */n((e,n)=>{var t=c();n.exports=function(e){return"function"==typeof e?e:t}}),L=/* @__PURE__ */e(j()),H=/* @__PURE__ */e(t());function z(){return z=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},z.apply(null,arguments)}var B,V,Z,k,T=function(e){/*#__PURE__*/
1
+ import{o as e,t as n}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{c as r,i as l,s as a,t as o}from"./tslib.es6-TRdqp4ac.js";import{f as c}from"./function-CrEuBBd9.js";import{F as i}from"./isEqual-DiNKNUz9.js";import{G as s,R as u,T as v,a as p,c as h,h as m,jr as f,k as g,l as d,la as w,o as y,s as E,sa as b,tt as O,ua as x,ui as C,vn as j}from"./esm-Byma-6B-.js";import{t as M}from"./react-dom-D_0O8_TK.js";var N,P=/* @__PURE__ */n((e,n)=>{var t=c();n.exports=function(e){return"function"==typeof e?e:t}}),L=/* @__PURE__ */e(j()),H=/* @__PURE__ */e(t());function z(){return z=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},z.apply(null,arguments)}var B,V,Z,k,T=function(e){/*#__PURE__*/
2
2
  return H.createElement("svg",z({viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",className:"icon"},e),N||(N=/*#__PURE__*/H.createElement("path",{d:"m13.5 1.44 1.06 1.06L9.06 8l5.5 5.5-1.06 1.06L8 9.06l-5.5 5.5-1.06-1.06L6.938 8l-5.5-5.5L2.5 1.44 8 6.938z",fill:"currentColor"})))};function S(){return S=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},S.apply(null,arguments)}function R(){return R=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},R.apply(null,arguments)}function F(){return F=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},F.apply(null,arguments)}var A,_,U,D=function(e){/*#__PURE__*/
3
3
  return H.createElement("svg",F({viewBox:"0 0 854 768",xmlns:"http://www.w3.org/2000/svg",className:"icon"},e),k||(k=/*#__PURE__*/H.createElement("path",{d:"M576.333 213.333H82.04L265.293 30.08 235 0 .333 234.667 235 469.333l30.08-30.08L82.04 256h494.293c129.597.008 234.652 105.07 234.652 234.667S705.93 725.325 576.333 725.333H363V768h213.333c153.167 0 277.334-124.166 277.334-277.333 0-153.167-124.167-277.334-277.334-277.334Z",fill:"currentColor"})))};function I(){return I=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},I.apply(null,arguments)}function W(){return W=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},W.apply(null,arguments)}var q,G=function(e){/*#__PURE__*/
4
4
  return H.createElement("svg",W({viewBox:"0 0 854 768",xmlns:"http://www.w3.org/2000/svg",className:"icon"},e),U||(U=/*#__PURE__*/H.createElement("path",{d:"m619 0-30.08 30.08 183.04 183.253H277.667C124.5 213.333.333 337.5.333 490.667S124.5 768 277.667 768H491v-42.667H277.667c-129.597-.008-234.652-105.07-234.652-234.666C43.015 361.07 148.07 256.008 277.667 256H771.96L588.707 439.253 619 469.333l234.667-234.666L619 0Z",fill:"currentColor"})))};function J(){return J=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)({}).hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},J.apply(null,arguments)}var K,Q,X=function(e){/*#__PURE__*/
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as a,o as n,r,s,t as o,u as l}from"./tslib.es6-TRdqp4ac.js";import{Nn as i,Xr as c,_i as d,dn as u,hr as p,it as m,oi as y,qt as b,ui as f,xr as h}from"./esm-D3qvBzlk.js";import{St as v,xt as E}from"./esm-DdEfrmRq.js";var x=/* @__PURE__ */e(t()),N=/* @__PURE__ */e(b()),T=function(e){function t(t){var a=e.call(this,t)||this;return a.state={activeKey:t.activeKey||0},a}return a(t,e),t.prototype.handleSelect=function(e){var t=this.props,a=t.onSelect,n=t.tabs;if("number"==typeof e&&e<n.length&&this.setState({activeKey:e}),"string"==typeof a){var r=u(a,"key","props");r&&r(e,this.props)}else"function"==typeof a&&a(e,this.props)},t.prototype.renderToolbarItem=function(e){var t=this.props.render,a=[];return Array.isArray(e)&&e.forEach(function(e,n){return a.push(t("toolbar/".concat(n),o({type:"button",level:"link",size:"sm"},e),{key:n}))}),a},t.prototype.renderToolbar=function(){var e=this.props,t=e.toolbar,a=e.classnames,n=e.classPrefix,r=e.tabs,s=this.state.activeKey,o=null,l=null,i=t?x.createElement("div",{className:a("".concat(n,"toolbar"))},this.renderToolbarItem(t)):null;return void 0!==s&&(l=(o=r[s].toolbar)?x.createElement("div",{className:a("".concat(n,"tab-toolbar"))},this.renderToolbarItem(o)):null),i||l?x.createElement("div",{className:a("".concat(n,"Portlet-toolbar"))},i,l):null},t.prototype.renderDesc=function(){var e=this.props,t=e.description;e.render;var a=e.classnames,n=e.classPrefix,r=e.data,s=c(t,r);return s?x.createElement("span",{className:a("".concat(n,"Portlet-header-desc"))},s):null},t.prototype.renderTabs=function(){var e,t=this,a=this.props,n=a.classnames,r=a.classPrefix,i=a.tabsClassName,u=a.contentClassName,m=a.linksClassName,b=a.tabRender,N=a.render,T=a.data,O=a.mode,P=a.tabsMode,K=a.unmountOnExit,g=a.source,k=a.mountOnEnter,S=a.scrollable,A=a.translate,C=a.addBtnText,j=a.divider,B=P||O,I=d(g,T),D=this.props.tabs;if(!D)return null;D=Array.isArray(D)?D:[D];var q=[],w=n("".concat(r,"Portlet-tab"),i,((e={})["unactive-select"]=D.length<=1,e["no-divider"]=!j,e));return Array.isArray(I)?I.forEach(function(e,t){var a=y(T,f(e)?o({index:t},e):{item:e,index:t});q.push.apply(q,l([],s(D.map(function(e,n){return h(e,a)?x.createElement(E,o({},e,{title:c(e.title,a),disabled:p(e,a),key:"".concat(1e3*t+n),eventKey:1e3*t+n,mountOnEnter:k,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:K}),N("item/".concat(t,"/").concat(n),(null==e?void 0:e.type)?e:e.tab||e.body,{data:a})):null})),!1))}):q=D.map(function(e,a){return h(e,T)?x.createElement(E,o({},e,{title:c(e.title,T),disabled:p(e,T),key:a,eventKey:a,mountOnEnter:k,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:K}),t.renderTab?t.renderTab(e,t.props,a):b?b(e,t.props,a):N("tab/".concat(a),(null==e?void 0:e.type)?e:e.tab||e.body)):null}),x.createElement(v,{addBtnText:A(C||"add"),classPrefix:r,classnames:n,mode:B,className:w,contentClassName:u,linksClassName:m,activeKey:this.state.activeKey,onSelect:this.handleSelect,toolbar:this.renderToolbar(),additionBtns:this.renderDesc(),scrollable:S},q)},t.prototype.render=function(){var e,t=this.props,a=t.className,n=t.data,r=t.classnames,s=t.classPrefix,o=t.style,l=t.hideHeader,i=r("".concat(s,"Portlet"),a,((e={})["no-header"]=l,e)),c="string"==typeof o?d(o,n)||{}:(0,N.default)(o,function(e){return d(e,n)||e});return x.createElement("div",{className:i,style:c},this.renderTabs())},t.defaultProps={className:"",mode:"line",divider:!0},r([i,n("design:type",Function),n("design:paramtypes",[Number]),n("design:returntype",void 0)],t.prototype,"handleSelect",null),t}(x.Component),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([m({type:"portlet"})],t)}(T);export{T as Portlet,O as PortletRenderer};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as a,o as n,r,s,t as o,u as l}from"./tslib.es6-TRdqp4ac.js";import{Nn as i,Xr as c,_i as d,dn as u,hr as p,it as m,oi as y,qt as b,ui as f,xr as h}from"./esm-Byma-6B-.js";import{St as v,xt as E}from"./esm-CM4fvlfi.js";var x=/* @__PURE__ */e(t()),N=/* @__PURE__ */e(b()),T=function(e){function t(t){var a=e.call(this,t)||this;return a.state={activeKey:t.activeKey||0},a}return a(t,e),t.prototype.handleSelect=function(e){var t=this.props,a=t.onSelect,n=t.tabs;if("number"==typeof e&&e<n.length&&this.setState({activeKey:e}),"string"==typeof a){var r=u(a,"key","props");r&&r(e,this.props)}else"function"==typeof a&&a(e,this.props)},t.prototype.renderToolbarItem=function(e){var t=this.props.render,a=[];return Array.isArray(e)&&e.forEach(function(e,n){return a.push(t("toolbar/".concat(n),o({type:"button",level:"link",size:"sm"},e),{key:n}))}),a},t.prototype.renderToolbar=function(){var e=this.props,t=e.toolbar,a=e.classnames,n=e.classPrefix,r=e.tabs,s=this.state.activeKey,o=null,l=null,i=t?x.createElement("div",{className:a("".concat(n,"toolbar"))},this.renderToolbarItem(t)):null;return void 0!==s&&(l=(o=r[s].toolbar)?x.createElement("div",{className:a("".concat(n,"tab-toolbar"))},this.renderToolbarItem(o)):null),i||l?x.createElement("div",{className:a("".concat(n,"Portlet-toolbar"))},i,l):null},t.prototype.renderDesc=function(){var e=this.props,t=e.description;e.render;var a=e.classnames,n=e.classPrefix,r=e.data,s=c(t,r);return s?x.createElement("span",{className:a("".concat(n,"Portlet-header-desc"))},s):null},t.prototype.renderTabs=function(){var e,t=this,a=this.props,n=a.classnames,r=a.classPrefix,i=a.tabsClassName,u=a.contentClassName,m=a.linksClassName,b=a.tabRender,N=a.render,T=a.data,O=a.mode,P=a.tabsMode,K=a.unmountOnExit,g=a.source,k=a.mountOnEnter,S=a.scrollable,A=a.translate,C=a.addBtnText,j=a.divider,B=P||O,I=d(g,T),D=this.props.tabs;if(!D)return null;D=Array.isArray(D)?D:[D];var q=[],w=n("".concat(r,"Portlet-tab"),i,((e={})["unactive-select"]=D.length<=1,e["no-divider"]=!j,e));return Array.isArray(I)?I.forEach(function(e,t){var a=y(T,f(e)?o({index:t},e):{item:e,index:t});q.push.apply(q,l([],s(D.map(function(e,n){return h(e,a)?x.createElement(E,o({},e,{title:c(e.title,a),disabled:p(e,a),key:"".concat(1e3*t+n),eventKey:1e3*t+n,mountOnEnter:k,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:K}),N("item/".concat(t,"/").concat(n),(null==e?void 0:e.type)?e:e.tab||e.body,{data:a})):null})),!1))}):q=D.map(function(e,a){return h(e,T)?x.createElement(E,o({},e,{title:c(e.title,T),disabled:p(e,T),key:a,eventKey:a,mountOnEnter:k,unmountOnExit:"boolean"==typeof e.reload?e.reload:"boolean"==typeof e.unmountOnExit?e.unmountOnExit:K}),t.renderTab?t.renderTab(e,t.props,a):b?b(e,t.props,a):N("tab/".concat(a),(null==e?void 0:e.type)?e:e.tab||e.body)):null}),x.createElement(v,{addBtnText:A(C||"add"),classPrefix:r,classnames:n,mode:B,className:w,contentClassName:u,linksClassName:m,activeKey:this.state.activeKey,onSelect:this.handleSelect,toolbar:this.renderToolbar(),additionBtns:this.renderDesc(),scrollable:S},q)},t.prototype.render=function(){var e,t=this.props,a=t.className,n=t.data,r=t.classnames,s=t.classPrefix,o=t.style,l=t.hideHeader,i=r("".concat(s,"Portlet"),a,((e={})["no-header"]=l,e)),c="string"==typeof o?d(o,n)||{}:(0,N.default)(o,function(e){return d(e,n)||e});return x.createElement("div",{className:i,style:c},this.renderTabs())},t.defaultProps={className:"",mode:"line",divider:!0},r([i,n("design:type",Function),n("design:paramtypes",[Number]),n("design:returntype",void 0)],t.prototype,"handleSelect",null),t}(x.Component),O=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),r([m({type:"portlet"})],t)}(T);export{T as Portlet,O as PortletRenderer};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as a,o,r as s}from"./tslib.es6-TRdqp4ac.js";import{t as r}from"./isEqual-DiNKNUz9.js";import{$n as n,Nn as l,Xr as p,dt as i,it as u,kt as m,oi as c}from"./esm-D3qvBzlk.js";import{h}from"./esm-DdEfrmRq.js";var d=/* @__PURE__ */e(t()),f=/* @__PURE__ */e(r()),v=/* @__PURE__ */e(m()),g=["name","value","data","defaultValue"],y=function(e){function t(t){var a=e.call(this,t)||this;return a.state={value:a.getValue()},a}return a(t,e),t.prototype.componentDidUpdate=function(e){(0,f.default)((0,v.default)(e,g),(0,v.default)(this.props,g))||this.setState({value:this.getValue()})},t.prototype.getValue=function(){var e=n(this.props);return e="number"==typeof e?e:p(e,this.props.data),/^\d*\.?\d+$/.test(e)&&(e=parseFloat(e)),e},t.prototype.format=function(e){var t=this.props,a=t.valueTpl,o=t.render,s=t.data;return o("progress-value",a||"${value}%",{data:c(s,{value:e})})},t.prototype.render=function(){var e=this.props,t=e.data,a=e.mode,o=e.className,s=e.style,r=e.placeholder,n=e.progressClassName,l=e.map,i=e.stripe,u=e.animate,m=e.showLabel,c=e.strokeWidth,f=e.gapDegree,v=e.gapPosition;e.classnames;var g=e.threshold,y=e.showThresholdText,b=this.state.value;return g&&(Array.isArray(g)?g.forEach(function(e){e.value="string"==typeof e.value?p(e.value,t):e.value,e.color&&(e.color=p(e.color,t))}):(g.value=p(g.value,t),g.color&&(g.color=p(g.color,t)))),d.createElement(h,{value:b,type:a,map:l,stripe:i,animate:u,showLabel:m,placeholder:r,format:this.format,strokeWidth:c,gapDegree:f,gapPosition:v,className:o,style:s,progressClassName:n,threshold:g,showThresholdText:y})},t.defaultProps={placeholder:"-",progressClassName:"",progressBarClassName:"",map:["bg-danger","bg-warning","bg-info","bg-success","bg-success"],valueTpl:"${value}%",showLabel:!0,stripe:!1,animate:!1},s([l,o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",void 0)],t.prototype,"format",null),t}(d.Component),b=function(e){function t(t,a){var o=e.call(this,t)||this;return a.registerComponent(o),o}return a(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.prototype.doAction=function(e,t,a,o){"reset"===(null==e?void 0:e.actionType)&&this.setState({value:0})},t.prototype.setData=function(e){"number"!=typeof e&&"number"!=typeof+e||this.setState({value:+e})},t.contextType=i,s([u({type:"progress"}),o("design:paramtypes",[Object,Object])],t)}(y);export{y as ProgressField,b as ProgressFieldRenderer};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as a,o,r as s}from"./tslib.es6-TRdqp4ac.js";import{t as r}from"./isEqual-DiNKNUz9.js";import{$n as n,Nn as l,Xr as p,dt as i,it as u,kt as m,oi as c}from"./esm-Byma-6B-.js";import{h}from"./esm-CM4fvlfi.js";var d=/* @__PURE__ */e(t()),f=/* @__PURE__ */e(r()),v=/* @__PURE__ */e(m()),g=["name","value","data","defaultValue"],y=function(e){function t(t){var a=e.call(this,t)||this;return a.state={value:a.getValue()},a}return a(t,e),t.prototype.componentDidUpdate=function(e){(0,f.default)((0,v.default)(e,g),(0,v.default)(this.props,g))||this.setState({value:this.getValue()})},t.prototype.getValue=function(){var e=n(this.props);return e="number"==typeof e?e:p(e,this.props.data),/^\d*\.?\d+$/.test(e)&&(e=parseFloat(e)),e},t.prototype.format=function(e){var t=this.props,a=t.valueTpl,o=t.render,s=t.data;return o("progress-value",a||"${value}%",{data:c(s,{value:e})})},t.prototype.render=function(){var e=this.props,t=e.data,a=e.mode,o=e.className,s=e.style,r=e.placeholder,n=e.progressClassName,l=e.map,i=e.stripe,u=e.animate,m=e.showLabel,c=e.strokeWidth,f=e.gapDegree,v=e.gapPosition;e.classnames;var g=e.threshold,y=e.showThresholdText,b=this.state.value;return g&&(Array.isArray(g)?g.forEach(function(e){e.value="string"==typeof e.value?p(e.value,t):e.value,e.color&&(e.color=p(e.color,t))}):(g.value=p(g.value,t),g.color&&(g.color=p(g.color,t)))),d.createElement(h,{value:b,type:a,map:l,stripe:i,animate:u,showLabel:m,placeholder:r,format:this.format,strokeWidth:c,gapDegree:f,gapPosition:v,className:o,style:s,progressClassName:n,threshold:g,showThresholdText:y})},t.defaultProps={placeholder:"-",progressClassName:"",progressBarClassName:"",map:["bg-danger","bg-warning","bg-info","bg-success","bg-success"],valueTpl:"${value}%",showLabel:!0,stripe:!1,animate:!1},s([l,o("design:type",Function),o("design:paramtypes",[Number]),o("design:returntype",void 0)],t.prototype,"format",null),t}(d.Component),b=function(e){function t(t,a){var o=e.call(this,t)||this;return a.registerComponent(o),o}return a(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.prototype.doAction=function(e,t,a,o){"reset"===(null==e?void 0:e.actionType)&&this.setState({value:0})},t.prototype.setData=function(e){"number"!=typeof e&&"number"!=typeof+e||this.setState({value:+e})},t.contextType=i,s([u({type:"progress"}),o("design:paramtypes",[Object,Object])],t)}(y);export{y as ProgressField,b as ProgressFieldRenderer};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{d as r,i as n,r as a}from"./tslib.es6-TRdqp4ac.js";import{E as l,Ur as o,it as s}from"./esm-D3qvBzlk.js";var c=/* @__PURE__ */e(t()),p=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t.prototype.prepareRows=function(){var e,t,n=this.props,a=n.column,l=void 0===a?3:a,s=n.items,c=n.source,p=n.data,i=[],m=[],u=l,y=0,d=o(s||c||[],p);try{for(var h=r(d),f=h.next();!f.done;f=h.next()){var v=f.value;y+=1;var b=Math.min(v.span||1,l);u-=b;var E={label:v.label,content:v.content,span:b};u>=0?m.push(E):(i.push(m),u=l-b,m=[E]),y===d.length&&i.push(m)}}catch(w){e={error:w}}finally{try{f&&!f.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}return i},t.prototype.renderRow=function(e){var t=this.props,r=t.render,n=t.contentStyle,a=t.labelStyle,o=t.separator,s=void 0===o?": ":o,p=t.mode,i=void 0===p?"table":p,m=t.data;return e.map(function(e,t){return c.createElement("tr",{key:t},e.map(function(e,t){return"table"===i?c.createElement(c.Fragment,{key:"item-".concat(t)},c.createElement("th",{style:l(a,m)},r("label",e.label)),c.createElement("td",{colSpan:e.span+e.span-1,style:l(n,m)},r("content",e.content))):c.createElement("td",{colSpan:e.span,style:l(n,m),key:"item-".concat(t)},c.createElement("span",{style:l(a,m)},r("label",e.label)),s,r("content",e.content))}))})},t.prototype.render=function(){var e=this.props,t=e.style,r=e.title,n=e.column,a=void 0===n?3:n,o=e.classnames,s=e.className,p=e.titleStyle,i=e.data,m=e.mode,u=void 0===m?"table":m,y=this.prepareRows();return c.createElement("div",{className:o("Property","Property--".concat(u),s),style:l(t,i)},c.createElement("table",null,r?c.createElement("thead",null,c.createElement("tr",null,c.createElement("th",{colSpan:"table"===u?a+a:a,style:l(p,i)},r))):null,c.createElement("tbody",null,this.renderRow(y))))},t}(c.Component),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([s({type:"property",autoVar:!0})],t)}(p);export{i as PropertyRenderer,p as default};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{d as r,i as n,r as a}from"./tslib.es6-TRdqp4ac.js";import{E as l,Ur as o,it as s}from"./esm-Byma-6B-.js";var c=/* @__PURE__ */e(t()),p=function(e){function t(t){return e.call(this,t)||this}return n(t,e),t.prototype.prepareRows=function(){var e,t,n=this.props,a=n.column,l=void 0===a?3:a,s=n.items,c=n.source,p=n.data,i=[],m=[],u=l,y=0,d=o(s||c||[],p);try{for(var h=r(d),f=h.next();!f.done;f=h.next()){var v=f.value;y+=1;var b=Math.min(v.span||1,l);u-=b;var E={label:v.label,content:v.content,span:b};u>=0?m.push(E):(i.push(m),u=l-b,m=[E]),y===d.length&&i.push(m)}}catch(w){e={error:w}}finally{try{f&&!f.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}return i},t.prototype.renderRow=function(e){var t=this.props,r=t.render,n=t.contentStyle,a=t.labelStyle,o=t.separator,s=void 0===o?": ":o,p=t.mode,i=void 0===p?"table":p,m=t.data;return e.map(function(e,t){return c.createElement("tr",{key:t},e.map(function(e,t){return"table"===i?c.createElement(c.Fragment,{key:"item-".concat(t)},c.createElement("th",{style:l(a,m)},r("label",e.label)),c.createElement("td",{colSpan:e.span+e.span-1,style:l(n,m)},r("content",e.content))):c.createElement("td",{colSpan:e.span,style:l(n,m),key:"item-".concat(t)},c.createElement("span",{style:l(a,m)},r("label",e.label)),s,r("content",e.content))}))})},t.prototype.render=function(){var e=this.props,t=e.style,r=e.title,n=e.column,a=void 0===n?3:n,o=e.classnames,s=e.className,p=e.titleStyle,i=e.data,m=e.mode,u=void 0===m?"table":m,y=this.prepareRows();return c.createElement("div",{className:o("Property","Property--".concat(u),s),style:l(t,i)},c.createElement("table",null,r?c.createElement("thead",null,c.createElement("tr",null,c.createElement("th",{colSpan:"table"===u?a+a:a,style:l(p,i)},r))):null,c.createElement("tbody",null,this.renderRow(y))))},t}(c.Component),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return n(t,e),a([s({type:"property",autoVar:!0})],t)}(p);export{i as PropertyRenderer,p as default};
@@ -1,2 +1,2 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as o,o as n,r}from"./tslib.es6-TRdqp4ac.js";import{$n as i,Ii as s,Xr as a,Zr as l,dt as c,it as u,qt as h,rn as d,ui as f,vn as g,vr as m}from"./esm-D3qvBzlk.js";var y=/* @__PURE__ */e(t()),p=/* @__PURE__ */e(g());function C(e,t,o){return o=B(o),`M ${B(e-o)}, ${B(t)} a ${o},${o} 0 1,0 ${2*o},0 a ${o},${o} 0 1,0 ${-2*o},0`}function $(e,t,o){e=B(e),t=B(t);const n=B(e+o),r=B(t+o);return`M ${e}, ${t} L ${n}, ${t} L ${n}, ${r} L ${e}, ${r} Z `}function E(e,t,o,n){e=B(e),t=B(t);const r=B(e+n),i=B(t+n),s=B(e+o-n),a=B(t+o-n),l=B(e+o),c=B(t+o);return`M${r} ${t}L${l} ${t}L${l} ${c}L${e} ${c}L${e} ${t}L${r} ${t}L${r} ${a}L${s} ${a}L${s} ${i}L${r} ${i}Z `}function w(e,t,o,n,r){e=B(e),t=B(t),r=B(r);const i=B(e+r),s=B(e+o-r),a=B(t+r),l=B(t+o-r),c=B(e+n),u=B(t+n),h=B(e+o-n),d=B(t+o-n),f=B(e+o),g=B(t+o),m=B(r-n/2),y=B(c+m),p=B(u+m),C=B(h-m),$=B(d-m),E=B(i+m);return`M${i} ${t}L${s} ${t}A${r} ${r} 0 0 1 ${f} ${a}L${f} ${l}A${r} ${r} 0 0 1 ${s} ${g}L${i} ${g}A${r} ${r} 0 0 1 ${e} ${l}L${e} ${a}A${r} ${r} 0 0 1 ${i} ${t}L${i} ${t}L${E} ${d}L${C} ${d}A${m} ${m} 0 0 0 ${h} ${$}L${h} ${p}A${m} ${m} 0 0 0 ${C} ${u}L${y} ${u}A${m} ${m} 0 0 0 ${c} ${p}L${c} ${$}A${m} ${m} 0 0 0 ${y} ${d}L${E} ${d}Z`}function M(e,t,o,n){const r=B(o),i=B(o-n);t=B(t),e=B(e);const s=B(t-r),a=B(t-i);return`M${e},${s} A${r},${r} 0 1,1 ${e},${B(t+r)} A${r},${r} 0 1,1 ${e},${s} M${e},${a} A${i},${i} 0 1,0 ${e},${B(t+i)} A${i},${i} 0 1,0 ${e},${a} Z`}var S,v,z={default:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:E(r,i,t,o*n),eyeInner:$(r+2*o,i+2*o,t-4*o)}},rounded:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:w(r,i,t,o*n,2*o),eyeInner:C(r+t/2,i+t/2,t/2-2*o)}},circle:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:M(r+t/2,i+t/2,t/2,o*n),eyeInner:C(r+t/2,i+t/2,t/2-2*o)}}},A={default:function(e){const{x:t,y:o,dotSize:n,dotScale:r,margin:i}=e;let s="";const a=n*r;return s+=$(t*n+(n-a)/2+i,o*n+(n-a)/2+i,a),s},circle:function(e){const{x:t,y:o,dotSize:n,dotScale:r,margin:i}=e;let s="",a=n/2*r;return s+=C(t*n+(n-2*a)/2+a+i,o*n+(n-2*a)/2+a+i,a),s}};(e=>{const t=class t{constructor(e,o,n,i){if(this.version=e,this.errorCorrectionLevel=o,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let t=0;t<this.size;t++)s.push(!1);for(let t=0;t<this.size;t++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const o=this.getPenaltyScore();o<e&&(i=t,e=o),this.applyMask(t)}}r(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(o,n){const r=e.QrSegment.makeSegments(o);return t.encodeSegments(r,n)}static encodeBinary(o,n){const r=e.QrSegment.makeBytes(o);return t.encodeSegments([r],n)}static encodeSegments(e,n,i=1,a=40,l=-1,c=!0){if(!(t.MIN_VERSION<=i&&i<=a&&a<=t.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,h;for(u=i;;u++){const o=8*t.getNumDataCodewords(u,n),r=s.getTotalBits(e,u);if(r<=o){h=r;break}if(u>=a)throw new RangeError("Data too long")}for(const o of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&h<=8*t.getNumDataCodewords(u,o)&&(n=o);let d=[];for(const t of e){o(t.mode.modeBits,4,d),o(t.numChars,t.mode.numCharCountBits(u),d);for(const e of t.getData())d.push(e)}r(d.length==h);const f=8*t.getNumDataCodewords(u,n);r(d.length<=f),o(0,Math.min(4,f-d.length),d),o(0,(8-d.length%8)%8,d),r(d.length%8==0);for(let t=236;d.length<f;t^=253)o(t,8,d);let g=[];for(;8*g.length<d.length;)g.push(0);return d.forEach((e,t)=>g[t>>>3]|=e<<7-(7&t)),new t(u,n,g,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let o=0;o<this.size;o++)this.setFunctionModule(6,o,o%2==0),this.setFunctionModule(o,6,o%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let o=0;o<t;o++)for(let n=0;n<t;n++)0==o&&0==n||0==o&&n==t-1||o==t-1&&0==n||this.drawAlignmentPattern(e[o],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let o=t;for(let n=0;n<10;n++)o=o<<1^1335*(o>>>9);const i=21522^(t<<10|o);r(i>>>15==0);for(let r=0;r<=5;r++)this.setFunctionModule(8,r,n(i,r));this.setFunctionModule(8,7,n(i,6)),this.setFunctionModule(8,8,n(i,7)),this.setFunctionModule(7,8,n(i,8));for(let r=9;r<15;r++)this.setFunctionModule(14-r,8,n(i,r));for(let r=0;r<8;r++)this.setFunctionModule(this.size-1-r,8,n(i,r));for(let r=8;r<15;r++)this.setFunctionModule(8,this.size-15+r,n(i,r));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let o=0;o<12;o++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;r(t>>>18==0);for(let o=0;o<18;o++){const e=n(t,o),r=this.size-11+o%3,i=Math.floor(o/3);this.setFunctionModule(r,i,e),this.setFunctionModule(i,r,e)}}drawFinderPattern(e,t){for(let o=-4;o<=4;o++)for(let n=-4;n<=4;n++){const r=Math.max(Math.abs(n),Math.abs(o)),i=e+n,s=t+o;0<=i&&i<this.size&&0<=s&&s<this.size&&this.setFunctionModule(i,s,2!=r&&4!=r)}}drawAlignmentPattern(e,t){for(let o=-2;o<=2;o++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+o,1!=Math.max(Math.abs(n),Math.abs(o)))}setFunctionModule(e,t,o){this.modules[t][e]=o,this.isFunction[t][e]=!0}addEccAndInterleave(e){const o=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(o,n))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][o],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][o],a=Math.floor(t.getNumRawDataModules(o)/8),l=i-a%i,c=Math.floor(a/i);let u=[];const h=t.reedSolomonComputeDivisor(s);for(let r=0,f=0;r<i;r++){let o=e.slice(f,f+c-s+(r<l?0:1));f+=o.length;const n=t.reedSolomonComputeRemainder(o,h);r<l&&o.push(0),u.push(o.concat(n))}let d=[];for(let t=0;t<u[0].length;t++)u.forEach((e,o)=>{(t!=c-s||o>=l)&&d.push(e[t])});return r(d.length==a),d}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let o=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){const s=t-i,a=t+1&2?r:this.size-1-r;!this.isFunction[a][s]&&o<8*e.length&&(this.modules[a][s]=n(e[o>>>3],7-(7&o)),o++)}}r(o==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let o=0;o<this.size;o++){let n;switch(e){case 0:n=(o+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=o%3==0;break;case 3:n=(o+t)%3==0;break;case 4:n=(Math.floor(o/3)+Math.floor(t/2))%2==0;break;case 5:n=o*t%2+o*t%3==0;break;case 6:n=(o*t%2+o*t%3)%2==0;break;case 7:n=((o+t)%2+o*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][o]&&n&&(this.modules[t][o]=!this.modules[t][o])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let o=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[r][s]==o?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),o||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),o=this.modules[r][s],n=1);e+=this.finderPenaltyTerminateAndCount(o,n,i)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let o=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][r]==o?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),o||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),o=this.modules[s][r],n=1);e+=this.finderPenaltyTerminateAndCount(o,n,i)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let o=0;o<this.size-1;o++){const n=this.modules[r][o];n==this.modules[r][o+1]&&n==this.modules[r+1][o]&&n==this.modules[r+1][o+1]&&(e+=t.PENALTY_N2)}let o=0;for(const t of this.modules)o=t.reduce((e,t)=>e+(t?1:0),o);const n=this.size*this.size,i=Math.ceil(Math.abs(20*o-10*n)/n)-1;return r(0<=i&&i<=9),e+=i*t.PENALTY_N4,r(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=2*Math.floor((8*this.version+3*e+5)/(4*e-4));let o=[6];for(let n=this.size-7;o.length<e;n-=t)o.splice(1,0,n);return o}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let o=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;o-=(25*t-10)*t-55,e>=7&&(o-=36)}return r(208<=o&&o<=29648),o}static getNumDataCodewords(e,o){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[o.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let o=[];for(let t=0;t<e-1;t++)o.push(0);o.push(1);let n=1;for(let r=0;r<e;r++){for(let e=0;e<o.length;e++)o[e]=t.reedSolomonMultiply(o[e],n),e+1<o.length&&(o[e]^=o[e+1]);n=t.reedSolomonMultiply(n,2)}return o}static reedSolomonComputeRemainder(e,o){let n=o.map(e=>0);for(const r of e){const e=r^n.shift();n.push(0),o.forEach((o,r)=>n[r]^=t.reedSolomonMultiply(o,e))}return n}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let o=0;for(let n=7;n>=0;n--)o=o<<1^285*(o>>>7),o^=(t>>>n&1)*e;return r(o>>>8==0),o}finderPenaltyCountPatterns(e){const t=e[1];r(t<=3*this.size);const o=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(o&&e[0]>=4*t&&e[6]>=t?1:0)+(o&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,o){return e&&(this.finderPenaltyAddHistory(t,o),t=0),t+=this.size,this.finderPenaltyAddHistory(t,o),this.finderPenaltyCountPatterns(o)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function o(e,t,o){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)o.push(e>>>n&1)}function n(e,t){return!!(e>>>t&1)}function r(e){if(!e)throw new Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;const i=class e{constructor(e,t,o){if(this.mode=e,this.numChars=t,this.bitData=o,t<0)throw new RangeError("Invalid argument");this.bitData=o.slice()}static makeBytes(t){let n=[];for(const e of t)o(e,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw new RangeError("String contains non-numeric characters");let n=[];for(let e=0;e<t.length;){const r=Math.min(t.length-e,3);o(parseInt(t.substring(e,e+r),10),3*r+1,n),e+=r}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let n,r=[];for(n=0;n+2<=t.length;n+=2){let i=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n));i+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),o(i,11,r)}return n<t.length&&o(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6,r),new e(e.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)o(t,8,n);else if(t<16384)o(2,2,n),o(t,14,n);else{if(!(t<1e6))throw new RangeError("ECI assignment value out of range");o(6,3,n),o(t,21,n)}return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let o=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;o+=4+e+n.bitData.length}return o}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let o=0;o<e.length;o++)"%"!=e.charAt(o)?t.push(e.charCodeAt(o)):(t.push(parseInt(e.substring(o+1,o+3),16)),o+=2);return t}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let s=i;e.QrSegment=s})(S||(S={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})((v=S||(S={})).QrCode||(v.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||(e.QrSegment={}))})(S||(S={}));var R=S,N=R.QrCode,I={L:R.QrCode.Ecc.LOW,M:R.QrCode.Ecc.MEDIUM,Q:R.QrCode.Ecc.QUARTILE,H:R.QrCode.Ecc.HIGH};function L(e,t,o){const n=e.length;return t<8&&o<8||t<8&&o>n-8||t>n-8&&o<8}function P(e){const{modules:t,size:o,dotSize:n,margin:r=0,eyeType:i="default",eyeBorderSize:s="default",pointType:a="default",customSize:l,pointSize:c="default"}=e,u=function(e){return function(e){const t={default:1,sm:.8,xs:.5};return o=>{const{modules:n,dotSize:r,pointSize:i,customSize:s,margin:a}=o;let l="";for(let c=0;c<n.length;c++)for(let o=0;o<n.length;o++)if(n[c][o]&&!L(n,o,c)){let n=s[c][o]||1;l+=e({x:o,y:c,dotSize:r,dotScale:t[i]*n,margin:a})}return l}}(A[e])}(a)({margin:r,modules:t,dotSize:n,pointSize:c,customSize:l}),{eyeBorder:h,eyeInner:d}=function(e){return function(e){const t={default:1,sm:.8,xs:.5};return o=>{const{size:n,dotSize:r,borderSize:i,margin:s}=o,{eyeSize:a,positions:l}=function(e,t,o){const n=7*t;return{eyeSize:n,positions:[{x:o,y:o},{x:o,y:e-n-o},{x:e-n-o,y:o}]}}(n,r,s);let c="",u="";for(const h of l){const{eyeBorder:o,eyeInner:n}=e({size:a,dotSize:r,borderSize:t[i],x:h.x,y:h.y});c+=o,u+=n}return{eyeBorder:c,eyeInner:u}}}(z[e])}(i)({margin:r,dotSize:n,borderSize:s,size:o});return{points:u,eyeBorder:h,eyeInner:d}}function B(e,t=2){return Number(e.toFixed(t))}function x(e){const{config:t,styleConfig:o,logoConfig:n,value:r}=e,{size:i=200,margin:s=0,eyeType:a,eyeBorderSize:l,pointType:c,pointSize:u,pointSizeRandom:h}=o||{},d=y.useMemo(()=>function(e,t){const{level:o="L",minVersion:n=2,maxVersion:r,mask:i,boostLevel:s}=t||{},a=R.QrSegment.makeSegments(e),l=N.encodeSegments(a,I[o],n,r,i,s),c=[];for(let u=0;u<l.size;u++){c.push([]);for(let e=0;e<l.size;e++)c[u].push(l.getModule(e,u))}return c}(r,t),[r,t]),f=y.useMemo(()=>B((i-2*s)/d.length),[d,i,s]),g=y.useMemo(()=>{let e=[];for(let t=0;t<d.length;t++){e.push([]);for(let o=0;o<d.length;o++)h?e[t].push(Math.random()<.5?1:.8):e[t].push(1)}return e},[d,h]),m=y.useMemo(()=>P({modules:d,margin:s,size:i,dotSize:f,eyeType:a,eyeBorderSize:l,pointType:c,pointSize:u,customSize:g}),[d,f,o]);return{logo:y.useMemo(()=>{if(!n)return;let e=i-2*s,{src:t,width:o=e/5,height:r=e/5,x:a=e/2-o/2+s,y:l=e/2-r/2+s}=n||{};const c=d.length,u=Array.from({length:c},(e,t)=>t*f+s),h=u[u.findIndex(e=>e>a)-2]-.5||a,g=u[u.findIndex(e=>e>l)-2]-.5||l;return{src:t,width:o,height:r,x:a,y:l,bg:{x:h,y:g,width:o+2*(a-h),height:r+2*(l-g)}}},[d,f,s,n]),path:m}}function b(e){const{value:t,config:o,styleConfig:n,logoConfig:r,className:i}=e,{size:s=200,margin:a=0,color:l="#000",bgColor:c="#fff",eyeBorderColor:u,eyeInnerColor:h}=n||{},{path:d,logo:f}=x({config:o,styleConfig:n,logoConfig:r,value:t}),{src:g,x:m,y:p,width:C,height:$,bg:E}=f||{};/* @__PURE__ */
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as o,o as n,r}from"./tslib.es6-TRdqp4ac.js";import{$n as i,Ii as s,Xr as a,Zr as l,dt as c,it as u,qt as h,rn as d,ui as f,vn as g,vr as m}from"./esm-Byma-6B-.js";var y=/* @__PURE__ */e(t()),p=/* @__PURE__ */e(g());function C(e,t,o){return o=B(o),`M ${B(e-o)}, ${B(t)} a ${o},${o} 0 1,0 ${2*o},0 a ${o},${o} 0 1,0 ${-2*o},0`}function $(e,t,o){e=B(e),t=B(t);const n=B(e+o),r=B(t+o);return`M ${e}, ${t} L ${n}, ${t} L ${n}, ${r} L ${e}, ${r} Z `}function E(e,t,o,n){e=B(e),t=B(t);const r=B(e+n),i=B(t+n),s=B(e+o-n),a=B(t+o-n),l=B(e+o),c=B(t+o);return`M${r} ${t}L${l} ${t}L${l} ${c}L${e} ${c}L${e} ${t}L${r} ${t}L${r} ${a}L${s} ${a}L${s} ${i}L${r} ${i}Z `}function w(e,t,o,n,r){e=B(e),t=B(t),r=B(r);const i=B(e+r),s=B(e+o-r),a=B(t+r),l=B(t+o-r),c=B(e+n),u=B(t+n),h=B(e+o-n),d=B(t+o-n),f=B(e+o),g=B(t+o),m=B(r-n/2),y=B(c+m),p=B(u+m),C=B(h-m),$=B(d-m),E=B(i+m);return`M${i} ${t}L${s} ${t}A${r} ${r} 0 0 1 ${f} ${a}L${f} ${l}A${r} ${r} 0 0 1 ${s} ${g}L${i} ${g}A${r} ${r} 0 0 1 ${e} ${l}L${e} ${a}A${r} ${r} 0 0 1 ${i} ${t}L${i} ${t}L${E} ${d}L${C} ${d}A${m} ${m} 0 0 0 ${h} ${$}L${h} ${p}A${m} ${m} 0 0 0 ${C} ${u}L${y} ${u}A${m} ${m} 0 0 0 ${c} ${p}L${c} ${$}A${m} ${m} 0 0 0 ${y} ${d}L${E} ${d}Z`}function M(e,t,o,n){const r=B(o),i=B(o-n);t=B(t),e=B(e);const s=B(t-r),a=B(t-i);return`M${e},${s} A${r},${r} 0 1,1 ${e},${B(t+r)} A${r},${r} 0 1,1 ${e},${s} M${e},${a} A${i},${i} 0 1,0 ${e},${B(t+i)} A${i},${i} 0 1,0 ${e},${a} Z`}var S,v,z={default:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:E(r,i,t,o*n),eyeInner:$(r+2*o,i+2*o,t-4*o)}},rounded:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:w(r,i,t,o*n,2*o),eyeInner:C(r+t/2,i+t/2,t/2-2*o)}},circle:function(e){const{size:t,dotSize:o,borderSize:n,x:r,y:i}=e;return{eyeBorder:M(r+t/2,i+t/2,t/2,o*n),eyeInner:C(r+t/2,i+t/2,t/2-2*o)}}},A={default:function(e){const{x:t,y:o,dotSize:n,dotScale:r,margin:i}=e;let s="";const a=n*r;return s+=$(t*n+(n-a)/2+i,o*n+(n-a)/2+i,a),s},circle:function(e){const{x:t,y:o,dotSize:n,dotScale:r,margin:i}=e;let s="",a=n/2*r;return s+=C(t*n+(n-2*a)/2+a+i,o*n+(n-2*a)/2+a+i,a),s}};(e=>{const t=class t{constructor(e,o,n,i){if(this.version=e,this.errorCorrectionLevel=o,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let t=0;t<this.size;t++)s.push(!1);for(let t=0;t<this.size;t++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const o=this.getPenaltyScore();o<e&&(i=t,e=o),this.applyMask(t)}}r(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(o,n){const r=e.QrSegment.makeSegments(o);return t.encodeSegments(r,n)}static encodeBinary(o,n){const r=e.QrSegment.makeBytes(o);return t.encodeSegments([r],n)}static encodeSegments(e,n,i=1,a=40,l=-1,c=!0){if(!(t.MIN_VERSION<=i&&i<=a&&a<=t.MAX_VERSION)||l<-1||l>7)throw new RangeError("Invalid value");let u,h;for(u=i;;u++){const o=8*t.getNumDataCodewords(u,n),r=s.getTotalBits(e,u);if(r<=o){h=r;break}if(u>=a)throw new RangeError("Data too long")}for(const o of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])c&&h<=8*t.getNumDataCodewords(u,o)&&(n=o);let d=[];for(const t of e){o(t.mode.modeBits,4,d),o(t.numChars,t.mode.numCharCountBits(u),d);for(const e of t.getData())d.push(e)}r(d.length==h);const f=8*t.getNumDataCodewords(u,n);r(d.length<=f),o(0,Math.min(4,f-d.length),d),o(0,(8-d.length%8)%8,d),r(d.length%8==0);for(let t=236;d.length<f;t^=253)o(t,8,d);let g=[];for(;8*g.length<d.length;)g.push(0);return d.forEach((e,t)=>g[t>>>3]|=e<<7-(7&t)),new t(u,n,g,l)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}drawFunctionPatterns(){for(let o=0;o<this.size;o++)this.setFunctionModule(6,o,o%2==0),this.setFunctionModule(o,6,o%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let o=0;o<t;o++)for(let n=0;n<t;n++)0==o&&0==n||0==o&&n==t-1||o==t-1&&0==n||this.drawAlignmentPattern(e[o],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let o=t;for(let n=0;n<10;n++)o=o<<1^1335*(o>>>9);const i=21522^(t<<10|o);r(i>>>15==0);for(let r=0;r<=5;r++)this.setFunctionModule(8,r,n(i,r));this.setFunctionModule(8,7,n(i,6)),this.setFunctionModule(8,8,n(i,7)),this.setFunctionModule(7,8,n(i,8));for(let r=9;r<15;r++)this.setFunctionModule(14-r,8,n(i,r));for(let r=0;r<8;r++)this.setFunctionModule(this.size-1-r,8,n(i,r));for(let r=8;r<15;r++)this.setFunctionModule(8,this.size-15+r,n(i,r));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let o=0;o<12;o++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;r(t>>>18==0);for(let o=0;o<18;o++){const e=n(t,o),r=this.size-11+o%3,i=Math.floor(o/3);this.setFunctionModule(r,i,e),this.setFunctionModule(i,r,e)}}drawFinderPattern(e,t){for(let o=-4;o<=4;o++)for(let n=-4;n<=4;n++){const r=Math.max(Math.abs(n),Math.abs(o)),i=e+n,s=t+o;0<=i&&i<this.size&&0<=s&&s<this.size&&this.setFunctionModule(i,s,2!=r&&4!=r)}}drawAlignmentPattern(e,t){for(let o=-2;o<=2;o++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+o,1!=Math.max(Math.abs(n),Math.abs(o)))}setFunctionModule(e,t,o){this.modules[t][e]=o,this.isFunction[t][e]=!0}addEccAndInterleave(e){const o=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(o,n))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][o],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][o],a=Math.floor(t.getNumRawDataModules(o)/8),l=i-a%i,c=Math.floor(a/i);let u=[];const h=t.reedSolomonComputeDivisor(s);for(let r=0,f=0;r<i;r++){let o=e.slice(f,f+c-s+(r<l?0:1));f+=o.length;const n=t.reedSolomonComputeRemainder(o,h);r<l&&o.push(0),u.push(o.concat(n))}let d=[];for(let t=0;t<u[0].length;t++)u.forEach((e,o)=>{(t!=c-s||o>=l)&&d.push(e[t])});return r(d.length==a),d}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let o=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){const s=t-i,a=t+1&2?r:this.size-1-r;!this.isFunction[a][s]&&o<8*e.length&&(this.modules[a][s]=n(e[o>>>3],7-(7&o)),o++)}}r(o==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let o=0;o<this.size;o++){let n;switch(e){case 0:n=(o+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=o%3==0;break;case 3:n=(o+t)%3==0;break;case 4:n=(Math.floor(o/3)+Math.floor(t/2))%2==0;break;case 5:n=o*t%2+o*t%3==0;break;case 6:n=(o*t%2+o*t%3)%2==0;break;case 7:n=((o+t)%2+o*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][o]&&n&&(this.modules[t][o]=!this.modules[t][o])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let o=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[r][s]==o?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),o||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),o=this.modules[r][s],n=1);e+=this.finderPenaltyTerminateAndCount(o,n,i)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let o=!1,n=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][r]==o?(n++,5==n?e+=t.PENALTY_N1:n>5&&e++):(this.finderPenaltyAddHistory(n,i),o||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),o=this.modules[s][r],n=1);e+=this.finderPenaltyTerminateAndCount(o,n,i)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let o=0;o<this.size-1;o++){const n=this.modules[r][o];n==this.modules[r][o+1]&&n==this.modules[r+1][o]&&n==this.modules[r+1][o+1]&&(e+=t.PENALTY_N2)}let o=0;for(const t of this.modules)o=t.reduce((e,t)=>e+(t?1:0),o);const n=this.size*this.size,i=Math.ceil(Math.abs(20*o-10*n)/n)-1;return r(0<=i&&i<=9),e+=i*t.PENALTY_N4,r(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=2*Math.floor((8*this.version+3*e+5)/(4*e-4));let o=[6];for(let n=this.size-7;o.length<e;n-=t)o.splice(1,0,n);return o}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let o=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;o-=(25*t-10)*t-55,e>=7&&(o-=36)}return r(208<=o&&o<=29648),o}static getNumDataCodewords(e,o){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[o.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[o.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let o=[];for(let t=0;t<e-1;t++)o.push(0);o.push(1);let n=1;for(let r=0;r<e;r++){for(let e=0;e<o.length;e++)o[e]=t.reedSolomonMultiply(o[e],n),e+1<o.length&&(o[e]^=o[e+1]);n=t.reedSolomonMultiply(n,2)}return o}static reedSolomonComputeRemainder(e,o){let n=o.map(e=>0);for(const r of e){const e=r^n.shift();n.push(0),o.forEach((o,r)=>n[r]^=t.reedSolomonMultiply(o,e))}return n}static reedSolomonMultiply(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let o=0;for(let n=7;n>=0;n--)o=o<<1^285*(o>>>7),o^=(t>>>n&1)*e;return r(o>>>8==0),o}finderPenaltyCountPatterns(e){const t=e[1];r(t<=3*this.size);const o=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(o&&e[0]>=4*t&&e[6]>=t?1:0)+(o&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,o){return e&&(this.finderPenaltyAddHistory(t,o),t=0),t+=this.size,this.finderPenaltyAddHistory(t,o),this.finderPenaltyCountPatterns(o)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};function o(e,t,o){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)o.push(e>>>n&1)}function n(e,t){return!!(e>>>t&1)}function r(e){if(!e)throw new Error("Assertion error")}t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],e.QrCode=t;const i=class e{constructor(e,t,o){if(this.mode=e,this.numChars=t,this.bitData=o,t<0)throw new RangeError("Invalid argument");this.bitData=o.slice()}static makeBytes(t){let n=[];for(const e of t)o(e,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw new RangeError("String contains non-numeric characters");let n=[];for(let e=0;e<t.length;){const r=Math.min(t.length-e,3);o(parseInt(t.substring(e,e+r),10),3*r+1,n),e+=r}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let n,r=[];for(n=0;n+2<=t.length;n+=2){let i=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n));i+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),o(i,11,r)}return n<t.length&&o(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6,r),new e(e.Mode.ALPHANUMERIC,t.length,r)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)o(t,8,n);else if(t<16384)o(2,2,n),o(t,14,n);else{if(!(t<1e6))throw new RangeError("ECI assignment value out of range");o(6,3,n),o(t,21,n)}return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let o=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;o+=4+e+n.bitData.length}return o}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let o=0;o<e.length;o++)"%"!=e.charAt(o)?t.push(e.charCodeAt(o)):(t.push(parseInt(e.substring(o+1,o+3),16)),o+=2);return t}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let s=i;e.QrSegment=s})(S||(S={})),(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2),e.Ecc=t})((v=S||(S={})).QrCode||(v.QrCode={})),(e=>{(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]),e.Mode=t})(e.QrSegment||(e.QrSegment={}))})(S||(S={}));var R=S,N=R.QrCode,I={L:R.QrCode.Ecc.LOW,M:R.QrCode.Ecc.MEDIUM,Q:R.QrCode.Ecc.QUARTILE,H:R.QrCode.Ecc.HIGH};function L(e,t,o){const n=e.length;return t<8&&o<8||t<8&&o>n-8||t>n-8&&o<8}function P(e){const{modules:t,size:o,dotSize:n,margin:r=0,eyeType:i="default",eyeBorderSize:s="default",pointType:a="default",customSize:l,pointSize:c="default"}=e,u=function(e){return function(e){const t={default:1,sm:.8,xs:.5};return o=>{const{modules:n,dotSize:r,pointSize:i,customSize:s,margin:a}=o;let l="";for(let c=0;c<n.length;c++)for(let o=0;o<n.length;o++)if(n[c][o]&&!L(n,o,c)){let n=s[c][o]||1;l+=e({x:o,y:c,dotSize:r,dotScale:t[i]*n,margin:a})}return l}}(A[e])}(a)({margin:r,modules:t,dotSize:n,pointSize:c,customSize:l}),{eyeBorder:h,eyeInner:d}=function(e){return function(e){const t={default:1,sm:.8,xs:.5};return o=>{const{size:n,dotSize:r,borderSize:i,margin:s}=o,{eyeSize:a,positions:l}=function(e,t,o){const n=7*t;return{eyeSize:n,positions:[{x:o,y:o},{x:o,y:e-n-o},{x:e-n-o,y:o}]}}(n,r,s);let c="",u="";for(const h of l){const{eyeBorder:o,eyeInner:n}=e({size:a,dotSize:r,borderSize:t[i],x:h.x,y:h.y});c+=o,u+=n}return{eyeBorder:c,eyeInner:u}}}(z[e])}(i)({margin:r,dotSize:n,borderSize:s,size:o});return{points:u,eyeBorder:h,eyeInner:d}}function B(e,t=2){return Number(e.toFixed(t))}function x(e){const{config:t,styleConfig:o,logoConfig:n,value:r}=e,{size:i=200,margin:s=0,eyeType:a,eyeBorderSize:l,pointType:c,pointSize:u,pointSizeRandom:h}=o||{},d=y.useMemo(()=>function(e,t){const{level:o="L",minVersion:n=2,maxVersion:r,mask:i,boostLevel:s}=t||{},a=R.QrSegment.makeSegments(e),l=N.encodeSegments(a,I[o],n,r,i,s),c=[];for(let u=0;u<l.size;u++){c.push([]);for(let e=0;e<l.size;e++)c[u].push(l.getModule(e,u))}return c}(r,t),[r,t]),f=y.useMemo(()=>B((i-2*s)/d.length),[d,i,s]),g=y.useMemo(()=>{let e=[];for(let t=0;t<d.length;t++){e.push([]);for(let o=0;o<d.length;o++)h?e[t].push(Math.random()<.5?1:.8):e[t].push(1)}return e},[d,h]),m=y.useMemo(()=>P({modules:d,margin:s,size:i,dotSize:f,eyeType:a,eyeBorderSize:l,pointType:c,pointSize:u,customSize:g}),[d,f,o]);return{logo:y.useMemo(()=>{if(!n)return;let e=i-2*s,{src:t,width:o=e/5,height:r=e/5,x:a=e/2-o/2+s,y:l=e/2-r/2+s}=n||{};const c=d.length,u=Array.from({length:c},(e,t)=>t*f+s),h=u[u.findIndex(e=>e>a)-2]-.5||a,g=u[u.findIndex(e=>e>l)-2]-.5||l;return{src:t,width:o,height:r,x:a,y:l,bg:{x:h,y:g,width:o+2*(a-h),height:r+2*(l-g)}}},[d,f,s,n]),path:m}}function b(e){const{value:t,config:o,styleConfig:n,logoConfig:r,className:i}=e,{size:s=200,margin:a=0,color:l="#000",bgColor:c="#fff",eyeBorderColor:u,eyeInnerColor:h}=n||{},{path:d,logo:f}=x({config:o,styleConfig:n,logoConfig:r,value:t}),{src:g,x:m,y:p,width:C,height:$,bg:E}=f||{};/* @__PURE__ */
2
2
  return y.createElement("svg",{width:s,height:s,viewBox:`0 0 ${s} ${s}`,style:{backgroundColor:c},className:"qr-container qr-svg"+(i?` ${i}`:"")},/* @__PURE__ */y.createElement("g",{fill:l},/* @__PURE__ */y.createElement("path",{fill:u||l,d:d.eyeBorder}),/* @__PURE__ */y.createElement("path",{fill:h||l,d:d.eyeInner}),/* @__PURE__ */y.createElement("path",{d:d.points}),g&&/* @__PURE__ */y.createElement(y.Fragment,null,/* @__PURE__ */y.createElement("rect",{fill:c,x:null==E?void 0:E.x,y:null==E?void 0:E.y,width:null==E?void 0:E.width,height:null==E?void 0:E.height}),/* @__PURE__ */y.createElement("image",{href:g,width:C,height:$,x:m,y:p}))))}function _(e){const{value:t,config:o,styleConfig:n,logoConfig:r,className:i}=e,{size:s=200,bgColor:a}=n||{},{path:l,logo:c}=x({config:o,styleConfig:n,logoConfig:r,value:t}),u=y.useRef(null);return(0,y.useEffect)(()=>{if(l&&u.current){const e=u.current.getContext("2d");(function(e){const{ctx:t,path:o,styleConfig:n}=e,{color:r="#000",bgColor:i="#fff",eyeBorderColor:s,eyeInnerColor:a}=n||{};t.clearRect(0,0,t.canvas.width,t.canvas.height),t.fillStyle=i,t.fillRect(0,0,t.canvas.width,t.canvas.height),t.fillStyle=s||r,t.fill(new Path2D(o.eyeBorder)),t.fillStyle=a||r,t.fill(new Path2D(o.eyeInner)),t.fillStyle=r,t.fill(new Path2D(o.points))})({ctx:e,path:l,styleConfig:n}),c&&function({ctx:e,bgColor:t="#fff",logo:o}){const{src:n,width:r,height:i,x:s,y:a,bg:l}=o||{};if(!n)return;const c=new Image;c.src=n,c.onload=()=>{e.fillStyle=t,e.fillRect(l.x,l.y,l.width,l.height);const o=c.width/c.height;let n=r,u=i;o>1?u=r/o:n=i*o,e.drawImage(c,s+(r-n)/2,a+(i-u)/2,n,u)}}({ctx:e,bgColor:a,logo:c})}},[l,r,n]),/* @__PURE__ */y.createElement("canvas",{width:s,height:s,ref:u,className:"qr-container qr-canvas"+(i?` ${i}`:"")})}function T(e){const{mode:t="canvas"}=e;return"svg"===t?/* @__PURE__ */y.createElement(b,{...e}):/* @__PURE__ */y.createElement(_,{...e})}var O=/* @__PURE__ */e(h()),F=d();function k(e,t){return(0,F.saveAs)(e,t)}var D=function(e){function t(t){var o=e.call(this,t)||this;return o.ref=y.createRef(),o}return o(t,e),t.prototype.getImageSettings=function(){var e=this.props,t=e.imageSettings,o=e.data;if(t&&f(t)&&t.src&&"string"==typeof t.src)return l(t.src)&&(t.src=s(t.src,o,"| raw")),(0,O.default)(t,function(e,t){return~["width","height","x","y"].indexOf(t)?m(e)?Number(e):null:e})},t.prototype.doAction=function(e,t,o,n){var r,i=this.props.codeSize;if("saveAs"===(null==e?void 0:e.actionType)&&(null===(r=this.ref)||void 0===r?void 0:r.current))if("svg"===this.props.mode){var s=this.ref.current.querySelector("svg");if(s){var a='<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" height="'.concat(i,'" width="').concat(i,'" viewBox="').concat(s.getAttribute("viewBox")||"0 0 37 37",'">\n ').concat(s.innerHTML,"\n </svg>");k(new Blob([a],{type:"image/svg+xml"}),(null==n?void 0:n.name)||"qr-code.svg")}}else{var l=this.ref.current.querySelector("canvas");l&&l.toBlob(function(e){e&&k(e,(null==n?void 0:n.name)?n.name.replace(/\.svg$/,".png"):"qr-code.png")},"image/png")}},t.prototype.render=function(){var e=this.props,t=e.className,o=e.style,n=e.qrcodeClassName,r=e.codeSize,s=e.backgroundColor,l=e.foregroundColor,c=e.placeholder,u=e.level,h=e.defaultValue,d=e.data,f=e.mode,g=e.eyeType,m=e.eyeBorderColor,C=e.eyeBorderSize,$=e.eyeInnerColor,E=e.pointType,w=e.pointSize,M=e.pointSizeRandom,S=e.translate,v=e.classPrefix,z=i(this.props,function(){return a(h,d,"| raw")||void 0});return y.createElement("div",{className:(0,p.default)("".concat(v,"QrCode"),t),style:o,ref:this.ref},z?z.length>2953?y.createElement("span",{className:"text-danger"},S("QRCode.tooLong",{max:2953})):y.createElement(T,{className:n,value:z,config:{level:u||"L",minVersion:2,boostLevel:!0},styleConfig:{size:r,bgColor:s,color:l,eyeType:g,eyeBorderColor:m,eyeBorderSize:C,eyeInnerColor:$,pointType:E,pointSize:w,pointSizeRandom:M},logoConfig:this.getImageSettings(),mode:f}):y.createElement("span",{className:"".concat(v,"QrCode--placeholder")},c))},t.defaultProps={codeSize:128,qrcodeClassName:"",backgroundColor:"#fff",foregroundColor:"#000",level:"L",placeholder:"-",mode:"canvas"},t}(y.Component),U=function(e){function t(t,o){var n=e.call(this,t)||this;return o.registerComponent(n),n}return o(t,e),t.prototype.componentWillUnmount=function(){var t;null===(t=e.prototype.componentWillUnmount)||void 0===t||t.call(this),this.context.unRegisterComponent(this)},t.contextType=c,r([u({type:"qrcode",alias:["qr-code"],name:"qrcode"}),n("design:paramtypes",[Object,Object])],t)}(D);export{U as QRCodeRenderer,D as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{a as n,i as a,n as r,o,r as i}from"./tslib.es6-TRdqp4ac.js";import{F as s,Nn as l,ht as p,vi as u,vn as d}from"./esm-D3qvBzlk.js";import{Nt as c,R as h}from"./esm-DdEfrmRq.js";import{t as v}from"./StaticHoc-BGJCCg4f.js";var m=/* @__PURE__ */e(t()),f=/* @__PURE__ */e(d()),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.doAction=function(e,t,n){var a,r,o=this.props,i=o.resetValue,s=o.onChange,l=o.formStore,p=o.store,d=o.name,c=null==e?void 0:e.actionType;if("clear"===c)s("");else if("reset"===c){var h=null!==(r=u(null!==(a=null==l?void 0:l.pristine)&&void 0!==a?a:null==p?void 0:p.pristine,d))&&void 0!==r?r:i;s(null!=h?h:"")}},t.prototype.dispatchChangeEvent=function(e){return void 0===e&&(e={}),r(this,void 0,void 0,function(){var t,a,r,o,i,s,l;return n(this,function(n){switch(n.label){case 0:return t=this.props,a=t.dispatchEvent,r=t.onChange,o=t.submitOnChange,i=t.onRadioChange,s=p(this.props,{value:e}),!1===(null==i?void 0:i(s,this.props))?[2]:[4,a("change",s)];case 1:return(null==(l=n.sent())?void 0:l.prevented)||r&&r(e,o,!0),[2]}})})},t.prototype.renderStatic=function(){var e=this.props,t=e.value,n=e.trueValue,a=e.falseValue,r=e.option,o=e.render,i=e.partial,s=e.optionType,l=e.checked,p=e.labelClassName;return m.createElement(c,{type:"radio",inline:!0,value:t||"",trueValue:n,falseValue:a,disabled:!0,partial:i,optionType:s,checked:l,labelClassName:p},r?o("option",r):null)},t.prototype.render=function(){var e=this,t=this.props,n=t.className;t.style;var a=t.value,r=t.trueValue,o=t.falseValue,i=t.option;t.onChange;var s=t.disabled,l=t.render,p=t.partial,u=t.optionType,d=t.checked,h=t.labelClassName,v=t.classPrefix;return m.createElement("div",{className:(0,f.default)("".concat(v,"CheckboxControl"),n)},m.createElement(c,{type:"radio",inline:!0,value:a||"",trueValue:r,falseValue:o,disabled:s,onChange:function(t){return e.dispatchChangeEvent(t)},partial:p,optionType:u,checked:d,labelClassName:h},i?l("option",i):null))},t.defaultProps={trueValue:!0,falseValue:!1},i([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],t.prototype,"dispatchChangeEvent",null),i([v(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"render",null),t}(m.Component),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),i([h,s({type:"radio",sizeMutable:!1,thin:!0})],t)}(y);export{g as RadioControlRenderer,y as default};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{a as n,i as a,n as r,o,r as i}from"./tslib.es6-TRdqp4ac.js";import{F as s,Nn as l,ht as p,vi as u,vn as d}from"./esm-Byma-6B-.js";import{Nt as c,R as h}from"./esm-CM4fvlfi.js";import{t as v}from"./StaticHoc-CJgNJAEY.js";var m=/* @__PURE__ */e(t()),f=/* @__PURE__ */e(d()),y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),t.prototype.doAction=function(e,t,n){var a,r,o=this.props,i=o.resetValue,s=o.onChange,l=o.formStore,p=o.store,d=o.name,c=null==e?void 0:e.actionType;if("clear"===c)s("");else if("reset"===c){var h=null!==(r=u(null!==(a=null==l?void 0:l.pristine)&&void 0!==a?a:null==p?void 0:p.pristine,d))&&void 0!==r?r:i;s(null!=h?h:"")}},t.prototype.dispatchChangeEvent=function(e){return void 0===e&&(e={}),r(this,void 0,void 0,function(){var t,a,r,o,i,s,l;return n(this,function(n){switch(n.label){case 0:return t=this.props,a=t.dispatchEvent,r=t.onChange,o=t.submitOnChange,i=t.onRadioChange,s=p(this.props,{value:e}),!1===(null==i?void 0:i(s,this.props))?[2]:[4,a("change",s)];case 1:return(null==(l=n.sent())?void 0:l.prevented)||r&&r(e,o,!0),[2]}})})},t.prototype.renderStatic=function(){var e=this.props,t=e.value,n=e.trueValue,a=e.falseValue,r=e.option,o=e.render,i=e.partial,s=e.optionType,l=e.checked,p=e.labelClassName;return m.createElement(c,{type:"radio",inline:!0,value:t||"",trueValue:n,falseValue:a,disabled:!0,partial:i,optionType:s,checked:l,labelClassName:p},r?o("option",r):null)},t.prototype.render=function(){var e=this,t=this.props,n=t.className;t.style;var a=t.value,r=t.trueValue,o=t.falseValue,i=t.option;t.onChange;var s=t.disabled,l=t.render,p=t.partial,u=t.optionType,d=t.checked,h=t.labelClassName,v=t.classPrefix;return m.createElement("div",{className:(0,f.default)("".concat(v,"CheckboxControl"),n)},m.createElement(c,{type:"radio",inline:!0,value:a||"",trueValue:r,falseValue:o,disabled:s,onChange:function(t){return e.dispatchChangeEvent(t)},partial:p,optionType:u,checked:d,labelClassName:h},i?l("option",i):null))},t.defaultProps={trueValue:!0,falseValue:!1},i([l,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],t.prototype,"dispatchChangeEvent",null),i([v(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],t.prototype,"render",null),t}(m.Component),g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a(t,e),i([h,s({type:"radio",sizeMutable:!1,thin:!0})],t)}(y);export{g as RadioControlRenderer,y as default};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t as n}from"./react-COOgDf_T.js";import{a,i as t,n as s,o,r as i,t as l}from"./tslib.es6-TRdqp4ac.js";import{J as r,Nn as d,P as c,Xr as u,Z as h,Zn as p,ht as m,vi as C,vn as b}from"./esm-D3qvBzlk.js";import{dt as f}from"./esm-DdEfrmRq.js";import{t as v}from"./StaticHoc-BGJCCg4f.js";var k=/* @__PURE__ */e(n()),y=/* @__PURE__ */e(b()),g=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.doAction=function(e,n,a){var t,s,o=this.props,i=o.resetValue,l=o.onChange,r=o.formStore,d=o.store,c=o.name,u=null==e?void 0:e.actionType;if("clear"===u)null==l||l("");else if("reset"===u){var h=null!==(s=C(null!==(t=null==r?void 0:r.pristine)&&void 0!==t?t:null==d?void 0:d.pristine,c))&&void 0!==s?s:i;null==l||l(null!=h?h:"")}},n.prototype.handleChange=function(e){return s(this,void 0,void 0,function(){var n,t,s,o,i,l,r,d,c;return a(this,function(a){switch(a.label){case 0:return n=this.props,t=n.joinValues,s=n.extractValue,o=n.valueField,i=n.onChange,l=n.dispatchEvent,r=n.options,n.selectedOptions,d=e,e&&(t||s)&&(d=e[o||"value"]),[4,l("change",m(this.props,{value:d,options:r,items:r,selectedItems:e}))];case 1:return(null==(c=a.sent())?void 0:c.prevented)||i&&i(d),[2]}})})},n.prototype.reload=function(e,n){var a=this.props.reloadOptions;a&&a(e,n)},n.prototype.renderLabel=function(e,n){var a=n.labelField,t=this.props.data,s=e[a||"label"];return k.createElement(k.Fragment,null,"string"==typeof s?u(s,t):"".concat(s))},n.prototype.render=function(){var e=this.props,n=e.className;e.style;var a=e.classPrefix,t=e.value;e.onChange;var s=e.disabled,o=e.joinValues,i=e.extractValue,d=e.delimiter,c=e.placeholder,u=e.options,m=e.inline,C=void 0===m||m,b=e.formMode,v=e.columnsCount,g=e.classPrefix,x=e.itemClassName,N=e.labelClassName,j=e.optionClassName,F=e.labelField,w=e.valueField;e.data;var P=e.translate,V=e.optionType,E=e.level,I=e.testIdBuilder,O=e.themeCss,L=e.id,S=e.env,T=p(O,"radios");return k.createElement(k.Fragment,null,k.createElement(f,{inline:C||"inline"===b,className:(0,y.default)("".concat(a,"RadiosControl"),n,h(l(l({},this.props),{name:["radiosControlClassName","radiosControlCheckedClassName","radiosClassName","radiosCheckedClassName","radiosCheckedInnerClassName","radiosShowClassName"],id:L,themeCss:T}))),value:null==t?"":t,disabled:s,onChange:this.handleChange,joinValues:o,extractValue:i,delimiter:d,labelClassName:null!=j?j:N,labelField:F,valueField:w,placeholder:P(c),options:u,renderLabel:this.renderLabel,columnsCount:v,classPrefix:g,itemClassName:x,optionType:V,level:E,testIdBuilder:I}),k.createElement(r,l({},this.props,{config:{themeCss:T,classNames:[{key:"radiosControlClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.checked):not(.disabled)")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled):not(.checked)")},disabled:{inner:".".concat(a,"Checkbox.disabled:not(.checked)")}}},{key:"radiosControlCheckedClassName",weights:{default:{inner:".".concat(a,"Checkbox.checked:not(.disabled)")},hover:{suf:" .".concat(a,"Checkbox.checked:not(.disabled)")},disabled:{inner:".".concat(a,"Checkbox.checked.disabled")}}},{key:"radiosClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.checked):not(.disabled) > i")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled):not(.checked)"),inner:"> i"},disabled:{inner:".".concat(a,"Checkbox.disabled:not(.checked) > i")}}},{key:"radiosCheckedClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.disabled) > i")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled)"),inner:"> i"},disabled:{inner:".".concat(a,"Checkbox.disabled > i")}}},{key:"radiosCheckedInnerClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.disabled) > i .icon")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled)"),inner:"> i .icon"},disabled:{inner:".".concat(a,"Checkbox.disabled > i:before")}}},{key:"radiosShowClassName",weights:{default:{inner:".".concat(a,"Checkbox > i")}}}],id:L},env:S})))},n.defaultProps={columnsCount:1},i([d,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],n.prototype,"handleChange",null),i([d,o("design:type",Function),o("design:paramtypes",[Object,Object]),o("design:returntype",void 0)],n.prototype,"renderLabel",null),i([v(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],n.prototype,"render",null),n}(k.Component),x=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.defaultProps={multiple:!1,inline:!0},i([c({type:"radios",sizeMutable:!1,thin:!0})],n)}(g);export{x as RadiosControlRenderer,g as default};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t as n}from"./react-COOgDf_T.js";import{a,i as t,n as s,o,r as i,t as l}from"./tslib.es6-TRdqp4ac.js";import{J as r,Nn as d,P as c,Xr as u,Z as h,Zn as p,ht as m,vi as C,vn as b}from"./esm-Byma-6B-.js";import{dt as f}from"./esm-CM4fvlfi.js";import{t as v}from"./StaticHoc-CJgNJAEY.js";var k=/* @__PURE__ */e(n()),y=/* @__PURE__ */e(b()),g=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.doAction=function(e,n,a){var t,s,o=this.props,i=o.resetValue,l=o.onChange,r=o.formStore,d=o.store,c=o.name,u=null==e?void 0:e.actionType;if("clear"===u)null==l||l("");else if("reset"===u){var h=null!==(s=C(null!==(t=null==r?void 0:r.pristine)&&void 0!==t?t:null==d?void 0:d.pristine,c))&&void 0!==s?s:i;null==l||l(null!=h?h:"")}},n.prototype.handleChange=function(e){return s(this,void 0,void 0,function(){var n,t,s,o,i,l,r,d,c;return a(this,function(a){switch(a.label){case 0:return n=this.props,t=n.joinValues,s=n.extractValue,o=n.valueField,i=n.onChange,l=n.dispatchEvent,r=n.options,n.selectedOptions,d=e,e&&(t||s)&&(d=e[o||"value"]),[4,l("change",m(this.props,{value:d,options:r,items:r,selectedItems:e}))];case 1:return(null==(c=a.sent())?void 0:c.prevented)||i&&i(d),[2]}})})},n.prototype.reload=function(e,n){var a=this.props.reloadOptions;a&&a(e,n)},n.prototype.renderLabel=function(e,n){var a=n.labelField,t=this.props.data,s=e[a||"label"];return k.createElement(k.Fragment,null,"string"==typeof s?u(s,t):"".concat(s))},n.prototype.render=function(){var e=this.props,n=e.className;e.style;var a=e.classPrefix,t=e.value;e.onChange;var s=e.disabled,o=e.joinValues,i=e.extractValue,d=e.delimiter,c=e.placeholder,u=e.options,m=e.inline,C=void 0===m||m,b=e.formMode,v=e.columnsCount,g=e.classPrefix,x=e.itemClassName,N=e.labelClassName,j=e.optionClassName,F=e.labelField,w=e.valueField;e.data;var P=e.translate,V=e.optionType,E=e.level,I=e.testIdBuilder,O=e.themeCss,L=e.id,S=e.env,T=p(O,"radios");return k.createElement(k.Fragment,null,k.createElement(f,{inline:C||"inline"===b,className:(0,y.default)("".concat(a,"RadiosControl"),n,h(l(l({},this.props),{name:["radiosControlClassName","radiosControlCheckedClassName","radiosClassName","radiosCheckedClassName","radiosCheckedInnerClassName","radiosShowClassName"],id:L,themeCss:T}))),value:null==t?"":t,disabled:s,onChange:this.handleChange,joinValues:o,extractValue:i,delimiter:d,labelClassName:null!=j?j:N,labelField:F,valueField:w,placeholder:P(c),options:u,renderLabel:this.renderLabel,columnsCount:v,classPrefix:g,itemClassName:x,optionType:V,level:E,testIdBuilder:I}),k.createElement(r,l({},this.props,{config:{themeCss:T,classNames:[{key:"radiosControlClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.checked):not(.disabled)")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled):not(.checked)")},disabled:{inner:".".concat(a,"Checkbox.disabled:not(.checked)")}}},{key:"radiosControlCheckedClassName",weights:{default:{inner:".".concat(a,"Checkbox.checked:not(.disabled)")},hover:{suf:" .".concat(a,"Checkbox.checked:not(.disabled)")},disabled:{inner:".".concat(a,"Checkbox.checked.disabled")}}},{key:"radiosClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.checked):not(.disabled) > i")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled):not(.checked)"),inner:"> i"},disabled:{inner:".".concat(a,"Checkbox.disabled:not(.checked) > i")}}},{key:"radiosCheckedClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.disabled) > i")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled)"),inner:"> i"},disabled:{inner:".".concat(a,"Checkbox.disabled > i")}}},{key:"radiosCheckedInnerClassName",weights:{default:{inner:".".concat(a,"Checkbox:not(.disabled) > i .icon")},hover:{suf:" .".concat(a,"Checkbox:not(.disabled)"),inner:"> i .icon"},disabled:{inner:".".concat(a,"Checkbox.disabled > i:before")}}},{key:"radiosShowClassName",weights:{default:{inner:".".concat(a,"Checkbox > i")}}}],id:L},env:S})))},n.defaultProps={columnsCount:1},i([d,o("design:type",Function),o("design:paramtypes",[Object]),o("design:returntype",Promise)],n.prototype,"handleChange",null),i([d,o("design:type",Function),o("design:paramtypes",[Object,Object]),o("design:returntype",void 0)],n.prototype,"renderLabel",null),i([v(),o("design:type",Function),o("design:paramtypes",[]),o("design:returntype",void 0)],n.prototype,"render",null),n}(k.Component),x=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.defaultProps={multiple:!1,inline:!0},i([c({type:"radios",sizeMutable:!1,thin:!0})],n)}(g);export{x as RadiosControlRenderer,g as default};
@@ -1 +1 @@
1
- import{o as e,r as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as n}from"./react-COOgDf_T.js";import{c as o,i as r,o as a,r as s,t as i}from"./tslib.es6-TRdqp4ac.js";import{Nn as l,Xr as p,it as c,tt as m}from"./esm-D3qvBzlk.js";import"./esm-DdEfrmRq.js";import{a as u,s as d}from"./PopUp-DTLG0S4M.js";var f=/* @__PURE__ */t({RemarkRenderer:()=>b,default:()=>h,filterContents:()=>v}),y=/* @__PURE__ */e(n());function v(e,t){if("string"==typeof e)return p(e,t);if(e){var n=e.title,r=e.content,a=e.body,s=o(e,["title","content","body"]);return n||r||a?i(i({},s),{title:p(n,t),content:r||a?p(r||a||"",t):void 0}):void 0}return e}var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.showModalTip=function(e){var t=this.props,n=t.onAction,o=t.data;return function(t){n&&n(t,{actionType:"dialog",dialog:{title:e&&"string"!=typeof e?e.title:"",body:e&&"string"!=typeof e?e.content:e,actions:[]}},o)}},t.prototype.renderLabel=function(e,t,n,o){var r=o?"Remark-icon--".concat(o):void 0;return y.createElement(y.Fragment,null,t?y.createElement("span",null,t):null,y.createElement("span",{className:n("Remark-icon",r)},y.createElement(d,{cx:n,icon:e||"question-mark"})))},t.prototype.render=function(){var e,t,n,o=this.props,r=o.className,a=o.style,s=o.icon,i=o.label,l=o.shape,p=o.tooltip,c=o.placement,m=o.rootClose,d=o.trigger,f=o.container,g=o.popOverContainer,h=o.classPrefix,b=o.classnames,C=o.content,k=o.data,N=o.env,R=o.tooltipClassName,j=o.mobileUI,E=null!==(e=null==p?void 0:p.icon)&&void 0!==e?e:s,w=null!==(t=null==p?void 0:p.label)&&void 0!==t?t:i,x=null!==(n=null==p?void 0:p.shape)&&void 0!==n?n:l,L=v(p||C,k);return j?y.createElement("div",{className:b("Remark",p&&p.className||r||"Remark--warning"),style:a,onClick:this.showModalTip(L)},this.renderLabel(E,w,b,x)):y.createElement(u,{classPrefix:h,classnames:b,tooltip:L,tooltipClassName:p&&p.tooltipClassName||R,placement:p&&p.placement||c,rootClose:p&&p.rootClose||m,trigger:p&&p.trigger||d,container:f||g||N.getModalContainer,delay:p&&p.delay},y.createElement("div",{className:b("Remark",p&&p.className||r||"Remark--warning"),style:a},this.renderLabel(E,w,b,x)))},t.propsList=[],t.defaultProps={icon:"",trigger:["hover","focus"]},s([l,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"showModalTip",null),t}(y.Component),h=m(g),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),s([c({type:"remark"})],t)}(g);export{v as n,f as t};
1
+ import{o as e,r as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as n}from"./react-COOgDf_T.js";import{c as o,i as r,o as a,r as s,t as i}from"./tslib.es6-TRdqp4ac.js";import{Nn as l,Xr as p,it as c,tt as m}from"./esm-Byma-6B-.js";import"./esm-CM4fvlfi.js";import{a as u,s as d}from"./PopUp-CJyUTmjT.js";var f=/* @__PURE__ */t({RemarkRenderer:()=>b,default:()=>h,filterContents:()=>v}),y=/* @__PURE__ */e(n());function v(e,t){if("string"==typeof e)return p(e,t);if(e){var n=e.title,r=e.content,a=e.body,s=o(e,["title","content","body"]);return n||r||a?i(i({},s),{title:p(n,t),content:r||a?p(r||a||"",t):void 0}):void 0}return e}var g=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.showModalTip=function(e){var t=this.props,n=t.onAction,o=t.data;return function(t){n&&n(t,{actionType:"dialog",dialog:{title:e&&"string"!=typeof e?e.title:"",body:e&&"string"!=typeof e?e.content:e,actions:[]}},o)}},t.prototype.renderLabel=function(e,t,n,o){var r=o?"Remark-icon--".concat(o):void 0;return y.createElement(y.Fragment,null,t?y.createElement("span",null,t):null,y.createElement("span",{className:n("Remark-icon",r)},y.createElement(d,{cx:n,icon:e||"question-mark"})))},t.prototype.render=function(){var e,t,n,o=this.props,r=o.className,a=o.style,s=o.icon,i=o.label,l=o.shape,p=o.tooltip,c=o.placement,m=o.rootClose,d=o.trigger,f=o.container,g=o.popOverContainer,h=o.classPrefix,b=o.classnames,C=o.content,k=o.data,N=o.env,R=o.tooltipClassName,j=o.mobileUI,E=null!==(e=null==p?void 0:p.icon)&&void 0!==e?e:s,w=null!==(t=null==p?void 0:p.label)&&void 0!==t?t:i,x=null!==(n=null==p?void 0:p.shape)&&void 0!==n?n:l,L=v(p||C,k);return j?y.createElement("div",{className:b("Remark",p&&p.className||r||"Remark--warning"),style:a,onClick:this.showModalTip(L)},this.renderLabel(E,w,b,x)):y.createElement(u,{classPrefix:h,classnames:b,tooltip:L,tooltipClassName:p&&p.tooltipClassName||R,placement:p&&p.placement||c,rootClose:p&&p.rootClose||m,trigger:p&&p.trigger||d,container:f||g||N.getModalContainer,delay:p&&p.delay},y.createElement("div",{className:b("Remark",p&&p.className||r||"Remark--warning"),style:a},this.renderLabel(E,w,b,x)))},t.propsList=[],t.defaultProps={icon:"",trigger:["hover","focus"]},s([l,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",void 0)],t.prototype,"showModalTip",null),t}(y.Component),h=m(g),b=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),s([c({type:"remark"})],t)}(g);export{v as n,f as t};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{a as n,i as a,n as i,o as r,r as s}from"./tslib.es6-TRdqp4ac.js";import{$n as o,Nn as l,di as p,dt as c,ht as d,it as u,oi as h}from"./esm-D3qvBzlk.js";import{G as m}from"./esm-DdEfrmRq.js";var y=/* @__PURE__ */e(t()),v=function(e){function t(t,n){var a=e.call(this,t)||this;return a.state={value:o(t)||""},n.registerComponent(a),a}return a(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this)},t.prototype.handleChange=function(e){return i(this,void 0,void 0,function(){var t,a,i,r;return n(this,function(n){switch(n.label){case 0:return t=this.props,a=t.onChange,i=t.dispatchEvent,this.setState({value:e}),[4,i("change",d(this.props,{value:e}))];case 1:return(null==(r=n.sent())?void 0:r.prevented)||null==a||a(e),[2]}})})},t.prototype.handleCancel=function(){var e=this.props.name,t=this.props.onQuery;if(""!==o(this.props)){var n={};p(n,e,""),null==t||t(n)}},t.prototype.handleSearch=function(e){return i(this,void 0,void 0,function(){var t,a,i,r,s,o;return n(this,function(n){switch(n.label){case 0:return t=this.props,a=t.name,i=t.onQuery,r=t.dispatchEvent,p(s={},a,e),[4,r("search",h(this.props.data,s))];case 1:return(null==(o=n.sent())?void 0:o.prevented)||null==i||i(s),[2]}})})},t.prototype.dispatchEvent=function(e){(0,this.props.dispatchEvent)(e,d(this.props,{value:this.state.value}))},t.prototype.doAction=function(e,t,n,a){"clear"===(null==e?void 0:e.actionType)&&this.setState({value:""})},t.prototype.setData=function(e){"string"==typeof e&&this.handleChange(e)},t.prototype.render=function(){var e=this,t=this.props;t.data;var n=t.name,a=t.disabled,i=t.onQuery,r=t.mini,s=t.enhance,o=t.clearable,l=t.searchImediately,p=t.clearAndSubmit,c=t.placeholder,d=t.onChange,u=t.className,h=t.style,v=t.mobileUI,g=t.loading,f=t.loadingConfig,b=t.onEvent,C=t.testIdBuilder,S=this.state.value,E=!i&&!(null==b?void 0:b.search)||a;return y.createElement(m,{className:u,style:h,name:n,disabled:E,loading:g,loadingConfig:f,defaultActive:!!S,defaultValue:d?void 0:S,value:S,mini:r,enhance:s,clearable:o,searchImediately:l,clearAndSubmit:p,onSearch:this.handleSearch,onCancel:this.handleCancel,placeholder:c,onChange:this.handleChange,onFocus:function(){return e.dispatchEvent("focus")},onBlur:function(){return e.dispatchEvent("blur")},mobileUI:v,testIdBuilder:C})},t.defaultProps={name:"keywords",mini:!1,enhance:!1,clearable:!1,searchImediately:!1,clearAndSubmit:!1},t.contextType=c,t.propsList=["mini","searchImediately"],s([l,r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",Promise)],t.prototype,"handleChange",null),s([l,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],t.prototype,"handleCancel",null),s([l,r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",Promise)],t.prototype,"handleSearch",null),s([l,r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",void 0)],t.prototype,"dispatchEvent",null),s([u({type:"search-box"}),r("design:paramtypes",[Object,Object])],t)}(y.Component);export{v as SearchBoxRenderer};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{a as n,i as a,n as i,o as r,r as s}from"./tslib.es6-TRdqp4ac.js";import{$n as o,Nn as l,di as p,dt as c,ht as d,it as u,oi as h}from"./esm-Byma-6B-.js";import{G as m}from"./esm-CM4fvlfi.js";var y=/* @__PURE__ */e(t()),v=function(e){function t(t,n){var a=e.call(this,t)||this;return a.state={value:o(t)||""},n.registerComponent(a),a}return a(t,e),t.prototype.componentWillUnmount=function(){this.context.unRegisterComponent(this)},t.prototype.handleChange=function(e){return i(this,void 0,void 0,function(){var t,a,i,r;return n(this,function(n){switch(n.label){case 0:return t=this.props,a=t.onChange,i=t.dispatchEvent,this.setState({value:e}),[4,i("change",d(this.props,{value:e}))];case 1:return(null==(r=n.sent())?void 0:r.prevented)||null==a||a(e),[2]}})})},t.prototype.handleCancel=function(){var e=this.props.name,t=this.props.onQuery;if(""!==o(this.props)){var n={};p(n,e,""),null==t||t(n)}},t.prototype.handleSearch=function(e){return i(this,void 0,void 0,function(){var t,a,i,r,s,o;return n(this,function(n){switch(n.label){case 0:return t=this.props,a=t.name,i=t.onQuery,r=t.dispatchEvent,p(s={},a,e),[4,r("search",h(this.props.data,s))];case 1:return(null==(o=n.sent())?void 0:o.prevented)||null==i||i(s),[2]}})})},t.prototype.dispatchEvent=function(e){(0,this.props.dispatchEvent)(e,d(this.props,{value:this.state.value}))},t.prototype.doAction=function(e,t,n,a){"clear"===(null==e?void 0:e.actionType)&&this.setState({value:""})},t.prototype.setData=function(e){"string"==typeof e&&this.handleChange(e)},t.prototype.render=function(){var e=this,t=this.props;t.data;var n=t.name,a=t.disabled,i=t.onQuery,r=t.mini,s=t.enhance,o=t.clearable,l=t.searchImediately,p=t.clearAndSubmit,c=t.placeholder,d=t.onChange,u=t.className,h=t.style,v=t.mobileUI,g=t.loading,f=t.loadingConfig,b=t.onEvent,C=t.testIdBuilder,S=this.state.value,E=!i&&!(null==b?void 0:b.search)||a;return y.createElement(m,{className:u,style:h,name:n,disabled:E,loading:g,loadingConfig:f,defaultActive:!!S,defaultValue:d?void 0:S,value:S,mini:r,enhance:s,clearable:o,searchImediately:l,clearAndSubmit:p,onSearch:this.handleSearch,onCancel:this.handleCancel,placeholder:c,onChange:this.handleChange,onFocus:function(){return e.dispatchEvent("focus")},onBlur:function(){return e.dispatchEvent("blur")},mobileUI:v,testIdBuilder:C})},t.defaultProps={name:"keywords",mini:!1,enhance:!1,clearable:!1,searchImediately:!1,clearAndSubmit:!1},t.contextType=c,t.propsList=["mini","searchImediately"],s([l,r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",Promise)],t.prototype,"handleChange",null),s([l,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],t.prototype,"handleCancel",null),s([l,r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",Promise)],t.prototype,"handleSearch",null),s([l,r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",void 0)],t.prototype,"dispatchEvent",null),s([u({type:"search-box"}),r("design:paramtypes",[Object,Object])],t)}(y.Component);export{v as SearchBoxRenderer};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{a as o,c as n,i,n as l,o as a,r,t as s}from"./tslib.es6-TRdqp4ac.js";import{J as u,Nn as p,P as c,St as d,Tn as h,Xt as v,Z as m,an as f,fn as y,ht as g,oi as b,sn as C,vi as O,vn as M}from"./esm-D3qvBzlk.js";import{ft as w,w as T}from"./esm-DdEfrmRq.js";import{i as A}from"./PopUp-DTLG0S4M.js";import{t as E}from"./StaticHoc-BGJCCg4f.js";import{t as I}from"./Transfer-U4V9M4hb.js";var R=/* @__PURE__ */e(t()),j=/* @__PURE__ */e(M()),F=/* @__PURE__ */e(h()),N=/* @__PURE__ */e(v()),x=function(e){function t(t){var o=e.call(this,t)||this;return o.lastTerm="",o.fetchCancel=null,o.changeValue=o.changeValue.bind(o),o.lazyloadRemote=(0,N.default)(o.loadRemote.bind(o),250,{trailing:!0,leading:!1}),o.inputRef=o.inputRef.bind(o),o}return i(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;C(t.autoComplete,t.data)&&f(e.autoComplete,t.autoComplete,e.data,t.data)&&this.lazyloadRemote(this.lastTerm)},t.prototype.componentWillUnmount=function(){this.unHook&&this.unHook(),this.fetchCancel=null},t.prototype.inputRef=function(e){this.input=e},t.prototype.focus=function(){var e,t;this.input&&(null===(t=null===(e=this.input)||void 0===e?void 0:e.focus)||void 0===t||t.call(e))},t.prototype.getValue=function(e,t){void 0===t&&(t=[]);var o=this.props,n=o.joinValues,i=o.extractValue,l=o.delimiter,a=o.multiple,r=o.valueField,s=o.options,u=e;return(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){(0,F.default)(s,function(t){return t[r||"value"]==e[r||"value"]})||t.push(e)}),n?u=a?Array.isArray(e)?e.map(function(e){return e[r||"value"]}).join(l):e?e[r||"value"]:"":u?u[r||"value"]:"":i&&(u=a?Array.isArray(e)?e.map(function(e){return e[r||"value"]}):e?[e[r||"value"]]:[]:u?u[r||"value"]:""),u},t.prototype.dispatchEvent=function(e,t){return void 0===t&&(t={}),l(this,void 0,void 0,function(){var n,i,l,a,r,s,u,p;return o(this,function(o){switch(o.label){case 0:return n="on"+e.charAt(0).toUpperCase()+e.slice(1),i=this.props,l=i.dispatchEvent,a=i.options,r=i.value,s=i.multiple,u=i.selectedOptions,[4,l(e,g(this.props,{options:a,items:a,value:r,selectedItems:s?u:u[0]}))];case 1:return(null==(p=o.sent())?void 0:p.prevented)||this.props[n](t),[2]}})})},t.prototype.changeValue=function(e){return l(this,void 0,void 0,function(){var t,n,i,l,a,r,s,u;return o(this,function(o){switch(o.label){case 0:return t=this.props,n=t.onChange,i=t.setOptions,l=t.options,t.data,a=t.dispatchEvent,r=[],s=this.getValue(e,r),r.length&&i(l.concat(r)),[4,a("change",g(this.props,{value:s,options:l,items:l,selectedItems:e}))];case 1:return(null==(u=o.sent())?void 0:u.prevented)||null==n||n(s),[2]}})})},t.prototype.loadRemote=function(e,t){var n;return void 0===t&&(t=!1),l(this,void 0,void 0,function(){var i,l,a,r,s,u,p,c,d,h,v,m,f=this;return o(this,function(o){switch(o.label){case 0:if(i=this.props,l=i.autoComplete,a=i.env,r=i.data,s=i.setOptions,u=i.setLoading,p=i.formInited,c=i.addHook,!a||!a.fetcher)throw new Error("fetcher is required");if(!t&&!1===p&&c)return this.unHook&&this.unHook(),[2,this.unHook=c(this.loadRemote.bind(this,e,!0),"init")];if(this.lastTerm=e,d=b(r,{term:e,value:e}),!C(l,d))return[2,Promise.resolve({options:[]})];this.fetchCancel&&(null===(n=this.fetchCancel)||void 0===n||n.call(this,"autoComplete request cancelled."),this.fetchCancel=null,u(!1)),u(!0),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,a.fetcher(l,d,{cancelExecutor:function(e){return f.fetchCancel=e}})];case 2:return h=o.sent(),this.fetchCancel=null,v=h.data&&h.data.options||h.data||[],m=this.mergeOptions(v),s(m),[2,{options:m}];case 3:return u(!1),[7];case 4:return[2]}})})},t.prototype.mergeOptions=function(e){var t=this.props,o=t.selectedOptions,n=t.valueField,i=void 0===n?"value":n,l=d(e,void 0,i).concat();return Array.isArray(o)&&o.length&&o.forEach(function(e){(0,F.default)(l,function(t){return t[i]===e[i]})||l.push(s(s({},e),{hidden:!0}))}),l},t.prototype.renderMenu=function(e,t){var o=this.props,n=o.menuTpl,i=o.render,l=o.data,a=o.optionClassName,r=o.testIdBuilder;return i("menu/".concat(t.index),n,{showNativeTitle:!0,className:(0,j.default)("Select-option-content",a),data:b(b(l,t),e),testIdBuilder:null==r?void 0:r.getChild("option-"+e.value||t.index)})},t.prototype.reload=function(e,t){var o=this.props.reloadOptions;o&&o(e,t)},t.prototype.option2value=function(){},t.prototype.renderOtherMode=function(){var e=this.props,t=e.selectMode,o=n(e,["selectMode"]);return R.createElement(k,s({},o,{selectMode:"group"===t?"list":t}))},t.prototype.doAction=function(e,t,o){var n,i,l,a=this.props,r=a.resetValue,s=a.onChange,u=a.formStore,p=a.store,c=a.name,d=a.valueField,h=null==e?void 0:e.actionType;if("clear"===h)null==s||s("");else if("reset"===h){var v=null!==(l=O(null!==(i=null==u?void 0:u.pristine)&&void 0!==i?i:null==p?void 0:p.pristine,c))&&void 0!==l?l:r,m=this.getValue(((n={})[d]=null!=v?v:"",n));null==s||s(m)}},t.prototype.handleOptionAdd=function(e,t,n,i){var a=this;void 0===e&&(e=-1),void 0===n&&(n=!1);var r=this.props,s=r.onAdd,u=r.autoComplete;null==s||s(e,t,n,function(){return l(a,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return null==i||i(t),u?[4,this.loadRemote(this.lastTerm)]:[3,2];case 1:return e.sent(),[2,!1];case 2:return[2]}})})})},t.prototype.handleOptionEdit=function(e,t,n,i){var a=this,r=this.props,s=r.onEdit,u=r.autoComplete;null==s||s(e,t,n,function(){return l(a,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return null==i||i(e),u?[4,this.loadRemote(this.lastTerm)]:[3,2];case 1:return t.sent(),[2,!1];case 2:return[2]}})})})},t.prototype.handleOptionDelete=function(e,t){var n=this,i=this.props,a=i.onDelete,r=i.autoComplete;null==a||a(e,function(){return l(n,void 0,void 0,function(){return o(this,function(o){switch(o.label){case 0:return null==t||t(e),r?[4,this.loadRemote(this.lastTerm)]:[3,2];case 1:return o.sent(),[2,!1];case 2:return[2]}})})})},t.prototype.render=function(){var e=this,t=this.props,o=t.autoComplete,i=t.searchable,l=t.showInvalidMatch,a=t.options,r=t.className,p=t.popoverClassName,c=t.style,d=t.loading;t.value;var h=t.selectedOptions,v=t.multi,f=t.multiple,g=t.placeholder,b=t.id,O=t.classPrefix;t.classnames;var M=t.creatable;t.inline;var T=t.noResultsText,A=t.render,E=t.menuTpl,I=t.borderMode,F=t.selectMode,N=t.env,x=t.mobileUI,k=t.overlay,V=t.filterOption,P=n(t,["autoComplete","searchable","showInvalidMatch","options","className","popoverClassName","style","loading","value","selectedOptions","multi","multiple","placeholder","id","classPrefix","classnames","creatable","inline","noResultsText","render","menuTpl","borderMode","selectMode","env","mobileUI","overlay","filterOption"]),H=this.props,S=H.classPrefix,D=H.themeCss;return T&&(T=A("noResultText",T)),R.createElement("div",{className:(0,j.default)("".concat(O,"SelectControl"),r),style:c},["table","list","group","tree","chained","associated"].includes(F)?this.renderOtherMode():R.createElement(w,s({},P,{onAdd:this.handleOptionAdd,onEdit:this.handleOptionEdit,onDelete:this.handleOptionDelete,className:(0,j.default)(m(s(s({},this.props),{name:"selectControlClassName",id:b,themeCss:D}))),popoverClassName:(0,j.default)(p,m(s(s({},this.props),{name:"selectPopoverClassName",id:b,themeCss:D}))),mobileUI:x,popOverContainer:x?null==N?void 0:N.getModalContainer:P.popOverContainer||N.getModalContainer,borderMode:I,placeholder:g,multiple:f||v,ref:this.inputRef,value:h,options:a,filterOption:"string"==typeof V?y(V,"options","inputValue","option"):V,loadOptions:C(o)?this.lazyloadRemote:void 0,showInvalidMatch:l,creatable:M,searchable:i||!!o,onChange:this.changeValue,onBlur:function(t){return e.dispatchEvent("blur",t)},onFocus:function(t){return e.dispatchEvent("focus",t)},loading:d,noResultsText:T,renderMenu:E?this.renderMenu:void 0,overlay:k})),R.createElement(u,s({},this.props,{config:{themeCss:D,classNames:[{key:"selectControlClassName",weights:{focused:{suf:".is-opened:not(.is-mobile)"},disabled:{suf:".is-disabled"}}},{key:"selectPopoverClassName",weights:{default:{suf:" .".concat(S,"Select-option")},hover:{suf:" .".concat(S,"Select-option.is-highlight")},focused:{inner:".".concat(S,"Select-option.is-active")}}}],id:b},env:N})))},t.defaultProps={clearable:!1,searchable:!1,multiple:!1,showInvalidMatch:!1},r([p,a("design:type",Function),a("design:paramtypes",[Object,Object]),a("design:returntype",void 0)],t.prototype,"renderMenu",null),r([p,a("design:type",Function),a("design:paramtypes",[Object,Object,Boolean,Function]),a("design:returntype",void 0)],t.prototype,"handleOptionAdd",null),r([p,a("design:type",Function),a("design:paramtypes",[Object,Object,Boolean,Function]),a("design:returntype",void 0)],t.prototype,"handleOptionEdit",null),r([p,a("design:type",Function),a("design:paramtypes",[Object,Function]),a("design:returntype",void 0)],t.prototype,"handleOptionDelete",null),r([E(),a("design:type",Function),a("design:paramtypes",[]),a("design:returntype",void 0)],t.prototype,"render",null),t}(R.Component),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.renderItem=function(e){var t=this.props,o=t.labelField,n=t.menuTpl,i=t.data,l=t.render;return n?l("option/".concat(e.value),n,{data:b(i,e)}):"".concat(e.scopeLabel||"").concat(e[o||"label"])},t.prototype.render=function(){var e,t=this.props,o=t.className;t.classnames;var n=t.selectedOptions,i=t.sortable,l=t.loading,a=t.searchable,r=t.searchResultMode,s=t.showArrow,u=t.deferLoad,p=t.disabled,c=t.clearable,d=t.selectTitle,h=t.selectMode,v=t.multiple,m=t.columns,f=t.leftMode,y=t.borderMode,g=t.mobileUI,b=t.env,C=t.popOverContainer,O=t.maxTagCount,M=t.overflowTagPopover,w=t.placeholder,E=t.itemHeight,I=t.virtualThreshold,j=t.rightMode,F=t.loadingConfig,N=t.labelField,x=t.showInvalidMatch,k=t.checkAll,V=t.checkAllLabel,P=t.overlay,H=t.valueField,S=this.props,D=S.options,U=S.leftOptions,L=S.leftDefaultValue;return"associated"===h&&D&&D.length&&D[0].leftOptions&&Array.isArray(D[0].children)&&(U=D[0].leftOptions,L=null!==(e=D[0].leftDefaultValue)&&void 0!==e?e:L,D=D[0].children),R.createElement(R.Fragment,null,R.createElement(T,{selectMode:h,className:o,value:n,disabled:p,clearable:c,options:D,onChange:this.handleChange,option2value:this.option2value,optionItemRender:this.renderItem,itemRender:this.renderItem,sortable:i,searchResultMode:r,onSearch:a?this.handleSearch:void 0,showArrow:s,onDeferLoad:u,selectTitle:d,multiple:v,columns:m,leftMode:f,rightMode:j,leftOptions:U,borderMode:y,mobileUI:g,popOverContainer:C||b.getModalContainer,maxTagCount:O,overflowTagPopover:M,placeholder:w,itemHeight:E,virtualThreshold:I,virtualListHeight:266,labelField:N,showInvalidMatch:x,checkAllLabel:V,checkAll:k,overlay:P,valueField:H}),R.createElement(A,{overlay:!0,key:"info",show:l,loadingConfig:F}))},r([p,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",Object)],t.prototype,"renderItem",null),t}(I),V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),r([c({type:"select"})],t)}(x),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.defaultProps={multiple:!0},r([c({type:"multi-select"})],t)}(x);export{P as MultiSelectControlRenderer,V as SelectControlRenderer,x as default};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{a as o,c as n,i,n as l,o as a,r,t as s}from"./tslib.es6-TRdqp4ac.js";import{J as u,Nn as p,P as c,St as d,Tn as h,Xt as v,Z as m,an as f,fn as y,ht as g,oi as b,sn as C,vi as O,vn as M}from"./esm-Byma-6B-.js";import{ft as w,w as T}from"./esm-CM4fvlfi.js";import{i as A}from"./PopUp-CJyUTmjT.js";import{t as E}from"./StaticHoc-CJgNJAEY.js";import{t as I}from"./Transfer-_RgCe9xE.js";var R=/* @__PURE__ */e(t()),j=/* @__PURE__ */e(M()),F=/* @__PURE__ */e(h()),N=/* @__PURE__ */e(v()),x=function(e){function t(t){var o=e.call(this,t)||this;return o.lastTerm="",o.fetchCancel=null,o.changeValue=o.changeValue.bind(o),o.lazyloadRemote=(0,N.default)(o.loadRemote.bind(o),250,{trailing:!0,leading:!1}),o.inputRef=o.inputRef.bind(o),o}return i(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;C(t.autoComplete,t.data)&&f(e.autoComplete,t.autoComplete,e.data,t.data)&&this.lazyloadRemote(this.lastTerm)},t.prototype.componentWillUnmount=function(){this.unHook&&this.unHook(),this.fetchCancel=null},t.prototype.inputRef=function(e){this.input=e},t.prototype.focus=function(){var e,t;this.input&&(null===(t=null===(e=this.input)||void 0===e?void 0:e.focus)||void 0===t||t.call(e))},t.prototype.getValue=function(e,t){void 0===t&&(t=[]);var o=this.props,n=o.joinValues,i=o.extractValue,l=o.delimiter,a=o.multiple,r=o.valueField,s=o.options,u=e;return(Array.isArray(e)?e:e?[e]:[]).forEach(function(e){(0,F.default)(s,function(t){return t[r||"value"]==e[r||"value"]})||t.push(e)}),n?u=a?Array.isArray(e)?e.map(function(e){return e[r||"value"]}).join(l):e?e[r||"value"]:"":u?u[r||"value"]:"":i&&(u=a?Array.isArray(e)?e.map(function(e){return e[r||"value"]}):e?[e[r||"value"]]:[]:u?u[r||"value"]:""),u},t.prototype.dispatchEvent=function(e,t){return void 0===t&&(t={}),l(this,void 0,void 0,function(){var n,i,l,a,r,s,u,p;return o(this,function(o){switch(o.label){case 0:return n="on"+e.charAt(0).toUpperCase()+e.slice(1),i=this.props,l=i.dispatchEvent,a=i.options,r=i.value,s=i.multiple,u=i.selectedOptions,[4,l(e,g(this.props,{options:a,items:a,value:r,selectedItems:s?u:u[0]}))];case 1:return(null==(p=o.sent())?void 0:p.prevented)||this.props[n](t),[2]}})})},t.prototype.changeValue=function(e){return l(this,void 0,void 0,function(){var t,n,i,l,a,r,s,u;return o(this,function(o){switch(o.label){case 0:return t=this.props,n=t.onChange,i=t.setOptions,l=t.options,t.data,a=t.dispatchEvent,r=[],s=this.getValue(e,r),r.length&&i(l.concat(r)),[4,a("change",g(this.props,{value:s,options:l,items:l,selectedItems:e}))];case 1:return(null==(u=o.sent())?void 0:u.prevented)||null==n||n(s),[2]}})})},t.prototype.loadRemote=function(e,t){var n;return void 0===t&&(t=!1),l(this,void 0,void 0,function(){var i,l,a,r,s,u,p,c,d,h,v,m,f=this;return o(this,function(o){switch(o.label){case 0:if(i=this.props,l=i.autoComplete,a=i.env,r=i.data,s=i.setOptions,u=i.setLoading,p=i.formInited,c=i.addHook,!a||!a.fetcher)throw new Error("fetcher is required");if(!t&&!1===p&&c)return this.unHook&&this.unHook(),[2,this.unHook=c(this.loadRemote.bind(this,e,!0),"init")];if(this.lastTerm=e,d=b(r,{term:e,value:e}),!C(l,d))return[2,Promise.resolve({options:[]})];this.fetchCancel&&(null===(n=this.fetchCancel)||void 0===n||n.call(this,"autoComplete request cancelled."),this.fetchCancel=null,u(!1)),u(!0),o.label=1;case 1:return o.trys.push([1,,3,4]),[4,a.fetcher(l,d,{cancelExecutor:function(e){return f.fetchCancel=e}})];case 2:return h=o.sent(),this.fetchCancel=null,v=h.data&&h.data.options||h.data||[],m=this.mergeOptions(v),s(m),[2,{options:m}];case 3:return u(!1),[7];case 4:return[2]}})})},t.prototype.mergeOptions=function(e){var t=this.props,o=t.selectedOptions,n=t.valueField,i=void 0===n?"value":n,l=d(e,void 0,i).concat();return Array.isArray(o)&&o.length&&o.forEach(function(e){(0,F.default)(l,function(t){return t[i]===e[i]})||l.push(s(s({},e),{hidden:!0}))}),l},t.prototype.renderMenu=function(e,t){var o=this.props,n=o.menuTpl,i=o.render,l=o.data,a=o.optionClassName,r=o.testIdBuilder;return i("menu/".concat(t.index),n,{showNativeTitle:!0,className:(0,j.default)("Select-option-content",a),data:b(b(l,t),e),testIdBuilder:null==r?void 0:r.getChild("option-"+e.value||t.index)})},t.prototype.reload=function(e,t){var o=this.props.reloadOptions;o&&o(e,t)},t.prototype.option2value=function(){},t.prototype.renderOtherMode=function(){var e=this.props,t=e.selectMode,o=n(e,["selectMode"]);return R.createElement(k,s({},o,{selectMode:"group"===t?"list":t}))},t.prototype.doAction=function(e,t,o){var n,i,l,a=this.props,r=a.resetValue,s=a.onChange,u=a.formStore,p=a.store,c=a.name,d=a.valueField,h=null==e?void 0:e.actionType;if("clear"===h)null==s||s("");else if("reset"===h){var v=null!==(l=O(null!==(i=null==u?void 0:u.pristine)&&void 0!==i?i:null==p?void 0:p.pristine,c))&&void 0!==l?l:r,m=this.getValue(((n={})[d]=null!=v?v:"",n));null==s||s(m)}},t.prototype.handleOptionAdd=function(e,t,n,i){var a=this;void 0===e&&(e=-1),void 0===n&&(n=!1);var r=this.props,s=r.onAdd,u=r.autoComplete;null==s||s(e,t,n,function(){return l(a,void 0,void 0,function(){return o(this,function(e){switch(e.label){case 0:return null==i||i(t),u?[4,this.loadRemote(this.lastTerm)]:[3,2];case 1:return e.sent(),[2,!1];case 2:return[2]}})})})},t.prototype.handleOptionEdit=function(e,t,n,i){var a=this,r=this.props,s=r.onEdit,u=r.autoComplete;null==s||s(e,t,n,function(){return l(a,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return null==i||i(e),u?[4,this.loadRemote(this.lastTerm)]:[3,2];case 1:return t.sent(),[2,!1];case 2:return[2]}})})})},t.prototype.handleOptionDelete=function(e,t){var n=this,i=this.props,a=i.onDelete,r=i.autoComplete;null==a||a(e,function(){return l(n,void 0,void 0,function(){return o(this,function(o){switch(o.label){case 0:return null==t||t(e),r?[4,this.loadRemote(this.lastTerm)]:[3,2];case 1:return o.sent(),[2,!1];case 2:return[2]}})})})},t.prototype.render=function(){var e=this,t=this.props,o=t.autoComplete,i=t.searchable,l=t.showInvalidMatch,a=t.options,r=t.className,p=t.popoverClassName,c=t.style,d=t.loading;t.value;var h=t.selectedOptions,v=t.multi,f=t.multiple,g=t.placeholder,b=t.id,O=t.classPrefix;t.classnames;var M=t.creatable;t.inline;var T=t.noResultsText,A=t.render,E=t.menuTpl,I=t.borderMode,F=t.selectMode,N=t.env,x=t.mobileUI,k=t.overlay,V=t.filterOption,P=n(t,["autoComplete","searchable","showInvalidMatch","options","className","popoverClassName","style","loading","value","selectedOptions","multi","multiple","placeholder","id","classPrefix","classnames","creatable","inline","noResultsText","render","menuTpl","borderMode","selectMode","env","mobileUI","overlay","filterOption"]),H=this.props,S=H.classPrefix,D=H.themeCss;return T&&(T=A("noResultText",T)),R.createElement("div",{className:(0,j.default)("".concat(O,"SelectControl"),r),style:c},["table","list","group","tree","chained","associated"].includes(F)?this.renderOtherMode():R.createElement(w,s({},P,{onAdd:this.handleOptionAdd,onEdit:this.handleOptionEdit,onDelete:this.handleOptionDelete,className:(0,j.default)(m(s(s({},this.props),{name:"selectControlClassName",id:b,themeCss:D}))),popoverClassName:(0,j.default)(p,m(s(s({},this.props),{name:"selectPopoverClassName",id:b,themeCss:D}))),mobileUI:x,popOverContainer:x?null==N?void 0:N.getModalContainer:P.popOverContainer||N.getModalContainer,borderMode:I,placeholder:g,multiple:f||v,ref:this.inputRef,value:h,options:a,filterOption:"string"==typeof V?y(V,"options","inputValue","option"):V,loadOptions:C(o)?this.lazyloadRemote:void 0,showInvalidMatch:l,creatable:M,searchable:i||!!o,onChange:this.changeValue,onBlur:function(t){return e.dispatchEvent("blur",t)},onFocus:function(t){return e.dispatchEvent("focus",t)},loading:d,noResultsText:T,renderMenu:E?this.renderMenu:void 0,overlay:k})),R.createElement(u,s({},this.props,{config:{themeCss:D,classNames:[{key:"selectControlClassName",weights:{focused:{suf:".is-opened:not(.is-mobile)"},disabled:{suf:".is-disabled"}}},{key:"selectPopoverClassName",weights:{default:{suf:" .".concat(S,"Select-option")},hover:{suf:" .".concat(S,"Select-option.is-highlight")},focused:{inner:".".concat(S,"Select-option.is-active")}}}],id:b},env:N})))},t.defaultProps={clearable:!1,searchable:!1,multiple:!1,showInvalidMatch:!1},r([p,a("design:type",Function),a("design:paramtypes",[Object,Object]),a("design:returntype",void 0)],t.prototype,"renderMenu",null),r([p,a("design:type",Function),a("design:paramtypes",[Object,Object,Boolean,Function]),a("design:returntype",void 0)],t.prototype,"handleOptionAdd",null),r([p,a("design:type",Function),a("design:paramtypes",[Object,Object,Boolean,Function]),a("design:returntype",void 0)],t.prototype,"handleOptionEdit",null),r([p,a("design:type",Function),a("design:paramtypes",[Object,Function]),a("design:returntype",void 0)],t.prototype,"handleOptionDelete",null),r([E(),a("design:type",Function),a("design:paramtypes",[]),a("design:returntype",void 0)],t.prototype,"render",null),t}(R.Component),k=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.renderItem=function(e){var t=this.props,o=t.labelField,n=t.menuTpl,i=t.data,l=t.render;return n?l("option/".concat(e.value),n,{data:b(i,e)}):"".concat(e.scopeLabel||"").concat(e[o||"label"])},t.prototype.render=function(){var e,t=this.props,o=t.className;t.classnames;var n=t.selectedOptions,i=t.sortable,l=t.loading,a=t.searchable,r=t.searchResultMode,s=t.showArrow,u=t.deferLoad,p=t.disabled,c=t.clearable,d=t.selectTitle,h=t.selectMode,v=t.multiple,m=t.columns,f=t.leftMode,y=t.borderMode,g=t.mobileUI,b=t.env,C=t.popOverContainer,O=t.maxTagCount,M=t.overflowTagPopover,w=t.placeholder,E=t.itemHeight,I=t.virtualThreshold,j=t.rightMode,F=t.loadingConfig,N=t.labelField,x=t.showInvalidMatch,k=t.checkAll,V=t.checkAllLabel,P=t.overlay,H=t.valueField,S=this.props,D=S.options,U=S.leftOptions,L=S.leftDefaultValue;return"associated"===h&&D&&D.length&&D[0].leftOptions&&Array.isArray(D[0].children)&&(U=D[0].leftOptions,L=null!==(e=D[0].leftDefaultValue)&&void 0!==e?e:L,D=D[0].children),R.createElement(R.Fragment,null,R.createElement(T,{selectMode:h,className:o,value:n,disabled:p,clearable:c,options:D,onChange:this.handleChange,option2value:this.option2value,optionItemRender:this.renderItem,itemRender:this.renderItem,sortable:i,searchResultMode:r,onSearch:a?this.handleSearch:void 0,showArrow:s,onDeferLoad:u,selectTitle:d,multiple:v,columns:m,leftMode:f,rightMode:j,leftOptions:U,borderMode:y,mobileUI:g,popOverContainer:C||b.getModalContainer,maxTagCount:O,overflowTagPopover:M,placeholder:w,itemHeight:E,virtualThreshold:I,virtualListHeight:266,labelField:N,showInvalidMatch:x,checkAllLabel:V,checkAll:k,overlay:P,valueField:H}),R.createElement(A,{overlay:!0,key:"info",show:l,loadingConfig:F}))},r([p,a("design:type",Function),a("design:paramtypes",[Object]),a("design:returntype",Object)],t.prototype,"renderItem",null),t}(I),V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),r([c({type:"select"})],t)}(x),P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.defaultProps={multiple:!0},r([c({type:"multi-select"})],t)}(x);export{P as MultiSelectControlRenderer,V as SelectControlRenderer,x 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 r,n as o,o as i,r as s,t as n}from"./tslib.es6-TRdqp4ac.js";import{c as d}from"./function-CrEuBBd9.js";import{Nn as c,Nr as h,Nt as p,Xr as u,an as l,dn as f,dt as v,ft as m,gr as g,in as y,it as D,oa as b,oi as P,pn as F,qr as S,sn as A,xr as C,yr as M}from"./esm-D3qvBzlk.js";import{kt as k,nt as w}from"./esm-DdEfrmRq.js";import{i as j}from"./PopUp-DTLG0S4M.js";var O=/* @__PURE__ */t(e()),x=/* @__PURE__ */t(k()),T=/* @__PURE__ */t(F()),E=/* @__PURE__ */t(d()),I=["inited","onApiFetched","onSchemaApiFetched","onWsFetched"],U=function(t){function e(e){var a=t.call(this,e)||this;return a.dataProviders=a.initDataProviders(e.dataProvider),a.handleQuery=a.handleQuery.bind(a),a.handleAction=a.handleAction.bind(a),a.handleChange=a.handleChange.bind(a),a.reload=a.reload.bind(a),a.silentReload=a.silentReload.bind(a),a.initInterval=a.initInterval.bind(a),a.afterDataFetch=a.afterDataFetch.bind(a),a.afterSchemaFetch=a.afterSchemaFetch.bind(a),a.runDataProvider=a.runDataProvider.bind(a),a.dataProviderSetData=a.dataProviderSetData.bind(a),a}return r(e,t),e.prototype.componentDidMount=function(){return o(this,void 0,void 0,function(){var t,e,r,o;return a(this,function(a){switch(a.label){case 0:return t=this.props,e=t.data,r=t.dispatchEvent,this.mounted=!0,[4,r("init",e,this)];case 1:return(null==(o=a.sent())?void 0:o.prevented)||this.initFetch(),[2]}})})},e.prototype.componentDidUpdate=function(t){var e,a=this,r=this.props,o=r.store,i=r.messages,s=i.fetchSuccess,n=i.fetchFailed;r.dataProvider!==t.dataProvider&&(this.dataProviders=this.initDataProviders(r.dataProvider),this.dataProviders&&(null===(e=this.dataProviders)||void 0===e?void 0:e.inited)&&this.runDataProvider("inited")),l(t.api,r.api,t.data,r.data)&&A(r.api,o.data)&&o.fetchData(r.api,o.data,{successMessage:s,errorMessage:n}).then(function(t){a.runDataProvider("onApiFetched"),a.afterDataFetch(t)}),l(t.schemaApi,r.schemaApi,t.data,r.data)&&A(r.schemaApi,o.data)&&o.fetchSchema(r.schemaApi,o.data,{successMessage:s,errorMessage:n}).then(function(t){a.runDataProvider("onSchemaApiFetched"),a.afterSchemaFetch(t)}),r.ws&&t.ws!==r.ws&&(this.socket&&this.socket.close(),this.socket=this.fetchWSData(r.ws,o.data)),M(t.defaultData,r.defaultData)&&o.reInitData(r.defaultData)},e.prototype.componentWillUnmount=function(){this.mounted=!1,this.runDataProviderUnsubscribe(),clearTimeout(this.timer),this.socket&&this.socket.close&&this.socket.close()},e.prototype.doAction=function(t,e,a,r){if(void 0===a&&(a=!1),"rebuild"===(null==t?void 0:t.actionType)){var o=this.props,i=o.schemaApi,s=o.store,n=o.dataProvider,d=o.messages,c=d.fetchSuccess,h=d.fetchFailed;s.updateData(r),clearTimeout(this.timer),A(i,s.data)&&s.fetchSchema(i,s.data,{successMessage:c,errorMessage:h}).then(this.afterSchemaFetch),n&&this.runDataProvider("inited")}},e.prototype.initFetch=function(){var t=this,e=this.props,a=e.schemaApi,r=e.initFetchSchema,o=e.api,i=e.ws,s=e.initFetch,n=e.initFetchOn,d=e.dataProvider,c=e.store,h=e.messages,p=h.fetchSuccess,u=h.fetchFailed;A(a,c.data,r)&&c.fetchSchema(a,c.data,{successMessage:p,errorMessage:u}).then(function(e){t.runDataProvider("onSchemaApiFetched"),t.afterSchemaFetch(e)}),A(o,c.data,s,n)&&c.fetchInitData(o,c.data,{successMessage:p,errorMessage:u}).then(function(e){t.runDataProvider("onApiFetched"),t.afterDataFetch(e)}),i&&(this.socket=this.fetchWSData(i,c.data)),d&&this.runDataProvider("inited")},e.prototype.initDataProviders=function(t){var e=this,a=(0,E.default)(t)?(0,T.default)(t):t,r={};if(a)if((0,E.default)(a))Object.keys(a).forEach(function(t){var o=e.normalizeProvider(a[t],t);r=(0,x.default)(r,o||{})});else{var o=this.normalizeProvider(a,"inited");r=(0,x.default)(r,o||{})}return r},e.prototype.normalizeProvider=function(t,e){var a,r;if(void 0===e&&(e="inited"),!~I.indexOf(e))return null;if("function"==typeof t)return(a={})[e]=t,a;if("string"==typeof t){var o=f(t,"data","setData","env");return o?((r={})[e]=o,r):null}return null},e.prototype.runDataProvider=function(t){return o(this,void 0,void 0,function(){var e,r,o,i;return a(this,function(a){switch(a.label){case 0:return this.runDataProviderUnsubscribe(t),e=this.props.store,(r=this.dataProviders)&&~I.indexOf(t)&&(o=r[t])&&"function"==typeof o?[4,o(e.data,this.dataProviderSetData,this.props.env)]:[3,2];case 1:"function"==typeof(i=a.sent())&&(this.dataProviderUnsubscribe||(this.dataProviderUnsubscribe={}),this.dataProviderUnsubscribe[t]=i),a.label=2;case 2:return[2]}})})},e.prototype.runDataProviderUnsubscribe=function(t){var e,a=this.dataProviderUnsubscribe;if(a)if(t){var r=a[t];try{r&&"function"==typeof r&&r()}catch(o){console.error(o)}}else null===(e=Object.keys(a))||void 0===e||e.forEach(function(t){var e=a[t];try{e&&"function"==typeof e&&e()}catch(o){console.error(o)}})},e.prototype.dataProviderSetData=function(t){if(this.mounted){var e=this.props.store;e.updateData(t,void 0,!1),e.setHasRemoteData()}},e.prototype.fetchWSData=function(t,e){var a=this,r=this.props,o=r.env,i=r.store,s=y(t,e);o.wsFetcher(s,function(t){var e,r,n,d,c=t;if("status"in t&&"data"in t&&(c=t.data,0!==t.status))return i.updateMessage(null!==(r=null===(e=null==s?void 0:s.messages)||void 0===e?void 0:e.failed)&&void 0!==r?r:t.msg,!0),void o.notify("error",null!==(d=null===(n=null==s?void 0:s.messages)||void 0===n?void 0:n.failed)&&void 0!==d?d:t.msg);i.updateData(c,void 0,!1,s.concatDataFields),i.setHasRemoteData(),a.runDataProvider("onWsFetched"),a.afterDataFetch({ok:!0,data:c})},function(t){i.updateMessage(t,!0),o.notify("error",t)})},e.prototype.afterDataFetch=function(t){var e,a=(null==t?void 0:t.hasOwnProperty("ok"))?null!==(e=t.data)&&void 0!==e?e:{}:t,r=this.props,o=r.onBulkChange,i=r.dispatchEvent,s=r.store,d=r.formStore;b(s)&&(null==i||i("fetchInited",P(this.props.data,n(n({},a),{__response:{msg:s.msg,error:s.error},responseData:a,responseStatus:void 0===(null==t?void 0:t.status)?s.error?1:0:null==t?void 0:t.status,responseMsg:s.msg}))),!g(a)&&o&&d&&o(a,!1,{type:"api"}),null!=t&&t.ok&&this.initInterval(a))},e.prototype.afterSchemaFetch=function(t){var e=this.props,a=e.onBulkChange,r=e.formStore,o=e.dispatchEvent,i=e.store;null==o||o("fetchSchemaInited",n(n({},t),{__response:{msg:i.msg,error:i.error},responseData:t,responseStatus:void 0===(null==t?void 0:t.status)?i.error?1:0:null==t?void 0:t.status,responseMsg:i.msg})),r&&(null==t?void 0:t.data)&&a&&a&&a(t.data),this.initInterval(t)},e.prototype.initInterval=function(t){var e=this.props,a=e.interval,r=e.silentPolling,o=e.stopAutoRefreshWhen,i=e.data;return clearTimeout(this.timer),a&&this.mounted&&(!o||!S(o,P(i,t)))&&(this.timer=setTimeout(r?this.silentReload:this.reload,Math.max(a,1e3))),t},e.prototype.reload=function(t,e,r,i,s){return o(this,void 0,void 0,function(){var t,r,o,n,d,c,h,p,u;return a(this,function(a){switch(a.label){case 0:return e?[2,this.receive(e,void 0,s)]:(t=this.props,r=t.schemaApi,t.initFetchSchema,o=t.api,t.initFetch,t.initFetchOn,n=t.store,d=t.dataProvider,c=t.messages,h=c.fetchSuccess,p=c.fetchFailed,clearTimeout(this.timer),A(r,n.data)?[4,n.fetchSchema(r,n.data,{successMessage:h,errorMessage:p})]:[3,3]);case 1:return u=a.sent(),[4,this.runDataProvider("onApiFetched")];case 2:a.sent(),this.afterSchemaFetch(u),a.label=3;case 3:return A(o,n.data)?[4,n.fetchData(o,n.data,{silent:i,successMessage:h,errorMessage:p})]:[3,6];case 4:return u=a.sent(),[4,this.runDataProvider("onSchemaApiFetched")];case 5:a.sent(),this.afterDataFetch(u),a.label=6;case 6:return d?[4,this.runDataProvider("inited")]:[3,8];case 7:a.sent(),a.label=8;case 8:return[2,n.data]}})})},e.prototype.silentReload=function(t,e){this.reload(t,e,void 0,!0)},e.prototype.receive=function(t,e,r){return o(this,void 0,void 0,function(){return a(this,function(e){return this.props.store.updateData(t,void 0,r),[2,this.reload()]})})},e.prototype.handleQuery=function(t){var e=this;return this.props.api||this.props.schemaApi?(!(null==t?void 0:t.hasOwnProperty("orderBy"))||![this.props.api,this.props.schemaApi].every(function(a){return!a||!l(a,a,e.props.store.data,P(e.props.store.data,t))}))&&void this.receive(t):!!this.props.onQuery&&this.props.onQuery(t)},e.prototype.reloadTarget=function(t,e){},e.prototype.handleDialogConfirm=function(t,e,a,r){this.props.store.closeDialog(!0,t)},e.prototype.handleDialogClose=function(t){void 0===t&&(t=!1),this.props.store.closeDialog(t)},e.prototype.openFeedback=function(t,e){var a=this;return new Promise(function(r){var o=a.props.store;o.setCurrentAction({type:"button",actionType:"dialog",dialog:t},a.props.resolveDefinitions),o.openDialog(e,void 0,function(t){r(t)},a.context)})},e.prototype.handleAction=function(t,e,r,i,s){var n=this;void 0===i&&(i=!1);var d=this.props,c=d.onAction,h=d.store,p=d.env,l=d.api,f=d.translate;return l&&"ajax"===e.actionType?(h.setCurrentAction(e,this.props.resolveDefinitions),h.saveRemote(e.api,r,{successMessage:f(e.messages&&e.messages.success),errorMessage:f(e.messages&&e.messages.failed)}).then(function(t){return o(n,void 0,void 0,function(){var r;return a(this,function(a){switch(a.label){case 0:return this.afterDataFetch(t),e.feedback&&C(e.feedback,h.data)?[4,this.openFeedback(e.feedback,h.data)]:[3,2];case 1:a.sent(),a.label=2;case 2:return(r=e.redirect&&u(e.redirect,h.data))&&p.jumpTo(r,e,h.data),e.reload&&this.reloadTarget(m(e.reload,h.data),h.data),[2]}})})}).catch(function(t){if(i||e.countDown)throw t})):c(t,e,r,i,s||this.context)},e.prototype.handleChange=function(t,e,a,r){var o,i,s=this.props,n=s.store,d=s.formStore,c=s.onChange;"string"==typeof e&&(null===(i=(o=n).changeValue)||void 0===i||i.call(o,e,t),d&&(null==c||c(t,e,a,r)))},e.prototype.renderBody=function(){var t=this.props,e=t.render,a=t.store,r=t.body;return t.classnames,e("body",a.schema||r,{key:a.schemaKey||"body",loading:a.loading,onQuery:this.handleQuery,onAction:this.handleAction,onChange:this.handleChange})},e.prototype.render=function(){var t=this.props,e=t.className,a=t.style,r=t.store,o=t.render,i=t.env,s=t.classPrefix,d=t.classnames,c=t.loadingConfig,h=t.showErrorMsg,p=t.testIdBuilder;return O.createElement("div",n({className:d("".concat(s,"Service"),e),style:a},null==p?void 0:p.getTestId()),!i.forceSilenceInsideError&&r.error&&!1!==h?O.createElement(w,{level:"danger",showCloseButton:!0,onClose:function(){return r.updateMessage("")}},r.msg):null,this.renderBody(),O.createElement(j,{size:"lg",overlay:!0,key:"info",show:r.loading,loadingConfig:c}),o("modal",n(n({},r.dialogSchema),{type:"dialog"}),{key:"dialog",data:r.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:r.dialogOpen}))},e.defaultProps={messages:{fetchFailed:"fetchFailed"},showErrorMsg:!0},e.propsList=[],s([c,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"initFetch",null),s([c,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"initDataProviders",null),s([c,i("design:type",Function),i("design:paramtypes",[Object,String]),i("design:returntype",Object)],e.prototype,"normalizeProvider",null),s([c,i("design:type",Function),i("design:paramtypes",[Array,Object,Object,Array]),i("design:returntype",void 0)],e.prototype,"handleDialogConfirm",null),s([c,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"handleDialogClose",null),e}(O.Component),R=function(t){function e(e,a){var r=t.call(this,e)||this;return a.registerComponent(r),r}return r(e,t),e.prototype.reload=function(e,r,i,s,n){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o=this.context,e?[2,o.reload(r?"".concat(e,"?").concat(h(r)):e,i)]:[2,t.prototype.reload.call(this,e,r,i,s,n)]})})},e.prototype.receive=function(e,r,i){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o=this.context,r?[2,o.send(r,e)]:[2,t.prototype.receive.call(this,e,r,i)]})})},e.prototype.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this),this.context.unRegisterComponent(this)},e.prototype.reloadTarget=function(t,e){this.context.reload(t,e)},e.prototype.setData=function(t,e){return this.props.store.updateData(t,void 0,e)},e.prototype.getData=function(){return this.props.store.data},e.contextType=v,s([D({type:"service",storeType:p.name,isolateScope:!0,storeExtendsData:function(t){return!t.formStore}}),i("design:paramtypes",[Object,Object])],e)}(U);export{R as ServiceRenderer,U as default,I as eventTypes};
1
+ import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{a,i as r,n as o,o as i,r as s,t as n}from"./tslib.es6-TRdqp4ac.js";import{c as d}from"./function-CrEuBBd9.js";import{Nn as c,Nr as h,Nt as p,Xr as u,an as l,dn as f,dt as v,ft as m,gr as g,in as y,it as D,oa as b,oi as P,pn as F,qr as S,sn as A,xr as C,yr as M}from"./esm-Byma-6B-.js";import{kt as k,nt as w}from"./esm-CM4fvlfi.js";import{i as j}from"./PopUp-CJyUTmjT.js";var O=/* @__PURE__ */t(e()),x=/* @__PURE__ */t(k()),T=/* @__PURE__ */t(F()),E=/* @__PURE__ */t(d()),I=["inited","onApiFetched","onSchemaApiFetched","onWsFetched"],U=function(t){function e(e){var a=t.call(this,e)||this;return a.dataProviders=a.initDataProviders(e.dataProvider),a.handleQuery=a.handleQuery.bind(a),a.handleAction=a.handleAction.bind(a),a.handleChange=a.handleChange.bind(a),a.reload=a.reload.bind(a),a.silentReload=a.silentReload.bind(a),a.initInterval=a.initInterval.bind(a),a.afterDataFetch=a.afterDataFetch.bind(a),a.afterSchemaFetch=a.afterSchemaFetch.bind(a),a.runDataProvider=a.runDataProvider.bind(a),a.dataProviderSetData=a.dataProviderSetData.bind(a),a}return r(e,t),e.prototype.componentDidMount=function(){return o(this,void 0,void 0,function(){var t,e,r,o;return a(this,function(a){switch(a.label){case 0:return t=this.props,e=t.data,r=t.dispatchEvent,this.mounted=!0,[4,r("init",e,this)];case 1:return(null==(o=a.sent())?void 0:o.prevented)||this.initFetch(),[2]}})})},e.prototype.componentDidUpdate=function(t){var e,a=this,r=this.props,o=r.store,i=r.messages,s=i.fetchSuccess,n=i.fetchFailed;r.dataProvider!==t.dataProvider&&(this.dataProviders=this.initDataProviders(r.dataProvider),this.dataProviders&&(null===(e=this.dataProviders)||void 0===e?void 0:e.inited)&&this.runDataProvider("inited")),l(t.api,r.api,t.data,r.data)&&A(r.api,o.data)&&o.fetchData(r.api,o.data,{successMessage:s,errorMessage:n}).then(function(t){a.runDataProvider("onApiFetched"),a.afterDataFetch(t)}),l(t.schemaApi,r.schemaApi,t.data,r.data)&&A(r.schemaApi,o.data)&&o.fetchSchema(r.schemaApi,o.data,{successMessage:s,errorMessage:n}).then(function(t){a.runDataProvider("onSchemaApiFetched"),a.afterSchemaFetch(t)}),r.ws&&t.ws!==r.ws&&(this.socket&&this.socket.close(),this.socket=this.fetchWSData(r.ws,o.data)),M(t.defaultData,r.defaultData)&&o.reInitData(r.defaultData)},e.prototype.componentWillUnmount=function(){this.mounted=!1,this.runDataProviderUnsubscribe(),clearTimeout(this.timer),this.socket&&this.socket.close&&this.socket.close()},e.prototype.doAction=function(t,e,a,r){if(void 0===a&&(a=!1),"rebuild"===(null==t?void 0:t.actionType)){var o=this.props,i=o.schemaApi,s=o.store,n=o.dataProvider,d=o.messages,c=d.fetchSuccess,h=d.fetchFailed;s.updateData(r),clearTimeout(this.timer),A(i,s.data)&&s.fetchSchema(i,s.data,{successMessage:c,errorMessage:h}).then(this.afterSchemaFetch),n&&this.runDataProvider("inited")}},e.prototype.initFetch=function(){var t=this,e=this.props,a=e.schemaApi,r=e.initFetchSchema,o=e.api,i=e.ws,s=e.initFetch,n=e.initFetchOn,d=e.dataProvider,c=e.store,h=e.messages,p=h.fetchSuccess,u=h.fetchFailed;A(a,c.data,r)&&c.fetchSchema(a,c.data,{successMessage:p,errorMessage:u}).then(function(e){t.runDataProvider("onSchemaApiFetched"),t.afterSchemaFetch(e)}),A(o,c.data,s,n)&&c.fetchInitData(o,c.data,{successMessage:p,errorMessage:u}).then(function(e){t.runDataProvider("onApiFetched"),t.afterDataFetch(e)}),i&&(this.socket=this.fetchWSData(i,c.data)),d&&this.runDataProvider("inited")},e.prototype.initDataProviders=function(t){var e=this,a=(0,E.default)(t)?(0,T.default)(t):t,r={};if(a)if((0,E.default)(a))Object.keys(a).forEach(function(t){var o=e.normalizeProvider(a[t],t);r=(0,x.default)(r,o||{})});else{var o=this.normalizeProvider(a,"inited");r=(0,x.default)(r,o||{})}return r},e.prototype.normalizeProvider=function(t,e){var a,r;if(void 0===e&&(e="inited"),!~I.indexOf(e))return null;if("function"==typeof t)return(a={})[e]=t,a;if("string"==typeof t){var o=f(t,"data","setData","env");return o?((r={})[e]=o,r):null}return null},e.prototype.runDataProvider=function(t){return o(this,void 0,void 0,function(){var e,r,o,i;return a(this,function(a){switch(a.label){case 0:return this.runDataProviderUnsubscribe(t),e=this.props.store,(r=this.dataProviders)&&~I.indexOf(t)&&(o=r[t])&&"function"==typeof o?[4,o(e.data,this.dataProviderSetData,this.props.env)]:[3,2];case 1:"function"==typeof(i=a.sent())&&(this.dataProviderUnsubscribe||(this.dataProviderUnsubscribe={}),this.dataProviderUnsubscribe[t]=i),a.label=2;case 2:return[2]}})})},e.prototype.runDataProviderUnsubscribe=function(t){var e,a=this.dataProviderUnsubscribe;if(a)if(t){var r=a[t];try{r&&"function"==typeof r&&r()}catch(o){console.error(o)}}else null===(e=Object.keys(a))||void 0===e||e.forEach(function(t){var e=a[t];try{e&&"function"==typeof e&&e()}catch(o){console.error(o)}})},e.prototype.dataProviderSetData=function(t){if(this.mounted){var e=this.props.store;e.updateData(t,void 0,!1),e.setHasRemoteData()}},e.prototype.fetchWSData=function(t,e){var a=this,r=this.props,o=r.env,i=r.store,s=y(t,e);o.wsFetcher(s,function(t){var e,r,n,d,c=t;if("status"in t&&"data"in t&&(c=t.data,0!==t.status))return i.updateMessage(null!==(r=null===(e=null==s?void 0:s.messages)||void 0===e?void 0:e.failed)&&void 0!==r?r:t.msg,!0),void o.notify("error",null!==(d=null===(n=null==s?void 0:s.messages)||void 0===n?void 0:n.failed)&&void 0!==d?d:t.msg);i.updateData(c,void 0,!1,s.concatDataFields),i.setHasRemoteData(),a.runDataProvider("onWsFetched"),a.afterDataFetch({ok:!0,data:c})},function(t){i.updateMessage(t,!0),o.notify("error",t)})},e.prototype.afterDataFetch=function(t){var e,a=(null==t?void 0:t.hasOwnProperty("ok"))?null!==(e=t.data)&&void 0!==e?e:{}:t,r=this.props,o=r.onBulkChange,i=r.dispatchEvent,s=r.store,d=r.formStore;b(s)&&(null==i||i("fetchInited",P(this.props.data,n(n({},a),{__response:{msg:s.msg,error:s.error},responseData:a,responseStatus:void 0===(null==t?void 0:t.status)?s.error?1:0:null==t?void 0:t.status,responseMsg:s.msg}))),!g(a)&&o&&d&&o(a,!1,{type:"api"}),null!=t&&t.ok&&this.initInterval(a))},e.prototype.afterSchemaFetch=function(t){var e=this.props,a=e.onBulkChange,r=e.formStore,o=e.dispatchEvent,i=e.store;null==o||o("fetchSchemaInited",n(n({},t),{__response:{msg:i.msg,error:i.error},responseData:t,responseStatus:void 0===(null==t?void 0:t.status)?i.error?1:0:null==t?void 0:t.status,responseMsg:i.msg})),r&&(null==t?void 0:t.data)&&a&&a&&a(t.data),this.initInterval(t)},e.prototype.initInterval=function(t){var e=this.props,a=e.interval,r=e.silentPolling,o=e.stopAutoRefreshWhen,i=e.data;return clearTimeout(this.timer),a&&this.mounted&&(!o||!S(o,P(i,t)))&&(this.timer=setTimeout(r?this.silentReload:this.reload,Math.max(a,1e3))),t},e.prototype.reload=function(t,e,r,i,s){return o(this,void 0,void 0,function(){var t,r,o,n,d,c,h,p,u;return a(this,function(a){switch(a.label){case 0:return e?[2,this.receive(e,void 0,s)]:(t=this.props,r=t.schemaApi,t.initFetchSchema,o=t.api,t.initFetch,t.initFetchOn,n=t.store,d=t.dataProvider,c=t.messages,h=c.fetchSuccess,p=c.fetchFailed,clearTimeout(this.timer),A(r,n.data)?[4,n.fetchSchema(r,n.data,{successMessage:h,errorMessage:p})]:[3,3]);case 1:return u=a.sent(),[4,this.runDataProvider("onApiFetched")];case 2:a.sent(),this.afterSchemaFetch(u),a.label=3;case 3:return A(o,n.data)?[4,n.fetchData(o,n.data,{silent:i,successMessage:h,errorMessage:p})]:[3,6];case 4:return u=a.sent(),[4,this.runDataProvider("onSchemaApiFetched")];case 5:a.sent(),this.afterDataFetch(u),a.label=6;case 6:return d?[4,this.runDataProvider("inited")]:[3,8];case 7:a.sent(),a.label=8;case 8:return[2,n.data]}})})},e.prototype.silentReload=function(t,e){this.reload(t,e,void 0,!0)},e.prototype.receive=function(t,e,r){return o(this,void 0,void 0,function(){return a(this,function(e){return this.props.store.updateData(t,void 0,r),[2,this.reload()]})})},e.prototype.handleQuery=function(t){var e=this;return this.props.api||this.props.schemaApi?(!(null==t?void 0:t.hasOwnProperty("orderBy"))||![this.props.api,this.props.schemaApi].every(function(a){return!a||!l(a,a,e.props.store.data,P(e.props.store.data,t))}))&&void this.receive(t):!!this.props.onQuery&&this.props.onQuery(t)},e.prototype.reloadTarget=function(t,e){},e.prototype.handleDialogConfirm=function(t,e,a,r){this.props.store.closeDialog(!0,t)},e.prototype.handleDialogClose=function(t){void 0===t&&(t=!1),this.props.store.closeDialog(t)},e.prototype.openFeedback=function(t,e){var a=this;return new Promise(function(r){var o=a.props.store;o.setCurrentAction({type:"button",actionType:"dialog",dialog:t},a.props.resolveDefinitions),o.openDialog(e,void 0,function(t){r(t)},a.context)})},e.prototype.handleAction=function(t,e,r,i,s){var n=this;void 0===i&&(i=!1);var d=this.props,c=d.onAction,h=d.store,p=d.env,l=d.api,f=d.translate;return l&&"ajax"===e.actionType?(h.setCurrentAction(e,this.props.resolveDefinitions),h.saveRemote(e.api,r,{successMessage:f(e.messages&&e.messages.success),errorMessage:f(e.messages&&e.messages.failed)}).then(function(t){return o(n,void 0,void 0,function(){var r;return a(this,function(a){switch(a.label){case 0:return this.afterDataFetch(t),e.feedback&&C(e.feedback,h.data)?[4,this.openFeedback(e.feedback,h.data)]:[3,2];case 1:a.sent(),a.label=2;case 2:return(r=e.redirect&&u(e.redirect,h.data))&&p.jumpTo(r,e,h.data),e.reload&&this.reloadTarget(m(e.reload,h.data),h.data),[2]}})})}).catch(function(t){if(i||e.countDown)throw t})):c(t,e,r,i,s||this.context)},e.prototype.handleChange=function(t,e,a,r){var o,i,s=this.props,n=s.store,d=s.formStore,c=s.onChange;"string"==typeof e&&(null===(i=(o=n).changeValue)||void 0===i||i.call(o,e,t),d&&(null==c||c(t,e,a,r)))},e.prototype.renderBody=function(){var t=this.props,e=t.render,a=t.store,r=t.body;return t.classnames,e("body",a.schema||r,{key:a.schemaKey||"body",loading:a.loading,onQuery:this.handleQuery,onAction:this.handleAction,onChange:this.handleChange})},e.prototype.render=function(){var t=this.props,e=t.className,a=t.style,r=t.store,o=t.render,i=t.env,s=t.classPrefix,d=t.classnames,c=t.loadingConfig,h=t.showErrorMsg,p=t.testIdBuilder;return O.createElement("div",n({className:d("".concat(s,"Service"),e),style:a},null==p?void 0:p.getTestId()),!i.forceSilenceInsideError&&r.error&&!1!==h?O.createElement(w,{level:"danger",showCloseButton:!0,onClose:function(){return r.updateMessage("")}},r.msg):null,this.renderBody(),O.createElement(j,{size:"lg",overlay:!0,key:"info",show:r.loading,loadingConfig:c}),o("modal",n(n({},r.dialogSchema),{type:"dialog"}),{key:"dialog",data:r.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:r.dialogOpen}))},e.defaultProps={messages:{fetchFailed:"fetchFailed"},showErrorMsg:!0},e.propsList=[],s([c,i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",void 0)],e.prototype,"initFetch",null),s([c,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"initDataProviders",null),s([c,i("design:type",Function),i("design:paramtypes",[Object,String]),i("design:returntype",Object)],e.prototype,"normalizeProvider",null),s([c,i("design:type",Function),i("design:paramtypes",[Array,Object,Object,Array]),i("design:returntype",void 0)],e.prototype,"handleDialogConfirm",null),s([c,i("design:type",Function),i("design:paramtypes",[Object]),i("design:returntype",void 0)],e.prototype,"handleDialogClose",null),e}(O.Component),R=function(t){function e(e,a){var r=t.call(this,e)||this;return a.registerComponent(r),r}return r(e,t),e.prototype.reload=function(e,r,i,s,n){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o=this.context,e?[2,o.reload(r?"".concat(e,"?").concat(h(r)):e,i)]:[2,t.prototype.reload.call(this,e,r,i,s,n)]})})},e.prototype.receive=function(e,r,i){return o(this,void 0,void 0,function(){var o;return a(this,function(a){return o=this.context,r?[2,o.send(r,e)]:[2,t.prototype.receive.call(this,e,r,i)]})})},e.prototype.componentWillUnmount=function(){t.prototype.componentWillUnmount.call(this),this.context.unRegisterComponent(this)},e.prototype.reloadTarget=function(t,e){this.context.reload(t,e)},e.prototype.setData=function(t,e){return this.props.store.updateData(t,void 0,e)},e.prototype.getData=function(){return this.props.store.data},e.contextType=v,s([D({type:"service",storeType:p.name,isolateScope:!0,storeExtendsData:function(t){return!t.formStore}}),i("design:paramtypes",[Object,Object])],e)}(U);export{R as ServiceRenderer,U as default,I as eventTypes};
@@ -1 +1 @@
1
- import{o as s}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{c as a,i as e,o as r,r as i,t as p}from"./tslib.es6-TRdqp4ac.js";import{Nn as o,Xr as n,it as l,vn as m}from"./esm-D3qvBzlk.js";import{i as c}from"./esm-DdEfrmRq.js";var d=/* @__PURE__ */s(t()),u=/* @__PURE__ */s(m()),h=function(s){function t(){return null!==s&&s.apply(this,arguments)||this}return e(t,s),t.prototype.handleClick=function(){this.props.dispatchEvent("click",this.props.data)},t.prototype.render=function(){var s=this.props,t=s.className,e=s.radius,r=s.shapeType,i=s.data,o=a(s,["className","radius","shapeType","data"]),l=n(r,i)||r,m=+n(e,i)||e;return d.createElement(c,p({},o,{className:(0,u.default)(t),shapeType:l,radius:m,onClick:this.handleClick}))},i([o,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],t.prototype,"handleClick",null),i([l({type:"shape"})],t)}(d.Component);export{h as ShapeRenderer};
1
+ import{o as s}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{c as a,i as e,o as r,r as i,t as p}from"./tslib.es6-TRdqp4ac.js";import{Nn as o,Xr as n,it as l,vn as m}from"./esm-Byma-6B-.js";import{i as c}from"./esm-CM4fvlfi.js";var d=/* @__PURE__ */s(t()),u=/* @__PURE__ */s(m()),h=function(s){function t(){return null!==s&&s.apply(this,arguments)||this}return e(t,s),t.prototype.handleClick=function(){this.props.dispatchEvent("click",this.props.data)},t.prototype.render=function(){var s=this.props,t=s.className,e=s.radius,r=s.shapeType,i=s.data,o=a(s,["className","radius","shapeType","data"]),l=n(r,i)||r,m=+n(e,i)||e;return d.createElement(c,p({},o,{className:(0,u.default)(t),shapeType:l,radius:m,onClick:this.handleClick}))},i([o,r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",void 0)],t.prototype,"handleClick",null),i([l({type:"shape"})],t)}(d.Component);export{h as ShapeRenderer};
@@ -1 +1 @@
1
- import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{c as o,i,o as n,r as h,t as s}from"./tslib.es6-TRdqp4ac.js";import{Nn as r,it as p}from"./esm-D3qvBzlk.js";import{a}from"./esm-DdEfrmRq.js";var d=/* @__PURE__ */t(e()),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={leftShow:!1,rightShow:!1},e}return i(e,t),e.prototype.handleLeftShow=function(){this.props.dispatchEvent("leftShow",this.props.data)},e.prototype.handleRightShow=function(){this.props.dispatchEvent("rightShow",this.props.data)},e.prototype.handleLeftHide=function(){this.props.dispatchEvent("leftHide",this.props.data)},e.prototype.handleRightHide=function(){this.props.dispatchEvent("rightHide",this.props.data)},e.prototype.showLeft=function(){this.setState({leftShow:!0})},e.prototype.hideLeft=function(){this.setState({leftShow:!1})},e.prototype.showRight=function(){this.setState({rightShow:!0})},e.prototype.hideRight=function(){this.setState({rightShow:!1})},e.prototype.render=function(){var t=this.props,e=t.render,i=t.body,n=t.left,h=t.right;t.env;var r=o(t,["render","body","left","right","env"]),p=this.state,l=p.leftShow,f=p.rightShow;return d.createElement(a,s({body:e("body",i,s({},r.data)),left:n&&e("left",n,s({},r.data)),right:h&&e("right",h,s({},r.data)),showLeft:l,showRight:f,onLeftShow:this.handleLeftShow,onRightShow:this.handleRightShow,onLeftHide:this.handleLeftHide,onRightHide:this.handleRightHide},r))},h([r,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"handleLeftShow",null),h([r,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"handleRightShow",null),h([r,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"handleLeftHide",null),h([r,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"handleRightHide",null),h([p({type:"slider"})],e)}(d.Component);export{l as SliderRenderer};
1
+ import{o as t}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{c as o,i,o as n,r as h,t as s}from"./tslib.es6-TRdqp4ac.js";import{Nn as r,it as p}from"./esm-Byma-6B-.js";import{a}from"./esm-CM4fvlfi.js";var d=/* @__PURE__ */t(e()),l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.state={leftShow:!1,rightShow:!1},e}return i(e,t),e.prototype.handleLeftShow=function(){this.props.dispatchEvent("leftShow",this.props.data)},e.prototype.handleRightShow=function(){this.props.dispatchEvent("rightShow",this.props.data)},e.prototype.handleLeftHide=function(){this.props.dispatchEvent("leftHide",this.props.data)},e.prototype.handleRightHide=function(){this.props.dispatchEvent("rightHide",this.props.data)},e.prototype.showLeft=function(){this.setState({leftShow:!0})},e.prototype.hideLeft=function(){this.setState({leftShow:!1})},e.prototype.showRight=function(){this.setState({rightShow:!0})},e.prototype.hideRight=function(){this.setState({rightShow:!1})},e.prototype.render=function(){var t=this.props,e=t.render,i=t.body,n=t.left,h=t.right;t.env;var r=o(t,["render","body","left","right","env"]),p=this.state,l=p.leftShow,f=p.rightShow;return d.createElement(a,s({body:e("body",i,s({},r.data)),left:n&&e("left",n,s({},r.data)),right:h&&e("right",h,s({},r.data)),showLeft:l,showRight:f,onLeftShow:this.handleLeftShow,onRightShow:this.handleRightShow,onLeftHide:this.handleLeftHide,onRightHide:this.handleRightHide},r))},h([r,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"handleLeftShow",null),h([r,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"handleRightShow",null),h([r,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"handleLeftHide",null),h([r,n("design:type",Function),n("design:paramtypes",[]),n("design:returntype",void 0)],e.prototype,"handleRightHide",null),h([p({type:"slider"})],e)}(d.Component);export{l as SliderRenderer};
@@ -1 +1 @@
1
- import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as s,o as r,r as n,t as o}from"./tslib.es6-TRdqp4ac.js";import{$n as a,J as i,Nn as l,it as p,oi as m}from"./esm-D3qvBzlk.js";import{ct as c}from"./esm-DdEfrmRq.js";var u=/* @__PURE__ */e(t()),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.handleClick=function(e,t){var s=this.props,r=s.disabled,n=s.onAction,o=s.clickAction,a=s.data;e.defaultPrevented||!o||r||null==n||n(null,o,t?m(a,t):a)},t.prototype.render=function(){var e=this.props;e.value,e.name;var t=e.clickAction,s=e.id,r=e.wrapperCustomStyle,n=e.env,l=e.themeCss,p=a(this.props)||[1,1];return u.createElement(u.Fragment,null,u.createElement(c,o({onClick:t?this.handleClick:void 0},this.props,{value:p})),u.createElement(i,o({},this.props,{config:{wrapperCustomStyle:r,id:s,themeCss:l,classNames:[{key:"baseControlClassName"}]},env:n})))},n([l,r("design:type",Function),r("design:paramtypes",[Object,Object]),r("design:returntype",void 0)],t.prototype,"handleClick",null),n([p({type:"sparkline"})],t)}(u.Component);export{d as SparkLineRenderer};
1
+ import{o as e}from"./rolldown-runtime-Cmsah3SL.js";import{t}from"./react-COOgDf_T.js";import{i as s,o as r,r as n,t as o}from"./tslib.es6-TRdqp4ac.js";import{$n as a,J as i,Nn as l,it as p,oi as m}from"./esm-Byma-6B-.js";import{ct as c}from"./esm-CM4fvlfi.js";var u=/* @__PURE__ */e(t()),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.handleClick=function(e,t){var s=this.props,r=s.disabled,n=s.onAction,o=s.clickAction,a=s.data;e.defaultPrevented||!o||r||null==n||n(null,o,t?m(a,t):a)},t.prototype.render=function(){var e=this.props;e.value,e.name;var t=e.clickAction,s=e.id,r=e.wrapperCustomStyle,n=e.env,l=e.themeCss,p=a(this.props)||[1,1];return u.createElement(u.Fragment,null,u.createElement(c,o({onClick:t?this.handleClick:void 0},this.props,{value:p})),u.createElement(i,o({},this.props,{config:{wrapperCustomStyle:r,id:s,themeCss:l,classNames:[{key:"baseControlClassName"}]},env:n})))},n([l,r("design:type",Function),r("design:paramtypes",[Object,Object]),r("design:returntype",void 0)],t.prototype,"handleClick",null),n([p({type:"sparkline"})],t)}(u.Component);export{d as SparkLineRenderer};
@@ -1 +1 @@
1
- import{o as r}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{c as s,i as t,r as n,t as o}from"./tslib.es6-TRdqp4ac.js";import{it as a}from"./esm-D3qvBzlk.js";import"./esm-DdEfrmRq.js";import{i as p}from"./PopUp-DTLG0S4M.js";var i=/* @__PURE__ */r(e()),m=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return t(e,r),e.prototype.renderBody=function(){var r=this.props,e=r.body,s=r.render;return e?s("body",e):null},e.prototype.render=function(){var r=this.props,e=r.classnames,t=r.spinnerWrapClassName,n=r.body,a=s(r,["classnames","spinnerWrapClassName","body"]);return n?i.createElement("div",{className:e("Spinner-wrap",t)},i.createElement(p,o({},a)),this.renderBody()):i.createElement(p,o({},a))},n([a({type:"spinner"})],e)}(i.Component);export{m as SpinnerRenderer};
1
+ import{o as r}from"./rolldown-runtime-Cmsah3SL.js";import{t as e}from"./react-COOgDf_T.js";import{c as s,i as t,r as n,t as o}from"./tslib.es6-TRdqp4ac.js";import{it as a}from"./esm-Byma-6B-.js";import"./esm-CM4fvlfi.js";import{i as p}from"./PopUp-CJyUTmjT.js";var i=/* @__PURE__ */r(e()),m=function(r){function e(){return null!==r&&r.apply(this,arguments)||this}return t(e,r),e.prototype.renderBody=function(){var r=this.props,e=r.body,s=r.render;return e?s("body",e):null},e.prototype.render=function(){var r=this.props,e=r.classnames,t=r.spinnerWrapClassName,n=r.body,a=s(r,["classnames","spinnerWrapClassName","body"]);return n?i.createElement("div",{className:e("Spinner-wrap",t)},i.createElement(p,o({},a)),this.renderBody()):i.createElement(p,o({},a))},n([a({type:"spinner"})],e)}(i.Component);export{m as SpinnerRenderer};