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
|
@@ -30,6 +30,8 @@ export class Camera {
|
|
|
30
30
|
this.zoomSteps = 20; //仅android有效,通过这个算出每一份的的比例: (getMaxZoom() + 1) / allowMaxZoom
|
|
31
31
|
this.touchZoom = true;
|
|
32
32
|
this.touchZoomProp = 0.01;
|
|
33
|
+
this.permissionAlertTitle = '需要申请开启相机权限';
|
|
34
|
+
this.permissionAlertContent = '需要开启相机权限,用于拍照。我们承诺仅在功能使用时调用摄像头。';
|
|
33
35
|
this.ratioIndex = 0;
|
|
34
36
|
this.flash = false;
|
|
35
37
|
this.zoomIndex = 0;
|
|
@@ -38,6 +40,10 @@ export class Camera {
|
|
|
38
40
|
this.imageViewerIndex = 0;
|
|
39
41
|
this.currentPhotoMode = 'multiple';
|
|
40
42
|
this.currentZoom = 1;
|
|
43
|
+
this.hasPermission = false;
|
|
44
|
+
this.permissionAlertVisible = false;
|
|
45
|
+
this.isToastOpen = false;
|
|
46
|
+
this.toastContent = '';
|
|
41
47
|
this.startZoom = 1;
|
|
42
48
|
this.SCREEN_WIDTH = window.screen.width;
|
|
43
49
|
this.SCREEN_HEIGHT = window.screen.height;
|
|
@@ -62,9 +68,46 @@ export class Camera {
|
|
|
62
68
|
bodyEl.style.visibility = 'visible';
|
|
63
69
|
bodyEl.style.background = this.originalBodyBackground;
|
|
64
70
|
}
|
|
65
|
-
|
|
71
|
+
async requestPermission() {
|
|
72
|
+
try {
|
|
73
|
+
this.hasPermission = await cameraPreview.hasPermission();
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
this.hasPermission = false;
|
|
77
|
+
}
|
|
78
|
+
if (!this.hasPermission) {
|
|
79
|
+
try {
|
|
80
|
+
await cameraPreview.requestPermission();
|
|
81
|
+
this.hasPermission = true;
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
const { code, message } = error;
|
|
85
|
+
if (code == 'PERMISSION_DENIED_NEED_SETTINGS') {
|
|
86
|
+
this.permissionAlertVisible = true;
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
if (code != 'PERMISSION_DENIED_FIRST_TIME' && message) {
|
|
90
|
+
this.isToastOpen = true;
|
|
91
|
+
this.toastContent = message;
|
|
92
|
+
}
|
|
93
|
+
this.ctyDismiss.emit();
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
async initCamera() {
|
|
99
|
+
await this.requestPermission();
|
|
100
|
+
if (!this.hasPermission) {
|
|
101
|
+
this.ctyDismiss.emit();
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
66
104
|
const height = this.getCameraHeight();
|
|
67
|
-
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 }))
|
|
105
|
+
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) => {
|
|
106
|
+
const { code } = error;
|
|
107
|
+
if (code == 'PERMISSION_DENIED_NEED_SETTINGS') {
|
|
108
|
+
this.permissionAlertVisible = true;
|
|
109
|
+
}
|
|
110
|
+
});
|
|
68
111
|
}
|
|
69
112
|
close() {
|
|
70
113
|
this.ctyDismiss.emit();
|
|
@@ -216,9 +259,26 @@ export class Camera {
|
|
|
216
259
|
}
|
|
217
260
|
cameraPreview.setZoom(Math.min(startCameraZoom + diff, maxZoom));
|
|
218
261
|
}
|
|
262
|
+
async toOpenAppSetting(event) {
|
|
263
|
+
const { item } = event.detail;
|
|
264
|
+
if (item.action == 'permission') {
|
|
265
|
+
try {
|
|
266
|
+
await cameraPreview.openAppSettings();
|
|
267
|
+
this.permissionAlertVisible = false;
|
|
268
|
+
}
|
|
269
|
+
catch (error) {
|
|
270
|
+
this.closePermissionAlert(event);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
closePermissionAlert(e) {
|
|
275
|
+
e.stopPropagation();
|
|
276
|
+
this.permissionAlertVisible = false;
|
|
277
|
+
this.ctyDismiss.emit();
|
|
278
|
+
}
|
|
219
279
|
render() {
|
|
220
280
|
const { title, closeIcon, flash, flipText, flashText, ratioText, ratios, ratioIndex, zoomIndex, zooms, mode, singleText, multipleText, currentPhotoMode, confirmIcon, confirmText, deleteIcon, pictures, showImageViewer, imageViewerIndex, touchZoom, currentZoom } = this;
|
|
221
|
-
return (h(Host, { key: '
|
|
281
|
+
return (h(Host, { key: '249d6c9269af0bb404fa13c2679db953580196be', class: "cty-camera", onClick: (e) => e.stopPropagation() }, h("cty-nav-bar", { key: '3ddc96ed9540f67485013bd1d52cf593f7a159ec', title: title, type: "clear" }, h("slot", { key: 'c3124d840af6803fe87669dc1da346b5a51d6dc1', name: "header-start", slot: "start" }, !!closeIcon && h("ion-button", { key: '48ebfe61e98a586fb127feb9e57e556108665126', class: "cty-camera__close", onClick: () => this.close() }, h("cty-icon", { key: '8da9e811d18687d6c3c3fd19f3b6d96db3b4d992', class: "cty-camera__close-icon", name: closeIcon })))), h("div", { key: '918f5390b8d846231a1fbd3550858114efb3797f', class: "cty-camera-main", onTouchStart: (e) => this.touchstart(e), onTouchMove: (e) => this.touchmove(e), onTouchEnd: (e) => this.touchend(e) }, h("div", { key: '4d872387a4bb06d4d5030c181c6a67a9ef19f5aa', class: "cty-camera-widgets", part: "widgets" }, !!flipText && h("button", { key: '6de4076ab5b8ee8a31a63305fc4fd4c954e87291', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.flipCamera() }, h("cty-icon", { key: 'cf2cd7ccbf12a6b972371389045aa7360a7e361c', class: "cty-camera-widget__icon", name: "cty-flip" }), !!flipText && h("span", { key: '63816718efe322900dd80192a3c96e1dde0f56bf', class: "cty-camera-widget__text" }, flipText)), !!flashText && h("button", { key: '71f482e92876e408cfe4391c92c79789d83ff12b', class: "cty-button-native cty-camera-widget", part: "widget", onClick: () => this.toggleFlash() }, h("cty-icon", { key: '70a2838d229df2418807329013cf2db86c8b2886', class: "cty-camera-widget__icon", name: flash ? 'cty-flash-on' : 'cty-flash-off' }), !!flashText && h("span", { key: 'dc6dcb389cde04abe9e94824fc7ab23d7cbd49c3', class: "cty-camera-widget__text" }, flashText)), !!ratioText && h("button", { key: '13fd40b68adeefca52a5775b2fc86bd0602728c7', class: "cty-button-native cty-camera-widget", part: "ratio", onClick: () => this.ratioChange() }, h("span", { key: 'e971f50bb4a923dfb119497d530890dc2a2f4cc2', class: "cty-camera-widget__ratio flex-center" }, ratios[ratioIndex]), !!ratioText && h("span", { key: 'c13601a6c3866a72120a9b441d971c5134e95b26', class: "cty-camera-widget__text" }, ratioText)))), h("div", { key: 'b82e91f54f7416c8f8ba0bbc99ad034b7d90d201', class: "cty-camera-controls safe-area-bottom-padding" }, mode == 'both' && pictures.length <= 0 && h("div", { key: 'da4867ad484906fb92bb0b9840ae05cab7f6017c', class: "cty-camera-controls__mode flex-center", part: "mode" }, 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), 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)), h("slot", { key: '706e3c7c60be9bea7a887743981e6c0c83d867a1', name: "zooms" }, !touchZoom && zooms.length > 0 && h("div", { key: 'dd6fe65fe090190eb2f1f0b678ebfa84f8bbbe31', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, zooms.map((item, idx) => (h("div", { class: { 'cty-camera-controls__zoom-item flex-center': true, 'cty-camera-controls__zoom-item__active': zoomIndex === idx }, onClick: () => this.setZoom(idx) }, h("span", { class: "cty-camera-controls__zoom-text flex-center" }, item, "X"))))), touchZoom && h("div", { key: '9f0a68f5c87b36f50807a1ddce3fd7d495f5b0f7', class: "cty-camera-controls__zooms flex-center", part: "zooms" }, h("div", { key: '2b1f97c6fbe953d71779f536d408d8a878872b1c', class: { 'cty-camera-controls__zoom-item flex-center cty-camera-controls__zoom-item__active': true }, onClick: () => this.resetZoom() }, h("span", { key: '2e16a3df094da8fcfe0b3758732a48bc67e00797', class: "cty-camera-controls__zoom-text flex-center" }, currentZoom, "X")))), h("div", { key: '06a01b4fcb96b0bd33bde8ed91fc2b436e406791', class: "cty-camera-controls__main flex-center" }, h("div", { key: 'c748dab6ff814deab00d7f0ff8e2b9ae439acc82', class: "cty-camera-controls__main-left flex-center" }), h("div", { key: 'ae6105b6f28bd8be992ebf164987806a5cf52e9c', class: "cty-camera-controls__take-photo flex-center" }, h("button", { key: '1bbe3c2225a533fd7f4b9de9b7778c748c4f5a03', class: "cty-button-native cty-camera-controls__take-photo-button", part: "take-photo", onClick: () => this.takePhoto() })), h("div", { key: 'd8b0277f2daf2c6085edd86c18d220a7c24e1e37', class: "cty-camera-controls__main-confirm flex-center" }, currentPhotoMode !== 'single' && pictures.length > 0 && !!deleteIcon && h("button", { key: 'cc83aa1aab767ea7a3aef3b44194b4891836c09a', class: "cty-camera-controls__main-delete cty-button-native flex-column-center", onClick: () => this.deleteLastPicture() }, h("cty-icon", { key: '5b2a06c3819fa158b12769b4cea08f7df6cecff2', class: "cty-camera-controls__main-delete-icon", name: deleteIcon })), currentPhotoMode !== 'single' && pictures.length > 0 && h("button", { key: '09642c94b869090cd1381b75a949013623558fb6', class: "cty-button-native flex-column-center", onClick: () => this.confirm() }, h("cty-icon", { key: '09e36ce96317e298f0a54ce6c1d76009a4ad4b95', class: "cty-camera-controls__main-confirm-icon", name: confirmIcon }), confirmText && h("span", { key: '9d24bf57e4c32abbbfb95671c1191f7d85adfce4', class: "cty-camera-controls__main-confirm-text" }, confirmText)))), h("slot", { key: '5530ce7f1411007acfd28326b53b5caa52c52376', name: "images" }, h("div", { key: '2a9366f14ff5878bb704703d9fd65a4549c002fb', class: "cty-camera-controls__images flex-align-center" }, currentPhotoMode !== 'single' && pictures.map((item, idx) => (h("div", { class: "cty-camera-controls__image", onClick: () => this.toImageViewer(idx) }, h("img", { class: 'cty-camera-controls__image-img', src: item.thumbnail || item.url }), h("button", { class: "cty-button-native", onClick: (e) => this.deletePicture(e, idx) }, h("cty-icon", { class: "cty-camera-controls__image-delete", name: closeOutline })))))))), showImageViewer && 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' && h("div", { key: '2c0753cab107695962bbdd55ab9b334e91c361a2', class: "cty-camera-viewer__single flex-center-between", slot: "pager" }, h("button", { key: '3cf7393d965245e4b7072afe50412c150840cec3', class: "cty-camera-viewer__single-close cty-button-native", onClick: (event) => this.closeSingleImageViewer(event) }, h("cty-icon", { key: 'db1b6d35ff40650a00903d37d03adf9c4e7ce311', name: "cty-close2" })), h("button", { key: '25df5828eafcc1191e826445e0b20e41eec869bf', class: "cty-camera-viewer__single-confirm cty-button-native", onClick: () => this.confirm() }, h("cty-icon", { key: 'e96ba7b2413df359b4ab6ea184250edbf3618d2a', name: "cty-tick" }))), currentPhotoMode !== 'multiple' && h("i", { key: '8a167eb7c089ede4aeff07e73cd14424a0ccca55', slot: "close" })), this.permissionAlertVisible && 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) }), h("ion-toast", { key: 'ac0224081e8ce22eaebfd7224391cf1957c2ff47', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
|
|
222
282
|
}
|
|
223
283
|
static get is() { return "cty-camera"; }
|
|
224
284
|
static get encapsulation() { return "shadow"; }
|
|
@@ -742,6 +802,70 @@ export class Camera {
|
|
|
742
802
|
"setter": false,
|
|
743
803
|
"reflect": false,
|
|
744
804
|
"defaultValue": "0.01"
|
|
805
|
+
},
|
|
806
|
+
"permissionAlertTitle": {
|
|
807
|
+
"type": "string",
|
|
808
|
+
"attribute": "permission-alert-title",
|
|
809
|
+
"mutable": false,
|
|
810
|
+
"complexType": {
|
|
811
|
+
"original": "string",
|
|
812
|
+
"resolved": "string",
|
|
813
|
+
"references": {}
|
|
814
|
+
},
|
|
815
|
+
"required": false,
|
|
816
|
+
"optional": false,
|
|
817
|
+
"docs": {
|
|
818
|
+
"tags": [],
|
|
819
|
+
"text": ""
|
|
820
|
+
},
|
|
821
|
+
"getter": false,
|
|
822
|
+
"setter": false,
|
|
823
|
+
"reflect": false,
|
|
824
|
+
"defaultValue": "'\u9700\u8981\u7533\u8BF7\u5F00\u542F\u76F8\u673A\u6743\u9650'"
|
|
825
|
+
},
|
|
826
|
+
"permissionAlertContent": {
|
|
827
|
+
"type": "string",
|
|
828
|
+
"attribute": "permission-alert-content",
|
|
829
|
+
"mutable": false,
|
|
830
|
+
"complexType": {
|
|
831
|
+
"original": "string",
|
|
832
|
+
"resolved": "string",
|
|
833
|
+
"references": {}
|
|
834
|
+
},
|
|
835
|
+
"required": false,
|
|
836
|
+
"optional": false,
|
|
837
|
+
"docs": {
|
|
838
|
+
"tags": [],
|
|
839
|
+
"text": ""
|
|
840
|
+
},
|
|
841
|
+
"getter": false,
|
|
842
|
+
"setter": false,
|
|
843
|
+
"reflect": false,
|
|
844
|
+
"defaultValue": "'\u9700\u8981\u5F00\u542F\u76F8\u673A\u6743\u9650\uFF0C\u7528\u4E8E\u62CD\u7167\u3002\u6211\u4EEC\u627F\u8BFA\u4EC5\u5728\u529F\u80FD\u4F7F\u7528\u65F6\u8C03\u7528\u6444\u50CF\u5934\u3002'"
|
|
845
|
+
},
|
|
846
|
+
"permissionAlertbuttons": {
|
|
847
|
+
"type": "unknown",
|
|
848
|
+
"attribute": "permission-alertbuttons",
|
|
849
|
+
"mutable": false,
|
|
850
|
+
"complexType": {
|
|
851
|
+
"original": "AlertButton[]",
|
|
852
|
+
"resolved": "AlertButton<any>[] | undefined",
|
|
853
|
+
"references": {
|
|
854
|
+
"AlertButton": {
|
|
855
|
+
"location": "import",
|
|
856
|
+
"path": "../../interface",
|
|
857
|
+
"id": "src/interface.d.ts::AlertButton"
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
"required": false,
|
|
862
|
+
"optional": true,
|
|
863
|
+
"docs": {
|
|
864
|
+
"tags": [],
|
|
865
|
+
"text": ""
|
|
866
|
+
},
|
|
867
|
+
"getter": false,
|
|
868
|
+
"setter": false
|
|
745
869
|
}
|
|
746
870
|
};
|
|
747
871
|
}
|
|
@@ -754,7 +878,10 @@ export class Camera {
|
|
|
754
878
|
"showImageViewer": {},
|
|
755
879
|
"imageViewerIndex": {},
|
|
756
880
|
"currentPhotoMode": {},
|
|
757
|
-
"currentZoom": {}
|
|
881
|
+
"currentZoom": {},
|
|
882
|
+
"permissionAlertVisible": {},
|
|
883
|
+
"isToastOpen": {},
|
|
884
|
+
"toastContent": {}
|
|
758
885
|
};
|
|
759
886
|
}
|
|
760
887
|
static get events() {
|
|
@@ -46,6 +46,8 @@ export class CameraPhoto {
|
|
|
46
46
|
this.clipImageQuality = 1;
|
|
47
47
|
this.clipImageSuffix = 'jpeg';
|
|
48
48
|
this.permissionPurpose = true;
|
|
49
|
+
this.permissionAlertTitle = '需要申请开启相册权限';
|
|
50
|
+
this.permissionAlertContent = '需要开启相册权限,我们会帮助您选择好的照片或视频上传发布';
|
|
49
51
|
this.root = 'default';
|
|
50
52
|
this.animated = false;
|
|
51
53
|
this.overlay = true;
|
|
@@ -60,6 +62,10 @@ export class CameraPhoto {
|
|
|
60
62
|
this.showPermissionPurpose = false;
|
|
61
63
|
this.permissionDescription = '';
|
|
62
64
|
this.showCameraPreview = false;
|
|
65
|
+
this.hasPermission = deviceInfo.isMicroMessager;
|
|
66
|
+
this.permissionAlertVisible = false;
|
|
67
|
+
this.isToastOpen = false;
|
|
68
|
+
this.toastContent = '';
|
|
63
69
|
}
|
|
64
70
|
triggerChanged() {
|
|
65
71
|
const { trigger, el, triggerController } = this;
|
|
@@ -102,6 +108,30 @@ export class CameraPhoto {
|
|
|
102
108
|
onWillDismiss() {
|
|
103
109
|
return eventMethod(this.el, 'ctyWillDismiss');
|
|
104
110
|
}
|
|
111
|
+
async requestPermission() {
|
|
112
|
+
try {
|
|
113
|
+
this.hasPermission = await imagePicker.hasPermission();
|
|
114
|
+
}
|
|
115
|
+
catch (error) {
|
|
116
|
+
this.hasPermission = false;
|
|
117
|
+
}
|
|
118
|
+
if (!this.hasPermission) {
|
|
119
|
+
try {
|
|
120
|
+
await imagePicker.requestPermission();
|
|
121
|
+
this.hasPermission = true;
|
|
122
|
+
}
|
|
123
|
+
catch (error) {
|
|
124
|
+
const { code, message } = error;
|
|
125
|
+
if (code == 'PERMISSION_DENIED_NEED_SETTINGS') {
|
|
126
|
+
this.permissionAlertVisible = true;
|
|
127
|
+
}
|
|
128
|
+
else if (code != 'PERMISSION_DENIED_FIRST_TIME' && message) {
|
|
129
|
+
this.isToastOpen = true;
|
|
130
|
+
this.toastContent = message;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
105
135
|
async _buttonClick(event) {
|
|
106
136
|
event.stopPropagation();
|
|
107
137
|
const { index } = event.detail;
|
|
@@ -121,13 +151,20 @@ export class CameraPhoto {
|
|
|
121
151
|
return;
|
|
122
152
|
}
|
|
123
153
|
let imageList = [];
|
|
154
|
+
const pictureOption = {
|
|
155
|
+
camera: option.action === 'camera',
|
|
156
|
+
file: this.file,
|
|
157
|
+
count: this.count,
|
|
158
|
+
option: this.photoOption,
|
|
159
|
+
};
|
|
160
|
+
//暂时处理多选图片的情况
|
|
161
|
+
if (!pictureOption.camera && pictureOption.count > 1 && !this.hasPermission) {
|
|
162
|
+
await this.requestPermission();
|
|
163
|
+
if (!this.hasPermission) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
124
167
|
try {
|
|
125
|
-
const pictureOption = {
|
|
126
|
-
camera: option.action === 'camera',
|
|
127
|
-
file: this.file,
|
|
128
|
-
count: this.count,
|
|
129
|
-
option: this.photoOption,
|
|
130
|
-
};
|
|
131
168
|
imageList = await imagePicker.getPictures(pictureOption);
|
|
132
169
|
this.showPermissionPurpose = false;
|
|
133
170
|
}
|
|
@@ -191,8 +228,22 @@ export class CameraPhoto {
|
|
|
191
228
|
option.handler && option.handler({ option, imageList });
|
|
192
229
|
this.ctyTap.emit({ index, imageList });
|
|
193
230
|
}
|
|
231
|
+
async toOpenAppSetting(event) {
|
|
232
|
+
const { item } = event.detail;
|
|
233
|
+
if (item.action == 'permission') {
|
|
234
|
+
try {
|
|
235
|
+
await imagePicker.openAppSettings();
|
|
236
|
+
}
|
|
237
|
+
catch (error) { }
|
|
238
|
+
this.permissionAlertVisible = false;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
closePermissionAlert(e) {
|
|
242
|
+
e.stopPropagation();
|
|
243
|
+
this.permissionAlertVisible = false;
|
|
244
|
+
}
|
|
194
245
|
render() {
|
|
195
|
-
return (h(Host, { key: '
|
|
246
|
+
return (h(Host, { key: '6626fa119a9c343df0fd6175c16c0a9cd18b6bf2', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden': true, 'cty-pos-cover': this.overlay }), style: { zIndex: `${20000 + this.overlayIndex}` } }, 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 && (h("cty-backdrop", { key: '83e30b75f98f48e69e97898c6b95e835e519f999', backdropDismiss: false }, 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 && h("cty-permission-purpose", { key: '55dd946e9896839ccd7930b1b3e0573429e29dc1', description: this.permissionDescription }), this.continuous && this.showCameraPreview && h("cty-camera", Object.assign({ key: '67729d43a590b8630169bd1daac1117f1f41641c' }, this.cameraProps, { onCtyDismiss: () => this.showCameraPreview = false, onCtyConfirm: (e) => this.continuousConfirm(e) })), this.permissionAlertVisible && 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) }), h("ion-toast", { key: '7a30b6c1e4314cd092bef5c313bff43449fd12ee', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000, position: 'middle' })));
|
|
196
247
|
}
|
|
197
248
|
static get is() { return "cty-camera-photo"; }
|
|
198
249
|
static get encapsulation() { return "shadow"; }
|
|
@@ -675,6 +726,70 @@ export class CameraPhoto {
|
|
|
675
726
|
"reflect": false,
|
|
676
727
|
"defaultValue": "true"
|
|
677
728
|
},
|
|
729
|
+
"permissionAlertTitle": {
|
|
730
|
+
"type": "string",
|
|
731
|
+
"attribute": "permission-alert-title",
|
|
732
|
+
"mutable": false,
|
|
733
|
+
"complexType": {
|
|
734
|
+
"original": "string",
|
|
735
|
+
"resolved": "string",
|
|
736
|
+
"references": {}
|
|
737
|
+
},
|
|
738
|
+
"required": false,
|
|
739
|
+
"optional": false,
|
|
740
|
+
"docs": {
|
|
741
|
+
"tags": [],
|
|
742
|
+
"text": ""
|
|
743
|
+
},
|
|
744
|
+
"getter": false,
|
|
745
|
+
"setter": false,
|
|
746
|
+
"reflect": false,
|
|
747
|
+
"defaultValue": "'\u9700\u8981\u7533\u8BF7\u5F00\u542F\u76F8\u518C\u6743\u9650'"
|
|
748
|
+
},
|
|
749
|
+
"permissionAlertContent": {
|
|
750
|
+
"type": "string",
|
|
751
|
+
"attribute": "permission-alert-content",
|
|
752
|
+
"mutable": false,
|
|
753
|
+
"complexType": {
|
|
754
|
+
"original": "string",
|
|
755
|
+
"resolved": "string",
|
|
756
|
+
"references": {}
|
|
757
|
+
},
|
|
758
|
+
"required": false,
|
|
759
|
+
"optional": false,
|
|
760
|
+
"docs": {
|
|
761
|
+
"tags": [],
|
|
762
|
+
"text": ""
|
|
763
|
+
},
|
|
764
|
+
"getter": false,
|
|
765
|
+
"setter": false,
|
|
766
|
+
"reflect": false,
|
|
767
|
+
"defaultValue": "'\u9700\u8981\u5F00\u542F\u76F8\u518C\u6743\u9650\uFF0C\u6211\u4EEC\u4F1A\u5E2E\u52A9\u60A8\u9009\u62E9\u597D\u7684\u7167\u7247\u6216\u89C6\u9891\u4E0A\u4F20\u53D1\u5E03'"
|
|
768
|
+
},
|
|
769
|
+
"permissionAlertbuttons": {
|
|
770
|
+
"type": "unknown",
|
|
771
|
+
"attribute": "permission-alertbuttons",
|
|
772
|
+
"mutable": false,
|
|
773
|
+
"complexType": {
|
|
774
|
+
"original": "AlertButton[]",
|
|
775
|
+
"resolved": "AlertButton<any>[] | undefined",
|
|
776
|
+
"references": {
|
|
777
|
+
"AlertButton": {
|
|
778
|
+
"location": "import",
|
|
779
|
+
"path": "../../interface",
|
|
780
|
+
"id": "src/interface.d.ts::AlertButton"
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
},
|
|
784
|
+
"required": false,
|
|
785
|
+
"optional": true,
|
|
786
|
+
"docs": {
|
|
787
|
+
"tags": [],
|
|
788
|
+
"text": ""
|
|
789
|
+
},
|
|
790
|
+
"getter": false,
|
|
791
|
+
"setter": false
|
|
792
|
+
},
|
|
678
793
|
"root": {
|
|
679
794
|
"type": "string",
|
|
680
795
|
"attribute": "root",
|
|
@@ -874,7 +989,10 @@ export class CameraPhoto {
|
|
|
874
989
|
"clipImage": {},
|
|
875
990
|
"showPermissionPurpose": {},
|
|
876
991
|
"permissionDescription": {},
|
|
877
|
-
"showCameraPreview": {}
|
|
992
|
+
"showCameraPreview": {},
|
|
993
|
+
"permissionAlertVisible": {},
|
|
994
|
+
"isToastOpen": {},
|
|
995
|
+
"toastContent": {}
|
|
878
996
|
};
|
|
879
997
|
}
|
|
880
998
|
static get events() {
|
|
@@ -193,7 +193,7 @@ export class CanvasBoard {
|
|
|
193
193
|
} }, h("i", { style: { width: item * 2 + 'px', height: item * 2 + 'px' } }))))), h("div", { class: "cty-canvas-board__line-alpha", onClick: e => e.stopPropagation() }, h("div", { class: "cty-canvas-board__line-alpha-bg" }), 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) })))));
|
|
194
194
|
}
|
|
195
195
|
render() {
|
|
196
|
-
return (h(Host, { key: '
|
|
196
|
+
return (h(Host, { key: '5c1d547318a944d16e02a0d89e3fffded39e0bdd', class: "cty-canvas-board flex-column" }, h("slot", { key: 'e0acd38c2dd73f444ff810398f181d59465e0ec1', name: "header" }), this.headerOpn && (h("div", { key: '83a86afb9509cc85780f93ba712f6ccb0f1a728b', class: "cty-canvas-board__header flex-center-between" }, h("slot", { key: '622ab8273190d2795c1816663656eb1deb1b8e67', name: "header-start" }), this.bgIcon && h("button", { key: 'd8f7a0040b968e826533fbe5fa96c2a7801b3c72', class: "cty-button-native", onClick: () => this.updateBgColor() }, h("cty-icon", { key: '43e2bd356e3d51368e11f1e7673292eb35dbcdfc', name: this.bgIcon, class: "cty-canvas-board__palette" }), 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) })), h("slot", { key: '0f9c4685c82f01b16da1c216f1a082c331aac1f2', name: "header-opn-start" }, " "), (this.undoIcon || this.redoIcon) && h("div", { key: '12b46e18bf7621a274db06e488bf2aad8c5f841c', class: "cty-canvas-board__opn flex-center" }, this.undoIcon && h("button", { key: 'f1aaa8dbd4a335ab95726213a0637fed02dd6c02', class: "cty-button-native cty-canvas-board__opn-icon", onClick: () => this.undo() }, h("cty-icon", { key: '6f69dd8f47e2817d38a0f478e533c696b848a888', name: this.undoIcon, class: { 'cty-canvas-board__opn-active': this.drawingHistory.length > 1 && this.step > 0 } })), this.redoIcon && h("button", { key: '6800f914f7a959eeb86884d5f296c6c98edb8f31', class: "cty-button-native cty-canvas-board__opn-icon", onClick: () => this.redo() }, h("cty-icon", { key: 'dffc5e3e76c4fc5f8ea7e54398f86a90b8b38007', name: this.redoIcon, class: { 'cty-canvas-board__opn-active': this.step < this.drawingHistory.length - 1 } }))), h("slot", { key: '52cd777aa3d99718e3b73333bc70f8da551d51d0', name: "header-opn-end" }), this.clearIcon && h("button", { key: 'beaf0980ad1613210e05fc18684f8050e0bc14f9', class: "cty-button-native cty-canvas-board__clear", onClick: () => this.clear() }, h("cty-icon", { key: '4c59d492b92480fd2eb028480cc25823cf3af4f9', name: this.clearIcon })), h("slot", { key: 'a03ad3ae3c5295a09e23371bbd03da1b005278f7', name: "header-end" }))), h("slot", { key: 'e85153d6eb9f3f41bc43782deef4d1a7a9a11c1b', name: "main" }), h("div", { key: '74cdcc4b9ca9da6a0391f077cb4cdf263836150e', class: "cty-canvas-board__main" }, 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) }), h("canvas", { key: '3be84d339b42c57bb9543d50dabac45b345d7744', ref: el => (this.imageCanvasEl = el), style: { display: 'none' } }), h("span", { key: '03b3a54198b7e4115ded1ee51dfae47a03958f3f', class: "cty-canvas-board__eraser-circle", ref: el => (this.eraserEl = el) }), this.isCanvasEmpty && h("slot", { key: '40f663e90e0ac2e8eec1c173d92d4f2afbb17197', name: "placeholder" }), h("slot", { key: 'c5ce29e7aef527910d6ab7593675475e1c83e465' })), h("slot", { key: '41f037aa77b7c4b02b882d74b384816c03f1a498', name: "footer" }), this.footerOpn && (h("div", { key: 'e8a967e7a47e2803942c5758805485b45ff05de3', class: "cty-canvas-board__footer flex-center" }, h("slot", { key: '8c792a5b6b0bed91769061f1f08dcce4c857df72', name: "footer-start" }), this.pencilIcon && (h("button", { key: 'd38bd9c14fb12ef9df57140119a9cc73958eb183', class: "cty-button-native cty-canvas-board__pen", onClick: e => this.updatePencil(e) }, h("cty-icon", { key: 'be9d5a10731393ae63743ff48d9fcab513a4194d', name: this.pencilIcon, class: { 'cty-canvas-board__footer-active': !this.isEraser } }))), h("button", { key: '7f7ac5a80313a8091be48557d660b2437c96bc84', class: "cty-button-native cty-canvas-board__eraser", onClick: () => (this.isEraser = !this.isEraser) }, h("cty-icon", { key: '27b2c2fac487a6e6c64e2901ecda959b5986e53c', name: this.eraserIcon, class: { 'cty-canvas-board__footer-active': this.isEraser } })), h("button", { key: 'd4a8a76108b5a0daffe6363a00a831c6ea2f1f5b', class: "cty-button-native cty-canvas-board__color-button", onClick: () => this.updateColor() }, 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) })), h("slot", { key: '9e7c87513fed66167fc8d222510090c7cd1195b3', name: "footer-end" }))), h("slot", { key: 'a7319635e7d42639532bb2eb8233a44190ca91c3', name: "bottom" }), this.showButtons && (h("div", { key: '7d8a64385d94fe7c581266242e0c36d792eb500d', class: "cty-canvas-board__buttons flex-justify-end" }, h("slot", { key: '81f318a6785818049ad7495992d4ec9712a782f5', name: "bottom-button-start" }), h("button", { key: '1a2f3161c2525d8ba1e1570285d0afbfd5cac710', class: "cty-canvas-board__button cty-button-native", onClick: () => this.clear() }, this.clearLabel), h("button", { key: '094fe6960e7eaeb06f94554d42564c07a9c80b92', class: "cty-canvas-board__button cty-button-native", onClick: () => this.confirm() }, this.confirmLabel), h("slot", { key: '3a4e37ea42b3bd2e3653fc8488b4ca8e33055946', name: "bottom-button-end" }))), this.renderPopover()));
|
|
197
197
|
}
|
|
198
198
|
static get is() { return "cty-canvas-board"; }
|
|
199
199
|
static get encapsulation() { return "shadow"; }
|
|
@@ -750,7 +750,7 @@ export class CanvasVideo {
|
|
|
750
750
|
}, onTransitionEnd: () => this.transitionend() }, h("div", { class: "cty-canvas-video__progress-inner" }))), !this.isVertical && this.isMove && !!this.progressBar && (h("div", { class: "cty-canvas-video__time" }, h("span", { class: "cty-canvas-video__time-left" }, this.transTime(this.pTime)), h("span", { class: "cty-canvas-video__time-center" }, "/"), h("span", { class: "cty-canvas-video__time-right" }, this.transTime(this.pDuration)))), !(!this.isVertical && this.isMove && !!this.progressBar) && (h("div", { class: "cty-canvas-video__content" }, option.renderSlot !== 'content' && (h("div", { class: "cty-canvas-video__content-box" }, h("div", { class: "cty-canvas-video__tip" }, h("cty-icon", { name: "cty-lamp" }), option[this._props.tip || 'tip']), h("p", { class: "cty-canvas-video__date" }, option[this._props.date || 'date']), h("p", { class: "cty-canvas-video__description" }, option[this._props.description || 'description']), h("button", { class: "cty-canvas-video__name cty-button-native", onClick: e => this.clickName(e) }, '@' + option[this._props.name || 'name']))), option.contentRender !== undefined && h("slot", { name: option.contentRender }))), !(!this.isVertical && this.isMove && !!this.progressBar) && (h("div", { class: "cty-canvas-video__sidebar" }, option.renderSlot !== 'sidebar' && (h("button", { class: "cty-canvas-video__avatar cty-button-native", onClick: e => this.clickAvatar(e) }, h("img", { src: option[this._props.avatar || 'avatar'] }), this.avatarButton && h("span", { class: "cty-canvas-video__avatar-button" }, this.avatarButton))), option.renderSlot !== 'sidebar' && option[this._props.likeCount || 'likeCount'] && (h("button", { class: "cty-canvas-video__sidebar-item cty-button-native", onClick: e => this.clickLike(e) }, h("cty-icon", { name: "cty-thumb" }), h("span", null, option[this._props.likeCount || 'likeCount']))), option.renderSlot !== 'sidebar' && option[this._props.viewCount || 'viewCount'] && (h("button", { class: "cty-canvas-video__sidebar-item cty-button-native" }, h("cty-icon", { name: "cty-eye" }), h("span", null, option[this._props.viewCount || 'viewCount']))), option.renderSlot !== 'sidebar' && option[this._props.collectCount || 'collectCount'] && (h("button", { class: "cty-canvas-video__sidebar-item cty-button-native", onClick: e => this.clickCollect(e) }, h("cty-icon", { name: "cty-star" }), h("span", null, option[this._props.collectCount || 'collectCount']))), option.sidebarRender !== 'sidebar' && (h("button", { class: "cty-canvas-video__sidebar-item cty-button-native", onClick: e => this.clickShare(e) }, h("cty-icon", { name: "cty-share" }), h("span", null, "\u5206\u4EAB"))), option.sidebarRender !== undefined && h("slot", { name: option.sidebarRender }))))));
|
|
751
751
|
}
|
|
752
752
|
render() {
|
|
753
|
-
return (h(Host, { key: '
|
|
753
|
+
return (h(Host, { key: 'f8c538c55322d321377e2126501c3050e822b3e2', class: "cty-canvas-video" }, h("div", { key: '21d4c6f094f8eeb9c96dced1a7487faae9c82ec4', class: "cty-canvas-videos" }, h("video", { key: 'da6db380316549fe168a05a75c4c8d735a965f8b', ref: el => (this.videoEl1 = el), preload: this.preload, "x5-video-player-type": "h5", "x5-video-player-fullscreen": "true", playsinline: true, "webkit-playsinline": true, onTimeUpdate: () => this.videoTimeupdate1(), onEnded: () => this.videoEnded(), src: this.videoUrl1, typeof: "video/mp4", autoplay: this.autoplay && this.videoIndex == 0 }), h("video", { key: 'cfc6431ea3c65228bff76cb5984b656d6ce1e607', ref: el => (this.videoEl2 = el), preload: this.preload, "x5-video-player-type": "h5", "x5-video-player-fullscreen": "true", playsinline: true, "webkit-playsinline": true, onTimeUpdate: () => this.videoTimeupdate2(), onEnded: () => this.videoEnded(), src: this.videoUrl2, typeof: "video/mp4", autoplay: this.autoplay && this.videoIndex == 1 }), h("video", { key: '9482762c33cecb5465f194e0f2ce571a3c3b12ec', ref: el => (this.videoEl3 = el), preload: this.preload, "x5-video-player-type": "h5", "x5-video-player-fullscreen": "true", playsinline: true, "webkit-playsinline": true, onTimeUpdate: () => this.videoTimeupdate3(), onEnded: () => this.videoEnded(), src: this.videoUrl3, typeof: "video/mp4", autoplay: this.autoplay && this.videoIndex == 2 })), h("div", { key: 'b32eb36ff437a1884eaa64ae94e09f39c288e5ee', class: "cty-canvas-video__slides", ref: el => (this.videoSlidesEl = el) }, this.renderSlide())));
|
|
754
754
|
}
|
|
755
755
|
static get is() { return "cty-canvas-video"; }
|
|
756
756
|
static get encapsulation() { return "shadow"; }
|
|
@@ -381,7 +381,7 @@ export class Cascader {
|
|
|
381
381
|
this.ctyConfirm.emit({ values, indexes, options });
|
|
382
382
|
}
|
|
383
383
|
render() {
|
|
384
|
-
return (h(Host, { key: '
|
|
384
|
+
return (h(Host, { key: '97e5ba39b37f33da627e357ca5398b6aef2c203f', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-backdrop", { key: 'b1d162c9aec1551acd7c7b27109bc56f1920a085', position: "bottom", backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, h("div", { key: '61fd570a4c6c6834931d560c8a7fd9f3b86fbaf3', class: "cty-cascader", part: "cascader", onClick: (e) => e.stopPropagation() }, h("slot", { key: 'ad35d68959c51871e694738e5f5c74667df19958', name: 'header' }), h("div", { key: 'c1f09c031b41362be4b1623370c16878b1c1a8dc', class: "cty-cascader-header", part: "header" }, h("button", { key: '4b59e5a0e7745dc2221a4043cd7685015c308a0c', onClick: () => this.dismiss(), class: "cancel cty-button-native" }, this.cancelText), h("div", { key: 'a338cb8c142934f2bf62125c7072245edd5ba7bf', class: "cty-cascader-title" }, this.title), h("button", { key: 'b19bfb4f26f7c4ec012a8c7e566e0885da677f92', onClick: () => this.confirm(), class: "confirm cty-button-native" }, this.confirmText)), h("div", { key: 'fbb92633280ca5d57b46fa7d2993962627a555df', class: "cty-cascader-columns", part: "columns", style: { height: this.columnHeight + 'px' } }, this.scrollColumns.map(c => h("div", { class: "cty-cascader-column", onTouchStart: (e) => this.handleTouchstart(e, c), onTouchMove: (e) => this.handleTouchmove(e, c), onTouchEnd: () => this.handleTouchend(c), onMouseDown: (e) => this.handleTouchstart(e, c), onMouseMove: (e) => this.handleTouchmove(e, c), onMouseUp: () => this.handleTouchend(c) }, h("div", { ref: (el) => this.setScrollEl(el, c), class: "cty-cascader-scroller", style: { transform: 'translateY(' + c.translate + 'px)', 'transition-duration': c.duration + 'ms', 'transition-property': c.duration ? 'transform' : 'none' }, onTransitionEnd: () => this.handleTransitionend(c) }, c.column.map((option, i) => h("div", { class: 'cty-cascader-option ' + (option.className || ''), style: { height: this.optionHeight + 'px' }, onClick: () => this.handleClick(c, i) }, h("div", { class: 'cty-cascader-text ' + (option.textClassName || '') }, option[this.textKey])))))), h("div", { key: '8e968e7accfba77c182c23f34fdb7f4eb5dd6e20', class: "cty-cascader-picked", style: { top: this.center + 'px', height: this.optionHeight + 'px' } }), h("div", { key: 'd00cf3538a16042826c872d618438b608c20168f', class: "cty-cascader-mask", style: { 'background-size': '100% ' + (this.columnHeight - this.optionHeight) / 2 + 'px' } }))))));
|
|
385
385
|
}
|
|
386
386
|
static get is() { return "cty-cascader"; }
|
|
387
387
|
static get encapsulation() { return "shadow"; }
|
|
@@ -101,13 +101,13 @@ export class CascaderView {
|
|
|
101
101
|
}
|
|
102
102
|
render() {
|
|
103
103
|
const levels = this.getLevels();
|
|
104
|
-
return (h(Host, { key: '
|
|
104
|
+
return (h(Host, { key: '0e088b5852a0d7b895e1df2af144a5ba7b2627d2', class: "cty-cascader-view" }, h("div", { key: 'c587171c7a6a0860a7623c6ab7f0aa2ba1b564e5', class: "cty-cascader-tabs" }, levels.map((level, index) => (h("div", { class: {
|
|
105
105
|
'cty-cascader-tab': true,
|
|
106
106
|
'cty-cascader-tab-active': this.tabActiveIndex === index,
|
|
107
|
-
}, part: "tab-item", onClick: () => this.onTabChange(index) }, h("div", { class: "cty-cascader-header-title", ref: el => (this.tabRefs[index] = el) }, level.selected ? level.selected[this.props.label] : this.placeholder)))), h("div", { key: '
|
|
107
|
+
}, part: "tab-item", onClick: () => this.onTabChange(index) }, h("div", { class: "cty-cascader-header-title", ref: el => (this.tabRefs[index] = el) }, level.selected ? level.selected[this.props.label] : this.placeholder)))), h("div", { key: '514114f4fa21eae5fb109df308c44c0f4ea76d83', class: "cty-cascader-tab-underline", style: {
|
|
108
108
|
width: `${this.underlineWidth}px`,
|
|
109
109
|
transform: `translateX(${this.underlineLeft}px)`,
|
|
110
|
-
} })), h("div", { key: '
|
|
110
|
+
} })), h("div", { key: '564a6c3b894182929571d48eca0ea6084d914062', class: "cty-cascader-content" }, (() => {
|
|
111
111
|
const level = levels[this.tabActiveIndex];
|
|
112
112
|
if (!level)
|
|
113
113
|
return null;
|
|
@@ -56,14 +56,14 @@ export class Circle {
|
|
|
56
56
|
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}`;
|
|
57
57
|
}
|
|
58
58
|
render() {
|
|
59
|
-
return (h(Host, { key: '
|
|
59
|
+
return (h(Host, { key: '2f368270af4614789d5598e5bc90b3e2ef057989', class: "cty-circle" }, h("svg", { key: '1df0553171d9fec249e84cf41f710826f49b3026', ref: el => (this.svgEl = el) }, this.needDefs && h("defs", { key: 'd57f574b35bbf69c57fc40803f3f7fb9acbcf9a9' }, h("linearGradient", { key: 'cf43aa12f3d51cf6a243f9638de9dedf2257280a', id: this.gradientId, x1: "100%", y1: "0%", x2: "0%", y2: "0%", gradientTransform: "rotate(90)" }, this.colors.map(() => (h("stop", null))))), h("path", { key: 'b5f534ab0dae045ee9d90f7dc9ca7781858e75f7', ref: el => (this.layerEl = el), class: "cty-circle__layer", style: {
|
|
60
60
|
'stroke-width': this.width + 'px',
|
|
61
61
|
'strokeDasharray': (this.ratio * this.perimeter) + 'px ' + this.perimeter + 'px'
|
|
62
|
-
} }), h("path", { key: '
|
|
62
|
+
} }), h("path", { key: 'c0e0e7bde4ee4218d369f0a68c45bdcc41b9bf6f', ref: el => (this.hoverEl = el), class: "cty-circle__hover", style: {
|
|
63
63
|
'stroke': this.rate <= 0 && this.zeroTransparent ? 'transparent' : this.needDefs ? 'url(#' + this.gradientId + ')' : this.color,
|
|
64
64
|
'stroke-width': +this.width + this.widthDif + 'px',
|
|
65
65
|
'strokeDasharray': (this.ratio * this.rate / 100 * this.perimeter) + 'px ' + this.perimeter + 'px'
|
|
66
|
-
} })), this.text !== '' && h("div", { key: '
|
|
66
|
+
} })), this.text !== '' && h("div", { key: '87e72df56f972317345f50b3b7e82ff002df5048', class: "cty-circle__text" }, this.text), h("slot", { key: '269615587b996b6dc54c2a3390a0ef47ff08fb4c' })));
|
|
67
67
|
}
|
|
68
68
|
static get is() { return "cty-circle"; }
|
|
69
69
|
static get encapsulation() { return "shadow"; }
|
|
@@ -135,8 +135,8 @@ export class CountDown {
|
|
|
135
135
|
return timeText;
|
|
136
136
|
}
|
|
137
137
|
render() {
|
|
138
|
-
return (h(Host, { key: '
|
|
139
|
-
this.timeRange.map((item, idx) => (h("div", { class: "cty-count-down__item", part: "item" }, h("span", { class: "cty-count-down__label", part: "label" }, pad(this.timeData[item], 2) || this.timeData[item]), (this.unit || idx !== this.timeRange.length - 1) && h("span", { class: "cty-count-down__unit" }, this.unit ? this.dateFormatUnit[item] : ':')))), this.isSingle && (h("div", { key: '
|
|
138
|
+
return (h(Host, { key: 'd2d208764379ab3b71735d5d171020fb423a71bd', class: "cty-count-down" }, !this.isSingle &&
|
|
139
|
+
this.timeRange.map((item, idx) => (h("div", { class: "cty-count-down__item", part: "item" }, h("span", { class: "cty-count-down__label", part: "label" }, pad(this.timeData[item], 2) || this.timeData[item]), (this.unit || idx !== this.timeRange.length - 1) && h("span", { class: "cty-count-down__unit" }, this.unit ? this.dateFormatUnit[item] : ':')))), this.isSingle && (h("div", { key: 'd2736b2880e5a30d7ecb9d4ee94049dfc4fa82d0', class: "cty-count-down__item", part: "item" }, h("span", { key: '97ee81f41d93a9c1dfc1cda655f820193eec9524', class: "cty-count-down__label", part: "label" }, " ", this.formattedTime, " "))), h("slot", { key: '5d87201788959f4858f432e72be3cff75b7c081e' })));
|
|
140
140
|
}
|
|
141
141
|
static get is() { return "cty-count-down"; }
|
|
142
142
|
static get encapsulation() { return "shadow"; }
|
|
@@ -200,7 +200,7 @@ export class CropImage {
|
|
|
200
200
|
return (h("div", { class: "cty-crop-image__buttons flex-center-between safe-area-bottom-border-color" }, this.cancelText && cancelCmp, this.confirmText && confirmCmp));
|
|
201
201
|
}
|
|
202
202
|
render() {
|
|
203
|
-
return (h(Host, { key: '
|
|
203
|
+
return (h(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() }, h("slot", { key: '441105402304f96770ff61b883993c952f7ea4a9', name: "header" }), h("div", { key: 'affa68ce2eacf57bff5dcbc140c1da82d59dc8a3', class: "cty-crop-image__wrapper", ref: el => (this.imageEl = el) }, h("img", { key: '9c5dd8cafb8e14f7f0e5d6ee2cc999a139580342', src: this.url, class: "cty-crop-image__image" })), h("div", { key: 'eafd9083b6728615b767dae842c8b102ad40916d', class: "cty-crop-image__clip", ref: el => (this.clipEl = el) }), h("slot", { key: '25cb5fb31191e0a991064164b4c5752f39b7499b', name: "clip" }), this.renderButtons(), h("slot", { key: 'e60a010fea26d6fa38a380c4cb9f6c4c28c25558', name: "footer" })));
|
|
204
204
|
}
|
|
205
205
|
static get is() { return "cty-crop-image"; }
|
|
206
206
|
static get encapsulation() { return "shadow"; }
|
|
@@ -12,10 +12,10 @@ export class Divider {
|
|
|
12
12
|
render() {
|
|
13
13
|
const { vertical, placement, hasContent } = this;
|
|
14
14
|
const classRet = vertical ? `cty-divider__vertical` : hasContent ? `cty-divider__content-${placement}` : ``;
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'dfd49737a845112f77896befa6ac9926a1951f48', class: {
|
|
16
16
|
'cty-divider': true,
|
|
17
17
|
[classRet]: true
|
|
18
|
-
} }, h("slot", { key: '
|
|
18
|
+
} }, h("slot", { key: '8799145031bc0605e950b4f9d3cb6632d65fd54e' })));
|
|
19
19
|
}
|
|
20
20
|
static get is() { return "cty-divider"; }
|
|
21
21
|
static get encapsulation() { return "shadow"; }
|
|
@@ -91,24 +91,24 @@ export class Dropdown {
|
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
93
|
const { elRect, innerOptions, tabActiveIndex, arrowIcon, innerValue, direction } = this;
|
|
94
|
-
return (h(Host, { key: '
|
|
94
|
+
return (h(Host, { key: '8bafea86f2e4f369aa9c91c53b53d5bda24429c6', class: {
|
|
95
95
|
'cty-dropdown': true,
|
|
96
96
|
'cty-dropdown-open': tabActiveIndex !== -1,
|
|
97
|
-
} }, h("div", { key: '
|
|
97
|
+
} }, h("div", { key: '53b674e74ef38333347878e6d24f55d082822e4c', class: "cty-dropdown-nav" }, innerOptions.map((option, index) => (h("div", { class: {
|
|
98
98
|
'cty-dropdown-item': true,
|
|
99
99
|
'cty-dropdown-item__disabled': !!option.disabled,
|
|
100
100
|
'cty-dropdown-item__active': index === tabActiveIndex,
|
|
101
101
|
}, onClick: () => this.toggleNavPop(index) }, h("div", { class: "cty-dropdown-item-title flex-center" }, h("span", { class: "cty-dropdown-item-title-text" }, option.label), h("span", { class: {
|
|
102
102
|
'cty-dropdown-item-title-arrow': true,
|
|
103
103
|
'cty-dropdown-item-title-arrow__active': index === tabActiveIndex,
|
|
104
|
-
} }, h("cty-icon", { name: option.arrowIcon || arrowIcon }))))))), h("div", { key: '
|
|
104
|
+
} }, h("cty-icon", { name: option.arrowIcon || arrowIcon }))))))), h("div", { key: '70758a011ed538e3a9215bf6a00431ba99f4cbad', class: {
|
|
105
105
|
'cty-dropdown-popup': true,
|
|
106
106
|
'cty-dropdown-popup__visible': tabActiveIndex != -1,
|
|
107
107
|
}, style: {
|
|
108
108
|
top: `${direction == 'up' ? 0 : elRect.bottom}px`,
|
|
109
109
|
bottom: `${direction == 'up' ? 'auto' : 0}`,
|
|
110
110
|
height: `${direction == 'up' ? `${elRect.top}px` : 'auto'}`
|
|
111
|
-
} }, h("div", { key: '
|
|
111
|
+
} }, h("div", { key: 'd7212399b2011a0ae339c742cea1affd0697050a', class: "cty-dropdown-popup-mask", onClick: this.handleMaskClick }), h("div", { key: '1a774b0f33129111ad07eccbe1ec137f59512ffc', class: "cty-dropdown-popup-body", style: { bottom: `${direction == 'up' ? '0px' : 'auto'}` } }, innerOptions.map((option, index) => {
|
|
112
112
|
if (index != tabActiveIndex)
|
|
113
113
|
return null;
|
|
114
114
|
return (h("slot", { name: "content" }, h("div", { class: "cty-dropdown-popup-content" }, option.children && Array.isArray(option.children) && option.children.map((child, index) => (h("slot", { name: 'content-item' + index }, h("div", { class: { 'cty-dropdown-popup-item': true, "cty-dropdown-popup-item__active": innerValue[tabActiveIndex] == child.key }, onClick: () => this.handleItemClick(child) }, child.label)))))));
|
|
@@ -6,7 +6,7 @@ export class Empty {
|
|
|
6
6
|
}
|
|
7
7
|
render() {
|
|
8
8
|
const image = this.image === undefined ? (config.get('resUrlPrefix', '') + 'assets/cty_res/svg/cty-no-data.svg') : this.image;
|
|
9
|
-
return (h(Host, { key: '
|
|
9
|
+
return (h(Host, { key: 'd3c212326854e78a39d572a26ad41bea325c281a', class: "cty-empty" }, h("slot", { key: '99cd7aed9db5764d586d5e51fca62ce44c20d6d3', name: "top" }), image && h("img", { key: 'f35737267d6e8f89c288acff429c76168f48117f', class: "cty-empty__image", src: image }), h("slot", { key: '47c776265f6db9018f2161e5ccddee5b03c511d2', name: "image" }), this.description && h("p", { key: '974e5071b52337bd6e2304b6dabbc34ea0aa0455', class: "cty-empty__description" }, this.description), h("slot", { key: '86322cbea30f876cbd774c6cf291d2ee7a650c29', name: "description" })));
|
|
10
10
|
}
|
|
11
11
|
static get is() { return "cty-empty"; }
|
|
12
12
|
static get encapsulation() { return "shadow"; }
|