@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
@@ -9943,6 +9943,11 @@ let Swiper = class {
9943
9943
  this.swiper.loopCreate();
9944
9944
  }
9945
9945
  }, 500);
9946
+ this.handleSwiperSize = debounce(() => {
9947
+ if (this.swiper && !this.circular) {
9948
+ this.swiper.updateSlides();
9949
+ }
9950
+ }, 50);
9946
9951
  }
9947
9952
  watchCurrent(newVal) {
9948
9953
  if (!this.isWillLoadCalled)
@@ -10006,6 +10011,8 @@ let Swiper = class {
10006
10011
  this.el.removeChild = (oldChild) => {
10007
10012
  return newVal.removeChild(oldChild);
10008
10013
  };
10014
+ this.el.addEventListener('DOMNodeInserted', this.handleSwiperSize);
10015
+ this.el.addEventListener('DOMNodeRemoved', this.handleSwiperSize);
10009
10016
  }
10010
10017
  watchCircular() {
10011
10018
  if (this.swiper) {
@@ -10039,6 +10046,8 @@ let Swiper = class {
10039
10046
  }
10040
10047
  disconnectedCallback() {
10041
10048
  var _a, _b, _c, _d, _e, _f;
10049
+ this.el.removeEventListener('DOMNodeInserted', this.handleSwiperSize);
10050
+ this.el.removeEventListener('DOMNodeRemoved', this.handleSwiperSize);
10042
10051
  (_b = (_a = this.observer) === null || _a === void 0 ? void 0 : _a.disconnect) === null || _b === void 0 ? void 0 : _b.call(_a);
10043
10052
  (_d = (_c = this.observerFirst) === null || _c === void 0 ? void 0 : _c.disconnect) === null || _d === void 0 ? void 0 : _d.call(_c);
10044
10053
  (_f = (_e = this.observerLast) === null || _e === void 0 ? void 0 : _e.disconnect) === null || _f === void 0 ? void 0 : _f.call(_e);
@@ -10082,7 +10091,7 @@ let Swiper = class {
10082
10091
  observerUpdate(_swiper, e) {
10083
10092
  const target = e.target;
10084
10093
  const className = target && typeof target.className === 'string' ? target.className : '';
10085
- if (className.includes('taro_page') && target.style.display === 'block') {
10094
+ if (className.includes('taro_page') && target.style.display !== 'none') {
10086
10095
  if (that.autoplay && target.contains(_swiper.$el[0])) {
10087
10096
  _swiper.slideTo(that.current);
10088
10097
  }
@@ -3,8 +3,13 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index$1 = require('./index-dd4b7ba3.js');
6
+ const Taro = require('@tarojs/taro');
6
7
  const index = require('./index-b9715722.js');
7
8
 
9
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
10
+
11
+ const Taro__default = /*#__PURE__*/_interopDefaultLegacy(Taro);
12
+
8
13
  function isAbsolute(pathname) {
9
14
  return pathname.charAt(0) === '/';
10
15
  }
@@ -87,22 +92,18 @@ const splitUrl = _url => {
87
92
  query: null,
88
93
  fragment: null
89
94
  };
90
-
91
95
  pos = url.indexOf('#');
92
96
  if (pos > -1) {
93
97
  res.fragment = url.substring(pos + 1);
94
98
  url = url.substring(0, pos);
95
99
  }
96
-
97
100
  pos = url.indexOf('?');
98
101
  if (pos > -1) {
99
102
  res.query = url.substring(pos + 1);
100
103
  url = url.substring(0, pos);
101
104
  }
102
-
103
105
  res.path = url;
104
-
105
- return res
106
+ return res;
106
107
  };
107
108
 
108
109
  const TabbarItem = ({ index: index$2, isSelected = false, textColor, iconPath, badgeText, showRedDot = false, text, onSelect }) => {
@@ -130,10 +131,8 @@ const TabbarItem = ({ index: index$2, isSelected = false, textColor, iconPath, b
130
131
  index$1.h("p", { class: 'weui-tabbar__label', style: { color: textColor } }, text)));
131
132
  };
132
133
 
133
- const 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}";
134
+ const 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}";
134
135
 
135
- // IGNORE: 由于 @tarojs/taro 与 @tarojs/components 中存在循环依赖,暂时使用 commonjs 引用
136
- const Taro = require('@tarojs/taro');
137
136
  // const removeLeadingSlash = str => str.replace(/^\.?\//, '')
138
137
  // const removeTrailingSearch = str => str.replace(/\?[\s\S]*$/, '')
139
138
  const addLeadingSlash = str => str[0] === '/' ? str : `/${str}`;
@@ -175,7 +174,7 @@ let Tabbar = class {
175
174
  };
176
175
  this.switchTab = (index) => {
177
176
  this.selectedIndex = index;
178
- Taro.switchTab({
177
+ Taro__default['default'].switchTab({
179
178
  url: this.list[index].pagePath
180
179
  });
181
180
  };
@@ -326,8 +325,15 @@ let Tabbar = class {
326
325
  throw new Error('tabBar 配置错误');
327
326
  }
328
327
  this.homePage = addLeadingSlash(this.conf.homePage);
329
- for (const key in customRoutes) {
330
- this.customRoutes.push([key, customRoutes[key]]);
328
+ for (let key in customRoutes) {
329
+ const path = customRoutes[key];
330
+ key = addLeadingSlash(key);
331
+ if (typeof path === 'string') {
332
+ this.customRoutes.push([key, addLeadingSlash(path)]);
333
+ }
334
+ else if ((path === null || path === void 0 ? void 0 : path.length) > 0) {
335
+ this.customRoutes.push(...path.map(p => [key, addLeadingSlash(p)]));
336
+ }
331
337
  }
332
338
  list.forEach(item => {
333
339
  if (item.pagePath.indexOf('/') !== 0) {
@@ -358,28 +364,28 @@ let Tabbar = class {
358
364
  return processedUrl === '/' ? this.homePage : processedUrl;
359
365
  }
360
366
  bindEvent() {
361
- Taro.eventCenter.on('__taroRouterChange', this.routerChangeHandler);
362
- Taro.eventCenter.on('__taroSwitchTab', this.switchTabHandler);
363
- Taro.eventCenter.on('__taroSetTabBarBadge', this.setTabBarBadgeHandler);
364
- Taro.eventCenter.on('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler);
365
- Taro.eventCenter.on('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler);
366
- Taro.eventCenter.on('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler);
367
- Taro.eventCenter.on('__taroShowTabBar', this.showTabBarHandler);
368
- Taro.eventCenter.on('__taroHideTabBar', this.hideTabBarHandler);
369
- Taro.eventCenter.on('__taroSetTabBarStyle', this.setTabBarStyleHandler);
370
- Taro.eventCenter.on('__taroSetTabBarItem', this.setTabBarItemHandler);
367
+ Taro__default['default'].eventCenter.on('__taroRouterChange', this.routerChangeHandler);
368
+ Taro__default['default'].eventCenter.on('__taroSwitchTab', this.switchTabHandler);
369
+ Taro__default['default'].eventCenter.on('__taroSetTabBarBadge', this.setTabBarBadgeHandler);
370
+ Taro__default['default'].eventCenter.on('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler);
371
+ Taro__default['default'].eventCenter.on('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler);
372
+ Taro__default['default'].eventCenter.on('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler);
373
+ Taro__default['default'].eventCenter.on('__taroShowTabBar', this.showTabBarHandler);
374
+ Taro__default['default'].eventCenter.on('__taroHideTabBar', this.hideTabBarHandler);
375
+ Taro__default['default'].eventCenter.on('__taroSetTabBarStyle', this.setTabBarStyleHandler);
376
+ Taro__default['default'].eventCenter.on('__taroSetTabBarItem', this.setTabBarItemHandler);
371
377
  }
372
378
  removeEvent() {
373
- Taro.eventCenter.off('__taroRouterChange', this.routerChangeHandler);
374
- Taro.eventCenter.off('__taroSwitchTab', this.switchTabHandler);
375
- Taro.eventCenter.off('__taroSetTabBarBadge', this.setTabBarBadgeHandler);
376
- Taro.eventCenter.off('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler);
377
- Taro.eventCenter.off('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler);
378
- Taro.eventCenter.off('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler);
379
- Taro.eventCenter.off('__taroShowTabBar', this.showTabBarHandler);
380
- Taro.eventCenter.off('__taroHideTabBar', this.hideTabBarHandler);
381
- Taro.eventCenter.off('__taroSetTabBarStyle', this.setTabBarStyleHandler);
382
- Taro.eventCenter.off('__taroSetTabBarItem', this.setTabBarItemHandler);
379
+ Taro__default['default'].eventCenter.off('__taroRouterChange', this.routerChangeHandler);
380
+ Taro__default['default'].eventCenter.off('__taroSwitchTab', this.switchTabHandler);
381
+ Taro__default['default'].eventCenter.off('__taroSetTabBarBadge', this.setTabBarBadgeHandler);
382
+ Taro__default['default'].eventCenter.off('__taroRemoveTabBarBadge', this.removeTabBarBadgeHandler);
383
+ Taro__default['default'].eventCenter.off('__taroShowTabBarRedDotHandler', this.showTabBarRedDotHandler);
384
+ Taro__default['default'].eventCenter.off('__taroHideTabBarRedDotHandler', this.hideTabBarRedDotHandler);
385
+ Taro__default['default'].eventCenter.off('__taroShowTabBar', this.showTabBarHandler);
386
+ Taro__default['default'].eventCenter.off('__taroHideTabBar', this.hideTabBarHandler);
387
+ Taro__default['default'].eventCenter.off('__taroSetTabBarStyle', this.setTabBarStyleHandler);
388
+ Taro__default['default'].eventCenter.off('__taroSetTabBarItem', this.setTabBarItemHandler);
383
389
  }
384
390
  componentDidLoad() {
385
391
  this.tabbarPos = this.tabbar.nextElementSibling ? 'top' : 'bottom';
@@ -23,7 +23,7 @@ let Textarea = class {
23
23
  this.autoHeight = false;
24
24
  this.nativeProps = {};
25
25
  this.line = 1;
26
- this.hanldeInput = (e) => {
26
+ this.handleInput = (e) => {
27
27
  e.stopPropagation();
28
28
  this.handleLineChange();
29
29
  this.onInput.emit({
@@ -109,7 +109,7 @@ let Textarea = class {
109
109
  this.autoFocus && this.textareaRef.focus();
110
110
  }
111
111
  render() {
112
- const { value, placeholder, disabled, maxlength, autoFocus, autoHeight, name, nativeProps, hanldeInput, handleFocus, handleBlur, handleChange } = this;
112
+ const { value, placeholder, disabled, maxlength, autoFocus, autoHeight, name, nativeProps, handleInput, handleFocus, handleBlur, handleChange } = this;
113
113
  const otherProps = {};
114
114
  if (autoHeight) {
115
115
  otherProps.rows = this.line;
@@ -118,7 +118,7 @@ let Textarea = class {
118
118
  if (input) {
119
119
  this.textareaRef = input;
120
120
  }
121
- }, class: `taro-textarea ${autoHeight ? 'auto-height' : ''}`, value: fixControlledValue(value), placeholder: placeholder, name: name, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, onInput: hanldeInput, onFocus: handleFocus, onBlur: handleBlur, onChange: handleChange }, nativeProps, otherProps)));
121
+ }, class: `taro-textarea ${autoHeight ? 'auto-height' : ''}`, value: fixControlledValue(value), placeholder: placeholder, name: name, disabled: disabled, maxlength: maxlength, autofocus: autoFocus, onInput: handleInput, onFocus: handleFocus, onBlur: handleBlur, onChange: handleChange }, nativeProps, otherProps)));
122
122
  }
123
123
  get el() { return index.getElement(this); }
124
124
  };
@@ -0,0 +1,19 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ const index = require('./index-dd4b7ba3.js');
6
+
7
+ let VoipRoom = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ }
11
+ componentDidLoad() {
12
+ console.error('H5 暂不支持 VoipRoom 组件!');
13
+ }
14
+ render() {
15
+ return (index.h(index.Host, null));
16
+ }
17
+ };
18
+
19
+ exports.taro_voip_room_core = VoipRoom;
@@ -1,5 +1,7 @@
1
1
  {
2
2
  "entries": [
3
+ "./components/ad/ad.js",
4
+ "./components/ad-custom/ad-custom.js",
3
5
  "./components/audio/audio.js",
4
6
  "./components/block/block.js",
5
7
  "./components/button/button.js",
@@ -10,26 +12,39 @@
10
12
  "./components/cover-image/cover-image.js",
11
13
  "./components/cover-view/cover-view.js",
12
14
  "./components/custom-wrapper/custom-wrapper.js",
15
+ "./components/editor/editor.js",
13
16
  "./components/form/form.js",
17
+ "./components/functional-page-navigator/functional-page-navigator.js",
14
18
  "./components/icon/icon.js",
15
19
  "./components/image/image.js",
16
20
  "./components/input/input.js",
21
+ "./components/keyboard-accessory/keyboard-accessory.js",
17
22
  "./components/label/label.js",
18
- "./components/movable-view/movable-area.js",
19
- "./components/movable-view/movable-view.js",
23
+ "./components/live-player/live-player.js",
24
+ "./components/live-pusher/live-pusher.js",
25
+ "./components/map/map.js",
26
+ "./components/match-media/match-media.js",
27
+ "./components/movable-area/movable-area.js",
28
+ "./components/movable-area/movable-view.js",
29
+ "./components/navigation-bar/navigation-bar.js",
20
30
  "./components/navigator/navigator.js",
31
+ "./components/official-account/official-account.js",
21
32
  "./components/open-data/open-data.js",
33
+ "./components/page-container/page-container.js",
34
+ "./components/page-meta/page-meta.js",
22
35
  "./components/picker/picker-group.js",
23
36
  "./components/picker/picker.js",
37
+ "./components/picker-view/picker-view-column.js",
24
38
  "./components/picker-view/picker-view.js",
25
- "./components/picker-view-column/picker-view-column.js",
26
39
  "./components/progress/progress.js",
27
- "./components/pull-down-refresh/pull-to-refresh.js",
40
+ "./components/pull-to-refresh/pull-to-refresh.js",
28
41
  "./components/radio/radio-group.js",
29
42
  "./components/radio/radio.js",
30
43
  "./components/rich-text/rich-text.js",
31
44
  "./components/scroll-view/scroll-view.js",
45
+ "./components/share-element/share-element.js",
32
46
  "./components/slider/slider.js",
47
+ "./components/slot/slot.js",
33
48
  "./components/swiper/swiper-item.js",
34
49
  "./components/swiper/swiper.js",
35
50
  "./components/switch/switch.js",
@@ -40,6 +55,7 @@
40
55
  "./components/video/video-danmu.js",
41
56
  "./components/video/video.js",
42
57
  "./components/view/view.js",
58
+ "./components/voip-room/voip-room.js",
43
59
  "./components/web-view/web-view.js"
44
60
  ],
45
61
  "compiler": {
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class Ad {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 Ad 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-ad-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class AdCustom {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 AdCustom 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-ad-custom-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class Editor {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 Editor 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-editor-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class FunctionalPageNavigator {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 FunctionalPageNavigator 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-functional-page-navigator-core"; }
11
+ }
@@ -34,7 +34,7 @@ export class Image {
34
34
  this.onError.emit();
35
35
  }
36
36
  render() {
37
- const { src, mode, lazyLoad, aspectFillMode, imageOnLoad, imageOnError, nativeProps } = this;
37
+ const { src, mode = 'scaleToFill', lazyLoad = false, aspectFillMode = 'width', imageOnLoad, imageOnError, nativeProps } = this;
38
38
  const cls = classNames({
39
39
  'taro-img__widthfix': mode === 'widthFix'
40
40
  });
@@ -7,8 +7,8 @@ taro-image-core {
7
7
  overflow: hidden;
8
8
  position: relative;
9
9
  font-size: 0;
10
- width: 320px;
11
- height: 240px;
10
+ width: auto;
11
+ height: auto;
12
12
  }
13
13
 
14
14
  .taro-img.taro-img__widthfix {
@@ -20,6 +20,7 @@ function fixControlledValue(value) {
20
20
  export class Input {
21
21
  constructor() {
22
22
  this.isOnComposition = false;
23
+ this.isOnPaste = false;
23
24
  this.onInputExcuted = false;
24
25
  this.password = false;
25
26
  this.disabled = false;
@@ -56,6 +57,12 @@ export class Input {
56
57
  });
57
58
  }
58
59
  };
60
+ this.handlePaste = (e) => {
61
+ this.isOnPaste = true;
62
+ this.onPaste.emit({
63
+ value: e.target.value
64
+ });
65
+ };
59
66
  this.handleFocus = (e) => {
60
67
  this.onInputExcuted = false;
61
68
  this.onFocus.emit({
@@ -72,6 +79,10 @@ export class Input {
72
79
  this.onChange.emit({
73
80
  value: e.target.value
74
81
  });
82
+ if (this.isOnPaste) {
83
+ this.isOnPaste = false;
84
+ this.onInput.emit({ value: e.target.value });
85
+ }
75
86
  };
76
87
  this.handleKeyDown = (e) => {
77
88
  const { value } = e.target;
@@ -112,7 +123,7 @@ export class Input {
112
123
  this._value = this.value;
113
124
  }
114
125
  componentDidLoad() {
115
- var _a, _b, _c, _d;
126
+ var _a, _b, _c;
116
127
  if (this.type === 'file') {
117
128
  this.fileListener = () => {
118
129
  this.onInput.emit();
@@ -130,7 +141,6 @@ export class Input {
130
141
  },
131
142
  configurable: true
132
143
  });
133
- this.autoFocus && ((_d = this.inputRef) === null || _d === void 0 ? void 0 : _d.focus());
134
144
  }
135
145
  disconnectedCallback() {
136
146
  var _a;
@@ -139,10 +149,10 @@ export class Input {
139
149
  }
140
150
  }
141
151
  render() {
142
- const { _value, type, password, placeholder, disabled, maxlength, confirmType, name, nativeProps } = this;
152
+ const { _value, type, password, placeholder, autoFocus, disabled, maxlength, confirmType, name, nativeProps } = this;
143
153
  return (h("input", Object.assign({ ref: input => {
144
154
  this.inputRef = input;
145
- }, class: 'weui-input', value: fixControlledValue(_value), type: getTrueType(type, confirmType, password), placeholder: placeholder, disabled: disabled, maxlength: maxlength, name: name, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: this.handleChange, onKeyDown: this.handleKeyDown }, nativeProps)));
155
+ }, class: 'weui-input', value: fixControlledValue(_value), type: getTrueType(type, confirmType, password), placeholder: placeholder, autoFocus: autoFocus, disabled: disabled, maxlength: maxlength, name: name, onInput: this.handleInput, onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: this.handleChange, onKeyDown: this.handleKeyDown, onPaste: this.handlePaste, onCompositionStart: this.handleComposition, onCompositionEnd: this.handleComposition }, nativeProps)));
146
156
  }
147
157
  static get is() { return "taro-input-core"; }
148
158
  static get originalStyleUrls() { return {
@@ -345,6 +355,21 @@ export class Input {
345
355
  "resolved": "any",
346
356
  "references": {}
347
357
  }
358
+ }, {
359
+ "method": "onPaste",
360
+ "name": "paste",
361
+ "bubbles": true,
362
+ "cancelable": true,
363
+ "composed": true,
364
+ "docs": {
365
+ "tags": [],
366
+ "text": ""
367
+ },
368
+ "complexType": {
369
+ "original": "any",
370
+ "resolved": "any",
371
+ "references": {}
372
+ }
348
373
  }, {
349
374
  "method": "onFocus",
350
375
  "name": "focus",
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class KeyboardAccessory {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 KeyboardAccessory 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-keyboard-accessory-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class LivePlayer {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 LivePlayer 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-live-player-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class LivePusher {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 LivePusher 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-live-pusher-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class Map {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 Map 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-map-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class MatchMedia {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 MatchMedia 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-match-media-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class NavigationBar {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 NavigationBar 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-navigation-bar-core"; }
11
+ }
@@ -1,6 +1,6 @@
1
1
  import { Component, Prop, h, Host, Listen, Event } from '@stencil/core';
2
+ import Taro from '@tarojs/taro';
2
3
  import classNames from 'classnames';
3
- const Taro = require('@tarojs/taro');
4
4
  /**
5
5
  * Navigator组件参数
6
6
  * @typedef NavigatorProps
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class OfficialAccount {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 OfficialAccount 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-official-account-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class PageContainer {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 PageContainer 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-page-container-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class PageMeta {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 PageMeta 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-page-meta-core"; }
11
+ }
@@ -1,6 +1,6 @@
1
1
  import { Component, Prop, h, Host, State, Event, Watch, Element } from '@stencil/core';
2
+ import Taro from '@tarojs/taro';
2
3
  import classNames from 'classnames';
3
- const Taro = require('@tarojs/taro');
4
4
  function setTransform(nodeStyle, value) {
5
5
  nodeStyle.transform = value;
6
6
  nodeStyle.webkitTransform = value;
@@ -296,7 +296,7 @@ export class ScrollView {
296
296
  static get events() { return [{
297
297
  "method": "onScroll",
298
298
  "name": "scroll",
299
- "bubbles": true,
299
+ "bubbles": false,
300
300
  "cancelable": true,
301
301
  "composed": true,
302
302
  "docs": {
@@ -311,7 +311,7 @@ export class ScrollView {
311
311
  }, {
312
312
  "method": "onScrollToUpper",
313
313
  "name": "scrolltoupper",
314
- "bubbles": true,
314
+ "bubbles": false,
315
315
  "cancelable": true,
316
316
  "composed": true,
317
317
  "docs": {
@@ -326,7 +326,7 @@ export class ScrollView {
326
326
  }, {
327
327
  "method": "onScrollToLower",
328
328
  "name": "scrolltolower",
329
- "bubbles": true,
329
+ "bubbles": false,
330
330
  "cancelable": true,
331
331
  "composed": true,
332
332
  "docs": {
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class ShareElement {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 ShareElement 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-share-element-core"; }
11
+ }
@@ -0,0 +1,11 @@
1
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
2
+ import { Component, h, Host } from '@stencil/core';
3
+ export class Slot {
4
+ componentDidLoad() {
5
+ console.error('H5 暂不支持 Slot 组件!');
6
+ }
7
+ render() {
8
+ return (h(Host, null));
9
+ }
10
+ static get is() { return "taro-slot-core"; }
11
+ }