cty-mui-core 1.0.37 → 1.0.39

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 (400) hide show
  1. package/components/audio-recorder.js +27 -0
  2. package/components/camera.js +128 -30
  3. package/components/circle.js +3 -3
  4. package/components/crop-image.js +1 -1
  5. package/components/cty-camera-photo.js +112 -37
  6. package/components/cty-canvas-board.js +1 -1
  7. package/components/cty-canvas-video.js +1 -1
  8. package/components/cty-cascader-view.js +3 -3
  9. package/components/cty-cascader.js +1 -1
  10. package/components/cty-count-down.js +2 -2
  11. package/components/cty-dropdown.js +4 -4
  12. package/components/cty-empty.js +1 -1
  13. package/components/cty-floating-bubble.js +1 -1
  14. package/components/cty-floating-panel.js +4 -4
  15. package/components/cty-image-upload.js +1 -1
  16. package/components/cty-index-bar.js +2 -2
  17. package/components/cty-keyboard.js +1 -1
  18. package/components/cty-loading.js +1 -1
  19. package/components/cty-media-capture.js +56 -4
  20. package/components/cty-notice-bar.js +1 -1
  21. package/components/cty-pdf-viewer.js +1 -1
  22. package/components/cty-permission-alert.d.ts +11 -0
  23. package/components/cty-permission-alert.js +6 -0
  24. package/components/cty-progress.js +1 -1
  25. package/components/cty-quick-access.js +1 -1
  26. package/components/cty-rate.js +1 -1
  27. package/components/cty-record.js +66 -9
  28. package/components/cty-segment-slides.js +1 -1
  29. package/components/cty-selector.js +1 -1
  30. package/components/cty-share-sheet.js +1 -1
  31. package/components/cty-side-panel.js +1 -1
  32. package/components/cty-stepper.js +10 -2
  33. package/components/cty-steps.js +1 -1
  34. package/components/cty-text-ellipsis.js +2 -2
  35. package/components/cty-title-bar.js +1 -1
  36. package/components/cty-tour.js +4 -4
  37. package/components/cty-tutorial.js +1 -1
  38. package/components/cty-video.js +2 -2
  39. package/components/cty-virtual-list.js +12 -7
  40. package/components/divider.js +2 -2
  41. package/components/icon.js +1 -1
  42. package/components/image-picker.js +69 -5
  43. package/components/image-viewer.js +10 -5
  44. package/components/index.js +65 -2
  45. package/components/nav-bar.js +1 -1
  46. package/components/overlay.js +1 -1
  47. package/components/permission-alert.js +84 -0
  48. package/components/permission-purpose.js +1 -1
  49. package/components/swipe-item.js +2 -2
  50. package/components/swipe.js +1 -1
  51. package/components/swiper.js +5 -1
  52. package/components/video-capture.js +28 -1
  53. package/dist/cjs/{audio-recorder-ChGIymnF.js → audio-recorder-D3rqlSLq.js} +27 -0
  54. package/dist/cjs/{camera-preview-CTbXcOZK.js → camera-preview-BylkRIcS.js} +29 -2
  55. package/dist/cjs/cty-alert_2.cjs.entry.js +26 -67
  56. package/dist/cjs/cty-camera-photo.cjs.entry.js +59 -8
  57. package/dist/cjs/cty-camera_2.cjs.entry.js +83 -11
  58. package/dist/cjs/cty-canvas-board.cjs.entry.js +1 -1
  59. package/dist/cjs/cty-canvas-video.cjs.entry.js +1 -1
  60. package/dist/cjs/cty-cascader-view.cjs.entry.js +3 -3
  61. package/dist/cjs/cty-cascader.cjs.entry.js +1 -1
  62. package/dist/cjs/cty-circle.cjs.entry.js +82 -0
  63. package/dist/cjs/cty-count-down.cjs.entry.js +2 -2
  64. package/dist/cjs/cty-divider.cjs.entry.js +2 -2
  65. package/dist/cjs/cty-dropdown.cjs.entry.js +4 -4
  66. package/dist/cjs/cty-empty.cjs.entry.js +1 -1
  67. package/dist/cjs/cty-floating-bubble.cjs.entry.js +1 -1
  68. package/dist/cjs/cty-floating-panel.cjs.entry.js +4 -4
  69. package/dist/cjs/cty-icon.cjs.entry.js +1 -1
  70. package/dist/cjs/cty-image-upload.cjs.entry.js +1 -1
  71. package/dist/cjs/cty-image-viewer_6.cjs.entry.js +15 -7
  72. package/dist/cjs/cty-index-bar.cjs.entry.js +2 -2
  73. package/dist/cjs/cty-keyboard.cjs.entry.js +1 -1
  74. package/dist/cjs/cty-loading.cjs.entry.js +1 -1
  75. package/dist/cjs/cty-media-capture.cjs.entry.js +33 -3
  76. package/dist/cjs/cty-mui.cjs.js +1 -1
  77. package/dist/cjs/cty-notice-bar.cjs.entry.js +1 -1
  78. package/dist/cjs/cty-overlay.cjs.entry.js +1 -1
  79. package/dist/cjs/cty-pdf-viewer.cjs.entry.js +1 -1
  80. package/dist/cjs/cty-permission-purpose.cjs.entry.js +1 -1
  81. package/dist/cjs/cty-progress.cjs.entry.js +1 -1
  82. package/dist/cjs/cty-quick-access.cjs.entry.js +1 -1
  83. package/dist/cjs/cty-rate.cjs.entry.js +1 -1
  84. package/dist/cjs/cty-record.cjs.entry.js +49 -2
  85. package/dist/cjs/cty-segment-slides.cjs.entry.js +1 -1
  86. package/dist/cjs/cty-selector.cjs.entry.js +1 -1
  87. package/dist/cjs/cty-share-sheet.cjs.entry.js +1 -1
  88. package/dist/cjs/cty-side-panel.cjs.entry.js +1 -1
  89. package/dist/cjs/cty-stepper.cjs.entry.js +9 -2
  90. package/dist/cjs/cty-steps.cjs.entry.js +1 -1
  91. package/dist/cjs/cty-swipe_2.cjs.entry.js +3 -3
  92. package/dist/cjs/cty-text-ellipsis.cjs.entry.js +2 -2
  93. package/dist/cjs/cty-title-bar.cjs.entry.js +1 -1
  94. package/dist/cjs/cty-tour.cjs.entry.js +4 -4
  95. package/dist/cjs/cty-tutorial.cjs.entry.js +1 -1
  96. package/dist/cjs/cty-video.cjs.entry.js +2 -2
  97. package/dist/cjs/cty-virtual-list.cjs.entry.js +11 -7
  98. package/dist/cjs/{image-picker-BoG8_gzp.js → image-picker-C9sdhsR_.js} +40 -3
  99. package/dist/cjs/index.cjs.js +68 -4
  100. package/dist/cjs/loader.cjs.js +1 -1
  101. package/dist/cjs/{video-capture-C-HjTI17.js → video-capture-BO4sLa1e.js} +28 -1
  102. package/dist/collection/collection-manifest.json +1 -0
  103. package/dist/collection/components/camera/camera.js +188 -9
  104. package/dist/collection/components/camera-photo/camera-photo.js +126 -8
  105. package/dist/collection/components/canvas-board/canvas-board.js +1 -1
  106. package/dist/collection/components/canvas-video/canvas-video.js +1 -1
  107. package/dist/collection/components/cascader/cascader.js +1 -1
  108. package/dist/collection/components/cascader-view/cascader-view.js +3 -3
  109. package/dist/collection/components/circle/circle.js +3 -3
  110. package/dist/collection/components/count-down/count-down.js +2 -2
  111. package/dist/collection/components/crop-image/crop-image.js +1 -1
  112. package/dist/collection/components/divider/divider.js +2 -2
  113. package/dist/collection/components/dropdown/dropdown.js +4 -4
  114. package/dist/collection/components/empty/empty.js +1 -1
  115. package/dist/collection/components/floating-bubble/floating-bubble.js +1 -1
  116. package/dist/collection/components/floating-panel/floating-panel.css +1 -0
  117. package/dist/collection/components/floating-panel/floating-panel.js +3 -3
  118. package/dist/collection/components/icon/icon.js +1 -1
  119. package/dist/collection/components/image-upload/image-upload.js +1 -1
  120. package/dist/collection/components/image-viewer/image-viewer.css +139 -2
  121. package/dist/collection/components/image-viewer/image-viewer.js +10 -5
  122. package/dist/collection/components/index-bar/index-bar.js +2 -2
  123. package/dist/collection/components/keyboard/keyboard.js +1 -1
  124. package/dist/collection/components/loading/loading.js +1 -1
  125. package/dist/collection/components/media-capture/media-capture.js +98 -3
  126. package/dist/collection/components/nav-bar/nav-bar.js +1 -1
  127. package/dist/collection/components/notice-bar/notice-bar.js +1 -1
  128. package/dist/collection/components/overlay/overlay.js +1 -1
  129. package/dist/collection/components/pdf-viewer/pdf-viewer.js +1 -1
  130. package/dist/collection/components/permission-alert/permission-alert.css +57 -0
  131. package/dist/collection/components/permission-alert/permission-alert.js +196 -0
  132. package/dist/collection/components/permission-purpose/permission-purpose.js +1 -1
  133. package/dist/collection/components/progress/progress.js +1 -1
  134. package/dist/collection/components/quick-access/quick-access.js +1 -1
  135. package/dist/collection/components/rate/rate.js +1 -1
  136. package/dist/collection/components/record/record.js +113 -1
  137. package/dist/collection/components/segment-slides/segment-slides.js +1 -1
  138. package/dist/collection/components/selector/selector.js +1 -1
  139. package/dist/collection/components/share-sheet/share-sheet.js +1 -1
  140. package/dist/collection/components/side-panel/side-panel.js +1 -1
  141. package/dist/collection/components/stepper/stepper.css +5 -2
  142. package/dist/collection/components/stepper/stepper.js +32 -1
  143. package/dist/collection/components/steps/steps.js +1 -1
  144. package/dist/collection/components/swipe/swipe.js +1 -1
  145. package/dist/collection/components/swipe-item/swipe-item.js +2 -2
  146. package/dist/collection/components/swiper/swiper.js +5 -1
  147. package/dist/collection/components/text-ellipsis/text-ellipsis.js +2 -2
  148. package/dist/collection/components/title-bar/title-bar.js +1 -1
  149. package/dist/collection/components/tour/tour.js +4 -4
  150. package/dist/collection/components/tutorial/tutorial.js +1 -1
  151. package/dist/collection/components/video/video.js +2 -2
  152. package/dist/collection/components/virtual-list/virtual-list.css +2 -5
  153. package/dist/collection/components/virtual-list/virtual-list.js +33 -6
  154. package/dist/collection/index.js +1 -0
  155. package/dist/collection/utils/native/audio-recorder.js +27 -0
  156. package/dist/collection/utils/native/camera-preview.js +29 -2
  157. package/dist/collection/utils/native/image-picker.js +40 -3
  158. package/dist/collection/utils/native/media-editor.js +62 -0
  159. package/dist/collection/utils/native/video-capture.js +28 -1
  160. package/dist/cty-mui/cty-mui.esm.js +1 -1
  161. package/dist/cty-mui/index.esm.js +1 -1
  162. package/dist/cty-mui/{p-a586fcb6.entry.js → p-005c9f17.entry.js} +1 -1
  163. package/dist/cty-mui/{p-9ba0f75c.entry.js → p-01a57e66.entry.js} +1 -1
  164. package/dist/cty-mui/{p-a8ada422.system.entry.js → p-0c4881aa.system.entry.js} +1 -1
  165. package/dist/cty-mui/{p-587210af.system.entry.js → p-1a3bf306.system.entry.js} +1 -1
  166. package/dist/cty-mui/{p-4f60b693.entry.js → p-1aca5f5b.entry.js} +1 -1
  167. package/dist/cty-mui/{p-475efd63.entry.js → p-1e4ee703.entry.js} +1 -1
  168. package/dist/cty-mui/{p-afc54cf3.entry.js → p-2005bf43.entry.js} +1 -1
  169. package/dist/cty-mui/{p-90f8d468.system.entry.js → p-20ce6b1f.system.entry.js} +1 -1
  170. package/dist/cty-mui/{p-c91ca631.system.entry.js → p-216d0332.system.entry.js} +1 -1
  171. package/dist/cty-mui/{p-e66d35a9.system.entry.js → p-222b8c9f.system.entry.js} +1 -1
  172. package/dist/cty-mui/{p-5ea1965a.system.entry.js → p-2236e06d.system.entry.js} +1 -1
  173. package/dist/cty-mui/p-27e63575.entry.js +1 -0
  174. package/dist/cty-mui/{p-ff973e68.system.entry.js → p-2b46cac8.system.entry.js} +1 -1
  175. package/dist/cty-mui/{p-d74dbc79.system.entry.js → p-398dc564.system.entry.js} +1 -1
  176. package/dist/cty-mui/{p-d62ba819.system.entry.js → p-3f47c7cc.system.entry.js} +1 -1
  177. package/dist/cty-mui/{p-8bfd28fc.entry.js → p-3fdb16af.entry.js} +1 -1
  178. package/dist/cty-mui/{p-2b0dc5e3.entry.js → p-4113a97c.entry.js} +1 -1
  179. package/dist/cty-mui/{p-49341ac0.system.entry.js → p-4377a67a.system.entry.js} +1 -1
  180. package/dist/cty-mui/{p-a5537cb3.system.entry.js → p-44748654.system.entry.js} +1 -1
  181. package/dist/cty-mui/p-46c45956.system.entry.js +1 -0
  182. package/dist/cty-mui/{p-f9f7ee85.entry.js → p-49712aa2.entry.js} +1 -1
  183. package/dist/cty-mui/{p-4890b69c.system.entry.js → p-49a6a0d2.system.entry.js} +1 -1
  184. package/dist/cty-mui/{p-5645d522.system.entry.js → p-4f53841f.system.entry.js} +1 -1
  185. package/dist/cty-mui/{p-b1f6e59c.entry.js → p-5087335d.entry.js} +1 -1
  186. package/dist/cty-mui/{p-d4915a3a.system.entry.js → p-520f708a.system.entry.js} +1 -1
  187. package/dist/cty-mui/p-5d4ba642.system.entry.js +1 -0
  188. package/dist/cty-mui/{p-ad85921c.entry.js → p-5d57fcbf.entry.js} +1 -1
  189. package/dist/cty-mui/{p-9d07466a.system.entry.js → p-5ec43731.system.entry.js} +1 -1
  190. package/dist/cty-mui/p-608ba84c.entry.js +1 -0
  191. package/dist/cty-mui/{p-cdee2447.system.entry.js → p-6179c262.system.entry.js} +1 -1
  192. package/dist/cty-mui/{p-55a730c1.system.entry.js → p-685dc602.system.entry.js} +1 -1
  193. package/dist/cty-mui/{p-5d59f92f.system.entry.js → p-688e3d13.system.entry.js} +1 -1
  194. package/dist/cty-mui/{p-7530dbf4.entry.js → p-6a2cde81.entry.js} +1 -1
  195. package/dist/cty-mui/{p-f4775bbd.system.entry.js → p-6acaf6b0.system.entry.js} +1 -1
  196. package/dist/cty-mui/p-6b00dff7.system.entry.js +1 -0
  197. package/dist/cty-mui/{p-3e894981.entry.js → p-6b90bc73.entry.js} +1 -1
  198. package/dist/cty-mui/p-6ff6ece0.entry.js +1 -0
  199. package/dist/cty-mui/{p-5029b2d1.entry.js → p-7067cc1e.entry.js} +1 -1
  200. package/dist/cty-mui/{p-a02134a3.entry.js → p-738694f5.entry.js} +1 -1
  201. package/dist/cty-mui/{p-c36ad14e.entry.js → p-79c493eb.entry.js} +1 -1
  202. package/dist/cty-mui/p-81a6cd2f.system.entry.js +1 -0
  203. package/dist/cty-mui/{p-019cfadb.entry.js → p-83b3627e.entry.js} +1 -1
  204. package/dist/cty-mui/p-83e63668.entry.js +1 -0
  205. package/dist/cty-mui/p-85a69c15.entry.js +1 -0
  206. package/dist/cty-mui/{p-edc23b12.system.entry.js → p-86fc18c6.system.entry.js} +1 -1
  207. package/dist/cty-mui/{p-71a51c66.system.entry.js → p-88f257ae.system.entry.js} +1 -1
  208. package/dist/cty-mui/p-8a3f8bbc.system.entry.js +1 -0
  209. package/dist/cty-mui/{p-844ef4f2.system.entry.js → p-933ae9d4.system.entry.js} +1 -1
  210. package/dist/cty-mui/{p-c2833f8f.entry.js → p-9a3a8e96.entry.js} +1 -1
  211. package/dist/cty-mui/p-B0tecevi.system.js +1 -0
  212. package/dist/cty-mui/p-BR2ny4zu.system.js +1 -0
  213. package/dist/cty-mui/p-Bkucjxe0.js +1 -0
  214. package/dist/cty-mui/p-Bntx5BKz.js +1 -0
  215. package/dist/cty-mui/p-CElxzE6f.system.js +1 -0
  216. package/dist/cty-mui/p-CPg00410.system.js +1 -0
  217. package/dist/cty-mui/p-CeJSms5W.js +1 -0
  218. package/dist/cty-mui/p-Cegbc1c7.system.js +1 -1
  219. package/dist/cty-mui/p-CnG0E7wf.js +1 -0
  220. package/dist/cty-mui/p-D5J8bYlQ.system.js +1 -0
  221. package/dist/cty-mui/{p-2518352c.system.entry.js → p-a0390733.system.entry.js} +1 -1
  222. package/dist/cty-mui/{p-36619007.entry.js → p-a0aec994.entry.js} +1 -1
  223. package/dist/cty-mui/{p-5528eb5e.entry.js → p-a2a4f620.entry.js} +1 -1
  224. package/dist/cty-mui/p-a337c7a9.system.entry.js +1 -0
  225. package/dist/cty-mui/{p-b00db557.system.entry.js → p-a68cdc7f.system.entry.js} +1 -1
  226. package/dist/cty-mui/{p-215219ca.entry.js → p-a77a236d.entry.js} +1 -1
  227. package/dist/cty-mui/{p-14d54127.system.entry.js → p-ae133756.system.entry.js} +1 -1
  228. package/dist/cty-mui/p-aeb79634.entry.js +1 -0
  229. package/dist/cty-mui/p-b295f647.entry.js +1 -0
  230. package/dist/cty-mui/{p-df2367ca.system.entry.js → p-b4ad5f38.system.entry.js} +1 -1
  231. package/dist/cty-mui/{p-99ce288e.entry.js → p-b6dfc8cc.entry.js} +1 -1
  232. package/dist/cty-mui/{p-97d899b3.entry.js → p-b8350f6b.entry.js} +1 -1
  233. package/dist/cty-mui/p-bfcd0ee8.entry.js +1 -0
  234. package/dist/cty-mui/{p-d0c16dfb.system.entry.js → p-c997e644.system.entry.js} +1 -1
  235. package/dist/cty-mui/{p-a88f7145.system.entry.js → p-cb2be37d.system.entry.js} +1 -1
  236. package/dist/cty-mui/p-ccc21f2e.entry.js +1 -0
  237. package/dist/cty-mui/{p-a4ec9006.entry.js → p-cd172ce5.entry.js} +1 -1
  238. package/dist/cty-mui/{p-ddd7a69a.system.entry.js → p-d030a500.system.entry.js} +1 -1
  239. package/dist/cty-mui/{p-d390049b.system.entry.js → p-d418bc6c.system.entry.js} +1 -1
  240. package/dist/cty-mui/{p-bd9c8e43.entry.js → p-d80da6a9.entry.js} +1 -1
  241. package/dist/cty-mui/{p-d94cdb9d.entry.js → p-d91dd1fd.entry.js} +1 -1
  242. package/dist/cty-mui/{p-3080e6c5.entry.js → p-d99e0f79.entry.js} +1 -1
  243. package/dist/cty-mui/{p-9cf3001f.system.entry.js → p-dd267090.system.entry.js} +1 -1
  244. package/dist/cty-mui/{p-3c8e24c4.system.entry.js → p-e0177323.system.entry.js} +1 -1
  245. package/dist/cty-mui/{p-b0056ff5.entry.js → p-e0bc62cf.entry.js} +1 -1
  246. package/dist/cty-mui/{p-cbd8842f.system.entry.js → p-e2ce5d7f.system.entry.js} +1 -1
  247. package/dist/cty-mui/{p-5a33becc.entry.js → p-e3653feb.entry.js} +1 -1
  248. package/dist/cty-mui/p-e3b5c1fc.system.entry.js +4 -0
  249. package/dist/cty-mui/{p-e55ab7ee.entry.js → p-e8f1c2e2.entry.js} +1 -1
  250. package/dist/cty-mui/{p-1c082713.entry.js → p-e92747c2.entry.js} +1 -1
  251. package/dist/cty-mui/{p-8e03fe9c.entry.js → p-ed751d9b.entry.js} +1 -1
  252. package/dist/cty-mui/{p-0e982b61.system.entry.js → p-eff6c534.system.entry.js} +1 -1
  253. package/dist/cty-mui/{p-5524f103.system.entry.js → p-f06ed732.system.entry.js} +1 -1
  254. package/dist/cty-mui/p-f3eca262.entry.js +5 -0
  255. package/dist/cty-mui/p-fbc7fe30.entry.js +1 -0
  256. package/dist/docs.json +780 -45
  257. package/dist/esm/{audio-recorder-CbuBJ-u7.js → audio-recorder-vTQ1Jf9u.js} +27 -0
  258. package/dist/esm/{camera-preview-SS7McUtz.js → camera-preview-Bntx5BKz.js} +29 -2
  259. package/dist/esm/cty-alert_2.entry.js +26 -67
  260. package/dist/esm/cty-camera-photo.entry.js +59 -8
  261. package/dist/esm/cty-camera_2.entry.js +83 -11
  262. package/dist/esm/cty-canvas-board.entry.js +1 -1
  263. package/dist/esm/cty-canvas-video.entry.js +1 -1
  264. package/dist/esm/cty-cascader-view.entry.js +3 -3
  265. package/dist/esm/cty-cascader.entry.js +1 -1
  266. package/dist/esm/cty-circle.entry.js +80 -0
  267. package/dist/esm/cty-count-down.entry.js +2 -2
  268. package/dist/esm/cty-divider.entry.js +2 -2
  269. package/dist/esm/cty-dropdown.entry.js +4 -4
  270. package/dist/esm/cty-empty.entry.js +1 -1
  271. package/dist/esm/cty-floating-bubble.entry.js +1 -1
  272. package/dist/esm/cty-floating-panel.entry.js +4 -4
  273. package/dist/esm/cty-icon.entry.js +1 -1
  274. package/dist/esm/cty-image-upload.entry.js +1 -1
  275. package/dist/esm/cty-image-viewer_6.entry.js +15 -7
  276. package/dist/esm/cty-index-bar.entry.js +2 -2
  277. package/dist/esm/cty-keyboard.entry.js +1 -1
  278. package/dist/esm/cty-loading.entry.js +1 -1
  279. package/dist/esm/cty-media-capture.entry.js +33 -3
  280. package/dist/esm/cty-mui.js +1 -1
  281. package/dist/esm/cty-notice-bar.entry.js +1 -1
  282. package/dist/esm/cty-overlay.entry.js +1 -1
  283. package/dist/esm/cty-pdf-viewer.entry.js +1 -1
  284. package/dist/esm/cty-permission-purpose.entry.js +1 -1
  285. package/dist/esm/cty-progress.entry.js +1 -1
  286. package/dist/esm/cty-quick-access.entry.js +1 -1
  287. package/dist/esm/cty-rate.entry.js +1 -1
  288. package/dist/esm/cty-record.entry.js +49 -2
  289. package/dist/esm/cty-segment-slides.entry.js +1 -1
  290. package/dist/esm/cty-selector.entry.js +1 -1
  291. package/dist/esm/cty-share-sheet.entry.js +1 -1
  292. package/dist/esm/cty-side-panel.entry.js +1 -1
  293. package/dist/esm/cty-stepper.entry.js +9 -2
  294. package/dist/esm/cty-steps.entry.js +1 -1
  295. package/dist/esm/cty-swipe_2.entry.js +3 -3
  296. package/dist/esm/cty-text-ellipsis.entry.js +2 -2
  297. package/dist/esm/cty-title-bar.entry.js +1 -1
  298. package/dist/esm/cty-tour.entry.js +4 -4
  299. package/dist/esm/cty-tutorial.entry.js +1 -1
  300. package/dist/esm/cty-video.entry.js +2 -2
  301. package/dist/esm/cty-virtual-list.entry.js +11 -7
  302. package/dist/esm/{image-picker-FShbNAm_.js → image-picker-0JHjPizE.js} +40 -3
  303. package/dist/esm/index.js +69 -6
  304. package/dist/esm/loader.js +1 -1
  305. package/dist/esm/{video-capture-B1wGDp4R.js → video-capture-B83C8hW9.js} +28 -1
  306. package/dist/esm-es5/audio-recorder-vTQ1Jf9u.js +1 -0
  307. package/dist/esm-es5/camera-preview-Bntx5BKz.js +1 -0
  308. package/dist/esm-es5/cty-alert_2.entry.js +1 -1
  309. package/dist/esm-es5/cty-camera-photo.entry.js +1 -1
  310. package/dist/esm-es5/cty-camera_2.entry.js +1 -1
  311. package/dist/esm-es5/cty-canvas-board.entry.js +1 -1
  312. package/dist/esm-es5/cty-canvas-video.entry.js +1 -1
  313. package/dist/esm-es5/cty-cascader-view.entry.js +1 -1
  314. package/dist/esm-es5/cty-cascader.entry.js +1 -1
  315. package/dist/esm-es5/cty-circle.entry.js +1 -0
  316. package/dist/esm-es5/cty-count-down.entry.js +1 -1
  317. package/dist/esm-es5/cty-divider.entry.js +1 -1
  318. package/dist/esm-es5/cty-dropdown.entry.js +1 -1
  319. package/dist/esm-es5/cty-empty.entry.js +1 -1
  320. package/dist/esm-es5/cty-floating-bubble.entry.js +1 -1
  321. package/dist/esm-es5/cty-floating-panel.entry.js +1 -1
  322. package/dist/esm-es5/cty-icon.entry.js +1 -1
  323. package/dist/esm-es5/cty-image-upload.entry.js +1 -1
  324. package/dist/esm-es5/cty-image-viewer_6.entry.js +2 -2
  325. package/dist/esm-es5/cty-index-bar.entry.js +1 -1
  326. package/dist/esm-es5/cty-keyboard.entry.js +1 -1
  327. package/dist/esm-es5/cty-loading.entry.js +1 -1
  328. package/dist/esm-es5/cty-media-capture.entry.js +1 -1
  329. package/dist/esm-es5/cty-mui.js +1 -1
  330. package/dist/esm-es5/cty-notice-bar.entry.js +1 -1
  331. package/dist/esm-es5/cty-overlay.entry.js +1 -1
  332. package/dist/esm-es5/cty-pdf-viewer.entry.js +1 -1
  333. package/dist/esm-es5/cty-permission-purpose.entry.js +1 -1
  334. package/dist/esm-es5/cty-progress.entry.js +1 -1
  335. package/dist/esm-es5/cty-quick-access.entry.js +1 -1
  336. package/dist/esm-es5/cty-rate.entry.js +1 -1
  337. package/dist/esm-es5/cty-record.entry.js +1 -1
  338. package/dist/esm-es5/cty-segment-slides.entry.js +1 -1
  339. package/dist/esm-es5/cty-selector.entry.js +1 -1
  340. package/dist/esm-es5/cty-share-sheet.entry.js +1 -1
  341. package/dist/esm-es5/cty-side-panel.entry.js +1 -1
  342. package/dist/esm-es5/cty-stepper.entry.js +1 -1
  343. package/dist/esm-es5/cty-steps.entry.js +1 -1
  344. package/dist/esm-es5/cty-swipe_2.entry.js +1 -1
  345. package/dist/esm-es5/cty-text-ellipsis.entry.js +1 -1
  346. package/dist/esm-es5/cty-title-bar.entry.js +1 -1
  347. package/dist/esm-es5/cty-tour.entry.js +1 -1
  348. package/dist/esm-es5/cty-tutorial.entry.js +1 -1
  349. package/dist/esm-es5/cty-video.entry.js +1 -1
  350. package/dist/esm-es5/cty-virtual-list.entry.js +1 -1
  351. package/dist/esm-es5/image-picker-0JHjPizE.js +1 -0
  352. package/dist/esm-es5/index.js +1 -1
  353. package/dist/esm-es5/loader.js +1 -1
  354. package/dist/esm-es5/video-capture-B83C8hW9.js +1 -0
  355. package/dist/types/components/camera/camera.d.ts +14 -1
  356. package/dist/types/components/camera-photo/camera-photo.d.ts +11 -1
  357. package/dist/types/components/image-viewer/image-viewer.d.ts +1 -0
  358. package/dist/types/components/media-capture/media-capture.d.ts +8 -0
  359. package/dist/types/components/permission-alert/permission-alert.d.ts +17 -0
  360. package/dist/types/components/record/record.d.ts +9 -0
  361. package/dist/types/components/stepper/stepper.d.ts +1 -0
  362. package/dist/types/components/swiper/swiper.d.ts +1 -0
  363. package/dist/types/components/virtual-list/virtual-list.d.ts +1 -1
  364. package/dist/types/components.d.ts +75 -2
  365. package/dist/types/index.d.ts +1 -0
  366. package/dist/types/utils/native/audio-recorder.d.ts +3 -0
  367. package/dist/types/utils/native/camera-preview.d.ts +9 -1
  368. package/dist/types/utils/native/image-picker.d.ts +8 -0
  369. package/dist/types/utils/native/media-editor.d.ts +45 -0
  370. package/dist/types/utils/native/video-capture.d.ts +3 -0
  371. package/package.json +2 -2
  372. package/dist/cty-mui/p-1078ee6a.system.entry.js +0 -1
  373. package/dist/cty-mui/p-1cb056b2.system.entry.js +0 -1
  374. package/dist/cty-mui/p-1d3aca02.entry.js +0 -1
  375. package/dist/cty-mui/p-2F5bjTGm.system.js +0 -1
  376. package/dist/cty-mui/p-3f54848b.entry.js +0 -1
  377. package/dist/cty-mui/p-4XVRwqXU.js +0 -1
  378. package/dist/cty-mui/p-62a9c160.entry.js +0 -1
  379. package/dist/cty-mui/p-68d73325.entry.js +0 -5
  380. package/dist/cty-mui/p-6dddba8f.system.entry.js +0 -1
  381. package/dist/cty-mui/p-751ca0a3.system.entry.js +0 -4
  382. package/dist/cty-mui/p-8b03016d.entry.js +0 -1
  383. package/dist/cty-mui/p-C6cVxtBr.system.js +0 -1
  384. package/dist/cty-mui/p-CcRtmdkf.system.js +0 -1
  385. package/dist/cty-mui/p-D0fcC0rL.js +0 -1
  386. package/dist/cty-mui/p-DTfCyY9u.system.js +0 -1
  387. package/dist/cty-mui/p-Dty0N6Ky.system.js +0 -1
  388. package/dist/cty-mui/p-SS7McUtz.js +0 -1
  389. package/dist/cty-mui/p-adc25955.system.entry.js +0 -1
  390. package/dist/cty-mui/p-c3bb2f2a.entry.js +0 -1
  391. package/dist/cty-mui/p-db2289f6.entry.js +0 -1
  392. package/dist/cty-mui/p-ea36cfac.entry.js +0 -1
  393. package/dist/cty-mui/p-f57da567.system.entry.js +0 -1
  394. package/dist/cty-mui/p-fd7e26fd.entry.js +0 -1
  395. package/dist/cty-mui/p-ff4436a4.entry.js +0 -1
  396. package/dist/cty-mui/p-fpbYSnt8.js +0 -1
  397. package/dist/esm-es5/audio-recorder-CbuBJ-u7.js +0 -1
  398. package/dist/esm-es5/camera-preview-SS7McUtz.js +0 -1
  399. package/dist/esm-es5/image-picker-FShbNAm_.js +0 -1
  400. package/dist/esm-es5/video-capture-B1wGDp4R.js +0 -1
@@ -2,7 +2,10 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
2
2
  import { r as statusBar, s as secondsToVehicle } from './status-bar.js';
3
3
  import { v as videoCapture } from './video-capture.js';
4
4
  import { d as closeOutline, l as arrowUndoCircle } from './index2.js';
5
- import { d as defineCustomElement$3 } from './icon.js';
5
+ import { d as defineCustomElement$6 } from './alert.js';
6
+ import { d as defineCustomElement$5 } from './backdrop.js';
7
+ import { d as defineCustomElement$4 } from './icon.js';
8
+ import { d as defineCustomElement$3 } from './permission-alert.js';
6
9
  import { d as defineCustomElement$2 } from './icon2.js';
7
10
 
8
11
  const mediaCaptureCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}.flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.cty-button-native{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;line-height:1;border:0;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}:host{--cty-media-capture-video-background:var(--cty-color-black);--cty-media-capture-header-top:var(--ion-safe-area-top, 44px);--cty-media-capture-header-padding-start:10px;--cty-media-capture-header-padding-end:15px;--cty-media-capture-close-icon-size:24px;--cty-media-capture-close-icon-color:var(--cty-color-primary);--cty-media-capture-time-padding:2px 5px;--cty-media-capture-time-bg-color:#f00;--cty-media-capture-time-size:var(--cty-font-size-base);--cty-media-capture-time-color:var(--cty-color-white);--cty-media-capture-time-border-radius:var(--cty-border-radius-small);--cty-media-capture-footer-bottom:30px;--cty-media-capture-switch-size:60px;--cty-media-capture-switch-bg-color:var(--cty-color-primary);--cty-media-capture-switch-active-bg-color:#f00;--cty-media-capture-switch-border-width:3px;--cty-media-capture-switch-active-size:24px;--cty-media-capture-status-size:48px;--cty-media-capture-confirm-min-height:30px;--cty-media-capture-confirm-padding:0 1em;--cty-media-capture-confirm-size:var(--cty-font-size-base);--cty-media-capture-confirm-color:var(--cty-color-white);--cty-media-capture-confirm-bg-color:var(--cty-color-primary);--cty-media-capture-confirm-right:15px;--cty-media-capture-confirm-border-radius:var(--cty-border-radius-base);--cty-media-capture-video-object-fit:cover;position:absolute;left:0;top:0;width:100vw;height:100vh;visibility:visible !important}:host(.cty-media-captured){background:var(--cty-media-capture-video-background)}.cty-media-capture__header{position:absolute;z-index:1;left:0;top:var(--cty-media-capture-header-top);width:100%;padding-left:var(--cty-media-capture-header-padding-start);padding-right:var(--cty-media-capture-header-padding-end)}.cty-capture__close-icon{font-size:var(--cty-media-capture-close-icon-size);color:var(--cty-media-capture-close-icon-color)}.cty-media-capture__time{position:absolute;left:50%;top:50%;padding:var(--cty-media-capture-time-padding);border-radius:var(--cty-media-capture-time-border-radius);font-size:var(--cty-media-capture-time-size);color:var(--cty-media-capture-time-color);-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cty-media-capture__time-active{background:var(--cty-media-capture-time-bg-color)}.cty-media-capture__footer{position:absolute;bottom:var(--cty-media-capture-footer-bottom);left:0;width:100%}.cty-media-capture__switch{width:var(--cty-media-capture-switch-size);height:var(--cty-media-capture-switch-size);border-color:var(--cty-media-capture-switch-bg-color);border-width:var(--cty-media-capture-switch-border-width);border-style:solid;border-radius:var(--cty-border-radius-circle);cursor:pointer}.cty-media-capture__status{width:var(--cty-media-capture-status-size);height:var(--cty-media-capture-status-size);border-radius:var(--cty-border-radius-circle);background:var(--cty-media-capture-switch-bg-color);-webkit-transition:0.3s;transition:0.3s}.cty-media-capture__status-active{width:var(--cty-media-capture-switch-active-size);height:var(--cty-media-capture-switch-active-size);border-radius:var(--cty-border-radius-base);background:var(--cty-media-capture-switch-active-bg-color)}.cty-media-capture__confirm{position:absolute;right:var(--cty-media-capture-confirm-right);top:50%;min-height:var(--cty-media-capture-confirm-min-height);background:var(--cty-media-capture-confirm-bg-color);padding:var(--cty-media-capture-confirm-padding);color:var(--cty-media-capture-confirm-color);font-size:var(--cty-media-capture-confirm-size);border-radius:var(--cty-media-capture-confirm-border-radius);-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cty-media-capture__video{position:absolute;left:0;top:0;width:100%;height:100%;-o-object-fit:var(--cty-media-capture-video-object-fit);object-fit:var(--cty-media-capture-video-object-fit)}";
@@ -26,11 +29,15 @@ const MediaCapture = /*@__PURE__*/ proxyCustomElement(class MediaCapture extends
26
29
  this.controls = false;
27
30
  this.poster = '';
28
31
  this.timeLimit = 0; //大于0则有录制时间限制
32
+ this.permissionAlertTitle = '需要申请开启相机权限';
33
+ this.permissionAlertContent = '需要开启相机权限,用于拍摄视频。我们承诺仅在功能使用时调用摄像头。';
29
34
  this.isCaptured = false;
30
35
  this.capturing = false;
31
36
  this.captureDuration = 0;
32
37
  this.filePath = '';
33
38
  this.videoFileUrl = '';
39
+ this.hasPermission = false;
40
+ this.permissionAlertVisible = false;
34
41
  this.originalBodyBackground = '';
35
42
  this._timer = 0;
36
43
  }
@@ -51,7 +58,15 @@ const MediaCapture = /*@__PURE__*/ proxyCustomElement(class MediaCapture extends
51
58
  this.videoEl.play();
52
59
  }, 150);
53
60
  }
54
- }).catch(() => { });
61
+ }).catch((error) => {
62
+ const { code } = error || {};
63
+ if (code == 'PERMISSION_DENIED_NEED_SETTINGS') {
64
+ this.permissionAlertVisible = true;
65
+ }
66
+ else {
67
+ this.ctyDismiss.emit();
68
+ }
69
+ });
55
70
  }
56
71
  disconnectedCallback() {
57
72
  videoCapture.stopVideoCapture();
@@ -113,9 +128,27 @@ const MediaCapture = /*@__PURE__*/ proxyCustomElement(class MediaCapture extends
113
128
  confirm() {
114
129
  this.ctyComplete.emit({ data: this.filePath, url: this.videoFileUrl });
115
130
  }
131
+ async toOpenAppSetting(event) {
132
+ const { item } = event.detail;
133
+ if (item.action == 'permission') {
134
+ try {
135
+ await videoCapture.openAppSettings();
136
+ this.permissionAlertVisible = false;
137
+ this.initVideoCapture();
138
+ }
139
+ catch (error) {
140
+ this.closePermissionAlert(event);
141
+ }
142
+ }
143
+ }
144
+ closePermissionAlert(e) {
145
+ e.stopPropagation();
146
+ this.permissionAlertVisible = false;
147
+ this.ctyDismiss.emit();
148
+ }
116
149
  render() {
117
150
  const captureDuration = secondsToVehicle(this.captureDuration);
118
- return (h(Host, { key: 'a2348b392a4dfc583c83f0aa45ca688c516d3a33', class: { 'cty-media-capture': true, 'cty-media-captured': this.isCaptured } }, h("div", { key: '8941dcb4cbca994d15aead39cf77dea0a621bde8', class: "cty-media-capture__header" }, h("button", { key: '603afe4b821ef29f29db2cd359d9722dc30f41f3', onClick: () => this.doHeaderAction(), class: "cty-button-native" }, h("cty-icon", { key: 'fd886d9f6fd97b34e8950a1e7cc77df9d035f8f5', class: "cty-capture__close-icon", name: this.isCaptured ? this.revocationIcon : this.closeIcon })), this.captureTime && (this.isCaptured || this.capturing) && (h("span", { key: 'b03a09ae0dc739a43961bc9bbde4a6a641fb467b', class: { 'cty-media-capture__time': true, 'cty-media-capture__time-active': this.capturing } }, captureDuration))), this.isCaptured && (h("video", { key: 'a31e886e82bb680bb3a8293f43b7a4231bfa5a31', ref: el => (this.videoEl = el), class: "cty-media-capture__video", autoplay: this.autoplay, loop: this.loop, poster: this.poster, src: this.videoFileUrl, playsinline: true, "webkit-playsinline": true, controls: this.controls, onClick: e => this.toggleVideo(e) })), h("div", { key: 'ad1dc5425bd7df3aafdd2ef1b169999b784ccd44', class: "cty-media-capture__footer flex-center" }, !this.isCaptured && (h("button", { key: '7c9f565bbfb783c28743c44b27dea30ec385e8ed', class: "cty-media-capture__switch cty-button-native", onClick: () => this.doCapture() }, h("span", { key: '27099ff17056b20c3b5615a564712e82727c33e5', class: { 'cty-media-capture__status': true, 'cty-media-capture__status-active': this.capturing } }))), this.isCaptured && (h("button", { key: '693f23683121bc970cd83d6a032be0a007c827de', class: "cty-media-capture__confirm cty-button-native", onClick: () => this.confirm() }, this.confirmText))), h("slot", { key: 'c767b7dac399530e54a34e49c712aefff61af093' })));
151
+ return (h(Host, { key: 'dea0fde2e775dac71b8d627fbf72502ce8b01ac6', class: { 'cty-media-capture': true, 'cty-media-captured': this.isCaptured } }, h("div", { key: '639152bb0476a2577a91268088efd50d251c3962', class: "cty-media-capture__header" }, h("button", { key: 'a2246e49b5e58c4623b1e2d65c7d14e216be179f', onClick: () => this.doHeaderAction(), class: "cty-button-native" }, h("cty-icon", { key: 'a47c9b4f70a9ffa317e6ed165ed05098eba5198f', class: "cty-capture__close-icon", name: this.isCaptured ? this.revocationIcon : this.closeIcon })), this.captureTime && (this.isCaptured || this.capturing) && (h("span", { key: '0bd480dc6ba6963ac65c14c55b6d7d242a1b79e2', class: { 'cty-media-capture__time': true, 'cty-media-capture__time-active': this.capturing } }, captureDuration))), this.isCaptured && (h("video", { key: '9bb3ad454c63e53d6acd2968b2281a5c152a9390', ref: el => (this.videoEl = el), class: "cty-media-capture__video", autoplay: this.autoplay, loop: this.loop, poster: this.poster, src: this.videoFileUrl, playsinline: true, "webkit-playsinline": true, controls: this.controls, onClick: e => this.toggleVideo(e) })), h("div", { key: '90101389dea8e43c50dddf98c6cea75f8d324bd9', class: "cty-media-capture__footer flex-center" }, !this.isCaptured && (h("button", { key: '71f330777cdabab5829a2dbcf703ba3a40d99647', class: "cty-media-capture__switch cty-button-native", onClick: () => this.doCapture() }, h("span", { key: '6957cf9034bd74ea7ae4653557f417b2c934ee81', class: { 'cty-media-capture__status': true, 'cty-media-capture__status-active': this.capturing } }))), this.isCaptured && (h("button", { key: 'f508c7bb4cca833a13b1cfe3957a10114c92377e', class: "cty-media-capture__confirm cty-button-native", onClick: () => this.confirm() }, this.confirmText))), h("slot", { key: 'f5f99097bc702e82912865d500172f4a88966623' }), this.permissionAlertVisible && h("cty-permission-alert", { key: '07ce58f2409b15db1621343acec4a7938cc87474', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) })));
119
152
  }
120
153
  get el() { return this; }
121
154
  static get style() { return mediaCaptureCss; }
@@ -130,11 +163,15 @@ const MediaCapture = /*@__PURE__*/ proxyCustomElement(class MediaCapture extends
130
163
  "controls": [4],
131
164
  "poster": [1],
132
165
  "timeLimit": [2, "time-limit"],
166
+ "permissionAlertTitle": [1, "permission-alert-title"],
167
+ "permissionAlertContent": [1, "permission-alert-content"],
168
+ "permissionAlertbuttons": [16, "permission-alertbuttons"],
133
169
  "isCaptured": [32],
134
170
  "capturing": [32],
135
171
  "captureDuration": [32],
136
172
  "filePath": [32],
137
173
  "videoFileUrl": [32],
174
+ "permissionAlertVisible": [32],
138
175
  "startVideoCapture": [64],
139
176
  "stopVideoCapture": [64]
140
177
  }]);
@@ -142,14 +179,29 @@ function defineCustomElement$1() {
142
179
  if (typeof customElements === "undefined") {
143
180
  return;
144
181
  }
145
- const components = ["cty-media-capture", "cty-icon", "ion-icon"];
182
+ const components = ["cty-media-capture", "cty-alert", "cty-backdrop", "cty-icon", "cty-permission-alert", "ion-icon"];
146
183
  components.forEach(tagName => { switch (tagName) {
147
184
  case "cty-media-capture":
148
185
  if (!customElements.get(tagName)) {
149
186
  customElements.define(tagName, MediaCapture);
150
187
  }
151
188
  break;
189
+ case "cty-alert":
190
+ if (!customElements.get(tagName)) {
191
+ defineCustomElement$6();
192
+ }
193
+ break;
194
+ case "cty-backdrop":
195
+ if (!customElements.get(tagName)) {
196
+ defineCustomElement$5();
197
+ }
198
+ break;
152
199
  case "cty-icon":
200
+ if (!customElements.get(tagName)) {
201
+ defineCustomElement$4();
202
+ }
203
+ break;
204
+ case "cty-permission-alert":
153
205
  if (!customElements.get(tagName)) {
154
206
  defineCustomElement$3();
155
207
  }
@@ -55,7 +55,7 @@ const NoticeBar = /*@__PURE__*/ proxyCustomElement(class NoticeBar extends HTMLE
55
55
  }, 1000);
56
56
  }
57
57
  render() {
58
- return (h(Host, { key: '8fe4badffd3c26a5b90f3c70bc1266cff3e48dd7', class: "cty-notice-bar flex-align-center" }, this.startIcon && h("button", { key: '42b2ce640e0082a697aabddd09d0e8957e57bc68', part: "start", class: "cty-button-native", onClick: (e) => this.doIconAction(e, 'start') }, h("cty-icon", { key: 'fb3fbccc467ec64d367e99f7125d8b60a7c427b6', name: this.startIcon, class: "cty-notice-bar__start-icon" })), h("slot", { key: '2c87ec53addee98f6d7e3fb2bfce71fc84135851', name: 'start' }), h("div", { key: '009bc56d904bdcaf474d4030537c59a22165f1ae', class: "cty-notice-bar__wrap flex-align-center", ref: el => this.wrapRefEl = el }, h("div", { key: '1a0c6125a02b1bb298476826936461e4f77a3f79', class: { 'cty-ellipsis': !this.scrollable, 'cty-notice-bar__content': true }, ref: el => this.contentEl = el }, this.text, h("slot", { key: '4acc839afa9b5f03c62cd4db2332c3a9cbcc53a1' }))), this.endIcon && h("button", { key: '8277fc5efbf37b01c4747751d89c46e43118b068', part: "start", class: "cty-button-native", onClick: (e) => this.doIconAction(e, 'end') }, h("cty-icon", { key: 'b3b6d477bde47c77b1cfe8c14caf9b8115e0f0ac', name: this.endIcon, class: "cty-notice-bar__end-icon" })), h("slot", { key: 'c0508546a5af3fe0369562be3cc1aa77f9c7488f', name: 'end' })));
58
+ return (h(Host, { key: '69d2fe26714632a8cc1ba86a5baed8e454fb8ceb', class: "cty-notice-bar flex-align-center" }, this.startIcon && h("button", { key: '5b1de819afbc15424ecf7204cc861f69bed8e021', part: "start", class: "cty-button-native", onClick: (e) => this.doIconAction(e, 'start') }, h("cty-icon", { key: 'b79d1cbbe9d107743146f4a2329d13b82e60ea19', name: this.startIcon, class: "cty-notice-bar__start-icon" })), h("slot", { key: 'ad325087d6664d5ef7773f73c3329b280a121920', name: 'start' }), h("div", { key: '5bc22f7f060b5b130e6f38784a1c94d942997c64', class: "cty-notice-bar__wrap flex-align-center", ref: el => this.wrapRefEl = el }, h("div", { key: '4e35cade717e3244df86ac97e19369b89c2cd36f', class: { 'cty-ellipsis': !this.scrollable, 'cty-notice-bar__content': true }, ref: el => this.contentEl = el }, this.text, h("slot", { key: '609eb6474970b05f71e7c37e3631dd6efe106f3a' }))), this.endIcon && h("button", { key: '8a08f174e0725086a0153161a1b6eedaefc12219', part: "start", class: "cty-button-native", onClick: (e) => this.doIconAction(e, 'end') }, h("cty-icon", { key: '44190679ff737269165330799e2dab7f8b604d20', name: this.endIcon, class: "cty-notice-bar__end-icon" })), h("slot", { key: '7cfac5f266453d21254536461cecd83bd80c943f', name: 'end' })));
59
59
  }
60
60
  get el() { return this; }
61
61
  static get style() { return noticeBarCss; }
@@ -30,7 +30,7 @@ const PdfViewer = /*@__PURE__*/ proxyCustomElement(class PdfViewer extends HTMLE
30
30
  }
31
31
  }
32
32
  render() {
33
- return (h(Host, { key: 'aed6d8695d41419600bad134950fc019f3c0cabd', class: "cty-pdf-viewer" }, h("slot", { key: 'b450966e3adba96b285fec2a06191cb70b705fa2' })));
33
+ return (h(Host, { key: 'b9c75cd618f45e4e8a81a2c3da1a4f03639552a0', class: "cty-pdf-viewer" }, h("slot", { key: '54730034acd9237e541b7f0cff8e37aa51a38b90' })));
34
34
  }
35
35
  get el() { return this; }
36
36
  static get style() { return pdfViewerCss; }
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../dist/types/components";
2
+
3
+ interface CtyPermissionAlert extends Components.CtyPermissionAlert, HTMLElement {}
4
+ export const CtyPermissionAlert: {
5
+ prototype: CtyPermissionAlert;
6
+ new (): CtyPermissionAlert;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,6 @@
1
+ import { P as PermissionAlert, d as defineCustomElement$1 } from './permission-alert.js';
2
+
3
+ const CtyPermissionAlert = PermissionAlert;
4
+ const defineCustomElement = defineCustomElement$1;
5
+
6
+ export { CtyPermissionAlert, defineCustomElement };
@@ -19,7 +19,7 @@ const Progress = /*@__PURE__*/ proxyCustomElement(class Progress extends HTMLEle
19
19
  this.handleProgressChange(this.percentage);
20
20
  }
21
21
  render() {
22
- return (h(Host, { key: '423e3f4f656108d7f9ad7fcb736970c2991a1cf7', class: "cty-progress" }, h("span", { key: 'de8725f62c537ded20dd6792c4b09d951f453d24', class: "cty-progress__portion", style: { width: this._percentage + '%' } }), this.pivot && (h("span", { key: '6cb688a90e1f875828d895a4550732751784e163', class: "cty-progress__pivot", style: {
22
+ return (h(Host, { key: 'cd7ee00d56f7d4382bb07ddb1ee7fcd60b8e4e73', class: "cty-progress" }, h("span", { key: 'af47715016908fd6c3a56e30e25419f2a01fc3a1', class: "cty-progress__portion", style: { width: this._percentage + '%' } }), this.pivot && (h("span", { key: 'c33139bd15eeb34a3fe07399c2ef8a920acdf04c', class: "cty-progress__pivot", style: {
23
23
  left: this._percentage + '%',
24
24
  transform: 'translate(-' + (this._percentage + '%') + ',-50%)',
25
25
  } }, this.pivotText || this._percentage + '%'))));
@@ -118,7 +118,7 @@ const QuickAccess = /*@__PURE__*/ proxyCustomElement(class QuickAccess extends H
118
118
  return dataList.map((item, idx) => (h("div", { class: "cty-quick-access__list-item flex-column-center", style: { width: this.itemWidth + '%' }, onClick: () => this.clickItem(item, idx) }, item[this._props.icon] && h("cty-icon", { name: item[this._props.icon], class: "cty-quick-access__list-item-icon" }), item[this._props.image] && h("img", { src: item[this._props.image], class: "cty-quick-access__list-item-img" }), item[this._props.text] && h("div", { class: "cty-quick-access__list-item-text" }, item[this._props.text]))));
119
119
  }
120
120
  render() {
121
- return (h(Host, { key: 'da9f105f1edd62ae0907033cd4e1550264a97144', class: "cty-quick-access" }, h("slot", { key: 'bb394487a338085609ccff43ca54a90d2d33d1a8', name: "header" }), h("div", { key: 'fae0602581b0c19ad3a95cbb4424bf507943ef25', ref: el => (this.slideEl = el), class: "cty-quick-access__wrapper flex-align-start", style: { width: this.sliderTotalWidth + '%' }, onTouchStart: e => this.handleDragStart(e), onTouchMove: e => this.handleDragMove(e), onTouchEnd: () => this.handleDragEnd(), onMouseDown: e => this.handleDragStart(e), onMouseMove: e => this.handleDragMove(e), onMouseUp: () => this.handleDragEnd() }, this.list.map(dataList => (h("div", { class: "cty-quick-access__list flex-wrap" }, this.renderDataList(dataList))))), h("slot", { key: '6d06c241da55cd9ce4d06950409c0c9b33eebf47', name: "bottom" }), this.list.length > 1 && this.paper && (h("div", { key: 'c995942baa11333fa2be555d35d30169029c794d', class: "cty-quick-access__pagination flex-center" }, [...this.list.keys()].map(idx => (h("div", { class: { 'cty-quick-access__pagination-point': true, 'active': idx === this.currentPage } }))))), h("slot", { key: '197c43ef5ccf77f33abcbf552150d9955c743ddb', name: "p-bottom" })));
121
+ return (h(Host, { key: '21abcd1dbbef70659e4e01b04259b9d6b302d03f', class: "cty-quick-access" }, h("slot", { key: '4373fda4c24c656de181c1b961d92c253c19dcc1', name: "header" }), h("div", { key: '2f6258413b1e94c0463611413e9b461796198d8f', ref: el => (this.slideEl = el), class: "cty-quick-access__wrapper flex-align-start", style: { width: this.sliderTotalWidth + '%' }, onTouchStart: e => this.handleDragStart(e), onTouchMove: e => this.handleDragMove(e), onTouchEnd: () => this.handleDragEnd(), onMouseDown: e => this.handleDragStart(e), onMouseMove: e => this.handleDragMove(e), onMouseUp: () => this.handleDragEnd() }, this.list.map(dataList => (h("div", { class: "cty-quick-access__list flex-wrap" }, this.renderDataList(dataList))))), h("slot", { key: 'c463924b981ef2bcc89972d099cba6abe19838f1', name: "bottom" }), this.list.length > 1 && this.paper && (h("div", { key: 'a390fe76c1e6693ebad8bc63cb15b318579c8a76', class: "cty-quick-access__pagination flex-center" }, [...this.list.keys()].map(idx => (h("div", { class: { 'cty-quick-access__pagination-point': true, 'active': idx === this.currentPage } }))))), h("slot", { key: '8fc4482cbb1169fc8e7d65ded8f96ceb67aeeeb3', name: "p-bottom" })));
122
122
  }
123
123
  get el() { return this; }
124
124
  static get watchers() { return {
@@ -156,7 +156,7 @@ const Rate = /*@__PURE__*/ proxyCustomElement(class Rate extends HTMLElement {
156
156
  }
157
157
  }
158
158
  render() {
159
- return (h(Host, { key: '2dc67f1fea979036a8adfb4fa4b8634294086b6c', class: { 'cty-rate': true, 'cty-rate__disabled': this.disabled, 'cty-rate__readonly': this.readonly }, onTouchStart: () => this._start(), onTouchMove: (e) => this._move(e), onTouchEnd: () => this._end(), onMouseDown: () => this._start(), onMouseMove: (e) => this._move(e), onMouseUp: () => this._end() }, this.statusList.map(item => (h("div", { class: "cty-rate__item", onClick: (e) => this._doAction(e) }, h("cty-icon", { name: item.status === 'full' ? this.icon : this.voidIcon, class: { 'cty-rate__icon': true, 'cty-rate__icon-full': item.status === 'full', 'cty-rate__icon-disabled': this.disabled } }), this.half && item.value > 0 && item.value < 1 && (h("cty-icon", { name: item.status === 'void' ? this.voidIcon : this.icon, class: { 'cty-rate__icon cty-rate__icon-half': true, 'cty-rate__icon-full': item.status !== 'void', 'cty-rate__icon-disabled': this.disabled }, style: { width: item.value * 100 + '%' } })))))));
159
+ return (h(Host, { key: '4bb846f8dc1e71a95931f39f49d820c6db7f5d3c', class: { 'cty-rate': true, 'cty-rate__disabled': this.disabled, 'cty-rate__readonly': this.readonly }, onTouchStart: () => this._start(), onTouchMove: (e) => this._move(e), onTouchEnd: () => this._end(), onMouseDown: () => this._start(), onMouseMove: (e) => this._move(e), onMouseUp: () => this._end() }, this.statusList.map(item => (h("div", { class: "cty-rate__item", onClick: (e) => this._doAction(e) }, h("cty-icon", { name: item.status === 'full' ? this.icon : this.voidIcon, class: { 'cty-rate__icon': true, 'cty-rate__icon-full': item.status === 'full', 'cty-rate__icon-disabled': this.disabled } }), this.half && item.value > 0 && item.value < 1 && (h("cty-icon", { name: item.status === 'void' ? this.voidIcon : this.icon, class: { 'cty-rate__icon cty-rate__icon-half': true, 'cty-rate__icon-full': item.status !== 'void', 'cty-rate__icon-disabled': this.disabled }, style: { width: item.value * 100 + '%' } })))))));
160
160
  }
161
161
  get el() { return this; }
162
162
  static get watchers() { return {
@@ -5,10 +5,11 @@ import { e as createDelegateController, f as createTriggerController, p as prepa
5
5
  import { c as createLockController, g as getClassMap, e as enterAnimation, l as leaveAnimation } from './theme.js';
6
6
  import { r as raf } from './helpers.js';
7
7
  import { d as closeOutline } from './index2.js';
8
- import { d as defineCustomElement$8 } from './alert.js';
9
- import { d as defineCustomElement$7 } from './backdrop.js';
10
- import { d as defineCustomElement$6 } from './circle.js';
11
- import { d as defineCustomElement$5 } from './icon.js';
8
+ import { d as defineCustomElement$9 } from './alert.js';
9
+ import { d as defineCustomElement$8 } from './backdrop.js';
10
+ import { d as defineCustomElement$7 } from './circle.js';
11
+ import { d as defineCustomElement$6 } from './icon.js';
12
+ import { d as defineCustomElement$5 } from './permission-alert.js';
12
13
  import { d as defineCustomElement$4 } from './icon2.js';
13
14
  import { d as defineCustomElement$3 } from './ripple-effect.js';
14
15
  import { d as defineCustomElement$2 } from './toast.js';
@@ -41,6 +42,8 @@ const Record = /*@__PURE__*/ proxyCustomElement(class Record extends HTMLElement
41
42
  this.minSeconds = 1;
42
43
  this.circleColor = 'var(--cty-color-primary)';
43
44
  this.circleWidth = 50;
45
+ this.permissionAlertTitle = '需要申请开启麦克风权限';
46
+ this.permissionAlertContent = '需要开启麦克风权限,以便发送语音消息。我们仅在主动点击语音按钮时开启录音。';
44
47
  this.root = 'default';
45
48
  this.animated = false;
46
49
  this.recordDescription = '点击开始录音';
@@ -53,6 +56,8 @@ const Record = /*@__PURE__*/ proxyCustomElement(class Record extends HTMLElement
53
56
  this.lasttime = 0;
54
57
  this.countDownTimer = 0;
55
58
  this.audioFile = '';
59
+ this.hasPermission = deviceInfo.isMicroMessager;
60
+ this.permissionAlertVisible = false;
56
61
  this.showWarning = false;
57
62
  this.toastOptions = {
58
63
  isOpen: false,
@@ -154,7 +159,36 @@ const Record = /*@__PURE__*/ proxyCustomElement(class Record extends HTMLElement
154
159
  }
155
160
  }
156
161
  }
162
+ async requestPermission() {
163
+ if (!this.hasPermission) {
164
+ try {
165
+ this.hasPermission = await audioRecorder.hasPermission();
166
+ }
167
+ catch (error) {
168
+ this.hasPermission = false;
169
+ }
170
+ }
171
+ if (!this.hasPermission) {
172
+ try {
173
+ await audioRecorder.requestPermission();
174
+ this.hasPermission = true;
175
+ }
176
+ catch (error) {
177
+ const { code, message } = error;
178
+ if (code == 'PERMISSION_DENIED_NEED_SETTINGS') {
179
+ this.permissionAlertVisible = true;
180
+ }
181
+ else if (code != 'PERMISSION_DENIED_FIRST_TIME' && message) {
182
+ this.toastOptions = { isOpen: true, message };
183
+ }
184
+ }
185
+ }
186
+ }
157
187
  async startRecord() {
188
+ await this.requestPermission();
189
+ if (!this.hasPermission) {
190
+ return;
191
+ }
158
192
  this.recordSecond = 0;
159
193
  this.recording = true;
160
194
  this.recorded = false;
@@ -242,8 +276,22 @@ const Record = /*@__PURE__*/ proxyCustomElement(class Record extends HTMLElement
242
276
  this.dismiss();
243
277
  }
244
278
  }
279
+ async toOpenAppSetting(event) {
280
+ const { item } = event.detail;
281
+ if (item.action == 'permission') {
282
+ try {
283
+ await audioRecorder.openAppSettings();
284
+ }
285
+ catch (error) { }
286
+ this.permissionAlertVisible = false;
287
+ }
288
+ }
289
+ closePermissionAlert(e) {
290
+ e.stopPropagation();
291
+ this.permissionAlertVisible = false;
292
+ }
245
293
  render() {
246
- return (h(Host, { key: 'c4ba73a48a1bc147e056847d4ae46b203c44366c', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-backdrop", { key: '7218fe22a46c4ac3c028e46494597f36cab4ebe8', position: "bottom", backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, h("div", { key: 'a87aec16b7b82b1bde78b687b925d7b48153391e', class: "cty-record safe-area-bottom-padding flex-center-column", onClick: (e) => e.stopPropagation() }, h("slot", { key: 'eccd57954f17e968d23ea94f75d8c3802366d691', name: "header" }), this.closeable && (h("div", { key: 'cbbc613e735c0ac4e2cf135ada8d09eb54aa7d6d', class: "cty-record__close", onClick: () => this.handleCloseRecord() }, h("cty-icon", { key: '77a6c951b39ac67bf8379cbd2753fce83f59338e', name: closeOutline }))), h("p", { key: '86ab24df51b170261d59b8f96a2965affc8c4f59', class: "cty-record__desc" }, this.recordDescription), h("p", { key: 'fde15e3b3250d5426067b2ee499fc352bb9aae27', class: "cty-record__time" }, this.recordDuration), h("div", { key: '897f325e516653d08fe27a250b11a02158e9bd89', class: "cty-record__main flex-align-end-center" }, this.recorded && (h("button", { key: 'a364a0b36d7f783b722f610e55acf6a4fd68b52f', class: "cty-record__redo flex-column-center cty-button-native", onClick: () => this.restartRecording() }, h("cty-icon", { key: '3ae2d555119e0f4a6bd9108067cac53ede537cf6', name: "cty-redo", class: "flex-center" }), h("span", { key: '3174b87f43dec28f2360266f5d7d96265b35877e' }, "\u91CD\u5F55"))), !this.recording && (h("button", { key: '3613cd1f3efcaa231a1ec6ee98239df3cba5de8d', class: "cty-record__button cty-button-native", onClick: () => this.handleRecordAction() }, !this.auditioning && !this.recorded && h("cty-icon", { key: 'ee0fe4426c826face420e41fbcfece92cd892861', name: "cty-record" }), this.auditioning && this.recorded && h("cty-icon", { key: 'd58ce9dcc99395534e9413c0ef7f807421556b94', name: "cty-pause" }), !this.auditioning && this.recorded && h("cty-icon", { key: '76e18cbd690d36bae0bc7cf910aeeaf8bbfa1e46', name: "cty-play" }))), this.recording && (h("div", { key: 'c0fc560fc891395af022ffe392fb12a0bd03dbcc', class: "cty-record__recording flex-center", onClick: () => this.stopRecording() }, h("cty-circle", { key: 'ad604f13d72f3817a43f5d1de4f869f0df888658', rate: (this.recordSecond / this.maxSeconds) * 100, width: this.circleWidth, color: this.circleColor }), h("cty-icon", { key: '2f45c995452aab5a2de6c4854a13dc87594690cc', name: "cty-pause" }))), this.recorded && (h("button", { key: '7b9075d36e6662ebc486d3303f4bb0d10eee63e5', class: "cty-record__yes flex-column-center cty-button-native", onClick: () => this.confirmRecording() }, h("cty-icon", { key: 'f15efd03ccebc4162ef678788a1753fd776327ef', name: "cty-yes", class: "flex-center" }), h("span", { key: '62bcfd0bfab7c3786ec083c1648a4bf996c6ee84' }, "\u786E\u5B9A")))), !this.auditioning && !this.recorded && !this.recording && h("p", { key: 'e03781ff170a57aad3a5d45a0ce5a42cefc13ba4', class: "cty-record__send" }, "\u4EC5\u53D1\u9001\u8BED\u97F3"), (this.auditioning || this.recorded || this.recording) && h("p", { key: '656d9e3141991dc629df234e663b0134dc56296c', class: "cty-record__status" }, this.recordState))), h("ion-toast", { key: '7ae66bbecd89e30b2ad8b0026558969244ad8ee2', isOpen: this.toastOptions.isOpen, message: this.toastOptions.message, duration: 2000, position: "middle", onIonToastWillDismiss: () => (this.toastOptions.isOpen = false) }), this.showWarning && h("cty-alert", { key: '128f2bb455c95c3822a963ae32c16f9074b828f3', title: "\u53D6\u6D88\u5F55\u97F3", content: "\u786E\u5B9A\u53D6\u6D88\u672C\u6761\u5F55\u97F3\uFF1F", buttons: ['取消', '确定'], overlayIndex: 1, onCtyTap: e => this.handleAlertAction(e) }, h("button", { key: '36942f7899f78986cea3bd7844a66fa591267ab3', slot: "close", class: "cty--record__alert-close cty-button-native", onClick: () => this.showWarning = false }, h("cty-icon", { key: 'f0ee3344beed11b83af7832ed23f28b329104ff8', name: "cty-close2" })))));
294
+ return (h(Host, { key: '43324ef68b0f2e8d1a9ce076112c87432df17213', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-backdrop", { key: '45ebeab107e3af77c58e3680b8dad93b299de623', position: "bottom", backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, h("div", { key: 'd215b46f4de67b97979831404e9bb708a0b4fffe', class: "cty-record safe-area-bottom-padding flex-center-column", onClick: (e) => e.stopPropagation() }, h("slot", { key: 'b4b9ea9cfc0956436174eb43957f0d13217ec549', name: "header" }), this.closeable && (h("div", { key: 'a5ca9aadbc15f2d8e69b26acad63e4b9cb19cc37', class: "cty-record__close", onClick: () => this.handleCloseRecord() }, h("cty-icon", { key: 'ef0fa355dea771b315667761c4a0ea304ad90364', name: closeOutline }))), h("p", { key: 'bd67297dfaafcadb7f77816f1bfcf1231a59dea6', class: "cty-record__desc" }, this.recordDescription), h("p", { key: '327aa0fa2fa70dc70a9e8c91f481ddff0dd930dd', class: "cty-record__time" }, this.recordDuration), h("div", { key: 'a3f5acd54fda613ec1dbb70428dfbb64a34cc579', class: "cty-record__main flex-align-end-center" }, this.recorded && (h("button", { key: 'f6a65afcbcd1f395765df9ce2629dd4b53593f84', class: "cty-record__redo flex-column-center cty-button-native", onClick: () => this.restartRecording() }, h("cty-icon", { key: '4530c67455c3d551c16cba6a0a081a4cf9e22809', name: "cty-redo", class: "flex-center" }), h("span", { key: '4940cdee4266b61742b23ae60c78fc62c07cb09c' }, "\u91CD\u5F55"))), !this.recording && (h("button", { key: '54e3efce63bd0cdd1e96777252571e1c8945cdaa', class: "cty-record__button cty-button-native", onClick: () => this.handleRecordAction() }, !this.auditioning && !this.recorded && h("cty-icon", { key: '4cb49678c931c4f806a3e2c54b398fa0b62e56b8', name: "cty-record" }), this.auditioning && this.recorded && h("cty-icon", { key: '6ccc9e0e3a35a7a0daa50af3e2fcac2e81e44be2', name: "cty-pause" }), !this.auditioning && this.recorded && h("cty-icon", { key: 'aea60df70839e471250802a87682c293e9f9ea55', name: "cty-play" }))), this.recording && (h("div", { key: '719d50881292e5555acf44bb2047bb84d32ee3e7', class: "cty-record__recording flex-center", onClick: () => this.stopRecording() }, h("cty-circle", { key: '744b19f125e415686936d1af242ad96b7ad6508c', rate: (this.recordSecond / this.maxSeconds) * 100, width: this.circleWidth, color: this.circleColor }), h("cty-icon", { key: 'ef31ac9b11abad0f5d989c1647ce6203961cb84e', name: "cty-pause" }))), this.recorded && (h("button", { key: '50466c6883029528186cada3bb0c4a2d0bef71bf', class: "cty-record__yes flex-column-center cty-button-native", onClick: () => this.confirmRecording() }, h("cty-icon", { key: 'd5d2b82dcf94217659140b802237449ebeeddd87', name: "cty-yes", class: "flex-center" }), h("span", { key: '2a71ba3edecc390e8e246ed396665ece96154ed4' }, "\u786E\u5B9A")))), !this.auditioning && !this.recorded && !this.recording && h("p", { key: 'd10af2a0a94fed05752d36d90433e2e779253ae1', class: "cty-record__send" }, "\u4EC5\u53D1\u9001\u8BED\u97F3"), (this.auditioning || this.recorded || this.recording) && h("p", { key: '926937f8eb05e802b790d76e93936c95d1692695', class: "cty-record__status" }, this.recordState))), h("ion-toast", { key: '4590611480e2b27ecd1e0c8ac0719924252948a9', isOpen: this.toastOptions.isOpen, message: this.toastOptions.message, duration: 2000, position: "middle", onIonToastWillDismiss: () => (this.toastOptions.isOpen = false) }), this.showWarning && h("cty-alert", { key: 'bdfe00993cdb88a3a4f63292610e56b4cc6dbbf6', title: "\u53D6\u6D88\u5F55\u97F3", content: "\u786E\u5B9A\u53D6\u6D88\u672C\u6761\u5F55\u97F3\uFF1F", buttons: ['取消', '确定'], overlayIndex: 1, onCtyTap: e => this.handleAlertAction(e) }, h("button", { key: 'e34d25e615d06fde71388d50ebb0ddc47be989a9', slot: "close", class: "cty--record__alert-close cty-button-native", onClick: () => this.showWarning = false }, h("cty-icon", { key: '4c4fe78dd1011901e763bbf41cb6e40409ce70e1', name: "cty-close2" }))), this.permissionAlertVisible && h("cty-permission-alert", { key: 'dcc1d21b7b7db47a4019e87483bcc42e18ed1fe9', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) })));
247
295
  }
248
296
  get el() { return this; }
249
297
  static get watchers() { return {
@@ -260,6 +308,9 @@ const Record = /*@__PURE__*/ proxyCustomElement(class Record extends HTMLElement
260
308
  "minSeconds": [2, "min-seconds"],
261
309
  "circleColor": [1, "circle-color"],
262
310
  "circleWidth": [8, "circle-width"],
311
+ "permissionAlertTitle": [1, "permission-alert-title"],
312
+ "permissionAlertContent": [1, "permission-alert-content"],
313
+ "permissionAlertbuttons": [16, "permission-alertbuttons"],
263
314
  "root": [1],
264
315
  "animated": [4],
265
316
  "cssClass": [1, "css-class"],
@@ -273,6 +324,7 @@ const Record = /*@__PURE__*/ proxyCustomElement(class Record extends HTMLElement
273
324
  "recording": [32],
274
325
  "auditioning": [32],
275
326
  "recordSecond": [32],
327
+ "permissionAlertVisible": [32],
276
328
  "showWarning": [32],
277
329
  "toastOptions": [32],
278
330
  "present": [64],
@@ -289,7 +341,7 @@ function defineCustomElement$1() {
289
341
  if (typeof customElements === "undefined") {
290
342
  return;
291
343
  }
292
- const components = ["cty-record", "cty-alert", "cty-backdrop", "cty-circle", "cty-icon", "ion-icon", "ion-ripple-effect", "ion-toast"];
344
+ const components = ["cty-record", "cty-alert", "cty-backdrop", "cty-circle", "cty-icon", "cty-permission-alert", "ion-icon", "ion-ripple-effect", "ion-toast"];
293
345
  components.forEach(tagName => { switch (tagName) {
294
346
  case "cty-record":
295
347
  if (!customElements.get(tagName)) {
@@ -298,20 +350,25 @@ function defineCustomElement$1() {
298
350
  break;
299
351
  case "cty-alert":
300
352
  if (!customElements.get(tagName)) {
301
- defineCustomElement$8();
353
+ defineCustomElement$9();
302
354
  }
303
355
  break;
304
356
  case "cty-backdrop":
305
357
  if (!customElements.get(tagName)) {
306
- defineCustomElement$7();
358
+ defineCustomElement$8();
307
359
  }
308
360
  break;
309
361
  case "cty-circle":
310
362
  if (!customElements.get(tagName)) {
311
- defineCustomElement$6();
363
+ defineCustomElement$7();
312
364
  }
313
365
  break;
314
366
  case "cty-icon":
367
+ if (!customElements.get(tagName)) {
368
+ defineCustomElement$6();
369
+ }
370
+ break;
371
+ case "cty-permission-alert":
315
372
  if (!customElements.get(tagName)) {
316
373
  defineCustomElement$5();
317
374
  }
@@ -67,7 +67,7 @@ const SegmentSlides = /*@__PURE__*/ proxyCustomElement(class SegmentSlides exten
67
67
  return this.slidesEl.swiper;
68
68
  }
69
69
  render() {
70
- return (h(Host, { key: '4213f7b87bc6340e47b5a365b6e102a11c57df56', class: "cty-segment-slides" }, h("ion-segment", { key: '7219e32d86bc3a5009e10f05acdee3ead8f2bcb4', part: "segment", class: "cty-segment-slides__segment", value: this._slideValue, onIonChange: (e) => this.segmentChanged(e), mode: "md", style: { 'top': this._top } }, h("slot", { key: '6a2c2d61dcb53180ca3d334032f7e88e3f62b78b', name: 'segments' }), this._segments.map((item, idx) => h("ion-segment-button", { part: "segment-button", value: idx, layout: this.layout, class: "cty-segment-slides__segment-button" }, item[this._segmentProps['label']] && h("span", { class: "cty-segment-slides__segment-label" }, item[this._segmentProps['label']]), item[this._segmentProps['icon']] && h("cty-icon", { name: item[this._segmentProps['icon']], class: "cty-segment-slides__segment-icon" }), h("slot", { name: 'segment-button' + idx })))), h("swiper-container", { key: 'dc948453d173fc4531c01c07807569ee5f8676e5', part: "container", class: "cty-segment-slides__swiper-container", ref: (el) => this.slidesEl = el, observer: this.observer, observerParents: this.observerParents, resistanceRatio: '0', autoHeight: this.autoHeight, onSwiperslidechangetransitionstart: () => this.slideChange() }, this._segments.map((_, idx) => h("swiper-slide", { part: "slide", class: "cty-segment-slides__swiper-slide" }, h("slot", { name: 'content' + idx }))))));
70
+ return (h(Host, { key: 'd57bb2adf2db683a57db6c0ab0ec363287b93108', class: "cty-segment-slides" }, h("ion-segment", { key: '853398f61a1f62efc454e703e2ccc8d686947789', part: "segment", class: "cty-segment-slides__segment", value: this._slideValue, onIonChange: (e) => this.segmentChanged(e), mode: "md", style: { 'top': this._top } }, h("slot", { key: '2b37890e9c5b68c5781739308d98161fb501dc77', name: 'segments' }), this._segments.map((item, idx) => h("ion-segment-button", { part: "segment-button", value: idx, layout: this.layout, class: "cty-segment-slides__segment-button" }, item[this._segmentProps['label']] && h("span", { class: "cty-segment-slides__segment-label" }, item[this._segmentProps['label']]), item[this._segmentProps['icon']] && h("cty-icon", { name: item[this._segmentProps['icon']], class: "cty-segment-slides__segment-icon" }), h("slot", { name: 'segment-button' + idx })))), h("swiper-container", { key: 'c2776d7956c14886074ba5b88f93769d0b1e88f1', part: "container", class: "cty-segment-slides__swiper-container", ref: (el) => this.slidesEl = el, observer: this.observer, observerParents: this.observerParents, resistanceRatio: '0', autoHeight: this.autoHeight, onSwiperslidechangetransitionstart: () => this.slideChange() }, this._segments.map((_, idx) => h("swiper-slide", { part: "slide", class: "cty-segment-slides__swiper-slide" }, h("slot", { name: 'content' + idx }))))));
71
71
  }
72
72
  get el() { return this; }
73
73
  static get watchers() { return {
@@ -64,7 +64,7 @@ const Selector = /*@__PURE__*/ proxyCustomElement(class Selector extends HTMLEle
64
64
  return [this.value];
65
65
  }
66
66
  render() {
67
- return (h(Host, { key: '4294be3a3fa8169d9ad4e26c5d18b261cee659bf', role: "listbox", class: {
67
+ return (h(Host, { key: '8184ae43a40feeada061d46199df3fafced3b370', role: "listbox", class: {
68
68
  'cty-selector-grid': !!this.columns,
69
69
  }, style: { 'grid-template-columns': `repeat(${this.columns}, 1fr)` } }, this.options.map(option => {
70
70
  const valueArr = this.getValueArray();
@@ -394,7 +394,7 @@ const ShareSheet = /*@__PURE__*/ proxyCustomElement(class ShareSheet extends HTM
394
394
  this.ctyGuide.emit();
395
395
  }
396
396
  render() {
397
- return (h(Host, { key: 'ca489b414cf1c01d6ce00950d5b5dbad977a938d', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-backdrop", { key: 'ddea0259656724152216b2b1a545ed5123301372', backdropDismiss: this.backdropDismiss, position: "bottom", onCtyDismiss: () => this.dismiss() }, this.guide && this.isMicroMessager && (h("div", { key: '3f3cc0cc5b2bf12822329b976121bbbef907aef3', class: "cty-share-guide", onClick: (e) => this._doGuid(e) }, h("img", { key: '06e43710cedfcf5c14881b1fa5e20150d5dd2ded', src: this.guideImg }))), h("slot", { key: 'ae58ed4611f66cd19d4bfff5a4970ba82e19e8fc', name: "share-sheet" }), !this.hiddenSheet && (h("div", { key: 'bd0cc93dba9b9244d0155ce0f81dff3368349493', class: "cty-share-sheet safe-area-bottom-padding", onClick: (e) => e.stopPropagation() }, h("slot", { key: '553a9e3cf19d4bd6bc00c9f93526bf8d8ef61a63', name: "header" }), (this.title || this.description) && (h("div", { key: '5a5577026e2523ec2c3a6b1183234b5fe989f1b9', class: "cty-share-sheet__header", part: "header" }, this.title && h("cty-divider", { key: '8f68ea8d492fe8644fc6f9d514bc25a41d36b771' }, this.title), this.description && h("p", { key: 'fceafcb4cf9016ff3fde77a39986e13b74f464bb', class: "cty-share-sheet__description" }, this.description))), h("slot", { key: 'ac0002634cf318cd4bf88c2c4dc458b95a900045', name: "options" }), h("div", { key: '71a0bb52285b752d8e22ca2d281b390b484d1a4a', class: "cty-share-sheet__options flex", part: "options" }, this._options.map((option, idx) => (h("div", { part: "option", class: "cty-share-sheet__option flex-align-center", onClick: () => this._buttonClick(option, idx) }, option.icon && option.icon.indexOf('/') >= 0 && !option.icon.endsWith('.svg') && h("img", { class: "cty-share-sheet__img", src: option.icon }), option.icon && (option.icon.indexOf('/') < 0 || option.icon.endsWith('.svg')) && h("cty-icon", { name: option.icon, class: "cty-share-sheet__icon" }), option.title && h("span", { class: "cty-share-sheet__option-title" }, option.title), option.description && h("span", { class: "cty-share-sheet__option-description" }, option.description))))), h("slot", { key: '23f8e2859484ef5415ef7695b4fe99cdbcdf7901', name: "cancel" }), this.cancelText && (h("button", { key: '509f931694c9ca9831c569c0be252f7adec4e321', part: "cancel", class: "cty-button-native cty-share-sheet__cancel", onClick: () => this.dismiss() }, this.cancelText))))), this.showPermissionPurpose && h("cty-permission-purpose", { key: '9bb7de83692cae24dcdfb0210bfab0eff26158c7', description: this.permissionDescription }), h("ion-toast", { key: '6eebb5fafd77e5f904b1b9289972de5ecf66f245', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000 })));
397
+ return (h(Host, { key: '91ae445e5b8e6d4c4f556813c46827662c3caa71', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-backdrop", { key: '5a77795a16d71fe24a1d71295aae63a589e6349d', backdropDismiss: this.backdropDismiss, position: "bottom", onCtyDismiss: () => this.dismiss() }, this.guide && this.isMicroMessager && (h("div", { key: 'b9df03165a447b5a386104985a63599a8be14ad9', class: "cty-share-guide", onClick: (e) => this._doGuid(e) }, h("img", { key: 'd6ab14d9d8fe4c42d239460d9f3a56bd77b8f082', src: this.guideImg }))), h("slot", { key: 'cd693bc3c0fb09d05669fe4d40e44a2835346f26', name: "share-sheet" }), !this.hiddenSheet && (h("div", { key: '92834554e2db55f4e4820acbabae4295830f3d63', class: "cty-share-sheet safe-area-bottom-padding", onClick: (e) => e.stopPropagation() }, h("slot", { key: '055adadf28f9b98e367340da523b333a5a620171', name: "header" }), (this.title || this.description) && (h("div", { key: 'ca99c89598e6df644d33f96df3f7b23fcac55357', class: "cty-share-sheet__header", part: "header" }, this.title && h("cty-divider", { key: '02fddae72eb92bae8b17e8698fde6ffd6c38df21' }, this.title), this.description && h("p", { key: '4dfc9d2fc63e334d21f36615155a14de1e4a8316', class: "cty-share-sheet__description" }, this.description))), h("slot", { key: '52fbd2f38afce3445f27cc6e38d6dc16337abdfa', name: "options" }), h("div", { key: 'd845d4240a80174bd151e7d692fb5f9ab580eaf8', class: "cty-share-sheet__options flex", part: "options" }, this._options.map((option, idx) => (h("div", { part: "option", class: "cty-share-sheet__option flex-align-center", onClick: () => this._buttonClick(option, idx) }, option.icon && option.icon.indexOf('/') >= 0 && !option.icon.endsWith('.svg') && h("img", { class: "cty-share-sheet__img", src: option.icon }), option.icon && (option.icon.indexOf('/') < 0 || option.icon.endsWith('.svg')) && h("cty-icon", { name: option.icon, class: "cty-share-sheet__icon" }), option.title && h("span", { class: "cty-share-sheet__option-title" }, option.title), option.description && h("span", { class: "cty-share-sheet__option-description" }, option.description))))), h("slot", { key: 'e7f1a1873f568faf04fa8a0c881e27c370eed775', name: "cancel" }), this.cancelText && (h("button", { key: '80e5bdfb42c7c79ba96b9adfb8b37664d2ae32d6', part: "cancel", class: "cty-button-native cty-share-sheet__cancel", onClick: () => this.dismiss() }, this.cancelText))))), this.showPermissionPurpose && h("cty-permission-purpose", { key: '05109f049fcfe3f95ab56ac91c07a48ccf4a84cc', description: this.permissionDescription }), h("ion-toast", { key: '6e064a31101c1d9a29eda650b00a3b18b776b062', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000 })));
398
398
  }
399
399
  get el() { return this; }
400
400
  static get watchers() { return {
@@ -35,7 +35,7 @@ const SidePanel = /*@__PURE__*/ proxyCustomElement(class SidePanel extends HTMLE
35
35
  }, part: 'content-item' }, h("slot", { name: 'content' + index }));
36
36
  }
37
37
  render() {
38
- return (h(Host, { key: '2697433b8103652884bcba1092a949e3cf156b35', class: 'cty-side-panel flex' }, h("div", { key: 'b7cbd85e5517197b3d8353f8bf980d1eee526cde', class: 'cty-side-panel-nav', part: 'nav' }, this.sideBars.map((item, index) => this.renderNavItem(item, index))), this.singleContent && h("div", { key: '2ea136b1c3fda6186728e5523bd885caf2b75abb', class: 'cty-side-panel-content', part: 'content' }, h("slot", { key: 'f0cf620561e6d35a1d74417913ab93878cf6bef5' }), h("slot", { key: '6e8122fe4745910f3c287463703f9ba3f1e41d84', name: 'content' + this.value })), !this.singleContent && h("div", { key: 'f850b65de05afbe7f148cf2f134e1bc2ffdf48dc', class: 'cty-side-panel-content' }, this.sideBars.map((_, index) => this.renderContentItem(index)))));
38
+ return (h(Host, { key: 'd4ccbc7a5e08436a2de5474726e6f239f3617616', class: 'cty-side-panel flex' }, h("div", { key: 'a32ae0ef541d94cc380414ed716cbaaae9b837d4', class: 'cty-side-panel-nav', part: 'nav' }, this.sideBars.map((item, index) => this.renderNavItem(item, index))), this.singleContent && h("div", { key: '97633fbba588804a1f2f7e237a113c9cb5bd5453', class: 'cty-side-panel-content', part: 'content' }, h("slot", { key: '863a072aed538fffaad933dcf0d077e6c65eb9c1' }), h("slot", { key: 'b7d28b8e62ab85db1cb9b86f460a4de08b597896', name: 'content' + this.value })), !this.singleContent && h("div", { key: 'cb18b933d68e8eb54253ac25e56745dd0f31d824', class: 'cty-side-panel-content' }, this.sideBars.map((_, index) => this.renderContentItem(index)))));
39
39
  }
40
40
  get el() { return this; }
41
41
  static get style() { return sidePanelCss; }
@@ -1,7 +1,7 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { i as clamp } from './format.js';
3
3
 
4
- const stepperCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}.flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.cty-button-native{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;line-height:1;border:0;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}:host{--cty-stepper-input-width:32px;--cty-stepper-input-height:28px;--cty-stepper-input-offset:0 2px;--cty-stepper-input-padding:0;--cty-stepper-input-background:var(--cty-color-light);--cty-stepper-input-font-size:var(--cty-font-size-base);--cty-stepper-input-color:var(--cty-text-color-primary);--cty-stepper-input-disabled-background:var(--cty-color-light);--cty-stepper-input-disabled-color:var(--cty-text-color-primary);--cty-stepper-input-disabled-opacity:0.6;--cty-stepper-button-width:28px;--cty-stepper-button-height:28px;--cty-stepper-button-padding:0;--cty-stepper-button-offset:0 2px;--cty-stepper-button-color:var(--cty-text-color-primary);--cty-stepper-button-background:var(--cty-color-light);--cty-stepper-button-font-size:var(--cty-font-size-extra-large);--cty-stepper-minus-border-radius:4px 0 0 4px;--cty-stepper-plus-border-radius:0 4px 4px 0;--cty-stepper-button-disabled-color:#c8c9cc;--cty-stepper-button-disabled-background:var(--cty-color-light);--cty-stepper-button-disabled-opacity:.6;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}.cty-input-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:var(--cty-stepper-input-width);height:var(--cty-stepper-input-height);margin:var(--cty-stepper-input-offset)}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.cty-stepper_input{width:100%;height:100%;background:transparent;border:0;outline:none;text-align:center;vertical-align:middle;background:var(--cty-stepper-input-background);padding:var(--cty-stepper-input-padding);color:var(--cty-stepper-input-color);font-size:var(--cty-stepper-input-font-size)}.cty-stepper_input[disabled]{color:var(--cty-stepper-input-disabled-color);background:var(--cty-stepper-input-disabled-background);opacity:var(--cty-stepper-input-disabled-opacity);cursor:not-allowed}.cty-button-native{width:var(--cty-stepper-button-width);height:var(--cty-stepper-button-height);padding:var(--cty-stepper-button-padding);margin:var(--cty-stepper-button-offset);background:var(--cty-stepper-button-background);color:var(--cty-stepper-button-color);font-size:var(--cty-stepper-button-font-size)}.cty-button-native[disabled]{color:var(--cty-stepper-button-disabled-color);background:var(--cty-stepper-button-disabled-background);opacity:var(--cty-stepper-button-disabled-opacity);cursor:not-allowed}.cty-stepper_minus{--border-radius:var(--cty-stepper-minus-border-radius)}.cty-stepper_plus{--border-radius:var(--cty-stepper-plus-border-radius)}";
4
+ const stepperCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}.flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.cty-button-native{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;line-height:1;border:0;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}:host{--cty-stepper-input-width:32px;--cty-stepper-input-height:28px;--cty-stepper-input-offset:0 2px;--cty-stepper-input-padding:0;--cty-stepper-input-background:var(--cty-color-light);--cty-stepper-input-font-size:var(--cty-font-size-base);--cty-stepper-input-color:var(--cty-text-color-primary);--cty-stepper-input-disabled-background:var(--cty-color-light);--cty-stepper-input-disabled-color:var(--cty-text-color-primary);--cty-stepper-input-disabled-opacity:0.6;--cty-stepper-button-width:28px;--cty-stepper-button-height:28px;--cty-stepper-button-padding:0;--cty-stepper-button-offset:0 2px;--cty-stepper-button-color:var(--cty-text-color-primary);--cty-stepper-button-background:var(--cty-color-light);--cty-stepper-button-font-size:var(--cty-font-size-extra-large);--cty-stepper-minus-border-radius:4px 0 0 4px;--cty-stepper-plus-border-radius:0 4px 4px 0;--cty-stepper-button-disabled-color:#c8c9cc;--cty-stepper-button-disabled-background:var(--cty-color-light);--cty-stepper-button-disabled-opacity:.6;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center}.cty-input-wrapper{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:var(--cty-stepper-input-width);height:var(--cty-stepper-input-height);margin:var(--cty-stepper-input-offset)}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}.cty-stepper_input{width:100%;height:100%;background:transparent;border:0;outline:none;text-align:center;vertical-align:middle;background:var(--cty-stepper-input-background);padding:var(--cty-stepper-input-padding);color:var(--cty-stepper-input-color);font-size:var(--cty-stepper-input-font-size);border:var(--cty-stepper-input-border, none);border-radius:var(--cty-stepper-input-border-radius, 0)}.cty-stepper_input[disabled]{color:var(--cty-stepper-input-disabled-color);background:var(--cty-stepper-input-disabled-background);opacity:var(--cty-stepper-input-disabled-opacity);cursor:not-allowed}.cty-button-native{width:var(--cty-stepper-button-width);height:var(--cty-stepper-button-height);padding:var(--cty-stepper-button-padding);margin:var(--cty-stepper-button-offset);background:var(--cty-stepper-button-background);color:var(--cty-stepper-button-color);font-size:var(--cty-stepper-button-font-size);border:var(--cty-stepper-button-border, none)}.cty-button-native[disabled]{color:var(--cty-stepper-button-disabled-color);background:var(--cty-stepper-button-disabled-background);opacity:var(--cty-stepper-button-disabled-opacity);cursor:not-allowed}.cty-stepper_minus{border-radius:var(--cty-stepper-minus-border-radius)}.cty-stepper_plus{border-radius:var(--cty-stepper-plus-border-radius)}";
5
5
 
6
6
  const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLElement {
7
7
  constructor() {
@@ -28,6 +28,7 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
28
28
  this.plusText = '+';
29
29
  this.showPlus = true;
30
30
  this.disablePlus = false;
31
+ this.beforeChange = () => true;
31
32
  }
32
33
  componentWillLoad() {
33
34
  const value = clamp(+this.value, +this.min, +this.max);
@@ -38,6 +39,9 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
38
39
  }
39
40
  async handleMinus() {
40
41
  const { value, min, step } = this;
42
+ if (this.beforeChange && !(await this.beforeChange(+value, -step))) {
43
+ return;
44
+ }
41
45
  let newValue = this.calculateNewValue(+value, +step, 'minus');
42
46
  if (+newValue <= +min) {
43
47
  newValue = min;
@@ -48,6 +52,9 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
48
52
  }
49
53
  async handlePlus() {
50
54
  const { value, max, step } = this;
55
+ if (this.beforeChange && !(await this.beforeChange(+value, +step))) {
56
+ return;
57
+ }
51
58
  let newValue = this.calculateNewValue(+value, +step);
52
59
  if (+newValue > +max) {
53
60
  newValue = max;
@@ -95,7 +102,7 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
95
102
  return 0;
96
103
  }
97
104
  render() {
98
- return (h(Host, { key: 'd47a21dc76aa8712bce1845b09474da69a5951fb', class: "cty-stepper" }, this.showMinus && (h("button", { key: '41053878fc7fbd11248554a9e92310ce96d92d10', class: "cty-stepper_minus cty-button-native", disabled: +this.min === +this.value || this.disabled || this.disableMinus, onClick: () => this.handleMinus() }, this.minusText)), this.showInput && (h("div", { key: '6f13b1ed3f03bff1e36e6ed5cb9f213201fb4767', class: "cty-input-wrapper" }, h("input", { key: '9189e52f5f68ca91a0a78bf0e61f271137bff7a5', class: "cty-stepper_input", type: "number", disabled: this.disabled || this.disableInput, readonly: this.readonly, value: this.value, onBlur: (e) => this.handleInputBlur(e), onChange: (e) => this.handleInputChange(e), onFocus: e => this.handleFocus(e), onKeyPress: e => this.handleKeyPress(e) }))), this.showPlus && (h("button", { key: 'bb3c311791945851aac2b610d6dee05405516de3', class: "cty-stepper_plus cty-button-native", disabled: +this.max === +this.value || this.disabled || this.disablePlus, onClick: () => this.handlePlus() }, this.plusText))));
105
+ return (h(Host, { key: '49bba785b43a7bd1c8419f50f273200d73ed02dc', class: "cty-stepper" }, this.showMinus && (h("button", { key: '0945f647adb0df5224c362364f5fa4677e31c2c9', part: "minus", class: "cty-stepper_minus cty-button-native", disabled: +this.min === +this.value || this.disabled || this.disableMinus, onClick: () => this.handleMinus() }, this.minusText)), this.showInput && (h("div", { key: '3b72a9a10b41065f0996915d404933e82d6f9435', class: "cty-input-wrapper" }, h("input", { key: '41781e498b05f976de4192e4e9e5f72d24841f09', class: "cty-stepper_input", type: "number", disabled: this.disabled || this.disableInput, readonly: this.readonly, value: this.value, onBlur: (e) => this.handleInputBlur(e), onChange: (e) => this.handleInputChange(e), onFocus: e => this.handleFocus(e), onKeyPress: e => this.handleKeyPress(e), part: "input" }))), this.showPlus && (h("button", { key: '7b945de98a1c14527ff74a4818b44720bc45ec25', part: "plus", class: "cty-stepper_plus cty-button-native", disabled: +this.max === +this.value || this.disabled || this.disablePlus, onClick: () => this.handlePlus() }, this.plusText))));
99
106
  }
100
107
  get el() { return this; }
101
108
  static get style() { return stepperCss; }
@@ -115,6 +122,7 @@ const Stepper = /*@__PURE__*/ proxyCustomElement(class Stepper extends HTMLEleme
115
122
  "plusText": [1, "plus-text"],
116
123
  "showPlus": [4, "show-plus"],
117
124
  "disablePlus": [4, "disable-plus"],
125
+ "beforeChange": [16, "before-change"],
118
126
  "handleMinus": [64],
119
127
  "handlePlus": [64]
120
128
  }]);
@@ -23,7 +23,7 @@ const Steps = /*@__PURE__*/ proxyCustomElement(class Steps extends HTMLElement {
23
23
  this.ctyStepTap.emit(index);
24
24
  }
25
25
  render() {
26
- return (h(Host, { key: '8709443180e52bf0ce7416db6b06a21d6d6c1241', class: 'cty-steps cty-steps__' + this.direction }, h("div", { key: '4d68fcbe73563b20e1d5cd98782235aaeaf087fb', class: "cty-steps__items" }, h("slot", { key: 'dd8e181958ce313c7ad4436280f64c86d9b49e9d' }))));
26
+ return (h(Host, { key: '5745583e60bbf601374638b8a5f706f316a846ab', class: 'cty-steps cty-steps__' + this.direction }, h("div", { key: '72dbc47ceca5f930d42003edd69282939cbae126', class: "cty-steps__items" }, h("slot", { key: '6b252b0ded95e31c185edbfc0262f351dd7886a1' }))));
27
27
  }
28
28
  get el() { return this; }
29
29
  static get watchers() { return {
@@ -127,8 +127,8 @@ const TextEllipsis = /*@__PURE__*/ proxyCustomElement(class TextEllipsis extends
127
127
  }
128
128
  ;
129
129
  render() {
130
- return (h(Host, { key: '7ab7bb1721e7ad6fbc3cb0126dde7d759c532f62', class: "cty-text-ellipsis" }, h("span", { key: 'b7e671d517b94a10b73f68dad09974d0e4b5f688' }, this.expanded ? this.content : this.text), this.hasExpand &&
131
- h("button", { key: '48a54697fedd3d0009311286a8d1541b31d0b801', onClick: () => this.toggleExpand(), class: "cty-text-ellipsis__expand cty-button-native" }, this.expanded ? this.collapseText : this.expandText)));
130
+ return (h(Host, { key: '95f2e897086901c648bbf87de5609650be8e675c', class: "cty-text-ellipsis" }, h("span", { key: '2f4c1fd976816e9f09fcec78be781a1675a36302' }, this.expanded ? this.content : this.text), this.hasExpand &&
131
+ h("button", { key: '59fc941bb365858a6e7720e7ffe3f542496dc6b7', onClick: () => this.toggleExpand(), class: "cty-text-ellipsis__expand cty-button-native" }, this.expanded ? this.collapseText : this.expandText)));
132
132
  }
133
133
  get el() { return this; }
134
134
  static get watchers() { return {
@@ -19,7 +19,7 @@ const TitleBar = /*@__PURE__*/ proxyCustomElement(class TitleBar extends HTMLEle
19
19
  this.ctyClickEnd.emit();
20
20
  }
21
21
  render() {
22
- return (h(Host, { key: 'b960195f9d44749465c11d5cef2078f2be588154', class: "cty-title-bar flex-between" }, h("div", { key: '258b8032dde21375d1f09c5d573d45a795963006', class: "cty-title-bar-start flex-align-center" }, h("slot", { key: '30a9c84c34c471ea7ffecd266f515e42b5528b73', name: "start-icon" }, this.startIcon && h("cty-icon", { key: '8484739dd99d4f88630429c0f8a011b167fa08e4', name: this.startIcon, class: "cty-title-bar-start__icon" })), h("slot", { key: '020960115bcf36c0970b6227b197aa1ba2ba2951', name: "title" }, this.title && h("h3", { key: '15f6717cf2ca855ae72d9bceb29ef06a76eb526b', class: "cty-title-bar-title cty-ellipsis" }, this.title))), h("div", { key: '4346338ef92f6eecb2bdcbb46e93a1186f9912d1', class: "cty-title-bar-end flex-center-justify-end", onClick: () => this.clickEnd() }, h("slot", { key: '73261237d39e3961c2c838a09e4c3992ea86ed69', name: "end-text" }, this.endText && h("span", { key: '27c491fa95000c665e5460593add153ca5ff0ef9', class: "cty-title-bar-end__text" }, this.endText)), h("slot", { key: 'dc51e0b4a9b320ee77873df1aaf7c4509a2ee422', name: "end-icon" }, this.endIcon && h("cty-icon", { key: '34b5b9ff622f03afb4610d6d8eb17d954a255788', name: this.endIcon, class: "cty-title-bar-end__icon" })))));
22
+ return (h(Host, { key: 'c97b8916b8e9a74962a0aeb9186b700027150724', class: "cty-title-bar flex-between" }, h("div", { key: 'fe96befb4d176a262cdc8ff8e9613f7253ec7074', class: "cty-title-bar-start flex-align-center" }, h("slot", { key: '95500656c92be76b080a79b67b0b8e55215803c2', name: "start-icon" }, this.startIcon && h("cty-icon", { key: '9fbdf275bf289ea5fa515b306ede199c7ad5c4fe', name: this.startIcon, class: "cty-title-bar-start__icon" })), h("slot", { key: '2402ed869ec0ae482de8bb2992d98eedbe78a5eb', name: "title" }, this.title && h("h3", { key: '0da4af519b6bbe2d407ca02b660f9c25041a5a0d', class: "cty-title-bar-title cty-ellipsis" }, this.title))), h("div", { key: '8e7ac912edfbb07bcb614ff7e6d7a30163b5261a', class: "cty-title-bar-end flex-center-justify-end", onClick: () => this.clickEnd() }, h("slot", { key: '01ff584f499ede8101644ce0ca40c3358f867d54', name: "end-text" }, this.endText && h("span", { key: '7fb2410cd5c2f409f16ab5bb6400c103dd60927f', class: "cty-title-bar-end__text" }, this.endText)), h("slot", { key: '1ef2f029ec69647e6bf4c4f11fd275a9f94a26fc', name: "end-icon" }, this.endIcon && h("cty-icon", { key: '1d07a316ca0c4e6669fc0e10191e66eee893320d', name: this.endIcon, class: "cty-title-bar-end__icon" })))));
23
23
  }
24
24
  get el() { return this; }
25
25
  static get style() { return titleBarCss; }