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.
- package/components/audio-recorder.js +27 -0
- package/components/camera.js +109 -25
- 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 +3 -3
- 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 +1 -1
- 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 +2 -2
- package/components/divider.js +2 -2
- package/components/icon.js +1 -1
- package/components/image-picker.js +56 -2
- package/components/image-viewer.js +1 -1
- 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 +1 -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-CjkBcrrF.js → camera-preview-BylkRIcS.js} +28 -1
- 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 +66 -6
- 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 +3 -3
- 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 +3 -3
- 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 +1 -1
- 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 +2 -2
- package/dist/cjs/{image-picker-DztF-H0P.js → image-picker-C9sdhsR_.js} +28 -1
- 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 +131 -4
- 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.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.js +1 -1
- 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.js +1 -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 +1 -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.js +2 -2
- 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 +28 -1
- package/dist/collection/utils/native/image-picker.js +28 -1
- 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-36dfb017.entry.js → p-005c9f17.entry.js} +1 -1
- package/dist/cty-mui/{p-b38e30aa.entry.js → p-01a57e66.entry.js} +1 -1
- package/dist/cty-mui/{p-7a247c3c.system.entry.js → p-0c4881aa.system.entry.js} +1 -1
- package/dist/cty-mui/{p-ae0063ec.system.entry.js → p-1a3bf306.system.entry.js} +1 -1
- package/dist/cty-mui/{p-f0ebd9ba.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-38aa5d20.entry.js → p-2005bf43.entry.js} +1 -1
- package/dist/cty-mui/{p-78453bfe.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-422e9688.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-506fd54f.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-9b29ae81.system.entry.js → p-44748654.system.entry.js} +1 -1
- package/dist/cty-mui/{p-ff0f839d.system.entry.js → p-46c45956.system.entry.js} +1 -1
- package/dist/cty-mui/{p-df53aafa.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-a1909b50.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-32fda949.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-a2d2f9a3.system.entry.js → p-6179c262.system.entry.js} +1 -1
- package/dist/cty-mui/{p-38aa83ec.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-a94a17dd.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-c374511d.entry.js → p-6b90bc73.entry.js} +1 -1
- package/dist/cty-mui/p-6ff6ece0.entry.js +1 -0
- package/dist/cty-mui/{p-c9ad48be.entry.js → p-7067cc1e.entry.js} +1 -1
- package/dist/cty-mui/{p-afbfb654.entry.js → p-738694f5.entry.js} +1 -1
- package/dist/cty-mui/{p-7da45a22.entry.js → p-79c493eb.entry.js} +1 -1
- package/dist/cty-mui/{p-280c5fc9.system.entry.js → p-81a6cd2f.system.entry.js} +1 -1
- package/dist/cty-mui/{p-019cfadb.entry.js → p-83b3627e.entry.js} +1 -1
- package/dist/cty-mui/{p-212b7176.entry.js → p-83e63668.entry.js} +1 -1
- package/dist/cty-mui/p-85a69c15.entry.js +1 -0
- package/dist/cty-mui/{p-6c4fd05d.system.entry.js → p-86fc18c6.system.entry.js} +1 -1
- package/dist/cty-mui/{p-493bcff8.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-6f8e5488.system.entry.js → p-933ae9d4.system.entry.js} +1 -1
- package/dist/cty-mui/{p-8a9b07aa.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-63f73f69.system.entry.js → p-a0390733.system.entry.js} +1 -1
- package/dist/cty-mui/{p-09bacf31.entry.js → p-a0aec994.entry.js} +1 -1
- package/dist/cty-mui/{p-ba50ffbb.entry.js → p-a2a4f620.entry.js} +1 -1
- package/dist/cty-mui/p-a337c7a9.system.entry.js +1 -0
- package/dist/cty-mui/{p-63a9ed6a.system.entry.js → p-a68cdc7f.system.entry.js} +1 -1
- package/dist/cty-mui/p-a77a236d.entry.js +1 -0
- package/dist/cty-mui/{p-19154758.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-722774b8.entry.js → p-b295f647.entry.js} +1 -1
- package/dist/cty-mui/{p-df2367ca.system.entry.js → p-b4ad5f38.system.entry.js} +1 -1
- package/dist/cty-mui/{p-2788723f.entry.js → p-b6dfc8cc.entry.js} +1 -1
- package/dist/cty-mui/{p-b5d222a3.entry.js → p-b8350f6b.entry.js} +1 -1
- package/dist/cty-mui/p-bfcd0ee8.entry.js +1 -0
- package/dist/cty-mui/{p-ab05a712.system.entry.js → p-c997e644.system.entry.js} +1 -1
- package/dist/cty-mui/{p-785345b0.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-6d6b6673.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-59c2ba2b.entry.js → p-d99e0f79.entry.js} +1 -1
- package/dist/cty-mui/{p-ec0106a5.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-f037a2aa.entry.js → p-e0bc62cf.entry.js} +1 -1
- package/dist/cty-mui/{p-ae61ce14.system.entry.js → p-e2ce5d7f.system.entry.js} +1 -1
- package/dist/cty-mui/{p-9c6a1a8e.entry.js → p-e3653feb.entry.js} +1 -1
- package/dist/cty-mui/{p-432bfb8b.system.entry.js → p-e3b5c1fc.system.entry.js} +1 -1
- package/dist/cty-mui/{p-46da49d4.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-c021a07b.entry.js → p-ed751d9b.entry.js} +1 -1
- package/dist/cty-mui/{p-b2a51fa6.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-6bf50d2d.entry.js → p-f3eca262.entry.js} +1 -1
- package/dist/cty-mui/p-fbc7fe30.entry.js +1 -0
- package/dist/docs.json +624 -19
- package/dist/esm/{audio-recorder-CbuBJ-u7.js → audio-recorder-vTQ1Jf9u.js} +27 -0
- package/dist/esm/{camera-preview-khnuCOA-.js → camera-preview-Bntx5BKz.js} +28 -1
- 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 +66 -6
- 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 +3 -3
- 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 +3 -3
- 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 +1 -1
- 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 +2 -2
- package/dist/esm/{image-picker-CslKfwO_.js → image-picker-0JHjPizE.js} +28 -1
- 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 +1 -1
- 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 +12 -1
- package/dist/types/components/camera-photo/camera-photo.d.ts +11 -1
- 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.d.ts +67 -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 +3 -0
- package/dist/types/utils/native/image-picker.d.ts +3 -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 +1 -1
- package/dist/cty-mui/p-113bbc57.entry.js +0 -1
- package/dist/cty-mui/p-2F5bjTGm.system.js +0 -1
- package/dist/cty-mui/p-2aee1302.entry.js +0 -1
- package/dist/cty-mui/p-307f8af0.system.entry.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-593ff7f5.system.entry.js +0 -1
- package/dist/cty-mui/p-62167dcd.entry.js +0 -1
- package/dist/cty-mui/p-6a0ca54c.system.entry.js +0 -1
- package/dist/cty-mui/p-71ad5b55.entry.js +0 -1
- package/dist/cty-mui/p-9b871c8b.entry.js +0 -1
- package/dist/cty-mui/p-B3jWXqo2.system.js +0 -1
- package/dist/cty-mui/p-BInSqJtk.system.js +0 -1
- package/dist/cty-mui/p-BS5AYmeF.js +0 -1
- package/dist/cty-mui/p-BmrwhKbs.system.js +0 -1
- package/dist/cty-mui/p-DTfCyY9u.system.js +0 -1
- package/dist/cty-mui/p-bd15bdaa.entry.js +0 -1
- package/dist/cty-mui/p-c46f0ac3.entry.js +0 -1
- package/dist/cty-mui/p-fpbYSnt8.js +0 -1
- package/dist/cty-mui/p-khnuCOA-.js +0 -1
- package/dist/esm-es5/audio-recorder-CbuBJ-u7.js +0 -1
- package/dist/esm-es5/camera-preview-khnuCOA-.js +0 -1
- package/dist/esm-es5/image-picker-CslKfwO_.js +0 -1
- package/dist/esm-es5/video-capture-B1wGDp4R.js +0 -1
package/components/divider.js
CHANGED
|
@@ -18,10 +18,10 @@ const Divider = /*@__PURE__*/ proxyCustomElement(class Divider extends HTMLEleme
|
|
|
18
18
|
render() {
|
|
19
19
|
const { vertical, placement, hasContent } = this;
|
|
20
20
|
const classRet = vertical ? `cty-divider__vertical` : hasContent ? `cty-divider__content-${placement}` : ``;
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: 'dfd49737a845112f77896befa6ac9926a1951f48', class: {
|
|
22
22
|
'cty-divider': true,
|
|
23
23
|
[classRet]: true
|
|
24
|
-
} }, h("slot", { key: '
|
|
24
|
+
} }, h("slot", { key: '8799145031bc0605e950b4f9d3cb6632d65fd54e' })));
|
|
25
25
|
}
|
|
26
26
|
get el() { return this; }
|
|
27
27
|
static get style() { return dividerCss; }
|
package/components/icon.js
CHANGED
|
@@ -40,7 +40,7 @@ const Icon = /*@__PURE__*/ proxyCustomElement(class Icon extends HTMLElement {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
43
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: '03ee82eb0f6aae454d57b5f3c09c4188c72e7a69', class: "cty-icon" }, h("ion-icon", { key: 'e31b63f0721af3ade7af2ae7bd6f4cfc3e6e15d1', src: this._src || undefined, name: this._name || undefined, icon: this._icon || null, size: this.size, color: this.color, lazy: this.lazy, flipRtl: this.flipRtl, sanitize: this.sanitize })));
|
|
44
44
|
}
|
|
45
45
|
static get assetsDirs() { return ["assets"]; }
|
|
46
46
|
get el() { return this; }
|
|
@@ -9,10 +9,37 @@ class CTYCameraPreview {
|
|
|
9
9
|
get isCameraPreviewAvailable() {
|
|
10
10
|
return !!this.cameraPreviewPlugin;
|
|
11
11
|
}
|
|
12
|
+
hasPermission() {
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
if (!this.isCameraPreviewAvailable) {
|
|
15
|
+
reject('Camera preview plugin is not available');
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
this.cameraPreviewPlugin.hasPermission((result) => resolve(result), (error) => reject(error));
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
requestPermission() {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
if (!this.isCameraPreviewAvailable) {
|
|
24
|
+
reject('Camera preview plugin is not available');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.cameraPreviewPlugin.requestPermission(() => resolve(), (error) => reject(error));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
openAppSettings() {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
if (!this.isCameraPreviewAvailable) {
|
|
33
|
+
reject('Camera preview plugin is not available');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this.cameraPreviewPlugin.openAppSettings(() => resolve(), (error) => reject(error));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
12
39
|
startCamera(options) {
|
|
13
40
|
return new Promise((resolve, reject) => {
|
|
14
41
|
if (!this.isCameraPreviewAvailable) {
|
|
15
|
-
return reject('Camera
|
|
42
|
+
return reject('Camera preview plugin is not available');
|
|
16
43
|
}
|
|
17
44
|
this.cameraPreviewPlugin.startCamera(options, resolve, reject);
|
|
18
45
|
});
|
|
@@ -179,7 +206,7 @@ class CTYImagePicker {
|
|
|
179
206
|
_pickMultiplePhotos(file = true, count = 1, imagePickerOptions) {
|
|
180
207
|
return new Promise(async (resolve, reject) => {
|
|
181
208
|
if (!this.isImagePickerAvailable) {
|
|
182
|
-
reject('Image
|
|
209
|
+
reject('Image picker plugin is not available');
|
|
183
210
|
return;
|
|
184
211
|
}
|
|
185
212
|
const option = {
|
|
@@ -281,6 +308,33 @@ class CTYImagePicker {
|
|
|
281
308
|
? this._captureSinglePhoto(file, false, imagePickerOptions)
|
|
282
309
|
: this._pickMultiplePhotos(file, count, imagePickerOptions);
|
|
283
310
|
}
|
|
311
|
+
hasPermission() {
|
|
312
|
+
return new Promise((resolve, reject) => {
|
|
313
|
+
if (!this.isImagePickerAvailable) {
|
|
314
|
+
reject('Image picker plugin is not available');
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
this._imagePickerPlugin.hasReadPermission((result) => resolve(result), (error) => reject(error));
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
requestPermission() {
|
|
321
|
+
return new Promise((resolve, reject) => {
|
|
322
|
+
if (!this.isImagePickerAvailable) {
|
|
323
|
+
reject('Image picker plugin is not available');
|
|
324
|
+
return;
|
|
325
|
+
}
|
|
326
|
+
this._imagePickerPlugin.requestReadPermission((result) => resolve(result), (error) => reject(error));
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
openAppSettings() {
|
|
330
|
+
return new Promise((resolve, reject) => {
|
|
331
|
+
if (!this.isImagePickerAvailable) {
|
|
332
|
+
reject('Image picker plugin is not available');
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
this._imagePickerPlugin.openAppSettings(() => resolve(), (error) => reject(error));
|
|
336
|
+
});
|
|
337
|
+
}
|
|
284
338
|
getPictures(options) {
|
|
285
339
|
var _a, _b, _c, _d, _e, _f;
|
|
286
340
|
return (options === null || options === void 0 ? void 0 : options.camera)
|
|
@@ -114,7 +114,7 @@ const ImageViewer = /*@__PURE__*/ proxyCustomElement(class ImageViewer extends H
|
|
|
114
114
|
autoplay: false,
|
|
115
115
|
attrs: Object.assign({ virtual: true, zoom }, attrs)
|
|
116
116
|
};
|
|
117
|
-
return (h(Host, { key: '
|
|
117
|
+
return (h(Host, { key: '18b1464e3e7b8d103427546e83f7f02380d053de', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-backdrop", { key: 'c7914de771c49f43365bcd2271511595dd94fe4f', backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, h("div", { key: '42ecf8b9c942639eedd01286914c947bd1231aee', class: { 'cty-image-viewer': true, 'cty-image-viewer__hidden': !initialized } }, h("slot", { key: '42c9d2f8fae0ed835148e2eba6c28b219c02b040', name: 'start' }), (this.closeable || this.pager || !this.backdropDismiss) && h("div", { key: '1416c5b64c5d96d1557b1aaf485378dd26ff2925', class: "cty-image-preview__header", onClick: (e) => e.stopPropagation() }, this.pager && h("slot", { key: '62ccb2d8d005b4d958d8daa975bd593723bedbac', name: "pager" }, h("div", { key: 'df8e9d33b45cb52b622ac4b41bcef8573922eb3c', class: "cty-image-preview__pager flex-center" }, h("h6", { key: '5a77fa57b32f9000ea7678fabd4bdc32890314a0', class: "cty-image-preview__pager-text" }, h("span", { key: 'd7f8ab7eb983dc645825f66b1ba0485d1c937e92', class: "cty-image-preview__index" }, this.activeIndex + 1), " / ", this.images.length))), (this.closeable || !this.backdropDismiss) && h("slot", { key: 'c6e1d25d84545a19d829045e8b04da64f79576fa', name: "close" }, h("button", { key: 'ab92d1d5a9423cc086af1dbba7c13a11bcfb7488', class: "cty-image-preview__close cty-button-native", onClick: () => this.dismiss() }, h("cty-icon", { key: 'b2f1536e7454414af54fd9fb0f120c5855bdbfb7', name: "cty-close2" })))), h("cty-swiper", Object.assign({ key: 'd511309c54605a5ebab94c5fea3d3d63e3ff2e5c', ref: (el) => this.swiperEl = el }, swiperAttrs, { onCtySlideChange: (e) => this._slideChange(e) })), h("slot", { key: '90e5b1090d0c6454478076d453b7d3fdbdbf0e04', name: 'end' })))));
|
|
118
118
|
}
|
|
119
119
|
get el() { return this; }
|
|
120
120
|
static get watchers() { return {
|
package/components/index.js
CHANGED
|
@@ -3,7 +3,8 @@ import { c as createAnimation } from './animation.js';
|
|
|
3
3
|
import { c as config } from './config.js';
|
|
4
4
|
export { s as setupConfig } from './config.js';
|
|
5
5
|
export { C as CTYCityData } from './area.js';
|
|
6
|
-
|
|
6
|
+
import { f as formatDateTime } from './status-bar.js';
|
|
7
|
+
export { C as CTYStatusBar, j as addDays, k as addHours, l as addMinutes, n as addMonths, m as addSeconds, o as addYears, q as convertDate, c as convertTimeZone, i as diff, d as formatDate, e as getFormatForDatePicker, h as getFormatForDateTimePicker, b as getTimeZone, a as getUTCDate, g as getUTCDateTime, p as isValidDate, s as secondsToVehicle, r as statusBar } from './status-bar.js';
|
|
7
8
|
export { e as checkScrollEnd, g as getElementRect, a as getEventClientCoords, b as getEventPageCoords, c as scrollElementBottom, s as scrollElementTop, d as scrollToPoint } from './dom.js';
|
|
8
9
|
import { p as parseJson } from './format.js';
|
|
9
10
|
export { h as camelToKebab, i as clamp, d as convertNumber, f as fileSize, k as kebabToCamel, n as numberToChinese, e as numberToLetter, a as pad, g as parseArray, b as percent, c as price, r as randomNum } from './format.js';
|
|
@@ -538,6 +539,68 @@ class CTYMediaDownloader {
|
|
|
538
539
|
}
|
|
539
540
|
const mediaDownloader = new CTYMediaDownloader();
|
|
540
541
|
|
|
542
|
+
class CTYMediaEditor {
|
|
543
|
+
get _mediaEditorPlugin() {
|
|
544
|
+
return window === null || window === void 0 ? void 0 : window.CTYMediaEditor;
|
|
545
|
+
}
|
|
546
|
+
;
|
|
547
|
+
get isMediaEditorAvailable() {
|
|
548
|
+
return !!this._mediaEditorPlugin;
|
|
549
|
+
}
|
|
550
|
+
hasPermission() {
|
|
551
|
+
return new Promise((resolve, reject) => {
|
|
552
|
+
if (!this.isMediaEditorAvailable) {
|
|
553
|
+
reject('Media editor plugin is not available');
|
|
554
|
+
return;
|
|
555
|
+
}
|
|
556
|
+
this._mediaEditorPlugin.hasPermission((result) => resolve(result), (error) => reject(error));
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
requestPermission() {
|
|
560
|
+
return new Promise((resolve, reject) => {
|
|
561
|
+
if (!this.isMediaEditorAvailable) {
|
|
562
|
+
reject('Media editor plugin is not available');
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
this._mediaEditorPlugin.requestPermission((result) => resolve(result), (error) => reject(error));
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
openAppSettings() {
|
|
569
|
+
return new Promise((resolve, reject) => {
|
|
570
|
+
if (!this.isMediaEditorAvailable) {
|
|
571
|
+
reject('Media editor plugin is not available');
|
|
572
|
+
return;
|
|
573
|
+
}
|
|
574
|
+
this._mediaEditorPlugin.openAppSettings(() => resolve(), (error) => reject(error));
|
|
575
|
+
});
|
|
576
|
+
}
|
|
577
|
+
videoTrsanfer(file, options = {}) {
|
|
578
|
+
return new Promise((resolve, reject) => {
|
|
579
|
+
if (!this.isMediaEditorAvailable) {
|
|
580
|
+
return reject('Media editor plugin is not available');
|
|
581
|
+
}
|
|
582
|
+
this._mediaEditorPlugin.transcodeVideo((outputfile) => resolve(outputfile), (err) => reject(err), Object.assign(Object.assign({ outputFileName: formatDateTime(new Date(), 'yyyyMMddHHmmss'), optimizeForNetworkUse: 1, saveToLibrary: false, videoBitrate: 1536000, audioBitrate: 64000 }, options), { fileUri: file }));
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
audioTrsanfer(file, options = {}) {
|
|
586
|
+
return new Promise((resolve, reject) => {
|
|
587
|
+
if (!this.isMediaEditorAvailable) {
|
|
588
|
+
return reject('Media editor plugin is not available');
|
|
589
|
+
}
|
|
590
|
+
this._mediaEditorPlugin.transcodeAudio((outputfile) => resolve(outputfile), (err) => reject(err), Object.assign(Object.assign({ outputFileName: formatDateTime(new Date(), 'yyyyMMddHHmmss'), optimizeForNetworkUse: 1, saveToLibrary: false, audioBitrate: 64000 }, options), { fileUri: file }));
|
|
591
|
+
});
|
|
592
|
+
}
|
|
593
|
+
createThumbnail(file, options = {}) {
|
|
594
|
+
return new Promise((resolve, reject) => {
|
|
595
|
+
if (!this.isMediaEditorAvailable) {
|
|
596
|
+
return reject('Media editor plugin is not available');
|
|
597
|
+
}
|
|
598
|
+
this._mediaEditorPlugin.createThumbnail((outputfile) => resolve(outputfile), (err) => reject(err), Object.assign(Object.assign({ outputFileName: formatDateTime(new Date(), 'yyyyMMddHHmmss'), width: 256, quality: 85 }, options), { fileUri: file }));
|
|
599
|
+
});
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
const mediaEditor = new CTYMediaEditor();
|
|
603
|
+
|
|
541
604
|
class CTYPayment {
|
|
542
605
|
constructor() {
|
|
543
606
|
this._wxPayRequest = () => { };
|
|
@@ -859,4 +922,4 @@ const initialize = (userConfig = {}) => {
|
|
|
859
922
|
CtyMUI.config = config;
|
|
860
923
|
};
|
|
861
924
|
|
|
862
|
-
export { CTYMediaDownloader, CTYPayment, CTYSpeechTranscriber, DownloadMediaType, Easing, ModalFade, ModalRotate, ModalSlide, ModalZoom, SlidePosition, deviceInfo, fromBase64, initialize, localDelete, localGet, localSave, mediaDownloader, parseJson, payment, sessionDelete, sessionGet, sessionSave, speechTranscriber, toBase64 };
|
|
925
|
+
export { CTYMediaDownloader, CTYMediaEditor, CTYPayment, CTYSpeechTranscriber, DownloadMediaType, Easing, ModalFade, ModalRotate, ModalSlide, ModalZoom, SlidePosition, deviceInfo, formatDateTime, fromBase64, initialize, localDelete, localGet, localSave, mediaDownloader, mediaEditor, parseJson, payment, sessionDelete, sessionGet, sessionSave, speechTranscriber, toBase64 };
|
package/components/nav-bar.js
CHANGED
|
@@ -30,7 +30,7 @@ const NavBar = /*@__PURE__*/ proxyCustomElement(class NavBar extends HTMLElement
|
|
|
30
30
|
}
|
|
31
31
|
render() {
|
|
32
32
|
const { start, end, arrow, arrowIcon, type, title } = this;
|
|
33
|
-
return (h(Host, { key: '
|
|
33
|
+
return (h(Host, { key: 'a6fc9f0326ad6f7b85087348d5dcf2c3c15e78af', class: { "cty-nav-bar": true, [type ? 'cty-nav-bar__' + type : '']: true } }, h("ion-header", { key: '3ae9aa93e2b76d44e6b220058a857d132966aada' }, h("ion-toolbar", { key: '4f50bd3a5c89f530fe77cec0c6d3e3c633084373', class: "cty-nav-bar__toolbar" }, start && h("ion-buttons", { key: '02d4e96017a2fc258838e5c419157b49eae51504', slot: "start" }, h("slot", { key: '30449cb63c53a8e2abc9437cf3f113e4026cc2da', name: "start" }, arrow && h("ion-button", { key: '14b8964f2cb324ca621f45cee082d6b6bdbbd57a', class: "cty-nav-bar__arrow", onClick: () => this.action() }, h("cty-icon", { key: 'a57be5da16f0724d107e971245fff1c114a2b539', class: "cty-nav-bar__arrow-icon", name: arrowIcon })))), title && h("ion-title", { key: 'd190a2101879dc404365428c274a648562212496', class: "cty-nav-bar__title" }, h("slot", { key: '8c90403204f3bf65e9e266af8dd1f52dd84dfc73', name: 'title' }, title)), end && h("ion-buttons", { key: '5ffa889f317a33713dc384ce8ec0536406917bb5', slot: "end" }, h("slot", { key: '884a69b196cb434ca350cce621de7034b9d8c49d', name: 'end' }))))));
|
|
34
34
|
}
|
|
35
35
|
get el() { return this; }
|
|
36
36
|
static get style() { return navBarCss; }
|
package/components/overlay.js
CHANGED
|
@@ -71,7 +71,7 @@ const Overlay = /*@__PURE__*/ proxyCustomElement(class Overlay extends HTMLEleme
|
|
|
71
71
|
render() {
|
|
72
72
|
const { position } = this;
|
|
73
73
|
const positionClass = position === 'top' ? 'flex-justify-center' : position === 'bottom' ? 'flex-align-end-center' : 'flex-center';
|
|
74
|
-
return (h(Host, { key: '
|
|
74
|
+
return (h(Host, { key: '0caffb1b2222a8ad595fc880a3a7e71e9206054c', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("div", { key: '87dd3ae3928adae35f4c8e1a8900fb2b06ec8182', class: { 'cty-overlay': true, [positionClass]: true }, onClick: () => this.backdropDismiss && this.dismiss() }, h("slot", { key: '7b24efb48b5ed298dbb9efa4665ab60c5250b417' }), this.html && h("div", { key: 'e9cacdc173e4f4e17d5109701c0199636c7d075e', innerHTML: sanitizeDOMString(this.html), onClick: (e) => e.stopPropagation() }))));
|
|
75
75
|
}
|
|
76
76
|
get el() { return this; }
|
|
77
77
|
static get watchers() { return {
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { d as defineCustomElement$4 } from './alert.js';
|
|
3
|
+
import { d as defineCustomElement$3 } from './backdrop.js';
|
|
4
|
+
import { d as defineCustomElement$2 } from './icon.js';
|
|
5
|
+
import { d as defineCustomElement$1 } from './icon2.js';
|
|
6
|
+
|
|
7
|
+
const permissionAlertCss = ":host{--cty-permission-alert-overlay-position:fixed;--cty-permission-alert-overlay-z-index:999999;--cty-permission-alert-overlay-background:var(--cty-overlay-color);--cty-permission-alert-overlay-width:100vw;--cty-permission-alert-overlay-height:100vh;--cty-permission-alert-width:80%;--cty-permission-alert-background:var(--cty-color-white);--cty-permission-alert-padding-bottom:15px;--cty-permission-alert-padding-end:15px;--cty-permission-alert-padding-start:15px;--cty-permission-alert-padding-top:15px;--cty-permission-alert-border-radius:12px;--cty-permission-alert-title-align:flex-start;--cty-permission-alert-title-color:var(--cty-text-color-primary);--cty-permission-alert-title-size:var(--cty-font-size-medium);--cty-permission-alert-content-margin-bottom:20px;--cty-permission-alert-content-margin-top:20px;--cty-permission-alert-content-size:var(--cty-font-size-base);--cty-permission-alert-content-align:justify;--cty-permission-alert-content-color:var(--cty-text-color-primary);--cty-permission-alert-button-min-height:36px;--cty-permission-alert-button-color:var(--cty-text-color-primary);--cty-permission-alert-button-size:var(--cty-font-size-base);--cty-permission-alert-button-radius:var(--cty-border-radius-medium);--cty-permission-alert-button-primary-background:var(--cty-color-primary);--cty-permission-alert-button-primary-color:var(--cty-text-color-white)}cty-alert{--cty-alert-overlay-position:var(--cty-permission-alert-overlay-position);--cty-alert-overlay-z-index:var(--cty-permission-alert-overlay-z-index);--cty-alert-overlay-background:var(--cty-permission-alert-overlay-background);--cty-alert-overlay-width:var(--cty-permission-alert-overlay-width);--cty-alert-overlay-height:var(--cty-permission-alert-overlay-height);--cty-alert-width:var(--cty-permission-alert-width);--cty-alert-background:var(--cty-permission-alert-background);--cty-alert-padding-bottom:var(--cty-permission-alert-padding-bottom);--cty-alert-padding-end:var(--cty-permission-alert-padding-end);--cty-alert-padding-start:var(--cty-permission-alert-padding-start);--cty-alert-padding-top:var(--cty-permission-alert-padding-top);--cty-alert-border-radius:var(--cty-permission-alert-border-radius);--cty-alert-title-align:var(--cty-permission-alert-title-align);--cty-alert-title-color:var(--cty-permission-alert-title-color);--cty-alert-title-size:var(--cty-permission-alert-title-size);--cty-alert-content-margin-bottom:var(--cty-permission-alert-content-margin-bottom);--cty-alert-content-margin-top:var(--cty-permission-alert-content-margin-top);--cty-alert-content-size:var(--cty-permission-alert-content-size);--cty-alert-content-align:var(--cty-permission-alert-content-align);--cty-alert-content-color:var(--cty-permission-alert-content-color);--cty-alert-button-min-height:var(--cty-permission-alert-button-min-height);--cty-alert-button-color:var(--cty-permission-alert-button-color);--cty-alert-button-size:var(--cty-permission-alert-button-size);--cty-alert-button-radius:var(--cty-permission-alert-button-radius);--cty-alert-button-primary-background:var(--cty-permission-alert-button-primary-background);--cty-alert-button-primary-color:var(--cty-permission-alert-button-primary-color)}";
|
|
8
|
+
|
|
9
|
+
const PermissionAlert = /*@__PURE__*/ proxyCustomElement(class PermissionAlert extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.__attachShadow();
|
|
14
|
+
this.ctyDismiss = createEvent(this, "ctyDismiss", 7);
|
|
15
|
+
this.ctyTap = createEvent(this, "ctyTap", 7);
|
|
16
|
+
this.backdropDismiss = false;
|
|
17
|
+
this.title = '需要申请相机权限';
|
|
18
|
+
this.content = '需要开启相机权限,用于拍照、扫码或视频聊天。我们承诺仅在功能使用时调用摄像头。';
|
|
19
|
+
this.closeable = false;
|
|
20
|
+
this.buttons = [{
|
|
21
|
+
text: '取消',
|
|
22
|
+
action: 'cancel'
|
|
23
|
+
}, {
|
|
24
|
+
text: '去打开',
|
|
25
|
+
action: 'permission'
|
|
26
|
+
}];
|
|
27
|
+
}
|
|
28
|
+
_buttonClick(event) {
|
|
29
|
+
event.stopPropagation();
|
|
30
|
+
const { item, index } = event.detail;
|
|
31
|
+
if (item.action !== 'cancel') {
|
|
32
|
+
this.ctyTap.emit({ item, index });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
_dismiss() {
|
|
36
|
+
this.ctyDismiss.emit();
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
return (h(Host, { key: '56a3795cba4d50f34250ae7bd6a95cd1f9aeb8be' }, h("cty-alert", { key: '30d8a9b62d7cb7c391a746755dbecdaef347ada0', part: "permission-alert", class: "cty-permission-alert", animated: false, overlayIndex: 1, backdropDismiss: this.backdropDismiss, title: this.title, content: this.content, closeable: this.closeable, buttons: this.buttons, onCtyTap: (e) => this._buttonClick(e), onCtyDismiss: () => this._dismiss() }, h("slot", { key: 'e661dd93f220462e2478233fce1a887bb6ac57d3', name: "header", slot: "header" }), h("slot", { key: '128a5f263a932e9c5263c51fccd6f2a67ef1cc49', name: "content", slot: "content" }), h("slot", { key: 'bfefd5cdb9c04a6fb3b13f1e4ea21d3b1a1b3dae', name: "buttons", slot: "buttons" }))));
|
|
40
|
+
}
|
|
41
|
+
get el() { return this; }
|
|
42
|
+
static get style() { return permissionAlertCss; }
|
|
43
|
+
}, [1, "cty-permission-alert", {
|
|
44
|
+
"backdropDismiss": [4, "backdrop-dismiss"],
|
|
45
|
+
"title": [1],
|
|
46
|
+
"content": [1],
|
|
47
|
+
"closeable": [4],
|
|
48
|
+
"buttons": [16]
|
|
49
|
+
}]);
|
|
50
|
+
function defineCustomElement() {
|
|
51
|
+
if (typeof customElements === "undefined") {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const components = ["cty-permission-alert", "cty-alert", "cty-backdrop", "cty-icon", "ion-icon"];
|
|
55
|
+
components.forEach(tagName => { switch (tagName) {
|
|
56
|
+
case "cty-permission-alert":
|
|
57
|
+
if (!customElements.get(tagName)) {
|
|
58
|
+
customElements.define(tagName, PermissionAlert);
|
|
59
|
+
}
|
|
60
|
+
break;
|
|
61
|
+
case "cty-alert":
|
|
62
|
+
if (!customElements.get(tagName)) {
|
|
63
|
+
defineCustomElement$4();
|
|
64
|
+
}
|
|
65
|
+
break;
|
|
66
|
+
case "cty-backdrop":
|
|
67
|
+
if (!customElements.get(tagName)) {
|
|
68
|
+
defineCustomElement$3();
|
|
69
|
+
}
|
|
70
|
+
break;
|
|
71
|
+
case "cty-icon":
|
|
72
|
+
if (!customElements.get(tagName)) {
|
|
73
|
+
defineCustomElement$2();
|
|
74
|
+
}
|
|
75
|
+
break;
|
|
76
|
+
case "ion-icon":
|
|
77
|
+
if (!customElements.get(tagName)) {
|
|
78
|
+
defineCustomElement$1();
|
|
79
|
+
}
|
|
80
|
+
break;
|
|
81
|
+
} });
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export { PermissionAlert as P, defineCustomElement as d };
|
|
@@ -17,7 +17,7 @@ const PermissionPurpose = /*@__PURE__*/ proxyCustomElement(class PermissionPurpo
|
|
|
17
17
|
this.ctyDismiss.emit();
|
|
18
18
|
}
|
|
19
19
|
render() {
|
|
20
|
-
return (h(Host, { key: '
|
|
20
|
+
return (h(Host, { key: 'bca028072a8313b0f7b774ec6693703def84181a' }, h("cty-backdrop", { key: '3a2d92e7474c23706fe520486d456d5768ccdf9f', backdropDismiss: this.backdropDismiss, position: "top", onCtyDismiss: () => this.dismiss() }, h("div", { key: 'f5d1bb932f282961ca9afc377a08b3651e20e131', class: "cty-permission-purpose", onClick: (e) => e.stopPropagation() }, h("div", { key: '91e475575512cac998bf5d3d67311e455c85c413', innerHTML: sanitizeDOMString(this.description) })))));
|
|
21
21
|
}
|
|
22
22
|
get el() { return this; }
|
|
23
23
|
static get style() { return permissionPurposeCss; }
|
package/components/swipe-item.js
CHANGED
|
@@ -31,10 +31,10 @@ const SwipeItem = /*@__PURE__*/ proxyCustomElement(class SwipeItem extends HTMLE
|
|
|
31
31
|
}
|
|
32
32
|
render() {
|
|
33
33
|
const { offset, size, vertical } = this;
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '4c2d804a0671caac64268f336b33beeb21cb4385', class: "cty-swipe-item", style: {
|
|
35
35
|
[vertical ? 'height' : 'width']: `${size}px`,
|
|
36
36
|
transform: `translate${vertical ? 'Y' : 'X'}(${offset}px)`
|
|
37
|
-
} }, h("slot", { key: '
|
|
37
|
+
} }, h("slot", { key: '0622753fe67dbc647b4381c6ead2ceb51303b3b7' })));
|
|
38
38
|
}
|
|
39
39
|
get el() { return this; }
|
|
40
40
|
static get style() { return swipeItemCss; }
|
package/components/swipe.js
CHANGED
|
@@ -292,7 +292,7 @@ const Swipe = /*@__PURE__*/ proxyCustomElement(class Swipe extends HTMLElement {
|
|
|
292
292
|
'transform': `translate${vertical ? 'Y' : 'X'}(${+offset.toFixed(2)}px)`,
|
|
293
293
|
[vertical ? 'height' : 'width']: `${this.trackSize}px`,
|
|
294
294
|
};
|
|
295
|
-
return (h(Host, { key: '
|
|
295
|
+
return (h(Host, { key: '7c43fa74ff636ccb9f561bfe46b9b295742ac894', class: "cty-swipe" }, h("slot", { key: 'c66ee224e75363811866d2b70a41b27c3a1424eb', name: "start" }), h("div", { key: '015662e04b5ec9b5d3b76757de25e2c52c721557', class: { 'cty-swipe__track': true, 'cty-swipe__track-vertical': this.vertical }, style: style, onTouchStart: (e) => this.onTouchStart(e), onTouchMove: (e) => this.onTouchMove(e), onTouchEnd: (e) => this.onTouchEnd(e), onTouchCancel: (e) => this.onTouchEnd(e), onMouseDown: (e) => this.onTouchStart(e), onMouseMove: (e) => this.onTouchMove(e), onMouseUp: (e) => this.onTouchEnd(e), onMouseLeave: (e) => this.onTouchEnd(e) }, h("slot", { key: 'f60a25a27fe96cd1cd010260fff0c094750688e7', onSlotchange: () => this.slotChanged() })), this.indicator && this.renderIndicator(), h("slot", { key: '545e73e9347b1b3319bbb258287461360d13cd10', name: "end" })));
|
|
296
296
|
}
|
|
297
297
|
get el() { return this; }
|
|
298
298
|
static get style() { return swipeCss; }
|
package/components/swiper.js
CHANGED
|
@@ -95,7 +95,7 @@ const Swiper = /*@__PURE__*/ proxyCustomElement(class Swiper extends HTMLElement
|
|
|
95
95
|
return this._swiper;
|
|
96
96
|
}
|
|
97
97
|
render() {
|
|
98
|
-
return (h(Host, { key: '
|
|
98
|
+
return (h(Host, { key: '4279a041c842204c199d6ebc251f44128f0e3b65', class: "cty-swiper" }, h("swiper-container", Object.assign({ key: '61fa76ec459f33c92504fec0d3cdd9465e882b19', class: "cty-swipe__container", ref: (el) => this.swiperEl = el, autoplay: this.autoplay, modules: this.swiperModules, direction: this.direction, loop: this.loop, pagination: this.pagination, observer: this.observer, "observer-parents": this.observerParents, onSwiperslidechangetransitionend: () => this.slideChange(), onSwiperclick: () => this.slideClick() }, this.attrs), this._swipers.map((item, idx) => h("swiper-slide", { class: "cty-swipe__slide" }, h("slot", { name: idx + '' }, h("div", { class: "swiper-zoom-container" }, h("img", { src: item[this.props.pic], alt: item[this.props.alt || ''] || '', onClick: (e) => e.stopPropagation() }))))), h("slot", { key: 'be071f0b3e5059921d8febb081456659816e8765', name: "container-start", slot: "container-start" }), h("slot", { key: 'eb6160945f271cccb52bcdad7977f38dbda3552e', name: "container-end", slot: "container-end" }))));
|
|
99
99
|
}
|
|
100
100
|
get el() { return this; }
|
|
101
101
|
static get watchers() { return {
|
|
@@ -9,6 +9,33 @@ class CTYVideoCapture {
|
|
|
9
9
|
get isVideoCaptureAvailable() {
|
|
10
10
|
return !!this._videoCapturePlugin;
|
|
11
11
|
}
|
|
12
|
+
hasPermission() {
|
|
13
|
+
return new Promise((resolve, reject) => {
|
|
14
|
+
if (!this.isVideoCaptureAvailable) {
|
|
15
|
+
reject('Video capture plugin is not available');
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
this._videoCapturePlugin.hasCapturePermission((result) => resolve(result), (error) => reject(error));
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
requestPermission() {
|
|
22
|
+
return new Promise((resolve, reject) => {
|
|
23
|
+
if (!this.isVideoCaptureAvailable) {
|
|
24
|
+
reject('Video capture plugin is not available');
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this._videoCapturePlugin.requestCapturePermission((result) => resolve(result), (error) => reject(error));
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
openAppSettings() {
|
|
31
|
+
return new Promise((resolve, reject) => {
|
|
32
|
+
if (!this.isVideoCaptureAvailable) {
|
|
33
|
+
reject('Video capture plugin is not available');
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
this._videoCapturePlugin.openAppSettings(() => resolve(), (error) => reject(error));
|
|
37
|
+
});
|
|
38
|
+
}
|
|
12
39
|
captureVideo(options) {
|
|
13
40
|
return new Promise((resolve, reject) => {
|
|
14
41
|
if (!this.isVideoCaptureAvailable) {
|
|
@@ -24,7 +51,7 @@ class CTYVideoCapture {
|
|
|
24
51
|
else {
|
|
25
52
|
resolve(null);
|
|
26
53
|
}
|
|
27
|
-
}, Object.assign({ width: 1280 }, options));
|
|
54
|
+
}, reject, Object.assign({ width: 1280 }, options));
|
|
28
55
|
}
|
|
29
56
|
catch (error) {
|
|
30
57
|
reject(error);
|
|
@@ -77,6 +77,33 @@ class CTYAudioRecorder {
|
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
+
hasPermission() {
|
|
81
|
+
return new Promise((resolve, reject) => {
|
|
82
|
+
if (!this.isAudioRecorderAvailable) {
|
|
83
|
+
reject('Audio recorder plugin is not available');
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this._audioRecorderPlugin.hasPermission((result) => resolve(result), (error) => reject(error));
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
requestPermission() {
|
|
90
|
+
return new Promise((resolve, reject) => {
|
|
91
|
+
if (!this.isAudioRecorderAvailable) {
|
|
92
|
+
reject('Audio recorder plugin is not available');
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
this._audioRecorderPlugin.requestPermission(() => resolve(), (error) => reject(error));
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
openAppSettings() {
|
|
99
|
+
return new Promise((resolve, reject) => {
|
|
100
|
+
if (!this.isAudioRecorderAvailable) {
|
|
101
|
+
reject('Audio recorder plugin is not available');
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
this._audioRecorderPlugin.openAppSettings(() => resolve(), (error) => reject(error));
|
|
105
|
+
});
|
|
106
|
+
}
|
|
80
107
|
uploadWxRecording(localId, tip = exports.UploadProgressTip.SHOW) {
|
|
81
108
|
return new Promise((resolve, reject) => {
|
|
82
109
|
try {
|
|
@@ -8,10 +8,37 @@ class CTYCameraPreview {
|
|
|
8
8
|
get isCameraPreviewAvailable() {
|
|
9
9
|
return !!this.cameraPreviewPlugin;
|
|
10
10
|
}
|
|
11
|
+
hasPermission() {
|
|
12
|
+
return new Promise((resolve, reject) => {
|
|
13
|
+
if (!this.isCameraPreviewAvailable) {
|
|
14
|
+
reject('Camera preview plugin is not available');
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.cameraPreviewPlugin.hasPermission((result) => resolve(result), (error) => reject(error));
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
requestPermission() {
|
|
21
|
+
return new Promise((resolve, reject) => {
|
|
22
|
+
if (!this.isCameraPreviewAvailable) {
|
|
23
|
+
reject('Camera preview plugin is not available');
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
this.cameraPreviewPlugin.requestPermission(() => resolve(), (error) => reject(error));
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
openAppSettings() {
|
|
30
|
+
return new Promise((resolve, reject) => {
|
|
31
|
+
if (!this.isCameraPreviewAvailable) {
|
|
32
|
+
reject('Camera preview plugin is not available');
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
this.cameraPreviewPlugin.openAppSettings(() => resolve(), (error) => reject(error));
|
|
36
|
+
});
|
|
37
|
+
}
|
|
11
38
|
startCamera(options) {
|
|
12
39
|
return new Promise((resolve, reject) => {
|
|
13
40
|
if (!this.isCameraPreviewAvailable) {
|
|
14
|
-
return reject('Camera
|
|
41
|
+
return reject('Camera preview plugin is not available');
|
|
15
42
|
}
|
|
16
43
|
this.cameraPreviewPlugin.startCamera(options, resolve, reject);
|
|
17
44
|
});
|
|
@@ -107,82 +107,41 @@ const Alert = class {
|
|
|
107
107
|
};
|
|
108
108
|
Alert.style = alertCss;
|
|
109
109
|
|
|
110
|
-
const
|
|
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;
|