cty-mui-core 1.0.38 → 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 (387) hide show
  1. package/components/audio-recorder.js +27 -0
  2. package/components/camera.js +109 -25
  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 +3 -3
  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 +1 -1
  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 +2 -2
  40. package/components/divider.js +2 -2
  41. package/components/icon.js +1 -1
  42. package/components/image-picker.js +56 -2
  43. package/components/image-viewer.js +1 -1
  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 +1 -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-CjkBcrrF.js → camera-preview-BylkRIcS.js} +28 -1
  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 +66 -6
  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 +3 -3
  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 +3 -3
  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 +1 -1
  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 +2 -2
  98. package/dist/cjs/{image-picker-DztF-H0P.js → image-picker-C9sdhsR_.js} +28 -1
  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 +131 -4
  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.js +3 -3
  117. package/dist/collection/components/icon/icon.js +1 -1
  118. package/dist/collection/components/image-upload/image-upload.js +1 -1
  119. package/dist/collection/components/image-viewer/image-viewer.js +1 -1
  120. package/dist/collection/components/index-bar/index-bar.js +2 -2
  121. package/dist/collection/components/keyboard/keyboard.js +1 -1
  122. package/dist/collection/components/loading/loading.js +1 -1
  123. package/dist/collection/components/media-capture/media-capture.js +98 -3
  124. package/dist/collection/components/nav-bar/nav-bar.js +1 -1
  125. package/dist/collection/components/notice-bar/notice-bar.js +1 -1
  126. package/dist/collection/components/overlay/overlay.js +1 -1
  127. package/dist/collection/components/pdf-viewer/pdf-viewer.js +1 -1
  128. package/dist/collection/components/permission-alert/permission-alert.css +57 -0
  129. package/dist/collection/components/permission-alert/permission-alert.js +196 -0
  130. package/dist/collection/components/permission-purpose/permission-purpose.js +1 -1
  131. package/dist/collection/components/progress/progress.js +1 -1
  132. package/dist/collection/components/quick-access/quick-access.js +1 -1
  133. package/dist/collection/components/rate/rate.js +1 -1
  134. package/dist/collection/components/record/record.js +113 -1
  135. package/dist/collection/components/segment-slides/segment-slides.js +1 -1
  136. package/dist/collection/components/selector/selector.js +1 -1
  137. package/dist/collection/components/share-sheet/share-sheet.js +1 -1
  138. package/dist/collection/components/side-panel/side-panel.js +1 -1
  139. package/dist/collection/components/stepper/stepper.js +1 -1
  140. package/dist/collection/components/steps/steps.js +1 -1
  141. package/dist/collection/components/swipe/swipe.js +1 -1
  142. package/dist/collection/components/swipe-item/swipe-item.js +2 -2
  143. package/dist/collection/components/swiper/swiper.js +1 -1
  144. package/dist/collection/components/text-ellipsis/text-ellipsis.js +2 -2
  145. package/dist/collection/components/title-bar/title-bar.js +1 -1
  146. package/dist/collection/components/tour/tour.js +4 -4
  147. package/dist/collection/components/tutorial/tutorial.js +1 -1
  148. package/dist/collection/components/video/video.js +2 -2
  149. package/dist/collection/components/virtual-list/virtual-list.js +2 -2
  150. package/dist/collection/index.js +1 -0
  151. package/dist/collection/utils/native/audio-recorder.js +27 -0
  152. package/dist/collection/utils/native/camera-preview.js +28 -1
  153. package/dist/collection/utils/native/image-picker.js +28 -1
  154. package/dist/collection/utils/native/media-editor.js +62 -0
  155. package/dist/collection/utils/native/video-capture.js +28 -1
  156. package/dist/cty-mui/cty-mui.esm.js +1 -1
  157. package/dist/cty-mui/index.esm.js +1 -1
  158. package/dist/cty-mui/{p-36dfb017.entry.js → p-005c9f17.entry.js} +1 -1
  159. package/dist/cty-mui/{p-b38e30aa.entry.js → p-01a57e66.entry.js} +1 -1
  160. package/dist/cty-mui/{p-7a247c3c.system.entry.js → p-0c4881aa.system.entry.js} +1 -1
  161. package/dist/cty-mui/{p-ae0063ec.system.entry.js → p-1a3bf306.system.entry.js} +1 -1
  162. package/dist/cty-mui/{p-f0ebd9ba.entry.js → p-1aca5f5b.entry.js} +1 -1
  163. package/dist/cty-mui/{p-475efd63.entry.js → p-1e4ee703.entry.js} +1 -1
  164. package/dist/cty-mui/{p-38aa5d20.entry.js → p-2005bf43.entry.js} +1 -1
  165. package/dist/cty-mui/{p-78453bfe.system.entry.js → p-20ce6b1f.system.entry.js} +1 -1
  166. package/dist/cty-mui/{p-c91ca631.system.entry.js → p-216d0332.system.entry.js} +1 -1
  167. package/dist/cty-mui/{p-e66d35a9.system.entry.js → p-222b8c9f.system.entry.js} +1 -1
  168. package/dist/cty-mui/{p-422e9688.system.entry.js → p-2236e06d.system.entry.js} +1 -1
  169. package/dist/cty-mui/p-27e63575.entry.js +1 -0
  170. package/dist/cty-mui/{p-ff973e68.system.entry.js → p-2b46cac8.system.entry.js} +1 -1
  171. package/dist/cty-mui/{p-d74dbc79.system.entry.js → p-398dc564.system.entry.js} +1 -1
  172. package/dist/cty-mui/{p-506fd54f.system.entry.js → p-3f47c7cc.system.entry.js} +1 -1
  173. package/dist/cty-mui/{p-8bfd28fc.entry.js → p-3fdb16af.entry.js} +1 -1
  174. package/dist/cty-mui/{p-2b0dc5e3.entry.js → p-4113a97c.entry.js} +1 -1
  175. package/dist/cty-mui/{p-49341ac0.system.entry.js → p-4377a67a.system.entry.js} +1 -1
  176. package/dist/cty-mui/{p-9b29ae81.system.entry.js → p-44748654.system.entry.js} +1 -1
  177. package/dist/cty-mui/{p-ff0f839d.system.entry.js → p-46c45956.system.entry.js} +1 -1
  178. package/dist/cty-mui/{p-df53aafa.entry.js → p-49712aa2.entry.js} +1 -1
  179. package/dist/cty-mui/{p-4890b69c.system.entry.js → p-49a6a0d2.system.entry.js} +1 -1
  180. package/dist/cty-mui/{p-a1909b50.system.entry.js → p-4f53841f.system.entry.js} +1 -1
  181. package/dist/cty-mui/{p-b1f6e59c.entry.js → p-5087335d.entry.js} +1 -1
  182. package/dist/cty-mui/{p-32fda949.system.entry.js → p-520f708a.system.entry.js} +1 -1
  183. package/dist/cty-mui/p-5d4ba642.system.entry.js +1 -0
  184. package/dist/cty-mui/{p-ad85921c.entry.js → p-5d57fcbf.entry.js} +1 -1
  185. package/dist/cty-mui/{p-9d07466a.system.entry.js → p-5ec43731.system.entry.js} +1 -1
  186. package/dist/cty-mui/p-608ba84c.entry.js +1 -0
  187. package/dist/cty-mui/{p-a2d2f9a3.system.entry.js → p-6179c262.system.entry.js} +1 -1
  188. package/dist/cty-mui/{p-38aa83ec.system.entry.js → p-685dc602.system.entry.js} +1 -1
  189. package/dist/cty-mui/{p-5d59f92f.system.entry.js → p-688e3d13.system.entry.js} +1 -1
  190. package/dist/cty-mui/{p-7530dbf4.entry.js → p-6a2cde81.entry.js} +1 -1
  191. package/dist/cty-mui/{p-a94a17dd.system.entry.js → p-6acaf6b0.system.entry.js} +1 -1
  192. package/dist/cty-mui/p-6b00dff7.system.entry.js +1 -0
  193. package/dist/cty-mui/{p-c374511d.entry.js → p-6b90bc73.entry.js} +1 -1
  194. package/dist/cty-mui/p-6ff6ece0.entry.js +1 -0
  195. package/dist/cty-mui/{p-c9ad48be.entry.js → p-7067cc1e.entry.js} +1 -1
  196. package/dist/cty-mui/{p-afbfb654.entry.js → p-738694f5.entry.js} +1 -1
  197. package/dist/cty-mui/{p-7da45a22.entry.js → p-79c493eb.entry.js} +1 -1
  198. package/dist/cty-mui/{p-280c5fc9.system.entry.js → p-81a6cd2f.system.entry.js} +1 -1
  199. package/dist/cty-mui/{p-019cfadb.entry.js → p-83b3627e.entry.js} +1 -1
  200. package/dist/cty-mui/{p-212b7176.entry.js → p-83e63668.entry.js} +1 -1
  201. package/dist/cty-mui/p-85a69c15.entry.js +1 -0
  202. package/dist/cty-mui/{p-6c4fd05d.system.entry.js → p-86fc18c6.system.entry.js} +1 -1
  203. package/dist/cty-mui/{p-493bcff8.system.entry.js → p-88f257ae.system.entry.js} +1 -1
  204. package/dist/cty-mui/p-8a3f8bbc.system.entry.js +1 -0
  205. package/dist/cty-mui/{p-6f8e5488.system.entry.js → p-933ae9d4.system.entry.js} +1 -1
  206. package/dist/cty-mui/{p-8a9b07aa.entry.js → p-9a3a8e96.entry.js} +1 -1
  207. package/dist/cty-mui/p-B0tecevi.system.js +1 -0
  208. package/dist/cty-mui/p-BR2ny4zu.system.js +1 -0
  209. package/dist/cty-mui/p-Bkucjxe0.js +1 -0
  210. package/dist/cty-mui/p-Bntx5BKz.js +1 -0
  211. package/dist/cty-mui/p-CElxzE6f.system.js +1 -0
  212. package/dist/cty-mui/p-CPg00410.system.js +1 -0
  213. package/dist/cty-mui/p-CeJSms5W.js +1 -0
  214. package/dist/cty-mui/p-Cegbc1c7.system.js +1 -1
  215. package/dist/cty-mui/p-CnG0E7wf.js +1 -0
  216. package/dist/cty-mui/p-D5J8bYlQ.system.js +1 -0
  217. package/dist/cty-mui/{p-63f73f69.system.entry.js → p-a0390733.system.entry.js} +1 -1
  218. package/dist/cty-mui/{p-09bacf31.entry.js → p-a0aec994.entry.js} +1 -1
  219. package/dist/cty-mui/{p-ba50ffbb.entry.js → p-a2a4f620.entry.js} +1 -1
  220. package/dist/cty-mui/p-a337c7a9.system.entry.js +1 -0
  221. package/dist/cty-mui/{p-63a9ed6a.system.entry.js → p-a68cdc7f.system.entry.js} +1 -1
  222. package/dist/cty-mui/p-a77a236d.entry.js +1 -0
  223. package/dist/cty-mui/{p-19154758.system.entry.js → p-ae133756.system.entry.js} +1 -1
  224. package/dist/cty-mui/p-aeb79634.entry.js +1 -0
  225. package/dist/cty-mui/{p-722774b8.entry.js → p-b295f647.entry.js} +1 -1
  226. package/dist/cty-mui/{p-df2367ca.system.entry.js → p-b4ad5f38.system.entry.js} +1 -1
  227. package/dist/cty-mui/{p-2788723f.entry.js → p-b6dfc8cc.entry.js} +1 -1
  228. package/dist/cty-mui/{p-b5d222a3.entry.js → p-b8350f6b.entry.js} +1 -1
  229. package/dist/cty-mui/p-bfcd0ee8.entry.js +1 -0
  230. package/dist/cty-mui/{p-ab05a712.system.entry.js → p-c997e644.system.entry.js} +1 -1
  231. package/dist/cty-mui/{p-785345b0.system.entry.js → p-cb2be37d.system.entry.js} +1 -1
  232. package/dist/cty-mui/p-ccc21f2e.entry.js +1 -0
  233. package/dist/cty-mui/{p-a4ec9006.entry.js → p-cd172ce5.entry.js} +1 -1
  234. package/dist/cty-mui/{p-6d6b6673.system.entry.js → p-d030a500.system.entry.js} +1 -1
  235. package/dist/cty-mui/{p-d390049b.system.entry.js → p-d418bc6c.system.entry.js} +1 -1
  236. package/dist/cty-mui/{p-bd9c8e43.entry.js → p-d80da6a9.entry.js} +1 -1
  237. package/dist/cty-mui/{p-d94cdb9d.entry.js → p-d91dd1fd.entry.js} +1 -1
  238. package/dist/cty-mui/{p-59c2ba2b.entry.js → p-d99e0f79.entry.js} +1 -1
  239. package/dist/cty-mui/{p-ec0106a5.system.entry.js → p-dd267090.system.entry.js} +1 -1
  240. package/dist/cty-mui/{p-3c8e24c4.system.entry.js → p-e0177323.system.entry.js} +1 -1
  241. package/dist/cty-mui/{p-f037a2aa.entry.js → p-e0bc62cf.entry.js} +1 -1
  242. package/dist/cty-mui/{p-ae61ce14.system.entry.js → p-e2ce5d7f.system.entry.js} +1 -1
  243. package/dist/cty-mui/{p-9c6a1a8e.entry.js → p-e3653feb.entry.js} +1 -1
  244. package/dist/cty-mui/{p-432bfb8b.system.entry.js → p-e3b5c1fc.system.entry.js} +1 -1
  245. package/dist/cty-mui/{p-46da49d4.entry.js → p-e8f1c2e2.entry.js} +1 -1
  246. package/dist/cty-mui/{p-1c082713.entry.js → p-e92747c2.entry.js} +1 -1
  247. package/dist/cty-mui/{p-c021a07b.entry.js → p-ed751d9b.entry.js} +1 -1
  248. package/dist/cty-mui/{p-b2a51fa6.system.entry.js → p-eff6c534.system.entry.js} +1 -1
  249. package/dist/cty-mui/{p-5524f103.system.entry.js → p-f06ed732.system.entry.js} +1 -1
  250. package/dist/cty-mui/{p-6bf50d2d.entry.js → p-f3eca262.entry.js} +1 -1
  251. package/dist/cty-mui/p-fbc7fe30.entry.js +1 -0
  252. package/dist/docs.json +624 -19
  253. package/dist/esm/{audio-recorder-CbuBJ-u7.js → audio-recorder-vTQ1Jf9u.js} +27 -0
  254. package/dist/esm/{camera-preview-khnuCOA-.js → camera-preview-Bntx5BKz.js} +28 -1
  255. package/dist/esm/cty-alert_2.entry.js +26 -67
  256. package/dist/esm/cty-camera-photo.entry.js +59 -8
  257. package/dist/esm/cty-camera_2.entry.js +66 -6
  258. package/dist/esm/cty-canvas-board.entry.js +1 -1
  259. package/dist/esm/cty-canvas-video.entry.js +1 -1
  260. package/dist/esm/cty-cascader-view.entry.js +3 -3
  261. package/dist/esm/cty-cascader.entry.js +1 -1
  262. package/dist/esm/cty-circle.entry.js +80 -0
  263. package/dist/esm/cty-count-down.entry.js +2 -2
  264. package/dist/esm/cty-divider.entry.js +2 -2
  265. package/dist/esm/cty-dropdown.entry.js +4 -4
  266. package/dist/esm/cty-empty.entry.js +1 -1
  267. package/dist/esm/cty-floating-bubble.entry.js +1 -1
  268. package/dist/esm/cty-floating-panel.entry.js +3 -3
  269. package/dist/esm/cty-icon.entry.js +1 -1
  270. package/dist/esm/cty-image-upload.entry.js +1 -1
  271. package/dist/esm/cty-image-viewer_6.entry.js +3 -3
  272. package/dist/esm/cty-index-bar.entry.js +2 -2
  273. package/dist/esm/cty-keyboard.entry.js +1 -1
  274. package/dist/esm/cty-loading.entry.js +1 -1
  275. package/dist/esm/cty-media-capture.entry.js +33 -3
  276. package/dist/esm/cty-mui.js +1 -1
  277. package/dist/esm/cty-notice-bar.entry.js +1 -1
  278. package/dist/esm/cty-overlay.entry.js +1 -1
  279. package/dist/esm/cty-pdf-viewer.entry.js +1 -1
  280. package/dist/esm/cty-permission-purpose.entry.js +1 -1
  281. package/dist/esm/cty-progress.entry.js +1 -1
  282. package/dist/esm/cty-quick-access.entry.js +1 -1
  283. package/dist/esm/cty-rate.entry.js +1 -1
  284. package/dist/esm/cty-record.entry.js +49 -2
  285. package/dist/esm/cty-segment-slides.entry.js +1 -1
  286. package/dist/esm/cty-selector.entry.js +1 -1
  287. package/dist/esm/cty-share-sheet.entry.js +1 -1
  288. package/dist/esm/cty-side-panel.entry.js +1 -1
  289. package/dist/esm/cty-stepper.entry.js +1 -1
  290. package/dist/esm/cty-steps.entry.js +1 -1
  291. package/dist/esm/cty-swipe_2.entry.js +3 -3
  292. package/dist/esm/cty-text-ellipsis.entry.js +2 -2
  293. package/dist/esm/cty-title-bar.entry.js +1 -1
  294. package/dist/esm/cty-tour.entry.js +4 -4
  295. package/dist/esm/cty-tutorial.entry.js +1 -1
  296. package/dist/esm/cty-video.entry.js +2 -2
  297. package/dist/esm/cty-virtual-list.entry.js +2 -2
  298. package/dist/esm/{image-picker-CslKfwO_.js → image-picker-0JHjPizE.js} +28 -1
  299. package/dist/esm/index.js +69 -6
  300. package/dist/esm/loader.js +1 -1
  301. package/dist/esm/{video-capture-B1wGDp4R.js → video-capture-B83C8hW9.js} +28 -1
  302. package/dist/esm-es5/audio-recorder-vTQ1Jf9u.js +1 -0
  303. package/dist/esm-es5/camera-preview-Bntx5BKz.js +1 -0
  304. package/dist/esm-es5/cty-alert_2.entry.js +1 -1
  305. package/dist/esm-es5/cty-camera-photo.entry.js +1 -1
  306. package/dist/esm-es5/cty-camera_2.entry.js +1 -1
  307. package/dist/esm-es5/cty-canvas-board.entry.js +1 -1
  308. package/dist/esm-es5/cty-canvas-video.entry.js +1 -1
  309. package/dist/esm-es5/cty-cascader-view.entry.js +1 -1
  310. package/dist/esm-es5/cty-cascader.entry.js +1 -1
  311. package/dist/esm-es5/cty-circle.entry.js +1 -0
  312. package/dist/esm-es5/cty-count-down.entry.js +1 -1
  313. package/dist/esm-es5/cty-divider.entry.js +1 -1
  314. package/dist/esm-es5/cty-dropdown.entry.js +1 -1
  315. package/dist/esm-es5/cty-empty.entry.js +1 -1
  316. package/dist/esm-es5/cty-floating-bubble.entry.js +1 -1
  317. package/dist/esm-es5/cty-floating-panel.entry.js +1 -1
  318. package/dist/esm-es5/cty-icon.entry.js +1 -1
  319. package/dist/esm-es5/cty-image-upload.entry.js +1 -1
  320. package/dist/esm-es5/cty-image-viewer_6.entry.js +1 -1
  321. package/dist/esm-es5/cty-index-bar.entry.js +1 -1
  322. package/dist/esm-es5/cty-keyboard.entry.js +1 -1
  323. package/dist/esm-es5/cty-loading.entry.js +1 -1
  324. package/dist/esm-es5/cty-media-capture.entry.js +1 -1
  325. package/dist/esm-es5/cty-mui.js +1 -1
  326. package/dist/esm-es5/cty-notice-bar.entry.js +1 -1
  327. package/dist/esm-es5/cty-overlay.entry.js +1 -1
  328. package/dist/esm-es5/cty-pdf-viewer.entry.js +1 -1
  329. package/dist/esm-es5/cty-permission-purpose.entry.js +1 -1
  330. package/dist/esm-es5/cty-progress.entry.js +1 -1
  331. package/dist/esm-es5/cty-quick-access.entry.js +1 -1
  332. package/dist/esm-es5/cty-rate.entry.js +1 -1
  333. package/dist/esm-es5/cty-record.entry.js +1 -1
  334. package/dist/esm-es5/cty-segment-slides.entry.js +1 -1
  335. package/dist/esm-es5/cty-selector.entry.js +1 -1
  336. package/dist/esm-es5/cty-share-sheet.entry.js +1 -1
  337. package/dist/esm-es5/cty-side-panel.entry.js +1 -1
  338. package/dist/esm-es5/cty-stepper.entry.js +1 -1
  339. package/dist/esm-es5/cty-steps.entry.js +1 -1
  340. package/dist/esm-es5/cty-swipe_2.entry.js +1 -1
  341. package/dist/esm-es5/cty-text-ellipsis.entry.js +1 -1
  342. package/dist/esm-es5/cty-title-bar.entry.js +1 -1
  343. package/dist/esm-es5/cty-tour.entry.js +1 -1
  344. package/dist/esm-es5/cty-tutorial.entry.js +1 -1
  345. package/dist/esm-es5/cty-video.entry.js +1 -1
  346. package/dist/esm-es5/cty-virtual-list.entry.js +1 -1
  347. package/dist/esm-es5/image-picker-0JHjPizE.js +1 -0
  348. package/dist/esm-es5/index.js +1 -1
  349. package/dist/esm-es5/loader.js +1 -1
  350. package/dist/esm-es5/video-capture-B83C8hW9.js +1 -0
  351. package/dist/types/components/camera/camera.d.ts +12 -1
  352. package/dist/types/components/camera-photo/camera-photo.d.ts +11 -1
  353. package/dist/types/components/media-capture/media-capture.d.ts +8 -0
  354. package/dist/types/components/permission-alert/permission-alert.d.ts +17 -0
  355. package/dist/types/components/record/record.d.ts +9 -0
  356. package/dist/types/components.d.ts +67 -2
  357. package/dist/types/index.d.ts +1 -0
  358. package/dist/types/utils/native/audio-recorder.d.ts +3 -0
  359. package/dist/types/utils/native/camera-preview.d.ts +3 -0
  360. package/dist/types/utils/native/image-picker.d.ts +3 -0
  361. package/dist/types/utils/native/media-editor.d.ts +45 -0
  362. package/dist/types/utils/native/video-capture.d.ts +3 -0
  363. package/package.json +1 -1
  364. package/dist/cty-mui/p-113bbc57.entry.js +0 -1
  365. package/dist/cty-mui/p-2F5bjTGm.system.js +0 -1
  366. package/dist/cty-mui/p-2aee1302.entry.js +0 -1
  367. package/dist/cty-mui/p-307f8af0.system.entry.js +0 -1
  368. package/dist/cty-mui/p-3f54848b.entry.js +0 -1
  369. package/dist/cty-mui/p-4XVRwqXU.js +0 -1
  370. package/dist/cty-mui/p-593ff7f5.system.entry.js +0 -1
  371. package/dist/cty-mui/p-62167dcd.entry.js +0 -1
  372. package/dist/cty-mui/p-6a0ca54c.system.entry.js +0 -1
  373. package/dist/cty-mui/p-71ad5b55.entry.js +0 -1
  374. package/dist/cty-mui/p-9b871c8b.entry.js +0 -1
  375. package/dist/cty-mui/p-B3jWXqo2.system.js +0 -1
  376. package/dist/cty-mui/p-BInSqJtk.system.js +0 -1
  377. package/dist/cty-mui/p-BS5AYmeF.js +0 -1
  378. package/dist/cty-mui/p-BmrwhKbs.system.js +0 -1
  379. package/dist/cty-mui/p-DTfCyY9u.system.js +0 -1
  380. package/dist/cty-mui/p-bd15bdaa.entry.js +0 -1
  381. package/dist/cty-mui/p-c46f0ac3.entry.js +0 -1
  382. package/dist/cty-mui/p-fpbYSnt8.js +0 -1
  383. package/dist/cty-mui/p-khnuCOA-.js +0 -1
  384. package/dist/esm-es5/audio-recorder-CbuBJ-u7.js +0 -1
  385. package/dist/esm-es5/camera-preview-khnuCOA-.js +0 -1
  386. package/dist/esm-es5/image-picker-CslKfwO_.js +0 -1
  387. package/dist/esm-es5/video-capture-B1wGDp4R.js +0 -1
@@ -18,10 +18,10 @@ const Divider = /*@__PURE__*/ proxyCustomElement(class Divider extends HTMLEleme
18
18
  render() {
19
19
  const { vertical, placement, hasContent } = this;
20
20
  const classRet = vertical ? `cty-divider__vertical` : hasContent ? `cty-divider__content-${placement}` : ``;
21
- return (h(Host, { key: 'b9d087dcfbc973c32966363e2db037fafe7ceb78', class: {
21
+ return (h(Host, { key: 'dfd49737a845112f77896befa6ac9926a1951f48', class: {
22
22
  'cty-divider': true,
23
23
  [classRet]: true
24
- } }, h("slot", { key: 'ee440ec8f5ff56d81bde3d950e4c78d42219582c' })));
24
+ } }, h("slot", { key: '8799145031bc0605e950b4f9d3cb6632d65fd54e' })));
25
25
  }
26
26
  get el() { return this; }
27
27
  static get style() { return dividerCss; }
@@ -40,7 +40,7 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
40
40
  }
41
41
  }
42
42
  render() {
43
- return (h(Host, { key: 'a76d38557cc02e2ed4655a270b160b2d1b4e00d8', class: "cty-icon" }, h("ion-icon", { key: 'f0ca1789733155e91316be5a287d34ff6ce7bfa9', src: this._src || undefined, name: this._name || undefined, icon: this._icon || null, size: this.size, color: this.color, lazy: this.lazy, flipRtl: this.flipRtl, sanitize: this.sanitize })));
43
+ return (h(Host, { key: '03ee82eb0f6aae454d57b5f3c09c4188c72e7a69', class: "cty-icon" }, h("ion-icon", { key: 'e31b63f0721af3ade7af2ae7bd6f4cfc3e6e15d1', src: this._src || undefined, name: this._name || undefined, icon: this._icon || null, size: this.size, color: this.color, lazy: this.lazy, flipRtl: this.flipRtl, sanitize: this.sanitize })));
44
44
  }
45
45
  static get assetsDirs() { return ["assets"]; }
46
46
  get el() { return this; }
@@ -9,10 +9,37 @@ class CTYCameraPreview {
9
9
  get isCameraPreviewAvailable() {
10
10
  return !!this.cameraPreviewPlugin;
11
11
  }
12
+ hasPermission() {
13
+ return new Promise((resolve, reject) => {
14
+ if (!this.isCameraPreviewAvailable) {
15
+ reject('Camera preview plugin is not available');
16
+ return;
17
+ }
18
+ this.cameraPreviewPlugin.hasPermission((result) => resolve(result), (error) => reject(error));
19
+ });
20
+ }
21
+ requestPermission() {
22
+ return new Promise((resolve, reject) => {
23
+ if (!this.isCameraPreviewAvailable) {
24
+ reject('Camera preview plugin is not available');
25
+ return;
26
+ }
27
+ this.cameraPreviewPlugin.requestPermission(() => resolve(), (error) => reject(error));
28
+ });
29
+ }
30
+ openAppSettings() {
31
+ return new Promise((resolve, reject) => {
32
+ if (!this.isCameraPreviewAvailable) {
33
+ reject('Camera preview plugin is not available');
34
+ return;
35
+ }
36
+ this.cameraPreviewPlugin.openAppSettings(() => resolve(), (error) => reject(error));
37
+ });
38
+ }
12
39
  startCamera(options) {
13
40
  return new Promise((resolve, reject) => {
14
41
  if (!this.isCameraPreviewAvailable) {
15
- return reject('Camera Preview plugin is not available');
42
+ return reject('Camera preview plugin is not available');
16
43
  }
17
44
  this.cameraPreviewPlugin.startCamera(options, resolve, reject);
18
45
  });
@@ -179,7 +206,7 @@ class CTYImagePicker {
179
206
  _pickMultiplePhotos(file = true, count = 1, imagePickerOptions) {
180
207
  return new Promise(async (resolve, reject) => {
181
208
  if (!this.isImagePickerAvailable) {
182
- reject('Image Picker plugin is not available');
209
+ reject('Image picker plugin is not available');
183
210
  return;
184
211
  }
185
212
  const option = {
@@ -281,6 +308,33 @@ class CTYImagePicker {
281
308
  ? this._captureSinglePhoto(file, false, imagePickerOptions)
282
309
  : this._pickMultiplePhotos(file, count, imagePickerOptions);
283
310
  }
311
+ hasPermission() {
312
+ return new Promise((resolve, reject) => {
313
+ if (!this.isImagePickerAvailable) {
314
+ reject('Image picker plugin is not available');
315
+ return;
316
+ }
317
+ this._imagePickerPlugin.hasReadPermission((result) => resolve(result), (error) => reject(error));
318
+ });
319
+ }
320
+ requestPermission() {
321
+ return new Promise((resolve, reject) => {
322
+ if (!this.isImagePickerAvailable) {
323
+ reject('Image picker plugin is not available');
324
+ return;
325
+ }
326
+ this._imagePickerPlugin.requestReadPermission((result) => resolve(result), (error) => reject(error));
327
+ });
328
+ }
329
+ openAppSettings() {
330
+ return new Promise((resolve, reject) => {
331
+ if (!this.isImagePickerAvailable) {
332
+ reject('Image picker plugin is not available');
333
+ return;
334
+ }
335
+ this._imagePickerPlugin.openAppSettings(() => resolve(), (error) => reject(error));
336
+ });
337
+ }
284
338
  getPictures(options) {
285
339
  var _a, _b, _c, _d, _e, _f;
286
340
  return (options === null || options === void 0 ? void 0 : options.camera)
@@ -114,7 +114,7 @@ const ImageViewer = /*@__PURE__*/ proxyCustomElement(class ImageViewer extends H
114
114
  autoplay: false,
115
115
  attrs: Object.assign({ virtual: true, zoom }, attrs)
116
116
  };
117
- return (h(Host, { key: 'd9d3da21d8ecb7c731a8e7c3bb155704e6dffadc', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-backdrop", { key: '7cb1028efbc4d5d14a8da901daf430973dd9c40c', backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, h("div", { key: '9b82c194f8d781abc3772c09dfb52a30cf8a265b', class: { 'cty-image-viewer': true, 'cty-image-viewer__hidden': !initialized } }, h("slot", { key: '95853407050d1cef2ae479c17ec06a5f0b6a753a', name: 'start' }), (this.closeable || this.pager || !this.backdropDismiss) && h("div", { key: '6521ce55075d33f46e0192c076e467d7d77f55c5', class: "cty-image-preview__header", onClick: (e) => e.stopPropagation() }, this.pager && h("slot", { key: '05546200bf501f41d20753abc44418f48aa58e1a', name: "pager" }, h("div", { key: 'aa995704b9b3ffed5527416a2e0e6cfb8ce3a8a4', class: "cty-image-preview__pager flex-center" }, h("h6", { key: '085ff8806423a7c103d525c8fcf292b1eb9fac4b', class: "cty-image-preview__pager-text" }, h("span", { key: 'adcaecd03e44c600655bcd1116fbeaf72ed1c69b', class: "cty-image-preview__index" }, this.activeIndex + 1), " / ", this.images.length))), (this.closeable || !this.backdropDismiss) && h("slot", { key: '7a5750169489be6345c60a34331c5db37bb23faf', name: "close" }, h("button", { key: '96f8b0ceb50f4051ed3cfb3612cd57e072efb4f1', class: "cty-image-preview__close cty-button-native", onClick: () => this.dismiss() }, h("cty-icon", { key: '7755e4c447274cfd1206a4e42135d2e04d13e439', name: "cty-close2" })))), h("cty-swiper", Object.assign({ key: '5114b309e10951e2d64341afaf3e617e0382da28', ref: (el) => this.swiperEl = el }, swiperAttrs, { onCtySlideChange: (e) => this._slideChange(e) })), h("slot", { key: 'd1d8960f1be0d8902e59b9382718d6f96734e909', name: 'end' })))));
117
+ return (h(Host, { key: '18b1464e3e7b8d103427546e83f7f02380d053de', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-backdrop", { key: 'c7914de771c49f43365bcd2271511595dd94fe4f', backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, h("div", { key: '42ecf8b9c942639eedd01286914c947bd1231aee', class: { 'cty-image-viewer': true, 'cty-image-viewer__hidden': !initialized } }, h("slot", { key: '42c9d2f8fae0ed835148e2eba6c28b219c02b040', name: 'start' }), (this.closeable || this.pager || !this.backdropDismiss) && h("div", { key: '1416c5b64c5d96d1557b1aaf485378dd26ff2925', class: "cty-image-preview__header", onClick: (e) => e.stopPropagation() }, this.pager && h("slot", { key: '62ccb2d8d005b4d958d8daa975bd593723bedbac', name: "pager" }, h("div", { key: 'df8e9d33b45cb52b622ac4b41bcef8573922eb3c', class: "cty-image-preview__pager flex-center" }, h("h6", { key: '5a77fa57b32f9000ea7678fabd4bdc32890314a0', class: "cty-image-preview__pager-text" }, h("span", { key: 'd7f8ab7eb983dc645825f66b1ba0485d1c937e92', class: "cty-image-preview__index" }, this.activeIndex + 1), " / ", this.images.length))), (this.closeable || !this.backdropDismiss) && h("slot", { key: 'c6e1d25d84545a19d829045e8b04da64f79576fa', name: "close" }, h("button", { key: 'ab92d1d5a9423cc086af1dbba7c13a11bcfb7488', class: "cty-image-preview__close cty-button-native", onClick: () => this.dismiss() }, h("cty-icon", { key: 'b2f1536e7454414af54fd9fb0f120c5855bdbfb7', name: "cty-close2" })))), h("cty-swiper", Object.assign({ key: 'd511309c54605a5ebab94c5fea3d3d63e3ff2e5c', ref: (el) => this.swiperEl = el }, swiperAttrs, { onCtySlideChange: (e) => this._slideChange(e) })), h("slot", { key: '90e5b1090d0c6454478076d453b7d3fdbdbf0e04', name: 'end' })))));
118
118
  }
119
119
  get el() { return this; }
120
120
  static get watchers() { return {
@@ -3,7 +3,8 @@ import { c as createAnimation } from './animation.js';
3
3
  import { c as config } from './config.js';
4
4
  export { s as setupConfig } from './config.js';
5
5
  export { C as CTYCityData } from './area.js';
6
- export { C as CTYStatusBar, j as addDays, k as addHours, l as addMinutes, n as addMonths, m as addSeconds, o as addYears, q as convertDate, c as convertTimeZone, i as diff, d as formatDate, f as formatDateTime, e as getFormatForDatePicker, h as getFormatForDateTimePicker, b as getTimeZone, a as getUTCDate, g as getUTCDateTime, p as isValidDate, s as secondsToVehicle, r as statusBar } from './status-bar.js';
6
+ import { f as formatDateTime } from './status-bar.js';
7
+ export { C as CTYStatusBar, j as addDays, k as addHours, l as addMinutes, n as addMonths, m as addSeconds, o as addYears, q as convertDate, c as convertTimeZone, i as diff, d as formatDate, e as getFormatForDatePicker, h as getFormatForDateTimePicker, b as getTimeZone, a as getUTCDate, g as getUTCDateTime, p as isValidDate, s as secondsToVehicle, r as statusBar } from './status-bar.js';
7
8
  export { e as checkScrollEnd, g as getElementRect, a as getEventClientCoords, b as getEventPageCoords, c as scrollElementBottom, s as scrollElementTop, d as scrollToPoint } from './dom.js';
8
9
  import { p as parseJson } from './format.js';
9
10
  export { h as camelToKebab, i as clamp, d as convertNumber, f as fileSize, k as kebabToCamel, n as numberToChinese, e as numberToLetter, a as pad, g as parseArray, b as percent, c as price, r as randomNum } from './format.js';
@@ -538,6 +539,68 @@ class CTYMediaDownloader {
538
539
  }
539
540
  const mediaDownloader = new CTYMediaDownloader();
540
541
 
542
+ class CTYMediaEditor {
543
+ get _mediaEditorPlugin() {
544
+ return window === null || window === void 0 ? void 0 : window.CTYMediaEditor;
545
+ }
546
+ ;
547
+ get isMediaEditorAvailable() {
548
+ return !!this._mediaEditorPlugin;
549
+ }
550
+ hasPermission() {
551
+ return new Promise((resolve, reject) => {
552
+ if (!this.isMediaEditorAvailable) {
553
+ reject('Media editor plugin is not available');
554
+ return;
555
+ }
556
+ this._mediaEditorPlugin.hasPermission((result) => resolve(result), (error) => reject(error));
557
+ });
558
+ }
559
+ requestPermission() {
560
+ return new Promise((resolve, reject) => {
561
+ if (!this.isMediaEditorAvailable) {
562
+ reject('Media editor plugin is not available');
563
+ return;
564
+ }
565
+ this._mediaEditorPlugin.requestPermission((result) => resolve(result), (error) => reject(error));
566
+ });
567
+ }
568
+ openAppSettings() {
569
+ return new Promise((resolve, reject) => {
570
+ if (!this.isMediaEditorAvailable) {
571
+ reject('Media editor plugin is not available');
572
+ return;
573
+ }
574
+ this._mediaEditorPlugin.openAppSettings(() => resolve(), (error) => reject(error));
575
+ });
576
+ }
577
+ videoTrsanfer(file, options = {}) {
578
+ return new Promise((resolve, reject) => {
579
+ if (!this.isMediaEditorAvailable) {
580
+ return reject('Media editor plugin is not available');
581
+ }
582
+ this._mediaEditorPlugin.transcodeVideo((outputfile) => resolve(outputfile), (err) => reject(err), Object.assign(Object.assign({ outputFileName: formatDateTime(new Date(), 'yyyyMMddHHmmss'), optimizeForNetworkUse: 1, saveToLibrary: false, videoBitrate: 1536000, audioBitrate: 64000 }, options), { fileUri: file }));
583
+ });
584
+ }
585
+ audioTrsanfer(file, options = {}) {
586
+ return new Promise((resolve, reject) => {
587
+ if (!this.isMediaEditorAvailable) {
588
+ return reject('Media editor plugin is not available');
589
+ }
590
+ this._mediaEditorPlugin.transcodeAudio((outputfile) => resolve(outputfile), (err) => reject(err), Object.assign(Object.assign({ outputFileName: formatDateTime(new Date(), 'yyyyMMddHHmmss'), optimizeForNetworkUse: 1, saveToLibrary: false, audioBitrate: 64000 }, options), { fileUri: file }));
591
+ });
592
+ }
593
+ createThumbnail(file, options = {}) {
594
+ return new Promise((resolve, reject) => {
595
+ if (!this.isMediaEditorAvailable) {
596
+ return reject('Media editor plugin is not available');
597
+ }
598
+ this._mediaEditorPlugin.createThumbnail((outputfile) => resolve(outputfile), (err) => reject(err), Object.assign(Object.assign({ outputFileName: formatDateTime(new Date(), 'yyyyMMddHHmmss'), width: 256, quality: 85 }, options), { fileUri: file }));
599
+ });
600
+ }
601
+ }
602
+ const mediaEditor = new CTYMediaEditor();
603
+
541
604
  class CTYPayment {
542
605
  constructor() {
543
606
  this._wxPayRequest = () => { };
@@ -859,4 +922,4 @@ const initialize = (userConfig = {}) => {
859
922
  CtyMUI.config = config;
860
923
  };
861
924
 
862
- export { CTYMediaDownloader, CTYPayment, CTYSpeechTranscriber, DownloadMediaType, Easing, ModalFade, ModalRotate, ModalSlide, ModalZoom, SlidePosition, deviceInfo, fromBase64, initialize, localDelete, localGet, localSave, mediaDownloader, parseJson, payment, sessionDelete, sessionGet, sessionSave, speechTranscriber, toBase64 };
925
+ export { CTYMediaDownloader, CTYMediaEditor, CTYPayment, CTYSpeechTranscriber, DownloadMediaType, Easing, ModalFade, ModalRotate, ModalSlide, ModalZoom, SlidePosition, deviceInfo, formatDateTime, fromBase64, initialize, localDelete, localGet, localSave, mediaDownloader, mediaEditor, parseJson, payment, sessionDelete, sessionGet, sessionSave, speechTranscriber, toBase64 };
@@ -30,7 +30,7 @@ const NavBar = /*@__PURE__*/ proxyCustomElement(class NavBar extends HTMLElement
30
30
  }
31
31
  render() {
32
32
  const { start, end, arrow, arrowIcon, type, title } = this;
33
- return (h(Host, { key: 'ff7972db159fcf473556893461aa207805a72c76', class: { "cty-nav-bar": true, [type ? 'cty-nav-bar__' + type : '']: true } }, h("ion-header", { key: 'a9a9b962186be4b582bdef3108cc69d68fb651bb' }, h("ion-toolbar", { key: 'f8251f81c1c7c54af88114676bc5c1e0c3f22e39', class: "cty-nav-bar__toolbar" }, start && h("ion-buttons", { key: '36b44724f2bb0c3fb915da4bfc0908c9aa4fd60b', slot: "start" }, h("slot", { key: '02f6b5dfbfb701dd0364b3340151a89e31e21c6a', name: "start" }, arrow && h("ion-button", { key: '3d2cb3a8a06bdc6daba36623d39605309d17cfa1', class: "cty-nav-bar__arrow", onClick: () => this.action() }, h("cty-icon", { key: 'c220408b1ce30c93506106659bb8f61f5e44c454', class: "cty-nav-bar__arrow-icon", name: arrowIcon })))), title && h("ion-title", { key: '57071bc0564a5f61ed31f09130cb48fb5e88651a', class: "cty-nav-bar__title" }, h("slot", { key: '9b078a46c6eef3375e31fc0a08fc2b000a344cf4', name: 'title' }, title)), end && h("ion-buttons", { key: '6c3793a53b496415abc4fd1072677f6f110dec1e', slot: "end" }, h("slot", { key: '72650d022121225a165a6d87f643a11b5982de15', name: 'end' }))))));
33
+ return (h(Host, { key: 'a6fc9f0326ad6f7b85087348d5dcf2c3c15e78af', class: { "cty-nav-bar": true, [type ? 'cty-nav-bar__' + type : '']: true } }, h("ion-header", { key: '3ae9aa93e2b76d44e6b220058a857d132966aada' }, h("ion-toolbar", { key: '4f50bd3a5c89f530fe77cec0c6d3e3c633084373', class: "cty-nav-bar__toolbar" }, start && h("ion-buttons", { key: '02d4e96017a2fc258838e5c419157b49eae51504', slot: "start" }, h("slot", { key: '30449cb63c53a8e2abc9437cf3f113e4026cc2da', name: "start" }, arrow && h("ion-button", { key: '14b8964f2cb324ca621f45cee082d6b6bdbbd57a', class: "cty-nav-bar__arrow", onClick: () => this.action() }, h("cty-icon", { key: 'a57be5da16f0724d107e971245fff1c114a2b539', class: "cty-nav-bar__arrow-icon", name: arrowIcon })))), title && h("ion-title", { key: 'd190a2101879dc404365428c274a648562212496', class: "cty-nav-bar__title" }, h("slot", { key: '8c90403204f3bf65e9e266af8dd1f52dd84dfc73', name: 'title' }, title)), end && h("ion-buttons", { key: '5ffa889f317a33713dc384ce8ec0536406917bb5', slot: "end" }, h("slot", { key: '884a69b196cb434ca350cce621de7034b9d8c49d', name: 'end' }))))));
34
34
  }
35
35
  get el() { return this; }
36
36
  static get style() { return navBarCss; }
@@ -71,7 +71,7 @@ const Overlay = /*@__PURE__*/ proxyCustomElement(class Overlay extends HTMLEleme
71
71
  render() {
72
72
  const { position } = this;
73
73
  const positionClass = position === 'top' ? 'flex-justify-center' : position === 'bottom' ? 'flex-align-end-center' : 'flex-center';
74
- return (h(Host, { key: '2c653f957c1ed316f6de63a84e33f94a2a5b0e8a', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("div", { key: 'b244774c649d6469f573bad8b761636b04977979', class: { 'cty-overlay': true, [positionClass]: true }, onClick: () => this.backdropDismiss && this.dismiss() }, h("slot", { key: 'd24737000570412b29c0f39592756ce7766c67eb' }), this.html && h("div", { key: '8b469a2a5792a1ae99ee73d3db91f5ca8256a805', innerHTML: sanitizeDOMString(this.html), onClick: (e) => e.stopPropagation() }))));
74
+ return (h(Host, { key: '0caffb1b2222a8ad595fc880a3a7e71e9206054c', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("div", { key: '87dd3ae3928adae35f4c8e1a8900fb2b06ec8182', class: { 'cty-overlay': true, [positionClass]: true }, onClick: () => this.backdropDismiss && this.dismiss() }, h("slot", { key: '7b24efb48b5ed298dbb9efa4665ab60c5250b417' }), this.html && h("div", { key: 'e9cacdc173e4f4e17d5109701c0199636c7d075e', innerHTML: sanitizeDOMString(this.html), onClick: (e) => e.stopPropagation() }))));
75
75
  }
76
76
  get el() { return this; }
77
77
  static get watchers() { return {
@@ -0,0 +1,84 @@
1
+ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
+ import { d as defineCustomElement$4 } from './alert.js';
3
+ import { d as defineCustomElement$3 } from './backdrop.js';
4
+ import { d as defineCustomElement$2 } from './icon.js';
5
+ import { d as defineCustomElement$1 } from './icon2.js';
6
+
7
+ const permissionAlertCss = ":host{--cty-permission-alert-overlay-position:fixed;--cty-permission-alert-overlay-z-index:999999;--cty-permission-alert-overlay-background:var(--cty-overlay-color);--cty-permission-alert-overlay-width:100vw;--cty-permission-alert-overlay-height:100vh;--cty-permission-alert-width:80%;--cty-permission-alert-background:var(--cty-color-white);--cty-permission-alert-padding-bottom:15px;--cty-permission-alert-padding-end:15px;--cty-permission-alert-padding-start:15px;--cty-permission-alert-padding-top:15px;--cty-permission-alert-border-radius:12px;--cty-permission-alert-title-align:flex-start;--cty-permission-alert-title-color:var(--cty-text-color-primary);--cty-permission-alert-title-size:var(--cty-font-size-medium);--cty-permission-alert-content-margin-bottom:20px;--cty-permission-alert-content-margin-top:20px;--cty-permission-alert-content-size:var(--cty-font-size-base);--cty-permission-alert-content-align:justify;--cty-permission-alert-content-color:var(--cty-text-color-primary);--cty-permission-alert-button-min-height:36px;--cty-permission-alert-button-color:var(--cty-text-color-primary);--cty-permission-alert-button-size:var(--cty-font-size-base);--cty-permission-alert-button-radius:var(--cty-border-radius-medium);--cty-permission-alert-button-primary-background:var(--cty-color-primary);--cty-permission-alert-button-primary-color:var(--cty-text-color-white)}cty-alert{--cty-alert-overlay-position:var(--cty-permission-alert-overlay-position);--cty-alert-overlay-z-index:var(--cty-permission-alert-overlay-z-index);--cty-alert-overlay-background:var(--cty-permission-alert-overlay-background);--cty-alert-overlay-width:var(--cty-permission-alert-overlay-width);--cty-alert-overlay-height:var(--cty-permission-alert-overlay-height);--cty-alert-width:var(--cty-permission-alert-width);--cty-alert-background:var(--cty-permission-alert-background);--cty-alert-padding-bottom:var(--cty-permission-alert-padding-bottom);--cty-alert-padding-end:var(--cty-permission-alert-padding-end);--cty-alert-padding-start:var(--cty-permission-alert-padding-start);--cty-alert-padding-top:var(--cty-permission-alert-padding-top);--cty-alert-border-radius:var(--cty-permission-alert-border-radius);--cty-alert-title-align:var(--cty-permission-alert-title-align);--cty-alert-title-color:var(--cty-permission-alert-title-color);--cty-alert-title-size:var(--cty-permission-alert-title-size);--cty-alert-content-margin-bottom:var(--cty-permission-alert-content-margin-bottom);--cty-alert-content-margin-top:var(--cty-permission-alert-content-margin-top);--cty-alert-content-size:var(--cty-permission-alert-content-size);--cty-alert-content-align:var(--cty-permission-alert-content-align);--cty-alert-content-color:var(--cty-permission-alert-content-color);--cty-alert-button-min-height:var(--cty-permission-alert-button-min-height);--cty-alert-button-color:var(--cty-permission-alert-button-color);--cty-alert-button-size:var(--cty-permission-alert-button-size);--cty-alert-button-radius:var(--cty-permission-alert-button-radius);--cty-alert-button-primary-background:var(--cty-permission-alert-button-primary-background);--cty-alert-button-primary-color:var(--cty-permission-alert-button-primary-color)}";
8
+
9
+ const PermissionAlert = /*@__PURE__*/ proxyCustomElement(class PermissionAlert extends HTMLElement {
10
+ constructor() {
11
+ super();
12
+ this.__registerHost();
13
+ this.__attachShadow();
14
+ this.ctyDismiss = createEvent(this, "ctyDismiss", 7);
15
+ this.ctyTap = createEvent(this, "ctyTap", 7);
16
+ this.backdropDismiss = false;
17
+ this.title = '需要申请相机权限';
18
+ this.content = '需要开启相机权限,用于拍照、扫码或视频聊天。我们承诺仅在功能使用时调用摄像头。';
19
+ this.closeable = false;
20
+ this.buttons = [{
21
+ text: '取消',
22
+ action: 'cancel'
23
+ }, {
24
+ text: '去打开',
25
+ action: 'permission'
26
+ }];
27
+ }
28
+ _buttonClick(event) {
29
+ event.stopPropagation();
30
+ const { item, index } = event.detail;
31
+ if (item.action !== 'cancel') {
32
+ this.ctyTap.emit({ item, index });
33
+ }
34
+ }
35
+ _dismiss() {
36
+ this.ctyDismiss.emit();
37
+ }
38
+ render() {
39
+ return (h(Host, { key: '56a3795cba4d50f34250ae7bd6a95cd1f9aeb8be' }, h("cty-alert", { key: '30d8a9b62d7cb7c391a746755dbecdaef347ada0', part: "permission-alert", class: "cty-permission-alert", animated: false, overlayIndex: 1, backdropDismiss: this.backdropDismiss, title: this.title, content: this.content, closeable: this.closeable, buttons: this.buttons, onCtyTap: (e) => this._buttonClick(e), onCtyDismiss: () => this._dismiss() }, h("slot", { key: 'e661dd93f220462e2478233fce1a887bb6ac57d3', name: "header", slot: "header" }), h("slot", { key: '128a5f263a932e9c5263c51fccd6f2a67ef1cc49', name: "content", slot: "content" }), h("slot", { key: 'bfefd5cdb9c04a6fb3b13f1e4ea21d3b1a1b3dae', name: "buttons", slot: "buttons" }))));
40
+ }
41
+ get el() { return this; }
42
+ static get style() { return permissionAlertCss; }
43
+ }, [1, "cty-permission-alert", {
44
+ "backdropDismiss": [4, "backdrop-dismiss"],
45
+ "title": [1],
46
+ "content": [1],
47
+ "closeable": [4],
48
+ "buttons": [16]
49
+ }]);
50
+ function defineCustomElement() {
51
+ if (typeof customElements === "undefined") {
52
+ return;
53
+ }
54
+ const components = ["cty-permission-alert", "cty-alert", "cty-backdrop", "cty-icon", "ion-icon"];
55
+ components.forEach(tagName => { switch (tagName) {
56
+ case "cty-permission-alert":
57
+ if (!customElements.get(tagName)) {
58
+ customElements.define(tagName, PermissionAlert);
59
+ }
60
+ break;
61
+ case "cty-alert":
62
+ if (!customElements.get(tagName)) {
63
+ defineCustomElement$4();
64
+ }
65
+ break;
66
+ case "cty-backdrop":
67
+ if (!customElements.get(tagName)) {
68
+ defineCustomElement$3();
69
+ }
70
+ break;
71
+ case "cty-icon":
72
+ if (!customElements.get(tagName)) {
73
+ defineCustomElement$2();
74
+ }
75
+ break;
76
+ case "ion-icon":
77
+ if (!customElements.get(tagName)) {
78
+ defineCustomElement$1();
79
+ }
80
+ break;
81
+ } });
82
+ }
83
+
84
+ export { PermissionAlert as P, defineCustomElement as d };
@@ -17,7 +17,7 @@ const PermissionPurpose = /*@__PURE__*/ proxyCustomElement(class PermissionPurpo
17
17
  this.ctyDismiss.emit();
18
18
  }
19
19
  render() {
20
- return (h(Host, { key: 'fcee182b206b8003aab0cc84c497546f8e370ba9' }, h("cty-backdrop", { key: '92558bbececb709c932fdd065841857aec17ac56', backdropDismiss: this.backdropDismiss, position: "top", onCtyDismiss: () => this.dismiss() }, h("div", { key: '9135da9c7bb7bcfc76732f4418a247de43178c95', class: "cty-permission-purpose", onClick: (e) => e.stopPropagation() }, h("div", { key: 'bfd5d2f8613a259bc9906fcd2ef2a6f35791fda5', innerHTML: sanitizeDOMString(this.description) })))));
20
+ return (h(Host, { key: 'bca028072a8313b0f7b774ec6693703def84181a' }, h("cty-backdrop", { key: '3a2d92e7474c23706fe520486d456d5768ccdf9f', backdropDismiss: this.backdropDismiss, position: "top", onCtyDismiss: () => this.dismiss() }, h("div", { key: 'f5d1bb932f282961ca9afc377a08b3651e20e131', class: "cty-permission-purpose", onClick: (e) => e.stopPropagation() }, h("div", { key: '91e475575512cac998bf5d3d67311e455c85c413', innerHTML: sanitizeDOMString(this.description) })))));
21
21
  }
22
22
  get el() { return this; }
23
23
  static get style() { return permissionPurposeCss; }
@@ -31,10 +31,10 @@ const SwipeItem = /*@__PURE__*/ proxyCustomElement(class SwipeItem extends HTMLE
31
31
  }
32
32
  render() {
33
33
  const { offset, size, vertical } = this;
34
- return (h(Host, { key: '631e407d2661497dfb58ff50670a8bde7441d16d', class: "cty-swipe-item", style: {
34
+ return (h(Host, { key: '4c2d804a0671caac64268f336b33beeb21cb4385', class: "cty-swipe-item", style: {
35
35
  [vertical ? 'height' : 'width']: `${size}px`,
36
36
  transform: `translate${vertical ? 'Y' : 'X'}(${offset}px)`
37
- } }, h("slot", { key: 'c77e15f1939c9c135ae9d830dc3edd916c2f4e79' })));
37
+ } }, h("slot", { key: '0622753fe67dbc647b4381c6ead2ceb51303b3b7' })));
38
38
  }
39
39
  get el() { return this; }
40
40
  static get style() { return swipeItemCss; }
@@ -292,7 +292,7 @@ const Swipe = /*@__PURE__*/ proxyCustomElement(class Swipe extends HTMLElement {
292
292
  'transform': `translate${vertical ? 'Y' : 'X'}(${+offset.toFixed(2)}px)`,
293
293
  [vertical ? 'height' : 'width']: `${this.trackSize}px`,
294
294
  };
295
- return (h(Host, { key: 'f240c203838a93190a420255c3452a337df2e91a', class: "cty-swipe" }, h("slot", { key: '26b235adeda1724ed051ee45ce9466e1807a9815', name: "start" }), h("div", { key: '8f968e7bcaa818d4a71924c976fd2e62315e3fdb', class: { 'cty-swipe__track': true, 'cty-swipe__track-vertical': this.vertical }, style: style, onTouchStart: (e) => this.onTouchStart(e), onTouchMove: (e) => this.onTouchMove(e), onTouchEnd: (e) => this.onTouchEnd(e), onTouchCancel: (e) => this.onTouchEnd(e), onMouseDown: (e) => this.onTouchStart(e), onMouseMove: (e) => this.onTouchMove(e), onMouseUp: (e) => this.onTouchEnd(e), onMouseLeave: (e) => this.onTouchEnd(e) }, h("slot", { key: '8f8b7a51ce82dc5aca5f3201cd1e227a5da23a3c', onSlotchange: () => this.slotChanged() })), this.indicator && this.renderIndicator(), h("slot", { key: 'c343f6ec58126dbeb1024811c0f54b4e875bf352', name: "end" })));
295
+ return (h(Host, { key: '7c43fa74ff636ccb9f561bfe46b9b295742ac894', class: "cty-swipe" }, h("slot", { key: 'c66ee224e75363811866d2b70a41b27c3a1424eb', name: "start" }), h("div", { key: '015662e04b5ec9b5d3b76757de25e2c52c721557', class: { 'cty-swipe__track': true, 'cty-swipe__track-vertical': this.vertical }, style: style, onTouchStart: (e) => this.onTouchStart(e), onTouchMove: (e) => this.onTouchMove(e), onTouchEnd: (e) => this.onTouchEnd(e), onTouchCancel: (e) => this.onTouchEnd(e), onMouseDown: (e) => this.onTouchStart(e), onMouseMove: (e) => this.onTouchMove(e), onMouseUp: (e) => this.onTouchEnd(e), onMouseLeave: (e) => this.onTouchEnd(e) }, h("slot", { key: 'f60a25a27fe96cd1cd010260fff0c094750688e7', onSlotchange: () => this.slotChanged() })), this.indicator && this.renderIndicator(), h("slot", { key: '545e73e9347b1b3319bbb258287461360d13cd10', name: "end" })));
296
296
  }
297
297
  get el() { return this; }
298
298
  static get style() { return swipeCss; }
@@ -95,7 +95,7 @@ const Swiper = /*@__PURE__*/ proxyCustomElement(class Swiper extends HTMLElement
95
95
  return this._swiper;
96
96
  }
97
97
  render() {
98
- return (h(Host, { key: '4bc163a19d9de3da948d9e9e43187a7988f7ba77', class: "cty-swiper" }, h("swiper-container", Object.assign({ key: '2f7305306bca0280f5f7c0b6fa34ab03a0a48e40', class: "cty-swipe__container", ref: (el) => this.swiperEl = el, autoplay: this.autoplay, modules: this.swiperModules, direction: this.direction, loop: this.loop, pagination: this.pagination, observer: this.observer, "observer-parents": this.observerParents, onSwiperslidechangetransitionend: () => this.slideChange(), onSwiperclick: () => this.slideClick() }, this.attrs), this._swipers.map((item, idx) => h("swiper-slide", { class: "cty-swipe__slide" }, h("slot", { name: idx + '' }, h("div", { class: "swiper-zoom-container" }, h("img", { src: item[this.props.pic], alt: item[this.props.alt || ''] || '', onClick: (e) => e.stopPropagation() }))))), h("slot", { key: '172723c51e7f45fab45b1e51f5d8c7b373cdad09', name: "container-start", slot: "container-start" }), h("slot", { key: '67c6bfb010250ff902e59e47ca9c3a8a6608e0e6', name: "container-end", slot: "container-end" }))));
98
+ return (h(Host, { key: '4279a041c842204c199d6ebc251f44128f0e3b65', class: "cty-swiper" }, h("swiper-container", Object.assign({ key: '61fa76ec459f33c92504fec0d3cdd9465e882b19', class: "cty-swipe__container", ref: (el) => this.swiperEl = el, autoplay: this.autoplay, modules: this.swiperModules, direction: this.direction, loop: this.loop, pagination: this.pagination, observer: this.observer, "observer-parents": this.observerParents, onSwiperslidechangetransitionend: () => this.slideChange(), onSwiperclick: () => this.slideClick() }, this.attrs), this._swipers.map((item, idx) => h("swiper-slide", { class: "cty-swipe__slide" }, h("slot", { name: idx + '' }, h("div", { class: "swiper-zoom-container" }, h("img", { src: item[this.props.pic], alt: item[this.props.alt || ''] || '', onClick: (e) => e.stopPropagation() }))))), h("slot", { key: 'be071f0b3e5059921d8febb081456659816e8765', name: "container-start", slot: "container-start" }), h("slot", { key: 'eb6160945f271cccb52bcdad7977f38dbda3552e', name: "container-end", slot: "container-end" }))));
99
99
  }
100
100
  get el() { return this; }
101
101
  static get watchers() { return {
@@ -9,6 +9,33 @@ class CTYVideoCapture {
9
9
  get isVideoCaptureAvailable() {
10
10
  return !!this._videoCapturePlugin;
11
11
  }
12
+ hasPermission() {
13
+ return new Promise((resolve, reject) => {
14
+ if (!this.isVideoCaptureAvailable) {
15
+ reject('Video capture plugin is not available');
16
+ return;
17
+ }
18
+ this._videoCapturePlugin.hasCapturePermission((result) => resolve(result), (error) => reject(error));
19
+ });
20
+ }
21
+ requestPermission() {
22
+ return new Promise((resolve, reject) => {
23
+ if (!this.isVideoCaptureAvailable) {
24
+ reject('Video capture plugin is not available');
25
+ return;
26
+ }
27
+ this._videoCapturePlugin.requestCapturePermission((result) => resolve(result), (error) => reject(error));
28
+ });
29
+ }
30
+ openAppSettings() {
31
+ return new Promise((resolve, reject) => {
32
+ if (!this.isVideoCaptureAvailable) {
33
+ reject('Video capture plugin is not available');
34
+ return;
35
+ }
36
+ this._videoCapturePlugin.openAppSettings(() => resolve(), (error) => reject(error));
37
+ });
38
+ }
12
39
  captureVideo(options) {
13
40
  return new Promise((resolve, reject) => {
14
41
  if (!this.isVideoCaptureAvailable) {
@@ -24,7 +51,7 @@ class CTYVideoCapture {
24
51
  else {
25
52
  resolve(null);
26
53
  }
27
- }, Object.assign({ width: 1280 }, options));
54
+ }, reject, Object.assign({ width: 1280 }, options));
28
55
  }
29
56
  catch (error) {
30
57
  reject(error);
@@ -77,6 +77,33 @@ class CTYAudioRecorder {
77
77
  }
78
78
  });
79
79
  }
80
+ hasPermission() {
81
+ return new Promise((resolve, reject) => {
82
+ if (!this.isAudioRecorderAvailable) {
83
+ reject('Audio recorder plugin is not available');
84
+ return;
85
+ }
86
+ this._audioRecorderPlugin.hasPermission((result) => resolve(result), (error) => reject(error));
87
+ });
88
+ }
89
+ requestPermission() {
90
+ return new Promise((resolve, reject) => {
91
+ if (!this.isAudioRecorderAvailable) {
92
+ reject('Audio recorder plugin is not available');
93
+ return;
94
+ }
95
+ this._audioRecorderPlugin.requestPermission(() => resolve(), (error) => reject(error));
96
+ });
97
+ }
98
+ openAppSettings() {
99
+ return new Promise((resolve, reject) => {
100
+ if (!this.isAudioRecorderAvailable) {
101
+ reject('Audio recorder plugin is not available');
102
+ return;
103
+ }
104
+ this._audioRecorderPlugin.openAppSettings(() => resolve(), (error) => reject(error));
105
+ });
106
+ }
80
107
  uploadWxRecording(localId, tip = exports.UploadProgressTip.SHOW) {
81
108
  return new Promise((resolve, reject) => {
82
109
  try {
@@ -8,10 +8,37 @@ class CTYCameraPreview {
8
8
  get isCameraPreviewAvailable() {
9
9
  return !!this.cameraPreviewPlugin;
10
10
  }
11
+ hasPermission() {
12
+ return new Promise((resolve, reject) => {
13
+ if (!this.isCameraPreviewAvailable) {
14
+ reject('Camera preview plugin is not available');
15
+ return;
16
+ }
17
+ this.cameraPreviewPlugin.hasPermission((result) => resolve(result), (error) => reject(error));
18
+ });
19
+ }
20
+ requestPermission() {
21
+ return new Promise((resolve, reject) => {
22
+ if (!this.isCameraPreviewAvailable) {
23
+ reject('Camera preview plugin is not available');
24
+ return;
25
+ }
26
+ this.cameraPreviewPlugin.requestPermission(() => resolve(), (error) => reject(error));
27
+ });
28
+ }
29
+ openAppSettings() {
30
+ return new Promise((resolve, reject) => {
31
+ if (!this.isCameraPreviewAvailable) {
32
+ reject('Camera preview plugin is not available');
33
+ return;
34
+ }
35
+ this.cameraPreviewPlugin.openAppSettings(() => resolve(), (error) => reject(error));
36
+ });
37
+ }
11
38
  startCamera(options) {
12
39
  return new Promise((resolve, reject) => {
13
40
  if (!this.isCameraPreviewAvailable) {
14
- return reject('Camera Preview plugin is not available');
41
+ return reject('Camera preview plugin is not available');
15
42
  }
16
43
  this.cameraPreviewPlugin.startCamera(options, resolve, reject);
17
44
  });
@@ -107,82 +107,41 @@ const Alert = class {
107
107
  };
108
108
  Alert.style = alertCss;
109
109
 
110
- const circleCss = "*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}:host{display:inline-block;position:relative;width:100px;height:100px;--cty-circle-fill:none;--cty-circle-color:var(--cty-color-white);--cty-circle-linecap:round;--cty-circle-rotate:0deg;--cty-circle-text-color:var(--cty-color-primary);--cty-circle-text-size:var(--cty-font-size-base);--cty-circle-text-weight:normal;--cty-circle-text-line-height:20px}svg{position:absolute;top:0;left:0;width:100%;height:100%;-webkit-transform:rotate(var(--cty-circle-rotate));transform:rotate(var(--cty-circle-rotate))}path{fill:none}.cty-circle__layer{stroke:var(--cty-circle-color);fill:var(--cty-circle-fill)}.cty-circle__hover{stroke-linecap:var(--cty-circle-linecap)}.cty-circle__text{position:absolute;top:50%;left:0;width:100%;color:var(--cty-circle-text-color);font-weight:var(--cty-circle-text-weight);font-size:var(--cty-circle-text-size);line-height:var(--cty-circle-text-line-height);text-align:center;-webkit-transform:translateY(-50%);transform:translateY(-50%)}";
110
+ const permissionAlertCss = ":host{--cty-permission-alert-overlay-position:fixed;--cty-permission-alert-overlay-z-index:999999;--cty-permission-alert-overlay-background:var(--cty-overlay-color);--cty-permission-alert-overlay-width:100vw;--cty-permission-alert-overlay-height:100vh;--cty-permission-alert-width:80%;--cty-permission-alert-background:var(--cty-color-white);--cty-permission-alert-padding-bottom:15px;--cty-permission-alert-padding-end:15px;--cty-permission-alert-padding-start:15px;--cty-permission-alert-padding-top:15px;--cty-permission-alert-border-radius:12px;--cty-permission-alert-title-align:flex-start;--cty-permission-alert-title-color:var(--cty-text-color-primary);--cty-permission-alert-title-size:var(--cty-font-size-medium);--cty-permission-alert-content-margin-bottom:20px;--cty-permission-alert-content-margin-top:20px;--cty-permission-alert-content-size:var(--cty-font-size-base);--cty-permission-alert-content-align:justify;--cty-permission-alert-content-color:var(--cty-text-color-primary);--cty-permission-alert-button-min-height:36px;--cty-permission-alert-button-color:var(--cty-text-color-primary);--cty-permission-alert-button-size:var(--cty-font-size-base);--cty-permission-alert-button-radius:var(--cty-border-radius-medium);--cty-permission-alert-button-primary-background:var(--cty-color-primary);--cty-permission-alert-button-primary-color:var(--cty-text-color-white)}cty-alert{--cty-alert-overlay-position:var(--cty-permission-alert-overlay-position);--cty-alert-overlay-z-index:var(--cty-permission-alert-overlay-z-index);--cty-alert-overlay-background:var(--cty-permission-alert-overlay-background);--cty-alert-overlay-width:var(--cty-permission-alert-overlay-width);--cty-alert-overlay-height:var(--cty-permission-alert-overlay-height);--cty-alert-width:var(--cty-permission-alert-width);--cty-alert-background:var(--cty-permission-alert-background);--cty-alert-padding-bottom:var(--cty-permission-alert-padding-bottom);--cty-alert-padding-end:var(--cty-permission-alert-padding-end);--cty-alert-padding-start:var(--cty-permission-alert-padding-start);--cty-alert-padding-top:var(--cty-permission-alert-padding-top);--cty-alert-border-radius:var(--cty-permission-alert-border-radius);--cty-alert-title-align:var(--cty-permission-alert-title-align);--cty-alert-title-color:var(--cty-permission-alert-title-color);--cty-alert-title-size:var(--cty-permission-alert-title-size);--cty-alert-content-margin-bottom:var(--cty-permission-alert-content-margin-bottom);--cty-alert-content-margin-top:var(--cty-permission-alert-content-margin-top);--cty-alert-content-size:var(--cty-permission-alert-content-size);--cty-alert-content-align:var(--cty-permission-alert-content-align);--cty-alert-content-color:var(--cty-permission-alert-content-color);--cty-alert-button-min-height:var(--cty-permission-alert-button-min-height);--cty-alert-button-color:var(--cty-permission-alert-button-color);--cty-alert-button-size:var(--cty-permission-alert-button-size);--cty-alert-button-radius:var(--cty-permission-alert-button-radius);--cty-alert-button-primary-background:var(--cty-permission-alert-button-primary-background);--cty-alert-button-primary-color:var(--cty-permission-alert-button-primary-color)}";
111
111
 
112
- const Circle = class {
112
+ const PermissionAlert = class {
113
113
  constructor(hostRef) {
114
114
  index.registerInstance(this, hostRef);
115
- this.rate = 0;
116
- this.width = 40;
117
- this.color = 'var(--cty-color-primary)';
118
- this.text = '';
119
- this.clockwise = true;
120
- this.zeroTransparent = true;
121
- this.rad = 500;
122
- this.ratio = 1;
123
- this.widthDif = 1;
124
- this.offset = 0;
125
- this.needDefs = false;
126
- this.gradientId = '';
127
- this.colors = [];
128
- this.perimeter = 0;
129
- }
130
- watchColorHandler() {
131
- this.needDefs = this.color instanceof Object;
132
- if (this.needDefs) {
133
- this.colors = Object.keys(this.color).sort((a, b) => parseFloat(a) - parseFloat(b)).map((key) => ({
134
- offset: key.toString(),
135
- color: this.color[key]
136
- }));
137
- this.updateSVGAttr();
115
+ this.ctyDismiss = index.createEvent(this, "ctyDismiss", 7);
116
+ this.ctyTap = index.createEvent(this, "ctyTap", 7);
117
+ this.backdropDismiss = false;
118
+ this.title = '需要申请相机权限';
119
+ this.content = '需要开启相机权限,用于拍照、扫码或视频聊天。我们承诺仅在功能使用时调用摄像头。';
120
+ this.closeable = false;
121
+ this.buttons = [{
122
+ text: '取消',
123
+ action: 'cancel'
124
+ }, {
125
+ text: '去打开',
126
+ action: 'permission'
127
+ }];
128
+ }
129
+ _buttonClick(event) {
130
+ event.stopPropagation();
131
+ const { item, index } = event.detail;
132
+ if (item.action !== 'cancel') {
133
+ this.ctyTap.emit({ item, index });
138
134
  }
139
135
  }
140
- watchRadHandler() {
141
- this.perimeter = 2 * 3.14 * this.rad;
142
- this.updateSVGAttr();
143
- }
144
- updateSVGAttr() {
145
- var _a, _b, _c, _d;
146
- (_a = this.svgEl) === null || _a === void 0 ? void 0 : _a.setAttribute('viewBox', `0 0 ${+this.width + this.rad * 2 + this.offset * 2} ${+this.width + this.rad * 2 + this.offset * 2}`);
147
- (_b = this.layerEl) === null || _b === void 0 ? void 0 : _b.setAttribute('d', this._getPath());
148
- (_c = this.hoverEl) === null || _c === void 0 ? void 0 : _c.setAttribute('d', this._getPath());
149
- Array.from(((_d = this.svgEl) === null || _d === void 0 ? void 0 : _d.querySelectorAll('stop')) || []).forEach((stopEL, index) => {
150
- stopEL.setAttribute('key', index.toString());
151
- stopEL.setAttribute('offset', this.colors[index].offset);
152
- stopEL.setAttribute('stop-color', this.colors[index].color);
153
- });
154
- }
155
- componentWillLoad() {
156
- this.perimeter = 2 * 3.14 * this.rad;
157
- this.gradientId = 'cty-circle-' + Math.random().toFixed(12).slice(2);
158
- this.watchColorHandler();
159
- }
160
- componentDidLoad() {
161
- this.updateSVGAttr();
162
- }
163
- _getPath() {
164
- const { rad, width, offset, clockwise } = this;
165
- const viewBoxSize = +width + rad * 2 + offset * 2;
166
- const sweepFlag = clockwise ? 1 : 0;
167
- return `M ${viewBoxSize / 2} ${viewBoxSize / 2} m 0, ${-rad} a ${rad}, ${rad} 0 1, ${sweepFlag} 0, ${rad * 2} a ${rad}, ${rad} 0 1, ${sweepFlag} 0, ${-rad * 2}`;
136
+ _dismiss() {
137
+ this.ctyDismiss.emit();
168
138
  }
169
139
  render() {
170
- return (index.h(index.Host, { key: 'b552b6f0190327fbd9fcf458994feee63b761d38', class: "cty-circle" }, index.h("svg", { key: '64b07a4798544cc9f9878dc4be3a046c881a6706', ref: el => (this.svgEl = el) }, this.needDefs && index.h("defs", { key: '5762f3641189b8d8dd8da4beddaeb82c28b68287' }, index.h("linearGradient", { key: '03205dd0dc64e90bf6ca30fb613ceeffe688585e', id: this.gradientId, x1: "100%", y1: "0%", x2: "0%", y2: "0%", gradientTransform: "rotate(90)" }, this.colors.map(() => (index.h("stop", null))))), index.h("path", { key: '8075a1ece096aa40e2e57bba80760bfb87c38b01', ref: el => (this.layerEl = el), class: "cty-circle__layer", style: {
171
- 'stroke-width': this.width + 'px',
172
- 'strokeDasharray': (this.ratio * this.perimeter) + 'px ' + this.perimeter + 'px'
173
- } }), index.h("path", { key: 'fefec8d3cb6927b35b37ca04498d3abc572e8b63', ref: el => (this.hoverEl = el), class: "cty-circle__hover", style: {
174
- 'stroke': this.rate <= 0 && this.zeroTransparent ? 'transparent' : this.needDefs ? 'url(#' + this.gradientId + ')' : this.color,
175
- 'stroke-width': +this.width + this.widthDif + 'px',
176
- 'strokeDasharray': (this.ratio * this.rate / 100 * this.perimeter) + 'px ' + this.perimeter + 'px'
177
- } })), this.text !== '' && index.h("div", { key: 'f683c2dc61d281e6c506ff9a15b3a2a2f4ef56da', class: "cty-circle__text" }, this.text), index.h("slot", { key: '64eba94a1e793fe3dec863d0733f8a7ceb9e659b' })));
140
+ return (index.h(index.Host, { key: '56a3795cba4d50f34250ae7bd6a95cd1f9aeb8be' }, index.h("cty-alert", { key: '30d8a9b62d7cb7c391a746755dbecdaef347ada0', part: "permission-alert", class: "cty-permission-alert", animated: false, overlayIndex: 1, backdropDismiss: this.backdropDismiss, title: this.title, content: this.content, closeable: this.closeable, buttons: this.buttons, onCtyTap: (e) => this._buttonClick(e), onCtyDismiss: () => this._dismiss() }, index.h("slot", { key: 'e661dd93f220462e2478233fce1a887bb6ac57d3', name: "header", slot: "header" }), index.h("slot", { key: '128a5f263a932e9c5263c51fccd6f2a67ef1cc49', name: "content", slot: "content" }), index.h("slot", { key: 'bfefd5cdb9c04a6fb3b13f1e4ea21d3b1a1b3dae', name: "buttons", slot: "buttons" }))));
178
141
  }
179
142
  get el() { return index.getElement(this); }
180
- static get watchers() { return {
181
- "color": ["watchColorHandler"],
182
- "rad": ["watchColorHandler", "watchRadHandler"]
183
- }; }
184
143
  };
185
- Circle.style = circleCss;
144
+ PermissionAlert.style = permissionAlertCss;
186
145
 
187
146
  exports.cty_alert = Alert;
188
- exports.cty_circle = Circle;
147
+ exports.cty_permission_alert = PermissionAlert;