@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 @@
|
|
|
1
|
+
System.register(["vue","../assetinfo/AssetInfo-BBgKToRP.system.js","../../vendor/primevue-u6FsQONA.system.js","../../vendor/vee-validate-Cc_B-qII.system.js","../../vendor/@tiptap/extension-bold-C_KVm_D0.system.js","../../vendor/@tiptap/extension-bullet-list-kXXFF-_p.system.js","../../vendor/@tiptap/extension-code-Q8P1EHjz.system.js","../../vendor/@tiptap/core-bnIgGWIt.system.js","../../vendor/@tiptap/extension-floating-menu-8rFSweor.system.js","../../vendor/@tiptap/extension-heading-BE64-Rg_.system.js","../../vendor/@tiptap/extension-history-GLkLmX-Y.system.js","../../vendor/@tiptap/extension-image-rKrdkZpJ.system.js","../../vendor/@tiptap/extension-italic-Dg0Nosoc.system.js","../../vendor/@tiptap/extension-link-Cd8bTMBz.system.js","../../vendor/@tiptap/extension-list-item-Mnhfw2gP.system.js","../../vendor/@tiptap/extension-mention-DVF3rX_z.system.js","../../vendor/@tiptap/extension-ordered-list-Hl0QU8Zt.system.js","../../vendor/@tiptap/extension-placeholder-BeLl2T-f.system.js","../../vendor/@tiptap/extension-underline-BdcAQ4JH.system.js","../../vendor/@tiptap/vue-3-BH1pZykd.system.js","../codesnippetadapter/CodeSnippetAdapter-BtSqWBl1.system.js","../mentionsection/MentionSection-C1gWOzH2.system.js","../../vendor/tippy.js-CuKTz0UR.system.js","../mentionlist/MentionList-600dsWhX.system.js","../button/Button-Okx1_kOu.system.js","../dialog/Dialog-WEl66uTI.system.js","../fieldwrapper/FieldWrapper-DFjw9hA8.system.js","../form/Form-D-e0VI8V.system.js","../icon/Icon-DUylRmY4.system.js","../inputtext/InputText-93zDNfC3.system.js","../inputurl/InputURL-kWIiKGEG.system.js","../overlaypanel/OverlayPanel-C_WCcNPw.system.js","../validatormessage/ValidatorMessage-VVfyqlRF.system.js","../editorbutton/EditorButton-DmVrr4Bk.system.js"],function(se,an){"use strict";var ge,ie,he,le,be,ye,x,F,Z,re,xe,H,h,q,u,b,d,_,V,P,ce,_e,c,ke,de,Ce,we,Se,Ae,Me,Le,Ie,N,J,Be,Te,je,Fe,He,Ve,Pe,Ne,$e,Ee,Re,ue,De,Oe,Ue,X,ze,We,Ke,Ge,Q,Ze,qe,Je,Xe,Qe,pe,Ye,et,k;return{setters:[t=>{ge=t.defineComponent,ie=t.mergeModels,he=t.inject,le=t.useModel,be=t.onMounted,ye=t.reactive,x=t.shallowRef,F=t.ref,Z=t.computed,re=t.watch,xe=t.resolveDirective,H=t.createElementBlock,h=t.openBlock,q=t.Fragment,u=t.createVNode,b=t.withCtx,d=t.createElementVNode,_=t.normalizeClass,V=t.createCommentVNode,P=t.createBlock,ce=t.renderList,_e=t.mergeProps,c=t.unref,ke=t.createTextVNode,de=t.toDisplayString,Ce=t.withDirectives,we=t.nextTick},null,t=>{Se=t.h},t=>{Ae=t.u},t=>{Me=t.B},t=>{Le=t.B},t=>{Ie=t.C},t=>{N=t.N,J=t.m},t=>{Be=t.F},t=>{Te=t.H},t=>{je=t.H},t=>{Fe=t.I},t=>{He=t.I},t=>{Ve=t.L},t=>{Pe=t.L},t=>{Ne=t.M},t=>{$e=t.O},t=>{Ee=t.P},t=>{Re=t.U},t=>{ue=t.V,De=t.a,Oe=t.u,Ue=t.E,X=t.F},t=>{ze=t._},t=>{We=t._},t=>{Ke=t.t},t=>{Ge=t._},t=>{Q=t._},t=>{Ze=t._},t=>{qe=t._},t=>{Je=t._},t=>{Xe=t._},t=>{Qe=t._},t=>{pe=t._},t=>{Ye=t._},t=>{et=t._},t=>{k=t._}],execute:function(){const t=["#57291F","#C0413B","#D77B5F","#FF9200","#C87505","#F18E3F","#C14C32","#80003A","#506432","#B30019","#EC410B","#8CB5B5","#6C3400","#FFA400","#41222A","#FFB27B","#BC7576"],mt=se("a",()=>{const s=Math.floor(Math.random()*t.length);return t[s]}),on=se("g",(s,f,p,U)=>{const i=p??mt(),v=document.createElement("canvas");v.style.background=i,v.width=f,v.height=f;const y=v.getContext("2d");if(y){const $="Poppins",Y="600",te="#fff";y.font=`${Y} 48px/48px ${$}`,y.textAlign="center",y.textBaseline="middle";const A=v.width/2,z=(v.height+8)/2;y.fillStyle=i,y.fillRect(0,0,v.width,v.height),y.fillStyle=te,y.fillText(s,A,z)}return v}),vt=N.create({name:"doc",topNode:!0,content:"block+"}),ft=N.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:s}){return["p",J(this.options.HTMLAttributes,s),0]},addCommands(){return{setParagraph:()=>({commands:s})=>s.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),gt=N.create({name:"text",group:"inline"}),ht=N.create({name:"codeSnippet",group:"block",atom:!0,addAttributes(){return{code:{default:""}}},parseHTML(){return[{tag:"codeSnippet"}]},renderHTML({HTMLAttributes:s}){return["codeSnippet",J(s)]},addNodeView(){return ue(ze)},addCommands(){return{insertCodeSnippet:()=>({commands:s})=>s.insertContent({type:"codeSnippet",attrs:{code:""}}),deleteCodeSnippet:()=>({commands:s})=>s.deleteSelection()}}}),bt=N.create({name:"mentionSection",group:"block",atom:!0,addAttributes(){return{title:{default:""},bodyText:{default:""}}},parseHTML(){return[{tag:"mentionSection"}]},renderHTML({HTMLAttributes:s}){return["mentionSection",J(s)]},addNodeView(){return ue(We)},addCommands(){return{insertMentionSection:s=>({commands:f})=>f.insertContent({type:"mentionSection",attrs:{title:s,bodyText:null}}),deleteMentionSection:()=>({commands:s})=>s.deleteSelection()}}}),yt=()=>({render:()=>{let s,f;return{onStart(p){s=new De(Ge,{props:{items:p.items,command:p.command},editor:p.editor}),p.clientRect&&(f=Ke("body",{getReferenceClientRect:p.clientRect,appendTo:()=>document.body,content:s.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(p){s.updateProps(p),p.clientRect&&f[0].setProps({getReferenceClientRect:p.clientRect})},onKeyDown(p){return p.event.key==="Escape"?(f[0].hide(),!0):s.ref.onKeyDown(p.event)},onExit(){f[0].destroy(),s.destroy()}}}}),xt=1*1024*1024,_t=10*1024*1024,kt=s=>s.startsWith("image/")?"image":s.includes("mp4")?"mp4":s==="video/x-matroska"?"mkv":s==="text/plain"?"txt":s==="text/csv"?"csv":s==="text/html"?"html":s==="application/json"?"json":s==="application/pdf"?"pdf":s==="application/vnd.ms-excel"||s==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"?"xls":s==="application/msword"||s==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"?"doc":s.startsWith("application/x-url")?"link":s.includes("application/x-zip-compressed")||s.includes("application/x-compressed")?"compressed":"unknown",Ct=(s,f=1)=>{var U;if(f*=xt,!((U=s.type)!=null&&U.length))return!1;const p=kt(s.type);return s.size<=(p==="mp4"||p==="mkv"?_t:f)},wt=["title","onClick"],St={class:"!text-[9px] !leading-3 !h-max !font-normal"},At={class:_(["flex gap-2 bg-white border-[0.5px] px-2 py-1 rounded-sm","[&_.separator::after]:content-['|']","[&_.separator::after]:text-xl","[&_.separator::after]:font-thin","[&_.separator]:h-6"])},Mt={class:_(["flex gap-2 bg-white border-[0.5px] px-2 py-1 rounded-sm","[&_.separator::after]:content-['|']","[&_.separator::after]:text-xl","[&_.separator::after]:font-thin","[&_.separator]:h-6"])},Lt=d("span",{class:"separator"},null,-1),It=d("span",{class:"separator"},null,-1),Bt=d("span",{class:"separator"},null,-1),Tt={class:"flex flex-col gap-4"},jt={class:"flex gap-2"},Ft={class:"flex-1"},Ht={class:"flex items-end"},Vt=d("p",null,"Baru Saja Ditambahkan",-1),Pt={class:"flex flex-wrap justify-center gap-2"},Nt=["src"],$t={class:"flex flex-col justify-center w-28 h-28 items-center"},Et={class:"relative py-[7px] px-3"},Rt=d("p",null,"Cari Gambar",-1),Dt={class:_(["flex gap-2 bg-white border-[0.5px] px-2 py-1 rounded-sm","[&_.separator::after]:content-['|']","[&_.separator::after]:text-xl","[&_.separator::after]:font-thin","[&_.separator]:h-6"])},sn=se("_",ge({__name:"Editor",props:ie({modelValue:{},initialValue:{},placeholder:{default:"Tulis"},editorState:{default:"editable"},borderLess:{type:Boolean,default:!1},label:{},useValidator:{type:Boolean},fieldName:{},labelClass:{},fieldInfo:{},validatorMessageClass:{},validatorMessage:{},mandatory:{type:Boolean},invalid:{type:Boolean},showOptionalText:{type:Boolean,default:void 0},isImageUploadBase64:{type:Boolean,default:!1},fetchMentionSuggestionFunction:{},mentionedList:{},editorWrapperClass:{},toolbarWrapperClass:{},contentWrapperClass:{}},{modelValue:{},modelModifiers:{},mentionedList:{},mentionedListModifiers:{}}),emits:ie(["update:modelValue","postImageLocal","deleteImageLocal","blur","focus","update:mentionedList"],["update:modelValue","update:mentionedList"]),setup(s,{expose:f,emit:p}){const U=he("preset",{}).menu,i=s,v=p;le(s,"modelValue");const y=le(s,"mentionedList");be(()=>{i.useValidator&&(Object.assign(C,Ae(()=>i.fieldName??"editorInput",e=>we(()=>Xt(e)))),i.initialValue!=null&&(C.value=i.initialValue),i.modelValue!=null&&(C.value=i.modelValue)),en()});const $=x(!1),Y=F(),ee=F(),te=F(),A=F([]),z=x(!1),E=x(),W=x(),ne=x(),C=ye({value:i.modelValue}),M=x(!1),K=F([]),me=x(),Ot=Z(()=>{var e;return i.placeholder??"Tulis "+(i.label?(e=i.label)==null?void 0:e.toLowerCase():"")}),a=Oe({content:i.initialValue??i.modelValue,onBlur:e=>v("blur",e),onFocus:e=>v("focus",e),onUpdate:()=>{var e,n;v("update:modelValue",((e=a.value)==null?void 0:e.getJSON())??{}),C.value=((n=a.value)==null?void 0:n.getJSON())??{}},onPaste:async e=>{let n=[];const{items:l}=e.clipboardData,o=r=>new Promise(m=>{if(r.kind==="file"){const g=r.getAsFile();g&&n.push(g),m()}else m()});await Promise.all(Array.from(l).map(o));try{if(n.length){const r=n.filter(m=>m.type.startsWith("image/")).filter(m=>Ct(m,10));await nt(r)}}catch(r){console.error("Error pasting images:",r)}finally{n=[]}},onSelectionUpdate(e){var l;const n=e.editor.getAttributes("image");(l=a.value)==null||l.state.doc.descendants(o=>{o.type.name==="mention"&&K.value.push(o.attrs.id)}),K.value=Array.from(new Set(K.value)),n.title==="localImage"?W.value=n:W.value=void 0},editable:i.editorState==="editable",extensions:[Ee.configure({emptyEditorClass:"is-editor-empty !text-general-200 !font-light",placeholder:Ot.value,includeChildren:!1}),vt.extend({addKeyboardShortcuts(){return{"Mod-\\":()=>(this.editor.commands.clearNodes(),this.editor.commands.unsetAllMarks())}}}),Te,ft,gt,Fe.extend({addKeyboardShortcuts(){const e=()=>{const{node:n}=this.editor.state.selection;return n&&n.type.name==="image"&&n.attrs.title==="localImage"?(at(),!0):!1};return{Insert:()=>tt(),Backspace:e,Delete:e}}}).configure({HTMLAttributes:{class:"w-fit max-h-[300px] object-contain"}}),ht.extend({addKeyboardShortcuts(){return{"Mod-alt-c":ot}}}),bt,$e.configure({HTMLAttributes:{class:"list-decimal px-3 py-1"}}),Le.configure({HTMLAttributes:{class:"list-disc px-3 py-1"}}),Pe,Me,He,Re,Ie,Ve.extend({addKeyboardShortcuts(){return{"Mod-k":()=>ve()}}}).configure({openOnClick:!1}),je,Ne.configure({HTMLAttributes:{class:"bg-primary-200 text-primary-800 rounded-[50px] px-1"},suggestion:{items({query:e}){return((ne==null?void 0:ne.value)??[]).filter(n=>n==null?void 0:n.fullName.toLowerCase().includes(e.toLowerCase())).map(n=>({id:n==null?void 0:n._id,label:n==null?void 0:n.fullName,nickName:n.nickName,profilePicture:n.profilePicture}))},...yt()}}),Be]}),Ut=Z(()=>{var B,S,T,j,R,D,O,G,oe,it,lt,rt,ct,dt,ut,pt;if(!a.value)return[];const{toggleBold:e,focus:n,toggleItalic:l,toggleUnderline:o,toggleBulletList:r,toggleCode:m,toggleOrderedList:g,unsetAllMarks:L,clearNodes:I}=a.value.commands,w=(B=a.value)==null?void 0:B.isActive("code");return[{label:"Aa",iconPos:"right",icon:"arrow-down",class:"!gap-0 !w-[50px] !p-0 !m-0 [&_span]:leading-[22px]",onClick:(S=Y.value)==null?void 0:S.toggle},{icon:"bold",tooltipText:"Bold | Ctrl + B",active:(T=a.value)==null?void 0:T.isActive("bold"),disabled:w,onClick:()=>{n(),e()}},{icon:"italic",tooltipText:"Italic | Ctrl + I",active:(j=a.value)==null?void 0:j.isActive("italic"),disabled:w,onClick:()=>{n(),l()}},{icon:"underline",class:"mr-3",active:(R=a.value)==null?void 0:R.isActive("underline"),tooltipText:"Underline | Ctrl + U",disabled:w,onClick:()=>{n(),o()}},{icon:"list-unordered",tooltipText:"Bullet List | Ctrl + 7",active:(D=a.value)==null?void 0:D.isActive("bullet-list"),onClick:()=>{n(),r()}},{icon:"list-ordered",tooltipText:"Numbered List | Ctrl + 8",active:(O=a.value)==null?void 0:O.isActive("ordered-list"),class:"mr-3",onClick:()=>{n(),g()}},{icon:"link-m",tooltipText:"Link | Ctrl + K",disabled:((G=a.value)==null?void 0:G.isActive("link"))||$.value,onClick:ve},{icon:"image-add",active:(oe=a.value)==null?void 0:oe.isActive("image"),tooltipText:"Image | Insert",onClick:()=>tt()},{icon:"code-line",active:(it=a.value)==null?void 0:it.isActive("code"),tooltipText:"Inline Code | Ctrl + E",onClick:()=>{n(),m()}},{icon:"code-box-line",active:(lt=a.value)==null?void 0:lt.isActive("codeSnippet"),tooltipText:"Code Block | Ctrl + Alt + C",onClick:()=>{ot()}},{icon:"format-clear",tooltipText:"Clear Formatting Ctrl + \\",disabled:!((rt=a.value)!=null&&rt.isActive("bold"))&&!((ct=a.value)!=null&&ct.isActive("underline"))&&!((dt=a.value)!=null&&dt.isActive("italic"))&&!((ut=a.value)!=null&&ut.isActive("code"))&&!((pt=a.value)!=null&&pt.isActive("heading")),onClick:()=>{n(),I(),L()}}]}),zt=x([{label:"Paragraf",class:"p",shortCut:"Ctrl+Alt+P",command:()=>{var e,n;(e=a.value)==null||e.commands.focus(),(n=a.value)==null||n.commands.setParagraph()}},{label:"Heading 1",class:"heading-1",shortCut:"Ctrl+Alt+1",command:()=>{var e,n;(e=a.value)==null||e.commands.focus(),(n=a.value)==null||n.commands.setHeading({level:1})}},{label:"Heading 2",class:"heading-2",shortCut:"Ctrl+Alt+2",command:()=>{var e,n;(e=a.value)==null||e.commands.focus(),(n=a.value)==null||n.commands.setHeading({level:2})}},{class:"heading-3",label:"Heading 3",shortCut:"Ctrl+Alt+3",command:()=>{var e,n;(e=a.value)==null||e.commands.focus(),(n=a.value)==null||n.commands.setHeading({level:3})}},{label:"Heading 4",class:"heading-4",shortCut:"Ctrl+Alt+4",command:()=>{var e,n;(e=a.value)==null||e.commands.focus(),(n=a.value)==null||n.commands.setHeading({level:4})}},{label:"Heading 5",class:"heading-5",shortCut:"Ctrl+Alt+5",command:()=>{var e,n;(e=a.value)==null||e.commands.focus(),(n=a.value)==null||n.commands.setHeading({level:5})}},{label:"Heading 6",class:"heading-6",shortCut:"Ctrl+Alt+6",command:()=>{var e,n;(e=a.value)==null||e.commands.focus(),(n=a.value)==null||n.commands.setHeading({level:6})}}]),ae=Z(()=>{var e;return(e=a.value)==null?void 0:e.getAttributes("link")}),Wt=()=>{var l;const{href:e}=ae.value,n=(l=a.value)==null?void 0:l.view.dom.querySelector(`[href="${e}"]`);return qt()||n&&(n==null?void 0:n.textContent)!==e&&n.textContent||void 0},Kt=()=>{var e;window.open((e=ae.value)==null?void 0:e.href,"_blank")},Gt=()=>{var e;window.navigator.clipboard.writeText((e=ae.value)==null?void 0:e.href)},Zt=()=>{var e;if(a.value){const{unsetLink:n,focus:l}=((e=a.value)==null?void 0:e.commands)??{};l(),n()}},qt=()=>{if(a.value){const{state:e}=a.value,{from:n,to:l}=e.selection;return e==null?void 0:e.doc.textBetween(n,l," ")}},tt=()=>(z.value=!0,!1),nt=async e=>{if(i.isImageUploadBase64){const n=await Yt(e[0]);fe(n)}else v("postImageLocal",{image:e[0],setImageCb:fe})},Jt=e=>{const{files:n}=e.target;nt(n)},Xt=(e={})=>{if(typeof i.validatorMessage=="string"&&i.invalid)return i.validatorMessage;if(typeof i.validatorMessage!="string"){const{empty:n}=i.validatorMessage??{};if(e.content===void 0&&i.mandatory&&n)return n??!0}return!0},ve=e=>{var o,r,m,g;const n=e??{currentTarget:(r=(o=te.value)==null?void 0:o.querySelector(".ic-link-m"))==null?void 0:r.closest("button")},{dom:l}=((m=a.value)==null?void 0:m.view)??{};return(g=ee.value)==null||g.toggle(n,l),!0},Qt=({formValues:e})=>{var L,I;if(!a.value)return!1;const{setLink:n,insertContent:l,focus:o}=a.value.commands,{url:r,text:m}=e,{state:g}=a.value;return o(),n({href:r,target:"_blank",rel:"nofollow"}),(L=a.value)!=null&&L.isActive("link")?a.value.chain().focus().command(({tr:w,state:B})=>{const{$from:S,$to:T}=B.selection,j=g.schema.marks.link;let R=S.start(),D=T.end();return g.doc.nodesBetween(S.pos,T.pos,(O,G)=>{O.isText&&O.marks.some(oe=>oe.type===j)&&(R=Math.min(R,G),D=Math.max(D,G+O.nodeSize))}),w.insertText(m||r,R,D),!0}).run():g.selection.empty&&l(m||r),(I=ee.value)==null||I.hide(),$.value=!1,!0},fe=e=>{var n,l,o,r;(n=a.value)==null||n.commands.focus(),e&&(i.isImageUploadBase64?(l=a.value)==null||l.commands.setImage({src:e,title:"localImageBase64"}):(o=a.value)==null||o.commands.setImage({src:e,title:"localImage"}),A.value=Array.from(new Set([...A.value,e]))),E.value&&((r=a.value)==null||r.commands.setImage({src:E.value}),A.value=Array.from(new Set([...A.value,E.value]))),E.value=void 0,st()},at=()=>{var e;W.value&&W.value.title==="localImage"&&v("deleteImageLocal",W.value),(e=a.value)==null||e.commands.deleteSelection()},Yt=e=>new Promise((n,l)=>{const o=new FileReader;o.readAsDataURL(e),o.onload=()=>{n(o.result)},o.onerror=r=>{l(r)}}),en=async()=>{if(i.fetchMentionSuggestionFunction){M.value=!M.value;try{const{data:e}=await i.fetchMentionSuggestionFunction()??{};ne.value=e,M.value=!M.value}catch(e){console.error(e)}}},ot=()=>{var l,o;const{insertCodeSnippet:e,deleteCodeSnippet:n}=(l=a.value)==null?void 0:l.commands;return(o=a.value)!=null&&o.isActive("codeSnippet")?n():e(),!1},st=()=>{a.value.commands.createParagraphNear()},tn=e=>{var n;try{const{insertMentionSection:l}=(n=a.value)==null?void 0:n.commands;l(e),me.value!==e&&me.value!==void 0&&nn(),me.value=e}catch(l){console.error(l)}},nn=()=>{M.value=!0,setTimeout(()=>{M.value=!1},100)};return f({mentionSectionTrigger:tn}),re(()=>i.invalid,()=>{var e;(e=C.validate)==null||e.call(C)}),re(K,()=>{y.value=K.value}),(e,n)=>{const l=xe("focus");return h(),H(q,null,[u(qe,{info:e.fieldInfo,label:i.label,"label-class":i.labelClass,mandatory:i.mandatory,"show-optional-text":i.showOptionalText},{default:b(()=>[d("div",{ref_key:"root",ref:te,class:_(["rounded-b text-grayscale-900 w-full","[&:has(:focus)]:border-general-200 border-general-100",`${e.borderLess||e.editorState==="readonly"?"border-none":"border-[0.5px]"}`,"[&_code]:bg-primary-100","[&_code]:rounded-md","[&_code]:p-[0.25em_0.3em]","[&_code]:text-[0.85rem]","[&_code]:!font-source-code-pro",`${i.editorWrapperClass}`]),"data-wv-name":"editor"},[i.editorState==="editable"?(h(),H("div",{key:0,class:_(["border-b-[0.5px] border-inherit px-3 py-1 flex gap-1 bg-general-50",`${i.toolbarWrapperClass}`]),"data-wv-section":"toolbar"},[(h(!0),H(q,null,ce(Ut.value,o=>(h(),P(k,_e({ref_for:!0},o,{key:o.icon,class:[{"!bg-primary-50 ":o.active},o.class]}),null,16,["class"]))),128))],2)):V("",!0),M.value?V("",!0):(h(),P(c(Ue),{key:1,class:_([`${i.editorState==="editable"?"px-3 py-2":""} [&_*]:outline-none`,"[&_.is-editor-empty:first-child::before]:text-general-200","[&_.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.is-editor-empty:first-child::before]:content-[attr(data-placeholder)]","[&_.is-editor-empty:first-child::before]:font-normal","[&_.is-editor-empty:first-child::before]:pointer-events-none","[&_.is-editor-empty:first-child::before]:float-left","[&_.is-editor-empty:first-child::before]:h-0","[&_a]:hover:underline transition-transform duration-75","[&_a]:text-link","[&_a]:cursor-pointer","[&_b]:font-bold","[&_strong]:font-bold","[&_img.ProseMirror-selectednode]:!outline-[0.5px]","[&_img.ProseMirror-selectednode]:!outline-link","[&_img.ProseMirror-selectednode]:!outline-offset-1","[&_img.ProseMirror-selectednode]:!rounded-sm","[&_img]:my-2","[&_*:has(code)]:my-[0.25rem]",`${i.contentWrapperClass}`]),editor:c(a),spellcheck:"false"},null,8,["class","editor"])),u(c(Se),{ref_key:"headingMenu",ref:Y,model:zt.value,popup:""},{item:b(({item:o})=>{var r,m,g,L,I,w,B,S;return[d("a",{class:_([...(r=c(U))==null?void 0:r.action.class,o.class,"flex items-center !justify-between h-[30px]",{"bg-primary-50":((m=c(a))==null?void 0:m.isActive("heading",{level:1}))&&o.label==="Heading 1"||((g=c(a))==null?void 0:g.isActive("heading",{level:2}))&&o.label==="Heading 2"||((L=c(a))==null?void 0:L.isActive("heading",{level:3}))&&o.label==="Heading 3"||((I=c(a))==null?void 0:I.isActive("heading",{level:4}))&&o.label==="Heading 4"||((w=c(a))==null?void 0:w.isActive("heading",{level:5}))&&o.label==="Heading 5"||((B=c(a))==null?void 0:B.isActive("heading",{level:6}))&&o.label==="Heading 6"||((S=c(a))==null?void 0:S.isActive("paragraph"))&&o.label==="Paragraf"}]),title:o.label,onClick:T=>{var j;return(j=o.command)==null?void 0:j.call(o,{item:o,originalEvent:T})}},[ke(de(o.label)+" ",1),d("code",St,de(o.shortCut),1)],10,wt)]}),_:1},8,["model"]),c(a)&&i.editorState==="editable"?(h(),P(c(X),{key:2,editor:c(a),"should-show":()=>{var o,r;return((o=c(a))==null?void 0:o.isActive("codeSnippet"))||((r=c(a))==null?void 0:r.isActive("mentionSection"))},"tippy-options":{placement:"top",zIndex:9},class:"-mt-1.5 shadow-panel","plugin-key":"editLinkToolbar"},{default:b(()=>[d("div",At,[u(k,{onClick:st,icon:"close",severity:"secondary",text:"","tooltip-text":"Buat text baru dibawah"})])]),_:1},8,["editor","should-show"])):V("",!0),c(a)&&!$.value&&i.editorState==="editable"?(h(),P(c(X),{key:3,editor:c(a),"should-show":()=>{var o;return(o=c(a))==null?void 0:o.isActive("link")},"tippy-options":{placement:"bottom",zIndex:9},class:"-mt-1.5 shadow-panel","plugin-key":"editLinkToolbar"},{default:b(()=>[d("div",Mt,[u(k,{onClick:ve,class:"!w-max",label:"Edit Tautan",severity:"secondary",text:""}),Lt,u(k,{onClick:Kt,icon:"external-link",severity:"secondary",text:"","tooltip-text":"Buka di tab baru"}),It,u(k,{onClick:Zt,icon:"link-unlink-m",severity:"secondary",text:"","tooltip-text":"Lepas tautan"}),Bt,u(k,{onClick:Gt,icon:"file-copy",severity:"secondary",text:"","tooltip-text":"Salin tautan"})])]),_:1},8,["editor","should-show"])):V("",!0),u(Ze,{visible:z.value,"onUpdate:visible":n[2]||(n[2]=o=>z.value=o),class:"w-[400px]",header:"Pilih Gambar"},{default:b(()=>[d("div",Tt,[d("div",jt,[d("div",Ft,[u(pe,{"model-value":E.value,"onUpdate:modelValue":n[0]||(n[0]=o=>E.value=o),class:"w-[269px]",label:"URL Gambar"},null,8,["model-value"])]),d("div",Ht,[u(Q,{onClick:n[1]||(n[1]=o=>fe()),label:"Simpan",severity:"secondary"})])]),d("div",null,[Vt,d("div",Pt,[(h(!0),H(q,null,ce(A.value,(o,r)=>(h(),H("img",{key:r,src:o,alt:"preview",class:"w-28 h-28 object-scale-down rounded-lg"},null,8,Nt))),128)),d("div",$t,[u(Xe,{class:"!w-[70px] !h-[70px]",icon:"upload-2",severity:"primary"}),u(Q,{severity:"secondary"},{default:b(()=>[d("div",Et,[Rt,d("input",{onChange:Jt,class:"opacity-0 absolute top-0 bottom-0 left-0 right-0",type:"file"},null,32)])]),_:1})])])])])]),_:1},8,["visible"]),c(a)&&i.editorState==="editable"?(h(),P(c(X),{key:4,editor:c(a),"should-show":()=>{var o;return!!((o=c(a))!=null&&o.isActive("image"))},"tippy-options":{placement:"top",zIndex:9},class:"-mt-1.5 shadow-panel","plugin-key":"editImageToolbar"},{default:b(()=>[d("div",Dt,[u(k,{onClick:at,icon:"delete-bin",severity:"secondary",text:"","tooltip-text":"Unset Image"})])]),_:1},8,["editor","should-show"])):V("",!0)],2),u(et,{class:_(e.validatorMessageClass),message:C.errorMessage},null,8,["class","message"])]),_:1},8,["info","label","label-class","mandatory","show-optional-text"]),u(Ye,{ref_key:"editLinkOverlay",ref:ee,pt:{content:{class:""}},onHide:n[3]||(n[3]=o=>$.value=!1),"append-to":"self",class:"w-[342px] bg-white p-4"},{default:b(()=>[u(Je,{onSubmit:Qt,class:"!gap-0","hide-stay-checkbox":""},{fields:b(()=>{var o,r;return[Ce(u(pe,{"validator-message":{empty:"Masukan tautan yang valid"},value:(o=ae.value)==null?void 0:o.href,"field-name":"url",label:"Tempel Tautan",mandatory:"",placeholder:"Tempel tautan baru","use-validator":""},null,8,["value"]),[[l]]),u(Qe,{value:Wt(),"field-name":"text",label:"Teks Tampilan",placeholder:"Teks untuk ditampilkan","use-validator":""},null,8,["value"]),u(Q,{label:(r=c(a))!=null&&r.isActive("link")?"Simpan":"Tambahkan",class:"w-max ml-auto",severity:"secondary",type:"submit"},null,8,["label"])]}),_:1})]),_:1},512)],64)}}}))}}});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineComponent as o, createBlock as s, openBlock as e, normalizeClass as p } from "vue";
|
|
2
|
+
import { _ as r } from "../button/Button-D-MSv_AS.es.js";
|
|
3
|
+
const c = /* @__PURE__ */ o({
|
|
4
|
+
__name: "EditorButton",
|
|
5
|
+
props: {
|
|
6
|
+
classButton: {}
|
|
7
|
+
},
|
|
8
|
+
setup(a) {
|
|
9
|
+
return (t, n) => (e(), s(r, {
|
|
10
|
+
class: p([t.classButton, "!rounded h-6 w-6 p-1"]),
|
|
11
|
+
tooltip: {
|
|
12
|
+
pt: {
|
|
13
|
+
text: {
|
|
14
|
+
style: "font-size: 9px !important; padding: 2px 6px; border-radius: 8px"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
value: t.$attrs.tooltipText ?? t.$attrs["tooltip-text"]
|
|
18
|
+
},
|
|
19
|
+
"icon-class": "!w-4 !h-4",
|
|
20
|
+
severity: "secondary",
|
|
21
|
+
text: "",
|
|
22
|
+
"tooltip-pos": "top"
|
|
23
|
+
}, null, 8, ["class", "tooltip"]));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
export {
|
|
27
|
+
c as _
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","../button/Button-Okx1_kOu.system.js"],function(a,i){"use strict";var o,s,n,r,p;return{setters:[t=>{o=t.defineComponent,s=t.createBlock,n=t.openBlock,r=t.normalizeClass},t=>{p=t._}],execute:function(){const t=a("_",o({__name:"EditorButton",props:{classButton:{}},setup(c){return(e,l)=>(n(),s(p,{class:r([e.classButton,"!rounded h-6 w-6 p-1"]),tooltip:{pt:{text:{style:"font-size: 9px !important; padding: 2px 6px; border-radius: 8px"}},value:e.$attrs.tooltipText??e.$attrs["tooltip-text"]},"icon-class":"!w-4 !h-4",severity:"secondary",text:"","tooltip-pos":"top"},null,8,["class","tooltip"]))}}))}}});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineComponent as y, computed as k, inject as b, createElementBlock as r, renderSlot as d, openBlock as a, normalizeProps as s, mergeProps as l, unref as o, createCommentVNode as n, createTextVNode as g, createBlock as P, toDisplayString as p } from "vue";
|
|
2
|
+
import { u as h, m as v } from "../animation/Animation-COWVilAA.es.js";
|
|
3
|
+
import { _ as w } from "../icon/Icon-mDqG7urn.es.js";
|
|
4
|
+
const O = /* @__PURE__ */ y({
|
|
5
|
+
__name: "FieldWrapper",
|
|
6
|
+
props: {
|
|
7
|
+
label: {},
|
|
8
|
+
mandatory: { type: Boolean },
|
|
9
|
+
showOptionalText: { type: Boolean, default: void 0 },
|
|
10
|
+
showAsterisk: { type: Boolean, default: void 0 },
|
|
11
|
+
info: {},
|
|
12
|
+
labelClass: {},
|
|
13
|
+
tooltipPos: {}
|
|
14
|
+
},
|
|
15
|
+
setup(m) {
|
|
16
|
+
const f = m, { defaultProps: c, locale: u } = h("FieldWrapper"), i = k(() => v(f, c)), t = b("preset", {}).fieldwrapper;
|
|
17
|
+
return (e, B) => e.$attrs["use-field-wrapper"] != !1 ? (a(), r("div", s(l({ key: 0 }, o(t).root)), [
|
|
18
|
+
e.label ? (a(), r("label", s(l({ key: 0 }, o(t).label({ props: f }))), [
|
|
19
|
+
g(p(e.label) + " ", 1),
|
|
20
|
+
e.mandatory && i.value.showAsterisk ? (a(), r("span", s(l({ key: 0 }, o(t).arterisksign)), p(o(u).labelRequired), 17)) : n("", !0),
|
|
21
|
+
e.info ? (a(), P(w, l({
|
|
22
|
+
key: 1,
|
|
23
|
+
info: e.info,
|
|
24
|
+
"tooltip-pos": i.value.tooltipPos
|
|
25
|
+
}, o(t).info, { icon: "info" }), null, 16, ["info", "tooltip-pos"])) : n("", !0),
|
|
26
|
+
e.mandatory == !1 && i.value.showOptionalText ? (a(), r("span", s(l({ key: 2 }, o(t).optionaltext)), p(o(u).labelOptional), 17)) : n("", !0)
|
|
27
|
+
], 16)) : n("", !0),
|
|
28
|
+
d(e.$slots, "default")
|
|
29
|
+
], 16)) : d(e.$slots, "default", { key: 1 });
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
export {
|
|
33
|
+
O as _
|
|
34
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","../animation/Animation-6756VN9N.system.js","../icon/Icon-DUylRmY4.system.js"],function(h,S){"use strict";var u,y,k,r,c,n,s,a,o,i,m,d,p,g,B,P;return{setters:[e=>{u=e.defineComponent,y=e.computed,k=e.inject,r=e.createElementBlock,c=e.renderSlot,n=e.openBlock,s=e.normalizeProps,a=e.mergeProps,o=e.unref,i=e.createCommentVNode,m=e.createTextVNode,d=e.createBlock,p=e.toDisplayString},e=>{g=e.u,B=e.m},e=>{P=e._}],execute:function(){const e=h("_",u({__name:"FieldWrapper",props:{label:{},mandatory:{type:Boolean},showOptionalText:{type:Boolean,default:void 0},showAsterisk:{type:Boolean,default:void 0},info:{},labelClass:{},tooltipPos:{}},setup(w){const b=w,{defaultProps:C,locale:v}=g("FieldWrapper"),f=y(()=>B(b,C)),l=k("preset",{}).fieldwrapper;return(t,V)=>t.$attrs["use-field-wrapper"]!=!1?(n(),r("div",s(a({key:0},o(l).root)),[t.label?(n(),r("label",s(a({key:0},o(l).label({props:b}))),[m(p(t.label)+" ",1),t.mandatory&&f.value.showAsterisk?(n(),r("span",s(a({key:0},o(l).arterisksign)),p(o(v).labelRequired),17)):i("",!0),t.info?(n(),d(P,a({key:1,info:t.info,"tooltip-pos":f.value.tooltipPos},o(l).info,{icon:"info"}),null,16,["info","tooltip-pos"])):i("",!0),t.mandatory==!1&&f.value.showOptionalText?(n(),r("span",s(a({key:2},o(l).optionaltext)),p(o(v).labelOptional),17)):i("",!0)],16)):i("",!0),c(t.$slots,"default")],16)):c(t.$slots,"default",{key:1})}}))}}});
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { defineComponent as D, mergeModels as $, useModel as G, inject as Y, shallowRef as y, ref as z, reactive as H, computed as Z, onMounted as J, watch as E, createBlock as A, openBlock as v, unref as m, mergeProps as g, withCtx as M, createTextVNode as h, toDisplayString as x, createElementVNode as B, normalizeClass as k, createVNode as w, createCommentVNode as N, withModifiers as Q, createElementBlock as S, normalizeProps as W, Fragment as C } from "vue";
|
|
2
|
+
import { k as X } from "../../vendor/primevue-CadmDhWp.es.js";
|
|
3
|
+
import { u as ee } from "../../vendor/vee-validate-RE5RuswC.es.js";
|
|
4
|
+
import { u as ae } from "../assetinfo/AssetInfo-CmwgOU74.es.js";
|
|
5
|
+
import { _ as le } from "../fieldwrapper/FieldWrapper-C6HJ2HnC.es.js";
|
|
6
|
+
import { _ as se } from "../inputtext/InputText-_xEnXysf.es.js";
|
|
7
|
+
import { _ as ie } from "../button/Button-D-MSv_AS.es.js";
|
|
8
|
+
import { _ as oe } from "../validatormessage/ValidatorMessage-BtKfBXzO.es.js";
|
|
9
|
+
const te = { class: "'!mt-0 font-light text-xs text-general-500'" }, re = 1048576, ye = /* @__PURE__ */ D({
|
|
10
|
+
__name: "FileUpload",
|
|
11
|
+
props: /* @__PURE__ */ $({
|
|
12
|
+
accept: {},
|
|
13
|
+
disabled: { type: Boolean },
|
|
14
|
+
maxFileSize: {},
|
|
15
|
+
modelValue: {},
|
|
16
|
+
multiple: { type: Boolean, default: !1 },
|
|
17
|
+
invalidFileSizeMessage: {},
|
|
18
|
+
invalidFileTypeMessage: {},
|
|
19
|
+
label: { default: "Upload File" },
|
|
20
|
+
withUpload: { type: Boolean, default: !0 },
|
|
21
|
+
uploadLabel: { default: "Upload" },
|
|
22
|
+
placeholder: { default: "Select File" },
|
|
23
|
+
fileExtensions: {},
|
|
24
|
+
fileRequirements: {},
|
|
25
|
+
uploadFunction: {},
|
|
26
|
+
useValidator: { type: Boolean },
|
|
27
|
+
fieldName: { default: "fileUpload" },
|
|
28
|
+
mandatory: { type: Boolean },
|
|
29
|
+
useErrorToast: { type: Boolean, default: !0 },
|
|
30
|
+
validatorMessage: {},
|
|
31
|
+
validatorMessageClass: {}
|
|
32
|
+
}, {
|
|
33
|
+
modelValue: {},
|
|
34
|
+
modelModifiers: {}
|
|
35
|
+
}),
|
|
36
|
+
emits: /* @__PURE__ */ $(["select", "update:modelValue", "upload", "error"], ["update:modelValue"]),
|
|
37
|
+
setup(T, { emit: V }) {
|
|
38
|
+
const I = ae(), t = G(T, "modelValue"), a = T, _ = V, { fileupload: c = {} } = Y("preset", {}), i = y(), r = y(), o = y(), F = z(), u = H({ value: void 0 }), R = Z(() => !!u.errorMessage || (n.value ? n.value.length > 0 : !1)), d = y(!1);
|
|
39
|
+
J(() => {
|
|
40
|
+
a.useValidator && Object.assign(
|
|
41
|
+
u,
|
|
42
|
+
ee(a.fieldName, (e) => j(e))
|
|
43
|
+
), t.value && (Array.isArray(t.value) && a.multiple ? (o.value = t.value, i.value = t.value.map((e) => e.name)) : t.value instanceof File && (o.value = t.value, i.value = t.value.name));
|
|
44
|
+
});
|
|
45
|
+
const j = (e) => {
|
|
46
|
+
if (typeof a.validatorMessage == "string")
|
|
47
|
+
return a.validatorMessage;
|
|
48
|
+
if (typeof a.validatorMessage != "string") {
|
|
49
|
+
const { empty: l } = a.validatorMessage ?? {};
|
|
50
|
+
if (!e && a.mandatory && !o.value)
|
|
51
|
+
return l ?? !0;
|
|
52
|
+
}
|
|
53
|
+
return !0;
|
|
54
|
+
}, q = (e) => {
|
|
55
|
+
if (!a.useErrorToast && typeof a.validatorMessage != "string") {
|
|
56
|
+
const { exceed: l, invalidFormat: s } = a.validatorMessage;
|
|
57
|
+
e.includes("Invalid file size") && l ? r.value = l : e.includes("Invalid file type") ? r.value = s : r.value = void 0;
|
|
58
|
+
}
|
|
59
|
+
}, L = (e) => {
|
|
60
|
+
var l;
|
|
61
|
+
try {
|
|
62
|
+
if (!e.files || e.files.length === 0)
|
|
63
|
+
return;
|
|
64
|
+
a.multiple ? (o.value = e.files, i.value = e.files.map((s) => s.name), _("select", e.files)) : (o.value = e.files[0], i.value = (l = e.files[0]) == null ? void 0 : l.name, _("select", e.files[0]));
|
|
65
|
+
} catch (s) {
|
|
66
|
+
console.error(s);
|
|
67
|
+
}
|
|
68
|
+
}, U = (e, l) => {
|
|
69
|
+
a.disabled || d.value || (n.value = void 0, new Promise((s, p) => {
|
|
70
|
+
try {
|
|
71
|
+
l(), s();
|
|
72
|
+
} catch (f) {
|
|
73
|
+
p(f);
|
|
74
|
+
}
|
|
75
|
+
}).then(() => {
|
|
76
|
+
e();
|
|
77
|
+
}));
|
|
78
|
+
}, O = async (e, l) => {
|
|
79
|
+
try {
|
|
80
|
+
d.value = !0, a.uploadFunction && await a.uploadFunction(e), o.value = void 0, i.value = void 0, l(), d.value = !1;
|
|
81
|
+
} catch (s) {
|
|
82
|
+
throw d.value = !1, s;
|
|
83
|
+
}
|
|
84
|
+
}, n = z(), P = (e) => {
|
|
85
|
+
n.value = e;
|
|
86
|
+
}, K = (e, l, s) => {
|
|
87
|
+
(e.key === "Enter" || e.key === " ") && U(l, s);
|
|
88
|
+
};
|
|
89
|
+
return E(o, (e) => {
|
|
90
|
+
u.value = e, t.value = e, n.value = void 0, r.value = void 0;
|
|
91
|
+
}), E(t, (e) => {
|
|
92
|
+
Array.isArray(e) && a.multiple ? (o.value = e, i.value = e.map((l) => l.name)) : e instanceof File ? (o.value = e, i.value = e.name) : (o.value = void 0, i.value = void 0), u.value = e, "messages" in F.value && (F.value.messages = []), n.value = void 0, r.value = void 0;
|
|
93
|
+
}), E(n, (e) => {
|
|
94
|
+
if (e && e.length > 0) {
|
|
95
|
+
const l = e[0].replace("{2}", a.accept || "").replace("{2.1}", a.fileExtensions || "");
|
|
96
|
+
l.includes("Invalid file size") && _("error", "FILE_SIZE_TOO_LARGE"), q(l), a.useErrorToast && I.add({
|
|
97
|
+
message: l,
|
|
98
|
+
severity: "error"
|
|
99
|
+
}), o.value = void 0, i.value = void 0;
|
|
100
|
+
} else
|
|
101
|
+
r.value = void 0;
|
|
102
|
+
}), (e, l) => (v(), A(m(X), g(a, {
|
|
103
|
+
ref_key: "fileUpload",
|
|
104
|
+
ref: F,
|
|
105
|
+
"file-limit": e.multiple ? void 0 : 1,
|
|
106
|
+
pt: { input: { style: "display: none" } },
|
|
107
|
+
onSelect: L,
|
|
108
|
+
onUpload: l[0] || (l[0] = (s) => e.$emit("upload", s))
|
|
109
|
+
}), {
|
|
110
|
+
header: M(({ files: s, chooseCallback: p, clearCallback: f }) => [
|
|
111
|
+
B("div", {
|
|
112
|
+
class: k([{ "grid-cols-[auto,max-content]": a.withUpload }, "grid gap-3 items-end"])
|
|
113
|
+
}, [
|
|
114
|
+
w(le, g(m(c).wrapper, {
|
|
115
|
+
"error-messages": n.value,
|
|
116
|
+
label: a.label,
|
|
117
|
+
mandatory: a.mandatory
|
|
118
|
+
}), {
|
|
119
|
+
default: M(() => [
|
|
120
|
+
w(se, {
|
|
121
|
+
disabled: a.disabled || d.value,
|
|
122
|
+
"input-class": m(c).input({ state: { fileName: i.value } }).class,
|
|
123
|
+
invalid: R.value,
|
|
124
|
+
"model-value": Array.isArray(i.value) ? i.value.join(", ") : i.value,
|
|
125
|
+
placeholder: a.placeholder,
|
|
126
|
+
onClick: (b) => U(p, f),
|
|
127
|
+
onKeydown: Q((b) => K(b, p, f), ["prevent"])
|
|
128
|
+
}, {
|
|
129
|
+
"addon-left": M(() => [
|
|
130
|
+
h(" Browse")
|
|
131
|
+
]),
|
|
132
|
+
_: 2
|
|
133
|
+
}, 1032, ["disabled", "input-class", "invalid", "model-value", "placeholder", "onClick", "onKeydown"]),
|
|
134
|
+
B("div", {
|
|
135
|
+
class: k([{
|
|
136
|
+
"justify-between": u.errorMessage || r.value,
|
|
137
|
+
"justify-end": (!u.errorMessage || !r.value) && a.validatorMessage
|
|
138
|
+
}, "flex w-full"])
|
|
139
|
+
}, [
|
|
140
|
+
w(oe, {
|
|
141
|
+
class: k(a.validatorMessageClass),
|
|
142
|
+
message: u.errorMessage ?? r.value
|
|
143
|
+
}, null, 8, ["class", "message"]),
|
|
144
|
+
a.fileExtensions || a.fileRequirements ? (v(), S("div", W(g({ key: 0 }, m(c).requirements)), [
|
|
145
|
+
B("small", te, [
|
|
146
|
+
e.fileRequirements ? (v(), S(C, { key: 0 }, [
|
|
147
|
+
h(x(e.fileRequirements), 1)
|
|
148
|
+
], 64)) : (v(), S(C, { key: 1 }, [
|
|
149
|
+
h(x(a.maxFileSize ? `${a.fileExtensions}. max file ${Math.round(a.maxFileSize / re)} MB` : `${a.fileExtensions} file`), 1)
|
|
150
|
+
], 64))
|
|
151
|
+
])
|
|
152
|
+
], 16)) : N("", !0)
|
|
153
|
+
], 2)
|
|
154
|
+
]),
|
|
155
|
+
_: 2
|
|
156
|
+
}, 1040, ["error-messages", "label", "mandatory"]),
|
|
157
|
+
a.withUpload ? (v(), A(ie, g({ key: 0 }, m(c).buttonupload({ props: a }), {
|
|
158
|
+
disabled: a.disabled || d.value || !o.value,
|
|
159
|
+
label: a.uploadLabel,
|
|
160
|
+
onClick: (b) => O(s, f),
|
|
161
|
+
severity: "success",
|
|
162
|
+
type: "button"
|
|
163
|
+
}), null, 16, ["disabled", "label", "onClick"])) : N("", !0)
|
|
164
|
+
], 2)
|
|
165
|
+
]),
|
|
166
|
+
content: M(({ messages: s }) => [
|
|
167
|
+
h(x(P(s)), 1)
|
|
168
|
+
]),
|
|
169
|
+
_: 1
|
|
170
|
+
}, 16, ["file-limit"]));
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
export {
|
|
174
|
+
ye as _
|
|
175
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","../../vendor/primevue-u6FsQONA.system.js","../../vendor/vee-validate-Cc_B-qII.system.js","../assetinfo/AssetInfo-BBgKToRP.system.js","../fieldwrapper/FieldWrapper-DFjw9hA8.system.js","../inputtext/InputText-93zDNfC3.system.js","../button/Button-Okx1_kOu.system.js","../validatormessage/ValidatorMessage-VVfyqlRF.system.js"],function(Q,ue){"use strict";var U,k,$,A,p,j,I,R,P,h,N,v,c,m,y,g,F,_,E,b,S,q,x,L,T,O,D,K,G,Y,H,W;return{setters:[a=>{U=a.defineComponent,k=a.mergeModels,$=a.useModel,A=a.inject,p=a.shallowRef,j=a.ref,I=a.reactive,R=a.computed,P=a.onMounted,h=a.watch,N=a.createBlock,v=a.openBlock,c=a.unref,m=a.mergeProps,y=a.withCtx,g=a.createTextVNode,F=a.toDisplayString,_=a.createElementVNode,E=a.normalizeClass,b=a.createVNode,S=a.createCommentVNode,q=a.withModifiers,x=a.createElementBlock,L=a.normalizeProps,T=a.Fragment},a=>{O=a.k},a=>{D=a.u},a=>{K=a.u},a=>{G=a._},a=>{Y=a._},a=>{H=a._},a=>{W=a._}],execute:function(){const a={class:"'!mt-0 font-light text-xs text-general-500'"},X=1048576,de=Q("_",U({__name:"FileUpload",props:k({accept:{},disabled:{type:Boolean},maxFileSize:{},modelValue:{},multiple:{type:Boolean,default:!1},invalidFileSizeMessage:{},invalidFileTypeMessage:{},label:{default:"Upload File"},withUpload:{type:Boolean,default:!0},uploadLabel:{default:"Upload"},placeholder:{default:"Select File"},fileExtensions:{},fileRequirements:{},uploadFunction:{},useValidator:{type:Boolean},fieldName:{default:"fileUpload"},mandatory:{type:Boolean},useErrorToast:{type:Boolean,default:!0},validatorMessage:{},validatorMessageClass:{}},{modelValue:{},modelModifiers:{}}),emits:k(["select","update:modelValue","upload","error"],["update:modelValue"]),setup(Z,{emit:ee}){const ae=K(),r=$(Z,"modelValue"),l=Z,V=ee,{fileupload:w={}}=A("preset",{}),i=p(),n=p(),o=p(),C=j(),d=I({value:void 0}),le=R(()=>!!d.errorMessage||(u.value?u.value.length>0:!1)),f=p(!1);P(()=>{l.useValidator&&Object.assign(d,D(l.fieldName,e=>se(e))),r.value&&(Array.isArray(r.value)&&l.multiple?(o.value=r.value,i.value=r.value.map(e=>e.name)):r.value instanceof File&&(o.value=r.value,i.value=r.value.name))});const se=e=>{if(typeof l.validatorMessage=="string")return l.validatorMessage;if(typeof l.validatorMessage!="string"){const{empty:s}=l.validatorMessage??{};if(!e&&l.mandatory&&!o.value)return s??!0}return!0},te=e=>{if(!l.useErrorToast&&typeof l.validatorMessage!="string"){const{exceed:s,invalidFormat:t}=l.validatorMessage;e.includes("Invalid file size")&&s?n.value=s:e.includes("Invalid file type")?n.value=t:n.value=void 0}},ie=e=>{var s;try{if(!e.files||e.files.length===0)return;l.multiple?(o.value=e.files,i.value=e.files.map(t=>t.name),V("select",e.files)):(o.value=e.files[0],i.value=(s=e.files[0])==null?void 0:s.name,V("select",e.files[0]))}catch(t){console.error(t)}},J=(e,s)=>{l.disabled||f.value||(u.value=void 0,new Promise((t,B)=>{try{s(),t()}catch(M){B(M)}}).then(()=>{e()}))},oe=async(e,s)=>{try{f.value=!0,l.uploadFunction&&await l.uploadFunction(e),o.value=void 0,i.value=void 0,s(),f.value=!1}catch(t){throw f.value=!1,t}},u=j(),re=e=>{u.value=e},ne=(e,s,t)=>{(e.key==="Enter"||e.key===" ")&&J(s,t)};return h(o,e=>{d.value=e,r.value=e,u.value=void 0,n.value=void 0}),h(r,e=>{Array.isArray(e)&&l.multiple?(o.value=e,i.value=e.map(s=>s.name)):e instanceof File?(o.value=e,i.value=e.name):(o.value=void 0,i.value=void 0),d.value=e,"messages"in C.value&&(C.value.messages=[]),u.value=void 0,n.value=void 0}),h(u,e=>{if(e&&e.length>0){const s=e[0].replace("{2}",l.accept||"").replace("{2.1}",l.fileExtensions||"");s.includes("Invalid file size")&&V("error","FILE_SIZE_TOO_LARGE"),te(s),l.useErrorToast&&ae.add({message:s,severity:"error"}),o.value=void 0,i.value=void 0}else n.value=void 0}),(e,s)=>(v(),N(c(O),m(l,{ref_key:"fileUpload",ref:C,"file-limit":e.multiple?void 0:1,pt:{input:{style:"display: none"}},onSelect:ie,onUpload:s[0]||(s[0]=t=>e.$emit("upload",t))}),{header:y(({files:t,chooseCallback:B,clearCallback:M})=>[_("div",{class:E([{"grid-cols-[auto,max-content]":l.withUpload},"grid gap-3 items-end"])},[b(G,m(c(w).wrapper,{"error-messages":u.value,label:l.label,mandatory:l.mandatory}),{default:y(()=>[b(Y,{disabled:l.disabled||f.value,"input-class":c(w).input({state:{fileName:i.value}}).class,invalid:le.value,"model-value":Array.isArray(i.value)?i.value.join(", "):i.value,placeholder:l.placeholder,onClick:z=>J(B,M),onKeydown:q(z=>ne(z,B,M),["prevent"])},{"addon-left":y(()=>[g(" Browse")]),_:2},1032,["disabled","input-class","invalid","model-value","placeholder","onClick","onKeydown"]),_("div",{class:E([{"justify-between":d.errorMessage||n.value,"justify-end":(!d.errorMessage||!n.value)&&l.validatorMessage},"flex w-full"])},[b(W,{class:E(l.validatorMessageClass),message:d.errorMessage??n.value},null,8,["class","message"]),l.fileExtensions||l.fileRequirements?(v(),x("div",L(m({key:0},c(w).requirements)),[_("small",a,[e.fileRequirements?(v(),x(T,{key:0},[g(F(e.fileRequirements),1)],64)):(v(),x(T,{key:1},[g(F(l.maxFileSize?`${l.fileExtensions}. max file ${Math.round(l.maxFileSize/X)} MB`:`${l.fileExtensions} file`),1)],64))])],16)):S("",!0)],2)]),_:2},1040,["error-messages","label","mandatory"]),l.withUpload?(v(),N(H,m({key:0},c(w).buttonupload({props:l}),{disabled:l.disabled||f.value||!o.value,label:l.uploadLabel,onClick:z=>oe(t,M),severity:"success",type:"button"}),null,16,["disabled","label","onClick"])):S("",!0)],2)]),content:y(({messages:t})=>[g(F(re(t)),1)]),_:1},16,["file-limit"]))}}))}}});
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import { defineComponent as x, ref as E, shallowRef as N, onMounted as q, onBeforeUnmount as G, watch as I, withDirectives as Q, createElementBlock as A, openBlock as f, mergeProps as v, withModifiers as z, unref as w, createElementVNode as X, Fragment as B, renderList as Y, createBlock as _, renderSlot as Z, createVNode as S, vShow as ee, withCtx as te } from "vue";
|
|
2
|
+
import { _ as ae } from "../buttonselecttree/ButtonSelectTree-B-_Iw5sB.es.js";
|
|
3
|
+
import { a as oe } from "../../vendor/vee-validate-RE5RuswC.es.js";
|
|
4
|
+
import { e as p } from "../assetinfo/AssetInfo-CmwgOU74.es.js";
|
|
5
|
+
import { g as R, u as re, s as ne } from "../animation/Animation-COWVilAA.es.js";
|
|
6
|
+
import { _ as D } from "../button/Button-D-MSv_AS.es.js";
|
|
7
|
+
import { _ as le } from "../calendar/Calendar-Df6CnW-l.es.js";
|
|
8
|
+
import { _ as se } from "../dropdown/Dropdown-D4S52rW5.es.js";
|
|
9
|
+
import { _ as ie } from "../inputrangenumber/InputRangeNumber-B1aAoKVj.es.js";
|
|
10
|
+
import { _ as ce } from "../multiselect/MultiSelect-DGhS1EyX.es.js";
|
|
11
|
+
const L = (l) => {
|
|
12
|
+
if (Array.isArray(l)) {
|
|
13
|
+
const [u, a] = l;
|
|
14
|
+
return [
|
|
15
|
+
new Date(u).setHours(0, 0, 0),
|
|
16
|
+
new Date(a ?? u).setHours(23, 59, 59)
|
|
17
|
+
];
|
|
18
|
+
}
|
|
19
|
+
}, ue = (l, u, a) => {
|
|
20
|
+
const s = Object.keys(l), n = {};
|
|
21
|
+
p.emit("multi-select:hide-overlay"), s.forEach((r) => {
|
|
22
|
+
var y;
|
|
23
|
+
const i = Array.isArray(l[r]), $ = typeof l[r] == "string", c = i ? (y = l[r]) == null ? void 0 : y.filter((h) => h != null) : l[r];
|
|
24
|
+
if ((c != null && !i || i && c.length) && !$) {
|
|
25
|
+
if (Array.isArray(c) && c.every(
|
|
26
|
+
(d) => typeof d == "number" && d > 9466848e5 && // Greater than 2000-01-01 00:00:00 UTC (milliseconds)
|
|
27
|
+
!isNaN(new Date(d).getTime())
|
|
28
|
+
// Converts to a valid date
|
|
29
|
+
)) {
|
|
30
|
+
n[r] = JSON.stringify(
|
|
31
|
+
// Adjust the end range time to 23.59.59 and the start to 00.00.00 to fix filtering issue when user only select a date
|
|
32
|
+
L(c)
|
|
33
|
+
);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
n[r] = c != null && c.length ? JSON.stringify(l[r]) : JSON.stringify(c);
|
|
37
|
+
} else
|
|
38
|
+
n[r] = l[r];
|
|
39
|
+
}), p.emit("data-table:apply-filter", {
|
|
40
|
+
tableName: u,
|
|
41
|
+
filter: n
|
|
42
|
+
}), p.emit("data-table:clear-selected-data", {
|
|
43
|
+
tableName: u
|
|
44
|
+
}), a == null || a("apply", n);
|
|
45
|
+
}, me = (l, u, a, s) => {
|
|
46
|
+
const n = {};
|
|
47
|
+
p.emit("multi-select:hide-overlay"), a.forEach((r) => {
|
|
48
|
+
if ("field" in r) {
|
|
49
|
+
const i = R(l, r.field);
|
|
50
|
+
"value" in i && i.value != null && (n[r.field] = i, "matchMode" in i && i.matchMode == "DATE_BETWEEN" && (n[r.field].value = L(
|
|
51
|
+
i.value
|
|
52
|
+
)), Array.isArray(i.value) && !i.value.filter(Boolean).length && delete n[r.field]);
|
|
53
|
+
}
|
|
54
|
+
}), p.emit("data-table:apply-filter", {
|
|
55
|
+
tableName: u,
|
|
56
|
+
filter: n
|
|
57
|
+
}), p.emit("data-table:clear-selected-data", {
|
|
58
|
+
tableName: u
|
|
59
|
+
}), s == null || s("apply", n);
|
|
60
|
+
}, pe = {
|
|
61
|
+
class: "flex items-end justify-end gap-2",
|
|
62
|
+
"data-wv-section": "filteractionbuttons"
|
|
63
|
+
}, de = /* @__PURE__ */ x({
|
|
64
|
+
inheritAttrs: !1,
|
|
65
|
+
__name: "FilterContainer",
|
|
66
|
+
props: {
|
|
67
|
+
tableName: { default: "datatable" },
|
|
68
|
+
fieldsPerRow: { default: 4 },
|
|
69
|
+
fields: {},
|
|
70
|
+
static: { type: Boolean }
|
|
71
|
+
},
|
|
72
|
+
emits: ["apply"],
|
|
73
|
+
setup(l, { emit: u }) {
|
|
74
|
+
const a = l, s = u, { locale: n } = re("FilterContainer"), { resetForm: r, handleSubmit: i, setValues: $ } = oe(), c = E({}), y = E({}), h = N(), d = E(null), k = N(!1), M = N(0);
|
|
75
|
+
q(() => {
|
|
76
|
+
P(), p.on("show-filter", T), p.on("data-table:updated", C), K();
|
|
77
|
+
}), G(() => {
|
|
78
|
+
p.off("show-filter", T), p.off("data-table:updated", C);
|
|
79
|
+
});
|
|
80
|
+
const T = (t) => {
|
|
81
|
+
t.tableName === a.tableName && (k.value = t.show);
|
|
82
|
+
}, C = (t) => {
|
|
83
|
+
t.tableName === a.tableName && (h.value = t.data);
|
|
84
|
+
}, O = async (t, o, e = {}) => {
|
|
85
|
+
if (a.static && !t)
|
|
86
|
+
y.value[o] = J(o);
|
|
87
|
+
else
|
|
88
|
+
try {
|
|
89
|
+
c.value[o] = !0;
|
|
90
|
+
const m = { [o]: !0, ...e }, g = await (t == null ? void 0 : t(m));
|
|
91
|
+
g && (y.value[o] = g);
|
|
92
|
+
} catch (m) {
|
|
93
|
+
console.error(m);
|
|
94
|
+
} finally {
|
|
95
|
+
c.value[o] = !1;
|
|
96
|
+
}
|
|
97
|
+
}, J = (t) => {
|
|
98
|
+
const o = /* @__PURE__ */ new Set();
|
|
99
|
+
if (h.value)
|
|
100
|
+
for (let e = 0; e < h.value.length; e++) {
|
|
101
|
+
const m = R(h.value[e], t);
|
|
102
|
+
o.add(m);
|
|
103
|
+
}
|
|
104
|
+
return Array.from(o).map((e) => ({ label: e, value: e }));
|
|
105
|
+
}, P = () => {
|
|
106
|
+
if (d.value) {
|
|
107
|
+
const { children: t } = d.value, o = d.value.childElementCount, e = o % a.fieldsPerRow;
|
|
108
|
+
let [m, g] = [1, 1];
|
|
109
|
+
for (const V in Array.from({ length: o })) {
|
|
110
|
+
const U = Number(V) === o - 1;
|
|
111
|
+
t[V].setAttribute(
|
|
112
|
+
"style",
|
|
113
|
+
`grid-area: ${m}/${U && e ? a.fieldsPerRow : g}`
|
|
114
|
+
), ++g > a.fieldsPerRow && (g = 1, m++);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}, W = () => {
|
|
118
|
+
r(), M.value++;
|
|
119
|
+
}, F = i((t) => {
|
|
120
|
+
a.static ? me(t, a.tableName, a.fields, s) : ue(t, a.tableName, s);
|
|
121
|
+
}), j = (t, o) => {
|
|
122
|
+
var e;
|
|
123
|
+
switch (t.type) {
|
|
124
|
+
case "rangenumber":
|
|
125
|
+
return t.field ? `${t.field}.matchMode` : `${(e = t.fields) == null ? void 0 : e[o]}.matchMode`;
|
|
126
|
+
case "multiselect":
|
|
127
|
+
case "dropdown":
|
|
128
|
+
case "calendar":
|
|
129
|
+
case "category":
|
|
130
|
+
case "group":
|
|
131
|
+
return `${t.field}.matchMode`;
|
|
132
|
+
}
|
|
133
|
+
}, H = (t) => (() => {
|
|
134
|
+
switch (t.type) {
|
|
135
|
+
case "rangenumber":
|
|
136
|
+
return "BETWEEN";
|
|
137
|
+
case "multiselect":
|
|
138
|
+
case "category":
|
|
139
|
+
case "group":
|
|
140
|
+
return "IN";
|
|
141
|
+
case "dropdown":
|
|
142
|
+
return "EQUALS";
|
|
143
|
+
case "calendar":
|
|
144
|
+
return "DATE_BETWEEN";
|
|
145
|
+
}
|
|
146
|
+
})(), K = () => {
|
|
147
|
+
if (a.static) {
|
|
148
|
+
const t = {};
|
|
149
|
+
a.fields.forEach((o) => {
|
|
150
|
+
ne(
|
|
151
|
+
t,
|
|
152
|
+
j(o),
|
|
153
|
+
H(o)
|
|
154
|
+
);
|
|
155
|
+
}), $(t);
|
|
156
|
+
}
|
|
157
|
+
}, b = (t, o) => {
|
|
158
|
+
switch (t.type) {
|
|
159
|
+
case "rangenumber":
|
|
160
|
+
return t.field ? a.static ? `${t.field}.value.${o}` : `${t.field}` : a.static ? `${t.fields[o]}.value` : t.fields[o];
|
|
161
|
+
case "multiselect":
|
|
162
|
+
case "dropdown":
|
|
163
|
+
case "calendar":
|
|
164
|
+
case "category":
|
|
165
|
+
case "group":
|
|
166
|
+
return a.static ? `${t.field}.value` : `${t.field}`;
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
return I(() => a.fields, P), (t, o) => Q((f(), A("form", v({
|
|
170
|
+
ref_key: "container",
|
|
171
|
+
ref: d
|
|
172
|
+
}, t.$preset.filtercontainer.root, {
|
|
173
|
+
style: `grid-template-columns: repeat(${t.fieldsPerRow}, 1fr)`,
|
|
174
|
+
onSubmit: o[0] || (o[0] = z(
|
|
175
|
+
//@ts-ignore
|
|
176
|
+
(...e) => w(F) && w(F)(...e),
|
|
177
|
+
["prevent"]
|
|
178
|
+
)),
|
|
179
|
+
"data-wv-name": "filtercontainer"
|
|
180
|
+
}), [
|
|
181
|
+
(f(!0), A(B, null, Y(t.fields, (e) => (f(), A(B, {
|
|
182
|
+
key: JSON.stringify(e) + M.value
|
|
183
|
+
}, [
|
|
184
|
+
e.type == "rangenumber" ? (f(), _(ie, v({
|
|
185
|
+
key: 0,
|
|
186
|
+
ref_for: !0
|
|
187
|
+
}, e, {
|
|
188
|
+
mandatory: !1,
|
|
189
|
+
"max-field-name": b(e, 1),
|
|
190
|
+
"min-field-name": b(e, 0),
|
|
191
|
+
"show-optional-text": !1,
|
|
192
|
+
"use-validator": ""
|
|
193
|
+
}), null, 16, ["max-field-name", "min-field-name"])) : e.type == "multiselect" ? (f(), _(ce, v({
|
|
194
|
+
key: 1,
|
|
195
|
+
ref_for: !0
|
|
196
|
+
}, e, {
|
|
197
|
+
"field-name": b(e),
|
|
198
|
+
loading: c.value[e.optionField ?? e.field],
|
|
199
|
+
mandatory: !1,
|
|
200
|
+
options: y.value[e.optionField ?? e.field],
|
|
201
|
+
"show-optional-text": !1,
|
|
202
|
+
onShow: (m) => O(
|
|
203
|
+
e.fetchOptionFn,
|
|
204
|
+
e.optionField ?? e.field,
|
|
205
|
+
e.params
|
|
206
|
+
),
|
|
207
|
+
"option-label": "label",
|
|
208
|
+
"option-value": "value",
|
|
209
|
+
"use-validator": ""
|
|
210
|
+
}), null, 16, ["field-name", "loading", "options", "onShow"])) : e.type == "dropdown" ? (f(), _(se, v({
|
|
211
|
+
key: 2,
|
|
212
|
+
ref_for: !0
|
|
213
|
+
}, e, {
|
|
214
|
+
"field-name": b(e),
|
|
215
|
+
loading: c.value[e.field],
|
|
216
|
+
mandatory: !1,
|
|
217
|
+
options: y.value[e.optionField ?? e.field],
|
|
218
|
+
"show-optional-text": !1,
|
|
219
|
+
onShow: (m) => O(
|
|
220
|
+
e.fetchOptionFn,
|
|
221
|
+
e.optionField ?? e.field,
|
|
222
|
+
e.params
|
|
223
|
+
),
|
|
224
|
+
"option-label": "label",
|
|
225
|
+
"option-value": "value",
|
|
226
|
+
"use-validator": ""
|
|
227
|
+
}), null, 16, ["field-name", "loading", "options", "onShow"])) : e.type === "calendar" ? (f(), _(le, v({
|
|
228
|
+
key: 3,
|
|
229
|
+
ref_for: !0
|
|
230
|
+
}, e, {
|
|
231
|
+
"field-name": b(e),
|
|
232
|
+
mandatory: !1,
|
|
233
|
+
"show-optional-text": !1,
|
|
234
|
+
"selection-mode": "range",
|
|
235
|
+
"use-validator": ""
|
|
236
|
+
}), null, 16, ["field-name"])) : Z(t.$slots, "field", {
|
|
237
|
+
key: 4,
|
|
238
|
+
field: e,
|
|
239
|
+
fieldName: b(e)
|
|
240
|
+
})
|
|
241
|
+
], 64))), 128)),
|
|
242
|
+
X("div", pe, [
|
|
243
|
+
S(D, {
|
|
244
|
+
label: w(n).clearFieldText,
|
|
245
|
+
onClick: W,
|
|
246
|
+
"data-wv-section": "clearbutton",
|
|
247
|
+
text: ""
|
|
248
|
+
}, null, 8, ["label"]),
|
|
249
|
+
S(D, {
|
|
250
|
+
label: w(n).applyText,
|
|
251
|
+
onClick: w(F),
|
|
252
|
+
"data-wv-section": "applybutton",
|
|
253
|
+
severity: "success"
|
|
254
|
+
}, null, 8, ["label", "onClick"])
|
|
255
|
+
])
|
|
256
|
+
], 16)), [
|
|
257
|
+
[ee, k.value]
|
|
258
|
+
]);
|
|
259
|
+
}
|
|
260
|
+
}), Ee = /* @__PURE__ */ x({
|
|
261
|
+
__name: "FilterContainer",
|
|
262
|
+
setup(l) {
|
|
263
|
+
return (u, a) => (f(), _(de, v({
|
|
264
|
+
fields: u.$attrs.fields
|
|
265
|
+
}, u.$attrs), {
|
|
266
|
+
field: te(({ field: s, fieldName: n }) => [
|
|
267
|
+
S(ae, v(s, {
|
|
268
|
+
"field-data-key": s.fieldDataKey ?? "key",
|
|
269
|
+
"field-label": s.label,
|
|
270
|
+
"field-name": n,
|
|
271
|
+
label: s.buttonLabel,
|
|
272
|
+
mandatory: !1,
|
|
273
|
+
params: s.params,
|
|
274
|
+
"show-optional-text": !1,
|
|
275
|
+
"use-validator": ""
|
|
276
|
+
}), null, 16, ["field-data-key", "field-label", "field-name", "label", "params"])
|
|
277
|
+
]),
|
|
278
|
+
_: 1
|
|
279
|
+
}, 16, ["fields"]));
|
|
280
|
+
}
|
|
281
|
+
});
|
|
282
|
+
export {
|
|
283
|
+
Ee as _
|
|
284
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","../buttonselecttree/ButtonSelectTree-Cbq1oeVK.system.js","../../vendor/vee-validate-Cc_B-qII.system.js","../assetinfo/AssetInfo-BBgKToRP.system.js","../animation/Animation-6756VN9N.system.js","../button/Button-Okx1_kOu.system.js","../calendar/Calendar-7yBKZsvj.system.js","../dropdown/Dropdown-DuvNYyq0.system.js","../inputrangenumber/InputRangeNumber-C28xgFBY.system.js","../multiselect/MultiSelect-DKFYq47E.system.js"],function(se,ye){"use strict";var A,$,E,D,V,P,j,N,m,y,O,b,R,k,x,g,L,S,J,W,I,U,f,M,H,K,B,q,G,Q,z;return{setters:[t=>{A=t.defineComponent,$=t.ref,E=t.shallowRef,D=t.onMounted,V=t.onBeforeUnmount,P=t.watch,j=t.withDirectives,N=t.createElementBlock,m=t.openBlock,y=t.mergeProps,O=t.withModifiers,b=t.unref,R=t.createElementVNode,k=t.Fragment,x=t.renderList,g=t.createBlock,L=t.renderSlot,S=t.createVNode,J=t.vShow,W=t.withCtx},t=>{I=t._},t=>{U=t.a},t=>{f=t.e},t=>{M=t.g,H=t.u,K=t.s},t=>{B=t._},t=>{q=t._},t=>{G=t._},t=>{Q=t._},t=>{z=t._}],execute:function(){const t=l=>{if(Array.isArray(l)){const[p,n]=l;return[new Date(p).setHours(0,0,0),new Date(n??p).setHours(23,59,59)]}},re=(l,p,n)=>{const i=Object.keys(l),o={};f.emit("multi-select:hide-overlay"),i.forEach(r=>{var v;const c=Array.isArray(l[r]),C=typeof l[r]=="string",u=c?(v=l[r])==null?void 0:v.filter(w=>w!=null):l[r];if((u!=null&&!c||c&&u.length)&&!C){if(Array.isArray(u)&&u.every(h=>typeof h=="number"&&h>9466848e5&&!isNaN(new Date(h).getTime()))){o[r]=JSON.stringify(t(u));return}o[r]=u!=null&&u.length?JSON.stringify(l[r]):JSON.stringify(u)}else o[r]=l[r]}),f.emit("data-table:apply-filter",{tableName:p,filter:o}),f.emit("data-table:clear-selected-data",{tableName:p}),n==null||n("apply",o)},oe=(l,p,n,i)=>{const o={};f.emit("multi-select:hide-overlay"),n.forEach(r=>{if("field"in r){const c=M(l,r.field);"value"in c&&c.value!=null&&(o[r.field]=c,"matchMode"in c&&c.matchMode=="DATE_BETWEEN"&&(o[r.field].value=t(c.value)),Array.isArray(c.value)&&!c.value.filter(Boolean).length&&delete o[r.field])}}),f.emit("data-table:apply-filter",{tableName:p,filter:o}),f.emit("data-table:clear-selected-data",{tableName:p}),i==null||i("apply",o)},le={class:"flex items-end justify-end gap-2","data-wv-section":"filteractionbuttons"},ie=A({inheritAttrs:!1,__name:"FilterContainer",props:{tableName:{default:"datatable"},fieldsPerRow:{default:4},fields:{},static:{type:Boolean}},emits:["apply"],setup(l,{emit:p}){const n=l,i=p,{locale:o}=H("FilterContainer"),{resetForm:r,handleSubmit:c,setValues:C}=U(),u=$({}),v=$({}),w=E(),h=$(null),X=E(!1),Y=E(0);D(()=>{ae(),f.on("show-filter",Z),f.on("data-table:updated",ee),de()}),V(()=>{f.off("show-filter",Z),f.off("data-table:updated",ee)});const Z=a=>{a.tableName===n.tableName&&(X.value=a.show)},ee=a=>{a.tableName===n.tableName&&(w.value=a.data)},te=async(a,s,e={})=>{if(n.static&&!a)v.value[s]=ce(s);else try{u.value[s]=!0;const d={[s]:!0,...e},F=await(a==null?void 0:a(d));F&&(v.value[s]=F)}catch(d){console.error(d)}finally{u.value[s]=!1}},ce=a=>{const s=new Set;if(w.value)for(let e=0;e<w.value.length;e++){const d=M(w.value[e],a);s.add(d)}return Array.from(s).map(e=>({label:e,value:e}))},ae=()=>{if(h.value){const{children:a}=h.value,s=h.value.childElementCount,e=s%n.fieldsPerRow;let[d,F]=[1,1];for(const ne in Array.from({length:s})){const me=Number(ne)===s-1;a[ne].setAttribute("style",`grid-area: ${d}/${me&&e?n.fieldsPerRow:F}`),++F>n.fieldsPerRow&&(F=1,d++)}}},ue=()=>{r(),Y.value++},T=c(a=>{n.static?oe(a,n.tableName,n.fields,i):re(a,n.tableName,i)}),pe=(a,s)=>{var e;switch(a.type){case"rangenumber":return a.field?`${a.field}.matchMode`:`${(e=a.fields)==null?void 0:e[s]}.matchMode`;case"multiselect":case"dropdown":case"calendar":case"category":case"group":return`${a.field}.matchMode`}},fe=a=>(()=>{switch(a.type){case"rangenumber":return"BETWEEN";case"multiselect":case"category":case"group":return"IN";case"dropdown":return"EQUALS";case"calendar":return"DATE_BETWEEN"}})(),de=()=>{if(n.static){const a={};n.fields.forEach(s=>{K(a,pe(s),fe(s))}),C(a)}},_=(a,s)=>{switch(a.type){case"rangenumber":return a.field?n.static?`${a.field}.value.${s}`:`${a.field}`:n.static?`${a.fields[s]}.value`:a.fields[s];case"multiselect":case"dropdown":case"calendar":case"category":case"group":return n.static?`${a.field}.value`:`${a.field}`}};return P(()=>n.fields,ae),(a,s)=>j((m(),N("form",y({ref_key:"container",ref:h},a.$preset.filtercontainer.root,{style:`grid-template-columns: repeat(${a.fieldsPerRow}, 1fr)`,onSubmit:s[0]||(s[0]=O((...e)=>b(T)&&b(T)(...e),["prevent"])),"data-wv-name":"filtercontainer"}),[(m(!0),N(k,null,x(a.fields,e=>(m(),N(k,{key:JSON.stringify(e)+Y.value},[e.type=="rangenumber"?(m(),g(Q,y({key:0,ref_for:!0},e,{mandatory:!1,"max-field-name":_(e,1),"min-field-name":_(e,0),"show-optional-text":!1,"use-validator":""}),null,16,["max-field-name","min-field-name"])):e.type=="multiselect"?(m(),g(z,y({key:1,ref_for:!0},e,{"field-name":_(e),loading:u.value[e.optionField??e.field],mandatory:!1,options:v.value[e.optionField??e.field],"show-optional-text":!1,onShow:d=>te(e.fetchOptionFn,e.optionField??e.field,e.params),"option-label":"label","option-value":"value","use-validator":""}),null,16,["field-name","loading","options","onShow"])):e.type=="dropdown"?(m(),g(G,y({key:2,ref_for:!0},e,{"field-name":_(e),loading:u.value[e.field],mandatory:!1,options:v.value[e.optionField??e.field],"show-optional-text":!1,onShow:d=>te(e.fetchOptionFn,e.optionField??e.field,e.params),"option-label":"label","option-value":"value","use-validator":""}),null,16,["field-name","loading","options","onShow"])):e.type==="calendar"?(m(),g(q,y({key:3,ref_for:!0},e,{"field-name":_(e),mandatory:!1,"show-optional-text":!1,"selection-mode":"range","use-validator":""}),null,16,["field-name"])):L(a.$slots,"field",{key:4,field:e,fieldName:_(e)})],64))),128)),R("div",le,[S(B,{label:b(o).clearFieldText,onClick:ue,"data-wv-section":"clearbutton",text:""},null,8,["label"]),S(B,{label:b(o).applyText,onClick:b(T),"data-wv-section":"applybutton",severity:"success"},null,8,["label","onClick"])])],16)),[[J,X.value]])}}),he=se("_",A({__name:"FilterContainer",setup(l){return(p,n)=>(m(),g(ie,y({fields:p.$attrs.fields},p.$attrs),{field:W(({field:i,fieldName:o})=>[S(I,y(i,{"field-data-key":i.fieldDataKey??"key","field-label":i.label,"field-name":o,label:i.buttonLabel,mandatory:!1,params:i.params,"show-optional-text":!1,"use-validator":""}),null,16,["field-data-key","field-label","field-name","label","params"])]),_:1},16,["fields"]))}}))}}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["vue","../../vendor/vee-validate-Cc_B-qII.system.js","../button/Button-Okx1_kOu.system.js","../checkbox/Checkbox-CCtItmVW.system.js","../validatormessage/ValidatorMessage-VVfyqlRF.system.js"],function(ce,he){"use strict";var j,M,m,T,i,N,B,o,s,l,R,b,u,A,V,C,O,W,H,p,z,y,D,q;return{setters:[e=>{j=e.defineComponent,M=e.onMounted,m=e.ref,T=e.inject,i=e.shallowRef,N=e.provide,B=e.createElementBlock,o=e.openBlock,s=e.mergeProps,l=e.unref,R=e.withModifiers,b=e.createElementVNode,u=e.createCommentVNode,A=e.renderSlot,V=e.normalizeProps,C=e.createVNode,O=e.withDirectives,W=e.vShow,H=e.guardReactiveProps,p=e.createBlock},e=>{z=e.a},e=>{y=e._},e=>{D=e._},e=>{q=e._}],execute:function(){const e=ce("_",j({__name:"Form",props:{buttonsTemplate:{},disableSubmit:{type:Boolean},cancelBtnLabel:{default:"Batal"},clearBtnLabel:{default:"Bersihkan Field"},columnPerRow:{},hideFooter:{type:Boolean},hideStayCheckbox:{type:Boolean},invalid:{type:Boolean},resetAfterSubmit:{type:Boolean,default:!0},saveBtnLabel:{default:"Simpan"},submitBtnLabel:{default:"Simpan"},stayCheckboxLabel:{default:"Tetap di halaman ini"},validatorMessage:{default:"Please input all required field!"},validateOnSave:{type:Boolean,default:!1},cancelBtnSeverity:{default:"secondary"},saveBtnSeverity:{default:"success"},submitBtnSeverity:{default:"success"}},emits:["cancel","clear","save","submit"],setup(fe,{expose:ve,emit:de}){const r=fe,h=de;M(()=>{if($.value){const t=r.columnPerRow??1;$.value.style.gridTemplateColumns=`repeat(${t}, minmax(0, 1fr))`,x()}});const n=T("preset",{}).form,{handleSubmit:me,values:w,resetForm:I,errors:be,resetField:pe,setValues:ye,setFieldValue:ke,setErrors:Se}=z(),k=i(!1),K=m(),c=i(!1),U=i(!1),F=i(0),L=m(),v=i(!1),P=i(!1),$=m(null),E=m(null);N("isSubmitting",v);const x=()=>{var t;if(L.value){const a=(t=L.value)==null?void 0:t.offsetHeight;E.value&&(E.value.style.height=`calc(100% + ${a+20}px)`)}},G=()=>{v.value=!0,U.value||(c.value=!0)},J=()=>{v.value=!0,P.value=!0,r.validateOnSave?(U.value||(c.value=!0),g()):Be()},g=me(t=>{if(!r.invalid){const a=X(t),f={stayAfterSubmit:k.value,formValues:a};P.value?h("save",f):h("submit",f),c.value=!1,P.value=!1,r.resetAfterSubmit&&(F.value+=1,I())}v.value=!1},()=>{v.value=!1}),Be=()=>{const t=X(w),a={stayAfterSubmit:k.value,formValues:t};h("save",a),v.value=!1},Q=()=>{I(),F.value++,h("clear"),c.value=!1},X=t=>{const a=t,f=Object.keys(a);for(const d of f)typeof a[d]=="string"&&(a[d]=a[d].trim());return a};return ve({stayAfterSubmit:k,submit:g,onSubmitClicked:G,onSaveClicked:J,showValidator:c,formElement:K,clearField:Q,resetField:pe,errors:be,setOuterFieldsWrapperHeight:x,setValues:ye,setFieldValue:ke,setErrors:Se,values:w}),(t,a)=>{var f,d,Y,Z,_,ee,te,ae,le,se,ne,re,oe,ie,ue;return o(),B("form",s({ref_key:"formElement",ref:K},(f=l(n))==null?void 0:f.root({props:r}),{onInput:a[2]||(a[2]=S=>c.value=!1),onSubmit:a[3]||(a[3]=R((...S)=>l(g)&&l(g)(...S),["prevent"]))}),[b("div",{ref_key:"outerFieldsWrapper",ref:E},[b("div",s({ref_key:"fieldsWrapper",ref:$},(d=l(n))==null?void 0:d["fields-wrapper"]),[A(t.$slots,"fields",{key:F.value,formValues:l(w)})],16)],512),t.hideFooter?u("",!0):(o(),B("div",s({key:0,ref_key:"footer",ref:L},(Y=l(n))==null?void 0:Y.footer),[t.hideStayCheckbox?u("",!0):(o(),B("div",V(s({key:0},(Z=l(n))==null?void 0:Z.staycheckbox)),[C(D,{modelValue:k.value,"onUpdate:modelValue":a[0]||(a[0]=S=>k.value=S),label:t.stayCheckboxLabel},null,8,["modelValue","label"])],16)),b("div",s({id:"footer-actions-wrapper"},(_=l(n))==null?void 0:_["action-buttons"]),[O(C(q,s((ee=l(n))==null?void 0:ee["validator-message"],{message:t.validatorMessage}),null,16,["message"]),[[W,c.value||r.invalid]]),b("div",V(H((te=l(n))==null?void 0:te["button-wrapper"])),[(ae=r.buttonsTemplate)!=null&&ae.includes("cancel")?(o(),p(y,s({key:0},(le=l(n))==null?void 0:le["cancel-button"],{label:t.cancelBtnLabel,severity:t.cancelBtnSeverity,onClick:a[1]||(a[1]=S=>t.$emit("cancel")),"data-test":"cancel-button",text:"",type:"button"}),null,16,["label","severity"])):u("",!0),(se=r.buttonsTemplate)!=null&&se.includes("clear")?(o(),p(y,s({key:1},(ne=l(n))==null?void 0:ne["clear-button"],{label:t.clearBtnLabel,onClick:Q,text:"",type:"button"}),null,16,["label"])):u("",!0),(re=r.buttonsTemplate)!=null&&re.includes("save")?(o(),p(y,s({key:2},(oe=l(n))==null?void 0:oe["save-button"],{label:t.saveBtnLabel,severity:t.saveBtnSeverity,onClick:J,outlined:"",type:"button"}),null,16,["label","severity"])):u("",!0),(ie=r.buttonsTemplate)!=null&&ie.includes("submit")?(o(),p(y,s({key:3},(ue=l(n))==null?void 0:ue["submit-button"],{disabled:t.disableSubmit,label:t.submitBtnLabel,severity:t.submitBtnSeverity,onClick:G,type:"submit"}),null,16,["disabled","label","severity"])):u("",!0)],16)],16)],16))],16)}}}))}}});
|