cty-mui-core 1.0.37 → 1.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/audio-recorder.js +27 -0
- package/components/camera.js +128 -30
- package/components/circle.js +3 -3
- package/components/crop-image.js +1 -1
- package/components/cty-camera-photo.js +112 -37
- package/components/cty-canvas-board.js +1 -1
- package/components/cty-canvas-video.js +1 -1
- package/components/cty-cascader-view.js +3 -3
- package/components/cty-cascader.js +1 -1
- package/components/cty-count-down.js +2 -2
- package/components/cty-dropdown.js +4 -4
- package/components/cty-empty.js +1 -1
- package/components/cty-floating-bubble.js +1 -1
- package/components/cty-floating-panel.js +4 -4
- package/components/cty-image-upload.js +1 -1
- package/components/cty-index-bar.js +2 -2
- package/components/cty-keyboard.js +1 -1
- package/components/cty-loading.js +1 -1
- package/components/cty-media-capture.js +56 -4
- package/components/cty-notice-bar.js +1 -1
- package/components/cty-pdf-viewer.js +1 -1
- package/components/cty-permission-alert.d.ts +11 -0
- package/components/cty-permission-alert.js +6 -0
- package/components/cty-progress.js +1 -1
- package/components/cty-quick-access.js +1 -1
- package/components/cty-rate.js +1 -1
- package/components/cty-record.js +66 -9
- package/components/cty-segment-slides.js +1 -1
- package/components/cty-selector.js +1 -1
- package/components/cty-share-sheet.js +1 -1
- package/components/cty-side-panel.js +1 -1
- package/components/cty-stepper.js +10 -2
- package/components/cty-steps.js +1 -1
- package/components/cty-text-ellipsis.js +2 -2
- package/components/cty-title-bar.js +1 -1
- package/components/cty-tour.js +4 -4
- package/components/cty-tutorial.js +1 -1
- package/components/cty-video.js +2 -2
- package/components/cty-virtual-list.js +12 -7
- package/components/divider.js +2 -2
- package/components/icon.js +1 -1
- package/components/image-picker.js +69 -5
- package/components/image-viewer.js +10 -5
- package/components/index.js +65 -2
- package/components/nav-bar.js +1 -1
- package/components/overlay.js +1 -1
- package/components/permission-alert.js +84 -0
- package/components/permission-purpose.js +1 -1
- package/components/swipe-item.js +2 -2
- package/components/swipe.js +1 -1
- package/components/swiper.js +5 -1
- package/components/video-capture.js +28 -1
- package/dist/cjs/{audio-recorder-ChGIymnF.js → audio-recorder-D3rqlSLq.js} +27 -0
- package/dist/cjs/{camera-preview-CTbXcOZK.js → camera-preview-BylkRIcS.js} +29 -2
- package/dist/cjs/cty-alert_2.cjs.entry.js +26 -67
- package/dist/cjs/cty-camera-photo.cjs.entry.js +59 -8
- package/dist/cjs/cty-camera_2.cjs.entry.js +83 -11
- package/dist/cjs/cty-canvas-board.cjs.entry.js +1 -1
- package/dist/cjs/cty-canvas-video.cjs.entry.js +1 -1
- package/dist/cjs/cty-cascader-view.cjs.entry.js +3 -3
- package/dist/cjs/cty-cascader.cjs.entry.js +1 -1
- package/dist/cjs/cty-circle.cjs.entry.js +82 -0
- package/dist/cjs/cty-count-down.cjs.entry.js +2 -2
- package/dist/cjs/cty-divider.cjs.entry.js +2 -2
- package/dist/cjs/cty-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/cty-empty.cjs.entry.js +1 -1
- package/dist/cjs/cty-floating-bubble.cjs.entry.js +1 -1
- package/dist/cjs/cty-floating-panel.cjs.entry.js +4 -4
- package/dist/cjs/cty-icon.cjs.entry.js +1 -1
- package/dist/cjs/cty-image-upload.cjs.entry.js +1 -1
- package/dist/cjs/cty-image-viewer_6.cjs.entry.js +15 -7
- package/dist/cjs/cty-index-bar.cjs.entry.js +2 -2
- package/dist/cjs/cty-keyboard.cjs.entry.js +1 -1
- package/dist/cjs/cty-loading.cjs.entry.js +1 -1
- package/dist/cjs/cty-media-capture.cjs.entry.js +33 -3
- package/dist/cjs/cty-mui.cjs.js +1 -1
- package/dist/cjs/cty-notice-bar.cjs.entry.js +1 -1
- package/dist/cjs/cty-overlay.cjs.entry.js +1 -1
- package/dist/cjs/cty-pdf-viewer.cjs.entry.js +1 -1
- package/dist/cjs/cty-permission-purpose.cjs.entry.js +1 -1
- package/dist/cjs/cty-progress.cjs.entry.js +1 -1
- package/dist/cjs/cty-quick-access.cjs.entry.js +1 -1
- package/dist/cjs/cty-rate.cjs.entry.js +1 -1
- package/dist/cjs/cty-record.cjs.entry.js +49 -2
- package/dist/cjs/cty-segment-slides.cjs.entry.js +1 -1
- package/dist/cjs/cty-selector.cjs.entry.js +1 -1
- package/dist/cjs/cty-share-sheet.cjs.entry.js +1 -1
- package/dist/cjs/cty-side-panel.cjs.entry.js +1 -1
- package/dist/cjs/cty-stepper.cjs.entry.js +9 -2
- package/dist/cjs/cty-steps.cjs.entry.js +1 -1
- package/dist/cjs/cty-swipe_2.cjs.entry.js +3 -3
- package/dist/cjs/cty-text-ellipsis.cjs.entry.js +2 -2
- package/dist/cjs/cty-title-bar.cjs.entry.js +1 -1
- package/dist/cjs/cty-tour.cjs.entry.js +4 -4
- package/dist/cjs/cty-tutorial.cjs.entry.js +1 -1
- package/dist/cjs/cty-video.cjs.entry.js +2 -2
- package/dist/cjs/cty-virtual-list.cjs.entry.js +11 -7
- package/dist/cjs/{image-picker-BoG8_gzp.js → image-picker-C9sdhsR_.js} +40 -3
- package/dist/cjs/index.cjs.js +68 -4
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{video-capture-C-HjTI17.js → video-capture-BO4sLa1e.js} +28 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/camera/camera.js +188 -9
- package/dist/collection/components/camera-photo/camera-photo.js +126 -8
- package/dist/collection/components/canvas-board/canvas-board.js +1 -1
- package/dist/collection/components/canvas-video/canvas-video.js +1 -1
- package/dist/collection/components/cascader/cascader.js +1 -1
- package/dist/collection/components/cascader-view/cascader-view.js +3 -3
- package/dist/collection/components/circle/circle.js +3 -3
- package/dist/collection/components/count-down/count-down.js +2 -2
- package/dist/collection/components/crop-image/crop-image.js +1 -1
- package/dist/collection/components/divider/divider.js +2 -2
- package/dist/collection/components/dropdown/dropdown.js +4 -4
- package/dist/collection/components/empty/empty.js +1 -1
- package/dist/collection/components/floating-bubble/floating-bubble.js +1 -1
- package/dist/collection/components/floating-panel/floating-panel.css +1 -0
- package/dist/collection/components/floating-panel/floating-panel.js +3 -3
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/image-upload/image-upload.js +1 -1
- package/dist/collection/components/image-viewer/image-viewer.css +139 -2
- package/dist/collection/components/image-viewer/image-viewer.js +10 -5
- package/dist/collection/components/index-bar/index-bar.js +2 -2
- package/dist/collection/components/keyboard/keyboard.js +1 -1
- package/dist/collection/components/loading/loading.js +1 -1
- package/dist/collection/components/media-capture/media-capture.js +98 -3
- package/dist/collection/components/nav-bar/nav-bar.js +1 -1
- package/dist/collection/components/notice-bar/notice-bar.js +1 -1
- package/dist/collection/components/overlay/overlay.js +1 -1
- package/dist/collection/components/pdf-viewer/pdf-viewer.js +1 -1
- package/dist/collection/components/permission-alert/permission-alert.css +57 -0
- package/dist/collection/components/permission-alert/permission-alert.js +196 -0
- package/dist/collection/components/permission-purpose/permission-purpose.js +1 -1
- package/dist/collection/components/progress/progress.js +1 -1
- package/dist/collection/components/quick-access/quick-access.js +1 -1
- package/dist/collection/components/rate/rate.js +1 -1
- package/dist/collection/components/record/record.js +113 -1
- package/dist/collection/components/segment-slides/segment-slides.js +1 -1
- package/dist/collection/components/selector/selector.js +1 -1
- package/dist/collection/components/share-sheet/share-sheet.js +1 -1
- package/dist/collection/components/side-panel/side-panel.js +1 -1
- package/dist/collection/components/stepper/stepper.css +5 -2
- package/dist/collection/components/stepper/stepper.js +32 -1
- package/dist/collection/components/steps/steps.js +1 -1
- package/dist/collection/components/swipe/swipe.js +1 -1
- package/dist/collection/components/swipe-item/swipe-item.js +2 -2
- package/dist/collection/components/swiper/swiper.js +5 -1
- package/dist/collection/components/text-ellipsis/text-ellipsis.js +2 -2
- package/dist/collection/components/title-bar/title-bar.js +1 -1
- package/dist/collection/components/tour/tour.js +4 -4
- package/dist/collection/components/tutorial/tutorial.js +1 -1
- package/dist/collection/components/video/video.js +2 -2
- package/dist/collection/components/virtual-list/virtual-list.css +2 -5
- package/dist/collection/components/virtual-list/virtual-list.js +33 -6
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/native/audio-recorder.js +27 -0
- package/dist/collection/utils/native/camera-preview.js +29 -2
- package/dist/collection/utils/native/image-picker.js +40 -3
- package/dist/collection/utils/native/media-editor.js +62 -0
- package/dist/collection/utils/native/video-capture.js +28 -1
- package/dist/cty-mui/cty-mui.esm.js +1 -1
- package/dist/cty-mui/index.esm.js +1 -1
- package/dist/cty-mui/{p-a586fcb6.entry.js → p-005c9f17.entry.js} +1 -1
- package/dist/cty-mui/{p-9ba0f75c.entry.js → p-01a57e66.entry.js} +1 -1
- package/dist/cty-mui/{p-a8ada422.system.entry.js → p-0c4881aa.system.entry.js} +1 -1
- package/dist/cty-mui/{p-587210af.system.entry.js → p-1a3bf306.system.entry.js} +1 -1
- package/dist/cty-mui/{p-4f60b693.entry.js → p-1aca5f5b.entry.js} +1 -1
- package/dist/cty-mui/{p-475efd63.entry.js → p-1e4ee703.entry.js} +1 -1
- package/dist/cty-mui/{p-afc54cf3.entry.js → p-2005bf43.entry.js} +1 -1
- package/dist/cty-mui/{p-90f8d468.system.entry.js → p-20ce6b1f.system.entry.js} +1 -1
- package/dist/cty-mui/{p-c91ca631.system.entry.js → p-216d0332.system.entry.js} +1 -1
- package/dist/cty-mui/{p-e66d35a9.system.entry.js → p-222b8c9f.system.entry.js} +1 -1
- package/dist/cty-mui/{p-5ea1965a.system.entry.js → p-2236e06d.system.entry.js} +1 -1
- package/dist/cty-mui/p-27e63575.entry.js +1 -0
- package/dist/cty-mui/{p-ff973e68.system.entry.js → p-2b46cac8.system.entry.js} +1 -1
- package/dist/cty-mui/{p-d74dbc79.system.entry.js → p-398dc564.system.entry.js} +1 -1
- package/dist/cty-mui/{p-d62ba819.system.entry.js → p-3f47c7cc.system.entry.js} +1 -1
- package/dist/cty-mui/{p-8bfd28fc.entry.js → p-3fdb16af.entry.js} +1 -1
- package/dist/cty-mui/{p-2b0dc5e3.entry.js → p-4113a97c.entry.js} +1 -1
- package/dist/cty-mui/{p-49341ac0.system.entry.js → p-4377a67a.system.entry.js} +1 -1
- package/dist/cty-mui/{p-a5537cb3.system.entry.js → p-44748654.system.entry.js} +1 -1
- package/dist/cty-mui/p-46c45956.system.entry.js +1 -0
- package/dist/cty-mui/{p-f9f7ee85.entry.js → p-49712aa2.entry.js} +1 -1
- package/dist/cty-mui/{p-4890b69c.system.entry.js → p-49a6a0d2.system.entry.js} +1 -1
- package/dist/cty-mui/{p-5645d522.system.entry.js → p-4f53841f.system.entry.js} +1 -1
- package/dist/cty-mui/{p-b1f6e59c.entry.js → p-5087335d.entry.js} +1 -1
- package/dist/cty-mui/{p-d4915a3a.system.entry.js → p-520f708a.system.entry.js} +1 -1
- package/dist/cty-mui/p-5d4ba642.system.entry.js +1 -0
- package/dist/cty-mui/{p-ad85921c.entry.js → p-5d57fcbf.entry.js} +1 -1
- package/dist/cty-mui/{p-9d07466a.system.entry.js → p-5ec43731.system.entry.js} +1 -1
- package/dist/cty-mui/p-608ba84c.entry.js +1 -0
- package/dist/cty-mui/{p-cdee2447.system.entry.js → p-6179c262.system.entry.js} +1 -1
- package/dist/cty-mui/{p-55a730c1.system.entry.js → p-685dc602.system.entry.js} +1 -1
- package/dist/cty-mui/{p-5d59f92f.system.entry.js → p-688e3d13.system.entry.js} +1 -1
- package/dist/cty-mui/{p-7530dbf4.entry.js → p-6a2cde81.entry.js} +1 -1
- package/dist/cty-mui/{p-f4775bbd.system.entry.js → p-6acaf6b0.system.entry.js} +1 -1
- package/dist/cty-mui/p-6b00dff7.system.entry.js +1 -0
- package/dist/cty-mui/{p-3e894981.entry.js → p-6b90bc73.entry.js} +1 -1
- package/dist/cty-mui/p-6ff6ece0.entry.js +1 -0
- package/dist/cty-mui/{p-5029b2d1.entry.js → p-7067cc1e.entry.js} +1 -1
- package/dist/cty-mui/{p-a02134a3.entry.js → p-738694f5.entry.js} +1 -1
- package/dist/cty-mui/{p-c36ad14e.entry.js → p-79c493eb.entry.js} +1 -1
- package/dist/cty-mui/p-81a6cd2f.system.entry.js +1 -0
- package/dist/cty-mui/{p-019cfadb.entry.js → p-83b3627e.entry.js} +1 -1
- package/dist/cty-mui/p-83e63668.entry.js +1 -0
- package/dist/cty-mui/p-85a69c15.entry.js +1 -0
- package/dist/cty-mui/{p-edc23b12.system.entry.js → p-86fc18c6.system.entry.js} +1 -1
- package/dist/cty-mui/{p-71a51c66.system.entry.js → p-88f257ae.system.entry.js} +1 -1
- package/dist/cty-mui/p-8a3f8bbc.system.entry.js +1 -0
- package/dist/cty-mui/{p-844ef4f2.system.entry.js → p-933ae9d4.system.entry.js} +1 -1
- package/dist/cty-mui/{p-c2833f8f.entry.js → p-9a3a8e96.entry.js} +1 -1
- package/dist/cty-mui/p-B0tecevi.system.js +1 -0
- package/dist/cty-mui/p-BR2ny4zu.system.js +1 -0
- package/dist/cty-mui/p-Bkucjxe0.js +1 -0
- package/dist/cty-mui/p-Bntx5BKz.js +1 -0
- package/dist/cty-mui/p-CElxzE6f.system.js +1 -0
- package/dist/cty-mui/p-CPg00410.system.js +1 -0
- package/dist/cty-mui/p-CeJSms5W.js +1 -0
- package/dist/cty-mui/p-Cegbc1c7.system.js +1 -1
- package/dist/cty-mui/p-CnG0E7wf.js +1 -0
- package/dist/cty-mui/p-D5J8bYlQ.system.js +1 -0
- package/dist/cty-mui/{p-2518352c.system.entry.js → p-a0390733.system.entry.js} +1 -1
- package/dist/cty-mui/{p-36619007.entry.js → p-a0aec994.entry.js} +1 -1
- package/dist/cty-mui/{p-5528eb5e.entry.js → p-a2a4f620.entry.js} +1 -1
- package/dist/cty-mui/p-a337c7a9.system.entry.js +1 -0
- package/dist/cty-mui/{p-b00db557.system.entry.js → p-a68cdc7f.system.entry.js} +1 -1
- package/dist/cty-mui/{p-215219ca.entry.js → p-a77a236d.entry.js} +1 -1
- package/dist/cty-mui/{p-14d54127.system.entry.js → p-ae133756.system.entry.js} +1 -1
- package/dist/cty-mui/p-aeb79634.entry.js +1 -0
- package/dist/cty-mui/p-b295f647.entry.js +1 -0
- package/dist/cty-mui/{p-df2367ca.system.entry.js → p-b4ad5f38.system.entry.js} +1 -1
- package/dist/cty-mui/{p-99ce288e.entry.js → p-b6dfc8cc.entry.js} +1 -1
- package/dist/cty-mui/{p-97d899b3.entry.js → p-b8350f6b.entry.js} +1 -1
- package/dist/cty-mui/p-bfcd0ee8.entry.js +1 -0
- package/dist/cty-mui/{p-d0c16dfb.system.entry.js → p-c997e644.system.entry.js} +1 -1
- package/dist/cty-mui/{p-a88f7145.system.entry.js → p-cb2be37d.system.entry.js} +1 -1
- package/dist/cty-mui/p-ccc21f2e.entry.js +1 -0
- package/dist/cty-mui/{p-a4ec9006.entry.js → p-cd172ce5.entry.js} +1 -1
- package/dist/cty-mui/{p-ddd7a69a.system.entry.js → p-d030a500.system.entry.js} +1 -1
- package/dist/cty-mui/{p-d390049b.system.entry.js → p-d418bc6c.system.entry.js} +1 -1
- package/dist/cty-mui/{p-bd9c8e43.entry.js → p-d80da6a9.entry.js} +1 -1
- package/dist/cty-mui/{p-d94cdb9d.entry.js → p-d91dd1fd.entry.js} +1 -1
- package/dist/cty-mui/{p-3080e6c5.entry.js → p-d99e0f79.entry.js} +1 -1
- package/dist/cty-mui/{p-9cf3001f.system.entry.js → p-dd267090.system.entry.js} +1 -1
- package/dist/cty-mui/{p-3c8e24c4.system.entry.js → p-e0177323.system.entry.js} +1 -1
- package/dist/cty-mui/{p-b0056ff5.entry.js → p-e0bc62cf.entry.js} +1 -1
- package/dist/cty-mui/{p-cbd8842f.system.entry.js → p-e2ce5d7f.system.entry.js} +1 -1
- package/dist/cty-mui/{p-5a33becc.entry.js → p-e3653feb.entry.js} +1 -1
- package/dist/cty-mui/p-e3b5c1fc.system.entry.js +4 -0
- package/dist/cty-mui/{p-e55ab7ee.entry.js → p-e8f1c2e2.entry.js} +1 -1
- package/dist/cty-mui/{p-1c082713.entry.js → p-e92747c2.entry.js} +1 -1
- package/dist/cty-mui/{p-8e03fe9c.entry.js → p-ed751d9b.entry.js} +1 -1
- package/dist/cty-mui/{p-0e982b61.system.entry.js → p-eff6c534.system.entry.js} +1 -1
- package/dist/cty-mui/{p-5524f103.system.entry.js → p-f06ed732.system.entry.js} +1 -1
- package/dist/cty-mui/p-f3eca262.entry.js +5 -0
- package/dist/cty-mui/p-fbc7fe30.entry.js +1 -0
- package/dist/docs.json +780 -45
- package/dist/esm/{audio-recorder-CbuBJ-u7.js → audio-recorder-vTQ1Jf9u.js} +27 -0
- package/dist/esm/{camera-preview-SS7McUtz.js → camera-preview-Bntx5BKz.js} +29 -2
- package/dist/esm/cty-alert_2.entry.js +26 -67
- package/dist/esm/cty-camera-photo.entry.js +59 -8
- package/dist/esm/cty-camera_2.entry.js +83 -11
- package/dist/esm/cty-canvas-board.entry.js +1 -1
- package/dist/esm/cty-canvas-video.entry.js +1 -1
- package/dist/esm/cty-cascader-view.entry.js +3 -3
- package/dist/esm/cty-cascader.entry.js +1 -1
- package/dist/esm/cty-circle.entry.js +80 -0
- package/dist/esm/cty-count-down.entry.js +2 -2
- package/dist/esm/cty-divider.entry.js +2 -2
- package/dist/esm/cty-dropdown.entry.js +4 -4
- package/dist/esm/cty-empty.entry.js +1 -1
- package/dist/esm/cty-floating-bubble.entry.js +1 -1
- package/dist/esm/cty-floating-panel.entry.js +4 -4
- package/dist/esm/cty-icon.entry.js +1 -1
- package/dist/esm/cty-image-upload.entry.js +1 -1
- package/dist/esm/cty-image-viewer_6.entry.js +15 -7
- package/dist/esm/cty-index-bar.entry.js +2 -2
- package/dist/esm/cty-keyboard.entry.js +1 -1
- package/dist/esm/cty-loading.entry.js +1 -1
- package/dist/esm/cty-media-capture.entry.js +33 -3
- package/dist/esm/cty-mui.js +1 -1
- package/dist/esm/cty-notice-bar.entry.js +1 -1
- package/dist/esm/cty-overlay.entry.js +1 -1
- package/dist/esm/cty-pdf-viewer.entry.js +1 -1
- package/dist/esm/cty-permission-purpose.entry.js +1 -1
- package/dist/esm/cty-progress.entry.js +1 -1
- package/dist/esm/cty-quick-access.entry.js +1 -1
- package/dist/esm/cty-rate.entry.js +1 -1
- package/dist/esm/cty-record.entry.js +49 -2
- package/dist/esm/cty-segment-slides.entry.js +1 -1
- package/dist/esm/cty-selector.entry.js +1 -1
- package/dist/esm/cty-share-sheet.entry.js +1 -1
- package/dist/esm/cty-side-panel.entry.js +1 -1
- package/dist/esm/cty-stepper.entry.js +9 -2
- package/dist/esm/cty-steps.entry.js +1 -1
- package/dist/esm/cty-swipe_2.entry.js +3 -3
- package/dist/esm/cty-text-ellipsis.entry.js +2 -2
- package/dist/esm/cty-title-bar.entry.js +1 -1
- package/dist/esm/cty-tour.entry.js +4 -4
- package/dist/esm/cty-tutorial.entry.js +1 -1
- package/dist/esm/cty-video.entry.js +2 -2
- package/dist/esm/cty-virtual-list.entry.js +11 -7
- package/dist/esm/{image-picker-FShbNAm_.js → image-picker-0JHjPizE.js} +40 -3
- package/dist/esm/index.js +69 -6
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{video-capture-B1wGDp4R.js → video-capture-B83C8hW9.js} +28 -1
- package/dist/esm-es5/audio-recorder-vTQ1Jf9u.js +1 -0
- package/dist/esm-es5/camera-preview-Bntx5BKz.js +1 -0
- package/dist/esm-es5/cty-alert_2.entry.js +1 -1
- package/dist/esm-es5/cty-camera-photo.entry.js +1 -1
- package/dist/esm-es5/cty-camera_2.entry.js +1 -1
- package/dist/esm-es5/cty-canvas-board.entry.js +1 -1
- package/dist/esm-es5/cty-canvas-video.entry.js +1 -1
- package/dist/esm-es5/cty-cascader-view.entry.js +1 -1
- package/dist/esm-es5/cty-cascader.entry.js +1 -1
- package/dist/esm-es5/cty-circle.entry.js +1 -0
- package/dist/esm-es5/cty-count-down.entry.js +1 -1
- package/dist/esm-es5/cty-divider.entry.js +1 -1
- package/dist/esm-es5/cty-dropdown.entry.js +1 -1
- package/dist/esm-es5/cty-empty.entry.js +1 -1
- package/dist/esm-es5/cty-floating-bubble.entry.js +1 -1
- package/dist/esm-es5/cty-floating-panel.entry.js +1 -1
- package/dist/esm-es5/cty-icon.entry.js +1 -1
- package/dist/esm-es5/cty-image-upload.entry.js +1 -1
- package/dist/esm-es5/cty-image-viewer_6.entry.js +2 -2
- package/dist/esm-es5/cty-index-bar.entry.js +1 -1
- package/dist/esm-es5/cty-keyboard.entry.js +1 -1
- package/dist/esm-es5/cty-loading.entry.js +1 -1
- package/dist/esm-es5/cty-media-capture.entry.js +1 -1
- package/dist/esm-es5/cty-mui.js +1 -1
- package/dist/esm-es5/cty-notice-bar.entry.js +1 -1
- package/dist/esm-es5/cty-overlay.entry.js +1 -1
- package/dist/esm-es5/cty-pdf-viewer.entry.js +1 -1
- package/dist/esm-es5/cty-permission-purpose.entry.js +1 -1
- package/dist/esm-es5/cty-progress.entry.js +1 -1
- package/dist/esm-es5/cty-quick-access.entry.js +1 -1
- package/dist/esm-es5/cty-rate.entry.js +1 -1
- package/dist/esm-es5/cty-record.entry.js +1 -1
- package/dist/esm-es5/cty-segment-slides.entry.js +1 -1
- package/dist/esm-es5/cty-selector.entry.js +1 -1
- package/dist/esm-es5/cty-share-sheet.entry.js +1 -1
- package/dist/esm-es5/cty-side-panel.entry.js +1 -1
- package/dist/esm-es5/cty-stepper.entry.js +1 -1
- package/dist/esm-es5/cty-steps.entry.js +1 -1
- package/dist/esm-es5/cty-swipe_2.entry.js +1 -1
- package/dist/esm-es5/cty-text-ellipsis.entry.js +1 -1
- package/dist/esm-es5/cty-title-bar.entry.js +1 -1
- package/dist/esm-es5/cty-tour.entry.js +1 -1
- package/dist/esm-es5/cty-tutorial.entry.js +1 -1
- package/dist/esm-es5/cty-video.entry.js +1 -1
- package/dist/esm-es5/cty-virtual-list.entry.js +1 -1
- package/dist/esm-es5/image-picker-0JHjPizE.js +1 -0
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/video-capture-B83C8hW9.js +1 -0
- package/dist/types/components/camera/camera.d.ts +14 -1
- package/dist/types/components/camera-photo/camera-photo.d.ts +11 -1
- package/dist/types/components/image-viewer/image-viewer.d.ts +1 -0
- package/dist/types/components/media-capture/media-capture.d.ts +8 -0
- package/dist/types/components/permission-alert/permission-alert.d.ts +17 -0
- package/dist/types/components/record/record.d.ts +9 -0
- package/dist/types/components/stepper/stepper.d.ts +1 -0
- package/dist/types/components/swiper/swiper.d.ts +1 -0
- package/dist/types/components/virtual-list/virtual-list.d.ts +1 -1
- package/dist/types/components.d.ts +75 -2
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utils/native/audio-recorder.d.ts +3 -0
- package/dist/types/utils/native/camera-preview.d.ts +9 -1
- package/dist/types/utils/native/image-picker.d.ts +8 -0
- package/dist/types/utils/native/media-editor.d.ts +45 -0
- package/dist/types/utils/native/video-capture.d.ts +3 -0
- package/package.json +2 -2
- package/dist/cty-mui/p-1078ee6a.system.entry.js +0 -1
- package/dist/cty-mui/p-1cb056b2.system.entry.js +0 -1
- package/dist/cty-mui/p-1d3aca02.entry.js +0 -1
- package/dist/cty-mui/p-2F5bjTGm.system.js +0 -1
- package/dist/cty-mui/p-3f54848b.entry.js +0 -1
- package/dist/cty-mui/p-4XVRwqXU.js +0 -1
- package/dist/cty-mui/p-62a9c160.entry.js +0 -1
- package/dist/cty-mui/p-68d73325.entry.js +0 -5
- package/dist/cty-mui/p-6dddba8f.system.entry.js +0 -1
- package/dist/cty-mui/p-751ca0a3.system.entry.js +0 -4
- package/dist/cty-mui/p-8b03016d.entry.js +0 -1
- package/dist/cty-mui/p-C6cVxtBr.system.js +0 -1
- package/dist/cty-mui/p-CcRtmdkf.system.js +0 -1
- package/dist/cty-mui/p-D0fcC0rL.js +0 -1
- package/dist/cty-mui/p-DTfCyY9u.system.js +0 -1
- package/dist/cty-mui/p-Dty0N6Ky.system.js +0 -1
- package/dist/cty-mui/p-SS7McUtz.js +0 -1
- package/dist/cty-mui/p-adc25955.system.entry.js +0 -1
- package/dist/cty-mui/p-c3bb2f2a.entry.js +0 -1
- package/dist/cty-mui/p-db2289f6.entry.js +0 -1
- package/dist/cty-mui/p-ea36cfac.entry.js +0 -1
- package/dist/cty-mui/p-f57da567.system.entry.js +0 -1
- package/dist/cty-mui/p-fd7e26fd.entry.js +0 -1
- package/dist/cty-mui/p-ff4436a4.entry.js +0 -1
- package/dist/cty-mui/p-fpbYSnt8.js +0 -1
- package/dist/esm-es5/audio-recorder-CbuBJ-u7.js +0 -1
- package/dist/esm-es5/camera-preview-SS7McUtz.js +0 -1
- package/dist/esm-es5/image-picker-FShbNAm_.js +0 -1
- package/dist/esm-es5/video-capture-B1wGDp4R.js +0 -1
package/components/swiper.js
CHANGED
|
@@ -46,6 +46,10 @@ const Swiper = /*@__PURE__*/ proxyCustomElement(class Swiper extends HTMLElement
|
|
|
46
46
|
this._swiper = this.swiperEl.swiper;
|
|
47
47
|
this.refreshSwiper();
|
|
48
48
|
}
|
|
49
|
+
disconnectedCallback() {
|
|
50
|
+
var _a;
|
|
51
|
+
(_a = this._swiper) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
52
|
+
}
|
|
49
53
|
slideChange() {
|
|
50
54
|
this.ctySlideChange.emit({
|
|
51
55
|
realIndex: this._swiper.realIndex,
|
|
@@ -91,7 +95,7 @@ const Swiper = /*@__PURE__*/ proxyCustomElement(class Swiper extends HTMLElement
|
|
|
91
95
|
return this._swiper;
|
|
92
96
|
}
|
|
93
97
|
render() {
|
|
94
|
-
return (h(Host, { key: '
|
|
98
|
+
return (h(Host, { key: '4279a041c842204c199d6ebc251f44128f0e3b65', class: "cty-swiper" }, h("swiper-container", Object.assign({ key: '61fa76ec459f33c92504fec0d3cdd9465e882b19', class: "cty-swipe__container", ref: (el) => this.swiperEl = el, autoplay: this.autoplay, modules: this.swiperModules, direction: this.direction, loop: this.loop, pagination: this.pagination, observer: this.observer, "observer-parents": this.observerParents, onSwiperslidechangetransitionend: () => this.slideChange(), onSwiperclick: () => this.slideClick() }, this.attrs), this._swipers.map((item, idx) => h("swiper-slide", { class: "cty-swipe__slide" }, h("slot", { name: idx + '' }, h("div", { class: "swiper-zoom-container" }, h("img", { src: item[this.props.pic], alt: item[this.props.alt || ''] || '', onClick: (e) => e.stopPropagation() }))))), h("slot", { key: 'be071f0b3e5059921d8febb081456659816e8765', name: "container-start", slot: "container-start" }), h("slot", { key: 'eb6160945f271cccb52bcdad7977f38dbda3552e', name: "container-end", slot: "container-end" }))));
|
|
95
99
|
}
|
|
96
100
|
get el() { return this; }
|
|
97
101
|
static get watchers() { return {
|
|
@@ -9,6 +9,33 @@ class CTYVideoCapture {
|
|
|
9
9
|
get isVideoCaptureAvailable() {
|
|
10
10
|
return !!this._videoCapturePlugin;
|
|
11
11
|
}
|
|
12
|
+
hasPermission() {
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
if (!this.isVideoCaptureAvailable) {
|
|
15
|
+
reject('Video capture plugin is not available');
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
this._videoCapturePlugin.hasCapturePermission((result) => resolve(result), (error) => reject(error));
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
requestPermission() {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
if (!this.isVideoCaptureAvailable) {
|
|
24
|
+
reject('Video capture plugin is not available');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this._videoCapturePlugin.requestCapturePermission((result) => resolve(result), (error) => reject(error));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
openAppSettings() {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
if (!this.isVideoCaptureAvailable) {
|
|
33
|
+
reject('Video capture plugin is not available');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this._videoCapturePlugin.openAppSettings(() => resolve(), (error) => reject(error));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
12
39
|
captureVideo(options) {
|
|
13
40
|
return new Promise((resolve, reject) => {
|
|
14
41
|
if (!this.isVideoCaptureAvailable) {
|
|
@@ -24,7 +51,7 @@ class CTYVideoCapture {
|
|
|
24
51
|
else {
|
|
25
52
|
resolve(null);
|
|
26
53
|
}
|
|
27
|
-
}, Object.assign({ width: 1280 }, options));
|
|
54
|
+
}, reject, Object.assign({ width: 1280 }, options));
|
|
28
55
|
}
|
|
29
56
|
catch (error) {
|
|
30
57
|
reject(error);
|
|
@@ -77,6 +77,33 @@ class CTYAudioRecorder {
|
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
+
hasPermission() {
|
|
81
|
+
return new Promise((resolve, reject) => {
|
|
82
|
+
if (!this.isAudioRecorderAvailable) {
|
|
83
|
+
reject('Audio recorder plugin is not available');
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this._audioRecorderPlugin.hasPermission((result) => resolve(result), (error) => reject(error));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
requestPermission() {
|
|
90
|
+
return new Promise((resolve, reject) => {
|
|
91
|
+
if (!this.isAudioRecorderAvailable) {
|
|
92
|
+
reject('Audio recorder plugin is not available');
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
this._audioRecorderPlugin.requestPermission(() => resolve(), (error) => reject(error));
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
openAppSettings() {
|
|
99
|
+
return new Promise((resolve, reject) => {
|
|
100
|
+
if (!this.isAudioRecorderAvailable) {
|
|
101
|
+
reject('Audio recorder plugin is not available');
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this._audioRecorderPlugin.openAppSettings(() => resolve(), (error) => reject(error));
|
|
105
|
+
});
|
|
106
|
+
}
|
|
80
107
|
uploadWxRecording(localId, tip = exports.UploadProgressTip.SHOW) {
|
|
81
108
|
return new Promise((resolve, reject) => {
|
|
82
109
|
try {
|
|
@@ -8,10 +8,37 @@ class CTYCameraPreview {
|
|
|
8
8
|
get isCameraPreviewAvailable() {
|
|
9
9
|
return !!this.cameraPreviewPlugin;
|
|
10
10
|
}
|
|
11
|
+
hasPermission() {
|
|
12
|
+
return new Promise((resolve, reject) => {
|
|
13
|
+
if (!this.isCameraPreviewAvailable) {
|
|
14
|
+
reject('Camera preview plugin is not available');
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.cameraPreviewPlugin.hasPermission((result) => resolve(result), (error) => reject(error));
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
requestPermission() {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
if (!this.isCameraPreviewAvailable) {
|
|
23
|
+
reject('Camera preview plugin is not available');
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
this.cameraPreviewPlugin.requestPermission(() => resolve(), (error) => reject(error));
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
openAppSettings() {
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
if (!this.isCameraPreviewAvailable) {
|
|
32
|
+
reject('Camera preview plugin is not available');
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
this.cameraPreviewPlugin.openAppSettings(() => resolve(), (error) => reject(error));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
11
38
|
startCamera(options) {
|
|
12
39
|
return new Promise((resolve, reject) => {
|
|
13
40
|
if (!this.isCameraPreviewAvailable) {
|
|
14
|
-
return reject('Camera
|
|
41
|
+
return reject('Camera preview plugin is not available');
|
|
15
42
|
}
|
|
16
43
|
this.cameraPreviewPlugin.startCamera(options, resolve, reject);
|
|
17
44
|
});
|
|
@@ -29,7 +56,7 @@ class CTYCameraPreview {
|
|
|
29
56
|
takePicture(options) {
|
|
30
57
|
return new Promise((resolve, reject) => {
|
|
31
58
|
this.cameraPreviewPlugin.takePicture(options, (data) => {
|
|
32
|
-
resolve(data
|
|
59
|
+
resolve(data);
|
|
33
60
|
}, reject);
|
|
34
61
|
});
|
|
35
62
|
}
|
|
@@ -107,82 +107,41 @@ const Alert = class {
|
|
|
107
107
|
};
|
|
108
108
|
Alert.style = alertCss;
|
|
109
109
|
|
|
110
|
-
const
|
|
110
|
+
const permissionAlertCss = ":host{--cty-permission-alert-overlay-position:fixed;--cty-permission-alert-overlay-z-index:999999;--cty-permission-alert-overlay-background:var(--cty-overlay-color);--cty-permission-alert-overlay-width:100vw;--cty-permission-alert-overlay-height:100vh;--cty-permission-alert-width:80%;--cty-permission-alert-background:var(--cty-color-white);--cty-permission-alert-padding-bottom:15px;--cty-permission-alert-padding-end:15px;--cty-permission-alert-padding-start:15px;--cty-permission-alert-padding-top:15px;--cty-permission-alert-border-radius:12px;--cty-permission-alert-title-align:flex-start;--cty-permission-alert-title-color:var(--cty-text-color-primary);--cty-permission-alert-title-size:var(--cty-font-size-medium);--cty-permission-alert-content-margin-bottom:20px;--cty-permission-alert-content-margin-top:20px;--cty-permission-alert-content-size:var(--cty-font-size-base);--cty-permission-alert-content-align:justify;--cty-permission-alert-content-color:var(--cty-text-color-primary);--cty-permission-alert-button-min-height:36px;--cty-permission-alert-button-color:var(--cty-text-color-primary);--cty-permission-alert-button-size:var(--cty-font-size-base);--cty-permission-alert-button-radius:var(--cty-border-radius-medium);--cty-permission-alert-button-primary-background:var(--cty-color-primary);--cty-permission-alert-button-primary-color:var(--cty-text-color-white)}cty-alert{--cty-alert-overlay-position:var(--cty-permission-alert-overlay-position);--cty-alert-overlay-z-index:var(--cty-permission-alert-overlay-z-index);--cty-alert-overlay-background:var(--cty-permission-alert-overlay-background);--cty-alert-overlay-width:var(--cty-permission-alert-overlay-width);--cty-alert-overlay-height:var(--cty-permission-alert-overlay-height);--cty-alert-width:var(--cty-permission-alert-width);--cty-alert-background:var(--cty-permission-alert-background);--cty-alert-padding-bottom:var(--cty-permission-alert-padding-bottom);--cty-alert-padding-end:var(--cty-permission-alert-padding-end);--cty-alert-padding-start:var(--cty-permission-alert-padding-start);--cty-alert-padding-top:var(--cty-permission-alert-padding-top);--cty-alert-border-radius:var(--cty-permission-alert-border-radius);--cty-alert-title-align:var(--cty-permission-alert-title-align);--cty-alert-title-color:var(--cty-permission-alert-title-color);--cty-alert-title-size:var(--cty-permission-alert-title-size);--cty-alert-content-margin-bottom:var(--cty-permission-alert-content-margin-bottom);--cty-alert-content-margin-top:var(--cty-permission-alert-content-margin-top);--cty-alert-content-size:var(--cty-permission-alert-content-size);--cty-alert-content-align:var(--cty-permission-alert-content-align);--cty-alert-content-color:var(--cty-permission-alert-content-color);--cty-alert-button-min-height:var(--cty-permission-alert-button-min-height);--cty-alert-button-color:var(--cty-permission-alert-button-color);--cty-alert-button-size:var(--cty-permission-alert-button-size);--cty-alert-button-radius:var(--cty-permission-alert-button-radius);--cty-alert-button-primary-background:var(--cty-permission-alert-button-primary-background);--cty-alert-button-primary-color:var(--cty-permission-alert-button-primary-color)}";
|
|
111
111
|
|
|
112
|
-
const
|
|
112
|
+
const PermissionAlert = class {
|
|
113
113
|
constructor(hostRef) {
|
|
114
114
|
index.registerInstance(this, hostRef);
|
|
115
|
-
this.
|
|
116
|
-
this.
|
|
117
|
-
this.
|
|
118
|
-
this.
|
|
119
|
-
this.
|
|
120
|
-
this.
|
|
121
|
-
this.
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
if (
|
|
133
|
-
this.
|
|
134
|
-
offset: key.toString(),
|
|
135
|
-
color: this.color[key]
|
|
136
|
-
}));
|
|
137
|
-
this.updateSVGAttr();
|
|
115
|
+
this.ctyDismiss = index.createEvent(this, "ctyDismiss", 7);
|
|
116
|
+
this.ctyTap = index.createEvent(this, "ctyTap", 7);
|
|
117
|
+
this.backdropDismiss = false;
|
|
118
|
+
this.title = '需要申请相机权限';
|
|
119
|
+
this.content = '需要开启相机权限,用于拍照、扫码或视频聊天。我们承诺仅在功能使用时调用摄像头。';
|
|
120
|
+
this.closeable = false;
|
|
121
|
+
this.buttons = [{
|
|
122
|
+
text: '取消',
|
|
123
|
+
action: 'cancel'
|
|
124
|
+
}, {
|
|
125
|
+
text: '去打开',
|
|
126
|
+
action: 'permission'
|
|
127
|
+
}];
|
|
128
|
+
}
|
|
129
|
+
_buttonClick(event) {
|
|
130
|
+
event.stopPropagation();
|
|
131
|
+
const { item, index } = event.detail;
|
|
132
|
+
if (item.action !== 'cancel') {
|
|
133
|
+
this.ctyTap.emit({ item, index });
|
|
138
134
|
}
|
|
139
135
|
}
|
|
140
|
-
|
|
141
|
-
this.
|
|
142
|
-
this.updateSVGAttr();
|
|
143
|
-
}
|
|
144
|
-
updateSVGAttr() {
|
|
145
|
-
var _a, _b, _c, _d;
|
|
146
|
-
(_a = this.svgEl) === null || _a === void 0 ? void 0 : _a.setAttribute('viewBox', `0 0 ${+this.width + this.rad * 2 + this.offset * 2} ${+this.width + this.rad * 2 + this.offset * 2}`);
|
|
147
|
-
(_b = this.layerEl) === null || _b === void 0 ? void 0 : _b.setAttribute('d', this._getPath());
|
|
148
|
-
(_c = this.hoverEl) === null || _c === void 0 ? void 0 : _c.setAttribute('d', this._getPath());
|
|
149
|
-
Array.from(((_d = this.svgEl) === null || _d === void 0 ? void 0 : _d.querySelectorAll('stop')) || []).forEach((stopEL, index) => {
|
|
150
|
-
stopEL.setAttribute('key', index.toString());
|
|
151
|
-
stopEL.setAttribute('offset', this.colors[index].offset);
|
|
152
|
-
stopEL.setAttribute('stop-color', this.colors[index].color);
|
|
153
|
-
});
|
|
154
|
-
}
|
|
155
|
-
componentWillLoad() {
|
|
156
|
-
this.perimeter = 2 * 3.14 * this.rad;
|
|
157
|
-
this.gradientId = 'cty-circle-' + Math.random().toFixed(12).slice(2);
|
|
158
|
-
this.watchColorHandler();
|
|
159
|
-
}
|
|
160
|
-
componentDidLoad() {
|
|
161
|
-
this.updateSVGAttr();
|
|
162
|
-
}
|
|
163
|
-
_getPath() {
|
|
164
|
-
const { rad, width, offset, clockwise } = this;
|
|
165
|
-
const viewBoxSize = +width + rad * 2 + offset * 2;
|
|
166
|
-
const sweepFlag = clockwise ? 1 : 0;
|
|
167
|
-
return `M ${viewBoxSize / 2} ${viewBoxSize / 2} m 0, ${-rad} a ${rad}, ${rad} 0 1, ${sweepFlag} 0, ${rad * 2} a ${rad}, ${rad} 0 1, ${sweepFlag} 0, ${-rad * 2}`;
|
|
136
|
+
_dismiss() {
|
|
137
|
+
this.ctyDismiss.emit();
|
|
168
138
|
}
|
|
169
139
|
render() {
|
|
170
|
-
return (index.h(index.Host, { key: '
|
|
171
|
-
'stroke-width': this.width + 'px',
|
|
172
|
-
'strokeDasharray': (this.ratio * this.perimeter) + 'px ' + this.perimeter + 'px'
|
|
173
|
-
} }), index.h("path", { key: 'fefec8d3cb6927b35b37ca04498d3abc572e8b63', ref: el => (this.hoverEl = el), class: "cty-circle__hover", style: {
|
|
174
|
-
'stroke': this.rate <= 0 && this.zeroTransparent ? 'transparent' : this.needDefs ? 'url(#' + this.gradientId + ')' : this.color,
|
|
175
|
-
'stroke-width': +this.width + this.widthDif + 'px',
|
|
176
|
-
'strokeDasharray': (this.ratio * this.rate / 100 * this.perimeter) + 'px ' + this.perimeter + 'px'
|
|
177
|
-
} })), this.text !== '' && index.h("div", { key: 'f683c2dc61d281e6c506ff9a15b3a2a2f4ef56da', class: "cty-circle__text" }, this.text), index.h("slot", { key: '64eba94a1e793fe3dec863d0733f8a7ceb9e659b' })));
|
|
140
|
+
return (index.h(index.Host, { key: '56a3795cba4d50f34250ae7bd6a95cd1f9aeb8be' }, index.h("cty-alert", { key: '30d8a9b62d7cb7c391a746755dbecdaef347ada0', part: "permission-alert", class: "cty-permission-alert", animated: false, overlayIndex: 1, backdropDismiss: this.backdropDismiss, title: this.title, content: this.content, closeable: this.closeable, buttons: this.buttons, onCtyTap: (e) => this._buttonClick(e), onCtyDismiss: () => this._dismiss() }, index.h("slot", { key: 'e661dd93f220462e2478233fce1a887bb6ac57d3', name: "header", slot: "header" }), index.h("slot", { key: '128a5f263a932e9c5263c51fccd6f2a67ef1cc49', name: "content", slot: "content" }), index.h("slot", { key: 'bfefd5cdb9c04a6fb3b13f1e4ea21d3b1a1b3dae', name: "buttons", slot: "buttons" }))));
|
|
178
141
|
}
|
|
179
142
|
get el() { return index.getElement(this); }
|
|
180
|
-
static get watchers() { return {
|
|
181
|
-
"color": ["watchColorHandler"],
|
|
182
|
-
"rad": ["watchColorHandler", "watchRadHandler"]
|
|
183
|
-
}; }
|
|
184
143
|
};
|
|
185
|
-
|
|
144
|
+
PermissionAlert.style = permissionAlertCss;
|
|
186
145
|
|
|
187
146
|
exports.cty_alert = Alert;
|
|
188
|
-
exports.
|
|
147
|
+
exports.cty_permission_alert = PermissionAlert;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-DCK462Hl.js');
|
|
4
|
-
var imagePicker = require('./image-picker-
|
|
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: '
|
|
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-
|
|
4
|
+
var cameraPreview = require('./camera-preview-BylkRIcS.js');
|
|
5
5
|
var deviceInfo = require('./device-info-BPtPRb6d.js');
|
|
6
|
-
var imagePicker = require('./image-picker-
|
|
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');
|
|
@@ -27,6 +27,8 @@ const Camera = class {
|
|
|
27
27
|
this.width = 0;
|
|
28
28
|
this.height = 0;
|
|
29
29
|
this.quality = 85;
|
|
30
|
+
this.includeThumb = true;
|
|
31
|
+
this.thumbWidth = 120;
|
|
30
32
|
this.file = true;
|
|
31
33
|
this.max = 9;
|
|
32
34
|
this.flipText = '翻转';
|
|
@@ -42,6 +44,8 @@ const Camera = class {
|
|
|
42
44
|
this.zoomSteps = 20; //仅android有效,通过这个算出每一份的的比例: (getMaxZoom() + 1) / allowMaxZoom
|
|
43
45
|
this.touchZoom = true;
|
|
44
46
|
this.touchZoomProp = 0.01;
|
|
47
|
+
this.permissionAlertTitle = '需要申请开启相机权限';
|
|
48
|
+
this.permissionAlertContent = '需要开启相机权限,用于拍照。我们承诺仅在功能使用时调用摄像头。';
|
|
45
49
|
this.ratioIndex = 0;
|
|
46
50
|
this.flash = false;
|
|
47
51
|
this.zoomIndex = 0;
|
|
@@ -50,6 +54,10 @@ const Camera = class {
|
|
|
50
54
|
this.imageViewerIndex = 0;
|
|
51
55
|
this.currentPhotoMode = 'multiple';
|
|
52
56
|
this.currentZoom = 1;
|
|
57
|
+
this.hasPermission = false;
|
|
58
|
+
this.permissionAlertVisible = false;
|
|
59
|
+
this.isToastOpen = false;
|
|
60
|
+
this.toastContent = '';
|
|
53
61
|
this.startZoom = 1;
|
|
54
62
|
this.SCREEN_WIDTH = window.screen.width;
|
|
55
63
|
this.SCREEN_HEIGHT = window.screen.height;
|
|
@@ -74,9 +82,46 @@ const Camera = class {
|
|
|
74
82
|
bodyEl.style.visibility = 'visible';
|
|
75
83
|
bodyEl.style.background = this.originalBodyBackground;
|
|
76
84
|
}
|
|
77
|
-
|
|
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
|
+
}
|
|
78
118
|
const height = this.getCameraHeight();
|
|
79
|
-
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
|
+
});
|
|
80
125
|
}
|
|
81
126
|
close() {
|
|
82
127
|
this.ctyDismiss.emit();
|
|
@@ -123,14 +168,24 @@ const Camera = class {
|
|
|
123
168
|
return cameraPreview.cameraPreview.setZoom(idx === 0 ? 0 : Math.min(zoom, maxZoom));
|
|
124
169
|
}
|
|
125
170
|
async takePhoto() {
|
|
126
|
-
const { quality, width, height, file, max, pictures } = this;
|
|
171
|
+
const { quality, width, height, includeThumb, thumbWidth, file, max, pictures } = this;
|
|
127
172
|
if (max > 0 && pictures.length >= max || this.currentPhotoMode === 'single' && this.pictures.length > 0 || this.isTakingPhoto) {
|
|
128
173
|
return;
|
|
129
174
|
}
|
|
130
175
|
this.isTakingPhoto = true;
|
|
131
|
-
const data = await cameraPreview.cameraPreview.takePicture({ width, height, quality });
|
|
132
|
-
|
|
133
|
-
|
|
176
|
+
const data = await cameraPreview.cameraPreview.takePicture({ width, height, quality, includeThumb, thumbWidth });
|
|
177
|
+
let uri = '';
|
|
178
|
+
let thumbnail = '';
|
|
179
|
+
if (data && typeof data === 'object') {
|
|
180
|
+
uri = data.image;
|
|
181
|
+
thumbnail = data.thumbnail;
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
uri = data;
|
|
185
|
+
}
|
|
186
|
+
const result = await imagePicker.imagePicker.formatPictureResult(file, uri);
|
|
187
|
+
const thumbResult = await imagePicker.imagePicker.formatPictureResult(file, thumbnail);
|
|
188
|
+
this.pictures = [...pictures, Object.assign(Object.assign({}, result), { thumbnail: thumbResult.url })];
|
|
134
189
|
this.ctyTakePhoto.emit(result);
|
|
135
190
|
this.isTakingPhoto = false;
|
|
136
191
|
if (this.currentPhotoMode === 'single') {
|
|
@@ -166,7 +221,7 @@ const Camera = class {
|
|
|
166
221
|
this.closeImageViewer(e);
|
|
167
222
|
}
|
|
168
223
|
confirm() {
|
|
169
|
-
this.ctyConfirm.emit(this.pictures);
|
|
224
|
+
this.ctyConfirm.emit(this.pictures.map(({ url, data }) => ({ url, data })));
|
|
170
225
|
}
|
|
171
226
|
deleteLastPicture() {
|
|
172
227
|
const pictures = [...this.pictures];
|
|
@@ -218,9 +273,26 @@ const Camera = class {
|
|
|
218
273
|
}
|
|
219
274
|
cameraPreview.cameraPreview.setZoom(Math.min(startCameraZoom + diff, maxZoom));
|
|
220
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
|
+
}
|
|
221
293
|
render() {
|
|
222
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;
|
|
223
|
-
return (index.h(index.Host, { key: '
|
|
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' })));
|
|
224
296
|
}
|
|
225
297
|
get el() { return index.getElement(this); }
|
|
226
298
|
};
|
|
@@ -430,7 +502,7 @@ const CropImage = class {
|
|
|
430
502
|
return (index.h("div", { class: "cty-crop-image__buttons flex-center-between safe-area-bottom-border-color" }, this.cancelText && cancelCmp, this.confirmText && confirmCmp));
|
|
431
503
|
}
|
|
432
504
|
render() {
|
|
433
|
-
return (index.h(index.Host, { key: '
|
|
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" })));
|
|
434
506
|
}
|
|
435
507
|
get el() { return index.getElement(this); }
|
|
436
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: '
|
|
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
|
};
|