@tarojs/components 3.5.0-canary.0 → 3.5.0-canary.1

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 (246) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/taro-ad-core.cjs.entry.js +19 -0
  3. package/dist/cjs/taro-ad-custom-core.cjs.entry.js +19 -0
  4. package/dist/cjs/taro-components.cjs.js +1 -1
  5. package/dist/cjs/taro-editor-core.cjs.entry.js +19 -0
  6. package/dist/cjs/taro-functional-page-navigator-core.cjs.entry.js +19 -0
  7. package/dist/cjs/taro-image-core.cjs.entry.js +2 -2
  8. package/dist/cjs/taro-input-core.cjs.entry.js +15 -4
  9. package/dist/cjs/taro-keyboard-accessory-core.cjs.entry.js +19 -0
  10. package/dist/cjs/taro-live-player-core.cjs.entry.js +19 -0
  11. package/dist/cjs/taro-live-pusher-core.cjs.entry.js +19 -0
  12. package/dist/cjs/taro-map-core.cjs.entry.js +19 -0
  13. package/dist/cjs/taro-match-media-core.cjs.entry.js +19 -0
  14. package/dist/cjs/taro-navigation-bar-core.cjs.entry.js +19 -0
  15. package/dist/cjs/taro-navigator-core.cjs.entry.js +10 -6
  16. package/dist/cjs/taro-official-account-core.cjs.entry.js +19 -0
  17. package/dist/cjs/taro-page-container-core.cjs.entry.js +19 -0
  18. package/dist/cjs/taro-page-meta-core.cjs.entry.js +19 -0
  19. package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +7 -3
  20. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +3 -3
  21. package/dist/cjs/taro-share-element-core.cjs.entry.js +19 -0
  22. package/dist/cjs/taro-slot-core.cjs.entry.js +19 -0
  23. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +10 -1
  24. package/dist/cjs/taro-tabbar.cjs.entry.js +37 -31
  25. package/dist/cjs/taro-textarea-core.cjs.entry.js +3 -3
  26. package/dist/cjs/taro-voip-room-core.cjs.entry.js +19 -0
  27. package/dist/collection/collection-manifest.json +20 -4
  28. package/dist/collection/components/ad/ad.js +11 -0
  29. package/dist/collection/components/ad-custom/ad-custom.js +11 -0
  30. package/dist/collection/components/editor/editor.js +11 -0
  31. package/dist/collection/components/functional-page-navigator/functional-page-navigator.js +11 -0
  32. package/dist/collection/components/image/image.js +1 -1
  33. package/dist/collection/components/image/style/index.css +2 -2
  34. package/dist/collection/components/input/input.js +29 -4
  35. package/dist/collection/components/keyboard-accessory/keyboard-accessory.js +11 -0
  36. package/dist/collection/components/live-player/live-player.js +11 -0
  37. package/dist/collection/components/live-pusher/live-pusher.js +11 -0
  38. package/dist/collection/components/map/map.js +11 -0
  39. package/dist/collection/components/match-media/match-media.js +11 -0
  40. package/dist/collection/components/{movable-view → movable-area}/movable-area.js +0 -0
  41. package/dist/collection/components/{movable-view → movable-area}/movable-view.js +0 -0
  42. package/dist/collection/components/navigation-bar/navigation-bar.js +11 -0
  43. package/dist/collection/components/navigator/navigator.js +1 -1
  44. package/dist/collection/components/official-account/official-account.js +11 -0
  45. package/dist/collection/components/page-container/page-container.js +11 -0
  46. package/dist/collection/components/page-meta/page-meta.js +11 -0
  47. package/dist/collection/components/{picker-view-column → picker-view}/picker-view-column.js +0 -0
  48. package/dist/collection/components/{pull-down-refresh → pull-to-refresh}/pull-to-refresh.js +1 -1
  49. package/dist/collection/components/{pull-down-refresh → pull-to-refresh}/style/index.css +0 -0
  50. package/dist/collection/components/scroll-view/scroll-view.js +3 -3
  51. package/dist/collection/components/share-element/share-element.js +11 -0
  52. package/dist/collection/components/slot/slot.js +11 -0
  53. package/dist/collection/components/swiper/swiper.js +10 -1
  54. package/dist/collection/components/tabbar/style/index.css +1 -1
  55. package/dist/collection/components/tabbar/tabbar.js +10 -4
  56. package/dist/collection/components/textarea/textarea.js +3 -3
  57. package/dist/collection/components/voip-room/voip-room.js +11 -0
  58. package/dist/collection/utils/index.js +50 -64
  59. package/dist/esm/loader.js +1 -1
  60. package/dist/esm/taro-ad-core.entry.js +15 -0
  61. package/dist/esm/taro-ad-custom-core.entry.js +15 -0
  62. package/dist/esm/taro-components.js +1 -1
  63. package/dist/esm/taro-editor-core.entry.js +15 -0
  64. package/dist/esm/taro-functional-page-navigator-core.entry.js +15 -0
  65. package/dist/esm/taro-image-core.entry.js +2 -2
  66. package/dist/esm/taro-input-core.entry.js +15 -4
  67. package/dist/esm/taro-keyboard-accessory-core.entry.js +15 -0
  68. package/dist/esm/taro-live-player-core.entry.js +15 -0
  69. package/dist/esm/taro-live-pusher-core.entry.js +15 -0
  70. package/dist/esm/taro-map-core.entry.js +15 -0
  71. package/dist/esm/taro-match-media-core.entry.js +15 -0
  72. package/dist/esm/taro-navigation-bar-core.entry.js +15 -0
  73. package/dist/esm/taro-navigator-core.entry.js +1 -1
  74. package/dist/esm/taro-official-account-core.entry.js +15 -0
  75. package/dist/esm/taro-page-container-core.entry.js +15 -0
  76. package/dist/esm/taro-page-meta-core.entry.js +15 -0
  77. package/dist/esm/taro-pull-to-refresh.entry.js +1 -1
  78. package/dist/esm/taro-scroll-view-core.entry.js +3 -3
  79. package/dist/esm/taro-share-element-core.entry.js +15 -0
  80. package/dist/esm/taro-slot-core.entry.js +15 -0
  81. package/dist/esm/taro-swiper-core_2.entry.js +10 -1
  82. package/dist/esm/taro-tabbar.entry.js +12 -10
  83. package/dist/esm/taro-textarea-core.entry.js +3 -3
  84. package/dist/esm/taro-voip-room-core.entry.js +15 -0
  85. package/dist/esm-es5/loader.js +1 -1
  86. package/dist/esm-es5/taro-ad-core.entry.js +1 -0
  87. package/dist/esm-es5/taro-ad-custom-core.entry.js +1 -0
  88. package/dist/esm-es5/taro-components.js +1 -1
  89. package/dist/esm-es5/taro-editor-core.entry.js +1 -0
  90. package/dist/esm-es5/taro-functional-page-navigator-core.entry.js +1 -0
  91. package/dist/esm-es5/taro-image-core.entry.js +1 -1
  92. package/dist/esm-es5/taro-input-core.entry.js +1 -1
  93. package/dist/esm-es5/taro-keyboard-accessory-core.entry.js +1 -0
  94. package/dist/esm-es5/taro-live-player-core.entry.js +1 -0
  95. package/dist/esm-es5/taro-live-pusher-core.entry.js +1 -0
  96. package/dist/esm-es5/taro-map-core.entry.js +1 -0
  97. package/dist/esm-es5/taro-match-media-core.entry.js +1 -0
  98. package/dist/esm-es5/taro-navigation-bar-core.entry.js +1 -0
  99. package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
  100. package/dist/esm-es5/taro-official-account-core.entry.js +1 -0
  101. package/dist/esm-es5/taro-page-container-core.entry.js +1 -0
  102. package/dist/esm-es5/taro-page-meta-core.entry.js +1 -0
  103. package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
  104. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  105. package/dist/esm-es5/taro-share-element-core.entry.js +1 -0
  106. package/dist/esm-es5/taro-slot-core.entry.js +1 -0
  107. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  108. package/dist/esm-es5/taro-tabbar.entry.js +1 -1
  109. package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
  110. package/dist/esm-es5/taro-voip-room-core.entry.js +1 -0
  111. package/dist/taro-components/p-0303f9e0.entry.js +1 -0
  112. package/dist/taro-components/p-0472e474.system.entry.js +1 -0
  113. package/dist/taro-components/p-04818461.system.entry.js +1 -0
  114. package/dist/taro-components/p-065ec61d.entry.js +1 -0
  115. package/dist/taro-components/p-06af26db.system.entry.js +1 -0
  116. package/dist/taro-components/p-0c2982fc.system.entry.js +1 -0
  117. package/dist/taro-components/p-0ee69803.entry.js +1 -0
  118. package/dist/taro-components/p-14dbbb42.entry.js +1 -0
  119. package/dist/taro-components/p-15bea37d.entry.js +1 -0
  120. package/dist/taro-components/p-2d2f8064.entry.js +1 -0
  121. package/dist/taro-components/{p-627a5064.system.entry.js → p-2dc57c71.system.entry.js} +1 -1
  122. package/dist/taro-components/{p-64993f48.entry.js → p-32937866.entry.js} +1 -1
  123. package/dist/taro-components/p-3334ac67.system.entry.js +1 -0
  124. package/dist/taro-components/p-336f2b2a.system.entry.js +1 -0
  125. package/dist/taro-components/p-33ee636a.system.js +1 -1
  126. package/dist/taro-components/p-3c0230ba.entry.js +1 -0
  127. package/dist/taro-components/p-3dfb1807.entry.js +1 -0
  128. package/dist/taro-components/p-527a38ee.system.entry.js +1 -0
  129. package/dist/taro-components/p-56618f09.entry.js +1 -0
  130. package/dist/taro-components/p-59d38db0.entry.js +1 -0
  131. package/dist/taro-components/{p-12ae0a33.entry.js → p-63ff7fa7.entry.js} +1 -1
  132. package/dist/taro-components/p-7423fc3b.system.entry.js +1 -0
  133. package/dist/taro-components/p-7721e046.entry.js +1 -0
  134. package/dist/taro-components/p-7cdad34e.system.entry.js +1 -0
  135. package/dist/taro-components/p-8b2bf902.system.entry.js +1 -0
  136. package/dist/taro-components/p-92e95d3f.entry.js +1 -0
  137. package/dist/taro-components/p-94502fc3.entry.js +1 -0
  138. package/dist/taro-components/p-98b47fc9.system.entry.js +1 -0
  139. package/dist/taro-components/p-99cb65a6.system.entry.js +1 -0
  140. package/dist/taro-components/p-9dc9c615.system.entry.js +1 -0
  141. package/dist/taro-components/p-9eb7dfa8.entry.js +1 -0
  142. package/dist/taro-components/p-abe415b4.system.entry.js +1 -0
  143. package/dist/taro-components/{p-3aac5746.system.entry.js → p-b15d0302.system.entry.js} +1 -1
  144. package/dist/taro-components/p-b55fedc1.entry.js +1 -0
  145. package/dist/taro-components/p-b6d6c744.entry.js +1 -0
  146. package/dist/taro-components/p-b87cf623.entry.js +1 -0
  147. package/dist/taro-components/p-cb395e7d.entry.js +1 -0
  148. package/dist/taro-components/{p-6965567d.entry.js → p-cc818a13.entry.js} +1 -1
  149. package/dist/taro-components/p-cdffee54.system.entry.js +1 -0
  150. package/dist/taro-components/p-cf55a63c.entry.js +1 -0
  151. package/dist/taro-components/p-cfbfeee8.entry.js +1 -0
  152. package/dist/taro-components/p-d1c2481c.system.entry.js +1 -0
  153. package/dist/taro-components/p-df5a19b0.system.entry.js +1 -0
  154. package/dist/taro-components/p-e03fa2d5.system.entry.js +1 -0
  155. package/dist/taro-components/p-e1040131.entry.js +1 -0
  156. package/dist/taro-components/p-e2f6448d.system.entry.js +1 -0
  157. package/dist/taro-components/p-ebf5b2eb.system.entry.js +1 -0
  158. package/dist/taro-components/p-fcc1c676.system.entry.js +1 -0
  159. package/dist/taro-components/{p-13c1404f.system.entry.js → p-fd0d1168.system.entry.js} +1 -1
  160. package/dist/taro-components/taro-components.css +1 -1
  161. package/dist/taro-components/taro-components.esm.js +1 -1
  162. package/dist/types/components/ad/ad.d.ts +4 -0
  163. package/dist/types/components/ad-custom/ad-custom.d.ts +4 -0
  164. package/dist/types/components/editor/editor.d.ts +4 -0
  165. package/dist/types/components/functional-page-navigator/functional-page-navigator.d.ts +4 -0
  166. package/dist/types/components/input/input.d.ts +3 -0
  167. package/dist/types/components/keyboard-accessory/keyboard-accessory.d.ts +4 -0
  168. package/dist/types/components/live-player/live-player.d.ts +4 -0
  169. package/dist/types/components/live-pusher/live-pusher.d.ts +4 -0
  170. package/dist/types/components/map/map.d.ts +4 -0
  171. package/dist/types/components/match-media/match-media.d.ts +4 -0
  172. package/dist/types/components/{movable-view → movable-area}/movable-area.d.ts +0 -0
  173. package/dist/types/components/{movable-view → movable-area}/movable-view.d.ts +0 -0
  174. package/dist/types/components/navigation-bar/navigation-bar.d.ts +4 -0
  175. package/dist/types/components/official-account/official-account.d.ts +4 -0
  176. package/dist/types/components/page-container/page-container.d.ts +4 -0
  177. package/dist/types/components/page-meta/page-meta.d.ts +4 -0
  178. package/dist/types/components/{picker-view-column → picker-view}/picker-view-column.d.ts +0 -0
  179. package/dist/types/components/{pull-down-refresh → pull-to-refresh}/pull-to-refresh.d.ts +0 -0
  180. package/dist/types/components/share-element/share-element.d.ts +4 -0
  181. package/dist/types/components/slot/slot.d.ts +4 -0
  182. package/dist/types/components/swiper/swiper.d.ts +1 -0
  183. package/dist/types/components/tabbar/tabbar.d.ts +1 -1
  184. package/dist/types/components/textarea/textarea.d.ts +1 -1
  185. package/dist/types/components/voip-room/voip-room.d.ts +4 -0
  186. package/dist/types/components.d.ts +209 -0
  187. package/dist/types/utils/index.d.ts +8 -0
  188. package/dist-h5/react/index.js +2 -1
  189. package/dist-h5/vue/components/picker.js +2 -1
  190. package/package.json +3 -3
  191. package/types/Ad.d.ts +19 -7
  192. package/types/AdCustom.d.ts +50 -0
  193. package/types/Audio.d.ts +22 -2
  194. package/types/Button.d.ts +87 -14
  195. package/types/Camera.d.ts +1 -1
  196. package/types/Canvas.d.ts +14 -1
  197. package/types/Checkbox.d.ts +65 -1
  198. package/types/CoverImage.d.ts +50 -8
  199. package/types/CoverView.d.ts +51 -8
  200. package/types/Editor.d.ts +57 -0
  201. package/types/Form.d.ts +33 -2
  202. package/types/Icon.d.ts +17 -1
  203. package/types/Image.d.ts +30 -4
  204. package/types/Input.d.ts +66 -5
  205. package/types/KeyboardAccessory.d.ts +29 -0
  206. package/types/Label.d.ts +18 -4
  207. package/types/LivePlayer.d.ts +7 -1
  208. package/types/LivePusher.d.ts +7 -1
  209. package/types/Map.d.ts +55 -1
  210. package/types/MatchMedia.d.ts +24 -5
  211. package/types/MovableArea.d.ts +9 -3
  212. package/types/MovableView.d.ts +21 -7
  213. package/types/OfficialAccount.d.ts +0 -6
  214. package/types/OpenData.d.ts +7 -1
  215. package/types/PageContainer.d.ts +121 -0
  216. package/types/Picker.d.ts +64 -1
  217. package/types/PickerView.d.ts +66 -2
  218. package/types/PickerViewColumn.d.ts +1 -1
  219. package/types/Progress.d.ts +12 -1
  220. package/types/Radio.d.ts +77 -1
  221. package/types/RichText.d.ts +33 -1
  222. package/types/ScrollView.d.ts +91 -9
  223. package/types/ShareElement.d.ts +39 -0
  224. package/types/Slider.d.ts +14 -1
  225. package/types/Swiper.d.ts +26 -1
  226. package/types/SwiperItem.d.ts +28 -3
  227. package/types/Switch.d.ts +21 -3
  228. package/types/Text.d.ts +38 -1
  229. package/types/Textarea.d.ts +17 -1
  230. package/types/Video.d.ts +41 -21
  231. package/types/View.d.ts +34 -2
  232. package/types/VoipRoom.d.ts +70 -0
  233. package/types/WebView.d.ts +7 -1
  234. package/types/common.d.ts +3 -8
  235. package/types/index.d.ts +72 -46
  236. package/virtual-list/react/createListComponent.js +4 -3
  237. package/dist/taro-components/p-10a6c489.system.entry.js +0 -1
  238. package/dist/taro-components/p-12638ebc.system.entry.js +0 -1
  239. package/dist/taro-components/p-2438fcd4.system.entry.js +0 -1
  240. package/dist/taro-components/p-3eebeb1c.system.entry.js +0 -1
  241. package/dist/taro-components/p-46cf6431.system.entry.js +0 -1
  242. package/dist/taro-components/p-66237ac0.entry.js +0 -1
  243. package/dist/taro-components/p-71de9bd6.entry.js +0 -1
  244. package/dist/taro-components/p-7a64a3d2.entry.js +0 -1
  245. package/dist/taro-components/p-b8e0ad7d.entry.js +0 -1
  246. package/dist/taro-components/p-f98e0224.entry.js +0 -1
@@ -1 +1 @@
1
- var __spreadArray=this&&this.__spreadArray||function(e,a){for(var t=0,r=a.length,o=e.length;t<r;t++,o++)e[o]=a[t];return e};import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-5bd7cbab.js";import{c as classnames}from"./index-3c78bcaf.js";function isAbsolute(e){return e.charAt(0)==="/"}function spliceOne(e,a){for(var t=a,r=t+1,o=e.length;r<o;t+=1,r+=1){e[t]=e[r]}e.pop()}function resolvePathname(e,a){if(a===undefined)a="";var t=e&&e.split("/")||[];var r=a&&a.split("/")||[];var o=e&&isAbsolute(e);var n=a&&isAbsolute(a);var s=o||n;if(e&&isAbsolute(e)){r=t}else if(t.length){r.pop();r=r.concat(t)}if(!r.length)return"/";var i;if(r.length){var l=r[r.length-1];i=l==="."||l===".."||l===""}else{i=false}var b=0;for(var d=r.length;d>=0;d--){var h=r[d];if(h==="."){spliceOne(r,d)}else if(h===".."){spliceOne(r,d);b++}else if(b){spliceOne(r,d);b--}}if(!s)for(;b--;b)r.unshift("..");if(s&&r[0]!==""&&(!r[0]||!isAbsolute(r[0])))r.unshift("");var c=r.join("/");if(i&&c.substr(-1)!=="/")c+="/";return c}var splitUrl=function(e){var a=e||"";var t;var r={path:null,query:null,fragment:null};t=a.indexOf("#");if(t>-1){r.fragment=a.substring(t+1);a=a.substring(0,t)}t=a.indexOf("?");if(t>-1){r.query=a.substring(t+1);a=a.substring(0,t)}r.path=a;return r};var TabbarItem=function(e){var a=e.index,t=e.isSelected,r=t===void 0?false:t,o=e.textColor,n=e.iconPath,s=e.badgeText,i=e.showRedDot,l=i===void 0?false:i,b=e.text,d=e.onSelect;var c=classnames("weui-tabbar__item",{"weui-bar__item_on":r});var f={position:"absolute",top:"-2px",right:"-13px"};var u={position:"absolute",top:"0",right:"-6px"};function v(){d(a)}return h("a",{key:a,href:"javascript:;",class:c,onClick:v},h("span",{style:{display:"inline-block",position:"relative"}},h("img",{src:n,alt:"",class:"weui-tabbar__icon"}),!!s&&h("span",{class:"weui-badge taro-tabbar-badge",style:f},s),l&&h("span",{class:"weui-badge weui-badge_dot",style:u})),h("p",{class:"weui-tabbar__label",style:{color:o}},b))};var indexCss="html,body{height:100%}#app{height:100%}.taro-tabbar__border-white::before{border-top-color:#fff !important}.taro-tabbar__container{display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:column;flex-direction:column;overflow:hidden}.taro-tabbar__panel{-ms-flex:1;flex:1;position:relative;overflow:auto;-webkit-overflow-scrolling:touch}.taro-tabbar__tabbar{position:relative;height:50px;width:100%;-webkit-transition:bottom 0.2s, top 0.2s;transition:bottom 0.2s, top 0.2s}.taro-tabbar__tabbar-top{top:0}.taro-tabbar__tabbar-bottom{bottom:0}.taro-tabbar__tabbar-hide{display:none}.taro-tabbar__tabbar-slideout{top:-52px;-ms-flex:0 0;flex:0 0}.taro-tabbar__panel+.taro-tabbar__tabbar-slideout{top:auto;bottom:-52px}";var Taro=require("@tarojs/taro");var addLeadingSlash=function(e){return e[0]==="/"?e:"/"+e};var hasBasename=function(e,a){return new RegExp("^"+a+"(\\/|\\?|#|$)","i").test(e)};var stripBasename=function(e,a){return hasBasename(e,a)?e.substr(a.length):e};var STATUS_SHOW=0;var STATUS_HIDE=1;var STATUS_SLIDEOUT=2;var basicTabBarClassName="taro-tabbar__tabbar";var hideTabBarClassName="taro-tabbar__tabbar-hide";var hideTabBarWithAnimationClassName="taro-tabbar__tabbar-slideout";var Tabbar=function(){function e(e){var a=this;registerInstance(this,e);this.onLongPress=createEvent(this,"longpress",7);this.homePage="";this.customRoutes=[];this.tabbarPos="bottom";this.selectedIndex=-1;this.status=STATUS_SHOW;this.getOriginUrl=function(e){var t=a.customRoutes.filter((function(a){var t=a[1];var r=splitUrl(t).path;var o=splitUrl(e).path;return r===o}));return t.length?t[0][0]:e};this.getSelectedIndex=function(e){var t=-1;a.list.forEach((function(a,r){var o=a.pagePath;var n=splitUrl(e).path;var s=splitUrl(o).path;if(n===s){t=r}}));return t};this.switchTab=function(e){a.selectedIndex=e;Taro.switchTab({url:a.list[e].pagePath})};this.switchTabHandler=function(e){var t=e.url,r=e.successHandler,o=e.errorHandler;var n=a.getOriginUrl(a.getCurrentUrl()||a.homePage);var s=resolvePathname(t,n);var i=a.getSelectedIndex(s);if(i>-1){a.switchTab(i);r({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'+s+'" is not found'})}};this.routerChangeHandler=function(e){var t;var r;if(e){t=e.toLocation}if(t&&t.path){var o=addLeadingSlash(t.path);r=stripBasename(o==="/"?a.homePage:o,a.conf.basename||"/")}else{r=a.getCurrentUrl()}a.selectedIndex=a.getSelectedIndex(a.getOriginUrl(r))};this.setTabBarBadgeHandler=function(e){var t=e.index,r=e.text,o=e.successHandler,n=e.errorHandler;var s=__spreadArray([],a.list);if(t in s){s[t].showRedDot=false;s[t].badgeText=r;o({errMsg:"setTabBarBadge:ok"})}else{n({errMsg:"setTabBarBadge:fail tabbar item not found"})}a.list=s};this.removeTabBarBadgeHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list);if(t in n){n[t].badgeText=null;n[t].badgeText=null;r({errMsg:"removeTabBarBadge:ok"})}else{o({errMsg:"removeTabBarBadge:fail tabbar item not found"})}a.list=n};this.showTabBarRedDotHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list);if(t in n){n[t].badgeText=null;n[t].showRedDot=true;r({errMsg:"showTabBarRedDot:ok"})}else{o({errMsg:"showTabBarRedDot:fail tabbar item not found"})}a.list=n};this.hideTabBarRedDotHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list);if(t in n){n[t].showRedDot=false;r({errMsg:"hideTabBarRedDot:ok"})}else{o({errMsg:"hideTabBarRedDot:fail tabbar item not found"})}a.list=n};this.showTabBarHandler=function(e){var t=e.successHandler;a.status=STATUS_SHOW;t({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var t=e.animation,r=e.successHandler;a.status=t?STATUS_SLIDEOUT:STATUS_HIDE;r({errMsg:"hideTabBar:ok"})};this.setTabBarStyleHandler=function(e){var t=e.color,r=e.selectedColor,o=e.backgroundColor,n=e.borderStyle,s=e.successHandler;if(o)a.backgroundColor=o;if(n)a.borderStyle=n;if(t)a.color=t;if(r)a.selectedColor=r;s({errMsg:"setTabBarStyle:ok"})};this.setTabBarItemHandler=function(e){var t=e.index,r=e.iconPath,o=e.selectedIconPath,n=e.text,s=e.successHandler,i=e.errorHandler;var l=__spreadArray([],a.list);if(t in l){if(r)l[t].iconPath=r;if(o)l[t].selectedIconPath=o;if(n)l[t].text=n;s({errMsg:"setTabBarItem:ok"})}else{i({errMsg:"setTabBarItem:fail tabbar item not found"})}a.list=l};var t=this.conf.list;var r=this.conf.customRoutes;if(Object.prototype.toString.call(t)!=="[object Array]"||t.length<2||t.length>5){throw new Error("tabBar 配置错误")}this.homePage=addLeadingSlash(this.conf.homePage);for(var o in r){this.customRoutes.push([o,r[o]])}t.forEach((function(e){if(e.pagePath.indexOf("/")!==0){e.pagePath="/"+e.pagePath}}));this.list=t;this.borderStyle=this.conf.borderStyle;this.backgroundColor=this.conf.backgroundColor;this.color=this.conf.color;this.selectedColor=this.conf.selectedColor}e.prototype.getCurrentUrl=function(){var e=this.conf.mode;var a=this.conf.basename||"/";var t;if(e==="hash"){var r=window.location.href;var o=r.indexOf("#");t=o===-1?"":r.substring(o+1)}else{t=location.pathname}var n=addLeadingSlash(stripBasename(t,a));return n==="/"?this.homePage:n};e.prototype.bindEvent=function(){Taro.eventCenter.on("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.on("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.on("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.removeEvent=function(){Taro.eventCenter.off("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.off("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.off("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.off("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.componentDidLoad=function(){this.tabbarPos=this.tabbar.nextElementSibling?"top":"bottom";this.bindEvent();this.routerChangeHandler()};e.prototype.disconnectedCallback=function(){this.removeEvent()};e.prototype.render=function(){var e,a;var t=this;var r=this.tabbarPos,o=r===void 0?"bottom":r;var n=this.status;var s=classnames("weui-tabbar",(e={},e["taro-tabbar__border-"+(this.borderStyle||"black")]=true,e));var i=this.selectedIndex===-1||n===STATUS_HIDE;var l=n===STATUS_SLIDEOUT;return h(Host,{class:classnames(basicTabBarClassName,basicTabBarClassName+"-"+o,(a={},a[hideTabBarClassName]=i,a[hideTabBarWithAnimationClassName]=l,a))},h("div",{class:s,style:{backgroundColor:this.backgroundColor||""}},this.list.map((function(e,a){var r=t.selectedIndex===a;var o;var n;if(r){o=t.selectedColor||"";n=e.selectedIconPath}else{o=t.color||"";n=e.iconPath}return h(TabbarItem,{index:a,onSelect:t.switchTab.bind(t),isSelected:r,textColor:o,iconPath:n,text:e.text,badgeText:e.badgeText,showRedDot:e.showRedDot})}))))};Object.defineProperty(e.prototype,"tabbar",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Tabbar.style=indexCss;export{Tabbar as taro_tabbar};
1
+ var __spreadArray=this&&this.__spreadArray||function(e,a){for(var t=0,r=a.length,o=e.length;t<r;t++,o++)e[o]=a[t];return e};import{h,r as registerInstance,c as createEvent,H as Host,g as getElement}from"./index-5bd7cbab.js";import Taro from"@tarojs/taro";import{c as classnames}from"./index-3c78bcaf.js";function isAbsolute(e){return e.charAt(0)==="/"}function spliceOne(e,a){for(var t=a,r=t+1,o=e.length;r<o;t+=1,r+=1){e[t]=e[r]}e.pop()}function resolvePathname(e,a){if(a===undefined)a="";var t=e&&e.split("/")||[];var r=a&&a.split("/")||[];var o=e&&isAbsolute(e);var n=a&&isAbsolute(a);var s=o||n;if(e&&isAbsolute(e)){r=t}else if(t.length){r.pop();r=r.concat(t)}if(!r.length)return"/";var i;if(r.length){var l=r[r.length-1];i=l==="."||l===".."||l===""}else{i=false}var d=0;for(var b=r.length;b>=0;b--){var h=r[b];if(h==="."){spliceOne(r,b)}else if(h===".."){spliceOne(r,b);d++}else if(d){spliceOne(r,b);d--}}if(!s)for(;d--;d)r.unshift("..");if(s&&r[0]!==""&&(!r[0]||!isAbsolute(r[0])))r.unshift("");var c=r.join("/");if(i&&c.substr(-1)!=="/")c+="/";return c}var splitUrl=function(e){var a=e||"";var t;var r={path:null,query:null,fragment:null};t=a.indexOf("#");if(t>-1){r.fragment=a.substring(t+1);a=a.substring(0,t)}t=a.indexOf("?");if(t>-1){r.query=a.substring(t+1);a=a.substring(0,t)}r.path=a;return r};var TabbarItem=function(e){var a=e.index,t=e.isSelected,r=t===void 0?false:t,o=e.textColor,n=e.iconPath,s=e.badgeText,i=e.showRedDot,l=i===void 0?false:i,d=e.text,b=e.onSelect;var c=classnames("weui-tabbar__item",{"weui-bar__item_on":r});var f={position:"absolute",top:"-2px",right:"-13px"};var u={position:"absolute",top:"0",right:"-6px"};function v(){b(a)}return h("a",{key:a,href:"javascript:;",class:c,onClick:v},h("span",{style:{display:"inline-block",position:"relative"}},h("img",{src:n,alt:"",class:"weui-tabbar__icon"}),!!s&&h("span",{class:"weui-badge taro-tabbar-badge",style:f},s),l&&h("span",{class:"weui-badge weui-badge_dot",style:u})),h("p",{class:"weui-tabbar__label",style:{color:o}},d))};var indexCss="html,body{height:100%}#app{height:100%}.taro-tabbar__border-white::before{border-top-color:#fff !important}.taro-tabbar__container{display:-ms-flexbox;display:flex;height:100%;-ms-flex-direction:column;flex-direction:column;overflow:hidden}.taro-tabbar__panel{-ms-flex:1;flex:1;position:relative;overflow:auto;-webkit-overflow-scrolling:auto}.taro-tabbar__tabbar{position:relative;height:50px;width:100%;-webkit-transition:bottom 0.2s, top 0.2s;transition:bottom 0.2s, top 0.2s}.taro-tabbar__tabbar-top{top:0}.taro-tabbar__tabbar-bottom{bottom:0}.taro-tabbar__tabbar-hide{display:none}.taro-tabbar__tabbar-slideout{top:-52px;-ms-flex:0 0;flex:0 0}.taro-tabbar__panel+.taro-tabbar__tabbar-slideout{top:auto;bottom:-52px}";var addLeadingSlash=function(e){return e[0]==="/"?e:"/"+e};var hasBasename=function(e,a){return new RegExp("^"+a+"(\\/|\\?|#|$)","i").test(e)};var stripBasename=function(e,a){return hasBasename(e,a)?e.substr(a.length):e};var STATUS_SHOW=0;var STATUS_HIDE=1;var STATUS_SLIDEOUT=2;var basicTabBarClassName="taro-tabbar__tabbar";var hideTabBarClassName="taro-tabbar__tabbar-hide";var hideTabBarWithAnimationClassName="taro-tabbar__tabbar-slideout";var Tabbar=function(){function e(e){var a=this;registerInstance(this,e);this.onLongPress=createEvent(this,"longpress",7);this.homePage="";this.customRoutes=[];this.tabbarPos="bottom";this.selectedIndex=-1;this.status=STATUS_SHOW;this.getOriginUrl=function(e){var t=a.customRoutes.filter((function(a){var t=a[1];var r=splitUrl(t).path;var o=splitUrl(e).path;return r===o}));return t.length?t[0][0]:e};this.getSelectedIndex=function(e){var t=-1;a.list.forEach((function(a,r){var o=a.pagePath;var n=splitUrl(e).path;var s=splitUrl(o).path;if(n===s){t=r}}));return t};this.switchTab=function(e){a.selectedIndex=e;Taro.switchTab({url:a.list[e].pagePath})};this.switchTabHandler=function(e){var t=e.url,r=e.successHandler,o=e.errorHandler;var n=a.getOriginUrl(a.getCurrentUrl()||a.homePage);var s=resolvePathname(t,n);var i=a.getSelectedIndex(s);if(i>-1){a.switchTab(i);r({errMsg:"switchTab:ok"})}else{o({errMsg:'switchTab:fail page "'+s+'" is not found'})}};this.routerChangeHandler=function(e){var t;var r;if(e){t=e.toLocation}if(t&&t.path){var o=addLeadingSlash(t.path);r=stripBasename(o==="/"?a.homePage:o,a.conf.basename||"/")}else{r=a.getCurrentUrl()}a.selectedIndex=a.getSelectedIndex(a.getOriginUrl(r))};this.setTabBarBadgeHandler=function(e){var t=e.index,r=e.text,o=e.successHandler,n=e.errorHandler;var s=__spreadArray([],a.list);if(t in s){s[t].showRedDot=false;s[t].badgeText=r;o({errMsg:"setTabBarBadge:ok"})}else{n({errMsg:"setTabBarBadge:fail tabbar item not found"})}a.list=s};this.removeTabBarBadgeHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list);if(t in n){n[t].badgeText=null;n[t].badgeText=null;r({errMsg:"removeTabBarBadge:ok"})}else{o({errMsg:"removeTabBarBadge:fail tabbar item not found"})}a.list=n};this.showTabBarRedDotHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list);if(t in n){n[t].badgeText=null;n[t].showRedDot=true;r({errMsg:"showTabBarRedDot:ok"})}else{o({errMsg:"showTabBarRedDot:fail tabbar item not found"})}a.list=n};this.hideTabBarRedDotHandler=function(e){var t=e.index,r=e.successHandler,o=e.errorHandler;var n=__spreadArray([],a.list);if(t in n){n[t].showRedDot=false;r({errMsg:"hideTabBarRedDot:ok"})}else{o({errMsg:"hideTabBarRedDot:fail tabbar item not found"})}a.list=n};this.showTabBarHandler=function(e){var t=e.successHandler;a.status=STATUS_SHOW;t({errMsg:"showTabBar:ok"})};this.hideTabBarHandler=function(e){var t=e.animation,r=e.successHandler;a.status=t?STATUS_SLIDEOUT:STATUS_HIDE;r({errMsg:"hideTabBar:ok"})};this.setTabBarStyleHandler=function(e){var t=e.color,r=e.selectedColor,o=e.backgroundColor,n=e.borderStyle,s=e.successHandler;if(o)a.backgroundColor=o;if(n)a.borderStyle=n;if(t)a.color=t;if(r)a.selectedColor=r;s({errMsg:"setTabBarStyle:ok"})};this.setTabBarItemHandler=function(e){var t=e.index,r=e.iconPath,o=e.selectedIconPath,n=e.text,s=e.successHandler,i=e.errorHandler;var l=__spreadArray([],a.list);if(t in l){if(r)l[t].iconPath=r;if(o)l[t].selectedIconPath=o;if(n)l[t].text=n;s({errMsg:"setTabBarItem:ok"})}else{i({errMsg:"setTabBarItem:fail tabbar item not found"})}a.list=l};var t=this.conf.list;var r=this.conf.customRoutes;if(Object.prototype.toString.call(t)!=="[object Array]"||t.length<2||t.length>5){throw new Error("tabBar 配置错误")}this.homePage=addLeadingSlash(this.conf.homePage);var o=function(e){var a;var t=r[e];e=addLeadingSlash(e);if(typeof t==="string"){n.customRoutes.push([e,addLeadingSlash(t)])}else if((t===null||t===void 0?void 0:t.length)>0){(a=n.customRoutes).push.apply(a,t.map((function(a){return[e,addLeadingSlash(a)]})))}};var n=this;for(var s in r){o(s)}t.forEach((function(e){if(e.pagePath.indexOf("/")!==0){e.pagePath="/"+e.pagePath}}));this.list=t;this.borderStyle=this.conf.borderStyle;this.backgroundColor=this.conf.backgroundColor;this.color=this.conf.color;this.selectedColor=this.conf.selectedColor}e.prototype.getCurrentUrl=function(){var e=this.conf.mode;var a=this.conf.basename||"/";var t;if(e==="hash"){var r=window.location.href;var o=r.indexOf("#");t=o===-1?"":r.substring(o+1)}else{t=location.pathname}var n=addLeadingSlash(stripBasename(t,a));return n==="/"?this.homePage:n};e.prototype.bindEvent=function(){Taro.eventCenter.on("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.on("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.on("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.on("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.on("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.on("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.on("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.on("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.on("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.on("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.removeEvent=function(){Taro.eventCenter.off("__taroRouterChange",this.routerChangeHandler);Taro.eventCenter.off("__taroSwitchTab",this.switchTabHandler);Taro.eventCenter.off("__taroSetTabBarBadge",this.setTabBarBadgeHandler);Taro.eventCenter.off("__taroRemoveTabBarBadge",this.removeTabBarBadgeHandler);Taro.eventCenter.off("__taroShowTabBarRedDotHandler",this.showTabBarRedDotHandler);Taro.eventCenter.off("__taroHideTabBarRedDotHandler",this.hideTabBarRedDotHandler);Taro.eventCenter.off("__taroShowTabBar",this.showTabBarHandler);Taro.eventCenter.off("__taroHideTabBar",this.hideTabBarHandler);Taro.eventCenter.off("__taroSetTabBarStyle",this.setTabBarStyleHandler);Taro.eventCenter.off("__taroSetTabBarItem",this.setTabBarItemHandler)};e.prototype.componentDidLoad=function(){this.tabbarPos=this.tabbar.nextElementSibling?"top":"bottom";this.bindEvent();this.routerChangeHandler()};e.prototype.disconnectedCallback=function(){this.removeEvent()};e.prototype.render=function(){var e,a;var t=this;var r=this.tabbarPos,o=r===void 0?"bottom":r;var n=this.status;var s=classnames("weui-tabbar",(e={},e["taro-tabbar__border-"+(this.borderStyle||"black")]=true,e));var i=this.selectedIndex===-1||n===STATUS_HIDE;var l=n===STATUS_SLIDEOUT;return h(Host,{class:classnames(basicTabBarClassName,basicTabBarClassName+"-"+o,(a={},a[hideTabBarClassName]=i,a[hideTabBarWithAnimationClassName]=l,a))},h("div",{class:s,style:{backgroundColor:this.backgroundColor||""}},this.list.map((function(e,a){var r=t.selectedIndex===a;var o;var n;if(r){o=t.selectedColor||"";n=e.selectedIconPath}else{o=t.color||"";n=e.iconPath}return h(TabbarItem,{index:a,onSelect:t.switchTab.bind(t),isSelected:r,textColor:o,iconPath:n,text:e.text,badgeText:e.badgeText,showRedDot:e.showRedDot})}))))};Object.defineProperty(e.prototype,"tabbar",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Tabbar.style=indexCss;export{Tabbar as taro_tabbar};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-5bd7cbab.js";var indexCss="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{-webkit-appearance:none;cursor:auto;width:100%;height:150px;border:0;display:block;position:relative;line-height:1.5}.taro-textarea:focus{outline:none}";function fixControlledValue(e){return e!==null&&e!==void 0?e:""}var Textarea=function(){function e(e){var t=this;registerInstance(this,e);this.onInput=createEvent(this,"input",7);this.onFocus=createEvent(this,"focus",7);this.onBlur=createEvent(this,"blur",7);this.onChange=createEvent(this,"change",7);this.onLineChange=createEvent(this,"linechange",7);this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.nativeProps={};this.line=1;this.hanldeInput=function(e){e.stopPropagation();t.handleLineChange();t.onInput.emit({value:e.target.value,cursor:e.target.value.length})};this.handleFocus=function(e){t.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){t.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();t.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=t.getNumberOfLines();if(e!==t.line){t.line=e;t.onLineChange.emit({height:t.textareaRef.clientHeight,lineCount:t.line})}};this.calculateContentHeight=function(e,t){var n=e.style.height,a=e.offsetHeight,i=e.scrollHeight,o=e.style.overflow;if(a>=i){e.style.height=a+t+"px";e.style.overflow="hidden";if(i<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(a-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=a+++"px"}e.style.height=n;e.style.overflow=o;return a}}else{return i}};this.getNumberOfLines=function(){var e=t.textareaRef,n=window.getComputedStyle?window.getComputedStyle(e):e.style,a=parseInt(n.lineHeight,10),i=t.calculateContentHeight(e,a),o=Math.floor(i/a);return o}}e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.textareaRef.value},set:function(t){return e.value=t},configurable:true});this.autoFocus&&this.textareaRef.focus()};e.prototype.render=function(){var e=this;var t=this,n=t.value,a=t.placeholder,i=t.disabled,o=t.maxlength,r=t.autoFocus,l=t.autoHeight,s=t.name,u=t.nativeProps,c=t.hanldeInput,g=t.handleFocus,f=t.handleBlur,d=t.handleChange;var p={};if(l){p.rows=this.line}return h("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t}},class:"taro-textarea "+(l?"auto-height":""),value:fixControlledValue(n),placeholder:a,name:s,disabled:i,maxlength:o,autofocus:r,onInput:c,onFocus:g,onBlur:f,onChange:d},u,p))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Textarea.style=indexCss;export{Textarea as taro_textarea_core};
1
+ import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-5bd7cbab.js";var indexCss="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{-webkit-appearance:none;cursor:auto;width:100%;height:150px;border:0;display:block;position:relative;line-height:1.5}.taro-textarea:focus{outline:none}";function fixControlledValue(e){return e!==null&&e!==void 0?e:""}var Textarea=function(){function e(e){var t=this;registerInstance(this,e);this.onInput=createEvent(this,"input",7);this.onFocus=createEvent(this,"focus",7);this.onBlur=createEvent(this,"blur",7);this.onChange=createEvent(this,"change",7);this.onLineChange=createEvent(this,"linechange",7);this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.nativeProps={};this.line=1;this.handleInput=function(e){e.stopPropagation();t.handleLineChange();t.onInput.emit({value:e.target.value,cursor:e.target.value.length})};this.handleFocus=function(e){t.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){t.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();t.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=t.getNumberOfLines();if(e!==t.line){t.line=e;t.onLineChange.emit({height:t.textareaRef.clientHeight,lineCount:t.line})}};this.calculateContentHeight=function(e,t){var n=e.style.height,a=e.offsetHeight,i=e.scrollHeight,o=e.style.overflow;if(a>=i){e.style.height=a+t+"px";e.style.overflow="hidden";if(i<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(a-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=a+++"px"}e.style.height=n;e.style.overflow=o;return a}}else{return i}};this.getNumberOfLines=function(){var e=t.textareaRef,n=window.getComputedStyle?window.getComputedStyle(e):e.style,a=parseInt(n.lineHeight,10),i=t.calculateContentHeight(e,a),o=Math.floor(i/a);return o}}e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.textareaRef.value},set:function(t){return e.value=t},configurable:true});this.autoFocus&&this.textareaRef.focus()};e.prototype.render=function(){var e=this;var t=this,n=t.value,a=t.placeholder,i=t.disabled,o=t.maxlength,r=t.autoFocus,l=t.autoHeight,s=t.name,u=t.nativeProps,c=t.handleInput,g=t.handleFocus,f=t.handleBlur,d=t.handleChange;var p={};if(l){p.rows=this.line}return h("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t}},class:"taro-textarea "+(l?"auto-height":""),value:fixControlledValue(n),placeholder:a,name:s,disabled:i,maxlength:o,autofocus:r,onInput:c,onFocus:g,onBlur:f,onChange:d},u,p))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();Textarea.style=indexCss;export{Textarea as taro_textarea_core};
@@ -0,0 +1 @@
1
+ import{r as registerInstance,h,H as Host}from"./index-5bd7cbab.js";var VoipRoom=function(){function o(o){registerInstance(this,o)}o.prototype.componentDidLoad=function(){console.error("H5 暂不支持 VoipRoom 组件!")};o.prototype.render=function(){return h(Host,null)};return o}();export{VoipRoom as taro_voip_room_core};
@@ -0,0 +1 @@
1
+ import{r as o,h as r,H as e}from"./p-f05e1558.js";let s=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 KeyboardAccessory 组件!")}render(){return r(e,null)}};export{s as taro_keyboard_accessory_core}
@@ -0,0 +1 @@
1
+ System.register(["./p-b2d01686.system.js"],(function(t){"use strict";var r,e,n;return{setters:[function(t){r=t.r;e=t.h;n=t.H}],execute:function(){var o=t("taro_editor_core",function(){function t(t){r(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 Editor 组件!")};t.prototype.render=function(){return e(n,null)};return t}())}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-b2d01686.system.js","@tarojs/taro","./p-94c20f60.system.js"],(function(e){"use strict";var t,r,n,i,o,s,a;return{setters:[function(e){t=e.r;r=e.c;n=e.h;i=e.H;o=e.g},function(e){s=e.default},function(e){a=e.c}],execute:function(){var c=".rmc-pull-to-refresh-content{-webkit-transform-origin:left top 0px;transform-origin:left top 0px}.rmc-pull-to-refresh-content-wrapper{overflow:hidden}.rmc-pull-to-refresh-transition{-webkit-transition:-webkit-transform 0.3s;transition:-webkit-transform 0.3s;transition:transform 0.3s;transition:transform 0.3s, -webkit-transform 0.3s}@-webkit-keyframes rmc-pull-to-refresh-indicator{50%{opacity:0.2}100%{opacity:1}}@keyframes rmc-pull-to-refresh-indicator{50%{opacity:0.2}100%{opacity:1}}.rmc-pull-to-refresh-indicator{text-align:center;height:30px;line-height:10px}.rmc-pull-to-refresh-indicator>div{background-color:grey;width:6px;height:6px;border-radius:100%;margin:3px;-webkit-animation-fill-mode:both;animation-fill-mode:both;display:inline-block;-webkit-animation:rmc-pull-to-refresh-indicator 0.5s 0s infinite linear;animation:rmc-pull-to-refresh-indicator 0.5s 0s infinite linear}.rmc-pull-to-refresh-indicator>div:nth-child(0){-webkit-animation-delay:-0.1s !important;animation-delay:-0.1s !important}.rmc-pull-to-refresh-indicator>div:nth-child(1){-webkit-animation-delay:-0.2s !important;animation-delay:-0.2s !important}.rmc-pull-to-refresh-indicator>div:nth-child(2){-webkit-animation-delay:-0.3s !important;animation-delay:-0.3s !important}.rmc-pull-to-refresh-down .rmc-pull-to-refresh-indicator{margin-top:-25px}";function l(e,t){e.transform=t;e.webkitTransform=t;e.MozTransform=t}var f=typeof navigator!=="undefined"&&/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(navigator.userAgent);var u={activate:"release",deactivate:"pull",release:"loading",finish:"finish"};var d=false;try{var h=Object.defineProperty({},"passive",{get:function(){d=true}});window.addEventListener("cancel",(function(){return{}}),h)}catch(e){}var p=d?{passive:false}:false;var m=e("taro_pull_to_refresh",function(){function e(e){var n=this;t(this,e);this.onRefresh=r(this,"refresh",7);this.prefixCls="rmc-pull-to-refresh";this.distanceToRefresh=50;this.damping=100;this.indicator=u;this.currSt="deactivate";this.dragOnEdge=false;this._ScreenY=0;this._startScreenY=0;this._lastScreenY=0;this._isMounted=false;this.triggerPullDownRefresh=function(e){if(!n.dragOnEdge&&n._isMounted){if(e){n._lastScreenY=n.distanceToRefresh+1;n.currSt="release";n.setContentStyle(n._lastScreenY)}else{n.currSt="finish";n.reset()}}};this.init=function(){var e=n.scrollContainer;n._to={touchstart:n.onTouchStart.bind(n,e),touchmove:n.onTouchMove.bind(n,e),touchend:n.onTouchEnd.bind(n,e),touchcancel:n.onTouchEnd.bind(n,e)};Object.keys(n._to).forEach((function(t){e.addEventListener(t,n._to[t],p)}))};this.destroy=function(){var e=n.scrollContainer;Object.keys(n._to).forEach((function(t){e.removeEventListener(t,n._to[t])}))};this.onTouchStart=function(e,t){n._ScreenY=n._startScreenY=t.touches[0].screenY;n._lastScreenY=n._lastScreenY||0};this.isEdge=function(e){var t=n.scrollContainer;if(t&&t===document.body){var r=document.scrollingElement?document.scrollingElement:document.body;return r.scrollTop<=0}return e.scrollTop<=0};this.damp=function(e){if(Math.abs(n._lastScreenY)>n.damping){return 0}var t=Math.abs(n._ScreenY-n._startScreenY)/window.screen.height;e*=(1-t)*.6;return e};this.onTouchMove=function(e,t){var r=t.touches[0].screenY;if(n._startScreenY>r){return}if(n.isEdge(e)){if(!n.dragOnEdge){n._ScreenY=n._startScreenY=t.touches[0].screenY;n.dragOnEdge=true}if(t.cancelable){t.preventDefault()}var i=Math.round(r-n._ScreenY);n._ScreenY=r;n._lastScreenY+=n.damp(i);n.setContentStyle(n._lastScreenY);if(Math.abs(n._lastScreenY)<n.distanceToRefresh){if(n.currSt!=="deactivate"){n.currSt="deactivate"}}else{if(n.currSt==="deactivate"){n.currSt="activate"}}if(f&&t.changedTouches[0].clientY<0){n.onTouchEnd()}}};this.onTouchEnd=function(){if(n.dragOnEdge){n.dragOnEdge=false}if(n.currSt==="activate"){n.currSt="release";n.onRefresh.emit(n);n._lastScreenY=n.distanceToRefresh+1;n.setContentStyle(n._lastScreenY)}else if(n.currSt==="release"){n._lastScreenY=n.distanceToRefresh+1;n.setContentStyle(n._lastScreenY)}else{n.reset()}};this.reset=function(){n._lastScreenY=0;n.setContentStyle(0)};this.setContentStyle=function(e){if(n.contentRef){if(e){l(n.contentRef.style,"translate3d(0px,"+e+"px,0)")}else{l(n.contentRef.style,"")}}}}Object.defineProperty(e.prototype,"scrollContainer",{get:function(){return document.querySelector(".taro-tabbar__panel")||document.body},enumerable:false,configurable:true});e.prototype.statusChange=function(){if(this.currSt==="release"){var e=this.el.closest(".taro_page");if(e&&e.__page){e.__page.onPullDownRefresh()}}};e.prototype.disconnectedCallback=function(){this.destroy()};e.prototype.componentDidLoad=function(){var e=this;this.init();this._isMounted=true;s.eventCenter.on("__taroStartPullDownRefresh",(function(t){var r=t.successHandler,n=t.errorHandler;try{e.triggerPullDownRefresh(true);r({errMsg:"startPullDownRefresh: ok"})}catch(e){n({errMsg:"startPullDownRefresh: fail"})}}));s.eventCenter.on("__taroStopPullDownRefresh",(function(t){var r=t.successHandler,n=t.errorHandler;try{e.triggerPullDownRefresh(false);r({errMsg:"stopPullDownRefresh: ok"})}catch(e){n({errMsg:"stopPullDownRefresh: fail"})}}))};e.prototype.render=function(){var e=this;var t=function(t){var r=e,i=r.currSt,o=r.dragOnEdge,s=r.prefixCls;var c=a(t,!o&&s+"-transition");var l=i==="activate"||i==="release";return n("div",{class:s+"-content-wrapper"},n("div",{class:c,ref:function(t){e.contentRef=t}},l&&n("div",{class:s+"-indicator"},n("div",null),n("div",null),n("div",null)),n("slot",null)))};if(this.scrollContainer){return t(this.prefixCls+"-content "+this.prefixCls+"-down")}return n(i,{class:a(this.prefixCls,this.prefixCls+"-down")},t(this.prefixCls+"-content"))};Object.defineProperty(e.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{currSt:["statusChange"]}},enumerable:false,configurable:true});return e}());m.style=c}}}));
@@ -0,0 +1 @@
1
+ import{r as o,h as r,H as a}from"./p-f05e1558.js";let t=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 NavigationBar 组件!")}render(){return r(a,null)}};export{t as taro_navigation_bar_core}
@@ -0,0 +1 @@
1
+ System.register(["./p-b2d01686.system.js"],(function(t){"use strict";var n,r,e;return{setters:[function(t){n=t.r;r=t.h;e=t.H}],execute:function(){var o=t("taro_slot_core",function(){function t(t){n(this,t)}t.prototype.componentDidLoad=function(){console.error("H5 暂不支持 Slot 组件!")};t.prototype.render=function(){return r(e,null)};return t}())}}}));
@@ -0,0 +1 @@
1
+ System.register(["./p-b2d01686.system.js"],(function(r){"use strict";var e,t,o;return{setters:[function(r){e=r.r;t=r.h;o=r.H}],execute:function(){var n=r("taro_keyboard_accessory_core",function(){function r(r){e(this,r)}r.prototype.componentDidLoad=function(){console.error("H5 暂不支持 KeyboardAccessory 组件!")};r.prototype.render=function(){return t(o,null)};return r}())}}}));
@@ -0,0 +1 @@
1
+ import{r,h as e,H as o}from"./p-f05e1558.js";let s=class{constructor(e){r(this,e)}componentDidLoad(){console.error("H5 暂不支持 LivePusher 组件!")}render(){return e(o,null)}};export{s as taro_live_pusher_core}
@@ -0,0 +1 @@
1
+ import{r as o,h as r,H as s}from"./p-f05e1558.js";let t=class{constructor(r){o(this,r)}componentDidLoad(){console.error("H5 暂不支持 AdCustom 组件!")}render(){return r(s,null)}};export{t as taro_ad_custom_core}
@@ -0,0 +1 @@
1
+ import{r as o,h as c,H as r}from"./p-f05e1558.js";let t=class{constructor(c){o(this,c)}componentDidLoad(){console.error("H5 暂不支持 OfficialAccount 组件!")}render(){return c(r,null)}};export{t as taro_official_account_core}
@@ -0,0 +1 @@
1
+ import{r as s,c as e,h as t,H as a}from"./p-f05e1558.js";import r from"@tarojs/taro";import{c as i}from"./p-37cfdd8f.js";let o=class{constructor(t){s(this,t),this.onSuccess=e(this,"cuccess",7),this.onFail=e(this,"fail",7),this.onComplete=e(this,"Complete",7),this.openType="navigate",this.isHover=!1,this.delta=0}onClick(){const{openType:s,onSuccess:e,onFail:t,onComplete:a}=this;let i=Promise.resolve();switch(s){case"navigate":i=r.navigateTo({url:this.url});break;case"redirect":i=r.redirectTo({url:this.url});break;case"switchTab":i=r.switchTab({url:this.url});break;case"reLaunch":i=r.reLaunch({url:this.url});break;case"navigateBack":i=r.navigateBack({delta:this.delta});break;case"exit":i=Promise.reject(new Error('navigator:fail 暂不支持"openType: exit"'))}i&&i.then((s=>{e.emit(s)})).catch((s=>{t.emit(s)})).finally((()=>{a.emit()}))}render(){const{isHover:s,hoverClass:e}=this;return t(a,{class:i({[e]:s})})}};o.style=".navigator-hover{background:#efefef}";export{o as taro_navigator_core}
@@ -1 +1 @@
1
- System.register(["./p-b2d01686.system.js"],(function(e){"use strict";var t,n,i,a;return{setters:[function(e){t=e.r;n=e.c;i=e.h;a=e.g}],execute:function(){var o="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{-webkit-appearance:none;cursor:auto;width:100%;height:150px;border:0;display:block;position:relative;line-height:1.5}.taro-textarea:focus{outline:none}";function r(e){return e!==null&&e!==void 0?e:""}var h=e("taro_textarea_core",function(){function e(e){var i=this;t(this,e);this.onInput=n(this,"input",7);this.onFocus=n(this,"focus",7);this.onBlur=n(this,"blur",7);this.onChange=n(this,"change",7);this.onLineChange=n(this,"linechange",7);this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.nativeProps={};this.line=1;this.hanldeInput=function(e){e.stopPropagation();i.handleLineChange();i.onInput.emit({value:e.target.value,cursor:e.target.value.length})};this.handleFocus=function(e){i.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){i.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();i.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=i.getNumberOfLines();if(e!==i.line){i.line=e;i.onLineChange.emit({height:i.textareaRef.clientHeight,lineCount:i.line})}};this.calculateContentHeight=function(e,t){var n=e.style.height,i=e.offsetHeight,a=e.scrollHeight,o=e.style.overflow;if(i>=a){e.style.height=i+t+"px";e.style.overflow="hidden";if(a<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(i-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=i+++"px"}e.style.height=n;e.style.overflow=o;return i}}else{return a}};this.getNumberOfLines=function(){var e=i.textareaRef,t=window.getComputedStyle?window.getComputedStyle(e):e.style,n=parseInt(t.lineHeight,10),a=i.calculateContentHeight(e,n),o=Math.floor(a/n);return o}}e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.textareaRef.value},set:function(t){return e.value=t},configurable:true});this.autoFocus&&this.textareaRef.focus()};e.prototype.render=function(){var e=this;var t=this,n=t.value,a=t.placeholder,o=t.disabled,h=t.maxlength,l=t.autoFocus,s=t.autoHeight,u=t.name,c=t.nativeProps,g=t.hanldeInput,f=t.handleFocus,p=t.handleBlur,d=t.handleChange;var v={};if(s){v.rows=this.line}return i("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t}},class:"taro-textarea "+(s?"auto-height":""),value:r(n),placeholder:a,name:u,disabled:o,maxlength:h,autofocus:l,onInput:g,onFocus:f,onBlur:p,onChange:d},c,v))};Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());h.style=o}}}));
1
+ System.register(["./p-b2d01686.system.js"],(function(e){"use strict";var t,n,i,a;return{setters:[function(e){t=e.r;n=e.c;i=e.h;a=e.g}],execute:function(){var o="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{-webkit-appearance:none;cursor:auto;width:100%;height:150px;border:0;display:block;position:relative;line-height:1.5}.taro-textarea:focus{outline:none}";function r(e){return e!==null&&e!==void 0?e:""}var h=e("taro_textarea_core",function(){function e(e){var i=this;t(this,e);this.onInput=n(this,"input",7);this.onFocus=n(this,"focus",7);this.onBlur=n(this,"blur",7);this.onChange=n(this,"change",7);this.onLineChange=n(this,"linechange",7);this.disabled=false;this.maxlength=140;this.autoFocus=false;this.autoHeight=false;this.nativeProps={};this.line=1;this.handleInput=function(e){e.stopPropagation();i.handleLineChange();i.onInput.emit({value:e.target.value,cursor:e.target.value.length})};this.handleFocus=function(e){i.onFocus.emit({value:e.target.value})};this.handleBlur=function(e){i.onBlur.emit({value:e.target.value})};this.handleChange=function(e){e.stopPropagation();i.onChange.emit({value:e.target.value})};this.handleLineChange=function(){var e=i.getNumberOfLines();if(e!==i.line){i.line=e;i.onLineChange.emit({height:i.textareaRef.clientHeight,lineCount:i.line})}};this.calculateContentHeight=function(e,t){var n=e.style.height,i=e.offsetHeight,a=e.scrollHeight,o=e.style.overflow;if(i>=a){e.style.height=i+t+"px";e.style.overflow="hidden";if(a<e.scrollHeight){while(e.offsetHeight>=e.scrollHeight){e.style.height=(i-=t)+"px"}while(e.offsetHeight<e.scrollHeight){e.style.height=i+++"px"}e.style.height=n;e.style.overflow=o;return i}}else{return a}};this.getNumberOfLines=function(){var e=i.textareaRef,t=window.getComputedStyle?window.getComputedStyle(e):e.style,n=parseInt(t.lineHeight,10),a=i.calculateContentHeight(e,n),o=Math.floor(a/n);return o}}e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.textareaRef.value},set:function(t){return e.value=t},configurable:true});this.autoFocus&&this.textareaRef.focus()};e.prototype.render=function(){var e=this;var t=this,n=t.value,a=t.placeholder,o=t.disabled,h=t.maxlength,l=t.autoFocus,s=t.autoHeight,u=t.name,c=t.nativeProps,g=t.handleInput,f=t.handleFocus,p=t.handleBlur,d=t.handleChange;var v={};if(s){v.rows=this.line}return i("textarea",Object.assign({ref:function(t){if(t){e.textareaRef=t}},class:"taro-textarea "+(s?"auto-height":""),value:r(n),placeholder:a,name:u,disabled:o,maxlength:h,autofocus:l,onInput:g,onFocus:f,onBlur:p,onChange:d},c,v))};Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});return e}());h.style=o}}}));