@tarojs/components 3.7.0-alpha.25 → 3.7.0-alpha.27

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 (87) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/taro-components.cjs.js +1 -1
  3. package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +35 -35
  4. package/dist/cjs/taro-scroll-view-core.cjs.entry.js +2 -0
  5. package/dist/cjs/taro-swiper-core_2.cjs.entry.js +11 -1
  6. package/dist/cjs/taro-video-control_3.cjs.entry.js +4 -3
  7. package/dist/collection/components/picker-view/picker-view-column.js +27 -55
  8. package/dist/collection/components/picker-view/picker-view.js +14 -2
  9. package/dist/collection/components/scroll-view/scroll-view.js +2 -0
  10. package/dist/collection/components/swiper/swiper.js +12 -1
  11. package/dist/collection/components/tabbar/tabbar-item.js +1 -1
  12. package/dist/collection/components/tabbar/tabbar.js +4 -4
  13. package/dist/collection/components/video/video.js +4 -3
  14. package/dist/components/taro-picker-view-column-core.js +26 -36
  15. package/dist/components/taro-picker-view-core.js +11 -2
  16. package/dist/components/taro-scroll-view-core.js +2 -0
  17. package/dist/components/taro-swiper-core.js +12 -1
  18. package/dist/components/taro-video-core.js +4 -3
  19. package/dist/esm/loader.js +1 -1
  20. package/dist/esm/taro-components.js +1 -1
  21. package/dist/esm/taro-picker-view-column-core_2.entry.js +35 -35
  22. package/dist/esm/taro-scroll-view-core.entry.js +2 -0
  23. package/dist/esm/taro-swiper-core_2.entry.js +11 -1
  24. package/dist/esm/taro-video-control_3.entry.js +4 -3
  25. package/dist/esm-es5/loader.js +1 -1
  26. package/dist/esm-es5/taro-components.js +1 -1
  27. package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +1 -1
  28. package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
  29. package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
  30. package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
  31. package/dist/taro-components/p-06671eee.entry.js +1 -0
  32. package/dist/taro-components/{p-85fce63e.system.entry.js → p-7102ecf5.system.entry.js} +1 -1
  33. package/dist/taro-components/p-9b0298bf.entry.js +1 -0
  34. package/dist/taro-components/{p-d35c8257.system.entry.js → p-9dcba4a7.system.entry.js} +1 -1
  35. package/dist/taro-components/p-9feff958.system.entry.js +1 -0
  36. package/dist/taro-components/p-b0fc8752.entry.js +1 -0
  37. package/dist/taro-components/{p-fefedf44.entry.js → p-d8fe59c7.entry.js} +1 -1
  38. package/dist/taro-components/p-ed331c06.system.js +1 -1
  39. package/dist/taro-components/{p-7fb57a30.system.entry.js → p-eee6e075.system.entry.js} +1 -1
  40. package/dist/taro-components/taro-components.esm.js +1 -1
  41. package/dist/types/components/picker-view/picker-view-column.d.ts +3 -3
  42. package/dist/types/components/picker-view/picker-view.d.ts +2 -0
  43. package/dist/types/components/swiper/swiper.d.ts +1 -0
  44. package/dist/types/components/tabbar/tabbar-item.d.ts +4 -4
  45. package/dist/types/components/tabbar/tabbar.d.ts +17 -16
  46. package/dist/types/components.d.ts +2 -3
  47. package/lib/react/component-lib/reactify-wc.js +1 -1
  48. package/lib/react/component-lib/reactify-wc.js.map +1 -1
  49. package/lib/vue2/components.d.ts +1 -1
  50. package/lib/vue3/components.d.ts +3 -1
  51. package/package.json +5 -5
  52. package/types/Button.d.ts +5 -5
  53. package/types/Camera.d.ts +1 -1
  54. package/types/Canvas.d.ts +1 -1
  55. package/types/ChannelVideo.d.ts +2 -2
  56. package/types/Checkbox.d.ts +10 -5
  57. package/types/CoverImage.d.ts +1 -1
  58. package/types/Form.d.ts +2 -2
  59. package/types/Icon.d.ts +2 -2
  60. package/types/Image.d.ts +3 -2
  61. package/types/Input.d.ts +15 -15
  62. package/types/Label.d.ts +1 -1
  63. package/types/LivePlayer.d.ts +11 -4
  64. package/types/Map.d.ts +46 -3
  65. package/types/NavigationBar.d.ts +7 -1
  66. package/types/Navigator.d.ts +1 -1
  67. package/types/PageMeta.d.ts +40 -0
  68. package/types/Picker.d.ts +20 -20
  69. package/types/PickerView.d.ts +1 -1
  70. package/types/PickerViewColumn.d.ts +1 -1
  71. package/types/Progress.d.ts +1 -1
  72. package/types/Radio.d.ts +10 -5
  73. package/types/RadioGroup.d.ts +1 -1
  74. package/types/ScrollView.d.ts +4 -4
  75. package/types/Slider.d.ts +14 -14
  76. package/types/Slot.d.ts +1 -1
  77. package/types/Swiper.d.ts +13 -9
  78. package/types/SwiperItem.d.ts +1 -1
  79. package/types/Switch.d.ts +5 -5
  80. package/types/Text.d.ts +2 -2
  81. package/types/Textarea.d.ts +7 -7
  82. package/types/Video.d.ts +16 -16
  83. package/types/common.d.ts +5 -0
  84. package/dist/taro-components/p-1991cc1a.system.entry.js +0 -1
  85. package/dist/taro-components/p-25632af9.entry.js +0 -1
  86. package/dist/taro-components/p-4a3357a4.entry.js +0 -1
  87. package/dist/taro-components/p-a20ecd3b.entry.js +0 -1
@@ -5,7 +5,7 @@ type PickerViewColumnProps = StandardProps
5
5
  /** 滚动选择器子项
6
6
  * 仅可放置于 `<PickerView />` 中,其孩子节点的高度会自动设置成与 picker-view 的选中框的高度一致
7
7
  * @classification forms
8
- * @supported weapp, swan, alipay, tt, h5, rn, harmony
8
+ * @supported weapp, swan, alipay, tt, h5, rn
9
9
  * @see https://developers.weixin.qq.com/miniprogram/dev/component/picker-view-column.html
10
10
  */
11
11
  declare const PickerViewColumn: ComponentType<StandardProps>
@@ -68,7 +68,7 @@ interface ProgressProps extends StandardProps {
68
68
  }
69
69
  /** 进度条。组件属性的长度单位默认为 px
70
70
  * @classification base
71
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
71
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
72
72
  * @example_react
73
73
  * ```tsx
74
74
  * export default class PageView extends Component {
package/types/Radio.d.ts CHANGED
@@ -2,24 +2,29 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction, FormItemProps } from './common'
3
3
  interface RadioProps extends StandardProps {
4
4
  /** `<Radio/>` 标识。当该`<Radio/>` 选中时,`<RadioGroup/>`的 change 事件会携带`<Radio/>`的 value
5
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
5
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
6
6
  */
7
7
  value?: string
8
8
  /** 当前是否选中
9
9
  * @default false
10
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
10
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
11
11
  */
12
12
  checked?: boolean
13
13
  /** 是否禁用
14
14
  * @default false
15
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
15
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
16
16
  */
17
17
  disabled?: boolean
18
18
  /** Radio 的颜色,同 css 的 color
19
19
  * @default "#09BB07"
20
- * @supported weapp, alipay, swan, tt, qq, jd, rn
20
+ * @supported weapp, alipay, swan, tt, qq, jd, rn, harmony
21
21
  */
22
22
  color?: string
23
+ /**
24
+ * Radio 的名字
25
+ * @supported h5, harmony
26
+ */
27
+ name?: string
23
28
  /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
24
29
  * @supported h5
25
30
  */
@@ -29,7 +34,7 @@ interface RadioProps extends StandardProps {
29
34
  */
30
35
  ariaLabel?: string
31
36
  /** <radio-group/> 中的选中项发生变化时触发 change 事件
32
- * @supported h5, rn
37
+ * @supported h5, rn, harmony
33
38
  */
34
39
  onChange?: CommonEventFunction<{
35
40
  value?: string
@@ -2,7 +2,7 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction, FormItemProps } from './common'
3
3
  interface RadioGroupProps extends StandardProps, FormItemProps {
4
4
  /** 组件名字,用于表单提交获取数据。
5
- * @supported alipay, tt
5
+ * @supported alipay, tt, harmony
6
6
  */
7
7
  name?: string
8
8
  /** RadioGroup 中选中项发生改变时触发 change 事件,detail = {value:[选中的radio的value的数组]}
@@ -3,13 +3,13 @@ import { BaseEventOrigFunction, CommonEventFunction, StandardProps } from './com
3
3
  interface ScrollViewProps extends StandardProps {
4
4
  /** 允许横向滚动
5
5
  * @default false
6
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
6
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
7
7
  * @rn 二选一
8
8
  */
9
9
  scrollX?: boolean
10
10
  /** 允许纵向滚动
11
11
  * @default false
12
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
12
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
13
13
  * @rn 二选一
14
14
  */
15
15
  scrollY?: boolean
@@ -91,7 +91,7 @@ interface ScrollViewProps extends StandardProps {
91
91
  */
92
92
  bounces?: boolean
93
93
  /** 滚动条显隐控制 (同时开启 enhanced 属性后生效)
94
- * @supported weapp
94
+ * @supported weapp, harmony
95
95
  * @default true
96
96
  */
97
97
  showScrollbar?: boolean
@@ -220,7 +220,7 @@ interface ScrollViewProps extends StandardProps {
220
220
  */
221
221
  onScrollToLower?: CommonEventFunction
222
222
  /** 滚动时触发
223
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
223
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
224
224
  */
225
225
  onScroll?: BaseEventOrigFunction<ScrollViewProps.onScrollDetail>
226
226
  /** 滚动开始事件
package/types/Slider.d.ts CHANGED
@@ -3,62 +3,62 @@ import { StandardProps, CommonEventFunction, FormItemProps } from './common'
3
3
  interface SliderProps extends StandardProps, FormItemProps {
4
4
  /** 最小值
5
5
  * @default 0
6
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
6
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
7
7
  */
8
8
  min?: number
9
9
  /** 最大值
10
10
  * @default 100
11
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
11
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
12
12
  */
13
13
  max?: number
14
14
  /** 步长,取值必须大于 0,并且可被(max - min)整除
15
15
  * @default 1
16
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
16
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
17
17
  */
18
18
  step?: number
19
19
  /** 是否禁用
20
20
  * @default false
21
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
21
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
22
22
  */
23
23
  disabled?: boolean
24
24
  /** 当前取值
25
25
  * @default 0
26
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
26
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
27
27
  */
28
28
  value?: number
29
29
  /** 背景条的颜色(请使用 backgroundColor)
30
30
  * @default "#e9e9e9"
31
- * @supported weapp, tt, qq, jd
31
+ * @supported weapp, tt, qq, jd, harmony
32
32
  */
33
33
  color?: string
34
34
  /** 已选择的颜色(请使用 activeColor)
35
35
  * @default "#1aad19"
36
- * @supported weapp, tt, qq, jd
36
+ * @supported weapp, tt, qq, jd, harmony
37
37
  */
38
38
  selectedColor?: string
39
39
  /** 已选择的颜色
40
40
  * @default "#1aad19"
41
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
41
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
42
42
  */
43
43
  activeColor?: string
44
44
  /** 背景条的颜色
45
45
  * @default "#e9e9e9"
46
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
46
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
47
47
  */
48
48
  backgroundColor?: string
49
49
  /** 滑块的大小,取值范围为 12 - 28
50
50
  * @default 28
51
- * @supported weapp, swan, tt, qq, jd, h5
51
+ * @supported weapp, swan, tt, qq, jd, h5, harmony
52
52
  */
53
53
  blockSize?: number
54
54
  /** 滑块的颜色
55
55
  * @default "#ffffff"
56
- * @supported weapp, swan, tt, qq, jd, h5, rn
56
+ * @supported weapp, swan, tt, qq, jd, h5, rn, harmony
57
57
  */
58
58
  blockColor?: string
59
59
  /** 是否显示当前 value
60
60
  * @default false
61
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
61
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
62
62
  */
63
63
  showValue?: boolean
64
64
  /** 组件名字,用于表单提交获取数据。
@@ -84,11 +84,11 @@ interface SliderProps extends StandardProps, FormItemProps {
84
84
  */
85
85
  ariaLabel?: string
86
86
  /** 完成一次拖动后触发的事件
87
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
87
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
88
88
  */
89
89
  onChange?: CommonEventFunction<SliderProps.onChangeEventDetail>
90
90
  /** 拖动过程中触发的事件
91
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
91
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
92
92
  */
93
93
  onChanging?: CommonEventFunction<SliderProps.onChangeEventDetail>
94
94
  }
package/types/Slot.d.ts CHANGED
@@ -17,7 +17,7 @@ interface SlotProps extends StandardProps {
17
17
 
18
18
  /** slot 插槽
19
19
  * @classification viewContainer
20
- * @supported weapp, swan, alipay, tt, jd, qq, harmony, h5
20
+ * @supported weapp, swan, alipay, tt, jd, qq, h5
21
21
  * @example
22
22
  * ```tsx
23
23
  * import { Slot, View, Text } from '@tarojs/components'
package/types/Swiper.d.ts CHANGED
@@ -3,41 +3,45 @@ import { StandardProps, CommonEventFunction } from './common'
3
3
  interface SwiperProps extends StandardProps {
4
4
  /** 是否显示面板指示点
5
5
  * @default false
6
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
6
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
7
7
  */
8
8
  indicatorDots?: boolean
9
9
  /** 指示点颜色
10
10
  * @default "rgba(0, 0, 0, .3)"
11
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
11
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
12
12
  */
13
13
  indicatorColor?: string
14
14
  /** 当前选中的指示点颜色
15
15
  * @default "#000000"
16
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
16
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
17
17
  */
18
18
  indicatorActiveColor?: string
19
19
  /** 是否自动切换
20
20
  * @default false
21
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
21
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
22
22
  */
23
23
  autoplay?: boolean
24
24
  /** 当前所在滑块的 index
25
25
  * @default 0
26
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
26
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
27
27
  */
28
28
  current?: number
29
29
  /** 当前所在滑块的 item-id ,不能与 current 被同时指定
30
+ * @supported tt
31
+ * @weapp deprecated
30
32
  * @default ""
33
+ * @supported tt
34
+ * @weapp deprecated
31
35
  */
32
36
  currentItemId?: string
33
37
  /** 自动切换时间间隔
34
38
  * @default 5000
35
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
39
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
36
40
  */
37
41
  interval?: number
38
42
  /** 滑动动画时长
39
43
  * @default 500
40
- * @supported weapp, alipay, swan, tt, qq, jd, h5
44
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony
41
45
  */
42
46
  duration?: number
43
47
  /** 是否采用衔接滑动
@@ -47,7 +51,7 @@ interface SwiperProps extends StandardProps {
47
51
  circular?: boolean
48
52
  /** 滑动方向是否为纵向
49
53
  * @default false
50
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
54
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
51
55
  */
52
56
  vertical?: boolean
53
57
  /** 前边距,可用于露出前一项的一小部分,接受 px 和 rpx 值
@@ -150,7 +154,7 @@ interface SwiperProps extends StandardProps {
150
154
  */
151
155
  cacheExtent?: number
152
156
  /** current 改变时会触发 change 事件
153
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
157
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
154
158
  */
155
159
  onChange?: CommonEventFunction<SwiperProps.onChangeEventDetail>
156
160
  /** swiper-item 的位置发生改变时会触发 transition 事件
@@ -2,7 +2,7 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps } from './common'
3
3
  interface SwiperItemProps extends StandardProps {
4
4
  /** 该 swiper-item 的标识符
5
- * @supported weapp, swan, tt, jd, h5, rn
5
+ * @supported weapp, swan, tt, jd, h5, rn, harmony
6
6
  */
7
7
  itemId?: string
8
8
  /** 是否跳过未显示的滑块布局,设为 true 可优化复杂情况下的滑动性能,但会丢失隐藏状态滑块的布局信息
package/types/Switch.d.ts CHANGED
@@ -3,22 +3,22 @@ import { StandardProps, CommonEventFunction, FormItemProps } from './common'
3
3
  interface SwitchProps extends StandardProps, FormItemProps {
4
4
  /** 是否选中
5
5
  * @default false
6
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
6
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
7
7
  */
8
8
  checked?: boolean
9
9
  /** 是否禁用
10
10
  * @default false
11
- * @supported weapp, alipay, swan, tt, qq, h5, rn
11
+ * @supported weapp, alipay, swan, tt, qq, h5, rn, harmony
12
12
  */
13
13
  disabled?: boolean
14
14
  /** 样式,有效值:switch, checkbox
15
15
  * @default "switch"
16
- * @supported weapp, swan, tt, qq, jd, h5, rn
16
+ * @supported weapp, swan, tt, qq, jd, h5, rn, harmony
17
17
  */
18
18
  type?: 'switch' | 'checkbox'
19
19
  /** switch 的颜色,同 css 的 color
20
20
  * @default "#04BE02"
21
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
21
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
22
22
  */
23
23
  color?: string
24
24
  /** 用于透传 `WebComponents` 上的属性到内部 H5 标签上
@@ -39,7 +39,7 @@ interface SwitchProps extends StandardProps, FormItemProps {
39
39
  */
40
40
  ariaLabel?: string
41
41
  /** checked 改变时触发 change 事件
42
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
42
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
43
43
  */
44
44
  onChange?: CommonEventFunction<SwitchProps.onChangeEventDetail>
45
45
  }
package/types/Text.d.ts CHANGED
@@ -26,7 +26,7 @@ interface TextProps extends StandardProps {
26
26
  */
27
27
  numberOfLines?: number
28
28
  /** 限制文本最大行数
29
- * @supported weapp
29
+ * @supported weapp, harmony
30
30
  */
31
31
  maxLines?: number
32
32
  }
@@ -43,7 +43,7 @@ declare namespace TextProps {
43
43
  }
44
44
  /** 文本
45
45
  * @classification base
46
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
46
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
47
47
  * @example_react
48
48
  * ```tsx
49
49
  * export default class PageView extends Component {
@@ -2,15 +2,15 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction, FormItemProps } from './common'
3
3
  interface TextareaProps extends StandardProps, FormItemProps {
4
4
  /** 输入框的内容
5
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
5
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
6
6
  */
7
7
  value?: string
8
8
  /** 输入框为空时占位符
9
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
9
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
10
10
  */
11
11
  placeholder?: string
12
12
  /** 指定 placeholder 的样式
13
- * @supported weapp, alipay, swan, tt, qq, jd
13
+ * @supported weapp, alipay, swan, tt, qq, jd, harmony
14
14
  */
15
15
  placeholderStyle?: string
16
16
  /** 指定 placeholder 的样式类
@@ -124,11 +124,11 @@ interface TextareaProps extends StandardProps, FormItemProps {
124
124
  */
125
125
  adjustKeyboardTo?: boolean
126
126
  /** 输入框聚焦时触发
127
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
127
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
128
128
  */
129
129
  onFocus?: CommonEventFunction<TextareaProps.onFocusEventDetail>
130
130
  /** 输入框失去焦点时触发
131
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
131
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
132
132
  */
133
133
  onBlur?: CommonEventFunction<TextareaProps.onBlurEventDetail>
134
134
  /** 输入框行数变化时调用
@@ -138,7 +138,7 @@ interface TextareaProps extends StandardProps, FormItemProps {
138
138
  /** 当键盘输入时,触发 input 事件
139
139
  *
140
140
  * **onInput 处理函数的返回值并不会反映到 textarea 上**
141
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
141
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
142
142
  */
143
143
  onInput?: CommonEventFunction<TextareaProps.onInputEventDetail>
144
144
  /** 点击完成时, 触发 confirm 事件
@@ -146,7 +146,7 @@ interface TextareaProps extends StandardProps, FormItemProps {
146
146
  */
147
147
  onConfirm?: CommonEventFunction<TextareaProps.onConfirmEventDetail>
148
148
  /** 键盘高度发生变化的时候触发此事件
149
- * @supported weapp, tt
149
+ * @supported weapp, tt, harmony
150
150
  */
151
151
  onKeyboardHeightChange?: CommonEventFunction<TextareaProps.onKeyboardHeightChangeEventDetail>
152
152
  }
package/types/Video.d.ts CHANGED
@@ -2,16 +2,16 @@ import { ComponentType } from 'react'
2
2
  import { StandardProps, CommonEventFunction } from './common'
3
3
  interface VideoProps extends StandardProps {
4
4
  /** 要播放视频的资源地址
5
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
5
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
6
6
  */
7
7
  src: string
8
8
  /** 指定视频时长
9
- * @supported weapp, alipay, qq, h5, rn
9
+ * @supported weapp, alipay, qq, h5, rn, harmony
10
10
  */
11
11
  duration?: number
12
12
  /** 是否显示默认播放控件(播放/暂停按钮、播放进度、时间)
13
13
  * @default true
14
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
14
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
15
15
  */
16
16
  controls?: boolean
17
17
  /** 弹幕列表
@@ -30,17 +30,17 @@ interface VideoProps extends StandardProps {
30
30
  enableDanmu?: boolean
31
31
  /** 是否自动播放
32
32
  * @default false
33
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
33
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
34
34
  */
35
35
  autoplay?: boolean
36
36
  /** 是否循环播放
37
37
  * @default false
38
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
38
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
39
39
  */
40
40
  loop?: boolean
41
41
  /** 是否静音播放
42
42
  * @default false
43
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
43
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
44
44
  */
45
45
  muted?: boolean
46
46
  /** 指定视频初始播放位置
@@ -83,7 +83,7 @@ interface VideoProps extends StandardProps {
83
83
  enableProgressGesture?: boolean
84
84
  /** 当视频大小与 video 容器大小不一致时,视频的表现形式
85
85
  * @default "contain"
86
- * @supported weapp, alipay, swan, tt, qq, jd, h5
86
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, harmony
87
87
  */
88
88
  objectFit?: keyof VideoProps.ObjectFit
89
89
  /** 视频封面的图片网络资源地址,如果 controls 属性值为 false 则设置 poster 无效
@@ -298,24 +298,24 @@ interface VideoProps extends StandardProps {
298
298
  */
299
299
  definition?: string
300
300
  /** 当开始/继续播放时触发 play 事件
301
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
301
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
302
302
  */
303
303
  onPlay?: CommonEventFunction
304
304
  /** 当暂停播放时触发 pause 事件
305
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
305
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
306
306
  */
307
307
  onPause?: CommonEventFunction
308
308
  /** 当播放到末尾时触发 ended 事件
309
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
309
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
310
310
  */
311
311
  onEnded?: CommonEventFunction
312
312
  /** 播放进度变化时触发, 触发频率 250ms 一次
313
- * @supported weapp, alipay, swan, tt, qq, jd, h5, rn
313
+ * @supported weapp, alipay, swan, tt, qq, jd, h5, rn, harmony
314
314
  */
315
315
  onTimeUpdate?: CommonEventFunction<VideoProps.onTimeUpdateEventDetail>
316
316
  /** 当视频进入和退出全屏时触发
317
317
  *
318
- * @supported h5, rn, alipay
318
+ * @supported alipay, h5, rn, harmony
319
319
  */
320
320
  onFullscreenChange?: CommonEventFunction<VideoProps.onFullscreenChangeEventDetail>
321
321
  /** 视频出现缓冲时触发
@@ -328,11 +328,11 @@ interface VideoProps extends StandardProps {
328
328
  */
329
329
  onError?: CommonEventFunction
330
330
  /** 加载进度变化时触发,只支持一段加载
331
- * @supported weapp, tt, qq, h5
331
+ * @supported weapp, tt, qq, h5, harmony
332
332
  */
333
333
  onProgress?: CommonEventFunction<VideoProps.onProgressEventDetail>
334
334
  /** 视频元数据加载完成时触发
335
- * @supported weapp, swan, tt, jd, rn
335
+ * @supported weapp, swan, tt, jd, rn, harmony
336
336
  */
337
337
  onLoadedMetaData?: CommonEventFunction<VideoProps.onLoadedMetaDataEventDetail>
338
338
  /**
@@ -433,11 +433,11 @@ interface VideoProps extends StandardProps {
433
433
  */
434
434
  onLoadStart?: CommonEventFunction
435
435
  /** 否
436
- * @supported jd
436
+ * @supported jd, harmony
437
437
  */
438
438
  onSeeked?: CommonEventFunction
439
439
  /** 否
440
- * @supported jd
440
+ * @supported jd, harmony
441
441
  */
442
442
  onSeeking?: CommonEventFunction
443
443
  /** 贴片广告加载成功时触发,event.detail = { adType: 'preRollAd' | 'postRollAd' }
package/types/common.d.ts CHANGED
@@ -26,6 +26,11 @@ export interface StandardProps<T = any, TouchEvent extends BaseTouchEvent<any> =
26
26
  dangerouslySetInnerHTML?: {
27
27
  __html: string
28
28
  }
29
+ /**
30
+ * 是否开启编译模式
31
+ * @supported weapp, harmony
32
+ */
33
+ compileMode?: boolean
29
34
  }
30
35
 
31
36
  export interface FormItemProps {
@@ -1 +0,0 @@
1
- System.register(["./p-7e6b54cb.system.js","./p-bd5177d3.system.js","./p-2ec68968.system.js"],(function(t){"use strict";var e,i,o,n,r,a,s;return{setters:[function(t){e=t.r;i=t.c;o=t.h;n=t.g;r=t.H},function(t){a=t.d},function(t){s=t.c}],execute:function(){function l(t){if(t){var e=/([\w-]*)\s*:\s*([^;]*)/g;var i={};var o=void 0;while(o=e.exec(t))i["".concat(o[1])]=o[2].trim();return i}}var c=".taro-picker-view-column-container{display:-ms-flexbox;display:flex;overflow:scroll;overflow-x:hidden;position:relative;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;text-align:center}.taro-picker-view-column-container::-webkit-scrollbar{display:none}";var d=t("taro_picker_view_column_core",function(){function t(t){var o=this;e(this,t);this.onChange=i(this,"onselect",7);this.onSelectStart=i(this,"onselectstart",7);this.onSelectEnd=i(this,"onselectend",7);this.handleSelected=a((function(){var t=o.el.childNodes;var e=0;var i="0";for(var n in t){var r=t[n];var a=r.offsetHeight;if(e+a/2>o.el.scrollTop){i=n;break}e+=a}o.el.scrollTo({top:e,behavior:"smooth"});o.onChange.emit({curIndex:o.col,selectedIndex:i});o.onSelectEnd.emit()}),500);this.col=undefined;this.initialPosition="0";this.paddingVertical=0;this.isInit=false;this.isMove=false}t.prototype.onScroll=function(t){if(!this.isMove){this.isMove=true;this.onSelectStart.emit()}this.handleSelected()};t.prototype.onMouseEnd=function(){if(!this.isMove)return;this.isMove=false;this.handleSelected()};t.prototype.onTouchEnd=function(){this.isMove=false;this.handleSelected()};t.prototype.componentDidUpdate=function(){if(!this.isInit){this.isInit=true;var t=this.el.childNodes;var e=0;var i=0;for(var o in t){var n=t[o];if(this.initialPosition===o||!n||typeof n.offsetHeight!=="number"){break}i+=n.offsetHeight;e++}this.el.scrollTo({top:i});if(e>=t.length){this.onChange.emit({curIndex:this.col,selectedIndex:e-1})}}};t.prototype.render=function(){var t=this.paddingVertical,e=t===void 0?0:t;return o(r,{class:"taro-picker-view-column-container",style:{"padding-top":"".concat(e,"px"),"padding-bottom":"".concat(e,"px")}})};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());d.style=c;var f=".taro-picker-view-container{display:-ms-flexbox;display:flex;position:relative}.taro-picker-view-mask-container{display:-ms-flexbox;display:flex;position:absolute;left:0;right:0;top:0;bottom:0;-ms-flex-direction:column;flex-direction:column;pointer-events:none}.taro-picker-view-mask-indicator{display:-ms-flexbox;display:flex;border-top:1px solid #ddd;border-bottom:1px solid #ddd;height:50px}.taro-picker-view-mask-top{-ms-flex:1;flex:1;background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6)));background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6))}.taro-picker-view-mask-bottom{-ms-flex:1;flex:1;background:-webkit-gradient(linear, left bottom, left top, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6)));background:linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6))}";var p=t("taro_picker_view_core",function(){function t(t){e(this,t);this.onChange=i(this,"change",7);this.onPickStart=i(this,"pickstart",7);this.onPickEnd=i(this,"pickend",7);this.indicatorStyle=undefined;this.indicatorClass=undefined;this.value=undefined;this.maskStyle=undefined;this.maskClass=undefined}t.prototype.onSelect=function(t){t.stopPropagation();if(t.target.tagName!=="TARO-PICKER-VIEW-COLUMN-CORE")return;var e=+t.detail.curIndex;var i=+t.detail.selectedIndex;this.value[e]=i;this.onChange.emit({value:this.value})};t.prototype.onSelectStart=function(t){t.stopPropagation();if(t.target.tagName!=="TARO-PICKER-VIEW-COLUMN-CORE")return;this.onPickStart.emit()};t.prototype.onPickerColEnd=function(t){t.stopPropagation();if(t.target.tagName!=="TARO-PICKER-VIEW-COLUMN-CORE")return;this.onPickEnd.emit()};t.prototype.componentDidLoad=function(){var t=this;var e=this.el.querySelectorAll("taro-picker-view-column-core");e.forEach((function(e,i){var o;e.setAttribute("col","".concat(i));var n="0";if(!!t.value&&t.value.length>i){n="".concat(t.value[i])}var r=t.el.getBoundingClientRect().height;var a=((o=t.indicator)===null||o===void 0?void 0:o.offsetHeight)||0;var s=(r-a)/2;e.setAttribute("initial-position","".concat(n));e.setAttribute("padding-vertical","".concat(s))}))};t.prototype.componentDidRender=function(){var t=this;this.el.childNodes.forEach((function(e){var i=e;if("TARO-PICKER-VIEW-COLUMN-CORE"!==i.tagName&&i.className!=="taro-picker-view-mask-container"){t.el.removeChild(e)}}))};t.prototype.render=function(){var t=this;var e=s("taro-picker-view-mask-indicator",this.indicatorClass);var i=s("taro-picker-view-mask-top",this.maskClass);var n=s("taro-picker-view-mask-bottom",this.maskClass);var a=l(this.indicatorStyle);var c=l(this.maskStyle);var d=l(this.maskStyle);return o(r,{class:"taro-picker-view-container"},o("slot",null),o("div",{class:"taro-picker-view-mask-container"},o("div",{class:i,style:c}),o("div",{class:e,style:a,ref:function(e){return t.indicator=e}}),o("div",{class:n,style:d})))};Object.defineProperty(t.prototype,"el",{get:function(){return n(this)},enumerable:false,configurable:true});return t}());p.style=f}}}));
@@ -1 +0,0 @@
1
- import{r as t,h as i,H as e,g as o,c as s}from"./p-9137dcab.js";import{c as a}from"./p-de951a46.js";import{t as r}from"./p-d3c7f87d.js";const n=t=>{if(!t)return"";const i=Math.round(t%60),e=Math.round((t-i)/60);return`${e<10?`0${e}`:e}:${i<10?`0${i}`:i}`},h=t=>Math.max(-1,Math.min(t,1));let l="default";const d=function(){let t;const i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];var e=["webkitEnterFullscreen","webkitExitFullscreen","webkitCurrentFullScreenElement","webkitSupportsFullscreen","fullscreenchange","fullscreenerror"];let o=0;const s=i.length,a={};for(;o<s;o++)if(t=i[o],t&&t[1]in document){for(o=0;o<t.length;o++)a[i[0][o]]=t[o];return a}if(!a[i[0][0]])for(l="iOS",o=0;o<e.length;o++)a[i[0][o]]=e[o];return a}(),A=class{constructor(i){t(this,i),this.visible=!1,this.isDraggingProgressBall=!1,this.percentage=0,this.progressDimensions={left:0,width:0},this.calcPercentage=t=>{let i=t-this.progressDimensions.left;return i=Math.max(i,0),i=Math.min(i,this.progressDimensions.width),i/this.progressDimensions.width},this.onDragProgressBallStart=()=>{this.isDraggingProgressBall=!0,this.hideControlsTimer&&clearTimeout(this.hideControlsTimer)},this.onClickProgress=t=>{t.stopPropagation();const i=this.calcPercentage(t.pageX);this.seekFunc(i*this.duration),this.toggleVisibility(!0)},this.controls=void 0,this.currentTime=void 0,this.duration=void 0,this.isPlaying=void 0,this.pauseFunc=void 0,this.playFunc=void 0,this.seekFunc=void 0,this.showPlayBtn=void 0,this.showProgress=void 0}onDocumentTouchMove(t){this.isDraggingProgressBall&&(this.percentage=this.calcPercentage(t.touches[0].pageX),this.setProgressBall(this.percentage),this.setCurrentTime(this.percentage*this.duration))}onDocumentTouchEnd(){this.isDraggingProgressBall&&(this.isDraggingProgressBall=!1,this.seekFunc(this.percentage*this.duration),this.toggleVisibility(!0))}async setProgressBall(t){this.progressBallRef&&(this.progressBallRef.style.left=100*t+"%")}async toggleVisibility(t){const i=void 0===t?!this.visible:t;i?(this.hideControlsTimer&&clearTimeout(this.hideControlsTimer),this.isPlaying&&(this.hideControlsTimer=setTimeout((()=>{this.toggleVisibility(!1)}),2e3)),this.el.style.visibility="visible"):this.el.style.visibility="hidden",this.visible=!!i}async getIsDraggingProgressBall(){return this.isDraggingProgressBall}async setCurrentTime(t){this.currentTimeRef.innerHTML=n(t)}render(){const{controls:t,currentTime:o,duration:s,isPlaying:a,pauseFunc:r,playFunc:h,showPlayBtn:l,showProgress:d}=this,A=n(s);let c;return c=l?i("div",a?{class:"taro-video-control-button taro-video-control-button-pause",onClick:r}:{class:"taro-video-control-button taro-video-control-button-play",onClick:h}):null,i(e,{class:"taro-video-bar taro-video-bar-full"},t&&i("div",{class:"taro-video-controls"},c,d&&i("div",{class:"taro-video-current-time",ref:t=>this.currentTimeRef=t},n(o)),d&&i("div",{class:"taro-video-progress-container",onClick:this.onClickProgress},i("div",{class:"taro-video-progress",ref:t=>{if(!t)return;const i=t.getBoundingClientRect();this.progressDimensions.left=i.left,this.progressDimensions.width=i.width}},i("div",{class:"taro-video-progress-buffered",style:{width:"100%"}}),i("div",{class:"taro-video-ball",ref:t=>this.progressBallRef=t,onTouchStart:this.onDragProgressBallStart,style:{left:(A?this.currentTime/s*100:0)+"%"}},i("div",{class:"taro-video-inner"})))),d&&i("div",{class:"taro-video-duration"},A)),i("slot",null))}get el(){return o(this)}},c=class{constructor(i){t(this,i),this.onPlay=s(this,"play",7),this.onPause=s(this,"pause",7),this.onEnded=s(this,"ended",7),this.onTimeUpdate=s(this,"timeupdate",7),this.onError=s(this,"error",7),this.onFullScreenChange=s(this,"fullscreenchange",7),this.onProgress=s(this,"progress",7),this.onLoadedMetaData=s(this,"loadedmetadata",7),this.currentTime=0,this.isDraggingProgress=!1,this.gestureType="none",this.analyzeGesture=t=>{var i;const e={type:"none"},o=t.touches[0].screenX-this.lastTouchScreenX,s=t.touches[0].screenY-this.lastTouchScreenY,a=this.isFullScreen?this.vslideGestureInFullscreen:this.vslideGesture;if("none"===this.gestureType){if(r=s,Math.sqrt(Math.pow(o,2)+Math.pow(r,2))<10)return e;if(Math.abs(s)>=Math.abs(o)){if(!a)return e;this.gestureType="adjustVolume",this.lastVolume=this.videoRef.volume}else if(Math.abs(s)<Math.abs(o)){if(!this.enableProgressGesture)return e;this.gestureType="adjustProgress",this.lastPercentage=this.currentTime/(null!==(i=this.duration)&&void 0!==i?i:this._duration)}}var r;return e.type=this.gestureType,e.dataX=h(o/200),e.dataY=h(s/200),e},this.loadNativePlayer=()=>{var t,i;this.videoRef&&(this.videoRef.src=this.src,null===(i=(t=this.videoRef).load)||void 0===i||i.call(t))},this.init=()=>{const{src:t,videoRef:i}=this;/\.(m3u8)($|\?)/i.test(t)?import("./p-43efbf30.js").then((e=>{const o=e.default;this.HLS=o,o.isSupported()?(this.hls&&this.hls.destroy(),this.hls=new o,this.hls.loadSource(t),this.hls.attachMedia(i),this.hls.on(o.Events.MANIFEST_PARSED,(()=>{this.autoplay&&this.play()})),this.hls.on(o.Events.ERROR,((t,i)=>{this.handleError(i)}))):i.canPlayType("application/vnd.apple.mpegurl")?this.loadNativePlayer():console.error("该浏览器不支持 HLS 播放")})):this.loadNativePlayer()},this.handlePlay=()=>{this.isPlaying=!0,this.isFirst=!1,this.controlsRef.toggleVisibility(!0),this.onPlay.emit()},this.handlePause=()=>{this.isPlaying=!1,this.controlsRef.toggleVisibility(!0),this.onPause.emit()},this.handleEnded=()=>{this.isFirst=!0,this.pause(),this.controlsRef.toggleVisibility(),this.onEnded.emit()},this.handleTimeUpdate=r((async t=>{var i,e;this.currentTime=this.videoRef.currentTime;const o=this.duration||this._duration,s=await this.controlsRef.getIsDraggingProgressBall();this.controls&&this.showProgress&&(s||this.isDraggingProgress||(this.controlsRef.setProgressBall(this.currentTime/o),this.controlsRef.setCurrentTime(this.currentTime))),this.danmuRef.tick(this.currentTime),this.onTimeUpdate.emit({duration:null===(i=t.target)||void 0===i?void 0:i.duration,currentTime:null===(e=t.target)||void 0===e?void 0:e.currentTime}),this.duration&&this.currentTime>=this.duration&&(this.seek(0),this.handleEnded())}),250),this.handleError=t=>{var i,e;if(this.hls)switch(t.type){case this.HLS.ErrorTypes.NETWORK_ERROR:this.onError.emit({errMsg:t.response}),this.hls.startLoad();break;case this.HLS.ErrorTypes.MEDIA_ERROR:this.onError.emit({errMsg:t.reason||"媒体错误,请重试"}),this.hls.recoverMediaError()}else this.onError.emit({errMsg:null===(e=null===(i=t.target)||void 0===i?void 0:i.error)||void 0===e?void 0:e.message})},this.handleDurationChange=()=>{this._duration=this.videoRef.duration},this.handleProgress=()=>{this.onProgress.emit()},this.handleLoadedMetaData=t=>{const i=t.target;this.onLoadedMetaData.emit({width:i.videoWidth,height:i.videoHeight,duration:i.duration})},this._play=()=>this.videoRef.play(),this._pause=()=>this.videoRef.pause(),this._stop=()=>{this.videoRef.pause(),this._seek(0)},this._seek=t=>{this.videoRef.currentTime=t},this.onTouchStartContainer=t=>{this.lastTouchScreenX=t.touches[0].screenX,this.lastTouchScreenY=t.touches[0].screenY},this.onClickContainer=()=>{if(this.enablePlayGesture){const t=Date.now();t-this.lastClickedTime<300&&(this.isPlaying?this.pause():this.play()),this.lastClickedTime=t}this.controlsRef.toggleVisibility()},this.onClickFullScreenBtn=t=>{t.stopPropagation(),this.toggleFullScreen()},this.handleFullScreenChange=t=>{const i=(new Date).getTime();!t.detail&&this.isFullScreen&&!document[d.fullscreenElement]&&i-this.fullScreenTimestamp>100&&this.toggleFullScreen(!1)},this.toggleFullScreen=(t=!this.isFullScreen)=>{this.isFullScreen=t,this.controlsRef.toggleVisibility(!0),this.fullScreenTimestamp=(new Date).getTime(),this.onFullScreenChange.emit({fullScreen:this.isFullScreen,direction:"vertical"}),this.isFullScreen&&!document[d.fullscreenElement]?setTimeout((()=>{this.videoRef[d.requestFullscreen]({navigationUI:"auto"})}),0):document[d.exitFullscreen]()},this.toggleMute=t=>{t.stopPropagation(),this.videoRef.muted=!this.isMute,this.controlsRef.toggleVisibility(!0),this.isMute=!this.isMute},this.toggleDanmu=t=>{t.stopPropagation(),this.controlsRef.toggleVisibility(!0),this._enableDanmu=!this._enableDanmu},this.src=void 0,this.duration=void 0,this.controls=!0,this.autoplay=!1,this.loop=!1,this.muted=!1,this.initialTime=0,this.poster=void 0,this.objectFit="contain",this.showProgress=!0,this.showFullscreenBtn=!0,this.showPlayBtn=!0,this.showCenterPlayBtn=!0,this.showMuteBtn=!1,this.danmuList=void 0,this.danmuBtn=!1,this.enableDanmu=!1,this.enablePlayGesture=!1,this.enableProgressGesture=!0,this.vslideGesture=!1,this.vslideGestureInFullscreen=!0,this.nativeProps={},this._duration=void 0,this._enableDanmu=!1,this.isPlaying=!1,this.isFirst=!0,this.isFullScreen=!1,this.fullScreenTimestamp=(new Date).getTime(),this.isMute=!1}componentWillLoad(){this._enableDanmu=this.enableDanmu}componentDidLoad(){var t,i;this.init(),this.initialTime&&(this.videoRef.currentTime=this.initialTime),null===(i=(t=this.danmuRef).sendDanmu)||void 0===i||i.call(t,this.danmuList),document.addEventListener&&document.addEventListener(d.fullscreenchange,this.handleFullScreenChange),this.videoRef&&"iOS"===l&&this.videoRef.addEventListener("webkitendfullscreen",this.handleFullScreenChange)}componentDidRender(){}disconnectedCallback(){document.removeEventListener&&document.removeEventListener(d.fullscreenchange,this.handleFullScreenChange),this.videoRef&&"iOS"===l&&this.videoRef.removeEventListener("webkitendfullscreen",this.handleFullScreenChange)}watchEnableDanmu(t){this._enableDanmu=t}watchSrc(){this.init()}async onDocumentTouchMove(t){if(void 0===this.lastTouchScreenX||void 0===this.lastTouchScreenY)return;if(await this.controlsRef.getIsDraggingProgressBall())return;const i=this.analyzeGesture(t);if("adjustVolume"===i.type){this.toastVolumeRef.style.visibility="visible";const t=Math.max(Math.min(this.lastVolume-i.dataY,1),0);this.videoRef.volume=t,this.toastVolumeBarRef.style.width=100*t+"%"}else if("adjustProgress"===i.type){this.isDraggingProgress=!0,this.nextPercentage=Math.max(Math.min(this.lastPercentage+(i.dataX||0),1),0),this.controls&&this.showProgress&&(this.controlsRef.setProgressBall(this.nextPercentage),this.controlsRef.toggleVisibility(!0));const t=this.duration||this._duration;this.toastProgressTitleRef.innerHTML=`${n(this.nextPercentage*t)} / ${n(t)}`,this.toastProgressRef.style.visibility="visible"}}onDocumentTouchEnd(){var t;"adjustVolume"===this.gestureType?this.toastVolumeRef.style.visibility="hidden":"adjustProgress"===this.gestureType&&(this.toastProgressRef.style.visibility="hidden"),this.isDraggingProgress&&(this.isDraggingProgress=!1,this.seek(this.nextPercentage*(null!==(t=this.duration)&&void 0!==t?t:this._duration))),this.gestureType="none",this.lastTouchScreenX=void 0,this.lastTouchScreenY=void 0}async getHlsObject(){return this.hls}async play(){this._play()}async pause(){this._pause()}async stop(){this._stop()}async seek(t){this._seek(t)}async requestFullScreen(){this.toggleFullScreen(!0)}async exitFullScreen(){this.toggleFullScreen(!1)}render(){const{controls:t,autoplay:o,loop:s,muted:r,poster:h,objectFit:l,isFirst:d,isMute:A,isFullScreen:c,showCenterPlayBtn:u,isPlaying:g,_enableDanmu:b,showMuteBtn:p,danmuBtn:v,showFullscreenBtn:m,nativeProps:w}=this,E=this.duration||this._duration,I=n(E);return i(e,{class:a("taro-video-container",{"taro-video-type-fullscreen":c}),onTouchStart:this.onTouchStartContainer,onClick:this.onClickContainer},i("video",Object.assign({class:"taro-video-video",style:{"object-fit":l},ref:t=>{t&&(this.videoRef=t)},autoplay:o,loop:s,muted:r,poster:t?h:void 0,playsinline:!0,"webkit-playsinline":!0,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onTimeUpdate:this.handleTimeUpdate,onError:this.handleError,onDurationChange:this.handleDurationChange,onProgress:this.handleProgress,onLoadedMetaData:this.handleLoadedMetaData},w),"暂时不支持播放该视频"),i("taro-video-danmu",{ref:t=>{t&&(this.danmuRef=t)},enable:b}),d&&u&&!g&&i("div",{class:"taro-video-cover"},i("div",{class:"taro-video-cover-play-button",onClick:()=>this.play()}),i("p",{class:"taro-video-cover-duration"},I)),i("taro-video-control",{ref:t=>{t&&(this.controlsRef=t)},controls:t,currentTime:this.currentTime,duration:E,isPlaying:this.isPlaying,pauseFunc:this._pause,playFunc:this._play,seekFunc:this._seek,showPlayBtn:this.showPlayBtn,showProgress:this.showProgress},p&&i("div",{class:a("taro-video-mute",{"taro-video-type-mute":A}),onClick:this.toggleMute}),v&&i("div",{class:a("taro-video-danmu-button",{"taro-video-danmu-button-active":b}),onClick:this.toggleDanmu},"弹幕"),m&&i("div",{class:a("taro-video-fullscreen",{"taro-video-type-fullscreen":c}),onClick:this.onClickFullScreenBtn})),i("div",{class:"taro-video-toast taro-video-toast-volume",ref:t=>{t&&(this.toastVolumeRef=t)}},i("div",{class:"taro-video-toast-title"},"音量"),i("div",{class:"taro-video-toast-icon"}),i("div",{class:"taro-video-toast-value"},i("div",{class:"taro-video-toast-value-content",ref:t=>{t&&(this.toastVolumeBarRef=t)}},i("div",{class:"taro-video-toast-volume-grids"},Array(10).fill(1).map((()=>i("div",{class:"taro-video-toast-volume-grids-item"}))))))),i("div",{class:"taro-video-toast taro-video-toast-progress",ref:t=>{t&&(this.toastProgressRef=t)}},i("div",{class:"taro-video-toast-title",ref:t=>{t&&(this.toastProgressTitleRef=t)}})))}get el(){return o(this)}static get watchers(){return{enableDanmu:["watchEnableDanmu"],src:["watchSrc"]}}};c.style='.taro-video{display:inline-block;overflow:hidden;position:relative;width:100%;height:225px;line-height:0}.taro-video[hidden]{display:none}.taro-video-container{display:inline-block;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;-o-object-position:inherit;object-position:inherit}.taro-video-container.taro-video-type-fullscreen{position:fixed;left:0;right:0;top:0;bottom:0;z-index:999}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left{-webkit-transform:translate(-50%, -50%) rotate(-90deg);transform:translate(-50%, -50%) rotate(-90deg)}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right{-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.taro-video-video{width:100%;height:100%;-o-object-position:inherit;object-position:inherit;display:block}.taro-video-cover{display:-ms-flexbox;display:flex;position:absolute;left:0;top:0;bottom:0;z-index:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:100%;background-color:rgba(1, 1, 1, 0.5);-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-webkit-box-align:center}.taro-video-cover-play-button{width:40px;height:40px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-cover-duration{margin-top:10px;line-height:1;font-size:16px;color:#fff}.taro-video-bar{display:-ms-flexbox;display:flex;visibility:hidden;overflow:hidden;position:absolute;right:0;bottom:0;z-index:1;-ms-flex-align:center;align-items:center;padding:0 10px;height:44px;background-color:rgba(0, 0, 0, 0.5);-webkit-box-align:center}.taro-video-bar.taro-video-bar-full{left:0}.taro-video-controls{display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin:0 8.5px}.taro-video-control-button{-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-8.5px;padding:14.5px 12.5px;width:13px;height:15px}.taro-video-control-button::after{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50% 50%;background-size:100%;content:""}.taro-video-control-button.taro-video-control-button-play::after,.taro-video-cover-play-button{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==")}.taro-video-control-button.taro-video-control-button-pause::after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC")}.taro-video-current-time,.taro-video-duration{margin-top:15px;margin-bottom:14.5px;height:14.5px;line-height:14.5px;font-size:12px;color:#cbcbcb}.taro-video-progress-container{position:relative;-ms-flex-positive:2;flex-grow:2;-webkit-box-flex:2}.taro-video-progress{position:relative;margin:21px 12px;height:2px;background-color:rgba(255, 255, 255, 0.4)}.taro-video-progress-buffered{position:absolute;left:0;top:0;width:0;height:100%;background-color:rgba(255, 255, 255, 0.8);-webkit-transition:width 0.1s;transition:width 0.1s}.taro-video-ball{position:absolute;left:0;top:-21px;-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-22px;padding:14px;width:16px;height:16px}.taro-video-inner{border-radius:50%;width:100%;height:100%;background-color:#fff}.taro-video-danmu-button{margin:0 8.5px;padding:2px 10px;border:1px solid #fff;border-radius:5px;line-height:1;font-size:13px;color:#fff;white-space:nowrap}.taro-video-danmu-button.taro-video-danmu-button-active{border-color:#48c23d;color:#48c23d}.taro-video-fullscreen,.taro-video-mute{-webkit-box-sizing:content-box;box-sizing:content-box;padding:8.5px;width:17px;height:17px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==")}.taro-video-fullscreen.taro-video-type-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+2Xu0pDURBF1/ZLxNcHKNiIlfhA7C0UBSEE8RNEBNFPUEQEEbGxFiSSSrCwEHsf5E/ccsSUuWfUhKQ40947+y42Z8+ZK/pcinzf9hhwD1xJ2q/qsb0JHAOzkl5y+lGAGnCWICQtZgAS6DxQk3TeLYA6cAo0JSXxjmW7CcwBdUkJurKiDhSA4kBvHbA9CqwBQx2O7BSw8ssU3ALPFRF4knT3nQLbr8B4LjLBOdAAFgJaLUkjbYC9n+zm+i4kXWbmwCqwnRMCHiXthuZAQOzPrxSA4kBxYDAcsH0EzATCfCLpJjOINoCtgFZabg7bk7AFDAeaGpKWgitZTu5N0kQbYBmYrujo9mX0CVxL+gidAdu9vY5zXhWA4sAgOND3X7NJ4AHYCaxkB8B62gslvecSFpoDOZH/PP8Cnt7hIaM5xCEAAAAASUVORK5CYII=")}.taro-video-mute{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlk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1fGIaZnTPvszPszNlQ6VIjnbr/DwCoDLMNak/dUVfUK0f2rQugnlcX/FevWgFQH6gf3autRgHUC+piiXHzAOmtPx9gXgug8itQx9SXwDpw47AGKXZWvXvQmNFCwE3gCXA2dY0Az4GrRzHONA9cU/vAbERsllEOyh31e8USV2mrMPdG9uyn+rDom2/BHHCm5puWKiKmgdtAnz+rvaxO5mNygEvHaZ5BfADuARvAaWBpP4DGFBHfgBngFzClTrUKkCDeA+9S837rAEnbqb7VFcCpVJ/oCmCw959aB1AfAROpudYqgDoOLKRmPyLelAF8bcD4pPoMeAtcB34AT4uDBqXXwFG8XXUU/72MIuK1OgE8Bs6l7mEvo8up7lN1Ge0n9aK6VHMFZvJTr9S3CiALaCQhqZOSvegMIAvu2UVSWpigLC1fbQ0gm6in7qpfLCQbhwGIYcyPQ53/G3YO8BtUtd35bvKcVwAAAABJRU5ErkJggg==")}.taro-video-mute.taro-video-type-mute{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzkuMTYwNDUxLCAyMDE3LzA1LzA2LTAxOjA4OjIxICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWV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lu81dSlnn3V570BtuLxaMs2rZ/IgYxsBovaoPwsQA4VoFWEm8ql5DiysNyURsQTMpOIMcDYiPhd8xoGr/FtNC2G6FKXD6ihwGdiVHMoeeh8jYlA9ANwE3kTEp3bO6vE03qOONzR1r/q4RGrquaFFxFxE3ALOA9+6jExpdb180y55AhirhaRTatq0GXEzL8+ZIuI9cBJ4WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC")}.taro-video-danmu{overflow:visible;position:absolute;left:0;top:0;bottom:0;margin-top:14px;margin-bottom:44px;width:100%;line-height:14px;font-size:14px}.taro-video-danmu-item{position:absolute;left:100%;line-height:1;color:#fff;white-space:nowrap;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-property:left, -webkit-transform;transition-property:left, -webkit-transform;transition-property:left, transform;transition-property:left, transform, -webkit-transform;-webkit-transition-duration:3s;transition-duration:3s;-webkit-transition-timing-function:linear;transition-timing-function:linear}.taro-video-toast{display:block;visibility:hidden;position:absolute;left:50%;top:50%;border-radius:5px;background-color:rgba(255, 255, 255, 0.8);pointer-events:none;color:#000;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.taro-video-toast.taro-video-toast-volume{display:block;width:100px;height:100px}.taro-video-toast-volume .taro-video-toast-title{display:block;margin-top:10px;width:100%;line-height:16px;text-align:center;font-size:12px}.taro-video-toast-volume .taro-video-toast-icon{display:block;margin-left:25%;width:50%;height:50%;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAFhklEQVR4Xu2aeaxfQxTHP1VBES0NIQitWtpaaxeCUkQtaYVa0tiClAq1ExIiQTVppaWxt8RWSa2tWkJQRGgtQaSIpUKEpG0ssbbk28yV2+mZO/e9e3vvu/e98897mZnfzPl+75mZs0wvurn06ub46SGgxwLqZaA3sB/wO/A+8G/V6tS5BU4BJgJbO9DvAMOB36okoQ4CNgAeBEYbQK8Bbm4zAds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OcW+OOB540FdeipNKbUWFrUtn06o5xOij4KyDuqU0IE3Obl/rLA63pTzm9XA8jKACjdniZAaSKFmUpB1yUhAlTsUEpMh913wEkuTe7rKTzPAHqO44vpKPkFhH3cWWBVV6ogJVYZUgz/tXtIYelzI3Ct0fExIGx6j7iKWBUUveyYBehv1RIjIEsfqziq8Xp4pSBJOYTVJFQcVY3wCFeKUjVGyYfQWB00+5bEVBECrNS+qsOKBpVHNCVWHs+LS7H5PV5pOu9v0+OKEOAXR39w1e1C7wM6AkJ1eLmkRcrpRQiQrqobXO5S3vL3/4kBKMsCknV0k+iasVLUMV3UX5SAPGtED8EOT+L9YENnCasUIXNO2goChFWHqAIRyxXN4qI1BCQg9dJESYq8LnbrCBAR8t50Lig6i0krCRBoVWhVlt45wkBrCRBuRZyPuAguxIPe9lXqhpd9DcZMXOvdkPF0Xu/8dohNUmZ/1QQkuitXr+d4fryuFx3jywQYm6suAqSX8vLTXKJDt4QqO6rtLYspXWZ/nQQkOJTAUJZGIav19q9MvKvN1RUIWKMAY5P3EBBjqO393d4C/gMVHwRQlpx21QAAAABJRU5ErkJggg==");background-repeat:no-repeat;background-position:50% 50%;background-size:50%;fill:#000}.taro-video-toast-volume .taro-video-toast-value{margin-left:10px;margin-top:5px;width:80px;height:5px}.taro-video-toast-volume .taro-video-toast-value>.taro-video-toast-value-content{overflow:hidden}.taro-video-toast-volume-grids{width:80px;height:5px}.taro-video-toast-volume-grids-item{float:left;width:7.1px;height:5px;background-color:#000}.taro-video-toast-volume-grids-item:not(:first-child){margin-left:1px}.taro-video-toast.taro-video-toast-progress{padding:6px;background-color:rgba(0, 0, 0, 0.8);line-height:18px;font-size:14px;color:#fff}';const u=class{constructor(i){t(this,i),this.list=[],this.danmuElList=[],this.currentTime=0,this.enable=!1,this.danmuList=[]}ensureProperties(t){const i=Object.assign({},t);return"time"in t||(i.time=this.currentTime),i.key=Math.random(),i.bottom=90*Math.random()+5+"%",i}async sendDanmu(t=[]){this.list=Array.isArray(t)?[...this.list,...t.map((t=>this.ensureProperties(t)))]:[...this.list,Object.assign({},this.ensureProperties(t))]}async tick(t){if(this.currentTime=t,!this.enable)return;const i=this.list.filter((({time:i})=>t-i<4&&t>i));let e=!1;const o=this.danmuList;e=i.length!==o.length||i.some((({key:t})=>o.every((i=>t!==i.key)))),e&&(this.danmuList=i)}componentDidUpdate(){requestAnimationFrame((()=>{setTimeout((()=>{this.danmuElList.splice(0).forEach((t=>{t.style.left="0",t.style.webkitTransform="translateX(-100%)",t.style.transform="translateX(-100%)"}))}))}))}render(){return this.enable?i(e,{class:"taro-video-danmu"},this.danmuList.map((({text:t,color:e,bottom:o,key:s})=>i("p",{class:"taro-video-danmu-item",key:s,style:{color:e,bottom:o},ref:t=>{t&&this.danmuElList.push(t)}},t)))):""}};export{A as taro_video_control,c as taro_video_core,u as taro_video_danmu}
@@ -1 +0,0 @@
1
- import{r as t,c as o,h as s,H as i,g as l}from"./p-9137dcab.js";import{c as r}from"./p-de951a46.js";import{d as e}from"./p-d3c7f87d.js";import{h}from"./p-dbdb9de9.js";import"@tarojs/taro";function c(t,o,s=500,i){if(t===o||"number"!=typeof t)return;const l=o-t,r=Date.now(),e=o>=t;!function h(){var c;c=Date.now()-r,t=l*c/s+t,e&&t>=o||!e&&o>=t?i(o):(i(t),requestAnimationFrame(h))}()}const a=class{constructor(s){t(this,s),this.onScroll=o(this,"scroll",3),this.onScrollToUpper=o(this,"scrolltoupper",3),this.onScrollToLower=o(this,"scrolltolower",3),this._scrollLeft=0,this._scrollTop=0,this.upperAndLower=e((()=>{const{offsetWidth:t,offsetHeight:o,scrollLeft:s,scrollTop:i,scrollHeight:l,scrollWidth:r}=this.el,e=Number(this.lowerThreshold),h=Number(this.upperThreshold);!isNaN(e)&&(this.scrollY&&o+i+e>=l||this.scrollX&&t+s+e>=r)&&this.onScrollToLower.emit({direction:this.scrollX?"right":this.scrollY?"bottom":""}),!isNaN(h)&&(this.scrollY&&i<=h||this.scrollX&&s<=h)&&this.onScrollToUpper.emit({direction:this.scrollX?"left":this.scrollY?"top":""})}),200),this.scrollX=!1,this.scrollY=!1,this.upperThreshold=50,this.lowerThreshold=50,this.mpScrollTop=void 0,this.mpScrollLeft=void 0,this.mpScrollIntoView=void 0,this.mpScrollIntoViewAlignment=void 0,this.animated=!1}watchScrollLeft(t){const o=Number(t),{animated:s}=this;this.mpScrollToMethod({left:o,animated:s})}watchScrollTop(t){const o=Number(t),{animated:s}=this;this.mpScrollToMethod({top:o,animated:s})}watchScrollIntoView(t){this.mpScrollIntoViewMethod(t)}handleScroll(t){if(t instanceof CustomEvent)return;t.stopPropagation();const{scrollLeft:o,scrollTop:s,scrollHeight:i,scrollWidth:l}=this.el;this._scrollLeft=o,this._scrollTop=s,this.upperAndLower(),this.onScroll.emit({scrollLeft:o,scrollTop:s,scrollHeight:i,scrollWidth:l})}handleTouchMove(t){t instanceof CustomEvent||t.stopPropagation()}async mpScrollToMethod(t){let{top:o,left:s,duration:i,animated:l=!1}=t;this.scrollY&&"number"==typeof o&&!isNaN(o)&&o!==this._scrollTop&&(l?c(this._scrollTop,o,i,(t=>this.el.scrollTop=t)):this.el.scrollTop=o,this._scrollTop=o),this.scrollX&&"number"==typeof s&&!isNaN(s)&&s!==this._scrollLeft&&(l?c(this._scrollLeft,s,i,(t=>this.el.scrollLeft=t)):this.el.scrollLeft=s,this._scrollLeft=s)}async mpScrollIntoViewMethod(t){var o;"string"==typeof t&&t&&(null===(o=document.querySelector(`#${t}`))||void 0===o||o.scrollIntoView({behavior:this.animated?"smooth":"auto",block:this.scrollY&&this.mpScrollIntoViewAlignment||"center",inline:this.scrollX&&this.mpScrollIntoViewAlignment||"start"}))}componentDidLoad(){const t=Number(this.mpScrollTop),o=Number(this.mpScrollLeft),{animated:s}=this;this.mpScrollToMethod({top:t,left:o,animated:s})}componentDidRender(){h(this.el)}render(){const{scrollX:t,scrollY:o}=this,l=r({"taro-scroll-view__scroll-x":t,"taro-scroll-view__scroll-y":o});return s(i,{class:l},s("slot",null))}get el(){return l(this)}static get watchers(){return{mpScrollLeft:["watchScrollLeft"],mpScrollTop:["watchScrollTop"],mpScrollIntoView:["watchScrollIntoView"]}}};a.style="taro-scroll-view-core{display:block;width:100%;-webkit-overflow-scrolling:auto}taro-scroll-view-core::-webkit-scrollbar{display:none}.taro-scroll-view__scroll-x{overflow-x:scroll;overflow-y:hidden}.taro-scroll-view__scroll-y{overflow-x:hidden;overflow-y:scroll}";export{a as taro_scroll_view_core}
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,g as o,H as s}from"./p-9137dcab.js";import{d as r}from"./p-d3c7f87d.js";import{c as n}from"./p-de951a46.js";function a(t){if(t){const i=/([\w-]*)\s*:\s*([^;]*)/g,e={};let o;for(;o=i.exec(t);)e[`${o[1]}`]=o[2].trim();return e}}const c=class{constructor(e){t(this,e),this.onChange=i(this,"onselect",7),this.onSelectStart=i(this,"onselectstart",7),this.onSelectEnd=i(this,"onselectend",7),this.handleSelected=r((()=>{const t=this.el.childNodes;let i=0,e="0";for(const o in t){const s=t[o].offsetHeight;if(i+s/2>this.el.scrollTop){e=o;break}i+=s}this.el.scrollTo({top:i,behavior:"smooth"}),this.onChange.emit({curIndex:this.col,selectedIndex:e}),this.onSelectEnd.emit()}),500),this.col=void 0,this.initialPosition="0",this.paddingVertical=0,this.isInit=!1,this.isMove=!1}onScroll(t){this.isMove||(this.isMove=!0,this.onSelectStart.emit()),this.handleSelected()}onMouseEnd(){this.isMove&&(this.isMove=!1,this.handleSelected())}onTouchEnd(){this.isMove=!1,this.handleSelected()}componentDidUpdate(){if(!this.isInit){this.isInit=!0;const t=this.el.childNodes;let i=0,e=0;for(const o in t){const s=t[o];if(this.initialPosition===o||!s||"number"!=typeof s.offsetHeight)break;e+=s.offsetHeight,i++}this.el.scrollTo({top:e}),i>=t.length&&this.onChange.emit({curIndex:this.col,selectedIndex:i-1})}}render(){const{paddingVertical:t=0}=this;return e(s,{class:"taro-picker-view-column-container",style:{"padding-top":`${t}px`,"padding-bottom":`${t}px`}})}get el(){return o(this)}};c.style=".taro-picker-view-column-container{display:-ms-flexbox;display:flex;overflow:scroll;overflow-x:hidden;position:relative;-ms-flex-direction:column;flex-direction:column;-ms-flex:1;flex:1;text-align:center}.taro-picker-view-column-container::-webkit-scrollbar{display:none}";const l=class{constructor(e){t(this,e),this.onChange=i(this,"change",7),this.onPickStart=i(this,"pickstart",7),this.onPickEnd=i(this,"pickend",7),this.indicatorStyle=void 0,this.indicatorClass=void 0,this.value=void 0,this.maskStyle=void 0,this.maskClass=void 0}onSelect(t){t.stopPropagation(),"TARO-PICKER-VIEW-COLUMN-CORE"===t.target.tagName&&(this.value[+t.detail.curIndex]=+t.detail.selectedIndex,this.onChange.emit({value:this.value}))}onSelectStart(t){t.stopPropagation(),"TARO-PICKER-VIEW-COLUMN-CORE"===t.target.tagName&&this.onPickStart.emit()}onPickerColEnd(t){t.stopPropagation(),"TARO-PICKER-VIEW-COLUMN-CORE"===t.target.tagName&&this.onPickEnd.emit()}componentDidLoad(){this.el.querySelectorAll("taro-picker-view-column-core").forEach(((t,i)=>{var e;t.setAttribute("col",`${i}`);let o="0";this.value&&this.value.length>i&&(o=`${this.value[i]}`);const s=(this.el.getBoundingClientRect().height-((null===(e=this.indicator)||void 0===e?void 0:e.offsetHeight)||0))/2;t.setAttribute("initial-position",`${o}`),t.setAttribute("padding-vertical",`${s}`)}))}componentDidRender(){this.el.childNodes.forEach((t=>{"TARO-PICKER-VIEW-COLUMN-CORE"!==t.tagName&&"taro-picker-view-mask-container"!==t.className&&this.el.removeChild(t)}))}render(){const t=n("taro-picker-view-mask-indicator",this.indicatorClass),i=n("taro-picker-view-mask-top",this.maskClass),o=n("taro-picker-view-mask-bottom",this.maskClass),r=a(this.indicatorStyle),c=a(this.maskStyle),l=a(this.maskStyle);return e(s,{class:"taro-picker-view-container"},e("slot",null),e("div",{class:"taro-picker-view-mask-container"},e("div",{class:i,style:c}),e("div",{class:t,style:r,ref:t=>this.indicator=t}),e("div",{class:o,style:l})))}get el(){return o(this)}};l.style=".taro-picker-view-container{display:-ms-flexbox;display:flex;position:relative}.taro-picker-view-mask-container{display:-ms-flexbox;display:flex;position:absolute;left:0;right:0;top:0;bottom:0;-ms-flex-direction:column;flex-direction:column;pointer-events:none}.taro-picker-view-mask-indicator{display:-ms-flexbox;display:flex;border-top:1px solid #ddd;border-bottom:1px solid #ddd;height:50px}.taro-picker-view-mask-top{-ms-flex:1;flex:1;background-image:-webkit-gradient(linear, left top, left bottom, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6)));background-image:linear-gradient(to bottom, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6))}.taro-picker-view-mask-bottom{-ms-flex:1;flex:1;background:-webkit-gradient(linear, left bottom, left top, from(rgba(255, 255, 255, 0.95)), to(rgba(255, 255, 255, 0.6)));background:linear-gradient(to top, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.6))}";export{c as taro_picker_view_column_core,l as taro_picker_view_core}