@fewangsit/wangsvue-fats 1.0.0-alpha.41 → 1.0.0-alpha.42
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/assets/lottiejs/loading-page-B9ooQcfF.system.js +1 -0
- package/assets/lottiejs/loading-page-CQ0mKER2.es.js +15 -0
- package/assets/lottiejs/loading-table-B4T3FYiI.system.js +1 -0
- package/assets/lottiejs/loading-table-BnpbX8Ew.es.js +15 -0
- package/assets/lottiejs/no-data-CMWnya_k.system.js +1 -0
- package/{no-data-DLHO1L_u.js → assets/lottiejs/no-data-DOy8kIGF.es.js} +13 -2
- package/components/animation/Animation-6756VN9N.system.js +1 -0
- package/components/animation/Animation-COWVilAA.es.js +428 -0
- package/components/approverinfo/ApproverInfo-BdqBpNjY.system.js +1 -0
- package/components/approverinfo/ApproverInfo-C3_ibV8c.es.js +321 -0
- package/components/assetinfo/AssetInfo-BBgKToRP.system.js +1 -0
- package/components/assetinfo/AssetInfo-CmwgOU74.es.js +298 -0
- package/components/backgroundimagecropper/BackgroundImageCropper-DFHtaSyE.system.js +1 -0
- package/components/backgroundimagecropper/BackgroundImageCropper-HKzUEXq-.es.js +57 -0
- package/components/badge/Badge-CndPv5v9.system.js +1 -0
- package/components/badge/Badge-DA-XiE1C.es.js +115 -0
- package/components/badgegroup/BadgeGroup-Bj0EjoML.es.js +68 -0
- package/components/badgegroup/BadgeGroup-Y-HhiHk8.system.js +1 -0
- package/components/basecalendar/BaseCalendar-47ahYXrt.es.js +867 -0
- package/components/basecalendar/BaseCalendar-Ce46jOkg.system.js +1 -0
- package/components/basetree/BaseTree-DDu1qI7t.system.js +1 -0
- package/components/basetree/BaseTree-DLSA5FMh.es.js +167 -0
- package/components/breadcrumb/Breadcrumb-B5bAijry.system.js +1 -0
- package/components/breadcrumb/Breadcrumb-BWSmLPqn.es.js +46 -0
- package/components/button/Button-D-MSv_AS.es.js +120 -0
- package/components/button/Button-Okx1_kOu.system.js +1 -0
- package/components/buttonbulkaction/ButtonBulkAction-B4RcdWmb.es.js +185 -0
- package/components/buttonbulkaction/ButtonBulkAction-DLmvicRL.system.js +1 -0
- package/components/buttoncopy/ButtonCopy-BZgQAFOM.es.js +31 -0
- package/components/buttoncopy/ButtonCopy-CKi1bBpz.system.js +1 -0
- package/components/buttondownload/ButtonDownload-Bw9T3mbW.es.js +92 -0
- package/components/buttondownload/ButtonDownload-CpA0ryUT.system.js +1 -0
- package/components/buttonfilter/ButtonFilter-BIE-jM2i.es.js +28 -0
- package/components/buttonfilter/ButtonFilter-C4WRvUrj.system.js +1 -0
- package/components/buttonradio/ButtonRadio-5VUY8o5h.es.js +83 -0
- package/components/buttonradio/ButtonRadio-B2wWrgB5.system.js +1 -0
- package/components/buttonscan/ButtonScan-BCScT2cx.es.js +421 -0
- package/components/buttonscan/ButtonScan-TbyhlW5M.system.js +1 -0
- package/components/buttonsearch/ButtonSearch-Clbafqts.es.js +70 -0
- package/components/buttonsearch/ButtonSearch-e57pD5r3.system.js +1 -0
- package/components/buttonselecttree/ButtonSelectTree-B-_Iw5sB.es.js +218 -0
- package/components/buttonselecttree/ButtonSelectTree-Cbq1oeVK.system.js +1 -0
- package/components/buttonselectuser/ButtonSelectUser-Ar7Y8tVR.es.js +101 -0
- package/components/buttonselectuser/ButtonSelectUser-Cfe6m75Z.system.js +1 -0
- package/components/buttonsync/ButtonSync-Bc1GZXT6.es.js +29 -0
- package/components/buttonsync/ButtonSync-ClllEdAy.system.js +1 -0
- package/components/buttontoggle/ButtonToggle-DIy3M8Pz.es.js +11 -0
- package/components/buttontoggle/ButtonToggle-VNp0lbcW.system.js +1 -0
- package/components/buttonviewlog/ButtonViewLog-Ct8QwEey.system.js +1 -0
- package/components/buttonviewlog/ButtonViewLog-h9uVv5A5.es.js +21 -0
- package/components/calendar/Calendar-7yBKZsvj.system.js +1 -0
- package/components/calendar/Calendar-Df6CnW-l.es.js +112 -0
- package/components/card/Card-BUKU2FcT.system.js +1 -0
- package/components/card/Card-CwnxKNdM.es.js +47 -0
- package/components/checkbox/Checkbox-CCtItmVW.system.js +1 -0
- package/components/checkbox/Checkbox-DdsR222S.es.js +135 -0
- package/components/codesnippet/CodeSnippet-Bpps-Iyc.es.js +127 -0
- package/components/codesnippet/CodeSnippet-DvTtZ28b.system.js +2 -0
- package/components/codesnippetadapter/CodeSnippetAdapter-BtSqWBl1.system.js +1 -0
- package/components/codesnippetadapter/CodeSnippetAdapter-jgXoPKzr.es.js +26 -0
- package/components/columnlist/ColumnList-Bh3LZlOa.system.js +1 -0
- package/components/columnlist/ColumnList-Bp7soiys.es.js +204 -0
- package/components/customcolumn/CustomColumn-CVhAbTGn.system.js +1 -0
- package/components/customcolumn/CustomColumn-Dblxjw_0.es.js +138 -0
- package/components/datatable/DataTable--mHUKNUr.system.js +1 -0
- package/components/datatable/DataTable-J1j-OKsW.es.js +983 -0
- package/components/dialog/Dialog-Dy93f91f.es.js +121 -0
- package/components/dialog/Dialog-WEl66uTI.system.js +1 -0
- package/components/dialogconfirm/DialogConfirm-BOFb7rJD.es.js +139 -0
- package/components/dialogconfirm/DialogConfirm-o7_v7F31.system.js +1 -0
- package/components/dialogform/DialogForm-C15nC1wH.es.js +223 -0
- package/components/dialogform/DialogForm-CdpY1_-F.system.js +1 -0
- package/components/dialogselecttree/DialogSelectTree-BA8xEqco.es.js +268 -0
- package/components/dialogselecttree/DialogSelectTree-DKxWI9Re.system.js +1 -0
- package/components/dialogselectuser/DialogSelectUser-BZTSktHZ.system.js +1 -0
- package/components/dialogselectuser/DialogSelectUser-Bu5TDAPt.es.js +186 -0
- package/components/dialogselectuserfilter/DialogSelectUserFilter-DEl4zFaX.system.js +1 -0
- package/components/dialogselectuserfilter/DialogSelectUserFilter-Dz5OxAU-.es.js +40 -0
- package/components/dropdown/Dropdown-D4S52rW5.es.js +252 -0
- package/components/dropdown/Dropdown-DuvNYyq0.system.js +1 -0
- package/components/editor/Editor-DQ7Xdy30.es.js +1036 -0
- package/components/editor/Editor-IfYw2Tps.system.js +1 -0
- package/components/editorbutton/EditorButton-DDgS2vga.es.js +28 -0
- package/components/editorbutton/EditorButton-DmVrr4Bk.system.js +1 -0
- package/components/fieldwrapper/FieldWrapper-C6HJ2HnC.es.js +34 -0
- package/components/fieldwrapper/FieldWrapper-DFjw9hA8.system.js +1 -0
- package/components/fileupload/FileUpload-B6PAucnD.es.js +175 -0
- package/components/fileupload/FileUpload-iVAJXujV.system.js +1 -0
- package/components/filtercontainer/FilterContainer-CuMaq5Sv.es.js +284 -0
- package/components/filtercontainer/FilterContainer-DUeVLHgZ.system.js +1 -0
- package/components/form/Form-D-e0VI8V.system.js +1 -0
- package/components/form/Form-eSj-nb1y.es.js +181 -0
- package/components/hardwaresync/HardwareSync--HomfQuH.system.js +1 -0
- package/components/hardwaresync/HardwareSync-DUsVwHx1.es.js +236 -0
- package/components/icon/Icon-DUylRmY4.system.js +1 -0
- package/components/icon/Icon-mDqG7urn.es.js +82 -0
- package/components/image/Image-BZ31CL-y.es.js +169 -0
- package/components/image/Image-DX6uB7Ns.system.js +1 -0
- package/components/imagecompressor/ImageCompressor-BLeJDvN3.system.js +1 -0
- package/components/imagecompressor/ImageCompressor-DaW0ak9c.es.js +501 -0
- package/components/imageinputinfo/ImageInputInfo-C5F14hbF.system.js +1 -0
- package/components/imageinputinfo/ImageInputInfo-oTtVBxzO.es.js +46 -0
- package/components/inlinemessage/InlineMessage-19w6FOcP.system.js +1 -0
- package/components/inlinemessage/InlineMessage-CBZT3jWS.es.js +94 -0
- package/components/inputbadge/InputBadge-CsdT7M7-.es.js +186 -0
- package/components/inputbadge/InputBadge-dgANMV70.system.js +1 -0
- package/components/inputcurrency/InputCurrency-B96npK8W.es.js +1208 -0
- package/components/inputcurrency/InputCurrency-ChqGX5L8.system.js +1 -0
- package/components/inputemail/InputEmail-BMzumenA.es.js +49 -0
- package/components/inputemail/InputEmail-CYILS9bp.system.js +1 -0
- package/components/inputgroup/InputGroup-G9TEI4vX.system.js +1 -0
- package/components/inputgroup/InputGroup-eNDRlJ5R.es.js +56 -0
- package/components/inputnumber/InputNumber-Bzk_YzWM.es.js +232 -0
- package/components/inputnumber/InputNumber-CRyg8Xw_.system.js +1 -0
- package/components/inputpassword/InputPassword-BMHMWLgU.es.js +121 -0
- package/components/inputpassword/InputPassword-BjB6FsoL.system.js +1 -0
- package/components/inputphonenumber/InputPhoneNumber-CVM2oK5q.es.js +591 -0
- package/components/inputphonenumber/InputPhoneNumber-DIbd3upL.system.js +1 -0
- package/components/inputrangenumber/InputRangeNumber-B1aAoKVj.es.js +134 -0
- package/components/inputrangenumber/InputRangeNumber-C28xgFBY.system.js +1 -0
- package/components/inputsearch/InputSearch--KHwTBTm.system.js +1 -0
- package/components/inputsearch/InputSearch-cPq3vqhy.es.js +53 -0
- package/components/inputtext/InputText-93zDNfC3.system.js +1 -0
- package/components/inputtext/InputText-_xEnXysf.es.js +241 -0
- package/components/inputurl/InputURL-aqx1PVKL.es.js +61 -0
- package/components/inputurl/InputURL-kWIiKGEG.system.js +1 -0
- package/components/invisiblefield/InvisibleField-4XbiOrqw.es.js +27 -0
- package/components/invisiblefield/InvisibleField-BHudtX2g.system.js +1 -0
- package/components/litedropdown/LiteDropdown-3KsCx4wX.system.js +1 -0
- package/components/litedropdown/LiteDropdown-DcSzP11l.es.js +102 -0
- package/components/loading/Loading-D8M801C9.es.js +24 -0
- package/components/loading/Loading-Diwog8dc.system.js +1 -0
- package/components/mentionlist/MentionList--7AymnhE.es.js +58 -0
- package/components/mentionlist/MentionList-600dsWhX.system.js +1 -0
- package/components/mentionsection/MentionSection-C1gWOzH2.system.js +3 -0
- package/components/mentionsection/MentionSection-C_c4qbpq.es.js +52 -0
- package/components/menu/Menu-BmTMFwBD.es.js +73 -0
- package/components/menu/Menu-OR25pAK3.system.js +1 -0
- package/components/menuitem/MenuItem-LoZMc0T9.es.js +65 -0
- package/components/menuitem/MenuItem-imQ-hYTP.system.js +1 -0
- package/components/multirow/MultiRow-ClSMxrEx.es.js +52 -0
- package/components/multirow/MultiRow-DKu6uIsI.system.js +1 -0
- package/components/multiselect/MultiSelect-DGhS1EyX.es.js +189 -0
- package/components/multiselect/MultiSelect-DKFYq47E.system.js +1 -0
- package/components/overlaypanel/OverlayPanel-C_WCcNPw.system.js +1 -0
- package/components/overlaypanel/OverlayPanel-DXNek7Yb.es.js +49 -0
- package/components/tabmenu/TabMenu-CAQqu-ff.system.js +1 -0
- package/components/tabmenu/TabMenu-iMeZa8gy.es.js +108 -0
- package/components/tagtype/TagType-CX7BVRrE.es.js +49 -0
- package/components/tagtype/TagType-IMYg8AJf.system.js +1 -0
- package/components/textarea/Textarea-ClnQ2qmf.es.js +108 -0
- package/components/textarea/Textarea-DlkzVURV.system.js +1 -0
- package/components/timeline/Timeline-BMRdV_mH.es.js +120 -0
- package/components/timeline/Timeline-D7SYc3QX.system.js +1 -0
- package/components/timelinecontentbytype/TimelineContentByType-BmWsZID0.system.js +1 -0
- package/components/timelinecontentbytype/TimelineContentByType-ehFLzTA1.es.js +111 -0
- package/components/toast/Toast-DnALWJkx.es.js +74 -0
- package/components/toast/Toast-Pc_DOZ5-.system.js +1 -0
- package/components/toggleswitch/ToggleSwitch-WHdD3oYL.system.js +1 -0
- package/components/toggleswitch/ToggleSwitch-wRjnHRIw.es.js +90 -0
- package/components/transactionroles/TransactionRoles-B_67h5wb.es.js +223 -0
- package/components/transactionroles/TransactionRoles-DSXBVwPM.system.js +1 -0
- package/components/tree/Tree-BoVGYw5N.system.js +1 -0
- package/components/tree/Tree-DnaIZZ8S.es.js +268 -0
- package/components/treenode/TreeNode-D5aepDIU.system.js +1 -0
- package/components/treenode/TreeNode-KJOUvlTH.es.js +499 -0
- package/components/treesearchinput/TreeSearchInput-B1PmhE7k.es.js +56 -0
- package/components/treesearchinput/TreeSearchInput-C-hXPV61.system.js +1 -0
- package/components/username/UserName-CCyPAYG6.system.js +1 -0
- package/components/username/UserName-CWs83BX6.es.js +130 -0
- package/components/userwithicon/UserWithIcon-CFjQcbAS.system.js +1 -0
- package/components/userwithicon/UserWithIcon-Dn3aNKdq.es.js +18 -0
- package/components/validatormessage/ValidatorMessage-BtKfBXzO.es.js +19 -0
- package/components/validatormessage/ValidatorMessage-VVfyqlRF.system.js +1 -0
- package/package.json +1 -1
- package/stats.html +1 -1
- package/style.css +1 -1
- package/vendor/@popperjs/core-BDAJHTVh.es.js +905 -0
- package/vendor/@popperjs/core-DpNOCyB0.system.js +1 -0
- package/vendor/@tiptap/core-BLz8iRA3.es.js +2868 -0
- package/vendor/@tiptap/core-bnIgGWIt.system.js +80 -0
- package/vendor/@tiptap/extension-bold-BnsTNqIJ.es.js +71 -0
- package/vendor/@tiptap/extension-bold-C_KVm_D0.system.js +1 -0
- package/vendor/@tiptap/extension-bubble-menu-D421L1EU.system.js +1 -0
- package/vendor/@tiptap/extension-bubble-menu-D9Vgq7yO.es.js +128 -0
- package/vendor/@tiptap/extension-bullet-list-GNj3sKw9.es.js +53 -0
- package/vendor/@tiptap/extension-bullet-list-kXXFF-_p.system.js +1 -0
- package/vendor/@tiptap/extension-code-CfQ7g1i2.es.js +51 -0
- package/vendor/@tiptap/extension-code-Q8P1EHjz.system.js +1 -0
- package/vendor/@tiptap/extension-floating-menu-8rFSweor.system.js +1 -0
- package/vendor/@tiptap/extension-floating-menu-CSQuJzDM.es.js +99 -0
- package/vendor/@tiptap/extension-heading-BE64-Rg_.system.js +1 -0
- package/vendor/@tiptap/extension-heading-ZTlCgdtc.es.js +54 -0
- package/vendor/@tiptap/extension-history-GLkLmX-Y.system.js +1 -0
- package/vendor/@tiptap/extension-history-eJIThEn-.es.js +35 -0
- package/vendor/@tiptap/extension-image-B8NPUVFM.es.js +64 -0
- package/vendor/@tiptap/extension-image-rKrdkZpJ.system.js +1 -0
- package/vendor/@tiptap/extension-italic-C_CyJubw.es.js +70 -0
- package/vendor/@tiptap/extension-italic-Dg0Nosoc.system.js +1 -0
- package/vendor/@tiptap/extension-link-Cd8bTMBz.system.js +1 -0
- package/vendor/@tiptap/extension-link-D4PFdLvA.es.js +262 -0
- package/vendor/@tiptap/extension-list-item-7pIJ7t09.es.js +33 -0
- package/vendor/@tiptap/extension-list-item-Mnhfw2gP.system.js +1 -0
- package/vendor/@tiptap/extension-mention-DVF3rX_z.system.js +1 -0
- package/vendor/@tiptap/extension-mention-Dkg-tbrz.es.js +130 -0
- package/vendor/@tiptap/extension-ordered-list-DLI4xDN8.es.js +71 -0
- package/vendor/@tiptap/extension-ordered-list-Hl0QU8Zt.system.js +1 -0
- package/vendor/@tiptap/extension-placeholder-BeLl2T-f.system.js +1 -0
- package/vendor/@tiptap/extension-placeholder-V0iTxU19.es.js +52 -0
- package/vendor/@tiptap/extension-underline-BdcAQ4JH.system.js +1 -0
- package/vendor/@tiptap/extension-underline-DsGbvz80.es.js +40 -0
- package/vendor/@tiptap/suggestion-BpZSO8Lm.system.js +1 -0
- package/vendor/@tiptap/suggestion-C4sBhJAD.es.js +131 -0
- package/vendor/@tiptap/vue-3-BH1pZykd.system.js +1 -0
- package/vendor/@tiptap/vue-3-DceiR7pK.es.js +436 -0
- package/vendor/highlight.js-BAruEf1H.system.js +2 -0
- package/vendor/highlight.js-DHowhWoU.es.js +2493 -0
- package/vendor/linkifyjs-BxsOjwQz.es.js +705 -0
- package/vendor/linkifyjs-CMLfIa6I.system.js +5 -0
- package/vendor/lodash-DbIT-6qv.es.js +127 -0
- package/vendor/lodash-DbvKLWSv.system.js +1 -0
- package/vendor/lodash-es-C3G1Cc1m.system.js +1 -0
- package/vendor/lodash-es-CJerBxJQ.es.js +766 -0
- package/vendor/orderedmap-B3SOk52B.es.js +103 -0
- package/vendor/orderedmap-Dwr31MF0.system.js +1 -0
- package/vendor/primevue-CadmDhWp.es.js +13928 -0
- package/vendor/primevue-u6FsQONA.system.js +193 -0
- package/vendor/prosemirror-commands-DLmzIpoS.es.js +383 -0
- package/vendor/prosemirror-commands-DgY3QRzI.system.js +2 -0
- package/vendor/prosemirror-history-BMpJFORS.es.js +248 -0
- package/vendor/prosemirror-history-BrK-FTBv.system.js +1 -0
- package/vendor/prosemirror-keymap-COb3Dq2o.system.js +1 -0
- package/vendor/prosemirror-keymap-DF8LLxca.es.js +60 -0
- package/vendor/prosemirror-model-D2n-Dx_L.es.js +2736 -0
- package/vendor/prosemirror-model-DTWK5xnv.system.js +4 -0
- package/vendor/prosemirror-schema-list-BPpAP8wR.system.js +1 -0
- package/vendor/prosemirror-schema-list-BvrICwYb.es.js +87 -0
- package/vendor/prosemirror-state-CwkYUmNs.es.js +820 -0
- package/vendor/prosemirror-state-DzPLD-6l.system.js +1 -0
- package/vendor/prosemirror-transform-DvAmofec.es.js +1507 -0
- package/vendor/prosemirror-transform-VaXuT0NM.system.js +2 -0
- package/vendor/prosemirror-view-JTdpiWMD.system.js +5 -0
- package/vendor/prosemirror-view-ta7l3rKk.es.js +3742 -0
- package/vendor/rope-sequence-4t46C6az.system.js +1 -0
- package/vendor/rope-sequence-sEGCUMi8.es.js +100 -0
- package/vendor/simplebar-core-71xT5g0m.system.js +1 -0
- package/vendor/simplebar-core-Db65-Ath.es.js +333 -0
- package/vendor/simplebar-vue-BFEeFUIv.system.js +1 -0
- package/vendor/simplebar-vue-DAxqu0eM.es.js +176 -0
- package/vendor/tippy.js-CuKTz0UR.system.js +1 -0
- package/vendor/tippy.js-DNnwm2RY.es.js +721 -0
- package/vendor/uuid-93tp0umt.es.js +9 -0
- package/vendor/uuid-Cymn6orr.system.js +1 -0
- package/vendor/vee-validate-Cc_B-qII.system.js +5 -0
- package/vendor/vee-validate-RE5RuswC.es.js +1309 -0
- package/vendor/vue-advanced-cropper-CshlvNaD.es.js +1380 -0
- package/vendor/vue-advanced-cropper-NG93jHnU.system.js +20 -0
- package/vendor/w3c-keyname-BSD-PgAi.system.js +1 -0
- package/vendor/w3c-keyname-CLxH8j-f.es.js +92 -0
- package/wangsvue-fats.js +542 -0
- package/wangsvue-fats.system.js +1 -313
- package/loading-page-BrQattYE.js +0 -1
- package/loading-page-CoC9UhfC.js +0 -4
- package/loading-page-DbLuqCHa.js +0 -1
- package/loading-page-f8D03l3G.js +0 -4
- package/loading-plane-CgfbWppy.js +0 -1
- package/loading-plane-CoXtqoc9.js +0 -4
- package/loading-table-Bdr9ZhtP.js +0 -1
- package/loading-table-ByUoWqUo.js +0 -4
- package/loading-table-BygEMzFM.js +0 -4
- package/loading-table-BzrSQlA0.js +0 -1
- package/loading-table-D9bw9OcI.js +0 -4
- package/loading-table-chOgXi94.js +0 -1
- package/no-data-CTKux8RI.js +0 -4
- package/no-data-Cgze_Rvp.js +0 -1
- package/no-data-Dep79CBh.js +0 -1
- package/no-data-g0dJCy2p.js +0 -4
- package/no-data-y1X5WtcQ.js +0 -1
- package/wangsvue-fats.es.js +0 -51894
- /package/{loading-page-CgfbWppy.js → assets/lottiejs/loading-plane-CgfbWppy.system.js} +0 -0
- /package/{loading-page-CoXtqoc9.js → assets/lottiejs/loading-plane-CoXtqoc9.es.js} +0 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { defineComponent as j, computed as p, onMounted as G, onUnmounted as M, shallowRef as f, createBlock as W, openBlock as n, unref as q, mergeProps as I, withCtx as b, createElementBlock as m, normalizeStyle as k, Fragment as _, createElementVNode as U, renderList as T, withDirectives as A, vShow as H, withModifiers as D, createVNode as C, normalizeClass as z } from "vue";
|
|
2
|
+
import { l as J } from "../../vendor/primevue-CadmDhWp.es.js";
|
|
3
|
+
import { u as K, m as Q } from "../animation/Animation-COWVilAA.es.js";
|
|
4
|
+
import { _ as F } from "../button/Button-D-MSv_AS.es.js";
|
|
5
|
+
import { _ as X } from "../icon/Icon-mDqG7urn.es.js";
|
|
6
|
+
const Y = ["src"], Z = ["src"], ee = ["src"], te = ["src", "onClick"], ie = /* @__PURE__ */ j({
|
|
7
|
+
__name: "Image",
|
|
8
|
+
props: {
|
|
9
|
+
src: {},
|
|
10
|
+
size: {},
|
|
11
|
+
width: {},
|
|
12
|
+
rounded: { type: Boolean },
|
|
13
|
+
imageStyle: {},
|
|
14
|
+
imageClass: {},
|
|
15
|
+
galleries: {},
|
|
16
|
+
indicatorIcon: {},
|
|
17
|
+
zoomInDisabled: { type: Boolean },
|
|
18
|
+
zoomOutDisabled: { type: Boolean },
|
|
19
|
+
pt: {},
|
|
20
|
+
ptOptions: {},
|
|
21
|
+
unstyled: { type: Boolean },
|
|
22
|
+
getImageURL: { type: Function },
|
|
23
|
+
placeholder: {}
|
|
24
|
+
},
|
|
25
|
+
setup(O) {
|
|
26
|
+
const r = O, { defaultProps: x } = K("Image"), c = p(() => Q(r, x));
|
|
27
|
+
G(() => {
|
|
28
|
+
setTimeout(() => {
|
|
29
|
+
$();
|
|
30
|
+
}, 3e3);
|
|
31
|
+
}), M(() => {
|
|
32
|
+
w();
|
|
33
|
+
});
|
|
34
|
+
const o = f(0), v = f(), L = f(), h = f(!1), E = p(() => {
|
|
35
|
+
var e;
|
|
36
|
+
return !h.value && !((e = u.value) != null && e.toString().includes("data:image/png;base64")) && u.value !== c.value.placeholder;
|
|
37
|
+
}), N = () => {
|
|
38
|
+
const e = r.galleries ?? [];
|
|
39
|
+
o.value = (o.value + 1) % e.length, y();
|
|
40
|
+
}, P = () => {
|
|
41
|
+
const e = r.galleries ?? [];
|
|
42
|
+
o.value = (o.value - 1 + e.length) % e.length, y();
|
|
43
|
+
}, $ = () => {
|
|
44
|
+
var e;
|
|
45
|
+
w(), (e = r.galleries) != null && e.length && (v.value = window.setInterval(() => {
|
|
46
|
+
const t = r.galleries ?? [];
|
|
47
|
+
o.value = (o.value + 1) % t.length;
|
|
48
|
+
}, 3e3));
|
|
49
|
+
}, w = () => {
|
|
50
|
+
v.value && (window.clearInterval(v.value), v.value = void 0);
|
|
51
|
+
}, S = p(() => r.width != null ? r.width : r.size === "small" ? 30 : r.size === "medium" ? 80 : 125), u = p(() => {
|
|
52
|
+
var e, t;
|
|
53
|
+
return !r.src || h.value ? c.value.placeholder : typeof r.src == "string" ? r.src.includes("http") || // From public image
|
|
54
|
+
r.src.includes("data:image/png;base64") ? r.src : (t = (e = c.value).getImageURL) == null ? void 0 : t.call(e, r.src, S.value) : r.src;
|
|
55
|
+
}), V = p(() => {
|
|
56
|
+
var t, l, a, g;
|
|
57
|
+
const e = u.value;
|
|
58
|
+
if (typeof e == "string") {
|
|
59
|
+
const s = (l = (t = c.value).getImageURL) == null ? void 0 : l.call(t, "preview"), i = s && !(s != null && s.includes("undefined")) ? new URL(s).origin : "", R = i && e.includes(i);
|
|
60
|
+
return e.includes("http") && !R || // From public resource
|
|
61
|
+
e.includes("data:image/svg+xml") ? e : (g = (a = c.value).getImageURL) == null ? void 0 : g.call(a, r.src);
|
|
62
|
+
}
|
|
63
|
+
return e;
|
|
64
|
+
}), y = (e) => {
|
|
65
|
+
w(), typeof e == "number" && (o.value = e), L.value ? window.clearTimeout(L.value) : window.setTimeout($, 3e3);
|
|
66
|
+
}, d = (e) => {
|
|
67
|
+
var l;
|
|
68
|
+
const t = (l = e.target) == null ? void 0 : l.src;
|
|
69
|
+
(t === u.value || t.includes(u.value.toString())) && (h.value = !0);
|
|
70
|
+
}, B = (e) => {
|
|
71
|
+
var l, a;
|
|
72
|
+
const t = e;
|
|
73
|
+
return typeof t == "string" ? t.includes("http") ? t : (a = (l = c.value).getImageURL) == null ? void 0 : a.call(l, t) : t;
|
|
74
|
+
};
|
|
75
|
+
return (e, t) => {
|
|
76
|
+
var l;
|
|
77
|
+
return n(), W(q(J), I(e.$props, {
|
|
78
|
+
preview: E.value,
|
|
79
|
+
pt: { root: (l = e.$preset.image) == null ? void 0 : l.root({ props: e.$props }) }
|
|
80
|
+
}), {
|
|
81
|
+
image: b(() => {
|
|
82
|
+
var a;
|
|
83
|
+
return [
|
|
84
|
+
U("img", I((a = e.$preset.image) == null ? void 0 : a.image({ props: e.$props, context: { imageSize: S.value } }), {
|
|
85
|
+
onerror: d,
|
|
86
|
+
src: u.value,
|
|
87
|
+
alt: ""
|
|
88
|
+
}), null, 16, Y)
|
|
89
|
+
];
|
|
90
|
+
}),
|
|
91
|
+
indicatoricon: b(() => [
|
|
92
|
+
C(X, I(e.$preset.image.icon, { icon: "eye" }), null, 16)
|
|
93
|
+
]),
|
|
94
|
+
preview: b((a) => {
|
|
95
|
+
var g;
|
|
96
|
+
return [
|
|
97
|
+
(g = e.galleries) != null && g.length ? (n(), m(_, { key: 1 }, [
|
|
98
|
+
(n(!0), m(_, null, T(e.galleries, ({ src: s }, i) => A((n(), m("img", {
|
|
99
|
+
key: i,
|
|
100
|
+
onerror: d,
|
|
101
|
+
src: B(s),
|
|
102
|
+
style: k(a.style),
|
|
103
|
+
alt: "",
|
|
104
|
+
"data-wv-section": "image-gallery"
|
|
105
|
+
}, null, 12, ee)), [
|
|
106
|
+
[H, i === o.value]
|
|
107
|
+
])), 128)),
|
|
108
|
+
U("div", {
|
|
109
|
+
onClick: t[0] || (t[0] = D(() => {
|
|
110
|
+
}, ["stop"])),
|
|
111
|
+
class: "fixed bottom-0 left-0 flex justify-center items-center w-full p-4 mx-auto flex-row bg-black/80",
|
|
112
|
+
"data-wv-section": "gallery-thumbnail"
|
|
113
|
+
}, [
|
|
114
|
+
C(F, {
|
|
115
|
+
class: z([
|
|
116
|
+
"text-surface-0 rotate-180 sticky left-0 !w-8 !h-8 [&_i]:w-5 [&_i]:h-5",
|
|
117
|
+
"rounded-full mr-3"
|
|
118
|
+
]),
|
|
119
|
+
onClick: P,
|
|
120
|
+
"aria-label": "Previous Image",
|
|
121
|
+
"data-wv-section": "prev-button",
|
|
122
|
+
icon: "arrow-right",
|
|
123
|
+
"icon-class": "w-5 h-5",
|
|
124
|
+
severity: "secondary",
|
|
125
|
+
text: ""
|
|
126
|
+
}),
|
|
127
|
+
(n(!0), m(_, null, T(e.galleries, ({ src: s }, i) => (n(), m("img", {
|
|
128
|
+
key: i,
|
|
129
|
+
class: z([
|
|
130
|
+
"h-10 w-10 object-cover cursor-pointer opacity-50 hover:opacity-100 transition-opacity",
|
|
131
|
+
{ "!opacity-100": o.value == i }
|
|
132
|
+
]),
|
|
133
|
+
onerror: d,
|
|
134
|
+
src: B(s),
|
|
135
|
+
style: k(a.style),
|
|
136
|
+
onClick: D((R) => y(i), ["stop"]),
|
|
137
|
+
alt: "",
|
|
138
|
+
"data-wv-section": "thumbnail-image"
|
|
139
|
+
}, null, 14, te))), 128)),
|
|
140
|
+
C(F, {
|
|
141
|
+
class: z([
|
|
142
|
+
"text-surface-0 sticky !w-8 !h-8 [&_i]:w-5 [&_i]:h-5",
|
|
143
|
+
"rounded-full ml-3"
|
|
144
|
+
]),
|
|
145
|
+
onClick: N,
|
|
146
|
+
"aria-label": "Next Image",
|
|
147
|
+
"data-wv-section": "next-button",
|
|
148
|
+
icon: "arrow-right",
|
|
149
|
+
severity: "secondary",
|
|
150
|
+
text: ""
|
|
151
|
+
})
|
|
152
|
+
])
|
|
153
|
+
], 64)) : (n(), m("img", {
|
|
154
|
+
key: 0,
|
|
155
|
+
onerror: d,
|
|
156
|
+
src: V.value,
|
|
157
|
+
style: k(a.style),
|
|
158
|
+
alt: ""
|
|
159
|
+
}, null, 12, Z))
|
|
160
|
+
];
|
|
161
|
+
}),
|
|
162
|
+
_: 1
|
|
163
|
+
}, 16, ["preview", "pt"]);
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
});
|
|
167
|
+
export {
|
|
168
|
+
ie as _
|
|
169
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","../../vendor/primevue-u6FsQONA.system.js","../animation/Animation-6756VN9N.system.js","../button/Button-Okx1_kOu.system.js","../icon/Icon-DUylRmY4.system.js"],function(H,re){"use strict";var U,g,j,D,p,E,c,F,f,h,u,w,y,C,z,N,T,B,I,k,V,x,M,S,O;return{setters:[t=>{U=t.defineComponent,g=t.computed,j=t.onMounted,D=t.onUnmounted,p=t.shallowRef,E=t.createBlock,c=t.openBlock,F=t.unref,f=t.mergeProps,h=t.withCtx,u=t.createElementBlock,w=t.normalizeStyle,y=t.Fragment,C=t.createElementVNode,z=t.renderList,N=t.withDirectives,T=t.vShow,B=t.withModifiers,I=t.createVNode,k=t.normalizeClass},t=>{V=t.l},t=>{x=t.u,M=t.m},t=>{S=t._},t=>{O=t._}],execute:function(){const t=["src"],J=["src"],K=["src"],Q=["src","onClick"],ae=H("_",U({__name:"Image",props:{src:{},size:{},width:{},rounded:{type:Boolean},imageStyle:{},imageClass:{},galleries:{},indicatorIcon:{},zoomInDisabled:{type:Boolean},zoomOutDisabled:{type:Boolean},pt:{},ptOptions:{},unstyled:{type:Boolean},getImageURL:{type:Function},placeholder:{}},setup(X){const r=X,{defaultProps:Y}=x("Image"),m=g(()=>M(r,Y));j(()=>{setTimeout(()=>{G()},3e3)}),D(()=>{$()});const i=p(0),b=p(),P=p(),L=p(!1),Z=g(()=>{var e;return!L.value&&!((e=v.value)!=null&&e.toString().includes("data:image/png;base64"))&&v.value!==m.value.placeholder}),ee=()=>{const e=r.galleries??[];i.value=(i.value+1)%e.length,R()},te=()=>{const e=r.galleries??[];i.value=(i.value-1+e.length)%e.length,R()},G=()=>{var e;$(),(e=r.galleries)!=null&&e.length&&(b.value=window.setInterval(()=>{const n=r.galleries??[];i.value=(i.value+1)%n.length},3e3))},$=()=>{b.value&&(window.clearInterval(b.value),b.value=void 0)},W=g(()=>r.width!=null?r.width:r.size==="small"?30:r.size==="medium"?80:125),v=g(()=>{var e,n;return!r.src||L.value?m.value.placeholder:typeof r.src=="string"?r.src.includes("http")||r.src.includes("data:image/png;base64")?r.src:(n=(e=m.value).getImageURL)==null?void 0:n.call(e,r.src,W.value):r.src}),ne=g(()=>{var n,s,a,d;const e=v.value;if(typeof e=="string"){const o=(s=(n=m.value).getImageURL)==null?void 0:s.call(n,"preview"),l=o&&!(o!=null&&o.includes("undefined"))?new URL(o).origin:"",q=l&&e.includes(l);return e.includes("http")&&!q||e.includes("data:image/svg+xml")?e:(d=(a=m.value).getImageURL)==null?void 0:d.call(a,r.src)}return e}),R=e=>{$(),typeof e=="number"&&(i.value=e),P.value?window.clearTimeout(P.value):window.setTimeout(G,3e3)},_=e=>{var s;const n=(s=e.target)==null?void 0:s.src;(n===v.value||n.includes(v.value.toString()))&&(L.value=!0)},A=e=>{var s,a;const n=e;return typeof n=="string"?n.includes("http")?n:(a=(s=m.value).getImageURL)==null?void 0:a.call(s,n):n};return(e,n)=>{var s;return c(),E(F(V),f(e.$props,{preview:Z.value,pt:{root:(s=e.$preset.image)==null?void 0:s.root({props:e.$props})}}),{image:h(()=>{var a;return[C("img",f((a=e.$preset.image)==null?void 0:a.image({props:e.$props,context:{imageSize:W.value}}),{onerror:_,src:v.value,alt:""}),null,16,t)]}),indicatoricon:h(()=>[I(O,f(e.$preset.image.icon,{icon:"eye"}),null,16)]),preview:h(a=>{var d;return[(d=e.galleries)!=null&&d.length?(c(),u(y,{key:1},[(c(!0),u(y,null,z(e.galleries,({src:o},l)=>N((c(),u("img",{key:l,onerror:_,src:A(o),style:w(a.style),alt:"","data-wv-section":"image-gallery"},null,12,K)),[[T,l===i.value]])),128)),C("div",{onClick:n[0]||(n[0]=B(()=>{},["stop"])),class:"fixed bottom-0 left-0 flex justify-center items-center w-full p-4 mx-auto flex-row bg-black/80","data-wv-section":"gallery-thumbnail"},[I(S,{class:k(["text-surface-0 rotate-180 sticky left-0 !w-8 !h-8 [&_i]:w-5 [&_i]:h-5","rounded-full mr-3"]),onClick:te,"aria-label":"Previous Image","data-wv-section":"prev-button",icon:"arrow-right","icon-class":"w-5 h-5",severity:"secondary",text:""}),(c(!0),u(y,null,z(e.galleries,({src:o},l)=>(c(),u("img",{key:l,class:k(["h-10 w-10 object-cover cursor-pointer opacity-50 hover:opacity-100 transition-opacity",{"!opacity-100":i.value==l}]),onerror:_,src:A(o),style:w(a.style),onClick:B(q=>R(l),["stop"]),alt:"","data-wv-section":"thumbnail-image"},null,14,Q))),128)),I(S,{class:k(["text-surface-0 sticky !w-8 !h-8 [&_i]:w-5 [&_i]:h-5","rounded-full ml-3"]),onClick:ee,"aria-label":"Next Image","data-wv-section":"next-button",icon:"arrow-right",severity:"secondary",text:""})])],64)):(c(),u("img",{key:0,onerror:_,src:ne.value,style:w(a.style),alt:""},null,12,J))]}),_:1},16,["preview","pt"])}}}))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","../../vendor/vee-validate-Cc_B-qII.system.js","../../vendor/vue-advanced-cropper-NG93jHnU.system.js","../animation/Animation-6756VN9N.system.js","../editor/Editor-IfYw2Tps.system.js","../image/Image-DX6uB7Ns.system.js","../button/Button-Okx1_kOu.system.js","../buttonradio/ButtonRadio-B2wWrgB5.system.js","../dialog/Dialog-WEl66uTI.system.js","../dialogconfirm/DialogConfirm-o7_v7F31.system.js","../fieldwrapper/FieldWrapper-DFjw9hA8.system.js","../icon/Icon-DUylRmY4.system.js","../invisiblefield/InvisibleField-BHudtX2g.system.js","../validatormessage/ValidatorMessage-VVfyqlRF.system.js","../backgroundimagecropper/BackgroundImageCropper-DFHtaSyE.system.js","../imageinputinfo/ImageInputInfo-C5F14hbF.system.js"],function(Q,Qe){"use strict";var ie,X,ne,ue,ce,y,k,de,me,Y,V,w,c,x,d,h,_,j,A,I,ve,P,pe,ge,fe,ye,be,we,F,he,Ie,Be,Ce,Z,ke,Pe,Me,ee;return{setters:[t=>{ie=t.defineComponent,X=t.mergeModels,ne=t.inject,ue=t.onMounted,ce=t.onUnmounted,y=t.ref,k=t.shallowRef,de=t.useModel,me=t.reactive,Y=t.computed,V=t.watch,w=t.createElementBlock,c=t.openBlock,x=t.Fragment,d=t.createVNode,h=t.normalizeClass,_=t.withCtx,j=t.createElementVNode,A=t.createBlock,I=t.createCommentVNode,ve=t.renderList,P=t.unref},t=>{pe=t.u},t=>{ge=t.f},t=>{fe=t.u},t=>{ye=t.g,be=t.a},t=>{we=t._},t=>{F=t._},t=>{he=t._},t=>{Ie=t._},t=>{Be=t._},t=>{Ce=t._},t=>{Z=t._},t=>{ke=t._},t=>{Pe=t._},t=>{Me=t.B},t=>{ee=t._}],execute:function(){Q("g",Ue);var t=Q("c",typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{});function Ue(v){return v&&v.__esModule&&Object.prototype.hasOwnProperty.call(v,"default")?v.default:v}var ae={exports:{}};(function(v,K){(function(){function W(te,a){a=a||"";for(var B=1024,M=window.atob(te),m=[],R=0,E=M.length;R<E;R+=B){for(var f=M.slice(R,R+B),r=new Array(f.length),U=0;U<f.length;U++)r[U]=f.charCodeAt(U);var G=new Uint8Array(r);m.push(G)}return new Blob(m,{type:a})}v.exports&&(K=v.exports=W),K.base64ToBlob=W}).call(t)})(ae,ae.exports);var ze=ae.exports;const De=Ue(ze),$e={key:1,class:"flex gap-1 items-start"},Le=["id","multiple"],Xe=Q("_",ie({__name:"ImageCompressor",props:X({initialName:{},multiple:{type:Boolean},defaultImage:{},disabled:{type:Boolean,default:!1},compressedBlob:{default:void 0},imagePreviewUrl:{default:void 0},imagePreviewSize:{default:"big"},rounded:{type:Boolean,default:!1},useDeleteButton:{type:Boolean,default:!0},useValidator:{type:Boolean,default:!1},mandatory:{type:Boolean,default:!1},invalid:{type:Boolean},validatorMessage:{default:"Photo must be uploaded"},label:{default:void 0},fieldName:{default:"imageInput"},fieldInfo:{default:void 0},showInfo:{type:Boolean,default:!0},customRequirements:{default:void 0},confirmOnDelete:{type:Boolean},emitDeleteFn:{type:Boolean},showValidatorMessage:{type:Boolean,default:!0},fileType:{default:"webp"}},{defaultImage:{default:0},defaultImageModifiers:{}}),emits:X(["apply","applyProp","update:defaultImage","delete"],["update:defaultImage"]),setup(v,{expose:K,emit:W}){const te=ne("preset",{}).image,a=v,B=W,{locale:M}=fe("ImageCompressor");ue(async()=>{Te(),D()}),ce(()=>{$(0),$(1)});const m=y([{src:null,type:null},{src:null,type:null}]),R=be(),E=y(),f=y(),r=y([]),U=y(),G=k(0),le=y(),N=y(),p=k(),H=de(v,"defaultImage"),i=me({value:a.multiple?[]:void 0}),S=k(!1),C=k(),Ve=k(0),b=k(!1),se=y([!1,!1]),z=Y(()=>`image/${a.fileType}`),oe=e=>typeof r.value[e]=="string"&&r.value[e].includes("data:image/png;base64"),D=async()=>{var e,l;(e=a.imagePreviewUrl)!=null&&e.length?r.value=Array.isArray(a.imagePreviewUrl)?a.imagePreviewUrl:[a.imagePreviewUrl]:Array.isArray(a.compressedBlob)?r.value=a.compressedBlob:a.compressedBlob?r.value=[a.compressedBlob]:a.initialName?(E.value=ye(a.initialName,125,R),r.value=[(l=E.value)==null?void 0:l.toDataURL()]):r.value=[],a.imagePreviewUrl?i.value=a.imagePreviewUrl:a.initialName&&(i.value=await _e()),B("applyProp")},_e=async()=>new Promise(e=>{var l;(l=E.value)==null||l.toBlob(o=>{e(new File([o??new Blob],Date.now()+".png",{type:"image/png"}))})}),T=(e=!1)=>{var l;a.disabled||(e&&(p.value=1),(l=U.value)==null||l.click())},Ee=async e=>{const{files:l}=e.target,o=Array.from(l??[]).slice(0,r.value.length?1:2);for(const[s,u]of o.entries())try{const n=p.value??s;await Ne(u,n)}catch(n){console.error("Error loading image:",n)}finally{p.value=void 0}},Ne=async(e,l)=>{const o=u=>u.includes("image"),s=u=>u>1e6;return new Promise((u,n)=>{var O,L;if(e)if(je(l),!o(e.type))S.value=!0,C.value=typeof a.validatorMessage!="string"&&((O=a.validatorMessage)!=null&&O.invalidFormat)?a.validatorMessage.invalidFormat:"Tipe file harus berupa gambar!",D(),b.value=!1,$(l),n("Tipe file harus berupa gambar!");else if(s(e.size))S.value=!0,C.value=typeof a.validatorMessage!="string"&&((L=a.validatorMessage)!=null&&L.exceed)?a.validatorMessage.exceed:"Ukuran gambar terlalu besar! Maks. 1 MB",D(),b.value=!1,$(l),n("Ukuran gambar terlalu besar! Maks. 1 MB");else{$(l);const J=URL.createObjectURL(e),g=new FileReader;g.onload=q=>{var Se;m.value[l].src=J,m.value[l].type=Oe((Se=q==null?void 0:q.target)==null?void 0:Se.result,e.type)},g.onerror=q=>{console.error("🚀 ~ returnnewPromise ~ e:",q)},g.readAsArrayBuffer(e),p.value==null&&(p.value=l),b.value||(b.value=!0),S.value=!1,C.value=void 0}Ve.value+=1,N.value=u})},Te=()=>{a.useValidator&&Object.assign(i,pe(a.fieldName,e=>{var l;return!e&&a.mandatory?typeof a.validatorMessage!="string"&&((l=a.validatorMessage)!=null&&l.empty)?a.validatorMessage.empty:(a.label??"Photo")+" must be uploaded":a.invalid&&a.validatorMessage?a.validatorMessage:C.value?C.value:!0}))},je=e=>{m.value[e]={src:null,type:null}},Oe=(e,l=null)=>{if(e){const o=new Uint8Array(e).subarray(0,4);let s="";for(const u of o)s+=u.toString(16);switch(s){case"89504e47":return"image/png";case"47494638":return"image/gif";case"ffd8ffe0":case"ffd8ffe1":case"ffd8ffe2":case"ffd8ffe3":case"ffd8ffe8":return z.value;default:return l}}return null},Ae=e=>{const l=De(e.split(",")[1],z.value);return window.URL.createObjectURL(l)},qe=async(e,l)=>{const o=await fetch(e).then(s=>s.blob());return new File([o],l,{type:z.value})},xe=async()=>{const e=p.value??0;try{await Ke(e)}catch(l){console.error(l)}Fe()},Fe=()=>{var e;b.value=!1,(e=N.value)==null||e.call(N),N.value=void 0},Ke=async e=>{if(le.value){const l=le.value.getResult();if(l.canvas){const o=l.canvas.toDataURL(z.value);await We(o,e)}}},We=async(e,l)=>{try{f.value=document.createElement("canvas");const o=f.value.getContext("2d"),s=new Image;s.src=e,await s.decode();const u=80/100,n=s.width*u,O=s.height*u;f.value.setAttribute("width",n.toString()),f.value.setAttribute("height",O.toString()),o&&o.drawImage(s,0,0,n,O);const L=f.value.toDataURL(z.value,.95),J=Date.now()+`.${a.fileType}`,g={canvas:f.value,compressed:{blob:Ae(L),base64:L,fileName:J,file:await qe(Ae(L),J),size:"",type:z.value},message:"File has been compressed."};g.compressed.size=Math.round(g.compressed.file.size/1e3)+"KB",r.value[l]=g.compressed.blob,a.multiple?i.value&&Array.isArray(i.value)?i.value[l]=g.compressed.file:i.value=[g.compressed.file]:i.value=g.compressed.file,B("apply",g)}catch(o){console.error(o)}},$=e=>{m.value[e].src&&URL.revokeObjectURL(m.value[e].src)},Ge=e=>{a.confirmOnDelete?se.value[e]=!0:a.emitDeleteFn?B("delete",re,e):re(e)},re=(e=0)=>{S.value=!1,C.value=void 0,r.value=r.value.toSpliced(e,1),$(e),m.value[e]={src:null,type:null},m.value=[m.value[+!e],m.value[e]],p.value=0,H.value=0,a.confirmOnDelete||B("delete"),a.multiple&&Array.isArray(i.value)?i.value=i.value.toSpliced(e,1):i.handleReset&&i.handleReset()},He=e=>{var o;const l=(o=r.value[e])==null?void 0:o.toString();p.value=e,l!=null&&l.includes("blob")?(p.value=e,b.value=!0):(je(e),T())},Je=()=>{T()},Re=Y(()=>navigator.userAgent.includes("Firefox"));return V(C,e=>{e&&i.setErrors&&i.setErrors(e)}),V(b,e=>{e||G.value++}),V(()=>a.initialName,()=>{D()}),V(()=>a.imagePreviewUrl,()=>{D()},{once:!0}),K({assignPreviewImagesFromProp:D}),(e,l)=>(c(),w(x,null,[d(Ce,{class:h([{"!w-max":!a.multiple,"!w-full":a.multiple}]),info:a.fieldInfo,label:a.label,mandatory:a.mandatory,"data-wv-name":"image-compressor","data-wv-section":"root"},{default:_(()=>[j("div",{class:h(["w-full",{"grid gap-6 items-start grid-cols-2":e.multiple}]),"data-wv-section":"wrapper"},[r.value.length?(c(!0),w(x,{key:0},ve(r.value,(o,s)=>{var u;return c(),w("div",{key:s,class:"flex gap-1 items-start","data-wv-section":"preview"},[j("div",{class:h(["flex flex-col gap-1 items-center",{"max-w-[80px]":e.imagePreviewSize==="medium"},{"max-w-[125px]":e.imagePreviewSize==="big"}]),"data-wv-section":"preview-image-wrapper"},[j("div",{class:h([{"[&>span]:hover:opacity-30 [&>[data-wv-section=input-image-trigger]]:hover:opacity-100":oe(s)},"relative",{"w-[125px] h-[125px]":e.imagePreviewSize==="big","w-[30px] h-[30px]":e.imagePreviewSize==="small","w-[80px] h-[80px]":e.imagePreviewSize==="medium"}]),"data-wv-section":"image-wrapper"},[d(we,{rounded:e.rounded,size:e.imagePreviewSize,src:o,class:"transition-opacity duration-300","data-wv-section":"preview-image"},null,8,["rounded","size","src"]),oe(s)?(c(),w("button",{key:0,class:h([(u=P(te))==null?void 0:u.button.class,"hover:bg-opacity-0 rounded-lg opacity-0"]),onClick:l[0]||(l[0]=n=>T(!1)),"data-wv-section":"input-image-trigger",type:"button"},[d(Z,{class:"w-6 h-6","data-wv-section":"trigger-icon",icon:"image-add",severity:"primary"})],2)):I("",!0)],2),!a.disabled&&!oe(s)?(c(),w(x,{key:0},[j("div",{class:h(["flex gap-0.5 justify-center",{"scale-75":e.imagePreviewSize==="medium"}]),"data-wv-section":"preview-buttons"},[d(F,{onClick:n=>He(s),class:"!py-0 !px-1 !h-max",icon:"pencil",label:"Edit",text:""},null,8,["onClick"]),e.useDeleteButton?(c(),A(F,{key:0,onClick:n=>Ge(s),class:"!py-0 !px-1 !h-max",icon:"delete-bin",label:"Delete",severity:"danger",text:""},null,8,["onClick"])):I("",!0)],2),d(Be,{visible:se.value[s],"onUpdate:visible":n=>se.value[s]=n,closable:!1,onConfirm:n=>B("delete",re,s),body:"Are you sure you want to delete it?","confirm-label":"Delete",header:"Delete Photo",severity:"danger"},null,8,["visible","onUpdate:visible","onConfirm"])],64)):I("",!0)],2),d(ee,{"custom-requirements":e.customRequirements,"show-add-button":r.value.length===1&&a.multiple,"show-info":e.showInfo,onAddPhoto:l[2]||(l[2]=n=>T(!0))},{default:_(()=>[r.value.length===2&&a.multiple?(c(),A(he,{key:0,modelValue:H.value,"onUpdate:modelValue":l[1]||(l[1]=n=>H.value=n),"label-id":"default-"+s,value:s,label:"Set as default"},null,8,["modelValue","label-id","value"])):I("",!0)]),_:2},1032,["custom-requirements","show-add-button","show-info"])])}),128)):(c(),w("div",$e,[j("button",{class:h([{"w-[125px] h-[125px]":e.imagePreviewSize==="big","w-[30px] h-[30px]":e.imagePreviewSize==="small","w-[80px] h-[80px]":e.imagePreviewSize==="medium"},"flex items-center justify-center","ring-inset","cursor-pointer",{"ring-1":Re.value,"ring-[0.5px]":!Re.value},{"rounded-full":e.rounded,"rounded-lg":!e.rounded},{"ring-general-400 focus-visible:ring-primary-500":!S.value&&!i.errorMessage,"ring-danger-500":S.value||i.errorMessage},{"bg-white":!a.disabled,"bg-general-50":a.disabled}]),onClick:l[3]||(l[3]=o=>T(!1)),"data-wv-section":"input-image-trigger",type:"button"},[d(Z,{class:"w-6 h-6","data-wv-section":"trigger-icon",icon:"image-add",severity:"primary"})],2),d(ee,{"custom-requirements":e.customRequirements,"show-info":e.showInfo},null,8,["custom-requirements","show-info"])]))],2),(c(),w("input",{id:e.fieldName,key:G.value,ref_key:"inputImageFile",ref:U,multiple:a.multiple&&!r.value.length,onChange:Ee,accept:"image/*",class:"hidden","data-wv-section":"hidden-image-input",type:"file"},null,40,Le)),e.showValidatorMessage?(c(),A(Pe,{key:0,format:!1,message:i.errorMessage??C.value},null,8,["message"])):I("",!0),a.multiple?(c(),A(ke,{key:1,value:H.value?"secondImage":"firstImage","field-name":"defaultImage"},null,8,["value"])):I("",!0)]),_:1},8,["class","info","label","mandatory"]),d(Ie,{visible:b.value,"onUpdate:visible":l[4]||(l[4]=o=>b.value=o),draggable:!1,header:P(M).cropDialogHeader,class:"w-max max-w-[98vw] min-w-[min(500px,98vw)] !max-h-[94vh]","content-class":"overflow-hidden overflow-y-auto min-h-[100px]","data-wv-section":"dialog-cropper","footer-class":"!gap-1",modal:""},{footer:_(()=>[d(F,{label:P(M).cancelCropLabel,onClick:Fe,"data-wv-section":"cancel-crop",severity:"secondary",text:"",type:"button"},null,8,["label"]),d(F,{label:P(M).changeImageLabel,onClick:Je,"data-wv-section":"change-image-button",text:"",type:"button"},null,8,["label"]),d(F,{label:P(M).applyCropLabel,onClick:xe,"data-wv-section":"apply-image-button",severity:"success",type:"button"},null,8,["label"])]),default:_(()=>[p.value!=null?(c(),A(P(ge),{key:0,ref_key:"vueAdvanceCropper",ref:le,"auto-zoom":!1,"background-wrapper-component":Me,src:m.value[p.value].src,class:"upload-example-cropper h-400","foreground-class":"h-400","image-class":"h-400"},null,8,["src"])):I("",!0)]),_:1},8,["visible","header"])],64))}}))}}});
|