@templatical/editor 0.49.0 → 0.51.0
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/README.md +4 -2
- package/dist/AiAltTextPopover-BZQ95GXL.js +106 -0
- package/dist/AiAltTextReview-DoBEudnE.js +206 -0
- package/dist/AiChatPanel-Bs6sES3b.js +550 -0
- package/dist/AiHeaderMenu-BEaTazx4.js +36 -0
- package/dist/AiPanels-CfN7A-ZA.js +33 -0
- package/dist/AiRewriteMenu-C3ZfDDYy.js +276 -0
- package/dist/{BlockIssueBadge-BdpJwim0.js → BlockIssueBadge-CKwZ1Vgn.js} +11 -11
- package/dist/{BlockPreviewCanvas-D_sowkf0.js → BlockPreviewCanvas-BXNLLLYi.js} +33 -33
- package/dist/CloudHeaderExtras-CsJMEiyN.js +23 -0
- package/dist/{CloudPanels-1hwFiJ0G.js → CloudPanels-B4F5m7vy.js} +66 -85
- package/dist/{CollaborationNotices-BWpKzueF.js → CollaborationNotices-CNuDp7Y2.js} +19 -16
- package/dist/{CollaboratorBar-D87phJsw.js → CollaboratorBar-BtHPiuHq.js} +22 -22
- package/dist/{CommentsPanel-BUvUzO3T.js → CommentsPanel-CyCM-BvT.js} +4 -4
- package/dist/CommentsSidebar-Ca3DyFOX.js +500 -0
- package/dist/{cdn/chunks/CountdownBlock-DB4JNdqh.js → CountdownBlock-DR4Xm2-T.js} +24 -26
- package/dist/{CountdownToolbar-CLMIwfK7.js → CountdownToolbar-CEIMPojJ.js} +55 -55
- package/dist/IssuesPanel-C8nMUccy.js +360 -0
- package/dist/{LoadingTrack-BXOptf5g.js → LoadingTrack-B0RKQWq3.js} +2 -2
- package/dist/{LogicTagInsertButton-CR5E4jSG.js → LogicTagInsertButton-CqfU52CO.js} +273 -268
- package/dist/{cdn/chunks/MediaEditModal-DD0SZ-S3.js → MediaEditModal-DHtkZ4OU.js} +202 -186
- package/dist/{MediaPanels-BVXDkqtH.js → MediaPanels-CGcOB2pR.js} +4 -4
- package/dist/{MergeTagInput-BEw_r0PJ.js → MergeTagInput-YnEkorTZ.js} +25 -25
- package/dist/{MergeTagModeToggle-CJTpFmVd.js → MergeTagModeToggle-Dhb1DAcQ.js} +40 -40
- package/dist/MergeTagTextarea-e4lnwtqZ.js +70 -0
- package/dist/ParagraphEditor-B6NK0ytw.js +799 -0
- package/dist/{RestoreVersionDialog-BaDpy3cL.js → RestoreVersionDialog-Bq_IGOLJ.js} +21 -21
- package/dist/{RichTextEditorContent-CsvniFlI.js → RichTextEditorContent-AOM6fylS.js} +48 -48
- package/dist/{SaveBlockDialog-DzWURF_e.js → SaveBlockDialog-C8GngfQx.js} +87 -87
- package/dist/{cdn/chunks/SavedBlocksBrowserModal-BMtyUrUP.js → SavedBlocksBrowserModal-wnkvxpm_.js} +102 -99
- package/dist/{SavedBlocksPanels-B3Af8ns2.js → SavedBlocksPanels-C2s3q0pJ.js} +9 -9
- package/dist/{SavedBlocksPickBar-Dj11-Lqp.js → SavedBlocksPickBar-BjcTiV87.js} +13 -13
- package/dist/TemplateSettings-BVBWpiDU.js +237 -0
- package/dist/{TestEmailModal-BeRYV3eg.js → TestEmailModal-SyhO9bn3.js} +57 -57
- package/dist/{TestEmailPanel-B8c3fQi2.js → TestEmailPanel-BDd2Rtav.js} +4 -4
- package/dist/{TitleEditor-CvpNUoAp.js → TitleEditor-pxD53y_l.js} +75 -75
- package/dist/ToggleSwitch-D51U9cmR.js +37 -0
- package/dist/{Toolbar-BadDSkkF.js → Toolbar-CZSPZYbj.js} +1138 -1138
- package/dist/{TplModal-BZgi9Tes.js → TplModal-DCzBzicE.js} +19 -19
- package/dist/{VersionHistoryMenu-BRlcQ8wX.js → VersionHistoryMenu-BQeWPT85.js} +35 -35
- package/dist/{VersionHistoryPanels-DGkllN3a.js → VersionHistoryPanels-BBm7YbRQ.js} +5 -5
- package/dist/{VersionPreviewBanner-F-811aps.js → VersionPreviewBanner-DUGF0tUJ.js} +9 -9
- package/dist/WrapperBlock-BO619LAb.js +45 -0
- package/dist/aiErrors-D5UOoYOt.js +41 -0
- package/dist/aiImageContext-BH4Ss1h3.js +48 -0
- package/dist/aiRewritePreview-DLGM05Ge.js +44 -0
- package/dist/{blockTypeIcons-CayLluou.js → blockTypeIcons-NzaYvAI4.js} +15 -14
- package/dist/bundle-stats.json +8 -8
- package/dist/{cdn/chunks/ca-DSJwJ5ov.js → ca-C7mTzW1r.js} +130 -13
- package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js +107 -0
- package/dist/cdn/chunks/AiAltTextPopover-CQu0Q_ZX.js.map +1 -0
- package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js +207 -0
- package/dist/cdn/chunks/AiAltTextReview-CI2HbWfn.js.map +1 -0
- package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js +476 -0
- package/dist/cdn/chunks/AiChatPanel-BYqn1bKu.js.map +1 -0
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js +37 -0
- package/dist/cdn/chunks/AiHeaderMenu-oldAAFyL.js.map +1 -0
- package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js +34 -0
- package/dist/cdn/chunks/AiPanels-CIFKQv8Y.js.map +1 -0
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js +208 -0
- package/dist/cdn/chunks/AiRewriteMenu-Bhh71zcc.js.map +1 -0
- package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js → BlockIssueBadge-DAn2vsMJ.js} +13 -13
- package/dist/cdn/chunks/{BlockIssueBadge-D1VBS_6x.js.map → BlockIssueBadge-DAn2vsMJ.js.map} +1 -1
- package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js → BlockPreviewCanvas-D0--EQkP.js} +38 -38
- package/dist/cdn/chunks/{BlockPreviewCanvas-m2tWRyWv.js.map → BlockPreviewCanvas-D0--EQkP.js.map} +1 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js +25 -0
- package/dist/cdn/chunks/CloudHeaderExtras-DaUU8P8R.js.map +1 -0
- package/dist/cdn/chunks/{CloudPanels-XufhBZYF.js → CloudPanels-C3jsxo_f.js} +52 -71
- package/dist/cdn/chunks/CloudPanels-C3jsxo_f.js.map +1 -0
- package/dist/cdn/chunks/{CollaborationNotices-CBvKEj1Q.js → CollaborationNotices-DjRI8gvs.js} +23 -20
- package/dist/cdn/chunks/CollaborationNotices-DjRI8gvs.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js → CollaboratorBar-Dfzm6A9A.js} +20 -20
- package/dist/cdn/chunks/{CollaboratorBar-DWW54Bn_.js.map → CollaboratorBar-Dfzm6A9A.js.map} +1 -1
- package/dist/cdn/chunks/CommentsPanel-CSO79OeX.js +20 -0
- package/dist/cdn/chunks/{CommentsPanel-R8YLLO3v.js.map → CommentsPanel-CSO79OeX.js.map} +1 -1
- package/dist/cdn/chunks/CommentsSidebar-CCvplq1Z.js +470 -0
- package/dist/cdn/chunks/{CommentsSidebar-96NZHVq3.js.map → CommentsSidebar-CCvplq1Z.js.map} +1 -1
- package/dist/{CountdownBlock-DPQXWRvU.js → cdn/chunks/CountdownBlock-C6USdwk3.js} +19 -17
- package/dist/cdn/chunks/{CountdownBlock-DB4JNdqh.js.map → CountdownBlock-C6USdwk3.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js → CountdownToolbar-Cjud2Tos.js} +70 -70
- package/dist/cdn/chunks/{CountdownToolbar-tmiTPEXm.js.map → CountdownToolbar-Cjud2Tos.js.map} +1 -1
- package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js +340 -0
- package/dist/cdn/chunks/IssuesPanel-BaWHPDxZ.js.map +1 -0
- package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js → LoadingTrack-BIcL4NiY.js} +2 -2
- package/dist/cdn/chunks/{LoadingTrack-YU44CM8X.js.map → LoadingTrack-BIcL4NiY.js.map} +1 -1
- package/dist/cdn/chunks/{LogicTagInsertButton-BJ2t2vxC.js → LogicTagInsertButton-CsL2JDOG.js} +367 -362
- package/dist/cdn/chunks/LogicTagInsertButton-CsL2JDOG.js.map +1 -0
- package/dist/{MediaEditModal-C_wxoUMG.js → cdn/chunks/MediaEditModal-BuHCiyMu.js} +544 -560
- package/dist/cdn/chunks/MediaEditModal-BuHCiyMu.js.map +1 -0
- package/dist/cdn/chunks/MediaPanels-DAgUf_T1.js +45 -0
- package/dist/cdn/chunks/{MediaPanels-CkdJ_kGp.js.map → MediaPanels-DAgUf_T1.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js → MergeTagInput-C8U-7LxL.js} +33 -33
- package/dist/cdn/chunks/{MergeTagInput-7wXX71DH.js.map → MergeTagInput-C8U-7LxL.js.map} +1 -1
- package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js → MergeTagModeToggle-Mm-p0A52.js} +41 -41
- package/dist/cdn/chunks/{MergeTagModeToggle-r9vHH4u_.js.map → MergeTagModeToggle-Mm-p0A52.js.map} +1 -1
- package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js +72 -0
- package/dist/cdn/chunks/MergeTagTextarea-DuLScsWM.js.map +1 -0
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js +634 -0
- package/dist/cdn/chunks/ParagraphEditor-CqSj6Ayz.js.map +1 -0
- package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js → RestoreVersionDialog-CdA5osuA.js} +25 -25
- package/dist/cdn/chunks/{RestoreVersionDialog-C5cxBRKi.js.map → RestoreVersionDialog-CdA5osuA.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js → RichTextEditorContent-Q1d2xqBT.js} +46 -46
- package/dist/cdn/chunks/{RichTextEditorContent-BfE7Bkge.js.map → RichTextEditorContent-Q1d2xqBT.js.map} +1 -1
- package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js → SaveBlockDialog-CijargAy.js} +77 -77
- package/dist/cdn/chunks/{SaveBlockDialog-BKbjUnPM.js.map → SaveBlockDialog-CijargAy.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksBrowserModal-DtOz_X5S.js +357 -0
- package/dist/cdn/chunks/{SavedBlocksBrowserModal-BMtyUrUP.js.map → SavedBlocksBrowserModal-DtOz_X5S.js.map} +1 -1
- package/dist/cdn/chunks/SavedBlocksPanels-BowyED5h.js +38 -0
- package/dist/cdn/chunks/{SavedBlocksPanels-s_gxi1im.js.map → SavedBlocksPanels-BowyED5h.js.map} +1 -1
- package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js → SavedBlocksPickBar-BPRaJBv3.js} +18 -18
- package/dist/cdn/chunks/{SavedBlocksPickBar-B8WHk5mI.js.map → SavedBlocksPickBar-BPRaJBv3.js.map} +1 -1
- package/dist/cdn/chunks/TemplateSettings-ByZeBO34.js +209 -0
- package/dist/cdn/chunks/{TemplateSettings-CtrzzQWl.js.map → TemplateSettings-ByZeBO34.js.map} +1 -1
- package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js → TestEmailModal-BUVTj3Ic.js} +54 -54
- package/dist/cdn/chunks/{TestEmailModal-DuZKYMWD.js.map → TestEmailModal-BUVTj3Ic.js.map} +1 -1
- package/dist/cdn/chunks/TestEmailPanel-BxutYoWg.js +35 -0
- package/dist/cdn/chunks/{TestEmailPanel-DERaCdpG.js.map → TestEmailPanel-BxutYoWg.js.map} +1 -1
- package/dist/cdn/chunks/TitleEditor-Ccv6uoTz.js +199 -0
- package/dist/cdn/chunks/{TitleEditor-CEgxjtUX.js.map → TitleEditor-Ccv6uoTz.js.map} +1 -1
- package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js +39 -0
- package/dist/cdn/chunks/ToggleSwitch-Ctdmj621.js.map +1 -0
- package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js → Toolbar-DoprRgTn.js} +986 -987
- package/dist/cdn/chunks/{Toolbar-GFIZQHzw.js.map → Toolbar-DoprRgTn.js.map} +1 -1
- package/dist/cdn/chunks/{TplModal-DDrbWJcE.js → TplModal-BXQzmsJX.js} +21 -21
- package/dist/cdn/chunks/{TplModal-DDrbWJcE.js.map → TplModal-BXQzmsJX.js.map} +1 -1
- package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js → VersionHistoryMenu-BF2fNCvq.js} +41 -41
- package/dist/cdn/chunks/{VersionHistoryMenu-MlxsUmuT.js.map → VersionHistoryMenu-BF2fNCvq.js.map} +1 -1
- package/dist/cdn/chunks/VersionHistoryPanels-Dal0Uk69.js +48 -0
- package/dist/cdn/chunks/{VersionHistoryPanels-DVOV8QLv.js.map → VersionHistoryPanels-Dal0Uk69.js.map} +1 -1
- package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js → VersionPreviewBanner-BaGcn-b1.js} +12 -12
- package/dist/cdn/chunks/{VersionPreviewBanner-BQwRKc6S.js.map → VersionPreviewBanner-BaGcn-b1.js.map} +1 -1
- package/dist/cdn/chunks/WrapperBlock-DkQJtLz0.js +47 -0
- package/dist/cdn/chunks/{WrapperBlock-CFuP4R0c.js.map → WrapperBlock-DkQJtLz0.js.map} +1 -1
- package/dist/cdn/chunks/aiErrors-D5UOoYOt.js +43 -0
- package/dist/cdn/chunks/aiErrors-D5UOoYOt.js.map +1 -0
- package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js +50 -0
- package/dist/cdn/chunks/aiImageContext-BH4Ss1h3.js.map +1 -0
- package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js +46 -0
- package/dist/cdn/chunks/aiRewritePreview-DLGM05Ge.js.map +1 -0
- package/dist/cdn/chunks/blockTypeIcons-ikZAmd6U.js +22 -0
- package/dist/cdn/chunks/{blockTypeIcons-BnAd8qsP.js.map → blockTypeIcons-ikZAmd6U.js.map} +1 -1
- package/dist/{ca-DSJwJ5ov.js → cdn/chunks/ca-C7mTzW1r.js} +132 -11
- package/dist/cdn/chunks/ca-C7mTzW1r.js.map +1 -0
- package/dist/cdn/chunks/{cloud-CI_fgDyy.js → createCloudRuntime-DpBWhrv3.js} +489 -593
- package/dist/cdn/chunks/createCloudRuntime-DpBWhrv3.js.map +1 -0
- package/dist/cdn/chunks/de-DBOTcDj2.js +22 -0
- package/dist/cdn/chunks/de-DBOTcDj2.js.map +1 -0
- package/dist/{de-CBE6O79z.js → cdn/chunks/de-DNuYQTmS.js} +132 -11
- package/dist/cdn/chunks/de-DNuYQTmS.js.map +1 -0
- package/dist/{dist-Bv_GBr2l.js → cdn/chunks/dist-Bo8Thh8v.js} +60 -58
- package/dist/cdn/chunks/{dist-Doy3r07H.js.map → dist-Bo8Thh8v.js.map} +1 -1
- package/dist/cdn/chunks/dist-S-rLGqax.js +406 -0
- package/dist/cdn/chunks/{dist-DdwjXLme.js.map → dist-S-rLGqax.js.map} +1 -1
- package/dist/cdn/chunks/{draggable-akeQH_JP.js → draggable-DZ0gwUJ6.js} +1822 -1728
- package/dist/cdn/chunks/draggable-DZ0gwUJ6.js.map +1 -0
- package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js → editor-modal-CI6EfeMd.js} +884 -884
- package/dist/cdn/chunks/{editor-modal-HJBy9kLj.js.map → editor-modal-CI6EfeMd.js.map} +1 -1
- package/dist/cdn/chunks/en-CDhWRrF_.js +22 -0
- package/dist/cdn/chunks/en-CDhWRrF_.js.map +1 -0
- package/dist/{en-CDexnk0p.js → cdn/chunks/en-CW71OK66.js} +132 -11
- package/dist/cdn/chunks/en-CW71OK66.js.map +1 -0
- package/dist/cdn/chunks/en-ifvu6oPv.js +1 -0
- package/dist/{es-BE42B6uN.js → cdn/chunks/es-DdK7zQfi.js} +132 -11
- package/dist/cdn/chunks/es-DdK7zQfi.js.map +1 -0
- package/dist/cdn/chunks/{extensions-koOuDeZS.js → extensions-taJTZlLK.js} +59 -59
- package/dist/cdn/chunks/{extensions-koOuDeZS.js.map → extensions-taJTZlLK.js.map} +1 -1
- package/dist/{fr-DlJFPDQR.js → cdn/chunks/fr-Dz5Bgb7-.js} +132 -11
- package/dist/cdn/chunks/fr-Dz5Bgb7-.js.map +1 -0
- package/dist/cdn/chunks/{icons-CjlNV8xD.js → icons-DNX6StSs.js} +178 -145
- package/dist/cdn/chunks/icons-DNX6StSs.js.map +1 -0
- package/dist/{ja-CUT8gkNI.js → cdn/chunks/ja-Di-zJiT8.js} +132 -11
- package/dist/cdn/chunks/ja-Di-zJiT8.js.map +1 -0
- package/dist/cdn/chunks/keys-BTpmg2Tt.js +12 -0
- package/dist/cdn/chunks/keys-BTpmg2Tt.js.map +1 -0
- package/dist/{logger-BBlvSn6q.js → cdn/chunks/logger-Tj0RPskW.js} +7 -1
- package/dist/cdn/chunks/logger-Tj0RPskW.js.map +1 -0
- package/dist/{nl-bXWqqRyS.js → cdn/chunks/nl-CvVuHYFL.js} +132 -11
- package/dist/cdn/chunks/{nl-bXWqqRyS.js.map → nl-CvVuHYFL.js.map} +1 -1
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js +199 -0
- package/dist/cdn/chunks/normalizeMergeTagMarkup-DyePIGqu.js.map +1 -0
- package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js → preRenderCustomBlocks-Dc-QLntG.js} +4 -4
- package/dist/cdn/chunks/{preRenderCustomBlocks-DqKbdTJ8.js.map → preRenderCustomBlocks-Dc-QLntG.js.map} +1 -1
- package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js +22 -0
- package/dist/cdn/chunks/pt-BR-CHM-ZKvE.js.map +1 -0
- package/dist/{pt-BR-2_H4-wlb.js → cdn/chunks/pt-BR-ZhO4vgyq.js} +132 -11
- package/dist/cdn/chunks/pt-BR-ZhO4vgyq.js.map +1 -0
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js +62 -0
- package/dist/cdn/chunks/sanitizeRichTextHtml-DeISfLFr.js.map +1 -0
- package/dist/cdn/chunks/socialIcons-BBvsTwCV.js +2032 -0
- package/dist/cdn/chunks/socialIcons-BBvsTwCV.js.map +1 -0
- package/dist/{dist-DBG3nh3k.js → cdn/chunks/src-BNFnxfrA.js} +552 -350
- package/dist/cdn/chunks/src-BNFnxfrA.js.map +1 -0
- package/dist/cdn/chunks/src-Bs_yxk3h.js +4392 -0
- package/dist/cdn/chunks/src-Bs_yxk3h.js.map +1 -0
- package/dist/cdn/chunks/{src-B77z1iw4.js → src-K6fw_35b.js} +113 -113
- package/dist/cdn/chunks/{src-B77z1iw4.js.map → src-K6fw_35b.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-B1RfWFzB.js → tiptap-CtVrAViq.js} +43 -43
- package/dist/cdn/chunks/{tiptap-B1RfWFzB.js.map → tiptap-CtVrAViq.js.map} +1 -1
- package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js → useCloudI18n-AVXhzbhQ.js} +4 -4
- package/dist/cdn/chunks/{useCloudI18n-kp07GQmk.js.map → useCloudI18n-AVXhzbhQ.js.map} +1 -1
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js +2586 -0
- package/dist/cdn/chunks/useEditorCore-CCVFi1YZ.js.map +1 -0
- package/dist/cdn/chunks/useEditorRoot-CR5GjJD6.js +10 -0
- package/dist/cdn/chunks/{useEditorRoot-5SBqm90x.js.map → useEditorRoot-CR5GjJD6.js.map} +1 -1
- package/dist/cdn/chunks/{useI18n-DEqtEgOs.js → useI18n-CbVubQhM.js} +3 -3
- package/dist/cdn/chunks/{useI18n-DEqtEgOs.js.map → useI18n-CbVubQhM.js.map} +1 -1
- package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js → useLogicTag-B49Nc53Y.js} +5 -5
- package/dist/cdn/chunks/{useLogicTag-X8bc5qNl.js.map → useLogicTag-B49Nc53Y.js.map} +1 -1
- package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js → useMergeTag-B0KryMj8.js} +5 -5
- package/dist/cdn/chunks/{useMergeTag-DFoOexIQ.js.map → useMergeTag-B0KryMj8.js.map} +1 -1
- package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js → usePopoverPosition-C829ps5i.js} +4 -4
- package/dist/cdn/chunks/{usePopoverPosition-Cz9-XiXR.js.map → usePopoverPosition-C829ps5i.js.map} +1 -1
- package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js +51 -0
- package/dist/cdn/chunks/useScrollToBlock-CAwvulog.js.map +1 -0
- package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js → withCurrentFont-DFPXeVfG.js} +2 -2
- package/dist/cdn/chunks/{withCurrentFont-D-f61ghC.js.map → withCurrentFont-DFPXeVfG.js.map} +1 -1
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +2151 -1480
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-DQQzkmIC.js → check-yYsp5Xpk.js} +1 -1
- package/dist/{chevron-down-CIF4bdon.js → chevron-down-DTmD06_j.js} +1 -1
- package/dist/{chevron-right-Cg7Xu-ev.js → chevron-right-BSeYZOxc.js} +1 -1
- package/dist/{chevron-up-Csu7ISD-.js → chevron-up-BOApwrxi.js} +1 -1
- package/dist/{circle-alert-YUvIJAgY.js → circle-alert-BMszY8im.js} +1 -1
- package/dist/{clock-CnSIGKQW.js → clock-HADxnl6-.js} +1 -1
- package/dist/{cloud-YUYDtdHt.js → createCloudRuntime-DVQI_ReU.js} +474 -570
- package/dist/{createLucideIcon-BcP1sjdp.js → createLucideIcon-0lYYH3EW.js} +6 -6
- package/dist/de-DBOTcDj2.js +20 -0
- package/dist/{cdn/chunks/de-CBE6O79z.js → de-DNuYQTmS.js} +130 -13
- package/dist/{cdn/chunks/dist-Doy3r07H.js → dist-C7EtxNCb.js} +49 -51
- package/dist/{dist-CNqjHA8e.js → dist-C_dV9QAx.js} +130 -130
- package/dist/{cdn/chunks/dist-DdwjXLme.js → dist-DI4_YSnG.js} +111 -110
- package/dist/{cdn/chunks/src-CvLTYGdO.js → dist-DtOF3bDW.js} +446 -393
- package/dist/{editor-modal--7_9A6j-.js → editor-modal-Bzhl-PgI.js} +832 -834
- package/dist/en-CDhWRrF_.js +20 -0
- package/dist/{cdn/chunks/en-CDexnk0p.js → en-CW71OK66.js} +130 -13
- package/dist/en-DwV15ltA.js +1 -0
- package/dist/{cdn/chunks/es-BE42B6uN.js → es-DdK7zQfi.js} +130 -13
- package/dist/{extensions-zwsZlWjH.js → extensions-CdyweA50.js} +57 -57
- package/dist/{eye-B1bua-ck.js → eye-DWkSvYpj.js} +1 -1
- package/dist/{cdn/chunks/fr-DlJFPDQR.js → fr-Dz5Bgb7-.js} +130 -13
- package/dist/image-DesWjcZ4.js +28 -0
- package/dist/index.d.ts +361 -24
- package/dist/{info-x26nGOo2.js → info-ClWJGoZy.js} +1 -1
- package/dist/{cdn/chunks/ja-CUT8gkNI.js → ja-Di-zJiT8.js} +130 -13
- package/dist/keys-Zd9KWRD1.js +10 -0
- package/dist/{link-CezhndyR.js → link-BqRicFTA.js} +1 -1
- package/dist/{list-DQqdptI0.js → list-bojQr9bn.js} +1 -1
- package/dist/{loader-circle-DCEeoYoi.js → loader-circle-B2B8LbUu.js} +1 -1
- package/dist/{cdn/chunks/logger-ByvdoAwq.js → logger-k9Nbj3Cp.js} +5 -3
- package/dist/{message-circle-BLGzfv_7.js → message-circle-BEuiNsyZ.js} +1 -1
- package/dist/{cdn/chunks/nl-bXWqqRyS.js → nl-CvVuHYFL.js} +130 -13
- package/dist/normalizeMergeTagMarkup-P6SUBuPv.js +197 -0
- package/dist/{package-D_kEQCMU.js → package-DCROB4aM.js} +1 -1
- package/dist/{pencil-Dct8zGLy.js → pencil-CEotCKbf.js} +1 -1
- package/dist/{preRenderCustomBlocks-CtKJecE-.js → preRenderCustomBlocks-D8rr61_z.js} +4 -4
- package/dist/pt-BR-CHM-ZKvE.js +20 -0
- package/dist/{cdn/chunks/pt-BR-2_H4-wlb.js → pt-BR-ZhO4vgyq.js} +130 -13
- package/dist/{refresh-cw-tGMRDxr8.js → refresh-cw-C6M2mHNC.js} +12 -2
- package/dist/{runtime-dom.esm-bundler-DYn1z2Xf.js → runtime-dom.esm-bundler-B8WCZWUm.js} +134 -134
- package/dist/sanitizeRichTextHtml-DeISfLFr.js +60 -0
- package/dist/{search-Bm2cCQpe.js → search-Cy99zPYf.js} +1 -1
- package/dist/{send-sVLaKZ7f.js → send-BDLJFsf3.js} +1 -1
- package/dist/{smartphone-B2W81p02.js → smartphone-CVvQaNA4.js} +1 -1
- package/dist/{cdn/chunks/socialIcons-CkZSYpoG.js → socialIcons-Dd-jRiVe.js} +688 -693
- package/dist/{sparkles-a1qkBZ8X.js → sparkles-Ce0Qz0ox.js} +1 -1
- package/dist/square-BWlolnXe.js +15 -0
- package/dist/style.css +1 -1
- package/dist/templatical-editor.js +2114 -1422
- package/dist/{text-align-start-CTuwQ5YW.js → text-align-start-D1V5gPTy.js} +1 -1
- package/dist/{trash-I3D2peFQ.js → trash-CZfiUFmw.js} +1 -1
- package/dist/{triangle-alert-CenxmLRE.js → triangle-alert-CFDzyFC7.js} +1 -1
- package/dist/upload-BJfvdIrD.js +36 -0
- package/dist/{useCloudI18n-CGVEZV3o.js → useCloudI18n-Dcjua65H.js} +5 -5
- package/dist/{useEditorCore-DRbMRe8F.js → useEditorCore-BTLeAVlM.js} +1463 -1499
- package/dist/{useEditorRoot-BVm2-1N8.js → useEditorRoot-DUy67lJu.js} +2 -2
- package/dist/{useI18n-CSh4gO5c.js → useI18n-BdoY7xDE.js} +4 -4
- package/dist/{useLogicTag-zcI6BWIf.js → useLogicTag-DKLZ1T9H.js} +3 -3
- package/dist/{useMergeTag-C-iBLlp0.js → useMergeTag-Bhdx7AKk.js} +3 -3
- package/dist/{usePopoverPosition-CMcsMBtK.js → usePopoverPosition-BZea45XK.js} +2 -2
- package/dist/useScrollToBlock-FmNMALM_.js +74 -0
- package/dist/{vue.runtime.esm-bundler-DV0Wx4r_.js → vue.runtime.esm-bundler-DgFJ6GPG.js} +1428 -1332
- package/dist/{withCurrentFont-D62njRLu.js → withCurrentFont-BATJHNve.js} +1 -1
- package/dist/{x-KFQ4S-Kz.js → x-CZ0Js0hA.js} +1 -1
- package/package.json +14 -12
- package/dist/AiChatSidebar-CdjTb9ej.js +0 -230
- package/dist/AiFeatureMenu-DKm7VYCs.js +0 -57
- package/dist/CloudHeaderExtras-CI8RR9hG.js +0 -55
- package/dist/CommentsSidebar-J65znlrH.js +0 -500
- package/dist/DesignReferenceSidebar-BTwCFgz8.js +0 -279
- package/dist/IssuesPanel-DeeVsfG7.js +0 -117
- package/dist/ParagraphEditor-zLV44z-R.js +0 -797
- package/dist/SavedBlocksBrowserModal-B8DCFW7t.js +0 -360
- package/dist/TemplateScoringPanel-Ba9sgvjS.js +0 -273
- package/dist/TemplateSettings-Cu5X9DgA.js +0 -246
- package/dist/ToggleSwitch-DHweVJOr.js +0 -102
- package/dist/WrapperBlock-DiiaxpMb.js +0 -45
- package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js +0 -205
- package/dist/cdn/chunks/AiChatSidebar-yXJ85Zcg.js.map +0 -1
- package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js +0 -57
- package/dist/cdn/chunks/AiFeatureMenu-4ydjrhsQ.js.map +0 -1
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js +0 -56
- package/dist/cdn/chunks/CloudHeaderExtras-DEkRww7n.js.map +0 -1
- package/dist/cdn/chunks/CloudPanels-XufhBZYF.js.map +0 -1
- package/dist/cdn/chunks/CollaborationNotices-CBvKEj1Q.js.map +0 -1
- package/dist/cdn/chunks/CommentsPanel-R8YLLO3v.js +0 -20
- package/dist/cdn/chunks/CommentsSidebar-96NZHVq3.js +0 -470
- package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js +0 -229
- package/dist/cdn/chunks/DesignReferenceSidebar-D14IIu_P.js.map +0 -1
- package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js +0 -100
- package/dist/cdn/chunks/IssuesPanel-BoPiCLGc.js.map +0 -1
- package/dist/cdn/chunks/LogicTagInsertButton-BJ2t2vxC.js.map +0 -1
- package/dist/cdn/chunks/MediaEditModal-DD0SZ-S3.js.map +0 -1
- package/dist/cdn/chunks/MediaPanels-CkdJ_kGp.js +0 -45
- package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js +0 -632
- package/dist/cdn/chunks/ParagraphEditor-CJQjRHXV.js.map +0 -1
- package/dist/cdn/chunks/SavedBlocksPanels-s_gxi1im.js +0 -38
- package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js +0 -237
- package/dist/cdn/chunks/TemplateScoringPanel-BBPnHILC.js.map +0 -1
- package/dist/cdn/chunks/TemplateSettings-CtrzzQWl.js +0 -208
- package/dist/cdn/chunks/TestEmailPanel-DERaCdpG.js +0 -35
- package/dist/cdn/chunks/TitleEditor-CEgxjtUX.js +0 -199
- package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js +0 -104
- package/dist/cdn/chunks/ToggleSwitch-DGQ7iRc-.js.map +0 -1
- package/dist/cdn/chunks/VersionHistoryPanels-DVOV8QLv.js +0 -48
- package/dist/cdn/chunks/WrapperBlock-CFuP4R0c.js +0 -47
- package/dist/cdn/chunks/blockTypeIcons-BnAd8qsP.js +0 -22
- package/dist/cdn/chunks/ca-DSJwJ5ov.js.map +0 -1
- package/dist/cdn/chunks/cloud-CI_fgDyy.js.map +0 -1
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js +0 -358
- package/dist/cdn/chunks/createCloudRuntime-DiYCJ21w.js.map +0 -1
- package/dist/cdn/chunks/de-CBE6O79z.js.map +0 -1
- package/dist/cdn/chunks/de-D_atmUVB.js +0 -89
- package/dist/cdn/chunks/de-D_atmUVB.js.map +0 -1
- package/dist/cdn/chunks/draggable-akeQH_JP.js.map +0 -1
- package/dist/cdn/chunks/en-CDexnk0p.js.map +0 -1
- package/dist/cdn/chunks/en-DhJLnaBx.js +0 -89
- package/dist/cdn/chunks/en-DhJLnaBx.js.map +0 -1
- package/dist/cdn/chunks/en-Ve-PWSXu.js +0 -1
- package/dist/cdn/chunks/es-BE42B6uN.js.map +0 -1
- package/dist/cdn/chunks/fr-DlJFPDQR.js.map +0 -1
- package/dist/cdn/chunks/icons-CjlNV8xD.js.map +0 -1
- package/dist/cdn/chunks/ja-CUT8gkNI.js.map +0 -1
- package/dist/cdn/chunks/keys-UAWhQ3zW.js +0 -12
- package/dist/cdn/chunks/keys-UAWhQ3zW.js.map +0 -1
- package/dist/cdn/chunks/logger-ByvdoAwq.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-2_H4-wlb.js.map +0 -1
- package/dist/cdn/chunks/pt-BR-BphMoUTw.js +0 -89
- package/dist/cdn/chunks/pt-BR-BphMoUTw.js.map +0 -1
- package/dist/cdn/chunks/socialIcons-CkZSYpoG.js.map +0 -1
- package/dist/cdn/chunks/src-B1e5SSYP.js +0 -1272
- package/dist/cdn/chunks/src-B1e5SSYP.js.map +0 -1
- package/dist/cdn/chunks/src-CvLTYGdO.js.map +0 -1
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js +0 -6
- package/dist/cdn/chunks/timeouts-o5Y9BuqI.js.map +0 -1
- package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js +0 -12
- package/dist/cdn/chunks/useAliveFlag-PuXh83UK.js.map +0 -1
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js +0 -2623
- package/dist/cdn/chunks/useEditorCore-DpCFvHg_.js.map +0 -1
- package/dist/cdn/chunks/useEditorRoot-5SBqm90x.js +0 -10
- package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js +0 -21
- package/dist/cdn/chunks/useScrollToBlock-MNzurEZV.js.map +0 -1
- package/dist/copy-CUC43md_.js +0 -19
- package/dist/createCloudRuntime-BMDRjL0k.js +0 -356
- package/dist/de-D_atmUVB.js +0 -87
- package/dist/dist-CCqn-RqE.js +0 -407
- package/dist/en-BHCMzqib.js +0 -1
- package/dist/en-DhJLnaBx.js +0 -87
- package/dist/image-up-BqiO7KCO.js +0 -27
- package/dist/keys-BymCnLHD.js +0 -10
- package/dist/plus-BDd0gTEm.js +0 -14
- package/dist/pt-BR-BphMoUTw.js +0 -87
- package/dist/shield-check-YhsbXfQc.js +0 -14
- package/dist/socialIcons-Bwv-49EB.js +0 -2167
- package/dist/timeouts-o5Y9BuqI.js +0 -4
- package/dist/upload-uU2cK0Ce.js +0 -21
- package/dist/useAliveFlag-BjP0Gxza.js +0 -10
- package/dist/useScrollToBlock-CdCQK9QQ.js +0 -47
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-
|
|
3
|
-
import { h as N } from "./dist-
|
|
4
|
-
import { a as P, n as F, o as I, r as
|
|
5
|
-
import { t as z } from "./createLucideIcon-
|
|
6
|
-
import { t as B } from "./check-
|
|
7
|
-
import { t as te } from "./chevron-right-
|
|
8
|
-
import {
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as H } from "./pencil-
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
|
|
19
|
-
import { t as W } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
20
|
-
var G = z({
|
|
1
|
+
import { At as e, C as t, F as n, H as r, M as i, Mt as a, N as o, O as s, Q as c, V as l, Y as u, _ as d, a as f, c as p, d as m, f as h, g, it as _, j as v, jt as y, l as b, nt as x, ot as S, q as C, r as w, u as T, v as E, y as D, z as O } from "./vue.runtime.esm-bundler-DgFJ6GPG.js";
|
|
2
|
+
import { a as k, c as A, s as j, t as M } from "./runtime-dom.esm-bundler-B8WCZWUm.js";
|
|
3
|
+
import { h as N } from "./dist-C7EtxNCb.js";
|
|
4
|
+
import { a as P, n as F, o as I, r as ee, s as L, t as R } from "./dist-DI4_YSnG.js";
|
|
5
|
+
import { t as z } from "./createLucideIcon-0lYYH3EW.js";
|
|
6
|
+
import { t as B } from "./check-yYsp5Xpk.js";
|
|
7
|
+
import { t as te } from "./chevron-right-BSeYZOxc.js";
|
|
8
|
+
import { n as ne, t as re } from "./upload-BJfvdIrD.js";
|
|
9
|
+
import { t as ie } from "./link-BqRicFTA.js";
|
|
10
|
+
import { t as V } from "./loader-circle-B2B8LbUu.js";
|
|
11
|
+
import { t as ae } from "./list-bojQr9bn.js";
|
|
12
|
+
import { t as H } from "./pencil-CEotCKbf.js";
|
|
13
|
+
import { n as U, t as W } from "./refresh-cw-C6M2mHNC.js";
|
|
14
|
+
import { t as oe } from "./search-Cy99zPYf.js";
|
|
15
|
+
import { t as se } from "./trash-CZfiUFmw.js";
|
|
16
|
+
import { t as ce } from "./x-CZ0Js0hA.js";
|
|
17
|
+
import { t as G } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
18
|
+
var K = z({
|
|
21
19
|
name: "file",
|
|
22
20
|
size: 24,
|
|
23
21
|
node: [["path", {
|
|
@@ -27,14 +25,14 @@ var G = z({
|
|
|
27
25
|
d: "M14 2v5a1 1 0 0 0 1 1h5",
|
|
28
26
|
key: "wfsgrz"
|
|
29
27
|
}]]
|
|
30
|
-
}),
|
|
28
|
+
}), q = z({
|
|
31
29
|
name: "folder",
|
|
32
30
|
size: 24,
|
|
33
31
|
node: [["path", {
|
|
34
32
|
d: "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",
|
|
35
33
|
key: "1kt360"
|
|
36
34
|
}]]
|
|
37
|
-
}),
|
|
35
|
+
}), le = z({
|
|
38
36
|
name: "grid-2x2",
|
|
39
37
|
size: 24,
|
|
40
38
|
node: [
|
|
@@ -56,7 +54,7 @@ var G = z({
|
|
|
56
54
|
}]
|
|
57
55
|
],
|
|
58
56
|
aliases: ["grid-2-x-2"]
|
|
59
|
-
}),
|
|
57
|
+
}), J = z({
|
|
60
58
|
name: "panel-left",
|
|
61
59
|
size: 24,
|
|
62
60
|
node: [["rect", {
|
|
@@ -71,14 +69,14 @@ var G = z({
|
|
|
71
69
|
key: "fh3hqa"
|
|
72
70
|
}]],
|
|
73
71
|
aliases: ["sidebar"]
|
|
74
|
-
}),
|
|
72
|
+
}), ue = z({
|
|
75
73
|
name: "star",
|
|
76
74
|
size: 24,
|
|
77
75
|
node: [["path", {
|
|
78
76
|
d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
|
|
79
77
|
key: "r04s7s"
|
|
80
78
|
}]]
|
|
81
|
-
}),
|
|
79
|
+
}), de = Symbol("templaticalMediaLimits"), Y = Symbol("templaticalMediaPopoverTarget"), fe = Symbol("templaticalMediaTranslations"), X = Symbol("templaticalMediaUiTheme"), Z = Symbol("templaticalMediaUiLocale"), pe = { mediaLibrary: {
|
|
82
80
|
title: "Media Library",
|
|
83
81
|
searchPlaceholder: "Search files...",
|
|
84
82
|
allFiles: "All Files",
|
|
@@ -173,103 +171,103 @@ var G = z({
|
|
|
173
171
|
} };
|
|
174
172
|
//#endregion
|
|
175
173
|
//#region ../media-library/src/composables/useI18n.ts
|
|
176
|
-
function
|
|
177
|
-
let
|
|
178
|
-
function
|
|
174
|
+
function Q(e) {
|
|
175
|
+
let n = e ?? t(fe, null), r = (C(n) ? n.value : n) ?? pe;
|
|
176
|
+
function i(e, t) {
|
|
179
177
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
180
178
|
}
|
|
181
179
|
return {
|
|
182
|
-
t:
|
|
183
|
-
format:
|
|
180
|
+
t: r,
|
|
181
|
+
format: i
|
|
184
182
|
};
|
|
185
183
|
}
|
|
186
184
|
//#endregion
|
|
187
185
|
//#region ../media-library/src/composables/useMediaCategories.ts
|
|
188
|
-
var
|
|
186
|
+
var me = [
|
|
189
187
|
"images",
|
|
190
188
|
"documents",
|
|
191
189
|
"videos",
|
|
192
190
|
"audio"
|
|
193
191
|
];
|
|
194
|
-
function
|
|
195
|
-
let
|
|
196
|
-
if (!
|
|
197
|
-
let
|
|
198
|
-
let e =
|
|
192
|
+
function he(e) {
|
|
193
|
+
let n = e ?? t(de, null);
|
|
194
|
+
if (!n) throw Error("[Templatical] useMediaCategories() needs media limits in scope. Render it under <MediaLibraryModal> or provide MEDIA_LIMITS_KEY yourself.");
|
|
195
|
+
let r = n, i = p(() => !0), a = p(() => r.maxFileSize ?? Infinity), o = p(() => {
|
|
196
|
+
let e = r.accept;
|
|
199
197
|
if (e && e.length > 0) return e;
|
|
200
|
-
let t =
|
|
201
|
-
return t ? Object.keys(t) :
|
|
202
|
-
}),
|
|
203
|
-
let e =
|
|
204
|
-
return e ?
|
|
205
|
-
}),
|
|
198
|
+
let t = r.mimeTypes;
|
|
199
|
+
return t ? Object.keys(t) : me;
|
|
200
|
+
}), s = p(() => {
|
|
201
|
+
let e = r.mimeTypes;
|
|
202
|
+
return e ? o.value.flatMap((t) => e[t] ?? []) : [];
|
|
203
|
+
}), c = p(() => s.value.join(",")), l = p(() => r.mimeTypes !== void 0);
|
|
206
204
|
function u(e, t) {
|
|
207
|
-
let
|
|
208
|
-
return !
|
|
205
|
+
let n = r.mimeTypes;
|
|
206
|
+
return !n || (t && t.length > 0 ? t : Object.keys(n)).some((t) => n[t]?.includes(e) ?? !1);
|
|
209
207
|
}
|
|
210
208
|
function d(e) {
|
|
211
|
-
return u(e.type) && e.size <=
|
|
209
|
+
return u(e.type) && e.size <= a.value;
|
|
212
210
|
}
|
|
213
211
|
function f(e) {
|
|
214
|
-
let t =
|
|
212
|
+
let t = r.mimeTypes;
|
|
215
213
|
return t ? t.images?.includes(e) ?? !1 : e.startsWith("image/");
|
|
216
214
|
}
|
|
217
|
-
function
|
|
218
|
-
let t =
|
|
215
|
+
function m(e) {
|
|
216
|
+
let t = r.mimeTypes;
|
|
219
217
|
if (!t) return null;
|
|
220
218
|
for (let [n, r] of Object.entries(t)) if (r?.includes(e)) return n;
|
|
221
219
|
return null;
|
|
222
220
|
}
|
|
223
221
|
return {
|
|
224
|
-
isMediaLibraryEnabled:
|
|
225
|
-
allAcceptedMimeTypes:
|
|
226
|
-
allAcceptedInputString:
|
|
227
|
-
restrictsMimeTypes:
|
|
228
|
-
maxFileSize:
|
|
229
|
-
availableCategories:
|
|
222
|
+
isMediaLibraryEnabled: i,
|
|
223
|
+
allAcceptedMimeTypes: s,
|
|
224
|
+
allAcceptedInputString: c,
|
|
225
|
+
restrictsMimeTypes: l,
|
|
226
|
+
maxFileSize: a,
|
|
227
|
+
availableCategories: o,
|
|
230
228
|
isAcceptedMimeType: u,
|
|
231
229
|
isAcceptedFile: d,
|
|
232
230
|
isImageMimeType: f,
|
|
233
|
-
getCategoryForMimeType:
|
|
231
|
+
getCategoryForMimeType: m
|
|
234
232
|
};
|
|
235
233
|
}
|
|
236
234
|
//#endregion
|
|
237
235
|
//#region ../media-library/src/composables/useFocusTrap.ts
|
|
238
236
|
var ge = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
239
237
|
function _e(e, t) {
|
|
240
|
-
let n = null, r = null,
|
|
241
|
-
function
|
|
238
|
+
let n = null, r = null, i = null;
|
|
239
|
+
function a(e) {
|
|
242
240
|
if (!e) return document;
|
|
243
241
|
let t = e.getRootNode();
|
|
244
242
|
return t && "activeElement" in t ? t : document;
|
|
245
243
|
}
|
|
246
|
-
function
|
|
244
|
+
function o() {
|
|
247
245
|
return e.value ? Array.from(e.value.querySelectorAll(ge)).filter((e) => e.offsetParent !== null) : [];
|
|
248
246
|
}
|
|
249
|
-
function
|
|
247
|
+
function s(t) {
|
|
250
248
|
if (t.key !== "Tab") return;
|
|
251
|
-
let n =
|
|
249
|
+
let n = o();
|
|
252
250
|
if (n.length === 0) return;
|
|
253
|
-
let r = n[0], i = n[n.length - 1],
|
|
254
|
-
t.shiftKey ?
|
|
255
|
-
}
|
|
256
|
-
function
|
|
257
|
-
let t = r !== null ||
|
|
258
|
-
t &&
|
|
259
|
-
|
|
260
|
-
let t =
|
|
251
|
+
let r = n[0], i = n[n.length - 1], s = a(e.value).activeElement;
|
|
252
|
+
t.shiftKey ? s === r && (t.preventDefault(), i.focus()) : s === i && (t.preventDefault(), r.focus());
|
|
253
|
+
}
|
|
254
|
+
function c() {
|
|
255
|
+
let t = r !== null || i !== null;
|
|
256
|
+
t && l({ restoreFocus: !1 }), t || (n = a(e.value).activeElement), i = requestAnimationFrame(() => {
|
|
257
|
+
i = null;
|
|
258
|
+
let t = o();
|
|
261
259
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
262
|
-
}), r = P(e, "keydown",
|
|
260
|
+
}), r = P(e, "keydown", s);
|
|
263
261
|
}
|
|
264
|
-
function
|
|
262
|
+
function l(e = {}) {
|
|
265
263
|
let t = e.restoreFocus !== !1;
|
|
266
|
-
|
|
264
|
+
i !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(i), i = null), r?.(), r = null, t && n && n.focus && (n.focus(), n = null);
|
|
267
265
|
}
|
|
268
|
-
let
|
|
269
|
-
e && t ?
|
|
266
|
+
let d = O([t, e], ([e, t]) => {
|
|
267
|
+
e && t ? c() : l();
|
|
270
268
|
}, { flush: "post" });
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
u(() => {
|
|
270
|
+
d(), l();
|
|
273
271
|
});
|
|
274
272
|
}
|
|
275
273
|
//#endregion
|
|
@@ -281,18 +279,18 @@ var ve = {
|
|
|
281
279
|
}, ye = ["onClick"], be = {
|
|
282
280
|
key: 1,
|
|
283
281
|
style: { color: "var(--tpl-text)" }
|
|
284
|
-
}, xe = /* @__PURE__ */
|
|
282
|
+
}, xe = /* @__PURE__ */ D({
|
|
285
283
|
__name: "MediaBreadcrumb",
|
|
286
284
|
props: {
|
|
287
285
|
folders: {},
|
|
288
286
|
currentFolderId: {}
|
|
289
287
|
},
|
|
290
288
|
emits: ["navigate"],
|
|
291
|
-
setup(
|
|
292
|
-
let
|
|
293
|
-
if (!
|
|
289
|
+
setup(e, { emit: t }) {
|
|
290
|
+
let n = e, r = t, { t: i } = Q(), s = p(() => {
|
|
291
|
+
if (!n.currentFolderId) return [];
|
|
294
292
|
let e = [];
|
|
295
|
-
return c(
|
|
293
|
+
return c(n.folders, n.currentFolderId, e), e;
|
|
296
294
|
});
|
|
297
295
|
function c(e, t, n) {
|
|
298
296
|
for (let r of e) {
|
|
@@ -301,19 +299,19 @@ var ve = {
|
|
|
301
299
|
}
|
|
302
300
|
return !1;
|
|
303
301
|
}
|
|
304
|
-
return (
|
|
302
|
+
return (e, t) => s.value.length > 0 ? (v(), h("div", ve, [b("button", {
|
|
305
303
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
306
304
|
style: { color: "var(--tpl-primary)" },
|
|
307
|
-
onClick:
|
|
308
|
-
},
|
|
305
|
+
onClick: t[0] ||= (e) => r("navigate", null)
|
|
306
|
+
}, a(S(i).mediaLibrary.allFiles), 1), (v(!0), h(w, null, o(s.value, (e, t) => (v(), h(w, { key: e.id }, [d(S(te), {
|
|
309
307
|
size: 12,
|
|
310
308
|
"stroke-width": 2
|
|
311
|
-
}),
|
|
309
|
+
}), t < s.value.length - 1 ? (v(), h("button", {
|
|
312
310
|
key: 0,
|
|
313
311
|
class: "tpl:transition-colors tpl:duration-150 tpl:hover:underline",
|
|
314
312
|
style: { color: "var(--tpl-primary)" },
|
|
315
|
-
onClick: (
|
|
316
|
-
},
|
|
313
|
+
onClick: (t) => r("navigate", e.id)
|
|
314
|
+
}, a(e.name), 9, ye)) : (v(), h("span", be, a(e.name), 1))], 64))), 128))])) : m("", !0);
|
|
317
315
|
}
|
|
318
316
|
}), Se = ["aria-expanded", "aria-label"], Ce = {
|
|
319
317
|
key: 1,
|
|
@@ -321,7 +319,7 @@ var ve = {
|
|
|
321
319
|
}, we = {
|
|
322
320
|
key: 0,
|
|
323
321
|
class: "tpl:truncate"
|
|
324
|
-
}, Te = ["onKeydown"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = ["title", "aria-label"], ke = { key: 0 }, Ae = ["placeholder", "onKeydown"], je = /* @__PURE__ */
|
|
322
|
+
}, Te = ["onKeydown"], Ee = ["title", "aria-label"], De = ["title", "aria-label"], Oe = ["title", "aria-label"], ke = { key: 0 }, Ae = ["placeholder", "onKeydown"], je = /* @__PURE__ */ D({
|
|
325
323
|
__name: "MediaFolderTreeNode",
|
|
326
324
|
props: {
|
|
327
325
|
folder: {},
|
|
@@ -337,76 +335,76 @@ var ve = {
|
|
|
337
335
|
"renameFolder",
|
|
338
336
|
"deleteFolder"
|
|
339
337
|
],
|
|
340
|
-
setup(
|
|
341
|
-
let
|
|
338
|
+
setup(t, { emit: i }) {
|
|
339
|
+
let s = t, l = i, { t: u } = Q(), f = c(!1), g = c(!1), _ = c(""), x = c(!1), C = c(""), E = c(!1), D = p(() => s.folder.children.length > 0), O = p(() => s.depth < 4), M = p(() => s.currentFolderId === s.folder.id), N = p(() => s.currentFolderId ? F(s.folder.children, s.currentFolderId) : !1), P = p(() => f.value || N.value);
|
|
342
340
|
function F(e, t) {
|
|
343
341
|
for (let n of e) if (n.id === t || F(n.children, t)) return !0;
|
|
344
342
|
return !1;
|
|
345
343
|
}
|
|
346
344
|
function I() {
|
|
347
|
-
|
|
345
|
+
f.value = !f.value;
|
|
348
346
|
}
|
|
349
|
-
function
|
|
350
|
-
|
|
347
|
+
function ee() {
|
|
348
|
+
g.value = !0, _.value = s.folder.name;
|
|
351
349
|
}
|
|
352
|
-
function
|
|
350
|
+
function L() {
|
|
353
351
|
let e = _.value.trim();
|
|
354
|
-
e && e !==
|
|
352
|
+
e && e !== s.folder.name && l("renameFolder", s.folder.id, e), g.value = !1, _.value = "";
|
|
355
353
|
}
|
|
356
|
-
function
|
|
357
|
-
|
|
354
|
+
function R() {
|
|
355
|
+
g.value = !1, _.value = "";
|
|
358
356
|
}
|
|
359
357
|
function z() {
|
|
360
|
-
|
|
358
|
+
x.value = !0, C.value = "", f.value = !0;
|
|
361
359
|
}
|
|
362
360
|
function B() {
|
|
363
|
-
|
|
361
|
+
C.value.trim() && l("createFolder", C.value.trim(), s.folder.id), x.value = !1, C.value = "";
|
|
364
362
|
}
|
|
365
363
|
function ne() {
|
|
366
|
-
|
|
364
|
+
x.value = !1, C.value = "";
|
|
367
365
|
}
|
|
368
366
|
function re() {
|
|
369
|
-
|
|
367
|
+
E.value ? (l("deleteFolder", s.folder.id), E.value = !1) : E.value = !0;
|
|
370
368
|
}
|
|
371
369
|
function ie(e) {
|
|
372
370
|
let t = e.relatedTarget;
|
|
373
|
-
t && e.currentTarget.contains(t) || (
|
|
371
|
+
t && e.currentTarget.contains(t) || (E.value = !1);
|
|
374
372
|
}
|
|
375
|
-
return (
|
|
376
|
-
let
|
|
377
|
-
return
|
|
373
|
+
return (i, s) => {
|
|
374
|
+
let c = n("MediaFolderTreeNode", !0);
|
|
375
|
+
return v(), h("div", null, [b("div", {
|
|
378
376
|
class: "tpl:group tpl:flex tpl:w-full tpl:items-center tpl:gap-1 tpl:py-1.5 tpl:pr-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
379
|
-
style:
|
|
380
|
-
paddingLeft: `${
|
|
377
|
+
style: y({
|
|
378
|
+
paddingLeft: `${t.depth * 16 + 8}px`,
|
|
381
379
|
backgroundColor: M.value ? "var(--tpl-bg-active)" : "transparent",
|
|
382
380
|
color: M.value ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
383
381
|
}),
|
|
384
382
|
onFocusout: ie
|
|
385
383
|
}, [
|
|
386
|
-
|
|
384
|
+
D.value || x.value ? (v(), h("button", {
|
|
387
385
|
key: 0,
|
|
388
386
|
type: "button",
|
|
389
387
|
class: "tpl:flex tpl:size-4 tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
390
388
|
"aria-expanded": P.value,
|
|
391
|
-
"aria-label": P.value ?
|
|
389
|
+
"aria-label": P.value ? S(u).mediaLibrary.collapseFolder : S(u).mediaLibrary.expandFolder,
|
|
392
390
|
onClick: A(I, ["stop"])
|
|
393
|
-
}, [
|
|
394
|
-
class:
|
|
391
|
+
}, [d(S(te), {
|
|
392
|
+
class: e(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-90": P.value }]),
|
|
395
393
|
size: 10,
|
|
396
394
|
"stroke-width": 2
|
|
397
|
-
}, null, 8, ["class"])], 8, Se)) : (
|
|
398
|
-
|
|
395
|
+
}, null, 8, ["class"])], 8, Se)) : (v(), h("span", Ce)),
|
|
396
|
+
b("button", {
|
|
399
397
|
type: "button",
|
|
400
398
|
class: "tpl:flex tpl:min-w-0 tpl:flex-1 tpl:items-center tpl:gap-1.5",
|
|
401
|
-
onClick:
|
|
402
|
-
}, [
|
|
399
|
+
onClick: s[0] ||= (e) => l("navigate", t.folder.id)
|
|
400
|
+
}, [d(S(q), {
|
|
403
401
|
class: "tpl:shrink-0",
|
|
404
402
|
size: 14,
|
|
405
403
|
"stroke-width": 1.5
|
|
406
|
-
}),
|
|
407
|
-
|
|
404
|
+
}), g.value ? m("", !0) : (v(), h("span", we, a(t.folder.name), 1))]),
|
|
405
|
+
g.value ? r((v(), h("input", {
|
|
408
406
|
key: 2,
|
|
409
|
-
"onUpdate:modelValue":
|
|
407
|
+
"onUpdate:modelValue": s[1] ||= (e) => _.value = e,
|
|
410
408
|
type: "text",
|
|
411
409
|
class: "tpl:min-w-0 tpl:flex-1 tpl:rounded tpl:border tpl:px-1.5 tpl:py-0.5 tpl:text-xs tpl:outline-none",
|
|
412
410
|
style: {
|
|
@@ -415,62 +413,62 @@ var ve = {
|
|
|
415
413
|
color: "var(--tpl-text)"
|
|
416
414
|
},
|
|
417
415
|
autofocus: "",
|
|
418
|
-
onKeydown: [j(
|
|
419
|
-
onBlur:
|
|
420
|
-
onClick:
|
|
421
|
-
}, null, 40, Te)), [[k, _.value]]) :
|
|
422
|
-
|
|
416
|
+
onKeydown: [j(L, ["enter"]), j(A(R, ["stop"]), ["escape"])],
|
|
417
|
+
onBlur: L,
|
|
418
|
+
onClick: s[2] ||= A(() => {}, ["stop"])
|
|
419
|
+
}, null, 40, Te)), [[k, _.value]]) : m("", !0),
|
|
420
|
+
g.value ? m("", !0) : (v(), h("span", {
|
|
423
421
|
key: 3,
|
|
424
|
-
class:
|
|
422
|
+
class: e(["tpl:flex tpl:shrink-0 tpl:items-center tpl:gap-0.5 tpl:transition-opacity", M.value || E.value ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100"])
|
|
425
423
|
}, [
|
|
426
|
-
O.value &&
|
|
424
|
+
O.value && t.canCreateFolder ? (v(), h("button", {
|
|
427
425
|
key: 0,
|
|
428
426
|
type: "button",
|
|
429
427
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
430
|
-
title:
|
|
431
|
-
"aria-label":
|
|
428
|
+
title: S(u).mediaLibrary.addSubfolder,
|
|
429
|
+
"aria-label": S(u).mediaLibrary.addSubfolder,
|
|
432
430
|
onClick: A(z, ["stop"])
|
|
433
|
-
}, [
|
|
431
|
+
}, [d(S(U), {
|
|
434
432
|
size: 12,
|
|
435
433
|
"stroke-width": 2
|
|
436
|
-
})], 8, Ee)) :
|
|
437
|
-
|
|
434
|
+
})], 8, Ee)) : m("", !0),
|
|
435
|
+
t.canRenameFolder ? (v(), h("button", {
|
|
438
436
|
key: 1,
|
|
439
437
|
type: "button",
|
|
440
438
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
441
|
-
title:
|
|
442
|
-
"aria-label":
|
|
443
|
-
onClick: A(
|
|
444
|
-
}, [
|
|
439
|
+
title: S(u).mediaLibrary.renameFolder,
|
|
440
|
+
"aria-label": S(u).mediaLibrary.renameFolder,
|
|
441
|
+
onClick: A(ee, ["stop"])
|
|
442
|
+
}, [d(S(H), {
|
|
445
443
|
size: 12,
|
|
446
444
|
"stroke-width": 2
|
|
447
|
-
})], 8, De)) :
|
|
448
|
-
|
|
445
|
+
})], 8, De)) : m("", !0),
|
|
446
|
+
t.canDeleteFolder ? (v(), h("button", {
|
|
449
447
|
key: 2,
|
|
450
448
|
type: "button",
|
|
451
449
|
"data-testid": "media-folder-delete",
|
|
452
450
|
class: "tpl:flex tpl:size-6 tpl:items-center tpl:justify-center tpl:rounded tpl:transition-colors",
|
|
453
|
-
title:
|
|
454
|
-
"aria-label":
|
|
451
|
+
title: E.value ? S(u).mediaLibrary.deleteFolderConfirm : S(u).mediaLibrary.deleteFolder,
|
|
452
|
+
"aria-label": E.value ? S(u).mediaLibrary.deleteFolderConfirm : S(u).mediaLibrary.deleteFolder,
|
|
455
453
|
onClick: A(re, ["stop"])
|
|
456
|
-
}, [
|
|
454
|
+
}, [d(S(se), {
|
|
457
455
|
size: 12,
|
|
458
456
|
"stroke-width": 2,
|
|
459
457
|
style: { color: "var(--tpl-danger)" }
|
|
460
|
-
})], 8, Oe)) :
|
|
458
|
+
})], 8, Oe)) : m("", !0)
|
|
461
459
|
], 2))
|
|
462
|
-
], 36), P.value ? (
|
|
463
|
-
key:
|
|
464
|
-
folder:
|
|
465
|
-
"current-folder-id":
|
|
466
|
-
depth:
|
|
467
|
-
"can-create-folder":
|
|
468
|
-
"can-rename-folder":
|
|
469
|
-
"can-delete-folder":
|
|
470
|
-
onNavigate:
|
|
471
|
-
onCreateFolder:
|
|
472
|
-
onRenameFolder:
|
|
473
|
-
onDeleteFolder:
|
|
460
|
+
], 36), P.value ? (v(), h("div", ke, [(v(!0), h(w, null, o(t.folder.children, (e) => (v(), T(c, {
|
|
461
|
+
key: e.id,
|
|
462
|
+
folder: e,
|
|
463
|
+
"current-folder-id": t.currentFolderId,
|
|
464
|
+
depth: t.depth + 1,
|
|
465
|
+
"can-create-folder": t.canCreateFolder,
|
|
466
|
+
"can-rename-folder": t.canRenameFolder,
|
|
467
|
+
"can-delete-folder": t.canDeleteFolder,
|
|
468
|
+
onNavigate: s[3] ||= (e) => l("navigate", e),
|
|
469
|
+
onCreateFolder: s[4] ||= (e, t) => l("createFolder", e, t),
|
|
470
|
+
onRenameFolder: s[5] ||= (e, t) => l("renameFolder", e, t),
|
|
471
|
+
onDeleteFolder: s[6] ||= (e) => l("deleteFolder", e)
|
|
474
472
|
}, null, 8, [
|
|
475
473
|
"folder",
|
|
476
474
|
"current-folder-id",
|
|
@@ -478,12 +476,12 @@ var ve = {
|
|
|
478
476
|
"can-create-folder",
|
|
479
477
|
"can-rename-folder",
|
|
480
478
|
"can-delete-folder"
|
|
481
|
-
]))), 128)),
|
|
479
|
+
]))), 128)), x.value ? (v(), h("div", {
|
|
482
480
|
key: 0,
|
|
483
|
-
style:
|
|
481
|
+
style: y({ paddingLeft: `${(t.depth + 1) * 16 + 8}px` }),
|
|
484
482
|
class: "tpl:py-1.5 tpl:pr-2"
|
|
485
|
-
}, [
|
|
486
|
-
"onUpdate:modelValue":
|
|
483
|
+
}, [r(b("input", {
|
|
484
|
+
"onUpdate:modelValue": s[7] ||= (e) => C.value = e,
|
|
487
485
|
type: "text",
|
|
488
486
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
489
487
|
style: {
|
|
@@ -491,11 +489,11 @@ var ve = {
|
|
|
491
489
|
"background-color": "var(--tpl-bg)",
|
|
492
490
|
color: "var(--tpl-text)"
|
|
493
491
|
},
|
|
494
|
-
placeholder:
|
|
492
|
+
placeholder: S(u).mediaLibrary.subfolderName,
|
|
495
493
|
autofocus: "",
|
|
496
494
|
onKeydown: [j(B, ["enter"]), j(A(ne, ["stop"]), ["escape"])],
|
|
497
495
|
onBlur: B
|
|
498
|
-
}, null, 40, Ae), [[k,
|
|
496
|
+
}, null, 40, Ae), [[k, C.value]])], 4)) : m("", !0)])) : m("", !0)]);
|
|
499
497
|
};
|
|
500
498
|
}
|
|
501
499
|
}), Me = {
|
|
@@ -504,7 +502,7 @@ var ve = {
|
|
|
504
502
|
}, Ne = {
|
|
505
503
|
key: 0,
|
|
506
504
|
class: "tpl:px-3 tpl:py-2"
|
|
507
|
-
}, Pe = ["placeholder", "onKeydown"], Fe = /* @__PURE__ */
|
|
505
|
+
}, Pe = ["placeholder", "onKeydown"], Fe = /* @__PURE__ */ D({
|
|
508
506
|
__name: "MediaFolderTree",
|
|
509
507
|
props: {
|
|
510
508
|
folders: {},
|
|
@@ -522,41 +520,41 @@ var ve = {
|
|
|
522
520
|
"deleteFolder",
|
|
523
521
|
"showFrequentlyUsed"
|
|
524
522
|
],
|
|
525
|
-
setup(
|
|
526
|
-
let
|
|
527
|
-
function
|
|
528
|
-
s.value = !0,
|
|
523
|
+
setup(e, { emit: t }) {
|
|
524
|
+
let n = t, { t: i } = Q(), s = c(!1), l = c("");
|
|
525
|
+
function u() {
|
|
526
|
+
s.value = !0, l.value = "";
|
|
529
527
|
}
|
|
530
528
|
function f() {
|
|
531
|
-
|
|
529
|
+
l.value.trim() && n("createFolder", l.value.trim()), s.value = !1, l.value = "";
|
|
532
530
|
}
|
|
533
|
-
function
|
|
534
|
-
s.value = !1,
|
|
531
|
+
function p() {
|
|
532
|
+
s.value = !1, l.value = "";
|
|
535
533
|
}
|
|
536
|
-
return (
|
|
537
|
-
|
|
534
|
+
return (t, c) => (v(), h("div", Me, [
|
|
535
|
+
b("button", {
|
|
538
536
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
539
|
-
style:
|
|
540
|
-
backgroundColor:
|
|
541
|
-
color:
|
|
537
|
+
style: y({
|
|
538
|
+
backgroundColor: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-bg-active)" : "transparent",
|
|
539
|
+
color: e.viewMode === "files" && e.currentFolderId === null ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
542
540
|
}),
|
|
543
|
-
onClick:
|
|
544
|
-
}, [
|
|
541
|
+
onClick: c[0] ||= (e) => n("navigate", null)
|
|
542
|
+
}, [d(S(K), {
|
|
545
543
|
size: 14,
|
|
546
544
|
"stroke-width": 1.5
|
|
547
|
-
}),
|
|
548
|
-
(
|
|
545
|
+
}), g(" " + a(S(i).mediaLibrary.allFiles), 1)], 4),
|
|
546
|
+
(v(!0), h(w, null, o(e.folders, (t) => (v(), T(je, {
|
|
549
547
|
key: t.id,
|
|
550
548
|
folder: t,
|
|
551
|
-
"current-folder-id":
|
|
549
|
+
"current-folder-id": e.currentFolderId,
|
|
552
550
|
depth: 0,
|
|
553
|
-
"can-create-folder":
|
|
554
|
-
"can-rename-folder":
|
|
555
|
-
"can-delete-folder":
|
|
556
|
-
onNavigate:
|
|
557
|
-
onCreateFolder:
|
|
558
|
-
onRenameFolder:
|
|
559
|
-
onDeleteFolder:
|
|
551
|
+
"can-create-folder": e.canCreateFolder,
|
|
552
|
+
"can-rename-folder": e.canRenameFolder,
|
|
553
|
+
"can-delete-folder": e.canDeleteFolder,
|
|
554
|
+
onNavigate: c[1] ||= (e) => n("navigate", e),
|
|
555
|
+
onCreateFolder: c[2] ||= (e, t) => n("createFolder", e, t),
|
|
556
|
+
onRenameFolder: c[3] ||= (e, t) => n("renameFolder", e, t),
|
|
557
|
+
onDeleteFolder: c[4] ||= (e) => n("deleteFolder", e)
|
|
560
558
|
}, null, 8, [
|
|
561
559
|
"folder",
|
|
562
560
|
"current-folder-id",
|
|
@@ -564,8 +562,8 @@ var ve = {
|
|
|
564
562
|
"can-rename-folder",
|
|
565
563
|
"can-delete-folder"
|
|
566
564
|
]))), 128)),
|
|
567
|
-
s.value ? (
|
|
568
|
-
"onUpdate:modelValue":
|
|
565
|
+
s.value ? (v(), h("div", Ne, [r(b("input", {
|
|
566
|
+
"onUpdate:modelValue": c[5] ||= (e) => l.value = e,
|
|
569
567
|
type: "text",
|
|
570
568
|
class: "tpl:w-full tpl:rounded tpl:border tpl:px-2 tpl:py-1 tpl:text-xs tpl:outline-none",
|
|
571
569
|
style: {
|
|
@@ -573,42 +571,42 @@ var ve = {
|
|
|
573
571
|
"background-color": "var(--tpl-bg)",
|
|
574
572
|
color: "var(--tpl-text)"
|
|
575
573
|
},
|
|
576
|
-
placeholder:
|
|
574
|
+
placeholder: S(i).mediaLibrary.folderName,
|
|
577
575
|
autofocus: "",
|
|
578
|
-
onKeydown: [j(f, ["enter"]), j(A(
|
|
576
|
+
onKeydown: [j(f, ["enter"]), j(A(p, ["stop"]), ["escape"])],
|
|
579
577
|
onBlur: f
|
|
580
|
-
}, null, 40, Pe), [[k,
|
|
581
|
-
!s.value &&
|
|
578
|
+
}, null, 40, Pe), [[k, l.value]])])) : m("", !0),
|
|
579
|
+
!s.value && e.canCreateFolder ? (v(), h("button", {
|
|
582
580
|
key: 1,
|
|
583
581
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:transition-all tpl:duration-150",
|
|
584
582
|
style: { color: "var(--tpl-text-muted)" },
|
|
585
|
-
onClick:
|
|
586
|
-
}, [
|
|
583
|
+
onClick: u
|
|
584
|
+
}, [d(S(U), {
|
|
587
585
|
size: 14,
|
|
588
586
|
"stroke-width": 1.5
|
|
589
|
-
}),
|
|
590
|
-
|
|
591
|
-
|
|
587
|
+
}), g(" " + a(S(i).mediaLibrary.newFolder), 1)])) : m("", !0),
|
|
588
|
+
c[7] ||= b("div", { class: "tpl:flex-1" }, null, -1),
|
|
589
|
+
e.hasFrequentlyUsed ? (v(), h("button", {
|
|
592
590
|
key: 2,
|
|
593
591
|
"data-testid": "media-frequently-used",
|
|
594
592
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-2 tpl:border-t tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
595
|
-
style:
|
|
593
|
+
style: y({
|
|
596
594
|
borderColor: "var(--tpl-border)",
|
|
597
|
-
backgroundColor:
|
|
598
|
-
color:
|
|
595
|
+
backgroundColor: e.viewMode === "frequently-used" ? "var(--tpl-bg-active)" : "transparent",
|
|
596
|
+
color: e.viewMode === "frequently-used" ? "var(--tpl-primary)" : "var(--tpl-text)"
|
|
599
597
|
}),
|
|
600
|
-
onClick:
|
|
601
|
-
}, [
|
|
598
|
+
onClick: c[6] ||= (e) => n("showFrequentlyUsed")
|
|
599
|
+
}, [d(S(ue), {
|
|
602
600
|
size: 14,
|
|
603
601
|
"stroke-width": 1.5
|
|
604
|
-
}),
|
|
602
|
+
}), g(" " + a(S(i).mediaLibrary.frequentlyUsed), 1)], 4)) : m("", !0)
|
|
605
603
|
]));
|
|
606
604
|
}
|
|
607
|
-
}), Ie = /* @__PURE__ */
|
|
605
|
+
}), Ie = /* @__PURE__ */ D({
|
|
608
606
|
__name: "MediaFileIcon",
|
|
609
607
|
props: { mimeType: {} },
|
|
610
|
-
setup(
|
|
611
|
-
let
|
|
608
|
+
setup(e) {
|
|
609
|
+
let t = e, n = {
|
|
612
610
|
"application/pdf": {
|
|
613
611
|
label: "PDF",
|
|
614
612
|
color: "var(--tpl-danger)",
|
|
@@ -699,16 +697,16 @@ var ve = {
|
|
|
699
697
|
bgColor: "var(--tpl-secondary-light)",
|
|
700
698
|
icon: "audio"
|
|
701
699
|
}
|
|
702
|
-
},
|
|
700
|
+
}, r = {
|
|
703
701
|
label: "FILE",
|
|
704
702
|
color: "var(--tpl-text-muted)",
|
|
705
703
|
bgColor: "var(--tpl-bg-hover)",
|
|
706
704
|
icon: "document"
|
|
707
|
-
},
|
|
708
|
-
return (
|
|
705
|
+
}, i = p(() => n[t.mimeType] ?? r);
|
|
706
|
+
return (e, t) => (v(), h("div", {
|
|
709
707
|
class: "tpl:flex tpl:aspect-square tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2",
|
|
710
|
-
style:
|
|
711
|
-
}, [
|
|
708
|
+
style: y({ backgroundColor: i.value.bgColor })
|
|
709
|
+
}, [i.value.icon === "document" ? (v(), h("svg", {
|
|
712
710
|
key: 0,
|
|
713
711
|
width: "60",
|
|
714
712
|
height: "60",
|
|
@@ -716,23 +714,23 @@ var ve = {
|
|
|
716
714
|
fill: "none",
|
|
717
715
|
stroke: "currentColor",
|
|
718
716
|
"stroke-width": "1.5",
|
|
719
|
-
style:
|
|
720
|
-
}, [...
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
717
|
+
style: y({ color: i.value.color })
|
|
718
|
+
}, [...t[0] ||= [
|
|
719
|
+
b("path", { d: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z" }, null, -1),
|
|
720
|
+
b("polyline", { points: "14 2 14 8 20 8" }, null, -1),
|
|
721
|
+
b("line", {
|
|
724
722
|
x1: "8",
|
|
725
723
|
y1: "13",
|
|
726
724
|
x2: "16",
|
|
727
725
|
y2: "13"
|
|
728
726
|
}, null, -1),
|
|
729
|
-
|
|
727
|
+
b("line", {
|
|
730
728
|
x1: "8",
|
|
731
729
|
y1: "17",
|
|
732
730
|
x2: "12",
|
|
733
731
|
y2: "17"
|
|
734
732
|
}, null, -1)
|
|
735
|
-
]], 4)) :
|
|
733
|
+
]], 4)) : i.value.icon === "video" ? (v(), h("svg", {
|
|
736
734
|
key: 1,
|
|
737
735
|
width: "40",
|
|
738
736
|
height: "40",
|
|
@@ -740,18 +738,18 @@ var ve = {
|
|
|
740
738
|
fill: "none",
|
|
741
739
|
stroke: "currentColor",
|
|
742
740
|
"stroke-width": "1.5",
|
|
743
|
-
style:
|
|
744
|
-
}, [...
|
|
741
|
+
style: y({ color: i.value.color })
|
|
742
|
+
}, [...t[1] ||= [b("rect", {
|
|
745
743
|
x: "2",
|
|
746
744
|
y: "4",
|
|
747
745
|
width: "20",
|
|
748
746
|
height: "16",
|
|
749
747
|
rx: "2"
|
|
750
|
-
}, null, -1),
|
|
748
|
+
}, null, -1), b("polygon", {
|
|
751
749
|
points: "10,8 16,12 10,16",
|
|
752
750
|
fill: "currentColor",
|
|
753
751
|
stroke: "none"
|
|
754
|
-
}, null, -1)]], 4)) : (
|
|
752
|
+
}, null, -1)]], 4)) : (v(), h("svg", {
|
|
755
753
|
key: 2,
|
|
756
754
|
width: "40",
|
|
757
755
|
height: "40",
|
|
@@ -759,23 +757,23 @@ var ve = {
|
|
|
759
757
|
fill: "none",
|
|
760
758
|
stroke: "currentColor",
|
|
761
759
|
"stroke-width": "1.5",
|
|
762
|
-
style:
|
|
763
|
-
}, [...
|
|
764
|
-
|
|
765
|
-
|
|
760
|
+
style: y({ color: i.value.color })
|
|
761
|
+
}, [...t[2] ||= [
|
|
762
|
+
b("path", { d: "M9 18V5l12-2v13" }, null, -1),
|
|
763
|
+
b("circle", {
|
|
766
764
|
cx: "6",
|
|
767
765
|
cy: "18",
|
|
768
766
|
r: "3"
|
|
769
767
|
}, null, -1),
|
|
770
|
-
|
|
768
|
+
b("circle", {
|
|
771
769
|
cx: "18",
|
|
772
770
|
cy: "16",
|
|
773
771
|
r: "3"
|
|
774
772
|
}, null, -1)
|
|
775
|
-
]], 4)),
|
|
773
|
+
]], 4)), b("span", {
|
|
776
774
|
class: "tpl:text-xs tpl:font-bold tpl:tracking-wider",
|
|
777
|
-
style:
|
|
778
|
-
},
|
|
775
|
+
style: y({ color: i.value.color })
|
|
776
|
+
}, a(i.value.label), 5)], 4));
|
|
779
777
|
}
|
|
780
778
|
});
|
|
781
779
|
//#endregion
|
|
@@ -878,7 +876,7 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
878
876
|
}, ft = {
|
|
879
877
|
key: 4,
|
|
880
878
|
class: "tpl:flex tpl:justify-center tpl:py-4"
|
|
881
|
-
}, pt = /*#__PURE__*/
|
|
879
|
+
}, pt = /*#__PURE__*/ G(/* @__PURE__ */ D({
|
|
882
880
|
__name: "MediaGrid",
|
|
883
881
|
props: {
|
|
884
882
|
items: {},
|
|
@@ -900,30 +898,30 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
900
898
|
"confirm"
|
|
901
899
|
],
|
|
902
900
|
setup(n, { emit: r }) {
|
|
903
|
-
let i = n,
|
|
904
|
-
function
|
|
901
|
+
let i = n, s = r, { isAcceptedMimeType: l, isImageMimeType: u } = he();
|
|
902
|
+
function f(e) {
|
|
905
903
|
return e.mimeType ?? "";
|
|
906
904
|
}
|
|
907
|
-
function
|
|
905
|
+
function p(e) {
|
|
908
906
|
return e.thumbnailUrl ?? e.url;
|
|
909
907
|
}
|
|
910
|
-
function
|
|
911
|
-
return !i.accept || i.accept.length === 0 ||
|
|
908
|
+
function _(e) {
|
|
909
|
+
return !i.accept || i.accept.length === 0 || l(f(e), i.accept);
|
|
912
910
|
}
|
|
913
|
-
function
|
|
911
|
+
function x(e) {
|
|
914
912
|
return i.canUpdate === !0 && e.canUpdate !== !1;
|
|
915
913
|
}
|
|
916
|
-
function
|
|
914
|
+
function C(e) {
|
|
917
915
|
return i.canReplace === !0 && e.canUpdate !== !1;
|
|
918
916
|
}
|
|
919
|
-
function
|
|
920
|
-
t.metaKey || t.ctrlKey ?
|
|
917
|
+
function E(e, t) {
|
|
918
|
+
t.metaKey || t.ctrlKey ? s("toggle", e.id) : s("select", e);
|
|
921
919
|
}
|
|
922
|
-
function
|
|
923
|
-
|
|
920
|
+
function D(e) {
|
|
921
|
+
_(e) && s("confirm", e);
|
|
924
922
|
}
|
|
925
923
|
function O(e, t) {
|
|
926
|
-
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(),
|
|
924
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), t.stopPropagation(), s("select", e));
|
|
927
925
|
}
|
|
928
926
|
function k(e) {
|
|
929
927
|
return i.selectedIds.has(e.id);
|
|
@@ -931,9 +929,9 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
931
929
|
function j(e) {
|
|
932
930
|
return k(e) ? "tpl:opacity-100" : "tpl:opacity-0 tpl:group-hover:opacity-100 tpl:group-focus-within:opacity-100";
|
|
933
931
|
}
|
|
934
|
-
let { t: M } =
|
|
935
|
-
|
|
936
|
-
e && i.hasMore && !i.isLoading &&
|
|
932
|
+
let { t: M } = Q(), N = t(Z, null), P = c(null);
|
|
933
|
+
L(P, ([{ isIntersecting: e }]) => {
|
|
934
|
+
e && i.hasMore && !i.isLoading && s("loadMore");
|
|
937
935
|
}, { threshold: .1 });
|
|
938
936
|
function F(e) {
|
|
939
937
|
return Le(e, N?.value, {
|
|
@@ -942,123 +940,123 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
942
940
|
day: "numeric"
|
|
943
941
|
});
|
|
944
942
|
}
|
|
945
|
-
return (
|
|
946
|
-
n.isLoading && n.items.length === 0 ? (
|
|
943
|
+
return (t, r) => (v(), h("div", ze, [
|
|
944
|
+
n.isLoading && n.items.length === 0 ? (v(), h("div", {
|
|
947
945
|
key: 0,
|
|
948
946
|
role: "status",
|
|
949
947
|
"aria-busy": "true",
|
|
950
|
-
"aria-label":
|
|
951
|
-
class:
|
|
952
|
-
}, [(
|
|
953
|
-
key:
|
|
954
|
-
class:
|
|
948
|
+
"aria-label": S(M).mediaLibrary.loading,
|
|
949
|
+
class: e(n.layout === "list" ? "tpl:flex tpl:flex-col tpl:gap-1" : "tpl:grid tpl:grid-cols-4 tpl:gap-3")
|
|
950
|
+
}, [(v(), h(w, null, o(8, (t) => b("div", {
|
|
951
|
+
key: t,
|
|
952
|
+
class: e(["tpl-pulse tpl:rounded-lg", n.layout === "list" ? "tpl:h-12" : "tpl:aspect-square"]),
|
|
955
953
|
style: { "background-color": "var(--tpl-bg-hover)" },
|
|
956
954
|
"aria-hidden": "true"
|
|
957
|
-
}, null, 2)), 64))], 10, Be)) : n.items.length === 0 ? (
|
|
955
|
+
}, null, 2)), 64))], 10, Be)) : n.items.length === 0 ? (v(), h("div", Ve, [d(S(K), {
|
|
958
956
|
class: "tpl:mb-3",
|
|
959
957
|
size: 40,
|
|
960
958
|
"stroke-width": 1,
|
|
961
959
|
style: { color: "var(--tpl-text-dim)" }
|
|
962
|
-
}),
|
|
960
|
+
}), b("p", He, a(n.searchQuery ? S(M).mediaLibrary.noSearchResults : S(M).mediaLibrary.noFiles), 1)])) : n.layout === "list" ? (v(), h("div", {
|
|
963
961
|
key: 3,
|
|
964
962
|
role: "listbox",
|
|
965
|
-
"aria-label":
|
|
963
|
+
"aria-label": S(M).mediaLibrary.filesListAriaLabel,
|
|
966
964
|
"aria-multiselectable": "true",
|
|
967
965
|
class: "tpl:flex tpl:flex-col tpl:gap-1"
|
|
968
|
-
}, [(
|
|
969
|
-
key:
|
|
966
|
+
}, [(v(!0), h(w, null, o(n.items, (t) => (v(), h("div", {
|
|
967
|
+
key: t.id,
|
|
970
968
|
role: "option",
|
|
971
969
|
tabindex: "0",
|
|
972
970
|
"data-testid": "media-library-item",
|
|
973
|
-
class:
|
|
974
|
-
"data-media-id":
|
|
975
|
-
"aria-selected": k(
|
|
976
|
-
"aria-label":
|
|
977
|
-
style:
|
|
978
|
-
onClick: (e) =>
|
|
979
|
-
onDblclick: (e) =>
|
|
980
|
-
onKeydown: (e) => O(
|
|
971
|
+
class: e(["tpl-media-list-item tpl:group tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-3 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:transition-all tpl:duration-150", [!_(t) && !k(t) ? "tpl:opacity-60" : ""]]),
|
|
972
|
+
"data-media-id": t.id,
|
|
973
|
+
"aria-selected": k(t),
|
|
974
|
+
"aria-label": t.filename || t.url,
|
|
975
|
+
style: y({ backgroundColor: k(t) ? "var(--tpl-bg-hover)" : "transparent" }),
|
|
976
|
+
onClick: (e) => E(t, e),
|
|
977
|
+
onDblclick: (e) => D(t),
|
|
978
|
+
onKeydown: (e) => O(t, e)
|
|
981
979
|
}, [
|
|
982
|
-
|
|
980
|
+
b("div", rt, [S(u)(f(t)) ? (v(), h("img", {
|
|
983
981
|
key: 0,
|
|
984
|
-
src:
|
|
985
|
-
alt:
|
|
982
|
+
src: p(t),
|
|
983
|
+
alt: t.filename || t.url,
|
|
986
984
|
class: "tpl:size-full tpl:object-cover",
|
|
987
985
|
loading: "lazy"
|
|
988
|
-
}, null, 8, it)) : (
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
986
|
+
}, null, 8, it)) : (v(), h("div", at, [d(Ie, { "mime-type": f(t) }, null, 8, ["mime-type"])]))]),
|
|
987
|
+
b("div", ot, [b("p", st, a(t.filename || t.url), 1), b("p", ct, [
|
|
988
|
+
t.size == null ? m("", !0) : (v(), h(w, { key: 0 }, [g(a(S($)(t.size)), 1)], 64)),
|
|
989
|
+
t.createdAt ? (v(), h(w, { key: 1 }, [t.size == null ? m("", !0) : (v(), h(w, { key: 0 }, [g(" · ")], 64)), g(" " + a(F(t.createdAt)), 1)], 64)) : m("", !0),
|
|
990
|
+
S(u)(f(t)) && t.width && t.height ? (v(), h(w, { key: 2 }, [g(" · " + a(t.width) + "×" + a(t.height), 1)], 64)) : m("", !0)
|
|
993
991
|
])]),
|
|
994
|
-
|
|
992
|
+
b("div", { class: e(["tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(t)]) }, [x(t) ? (v(), h("button", {
|
|
995
993
|
key: 0,
|
|
996
994
|
type: "button",
|
|
997
995
|
"data-testid": "media-edit",
|
|
998
996
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
999
997
|
style: { color: "var(--tpl-text-muted)" },
|
|
1000
|
-
title:
|
|
1001
|
-
"aria-label":
|
|
1002
|
-
onClick: A((e) =>
|
|
1003
|
-
}, [
|
|
998
|
+
title: S(M).mediaLibrary.editFile,
|
|
999
|
+
"aria-label": S(M).mediaLibrary.editFile,
|
|
1000
|
+
onClick: A((e) => s("edit", t), ["stop"])
|
|
1001
|
+
}, [d(S(H), {
|
|
1004
1002
|
size: 12,
|
|
1005
1003
|
"stroke-width": 2
|
|
1006
|
-
})], 8, lt)) :
|
|
1004
|
+
})], 8, lt)) : m("", !0), C(t) ? (v(), h("button", {
|
|
1007
1005
|
key: 1,
|
|
1008
1006
|
type: "button",
|
|
1009
1007
|
"data-testid": "media-replace",
|
|
1010
1008
|
class: "tpl:flex tpl:size-6 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded",
|
|
1011
1009
|
style: { color: "var(--tpl-text-muted)" },
|
|
1012
|
-
title:
|
|
1013
|
-
"aria-label":
|
|
1014
|
-
onClick: A((e) =>
|
|
1015
|
-
}, [
|
|
1010
|
+
title: S(M).mediaLibrary.replaceFile,
|
|
1011
|
+
"aria-label": S(M).mediaLibrary.replaceFile,
|
|
1012
|
+
onClick: A((e) => s("replace", t), ["stop"])
|
|
1013
|
+
}, [d(S(W), {
|
|
1016
1014
|
size: 12,
|
|
1017
1015
|
"stroke-width": 2
|
|
1018
|
-
})], 8, ut)) :
|
|
1019
|
-
k(
|
|
1016
|
+
})], 8, ut)) : m("", !0)], 2),
|
|
1017
|
+
k(t) ? (v(), h("div", dt, [d(S(B), {
|
|
1020
1018
|
size: 12,
|
|
1021
1019
|
"stroke-width": 3
|
|
1022
|
-
})])) :
|
|
1023
|
-
], 46, nt))), 128))], 8, tt)) : (
|
|
1020
|
+
})])) : m("", !0)
|
|
1021
|
+
], 46, nt))), 128))], 8, tt)) : (v(), h("div", {
|
|
1024
1022
|
key: 2,
|
|
1025
1023
|
role: "listbox",
|
|
1026
|
-
"aria-label":
|
|
1024
|
+
"aria-label": S(M).mediaLibrary.filesListAriaLabel,
|
|
1027
1025
|
"aria-multiselectable": "true",
|
|
1028
1026
|
class: "tpl:grid tpl:grid-cols-4 tpl:gap-3"
|
|
1029
|
-
}, [(
|
|
1030
|
-
key:
|
|
1027
|
+
}, [(v(!0), h(w, null, o(n.items, (t) => (v(), h("div", {
|
|
1028
|
+
key: t.id,
|
|
1031
1029
|
role: "option",
|
|
1032
1030
|
tabindex: "0",
|
|
1033
1031
|
"data-testid": "media-library-item",
|
|
1034
|
-
class:
|
|
1032
|
+
class: e(["tpl-media-item tpl:group tpl:relative tpl:overflow-hidden tpl:rounded-lg tpl:border-2 tpl:transition-all tpl:duration-150", [
|
|
1035
1033
|
"tpl:cursor-pointer",
|
|
1036
|
-
!
|
|
1037
|
-
k(
|
|
1034
|
+
!_(t) && !k(t) ? "tpl:opacity-60" : "",
|
|
1035
|
+
k(t) ? "tpl-media-item--selected" : ""
|
|
1038
1036
|
]]),
|
|
1039
|
-
"data-media-id":
|
|
1040
|
-
"aria-selected": k(
|
|
1041
|
-
"aria-label":
|
|
1042
|
-
style:
|
|
1043
|
-
borderColor: k(
|
|
1044
|
-
backgroundColor: !
|
|
1037
|
+
"data-media-id": t.id,
|
|
1038
|
+
"aria-selected": k(t),
|
|
1039
|
+
"aria-label": t.filename || t.url,
|
|
1040
|
+
style: y({
|
|
1041
|
+
borderColor: k(t) ? "var(--tpl-primary)" : "transparent",
|
|
1042
|
+
backgroundColor: !_(t) && !k(t) ? "var(--tpl-bg)" : "var(--tpl-bg-hover)"
|
|
1045
1043
|
}),
|
|
1046
|
-
onClick: (e) =>
|
|
1047
|
-
onDblclick: (e) =>
|
|
1048
|
-
onKeydown: (e) => O(
|
|
1044
|
+
onClick: (e) => E(t, e),
|
|
1045
|
+
onDblclick: (e) => D(t),
|
|
1046
|
+
onKeydown: (e) => O(t, e)
|
|
1049
1047
|
}, [
|
|
1050
|
-
|
|
1048
|
+
b("div", Ge, [S(u)(f(t)) ? (v(), h("img", {
|
|
1051
1049
|
key: 0,
|
|
1052
|
-
src:
|
|
1053
|
-
alt:
|
|
1050
|
+
src: p(t),
|
|
1051
|
+
alt: t.filename || t.url,
|
|
1054
1052
|
class: "tpl:size-full tpl:object-cover",
|
|
1055
1053
|
loading: "lazy"
|
|
1056
|
-
}, null, 8, Ke)) : (
|
|
1054
|
+
}, null, 8, Ke)) : (v(), T(Ie, {
|
|
1057
1055
|
key: 1,
|
|
1058
|
-
"mime-type":
|
|
1056
|
+
"mime-type": f(t)
|
|
1059
1057
|
}, null, 8, ["mime-type"]))]),
|
|
1060
|
-
|
|
1061
|
-
|
|
1058
|
+
b("div", qe, [b("p", Je, a(t.filename || t.url), 1), b("p", Ye, [t.size == null ? m("", !0) : (v(), h("span", Xe, a(S($)(t.size)), 1)), S(u)(f(t)) && t.width && t.height ? (v(), h("span", Ze, a(t.width) + "×" + a(t.height), 1)) : m("", !0)])]),
|
|
1059
|
+
b("div", { class: e(["tpl:absolute tpl:top-1.5 tpl:left-1.5 tpl:flex tpl:gap-1 tpl:transition-opacity tpl:duration-150", j(t)]) }, [x(t) ? (v(), h("button", {
|
|
1062
1060
|
key: 0,
|
|
1063
1061
|
type: "button",
|
|
1064
1062
|
"data-testid": "media-edit",
|
|
@@ -1067,13 +1065,13 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1067
1065
|
"background-color": "var(--tpl-overlay)",
|
|
1068
1066
|
color: "var(--tpl-on-primary)"
|
|
1069
1067
|
},
|
|
1070
|
-
title:
|
|
1071
|
-
"aria-label":
|
|
1072
|
-
onClick: A((e) =>
|
|
1073
|
-
}, [
|
|
1068
|
+
title: S(M).mediaLibrary.editFile,
|
|
1069
|
+
"aria-label": S(M).mediaLibrary.editFile,
|
|
1070
|
+
onClick: A((e) => s("edit", t), ["stop"])
|
|
1071
|
+
}, [d(S(H), {
|
|
1074
1072
|
size: 11,
|
|
1075
1073
|
"stroke-width": 2
|
|
1076
|
-
})], 8, Qe)) :
|
|
1074
|
+
})], 8, Qe)) : m("", !0), C(t) ? (v(), h("button", {
|
|
1077
1075
|
key: 1,
|
|
1078
1076
|
type: "button",
|
|
1079
1077
|
"data-testid": "media-replace",
|
|
@@ -1082,29 +1080,29 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1082
1080
|
"background-color": "var(--tpl-overlay)",
|
|
1083
1081
|
color: "var(--tpl-on-primary)"
|
|
1084
1082
|
},
|
|
1085
|
-
title:
|
|
1086
|
-
"aria-label":
|
|
1087
|
-
onClick: A((e) =>
|
|
1088
|
-
}, [
|
|
1083
|
+
title: S(M).mediaLibrary.replaceFile,
|
|
1084
|
+
"aria-label": S(M).mediaLibrary.replaceFile,
|
|
1085
|
+
onClick: A((e) => s("replace", t), ["stop"])
|
|
1086
|
+
}, [d(S(W), {
|
|
1089
1087
|
size: 11,
|
|
1090
1088
|
"stroke-width": 2
|
|
1091
|
-
})], 8, $e)) :
|
|
1092
|
-
k(
|
|
1089
|
+
})], 8, $e)) : m("", !0)], 2),
|
|
1090
|
+
k(t) ? (v(), h("div", et, [d(S(B), {
|
|
1093
1091
|
size: 12,
|
|
1094
1092
|
"stroke-width": 3
|
|
1095
|
-
})])) :
|
|
1093
|
+
})])) : m("", !0)
|
|
1096
1094
|
], 46, We))), 128))], 8, Ue)),
|
|
1097
|
-
|
|
1095
|
+
b("div", {
|
|
1098
1096
|
ref_key: "sentinelRef",
|
|
1099
1097
|
ref: P,
|
|
1100
1098
|
class: "tpl:h-4"
|
|
1101
1099
|
}, null, 512),
|
|
1102
|
-
n.isLoading && n.items.length > 0 ? (
|
|
1100
|
+
n.isLoading && n.items.length > 0 ? (v(), h("div", ft, [d(S(V), {
|
|
1103
1101
|
class: "tpl-spinner",
|
|
1104
1102
|
size: 20,
|
|
1105
1103
|
"stroke-width": 2,
|
|
1106
1104
|
style: { color: "var(--tpl-primary)" }
|
|
1107
|
-
})])) :
|
|
1105
|
+
})])) : m("", !0)
|
|
1108
1106
|
]));
|
|
1109
1107
|
}
|
|
1110
1108
|
}), [["__scopeId", "data-v-57c35946"]]), mt = ["data-tpl-theme"], ht = {
|
|
@@ -1126,7 +1124,7 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1126
1124
|
}, yt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, bt = ["disabled"], xt = ["disabled"], St = {
|
|
1127
1125
|
key: 0,
|
|
1128
1126
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
1129
|
-
}, Ct = { key: 1 }, wt = /* @__PURE__ */
|
|
1127
|
+
}, Ct = { key: 1 }, wt = /* @__PURE__ */ D({
|
|
1130
1128
|
__name: "MediaImportUrlModal",
|
|
1131
1129
|
props: {
|
|
1132
1130
|
visible: { type: Boolean },
|
|
@@ -1134,24 +1132,24 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1134
1132
|
error: {}
|
|
1135
1133
|
},
|
|
1136
1134
|
emits: ["import", "close"],
|
|
1137
|
-
setup(
|
|
1138
|
-
let
|
|
1139
|
-
|
|
1140
|
-
e && (
|
|
1135
|
+
setup(n, { emit: i }) {
|
|
1136
|
+
let o = n, s = i, { t: u } = Q(), _ = t(X, null), y = t(Y, c(null)), x = c("");
|
|
1137
|
+
O(() => o.visible, (e) => {
|
|
1138
|
+
e && (x.value = "");
|
|
1141
1139
|
});
|
|
1142
1140
|
function C() {
|
|
1143
|
-
let e =
|
|
1144
|
-
e && !
|
|
1141
|
+
let e = x.value.trim();
|
|
1142
|
+
e && !o.isImporting && s("import", e);
|
|
1145
1143
|
}
|
|
1146
1144
|
function w() {
|
|
1147
|
-
|
|
1145
|
+
o.isImporting || s("close");
|
|
1148
1146
|
}
|
|
1149
|
-
let E =
|
|
1150
|
-
_e(E,
|
|
1151
|
-
function
|
|
1147
|
+
let E = c(null);
|
|
1148
|
+
_e(E, p(() => o.visible));
|
|
1149
|
+
function D(e) {
|
|
1152
1150
|
e.stopPropagation(), e.key === "Enter" && (e.preventDefault(), C()), e.key === "Escape" && w();
|
|
1153
1151
|
}
|
|
1154
|
-
return (
|
|
1152
|
+
return (t, i) => (v(), T(f, { to: S(y) || "body" }, [d(M, {
|
|
1155
1153
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1156
1154
|
"enter-from-class": "tpl:opacity-0",
|
|
1157
1155
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1159,14 +1157,14 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1159
1157
|
"leave-from-class": "tpl:opacity-100",
|
|
1160
1158
|
"leave-to-class": "tpl:opacity-0"
|
|
1161
1159
|
}, {
|
|
1162
|
-
default:
|
|
1160
|
+
default: l(() => [n.visible ? (v(), h("div", {
|
|
1163
1161
|
key: 0,
|
|
1164
|
-
"data-tpl-theme":
|
|
1165
|
-
class:
|
|
1162
|
+
"data-tpl-theme": S(_),
|
|
1163
|
+
class: e([S(y) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1166
1164
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1167
1165
|
onClick: A(w, ["self"]),
|
|
1168
|
-
onKeydown:
|
|
1169
|
-
}, [
|
|
1166
|
+
onKeydown: D
|
|
1167
|
+
}, [b("div", {
|
|
1170
1168
|
ref_key: "dialogRef",
|
|
1171
1169
|
ref: E,
|
|
1172
1170
|
role: "dialog",
|
|
@@ -1175,47 +1173,47 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1175
1173
|
class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
1176
1174
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1177
1175
|
}, [
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
"onUpdate:modelValue": i[0] ||= (e) =>
|
|
1176
|
+
b("h3", ht, a(S(u).mediaLibrary.importFromUrl), 1),
|
|
1177
|
+
b("div", gt, [r(b("input", {
|
|
1178
|
+
"onUpdate:modelValue": i[0] ||= (e) => x.value = e,
|
|
1181
1179
|
type: "url",
|
|
1182
|
-
"aria-label":
|
|
1183
|
-
"aria-invalid": !!
|
|
1184
|
-
"aria-describedby":
|
|
1180
|
+
"aria-label": S(u).mediaLibrary.importFromUrl,
|
|
1181
|
+
"aria-invalid": !!n.error,
|
|
1182
|
+
"aria-describedby": n.error ? "tpl-media-import-error" : void 0,
|
|
1185
1183
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:outline-none",
|
|
1186
1184
|
style: {
|
|
1187
1185
|
"border-color": "var(--tpl-border)",
|
|
1188
1186
|
"background-color": "var(--tpl-bg)",
|
|
1189
1187
|
color: "var(--tpl-text)"
|
|
1190
1188
|
},
|
|
1191
|
-
placeholder:
|
|
1192
|
-
disabled:
|
|
1189
|
+
placeholder: S(u).mediaLibrary.importUrlPlaceholder,
|
|
1190
|
+
disabled: n.isImporting,
|
|
1193
1191
|
autofocus: ""
|
|
1194
|
-
}, null, 8, _t), [[k,
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
class:
|
|
1192
|
+
}, null, 8, _t), [[k, x.value]])]),
|
|
1193
|
+
n.error ? (v(), h("p", vt, a(n.error), 1)) : m("", !0),
|
|
1194
|
+
b("div", yt, [b("button", {
|
|
1195
|
+
class: e(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150", { "tpl:cursor-not-allowed tpl:opacity-50": n.isImporting }]),
|
|
1198
1196
|
style: {
|
|
1199
1197
|
"border-color": "var(--tpl-border)",
|
|
1200
1198
|
color: "var(--tpl-text)",
|
|
1201
1199
|
"background-color": "var(--tpl-bg)"
|
|
1202
1200
|
},
|
|
1203
|
-
disabled:
|
|
1201
|
+
disabled: n.isImporting,
|
|
1204
1202
|
onClick: w
|
|
1205
|
-
},
|
|
1203
|
+
}, a(S(u).mediaLibrary.cancel), 11, bt), b("button", {
|
|
1206
1204
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
1207
1205
|
style: {
|
|
1208
1206
|
"background-color": "var(--tpl-primary)",
|
|
1209
1207
|
color: "var(--tpl-on-primary)"
|
|
1210
1208
|
},
|
|
1211
|
-
disabled: !
|
|
1209
|
+
disabled: !x.value.trim() || n.isImporting,
|
|
1212
1210
|
onClick: C
|
|
1213
|
-
}, [
|
|
1211
|
+
}, [n.isImporting ? (v(), h("span", St, [d(S(V), {
|
|
1214
1212
|
class: "tpl:animate-spin",
|
|
1215
1213
|
size: 12,
|
|
1216
1214
|
"stroke-width": 2
|
|
1217
|
-
}),
|
|
1218
|
-
], 512)], 42, mt)) :
|
|
1215
|
+
}), g(" " + a(S(u).mediaLibrary.importing), 1)])) : (v(), h("span", Ct, a(S(u).mediaLibrary.import), 1))], 8, xt)])
|
|
1216
|
+
], 512)], 42, mt)) : m("", !0)]),
|
|
1219
1217
|
_: 1
|
|
1220
1218
|
})], 8, ["to"]));
|
|
1221
1219
|
}
|
|
@@ -1223,62 +1221,62 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1223
1221
|
key: 0,
|
|
1224
1222
|
class: "tpl:shrink-0",
|
|
1225
1223
|
style: { color: "var(--tpl-text-dim)" }
|
|
1226
|
-
}, kt = /* @__PURE__ */
|
|
1224
|
+
}, kt = /* @__PURE__ */ D({
|
|
1227
1225
|
__name: "MediaMovePicker",
|
|
1228
1226
|
props: {
|
|
1229
1227
|
folders: {},
|
|
1230
1228
|
currentFolderId: {}
|
|
1231
1229
|
},
|
|
1232
1230
|
emits: ["select", "close"],
|
|
1233
|
-
setup(
|
|
1234
|
-
let
|
|
1235
|
-
function
|
|
1231
|
+
setup(e, { emit: t }) {
|
|
1232
|
+
let n = t, { t: r } = Q(), i = c(null);
|
|
1233
|
+
function s(e, t = 0) {
|
|
1236
1234
|
let n = [];
|
|
1237
1235
|
for (let r of e) n.push({
|
|
1238
1236
|
id: r.id,
|
|
1239
1237
|
name: r.name,
|
|
1240
1238
|
depth: t
|
|
1241
|
-
}), r.children.length && n.push(...
|
|
1239
|
+
}), r.children.length && n.push(...s(r.children, t + 1));
|
|
1242
1240
|
return n;
|
|
1243
1241
|
}
|
|
1244
|
-
return
|
|
1245
|
-
|
|
1246
|
-
}), (
|
|
1242
|
+
return R(i, () => {
|
|
1243
|
+
n("close");
|
|
1244
|
+
}), (t, c) => (v(), h("div", {
|
|
1247
1245
|
ref_key: "pickerRef",
|
|
1248
|
-
ref:
|
|
1246
|
+
ref: i,
|
|
1249
1247
|
"data-testid": "media-move-picker",
|
|
1250
1248
|
class: "tpl:absolute tpl:bottom-full tpl:left-0 tpl:z-10 tpl:mb-2 tpl:w-56 tpl:overflow-hidden tpl:rounded-lg tpl:border tpl:shadow-lg",
|
|
1251
1249
|
style: {
|
|
1252
1250
|
"border-color": "var(--tpl-border)",
|
|
1253
1251
|
"background-color": "var(--tpl-bg-elevated)"
|
|
1254
1252
|
}
|
|
1255
|
-
}, [
|
|
1253
|
+
}, [b("div", Tt, [e.currentFolderId === null ? m("", !0) : (v(), h("button", {
|
|
1256
1254
|
key: 0,
|
|
1257
1255
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:px-3 tpl:py-1.5 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
1258
1256
|
style: { color: "var(--tpl-text)" },
|
|
1259
|
-
onClick:
|
|
1260
|
-
}, [
|
|
1257
|
+
onClick: c[0] ||= (e) => n("select", null)
|
|
1258
|
+
}, [d(S(K), {
|
|
1261
1259
|
class: "tpl:shrink-0",
|
|
1262
1260
|
size: 14,
|
|
1263
1261
|
"stroke-width": 1.5
|
|
1264
|
-
}),
|
|
1265
|
-
key:
|
|
1262
|
+
}), g(" " + a(S(r).mediaLibrary.moveToRoot), 1)])), (v(!0), h(w, null, o(s(e.folders), (t) => (v(), h("button", {
|
|
1263
|
+
key: t.id,
|
|
1266
1264
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:gap-1.5 tpl:py-1.5 tpl:pr-3 tpl:text-left tpl:text-xs tpl:transition-colors tpl:duration-100",
|
|
1267
|
-
style:
|
|
1268
|
-
paddingLeft: `${
|
|
1269
|
-
color:
|
|
1270
|
-
opacity:
|
|
1265
|
+
style: y({
|
|
1266
|
+
paddingLeft: `${t.depth * 16 + 12}px`,
|
|
1267
|
+
color: t.id === e.currentFolderId ? "var(--tpl-text-dim)" : "var(--tpl-text)",
|
|
1268
|
+
opacity: t.id === e.currentFolderId ? .5 : 1
|
|
1271
1269
|
}),
|
|
1272
|
-
disabled:
|
|
1273
|
-
onClick: (e) =>
|
|
1270
|
+
disabled: t.id === e.currentFolderId,
|
|
1271
|
+
onClick: (e) => n("select", t.id)
|
|
1274
1272
|
}, [
|
|
1275
|
-
|
|
1273
|
+
d(S(q), {
|
|
1276
1274
|
class: "tpl:shrink-0",
|
|
1277
1275
|
size: 14,
|
|
1278
1276
|
"stroke-width": 1.5
|
|
1279
1277
|
}),
|
|
1280
|
-
|
|
1281
|
-
|
|
1278
|
+
b("span", Dt, a(t.name), 1),
|
|
1279
|
+
t.id === e.currentFolderId ? (v(), h("span", Ot, a(S(r).mediaLibrary.currentFolder), 1)) : m("", !0)
|
|
1282
1280
|
], 12, Et))), 128))])], 512));
|
|
1283
1281
|
}
|
|
1284
1282
|
}), At = { class: "tpl:flex tpl:items-center tpl:gap-3" }, jt = ["src", "alt"], Mt = {
|
|
@@ -1291,68 +1289,68 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1291
1289
|
}, Ft = {
|
|
1292
1290
|
class: "tpl:mt-0.5 tpl:text-[10px]",
|
|
1293
1291
|
style: { color: "var(--tpl-text-muted)" }
|
|
1294
|
-
}, It = /*#__PURE__*/
|
|
1292
|
+
}, It = /*#__PURE__*/ G(/* @__PURE__ */ D({
|
|
1295
1293
|
__name: "MediaPreviewPanel",
|
|
1296
1294
|
props: {
|
|
1297
1295
|
item: {},
|
|
1298
1296
|
folders: {}
|
|
1299
1297
|
},
|
|
1300
|
-
setup(
|
|
1301
|
-
let
|
|
1302
|
-
function
|
|
1298
|
+
setup(n) {
|
|
1299
|
+
let r = n, i = t(Z, null), { isImageMimeType: o } = he();
|
|
1300
|
+
function s(e, t, n = []) {
|
|
1303
1301
|
for (let r of e) {
|
|
1304
1302
|
let e = [...n, r.name];
|
|
1305
1303
|
if (r.id === t) return e;
|
|
1306
1304
|
if (r.children.length) {
|
|
1307
|
-
let n =
|
|
1305
|
+
let n = s(r.children, t, e);
|
|
1308
1306
|
if (n) return n;
|
|
1309
1307
|
}
|
|
1310
1308
|
}
|
|
1311
1309
|
return null;
|
|
1312
1310
|
}
|
|
1313
|
-
let
|
|
1314
|
-
if (!
|
|
1315
|
-
let e =
|
|
1311
|
+
let c = p(() => {
|
|
1312
|
+
if (!r.item.folderId || !r.folders) return null;
|
|
1313
|
+
let e = s(r.folders, r.item.folderId);
|
|
1316
1314
|
return e ? e.join("/") : null;
|
|
1317
|
-
}),
|
|
1318
|
-
function
|
|
1319
|
-
return Le(e,
|
|
1315
|
+
}), l = p(() => r.item.mimeType ?? ""), u = p(() => o(l.value));
|
|
1316
|
+
function f(e) {
|
|
1317
|
+
return Le(e, i?.value, {
|
|
1320
1318
|
year: "numeric",
|
|
1321
1319
|
month: "short",
|
|
1322
1320
|
day: "numeric"
|
|
1323
1321
|
});
|
|
1324
1322
|
}
|
|
1325
|
-
let
|
|
1326
|
-
return (
|
|
1323
|
+
let _ = p(() => r.item.filename || r.item.url);
|
|
1324
|
+
return (t, r) => (v(), h("div", At, [u.value ? (v(), h("img", {
|
|
1327
1325
|
key: 0,
|
|
1328
|
-
src:
|
|
1329
|
-
alt:
|
|
1326
|
+
src: n.item.url,
|
|
1327
|
+
alt: n.item.alt || _.value,
|
|
1330
1328
|
class: "tpl:size-10 tpl:shrink-0 tpl:rounded tpl:object-cover",
|
|
1331
1329
|
style: { border: "1px solid var(--tpl-border)" }
|
|
1332
|
-
}, null, 8, jt)) : (
|
|
1333
|
-
"mime-type":
|
|
1330
|
+
}, null, 8, jt)) : (v(), h("div", Mt, [d(Ie, {
|
|
1331
|
+
"mime-type": l.value,
|
|
1334
1332
|
class: "tpl-preview-icon"
|
|
1335
|
-
}, null, 8, ["mime-type"])])),
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
r[0] ||=
|
|
1343
|
-
|
|
1333
|
+
}, null, 8, ["mime-type"])])), b("div", Nt, [
|
|
1334
|
+
b("p", Pt, a(_.value), 1),
|
|
1335
|
+
b("p", Ft, [
|
|
1336
|
+
n.item.size == null ? m("", !0) : (v(), h(w, { key: 0 }, [g(a(S($)(n.item.size)), 1)], 64)),
|
|
1337
|
+
n.item.createdAt ? (v(), h(w, { key: 1 }, [n.item.size == null ? m("", !0) : (v(), h(w, { key: 0 }, [g(" · ")], 64)), g(" " + a(f(n.item.createdAt)), 1)], 64)) : m("", !0),
|
|
1338
|
+
u.value && n.item.width && n.item.height ? (v(), h(w, { key: 2 }, [g(" · " + a(n.item.width) + "×" + a(n.item.height) + "px ", 1)], 64)) : m("", !0),
|
|
1339
|
+
c.value ? (v(), h(w, { key: 3 }, [
|
|
1340
|
+
r[0] ||= g(" · ", -1),
|
|
1341
|
+
d(S(q), {
|
|
1344
1342
|
class: "tpl:mb-px tpl:inline",
|
|
1345
1343
|
size: 9,
|
|
1346
1344
|
"stroke-width": 2
|
|
1347
1345
|
}),
|
|
1348
|
-
|
|
1349
|
-
], 64)) :
|
|
1346
|
+
g(" " + a(c.value), 1)
|
|
1347
|
+
], 64)) : m("", !0)
|
|
1350
1348
|
]),
|
|
1351
|
-
|
|
1349
|
+
u.value ? (v(), h("p", {
|
|
1352
1350
|
key: 0,
|
|
1353
|
-
class:
|
|
1351
|
+
class: e(["tpl:mt-0.5 tpl:truncate tpl:text-[10px] tpl:italic", { "tpl:invisible": !n.item.alt }]),
|
|
1354
1352
|
style: { color: "var(--tpl-text-dim)" }
|
|
1355
|
-
},
|
|
1353
|
+
}, a(n.item.alt || "\xA0"), 3)) : m("", !0)
|
|
1356
1354
|
])]));
|
|
1357
1355
|
}
|
|
1358
1356
|
}), [["__scopeId", "data-v-50993988"]]), Lt = ["data-tpl-theme"], Rt = {
|
|
@@ -1385,7 +1383,7 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1385
1383
|
role: "alert",
|
|
1386
1384
|
class: "tpl:mb-3 tpl:text-xs",
|
|
1387
1385
|
style: { color: "var(--tpl-danger)" }
|
|
1388
|
-
}, qt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Jt = ["disabled"], Yt = ["disabled"], Xt = /* @__PURE__ */
|
|
1386
|
+
}, qt = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Jt = ["disabled"], Yt = ["disabled"], Xt = /* @__PURE__ */ D({
|
|
1389
1387
|
__name: "MediaReplaceModal",
|
|
1390
1388
|
props: {
|
|
1391
1389
|
visible: { type: Boolean },
|
|
@@ -1395,28 +1393,28 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1395
1393
|
error: {}
|
|
1396
1394
|
},
|
|
1397
1395
|
emits: ["replace", "close"],
|
|
1398
|
-
setup(
|
|
1399
|
-
let i =
|
|
1396
|
+
setup(n, { emit: r }) {
|
|
1397
|
+
let i = n, o = r, { t: s } = Q(), u = t(X, null), g = t(Y, c(null)), _ = c(null), y = c(null), x = p(() => {
|
|
1400
1398
|
if (!i.item) return "";
|
|
1401
1399
|
let e = (i.item.filename ?? "").split(".");
|
|
1402
1400
|
return e.length > 1 ? e[e.length - 1].toLowerCase() : "";
|
|
1403
|
-
}), C =
|
|
1404
|
-
|
|
1405
|
-
e || (
|
|
1401
|
+
}), C = p(() => x.value ? `.${x.value}` : "*"), w = p(() => (i.usageInfo?.templateCount ?? 0) > 0);
|
|
1402
|
+
O(() => i.visible, (e) => {
|
|
1403
|
+
e || (y.value = null, _.value && (_.value.value = ""));
|
|
1406
1404
|
});
|
|
1407
1405
|
function E(e) {
|
|
1408
1406
|
let t = e.target;
|
|
1409
|
-
t.files && t.files.length > 0 && (
|
|
1407
|
+
t.files && t.files.length > 0 && (y.value = t.files[0]);
|
|
1410
1408
|
}
|
|
1411
|
-
function
|
|
1412
|
-
|
|
1409
|
+
function D() {
|
|
1410
|
+
y.value && o("replace", y.value);
|
|
1413
1411
|
}
|
|
1414
|
-
let k =
|
|
1415
|
-
_e(k,
|
|
1412
|
+
let k = c(null);
|
|
1413
|
+
_e(k, p(() => i.visible && i.item !== null));
|
|
1416
1414
|
function j(e) {
|
|
1417
|
-
e.stopPropagation(), e.key === "Escape" &&
|
|
1415
|
+
e.stopPropagation(), e.key === "Escape" && o("close");
|
|
1418
1416
|
}
|
|
1419
|
-
return (
|
|
1417
|
+
return (t, r) => (v(), T(f, { to: S(g) || "body" }, [d(M, {
|
|
1420
1418
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1421
1419
|
"enter-from-class": "tpl:opacity-0",
|
|
1422
1420
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -1424,14 +1422,14 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1424
1422
|
"leave-from-class": "tpl:opacity-100",
|
|
1425
1423
|
"leave-to-class": "tpl:opacity-0"
|
|
1426
1424
|
}, {
|
|
1427
|
-
default:
|
|
1425
|
+
default: l(() => [n.visible && n.item ? (v(), h("div", {
|
|
1428
1426
|
key: 0,
|
|
1429
|
-
"data-tpl-theme":
|
|
1430
|
-
class:
|
|
1427
|
+
"data-tpl-theme": S(u),
|
|
1428
|
+
class: e([S(g) ? void 0 : "tpl", "tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
1431
1429
|
style: { "background-color": "var(--tpl-overlay)" },
|
|
1432
|
-
onClick:
|
|
1430
|
+
onClick: r[1] ||= A((e) => o("close"), ["self"]),
|
|
1433
1431
|
onKeydown: j
|
|
1434
|
-
}, [
|
|
1432
|
+
}, [b("div", {
|
|
1435
1433
|
ref_key: "dialogRef",
|
|
1436
1434
|
ref: k,
|
|
1437
1435
|
role: "dialog",
|
|
@@ -1440,17 +1438,17 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1440
1438
|
class: "tpl:max-h-[90%] tpl:w-full tpl:max-w-sm tpl:overflow-y-auto tpl:rounded-lg tpl:p-5 tpl:shadow-xl",
|
|
1441
1439
|
style: { "background-color": "var(--tpl-bg-elevated)" }
|
|
1442
1440
|
}, [
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
w.value ? (
|
|
1446
|
-
|
|
1447
|
-
|
|
1441
|
+
b("h3", Rt, a(S(s).mediaLibrary.replaceWarningTitle), 1),
|
|
1442
|
+
b("p", zt, a(S(s).mediaLibrary.replaceWarningMessage.replace("{extension}", `.${x.value}`)), 1),
|
|
1443
|
+
w.value ? (v(), h("p", Bt, a(S(s).mediaLibrary.replaceWarningUsageNote.replace("{count}", n.usageInfo.templateCount.toString())), 1)) : m("", !0),
|
|
1444
|
+
b("div", Vt, [b("p", Ht, a(n.item.filename), 1)]),
|
|
1445
|
+
b("div", Ut, [b("label", Wt, a(S(s).mediaLibrary.replaceSelectFile), 1), b("input", {
|
|
1448
1446
|
ref_key: "fileInputRef",
|
|
1449
|
-
ref:
|
|
1447
|
+
ref: _,
|
|
1450
1448
|
type: "file",
|
|
1451
1449
|
accept: C.value,
|
|
1452
|
-
"aria-invalid": !!
|
|
1453
|
-
"aria-describedby":
|
|
1450
|
+
"aria-invalid": !!n.error,
|
|
1451
|
+
"aria-describedby": n.error ? "tpl-media-replace-error" : void 0,
|
|
1454
1452
|
class: "tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs",
|
|
1455
1453
|
style: {
|
|
1456
1454
|
"border-color": "var(--tpl-border)",
|
|
@@ -1459,26 +1457,26 @@ var ze = { class: "tpl:p-4" }, Be = ["aria-label"], Ve = {
|
|
|
1459
1457
|
},
|
|
1460
1458
|
onChange: E
|
|
1461
1459
|
}, null, 40, Gt)]),
|
|
1462
|
-
|
|
1463
|
-
|
|
1460
|
+
n.error ? (v(), h("p", Kt, a(n.error), 1)) : m("", !0),
|
|
1461
|
+
b("div", qt, [b("button", {
|
|
1464
1462
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
1465
1463
|
style: {
|
|
1466
1464
|
"border-color": "var(--tpl-border)",
|
|
1467
1465
|
color: "var(--tpl-text)",
|
|
1468
1466
|
"background-color": "var(--tpl-bg)"
|
|
1469
1467
|
},
|
|
1470
|
-
disabled:
|
|
1471
|
-
onClick:
|
|
1472
|
-
},
|
|
1468
|
+
disabled: n.isReplacing,
|
|
1469
|
+
onClick: r[0] ||= (e) => o("close")
|
|
1470
|
+
}, a(S(s).mediaLibrary.cancel), 9, Jt), b("button", {
|
|
1473
1471
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
1474
1472
|
style: {
|
|
1475
1473
|
"background-color": "var(--tpl-primary)",
|
|
1476
1474
|
color: "var(--tpl-on-primary)"
|
|
1477
1475
|
},
|
|
1478
|
-
disabled: !
|
|
1479
|
-
onClick:
|
|
1480
|
-
},
|
|
1481
|
-
], 512)], 42, Lt)) :
|
|
1476
|
+
disabled: !y.value || n.isReplacing,
|
|
1477
|
+
onClick: D
|
|
1478
|
+
}, a(n.isReplacing ? S(s).mediaLibrary.replacing : S(s).mediaLibrary.replace), 9, Yt)])
|
|
1479
|
+
], 512)], 42, Lt)) : m("", !0)]),
|
|
1482
1480
|
_: 1
|
|
1483
1481
|
})], 8, ["to"]));
|
|
1484
1482
|
}
|
|
@@ -1523,71 +1521,71 @@ var Qt = [
|
|
|
1523
1521
|
role: "alert",
|
|
1524
1522
|
class: "tpl:mt-1.5 tpl:text-xs tpl:break-words",
|
|
1525
1523
|
style: { color: "var(--tpl-danger)" }
|
|
1526
|
-
}, an = /* @__PURE__ */
|
|
1524
|
+
}, an = /* @__PURE__ */ D({
|
|
1527
1525
|
__name: "MediaUploadZone",
|
|
1528
1526
|
props: {
|
|
1529
1527
|
isUploading: { type: Boolean },
|
|
1530
1528
|
uploadProgress: {}
|
|
1531
1529
|
},
|
|
1532
1530
|
emits: ["upload"],
|
|
1533
|
-
setup(
|
|
1534
|
-
let
|
|
1531
|
+
setup(n, { emit: r }) {
|
|
1532
|
+
let i = r, { t: o, format: s } = Q(), l = t(Z, null), { allAcceptedInputString: u, restrictsMimeTypes: f, availableCategories: g, maxFileSize: _, isAcceptedFile: y } = he(), x = {
|
|
1535
1533
|
images: "filterImages",
|
|
1536
1534
|
documents: "filterDocuments",
|
|
1537
1535
|
videos: "filterVideos",
|
|
1538
1536
|
audio: "filterAudio"
|
|
1539
|
-
},
|
|
1540
|
-
let e =
|
|
1541
|
-
return Number.isFinite(
|
|
1537
|
+
}, C = p(() => {
|
|
1538
|
+
let e = o.mediaLibrary, t = f.value ? Zt(g.value.map((t) => e[x[t]]), l?.value) : o.mediaLibrary.acceptedAnyType;
|
|
1539
|
+
return Number.isFinite(_.value) ? s(o.mediaLibrary.acceptedFormatsMaxSize, {
|
|
1542
1540
|
formats: t,
|
|
1543
|
-
size: $(
|
|
1541
|
+
size: $(_.value)
|
|
1544
1542
|
}) : t;
|
|
1545
|
-
}),
|
|
1546
|
-
function
|
|
1543
|
+
}), T = c([]), E = c();
|
|
1544
|
+
function D(e) {
|
|
1547
1545
|
let t = [], n = [];
|
|
1548
|
-
for (let r of Array.from(e))
|
|
1549
|
-
|
|
1546
|
+
for (let r of Array.from(e)) y(r) ? t.push(r) : n.push(r.name);
|
|
1547
|
+
T.value = n, t.length && i("upload", t);
|
|
1550
1548
|
}
|
|
1551
|
-
let { isOverDropZone: O } =
|
|
1552
|
-
e?.length &&
|
|
1549
|
+
let { isOverDropZone: O } = ee(E, { onDrop: (e) => {
|
|
1550
|
+
e?.length && D(e);
|
|
1553
1551
|
} }), { open: k, onChange: A } = I({
|
|
1554
|
-
accept:
|
|
1552
|
+
accept: u.value,
|
|
1555
1553
|
multiple: !0
|
|
1556
1554
|
});
|
|
1557
1555
|
return A((e) => {
|
|
1558
|
-
e?.length &&
|
|
1559
|
-
}), (
|
|
1556
|
+
e?.length && D(e);
|
|
1557
|
+
}), (t, r) => (v(), h(w, null, [b("button", {
|
|
1560
1558
|
ref_key: "dropZoneRef",
|
|
1561
|
-
ref:
|
|
1559
|
+
ref: E,
|
|
1562
1560
|
type: "button",
|
|
1563
1561
|
"data-testid": "media-upload-zone",
|
|
1564
|
-
class:
|
|
1565
|
-
"aria-label":
|
|
1566
|
-
"aria-describedby":
|
|
1567
|
-
"aria-busy":
|
|
1562
|
+
class: e(["tpl-upload-zone tpl:flex tpl:w-full tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:rounded-lg tpl:border-2 tpl:border-dashed tpl:p-5 tpl:text-center tpl:transition-all tpl:duration-150", S(O) ? "tpl-upload-zone-active" : ""]),
|
|
1563
|
+
"aria-label": S(o).mediaLibrary.dropOrClick,
|
|
1564
|
+
"aria-describedby": n.isUploading ? void 0 : "tpl-media-upload-hint",
|
|
1565
|
+
"aria-busy": n.isUploading,
|
|
1568
1566
|
style: {
|
|
1569
1567
|
"border-color": "var(--tpl-border-light)",
|
|
1570
1568
|
"background-color": "var(--tpl-bg)"
|
|
1571
1569
|
},
|
|
1572
|
-
onClick: r[0] ||= (e) =>
|
|
1573
|
-
}, [
|
|
1570
|
+
onClick: r[0] ||= (e) => S(k)()
|
|
1571
|
+
}, [n.isUploading ? (v(), h("div", $t, [d(S(V), {
|
|
1574
1572
|
class: "tpl-spinner",
|
|
1575
1573
|
size: 20,
|
|
1576
1574
|
"stroke-width": 2,
|
|
1577
1575
|
style: { color: "var(--tpl-primary)" }
|
|
1578
|
-
}),
|
|
1579
|
-
current:
|
|
1580
|
-
total:
|
|
1581
|
-
}) :
|
|
1582
|
-
|
|
1576
|
+
}), b("span", en, a(n.uploadProgress && n.uploadProgress.total > 1 ? S(s)(S(o).mediaLibrary.uploadingProgress, {
|
|
1577
|
+
current: n.uploadProgress.current,
|
|
1578
|
+
total: n.uploadProgress.total
|
|
1579
|
+
}) : S(o).mediaLibrary.uploading), 1)])) : (v(), h(w, { key: 1 }, [
|
|
1580
|
+
d(S(re), {
|
|
1583
1581
|
class: "tpl:mb-2",
|
|
1584
1582
|
size: 24,
|
|
1585
1583
|
"stroke-width": 1.5,
|
|
1586
1584
|
style: { color: "var(--tpl-text-dim)" }
|
|
1587
1585
|
}),
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
], 64))], 10, Qt),
|
|
1586
|
+
b("p", tn, a(S(o).mediaLibrary.dropOrClick), 1),
|
|
1587
|
+
b("p", nn, a(C.value), 1)
|
|
1588
|
+
], 64))], 10, Qt), T.value.length ? (v(), h("p", rn, a(S(s)(S(o).mediaLibrary.uploadRejected, { files: T.value.join(", ") })), 1)) : m("", !0)], 64));
|
|
1591
1589
|
}
|
|
1592
1590
|
}), on = ["aria-label"], sn = [
|
|
1593
1591
|
"width",
|
|
@@ -1613,52 +1611,52 @@ var Qt = [
|
|
|
1613
1611
|
"background-color": "var(--tpl-text)",
|
|
1614
1612
|
color: "var(--tpl-bg-elevated)"
|
|
1615
1613
|
}
|
|
1616
|
-
}, dn = /* @__PURE__ */
|
|
1614
|
+
}, dn = /* @__PURE__ */ D({
|
|
1617
1615
|
__name: "StorageProgressRing",
|
|
1618
1616
|
props: {
|
|
1619
1617
|
usedBytes: {},
|
|
1620
1618
|
limitBytes: {},
|
|
1621
1619
|
size: {}
|
|
1622
1620
|
},
|
|
1623
|
-
setup(
|
|
1624
|
-
let
|
|
1625
|
-
used:
|
|
1626
|
-
total:
|
|
1627
|
-
remaining:
|
|
1621
|
+
setup(e) {
|
|
1622
|
+
let t = e, { t: n, format: r } = Q(), i = c(!1), o = p(() => t.size ?? 24), s = p(() => Math.max(2, o.value / 8)), u = p(() => (o.value - s.value) / 2), f = p(() => 2 * Math.PI * u.value), _ = p(() => t.limitBytes <= 0 ? 0 : Math.min(100, t.usedBytes / t.limitBytes * 100)), y = p(() => f.value - _.value / 100 * f.value), x = p(() => _.value >= 95 ? "var(--tpl-danger)" : _.value >= 75 ? "var(--tpl-warning)" : "var(--tpl-primary)"), S = p(() => $(t.usedBytes)), C = p(() => $(t.limitBytes)), w = p(() => Math.max(0, t.limitBytes - t.usedBytes)), T = p(() => $(w.value)), E = p(() => r(n.mediaLibrary.storageTooltip, {
|
|
1623
|
+
used: S.value,
|
|
1624
|
+
total: C.value,
|
|
1625
|
+
remaining: T.value
|
|
1628
1626
|
}));
|
|
1629
|
-
return (
|
|
1627
|
+
return (e, t) => (v(), h("div", {
|
|
1630
1628
|
"data-testid": "media-storage-ring",
|
|
1631
1629
|
class: "tpl:relative tpl:inline-flex tpl:cursor-help tpl:items-center tpl:justify-center",
|
|
1632
1630
|
tabindex: "0",
|
|
1633
|
-
"aria-label":
|
|
1634
|
-
onMouseenter:
|
|
1635
|
-
onMouseleave:
|
|
1636
|
-
onFocus:
|
|
1637
|
-
onBlur:
|
|
1638
|
-
}, [(
|
|
1639
|
-
width:
|
|
1640
|
-
height:
|
|
1631
|
+
"aria-label": E.value,
|
|
1632
|
+
onMouseenter: t[0] ||= (e) => i.value = !0,
|
|
1633
|
+
onMouseleave: t[1] ||= (e) => i.value = !1,
|
|
1634
|
+
onFocus: t[2] ||= (e) => i.value = !0,
|
|
1635
|
+
onBlur: t[3] ||= (e) => i.value = !1
|
|
1636
|
+
}, [(v(), h("svg", {
|
|
1637
|
+
width: o.value,
|
|
1638
|
+
height: o.value,
|
|
1641
1639
|
class: "tpl:-rotate-90",
|
|
1642
|
-
viewBox: `0 0 ${
|
|
1643
|
-
}, [
|
|
1644
|
-
cx:
|
|
1645
|
-
cy:
|
|
1646
|
-
r:
|
|
1640
|
+
viewBox: `0 0 ${o.value} ${o.value}`
|
|
1641
|
+
}, [b("circle", {
|
|
1642
|
+
cx: o.value / 2,
|
|
1643
|
+
cy: o.value / 2,
|
|
1644
|
+
r: u.value,
|
|
1647
1645
|
fill: "none",
|
|
1648
|
-
"stroke-width":
|
|
1646
|
+
"stroke-width": s.value,
|
|
1649
1647
|
style: { stroke: "var(--tpl-border)" }
|
|
1650
|
-
}, null, 8, cn),
|
|
1651
|
-
cx:
|
|
1652
|
-
cy:
|
|
1653
|
-
r:
|
|
1648
|
+
}, null, 8, cn), b("circle", {
|
|
1649
|
+
cx: o.value / 2,
|
|
1650
|
+
cy: o.value / 2,
|
|
1651
|
+
r: u.value,
|
|
1654
1652
|
fill: "none",
|
|
1655
|
-
"stroke-width":
|
|
1656
|
-
stroke:
|
|
1653
|
+
"stroke-width": s.value,
|
|
1654
|
+
stroke: x.value,
|
|
1657
1655
|
"stroke-linecap": "round",
|
|
1658
|
-
"stroke-dasharray":
|
|
1659
|
-
"stroke-dashoffset":
|
|
1656
|
+
"stroke-dasharray": f.value,
|
|
1657
|
+
"stroke-dashoffset": y.value,
|
|
1660
1658
|
class: "tpl:transition-all tpl:duration-300 tpl:ease-out"
|
|
1661
|
-
}, null, 8, ln)], 8, sn)),
|
|
1659
|
+
}, null, 8, ln)], 8, sn)), d(M, {
|
|
1662
1660
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
1663
1661
|
"enter-from-class": "tpl:opacity-0 tpl:translate-y-1",
|
|
1664
1662
|
"enter-to-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
@@ -1666,10 +1664,10 @@ var Qt = [
|
|
|
1666
1664
|
"leave-from-class": "tpl:opacity-100 tpl:translate-y-0",
|
|
1667
1665
|
"leave-to-class": "tpl:opacity-0 tpl:translate-y-1"
|
|
1668
1666
|
}, {
|
|
1669
|
-
default:
|
|
1667
|
+
default: l(() => [i.value ? (v(), h("div", un, [g(a(E.value) + " ", 1), t[4] ||= b("div", {
|
|
1670
1668
|
class: "tpl:absolute tpl:-top-1 tpl:left-1/2 tpl:size-2 tpl:-translate-x-1/2 tpl:rotate-45",
|
|
1671
1669
|
style: { "background-color": "var(--tpl-text)" }
|
|
1672
|
-
}, null, -1)])) :
|
|
1670
|
+
}, null, -1)])) : m("", !0)]),
|
|
1673
1671
|
_: 1
|
|
1674
1672
|
})], 40, on));
|
|
1675
1673
|
}
|
|
@@ -1696,7 +1694,7 @@ function pn(e) {
|
|
|
1696
1694
|
function r() {
|
|
1697
1695
|
return "value" in n && typeof n.value == "object" ? n.value : n;
|
|
1698
1696
|
}
|
|
1699
|
-
let i =
|
|
1697
|
+
let i = c("grid"), a = c(!1), o = c(""), s = c(null), l = c(!1), u = c(!1), d = p(() => t.previewItem.value?.url ?? null), f = p(() => t.frequentlyUsedItems.value.length > 0), m = p(() => t.viewMode.value === "frequently-used" ? t.frequentlyUsedItems.value : t.items.value), h = p(() => Object.values(t.deleteUsageInfo.value).some((e) => e.templateCount > 0)), g = p(() => fn(t.folders.value)), _ = {
|
|
1700
1698
|
images: () => r().mediaLibrary.filterImages,
|
|
1701
1699
|
documents: () => r().mediaLibrary.filterDocuments,
|
|
1702
1700
|
videos: () => r().mediaLibrary.filterVideos,
|
|
@@ -1705,7 +1703,7 @@ function pn(e) {
|
|
|
1705
1703
|
function v(e) {
|
|
1706
1704
|
return _[e]?.() ?? e;
|
|
1707
1705
|
}
|
|
1708
|
-
|
|
1706
|
+
O(a, (e) => {
|
|
1709
1707
|
e && t.loadFolders();
|
|
1710
1708
|
});
|
|
1711
1709
|
let y = N((e) => {
|
|
@@ -1724,13 +1722,13 @@ function pn(e) {
|
|
|
1724
1722
|
function w(e) {
|
|
1725
1723
|
t.selectItem(e);
|
|
1726
1724
|
}
|
|
1727
|
-
async function
|
|
1725
|
+
async function T(e, n) {
|
|
1728
1726
|
await t.createFolder(e, n);
|
|
1729
1727
|
}
|
|
1730
|
-
async function
|
|
1728
|
+
async function E(e, n) {
|
|
1731
1729
|
await t.renameFolder(e, n);
|
|
1732
1730
|
}
|
|
1733
|
-
async function
|
|
1731
|
+
async function D(e) {
|
|
1734
1732
|
await t.deleteFolder(e);
|
|
1735
1733
|
}
|
|
1736
1734
|
function k(e) {
|
|
@@ -1751,10 +1749,10 @@ function pn(e) {
|
|
|
1751
1749
|
function I(e) {
|
|
1752
1750
|
t.checkUsageBeforeReplace(e);
|
|
1753
1751
|
}
|
|
1754
|
-
async function
|
|
1752
|
+
async function ee(e) {
|
|
1755
1753
|
await t.replaceFile(e);
|
|
1756
1754
|
}
|
|
1757
|
-
function
|
|
1755
|
+
function L() {
|
|
1758
1756
|
t.clearSelection(), t.cancelDelete(), t.cancelReplace(), o.value = "", t.searchQuery.value = "", t.categoryFilter.value = null, t.sortOption.value = "newest", t.viewMode.value = "files", s.value = null, l.value = !1;
|
|
1759
1757
|
}
|
|
1760
1758
|
return {
|
|
@@ -1764,8 +1762,8 @@ function pn(e) {
|
|
|
1764
1762
|
editingItem: s,
|
|
1765
1763
|
showImportUrlModal: l,
|
|
1766
1764
|
showMovePicker: u,
|
|
1767
|
-
selectedUrl:
|
|
1768
|
-
hasFrequentlyUsed:
|
|
1765
|
+
selectedUrl: d,
|
|
1766
|
+
hasFrequentlyUsed: f,
|
|
1769
1767
|
displayItems: m,
|
|
1770
1768
|
hasUsedFiles: h,
|
|
1771
1769
|
folderTree: g,
|
|
@@ -1775,23 +1773,23 @@ function pn(e) {
|
|
|
1775
1773
|
handleSearchInput: b,
|
|
1776
1774
|
handleUpload: C,
|
|
1777
1775
|
handleSelect: w,
|
|
1778
|
-
handleCreateFolder:
|
|
1779
|
-
handleRenameFolder:
|
|
1780
|
-
handleDeleteFolder:
|
|
1776
|
+
handleCreateFolder: T,
|
|
1777
|
+
handleRenameFolder: E,
|
|
1778
|
+
handleDeleteFolder: D,
|
|
1781
1779
|
handleEditItem: k,
|
|
1782
1780
|
handleEditSave: A,
|
|
1783
1781
|
handleImportFromUrl: j,
|
|
1784
1782
|
handleMoveToFolder: M,
|
|
1785
1783
|
handleDeleteClick: P,
|
|
1786
1784
|
handleReplaceItem: I,
|
|
1787
|
-
handleReplaceFile:
|
|
1788
|
-
resetUI:
|
|
1785
|
+
handleReplaceFile: ee,
|
|
1786
|
+
resetUI: L
|
|
1789
1787
|
};
|
|
1790
1788
|
}
|
|
1791
1789
|
//#endregion
|
|
1792
1790
|
//#region ../media-library/src/composable.ts
|
|
1793
1791
|
function mn(e) {
|
|
1794
|
-
let { provider: t } = e, n =
|
|
1792
|
+
let { provider: t } = e, n = c([]), r = c([]), i = c(null), a = c("files"), o = c(""), s = c(null), l = c("newest"), u = c(!1), d = c(!1), f = c(!1), p = c(null), m = c(null), h = c(/* @__PURE__ */ new Set()), g = c(null), v = c([]), y = c({}), b = c(!1), x = c([]), S = c(!1), C = c(null), w = c(!1), T = c(null), E = c(!1), D = c(null), O = c(null), k = c(null), A = 0;
|
|
1795
1793
|
function j(t) {
|
|
1796
1794
|
try {
|
|
1797
1795
|
t();
|
|
@@ -1803,7 +1801,7 @@ function mn(e) {
|
|
|
1803
1801
|
return t.folders === !1 ? null : t.folders;
|
|
1804
1802
|
}
|
|
1805
1803
|
function N() {
|
|
1806
|
-
return
|
|
1804
|
+
return _(e.templateId);
|
|
1807
1805
|
}
|
|
1808
1806
|
function P(e) {
|
|
1809
1807
|
let t = {};
|
|
@@ -1813,7 +1811,7 @@ function mn(e) {
|
|
|
1813
1811
|
}
|
|
1814
1812
|
async function F() {
|
|
1815
1813
|
let r = ++A;
|
|
1816
|
-
|
|
1814
|
+
u.value = !0;
|
|
1817
1815
|
let i = P();
|
|
1818
1816
|
try {
|
|
1819
1817
|
let e = await t.list(i);
|
|
@@ -1823,13 +1821,13 @@ function mn(e) {
|
|
|
1823
1821
|
if (r !== A) return;
|
|
1824
1822
|
e.onError?.(t);
|
|
1825
1823
|
} finally {
|
|
1826
|
-
r === A && (
|
|
1824
|
+
r === A && (u.value = !1);
|
|
1827
1825
|
}
|
|
1828
1826
|
}
|
|
1829
1827
|
async function I() {
|
|
1830
|
-
if (!f.value || !p.value ||
|
|
1828
|
+
if (!f.value || !p.value || u.value) return;
|
|
1831
1829
|
let r = ++A;
|
|
1832
|
-
|
|
1830
|
+
u.value = !0;
|
|
1833
1831
|
let i = P(p.value);
|
|
1834
1832
|
try {
|
|
1835
1833
|
let e = await t.list(i);
|
|
@@ -1839,17 +1837,17 @@ function mn(e) {
|
|
|
1839
1837
|
if (r !== A) return;
|
|
1840
1838
|
e.onError?.(t);
|
|
1841
1839
|
} finally {
|
|
1842
|
-
r === A && (
|
|
1840
|
+
r === A && (u.value = !1);
|
|
1843
1841
|
}
|
|
1844
1842
|
}
|
|
1845
|
-
async function
|
|
1843
|
+
async function ee(e) {
|
|
1846
1844
|
o.value = e, await F();
|
|
1847
1845
|
}
|
|
1848
|
-
async function
|
|
1846
|
+
async function L(e) {
|
|
1849
1847
|
s.value = e, await F();
|
|
1850
1848
|
}
|
|
1851
|
-
async function
|
|
1852
|
-
|
|
1849
|
+
async function R(e) {
|
|
1850
|
+
l.value = e, await F();
|
|
1853
1851
|
}
|
|
1854
1852
|
async function z(e) {
|
|
1855
1853
|
a.value = "files", i.value = e, o.value = "", h.value = /* @__PURE__ */ new Set(), g.value = null, await F();
|
|
@@ -1860,7 +1858,7 @@ function mn(e) {
|
|
|
1860
1858
|
async function te(r) {
|
|
1861
1859
|
let { create: a } = t;
|
|
1862
1860
|
if (typeof a != "function") return null;
|
|
1863
|
-
|
|
1861
|
+
d.value = !0;
|
|
1864
1862
|
try {
|
|
1865
1863
|
let e = { file: r };
|
|
1866
1864
|
i.value != null && (e.folderId = i.value);
|
|
@@ -1871,13 +1869,13 @@ function mn(e) {
|
|
|
1871
1869
|
} catch (t) {
|
|
1872
1870
|
return e.onError?.(t), null;
|
|
1873
1871
|
} finally {
|
|
1874
|
-
|
|
1872
|
+
d.value = !1;
|
|
1875
1873
|
}
|
|
1876
1874
|
}
|
|
1877
1875
|
async function ne(r) {
|
|
1878
1876
|
let { create: a } = t;
|
|
1879
1877
|
if (typeof a == "function") {
|
|
1880
|
-
|
|
1878
|
+
d.value = !0, m.value = {
|
|
1881
1879
|
current: 0,
|
|
1882
1880
|
total: r.length
|
|
1883
1881
|
};
|
|
@@ -1899,7 +1897,7 @@ function mn(e) {
|
|
|
1899
1897
|
}
|
|
1900
1898
|
}
|
|
1901
1899
|
} finally {
|
|
1902
|
-
|
|
1900
|
+
d.value = !1, m.value = null;
|
|
1903
1901
|
}
|
|
1904
1902
|
}
|
|
1905
1903
|
}
|
|
@@ -1932,19 +1930,19 @@ function mn(e) {
|
|
|
1932
1930
|
function V(e) {
|
|
1933
1931
|
let t = /* @__PURE__ */ new Map();
|
|
1934
1932
|
for (let r of n.value) e.includes(r.id) && t.set(r.id, r);
|
|
1935
|
-
for (let n of
|
|
1933
|
+
for (let n of v.value) e.includes(n.id) && !t.has(n.id) && t.set(n.id, n);
|
|
1936
1934
|
return [...t.values()];
|
|
1937
1935
|
}
|
|
1938
|
-
function
|
|
1939
|
-
n.value = n.value.filter((t) => !e.includes(t.id)),
|
|
1936
|
+
function ae(e) {
|
|
1937
|
+
n.value = n.value.filter((t) => !e.includes(t.id)), v.value = v.value.filter((t) => !e.includes(t.id)), h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
1940
1938
|
}
|
|
1941
|
-
async function
|
|
1939
|
+
async function H() {
|
|
1942
1940
|
if (h.value.size === 0) return;
|
|
1943
1941
|
let { delete: n } = t;
|
|
1944
1942
|
if (typeof n != "function") return;
|
|
1945
1943
|
let r = [...h.value], i = V(r);
|
|
1946
1944
|
try {
|
|
1947
|
-
await n(r),
|
|
1945
|
+
await n(r), ae(r);
|
|
1948
1946
|
for (let e of i) j(() => t.onDeleted?.(e));
|
|
1949
1947
|
} catch (t) {
|
|
1950
1948
|
e.onError?.(t);
|
|
@@ -1953,63 +1951,63 @@ function mn(e) {
|
|
|
1953
1951
|
async function U() {
|
|
1954
1952
|
let { frequentlyUsed: n } = t;
|
|
1955
1953
|
if (typeof n == "function") try {
|
|
1956
|
-
|
|
1954
|
+
v.value = await n();
|
|
1957
1955
|
} catch (t) {
|
|
1958
1956
|
e.onError?.(t);
|
|
1959
1957
|
}
|
|
1960
1958
|
}
|
|
1961
|
-
async function
|
|
1959
|
+
async function W() {
|
|
1962
1960
|
if (h.value.size === 0) return !1;
|
|
1963
|
-
|
|
1961
|
+
x.value = [...h.value];
|
|
1964
1962
|
let { checkUsage: n } = t;
|
|
1965
|
-
if (typeof n != "function") return
|
|
1963
|
+
if (typeof n != "function") return y.value = {}, b.value = !0, !1;
|
|
1966
1964
|
try {
|
|
1967
|
-
let e = await n(
|
|
1968
|
-
|
|
1965
|
+
let e = await n(x.value);
|
|
1966
|
+
y.value = e;
|
|
1969
1967
|
let t = Object.values(e).some((e) => e.templateCount > 0);
|
|
1970
|
-
return
|
|
1968
|
+
return b.value = !0, t;
|
|
1971
1969
|
} catch (t) {
|
|
1972
1970
|
return e.onError?.(t), !1;
|
|
1973
1971
|
}
|
|
1974
1972
|
}
|
|
1975
|
-
async function
|
|
1973
|
+
async function oe() {
|
|
1976
1974
|
let { delete: n } = t;
|
|
1977
|
-
if (typeof n != "function" || (
|
|
1978
|
-
let r =
|
|
1975
|
+
if (typeof n != "function" || (b.value = !1, x.value.length === 0)) return;
|
|
1976
|
+
let r = x.value, i = V(r);
|
|
1979
1977
|
try {
|
|
1980
|
-
await n(r),
|
|
1978
|
+
await n(r), ae(r), x.value = [], y.value = {};
|
|
1981
1979
|
for (let e of i) j(() => t.onDeleted?.(e));
|
|
1982
1980
|
} catch (t) {
|
|
1983
1981
|
e.onError?.(t);
|
|
1984
1982
|
}
|
|
1985
1983
|
}
|
|
1986
|
-
function
|
|
1987
|
-
|
|
1984
|
+
function se() {
|
|
1985
|
+
b.value = !1, x.value = [], y.value = {};
|
|
1988
1986
|
}
|
|
1989
|
-
async function
|
|
1987
|
+
async function ce(r) {
|
|
1990
1988
|
let a = t.importFromUrl;
|
|
1991
1989
|
if (typeof a != "function") return null;
|
|
1992
|
-
|
|
1990
|
+
S.value = !0, C.value = null;
|
|
1993
1991
|
try {
|
|
1994
1992
|
let e = await a(r, i.value, N());
|
|
1995
1993
|
return n.value = [e, ...n.value], j(() => t.onCreated?.(e)), e;
|
|
1996
1994
|
} catch (t) {
|
|
1997
|
-
return
|
|
1995
|
+
return C.value = t instanceof Error ? t.message : "Import failed", e.onError?.(t), null;
|
|
1998
1996
|
} finally {
|
|
1999
|
-
|
|
1997
|
+
S.value = !1;
|
|
2000
1998
|
}
|
|
2001
1999
|
}
|
|
2002
|
-
function
|
|
2000
|
+
function G(e) {
|
|
2003
2001
|
let t = new Set(h.value);
|
|
2004
2002
|
t.has(e) ? t.delete(e) : t.add(e), h.value = t;
|
|
2005
2003
|
}
|
|
2006
|
-
function
|
|
2004
|
+
function K() {
|
|
2007
2005
|
h.value = /* @__PURE__ */ new Set(), g.value = null;
|
|
2008
2006
|
}
|
|
2009
|
-
function
|
|
2007
|
+
function q(e) {
|
|
2010
2008
|
g.value = e, h.value = /* @__PURE__ */ new Set([e.id]);
|
|
2011
2009
|
}
|
|
2012
|
-
async function
|
|
2010
|
+
async function le() {
|
|
2013
2011
|
let { storage: n } = t;
|
|
2014
2012
|
if (typeof n != "function") k.value = null;
|
|
2015
2013
|
else try {
|
|
@@ -2018,7 +2016,7 @@ function mn(e) {
|
|
|
2018
2016
|
e.onError?.(t);
|
|
2019
2017
|
}
|
|
2020
2018
|
}
|
|
2021
|
-
async function
|
|
2019
|
+
async function J() {
|
|
2022
2020
|
let t = M();
|
|
2023
2021
|
if (t) try {
|
|
2024
2022
|
r.value = await t.list();
|
|
@@ -2026,40 +2024,40 @@ function mn(e) {
|
|
|
2026
2024
|
e.onError?.(t);
|
|
2027
2025
|
}
|
|
2028
2026
|
}
|
|
2029
|
-
async function
|
|
2027
|
+
async function ue(t, n) {
|
|
2030
2028
|
let { create: r } = M() ?? { create: !1 };
|
|
2031
2029
|
if (typeof r != "function") return null;
|
|
2032
2030
|
try {
|
|
2033
2031
|
let e = { name: t };
|
|
2034
2032
|
n !== void 0 && (e.parentId = n);
|
|
2035
2033
|
let i = await r(e);
|
|
2036
|
-
return await
|
|
2034
|
+
return await J(), i;
|
|
2037
2035
|
} catch (t) {
|
|
2038
2036
|
return e.onError?.(t), null;
|
|
2039
2037
|
}
|
|
2040
2038
|
}
|
|
2041
|
-
function
|
|
2039
|
+
function de(e, t) {
|
|
2042
2040
|
for (let n of e) if (n.id === t) return n;
|
|
2043
2041
|
return null;
|
|
2044
2042
|
}
|
|
2045
|
-
async function
|
|
2043
|
+
async function Y(t, n) {
|
|
2046
2044
|
let { update: r } = M() ?? { update: !1 };
|
|
2047
2045
|
if (typeof r == "function") try {
|
|
2048
|
-
await r(t, { name: n }), await
|
|
2046
|
+
await r(t, { name: n }), await J();
|
|
2049
2047
|
} catch (t) {
|
|
2050
2048
|
e.onError?.(t);
|
|
2051
2049
|
}
|
|
2052
2050
|
}
|
|
2053
|
-
async function
|
|
2051
|
+
async function fe(t) {
|
|
2054
2052
|
let { delete: n } = M() ?? { delete: !1 };
|
|
2055
2053
|
if (typeof n == "function") try {
|
|
2056
|
-
let e =
|
|
2057
|
-
await n(t), i.value === t && (i.value = e), await
|
|
2054
|
+
let e = de(r.value, t)?.parentId ?? null;
|
|
2055
|
+
await n(t), i.value === t && (i.value = e), await J(), await F();
|
|
2058
2056
|
} catch (t) {
|
|
2059
2057
|
e.onError?.(t);
|
|
2060
2058
|
}
|
|
2061
2059
|
}
|
|
2062
|
-
async function
|
|
2060
|
+
async function X(n) {
|
|
2063
2061
|
D.value = n, T.value = null;
|
|
2064
2062
|
let { checkUsage: r } = t;
|
|
2065
2063
|
if (typeof r != "function") O.value = null, E.value = !0;
|
|
@@ -2070,31 +2068,31 @@ function mn(e) {
|
|
|
2070
2068
|
e.onError?.(t);
|
|
2071
2069
|
}
|
|
2072
2070
|
}
|
|
2073
|
-
function
|
|
2071
|
+
function Z() {
|
|
2074
2072
|
E.value = !1, D.value = null, O.value = null, T.value = null;
|
|
2075
2073
|
}
|
|
2076
|
-
function
|
|
2077
|
-
n.value = n.value.map((t) => t.id === e.id ? e : t),
|
|
2074
|
+
function pe(e) {
|
|
2075
|
+
n.value = n.value.map((t) => t.id === e.id ? e : t), v.value = v.value.map((t) => t.id === e.id ? e : t), g.value?.id === e.id && (g.value = e), j(() => t.onUpdated?.(e));
|
|
2078
2076
|
}
|
|
2079
|
-
async function
|
|
2077
|
+
async function Q(n) {
|
|
2080
2078
|
let { replace: r } = t;
|
|
2081
2079
|
if (typeof r != "function" || !D.value) return null;
|
|
2082
|
-
|
|
2080
|
+
w.value = !0, T.value = null;
|
|
2083
2081
|
try {
|
|
2084
2082
|
let e = await r(D.value.id, n);
|
|
2085
|
-
return
|
|
2083
|
+
return pe(e), E.value = !1, D.value = null, O.value = null, e;
|
|
2086
2084
|
} catch (t) {
|
|
2087
2085
|
return T.value = t instanceof Error ? t.message : "Replace failed", e.onError?.(t), null;
|
|
2088
2086
|
} finally {
|
|
2089
|
-
|
|
2087
|
+
w.value = !1;
|
|
2090
2088
|
}
|
|
2091
2089
|
}
|
|
2092
|
-
async function
|
|
2090
|
+
async function me(n, r) {
|
|
2093
2091
|
let { replace: i } = t;
|
|
2094
2092
|
if (typeof i != "function") return null;
|
|
2095
2093
|
try {
|
|
2096
2094
|
let e = await i(n, r);
|
|
2097
|
-
return
|
|
2095
|
+
return pe(e), e;
|
|
2098
2096
|
} catch (t) {
|
|
2099
2097
|
return e.onError?.(t), null;
|
|
2100
2098
|
}
|
|
@@ -2106,54 +2104,54 @@ function mn(e) {
|
|
|
2106
2104
|
viewMode: a,
|
|
2107
2105
|
searchQuery: o,
|
|
2108
2106
|
categoryFilter: s,
|
|
2109
|
-
sortOption:
|
|
2110
|
-
isLoading:
|
|
2111
|
-
isUploading:
|
|
2107
|
+
sortOption: l,
|
|
2108
|
+
isLoading: u,
|
|
2109
|
+
isUploading: d,
|
|
2112
2110
|
uploadProgress: m,
|
|
2113
2111
|
hasMore: f,
|
|
2114
2112
|
selectedItems: h,
|
|
2115
2113
|
previewItem: g,
|
|
2116
|
-
frequentlyUsedItems:
|
|
2117
|
-
deleteUsageInfo:
|
|
2118
|
-
showDeleteWarning:
|
|
2114
|
+
frequentlyUsedItems: v,
|
|
2115
|
+
deleteUsageInfo: y,
|
|
2116
|
+
showDeleteWarning: b,
|
|
2119
2117
|
loadItems: F,
|
|
2120
2118
|
loadMore: I,
|
|
2121
|
-
search:
|
|
2122
|
-
filterByCategory:
|
|
2123
|
-
sortBy:
|
|
2119
|
+
search: ee,
|
|
2120
|
+
filterByCategory: L,
|
|
2121
|
+
sortBy: R,
|
|
2124
2122
|
navigateToFolder: z,
|
|
2125
2123
|
showFrequentlyUsed: B,
|
|
2126
2124
|
uploadFile: te,
|
|
2127
2125
|
uploadFiles: ne,
|
|
2128
2126
|
moveSelected: re,
|
|
2129
2127
|
updateFile: ie,
|
|
2130
|
-
deleteSelected:
|
|
2131
|
-
isImportingFromUrl:
|
|
2132
|
-
importFromUrlError:
|
|
2133
|
-
importFromUrl:
|
|
2134
|
-
toggleSelection:
|
|
2135
|
-
clearSelection:
|
|
2136
|
-
selectItem:
|
|
2137
|
-
loadFolders:
|
|
2138
|
-
createFolder:
|
|
2139
|
-
renameFolder:
|
|
2140
|
-
deleteFolder:
|
|
2141
|
-
findFolderInTree:
|
|
2128
|
+
deleteSelected: H,
|
|
2129
|
+
isImportingFromUrl: S,
|
|
2130
|
+
importFromUrlError: C,
|
|
2131
|
+
importFromUrl: ce,
|
|
2132
|
+
toggleSelection: G,
|
|
2133
|
+
clearSelection: K,
|
|
2134
|
+
selectItem: q,
|
|
2135
|
+
loadFolders: J,
|
|
2136
|
+
createFolder: ue,
|
|
2137
|
+
renameFolder: Y,
|
|
2138
|
+
deleteFolder: fe,
|
|
2139
|
+
findFolderInTree: de,
|
|
2142
2140
|
loadFrequentlyUsed: U,
|
|
2143
|
-
checkUsageBeforeDelete:
|
|
2144
|
-
confirmDelete:
|
|
2145
|
-
cancelDelete:
|
|
2146
|
-
isReplacing:
|
|
2141
|
+
checkUsageBeforeDelete: W,
|
|
2142
|
+
confirmDelete: oe,
|
|
2143
|
+
cancelDelete: se,
|
|
2144
|
+
isReplacing: w,
|
|
2147
2145
|
replaceError: T,
|
|
2148
2146
|
showReplaceWarning: E,
|
|
2149
2147
|
pendingReplaceItem: D,
|
|
2150
2148
|
replaceUsageInfo: O,
|
|
2151
|
-
checkUsageBeforeReplace:
|
|
2152
|
-
cancelReplace:
|
|
2153
|
-
replaceFile:
|
|
2154
|
-
replaceMediaDirectly:
|
|
2149
|
+
checkUsageBeforeReplace: X,
|
|
2150
|
+
cancelReplace: Z,
|
|
2151
|
+
replaceFile: Q,
|
|
2152
|
+
replaceMediaDirectly: me,
|
|
2155
2153
|
storageInfo: k,
|
|
2156
|
-
loadStorage:
|
|
2154
|
+
loadStorage: le
|
|
2157
2155
|
};
|
|
2158
2156
|
}
|
|
2159
2157
|
//#endregion
|
|
@@ -2233,7 +2231,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2233
2231
|
}, Yn = {
|
|
2234
2232
|
key: 1,
|
|
2235
2233
|
class: "tpl:relative"
|
|
2236
|
-
}, Xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Zn = ["data-testid", "disabled"], Qn = /* @__PURE__ */
|
|
2234
|
+
}, Xn = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Zn = ["data-testid", "disabled"], Qn = /* @__PURE__ */ D({
|
|
2237
2235
|
__name: "MediaLibraryChrome",
|
|
2238
2236
|
props: {
|
|
2239
2237
|
provider: {},
|
|
@@ -2250,111 +2248,111 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2250
2248
|
"confirm",
|
|
2251
2249
|
"ready"
|
|
2252
2250
|
],
|
|
2253
|
-
setup(
|
|
2254
|
-
let
|
|
2251
|
+
setup(t, { expose: n, emit: r }) {
|
|
2252
|
+
let c = t, u = r, f = E(() => import("./MediaEditModal-DHtkZ4OU.js")), _ = p(() => c.translations), x = p(() => c.confirmTestId ?? "media-confirm"), C = {
|
|
2255
2253
|
get maxFileSize() {
|
|
2256
|
-
return
|
|
2254
|
+
return c.provider.maxFileSize;
|
|
2257
2255
|
},
|
|
2258
2256
|
get mimeTypes() {
|
|
2259
|
-
return
|
|
2257
|
+
return c.provider.mimeTypes;
|
|
2260
2258
|
},
|
|
2261
2259
|
get accept() {
|
|
2262
|
-
return
|
|
2260
|
+
return c.accept;
|
|
2263
2261
|
}
|
|
2264
2262
|
};
|
|
2265
|
-
|
|
2266
|
-
let { isAcceptedMimeType:
|
|
2267
|
-
provider:
|
|
2268
|
-
templateId: () =>
|
|
2269
|
-
onError: (e) =>
|
|
2263
|
+
i(de, C);
|
|
2264
|
+
let { isAcceptedMimeType: D, availableCategories: k } = he(C), j = mn({
|
|
2265
|
+
provider: c.provider,
|
|
2266
|
+
templateId: () => c.templateId,
|
|
2267
|
+
onError: (e) => c.onError?.(e)
|
|
2270
2268
|
}), N = pn({
|
|
2271
2269
|
library: j,
|
|
2272
|
-
translations:
|
|
2273
|
-
}), P =
|
|
2274
|
-
let e =
|
|
2270
|
+
translations: _
|
|
2271
|
+
}), P = p(() => typeof c.provider.create == "function"), F = p(() => c.provider.folders !== !1), I = p(() => typeof c.provider.importFromUrl == "function"), ee = p(() => typeof c.provider.delete == "function"), L = p(() => typeof c.provider.update == "function"), R = p(() => typeof c.provider.replace == "function"), z = p(() => typeof c.provider.frequentlyUsed == "function"), te = p(() => {
|
|
2272
|
+
let e = c.provider.folders;
|
|
2275
2273
|
return e !== !1 && typeof e.move == "function";
|
|
2276
|
-
}),
|
|
2277
|
-
let e =
|
|
2274
|
+
}), re = p(() => {
|
|
2275
|
+
let e = c.provider.folders;
|
|
2278
2276
|
return e !== !1 && typeof e.create == "function";
|
|
2279
|
-
}),
|
|
2280
|
-
let e =
|
|
2277
|
+
}), V = p(() => {
|
|
2278
|
+
let e = c.provider.folders;
|
|
2281
2279
|
return e !== !1 && typeof e.update == "function";
|
|
2282
|
-
}),
|
|
2283
|
-
let e =
|
|
2280
|
+
}), H = p(() => {
|
|
2281
|
+
let e = c.provider.folders;
|
|
2284
2282
|
return e !== !1 && typeof e.delete == "function";
|
|
2285
|
-
}), U =
|
|
2283
|
+
}), U = p(() => j.isLoading.value && N.displayItems.value.length === 0), W = p(() => {
|
|
2286
2284
|
let e = j.previewItem.value;
|
|
2287
|
-
return e ? !
|
|
2288
|
-
}),
|
|
2289
|
-
if (!
|
|
2285
|
+
return e ? !c.accept?.length || D(e.mimeType ?? "", c.accept) : !1;
|
|
2286
|
+
}), se = p(() => {
|
|
2287
|
+
if (!ee.value) return 0;
|
|
2290
2288
|
let e = 0;
|
|
2291
2289
|
for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && (e += 1);
|
|
2292
2290
|
return e;
|
|
2293
|
-
}),
|
|
2294
|
-
function G() {
|
|
2295
|
-
return W.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : j.showDeleteWarning.value ? (j.cancelDelete(), !0) : !1;
|
|
2296
|
-
}
|
|
2291
|
+
}), G = p(() => N.showImportUrlModal.value || N.editingItem.value !== null || j.showReplaceWarning.value);
|
|
2297
2292
|
function K() {
|
|
2298
|
-
|
|
2293
|
+
return G.value ? !0 : N.showMovePicker.value ? (N.showMovePicker.value = !1, !0) : j.showDeleteWarning.value ? (j.cancelDelete(), !0) : !1;
|
|
2294
|
+
}
|
|
2295
|
+
function q() {
|
|
2296
|
+
W.value && j.previewItem.value && u("confirm", j.previewItem.value);
|
|
2299
2297
|
}
|
|
2300
|
-
function
|
|
2298
|
+
function ue(e) {
|
|
2301
2299
|
let t = e.target.value;
|
|
2302
2300
|
j.filterByCategory(t || null);
|
|
2303
2301
|
}
|
|
2304
|
-
async function
|
|
2302
|
+
async function Y() {
|
|
2305
2303
|
let e = /* @__PURE__ */ new Set();
|
|
2306
2304
|
for (let t of j.selectedItems.value) N.displayItems.value.find((e) => e.id === t)?.canDelete !== !1 && e.add(t);
|
|
2307
2305
|
j.selectedItems.value = e, await N.handleDeleteClick();
|
|
2308
2306
|
}
|
|
2309
|
-
return
|
|
2307
|
+
return O(() => c.accept, (e) => {
|
|
2310
2308
|
e?.length === 1 && (j.categoryFilter.value = e[0]);
|
|
2311
|
-
}, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), u("ready"),
|
|
2309
|
+
}, { immediate: !0 }), j.loadItems(), j.loadFrequentlyUsed(), j.loadStorage(), u("ready"), s(() => {
|
|
2312
2310
|
N.resetUI();
|
|
2313
|
-
}),
|
|
2314
|
-
nestedDialogOpen:
|
|
2315
|
-
handleEscape:
|
|
2311
|
+
}), n({
|
|
2312
|
+
nestedDialogOpen: G,
|
|
2313
|
+
handleEscape: K,
|
|
2316
2314
|
library: j,
|
|
2317
2315
|
ui: N
|
|
2318
|
-
}), (
|
|
2319
|
-
|
|
2320
|
-
|
|
2316
|
+
}), (n, r) => (v(), h("div", hn, [
|
|
2317
|
+
b("div", gn, [b("h2", _n, a(_.value.mediaLibrary.title), 1), b("div", vn, [
|
|
2318
|
+
S(j).storageInfo.value ? (v(), T(dn, {
|
|
2321
2319
|
key: 0,
|
|
2322
|
-
"used-bytes":
|
|
2323
|
-
"limit-bytes":
|
|
2320
|
+
"used-bytes": S(j).storageInfo.value.usedBytes,
|
|
2321
|
+
"limit-bytes": S(j).storageInfo.value.limitBytes,
|
|
2324
2322
|
size: 22
|
|
2325
|
-
}, null, 8, ["used-bytes", "limit-bytes"])) :
|
|
2326
|
-
|
|
2327
|
-
value:
|
|
2323
|
+
}, null, 8, ["used-bytes", "limit-bytes"])) : m("", !0),
|
|
2324
|
+
b("div", yn, [b("input", {
|
|
2325
|
+
value: S(N).searchInput.value,
|
|
2328
2326
|
type: "search",
|
|
2329
2327
|
disabled: U.value,
|
|
2330
|
-
"aria-label":
|
|
2328
|
+
"aria-label": _.value.mediaLibrary.searchAriaLabel,
|
|
2331
2329
|
class: "tpl:w-52 tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-3 tpl:pl-8 tpl:text-xs tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:outline-none tpl:focus:shadow-[var(--tpl-ring)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
2332
2330
|
style: {
|
|
2333
2331
|
"border-color": "var(--tpl-border)",
|
|
2334
2332
|
"background-color": "var(--tpl-bg)",
|
|
2335
2333
|
color: "var(--tpl-text)"
|
|
2336
2334
|
},
|
|
2337
|
-
placeholder:
|
|
2338
|
-
onInput:
|
|
2339
|
-
}, null, 40, bn),
|
|
2335
|
+
placeholder: _.value.mediaLibrary.searchPlaceholder,
|
|
2336
|
+
onInput: r[0] ||= (e) => S(N).handleSearchInput(e.target.value)
|
|
2337
|
+
}, null, 40, bn), d(S(oe), {
|
|
2340
2338
|
class: "tpl:absolute tpl:top-1/2 tpl:left-2.5 tpl:-translate-y-1/2",
|
|
2341
2339
|
size: 13,
|
|
2342
2340
|
"stroke-width": 2,
|
|
2343
2341
|
style: { color: "var(--tpl-text-dim)" }
|
|
2344
2342
|
})]),
|
|
2345
|
-
|
|
2343
|
+
t.showClose ? (v(), h("button", {
|
|
2346
2344
|
key: 1,
|
|
2347
2345
|
type: "button",
|
|
2348
|
-
"aria-label":
|
|
2346
|
+
"aria-label": _.value.mediaLibrary.close,
|
|
2349
2347
|
class: "tpl:flex tpl:size-7 tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2350
2348
|
style: { color: "var(--tpl-text-muted)" },
|
|
2351
|
-
onClick:
|
|
2352
|
-
}, [
|
|
2349
|
+
onClick: r[1] ||= (e) => u("close")
|
|
2350
|
+
}, [d(S(ce), {
|
|
2353
2351
|
size: 18,
|
|
2354
2352
|
"stroke-width": 2
|
|
2355
|
-
})], 8, xn)) :
|
|
2353
|
+
})], 8, xn)) : m("", !0)
|
|
2356
2354
|
])]),
|
|
2357
|
-
|
|
2355
|
+
b("div", Sn, [d(M, {
|
|
2358
2356
|
"enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
|
|
2359
2357
|
"enter-from-class": "tpl:-ml-48 tpl:opacity-0",
|
|
2360
2358
|
"enter-to-class": "tpl:ml-0 tpl:opacity-100",
|
|
@@ -2362,19 +2360,19 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2362
2360
|
"leave-from-class": "tpl:ml-0 tpl:opacity-100",
|
|
2363
2361
|
"leave-to-class": "tpl:-ml-48 tpl:opacity-0"
|
|
2364
2362
|
}, {
|
|
2365
|
-
default:
|
|
2366
|
-
folders:
|
|
2367
|
-
"current-folder-id":
|
|
2368
|
-
"view-mode":
|
|
2369
|
-
"has-frequently-used": z.value &&
|
|
2370
|
-
"can-create-folder":
|
|
2371
|
-
"can-rename-folder":
|
|
2372
|
-
"can-delete-folder":
|
|
2373
|
-
onNavigate:
|
|
2374
|
-
onCreateFolder:
|
|
2375
|
-
onRenameFolder:
|
|
2376
|
-
onDeleteFolder:
|
|
2377
|
-
onShowFrequentlyUsed:
|
|
2363
|
+
default: l(() => [F.value && S(N).showSidebar.value ? (v(), h("div", Cn, [d(Fe, {
|
|
2364
|
+
folders: S(N).folderTree.value,
|
|
2365
|
+
"current-folder-id": S(j).currentFolderId.value,
|
|
2366
|
+
"view-mode": S(j).viewMode.value,
|
|
2367
|
+
"has-frequently-used": z.value && S(N).hasFrequentlyUsed.value,
|
|
2368
|
+
"can-create-folder": re.value,
|
|
2369
|
+
"can-rename-folder": V.value,
|
|
2370
|
+
"can-delete-folder": H.value,
|
|
2371
|
+
onNavigate: S(j).navigateToFolder,
|
|
2372
|
+
onCreateFolder: S(N).handleCreateFolder,
|
|
2373
|
+
onRenameFolder: S(N).handleRenameFolder,
|
|
2374
|
+
onDeleteFolder: S(N).handleDeleteFolder,
|
|
2375
|
+
onShowFrequentlyUsed: S(j).showFrequentlyUsed
|
|
2378
2376
|
}, null, 8, [
|
|
2379
2377
|
"folders",
|
|
2380
2378
|
"current-folder-id",
|
|
@@ -2388,90 +2386,90 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2388
2386
|
"onRenameFolder",
|
|
2389
2387
|
"onDeleteFolder",
|
|
2390
2388
|
"onShowFrequentlyUsed"
|
|
2391
|
-
])])) :
|
|
2389
|
+
])])) : m("", !0)]),
|
|
2392
2390
|
_: 1
|
|
2393
|
-
}),
|
|
2394
|
-
F.value ? (
|
|
2391
|
+
}), b("div", wn, [b("div", Tn, [b("div", En, [
|
|
2392
|
+
F.value ? (v(), h("button", {
|
|
2395
2393
|
key: 0,
|
|
2396
2394
|
type: "button",
|
|
2397
2395
|
"data-testid": "media-folder-toggle",
|
|
2398
2396
|
class: "tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:transition-all tpl:duration-150",
|
|
2399
|
-
style:
|
|
2400
|
-
color:
|
|
2401
|
-
backgroundColor:
|
|
2402
|
-
border:
|
|
2397
|
+
style: y({
|
|
2398
|
+
color: S(N).showSidebar.value ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2399
|
+
backgroundColor: S(N).showSidebar.value ? "var(--tpl-bg)" : "transparent",
|
|
2400
|
+
border: S(N).showSidebar.value ? "1px solid var(--tpl-border)" : "1px solid transparent"
|
|
2403
2401
|
}),
|
|
2404
|
-
title:
|
|
2405
|
-
"aria-label":
|
|
2406
|
-
"aria-pressed":
|
|
2407
|
-
onClick:
|
|
2408
|
-
}, [
|
|
2402
|
+
title: S(N).showSidebar.value ? _.value.mediaLibrary.hideFolders : _.value.mediaLibrary.showFolders,
|
|
2403
|
+
"aria-label": S(N).showSidebar.value ? _.value.mediaLibrary.hideFolders : _.value.mediaLibrary.showFolders,
|
|
2404
|
+
"aria-pressed": S(N).showSidebar.value,
|
|
2405
|
+
onClick: r[2] ||= (e) => S(N).showSidebar.value = !S(N).showSidebar.value
|
|
2406
|
+
}, [d(S(J), {
|
|
2409
2407
|
size: 16,
|
|
2410
2408
|
"stroke-width": 2
|
|
2411
|
-
})], 12, Dn)) :
|
|
2412
|
-
|
|
2409
|
+
})], 12, Dn)) : m("", !0),
|
|
2410
|
+
S(j).viewMode.value === "frequently-used" ? (v(), h("span", On, a(_.value.mediaLibrary.frequentlyUsed), 1)) : (v(), T(xe, {
|
|
2413
2411
|
key: 2,
|
|
2414
|
-
folders:
|
|
2415
|
-
"current-folder-id":
|
|
2416
|
-
onNavigate:
|
|
2412
|
+
folders: S(N).folderTree.value,
|
|
2413
|
+
"current-folder-id": S(j).currentFolderId.value,
|
|
2414
|
+
onNavigate: S(j).navigateToFolder
|
|
2417
2415
|
}, null, 8, [
|
|
2418
2416
|
"folders",
|
|
2419
2417
|
"current-folder-id",
|
|
2420
2418
|
"onNavigate"
|
|
2421
2419
|
])),
|
|
2422
|
-
|
|
2420
|
+
b("div", kn, [b("button", {
|
|
2423
2421
|
type: "button",
|
|
2424
2422
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2425
|
-
style:
|
|
2426
|
-
color:
|
|
2427
|
-
backgroundColor:
|
|
2423
|
+
style: y({
|
|
2424
|
+
color: S(N).layoutMode.value === "grid" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2425
|
+
backgroundColor: S(N).layoutMode.value === "grid" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2428
2426
|
}),
|
|
2429
|
-
title:
|
|
2430
|
-
"aria-label":
|
|
2431
|
-
"aria-pressed":
|
|
2432
|
-
onClick:
|
|
2433
|
-
}, [
|
|
2427
|
+
title: _.value.mediaLibrary.viewGrid,
|
|
2428
|
+
"aria-label": _.value.mediaLibrary.viewGrid,
|
|
2429
|
+
"aria-pressed": S(N).layoutMode.value === "grid",
|
|
2430
|
+
onClick: r[3] ||= (e) => S(N).layoutMode.value = "grid"
|
|
2431
|
+
}, [d(S(le), {
|
|
2434
2432
|
size: 14,
|
|
2435
2433
|
"stroke-width": 2
|
|
2436
|
-
})], 12, An),
|
|
2434
|
+
})], 12, An), b("button", {
|
|
2437
2435
|
type: "button",
|
|
2438
2436
|
class: "tpl:flex tpl:size-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded tpl:transition-all tpl:duration-150",
|
|
2439
|
-
style:
|
|
2440
|
-
color:
|
|
2441
|
-
backgroundColor:
|
|
2437
|
+
style: y({
|
|
2438
|
+
color: S(N).layoutMode.value === "list" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
2439
|
+
backgroundColor: S(N).layoutMode.value === "list" ? "var(--tpl-bg-elevated)" : "transparent"
|
|
2442
2440
|
}),
|
|
2443
|
-
title:
|
|
2444
|
-
"aria-label":
|
|
2445
|
-
"aria-pressed":
|
|
2446
|
-
onClick:
|
|
2447
|
-
}, [
|
|
2441
|
+
title: _.value.mediaLibrary.viewList,
|
|
2442
|
+
"aria-label": _.value.mediaLibrary.viewList,
|
|
2443
|
+
"aria-pressed": S(N).layoutMode.value === "list",
|
|
2444
|
+
onClick: r[4] ||= (e) => S(N).layoutMode.value = "list"
|
|
2445
|
+
}, [d(S(ae), {
|
|
2448
2446
|
size: 14,
|
|
2449
2447
|
"stroke-width": 2
|
|
2450
2448
|
})], 12, jn)])
|
|
2451
|
-
]),
|
|
2449
|
+
]), b("div", Mn, [S(k).length > 1 ? (v(), h("select", {
|
|
2452
2450
|
key: 0,
|
|
2453
|
-
"aria-label":
|
|
2451
|
+
"aria-label": _.value.mediaLibrary.filterAriaLabel,
|
|
2454
2452
|
class: "tpl:rounded-md tpl:border tpl:py-1.5 tpl:pr-7 tpl:pl-2.5 tpl:text-xs tpl:transition-all tpl:duration-150 tpl:outline-none",
|
|
2455
2453
|
style: {
|
|
2456
2454
|
"border-color": "var(--tpl-border)",
|
|
2457
2455
|
"background-color": "var(--tpl-bg)",
|
|
2458
2456
|
color: "var(--tpl-text)"
|
|
2459
2457
|
},
|
|
2460
|
-
value:
|
|
2461
|
-
onChange:
|
|
2462
|
-
}, [
|
|
2463
|
-
key:
|
|
2464
|
-
value:
|
|
2465
|
-
},
|
|
2458
|
+
value: S(j).categoryFilter.value ?? "",
|
|
2459
|
+
onChange: ue
|
|
2460
|
+
}, [b("option", Pn, a(_.value.mediaLibrary.filterAll), 1), (v(!0), h(w, null, o(S(k), (e) => (v(), h("option", {
|
|
2461
|
+
key: e,
|
|
2462
|
+
value: e
|
|
2463
|
+
}, a(S(N).getCategoryLabel(e)), 9, Fn))), 128))], 40, Nn)) : m("", !0)])]), b("div", In, [S(j).viewMode.value === "files" && (P.value || I.value) ? (v(), h("div", Ln, [P.value ? (v(), T(an, {
|
|
2466
2464
|
key: 0,
|
|
2467
|
-
"is-uploading":
|
|
2468
|
-
"upload-progress":
|
|
2469
|
-
onUpload:
|
|
2465
|
+
"is-uploading": S(j).isUploading.value,
|
|
2466
|
+
"upload-progress": S(j).uploadProgress.value,
|
|
2467
|
+
onUpload: S(N).handleUpload
|
|
2470
2468
|
}, null, 8, [
|
|
2471
2469
|
"is-uploading",
|
|
2472
2470
|
"upload-progress",
|
|
2473
2471
|
"onUpload"
|
|
2474
|
-
])) :
|
|
2472
|
+
])) : m("", !0), I.value ? (v(), h("button", {
|
|
2475
2473
|
key: 1,
|
|
2476
2474
|
"data-testid": "media-import-url",
|
|
2477
2475
|
class: "tpl:mt-2 tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:border-dashed tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
@@ -2480,26 +2478,26 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2480
2478
|
color: "var(--tpl-text-muted)",
|
|
2481
2479
|
"background-color": "var(--tpl-bg)"
|
|
2482
2480
|
},
|
|
2483
|
-
onClick:
|
|
2484
|
-
}, [
|
|
2481
|
+
onClick: r[5] ||= (e) => S(N).showImportUrlModal.value = !0
|
|
2482
|
+
}, [d(S(ie), {
|
|
2485
2483
|
size: 14,
|
|
2486
2484
|
"stroke-width": 2
|
|
2487
|
-
}),
|
|
2488
|
-
items:
|
|
2489
|
-
"selected-ids":
|
|
2490
|
-
"is-loading":
|
|
2491
|
-
"has-more":
|
|
2492
|
-
accept:
|
|
2493
|
-
layout:
|
|
2494
|
-
"search-query":
|
|
2495
|
-
"can-update":
|
|
2496
|
-
"can-replace":
|
|
2497
|
-
onSelect:
|
|
2498
|
-
onToggle:
|
|
2499
|
-
onLoadMore:
|
|
2500
|
-
onEdit:
|
|
2501
|
-
onReplace:
|
|
2502
|
-
onConfirm:
|
|
2485
|
+
}), g(" " + a(_.value.mediaLibrary.importFromUrl), 1)])) : m("", !0)])) : m("", !0), d(pt, {
|
|
2486
|
+
items: S(N).displayItems.value,
|
|
2487
|
+
"selected-ids": S(j).selectedItems.value,
|
|
2488
|
+
"is-loading": S(j).isLoading.value,
|
|
2489
|
+
"has-more": S(j).viewMode.value === "files" && S(j).hasMore.value,
|
|
2490
|
+
accept: t.accept,
|
|
2491
|
+
layout: S(N).layoutMode.value,
|
|
2492
|
+
"search-query": S(j).searchQuery.value,
|
|
2493
|
+
"can-update": L.value,
|
|
2494
|
+
"can-replace": R.value,
|
|
2495
|
+
onSelect: S(N).handleSelect,
|
|
2496
|
+
onToggle: S(j).toggleSelection,
|
|
2497
|
+
onLoadMore: S(j).loadMore,
|
|
2498
|
+
onEdit: S(N).handleEditItem,
|
|
2499
|
+
onReplace: S(N).handleReplaceItem,
|
|
2500
|
+
onConfirm: q
|
|
2503
2501
|
}, null, 8, [
|
|
2504
2502
|
"items",
|
|
2505
2503
|
"selected-ids",
|
|
@@ -2516,38 +2514,38 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2516
2514
|
"onEdit",
|
|
2517
2515
|
"onReplace"
|
|
2518
2516
|
])])])]),
|
|
2519
|
-
|
|
2520
|
-
visible:
|
|
2521
|
-
"is-importing":
|
|
2522
|
-
error:
|
|
2523
|
-
onImport:
|
|
2524
|
-
onClose:
|
|
2517
|
+
d(wt, {
|
|
2518
|
+
visible: S(N).showImportUrlModal.value,
|
|
2519
|
+
"is-importing": S(j).isImportingFromUrl.value,
|
|
2520
|
+
error: S(j).importFromUrlError.value,
|
|
2521
|
+
onImport: S(N).handleImportFromUrl,
|
|
2522
|
+
onClose: r[6] ||= (e) => S(N).showImportUrlModal.value = !1
|
|
2525
2523
|
}, null, 8, [
|
|
2526
2524
|
"visible",
|
|
2527
2525
|
"is-importing",
|
|
2528
2526
|
"error",
|
|
2529
2527
|
"onImport"
|
|
2530
2528
|
]),
|
|
2531
|
-
|
|
2529
|
+
S(N).editingItem.value ? (v(), T(S(f), {
|
|
2532
2530
|
key: 0,
|
|
2533
2531
|
visible: !0,
|
|
2534
|
-
item:
|
|
2535
|
-
save:
|
|
2536
|
-
"can-crop":
|
|
2537
|
-
onClose:
|
|
2532
|
+
item: S(N).editingItem.value,
|
|
2533
|
+
save: S(N).handleEditSave,
|
|
2534
|
+
"can-crop": R.value && S(N).editingItem.value.canUpdate !== !1,
|
|
2535
|
+
onClose: r[7] ||= (e) => S(N).editingItem.value = null
|
|
2538
2536
|
}, null, 8, [
|
|
2539
2537
|
"item",
|
|
2540
2538
|
"save",
|
|
2541
2539
|
"can-crop"
|
|
2542
|
-
])) :
|
|
2543
|
-
|
|
2544
|
-
visible:
|
|
2545
|
-
item:
|
|
2546
|
-
"usage-info":
|
|
2547
|
-
"is-replacing":
|
|
2548
|
-
error:
|
|
2549
|
-
onReplace:
|
|
2550
|
-
onClose:
|
|
2540
|
+
])) : m("", !0),
|
|
2541
|
+
d(Xt, {
|
|
2542
|
+
visible: S(j).showReplaceWarning.value,
|
|
2543
|
+
item: S(j).pendingReplaceItem.value,
|
|
2544
|
+
"usage-info": S(j).replaceUsageInfo.value,
|
|
2545
|
+
"is-replacing": S(j).isReplacing.value,
|
|
2546
|
+
error: S(j).replaceError.value,
|
|
2547
|
+
onReplace: S(N).handleReplaceFile,
|
|
2548
|
+
onClose: S(j).cancelReplace
|
|
2551
2549
|
}, null, 8, [
|
|
2552
2550
|
"visible",
|
|
2553
2551
|
"item",
|
|
@@ -2557,7 +2555,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2557
2555
|
"onReplace",
|
|
2558
2556
|
"onClose"
|
|
2559
2557
|
]),
|
|
2560
|
-
|
|
2558
|
+
d(M, {
|
|
2561
2559
|
"enter-active-class": "tpl:transition tpl:ease-out tpl:duration-150",
|
|
2562
2560
|
"enter-from-class": "tpl:opacity-0",
|
|
2563
2561
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2565,7 +2563,7 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2565
2563
|
"leave-from-class": "tpl:opacity-100",
|
|
2566
2564
|
"leave-to-class": "tpl:opacity-0"
|
|
2567
2565
|
}, {
|
|
2568
|
-
default:
|
|
2566
|
+
default: l(() => [S(j).showDeleteWarning.value ? (v(), h("div", {
|
|
2569
2567
|
key: 0,
|
|
2570
2568
|
role: "dialog",
|
|
2571
2569
|
"aria-modal": "true",
|
|
@@ -2576,79 +2574,79 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2576
2574
|
"backdrop-filter": "blur(8px)",
|
|
2577
2575
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2578
2576
|
},
|
|
2579
|
-
onClick:
|
|
2580
|
-
}, [
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
class:
|
|
2577
|
+
onClick: r[10] ||= A((...e) => S(j).cancelDelete && S(j).cancelDelete(...e), ["self"])
|
|
2578
|
+
}, [b("div", Rn, [
|
|
2579
|
+
b("h3", zn, a(_.value.mediaLibrary.deleteWarningTitle), 1),
|
|
2580
|
+
b("p", {
|
|
2581
|
+
class: e(["tpl:text-xs", S(N).hasUsedFiles.value ? "tpl:mb-2" : "tpl:mb-4"]),
|
|
2584
2582
|
style: { color: "var(--tpl-text-muted)" }
|
|
2585
|
-
},
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
key:
|
|
2583
|
+
}, a(_.value.mediaLibrary.deleteWarningMessage), 3),
|
|
2584
|
+
S(N).hasUsedFiles.value ? (v(), h("p", Bn, a(_.value.mediaLibrary.deleteWarningUsageNote), 1)) : m("", !0),
|
|
2585
|
+
S(N).hasUsedFiles.value ? (v(), h("div", Vn, [(v(!0), h(w, null, o(S(j).deleteUsageInfo.value, (e, t) => (v(), h("div", {
|
|
2586
|
+
key: t,
|
|
2589
2587
|
class: "tpl:text-xs",
|
|
2590
2588
|
style: { color: "var(--tpl-text)" }
|
|
2591
|
-
}, [
|
|
2592
|
-
|
|
2589
|
+
}, [e.templateCount > 0 ? (v(), h(w, { key: 0 }, [b("span", Hn, a(S(N).displayItems.value.find((e) => e.id === t)?.filename || t), 1), b("span", Un, " - " + a(_.value.mediaLibrary.usedInTemplates.replace("{count}", e.templateCount.toString())), 1)], 64)) : m("", !0)]))), 128))])) : m("", !0),
|
|
2590
|
+
b("div", Wn, [b("button", {
|
|
2593
2591
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2594
2592
|
style: {
|
|
2595
2593
|
"border-color": "var(--tpl-border)",
|
|
2596
2594
|
color: "var(--tpl-text)",
|
|
2597
2595
|
"background-color": "var(--tpl-bg)"
|
|
2598
2596
|
},
|
|
2599
|
-
onClick:
|
|
2600
|
-
},
|
|
2597
|
+
onClick: r[8] ||= (...e) => S(j).cancelDelete && S(j).cancelDelete(...e)
|
|
2598
|
+
}, a(_.value.mediaLibrary.cancel), 1), b("button", {
|
|
2601
2599
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2602
2600
|
style: {
|
|
2603
2601
|
"border-color": "var(--tpl-danger)",
|
|
2604
2602
|
color: "var(--tpl-danger)",
|
|
2605
2603
|
"background-color": "var(--tpl-bg)"
|
|
2606
2604
|
},
|
|
2607
|
-
onClick:
|
|
2608
|
-
},
|
|
2609
|
-
])])) :
|
|
2605
|
+
onClick: r[9] ||= (...e) => S(j).confirmDelete && S(j).confirmDelete(...e)
|
|
2606
|
+
}, a(S(N).hasUsedFiles.value ? _.value.mediaLibrary.deleteAnyway : _.value.mediaLibrary.confirmDelete), 1)])
|
|
2607
|
+
])])) : m("", !0)]),
|
|
2610
2608
|
_: 1
|
|
2611
2609
|
}),
|
|
2612
|
-
|
|
2610
|
+
b("div", Gn, [b("div", Kn, [S(j).previewItem.value ? (v(), T(It, {
|
|
2613
2611
|
key: 0,
|
|
2614
|
-
item:
|
|
2615
|
-
folders:
|
|
2616
|
-
}, null, 8, ["item", "folders"])) :
|
|
2612
|
+
item: S(j).previewItem.value,
|
|
2613
|
+
folders: S(N).folderTree.value
|
|
2614
|
+
}, null, 8, ["item", "folders"])) : m("", !0)]), b("div", qn, [S(j).selectedItems.value.size > 0 ? (v(), h("div", Jn, [S(j).previewItem.value ? (v(), h("button", {
|
|
2617
2615
|
key: 0,
|
|
2618
2616
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-1 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2619
|
-
style:
|
|
2620
|
-
borderColor:
|
|
2621
|
-
color:
|
|
2617
|
+
style: y({
|
|
2618
|
+
borderColor: S(N).copied.value ? "var(--tpl-success)" : "var(--tpl-border)",
|
|
2619
|
+
color: S(N).copied.value ? "var(--tpl-success)" : "var(--tpl-text)",
|
|
2622
2620
|
backgroundColor: "var(--tpl-bg)"
|
|
2623
2621
|
}),
|
|
2624
|
-
onClick:
|
|
2625
|
-
}, [
|
|
2622
|
+
onClick: r[11] ||= (e) => S(N).copy(S(N).selectedUrl.value)
|
|
2623
|
+
}, [S(N).copied.value ? (v(), T(S(B), {
|
|
2626
2624
|
key: 1,
|
|
2627
2625
|
size: 12,
|
|
2628
2626
|
"stroke-width": 2
|
|
2629
|
-
})) : (
|
|
2627
|
+
})) : (v(), T(S(ne), {
|
|
2630
2628
|
key: 0,
|
|
2631
2629
|
size: 12,
|
|
2632
2630
|
"stroke-width": 2
|
|
2633
|
-
})),
|
|
2631
|
+
})), g(" " + a(S(N).copied.value ? _.value.mediaLibrary.copied : _.value.mediaLibrary.copyUrl), 1)], 4)) : m("", !0), te.value ? (v(), h("div", Yn, [b("button", {
|
|
2634
2632
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
2635
2633
|
style: {
|
|
2636
2634
|
"border-color": "var(--tpl-border)",
|
|
2637
2635
|
color: "var(--tpl-text)",
|
|
2638
2636
|
"background-color": "var(--tpl-bg)"
|
|
2639
2637
|
},
|
|
2640
|
-
onClick:
|
|
2641
|
-
},
|
|
2638
|
+
onClick: r[12] ||= (e) => S(N).showMovePicker.value = !S(N).showMovePicker.value
|
|
2639
|
+
}, a(_.value.mediaLibrary.moveSelected), 1), S(N).showMovePicker.value ? (v(), T(kt, {
|
|
2642
2640
|
key: 0,
|
|
2643
|
-
folders:
|
|
2644
|
-
"current-folder-id":
|
|
2645
|
-
onSelect:
|
|
2646
|
-
onClose:
|
|
2641
|
+
folders: S(N).folderTree.value,
|
|
2642
|
+
"current-folder-id": S(j).currentFolderId.value,
|
|
2643
|
+
onSelect: S(N).handleMoveToFolder,
|
|
2644
|
+
onClose: r[13] ||= (e) => S(N).showMovePicker.value = !1
|
|
2647
2645
|
}, null, 8, [
|
|
2648
2646
|
"folders",
|
|
2649
2647
|
"current-folder-id",
|
|
2650
2648
|
"onSelect"
|
|
2651
|
-
])) :
|
|
2649
|
+
])) : m("", !0)])) : m("", !0)])) : m("", !0), b("div", Xn, [se.value > 0 ? (v(), h("button", {
|
|
2652
2650
|
key: 0,
|
|
2653
2651
|
"data-testid": "media-delete",
|
|
2654
2652
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
@@ -2657,24 +2655,24 @@ var hn = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col tpl
|
|
|
2657
2655
|
color: "var(--tpl-danger)",
|
|
2658
2656
|
"background-color": "var(--tpl-bg)"
|
|
2659
2657
|
},
|
|
2660
|
-
onClick:
|
|
2661
|
-
},
|
|
2658
|
+
onClick: Y
|
|
2659
|
+
}, a(_.value.mediaLibrary.deleteSelected), 1)) : m("", !0), t.showConfirm ? (v(), h("button", {
|
|
2662
2660
|
key: 1,
|
|
2663
|
-
"data-testid":
|
|
2661
|
+
"data-testid": x.value,
|
|
2664
2662
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-4 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:bg-[var(--tpl-primary-hover)] tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50",
|
|
2665
2663
|
style: {
|
|
2666
2664
|
"background-color": "var(--tpl-primary)",
|
|
2667
2665
|
color: "var(--tpl-on-primary)"
|
|
2668
2666
|
},
|
|
2669
|
-
disabled: !
|
|
2670
|
-
onClick:
|
|
2671
|
-
},
|
|
2667
|
+
disabled: !W.value,
|
|
2668
|
+
onClick: q
|
|
2669
|
+
}, a(t.accept?.length ? _.value.mediaLibrary.selectImage : _.value.mediaLibrary.selectFile), 9, Zn)) : m("", !0)])])])
|
|
2672
2670
|
]));
|
|
2673
2671
|
}
|
|
2674
2672
|
}), $n = /* #__PURE__ */ Object.assign({
|
|
2675
2673
|
"./locales/ca.ts": () => import("./ca-CYQH3J0b.js"),
|
|
2676
2674
|
"./locales/de.ts": () => import("./de-JvCTMJPy.js"),
|
|
2677
|
-
"./locales/en.ts": () => import("./en-
|
|
2675
|
+
"./locales/en.ts": () => import("./en-DwV15ltA.js"),
|
|
2678
2676
|
"./locales/es.ts": () => import("./es-CAv-Vldw.js"),
|
|
2679
2677
|
"./locales/fr.ts": () => import("./fr-DVPtxpR6.js"),
|
|
2680
2678
|
"./locales/ja.ts": () => import("./ja-dcWzjStz.js"),
|
|
@@ -2704,7 +2702,7 @@ async function or(e) {
|
|
|
2704
2702
|
}
|
|
2705
2703
|
//#endregion
|
|
2706
2704
|
//#region ../media-library/src/components/MediaLibraryModal.vue?vue&type=script&setup=true&lang.ts
|
|
2707
|
-
var sr = ["data-tpl-theme"], cr = /* @__PURE__ */
|
|
2705
|
+
var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ D({
|
|
2708
2706
|
__name: "MediaLibraryModal",
|
|
2709
2707
|
props: {
|
|
2710
2708
|
visible: { type: Boolean },
|
|
@@ -2717,25 +2715,25 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
|
|
|
2717
2715
|
onError: { type: Function }
|
|
2718
2716
|
},
|
|
2719
2717
|
emits: ["close", "select"],
|
|
2720
|
-
setup(t, { emit:
|
|
2721
|
-
let
|
|
2722
|
-
|
|
2718
|
+
setup(t, { emit: n }) {
|
|
2719
|
+
let r = t, a = n, o = c(null);
|
|
2720
|
+
O(() => r.locale, async (e) => {
|
|
2723
2721
|
o.value = await or(e ?? "en");
|
|
2724
|
-
}, { immediate: !0 }),
|
|
2725
|
-
let s =
|
|
2726
|
-
|
|
2727
|
-
let
|
|
2728
|
-
|
|
2729
|
-
let
|
|
2730
|
-
_e(
|
|
2731
|
-
function
|
|
2732
|
-
e.key === "Escape" && (
|
|
2722
|
+
}, { immediate: !0 }), i(fe, o);
|
|
2723
|
+
let s = p(() => r.uiTheme);
|
|
2724
|
+
i(X, s);
|
|
2725
|
+
let u = x(() => r.popoverTarget ?? null);
|
|
2726
|
+
i(Y, u), i(Z, x(() => r.locale));
|
|
2727
|
+
let g = c(null), _ = c(null);
|
|
2728
|
+
_e(g, p(() => r.visible && o.value !== null && !_.value?.nestedDialogOpen));
|
|
2729
|
+
function y(e) {
|
|
2730
|
+
e.key === "Escape" && (_.value?.handleEscape() ? e.preventDefault() : a("close"));
|
|
2733
2731
|
}
|
|
2734
|
-
P(document, "keydown",
|
|
2735
|
-
function
|
|
2732
|
+
P(document, "keydown", y);
|
|
2733
|
+
function S(e) {
|
|
2736
2734
|
a("select", e), a("close");
|
|
2737
2735
|
}
|
|
2738
|
-
return (
|
|
2736
|
+
return (n, r) => (v(), T(f, { to: t.popoverTarget || "body" }, [d(M, {
|
|
2739
2737
|
"enter-active-class": "tpl:transition tpl:duration-200",
|
|
2740
2738
|
"enter-from-class": "tpl:opacity-0",
|
|
2741
2739
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -2743,20 +2741,20 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
|
|
|
2743
2741
|
"leave-from-class": "tpl:opacity-100",
|
|
2744
2742
|
"leave-to-class": "tpl:opacity-0"
|
|
2745
2743
|
}, {
|
|
2746
|
-
default:
|
|
2744
|
+
default: l(() => [t.visible && o.value ? (v(), h("div", {
|
|
2747
2745
|
key: 0,
|
|
2748
2746
|
"data-testid": "media-library-modal",
|
|
2749
2747
|
"data-tpl-theme": s.value,
|
|
2750
|
-
class:
|
|
2748
|
+
class: e([t.popoverTarget ? void 0 : "tpl", "tpl-media-overlay tpl:fixed tpl:inset-0 tpl:z-10 tpl:flex tpl:items-center tpl:justify-center tpl:p-4"]),
|
|
2751
2749
|
style: {
|
|
2752
2750
|
"background-color": "var(--tpl-overlay)",
|
|
2753
2751
|
"backdrop-filter": "blur(8px)",
|
|
2754
2752
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
2755
2753
|
},
|
|
2756
|
-
onClick:
|
|
2757
|
-
}, [
|
|
2754
|
+
onClick: r[1] ||= A((e) => a("close"), ["self"])
|
|
2755
|
+
}, [b("div", {
|
|
2758
2756
|
ref_key: "dialogRef",
|
|
2759
|
-
ref:
|
|
2757
|
+
ref: g,
|
|
2760
2758
|
role: "dialog",
|
|
2761
2759
|
"aria-modal": "true",
|
|
2762
2760
|
"aria-labelledby": "tpl-media-library-title",
|
|
@@ -2771,9 +2769,9 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
|
|
|
2771
2769
|
border: "1px solid var(--tpl-border)",
|
|
2772
2770
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
2773
2771
|
}
|
|
2774
|
-
}, [
|
|
2772
|
+
}, [d(Qn, {
|
|
2775
2773
|
ref_key: "chromeRef",
|
|
2776
|
-
ref:
|
|
2774
|
+
ref: _,
|
|
2777
2775
|
provider: t.provider,
|
|
2778
2776
|
accept: t.accept,
|
|
2779
2777
|
"template-id": t.templateId,
|
|
@@ -2782,18 +2780,18 @@ var sr = ["data-tpl-theme"], cr = /* @__PURE__ */ O({
|
|
|
2782
2780
|
"show-close": "",
|
|
2783
2781
|
"show-confirm": "",
|
|
2784
2782
|
"confirm-test-id": "media-confirm",
|
|
2785
|
-
onClose:
|
|
2786
|
-
onConfirm:
|
|
2783
|
+
onClose: r[0] ||= (e) => a("close"),
|
|
2784
|
+
onConfirm: S
|
|
2787
2785
|
}, null, 8, [
|
|
2788
2786
|
"provider",
|
|
2789
2787
|
"accept",
|
|
2790
2788
|
"template-id",
|
|
2791
2789
|
"on-error",
|
|
2792
2790
|
"translations"
|
|
2793
|
-
])], 512)], 10, sr)) :
|
|
2791
|
+
])], 512)], 10, sr)) : m("", !0)]),
|
|
2794
2792
|
_: 1
|
|
2795
2793
|
})], 8, ["to"]));
|
|
2796
2794
|
}
|
|
2797
2795
|
});
|
|
2798
2796
|
//#endregion
|
|
2799
|
-
export { cr as MediaLibraryModal,
|
|
2797
|
+
export { cr as MediaLibraryModal, Y as a, pe as i, he as n, X as o, Q as r, _e as t };
|