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
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DCK462Hl.js');
4
- var imagePicker = require('./image-picker-DztF-H0P.js');
4
+ var imagePicker = require('./image-picker-C9sdhsR_.js');
5
5
  var deviceInfo = require('./device-info-BPtPRb6d.js');
6
6
  var overlays = require('./overlays-Cfk4eti-.js');
7
7
  var lockController = require('./lock-controller-Dk7it1jt.js');
@@ -63,6 +63,8 @@ const CameraPhoto = class {
63
63
  this.clipImageQuality = 1;
64
64
  this.clipImageSuffix = 'jpeg';
65
65
  this.permissionPurpose = true;
66
+ this.permissionAlertTitle = '需要申请开启相册权限';
67
+ this.permissionAlertContent = '需要开启相册权限,我们会帮助您选择好的照片或视频上传发布';
66
68
  this.root = 'default';
67
69
  this.animated = false;
68
70
  this.overlay = true;
@@ -77,6 +79,10 @@ const CameraPhoto = class {
77
79
  this.showPermissionPurpose = false;
78
80
  this.permissionDescription = '';
79
81
  this.showCameraPreview = false;
82
+ this.hasPermission = deviceInfo.deviceInfo.isMicroMessager;
83
+ this.permissionAlertVisible = false;
84
+ this.isToastOpen = false;
85
+ this.toastContent = '';
80
86
  }
81
87
  triggerChanged() {
82
88
  const { trigger, el, triggerController } = this;
@@ -119,6 +125,30 @@ const CameraPhoto = class {
119
125
  onWillDismiss() {
120
126
  return overlays.eventMethod(this.el, 'ctyWillDismiss');
121
127
  }
128
+ async requestPermission() {
129
+ try {
130
+ this.hasPermission = await imagePicker.imagePicker.hasPermission();
131
+ }
132
+ catch (error) {
133
+ this.hasPermission = false;
134
+ }
135
+ if (!this.hasPermission) {
136
+ try {
137
+ await imagePicker.imagePicker.requestPermission();
138
+ this.hasPermission = true;
139
+ }
140
+ catch (error) {
141
+ const { code, message } = error;
142
+ if (code == 'PERMISSION_DENIED_NEED_SETTINGS') {
143
+ this.permissionAlertVisible = true;
144
+ }
145
+ else if (code != 'PERMISSION_DENIED_FIRST_TIME' && message) {
146
+ this.isToastOpen = true;
147
+ this.toastContent = message;
148
+ }
149
+ }
150
+ }
151
+ }
122
152
  async _buttonClick(event) {
123
153
  event.stopPropagation();
124
154
  const { index } = event.detail;
@@ -138,13 +168,20 @@ const CameraPhoto = class {
138
168
  return;
139
169
  }
140
170
  let imageList = [];
171
+ const pictureOption = {
172
+ camera: option.action === 'camera',
173
+ file: this.file,
174
+ count: this.count,
175
+ option: this.photoOption,
176
+ };
177
+ //暂时处理多选图片的情况
178
+ if (!pictureOption.camera && pictureOption.count > 1 && !this.hasPermission) {
179
+ await this.requestPermission();
180
+ if (!this.hasPermission) {
181
+ return;
182
+ }
183
+ }
141
184
  try {
142
- const pictureOption = {
143
- camera: option.action === 'camera',
144
- file: this.file,
145
- count: this.count,
146
- option: this.photoOption,
147
- };
148
185
  imageList = await imagePicker.imagePicker.getPictures(pictureOption);
149
186
  this.showPermissionPurpose = false;
150
187
  }
@@ -208,8 +245,22 @@ const CameraPhoto = class {
208
245
  option.handler && option.handler({ option, imageList });
209
246
  this.ctyTap.emit({ index, imageList });
210
247
  }
248
+ async toOpenAppSetting(event) {
249
+ const { item } = event.detail;
250
+ if (item.action == 'permission') {
251
+ try {
252
+ await imagePicker.imagePicker.openAppSettings();
253
+ }
254
+ catch (error) { }
255
+ this.permissionAlertVisible = false;
256
+ }
257
+ }
258
+ closePermissionAlert(e) {
259
+ e.stopPropagation();
260
+ this.permissionAlertVisible = false;
261
+ }
211
262
  render() {
212
- return (index.h(index.Host, { key: 'eea07b307cd18485730d5c3eadce68aaf8dc1b29', class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'cty-pos-cover': this.overlay }), style: { zIndex: `${20000 + this.overlayIndex}` } }, index.h("cty-action-sheet", { key: '7efa3cb1bbcf392be95095f4aebec0f50281cce3', class: "cty-camera-photo", animated: false, overlayIndex: 1, backdropDismiss: this.backdropDismiss, title: this.title, closeable: this.closeable, closeIcon: this.closeIcon, cancelText: this.cancelText, options: this.options, onCtyDismiss: () => this.dismiss(), onCtyTap: e => this._buttonClick(e) }), this.showCropImage && (index.h("cty-backdrop", { key: 'beb314ab8d1f1001bb6031f94d6cb3caa5d02e78', backdropDismiss: false }, index.h("cty-crop-image", { key: '898aa3f15eed3c289f3f543d07520bfc09c10640', url: this.clipImage, cancelText: this.clipCancelText, confirmText: this.clipCconfirmText, imageWidth: this.clipImageWidth, imageBackground: this.clipImageBg, maxScale: this.clipMaxScale, minScale: this.clipMinScale, suffix: this.clipImageSuffix, quality: this.clipImageQuality, onCtyCancel: () => this._doCropCancel(), onCtyConfirm: (e) => this._doCropConfirm(e) }))), this.showPermissionPurpose && index.h("cty-permission-purpose", { key: '556c162b22f867697445d72d30befd9c92a66985', description: this.permissionDescription }), this.continuous && this.showCameraPreview && index.h("cty-camera", Object.assign({ key: '45d9311b5eea8abc67fbd62bcb4c6ad8177a9e4c' }, this.cameraProps, { onCtyDismiss: () => this.showCameraPreview = false, onCtyConfirm: (e) => this.continuousConfirm(e) }))));
263
+ return (index.h(index.Host, { key: '6626fa119a9c343df0fd6175c16c0a9cd18b6bf2', class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true, 'cty-pos-cover': this.overlay }), style: { zIndex: `${20000 + this.overlayIndex}` } }, index.h("cty-action-sheet", { key: 'b88a31483aaee47dad3969a616eb74945d199447', class: "cty-camera-photo", animated: false, overlayIndex: 1, backdropDismiss: this.backdropDismiss, title: this.title, closeable: this.closeable, closeIcon: this.closeIcon, cancelText: this.cancelText, options: this.options, onCtyDismiss: () => this.dismiss(), onCtyTap: e => this._buttonClick(e) }), this.showCropImage && (index.h("cty-backdrop", { key: '83e30b75f98f48e69e97898c6b95e835e519f999', backdropDismiss: false }, index.h("cty-crop-image", { key: 'e382a18a7c8d9b212f01843d78a1000112e5d486', url: this.clipImage, cancelText: this.clipCancelText, confirmText: this.clipCconfirmText, imageWidth: this.clipImageWidth, imageBackground: this.clipImageBg, maxScale: this.clipMaxScale, minScale: this.clipMinScale, suffix: this.clipImageSuffix, quality: this.clipImageQuality, onCtyCancel: () => this._doCropCancel(), onCtyConfirm: (e) => this._doCropConfirm(e) }))), this.showPermissionPurpose && index.h("cty-permission-purpose", { key: '55dd946e9896839ccd7930b1b3e0573429e29dc1', description: this.permissionDescription }), this.continuous && this.showCameraPreview && index.h("cty-camera", Object.assign({ key: '67729d43a590b8630169bd1daac1117f1f41641c' }, this.cameraProps, { onCtyDismiss: () => this.showCameraPreview = false, onCtyConfirm: (e) => this.continuousConfirm(e) })), this.permissionAlertVisible && index.h("cty-permission-alert", { key: '2fe87f4d37895f5187e1f86723fd2e34dc38e2b9', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) }), index.h("ion-toast", { key: '7a30b6c1e4314cd092bef5c313bff43449fd12ee', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
213
264
  }
214
265
  get el() { return index.getElement(this); }
215
266
  static get watchers() { return {
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
3
  var index = require('./index-DCK462Hl.js');
4
- var cameraPreview = require('./camera-preview-CjkBcrrF.js');
4
+ var cameraPreview = require('./camera-preview-BylkRIcS.js');
5
5
  var deviceInfo = require('./device-info-BPtPRb6d.js');
6
- var imagePicker = require('./image-picker-DztF-H0P.js');
6
+ var imagePicker = require('./image-picker-C9sdhsR_.js');
7
7
  var index$1 = require('./index-DASUhQA3.js');
8
8
  var dom = require('./dom-B8PDM5o-.js');
9
9
  var format = require('./format-BSDO5P-c.js');
@@ -44,6 +44,8 @@ const Camera = class {
44
44
  this.zoomSteps = 20; //仅android有效,通过这个算出每一份的的比例: (getMaxZoom() + 1) / allowMaxZoom
45
45
  this.touchZoom = true;
46
46
  this.touchZoomProp = 0.01;
47
+ this.permissionAlertTitle = '需要申请开启相机权限';
48
+ this.permissionAlertContent = '需要开启相机权限,用于拍照。我们承诺仅在功能使用时调用摄像头。';
47
49
  this.ratioIndex = 0;
48
50
  this.flash = false;
49
51
  this.zoomIndex = 0;
@@ -52,6 +54,10 @@ const Camera = class {
52
54
  this.imageViewerIndex = 0;
53
55
  this.currentPhotoMode = 'multiple';
54
56
  this.currentZoom = 1;
57
+ this.hasPermission = false;
58
+ this.permissionAlertVisible = false;
59
+ this.isToastOpen = false;
60
+ this.toastContent = '';
55
61
  this.startZoom = 1;
56
62
  this.SCREEN_WIDTH = window.screen.width;
57
63
  this.SCREEN_HEIGHT = window.screen.height;
@@ -76,9 +82,46 @@ const Camera = class {
76
82
  bodyEl.style.visibility = 'visible';
77
83
  bodyEl.style.background = this.originalBodyBackground;
78
84
  }
79
- initCamera() {
85
+ async requestPermission() {
86
+ try {
87
+ this.hasPermission = await cameraPreview.cameraPreview.hasPermission();
88
+ }
89
+ catch (error) {
90
+ this.hasPermission = false;
91
+ }
92
+ if (!this.hasPermission) {
93
+ try {
94
+ await cameraPreview.cameraPreview.requestPermission();
95
+ this.hasPermission = true;
96
+ }
97
+ catch (error) {
98
+ const { code, message } = error;
99
+ if (code == 'PERMISSION_DENIED_NEED_SETTINGS') {
100
+ this.permissionAlertVisible = true;
101
+ }
102
+ else {
103
+ if (code != 'PERMISSION_DENIED_FIRST_TIME' && message) {
104
+ this.isToastOpen = true;
105
+ this.toastContent = message;
106
+ }
107
+ this.ctyDismiss.emit();
108
+ }
109
+ }
110
+ }
111
+ }
112
+ async initCamera() {
113
+ await this.requestPermission();
114
+ if (!this.hasPermission) {
115
+ this.ctyDismiss.emit();
116
+ return;
117
+ }
80
118
  const height = this.getCameraHeight();
81
- cameraPreview.cameraPreview.startCamera(Object.assign(Object.assign({ y: this.safeArea, camera: 'back', backgroundColor: '#000000' }, this.options), { x: 0, height, toBack: true, tapPhoto: false, tapFocus: true, enableAutoSettings: false, storeToFile: this.file }));
119
+ cameraPreview.cameraPreview.startCamera(Object.assign(Object.assign({ y: this.safeArea, camera: 'back', backgroundColor: '#000000' }, this.options), { x: 0, height, toBack: true, tapPhoto: false, tapFocus: true, enableAutoSettings: false, storeToFile: this.file })).catch((error) => {
120
+ const { code } = error;
121
+ if (code == 'PERMISSION_DENIED_NEED_SETTINGS') {
122
+ this.permissionAlertVisible = true;
123
+ }
124
+ });
82
125
  }
83
126
  close() {
84
127
  this.ctyDismiss.emit();
@@ -230,9 +273,26 @@ const Camera = class {
230
273
  }
231
274
  cameraPreview.cameraPreview.setZoom(Math.min(startCameraZoom + diff, maxZoom));
232
275
  }
276
+ async toOpenAppSetting(event) {
277
+ const { item } = event.detail;
278
+ if (item.action == 'permission') {
279
+ try {
280
+ await cameraPreview.cameraPreview.openAppSettings();
281
+ this.permissionAlertVisible = false;
282
+ }
283
+ catch (error) {
284
+ this.closePermissionAlert(event);
285
+ }
286
+ }
287
+ }
288
+ closePermissionAlert(e) {
289
+ e.stopPropagation();
290
+ this.permissionAlertVisible = false;
291
+ this.ctyDismiss.emit();
292
+ }
233
293
  render() {
234
294
  const { title, closeIcon, flash, flipText, flashText, ratioText, ratios, ratioIndex, zoomIndex, zooms, mode, singleText, multipleText, currentPhotoMode, confirmIcon, confirmText, deleteIcon, pictures, showImageViewer, imageViewerIndex, touchZoom, currentZoom } = this;
235
- return (index.h(index.Host, { key: 'f2dbbeee10fef4293fa66a78076f751893d93608', class: "cty-camera", onClick: (e) => e.stopPropagation() }, index.h("cty-nav-bar", { key: '054634ffc50db9a53cf9120e1546f0ab1519a179', title: title, type: "clear" }, index.h("slot", { key: '1440253fbb8a78ef418ffba4971eb2548832e7db', name: "header-start", slot: "start" }, !!closeIcon && index.h("ion-button", { key: '49f8467e23a693abcd3213c403fe308f46600293', class: "cty-camera__close", onClick: () => this.close() }, index.h("cty-icon", { key: 'dcdf35990d7609c0fd4fe720d2166d864bd62946', class: "cty-camera__close-icon", name: closeIcon })))), index.h("div", { key: 'a07a80a5039e04174bffd5223883f2c97ab21314', class: "cty-camera-main", onTouchStart: (e) => this.touchstart(e), onTouchMove: (e) => this.touchmove(e), onTouchEnd: (e) => this.touchend(e) }, index.h("div", { key: '1105f0e3ba35b3076057f3d61f8a94e7c449079c', class: "cty-camera-widgets", part: "widgets" }, !!flipText && index.h("button", { key: 'c9206213c57615b8d0228d16d9e2ab50c93ce2f7', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.flipCamera() }, index.h("cty-icon", { key: 'd0490581bf68da9fcbe8d661771a016e096aa4e6', class: "cty-camera-widget__icon", name: "cty-flip" }), !!flipText && index.h("span", { key: '57d763faca03d9f713f6eb73c24daf2a6b6b4057', class: "cty-camera-widget__text" }, flipText)), !!flashText && index.h("button", { key: '8c2e80d3f1dc0136b2b1bd8a27df12c950f81e2f', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.toggleFlash() }, index.h("cty-icon", { key: 'ff771e3b1c75d0e4a4c797d6ce0d7e7aec93f097', class: "cty-camera-widget__icon", name: flash ? 'cty-flash-on' : 'cty-flash-off' }), !!flashText && index.h("span", { key: 'c15e58dc18a185c5b99303f821447e31cde5c02d', class: "cty-camera-widget__text" }, flashText)), !!ratioText && index.h("button", { key: '67f70b3a009c2761fe3b0c1c4d8ab844972420f5', class: "cty-button-native cty-camera-widget", part: "ratio", onClick: () => this.ratioChange() }, index.h("span", { key: '0c5be61834b53c2281eba2912d47d083d5f16403', class: "cty-camera-widget__ratio flex-center" }, ratios[ratioIndex]), !!ratioText && index.h("span", { key: 'd75675b27ac00ad662cf687dbec16d1d607932a6', class: "cty-camera-widget__text" }, ratioText)))), index.h("div", { key: 'ea3852cbb926abb151942500a140a78d8b3ee712', class: "cty-camera-controls safe-area-bottom-padding" }, mode == 'both' && pictures.length <= 0 && index.h("div", { key: '15d0990b2dbacab7d81b73f0aac8766106d93226', class: "cty-camera-controls__mode flex-center", part: "mode" }, index.h("button", { key: 'ae5a5de840f895568d2ed72ca12d14d6e028bebe', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'single' }, onClick: () => this.currentPhotoMode = 'single' }, singleText), index.h("button", { key: '33109a8369c68dfd902e9b0ad7a36a6e571fddb5', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'multiple' }, onClick: () => this.currentPhotoMode = 'multiple' }, multipleText)), index.h("slot", { key: 'cecb11c3b01fdc6c2b207bf846674c9816535004', name: "zooms" }, !touchZoom && zooms.length > 0 && index.h("div", { key: '32d91389660d8ab71c91777a85c6093d700eae73', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, zooms.map((item, idx) => (index.h("div", { class: { 'cty-camera-controls__zoom-item flex-center': true, 'cty-camera-controls__zoom-item__active': zoomIndex === idx }, onClick: () => this.setZoom(idx) }, index.h("span", { class: "cty-camera-controls__zoom-text flex-center" }, item, "X"))))), touchZoom && index.h("div", { key: '2979d870a22334d7329b122eb5eb32737fd48b58', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, index.h("div", { key: 'fcb6e01d6e9913c810e02b08f172e1eaecaf42a6', class: { 'cty-camera-controls__zoom-item flex-center cty-camera-controls__zoom-item__active': true }, onClick: () => this.resetZoom() }, index.h("span", { key: '5b413b10485d7b5cf0c41e2ca47a4834c812da09', class: "cty-camera-controls__zoom-text flex-center" }, currentZoom, "X")))), index.h("div", { key: '4907c6ed45def804b5d4b8072e33dd77d8ddf750', class: "cty-camera-controls__main flex-center" }, index.h("div", { key: 'ea116cc9eb7bc8b49775f0cc76c0047cbe50f5ff', class: "cty-camera-controls__main-left flex-center" }), index.h("div", { key: 'ff332ec62a18093c632cfb9bfb693999cdfe0b26', class: "cty-camera-controls__take-photo flex-center" }, index.h("button", { key: '2e1dd2ac2fb3d916d80a18920005fe13eb5447ac', class: "cty-button-native cty-camera-controls__take-photo-button", part: "take-photo", onClick: () => this.takePhoto() })), index.h("div", { key: '3414c6ed97b0a361804161c6bb3ccee75b719565', class: "cty-camera-controls__main-confirm flex-center" }, currentPhotoMode !== 'single' && pictures.length > 0 && !!deleteIcon && index.h("button", { key: '1ca16002c7d041af5e289936140379c81a60ff1a', class: "cty-camera-controls__main-delete cty-button-native flex-column-center", onClick: () => this.deleteLastPicture() }, index.h("cty-icon", { key: '52809317515b8b9c967a7d19b97230bf38f902ee', class: "cty-camera-controls__main-delete-icon", name: deleteIcon })), currentPhotoMode !== 'single' && pictures.length > 0 && index.h("button", { key: 'dca02780b3f7af11b5b538af4f039f9e0308449d', class: "cty-button-native flex-column-center", onClick: () => this.confirm() }, index.h("cty-icon", { key: '40c8d5ac9859f76e01ef23c80b71d6d22ab0bd1f', class: "cty-camera-controls__main-confirm-icon", name: confirmIcon }), confirmText && index.h("span", { key: '92186800f1c93464c5c38e190bcfec43444f80a7', class: "cty-camera-controls__main-confirm-text" }, confirmText)))), index.h("slot", { key: '17a6034ad5c152cdb575f79d1f74ba435eb503e0', name: "images" }, index.h("div", { key: 'eb7429358baf366ee7a34d0f6b84d9bc9daf150a', class: "cty-camera-controls__images flex-align-center" }, currentPhotoMode !== 'single' && pictures.map((item, idx) => (index.h("div", { class: "cty-camera-controls__image", onClick: () => this.toImageViewer(idx) }, index.h("img", { class: 'cty-camera-controls__image-img', src: item.thumbnail || item.url }), index.h("button", { class: "cty-button-native", onClick: (e) => this.deletePicture(e, idx) }, index.h("cty-icon", { class: "cty-camera-controls__image-delete", name: index$1.closeOutline })))))))), showImageViewer && index.h("cty-image-viewer", { key: 'bae500ca714d13cbca2bf1ff03209cec29612e06', images: pictures.map(item => item.url), initialSlide: imageViewerIndex, overlayIndex: 100, backdropDismiss: false, closeable: false, onCtyDismiss: (e) => this.closeImageViewer(e) }, currentPhotoMode !== 'multiple' && index.h("div", { key: '10b99a568c83aaa375c061f5a060018cdbcc0e99', class: "cty-camera-viewer__single flex-center-between", slot: "pager" }, index.h("button", { key: '3b3b52f74c5115aa8be3460621f4a02db00ce9c9', class: "cty-camera-viewer__single-close cty-button-native", onClick: (event) => this.closeSingleImageViewer(event) }, index.h("cty-icon", { key: '006d14a44c03870f4b17dc4e5cb0f0eb16bc9504', name: "cty-close2" })), index.h("button", { key: 'db9707996bf8bba7211792c5f4e66282080f9008', class: "cty-camera-viewer__single-confirm cty-button-native", onClick: () => this.confirm() }, index.h("cty-icon", { key: 'a8db29743f5d6c043fbda19265432ac0e89eb168', name: "cty-tick" }))), currentPhotoMode !== 'multiple' && index.h("i", { key: '091022dccdf8a1796b175be4a001de06bbdadc6e', slot: "close" }))));
295
+ return (index.h(index.Host, { key: '249d6c9269af0bb404fa13c2679db953580196be', class: "cty-camera", onClick: (e) => e.stopPropagation() }, index.h("cty-nav-bar", { key: '3ddc96ed9540f67485013bd1d52cf593f7a159ec', title: title, type: "clear" }, index.h("slot", { key: 'c3124d840af6803fe87669dc1da346b5a51d6dc1', name: "header-start", slot: "start" }, !!closeIcon && index.h("ion-button", { key: '48ebfe61e98a586fb127feb9e57e556108665126', class: "cty-camera__close", onClick: () => this.close() }, index.h("cty-icon", { key: '8da9e811d18687d6c3c3fd19f3b6d96db3b4d992', class: "cty-camera__close-icon", name: closeIcon })))), index.h("div", { key: '918f5390b8d846231a1fbd3550858114efb3797f', class: "cty-camera-main", onTouchStart: (e) => this.touchstart(e), onTouchMove: (e) => this.touchmove(e), onTouchEnd: (e) => this.touchend(e) }, index.h("div", { key: '4d872387a4bb06d4d5030c181c6a67a9ef19f5aa', class: "cty-camera-widgets", part: "widgets" }, !!flipText && index.h("button", { key: '6de4076ab5b8ee8a31a63305fc4fd4c954e87291', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.flipCamera() }, index.h("cty-icon", { key: 'cf2cd7ccbf12a6b972371389045aa7360a7e361c', class: "cty-camera-widget__icon", name: "cty-flip" }), !!flipText && index.h("span", { key: '63816718efe322900dd80192a3c96e1dde0f56bf', class: "cty-camera-widget__text" }, flipText)), !!flashText && index.h("button", { key: '71f482e92876e408cfe4391c92c79789d83ff12b', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.toggleFlash() }, index.h("cty-icon", { key: '70a2838d229df2418807329013cf2db86c8b2886', class: "cty-camera-widget__icon", name: flash ? 'cty-flash-on' : 'cty-flash-off' }), !!flashText && index.h("span", { key: 'dc6dcb389cde04abe9e94824fc7ab23d7cbd49c3', class: "cty-camera-widget__text" }, flashText)), !!ratioText && index.h("button", { key: '13fd40b68adeefca52a5775b2fc86bd0602728c7', class: "cty-button-native cty-camera-widget", part: "ratio", onClick: () => this.ratioChange() }, index.h("span", { key: 'e971f50bb4a923dfb119497d530890dc2a2f4cc2', class: "cty-camera-widget__ratio flex-center" }, ratios[ratioIndex]), !!ratioText && index.h("span", { key: 'c13601a6c3866a72120a9b441d971c5134e95b26', class: "cty-camera-widget__text" }, ratioText)))), index.h("div", { key: 'b82e91f54f7416c8f8ba0bbc99ad034b7d90d201', class: "cty-camera-controls safe-area-bottom-padding" }, mode == 'both' && pictures.length <= 0 && index.h("div", { key: 'da4867ad484906fb92bb0b9840ae05cab7f6017c', class: "cty-camera-controls__mode flex-center", part: "mode" }, index.h("button", { key: '8932fc465360764b3d19c2ba0f9afa26df747248', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'single' }, onClick: () => this.currentPhotoMode = 'single' }, singleText), index.h("button", { key: 'a70dd98026cb8125f04841f3f82ae83bffedea17', class: { 'cty-button-native cty-camera-controls__mode-button': true, 'cty-camera-controls__mode-button__active': currentPhotoMode === 'multiple' }, onClick: () => this.currentPhotoMode = 'multiple' }, multipleText)), index.h("slot", { key: '706e3c7c60be9bea7a887743981e6c0c83d867a1', name: "zooms" }, !touchZoom && zooms.length > 0 && index.h("div", { key: 'dd6fe65fe090190eb2f1f0b678ebfa84f8bbbe31', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, zooms.map((item, idx) => (index.h("div", { class: { 'cty-camera-controls__zoom-item flex-center': true, 'cty-camera-controls__zoom-item__active': zoomIndex === idx }, onClick: () => this.setZoom(idx) }, index.h("span", { class: "cty-camera-controls__zoom-text flex-center" }, item, "X"))))), touchZoom && index.h("div", { key: '9f0a68f5c87b36f50807a1ddce3fd7d495f5b0f7', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, index.h("div", { key: '2b1f97c6fbe953d71779f536d408d8a878872b1c', class: { 'cty-camera-controls__zoom-item flex-center cty-camera-controls__zoom-item__active': true }, onClick: () => this.resetZoom() }, index.h("span", { key: '2e16a3df094da8fcfe0b3758732a48bc67e00797', class: "cty-camera-controls__zoom-text flex-center" }, currentZoom, "X")))), index.h("div", { key: '06a01b4fcb96b0bd33bde8ed91fc2b436e406791', class: "cty-camera-controls__main flex-center" }, index.h("div", { key: 'c748dab6ff814deab00d7f0ff8e2b9ae439acc82', class: "cty-camera-controls__main-left flex-center" }), index.h("div", { key: 'ae6105b6f28bd8be992ebf164987806a5cf52e9c', class: "cty-camera-controls__take-photo flex-center" }, index.h("button", { key: '1bbe3c2225a533fd7f4b9de9b7778c748c4f5a03', class: "cty-button-native cty-camera-controls__take-photo-button", part: "take-photo", onClick: () => this.takePhoto() })), index.h("div", { key: 'd8b0277f2daf2c6085edd86c18d220a7c24e1e37', class: "cty-camera-controls__main-confirm flex-center" }, currentPhotoMode !== 'single' && pictures.length > 0 && !!deleteIcon && index.h("button", { key: 'cc83aa1aab767ea7a3aef3b44194b4891836c09a', class: "cty-camera-controls__main-delete cty-button-native flex-column-center", onClick: () => this.deleteLastPicture() }, index.h("cty-icon", { key: '5b2a06c3819fa158b12769b4cea08f7df6cecff2', class: "cty-camera-controls__main-delete-icon", name: deleteIcon })), currentPhotoMode !== 'single' && pictures.length > 0 && index.h("button", { key: '09642c94b869090cd1381b75a949013623558fb6', class: "cty-button-native flex-column-center", onClick: () => this.confirm() }, index.h("cty-icon", { key: '09e36ce96317e298f0a54ce6c1d76009a4ad4b95', class: "cty-camera-controls__main-confirm-icon", name: confirmIcon }), confirmText && index.h("span", { key: '9d24bf57e4c32abbbfb95671c1191f7d85adfce4', class: "cty-camera-controls__main-confirm-text" }, confirmText)))), index.h("slot", { key: '5530ce7f1411007acfd28326b53b5caa52c52376', name: "images" }, index.h("div", { key: '2a9366f14ff5878bb704703d9fd65a4549c002fb', class: "cty-camera-controls__images flex-align-center" }, currentPhotoMode !== 'single' && pictures.map((item, idx) => (index.h("div", { class: "cty-camera-controls__image", onClick: () => this.toImageViewer(idx) }, index.h("img", { class: 'cty-camera-controls__image-img', src: item.thumbnail || item.url }), index.h("button", { class: "cty-button-native", onClick: (e) => this.deletePicture(e, idx) }, index.h("cty-icon", { class: "cty-camera-controls__image-delete", name: index$1.closeOutline })))))))), showImageViewer && index.h("cty-image-viewer", { key: '5c3f82c1f25c434e79c2df83f657c25cc42f0ffc', images: pictures.map(item => item.url), initialSlide: imageViewerIndex, overlayIndex: 100, backdropDismiss: false, closeable: false, onCtyDismiss: (e) => this.closeImageViewer(e) }, currentPhotoMode !== 'multiple' && index.h("div", { key: '2c0753cab107695962bbdd55ab9b334e91c361a2', class: "cty-camera-viewer__single flex-center-between", slot: "pager" }, index.h("button", { key: '3cf7393d965245e4b7072afe50412c150840cec3', class: "cty-camera-viewer__single-close cty-button-native", onClick: (event) => this.closeSingleImageViewer(event) }, index.h("cty-icon", { key: 'db1b6d35ff40650a00903d37d03adf9c4e7ce311', name: "cty-close2" })), index.h("button", { key: '25df5828eafcc1191e826445e0b20e41eec869bf', class: "cty-camera-viewer__single-confirm cty-button-native", onClick: () => this.confirm() }, index.h("cty-icon", { key: 'e96ba7b2413df359b4ab6ea184250edbf3618d2a', name: "cty-tick" }))), currentPhotoMode !== 'multiple' && index.h("i", { key: '8a167eb7c089ede4aeff07e73cd14424a0ccca55', slot: "close" })), this.permissionAlertVisible && index.h("cty-permission-alert", { key: '3fb0cd60cb246d94f12a6adff586087071075ea2', title: this.permissionAlertTitle, content: this.permissionAlertContent, buttons: this.permissionAlertbuttons, onCtyDismiss: (e) => this.closePermissionAlert(e), onCtyTap: (e) => this.toOpenAppSetting(e) }), index.h("ion-toast", { key: 'ac0224081e8ce22eaebfd7224391cf1957c2ff47', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
236
296
  }
237
297
  get el() { return index.getElement(this); }
238
298
  };
@@ -442,7 +502,7 @@ const CropImage = class {
442
502
  return (index.h("div", { class: "cty-crop-image__buttons flex-center-between safe-area-bottom-border-color" }, this.cancelText && cancelCmp, this.confirmText && confirmCmp));
443
503
  }
444
504
  render() {
445
- return (index.h(index.Host, { key: 'f03ef034659039ca694e92e094e6f771b65ed41d', class: "cty-crop-image", onMouseDown: (e) => this.doTouchStart(e), onTouchStart: (e) => this.doTouchStart(e), onTouchMove: (e) => this.doTouchMove(e), onTouchEnd: () => this.doTouchEnd() }, index.h("slot", { key: '4d1f7dcd27ebf1824937e8e056fec2e64b871610', name: "header" }), index.h("div", { key: '53adedd36ec4b3d2a622d9c308f35b593df3c7dd', class: "cty-crop-image__wrapper", ref: el => (this.imageEl = el) }, index.h("img", { key: '70dc841fd80c5e80923e3365597653837ee2d01d', src: this.url, class: "cty-crop-image__image" })), index.h("div", { key: '7c19c8da9253e17615aa2699391fcc545cb1f9ac', class: "cty-crop-image__clip", ref: el => (this.clipEl = el) }), index.h("slot", { key: '8394107199cf8626534e3d0c1a258225306c6eaf', name: "clip" }), this.renderButtons(), index.h("slot", { key: 'e723cd0166a0a1d752d6f69af3873ac97b96298c', name: "footer" })));
505
+ return (index.h(index.Host, { key: '3805ba12b7e6f2809399b8a9f213e4a4131b081c', class: "cty-crop-image", onMouseDown: (e) => this.doTouchStart(e), onTouchStart: (e) => this.doTouchStart(e), onTouchMove: (e) => this.doTouchMove(e), onTouchEnd: () => this.doTouchEnd() }, index.h("slot", { key: '441105402304f96770ff61b883993c952f7ea4a9', name: "header" }), index.h("div", { key: 'affa68ce2eacf57bff5dcbc140c1da82d59dc8a3', class: "cty-crop-image__wrapper", ref: el => (this.imageEl = el) }, index.h("img", { key: '9c5dd8cafb8e14f7f0e5d6ee2cc999a139580342', src: this.url, class: "cty-crop-image__image" })), index.h("div", { key: 'eafd9083b6728615b767dae842c8b102ad40916d', class: "cty-crop-image__clip", ref: el => (this.clipEl = el) }), index.h("slot", { key: '25cb5fb31191e0a991064164b4c5752f39b7499b', name: "clip" }), this.renderButtons(), index.h("slot", { key: 'e60a010fea26d6fa38a380c4cb9f6c4c28c25558', name: "footer" })));
446
506
  }
447
507
  get el() { return index.getElement(this); }
448
508
  };
@@ -204,7 +204,7 @@ const CanvasBoard = class {
204
204
  } }, index.h("i", { style: { width: item * 2 + 'px', height: item * 2 + 'px' } }))))), index.h("div", { class: "cty-canvas-board__line-alpha", onClick: e => e.stopPropagation() }, index.h("div", { class: "cty-canvas-board__line-alpha-bg" }), index.h("ion-range", { max: 1, min: 0, step: 0.01, ref: (el) => (this.alphaRangeRef = el), class: "cty-canvas-board__line-alpha-range", value: this.alpha, onIonChange: (event) => this.alphaChange(event) })))));
205
205
  }
206
206
  render() {
207
- return (index.h(index.Host, { key: '77461f05c3380459bbf8663b7b17adbefc1a9eb5', class: "cty-canvas-board flex-column" }, index.h("slot", { key: '1b9fdfc979353af1e012207341007884ebc854d3', name: "header" }), this.headerOpn && (index.h("div", { key: '44f83e96e5ee8d8ecbf192bbf6068a39d3f54eef', class: "cty-canvas-board__header flex-center-between" }, index.h("slot", { key: '1ece92c8330cabf64d6be6245b8586b576862e6c', name: "header-start" }), this.bgIcon && index.h("button", { key: 'c4a1a08e5db586d55e145f60d28c429d02d346be', class: "cty-button-native", onClick: () => this.updateBgColor() }, index.h("cty-icon", { key: '86113a93e80216c1fa342a41d6e144e6c8873762', name: this.bgIcon, class: "cty-canvas-board__palette" }), index.h("input", { key: 'ab128a619a0548e3bda4ab952144f8735e004874', type: "color", class: "cty-canvas-board__picker-color", ref: el => (this.bgPickerEl = el), value: this.bgColor, onInput: (e) => this.bgColorChange(e) })), index.h("slot", { key: '62bcbe6f83e52bf9ce60c36f57388b080e330763', name: "header-opn-start" }, " "), (this.undoIcon || this.redoIcon) && index.h("div", { key: 'e061c427becfd216bb547ac2a43bd88d84a8516d', class: "cty-canvas-board__opn flex-center" }, this.undoIcon && index.h("button", { key: '7a120805a9cda67ec76f7ceb7e1e9e2f9b43119e', class: "cty-button-native cty-canvas-board__opn-icon", onClick: () => this.undo() }, index.h("cty-icon", { key: '61f9e434e4c1175e0e0deb645c588286e11abb72', name: this.undoIcon, class: { 'cty-canvas-board__opn-active': this.drawingHistory.length > 1 && this.step > 0 } })), this.redoIcon && index.h("button", { key: '65240b6060be512120983d70affb6320507b9a3f', class: "cty-button-native cty-canvas-board__opn-icon", onClick: () => this.redo() }, index.h("cty-icon", { key: '60e2c28cadd3c2d40eeb98a8cad9f72d792f8589', name: this.redoIcon, class: { 'cty-canvas-board__opn-active': this.step < this.drawingHistory.length - 1 } }))), index.h("slot", { key: '8e867a01cdaafbbe08da91fce36f22fa049f4db9', name: "header-opn-end" }), this.clearIcon && index.h("button", { key: '19a809120e0f4604d52dbe03dc3f67f2c5698f83', class: "cty-button-native cty-canvas-board__clear", onClick: () => this.clear() }, index.h("cty-icon", { key: 'c49522de5d1b2d442f0e44b2ac36fdff97ea41ab', name: this.clearIcon })), index.h("slot", { key: 'fc0ba8abb29039edf9151dfb9d51a1aeede60cd8', name: "header-end" }))), index.h("slot", { key: '1ec5283eb61319f212d0898d8a5ac1d88d13f508', name: "main" }), index.h("div", { key: 'c0b508a7b55cdc56df6c848543d1b2b0e65bddb2', class: "cty-canvas-board__main" }, index.h("canvas", { key: '3a22c825d29c62a52aef31ab60deefbbd062d1b5', ref: el => (this.canvasEl = el), style: { background: this.bgColor }, onTouchStart: e => this.startDrawing(e), onTouchMove: e => this.moveDrawing(e), onTouchEnd: e => this.endDrawing(e), onMouseDown: e => this.startDrawing(e), onMouseMove: e => this.moveDrawing(e), onMouseUp: e => this.endDrawing(e) }), index.h("canvas", { key: '89311b6698020381cd3b35895997678c111dcd98', ref: el => (this.imageCanvasEl = el), style: { display: 'none' } }), index.h("span", { key: '5f462b61d2b29b1b702376085bc166681fa18ce9', class: "cty-canvas-board__eraser-circle", ref: el => (this.eraserEl = el) }), this.isCanvasEmpty && index.h("slot", { key: '765b89a4bd4b89d4be9435b7b28f1460830e5c40', name: "placeholder" }), index.h("slot", { key: '05bd544f4293977a3e505b50f2fc1563c51461df' })), index.h("slot", { key: 'c5828b000c59d7ac6c788fd8f058bf3cd17b9b32', name: "footer" }), this.footerOpn && (index.h("div", { key: '6420abefc57b8ee8f11a79ddea686f4804b19119', class: "cty-canvas-board__footer flex-center" }, index.h("slot", { key: 'f3ccd75e1e869c98e123b8e419e8a59ba9113bce', name: "footer-start" }), this.pencilIcon && (index.h("button", { key: 'c140c157ae713d94c9d0f6da55ae3e87d488b5b7', class: "cty-button-native cty-canvas-board__pen", onClick: e => this.updatePencil(e) }, index.h("cty-icon", { key: '7262819d76c1552a9566f025270255625f22ecc3', name: this.pencilIcon, class: { 'cty-canvas-board__footer-active': !this.isEraser } }))), index.h("button", { key: '31f3f0f0f2a68c5290809a4ae8a012fd353917f2', class: "cty-button-native cty-canvas-board__eraser", onClick: () => (this.isEraser = !this.isEraser) }, index.h("cty-icon", { key: '897c7d062bbdd7dceccaeb759f5967a000023e41', name: this.eraserIcon, class: { 'cty-canvas-board__footer-active': this.isEraser } })), index.h("button", { key: 'c9a7a647baa4ac93b081c3f9586c7455a5c5ef44', class: "cty-button-native cty-canvas-board__color-button", onClick: () => this.updateColor() }, index.h("input", { key: 'd91f1947c9f66a5050d92a6c9fd2c4758d119c20', type: "color", value: this.strokeColor, class: "cty-canvas-board__picker-color", ref: el => (this.colorPickerEl = el), onInput: (e) => this.penColorChange(e) })), index.h("slot", { key: 'bc134a972e3d5bca92e59b612cdff45ee7d1041f', name: "footer-end" }))), index.h("slot", { key: '5ab3b8c50038cbf8d98728ded8565d831d8eed1b', name: "bottom" }), this.showButtons && (index.h("div", { key: 'af85a5d9ef4d6e1ae76c43a9700e2b2b1a1bdcc3', class: "cty-canvas-board__buttons flex-justify-end" }, index.h("slot", { key: 'cb01fd8b02cf4b47af3143574c519de888b9edf9', name: "bottom-button-start" }), index.h("button", { key: '62141bb06b1e69946080a385043127c10963a25c', class: "cty-canvas-board__button cty-button-native", onClick: () => this.clear() }, this.clearLabel), index.h("button", { key: 'abf4c4bbab5f2dda8ea5b52f5d1bfbad64eca70b', class: "cty-canvas-board__button cty-button-native", onClick: () => this.confirm() }, this.confirmLabel), index.h("slot", { key: '91e5ab4da613f99793f900f154bdf94dd4c0adbb', name: "bottom-button-end" }))), this.renderPopover()));
207
+ return (index.h(index.Host, { key: '5c1d547318a944d16e02a0d89e3fffded39e0bdd', class: "cty-canvas-board flex-column" }, index.h("slot", { key: 'e0acd38c2dd73f444ff810398f181d59465e0ec1', name: "header" }), this.headerOpn && (index.h("div", { key: '83a86afb9509cc85780f93ba712f6ccb0f1a728b', class: "cty-canvas-board__header flex-center-between" }, index.h("slot", { key: '622ab8273190d2795c1816663656eb1deb1b8e67', name: "header-start" }), this.bgIcon && index.h("button", { key: 'd8f7a0040b968e826533fbe5fa96c2a7801b3c72', class: "cty-button-native", onClick: () => this.updateBgColor() }, index.h("cty-icon", { key: '43e2bd356e3d51368e11f1e7673292eb35dbcdfc', name: this.bgIcon, class: "cty-canvas-board__palette" }), index.h("input", { key: 'b96ab00872f55b7e71eccbac4fd9ffead9de1d48', type: "color", class: "cty-canvas-board__picker-color", ref: el => (this.bgPickerEl = el), value: this.bgColor, onInput: (e) => this.bgColorChange(e) })), index.h("slot", { key: '0f9c4685c82f01b16da1c216f1a082c331aac1f2', name: "header-opn-start" }, " "), (this.undoIcon || this.redoIcon) && index.h("div", { key: '12b46e18bf7621a274db06e488bf2aad8c5f841c', class: "cty-canvas-board__opn flex-center" }, this.undoIcon && index.h("button", { key: 'f1aaa8dbd4a335ab95726213a0637fed02dd6c02', class: "cty-button-native cty-canvas-board__opn-icon", onClick: () => this.undo() }, index.h("cty-icon", { key: '6f69dd8f47e2817d38a0f478e533c696b848a888', name: this.undoIcon, class: { 'cty-canvas-board__opn-active': this.drawingHistory.length > 1 && this.step > 0 } })), this.redoIcon && index.h("button", { key: '6800f914f7a959eeb86884d5f296c6c98edb8f31', class: "cty-button-native cty-canvas-board__opn-icon", onClick: () => this.redo() }, index.h("cty-icon", { key: 'dffc5e3e76c4fc5f8ea7e54398f86a90b8b38007', name: this.redoIcon, class: { 'cty-canvas-board__opn-active': this.step < this.drawingHistory.length - 1 } }))), index.h("slot", { key: '52cd777aa3d99718e3b73333bc70f8da551d51d0', name: "header-opn-end" }), this.clearIcon && index.h("button", { key: 'beaf0980ad1613210e05fc18684f8050e0bc14f9', class: "cty-button-native cty-canvas-board__clear", onClick: () => this.clear() }, index.h("cty-icon", { key: '4c59d492b92480fd2eb028480cc25823cf3af4f9', name: this.clearIcon })), index.h("slot", { key: 'a03ad3ae3c5295a09e23371bbd03da1b005278f7', name: "header-end" }))), index.h("slot", { key: 'e85153d6eb9f3f41bc43782deef4d1a7a9a11c1b', name: "main" }), index.h("div", { key: '74cdcc4b9ca9da6a0391f077cb4cdf263836150e', class: "cty-canvas-board__main" }, index.h("canvas", { key: '8b3bf6e0b28f811531b8879d642d9de0299a8b8f', ref: el => (this.canvasEl = el), style: { background: this.bgColor }, onTouchStart: e => this.startDrawing(e), onTouchMove: e => this.moveDrawing(e), onTouchEnd: e => this.endDrawing(e), onMouseDown: e => this.startDrawing(e), onMouseMove: e => this.moveDrawing(e), onMouseUp: e => this.endDrawing(e) }), index.h("canvas", { key: '3be84d339b42c57bb9543d50dabac45b345d7744', ref: el => (this.imageCanvasEl = el), style: { display: 'none' } }), index.h("span", { key: '03b3a54198b7e4115ded1ee51dfae47a03958f3f', class: "cty-canvas-board__eraser-circle", ref: el => (this.eraserEl = el) }), this.isCanvasEmpty && index.h("slot", { key: '40f663e90e0ac2e8eec1c173d92d4f2afbb17197', name: "placeholder" }), index.h("slot", { key: 'c5ce29e7aef527910d6ab7593675475e1c83e465' })), index.h("slot", { key: '41f037aa77b7c4b02b882d74b384816c03f1a498', name: "footer" }), this.footerOpn && (index.h("div", { key: 'e8a967e7a47e2803942c5758805485b45ff05de3', class: "cty-canvas-board__footer flex-center" }, index.h("slot", { key: '8c792a5b6b0bed91769061f1f08dcce4c857df72', name: "footer-start" }), this.pencilIcon && (index.h("button", { key: 'd38bd9c14fb12ef9df57140119a9cc73958eb183', class: "cty-button-native cty-canvas-board__pen", onClick: e => this.updatePencil(e) }, index.h("cty-icon", { key: 'be9d5a10731393ae63743ff48d9fcab513a4194d', name: this.pencilIcon, class: { 'cty-canvas-board__footer-active': !this.isEraser } }))), index.h("button", { key: '7f7ac5a80313a8091be48557d660b2437c96bc84', class: "cty-button-native cty-canvas-board__eraser", onClick: () => (this.isEraser = !this.isEraser) }, index.h("cty-icon", { key: '27b2c2fac487a6e6c64e2901ecda959b5986e53c', name: this.eraserIcon, class: { 'cty-canvas-board__footer-active': this.isEraser } })), index.h("button", { key: 'd4a8a76108b5a0daffe6363a00a831c6ea2f1f5b', class: "cty-button-native cty-canvas-board__color-button", onClick: () => this.updateColor() }, index.h("input", { key: 'd112d696ffdc60f3bab52d5a353cb240ea46f69b', type: "color", value: this.strokeColor, class: "cty-canvas-board__picker-color", ref: el => (this.colorPickerEl = el), onInput: (e) => this.penColorChange(e) })), index.h("slot", { key: '9e7c87513fed66167fc8d222510090c7cd1195b3', name: "footer-end" }))), index.h("slot", { key: 'a7319635e7d42639532bb2eb8233a44190ca91c3', name: "bottom" }), this.showButtons && (index.h("div", { key: '7d8a64385d94fe7c581266242e0c36d792eb500d', class: "cty-canvas-board__buttons flex-justify-end" }, index.h("slot", { key: '81f318a6785818049ad7495992d4ec9712a782f5', name: "bottom-button-start" }), index.h("button", { key: '1a2f3161c2525d8ba1e1570285d0afbfd5cac710', class: "cty-canvas-board__button cty-button-native", onClick: () => this.clear() }, this.clearLabel), index.h("button", { key: '094fe6960e7eaeb06f94554d42564c07a9c80b92', class: "cty-canvas-board__button cty-button-native", onClick: () => this.confirm() }, this.confirmLabel), index.h("slot", { key: '3a4e37ea42b3bd2e3653fc8488b4ca8e33055946', name: "bottom-button-end" }))), this.renderPopover()));
208
208
  }
209
209
  get el() { return index.getElement(this); }
210
210
  };
@@ -769,7 +769,7 @@ const CanvasVideo = class {
769
769
  }, onTransitionEnd: () => this.transitionend() }, index.h("div", { class: "cty-canvas-video__progress-inner" }))), !this.isVertical && this.isMove && !!this.progressBar && (index.h("div", { class: "cty-canvas-video__time" }, index.h("span", { class: "cty-canvas-video__time-left" }, this.transTime(this.pTime)), index.h("span", { class: "cty-canvas-video__time-center" }, "/"), index.h("span", { class: "cty-canvas-video__time-right" }, this.transTime(this.pDuration)))), !(!this.isVertical && this.isMove && !!this.progressBar) && (index.h("div", { class: "cty-canvas-video__content" }, option.renderSlot !== 'content' && (index.h("div", { class: "cty-canvas-video__content-box" }, index.h("div", { class: "cty-canvas-video__tip" }, index.h("cty-icon", { name: "cty-lamp" }), option[this._props.tip || 'tip']), index.h("p", { class: "cty-canvas-video__date" }, option[this._props.date || 'date']), index.h("p", { class: "cty-canvas-video__description" }, option[this._props.description || 'description']), index.h("button", { class: "cty-canvas-video__name cty-button-native", onClick: e => this.clickName(e) }, '@' + option[this._props.name || 'name']))), option.contentRender !== undefined && index.h("slot", { name: option.contentRender }))), !(!this.isVertical && this.isMove && !!this.progressBar) && (index.h("div", { class: "cty-canvas-video__sidebar" }, option.renderSlot !== 'sidebar' && (index.h("button", { class: "cty-canvas-video__avatar cty-button-native", onClick: e => this.clickAvatar(e) }, index.h("img", { src: option[this._props.avatar || 'avatar'] }), this.avatarButton && index.h("span", { class: "cty-canvas-video__avatar-button" }, this.avatarButton))), option.renderSlot !== 'sidebar' && option[this._props.likeCount || 'likeCount'] && (index.h("button", { class: "cty-canvas-video__sidebar-item cty-button-native", onClick: e => this.clickLike(e) }, index.h("cty-icon", { name: "cty-thumb" }), index.h("span", null, option[this._props.likeCount || 'likeCount']))), option.renderSlot !== 'sidebar' && option[this._props.viewCount || 'viewCount'] && (index.h("button", { class: "cty-canvas-video__sidebar-item cty-button-native" }, index.h("cty-icon", { name: "cty-eye" }), index.h("span", null, option[this._props.viewCount || 'viewCount']))), option.renderSlot !== 'sidebar' && option[this._props.collectCount || 'collectCount'] && (index.h("button", { class: "cty-canvas-video__sidebar-item cty-button-native", onClick: e => this.clickCollect(e) }, index.h("cty-icon", { name: "cty-star" }), index.h("span", null, option[this._props.collectCount || 'collectCount']))), option.sidebarRender !== 'sidebar' && (index.h("button", { class: "cty-canvas-video__sidebar-item cty-button-native", onClick: e => this.clickShare(e) }, index.h("cty-icon", { name: "cty-share" }), index.h("span", null, "\u5206\u4EAB"))), option.sidebarRender !== undefined && index.h("slot", { name: option.sidebarRender }))))));
770
770
  }
771
771
  render() {
772
- return (index.h(index.Host, { key: 'c9247641307c3565f4162b4ac9527af5901f0d57', class: "cty-canvas-video" }, index.h("div", { key: '1064099a468d1cb4e1bfcbfcba86726c7b03a778', class: "cty-canvas-videos" }, index.h("video", { key: 'd07090531623c5def3b458f32882ecbd3f79d760', ref: el => (this.videoEl1 = el), preload: this.preload, "x5-video-player-type": "h5", "x5-video-player-fullscreen": "true", playsinline: true, "webkit-playsinline": true, onTimeUpdate: () => this.videoTimeupdate1(), onEnded: () => this.videoEnded(), src: this.videoUrl1, typeof: "video/mp4", autoplay: this.autoplay && this.videoIndex == 0 }), index.h("video", { key: '5a3cce01cf472b86a2fb57ec2c3152537cae51c3', ref: el => (this.videoEl2 = el), preload: this.preload, "x5-video-player-type": "h5", "x5-video-player-fullscreen": "true", playsinline: true, "webkit-playsinline": true, onTimeUpdate: () => this.videoTimeupdate2(), onEnded: () => this.videoEnded(), src: this.videoUrl2, typeof: "video/mp4", autoplay: this.autoplay && this.videoIndex == 1 }), index.h("video", { key: '10972bbb0330fe362e7182f672d09fcfbf8722f2', ref: el => (this.videoEl3 = el), preload: this.preload, "x5-video-player-type": "h5", "x5-video-player-fullscreen": "true", playsinline: true, "webkit-playsinline": true, onTimeUpdate: () => this.videoTimeupdate3(), onEnded: () => this.videoEnded(), src: this.videoUrl3, typeof: "video/mp4", autoplay: this.autoplay && this.videoIndex == 2 })), index.h("div", { key: '4970e44d666e586da384372056a835b226ab7529', class: "cty-canvas-video__slides", ref: el => (this.videoSlidesEl = el) }, this.renderSlide())));
772
+ return (index.h(index.Host, { key: 'f8c538c55322d321377e2126501c3050e822b3e2', class: "cty-canvas-video" }, index.h("div", { key: '21d4c6f094f8eeb9c96dced1a7487faae9c82ec4', class: "cty-canvas-videos" }, index.h("video", { key: 'da6db380316549fe168a05a75c4c8d735a965f8b', ref: el => (this.videoEl1 = el), preload: this.preload, "x5-video-player-type": "h5", "x5-video-player-fullscreen": "true", playsinline: true, "webkit-playsinline": true, onTimeUpdate: () => this.videoTimeupdate1(), onEnded: () => this.videoEnded(), src: this.videoUrl1, typeof: "video/mp4", autoplay: this.autoplay && this.videoIndex == 0 }), index.h("video", { key: 'cfc6431ea3c65228bff76cb5984b656d6ce1e607', ref: el => (this.videoEl2 = el), preload: this.preload, "x5-video-player-type": "h5", "x5-video-player-fullscreen": "true", playsinline: true, "webkit-playsinline": true, onTimeUpdate: () => this.videoTimeupdate2(), onEnded: () => this.videoEnded(), src: this.videoUrl2, typeof: "video/mp4", autoplay: this.autoplay && this.videoIndex == 1 }), index.h("video", { key: '9482762c33cecb5465f194e0f2ce571a3c3b12ec', ref: el => (this.videoEl3 = el), preload: this.preload, "x5-video-player-type": "h5", "x5-video-player-fullscreen": "true", playsinline: true, "webkit-playsinline": true, onTimeUpdate: () => this.videoTimeupdate3(), onEnded: () => this.videoEnded(), src: this.videoUrl3, typeof: "video/mp4", autoplay: this.autoplay && this.videoIndex == 2 })), index.h("div", { key: 'b32eb36ff437a1884eaa64ae94e09f39c288e5ee', class: "cty-canvas-video__slides", ref: el => (this.videoSlidesEl = el) }, this.renderSlide())));
773
773
  }
774
774
  get el() { return index.getElement(this); }
775
775
  static get watchers() { return {
@@ -110,13 +110,13 @@ const CascaderView = class {
110
110
  }
111
111
  render() {
112
112
  const levels = this.getLevels();
113
- return (index.h(index.Host, { key: '02b0f40ab83b2f227be69ada8954abeb95ccd0ae', class: "cty-cascader-view" }, index.h("div", { key: '33be506937c8a4438a3002dad686e0680fdde965', class: "cty-cascader-tabs" }, levels.map((level, index$1) => (index.h("div", { class: {
113
+ return (index.h(index.Host, { key: '0e088b5852a0d7b895e1df2af144a5ba7b2627d2', class: "cty-cascader-view" }, index.h("div", { key: 'c587171c7a6a0860a7623c6ab7f0aa2ba1b564e5', class: "cty-cascader-tabs" }, levels.map((level, index$1) => (index.h("div", { class: {
114
114
  'cty-cascader-tab': true,
115
115
  'cty-cascader-tab-active': this.tabActiveIndex === index$1,
116
- }, part: "tab-item", onClick: () => this.onTabChange(index$1) }, index.h("div", { class: "cty-cascader-header-title", ref: el => (this.tabRefs[index$1] = el) }, level.selected ? level.selected[this.props.label] : this.placeholder)))), index.h("div", { key: 'cfdf8e4d323feba09c2f869c9188e349c439d831', class: "cty-cascader-tab-underline", style: {
116
+ }, part: "tab-item", onClick: () => this.onTabChange(index$1) }, index.h("div", { class: "cty-cascader-header-title", ref: el => (this.tabRefs[index$1] = el) }, level.selected ? level.selected[this.props.label] : this.placeholder)))), index.h("div", { key: '514114f4fa21eae5fb109df308c44c0f4ea76d83', class: "cty-cascader-tab-underline", style: {
117
117
  width: `${this.underlineWidth}px`,
118
118
  transform: `translateX(${this.underlineLeft}px)`,
119
- } })), index.h("div", { key: '67bbfb1a0b7df79506e672cc25582e63cabb499d', class: "cty-cascader-content" }, (() => {
119
+ } })), index.h("div", { key: '564a6c3b894182929571d48eca0ea6084d914062', class: "cty-cascader-content" }, (() => {
120
120
  const level = levels[this.tabActiveIndex];
121
121
  if (!level)
122
122
  return null;
@@ -396,7 +396,7 @@ const Cascader = class {
396
396
  this.ctyConfirm.emit({ values, indexes, options });
397
397
  }
398
398
  render() {
399
- return (index.h(index.Host, { key: 'f77c6e1424f111bc8d37bd12b12070feb39101cf', class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, index.h("cty-backdrop", { key: '95b6eaafaf4803d2a86a5110855541ad67f6e49e', position: "bottom", backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, index.h("div", { key: '572fceaf785626fac23dda2bce92bf5a6286d868', class: "cty-cascader", part: "cascader", onClick: (e) => e.stopPropagation() }, index.h("slot", { key: '0942125916bf919c0a65e5627331126afded4826', name: 'header' }), index.h("div", { key: 'd6df99527b420d74799fc46c0cc6bd705e1a8029', class: "cty-cascader-header", part: "header" }, index.h("button", { key: '62d51a685660ea3f72cb43ae86e11f95aa829359', onClick: () => this.dismiss(), class: "cancel cty-button-native" }, this.cancelText), index.h("div", { key: '4e24518a56ef746cbc8416817fa22d2bd64befbe', class: "cty-cascader-title" }, this.title), index.h("button", { key: 'bb2cd0c4f2300fb9880038e2e9ba516b1ec479b0', onClick: () => this.confirm(), class: "confirm cty-button-native" }, this.confirmText)), index.h("div", { key: 'eff01b56ebb0abeda07bab0ade1532f7555484b3', class: "cty-cascader-columns", part: "columns", style: { height: this.columnHeight + 'px' } }, this.scrollColumns.map(c => index.h("div", { class: "cty-cascader-column", onTouchStart: (e) => this.handleTouchstart(e, c), onTouchMove: (e) => this.handleTouchmove(e, c), onTouchEnd: () => this.handleTouchend(c), onMouseDown: (e) => this.handleTouchstart(e, c), onMouseMove: (e) => this.handleTouchmove(e, c), onMouseUp: () => this.handleTouchend(c) }, index.h("div", { ref: (el) => this.setScrollEl(el, c), class: "cty-cascader-scroller", style: { transform: 'translateY(' + c.translate + 'px)', 'transition-duration': c.duration + 'ms', 'transition-property': c.duration ? 'transform' : 'none' }, onTransitionEnd: () => this.handleTransitionend(c) }, c.column.map((option, i) => index.h("div", { class: 'cty-cascader-option ' + (option.className || ''), style: { height: this.optionHeight + 'px' }, onClick: () => this.handleClick(c, i) }, index.h("div", { class: 'cty-cascader-text ' + (option.textClassName || '') }, option[this.textKey])))))), index.h("div", { key: 'dbf1e0cb4fb9134316f93c6a3030237dde566f7b', class: "cty-cascader-picked", style: { top: this.center + 'px', height: this.optionHeight + 'px' } }), index.h("div", { key: '537c696af3cdb849c6beb2a8cd3d2dccb2921333', class: "cty-cascader-mask", style: { 'background-size': '100% ' + (this.columnHeight - this.optionHeight) / 2 + 'px' } }))))));
399
+ return (index.h(index.Host, { key: '97e5ba39b37f33da627e357ca5398b6aef2c203f', class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { 'overlay-hidden': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, index.h("cty-backdrop", { key: 'b1d162c9aec1551acd7c7b27109bc56f1920a085', position: "bottom", backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, index.h("div", { key: '61fd570a4c6c6834931d560c8a7fd9f3b86fbaf3', class: "cty-cascader", part: "cascader", onClick: (e) => e.stopPropagation() }, index.h("slot", { key: 'ad35d68959c51871e694738e5f5c74667df19958', name: 'header' }), index.h("div", { key: 'c1f09c031b41362be4b1623370c16878b1c1a8dc', class: "cty-cascader-header", part: "header" }, index.h("button", { key: '4b59e5a0e7745dc2221a4043cd7685015c308a0c', onClick: () => this.dismiss(), class: "cancel cty-button-native" }, this.cancelText), index.h("div", { key: 'a338cb8c142934f2bf62125c7072245edd5ba7bf', class: "cty-cascader-title" }, this.title), index.h("button", { key: 'b19bfb4f26f7c4ec012a8c7e566e0885da677f92', onClick: () => this.confirm(), class: "confirm cty-button-native" }, this.confirmText)), index.h("div", { key: 'fbb92633280ca5d57b46fa7d2993962627a555df', class: "cty-cascader-columns", part: "columns", style: { height: this.columnHeight + 'px' } }, this.scrollColumns.map(c => index.h("div", { class: "cty-cascader-column", onTouchStart: (e) => this.handleTouchstart(e, c), onTouchMove: (e) => this.handleTouchmove(e, c), onTouchEnd: () => this.handleTouchend(c), onMouseDown: (e) => this.handleTouchstart(e, c), onMouseMove: (e) => this.handleTouchmove(e, c), onMouseUp: () => this.handleTouchend(c) }, index.h("div", { ref: (el) => this.setScrollEl(el, c), class: "cty-cascader-scroller", style: { transform: 'translateY(' + c.translate + 'px)', 'transition-duration': c.duration + 'ms', 'transition-property': c.duration ? 'transform' : 'none' }, onTransitionEnd: () => this.handleTransitionend(c) }, c.column.map((option, i) => index.h("div", { class: 'cty-cascader-option ' + (option.className || ''), style: { height: this.optionHeight + 'px' }, onClick: () => this.handleClick(c, i) }, index.h("div", { class: 'cty-cascader-text ' + (option.textClassName || '') }, option[this.textKey])))))), index.h("div", { key: '8e968e7accfba77c182c23f34fdb7f4eb5dd6e20', class: "cty-cascader-picked", style: { top: this.center + 'px', height: this.optionHeight + 'px' } }), index.h("div", { key: 'd00cf3538a16042826c872d618438b608c20168f', class: "cty-cascader-mask", style: { 'background-size': '100% ' + (this.columnHeight - this.optionHeight) / 2 + 'px' } }))))));
400
400
  }
401
401
  get el() { return index.getElement(this); }
402
402
  static get watchers() { return {
@@ -0,0 +1,82 @@
1
+ 'use strict';
2
+
3
+ var index = require('./index-DCK462Hl.js');
4
+
5
+ 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%)}";
6
+
7
+ const Circle = class {
8
+ constructor(hostRef) {
9
+ index.registerInstance(this, hostRef);
10
+ this.rate = 0;
11
+ this.width = 40;
12
+ this.color = 'var(--cty-color-primary)';
13
+ this.text = '';
14
+ this.clockwise = true;
15
+ this.zeroTransparent = true;
16
+ this.rad = 500;
17
+ this.ratio = 1;
18
+ this.widthDif = 1;
19
+ this.offset = 0;
20
+ this.needDefs = false;
21
+ this.gradientId = '';
22
+ this.colors = [];
23
+ this.perimeter = 0;
24
+ }
25
+ watchColorHandler() {
26
+ this.needDefs = this.color instanceof Object;
27
+ if (this.needDefs) {
28
+ this.colors = Object.keys(this.color).sort((a, b) => parseFloat(a) - parseFloat(b)).map((key) => ({
29
+ offset: key.toString(),
30
+ color: this.color[key]
31
+ }));
32
+ this.updateSVGAttr();
33
+ }
34
+ }
35
+ watchRadHandler() {
36
+ this.perimeter = 2 * 3.14 * this.rad;
37
+ this.updateSVGAttr();
38
+ }
39
+ updateSVGAttr() {
40
+ var _a, _b, _c, _d;
41
+ (_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}`);
42
+ (_b = this.layerEl) === null || _b === void 0 ? void 0 : _b.setAttribute('d', this._getPath());
43
+ (_c = this.hoverEl) === null || _c === void 0 ? void 0 : _c.setAttribute('d', this._getPath());
44
+ Array.from(((_d = this.svgEl) === null || _d === void 0 ? void 0 : _d.querySelectorAll('stop')) || []).forEach((stopEL, index) => {
45
+ stopEL.setAttribute('key', index.toString());
46
+ stopEL.setAttribute('offset', this.colors[index].offset);
47
+ stopEL.setAttribute('stop-color', this.colors[index].color);
48
+ });
49
+ }
50
+ componentWillLoad() {
51
+ this.perimeter = 2 * 3.14 * this.rad;
52
+ this.gradientId = 'cty-circle-' + Math.random().toFixed(12).slice(2);
53
+ this.watchColorHandler();
54
+ }
55
+ componentDidLoad() {
56
+ this.updateSVGAttr();
57
+ }
58
+ _getPath() {
59
+ const { rad, width, offset, clockwise } = this;
60
+ const viewBoxSize = +width + rad * 2 + offset * 2;
61
+ const sweepFlag = clockwise ? 1 : 0;
62
+ 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}`;
63
+ }
64
+ render() {
65
+ return (index.h(index.Host, { key: '2f368270af4614789d5598e5bc90b3e2ef057989', class: "cty-circle" }, index.h("svg", { key: '1df0553171d9fec249e84cf41f710826f49b3026', ref: el => (this.svgEl = el) }, this.needDefs && index.h("defs", { key: 'd57f574b35bbf69c57fc40803f3f7fb9acbcf9a9' }, index.h("linearGradient", { key: 'cf43aa12f3d51cf6a243f9638de9dedf2257280a', 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: 'b5f534ab0dae045ee9d90f7dc9ca7781858e75f7', ref: el => (this.layerEl = el), class: "cty-circle__layer", style: {
66
+ 'stroke-width': this.width + 'px',
67
+ 'strokeDasharray': (this.ratio * this.perimeter) + 'px ' + this.perimeter + 'px'
68
+ } }), index.h("path", { key: 'c0e0e7bde4ee4218d369f0a68c45bdcc41b9bf6f', ref: el => (this.hoverEl = el), class: "cty-circle__hover", style: {
69
+ 'stroke': this.rate <= 0 && this.zeroTransparent ? 'transparent' : this.needDefs ? 'url(#' + this.gradientId + ')' : this.color,
70
+ 'stroke-width': +this.width + this.widthDif + 'px',
71
+ 'strokeDasharray': (this.ratio * this.rate / 100 * this.perimeter) + 'px ' + this.perimeter + 'px'
72
+ } })), this.text !== '' && index.h("div", { key: '87e72df56f972317345f50b3b7e82ff002df5048', class: "cty-circle__text" }, this.text), index.h("slot", { key: '269615587b996b6dc54c2a3390a0ef47ff08fb4c' })));
73
+ }
74
+ get el() { return index.getElement(this); }
75
+ static get watchers() { return {
76
+ "color": ["watchColorHandler"],
77
+ "rad": ["watchColorHandler", "watchRadHandler"]
78
+ }; }
79
+ };
80
+ Circle.style = circleCss;
81
+
82
+ exports.cty_circle = Circle;
@@ -143,8 +143,8 @@ const CountDown = class {
143
143
  return timeText;
144
144
  }
145
145
  render() {
146
- return (index.h(index.Host, { key: '2f81e4f12a44af17c35088f25634497f32abc9c5', class: "cty-count-down" }, !this.isSingle &&
147
- this.timeRange.map((item, idx) => (index.h("div", { class: "cty-count-down__item", part: "item" }, index.h("span", { class: "cty-count-down__label", part: "label" }, format.pad(this.timeData[item], 2) || this.timeData[item]), (this.unit || idx !== this.timeRange.length - 1) && index.h("span", { class: "cty-count-down__unit" }, this.unit ? this.dateFormatUnit[item] : ':')))), this.isSingle && (index.h("div", { key: 'fafb431baf155e6ddb6d9288b2fcb28cc4afc50f', class: "cty-count-down__item", part: "item" }, index.h("span", { key: '7c5e49d9a4e4459c7804afd8e6c7c1fd21d91892', class: "cty-count-down__label", part: "label" }, " ", this.formattedTime, " "))), index.h("slot", { key: '7a60d356c17a00eb9700e034fe20efc9f0b16398' })));
146
+ return (index.h(index.Host, { key: 'd2d208764379ab3b71735d5d171020fb423a71bd', class: "cty-count-down" }, !this.isSingle &&
147
+ this.timeRange.map((item, idx) => (index.h("div", { class: "cty-count-down__item", part: "item" }, index.h("span", { class: "cty-count-down__label", part: "label" }, format.pad(this.timeData[item], 2) || this.timeData[item]), (this.unit || idx !== this.timeRange.length - 1) && index.h("span", { class: "cty-count-down__unit" }, this.unit ? this.dateFormatUnit[item] : ':')))), this.isSingle && (index.h("div", { key: 'd2736b2880e5a30d7ecb9d4ee94049dfc4fa82d0', class: "cty-count-down__item", part: "item" }, index.h("span", { key: '97ee81f41d93a9c1dfc1cda655f820193eec9524', class: "cty-count-down__label", part: "label" }, " ", this.formattedTime, " "))), index.h("slot", { key: '5d87201788959f4858f432e72be3cff75b7c081e' })));
148
148
  }
149
149
  get el() { return index.getElement(this); }
150
150
  };
@@ -18,10 +18,10 @@ const Divider = class {
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 (index.h(index.Host, { key: 'b9d087dcfbc973c32966363e2db037fafe7ceb78', class: {
21
+ return (index.h(index.Host, { key: 'dfd49737a845112f77896befa6ac9926a1951f48', class: {
22
22
  'cty-divider': true,
23
23
  [classRet]: true
24
- } }, index.h("slot", { key: 'ee440ec8f5ff56d81bde3d950e4c78d42219582c' })));
24
+ } }, index.h("slot", { key: '8799145031bc0605e950b4f9d3cb6632d65fd54e' })));
25
25
  }
26
26
  get el() { return index.getElement(this); }
27
27
  };
@@ -100,24 +100,24 @@ const Dropdown = class {
100
100
  }
101
101
  render() {
102
102
  const { elRect, innerOptions, tabActiveIndex, arrowIcon, innerValue, direction } = this;
103
- return (index.h(index.Host, { key: '5cd075db391b80bff2c3802c5864ffe76b9931c2', class: {
103
+ return (index.h(index.Host, { key: '8bafea86f2e4f369aa9c91c53b53d5bda24429c6', class: {
104
104
  'cty-dropdown': true,
105
105
  'cty-dropdown-open': tabActiveIndex !== -1,
106
- } }, index.h("div", { key: 'fbf91dbc7e7636adadcdabc7751dd74582e293cd', class: "cty-dropdown-nav" }, innerOptions.map((option, index$1) => (index.h("div", { class: {
106
+ } }, index.h("div", { key: '53b674e74ef38333347878e6d24f55d082822e4c', class: "cty-dropdown-nav" }, innerOptions.map((option, index$1) => (index.h("div", { class: {
107
107
  'cty-dropdown-item': true,
108
108
  'cty-dropdown-item__disabled': !!option.disabled,
109
109
  'cty-dropdown-item__active': index$1 === tabActiveIndex,
110
110
  }, onClick: () => this.toggleNavPop(index$1) }, index.h("div", { class: "cty-dropdown-item-title flex-center" }, index.h("span", { class: "cty-dropdown-item-title-text" }, option.label), index.h("span", { class: {
111
111
  'cty-dropdown-item-title-arrow': true,
112
112
  'cty-dropdown-item-title-arrow__active': index$1 === tabActiveIndex,
113
- } }, index.h("cty-icon", { name: option.arrowIcon || arrowIcon }))))))), index.h("div", { key: '11c4c8c68c670c92ae86af2e105969b2daffdd6e', class: {
113
+ } }, index.h("cty-icon", { name: option.arrowIcon || arrowIcon }))))))), index.h("div", { key: '70758a011ed538e3a9215bf6a00431ba99f4cbad', class: {
114
114
  'cty-dropdown-popup': true,
115
115
  'cty-dropdown-popup__visible': tabActiveIndex != -1,
116
116
  }, style: {
117
117
  top: `${direction == 'up' ? 0 : elRect.bottom}px`,
118
118
  bottom: `${direction == 'up' ? 'auto' : 0}`,
119
119
  height: `${direction == 'up' ? `${elRect.top}px` : 'auto'}`
120
- } }, index.h("div", { key: 'f7f816b8237b11c4a46a08fc474e5a6ffa35ca46', class: "cty-dropdown-popup-mask", onClick: this.handleMaskClick }), index.h("div", { key: '73a5db305846157a312f197045cfb1fa2f221a0c', class: "cty-dropdown-popup-body", style: { bottom: `${direction == 'up' ? '0px' : 'auto'}` } }, innerOptions.map((option, index$1) => {
120
+ } }, index.h("div", { key: 'd7212399b2011a0ae339c742cea1affd0697050a', class: "cty-dropdown-popup-mask", onClick: this.handleMaskClick }), index.h("div", { key: '1a774b0f33129111ad07eccbe1ec137f59512ffc', class: "cty-dropdown-popup-body", style: { bottom: `${direction == 'up' ? '0px' : 'auto'}` } }, innerOptions.map((option, index$1) => {
121
121
  if (index$1 != tabActiveIndex)
122
122
  return null;
123
123
  return (index.h("slot", { name: "content" }, index.h("div", { class: "cty-dropdown-popup-content" }, option.children && Array.isArray(option.children) && option.children.map((child, index$1) => (index.h("slot", { name: 'content-item' + index$1 }, index.h("div", { class: { 'cty-dropdown-popup-item': true, "cty-dropdown-popup-item__active": innerValue[tabActiveIndex] == child.key }, onClick: () => this.handleItemClick(child) }, child.label)))))));
@@ -12,7 +12,7 @@ const Empty = class {
12
12
  }
13
13
  render() {
14
14
  const image = this.image === undefined ? (config.config.get('resUrlPrefix', '') + 'assets/cty_res/svg/cty-no-data.svg') : this.image;
15
- return (index.h(index.Host, { key: '4eb56b280eeb9f0fbe4b67cd71a558cf0f0bc7e2', class: "cty-empty" }, index.h("slot", { key: '241e56e654739d1edb6af501f37652ffd07d834e', name: "top" }), image && index.h("img", { key: '429d88a5b6b0c24b6db1e877afb514189fb26eb5', class: "cty-empty__image", src: image }), index.h("slot", { key: '41e9cfc4948a4a72dbf83d992db62bba8269781c', name: "image" }), this.description && index.h("p", { key: '4cb5825ef8ad176b427d14595d8892cae299fdc1', class: "cty-empty__description" }, this.description), index.h("slot", { key: 'f0b31f8bdd3749419cb11d776191169b1f692b7c', name: "description" })));
15
+ return (index.h(index.Host, { key: 'd3c212326854e78a39d572a26ad41bea325c281a', class: "cty-empty" }, index.h("slot", { key: '99cd7aed9db5764d586d5e51fca62ce44c20d6d3', name: "top" }), image && index.h("img", { key: 'f35737267d6e8f89c288acff429c76168f48117f', class: "cty-empty__image", src: image }), index.h("slot", { key: '47c776265f6db9018f2161e5ccddee5b03c511d2', name: "image" }), this.description && index.h("p", { key: '974e5071b52337bd6e2304b6dabbc34ea0aa0455', class: "cty-empty__description" }, this.description), index.h("slot", { key: '86322cbea30f876cbd774c6cf291d2ee7a650c29', name: "description" })));
16
16
  }
17
17
  static get assetsDirs() { return ["assets"]; }
18
18
  get el() { return index.getElement(this); }
@@ -146,7 +146,7 @@ const FloatingBubble = class {
146
146
  return touch;
147
147
  }
148
148
  render() {
149
- return (index.h(index.Host, { key: 'e0ec234a20abec0ba7294d31656bfbc89f8974ff', class: "cty-floating-bubble", onTouchStart: () => this.onTouchStart(), onTouchMove: (e) => this.onTouchMove(e), onTouchEnd: (e) => this.onTouchEnd(e), onTouchCancel: (e) => this.onTouchEnd(e), onMouseDown: () => this.onTouchStart(), onMouseMove: (e) => this.onTouchMove(e), onMouseUp: (e) => this.onTouchEnd(e), onMouseLeave: (e) => this.onTouchEnd(e), onClick: (e) => this.onClick(e), style: this.rootStyle }, this.icon && (index.h("cty-icon", { key: '84dd9f24811481d7a513d10242deecc7678a2255', class: "cty-floating-bubble__icon", name: this.icon })), index.h("slot", { key: 'bc7ea18aa26283be64dd255b78f3df8010bc577d' })));
149
+ return (index.h(index.Host, { key: '97cb474b7ab53050d951abbcfc30690a7e023748', class: "cty-floating-bubble", onTouchStart: () => this.onTouchStart(), onTouchMove: (e) => this.onTouchMove(e), onTouchEnd: (e) => this.onTouchEnd(e), onTouchCancel: (e) => this.onTouchEnd(e), onMouseDown: () => this.onTouchStart(), onMouseMove: (e) => this.onTouchMove(e), onMouseUp: (e) => this.onTouchEnd(e), onMouseLeave: (e) => this.onTouchEnd(e), onClick: (e) => this.onClick(e), style: this.rootStyle }, this.icon && (index.h("cty-icon", { key: 'e52b2c3c36f9eb49bf6205e7165184f9dc8d812e', class: "cty-floating-bubble__icon", name: this.icon })), index.h("slot", { key: 'd1b5b73767f2178bbe8386574623c07d2d7ab120' })));
150
150
  }
151
151
  get el() { return index.getElement(this); }
152
152
  };
@@ -98,15 +98,15 @@ const FloatingPanel = class {
98
98
  return moveY;
99
99
  }
100
100
  render() {
101
- return (index.h(index.Host, { key: '2d14123d617d72dc55d2d0985c96356136ef31ee', class: "cty-floating-panel flex-column", onTouchStart: (e) => this.dragStart(e), onTouchMove: (e) => this.dragMove(e), onTouchEnd: () => this.dragEnd(), onMouseDown: (e) => this.dragStart(e), onMouseMove: (e) => this.dragMove(e), onMouseUp: () => this.dragEnd() }, index.h("div", { key: '641a8326446112be8c8b2648e4beec20a62b4ee4', class: "cty-floating-panel__header flex-center", onTouchStart: () => {
101
+ return (index.h(index.Host, { key: '84e095dd2833d15ab639424b2223afb62bcd5e98', class: "cty-floating-panel flex-column", onTouchStart: (e) => this.dragStart(e), onTouchMove: (e) => this.dragMove(e), onTouchEnd: () => this.dragEnd(), onMouseDown: (e) => this.dragStart(e), onMouseMove: (e) => this.dragMove(e), onMouseUp: () => this.dragEnd() }, index.h("div", { key: '8cafd61f7a921d19396803366fcaddef9dc1ebe4', class: "cty-floating-panel__header flex-center", onTouchStart: () => {
102
102
  this.setContentTouched(false);
103
103
  }, onMouseDown: () => {
104
104
  this.setContentTouched(false);
105
- } }, index.h("slot", { key: 'd18478ad493c3dbe4d43272c5c6ab47f66352d71', name: "icon-start" }), this.icon && index.h("cty-icon", { key: 'a283b28aa84e3690ffdebf8a4e2300935412d757', class: "cty-floating-panel__header-bar", name: this.icon }), index.h("slot", { key: '4afa066649dc4f0a0560d7c6f0b6ae04062ed19c', name: "icon-end" })), index.h("div", { key: '6ab596de7f2cc199e05fa35dfff2b1ecf8961c05', class: "cty-floating-panel__content", ref: (el) => (this.contentRef = el), onTouchStart: () => {
105
+ } }, index.h("slot", { key: '3a02e10265abb6a0e033ff3ce6b2f036895b93e6', name: "icon-start" }), this.icon && index.h("cty-icon", { key: 'd07f4568b56789c94bce86ef03d4a09c761e9982', class: "cty-floating-panel__header-bar", name: this.icon }), index.h("slot", { key: '6f6433977a63eef657904e97dbb62c47ec7588b2', name: "icon-end" })), index.h("div", { key: '1e8dd947664b007cd3cf65d338765deca37b6873', class: "cty-floating-panel__content", ref: (el) => (this.contentRef = el), onTouchStart: () => {
106
106
  this.setContentTouched(true);
107
107
  }, onMouseDown: () => {
108
108
  this.setContentTouched(true);
109
- } }, index.h("slot", { key: 'b30f4baa0659d53c5012092f324d10e64f7207e1' }))));
109
+ } }, index.h("slot", { key: 'b2e668b305866b48ca8ab522c714e648755fdafd' }))));
110
110
  }
111
111
  get el() { return index.getElement(this); }
112
112
  };
@@ -39,7 +39,7 @@ const Icon = class {
39
39
  }
40
40
  }
41
41
  render() {
42
- return (index.h(index.Host, { key: 'a76d38557cc02e2ed4655a270b160b2d1b4e00d8', class: "cty-icon" }, index.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 })));
42
+ return (index.h(index.Host, { key: '03ee82eb0f6aae454d57b5f3c09c4188c72e7a69', class: "cty-icon" }, index.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 })));
43
43
  }
44
44
  static get assetsDirs() { return ["assets"]; }
45
45
  get el() { return index.getElement(this); }
@@ -94,7 +94,7 @@ const ImageUpload = class {
94
94
  this.ctyDeleteImage.emit(this.internalImages);
95
95
  }
96
96
  render() {
97
- return (index.h(index.Host, { key: 'c74ff7c9782bd2d28df239249336aab72814307e', class: "cty-image-upload flex-wrap" }, this.internalImages.map((item, idx) => (index.h("div", { class: "cty-image-upload__item", onClick: () => this.handleImageTap(idx) }, index.h("img", { class: "cty-image-upload__item-img", src: item.url, style: { 'object-fit': item.fit } }), this.deleteable && (index.h("div", { class: "cty-image-upload__item-delete flex", onClick: e => this.handleImageDelete(e, idx) }, index.h("slot", { name: "deleteable" }, index.h("cty-icon", { class: "cty-image-upload__item-delete-icon", name: "cty-close2" }))))))), this.internalImages.length < this.count && (index.h("div", { key: 'bc2aca9606226e308fac0da596d9aa7d57c0cdc9', class: "cty-image-upload__item flex-column-center", onClick: () => this.handlePickerImage() }, !this.addImage && this.addIcon && index.h("cty-icon", { key: '71a7f9080d66c77ca6a13e85f442209f7c0ea42f', class: "cty-image-upload__add-icon", name: this.addIcon }), this.addImage && index.h("img", { key: '86c409c6007ab662098dd1c35d437e7b4ccf5192', class: "cty-image-upload__add-image", src: this.addImage }), index.h("slot", { key: '85eddf095240e759f6e8039b443da1b62e8cb206', name: "description" })))));
97
+ return (index.h(index.Host, { key: '6e38c0e2603eb6d73e3987bb7b1e39533a427667', class: "cty-image-upload flex-wrap" }, this.internalImages.map((item, idx) => (index.h("div", { class: "cty-image-upload__item", onClick: () => this.handleImageTap(idx) }, index.h("img", { class: "cty-image-upload__item-img", src: item.url, style: { 'object-fit': item.fit } }), this.deleteable && (index.h("div", { class: "cty-image-upload__item-delete flex", onClick: e => this.handleImageDelete(e, idx) }, index.h("slot", { name: "deleteable" }, index.h("cty-icon", { class: "cty-image-upload__item-delete-icon", name: "cty-close2" }))))))), this.internalImages.length < this.count && (index.h("div", { key: 'bce30f336e45c86a516d0eee56e74ce9b56d86a1', class: "cty-image-upload__item flex-column-center", onClick: () => this.handlePickerImage() }, !this.addImage && this.addIcon && index.h("cty-icon", { key: '6a9074c16b643bf53567bb50d6e38ed295556c9e', class: "cty-image-upload__add-icon", name: this.addIcon }), this.addImage && index.h("img", { key: 'a65c1c2ea4f9b2b415ff5f59cdb7c7b3d549b3d8', class: "cty-image-upload__add-image", src: this.addImage }), index.h("slot", { key: '1aa5b77ea858ed1cc44347754274b81d800e8be9', name: "description" })))));
98
98
  }
99
99
  get el() { return index.getElement(this); }
100
100
  static get watchers() { return {